Skip to content

Commit cd7fc8c

Browse files
committed
Merge branch 'master' into feature/frontend-dashboard-fix
# Conflicts: # frontend/package-lock.json
2 parents d0926c7 + 0798800 commit cd7fc8c

File tree

199 files changed

+27310
-4885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+27310
-4885
lines changed

.env.example

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,33 @@ GEMINI_SERVER_URL=https://generativelanguage.googleapis.com
2020

2121
## AWS Bedrock LLM provider
2222
BEDROCK_REGION=us-east-1
23+
BEDROCK_DEFAULT_AUTH=
24+
BEDROCK_BEARER_TOKEN=
2325
BEDROCK_ACCESS_KEY_ID=
2426
BEDROCK_SECRET_ACCESS_KEY=
2527
BEDROCK_SESSION_TOKEN=
2628
BEDROCK_SERVER_URL=
2729

30+
## DeepSeek LLM provider
31+
DEEPSEEK_API_KEY=
32+
DEEPSEEK_SERVER_URL=https://api.deepseek.com
33+
DEEPSEEK_PROVIDER=
34+
35+
## GLM (Zhipu AI) LLM provider
36+
GLM_API_KEY=
37+
GLM_SERVER_URL=https://api.z.ai/api/paas/v4
38+
GLM_PROVIDER=
39+
40+
## Kimi (Moonshot) LLM provider
41+
KIMI_API_KEY=
42+
KIMI_SERVER_URL=https://api.moonshot.ai/v1
43+
KIMI_PROVIDER=
44+
45+
## Qwen (Alibaba Cloud DashScope) LLM provider
46+
QWEN_API_KEY=
47+
QWEN_SERVER_URL=https://dashscope-us.aliyuncs.com/compatible-mode/v1
48+
QWEN_PROVIDER=
49+
2850
## Custom LLM provider
2951
LLM_SERVER_URL=
3052
LLM_SERVER_KEY=
@@ -34,8 +56,11 @@ LLM_SERVER_CONFIG_PATH=
3456
LLM_SERVER_LEGACY_REASONING=
3557
LLM_SERVER_PRESERVE_REASONING=
3658

37-
## Ollama LLM provider
59+
## Ollama LLM provider (Local Server or Cloud)
60+
# Local: http://ollama-server:11434, Cloud: https://ollama.com
3861
OLLAMA_SERVER_URL=
62+
# Required for Ollama Cloud (https://ollama.com/settings/keys), leave empty for local
63+
OLLAMA_SERVER_API_KEY=
3964
OLLAMA_SERVER_MODEL=
4065
OLLAMA_SERVER_CONFIG_PATH=
4166
OLLAMA_SERVER_PULL_MODELS_TIMEOUT=
@@ -69,6 +94,18 @@ ASSISTANT_SUMMARIZER_MAX_QA_SECTIONS=
6994
ASSISTANT_SUMMARIZER_MAX_QA_BYTES=
7095
ASSISTANT_SUMMARIZER_KEEP_QA_SECTIONS=
7196

97+
## Execution Monitor Detector
98+
EXECUTION_MONITOR_ENABLED=
99+
EXECUTION_MONITOR_SAME_TOOL_LIMIT=
100+
EXECUTION_MONITOR_TOTAL_TOOL_LIMIT=
101+
102+
## Agent execution tool calls limit
103+
MAX_GENERAL_AGENT_TOOL_CALLS=
104+
MAX_LIMITED_AGENT_TOOL_CALLS=
105+
106+
## Agent planning step for pentester, coder, installer
107+
AGENT_PLANNING_STEP_ENABLED=
108+
72109
## HTTP proxy to use it in isolation environment
73110
PROXY_URL=
74111

@@ -91,6 +128,7 @@ PENTAGI_LISTEN_IP=
91128
PENTAGI_LISTEN_PORT=
92129
PENTAGI_DATA_DIR=
93130
PENTAGI_SSL_DIR=
131+
PENTAGI_OLLAMA_DIR=
94132
PENTAGI_DOCKER_SOCKET=
95133
PENTAGI_DOCKER_CERT_PATH=
96134
PENTAGI_LLM_SERVER_CONFIG_PATH=
@@ -118,8 +156,11 @@ OAUTH_GOOGLE_CLIENT_SECRET=
118156
OAUTH_GITHUB_CLIENT_ID=
119157
OAUTH_GITHUB_CLIENT_SECRET=
120158

121-
## DuckDuckGo search engine API
159+
## DuckDuckGo search engine
122160
DUCKDUCKGO_ENABLED=
161+
DUCKDUCKGO_REGION=
162+
DUCKDUCKGO_SAFESEARCH=
163+
DUCKDUCKGO_TIME_RANGE=
123164

124165
## Sploitus search engine API
125166
SPLOITUS_ENABLED=
@@ -146,6 +187,7 @@ SEARXNG_CATEGORIES=general
146187
SEARXNG_LANGUAGE=
147188
SEARXNG_SAFESEARCH=0
148189
SEARXNG_TIME_RANGE=
190+
SEARXNG_TIMEOUT=
149191

