@meistrari/agent-sdk 0.5.1 → 0.7.0
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 +8 -21
- package/dist/index.cjs +4 -16
- package/dist/index.d.cts +4 -9
- package/dist/index.d.mts +4 -9
- package/dist/index.d.ts +4 -9
- package/dist/index.mjs +5 -17
- package/dist/schemas.cjs +32 -0
- package/dist/schemas.d.cts +1 -1
- package/dist/schemas.d.mts +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.mjs +29 -1
- package/dist/shared/{agent-sdk.c05c2d23.d.cts → agent-sdk.19cf779d.d.cts} +185 -6
- package/dist/shared/{agent-sdk.c05c2d23.d.mts → agent-sdk.19cf779d.d.mts} +185 -6
- package/dist/shared/{agent-sdk.c05c2d23.d.ts → agent-sdk.19cf779d.d.ts} +185 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ Multi-turn lifecycle rules:
|
|
|
91
91
|
- Continue only after the stream reaches a `result` event with `status: 'waiting_messages'`.
|
|
92
92
|
- Continuations while the session is `pending` or `running` fail with `409`.
|
|
93
93
|
- Treat `completed`, `failed`, and `cancelled` as non-normal follow-up states in SDK consumers.
|
|
94
|
-
-
|
|
94
|
+
- Continue by calling `executeAgent()` again with `sessionId`; consume the updated run through `streamSession()`.
|
|
95
95
|
|
|
96
96
|
### Cancel a running session
|
|
97
97
|
|
|
@@ -204,24 +204,11 @@ console.log(timeline.status, timeline.metrics, timeline.spans)
|
|
|
204
204
|
`prompt`, and `spans`. It does not return per-event detail. Consumers that need timeline
|
|
205
205
|
events should consume `streamSession` and merge stream-derived timeline events locally.
|
|
206
206
|
|
|
207
|
-
### Fetch
|
|
207
|
+
### Fetch artifacts
|
|
208
208
|
|
|
209
|
-
|
|
210
|
-
|
|
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.
|
|
209
|
+
Artifact payloads are exposed as `vault://` references in `streamSession()` events.
|
|
210
|
+
Read the session stream, pick the reference you need from a step or result event, then
|
|
211
|
+
call `resolveReference()` to download the bytes, stream, or JSON payload.
|
|
225
212
|
|
|
226
213
|
### Resolve Vault references
|
|
227
214
|
|
|
@@ -247,6 +234,6 @@ This package mirrors `@meistrari/vault-sdk` and is published as `UNLICENSED`.
|
|
|
247
234
|
|
|
248
235
|
Focused on sandbox execution and the public v4 consumer paths: `executeAgent` (including
|
|
249
236
|
session webhook registration), `streamSession`, `cancelSession`, `updateAgentModel`,
|
|
250
|
-
`fetchTimeline`, `
|
|
251
|
-
|
|
252
|
-
|
|
237
|
+
`fetchTimeline`, `resolveReference`, and webhook signature verification via
|
|
238
|
+
`verifyWebhookSignature`. Agent CRUD, legacy polling, and the internal sandbox timeline
|
|
239
|
+
callback are intentionally out of scope.
|
package/dist/index.cjs
CHANGED
|
@@ -231,25 +231,14 @@ function agentClient(config) {
|
|
|
231
231
|
});
|
|
232
232
|
return schemas.sessionTimelineResponseSchema.parse(await response.json());
|
|
233
233
|
}
|
|
234
|
-
async function
|
|
234
|
+
async function fetchThread(sessionId, options) {
|
|
235
235
|
const parsedSessionId = schemas.sessionTimelineIdSchema.parse(sessionId);
|
|
236
236
|
const response = await request({
|
|
237
237
|
method: "GET",
|
|
238
|
-
path: `/
|
|
238
|
+
path: `/v4/sessions/${encodeURIComponent(parsedSessionId)}/thread`,
|
|
239
239
|
signal: options?.signal
|
|
240
240
|
});
|
|
241
|
-
return schemas.
|
|
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());
|
|
241
|
+
return schemas.sessionThreadResponseSchema.parse(await response.json());
|
|
253
242
|
}
|
|
254
243
|
async function cancelSession(sessionId) {
|
|
255
244
|
const parsedSessionId = schemas.sessionTimelineIdSchema.parse(sessionId);
|
|
@@ -299,8 +288,7 @@ function agentClient(config) {
|
|
|
299
288
|
executeAgent,
|
|
300
289
|
updateAgentModel,
|
|
301
290
|
fetchTimeline,
|
|
302
|
-
|
|
303
|
-
fetchSessionFile,
|
|
291
|
+
fetchThread,
|
|
304
292
|
cancelSession,
|
|
305
293
|
streamSession,
|
|
306
294
|
resolveReference
|
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
|
|
2
|
-
export { A as AgentInput,
|
|
1
|
+
import { E as ExecuteAgentRequest, a as ExecuteAgentResponse, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, S as SessionTimelineResponse, c as SessionThreadResponse, C as CancelSessionResponse, d as SessionStreamEvent } from './shared/agent-sdk.19cf779d.cjs';
|
|
2
|
+
export { A as AgentInput, e as SessionStatus, f as SessionThreadTurn, 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.19cf779d.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface AuthStrategy {
|
|
@@ -38,12 +38,7 @@ 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
|
-
|
|
42
|
-
signal?: AbortSignal;
|
|
43
|
-
}) => Promise<SessionFilesTreeResponse>;
|
|
44
|
-
fetchSessionFile: (sessionId: string, filePath: string, options?: {
|
|
45
|
-
signal?: AbortSignal;
|
|
46
|
-
}) => Promise<SessionFileContentResponse>;
|
|
41
|
+
fetchThread: (sessionId: string, options?: FetchTimelineOptions) => Promise<SessionThreadResponse>;
|
|
47
42
|
cancelSession: (sessionId: string) => Promise<CancelSessionResponse>;
|
|
48
43
|
streamSession: (sessionId: string, options?: StreamSessionOptions) => Promise<AsyncIterable<SessionStreamEvent>>;
|
|
49
44
|
resolveReference: {
|
|
@@ -87,5 +82,5 @@ declare function parseSessionStream(stream: ReadableStream<Uint8Array>): AsyncIt
|
|
|
87
82
|
|
|
88
83
|
declare function verifyWebhookSignature(rawBody: string | Uint8Array, signatureHeader: string | null | undefined, secret: string): Promise<boolean>;
|
|
89
84
|
|
|
90
|
-
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError,
|
|
85
|
+
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError, SessionStreamEvent, SessionThreadResponse, SessionTimelineResponse, UpdateAgentModelRequest, UpdateAgentModelResponse, agentClient, isFetchError, isNetworkError, parseSessionStream, verifyWebhookSignature };
|
|
91
86
|
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
|
|
2
|
-
export { A as AgentInput,
|
|
1
|
+
import { E as ExecuteAgentRequest, a as ExecuteAgentResponse, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, S as SessionTimelineResponse, c as SessionThreadResponse, C as CancelSessionResponse, d as SessionStreamEvent } from './shared/agent-sdk.19cf779d.mjs';
|
|
2
|
+
export { A as AgentInput, e as SessionStatus, f as SessionThreadTurn, 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.19cf779d.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface AuthStrategy {
|
|
@@ -38,12 +38,7 @@ 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
|
-
|
|
42
|
-
signal?: AbortSignal;
|
|
43
|
-
}) => Promise<SessionFilesTreeResponse>;
|
|
44
|
-
fetchSessionFile: (sessionId: string, filePath: string, options?: {
|
|
45
|
-
signal?: AbortSignal;
|
|
46
|
-
}) => Promise<SessionFileContentResponse>;
|
|
41
|
+
fetchThread: (sessionId: string, options?: FetchTimelineOptions) => Promise<SessionThreadResponse>;
|
|
47
42
|
cancelSession: (sessionId: string) => Promise<CancelSessionResponse>;
|
|
48
43
|
streamSession: (sessionId: string, options?: StreamSessionOptions) => Promise<AsyncIterable<SessionStreamEvent>>;
|
|
49
44
|
resolveReference: {
|
|
@@ -87,5 +82,5 @@ declare function parseSessionStream(stream: ReadableStream<Uint8Array>): AsyncIt
|
|
|
87
82
|
|
|
88
83
|
declare function verifyWebhookSignature(rawBody: string | Uint8Array, signatureHeader: string | null | undefined, secret: string): Promise<boolean>;
|
|
89
84
|
|
|
90
|
-
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError,
|
|
85
|
+
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError, SessionStreamEvent, SessionThreadResponse, SessionTimelineResponse, UpdateAgentModelRequest, UpdateAgentModelResponse, agentClient, isFetchError, isNetworkError, parseSessionStream, verifyWebhookSignature };
|
|
91
86
|
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
|
|
2
|
-
export { A as AgentInput,
|
|
1
|
+
import { E as ExecuteAgentRequest, a as ExecuteAgentResponse, U as UpdateAgentModelRequest, b as UpdateAgentModelResponse, S as SessionTimelineResponse, c as SessionThreadResponse, C as CancelSessionResponse, d as SessionStreamEvent } from './shared/agent-sdk.19cf779d.js';
|
|
2
|
+
export { A as AgentInput, e as SessionStatus, f as SessionThreadTurn, 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.19cf779d.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface AuthStrategy {
|
|
@@ -38,12 +38,7 @@ 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
|
-
|
|
42
|
-
signal?: AbortSignal;
|
|
43
|
-
}) => Promise<SessionFilesTreeResponse>;
|
|
44
|
-
fetchSessionFile: (sessionId: string, filePath: string, options?: {
|
|
45
|
-
signal?: AbortSignal;
|
|
46
|
-
}) => Promise<SessionFileContentResponse>;
|
|
41
|
+
fetchThread: (sessionId: string, options?: FetchTimelineOptions) => Promise<SessionThreadResponse>;
|
|
47
42
|
cancelSession: (sessionId: string) => Promise<CancelSessionResponse>;
|
|
48
43
|
streamSession: (sessionId: string, options?: StreamSessionOptions) => Promise<AsyncIterable<SessionStreamEvent>>;
|
|
49
44
|
resolveReference: {
|
|
@@ -87,5 +82,5 @@ declare function parseSessionStream(stream: ReadableStream<Uint8Array>): AsyncIt
|
|
|
87
82
|
|
|
88
83
|
declare function verifyWebhookSignature(rawBody: string | Uint8Array, signatureHeader: string | null | undefined, secret: string): Promise<boolean>;
|
|
89
84
|
|
|
90
|
-
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError,
|
|
85
|
+
export { APIKeyAuthStrategy, CancelSessionResponse, DataTokenAuthStrategy, ExecuteAgentRequest, ExecuteAgentResponse, FetchError, NetworkError, SessionStreamEvent, SessionThreadResponse, SessionTimelineResponse, UpdateAgentModelRequest, UpdateAgentModelResponse, agentClient, isFetchError, isNetworkError, parseSessionStream, verifyWebhookSignature };
|
|
91
86
|
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,
|
|
2
|
+
import { SESSION_STREAM_EVENT_KINDS, sessionStreamEventSchema, executeAgentRequestSchema, executeAgentResponseSchema, updateAgentModelRequestSchema, updateAgentModelResponseSchema, sessionTimelineIdSchema, sessionTimelineResponseSchema, sessionThreadResponseSchema, cancelSessionResponseSchema } from './schemas.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
var __defProp$1 = Object.defineProperty;
|
|
@@ -229,25 +229,14 @@ function agentClient(config) {
|
|
|
229
229
|
});
|
|
230
230
|
return sessionTimelineResponseSchema.parse(await response.json());
|
|
231
231
|
}
|
|
232
|
-
async function
|
|
232
|
+
async function fetchThread(sessionId, options) {
|
|
233
233
|
const parsedSessionId = sessionTimelineIdSchema.parse(sessionId);
|
|
234
234
|
const response = await request({
|
|
235
235
|
method: "GET",
|
|
236
|
-
path: `/
|
|
236
|
+
path: `/v4/sessions/${encodeURIComponent(parsedSessionId)}/thread`,
|
|
237
237
|
signal: options?.signal
|
|
238
238
|
});
|
|
239
|
-
return
|
|
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());
|
|
239
|
+
return sessionThreadResponseSchema.parse(await response.json());
|
|
251
240
|
}
|
|
252
241
|
async function cancelSession(sessionId) {
|
|
253
242
|
const parsedSessionId = sessionTimelineIdSchema.parse(sessionId);
|
|
@@ -297,8 +286,7 @@ function agentClient(config) {
|
|
|
297
286
|
executeAgent,
|
|
298
287
|
updateAgentModel,
|
|
299
288
|
fetchTimeline,
|
|
300
|
-
|
|
301
|
-
fetchSessionFile,
|
|
289
|
+
fetchThread,
|
|
302
290
|
cancelSession,
|
|
303
291
|
streamSession,
|
|
304
292
|
resolveReference
|
package/dist/schemas.cjs
CHANGED
|
@@ -709,6 +709,34 @@ const sessionTimelineResponseSchema = zod.z.object({
|
|
|
709
709
|
prompt: timelinePromptSchema,
|
|
710
710
|
spans: zod.z.array(timelineSpanSchema)
|
|
711
711
|
});
|
|
712
|
+
const sessionThreadUserMessageSchema = zod.z.object({
|
|
713
|
+
text: zod.z.string().nullable(),
|
|
714
|
+
attachments: zod.z.unknown().nullable().optional()
|
|
715
|
+
});
|
|
716
|
+
const sessionThreadAssistantMessageSchema = zod.z.object({
|
|
717
|
+
status: zod.z.string().nullable(),
|
|
718
|
+
text: zod.z.string().nullable(),
|
|
719
|
+
structuredContent: zod.z.unknown().nullable().optional(),
|
|
720
|
+
events: zod.z.array(timelineEventSchema).nullable().optional(),
|
|
721
|
+
attachments: zod.z.unknown().nullable().optional(),
|
|
722
|
+
usage: zod.z.unknown().nullable().optional()
|
|
723
|
+
});
|
|
724
|
+
const sessionThreadTurnSchema = zod.z.object({
|
|
725
|
+
runId: zod.z.string(),
|
|
726
|
+
index: zod.z.number().int().nonnegative(),
|
|
727
|
+
isContinuation: zod.z.boolean(),
|
|
728
|
+
status: zod.z.string().nullable(),
|
|
729
|
+
createdAt: zod.z.number().nullable(),
|
|
730
|
+
finishedAt: zod.z.number().nullable(),
|
|
731
|
+
user: sessionThreadUserMessageSchema.nullable(),
|
|
732
|
+
assistant: sessionThreadAssistantMessageSchema.nullable()
|
|
733
|
+
});
|
|
734
|
+
const sessionThreadResponseSchema = zod.z.object({
|
|
735
|
+
sessionId: zod.z.string(),
|
|
736
|
+
status: zod.z.string(),
|
|
737
|
+
turnCount: zod.z.number().int().nonnegative(),
|
|
738
|
+
turns: zod.z.array(sessionThreadTurnSchema)
|
|
739
|
+
});
|
|
712
740
|
const sessionFilesTreeResponseSchema = zod.z.object({
|
|
713
741
|
sessionId: zod.z.string(),
|
|
714
742
|
tree: zod.z.array(zod.z.object({
|
|
@@ -800,6 +828,10 @@ exports.sessionFileContentResponseSchema = sessionFileContentResponseSchema;
|
|
|
800
828
|
exports.sessionFilesTreeResponseSchema = sessionFilesTreeResponseSchema;
|
|
801
829
|
exports.sessionStatusSchema = sessionStatusSchema;
|
|
802
830
|
exports.sessionStreamEventSchema = sessionStreamEventSchema;
|
|
831
|
+
exports.sessionThreadAssistantMessageSchema = sessionThreadAssistantMessageSchema;
|
|
832
|
+
exports.sessionThreadResponseSchema = sessionThreadResponseSchema;
|
|
833
|
+
exports.sessionThreadTurnSchema = sessionThreadTurnSchema;
|
|
834
|
+
exports.sessionThreadUserMessageSchema = sessionThreadUserMessageSchema;
|
|
803
835
|
exports.sessionTimelineIdSchema = sessionTimelineIdSchema;
|
|
804
836
|
exports.sessionTimelineResponseSchema = sessionTimelineResponseSchema;
|
|
805
837
|
exports.sessionWebhookConfigSchema = sessionWebhookConfigSchema;
|
package/dist/schemas.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, X as SESSION_STREAM_EVENT_KINDS, _ as SESSION_WEBHOOK_DEFAULT_EVENTS, a9 as SessionAgentEvent, V as SessionFileContentResponse, Q as SessionFilesTreeResponse, e as SessionStatus, d as SessionStreamEvent, c as SessionThreadResponse, f as SessionThreadTurn, S as SessionTimelineResponse, g as SessionWebhookConfig, h as SessionWebhookEventPayload, i as SessionWebhookEventType, a5 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, Y as cancelSessionResponseSchema, t as executeAgentErrorResponseSchema, r as executeAgentRequestSchema, u as executeAgentResponseSchema, s as executeAgentSuccessResponseSchema, $ as isBlockedWebhookHostname, a8 as sessionAgentEventSchema, aa as sessionAgentEventsSchema, R as sessionFileContentResponseSchema, P as sessionFilesTreeResponseSchema, z as sessionStatusSchema, W as sessionStreamEventSchema, M as sessionThreadAssistantMessageSchema, O as sessionThreadResponseSchema, N as sessionThreadTurnSchema, L as sessionThreadUserMessageSchema, B as sessionTimelineIdSchema, K as sessionTimelineResponseSchema, a1 as sessionWebhookConfigSchema, a7 as sessionWebhookEventPayloadSchema, Z as sessionWebhookEventTypeSchema, a4 as sessionWebhookResultSchema, a6 as sessionWebhookSubagentSchema, a3 as sessionWebhookUsageSchema, a2 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, a0 as validateWebhookUrl } from './shared/agent-sdk.19cf779d.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
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"];
|
package/dist/schemas.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, X as SESSION_STREAM_EVENT_KINDS, _ as SESSION_WEBHOOK_DEFAULT_EVENTS, a9 as SessionAgentEvent, V as SessionFileContentResponse, Q as SessionFilesTreeResponse, e as SessionStatus, d as SessionStreamEvent, c as SessionThreadResponse, f as SessionThreadTurn, S as SessionTimelineResponse, g as SessionWebhookConfig, h as SessionWebhookEventPayload, i as SessionWebhookEventType, a5 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, Y as cancelSessionResponseSchema, t as executeAgentErrorResponseSchema, r as executeAgentRequestSchema, u as executeAgentResponseSchema, s as executeAgentSuccessResponseSchema, $ as isBlockedWebhookHostname, a8 as sessionAgentEventSchema, aa as sessionAgentEventsSchema, R as sessionFileContentResponseSchema, P as sessionFilesTreeResponseSchema, z as sessionStatusSchema, W as sessionStreamEventSchema, M as sessionThreadAssistantMessageSchema, O as sessionThreadResponseSchema, N as sessionThreadTurnSchema, L as sessionThreadUserMessageSchema, B as sessionTimelineIdSchema, K as sessionTimelineResponseSchema, a1 as sessionWebhookConfigSchema, a7 as sessionWebhookEventPayloadSchema, Z as sessionWebhookEventTypeSchema, a4 as sessionWebhookResultSchema, a6 as sessionWebhookSubagentSchema, a3 as sessionWebhookUsageSchema, a2 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, a0 as validateWebhookUrl } from './shared/agent-sdk.19cf779d.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
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"];
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, X as SESSION_STREAM_EVENT_KINDS, _ as SESSION_WEBHOOK_DEFAULT_EVENTS, a9 as SessionAgentEvent, V as SessionFileContentResponse, Q as SessionFilesTreeResponse, e as SessionStatus, d as SessionStreamEvent, c as SessionThreadResponse, f as SessionThreadTurn, S as SessionTimelineResponse, g as SessionWebhookConfig, h as SessionWebhookEventPayload, i as SessionWebhookEventType, a5 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, Y as cancelSessionResponseSchema, t as executeAgentErrorResponseSchema, r as executeAgentRequestSchema, u as executeAgentResponseSchema, s as executeAgentSuccessResponseSchema, $ as isBlockedWebhookHostname, a8 as sessionAgentEventSchema, aa as sessionAgentEventsSchema, R as sessionFileContentResponseSchema, P as sessionFilesTreeResponseSchema, z as sessionStatusSchema, W as sessionStreamEventSchema, M as sessionThreadAssistantMessageSchema, O as sessionThreadResponseSchema, N as sessionThreadTurnSchema, L as sessionThreadUserMessageSchema, B as sessionTimelineIdSchema, K as sessionTimelineResponseSchema, a1 as sessionWebhookConfigSchema, a7 as sessionWebhookEventPayloadSchema, Z as sessionWebhookEventTypeSchema, a4 as sessionWebhookResultSchema, a6 as sessionWebhookSubagentSchema, a3 as sessionWebhookUsageSchema, a2 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, a0 as validateWebhookUrl } from './shared/agent-sdk.19cf779d.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
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"];
|
package/dist/schemas.mjs
CHANGED
|
@@ -707,6 +707,34 @@ const sessionTimelineResponseSchema = z.object({
|
|
|
707
707
|
prompt: timelinePromptSchema,
|
|
708
708
|
spans: z.array(timelineSpanSchema)
|
|
709
709
|
});
|
|
710
|
+
const sessionThreadUserMessageSchema = z.object({
|
|
711
|
+
text: z.string().nullable(),
|
|
712
|
+
attachments: z.unknown().nullable().optional()
|
|
713
|
+
});
|
|
714
|
+
const sessionThreadAssistantMessageSchema = z.object({
|
|
715
|
+
status: z.string().nullable(),
|
|
716
|
+
text: z.string().nullable(),
|
|
717
|
+
structuredContent: z.unknown().nullable().optional(),
|
|
718
|
+
events: z.array(timelineEventSchema).nullable().optional(),
|
|
719
|
+
attachments: z.unknown().nullable().optional(),
|
|
720
|
+
usage: z.unknown().nullable().optional()
|
|
721
|
+
});
|
|
722
|
+
const sessionThreadTurnSchema = z.object({
|
|
723
|
+
runId: z.string(),
|
|
724
|
+
index: z.number().int().nonnegative(),
|
|
725
|
+
isContinuation: z.boolean(),
|
|
726
|
+
status: z.string().nullable(),
|
|
727
|
+
createdAt: z.number().nullable(),
|
|
728
|
+
finishedAt: z.number().nullable(),
|
|
729
|
+
user: sessionThreadUserMessageSchema.nullable(),
|
|
730
|
+
assistant: sessionThreadAssistantMessageSchema.nullable()
|
|
731
|
+
});
|
|
732
|
+
const sessionThreadResponseSchema = z.object({
|
|
733
|
+
sessionId: z.string(),
|
|
734
|
+
status: z.string(),
|
|
735
|
+
turnCount: z.number().int().nonnegative(),
|
|
736
|
+
turns: z.array(sessionThreadTurnSchema)
|
|
737
|
+
});
|
|
710
738
|
const sessionFilesTreeResponseSchema = z.object({
|
|
711
739
|
sessionId: z.string(),
|
|
712
740
|
tree: z.array(z.object({
|
|
@@ -778,4 +806,4 @@ const cancelSessionResponseSchema = z.discriminatedUnion("success", [
|
|
|
778
806
|
z.object({ success: z.literal(false), error: z.string() })
|
|
779
807
|
]);
|
|
780
808
|
|
|
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 };
|
|
809
|
+
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, sessionThreadAssistantMessageSchema, sessionThreadResponseSchema, sessionThreadTurnSchema, sessionThreadUserMessageSchema, sessionTimelineIdSchema, sessionTimelineResponseSchema, sessionWebhookConfigSchema, sessionWebhookEventPayloadSchema, sessionWebhookEventTypeSchema, sessionWebhookResultSchema, sessionWebhookSubagentSchema, sessionWebhookUsageSchema, sessionWebhooksSchema, timelineEventSchema, timelineMetricsSchema, timelinePromptSchema, timelineRunTurnMetricsSchema, timelineSpanSchema, timelineToolResultSchema, updateAgentModelErrorResponseSchema, updateAgentModelRequestSchema, updateAgentModelResponseSchema, updateAgentModelSuccessResponseSchema, validateWebhookUrl };
|
|
@@ -96,10 +96,10 @@ declare const updateAgentModelResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
96
96
|
type UpdateAgentModelResponse = z.infer<typeof updateAgentModelResponseSchema>;
|
|
97
97
|
|
|
98
98
|
declare const sessionStatusSchema: z.ZodEnum<{
|
|
99
|
+
failed: "failed";
|
|
99
100
|
pending: "pending";
|
|
100
101
|
running: "running";
|
|
101
102
|
completed: "completed";
|
|
102
|
-
failed: "failed";
|
|
103
103
|
waiting_messages: "waiting_messages";
|
|
104
104
|
cancelled: "cancelled";
|
|
105
105
|
}>;
|
|
@@ -242,6 +242,185 @@ 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 sessionThreadUserMessageSchema: z.ZodObject<{
|
|
246
|
+
text: z.ZodNullable<z.ZodString>;
|
|
247
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
declare const sessionThreadAssistantMessageSchema: z.ZodObject<{
|
|
250
|
+
status: z.ZodNullable<z.ZodString>;
|
|
251
|
+
text: z.ZodNullable<z.ZodString>;
|
|
252
|
+
structuredContent: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
253
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
254
|
+
type: z.ZodEnum<{
|
|
255
|
+
text: "text";
|
|
256
|
+
api_response: "api_response";
|
|
257
|
+
tool_call: "tool_call";
|
|
258
|
+
thinking: "thinking";
|
|
259
|
+
tool_result: "tool_result";
|
|
260
|
+
}>;
|
|
261
|
+
relativeTimeMs: z.ZodNumber;
|
|
262
|
+
timestamp: z.ZodNumber;
|
|
263
|
+
sequenceIndex: z.ZodNumber;
|
|
264
|
+
runTurnId: z.ZodNullable<z.ZodString>;
|
|
265
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
266
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
267
|
+
arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
268
|
+
displaySummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
269
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
270
|
+
file: "file";
|
|
271
|
+
shell: "shell";
|
|
272
|
+
search: "search";
|
|
273
|
+
edit: "edit";
|
|
274
|
+
web: "web";
|
|
275
|
+
other: "other";
|
|
276
|
+
}>>;
|
|
277
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
278
|
+
success: "success";
|
|
279
|
+
failed: "failed";
|
|
280
|
+
cancelled: "cancelled";
|
|
281
|
+
timeout: "timeout";
|
|
282
|
+
}>>;
|
|
283
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
output: z.ZodString;
|
|
285
|
+
isError: z.ZodBoolean;
|
|
286
|
+
durationMs: z.ZodNumber;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
289
|
+
tokensIn: z.ZodOptional<z.ZodNumber>;
|
|
290
|
+
tokensOut: z.ZodOptional<z.ZodNumber>;
|
|
291
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
}, z.core.$strip>>>>;
|
|
294
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
295
|
+
usage: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
declare const sessionThreadTurnSchema: z.ZodObject<{
|
|
298
|
+
runId: z.ZodString;
|
|
299
|
+
index: z.ZodNumber;
|
|
300
|
+
isContinuation: z.ZodBoolean;
|
|
301
|
+
status: z.ZodNullable<z.ZodString>;
|
|
302
|
+
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
303
|
+
finishedAt: z.ZodNullable<z.ZodNumber>;
|
|
304
|
+
user: z.ZodNullable<z.ZodObject<{
|
|
305
|
+
text: z.ZodNullable<z.ZodString>;
|
|
306
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
307
|
+
}, z.core.$strip>>;
|
|
308
|
+
assistant: z.ZodNullable<z.ZodObject<{
|
|
309
|
+
status: z.ZodNullable<z.ZodString>;
|
|
310
|
+
text: z.ZodNullable<z.ZodString>;
|
|
311
|
+
structuredContent: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
312
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
313
|
+
type: z.ZodEnum<{
|
|
314
|
+
text: "text";
|
|
315
|
+
api_response: "api_response";
|
|
316
|
+
tool_call: "tool_call";
|
|
317
|
+
thinking: "thinking";
|
|
318
|
+
tool_result: "tool_result";
|
|
319
|
+
}>;
|
|
320
|
+
relativeTimeMs: z.ZodNumber;
|
|
321
|
+
timestamp: z.ZodNumber;
|
|
322
|
+
sequenceIndex: z.ZodNumber;
|
|
323
|
+
runTurnId: z.ZodNullable<z.ZodString>;
|
|
324
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
325
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
326
|
+
arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
327
|
+
displaySummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
328
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
329
|
+
file: "file";
|
|
330
|
+
shell: "shell";
|
|
331
|
+
search: "search";
|
|
332
|
+
edit: "edit";
|
|
333
|
+
web: "web";
|
|
334
|
+
other: "other";
|
|
335
|
+
}>>;
|
|
336
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
337
|
+
success: "success";
|
|
338
|
+
failed: "failed";
|
|
339
|
+
cancelled: "cancelled";
|
|
340
|
+
timeout: "timeout";
|
|
341
|
+
}>>;
|
|
342
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
343
|
+
output: z.ZodString;
|
|
344
|
+
isError: z.ZodBoolean;
|
|
345
|
+
durationMs: z.ZodNumber;
|
|
346
|
+
}, z.core.$strip>>;
|
|
347
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
348
|
+
tokensIn: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
tokensOut: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
351
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
352
|
+
}, z.core.$strip>>>>;
|
|
353
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
354
|
+
usage: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
355
|
+
}, z.core.$strip>>;
|
|
356
|
+
}, z.core.$strip>;
|
|
357
|
+
type SessionThreadTurn = z.infer<typeof sessionThreadTurnSchema>;
|
|
358
|
+
declare const sessionThreadResponseSchema: z.ZodObject<{
|
|
359
|
+
sessionId: z.ZodString;
|
|
360
|
+
status: z.ZodString;
|
|
361
|
+
turnCount: z.ZodNumber;
|
|
362
|
+
turns: z.ZodArray<z.ZodObject<{
|
|
363
|
+
runId: z.ZodString;
|
|
364
|
+
index: z.ZodNumber;
|
|
365
|
+
isContinuation: z.ZodBoolean;
|
|
366
|
+
status: z.ZodNullable<z.ZodString>;
|
|
367
|
+
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
368
|
+
finishedAt: z.ZodNullable<z.ZodNumber>;
|
|
369
|
+
user: z.ZodNullable<z.ZodObject<{
|
|
370
|
+
text: z.ZodNullable<z.ZodString>;
|
|
371
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
372
|
+
}, z.core.$strip>>;
|
|
373
|
+
assistant: z.ZodNullable<z.ZodObject<{
|
|
374
|
+
status: z.ZodNullable<z.ZodString>;
|
|
375
|
+
text: z.ZodNullable<z.ZodString>;
|
|
376
|
+
structuredContent: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
377
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
378
|
+
type: z.ZodEnum<{
|
|
379
|
+
text: "text";
|
|
380
|
+
api_response: "api_response";
|
|
381
|
+
tool_call: "tool_call";
|
|
382
|
+
thinking: "thinking";
|
|
383
|
+
tool_result: "tool_result";
|
|
384
|
+
}>;
|
|
385
|
+
relativeTimeMs: z.ZodNumber;
|
|
386
|
+
timestamp: z.ZodNumber;
|
|
387
|
+
sequenceIndex: z.ZodNumber;
|
|
388
|
+
runTurnId: z.ZodNullable<z.ZodString>;
|
|
389
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
390
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
391
|
+
arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
392
|
+
displaySummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
393
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
394
|
+
file: "file";
|
|
395
|
+
shell: "shell";
|
|
396
|
+
search: "search";
|
|
397
|
+
edit: "edit";
|
|
398
|
+
web: "web";
|
|
399
|
+
other: "other";
|
|
400
|
+
}>>;
|
|
401
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
402
|
+
success: "success";
|
|
403
|
+
failed: "failed";
|
|
404
|
+
cancelled: "cancelled";
|
|
405
|
+
timeout: "timeout";
|
|
406
|
+
}>>;
|
|
407
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
408
|
+
output: z.ZodString;
|
|
409
|
+
isError: z.ZodBoolean;
|
|
410
|
+
durationMs: z.ZodNumber;
|
|
411
|
+
}, z.core.$strip>>;
|
|
412
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
413
|
+
tokensIn: z.ZodOptional<z.ZodNumber>;
|
|
414
|
+
tokensOut: z.ZodOptional<z.ZodNumber>;
|
|
415
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
416
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
417
|
+
}, z.core.$strip>>>>;
|
|
418
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
419
|
+
usage: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
420
|
+
}, z.core.$strip>>;
|
|
421
|
+
}, z.core.$strip>>;
|
|
422
|
+
}, z.core.$strip>;
|
|
423
|
+
type SessionThreadResponse = z.infer<typeof sessionThreadResponseSchema>;
|
|
245
424
|
declare const sessionFilesTreeResponseSchema: z.ZodObject<{
|
|
246
425
|
sessionId: z.ZodString;
|
|
247
426
|
tree: z.ZodArray<z.ZodObject<{
|
|
@@ -266,10 +445,10 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
266
445
|
kind: z.ZodLiteral<"status">;
|
|
267
446
|
sessionId: z.ZodString;
|
|
268
447
|
status: z.ZodEnum<{
|
|
448
|
+
failed: "failed";
|
|
269
449
|
pending: "pending";
|
|
270
450
|
running: "running";
|
|
271
451
|
completed: "completed";
|
|
272
|
-
failed: "failed";
|
|
273
452
|
waiting_messages: "waiting_messages";
|
|
274
453
|
cancelled: "cancelled";
|
|
275
454
|
}>;
|
|
@@ -280,10 +459,10 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
280
459
|
kind: z.ZodLiteral<"steps">;
|
|
281
460
|
sessionId: z.ZodString;
|
|
282
461
|
status: z.ZodEnum<{
|
|
462
|
+
failed: "failed";
|
|
283
463
|
pending: "pending";
|
|
284
464
|
running: "running";
|
|
285
465
|
completed: "completed";
|
|
286
|
-
failed: "failed";
|
|
287
466
|
waiting_messages: "waiting_messages";
|
|
288
467
|
cancelled: "cancelled";
|
|
289
468
|
}>;
|
|
@@ -306,10 +485,10 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
306
485
|
kind: z.ZodLiteral<"timeline-finalize">;
|
|
307
486
|
sessionId: z.ZodString;
|
|
308
487
|
status: z.ZodEnum<{
|
|
488
|
+
failed: "failed";
|
|
309
489
|
pending: "pending";
|
|
310
490
|
running: "running";
|
|
311
491
|
completed: "completed";
|
|
312
|
-
failed: "failed";
|
|
313
492
|
waiting_messages: "waiting_messages";
|
|
314
493
|
cancelled: "cancelled";
|
|
315
494
|
}>;
|
|
@@ -542,5 +721,5 @@ declare const sessionAgentEventsSchema: z.ZodArray<z.ZodObject<{
|
|
|
542
721
|
timestamp: z.ZodNumber;
|
|
543
722
|
}, z.core.$strict>>;
|
|
544
723
|
|
|
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,
|
|
546
|
-
export type {
|
|
724
|
+
export { isBlockedWebhookHostname as $, sessionTimelineIdSchema as B, timelineMetricsSchema as D, timelinePromptSchema as F, timelineToolResultSchema as G, timelineRunTurnMetricsSchema as H, timelineEventSchema as I, timelineSpanSchema as J, sessionTimelineResponseSchema as K, sessionThreadUserMessageSchema as L, sessionThreadAssistantMessageSchema as M, sessionThreadTurnSchema as N, sessionThreadResponseSchema as O, sessionFilesTreeResponseSchema as P, sessionFileContentResponseSchema as R, sessionStreamEventSchema as W, SESSION_STREAM_EVENT_KINDS as X, cancelSessionResponseSchema as Y, sessionWebhookEventTypeSchema as Z, SESSION_WEBHOOK_DEFAULT_EVENTS as _, validateWebhookUrl as a0, sessionWebhookConfigSchema as a1, sessionWebhooksSchema as a2, sessionWebhookUsageSchema as a3, sessionWebhookResultSchema as a4, sessionWebhookSubagentSchema as a6, sessionWebhookEventPayloadSchema as a7, sessionAgentEventSchema as a8, sessionAgentEventsSchema as aa, 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 };
|
|
725
|
+
export type { AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionFilesTreeResponse as Q, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U, SessionFileContentResponse as V, ExecuteAgentResponse as a, SessionWebhookResult as a5, SessionAgentEvent as a9, UpdateAgentModelResponse as b, SessionThreadResponse as c, SessionStreamEvent as d, SessionStatus as e, SessionThreadTurn 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 };
|
|
@@ -96,10 +96,10 @@ declare const updateAgentModelResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
96
96
|
type UpdateAgentModelResponse = z.infer<typeof updateAgentModelResponseSchema>;
|
|
97
97
|
|
|
98
98
|
declare const sessionStatusSchema: z.ZodEnum<{
|
|
99
|
+
failed: "failed";
|
|
99
100
|
pending: "pending";
|
|
100
101
|
running: "running";
|
|
101
102
|
completed: "completed";
|
|
102
|
-
failed: "failed";
|
|
103
103
|
waiting_messages: "waiting_messages";
|
|
104
104
|
cancelled: "cancelled";
|
|
105
105
|
}>;
|
|
@@ -242,6 +242,185 @@ 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 sessionThreadUserMessageSchema: z.ZodObject<{
|
|
246
|
+
text: z.ZodNullable<z.ZodString>;
|
|
247
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
declare const sessionThreadAssistantMessageSchema: z.ZodObject<{
|
|
250
|
+
status: z.ZodNullable<z.ZodString>;
|
|
251
|
+
text: z.ZodNullable<z.ZodString>;
|
|
252
|
+
structuredContent: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
253
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
254
|
+
type: z.ZodEnum<{
|
|
255
|
+
text: "text";
|
|
256
|
+
api_response: "api_response";
|
|
257
|
+
tool_call: "tool_call";
|
|
258
|
+
thinking: "thinking";
|
|
259
|
+
tool_result: "tool_result";
|
|
260
|
+
}>;
|
|
261
|
+
relativeTimeMs: z.ZodNumber;
|
|
262
|
+
timestamp: z.ZodNumber;
|
|
263
|
+
sequenceIndex: z.ZodNumber;
|
|
264
|
+
runTurnId: z.ZodNullable<z.ZodString>;
|
|
265
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
266
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
267
|
+
arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
268
|
+
displaySummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
269
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
270
|
+
file: "file";
|
|
271
|
+
shell: "shell";
|
|
272
|
+
search: "search";
|
|
273
|
+
edit: "edit";
|
|
274
|
+
web: "web";
|
|
275
|
+
other: "other";
|
|
276
|
+
}>>;
|
|
277
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
278
|
+
success: "success";
|
|
279
|
+
failed: "failed";
|
|
280
|
+
cancelled: "cancelled";
|
|
281
|
+
timeout: "timeout";
|
|
282
|
+
}>>;
|
|
283
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
output: z.ZodString;
|
|
285
|
+
isError: z.ZodBoolean;
|
|
286
|
+
durationMs: z.ZodNumber;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
289
|
+
tokensIn: z.ZodOptional<z.ZodNumber>;
|
|
290
|
+
tokensOut: z.ZodOptional<z.ZodNumber>;
|
|
291
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
}, z.core.$strip>>>>;
|
|
294
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
295
|
+
usage: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
declare const sessionThreadTurnSchema: z.ZodObject<{
|
|
298
|
+
runId: z.ZodString;
|
|
299
|
+
index: z.ZodNumber;
|
|
300
|
+
isContinuation: z.ZodBoolean;
|
|
301
|
+
status: z.ZodNullable<z.ZodString>;
|
|
302
|
+
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
303
|
+
finishedAt: z.ZodNullable<z.ZodNumber>;
|
|
304
|
+
user: z.ZodNullable<z.ZodObject<{
|
|
305
|
+
text: z.ZodNullable<z.ZodString>;
|
|
306
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
307
|
+
}, z.core.$strip>>;
|
|
308
|
+
assistant: z.ZodNullable<z.ZodObject<{
|
|
309
|
+
status: z.ZodNullable<z.ZodString>;
|
|
310
|
+
text: z.ZodNullable<z.ZodString>;
|
|
311
|
+
structuredContent: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
312
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
313
|
+
type: z.ZodEnum<{
|
|
314
|
+
text: "text";
|
|
315
|
+
api_response: "api_response";
|
|
316
|
+
tool_call: "tool_call";
|
|
317
|
+
thinking: "thinking";
|
|
318
|
+
tool_result: "tool_result";
|
|
319
|
+
}>;
|
|
320
|
+
relativeTimeMs: z.ZodNumber;
|
|
321
|
+
timestamp: z.ZodNumber;
|
|
322
|
+
sequenceIndex: z.ZodNumber;
|
|
323
|
+
runTurnId: z.ZodNullable<z.ZodString>;
|
|
324
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
325
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
326
|
+
arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
327
|
+
displaySummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
328
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
329
|
+
file: "file";
|
|
330
|
+
shell: "shell";
|
|
331
|
+
search: "search";
|
|
332
|
+
edit: "edit";
|
|
333
|
+
web: "web";
|
|
334
|
+
other: "other";
|
|
335
|
+
}>>;
|
|
336
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
337
|
+
success: "success";
|
|
338
|
+
failed: "failed";
|
|
339
|
+
cancelled: "cancelled";
|
|
340
|
+
timeout: "timeout";
|
|
341
|
+
}>>;
|
|
342
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
343
|
+
output: z.ZodString;
|
|
344
|
+
isError: z.ZodBoolean;
|
|
345
|
+
durationMs: z.ZodNumber;
|
|
346
|
+
}, z.core.$strip>>;
|
|
347
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
348
|
+
tokensIn: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
tokensOut: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
351
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
352
|
+
}, z.core.$strip>>>>;
|
|
353
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
354
|
+
usage: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
355
|
+
}, z.core.$strip>>;
|
|
356
|
+
}, z.core.$strip>;
|
|
357
|
+
type SessionThreadTurn = z.infer<typeof sessionThreadTurnSchema>;
|
|
358
|
+
declare const sessionThreadResponseSchema: z.ZodObject<{
|
|
359
|
+
sessionId: z.ZodString;
|
|
360
|
+
status: z.ZodString;
|
|
361
|
+
turnCount: z.ZodNumber;
|
|
362
|
+
turns: z.ZodArray<z.ZodObject<{
|
|
363
|
+
runId: z.ZodString;
|
|
364
|
+
index: z.ZodNumber;
|
|
365
|
+
isContinuation: z.ZodBoolean;
|
|
366
|
+
status: z.ZodNullable<z.ZodString>;
|
|
367
|
+
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
368
|
+
finishedAt: z.ZodNullable<z.ZodNumber>;
|
|
369
|
+
user: z.ZodNullable<z.ZodObject<{
|
|
370
|
+
text: z.ZodNullable<z.ZodString>;
|
|
371
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
372
|
+
}, z.core.$strip>>;
|
|
373
|
+
assistant: z.ZodNullable<z.ZodObject<{
|
|
374
|
+
status: z.ZodNullable<z.ZodString>;
|
|
375
|
+
text: z.ZodNullable<z.ZodString>;
|
|
376
|
+
structuredContent: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
377
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
378
|
+
type: z.ZodEnum<{
|
|
379
|
+
text: "text";
|
|
380
|
+
api_response: "api_response";
|
|
381
|
+
tool_call: "tool_call";
|
|
382
|
+
thinking: "thinking";
|
|
383
|
+
tool_result: "tool_result";
|
|
384
|
+
}>;
|
|
385
|
+
relativeTimeMs: z.ZodNumber;
|
|
386
|
+
timestamp: z.ZodNumber;
|
|
387
|
+
sequenceIndex: z.ZodNumber;
|
|
388
|
+
runTurnId: z.ZodNullable<z.ZodString>;
|
|
389
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
390
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
391
|
+
arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
392
|
+
displaySummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
393
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
394
|
+
file: "file";
|
|
395
|
+
shell: "shell";
|
|
396
|
+
search: "search";
|
|
397
|
+
edit: "edit";
|
|
398
|
+
web: "web";
|
|
399
|
+
other: "other";
|
|
400
|
+
}>>;
|
|
401
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
402
|
+
success: "success";
|
|
403
|
+
failed: "failed";
|
|
404
|
+
cancelled: "cancelled";
|
|
405
|
+
timeout: "timeout";
|
|
406
|
+
}>>;
|
|
407
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
408
|
+
output: z.ZodString;
|
|
409
|
+
isError: z.ZodBoolean;
|
|
410
|
+
durationMs: z.ZodNumber;
|
|
411
|
+
}, z.core.$strip>>;
|
|
412
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
413
|
+
tokensIn: z.ZodOptional<z.ZodNumber>;
|
|
414
|
+
tokensOut: z.ZodOptional<z.ZodNumber>;
|
|
415
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
416
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
417
|
+
}, z.core.$strip>>>>;
|
|
418
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
419
|
+
usage: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
420
|
+
}, z.core.$strip>>;
|
|
421
|
+
}, z.core.$strip>>;
|
|
422
|
+
}, z.core.$strip>;
|
|
423
|
+
type SessionThreadResponse = z.infer<typeof sessionThreadResponseSchema>;
|
|
245
424
|
declare const sessionFilesTreeResponseSchema: z.ZodObject<{
|
|
246
425
|
sessionId: z.ZodString;
|
|
247
426
|
tree: z.ZodArray<z.ZodObject<{
|
|
@@ -266,10 +445,10 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
266
445
|
kind: z.ZodLiteral<"status">;
|
|
267
446
|
sessionId: z.ZodString;
|
|
268
447
|
status: z.ZodEnum<{
|
|
448
|
+
failed: "failed";
|
|
269
449
|
pending: "pending";
|
|
270
450
|
running: "running";
|
|
271
451
|
completed: "completed";
|
|
272
|
-
failed: "failed";
|
|
273
452
|
waiting_messages: "waiting_messages";
|
|
274
453
|
cancelled: "cancelled";
|
|
275
454
|
}>;
|
|
@@ -280,10 +459,10 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
280
459
|
kind: z.ZodLiteral<"steps">;
|
|
281
460
|
sessionId: z.ZodString;
|
|
282
461
|
status: z.ZodEnum<{
|
|
462
|
+
failed: "failed";
|
|
283
463
|
pending: "pending";
|
|
284
464
|
running: "running";
|
|
285
465
|
completed: "completed";
|
|
286
|
-
failed: "failed";
|
|
287
466
|
waiting_messages: "waiting_messages";
|
|
288
467
|
cancelled: "cancelled";
|
|
289
468
|
}>;
|
|
@@ -306,10 +485,10 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
306
485
|
kind: z.ZodLiteral<"timeline-finalize">;
|
|
307
486
|
sessionId: z.ZodString;
|
|
308
487
|
status: z.ZodEnum<{
|
|
488
|
+
failed: "failed";
|
|
309
489
|
pending: "pending";
|
|
310
490
|
running: "running";
|
|
311
491
|
completed: "completed";
|
|
312
|
-
failed: "failed";
|
|
313
492
|
waiting_messages: "waiting_messages";
|
|
314
493
|
cancelled: "cancelled";
|
|
315
494
|
}>;
|
|
@@ -542,5 +721,5 @@ declare const sessionAgentEventsSchema: z.ZodArray<z.ZodObject<{
|
|
|
542
721
|
timestamp: z.ZodNumber;
|
|
543
722
|
}, z.core.$strict>>;
|
|
544
723
|
|
|
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,
|
|
546
|
-
export type {
|
|
724
|
+
export { isBlockedWebhookHostname as $, sessionTimelineIdSchema as B, timelineMetricsSchema as D, timelinePromptSchema as F, timelineToolResultSchema as G, timelineRunTurnMetricsSchema as H, timelineEventSchema as I, timelineSpanSchema as J, sessionTimelineResponseSchema as K, sessionThreadUserMessageSchema as L, sessionThreadAssistantMessageSchema as M, sessionThreadTurnSchema as N, sessionThreadResponseSchema as O, sessionFilesTreeResponseSchema as P, sessionFileContentResponseSchema as R, sessionStreamEventSchema as W, SESSION_STREAM_EVENT_KINDS as X, cancelSessionResponseSchema as Y, sessionWebhookEventTypeSchema as Z, SESSION_WEBHOOK_DEFAULT_EVENTS as _, validateWebhookUrl as a0, sessionWebhookConfigSchema as a1, sessionWebhooksSchema as a2, sessionWebhookUsageSchema as a3, sessionWebhookResultSchema as a4, sessionWebhookSubagentSchema as a6, sessionWebhookEventPayloadSchema as a7, sessionAgentEventSchema as a8, sessionAgentEventsSchema as aa, 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 };
|
|
725
|
+
export type { AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionFilesTreeResponse as Q, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U, SessionFileContentResponse as V, ExecuteAgentResponse as a, SessionWebhookResult as a5, SessionAgentEvent as a9, UpdateAgentModelResponse as b, SessionThreadResponse as c, SessionStreamEvent as d, SessionStatus as e, SessionThreadTurn 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 };
|
|
@@ -96,10 +96,10 @@ declare const updateAgentModelResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
96
96
|
type UpdateAgentModelResponse = z.infer<typeof updateAgentModelResponseSchema>;
|
|
97
97
|
|
|
98
98
|
declare const sessionStatusSchema: z.ZodEnum<{
|
|
99
|
+
failed: "failed";
|
|
99
100
|
pending: "pending";
|
|
100
101
|
running: "running";
|
|
101
102
|
completed: "completed";
|
|
102
|
-
failed: "failed";
|
|
103
103
|
waiting_messages: "waiting_messages";
|
|
104
104
|
cancelled: "cancelled";
|
|
105
105
|
}>;
|
|
@@ -242,6 +242,185 @@ 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 sessionThreadUserMessageSchema: z.ZodObject<{
|
|
246
|
+
text: z.ZodNullable<z.ZodString>;
|
|
247
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
declare const sessionThreadAssistantMessageSchema: z.ZodObject<{
|
|
250
|
+
status: z.ZodNullable<z.ZodString>;
|
|
251
|
+
text: z.ZodNullable<z.ZodString>;
|
|
252
|
+
structuredContent: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
253
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
254
|
+
type: z.ZodEnum<{
|
|
255
|
+
text: "text";
|
|
256
|
+
api_response: "api_response";
|
|
257
|
+
tool_call: "tool_call";
|
|
258
|
+
thinking: "thinking";
|
|
259
|
+
tool_result: "tool_result";
|
|
260
|
+
}>;
|
|
261
|
+
relativeTimeMs: z.ZodNumber;
|
|
262
|
+
timestamp: z.ZodNumber;
|
|
263
|
+
sequenceIndex: z.ZodNumber;
|
|
264
|
+
runTurnId: z.ZodNullable<z.ZodString>;
|
|
265
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
266
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
267
|
+
arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
268
|
+
displaySummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
269
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
270
|
+
file: "file";
|
|
271
|
+
shell: "shell";
|
|
272
|
+
search: "search";
|
|
273
|
+
edit: "edit";
|
|
274
|
+
web: "web";
|
|
275
|
+
other: "other";
|
|
276
|
+
}>>;
|
|
277
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
278
|
+
success: "success";
|
|
279
|
+
failed: "failed";
|
|
280
|
+
cancelled: "cancelled";
|
|
281
|
+
timeout: "timeout";
|
|
282
|
+
}>>;
|
|
283
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
output: z.ZodString;
|
|
285
|
+
isError: z.ZodBoolean;
|
|
286
|
+
durationMs: z.ZodNumber;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
289
|
+
tokensIn: z.ZodOptional<z.ZodNumber>;
|
|
290
|
+
tokensOut: z.ZodOptional<z.ZodNumber>;
|
|
291
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
}, z.core.$strip>>>>;
|
|
294
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
295
|
+
usage: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
declare const sessionThreadTurnSchema: z.ZodObject<{
|
|
298
|
+
runId: z.ZodString;
|
|
299
|
+
index: z.ZodNumber;
|
|
300
|
+
isContinuation: z.ZodBoolean;
|
|
301
|
+
status: z.ZodNullable<z.ZodString>;
|
|
302
|
+
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
303
|
+
finishedAt: z.ZodNullable<z.ZodNumber>;
|
|
304
|
+
user: z.ZodNullable<z.ZodObject<{
|
|
305
|
+
text: z.ZodNullable<z.ZodString>;
|
|
306
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
307
|
+
}, z.core.$strip>>;
|
|
308
|
+
assistant: z.ZodNullable<z.ZodObject<{
|
|
309
|
+
status: z.ZodNullable<z.ZodString>;
|
|
310
|
+
text: z.ZodNullable<z.ZodString>;
|
|
311
|
+
structuredContent: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
312
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
313
|
+
type: z.ZodEnum<{
|
|
314
|
+
text: "text";
|
|
315
|
+
api_response: "api_response";
|
|
316
|
+
tool_call: "tool_call";
|
|
317
|
+
thinking: "thinking";
|
|
318
|
+
tool_result: "tool_result";
|
|
319
|
+
}>;
|
|
320
|
+
relativeTimeMs: z.ZodNumber;
|
|
321
|
+
timestamp: z.ZodNumber;
|
|
322
|
+
sequenceIndex: z.ZodNumber;
|
|
323
|
+
runTurnId: z.ZodNullable<z.ZodString>;
|
|
324
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
325
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
326
|
+
arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
327
|
+
displaySummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
328
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
329
|
+
file: "file";
|
|
330
|
+
shell: "shell";
|
|
331
|
+
search: "search";
|
|
332
|
+
edit: "edit";
|
|
333
|
+
web: "web";
|
|
334
|
+
other: "other";
|
|
335
|
+
}>>;
|
|
336
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
337
|
+
success: "success";
|
|
338
|
+
failed: "failed";
|
|
339
|
+
cancelled: "cancelled";
|
|
340
|
+
timeout: "timeout";
|
|
341
|
+
}>>;
|
|
342
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
343
|
+
output: z.ZodString;
|
|
344
|
+
isError: z.ZodBoolean;
|
|
345
|
+
durationMs: z.ZodNumber;
|
|
346
|
+
}, z.core.$strip>>;
|
|
347
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
348
|
+
tokensIn: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
tokensOut: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
351
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
352
|
+
}, z.core.$strip>>>>;
|
|
353
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
354
|
+
usage: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
355
|
+
}, z.core.$strip>>;
|
|
356
|
+
}, z.core.$strip>;
|
|
357
|
+
type SessionThreadTurn = z.infer<typeof sessionThreadTurnSchema>;
|
|
358
|
+
declare const sessionThreadResponseSchema: z.ZodObject<{
|
|
359
|
+
sessionId: z.ZodString;
|
|
360
|
+
status: z.ZodString;
|
|
361
|
+
turnCount: z.ZodNumber;
|
|
362
|
+
turns: z.ZodArray<z.ZodObject<{
|
|
363
|
+
runId: z.ZodString;
|
|
364
|
+
index: z.ZodNumber;
|
|
365
|
+
isContinuation: z.ZodBoolean;
|
|
366
|
+
status: z.ZodNullable<z.ZodString>;
|
|
367
|
+
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
368
|
+
finishedAt: z.ZodNullable<z.ZodNumber>;
|
|
369
|
+
user: z.ZodNullable<z.ZodObject<{
|
|
370
|
+
text: z.ZodNullable<z.ZodString>;
|
|
371
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
372
|
+
}, z.core.$strip>>;
|
|
373
|
+
assistant: z.ZodNullable<z.ZodObject<{
|
|
374
|
+
status: z.ZodNullable<z.ZodString>;
|
|
375
|
+
text: z.ZodNullable<z.ZodString>;
|
|
376
|
+
structuredContent: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
377
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
378
|
+
type: z.ZodEnum<{
|
|
379
|
+
text: "text";
|
|
380
|
+
api_response: "api_response";
|
|
381
|
+
tool_call: "tool_call";
|
|
382
|
+
thinking: "thinking";
|
|
383
|
+
tool_result: "tool_result";
|
|
384
|
+
}>;
|
|
385
|
+
relativeTimeMs: z.ZodNumber;
|
|
386
|
+
timestamp: z.ZodNumber;
|
|
387
|
+
sequenceIndex: z.ZodNumber;
|
|
388
|
+
runTurnId: z.ZodNullable<z.ZodString>;
|
|
389
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
390
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
391
|
+
arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
392
|
+
displaySummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
393
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
394
|
+
file: "file";
|
|
395
|
+
shell: "shell";
|
|
396
|
+
search: "search";
|
|
397
|
+
edit: "edit";
|
|
398
|
+
web: "web";
|
|
399
|
+
other: "other";
|
|
400
|
+
}>>;
|
|
401
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
402
|
+
success: "success";
|
|
403
|
+
failed: "failed";
|
|
404
|
+
cancelled: "cancelled";
|
|
405
|
+
timeout: "timeout";
|
|
406
|
+
}>>;
|
|
407
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
408
|
+
output: z.ZodString;
|
|
409
|
+
isError: z.ZodBoolean;
|
|
410
|
+
durationMs: z.ZodNumber;
|
|
411
|
+
}, z.core.$strip>>;
|
|
412
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
413
|
+
tokensIn: z.ZodOptional<z.ZodNumber>;
|
|
414
|
+
tokensOut: z.ZodOptional<z.ZodNumber>;
|
|
415
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
416
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
417
|
+
}, z.core.$strip>>>>;
|
|
418
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
419
|
+
usage: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
420
|
+
}, z.core.$strip>>;
|
|
421
|
+
}, z.core.$strip>>;
|
|
422
|
+
}, z.core.$strip>;
|
|
423
|
+
type SessionThreadResponse = z.infer<typeof sessionThreadResponseSchema>;
|
|
245
424
|
declare const sessionFilesTreeResponseSchema: z.ZodObject<{
|
|
246
425
|
sessionId: z.ZodString;
|
|
247
426
|
tree: z.ZodArray<z.ZodObject<{
|
|
@@ -266,10 +445,10 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
266
445
|
kind: z.ZodLiteral<"status">;
|
|
267
446
|
sessionId: z.ZodString;
|
|
268
447
|
status: z.ZodEnum<{
|
|
448
|
+
failed: "failed";
|
|
269
449
|
pending: "pending";
|
|
270
450
|
running: "running";
|
|
271
451
|
completed: "completed";
|
|
272
|
-
failed: "failed";
|
|
273
452
|
waiting_messages: "waiting_messages";
|
|
274
453
|
cancelled: "cancelled";
|
|
275
454
|
}>;
|
|
@@ -280,10 +459,10 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
280
459
|
kind: z.ZodLiteral<"steps">;
|
|
281
460
|
sessionId: z.ZodString;
|
|
282
461
|
status: z.ZodEnum<{
|
|
462
|
+
failed: "failed";
|
|
283
463
|
pending: "pending";
|
|
284
464
|
running: "running";
|
|
285
465
|
completed: "completed";
|
|
286
|
-
failed: "failed";
|
|
287
466
|
waiting_messages: "waiting_messages";
|
|
288
467
|
cancelled: "cancelled";
|
|
289
468
|
}>;
|
|
@@ -306,10 +485,10 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
306
485
|
kind: z.ZodLiteral<"timeline-finalize">;
|
|
307
486
|
sessionId: z.ZodString;
|
|
308
487
|
status: z.ZodEnum<{
|
|
488
|
+
failed: "failed";
|
|
309
489
|
pending: "pending";
|
|
310
490
|
running: "running";
|
|
311
491
|
completed: "completed";
|
|
312
|
-
failed: "failed";
|
|
313
492
|
waiting_messages: "waiting_messages";
|
|
314
493
|
cancelled: "cancelled";
|
|
315
494
|
}>;
|
|
@@ -542,5 +721,5 @@ declare const sessionAgentEventsSchema: z.ZodArray<z.ZodObject<{
|
|
|
542
721
|
timestamp: z.ZodNumber;
|
|
543
722
|
}, z.core.$strict>>;
|
|
544
723
|
|
|
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,
|
|
546
|
-
export type {
|
|
724
|
+
export { isBlockedWebhookHostname as $, sessionTimelineIdSchema as B, timelineMetricsSchema as D, timelinePromptSchema as F, timelineToolResultSchema as G, timelineRunTurnMetricsSchema as H, timelineEventSchema as I, timelineSpanSchema as J, sessionTimelineResponseSchema as K, sessionThreadUserMessageSchema as L, sessionThreadAssistantMessageSchema as M, sessionThreadTurnSchema as N, sessionThreadResponseSchema as O, sessionFilesTreeResponseSchema as P, sessionFileContentResponseSchema as R, sessionStreamEventSchema as W, SESSION_STREAM_EVENT_KINDS as X, cancelSessionResponseSchema as Y, sessionWebhookEventTypeSchema as Z, SESSION_WEBHOOK_DEFAULT_EVENTS as _, validateWebhookUrl as a0, sessionWebhookConfigSchema as a1, sessionWebhooksSchema as a2, sessionWebhookUsageSchema as a3, sessionWebhookResultSchema as a4, sessionWebhookSubagentSchema as a6, sessionWebhookEventPayloadSchema as a7, sessionAgentEventSchema as a8, sessionAgentEventsSchema as aa, 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 };
|
|
725
|
+
export type { AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionFilesTreeResponse as Q, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U, SessionFileContentResponse as V, ExecuteAgentResponse as a, SessionWebhookResult as a5, SessionAgentEvent as a9, UpdateAgentModelResponse as b, SessionThreadResponse as c, SessionStreamEvent as d, SessionStatus as e, SessionThreadTurn 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 };
|