@anthropic-ai/claude-agent-sdk 0.3.205 → 0.3.207
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 +20 -2
- package/bridge.mjs +85 -84
- package/browser-sdk.js +31 -31
- package/extractFromBunfs.js +2 -2
- package/manifest.json +40 -19
- package/manifest.zst.json +44 -23
- package/package.json +10 -10
- package/sdk-tools.d.ts +14 -2
- package/sdk.d.ts +49 -5
- package/sdk.mjs +60 -60
package/bridge.d.ts
CHANGED
|
@@ -222,15 +222,33 @@ export type CodeSessionGitContext = {
|
|
|
222
222
|
branch: string;
|
|
223
223
|
defaultBranch?: string;
|
|
224
224
|
};
|
|
225
|
+
/**
|
|
226
|
+
* Terminal 4xx from `POST /v1/code/sessions` for a recognized
|
|
227
|
+
* `session_grouping_id` rejection — retrying with the same inputs fails
|
|
228
|
+
* identically.
|
|
229
|
+
* @alpha
|
|
230
|
+
*/
|
|
231
|
+
export type CreateSessionFailure = {
|
|
232
|
+
terminal: true;
|
|
233
|
+
status: number;
|
|
234
|
+
detail: string | undefined;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Type guard for `createCodeSession` results.
|
|
238
|
+
* @alpha
|
|
239
|
+
*/
|
|
240
|
+
export declare function isCreateSessionFailure(r: string | CreateSessionFailure | null): r is CreateSessionFailure;
|
|
225
241
|
/**
|
|
226
242
|
* `POST /v1/code/sessions` — create a fresh CCR session. Returns the `cse_*`
|
|
227
|
-
* session id
|
|
243
|
+
* session id on success, a `CreateSessionFailure` for a recognized
|
|
244
|
+
* `session_grouping_id` rejection (terminal — don't retry), or null on any
|
|
245
|
+
* other failure (HTTP error, malformed response).
|
|
228
246
|
*
|
|
229
247
|
* Callers supply their own OAuth token — this is a thin HTTP wrapper with no
|
|
230
248
|
* implicit auth, so it works from any process (not just the CLI).
|
|
231
249
|
* @alpha
|
|
232
250
|
*/
|
|
233
|
-
export declare function createCodeSession(baseUrl: string, accessToken: string, title: string, timeoutMs: number, tags?: string[], gitContext?: CodeSessionGitContext, cwd?: string, model?: string): Promise<string | null>;
|
|
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>;
|
|
234
252
|
/**
|
|
235
253
|
* `POST /v1/code/sessions/{id}/bridge` — mint a worker JWT for the session.
|
|
236
254
|
* Returns credentials, a `CredentialsFailure` for terminal authz failures
|