150192
## Langfuse observability settings
151193
LANGFUSE_BASE_URL=

.github/workflows/ci.yml

Lines changed: 53 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ jobs:
8484

8585
# Backend lint and test
8686
- name: Backend - Download dependencies
87-
if: steps.go-cache.outputs.cache-hit != 'true'
8887
working-directory: backend
8988
run: go mod download
9089
continue-on-error: true
@@ -95,9 +94,6 @@ jobs:
9594
version: latest
9695
working-directory: backend
9796
args: --timeout=5m --issues-exit-code=0
98-
skip-cache: false
99-
skip-pkg-cache: false
100-
skip-build-cache: false
10197
continue-on-error: true
10298

10399
- name: Backend - Test
@@ -111,12 +107,28 @@ jobs:
111107
CGO_ENABLED: 0
112108
GO111MODULE: on
113109
run: |
110+
# Get version information
111+
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
112+
PACKAGE_VER=${LATEST_TAG#v}
113+
CURRENT_COMMIT=$(git rev-parse HEAD)
114+
TAG_COMMIT=$(git rev-list -n 1 "$LATEST_TAG" 2>/dev/null || echo "")
115+
116+
if [ "$CURRENT_COMMIT" != "$TAG_COMMIT" ]; then
117+
PACKAGE_REV=$(git rev-parse --short HEAD)
118+
else
119+
PACKAGE_REV=""
120+
fi
121+
122+
LDFLAGS="-X pentagi/pkg/version.PackageName=pentagi -X pentagi/pkg/version.PackageVer=${PACKAGE_VER} -X pentagi/pkg/version.PackageRev=${PACKAGE_REV}"
123+
124+
echo "Building with version: ${PACKAGE_VER}${PACKAGE_REV:+-$PACKAGE_REV}"
125+
114126
# Build for AMD64
115-
GOOS=linux GOARCH=amd64 go build -trimpath -o /tmp/pentagi-amd64 ./cmd/pentagi
127+
GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "$LDFLAGS" -o /tmp/pentagi-amd64 ./cmd/pentagi
116128
echo "✓ Successfully built for linux/amd64"
117129
118130
# Build for ARM64
119-
GOOS=linux GOARCH=arm64 go build -trimpath -o /tmp/pentagi-arm64 ./cmd/pentagi
131+
GOOS=linux GOARCH=arm64 go build -trimpath -ldflags "$LDFLAGS" -o /tmp/pentagi-arm64 ./cmd/pentagi
120132
echo "✓ Successfully built for linux/arm64"
121133
continue-on-error: true
122134

@@ -140,18 +152,40 @@ jobs:
140152
password: ${{ secrets.DOCKERHUB_TOKEN }}
141153

142154
# Extract version from tag (without 'v' prefix) and split into parts
143-
- name: Extract version
155+
- name: Extract version and revision
144156
id: version
145157
run: |
146-
if [[ $GITHUB_REF == refs/tags/* ]]; then
147-
VERSION=${GITHUB_REF#refs/tags/v}
148-
echo "version=${VERSION}" >> $GITHUB_OUTPUT
149-
# Split version into major.minor.patch
158+
# Get latest tag version (without 'v' prefix)
159+
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
160+
VERSION=${LATEST_TAG#v}
161+
162+
# Get current commit hash
163+
CURRENT_COMMIT=$(git rev-parse HEAD)
164+
165+
# Get commit hash of the latest tag
166+
TAG_COMMIT=$(git rev-list -n 1 "$LATEST_TAG" 2>/dev/null || echo "")
167+
168+
# Set revision only if current commit differs from tag commit
169+
if [ "$CURRENT_COMMIT" != "$TAG_COMMIT" ]; then
170+
PACKAGE_REV=$(git rev-parse --short HEAD)
171+
echo "revision=${PACKAGE_REV}" >> $GITHUB_OUTPUT
172+
echo "is_release=false" >> $GITHUB_OUTPUT
173+
echo "Building development version: ${VERSION}-${PACKAGE_REV}"
174+
echo " Docker tags: latest only"
175+
else
176+
echo "revision=" >> $GITHUB_OUTPUT
177+
echo "is_release=true" >> $GITHUB_OUTPUT
178+
echo "Building release version: ${VERSION}"
179+
180+
# Split version into major.minor.patch for Docker tags (only for releases)
150181
IFS='.' read -r major minor patch <<< "$VERSION"
151182
echo "major=${major}" >> $GITHUB_OUTPUT
152183
echo "minor=${major}.${minor}" >> $GITHUB_OUTPUT
153-
echo "patch=${major}.${minor}.${patch}" >> $GITHUB_OUTPUT
184+
echo "patch=${VERSION}" >> $GITHUB_OUTPUT
185+
echo " Docker tags: latest, ${major}, ${major}.${minor}, ${VERSION}"
154186
fi
187+
188+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
155189
156190
- name: Generate Docker metadata
157191
id: meta
@@ -161,10 +195,10 @@ jobs:
161195
tags: |
162196
# For master branch - latest tag
163197
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
164-
# For version tags - major, minor and patch versions
165-
type=raw,value=${{ steps.version.outputs.major }},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
166-
type=raw,value=${{ steps.version.outputs.minor }},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
167-
type=raw,value=${{ steps.version.outputs.patch }},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
198+
# For release builds only - tag with major, minor and patch versions
199+
type=raw,value=${{ steps.version.outputs.major }},enable=${{ steps.version.outputs.is_release == 'true' }}
200+
type=raw,value=${{ steps.version.outputs.minor }},enable=${{ steps.version.outputs.is_release == 'true' }}
201+
type=raw,value=${{ steps.version.outputs.patch }},enable=${{ steps.version.outputs.is_release == 'true' }}
168202
169203
- name: Build and push
170204
uses: docker/build-push-action@v6
@@ -178,3 +212,6 @@ jobs:
178212
labels: ${{ steps.meta.outputs.labels }}
179213
cache-from: type=gha
180214
cache-to: type=gha,mode=max
215+
build-args: |
216+
PACKAGE_VER=${{ steps.version.outputs.version }}
217+
PACKAGE_REV=${{ steps.version.outputs.revision }}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,12 @@ data/*
2424
!.gitkeep
2525
.claude/
2626

27+
# IDE
28+
.idea/
29+
*.swp
30+
*.swo
31+
*~
32+
33+
# OS
34+
Thumbs.db
35+

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,30 +61,42 @@
6161
// "-type", "gemini",
6262
// "-type", "bedrock",
6363
// "-type", "ollama",
64+
// "-type", "deepseek",
65+
// "-type", "glm",
66+
// "-type", "kimi",
67+
// "-type", "qwen",
6468
"-config", "${workspaceFolder}/examples/configs/moonshot.provider.yml",
6569
// "-config", "${workspaceFolder}/examples/configs/deepseek.provider.yml",
6670
// "-config", "${workspaceFolder}/examples/configs/ollama-llama318b.provider.yml",
6771
// "-config", "${workspaceFolder}/examples/configs/ollama-llama318b-instruct.provider.yml",
6872
// "-config", "${workspaceFolder}/examples/configs/ollama-qwq32b-fp16-tc.provider.yml",
6973
// "-config", "${workspaceFolder}/examples/configs/ollama-qwen332b-fp16-tc.provider.yml",
74+
// "-config", "${workspaceFolder}/examples/configs/vllm-qwen3.5-27b-fp8.provider.yml",
7075
// "-config", "${workspaceFolder}/examples/configs/vllm-qwen332b-fp16.provider.yml",
7176
// "-config", "${workspaceFolder}/examples/configs/custom-openai.provider.yml",
7277
// "-config", "${workspaceFolder}/examples/configs/openrouter.provider.yml",
7378
// "-config", "${workspaceFolder}/examples/configs/deepinfra.provider.yml",
79+
// "-config", "${workspaceFolder}/examples/configs/novita.provider.yml",
7480
// "-report", "${workspaceFolder}/examples/tests/openai-report.md",
7581
// "-report", "${workspaceFolder}/examples/tests/anthropic-report.md",
7682
// "-report", "${workspaceFolder}/examples/tests/gemini-report.md",
7783
// "-report", "${workspaceFolder}/examples/tests/bedrock-report.md",
84+
// "-report", "${workspaceFolder}/examples/tests/ollama-cloud-report.md",
7885
// "-report", "${workspaceFolder}/examples/tests/ollama-llama318b-report.md",
7986
// "-report", "${workspaceFolder}/examples/tests/ollama-llama318b-instruct-report.md",
8087
// "-report", "${workspaceFolder}/examples/tests/ollama-qwq-32b-fp16-tc-report.md",
8188
// "-report", "${workspaceFolder}/examples/tests/ollama-qwen332b-fp16-tc-report.md",
89+
// "-report", "${workspaceFolder}/examples/tests/vllm-qwen3.5-27b-fp8.report.md",
8290
// "-report", "${workspaceFolder}/examples/tests/vllm-qwen332b-fp16-report.md",
8391
"-report", "${workspaceFolder}/examples/tests/moonshot-report.md",
8492
// "-report", "${workspaceFolder}/examples/tests/deepseek-report.md",
93+
// "-report", "${workspaceFolder}/examples/tests/glm-report.md",
94+
// "-report", "${workspaceFolder}/examples/tests/kimi-report.md",
95+
// "-report", "${workspaceFolder}/examples/tests/qwen-report.md",
8596
// "-report", "${workspaceFolder}/examples/tests/custom-openai-report.md",
8697
// "-report", "${workspaceFolder}/examples/tests/openrouter-report.md",
8798
// "-report", "${workspaceFolder}/examples/tests/deepinfra-report.md",
99+
// "-report", "${workspaceFolder}/examples/tests/novita-report.md",
88100
"-agents", "all",
89101
"-groups", "all",
90102
"-workers", "8",

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"go.lintFlags": [
33
"-checks=\"all,-ST1005\""
44
],
5+
"go.testTimeout": "300s",
56
"go.testEnvVars": {
67
"INSTALLER_LOG_FILE": "${workspaceFolder}/build/log.json"
78
},

0 commit comments

Comments
 (0)