Skip to content

Commit 4b24240

Browse files
chore(release): v0.1.0 初代发布 — 仓库治理完成 + 安全脱敏 (#218)
chore(release): v0.1.0 初代发布 — 仓库治理完成 + 安全脱敏
2 parents d952655 + 455d8ee commit 4b24240

542 files changed

Lines changed: 65272 additions & 21761 deletions

File tree

Some content is hidden

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

.env.example

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ AGENTHUB_SERVER_ADMIN_PORT=6060
3636
AGENTHUB_UPLOAD_DIR=./uploads
3737
AGENTHUB_UPLOAD_MAX_SIZE=10485760
3838

39+
# ── TokenDance ID OIDC ──────────────────────
40+
# Hub Server is the AgentHub relying party. Register the exact Hub callback
41+
# and public Web callback in TokenDance ID before enabling this in a shared
42+
# environment. Keep the client secret in the local/ops secret store only.
43+
AGENTHUB_TOKENDANCE_ID_ISSUER_URL=https://id.vectorcontrol.tech
44+
AGENTHUB_TOKENDANCE_ID_JWKS_URI=
45+
AGENTHUB_TOKENDANCE_ID_CLIENT_ID=
46+
AGENTHUB_TOKENDANCE_ID_CLIENT_SECRET=
47+
AGENTHUB_TOKENDANCE_ID_REDIRECT_URI=http://localhost:8080/client/auth/oidc/callback
48+
# Comma-separated allowlist. Examples:
49+
# http://127.0.0.1/callback
50+
# http://localhost:5174/auth/tokendance/callback
51+
# https://<agenthub-web-origin>/auth/tokendance/callback
52+
AGENTHUB_TOKENDANCE_ID_ALLOWED_REDIRECT_URIS=http://127.0.0.1/callback,http://localhost:5174/auth/tokendance/callback
53+
3954
# ── Pprof 管理端 (Basic Auth) ───────────────
4055
# AGENTHUB_PPROF_USER=admin
4156
# AGENTHUB_PPROF_PASS=
@@ -45,17 +60,29 @@ AGENTHUB_UPLOAD_MAX_SIZE=10485760
4560
# ─────────────────────────────────────────────
4661

4762
# ── Edge Server ─────────────────────────────
63+
# Listen address (default: 127.0.0.1:3210)
64+
# AGENTHUB_ADDR=127.0.0.1:3210
65+
66+
# Default agent name registered on this edge
67+
# AGENTHUB_AGENT_DEFAULT=claude
68+
69+
# Default model for agents spawned by this edge
70+
# AGENTHUB_AGENT_MODEL=claude-sonnet-4-20250514
71+
72+
# Shared secret for edge-to-hub authentication
73+
# AGENTHUB_EDGE_AUTH_TOKEN=
74+
4875
# Claude Code CLI 路径(Windows 示例)
49-
# CLAUDE_CODE_PATH=C:\Users\<user>\.local\bin\claude.exe
76+
# AGENTHUB_CLAUDE_CODE_PATH=C:\Users\<user>\.local\bin\claude.exe
5077
# macOS/Linux 示例
51-
# CLAUDE_CODE_PATH=/usr/local/bin/claude
78+
# AGENTHUB_CLAUDE_CODE_PATH=/usr/local/bin/claude
5279

5380
# OpenCode CLI 路径
54-
# OPENCODE_PATH=opencode
81+
# AGENTHUB_OPENCODE_PATH=opencode
5582

5683
# Codex CLI 路径
57-
# CODEX_PATH=codex
84+
# AGENTHUB_CODEX_PATH=codex
5885

5986
# ── Desktop ─────────────────────────────────
6087
# VITE_EDGE_URL=http://127.0.0.1:3210
61-
# VITE_HUB_URL=http://127.0.0.1:4210
88+
# VITE_HUB_URL=http://127.0.0.1:8080

.github/workflows/checks.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
env:
1010
GO_VERSION: "1.25"
11+
GOLANGCI_LINT_VERSION: "v2.12.2"
1112
NODE_VERSION: "22"
1213
PNPM_VERSION: "10"
1314

@@ -31,10 +32,11 @@ jobs:
3132
run: go build ./...
3233

3334
- name: Lint
34-
uses: golangci/golangci-lint-action@v6
35+
continue-on-error: true
36+
uses: golangci/golangci-lint-action@v9
3537
with:
3638
working-directory: edge-server
37-
version: v1.64
39+
version: ${{ env.GOLANGCI_LINT_VERSION }}
3840
args: --timeout=5m
3941

4042
- name: Test (unit only, skip integration)
@@ -43,7 +45,7 @@ jobs:
4345
- name: Coverage check (overall >= 70%)
4446
run: |
4547
COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
46-
THRESHOLD=70
48+
THRESHOLD=75
4749
echo "Overall coverage: ${COVERAGE}% (threshold: ${THRESHOLD}%)"
4850
if (( $(echo "$COVERAGE < $THRESHOLD" | bc -l) )); then
4951
echo "::error::Coverage ${COVERAGE}% below ${THRESHOLD}% threshold"
@@ -75,9 +77,8 @@ jobs:
7577
run: go test ./... -count=1 -short -race
7678

7779
- name: Security scan (gosec)
78-
run: go run github.com/securecodewarrior/gosec/v2/cmd/gosec@latest ./...
7980
continue-on-error: true
80-
81+
run: go run github.com/securego/gosec/v2/cmd/gosec@latest ./...
8182
- name: Vulnerability check (govulncheck)
8283
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
8384

@@ -123,10 +124,11 @@ jobs:
123124
run: go build ./...
124125

125126
- name: Lint
126-
uses: golangci/golangci-lint-action@v6
127+
continue-on-error: true
128+
uses: golangci/golangci-lint-action@v9
127129
with:
128130
working-directory: hub-server
129-
version: v1.64
131+
version: ${{ env.GOLANGCI_LINT_VERSION }}
130132
args: --timeout=5m
131133

132134
- name: Test (unit only, skip integration)
@@ -146,8 +148,8 @@ jobs:
146148
run: go test ./... -count=1 -short -race
147149

148150
- name: Security scan (gosec)
149-
run: go run github.com/securecodewarrior/gosec/v2/cmd/gosec@latest ./...
150151
continue-on-error: true
152+
run: go run github.com/securego/gosec/v2/cmd/gosec@latest ./...
151153

152154
- name: Vulnerability check (govulncheck)
153155
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
@@ -252,11 +254,12 @@ jobs:
252254
- name: Type check
253255
run: pnpm typecheck
254256

255-
- name: Lint
257+
- name: Lint (debt visibility)
258+
continue-on-error: true
256259
run: pnpm lint --max-warnings 10
257260

258261
- name: Test Desktop
259-
run: pnpm test:run
262+
run: pnpm test:ci
260263

261264
# ── Frontend: Web ────────────────────────────
262265
frontend-web:
@@ -275,7 +278,7 @@ jobs:
275278
with:
276279
node-version: ${{ env.NODE_VERSION }}
277280
cache: pnpm
278-
cache-dependency-path: app/web/pnpm-lock.yaml
281+
cache-dependency-path: app/pnpm-lock.yaml
279282

280283
- name: Install
281284
run: pnpm install --frozen-lockfile
@@ -311,6 +314,10 @@ jobs:
311314
bash scripts/check-secrets.sh --worktree
312315
fi
313316
317+
- name: Verify CI gate policy
318+
shell: pwsh
319+
run: ./scripts/verify-ci-gates.ps1
320+
314321
- name: Validate OpenAPI YAML
315322
run: |
316323
python -m pip install --quiet PyYAML

.gitignore

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ test-results/
1515
app/desktop/stats.html
1616
**/coverage.out
1717
**/coverage.html
18+
**/coverage
19+
**/.golangci.bck.yml
1820
edge-server/cov_full
1921
edge-server/$covPath
2022
hub-server/tests/uploads/
@@ -76,12 +78,15 @@ yarn-error.log*
7678
*.backup
7779
*.sql.gz
7880

79-
# AgentHub deployment state (hk2 production)
81+
# AgentHub deployment state (production)
8082
hub-server/deployments/.env.production
8183
hub-server/deployments/.env
8284
hub-server/deployments/backups/
8385
backups/
8486

87+
# Local temp files
88+
.tmp/
89+
8590
# Local machine and agent state
8691
.worktrees/
8792
docs/review/
@@ -98,7 +103,6 @@ docs/review/
98103
.agents/skills/*
99104
!.agents/skills/dev-loop/
100105
!.agents/skills/dev-loop/**
101-
<<<<<<< HEAD
102106
!.agents/skills/test-coverage/
103107
!.agents/skills/test-coverage/**
104108
!.agents/skills/pre-push/
@@ -135,17 +139,14 @@ docs/inbox/*
135139
docs/review/*
136140
!docs/review/README.md
137141

138-
=======
139-
.cursor/
140-
.continue/
141-
142-
>>>>>>> origin/dev/trump
143142
# Cloned reference repos (at repo root only)
144143
/reference/*
145144
!/reference/INDEX.md
146145
/chat-verify/
147146
test_store.json
148-
<<<<<<< HEAD
149-
=======
150-
app/desktop/stats.html
151-
>>>>>>> origin/dev/trump
147+
148+
# Hub server temp
149+
hub-server/.tmp/
150+
151+
# Tauri Android generated (source tracked, builds ignored by inner .gitignore)
152+
# app/desktop/src-tauri/gen/android/ is committed

0 commit comments

Comments
 (0)