gsd-pi 2.19.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/cli.js +5 -19
- package/dist/help-text.d.ts +1 -0
- package/dist/help-text.js +18 -0
- package/dist/loader.js +2 -16
- package/dist/onboarding.d.ts +3 -7
- package/dist/onboarding.js +76 -30
- package/dist/remote-questions-config.d.ts +1 -1
- package/dist/resources/extensions/browser-tools/{core.js → core.ts} +329 -190
- package/dist/resources/extensions/google-search/index.ts +164 -47
- package/dist/resources/extensions/gsd/auto-dashboard.ts +2 -1
- package/dist/resources/extensions/gsd/auto-prompts.ts +103 -24
- package/dist/resources/extensions/gsd/auto-worktree.ts +93 -9
- package/dist/resources/extensions/gsd/auto.ts +455 -30
- package/dist/resources/extensions/gsd/commands.ts +519 -37
- package/dist/resources/extensions/gsd/context-budget.ts +243 -0
- package/dist/resources/extensions/gsd/context-store.ts +195 -0
- package/dist/resources/extensions/gsd/dashboard-overlay.ts +41 -3
- package/dist/resources/extensions/gsd/db-writer.ts +341 -0
- package/dist/resources/extensions/gsd/debug-logger.ts +178 -0
- package/dist/resources/extensions/gsd/dispatch-guard.ts +0 -1
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +54 -0
- package/dist/resources/extensions/gsd/doctor-proactive.ts +286 -0
- package/dist/resources/extensions/gsd/doctor.ts +283 -2
- package/dist/resources/extensions/gsd/export.ts +81 -2
- package/dist/resources/extensions/gsd/files.ts +39 -9
- package/dist/resources/extensions/gsd/git-service.ts +6 -0
- package/dist/resources/extensions/gsd/gsd-db.ts +752 -0
- package/dist/resources/extensions/gsd/guided-flow.ts +26 -1
- package/dist/resources/extensions/gsd/history.ts +0 -1
- package/dist/resources/extensions/gsd/index.ts +277 -1
- package/dist/resources/extensions/gsd/md-importer.ts +526 -0
- package/dist/resources/extensions/gsd/metrics.ts +39 -3
- package/dist/resources/extensions/gsd/notifications.ts +0 -1
- package/dist/resources/extensions/gsd/post-unit-hooks.ts +70 -1
- package/dist/resources/extensions/gsd/preferences.ts +125 -150
- package/dist/resources/extensions/gsd/prompts/execute-task.md +3 -5
- package/dist/resources/extensions/gsd/prompts/heal-skill.md +45 -0
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +5 -1
- package/dist/resources/extensions/gsd/prompts/quick-task.md +48 -0
- package/dist/resources/extensions/gsd/prompts/system.md +5 -1
- package/dist/resources/extensions/gsd/quick.ts +156 -0
- package/dist/resources/extensions/gsd/session-forensics.ts +5 -5
- package/dist/resources/extensions/gsd/skill-discovery.ts +5 -3
- package/dist/resources/extensions/gsd/skill-health.ts +417 -0
- package/dist/resources/extensions/gsd/skill-telemetry.ts +127 -0
- package/dist/resources/extensions/gsd/state.ts +30 -0
- package/dist/resources/extensions/gsd/templates/preferences.md +1 -0
- package/dist/resources/extensions/gsd/tests/context-budget.test.ts +283 -0
- package/dist/resources/extensions/gsd/tests/context-compression.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/context-store.test.ts +462 -0
- package/dist/resources/extensions/gsd/tests/continue-here.test.ts +204 -0
- package/dist/resources/extensions/gsd/tests/dashboard-budget.test.ts +346 -0
- package/dist/resources/extensions/gsd/tests/db-writer.test.ts +602 -0
- package/dist/resources/extensions/gsd/tests/debug-logger.test.ts +185 -0
- package/dist/resources/extensions/gsd/tests/derive-state-db.test.ts +406 -0
- package/dist/resources/extensions/gsd/tests/dispatch-guard.test.ts +0 -1
- package/dist/resources/extensions/gsd/tests/dist-redirect.mjs +22 -0
- package/dist/resources/extensions/gsd/tests/doctor-proactive.test.ts +244 -0
- package/dist/resources/extensions/gsd/tests/doctor-runtime.test.ts +303 -0
- package/dist/resources/extensions/gsd/tests/gsd-db.test.ts +353 -0
- package/dist/resources/extensions/gsd/tests/gsd-inspect.test.ts +125 -0
- package/dist/resources/extensions/gsd/tests/gsd-tools.test.ts +326 -0
- package/dist/resources/extensions/gsd/tests/integration-edge.test.ts +228 -0
- package/dist/resources/extensions/gsd/tests/integration-lifecycle.test.ts +277 -0
- package/dist/resources/extensions/gsd/tests/md-importer.test.ts +411 -0
- package/dist/resources/extensions/gsd/tests/metrics.test.ts +197 -0
- package/dist/resources/extensions/gsd/tests/model-isolation.test.ts +99 -0
- package/dist/resources/extensions/gsd/tests/parsers.test.ts +40 -0
- package/dist/resources/extensions/gsd/tests/post-unit-hooks.test.ts +41 -1
- package/dist/resources/extensions/gsd/tests/preferences-git.test.ts +0 -1
- package/dist/resources/extensions/gsd/tests/preferences-hooks.test.ts +0 -1
- package/dist/resources/extensions/gsd/tests/preferences-mode.test.ts +110 -0
- package/dist/resources/extensions/gsd/tests/preferences-models.test.ts +0 -1
- package/dist/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +464 -0
- package/dist/resources/extensions/gsd/tests/prompt-db.test.ts +385 -0
- package/dist/resources/extensions/gsd/tests/remote-questions.test.ts +262 -1
- package/dist/resources/extensions/gsd/tests/resolve-ts-hooks.mjs +17 -29
- package/dist/resources/extensions/gsd/tests/resolve-ts.mjs +2 -8
- package/dist/resources/extensions/gsd/tests/skill-lifecycle.test.ts +126 -0
- package/dist/resources/extensions/gsd/tests/stop-auto-remote.test.ts +31 -8
- package/dist/resources/extensions/gsd/tests/token-savings.test.ts +366 -0
- package/dist/resources/extensions/gsd/tests/unit-runtime.test.ts +25 -1
- package/dist/resources/extensions/gsd/tests/visualizer-critical-path.test.ts +145 -0
- package/dist/resources/extensions/gsd/tests/visualizer-data.test.ts +92 -0
- package/dist/resources/extensions/gsd/tests/visualizer-overlay.test.ts +120 -0
- package/dist/resources/extensions/gsd/tests/visualizer-views.test.ts +228 -5
- package/dist/resources/extensions/gsd/tests/worktree-db-integration.test.ts +205 -0
- package/dist/resources/extensions/gsd/tests/worktree-db.test.ts +442 -0
- package/dist/resources/extensions/gsd/tests/worktree-post-create-hook.test.ts +165 -0
- package/dist/resources/extensions/gsd/types.ts +29 -0
- package/dist/resources/extensions/gsd/undo.ts +0 -1
- package/dist/resources/extensions/gsd/unit-runtime.ts +5 -1
- package/dist/resources/extensions/gsd/visualizer-data.ts +352 -1
- package/dist/resources/extensions/gsd/visualizer-overlay.ts +166 -22
- package/dist/resources/extensions/gsd/visualizer-views.ts +464 -2
- package/dist/resources/extensions/gsd/worktree-command.ts +18 -0
- package/dist/resources/extensions/gsd/worktree-manager.ts +11 -4
- package/dist/resources/extensions/mcporter/index.ts +17 -5
- package/dist/resources/extensions/remote-questions/config.ts +4 -2
- package/dist/resources/extensions/remote-questions/discord-adapter.ts +2 -4
- package/dist/resources/extensions/remote-questions/format.ts +154 -8
- package/dist/resources/extensions/remote-questions/manager.ts +9 -7
- package/dist/resources/extensions/remote-questions/remote-command.ts +100 -4
- package/dist/resources/extensions/remote-questions/slack-adapter.ts +58 -2
- package/dist/resources/extensions/remote-questions/telegram-adapter.ts +161 -0
- package/dist/resources/extensions/remote-questions/types.ts +2 -1
- package/dist/resources/extensions/search-the-web/native-search.ts +2 -0
- package/dist/resources/extensions/search-the-web/tool-fetch-page.ts +9 -1
- package/dist/resources/extensions/search-the-web/url-utils.ts +35 -1
- package/dist/resources/extensions/ttsr/ttsr-manager.ts +26 -0
- package/dist/resources/extensions/voice/index.ts +4 -3
- package/dist/tool-bootstrap.js +2 -1
- package/dist/wizard.js +2 -0
- package/package.json +9 -7
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +12 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.js +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +17 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.js +113 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/project-trust.d.ts +4 -0
- package/packages/pi-coding-agent/dist/core/extensions/project-trust.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/project-trust.js +42 -0
- package/packages/pi-coding-agent/dist/core/extensions/project-trust.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts +6 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/client.js +25 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/index.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/lsp/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/index.js +106 -3
- package/packages/pi-coding-agent/dist/core/lsp/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lsp.md +6 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.d.ts +35 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/types.js +6 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts +3 -1
- package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/utils.js +45 -0
- package/packages/pi-coding-agent/dist/core/lsp/utils.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resolve-config-value.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/resolve-config-value.js +18 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resolve-config-value.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.test.js +114 -0
- package/packages/pi-coding-agent/dist/core/resolve-config-value.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +6 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +43 -11
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +7 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit.js +5 -0
- package/packages/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/index.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/write.js +5 -0
- package/packages/pi-coding-agent/dist/core/tools/write.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +8 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.d.ts +2 -0
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.js +23 -9
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.js +67 -0
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.js.map +1 -0
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/scripts/copy-assets.cjs +24 -0
- package/packages/pi-coding-agent/src/core/agent-session.ts +13 -1
- package/packages/pi-coding-agent/src/core/extensions/index.ts +3 -0
- package/packages/pi-coding-agent/src/core/extensions/loader.test.ts +141 -0
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +20 -1
- package/packages/pi-coding-agent/src/core/extensions/project-trust.ts +51 -0
- package/packages/pi-coding-agent/src/core/lsp/client.ts +26 -0
- package/packages/pi-coding-agent/src/core/lsp/index.ts +157 -2
- package/packages/pi-coding-agent/src/core/lsp/lsp.md +6 -0
- package/packages/pi-coding-agent/src/core/lsp/types.ts +53 -0
- package/packages/pi-coding-agent/src/core/lsp/utils.ts +56 -0
- package/packages/pi-coding-agent/src/core/resolve-config-value.test.ts +132 -0
- package/packages/pi-coding-agent/src/core/resolve-config-value.ts +20 -0
- package/packages/pi-coding-agent/src/core/settings-manager.ts +41 -11
- package/packages/pi-coding-agent/src/core/system-prompt.ts +7 -1
- package/packages/pi-coding-agent/src/core/tools/edit.ts +3 -0
- package/packages/pi-coding-agent/src/core/tools/write.ts +3 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts +7 -2
- package/packages/pi-coding-agent/src/resources/extensions/memory/storage.test.ts +98 -0
- package/packages/pi-coding-agent/src/resources/extensions/memory/storage.ts +24 -9
- package/packages/pi-tui/package.json +3 -1
- package/src/resources/extensions/browser-tools/{core.js → core.ts} +329 -190
- package/src/resources/extensions/google-search/index.ts +164 -47
- package/src/resources/extensions/gsd/auto-dashboard.ts +2 -1
- package/src/resources/extensions/gsd/auto-prompts.ts +103 -24
- package/src/resources/extensions/gsd/auto-worktree.ts +93 -9
- package/src/resources/extensions/gsd/auto.ts +455 -30
- package/src/resources/extensions/gsd/commands.ts +519 -37
- package/src/resources/extensions/gsd/context-budget.ts +243 -0
- package/src/resources/extensions/gsd/context-store.ts +195 -0
- package/src/resources/extensions/gsd/dashboard-overlay.ts +41 -3
- package/src/resources/extensions/gsd/db-writer.ts +341 -0
- package/src/resources/extensions/gsd/debug-logger.ts +178 -0
- package/src/resources/extensions/gsd/dispatch-guard.ts +0 -1
- package/src/resources/extensions/gsd/docs/preferences-reference.md +54 -0
- package/src/resources/extensions/gsd/doctor-proactive.ts +286 -0
- package/src/resources/extensions/gsd/doctor.ts +283 -2
- package/src/resources/extensions/gsd/export.ts +81 -2
- package/src/resources/extensions/gsd/files.ts +39 -9
- package/src/resources/extensions/gsd/git-service.ts +6 -0
- package/src/resources/extensions/gsd/gsd-db.ts +752 -0
- package/src/resources/extensions/gsd/guided-flow.ts +26 -1
- package/src/resources/extensions/gsd/history.ts +0 -1
- package/src/resources/extensions/gsd/index.ts +277 -1
- package/src/resources/extensions/gsd/md-importer.ts +526 -0
- package/src/resources/extensions/gsd/metrics.ts +39 -3
- package/src/resources/extensions/gsd/notifications.ts +0 -1
- package/src/resources/extensions/gsd/post-unit-hooks.ts +70 -1
- package/src/resources/extensions/gsd/preferences.ts +125 -150
- package/src/resources/extensions/gsd/prompts/execute-task.md +3 -5
- package/src/resources/extensions/gsd/prompts/heal-skill.md +45 -0
- package/src/resources/extensions/gsd/prompts/plan-slice.md +5 -1
- package/src/resources/extensions/gsd/prompts/quick-task.md +48 -0
- package/src/resources/extensions/gsd/prompts/system.md +5 -1
- package/src/resources/extensions/gsd/quick.ts +156 -0
- package/src/resources/extensions/gsd/session-forensics.ts +5 -5
- package/src/resources/extensions/gsd/skill-discovery.ts +5 -3
- package/src/resources/extensions/gsd/skill-health.ts +417 -0
- package/src/resources/extensions/gsd/skill-telemetry.ts +127 -0
- package/src/resources/extensions/gsd/state.ts +30 -0
- package/src/resources/extensions/gsd/templates/preferences.md +1 -0
- package/src/resources/extensions/gsd/tests/context-budget.test.ts +283 -0
- package/src/resources/extensions/gsd/tests/context-compression.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/context-store.test.ts +462 -0
- package/src/resources/extensions/gsd/tests/continue-here.test.ts +204 -0
- package/src/resources/extensions/gsd/tests/dashboard-budget.test.ts +346 -0
- package/src/resources/extensions/gsd/tests/db-writer.test.ts +602 -0
- package/src/resources/extensions/gsd/tests/debug-logger.test.ts +185 -0
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +406 -0
- package/src/resources/extensions/gsd/tests/dispatch-guard.test.ts +0 -1
- package/src/resources/extensions/gsd/tests/dist-redirect.mjs +22 -0
- package/src/resources/extensions/gsd/tests/doctor-proactive.test.ts +244 -0
- package/src/resources/extensions/gsd/tests/doctor-runtime.test.ts +303 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +353 -0
- package/src/resources/extensions/gsd/tests/gsd-inspect.test.ts +125 -0
- package/src/resources/extensions/gsd/tests/gsd-tools.test.ts +326 -0
- package/src/resources/extensions/gsd/tests/integration-edge.test.ts +228 -0
- package/src/resources/extensions/gsd/tests/integration-lifecycle.test.ts +277 -0
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +411 -0
- package/src/resources/extensions/gsd/tests/metrics.test.ts +197 -0
- package/src/resources/extensions/gsd/tests/model-isolation.test.ts +99 -0
- package/src/resources/extensions/gsd/tests/parsers.test.ts +40 -0
- package/src/resources/extensions/gsd/tests/post-unit-hooks.test.ts +41 -1
- package/src/resources/extensions/gsd/tests/preferences-git.test.ts +0 -1
- package/src/resources/extensions/gsd/tests/preferences-hooks.test.ts +0 -1
- package/src/resources/extensions/gsd/tests/preferences-mode.test.ts +110 -0
- package/src/resources/extensions/gsd/tests/preferences-models.test.ts +0 -1
- package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +464 -0
- package/src/resources/extensions/gsd/tests/prompt-db.test.ts +385 -0
- package/src/resources/extensions/gsd/tests/remote-questions.test.ts +262 -1
- package/src/resources/extensions/gsd/tests/resolve-ts-hooks.mjs +17 -29
- package/src/resources/extensions/gsd/tests/resolve-ts.mjs +2 -8
- package/src/resources/extensions/gsd/tests/skill-lifecycle.test.ts +126 -0
- package/src/resources/extensions/gsd/tests/stop-auto-remote.test.ts +31 -8
- package/src/resources/extensions/gsd/tests/token-savings.test.ts +366 -0
- package/src/resources/extensions/gsd/tests/unit-runtime.test.ts +25 -1
- package/src/resources/extensions/gsd/tests/visualizer-critical-path.test.ts +145 -0
- package/src/resources/extensions/gsd/tests/visualizer-data.test.ts +92 -0
- package/src/resources/extensions/gsd/tests/visualizer-overlay.test.ts +120 -0
- package/src/resources/extensions/gsd/tests/visualizer-views.test.ts +228 -5
- package/src/resources/extensions/gsd/tests/worktree-db-integration.test.ts +205 -0
- package/src/resources/extensions/gsd/tests/worktree-db.test.ts +442 -0
- package/src/resources/extensions/gsd/tests/worktree-post-create-hook.test.ts +165 -0
- package/src/resources/extensions/gsd/types.ts +29 -0
- package/src/resources/extensions/gsd/undo.ts +0 -1
- package/src/resources/extensions/gsd/unit-runtime.ts +5 -1
- package/src/resources/extensions/gsd/visualizer-data.ts +352 -1
- package/src/resources/extensions/gsd/visualizer-overlay.ts +166 -22
- package/src/resources/extensions/gsd/visualizer-views.ts +464 -2
- package/src/resources/extensions/gsd/worktree-command.ts +18 -0
- package/src/resources/extensions/gsd/worktree-manager.ts +11 -4
- package/src/resources/extensions/mcporter/index.ts +17 -5
- package/src/resources/extensions/remote-questions/config.ts +4 -2
- package/src/resources/extensions/remote-questions/discord-adapter.ts +2 -4
- package/src/resources/extensions/remote-questions/format.ts +154 -8
- package/src/resources/extensions/remote-questions/manager.ts +9 -7
- package/src/resources/extensions/remote-questions/remote-command.ts +100 -4
- package/src/resources/extensions/remote-questions/slack-adapter.ts +58 -2
- package/src/resources/extensions/remote-questions/telegram-adapter.ts +161 -0
- package/src/resources/extensions/remote-questions/types.ts +2 -1
- package/src/resources/extensions/search-the-web/native-search.ts +2 -0
- package/src/resources/extensions/search-the-web/tool-fetch-page.ts +9 -1
- package/src/resources/extensions/search-the-web/url-utils.ts +35 -1
- package/src/resources/extensions/ttsr/ttsr-manager.ts +26 -0
- package/src/resources/extensions/voice/index.ts +4 -3
- package/dist/resources/extensions/browser-tools/core.d.ts +0 -205
- package/src/resources/extensions/browser-tools/core.d.ts +0 -205
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/gsd-pi)
|
|
8
8
|
[](https://www.npmjs.com/package/gsd-pi)
|
|
9
9
|
[](https://github.com/gsd-build/GSD-2)
|
|
10
|
+
[](https://discord.gg/gsd)
|
|
10
11
|
[](LICENSE)
|
|
11
12
|
|
|
12
13
|
The original GSD went viral as a prompt framework for Claude Code. It worked, but it was fighting the tool — injecting prompts through slash commands, hoping the LLM would follow instructions, with no actual control over context windows, sessions, or execution.
|
|
@@ -231,6 +232,7 @@ On first run, GSD launches a branded setup wizard that walks you through LLM pro
|
|
|
231
232
|
| `/gsd` | Step mode — executes one unit at a time, pauses between each |
|
|
232
233
|
| `/gsd next` | Explicit step mode (same as bare `/gsd`) |
|
|
233
234
|
| `/gsd auto` | Autonomous mode — researches, plans, executes, commits, repeats |
|
|
235
|
+
| `/gsd quick` | Execute a quick task with GSD guarantees, skip planning overhead |
|
|
234
236
|
| `/gsd stop` | Stop auto mode gracefully |
|
|
235
237
|
| `/gsd steer` | Hard-steer plan documents during execution |
|
|
236
238
|
| `/gsd discuss` | Discuss architecture and decisions (works alongside auto mode) |
|
|
@@ -238,7 +240,9 @@ On first run, GSD launches a branded setup wizard that walks you through LLM pro
|
|
|
238
240
|
| `/gsd queue` | Queue future milestones (safe during auto mode) |
|
|
239
241
|
| `/gsd prefs` | Model selection, timeouts, budget ceiling |
|
|
240
242
|
| `/gsd migrate` | Migrate a v1 `.planning` directory to `.gsd` format |
|
|
241
|
-
| `/gsd
|
|
243
|
+
| `/gsd help` | Categorized command reference for all GSD subcommands |
|
|
244
|
+
| `/gsd mode` | Switch workflow mode (solo/team) with coordinated defaults |
|
|
245
|
+
| `/gsd doctor` | Runtime health checks with auto-fix for common issues |
|
|
242
246
|
| `/worktree` (`/wt`) | Git worktree lifecycle — create, switch, merge, remove |
|
|
243
247
|
| `/voice` | Toggle real-time speech-to-text (macOS, Linux) |
|
|
244
248
|
| `/exit` | Graceful shutdown — saves session state before exiting |
|
package/dist/cli.js
CHANGED
|
@@ -9,6 +9,7 @@ import { getPiDefaultModelAndProvider, migratePiCredentials } from './pi-migrati
|
|
|
9
9
|
import { shouldRunOnboarding, runOnboarding } from './onboarding.js';
|
|
10
10
|
import chalk from 'chalk';
|
|
11
11
|
import { checkForUpdates } from './update-check.js';
|
|
12
|
+
import { printHelp } from './help-text.js';
|
|
12
13
|
function exitIfManagedResourcesAreNewer(currentAgentDir) {
|
|
13
14
|
const currentVersion = process.env.GSD_VERSION || '0.0.0';
|
|
14
15
|
const managedVersion = getNewerManagedResourceVersion(currentAgentDir, currentVersion);
|
|
@@ -59,22 +60,7 @@ function parseCliArgs(argv) {
|
|
|
59
60
|
process.exit(0);
|
|
60
61
|
}
|
|
61
62
|
else if (arg === '--help' || arg === '-h') {
|
|
62
|
-
|
|
63
|
-
process.stdout.write('Usage: gsd [options] [message...]\n\n');
|
|
64
|
-
process.stdout.write('Options:\n');
|
|
65
|
-
process.stdout.write(' --mode <text|json|rpc> Output mode (default: interactive)\n');
|
|
66
|
-
process.stdout.write(' --print, -p Single-shot print mode\n');
|
|
67
|
-
process.stdout.write(' --continue, -c Resume the most recent session\n');
|
|
68
|
-
process.stdout.write(' --model <id> Override model (e.g. claude-opus-4-6)\n');
|
|
69
|
-
process.stdout.write(' --no-session Disable session persistence\n');
|
|
70
|
-
process.stdout.write(' --extension <path> Load additional extension\n');
|
|
71
|
-
process.stdout.write(' --tools <a,b,c> Restrict available tools\n');
|
|
72
|
-
process.stdout.write(' --list-models [search] List available models and exit\n');
|
|
73
|
-
process.stdout.write(' --version, -v Print version and exit\n');
|
|
74
|
-
process.stdout.write(' --help, -h Print this help and exit\n');
|
|
75
|
-
process.stdout.write('\nSubcommands:\n');
|
|
76
|
-
process.stdout.write(' config Re-run the setup wizard\n');
|
|
77
|
-
process.stdout.write(' update Update GSD to the latest version\n');
|
|
63
|
+
printHelp(process.env.GSD_VERSION || '0.0.0');
|
|
78
64
|
process.exit(0);
|
|
79
65
|
}
|
|
80
66
|
else if (!arg.startsWith('--') && !arg.startsWith('-')) {
|
|
@@ -105,8 +91,10 @@ ensureManagedTools(join(agentDir, 'bin'));
|
|
|
105
91
|
const authStorage = AuthStorage.create(authFilePath);
|
|
106
92
|
loadStoredEnvKeys(authStorage);
|
|
107
93
|
migratePiCredentials(authStorage);
|
|
94
|
+
const modelRegistry = new ModelRegistry(authStorage);
|
|
95
|
+
const settingsManager = SettingsManager.create(agentDir);
|
|
108
96
|
// Run onboarding wizard on first launch (no LLM provider configured)
|
|
109
|
-
if (!isPrintMode && shouldRunOnboarding(authStorage)) {
|
|
97
|
+
if (!isPrintMode && shouldRunOnboarding(authStorage, settingsManager.getDefaultProvider())) {
|
|
110
98
|
await runOnboarding(authStorage);
|
|
111
99
|
// Clean up stdin state left by @clack/prompts.
|
|
112
100
|
// readline.emitKeypressEvents() adds a permanent data listener and
|
|
@@ -126,8 +114,6 @@ if (!isPrintMode) {
|
|
|
126
114
|
if (!isPrintMode && process.stdout.columns && process.stdout.columns < 40) {
|
|
127
115
|
process.stderr.write(chalk.yellow(`[gsd] Terminal width is ${process.stdout.columns} columns (minimum recommended: 40). Output may be unreadable.\n`));
|
|
128
116
|
}
|
|
129
|
-
const modelRegistry = new ModelRegistry(authStorage);
|
|
130
|
-
const settingsManager = SettingsManager.create(agentDir);
|
|
131
117
|
// --list-models: print available models and exit (no TTY needed)
|
|
132
118
|
if (cliFlags.listModels !== undefined) {
|
|
133
119
|
const models = modelRegistry.getAvailable();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function printHelp(version: string): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function printHelp(version) {
|
|
2
|
+
process.stdout.write(`GSD v${version} — Get Shit Done\n\n`);
|
|
3
|
+
process.stdout.write('Usage: gsd [options] [message...]\n\n');
|
|
4
|
+
process.stdout.write('Options:\n');
|
|
5
|
+
process.stdout.write(' --mode <text|json|rpc> Output mode (default: interactive)\n');
|
|
6
|
+
process.stdout.write(' --print, -p Single-shot print mode\n');
|
|
7
|
+
process.stdout.write(' --continue, -c Resume the most recent session\n');
|
|
8
|
+
process.stdout.write(' --model <id> Override model (e.g. claude-opus-4-6)\n');
|
|
9
|
+
process.stdout.write(' --no-session Disable session persistence\n');
|
|
10
|
+
process.stdout.write(' --extension <path> Load additional extension\n');
|
|
11
|
+
process.stdout.write(' --tools <a,b,c> Restrict available tools\n');
|
|
12
|
+
process.stdout.write(' --list-models [search] List available models and exit\n');
|
|
13
|
+
process.stdout.write(' --version, -v Print version and exit\n');
|
|
14
|
+
process.stdout.write(' --help, -h Print this help and exit\n');
|
|
15
|
+
process.stdout.write('\nSubcommands:\n');
|
|
16
|
+
process.stdout.write(' config Re-run the setup wizard\n');
|
|
17
|
+
process.stdout.write(' update Update GSD to the latest version\n');
|
|
18
|
+
}
|
package/dist/loader.js
CHANGED
|
@@ -27,22 +27,8 @@ if (firstArg === '--help' || firstArg === '-h') {
|
|
|
27
27
|
version = pkg.version || version;
|
|
28
28
|
}
|
|
29
29
|
catch { /* ignore */ }
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
process.stdout.write('Options:\n');
|
|
33
|
-
process.stdout.write(' --mode <text|json|rpc> Output mode (default: interactive)\n');
|
|
34
|
-
process.stdout.write(' --print, -p Single-shot print mode\n');
|
|
35
|
-
process.stdout.write(' --continue, -c Resume the most recent session\n');
|
|
36
|
-
process.stdout.write(' --model <id> Override model (e.g. claude-opus-4-6)\n');
|
|
37
|
-
process.stdout.write(' --no-session Disable session persistence\n');
|
|
38
|
-
process.stdout.write(' --extension <path> Load additional extension\n');
|
|
39
|
-
process.stdout.write(' --tools <a,b,c> Restrict available tools\n');
|
|
40
|
-
process.stdout.write(' --list-models [search] List available models and exit\n');
|
|
41
|
-
process.stdout.write(' --version, -v Print version and exit\n');
|
|
42
|
-
process.stdout.write(' --help, -h Print this help and exit\n');
|
|
43
|
-
process.stdout.write('\nSubcommands:\n');
|
|
44
|
-
process.stdout.write(' config Re-run the setup wizard\n');
|
|
45
|
-
process.stdout.write(' update Update GSD to the latest version\n');
|
|
30
|
+
const { printHelp } = await import('./help-text.js');
|
|
31
|
+
printHelp(version);
|
|
46
32
|
process.exit(0);
|
|
47
33
|
}
|
|
48
34
|
import { agentDir, appRoot } from './app-paths.js';
|
package/dist/onboarding.d.ts
CHANGED
|
@@ -19,9 +19,11 @@ import type { AuthStorage } from '@gsd/pi-coding-agent';
|
|
|
19
19
|
*
|
|
20
20
|
* Returns false (skip wizard) when:
|
|
21
21
|
* - Any LLM provider is already available via auth.json, env vars, runtime overrides, or fallback auth
|
|
22
|
+
* - A default provider is already configured in settings (covers extension-based providers
|
|
23
|
+
* that may not require credentials in auth.json)
|
|
22
24
|
* - Not a TTY (piped input, subagent, CI)
|
|
23
25
|
*/
|
|
24
|
-
export declare function shouldRunOnboarding(authStorage: AuthStorage): boolean;
|
|
26
|
+
export declare function shouldRunOnboarding(authStorage: AuthStorage, settingsDefaultProvider?: string): boolean;
|
|
25
27
|
/**
|
|
26
28
|
* Run the unified onboarding wizard.
|
|
27
29
|
*
|
|
@@ -35,9 +37,3 @@ export declare function shouldRunOnboarding(authStorage: AuthStorage): boolean;
|
|
|
35
37
|
* Writes status to stderr during execution.
|
|
36
38
|
*/
|
|
37
39
|
export declare function runOnboarding(authStorage: AuthStorage): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Hydrate process.env from stored auth.json credentials for optional tool keys.
|
|
40
|
-
* Runs on every launch so extensions see Brave/Context7/Jina keys stored via the
|
|
41
|
-
* wizard on prior launches.
|
|
42
|
-
*/
|
|
43
|
-
export declare function loadStoredEnvKeys(authStorage: AuthStorage): void;
|
package/dist/onboarding.js
CHANGED
|
@@ -113,11 +113,15 @@ function isCancelError(p, err) {
|
|
|
113
113
|
*
|
|
114
114
|
* Returns false (skip wizard) when:
|
|
115
115
|
* - Any LLM provider is already available via auth.json, env vars, runtime overrides, or fallback auth
|
|
116
|
+
* - A default provider is already configured in settings (covers extension-based providers
|
|
117
|
+
* that may not require credentials in auth.json)
|
|
116
118
|
* - Not a TTY (piped input, subagent, CI)
|
|
117
119
|
*/
|
|
118
|
-
export function shouldRunOnboarding(authStorage) {
|
|
120
|
+
export function shouldRunOnboarding(authStorage, settingsDefaultProvider) {
|
|
119
121
|
if (!process.stdin.isTTY)
|
|
120
122
|
return false;
|
|
123
|
+
if (settingsDefaultProvider)
|
|
124
|
+
return false;
|
|
121
125
|
// Check if any LLM provider has credentials
|
|
122
126
|
const hasLlmAuth = LLM_PROVIDER_IDS.some(id => authStorage.hasAuth(id));
|
|
123
127
|
return !hasLlmAuth;
|
|
@@ -564,12 +568,13 @@ async function runRemoteQuestionsStep(p, pc, authStorage) {
|
|
|
564
568
|
// Check existing config
|
|
565
569
|
const hasDiscord = authStorage.has('discord_bot') && !!authStorage.get('discord_bot')?.key;
|
|
566
570
|
const hasSlack = authStorage.has('slack_bot') && !!authStorage.get('slack_bot')?.key;
|
|
567
|
-
const
|
|
571
|
+
const hasTelegram = authStorage.has('telegram_bot') && !!authStorage.get('telegram_bot')?.key;
|
|
572
|
+
const existingChannel = hasDiscord ? 'Discord' : hasSlack ? 'Slack' : hasTelegram ? 'Telegram' : null;
|
|
568
573
|
const options = [];
|
|
569
574
|
if (existingChannel) {
|
|
570
575
|
options.push({ value: 'keep', label: `Keep current (${existingChannel})`, hint: 'already configured' });
|
|
571
576
|
}
|
|
572
|
-
options.push({ value: 'discord', label: 'Discord', hint: 'receive questions in a Discord channel' }, { value: 'slack', label: 'Slack', hint: 'receive questions in a Slack channel' }, { value: 'skip', label: 'Skip for now', hint: 'use /gsd remote inside GSD later' });
|
|
577
|
+
options.push({ value: 'discord', label: 'Discord', hint: 'receive questions in a Discord channel' }, { value: 'slack', label: 'Slack', hint: 'receive questions in a Slack channel' }, { value: 'telegram', label: 'Telegram', hint: 'receive questions via Telegram bot' }, { value: 'skip', label: 'Skip for now', hint: 'use /gsd remote inside GSD later' });
|
|
573
578
|
const choice = await p.select({
|
|
574
579
|
message: 'Set up remote questions? (get notified when GSD needs input)',
|
|
575
580
|
options,
|
|
@@ -638,6 +643,74 @@ async function runRemoteQuestionsStep(p, pc, authStorage) {
|
|
|
638
643
|
p.log.success(`Slack channel: ${pc.green(channelId.trim())}`);
|
|
639
644
|
return 'Slack';
|
|
640
645
|
}
|
|
646
|
+
if (choice === 'telegram') {
|
|
647
|
+
const token = await p.password({
|
|
648
|
+
message: 'Paste your Telegram bot token (from @BotFather):',
|
|
649
|
+
mask: '●',
|
|
650
|
+
});
|
|
651
|
+
if (p.isCancel(token) || !token?.trim())
|
|
652
|
+
return null;
|
|
653
|
+
const trimmed = token.trim();
|
|
654
|
+
if (!/^\d+:[A-Za-z0-9_-]+$/.test(trimmed)) {
|
|
655
|
+
p.log.warn('Invalid token format — Telegram bot tokens look like 123456789:ABCdefGHI...');
|
|
656
|
+
return null;
|
|
657
|
+
}
|
|
658
|
+
// Validate
|
|
659
|
+
const s = p.spinner();
|
|
660
|
+
s.start('Validating Telegram bot token...');
|
|
661
|
+
try {
|
|
662
|
+
const res = await fetch(`https://api.telegram.org/bot${trimmed}/getMe`, {
|
|
663
|
+
signal: AbortSignal.timeout(15_000),
|
|
664
|
+
});
|
|
665
|
+
const data = await res.json();
|
|
666
|
+
if (!data?.ok || !data?.result?.id) {
|
|
667
|
+
s.stop('Telegram token validation failed');
|
|
668
|
+
return null;
|
|
669
|
+
}
|
|
670
|
+
s.stop(`Telegram bot: ${pc.green(data.result.first_name ?? data.result.username ?? 'bot')}`);
|
|
671
|
+
}
|
|
672
|
+
catch {
|
|
673
|
+
s.stop('Could not reach Telegram API');
|
|
674
|
+
return null;
|
|
675
|
+
}
|
|
676
|
+
authStorage.set('telegram_bot', { type: 'api_key', key: trimmed });
|
|
677
|
+
process.env.TELEGRAM_BOT_TOKEN = trimmed;
|
|
678
|
+
const chatId = await p.text({
|
|
679
|
+
message: 'Paste the Telegram chat ID (e.g. -1001234567890):',
|
|
680
|
+
validate: (val) => {
|
|
681
|
+
if (!val || !/^-?\d{5,20}$/.test(val.trim()))
|
|
682
|
+
return 'Expected a numeric chat ID (can be negative for groups)';
|
|
683
|
+
},
|
|
684
|
+
});
|
|
685
|
+
if (p.isCancel(chatId) || !chatId)
|
|
686
|
+
return null;
|
|
687
|
+
const trimmedChatId = chatId.trim();
|
|
688
|
+
// Test send
|
|
689
|
+
const ts = p.spinner();
|
|
690
|
+
ts.start('Testing message delivery...');
|
|
691
|
+
try {
|
|
692
|
+
const res = await fetch(`https://api.telegram.org/bot${trimmed}/sendMessage`, {
|
|
693
|
+
method: 'POST',
|
|
694
|
+
headers: { 'Content-Type': 'application/json' },
|
|
695
|
+
body: JSON.stringify({ chat_id: trimmedChatId, text: 'GSD remote questions connected.' }),
|
|
696
|
+
signal: AbortSignal.timeout(15_000),
|
|
697
|
+
});
|
|
698
|
+
const data = await res.json();
|
|
699
|
+
if (!data?.ok) {
|
|
700
|
+
ts.stop(`Could not send to chat: ${data?.description ?? 'unknown error'}`);
|
|
701
|
+
return null;
|
|
702
|
+
}
|
|
703
|
+
ts.stop('Test message sent');
|
|
704
|
+
}
|
|
705
|
+
catch {
|
|
706
|
+
ts.stop('Could not reach Telegram API');
|
|
707
|
+
return null;
|
|
708
|
+
}
|
|
709
|
+
const { saveRemoteQuestionsConfig } = await import('./remote-questions-config.js');
|
|
710
|
+
saveRemoteQuestionsConfig('telegram', trimmedChatId);
|
|
711
|
+
p.log.success(`Telegram chat: ${pc.green(trimmedChatId)}`);
|
|
712
|
+
return 'Telegram';
|
|
713
|
+
}
|
|
641
714
|
return null;
|
|
642
715
|
}
|
|
643
716
|
async function runDiscordChannelStep(p, pc, token) {
|
|
@@ -742,30 +815,3 @@ async function runDiscordChannelStep(p, pc, token) {
|
|
|
742
815
|
p.log.success(`Discord channel: ${pc.green(channelName ? `#${channelName}` : channelId)}`);
|
|
743
816
|
return channelName ?? null;
|
|
744
817
|
}
|
|
745
|
-
// ─── Env hydration (migrated from wizard.ts) ─────────────────────────────────
|
|
746
|
-
/**
|
|
747
|
-
* Hydrate process.env from stored auth.json credentials for optional tool keys.
|
|
748
|
-
* Runs on every launch so extensions see Brave/Context7/Jina keys stored via the
|
|
749
|
-
* wizard on prior launches.
|
|
750
|
-
*/
|
|
751
|
-
export function loadStoredEnvKeys(authStorage) {
|
|
752
|
-
const providers = [
|
|
753
|
-
['brave', 'BRAVE_API_KEY'],
|
|
754
|
-
['brave_answers', 'BRAVE_ANSWERS_KEY'],
|
|
755
|
-
['context7', 'CONTEXT7_API_KEY'],
|
|
756
|
-
['jina', 'JINA_API_KEY'],
|
|
757
|
-
['slack_bot', 'SLACK_BOT_TOKEN'],
|
|
758
|
-
['discord_bot', 'DISCORD_BOT_TOKEN'],
|
|
759
|
-
['groq', 'GROQ_API_KEY'],
|
|
760
|
-
['ollama-cloud', 'OLLAMA_API_KEY'],
|
|
761
|
-
['custom-openai', 'CUSTOM_OPENAI_API_KEY'],
|
|
762
|
-
];
|
|
763
|
-
for (const [provider, envVar] of providers) {
|
|
764
|
-
if (!process.env[envVar]) {
|
|
765
|
-
const cred = authStorage.get(provider);
|
|
766
|
-
if (cred?.type === 'api_key' && cred.key) {
|
|
767
|
-
process.env[envVar] = cred.key;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
}
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* but onboarding.ts is compiled by tsc — dynamic imports from compiled
|
|
8
8
|
* JS to uncompiled .ts fail at runtime (#592).
|
|
9
9
|
*/
|
|
10
|
-
export declare function saveRemoteQuestionsConfig(channel: "slack" | "discord", channelId: string): void;
|
|
10
|
+
export declare function saveRemoteQuestionsConfig(channel: "slack" | "discord" | "telegram", channelId: string): void;
|