Commit graph

526 commits

Author SHA1 Message Date
mastertyko
d2ed5a91a6 fix(pi-coding-agent): match renderable tools case-insensitively 2026-04-12 14:05:30 +02:00
Jeremy
4b69e44a42 merge: resolve upstream/main conflicts for PR #3177 2026-04-11 22:59:58 -05:00
Jeremy McSpadden
56ee5616a5 Merge pull request #3984 from mastertyko/fix/3973-mcp-inline-db-open
fix(mcp-server): open the DB for inline workflow tools
2026-04-11 22:52:52 -05:00
github-actions[bot]
cf6f0613dd release: v2.71.0 2026-04-11 23:19:57 +00:00
Jeremy
b488961609 fix(tui): clear pinned output on message_end to prevent duplicate display
The pinned "Latest Output" zone was only cleared at agent_end, but during
flows with form elicitation (e.g. discuss-phase), there is a gap between
message_end and agent_end where the agent waits for user input. During this
gap, the same content was visible in both the chat history and the pinned
zone. Clear the pinned zone at message_end when the assistant message is
finalized in the chat container.
2026-04-11 17:41:50 -05:00
Jeremy
5531538e0d fix(tui): clear pinned latest output on turn completion 2026-04-11 16:58:48 -05:00
Git-Scram
1d1e47e78b fix(tui): restore pinned output above editor during tool execution
Restores the pinned assistant output zone that shows the latest narration
during tool execution. Adds markdown rendering, animated spinner, height
capping to prevent render flashing, and session rebuild support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 15:53:29 -04:00
Jeremy
2d531720f7 fix(tui): mask secure extension input values in interactive mode 2026-04-11 13:28:17 -05:00
Jeremy
bf4bcfadde fix(claude-code): harden MCP elicitation schema handling 2026-04-11 13:26:24 -05:00
Jeremy
1495e711e1 fix(claude-code): accept secure_env_collect MCP elicitation forms 2026-04-11 13:18:27 -05:00
Jeremy
74fee9ed48 fix(interactive): keep MCP tool output ordered and restore secure prompt fallback 2026-04-11 12:47:41 -05:00
Jeremy
ea506f66c8 feat(mcp-server): add secure_env_collect tool via MCP form elicitation
Exposes secure_env_collect as an MCP tool so any MCP client (Claude Code,
Cursor, etc.) can collect secrets through form-based input. Values are
written directly to .env/Vercel/Convex and never appear in LLM context —
only key names and applied/skipped status are returned.

- New env-writer.ts with writeEnvKey, detectDestination, checkExistingEnvKeys, applySecrets
- Uses server.server.elicitInput() to present form fields to the MCP client
- Pre-checks existing keys to skip already-set env vars
- Auto-detects destination from project files (vercel.json, convex/ dir)
- 27 tests covering utilities and tool integration

Closes #3975
2026-04-11 11:51:43 -05:00
Jeremy McSpadden
5d48038816 Merge pull request #3992 from jeremymcs/fix/mcp-output-stream-order
fix(interactive): preserve MCP tool output stream ordering
2026-04-11 11:46:23 -05:00
Jeremy
ba6c1f5d7e test(interactive): cover MCP tool output ordering in chat controller 2026-04-11 11:32:28 -05:00
Jeremy
58d729894e fix(interactive): preserve MCP tool output stream ordering 2026-04-11 11:26:08 -05:00
mastertyko
4ad2379dc5 fix(mcp-server): open the DB for inline workflow tools 2026-04-11 17:44:17 +02:00
github-actions[bot]
26696be2fa release: v2.70.1 2026-04-11 04:22:31 +00:00
Jeremy McSpadden
19cbb17683 Merge pull request #3961 from jeremymcs/fix/windows-portability-sweep
fix: harden Windows portability across runtime and tooling
2026-04-10 21:53:10 -05:00
Jeremy
61204ce771 fix(windows): harden portability across runtime and tooling 2026-04-10 20:33:18 -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
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
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
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
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
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
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
github-actions[bot]
61ea410e33 release: v2.68.1 2026-04-10 15:59:03 +00:00
github-actions[bot]
80a2b99d83 release: v2.68.0 2026-04-10 13:53:47 +00:00
Jeremy McSpadden
da352847e2 Merge pull request #2281 from jeremymcs/worktree-local-commands-stay-local
feat: contextual tips
2026-04-10 07:38:18 -05:00
Jeremy
ac1a51ef55 fix: Claude Code MCP tool output rendering and real-time streaming
- Stream tool results in real-time during Claude Code SDK sessions
  instead of deferring until session end. Tool calls (read, bash, write,
  etc.) now show their output as they complete, not collapsed as "..."

- Stop suppressing toolcall_start/delta/end events from stream adapter
  so the TUI can render tool call progress during streaming

- On SDK turn boundary (user message with tool results), push synthetic
  toolcall_end events with externalResult attached for immediate rendering

- Chat controller checks for externalResult on toolcall_end message
  updates and calls updateResult on pending ToolExecutionComponents

- Fix case-sensitive tool name matching (Read vs read, Bash vs bash)
  in TUI ToolExecutionComponent rendering

- Auto-discover and pass GSD_WORKFLOW_EXECUTORS_MODULE and
  GSD_WORKFLOW_WRITE_GATE_MODULE env vars in MCP server launch config

- Add /gsd mcp init command and auto-bootstrap .mcp.json for Claude
  Code provider during auto-start

- Add tool_execution_update event type for web UI streaming updates

- Add setStderrLoggingEnabled toggle for workflow logger
2026-04-10 06:12:44 -05:00
Jeremy McSpadden
0c37a88024 Merge pull request #3905 from jeremymcs/fix/workflow-mcp-auto-discovery
Fix workflow MCP auto-discovery for Claude Code auto-mode
2026-04-09 19:01:52 -05:00
Jeremy
c6ff8b026d Fix MCP server packaging in clean builds 2026-04-09 18:00:24 -05:00
Jeremy McSpadden
6c708f7795 Merge pull request #3890 from jeremymcs/feat/workflow-mcp-provider-parity
feat: expose GSD workflow tools over MCP for provider parity
2026-04-09 15:09:55 -05:00
Jeremy
20cbc1ed37 fix(gsd): enforce workflow write gates over MCP 2026-04-09 14:42:38 -05:00
Jeremy
c297559211 fix(mcp): harden workflow tool boundary 2026-04-09 14:29:15 -05:00
Jeremy
d667d7565c fix(gsd): serialize workflow MCP execution state 2026-04-09 12:45:34 -05:00
Jeremy
60a5bf6ace chore: harden workflow MCP executor loading 2026-04-09 12:11:59 -05:00
Jeremy
d116cff601 feat: expose slice replanning over workflow MCP 2026-04-09 12:08:42 -05:00
Jeremy
70458467ff feat: expose milestone workflow tools over MCP 2026-04-09 12:04:07 -05:00
Jeremy
af24dcb3c3 feat: expose slice completion over workflow MCP 2026-04-09 11:53:28 -05:00