gsd-pi 2.80.0-dev.3065f7bfa → 2.80.0-dev.488219eb6
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.
- package/dist/claude-cli-check.d.ts +30 -0
- package/dist/claude-cli-check.js +18 -7
- package/dist/cli.js +0 -19
- package/dist/headless-query.d.ts +10 -0
- package/dist/headless-query.js +6 -4
- package/dist/loader-entrypoint.d.ts +8 -0
- package/dist/loader-entrypoint.js +27 -0
- package/dist/loader.js +2 -11
- package/dist/mcp-server.d.ts +1 -0
- package/dist/mcp-server.js +6 -3
- package/dist/resources/.managed-resources-content-hash +1 -1
- package/dist/resources/extensions/claude-code-cli/readiness.js +18 -7
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +29 -0
- package/dist/resources/extensions/github-sync/sync.js +4 -1
- package/dist/resources/extensions/gsd/auto/loop.js +71 -8
- package/dist/resources/extensions/gsd/auto/phases.js +32 -8
- package/dist/resources/extensions/gsd/auto/resolve.js +12 -0
- package/dist/resources/extensions/gsd/auto/run-unit.js +3 -1
- package/dist/resources/extensions/gsd/auto/workflow-dispatch-claim.js +33 -1
- package/dist/resources/extensions/gsd/auto/workflow-worker-heartbeat.js +9 -1
- package/dist/resources/extensions/gsd/auto-post-unit.js +81 -76
- package/dist/resources/extensions/gsd/auto-start.js +41 -6
- package/dist/resources/extensions/gsd/auto-worktree.js +98 -80
- package/dist/resources/extensions/gsd/auto.js +84 -29
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +62 -13
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +20 -26
- package/dist/resources/extensions/gsd/bootstrap/dynamic-tools.js +29 -12
- package/dist/resources/extensions/gsd/bootstrap/exec-tools.js +6 -9
- package/dist/resources/extensions/gsd/bootstrap/journal-tools.js +4 -7
- package/dist/resources/extensions/gsd/bootstrap/memory-tools.js +6 -10
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +5 -9
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +1 -1
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +60 -26
- package/dist/resources/extensions/gsd/bootstrap/sanitize-complete-milestone.js +4 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +2 -2
- package/dist/resources/extensions/gsd/commands-config.js +1 -1
- package/dist/resources/extensions/gsd/commands-eval-review.js +2 -2
- package/dist/resources/extensions/gsd/dashboard-overlay.js +1 -1
- package/dist/resources/extensions/gsd/db/unit-dispatches.js +53 -0
- package/dist/resources/extensions/gsd/git-service.js +37 -1
- package/dist/resources/extensions/gsd/guided-flow.js +14 -4
- package/dist/resources/extensions/gsd/init-wizard.js +4 -1
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +6 -4
- package/dist/resources/extensions/gsd/slice-cadence.js +45 -2
- package/dist/resources/extensions/gsd/slice-parallel-orchestrator.js +15 -9
- package/dist/resources/extensions/gsd/tools/complete-milestone.js +6 -7
- package/dist/resources/extensions/gsd/tools/complete-task.js +1 -1
- package/dist/resources/extensions/gsd/worktree-resolver.js +22 -1
- package/dist/resources/skills/web-quality-audit/scripts/analyze.sh +0 -0
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +17 -17
- package/dist/web/standalone/.next/build-manifest.json +3 -3
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/react-loadable-manifest.json +2 -2
- package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +17 -17
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware.js +3 -3
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/chunks/8359.e059d86b255fce1c.js +10 -0
- package/dist/web/standalone/.next/static/chunks/app/{page-fab3ebb85b006001.js → page-752f1e2ebdaa3e45.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/{webpack-0481f1221120a7c6.js → webpack-de742b64187e13fe.js} +1 -1
- package/dist/welcome-screen.d.ts +2 -0
- package/dist/welcome-screen.js +9 -7
- package/package.json +1 -1
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js +35 -13
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.js +21 -11
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts +7 -0
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +9 -7
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/minimax-tool-name.test.js +23 -14
- package/packages/pi-ai/dist/providers/minimax-tool-name.test.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js +48 -21
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.js +22 -21
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.js +22 -21
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.js.map +1 -1
- package/packages/pi-ai/src/providers/anthropic-auth.test.ts +39 -25
- package/packages/pi-ai/src/providers/anthropic-bearer-auth.test.ts +26 -22
- package/packages/pi-ai/src/providers/anthropic.ts +22 -9
- package/packages/pi-ai/src/providers/minimax-tool-name.test.ts +34 -21
- package/packages/pi-ai/src/utils/oauth/github-copilot.test.ts +56 -22
- package/packages/pi-ai/src/utils/oauth/google-antigravity.test.ts +24 -28
- package/packages/pi-ai/src/utils/oauth/google-gemini-cli.test.ts +24 -28
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +3 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +2 -2
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/bash-spawn-windows.test.js +22 -56
- package/packages/pi-coding-agent/dist/core/tools/bash-spawn-windows.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/bash.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/bash.js +3 -1
- package/packages/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit.js +12 -1
- package/packages/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/find.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/find.js +14 -6
- package/packages/pi-coding-agent/dist/core/tools/find.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/grep.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/grep.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/grep.js +12 -3
- package/packages/pi-coding-agent/dist/core/tools/grep.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.js +3 -1
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/index.d.ts +2 -1
- package/packages/pi-coding-agent/dist/core/tools/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/index.js +1 -0
- package/packages/pi-coding-agent/dist/core/tools/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/ls.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/ls.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/ls.js +10 -3
- package/packages/pi-coding-agent/dist/core/tools/ls.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/read.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/read.js +3 -1
- package/packages/pi-coding-agent/dist/core/tools/read.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.js +7 -62
- package/packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/tool-target-metadata.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/tool-target-metadata.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/tool-target-metadata.test.js +115 -0
- package/packages/pi-coding-agent/dist/core/tools/tool-target-metadata.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/tool-target.d.ts +19 -0
- package/packages/pi-coding-agent/dist/core/tools/tool-target.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/tool-target.js +20 -0
- package/packages/pi-coding-agent/dist/core/tools/tool-target.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/write.d.ts +4 -0
- package/packages/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/write.js +9 -1
- package/packages/pi-coding-agent/dist/core/tools/write.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js +89 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.js +25 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +5 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +153 -8
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +18 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.test.js +23 -5
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +19 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage-safety-guard.test.js +23 -5
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage-safety-guard.test.js.map +1 -1
- package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +3 -1
- package/packages/pi-coding-agent/src/core/extensions/types.ts +2 -1
- package/packages/pi-coding-agent/src/core/tools/bash-spawn-windows.test.ts +22 -66
- package/packages/pi-coding-agent/src/core/tools/bash.ts +4 -1
- package/packages/pi-coding-agent/src/core/tools/edit.ts +13 -1
- package/packages/pi-coding-agent/src/core/tools/find.ts +15 -6
- package/packages/pi-coding-agent/src/core/tools/grep.ts +13 -3
- package/packages/pi-coding-agent/src/core/tools/hashline-read.ts +4 -1
- package/packages/pi-coding-agent/src/core/tools/index.ts +8 -0
- package/packages/pi-coding-agent/src/core/tools/ls.ts +11 -3
- package/packages/pi-coding-agent/src/core/tools/read.ts +4 -1
- package/packages/pi-coding-agent/src/core/tools/spawn-shell-windows.test.ts +11 -72
- package/packages/pi-coding-agent/src/core/tools/tool-target-metadata.test.ts +127 -0
- package/packages/pi-coding-agent/src/core/tools/tool-target.ts +48 -0
- package/packages/pi-coding-agent/src/core/tools/write.ts +14 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/tool-execution.test.ts +119 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.ts +31 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +177 -8
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.test.ts +24 -5
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +17 -1
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +21 -0
- package/packages/pi-coding-agent/src/resources/extensions/memory/storage-safety-guard.test.ts +25 -8
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/src/resources/extensions/claude-code-cli/readiness.ts +25 -7
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +30 -0
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +26 -0
- package/src/resources/extensions/github-sync/sync.ts +8 -1
- package/src/resources/extensions/github-sync/tests/sync-source.test.ts +6 -18
- package/src/resources/extensions/gsd/auto/loop.ts +84 -8
- package/src/resources/extensions/gsd/auto/phases.ts +43 -8
- package/src/resources/extensions/gsd/auto/resolve.ts +19 -0
- package/src/resources/extensions/gsd/auto/run-unit.ts +3 -0
- package/src/resources/extensions/gsd/auto/workflow-dispatch-claim.ts +63 -1
- package/src/resources/extensions/gsd/auto/workflow-worker-heartbeat.ts +14 -1
- package/src/resources/extensions/gsd/auto-post-unit.ts +93 -78
- package/src/resources/extensions/gsd/auto-start.ts +56 -6
- package/src/resources/extensions/gsd/auto-worktree.ts +118 -72
- package/src/resources/extensions/gsd/auto.ts +121 -29
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +76 -12
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +20 -26
- package/src/resources/extensions/gsd/bootstrap/dynamic-tools.ts +27 -12
- package/src/resources/extensions/gsd/bootstrap/exec-tools.ts +7 -9
- package/src/resources/extensions/gsd/bootstrap/journal-tools.ts +4 -7
- package/src/resources/extensions/gsd/bootstrap/memory-tools.ts +6 -10
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +5 -9
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +1 -1
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +64 -26
- package/src/resources/extensions/gsd/bootstrap/sanitize-complete-milestone.ts +4 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +4 -2
- package/src/resources/extensions/gsd/commands-config.ts +1 -1
- package/src/resources/extensions/gsd/commands-eval-review.ts +2 -2
- package/src/resources/extensions/gsd/dashboard-overlay.ts +1 -1
- package/src/resources/extensions/gsd/db/unit-dispatches.ts +66 -0
- package/src/resources/extensions/gsd/git-service.ts +41 -2
- package/src/resources/extensions/gsd/guided-flow.ts +19 -4
- package/src/resources/extensions/gsd/init-wizard.ts +5 -1
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +6 -4
- package/src/resources/extensions/gsd/slice-cadence.ts +49 -2
- package/src/resources/extensions/gsd/slice-parallel-orchestrator.ts +23 -9
- package/src/resources/extensions/gsd/tests/agent-end-retry.test.ts +59 -89
- package/src/resources/extensions/gsd/tests/artifact-retry-cap.test.ts +47 -172
- package/src/resources/extensions/gsd/tests/artifacts-table-preserved-on-cache-invalidate.test.ts +0 -35
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +35 -9
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +15 -0
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +80 -59
- package/src/resources/extensions/gsd/tests/auto-paused-session-validation.test.ts +3 -47
- package/src/resources/extensions/gsd/tests/auto-paused-ui-cleanup.test.ts +76 -18
- package/src/resources/extensions/gsd/tests/auto-phases-lifecycle.test.ts +106 -0
- package/src/resources/extensions/gsd/tests/auto-pr-bugs.test.ts +54 -95
- package/src/resources/extensions/gsd/tests/auto-project-root-env.test.ts +67 -26
- package/src/resources/extensions/gsd/tests/auto-remediate-slice-status.test.ts +32 -30
- package/src/resources/extensions/gsd/tests/auto-start-bootstrap-await-3420.test.ts +32 -128
- package/src/resources/extensions/gsd/tests/auto-start-clean-runtime-db-gated.test.ts +20 -54
- package/src/resources/extensions/gsd/tests/auto-start-cold-db-bootstrap.test.ts +20 -30
- package/src/resources/extensions/gsd/tests/auto-start-index-lock.test.ts +17 -29
- package/src/resources/extensions/gsd/tests/auto-start-orphan-bootstrap.test.ts +138 -0
- package/src/resources/extensions/gsd/tests/auto-start-time-persistence.test.ts +21 -39
- package/src/resources/extensions/gsd/tests/auto-start-worktree-db-path.test.ts +15 -24
- package/src/resources/extensions/gsd/tests/auto-thinking-restore.test.ts +44 -29
- package/src/resources/extensions/gsd/tests/auto-warning-noise-regression.test.ts +39 -51
- package/src/resources/extensions/gsd/tests/auto-wrapup-inflight-guard.test.ts +1 -217
- package/src/resources/extensions/gsd/tests/bootstrap-derive-state-db-open.test.ts +15 -32
- package/src/resources/extensions/gsd/tests/browser-teardown.test.ts +0 -41
- package/src/resources/extensions/gsd/tests/clear-stale-autostart.test.ts +34 -27
- package/src/resources/extensions/gsd/tests/cmux.test.ts +51 -53
- package/src/resources/extensions/gsd/tests/cold-resume-db-reopen.test.ts +39 -61
- package/src/resources/extensions/gsd/tests/commands-config.test.ts +26 -19
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +140 -0
- package/src/resources/extensions/gsd/tests/complete-task-normalize-lists.test.ts +29 -33
- package/src/resources/extensions/gsd/tests/completed-units-metrics-sync.test.ts +45 -108
- package/src/resources/extensions/gsd/tests/crash-handler-secondary.test.ts +35 -31
- package/src/resources/extensions/gsd/tests/cwd-fallback-hardening.test.ts +138 -0
- package/src/resources/extensions/gsd/tests/dashboard-custom-engine.test.ts +4 -68
- package/src/resources/extensions/gsd/tests/deep-project-auto-loop.test.ts +4 -9
- package/src/resources/extensions/gsd/tests/deferred-milestone-dir-4996.test.ts +14 -65
- package/src/resources/extensions/gsd/tests/discuss-tool-scoping.test.ts +44 -37
- package/src/resources/extensions/gsd/tests/dispatch-complete-milestone-guard.test.ts +58 -40
- package/src/resources/extensions/gsd/tests/dispatch-guard-closed-status.test.ts +25 -15
- package/src/resources/extensions/gsd/tests/dispatcher-stuck-planning.test.ts +35 -17
- package/src/resources/extensions/gsd/tests/error-success-mask.test.ts +16 -21
- package/src/resources/extensions/gsd/tests/est-annotation-timeout.test.ts +15 -82
- package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +2 -20
- package/src/resources/extensions/gsd/tests/frontmatter-parse-noise.test.ts +18 -26
- package/src/resources/extensions/gsd/tests/init-skip-git.test.ts +9 -12
- package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +40 -0
- package/src/resources/extensions/gsd/tests/integration/commands-eval-review.integration.test.ts +4 -2
- package/src/resources/extensions/gsd/tests/integration/git-locale.test.ts +31 -20
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +12 -0
- package/src/resources/extensions/gsd/tests/integration/milestone-transition-worktree.test.ts +0 -47
- package/src/resources/extensions/gsd/tests/interactive-routing-bypass.test.ts +60 -202
- package/src/resources/extensions/gsd/tests/isolation-none-branch-guard.test.ts +13 -59
- package/src/resources/extensions/gsd/tests/lazy-pi-tui-import.test.ts +44 -6
- package/src/resources/extensions/gsd/tests/memory-pressure-stuck-state.test.ts +21 -35
- package/src/resources/extensions/gsd/tests/milestone-transition-state-rebuild.test.ts +79 -98
- package/src/resources/extensions/gsd/tests/model-unittype-mapping.test.ts +70 -278
- package/src/resources/extensions/gsd/tests/needs-remediation-revalidation.test.ts +37 -30
- package/src/resources/extensions/gsd/tests/note-captures-executed.test.ts +32 -28
- package/src/resources/extensions/gsd/tests/phantom-ghost-detection.test.ts +24 -37
- package/src/resources/extensions/gsd/tests/phantom-milestone-default-queued.test.ts +9 -24
- package/src/resources/extensions/gsd/tests/phases-merge-error-stops-auto.test.ts +113 -0
- package/src/resources/extensions/gsd/tests/post-unit-state-rebuild.test.ts +36 -22
- package/src/resources/extensions/gsd/tests/pre-exec-backtick-strip.test.ts +36 -30
- package/src/resources/extensions/gsd/tests/pre-execution-pause-wiring.test.ts +74 -4
- package/src/resources/extensions/gsd/tests/preferences-worktree-sync.test.ts +20 -22
- package/src/resources/extensions/gsd/tests/prefs-wizard-coverage.test.ts +130 -32
- package/src/resources/extensions/gsd/tests/project-root-cwd-crash.test.ts +18 -36
- package/src/resources/extensions/gsd/tests/projection-no-plan-overwrite.test.ts +35 -73
- package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +76 -138
- package/src/resources/extensions/gsd/tests/prompt-step-ordering.test.ts +70 -125
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +59 -161
- package/src/resources/extensions/gsd/tests/query-tools-db-open.test.ts +33 -29
- package/src/resources/extensions/gsd/tests/queue-auto-guard.test.ts +22 -196
- package/src/resources/extensions/gsd/tests/quick-auto-guard.test.ts +23 -93
- package/src/resources/extensions/gsd/tests/quick-turn-end-cleanup.test.ts +50 -79
- package/src/resources/extensions/gsd/tests/reassess-default-optin.test.ts +27 -13
- package/src/resources/extensions/gsd/tests/remote-questions.test.ts +151 -251
- package/src/resources/extensions/gsd/tests/resource-loader-import-path.test.ts +41 -29
- package/src/resources/extensions/gsd/tests/restore-tools-after-discuss.test.ts +58 -90
- package/src/resources/extensions/gsd/tests/resume-dispatch-worktree.test.ts +32 -164
- package/src/resources/extensions/gsd/tests/run-uat-replay-cap.test.ts +57 -41
- package/src/resources/extensions/gsd/tests/session-model-override.test.ts +14 -9
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +77 -0
- package/src/resources/extensions/gsd/tests/session-switch-abort-misclassification.test.ts +61 -1
- package/src/resources/extensions/gsd/tests/show-config-command.test.ts +44 -42
- package/src/resources/extensions/gsd/tests/skip-slice-state-rebuild.test.ts +56 -24
- package/src/resources/extensions/gsd/tests/skipped-validation-db-atomicity.test.ts +51 -11
- package/src/resources/extensions/gsd/tests/slice-cadence.test.ts +23 -0
- package/src/resources/extensions/gsd/tests/slice-context-injection.test.ts +66 -50
- package/src/resources/extensions/gsd/tests/slice-parallel-orchestrator.test.ts +68 -107
- package/src/resources/extensions/gsd/tests/slice-sequence-insert.test.ts +115 -42
- package/src/resources/extensions/gsd/tests/smart-entry-complete.test.ts +21 -97
- package/src/resources/extensions/gsd/tests/smart-entry-draft.test.ts +25 -116
- package/src/resources/extensions/gsd/tests/sqlite-unavailable-gate.test.ts +21 -57
- package/src/resources/extensions/gsd/tests/stale-dirlistcache-4648.test.ts +29 -76
- package/src/resources/extensions/gsd/tests/stale-lockfile-recovery.test.ts +33 -24
- package/src/resources/extensions/gsd/tests/stale-slice-rows.test.ts +39 -30
- package/src/resources/extensions/gsd/tests/status-db-open.test.ts +33 -47
- package/src/resources/extensions/gsd/tests/stop-auto-merge-back.test.ts +48 -46
- package/src/resources/extensions/gsd/tests/stop-auto-race-null-unit.test.ts +14 -102
- package/src/resources/extensions/gsd/tests/subagent-model-dispatch.test.ts +78 -232
- package/src/resources/extensions/gsd/tests/sync-worktree-skip-current.test.ts +32 -35
- package/src/resources/extensions/gsd/tests/token-profile.test.ts +84 -309
- package/src/resources/extensions/gsd/tests/triage-dispatch.test.ts +134 -341
- package/src/resources/extensions/gsd/tests/unit-context-manifest.test.ts +8 -25
- package/src/resources/extensions/gsd/tests/unit-dispatches.test.ts +50 -1
- package/src/resources/extensions/gsd/tests/unstructured-continue-context-injection.test.ts +6 -101
- package/src/resources/extensions/gsd/tests/uok-plan-v2-wiring.test.ts +43 -36
- package/src/resources/extensions/gsd/tests/visualizer-data.test.ts +84 -444
- package/src/resources/extensions/gsd/tests/workflow-dispatch-claim.test.ts +142 -0
- package/src/resources/extensions/gsd/tests/workflow-logger-wiring.test.ts +44 -189
- package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +2 -57
- package/src/resources/extensions/gsd/tests/workflow-worker-heartbeat.test.ts +32 -1
- package/src/resources/extensions/gsd/tests/worktree-db-same-file.test.ts +21 -44
- package/src/resources/extensions/gsd/tests/worktree-expected-warnings.test.ts +27 -26
- package/src/resources/extensions/gsd/tests/worktree-health-dispatch.test.ts +14 -13
- package/src/resources/extensions/gsd/tests/worktree-main-branch.test.ts +20 -18
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/zero-slice-roadmap-guided.test.ts +19 -13
- package/src/resources/extensions/gsd/tools/complete-milestone.ts +14 -15
- package/src/resources/extensions/gsd/tools/complete-task.ts +1 -1
- package/src/resources/extensions/gsd/worktree-resolver.ts +34 -1
- package/src/resources/skills/create-gsd-extension/templates/templates.test.ts +86 -40
- package/src/resources/skills/web-quality-audit/scripts/analyze.sh +0 -0
- package/dist/web/standalone/.next/static/chunks/8336.631939fb583761fa.js +0 -10
- /package/dist/web/standalone/.next/static/{O2WvnXROue6l7nAp_4dhC → G68KoLv5claox_Dyd4pZn}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{O2WvnXROue6l7nAp_4dhC → G68KoLv5claox_Dyd4pZn}/_ssgManifest.js +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { Type } from "@sinclair/typebox";
|
|
4
4
|
import { Text } from "@gsd/pi-tui";
|
|
5
5
|
import { loadEffectiveGSDPreferences } from "../preferences.js";
|
|
6
|
-
import { ensureDbOpen } from "./dynamic-tools.js";
|
|
6
|
+
import { ensureDbOpen, resolveCtxCwd } from "./dynamic-tools.js";
|
|
7
7
|
import { loadWriteGateSnapshot, shouldBlockRootArtifactSaveInSnapshot } from "./write-gate.js";
|
|
8
8
|
import { StringEnum } from "@gsd/pi-ai";
|
|
9
9
|
import { logError } from "../workflow-logger.js";
|
|
@@ -11,12 +11,6 @@ import { incrementLegacyTelemetry } from "../legacy-telemetry.js";
|
|
|
11
11
|
async function loadWorkflowExecutors() {
|
|
12
12
|
return import("../tools/workflow-tool-executors.js");
|
|
13
13
|
}
|
|
14
|
-
function toolWorkspaceRoot(ctx) {
|
|
15
|
-
if (ctx && typeof ctx === "object" && typeof ctx.cwd === "string") {
|
|
16
|
-
return ctx.cwd;
|
|
17
|
-
}
|
|
18
|
-
return process.cwd();
|
|
19
|
-
}
|
|
20
14
|
/**
|
|
21
15
|
* Register an alias tool that shares the same execute function as its canonical counterpart.
|
|
22
16
|
* The alias description and promptGuidelines direct the LLM to prefer the canonical name.
|
|
@@ -62,7 +56,7 @@ function readDetails(result) {
|
|
|
62
56
|
export function registerDbTools(pi) {
|
|
63
57
|
// ─── gsd_decision_save (formerly gsd_save_decision) ─────────────────────
|
|
64
58
|
const decisionSaveExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
65
|
-
const basePath =
|
|
59
|
+
const basePath = resolveCtxCwd(_ctx);
|
|
66
60
|
const dbAvailable = await ensureDbOpen(basePath);
|
|
67
61
|
if (!dbAvailable) {
|
|
68
62
|
return {
|
|
@@ -147,7 +141,7 @@ export function registerDbTools(pi) {
|
|
|
147
141
|
registerAlias(pi, decisionSaveTool, "gsd_save_decision", "gsd_decision_save");
|
|
148
142
|
// ─── gsd_requirement_update (formerly gsd_update_requirement) ───────────
|
|
149
143
|
const requirementUpdateExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
150
|
-
const basePath =
|
|
144
|
+
const basePath = resolveCtxCwd(_ctx);
|
|
151
145
|
const gateBlock = requirementRootWriteGuard("update_requirement", basePath);
|
|
152
146
|
if (gateBlock)
|
|
153
147
|
return gateBlock;
|
|
@@ -233,7 +227,7 @@ export function registerDbTools(pi) {
|
|
|
233
227
|
registerAlias(pi, requirementUpdateTool, "gsd_update_requirement", "gsd_requirement_update");
|
|
234
228
|
// ─── gsd_requirement_save ─────────────────────────────────────────────
|
|
235
229
|
const requirementSaveExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
236
|
-
const basePath =
|
|
230
|
+
const basePath = resolveCtxCwd(_ctx);
|
|
237
231
|
const gateBlock = requirementRootWriteGuard("save_requirement", basePath);
|
|
238
232
|
if (gateBlock)
|
|
239
233
|
return gateBlock;
|
|
@@ -333,7 +327,7 @@ export function registerDbTools(pi) {
|
|
|
333
327
|
// ─── gsd_summary_save (formerly gsd_save_summary) ──────────────────────
|
|
334
328
|
const summarySaveExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
335
329
|
const { executeSummarySave } = await loadWorkflowExecutors();
|
|
336
|
-
return executeSummarySave(params,
|
|
330
|
+
return executeSummarySave(params, resolveCtxCwd(_ctx));
|
|
337
331
|
};
|
|
338
332
|
const summarySaveTool = {
|
|
339
333
|
name: "gsd_summary_save",
|
|
@@ -382,7 +376,7 @@ export function registerDbTools(pi) {
|
|
|
382
376
|
// ─── gsd_milestone_generate_id (formerly gsd_generate_milestone_id) ────
|
|
383
377
|
const milestoneGenerateIdExecute = async (_toolCallId, _params, _signal, _onUpdate, _ctx) => {
|
|
384
378
|
try {
|
|
385
|
-
const basePath =
|
|
379
|
+
const basePath = resolveCtxCwd(_ctx);
|
|
386
380
|
// Claim a reserved ID if the guided-flow already previewed one to the user.
|
|
387
381
|
// This guarantees the ID shown in the UI matches the one materialised on disk.
|
|
388
382
|
const { claimReservedId, findMilestoneIds, getReservedMilestoneIds, nextMilestoneId } = await import("../guided-flow.js");
|
|
@@ -464,7 +458,7 @@ export function registerDbTools(pi) {
|
|
|
464
458
|
// ─── gsd_plan_milestone (gsd_milestone_plan alias) ─────────────────────
|
|
465
459
|
const planMilestoneExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
466
460
|
const { executePlanMilestone } = await loadWorkflowExecutors();
|
|
467
|
-
return executePlanMilestone(params,
|
|
461
|
+
return executePlanMilestone(params, resolveCtxCwd(_ctx));
|
|
468
462
|
};
|
|
469
463
|
const planMilestoneTool = {
|
|
470
464
|
name: "gsd_plan_milestone",
|
|
@@ -529,7 +523,7 @@ export function registerDbTools(pi) {
|
|
|
529
523
|
// ─── gsd_plan_slice (gsd_slice_plan alias) ─────────────────────────────
|
|
530
524
|
const planSliceExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
531
525
|
const { executePlanSlice } = await loadWorkflowExecutors();
|
|
532
|
-
return executePlanSlice(params,
|
|
526
|
+
return executePlanSlice(params, resolveCtxCwd(_ctx));
|
|
533
527
|
};
|
|
534
528
|
const planSliceTool = {
|
|
535
529
|
name: "gsd_plan_slice",
|
|
@@ -573,7 +567,7 @@ export function registerDbTools(pi) {
|
|
|
573
567
|
registerAlias(pi, planSliceTool, "gsd_slice_plan", "gsd_plan_slice");
|
|
574
568
|
// ─── gsd_plan_task (gsd_task_plan alias) ───────────────────────────────
|
|
575
569
|
const planTaskExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
576
|
-
const basePath =
|
|
570
|
+
const basePath = resolveCtxCwd(_ctx);
|
|
577
571
|
const dbAvailable = await ensureDbOpen(basePath);
|
|
578
572
|
if (!dbAvailable) {
|
|
579
573
|
return {
|
|
@@ -644,7 +638,7 @@ export function registerDbTools(pi) {
|
|
|
644
638
|
// ─── gsd_task_complete (gsd_complete_task alias) ────────────────────────
|
|
645
639
|
const taskCompleteExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
646
640
|
const { executeTaskComplete } = await loadWorkflowExecutors();
|
|
647
|
-
return executeTaskComplete(params,
|
|
641
|
+
return executeTaskComplete(params, resolveCtxCwd(_ctx));
|
|
648
642
|
};
|
|
649
643
|
const taskCompleteTool = {
|
|
650
644
|
name: "gsd_task_complete",
|
|
@@ -707,7 +701,7 @@ export function registerDbTools(pi) {
|
|
|
707
701
|
// ─── gsd_slice_complete (gsd_complete_slice alias) ─────────────────────
|
|
708
702
|
const sliceCompleteExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
709
703
|
const { executeSliceComplete } = await loadWorkflowExecutors();
|
|
710
|
-
return executeSliceComplete(params,
|
|
704
|
+
return executeSliceComplete(params, resolveCtxCwd(_ctx));
|
|
711
705
|
};
|
|
712
706
|
const sliceCompleteTool = {
|
|
713
707
|
name: "gsd_slice_complete",
|
|
@@ -787,7 +781,7 @@ export function registerDbTools(pi) {
|
|
|
787
781
|
registerAlias(pi, sliceCompleteTool, "gsd_complete_slice", "gsd_slice_complete");
|
|
788
782
|
// ─── gsd_skip_slice (#3477 / #3487) ───────────────────────────────────
|
|
789
783
|
const skipSliceExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
790
|
-
const basePath =
|
|
784
|
+
const basePath = resolveCtxCwd(_ctx);
|
|
791
785
|
const dbAvailable = await ensureDbOpen(basePath);
|
|
792
786
|
if (!dbAvailable) {
|
|
793
787
|
return {
|
|
@@ -872,7 +866,7 @@ export function registerDbTools(pi) {
|
|
|
872
866
|
// ─── gsd_complete_milestone ────────────────────────────────────────────
|
|
873
867
|
const milestoneCompleteExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
874
868
|
const { executeCompleteMilestone } = await loadWorkflowExecutors();
|
|
875
|
-
return executeCompleteMilestone(params,
|
|
869
|
+
return executeCompleteMilestone(params, resolveCtxCwd(_ctx));
|
|
876
870
|
};
|
|
877
871
|
const milestoneCompleteTool = {
|
|
878
872
|
name: "gsd_complete_milestone",
|
|
@@ -913,7 +907,7 @@ export function registerDbTools(pi) {
|
|
|
913
907
|
// ─── gsd_validate_milestone (gsd_milestone_validate alias) ─────────────
|
|
914
908
|
const milestoneValidateExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
915
909
|
const { executeValidateMilestone } = await loadWorkflowExecutors();
|
|
916
|
-
return executeValidateMilestone(params,
|
|
910
|
+
return executeValidateMilestone(params, resolveCtxCwd(_ctx));
|
|
917
911
|
};
|
|
918
912
|
const milestoneValidateTool = {
|
|
919
913
|
name: "gsd_validate_milestone",
|
|
@@ -946,7 +940,7 @@ export function registerDbTools(pi) {
|
|
|
946
940
|
// ─── gsd_replan_slice (gsd_slice_replan alias) ─────────────────────────
|
|
947
941
|
const replanSliceExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
948
942
|
const { executeReplanSlice } = await loadWorkflowExecutors();
|
|
949
|
-
return executeReplanSlice(params,
|
|
943
|
+
return executeReplanSlice(params, resolveCtxCwd(_ctx));
|
|
950
944
|
};
|
|
951
945
|
const replanSliceTool = {
|
|
952
946
|
name: "gsd_replan_slice",
|
|
@@ -989,7 +983,7 @@ export function registerDbTools(pi) {
|
|
|
989
983
|
// ─── gsd_reassess_roadmap (gsd_roadmap_reassess alias) ─────────────────
|
|
990
984
|
const reassessRoadmapExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
991
985
|
const { executeReassessRoadmap } = await loadWorkflowExecutors();
|
|
992
|
-
return executeReassessRoadmap(params,
|
|
986
|
+
return executeReassessRoadmap(params, resolveCtxCwd(_ctx));
|
|
993
987
|
};
|
|
994
988
|
const reassessRoadmapTool = {
|
|
995
989
|
name: "gsd_reassess_roadmap",
|
|
@@ -1037,7 +1031,7 @@ export function registerDbTools(pi) {
|
|
|
1037
1031
|
// ─── gsd_task_reopen (gsd_reopen_task alias) ───────────────────────────
|
|
1038
1032
|
// Single-writer v3, Stream 3: reversibility tools for closed units.
|
|
1039
1033
|
const reopenTaskExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
1040
|
-
const basePath =
|
|
1034
|
+
const basePath = resolveCtxCwd(_ctx);
|
|
1041
1035
|
const dbAvailable = await ensureDbOpen(basePath);
|
|
1042
1036
|
if (!dbAvailable) {
|
|
1043
1037
|
return {
|
|
@@ -1100,7 +1094,7 @@ export function registerDbTools(pi) {
|
|
|
1100
1094
|
registerAlias(pi, reopenTaskTool, "gsd_reopen_task", "gsd_task_reopen");
|
|
1101
1095
|
// ─── gsd_slice_reopen (gsd_reopen_slice alias) ─────────────────────────
|
|
1102
1096
|
const reopenSliceExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
1103
|
-
const basePath =
|
|
1097
|
+
const basePath = resolveCtxCwd(_ctx);
|
|
1104
1098
|
const dbAvailable = await ensureDbOpen(basePath);
|
|
1105
1099
|
if (!dbAvailable) {
|
|
1106
1100
|
return {
|
|
@@ -1163,7 +1157,7 @@ export function registerDbTools(pi) {
|
|
|
1163
1157
|
registerAlias(pi, reopenSliceTool, "gsd_reopen_slice", "gsd_slice_reopen");
|
|
1164
1158
|
// ─── gsd_milestone_reopen (gsd_reopen_milestone alias) ─────────────────
|
|
1165
1159
|
const reopenMilestoneExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
1166
|
-
const basePath =
|
|
1160
|
+
const basePath = resolveCtxCwd(_ctx);
|
|
1167
1161
|
const dbAvailable = await ensureDbOpen(basePath);
|
|
1168
1162
|
if (!dbAvailable) {
|
|
1169
1163
|
return {
|
|
@@ -1225,7 +1219,7 @@ export function registerDbTools(pi) {
|
|
|
1225
1219
|
// ─── gsd_save_gate_result ──────────────────────────────────────────────
|
|
1226
1220
|
const saveGateResultExecute = async (_toolCallId, params, _signal, _onUpdate, _ctx) => {
|
|
1227
1221
|
const { executeSaveGateResult } = await loadWorkflowExecutors();
|
|
1228
|
-
return executeSaveGateResult(params,
|
|
1222
|
+
return executeSaveGateResult(params, resolveCtxCwd(_ctx));
|
|
1229
1223
|
};
|
|
1230
1224
|
const saveGateResultTool = {
|
|
1231
1225
|
name: "gsd_save_gate_result",
|
|
@@ -1,14 +1,30 @@
|
|
|
1
|
+
// Project/App: GSD-2
|
|
2
|
+
// File Purpose: Registers workspace-aware dynamic filesystem and shell tools.
|
|
1
3
|
import { existsSync } from "node:fs";
|
|
4
|
+
import { homedir } from "node:os";
|
|
2
5
|
import { dirname } from "node:path";
|
|
3
6
|
import { createBashTool, createEditTool, createReadTool, createWriteTool } from "@gsd/pi-coding-agent";
|
|
4
7
|
import { DEFAULT_BASH_TIMEOUT_SECS } from "../constants.js";
|
|
5
8
|
import { setLogBasePath, logWarning } from "../workflow-logger.js";
|
|
6
9
|
import { resolveGsdPathContract } from "../paths.js";
|
|
7
|
-
function
|
|
10
|
+
export function safeWorkspaceCwd() {
|
|
11
|
+
try {
|
|
12
|
+
return process.cwd();
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
const projectRoot = process.env.GSD_PROJECT_ROOT;
|
|
16
|
+
if (projectRoot && existsSync(projectRoot))
|
|
17
|
+
return projectRoot;
|
|
18
|
+
return homedir();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export function resolveCtxCwd(ctx) {
|
|
8
22
|
if (ctx && typeof ctx === "object" && typeof ctx.cwd === "string") {
|
|
9
|
-
|
|
23
|
+
const cwd = ctx.cwd;
|
|
24
|
+
if (existsSync(cwd))
|
|
25
|
+
return cwd;
|
|
10
26
|
}
|
|
11
|
-
return
|
|
27
|
+
return safeWorkspaceCwd();
|
|
12
28
|
}
|
|
13
29
|
/**
|
|
14
30
|
* Resolve the correct DB path for the current working directory.
|
|
@@ -19,7 +35,7 @@ function resolveToolWorkspaceRoot(ctx) {
|
|
|
19
35
|
export function resolveProjectRootDbPath(basePath) {
|
|
20
36
|
return resolveGsdPathContract(basePath).projectDb;
|
|
21
37
|
}
|
|
22
|
-
export async function ensureDbOpen(basePath =
|
|
38
|
+
export async function ensureDbOpen(basePath = safeWorkspaceCwd()) {
|
|
23
39
|
try {
|
|
24
40
|
const db = await import("../gsd-db.js");
|
|
25
41
|
const contract = resolveGsdPathContract(basePath);
|
|
@@ -50,13 +66,14 @@ export async function ensureDbOpen(basePath = process.cwd()) {
|
|
|
50
66
|
}
|
|
51
67
|
}
|
|
52
68
|
export function registerDynamicTools(pi) {
|
|
53
|
-
const
|
|
69
|
+
const fallbackRoot = safeWorkspaceCwd();
|
|
70
|
+
const baseBash = createBashTool(fallbackRoot, {
|
|
54
71
|
spawnHook: (ctx) => ctx,
|
|
55
72
|
});
|
|
56
73
|
const dynamicBash = {
|
|
57
74
|
...baseBash,
|
|
58
75
|
execute: async (toolCallId, params, signal, onUpdate, ctx) => {
|
|
59
|
-
const basePath =
|
|
76
|
+
const basePath = resolveCtxCwd(ctx);
|
|
60
77
|
const fresh = createBashTool(basePath, {
|
|
61
78
|
spawnHook: (spawnCtx) => ({ ...spawnCtx, cwd: basePath }),
|
|
62
79
|
});
|
|
@@ -68,27 +85,27 @@ export function registerDynamicTools(pi) {
|
|
|
68
85
|
},
|
|
69
86
|
};
|
|
70
87
|
pi.registerTool(dynamicBash);
|
|
71
|
-
const baseWrite = createWriteTool(
|
|
88
|
+
const baseWrite = createWriteTool(fallbackRoot);
|
|
72
89
|
pi.registerTool({
|
|
73
90
|
...baseWrite,
|
|
74
91
|
execute: async (toolCallId, params, signal, onUpdate, ctx) => {
|
|
75
|
-
const fresh = createWriteTool(
|
|
92
|
+
const fresh = createWriteTool(resolveCtxCwd(ctx));
|
|
76
93
|
return fresh.execute(toolCallId, params, signal, onUpdate, ctx);
|
|
77
94
|
},
|
|
78
95
|
});
|
|
79
|
-
const baseRead = createReadTool(
|
|
96
|
+
const baseRead = createReadTool(fallbackRoot);
|
|
80
97
|
pi.registerTool({
|
|
81
98
|
...baseRead,
|
|
82
99
|
execute: async (toolCallId, params, signal, onUpdate, ctx) => {
|
|
83
|
-
const fresh = createReadTool(
|
|
100
|
+
const fresh = createReadTool(resolveCtxCwd(ctx));
|
|
84
101
|
return fresh.execute(toolCallId, params, signal, onUpdate, ctx);
|
|
85
102
|
},
|
|
86
103
|
});
|
|
87
|
-
const baseEdit = createEditTool(
|
|
104
|
+
const baseEdit = createEditTool(fallbackRoot);
|
|
88
105
|
pi.registerTool({
|
|
89
106
|
...baseEdit,
|
|
90
107
|
execute: async (toolCallId, params, signal, onUpdate, ctx) => {
|
|
91
|
-
const fresh = createEditTool(
|
|
108
|
+
const fresh = createEditTool(resolveCtxCwd(ctx));
|
|
92
109
|
return fresh.execute(toolCallId, params, signal, onUpdate, ctx);
|
|
93
110
|
},
|
|
94
111
|
});
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
+
// Project/App: GSD-2
|
|
2
|
+
// File Purpose: Registers Context Mode execution tools.
|
|
1
3
|
// GSD2 — Exec (context-mode) tool registration.
|
|
2
4
|
//
|
|
3
5
|
// Exposes the Context Mode runtime tools in-process. Default-on; opt out with
|
|
4
6
|
// `context_mode.enabled: false` in preferences.
|
|
5
7
|
import { Type } from "@sinclair/typebox";
|
|
6
|
-
|
|
7
|
-
if (ctx && typeof ctx === "object" && typeof ctx.cwd === "string") {
|
|
8
|
-
return ctx.cwd;
|
|
9
|
-
}
|
|
10
|
-
return process.cwd();
|
|
11
|
-
}
|
|
8
|
+
import { resolveCtxCwd } from "./dynamic-tools.js";
|
|
12
9
|
async function loadContextModePreferences(baseDir) {
|
|
13
10
|
const [{ loadEffectiveGSDPreferences }, { logWarning }] = await Promise.all([
|
|
14
11
|
import("../preferences.js"),
|
|
@@ -50,7 +47,7 @@ export function registerExecTools(pi) {
|
|
|
50
47
|
}),
|
|
51
48
|
async execute(_toolCallId, params, _signal, _onUpdate, _ctx) {
|
|
52
49
|
const { executeGsdExec } = await import("../tools/exec-tool.js");
|
|
53
|
-
const baseDir =
|
|
50
|
+
const baseDir = resolveCtxCwd(_ctx);
|
|
54
51
|
return executeGsdExec(params, {
|
|
55
52
|
baseDir,
|
|
56
53
|
preferences: await loadContextModePreferences(baseDir),
|
|
@@ -77,7 +74,7 @@ export function registerExecTools(pi) {
|
|
|
77
74
|
}),
|
|
78
75
|
async execute(_toolCallId, params, _signal, _onUpdate, _ctx) {
|
|
79
76
|
const { executeExecSearch } = await import("../tools/exec-search-tool.js");
|
|
80
|
-
const baseDir =
|
|
77
|
+
const baseDir = resolveCtxCwd(_ctx);
|
|
81
78
|
return executeExecSearch(params, {
|
|
82
79
|
baseDir,
|
|
83
80
|
preferences: await loadContextModePreferences(baseDir),
|
|
@@ -98,7 +95,7 @@ export function registerExecTools(pi) {
|
|
|
98
95
|
parameters: Type.Object({}),
|
|
99
96
|
async execute(_toolCallId, params, _signal, _onUpdate, _ctx) {
|
|
100
97
|
const { executeResume } = await import("../tools/resume-tool.js");
|
|
101
|
-
const baseDir =
|
|
98
|
+
const baseDir = resolveCtxCwd(_ctx);
|
|
102
99
|
return executeResume(params, {
|
|
103
100
|
baseDir,
|
|
104
101
|
preferences: await loadContextModePreferences(baseDir),
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
+
// Project/App: GSD-2
|
|
2
|
+
// File Purpose: Registers journal query tools.
|
|
1
3
|
import { Type } from "@sinclair/typebox";
|
|
2
4
|
import { queryJournal } from "../journal.js";
|
|
3
5
|
import { logWarning } from "../workflow-logger.js";
|
|
4
|
-
|
|
5
|
-
if (ctx && typeof ctx === "object" && typeof ctx.cwd === "string") {
|
|
6
|
-
return ctx.cwd;
|
|
7
|
-
}
|
|
8
|
-
return process.cwd();
|
|
9
|
-
}
|
|
6
|
+
import { resolveCtxCwd } from "./dynamic-tools.js";
|
|
10
7
|
export function registerJournalTools(pi) {
|
|
11
8
|
pi.registerTool({
|
|
12
9
|
name: "gsd_journal_query",
|
|
@@ -43,7 +40,7 @@ export function registerJournalTools(pi) {
|
|
|
43
40
|
filters.after = params.after;
|
|
44
41
|
if (params.before !== undefined)
|
|
45
42
|
filters.before = params.before;
|
|
46
|
-
const entries = queryJournal(
|
|
43
|
+
const entries = queryJournal(resolveCtxCwd(_ctx), filters);
|
|
47
44
|
const limited = entries.slice(0, params.limit ?? 100);
|
|
48
45
|
if (limited.length === 0) {
|
|
49
46
|
return {
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
+
// Project/App: GSD-2
|
|
2
|
+
// File Purpose: Registers memory-layer tools.
|
|
1
3
|
// GSD2 — Memory tool registration
|
|
2
4
|
//
|
|
3
5
|
// Exposes the memory-layer tools (capture_thought, memory_query, gsd_graph)
|
|
4
6
|
// to the LLM over MCP. All three degrade gracefully when the GSD database
|
|
5
7
|
// is unavailable.
|
|
6
8
|
import { Type } from "@sinclair/typebox";
|
|
7
|
-
import { ensureDbOpen } from "./dynamic-tools.js";
|
|
9
|
+
import { ensureDbOpen, resolveCtxCwd } from "./dynamic-tools.js";
|
|
8
10
|
import { executeGsdGraph, executeMemoryCapture, executeMemoryQuery, } from "../tools/memory-tools.js";
|
|
9
|
-
function toolWorkspaceRoot(ctx) {
|
|
10
|
-
if (ctx && typeof ctx === "object" && typeof ctx.cwd === "string") {
|
|
11
|
-
return ctx.cwd;
|
|
12
|
-
}
|
|
13
|
-
return process.cwd();
|
|
14
|
-
}
|
|
15
11
|
export function registerMemoryTools(pi) {
|
|
16
12
|
// ─── capture_thought ────────────────────────────────────────────────────
|
|
17
13
|
pi.registerTool({
|
|
@@ -45,7 +41,7 @@ export function registerMemoryTools(pi) {
|
|
|
45
41
|
})),
|
|
46
42
|
}),
|
|
47
43
|
async execute(_toolCallId, params, _signal, _onUpdate, _ctx) {
|
|
48
|
-
const ok = await ensureDbOpen(
|
|
44
|
+
const ok = await ensureDbOpen(resolveCtxCwd(_ctx));
|
|
49
45
|
if (!ok) {
|
|
50
46
|
return {
|
|
51
47
|
content: [{ type: "text", text: "Error: GSD database is not available. Cannot capture memory." }],
|
|
@@ -85,7 +81,7 @@ export function registerMemoryTools(pi) {
|
|
|
85
81
|
reinforce_hits: Type.Optional(Type.Boolean({ description: "Increment hit_count on returned memories (default false)" })),
|
|
86
82
|
}),
|
|
87
83
|
async execute(_toolCallId, params, _signal, _onUpdate, _ctx) {
|
|
88
|
-
const ok = await ensureDbOpen(
|
|
84
|
+
const ok = await ensureDbOpen(resolveCtxCwd(_ctx));
|
|
89
85
|
if (!ok) {
|
|
90
86
|
return {
|
|
91
87
|
content: [{ type: "text", text: "Error: GSD database is not available. Cannot query memory." }],
|
|
@@ -123,7 +119,7 @@ export function registerMemoryTools(pi) {
|
|
|
123
119
|
], { description: "Only include edges with this relation type" })),
|
|
124
120
|
}),
|
|
125
121
|
async execute(_toolCallId, params, _signal, _onUpdate, _ctx) {
|
|
126
|
-
const ok = await ensureDbOpen(
|
|
122
|
+
const ok = await ensureDbOpen(resolveCtxCwd(_ctx));
|
|
127
123
|
if (!ok) {
|
|
128
124
|
return {
|
|
129
125
|
content: [{ type: "text", text: "Error: GSD database is not available." }],
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
+
// Project/App: GSD-2
|
|
2
|
+
// File Purpose: Registers read-only DB query tools.
|
|
1
3
|
// GSD2 — Read-only query tools exposing DB state to the LLM via the WAL connection
|
|
2
4
|
import { Type } from "@sinclair/typebox";
|
|
3
|
-
import { ensureDbOpen } from "./dynamic-tools.js";
|
|
4
|
-
function toolWorkspaceRoot(ctx) {
|
|
5
|
-
if (ctx && typeof ctx === "object" && typeof ctx.cwd === "string") {
|
|
6
|
-
return ctx.cwd;
|
|
7
|
-
}
|
|
8
|
-
return process.cwd();
|
|
9
|
-
}
|
|
5
|
+
import { ensureDbOpen, resolveCtxCwd } from "./dynamic-tools.js";
|
|
10
6
|
export function registerQueryTools(pi) {
|
|
11
7
|
pi.registerTool({
|
|
12
8
|
name: "gsd_milestone_status",
|
|
@@ -22,7 +18,7 @@ export function registerQueryTools(pi) {
|
|
|
22
18
|
milestoneId: Type.String({ description: "Milestone ID to query (e.g. M001)" }),
|
|
23
19
|
}),
|
|
24
20
|
async execute(_toolCallId, params, _signal, _onUpdate, _ctx) {
|
|
25
|
-
const dbAvailable = await ensureDbOpen(
|
|
21
|
+
const dbAvailable = await ensureDbOpen(resolveCtxCwd(_ctx));
|
|
26
22
|
if (!dbAvailable) {
|
|
27
23
|
return {
|
|
28
24
|
content: [{ type: "text", text: "Error: GSD database is not available. Cannot read milestone status." }],
|
|
@@ -47,7 +43,7 @@ export function registerQueryTools(pi) {
|
|
|
47
43
|
],
|
|
48
44
|
parameters: Type.Object({}),
|
|
49
45
|
async execute(_toolCallId, _params, _signal, _onUpdate, _ctx) {
|
|
50
|
-
const dbAvailable = await ensureDbOpen(
|
|
46
|
+
const dbAvailable = await ensureDbOpen(resolveCtxCwd(_ctx));
|
|
51
47
|
if (!dbAvailable) {
|
|
52
48
|
return {
|
|
53
49
|
content: [{ type: "text", text: "Error: GSD database is not available. Cannot checkpoint." }],
|
|
@@ -36,7 +36,7 @@ export function handleRecoverableExtensionProcessError(err) {
|
|
|
36
36
|
}
|
|
37
37
|
return false;
|
|
38
38
|
}
|
|
39
|
-
function installEpipeGuard() {
|
|
39
|
+
export function installEpipeGuard() {
|
|
40
40
|
if (!process.listeners("uncaughtException").some((listener) => listener.name === "_gsdEpipeGuard")) {
|
|
41
41
|
const _gsdEpipeGuard = (err) => {
|
|
42
42
|
if (handleRecoverableExtensionProcessError(err))
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Project/App: GSD-2
|
|
2
2
|
// File Purpose: Registers GSD extension runtime hooks and token-saving tool policies.
|
|
3
|
-
import {
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
4
6
|
import { isToolCallEventType } from "@gsd/pi-coding-agent";
|
|
5
7
|
import { updateSnapshot } from "../ecosystem/gsd-extension-api.js";
|
|
6
8
|
import { buildMilestoneFileName, resolveMilestonePath, resolveSliceFile, resolveSlicePath } from "../paths.js";
|
|
@@ -22,10 +24,63 @@ import { resolveWorktreeProjectRoot } from "../worktree-root.js";
|
|
|
22
24
|
import { extractSubagentAgentClasses } from "./subagent-input.js";
|
|
23
25
|
import { approvalGateIdForUnit, isExplicitApprovalResponse, shouldPauseForUserApprovalQuestion } from "../user-input-boundary.js";
|
|
24
26
|
import { resolveSkillManifest } from "../skill-manifest.js";
|
|
25
|
-
// Skip the welcome screen on the very first session_start — cli.ts already
|
|
26
|
-
// printed it before the TUI launched. Only re-print on /clear (subsequent sessions).
|
|
27
|
-
let isFirstSession = true;
|
|
28
27
|
let approvalQuestionAbortInFlight = false;
|
|
28
|
+
async function loadWelcomeScreenModule() {
|
|
29
|
+
const candidates = [];
|
|
30
|
+
const gsdBinPath = process.env.GSD_BIN_PATH;
|
|
31
|
+
if (gsdBinPath) {
|
|
32
|
+
candidates.push(join(dirname(gsdBinPath), "welcome-screen.js"));
|
|
33
|
+
}
|
|
34
|
+
const packageRoot = process.env.GSD_PKG_ROOT;
|
|
35
|
+
if (packageRoot) {
|
|
36
|
+
candidates.push(join(packageRoot, "dist", "welcome-screen.js"));
|
|
37
|
+
candidates.push(join(packageRoot, "src", "welcome-screen.ts"));
|
|
38
|
+
}
|
|
39
|
+
for (const candidate of candidates) {
|
|
40
|
+
try {
|
|
41
|
+
if (!existsSync(candidate))
|
|
42
|
+
continue;
|
|
43
|
+
const mod = await import(pathToFileURL(candidate).href);
|
|
44
|
+
if (typeof mod.buildWelcomeScreenLines === "function") {
|
|
45
|
+
return mod;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// Try the next package layout.
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
async function installWelcomeHeader(ctx) {
|
|
55
|
+
if (!ctx.hasUI || typeof ctx.ui?.setHeader !== "function")
|
|
56
|
+
return;
|
|
57
|
+
try {
|
|
58
|
+
const welcome = await loadWelcomeScreenModule();
|
|
59
|
+
if (!welcome)
|
|
60
|
+
return;
|
|
61
|
+
let remoteChannel;
|
|
62
|
+
try {
|
|
63
|
+
const { resolveRemoteConfig } = await import("../../remote-questions/config.js");
|
|
64
|
+
const rc = resolveRemoteConfig();
|
|
65
|
+
if (rc)
|
|
66
|
+
remoteChannel = rc.channel;
|
|
67
|
+
}
|
|
68
|
+
catch { /* non-fatal */ }
|
|
69
|
+
ctx.ui.setHeader(() => ({
|
|
70
|
+
render(width) {
|
|
71
|
+
return welcome.buildWelcomeScreenLines({
|
|
72
|
+
version: process.env.GSD_VERSION || "0.0.0",
|
|
73
|
+
remoteChannel,
|
|
74
|
+
width,
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
invalidate() { },
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
/* non-fatal */
|
|
82
|
+
}
|
|
83
|
+
}
|
|
29
84
|
let deferredApprovalGate = null;
|
|
30
85
|
export const MINIMAL_GSD_TOOL_NAMES = [
|
|
31
86
|
"gsd_exec",
|
|
@@ -317,28 +372,7 @@ export function registerHooks(pi, ecosystemHandlers) {
|
|
|
317
372
|
process.env.GSD_SHOW_TOKEN_COST = prefs?.preferences.show_token_cost ? "1" : "";
|
|
318
373
|
}
|
|
319
374
|
catch { /* non-fatal */ }
|
|
320
|
-
|
|
321
|
-
isFirstSession = false;
|
|
322
|
-
}
|
|
323
|
-
else {
|
|
324
|
-
try {
|
|
325
|
-
const gsdBinPath = process.env.GSD_BIN_PATH;
|
|
326
|
-
if (gsdBinPath) {
|
|
327
|
-
const { dirname } = await import("node:path");
|
|
328
|
-
const { printWelcomeScreen } = await import(join(dirname(gsdBinPath), "welcome-screen.js"));
|
|
329
|
-
let remoteChannel;
|
|
330
|
-
try {
|
|
331
|
-
const { resolveRemoteConfig } = await import("../../remote-questions/config.js");
|
|
332
|
-
const rc = resolveRemoteConfig();
|
|
333
|
-
if (rc)
|
|
334
|
-
remoteChannel = rc.channel;
|
|
335
|
-
}
|
|
336
|
-
catch { /* non-fatal */ }
|
|
337
|
-
printWelcomeScreen({ version: process.env.GSD_VERSION || "0.0.0", remoteChannel });
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
catch { /* non-fatal */ }
|
|
341
|
-
}
|
|
375
|
+
await installWelcomeHeader(ctx);
|
|
342
376
|
await loadToolApiKeysForSession();
|
|
343
377
|
if (isAutoActive()) {
|
|
344
378
|
ctx.ui.setWidget("gsd-health", undefined);
|
|
@@ -36,6 +36,8 @@ function toStrArray(v) {
|
|
|
36
36
|
* CompleteMilestoneParams, tolerating type mismatches from LLM JSON quirks.
|
|
37
37
|
*/
|
|
38
38
|
export function sanitizeCompleteMilestoneParams(raw) {
|
|
39
|
+
const actorName = toStr(raw.actorName);
|
|
40
|
+
const triggerReason = toStr(raw.triggerReason);
|
|
39
41
|
return {
|
|
40
42
|
milestoneId: toStr(raw.milestoneId),
|
|
41
43
|
title: toStr(raw.title),
|
|
@@ -50,5 +52,7 @@ export function sanitizeCompleteMilestoneParams(raw) {
|
|
|
50
52
|
followUps: toStr(raw.followUps),
|
|
51
53
|
deviations: toStr(raw.deviations),
|
|
52
54
|
verificationPassed: raw.verificationPassed === true || raw.verificationPassed === "true",
|
|
55
|
+
...(actorName ? { actorName } : {}),
|
|
56
|
+
...(triggerReason ? { triggerReason } : {}),
|
|
53
57
|
};
|
|
54
58
|
}
|
|
@@ -12,7 +12,7 @@ import { handleRemote } from "../../../remote-questions/mod.js";
|
|
|
12
12
|
import { handleShip } from "../../commands-ship.js";
|
|
13
13
|
import { handleSessionReport } from "../../commands-session-report.js";
|
|
14
14
|
import { handlePrBranch } from "../../commands-pr-branch.js";
|
|
15
|
-
import { projectRoot } from "../context.js";
|
|
15
|
+
import { currentDirectoryRoot, projectRoot } from "../context.js";
|
|
16
16
|
export async function handleOpsCommand(trimmed, ctx, pi) {
|
|
17
17
|
if (trimmed === "init") {
|
|
18
18
|
const { detectProjectState } = await import("../../detection.js");
|
|
@@ -114,7 +114,7 @@ export async function handleOpsCommand(trimmed, ctx, pi) {
|
|
|
114
114
|
return true;
|
|
115
115
|
}
|
|
116
116
|
if (trimmed === "triage") {
|
|
117
|
-
await handleTriage(ctx, pi,
|
|
117
|
+
await handleTriage(ctx, pi, currentDirectoryRoot());
|
|
118
118
|
return true;
|
|
119
119
|
}
|
|
120
120
|
if (trimmed === "config") {
|
|
@@ -19,7 +19,7 @@ export const TOOL_KEYS = [
|
|
|
19
19
|
{ id: "jina", env: "JINA_API_KEY", label: "Jina Page Extract", hint: "jina.ai/api" },
|
|
20
20
|
{ id: "groq", env: "GROQ_API_KEY", label: "Groq Voice", hint: "console.groq.com" },
|
|
21
21
|
];
|
|
22
|
-
function getStoredToolKey(auth, providerId) {
|
|
22
|
+
export function getStoredToolKey(auth, providerId) {
|
|
23
23
|
const creds = auth.getCredentialsForProvider(providerId);
|
|
24
24
|
const cred = creds.find((c) => c.type === "api_key" && c.key);
|
|
25
25
|
return cred?.type === "api_key" ? cred.key : undefined;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* 6. Silent flag stripping — token-level argument parser; unknown
|
|
24
24
|
* `--*` tokens raise an explicit error.
|
|
25
25
|
*/
|
|
26
|
-
import { existsSync } from "node:fs";
|
|
26
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
27
27
|
import { open, readFile } from "node:fs/promises";
|
|
28
28
|
import { join, relative } from "node:path";
|
|
29
29
|
import { buildSliceFileName, resolveMilestonePath, resolveSliceFile, resolveSlicePath, } from "./paths.js";
|
|
@@ -194,7 +194,7 @@ export async function buildEvalReviewContext(state, milestoneId, now = () => new
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
const truncated = summaryRead.truncated || specTruncated;
|
|
197
|
-
const outputPath = evalReviewWritePath(state.sliceDir, state.sliceId);
|
|
197
|
+
const outputPath = evalReviewWritePath(realpathSync(state.sliceDir), state.sliceId);
|
|
198
198
|
const basePath = projectRoot();
|
|
199
199
|
const relativeOutputPath = relative(basePath, outputPath);
|
|
200
200
|
return {
|
|
@@ -21,7 +21,7 @@ import { estimateTimeRemaining } from "./auto-dashboard.js";
|
|
|
21
21
|
import { computeProgressScore } from "./progress-score.js";
|
|
22
22
|
import { runEnvironmentChecks } from "./doctor-environment.js";
|
|
23
23
|
import { formattedShortcutPair } from "./shortcut-defs.js";
|
|
24
|
-
function unitLabel(type) {
|
|
24
|
+
export function unitLabel(type) {
|
|
25
25
|
switch (type) {
|
|
26
26
|
case "discuss-milestone":
|
|
27
27
|
case "discuss-slice": return "Discuss";
|