Commit graph

3535 commits

Author SHA1 Message Date
Jeremy
7b2601e6a0 fix(auto): resolve resource-loader.js from GSD_PKG_ROOT on resume (#3949)
Auto-mode resume crashed with "Cannot find module" because the relative
import ../../../resource-loader.js only works from the source tree, not
from the deployed path at ~/.gsd/agent/extensions/gsd/auto.js.

Expose GSD_PKG_ROOT from loader.ts and use it in auto.ts to construct
an absolute path to dist/resource-loader.js that works in both contexts.
2026-04-10 20:00:46 -05:00
Jeremy McSpadden
9a7453fae8 Merge pull request #3957 from jeremymcs/fix/mcp-importLocalModule-paths
fix(mcp-server): importLocalModule resolves src/ paths from dist/ context
2026-04-10 19:54:00 -05:00
Jeremy McSpadden
37fa5168a9 Merge pull request #3956 from jeremymcs/fix/claude-code-structured-questions-fallback
[codex] fix Claude Code discuss structured-question fallback
2026-04-10 19:44:45 -05:00
Jeremy
67767c2527 test(mcp-server): add regression tests for importLocalModule candidate resolution
Extracts _buildImportCandidates() as a testable export and adds 5 tests
verifying src/<->dist/ path swapping and .ts extension fallback logic.

Refs #3954
2026-04-10 19:33:00 -05:00
Jeremy
3c6093cf37 test remove secret-like onboarding fixture 2026-04-10 19:30:38 -05:00
Jeremy
d64056f833 fix claude code mcp elicitation bridge 2026-04-10 19:24:51 -05:00
Jeremy
ad8405c372 fix(mcp-server): importLocalModule resolves src/ paths from dist/ context
importLocalModule() resolved paths relative to import.meta.url. When
running from dist/, paths like ../../../src/.../foo.js pointed to source
where no .js files exist. Now tries src/<->dist/ swap and .ts fallback
so the same code works in both dev (tsx) and prod (compiled) contexts.

Also adds dist/ candidates to write-gate and workflow-executor lookups.

Fixes #3954
2026-04-10 19:22:52 -05:00
Jeremy
5a940856c1 fix claude-code discuss question fallback 2026-04-10 19:12:45 -05:00
mastertyko
07da34dadb fix(gsd): surface scoped doctor health warnings 2026-04-11 01:49:05 +02:00
github-actions[bot]
4b671fba0f release: v2.70.0 2026-04-10 23:12:12 +00:00
Jeremy McSpadden
afe0574a23 Merge pull request #3953 from jeremymcs/fix/remove-anthropic-oauth 2026-04-10 17:52:59 -05:00
Jeremy McSpadden
da7e78ce9e Merge pull request #3951 from jeremymcs/fix/mcp-server-credential-hydration 2026-04-10 17:52:40 -05:00
Jeremy
7ee1fa0c46 fix(pi-ai): remove Anthropic OAuth flow for TOS compliance
Delete the Anthropic OAuth module, remove it from the built-in provider
registry, strip the OAuth client branch from the Anthropic streaming
provider, and replace the daemon orchestrator's token refresh with a
simple ANTHROPIC_API_KEY requirement.

Anthropic access is now API key or local Claude Code CLI only.

Closes #3952
2026-04-10 17:33:34 -05:00
Jeremy
f350647863 fix(mcp-server): hydrate model credentials into env 2026-04-10 17:31:07 -05:00
Jeremy
f886cf01c2 fix(mcp-server): hydrate stored tool credentials on startup 2026-04-10 17:24:50 -05:00
Jeremy McSpadden
7a44ca7aed Merge pull request #3948 from jeremymcs/fix/cmux-auto-enable
fix(gsd): auto-enable cmux when detected
2026-04-10 17:16:46 -05:00
Jeremy McSpadden
0575d2cb58 Merge pull request #3946 from jeremymcs/feat/mcp-ask-user-questions-elicitation
feat(mcp-server): expose ask_user_questions via elicitation
2026-04-10 16:58:34 -05:00
Jeremy
6d1e7952a5 test(gsd): accept source workflow MCP module paths 2026-04-10 16:45:09 -05:00
mastertyko
c2de4eb17b fix(gsd): skip skipped slices in milestone prompts 2026-04-10 23:19:25 +02:00
mastertyko
357dd7fe8b fix(gsd): detect property-value JSON invocation errors 2026-04-10 23:19:23 +02:00
Jeremy
6c2964c502 test(mcp-server): cover ask_user_questions elicitation 2026-04-10 16:14:34 -05:00
Jeremy
28decda937 test(gsd): add regression tests for cmux auto-enable
Covers: successful auto-enable, missing prefs file fallback,
and preservation of existing cmux sub-preferences.
2026-04-10 16:12:35 -05:00
Jeremy
fffec6174a fix(gsd): auto-enable cmux when detected instead of prompting
When running inside a cmux terminal, GSD now automatically enables cmux
in project preferences instead of showing a manual enable prompt. Users
who explicitly disabled cmux (enabled: false) are still respected.

Closes gsd-build/gsd-2#3947
2026-04-10 15:46:36 -05:00
Jeremy
b3275a182d feat(mcp-server): expose ask_user_questions via elicitation 2026-04-10 15:44:08 -05:00
Jeremy McSpadden
c0f101a217 Merge pull request #3943 from Git-Scram/fix/mcp-windows-drive-letter-regex
fix(mcp-server): URL scheme regex matches Windows drive letters
2026-04-10 15:17:59 -05:00
github-actions[bot]
00107d2775 release: v2.69.0 2026-04-10 20:00:49 +00:00
jeremymcs
9b853ce960 fix(mcp-server): URL scheme regex no longer matches Windows drive letters
Change /^[a-z]+:/i to /^[a-z]{2,}:/i in getWriteGateModuleCandidates()
and getWorkflowExecutorModuleCandidates() so single-letter drive prefixes
(C:, D:) are not rejected as URL schemes. All IANA-registered schemes are
2+ characters, so this is a safe narrowing.

Adds regression tests for the regex fix.

Fixes #3942
2026-04-10 15:20:39 -04:00
Jeremy McSpadden
4e84196bdb Merge pull request #3941 from jeremymcs/fix/codebase-generator-excludes
fix(gsd): add missing dirs to codebase generator exclude list
2026-04-10 14:17:44 -05:00
Jeremy
89bdc1e7f9 test(gsd): add regression test for .agents/ and tooling dir exclusion
Verifies that .agents/, .bg-shell/, .idea/, .cache/, tmp/, target/,
and venv/ are excluded from the codebase map during generation.
2026-04-10 13:46:53 -05:00
Jeremy
099a7723a3 fix(gsd): add missing directories to codebase generator exclude list
.agents/, .bg-shell/, .idea/, venv/, target/, .cache/, and tmp/ were
missing from DEFAULT_EXCLUDES. This caused /gsd-new-project to scan
skill and agent definition files as project code, confusing researcher
agents during project initialization.

Aligns the exclude list with the gitignore patterns in gitignore.ts.
2026-04-10 13:40:45 -05:00
Jeremy McSpadden
9b7f151964 Merge pull request #3937 from jeremymcs/feat/adr-005-implementation
feat(gsd): implement ADR-005 multi-model provider and tool strategy
2026-04-10 13:07:40 -05:00
Jeremy
2ad315b9fb fix(gsd): wire ADR-005 infrastructure into live paths
Addresses Codex adversarial review findings — the ADR-005 registries
and filters were built but not connected to the actual model selection
and provider adapter paths.

Fix 1+2: Tool filtering applied after model selection
- selectAndApplyModel() now calls adjustToolSet() after pi.setModel()
- Incompatible tools are removed via pi.setActiveTools()
- adjust_tool_set hook fires to allow extension overrides
- Verbose output reports filtered tools with provider context

Fix 3: ProviderSwitchReport wired through all 6 provider adapters
- New transformMessagesWithReport() convenience wrapper creates report,
  passes it to transformMessages(), and logs non-empty reports to stderr
  when GSD_VERBOSE=1 or PI_VERBOSE=1
- All adapters updated: anthropic, google, openai-responses,
  openai-completions, mistral, bedrock
2026-04-10 12:49:49 -05:00
Jeremy
b1c0dafc70 feat(gsd): implement ADR-005 multi-model provider and tool strategy
Implements all 4 phases of ADR-005 (issue #2790):

Phase 1: Provider Capabilities Registry
- Declarative ProviderCapabilities interface and PROVIDER_CAPABILITIES
  registry covering all 12 API providers
- Consolidates scattered *-shared.ts knowledge into queryable registry
- Unknown providers get permissive defaults (backward compatible)

Phase 2: Tool Compatibility Metadata
- ToolCompatibility interface (producesImages, schemaFeatures, minCapabilityTier)
- compatibility field on ToolDefinition
- Tool compatibility registry with pre-populated built-in tools
- Auto-registration from registerTool() and MCP tool defaults

Phase 3: Tool-Compat Filter + ProviderSwitchReport
- ProviderSwitchReport tracks thinking blocks dropped/downgraded,
  tool call IDs remapped, synthetic results inserted, thought
  signatures dropped during cross-provider message transformation
- isToolCompatibleWithProvider(), filterToolsForProvider(), adjustToolSet()
  functions in model router
- filteredTools field on RoutingDecision
- Verbose output for filtered tools in auto-model-selection

Phase 4: adjustToolSet Extension Hook
- AdjustToolSetEvent and AdjustToolSetResult interfaces
- emitAdjustToolSet() on ExtensionAPI and ExtensionRuntime
- Default no-op handler in register-hooks.ts

Includes 47 new tests (20 provider caps + 10 switch report + 17 tool compat)

Closes #2790
2026-04-10 12:33:40 -05:00
Jeremy McSpadden
9016ac362f Merge pull request #3936 from jeremymcs/feat/adr-004-complete
feat(gsd): complete ADR-004 capability-aware model routing
2026-04-10 12:24:26 -05:00
Jeremy
f96bc91014 feat(gsd): complete ADR-004 capability-aware model routing implementation
Close three remaining gaps from ADR-004:

1. Add modelOverrides to GSDPreferences type — removes unsafe type cast
   in auto-model-selection.ts, enables TypeScript validation for user
   capability override config.

2. Add profile completeness lint test — two tests in capability-router
   that fail if MODEL_CAPABILITY_TIER and MODEL_CAPABILITY_PROFILES
   drift out of sync (catches stale profiles on new model additions).

3. Add capability profiles for all 24 missing tier-mapped models — goes
   from 9 to 33 profiles, organized by provider. Values reflect each
   model family's known strengths (o-series high reasoning, nano/spark
   high speed, codex variants high coding).

Closes #2659
2026-04-10 12:10:29 -05:00
Jeremy McSpadden
750c5b7aeb Merge pull request #3935 from jeremymcs/fix/remove-broken-discuss-prepared
fix(gsd): remove broken discuss-prepared template, inject briefs into discuss.md
2026-04-10 12:07:31 -05:00
Jeremy
49ef77e40a fix(gsd): replace empty catch with logWarning for CI compliance 2026-04-10 11:50:46 -05:00
Jeremy
a9fc396043 fix(gsd): merge enhanced context sections into standard template, clean up stale gate patterns
- Add Architectural Decisions, Error Handling Strategy, Testing
  Requirements, and Acceptance Criteria sections to context.md so
  discussion investigation output persists for downstream phases
- Remove layer1-4 gate patterns from write-gate.ts (only depth_verification
  remains — the 4-layer gates were only in the deleted discuss-prepared.md)
- Update write-gate tests to use depth_verification fixtures

Follows up on #3934
2026-04-10 11:44:39 -05:00
Jeremy
cc5157e534 fix(gsd): remove broken discuss-prepared template, inject briefs into discuss.md
The discuss-prepared.md template (PR #3602) broke new project init by
presenting codebase analysis as scope recommendations before asking
the user what they want to build. On fresh projects it would invent
project scope from existing files instead of asking "What's the vision?"

- Delete discuss-prepared.md, context-enhanced.md, prompt-validation.ts
- Rewrite prepareAndBuildDiscussPrompt() to inject preparation briefs
  as supplementary context into the standard discuss.md template
- Add {{preparationContext}} placeholder to discuss.md
- Delete 5 test files that only tested removed code
- Keep preparation.ts engine intact — codebase analysis is useful
  background context, just shouldn't drive scope

Fixes #3934
2026-04-10 11:30:10 -05:00
github-actions[bot]
61ea410e33 release: v2.68.1 2026-04-10 15:59:03 +00:00
Jeremy McSpadden
65ecf669cc Merge pull request #3933 from jeremymcs/fix/broken-resource-loader-import
fix(gsd): resolve resource-loader import for deployed extensions
2026-04-10 10:39:30 -05:00
Jeremy
9d477b4a2e fix(ci): update FILE-SYSTEM-MAP.md path after docs reorganization
The docs reorg moved FILE-SYSTEM-MAP.md from docs/ to docs/dev/ but
pr-risk-check.mjs was not updated, causing the PR Risk Report CI job
to fail on every PR.
2026-04-10 10:26:33 -05:00
Jeremy
6d9f02054d fix(test): update discord invite test path after docs reorganization
The docs were moved from docs/what-is-pi/ to docs/dev/what-is-pi/ but
the test path was not updated, causing CI to fail with ENOENT.
2026-04-10 10:19:07 -05:00
Jeremy
41d4de1c32 test(gsd): add regression test for resource-loader import path
Verifies auto.ts does not use a relative import reaching above
extensions/ for resource-loader (breaks on deployment to ~/.gsd/).
Guards against regression of the fix for #3899.
2026-04-10 10:13:01 -05:00
Jeremy
02b905f3f5 fix(gsd): resolve resource-loader import for deployed extensions
The relative import `../../../resource-loader.js` in auto.ts works from
the source tree (src/resources/extensions/gsd/ → src/resource-loader.js)
but breaks when extensions are deployed to ~/.gsd/agent/extensions/gsd/
(resolves to ~/.gsd/resource-loader.js which doesn't exist).

Use createRequire to resolve the gsd-pi package root and import
dist/resource-loader.js from there, which works in both source and
deployed contexts.

Regression introduced in #3899 (9ed543f1c8).
2026-04-10 10:05:37 -05:00
Jeremy McSpadden
b87e5dc43c Merge pull request #3929 from jeremymcs/docs/update-readme-links
docs: update README links for docs reorganization
2026-04-10 09:47:00 -05:00
Jeremy
6b213f3901 docs: fix README accuracy — agents count, extension count, prefs, remove AGENTS.md ref 2026-04-10 09:37:56 -05:00
Jeremy
95b4b87503 docs: update README links for user-docs/dev paths, remove gsd.build reference 2026-04-10 09:33:14 -05:00
Jeremy McSpadden
804f1d4b94 Merge pull request #3928 from jeremymcs/docs/reorganize-folder-structure
docs: reorganize into user-docs/ and dev/ subdirectories
2026-04-10 09:26:39 -05:00
Jeremy McSpadden
754cc61dc1 Merge pull request #3927 from jeremymcs/main
docs: update README What's New for v2.68
2026-04-10 09:25:51 -05:00