@leo000001/claude-code-mcp 2.4.0 → 2.4.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 +2 -1
- package/README.md +53 -57
- package/dist/index.js +6 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
- Add configurable event-buffer limits via `CLAUDE_CODE_MCP_EVENT_BUFFER_MAX_SIZE` and `CLAUDE_CODE_MCP_EVENT_BUFFER_HARD_MAX_SIZE`.
|
|
15
15
|
- Runtime tool-discovery updates now notify both tools and resources (internal-tools resource change notification).
|
|
16
16
|
- Enrich compatibility resources with package version, disk-resume diagnostics, and runtime limits.
|
|
17
|
+
- Remove deprecated `claude_code` parameter aliases: top-level `sessionInitTimeoutMs` and `advanced.effort` / `advanced.thinking`.
|
|
17
18
|
|
|
18
19
|
### Documentation
|
|
19
20
|
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
- New tool: `claude_code_check` (poll + respond_permission)
|
|
89
90
|
- Legacy `bypassPermissions` mode is no longer exposed in MCP schemas for 2.x.
|
|
90
91
|
- **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:
|
|
91
|
-
- `claude_code`: 22 low-frequency params moved into `advanced` object in 2.0.0 (
|
|
92
|
+
- `claude_code`: 22 low-frequency params moved into `advanced` object in 2.0.0 (including `advanced.effort` / `advanced.thinking`, later removed)
|
|
92
93
|
- `claude_code_reply`: 28 disk-resume params moved into `diskResumeConfig` object (e.g. `resumeToken` → `diskResumeConfig.resumeToken`, `cwd` → `diskResumeConfig.cwd`)
|
|
93
94
|
- `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`)
|
|
94
95
|
|
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ codex mcp add claude-code -- npx -y @leo000001/claude-code-mcp
|
|
|
79
79
|
Or manually add to `~/.codex/config.toml`:
|
|
80
80
|
|
|
81
81
|
```toml
|
|
82
|
-
[mcp_servers.claude-code]
|
|
82
|
+
[mcp_servers.claude-code-mcp]
|
|
83
83
|
command = "npx"
|
|
84
84
|
args = ["-y", "@leo000001/claude-code-mcp"]
|
|
85
85
|
```
|
|
@@ -110,11 +110,10 @@ Start a new Claude Code session. The agent autonomously performs coding tasks: r
|
|
|
110
110
|
| `disallowedTools` | string[] | No | Forbidden tool names. Default: `[]` (none). SDK behavior: disallowed tools are removed from the model's context. Takes precedence over `allowedTools` and will be denied even if later approved interactively |
|
|
111
111
|
| `maxTurns` | number | No | Maximum number of agent reasoning steps. Each step may involve one or more tool calls. Default: SDK/Claude Code default |
|
|
112
112
|
| `model` | string | No | Model to use (e.g. `"claude-sonnet-4-5-20250929"`). Default: SDK/Claude Code default |
|
|
113
|
-
| `effort` | string | No | Effort level: `"low"`, `"medium"`, `"high"`, `"max"`. Default: SDK/Claude Code default
|
|
114
|
-
| `thinking` | object | No | Thinking mode: `{ type: "adaptive" }`, `{ type: "enabled", budgetTokens: N }`, or `{ type: "disabled" }`. Default: SDK/Claude Code default
|
|
113
|
+
| `effort` | string | No | Effort level: `"low"`, `"medium"`, `"high"`, `"max"`. Default: SDK/Claude Code default |
|
|
114
|
+
| `thinking` | object | No | Thinking mode: `{ type: "adaptive" }`, `{ type: "enabled", budgetTokens: N }`, or `{ type: "disabled" }`. Default: SDK/Claude Code default |
|
|
115
115
|
| `systemPrompt` | string \| object | No | Override the agent's system prompt. Default: SDK/Claude Code default. Pass a string for full replacement, or `{ type: "preset", preset: "claude_code", append?: "..." }` to extend the default prompt |
|
|
116
|
-
| `permissionRequestTimeoutMs` | number | No | Timeout in milliseconds waiting for permission decisions, auto-deny on expiry. Default: `60000` (server-clamped to 5min)
|
|
117
|
-
| `sessionInitTimeoutMs` | number | No | **Compatibility alias** for `advanced.sessionInitTimeoutMs` (deprecated for `claude_code`). Default: `10000`. If both are provided, `advanced.sessionInitTimeoutMs` wins |
|
|
116
|
+
| `permissionRequestTimeoutMs` | number | No | Timeout in milliseconds waiting for permission decisions, auto-deny on expiry. Default: `60000` (server-clamped to 5min) |
|
|
118
117
|
| `advanced` | object | No | Advanced/low-frequency parameters (see below) |
|
|
119
118
|
|
|
120
119
|
<details>
|
|
@@ -124,7 +123,7 @@ Start a new Claude Code session. The agent autonomously performs coding tasks: r
|
|
|
124
123
|
| ------------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
125
124
|
| `advanced.tools` | string[] \| object | Define the base tool set. Default: SDK/Claude Code default toolset. Array of tool name strings, or `{ type: "preset", preset: "claude_code" }` for the default toolset. `allowedTools`/`disallowedTools` further filter on top of this |
|
|
126
125
|
| `advanced.persistSession` | boolean | Persist session history to disk (`~/.claude/projects/`). Default: `true`. Set `false` to disable. |
|
|
127
|
-
| `advanced.sessionInitTimeoutMs` | number | Session init timeout in milliseconds waiting for `system/init`. Default: `10000`.
|
|
126
|
+
| `advanced.sessionInitTimeoutMs` | number | Session init timeout in milliseconds waiting for `system/init`. Default: `10000`. |
|
|
128
127
|
| `advanced.agents` | object | Define custom sub-agents the main agent can delegate tasks to. Default: none. SDK default: if a sub-agent omits `tools`, it inherits all tools from the parent. |
|
|
129
128
|
| `advanced.agent` | string | Name of a custom agent (defined in `agents`) to use as the primary agent. Default: omitted |
|
|
130
129
|
| `advanced.maxBudgetUsd` | number | Maximum budget in USD. Default: SDK/Claude Code default |
|
|
@@ -143,8 +142,6 @@ Start a new Claude Code session. The agent autonomously performs coding tasks: r
|
|
|
143
142
|
| `advanced.debugFile` | string | Write debug logs to a specific file path (implicitly enables debug mode). Default: omitted |
|
|
144
143
|
| `advanced.env` | object | Environment variables to merge with process.env and pass to the Claude Code process (user values take precedence). Default: inherit process.env |
|
|
145
144
|
|
|
146
|
-
Deprecated aliases: `advanced.effort` and `advanced.thinking` are still accepted for compatibility, but prefer top-level `effort` / `thinking` (top-level wins if both are set).
|
|
147
|
-
|
|
148
145
|
</details>
|
|
149
146
|
|
|
150
147
|
**Returns:** `{ sessionId, status: "running", pollInterval, resumeToken? }`
|
|
@@ -153,7 +150,6 @@ Notes:
|
|
|
153
150
|
|
|
154
151
|
- `resumeToken` is omitted by default, and is only returned when `CLAUDE_CODE_MCP_RESUME_SECRET` is set on the server.
|
|
155
152
|
- On error: `{ sessionId: "", status: "error", error }`
|
|
156
|
-
- If `sessionInitTimeoutMs` (top-level alias) is used, `claude_code` may return `compatWarnings` to guide migration to `advanced.sessionInitTimeoutMs`.
|
|
157
153
|
|
|
158
154
|
Use `claude_code_check` to poll events and obtain the final `result`.
|
|
159
155
|
|
|
@@ -169,16 +165,16 @@ Use `claude_code_check` to poll events and obtain the final `result`.
|
|
|
169
165
|
|
|
170
166
|
Continue an existing session by sending a follow-up message. The agent retains full context from previous turns including files read, code analysis, and conversation history.
|
|
171
167
|
|
|
172
|
-
| Parameter | Type | Required | Description
|
|
173
|
-
| ---------------------------- | ------- | -------- |
|
|
174
|
-
| `sessionId` | string | Yes | Session ID from a previous `claude_code` call
|
|
175
|
-
| `prompt` | string | Yes | Follow-up prompt
|
|
176
|
-
| `forkSession` | boolean | No | Create a branched copy of this session. Default: `false`
|
|
177
|
-
| `effort` | string | No | Effort level override for this run (and for future replies when not forking). Default: SDK/Claude Code default
|
|
178
|
-
| `thinking` | object | No | Thinking mode override for this run (and for future replies when not forking). Default: SDK/Claude Code default
|
|
168
|
+
| Parameter | Type | Required | Description |
|
|
169
|
+
| ---------------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
170
|
+
| `sessionId` | string | Yes | Session ID from a previous `claude_code` call |
|
|
171
|
+
| `prompt` | string | Yes | Follow-up prompt |
|
|
172
|
+
| `forkSession` | boolean | No | Create a branched copy of this session. Default: `false` |
|
|
173
|
+
| `effort` | string | No | Effort level override for this run (and for future replies when not forking). Default: SDK/Claude Code default |
|
|
174
|
+
| `thinking` | object | No | Thinking mode override for this run (and for future replies when not forking). Default: SDK/Claude Code default |
|
|
179
175
|
| `permissionRequestTimeoutMs` | number | No | Timeout in milliseconds waiting for permission decisions, auto-deny on expiry. Default: `60000` (server-clamped to 5min) |
|
|
180
|
-
| `sessionInitTimeoutMs` | number | No | Fork init timeout in milliseconds (only when `forkSession=true`). Default: `10000`
|
|
181
|
-
| `diskResumeConfig` | object | No | Disk resume parameters (see below). Used when `CLAUDE_CODE_MCP_ALLOW_DISK_RESUME=1` and in-memory session is missing
|
|
176
|
+
| `sessionInitTimeoutMs` | number | No | Fork init timeout in milliseconds (only when `forkSession=true`). Default: `10000` |
|
|
177
|
+
| `diskResumeConfig` | object | No | Disk resume parameters (see below). Used when `CLAUDE_CODE_MCP_ALLOW_DISK_RESUME=1` and in-memory session is missing |
|
|
182
178
|
|
|
183
179
|
<details>
|
|
184
180
|
<summary><code>diskResumeConfig</code> object parameters (28 disk-resume-only parameters)</summary>
|
|
@@ -261,11 +257,11 @@ Resource templates:
|
|
|
261
257
|
|
|
262
258
|
List, inspect, cancel, or interrupt sessions.
|
|
263
259
|
|
|
264
|
-
| Parameter | Type | Required
|
|
265
|
-
| ------------------ | ------- |
|
|
266
|
-
| `action` | string | Yes
|
|
267
|
-
| `sessionId` | string | For get/cancel/interrupt
|
|
268
|
-
| `includeSensitive` | boolean | No
|
|
260
|
+
| Parameter | Type | Required | Description |
|
|
261
|
+
| ------------------ | ------- | ------------------------ | ------------------------------------------------------------------------------ |
|
|
262
|
+
| `action` | string | Yes | `"list"`, `"get"`, `"cancel"`, or `"interrupt"` |
|
|
263
|
+
| `sessionId` | string | For get/cancel/interrupt | Target session ID |
|
|
264
|
+
| `includeSensitive` | boolean | No | Include `cwd`/`systemPrompt`/`agents`/`additionalDirectories` (default: false) |
|
|
269
265
|
|
|
270
266
|
**Returns:** `{ sessions, message?, isError? }`
|
|
271
267
|
|
|
@@ -275,19 +271,19 @@ List, inspect, cancel, or interrupt sessions.
|
|
|
275
271
|
|
|
276
272
|
Poll session events/results and approve/deny pending permission requests.
|
|
277
273
|
|
|
278
|
-
| Parameter | Type | Required | Description
|
|
279
|
-
| ------------------- | ------- | ---------------------- |
|
|
280
|
-
| `action` | string | Yes | `"poll"` or `"respond_permission"`
|
|
281
|
-
| `sessionId` | string | Yes | Target session ID
|
|
282
|
-
| `cursor` | number | No | Event cursor for incremental polling (`poll` only). Default: omitted (starts from the beginning of the buffer)
|
|
283
|
-
| `responseMode` | string | No | `"minimal"` (default), `"delta_compact"` (lightweight polling), or `"full"` (verbose diagnostics)
|
|
274
|
+
| Parameter | Type | Required | Description |
|
|
275
|
+
| ------------------- | ------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
276
|
+
| `action` | string | Yes | `"poll"` or `"respond_permission"` |
|
|
277
|
+
| `sessionId` | string | Yes | Target session ID |
|
|
278
|
+
| `cursor` | number | No | Event cursor for incremental polling (`poll` only). Default: omitted (starts from the beginning of the buffer) |
|
|
279
|
+
| `responseMode` | string | No | `"minimal"` (default), `"delta_compact"` (lightweight polling), or `"full"` (verbose diagnostics) |
|
|
284
280
|
| `maxEvents` | number | No | Max events per poll (pagination via `nextCursor`). Default: `200` in `"minimal"`; unlimited in `"full"`/`"delta_compact"` |
|
|
285
|
-
| `requestId` | string | For respond_permission | Permission request ID
|
|
286
|
-
| `decision` | string | For respond_permission | `"allow"`, `"deny"`, or `"allow_for_session"`
|
|
287
|
-
| `denyMessage` | string | No | Deny reason shown to Claude (`deny` only). Default: `"Permission denied by caller"`
|
|
288
|
-
| `interrupt` | boolean | No | When true, denying also interrupts the whole agent (`deny` only). Default: `false`
|
|
289
|
-
| `pollOptions` | object | No | Fine-grained poll control options (see below)
|
|
290
|
-
| `permissionOptions` | object | No | Advanced permission response options (see below)
|
|
281
|
+
| `requestId` | string | For respond_permission | Permission request ID |
|
|
282
|
+
| `decision` | string | For respond_permission | `"allow"`, `"deny"`, or `"allow_for_session"` |
|
|
283
|
+
| `denyMessage` | string | No | Deny reason shown to Claude (`deny` only). Default: `"Permission denied by caller"` |
|
|
284
|
+
| `interrupt` | boolean | No | When true, denying also interrupts the whole agent (`deny` only). Default: `false` |
|
|
285
|
+
| `pollOptions` | object | No | Fine-grained poll control options (see below) |
|
|
286
|
+
| `permissionOptions` | object | No | Advanced permission response options (see below) |
|
|
291
287
|
|
|
292
288
|
<details>
|
|
293
289
|
<summary><code>pollOptions</code> object parameters (10 fine-grained poll controls)</summary>
|
|
@@ -298,20 +294,20 @@ Poll session events/results and approve/deny pending permission requests.
|
|
|
298
294
|
| `pollOptions.includeEvents` | boolean | When false, omits `events` (but `nextCursor` still advances). Default: `true` |
|
|
299
295
|
| `pollOptions.includeActions` | boolean | When false, omits `actions[]` even if `waiting_permission`. Default: `true` |
|
|
300
296
|
| `pollOptions.includeResult` | boolean | When false, omits top-level `result` even when `idle`/`error`. Default: `true` |
|
|
301
|
-
| `pollOptions.includeUsage` | boolean | Include `result.usage` (default: `true` in `"full"`, `false` in `"minimal"`/`"delta_compact"`)
|
|
302
|
-
| `pollOptions.includeModelUsage` | boolean | Include `result.modelUsage` (default: `true` in `"full"`, `false` in `"minimal"`/`"delta_compact"`)
|
|
303
|
-
| `pollOptions.includeStructuredOutput` | boolean | Include `result.structuredOutput` (default: `true` in `"full"`, `false` in `"minimal"`/`"delta_compact"`)
|
|
304
|
-
| `pollOptions.includeTerminalEvents` | boolean | When true, keeps terminal `result`/`error` events in `events` even if top-level `result` is included. Default: `false` in `"minimal"`/`"delta_compact"`, `true` in `"full"`
|
|
305
|
-
| `pollOptions.includeProgressEvents` | boolean | When true, includes progress events (`tool_progress`, `auth_status`) in the events stream. Default: `false` in `"minimal"`/`"delta_compact"`, `true` in `"full"`
|
|
306
|
-
| `pollOptions.maxBytes` | number | Approximate max JSON bytes for `events` in this response. When exceeded, events are truncated and `truncatedFields` includes `"events_bytes"`. Default: unlimited
|
|
297
|
+
| `pollOptions.includeUsage` | boolean | Include `result.usage` (default: `true` in `"full"`, `false` in `"minimal"`/`"delta_compact"`) |
|
|
298
|
+
| `pollOptions.includeModelUsage` | boolean | Include `result.modelUsage` (default: `true` in `"full"`, `false` in `"minimal"`/`"delta_compact"`) |
|
|
299
|
+
| `pollOptions.includeStructuredOutput` | boolean | Include `result.structuredOutput` (default: `true` in `"full"`, `false` in `"minimal"`/`"delta_compact"`) |
|
|
300
|
+
| `pollOptions.includeTerminalEvents` | boolean | When true, keeps terminal `result`/`error` events in `events` even if top-level `result` is included. Default: `false` in `"minimal"`/`"delta_compact"`, `true` in `"full"` |
|
|
301
|
+
| `pollOptions.includeProgressEvents` | boolean | When true, includes progress events (`tool_progress`, `auth_status`) in the events stream. Default: `false` in `"minimal"`/`"delta_compact"`, `true` in `"full"` |
|
|
302
|
+
| `pollOptions.maxBytes` | number | Approximate max JSON bytes for `events` in this response. When exceeded, events are truncated and `truncatedFields` includes `"events_bytes"`. Default: unlimited |
|
|
307
303
|
|
|
308
304
|
</details>
|
|
309
305
|
|
|
310
306
|
<details>
|
|
311
307
|
<summary><code>permissionOptions</code> object parameters (2 advanced permission response options)</summary>
|
|
312
308
|
|
|
313
|
-
| Parameter | Type | Description
|
|
314
|
-
| -------------------------------------- | ------ |
|
|
309
|
+
| Parameter | Type | Description |
|
|
310
|
+
| -------------------------------------- | ------ | ------------------------------------------------------------------------------------------- |
|
|
315
311
|
| `permissionOptions.updatedInput` | object | Modified tool input to run (`allow`/`allow_for_session` only). Default: none |
|
|
316
312
|
| `permissionOptions.updatedPermissions` | array | Permission rule updates suggested/applied (`allow`/`allow_for_session` only). Default: none |
|
|
317
313
|
|
|
@@ -414,11 +410,11 @@ For JSON-based MCP clients (Claude Desktop, Cursor, etc.):
|
|
|
414
410
|
For OpenAI Codex CLI (`~/.codex/config.toml`):
|
|
415
411
|
|
|
416
412
|
```toml
|
|
417
|
-
[mcp_servers.claude-code]
|
|
413
|
+
[mcp_servers.claude-code-mcp]
|
|
418
414
|
command = "npx"
|
|
419
415
|
args = ["-y", "@leo000001/claude-code-mcp"]
|
|
420
416
|
|
|
421
|
-
[mcp_servers.claude-code.env]
|
|
417
|
+
[mcp_servers.claude-code-mcp.env]
|
|
422
418
|
CLAUDE_CODE_GIT_BASH_PATH = "C:\\Program Files\\Git\\bin\\bash.exe"
|
|
423
419
|
```
|
|
424
420
|
|
|
@@ -453,15 +449,15 @@ setx CLAUDE_CODE_GIT_BASH_PATH "C:\Program Files\Git\bin\bash.exe"
|
|
|
453
449
|
|
|
454
450
|
All environment variables are optional. They are set on the MCP server process (not on the Claude Code child process — for that, use the `env` tool parameter).
|
|
455
451
|
|
|
456
|
-
| Variable
|
|
457
|
-
|
|
|
458
|
-
| `CLAUDE_CODE_GIT_BASH_PATH`
|
|
459
|
-
| `CLAUDE_CODE_MCP_ALLOW_DISK_RESUME`
|
|
460
|
-
| `CLAUDE_CODE_MCP_RESUME_SECRET`
|
|
461
|
-
| `CLAUDE_CODE_MCP_MAX_SESSIONS`
|
|
462
|
-
| `CLAUDE_CODE_MCP_MAX_PENDING_PERMISSIONS`
|
|
463
|
-
| `CLAUDE_CODE_MCP_EVENT_BUFFER_MAX_SIZE`
|
|
464
|
-
| `CLAUDE_CODE_MCP_EVENT_BUFFER_HARD_MAX_SIZE` | Hard limit for in-memory event buffer per session (clamped to be `>= max`; `0` is not supported)
|
|
452
|
+
| Variable | Description | Default |
|
|
453
|
+
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
454
|
+
| `CLAUDE_CODE_GIT_BASH_PATH` | Path to `bash.exe` on Windows (see [Windows Support](#windows-support)) | Auto-detected |
|
|
455
|
+
| `CLAUDE_CODE_MCP_ALLOW_DISK_RESUME` | Set to `1` to allow `claude_code_reply` to resume from on-disk transcripts when the in-memory session is missing | `0` (disabled) |
|
|
456
|
+
| `CLAUDE_CODE_MCP_RESUME_SECRET` | HMAC secret used to validate `resumeToken` for disk resume fallback (recommended if disk resume is enabled) | _(unset)_ |
|
|
457
|
+
| `CLAUDE_CODE_MCP_MAX_SESSIONS` | Maximum number of in-memory sessions (set `0` to disable the limit) | `128` |
|
|
458
|
+
| `CLAUDE_CODE_MCP_MAX_PENDING_PERMISSIONS` | Maximum number of outstanding permission requests per session (set `0` to disable the limit) | `64` |
|
|
459
|
+
| `CLAUDE_CODE_MCP_EVENT_BUFFER_MAX_SIZE` | Soft limit for in-memory event buffer per session (`0` is not supported) | `1000` |
|
|
460
|
+
| `CLAUDE_CODE_MCP_EVENT_BUFFER_HARD_MAX_SIZE` | Hard limit for in-memory event buffer per session (clamped to be `>= max`; `0` is not supported) | `2000` |
|
|
465
461
|
|
|
466
462
|
### How to configure
|
|
467
463
|
|
|
@@ -482,14 +478,14 @@ All environment variables are optional. They are set on the MCP server process (
|
|
|
482
478
|
}
|
|
483
479
|
```
|
|
484
480
|
|
|
485
|
-
**OpenAI Codex CLI** — add an `[mcp_servers.claude-code.env]` section in `~/.codex/config.toml`:
|
|
481
|
+
**OpenAI Codex CLI** — add an `[mcp_servers.claude-code-mcp.env]` section in `~/.codex/config.toml`:
|
|
486
482
|
|
|
487
483
|
```toml
|
|
488
|
-
[mcp_servers.claude-code]
|
|
484
|
+
[mcp_servers.claude-code-mcp]
|
|
489
485
|
command = "npx"
|
|
490
486
|
args = ["-y", "@leo000001/claude-code-mcp"]
|
|
491
487
|
|
|
492
|
-
[mcp_servers.claude-code.env]
|
|
488
|
+
[mcp_servers.claude-code-mcp.env]
|
|
493
489
|
CLAUDE_CODE_MCP_ALLOW_DISK_RESUME = "1"
|
|
494
490
|
CLAUDE_CODE_MCP_RESUME_SECRET = "change-me"
|
|
495
491
|
```
|
package/dist/index.js
CHANGED
|
@@ -1807,18 +1807,7 @@ async function executeClaudeCode(input, sessionManager, serverCwd, toolCache, re
|
|
|
1807
1807
|
const abortController = new AbortController();
|
|
1808
1808
|
const adv = input.advanced ?? {};
|
|
1809
1809
|
const permissionRequestTimeoutMs = input.permissionRequestTimeoutMs ?? 6e4;
|
|
1810
|
-
const sessionInitTimeoutMs = adv.sessionInitTimeoutMs ??
|
|
1811
|
-
const compatWarnings = [];
|
|
1812
|
-
if (input.sessionInitTimeoutMs !== void 0) {
|
|
1813
|
-
compatWarnings.push(
|
|
1814
|
-
"Top-level sessionInitTimeoutMs for claude_code is a compatibility alias; prefer advanced.sessionInitTimeoutMs."
|
|
1815
|
-
);
|
|
1816
|
-
}
|
|
1817
|
-
if (input.sessionInitTimeoutMs !== void 0 && adv.sessionInitTimeoutMs !== void 0 && input.sessionInitTimeoutMs !== adv.sessionInitTimeoutMs) {
|
|
1818
|
-
compatWarnings.push(
|
|
1819
|
-
`Both advanced.sessionInitTimeoutMs (${adv.sessionInitTimeoutMs}) and top-level sessionInitTimeoutMs (${input.sessionInitTimeoutMs}) were provided; using advanced.sessionInitTimeoutMs.`
|
|
1820
|
-
);
|
|
1821
|
-
}
|
|
1810
|
+
const sessionInitTimeoutMs = adv.sessionInitTimeoutMs ?? 1e4;
|
|
1822
1811
|
const flat = {
|
|
1823
1812
|
cwd: normalizedCwd,
|
|
1824
1813
|
allowedTools: input.allowedTools,
|
|
@@ -1828,8 +1817,8 @@ async function executeClaudeCode(input, sessionManager, serverCwd, toolCache, re
|
|
|
1828
1817
|
model: input.model,
|
|
1829
1818
|
systemPrompt: input.systemPrompt,
|
|
1830
1819
|
...adv,
|
|
1831
|
-
effort: input.effort
|
|
1832
|
-
thinking: input.thinking
|
|
1820
|
+
effort: input.effort,
|
|
1821
|
+
thinking: input.thinking
|
|
1833
1822
|
};
|
|
1834
1823
|
const normalizedFlat = {
|
|
1835
1824
|
...flat,
|
|
@@ -1873,8 +1862,7 @@ async function executeClaudeCode(input, sessionManager, serverCwd, toolCache, re
|
|
|
1873
1862
|
sessionId,
|
|
1874
1863
|
status: "running",
|
|
1875
1864
|
pollInterval: 3e3,
|
|
1876
|
-
resumeToken: resumeSecret ? computeResumeToken(sessionId, resumeSecret) : void 0
|
|
1877
|
-
compatWarnings: compatWarnings.length > 0 ? compatWarnings : void 0
|
|
1865
|
+
resumeToken: resumeSecret ? computeResumeToken(sessionId, resumeSecret) : void 0
|
|
1878
1866
|
};
|
|
1879
1867
|
} catch (err) {
|
|
1880
1868
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -3574,7 +3562,7 @@ function registerResources(server, deps) {
|
|
|
3574
3562
|
}
|
|
3575
3563
|
|
|
3576
3564
|
// src/server.ts
|
|
3577
|
-
var SERVER_VERSION = true ? "2.4.
|
|
3565
|
+
var SERVER_VERSION = true ? "2.4.3" : "0.0.0-dev";
|
|
3578
3566
|
function createServerContext(serverCwd) {
|
|
3579
3567
|
const sessionManager = new SessionManager();
|
|
3580
3568
|
const server = new McpServer(
|
|
@@ -3671,9 +3659,7 @@ function createServerContext(serverCwd) {
|
|
|
3671
3659
|
env: z.record(z.string(), z.string().optional()).optional().describe("Default: none")
|
|
3672
3660
|
};
|
|
3673
3661
|
const advancedOptionFieldsSchemaShape = {
|
|
3674
|
-
...sharedOptionFieldsSchemaShape
|
|
3675
|
-
effort: effortOptionSchema.describe("Deprecated, use top-level. Default: SDK"),
|
|
3676
|
-
thinking: thinkingOptionSchema.describe("Deprecated, use top-level. Default: SDK")
|
|
3662
|
+
...sharedOptionFieldsSchemaShape
|
|
3677
3663
|
};
|
|
3678
3664
|
const diskResumeOptionFieldsSchemaShape = {
|
|
3679
3665
|
...sharedOptionFieldsSchemaShape,
|
|
@@ -3764,7 +3750,6 @@ function createServerContext(serverCwd) {
|
|
|
3764
3750
|
thinking: thinkingOptionSchema.describe("Default: SDK"),
|
|
3765
3751
|
systemPrompt: systemPromptSchema.optional().describe("Default: SDK"),
|
|
3766
3752
|
permissionRequestTimeoutMs: z.number().int().positive().optional().describe("Default: 60000, clamped to 300000"),
|
|
3767
|
-
sessionInitTimeoutMs: z.number().int().positive().optional().describe("Deprecated, use advanced.sessionInitTimeoutMs. Default: 10000"),
|
|
3768
3753
|
advanced: advancedOptionsSchema
|
|
3769
3754
|
},
|
|
3770
3755
|
outputSchema: startResultSchema,
|