@anthropic-ai/claude-code 2.1.48 → 2.1.50

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.
Files changed (3) hide show
  1. package/cli.js +1750 -1737
  2. package/package.json +1 -1
  3. package/sdk-tools.d.ts +119 -29
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-code",
3
- "version": "2.1.48",
3
+ "version": "2.1.50",
4
4
  "bin": {
5
5
  "claude": "cli.js"
6
6
  },
package/sdk-tools.d.ts CHANGED
@@ -23,6 +23,10 @@ export type ToolInputSchemas =
23
23
  | McpInput
24
24
  | NotebookEditInput
25
25
  | ReadMcpResourceInput
26
+ | SubscribeMcpResourceInput
27
+ | UnsubscribeMcpResourceInput
28
+ | SubscribePollingInput
29
+ | UnsubscribePollingInput
26
30
  | TodoWriteInput
27
31
  | WebFetchInput
28
32
  | WebSearchInput
@@ -44,6 +48,10 @@ export type ToolOutputSchemas =
44
48
  | McpOutput
45
49
  | NotebookEditOutput
46
50
  | ReadMcpResourceOutput
51
+ | SubscribeMcpResourceOutput
52
+ | UnsubscribeMcpResourceOutput
53
+ | SubscribePollingOutput
54
+ | UnsubscribePollingOutput
47
55
  | TodoWriteOutput
48
56
  | WebFetchOutput
49
57
  | WebSearchOutput
@@ -289,6 +297,10 @@ export interface AgentInput {
289
297
  * Permission mode for spawned teammate (e.g., "plan" to require plan approval).
290
298
  */
291
299
  mode?: "acceptEdits" | "bypassPermissions" | "default" | "dontAsk" | "plan";
300
+ /**
301
+ * Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.
302
+ */
303
+ isolation?: "worktree";
292
304
  }
293
305
  export interface BashInput {
294
306
  /**
@@ -350,22 +362,6 @@ export interface ExitPlanModeInput {
350
362
  */
351
363
  prompt: string;
352
364
  }[];
353
- /**
354
- * Whether to push the plan to a remote Claude.ai session
355
- */
356
- pushToRemote?: boolean;
357
- /**
358
- * The remote session ID if pushed to remote
359
- */
360
- remoteSessionId?: string;
361
- /**
362
- * The remote session URL if pushed to remote
363
- */
364
- remoteSessionUrl?: string;
365
- /**
366
- * The remote session title if pushed to remote
367
- */
368
- remoteSessionTitle?: string;
369
365
  [k: string]: unknown;
370
366
  }
371
367
  export interface FileEditInput {
@@ -533,6 +529,80 @@ export interface ReadMcpResourceInput {
533
529
  */
534
530
  uri: string;
535
531
  }
532
+ export interface SubscribeMcpResourceInput {
533
+ /**
534
+ * The MCP server name
535
+ */
536
+ server: string;
537
+ /**
538
+ * The resource URI to subscribe to
539
+ */
540
+ uri: string;
541
+ /**
542
+ * Optional reason for subscribing (included in update notifications)
543
+ */
544
+ reason?: string;
545
+ }
546
+ export interface UnsubscribeMcpResourceInput {
547
+ /**
548
+ * The MCP server name
549
+ */
550
+ server?: string;
551
+ /**
552
+ * The resource URI to unsubscribe from
553
+ */
554
+ uri?: string;
555
+ /**
556
+ * The subscription ID to unsubscribe
557
+ */
558
+ subscriptionId?: string;
559
+ }
560
+ export interface SubscribePollingInput {
561
+ /**
562
+ * The type of subscription: "tool" to poll a tool, "resource" to poll a resource URI
563
+ */
564
+ type: "tool" | "resource";
565
+ /**
566
+ * The MCP server name
567
+ */
568
+ server: string;
569
+ /**
570
+ * The tool to call periodically (required when type is "tool")
571
+ */
572
+ toolName?: string;
573
+ /**
574
+ * Arguments to pass to the tool on each call
575
+ */
576
+ arguments?: {
577
+ [k: string]: unknown;
578
+ };
579
+ /**
580
+ * The resource URI to poll (required when type is "resource")
581
+ */
582
+ uri?: string;
583
+ /**
584
+ * Polling interval in milliseconds (minimum 1000ms, default 5000ms)
585
+ */
586
+ intervalMs: number;
587
+ /**
588
+ * Optional reason for subscribing (included in change notifications)
589
+ */
590
+ reason?: string;
591
+ }
592
+ export interface UnsubscribePollingInput {
593
+ /**
594
+ * The subscription ID to unsubscribe
595
+ */
596
+ subscriptionId?: string;
597
+ /**
598
+ * The MCP server name
599
+ */
600
+ server?: string;
601
+ /**
602
+ * The target to unsubscribe (tool name for tool subscriptions, URI for resource subscriptions)
603
+ */
604
+ target?: string;
605
+ }
536
606
  export interface TodoWriteInput {
537
607
  /**
538
608
  * The updated todo list
@@ -1849,18 +1919,6 @@ export interface ExitPlanModeOutput {
1849
1919
  * The file path where the plan was saved
1850
1920
  */
1851
1921
  filePath?: string;
1852
- /**
1853
- * Whether the plan was pushed to a remote session
1854
- */
1855
- pushToRemote?: boolean;
1856
- /**
1857
- * The remote session ID
1858
- */
1859
- remoteSessionId?: string;
1860
- /**
1861
- * The remote session URL
1862
- */
1863
- remoteSessionUrl?: string;
1864
1922
  /**
1865
1923
  * Whether the Task tool is available in the current context
1866
1924
  */
@@ -2054,6 +2112,38 @@ export interface ReadMcpResourceOutput {
2054
2112
  text?: string;
2055
2113
  }[];
2056
2114
  }
2115
+ export interface SubscribeMcpResourceOutput {
2116
+ /**
2117
+ * Whether the subscription was successful
2118
+ */
2119
+ subscribed: boolean;
2120
+ /**
2121
+ * Unique identifier for this subscription
2122
+ */
2123
+ subscriptionId: string;
2124
+ }
2125
+ export interface UnsubscribeMcpResourceOutput {
2126
+ /**
2127
+ * Whether the unsubscription was successful
2128
+ */
2129
+ unsubscribed: boolean;
2130
+ }
2131
+ export interface SubscribePollingOutput {
2132
+ /**
2133
+ * Whether the subscription was successful
2134
+ */
2135
+ subscribed: boolean;
2136
+ /**
2137
+ * Unique identifier for this subscription
2138
+ */
2139
+ subscriptionId: string;
2140
+ }
2141
+ export interface UnsubscribePollingOutput {
2142
+ /**
2143
+ * Whether the unsubscription was successful
2144
+ */
2145
+ unsubscribed: boolean;
2146
+ }
2057
2147
  export interface TodoWriteOutput {
2058
2148
  /**
2059
2149
  * The todo list before the update
@@ -2272,6 +2362,6 @@ export interface ConfigOutput {
2272
2362
  }
2273
2363
  export interface EnterWorktreeOutput {
2274
2364
  worktreePath: string;
2275
- worktreeBranch: string;
2365
+ worktreeBranch?: string;
2276
2366
  message: string;
2277
2367
  }