@anthropic-ai/claude-agent-sdk 0.3.207 → 0.3.208
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/bridge.d.ts +22 -2
- package/bridge.mjs +77 -77
- package/browser-sdk.js +31 -31
- package/manifest.json +21 -20
- package/manifest.zst.json +25 -24
- package/package.json +10 -10
- package/sdk-tools.d.ts +1 -0
- package/sdk.d.ts +12 -5
- package/sdk.mjs +51 -51
package/bridge.d.ts
CHANGED
|
@@ -150,7 +150,7 @@ export type AttachBridgeSessionOptions = {
|
|
|
150
150
|
ok: false;
|
|
151
151
|
error: string;
|
|
152
152
|
} | void;
|
|
153
|
-
onSetMaxThinkingTokens?: (tokens: number | null, thinkingDisplay?: 'summarized' | 'omitted' | null) => void;
|
|
153
|
+
onSetMaxThinkingTokens?: (tokens: number | null | undefined, thinkingDisplay?: 'summarized' | 'omitted' | null) => void;
|
|
154
154
|
/**
|
|
155
155
|
* `set_permission_mode` from claude.ai. Return an error verdict to send
|
|
156
156
|
* an error control_response (vs silently false-succeeding). Omit if
|
|
@@ -220,8 +220,28 @@ export declare function isCredentialsFailure(r: RemoteCredentials | CredentialsF
|
|
|
220
220
|
export type CodeSessionGitContext = {
|
|
221
221
|
gitRepoUrl: string;
|
|
222
222
|
branch: string;
|
|
223
|
+
/**
|
|
224
|
+
* The repo's default branch, when authoritatively known. LOAD-BEARING
|
|
225
|
+
* for branch continuity: when absent, `branch` is omitted from
|
|
226
|
+
* `outcomes.branches` entirely (the classification never acts on a
|
|
227
|
+
* guess), so the remote session works on a runner-generated branch
|
|
228
|
+
* instead of `branch`, with only a debug-level signal. Callers that
|
|
229
|
+
* want the session to check out AND push to `branch` must supply
|
|
230
|
+
* this — read `git symbolic-ref refs/remotes/origin/HEAD`, or run
|
|
231
|
+
* `git remote set-head origin -a` to repair a missing symref.
|
|
232
|
+
*/
|
|
223
233
|
defaultBranch?: string;
|
|
224
234
|
};
|
|
235
|
+
/**
|
|
236
|
+
* Caller-owned dedupe state for createCodeSession's branch-drop debug
|
|
237
|
+
* signal: create one object per logical create (outside your retry
|
|
238
|
+
* loop) and pass it to every attempt so the drop logs once per
|
|
239
|
+
* decision. Omit it to log on every attempt.
|
|
240
|
+
* @alpha
|
|
241
|
+
*/
|
|
242
|
+
export declare type BranchDropLogDedup = {
|
|
243
|
+
lastKey?: string | null;
|
|
244
|
+
};
|
|
225
245
|
/**
|
|
226
246
|
* Terminal 4xx from `POST /v1/code/sessions` for a recognized
|
|
227
247
|
* `session_grouping_id` rejection — retrying with the same inputs fails
|
|
@@ -248,7 +268,7 @@ export declare function isCreateSessionFailure(r: string | CreateSessionFailure
|
|
|
248
268
|
* implicit auth, so it works from any process (not just the CLI).
|
|
249
269
|
* @alpha
|
|
250
270
|
*/
|
|
251
|
-
export declare function createCodeSession(baseUrl: string, accessToken: string, title: string, timeoutMs: number, tags?: string[], gitContext?: CodeSessionGitContext, cwd?: string, model?: string, sessionGroupingId?: string): Promise<string | CreateSessionFailure | null>;
|
|
271
|
+
export declare function createCodeSession(baseUrl: string, accessToken: string, title: string, timeoutMs: number, tags?: string[], gitContext?: CodeSessionGitContext, cwd?: string, model?: string, sessionGroupingId?: string, dropLogDedup?: BranchDropLogDedup): Promise<string | CreateSessionFailure | null>;
|
|
252
272
|
/**
|
|
253
273
|
* `POST /v1/code/sessions/{id}/bridge` — mint a worker JWT for the session.
|
|
254
274
|
* Returns credentials, a `CredentialsFailure` for terminal authz failures
|