gsd-pi 2.75.0-next.9c0ec0ba1 → 2.76.0-dev.b072ebb73
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 +145 -125
- package/dist/claude-cli-check.d.ts +10 -0
- package/dist/claude-cli-check.js +13 -3
- package/dist/onboarding.d.ts +20 -1
- package/dist/onboarding.js +60 -25
- package/dist/resources/agents/researcher.md +1 -1
- package/dist/resources/extensions/ask-user-questions.js +6 -3
- package/dist/resources/extensions/claude-code-cli/readiness.js +34 -2
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +44 -2
- package/dist/resources/extensions/gsd/auto/phases.js +48 -6
- package/dist/resources/extensions/gsd/auto-artifact-paths.js +20 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +37 -8
- package/dist/resources/extensions/gsd/auto-direct-dispatch.js +8 -2
- package/dist/resources/extensions/gsd/auto-dispatch.js +87 -9
- package/dist/resources/extensions/gsd/auto-model-selection.js +27 -6
- package/dist/resources/extensions/gsd/auto-post-unit.js +7 -5
- package/dist/resources/extensions/gsd/auto-prompts.js +188 -44
- package/dist/resources/extensions/gsd/auto-recovery.js +48 -0
- package/dist/resources/extensions/gsd/auto-start.js +5 -3
- package/dist/resources/extensions/gsd/auto-verification.js +33 -0
- package/dist/resources/extensions/gsd/auto-worktree.js +71 -2
- package/dist/resources/extensions/gsd/auto.js +25 -3
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +8 -21
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +45 -23
- package/dist/resources/extensions/gsd/bootstrap/memory-tools.js +131 -0
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +29 -0
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +12 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +22 -0
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +84 -10
- package/dist/resources/extensions/gsd/commands/catalog.js +15 -7
- package/dist/resources/extensions/gsd/commands/handlers/core.js +58 -24
- package/dist/resources/extensions/gsd/commands/handlers/escalate.js +171 -0
- package/dist/resources/extensions/gsd/commands/handlers/onboarding.js +159 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +10 -0
- package/dist/resources/extensions/gsd/commands-config.js +5 -0
- package/dist/resources/extensions/gsd/commands-extract-learnings.js +200 -77
- package/dist/resources/extensions/gsd/commands-memory.js +462 -0
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +39 -11
- package/dist/resources/extensions/gsd/custom-workflow-engine.js +74 -54
- package/dist/resources/extensions/gsd/db-writer.js +89 -16
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +2 -2
- package/dist/resources/extensions/gsd/doctor-environment.js +2 -1
- package/dist/resources/extensions/gsd/doctor-git-checks.js +50 -32
- package/dist/resources/extensions/gsd/doctor-proactive.js +4 -1
- package/dist/resources/extensions/gsd/doctor-providers.js +51 -5
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +21 -1
- package/dist/resources/extensions/gsd/doctor.js +7 -1
- package/dist/resources/extensions/gsd/ecosystem/gsd-extension-api.js +1 -0
- package/dist/resources/extensions/gsd/error-classifier.js +5 -2
- package/dist/resources/extensions/gsd/escalation.js +321 -0
- package/dist/resources/extensions/gsd/graph.js +26 -0
- package/dist/resources/extensions/gsd/gsd-db.js +517 -32
- package/dist/resources/extensions/gsd/health-widget-core.js +42 -14
- package/dist/resources/extensions/gsd/health-widget.js +7 -4
- package/dist/resources/extensions/gsd/hook-emitter.js +108 -0
- package/dist/resources/extensions/gsd/init-wizard.js +86 -45
- package/dist/resources/extensions/gsd/markdown-renderer.js +5 -5
- package/dist/resources/extensions/gsd/memory-backfill.js +126 -0
- package/dist/resources/extensions/gsd/memory-embeddings.js +219 -0
- package/dist/resources/extensions/gsd/memory-extractor.js +78 -27
- package/dist/resources/extensions/gsd/memory-ingest.js +218 -0
- package/dist/resources/extensions/gsd/memory-relations.js +189 -0
- package/dist/resources/extensions/gsd/memory-source-store.js +113 -0
- package/dist/resources/extensions/gsd/memory-store.js +318 -6
- package/dist/resources/extensions/gsd/metrics.js +1 -0
- package/dist/resources/extensions/gsd/model-cost-table.js +1 -0
- package/dist/resources/extensions/gsd/model-router.js +12 -5
- package/dist/resources/extensions/gsd/native-git-bridge.js +121 -5
- package/dist/resources/extensions/gsd/notification-overlay.js +7 -22
- package/dist/resources/extensions/gsd/notification-widget.js +24 -39
- package/dist/resources/extensions/gsd/onboarding-state.js +133 -0
- package/dist/resources/extensions/gsd/post-execution-checks.js +27 -11
- package/dist/resources/extensions/gsd/pre-execution-checks.js +98 -8
- package/dist/resources/extensions/gsd/preferences-models.js +1 -0
- package/dist/resources/extensions/gsd/preferences-types.js +2 -1
- package/dist/resources/extensions/gsd/preferences-validation.js +42 -8
- package/dist/resources/extensions/gsd/prompts/add-tests.md +1 -0
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +4 -1
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +2 -2
- package/dist/resources/extensions/gsd/prompts/debug-diagnose.md +2 -0
- package/dist/resources/extensions/gsd/prompts/execute-task.md +16 -3
- package/dist/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +2 -0
- package/dist/resources/extensions/gsd/prompts/refine-slice.md +69 -0
- package/dist/resources/extensions/gsd/prompts/research-slice.md +1 -0
- package/dist/resources/extensions/gsd/python-resolver.js +70 -0
- package/dist/resources/extensions/gsd/setup-catalog.js +75 -0
- package/dist/resources/extensions/gsd/state.js +90 -7
- package/dist/resources/extensions/gsd/templates/PREFERENCES.md +1 -1
- package/dist/resources/extensions/gsd/tools/complete-task.js +80 -0
- package/dist/resources/extensions/gsd/tools/memory-tools.js +331 -0
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +37 -12
- package/dist/resources/extensions/gsd/tools/plan-slice.js +5 -2
- package/dist/resources/extensions/gsd/tools/skip-slice.js +78 -0
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +14 -0
- package/dist/resources/extensions/gsd/uok/flags.js +1 -1
- package/dist/resources/extensions/gsd/verification-gate.js +2 -1
- package/dist/resources/extensions/gsd/workflow-manifest.js +8 -0
- package/dist/resources/extensions/gsd/workflow-mcp.js +1 -0
- package/dist/resources/extensions/gsd/workflow-projections.js +17 -15
- package/dist/resources/extensions/gsd/workflow-templates/spike.md +6 -0
- package/dist/resources/extensions/gsd/worktree-resolver.js +42 -1
- package/dist/resources/extensions/remote-questions/manager.js +11 -1
- package/dist/resources/extensions/search-the-web/command-search-provider.js +4 -1
- package/dist/resources/extensions/search-the-web/native-search.js +13 -2
- package/dist/resources/skills/api-design/SKILL.md +190 -0
- package/dist/resources/skills/create-mcp-server/SKILL.md +121 -0
- package/dist/resources/skills/decompose-into-slices/SKILL.md +139 -0
- package/dist/resources/skills/dependency-upgrade/SKILL.md +158 -0
- package/dist/resources/skills/design-an-interface/SKILL.md +102 -0
- package/dist/resources/skills/forensics/SKILL.md +153 -0
- package/dist/resources/skills/grill-me/SKILL.md +93 -0
- package/dist/resources/skills/handoff/SKILL.md +121 -0
- package/dist/resources/skills/observability/SKILL.md +174 -0
- package/dist/resources/skills/security-review/SKILL.md +181 -0
- package/dist/resources/skills/spike-wrap-up/SKILL.md +138 -0
- package/dist/resources/skills/tdd/SKILL.md +112 -0
- package/dist/resources/skills/verify-before-complete/SKILL.md +97 -0
- package/dist/resources/skills/write-docs/SKILL.md +81 -0
- package/dist/resources/skills/write-milestone-brief/SKILL.md +135 -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 +11 -11
- package/dist/web/standalone/.next/build-manifest.json +3 -3
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/react-loadable-manifest.json +2 -2
- package/dist/web/standalone/.next/required-server-files.json +1 -1
- 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_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 +2 -2
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +3 -3
- 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 +3 -3
- 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 +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +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 +11 -11
- package/dist/web/standalone/.next/server/chunks/6897.js +2 -2
- package/dist/web/standalone/.next/server/chunks/7461.js +1 -0
- 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/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/static/chunks/{2826.02df9631042cc18e.js → 2826.e59e8578e2e28639.js} +2 -2
- package/dist/web/standalone/.next/static/chunks/{2008.71ee9230ad78df21.js → 3621.fc7480022c972438.js} +2 -2
- package/dist/web/standalone/.next/static/chunks/app/{page-f1e30ab6bb269149.js → page-5b113fd32bc2a1c3.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/{webpack-6c7cda3e318eedb6.js → webpack-5fc74f13a25fa1bb.js} +1 -1
- package/dist/web/standalone/.next/static/css/632cd626b1731d88.css +1 -0
- package/dist/web/standalone/server.js +1 -1
- package/dist/welcome-screen.js +48 -24
- package/package.json +1 -1
- package/packages/daemon/package.json +2 -2
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +12 -10
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/dist/session-manager.d.ts.map +1 -1
- package/packages/mcp-server/dist/session-manager.js +8 -1
- package/packages/mcp-server/dist/session-manager.js.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts +2 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +306 -71
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +2 -2
- package/packages/mcp-server/src/mcp-server.test.ts +40 -4
- package/packages/mcp-server/src/server.ts +12 -10
- package/packages/mcp-server/src/session-manager.ts +10 -3
- package/packages/mcp-server/src/workflow-tools.test.ts +346 -1
- package/packages/mcp-server/src/workflow-tools.ts +359 -75
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/package.json +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +12 -0
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/dist/types.d.ts +30 -0
- package/packages/pi-agent-core/dist/types.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/types.js.map +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-agent-core/src/agent-loop.ts +14 -0
- package/packages/pi-agent-core/src/types.ts +34 -0
- package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-ai/dist/index.d.ts +1 -0
- package/packages/pi-ai/dist/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/index.js +1 -0
- package/packages/pi-ai/dist/index.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/index.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/openai-codex.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/openai-codex.js +17 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.test.js +1 -0
- package/packages/pi-ai/dist/models.generated.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts +22 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.js +40 -7
- package/packages/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.js +106 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js +42 -1
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.js +13 -0
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts +19 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +25 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts +11 -0
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +23 -2
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/api-family.d.ts +27 -0
- package/packages/pi-ai/dist/providers/api-family.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/api-family.js +47 -0
- package/packages/pi-ai/dist/providers/api-family.js.map +1 -0
- package/packages/pi-ai/dist/providers/api-family.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/api-family.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/api-family.test.js +101 -0
- package/packages/pi-ai/dist/providers/api-family.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js +12 -2
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js +164 -14
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.js +15 -3
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.js +67 -0
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.js +16 -3
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.js +67 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.js +289 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/openai-codex.js +12 -0
- package/packages/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-ai/scripts/generate-models.ts +12 -0
- package/packages/pi-ai/src/index.ts +1 -0
- package/packages/pi-ai/src/models/generated/openai-codex.ts +17 -0
- package/packages/pi-ai/src/models.generated.test.ts +1 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.test.ts +164 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.ts +41 -8
- package/packages/pi-ai/src/providers/anthropic-auth.test.ts +47 -1
- package/packages/pi-ai/src/providers/anthropic-bearer-auth.test.ts +26 -0
- package/packages/pi-ai/src/providers/anthropic-shared.ts +30 -1
- package/packages/pi-ai/src/providers/anthropic.ts +25 -2
- package/packages/pi-ai/src/providers/api-family.test.ts +129 -0
- package/packages/pi-ai/src/providers/api-family.ts +57 -0
- package/packages/pi-ai/src/utils/oauth/github-copilot.test.ts +200 -23
- package/packages/pi-ai/src/utils/oauth/github-copilot.ts +12 -2
- package/packages/pi-ai/src/utils/oauth/google-antigravity.test.ts +84 -0
- package/packages/pi-ai/src/utils/oauth/google-antigravity.ts +15 -5
- package/packages/pi-ai/src/utils/oauth/google-gemini-cli.test.ts +84 -0
- package/packages/pi-ai/src/utils/oauth/google-gemini-cli.ts +16 -5
- package/packages/pi-ai/src/utils/oauth/oauth-providers.test.ts +363 -0
- package/packages/pi-ai/src/utils/oauth/openai-codex.ts +15 -0
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/cli/args.d.ts +6 -0
- package/packages/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/cli/args.js +14 -4
- package/packages/pi-coding-agent/dist/cli/args.js.map +1 -1
- package/packages/pi-coding-agent/dist/cli/args.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/cli/args.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/cli/args.test.js +38 -0
- package/packages/pi-coding-agent/dist/cli/args.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +25 -2
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +7 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +25 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +38 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +4 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.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.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +4 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +34 -2
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.js +233 -0
- package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +200 -3
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/hooks-runner.d.ts +53 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.js +337 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.js +234 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/index.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/index.js +1 -0
- package/packages/pi-coding-agent/dist/core/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.js +40 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +32 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js +4 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts +10 -0
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +33 -5
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +55 -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.map +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/main.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/main.js +3 -0
- package/packages/pi-coding-agent/dist/main.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js +17 -7
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +48 -34
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts +4 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +83 -33
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +13 -9
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/cli/args.test.ts +44 -0
- package/packages/pi-coding-agent/src/cli/args.ts +21 -6
- package/packages/pi-coding-agent/src/core/agent-session.ts +27 -2
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +42 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +25 -0
- package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +4 -1
- package/packages/pi-coding-agent/src/core/extensions/index.ts +16 -0
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +5 -0
- package/packages/pi-coding-agent/src/core/extensions/runner.ts +353 -1
- package/packages/pi-coding-agent/src/core/extensions/types.ts +253 -2
- package/packages/pi-coding-agent/src/core/hooks-runner.test.ts +269 -0
- package/packages/pi-coding-agent/src/core/hooks-runner.ts +460 -0
- package/packages/pi-coding-agent/src/core/index.ts +10 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-header.test.ts +44 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +37 -1
- package/packages/pi-coding-agent/src/core/retry-handler.ts +4 -1
- package/packages/pi-coding-agent/src/core/sdk.ts +48 -5
- package/packages/pi-coding-agent/src/core/settings-manager.ts +57 -0
- package/packages/pi-coding-agent/src/index.ts +16 -0
- package/packages/pi-coding-agent/src/main.ts +4 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/chat-frame.ts +19 -7
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +53 -31
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +88 -36
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +13 -9
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/package.json +1 -1
- package/packages/rpc-client/package.json +1 -1
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts +1 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme-schema.js +1 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.js +13 -9
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
- package/pkg/package.json +1 -1
- package/src/resources/agents/researcher.md +1 -1
- package/src/resources/extensions/ask-user-questions.ts +7 -4
- package/src/resources/extensions/claude-code-cli/readiness.ts +36 -2
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +59 -1
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +66 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +2 -10
- package/src/resources/extensions/gsd/auto/phases.ts +52 -6
- package/src/resources/extensions/gsd/auto-artifact-paths.ts +20 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +46 -5
- package/src/resources/extensions/gsd/auto-direct-dispatch.ts +15 -2
- package/src/resources/extensions/gsd/auto-dispatch.ts +96 -4
- package/src/resources/extensions/gsd/auto-model-selection.ts +37 -6
- package/src/resources/extensions/gsd/auto-post-unit.ts +7 -5
- package/src/resources/extensions/gsd/auto-prompts.ts +225 -45
- package/src/resources/extensions/gsd/auto-recovery.ts +47 -0
- package/src/resources/extensions/gsd/auto-start.ts +8 -6
- package/src/resources/extensions/gsd/auto-verification.ts +33 -0
- package/src/resources/extensions/gsd/auto-worktree.ts +81 -1
- package/src/resources/extensions/gsd/auto.ts +27 -2
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +8 -21
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +46 -24
- package/src/resources/extensions/gsd/bootstrap/memory-tools.ts +163 -0
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +31 -0
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +15 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +22 -0
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +89 -10
- package/src/resources/extensions/gsd/commands/catalog.ts +15 -7
- package/src/resources/extensions/gsd/commands/handlers/core.ts +63 -27
- package/src/resources/extensions/gsd/commands/handlers/escalate.ts +216 -0
- package/src/resources/extensions/gsd/commands/handlers/onboarding.ts +196 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +10 -0
- package/src/resources/extensions/gsd/commands-config.ts +10 -0
- package/src/resources/extensions/gsd/commands-extract-learnings.ts +262 -78
- package/src/resources/extensions/gsd/commands-memory.ts +551 -0
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +48 -11
- package/src/resources/extensions/gsd/custom-workflow-engine.ts +85 -60
- package/src/resources/extensions/gsd/db-writer.ts +91 -17
- package/src/resources/extensions/gsd/docs/preferences-reference.md +2 -2
- package/src/resources/extensions/gsd/doctor-environment.ts +2 -1
- package/src/resources/extensions/gsd/doctor-git-checks.ts +51 -30
- package/src/resources/extensions/gsd/doctor-proactive.ts +4 -1
- package/src/resources/extensions/gsd/doctor-providers.ts +59 -6
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +22 -1
- package/src/resources/extensions/gsd/doctor-types.ts +1 -0
- package/src/resources/extensions/gsd/doctor.ts +7 -1
- package/src/resources/extensions/gsd/ecosystem/gsd-extension-api.ts +2 -0
- package/src/resources/extensions/gsd/error-classifier.ts +5 -2
- package/src/resources/extensions/gsd/escalation.ts +367 -0
- package/src/resources/extensions/gsd/graph.ts +33 -0
- package/src/resources/extensions/gsd/gsd-db.ts +617 -32
- package/src/resources/extensions/gsd/health-widget-core.ts +43 -14
- package/src/resources/extensions/gsd/health-widget.ts +7 -3
- package/src/resources/extensions/gsd/hook-emitter.ts +188 -0
- package/src/resources/extensions/gsd/init-wizard.ts +87 -54
- package/src/resources/extensions/gsd/markdown-renderer.ts +5 -5
- package/src/resources/extensions/gsd/memory-backfill.ts +140 -0
- package/src/resources/extensions/gsd/memory-embeddings.ts +235 -0
- package/src/resources/extensions/gsd/memory-extractor.ts +100 -34
- package/src/resources/extensions/gsd/memory-ingest.ts +286 -0
- package/src/resources/extensions/gsd/memory-relations.ts +240 -0
- package/src/resources/extensions/gsd/memory-source-store.ts +138 -0
- package/src/resources/extensions/gsd/memory-store.ts +377 -7
- package/src/resources/extensions/gsd/metrics.ts +1 -0
- package/src/resources/extensions/gsd/model-cost-table.ts +1 -0
- package/src/resources/extensions/gsd/model-router.ts +21 -5
- package/src/resources/extensions/gsd/native-git-bridge.ts +118 -6
- package/src/resources/extensions/gsd/notification-overlay.ts +9 -19
- package/src/resources/extensions/gsd/notification-widget.ts +25 -43
- package/src/resources/extensions/gsd/onboarding-state.ts +146 -0
- package/src/resources/extensions/gsd/post-execution-checks.ts +37 -14
- package/src/resources/extensions/gsd/pre-execution-checks.ts +100 -12
- package/src/resources/extensions/gsd/preferences-models.ts +1 -0
- package/src/resources/extensions/gsd/preferences-types.ts +9 -1
- package/src/resources/extensions/gsd/preferences-validation.ts +33 -7
- package/src/resources/extensions/gsd/prompts/add-tests.md +1 -0
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +4 -1
- package/src/resources/extensions/gsd/prompts/complete-slice.md +2 -2
- package/src/resources/extensions/gsd/prompts/debug-diagnose.md +2 -0
- package/src/resources/extensions/gsd/prompts/execute-task.md +16 -3
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
- package/src/resources/extensions/gsd/prompts/plan-slice.md +2 -0
- package/src/resources/extensions/gsd/prompts/refine-slice.md +69 -0
- package/src/resources/extensions/gsd/prompts/research-slice.md +1 -0
- package/src/resources/extensions/gsd/python-resolver.ts +76 -0
- package/src/resources/extensions/gsd/setup-catalog.ts +105 -0
- package/src/resources/extensions/gsd/state.ts +95 -6
- package/src/resources/extensions/gsd/templates/PREFERENCES.md +1 -1
- package/src/resources/extensions/gsd/tests/artifact-corruption-2630.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +49 -0
- package/src/resources/extensions/gsd/tests/auto-migrating-recovery.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +95 -1
- package/src/resources/extensions/gsd/tests/auto-prompts-fallback.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +123 -1
- package/src/resources/extensions/gsd/tests/auto-wrapup-inflight-guard.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/bundled-skill-triggers.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/commands-extract-learnings.test.ts +335 -21
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +6 -8
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/derive-state-helpers.test.ts +8 -4
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +117 -3
- package/src/resources/extensions/gsd/tests/enhanced-verification-integration.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/ensure-db-open.test.ts +306 -1
- package/src/resources/extensions/gsd/tests/escalation.test.ts +818 -0
- package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +145 -8
- package/src/resources/extensions/gsd/tests/freeform-decisions.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +44 -1
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +8 -2
- package/src/resources/extensions/gsd/tests/init-prefs-routing.test.ts +190 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-git-symlink-cwd.test.ts +90 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-git.test.ts +117 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-proactive.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-runtime.test.ts +32 -1
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +72 -5
- package/src/resources/extensions/gsd/tests/integration/integration-proof.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/integration/test-isolation.ts +53 -0
- package/src/resources/extensions/gsd/tests/interactive-routing-bypass.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/load-memory-block.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/memory-embeddings.test.ts +213 -0
- package/src/resources/extensions/gsd/tests/memory-ingest.test.ts +153 -0
- package/src/resources/extensions/gsd/tests/memory-maintenance.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/memory-relations.test.ts +175 -0
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/memory-tools.test.ts +295 -0
- package/src/resources/extensions/gsd/tests/milestone-status-tool.test.ts +3 -2
- package/src/resources/extensions/gsd/tests/model-cost-table.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/model-router.test.ts +51 -1
- package/src/resources/extensions/gsd/tests/model-unittype-mapping.test.ts +59 -0
- package/src/resources/extensions/gsd/tests/notification-overlay.test.ts +56 -37
- package/src/resources/extensions/gsd/tests/notification-widget.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/onboarding-state.test.ts +105 -0
- package/src/resources/extensions/gsd/tests/plan-milestone-boundary-map-preservation.test.ts +114 -0
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +4 -5
- package/src/resources/extensions/gsd/tests/plan-slice.test.ts +17 -0
- package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +105 -1
- package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +317 -1
- package/src/resources/extensions/gsd/tests/progressive-planning.test.ts +539 -0
- package/src/resources/extensions/gsd/tests/projection-no-plan-overwrite.test.ts +11 -2
- package/src/resources/extensions/gsd/tests/projection-regression.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +159 -8
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/prompts-no-gitignored-test-refs.test.ts +56 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +41 -4
- package/src/resources/extensions/gsd/tests/python-resolver.test.ts +131 -0
- package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +67 -0
- package/src/resources/extensions/gsd/tests/requirements.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +153 -0
- package/src/resources/extensions/gsd/tests/skip-slice-cascades-tasks.test.ts +125 -0
- package/src/resources/extensions/gsd/tests/slice-context-injection.test.ts +16 -4
- package/src/resources/extensions/gsd/tests/stash-queued-context-files.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +3 -0
- package/src/resources/extensions/gsd/tests/summary-render-parity.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/uok-contracts.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/uok-flags.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/validate-milestone.test.ts +9 -3
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +97 -0
- package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +77 -2
- package/src/resources/extensions/gsd/tools/complete-task.ts +87 -0
- package/src/resources/extensions/gsd/tools/memory-tools.ts +410 -0
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +42 -8
- package/src/resources/extensions/gsd/tools/plan-slice.ts +6 -1
- package/src/resources/extensions/gsd/tools/skip-slice.ts +133 -0
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +14 -0
- package/src/resources/extensions/gsd/types.ts +62 -0
- package/src/resources/extensions/gsd/uok/contracts.ts +2 -1
- package/src/resources/extensions/gsd/uok/flags.ts +1 -1
- package/src/resources/extensions/gsd/verification-gate.ts +2 -1
- package/src/resources/extensions/gsd/workflow-logger.ts +4 -1
- package/src/resources/extensions/gsd/workflow-manifest.ts +8 -0
- package/src/resources/extensions/gsd/workflow-mcp.ts +1 -0
- package/src/resources/extensions/gsd/workflow-projections.ts +18 -16
- package/src/resources/extensions/gsd/workflow-templates/spike.md +6 -0
- package/src/resources/extensions/gsd/worktree-resolver.ts +47 -1
- package/src/resources/extensions/remote-questions/manager.ts +13 -1
- package/src/resources/extensions/remote-questions/tests/remote-answer-normalization.test.ts +92 -0
- package/src/resources/extensions/search-the-web/command-search-provider.ts +4 -1
- package/src/resources/extensions/search-the-web/native-search.ts +13 -3
- package/src/resources/skills/api-design/SKILL.md +190 -0
- package/src/resources/skills/create-mcp-server/SKILL.md +121 -0
- package/src/resources/skills/decompose-into-slices/SKILL.md +139 -0
- package/src/resources/skills/dependency-upgrade/SKILL.md +158 -0
- package/src/resources/skills/design-an-interface/SKILL.md +102 -0
- package/src/resources/skills/forensics/SKILL.md +153 -0
- package/src/resources/skills/grill-me/SKILL.md +93 -0
- package/src/resources/skills/handoff/SKILL.md +121 -0
- package/src/resources/skills/observability/SKILL.md +174 -0
- package/src/resources/skills/security-review/SKILL.md +181 -0
- package/src/resources/skills/spike-wrap-up/SKILL.md +138 -0
- package/src/resources/skills/tdd/SKILL.md +112 -0
- package/src/resources/skills/verify-before-complete/SKILL.md +97 -0
- package/src/resources/skills/write-docs/SKILL.md +81 -0
- package/src/resources/skills/write-milestone-brief/SKILL.md +135 -0
- package/dist/web/standalone/.next/static/css/3e9cdadb4d23b8a4.css +0 -1
- /package/dist/web/standalone/.next/static/{JncJywFxCugMuXGs56m-b → pBwmOoye64ZrRp-_rf0v1}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{JncJywFxCugMuXGs56m-b → pBwmOoye64ZrRp-_rf0v1}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// gsd-2 / pi-ai: api-family predicate tests
|
|
2
|
+
import { describe, test } from "node:test";
|
|
3
|
+
import assert from "node:assert/strict";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
isAnthropicApi,
|
|
7
|
+
isBedrockApi,
|
|
8
|
+
isGeminiApi,
|
|
9
|
+
isOpenAIApi,
|
|
10
|
+
} from "./api-family.js";
|
|
11
|
+
|
|
12
|
+
// Every api value registered via registerApiProvider() in register-builtins.ts.
|
|
13
|
+
// Keep in sync with that file — the expectations below assert every api is
|
|
14
|
+
// classified by exactly one family (except mistral, which is its own family
|
|
15
|
+
// and belongs to none of the helpers).
|
|
16
|
+
const ALL_REGISTERED_APIS = [
|
|
17
|
+
"anthropic-messages",
|
|
18
|
+
"anthropic-vertex",
|
|
19
|
+
"openai-completions",
|
|
20
|
+
"openai-responses",
|
|
21
|
+
"azure-openai-responses",
|
|
22
|
+
"openai-codex-responses",
|
|
23
|
+
"google-generative-ai",
|
|
24
|
+
"google-gemini-cli",
|
|
25
|
+
"google-vertex",
|
|
26
|
+
"bedrock-converse-stream",
|
|
27
|
+
"mistral-conversations",
|
|
28
|
+
] as const;
|
|
29
|
+
|
|
30
|
+
describe("isAnthropicApi", () => {
|
|
31
|
+
test("matches anthropic-messages and anthropic-vertex", () => {
|
|
32
|
+
assert.equal(isAnthropicApi({ api: "anthropic-messages" }), true);
|
|
33
|
+
assert.equal(isAnthropicApi({ api: "anthropic-vertex" }), true);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test("excludes bedrock-converse-stream (different tool schema)", () => {
|
|
37
|
+
assert.equal(isAnthropicApi({ api: "bedrock-converse-stream" }), false);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test("excludes every non-Anthropic registered api", () => {
|
|
41
|
+
const nonAnthropic = ALL_REGISTERED_APIS.filter(
|
|
42
|
+
(a) => a !== "anthropic-messages" && a !== "anthropic-vertex",
|
|
43
|
+
);
|
|
44
|
+
for (const api of nonAnthropic) {
|
|
45
|
+
assert.equal(isAnthropicApi({ api }), false, `api=${api}`);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test("tolerates null/undefined/missing api", () => {
|
|
50
|
+
assert.equal(isAnthropicApi(null), false);
|
|
51
|
+
assert.equal(isAnthropicApi(undefined), false);
|
|
52
|
+
assert.equal(isAnthropicApi({}), false);
|
|
53
|
+
assert.equal(isAnthropicApi({ api: "" }), false);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
describe("isOpenAIApi", () => {
|
|
58
|
+
test("matches all OpenAI-shaped apis", () => {
|
|
59
|
+
for (const api of [
|
|
60
|
+
"openai-completions",
|
|
61
|
+
"openai-responses",
|
|
62
|
+
"azure-openai-responses",
|
|
63
|
+
"openai-codex-responses",
|
|
64
|
+
]) {
|
|
65
|
+
assert.equal(isOpenAIApi({ api }), true, `api=${api}`);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test("excludes every non-OpenAI registered api", () => {
|
|
70
|
+
const nonOpenAI = ALL_REGISTERED_APIS.filter(
|
|
71
|
+
(a) =>
|
|
72
|
+
a !== "openai-completions" &&
|
|
73
|
+
a !== "openai-responses" &&
|
|
74
|
+
a !== "azure-openai-responses" &&
|
|
75
|
+
a !== "openai-codex-responses",
|
|
76
|
+
);
|
|
77
|
+
for (const api of nonOpenAI) {
|
|
78
|
+
assert.equal(isOpenAIApi({ api }), false, `api=${api}`);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
describe("isGeminiApi", () => {
|
|
84
|
+
test("matches all Gemini-shaped apis", () => {
|
|
85
|
+
for (const api of ["google-generative-ai", "google-gemini-cli", "google-vertex"]) {
|
|
86
|
+
assert.equal(isGeminiApi({ api }), true, `api=${api}`);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test("excludes every non-Gemini registered api", () => {
|
|
91
|
+
const nonGemini = ALL_REGISTERED_APIS.filter(
|
|
92
|
+
(a) =>
|
|
93
|
+
a !== "google-generative-ai" &&
|
|
94
|
+
a !== "google-gemini-cli" &&
|
|
95
|
+
a !== "google-vertex",
|
|
96
|
+
);
|
|
97
|
+
for (const api of nonGemini) {
|
|
98
|
+
assert.equal(isGeminiApi({ api }), false, `api=${api}`);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
describe("isBedrockApi", () => {
|
|
104
|
+
test("matches only bedrock-converse-stream", () => {
|
|
105
|
+
assert.equal(isBedrockApi({ api: "bedrock-converse-stream" }), true);
|
|
106
|
+
for (const api of ALL_REGISTERED_APIS.filter((a) => a !== "bedrock-converse-stream")) {
|
|
107
|
+
assert.equal(isBedrockApi({ api }), false, `api=${api}`);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
describe("api-family exclusivity", () => {
|
|
113
|
+
test("every registered api belongs to exactly one family (or mistral = none)", () => {
|
|
114
|
+
for (const api of ALL_REGISTERED_APIS) {
|
|
115
|
+
const matches = [
|
|
116
|
+
isAnthropicApi({ api }),
|
|
117
|
+
isOpenAIApi({ api }),
|
|
118
|
+
isGeminiApi({ api }),
|
|
119
|
+
isBedrockApi({ api }),
|
|
120
|
+
].filter(Boolean).length;
|
|
121
|
+
const expected = api === "mistral-conversations" ? 0 : 1;
|
|
122
|
+
assert.equal(
|
|
123
|
+
matches,
|
|
124
|
+
expected,
|
|
125
|
+
`api=${api} matched ${matches} families (expected ${expected})`,
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// gsd-2 / pi-ai: API-shape family predicates
|
|
2
|
+
//
|
|
3
|
+
// Rule (see docs/dev/ADR-012-provider-id-vs-api-shape.md):
|
|
4
|
+
// Gate API-shape-dependent behavior (tool schemas, request payload shape,
|
|
5
|
+
// streaming format) on `model.api`, never on `model.provider`.
|
|
6
|
+
// `provider` is a credential/transport identifier that varies by vendor
|
|
7
|
+
// routing (e.g. `anthropic`, `claude-code`, `anthropic-vertex`,
|
|
8
|
+
// `amazon-bedrock`, `vercel-ai-gateway`) even when the wire protocol is
|
|
9
|
+
// identical.
|
|
10
|
+
|
|
11
|
+
/** Minimal shape — any object with an optional `api` string works. */
|
|
12
|
+
type HasApi = { api?: string } | null | undefined;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* True for any transport that speaks the Anthropic Messages wire protocol:
|
|
16
|
+
* direct Anthropic, Claude Code OAuth, Anthropic-on-Vertex, Vercel AI Gateway
|
|
17
|
+
* Anthropic routes, etc.
|
|
18
|
+
*
|
|
19
|
+
* Excludes Bedrock-hosted Claude — Bedrock Converse uses a different tool
|
|
20
|
+
* schema and is matched by `isBedrockApi` instead.
|
|
21
|
+
*/
|
|
22
|
+
export function isAnthropicApi(model: HasApi): boolean {
|
|
23
|
+
const api = model?.api;
|
|
24
|
+
return api === "anthropic-messages" || api === "anthropic-vertex";
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* True for any transport that speaks an OpenAI-shaped wire protocol:
|
|
29
|
+
* Chat Completions, Responses, Azure-hosted Responses, Codex-hosted Responses.
|
|
30
|
+
*/
|
|
31
|
+
export function isOpenAIApi(model: HasApi): boolean {
|
|
32
|
+
const api = model?.api;
|
|
33
|
+
return (
|
|
34
|
+
api === "openai-completions" ||
|
|
35
|
+
api === "openai-responses" ||
|
|
36
|
+
api === "azure-openai-responses" ||
|
|
37
|
+
api === "openai-codex-responses"
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* True for any transport that speaks a Google Gemini wire protocol:
|
|
43
|
+
* Generative AI REST, Gemini CLI, Vertex AI.
|
|
44
|
+
*/
|
|
45
|
+
export function isGeminiApi(model: HasApi): boolean {
|
|
46
|
+
const api = model?.api;
|
|
47
|
+
return (
|
|
48
|
+
api === "google-generative-ai" ||
|
|
49
|
+
api === "google-gemini-cli" ||
|
|
50
|
+
api === "google-vertex"
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** True for AWS Bedrock Converse transports. */
|
|
55
|
+
export function isBedrockApi(model: HasApi): boolean {
|
|
56
|
+
return model?.api === "bedrock-converse-stream";
|
|
57
|
+
}
|
|
@@ -1,28 +1,46 @@
|
|
|
1
|
+
import { describe, test } from "node:test";
|
|
1
2
|
import assert from "node:assert/strict";
|
|
2
|
-
import
|
|
3
|
-
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
4
6
|
import type { Api, Model } from "../../types.js";
|
|
5
|
-
import type { OAuthCredentials } from "./
|
|
6
|
-
import {
|
|
7
|
+
import type { OAuthCredentials } from "./types.js";
|
|
8
|
+
import {
|
|
9
|
+
getGitHubCopilotBaseUrl,
|
|
10
|
+
githubCopilotOAuthProvider,
|
|
11
|
+
normalizeDomain,
|
|
12
|
+
} from "./github-copilot.js";
|
|
13
|
+
|
|
14
|
+
const __dirname = fileURLToPath(new URL(".", import.meta.url));
|
|
15
|
+
const packageRoot = join(__dirname, "..", "..", "..");
|
|
16
|
+
const sourceDir = existsSync(join(__dirname, "github-copilot.ts"))
|
|
17
|
+
? __dirname
|
|
18
|
+
: join(packageRoot, "src", "utils", "oauth");
|
|
19
|
+
|
|
20
|
+
function readSourceFile(name: string): string {
|
|
21
|
+
return readFileSync(join(sourceDir, name), "utf-8");
|
|
22
|
+
}
|
|
7
23
|
|
|
8
|
-
function
|
|
24
|
+
function createModel(overrides: Partial<Model<Api>> = {}): Model<Api> {
|
|
9
25
|
return {
|
|
10
|
-
id,
|
|
11
|
-
name:
|
|
26
|
+
id: "test-model",
|
|
27
|
+
name: "Test Model",
|
|
12
28
|
api: "openai-completions",
|
|
13
|
-
provider,
|
|
14
|
-
baseUrl:
|
|
29
|
+
provider: "test-provider",
|
|
30
|
+
baseUrl: "https://example.com",
|
|
15
31
|
reasoning: false,
|
|
16
32
|
input: ["text"],
|
|
17
33
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
18
34
|
contextWindow: 128000,
|
|
19
|
-
maxTokens:
|
|
20
|
-
|
|
35
|
+
maxTokens: 8192,
|
|
36
|
+
...overrides,
|
|
37
|
+
} as Model<Api>;
|
|
21
38
|
}
|
|
22
39
|
|
|
23
|
-
function makeCredentials(
|
|
40
|
+
function makeCredentials(
|
|
41
|
+
overrides: Partial<OAuthCredentials & { modelLimits?: Record<string, { contextWindow: number; maxTokens: number }> }> = {},
|
|
42
|
+
) {
|
|
24
43
|
return {
|
|
25
|
-
type: "oauth" as const,
|
|
26
44
|
access: "copilot-token",
|
|
27
45
|
refresh: "refresh-token",
|
|
28
46
|
expires: Date.now() + 60_000,
|
|
@@ -30,19 +48,178 @@ function makeCredentials(overrides: Partial<OAuthCredentials & { modelLimits?: R
|
|
|
30
48
|
};
|
|
31
49
|
}
|
|
32
50
|
|
|
51
|
+
describe("GitHub Copilot OAuth — normalizeDomain", () => {
|
|
52
|
+
test("returns null for empty input", () => {
|
|
53
|
+
assert.equal(normalizeDomain(""), null);
|
|
54
|
+
assert.equal(normalizeDomain(" "), null);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test("returns null for invalid domain", () => {
|
|
58
|
+
assert.equal(normalizeDomain("not a domain!@#"), null);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test("extracts hostname from full URL", () => {
|
|
62
|
+
assert.equal(normalizeDomain("https://github.com"), "github.com");
|
|
63
|
+
assert.equal(normalizeDomain("https://company.ghe.com"), "company.ghe.com");
|
|
64
|
+
assert.equal(normalizeDomain("http://example.com/path"), "example.com");
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test("returns domain as-is when no protocol", () => {
|
|
68
|
+
assert.equal(normalizeDomain("github.com"), "github.com");
|
|
69
|
+
assert.equal(normalizeDomain("company.ghe.com"), "company.ghe.com");
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test("trims whitespace", () => {
|
|
73
|
+
assert.equal(normalizeDomain(" github.com "), "github.com");
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
describe("GitHub Copilot OAuth — getBaseUrlFromToken", () => {
|
|
78
|
+
test("extracts API URL from token with proxy-ep", () => {
|
|
79
|
+
const token = "tid=123;exp=1234567890;proxy-ep=proxy.individual.githubcopilot.com;other=value";
|
|
80
|
+
const baseUrl = getGitHubCopilotBaseUrl(token);
|
|
81
|
+
assert.equal(baseUrl, "https://api.individual.githubcopilot.com");
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test("extracts API URL from enterprise proxy-ep", () => {
|
|
85
|
+
const token = "tid=123;exp=1234567890;proxy-ep=proxy.company.ghe.com;other=value";
|
|
86
|
+
const baseUrl = getGitHubCopilotBaseUrl(token);
|
|
87
|
+
assert.equal(baseUrl, "https://api.company.ghe.com");
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test("falls back to default when no token provided", () => {
|
|
91
|
+
const baseUrl = getGitHubCopilotBaseUrl();
|
|
92
|
+
assert.equal(baseUrl, "https://api.individual.githubcopilot.com");
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test("falls back to default when token has no proxy-ep", () => {
|
|
96
|
+
const token = "tid=123;exp=1234567890;other=value";
|
|
97
|
+
const baseUrl = getGitHubCopilotBaseUrl(token);
|
|
98
|
+
assert.equal(baseUrl, "https://api.individual.githubcopilot.com");
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
test("uses enterprise domain when provided", () => {
|
|
102
|
+
const baseUrl = getGitHubCopilotBaseUrl(undefined, "company.ghe.com");
|
|
103
|
+
assert.equal(baseUrl, "https://copilot-api.company.ghe.com");
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
test("prioritizes token proxy-ep over enterprise domain", () => {
|
|
107
|
+
const token = "tid=123;exp=1234567890;proxy-ep=proxy.individual.githubcopilot.com;other=value";
|
|
108
|
+
const baseUrl = getGitHubCopilotBaseUrl(token, "company.ghe.com");
|
|
109
|
+
assert.equal(baseUrl, "https://api.individual.githubcopilot.com");
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
describe("GitHub Copilot OAuth — provider structure", () => {
|
|
114
|
+
test("has correct id and name", () => {
|
|
115
|
+
assert.equal(githubCopilotOAuthProvider.id, "github-copilot");
|
|
116
|
+
assert.equal(githubCopilotOAuthProvider.name, "GitHub Copilot");
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
test("has required methods", () => {
|
|
120
|
+
assert.equal(typeof githubCopilotOAuthProvider.login, "function");
|
|
121
|
+
assert.equal(typeof githubCopilotOAuthProvider.refreshToken, "function");
|
|
122
|
+
assert.equal(typeof githubCopilotOAuthProvider.getApiKey, "function");
|
|
123
|
+
assert.equal(typeof githubCopilotOAuthProvider.modifyModels, "function");
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
test("getApiKey returns access token", () => {
|
|
127
|
+
const credentials: OAuthCredentials = {
|
|
128
|
+
access: "test-access-token",
|
|
129
|
+
refresh: "test-refresh-token",
|
|
130
|
+
expires: Date.now() + 3600000,
|
|
131
|
+
};
|
|
132
|
+
const apiKey = githubCopilotOAuthProvider.getApiKey(credentials);
|
|
133
|
+
assert.equal(apiKey, "test-access-token");
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
test("modifyModels preserves non-Copilot models", () => {
|
|
137
|
+
if (!githubCopilotOAuthProvider.modifyModels) return;
|
|
138
|
+
const models = [createModel({ id: "gpt-4", provider: "openai" })];
|
|
139
|
+
const credentials: OAuthCredentials = {
|
|
140
|
+
access: "test-token",
|
|
141
|
+
refresh: "test-refresh",
|
|
142
|
+
expires: Date.now() + 3600000,
|
|
143
|
+
};
|
|
144
|
+
const result = githubCopilotOAuthProvider.modifyModels(models, credentials);
|
|
145
|
+
assert.deepEqual(result, models);
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
test("modifyModels updates Copilot model baseUrl when token has proxy-ep", () => {
|
|
149
|
+
if (!githubCopilotOAuthProvider.modifyModels) return;
|
|
150
|
+
const models = [
|
|
151
|
+
createModel({
|
|
152
|
+
id: "claude-3.5-sonnet",
|
|
153
|
+
provider: "github-copilot",
|
|
154
|
+
baseUrl: "https://api.default.com",
|
|
155
|
+
}),
|
|
156
|
+
];
|
|
157
|
+
const credentials: OAuthCredentials = {
|
|
158
|
+
access: "tid=123;exp=1234567890;proxy-ep=proxy.individual.githubcopilot.com;",
|
|
159
|
+
refresh: "test-refresh",
|
|
160
|
+
expires: Date.now() + 3600000,
|
|
161
|
+
};
|
|
162
|
+
const result = githubCopilotOAuthProvider.modifyModels(models, credentials);
|
|
163
|
+
assert.equal(result[0].baseUrl, "https://api.individual.githubcopilot.com");
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
test("modifyModels applies model limits when available", () => {
|
|
167
|
+
if (!githubCopilotOAuthProvider.modifyModels) return;
|
|
168
|
+
const models = [
|
|
169
|
+
createModel({
|
|
170
|
+
id: "claude-3.5-sonnet",
|
|
171
|
+
provider: "github-copilot",
|
|
172
|
+
baseUrl: "https://api.default.com",
|
|
173
|
+
}),
|
|
174
|
+
];
|
|
175
|
+
const credentials = {
|
|
176
|
+
access: "test-token",
|
|
177
|
+
refresh: "test-refresh",
|
|
178
|
+
expires: Date.now() + 3600000,
|
|
179
|
+
modelLimits: {
|
|
180
|
+
"claude-3.5-sonnet": { contextWindow: 123456, maxTokens: 4096 },
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
const result = githubCopilotOAuthProvider.modifyModels(models, credentials);
|
|
184
|
+
assert.equal(result[0].contextWindow, 123456);
|
|
185
|
+
assert.equal(result[0].maxTokens, 4096);
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
describe("GitHub Copilot OAuth — credential regression", () => {
|
|
190
|
+
test("module imports successfully", () => {
|
|
191
|
+
assert.ok(githubCopilotOAuthProvider);
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
test("CLIENT_ID is plaintext (not base64)", () => {
|
|
195
|
+
const content = readSourceFile("github-copilot.ts");
|
|
196
|
+
assert.ok(content.includes('CLIENT_ID = "Iv1.b507a08c87ecfe98"'));
|
|
197
|
+
assert.ok(!content.includes("atob("));
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
test("security explanation comments are present", () => {
|
|
201
|
+
const content = readSourceFile("github-copilot.ts");
|
|
202
|
+
assert.ok(content.includes("NOTE: This credential is public"));
|
|
203
|
+
assert.ok(content.includes("obfuscated") || content.includes("security scanners"));
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
|
|
33
207
|
test("githubCopilotOAuthProvider.modifyModels filters unavailable copilot models (#3849)", () => {
|
|
34
208
|
const models = [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
209
|
+
createModel({ provider: "github-copilot", id: "gpt-5", name: "gpt-5", baseUrl: "github-copilot:" }),
|
|
210
|
+
createModel({ provider: "github-copilot", id: "claude-sonnet-4", name: "claude-sonnet-4", baseUrl: "github-copilot:" }),
|
|
211
|
+
createModel({ provider: "openai", id: "gpt-4.1", name: "gpt-4.1", baseUrl: "openai:" }),
|
|
38
212
|
];
|
|
39
213
|
|
|
40
214
|
assert.ok(githubCopilotOAuthProvider.modifyModels, "github copilot provider should expose modifyModels");
|
|
41
|
-
const modified = githubCopilotOAuthProvider.modifyModels(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
215
|
+
const modified = githubCopilotOAuthProvider.modifyModels(
|
|
216
|
+
models,
|
|
217
|
+
makeCredentials({
|
|
218
|
+
modelLimits: {
|
|
219
|
+
"gpt-5": { contextWindow: 256000, maxTokens: 32000 },
|
|
220
|
+
},
|
|
221
|
+
}),
|
|
222
|
+
);
|
|
46
223
|
|
|
47
224
|
assert.deepEqual(
|
|
48
225
|
modified.map((model) => `${model.provider}/${model.id}`),
|
|
@@ -58,8 +235,8 @@ test("githubCopilotOAuthProvider.modifyModels filters unavailable copilot models
|
|
|
58
235
|
|
|
59
236
|
test("githubCopilotOAuthProvider.modifyModels keeps all copilot models when limits are unavailable", () => {
|
|
60
237
|
const models = [
|
|
61
|
-
|
|
62
|
-
|
|
238
|
+
createModel({ provider: "github-copilot", id: "gpt-5", name: "gpt-5", baseUrl: "github-copilot:" }),
|
|
239
|
+
createModel({ provider: "github-copilot", id: "claude-sonnet-4", name: "claude-sonnet-4", baseUrl: "github-copilot:" }),
|
|
63
240
|
];
|
|
64
241
|
|
|
65
242
|
assert.ok(githubCopilotOAuthProvider.modifyModels, "github copilot provider should expose modifyModels");
|
|
@@ -12,8 +12,18 @@ type CopilotCredentials = OAuthCredentials & {
|
|
|
12
12
|
modelLimits?: Record<string, { contextWindow: number; maxTokens: number }>;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
// GitHub Copilot OAuth Client ID
|
|
16
|
+
//
|
|
17
|
+
// NOTE: This credential is public in the source code. It should NOT be
|
|
18
|
+
// obfuscated because security scanners flag obfuscated data as potentially
|
|
19
|
+
// malicious (see: https://socket.dev/npm/package/gsd-pi/alerts/2.70.1?alert_name=obfuscatedFile)
|
|
20
|
+
//
|
|
21
|
+
// GitHub's device flow for public clients (CLI/desktop apps) does not use
|
|
22
|
+
// a client secret - only the client ID is required. This is standard OAuth
|
|
23
|
+
// for public clients and is intentionally public.
|
|
24
|
+
//
|
|
25
|
+
// See: https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps
|
|
26
|
+
const CLIENT_ID = "Iv1.b507a08c87ecfe98";
|
|
17
27
|
|
|
18
28
|
const COPILOT_HEADERS = {
|
|
19
29
|
"User-Agent": "GitHubCopilotChat/0.35.0",
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { describe, test } from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import type { OAuthCredentials } from "./types.js";
|
|
7
|
+
import { antigravityOAuthProvider } from "./google-antigravity.js";
|
|
8
|
+
|
|
9
|
+
const __dirname = fileURLToPath(new URL(".", import.meta.url));
|
|
10
|
+
const packageRoot = join(__dirname, "..", "..", "..");
|
|
11
|
+
const sourceDir = existsSync(join(__dirname, "google-antigravity.ts"))
|
|
12
|
+
? __dirname
|
|
13
|
+
: join(packageRoot, "src", "utils", "oauth");
|
|
14
|
+
|
|
15
|
+
function readSourceFile(name: string): string {
|
|
16
|
+
return readFileSync(join(sourceDir, name), "utf-8");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
describe("Antigravity OAuth — provider structure", () => {
|
|
20
|
+
test("has correct id and name", () => {
|
|
21
|
+
assert.equal(antigravityOAuthProvider.id, "google-antigravity");
|
|
22
|
+
assert.equal(antigravityOAuthProvider.name, "Antigravity (Gemini 3, Claude, GPT-OSS)");
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test("uses callback server", () => {
|
|
26
|
+
assert.equal(antigravityOAuthProvider.usesCallbackServer, true);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test("has required methods", () => {
|
|
30
|
+
assert.equal(typeof antigravityOAuthProvider.login, "function");
|
|
31
|
+
assert.equal(typeof antigravityOAuthProvider.refreshToken, "function");
|
|
32
|
+
assert.equal(typeof antigravityOAuthProvider.getApiKey, "function");
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test("getApiKey returns JSON with token and projectId", () => {
|
|
36
|
+
const credentials: OAuthCredentials = {
|
|
37
|
+
access: "test-access-token",
|
|
38
|
+
refresh: "test-refresh-token",
|
|
39
|
+
expires: Date.now() + 3600000,
|
|
40
|
+
projectId: "test-project-123",
|
|
41
|
+
email: "test@example.com",
|
|
42
|
+
};
|
|
43
|
+
const apiKey = antigravityOAuthProvider.getApiKey(credentials);
|
|
44
|
+
assert.equal(typeof apiKey, "string");
|
|
45
|
+
const parsed = JSON.parse(apiKey);
|
|
46
|
+
assert.equal(parsed.token, "test-access-token");
|
|
47
|
+
assert.equal(parsed.projectId, "test-project-123");
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test("refreshToken throws when projectId is missing", async () => {
|
|
51
|
+
const credentials: OAuthCredentials = {
|
|
52
|
+
access: "test-access-token",
|
|
53
|
+
refresh: "test-refresh-token",
|
|
54
|
+
expires: Date.now() + 3600000,
|
|
55
|
+
};
|
|
56
|
+
await assert.rejects(
|
|
57
|
+
antigravityOAuthProvider.refreshToken(credentials),
|
|
58
|
+
/Antigravity credentials missing projectId/,
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
describe("Antigravity OAuth — credential regression", () => {
|
|
64
|
+
test("module imports successfully", () => {
|
|
65
|
+
assert.ok(antigravityOAuthProvider);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test("CLIENT_ID and CLIENT_SECRET are plaintext", () => {
|
|
69
|
+
const content = readSourceFile("google-antigravity.ts");
|
|
70
|
+
assert.ok(
|
|
71
|
+
content.includes(
|
|
72
|
+
'CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com"',
|
|
73
|
+
),
|
|
74
|
+
);
|
|
75
|
+
assert.ok(content.includes('CLIENT_SECRET = "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"'));
|
|
76
|
+
assert.ok(!content.includes("atob("));
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
test("security explanation comments are present", () => {
|
|
80
|
+
const content = readSourceFile("google-antigravity.ts");
|
|
81
|
+
assert.ok(content.includes("NOTE: These credentials are public"));
|
|
82
|
+
assert.ok(content.includes("obfuscated") || content.includes("security scanners"));
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -21,11 +21,21 @@ type AntigravityCredentials = OAuthCredentials & {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
// Antigravity OAuth credentials (different from Gemini CLI)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
24
|
+
//
|
|
25
|
+
// NOTE: These credentials are public in the source code. They should NOT be
|
|
26
|
+
// obfuscated because security scanners flag obfuscated data as potentially
|
|
27
|
+
// malicious (see: https://socket.dev/npm/package/gsd-pi/alerts/2.70.1?alert_name=obfuscatedFile)
|
|
28
|
+
//
|
|
29
|
+
// Google's OAuth implementation requires client_secret for Desktop App OAuth
|
|
30
|
+
// clients even though it cannot be kept secret in distributed applications.
|
|
31
|
+
// The actual security relies on:
|
|
32
|
+
// - PKCE (Proof Key for Code Exchange) via code_verifier
|
|
33
|
+
// - Redirect URI validation (localhost only)
|
|
34
|
+
// - User consent and token scope limits
|
|
35
|
+
//
|
|
36
|
+
// See: https://developers.google.com/identity/protocols/oauth2/native-app
|
|
37
|
+
const CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com";
|
|
38
|
+
const CLIENT_SECRET = "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";
|
|
29
39
|
const REDIRECT_URI = "http://localhost:51121/oauth-callback";
|
|
30
40
|
|
|
31
41
|
// Antigravity requires additional scopes
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { describe, test } from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import type { OAuthCredentials } from "./types.js";
|
|
7
|
+
import { geminiCliOAuthProvider } from "./google-gemini-cli.js";
|
|
8
|
+
|
|
9
|
+
const __dirname = fileURLToPath(new URL(".", import.meta.url));
|
|
10
|
+
const packageRoot = join(__dirname, "..", "..", "..");
|
|
11
|
+
const sourceDir = existsSync(join(__dirname, "google-gemini-cli.ts"))
|
|
12
|
+
? __dirname
|
|
13
|
+
: join(packageRoot, "src", "utils", "oauth");
|
|
14
|
+
|
|
15
|
+
function readSourceFile(name: string): string {
|
|
16
|
+
return readFileSync(join(sourceDir, name), "utf-8");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
describe("Gemini CLI OAuth — provider structure", () => {
|
|
20
|
+
test("has correct id and name", () => {
|
|
21
|
+
assert.equal(geminiCliOAuthProvider.id, "google-gemini-cli");
|
|
22
|
+
assert.equal(geminiCliOAuthProvider.name, "Google Cloud Code Assist (Gemini CLI)");
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test("uses callback server", () => {
|
|
26
|
+
assert.equal(geminiCliOAuthProvider.usesCallbackServer, true);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test("has required methods", () => {
|
|
30
|
+
assert.equal(typeof geminiCliOAuthProvider.login, "function");
|
|
31
|
+
assert.equal(typeof geminiCliOAuthProvider.refreshToken, "function");
|
|
32
|
+
assert.equal(typeof geminiCliOAuthProvider.getApiKey, "function");
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test("getApiKey returns JSON with token and projectId", () => {
|
|
36
|
+
const credentials: OAuthCredentials = {
|
|
37
|
+
access: "test-access-token",
|
|
38
|
+
refresh: "test-refresh-token",
|
|
39
|
+
expires: Date.now() + 3600000,
|
|
40
|
+
projectId: "test-project-456",
|
|
41
|
+
email: "test@example.com",
|
|
42
|
+
};
|
|
43
|
+
const apiKey = geminiCliOAuthProvider.getApiKey(credentials);
|
|
44
|
+
assert.equal(typeof apiKey, "string");
|
|
45
|
+
const parsed = JSON.parse(apiKey);
|
|
46
|
+
assert.equal(parsed.token, "test-access-token");
|
|
47
|
+
assert.equal(parsed.projectId, "test-project-456");
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test("refreshToken throws when projectId is missing", async () => {
|
|
51
|
+
const credentials: OAuthCredentials = {
|
|
52
|
+
access: "test-access-token",
|
|
53
|
+
refresh: "test-refresh-token",
|
|
54
|
+
expires: Date.now() + 3600000,
|
|
55
|
+
};
|
|
56
|
+
await assert.rejects(
|
|
57
|
+
geminiCliOAuthProvider.refreshToken(credentials),
|
|
58
|
+
/Google Cloud credentials missing projectId/,
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
describe("Gemini CLI OAuth — credential regression", () => {
|
|
64
|
+
test("module imports successfully", () => {
|
|
65
|
+
assert.ok(geminiCliOAuthProvider);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test("CLIENT_ID and CLIENT_SECRET are plaintext", () => {
|
|
69
|
+
const content = readSourceFile("google-gemini-cli.ts");
|
|
70
|
+
assert.ok(
|
|
71
|
+
content.includes(
|
|
72
|
+
'CLIENT_ID = "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com"',
|
|
73
|
+
),
|
|
74
|
+
);
|
|
75
|
+
assert.ok(content.includes('CLIENT_SECRET = "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"'));
|
|
76
|
+
assert.ok(!content.includes("atob("));
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
test("security explanation comments are present", () => {
|
|
80
|
+
const content = readSourceFile("google-gemini-cli.ts");
|
|
81
|
+
assert.ok(content.includes("NOTE: These credentials are public"));
|
|
82
|
+
assert.ok(content.includes("obfuscated") || content.includes("security scanners"));
|
|
83
|
+
});
|
|
84
|
+
});
|