gsd-pi 2.58.0-dev.778d6ac → 2.58.0-dev.d63175c
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/README.md +1 -1
- package/dist/cli.js +35 -49
- package/dist/headless-ui.d.ts +0 -17
- package/dist/headless-ui.js +3 -97
- package/dist/headless.js +6 -67
- package/dist/help-text.js +0 -1
- package/dist/onboarding.js +0 -44
- package/dist/resource-loader.js +1 -16
- package/dist/resources/agents/researcher.md +1 -1
- package/dist/resources/extensions/ask-user-questions.js +3 -16
- package/dist/resources/extensions/async-jobs/extension-manifest.json +1 -1
- package/dist/resources/extensions/bg-shell/extension-manifest.json +1 -1
- package/dist/resources/extensions/browser-tools/extension-manifest.json +1 -1
- package/dist/resources/extensions/claude-code-cli/partial-builder.js +6 -14
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +36 -59
- package/dist/resources/extensions/context7/extension-manifest.json +1 -1
- package/dist/resources/extensions/get-secrets-from-user.js +5 -8
- package/dist/resources/extensions/google-search/extension-manifest.json +1 -1
- package/dist/resources/extensions/google-search/index.js +1 -2
- package/dist/resources/extensions/gsd/auto/phases.js +21 -25
- package/dist/resources/extensions/gsd/auto-artifact-paths.js +2 -2
- package/dist/resources/extensions/gsd/auto-dashboard.js +20 -37
- package/dist/resources/extensions/gsd/auto-dispatch.js +2 -17
- package/dist/resources/extensions/gsd/auto-model-selection.js +3 -26
- package/dist/resources/extensions/gsd/auto-post-unit.js +4 -16
- package/dist/resources/extensions/gsd/auto-prompts.js +1 -1
- package/dist/resources/extensions/gsd/auto-recovery.js +5 -13
- package/dist/resources/extensions/gsd/auto-start.js +22 -35
- package/dist/resources/extensions/gsd/auto-worktree.js +12 -196
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +0 -32
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +8 -80
- package/dist/resources/extensions/gsd/bootstrap/dynamic-tools.js +1 -32
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +18 -33
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +11 -44
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +0 -67
- package/dist/resources/extensions/gsd/captures.js +4 -56
- package/dist/resources/extensions/gsd/db-writer.js +8 -116
- package/dist/resources/extensions/gsd/doctor-git-checks.js +0 -28
- package/dist/resources/extensions/gsd/doctor-providers.js +1 -2
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +4 -5
- package/dist/resources/extensions/gsd/doctor.js +1 -3
- package/dist/resources/extensions/gsd/error-classifier.js +10 -13
- package/dist/resources/extensions/gsd/extension-manifest.json +1 -16
- package/dist/resources/extensions/gsd/forensics.js +20 -123
- package/dist/resources/extensions/gsd/git-service.js +1 -23
- package/dist/resources/extensions/gsd/gitignore.js +0 -33
- package/dist/resources/extensions/gsd/gsd-db.js +9 -36
- package/dist/resources/extensions/gsd/guided-flow.js +44 -106
- package/dist/resources/extensions/gsd/health-widget-core.js +0 -31
- package/dist/resources/extensions/gsd/health-widget.js +0 -17
- package/dist/resources/extensions/gsd/index.js +1 -1
- package/dist/resources/extensions/gsd/memory-extractor.js +0 -7
- package/dist/resources/extensions/gsd/migrate-external.js +1 -8
- package/dist/resources/extensions/gsd/model-cost-table.js +0 -18
- package/dist/resources/extensions/gsd/model-router.js +1 -35
- package/dist/resources/extensions/gsd/native-git-bridge.js +0 -17
- package/dist/resources/extensions/gsd/notifications.js +1 -16
- package/dist/resources/extensions/gsd/parallel-eligibility.js +2 -13
- package/dist/resources/extensions/gsd/parallel-merge.js +5 -78
- package/dist/resources/extensions/gsd/parsers-legacy.js +3 -20
- package/dist/resources/extensions/gsd/paths.js +0 -43
- package/dist/resources/extensions/gsd/preferences-models.js +1 -14
- package/dist/resources/extensions/gsd/preferences-types.js +1 -2
- package/dist/resources/extensions/gsd/preferences.js +16 -13
- package/dist/resources/extensions/gsd/prompt-loader.js +1 -4
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +2 -4
- package/dist/resources/extensions/gsd/prompts/discuss-headless.md +1 -1
- package/dist/resources/extensions/gsd/prompts/discuss.md +1 -1
- package/dist/resources/extensions/gsd/prompts/execute-task.md +1 -3
- package/dist/resources/extensions/gsd/prompts/forensics.md +2 -2
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-discuss-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +0 -2
- package/dist/resources/extensions/gsd/prompts/rethink.md +1 -1
- package/dist/resources/extensions/gsd/prompts/triage-captures.md +0 -1
- package/dist/resources/extensions/gsd/repo-identity.js +11 -205
- package/dist/resources/extensions/gsd/rethink.js +0 -5
- package/dist/resources/extensions/gsd/roadmap-slices.js +4 -5
- package/dist/resources/extensions/gsd/state.js +27 -85
- package/dist/resources/extensions/gsd/tests/dist-redirect.mjs +1 -20
- package/dist/resources/extensions/gsd/tools/complete-task.js +71 -34
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +2 -12
- package/dist/resources/extensions/gsd/tools/reassess-roadmap.js +1 -29
- package/dist/resources/extensions/gsd/tools/validate-milestone.js +3 -14
- package/dist/resources/extensions/gsd/triage-resolution.js +7 -22
- package/dist/resources/extensions/gsd/undo.js +2 -2
- package/dist/resources/extensions/gsd/unit-ownership.js +33 -164
- package/dist/resources/extensions/gsd/verdict-parser.js +8 -20
- package/dist/resources/extensions/gsd/workflow-manifest.js +5 -24
- package/dist/resources/extensions/gsd/workflow-projections.js +63 -95
- package/dist/resources/extensions/gsd/workflow-reconcile.js +5 -35
- package/dist/resources/extensions/gsd/workspace-index.js +0 -24
- package/dist/resources/extensions/gsd/worktree-manager.js +1 -105
- package/dist/resources/extensions/gsd/worktree-resolver.js +3 -20
- package/dist/resources/extensions/mcp-client/index.js +7 -11
- package/dist/resources/extensions/search-the-web/extension-manifest.json +1 -1
- package/dist/resources/extensions/shared/interview-ui.js +1 -11
- package/dist/resources/skills/create-gsd-extension/SKILL.md +3 -5
- package/dist/resources/skills/create-gsd-extension/references/key-rules-gotchas.md +4 -5
- package/dist/resources/skills/create-gsd-extension/workflows/add-capability.md +2 -2
- package/dist/resources/skills/create-gsd-extension/workflows/create-extension.md +4 -4
- package/dist/resources/skills/create-gsd-extension/workflows/debug-extension.md +3 -5
- 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 +1 -1
- package/dist/web/standalone/.next/required-server-files.json +1 -1
- 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 +2 -2
- 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 +2 -2
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +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 +1 -1
- 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 +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- 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/chunks/2229.js +2 -2
- 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/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +2 -2
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/chunks/6502.8b732f67a11b11b4.js +9 -0
- package/dist/web/standalone/.next/static/chunks/{webpack-a1c1e452c6b32d04.js → webpack-61d3afac6d0f0ce7.js} +1 -1
- package/dist/web/standalone/.next/static/css/a58ef8a151aa0493.css +1 -0
- package/dist/web/standalone/server.js +1 -1
- package/dist/web-mode.js +1 -2
- package/package.json +2 -2
- package/packages/native/dist/ast/index.js +5 -9
- package/packages/native/dist/ast/types.js +1 -2
- package/packages/native/dist/clipboard/index.js +7 -12
- package/packages/native/dist/clipboard/types.js +1 -2
- package/packages/native/dist/diff/index.js +7 -12
- package/packages/native/dist/diff/types.js +1 -2
- package/packages/native/dist/fd/index.js +3 -6
- package/packages/native/dist/fd/types.js +1 -2
- package/packages/native/dist/glob/index.js +5 -9
- package/packages/native/dist/glob/types.js +1 -2
- package/packages/native/dist/grep/index.js +5 -9
- package/packages/native/dist/grep/types.js +1 -2
- package/packages/native/dist/gsd-parser/index.js +11 -18
- package/packages/native/dist/gsd-parser/types.js +1 -2
- package/packages/native/dist/highlight/index.js +7 -12
- package/packages/native/dist/highlight/types.js +1 -2
- package/packages/native/dist/html/index.js +3 -6
- package/packages/native/dist/html/types.js +1 -2
- package/packages/native/dist/image/index.js +5 -10
- package/packages/native/dist/image/types.js +4 -7
- package/packages/native/dist/index.js +17 -70
- package/packages/native/dist/json-parse/index.js +8 -13
- package/packages/native/dist/native.js +10 -47
- package/packages/native/dist/ps/index.js +9 -15
- package/packages/native/dist/ps/types.js +1 -2
- package/packages/native/dist/stream-process/index.js +7 -12
- package/packages/native/dist/text/index.js +14 -24
- package/packages/native/dist/text/types.js +2 -5
- package/packages/native/dist/truncate/index.js +7 -12
- package/packages/native/dist/ttsr/index.js +7 -12
- package/packages/native/dist/ttsr/types.js +1 -2
- package/packages/native/dist/xxhash/index.js +5 -9
- package/packages/native/package.json +19 -19
- package/packages/native/src/native.ts +8 -9
- package/packages/pi-agent-core/dist/agent-loop.js +2 -3
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/dist/proxy.d.ts +1 -1
- package/packages/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/proxy.js.map +1 -1
- package/packages/pi-agent-core/src/agent-loop.ts +2 -3
- package/packages/pi-agent-core/src/proxy.ts +1 -1
- package/packages/pi-ai/dist/env-api-keys.js +0 -1
- package/packages/pi-ai/dist/env-api-keys.js.map +1 -1
- package/packages/pi-ai/dist/index.d.ts +0 -1
- package/packages/pi-ai/dist/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/index.js +0 -1
- package/packages/pi-ai/dist/index.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +2 -19
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/types.d.ts +3 -3
- package/packages/pi-ai/dist/types.d.ts.map +1 -1
- package/packages/pi-ai/dist/types.js.map +1 -1
- package/packages/pi-ai/dist/utils/json-parse.d.ts +0 -3
- package/packages/pi-ai/dist/utils/json-parse.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/json-parse.js +1 -24
- package/packages/pi-ai/dist/utils/json-parse.js.map +1 -1
- package/packages/pi-ai/src/env-api-keys.ts +0 -1
- package/packages/pi-ai/src/index.ts +0 -1
- package/packages/pi-ai/src/providers/anthropic-shared.ts +2 -17
- package/packages/pi-ai/src/types.ts +2 -3
- package/packages/pi-ai/src/utils/json-parse.ts +1 -28
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts +0 -4
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +0 -31
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts +1 -17
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js +2 -62
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/exec.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/exec.js +1 -3
- package/packages/pi-coding-agent/dist/core/exec.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts +0 -4
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.js +0 -2
- package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts +0 -5
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +0 -5
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/index.js +1 -1
- package/packages/pi-coding-agent/dist/core/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/index.js +0 -3
- package/packages/pi-coding-agent/dist/core/lsp/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.js +0 -3
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/messages.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/messages.js +2 -31
- package/packages/pi-coding-agent/dist/core/messages.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.js +0 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts +0 -10
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js +1 -12
- package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts +0 -6
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js +1 -48
- package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -1
- 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 -10
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/read.js +4 -13
- package/packages/pi-coding-agent/dist/core/tools/read.js.map +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts +2 -2
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js +1 -1
- package/packages/pi-coding-agent/dist/index.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 +0 -4
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/rpc/remote-terminal.d.ts +0 -1
- package/packages/pi-coding-agent/dist/modes/rpc/remote-terminal.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/rpc/remote-terminal.js +0 -5
- package/packages/pi-coding-agent/dist/modes/rpc/remote-terminal.js.map +1 -1
- package/packages/pi-coding-agent/src/core/agent-session.ts +1 -38
- package/packages/pi-coding-agent/src/core/compaction/compaction.ts +1 -94
- package/packages/pi-coding-agent/src/core/exec.ts +1 -3
- package/packages/pi-coding-agent/src/core/extensions/index.ts +0 -4
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +0 -5
- package/packages/pi-coding-agent/src/core/index.ts +0 -6
- package/packages/pi-coding-agent/src/core/lsp/index.ts +0 -3
- package/packages/pi-coding-agent/src/core/lsp/lspmux.ts +0 -3
- package/packages/pi-coding-agent/src/core/messages.ts +2 -29
- package/packages/pi-coding-agent/src/core/model-resolver.ts +0 -1
- package/packages/pi-coding-agent/src/core/resource-loader.ts +1 -20
- package/packages/pi-coding-agent/src/core/retry-handler.ts +1 -52
- package/packages/pi-coding-agent/src/core/tools/hashline-read.ts +3 -11
- package/packages/pi-coding-agent/src/core/tools/read.ts +4 -14
- package/packages/pi-coding-agent/src/index.ts +0 -6
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +0 -7
- package/packages/pi-coding-agent/src/modes/rpc/remote-terminal.ts +0 -6
- package/packages/pi-tui/dist/terminal.d.ts +0 -2
- package/packages/pi-tui/dist/terminal.d.ts.map +1 -1
- package/packages/pi-tui/dist/terminal.js +0 -9
- package/packages/pi-tui/dist/terminal.js.map +1 -1
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +0 -9
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/src/terminal.ts +0 -14
- package/packages/pi-tui/src/tui.ts +0 -8
- package/scripts/ensure-workspace-builds.cjs +14 -45
- package/src/resources/agents/researcher.md +1 -1
- package/src/resources/extensions/ask-user-questions.ts +3 -21
- package/src/resources/extensions/async-jobs/extension-manifest.json +1 -1
- package/src/resources/extensions/bg-shell/extension-manifest.json +1 -1
- package/src/resources/extensions/browser-tools/extension-manifest.json +1 -1
- package/src/resources/extensions/claude-code-cli/partial-builder.ts +6 -13
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +35 -63
- package/src/resources/extensions/claude-code-cli/tests/partial-builder.test.ts +0 -28
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +1 -108
- package/src/resources/extensions/context7/extension-manifest.json +1 -1
- package/src/resources/extensions/get-secrets-from-user.ts +5 -8
- package/src/resources/extensions/google-search/extension-manifest.json +1 -1
- package/src/resources/extensions/google-search/index.ts +1 -2
- package/src/resources/extensions/gsd/auto/loop-deps.ts +0 -1
- package/src/resources/extensions/gsd/auto/phases.ts +34 -43
- package/src/resources/extensions/gsd/auto-artifact-paths.ts +2 -2
- package/src/resources/extensions/gsd/auto-dashboard.ts +19 -37
- package/src/resources/extensions/gsd/auto-dispatch.ts +2 -18
- package/src/resources/extensions/gsd/auto-model-selection.ts +5 -26
- package/src/resources/extensions/gsd/auto-post-unit.ts +4 -18
- package/src/resources/extensions/gsd/auto-prompts.ts +1 -1
- package/src/resources/extensions/gsd/auto-recovery.ts +5 -12
- package/src/resources/extensions/gsd/auto-start.ts +26 -35
- package/src/resources/extensions/gsd/auto-worktree.ts +9 -190
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +0 -31
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +8 -85
- package/src/resources/extensions/gsd/bootstrap/dynamic-tools.ts +1 -38
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +19 -31
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +11 -50
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +0 -75
- package/src/resources/extensions/gsd/captures.ts +3 -63
- package/src/resources/extensions/gsd/db-writer.ts +7 -140
- package/src/resources/extensions/gsd/doctor-git-checks.ts +0 -26
- package/src/resources/extensions/gsd/doctor-providers.ts +1 -2
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +4 -5
- package/src/resources/extensions/gsd/doctor.ts +1 -3
- package/src/resources/extensions/gsd/error-classifier.ts +11 -14
- package/src/resources/extensions/gsd/extension-manifest.json +1 -16
- package/src/resources/extensions/gsd/forensics.ts +20 -144
- package/src/resources/extensions/gsd/git-service.ts +3 -26
- package/src/resources/extensions/gsd/gitignore.ts +0 -33
- package/src/resources/extensions/gsd/gsd-db.ts +7 -43
- package/src/resources/extensions/gsd/guided-flow.ts +45 -114
- package/src/resources/extensions/gsd/health-widget-core.ts +0 -34
- package/src/resources/extensions/gsd/health-widget.ts +0 -17
- package/src/resources/extensions/gsd/index.ts +0 -1
- package/src/resources/extensions/gsd/memory-extractor.ts +0 -8
- package/src/resources/extensions/gsd/migrate-external.ts +1 -9
- package/src/resources/extensions/gsd/model-cost-table.ts +0 -19
- package/src/resources/extensions/gsd/model-router.ts +1 -35
- package/src/resources/extensions/gsd/native-git-bridge.ts +0 -17
- package/src/resources/extensions/gsd/notifications.ts +0 -16
- package/src/resources/extensions/gsd/parallel-eligibility.ts +2 -15
- package/src/resources/extensions/gsd/parallel-merge.ts +4 -87
- package/src/resources/extensions/gsd/parsers-legacy.ts +3 -22
- package/src/resources/extensions/gsd/paths.ts +0 -42
- package/src/resources/extensions/gsd/preferences-models.ts +1 -14
- package/src/resources/extensions/gsd/preferences-types.ts +1 -2
- package/src/resources/extensions/gsd/preferences.ts +15 -13
- package/src/resources/extensions/gsd/prompt-loader.ts +1 -4
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/complete-slice.md +2 -4
- package/src/resources/extensions/gsd/prompts/discuss-headless.md +1 -1
- package/src/resources/extensions/gsd/prompts/discuss.md +1 -1
- package/src/resources/extensions/gsd/prompts/execute-task.md +1 -3
- package/src/resources/extensions/gsd/prompts/forensics.md +2 -2
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/plan-slice.md +0 -2
- package/src/resources/extensions/gsd/prompts/rethink.md +1 -1
- package/src/resources/extensions/gsd/prompts/triage-captures.md +0 -1
- package/src/resources/extensions/gsd/repo-identity.ts +11 -186
- package/src/resources/extensions/gsd/rethink.ts +0 -6
- package/src/resources/extensions/gsd/roadmap-slices.ts +4 -5
- package/src/resources/extensions/gsd/state.ts +32 -84
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +0 -29
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +1 -71
- package/src/resources/extensions/gsd/tests/captures.test.ts +0 -103
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +0 -27
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +0 -21
- package/src/resources/extensions/gsd/tests/db-writer.test.ts +12 -7
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +5 -78
- package/src/resources/extensions/gsd/tests/derive-state.test.ts +0 -29
- package/src/resources/extensions/gsd/tests/discuss-queued-milestones.test.ts +0 -40
- package/src/resources/extensions/gsd/tests/dist-redirect.mjs +1 -20
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +0 -117
- package/src/resources/extensions/gsd/tests/empty-db-reconciliation.test.ts +79 -0
- package/src/resources/extensions/gsd/tests/forensics-dedup.test.ts +0 -31
- package/src/resources/extensions/gsd/tests/gsd-tools.test.ts +12 -125
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +0 -67
- package/src/resources/extensions/gsd/tests/integration/auto-recovery.test.ts +1 -111
- package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +0 -101
- package/src/resources/extensions/gsd/tests/integration/auto-worktree.test.ts +0 -59
- package/src/resources/extensions/gsd/tests/integration/parallel-merge.test.ts +0 -110
- package/src/resources/extensions/gsd/tests/integration/run-uat.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/memory-extractor.test.ts +2 -85
- package/src/resources/extensions/gsd/tests/model-cost-table.test.ts +0 -34
- package/src/resources/extensions/gsd/tests/model-router.test.ts +3 -68
- package/src/resources/extensions/gsd/tests/model-unittype-mapping.test.ts +0 -28
- package/src/resources/extensions/gsd/tests/notifications.test.ts +0 -45
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +1 -33
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +0 -29
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +0 -38
- package/src/resources/extensions/gsd/tests/reassess-handler.test.ts +0 -117
- package/src/resources/extensions/gsd/tests/roadmap-slices.test.ts +0 -97
- package/src/resources/extensions/gsd/tests/secure-env-collect.test.ts +0 -134
- package/src/resources/extensions/gsd/tests/tool-naming.test.ts +1 -2
- package/src/resources/extensions/gsd/tests/triage-resolution.test.ts +0 -8
- package/src/resources/extensions/gsd/tests/unit-ownership.test.ts +17 -100
- package/src/resources/extensions/gsd/tests/validate-milestone-write-order.test.ts +1 -4
- package/src/resources/extensions/gsd/tests/workflow-logger.test.ts +0 -48
- package/src/resources/extensions/gsd/tests/workflow-manifest.test.ts +0 -92
- package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +2 -4
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +1 -48
- package/src/resources/extensions/gsd/tests/worktree-sync-milestones.test.ts +5 -29
- package/src/resources/extensions/gsd/tools/complete-task.ts +74 -36
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +1 -13
- package/src/resources/extensions/gsd/tools/reassess-roadmap.ts +0 -36
- package/src/resources/extensions/gsd/tools/validate-milestone.ts +2 -20
- package/src/resources/extensions/gsd/triage-resolution.ts +6 -23
- package/src/resources/extensions/gsd/types.ts +2 -4
- package/src/resources/extensions/gsd/undo.ts +2 -2
- package/src/resources/extensions/gsd/unit-ownership.ts +35 -206
- package/src/resources/extensions/gsd/verdict-parser.ts +6 -21
- package/src/resources/extensions/gsd/workflow-logger.ts +1 -3
- package/src/resources/extensions/gsd/workflow-manifest.ts +5 -22
- package/src/resources/extensions/gsd/workflow-projections.ts +64 -97
- package/src/resources/extensions/gsd/workflow-reconcile.ts +10 -39
- package/src/resources/extensions/gsd/workspace-index.ts +0 -30
- package/src/resources/extensions/gsd/worktree-manager.ts +1 -120
- package/src/resources/extensions/gsd/worktree-resolver.ts +3 -22
- package/src/resources/extensions/mcp-client/index.ts +7 -13
- package/src/resources/extensions/search-the-web/extension-manifest.json +1 -1
- package/src/resources/extensions/shared/interview-ui.ts +1 -12
- package/src/resources/skills/create-gsd-extension/SKILL.md +3 -5
- package/src/resources/skills/create-gsd-extension/references/key-rules-gotchas.md +4 -5
- package/src/resources/skills/create-gsd-extension/workflows/add-capability.md +2 -2
- package/src/resources/skills/create-gsd-extension/workflows/create-extension.md +4 -4
- package/src/resources/skills/create-gsd-extension/workflows/debug-extension.md +3 -5
- package/dist/resources/extensions/gsd/milestone-validation-gates.js +0 -45
- package/dist/resources/extensions/ollama/index.js +0 -112
- package/dist/resources/extensions/ollama/model-capabilities.js +0 -115
- package/dist/resources/extensions/ollama/ollama-client.js +0 -168
- package/dist/resources/extensions/ollama/ollama-commands.js +0 -194
- package/dist/resources/extensions/ollama/ollama-discovery.js +0 -69
- package/dist/resources/extensions/ollama/ollama-tool.js +0 -184
- package/dist/resources/extensions/ollama/types.js +0 -2
- package/dist/startup-model-validation.d.ts +0 -39
- package/dist/startup-model-validation.js +0 -50
- package/dist/web/standalone/.next/static/chunks/6502.7593d7797a4b3999.js +0 -9
- package/dist/web/standalone/.next/static/css/f6e8833d46e738d8.css +0 -1
- package/packages/native/src/__tests__/module-compat.test.mjs +0 -91
- package/packages/pi-agent-core/src/agent-loop.test.ts +0 -45
- package/packages/pi-ai/dist/providers/anthropic-shared.test.d.ts +0 -2
- package/packages/pi-ai/dist/providers/anthropic-shared.test.d.ts.map +0 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.test.js +0 -25
- package/packages/pi-ai/dist/providers/anthropic-shared.test.js.map +0 -1
- package/packages/pi-ai/dist/utils/repair-tool-json.d.ts +0 -37
- package/packages/pi-ai/dist/utils/repair-tool-json.d.ts.map +0 -1
- package/packages/pi-ai/dist/utils/repair-tool-json.js +0 -75
- package/packages/pi-ai/dist/utils/repair-tool-json.js.map +0 -1
- package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.d.ts +0 -2
- package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.d.ts.map +0 -1
- package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.js +0 -73
- package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.js.map +0 -1
- package/packages/pi-ai/src/providers/anthropic-shared.test.ts +0 -29
- package/packages/pi-ai/src/utils/repair-tool-json.ts +0 -88
- package/packages/pi-ai/src/utils/tests/repair-tool-json.test.ts +0 -102
- package/packages/pi-coding-agent/dist/core/compaction/compaction.test.d.ts +0 -6
- package/packages/pi-coding-agent/dist/core/compaction/compaction.test.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.test.js +0 -176
- package/packages/pi-coding-agent/dist/core/compaction/compaction.test.js.map +0 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.d.ts +0 -28
- package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.js +0 -37
- package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.js.map +0 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.test.d.ts +0 -2
- package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.test.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.test.js +0 -63
- package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.test.js.map +0 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-sort.d.ts +0 -19
- package/packages/pi-coding-agent/dist/core/extensions/extension-sort.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-sort.js +0 -115
- package/packages/pi-coding-agent/dist/core/extensions/extension-sort.js.map +0 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-sort.test.d.ts +0 -2
- package/packages/pi-coding-agent/dist/core/extensions/extension-sort.test.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-sort.test.js +0 -109
- package/packages/pi-coding-agent/dist/core/extensions/extension-sort.test.js.map +0 -1
- package/packages/pi-coding-agent/dist/core/image-overflow-recovery.d.ts +0 -44
- package/packages/pi-coding-agent/dist/core/image-overflow-recovery.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/image-overflow-recovery.js +0 -97
- package/packages/pi-coding-agent/dist/core/image-overflow-recovery.js.map +0 -1
- package/packages/pi-coding-agent/dist/core/image-overflow-recovery.test.d.ts +0 -2
- package/packages/pi-coding-agent/dist/core/image-overflow-recovery.test.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/image-overflow-recovery.test.js +0 -181
- package/packages/pi-coding-agent/dist/core/image-overflow-recovery.test.js.map +0 -1
- package/packages/pi-coding-agent/dist/core/messages.test.d.ts +0 -9
- package/packages/pi-coding-agent/dist/core/messages.test.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/messages.test.js +0 -86
- package/packages/pi-coding-agent/dist/core/messages.test.js.map +0 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.test.d.ts +0 -9
- package/packages/pi-coding-agent/dist/core/retry-handler.test.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.test.js +0 -193
- package/packages/pi-coding-agent/dist/core/retry-handler.test.js.map +0 -1
- package/packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.d.ts +0 -16
- package/packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.js +0 -80
- package/packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.js.map +0 -1
- package/packages/pi-coding-agent/src/core/compaction/compaction.test.ts +0 -236
- package/packages/pi-coding-agent/src/core/extensions/extension-manifest.test.ts +0 -77
- package/packages/pi-coding-agent/src/core/extensions/extension-manifest.ts +0 -62
- package/packages/pi-coding-agent/src/core/extensions/extension-sort.test.ts +0 -134
- package/packages/pi-coding-agent/src/core/extensions/extension-sort.ts +0 -137
- package/packages/pi-coding-agent/src/core/image-overflow-recovery.test.ts +0 -228
- package/packages/pi-coding-agent/src/core/image-overflow-recovery.ts +0 -118
- package/packages/pi-coding-agent/src/core/messages.test.ts +0 -114
- package/packages/pi-coding-agent/src/core/retry-handler.test.ts +0 -255
- package/packages/pi-coding-agent/src/core/tools/spawn-shell-windows.test.ts +0 -92
- package/src/resources/extensions/gsd/milestone-validation-gates.ts +0 -56
- package/src/resources/extensions/gsd/tests/auto-mode-interactive-guard.test.ts +0 -71
- package/src/resources/extensions/gsd/tests/cli-provider-rate-limit.test.ts +0 -47
- package/src/resources/extensions/gsd/tests/completion-hierarchy-guards.test.ts +0 -192
- package/src/resources/extensions/gsd/tests/db-path-worktree-symlink.test.ts +0 -131
- package/src/resources/extensions/gsd/tests/discord-invite-links.test.ts +0 -47
- package/src/resources/extensions/gsd/tests/discuss-empty-db-fallback.test.ts +0 -127
- package/src/resources/extensions/gsd/tests/dynamic-routing-default.test.ts +0 -20
- package/src/resources/extensions/gsd/tests/empty-content-abort-loop.test.ts +0 -74
- package/src/resources/extensions/gsd/tests/event-replay-idempotency.test.ts +0 -140
- package/src/resources/extensions/gsd/tests/forensics-context-persist.test.ts +0 -129
- package/src/resources/extensions/gsd/tests/forensics-db-completion.test.ts +0 -96
- package/src/resources/extensions/gsd/tests/gsdroot-worktree-detection.test.ts +0 -164
- package/src/resources/extensions/gsd/tests/guided-flow-dynamic-routing.test.ts +0 -135
- package/src/resources/extensions/gsd/tests/guided-flow-session-isolation.test.ts +0 -97
- package/src/resources/extensions/gsd/tests/hook-key-parsing.test.ts +0 -107
- package/src/resources/extensions/gsd/tests/integration/doctor-false-positives.test.ts +0 -243
- package/src/resources/extensions/gsd/tests/integration/gitignore-staging-2570.test.ts +0 -150
- package/src/resources/extensions/gsd/tests/integration/state-machine-live-validation.test.ts +0 -959
- package/src/resources/extensions/gsd/tests/migrate-external-worktree.test.ts +0 -105
- package/src/resources/extensions/gsd/tests/milestone-status-authoritative.test.ts +0 -116
- package/src/resources/extensions/gsd/tests/parallel-commit-scope.test.ts +0 -159
- package/src/resources/extensions/gsd/tests/parallel-eligibility-ghost.test.ts +0 -150
- package/src/resources/extensions/gsd/tests/plan-milestone-title.test.ts +0 -70
- package/src/resources/extensions/gsd/tests/project-relocation-recovery.test.ts +0 -297
- package/src/resources/extensions/gsd/tests/prompt-loader-replacement.test.ts +0 -178
- package/src/resources/extensions/gsd/tests/prompt-tool-names.test.ts +0 -69
- package/src/resources/extensions/gsd/tests/queue-execution-guard.test.ts +0 -157
- package/src/resources/extensions/gsd/tests/quick-turn-end-cleanup.test.ts +0 -90
- package/src/resources/extensions/gsd/tests/reconciliation-edge-cases.test.ts +0 -162
- package/src/resources/extensions/gsd/tests/slice-disk-reconcile.test.ts +0 -233
- package/src/resources/extensions/gsd/tests/stash-queued-context-files.test.ts +0 -305
- package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +0 -405
- package/src/resources/extensions/gsd/tests/state-derivation-parity.test.ts +0 -257
- package/src/resources/extensions/gsd/tests/state-machine-full-walkthrough.test.ts +0 -1628
- package/src/resources/extensions/gsd/tests/stop-auto-race-null-unit.test.ts +0 -106
- package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +0 -174
- package/src/resources/extensions/gsd/tests/summary-render-parity.test.ts +0 -221
- package/src/resources/extensions/gsd/tests/uat-stuck-loop-orphaned-worktree.test.ts +0 -289
- package/src/resources/extensions/gsd/tests/vacuum-recovery.test.ts +0 -154
- package/src/resources/extensions/gsd/tests/verdict-parser.test.ts +0 -156
- package/src/resources/extensions/gsd/tests/verification-operational-gate.test.ts +0 -82
- package/src/resources/extensions/gsd/tests/worktree-db-respawn-truncation.test.ts +0 -140
- package/src/resources/extensions/gsd/tests/worktree-nested-git-safety.test.ts +0 -101
- package/src/resources/extensions/gsd/tests/zombie-gsd-state.test.ts +0 -95
- package/src/resources/extensions/mcp-client/tests/server-name-spaces.test.ts +0 -55
- package/src/resources/extensions/ollama/index.ts +0 -130
- package/src/resources/extensions/ollama/model-capabilities.ts +0 -145
- package/src/resources/extensions/ollama/ollama-client.ts +0 -196
- package/src/resources/extensions/ollama/ollama-commands.ts +0 -248
- package/src/resources/extensions/ollama/ollama-discovery.ts +0 -106
- package/src/resources/extensions/ollama/ollama-tool.ts +0 -218
- package/src/resources/extensions/ollama/tests/model-capabilities.test.ts +0 -162
- package/src/resources/extensions/ollama/tests/ollama-client.test.ts +0 -38
- package/src/resources/extensions/ollama/tests/ollama-discovery.test.ts +0 -28
- package/src/resources/extensions/ollama/types.ts +0 -130
- package/src/resources/extensions/shared/tests/ask-user-freetext.test.ts +0 -156
- /package/dist/web/standalone/.next/static/{R0D4xaIPl5kg93edN7Oo0 → 5DLsjFHdSB6_a1EDQVjr7}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{R0D4xaIPl5kg93edN7Oo0 → 5DLsjFHdSB6_a1EDQVjr7}/_ssgManifest.js +0 -0
|
@@ -11,7 +11,7 @@ import { resolve } from 'node:path';
|
|
|
11
11
|
import { readFileSync, existsSync, statSync } from 'node:fs';
|
|
12
12
|
import { resolveGsdRootFile } from './paths.js';
|
|
13
13
|
import { saveFile } from './files.js';
|
|
14
|
-
import { GSDError, GSD_IO_ERROR } from './errors.js';
|
|
14
|
+
import { GSDError, GSD_STALE_STATE, GSD_IO_ERROR } from './errors.js';
|
|
15
15
|
import { logWarning, logError } from './workflow-logger.js';
|
|
16
16
|
import { invalidateStateCache } from './state.js';
|
|
17
17
|
import { clearPathCache } from './paths.js';
|
|
@@ -205,98 +205,6 @@ export async function nextDecisionId() {
|
|
|
205
205
|
return 'D001';
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
// ─── Next Requirement ID ─────────────────────────────────────────────────
|
|
209
|
-
/**
|
|
210
|
-
* Compute the next requirement ID from the current DB state.
|
|
211
|
-
* Queries MAX(CAST(SUBSTR(id, 2) AS INTEGER)) from requirements table.
|
|
212
|
-
* Returns R001 if no requirements exist. Zero-pads to 3 digits.
|
|
213
|
-
*/
|
|
214
|
-
export async function nextRequirementId() {
|
|
215
|
-
try {
|
|
216
|
-
const db = await import('./gsd-db.js');
|
|
217
|
-
const adapter = db._getAdapter();
|
|
218
|
-
if (!adapter)
|
|
219
|
-
return 'R001';
|
|
220
|
-
const row = adapter
|
|
221
|
-
.prepare('SELECT MAX(CAST(SUBSTR(id, 2) AS INTEGER)) as max_num FROM requirements')
|
|
222
|
-
.get();
|
|
223
|
-
const maxNum = row ? row['max_num'] : null;
|
|
224
|
-
if (maxNum == null || isNaN(maxNum))
|
|
225
|
-
return 'R001';
|
|
226
|
-
const next = maxNum + 1;
|
|
227
|
-
return `R${String(next).padStart(3, '0')}`;
|
|
228
|
-
}
|
|
229
|
-
catch (err) {
|
|
230
|
-
logError('manifest', 'nextRequirementId failed', { fn: 'nextRequirementId', error: String(err.message) });
|
|
231
|
-
return 'R001';
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Save a new requirement to DB and regenerate REQUIREMENTS.md.
|
|
236
|
-
* Auto-assigns the next ID via nextRequirementId().
|
|
237
|
-
* Returns the assigned ID.
|
|
238
|
-
*/
|
|
239
|
-
export async function saveRequirementToDb(fields, basePath) {
|
|
240
|
-
try {
|
|
241
|
-
const db = await import('./gsd-db.js');
|
|
242
|
-
const id = await nextRequirementId();
|
|
243
|
-
const requirement = {
|
|
244
|
-
id,
|
|
245
|
-
class: fields.class,
|
|
246
|
-
status: fields.status ?? 'active',
|
|
247
|
-
description: fields.description,
|
|
248
|
-
why: fields.why,
|
|
249
|
-
source: fields.source,
|
|
250
|
-
primary_owner: fields.primary_owner ?? '',
|
|
251
|
-
supporting_slices: fields.supporting_slices ?? '',
|
|
252
|
-
validation: fields.validation ?? '',
|
|
253
|
-
notes: fields.notes ?? '',
|
|
254
|
-
full_content: '',
|
|
255
|
-
superseded_by: null,
|
|
256
|
-
};
|
|
257
|
-
db.upsertRequirement(requirement);
|
|
258
|
-
// Fetch all requirements for full file regeneration
|
|
259
|
-
const adapter = db._getAdapter();
|
|
260
|
-
let allRequirements = [];
|
|
261
|
-
if (adapter) {
|
|
262
|
-
const rows = adapter.prepare('SELECT * FROM requirements ORDER BY id').all();
|
|
263
|
-
allRequirements = rows.map(row => ({
|
|
264
|
-
id: row['id'],
|
|
265
|
-
class: row['class'],
|
|
266
|
-
status: row['status'],
|
|
267
|
-
description: row['description'],
|
|
268
|
-
why: row['why'],
|
|
269
|
-
source: row['source'],
|
|
270
|
-
primary_owner: row['primary_owner'],
|
|
271
|
-
supporting_slices: row['supporting_slices'],
|
|
272
|
-
validation: row['validation'],
|
|
273
|
-
notes: row['notes'],
|
|
274
|
-
full_content: row['full_content'],
|
|
275
|
-
superseded_by: row['superseded_by'] ?? null,
|
|
276
|
-
}));
|
|
277
|
-
}
|
|
278
|
-
const nonSuperseded = allRequirements.filter(r => r.superseded_by == null);
|
|
279
|
-
const md = generateRequirementsMd(nonSuperseded);
|
|
280
|
-
const filePath = resolveGsdRootFile(basePath, 'REQUIREMENTS');
|
|
281
|
-
try {
|
|
282
|
-
await saveFile(filePath, md);
|
|
283
|
-
}
|
|
284
|
-
catch (diskErr) {
|
|
285
|
-
logError('manifest', 'disk write failed, rolling back DB row', { fn: 'saveRequirementToDb', error: String(diskErr.message) });
|
|
286
|
-
const rollbackAdapter = db._getAdapter();
|
|
287
|
-
rollbackAdapter?.prepare('DELETE FROM requirements WHERE id = :id').run({ ':id': id });
|
|
288
|
-
throw diskErr;
|
|
289
|
-
}
|
|
290
|
-
invalidateStateCache();
|
|
291
|
-
clearPathCache();
|
|
292
|
-
clearParseCache();
|
|
293
|
-
return { id };
|
|
294
|
-
}
|
|
295
|
-
catch (err) {
|
|
296
|
-
logError('manifest', 'saveRequirementToDb failed', { fn: 'saveRequirementToDb', error: String(err.message) });
|
|
297
|
-
throw err;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
208
|
/**
|
|
301
209
|
* Save a new decision to DB and regenerate DECISIONS.md.
|
|
302
210
|
* Auto-assigns the next ID via nextDecisionId().
|
|
@@ -387,28 +295,14 @@ export async function updateRequirementInDb(id, updates, basePath) {
|
|
|
387
295
|
try {
|
|
388
296
|
const db = await import('./gsd-db.js');
|
|
389
297
|
const existing = db.getRequirementById(id);
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
id,
|
|
395
|
-
class: '',
|
|
396
|
-
status: 'active',
|
|
397
|
-
description: '',
|
|
398
|
-
why: '',
|
|
399
|
-
source: '',
|
|
400
|
-
primary_owner: '',
|
|
401
|
-
supporting_slices: '',
|
|
402
|
-
validation: '',
|
|
403
|
-
notes: '',
|
|
404
|
-
full_content: '',
|
|
405
|
-
superseded_by: null,
|
|
406
|
-
};
|
|
407
|
-
// Merge updates into existing (or skeleton)
|
|
298
|
+
if (!existing) {
|
|
299
|
+
throw new GSDError(GSD_STALE_STATE, `Requirement ${id} not found`);
|
|
300
|
+
}
|
|
301
|
+
// Merge updates into existing
|
|
408
302
|
const merged = {
|
|
409
|
-
...
|
|
303
|
+
...existing,
|
|
410
304
|
...updates,
|
|
411
|
-
id:
|
|
305
|
+
id: existing.id, // ID cannot be changed
|
|
412
306
|
};
|
|
413
307
|
db.upsertRequirement(merged);
|
|
414
308
|
// Fetch ALL requirements (including superseded) for full file regeneration
|
|
@@ -441,9 +335,7 @@ export async function updateRequirementInDb(id, updates, basePath) {
|
|
|
441
335
|
}
|
|
442
336
|
catch (diskErr) {
|
|
443
337
|
logError('manifest', 'disk write failed, reverting DB row', { fn: 'updateRequirementInDb', error: String(diskErr.message) });
|
|
444
|
-
|
|
445
|
-
db.upsertRequirement(existing);
|
|
446
|
-
}
|
|
338
|
+
db.upsertRequirement(existing);
|
|
447
339
|
throw diskErr;
|
|
448
340
|
}
|
|
449
341
|
// Invalidate file-read caches so deriveState() sees the updated markdown.
|
|
@@ -11,29 +11,6 @@ import { RUNTIME_EXCLUSION_PATHS, resolveMilestoneIntegrationBranch, writeIntegr
|
|
|
11
11
|
import { nativeIsRepo, nativeWorktreeList, nativeWorktreeRemove, nativeBranchList, nativeBranchDelete, nativeLsFiles, nativeRmCached } from "./native-git-bridge.js";
|
|
12
12
|
import { getAllWorktreeHealth } from "./worktree-health.js";
|
|
13
13
|
import { loadEffectiveGSDPreferences } from "./preferences.js";
|
|
14
|
-
/**
|
|
15
|
-
* Returns true if the directory contains only doctor artifacts
|
|
16
|
-
* (e.g. `.gsd/doctor-history.jsonl`). These dirs are created by
|
|
17
|
-
* appendDoctorHistory() writing to worktree-scoped paths during the audit
|
|
18
|
-
* and should not be flagged as orphaned worktrees (#3105).
|
|
19
|
-
*/
|
|
20
|
-
function isDoctorArtifactOnly(dirPath) {
|
|
21
|
-
try {
|
|
22
|
-
const entries = readdirSync(dirPath);
|
|
23
|
-
// Empty dir — not a doctor artifact, still orphaned
|
|
24
|
-
if (entries.length === 0)
|
|
25
|
-
return false;
|
|
26
|
-
// Only a .gsd subdirectory
|
|
27
|
-
if (entries.length === 1 && entries[0] === ".gsd") {
|
|
28
|
-
const gsdEntries = readdirSync(join(dirPath, ".gsd"));
|
|
29
|
-
return gsdEntries.length <= 1 && gsdEntries.every(e => e === "doctor-history.jsonl");
|
|
30
|
-
}
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
14
|
export async function checkGitHealth(basePath, issues, fixesApplied, shouldFix, isolationMode = "none") {
|
|
38
15
|
// Degrade gracefully if not a git repo
|
|
39
16
|
if (!nativeIsRepo(basePath)) {
|
|
@@ -330,11 +307,6 @@ export async function checkGitHealth(basePath, issues, fixesApplied, shouldFix,
|
|
|
330
307
|
}
|
|
331
308
|
const normalizedFullPath = normalizePath(fullPath);
|
|
332
309
|
if (!registeredPaths.has(normalizedFullPath)) {
|
|
333
|
-
// Skip directories that only contain doctor artifacts (.gsd/doctor-history.jsonl).
|
|
334
|
-
// appendDoctorHistory() can recreate these dirs during the audit itself,
|
|
335
|
-
// causing a circular false positive (#3105 Bug 1).
|
|
336
|
-
if (isDoctorArtifactOnly(fullPath))
|
|
337
|
-
continue;
|
|
338
310
|
issues.push({
|
|
339
311
|
severity: "warning",
|
|
340
312
|
code: "worktree_directory_orphaned",
|
|
@@ -144,8 +144,7 @@ function resolveKey(providerId) {
|
|
|
144
144
|
*/
|
|
145
145
|
const PROVIDER_ROUTES = {
|
|
146
146
|
anthropic: ["github-copilot"],
|
|
147
|
-
openai: ["github-copilot"
|
|
148
|
-
google: ["google-gemini-cli"],
|
|
147
|
+
openai: ["github-copilot"],
|
|
149
148
|
};
|
|
150
149
|
function checkLlmProviders() {
|
|
151
150
|
const required = collectConfiguredModelProviders();
|
|
@@ -108,12 +108,11 @@ export async function checkRuntimeHealth(basePath, issues, fixesApplied, shouldF
|
|
|
108
108
|
const orphaned = [];
|
|
109
109
|
for (const key of keys) {
|
|
110
110
|
// Key format: "unitType/unitId" e.g. "execute-task/M001/S01/T01"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const parsed = splitCompletedKey(key);
|
|
114
|
-
if (!parsed)
|
|
111
|
+
const slashIdx = key.indexOf("/");
|
|
112
|
+
if (slashIdx === -1)
|
|
115
113
|
continue;
|
|
116
|
-
const
|
|
114
|
+
const unitType = key.slice(0, slashIdx);
|
|
115
|
+
const unitId = key.slice(slashIdx + 1);
|
|
117
116
|
// Only validate artifact-producing unit types
|
|
118
117
|
const { verifyExpectedArtifact } = await import("./auto-recovery.js");
|
|
119
118
|
if (!verifyExpectedArtifact(unitType, unitId, basePath)) {
|
|
@@ -689,10 +689,8 @@ export async function runGSDDoctor(basePath, options) {
|
|
|
689
689
|
allTasksDone = allTasksDone && task.done;
|
|
690
690
|
}
|
|
691
691
|
// Blocker-without-replan detection
|
|
692
|
-
// Skip when all tasks are done — the blocker was implicitly resolved
|
|
693
|
-
// within the task and the slice is not stuck (#3105 Bug 2).
|
|
694
692
|
const replanPath = resolveSliceFile(basePath, milestoneId, slice.id, "REPLAN");
|
|
695
|
-
if (!replanPath
|
|
693
|
+
if (!replanPath) {
|
|
696
694
|
for (const task of plan.tasks) {
|
|
697
695
|
if (!task.done)
|
|
698
696
|
continue;
|
|
@@ -24,7 +24,7 @@ const NETWORK_RE = /network|ECONNRESET|ETIMEDOUT|ECONNREFUSED|socket hang up|fet
|
|
|
24
24
|
const SERVER_RE = /internal server error|500|502|503|overloaded|server_error|api_error|service.?unavailable/i;
|
|
25
25
|
// ECONNRESET/ECONNREFUSED are in NETWORK_RE (same-model retry first).
|
|
26
26
|
const CONNECTION_RE = /terminated|connection.?refused|other side closed|EPIPE|network.?(?:is\s+)?unavailable|stream_exhausted(?:_without_result)?/i;
|
|
27
|
-
const STREAM_RE = /Unexpected end of JSON|Unexpected token.*JSON|Expected
|
|
27
|
+
const STREAM_RE = /Unexpected end of JSON|Unexpected token.*JSON|Expected double-quoted property name|SyntaxError.*JSON/i;
|
|
28
28
|
const RESET_DELAY_RE = /reset in (\d+)s/i;
|
|
29
29
|
/**
|
|
30
30
|
* Classify an error message into one of the ErrorClass kinds.
|
|
@@ -33,9 +33,9 @@ const RESET_DELAY_RE = /reset in (\d+)s/i;
|
|
|
33
33
|
* 1. Permanent (auth/billing/quota) — unless also rate-limited
|
|
34
34
|
* 2. Rate limit (429, rate.?limit, too many requests)
|
|
35
35
|
* 3. Network (ECONNRESET, ETIMEDOUT, socket hang up, fetch failed, dns)
|
|
36
|
-
* 4.
|
|
37
|
-
* 5.
|
|
38
|
-
* 6.
|
|
36
|
+
* 4. Server (500/502/503, overloaded, server_error)
|
|
37
|
+
* 5. Connection (terminated, ECONNREFUSED, EPIPE, other side closed)
|
|
38
|
+
* 6. Stream truncation (malformed JSON from mid-stream cut)
|
|
39
39
|
* 7. Unknown
|
|
40
40
|
*/
|
|
41
41
|
export function classifyError(errorMsg, retryAfterMs) {
|
|
@@ -61,21 +61,18 @@ export function classifyError(errorMsg, retryAfterMs) {
|
|
|
61
61
|
// "billing" appearing alongside "network").
|
|
62
62
|
return { kind: "network", retryAfterMs: retryAfterMs ?? 3_000 };
|
|
63
63
|
}
|
|
64
|
-
// 4.
|
|
65
|
-
// Checked before server/connection because JSON parse errors can contain
|
|
66
|
-
// substrings like "position 500" (matches SERVER_RE) or "Unterminated"
|
|
67
|
-
// (matches CONNECTION_RE's "terminated" pattern).
|
|
68
|
-
if (STREAM_RE.test(errorMsg)) {
|
|
69
|
-
return { kind: "stream", retryAfterMs: retryAfterMs ?? 15_000 };
|
|
70
|
-
}
|
|
71
|
-
// 5. Server errors — try fallback model
|
|
64
|
+
// 4. Server errors — try fallback model
|
|
72
65
|
if (SERVER_RE.test(errorMsg)) {
|
|
73
66
|
return { kind: "server", retryAfterMs: retryAfterMs ?? 30_000 };
|
|
74
67
|
}
|
|
75
|
-
//
|
|
68
|
+
// 5. Connection errors — try fallback model
|
|
76
69
|
if (CONNECTION_RE.test(errorMsg)) {
|
|
77
70
|
return { kind: "connection", retryAfterMs: retryAfterMs ?? 15_000 };
|
|
78
71
|
}
|
|
72
|
+
// 6. Stream truncation — downstream symptom of connection drop
|
|
73
|
+
if (STREAM_RE.test(errorMsg)) {
|
|
74
|
+
return { kind: "stream", retryAfterMs: retryAfterMs ?? 15_000 };
|
|
75
|
+
}
|
|
79
76
|
// 7. Unknown
|
|
80
77
|
return { kind: "unknown" };
|
|
81
78
|
}
|
|
@@ -12,22 +12,7 @@
|
|
|
12
12
|
"gsd_requirement_update", "gsd_milestone_generate_id"
|
|
13
13
|
],
|
|
14
14
|
"commands": ["gsd", "kill", "worktree", "exit"],
|
|
15
|
-
"hooks": [
|
|
16
|
-
"session_start",
|
|
17
|
-
"session_switch",
|
|
18
|
-
"bash_transform",
|
|
19
|
-
"session_fork",
|
|
20
|
-
"before_agent_start",
|
|
21
|
-
"agent_end",
|
|
22
|
-
"session_before_compact",
|
|
23
|
-
"session_shutdown",
|
|
24
|
-
"tool_call",
|
|
25
|
-
"tool_result",
|
|
26
|
-
"tool_execution_start",
|
|
27
|
-
"tool_execution_end",
|
|
28
|
-
"model_select",
|
|
29
|
-
"before_provider_request"
|
|
30
|
-
],
|
|
15
|
+
"hooks": ["session_start", "session_switch"],
|
|
31
16
|
"shortcuts": ["Ctrl+Alt+G"]
|
|
32
17
|
}
|
|
33
18
|
}
|
|
@@ -22,8 +22,6 @@ import { deriveState } from "./state.js";
|
|
|
22
22
|
import { isAutoActive } from "./auto.js";
|
|
23
23
|
import { loadPrompt } from "./prompt-loader.js";
|
|
24
24
|
import { gsdRoot } from "./paths.js";
|
|
25
|
-
import { isDbAvailable, getAllMilestones, getMilestoneSlices, getSliceTasks } from "./gsd-db.js";
|
|
26
|
-
import { isClosedStatus } from "./status-guards.js";
|
|
27
25
|
import { formatDuration } from "../shared/format-utils.js";
|
|
28
26
|
import { getAutoWorktreePath } from "./auto-worktree.js";
|
|
29
27
|
import { loadEffectiveGSDPreferences, loadGlobalGSDPreferences, getGlobalGSDPreferencesPath } from "./preferences.js";
|
|
@@ -31,15 +29,13 @@ import { showNextAction } from "../shared/tui.js";
|
|
|
31
29
|
import { ensurePreferencesFile, serializePreferencesToFrontmatter } from "./commands-prefs-wizard.js";
|
|
32
30
|
// ─── Duplicate Detection ──────────────────────────────────────────────────────
|
|
33
31
|
const DEDUP_PROMPT_SECTION = `
|
|
34
|
-
##
|
|
32
|
+
## Duplicate Detection (REQUIRED before issue creation)
|
|
35
33
|
|
|
36
|
-
Before
|
|
34
|
+
Before offering to create a GitHub issue, you MUST search for existing issues and PRs that may already address this bug. This step uses the user's AI tokens for analysis.
|
|
37
35
|
|
|
38
36
|
### Search Steps
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
1. **Search closed issues** for similar keywords:
|
|
38
|
+
1. **Search closed issues** for similar keywords from your diagnosis:
|
|
43
39
|
\`\`\`
|
|
44
40
|
gh issue list --repo gsd-build/gsd-2 --state closed --search "<keywords from root cause>" --limit 20
|
|
45
41
|
\`\`\`
|
|
@@ -56,16 +52,20 @@ Use keywords from the user's problem description and the anomaly summaries in th
|
|
|
56
52
|
|
|
57
53
|
### Analysis
|
|
58
54
|
|
|
59
|
-
For each result, compare it against
|
|
55
|
+
For each result, compare it against your root-cause diagnosis:
|
|
60
56
|
- Does the issue describe the same code path or file?
|
|
61
|
-
- Does the PR modify the
|
|
57
|
+
- Does the PR modify the same file:line you identified?
|
|
62
58
|
- Is the symptom description semantically similar even if keywords differ?
|
|
63
59
|
|
|
64
|
-
###
|
|
60
|
+
### Present Findings
|
|
61
|
+
|
|
62
|
+
If you find potential matches, present them to the user:
|
|
63
|
+
|
|
64
|
+
1. **"Already fixed by PR #X — skip issue creation"** — when a merged PR or closed issue clearly addresses the same root cause. Explain why you believe it matches.
|
|
65
|
+
2. **"Add my findings to existing issue #Y"** — when an open issue exists for the same bug. Use \`gh issue comment #Y --repo gsd-build/gsd-2\` to add forensic evidence.
|
|
66
|
+
3. **"Create new issue anyway"** — when existing results do not cover this specific failure.
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
- **Open issue matches** → Report "Existing issue #Y covers this." Offer to add forensic evidence. Skip full investigation unless user asks for deeper analysis.
|
|
68
|
-
- **No matches** → Proceed to full investigation below.
|
|
68
|
+
Only proceed to issue creation if no matches were found OR the user explicitly chooses "Create new issue anyway".
|
|
69
69
|
`;
|
|
70
70
|
async function writeForensicsDedupPref(ctx, enabled) {
|
|
71
71
|
const prefsPath = getGlobalGSDPreferencesPath();
|
|
@@ -148,8 +148,6 @@ export async function handleForensics(args, ctx, pi) {
|
|
|
148
148
|
});
|
|
149
149
|
ctx.ui.notify(`Forensic report saved: ${relative(basePath, savedPath)}`, "info");
|
|
150
150
|
pi.sendMessage({ customType: "gsd-forensics", content, display: false }, { triggerTurn: true });
|
|
151
|
-
// Persist forensics context so follow-up turns can re-inject it (#2941)
|
|
152
|
-
writeForensicsMarker(basePath, savedPath, content);
|
|
153
151
|
}
|
|
154
152
|
// ─── Report Builder ───────────────────────────────────────────────────────────
|
|
155
153
|
export async function buildForensicReport(basePath) {
|
|
@@ -169,9 +167,8 @@ export async function buildForensicReport(basePath) {
|
|
|
169
167
|
const unitTraces = scanActivityLogs(basePath, activeMilestone);
|
|
170
168
|
// 3. Load metrics
|
|
171
169
|
const metrics = loadLedgerFromDisk(basePath);
|
|
172
|
-
// 4. Load completed keys
|
|
170
|
+
// 4. Load completed keys
|
|
173
171
|
const completedKeys = loadCompletedKeys(basePath);
|
|
174
|
-
const dbCompletionCounts = getDbCompletionCounts();
|
|
175
172
|
// 5. Check crash lock
|
|
176
173
|
const crashLock = readCrashLock(basePath);
|
|
177
174
|
// 6. Run doctor
|
|
@@ -225,7 +222,6 @@ export async function buildForensicReport(basePath) {
|
|
|
225
222
|
unitTraces,
|
|
226
223
|
metrics,
|
|
227
224
|
completedKeys,
|
|
228
|
-
dbCompletionCounts,
|
|
229
225
|
crashLock,
|
|
230
226
|
doctorIssues,
|
|
231
227
|
anomalies,
|
|
@@ -462,41 +458,6 @@ function loadCompletedKeys(basePath) {
|
|
|
462
458
|
catch { /* non-fatal */ }
|
|
463
459
|
return [];
|
|
464
460
|
}
|
|
465
|
-
// ─── DB Completion Counts ────────────────────────────────────────────────────
|
|
466
|
-
function getDbCompletionCounts() {
|
|
467
|
-
if (!isDbAvailable())
|
|
468
|
-
return null;
|
|
469
|
-
const milestones = getAllMilestones();
|
|
470
|
-
let completedMilestones = 0;
|
|
471
|
-
let totalSlices = 0;
|
|
472
|
-
let completedSlices = 0;
|
|
473
|
-
let totalTasks = 0;
|
|
474
|
-
let completedTasks = 0;
|
|
475
|
-
for (const m of milestones) {
|
|
476
|
-
if (isClosedStatus(m.status))
|
|
477
|
-
completedMilestones++;
|
|
478
|
-
const slices = getMilestoneSlices(m.id);
|
|
479
|
-
for (const s of slices) {
|
|
480
|
-
totalSlices++;
|
|
481
|
-
if (isClosedStatus(s.status))
|
|
482
|
-
completedSlices++;
|
|
483
|
-
const tasks = getSliceTasks(m.id, s.id);
|
|
484
|
-
for (const t of tasks) {
|
|
485
|
-
totalTasks++;
|
|
486
|
-
if (isClosedStatus(t.status))
|
|
487
|
-
completedTasks++;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
return {
|
|
492
|
-
milestones: completedMilestones,
|
|
493
|
-
milestonesTotal: milestones.length,
|
|
494
|
-
slices: completedSlices,
|
|
495
|
-
slicesTotal: totalSlices,
|
|
496
|
-
tasks: completedTasks,
|
|
497
|
-
tasksTotal: totalTasks,
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
461
|
// ─── Anomaly Detectors ───────────────────────────────────────────────────────
|
|
501
462
|
function detectStuckLoops(units, anomalies) {
|
|
502
463
|
const counts = new Map();
|
|
@@ -554,42 +515,15 @@ function detectTimeouts(traces, anomalies) {
|
|
|
554
515
|
}
|
|
555
516
|
}
|
|
556
517
|
}
|
|
557
|
-
/**
|
|
558
|
-
* Parse a completed-unit key into its unitType and unitId.
|
|
559
|
-
*
|
|
560
|
-
* Hook units use a compound slash-delimited type ("hook/<hookName>"), so a
|
|
561
|
-
* naive `key.indexOf("/")` would split "hook/telegram-progress/M007/S01" into
|
|
562
|
-
* unitType="hook" (wrong) instead of "hook/telegram-progress".
|
|
563
|
-
*
|
|
564
|
-
* Returns `null` for malformed keys that cannot be split.
|
|
565
|
-
*/
|
|
566
|
-
export function splitCompletedKey(key) {
|
|
567
|
-
if (key.startsWith("hook/")) {
|
|
568
|
-
// Hook unit types are two segments: "hook/<hookName>/<unitId...>"
|
|
569
|
-
const secondSlash = key.indexOf("/", 5); // skip past "hook/"
|
|
570
|
-
if (secondSlash === -1)
|
|
571
|
-
return null; // malformed — no unitId after hook name
|
|
572
|
-
return {
|
|
573
|
-
unitType: key.slice(0, secondSlash),
|
|
574
|
-
unitId: key.slice(secondSlash + 1),
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
const slashIdx = key.indexOf("/");
|
|
578
|
-
if (slashIdx === -1)
|
|
579
|
-
return null;
|
|
580
|
-
return {
|
|
581
|
-
unitType: key.slice(0, slashIdx),
|
|
582
|
-
unitId: key.slice(slashIdx + 1),
|
|
583
|
-
};
|
|
584
|
-
}
|
|
585
518
|
function detectMissingArtifacts(completedKeys, basePath, activeMilestone, anomalies) {
|
|
586
519
|
// Also check the worktree path for artifacts — they may exist there but not at root
|
|
587
520
|
const wtBasePath = activeMilestone ? getAutoWorktreePath(basePath, activeMilestone) : null;
|
|
588
521
|
for (const key of completedKeys) {
|
|
589
|
-
const
|
|
590
|
-
if (
|
|
522
|
+
const slashIdx = key.indexOf("/");
|
|
523
|
+
if (slashIdx === -1)
|
|
591
524
|
continue;
|
|
592
|
-
const
|
|
525
|
+
const unitType = key.slice(0, slashIdx);
|
|
526
|
+
const unitId = key.slice(slashIdx + 1);
|
|
593
527
|
const rootHasArtifact = verifyExpectedArtifact(unitType, unitId, basePath);
|
|
594
528
|
const wtHasArtifact = wtBasePath ? verifyExpectedArtifact(unitType, unitId, wtBasePath) : false;
|
|
595
529
|
if (!rootHasArtifact && !wtHasArtifact) {
|
|
@@ -815,34 +749,6 @@ function saveForensicReport(basePath, report, problemDescription) {
|
|
|
815
749
|
writeFileSync(filePath, sections.join("\n"), "utf-8");
|
|
816
750
|
return filePath;
|
|
817
751
|
}
|
|
818
|
-
/**
|
|
819
|
-
* Write a marker file so that buildBeforeAgentStartResult() can re-inject
|
|
820
|
-
* the forensics prompt on follow-up turns. (#2941)
|
|
821
|
-
*/
|
|
822
|
-
export function writeForensicsMarker(basePath, reportPath, promptContent) {
|
|
823
|
-
const dir = join(gsdRoot(basePath), "runtime");
|
|
824
|
-
mkdirSync(dir, { recursive: true });
|
|
825
|
-
const marker = {
|
|
826
|
-
reportPath,
|
|
827
|
-
promptContent,
|
|
828
|
-
createdAt: new Date().toISOString(),
|
|
829
|
-
};
|
|
830
|
-
writeFileSync(join(dir, "active-forensics.json"), JSON.stringify(marker), "utf-8");
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* Read the active forensics marker, or null if none exists.
|
|
834
|
-
*/
|
|
835
|
-
export function readForensicsMarker(basePath) {
|
|
836
|
-
const markerPath = join(gsdRoot(basePath), "runtime", "active-forensics.json");
|
|
837
|
-
if (!existsSync(markerPath))
|
|
838
|
-
return null;
|
|
839
|
-
try {
|
|
840
|
-
return JSON.parse(readFileSync(markerPath, "utf-8"));
|
|
841
|
-
}
|
|
842
|
-
catch {
|
|
843
|
-
return null;
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
752
|
// ─── Prompt Formatter ─────────────────────────────────────────────────────────
|
|
847
753
|
function formatReportForPrompt(report) {
|
|
848
754
|
const MAX_BYTES = 30 * 1024;
|
|
@@ -950,17 +856,8 @@ function formatReportForPrompt(report) {
|
|
|
950
856
|
}
|
|
951
857
|
sections.push("");
|
|
952
858
|
}
|
|
953
|
-
//
|
|
954
|
-
|
|
955
|
-
const c = report.dbCompletionCounts;
|
|
956
|
-
sections.push(`### Completion Status (from DB)`);
|
|
957
|
-
sections.push(`- ${c.milestones}/${c.milestonesTotal} milestones complete`);
|
|
958
|
-
sections.push(`- ${c.slices}/${c.slicesTotal} slices complete`);
|
|
959
|
-
sections.push(`- ${c.tasks}/${c.tasksTotal} tasks complete`);
|
|
960
|
-
}
|
|
961
|
-
else {
|
|
962
|
-
sections.push(`### Completed Keys: ${report.completedKeys.length}`);
|
|
963
|
-
}
|
|
859
|
+
// Completed keys count
|
|
860
|
+
sections.push(`### Completed Keys: ${report.completedKeys.length}`);
|
|
964
861
|
sections.push(`### GSD Version: ${report.gsdVersion}`);
|
|
965
862
|
sections.push(`### Active Milestone: ${report.activeMilestone ?? "none"}`);
|
|
966
863
|
sections.push(`### Active Slice: ${report.activeSlice ?? "none"}`);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* paths, commit type inference, and the runGit shell helper.
|
|
9
9
|
*/
|
|
10
10
|
import { execFileSync, execSync } from "node:child_process";
|
|
11
|
-
import { existsSync, mkdirSync, readFileSync,
|
|
11
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { join } from "node:path";
|
|
13
13
|
import { gsdRoot } from "./paths.js";
|
|
14
14
|
import { GIT_NO_PROMPT_ENV } from "./git-constants.js";
|
|
@@ -348,28 +348,6 @@ export class GitServiceImpl {
|
|
|
348
348
|
// If .gsd/ IS in .gitignore (the default for external state projects),
|
|
349
349
|
// git add -A already skips it and the exclusions are harmless no-ops.
|
|
350
350
|
const allExclusions = [...RUNTIME_EXCLUSION_PATHS, ...extraExclusions];
|
|
351
|
-
// ── Parallel worker milestone scope (#1991) ──
|
|
352
|
-
// When GSD_MILESTONE_LOCK is set, this process is a parallel worker that
|
|
353
|
-
// must only commit files belonging to its own milestone. Exclude all other
|
|
354
|
-
// milestone directories from staging to prevent cross-milestone pollution
|
|
355
|
-
// (e.g., an M033 worker fabricating M032 artifacts in the same commit).
|
|
356
|
-
const milestoneLock = process.env.GSD_MILESTONE_LOCK;
|
|
357
|
-
if (milestoneLock) {
|
|
358
|
-
const msDir = join(gsdRoot(this.basePath), "milestones");
|
|
359
|
-
if (existsSync(msDir)) {
|
|
360
|
-
try {
|
|
361
|
-
const entries = readdirSync(msDir, { withFileTypes: true });
|
|
362
|
-
for (const entry of entries) {
|
|
363
|
-
if (entry.isDirectory() && entry.name !== milestoneLock) {
|
|
364
|
-
allExclusions.push(`.gsd/milestones/${entry.name}/`);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
catch {
|
|
369
|
-
// Best-effort — if we can't read the milestones dir, proceed without scoping
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
351
|
nativeAddAllWithExclusions(this.basePath, allExclusions);
|
|
374
352
|
}
|
|
375
353
|
/** Tracks whether runtime file cleanup has run this session. */
|
|
@@ -38,7 +38,6 @@ const GSD_RUNTIME_PATTERNS = [
|
|
|
38
38
|
const BASELINE_PATTERNS = [
|
|
39
39
|
// ── GSD state directory (symlink to external storage) ──
|
|
40
40
|
".gsd",
|
|
41
|
-
".gsd-id",
|
|
42
41
|
// ── OS junk ──
|
|
43
42
|
".DS_Store",
|
|
44
43
|
"Thumbs.db",
|
|
@@ -73,38 +72,6 @@ const BASELINE_PATTERNS = [
|
|
|
73
72
|
".cache/",
|
|
74
73
|
"tmp/",
|
|
75
74
|
];
|
|
76
|
-
/**
|
|
77
|
-
* Check whether `.gsd` is covered by the project's `.gitignore`.
|
|
78
|
-
*
|
|
79
|
-
* Uses `git check-ignore` for accurate evaluation — this respects nested
|
|
80
|
-
* .gitignore files, global gitignore, and negation patterns. Returns true
|
|
81
|
-
* only when git would actually ignore `.gsd/`.
|
|
82
|
-
*
|
|
83
|
-
* Returns false (not ignored) if:
|
|
84
|
-
* - No `.gitignore` exists
|
|
85
|
-
* - `.gsd` is not listed in any active ignore rule
|
|
86
|
-
* - Not a git repo or git is unavailable
|
|
87
|
-
*/
|
|
88
|
-
export function isGsdGitignored(basePath) {
|
|
89
|
-
// Check both `.gsd` and `.gsd/` because `.gsd/` in .gitignore (trailing
|
|
90
|
-
// slash = directory-only pattern) only matches the directory form. Using
|
|
91
|
-
// both paths covers all gitignore pattern variants.
|
|
92
|
-
for (const path of [".gsd", ".gsd/"]) {
|
|
93
|
-
try {
|
|
94
|
-
// git check-ignore exits 0 when the path IS ignored, 1 when it is NOT.
|
|
95
|
-
execFileSync("git", ["check-ignore", "-q", path], {
|
|
96
|
-
cwd: basePath,
|
|
97
|
-
stdio: "pipe",
|
|
98
|
-
env: GIT_NO_PROMPT_ENV,
|
|
99
|
-
});
|
|
100
|
-
return true; // exit 0 → .gsd is ignored
|
|
101
|
-
}
|
|
102
|
-
catch {
|
|
103
|
-
// exit 1 → this form is NOT ignored, try the other
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return false; // neither form is ignored (or git unavailable)
|
|
107
|
-
}
|
|
108
75
|
/**
|
|
109
76
|
* Check whether `.gsd/` contains files tracked by git.
|
|
110
77
|
* If so, the project intentionally keeps `.gsd/` in version control
|