@meistrari/agent-sdk 0.4.0 → 0.5.1
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/README.md +32 -11
- package/dist/index.cjs +30 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.mts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.mjs +31 -2
- package/dist/schemas.cjs +29 -2
- package/dist/schemas.d.cts +3 -2
- package/dist/schemas.d.mts +3 -2
- package/dist/schemas.d.ts +3 -2
- package/dist/schemas.mjs +27 -3
- package/dist/shared/{agent-sdk.dc5630ec.d.cts → agent-sdk.c05c2d23.d.cts} +27 -2
- package/dist/shared/{agent-sdk.dc5630ec.d.mts → agent-sdk.c05c2d23.d.mts} +27 -2
- package/dist/shared/{agent-sdk.dc5630ec.d.ts → agent-sdk.c05c2d23.d.ts} +27 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,16 +132,19 @@ const { success, sessionId } = await client.executeAgent({
|
|
|
132
132
|
|
|
133
133
|
Webhook semantics (full contract in [`docs/webhooks.md`](../../docs/webhooks.md)):
|
|
134
134
|
|
|
135
|
-
- Available on the v4 execute path only; up to **5 webhooks** per
|
|
135
|
+
- Available on the v4 execute path only; up to **5 webhooks** per run.
|
|
136
136
|
- URLs must be HTTPS; localhost, `.local`/`.internal`, and private/loopback IP hosts are rejected.
|
|
137
137
|
- `events` defaults to **all `session.*` events** (`started`, `completed`, `failed`,
|
|
138
138
|
`cancelled`, `waiting_messages`); `subagent.started`/`subagent.completed` must be opted into.
|
|
139
|
-
-
|
|
140
|
-
|
|
139
|
+
- Webhooks are runtime-only and per-run. A continuation must pass `webhooks` again to
|
|
140
|
+
receive callbacks; omitting it or passing `webhooks: []` means no callbacks for that
|
|
141
|
+
continuation run.
|
|
141
142
|
- Deliveries are **at-least-once** with retries — make handlers idempotent.
|
|
142
|
-
- The payload (`SessionWebhookEventPayload`)
|
|
143
|
-
`
|
|
144
|
-
|
|
143
|
+
- The payload (`SessionWebhookEventPayload`) includes `eventType`, `sessionId`, `runId`,
|
|
144
|
+
`status`, `error`, `usage`, `subagent`, `deliveryId`, and `result` on
|
|
145
|
+
`session.completed`. `result` is the postprocessed output: structured JSON when present,
|
|
146
|
+
otherwise text, otherwise `null`. Fetch the full stream with `streamSession` and timeline
|
|
147
|
+
summary with `fetchTimeline`.
|
|
145
148
|
|
|
146
149
|
When a `secret` is configured, verify the `x-tela-agent-webhook-signature` header with the bundled
|
|
147
150
|
helper (Web Crypto, works in Node/Bun/edge runtimes):
|
|
@@ -167,8 +170,7 @@ app.post('/hooks/agent-session', async (req) => {
|
|
|
167
170
|
|
|
168
171
|
For [Trigger.dev wait-for-token](../../docs/trigger-dev-wait-token.md) flows, pass the
|
|
169
172
|
token's callback URL as a webhook filtered to terminal events — no `secret` needed (auth
|
|
170
|
-
is embedded in the token URL), and
|
|
171
|
-
output.
|
|
173
|
+
is embedded in the token URL), and pass a fresh token URL on each continuation turn.
|
|
172
174
|
|
|
173
175
|
### Update an agent model
|
|
174
176
|
|
|
@@ -202,6 +204,25 @@ console.log(timeline.status, timeline.metrics, timeline.spans)
|
|
|
202
204
|
`prompt`, and `spans`. It does not return per-event detail. Consumers that need timeline
|
|
203
205
|
events should consume `streamSession` and merge stream-derived timeline events locally.
|
|
204
206
|
|
|
207
|
+
### Fetch captured session files
|
|
208
|
+
|
|
209
|
+
```ts
|
|
210
|
+
const files = await client.listSessionFiles(sessionId, { signal })
|
|
211
|
+
|
|
212
|
+
for (const file of files.tree) {
|
|
213
|
+
console.log(file.path, file.size)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const report = await client.fetchSessionFile(sessionId, 'output/report.md', { signal })
|
|
217
|
+
|
|
218
|
+
if (report.encoding === 'raw')
|
|
219
|
+
console.log(report.content)
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
`listSessionFiles` returns the file tree captured from the source sandbox after execution.
|
|
223
|
+
`fetchSessionFile` returns a single captured file. Text-like files are returned as
|
|
224
|
+
`encoding: 'raw'`; binary files are returned as base64.
|
|
225
|
+
|
|
205
226
|
### Resolve Vault references
|
|
206
227
|
|
|
207
228
|
```ts
|
|
@@ -226,6 +247,6 @@ This package mirrors `@meistrari/vault-sdk` and is published as `UNLICENSED`.
|
|
|
226
247
|
|
|
227
248
|
Focused on sandbox execution and the public v4 consumer paths: `executeAgent` (including
|
|
228
249
|
session webhook registration), `streamSession`, `cancelSession`, `updateAgentModel`,
|
|
229
|
-
`fetchTimeline`, `resolveReference`, and webhook
|
|
230
|
-
`verifyWebhookSignature`. Agent CRUD, legacy polling, and the
|
|
231
|
-
callback are intentionally out of scope.
|
|
250
|
+
`fetchTimeline`, `listSessionFiles`, `fetchSessionFile`, `resolveReference`, and webhook
|
|
251
|
+
signature verification via `verifyWebhookSignature`. Agent CRUD, legacy polling, and the
|
|
252
|
+
internal sandbox timeline callback are intentionally out of scope.
|
package/dist/index.cjs
CHANGED
|
@@ -231,6 +231,26 @@ function agentClient(config) {
|
|
|
231
231
|
});
|
|
232
232
|
return schemas.sessionTimelineResponseSchema.parse(await response.json());
|
|
233
233
|
}
|
|
234
|
+
async function listSessionFiles(sessionId, options) {
|
|
235
|
+
const parsedSessionId = schemas.sessionTimelineIdSchema.parse(sessionId);
|
|
236
|
+
const response = await request({
|
|
237
|
+
method: "GET",
|
|
238
|
+
path: `/v3/sessions/${encodeURIComponent(parsedSessionId)}/files`,
|
|
239
|
+
signal: options?.signal
|
|
240
|
+
});
|
|
241
|
+
return schemas.sessionFilesTreeResponseSchema.parse(await response.json());
|
|
242
|
+
}
|
|
243
|
+
async function fetchSessionFile(sessionId, filePath, options) {
|
|
244
|
+
const parsedSessionId = schemas.sessionTimelineIdSchema.parse(sessionId);
|
|
245
|
+
if (!filePath)
|
|
246
|
+
throw new Error("filePath is required");
|
|
247
|
+
const response = await request({
|
|
248
|
+
method: "GET",
|
|
249
|
+
path: `/v3/sessions/${encodeURIComponent(parsedSessionId)}/files/${encodeURIComponent(filePath)}`,
|
|
250
|
+
signal: options?.signal
|
|
251
|
+
});
|
|
252
|
+
return schemas.sessionFileContentResponseSchema.parse(await response.json());
|
|
253
|
+
}
|
|
234
254
|
async function cancelSession(sessionId) {
|
|
235
255
|
const parsedSessionId = schemas.sessionTimelineIdSchema.parse(sessionId);
|
|
236
256
|
const response = await request({
|
|
@@ -275,7 +295,16 @@ function agentClient(config) {
|
|
|
275
295
|
return JSON.parse(await vaultFile.content.text());
|
|
276
296
|
return vaultFile.content.arrayBuffer();
|
|
277
297
|
}
|
|
278
|
-
return {
|
|
298
|
+
return {
|
|
299
|
+
executeAgent,
|
|
300
|
+
updateAgentModel,
|
|
301
|
+
fetchTimeline,
|
|
302
|
+
listSessionFiles,
|
|
303
|
+
fetchSessionFile,
|
|
304
|
+
cancelSession,
|
|
305
|
+
streamSession,
|
|
306
|
+
resolveReference
|
|
307
|
+
};
|
|
279
308
|
}
|
|
280
309
|
|
|
281
310
|
const SIGNATURE_PREFIX = "sha256=";
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ExecuteAgentRequest, a as ExecuteAgentResponse, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, S as SessionTimelineResponse, C as CancelSessionResponse,
|
|
2
|
-
export { A as AgentInput,
|
|
1
|
+
import { E as ExecuteAgentRequest, a as ExecuteAgentResponse, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, S as SessionTimelineResponse, c as SessionFilesTreeResponse, d as SessionFileContentResponse, C as CancelSessionResponse, e as SessionStreamEvent } from './shared/agent-sdk.c05c2d23.cjs';
|
|
2
|
+
export { A as AgentInput, f as SessionStatus, g as SessionWebhookConfig, h as SessionWebhookEventPayload, i as SessionWebhookEventType, j as SessionWebhookSubagent, k as SessionWebhookUsage, T as TimelineEvent, l as TimelineMetrics, m as TimelinePrompt, n as TimelineRunTurnMetrics, o as TimelineSpan, p as TimelineToolResult } from './shared/agent-sdk.c05c2d23.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface AuthStrategy {
|
|
@@ -38,6 +38,12 @@ declare function agentClient(config: AgentClientConfig): {
|
|
|
38
38
|
executeAgent: (input: ExecuteAgentRequest) => Promise<ExecuteAgentResponse>;
|
|
39
39
|
updateAgentModel: (input: UpdateAgentModelRequest) => Promise<UpdateAgentModelResponse>;
|
|
40
40
|
fetchTimeline: (sessionId: string, options?: FetchTimelineOptions) => Promise<SessionTimelineResponse>;
|
|
41
|
+
listSessionFiles: (sessionId: string, options?: {
|
|
42
|
+
signal?: AbortSignal;
|
|
43
|
+
}) => Promise<SessionFilesTreeResponse>;
|
|
44
|
+
fetchSessionFile: (sessionId: string, filePath: string, options?: {
|
|
45
|
+
signal?: AbortSignal;
|
|
46
|
+
}) => Promise<SessionFileContentResponse>;
|
|
41
47
|
cancelSession: (sessionId: string) => Promise<CancelSessionResponse>;
|
|
42
48
|
streamSession: (sessionId: string, options?: StreamSessionOptions) => Promise<AsyncIterable<SessionStreamEvent>>;
|
|
43
49
|
resolveReference: {
|
|
@@ -81,5 +87,5 @@ declare function parseSessionStream(stream: ReadableStream<Uint8Array>): AsyncIt
|
|
|
81
87
|
|
|
82
88
|
declare function verifyWebhookSignature(rawBody: string | Uint8Array, signatureHeader: string | null | undefined, secret: string): Promise<boolean>;
|
|
83
89
|
|
|
84
|
-
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError, SessionStreamEvent, SessionTimelineResponse, UpdateAgentModelRequest, UpdateAgentModelResponse, agentClient, isFetchError, isNetworkError, parseSessionStream, verifyWebhookSignature };
|
|
90
|
+
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError, SessionFileContentResponse, SessionFilesTreeResponse, SessionStreamEvent, SessionTimelineResponse, UpdateAgentModelRequest, UpdateAgentModelResponse, agentClient, isFetchError, isNetworkError, parseSessionStream, verifyWebhookSignature };
|
|
85
91
|
export type { AgentClient, AgentClientConfig, AgentRequestError, AuthStrategy, FetchTimelineOptions, ResolveReferenceAs, ResolveReferenceOptions, StreamSessionOptions };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ExecuteAgentRequest, a as ExecuteAgentResponse, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, S as SessionTimelineResponse, C as CancelSessionResponse,
|
|
2
|
-
export { A as AgentInput,
|
|
1
|
+
import { E as ExecuteAgentRequest, a as ExecuteAgentResponse, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, S as SessionTimelineResponse, c as SessionFilesTreeResponse, d as SessionFileContentResponse, C as CancelSessionResponse, e as SessionStreamEvent } from './shared/agent-sdk.c05c2d23.mjs';
|
|
2
|
+
export { A as AgentInput, f as SessionStatus, g as SessionWebhookConfig, h as SessionWebhookEventPayload, i as SessionWebhookEventType, j as SessionWebhookSubagent, k as SessionWebhookUsage, T as TimelineEvent, l as TimelineMetrics, m as TimelinePrompt, n as TimelineRunTurnMetrics, o as TimelineSpan, p as TimelineToolResult } from './shared/agent-sdk.c05c2d23.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface AuthStrategy {
|
|
@@ -38,6 +38,12 @@ declare function agentClient(config: AgentClientConfig): {
|
|
|
38
38
|
executeAgent: (input: ExecuteAgentRequest) => Promise<ExecuteAgentResponse>;
|
|
39
39
|
updateAgentModel: (input: UpdateAgentModelRequest) => Promise<UpdateAgentModelResponse>;
|
|
40
40
|
fetchTimeline: (sessionId: string, options?: FetchTimelineOptions) => Promise<SessionTimelineResponse>;
|
|
41
|
+
listSessionFiles: (sessionId: string, options?: {
|
|
42
|
+
signal?: AbortSignal;
|
|
43
|
+
}) => Promise<SessionFilesTreeResponse>;
|
|
44
|
+
fetchSessionFile: (sessionId: string, filePath: string, options?: {
|
|
45
|
+
signal?: AbortSignal;
|
|
46
|
+
}) => Promise<SessionFileContentResponse>;
|
|
41
47
|
cancelSession: (sessionId: string) => Promise<CancelSessionResponse>;
|
|
42
48
|
streamSession: (sessionId: string, options?: StreamSessionOptions) => Promise<AsyncIterable<SessionStreamEvent>>;
|
|
43
49
|
resolveReference: {
|
|
@@ -81,5 +87,5 @@ declare function parseSessionStream(stream: ReadableStream<Uint8Array>): AsyncIt
|
|
|
81
87
|
|
|
82
88
|
declare function verifyWebhookSignature(rawBody: string | Uint8Array, signatureHeader: string | null | undefined, secret: string): Promise<boolean>;
|
|
83
89
|
|
|
84
|
-
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError, SessionStreamEvent, SessionTimelineResponse, UpdateAgentModelRequest, UpdateAgentModelResponse, agentClient, isFetchError, isNetworkError, parseSessionStream, verifyWebhookSignature };
|
|
90
|
+
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError, SessionFileContentResponse, SessionFilesTreeResponse, SessionStreamEvent, SessionTimelineResponse, UpdateAgentModelRequest, UpdateAgentModelResponse, agentClient, isFetchError, isNetworkError, parseSessionStream, verifyWebhookSignature };
|
|
85
91
|
export type { AgentClient, AgentClientConfig, AgentRequestError, AuthStrategy, FetchTimelineOptions, ResolveReferenceAs, ResolveReferenceOptions, StreamSessionOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ExecuteAgentRequest, a as ExecuteAgentResponse, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, S as SessionTimelineResponse, C as CancelSessionResponse,
|
|
2
|
-
export { A as AgentInput,
|
|
1
|
+
import { E as ExecuteAgentRequest, a as ExecuteAgentResponse, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, S as SessionTimelineResponse, c as SessionFilesTreeResponse, d as SessionFileContentResponse, C as CancelSessionResponse, e as SessionStreamEvent } from './shared/agent-sdk.c05c2d23.js';
|
|
2
|
+
export { A as AgentInput, f as SessionStatus, g as SessionWebhookConfig, h as SessionWebhookEventPayload, i as SessionWebhookEventType, j as SessionWebhookSubagent, k as SessionWebhookUsage, T as TimelineEvent, l as TimelineMetrics, m as TimelinePrompt, n as TimelineRunTurnMetrics, o as TimelineSpan, p as TimelineToolResult } from './shared/agent-sdk.c05c2d23.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface AuthStrategy {
|
|
@@ -38,6 +38,12 @@ declare function agentClient(config: AgentClientConfig): {
|
|
|
38
38
|
executeAgent: (input: ExecuteAgentRequest) => Promise<ExecuteAgentResponse>;
|
|
39
39
|
updateAgentModel: (input: UpdateAgentModelRequest) => Promise<UpdateAgentModelResponse>;
|
|
40
40
|
fetchTimeline: (sessionId: string, options?: FetchTimelineOptions) => Promise<SessionTimelineResponse>;
|
|
41
|
+
listSessionFiles: (sessionId: string, options?: {
|
|
42
|
+
signal?: AbortSignal;
|
|
43
|
+
}) => Promise<SessionFilesTreeResponse>;
|
|
44
|
+
fetchSessionFile: (sessionId: string, filePath: string, options?: {
|
|
45
|
+
signal?: AbortSignal;
|
|
46
|
+
}) => Promise<SessionFileContentResponse>;
|
|
41
47
|
cancelSession: (sessionId: string) => Promise<CancelSessionResponse>;
|
|
42
48
|
streamSession: (sessionId: string, options?: StreamSessionOptions) => Promise<AsyncIterable<SessionStreamEvent>>;
|
|
43
49
|
resolveReference: {
|
|
@@ -81,5 +87,5 @@ declare function parseSessionStream(stream: ReadableStream<Uint8Array>): AsyncIt
|
|
|
81
87
|
|
|
82
88
|
declare function verifyWebhookSignature(rawBody: string | Uint8Array, signatureHeader: string | null | undefined, secret: string): Promise<boolean>;
|
|
83
89
|
|
|
84
|
-
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError, SessionStreamEvent, SessionTimelineResponse, UpdateAgentModelRequest, UpdateAgentModelResponse, agentClient, isFetchError, isNetworkError, parseSessionStream, verifyWebhookSignature };
|
|
90
|
+
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError, SessionFileContentResponse, SessionFilesTreeResponse, SessionStreamEvent, SessionTimelineResponse, UpdateAgentModelRequest, UpdateAgentModelResponse, agentClient, isFetchError, isNetworkError, parseSessionStream, verifyWebhookSignature };
|
|
85
91
|
export type { AgentClient, AgentClientConfig, AgentRequestError, AuthStrategy, FetchTimelineOptions, ResolveReferenceAs, ResolveReferenceOptions, StreamSessionOptions };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VaultFile } from '@meistrari/vault-sdk';
|
|
2
|
-
import { SESSION_STREAM_EVENT_KINDS, sessionStreamEventSchema, executeAgentRequestSchema, executeAgentResponseSchema, updateAgentModelRequestSchema, updateAgentModelResponseSchema, sessionTimelineIdSchema, sessionTimelineResponseSchema, cancelSessionResponseSchema } from './schemas.mjs';
|
|
2
|
+
import { SESSION_STREAM_EVENT_KINDS, sessionStreamEventSchema, executeAgentRequestSchema, executeAgentResponseSchema, updateAgentModelRequestSchema, updateAgentModelResponseSchema, sessionTimelineIdSchema, sessionTimelineResponseSchema, sessionFilesTreeResponseSchema, sessionFileContentResponseSchema, cancelSessionResponseSchema } from './schemas.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
var __defProp$1 = Object.defineProperty;
|
|
@@ -229,6 +229,26 @@ function agentClient(config) {
|
|
|
229
229
|
});
|
|
230
230
|
return sessionTimelineResponseSchema.parse(await response.json());
|
|
231
231
|
}
|
|
232
|
+
async function listSessionFiles(sessionId, options) {
|
|
233
|
+
const parsedSessionId = sessionTimelineIdSchema.parse(sessionId);
|
|
234
|
+
const response = await request({
|
|
235
|
+
method: "GET",
|
|
236
|
+
path: `/v3/sessions/${encodeURIComponent(parsedSessionId)}/files`,
|
|
237
|
+
signal: options?.signal
|
|
238
|
+
});
|
|
239
|
+
return sessionFilesTreeResponseSchema.parse(await response.json());
|
|
240
|
+
}
|
|
241
|
+
async function fetchSessionFile(sessionId, filePath, options) {
|
|
242
|
+
const parsedSessionId = sessionTimelineIdSchema.parse(sessionId);
|
|
243
|
+
if (!filePath)
|
|
244
|
+
throw new Error("filePath is required");
|
|
245
|
+
const response = await request({
|
|
246
|
+
method: "GET",
|
|
247
|
+
path: `/v3/sessions/${encodeURIComponent(parsedSessionId)}/files/${encodeURIComponent(filePath)}`,
|
|
248
|
+
signal: options?.signal
|
|
249
|
+
});
|
|
250
|
+
return sessionFileContentResponseSchema.parse(await response.json());
|
|
251
|
+
}
|
|
232
252
|
async function cancelSession(sessionId) {
|
|
233
253
|
const parsedSessionId = sessionTimelineIdSchema.parse(sessionId);
|
|
234
254
|
const response = await request({
|
|
@@ -273,7 +293,16 @@ function agentClient(config) {
|
|
|
273
293
|
return JSON.parse(await vaultFile.content.text());
|
|
274
294
|
return vaultFile.content.arrayBuffer();
|
|
275
295
|
}
|
|
276
|
-
return {
|
|
296
|
+
return {
|
|
297
|
+
executeAgent,
|
|
298
|
+
updateAgentModel,
|
|
299
|
+
fetchTimeline,
|
|
300
|
+
listSessionFiles,
|
|
301
|
+
fetchSessionFile,
|
|
302
|
+
cancelSession,
|
|
303
|
+
streamSession,
|
|
304
|
+
resolveReference
|
|
305
|
+
};
|
|
277
306
|
}
|
|
278
307
|
|
|
279
308
|
const SIGNATURE_PREFIX = "sha256=";
|
package/dist/schemas.cjs
CHANGED
|
@@ -429,6 +429,7 @@ const openrouterCatalog = /*@__PURE__*/getDefaultExportFromCjs(openrouterModels)
|
|
|
429
429
|
const nativeAnthropicModelIds = [
|
|
430
430
|
"claude-sonnet-4-5",
|
|
431
431
|
"claude-sonnet-4-6",
|
|
432
|
+
"claude-sonnet-5",
|
|
432
433
|
"claude-haiku-4-5",
|
|
433
434
|
"claude-fable-5",
|
|
434
435
|
"claude-opus-4-6",
|
|
@@ -526,6 +527,11 @@ const sessionWebhookUsageSchema = zod.z.object({
|
|
|
526
527
|
durationMs: zod.z.number().int().nonnegative().optional(),
|
|
527
528
|
numTurns: zod.z.number().int().nonnegative().optional()
|
|
528
529
|
}).strict();
|
|
530
|
+
const sessionWebhookResultSchema = zod.z.union([
|
|
531
|
+
zod.z.string(),
|
|
532
|
+
zod.z.record(zod.z.string(), zod.z.unknown()),
|
|
533
|
+
zod.z.null()
|
|
534
|
+
]);
|
|
529
535
|
const sessionWebhookSubagentSchema = zod.z.object({
|
|
530
536
|
callId: zod.z.string().min(1).max(256),
|
|
531
537
|
subagentType: zod.z.string().max(256).optional(),
|
|
@@ -539,7 +545,10 @@ const sessionWebhookEventPayloadSchema = zod.z.object({
|
|
|
539
545
|
runId: zod.z.string().optional(),
|
|
540
546
|
status: zod.z.string(),
|
|
541
547
|
error: zod.z.string().optional(),
|
|
548
|
+
interrupted: zod.z.boolean().optional(),
|
|
549
|
+
failReason: zod.z.string().optional(),
|
|
542
550
|
usage: sessionWebhookUsageSchema.optional(),
|
|
551
|
+
result: sessionWebhookResultSchema.optional(),
|
|
543
552
|
subagent: sessionWebhookSubagentSchema.optional(),
|
|
544
553
|
timestamp: zod.z.string(),
|
|
545
554
|
apiVersion: zod.z.literal("v4"),
|
|
@@ -604,8 +613,8 @@ const executeAgentResponseSchema = zod.z.discriminatedUnion("success", [
|
|
|
604
613
|
const repositoryNameSchema = zod.z.string().min(1, "Repository is required").max(200, "Repository must be 200 characters or less").regex(/^[\w.-]+$/, "Repository contains unsupported characters");
|
|
605
614
|
const updateAgentModelRequestSchema = zod.z.object({
|
|
606
615
|
repository: repositoryNameSchema,
|
|
607
|
-
model: modelSchema,
|
|
608
|
-
commitMessage: zod.z.string().max(4096, "Commit message must be 4096 characters or less").optional()
|
|
616
|
+
model: modelSchema.describe("Supported agent model id. The model prefix selects the provider template."),
|
|
617
|
+
commitMessage: zod.z.string().max(4096, "Commit message must be 4096 characters or less").optional().describe("Optional commit message for the model/template update")
|
|
609
618
|
}).strict();
|
|
610
619
|
const updateAgentModelSuccessResponseSchema = zod.z.object({
|
|
611
620
|
success: zod.z.literal(true).describe("Whether the model update succeeded"),
|
|
@@ -700,6 +709,21 @@ const sessionTimelineResponseSchema = zod.z.object({
|
|
|
700
709
|
prompt: timelinePromptSchema,
|
|
701
710
|
spans: zod.z.array(timelineSpanSchema)
|
|
702
711
|
});
|
|
712
|
+
const sessionFilesTreeResponseSchema = zod.z.object({
|
|
713
|
+
sessionId: zod.z.string(),
|
|
714
|
+
tree: zod.z.array(zod.z.object({
|
|
715
|
+
path: zod.z.string(),
|
|
716
|
+
size: zod.z.number()
|
|
717
|
+
})),
|
|
718
|
+
truncated: zod.z.boolean(),
|
|
719
|
+
capturedAt: zod.z.number()
|
|
720
|
+
});
|
|
721
|
+
const sessionFileContentResponseSchema = zod.z.object({
|
|
722
|
+
filePath: zod.z.string(),
|
|
723
|
+
content: zod.z.string(),
|
|
724
|
+
encoding: zod.z.enum(["raw", "base64"]),
|
|
725
|
+
size: zod.z.number()
|
|
726
|
+
});
|
|
703
727
|
const sessionStatusEventSchema = zod.z.object({
|
|
704
728
|
kind: zod.z.literal("status"),
|
|
705
729
|
sessionId: zod.z.string(),
|
|
@@ -772,6 +796,8 @@ exports.openrouterModelCatalog = openrouterModelCatalog;
|
|
|
772
796
|
exports.openrouterModelIds = openrouterModelIds;
|
|
773
797
|
exports.sessionAgentEventSchema = sessionAgentEventSchema;
|
|
774
798
|
exports.sessionAgentEventsSchema = sessionAgentEventsSchema;
|
|
799
|
+
exports.sessionFileContentResponseSchema = sessionFileContentResponseSchema;
|
|
800
|
+
exports.sessionFilesTreeResponseSchema = sessionFilesTreeResponseSchema;
|
|
775
801
|
exports.sessionStatusSchema = sessionStatusSchema;
|
|
776
802
|
exports.sessionStreamEventSchema = sessionStreamEventSchema;
|
|
777
803
|
exports.sessionTimelineIdSchema = sessionTimelineIdSchema;
|
|
@@ -779,6 +805,7 @@ exports.sessionTimelineResponseSchema = sessionTimelineResponseSchema;
|
|
|
779
805
|
exports.sessionWebhookConfigSchema = sessionWebhookConfigSchema;
|
|
780
806
|
exports.sessionWebhookEventPayloadSchema = sessionWebhookEventPayloadSchema;
|
|
781
807
|
exports.sessionWebhookEventTypeSchema = sessionWebhookEventTypeSchema;
|
|
808
|
+
exports.sessionWebhookResultSchema = sessionWebhookResultSchema;
|
|
782
809
|
exports.sessionWebhookSubagentSchema = sessionWebhookSubagentSchema;
|
|
783
810
|
exports.sessionWebhookUsageSchema = sessionWebhookUsageSchema;
|
|
784
811
|
exports.sessionWebhooksSchema = sessionWebhooksSchema;
|
package/dist/schemas.d.cts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export { A as AgentInput, C as CancelSessionResponse, E as ExecuteAgentRequest, a as ExecuteAgentResponse,
|
|
1
|
+
export { A as AgentInput, C as CancelSessionResponse, E as ExecuteAgentRequest, a as ExecuteAgentResponse, O as SESSION_STREAM_EVENT_KINDS, R as SESSION_WEBHOOK_DEFAULT_EVENTS, a3 as SessionAgentEvent, d as SessionFileContentResponse, c as SessionFilesTreeResponse, f as SessionStatus, e as SessionStreamEvent, S as SessionTimelineResponse, g as SessionWebhookConfig, h as SessionWebhookEventPayload, i as SessionWebhookEventType, $ as SessionWebhookResult, j as SessionWebhookSubagent, k as SessionWebhookUsage, T as TimelineEvent, l as TimelineMetrics, m as TimelinePrompt, n as TimelineRunTurnMetrics, o as TimelineSpan, p as TimelineToolResult, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, q as agentInputSchema, P as cancelSessionResponseSchema, t as executeAgentErrorResponseSchema, r as executeAgentRequestSchema, u as executeAgentResponseSchema, s as executeAgentSuccessResponseSchema, V as isBlockedWebhookHostname, a2 as sessionAgentEventSchema, a4 as sessionAgentEventsSchema, M as sessionFileContentResponseSchema, L as sessionFilesTreeResponseSchema, z as sessionStatusSchema, N as sessionStreamEventSchema, B as sessionTimelineIdSchema, K as sessionTimelineResponseSchema, X as sessionWebhookConfigSchema, a1 as sessionWebhookEventPayloadSchema, Q as sessionWebhookEventTypeSchema, _ as sessionWebhookResultSchema, a0 as sessionWebhookSubagentSchema, Z as sessionWebhookUsageSchema, Y as sessionWebhooksSchema, I as timelineEventSchema, D as timelineMetricsSchema, F as timelinePromptSchema, H as timelineRunTurnMetricsSchema, J as timelineSpanSchema, G as timelineToolResultSchema, x as updateAgentModelErrorResponseSchema, v as updateAgentModelRequestSchema, y as updateAgentModelResponseSchema, w as updateAgentModelSuccessResponseSchema, W as validateWebhookUrl } from './shared/agent-sdk.c05c2d23.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
-
declare const nativeAnthropicModelIds: readonly ["claude-sonnet-4-5", "claude-sonnet-4-6", "claude-haiku-4-5", "claude-fable-5", "claude-opus-4-6", "claude-opus-4-7", "claude-opus-4-8"];
|
|
4
|
+
declare const nativeAnthropicModelIds: readonly ["claude-sonnet-4-5", "claude-sonnet-4-6", "claude-sonnet-5", "claude-haiku-4-5", "claude-fable-5", "claude-opus-4-6", "claude-opus-4-7", "claude-opus-4-8"];
|
|
5
5
|
type NativeAnthropicModelId = typeof nativeAnthropicModelIds[number];
|
|
6
6
|
type V3Provider = 'anthropic' | 'vertex-ai' | 'openrouter' | 'bedrock' | 'tela-claude-agent-gateway';
|
|
7
7
|
declare const nativeModelSchema: z.ZodEnum<{
|
|
8
8
|
"claude-sonnet-4-5": "claude-sonnet-4-5";
|
|
9
9
|
"claude-sonnet-4-6": "claude-sonnet-4-6";
|
|
10
|
+
"claude-sonnet-5": "claude-sonnet-5";
|
|
10
11
|
"claude-haiku-4-5": "claude-haiku-4-5";
|
|
11
12
|
"claude-fable-5": "claude-fable-5";
|
|
12
13
|
"claude-opus-4-6": "claude-opus-4-6";
|
package/dist/schemas.d.mts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export { A as AgentInput, C as CancelSessionResponse, E as ExecuteAgentRequest, a as ExecuteAgentResponse,
|
|
1
|
+
export { A as AgentInput, C as CancelSessionResponse, E as ExecuteAgentRequest, a as ExecuteAgentResponse, O as SESSION_STREAM_EVENT_KINDS, R as SESSION_WEBHOOK_DEFAULT_EVENTS, a3 as SessionAgentEvent, d as SessionFileContentResponse, c as SessionFilesTreeResponse, f as SessionStatus, e as SessionStreamEvent, S as SessionTimelineResponse, g as SessionWebhookConfig, h as SessionWebhookEventPayload, i as SessionWebhookEventType, $ as SessionWebhookResult, j as SessionWebhookSubagent, k as SessionWebhookUsage, T as TimelineEvent, l as TimelineMetrics, m as TimelinePrompt, n as TimelineRunTurnMetrics, o as TimelineSpan, p as TimelineToolResult, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, q as agentInputSchema, P as cancelSessionResponseSchema, t as executeAgentErrorResponseSchema, r as executeAgentRequestSchema, u as executeAgentResponseSchema, s as executeAgentSuccessResponseSchema, V as isBlockedWebhookHostname, a2 as sessionAgentEventSchema, a4 as sessionAgentEventsSchema, M as sessionFileContentResponseSchema, L as sessionFilesTreeResponseSchema, z as sessionStatusSchema, N as sessionStreamEventSchema, B as sessionTimelineIdSchema, K as sessionTimelineResponseSchema, X as sessionWebhookConfigSchema, a1 as sessionWebhookEventPayloadSchema, Q as sessionWebhookEventTypeSchema, _ as sessionWebhookResultSchema, a0 as sessionWebhookSubagentSchema, Z as sessionWebhookUsageSchema, Y as sessionWebhooksSchema, I as timelineEventSchema, D as timelineMetricsSchema, F as timelinePromptSchema, H as timelineRunTurnMetricsSchema, J as timelineSpanSchema, G as timelineToolResultSchema, x as updateAgentModelErrorResponseSchema, v as updateAgentModelRequestSchema, y as updateAgentModelResponseSchema, w as updateAgentModelSuccessResponseSchema, W as validateWebhookUrl } from './shared/agent-sdk.c05c2d23.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
-
declare const nativeAnthropicModelIds: readonly ["claude-sonnet-4-5", "claude-sonnet-4-6", "claude-haiku-4-5", "claude-fable-5", "claude-opus-4-6", "claude-opus-4-7", "claude-opus-4-8"];
|
|
4
|
+
declare const nativeAnthropicModelIds: readonly ["claude-sonnet-4-5", "claude-sonnet-4-6", "claude-sonnet-5", "claude-haiku-4-5", "claude-fable-5", "claude-opus-4-6", "claude-opus-4-7", "claude-opus-4-8"];
|
|
5
5
|
type NativeAnthropicModelId = typeof nativeAnthropicModelIds[number];
|
|
6
6
|
type V3Provider = 'anthropic' | 'vertex-ai' | 'openrouter' | 'bedrock' | 'tela-claude-agent-gateway';
|
|
7
7
|
declare const nativeModelSchema: z.ZodEnum<{
|
|
8
8
|
"claude-sonnet-4-5": "claude-sonnet-4-5";
|
|
9
9
|
"claude-sonnet-4-6": "claude-sonnet-4-6";
|
|
10
|
+
"claude-sonnet-5": "claude-sonnet-5";
|
|
10
11
|
"claude-haiku-4-5": "claude-haiku-4-5";
|
|
11
12
|
"claude-fable-5": "claude-fable-5";
|
|
12
13
|
"claude-opus-4-6": "claude-opus-4-6";
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export { A as AgentInput, C as CancelSessionResponse, E as ExecuteAgentRequest, a as ExecuteAgentResponse,
|
|
1
|
+
export { A as AgentInput, C as CancelSessionResponse, E as ExecuteAgentRequest, a as ExecuteAgentResponse, O as SESSION_STREAM_EVENT_KINDS, R as SESSION_WEBHOOK_DEFAULT_EVENTS, a3 as SessionAgentEvent, d as SessionFileContentResponse, c as SessionFilesTreeResponse, f as SessionStatus, e as SessionStreamEvent, S as SessionTimelineResponse, g as SessionWebhookConfig, h as SessionWebhookEventPayload, i as SessionWebhookEventType, $ as SessionWebhookResult, j as SessionWebhookSubagent, k as SessionWebhookUsage, T as TimelineEvent, l as TimelineMetrics, m as TimelinePrompt, n as TimelineRunTurnMetrics, o as TimelineSpan, p as TimelineToolResult, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, q as agentInputSchema, P as cancelSessionResponseSchema, t as executeAgentErrorResponseSchema, r as executeAgentRequestSchema, u as executeAgentResponseSchema, s as executeAgentSuccessResponseSchema, V as isBlockedWebhookHostname, a2 as sessionAgentEventSchema, a4 as sessionAgentEventsSchema, M as sessionFileContentResponseSchema, L as sessionFilesTreeResponseSchema, z as sessionStatusSchema, N as sessionStreamEventSchema, B as sessionTimelineIdSchema, K as sessionTimelineResponseSchema, X as sessionWebhookConfigSchema, a1 as sessionWebhookEventPayloadSchema, Q as sessionWebhookEventTypeSchema, _ as sessionWebhookResultSchema, a0 as sessionWebhookSubagentSchema, Z as sessionWebhookUsageSchema, Y as sessionWebhooksSchema, I as timelineEventSchema, D as timelineMetricsSchema, F as timelinePromptSchema, H as timelineRunTurnMetricsSchema, J as timelineSpanSchema, G as timelineToolResultSchema, x as updateAgentModelErrorResponseSchema, v as updateAgentModelRequestSchema, y as updateAgentModelResponseSchema, w as updateAgentModelSuccessResponseSchema, W as validateWebhookUrl } from './shared/agent-sdk.c05c2d23.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
-
declare const nativeAnthropicModelIds: readonly ["claude-sonnet-4-5", "claude-sonnet-4-6", "claude-haiku-4-5", "claude-fable-5", "claude-opus-4-6", "claude-opus-4-7", "claude-opus-4-8"];
|
|
4
|
+
declare const nativeAnthropicModelIds: readonly ["claude-sonnet-4-5", "claude-sonnet-4-6", "claude-sonnet-5", "claude-haiku-4-5", "claude-fable-5", "claude-opus-4-6", "claude-opus-4-7", "claude-opus-4-8"];
|
|
5
5
|
type NativeAnthropicModelId = typeof nativeAnthropicModelIds[number];
|
|
6
6
|
type V3Provider = 'anthropic' | 'vertex-ai' | 'openrouter' | 'bedrock' | 'tela-claude-agent-gateway';
|
|
7
7
|
declare const nativeModelSchema: z.ZodEnum<{
|
|
8
8
|
"claude-sonnet-4-5": "claude-sonnet-4-5";
|
|
9
9
|
"claude-sonnet-4-6": "claude-sonnet-4-6";
|
|
10
|
+
"claude-sonnet-5": "claude-sonnet-5";
|
|
10
11
|
"claude-haiku-4-5": "claude-haiku-4-5";
|
|
11
12
|
"claude-fable-5": "claude-fable-5";
|
|
12
13
|
"claude-opus-4-6": "claude-opus-4-6";
|
package/dist/schemas.mjs
CHANGED
|
@@ -427,6 +427,7 @@ const openrouterCatalog = /*@__PURE__*/getDefaultExportFromCjs(openrouterModels)
|
|
|
427
427
|
const nativeAnthropicModelIds = [
|
|
428
428
|
"claude-sonnet-4-5",
|
|
429
429
|
"claude-sonnet-4-6",
|
|
430
|
+
"claude-sonnet-5",
|
|
430
431
|
"claude-haiku-4-5",
|
|
431
432
|
"claude-fable-5",
|
|
432
433
|
"claude-opus-4-6",
|
|
@@ -524,6 +525,11 @@ const sessionWebhookUsageSchema = z.object({
|
|
|
524
525
|
durationMs: z.number().int().nonnegative().optional(),
|
|
525
526
|
numTurns: z.number().int().nonnegative().optional()
|
|
526
527
|
}).strict();
|
|
528
|
+
const sessionWebhookResultSchema = z.union([
|
|
529
|
+
z.string(),
|
|
530
|
+
z.record(z.string(), z.unknown()),
|
|
531
|
+
z.null()
|
|
532
|
+
]);
|
|
527
533
|
const sessionWebhookSubagentSchema = z.object({
|
|
528
534
|
callId: z.string().min(1).max(256),
|
|
529
535
|
subagentType: z.string().max(256).optional(),
|
|
@@ -537,7 +543,10 @@ const sessionWebhookEventPayloadSchema = z.object({
|
|
|
537
543
|
runId: z.string().optional(),
|
|
538
544
|
status: z.string(),
|
|
539
545
|
error: z.string().optional(),
|
|
546
|
+
interrupted: z.boolean().optional(),
|
|
547
|
+
failReason: z.string().optional(),
|
|
540
548
|
usage: sessionWebhookUsageSchema.optional(),
|
|
549
|
+
result: sessionWebhookResultSchema.optional(),
|
|
541
550
|
subagent: sessionWebhookSubagentSchema.optional(),
|
|
542
551
|
timestamp: z.string(),
|
|
543
552
|
apiVersion: z.literal("v4"),
|
|
@@ -602,8 +611,8 @@ const executeAgentResponseSchema = z.discriminatedUnion("success", [
|
|
|
602
611
|
const repositoryNameSchema = z.string().min(1, "Repository is required").max(200, "Repository must be 200 characters or less").regex(/^[\w.-]+$/, "Repository contains unsupported characters");
|
|
603
612
|
const updateAgentModelRequestSchema = z.object({
|
|
604
613
|
repository: repositoryNameSchema,
|
|
605
|
-
model: modelSchema,
|
|
606
|
-
commitMessage: z.string().max(4096, "Commit message must be 4096 characters or less").optional()
|
|
614
|
+
model: modelSchema.describe("Supported agent model id. The model prefix selects the provider template."),
|
|
615
|
+
commitMessage: z.string().max(4096, "Commit message must be 4096 characters or less").optional().describe("Optional commit message for the model/template update")
|
|
607
616
|
}).strict();
|
|
608
617
|
const updateAgentModelSuccessResponseSchema = z.object({
|
|
609
618
|
success: z.literal(true).describe("Whether the model update succeeded"),
|
|
@@ -698,6 +707,21 @@ const sessionTimelineResponseSchema = z.object({
|
|
|
698
707
|
prompt: timelinePromptSchema,
|
|
699
708
|
spans: z.array(timelineSpanSchema)
|
|
700
709
|
});
|
|
710
|
+
const sessionFilesTreeResponseSchema = z.object({
|
|
711
|
+
sessionId: z.string(),
|
|
712
|
+
tree: z.array(z.object({
|
|
713
|
+
path: z.string(),
|
|
714
|
+
size: z.number()
|
|
715
|
+
})),
|
|
716
|
+
truncated: z.boolean(),
|
|
717
|
+
capturedAt: z.number()
|
|
718
|
+
});
|
|
719
|
+
const sessionFileContentResponseSchema = z.object({
|
|
720
|
+
filePath: z.string(),
|
|
721
|
+
content: z.string(),
|
|
722
|
+
encoding: z.enum(["raw", "base64"]),
|
|
723
|
+
size: z.number()
|
|
724
|
+
});
|
|
701
725
|
const sessionStatusEventSchema = z.object({
|
|
702
726
|
kind: z.literal("status"),
|
|
703
727
|
sessionId: z.string(),
|
|
@@ -754,4 +778,4 @@ const cancelSessionResponseSchema = z.discriminatedUnion("success", [
|
|
|
754
778
|
z.object({ success: z.literal(false), error: z.string() })
|
|
755
779
|
]);
|
|
756
780
|
|
|
757
|
-
export { SESSION_STREAM_EVENT_KINDS, SESSION_WEBHOOK_DEFAULT_EVENTS, agentInputSchema, cancelSessionResponseSchema, executeAgentErrorResponseSchema, executeAgentRequestSchema, executeAgentResponseSchema, executeAgentSuccessResponseSchema, isBlockedWebhookHostname, modelSchema, nativeAnthropicModelIds, nativeModelSchema, openrouterModelCatalog, openrouterModelIds, sessionAgentEventSchema, sessionAgentEventsSchema, sessionStatusSchema, sessionStreamEventSchema, sessionTimelineIdSchema, sessionTimelineResponseSchema, sessionWebhookConfigSchema, sessionWebhookEventPayloadSchema, sessionWebhookEventTypeSchema, sessionWebhookSubagentSchema, sessionWebhookUsageSchema, sessionWebhooksSchema, timelineEventSchema, timelineMetricsSchema, timelinePromptSchema, timelineRunTurnMetricsSchema, timelineSpanSchema, timelineToolResultSchema, updateAgentModelErrorResponseSchema, updateAgentModelRequestSchema, updateAgentModelResponseSchema, updateAgentModelSuccessResponseSchema, validateWebhookUrl };
|
|
781
|
+
export { SESSION_STREAM_EVENT_KINDS, SESSION_WEBHOOK_DEFAULT_EVENTS, agentInputSchema, cancelSessionResponseSchema, executeAgentErrorResponseSchema, executeAgentRequestSchema, executeAgentResponseSchema, executeAgentSuccessResponseSchema, isBlockedWebhookHostname, modelSchema, nativeAnthropicModelIds, nativeModelSchema, openrouterModelCatalog, openrouterModelIds, sessionAgentEventSchema, sessionAgentEventsSchema, sessionFileContentResponseSchema, sessionFilesTreeResponseSchema, sessionStatusSchema, sessionStreamEventSchema, sessionTimelineIdSchema, sessionTimelineResponseSchema, sessionWebhookConfigSchema, sessionWebhookEventPayloadSchema, sessionWebhookEventTypeSchema, sessionWebhookResultSchema, sessionWebhookSubagentSchema, sessionWebhookUsageSchema, sessionWebhooksSchema, timelineEventSchema, timelineMetricsSchema, timelinePromptSchema, timelineRunTurnMetricsSchema, timelineSpanSchema, timelineToolResultSchema, updateAgentModelErrorResponseSchema, updateAgentModelRequestSchema, updateAgentModelResponseSchema, updateAgentModelSuccessResponseSchema, validateWebhookUrl };
|
|
@@ -242,6 +242,26 @@ declare const sessionTimelineResponseSchema: z.ZodObject<{
|
|
|
242
242
|
}, z.core.$strip>>;
|
|
243
243
|
}, z.core.$strip>;
|
|
244
244
|
type SessionTimelineResponse = z.infer<typeof sessionTimelineResponseSchema>;
|
|
245
|
+
declare const sessionFilesTreeResponseSchema: z.ZodObject<{
|
|
246
|
+
sessionId: z.ZodString;
|
|
247
|
+
tree: z.ZodArray<z.ZodObject<{
|
|
248
|
+
path: z.ZodString;
|
|
249
|
+
size: z.ZodNumber;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
truncated: z.ZodBoolean;
|
|
252
|
+
capturedAt: z.ZodNumber;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
type SessionFilesTreeResponse = z.infer<typeof sessionFilesTreeResponseSchema>;
|
|
255
|
+
declare const sessionFileContentResponseSchema: z.ZodObject<{
|
|
256
|
+
filePath: z.ZodString;
|
|
257
|
+
content: z.ZodString;
|
|
258
|
+
encoding: z.ZodEnum<{
|
|
259
|
+
raw: "raw";
|
|
260
|
+
base64: "base64";
|
|
261
|
+
}>;
|
|
262
|
+
size: z.ZodNumber;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
type SessionFileContentResponse = z.infer<typeof sessionFileContentResponseSchema>;
|
|
245
265
|
declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
246
266
|
kind: z.ZodLiteral<"status">;
|
|
247
267
|
sessionId: z.ZodString;
|
|
@@ -439,6 +459,8 @@ declare const sessionWebhookUsageSchema: z.ZodObject<{
|
|
|
439
459
|
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
440
460
|
}, z.core.$strict>;
|
|
441
461
|
type SessionWebhookUsage = z.infer<typeof sessionWebhookUsageSchema>;
|
|
462
|
+
declare const sessionWebhookResultSchema: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>;
|
|
463
|
+
type SessionWebhookResult = z.infer<typeof sessionWebhookResultSchema>;
|
|
442
464
|
declare const sessionWebhookSubagentSchema: z.ZodObject<{
|
|
443
465
|
callId: z.ZodString;
|
|
444
466
|
subagentType: z.ZodOptional<z.ZodString>;
|
|
@@ -464,6 +486,8 @@ declare const sessionWebhookEventPayloadSchema: z.ZodObject<{
|
|
|
464
486
|
runId: z.ZodOptional<z.ZodString>;
|
|
465
487
|
status: z.ZodString;
|
|
466
488
|
error: z.ZodOptional<z.ZodString>;
|
|
489
|
+
interrupted: z.ZodOptional<z.ZodBoolean>;
|
|
490
|
+
failReason: z.ZodOptional<z.ZodString>;
|
|
467
491
|
usage: z.ZodOptional<z.ZodObject<{
|
|
468
492
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
469
493
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -473,6 +497,7 @@ declare const sessionWebhookEventPayloadSchema: z.ZodObject<{
|
|
|
473
497
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
474
498
|
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
475
499
|
}, z.core.$strict>>;
|
|
500
|
+
result: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
476
501
|
subagent: z.ZodOptional<z.ZodObject<{
|
|
477
502
|
callId: z.ZodString;
|
|
478
503
|
subagentType: z.ZodOptional<z.ZodString>;
|
|
@@ -517,5 +542,5 @@ declare const sessionAgentEventsSchema: z.ZodArray<z.ZodObject<{
|
|
|
517
542
|
timestamp: z.ZodNumber;
|
|
518
543
|
}, z.core.$strict>>;
|
|
519
544
|
|
|
520
|
-
export {
|
|
521
|
-
export type { AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U,
|
|
545
|
+
export { sessionTimelineIdSchema as B, timelineMetricsSchema as D, timelinePromptSchema as F, timelineToolResultSchema as G, timelineRunTurnMetricsSchema as H, timelineEventSchema as I, timelineSpanSchema as J, sessionTimelineResponseSchema as K, sessionFilesTreeResponseSchema as L, sessionFileContentResponseSchema as M, sessionStreamEventSchema as N, SESSION_STREAM_EVENT_KINDS as O, cancelSessionResponseSchema as P, sessionWebhookEventTypeSchema as Q, SESSION_WEBHOOK_DEFAULT_EVENTS as R, isBlockedWebhookHostname as V, validateWebhookUrl as W, sessionWebhookConfigSchema as X, sessionWebhooksSchema as Y, sessionWebhookUsageSchema as Z, sessionWebhookResultSchema as _, sessionWebhookSubagentSchema as a0, sessionWebhookEventPayloadSchema as a1, sessionAgentEventSchema as a2, sessionAgentEventsSchema as a4, agentInputSchema as q, executeAgentRequestSchema as r, executeAgentSuccessResponseSchema as s, executeAgentErrorResponseSchema as t, executeAgentResponseSchema as u, updateAgentModelRequestSchema as v, updateAgentModelSuccessResponseSchema as w, updateAgentModelErrorResponseSchema as x, updateAgentModelResponseSchema as y, sessionStatusSchema as z };
|
|
546
|
+
export type { SessionWebhookResult as $, AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U, ExecuteAgentResponse as a, SessionAgentEvent as a3, UpdateAgentModelResponse as b, SessionFilesTreeResponse as c, SessionFileContentResponse as d, SessionStreamEvent as e, SessionStatus as f, SessionWebhookConfig as g, SessionWebhookEventPayload as h, SessionWebhookEventType as i, SessionWebhookSubagent as j, SessionWebhookUsage as k, TimelineMetrics as l, TimelinePrompt as m, TimelineRunTurnMetrics as n, TimelineSpan as o, TimelineToolResult as p };
|
|
@@ -242,6 +242,26 @@ declare const sessionTimelineResponseSchema: z.ZodObject<{
|
|
|
242
242
|
}, z.core.$strip>>;
|
|
243
243
|
}, z.core.$strip>;
|
|
244
244
|
type SessionTimelineResponse = z.infer<typeof sessionTimelineResponseSchema>;
|
|
245
|
+
declare const sessionFilesTreeResponseSchema: z.ZodObject<{
|
|
246
|
+
sessionId: z.ZodString;
|
|
247
|
+
tree: z.ZodArray<z.ZodObject<{
|
|
248
|
+
path: z.ZodString;
|
|
249
|
+
size: z.ZodNumber;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
truncated: z.ZodBoolean;
|
|
252
|
+
capturedAt: z.ZodNumber;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
type SessionFilesTreeResponse = z.infer<typeof sessionFilesTreeResponseSchema>;
|
|
255
|
+
declare const sessionFileContentResponseSchema: z.ZodObject<{
|
|
256
|
+
filePath: z.ZodString;
|
|
257
|
+
content: z.ZodString;
|
|
258
|
+
encoding: z.ZodEnum<{
|
|
259
|
+
raw: "raw";
|
|
260
|
+
base64: "base64";
|
|
261
|
+
}>;
|
|
262
|
+
size: z.ZodNumber;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
type SessionFileContentResponse = z.infer<typeof sessionFileContentResponseSchema>;
|
|
245
265
|
declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
246
266
|
kind: z.ZodLiteral<"status">;
|
|
247
267
|
sessionId: z.ZodString;
|
|
@@ -439,6 +459,8 @@ declare const sessionWebhookUsageSchema: z.ZodObject<{
|
|
|
439
459
|
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
440
460
|
}, z.core.$strict>;
|
|
441
461
|
type SessionWebhookUsage = z.infer<typeof sessionWebhookUsageSchema>;
|
|
462
|
+
declare const sessionWebhookResultSchema: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>;
|
|
463
|
+
type SessionWebhookResult = z.infer<typeof sessionWebhookResultSchema>;
|
|
442
464
|
declare const sessionWebhookSubagentSchema: z.ZodObject<{
|
|
443
465
|
callId: z.ZodString;
|
|
444
466
|
subagentType: z.ZodOptional<z.ZodString>;
|
|
@@ -464,6 +486,8 @@ declare const sessionWebhookEventPayloadSchema: z.ZodObject<{
|
|
|
464
486
|
runId: z.ZodOptional<z.ZodString>;
|
|
465
487
|
status: z.ZodString;
|
|
466
488
|
error: z.ZodOptional<z.ZodString>;
|
|
489
|
+
interrupted: z.ZodOptional<z.ZodBoolean>;
|
|
490
|
+
failReason: z.ZodOptional<z.ZodString>;
|
|
467
491
|
usage: z.ZodOptional<z.ZodObject<{
|
|
468
492
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
469
493
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -473,6 +497,7 @@ declare const sessionWebhookEventPayloadSchema: z.ZodObject<{
|
|
|
473
497
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
474
498
|
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
475
499
|
}, z.core.$strict>>;
|
|
500
|
+
result: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
476
501
|
subagent: z.ZodOptional<z.ZodObject<{
|
|
477
502
|
callId: z.ZodString;
|
|
478
503
|
subagentType: z.ZodOptional<z.ZodString>;
|
|
@@ -517,5 +542,5 @@ declare const sessionAgentEventsSchema: z.ZodArray<z.ZodObject<{
|
|
|
517
542
|
timestamp: z.ZodNumber;
|
|
518
543
|
}, z.core.$strict>>;
|
|
519
544
|
|
|
520
|
-
export {
|
|
521
|
-
export type { AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U,
|
|
545
|
+
export { sessionTimelineIdSchema as B, timelineMetricsSchema as D, timelinePromptSchema as F, timelineToolResultSchema as G, timelineRunTurnMetricsSchema as H, timelineEventSchema as I, timelineSpanSchema as J, sessionTimelineResponseSchema as K, sessionFilesTreeResponseSchema as L, sessionFileContentResponseSchema as M, sessionStreamEventSchema as N, SESSION_STREAM_EVENT_KINDS as O, cancelSessionResponseSchema as P, sessionWebhookEventTypeSchema as Q, SESSION_WEBHOOK_DEFAULT_EVENTS as R, isBlockedWebhookHostname as V, validateWebhookUrl as W, sessionWebhookConfigSchema as X, sessionWebhooksSchema as Y, sessionWebhookUsageSchema as Z, sessionWebhookResultSchema as _, sessionWebhookSubagentSchema as a0, sessionWebhookEventPayloadSchema as a1, sessionAgentEventSchema as a2, sessionAgentEventsSchema as a4, agentInputSchema as q, executeAgentRequestSchema as r, executeAgentSuccessResponseSchema as s, executeAgentErrorResponseSchema as t, executeAgentResponseSchema as u, updateAgentModelRequestSchema as v, updateAgentModelSuccessResponseSchema as w, updateAgentModelErrorResponseSchema as x, updateAgentModelResponseSchema as y, sessionStatusSchema as z };
|
|
546
|
+
export type { SessionWebhookResult as $, AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U, ExecuteAgentResponse as a, SessionAgentEvent as a3, UpdateAgentModelResponse as b, SessionFilesTreeResponse as c, SessionFileContentResponse as d, SessionStreamEvent as e, SessionStatus as f, SessionWebhookConfig as g, SessionWebhookEventPayload as h, SessionWebhookEventType as i, SessionWebhookSubagent as j, SessionWebhookUsage as k, TimelineMetrics as l, TimelinePrompt as m, TimelineRunTurnMetrics as n, TimelineSpan as o, TimelineToolResult as p };
|
|
@@ -242,6 +242,26 @@ declare const sessionTimelineResponseSchema: z.ZodObject<{
|
|
|
242
242
|
}, z.core.$strip>>;
|
|
243
243
|
}, z.core.$strip>;
|
|
244
244
|
type SessionTimelineResponse = z.infer<typeof sessionTimelineResponseSchema>;
|
|
245
|
+
declare const sessionFilesTreeResponseSchema: z.ZodObject<{
|
|
246
|
+
sessionId: z.ZodString;
|
|
247
|
+
tree: z.ZodArray<z.ZodObject<{
|
|
248
|
+
path: z.ZodString;
|
|
249
|
+
size: z.ZodNumber;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
truncated: z.ZodBoolean;
|
|
252
|
+
capturedAt: z.ZodNumber;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
type SessionFilesTreeResponse = z.infer<typeof sessionFilesTreeResponseSchema>;
|
|
255
|
+
declare const sessionFileContentResponseSchema: z.ZodObject<{
|
|
256
|
+
filePath: z.ZodString;
|
|
257
|
+
content: z.ZodString;
|
|
258
|
+
encoding: z.ZodEnum<{
|
|
259
|
+
raw: "raw";
|
|
260
|
+
base64: "base64";
|
|
261
|
+
}>;
|
|
262
|
+
size: z.ZodNumber;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
type SessionFileContentResponse = z.infer<typeof sessionFileContentResponseSchema>;
|
|
245
265
|
declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
246
266
|
kind: z.ZodLiteral<"status">;
|
|
247
267
|
sessionId: z.ZodString;
|
|
@@ -439,6 +459,8 @@ declare const sessionWebhookUsageSchema: z.ZodObject<{
|
|
|
439
459
|
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
440
460
|
}, z.core.$strict>;
|
|
441
461
|
type SessionWebhookUsage = z.infer<typeof sessionWebhookUsageSchema>;
|
|
462
|
+
declare const sessionWebhookResultSchema: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>;
|
|
463
|
+
type SessionWebhookResult = z.infer<typeof sessionWebhookResultSchema>;
|
|
442
464
|
declare const sessionWebhookSubagentSchema: z.ZodObject<{
|
|
443
465
|
callId: z.ZodString;
|
|
444
466
|
subagentType: z.ZodOptional<z.ZodString>;
|
|
@@ -464,6 +486,8 @@ declare const sessionWebhookEventPayloadSchema: z.ZodObject<{
|
|
|
464
486
|
runId: z.ZodOptional<z.ZodString>;
|
|
465
487
|
status: z.ZodString;
|
|
466
488
|
error: z.ZodOptional<z.ZodString>;
|
|
489
|
+
interrupted: z.ZodOptional<z.ZodBoolean>;
|
|
490
|
+
failReason: z.ZodOptional<z.ZodString>;
|
|
467
491
|
usage: z.ZodOptional<z.ZodObject<{
|
|
468
492
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
469
493
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -473,6 +497,7 @@ declare const sessionWebhookEventPayloadSchema: z.ZodObject<{
|
|
|
473
497
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
474
498
|
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
475
499
|
}, z.core.$strict>>;
|
|
500
|
+
result: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
476
501
|
subagent: z.ZodOptional<z.ZodObject<{
|
|
477
502
|
callId: z.ZodString;
|
|
478
503
|
subagentType: z.ZodOptional<z.ZodString>;
|
|
@@ -517,5 +542,5 @@ declare const sessionAgentEventsSchema: z.ZodArray<z.ZodObject<{
|
|
|
517
542
|
timestamp: z.ZodNumber;
|
|
518
543
|
}, z.core.$strict>>;
|
|
519
544
|
|
|
520
|
-
export {
|
|
521
|
-
export type { AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U,
|
|
545
|
+
export { sessionTimelineIdSchema as B, timelineMetricsSchema as D, timelinePromptSchema as F, timelineToolResultSchema as G, timelineRunTurnMetricsSchema as H, timelineEventSchema as I, timelineSpanSchema as J, sessionTimelineResponseSchema as K, sessionFilesTreeResponseSchema as L, sessionFileContentResponseSchema as M, sessionStreamEventSchema as N, SESSION_STREAM_EVENT_KINDS as O, cancelSessionResponseSchema as P, sessionWebhookEventTypeSchema as Q, SESSION_WEBHOOK_DEFAULT_EVENTS as R, isBlockedWebhookHostname as V, validateWebhookUrl as W, sessionWebhookConfigSchema as X, sessionWebhooksSchema as Y, sessionWebhookUsageSchema as Z, sessionWebhookResultSchema as _, sessionWebhookSubagentSchema as a0, sessionWebhookEventPayloadSchema as a1, sessionAgentEventSchema as a2, sessionAgentEventsSchema as a4, agentInputSchema as q, executeAgentRequestSchema as r, executeAgentSuccessResponseSchema as s, executeAgentErrorResponseSchema as t, executeAgentResponseSchema as u, updateAgentModelRequestSchema as v, updateAgentModelSuccessResponseSchema as w, updateAgentModelErrorResponseSchema as x, updateAgentModelResponseSchema as y, sessionStatusSchema as z };
|
|
546
|
+
export type { SessionWebhookResult as $, AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U, ExecuteAgentResponse as a, SessionAgentEvent as a3, UpdateAgentModelResponse as b, SessionFilesTreeResponse as c, SessionFileContentResponse as d, SessionStreamEvent as e, SessionStatus as f, SessionWebhookConfig as g, SessionWebhookEventPayload as h, SessionWebhookEventType as i, SessionWebhookSubagent as j, SessionWebhookUsage as k, TimelineMetrics as l, TimelinePrompt as m, TimelineRunTurnMetrics as n, TimelineSpan as o, TimelineToolResult as p };
|