lsd-pi 1.0.0 → 1.1.0
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 +283 -648
- package/dist/cli-theme.d.ts +1 -1
- package/dist/cli-theme.js +4 -4
- package/dist/cli.js +2 -2
- package/dist/headless.js +4 -6
- package/dist/help-text.js +1 -3
- package/dist/loader.js +8 -7
- package/dist/logo.d.ts +9 -0
- package/dist/logo.js +18 -8
- package/dist/lsd-brand.d.ts +14 -0
- package/dist/lsd-brand.js +42 -0
- package/dist/onboarding.js +51 -0
- package/dist/resource-loader.d.ts +2 -3
- package/dist/resource-loader.js +18 -20
- package/dist/resources/agents/generic.md +29 -0
- package/dist/resources/agents/scout.md +1 -0
- package/dist/resources/extensions/ask-user-questions.js +0 -4
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +6 -0
- package/dist/resources/extensions/get-secrets-from-user.js +2 -3
- package/dist/resources/extensions/remote-questions/config.js +3 -3
- package/dist/resources/extensions/remote-questions/remote-command.js +4 -27
- package/dist/resources/extensions/search-the-web/native-search.js +1 -1
- package/dist/resources/extensions/search-the-web/provider.js +4 -12
- package/dist/resources/extensions/shared/debug-logger.js +103 -0
- package/dist/resources/extensions/shared/env-utils.js +17 -0
- package/dist/resources/extensions/shared/paths.js +17 -0
- package/dist/resources/extensions/shared/preferences.js +90 -0
- package/dist/resources/extensions/shared/remote-questions-config.js +27 -0
- package/dist/resources/extensions/shared/rtk-session-stats.js +2 -2
- package/dist/resources/extensions/shared/secrets-manifest.js +115 -0
- package/dist/resources/extensions/slash-commands/extension-manifest.json +2 -1
- package/dist/resources/extensions/slash-commands/index.js +2 -0
- package/dist/resources/extensions/slash-commands/plan.js +284 -0
- package/dist/resources/extensions/subagent/agents.js +1 -1
- package/dist/resources/extensions/subagent/approval-proxy.js +34 -0
- package/dist/resources/extensions/subagent/configured-model.js +9 -0
- package/dist/resources/extensions/subagent/index.js +95 -144
- package/dist/resources/extensions/subagent/model-resolution.js +12 -0
- package/dist/resources/extensions/ttsr/ttsr-manager.js +1 -1
- package/dist/resources/skills/create-skill/SKILL.md +2 -2
- package/dist/resources/skills/create-skill/references/gsd-skill-ecosystem.md +8 -7
- package/dist/resources/skills/create-skill/workflows/audit-skill.md +4 -4
- package/dist/resources/skills/create-skill/workflows/create-new-skill.md +6 -5
- package/dist/shared-paths.d.ts +1 -0
- package/dist/shared-paths.js +17 -0
- package/dist/shared-preferences.d.ts +37 -0
- package/dist/shared-preferences.js +102 -0
- package/dist/welcome-screen.js +24 -18
- package/dist/worktree-cli.d.ts +4 -49
- package/dist/worktree-cli.js +197 -113
- package/package.json +6 -6
- package/packages/pi-coding-agent/dist/cli/args.d.ts +1 -1
- package/packages/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/cli/args.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +13 -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.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +35 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +24 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts +3 -0
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js +8 -0
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.d.ts +12 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.js +77 -15
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.js +76 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/keybindings.js +2 -2
- package/packages/pi-coding-agent/dist/core/keybindings.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/package-manager.js +8 -8
- package/packages/pi-coding-agent/dist/core/package-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader-lsd-md.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/resource-loader-lsd-md.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/resource-loader-lsd-md.test.js +59 -0
- package/packages/pi-coding-agent/dist/core/resource-loader-lsd-md.test.js.map +1 -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 +32 -14
- package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +13 -3
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +25 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/skills.d.ts +4 -6
- package/packages/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/skills.js +18 -13
- package/packages/pi-coding-agent/dist/core/skills.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/slash-commands.js +1 -1
- package/packages/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tool-approval.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/tool-approval.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tool-approval.js +2 -0
- package/packages/pi-coding-agent/dist/core/tool-approval.js.map +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/main.js +1 -1
- package/packages/pi-coding-agent/dist/main.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts +5 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +11 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts +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 +11 -4
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +7 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +33 -3
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +6 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +129 -57
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +12 -3
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.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 +46 -6
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +28 -20
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/cli/args.ts +1 -1
- package/packages/pi-coding-agent/src/core/agent-session.ts +14 -1
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +30 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +36 -0
- package/packages/pi-coding-agent/src/core/compaction/compaction.ts +9 -0
- package/packages/pi-coding-agent/src/core/compaction-orchestrator.test.ts +87 -0
- package/packages/pi-coding-agent/src/core/compaction-orchestrator.ts +84 -16
- package/packages/pi-coding-agent/src/core/keybindings.ts +2 -2
- package/packages/pi-coding-agent/src/core/package-manager.ts +8 -8
- package/packages/pi-coding-agent/src/core/resource-loader-lsd-md.test.ts +67 -0
- package/packages/pi-coding-agent/src/core/resource-loader.ts +32 -13
- package/packages/pi-coding-agent/src/core/settings-manager.ts +39 -5
- package/packages/pi-coding-agent/src/core/skills.ts +20 -14
- package/packages/pi-coding-agent/src/core/slash-commands.ts +1 -1
- package/packages/pi-coding-agent/src/core/tool-approval.js +111 -0
- package/packages/pi-coding-agent/src/core/tool-approval.ts +2 -1
- package/packages/pi-coding-agent/src/index.ts +2 -0
- package/packages/pi-coding-agent/src/main.ts +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/bash-execution.ts +14 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +11 -5
- package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +40 -3
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +135 -66
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +12 -3
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +70 -6
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +28 -20
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.js +28 -20
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
- package/pkg/package.json +1 -1
- package/src/resources/agents/generic.md +29 -0
- package/src/resources/agents/scout.md +1 -0
- package/src/resources/extensions/ask-user-questions.ts +0 -3
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +6 -0
- package/src/resources/extensions/cmux/index.ts +29 -10
- package/src/resources/extensions/get-secrets-from-user.ts +2 -4
- package/src/resources/extensions/gsd/tests/test-helpers.ts +44 -44
- package/src/resources/extensions/remote-questions/config.ts +3 -3
- package/src/resources/extensions/remote-questions/remote-command.ts +4 -30
- package/src/resources/extensions/search-the-web/native-search.ts +2 -1
- package/src/resources/extensions/search-the-web/provider.ts +3 -10
- package/src/resources/extensions/shared/debug-logger.ts +102 -0
- package/src/resources/extensions/shared/env-utils.ts +18 -0
- package/src/resources/extensions/shared/paths.ts +15 -0
- package/src/resources/extensions/shared/preferences.ts +122 -0
- package/src/resources/extensions/shared/remote-questions-config.ts +30 -0
- package/src/resources/extensions/shared/rtk-session-stats.ts +2 -2
- package/src/resources/extensions/shared/secrets-manifest.ts +130 -0
- package/src/resources/extensions/slash-commands/extension-manifest.json +2 -1
- package/src/resources/extensions/slash-commands/index.ts +2 -0
- package/src/resources/extensions/slash-commands/plan.ts +328 -0
- package/src/resources/extensions/subagent/agents.ts +1 -1
- package/src/resources/extensions/subagent/approval-proxy.ts +70 -0
- package/src/resources/extensions/subagent/configured-model.ts +15 -0
- package/src/resources/extensions/subagent/index.ts +126 -185
- package/src/resources/extensions/subagent/model-resolution.ts +26 -0
- package/src/resources/extensions/ttsr/ttsr-manager.ts +1 -1
- package/src/resources/skills/create-skill/SKILL.md +2 -2
- package/src/resources/skills/create-skill/references/gsd-skill-ecosystem.md +8 -7
- package/src/resources/skills/create-skill/workflows/audit-skill.md +4 -4
- package/src/resources/skills/create-skill/workflows/create-new-skill.md +6 -5
- package/dist/resources/extensions/github-sync/cli.js +0 -284
- package/dist/resources/extensions/github-sync/index.js +0 -73
- package/dist/resources/extensions/github-sync/mapping.js +0 -67
- package/dist/resources/extensions/github-sync/sync.js +0 -425
- package/dist/resources/extensions/github-sync/templates.js +0 -118
- package/dist/resources/extensions/github-sync/types.js +0 -7
- package/dist/resources/extensions/gsd/activity-log.js +0 -153
- package/dist/resources/extensions/gsd/atomic-write.js +0 -134
- package/dist/resources/extensions/gsd/auto/detect-stuck.js +0 -49
- package/dist/resources/extensions/gsd/auto/infra-errors.js +0 -49
- package/dist/resources/extensions/gsd/auto/loop-deps.js +0 -6
- package/dist/resources/extensions/gsd/auto/loop.js +0 -256
- package/dist/resources/extensions/gsd/auto/phases.js +0 -942
- package/dist/resources/extensions/gsd/auto/resolve.js +0 -90
- package/dist/resources/extensions/gsd/auto/run-unit.js +0 -106
- package/dist/resources/extensions/gsd/auto/session.js +0 -171
- package/dist/resources/extensions/gsd/auto/types.js +0 -23
- package/dist/resources/extensions/gsd/auto-artifact-paths.js +0 -116
- package/dist/resources/extensions/gsd/auto-budget.js +0 -30
- package/dist/resources/extensions/gsd/auto-dashboard.js +0 -751
- package/dist/resources/extensions/gsd/auto-direct-dispatch.js +0 -212
- package/dist/resources/extensions/gsd/auto-dispatch.js +0 -627
- package/dist/resources/extensions/gsd/auto-loop.js +0 -13
- package/dist/resources/extensions/gsd/auto-model-selection.js +0 -192
- package/dist/resources/extensions/gsd/auto-observability.js +0 -54
- package/dist/resources/extensions/gsd/auto-post-unit.js +0 -548
- package/dist/resources/extensions/gsd/auto-prompts.js +0 -1686
- package/dist/resources/extensions/gsd/auto-recovery.js +0 -533
- package/dist/resources/extensions/gsd/auto-start.js +0 -544
- package/dist/resources/extensions/gsd/auto-supervisor.js +0 -73
- package/dist/resources/extensions/gsd/auto-timeout-recovery.js +0 -180
- package/dist/resources/extensions/gsd/auto-timers.js +0 -261
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +0 -77
- package/dist/resources/extensions/gsd/auto-unit-closeout.js +0 -30
- package/dist/resources/extensions/gsd/auto-utils.js +0 -20
- package/dist/resources/extensions/gsd/auto-verification.js +0 -163
- package/dist/resources/extensions/gsd/auto-worktree.js +0 -1645
- package/dist/resources/extensions/gsd/auto.js +0 -1087
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +0 -191
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +0 -1207
- package/dist/resources/extensions/gsd/bootstrap/dynamic-tools.js +0 -149
- package/dist/resources/extensions/gsd/bootstrap/journal-tools.js +0 -62
- package/dist/resources/extensions/gsd/bootstrap/provider-error-resume.js +0 -18
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +0 -53
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +0 -267
- package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +0 -45
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +0 -367
- package/dist/resources/extensions/gsd/bootstrap/tool-call-loop-guard.js +0 -75
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +0 -105
- package/dist/resources/extensions/gsd/branch-patterns.js +0 -13
- package/dist/resources/extensions/gsd/cache.js +0 -27
- package/dist/resources/extensions/gsd/captures.js +0 -414
- package/dist/resources/extensions/gsd/changelog.js +0 -162
- package/dist/resources/extensions/gsd/claude-import.js +0 -591
- package/dist/resources/extensions/gsd/collision-diagnostics.js +0 -226
- package/dist/resources/extensions/gsd/commands/catalog.js +0 -336
- package/dist/resources/extensions/gsd/commands/context.js +0 -87
- package/dist/resources/extensions/gsd/commands/dispatcher.js +0 -21
- package/dist/resources/extensions/gsd/commands/handlers/auto.js +0 -175
- package/dist/resources/extensions/gsd/commands/handlers/core.js +0 -249
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +0 -207
- package/dist/resources/extensions/gsd/commands/handlers/parallel.js +0 -106
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +0 -253
- package/dist/resources/extensions/gsd/commands/index.js +0 -11
- package/dist/resources/extensions/gsd/commands-bootstrap.js +0 -224
- package/dist/resources/extensions/gsd/commands-cmux.js +0 -120
- package/dist/resources/extensions/gsd/commands-config.js +0 -94
- package/dist/resources/extensions/gsd/commands-extensions.js +0 -260
- package/dist/resources/extensions/gsd/commands-handlers.js +0 -318
- package/dist/resources/extensions/gsd/commands-inspect.js +0 -77
- package/dist/resources/extensions/gsd/commands-logs.js +0 -468
- package/dist/resources/extensions/gsd/commands-maintenance.js +0 -485
- package/dist/resources/extensions/gsd/commands-mcp-status.js +0 -187
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +0 -664
- package/dist/resources/extensions/gsd/commands-rate.js +0 -31
- package/dist/resources/extensions/gsd/commands-workflow-templates.js +0 -408
- package/dist/resources/extensions/gsd/commands.js +0 -9
- package/dist/resources/extensions/gsd/complexity-classifier.js +0 -259
- package/dist/resources/extensions/gsd/constants.js +0 -15
- package/dist/resources/extensions/gsd/context-budget.js +0 -179
- package/dist/resources/extensions/gsd/context-injector.js +0 -74
- package/dist/resources/extensions/gsd/context-store.js +0 -166
- package/dist/resources/extensions/gsd/crash-recovery.js +0 -112
- package/dist/resources/extensions/gsd/custom-execution-policy.js +0 -48
- package/dist/resources/extensions/gsd/custom-verification.js +0 -147
- package/dist/resources/extensions/gsd/custom-workflow-engine.js +0 -165
- package/dist/resources/extensions/gsd/dashboard-overlay.js +0 -539
- package/dist/resources/extensions/gsd/db-writer.js +0 -518
- package/dist/resources/extensions/gsd/debug-logger.js +0 -161
- package/dist/resources/extensions/gsd/definition-loader.js +0 -352
- package/dist/resources/extensions/gsd/detection.js +0 -977
- package/dist/resources/extensions/gsd/dev-execution-policy.js +0 -24
- package/dist/resources/extensions/gsd/dev-workflow-engine.js +0 -82
- package/dist/resources/extensions/gsd/diff-context.js +0 -168
- package/dist/resources/extensions/gsd/dispatch-guard.js +0 -114
- package/dist/resources/extensions/gsd/docs/claude-marketplace-import.md +0 -214
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +0 -671
- package/dist/resources/extensions/gsd/doctor-checks.js +0 -5
- package/dist/resources/extensions/gsd/doctor-engine-checks.js +0 -168
- package/dist/resources/extensions/gsd/doctor-environment.js +0 -565
- package/dist/resources/extensions/gsd/doctor-format.js +0 -86
- package/dist/resources/extensions/gsd/doctor-git-checks.js +0 -433
- package/dist/resources/extensions/gsd/doctor-global-checks.js +0 -74
- package/dist/resources/extensions/gsd/doctor-proactive.js +0 -349
- package/dist/resources/extensions/gsd/doctor-providers.js +0 -356
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +0 -601
- package/dist/resources/extensions/gsd/doctor-types.js +0 -15
- package/dist/resources/extensions/gsd/doctor.js +0 -765
- package/dist/resources/extensions/gsd/engine-resolver.js +0 -40
- package/dist/resources/extensions/gsd/engine-types.js +0 -8
- package/dist/resources/extensions/gsd/env-utils.js +0 -29
- package/dist/resources/extensions/gsd/error-classifier.js +0 -108
- package/dist/resources/extensions/gsd/error-utils.js +0 -6
- package/dist/resources/extensions/gsd/errors.js +0 -24
- package/dist/resources/extensions/gsd/execution-policy.js +0 -8
- package/dist/resources/extensions/gsd/exit-command.js +0 -22
- package/dist/resources/extensions/gsd/export-html.js +0 -1271
- package/dist/resources/extensions/gsd/export.js +0 -264
- package/dist/resources/extensions/gsd/extension-manifest.json +0 -33
- package/dist/resources/extensions/gsd/file-watcher.js +0 -80
- package/dist/resources/extensions/gsd/files.js +0 -863
- package/dist/resources/extensions/gsd/forensics.js +0 -996
- package/dist/resources/extensions/gsd/git-constants.js +0 -11
- package/dist/resources/extensions/gsd/git-self-heal.js +0 -113
- package/dist/resources/extensions/gsd/git-service.js +0 -586
- package/dist/resources/extensions/gsd/gitignore.js +0 -285
- package/dist/resources/extensions/gsd/graph.js +0 -225
- package/dist/resources/extensions/gsd/gsd-db.js +0 -1808
- package/dist/resources/extensions/gsd/guided-flow-queue.js +0 -365
- package/dist/resources/extensions/gsd/guided-flow.js +0 -1456
- package/dist/resources/extensions/gsd/health-widget-core.js +0 -89
- package/dist/resources/extensions/gsd/health-widget.js +0 -126
- package/dist/resources/extensions/gsd/history.js +0 -119
- package/dist/resources/extensions/gsd/index.js +0 -5
- package/dist/resources/extensions/gsd/init-wizard.js +0 -487
- package/dist/resources/extensions/gsd/journal.js +0 -85
- package/dist/resources/extensions/gsd/json-persistence.js +0 -70
- package/dist/resources/extensions/gsd/jsonl-utils.js +0 -24
- package/dist/resources/extensions/gsd/key-manager.js +0 -820
- package/dist/resources/extensions/gsd/markdown-renderer.js +0 -891
- package/dist/resources/extensions/gsd/marketplace-discovery.js +0 -356
- package/dist/resources/extensions/gsd/md-importer.js +0 -623
- package/dist/resources/extensions/gsd/memory-extractor.js +0 -302
- package/dist/resources/extensions/gsd/memory-store.js +0 -366
- package/dist/resources/extensions/gsd/metrics.js +0 -419
- package/dist/resources/extensions/gsd/migrate/command.js +0 -157
- package/dist/resources/extensions/gsd/migrate/index.js +0 -7
- package/dist/resources/extensions/gsd/migrate/parser.js +0 -268
- package/dist/resources/extensions/gsd/migrate/parsers.js +0 -477
- package/dist/resources/extensions/gsd/migrate/preview.js +0 -47
- package/dist/resources/extensions/gsd/migrate/transformer.js +0 -278
- package/dist/resources/extensions/gsd/migrate/types.js +0 -4
- package/dist/resources/extensions/gsd/migrate/validator.js +0 -41
- package/dist/resources/extensions/gsd/migrate/writer.js +0 -477
- package/dist/resources/extensions/gsd/migrate-external.js +0 -207
- package/dist/resources/extensions/gsd/milestone-actions.js +0 -130
- package/dist/resources/extensions/gsd/milestone-id-utils.js +0 -28
- package/dist/resources/extensions/gsd/milestone-ids.js +0 -116
- package/dist/resources/extensions/gsd/milestone-validation-gates.js +0 -45
- package/dist/resources/extensions/gsd/model-cost-table.js +0 -66
- package/dist/resources/extensions/gsd/model-router.js +0 -246
- package/dist/resources/extensions/gsd/namespaced-registry.js +0 -322
- package/dist/resources/extensions/gsd/namespaced-resolver.js +0 -176
- package/dist/resources/extensions/gsd/native-git-bridge.js +0 -992
- package/dist/resources/extensions/gsd/native-parser-bridge.js +0 -156
- package/dist/resources/extensions/gsd/notifications.js +0 -105
- package/dist/resources/extensions/gsd/observability-validator.js +0 -422
- package/dist/resources/extensions/gsd/package.json +0 -11
- package/dist/resources/extensions/gsd/parallel-eligibility.js +0 -188
- package/dist/resources/extensions/gsd/parallel-merge.js +0 -194
- package/dist/resources/extensions/gsd/parallel-monitor-overlay.js +0 -413
- package/dist/resources/extensions/gsd/parallel-orchestrator.js +0 -850
- package/dist/resources/extensions/gsd/parsers-legacy.js +0 -256
- package/dist/resources/extensions/gsd/paths.js +0 -527
- package/dist/resources/extensions/gsd/plugin-importer.js +0 -254
- package/dist/resources/extensions/gsd/post-unit-hooks.js +0 -48
- package/dist/resources/extensions/gsd/preferences-models.js +0 -295
- package/dist/resources/extensions/gsd/preferences-skills.js +0 -160
- package/dist/resources/extensions/gsd/preferences-types.js +0 -82
- package/dist/resources/extensions/gsd/preferences-validation.js +0 -852
- package/dist/resources/extensions/gsd/preferences.js +0 -432
- package/dist/resources/extensions/gsd/progress-score.js +0 -121
- package/dist/resources/extensions/gsd/prompt-cache-optimizer.js +0 -150
- package/dist/resources/extensions/gsd/prompt-loader.js +0 -156
- package/dist/resources/extensions/gsd/prompt-ordering.js +0 -170
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +0 -66
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +0 -40
- package/dist/resources/extensions/gsd/prompts/discuss-headless.md +0 -253
- package/dist/resources/extensions/gsd/prompts/discuss.md +0 -290
- package/dist/resources/extensions/gsd/prompts/doctor-heal.md +0 -29
- package/dist/resources/extensions/gsd/prompts/execute-task.md +0 -80
- package/dist/resources/extensions/gsd/prompts/forensics.md +0 -196
- package/dist/resources/extensions/gsd/prompts/gate-evaluate.md +0 -32
- package/dist/resources/extensions/gsd/prompts/guided-complete-slice.md +0 -3
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +0 -110
- package/dist/resources/extensions/gsd/prompts/guided-discuss-slice.md +0 -62
- package/dist/resources/extensions/gsd/prompts/guided-execute-task.md +0 -3
- package/dist/resources/extensions/gsd/prompts/guided-plan-milestone.md +0 -30
- package/dist/resources/extensions/gsd/prompts/guided-plan-slice.md +0 -3
- package/dist/resources/extensions/gsd/prompts/guided-research-slice.md +0 -15
- package/dist/resources/extensions/gsd/prompts/guided-resume-task.md +0 -1
- package/dist/resources/extensions/gsd/prompts/heal-skill.md +0 -45
- package/dist/resources/extensions/gsd/prompts/plan-milestone.md +0 -108
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +0 -89
- package/dist/resources/extensions/gsd/prompts/queue.md +0 -132
- package/dist/resources/extensions/gsd/prompts/quick-task.md +0 -44
- package/dist/resources/extensions/gsd/prompts/reactive-execute.md +0 -44
- package/dist/resources/extensions/gsd/prompts/reassess-roadmap.md +0 -66
- package/dist/resources/extensions/gsd/prompts/replan-slice.md +0 -39
- package/dist/resources/extensions/gsd/prompts/research-milestone.md +0 -47
- package/dist/resources/extensions/gsd/prompts/research-slice.md +0 -57
- package/dist/resources/extensions/gsd/prompts/rethink.md +0 -83
- package/dist/resources/extensions/gsd/prompts/review-migration.md +0 -66
- package/dist/resources/extensions/gsd/prompts/rewrite-docs.md +0 -31
- package/dist/resources/extensions/gsd/prompts/run-uat.md +0 -89
- package/dist/resources/extensions/gsd/prompts/system.md +0 -220
- package/dist/resources/extensions/gsd/prompts/triage-captures.md +0 -63
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +0 -47
- package/dist/resources/extensions/gsd/prompts/workflow-start.md +0 -28
- package/dist/resources/extensions/gsd/prompts/worktree-merge.md +0 -123
- package/dist/resources/extensions/gsd/provider-error-pause.js +0 -31
- package/dist/resources/extensions/gsd/queue-order.js +0 -178
- package/dist/resources/extensions/gsd/queue-reorder-ui.js +0 -235
- package/dist/resources/extensions/gsd/quick.js +0 -206
- package/dist/resources/extensions/gsd/reactive-graph.js +0 -257
- package/dist/resources/extensions/gsd/repo-identity.js +0 -641
- package/dist/resources/extensions/gsd/reports.js +0 -409
- package/dist/resources/extensions/gsd/rethink.js +0 -120
- package/dist/resources/extensions/gsd/roadmap-mutations.js +0 -110
- package/dist/resources/extensions/gsd/roadmap-slices.js +0 -255
- package/dist/resources/extensions/gsd/routing-history.js +0 -210
- package/dist/resources/extensions/gsd/rtk-status.js +0 -43
- package/dist/resources/extensions/gsd/rule-registry.js +0 -488
- package/dist/resources/extensions/gsd/rule-types.js +0 -6
- package/dist/resources/extensions/gsd/run-manager.js +0 -134
- package/dist/resources/extensions/gsd/safe-fs.js +0 -52
- package/dist/resources/extensions/gsd/service-tier.js +0 -158
- package/dist/resources/extensions/gsd/session-forensics.js +0 -435
- package/dist/resources/extensions/gsd/session-lock.js +0 -554
- package/dist/resources/extensions/gsd/session-status-io.js +0 -134
- package/dist/resources/extensions/gsd/skill-catalog.js +0 -1026
- package/dist/resources/extensions/gsd/skill-discovery.js +0 -122
- package/dist/resources/extensions/gsd/skill-health.js +0 -326
- package/dist/resources/extensions/gsd/skill-telemetry.js +0 -121
- package/dist/resources/extensions/gsd/skills/gsd-headless/SKILL.md +0 -242
- package/dist/resources/extensions/gsd/skills/gsd-headless/references/answer-injection.md +0 -83
- package/dist/resources/extensions/gsd/skills/gsd-headless/references/commands.md +0 -64
- package/dist/resources/extensions/gsd/skills/gsd-headless/references/multi-session.md +0 -176
- package/dist/resources/extensions/gsd/state.js +0 -1407
- package/dist/resources/extensions/gsd/status-guards.js +0 -12
- package/dist/resources/extensions/gsd/structured-data-formatter.js +0 -98
- package/dist/resources/extensions/gsd/sync-lock.js +0 -89
- package/dist/resources/extensions/gsd/templates/PREFERENCES.md +0 -80
- package/dist/resources/extensions/gsd/templates/context.md +0 -76
- package/dist/resources/extensions/gsd/templates/decisions.md +0 -8
- package/dist/resources/extensions/gsd/templates/knowledge.md +0 -19
- package/dist/resources/extensions/gsd/templates/milestone-summary.md +0 -81
- package/dist/resources/extensions/gsd/templates/milestone-validation.md +0 -74
- package/dist/resources/extensions/gsd/templates/plan.md +0 -148
- package/dist/resources/extensions/gsd/templates/project.md +0 -31
- package/dist/resources/extensions/gsd/templates/reassessment.md +0 -29
- package/dist/resources/extensions/gsd/templates/requirements.md +0 -81
- package/dist/resources/extensions/gsd/templates/research.md +0 -79
- package/dist/resources/extensions/gsd/templates/roadmap.md +0 -131
- package/dist/resources/extensions/gsd/templates/runtime.md +0 -21
- package/dist/resources/extensions/gsd/templates/secrets-manifest.md +0 -22
- package/dist/resources/extensions/gsd/templates/slice-context.md +0 -58
- package/dist/resources/extensions/gsd/templates/slice-summary.md +0 -108
- package/dist/resources/extensions/gsd/templates/state.md +0 -17
- package/dist/resources/extensions/gsd/templates/task-plan.md +0 -87
- package/dist/resources/extensions/gsd/templates/task-summary.md +0 -66
- package/dist/resources/extensions/gsd/templates/uat.md +0 -54
- package/dist/resources/extensions/gsd/tests/auto-supervisor.test.mjs +0 -53
- package/dist/resources/extensions/gsd/tests/dist-redirect.mjs +0 -112
- package/dist/resources/extensions/gsd/tests/resolve-ts-hooks.mjs +0 -23
- package/dist/resources/extensions/gsd/tests/resolve-ts.mjs +0 -5
- package/dist/resources/extensions/gsd/token-counter.js +0 -54
- package/dist/resources/extensions/gsd/tools/complete-milestone.js +0 -172
- package/dist/resources/extensions/gsd/tools/complete-slice.js +0 -276
- package/dist/resources/extensions/gsd/tools/complete-task.js +0 -205
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +0 -250
- package/dist/resources/extensions/gsd/tools/plan-slice.js +0 -199
- package/dist/resources/extensions/gsd/tools/plan-task.js +0 -121
- package/dist/resources/extensions/gsd/tools/reassess-roadmap.js +0 -219
- package/dist/resources/extensions/gsd/tools/reopen-slice.js +0 -87
- package/dist/resources/extensions/gsd/tools/reopen-task.js +0 -91
- package/dist/resources/extensions/gsd/tools/replan-slice.js +0 -188
- package/dist/resources/extensions/gsd/tools/validate-milestone.js +0 -110
- package/dist/resources/extensions/gsd/triage-resolution.js +0 -322
- package/dist/resources/extensions/gsd/triage-ui.js +0 -135
- package/dist/resources/extensions/gsd/types.js +0 -4
- package/dist/resources/extensions/gsd/undo.js +0 -400
- package/dist/resources/extensions/gsd/unit-id.js +0 -7
- package/dist/resources/extensions/gsd/unit-ownership.js +0 -216
- package/dist/resources/extensions/gsd/unit-runtime.js +0 -132
- package/dist/resources/extensions/gsd/validate-directory.js +0 -143
- package/dist/resources/extensions/gsd/validation.js +0 -21
- package/dist/resources/extensions/gsd/verdict-parser.js +0 -96
- package/dist/resources/extensions/gsd/verification-evidence.js +0 -122
- package/dist/resources/extensions/gsd/verification-gate.js +0 -519
- package/dist/resources/extensions/gsd/visualizer-data.js +0 -674
- package/dist/resources/extensions/gsd/visualizer-overlay.js +0 -501
- package/dist/resources/extensions/gsd/visualizer-views.js +0 -945
- package/dist/resources/extensions/gsd/workflow-engine.js +0 -7
- package/dist/resources/extensions/gsd/workflow-events.js +0 -102
- package/dist/resources/extensions/gsd/workflow-logger.js +0 -192
- package/dist/resources/extensions/gsd/workflow-manifest.js +0 -263
- package/dist/resources/extensions/gsd/workflow-migration.js +0 -280
- package/dist/resources/extensions/gsd/workflow-projections.js +0 -405
- package/dist/resources/extensions/gsd/workflow-reconcile.js +0 -441
- package/dist/resources/extensions/gsd/workflow-templates/bugfix.md +0 -87
- package/dist/resources/extensions/gsd/workflow-templates/dep-upgrade.md +0 -74
- package/dist/resources/extensions/gsd/workflow-templates/full-project.md +0 -40
- package/dist/resources/extensions/gsd/workflow-templates/hotfix.md +0 -45
- package/dist/resources/extensions/gsd/workflow-templates/refactor.md +0 -83
- package/dist/resources/extensions/gsd/workflow-templates/registry.json +0 -85
- package/dist/resources/extensions/gsd/workflow-templates/security-audit.md +0 -73
- package/dist/resources/extensions/gsd/workflow-templates/small-feature.md +0 -81
- package/dist/resources/extensions/gsd/workflow-templates/spike.md +0 -69
- package/dist/resources/extensions/gsd/workflow-templates.js +0 -200
- package/dist/resources/extensions/gsd/workspace-index.js +0 -190
- package/dist/resources/extensions/gsd/worktree-command-bootstrap.js +0 -40
- package/dist/resources/extensions/gsd/worktree-command.js +0 -702
- package/dist/resources/extensions/gsd/worktree-health.js +0 -126
- package/dist/resources/extensions/gsd/worktree-manager.js +0 -518
- package/dist/resources/extensions/gsd/worktree-resolver.js +0 -480
- package/dist/resources/extensions/gsd/worktree.js +0 -310
- package/dist/resources/extensions/gsd/write-intercept.js +0 -84
- package/src/resources/extensions/github-sync/cli.ts +0 -364
- package/src/resources/extensions/github-sync/index.ts +0 -93
- package/src/resources/extensions/github-sync/mapping.ts +0 -81
- package/src/resources/extensions/github-sync/sync.ts +0 -557
- package/src/resources/extensions/github-sync/templates.ts +0 -183
- package/src/resources/extensions/github-sync/tests/cli.test.ts +0 -20
- package/src/resources/extensions/github-sync/tests/commit-linking.test.ts +0 -43
- package/src/resources/extensions/github-sync/tests/mapping.test.ts +0 -104
- package/src/resources/extensions/github-sync/tests/templates.test.ts +0 -110
- package/src/resources/extensions/github-sync/types.ts +0 -47
- package/src/resources/extensions/gsd/activity-log.ts +0 -163
- package/src/resources/extensions/gsd/atomic-write.ts +0 -185
- package/src/resources/extensions/gsd/auto/detect-stuck.ts +0 -60
- package/src/resources/extensions/gsd/auto/infra-errors.ts +0 -48
- package/src/resources/extensions/gsd/auto/loop-deps.ts +0 -268
- package/src/resources/extensions/gsd/auto/loop.ts +0 -318
- package/src/resources/extensions/gsd/auto/phases.ts +0 -1327
- package/src/resources/extensions/gsd/auto/resolve.ts +0 -106
- package/src/resources/extensions/gsd/auto/run-unit.ts +0 -136
- package/src/resources/extensions/gsd/auto/session.ts +0 -237
- package/src/resources/extensions/gsd/auto/types.ts +0 -117
- package/src/resources/extensions/gsd/auto-artifact-paths.ts +0 -135
- package/src/resources/extensions/gsd/auto-budget.ts +0 -32
- package/src/resources/extensions/gsd/auto-dashboard.ts +0 -880
- package/src/resources/extensions/gsd/auto-direct-dispatch.ts +0 -256
- package/src/resources/extensions/gsd/auto-dispatch.ts +0 -781
- package/src/resources/extensions/gsd/auto-loop.ts +0 -16
- package/src/resources/extensions/gsd/auto-model-selection.ts +0 -251
- package/src/resources/extensions/gsd/auto-observability.ts +0 -72
- package/src/resources/extensions/gsd/auto-post-unit.ts +0 -687
- package/src/resources/extensions/gsd/auto-prompts.ts +0 -1896
- package/src/resources/extensions/gsd/auto-recovery.ts +0 -594
- package/src/resources/extensions/gsd/auto-start.ts +0 -737
- package/src/resources/extensions/gsd/auto-supervisor.ts +0 -79
- package/src/resources/extensions/gsd/auto-timeout-recovery.ts +0 -262
- package/src/resources/extensions/gsd/auto-timers.ts +0 -313
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +0 -85
- package/src/resources/extensions/gsd/auto-unit-closeout.ts +0 -48
- package/src/resources/extensions/gsd/auto-utils.ts +0 -25
- package/src/resources/extensions/gsd/auto-verification.ts +0 -225
- package/src/resources/extensions/gsd/auto-worktree.ts +0 -1897
- package/src/resources/extensions/gsd/auto.ts +0 -1477
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +0 -219
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +0 -1286
- package/src/resources/extensions/gsd/bootstrap/dynamic-tools.ts +0 -194
- package/src/resources/extensions/gsd/bootstrap/journal-tools.ts +0 -62
- package/src/resources/extensions/gsd/bootstrap/provider-error-resume.ts +0 -53
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +0 -61
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +0 -282
- package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +0 -56
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +0 -416
- package/src/resources/extensions/gsd/bootstrap/tool-call-loop-guard.ts +0 -91
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +0 -126
- package/src/resources/extensions/gsd/branch-patterns.ts +0 -16
- package/src/resources/extensions/gsd/cache.ts +0 -29
- package/src/resources/extensions/gsd/captures.ts +0 -502
- package/src/resources/extensions/gsd/changelog.ts +0 -213
- package/src/resources/extensions/gsd/claude-import.ts +0 -705
- package/src/resources/extensions/gsd/collision-diagnostics.ts +0 -332
- package/src/resources/extensions/gsd/commands/catalog.ts +0 -359
- package/src/resources/extensions/gsd/commands/context.ts +0 -108
- package/src/resources/extensions/gsd/commands/dispatcher.ts +0 -32
- package/src/resources/extensions/gsd/commands/handlers/auto.ts +0 -184
- package/src/resources/extensions/gsd/commands/handlers/core.ts +0 -277
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +0 -210
- package/src/resources/extensions/gsd/commands/handlers/parallel.ts +0 -135
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +0 -281
- package/src/resources/extensions/gsd/commands/index.ts +0 -14
- package/src/resources/extensions/gsd/commands-bootstrap.ts +0 -253
- package/src/resources/extensions/gsd/commands-cmux.ts +0 -143
- package/src/resources/extensions/gsd/commands-config.ts +0 -108
- package/src/resources/extensions/gsd/commands-extensions.ts +0 -330
- package/src/resources/extensions/gsd/commands-handlers.ts +0 -404
- package/src/resources/extensions/gsd/commands-inspect.ts +0 -98
- package/src/resources/extensions/gsd/commands-logs.ts +0 -536
- package/src/resources/extensions/gsd/commands-maintenance.ts +0 -535
- package/src/resources/extensions/gsd/commands-mcp-status.ts +0 -247
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +0 -784
- package/src/resources/extensions/gsd/commands-rate.ts +0 -55
- package/src/resources/extensions/gsd/commands-workflow-templates.ts +0 -543
- package/src/resources/extensions/gsd/commands.ts +0 -17
- package/src/resources/extensions/gsd/complexity-classifier.ts +0 -322
- package/src/resources/extensions/gsd/constants.ts +0 -21
- package/src/resources/extensions/gsd/context-budget.ts +0 -256
- package/src/resources/extensions/gsd/context-injector.ts +0 -100
- package/src/resources/extensions/gsd/context-store.ts +0 -196
- package/src/resources/extensions/gsd/crash-recovery.ts +0 -120
- package/src/resources/extensions/gsd/custom-execution-policy.ts +0 -74
- package/src/resources/extensions/gsd/custom-verification.ts +0 -182
- package/src/resources/extensions/gsd/custom-workflow-engine.ts +0 -217
- package/src/resources/extensions/gsd/dashboard-overlay.ts +0 -659
- package/src/resources/extensions/gsd/db-writer.ts +0 -612
- package/src/resources/extensions/gsd/debug-logger.ts +0 -178
- package/src/resources/extensions/gsd/definition-loader.ts +0 -462
- package/src/resources/extensions/gsd/detection.ts +0 -1148
- package/src/resources/extensions/gsd/dev-execution-policy.ts +0 -51
- package/src/resources/extensions/gsd/dev-workflow-engine.ts +0 -110
- package/src/resources/extensions/gsd/diff-context.ts +0 -214
- package/src/resources/extensions/gsd/dispatch-guard.ts +0 -120
- package/src/resources/extensions/gsd/docs/claude-marketplace-import.md +0 -214
- package/src/resources/extensions/gsd/docs/preferences-reference.md +0 -671
- package/src/resources/extensions/gsd/doctor-checks.ts +0 -5
- package/src/resources/extensions/gsd/doctor-engine-checks.ts +0 -182
- package/src/resources/extensions/gsd/doctor-environment.ts +0 -642
- package/src/resources/extensions/gsd/doctor-format.ts +0 -98
- package/src/resources/extensions/gsd/doctor-git-checks.ts +0 -441
- package/src/resources/extensions/gsd/doctor-global-checks.ts +0 -84
- package/src/resources/extensions/gsd/doctor-proactive.ts +0 -431
- package/src/resources/extensions/gsd/doctor-providers.ts +0 -415
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +0 -627
- package/src/resources/extensions/gsd/doctor-types.ts +0 -123
- package/src/resources/extensions/gsd/doctor.ts +0 -808
- package/src/resources/extensions/gsd/engine-resolver.ts +0 -57
- package/src/resources/extensions/gsd/engine-types.ts +0 -71
- package/src/resources/extensions/gsd/env-utils.ts +0 -31
- package/src/resources/extensions/gsd/error-classifier.ts +0 -142
- package/src/resources/extensions/gsd/error-utils.ts +0 -6
- package/src/resources/extensions/gsd/errors.ts +0 -29
- package/src/resources/extensions/gsd/execution-policy.ts +0 -43
- package/src/resources/extensions/gsd/exit-command.ts +0 -30
- package/src/resources/extensions/gsd/export-html.ts +0 -1408
- package/src/resources/extensions/gsd/export.ts +0 -310
- package/src/resources/extensions/gsd/extension-manifest.json +0 -33
- package/src/resources/extensions/gsd/file-watcher.ts +0 -100
- package/src/resources/extensions/gsd/files.ts +0 -971
- package/src/resources/extensions/gsd/forensics.ts +0 -1178
- package/src/resources/extensions/gsd/git-constants.ts +0 -12
- package/src/resources/extensions/gsd/git-self-heal.ts +0 -127
- package/src/resources/extensions/gsd/git-service.ts +0 -755
- package/src/resources/extensions/gsd/gitignore.ts +0 -315
- package/src/resources/extensions/gsd/graph.ts +0 -312
- package/src/resources/extensions/gsd/gsd-db.ts +0 -2205
- package/src/resources/extensions/gsd/guided-flow-queue.ts +0 -439
- package/src/resources/extensions/gsd/guided-flow.ts +0 -1666
- package/src/resources/extensions/gsd/health-widget-core.ts +0 -111
- package/src/resources/extensions/gsd/health-widget.ts +0 -143
- package/src/resources/extensions/gsd/history.ts +0 -144
- package/src/resources/extensions/gsd/index.ts +0 -14
- package/src/resources/extensions/gsd/init-wizard.ts +0 -595
- package/src/resources/extensions/gsd/journal.ts +0 -139
- package/src/resources/extensions/gsd/json-persistence.ts +0 -75
- package/src/resources/extensions/gsd/jsonl-utils.ts +0 -21
- package/src/resources/extensions/gsd/key-manager.ts +0 -987
- package/src/resources/extensions/gsd/markdown-renderer.ts +0 -1132
- package/src/resources/extensions/gsd/marketplace-discovery.ts +0 -508
- package/src/resources/extensions/gsd/md-importer.ts +0 -742
- package/src/resources/extensions/gsd/memory-extractor.ts +0 -360
- package/src/resources/extensions/gsd/memory-store.ts +0 -452
- package/src/resources/extensions/gsd/metrics.ts +0 -575
- package/src/resources/extensions/gsd/migrate/command.ts +0 -219
- package/src/resources/extensions/gsd/migrate/index.ts +0 -42
- package/src/resources/extensions/gsd/migrate/parser.ts +0 -323
- package/src/resources/extensions/gsd/migrate/parsers.ts +0 -539
- package/src/resources/extensions/gsd/migrate/preview.ts +0 -48
- package/src/resources/extensions/gsd/migrate/transformer.ts +0 -346
- package/src/resources/extensions/gsd/migrate/types.ts +0 -370
- package/src/resources/extensions/gsd/migrate/validator.ts +0 -55
- package/src/resources/extensions/gsd/migrate/writer.ts +0 -579
- package/src/resources/extensions/gsd/migrate-external.ts +0 -210
- package/src/resources/extensions/gsd/milestone-actions.ts +0 -143
- package/src/resources/extensions/gsd/milestone-id-utils.ts +0 -32
- package/src/resources/extensions/gsd/milestone-ids.ts +0 -135
- package/src/resources/extensions/gsd/milestone-validation-gates.ts +0 -56
- package/src/resources/extensions/gsd/model-cost-table.ts +0 -84
- package/src/resources/extensions/gsd/model-router.ts +0 -315
- package/src/resources/extensions/gsd/namespaced-registry.ts +0 -467
- package/src/resources/extensions/gsd/namespaced-resolver.ts +0 -307
- package/src/resources/extensions/gsd/native-git-bridge.ts +0 -1197
- package/src/resources/extensions/gsd/native-parser-bridge.ts +0 -267
- package/src/resources/extensions/gsd/notifications.ts +0 -135
- package/src/resources/extensions/gsd/observability-validator.ts +0 -456
- package/src/resources/extensions/gsd/package.json +0 -11
- package/src/resources/extensions/gsd/parallel-eligibility.ts +0 -242
- package/src/resources/extensions/gsd/parallel-merge.ts +0 -240
- package/src/resources/extensions/gsd/parallel-monitor-overlay.ts +0 -497
- package/src/resources/extensions/gsd/parallel-orchestrator.ts +0 -1013
- package/src/resources/extensions/gsd/parsers-legacy.ts +0 -290
- package/src/resources/extensions/gsd/paths.ts +0 -561
- package/src/resources/extensions/gsd/plugin-importer.ts +0 -411
- package/src/resources/extensions/gsd/post-unit-hooks.ts +0 -86
- package/src/resources/extensions/gsd/preferences-models.ts +0 -330
- package/src/resources/extensions/gsd/preferences-skills.ts +0 -175
- package/src/resources/extensions/gsd/preferences-types.ts +0 -285
- package/src/resources/extensions/gsd/preferences-validation.ts +0 -823
- package/src/resources/extensions/gsd/preferences.ts +0 -539
- package/src/resources/extensions/gsd/progress-score.ts +0 -161
- package/src/resources/extensions/gsd/prompt-cache-optimizer.ts +0 -213
- package/src/resources/extensions/gsd/prompt-loader.ts +0 -169
- package/src/resources/extensions/gsd/prompt-ordering.ts +0 -200
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +0 -66
- package/src/resources/extensions/gsd/prompts/complete-slice.md +0 -40
- package/src/resources/extensions/gsd/prompts/discuss-headless.md +0 -253
- package/src/resources/extensions/gsd/prompts/discuss.md +0 -290
- package/src/resources/extensions/gsd/prompts/doctor-heal.md +0 -29
- package/src/resources/extensions/gsd/prompts/execute-task.md +0 -80
- package/src/resources/extensions/gsd/prompts/forensics.md +0 -196
- package/src/resources/extensions/gsd/prompts/gate-evaluate.md +0 -32
- package/src/resources/extensions/gsd/prompts/guided-complete-slice.md +0 -3
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +0 -110
- package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +0 -62
- package/src/resources/extensions/gsd/prompts/guided-execute-task.md +0 -3
- package/src/resources/extensions/gsd/prompts/guided-plan-milestone.md +0 -30
- package/src/resources/extensions/gsd/prompts/guided-plan-slice.md +0 -3
- package/src/resources/extensions/gsd/prompts/guided-research-slice.md +0 -15
- package/src/resources/extensions/gsd/prompts/guided-resume-task.md +0 -1
- package/src/resources/extensions/gsd/prompts/heal-skill.md +0 -45
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +0 -108
- package/src/resources/extensions/gsd/prompts/plan-slice.md +0 -89
- package/src/resources/extensions/gsd/prompts/queue.md +0 -132
- package/src/resources/extensions/gsd/prompts/quick-task.md +0 -44
- package/src/resources/extensions/gsd/prompts/reactive-execute.md +0 -44
- package/src/resources/extensions/gsd/prompts/reassess-roadmap.md +0 -66
- package/src/resources/extensions/gsd/prompts/replan-slice.md +0 -39
- package/src/resources/extensions/gsd/prompts/research-milestone.md +0 -47
- package/src/resources/extensions/gsd/prompts/research-slice.md +0 -57
- package/src/resources/extensions/gsd/prompts/rethink.md +0 -83
- package/src/resources/extensions/gsd/prompts/review-migration.md +0 -66
- package/src/resources/extensions/gsd/prompts/rewrite-docs.md +0 -31
- package/src/resources/extensions/gsd/prompts/run-uat.md +0 -89
- package/src/resources/extensions/gsd/prompts/system.md +0 -220
- package/src/resources/extensions/gsd/prompts/triage-captures.md +0 -63
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +0 -47
- package/src/resources/extensions/gsd/prompts/workflow-start.md +0 -28
- package/src/resources/extensions/gsd/prompts/worktree-merge.md +0 -123
- package/src/resources/extensions/gsd/provider-error-pause.ts +0 -49
- package/src/resources/extensions/gsd/queue-order.ts +0 -230
- package/src/resources/extensions/gsd/queue-reorder-ui.ts +0 -277
- package/src/resources/extensions/gsd/quick.ts +0 -257
- package/src/resources/extensions/gsd/reactive-graph.ts +0 -319
- package/src/resources/extensions/gsd/repo-identity.ts +0 -657
- package/src/resources/extensions/gsd/reports.ts +0 -504
- package/src/resources/extensions/gsd/rethink.ts +0 -160
- package/src/resources/extensions/gsd/roadmap-mutations.ts +0 -134
- package/src/resources/extensions/gsd/roadmap-slices.ts +0 -273
- package/src/resources/extensions/gsd/routing-history.ts +0 -286
- package/src/resources/extensions/gsd/rtk-status.ts +0 -53
- package/src/resources/extensions/gsd/rule-registry.ts +0 -598
- package/src/resources/extensions/gsd/rule-types.ts +0 -68
- package/src/resources/extensions/gsd/run-manager.ts +0 -180
- package/src/resources/extensions/gsd/safe-fs.ts +0 -47
- package/src/resources/extensions/gsd/service-tier.ts +0 -196
- package/src/resources/extensions/gsd/session-forensics.ts +0 -546
- package/src/resources/extensions/gsd/session-lock.ts +0 -640
- package/src/resources/extensions/gsd/session-status-io.ts +0 -179
- package/src/resources/extensions/gsd/skill-catalog.ts +0 -1085
- package/src/resources/extensions/gsd/skill-discovery.ts +0 -140
- package/src/resources/extensions/gsd/skill-health.ts +0 -418
- package/src/resources/extensions/gsd/skill-telemetry.ts +0 -137
- package/src/resources/extensions/gsd/skills/gsd-headless/SKILL.md +0 -242
- package/src/resources/extensions/gsd/skills/gsd-headless/references/answer-injection.md +0 -83
- package/src/resources/extensions/gsd/skills/gsd-headless/references/commands.md +0 -64
- package/src/resources/extensions/gsd/skills/gsd-headless/references/multi-session.md +0 -176
- package/src/resources/extensions/gsd/state.ts +0 -1554
- package/src/resources/extensions/gsd/status-guards.ts +0 -13
- package/src/resources/extensions/gsd/structured-data-formatter.ts +0 -146
- package/src/resources/extensions/gsd/sync-lock.ts +0 -94
- package/src/resources/extensions/gsd/templates/PREFERENCES.md +0 -80
- package/src/resources/extensions/gsd/templates/context.md +0 -76
- package/src/resources/extensions/gsd/templates/decisions.md +0 -8
- package/src/resources/extensions/gsd/templates/knowledge.md +0 -19
- package/src/resources/extensions/gsd/templates/milestone-summary.md +0 -81
- package/src/resources/extensions/gsd/templates/milestone-validation.md +0 -74
- package/src/resources/extensions/gsd/templates/plan.md +0 -148
- package/src/resources/extensions/gsd/templates/project.md +0 -31
- package/src/resources/extensions/gsd/templates/reassessment.md +0 -29
- package/src/resources/extensions/gsd/templates/requirements.md +0 -81
- package/src/resources/extensions/gsd/templates/research.md +0 -79
- package/src/resources/extensions/gsd/templates/roadmap.md +0 -131
- package/src/resources/extensions/gsd/templates/runtime.md +0 -21
- package/src/resources/extensions/gsd/templates/secrets-manifest.md +0 -22
- package/src/resources/extensions/gsd/templates/slice-context.md +0 -58
- package/src/resources/extensions/gsd/templates/slice-summary.md +0 -108
- package/src/resources/extensions/gsd/templates/state.md +0 -17
- package/src/resources/extensions/gsd/templates/task-plan.md +0 -87
- package/src/resources/extensions/gsd/templates/task-summary.md +0 -66
- package/src/resources/extensions/gsd/templates/uat.md +0 -54
- package/src/resources/extensions/gsd/tests/active-milestone-id-guard.test.ts +0 -91
- package/src/resources/extensions/gsd/tests/activity-log.test.ts +0 -175
- package/src/resources/extensions/gsd/tests/agent-end-retry.test.ts +0 -143
- package/src/resources/extensions/gsd/tests/atomic-write.test.ts +0 -144
- package/src/resources/extensions/gsd/tests/auto-budget-alerts.test.ts +0 -50
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +0 -211
- package/src/resources/extensions/gsd/tests/auto-lock-creation.test.ts +0 -213
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +0 -2307
- package/src/resources/extensions/gsd/tests/auto-milestone-target.test.ts +0 -61
- package/src/resources/extensions/gsd/tests/auto-mode-interactive-guard.test.ts +0 -71
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +0 -209
- package/src/resources/extensions/gsd/tests/auto-paused-session-validation.test.ts +0 -129
- package/src/resources/extensions/gsd/tests/auto-pr-bugs.test.ts +0 -88
- package/src/resources/extensions/gsd/tests/auto-session-encapsulation.test.ts +0 -255
- package/src/resources/extensions/gsd/tests/auto-stale-lock-self-kill.test.ts +0 -87
- package/src/resources/extensions/gsd/tests/auto-start-cold-db-bootstrap.test.ts +0 -37
- package/src/resources/extensions/gsd/tests/auto-start-model-capture.test.ts +0 -28
- package/src/resources/extensions/gsd/tests/auto-start-needs-discussion.test.ts +0 -218
- package/src/resources/extensions/gsd/tests/auto-supervisor.test.mjs +0 -53
- package/src/resources/extensions/gsd/tests/auto-worktree-auto-resolve.test.ts +0 -80
- package/src/resources/extensions/gsd/tests/autocomplete-regressions-1675.test.ts +0 -83
- package/src/resources/extensions/gsd/tests/browser-teardown.test.ts +0 -133
- package/src/resources/extensions/gsd/tests/budget-prediction.test.ts +0 -220
- package/src/resources/extensions/gsd/tests/bundled-workflow-defs.test.ts +0 -180
- package/src/resources/extensions/gsd/tests/cache-staleness-regression.test.ts +0 -294
- package/src/resources/extensions/gsd/tests/captures.test.ts +0 -524
- package/src/resources/extensions/gsd/tests/claude-import-marketplace-discovery.test.ts +0 -191
- package/src/resources/extensions/gsd/tests/claude-import-tui.test.ts +0 -350
- package/src/resources/extensions/gsd/tests/cli-provider-rate-limit.test.ts +0 -47
- package/src/resources/extensions/gsd/tests/cmux.test.ts +0 -215
- package/src/resources/extensions/gsd/tests/collect-from-manifest.test.ts +0 -506
- package/src/resources/extensions/gsd/tests/collision-diagnostics.test.ts +0 -705
- package/src/resources/extensions/gsd/tests/commands-config.test.ts +0 -24
- package/src/resources/extensions/gsd/tests/commands-inspect-open-db.test.ts +0 -46
- package/src/resources/extensions/gsd/tests/commands-logs.test.ts +0 -241
- package/src/resources/extensions/gsd/tests/commands-workflow-custom.test.ts +0 -283
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +0 -311
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +0 -432
- package/src/resources/extensions/gsd/tests/complete-task-rollback-evidence.test.ts +0 -106
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +0 -454
- package/src/resources/extensions/gsd/tests/completed-units-metrics-sync.test.ts +0 -111
- package/src/resources/extensions/gsd/tests/completion-hierarchy-guards.test.ts +0 -192
- package/src/resources/extensions/gsd/tests/complexity-classifier.test.ts +0 -181
- package/src/resources/extensions/gsd/tests/context-budget.test.ts +0 -352
- package/src/resources/extensions/gsd/tests/context-injector.test.ts +0 -313
- package/src/resources/extensions/gsd/tests/context-store.test.ts +0 -454
- package/src/resources/extensions/gsd/tests/cost-projection.test.ts +0 -120
- package/src/resources/extensions/gsd/tests/crash-recovery.test.ts +0 -122
- package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +0 -535
- package/src/resources/extensions/gsd/tests/custom-verification.test.ts +0 -415
- package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +0 -339
- package/src/resources/extensions/gsd/tests/dashboard-budget.test.ts +0 -329
- package/src/resources/extensions/gsd/tests/dashboard-custom-engine.test.ts +0 -87
- package/src/resources/extensions/gsd/tests/db-path-worktree-symlink.test.ts +0 -131
- package/src/resources/extensions/gsd/tests/db-writer.test.ts +0 -656
- package/src/resources/extensions/gsd/tests/debug-logger.test.ts +0 -185
- package/src/resources/extensions/gsd/tests/definition-loader.test.ts +0 -762
- package/src/resources/extensions/gsd/tests/derive-state-crossval.test.ts +0 -512
- package/src/resources/extensions/gsd/tests/derive-state-db-disk-reconcile.test.ts +0 -121
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +0 -1127
- package/src/resources/extensions/gsd/tests/derive-state-deps.test.ts +0 -641
- package/src/resources/extensions/gsd/tests/derive-state-draft.test.ts +0 -310
- package/src/resources/extensions/gsd/tests/derive-state.test.ts +0 -982
- package/src/resources/extensions/gsd/tests/detection.test.ts +0 -1190
- package/src/resources/extensions/gsd/tests/dev-engine-wrapper.test.ts +0 -314
- package/src/resources/extensions/gsd/tests/diff-context.test.ts +0 -136
- package/src/resources/extensions/gsd/tests/discord-invite-links.test.ts +0 -47
- package/src/resources/extensions/gsd/tests/discuss-empty-db-fallback.test.ts +0 -127
- package/src/resources/extensions/gsd/tests/discuss-prompt.test.ts +0 -15
- package/src/resources/extensions/gsd/tests/discuss-queued-milestones.test.ts +0 -281
- package/src/resources/extensions/gsd/tests/dispatch-guard.test.ts +0 -265
- package/src/resources/extensions/gsd/tests/dispatch-missing-task-plans.test.ts +0 -126
- package/src/resources/extensions/gsd/tests/dispatch-uat-last-completed.test.ts +0 -172
- package/src/resources/extensions/gsd/tests/dist-redirect.mjs +0 -112
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +0 -603
- package/src/resources/extensions/gsd/tests/double-merge-guard.test.ts +0 -97
- package/src/resources/extensions/gsd/tests/draft-promotion.test.ts +0 -169
- package/src/resources/extensions/gsd/tests/dynamic-routing-default.test.ts +0 -20
- package/src/resources/extensions/gsd/tests/empty-content-abort-loop.test.ts +0 -74
- package/src/resources/extensions/gsd/tests/engine-interfaces-contract.test.ts +0 -271
- package/src/resources/extensions/gsd/tests/ensure-db-open.test.ts +0 -164
- package/src/resources/extensions/gsd/tests/est-annotation-timeout.test.ts +0 -120
- package/src/resources/extensions/gsd/tests/event-replay-idempotency.test.ts +0 -140
- package/src/resources/extensions/gsd/tests/exit-command.test.ts +0 -101
- package/src/resources/extensions/gsd/tests/export-html-all.test.ts +0 -105
- package/src/resources/extensions/gsd/tests/export-html-enhancements.test.ts +0 -379
- package/src/resources/extensions/gsd/tests/extension-selector-separator.test.ts +0 -144
- package/src/resources/extensions/gsd/tests/files-loadfile-eisdir.test.ts +0 -18
- package/src/resources/extensions/gsd/tests/flag-file-db.test.ts +0 -278
- package/src/resources/extensions/gsd/tests/forensics-context-persist.test.ts +0 -129
- package/src/resources/extensions/gsd/tests/forensics-db-completion.test.ts +0 -96
- package/src/resources/extensions/gsd/tests/forensics-dedup.test.ts +0 -79
- package/src/resources/extensions/gsd/tests/forensics-error-filter.test.ts +0 -121
- package/src/resources/extensions/gsd/tests/forensics-issue-routing.test.ts +0 -43
- package/src/resources/extensions/gsd/tests/forensics-journal.test.ts +0 -162
- package/src/resources/extensions/gsd/tests/freeform-decisions.test.ts +0 -232
- package/src/resources/extensions/gsd/tests/gate-dispatch.test.ts +0 -189
- package/src/resources/extensions/gsd/tests/gate-storage.test.ts +0 -156
- package/src/resources/extensions/gsd/tests/graph-operations.test.ts +0 -593
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +0 -351
- package/src/resources/extensions/gsd/tests/gsd-inspect.test.ts +0 -114
- package/src/resources/extensions/gsd/tests/gsd-recover.test.ts +0 -440
- package/src/resources/extensions/gsd/tests/gsd-tools.test.ts +0 -406
- package/src/resources/extensions/gsd/tests/gsdroot-worktree-detection.test.ts +0 -164
- package/src/resources/extensions/gsd/tests/guided-flow-dynamic-routing.test.ts +0 -135
- package/src/resources/extensions/gsd/tests/guided-flow-session-isolation.test.ts +0 -97
- package/src/resources/extensions/gsd/tests/headless-answers.test.ts +0 -340
- package/src/resources/extensions/gsd/tests/headless-query.test.ts +0 -184
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +0 -179
- package/src/resources/extensions/gsd/tests/hook-key-parsing.test.ts +0 -107
- package/src/resources/extensions/gsd/tests/hook-model-resolution.test.ts +0 -98
- package/src/resources/extensions/gsd/tests/idle-watchdog-stall-override.test.ts +0 -125
- package/src/resources/extensions/gsd/tests/in-flight-tool-tracking.test.ts +0 -32
- package/src/resources/extensions/gsd/tests/infra-error.test.ts +0 -129
- package/src/resources/extensions/gsd/tests/init-wizard.test.ts +0 -195
- package/src/resources/extensions/gsd/tests/integration/all-milestones-complete-merge.test.ts +0 -248
- package/src/resources/extensions/gsd/tests/integration/atomic-task-closeout.test.ts +0 -72
- package/src/resources/extensions/gsd/tests/integration/auto-preflight.test.ts +0 -38
- package/src/resources/extensions/gsd/tests/integration/auto-recovery.test.ts +0 -825
- package/src/resources/extensions/gsd/tests/integration/auto-secrets-gate.test.ts +0 -194
- package/src/resources/extensions/gsd/tests/integration/auto-stash-merge.test.ts +0 -121
- package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +0 -759
- package/src/resources/extensions/gsd/tests/integration/auto-worktree.test.ts +0 -348
- package/src/resources/extensions/gsd/tests/integration/continue-here.test.ts +0 -281
- package/src/resources/extensions/gsd/tests/integration/doctor-completion-deferral.test.ts +0 -88
- package/src/resources/extensions/gsd/tests/integration/doctor-delimiter-fix.test.ts +0 -83
- package/src/resources/extensions/gsd/tests/integration/doctor-enhancements.test.ts +0 -243
- package/src/resources/extensions/gsd/tests/integration/doctor-environment-worktree.test.ts +0 -164
- package/src/resources/extensions/gsd/tests/integration/doctor-environment.test.ts +0 -403
- package/src/resources/extensions/gsd/tests/integration/doctor-false-positives.test.ts +0 -243
- package/src/resources/extensions/gsd/tests/integration/doctor-fixlevel.test.ts +0 -212
- package/src/resources/extensions/gsd/tests/integration/doctor-git.test.ts +0 -653
- package/src/resources/extensions/gsd/tests/integration/doctor-proactive.test.ts +0 -325
- package/src/resources/extensions/gsd/tests/integration/doctor-roadmap-summary-atomicity.test.ts +0 -123
- package/src/resources/extensions/gsd/tests/integration/doctor-runtime.test.ts +0 -377
- package/src/resources/extensions/gsd/tests/integration/doctor.test.ts +0 -612
- package/src/resources/extensions/gsd/tests/integration/e2e-workflow-pipeline-integration.test.ts +0 -476
- package/src/resources/extensions/gsd/tests/integration/feature-branch-lifecycle-integration.test.ts +0 -415
- package/src/resources/extensions/gsd/tests/integration/git-locale.test.ts +0 -119
- package/src/resources/extensions/gsd/tests/integration/git-self-heal.test.ts +0 -131
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +0 -1458
- package/src/resources/extensions/gsd/tests/integration/gitignore-staging-2570.test.ts +0 -150
- package/src/resources/extensions/gsd/tests/integration/gitignore-tracked-gsd.test.ts +0 -256
- package/src/resources/extensions/gsd/tests/integration/headless-command.ts +0 -534
- package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +0 -359
- package/src/resources/extensions/gsd/tests/integration/inherited-repo-home-dir.test.ts +0 -191
- package/src/resources/extensions/gsd/tests/integration/integration-lifecycle.test.ts +0 -266
- package/src/resources/extensions/gsd/tests/integration/integration-mixed-milestones.test.ts +0 -539
- package/src/resources/extensions/gsd/tests/integration/integration-proof.test.ts +0 -634
- package/src/resources/extensions/gsd/tests/integration/migrate-command.test.ts +0 -360
- package/src/resources/extensions/gsd/tests/integration/milestone-transition-worktree.test.ts +0 -166
- package/src/resources/extensions/gsd/tests/integration/parallel-merge.test.ts +0 -577
- package/src/resources/extensions/gsd/tests/integration/parallel-workers-multi-milestone-e2e.test.ts +0 -337
- package/src/resources/extensions/gsd/tests/integration/paths.test.ts +0 -98
- package/src/resources/extensions/gsd/tests/integration/plugin-importer-live.test.ts +0 -481
- package/src/resources/extensions/gsd/tests/integration/queue-completed-milestone-perf.test.ts +0 -155
- package/src/resources/extensions/gsd/tests/integration/queue-reorder-e2e.test.ts +0 -335
- package/src/resources/extensions/gsd/tests/integration/quick-branch-lifecycle.test.ts +0 -253
- package/src/resources/extensions/gsd/tests/integration/run-uat.test.ts +0 -609
- package/src/resources/extensions/gsd/tests/integration/state-machine-live-validation.test.ts +0 -959
- package/src/resources/extensions/gsd/tests/integration/token-savings.test.ts +0 -364
- package/src/resources/extensions/gsd/tests/integration/worktree-e2e.test.ts +0 -237
- package/src/resources/extensions/gsd/tests/integration-edge.test.ts +0 -223
- package/src/resources/extensions/gsd/tests/interactive-tool-idle-exemption.test.ts +0 -119
- package/src/resources/extensions/gsd/tests/iterate-engine-integration.test.ts +0 -429
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +0 -601
- package/src/resources/extensions/gsd/tests/journal-query-tool.test.ts +0 -147
- package/src/resources/extensions/gsd/tests/journal.test.ts +0 -341
- package/src/resources/extensions/gsd/tests/json-persistence-atomic.test.ts +0 -183
- package/src/resources/extensions/gsd/tests/key-manager.test.ts +0 -429
- package/src/resources/extensions/gsd/tests/knowledge.test.ts +0 -250
- package/src/resources/extensions/gsd/tests/lazy-pi-tui-import.test.ts +0 -15
- package/src/resources/extensions/gsd/tests/manifest-status.test.ts +0 -274
- package/src/resources/extensions/gsd/tests/markdown-renderer.test.ts +0 -1161
- package/src/resources/extensions/gsd/tests/marketplace-test-fixtures.ts +0 -91
- package/src/resources/extensions/gsd/tests/mcp-status.test.ts +0 -103
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +0 -416
- package/src/resources/extensions/gsd/tests/memory-extractor.test.ts +0 -254
- package/src/resources/extensions/gsd/tests/memory-leak-guards.test.ts +0 -91
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +0 -332
- package/src/resources/extensions/gsd/tests/merge-conflict-stops-loop.test.ts +0 -66
- package/src/resources/extensions/gsd/tests/metrics.test.ts +0 -384
- package/src/resources/extensions/gsd/tests/migrate-external-worktree.test.ts +0 -105
- package/src/resources/extensions/gsd/tests/migrate-hierarchy.test.ts +0 -429
- package/src/resources/extensions/gsd/tests/migrate-parser.test.ts +0 -748
- package/src/resources/extensions/gsd/tests/migrate-transformer.test.ts +0 -619
- package/src/resources/extensions/gsd/tests/migrate-validator-parsers.test.ts +0 -390
- package/src/resources/extensions/gsd/tests/migrate-writer-integration.test.ts +0 -295
- package/src/resources/extensions/gsd/tests/migrate-writer.test.ts +0 -361
- package/src/resources/extensions/gsd/tests/milestone-id-reservation.test.ts +0 -73
- package/src/resources/extensions/gsd/tests/milestone-report-path.test.ts +0 -51
- package/src/resources/extensions/gsd/tests/milestone-status-authoritative.test.ts +0 -140
- package/src/resources/extensions/gsd/tests/milestone-transition-state-rebuild.test.ts +0 -130
- package/src/resources/extensions/gsd/tests/model-cost-table.test.ts +0 -103
- package/src/resources/extensions/gsd/tests/model-isolation.test.ts +0 -157
- package/src/resources/extensions/gsd/tests/model-router.test.ts +0 -272
- package/src/resources/extensions/gsd/tests/model-unittype-mapping.test.ts +0 -220
- package/src/resources/extensions/gsd/tests/must-have-parser.test.ts +0 -278
- package/src/resources/extensions/gsd/tests/namespaced-registry.test.ts +0 -1027
- package/src/resources/extensions/gsd/tests/namespaced-resolver.test.ts +0 -671
- package/src/resources/extensions/gsd/tests/native-has-changes-cache.test.ts +0 -61
- package/src/resources/extensions/gsd/tests/next-milestone-id.test.ts +0 -23
- package/src/resources/extensions/gsd/tests/none-mode-gates.test.ts +0 -152
- package/src/resources/extensions/gsd/tests/notifications.test.ts +0 -134
- package/src/resources/extensions/gsd/tests/overrides.test.ts +0 -124
- package/src/resources/extensions/gsd/tests/parallel-budget-atomicity.test.ts +0 -330
- package/src/resources/extensions/gsd/tests/parallel-commit-scope.test.ts +0 -159
- package/src/resources/extensions/gsd/tests/parallel-crash-recovery.test.ts +0 -284
- package/src/resources/extensions/gsd/tests/parallel-eligibility-ghost.test.ts +0 -150
- package/src/resources/extensions/gsd/tests/parallel-monitor-overlay.test.ts +0 -60
- package/src/resources/extensions/gsd/tests/parallel-orchestration.test.ts +0 -736
- package/src/resources/extensions/gsd/tests/parallel-orchestrator-zombie-cleanup.test.ts +0 -277
- package/src/resources/extensions/gsd/tests/parallel-worker-lock-contention.test.ts +0 -226
- package/src/resources/extensions/gsd/tests/parallel-worker-monitoring.test.ts +0 -199
- package/src/resources/extensions/gsd/tests/park-db-sync.test.ts +0 -85
- package/src/resources/extensions/gsd/tests/park-edge-cases.test.ts +0 -253
- package/src/resources/extensions/gsd/tests/park-milestone.test.ts +0 -354
- package/src/resources/extensions/gsd/tests/parsers.test.ts +0 -1867
- package/src/resources/extensions/gsd/tests/phases-merge-error-stops-auto.test.ts +0 -103
- package/src/resources/extensions/gsd/tests/plan-milestone-queue-context.test.ts +0 -48
- package/src/resources/extensions/gsd/tests/plan-milestone-title.test.ts +0 -70
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +0 -231
- package/src/resources/extensions/gsd/tests/plan-quality-validator.test.ts +0 -474
- package/src/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +0 -298
- package/src/resources/extensions/gsd/tests/plan-slice.test.ts +0 -179
- package/src/resources/extensions/gsd/tests/plan-task.test.ts +0 -145
- package/src/resources/extensions/gsd/tests/planning-crossval.test.ts +0 -305
- package/src/resources/extensions/gsd/tests/plugin-importer.test.ts +0 -1383
- package/src/resources/extensions/gsd/tests/post-mutation-hook.test.ts +0 -171
- package/src/resources/extensions/gsd/tests/post-unit-hooks.test.ts +0 -300
- package/src/resources/extensions/gsd/tests/preferences-worktree-sync.test.ts +0 -133
- package/src/resources/extensions/gsd/tests/preferences.test.ts +0 -463
- package/src/resources/extensions/gsd/tests/preflight-context-draft-filter.test.ts +0 -115
- package/src/resources/extensions/gsd/tests/project-relocation-recovery.test.ts +0 -297
- package/src/resources/extensions/gsd/tests/projection-regression.test.ts +0 -174
- package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +0 -464
- package/src/resources/extensions/gsd/tests/prompt-cache-optimizer.test.ts +0 -314
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +0 -239
- package/src/resources/extensions/gsd/tests/prompt-db.test.ts +0 -387
- package/src/resources/extensions/gsd/tests/prompt-loader-replacement.test.ts +0 -178
- package/src/resources/extensions/gsd/tests/prompt-ordering.test.ts +0 -296
- package/src/resources/extensions/gsd/tests/prompt-tool-names.test.ts +0 -69
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +0 -479
- package/src/resources/extensions/gsd/tests/quality-gates.test.ts +0 -347
- package/src/resources/extensions/gsd/tests/queue-draft-detection.test.ts +0 -100
- package/src/resources/extensions/gsd/tests/queue-execution-guard.test.ts +0 -157
- package/src/resources/extensions/gsd/tests/queue-order.test.ts +0 -192
- package/src/resources/extensions/gsd/tests/quick-auto-guard.test.ts +0 -100
- package/src/resources/extensions/gsd/tests/quick-turn-end-cleanup.test.ts +0 -90
- package/src/resources/extensions/gsd/tests/rate-limit-model-fallback.test.ts +0 -90
- package/src/resources/extensions/gsd/tests/reactive-executor.test.ts +0 -511
- package/src/resources/extensions/gsd/tests/reactive-graph.test.ts +0 -299
- package/src/resources/extensions/gsd/tests/reassess-detection.test.ts +0 -154
- package/src/resources/extensions/gsd/tests/reassess-handler.test.ts +0 -442
- package/src/resources/extensions/gsd/tests/reassess-prompt.test.ts +0 -135
- package/src/resources/extensions/gsd/tests/reconciliation-edge-cases.test.ts +0 -162
- package/src/resources/extensions/gsd/tests/recovery-attempts-reset.test.ts +0 -176
- package/src/resources/extensions/gsd/tests/regex-hardening.test.ts +0 -281
- package/src/resources/extensions/gsd/tests/register-extension-guard.test.ts +0 -59
- package/src/resources/extensions/gsd/tests/remediation-completion-guard.test.ts +0 -110
- package/src/resources/extensions/gsd/tests/remote-questions.test.ts +0 -755
- package/src/resources/extensions/gsd/tests/remote-status.test.ts +0 -99
- package/src/resources/extensions/gsd/tests/reopen-slice.test.ts +0 -155
- package/src/resources/extensions/gsd/tests/reopen-task.test.ts +0 -165
- package/src/resources/extensions/gsd/tests/replan-handler.test.ts +0 -410
- package/src/resources/extensions/gsd/tests/replan-slice.test.ts +0 -606
- package/src/resources/extensions/gsd/tests/repo-identity-worktree.test.ts +0 -231
- package/src/resources/extensions/gsd/tests/requirements.test.ts +0 -101
- package/src/resources/extensions/gsd/tests/resolve-ts-hooks.mjs +0 -23
- package/src/resources/extensions/gsd/tests/resolve-ts.mjs +0 -5
- package/src/resources/extensions/gsd/tests/retry-diagnostic-reasoning.test.ts +0 -161
- package/src/resources/extensions/gsd/tests/retry-state-reset.test.ts +0 -305
- package/src/resources/extensions/gsd/tests/rewrite-count-persist.test.ts +0 -82
- package/src/resources/extensions/gsd/tests/roadmap-parse-regression.test.ts +0 -399
- package/src/resources/extensions/gsd/tests/roadmap-slices.test.ts +0 -395
- package/src/resources/extensions/gsd/tests/rogue-file-detection.test.ts +0 -296
- package/src/resources/extensions/gsd/tests/routing-history.test.ts +0 -229
- package/src/resources/extensions/gsd/tests/rule-registry.test.ts +0 -411
- package/src/resources/extensions/gsd/tests/run-manager.test.ts +0 -229
- package/src/resources/extensions/gsd/tests/schema-v9-sequence.test.ts +0 -176
- package/src/resources/extensions/gsd/tests/secure-env-collect.test.ts +0 -319
- package/src/resources/extensions/gsd/tests/service-tier.test.ts +0 -127
- package/src/resources/extensions/gsd/tests/session-lock-multipath.test.ts +0 -166
- package/src/resources/extensions/gsd/tests/session-lock-regression.test.ts +0 -315
- package/src/resources/extensions/gsd/tests/session-lock-transient-read.test.ts +0 -224
- package/src/resources/extensions/gsd/tests/shared-wal.test.ts +0 -209
- package/src/resources/extensions/gsd/tests/sidecar-queue.test.ts +0 -181
- package/src/resources/extensions/gsd/tests/signal-handlers.test.ts +0 -103
- package/src/resources/extensions/gsd/tests/skill-activation.test.ts +0 -233
- package/src/resources/extensions/gsd/tests/skill-catalog.test.ts +0 -193
- package/src/resources/extensions/gsd/tests/skill-lifecycle.test.ts +0 -126
- package/src/resources/extensions/gsd/tests/slice-disk-reconcile.test.ts +0 -233
- package/src/resources/extensions/gsd/tests/smart-entry-complete.test.ts +0 -53
- package/src/resources/extensions/gsd/tests/smart-entry-draft.test.ts +0 -123
- package/src/resources/extensions/gsd/tests/sqlite-unavailable-gate.test.ts +0 -65
- package/src/resources/extensions/gsd/tests/stale-milestone-id-reservation.test.ts +0 -79
- package/src/resources/extensions/gsd/tests/stale-worktree-cwd.test.ts +0 -139
- package/src/resources/extensions/gsd/tests/stalled-tool-recovery.test.ts +0 -100
- package/src/resources/extensions/gsd/tests/stash-pop-gsd-conflict.test.ts +0 -125
- package/src/resources/extensions/gsd/tests/stash-queued-context-files.test.ts +0 -305
- package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +0 -405
- package/src/resources/extensions/gsd/tests/state-derivation-parity.test.ts +0 -257
- package/src/resources/extensions/gsd/tests/state-machine-full-walkthrough.test.ts +0 -1628
- package/src/resources/extensions/gsd/tests/status-guards.test.ts +0 -30
- package/src/resources/extensions/gsd/tests/stop-auto-merge-back.test.ts +0 -67
- package/src/resources/extensions/gsd/tests/stop-auto-race-null-unit.test.ts +0 -106
- package/src/resources/extensions/gsd/tests/stop-auto-remote.test.ts +0 -158
- package/src/resources/extensions/gsd/tests/structured-data-formatter.test.ts +0 -366
- package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +0 -174
- package/src/resources/extensions/gsd/tests/subagent-agent-discovery.test.ts +0 -44
- package/src/resources/extensions/gsd/tests/summary-render-parity.test.ts +0 -221
- package/src/resources/extensions/gsd/tests/survivor-branch-complete.test.ts +0 -108
- package/src/resources/extensions/gsd/tests/symlink-numbered-variants.test.ts +0 -145
- package/src/resources/extensions/gsd/tests/sync-lock.test.ts +0 -122
- package/src/resources/extensions/gsd/tests/terminated-transient.test.ts +0 -84
- package/src/resources/extensions/gsd/tests/test-utils.ts +0 -165
- package/src/resources/extensions/gsd/tests/token-cost-display.test.ts +0 -118
- package/src/resources/extensions/gsd/tests/token-counter.test.ts +0 -129
- package/src/resources/extensions/gsd/tests/token-profile.test.ts +0 -268
- package/src/resources/extensions/gsd/tests/tool-call-loop-guard.test.ts +0 -166
- package/src/resources/extensions/gsd/tests/tool-naming.test.ts +0 -125
- package/src/resources/extensions/gsd/tests/triage-dispatch.test.ts +0 -345
- package/src/resources/extensions/gsd/tests/triage-resolution.test.ts +0 -563
- package/src/resources/extensions/gsd/tests/uat-stuck-loop-orphaned-worktree.test.ts +0 -289
- package/src/resources/extensions/gsd/tests/unborn-branch.test.ts +0 -85
- package/src/resources/extensions/gsd/tests/undo.test.ts +0 -462
- package/src/resources/extensions/gsd/tests/unique-milestone-ids.test.ts +0 -203
- package/src/resources/extensions/gsd/tests/unit-ownership.test.ts +0 -258
- package/src/resources/extensions/gsd/tests/unit-runtime.test.ts +0 -257
- package/src/resources/extensions/gsd/tests/update-command.test.ts +0 -67
- package/src/resources/extensions/gsd/tests/vacuous-truth-slices.test.ts +0 -115
- package/src/resources/extensions/gsd/tests/vacuum-recovery.test.ts +0 -154
- package/src/resources/extensions/gsd/tests/validate-directory.test.ts +0 -237
- package/src/resources/extensions/gsd/tests/validate-milestone-write-order.test.ts +0 -115
- package/src/resources/extensions/gsd/tests/validate-milestone.test.ts +0 -393
- package/src/resources/extensions/gsd/tests/validation-gate-patterns.test.ts +0 -166
- package/src/resources/extensions/gsd/tests/validation.test.ts +0 -72
- package/src/resources/extensions/gsd/tests/verdict-parser.test.ts +0 -156
- package/src/resources/extensions/gsd/tests/verification-evidence.test.ts +0 -601
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +0 -999
- package/src/resources/extensions/gsd/tests/verification-operational-gate.test.ts +0 -82
- package/src/resources/extensions/gsd/tests/visualizer-critical-path.test.ts +0 -143
- package/src/resources/extensions/gsd/tests/visualizer-data.test.ts +0 -444
- package/src/resources/extensions/gsd/tests/visualizer-overlay.test.ts +0 -235
- package/src/resources/extensions/gsd/tests/visualizer-views.test.ts +0 -716
- package/src/resources/extensions/gsd/tests/windows-path-normalization.test.ts +0 -97
- package/src/resources/extensions/gsd/tests/worker-registry.test.ts +0 -146
- package/src/resources/extensions/gsd/tests/workflow-events.test.ts +0 -205
- package/src/resources/extensions/gsd/tests/workflow-logger.test.ts +0 -403
- package/src/resources/extensions/gsd/tests/workflow-manifest.test.ts +0 -278
- package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +0 -173
- package/src/resources/extensions/gsd/tests/workflow-templates.test.ts +0 -171
- package/src/resources/extensions/gsd/tests/workspace-index.test.ts +0 -38
- package/src/resources/extensions/gsd/tests/worktree-bugfix.test.ts +0 -117
- package/src/resources/extensions/gsd/tests/worktree-db-integration.test.ts +0 -202
- package/src/resources/extensions/gsd/tests/worktree-db-respawn-truncation.test.ts +0 -140
- package/src/resources/extensions/gsd/tests/worktree-db-same-file.test.ts +0 -175
- package/src/resources/extensions/gsd/tests/worktree-db.test.ts +0 -445
- package/src/resources/extensions/gsd/tests/worktree-health-dispatch.test.ts +0 -142
- package/src/resources/extensions/gsd/tests/worktree-health.test.ts +0 -181
- package/src/resources/extensions/gsd/tests/worktree-integration.test.ts +0 -200
- package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +0 -220
- package/src/resources/extensions/gsd/tests/worktree-manager.test.ts +0 -238
- package/src/resources/extensions/gsd/tests/worktree-nested-git-safety.test.ts +0 -101
- package/src/resources/extensions/gsd/tests/worktree-post-create-hook.test.ts +0 -165
- package/src/resources/extensions/gsd/tests/worktree-preferences-sync.test.ts +0 -155
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +0 -962
- package/src/resources/extensions/gsd/tests/worktree-submodule-safety.test.ts +0 -65
- package/src/resources/extensions/gsd/tests/worktree-symlink-removal.test.ts +0 -133
- package/src/resources/extensions/gsd/tests/worktree-sync-milestones.test.ts +0 -617
- package/src/resources/extensions/gsd/tests/worktree-sync-overwrite-loop.test.ts +0 -204
- package/src/resources/extensions/gsd/tests/worktree-sync-tasks.test.ts +0 -206
- package/src/resources/extensions/gsd/tests/worktree.test.ts +0 -279
- package/src/resources/extensions/gsd/tests/write-gate.test.ts +0 -193
- package/src/resources/extensions/gsd/tests/write-intercept.test.ts +0 -76
- package/src/resources/extensions/gsd/tests/zombie-gsd-state.test.ts +0 -95
- package/src/resources/extensions/gsd/token-counter.ts +0 -65
- package/src/resources/extensions/gsd/tools/complete-milestone.ts +0 -229
- package/src/resources/extensions/gsd/tools/complete-slice.ts +0 -340
- package/src/resources/extensions/gsd/tools/complete-task.ts +0 -257
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +0 -304
- package/src/resources/extensions/gsd/tools/plan-slice.ts +0 -250
- package/src/resources/extensions/gsd/tools/plan-task.ts +0 -152
- package/src/resources/extensions/gsd/tools/reassess-roadmap.ts +0 -288
- package/src/resources/extensions/gsd/tools/reopen-slice.ts +0 -126
- package/src/resources/extensions/gsd/tools/reopen-task.ts +0 -130
- package/src/resources/extensions/gsd/tools/replan-slice.ts +0 -243
- package/src/resources/extensions/gsd/tools/validate-milestone.ts +0 -156
- package/src/resources/extensions/gsd/triage-resolution.ts +0 -413
- package/src/resources/extensions/gsd/triage-ui.ts +0 -187
- package/src/resources/extensions/gsd/types.ts +0 -593
- package/src/resources/extensions/gsd/undo.ts +0 -464
- package/src/resources/extensions/gsd/unit-id.ts +0 -14
- package/src/resources/extensions/gsd/unit-ownership.ts +0 -275
- package/src/resources/extensions/gsd/unit-runtime.ts +0 -189
- package/src/resources/extensions/gsd/validate-directory.ts +0 -164
- package/src/resources/extensions/gsd/validation.ts +0 -23
- package/src/resources/extensions/gsd/verdict-parser.ts +0 -110
- package/src/resources/extensions/gsd/verification-evidence.ts +0 -202
- package/src/resources/extensions/gsd/verification-gate.ts +0 -634
- package/src/resources/extensions/gsd/visualizer-data.ts +0 -953
- package/src/resources/extensions/gsd/visualizer-overlay.ts +0 -566
- package/src/resources/extensions/gsd/visualizer-views.ts +0 -1229
- package/src/resources/extensions/gsd/workflow-engine.ts +0 -38
- package/src/resources/extensions/gsd/workflow-events.ts +0 -154
- package/src/resources/extensions/gsd/workflow-logger.ts +0 -244
- package/src/resources/extensions/gsd/workflow-manifest.ts +0 -351
- package/src/resources/extensions/gsd/workflow-migration.ts +0 -345
- package/src/resources/extensions/gsd/workflow-projections.ts +0 -458
- package/src/resources/extensions/gsd/workflow-reconcile.ts +0 -532
- package/src/resources/extensions/gsd/workflow-templates/bugfix.md +0 -87
- package/src/resources/extensions/gsd/workflow-templates/dep-upgrade.md +0 -74
- package/src/resources/extensions/gsd/workflow-templates/full-project.md +0 -40
- package/src/resources/extensions/gsd/workflow-templates/hotfix.md +0 -45
- package/src/resources/extensions/gsd/workflow-templates/refactor.md +0 -83
- package/src/resources/extensions/gsd/workflow-templates/registry.json +0 -85
- package/src/resources/extensions/gsd/workflow-templates/security-audit.md +0 -73
- package/src/resources/extensions/gsd/workflow-templates/small-feature.md +0 -81
- package/src/resources/extensions/gsd/workflow-templates/spike.md +0 -69
- package/src/resources/extensions/gsd/workflow-templates.ts +0 -252
- package/src/resources/extensions/gsd/workspace-index.ts +0 -272
- package/src/resources/extensions/gsd/worktree-command-bootstrap.ts +0 -46
- package/src/resources/extensions/gsd/worktree-command.ts +0 -846
- package/src/resources/extensions/gsd/worktree-health.ts +0 -178
- package/src/resources/extensions/gsd/worktree-manager.ts +0 -630
- package/src/resources/extensions/gsd/worktree-resolver.ts +0 -640
- package/src/resources/extensions/gsd/worktree.ts +0 -336
- package/src/resources/extensions/gsd/write-intercept.ts +0 -90
|
@@ -1,1197 +0,0 @@
|
|
|
1
|
-
// Native Git Bridge
|
|
2
|
-
// Provides high-performance git operations backed by libgit2 via the Rust native module.
|
|
3
|
-
// Falls back to execSync/execFileSync git commands when the native module is unavailable.
|
|
4
|
-
//
|
|
5
|
-
// Both READ and WRITE operations are native — push operations remain as
|
|
6
|
-
// execSync calls because git2 credential handling is too complex.
|
|
7
|
-
|
|
8
|
-
import { execSync, execFileSync } from "node:child_process";
|
|
9
|
-
import { existsSync, readFileSync, unlinkSync, rmSync } from "node:fs";
|
|
10
|
-
import { join } from "node:path";
|
|
11
|
-
import { GSDError, GSD_GIT_ERROR } from "./errors.js";
|
|
12
|
-
import { GIT_NO_PROMPT_ENV } from "./git-constants.js";
|
|
13
|
-
import { getErrorMessage } from "./error-utils.js";
|
|
14
|
-
|
|
15
|
-
// Issue #453: keep auto-mode bookkeeping on the stable git CLI path unless a
|
|
16
|
-
// caller explicitly opts into the native helper.
|
|
17
|
-
const NATIVE_GSD_GIT_ENABLED = process.env.GSD_ENABLE_NATIVE_GSD_GIT === "1";
|
|
18
|
-
|
|
19
|
-
// ─── Native Module Types ──────────────────────────────────────────────────
|
|
20
|
-
|
|
21
|
-
interface GitDiffStat {
|
|
22
|
-
filesChanged: number;
|
|
23
|
-
insertions: number;
|
|
24
|
-
deletions: number;
|
|
25
|
-
summary: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface GitNameStatus {
|
|
29
|
-
status: string;
|
|
30
|
-
path: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
interface GitNumstat {
|
|
34
|
-
added: number;
|
|
35
|
-
removed: number;
|
|
36
|
-
path: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface GitLogEntry {
|
|
40
|
-
sha: string;
|
|
41
|
-
message: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
interface GitWorktreeEntry {
|
|
45
|
-
path: string;
|
|
46
|
-
branch: string;
|
|
47
|
-
isBare: boolean;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface GitBatchInfo {
|
|
51
|
-
branch: string;
|
|
52
|
-
hasChanges: boolean;
|
|
53
|
-
status: string;
|
|
54
|
-
stagedCount: number;
|
|
55
|
-
unstagedCount: number;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
interface GitMergeResult {
|
|
59
|
-
success: boolean;
|
|
60
|
-
conflicts: string[];
|
|
61
|
-
/** Filenames extracted from git stderr when a dirty working tree blocks the merge (#2151). */
|
|
62
|
-
dirtyFiles?: string[];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// ─── Native Module Loading ──────────────────────────────────────────────────
|
|
66
|
-
|
|
67
|
-
let nativeModule: {
|
|
68
|
-
// Existing read functions
|
|
69
|
-
gitCurrentBranch: (repoPath: string) => string | null;
|
|
70
|
-
gitMainBranch: (repoPath: string) => string;
|
|
71
|
-
gitBranchExists: (repoPath: string, branch: string) => boolean;
|
|
72
|
-
gitHasMergeConflicts: (repoPath: string) => boolean;
|
|
73
|
-
gitWorkingTreeStatus: (repoPath: string) => string;
|
|
74
|
-
gitHasChanges: (repoPath: string) => boolean;
|
|
75
|
-
gitCommitCountBetween: (repoPath: string, fromRef: string, toRef: string) => number;
|
|
76
|
-
// New read functions
|
|
77
|
-
gitIsRepo: (path: string) => boolean;
|
|
78
|
-
gitHasStagedChanges: (repoPath: string) => boolean;
|
|
79
|
-
gitDiffStat: (repoPath: string, fromRef: string, toRef: string) => GitDiffStat;
|
|
80
|
-
gitDiffNameStatus: (repoPath: string, fromRef: string, toRef: string, pathspec?: string, useMergeBase?: boolean) => GitNameStatus[];
|
|
81
|
-
gitDiffNumstat: (repoPath: string, fromRef: string, toRef: string) => GitNumstat[];
|
|
82
|
-
gitDiffContent: (repoPath: string, fromRef: string, toRef: string, pathspec?: string, exclude?: string, useMergeBase?: boolean) => string;
|
|
83
|
-
gitLogOneline: (repoPath: string, fromRef: string, toRef: string) => GitLogEntry[];
|
|
84
|
-
gitWorktreeList: (repoPath: string) => GitWorktreeEntry[];
|
|
85
|
-
gitBranchList: (repoPath: string, pattern?: string) => string[];
|
|
86
|
-
gitBranchListMerged: (repoPath: string, target: string, pattern?: string) => string[];
|
|
87
|
-
gitLsFiles: (repoPath: string, pathspec: string) => string[];
|
|
88
|
-
gitForEachRef: (repoPath: string, prefix: string) => string[];
|
|
89
|
-
gitConflictFiles: (repoPath: string) => string[];
|
|
90
|
-
gitBatchInfo: (repoPath: string) => GitBatchInfo;
|
|
91
|
-
// Write functions
|
|
92
|
-
gitInit: (path: string, initialBranch?: string) => void;
|
|
93
|
-
gitAddAll: (repoPath: string) => void;
|
|
94
|
-
gitAddPaths: (repoPath: string, paths: string[]) => void;
|
|
95
|
-
gitResetPaths: (repoPath: string, paths: string[]) => void;
|
|
96
|
-
gitCommit: (repoPath: string, message: string, allowEmpty?: boolean) => string;
|
|
97
|
-
gitCheckoutBranch: (repoPath: string, branch: string) => void;
|
|
98
|
-
gitCheckoutTheirs: (repoPath: string, paths: string[]) => void;
|
|
99
|
-
gitMergeSquash: (repoPath: string, branch: string) => GitMergeResult;
|
|
100
|
-
gitMergeAbort: (repoPath: string) => void;
|
|
101
|
-
gitRebaseAbort: (repoPath: string) => void;
|
|
102
|
-
gitResetHard: (repoPath: string) => void;
|
|
103
|
-
gitBranchDelete: (repoPath: string, branch: string, force?: boolean) => void;
|
|
104
|
-
gitBranchForceReset: (repoPath: string, branch: string, target: string) => void;
|
|
105
|
-
gitRmCached: (repoPath: string, paths: string[], recursive?: boolean) => string[];
|
|
106
|
-
gitRmForce: (repoPath: string, paths: string[]) => void;
|
|
107
|
-
gitWorktreeAdd: (repoPath: string, wtPath: string, branch: string, createBranch?: boolean, startPoint?: string) => void;
|
|
108
|
-
gitWorktreeRemove: (repoPath: string, wtPath: string, force?: boolean) => void;
|
|
109
|
-
gitWorktreePrune: (repoPath: string) => void;
|
|
110
|
-
gitRevertCommit: (repoPath: string, sha: string) => void;
|
|
111
|
-
gitRevertAbort: (repoPath: string) => void;
|
|
112
|
-
gitUpdateRef: (repoPath: string, refname: string, target?: string) => void;
|
|
113
|
-
} | null = null;
|
|
114
|
-
|
|
115
|
-
let loadAttempted = false;
|
|
116
|
-
|
|
117
|
-
function loadNative(): typeof nativeModule {
|
|
118
|
-
if (loadAttempted) return nativeModule;
|
|
119
|
-
loadAttempted = true;
|
|
120
|
-
if (!NATIVE_GSD_GIT_ENABLED) return nativeModule;
|
|
121
|
-
|
|
122
|
-
try {
|
|
123
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
124
|
-
const mod = require("@gsd/native");
|
|
125
|
-
if (mod.gitCurrentBranch && mod.gitHasChanges) {
|
|
126
|
-
nativeModule = mod;
|
|
127
|
-
}
|
|
128
|
-
} catch {
|
|
129
|
-
// Native module not available — all functions fall back to git CLI
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return nativeModule;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// ─── Fallback Helpers ──────────────────────────────────────────────────────
|
|
136
|
-
|
|
137
|
-
/** Run a git command via execFileSync. Returns trimmed stdout. */
|
|
138
|
-
function gitExec(basePath: string, args: string[], allowFailure = false): string {
|
|
139
|
-
try {
|
|
140
|
-
return execFileSync("git", args, {
|
|
141
|
-
cwd: basePath,
|
|
142
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
143
|
-
encoding: "utf-8",
|
|
144
|
-
env: GIT_NO_PROMPT_ENV,
|
|
145
|
-
}).trim();
|
|
146
|
-
} catch {
|
|
147
|
-
if (allowFailure) return "";
|
|
148
|
-
throw new GSDError(GSD_GIT_ERROR, `git ${args.join(" ")} failed in ${basePath}`);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/** Run a git command via execFileSync. Returns trimmed stdout. */
|
|
153
|
-
function gitFileExec(basePath: string, args: string[], allowFailure = false): string {
|
|
154
|
-
try {
|
|
155
|
-
return execFileSync("git", args, {
|
|
156
|
-
cwd: basePath,
|
|
157
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
158
|
-
encoding: "utf-8",
|
|
159
|
-
env: GIT_NO_PROMPT_ENV,
|
|
160
|
-
}).trim();
|
|
161
|
-
} catch {
|
|
162
|
-
if (allowFailure) return "";
|
|
163
|
-
throw new GSDError(GSD_GIT_ERROR, `git ${args.join(" ")} failed in ${basePath}`);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// ─── Existing Read Functions ──────────────────────────────────────────────
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Get the current branch name.
|
|
171
|
-
* Native: reads HEAD symbolic ref via libgit2.
|
|
172
|
-
* Fallback: `git branch --show-current`.
|
|
173
|
-
*/
|
|
174
|
-
export function nativeGetCurrentBranch(basePath: string): string {
|
|
175
|
-
const native = loadNative();
|
|
176
|
-
if (native) {
|
|
177
|
-
const branch = native.gitCurrentBranch(basePath);
|
|
178
|
-
return branch ?? "";
|
|
179
|
-
}
|
|
180
|
-
return gitExec(basePath, ["branch", "--show-current"]);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Detect the repo-level main branch (origin/HEAD → main → master → current).
|
|
185
|
-
* Native: checks refs via libgit2.
|
|
186
|
-
* Fallback: `git symbolic-ref` + `git show-ref` chain.
|
|
187
|
-
*/
|
|
188
|
-
export function nativeDetectMainBranch(basePath: string): string {
|
|
189
|
-
const native = loadNative();
|
|
190
|
-
if (native) {
|
|
191
|
-
return native.gitMainBranch(basePath);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
const symbolic = gitExec(basePath, ["symbolic-ref", "refs/remotes/origin/HEAD"], true);
|
|
195
|
-
if (symbolic) {
|
|
196
|
-
const match = symbolic.match(/refs\/remotes\/origin\/(.+)$/);
|
|
197
|
-
if (match) return match[1]!;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
const mainExists = gitExec(basePath, ["show-ref", "--verify", "refs/heads/main"], true);
|
|
201
|
-
if (mainExists) return "main";
|
|
202
|
-
|
|
203
|
-
const masterExists = gitExec(basePath, ["show-ref", "--verify", "refs/heads/master"], true);
|
|
204
|
-
if (masterExists) return "master";
|
|
205
|
-
|
|
206
|
-
return gitExec(basePath, ["branch", "--show-current"]);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Check if a local branch exists.
|
|
211
|
-
* Native: checks refs/heads/<name> via libgit2.
|
|
212
|
-
* Fallback: `git show-ref --verify`, with unborn-branch detection
|
|
213
|
-
* so that the current branch in a zero-commit repo is treated as
|
|
214
|
-
* existing (fixes #1771).
|
|
215
|
-
*/
|
|
216
|
-
export function nativeBranchExists(basePath: string, branch: string): boolean {
|
|
217
|
-
const native = loadNative();
|
|
218
|
-
if (native) {
|
|
219
|
-
return native.gitBranchExists(basePath, branch);
|
|
220
|
-
}
|
|
221
|
-
const result = gitExec(basePath, ["show-ref", "--verify", `refs/heads/${branch}`], true);
|
|
222
|
-
if (result !== "") return true;
|
|
223
|
-
|
|
224
|
-
// show-ref fails for unborn branches (zero commits). Fall back to checking
|
|
225
|
-
// whether the requested branch is the current (unborn) branch.
|
|
226
|
-
const current = gitExec(basePath, ["branch", "--show-current"], true);
|
|
227
|
-
return current === branch;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Check if the index has unmerged entries (merge conflicts).
|
|
232
|
-
* Native: reads index conflict state via libgit2.
|
|
233
|
-
* Fallback: `git diff --name-only --diff-filter=U`.
|
|
234
|
-
*/
|
|
235
|
-
export function nativeHasMergeConflicts(basePath: string): boolean {
|
|
236
|
-
const native = loadNative();
|
|
237
|
-
if (native) {
|
|
238
|
-
return native.gitHasMergeConflicts(basePath);
|
|
239
|
-
}
|
|
240
|
-
const result = gitExec(basePath, ["diff", "--name-only", "--diff-filter=U"], true);
|
|
241
|
-
return result !== "";
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Get working tree status (porcelain format).
|
|
246
|
-
* Native: reads status via libgit2.
|
|
247
|
-
* Fallback: `git status --porcelain`.
|
|
248
|
-
*/
|
|
249
|
-
export function nativeWorkingTreeStatus(basePath: string): string {
|
|
250
|
-
const native = loadNative();
|
|
251
|
-
if (native) {
|
|
252
|
-
return native.gitWorkingTreeStatus(basePath);
|
|
253
|
-
}
|
|
254
|
-
return gitExec(basePath, ["status", "--porcelain"], true);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// ─── nativeHasChanges fallback cache (10s TTL) ─────────────────────────
|
|
258
|
-
let _hasChangesCachedResult: boolean = false;
|
|
259
|
-
let _hasChangesCachedAt: number = 0;
|
|
260
|
-
let _hasChangesCachedPath: string = "";
|
|
261
|
-
const HAS_CHANGES_CACHE_TTL_MS = 10_000; // 10 seconds
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Quick check: any staged or unstaged changes?
|
|
265
|
-
* Native: libgit2 status check (single syscall).
|
|
266
|
-
* Fallback: `git status --short` (cached for 10s per basePath).
|
|
267
|
-
*/
|
|
268
|
-
export function nativeHasChanges(basePath: string): boolean {
|
|
269
|
-
const native = loadNative();
|
|
270
|
-
if (native) {
|
|
271
|
-
return native.gitHasChanges(basePath);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
const now = Date.now();
|
|
275
|
-
if (
|
|
276
|
-
basePath === _hasChangesCachedPath &&
|
|
277
|
-
now - _hasChangesCachedAt < HAS_CHANGES_CACHE_TTL_MS
|
|
278
|
-
) {
|
|
279
|
-
return _hasChangesCachedResult;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
const result = gitExec(basePath, ["status", "--short"], true);
|
|
283
|
-
const hasChanges = result !== "";
|
|
284
|
-
|
|
285
|
-
_hasChangesCachedResult = hasChanges;
|
|
286
|
-
_hasChangesCachedAt = now;
|
|
287
|
-
_hasChangesCachedPath = basePath;
|
|
288
|
-
|
|
289
|
-
return hasChanges;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/** Reset the nativeHasChanges fallback cache (exported for testing). */
|
|
293
|
-
export function _resetHasChangesCache(): void {
|
|
294
|
-
_hasChangesCachedResult = false;
|
|
295
|
-
_hasChangesCachedAt = 0;
|
|
296
|
-
_hasChangesCachedPath = "";
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Count commits between two refs (from..to).
|
|
301
|
-
* Native: libgit2 revwalk.
|
|
302
|
-
* Fallback: `git rev-list --count from..to`.
|
|
303
|
-
*/
|
|
304
|
-
export function nativeCommitCountBetween(basePath: string, fromRef: string, toRef: string): number {
|
|
305
|
-
const native = loadNative();
|
|
306
|
-
if (native) {
|
|
307
|
-
return native.gitCommitCountBetween(basePath, fromRef, toRef);
|
|
308
|
-
}
|
|
309
|
-
const result = gitExec(basePath, ["rev-list", "--count", `${fromRef}..${toRef}`], true);
|
|
310
|
-
return parseInt(result, 10) || 0;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
// ─── New Read Functions ──────────────────────────────────────────────────
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Check if a path is inside a git repository.
|
|
317
|
-
* Native: Repository::open() check.
|
|
318
|
-
* Fallback: `git rev-parse --git-dir`.
|
|
319
|
-
*/
|
|
320
|
-
export function nativeIsRepo(basePath: string): boolean {
|
|
321
|
-
const native = loadNative();
|
|
322
|
-
if (native) {
|
|
323
|
-
return native.gitIsRepo(basePath);
|
|
324
|
-
}
|
|
325
|
-
try {
|
|
326
|
-
execSync("git rev-parse --git-dir", { cwd: basePath, stdio: "pipe" });
|
|
327
|
-
return true;
|
|
328
|
-
} catch {
|
|
329
|
-
return false;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Check if there are staged changes (index differs from HEAD).
|
|
335
|
-
* Native: libgit2 tree-to-index diff.
|
|
336
|
-
* Fallback: `git diff --cached --stat`.
|
|
337
|
-
*/
|
|
338
|
-
export function nativeHasStagedChanges(basePath: string): boolean {
|
|
339
|
-
const native = loadNative();
|
|
340
|
-
if (native) {
|
|
341
|
-
return native.gitHasStagedChanges(basePath);
|
|
342
|
-
}
|
|
343
|
-
const result = gitExec(basePath, ["diff", "--cached", "--stat"], true);
|
|
344
|
-
return result !== "";
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Get diff statistics.
|
|
349
|
-
* Use fromRef="HEAD", toRef="WORKDIR" for working tree diff.
|
|
350
|
-
* Use fromRef="HEAD", toRef="INDEX" for staged diff.
|
|
351
|
-
* Native: libgit2 diff stats.
|
|
352
|
-
* Fallback: `git diff --stat`.
|
|
353
|
-
*/
|
|
354
|
-
export function nativeDiffStat(basePath: string, fromRef: string, toRef: string): GitDiffStat {
|
|
355
|
-
const native = loadNative();
|
|
356
|
-
if (native) {
|
|
357
|
-
return native.gitDiffStat(basePath, fromRef, toRef);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
// Fallback
|
|
361
|
-
let args: string[];
|
|
362
|
-
if (fromRef === "HEAD" && toRef === "WORKDIR") {
|
|
363
|
-
args = ["diff", "--stat", "HEAD"];
|
|
364
|
-
} else if (fromRef === "HEAD" && toRef === "INDEX") {
|
|
365
|
-
args = ["diff", "--stat", "--cached", "HEAD"];
|
|
366
|
-
} else {
|
|
367
|
-
args = ["diff", "--stat", fromRef, toRef];
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
const result = gitExec(basePath, args, true);
|
|
371
|
-
// Parse numeric stats from the summary line (e.g. "3 files changed, 10 insertions(+), 2 deletions(-)")
|
|
372
|
-
let filesChanged = 0, insertions = 0, deletions = 0;
|
|
373
|
-
const statsMatch = result.match(/(\d+) files? changed(?:, (\d+) insertions?\(\+\))?(?:, (\d+) deletions?\(-\))?/);
|
|
374
|
-
if (statsMatch) {
|
|
375
|
-
filesChanged = parseInt(statsMatch[1] ?? "0", 10);
|
|
376
|
-
insertions = parseInt(statsMatch[2] ?? "0", 10);
|
|
377
|
-
deletions = parseInt(statsMatch[3] ?? "0", 10);
|
|
378
|
-
}
|
|
379
|
-
return { filesChanged, insertions, deletions, summary: result };
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Get name-status diff between two refs with optional pathspec filter.
|
|
384
|
-
* useMergeBase: if true, uses three-dot semantics (main...branch).
|
|
385
|
-
* Native: libgit2 tree-to-tree diff.
|
|
386
|
-
* Fallback: `git diff --name-status`.
|
|
387
|
-
*/
|
|
388
|
-
export function nativeDiffNameStatus(
|
|
389
|
-
basePath: string,
|
|
390
|
-
fromRef: string,
|
|
391
|
-
toRef: string,
|
|
392
|
-
pathspec?: string,
|
|
393
|
-
useMergeBase?: boolean,
|
|
394
|
-
): GitNameStatus[] {
|
|
395
|
-
const native = loadNative();
|
|
396
|
-
if (native) {
|
|
397
|
-
return native.gitDiffNameStatus(basePath, fromRef, toRef, pathspec, useMergeBase);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
// Fallback
|
|
401
|
-
const separator = useMergeBase ? "..." : " ";
|
|
402
|
-
const args = ["diff", "--name-status", `${fromRef}${separator}${toRef}`];
|
|
403
|
-
if (pathspec) args.push("--", pathspec);
|
|
404
|
-
|
|
405
|
-
const result = gitExec(basePath, args, true);
|
|
406
|
-
if (!result) return [];
|
|
407
|
-
|
|
408
|
-
return result.split("\n").filter(Boolean).map(line => {
|
|
409
|
-
const [status, ...pathParts] = line.split("\t");
|
|
410
|
-
return { status: status ?? "", path: pathParts.join("\t") };
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Get numstat diff between two refs.
|
|
416
|
-
* Native: libgit2 patch line stats.
|
|
417
|
-
* Fallback: `git diff --numstat`.
|
|
418
|
-
*/
|
|
419
|
-
export function nativeDiffNumstat(basePath: string, fromRef: string, toRef: string): GitNumstat[] {
|
|
420
|
-
const native = loadNative();
|
|
421
|
-
if (native) {
|
|
422
|
-
return native.gitDiffNumstat(basePath, fromRef, toRef);
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
const result = gitExec(basePath, ["diff", "--numstat", fromRef, toRef], true);
|
|
426
|
-
if (!result) return [];
|
|
427
|
-
|
|
428
|
-
return result.split("\n").filter(Boolean).map(line => {
|
|
429
|
-
const [a, r, ...pathParts] = line.split("\t");
|
|
430
|
-
return {
|
|
431
|
-
added: a === "-" ? 0 : parseInt(a ?? "0", 10),
|
|
432
|
-
removed: r === "-" ? 0 : parseInt(r ?? "0", 10),
|
|
433
|
-
path: pathParts.join("\t"),
|
|
434
|
-
};
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* Get unified diff content between two refs.
|
|
440
|
-
* useMergeBase: if true, uses three-dot semantics.
|
|
441
|
-
* Native: libgit2 diff print.
|
|
442
|
-
* Fallback: `git diff`.
|
|
443
|
-
*/
|
|
444
|
-
export function nativeDiffContent(
|
|
445
|
-
basePath: string,
|
|
446
|
-
fromRef: string,
|
|
447
|
-
toRef: string,
|
|
448
|
-
pathspec?: string,
|
|
449
|
-
exclude?: string,
|
|
450
|
-
useMergeBase?: boolean,
|
|
451
|
-
): string {
|
|
452
|
-
const native = loadNative();
|
|
453
|
-
if (native) {
|
|
454
|
-
return native.gitDiffContent(basePath, fromRef, toRef, pathspec, exclude, useMergeBase);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
const separator = useMergeBase ? "..." : " ";
|
|
458
|
-
const args = ["diff", `${fromRef}${separator}${toRef}`];
|
|
459
|
-
if (pathspec) {
|
|
460
|
-
args.push("--", pathspec);
|
|
461
|
-
} else if (exclude) {
|
|
462
|
-
args.push("--", ".", `:(exclude)${exclude}`);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
return gitExec(basePath, args, true);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Get commit log between two refs (from..to).
|
|
470
|
-
* Native: libgit2 revwalk.
|
|
471
|
-
* Fallback: `git log --oneline from..to`.
|
|
472
|
-
*/
|
|
473
|
-
export function nativeLogOneline(basePath: string, fromRef: string, toRef: string): GitLogEntry[] {
|
|
474
|
-
const native = loadNative();
|
|
475
|
-
if (native) {
|
|
476
|
-
return native.gitLogOneline(basePath, fromRef, toRef);
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
const result = gitExec(basePath, ["log", "--oneline", `${fromRef}..${toRef}`], true);
|
|
480
|
-
if (!result) return [];
|
|
481
|
-
|
|
482
|
-
return result.split("\n").filter(Boolean).map(line => {
|
|
483
|
-
const sha = line.substring(0, 7);
|
|
484
|
-
const message = line.substring(8);
|
|
485
|
-
return { sha, message };
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* List git worktrees.
|
|
491
|
-
* Native: libgit2 worktree API.
|
|
492
|
-
* Fallback: `git worktree list --porcelain`.
|
|
493
|
-
*/
|
|
494
|
-
export function nativeWorktreeList(basePath: string): GitWorktreeEntry[] {
|
|
495
|
-
const native = loadNative();
|
|
496
|
-
if (native) {
|
|
497
|
-
return native.gitWorktreeList(basePath);
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
const result = gitExec(basePath, ["worktree", "list", "--porcelain"], true);
|
|
501
|
-
if (!result) return [];
|
|
502
|
-
|
|
503
|
-
const entries: GitWorktreeEntry[] = [];
|
|
504
|
-
const blocks = result.replaceAll("\r\n", "\n").split("\n\n").filter(Boolean);
|
|
505
|
-
|
|
506
|
-
for (const block of blocks) {
|
|
507
|
-
const lines = block.split("\n");
|
|
508
|
-
const wtLine = lines.find(l => l.startsWith("worktree "));
|
|
509
|
-
const branchLine = lines.find(l => l.startsWith("branch "));
|
|
510
|
-
const isBare = lines.some(l => l === "bare");
|
|
511
|
-
|
|
512
|
-
if (wtLine) {
|
|
513
|
-
entries.push({
|
|
514
|
-
path: wtLine.replace("worktree ", ""),
|
|
515
|
-
branch: branchLine ? branchLine.replace("branch refs/heads/", "") : "",
|
|
516
|
-
isBare,
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
return entries;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* List branches matching an optional pattern.
|
|
526
|
-
* Native: libgit2 branch iterator.
|
|
527
|
-
* Fallback: `git branch --list <pattern>`.
|
|
528
|
-
*/
|
|
529
|
-
export function nativeBranchList(basePath: string, pattern?: string): string[] {
|
|
530
|
-
const native = loadNative();
|
|
531
|
-
if (native) {
|
|
532
|
-
return native.gitBranchList(basePath, pattern);
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
const args = ["branch", "--list"];
|
|
536
|
-
if (pattern) args.push(pattern);
|
|
537
|
-
|
|
538
|
-
const result = gitFileExec(basePath, args, true);
|
|
539
|
-
if (!result) return [];
|
|
540
|
-
|
|
541
|
-
return result.split("\n").map(b => b.trim().replace(/^\* /, "")).filter(Boolean);
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* List branches merged into target.
|
|
546
|
-
* Native: libgit2 merge-base check.
|
|
547
|
-
* Fallback: `git branch --merged <target> --list <pattern>`.
|
|
548
|
-
*/
|
|
549
|
-
export function nativeBranchListMerged(basePath: string, target: string, pattern?: string): string[] {
|
|
550
|
-
const native = loadNative();
|
|
551
|
-
if (native) {
|
|
552
|
-
return native.gitBranchListMerged(basePath, target, pattern);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
const args = ["branch", "--merged", target];
|
|
556
|
-
if (pattern) args.push("--list", pattern);
|
|
557
|
-
|
|
558
|
-
const result = gitFileExec(basePath, args, true);
|
|
559
|
-
if (!result) return [];
|
|
560
|
-
|
|
561
|
-
return result.split("\n").map(b => b.trim()).filter(Boolean);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* List tracked files matching a pathspec.
|
|
566
|
-
* Native: libgit2 index iteration.
|
|
567
|
-
* Fallback: `git ls-files <pathspec>`.
|
|
568
|
-
*/
|
|
569
|
-
export function nativeLsFiles(basePath: string, pathspec: string): string[] {
|
|
570
|
-
const native = loadNative();
|
|
571
|
-
if (native) {
|
|
572
|
-
return native.gitLsFiles(basePath, pathspec);
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
const result = gitFileExec(basePath, ["ls-files", pathspec], true);
|
|
576
|
-
if (!result) return [];
|
|
577
|
-
return result.split("\n").filter(Boolean);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
/**
|
|
581
|
-
* List references matching a prefix.
|
|
582
|
-
* Native: libgit2 references_glob.
|
|
583
|
-
* Fallback: `git for-each-ref <prefix> --format=%(refname)`.
|
|
584
|
-
*/
|
|
585
|
-
export function nativeForEachRef(basePath: string, prefix: string): string[] {
|
|
586
|
-
const native = loadNative();
|
|
587
|
-
if (native) {
|
|
588
|
-
return native.gitForEachRef(basePath, prefix);
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
const result = gitFileExec(basePath, ["for-each-ref", prefix, "--format=%(refname)"], true);
|
|
592
|
-
if (!result) return [];
|
|
593
|
-
return result.split("\n").filter(Boolean);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Get list of files with unmerged (conflict) entries.
|
|
598
|
-
* Native: libgit2 index conflicts.
|
|
599
|
-
* Fallback: `git diff --name-only --diff-filter=U`.
|
|
600
|
-
*/
|
|
601
|
-
export function nativeConflictFiles(basePath: string): string[] {
|
|
602
|
-
const native = loadNative();
|
|
603
|
-
if (native) {
|
|
604
|
-
return native.gitConflictFiles(basePath);
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
const result = gitExec(basePath, ["diff", "--name-only", "--diff-filter=U"], true);
|
|
608
|
-
if (!result) return [];
|
|
609
|
-
return result.split("\n").filter(Boolean);
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
/**
|
|
613
|
-
* Get batch info: branch + status + change counts in ONE call.
|
|
614
|
-
* Native: single libgit2 call replaces 3-4 sequential execSync calls.
|
|
615
|
-
* Fallback: multiple git commands.
|
|
616
|
-
*/
|
|
617
|
-
export function nativeBatchInfo(basePath: string): GitBatchInfo {
|
|
618
|
-
const native = loadNative();
|
|
619
|
-
if (native) {
|
|
620
|
-
return native.gitBatchInfo(basePath);
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
const branch = gitExec(basePath, ["branch", "--show-current"], true);
|
|
624
|
-
const status = gitExec(basePath, ["status", "--porcelain"], true);
|
|
625
|
-
const hasChanges = status !== "";
|
|
626
|
-
|
|
627
|
-
// Parse porcelain status to count staged vs unstaged changes
|
|
628
|
-
let stagedCount = 0;
|
|
629
|
-
let unstagedCount = 0;
|
|
630
|
-
if (status) {
|
|
631
|
-
for (const line of status.split("\n")) {
|
|
632
|
-
if (!line || line.length < 2) continue;
|
|
633
|
-
const x = line[0]; // index (staged) status
|
|
634
|
-
const y = line[1]; // worktree (unstaged) status
|
|
635
|
-
if (x !== " " && x !== "?") stagedCount++;
|
|
636
|
-
if (y !== " " && y !== "?") unstagedCount++;
|
|
637
|
-
if (x === "?" && y === "?") unstagedCount++; // untracked files
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
return {
|
|
642
|
-
branch,
|
|
643
|
-
hasChanges,
|
|
644
|
-
status,
|
|
645
|
-
stagedCount,
|
|
646
|
-
unstagedCount,
|
|
647
|
-
};
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
// ─── Write Functions ──────────────────────────────────────────────────────
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Initialize a new git repository.
|
|
654
|
-
* Native: libgit2 Repository::init.
|
|
655
|
-
* Fallback: `git init -b <branch>`.
|
|
656
|
-
*/
|
|
657
|
-
export function nativeInit(basePath: string, initialBranch?: string): void {
|
|
658
|
-
const native = loadNative();
|
|
659
|
-
if (native) {
|
|
660
|
-
native.gitInit(basePath, initialBranch);
|
|
661
|
-
return;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
const args = ["init"];
|
|
665
|
-
if (initialBranch) args.push("-b", initialBranch);
|
|
666
|
-
gitFileExec(basePath, args);
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
/**
|
|
670
|
-
* Stage all files (git add -A).
|
|
671
|
-
* Native: libgit2 index add_all + update_all.
|
|
672
|
-
* Fallback: `git add -A`.
|
|
673
|
-
*/
|
|
674
|
-
export function nativeAddAll(basePath: string): void {
|
|
675
|
-
const native = loadNative();
|
|
676
|
-
if (native) {
|
|
677
|
-
native.gitAddAll(basePath);
|
|
678
|
-
return;
|
|
679
|
-
}
|
|
680
|
-
gitFileExec(basePath, ["add", "-A"]);
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* Stage all files with pathspec exclusions (git add -A -- ':!pattern' ...).
|
|
685
|
-
* Excluded paths are never hashed by git, preventing hangs on large
|
|
686
|
-
* untracked artifact trees (57GB+, 11K+ files). See #1605.
|
|
687
|
-
*
|
|
688
|
-
* Falls back to plain `git add -A` when no exclusions are provided.
|
|
689
|
-
* Always uses the CLI path (not libgit2) because libgit2's add_all
|
|
690
|
-
* does not support pathspec exclusion syntax.
|
|
691
|
-
*
|
|
692
|
-
* When excluded paths are already covered by .gitignore, git may exit
|
|
693
|
-
* with code 1 and an "ignored by .gitignore" warning. This is harmless
|
|
694
|
-
* (the staging succeeds for all non-ignored files) and is suppressed.
|
|
695
|
-
*/
|
|
696
|
-
export function nativeAddAllWithExclusions(basePath: string, exclusions: readonly string[]): void {
|
|
697
|
-
if (exclusions.length === 0) {
|
|
698
|
-
nativeAddAll(basePath);
|
|
699
|
-
return;
|
|
700
|
-
}
|
|
701
|
-
const pathspecs = exclusions.map(e => `:!${e}`);
|
|
702
|
-
try {
|
|
703
|
-
execFileSync("git", ["add", "-A", "--", ...pathspecs], {
|
|
704
|
-
cwd: basePath,
|
|
705
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
706
|
-
encoding: "utf-8",
|
|
707
|
-
env: GIT_NO_PROMPT_ENV,
|
|
708
|
-
});
|
|
709
|
-
} catch (err: unknown) {
|
|
710
|
-
const stderr = (err as { stderr?: string })?.stderr ?? "";
|
|
711
|
-
// git exits 1 when pathspec exclusions reference paths already covered
|
|
712
|
-
// by .gitignore. The staging itself succeeds — only suppress that case.
|
|
713
|
-
if (stderr.includes("ignored by one of your .gitignore files")) {
|
|
714
|
-
return;
|
|
715
|
-
}
|
|
716
|
-
// When .gsd is a symlink, git rejects `:!.gsd/...` pathspecs with
|
|
717
|
-
// "beyond a symbolic link". Fall back to plain `git add -A` which
|
|
718
|
-
// respects .gitignore (where .gsd/ is listed by default).
|
|
719
|
-
if (stderr.includes("beyond a symbolic link")) {
|
|
720
|
-
nativeAddAll(basePath);
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
throw new GSDError(GSD_GIT_ERROR, `git add -A with exclusions failed in ${basePath}: ${getErrorMessage(err)}`);
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* Stage specific files.
|
|
729
|
-
* Native: libgit2 index add.
|
|
730
|
-
* Fallback: `git add -- <paths>`.
|
|
731
|
-
*/
|
|
732
|
-
export function nativeAddPaths(basePath: string, paths: string[]): void {
|
|
733
|
-
const native = loadNative();
|
|
734
|
-
if (native) {
|
|
735
|
-
native.gitAddPaths(basePath, paths);
|
|
736
|
-
return;
|
|
737
|
-
}
|
|
738
|
-
gitFileExec(basePath, ["add", "--", ...paths]);
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
/**
|
|
742
|
-
* Unstage files (reset index entries to HEAD).
|
|
743
|
-
* Native: libgit2 reset_default.
|
|
744
|
-
* Fallback: `git reset HEAD -- <paths>`.
|
|
745
|
-
*/
|
|
746
|
-
export function nativeResetPaths(basePath: string, paths: string[]): void {
|
|
747
|
-
const native = loadNative();
|
|
748
|
-
if (native) {
|
|
749
|
-
native.gitResetPaths(basePath, paths);
|
|
750
|
-
return;
|
|
751
|
-
}
|
|
752
|
-
for (const p of paths) {
|
|
753
|
-
gitExec(basePath, ["reset", "HEAD", "--", p], true);
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* Create a commit from the current index.
|
|
759
|
-
* Returns the commit SHA on success, or null if nothing to commit.
|
|
760
|
-
* Native: libgit2 commit create.
|
|
761
|
-
* Fallback: `git commit --no-verify -F -`.
|
|
762
|
-
*/
|
|
763
|
-
export function nativeCommit(
|
|
764
|
-
basePath: string,
|
|
765
|
-
message: string,
|
|
766
|
-
options?: { allowEmpty?: boolean; input?: string },
|
|
767
|
-
): string | null {
|
|
768
|
-
const native = loadNative();
|
|
769
|
-
if (native) {
|
|
770
|
-
try {
|
|
771
|
-
return native.gitCommit(basePath, message, options?.allowEmpty);
|
|
772
|
-
} catch (e) {
|
|
773
|
-
const msg = getErrorMessage(e);
|
|
774
|
-
if (msg.includes("nothing to commit")) return null;
|
|
775
|
-
throw e;
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
// Fallback: use git commit with stdin pipe for safe multi-line messages
|
|
780
|
-
try {
|
|
781
|
-
const result = execSync(
|
|
782
|
-
`git commit --no-verify -F -${options?.allowEmpty ? " --allow-empty" : ""}`,
|
|
783
|
-
{
|
|
784
|
-
cwd: basePath,
|
|
785
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
786
|
-
encoding: "utf-8",
|
|
787
|
-
env: GIT_NO_PROMPT_ENV,
|
|
788
|
-
input: message,
|
|
789
|
-
},
|
|
790
|
-
).trim();
|
|
791
|
-
return result;
|
|
792
|
-
} catch (err: unknown) {
|
|
793
|
-
const errObj = err as { stdout?: string; stderr?: string; message?: string };
|
|
794
|
-
const combined = [errObj.stdout, errObj.stderr, errObj.message].filter(Boolean).join(" ");
|
|
795
|
-
if (combined.includes("nothing to commit") || combined.includes("nothing added to commit") || combined.includes("no changes added")) {
|
|
796
|
-
return null;
|
|
797
|
-
}
|
|
798
|
-
throw err;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* Checkout a branch (switch HEAD and update working tree).
|
|
804
|
-
* Native: libgit2 checkout + set_head.
|
|
805
|
-
* Fallback: `git checkout <branch>`.
|
|
806
|
-
*/
|
|
807
|
-
export function nativeCheckoutBranch(basePath: string, branch: string): void {
|
|
808
|
-
const native = loadNative();
|
|
809
|
-
if (native) {
|
|
810
|
-
native.gitCheckoutBranch(basePath, branch);
|
|
811
|
-
return;
|
|
812
|
-
}
|
|
813
|
-
execFileSync("git", ["checkout", branch], {
|
|
814
|
-
cwd: basePath,
|
|
815
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
816
|
-
encoding: "utf-8",
|
|
817
|
-
});
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* Resolve index conflicts by accepting "theirs" version.
|
|
822
|
-
* Native: libgit2 index conflict resolution.
|
|
823
|
-
* Fallback: `git checkout --theirs -- <file>`.
|
|
824
|
-
*/
|
|
825
|
-
export function nativeCheckoutTheirs(basePath: string, paths: string[]): void {
|
|
826
|
-
const native = loadNative();
|
|
827
|
-
if (native) {
|
|
828
|
-
native.gitCheckoutTheirs(basePath, paths);
|
|
829
|
-
return;
|
|
830
|
-
}
|
|
831
|
-
for (const path of paths) {
|
|
832
|
-
gitFileExec(basePath, ["checkout", "--theirs", "--", path]);
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
/**
|
|
837
|
-
* Squash-merge a branch (stages changes, does NOT commit).
|
|
838
|
-
* Native: libgit2 merge with squash semantics.
|
|
839
|
-
* Fallback: `git merge --squash <branch>`.
|
|
840
|
-
*/
|
|
841
|
-
export function nativeMergeSquash(basePath: string, branch: string): GitMergeResult {
|
|
842
|
-
const native = loadNative();
|
|
843
|
-
if (native) {
|
|
844
|
-
return native.gitMergeSquash(basePath, branch);
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
try {
|
|
848
|
-
execFileSync("git", ["merge", "--squash", branch], {
|
|
849
|
-
cwd: basePath,
|
|
850
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
851
|
-
encoding: "utf-8",
|
|
852
|
-
env: GIT_NO_PROMPT_ENV,
|
|
853
|
-
});
|
|
854
|
-
return { success: true, conflicts: [] };
|
|
855
|
-
} catch (err: unknown) {
|
|
856
|
-
// Distinguish pre-merge rejections (dirty working tree) from actual
|
|
857
|
-
// content conflicts. When git rejects the merge before staging
|
|
858
|
-
// ("local changes would be overwritten"), there are no conflict markers
|
|
859
|
-
// to detect, so the old --diff-filter=U check would return an empty
|
|
860
|
-
// list and incorrectly report success (#1672, #1738).
|
|
861
|
-
const stderr =
|
|
862
|
-
err instanceof Error ? (err as Error & { stderr?: string }).stderr ?? err.message : String(err);
|
|
863
|
-
if (
|
|
864
|
-
stderr.includes("local changes would be overwritten") ||
|
|
865
|
-
stderr.includes("not possible because you have unmerged files") ||
|
|
866
|
-
stderr.includes("overwritten by merge")
|
|
867
|
-
) {
|
|
868
|
-
// Extract filenames from git stderr so callers can report which files
|
|
869
|
-
// are dirty instead of generically blaming .gsd/ (#2151).
|
|
870
|
-
// Git lists them as tab-indented lines between the "would be overwritten"
|
|
871
|
-
// header and the "Please commit" footer.
|
|
872
|
-
const dirtyFiles = stderr
|
|
873
|
-
.split("\n")
|
|
874
|
-
.filter((line) => line.startsWith("\t"))
|
|
875
|
-
.map((line) => line.trim())
|
|
876
|
-
.filter(Boolean);
|
|
877
|
-
return { success: false, conflicts: ["__dirty_working_tree__"], dirtyFiles };
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
// Check for real content conflicts
|
|
881
|
-
const conflictOutput = gitExec(basePath, ["diff", "--name-only", "--diff-filter=U"], true);
|
|
882
|
-
const conflicts = conflictOutput ? conflictOutput.split("\n").filter(Boolean) : [];
|
|
883
|
-
if (conflicts.length > 0) {
|
|
884
|
-
return { success: false, conflicts };
|
|
885
|
-
}
|
|
886
|
-
// No conflicts detected — this is a non-conflict failure; re-throw
|
|
887
|
-
// so the caller knows the merge did not succeed.
|
|
888
|
-
throw err;
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
/**
|
|
893
|
-
* Abort an in-progress merge.
|
|
894
|
-
* Native: libgit2 reset + cleanup.
|
|
895
|
-
* Fallback: `git merge --abort`.
|
|
896
|
-
*/
|
|
897
|
-
export function nativeMergeAbort(basePath: string): void {
|
|
898
|
-
const native = loadNative();
|
|
899
|
-
if (native) {
|
|
900
|
-
native.gitMergeAbort(basePath);
|
|
901
|
-
return;
|
|
902
|
-
}
|
|
903
|
-
gitExec(basePath, ["merge", "--abort"], true);
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
/**
|
|
907
|
-
* Abort an in-progress rebase.
|
|
908
|
-
* Native: libgit2 reset + cleanup.
|
|
909
|
-
* Fallback: `git rebase --abort`.
|
|
910
|
-
*/
|
|
911
|
-
export function nativeRebaseAbort(basePath: string): void {
|
|
912
|
-
const native = loadNative();
|
|
913
|
-
if (native) {
|
|
914
|
-
native.gitRebaseAbort(basePath);
|
|
915
|
-
return;
|
|
916
|
-
}
|
|
917
|
-
gitExec(basePath, ["rebase", "--abort"], true);
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
/**
|
|
921
|
-
* Hard reset to HEAD.
|
|
922
|
-
* Native: libgit2 reset(Hard).
|
|
923
|
-
* Fallback: `git reset --hard HEAD`.
|
|
924
|
-
*/
|
|
925
|
-
export function nativeResetHard(basePath: string): void {
|
|
926
|
-
const native = loadNative();
|
|
927
|
-
if (native) {
|
|
928
|
-
native.gitResetHard(basePath);
|
|
929
|
-
return;
|
|
930
|
-
}
|
|
931
|
-
execSync("git reset --hard HEAD", { cwd: basePath, stdio: "pipe" });
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* Get the subject line of a commit (git log -1 --format=%s <ref>).
|
|
936
|
-
* Returns empty string if the ref doesn't exist.
|
|
937
|
-
*/
|
|
938
|
-
export function nativeCommitSubject(basePath: string, ref: string): string {
|
|
939
|
-
try {
|
|
940
|
-
return execFileSync("git", ["log", "-1", "--format=%s", ref], {
|
|
941
|
-
cwd: basePath,
|
|
942
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
943
|
-
encoding: "utf-8",
|
|
944
|
-
env: GIT_NO_PROMPT_ENV,
|
|
945
|
-
}).trim();
|
|
946
|
-
} catch {
|
|
947
|
-
return "";
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* Delete a branch.
|
|
953
|
-
* Native: libgit2 branch delete.
|
|
954
|
-
* Fallback: `git branch -D/-d <branch>`.
|
|
955
|
-
*/
|
|
956
|
-
export function nativeBranchDelete(basePath: string, branch: string, force = true): void {
|
|
957
|
-
const native = loadNative();
|
|
958
|
-
if (native) {
|
|
959
|
-
native.gitBranchDelete(basePath, branch, force);
|
|
960
|
-
return;
|
|
961
|
-
}
|
|
962
|
-
gitFileExec(basePath, ["branch", force ? "-D" : "-d", branch], true);
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
/**
|
|
966
|
-
* Force-reset a branch to point at a target ref.
|
|
967
|
-
* Native: libgit2 branch create with force.
|
|
968
|
-
* Fallback: `git branch -f <branch> <target>`.
|
|
969
|
-
*/
|
|
970
|
-
export function nativeBranchForceReset(basePath: string, branch: string, target: string): void {
|
|
971
|
-
const native = loadNative();
|
|
972
|
-
if (native) {
|
|
973
|
-
native.gitBranchForceReset(basePath, branch, target);
|
|
974
|
-
return;
|
|
975
|
-
}
|
|
976
|
-
gitExec(basePath, ["branch", "-f", branch, target]);
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
/**
|
|
980
|
-
* Remove files from the index (cache) without touching the working tree.
|
|
981
|
-
* Returns list of removed files.
|
|
982
|
-
* Native: libgit2 index remove.
|
|
983
|
-
* Fallback: `git rm --cached -r --ignore-unmatch <path>`.
|
|
984
|
-
*/
|
|
985
|
-
export function nativeRmCached(basePath: string, paths: string[], recursive = true): string[] {
|
|
986
|
-
const native = loadNative();
|
|
987
|
-
if (native) {
|
|
988
|
-
return native.gitRmCached(basePath, paths, recursive);
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
const removed: string[] = [];
|
|
992
|
-
for (const path of paths) {
|
|
993
|
-
const result = gitExec(
|
|
994
|
-
basePath,
|
|
995
|
-
["rm", "--cached", ...(recursive ? ["-r"] : []), "--ignore-unmatch", path],
|
|
996
|
-
true,
|
|
997
|
-
);
|
|
998
|
-
if (result) removed.push(result);
|
|
999
|
-
}
|
|
1000
|
-
return removed;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
/**
|
|
1004
|
-
* Force-remove files from both index and working tree.
|
|
1005
|
-
* Native: libgit2 index remove + fs delete.
|
|
1006
|
-
* Fallback: `git rm --force -- <file>`.
|
|
1007
|
-
*/
|
|
1008
|
-
export function nativeRmForce(basePath: string, paths: string[]): void {
|
|
1009
|
-
const native = loadNative();
|
|
1010
|
-
if (native) {
|
|
1011
|
-
native.gitRmForce(basePath, paths);
|
|
1012
|
-
return;
|
|
1013
|
-
}
|
|
1014
|
-
for (const path of paths) {
|
|
1015
|
-
gitFileExec(basePath, ["rm", "--force", "--", path], true);
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
/**
|
|
1020
|
-
* Add a new git worktree.
|
|
1021
|
-
* Native: libgit2 worktree API.
|
|
1022
|
-
* Fallback: `git worktree add`.
|
|
1023
|
-
*/
|
|
1024
|
-
export function nativeWorktreeAdd(
|
|
1025
|
-
basePath: string,
|
|
1026
|
-
wtPath: string,
|
|
1027
|
-
branch: string,
|
|
1028
|
-
createBranch?: boolean,
|
|
1029
|
-
startPoint?: string,
|
|
1030
|
-
): void {
|
|
1031
|
-
const native = loadNative();
|
|
1032
|
-
if (native) {
|
|
1033
|
-
native.gitWorktreeAdd(basePath, wtPath, branch, createBranch, startPoint);
|
|
1034
|
-
return;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
if (createBranch) {
|
|
1038
|
-
gitExec(basePath, ["worktree", "add", "-b", branch, wtPath, startPoint ?? "HEAD"]);
|
|
1039
|
-
} else {
|
|
1040
|
-
gitExec(basePath, ["worktree", "add", wtPath, branch]);
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* Remove a git worktree.
|
|
1046
|
-
* Native: libgit2 worktree prune + fs cleanup.
|
|
1047
|
-
* Fallback: `git worktree remove [--force] <path>`.
|
|
1048
|
-
*/
|
|
1049
|
-
export function nativeWorktreeRemove(basePath: string, wtPath: string, force = false): void {
|
|
1050
|
-
const native = loadNative();
|
|
1051
|
-
if (native) {
|
|
1052
|
-
native.gitWorktreeRemove(basePath, wtPath, force);
|
|
1053
|
-
return;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
const args = ["worktree", "remove"];
|
|
1057
|
-
if (force) args.push("--force");
|
|
1058
|
-
args.push(wtPath);
|
|
1059
|
-
gitExec(basePath, args, true);
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
/**
|
|
1063
|
-
* Prune stale worktree entries.
|
|
1064
|
-
* Native: libgit2 worktree validation + prune.
|
|
1065
|
-
* Fallback: `git worktree prune`.
|
|
1066
|
-
*/
|
|
1067
|
-
export function nativeWorktreePrune(basePath: string): void {
|
|
1068
|
-
const native = loadNative();
|
|
1069
|
-
if (native) {
|
|
1070
|
-
native.gitWorktreePrune(basePath);
|
|
1071
|
-
return;
|
|
1072
|
-
}
|
|
1073
|
-
gitExec(basePath, ["worktree", "prune"], true);
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1077
|
-
* Revert a commit without auto-committing.
|
|
1078
|
-
* Native: libgit2 revert.
|
|
1079
|
-
* Fallback: `git revert --no-commit <sha>`.
|
|
1080
|
-
*/
|
|
1081
|
-
export function nativeRevertCommit(basePath: string, sha: string): void {
|
|
1082
|
-
const native = loadNative();
|
|
1083
|
-
if (native) {
|
|
1084
|
-
native.gitRevertCommit(basePath, sha);
|
|
1085
|
-
return;
|
|
1086
|
-
}
|
|
1087
|
-
gitFileExec(basePath, ["revert", "--no-commit", sha]);
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
/**
|
|
1091
|
-
* Abort an in-progress revert.
|
|
1092
|
-
* Native: libgit2 reset + cleanup.
|
|
1093
|
-
* Fallback: `git revert --abort`.
|
|
1094
|
-
*/
|
|
1095
|
-
export function nativeRevertAbort(basePath: string): void {
|
|
1096
|
-
const native = loadNative();
|
|
1097
|
-
if (native) {
|
|
1098
|
-
native.gitRevertAbort(basePath);
|
|
1099
|
-
return;
|
|
1100
|
-
}
|
|
1101
|
-
gitFileExec(basePath, ["revert", "--abort"], true);
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
/**
|
|
1105
|
-
* Create or delete a ref.
|
|
1106
|
-
* When target is provided, creates/updates the ref. When undefined, deletes it.
|
|
1107
|
-
* Native: libgit2 reference create/delete.
|
|
1108
|
-
* Fallback: `git update-ref`.
|
|
1109
|
-
*/
|
|
1110
|
-
export function nativeUpdateRef(basePath: string, refname: string, target?: string): void {
|
|
1111
|
-
const native = loadNative();
|
|
1112
|
-
if (native) {
|
|
1113
|
-
native.gitUpdateRef(basePath, refname, target);
|
|
1114
|
-
return;
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
if (target !== undefined) {
|
|
1118
|
-
gitExec(basePath, ["update-ref", refname, target]);
|
|
1119
|
-
} else {
|
|
1120
|
-
gitExec(basePath, ["update-ref", "-d", refname], true);
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
/**
|
|
1125
|
-
* Check if the native git module is available.
|
|
1126
|
-
*/
|
|
1127
|
-
export function isNativeGitAvailable(): boolean {
|
|
1128
|
-
return loadNative() !== null;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
/**
|
|
1132
|
-
* Check if a commit/branch is an ancestor of another.
|
|
1133
|
-
* Returns true if `ancestor` is reachable from `descendant`.
|
|
1134
|
-
* Fallback: `git merge-base --is-ancestor`.
|
|
1135
|
-
*/
|
|
1136
|
-
export function nativeIsAncestor(basePath: string, ancestor: string, descendant: string): boolean {
|
|
1137
|
-
try {
|
|
1138
|
-
execFileSync("git", ["merge-base", "--is-ancestor", ancestor, descendant], {
|
|
1139
|
-
cwd: basePath,
|
|
1140
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
1141
|
-
env: GIT_NO_PROMPT_ENV,
|
|
1142
|
-
});
|
|
1143
|
-
return true;
|
|
1144
|
-
} catch {
|
|
1145
|
-
return false;
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
/**
|
|
1150
|
-
* Get the Unix epoch (seconds) of the latest commit on a ref.
|
|
1151
|
-
* Returns 0 if the ref doesn't exist or has no commits.
|
|
1152
|
-
* Fallback: `git log -1 --format=%ct <ref>`.
|
|
1153
|
-
*/
|
|
1154
|
-
export function nativeLastCommitEpoch(basePath: string, ref: string): number {
|
|
1155
|
-
try {
|
|
1156
|
-
const result = execFileSync("git", ["log", "-1", "--format=%ct", ref], {
|
|
1157
|
-
cwd: basePath,
|
|
1158
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
1159
|
-
encoding: "utf-8",
|
|
1160
|
-
env: GIT_NO_PROMPT_ENV,
|
|
1161
|
-
}).trim();
|
|
1162
|
-
return parseInt(result, 10) || 0;
|
|
1163
|
-
} catch {
|
|
1164
|
-
return 0;
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
/**
|
|
1169
|
-
* Count commits on `branch` that are not on any remote tracking branch.
|
|
1170
|
-
* Returns the count of unpushed commits, or -1 if the branch has no upstream.
|
|
1171
|
-
* Fallback: `git rev-list <branch> --not --remotes`.
|
|
1172
|
-
*/
|
|
1173
|
-
export function nativeUnpushedCount(basePath: string, branch: string): number {
|
|
1174
|
-
try {
|
|
1175
|
-
const result = execFileSync("git", ["rev-list", branch, "--not", "--remotes", "--count"], {
|
|
1176
|
-
cwd: basePath,
|
|
1177
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
1178
|
-
encoding: "utf-8",
|
|
1179
|
-
env: GIT_NO_PROMPT_ENV,
|
|
1180
|
-
}).trim();
|
|
1181
|
-
return parseInt(result, 10) || 0;
|
|
1182
|
-
} catch {
|
|
1183
|
-
return -1;
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
// ─── Re-exports for type consumers ──────────────────────────────────────
|
|
1188
|
-
|
|
1189
|
-
export type {
|
|
1190
|
-
GitDiffStat,
|
|
1191
|
-
GitNameStatus,
|
|
1192
|
-
GitNumstat,
|
|
1193
|
-
GitLogEntry,
|
|
1194
|
-
GitWorktreeEntry,
|
|
1195
|
-
GitBatchInfo,
|
|
1196
|
-
GitMergeResult,
|
|
1197
|
-
};
|