gsd-pi 2.41.0 → 2.42.0-dev.1df898f
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 +92 -29
- package/dist/cli-web-branch.d.ts +6 -0
- package/dist/cli-web-branch.js +17 -0
- package/dist/cli.js +18 -3
- package/dist/loader.js +3 -1
- package/dist/onboarding.js +2 -1
- package/dist/resource-loader.js +39 -6
- package/dist/resources/extensions/async-jobs/async-bash-tool.js +52 -4
- package/dist/resources/extensions/async-jobs/await-tool.js +5 -0
- package/dist/resources/extensions/async-jobs/index.js +2 -0
- package/dist/resources/extensions/gsd/auto/loop.js +89 -1
- package/dist/resources/extensions/gsd/auto/phases.js +29 -13
- package/dist/resources/extensions/gsd/auto/session.js +6 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +8 -2
- package/dist/resources/extensions/gsd/auto-dispatch.js +19 -2
- package/dist/resources/extensions/gsd/auto-post-unit.js +7 -0
- package/dist/resources/extensions/gsd/auto-prompts.js +3 -16
- package/dist/resources/extensions/gsd/auto-recovery.js +12 -4
- package/dist/resources/extensions/gsd/auto-start.js +16 -14
- package/dist/resources/extensions/gsd/auto-worktree.js +147 -13
- package/dist/resources/extensions/gsd/auto.js +64 -2
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +199 -164
- package/dist/resources/extensions/gsd/bootstrap/journal-tools.js +62 -0
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +2 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +25 -3
- package/dist/resources/extensions/gsd/bootstrap/tool-call-loop-guard.js +7 -2
- package/dist/resources/extensions/gsd/commands/catalog.js +40 -1
- package/dist/resources/extensions/gsd/commands/handlers/core.js +1 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +5 -0
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +146 -0
- package/dist/resources/extensions/gsd/context-injector.js +74 -0
- package/dist/resources/extensions/gsd/context-store.js +4 -3
- package/dist/resources/extensions/gsd/custom-execution-policy.js +47 -0
- package/dist/resources/extensions/gsd/custom-verification.js +145 -0
- package/dist/resources/extensions/gsd/custom-workflow-engine.js +164 -0
- package/dist/resources/extensions/gsd/dashboard-overlay.js +1 -0
- package/dist/resources/extensions/gsd/db-writer.js +5 -2
- package/dist/resources/extensions/gsd/definition-loader.js +352 -0
- package/dist/resources/extensions/gsd/detection.js +20 -1
- package/dist/resources/extensions/gsd/dev-execution-policy.js +24 -0
- package/dist/resources/extensions/gsd/dev-workflow-engine.js +82 -0
- package/dist/resources/extensions/gsd/doctor-checks.js +31 -1
- package/dist/resources/extensions/gsd/doctor-providers.js +10 -0
- package/dist/resources/extensions/gsd/doctor.js +11 -1
- package/dist/resources/extensions/gsd/engine-resolver.js +40 -0
- package/dist/resources/extensions/gsd/engine-types.js +8 -0
- package/dist/resources/extensions/gsd/execution-policy.js +8 -0
- package/dist/resources/extensions/gsd/exit-command.js +12 -2
- package/dist/resources/extensions/gsd/export.js +9 -13
- package/dist/resources/extensions/gsd/extension-manifest.json +2 -2
- package/dist/resources/extensions/gsd/files.js +28 -11
- package/dist/resources/extensions/gsd/forensics.js +94 -3
- package/dist/resources/extensions/gsd/git-constants.js +1 -0
- package/dist/resources/extensions/gsd/git-service.js +6 -2
- package/dist/resources/extensions/gsd/graph.js +225 -0
- package/dist/resources/extensions/gsd/gsd-db.js +25 -8
- package/dist/resources/extensions/gsd/guided-flow-queue.js +1 -1
- package/dist/resources/extensions/gsd/guided-flow.js +7 -3
- package/dist/resources/extensions/gsd/journal.js +85 -0
- package/dist/resources/extensions/gsd/md-importer.js +5 -0
- package/dist/resources/extensions/gsd/milestone-ids.js +1 -1
- package/dist/resources/extensions/gsd/native-git-bridge.js +3 -2
- package/dist/resources/extensions/gsd/post-unit-hooks.js +24 -412
- package/dist/resources/extensions/gsd/preferences-types.js +2 -0
- package/dist/resources/extensions/gsd/preferences.js +60 -8
- package/dist/resources/extensions/gsd/prompt-loader.js +34 -4
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +11 -10
- package/dist/resources/extensions/gsd/prompts/discuss-headless.md +2 -2
- package/dist/resources/extensions/gsd/prompts/discuss.md +1 -1
- package/dist/resources/extensions/gsd/prompts/forensics.md +12 -5
- package/dist/resources/extensions/gsd/prompts/queue.md +1 -1
- package/dist/resources/extensions/gsd/repo-identity.js +92 -7
- package/dist/resources/extensions/gsd/rule-registry.js +489 -0
- package/dist/resources/extensions/gsd/rule-types.js +6 -0
- package/dist/resources/extensions/gsd/run-manager.js +134 -0
- package/dist/resources/extensions/gsd/service-tier.js +147 -0
- package/dist/resources/extensions/gsd/session-lock.js +2 -2
- package/dist/resources/extensions/gsd/structured-data-formatter.js +2 -1
- package/dist/resources/extensions/gsd/templates/decisions.md +2 -2
- package/dist/resources/extensions/gsd/workflow-engine.js +7 -0
- package/dist/resources/extensions/gsd/workflow-templates.js +13 -1
- package/dist/resources/extensions/gsd/worktree-manager.js +20 -6
- package/dist/resources/extensions/gsd/worktree-resolver.js +21 -4
- package/dist/resources/extensions/gsd/worktree.js +2 -2
- package/dist/resources/extensions/mcp-client/index.js +2 -1
- package/dist/resources/extensions/search-the-web/tool-search.js +3 -3
- package/dist/resources/extensions/subagent/index.js +7 -3
- package/dist/resources/extensions/voice/index.js +4 -4
- package/dist/resources/skills/create-workflow/SKILL.md +103 -0
- package/dist/resources/skills/create-workflow/references/feature-patterns.md +128 -0
- package/dist/resources/skills/create-workflow/references/verification-policies.md +76 -0
- package/dist/resources/skills/create-workflow/references/yaml-schema-v1.md +46 -0
- package/dist/resources/skills/create-workflow/templates/blog-post-pipeline.yaml +60 -0
- package/dist/resources/skills/create-workflow/templates/code-audit.yaml +60 -0
- package/dist/resources/skills/create-workflow/templates/release-checklist.yaml +66 -0
- package/dist/resources/skills/create-workflow/templates/workflow-definition.yaml +32 -0
- package/dist/resources/skills/create-workflow/workflows/create-from-scratch.md +104 -0
- package/dist/resources/skills/create-workflow/workflows/create-from-template.md +72 -0
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +9 -9
- package/dist/web/standalone/.next/build-manifest.json +4 -4
- 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 +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
- 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.js +2 -2
- 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 +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- 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/api/boot/route.js +1 -1
- 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.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.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.js +2 -2
- 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.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.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/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.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.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.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.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.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.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.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.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.js +5 -5
- 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.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.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.js +2 -2
- 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.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.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.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/terminal/input/route.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.js +2 -2
- 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.js +2 -2
- 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.js +4 -4
- 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.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 +4 -4
- 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 +4 -4
- 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 +3 -3
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/page.js +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 +9 -9
- package/dist/web/standalone/.next/server/chunks/229.js +3 -3
- package/dist/web/standalone/.next/server/chunks/471.js +3 -3
- 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 +2 -2
- package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.json +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/4024.c195dc1fdd2adbea.js +9 -0
- package/dist/web/standalone/.next/static/chunks/app/_not-found/page-f2a7482d42a5614b.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/layout-a16c7a7ecdf0c2cf.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/page-b9367c5ae13b99c6.js +1 -0
- package/dist/web/standalone/.next/static/chunks/{main-app-2f2ee7b85712c2bd.js → main-app-fdab67f7802d7832.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
- package/dist/web/standalone/.next/static/chunks/{webpack-9afaaebf6042a1d7.js → webpack-fa307370fcf9fb2c.js} +1 -1
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
- package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
- package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
- package/dist/web/standalone/server.js +1 -1
- package/dist/web-mode.d.ts +4 -0
- package/dist/web-mode.js +69 -11
- package/package.json +1 -1
- package/packages/native/src/__tests__/text.test.mjs +33 -0
- package/packages/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/agent.js +2 -0
- package/packages/pi-agent-core/dist/agent.js.map +1 -1
- package/packages/pi-agent-core/dist/types.d.ts +6 -0
- package/packages/pi-agent-core/dist/types.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/types.js.map +1 -1
- package/packages/pi-agent-core/src/agent.test.ts +53 -0
- package/packages/pi-agent-core/src/agent.ts +3 -0
- package/packages/pi-agent-core/src/types.ts +6 -0
- package/packages/pi-agent-core/tsconfig.json +1 -1
- package/packages/pi-ai/dist/models.d.ts +5 -3
- package/packages/pi-ai/dist/models.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +801 -1468
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +1135 -1588
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/dist/models.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js +60 -2
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/packages/pi-ai/scripts/generate-models.ts +1543 -0
- package/packages/pi-ai/src/models.generated.ts +1140 -1593
- package/packages/pi-ai/src/models.ts +7 -4
- package/packages/pi-ai/src/utils/oauth/github-copilot.ts +74 -2
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +8 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +7 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +29 -2
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +60 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/discovery-cache.test.js +3 -1
- package/packages/pi-coding-agent/dist/core/discovery-cache.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +18 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/client.js +23 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +2 -0
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/package-manager.d.ts +6 -0
- package/packages/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/package-manager.js +63 -11
- package/packages/pi-coding-agent/dist/core/package-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts +9 -0
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js +20 -6
- package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +6 -5
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +3 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +9 -6
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +10 -7
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
- 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 +34 -10
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session.ts +7 -1
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +68 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +30 -2
- package/packages/pi-coding-agent/src/core/discovery-cache.test.ts +4 -2
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +18 -0
- package/packages/pi-coding-agent/src/core/lsp/client.ts +29 -0
- package/packages/pi-coding-agent/src/core/model-registry.ts +3 -0
- package/packages/pi-coding-agent/src/core/package-manager.ts +99 -58
- package/packages/pi-coding-agent/src/core/resource-loader.ts +24 -6
- package/packages/pi-coding-agent/src/core/system-prompt.ts +6 -5
- package/packages/pi-coding-agent/src/modes/interactive/components/extension-editor.ts +3 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +10 -6
- package/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts +11 -7
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +36 -11
- package/pkg/package.json +1 -1
- package/src/resources/extensions/async-jobs/async-bash-timeout.test.ts +122 -0
- package/src/resources/extensions/async-jobs/async-bash-tool.ts +40 -4
- package/src/resources/extensions/async-jobs/await-tool.test.ts +47 -0
- package/src/resources/extensions/async-jobs/await-tool.ts +5 -0
- package/src/resources/extensions/async-jobs/index.ts +1 -0
- package/src/resources/extensions/async-jobs/job-manager.ts +2 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +5 -2
- package/src/resources/extensions/gsd/auto/loop.ts +101 -1
- package/src/resources/extensions/gsd/auto/phases.ts +31 -13
- package/src/resources/extensions/gsd/auto/session.ts +6 -0
- package/src/resources/extensions/gsd/auto/types.ts +4 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +9 -2
- package/src/resources/extensions/gsd/auto-dispatch.ts +25 -5
- package/src/resources/extensions/gsd/auto-post-unit.ts +8 -0
- package/src/resources/extensions/gsd/auto-prompts.ts +2 -18
- package/src/resources/extensions/gsd/auto-recovery.ts +12 -4
- package/src/resources/extensions/gsd/auto-start.ts +15 -13
- package/src/resources/extensions/gsd/auto-worktree.ts +162 -18
- package/src/resources/extensions/gsd/auto.ts +71 -2
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +209 -162
- package/src/resources/extensions/gsd/bootstrap/journal-tools.ts +62 -0
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +2 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +25 -4
- package/src/resources/extensions/gsd/bootstrap/tool-call-loop-guard.ts +9 -2
- package/src/resources/extensions/gsd/commands/catalog.ts +40 -1
- package/src/resources/extensions/gsd/commands/handlers/core.ts +1 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +5 -0
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +164 -0
- package/src/resources/extensions/gsd/context-injector.ts +100 -0
- package/src/resources/extensions/gsd/context-store.ts +4 -3
- package/src/resources/extensions/gsd/custom-execution-policy.ts +73 -0
- package/src/resources/extensions/gsd/custom-verification.ts +180 -0
- package/src/resources/extensions/gsd/custom-workflow-engine.ts +216 -0
- package/src/resources/extensions/gsd/dashboard-overlay.ts +1 -0
- package/src/resources/extensions/gsd/db-writer.ts +6 -2
- package/src/resources/extensions/gsd/definition-loader.ts +462 -0
- package/src/resources/extensions/gsd/detection.ts +20 -1
- package/src/resources/extensions/gsd/dev-execution-policy.ts +51 -0
- package/src/resources/extensions/gsd/dev-workflow-engine.ts +110 -0
- package/src/resources/extensions/gsd/doctor-checks.ts +32 -1
- package/src/resources/extensions/gsd/doctor-providers.ts +13 -0
- package/src/resources/extensions/gsd/doctor-types.ts +1 -0
- package/src/resources/extensions/gsd/doctor.ts +12 -1
- package/src/resources/extensions/gsd/engine-resolver.ts +57 -0
- package/src/resources/extensions/gsd/engine-types.ts +71 -0
- package/src/resources/extensions/gsd/execution-policy.ts +43 -0
- package/src/resources/extensions/gsd/exit-command.ts +14 -2
- package/src/resources/extensions/gsd/export.ts +8 -15
- package/src/resources/extensions/gsd/extension-manifest.json +2 -2
- package/src/resources/extensions/gsd/files.ts +29 -12
- package/src/resources/extensions/gsd/forensics.ts +101 -3
- package/src/resources/extensions/gsd/git-constants.ts +1 -0
- package/src/resources/extensions/gsd/git-service.ts +5 -5
- package/src/resources/extensions/gsd/gitignore.ts +1 -1
- package/src/resources/extensions/gsd/graph.ts +312 -0
- package/src/resources/extensions/gsd/gsd-db.ts +37 -8
- package/src/resources/extensions/gsd/guided-flow-queue.ts +1 -1
- package/src/resources/extensions/gsd/guided-flow.ts +7 -3
- package/src/resources/extensions/gsd/journal.ts +134 -0
- package/src/resources/extensions/gsd/md-importer.ts +6 -0
- package/src/resources/extensions/gsd/milestone-ids.ts +1 -1
- package/src/resources/extensions/gsd/native-git-bridge.ts +3 -2
- package/src/resources/extensions/gsd/post-unit-hooks.ts +24 -462
- package/src/resources/extensions/gsd/preferences-types.ts +6 -0
- package/src/resources/extensions/gsd/preferences.ts +63 -6
- package/src/resources/extensions/gsd/prompt-loader.ts +35 -4
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +11 -10
- package/src/resources/extensions/gsd/prompts/discuss-headless.md +2 -2
- package/src/resources/extensions/gsd/prompts/discuss.md +1 -1
- package/src/resources/extensions/gsd/prompts/forensics.md +12 -5
- package/src/resources/extensions/gsd/prompts/queue.md +1 -1
- package/src/resources/extensions/gsd/repo-identity.ts +95 -7
- package/src/resources/extensions/gsd/rule-registry.ts +599 -0
- package/src/resources/extensions/gsd/rule-types.ts +68 -0
- package/src/resources/extensions/gsd/run-manager.ts +180 -0
- package/src/resources/extensions/gsd/service-tier.ts +184 -0
- package/src/resources/extensions/gsd/session-lock.ts +2 -2
- package/src/resources/extensions/gsd/structured-data-formatter.ts +3 -1
- package/src/resources/extensions/gsd/templates/decisions.md +2 -2
- package/src/resources/extensions/gsd/tests/activity-log.test.ts +31 -69
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +103 -120
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +85 -0
- package/src/resources/extensions/gsd/tests/auto-secrets-gate.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/auto-worktree-milestone-merge.test.ts +202 -0
- package/src/resources/extensions/gsd/tests/bundled-workflow-defs.test.ts +180 -0
- package/src/resources/extensions/gsd/tests/captures.test.ts +12 -1
- package/src/resources/extensions/gsd/tests/commands-workflow-custom.test.ts +283 -0
- package/src/resources/extensions/gsd/tests/context-injector.test.ts +313 -0
- package/src/resources/extensions/gsd/tests/context-store.test.ts +10 -5
- package/src/resources/extensions/gsd/tests/continue-here.test.ts +20 -20
- package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +540 -0
- package/src/resources/extensions/gsd/tests/custom-verification.test.ts +382 -0
- package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +339 -0
- package/src/resources/extensions/gsd/tests/dashboard-custom-engine.test.ts +87 -0
- package/src/resources/extensions/gsd/tests/db-writer.test.ts +10 -0
- package/src/resources/extensions/gsd/tests/definition-loader.test.ts +778 -0
- package/src/resources/extensions/gsd/tests/dev-engine-wrapper.test.ts +318 -0
- package/src/resources/extensions/gsd/tests/doctor-completion-deferral.test.ts +15 -10
- package/src/resources/extensions/gsd/tests/doctor-fixlevel.test.ts +5 -4
- package/src/resources/extensions/gsd/tests/doctor-roadmap-summary-atomicity.test.ts +167 -0
- package/src/resources/extensions/gsd/tests/doctor-task-done-missing-summary-slice-loop.test.ts +174 -0
- package/src/resources/extensions/gsd/tests/e2e-workflow-pipeline-integration.test.ts +476 -0
- package/src/resources/extensions/gsd/tests/engine-interfaces-contract.test.ts +271 -0
- package/src/resources/extensions/gsd/tests/exit-command.test.ts +55 -0
- package/src/resources/extensions/gsd/tests/forensics-dedup.test.ts +48 -0
- package/src/resources/extensions/gsd/tests/forensics-issue-routing.test.ts +43 -0
- package/src/resources/extensions/gsd/tests/git-locale.test.ts +133 -0
- package/src/resources/extensions/gsd/tests/git-service.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/graph-operations.test.ts +599 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +8 -1
- package/src/resources/extensions/gsd/tests/gsd-tools.test.ts +7 -7
- package/src/resources/extensions/gsd/tests/iterate-engine-integration.test.ts +429 -0
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +513 -0
- package/src/resources/extensions/gsd/tests/journal-query-tool.test.ts +147 -0
- package/src/resources/extensions/gsd/tests/journal.test.ts +341 -0
- package/src/resources/extensions/gsd/tests/manifest-status.test.ts +73 -82
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +31 -1
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/milestone-id-reservation.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/parsers.test.ts +110 -0
- package/src/resources/extensions/gsd/tests/preferences.test.ts +47 -25
- package/src/resources/extensions/gsd/tests/prompt-db.test.ts +3 -1
- package/src/resources/extensions/gsd/tests/repo-identity-worktree.test.ts +61 -1
- package/src/resources/extensions/gsd/tests/routing-history.test.ts +11 -22
- package/src/resources/extensions/gsd/tests/rule-registry.test.ts +413 -0
- package/src/resources/extensions/gsd/tests/run-manager.test.ts +229 -0
- package/src/resources/extensions/gsd/tests/service-tier.test.ts +127 -0
- package/src/resources/extensions/gsd/tests/skill-activation.test.ts +56 -3
- package/src/resources/extensions/gsd/tests/skill-lifecycle.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/stalled-tool-recovery.test.ts +102 -0
- package/src/resources/extensions/gsd/tests/structured-data-formatter.test.ts +4 -3
- package/src/resources/extensions/gsd/tests/symlink-numbered-variants.test.ts +151 -0
- package/src/resources/extensions/gsd/tests/tool-call-loop-guard.test.ts +45 -0
- package/src/resources/extensions/gsd/tests/tool-naming.test.ts +117 -0
- package/src/resources/extensions/gsd/tests/triage-dispatch.test.ts +6 -1
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +156 -263
- package/src/resources/extensions/gsd/tests/windows-path-normalization.test.ts +99 -0
- package/src/resources/extensions/gsd/tests/worktree-db-integration.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/worktree-db.test.ts +4 -0
- package/src/resources/extensions/gsd/tests/worktree-health-dispatch.test.ts +135 -0
- package/src/resources/extensions/gsd/tests/worktree-manager.test.ts +203 -106
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +79 -5
- package/src/resources/extensions/gsd/tests/worktree-symlink-removal.test.ts +140 -0
- package/src/resources/extensions/gsd/tests/worktree-sync-milestones.test.ts +74 -0
- package/src/resources/extensions/gsd/types.ts +3 -0
- package/src/resources/extensions/gsd/workflow-engine.ts +38 -0
- package/src/resources/extensions/gsd/workflow-templates.ts +12 -1
- package/src/resources/extensions/gsd/worktree-manager.ts +21 -6
- package/src/resources/extensions/gsd/worktree-resolver.ts +32 -12
- package/src/resources/extensions/gsd/worktree.ts +2 -2
- package/src/resources/extensions/mcp-client/index.ts +5 -1
- package/src/resources/extensions/search-the-web/tool-search.ts +3 -3
- package/src/resources/extensions/subagent/index.ts +7 -3
- package/src/resources/extensions/voice/index.ts +4 -4
- package/src/resources/skills/create-workflow/SKILL.md +103 -0
- package/src/resources/skills/create-workflow/references/feature-patterns.md +128 -0
- package/src/resources/skills/create-workflow/references/verification-policies.md +76 -0
- package/src/resources/skills/create-workflow/references/yaml-schema-v1.md +46 -0
- package/src/resources/skills/create-workflow/templates/blog-post-pipeline.yaml +60 -0
- package/src/resources/skills/create-workflow/templates/code-audit.yaml +60 -0
- package/src/resources/skills/create-workflow/templates/release-checklist.yaml +66 -0
- package/src/resources/skills/create-workflow/templates/workflow-definition.yaml +32 -0
- package/src/resources/skills/create-workflow/workflows/create-from-scratch.md +104 -0
- package/src/resources/skills/create-workflow/workflows/create-from-template.md +72 -0
- package/dist/web/standalone/.next/static/chunks/4024.279c423e4661ece1.js +0 -9
- package/dist/web/standalone/.next/static/chunks/app/_not-found/page-e07acdb7dd069836.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/layout-745c6ed5fea5fb06.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/page-801b53eff6e83579.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-e6255954dccfcf0a.js +0 -1
- /package/dist/web/standalone/.next/static/{Ute3pMouVczQyT15qrBBO → qw8qDHXOTLUXBq1vEknSz}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{Ute3pMouVczQyT15qrBBO → qw8qDHXOTLUXBq1vEknSz}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* graph.ts — Pure data module for GRAPH.yaml workflow step tracking.
|
|
3
|
+
*
|
|
4
|
+
* Provides types and functions for reading, writing, and querying the
|
|
5
|
+
* step graph that drives CustomWorkflowEngine. Zero engine dependencies.
|
|
6
|
+
*
|
|
7
|
+
* GRAPH.yaml lives in a run directory and tracks step statuses
|
|
8
|
+
* (pending → active → complete) with optional dependency edges.
|
|
9
|
+
*
|
|
10
|
+
* Observability:
|
|
11
|
+
* - readGraph/writeGraph use YAML on disk — human-readable, diffable,
|
|
12
|
+
* inspectable with `cat` or any YAML viewer.
|
|
13
|
+
* - Each GraphStep has status, startedAt, finishedAt fields visible in GRAPH.yaml.
|
|
14
|
+
* - writeGraph uses atomic write (tmp + rename) for crash safety.
|
|
15
|
+
* - All operations are immutable — callers always get a new graph object.
|
|
16
|
+
*/
|
|
17
|
+
import { parse, stringify } from "yaml";
|
|
18
|
+
import { readFileSync, writeFileSync, renameSync, existsSync, mkdirSync } from "node:fs";
|
|
19
|
+
import { join } from "node:path";
|
|
20
|
+
// ─── YAML schema mapping ─────────────────────────────────────────────────
|
|
21
|
+
const GRAPH_FILENAME = "GRAPH.yaml";
|
|
22
|
+
// ─── Functions ───────────────────────────────────────────────────────────
|
|
23
|
+
/**
|
|
24
|
+
* Read and parse GRAPH.yaml from a run directory.
|
|
25
|
+
*
|
|
26
|
+
* @param runDir — directory containing GRAPH.yaml
|
|
27
|
+
* @returns Parsed workflow graph
|
|
28
|
+
* @throws Error if file doesn't exist or YAML is malformed
|
|
29
|
+
*/
|
|
30
|
+
export function readGraph(runDir) {
|
|
31
|
+
const filePath = join(runDir, GRAPH_FILENAME);
|
|
32
|
+
if (!existsSync(filePath)) {
|
|
33
|
+
throw new Error(`GRAPH.yaml not found: ${filePath}`);
|
|
34
|
+
}
|
|
35
|
+
const raw = readFileSync(filePath, "utf-8");
|
|
36
|
+
const yaml = parse(raw);
|
|
37
|
+
if (!yaml?.steps || !Array.isArray(yaml.steps)) {
|
|
38
|
+
throw new Error(`Invalid GRAPH.yaml: missing or invalid 'steps' array in ${filePath}`);
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
steps: yaml.steps.map((s) => ({
|
|
42
|
+
id: s.id,
|
|
43
|
+
title: s.title,
|
|
44
|
+
status: s.status,
|
|
45
|
+
prompt: s.prompt,
|
|
46
|
+
dependsOn: s.depends_on ?? [],
|
|
47
|
+
...(s.parent_step_id != null ? { parentStepId: s.parent_step_id } : {}),
|
|
48
|
+
...(s.started_at != null ? { startedAt: s.started_at } : {}),
|
|
49
|
+
...(s.finished_at != null ? { finishedAt: s.finished_at } : {}),
|
|
50
|
+
})),
|
|
51
|
+
metadata: {
|
|
52
|
+
name: yaml.metadata?.name ?? "unnamed",
|
|
53
|
+
createdAt: yaml.metadata?.created_at ?? new Date().toISOString(),
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Write a workflow graph to GRAPH.yaml in a run directory.
|
|
59
|
+
* Creates the directory if it doesn't exist. Write is atomic (write + rename).
|
|
60
|
+
*
|
|
61
|
+
* @param runDir — directory to write GRAPH.yaml into
|
|
62
|
+
* @param graph — the workflow graph to serialize
|
|
63
|
+
*/
|
|
64
|
+
export function writeGraph(runDir, graph) {
|
|
65
|
+
if (!existsSync(runDir)) {
|
|
66
|
+
mkdirSync(runDir, { recursive: true });
|
|
67
|
+
}
|
|
68
|
+
const yamlData = {
|
|
69
|
+
steps: graph.steps.map((s) => ({
|
|
70
|
+
id: s.id,
|
|
71
|
+
title: s.title,
|
|
72
|
+
status: s.status,
|
|
73
|
+
prompt: s.prompt,
|
|
74
|
+
depends_on: s.dependsOn.length > 0 ? s.dependsOn : undefined,
|
|
75
|
+
parent_step_id: s.parentStepId ?? undefined,
|
|
76
|
+
started_at: s.startedAt ?? undefined,
|
|
77
|
+
finished_at: s.finishedAt ?? undefined,
|
|
78
|
+
})),
|
|
79
|
+
metadata: {
|
|
80
|
+
name: graph.metadata.name,
|
|
81
|
+
created_at: graph.metadata.createdAt,
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
const filePath = join(runDir, GRAPH_FILENAME);
|
|
85
|
+
const tmpPath = filePath + ".tmp";
|
|
86
|
+
const content = stringify(yamlData);
|
|
87
|
+
writeFileSync(tmpPath, content, "utf-8");
|
|
88
|
+
// Atomic rename for crash safety
|
|
89
|
+
renameSync(tmpPath, filePath);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Get the next pending step whose dependencies are all complete.
|
|
93
|
+
*
|
|
94
|
+
* Returns the first step (in array order) with status "pending" where
|
|
95
|
+
* every step in its `dependsOn` list has status "complete".
|
|
96
|
+
*
|
|
97
|
+
* @param graph — the workflow graph to query
|
|
98
|
+
* @returns The next dispatchable step, or null if none available
|
|
99
|
+
*/
|
|
100
|
+
export function getNextPendingStep(graph) {
|
|
101
|
+
const statusMap = new Map(graph.steps.map((s) => [s.id, s.status]));
|
|
102
|
+
for (const step of graph.steps) {
|
|
103
|
+
if (step.status !== "pending")
|
|
104
|
+
continue;
|
|
105
|
+
const depsComplete = step.dependsOn.every((depId) => statusMap.get(depId) === "complete");
|
|
106
|
+
if (depsComplete)
|
|
107
|
+
return step;
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Return a new graph with the specified step marked as "complete".
|
|
113
|
+
* Immutable — does not mutate the input graph.
|
|
114
|
+
*
|
|
115
|
+
* @param graph — the current workflow graph
|
|
116
|
+
* @param stepId — ID of the step to mark complete
|
|
117
|
+
* @returns New graph with the step's status set to "complete"
|
|
118
|
+
* @throws Error if stepId is not found in the graph
|
|
119
|
+
*/
|
|
120
|
+
export function markStepComplete(graph, stepId) {
|
|
121
|
+
const found = graph.steps.some((s) => s.id === stepId);
|
|
122
|
+
if (!found) {
|
|
123
|
+
throw new Error(`Step not found: ${stepId}`);
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
...graph,
|
|
127
|
+
steps: graph.steps.map((s) => s.id === stepId
|
|
128
|
+
? { ...s, status: "complete", finishedAt: new Date().toISOString() }
|
|
129
|
+
: s),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
// ─── Iteration expansion ─────────────────────────────────────────────────
|
|
133
|
+
/**
|
|
134
|
+
* Expand an iterate step into concrete instances. Pure and deterministic —
|
|
135
|
+
* identical inputs always produce identical output.
|
|
136
|
+
*
|
|
137
|
+
* Given a parent step with status "pending" and an array of matched items,
|
|
138
|
+
* creates one instance step per item, marks the parent as "expanded", and
|
|
139
|
+
* rewrites any downstream dependsOn references from the parent ID to the
|
|
140
|
+
* full set of instance IDs.
|
|
141
|
+
*
|
|
142
|
+
* @param graph — the current workflow graph (not mutated)
|
|
143
|
+
* @param stepId — ID of the iterate step to expand
|
|
144
|
+
* @param items — matched items from the source artifact
|
|
145
|
+
* @param promptTemplate — template with {{item}} placeholders
|
|
146
|
+
* @returns New WorkflowGraph with instances inserted and deps rewritten
|
|
147
|
+
* @throws Error if stepId not found or step is not pending
|
|
148
|
+
*/
|
|
149
|
+
export function expandIteration(graph, stepId, items, promptTemplate) {
|
|
150
|
+
const parentIndex = graph.steps.findIndex((s) => s.id === stepId);
|
|
151
|
+
if (parentIndex === -1) {
|
|
152
|
+
throw new Error(`expandIteration: step not found: ${stepId}`);
|
|
153
|
+
}
|
|
154
|
+
const parentStep = graph.steps[parentIndex];
|
|
155
|
+
if (parentStep.status !== "pending") {
|
|
156
|
+
throw new Error(`expandIteration: step "${stepId}" has status "${parentStep.status}", expected "pending"`);
|
|
157
|
+
}
|
|
158
|
+
// Create instance steps
|
|
159
|
+
const instanceIds = [];
|
|
160
|
+
const instances = items.map((item, i) => {
|
|
161
|
+
const instanceId = `${stepId}--${String(i + 1).padStart(3, "0")}`;
|
|
162
|
+
instanceIds.push(instanceId);
|
|
163
|
+
return {
|
|
164
|
+
id: instanceId,
|
|
165
|
+
title: `${parentStep.title}: ${item}`,
|
|
166
|
+
status: "pending",
|
|
167
|
+
prompt: promptTemplate.replace(/\{\{item\}\}/g, () => item),
|
|
168
|
+
dependsOn: [...parentStep.dependsOn],
|
|
169
|
+
parentStepId: stepId,
|
|
170
|
+
};
|
|
171
|
+
});
|
|
172
|
+
// Build new steps array: copy everything, mark parent as expanded,
|
|
173
|
+
// insert instances right after the parent, rewrite downstream deps.
|
|
174
|
+
const newSteps = [];
|
|
175
|
+
for (let i = 0; i < graph.steps.length; i++) {
|
|
176
|
+
if (i === parentIndex) {
|
|
177
|
+
// Mark parent as expanded
|
|
178
|
+
newSteps.push({ ...parentStep, status: "expanded" });
|
|
179
|
+
// Insert instances immediately after parent
|
|
180
|
+
newSteps.push(...instances);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
const step = graph.steps[i];
|
|
184
|
+
// Rewrite dependsOn: replace parent ID with all instance IDs
|
|
185
|
+
const hasDep = step.dependsOn.includes(stepId);
|
|
186
|
+
if (hasDep) {
|
|
187
|
+
const rewritten = step.dependsOn.flatMap((dep) => dep === stepId ? instanceIds : [dep]);
|
|
188
|
+
newSteps.push({ ...step, dependsOn: rewritten });
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
newSteps.push(step);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
...graph,
|
|
197
|
+
steps: newSteps,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
// ─── Definition → Graph conversion ──────────────────────────────────────
|
|
201
|
+
/**
|
|
202
|
+
* Convert a parsed WorkflowDefinition into a WorkflowGraph with all
|
|
203
|
+
* steps in "pending" status. Used by run-manager to generate the initial
|
|
204
|
+
* GRAPH.yaml for a new run.
|
|
205
|
+
*
|
|
206
|
+
* @param def — a validated WorkflowDefinition from definition-loader
|
|
207
|
+
* @returns WorkflowGraph with pending steps and metadata from the definition
|
|
208
|
+
*/
|
|
209
|
+
export function initializeGraph(def) {
|
|
210
|
+
return {
|
|
211
|
+
steps: def.steps.map((s) => ({
|
|
212
|
+
id: s.id,
|
|
213
|
+
title: s.name,
|
|
214
|
+
status: "pending",
|
|
215
|
+
prompt: s.prompt,
|
|
216
|
+
dependsOn: s.requires ?? [],
|
|
217
|
+
})),
|
|
218
|
+
metadata: {
|
|
219
|
+
name: def.name,
|
|
220
|
+
createdAt: new Date().toISOString(),
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
/** @deprecated Use initializeGraph instead. Kept for backward compatibility. */
|
|
225
|
+
export { initializeGraph as graphFromDefinition };
|
|
@@ -118,7 +118,7 @@ function openRawDb(path) {
|
|
|
118
118
|
return new Database(path);
|
|
119
119
|
}
|
|
120
120
|
// ─── Schema ────────────────────────────────────────────────────────────────
|
|
121
|
-
const SCHEMA_VERSION =
|
|
121
|
+
const SCHEMA_VERSION = 4;
|
|
122
122
|
function initSchema(db, fileBacked) {
|
|
123
123
|
// WAL mode for file-backed databases (must be outside transaction)
|
|
124
124
|
if (fileBacked) {
|
|
@@ -142,6 +142,7 @@ function initSchema(db, fileBacked) {
|
|
|
142
142
|
choice TEXT NOT NULL DEFAULT '',
|
|
143
143
|
rationale TEXT NOT NULL DEFAULT '',
|
|
144
144
|
revisable TEXT NOT NULL DEFAULT '',
|
|
145
|
+
made_by TEXT NOT NULL DEFAULT 'agent',
|
|
145
146
|
superseded_by TEXT DEFAULT NULL
|
|
146
147
|
)
|
|
147
148
|
`);
|
|
@@ -273,6 +274,15 @@ function migrateSchema(db) {
|
|
|
273
274
|
db.exec("CREATE VIEW active_memories AS SELECT * FROM memories WHERE superseded_by IS NULL");
|
|
274
275
|
db.prepare("INSERT INTO schema_version (version, applied_at) VALUES (:version, :applied_at)").run({ ":version": 3, ":applied_at": new Date().toISOString() });
|
|
275
276
|
}
|
|
277
|
+
// v3 → v4: add made_by column to decisions table
|
|
278
|
+
if (currentVersion < 4) {
|
|
279
|
+
// Add made_by column — default 'agent' for existing rows (pre-attribution decisions)
|
|
280
|
+
db.exec(`ALTER TABLE decisions ADD COLUMN made_by TEXT NOT NULL DEFAULT 'agent'`);
|
|
281
|
+
// Recreate views to pick up new columns (SQLite expands SELECT * at view creation time)
|
|
282
|
+
db.exec("DROP VIEW IF EXISTS active_decisions");
|
|
283
|
+
db.exec("CREATE VIEW active_decisions AS SELECT * FROM decisions WHERE superseded_by IS NULL");
|
|
284
|
+
db.prepare("INSERT INTO schema_version (version, applied_at) VALUES (:version, :applied_at)").run({ ":version": 4, ":applied_at": new Date().toISOString() });
|
|
285
|
+
}
|
|
276
286
|
db.exec("COMMIT");
|
|
277
287
|
}
|
|
278
288
|
catch (err) {
|
|
@@ -375,8 +385,8 @@ export function insertDecision(d) {
|
|
|
375
385
|
if (!currentDb)
|
|
376
386
|
throw new GSDError(GSD_STALE_STATE, "gsd-db: No database open");
|
|
377
387
|
currentDb
|
|
378
|
-
.prepare(`INSERT INTO decisions (id, when_context, scope, decision, choice, rationale, revisable, superseded_by)
|
|
379
|
-
VALUES (:id, :when_context, :scope, :decision, :choice, :rationale, :revisable, :superseded_by)`)
|
|
388
|
+
.prepare(`INSERT INTO decisions (id, when_context, scope, decision, choice, rationale, revisable, made_by, superseded_by)
|
|
389
|
+
VALUES (:id, :when_context, :scope, :decision, :choice, :rationale, :revisable, :made_by, :superseded_by)`)
|
|
380
390
|
.run({
|
|
381
391
|
":id": d.id,
|
|
382
392
|
":when_context": d.when_context,
|
|
@@ -385,6 +395,7 @@ export function insertDecision(d) {
|
|
|
385
395
|
":choice": d.choice,
|
|
386
396
|
":rationale": d.rationale,
|
|
387
397
|
":revisable": d.revisable,
|
|
398
|
+
":made_by": d.made_by ?? "agent",
|
|
388
399
|
":superseded_by": d.superseded_by,
|
|
389
400
|
});
|
|
390
401
|
}
|
|
@@ -406,6 +417,7 @@ export function getDecisionById(id) {
|
|
|
406
417
|
choice: row["choice"],
|
|
407
418
|
rationale: row["rationale"],
|
|
408
419
|
revisable: row["revisable"],
|
|
420
|
+
made_by: row["made_by"] ?? "agent",
|
|
409
421
|
superseded_by: row["superseded_by"] ?? null,
|
|
410
422
|
};
|
|
411
423
|
}
|
|
@@ -425,6 +437,7 @@ export function getActiveDecisions() {
|
|
|
425
437
|
choice: row["choice"],
|
|
426
438
|
rationale: row["rationale"],
|
|
427
439
|
revisable: row["revisable"],
|
|
440
|
+
made_by: row["made_by"] ?? "agent",
|
|
428
441
|
superseded_by: null,
|
|
429
442
|
}));
|
|
430
443
|
}
|
|
@@ -537,8 +550,8 @@ export function upsertDecision(d) {
|
|
|
537
550
|
if (!currentDb)
|
|
538
551
|
throw new GSDError(GSD_STALE_STATE, "gsd-db: No database open");
|
|
539
552
|
currentDb
|
|
540
|
-
.prepare(`INSERT OR REPLACE INTO decisions (id, when_context, scope, decision, choice, rationale, revisable, superseded_by)
|
|
541
|
-
VALUES (:id, :when_context, :scope, :decision, :choice, :rationale, :revisable, :superseded_by)`)
|
|
553
|
+
.prepare(`INSERT OR REPLACE INTO decisions (id, when_context, scope, decision, choice, rationale, revisable, made_by, superseded_by)
|
|
554
|
+
VALUES (:id, :when_context, :scope, :decision, :choice, :rationale, :revisable, :made_by, :superseded_by)`)
|
|
542
555
|
.run({
|
|
543
556
|
":id": d.id,
|
|
544
557
|
":when_context": d.when_context,
|
|
@@ -547,6 +560,7 @@ export function upsertDecision(d) {
|
|
|
547
560
|
":choice": d.choice,
|
|
548
561
|
":rationale": d.rationale,
|
|
549
562
|
":revisable": d.revisable,
|
|
563
|
+
":made_by": d.made_by ?? "agent",
|
|
550
564
|
":superseded_by": d.superseded_by ?? null,
|
|
551
565
|
});
|
|
552
566
|
}
|
|
@@ -649,8 +663,11 @@ export function reconcileWorktreeDb(mainDbPath, worktreeDbPath) {
|
|
|
649
663
|
try {
|
|
650
664
|
adapter.exec(`ATTACH DATABASE '${worktreeDbPath}' AS wt`);
|
|
651
665
|
try {
|
|
666
|
+
// Check if attached wt database has the made_by column (legacy v3 worktrees won't)
|
|
667
|
+
const wtInfo = adapter.prepare("PRAGMA wt.table_info('decisions')").all();
|
|
668
|
+
const hasMadeBy = wtInfo.some((col) => col["name"] === "made_by");
|
|
652
669
|
const decConf = adapter
|
|
653
|
-
.prepare(`SELECT m.id FROM decisions m INNER JOIN wt.decisions w ON m.id = w.id WHERE m.decision != w.decision OR m.choice != w.choice OR m.rationale != w.rationale OR m.superseded_by IS NOT w.superseded_by`)
|
|
670
|
+
.prepare(`SELECT m.id FROM decisions m INNER JOIN wt.decisions w ON m.id = w.id WHERE m.decision != w.decision OR m.choice != w.choice OR m.rationale != w.rationale OR ${hasMadeBy ? "m.made_by != w.made_by" : "'agent' != 'agent'"} OR m.superseded_by IS NOT w.superseded_by`)
|
|
654
671
|
.all();
|
|
655
672
|
for (const row of decConf)
|
|
656
673
|
conflicts.push(`decision ${row["id"]}: modified in both`);
|
|
@@ -665,10 +682,10 @@ export function reconcileWorktreeDb(mainDbPath, worktreeDbPath) {
|
|
|
665
682
|
const dR = adapter
|
|
666
683
|
.prepare(`
|
|
667
684
|
INSERT OR REPLACE INTO decisions (
|
|
668
|
-
id, when_context, scope, decision, choice, rationale, revisable, superseded_by
|
|
685
|
+
id, when_context, scope, decision, choice, rationale, revisable, made_by, superseded_by
|
|
669
686
|
)
|
|
670
687
|
SELECT
|
|
671
|
-
id, when_context, scope, decision, choice, rationale, revisable, superseded_by
|
|
688
|
+
id, when_context, scope, decision, choice, rationale, revisable, ${hasMadeBy ? "made_by" : "'agent'"}, superseded_by
|
|
672
689
|
FROM wt.decisions
|
|
673
690
|
`)
|
|
674
691
|
.run();
|
|
@@ -130,7 +130,7 @@ export async function showQueueAdd(ctx, pi, basePath, state) {
|
|
|
130
130
|
// ── Build existing milestones context for the prompt ────────────────
|
|
131
131
|
const existingContext = await buildExistingMilestonesContext(basePath, milestoneIds, state);
|
|
132
132
|
// ── Determine next milestone ID ─────────────────────────────────────
|
|
133
|
-
// Note: the LLM will use the
|
|
133
|
+
// Note: the LLM will use the gsd_milestone_generate_id tool to get IDs
|
|
134
134
|
// at creation time, but we still mention the next ID in the preamble
|
|
135
135
|
// for context about where the sequence is.
|
|
136
136
|
const uniqueEnabled = !!loadEffectiveGSDPreferences()?.preferences?.unique_milestone_ids;
|
|
@@ -20,6 +20,7 @@ import { join } from "node:path";
|
|
|
20
20
|
import { readFileSync, existsSync, mkdirSync, readdirSync, unlinkSync } from "node:fs";
|
|
21
21
|
import { readSessionLockData, isSessionLockProcessAlive } from "./session-lock.js";
|
|
22
22
|
import { nativeIsRepo, nativeInit } from "./native-git-bridge.js";
|
|
23
|
+
import { isInheritedRepo } from "./repo-identity.js";
|
|
23
24
|
import { ensureGitignore, ensurePreferences, untrackRuntimeFiles } from "./gitignore.js";
|
|
24
25
|
import { loadEffectiveGSDPreferences } from "./preferences.js";
|
|
25
26
|
import { detectProjectState } from "./detection.js";
|
|
@@ -37,7 +38,7 @@ import { getErrorMessage } from "./error-utils.js";
|
|
|
37
38
|
// ─── ID Generation with Reservation ─────────────────────────────────────────
|
|
38
39
|
/**
|
|
39
40
|
* Generate the next milestone ID, accounting for reserved IDs, and reserve it.
|
|
40
|
-
* Ensures any preview ID shown in the UI matches what `
|
|
41
|
+
* Ensures any preview ID shown in the UI matches what `gsd_milestone_generate_id`
|
|
41
42
|
* will later return.
|
|
42
43
|
*/
|
|
43
44
|
function nextMilestoneIdReserved(existingIds, uniqueEnabled) {
|
|
@@ -277,7 +278,7 @@ function buildHeadlessDiscussPrompt(nextId, seedContext, _basePath) {
|
|
|
277
278
|
* Ensures git repo, .gsd/ structure, gitignore, and preferences all exist.
|
|
278
279
|
*/
|
|
279
280
|
function bootstrapGsdProject(basePath) {
|
|
280
|
-
if (!nativeIsRepo(basePath)) {
|
|
281
|
+
if (!nativeIsRepo(basePath) || isInheritedRepo(basePath)) {
|
|
281
282
|
const mainBranch = loadEffectiveGSDPreferences()?.preferences?.git?.main_branch || "main";
|
|
282
283
|
nativeInit(basePath, mainBranch);
|
|
283
284
|
}
|
|
@@ -721,7 +722,10 @@ export async function showSmartEntry(ctx, pi, basePath, options) {
|
|
|
721
722
|
// which will detect "no milestones" and start the discuss prompt
|
|
722
723
|
}
|
|
723
724
|
// ── Ensure git repo exists — GSD needs it for worktree isolation ──────
|
|
724
|
-
if
|
|
725
|
+
// Also handle inherited repos: if basePath is a subdirectory of another
|
|
726
|
+
// git repo that has no .gsd, create a fresh repo to prevent cross-project
|
|
727
|
+
// state leaks (#1639).
|
|
728
|
+
if (!nativeIsRepo(basePath) || isInheritedRepo(basePath)) {
|
|
725
729
|
const mainBranch = loadEffectiveGSDPreferences()?.preferences?.git?.main_branch || "main";
|
|
726
730
|
nativeInit(basePath, mainBranch);
|
|
727
731
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GSD Event Journal — structured JSONL event log for auto-mode iterations.
|
|
3
|
+
*
|
|
4
|
+
* Writes daily-rotated JSONL files to `.gsd/journal/YYYY-MM-DD.jsonl`.
|
|
5
|
+
* Zero imports from `auto/` — depends only on node:fs, node:path, and paths.ts.
|
|
6
|
+
*
|
|
7
|
+
* Observability:
|
|
8
|
+
* - Each line in the JSONL file is a self-contained JournalEntry
|
|
9
|
+
* - Events are grouped by flowId (one per iteration) with monotonic seq numbers
|
|
10
|
+
* - causedBy references enable causal chain reconstruction
|
|
11
|
+
* - queryJournal() enables programmatic filtering by flowId, eventType, unitId, time range
|
|
12
|
+
* - Silent failure: journal writes never throw — absence of events is the failure signal
|
|
13
|
+
*/
|
|
14
|
+
import { appendFileSync, mkdirSync, readdirSync, readFileSync } from "node:fs";
|
|
15
|
+
import { join } from "node:path";
|
|
16
|
+
import { gsdRoot } from "./paths.js";
|
|
17
|
+
// ─── Emit ─────────────────────────────────────────────────────────────────────
|
|
18
|
+
/**
|
|
19
|
+
* Append a journal event to the daily JSONL file.
|
|
20
|
+
*
|
|
21
|
+
* File path: `<gsdRoot>/journal/<YYYY-MM-DD>.jsonl`
|
|
22
|
+
* where the date is extracted from `entry.ts.slice(0, 10)`.
|
|
23
|
+
*
|
|
24
|
+
* Never throws — all errors are silently caught.
|
|
25
|
+
*/
|
|
26
|
+
export function emitJournalEvent(basePath, entry) {
|
|
27
|
+
try {
|
|
28
|
+
const journalDir = join(gsdRoot(basePath), "journal");
|
|
29
|
+
mkdirSync(journalDir, { recursive: true });
|
|
30
|
+
const dateStr = entry.ts.slice(0, 10);
|
|
31
|
+
const filePath = join(journalDir, `${dateStr}.jsonl`);
|
|
32
|
+
appendFileSync(filePath, JSON.stringify(entry) + "\n");
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
// Silent failure — journal must never break auto-mode
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// ─── Query ────────────────────────────────────────────────────────────────────
|
|
39
|
+
/**
|
|
40
|
+
* Read and filter journal entries from all daily JSONL files.
|
|
41
|
+
*
|
|
42
|
+
* Returns an empty array on any error (missing directory, corrupt files, etc.).
|
|
43
|
+
*/
|
|
44
|
+
export function queryJournal(basePath, filters) {
|
|
45
|
+
try {
|
|
46
|
+
const journalDir = join(gsdRoot(basePath), "journal");
|
|
47
|
+
const files = readdirSync(journalDir).filter(f => f.endsWith(".jsonl")).sort();
|
|
48
|
+
const entries = [];
|
|
49
|
+
for (const file of files) {
|
|
50
|
+
const raw = readFileSync(join(journalDir, file), "utf-8");
|
|
51
|
+
for (const line of raw.split("\n")) {
|
|
52
|
+
if (!line.trim())
|
|
53
|
+
continue;
|
|
54
|
+
try {
|
|
55
|
+
const entry = JSON.parse(line);
|
|
56
|
+
entries.push(entry);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
// Skip malformed lines
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (!filters)
|
|
64
|
+
return entries;
|
|
65
|
+
return entries.filter(e => {
|
|
66
|
+
if (filters.flowId && e.flowId !== filters.flowId)
|
|
67
|
+
return false;
|
|
68
|
+
if (filters.eventType && e.eventType !== filters.eventType)
|
|
69
|
+
return false;
|
|
70
|
+
if (filters.rule && e.rule !== filters.rule)
|
|
71
|
+
return false;
|
|
72
|
+
if (filters.unitId && e.data?.unitId !== filters.unitId)
|
|
73
|
+
return false;
|
|
74
|
+
if (filters.after && e.ts < filters.after)
|
|
75
|
+
return false;
|
|
76
|
+
if (filters.before && e.ts > filters.before)
|
|
77
|
+
return false;
|
|
78
|
+
return true;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// Missing directory, permission errors, etc. — return empty
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -9,6 +9,7 @@ import { upsertDecision, upsertRequirement, insertArtifact, openDatabase, transa
|
|
|
9
9
|
import { resolveGsdRootFile, milestonesDir, gsdRoot, resolveTaskFiles, } from './paths.js';
|
|
10
10
|
import { findMilestoneIds } from './guided-flow.js';
|
|
11
11
|
// ─── DECISIONS.md Parser ───────────────────────────────────────────────────
|
|
12
|
+
const VALID_MADE_BY = new Set(['human', 'agent', 'collaborative']);
|
|
12
13
|
/**
|
|
13
14
|
* Parse a DECISIONS.md markdown table into Decision objects (without seq).
|
|
14
15
|
* Detects `(amends DXXX)` in the Decision column to build supersession info.
|
|
@@ -49,6 +50,9 @@ export function parseDecisionsTable(content) {
|
|
|
49
50
|
const choice = cells[4].trim();
|
|
50
51
|
const rationale = cells[5].trim();
|
|
51
52
|
const revisable = cells[6].trim();
|
|
53
|
+
// Made By column is optional for backward compatibility — defaults to 'agent'
|
|
54
|
+
const rawMadeBy = cells.length >= 8 ? cells[7].trim().toLowerCase() : 'agent';
|
|
55
|
+
const made_by = (VALID_MADE_BY.has(rawMadeBy) ? rawMadeBy : 'agent');
|
|
52
56
|
// Detect (amends DXXX) in the Decision column
|
|
53
57
|
const amendsMatch = decisionText.match(/\(amends\s+(D\d+)\)/i);
|
|
54
58
|
if (amendsMatch) {
|
|
@@ -62,6 +66,7 @@ export function parseDecisionsTable(content) {
|
|
|
62
66
|
choice,
|
|
63
67
|
rationale,
|
|
64
68
|
revisable,
|
|
69
|
+
made_by,
|
|
65
70
|
superseded_by: null,
|
|
66
71
|
});
|
|
67
72
|
}
|
|
@@ -62,7 +62,7 @@ export function nextMilestoneId(milestoneIds, uniqueEnabled) {
|
|
|
62
62
|
/**
|
|
63
63
|
* Module-level set of milestone IDs that have been previewed/promised to the
|
|
64
64
|
* user but not yet materialised on disk. Both guided-flow (preview) and
|
|
65
|
-
*
|
|
65
|
+
* gsd_milestone_generate_id (tool) share this set so the ID shown in the UI
|
|
66
66
|
* matches the one the tool returns.
|
|
67
67
|
*/
|
|
68
68
|
const reservedMilestoneIds = new Set();
|
|
@@ -647,7 +647,7 @@ export function nativeCheckoutBranch(basePath, branch) {
|
|
|
647
647
|
native.gitCheckoutBranch(basePath, branch);
|
|
648
648
|
return;
|
|
649
649
|
}
|
|
650
|
-
|
|
650
|
+
execFileSync("git", ["checkout", branch], {
|
|
651
651
|
cwd: basePath,
|
|
652
652
|
stdio: ["ignore", "pipe", "pipe"],
|
|
653
653
|
encoding: "utf-8",
|
|
@@ -679,10 +679,11 @@ export function nativeMergeSquash(basePath, branch) {
|
|
|
679
679
|
return native.gitMergeSquash(basePath, branch);
|
|
680
680
|
}
|
|
681
681
|
try {
|
|
682
|
-
|
|
682
|
+
execFileSync("git", ["merge", "--squash", branch], {
|
|
683
683
|
cwd: basePath,
|
|
684
684
|
stdio: ["ignore", "pipe", "pipe"],
|
|
685
685
|
encoding: "utf-8",
|
|
686
|
+
env: GIT_NO_PROMPT_ENV,
|
|
686
687
|
});
|
|
687
688
|
return { success: true, conflicts: [] };
|
|
688
689
|
}
|