singularity-forge/packages/mcp-server/src
Claude 1be15758ec fix(mcp): thread abort signals, restore tool fidelity, and fix subpath imports
Audit-driven fixes across the two MCP server surfaces and the Claude Code
streaming adapter:

- src/mcp-server.ts: propagate `extra.signal` into `tool.execute` so MCP
  clients can actually cancel long-running Bash/WebFetch/grep calls, and
  route the remaining `/server` subpath import through `createRequire`
  for #3603 consistency.
- src/tests/mcp-createRequire.test.ts: extend regression coverage to the
  `/server` subpath.
- claude-code-cli/stream-adapter.ts: (a) classify aborts as `aborted`
  instead of the retry-eligible `stream_exhausted_without_result`,
  (b) merge final-turn toolCall blocks from the builder into the
  AssistantMessage via the new `mergePendingToolCalls` helper so a turn
  ending in `tool_use` stop_reason no longer drops its tool calls, and
  (c) resolve the SDK permission mode via `resolveClaudePermissionMode`
  (auto-mode → bypass, interactive → acceptEdits, env override).
- packages/mcp-server/src/server.ts: make `gsd_query` actually respect
  its `query` argument with known categories + forward-compatible
  fallback, and thread `extra.signal` into `gsd_execute` so an aborted
  RPC request cancels the newly-created session instead of leaking a
  background RpcClient process.
- stream-adapter test suite: add regression tests for abort
  classification, final-turn tool-call merging, and permission mode
  resolution.

Verified via: mcp-createRequire, stream-adapter (27), partial-builder,
mcp-server package (31), workflow-tools (13) — 83 tests green.

https://claude.ai/code/session_0174sYny3VvdwYTdCNTmY4Do
2026-04-12 20:04:47 -05:00
..
readers feat(mcp-server): add 6 read-only tools for project state queries (#3515) 2026-04-04 16:41:24 -05:00
cli.ts fix(mcp-server): hydrate model credentials into env 2026-04-10 17:31:07 -05:00
env-writer.test.ts feat(mcp-server): add secure_env_collect tool via MCP form elicitation 2026-04-11 11:51:43 -05:00
env-writer.ts feat(mcp-server): add secure_env_collect tool via MCP form elicitation 2026-04-11 11:51:43 -05:00
import-candidates.test.ts test(mcp-server): add regression tests for importLocalModule candidate resolution 2026-04-10 19:33:00 -05:00
index.ts feat(mcp-server): add 6 read-only tools for project state queries (#3515) 2026-04-04 16:41:24 -05:00
mcp-server.test.ts feat(mcp-server): expose ask_user_questions via elicitation 2026-04-10 15:44:08 -05:00
secure-env-collect.test.ts feat(mcp-server): add secure_env_collect tool via MCP form elicitation 2026-04-11 11:51:43 -05:00
server.ts fix(mcp): thread abort signals, restore tool fidelity, and fix subpath imports 2026-04-12 20:04:47 -05:00
session-manager.ts feat: Headless Integration Hardening & Release (M002) (#2811) 2026-03-26 23:33:22 -06:00
tool-credentials.test.ts fix(mcp-server): hydrate model credentials into env 2026-04-10 17:31:07 -05:00
tool-credentials.ts fix(mcp-server): hydrate model credentials into env 2026-04-10 17:31:07 -05:00
types.ts feat: Headless Integration Hardening & Release (M002) (#2811) 2026-03-26 23:33:22 -06:00
workflow-tools.test.ts fix(mcp-server): open the DB for inline workflow tools 2026-04-11 17:44:17 +02:00
workflow-tools.ts fix(mcp-server): open the DB for inline workflow tools 2026-04-11 17:44:17 +02:00