add-coder 0.3.25-0 → 0.3.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.en.md +10 -10
  2. package/README.md +20 -46
  3. package/dist/index.js +6 -69
  4. package/package.json +1 -1
  5. package/templates/.add-coder-src-hash.json +24 -28
  6. package/templates/adapters/claude/hooks/doc-format-guard.sh +2 -2
  7. package/templates/adapters/codex/hooks/doc-format-guard.sh +2 -2
  8. package/templates/adapters/qoder/hooks/doc-format-guard.sh +2 -2
  9. package/templates/adapters/trae/hooks/doc-format-guard.sh +2 -2
  10. package/templates/adapters/vscode/hooks/doc-format-guard.sh +2 -2
  11. package/templates/core/hooks/doc-format-guard.sh +2 -2
  12. package/templates/core/scripts/db-ensure.sh +0 -8
  13. package/templates/core/scripts/mcp-server/shared/db-types.ts +208 -0
  14. package/templates/core/scripts/mcp-server/shared/response.ts +2 -3
  15. package/templates/core/scripts/mcp-server/tools/audit.ts +10 -7
  16. package/templates/core/scripts/mcp-server/tools/context.ts +19 -0
  17. package/templates/core/scripts/mcp-server/tools/contract.ts +6 -4
  18. package/templates/core/scripts/mcp-server/tools/gateway/check_rahs.ts +2 -69
  19. package/templates/core/scripts/mcp-server/tools/gateway/check_spec_sync.ts +1 -1
  20. package/templates/core/scripts/mcp-server/tools/hitl.ts +116 -34
  21. package/templates/core/scripts/mcp-server/tools/index.ts +1 -66
  22. package/templates/core/scripts/mcp-server/tools/plan.ts +33 -16
  23. package/templates/core/scripts/mcp-server/tools/review.ts +12 -9
  24. package/templates/core/scripts/mcp-server.ts +1 -2
  25. package/templates/core/templates/simple-plan-template.md +13 -0
  26. package/templates/core/templates/simple-plan-template.schema.json +10 -0
  27. package/templates/core/templates/standard-plan-template.md +13 -0
  28. package/templates/core/templates/standard-plan-template.schema.json +10 -0
  29. package/templates/adapters/codex/config.toml.example +0 -20
  30. package/templates/core/plans/2026-07/08/add-coder-npm-package-add-route-v1.md +0 -331
  31. package/templates/core/plans/2026-07/08/add-coder-npm-package-handoff-v1.md +0 -686
  32. package/templates/core/plans/2026-07/08/add-coder-npm-package-plan-v1.md +0 -895
  33. package/templates/core/scripts/mcp-server/shared/redact.ts +0 -28
@@ -1,28 +0,0 @@
1
- /*
2
- * @Author : xiaomingming wujixmm@gmail.com
3
- * @Date : 2026-08-10 18:41:34
4
- * @LastEditors : xiaomingming wujixmm@gmail.com
5
- * @LastEditTime : 2026-08-10 18:41:35
6
- * @FilePath : /farm-agent/home/xmm/ai/add-coder/templates/core/scripts/mcp-server/shared/redact.ts
7
- * @Description :
8
- */
9
- // 敏感信息脱敏(进程层并发契约 v2:日志/错误不泄露 DATABASE_URL/密码)
10
- // 统一入口:response.ts 的 textResponse/errorResponse 内部调用,一处封装全覆盖所有工具
11
-
12
- const CONNECTION_URL_RE =
13
- /(postgres(?:ql)?|mysql|redis|mongodb(?:\+srv)?):\/\/[^\s"'`]+/gi
14
-
15
- export function redactUrl(url: string): string {
16
- // postgres://user:pass@host:port/db → postgres://user:****@host:port/db
17
- return url.replace(/(:\/\/[^:/\s]+:)([^@/\s]+)(@)/, "$1****$3")
18
- }
19
-
20
- export function redact(text: string): string {
21
- return text.replace(CONNECTION_URL_RE, (m) => {
22
- try {
23
- return redactUrl(m)
24
- } catch {
25
- return m
26
- }
27
- })
28
- }