gsd-pi 2.29.0 → 2.30.0-dev.7e1bbce
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 +24 -17
- package/dist/cli.js +51 -0
- package/dist/extension-registry.d.ts +63 -0
- package/dist/extension-registry.js +166 -0
- package/dist/headless.js +4 -0
- package/dist/help-text.js +35 -0
- package/dist/loader.js +10 -1
- package/dist/resource-loader.js +11 -1
- package/dist/resources/extensions/async-jobs/extension-manifest.json +13 -0
- package/dist/resources/extensions/bg-shell/extension-manifest.json +14 -0
- package/dist/resources/extensions/bg-shell/process-manager.ts +13 -0
- package/dist/resources/extensions/browser-tools/extension-manifest.json +37 -0
- package/dist/resources/extensions/context7/extension-manifest.json +12 -0
- package/dist/resources/extensions/google-search/extension-manifest.json +12 -0
- package/dist/resources/extensions/gsd/auto-dashboard.ts +31 -0
- package/dist/resources/extensions/gsd/auto-dispatch.ts +32 -3
- package/dist/resources/extensions/gsd/auto-post-unit.ts +45 -13
- package/dist/resources/extensions/gsd/auto-prompts.ts +40 -17
- package/dist/resources/extensions/gsd/auto-recovery.ts +18 -23
- package/dist/resources/extensions/gsd/auto-start.ts +18 -32
- package/dist/resources/extensions/gsd/auto-worktree.ts +21 -182
- package/dist/resources/extensions/gsd/auto.ts +2 -24
- package/dist/resources/extensions/gsd/captures.ts +4 -10
- package/dist/resources/extensions/gsd/commands-extensions.ts +328 -0
- package/dist/resources/extensions/gsd/commands-handlers.ts +22 -2
- package/dist/resources/extensions/gsd/commands-logs.ts +13 -14
- package/dist/resources/extensions/gsd/commands-prefs-wizard.ts +44 -14
- package/dist/resources/extensions/gsd/commands-workflow-templates.ts +544 -0
- package/dist/resources/extensions/gsd/commands.ts +108 -24
- package/dist/resources/extensions/gsd/dashboard-overlay.ts +2 -1
- package/dist/resources/extensions/gsd/detection.ts +2 -1
- package/dist/resources/extensions/gsd/doctor-checks.ts +49 -1
- package/dist/resources/extensions/gsd/doctor-types.ts +3 -1
- package/dist/resources/extensions/gsd/extension-manifest.json +18 -0
- package/dist/resources/extensions/gsd/forensics.ts +2 -2
- package/dist/resources/extensions/gsd/git-service.ts +3 -2
- package/dist/resources/extensions/gsd/gitignore.ts +9 -63
- package/dist/resources/extensions/gsd/gsd-db.ts +1 -165
- package/dist/resources/extensions/gsd/guided-flow.ts +8 -5
- package/dist/resources/extensions/gsd/index.ts +16 -3
- package/dist/resources/extensions/gsd/json-persistence.ts +16 -1
- package/dist/resources/extensions/gsd/md-importer.ts +3 -2
- package/dist/resources/extensions/gsd/mechanical-completion.ts +430 -0
- package/dist/resources/extensions/gsd/migrate/command.ts +3 -2
- package/dist/resources/extensions/gsd/migrate/writer.ts +2 -1
- package/dist/resources/extensions/gsd/migrate-external.ts +123 -0
- package/dist/resources/extensions/gsd/paths.ts +24 -2
- package/dist/resources/extensions/gsd/post-unit-hooks.ts +6 -5
- package/dist/resources/extensions/gsd/preferences-models.ts +7 -1
- package/dist/resources/extensions/gsd/preferences-validation.ts +2 -1
- package/dist/resources/extensions/gsd/preferences.ts +10 -5
- package/dist/resources/extensions/gsd/prompts/discuss-headless.md +4 -2
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/plan-milestone.md +26 -2
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +15 -1
- package/dist/resources/extensions/gsd/prompts/workflow-start.md +28 -0
- package/dist/resources/extensions/gsd/queue-order.ts +10 -11
- package/dist/resources/extensions/gsd/repo-identity.ts +148 -0
- package/dist/resources/extensions/gsd/resource-version.ts +99 -0
- package/dist/resources/extensions/gsd/roadmap-slices.ts +22 -7
- package/dist/resources/extensions/gsd/session-forensics.ts +4 -3
- package/dist/resources/extensions/gsd/session-lock.ts +53 -4
- package/dist/resources/extensions/gsd/session-status-io.ts +23 -41
- package/dist/resources/extensions/gsd/tests/activity-log.test.ts +2 -2
- package/dist/resources/extensions/gsd/tests/auto-budget-alerts.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/auto-recovery.test.ts +3 -3
- package/dist/resources/extensions/gsd/tests/auto-skip-loop.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/auto-worktree.test.ts +0 -58
- package/dist/resources/extensions/gsd/tests/doctor-runtime.test.ts +3 -4
- package/dist/resources/extensions/gsd/tests/extension-selector-separator.test.ts +60 -38
- package/dist/resources/extensions/gsd/tests/feature-branch-lifecycle-integration.test.ts +5 -18
- package/dist/resources/extensions/gsd/tests/git-service.test.ts +10 -37
- package/dist/resources/extensions/gsd/tests/knowledge.test.ts +4 -4
- package/dist/resources/extensions/gsd/tests/mechanical-completion.test.ts +356 -0
- package/dist/resources/extensions/gsd/tests/parallel-workers-multi-milestone-e2e.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +1 -0
- package/dist/resources/extensions/gsd/tests/token-profile.test.ts +14 -16
- package/dist/resources/extensions/gsd/tests/workflow-templates.test.ts +173 -0
- package/dist/resources/extensions/gsd/triage-resolution.ts +2 -1
- package/dist/resources/extensions/gsd/types.ts +2 -0
- package/dist/resources/extensions/gsd/workflow-templates/bugfix.md +87 -0
- package/dist/resources/extensions/gsd/workflow-templates/dep-upgrade.md +74 -0
- package/dist/resources/extensions/gsd/workflow-templates/full-project.md +41 -0
- package/dist/resources/extensions/gsd/workflow-templates/hotfix.md +45 -0
- package/dist/resources/extensions/gsd/workflow-templates/refactor.md +83 -0
- package/dist/resources/extensions/gsd/workflow-templates/registry.json +85 -0
- package/dist/resources/extensions/gsd/workflow-templates/security-audit.md +73 -0
- package/dist/resources/extensions/gsd/workflow-templates/small-feature.md +81 -0
- package/dist/resources/extensions/gsd/workflow-templates/spike.md +69 -0
- package/dist/resources/extensions/gsd/workflow-templates.ts +241 -0
- package/dist/resources/extensions/gsd/worktree-command.ts +1 -11
- package/dist/resources/extensions/gsd/worktree-manager.ts +3 -2
- package/dist/resources/extensions/gsd/worktree.ts +42 -5
- package/dist/resources/extensions/mac-tools/extension-manifest.json +16 -0
- package/dist/resources/extensions/mcp-client/index.ts +459 -0
- package/dist/resources/extensions/mcporter/extension-manifest.json +12 -0
- package/dist/resources/extensions/remote-questions/discord-adapter.ts +8 -19
- package/dist/resources/extensions/remote-questions/extension-manifest.json +11 -0
- package/dist/resources/extensions/remote-questions/http-client.ts +76 -0
- package/dist/resources/extensions/remote-questions/slack-adapter.ts +11 -17
- package/dist/resources/extensions/remote-questions/telegram-adapter.ts +8 -19
- package/dist/resources/extensions/search-the-web/extension-manifest.json +13 -0
- package/dist/resources/extensions/slash-commands/extension-manifest.json +11 -0
- package/dist/resources/extensions/subagent/extension-manifest.json +13 -0
- package/dist/resources/extensions/ttsr/extension-manifest.json +11 -0
- package/dist/resources/extensions/universal-config/extension-manifest.json +13 -0
- package/dist/resources/extensions/voice/extension-manifest.json +12 -0
- package/dist/resources/skills/create-gsd-extension/SKILL.md +87 -0
- package/dist/resources/skills/create-gsd-extension/references/compaction-session-control.md +77 -0
- package/dist/resources/skills/create-gsd-extension/references/custom-commands.md +139 -0
- package/dist/resources/skills/create-gsd-extension/references/custom-rendering.md +108 -0
- package/dist/resources/skills/create-gsd-extension/references/custom-tools.md +183 -0
- package/dist/resources/skills/create-gsd-extension/references/custom-ui.md +490 -0
- package/dist/resources/skills/create-gsd-extension/references/events-reference.md +126 -0
- package/dist/resources/skills/create-gsd-extension/references/extension-lifecycle.md +64 -0
- package/dist/resources/skills/create-gsd-extension/references/extensionapi-reference.md +75 -0
- package/dist/resources/skills/create-gsd-extension/references/extensioncontext-reference.md +53 -0
- package/dist/resources/skills/create-gsd-extension/references/key-rules-gotchas.md +36 -0
- package/dist/resources/skills/create-gsd-extension/references/mode-behavior.md +32 -0
- package/dist/resources/skills/create-gsd-extension/references/model-provider-management.md +89 -0
- package/dist/resources/skills/create-gsd-extension/references/packaging-distribution.md +55 -0
- package/dist/resources/skills/create-gsd-extension/references/remote-execution-overrides.md +90 -0
- package/dist/resources/skills/create-gsd-extension/references/state-management.md +70 -0
- package/dist/resources/skills/create-gsd-extension/references/system-prompt-modification.md +52 -0
- package/dist/resources/skills/create-gsd-extension/templates/extension-skeleton.ts +51 -0
- package/dist/resources/skills/create-gsd-extension/templates/stateful-tool-skeleton.ts +143 -0
- package/dist/resources/skills/create-gsd-extension/workflows/add-capability.md +57 -0
- package/dist/resources/skills/create-gsd-extension/workflows/create-extension.md +156 -0
- package/dist/resources/skills/create-gsd-extension/workflows/debug-extension.md +74 -0
- package/dist/resources/skills/create-skill/SKILL.md +184 -0
- package/dist/resources/skills/create-skill/references/api-security.md +226 -0
- package/dist/resources/skills/create-skill/references/be-clear-and-direct.md +531 -0
- package/dist/resources/skills/create-skill/references/common-patterns.md +595 -0
- package/dist/resources/skills/create-skill/references/core-principles.md +437 -0
- package/dist/resources/skills/create-skill/references/executable-code.md +175 -0
- package/dist/resources/skills/create-skill/references/gsd-skill-ecosystem.md +68 -0
- package/dist/resources/skills/create-skill/references/iteration-and-testing.md +474 -0
- package/dist/resources/skills/create-skill/references/recommended-structure.md +168 -0
- package/dist/resources/skills/create-skill/references/skill-structure.md +372 -0
- package/dist/resources/skills/create-skill/references/use-xml-tags.md +466 -0
- package/dist/resources/skills/create-skill/references/using-scripts.md +113 -0
- package/dist/resources/skills/create-skill/references/using-templates.md +112 -0
- package/dist/resources/skills/create-skill/references/workflows-and-validation.md +510 -0
- package/dist/resources/skills/create-skill/templates/router-skill.md +73 -0
- package/dist/resources/skills/create-skill/templates/simple-skill.md +33 -0
- package/dist/resources/skills/create-skill/workflows/add-reference.md +96 -0
- package/dist/resources/skills/create-skill/workflows/add-script.md +93 -0
- package/dist/resources/skills/create-skill/workflows/add-template.md +74 -0
- package/dist/resources/skills/create-skill/workflows/add-workflow.md +120 -0
- package/dist/resources/skills/create-skill/workflows/audit-skill.md +148 -0
- package/dist/resources/skills/create-skill/workflows/create-new-skill.md +196 -0
- package/dist/resources/skills/create-skill/workflows/get-guidance.md +121 -0
- package/dist/resources/skills/create-skill/workflows/upgrade-to-router.md +161 -0
- package/dist/resources/skills/create-skill/workflows/verify-skill.md +204 -0
- package/dist/resources/skills/react-best-practices/SKILL.md +1 -1
- package/dist/worktree-cli.d.ts +34 -0
- package/dist/worktree-cli.js +294 -0
- package/dist/worktree-name-gen.d.ts +7 -0
- package/dist/worktree-name-gen.js +44 -0
- package/package.json +1 -1
- package/packages/native/dist/native.d.ts +2 -0
- package/packages/native/dist/native.js +19 -5
- package/packages/native/src/native.ts +23 -9
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +13 -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 +3 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +13 -0
- package/packages/pi-coding-agent/src/core/lsp/client.ts +3 -0
- package/pkg/package.json +1 -1
- package/src/resources/extensions/async-jobs/extension-manifest.json +13 -0
- package/src/resources/extensions/bg-shell/extension-manifest.json +14 -0
- package/src/resources/extensions/bg-shell/process-manager.ts +13 -0
- package/src/resources/extensions/browser-tools/extension-manifest.json +37 -0
- package/src/resources/extensions/context7/extension-manifest.json +12 -0
- package/src/resources/extensions/google-search/extension-manifest.json +12 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +31 -0
- package/src/resources/extensions/gsd/auto-dispatch.ts +32 -3
- package/src/resources/extensions/gsd/auto-post-unit.ts +45 -13
- package/src/resources/extensions/gsd/auto-prompts.ts +40 -17
- package/src/resources/extensions/gsd/auto-recovery.ts +18 -23
- package/src/resources/extensions/gsd/auto-start.ts +18 -32
- package/src/resources/extensions/gsd/auto-worktree.ts +21 -182
- package/src/resources/extensions/gsd/auto.ts +2 -24
- package/src/resources/extensions/gsd/captures.ts +4 -10
- package/src/resources/extensions/gsd/commands-extensions.ts +328 -0
- package/src/resources/extensions/gsd/commands-handlers.ts +22 -2
- package/src/resources/extensions/gsd/commands-logs.ts +13 -14
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +44 -14
- package/src/resources/extensions/gsd/commands-workflow-templates.ts +544 -0
- package/src/resources/extensions/gsd/commands.ts +108 -24
- package/src/resources/extensions/gsd/dashboard-overlay.ts +2 -1
- package/src/resources/extensions/gsd/detection.ts +2 -1
- package/src/resources/extensions/gsd/doctor-checks.ts +49 -1
- package/src/resources/extensions/gsd/doctor-types.ts +3 -1
- package/src/resources/extensions/gsd/extension-manifest.json +18 -0
- package/src/resources/extensions/gsd/forensics.ts +2 -2
- package/src/resources/extensions/gsd/git-service.ts +3 -2
- package/src/resources/extensions/gsd/gitignore.ts +9 -63
- package/src/resources/extensions/gsd/gsd-db.ts +1 -165
- package/src/resources/extensions/gsd/guided-flow.ts +8 -5
- package/src/resources/extensions/gsd/index.ts +16 -3
- package/src/resources/extensions/gsd/json-persistence.ts +16 -1
- package/src/resources/extensions/gsd/md-importer.ts +3 -2
- package/src/resources/extensions/gsd/mechanical-completion.ts +430 -0
- package/src/resources/extensions/gsd/migrate/command.ts +3 -2
- package/src/resources/extensions/gsd/migrate/writer.ts +2 -1
- package/src/resources/extensions/gsd/migrate-external.ts +123 -0
- package/src/resources/extensions/gsd/paths.ts +24 -2
- package/src/resources/extensions/gsd/post-unit-hooks.ts +6 -5
- package/src/resources/extensions/gsd/preferences-models.ts +7 -1
- package/src/resources/extensions/gsd/preferences-validation.ts +2 -1
- package/src/resources/extensions/gsd/preferences.ts +10 -5
- package/src/resources/extensions/gsd/prompts/discuss-headless.md +4 -2
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +26 -2
- package/src/resources/extensions/gsd/prompts/plan-slice.md +15 -1
- package/src/resources/extensions/gsd/prompts/workflow-start.md +28 -0
- package/src/resources/extensions/gsd/queue-order.ts +10 -11
- package/src/resources/extensions/gsd/repo-identity.ts +148 -0
- package/src/resources/extensions/gsd/resource-version.ts +99 -0
- package/src/resources/extensions/gsd/roadmap-slices.ts +22 -7
- package/src/resources/extensions/gsd/session-forensics.ts +4 -3
- package/src/resources/extensions/gsd/session-lock.ts +53 -4
- package/src/resources/extensions/gsd/session-status-io.ts +23 -41
- package/src/resources/extensions/gsd/tests/activity-log.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/auto-budget-alerts.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +3 -3
- package/src/resources/extensions/gsd/tests/auto-skip-loop.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/auto-worktree.test.ts +0 -58
- package/src/resources/extensions/gsd/tests/doctor-runtime.test.ts +3 -4
- package/src/resources/extensions/gsd/tests/extension-selector-separator.test.ts +60 -38
- package/src/resources/extensions/gsd/tests/feature-branch-lifecycle-integration.test.ts +5 -18
- package/src/resources/extensions/gsd/tests/git-service.test.ts +10 -37
- package/src/resources/extensions/gsd/tests/knowledge.test.ts +4 -4
- package/src/resources/extensions/gsd/tests/mechanical-completion.test.ts +356 -0
- package/src/resources/extensions/gsd/tests/parallel-workers-multi-milestone-e2e.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/token-profile.test.ts +14 -16
- package/src/resources/extensions/gsd/tests/workflow-templates.test.ts +173 -0
- package/src/resources/extensions/gsd/triage-resolution.ts +2 -1
- package/src/resources/extensions/gsd/types.ts +2 -0
- package/src/resources/extensions/gsd/workflow-templates/bugfix.md +87 -0
- package/src/resources/extensions/gsd/workflow-templates/dep-upgrade.md +74 -0
- package/src/resources/extensions/gsd/workflow-templates/full-project.md +41 -0
- package/src/resources/extensions/gsd/workflow-templates/hotfix.md +45 -0
- package/src/resources/extensions/gsd/workflow-templates/refactor.md +83 -0
- package/src/resources/extensions/gsd/workflow-templates/registry.json +85 -0
- package/src/resources/extensions/gsd/workflow-templates/security-audit.md +73 -0
- package/src/resources/extensions/gsd/workflow-templates/small-feature.md +81 -0
- package/src/resources/extensions/gsd/workflow-templates/spike.md +69 -0
- package/src/resources/extensions/gsd/workflow-templates.ts +241 -0
- package/src/resources/extensions/gsd/worktree-command.ts +1 -11
- package/src/resources/extensions/gsd/worktree-manager.ts +3 -2
- package/src/resources/extensions/gsd/worktree.ts +42 -5
- package/src/resources/extensions/mac-tools/extension-manifest.json +16 -0
- package/src/resources/extensions/mcp-client/index.ts +459 -0
- package/src/resources/extensions/mcporter/extension-manifest.json +12 -0
- package/src/resources/extensions/remote-questions/discord-adapter.ts +8 -19
- package/src/resources/extensions/remote-questions/extension-manifest.json +11 -0
- package/src/resources/extensions/remote-questions/http-client.ts +76 -0
- package/src/resources/extensions/remote-questions/slack-adapter.ts +11 -17
- package/src/resources/extensions/remote-questions/telegram-adapter.ts +8 -19
- package/src/resources/extensions/search-the-web/extension-manifest.json +13 -0
- package/src/resources/extensions/slash-commands/extension-manifest.json +11 -0
- package/src/resources/extensions/subagent/extension-manifest.json +13 -0
- package/src/resources/extensions/ttsr/extension-manifest.json +11 -0
- package/src/resources/extensions/universal-config/extension-manifest.json +13 -0
- package/src/resources/extensions/voice/extension-manifest.json +12 -0
- package/src/resources/skills/create-gsd-extension/SKILL.md +87 -0
- package/src/resources/skills/create-gsd-extension/references/compaction-session-control.md +77 -0
- package/src/resources/skills/create-gsd-extension/references/custom-commands.md +139 -0
- package/src/resources/skills/create-gsd-extension/references/custom-rendering.md +108 -0
- package/src/resources/skills/create-gsd-extension/references/custom-tools.md +183 -0
- package/src/resources/skills/create-gsd-extension/references/custom-ui.md +490 -0
- package/src/resources/skills/create-gsd-extension/references/events-reference.md +126 -0
- package/src/resources/skills/create-gsd-extension/references/extension-lifecycle.md +64 -0
- package/src/resources/skills/create-gsd-extension/references/extensionapi-reference.md +75 -0
- package/src/resources/skills/create-gsd-extension/references/extensioncontext-reference.md +53 -0
- package/src/resources/skills/create-gsd-extension/references/key-rules-gotchas.md +36 -0
- package/src/resources/skills/create-gsd-extension/references/mode-behavior.md +32 -0
- package/src/resources/skills/create-gsd-extension/references/model-provider-management.md +89 -0
- package/src/resources/skills/create-gsd-extension/references/packaging-distribution.md +55 -0
- package/src/resources/skills/create-gsd-extension/references/remote-execution-overrides.md +90 -0
- package/src/resources/skills/create-gsd-extension/references/state-management.md +70 -0
- package/src/resources/skills/create-gsd-extension/references/system-prompt-modification.md +52 -0
- package/src/resources/skills/create-gsd-extension/templates/extension-skeleton.ts +51 -0
- package/src/resources/skills/create-gsd-extension/templates/stateful-tool-skeleton.ts +143 -0
- package/src/resources/skills/create-gsd-extension/workflows/add-capability.md +57 -0
- package/src/resources/skills/create-gsd-extension/workflows/create-extension.md +156 -0
- package/src/resources/skills/create-gsd-extension/workflows/debug-extension.md +74 -0
- package/src/resources/skills/create-skill/SKILL.md +184 -0
- package/src/resources/skills/create-skill/references/api-security.md +226 -0
- package/src/resources/skills/create-skill/references/be-clear-and-direct.md +531 -0
- package/src/resources/skills/create-skill/references/common-patterns.md +595 -0
- package/src/resources/skills/create-skill/references/core-principles.md +437 -0
- package/src/resources/skills/create-skill/references/executable-code.md +175 -0
- package/src/resources/skills/create-skill/references/gsd-skill-ecosystem.md +68 -0
- package/src/resources/skills/create-skill/references/iteration-and-testing.md +474 -0
- package/src/resources/skills/create-skill/references/recommended-structure.md +168 -0
- package/src/resources/skills/create-skill/references/skill-structure.md +372 -0
- package/src/resources/skills/create-skill/references/use-xml-tags.md +466 -0
- package/src/resources/skills/create-skill/references/using-scripts.md +113 -0
- package/src/resources/skills/create-skill/references/using-templates.md +112 -0
- package/src/resources/skills/create-skill/references/workflows-and-validation.md +510 -0
- package/src/resources/skills/create-skill/templates/router-skill.md +73 -0
- package/src/resources/skills/create-skill/templates/simple-skill.md +33 -0
- package/src/resources/skills/create-skill/workflows/add-reference.md +96 -0
- package/src/resources/skills/create-skill/workflows/add-script.md +93 -0
- package/src/resources/skills/create-skill/workflows/add-template.md +74 -0
- package/src/resources/skills/create-skill/workflows/add-workflow.md +120 -0
- package/src/resources/skills/create-skill/workflows/audit-skill.md +148 -0
- package/src/resources/skills/create-skill/workflows/create-new-skill.md +196 -0
- package/src/resources/skills/create-skill/workflows/get-guidance.md +121 -0
- package/src/resources/skills/create-skill/workflows/upgrade-to-router.md +161 -0
- package/src/resources/skills/create-skill/workflows/verify-skill.md +204 -0
- package/src/resources/skills/react-best-practices/SKILL.md +1 -1
- package/dist/resources/extensions/gsd/auto-worktree-sync.ts +0 -198
- package/dist/resources/extensions/gsd/tests/worktree-db-integration.test.ts +0 -205
- package/dist/resources/extensions/gsd/tests/worktree-db.test.ts +0 -442
- package/dist/resources/extensions/mcporter/index.ts +0 -525
- package/src/resources/extensions/gsd/auto-worktree-sync.ts +0 -198
- package/src/resources/extensions/gsd/tests/worktree-db-integration.test.ts +0 -205
- package/src/resources/extensions/gsd/tests/worktree-db.test.ts +0 -442
- package/src/resources/extensions/mcporter/index.ts +0 -525
package/README.md
CHANGED
|
@@ -24,20 +24,21 @@ One command. Walk away. Come back to a built project with clean git history.
|
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
## What's New in v2.
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
- **
|
|
34
|
-
- **
|
|
35
|
-
- **CI/CD Pipeline** — three-stage promotion (Dev → Test → Prod) with automated versioning
|
|
36
|
-
- **Docker support** — containerized builds with multi-stage Dockerfile
|
|
37
|
-
- **`/gsd keys`** — full API key lifecycle management (list, add, remove, test, rotate, doctor)
|
|
38
|
-
- **Milestone parking** — park in-progress milestones to work on something else, unpark to resume
|
|
39
|
-
- **Studio** — experimental Electron desktop app (early preview)
|
|
27
|
+
## What's New in v2.29
|
|
28
|
+
|
|
29
|
+
- **Node.js 24 LTS** — CI, Docker, and package config all upgraded to Node 24 (Krypton)
|
|
30
|
+
- **`searchExcludeDirs` setting** — blacklist directories from `@` file autocomplete (e.g., `node_modules`, `dist`)
|
|
31
|
+
- **Automated releases** — prod-release now auto-generates changelogs, bumps versions, and publishes to npm
|
|
32
|
+
- **`/gsd logs`** — browse activity, debug, and metrics logs from within a session
|
|
33
|
+
- **Configurable screenshots** — browser-tools now support custom resolution, format, and quality
|
|
34
|
+
- **Pre-commit secret scanning** — automatic detection of hardcoded secrets in CI and locally
|
|
40
35
|
- **Per-project MCP config** — `.gsd/mcp.json` for project-scoped MCP server definitions
|
|
36
|
+
- **API request metrics** — track request counts for Copilot/subscription users
|
|
37
|
+
- **`/gsd keys`** — full API key lifecycle management (list, add, remove, test, rotate, doctor)
|
|
38
|
+
- **Advisory verification gate** — auto-discovered checks (lint/test from package.json) no longer doom-loop on pre-existing errors
|
|
39
|
+
- **Worktree living doc sync** — DECISIONS, REQUIREMENTS, PROJECT, and KNOWLEDGE now sync between worktree and project root
|
|
40
|
+
- **Windows non-ASCII path support** — `cpSync` fallback for usernames with special characters
|
|
41
|
+
- **`needs-discussion` routing** — milestones with draft context now route to the interactive discussion flow instead of stopping
|
|
41
42
|
|
|
42
43
|
See the full [Changelog](./CHANGELOG.md) for details.
|
|
43
44
|
|
|
@@ -62,6 +63,8 @@ Full documentation is available in the [`docs/`](./docs/) directory:
|
|
|
62
63
|
- **[CI/CD Pipeline](./docs/ci-cd-pipeline.md)** — three-stage promotion pipeline (Dev → Test → Prod)
|
|
63
64
|
- **[VS Code Extension](./vscode-extension/README.md)** — chat participant, sidebar dashboard, RPC integration
|
|
64
65
|
- **[Visualizer](./docs/visualizer.md)** — workflow visualizer with stats and discussion status
|
|
66
|
+
- **[Remote Questions](./docs/remote-questions.md)** — route decisions to Slack or Discord when human input is needed
|
|
67
|
+
- **[Dynamic Model Routing](./docs/dynamic-model-routing.md)** — complexity-based model selection and budget pressure
|
|
65
68
|
- **[Migration from v1](./docs/migration.md)** — `.planning` → `.gsd` migration
|
|
66
69
|
|
|
67
70
|
---
|
|
@@ -175,7 +178,7 @@ Auto mode is a state machine driven by files on disk. It reads `.gsd/STATE.md`,
|
|
|
175
178
|
|
|
176
179
|
9. **Adaptive replanning** — After each slice completes, the roadmap is reassessed. If the work revealed new information that changes the plan, slices are reordered, added, or removed before continuing.
|
|
177
180
|
|
|
178
|
-
10. **Verification enforcement** — Configure shell commands (`npm run lint`, `npm run test`, etc.) that run automatically after task execution. Failures trigger auto-fix retries before advancing. Configurable via `verification_commands`, `verification_auto_fix`, and `verification_max_retries` preferences.
|
|
181
|
+
10. **Verification enforcement** — Configure shell commands (`npm run lint`, `npm run test`, etc.) that run automatically after task execution. Failures trigger auto-fix retries before advancing. Auto-discovered checks from `package.json` run in advisory mode — they log warnings but don't block on pre-existing errors. Configurable via `verification_commands`, `verification_auto_fix`, and `verification_max_retries` preferences.
|
|
179
182
|
|
|
180
183
|
11. **Milestone validation** — After all slices complete, a `validate-milestone` gate compares roadmap success criteria against actual results before sealing the milestone.
|
|
181
184
|
|
|
@@ -307,6 +310,7 @@ On first run, GSD launches a branded setup wizard that walks you through LLM pro
|
|
|
307
310
|
| `/gsd cleanup` | Archive phase directories from completed milestones |
|
|
308
311
|
| `/gsd doctor` | Runtime health checks with auto-fix for common issues |
|
|
309
312
|
| `/gsd keys` | API key manager — list, add, remove, test, rotate, doctor |
|
|
313
|
+
| `/gsd logs` | Browse activity, debug, and metrics logs |
|
|
310
314
|
| `/gsd export --html` | Generate HTML report for current or completed milestone |
|
|
311
315
|
| `/worktree` (`/wt`) | Git worktree lifecycle — create, switch, merge, remove |
|
|
312
316
|
| `/voice` | Toggle real-time speech-to-text (macOS, Linux) |
|
|
@@ -447,6 +451,7 @@ auto_report: true
|
|
|
447
451
|
| `verification_max_retries` | Max retries for verification failures (default: 2) |
|
|
448
452
|
| `require_slice_discussion` | Pause auto-mode before each slice for human discussion review |
|
|
449
453
|
| `auto_report` | Auto-generate HTML reports after milestone completion (default: true) |
|
|
454
|
+
| `searchExcludeDirs` | Directories to exclude from `@` file autocomplete (e.g., `["node_modules", ".git", "dist"]`) |
|
|
450
455
|
|
|
451
456
|
### Agent Instructions
|
|
452
457
|
|
|
@@ -478,7 +483,7 @@ See the full [Token Optimization Guide](./docs/token-optimization.md) for detail
|
|
|
478
483
|
|
|
479
484
|
### Bundled Tools
|
|
480
485
|
|
|
481
|
-
GSD ships with
|
|
486
|
+
GSD ships with 16 extensions, all loaded automatically:
|
|
482
487
|
|
|
483
488
|
| Extension | What it provides |
|
|
484
489
|
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -490,12 +495,14 @@ GSD ships with 14 extensions, all loaded automatically:
|
|
|
490
495
|
| **Background Shell** | Long-running process management with readiness detection |
|
|
491
496
|
| **Subagent** | Delegated tasks with isolated context windows |
|
|
492
497
|
| **Mac Tools** | macOS native app automation via Accessibility APIs |
|
|
493
|
-
| **
|
|
498
|
+
| **MCP Client** | Native MCP server integration via @modelcontextprotocol/sdk |
|
|
494
499
|
| **Voice** | Real-time speech-to-text transcription (macOS, Linux — Ubuntu 22.04+) |
|
|
495
500
|
| **Slash Commands** | Custom command creation |
|
|
496
501
|
| **LSP** | Language Server Protocol integration — diagnostics, go-to-definition, references, hover, symbols, rename, code actions |
|
|
497
502
|
| **Ask User Questions** | Structured user input with single/multi-select |
|
|
498
503
|
| **Secure Env Collect** | Masked secret collection without manual .env editing |
|
|
504
|
+
| **Remote Questions** | Route decisions to Slack/Discord when human input is needed in headless/CI mode |
|
|
505
|
+
| **Universal Config** | Discover and import MCP servers and rules from other AI coding tools |
|
|
499
506
|
|
|
500
507
|
### Bundled Agents
|
|
501
508
|
|
|
@@ -597,7 +604,7 @@ gsd (CLI binary)
|
|
|
597
604
|
|
|
598
605
|
## Requirements
|
|
599
606
|
|
|
600
|
-
- **Node.js** ≥
|
|
607
|
+
- **Node.js** ≥ 22.0.0 (24 LTS recommended)
|
|
601
608
|
- **An LLM provider** — any of the 20+ supported providers (see [Use Any Model](#use-any-model))
|
|
602
609
|
- **Git** — initialized automatically if missing
|
|
603
610
|
|
package/dist/cli.js
CHANGED
|
@@ -59,6 +59,15 @@ function parseCliArgs(argv) {
|
|
|
59
59
|
process.stdout.write((process.env.GSD_VERSION || '0.0.0') + '\n');
|
|
60
60
|
process.exit(0);
|
|
61
61
|
}
|
|
62
|
+
else if (arg === '--worktree' || arg === '-w') {
|
|
63
|
+
// -w with no value → auto-generate name; -w <name> → use that name
|
|
64
|
+
if (i + 1 < args.length && !args[i + 1].startsWith('-')) {
|
|
65
|
+
flags.worktree = args[++i];
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
flags.worktree = true;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
62
71
|
else if (arg === '--help' || arg === '-h') {
|
|
63
72
|
printHelp(process.env.GSD_VERSION || '0.0.0');
|
|
64
73
|
process.exit(0);
|
|
@@ -343,6 +352,48 @@ if (isPrintMode) {
|
|
|
343
352
|
process.exit(0);
|
|
344
353
|
}
|
|
345
354
|
// ---------------------------------------------------------------------------
|
|
355
|
+
// Worktree subcommand — `gsd worktree <list|merge|clean|remove>`
|
|
356
|
+
// ---------------------------------------------------------------------------
|
|
357
|
+
if (cliFlags.messages[0] === 'worktree' || cliFlags.messages[0] === 'wt') {
|
|
358
|
+
const { handleList, handleMerge, handleClean, handleRemove } = await import('./worktree-cli.js');
|
|
359
|
+
const sub = cliFlags.messages[1];
|
|
360
|
+
const subArgs = cliFlags.messages.slice(2);
|
|
361
|
+
if (!sub || sub === 'list') {
|
|
362
|
+
handleList(process.cwd());
|
|
363
|
+
}
|
|
364
|
+
else if (sub === 'merge') {
|
|
365
|
+
await handleMerge(process.cwd(), subArgs);
|
|
366
|
+
}
|
|
367
|
+
else if (sub === 'clean') {
|
|
368
|
+
handleClean(process.cwd());
|
|
369
|
+
}
|
|
370
|
+
else if (sub === 'remove' || sub === 'rm') {
|
|
371
|
+
handleRemove(process.cwd(), subArgs);
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
process.stderr.write(`Unknown worktree command: ${sub}\n`);
|
|
375
|
+
process.stderr.write('Commands: list, merge [name], clean, remove <name>\n');
|
|
376
|
+
}
|
|
377
|
+
process.exit(0);
|
|
378
|
+
}
|
|
379
|
+
// ---------------------------------------------------------------------------
|
|
380
|
+
// Worktree flag (-w) — create/resume a worktree for the interactive session
|
|
381
|
+
// ---------------------------------------------------------------------------
|
|
382
|
+
if (cliFlags.worktree) {
|
|
383
|
+
const { handleWorktreeFlag } = await import('./worktree-cli.js');
|
|
384
|
+
handleWorktreeFlag(cliFlags.worktree);
|
|
385
|
+
}
|
|
386
|
+
// ---------------------------------------------------------------------------
|
|
387
|
+
// Active worktree banner — remind user of unmerged worktrees on normal launch
|
|
388
|
+
// ---------------------------------------------------------------------------
|
|
389
|
+
if (!cliFlags.worktree && !isPrintMode) {
|
|
390
|
+
try {
|
|
391
|
+
const { handleStatusBanner } = await import('./worktree-cli.js');
|
|
392
|
+
handleStatusBanner(process.cwd());
|
|
393
|
+
}
|
|
394
|
+
catch { /* non-fatal */ }
|
|
395
|
+
}
|
|
396
|
+
// ---------------------------------------------------------------------------
|
|
346
397
|
// Interactive mode — normal TTY session
|
|
347
398
|
// ---------------------------------------------------------------------------
|
|
348
399
|
// Per-directory session storage — same encoding as the upstream SDK so that
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extension Registry — manages manifest reading, registry persistence, and enable/disable state.
|
|
3
|
+
*
|
|
4
|
+
* Extensions without manifests always load (backwards compatible).
|
|
5
|
+
* A fresh install has an empty registry — all extensions enabled by default.
|
|
6
|
+
* The only way an extension stops loading is an explicit `gsd extensions disable <id>`.
|
|
7
|
+
*/
|
|
8
|
+
export interface ExtensionManifest {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
version: string;
|
|
12
|
+
description: string;
|
|
13
|
+
tier: "core" | "bundled" | "community";
|
|
14
|
+
requires: {
|
|
15
|
+
platform: string;
|
|
16
|
+
};
|
|
17
|
+
provides?: {
|
|
18
|
+
tools?: string[];
|
|
19
|
+
commands?: string[];
|
|
20
|
+
hooks?: string[];
|
|
21
|
+
shortcuts?: string[];
|
|
22
|
+
};
|
|
23
|
+
dependencies?: {
|
|
24
|
+
extensions?: string[];
|
|
25
|
+
runtime?: string[];
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface ExtensionRegistryEntry {
|
|
29
|
+
id: string;
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
source: "bundled" | "user" | "project";
|
|
32
|
+
disabledAt?: string;
|
|
33
|
+
disabledReason?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ExtensionRegistry {
|
|
36
|
+
version: 1;
|
|
37
|
+
entries: Record<string, ExtensionRegistryEntry>;
|
|
38
|
+
}
|
|
39
|
+
export declare function getRegistryPath(): string;
|
|
40
|
+
export declare function loadRegistry(): ExtensionRegistry;
|
|
41
|
+
export declare function saveRegistry(registry: ExtensionRegistry): void;
|
|
42
|
+
/** Returns true if the extension is enabled (missing entries default to enabled). */
|
|
43
|
+
export declare function isExtensionEnabled(registry: ExtensionRegistry, id: string): boolean;
|
|
44
|
+
export declare function enableExtension(registry: ExtensionRegistry, id: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* Disable an extension. Returns an error string if the extension is core (cannot disable),
|
|
47
|
+
* or null on success.
|
|
48
|
+
*/
|
|
49
|
+
export declare function disableExtension(registry: ExtensionRegistry, id: string, manifest: ExtensionManifest | null, reason?: string): string | null;
|
|
50
|
+
/** Read extension-manifest.json from a directory. Returns null if missing or invalid. */
|
|
51
|
+
export declare function readManifest(extensionDir: string): ExtensionManifest | null;
|
|
52
|
+
/**
|
|
53
|
+
* Given an entry path (e.g. `.../extensions/browser-tools/index.ts`),
|
|
54
|
+
* resolve the parent directory and read its manifest.
|
|
55
|
+
*/
|
|
56
|
+
export declare function readManifestFromEntryPath(entryPath: string): ExtensionManifest | null;
|
|
57
|
+
/** Scan all subdirectories of extensionsDir for manifests. Returns a Map<id, manifest>. */
|
|
58
|
+
export declare function discoverAllManifests(extensionsDir: string): Map<string, ExtensionManifest>;
|
|
59
|
+
/**
|
|
60
|
+
* Auto-populate registry entries for newly discovered extensions.
|
|
61
|
+
* Extensions already in the registry are left untouched.
|
|
62
|
+
*/
|
|
63
|
+
export declare function ensureRegistryEntries(extensionsDir: string): void;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extension Registry — manages manifest reading, registry persistence, and enable/disable state.
|
|
3
|
+
*
|
|
4
|
+
* Extensions without manifests always load (backwards compatible).
|
|
5
|
+
* A fresh install has an empty registry — all extensions enabled by default.
|
|
6
|
+
* The only way an extension stops loading is an explicit `gsd extensions disable <id>`.
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, writeFileSync } from "node:fs";
|
|
9
|
+
import { homedir } from "node:os";
|
|
10
|
+
import { dirname, join } from "node:path";
|
|
11
|
+
// ─── Validation ─────────────────────────────────────────────────────────────
|
|
12
|
+
function isRegistry(data) {
|
|
13
|
+
if (typeof data !== "object" || data === null)
|
|
14
|
+
return false;
|
|
15
|
+
const obj = data;
|
|
16
|
+
return obj.version === 1 && typeof obj.entries === "object" && obj.entries !== null;
|
|
17
|
+
}
|
|
18
|
+
function isManifest(data) {
|
|
19
|
+
if (typeof data !== "object" || data === null)
|
|
20
|
+
return false;
|
|
21
|
+
const obj = data;
|
|
22
|
+
return (typeof obj.id === "string" &&
|
|
23
|
+
typeof obj.name === "string" &&
|
|
24
|
+
typeof obj.version === "string" &&
|
|
25
|
+
typeof obj.tier === "string");
|
|
26
|
+
}
|
|
27
|
+
// ─── Registry Path ──────────────────────────────────────────────────────────
|
|
28
|
+
export function getRegistryPath() {
|
|
29
|
+
return join(homedir(), ".gsd", "extensions", "registry.json");
|
|
30
|
+
}
|
|
31
|
+
// ─── Registry I/O ───────────────────────────────────────────────────────────
|
|
32
|
+
function defaultRegistry() {
|
|
33
|
+
return { version: 1, entries: {} };
|
|
34
|
+
}
|
|
35
|
+
export function loadRegistry() {
|
|
36
|
+
const filePath = getRegistryPath();
|
|
37
|
+
try {
|
|
38
|
+
if (!existsSync(filePath))
|
|
39
|
+
return defaultRegistry();
|
|
40
|
+
const raw = readFileSync(filePath, "utf-8");
|
|
41
|
+
const parsed = JSON.parse(raw);
|
|
42
|
+
return isRegistry(parsed) ? parsed : defaultRegistry();
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return defaultRegistry();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function saveRegistry(registry) {
|
|
49
|
+
const filePath = getRegistryPath();
|
|
50
|
+
try {
|
|
51
|
+
mkdirSync(dirname(filePath), { recursive: true });
|
|
52
|
+
const tmp = filePath + ".tmp";
|
|
53
|
+
writeFileSync(tmp, JSON.stringify(registry, null, 2), "utf-8");
|
|
54
|
+
renameSync(tmp, filePath);
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// Non-fatal — don't let persistence failures break operation
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// ─── Query ──────────────────────────────────────────────────────────────────
|
|
61
|
+
/** Returns true if the extension is enabled (missing entries default to enabled). */
|
|
62
|
+
export function isExtensionEnabled(registry, id) {
|
|
63
|
+
const entry = registry.entries[id];
|
|
64
|
+
if (!entry)
|
|
65
|
+
return true;
|
|
66
|
+
return entry.enabled;
|
|
67
|
+
}
|
|
68
|
+
// ─── Mutations ──────────────────────────────────────────────────────────────
|
|
69
|
+
export function enableExtension(registry, id) {
|
|
70
|
+
const entry = registry.entries[id];
|
|
71
|
+
if (entry) {
|
|
72
|
+
entry.enabled = true;
|
|
73
|
+
delete entry.disabledAt;
|
|
74
|
+
delete entry.disabledReason;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
registry.entries[id] = { id, enabled: true, source: "bundled" };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Disable an extension. Returns an error string if the extension is core (cannot disable),
|
|
82
|
+
* or null on success.
|
|
83
|
+
*/
|
|
84
|
+
export function disableExtension(registry, id, manifest, reason) {
|
|
85
|
+
if (manifest?.tier === "core") {
|
|
86
|
+
return `Cannot disable "${id}" — it is a core extension.`;
|
|
87
|
+
}
|
|
88
|
+
const entry = registry.entries[id];
|
|
89
|
+
if (entry) {
|
|
90
|
+
entry.enabled = false;
|
|
91
|
+
entry.disabledAt = new Date().toISOString();
|
|
92
|
+
entry.disabledReason = reason;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
registry.entries[id] = {
|
|
96
|
+
id,
|
|
97
|
+
enabled: false,
|
|
98
|
+
source: "bundled",
|
|
99
|
+
disabledAt: new Date().toISOString(),
|
|
100
|
+
disabledReason: reason,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
// ─── Manifest Reading ───────────────────────────────────────────────────────
|
|
106
|
+
/** Read extension-manifest.json from a directory. Returns null if missing or invalid. */
|
|
107
|
+
export function readManifest(extensionDir) {
|
|
108
|
+
const manifestPath = join(extensionDir, "extension-manifest.json");
|
|
109
|
+
if (!existsSync(manifestPath))
|
|
110
|
+
return null;
|
|
111
|
+
try {
|
|
112
|
+
const raw = JSON.parse(readFileSync(manifestPath, "utf-8"));
|
|
113
|
+
return isManifest(raw) ? raw : null;
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Given an entry path (e.g. `.../extensions/browser-tools/index.ts`),
|
|
121
|
+
* resolve the parent directory and read its manifest.
|
|
122
|
+
*/
|
|
123
|
+
export function readManifestFromEntryPath(entryPath) {
|
|
124
|
+
const dir = dirname(entryPath);
|
|
125
|
+
return readManifest(dir);
|
|
126
|
+
}
|
|
127
|
+
// ─── Discovery ──────────────────────────────────────────────────────────────
|
|
128
|
+
/** Scan all subdirectories of extensionsDir for manifests. Returns a Map<id, manifest>. */
|
|
129
|
+
export function discoverAllManifests(extensionsDir) {
|
|
130
|
+
const manifests = new Map();
|
|
131
|
+
if (!existsSync(extensionsDir))
|
|
132
|
+
return manifests;
|
|
133
|
+
for (const entry of readdirSync(extensionsDir, { withFileTypes: true })) {
|
|
134
|
+
if (!entry.isDirectory())
|
|
135
|
+
continue;
|
|
136
|
+
const manifest = readManifest(join(extensionsDir, entry.name));
|
|
137
|
+
if (manifest) {
|
|
138
|
+
manifests.set(manifest.id, manifest);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return manifests;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Auto-populate registry entries for newly discovered extensions.
|
|
145
|
+
* Extensions already in the registry are left untouched.
|
|
146
|
+
*/
|
|
147
|
+
export function ensureRegistryEntries(extensionsDir) {
|
|
148
|
+
const manifests = discoverAllManifests(extensionsDir);
|
|
149
|
+
if (manifests.size === 0)
|
|
150
|
+
return;
|
|
151
|
+
const registry = loadRegistry();
|
|
152
|
+
let changed = false;
|
|
153
|
+
for (const [id, manifest] of manifests) {
|
|
154
|
+
if (!registry.entries[id]) {
|
|
155
|
+
registry.entries[id] = {
|
|
156
|
+
id,
|
|
157
|
+
enabled: true,
|
|
158
|
+
source: "bundled",
|
|
159
|
+
};
|
|
160
|
+
changed = true;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (changed) {
|
|
164
|
+
saveRegistry(registry);
|
|
165
|
+
}
|
|
166
|
+
}
|
package/dist/headless.js
CHANGED
|
@@ -128,6 +128,10 @@ async function runHeadlessOnce(options, restartCount) {
|
|
|
128
128
|
let interrupted = false;
|
|
129
129
|
const startTime = Date.now();
|
|
130
130
|
const isNewMilestone = options.command === 'new-milestone';
|
|
131
|
+
// new-milestone involves codebase investigation + artifact writing — needs more time
|
|
132
|
+
if (isNewMilestone && options.timeout === 300_000) {
|
|
133
|
+
options.timeout = 600_000; // 10 minutes
|
|
134
|
+
}
|
|
131
135
|
// Supervised mode cannot share stdin with --context -
|
|
132
136
|
if (options.supervised && options.context === '-') {
|
|
133
137
|
process.stderr.write('[headless] Error: --supervised cannot be used with --context - (both require stdin)\n');
|
package/dist/help-text.js
CHANGED
|
@@ -29,6 +29,37 @@ const SUBCOMMAND_HELP = {
|
|
|
29
29
|
'',
|
|
30
30
|
'Compare with --continue (-c) which always resumes the most recent session.',
|
|
31
31
|
].join('\n'),
|
|
32
|
+
worktree: [
|
|
33
|
+
'Usage: gsd worktree <command> [args]',
|
|
34
|
+
'',
|
|
35
|
+
'Manage isolated git worktrees for parallel work streams.',
|
|
36
|
+
'',
|
|
37
|
+
'Commands:',
|
|
38
|
+
' list List worktrees with status (files changed, commits, dirty)',
|
|
39
|
+
' merge [name] Squash-merge a worktree into main and clean up',
|
|
40
|
+
' clean Remove all worktrees that have been merged or are empty',
|
|
41
|
+
' remove <name> Remove a worktree (--force to remove with unmerged changes)',
|
|
42
|
+
'',
|
|
43
|
+
'The -w flag creates/resumes worktrees for interactive sessions:',
|
|
44
|
+
' gsd -w Auto-name a new worktree, or resume the only active one',
|
|
45
|
+
' gsd -w my-feature Create or resume a named worktree',
|
|
46
|
+
'',
|
|
47
|
+
'Lifecycle:',
|
|
48
|
+
' 1. gsd -w Create worktree, start session inside it',
|
|
49
|
+
' 2. (work normally) All changes happen on the worktree branch',
|
|
50
|
+
' 3. Ctrl+C Exit — dirty work is auto-committed',
|
|
51
|
+
' 4. gsd -w Resume where you left off',
|
|
52
|
+
' 5. gsd worktree merge Squash-merge into main when done',
|
|
53
|
+
'',
|
|
54
|
+
'Examples:',
|
|
55
|
+
' gsd -w Start in a new auto-named worktree',
|
|
56
|
+
' gsd -w auth-refactor Create/resume "auth-refactor" worktree',
|
|
57
|
+
' gsd worktree list See all worktrees and their status',
|
|
58
|
+
' gsd worktree merge auth-refactor Merge and clean up',
|
|
59
|
+
' gsd worktree clean Remove all merged/empty worktrees',
|
|
60
|
+
' gsd worktree remove old-branch Remove a specific worktree',
|
|
61
|
+
' gsd worktree remove old-branch --force Remove even with unmerged changes',
|
|
62
|
+
].join('\n'),
|
|
32
63
|
headless: [
|
|
33
64
|
'Usage: gsd headless [flags] [command] [args...]',
|
|
34
65
|
'',
|
|
@@ -72,6 +103,8 @@ const SUBCOMMAND_HELP = {
|
|
|
72
103
|
'Exit codes: 0 = complete, 1 = error/timeout, 2 = blocked',
|
|
73
104
|
].join('\n'),
|
|
74
105
|
};
|
|
106
|
+
// Alias: `gsd wt --help` → same as `gsd worktree --help`
|
|
107
|
+
SUBCOMMAND_HELP['wt'] = SUBCOMMAND_HELP['worktree'];
|
|
75
108
|
export function printHelp(version) {
|
|
76
109
|
process.stdout.write(`GSD v${version} — Get Shit Done\n\n`);
|
|
77
110
|
process.stdout.write('Usage: gsd [options] [message...]\n\n');
|
|
@@ -79,6 +112,7 @@ export function printHelp(version) {
|
|
|
79
112
|
process.stdout.write(' --mode <text|json|rpc|mcp> Output mode (default: interactive)\n');
|
|
80
113
|
process.stdout.write(' --print, -p Single-shot print mode\n');
|
|
81
114
|
process.stdout.write(' --continue, -c Resume the most recent session\n');
|
|
115
|
+
process.stdout.write(' --worktree, -w [name] Start in an isolated worktree (auto-named if omitted)\n');
|
|
82
116
|
process.stdout.write(' --model <id> Override model (e.g. claude-opus-4-6)\n');
|
|
83
117
|
process.stdout.write(' --no-session Disable session persistence\n');
|
|
84
118
|
process.stdout.write(' --extension <path> Load additional extension\n');
|
|
@@ -90,6 +124,7 @@ export function printHelp(version) {
|
|
|
90
124
|
process.stdout.write(' config Re-run the setup wizard\n');
|
|
91
125
|
process.stdout.write(' update Update GSD to the latest version\n');
|
|
92
126
|
process.stdout.write(' sessions List and resume a past session\n');
|
|
127
|
+
process.stdout.write(' worktree <cmd> Manage worktrees (list, merge, clean, remove)\n');
|
|
93
128
|
process.stdout.write(' headless [cmd] [args] Run /gsd commands without TUI (default: auto)\n');
|
|
94
129
|
process.stdout.write('\nRun gsd <subcommand> --help for subcommand-specific help.\n');
|
|
95
130
|
}
|
package/dist/loader.js
CHANGED
|
@@ -29,6 +29,7 @@ if (firstArg === '--help' || firstArg === '-h') {
|
|
|
29
29
|
import { agentDir, appRoot } from './app-paths.js';
|
|
30
30
|
import { serializeBundledExtensionPaths } from './bundled-extension-paths.js';
|
|
31
31
|
import { discoverExtensionEntryPaths } from './extension-discovery.js';
|
|
32
|
+
import { loadRegistry, readManifestFromEntryPath, isExtensionEnabled } from './extension-registry.js';
|
|
32
33
|
import { renderLogo } from './logo.js';
|
|
33
34
|
// pkg/ is a shim directory: contains gsd's piConfig (package.json) and pi's
|
|
34
35
|
// theme assets (dist/modes/interactive/theme/) without a src/ directory.
|
|
@@ -86,7 +87,15 @@ process.env.GSD_WORKFLOW_PATH = join(resourcesDir, 'GSD-WORKFLOW.md');
|
|
|
86
87
|
// where initResources() will sync them.
|
|
87
88
|
const bundledExtDir = join(resourcesDir, 'extensions');
|
|
88
89
|
const agentExtDir = join(agentDir, 'extensions');
|
|
89
|
-
const
|
|
90
|
+
const registry = loadRegistry();
|
|
91
|
+
const discoveredExtensionPaths = discoverExtensionEntryPaths(bundledExtDir)
|
|
92
|
+
.map((entryPath) => join(agentExtDir, relative(bundledExtDir, entryPath)))
|
|
93
|
+
.filter((entryPath) => {
|
|
94
|
+
const manifest = readManifestFromEntryPath(entryPath);
|
|
95
|
+
if (!manifest)
|
|
96
|
+
return true; // no manifest = always load
|
|
97
|
+
return isExtensionEnabled(registry, manifest.id);
|
|
98
|
+
});
|
|
90
99
|
process.env.GSD_BUNDLED_EXTENSION_PATHS = serializeBundledExtensionPaths(discoveredExtensionPaths);
|
|
91
100
|
// Respect HTTP_PROXY / HTTPS_PROXY / NO_PROXY env vars for all outbound requests.
|
|
92
101
|
// pi-coding-agent's cli.ts sets this, but GSD bypasses that entry point — so we
|
package/dist/resource-loader.js
CHANGED
|
@@ -6,6 +6,7 @@ import { dirname, join, relative, resolve } from 'node:path';
|
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import { compareSemver } from './update-check.js';
|
|
8
8
|
import { discoverExtensionEntryPaths } from './extension-discovery.js';
|
|
9
|
+
import { loadRegistry, readManifestFromEntryPath, isExtensionEnabled, ensureRegistryEntries } from './extension-registry.js';
|
|
9
10
|
// Resolve resources directory — prefer dist/resources/ (stable, set at build time)
|
|
10
11
|
// over src/resources/ (live working tree, changes with git branch).
|
|
11
12
|
//
|
|
@@ -218,6 +219,7 @@ export function initResources(agentDir) {
|
|
|
218
219
|
// overwrite them (covers extensions, agents, and skills in one walk).
|
|
219
220
|
makeTreeWritable(agentDir);
|
|
220
221
|
writeManagedResourceManifest(agentDir);
|
|
222
|
+
ensureRegistryEntries(join(agentDir, 'extensions'));
|
|
221
223
|
}
|
|
222
224
|
/**
|
|
223
225
|
* Constructs a DefaultResourceLoader that loads extensions from both
|
|
@@ -234,10 +236,18 @@ function getBundledExtensionKeys() {
|
|
|
234
236
|
return _bundledExtensionKeys;
|
|
235
237
|
}
|
|
236
238
|
export function buildResourceLoader(agentDir) {
|
|
239
|
+
const registry = loadRegistry();
|
|
237
240
|
const piAgentDir = join(homedir(), '.pi', 'agent');
|
|
238
241
|
const piExtensionsDir = join(piAgentDir, 'extensions');
|
|
239
242
|
const bundledKeys = getBundledExtensionKeys();
|
|
240
|
-
const piExtensionPaths = discoverExtensionEntryPaths(piExtensionsDir)
|
|
243
|
+
const piExtensionPaths = discoverExtensionEntryPaths(piExtensionsDir)
|
|
244
|
+
.filter((entryPath) => !bundledKeys.has(getExtensionKey(entryPath, piExtensionsDir)))
|
|
245
|
+
.filter((entryPath) => {
|
|
246
|
+
const manifest = readManifestFromEntryPath(entryPath);
|
|
247
|
+
if (!manifest)
|
|
248
|
+
return true;
|
|
249
|
+
return isExtensionEnabled(registry, manifest.id);
|
|
250
|
+
});
|
|
241
251
|
return new DefaultResourceLoader({
|
|
242
252
|
agentDir,
|
|
243
253
|
additionalExtensionPaths: piExtensionPaths,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "async-jobs",
|
|
3
|
+
"name": "Async Jobs",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Run bash commands in the background with job tracking and cancellation",
|
|
6
|
+
"tier": "bundled",
|
|
7
|
+
"requires": { "platform": ">=2.29.0" },
|
|
8
|
+
"provides": {
|
|
9
|
+
"tools": ["async_bash", "await_job", "cancel_job"],
|
|
10
|
+
"commands": ["jobs"],
|
|
11
|
+
"hooks": ["session_start"]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "bg-shell",
|
|
3
|
+
"name": "Background Shell",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Run and manage background shell processes with interactive monitoring",
|
|
6
|
+
"tier": "bundled",
|
|
7
|
+
"requires": { "platform": ">=2.29.0" },
|
|
8
|
+
"provides": {
|
|
9
|
+
"tools": ["bg_shell"],
|
|
10
|
+
"commands": ["bg"],
|
|
11
|
+
"hooks": ["session_shutdown"],
|
|
12
|
+
"shortcuts": ["Ctrl+Alt+B"]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -375,6 +375,19 @@ export function cleanupAll(): void {
|
|
|
375
375
|
processes.clear();
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
+
/**
|
|
379
|
+
* Kill all alive, non-persistent bg processes.
|
|
380
|
+
* Called between auto-mode units to prevent orphaned servers from
|
|
381
|
+
* keeping ports bound across task boundaries (#1209).
|
|
382
|
+
*/
|
|
383
|
+
export function killSessionProcesses(): void {
|
|
384
|
+
for (const [id, bg] of processes) {
|
|
385
|
+
if (bg.alive && !bg.persistAcrossSessions) {
|
|
386
|
+
killProcess(id, "SIGTERM");
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
378
391
|
async function waitForProcessExit(bg: BgProcess, timeoutMs: number): Promise<boolean> {
|
|
379
392
|
if (!bg.alive) return true;
|
|
380
393
|
await new Promise<void>((resolve) => {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "browser-tools",
|
|
3
|
+
"name": "Browser Tools",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Playwright-based web automation, screenshots, and analysis",
|
|
6
|
+
"tier": "bundled",
|
|
7
|
+
"requires": { "platform": ">=2.29.0" },
|
|
8
|
+
"provides": {
|
|
9
|
+
"tools": [
|
|
10
|
+
"browser_navigate", "browser_go_back", "browser_go_forward", "browser_reload",
|
|
11
|
+
"browser_click", "browser_drag", "browser_type", "browser_upload_file",
|
|
12
|
+
"browser_scroll", "browser_hover", "browser_key_press", "browser_select_option",
|
|
13
|
+
"browser_set_checked", "browser_screenshot", "browser_wait_for",
|
|
14
|
+
"browser_get_console_logs", "browser_get_network_logs", "browser_get_dialog_logs",
|
|
15
|
+
"browser_evaluate", "browser_get_accessibility_tree", "browser_find",
|
|
16
|
+
"browser_get_page_source", "browser_close",
|
|
17
|
+
"browser_trace_start", "browser_trace_stop", "browser_export_har",
|
|
18
|
+
"browser_timeline", "browser_session_summary", "browser_debug_bundle",
|
|
19
|
+
"browser_assert", "browser_diff", "browser_batch",
|
|
20
|
+
"browser_snapshot_refs", "browser_get_ref", "browser_click_ref",
|
|
21
|
+
"browser_hover_ref", "browser_fill_ref",
|
|
22
|
+
"browser_list_pages", "browser_switch_page", "browser_close_page",
|
|
23
|
+
"browser_list_frames", "browser_select_frame",
|
|
24
|
+
"browser_analyze_form", "browser_fill_form",
|
|
25
|
+
"browser_find_best", "browser_act",
|
|
26
|
+
"browser_save_pdf", "browser_save_state", "browser_restore_state",
|
|
27
|
+
"browser_mock_route", "browser_block_urls", "browser_clear_routes",
|
|
28
|
+
"browser_emulate_device", "browser_extract",
|
|
29
|
+
"browser_visual_diff", "browser_zoom_region",
|
|
30
|
+
"browser_generate_test", "browser_action_cache", "browser_check_injection"
|
|
31
|
+
],
|
|
32
|
+
"hooks": ["session_shutdown"]
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"runtime": ["playwright"]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "context7",
|
|
3
|
+
"name": "Context7",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Fetch up-to-date library documentation and code examples from Context7",
|
|
6
|
+
"tier": "bundled",
|
|
7
|
+
"requires": { "platform": ">=2.29.0" },
|
|
8
|
+
"provides": {
|
|
9
|
+
"tools": ["resolve_library", "get_library_docs"],
|
|
10
|
+
"hooks": ["session_start"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "google-search",
|
|
3
|
+
"name": "Google Search",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Web search via Google with AI-synthesized answers and source citations",
|
|
6
|
+
"tier": "bundled",
|
|
7
|
+
"requires": { "platform": ">=2.29.0" },
|
|
8
|
+
"provides": {
|
|
9
|
+
"tools": ["google_search"],
|
|
10
|
+
"hooks": ["session_start"]
|
|
11
|
+
}
|
|
12
|
+
}
|