@meistrari/agent-sdk 0.3.0 → 0.4.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 +88 -5
- package/dist/index.cjs +52 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.mjs +53 -3
- package/dist/schemas.cjs +140 -10
- 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 +129 -11
- package/dist/shared/{agent-sdk.4ad2c746.d.cts → agent-sdk.dc5630ec.d.cts} +171 -22
- package/dist/shared/{agent-sdk.4ad2c746.d.mts → agent-sdk.dc5630ec.d.mts} +171 -22
- package/dist/shared/{agent-sdk.4ad2c746.d.ts → agent-sdk.dc5630ec.d.ts} +171 -22
- package/package.json +1 -1
|
@@ -19,6 +19,19 @@ declare const executeAgentRequestSchema: z.ZodObject<{
|
|
|
19
19
|
}, z.core.$strict>>>;
|
|
20
20
|
environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
21
21
|
recover: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
webhooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
23
|
+
url: z.ZodString;
|
|
24
|
+
events: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
25
|
+
"session.started": "session.started";
|
|
26
|
+
"session.completed": "session.completed";
|
|
27
|
+
"session.failed": "session.failed";
|
|
28
|
+
"session.cancelled": "session.cancelled";
|
|
29
|
+
"session.waiting_messages": "session.waiting_messages";
|
|
30
|
+
"subagent.started": "subagent.started";
|
|
31
|
+
"subagent.completed": "subagent.completed";
|
|
32
|
+
}>>>;
|
|
33
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strict>>>;
|
|
22
35
|
}, z.core.$strict>;
|
|
23
36
|
type ExecuteAgentRequest = z.infer<typeof executeAgentRequestSchema>;
|
|
24
37
|
declare const executeAgentSuccessResponseSchema: z.ZodObject<{
|
|
@@ -47,17 +60,17 @@ declare const updateAgentModelRequestSchema: z.ZodObject<{
|
|
|
47
60
|
type UpdateAgentModelRequest = z.infer<typeof updateAgentModelRequestSchema>;
|
|
48
61
|
declare const updateAgentModelSuccessResponseSchema: z.ZodObject<{
|
|
49
62
|
success: z.ZodLiteral<true>;
|
|
50
|
-
organizationName: z.
|
|
51
|
-
repository: z.
|
|
52
|
-
branch: z.
|
|
53
|
-
commitHash: z.
|
|
54
|
-
model: z.
|
|
63
|
+
organizationName: z.ZodString;
|
|
64
|
+
repository: z.ZodString;
|
|
65
|
+
branch: z.ZodString;
|
|
66
|
+
commitHash: z.ZodString;
|
|
67
|
+
model: z.ZodEnum<{
|
|
55
68
|
[x: string]: string;
|
|
56
|
-
}
|
|
57
|
-
providerTemplate: z.
|
|
58
|
-
templateSynced: z.
|
|
59
|
-
files: z.
|
|
60
|
-
deletedFiles: z.
|
|
69
|
+
}>;
|
|
70
|
+
providerTemplate: z.ZodString;
|
|
71
|
+
templateSynced: z.ZodBoolean;
|
|
72
|
+
files: z.ZodArray<z.ZodString>;
|
|
73
|
+
deletedFiles: z.ZodArray<z.ZodString>;
|
|
61
74
|
}, z.core.$strip>;
|
|
62
75
|
declare const updateAgentModelErrorResponseSchema: z.ZodObject<{
|
|
63
76
|
success: z.ZodLiteral<false>;
|
|
@@ -65,17 +78,17 @@ declare const updateAgentModelErrorResponseSchema: z.ZodObject<{
|
|
|
65
78
|
}, z.core.$strip>;
|
|
66
79
|
declare const updateAgentModelResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
67
80
|
success: z.ZodLiteral<true>;
|
|
68
|
-
organizationName: z.
|
|
69
|
-
repository: z.
|
|
70
|
-
branch: z.
|
|
71
|
-
commitHash: z.
|
|
72
|
-
model: z.
|
|
81
|
+
organizationName: z.ZodString;
|
|
82
|
+
repository: z.ZodString;
|
|
83
|
+
branch: z.ZodString;
|
|
84
|
+
commitHash: z.ZodString;
|
|
85
|
+
model: z.ZodEnum<{
|
|
73
86
|
[x: string]: string;
|
|
74
|
-
}
|
|
75
|
-
providerTemplate: z.
|
|
76
|
-
templateSynced: z.
|
|
77
|
-
files: z.
|
|
78
|
-
deletedFiles: z.
|
|
87
|
+
}>;
|
|
88
|
+
providerTemplate: z.ZodString;
|
|
89
|
+
templateSynced: z.ZodBoolean;
|
|
90
|
+
files: z.ZodArray<z.ZodString>;
|
|
91
|
+
deletedFiles: z.ZodArray<z.ZodString>;
|
|
79
92
|
}, z.core.$strip>, z.ZodObject<{
|
|
80
93
|
success: z.ZodLiteral<false>;
|
|
81
94
|
error: z.ZodString;
|
|
@@ -367,6 +380,142 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
367
380
|
}, z.core.$strip>], "kind">;
|
|
368
381
|
type SessionStreamEvent = z.infer<typeof sessionStreamEventSchema>;
|
|
369
382
|
declare const SESSION_STREAM_EVENT_KINDS: Set<string>;
|
|
383
|
+
declare const cancelSessionResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
384
|
+
success: z.ZodLiteral<true>;
|
|
385
|
+
message: z.ZodString;
|
|
386
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
387
|
+
success: z.ZodLiteral<false>;
|
|
388
|
+
error: z.ZodString;
|
|
389
|
+
}, z.core.$strip>], "success">;
|
|
390
|
+
type CancelSessionResponse = z.infer<typeof cancelSessionResponseSchema>;
|
|
391
|
+
|
|
392
|
+
declare const sessionWebhookEventTypeSchema: z.ZodEnum<{
|
|
393
|
+
"session.started": "session.started";
|
|
394
|
+
"session.completed": "session.completed";
|
|
395
|
+
"session.failed": "session.failed";
|
|
396
|
+
"session.cancelled": "session.cancelled";
|
|
397
|
+
"session.waiting_messages": "session.waiting_messages";
|
|
398
|
+
"subagent.started": "subagent.started";
|
|
399
|
+
"subagent.completed": "subagent.completed";
|
|
400
|
+
}>;
|
|
401
|
+
type SessionWebhookEventType = z.infer<typeof sessionWebhookEventTypeSchema>;
|
|
402
|
+
declare const SESSION_WEBHOOK_DEFAULT_EVENTS: SessionWebhookEventType[];
|
|
403
|
+
declare function isBlockedWebhookHostname(hostname: string): boolean;
|
|
404
|
+
declare function validateWebhookUrl(value: string): string | null;
|
|
405
|
+
declare const sessionWebhookConfigSchema: z.ZodObject<{
|
|
406
|
+
url: z.ZodString;
|
|
407
|
+
events: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
408
|
+
"session.started": "session.started";
|
|
409
|
+
"session.completed": "session.completed";
|
|
410
|
+
"session.failed": "session.failed";
|
|
411
|
+
"session.cancelled": "session.cancelled";
|
|
412
|
+
"session.waiting_messages": "session.waiting_messages";
|
|
413
|
+
"subagent.started": "subagent.started";
|
|
414
|
+
"subagent.completed": "subagent.completed";
|
|
415
|
+
}>>>;
|
|
416
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
417
|
+
}, z.core.$strict>;
|
|
418
|
+
type SessionWebhookConfig = z.infer<typeof sessionWebhookConfigSchema>;
|
|
419
|
+
declare const sessionWebhooksSchema: z.ZodArray<z.ZodObject<{
|
|
420
|
+
url: z.ZodString;
|
|
421
|
+
events: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
422
|
+
"session.started": "session.started";
|
|
423
|
+
"session.completed": "session.completed";
|
|
424
|
+
"session.failed": "session.failed";
|
|
425
|
+
"session.cancelled": "session.cancelled";
|
|
426
|
+
"session.waiting_messages": "session.waiting_messages";
|
|
427
|
+
"subagent.started": "subagent.started";
|
|
428
|
+
"subagent.completed": "subagent.completed";
|
|
429
|
+
}>>>;
|
|
430
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
431
|
+
}, z.core.$strict>>;
|
|
432
|
+
declare const sessionWebhookUsageSchema: z.ZodObject<{
|
|
433
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
434
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
435
|
+
cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
436
|
+
cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
437
|
+
totalCostUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
438
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
439
|
+
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
440
|
+
}, z.core.$strict>;
|
|
441
|
+
type SessionWebhookUsage = z.infer<typeof sessionWebhookUsageSchema>;
|
|
442
|
+
declare const sessionWebhookSubagentSchema: z.ZodObject<{
|
|
443
|
+
callId: z.ZodString;
|
|
444
|
+
subagentType: z.ZodOptional<z.ZodString>;
|
|
445
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
446
|
+
success: "success";
|
|
447
|
+
failed: "failed";
|
|
448
|
+
}>>;
|
|
449
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
450
|
+
}, z.core.$strict>;
|
|
451
|
+
type SessionWebhookSubagent = z.infer<typeof sessionWebhookSubagentSchema>;
|
|
452
|
+
declare const sessionWebhookEventPayloadSchema: z.ZodObject<{
|
|
453
|
+
eventType: z.ZodEnum<{
|
|
454
|
+
"session.started": "session.started";
|
|
455
|
+
"session.completed": "session.completed";
|
|
456
|
+
"session.failed": "session.failed";
|
|
457
|
+
"session.cancelled": "session.cancelled";
|
|
458
|
+
"session.waiting_messages": "session.waiting_messages";
|
|
459
|
+
"subagent.started": "subagent.started";
|
|
460
|
+
"subagent.completed": "subagent.completed";
|
|
461
|
+
}>;
|
|
462
|
+
sessionId: z.ZodString;
|
|
463
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
464
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
465
|
+
status: z.ZodString;
|
|
466
|
+
error: z.ZodOptional<z.ZodString>;
|
|
467
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
468
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
469
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
470
|
+
cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
471
|
+
cacheCreationInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
472
|
+
totalCostUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
473
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
474
|
+
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
475
|
+
}, z.core.$strict>>;
|
|
476
|
+
subagent: z.ZodOptional<z.ZodObject<{
|
|
477
|
+
callId: z.ZodString;
|
|
478
|
+
subagentType: z.ZodOptional<z.ZodString>;
|
|
479
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
480
|
+
success: "success";
|
|
481
|
+
failed: "failed";
|
|
482
|
+
}>>;
|
|
483
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
484
|
+
}, z.core.$strict>>;
|
|
485
|
+
timestamp: z.ZodString;
|
|
486
|
+
apiVersion: z.ZodLiteral<"v4">;
|
|
487
|
+
deliveryId: z.ZodString;
|
|
488
|
+
}, z.core.$strip>;
|
|
489
|
+
type SessionWebhookEventPayload = z.infer<typeof sessionWebhookEventPayloadSchema>;
|
|
490
|
+
declare const sessionAgentEventSchema: z.ZodObject<{
|
|
491
|
+
type: z.ZodEnum<{
|
|
492
|
+
"subagent.started": "subagent.started";
|
|
493
|
+
"subagent.completed": "subagent.completed";
|
|
494
|
+
}>;
|
|
495
|
+
callId: z.ZodString;
|
|
496
|
+
subagentType: z.ZodOptional<z.ZodString>;
|
|
497
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
498
|
+
success: "success";
|
|
499
|
+
failed: "failed";
|
|
500
|
+
}>>;
|
|
501
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
502
|
+
timestamp: z.ZodNumber;
|
|
503
|
+
}, z.core.$strict>;
|
|
504
|
+
type SessionAgentEvent = z.infer<typeof sessionAgentEventSchema>;
|
|
505
|
+
declare const sessionAgentEventsSchema: z.ZodArray<z.ZodObject<{
|
|
506
|
+
type: z.ZodEnum<{
|
|
507
|
+
"subagent.started": "subagent.started";
|
|
508
|
+
"subagent.completed": "subagent.completed";
|
|
509
|
+
}>;
|
|
510
|
+
callId: z.ZodString;
|
|
511
|
+
subagentType: z.ZodOptional<z.ZodString>;
|
|
512
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
513
|
+
success: "success";
|
|
514
|
+
failed: "failed";
|
|
515
|
+
}>>;
|
|
516
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
517
|
+
timestamp: z.ZodNumber;
|
|
518
|
+
}, z.core.$strict>>;
|
|
370
519
|
|
|
371
|
-
export {
|
|
372
|
-
export type { AgentInput as A, ExecuteAgentRequest as E, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U, ExecuteAgentResponse as a, UpdateAgentModelResponse as b, SessionStreamEvent as c, SessionStatus as d,
|
|
520
|
+
export { timelinePromptSchema as B, timelineToolResultSchema as D, timelineRunTurnMetricsSchema as F, timelineEventSchema as G, timelineSpanSchema as H, sessionTimelineResponseSchema as I, sessionStreamEventSchema as J, SESSION_STREAM_EVENT_KINDS as K, cancelSessionResponseSchema as L, sessionWebhookEventTypeSchema as M, SESSION_WEBHOOK_DEFAULT_EVENTS as N, isBlockedWebhookHostname as O, validateWebhookUrl as P, sessionWebhookConfigSchema as Q, sessionWebhooksSchema as R, sessionWebhookUsageSchema as V, sessionWebhookSubagentSchema as W, sessionWebhookEventPayloadSchema as X, sessionAgentEventSchema as Y, sessionAgentEventsSchema as _, agentInputSchema as o, executeAgentRequestSchema as p, executeAgentSuccessResponseSchema as q, executeAgentErrorResponseSchema as r, executeAgentResponseSchema as s, updateAgentModelSuccessResponseSchema as t, updateAgentModelRequestSchema as u, updateAgentModelErrorResponseSchema as v, updateAgentModelResponseSchema as w, sessionStatusSchema as x, sessionTimelineIdSchema as y, timelineMetricsSchema as z };
|
|
521
|
+
export type { AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U, SessionAgentEvent as Z, ExecuteAgentResponse as a, UpdateAgentModelResponse as b, SessionStreamEvent as c, SessionStatus as d, SessionWebhookConfig as e, SessionWebhookEventPayload as f, SessionWebhookEventType as g, SessionWebhookSubagent as h, SessionWebhookUsage as i, TimelineMetrics as j, TimelinePrompt as k, TimelineRunTurnMetrics as l, TimelineSpan as m, TimelineToolResult as n };
|