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