gsd-pi 2.71.0-dev.06b86c6 → 2.71.0-dev.246c32d
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 +34 -1
- package/dist/cli.js +17 -0
- package/dist/headless-events.d.ts +2 -0
- package/dist/headless-events.js +7 -0
- package/dist/headless.js +16 -3
- package/dist/mcp-server.js +37 -14
- package/dist/resource-loader.js +6 -3
- package/dist/resources/agents/debugger.md +58 -0
- package/dist/resources/agents/doc-writer.md +43 -0
- package/dist/resources/agents/git-ops.md +56 -0
- package/dist/resources/agents/javascript-pro.md +46 -271
- package/dist/resources/agents/planner.md +55 -0
- package/dist/resources/agents/refactorer.md +47 -0
- package/dist/resources/agents/reviewer.md +48 -0
- package/dist/resources/agents/security.md +59 -0
- package/dist/resources/agents/tester.md +50 -0
- package/dist/resources/agents/typescript-pro.md +41 -235
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +113 -10
- package/dist/resources/extensions/gsd/auto/infra-errors.js +34 -0
- package/dist/resources/extensions/gsd/auto/loop.js +32 -1
- package/dist/resources/extensions/gsd/auto/phases.js +5 -1
- package/dist/resources/extensions/gsd/auto/session.js +11 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +22 -16
- package/dist/resources/extensions/gsd/auto-model-selection.js +10 -2
- package/dist/resources/extensions/gsd/auto-prompts.js +88 -33
- package/dist/resources/extensions/gsd/auto-start.js +33 -6
- package/dist/resources/extensions/gsd/auto-worktree.js +1 -1
- package/dist/resources/extensions/gsd/auto.js +56 -0
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +3 -3
- package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +63 -51
- package/dist/resources/extensions/gsd/commands/handlers/auto.js +10 -33
- package/dist/resources/extensions/gsd/commands/handlers/core.js +56 -11
- package/dist/resources/extensions/gsd/commands/handlers/notifications-handler.js +15 -6
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +4 -10
- package/dist/resources/extensions/gsd/dashboard-overlay.js +8 -3
- package/dist/resources/extensions/gsd/doctor-providers.js +23 -0
- package/dist/resources/extensions/gsd/error-classifier.js +4 -1
- package/dist/resources/extensions/gsd/forensics.js +19 -6
- package/dist/resources/extensions/gsd/gate-registry.js +208 -0
- package/dist/resources/extensions/gsd/gsd-db.js +41 -0
- package/dist/resources/extensions/gsd/guided-flow.js +5 -10
- package/dist/resources/extensions/gsd/metrics.js +1 -0
- package/dist/resources/extensions/gsd/milestone-actions.js +10 -4
- package/dist/resources/extensions/gsd/milestone-validation-gates.js +11 -12
- package/dist/resources/extensions/gsd/notification-overlay.js +42 -13
- package/dist/resources/extensions/gsd/notification-store.js +35 -4
- package/dist/resources/extensions/gsd/notification-widget.js +5 -13
- package/dist/resources/extensions/gsd/parallel-monitor-overlay.js +8 -3
- package/dist/resources/extensions/gsd/prompt-validation.js +126 -0
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +3 -1
- package/dist/resources/extensions/gsd/prompts/execute-task.md +2 -0
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +2 -0
- package/dist/resources/extensions/gsd/session-model-override.js +25 -0
- package/dist/resources/extensions/gsd/shortcut-defs.js +40 -0
- package/dist/resources/extensions/gsd/state.js +9 -2
- package/dist/resources/extensions/gsd/tools/complete-slice.js +52 -1
- package/dist/resources/extensions/gsd/tools/complete-task.js +51 -1
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +4 -1
- package/dist/resources/extensions/ollama/index.js +13 -5
- package/dist/resources/extensions/shared/gsd-phase-state.js +35 -0
- package/dist/resources/extensions/subagent/agents.js +8 -0
- package/dist/resources/extensions/subagent/index.js +17 -0
- package/dist/startup-model-validation.d.ts +0 -1
- package/dist/startup-model-validation.js +6 -2
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +17 -17
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/required-server-files.json +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +17 -17
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/server.js +1 -1
- package/package.json +1 -1
- package/packages/mcp-server/dist/server.d.ts +12 -1
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +90 -42
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +1 -1
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/src/server.ts +110 -38
- package/packages/mcp-server/src/workflow-tools.ts +1 -1
- package/packages/pi-ai/dist/providers/anthropic-auth.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js +20 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic.d.ts +2 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +7 -4
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/src/providers/anthropic-auth.test.ts +32 -0
- package/packages/pi-ai/src/providers/anthropic.ts +8 -4
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.test.js +61 -0
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.test.js.map +1 -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 +2 -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 +10 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +27 -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 +85 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.js +64 -0
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.js +22 -18
- package/packages/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.test.d.ts +8 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.test.js +75 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts +5 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js +55 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.test.js +57 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts +11 -0
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +38 -5
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.js +71 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.js.map +1 -0
- 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/modes/interactive/components/__tests__/login-dialog.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.js +13 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts +4 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +24 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.js +9 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +4 -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 +43 -0
- 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 +7 -2
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/model-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/model-controller.js +6 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/model-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 +4 -3
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +4 -2
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -1
- package/packages/pi-coding-agent/src/core/agent-session-renderable-tools.test.ts +70 -0
- package/packages/pi-coding-agent/src/core/agent-session.ts +2 -1
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +108 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +30 -0
- package/packages/pi-coding-agent/src/core/model-resolver-initial-model-auth.test.ts +78 -0
- package/packages/pi-coding-agent/src/core/model-resolver.test.ts +85 -0
- package/packages/pi-coding-agent/src/core/model-resolver.ts +22 -18
- package/packages/pi-coding-agent/src/core/retry-handler.test.ts +83 -0
- package/packages/pi-coding-agent/src/core/retry-handler.ts +60 -1
- package/packages/pi-coding-agent/src/core/sdk.test.ts +89 -0
- package/packages/pi-coding-agent/src/core/sdk.ts +45 -9
- package/packages/pi-coding-agent/src/index.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/login-dialog.test.ts +24 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts +30 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/model-selector.ts +15 -6
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +47 -0
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +7 -2
- package/packages/pi-coding-agent/src/modes/interactive/controllers/model-controller.ts +6 -1
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +4 -3
- package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +4 -2
- package/src/resources/agents/debugger.md +58 -0
- package/src/resources/agents/doc-writer.md +43 -0
- package/src/resources/agents/git-ops.md +56 -0
- package/src/resources/agents/javascript-pro.md +46 -271
- package/src/resources/agents/planner.md +55 -0
- package/src/resources/agents/refactorer.md +47 -0
- package/src/resources/agents/reviewer.md +48 -0
- package/src/resources/agents/security.md +59 -0
- package/src/resources/agents/tester.md +50 -0
- package/src/resources/agents/typescript-pro.md +41 -235
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +122 -8
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +189 -6
- package/src/resources/extensions/gsd/auto/infra-errors.ts +38 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +2 -0
- package/src/resources/extensions/gsd/auto/loop.ts +45 -1
- package/src/resources/extensions/gsd/auto/phases.ts +6 -0
- package/src/resources/extensions/gsd/auto/session.ts +11 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +29 -18
- package/src/resources/extensions/gsd/auto-model-selection.ts +9 -1
- package/src/resources/extensions/gsd/auto-prompts.ts +111 -33
- package/src/resources/extensions/gsd/auto-start.ts +40 -6
- package/src/resources/extensions/gsd/auto-worktree.ts +1 -1
- package/src/resources/extensions/gsd/auto.ts +72 -0
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +3 -3
- package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +79 -60
- package/src/resources/extensions/gsd/commands/handlers/auto.ts +10 -36
- package/src/resources/extensions/gsd/commands/handlers/core.ts +58 -11
- package/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts +17 -7
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +4 -10
- package/src/resources/extensions/gsd/dashboard-overlay.ts +10 -3
- package/src/resources/extensions/gsd/doctor-providers.ts +24 -0
- package/src/resources/extensions/gsd/error-classifier.ts +4 -1
- package/src/resources/extensions/gsd/forensics.ts +23 -7
- package/src/resources/extensions/gsd/gate-registry.ts +251 -0
- package/src/resources/extensions/gsd/gsd-db.ts +51 -0
- package/src/resources/extensions/gsd/guided-flow.ts +5 -10
- package/src/resources/extensions/gsd/interrupted-session.ts +1 -0
- package/src/resources/extensions/gsd/metrics.ts +12 -1
- package/src/resources/extensions/gsd/milestone-actions.ts +10 -3
- package/src/resources/extensions/gsd/milestone-validation-gates.ts +11 -13
- package/src/resources/extensions/gsd/notification-overlay.ts +47 -14
- package/src/resources/extensions/gsd/notification-store.ts +35 -4
- package/src/resources/extensions/gsd/notification-widget.ts +5 -14
- package/src/resources/extensions/gsd/parallel-monitor-overlay.ts +10 -3
- package/src/resources/extensions/gsd/prompt-validation.ts +157 -0
- package/src/resources/extensions/gsd/prompts/complete-slice.md +3 -1
- package/src/resources/extensions/gsd/prompts/execute-task.md +2 -0
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +2 -0
- package/src/resources/extensions/gsd/session-model-override.ts +36 -0
- package/src/resources/extensions/gsd/shortcut-defs.ts +56 -0
- package/src/resources/extensions/gsd/state.ts +13 -2
- package/src/resources/extensions/gsd/tests/auto-start-model-capture.test.ts +25 -9
- package/src/resources/extensions/gsd/tests/complete-slice-gate-closure.test.ts +167 -0
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/forensics-stuck-loops.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/format-shortcut.test.ts +31 -0
- package/src/resources/extensions/gsd/tests/gate-dispatch.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/gate-registry.test.ts +140 -0
- package/src/resources/extensions/gsd/tests/infra-errors-cooldown.test.ts +180 -0
- package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +66 -1
- package/src/resources/extensions/gsd/tests/model-isolation.test.ts +36 -51
- package/src/resources/extensions/gsd/tests/notification-store.test.ts +18 -0
- package/src/resources/extensions/gsd/tests/notification-widget.test.ts +3 -2
- package/src/resources/extensions/gsd/tests/notifications-handler.test.ts +90 -0
- package/src/resources/extensions/gsd/tests/parallel-monitor-overlay.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/park-db-sync.test.ts +18 -0
- package/src/resources/extensions/gsd/tests/prompt-system-gate-coverage.test.ts +208 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/register-shortcuts.test.ts +63 -5
- package/src/resources/extensions/gsd/tests/session-model-override.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/start-auto-detached.test.ts +90 -0
- package/src/resources/extensions/gsd/tools/complete-slice.ts +63 -0
- package/src/resources/extensions/gsd/tools/complete-task.ts +63 -0
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +4 -1
- package/src/resources/extensions/gsd/types.ts +26 -0
- package/src/resources/extensions/ollama/index.ts +13 -3
- package/src/resources/extensions/ollama/ollama-status-indicator.test.ts +28 -0
- package/src/resources/extensions/shared/gsd-phase-state.ts +42 -0
- package/src/resources/extensions/shared/tests/gsd-phase-state.test.ts +48 -0
- package/src/resources/extensions/subagent/agents.ts +10 -0
- package/src/resources/extensions/subagent/index.ts +18 -0
- package/src/resources/extensions/subagent/tests/agents-conflicts.test.ts +33 -0
- /package/dist/web/standalone/.next/static/{dYVdRaunb2ZSEA8fjkT-V → hnGGkVMxIGGpxSJkf5jIV}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{dYVdRaunb2ZSEA8fjkT-V → hnGGkVMxIGGpxSJkf5jIV}/_ssgManifest.js +0 -0
|
@@ -4,61 +4,73 @@ import { Key } from "@gsd/pi-tui";
|
|
|
4
4
|
import { GSDDashboardOverlay } from "../dashboard-overlay.js";
|
|
5
5
|
import { GSDNotificationOverlay } from "../notification-overlay.js";
|
|
6
6
|
import { ParallelMonitorOverlay } from "../parallel-monitor-overlay.js";
|
|
7
|
+
import { GSD_SHORTCUTS } from "../shortcut-defs.js";
|
|
7
8
|
import { projectRoot } from "../commands/context.js";
|
|
8
9
|
import { shortcutDesc } from "../../shared/mod.js";
|
|
9
10
|
export function registerShortcuts(pi) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
11
|
+
const overlayOptions = {
|
|
12
|
+
width: "90%",
|
|
13
|
+
minWidth: 80,
|
|
14
|
+
maxHeight: "92%",
|
|
15
|
+
anchor: "center",
|
|
16
|
+
};
|
|
17
|
+
const openDashboardOverlay = async (ctx) => {
|
|
18
|
+
const basePath = projectRoot();
|
|
19
|
+
if (!existsSync(join(basePath, ".gsd"))) {
|
|
20
|
+
ctx.ui.notify("No .gsd/ directory found. Run /gsd to start.", "info");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
await ctx.ui.custom((tui, theme, _kb, done) => new GSDDashboardOverlay(tui, theme, () => done(true)), {
|
|
24
|
+
overlay: true,
|
|
25
|
+
overlayOptions,
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const openNotificationsOverlay = async (ctx) => {
|
|
29
|
+
await ctx.ui.custom((tui, theme, _kb, done) => new GSDNotificationOverlay(tui, theme, () => done(true)), {
|
|
30
|
+
overlay: true,
|
|
31
|
+
overlayOptions: {
|
|
32
|
+
width: "80%",
|
|
33
|
+
minWidth: 60,
|
|
34
|
+
maxHeight: "88%",
|
|
35
|
+
anchor: "center",
|
|
36
|
+
backdrop: true,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const openParallelOverlay = async (ctx) => {
|
|
41
|
+
const basePath = projectRoot();
|
|
42
|
+
const parallelDir = join(basePath, ".gsd", "parallel");
|
|
43
|
+
if (!existsSync(parallelDir)) {
|
|
44
|
+
ctx.ui.notify("No parallel workers found. Run /gsd parallel start first.", "info");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
await ctx.ui.custom((tui, theme, _kb, done) => new ParallelMonitorOverlay(tui, theme, () => done(true), basePath), {
|
|
48
|
+
overlay: true,
|
|
49
|
+
overlayOptions,
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
pi.registerShortcut(Key.ctrlAlt(GSD_SHORTCUTS.dashboard.key), {
|
|
53
|
+
description: shortcutDesc(GSD_SHORTCUTS.dashboard.action, GSD_SHORTCUTS.dashboard.command),
|
|
54
|
+
handler: openDashboardOverlay,
|
|
28
55
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
overlay: true,
|
|
34
|
-
overlayOptions: {
|
|
35
|
-
width: "80%",
|
|
36
|
-
minWidth: 60,
|
|
37
|
-
maxHeight: "88%",
|
|
38
|
-
anchor: "center",
|
|
39
|
-
backdrop: true,
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
},
|
|
56
|
+
// Fallback for terminals where Ctrl+Alt letter chords are not forwarded reliably.
|
|
57
|
+
pi.registerShortcut(Key.ctrlShift(GSD_SHORTCUTS.dashboard.key), {
|
|
58
|
+
description: shortcutDesc(`${GSD_SHORTCUTS.dashboard.action} (fallback)`, GSD_SHORTCUTS.dashboard.command),
|
|
59
|
+
handler: openDashboardOverlay,
|
|
43
60
|
});
|
|
44
|
-
pi.registerShortcut(Key.ctrlAlt(
|
|
45
|
-
description: shortcutDesc(
|
|
46
|
-
handler:
|
|
47
|
-
const basePath = projectRoot();
|
|
48
|
-
const parallelDir = join(basePath, ".gsd", "parallel");
|
|
49
|
-
if (!existsSync(parallelDir)) {
|
|
50
|
-
ctx.ui.notify("No parallel workers found. Run /gsd parallel start first.", "info");
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
await ctx.ui.custom((tui, theme, _kb, done) => new ParallelMonitorOverlay(tui, theme, () => done(true)), {
|
|
54
|
-
overlay: true,
|
|
55
|
-
overlayOptions: {
|
|
56
|
-
width: "90%",
|
|
57
|
-
minWidth: 80,
|
|
58
|
-
maxHeight: "92%",
|
|
59
|
-
anchor: "center",
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
},
|
|
61
|
+
pi.registerShortcut(Key.ctrlAlt(GSD_SHORTCUTS.notifications.key), {
|
|
62
|
+
description: shortcutDesc(GSD_SHORTCUTS.notifications.action, GSD_SHORTCUTS.notifications.command),
|
|
63
|
+
handler: openNotificationsOverlay,
|
|
63
64
|
});
|
|
65
|
+
// Fallback for terminals where Ctrl+Alt letter chords are not forwarded reliably.
|
|
66
|
+
pi.registerShortcut(Key.ctrlShift(GSD_SHORTCUTS.notifications.key), {
|
|
67
|
+
description: shortcutDesc(`${GSD_SHORTCUTS.notifications.action} (fallback)`, GSD_SHORTCUTS.notifications.command),
|
|
68
|
+
handler: openNotificationsOverlay,
|
|
69
|
+
});
|
|
70
|
+
pi.registerShortcut(Key.ctrlAlt(GSD_SHORTCUTS.parallel.key), {
|
|
71
|
+
description: shortcutDesc(GSD_SHORTCUTS.parallel.action, GSD_SHORTCUTS.parallel.command),
|
|
72
|
+
handler: openParallelOverlay,
|
|
73
|
+
});
|
|
74
|
+
// No Ctrl+Shift+P fallback — conflicts with cycleModelBackward (shift+ctrl+p).
|
|
75
|
+
// Use Ctrl+Alt+P or /gsd parallel watch instead.
|
|
64
76
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { enableDebug } from "../../debug-logger.js";
|
|
4
|
-
import { isAutoActive, isAutoPaused, pauseAuto,
|
|
4
|
+
import { isAutoActive, isAutoPaused, pauseAuto, startAutoDetached, stopAuto, stopAutoRemote } from "../../auto.js";
|
|
5
5
|
import { handleRate } from "../../commands-rate.js";
|
|
6
6
|
import { guardRemoteSession, projectRoot } from "../context.js";
|
|
7
7
|
import { findMilestoneIds } from "../../milestone-id-utils.js";
|
|
@@ -36,27 +36,6 @@ export function parseMilestoneTarget(input) {
|
|
|
36
36
|
const rest = input.replace(match[0], "").replace(/\s+/g, " ").trim();
|
|
37
37
|
return { milestoneId: match[1], rest };
|
|
38
38
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Set GSD_MILESTONE_LOCK to target a specific milestone, then run `fn`.
|
|
41
|
-
* Clears the env var when `fn` resolves or rejects, so the lock does not
|
|
42
|
-
* leak into subsequent commands in the same process.
|
|
43
|
-
*/
|
|
44
|
-
async function withMilestoneLock(milestoneId, fn) {
|
|
45
|
-
const previous = process.env.GSD_MILESTONE_LOCK;
|
|
46
|
-
process.env.GSD_MILESTONE_LOCK = milestoneId;
|
|
47
|
-
try {
|
|
48
|
-
await fn();
|
|
49
|
-
}
|
|
50
|
-
finally {
|
|
51
|
-
// Restore previous value (undefined → delete, else restore).
|
|
52
|
-
if (previous === undefined) {
|
|
53
|
-
delete process.env.GSD_MILESTONE_LOCK;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
process.env.GSD_MILESTONE_LOCK = previous;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
39
|
export async function handleAutoCommand(trimmed, ctx, pi) {
|
|
61
40
|
if (trimmed === "next" || trimmed.startsWith("next ")) {
|
|
62
41
|
if (trimmed.includes("--dry-run")) {
|
|
@@ -79,12 +58,10 @@ export async function handleAutoCommand(trimmed, ctx, pi) {
|
|
|
79
58
|
return true;
|
|
80
59
|
}
|
|
81
60
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
await startAuto(ctx, pi, projectRoot(), verboseMode, { step: true });
|
|
87
|
-
}
|
|
61
|
+
startAutoDetached(ctx, pi, projectRoot(), verboseMode, {
|
|
62
|
+
step: true,
|
|
63
|
+
milestoneLock: milestoneId,
|
|
64
|
+
});
|
|
88
65
|
return true;
|
|
89
66
|
}
|
|
90
67
|
if (trimmed === "auto" || trimmed.startsWith("auto ")) {
|
|
@@ -122,12 +99,12 @@ export async function handleAutoCommand(trimmed, ctx, pi) {
|
|
|
122
99
|
await showHeadlessMilestoneCreation(ctx, pi, projectRoot(), seedContent);
|
|
123
100
|
}
|
|
124
101
|
else if (milestoneId) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
102
|
+
startAutoDetached(ctx, pi, projectRoot(), verboseMode, {
|
|
103
|
+
milestoneLock: milestoneId,
|
|
104
|
+
});
|
|
128
105
|
}
|
|
129
106
|
else {
|
|
130
|
-
|
|
107
|
+
startAutoDetached(ctx, pi, projectRoot(), verboseMode);
|
|
131
108
|
}
|
|
132
109
|
return true;
|
|
133
110
|
}
|
|
@@ -168,7 +145,7 @@ export async function handleAutoCommand(trimmed, ctx, pi) {
|
|
|
168
145
|
if (trimmed === "") {
|
|
169
146
|
if (!(await guardRemoteSession(ctx, pi)))
|
|
170
147
|
return true;
|
|
171
|
-
|
|
148
|
+
startAutoDetached(ctx, pi, projectRoot(), false, { step: true });
|
|
172
149
|
return true;
|
|
173
150
|
}
|
|
174
151
|
return false;
|
|
@@ -4,10 +4,43 @@ import { ensurePreferencesFile, handlePrefs, handlePrefsMode, handlePrefsWizard
|
|
|
4
4
|
import { runEnvironmentChecks } from "../../doctor-environment.js";
|
|
5
5
|
import { deriveState } from "../../state.js";
|
|
6
6
|
import { handleCmux } from "../../commands-cmux.js";
|
|
7
|
+
import { setSessionModelOverride } from "../../session-model-override.js";
|
|
7
8
|
import { projectRoot } from "../context.js";
|
|
8
|
-
import {
|
|
9
|
-
export function showHelp(ctx) {
|
|
10
|
-
const
|
|
9
|
+
import { formattedShortcutPair } from "../../shortcut-defs.js";
|
|
10
|
+
export function showHelp(ctx, args = "") {
|
|
11
|
+
const summaryLines = [
|
|
12
|
+
"GSD — Get Shit Done\n",
|
|
13
|
+
"QUICK START",
|
|
14
|
+
" /gsd start <tpl> Start a workflow template",
|
|
15
|
+
" /gsd Run next unit (same as /gsd next)",
|
|
16
|
+
" /gsd auto Run all queued units continuously",
|
|
17
|
+
" /gsd pause Pause auto-mode",
|
|
18
|
+
" /gsd stop Stop auto-mode gracefully",
|
|
19
|
+
"",
|
|
20
|
+
"VISIBILITY",
|
|
21
|
+
` /gsd status Dashboard (${formattedShortcutPair("dashboard")})`,
|
|
22
|
+
` /gsd parallel watch Parallel monitor (${formattedShortcutPair("parallel")})`,
|
|
23
|
+
` /gsd notifications Notification history (${formattedShortcutPair("notifications")})`,
|
|
24
|
+
" /gsd visualize Interactive 10-tab TUI",
|
|
25
|
+
" /gsd queue Show queued/dispatched units",
|
|
26
|
+
"",
|
|
27
|
+
"COURSE CORRECTION",
|
|
28
|
+
" /gsd steer <desc> Apply user override to active work",
|
|
29
|
+
" /gsd capture <text> Quick-capture a thought to CAPTURES.md",
|
|
30
|
+
" /gsd triage Classify and route pending captures",
|
|
31
|
+
" /gsd undo Revert last completed unit [--force]",
|
|
32
|
+
" /gsd rethink Conversational project reorganization",
|
|
33
|
+
"",
|
|
34
|
+
"SETUP",
|
|
35
|
+
" /gsd init Project init wizard",
|
|
36
|
+
" /gsd setup Global setup status [llm|search|remote|keys|prefs]",
|
|
37
|
+
" /gsd model Switch active session model",
|
|
38
|
+
" /gsd prefs Manage preferences",
|
|
39
|
+
" /gsd doctor Diagnose and repair .gsd/ state",
|
|
40
|
+
"",
|
|
41
|
+
"Use /gsd help full for the complete command reference.",
|
|
42
|
+
];
|
|
43
|
+
const fullLines = [
|
|
11
44
|
"GSD — Get Shit Done\n",
|
|
12
45
|
"WORKFLOW",
|
|
13
46
|
" /gsd start <tpl> Start a workflow template (bugfix, spike, feature, hotfix, etc.)",
|
|
@@ -21,12 +54,13 @@ export function showHelp(ctx) {
|
|
|
21
54
|
" /gsd new-milestone Create milestone from headless context (used by gsd headless)",
|
|
22
55
|
"",
|
|
23
56
|
"VISIBILITY",
|
|
24
|
-
` /gsd status Show progress dashboard (${
|
|
57
|
+
` /gsd status Show progress dashboard (${formattedShortcutPair("dashboard")})`,
|
|
58
|
+
` /gsd parallel watch Open parallel worker monitor (${formattedShortcutPair("parallel")})`,
|
|
25
59
|
" /gsd visualize Interactive 10-tab TUI (progress, timeline, deps, metrics, health, agent, changes, knowledge, captures, export)",
|
|
26
60
|
" /gsd queue Show queued/dispatched units and execution order",
|
|
27
61
|
" /gsd history View execution history [--cost] [--phase] [--model] [N]",
|
|
28
62
|
" /gsd changelog Show categorized release notes [version]",
|
|
29
|
-
` /gsd notifications View persistent notification history [clear|tail|filter] (${
|
|
63
|
+
` /gsd notifications View persistent notification history [clear|tail|filter] (${formattedShortcutPair("notifications")})`,
|
|
30
64
|
"",
|
|
31
65
|
"COURSE CORRECTION",
|
|
32
66
|
" /gsd steer <desc> Apply user override to active work",
|
|
@@ -66,7 +100,8 @@ export function showHelp(ctx) {
|
|
|
66
100
|
" /gsd inspect Show SQLite DB diagnostics (schema, row counts, recent entries)",
|
|
67
101
|
" /gsd update Update GSD to the latest version via npm",
|
|
68
102
|
];
|
|
69
|
-
|
|
103
|
+
const full = ["full", "--full", "all"].includes(args.trim().toLowerCase());
|
|
104
|
+
ctx.ui.notify((full ? fullLines : summaryLines).join("\n"), "info");
|
|
70
105
|
}
|
|
71
106
|
export async function handleStatus(ctx) {
|
|
72
107
|
const basePath = projectRoot();
|
|
@@ -82,9 +117,9 @@ export async function handleStatus(ctx) {
|
|
|
82
117
|
const result = await ctx.ui.custom((tui, theme, _kb, done) => new GSDDashboardOverlay(tui, theme, () => done(true)), {
|
|
83
118
|
overlay: true,
|
|
84
119
|
overlayOptions: {
|
|
85
|
-
width: "
|
|
86
|
-
minWidth:
|
|
87
|
-
maxHeight: "
|
|
120
|
+
width: "90%",
|
|
121
|
+
minWidth: 80,
|
|
122
|
+
maxHeight: "92%",
|
|
88
123
|
anchor: "center",
|
|
89
124
|
},
|
|
90
125
|
});
|
|
@@ -251,11 +286,21 @@ async function handleModel(trimmedArgs, ctx, pi) {
|
|
|
251
286
|
ctx.ui.notify(`No API key for ${targetModel.provider}/${targetModel.id}`, "warning");
|
|
252
287
|
return;
|
|
253
288
|
}
|
|
289
|
+
// /gsd model is an explicit per-session pin for GSD dispatches.
|
|
290
|
+
// This is captured at auto bootstrap so it survives internal session
|
|
291
|
+
// switches during /gsd auto and /gsd next runs.
|
|
292
|
+
const sessionId = ctx.sessionManager?.getSessionId?.();
|
|
293
|
+
if (sessionId) {
|
|
294
|
+
setSessionModelOverride(sessionId, {
|
|
295
|
+
provider: targetModel.provider,
|
|
296
|
+
id: targetModel.id,
|
|
297
|
+
});
|
|
298
|
+
}
|
|
254
299
|
ctx.ui.notify(`Model: ${targetModel.provider}/${targetModel.id}`, "info");
|
|
255
300
|
}
|
|
256
301
|
export async function handleCoreCommand(trimmed, ctx, pi) {
|
|
257
|
-
if (trimmed === "help" || trimmed === "h" || trimmed === "?") {
|
|
258
|
-
showHelp(ctx);
|
|
302
|
+
if (trimmed === "help" || trimmed === "h" || trimmed === "?" || trimmed.startsWith("help ")) {
|
|
303
|
+
showHelp(ctx, trimmed.startsWith("help ") ? trimmed.slice(5).trim() : "");
|
|
259
304
|
return true;
|
|
260
305
|
}
|
|
261
306
|
if (trimmed === "status") {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// View, filter, and clear the persistent notification history.
|
|
3
3
|
import { readNotifications, clearNotifications, getUnreadCount, suppressPersistence, unsuppressPersistence, } from "../../notification-store.js";
|
|
4
4
|
import { GSDNotificationOverlay } from "../../notification-overlay.js";
|
|
5
|
+
const MAX_INLINE_ENTRIES = 40;
|
|
5
6
|
function severityIcon(severity) {
|
|
6
7
|
switch (severity) {
|
|
7
8
|
case "error": return "✗";
|
|
@@ -38,14 +39,18 @@ export async function handleNotificationsCommand(args, ctx, pi) {
|
|
|
38
39
|
if (args === "tail" || args.startsWith("tail ")) {
|
|
39
40
|
const countStr = args.replace(/^tail\s*/, "").trim();
|
|
40
41
|
const count = countStr ? parseInt(countStr, 10) : 20;
|
|
41
|
-
const
|
|
42
|
-
const
|
|
42
|
+
const all = readNotifications();
|
|
43
|
+
const n = isNaN(count) || count < 1 ? 20 : Math.min(count, MAX_INLINE_ENTRIES);
|
|
44
|
+
const entries = all.slice(0, n);
|
|
43
45
|
if (entries.length === 0) {
|
|
44
46
|
ctx.ui.notify("No notifications.", "info");
|
|
45
47
|
return true;
|
|
46
48
|
}
|
|
47
49
|
const lines = entries.map((e) => `${severityIcon(e.severity)} [${formatTimestamp(e.ts)}] ${e.message}`);
|
|
48
|
-
|
|
50
|
+
const suffix = all.length > entries.length
|
|
51
|
+
? `\n... and ${all.length - entries.length} more (open /gsd notifications to browse all)`
|
|
52
|
+
: "";
|
|
53
|
+
ctx.ui.notify(`Last ${entries.length} notification(s):\n${lines.join("\n")}${suffix}`, "info");
|
|
49
54
|
return true;
|
|
50
55
|
}
|
|
51
56
|
// /gsd notifications filter <severity>
|
|
@@ -61,7 +66,9 @@ export async function handleNotificationsCommand(args, ctx, pi) {
|
|
|
61
66
|
return true;
|
|
62
67
|
}
|
|
63
68
|
const lines = entries.slice(0, 20).map((e) => `${severityIcon(e.severity)} [${formatTimestamp(e.ts)}] ${e.message}`);
|
|
64
|
-
const suffix = entries.length > 20
|
|
69
|
+
const suffix = entries.length > 20
|
|
70
|
+
? `\n... and ${entries.length - 20} more (open /gsd notifications to browse all)`
|
|
71
|
+
: "";
|
|
65
72
|
ctx.ui.notify(`${severity} notifications (${entries.length}):\n${lines.join("\n")}${suffix}`, "info");
|
|
66
73
|
return true;
|
|
67
74
|
}
|
|
@@ -70,7 +77,7 @@ export async function handleNotificationsCommand(args, ctx, pi) {
|
|
|
70
77
|
// Try overlay first (TUI mode)
|
|
71
78
|
if (ctx.hasUI) {
|
|
72
79
|
try {
|
|
73
|
-
await ctx.ui.custom((tui, theme, _kb, done) => new GSDNotificationOverlay(tui, theme, () => done()), {
|
|
80
|
+
const result = await ctx.ui.custom((tui, theme, _kb, done) => new GSDNotificationOverlay(tui, theme, () => done(true)), {
|
|
74
81
|
overlay: true,
|
|
75
82
|
overlayOptions: {
|
|
76
83
|
width: "80%",
|
|
@@ -80,7 +87,9 @@ export async function handleNotificationsCommand(args, ctx, pi) {
|
|
|
80
87
|
backdrop: true,
|
|
81
88
|
},
|
|
82
89
|
});
|
|
83
|
-
|
|
90
|
+
if (result !== undefined) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
84
93
|
}
|
|
85
94
|
catch {
|
|
86
95
|
// Fall through to text output if overlay fails
|
|
@@ -12,7 +12,7 @@ import { nextMilestoneId } from "../../milestone-ids.js";
|
|
|
12
12
|
import { findMilestoneIds } from "../../guided-flow.js";
|
|
13
13
|
import { projectRoot } from "../context.js";
|
|
14
14
|
import { createRun, listRuns } from "../../run-manager.js";
|
|
15
|
-
import { setActiveEngineId, setActiveRunDir,
|
|
15
|
+
import { setActiveEngineId, setActiveRunDir, startAutoDetached, pauseAuto, isAutoActive, getActiveEngineId, } from "../../auto.js";
|
|
16
16
|
import { validateDefinition } from "../../definition-loader.js";
|
|
17
17
|
// ─── Custom Workflow Subcommands ─────────────────────────────────────────
|
|
18
18
|
const WORKFLOW_USAGE = [
|
|
@@ -58,7 +58,7 @@ async function handleCustomWorkflow(sub, ctx, pi) {
|
|
|
58
58
|
setActiveEngineId("custom");
|
|
59
59
|
setActiveRunDir(runDir);
|
|
60
60
|
ctx.ui.notify(`Created workflow run: ${defName}\nRun dir: ${runDir}`, "info");
|
|
61
|
-
|
|
61
|
+
startAutoDetached(ctx, pi, base, false);
|
|
62
62
|
}
|
|
63
63
|
catch (err) {
|
|
64
64
|
// Clean up engine state so a failed workflow run doesn't pollute the next /gsd auto
|
|
@@ -137,14 +137,8 @@ async function handleCustomWorkflow(sub, ctx, pi) {
|
|
|
137
137
|
ctx.ui.notify("No custom workflow to resume. Use /gsd auto for dev workflow.", "warning");
|
|
138
138
|
return true;
|
|
139
139
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
ctx.ui.notify("Custom workflow resumed.", "info");
|
|
143
|
-
}
|
|
144
|
-
catch (err) {
|
|
145
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
146
|
-
ctx.ui.notify(`Failed to resume workflow: ${msg}`, "error");
|
|
147
|
-
}
|
|
140
|
+
startAutoDetached(ctx, pi, projectRoot(), false);
|
|
141
|
+
ctx.ui.notify("Custom workflow resumed.", "info");
|
|
148
142
|
return true;
|
|
149
143
|
}
|
|
150
144
|
// Unknown subcommand — show usage
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Full-screen overlay showing auto-mode progress: milestone/slice/task
|
|
5
5
|
* breakdown, current unit, completed units, timing, and activity log.
|
|
6
|
-
* Toggled with Ctrl+Alt+G (⌃⌥G on macOS)
|
|
6
|
+
* Toggled with Ctrl+Alt+G (⌃⌥G on macOS), Ctrl+Shift+G fallback,
|
|
7
|
+
* or opened from /gsd status.
|
|
7
8
|
*/
|
|
8
9
|
import { truncateToWidth, visibleWidth, matchesKey, Key } from "@gsd/pi-tui";
|
|
9
10
|
import { deriveState } from "./state.js";
|
|
@@ -19,6 +20,7 @@ import { formatDuration, padRight, joinColumns, centerLine, fitColumns, STATUS_G
|
|
|
19
20
|
import { estimateTimeRemaining } from "./auto-dashboard.js";
|
|
20
21
|
import { computeProgressScore } from "./progress-score.js";
|
|
21
22
|
import { runEnvironmentChecks } from "./doctor-environment.js";
|
|
23
|
+
import { formattedShortcutPair } from "./shortcut-defs.js";
|
|
22
24
|
function unitLabel(type) {
|
|
23
25
|
switch (type) {
|
|
24
26
|
case "discuss-milestone":
|
|
@@ -174,7 +176,10 @@ export class GSDDashboardOverlay {
|
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
178
|
handleInput(data) {
|
|
177
|
-
if (matchesKey(data, Key.escape) ||
|
|
179
|
+
if (matchesKey(data, Key.escape) ||
|
|
180
|
+
matchesKey(data, Key.ctrl("c")) ||
|
|
181
|
+
matchesKey(data, Key.ctrlAlt("g")) ||
|
|
182
|
+
matchesKey(data, Key.ctrlShift("g"))) {
|
|
178
183
|
this.dispose();
|
|
179
184
|
this.onClose();
|
|
180
185
|
return;
|
|
@@ -507,7 +512,7 @@ export class GSDDashboardOverlay {
|
|
|
507
512
|
}
|
|
508
513
|
lines.push(blank());
|
|
509
514
|
lines.push(hr());
|
|
510
|
-
lines.push(centered(th.fg("dim",
|
|
515
|
+
lines.push(centered(th.fg("dim", `↑↓ scroll · g/G top/end · Esc/${formattedShortcutPair("dashboard")} close`)));
|
|
511
516
|
return lines;
|
|
512
517
|
}
|
|
513
518
|
renderProgressRow(label, done, total, color, width) {
|
|
@@ -147,10 +147,33 @@ const PROVIDER_ROUTES = {
|
|
|
147
147
|
openai: ["github-copilot", "openai-codex"],
|
|
148
148
|
google: ["google-gemini-cli"],
|
|
149
149
|
};
|
|
150
|
+
/**
|
|
151
|
+
* Providers that use external CLI authentication (not API keys).
|
|
152
|
+
* These are always considered "ok" — the host CLI handles auth.
|
|
153
|
+
*/
|
|
154
|
+
const CLI_AUTH_PROVIDERS = new Set([
|
|
155
|
+
"claude-code",
|
|
156
|
+
"openai-codex",
|
|
157
|
+
"google-gemini-cli",
|
|
158
|
+
"google-antigravity",
|
|
159
|
+
]);
|
|
150
160
|
function checkLlmProviders() {
|
|
151
161
|
const required = collectConfiguredModelProviders();
|
|
152
162
|
const results = [];
|
|
153
163
|
for (const providerId of required) {
|
|
164
|
+
// CLI-authenticated providers don't need API keys — skip key check
|
|
165
|
+
if (CLI_AUTH_PROVIDERS.has(providerId)) {
|
|
166
|
+
const info = PROVIDER_REGISTRY.find(p => p.id === providerId);
|
|
167
|
+
results.push({
|
|
168
|
+
name: providerId,
|
|
169
|
+
label: info?.label ?? providerId,
|
|
170
|
+
category: "llm",
|
|
171
|
+
status: "ok",
|
|
172
|
+
message: `${info?.label ?? providerId} — CLI auth (no key needed)`,
|
|
173
|
+
required: true,
|
|
174
|
+
});
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
154
177
|
const info = PROVIDER_REGISTRY.find(p => p.id === providerId);
|
|
155
178
|
const label = providerId === "anthropic-vertex"
|
|
156
179
|
? "Anthropic Vertex"
|
|
@@ -20,6 +20,9 @@ export function resetRetryState(state) {
|
|
|
20
20
|
// ── Classification ──────────────────────────────────────────────────────────
|
|
21
21
|
const PERMANENT_RE = /auth|unauthorized|forbidden|invalid.*key|invalid.*api|billing|quota exceeded|account/i;
|
|
22
22
|
const RATE_LIMIT_RE = /rate.?limit|too many requests|429/i;
|
|
23
|
+
// OpenRouter affordability-style quota errors should be treated as transient
|
|
24
|
+
// so core retry logic can lower maxTokens and continue in-session.
|
|
25
|
+
const AFFORDABILITY_RE = /requires more credits|can only afford|insufficient credits|not enough credits|fewer max_tokens/i;
|
|
23
26
|
const NETWORK_RE = /network|ECONNRESET|ETIMEDOUT|ECONNREFUSED|socket hang up|fetch failed|connection.*reset|dns/i;
|
|
24
27
|
const SERVER_RE = /internal server error|500|502|503|overloaded|server_error|api_error|service.?unavailable/i;
|
|
25
28
|
// ECONNRESET/ECONNREFUSED are in NETWORK_RE (same-model retry first).
|
|
@@ -42,7 +45,7 @@ const RESET_DELAY_RE = /reset in (\d+)s/i;
|
|
|
42
45
|
*/
|
|
43
46
|
export function classifyError(errorMsg, retryAfterMs) {
|
|
44
47
|
const isPermanent = PERMANENT_RE.test(errorMsg);
|
|
45
|
-
const isRateLimit = RATE_LIMIT_RE.test(errorMsg);
|
|
48
|
+
const isRateLimit = RATE_LIMIT_RE.test(errorMsg) || AFFORDABILITY_RE.test(errorMsg);
|
|
46
49
|
// 1. Permanent — but rate limit takes precedence
|
|
47
50
|
if (isPermanent && !isRateLimit) {
|
|
48
51
|
return { kind: "permanent" };
|
|
@@ -508,19 +508,30 @@ function getDbCompletionCounts() {
|
|
|
508
508
|
* Exported for testability.
|
|
509
509
|
*/
|
|
510
510
|
export function detectStuckLoops(units, anomalies) {
|
|
511
|
-
// First, collect unique startedAt values per type/id key
|
|
511
|
+
// First, collect unique startedAt values per type/id key, bucketed by
|
|
512
|
+
// autoSessionKey when available so cross-session recovery does not look
|
|
513
|
+
// like a within-session stuck loop.
|
|
512
514
|
const dispatchMap = new Map();
|
|
513
515
|
for (const u of units) {
|
|
514
516
|
const key = `${u.type}/${u.id}`;
|
|
515
|
-
let
|
|
517
|
+
let sessionBuckets = dispatchMap.get(key);
|
|
518
|
+
if (!sessionBuckets) {
|
|
519
|
+
sessionBuckets = new Map();
|
|
520
|
+
dispatchMap.set(key, sessionBuckets);
|
|
521
|
+
}
|
|
522
|
+
const sessionKey = u.autoSessionKey ?? "__legacy__";
|
|
523
|
+
let starts = sessionBuckets.get(sessionKey);
|
|
516
524
|
if (!starts) {
|
|
517
525
|
starts = new Set();
|
|
518
|
-
|
|
526
|
+
sessionBuckets.set(sessionKey, starts);
|
|
519
527
|
}
|
|
520
528
|
starts.add(u.startedAt);
|
|
521
529
|
}
|
|
522
|
-
for (const [key,
|
|
523
|
-
const
|
|
530
|
+
for (const [key, sessionBuckets] of dispatchMap) {
|
|
531
|
+
const hasSessionAwareData = Array.from(sessionBuckets.keys()).some((sessionKey) => sessionKey !== "__legacy__");
|
|
532
|
+
const count = hasSessionAwareData
|
|
533
|
+
? Math.max(...Array.from(sessionBuckets.values(), (starts) => starts.size))
|
|
534
|
+
: (sessionBuckets.get("__legacy__")?.size ?? 0);
|
|
524
535
|
if (count > 1) {
|
|
525
536
|
const [unitType, ...idParts] = key.split("/");
|
|
526
537
|
anomalies.push({
|
|
@@ -529,7 +540,9 @@ export function detectStuckLoops(units, anomalies) {
|
|
|
529
540
|
unitType,
|
|
530
541
|
unitId: idParts.join("/"),
|
|
531
542
|
summary: `Unit ${key} was dispatched ${count} times`,
|
|
532
|
-
details:
|
|
543
|
+
details: hasSessionAwareData
|
|
544
|
+
? `Repeated dispatch within the same auto session suggests the unit completed but its artifacts were not verified, or the state machine kept returning it. Cross-session recovery runs are ignored.`
|
|
545
|
+
: `Repeated dispatch suggests the unit completed but its artifacts weren't verified, or the state machine kept returning it.`,
|
|
533
546
|
});
|
|
534
547
|
}
|
|
535
548
|
}
|