@leo000001/claude-code-mcp 2.0.0 → 2.0.3

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/CHANGELOG.md CHANGED
@@ -1,82 +1,96 @@
1
- # Changelog
2
-
3
- ## Unreleased
4
-
5
- ### Breaking Changes
6
- - `claude_code` and `claude_code_reply` now start asynchronously and return `{ sessionId, status: "running", pollInterval }`. Use `claude_code_check` to poll events and fetch the final `result`.
7
- - Removed tool: `claude_code_configure`
8
- - New tool: `claude_code_check` (poll + respond_permission)
9
- - **Parameter nesting refactor**: low-frequency parameters have been folded into nested objects to reduce top-level clutter. This is a breaking change for callers that pass these parameters at the top level:
10
- - `claude_code`: 22 low-frequency params moved into `advanced` object (e.g. `effort` `advanced.effort`, `tools` `advanced.tools`, `agents` `advanced.agents`, `env` `advanced.env`)
11
- - `claude_code_reply`: 28 disk-resume params moved into `diskResumeConfig` object (e.g. `resumeToken` → `diskResumeConfig.resumeToken`, `cwd` → `diskResumeConfig.cwd`)
12
- - `claude_code_check`: 9 poll control params moved into `pollOptions` object (e.g. `includeTools` → `pollOptions.includeTools`); 2 permission response params moved into `permissionOptions` object (e.g. `updatedInput` → `permissionOptions.updatedInput`)
13
-
14
- ### Features
15
- - New module: `src/tools/query-consumer.ts` — shared background query consumer (`consumeQuery`) for start, resume, and disk-resume code paths
16
- - New module: `src/tools/tool-discovery.ts` — runtime tool discovery with `TOOL_CATALOG`, `ToolDiscoveryCache`, and dynamic `claude_code` description generation
17
- - New module: `src/utils/build-options.ts` — centralized SDK `Partial<Options>` construction from flat input objects
18
- - New module: `src/utils/race-with-abort.ts` — race a promise against an AbortSignal with cleanup
19
- - New module: `src/utils/resume-token.ts` — HMAC-SHA256 resume token generation/validation for secure disk resume
20
-
21
- ### Improvements
22
- - `claude_code_check`: default `responseMode="minimal"` to reduce payload size; supports `maxEvents` pagination with `truncated`/`truncatedFields`
23
- - `claude_code_check`: minimal mode now slims assistant message events (strips `usage`, `model`, `id`, `cache_control` from content blocks)
24
- - `claude_code_check`: minimal mode filters out noisy progress events (`tool_progress`, `auth_status`); use `includeProgressEvents: true` to restore
25
- - `claude_code_check`: minimal mode omits `lastEventId`/`lastToolUseId` from top-level response and `durationApiMs`/`sessionTotalTurns`/`sessionTotalCostUsd` from AgentResult
26
- - `claude_code_check`: includes lightweight session diagnostics (`cancelledAt`/`cancelledReason`/`cancelledSource`, `lastEventId`, `lastToolUseId`)
27
- - Disk resume security: disk resume fallback requires `CLAUDE_CODE_MCP_RESUME_SECRET` + `resumeToken`
28
-
29
- ## 1.6.0 (2026-02-12)
30
-
31
- ### Bug Fixes
32
- - Windows: fixed Git Bash auto-detection path derivation and improved candidate search
33
-
34
- ### Security
35
- - `claude_code_session includeSensitive=true` no longer leaks extra fields (e.g. `env`, `debugFile`, `mcpServers`, `sandbox`) beyond the documented sensitive set
36
-
37
- ### Documentation
38
- - README: clarify `Task` is required for subagent invocation and how `allowedTools` interacts with `mcpServers`
39
- - README: clarify `includePartialMessages` is not streamed over MCP responses
40
-
41
- ## 1.4.0 (2026-02-11)
42
-
43
- ### Features
44
- - New tool: `claude_code_configure` for runtime bypass mode management (enable/disable without restart)
45
- - New parameters for `claude_code`: `additionalDirectories`, `outputFormat`, `thinking`, `tools`, `timeout`
46
- - New parameters for `claude_code` and `claude_code_reply`: `pathToClaudeCodeExecutable`, `agent`, `mcpServers`, `sandbox`, `fallbackModel`, `enableFileCheckpointing`, `includePartialMessages`, `strictMcpConfig`, `settingSources`, `debug`, `debugFile`, `env`
47
- - Effort level now supports `"max"` in addition to low/medium/high
48
- - `AgentResult` now includes `structuredOutput`, `stopReason`, `errorSubtype`, `usage`, `modelUsage`, `permissionDenials`
49
-
50
- ### Improvements
51
- - README: Added Prerequisites section clarifying Claude Code CLI dependency
52
- - README/DESIGN.md: Updated parameter tables to include all supported parameters
53
- - DESIGN.md: Updated to reflect 4-tool architecture and current security model
54
- - SECURITY.md: Fixed inaccurate references to system CLI and env vars
55
- - Moved `clearTimeout` into `finally` blocks for safer resource cleanup
56
- - Added `break` after result processing in `claude_code_reply` for consistency
57
-
58
- ### Bug Fixes
59
- - Fixed `claude_code_reply` not passing `cwd`/`permissionMode`/`allowDangerouslySkipPermissions` to SDK
60
- - Fixed falsy filtering dropping valid values like empty arrays and zero
61
- - Removed unsafe `as any` type assertions where possible
62
- - Fixed fork overwriting original session status (now restores pre-fork status)
63
- - Fixed `cancel()` allowing cancellation of non-running sessions
64
- - Fixed `destroy()` clearing session map while in-flight operations still reference sessions
65
- - Improved abort detection using SDK's `AbortError` class
66
- - Added session overwrite guard in `create()`
67
- - Added `lastActiveAt` update when aborting stuck sessions in cleanup
68
-
69
- ## 1.0.0 (2026-02-11)
70
-
71
- ### Features
72
- - Initial release
73
- - 3 MCP tools: `claude_code`, `claude_code_reply`, `claude_code_session`
74
- - Session management with resume and fork support
75
- - Fine-grained permission control (default, acceptEdits, bypassPermissions, plan, delegate, dontAsk)
76
- - Custom subagent definitions
77
- - Effort level control (low, medium, high)
78
- - Beta features support (e.g., 1M context window)
79
- - Cost and turn tracking per session
80
- - Session cancellation via AbortController
81
- - Auto-cleanup for idle (30min) and stuck running (4h) sessions
82
- - Security: bypassPermissions disabled by default
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ### Breaking Changes
6
+
7
+ - `claude_code` and `claude_code_reply` now start asynchronously and return `{ sessionId, status: "running", pollInterval }`. Use `claude_code_check` to poll events and fetch the final `result`.
8
+ - Removed tool: `claude_code_configure`
9
+ - New tool: `claude_code_check` (poll + respond_permission)
10
+ - **Parameter nesting refactor**: low-frequency parameters have been folded into nested objects to reduce top-level clutter. This is a breaking change for callers that pass these parameters at the top level:
11
+ - `claude_code`: 22 low-frequency params moved into `advanced` object (e.g. `effort` → `advanced.effort`, `tools` → `advanced.tools`, `agents` → `advanced.agents`, `env` → `advanced.env`)
12
+ - `claude_code_reply`: 28 disk-resume params moved into `diskResumeConfig` object (e.g. `resumeToken` → `diskResumeConfig.resumeToken`, `cwd` → `diskResumeConfig.cwd`)
13
+ - `claude_code_check`: 9 poll control params moved into `pollOptions` object (e.g. `includeTools` → `pollOptions.includeTools`); 2 permission response params moved into `permissionOptions` object (e.g. `updatedInput` → `permissionOptions.updatedInput`)
14
+ - Schema descriptions for nested object fields have been compacted (self-explanatory fields no longer carry `.describe()` text; object-level descriptions enhanced as summaries) to reduce token overhead for calling models
15
+
16
+ ### Features
17
+
18
+ - New module: `src/tools/query-consumer.ts` — shared background query consumer (`consumeQuery`) for start, resume, and disk-resume code paths
19
+ - New module: `src/tools/tool-discovery.ts` — runtime tool discovery with `TOOL_CATALOG`, `ToolDiscoveryCache`, and dynamic `claude_code` description generation
20
+ - New module: `src/utils/build-options.ts` — centralized SDK `Partial<Options>` construction from flat input objects
21
+ - New module: `src/utils/race-with-abort.ts` — race a promise against an AbortSignal with cleanup
22
+ - New module: `src/utils/resume-token.ts` HMAC-SHA256 resume token generation/validation for secure disk resume
23
+
24
+ ### Improvements
25
+
26
+ - `claude_code_check`: default `responseMode="minimal"` to reduce payload size; supports `maxEvents` pagination with `truncated`/`truncatedFields`
27
+ - `claude_code_check`: minimal mode now slims assistant message events (strips `usage`, `model`, `id`, `cache_control` from content blocks)
28
+ - `claude_code_check`: minimal mode filters out noisy progress events (`tool_progress`, `auth_status`); use `includeProgressEvents: true` to restore
29
+ - `claude_code_check`: minimal mode omits `lastEventId`/`lastToolUseId` from top-level response and `durationApiMs`/`sessionTotalTurns`/`sessionTotalCostUsd` from AgentResult
30
+ - `claude_code_check`: includes lightweight session diagnostics (`cancelledAt`/`cancelledReason`/`cancelledSource`, `lastEventId`, `lastToolUseId`)
31
+ - `claude_code_check`: permission actions now include `timeoutMs`, `expiresAt`, and best-effort `remainingMs`
32
+ - Permission result events now include `toolName`, and denial details (`message`, `interrupt`) when applicable
33
+ - Disk resume security: disk resume fallback requires `CLAUDE_CODE_MCP_RESUME_SECRET` + `resumeToken`
34
+ - MCP resources: server info, internal tool catalog, and gotchas
35
+
36
+ ## 1.6.0 (2026-02-12)
37
+
38
+ ### Bug Fixes
39
+
40
+ - Windows: fixed Git Bash auto-detection path derivation and improved candidate search
41
+
42
+ ### Security
43
+
44
+ - `claude_code_session includeSensitive=true` no longer leaks extra fields (e.g. `env`, `debugFile`, `mcpServers`, `sandbox`) beyond the documented sensitive set
45
+
46
+ ### Documentation
47
+
48
+ - README: clarify `Task` is required for subagent invocation and how `allowedTools` interacts with `mcpServers`
49
+ - README: clarify `includePartialMessages` is not streamed over MCP responses
50
+
51
+ ## 1.4.0 (2026-02-11)
52
+
53
+ ### Features
54
+
55
+ - New tool: `claude_code_configure` for runtime bypass mode management (enable/disable without restart)
56
+ - New parameters for `claude_code`: `additionalDirectories`, `outputFormat`, `thinking`, `tools`, `timeout`
57
+ - New parameters for `claude_code` and `claude_code_reply`: `pathToClaudeCodeExecutable`, `agent`, `mcpServers`, `sandbox`, `fallbackModel`, `enableFileCheckpointing`, `includePartialMessages`, `strictMcpConfig`, `settingSources`, `debug`, `debugFile`, `env`
58
+ - Effort level now supports `"max"` in addition to low/medium/high
59
+ - `AgentResult` now includes `structuredOutput`, `stopReason`, `errorSubtype`, `usage`, `modelUsage`, `permissionDenials`
60
+
61
+ ### Improvements
62
+
63
+ - README: Added Prerequisites section clarifying Claude Code CLI dependency
64
+ - README/DESIGN.md: Updated parameter tables to include all supported parameters
65
+ - DESIGN.md: Updated to reflect 4-tool architecture and current security model
66
+ - SECURITY.md: Fixed inaccurate references to system CLI and env vars
67
+ - Moved `clearTimeout` into `finally` blocks for safer resource cleanup
68
+ - Added `break` after result processing in `claude_code_reply` for consistency
69
+
70
+ ### Bug Fixes
71
+
72
+ - Fixed `claude_code_reply` not passing `cwd`/`permissionMode`/`allowDangerouslySkipPermissions` to SDK
73
+ - Fixed falsy filtering dropping valid values like empty arrays and zero
74
+ - Removed unsafe `as any` type assertions where possible
75
+ - Fixed fork overwriting original session status (now restores pre-fork status)
76
+ - Fixed `cancel()` allowing cancellation of non-running sessions
77
+ - Fixed `destroy()` clearing session map while in-flight operations still reference sessions
78
+ - Improved abort detection using SDK's `AbortError` class
79
+ - Added session overwrite guard in `create()`
80
+ - Added `lastActiveAt` update when aborting stuck sessions in cleanup
81
+
82
+ ## 1.0.0 (2026-02-11)
83
+
84
+ ### Features
85
+
86
+ - Initial release
87
+ - 3 MCP tools: `claude_code`, `claude_code_reply`, `claude_code_session`
88
+ - Session management with resume and fork support
89
+ - Fine-grained permission control (default, acceptEdits, bypassPermissions, plan, delegate, dontAsk)
90
+ - Custom subagent definitions
91
+ - Effort level control (low, medium, high)
92
+ - Beta features support (e.g., 1M context window)
93
+ - Cost and turn tracking per session
94
+ - Session cancellation via AbortController
95
+ - Auto-cleanup for idle (30min) and stuck running (4h) sessions
96
+ - Security: bypassPermissions disabled by default