@anthropic-ai/claude-agent-sdk 0.1.62 → 0.1.63
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/cli.js +1332 -1454
- package/package.json +1 -1
- package/resvg.wasm +0 -0
- package/sdk.d.ts +24 -0
- package/sdk.mjs +1392 -1339
package/package.json
CHANGED
package/resvg.wasm
ADDED
|
Binary file
|
package/sdk.d.ts
CHANGED
|
@@ -570,6 +570,13 @@ export interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
|
570
570
|
* @returns Account information including email, organization, and subscription type
|
|
571
571
|
*/
|
|
572
572
|
accountInfo(): Promise<AccountInfo>;
|
|
573
|
+
/**
|
|
574
|
+
* Rewind tracked files to their state at a specific user message.
|
|
575
|
+
* Requires file checkpointing to be enabled via the `enableFileCheckpointing` option.
|
|
576
|
+
*
|
|
577
|
+
* @param userMessageId - UUID of the user message to rewind to
|
|
578
|
+
*/
|
|
579
|
+
rewindFiles(userMessageId: string): Promise<void>;
|
|
573
580
|
/**
|
|
574
581
|
* Stream input messages to the query.
|
|
575
582
|
* Used internally for multi-turn conversations.
|
|
@@ -747,6 +754,15 @@ export type Options = {
|
|
|
747
754
|
* Fallback model to use if the primary model fails or is unavailable.
|
|
748
755
|
*/
|
|
749
756
|
fallbackModel?: string;
|
|
757
|
+
/**
|
|
758
|
+
* Enable file checkpointing to track file changes during the session.
|
|
759
|
+
* When enabled, files can be rewound to their state at any user message
|
|
760
|
+
* using `Query.rewindFiles()`.
|
|
761
|
+
*
|
|
762
|
+
* File checkpointing creates backups of files before they are modified,
|
|
763
|
+
* allowing you to restore them to previous states.
|
|
764
|
+
*/
|
|
765
|
+
enableFileCheckpointing?: boolean;
|
|
750
766
|
/**
|
|
751
767
|
* When true, resumed sessions will fork to a new session ID rather than
|
|
752
768
|
* continuing the previous session. Use with `resume`.
|
|
@@ -773,6 +789,14 @@ export type Options = {
|
|
|
773
789
|
* ```
|
|
774
790
|
*/
|
|
775
791
|
hooks?: Partial<Record<HookEvent, HookCallbackMatcher[]>>;
|
|
792
|
+
/**
|
|
793
|
+
* When false, disables session persistence to disk. Sessions will not be
|
|
794
|
+
* saved to ~/.claude/projects/ and cannot be resumed later. Useful for
|
|
795
|
+
* ephemeral or automated workflows where session history is not needed.
|
|
796
|
+
*
|
|
797
|
+
* @default true
|
|
798
|
+
*/
|
|
799
|
+
persistSession?: boolean;
|
|
776
800
|
/**
|
|
777
801
|
* Include partial/streaming message events in the output.
|
|
778
802
|
* When true, `SDKPartialAssistantMessage` events will be emitted during streaming.
|