gsd-pi 2.78.0 → 2.78.1-dev.82bcf6b71
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 +60 -23
- package/dist/bundled-resource-path.d.ts +7 -0
- package/dist/bundled-resource-path.js +34 -2
- package/dist/claude-cli-check.js +104 -33
- package/dist/cli-policy.d.ts +13 -0
- package/dist/cli-policy.js +17 -0
- package/dist/cli.js +95 -55
- package/dist/headless-query.d.ts +22 -0
- package/dist/headless-query.js +43 -8
- package/dist/headless.d.ts +10 -0
- package/dist/headless.js +16 -1
- package/dist/loader.js +9 -13
- package/dist/onboarding.d.ts +10 -0
- package/dist/onboarding.js +2 -2
- package/dist/provider-migrations.d.ts +2 -2
- package/dist/provider-migrations.js +5 -2
- package/dist/resource-loader.d.ts +5 -2
- package/dist/resource-loader.js +30 -13
- package/dist/resources/.managed-resources-content-hash +1 -0
- package/dist/resources/extensions/claude-code-cli/readiness.js +128 -32
- package/dist/resources/extensions/google-search/index.js +2 -6
- package/dist/resources/extensions/gsd/auto/loop.js +23 -0
- package/dist/resources/extensions/gsd/auto/phases.js +5 -13
- package/dist/resources/extensions/gsd/auto/run-unit.js +26 -12
- package/dist/resources/extensions/gsd/auto/session.js +5 -6
- package/dist/resources/extensions/gsd/auto-dashboard.js +3 -2
- package/dist/resources/extensions/gsd/auto-direct-dispatch.js +55 -21
- package/dist/resources/extensions/gsd/auto-dispatch.js +18 -6
- package/dist/resources/extensions/gsd/auto-prompts.js +69 -2
- package/dist/resources/extensions/gsd/auto-recovery.js +43 -4
- package/dist/resources/extensions/gsd/auto-runtime-state.js +31 -0
- package/dist/resources/extensions/gsd/auto-start.js +1 -1
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +2 -2
- package/dist/resources/extensions/gsd/auto-worktree.js +75 -13
- package/dist/resources/extensions/gsd/auto.js +39 -14
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +14 -2
- package/dist/resources/extensions/gsd/bootstrap/exec-tools.js +7 -5
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +2 -2
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +5 -4
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +112 -31
- package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +11 -6
- package/dist/resources/extensions/gsd/bootstrap/subagent-input.js +22 -0
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +45 -8
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +121 -3
- package/dist/resources/extensions/gsd/commands/catalog.js +76 -5
- package/dist/resources/extensions/gsd/commands/handlers/core.js +23 -1
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +8 -0
- package/dist/resources/extensions/gsd/commands-config.js +3 -2
- package/dist/resources/extensions/gsd/commands-extensions.js +46 -3
- package/dist/resources/extensions/gsd/commands-handlers.js +3 -2
- package/dist/resources/extensions/gsd/commands-mcp-status.js +3 -1
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +10 -1
- package/dist/resources/extensions/gsd/commands-worktree.js +309 -0
- package/dist/resources/extensions/gsd/dashboard-overlay.js +1 -1
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +10 -0
- package/dist/resources/extensions/gsd/doctor-providers.js +2 -1
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +39 -1
- package/dist/resources/extensions/gsd/error-classifier.js +1 -1
- package/dist/resources/extensions/gsd/forensics.js +10 -8
- package/dist/resources/extensions/gsd/git-service.js +12 -5
- package/dist/resources/extensions/gsd/gsd-db.js +11 -2
- package/dist/resources/extensions/gsd/guided-flow.js +25 -24
- package/dist/resources/extensions/gsd/home-dir.js +16 -0
- package/dist/resources/extensions/gsd/key-manager.js +2 -1
- package/dist/resources/extensions/gsd/memory-store.js +66 -31
- package/dist/resources/extensions/gsd/migrate/command.js +3 -2
- package/dist/resources/extensions/gsd/milestone-id-reservation.js +36 -0
- package/dist/resources/extensions/gsd/model-router.js +114 -9
- package/dist/resources/extensions/gsd/native-git-bridge.js +7 -1
- package/dist/resources/extensions/gsd/preferences-models.js +91 -15
- package/dist/resources/extensions/gsd/preferences-types.js +2 -0
- package/dist/resources/extensions/gsd/preferences-validation.js +32 -0
- package/dist/resources/extensions/gsd/preferences.js +5 -3
- package/dist/resources/extensions/gsd/prompt-loader.js +23 -12
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +10 -0
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +10 -0
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
- package/dist/resources/extensions/gsd/prompts/parallel-research-slices.md +2 -0
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +10 -0
- package/dist/resources/extensions/gsd/prompts/refine-slice.md +10 -0
- package/dist/resources/extensions/gsd/prompts/rewrite-docs.md +2 -0
- package/dist/resources/extensions/gsd/slice-parallel-orchestrator.js +9 -3
- package/dist/resources/extensions/gsd/state.js +42 -0
- package/dist/resources/extensions/gsd/templates/PREFERENCES.md +1 -0
- package/dist/resources/extensions/gsd/tools/memory-tools.js +18 -1
- package/dist/resources/extensions/gsd/unit-context-manifest.js +29 -4
- package/dist/resources/extensions/gsd/visualizer-overlay.js +1 -1
- package/dist/resources/extensions/gsd/watch/header-renderer.js +3 -1
- package/dist/resources/extensions/gsd/worktree-command.js +26 -46
- package/dist/resources/extensions/gsd/worktree-manager.js +20 -1
- package/dist/resources/extensions/gsd/worktree-resolver.js +28 -13
- package/dist/resources/extensions/gsd/worktree-root.js +124 -0
- package/dist/resources/extensions/gsd/worktree-session-state.js +33 -0
- package/dist/resources/extensions/gsd/worktree.js +4 -115
- package/dist/resources/extensions/mcp-client/index.js +6 -9
- package/dist/resources/extensions/ollama/index.js +15 -2
- package/dist/resources/extensions/ollama/model-capabilities.js +31 -0
- package/dist/resources/extensions/ollama/ollama-client.js +40 -4
- package/dist/resources/extensions/slash-commands/create-extension.js +36 -22
- package/dist/resources/extensions/subagent/index.js +324 -178
- package/dist/resources/skills/create-gsd-extension/SKILL.md +9 -5
- package/dist/resources/skills/create-gsd-extension/references/custom-commands.md +1 -1
- package/dist/resources/skills/create-gsd-extension/references/custom-rendering.md +5 -5
- package/dist/resources/skills/create-gsd-extension/references/custom-tools.md +4 -4
- package/dist/resources/skills/create-gsd-extension/references/custom-ui.md +6 -6
- package/dist/resources/skills/create-gsd-extension/references/events-reference.md +3 -3
- package/dist/resources/skills/create-gsd-extension/references/packaging-distribution.md +1 -1
- package/dist/resources/skills/create-gsd-extension/references/remote-execution-overrides.md +3 -3
- package/dist/resources/skills/create-gsd-extension/workflows/create-extension.md +32 -12
- package/dist/resources/skills/lint/SKILL.md +4 -0
- package/dist/resources/skills/review/SKILL.md +4 -0
- package/dist/resources/skills/test/SKILL.md +3 -0
- package/dist/rtk-shared.d.ts +3 -0
- package/dist/rtk-shared.js +17 -0
- package/dist/rtk.d.ts +2 -5
- package/dist/rtk.js +3 -20
- package/dist/runtime-checks.d.ts +27 -0
- package/dist/runtime-checks.js +38 -0
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +19 -19
- package/dist/web/standalone/.next/build-manifest.json +4 -4
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/react-loadable-manifest.json +44 -4
- package/dist/web/standalone/.next/required-server-files.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +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/page.js +2 -2
- package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/experimental/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +4 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +4 -4
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/page.js +2 -2
- package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +19 -19
- package/dist/web/standalone/.next/server/chunks/63.js +3 -3
- package/dist/web/standalone/.next/server/chunks/6897.js +1 -1
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-manifest.json +5 -5
- package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware.js +2 -2
- package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/server/webpack-runtime.js +1 -1
- package/dist/web/standalone/.next/static/chunks/2556.0527fea66e123b7f.js +1 -0
- package/dist/web/standalone/.next/static/chunks/2824.08296bc2f9654698.js +1 -0
- package/dist/web/standalone/.next/static/chunks/3026.3af53b279375f082.js +1 -0
- package/dist/web/standalone/.next/static/chunks/315.6f68ae79b67d25cf.js +1 -0
- package/dist/web/standalone/.next/static/chunks/3497.4bfc60a3b3dea717.js +1 -0
- package/dist/web/standalone/.next/static/chunks/5516.4a07c872b5c3a663.js +1 -0
- package/dist/web/standalone/.next/static/chunks/8336.31b019697882acfb.js +10 -0
- package/dist/web/standalone/.next/static/chunks/8845.c9702695e8c5a9c5.js +2 -0
- package/dist/web/standalone/.next/static/chunks/9058.01ef3a463bda88f1.js +20 -0
- package/dist/web/standalone/.next/static/chunks/9441.1081da1125d1764f.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/page-9bf2e0c50fb2ca05.js +1 -0
- package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
- package/dist/web/standalone/.next/static/chunks/webpack-f9f0dc45e4f3ac10.js +1 -0
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
- package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
- package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
- package/dist/web/standalone/package.json +2 -1
- package/dist/web/standalone/server.js +1 -1
- package/dist/welcome-screen.js +27 -1
- package/dist/worktree-cli.d.ts +1 -0
- package/dist/worktree-cli.js +9 -3
- package/dist/worktree-status-banner.d.ts +1 -0
- package/dist/worktree-status-banner.js +132 -0
- package/package.json +1 -3
- package/packages/daemon/package.json +2 -2
- package/packages/mcp-server/dist/alias-telemetry.d.ts +8 -0
- package/packages/mcp-server/dist/alias-telemetry.d.ts.map +1 -0
- package/packages/mcp-server/dist/alias-telemetry.js +30 -0
- package/packages/mcp-server/dist/alias-telemetry.js.map +1 -0
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +74 -46
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +2 -2
- package/packages/mcp-server/src/alias-telemetry.test.ts +78 -0
- package/packages/mcp-server/src/alias-telemetry.ts +30 -0
- package/packages/mcp-server/src/workflow-tools.test.ts +78 -0
- package/packages/mcp-server/src/workflow-tools.ts +93 -58
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/package.json +1 -1
- package/packages/native/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.cache-breakpoint.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.cache-breakpoint.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.cache-breakpoint.test.js +231 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.cache-breakpoint.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +48 -19
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/types.d.ts +13 -0
- package/packages/pi-ai/dist/types.d.ts.map +1 -1
- package/packages/pi-ai/dist/types.js.map +1 -1
- package/packages/pi-ai/dist/utils/repair-tool-json.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/repair-tool-json.js +24 -3
- package/packages/pi-ai/dist/utils/repair-tool-json.js.map +1 -1
- package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.js +26 -0
- package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.js.map +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-ai/src/providers/anthropic-shared.cache-breakpoint.test.ts +289 -0
- package/packages/pi-ai/src/providers/anthropic-shared.ts +52 -20
- package/packages/pi-ai/src/types.ts +13 -0
- package/packages/pi-ai/src/utils/repair-tool-json.ts +24 -3
- package/packages/pi-ai/src/utils/tests/repair-tool-json.test.ts +32 -0
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +6 -0
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/messages.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/messages.js +4 -0
- package/packages/pi-coding-agent/dist/core/messages.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +19 -2
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts +10 -0
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +18 -0
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts +13 -0
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +20 -16
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/token-telemetry.d.ts +37 -0
- package/packages/pi-coding-agent/dist/core/token-telemetry.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/token-telemetry.js +49 -0
- package/packages/pi-coding-agent/dist/core/token-telemetry.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.js +133 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js +14 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/tests/system-prompt-cache-stability.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/tests/system-prompt-cache-stability.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/tests/system-prompt-cache-stability.test.js +78 -0
- package/packages/pi-coding-agent/dist/tests/system-prompt-cache-stability.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/tests/token-telemetry.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/tests/token-telemetry.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/tests/token-telemetry.test.js +181 -0
- package/packages/pi-coding-agent/dist/tests/token-telemetry.test.js.map +1 -0
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session.ts +7 -0
- package/packages/pi-coding-agent/src/core/messages.ts +4 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +32 -2
- package/packages/pi-coding-agent/src/core/model-registry.ts +21 -0
- package/packages/pi-coding-agent/src/core/system-prompt.ts +33 -15
- package/packages/pi-coding-agent/src/core/token-telemetry.ts +77 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.ts +212 -0
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.ts +17 -1
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.ts +1 -1
- package/packages/pi-coding-agent/src/tests/system-prompt-cache-stability.test.ts +102 -0
- package/packages/pi-coding-agent/src/tests/token-telemetry.test.ts +200 -0
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/dist/__tests__/autocomplete.test.js +17 -3
- package/packages/pi-tui/dist/__tests__/autocomplete.test.js.map +1 -1
- package/packages/pi-tui/dist/components/__tests__/leak-fixes-runtime.test.d.ts +2 -0
- package/packages/pi-tui/dist/components/__tests__/leak-fixes-runtime.test.d.ts.map +1 -0
- package/packages/pi-tui/dist/components/__tests__/leak-fixes-runtime.test.js +161 -0
- package/packages/pi-tui/dist/components/__tests__/leak-fixes-runtime.test.js.map +1 -0
- package/packages/pi-tui/package.json +1 -1
- package/packages/pi-tui/src/__tests__/autocomplete.test.ts +20 -3
- package/packages/pi-tui/src/components/__tests__/leak-fixes-runtime.test.ts +219 -0
- package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
- package/packages/rpc-client/package.json +1 -1
- package/pkg/package.json +1 -1
- package/src/resources/extensions/claude-code-cli/readiness.ts +130 -30
- package/src/resources/extensions/google-search/index.ts +2 -9
- package/src/resources/extensions/gsd/auto/loop.ts +24 -2
- package/src/resources/extensions/gsd/auto/phases.ts +6 -14
- package/src/resources/extensions/gsd/auto/run-unit.ts +26 -12
- package/src/resources/extensions/gsd/auto/session.ts +5 -6
- package/src/resources/extensions/gsd/auto/types.ts +1 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +3 -2
- package/src/resources/extensions/gsd/auto-direct-dispatch.ts +60 -24
- package/src/resources/extensions/gsd/auto-dispatch.ts +18 -6
- package/src/resources/extensions/gsd/auto-prompts.ts +66 -2
- package/src/resources/extensions/gsd/auto-recovery.ts +46 -8
- package/src/resources/extensions/gsd/auto-runtime-state.ts +51 -0
- package/src/resources/extensions/gsd/auto-start.ts +1 -1
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +2 -4
- package/src/resources/extensions/gsd/auto-worktree.ts +97 -12
- package/src/resources/extensions/gsd/auto.ts +37 -10
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +15 -13
- package/src/resources/extensions/gsd/bootstrap/exec-tools.ts +8 -7
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +2 -2
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +10 -9
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +121 -31
- package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +12 -6
- package/src/resources/extensions/gsd/bootstrap/subagent-input.ts +20 -0
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +50 -8
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +141 -11
- package/src/resources/extensions/gsd/commands/catalog.ts +82 -5
- package/src/resources/extensions/gsd/commands/handlers/core.ts +23 -1
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +10 -0
- package/src/resources/extensions/gsd/commands-config.ts +3 -2
- package/src/resources/extensions/gsd/commands-extensions.ts +43 -3
- package/src/resources/extensions/gsd/commands-handlers.ts +3 -2
- package/src/resources/extensions/gsd/commands-mcp-status.ts +3 -1
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +15 -1
- package/src/resources/extensions/gsd/commands-worktree.ts +383 -0
- package/src/resources/extensions/gsd/dashboard-overlay.ts +1 -1
- package/src/resources/extensions/gsd/docs/preferences-reference.md +10 -0
- package/src/resources/extensions/gsd/doctor-providers.ts +2 -1
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +39 -1
- package/src/resources/extensions/gsd/doctor-types.ts +3 -1
- package/src/resources/extensions/gsd/error-classifier.ts +1 -1
- package/src/resources/extensions/gsd/forensics.ts +12 -7
- package/src/resources/extensions/gsd/git-service.ts +13 -5
- package/src/resources/extensions/gsd/gsd-db.ts +12 -2
- package/src/resources/extensions/gsd/guided-flow.ts +27 -26
- package/src/resources/extensions/gsd/home-dir.ts +19 -0
- package/src/resources/extensions/gsd/journal.ts +4 -1
- package/src/resources/extensions/gsd/key-manager.ts +2 -1
- package/src/resources/extensions/gsd/memory-store.ts +81 -28
- package/src/resources/extensions/gsd/migrate/command.ts +3 -2
- package/src/resources/extensions/gsd/milestone-id-reservation.ts +47 -0
- package/src/resources/extensions/gsd/model-router.ts +172 -9
- package/src/resources/extensions/gsd/native-git-bridge.ts +7 -1
- package/src/resources/extensions/gsd/preferences-models.ts +101 -15
- package/src/resources/extensions/gsd/preferences-types.ts +6 -0
- package/src/resources/extensions/gsd/preferences-validation.ts +35 -0
- package/src/resources/extensions/gsd/preferences.ts +16 -2
- package/src/resources/extensions/gsd/prompt-loader.ts +26 -12
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +10 -0
- package/src/resources/extensions/gsd/prompts/complete-slice.md +10 -0
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
- package/src/resources/extensions/gsd/prompts/parallel-research-slices.md +2 -0
- package/src/resources/extensions/gsd/prompts/plan-slice.md +10 -0
- package/src/resources/extensions/gsd/prompts/refine-slice.md +10 -0
- package/src/resources/extensions/gsd/prompts/rewrite-docs.md +2 -0
- package/src/resources/extensions/gsd/slice-parallel-orchestrator.ts +9 -3
- package/src/resources/extensions/gsd/state.ts +42 -0
- package/src/resources/extensions/gsd/templates/PREFERENCES.md +1 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +179 -1
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +58 -0
- package/src/resources/extensions/gsd/tests/auto-session-encapsulation.test.ts +24 -5
- package/src/resources/extensions/gsd/tests/auto-supervisor.test.mjs +21 -4
- package/src/resources/extensions/gsd/tests/bootstrap-derive-state-db-open.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/budget-prediction.test.ts +138 -211
- package/src/resources/extensions/gsd/tests/bundled-skill-triggers.test.ts +50 -27
- package/src/resources/extensions/gsd/tests/commands-extensions-version-compare.test.ts +58 -0
- package/src/resources/extensions/gsd/tests/commands-worktree-clean.test.ts +48 -0
- package/src/resources/extensions/gsd/tests/complete-slice-verification-gate.test.ts +142 -59
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +7 -4
- package/src/resources/extensions/gsd/tests/completed-at-reconcile.test.ts +89 -32
- package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +41 -23
- package/src/resources/extensions/gsd/tests/db-path-worktree-symlink.test.ts +3 -43
- package/src/resources/extensions/gsd/tests/debug-logger.test.ts +5 -3
- package/src/resources/extensions/gsd/tests/deferred-milestone-dir-4996.test.ts +116 -0
- package/src/resources/extensions/gsd/tests/discuss-empty-db-fallback.test.ts +22 -87
- package/src/resources/extensions/gsd/tests/discuss-queued-milestones.test.ts +7 -118
- package/src/resources/extensions/gsd/tests/discuss-tool-scope-leak.test.ts +18 -60
- package/src/resources/extensions/gsd/tests/doctor-orphan-milestone-4996.test.ts +100 -0
- package/src/resources/extensions/gsd/tests/double-merge-guard.test.ts +14 -76
- package/src/resources/extensions/gsd/tests/ensure-preconditions-guard-4996.test.ts +93 -0
- package/src/resources/extensions/gsd/tests/false-degraded-mode-warning.test.ts +22 -83
- package/src/resources/extensions/gsd/tests/finalize-timeout-guard.test.ts +1 -63
- package/src/resources/extensions/gsd/tests/find-missing-summaries-closed-runtime.test.ts +47 -0
- package/src/resources/extensions/gsd/tests/forensics-stuck-loops.test.ts +26 -1
- package/src/resources/extensions/gsd/tests/gitignore-bg-shell-runtime.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/google-search-stub.test.ts +25 -65
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/gsd-no-project-error-runtime.test.ts +81 -0
- package/src/resources/extensions/gsd/tests/headless-answers.test.ts +14 -4
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +22 -12
- package/src/resources/extensions/gsd/tests/help-menu-coverage.test.ts +57 -0
- package/src/resources/extensions/gsd/tests/home-dir.test.ts +52 -0
- package/src/resources/extensions/gsd/tests/import-done-milestones-runtime.test.ts +145 -0
- package/src/resources/extensions/gsd/tests/init-prefs-routing.test.ts +64 -1
- package/src/resources/extensions/gsd/tests/integration/auto-worktree.test.ts +72 -1
- package/src/resources/extensions/gsd/tests/integration/token-savings.test.ts +0 -23
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +128 -0
- package/src/resources/extensions/gsd/tests/memory-tools.test.ts +33 -1
- package/src/resources/extensions/gsd/tests/merge-self-branch-guard.test.ts +124 -0
- package/src/resources/extensions/gsd/tests/milestone-id-gap-reuse-4996.test.ts +152 -0
- package/src/resources/extensions/gsd/tests/milestone-report-path.test.ts +18 -1
- package/src/resources/extensions/gsd/tests/model-router.test.ts +169 -8
- package/src/resources/extensions/gsd/tests/native-git-infra-errors.test.ts +50 -0
- package/src/resources/extensions/gsd/tests/orphaned-worktree-audit.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/parallel-crash-recovery.test.ts +32 -43
- package/src/resources/extensions/gsd/tests/phases-merge-error-stops-auto.test.ts +4 -10
- package/src/resources/extensions/gsd/tests/preferences.test.ts +127 -0
- package/src/resources/extensions/gsd/tests/prompt-step-ordering.test.ts +16 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/quick-turn-end-cleanup.test.ts +6 -6
- package/src/resources/extensions/gsd/tests/register-hooks-compaction-checkpoint.test.ts +93 -0
- package/src/resources/extensions/gsd/tests/safety-harness-false-positives.test.ts +34 -0
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +168 -19
- package/src/resources/extensions/gsd/tests/slice-parallel-orchestrator.test.ts +7 -1
- package/src/resources/extensions/gsd/tests/smart-entry-complete.test.ts +23 -1
- package/src/resources/extensions/gsd/tests/stash-pop-gsd-conflict.test.ts +8 -2
- package/src/resources/extensions/gsd/tests/stash-queued-context-files.test.ts +12 -6
- package/src/resources/extensions/gsd/tests/steer-worktree-path.test.ts +17 -1
- package/src/resources/extensions/gsd/tests/system-context-message-routing.test.ts +101 -0
- package/src/resources/extensions/gsd/tests/token-profile.test.ts +51 -4
- package/src/resources/extensions/gsd/tests/turn-epoch.test.ts +7 -16
- package/src/resources/extensions/gsd/tests/unit-context-manifest.test.ts +38 -3
- package/src/resources/extensions/gsd/tests/unstructured-continue-context-injection.test.ts +5 -7
- package/src/resources/extensions/gsd/tests/uok-gitops-turn-action.test.ts +15 -1
- package/src/resources/extensions/gsd/tests/visualizer-overlay.test.ts +6 -6
- package/src/resources/extensions/gsd/tests/worktree-path-injection.test.ts +235 -0
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +85 -0
- package/src/resources/extensions/gsd/tests/worktree-symlink-removal.test.ts +34 -33
- package/src/resources/extensions/gsd/tests/worktree.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/write-gate-planning-unit.test.ts +131 -1
- package/src/resources/extensions/gsd/tools/memory-tools.ts +17 -1
- package/src/resources/extensions/gsd/unit-context-manifest.ts +44 -12
- package/src/resources/extensions/gsd/visualizer-overlay.ts +1 -1
- package/src/resources/extensions/gsd/watch/header-renderer.ts +3 -1
- package/src/resources/extensions/gsd/workflow-logger.ts +1 -0
- package/src/resources/extensions/gsd/worktree-command.ts +31 -44
- package/src/resources/extensions/gsd/worktree-manager.ts +40 -1
- package/src/resources/extensions/gsd/worktree-resolver.ts +28 -14
- package/src/resources/extensions/gsd/worktree-root.ts +144 -0
- package/src/resources/extensions/gsd/worktree-session-state.ts +35 -0
- package/src/resources/extensions/gsd/worktree.ts +8 -119
- package/src/resources/extensions/mcp-client/index.ts +6 -10
- package/src/resources/extensions/mcp-client/tests/global-config.test.ts +91 -0
- package/src/resources/extensions/ollama/index.ts +16 -2
- package/src/resources/extensions/ollama/model-capabilities.ts +34 -0
- package/src/resources/extensions/ollama/ollama-client.ts +41 -4
- package/src/resources/extensions/ollama/tests/model-capabilities.test.ts +96 -0
- package/src/resources/extensions/ollama/tests/ollama-client-timeout-env.test.ts +147 -0
- package/src/resources/extensions/slash-commands/create-extension.ts +38 -24
- package/src/resources/extensions/subagent/index.ts +165 -7
- package/src/resources/skills/create-gsd-extension/SKILL.md +9 -5
- package/src/resources/skills/create-gsd-extension/references/custom-commands.md +1 -1
- package/src/resources/skills/create-gsd-extension/references/custom-rendering.md +5 -5
- package/src/resources/skills/create-gsd-extension/references/custom-tools.md +4 -4
- package/src/resources/skills/create-gsd-extension/references/custom-ui.md +6 -6
- package/src/resources/skills/create-gsd-extension/references/events-reference.md +3 -3
- package/src/resources/skills/create-gsd-extension/references/packaging-distribution.md +1 -1
- package/src/resources/skills/create-gsd-extension/references/remote-execution-overrides.md +3 -3
- package/src/resources/skills/create-gsd-extension/templates/extension-skeleton.ts +2 -2
- package/src/resources/skills/create-gsd-extension/templates/stateful-tool-skeleton.ts +3 -3
- package/src/resources/skills/create-gsd-extension/templates/templates.test.ts +58 -0
- package/src/resources/skills/create-gsd-extension/workflows/create-extension.md +32 -12
- package/src/resources/skills/lint/SKILL.md +4 -0
- package/src/resources/skills/review/SKILL.md +4 -0
- package/src/resources/skills/test/SKILL.md +3 -0
- package/dist/resources/extensions/browser-tools/tests/browser-tools-integration.test.mjs +0 -601
- package/dist/resources/extensions/browser-tools/tests/browser-tools-unit.test.cjs +0 -651
- package/dist/resources/extensions/browser-tools/tests/capture-sharp-optional.test.cjs +0 -91
- 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/skills/github-workflows/references/gh/tests/__init__.py +0 -0
- package/dist/resources/skills/github-workflows/references/gh/tests/test_github_project_setup.py +0 -608
- package/dist/web/standalone/.next/static/chunks/2826.e9f5195e91f9cad2.js +0 -11
- package/dist/web/standalone/.next/static/chunks/3621.fc7480022c972438.js +0 -20
- package/dist/web/standalone/.next/static/chunks/app/page-151349214571e2b6.js +0 -1
- package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
- package/dist/web/standalone/.next/static/chunks/webpack-2e68521d7c82f7c2.js +0 -1
- package/src/resources/extensions/gsd/tests/copy-planning-artifacts-samepath.test.ts +0 -22
- package/src/resources/extensions/gsd/tests/discuss-slice-structured-questions.test.ts +0 -47
- package/src/resources/extensions/gsd/tests/empty-content-abort-loop.test.ts +0 -75
- /package/dist/web/standalone/.next/static/{C1zT2kEfoLhDdbWPWKrXd → hcvW7f3yv1JHzlWe7tIc6}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{C1zT2kEfoLhDdbWPWKrXd → hcvW7f3yv1JHzlWe7tIc6}/_ssgManifest.js +0 -0
|
@@ -6,8 +6,8 @@ Custom rendering for tools and messages — control how they appear in the TUI.
|
|
|
6
6
|
Tools can provide `renderCall` (how the call looks) and `renderResult` (how the result looks):
|
|
7
7
|
|
|
8
8
|
```typescript
|
|
9
|
-
import { Text } from "@
|
|
10
|
-
import { keyHint } from "@
|
|
9
|
+
import { Text } from "@gsd/pi-tui";
|
|
10
|
+
import { keyHint } from "@gsd/pi-coding-agent";
|
|
11
11
|
|
|
12
12
|
pi.registerTool({
|
|
13
13
|
name: "my_tool",
|
|
@@ -54,7 +54,7 @@ If you omit `renderCall`/`renderResult`, the built-in renderer is used. Useful f
|
|
|
54
54
|
Key hint helpers for showing keybinding info in render output:
|
|
55
55
|
|
|
56
56
|
```typescript
|
|
57
|
-
import { keyHint, appKeyHint, editorKey, rawKeyHint } from "@
|
|
57
|
+
import { keyHint, appKeyHint, editorKey, rawKeyHint } from "@gsd/pi-coding-agent";
|
|
58
58
|
|
|
59
59
|
// Editor action hint (respects user keybinding config)
|
|
60
60
|
keyHint("expandTools", "to expand") // e.g., "Ctrl+O to expand"
|
|
@@ -69,7 +69,7 @@ rawKeyHint("Ctrl+O", "to expand")
|
|
|
69
69
|
Register a renderer for custom message types:
|
|
70
70
|
|
|
71
71
|
```typescript
|
|
72
|
-
import { Text } from "@
|
|
72
|
+
import { Text } from "@gsd/pi-tui";
|
|
73
73
|
|
|
74
74
|
pi.registerMessageRenderer("my-extension", (message, options, theme) => {
|
|
75
75
|
const { expanded } = options;
|
|
@@ -92,7 +92,7 @@ pi.sendMessage({
|
|
|
92
92
|
|
|
93
93
|
<syntax_highlighting>
|
|
94
94
|
```typescript
|
|
95
|
-
import { highlightCode, getLanguageFromPath } from "@
|
|
95
|
+
import { highlightCode, getLanguageFromPath } from "@gsd/pi-coding-agent";
|
|
96
96
|
|
|
97
97
|
const lang = getLanguageFromPath("/path/to/file.rs"); // "rust"
|
|
98
98
|
const highlighted = highlightCode(code, lang, theme);
|
|
@@ -5,7 +5,7 @@ Complete custom tools reference — registration, parameters, execution, output
|
|
|
5
5
|
<registration>
|
|
6
6
|
```typescript
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
8
|
-
import { StringEnum } from "@
|
|
8
|
+
import { StringEnum } from "@gsd/pi-ai";
|
|
9
9
|
|
|
10
10
|
pi.registerTool({
|
|
11
11
|
name: "my_tool", // Unique identifier (snake_case)
|
|
@@ -60,7 +60,7 @@ pi.registerTool({
|
|
|
60
60
|
**⚠️ MUST use `StringEnum` for string enum parameters:**
|
|
61
61
|
|
|
62
62
|
```typescript
|
|
63
|
-
import { StringEnum } from "@
|
|
63
|
+
import { StringEnum } from "@gsd/pi-ai";
|
|
64
64
|
|
|
65
65
|
// ✅ Correct — works with all providers including Google
|
|
66
66
|
action: StringEnum(["list", "add", "remove"] as const)
|
|
@@ -77,7 +77,7 @@ Tools MUST truncate output to avoid context overflow. Built-in limit: 50KB / 200
|
|
|
77
77
|
import {
|
|
78
78
|
truncateHead, truncateTail, formatSize,
|
|
79
79
|
DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES,
|
|
80
|
-
} from "@
|
|
80
|
+
} from "@gsd/pi-coding-agent";
|
|
81
81
|
|
|
82
82
|
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
83
83
|
const output = await runCommand();
|
|
@@ -129,7 +129,7 @@ Use `pi.setActiveTools(names)` to enable/disable tools at runtime.
|
|
|
129
129
|
Register a tool with the same name as a built-in (`read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`) to override it. **Must match exact result shape including `details` type.**
|
|
130
130
|
|
|
131
131
|
```typescript
|
|
132
|
-
import { createReadTool } from "@
|
|
132
|
+
import { createReadTool } from "@gsd/pi-coding-agent";
|
|
133
133
|
|
|
134
134
|
pi.registerTool({
|
|
135
135
|
name: "read",
|
|
@@ -277,7 +277,7 @@ bottom-left bottom-center bottom-right
|
|
|
277
277
|
Replace the main input editor permanently:
|
|
278
278
|
|
|
279
279
|
```typescript
|
|
280
|
-
import { CustomEditor } from "@
|
|
280
|
+
import { CustomEditor } from "@gsd/pi-coding-agent";
|
|
281
281
|
|
|
282
282
|
class VimEditor extends CustomEditor {
|
|
283
283
|
private mode: "normal" | "insert" = "insert";
|
|
@@ -307,7 +307,7 @@ ctx.ui.setEditorComponent(undefined); // Restore default
|
|
|
307
307
|
</custom_editor>
|
|
308
308
|
|
|
309
309
|
<built_in_components>
|
|
310
|
-
**From `@
|
|
310
|
+
**From `@gsd/pi-tui`:**
|
|
311
311
|
|
|
312
312
|
| Component | Constructor | Purpose |
|
|
313
313
|
|-----------|-------------|---------|
|
|
@@ -352,7 +352,7 @@ const settings = new SettingsList(items, 15, getSettingsListTheme(),
|
|
|
352
352
|
);
|
|
353
353
|
```
|
|
354
354
|
|
|
355
|
-
**From `@
|
|
355
|
+
**From `@gsd/pi-coding-agent`:**
|
|
356
356
|
|
|
357
357
|
| Component | Constructor | Purpose |
|
|
358
358
|
|-----------|-------------|---------|
|
|
@@ -363,7 +363,7 @@ const settings = new SettingsList(items, 15, getSettingsListTheme(),
|
|
|
363
363
|
|
|
364
364
|
<keyboard_input>
|
|
365
365
|
```typescript
|
|
366
|
-
import { matchesKey, Key } from "@
|
|
366
|
+
import { matchesKey, Key } from "@gsd/pi-tui";
|
|
367
367
|
|
|
368
368
|
handleInput(data: string) {
|
|
369
369
|
// Basic keys
|
|
@@ -403,7 +403,7 @@ handleInput(data: string) {
|
|
|
403
403
|
**Cardinal rule: each line from render() must not exceed `width` visible characters.**
|
|
404
404
|
|
|
405
405
|
```typescript
|
|
406
|
-
import { visibleWidth, truncateToWidth, wrapTextWithAnsi } from "@
|
|
406
|
+
import { visibleWidth, truncateToWidth, wrapTextWithAnsi } from "@gsd/pi-tui";
|
|
407
407
|
|
|
408
408
|
visibleWidth("\x1b[32mHello\x1b[0m"); // Returns 5 (ignores ANSI codes)
|
|
409
409
|
truncateToWidth("Very long text here", 10); // "Very lo..."
|
|
@@ -470,7 +470,7 @@ Always use theme from callback params, never import directly.
|
|
|
470
470
|
|
|
471
471
|
**Syntax highlighting:**
|
|
472
472
|
```typescript
|
|
473
|
-
import { highlightCode, getLanguageFromPath } from "@
|
|
473
|
+
import { highlightCode, getLanguageFromPath } from "@gsd/pi-coding-agent";
|
|
474
474
|
const lang = getLanguageFromPath("/file.rs"); // "rust"
|
|
475
475
|
const highlighted = highlightCode(code, lang, theme);
|
|
476
476
|
```
|
|
@@ -47,7 +47,7 @@ pi.on("before_agent_start", async (event, ctx) => {
|
|
|
47
47
|
|
|
48
48
|
**tool_call** — Fired before tool executes. Can block.
|
|
49
49
|
```typescript
|
|
50
|
-
import { isToolCallEventType } from "@
|
|
50
|
+
import { isToolCallEventType } from "@gsd/pi-coding-agent";
|
|
51
51
|
|
|
52
52
|
pi.on("tool_call", async (event, ctx) => {
|
|
53
53
|
if (isToolCallEventType("bash", event)) {
|
|
@@ -61,7 +61,7 @@ pi.on("tool_call", async (event, ctx) => {
|
|
|
61
61
|
|
|
62
62
|
**tool_result** — Fired after tool executes. Can modify result. Handlers chain like middleware.
|
|
63
63
|
```typescript
|
|
64
|
-
import { isToolResultEventType } from "@
|
|
64
|
+
import { isToolResultEventType } from "@gsd/pi-coding-agent";
|
|
65
65
|
|
|
66
66
|
pi.on("tool_result", async (event, ctx) => {
|
|
67
67
|
if (isToolResultEventType("bash", event)) {
|
|
@@ -105,7 +105,7 @@ pi.on("model_select", async (event, ctx) => {
|
|
|
105
105
|
Built-in type guards for tool events:
|
|
106
106
|
|
|
107
107
|
```typescript
|
|
108
|
-
import { isToolCallEventType, isToolResultEventType } from "@
|
|
108
|
+
import { isToolCallEventType, isToolResultEventType } from "@gsd/pi-coding-agent";
|
|
109
109
|
|
|
110
110
|
// Tool calls — narrows event.input type
|
|
111
111
|
if (isToolCallEventType("bash", event)) { /* event.input: { command, timeout? } */ }
|
|
@@ -39,7 +39,7 @@ If no `pi` manifest exists, auto-discovers:
|
|
|
39
39
|
</convention_directories>
|
|
40
40
|
|
|
41
41
|
<dependencies>
|
|
42
|
-
- List `@
|
|
42
|
+
- List `@gsd/pi-ai`, `@gsd/pi-coding-agent`, `@gsd/pi-tui`, `@sinclair/typebox` in `peerDependencies` with `"*"` — they're bundled by the runtime.
|
|
43
43
|
- Other npm deps go in `dependencies`. The runtime runs `npm install` on package installation.
|
|
44
44
|
</dependencies>
|
|
45
45
|
|
|
@@ -6,7 +6,7 @@ Remote execution via pluggable operations, spawnHook for bash, and tool override
|
|
|
6
6
|
Built-in tools support pluggable operations for SSH, containers, etc.:
|
|
7
7
|
|
|
8
8
|
```typescript
|
|
9
|
-
import { createReadTool, createBashTool, createWriteTool } from "@
|
|
9
|
+
import { createReadTool, createBashTool, createWriteTool } from "@gsd/pi-coding-agent";
|
|
10
10
|
|
|
11
11
|
// Create tool with custom remote operations
|
|
12
12
|
const remoteBash = createBashTool(cwd, {
|
|
@@ -37,7 +37,7 @@ const bashTool = createBashTool(cwd, {
|
|
|
37
37
|
Full SSH pattern with flag-based switching:
|
|
38
38
|
|
|
39
39
|
```typescript
|
|
40
|
-
import { createBashTool, type ExtensionAPI } from "@
|
|
40
|
+
import { createBashTool, type ExtensionAPI } from "@gsd/pi-coding-agent";
|
|
41
41
|
|
|
42
42
|
export default function (pi: ExtensionAPI) {
|
|
43
43
|
pi.registerFlag("ssh", { description: "SSH target", type: "string" });
|
|
@@ -65,7 +65,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
65
65
|
Override built-in tools for logging/access control — omit renderCall/renderResult to keep built-in rendering:
|
|
66
66
|
|
|
67
67
|
```typescript
|
|
68
|
-
import { createReadTool } from "@
|
|
68
|
+
import { createReadTool } from "@gsd/pi-coding-agent";
|
|
69
69
|
import { Type } from "@sinclair/typebox";
|
|
70
70
|
|
|
71
71
|
pi.registerTool({
|
|
@@ -34,22 +34,19 @@ Identify what the extension needs from the user's description:
|
|
|
34
34
|
|
|
35
35
|
## Step 3: Choose Extension Structure
|
|
36
36
|
|
|
37
|
-
**
|
|
38
|
-
```
|
|
39
|
-
~/.pi/agent/extensions/my-extension.ts
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**Directory with index.ts** — for multi-file extensions:
|
|
37
|
+
**Directory with index.ts** — the standard pattern for all extensions:
|
|
43
38
|
```
|
|
44
39
|
~/.pi/agent/extensions/my-extension/
|
|
45
|
-
├──
|
|
46
|
-
├──
|
|
47
|
-
|
|
40
|
+
├── extension-manifest.json # Required — declares capabilities
|
|
41
|
+
├── index.ts # Entry point (must export default function)
|
|
42
|
+
├── tools.ts # Optional — tool implementations
|
|
43
|
+
└── utils.ts # Optional — shared utilities
|
|
48
44
|
```
|
|
49
45
|
|
|
50
46
|
**Package with dependencies** — when npm packages are needed:
|
|
51
47
|
```
|
|
52
48
|
~/.pi/agent/extensions/my-extension/
|
|
49
|
+
├── extension-manifest.json
|
|
53
50
|
├── package.json
|
|
54
51
|
├── src/index.ts
|
|
55
52
|
└── node_modules/
|
|
@@ -64,12 +61,34 @@ For packages, `package.json` needs:
|
|
|
64
61
|
}
|
|
65
62
|
```
|
|
66
63
|
|
|
64
|
+
## Step 3b: Create the Extension Manifest
|
|
65
|
+
|
|
66
|
+
Every extension must include an `extension-manifest.json`:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"id": "my-extension",
|
|
71
|
+
"name": "My Extension",
|
|
72
|
+
"version": "1.0.0",
|
|
73
|
+
"description": "What this extension does in one line",
|
|
74
|
+
"tier": "community",
|
|
75
|
+
"requires": { "platform": ">=2.29.0" },
|
|
76
|
+
"provides": {
|
|
77
|
+
"tools": ["my_tool"],
|
|
78
|
+
"commands": ["mycommand"],
|
|
79
|
+
"hooks": ["session_start"]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Only include non-empty arrays in `provides`. See `docs/extension-sdk/manifest-spec.md` for the full spec.
|
|
85
|
+
|
|
67
86
|
## Step 4: Write the Extension
|
|
68
87
|
|
|
69
88
|
Start with the skeleton:
|
|
70
89
|
|
|
71
90
|
```typescript
|
|
72
|
-
import type { ExtensionAPI } from "@
|
|
91
|
+
import type { ExtensionAPI } from "@gsd/pi-coding-agent";
|
|
73
92
|
|
|
74
93
|
export default function (pi: ExtensionAPI) {
|
|
75
94
|
// Register events, tools, commands here
|
|
@@ -81,7 +100,7 @@ Then add capabilities based on Step 2. Reference the appropriate reference files
|
|
|
81
100
|
**Tool registration pattern:**
|
|
82
101
|
```typescript
|
|
83
102
|
import { Type } from "@sinclair/typebox";
|
|
84
|
-
import { StringEnum } from "@
|
|
103
|
+
import { StringEnum } from "@gsd/pi-ai";
|
|
85
104
|
|
|
86
105
|
pi.registerTool({
|
|
87
106
|
name: "my_tool",
|
|
@@ -144,7 +163,8 @@ Fix issues, add features, refine. Use `/reload` for hot-reload during developmen
|
|
|
144
163
|
|
|
145
164
|
<success_criteria>
|
|
146
165
|
Extension creation is complete when:
|
|
147
|
-
- [ ] Extension
|
|
166
|
+
- [ ] Extension directory created with index.ts and extension-manifest.json
|
|
167
|
+
- [ ] Manifest `provides` accurately lists all registered tools, commands, hooks, shortcuts
|
|
148
168
|
- [ ] All imports resolve (TypeBox, pi-ai, pi-coding-agent, pi-tui as needed)
|
|
149
169
|
- [ ] Tools use `StringEnum` for string enums (not `Type.Union`/`Type.Literal`)
|
|
150
170
|
- [ ] Tool output is truncated if variable-length
|
|
@@ -7,6 +7,10 @@ description: Lint and format code. Auto-detects ESLint, Biome, Prettier, or lang
|
|
|
7
7
|
Lint and format code in the current project. Auto-detect the project's linter and formatter toolchain, run them against the target files, and report results grouped by severity with actionable fix suggestions.
|
|
8
8
|
</objective>
|
|
9
9
|
|
|
10
|
+
<working_directory_awareness>
|
|
11
|
+
**Before running any `git` or build command:** check whether your dispatch context specifies a working directory (look for "Working directory:" in your initial prompt). If it does and `pwd` does not match it, prefix every git invocation with `-C <that path>` (e.g. `git -C /path/to/worktree diff --name-only`) and run linters/formatters with the explicit path argument. Linting the wrong directory is a silent failure mode.
|
|
12
|
+
</working_directory_awareness>
|
|
13
|
+
|
|
10
14
|
<arguments>
|
|
11
15
|
This skill accepts optional arguments after `/lint`:
|
|
12
16
|
|
|
@@ -23,6 +23,10 @@ The reviewer reads both the diff and the surrounding source files to understand
|
|
|
23
23
|
The purpose is to review and report findings. Making changes during review conflates the reviewer and author roles. Present findings and let the user decide what to act on.
|
|
24
24
|
</analysis_only_rule>
|
|
25
25
|
|
|
26
|
+
<working_directory_awareness>
|
|
27
|
+
**Before running any `git` command:** check whether your dispatch context specifies a working directory (look for "Working directory:" in your initial prompt). If it does and `pwd` does not match it, prefix every git invocation with `-C <that path>` (e.g. `git -C /path/to/worktree diff --cached`). Reviewing the wrong directory's diff is a silent failure mode — the review will look correct but cover the wrong code.
|
|
28
|
+
</working_directory_awareness>
|
|
29
|
+
|
|
26
30
|
<quick_start>
|
|
27
31
|
|
|
28
32
|
<determine_review_scope>
|
|
@@ -151,6 +151,9 @@ Failures:
|
|
|
151
151
|
**Suggest what to test when no arguments are given.**
|
|
152
152
|
|
|
153
153
|
**A. Check recent changes:**
|
|
154
|
+
|
|
155
|
+
> **Working directory check:** if your dispatch context specifies a working directory and `pwd` does not match it, prefix the git commands below with `-C <that path>` (e.g. `git -C /path/to/worktree diff --name-only HEAD~5`).
|
|
156
|
+
|
|
154
157
|
- Run `git diff --name-only HEAD~5` to find recently changed files
|
|
155
158
|
- Run `git diff --name-only --cached` for staged files
|
|
156
159
|
- Filter to source files (exclude configs, docs, lockfiles)
|
package/dist/rtk-shared.d.ts
CHANGED
|
@@ -8,3 +8,6 @@ export declare function getRtkBinaryName(platform?: NodeJS.Platform): string;
|
|
|
8
8
|
export declare function getPathValue(env: NodeJS.ProcessEnv): string | undefined;
|
|
9
9
|
export declare function resolvePathCandidates(pathValue: string | undefined): string[];
|
|
10
10
|
export declare function resolveSystemRtkPath(pathValue: string | undefined, platform?: NodeJS.Platform): string | null;
|
|
11
|
+
export declare function prependPathEntry(env: NodeJS.ProcessEnv, entry: string): NodeJS.ProcessEnv;
|
|
12
|
+
export declare function applyRtkProcessEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
13
|
+
export declare function buildRtkEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
package/dist/rtk-shared.js
CHANGED
|
@@ -45,3 +45,20 @@ export function resolveSystemRtkPath(pathValue, platform = process.platform) {
|
|
|
45
45
|
}
|
|
46
46
|
return null;
|
|
47
47
|
}
|
|
48
|
+
export function prependPathEntry(env, entry) {
|
|
49
|
+
const pathKey = Object.keys(env).find((key) => key.toLowerCase() === "path") ?? (process.platform === "win32" ? "Path" : "PATH");
|
|
50
|
+
const currentPath = env[pathKey] ?? "";
|
|
51
|
+
const parts = currentPath.split(delimiter).filter(Boolean);
|
|
52
|
+
if (!parts.includes(entry)) {
|
|
53
|
+
env[pathKey] = [entry, currentPath].filter(Boolean).join(delimiter);
|
|
54
|
+
}
|
|
55
|
+
return env;
|
|
56
|
+
}
|
|
57
|
+
export function applyRtkProcessEnv(env = process.env) {
|
|
58
|
+
prependPathEntry(env, getManagedRtkDir(env));
|
|
59
|
+
env[RTK_TELEMETRY_DISABLED_ENV] = "1";
|
|
60
|
+
return env;
|
|
61
|
+
}
|
|
62
|
+
export function buildRtkEnv(env = process.env) {
|
|
63
|
+
return applyRtkProcessEnv({ ...env });
|
|
64
|
+
}
|
package/dist/rtk.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { spawnSync } from "node:child_process";
|
|
2
|
-
import { GSD_RTK_DISABLED_ENV, GSD_RTK_PATH_ENV, RTK_TELEMETRY_DISABLED_ENV, getManagedRtkDir, getRtkBinaryName, isRtkEnabled } from "./rtk-shared.js";
|
|
2
|
+
import { GSD_RTK_DISABLED_ENV, GSD_RTK_PATH_ENV, RTK_TELEMETRY_DISABLED_ENV, applyRtkProcessEnv, buildRtkEnv, getManagedRtkDir, getRtkBinaryName, isRtkEnabled, prependPathEntry } from "./rtk-shared.js";
|
|
3
3
|
export declare const RTK_VERSION = "0.33.1";
|
|
4
4
|
export declare const GSD_SKIP_RTK_INSTALL_ENV = "GSD_SKIP_RTK_INSTALL";
|
|
5
|
-
export { GSD_RTK_DISABLED_ENV, GSD_RTK_PATH_ENV, RTK_TELEMETRY_DISABLED_ENV, getManagedRtkDir, getRtkBinaryName, isRtkEnabled, };
|
|
5
|
+
export { GSD_RTK_DISABLED_ENV, GSD_RTK_PATH_ENV, RTK_TELEMETRY_DISABLED_ENV, applyRtkProcessEnv, buildRtkEnv, getManagedRtkDir, getRtkBinaryName, isRtkEnabled, prependPathEntry, };
|
|
6
6
|
export interface EnsureRtkOptions {
|
|
7
7
|
targetDir?: string;
|
|
8
8
|
allowDownload?: boolean;
|
|
@@ -20,9 +20,6 @@ export interface EnsureRtkResult {
|
|
|
20
20
|
reason?: string;
|
|
21
21
|
}
|
|
22
22
|
export declare function getManagedRtkPath(platform?: NodeJS.Platform, targetDir?: string): string;
|
|
23
|
-
export declare function prependPathEntry(env: NodeJS.ProcessEnv, entry: string): NodeJS.ProcessEnv;
|
|
24
|
-
export declare function applyRtkProcessEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
25
|
-
export declare function buildRtkEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
26
23
|
export declare function resolveRtkAssetName(platform: NodeJS.Platform, arch: string, version?: string): string | null;
|
|
27
24
|
export interface ResolveRtkBinaryPathOptions {
|
|
28
25
|
binaryPath?: string;
|
package/dist/rtk.js
CHANGED
|
@@ -3,36 +3,19 @@ import { spawnSync } from "node:child_process";
|
|
|
3
3
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, chmodSync, readdirSync } from "node:fs";
|
|
4
4
|
import { createWriteStream } from "node:fs";
|
|
5
5
|
import { arch as osArch } from "node:os";
|
|
6
|
-
import {
|
|
6
|
+
import { join } from "node:path";
|
|
7
7
|
import { Readable } from "node:stream";
|
|
8
8
|
import { finished } from "node:stream/promises";
|
|
9
9
|
import extractZip from "extract-zip";
|
|
10
|
-
import { GSD_RTK_DISABLED_ENV, GSD_RTK_PATH_ENV, RTK_TELEMETRY_DISABLED_ENV, getManagedRtkDir, getPathValue, getRtkBinaryName, isTruthy, isRtkEnabled, resolveSystemRtkPath, } from "./rtk-shared.js";
|
|
10
|
+
import { GSD_RTK_DISABLED_ENV, GSD_RTK_PATH_ENV, RTK_TELEMETRY_DISABLED_ENV, applyRtkProcessEnv, buildRtkEnv, getManagedRtkDir, getPathValue, getRtkBinaryName, isTruthy, isRtkEnabled, prependPathEntry, resolveSystemRtkPath, } from "./rtk-shared.js";
|
|
11
11
|
export const RTK_VERSION = "0.33.1";
|
|
12
12
|
export const GSD_SKIP_RTK_INSTALL_ENV = "GSD_SKIP_RTK_INSTALL";
|
|
13
|
-
export { GSD_RTK_DISABLED_ENV, GSD_RTK_PATH_ENV, RTK_TELEMETRY_DISABLED_ENV, getManagedRtkDir, getRtkBinaryName, isRtkEnabled, };
|
|
13
|
+
export { GSD_RTK_DISABLED_ENV, GSD_RTK_PATH_ENV, RTK_TELEMETRY_DISABLED_ENV, applyRtkProcessEnv, buildRtkEnv, getManagedRtkDir, getRtkBinaryName, isRtkEnabled, prependPathEntry, };
|
|
14
14
|
const RTK_REPO = "rtk-ai/rtk";
|
|
15
15
|
const RTK_REWRITE_TIMEOUT_MS = 5_000;
|
|
16
16
|
export function getManagedRtkPath(platform = process.platform, targetDir = getManagedRtkDir()) {
|
|
17
17
|
return join(targetDir, getRtkBinaryName(platform));
|
|
18
18
|
}
|
|
19
|
-
export function prependPathEntry(env, entry) {
|
|
20
|
-
const pathKey = Object.keys(env).find((key) => key.toLowerCase() === "path") ?? (process.platform === "win32" ? "Path" : "PATH");
|
|
21
|
-
const currentPath = env[pathKey] ?? "";
|
|
22
|
-
const parts = currentPath.split(delimiter).filter(Boolean);
|
|
23
|
-
if (!parts.includes(entry)) {
|
|
24
|
-
env[pathKey] = [entry, currentPath].filter(Boolean).join(delimiter);
|
|
25
|
-
}
|
|
26
|
-
return env;
|
|
27
|
-
}
|
|
28
|
-
export function applyRtkProcessEnv(env = process.env) {
|
|
29
|
-
prependPathEntry(env, getManagedRtkDir(env));
|
|
30
|
-
env[RTK_TELEMETRY_DISABLED_ENV] = "1";
|
|
31
|
-
return env;
|
|
32
|
-
}
|
|
33
|
-
export function buildRtkEnv(env = process.env) {
|
|
34
|
-
return applyRtkProcessEnv({ ...env });
|
|
35
|
-
}
|
|
36
19
|
export function resolveRtkAssetName(platform, arch, version = RTK_VERSION) {
|
|
37
20
|
void version;
|
|
38
21
|
if (platform === "darwin" && arch === "arm64")
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimum supported Node.js major version. Kept in sync with
|
|
3
|
+
* `engines.node` in package.json — see test
|
|
4
|
+
* `loader MIN_NODE_MAJOR matches package.json engines field`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const MIN_NODE_MAJOR = 22;
|
|
7
|
+
/**
|
|
8
|
+
* Parse a Node version string (e.g. "22.5.1") and return whether the major
|
|
9
|
+
* version meets the required minimum.
|
|
10
|
+
*
|
|
11
|
+
* Returns `{ ok: true }` when supported, or `{ ok: false, actualMajor }`
|
|
12
|
+
* when below the minimum. Throws if the version string is malformed —
|
|
13
|
+
* callers should treat that as a fatal precondition violation.
|
|
14
|
+
*/
|
|
15
|
+
export declare function checkNodeVersion(versionString: string, min?: number): {
|
|
16
|
+
ok: true;
|
|
17
|
+
} | {
|
|
18
|
+
ok: false;
|
|
19
|
+
actualMajor: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Probe whether `git` is available by invoking the supplied exec function.
|
|
23
|
+
* Returns true on success, false if the exec throws (any reason). The
|
|
24
|
+
* function is injected so tests can substitute a stub without spawning a
|
|
25
|
+
* real subprocess.
|
|
26
|
+
*/
|
|
27
|
+
export declare function requireGit(execFn: (cmd: string, args: ReadonlyArray<string>) => unknown): boolean;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Runtime dependency checks — pure helpers used by loader.ts.
|
|
2
|
+
// Extracted so they can be unit-tested without spawning the full loader.
|
|
3
|
+
/**
|
|
4
|
+
* Minimum supported Node.js major version. Kept in sync with
|
|
5
|
+
* `engines.node` in package.json — see test
|
|
6
|
+
* `loader MIN_NODE_MAJOR matches package.json engines field`.
|
|
7
|
+
*/
|
|
8
|
+
export const MIN_NODE_MAJOR = 22;
|
|
9
|
+
/**
|
|
10
|
+
* Parse a Node version string (e.g. "22.5.1") and return whether the major
|
|
11
|
+
* version meets the required minimum.
|
|
12
|
+
*
|
|
13
|
+
* Returns `{ ok: true }` when supported, or `{ ok: false, actualMajor }`
|
|
14
|
+
* when below the minimum. Throws if the version string is malformed —
|
|
15
|
+
* callers should treat that as a fatal precondition violation.
|
|
16
|
+
*/
|
|
17
|
+
export function checkNodeVersion(versionString, min = MIN_NODE_MAJOR) {
|
|
18
|
+
const major = parseInt(versionString.split('.')[0], 10);
|
|
19
|
+
if (!Number.isFinite(major)) {
|
|
20
|
+
throw new Error(`checkNodeVersion: cannot parse major from "${versionString}"`);
|
|
21
|
+
}
|
|
22
|
+
return major < min ? { ok: false, actualMajor: major } : { ok: true };
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Probe whether `git` is available by invoking the supplied exec function.
|
|
26
|
+
* Returns true on success, false if the exec throws (any reason). The
|
|
27
|
+
* function is injected so tests can substitute a stub without spawning a
|
|
28
|
+
* real subprocess.
|
|
29
|
+
*/
|
|
30
|
+
export function requireGit(execFn) {
|
|
31
|
+
try {
|
|
32
|
+
execFn('git', ['--version']);
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
}
|