@meistrari/agent-sdk 0.5.0 → 0.6.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.
@@ -163,9 +163,9 @@ declare const timelineEventSchema: z.ZodObject<{
163
163
  other: "other";
164
164
  }>>;
165
165
  status: z.ZodOptional<z.ZodEnum<{
166
- success: "success";
167
166
  failed: "failed";
168
167
  cancelled: "cancelled";
168
+ success: "success";
169
169
  timeout: "timeout";
170
170
  }>>;
171
171
  result: z.ZodOptional<z.ZodObject<{
@@ -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
+ failed: "failed";
279
+ cancelled: "cancelled";
280
+ success: "success";
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
+ failed: "failed";
338
+ cancelled: "cancelled";
339
+ success: "success";
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
+ failed: "failed";
403
+ cancelled: "cancelled";
404
+ success: "success";
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<{
@@ -374,9 +553,9 @@ declare const sessionStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
374
553
  other: "other";
375
554
  }>>;
376
555
  status: z.ZodOptional<z.ZodEnum<{
377
- success: "success";
378
556
  failed: "failed";
379
557
  cancelled: "cancelled";
558
+ success: "success";
380
559
  timeout: "timeout";
381
560
  }>>;
382
561
  result: z.ZodOptional<z.ZodObject<{
@@ -459,12 +638,14 @@ declare const sessionWebhookUsageSchema: z.ZodObject<{
459
638
  numTurns: z.ZodOptional<z.ZodNumber>;
460
639
  }, z.core.$strict>;
461
640
  type SessionWebhookUsage = z.infer<typeof sessionWebhookUsageSchema>;
641
+ declare const sessionWebhookResultSchema: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>;
642
+ type SessionWebhookResult = z.infer<typeof sessionWebhookResultSchema>;
462
643
  declare const sessionWebhookSubagentSchema: z.ZodObject<{
463
644
  callId: z.ZodString;
464
645
  subagentType: z.ZodOptional<z.ZodString>;
465
646
  status: z.ZodOptional<z.ZodEnum<{
466
- success: "success";
467
647
  failed: "failed";
648
+ success: "success";
468
649
  }>>;
469
650
  durationMs: z.ZodOptional<z.ZodNumber>;
470
651
  }, z.core.$strict>;
@@ -484,6 +665,8 @@ declare const sessionWebhookEventPayloadSchema: z.ZodObject<{
484
665
  runId: z.ZodOptional<z.ZodString>;
485
666
  status: z.ZodString;
486
667
  error: z.ZodOptional<z.ZodString>;
668
+ interrupted: z.ZodOptional<z.ZodBoolean>;
669
+ failReason: z.ZodOptional<z.ZodString>;
487
670
  usage: z.ZodOptional<z.ZodObject<{
488
671
  inputTokens: z.ZodOptional<z.ZodNumber>;
489
672
  outputTokens: z.ZodOptional<z.ZodNumber>;
@@ -493,12 +676,13 @@ declare const sessionWebhookEventPayloadSchema: z.ZodObject<{
493
676
  durationMs: z.ZodOptional<z.ZodNumber>;
494
677
  numTurns: z.ZodOptional<z.ZodNumber>;
495
678
  }, z.core.$strict>>;
679
+ result: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
496
680
  subagent: z.ZodOptional<z.ZodObject<{
497
681
  callId: z.ZodString;
498
682
  subagentType: z.ZodOptional<z.ZodString>;
499
683
  status: z.ZodOptional<z.ZodEnum<{
500
- success: "success";
501
684
  failed: "failed";
685
+ success: "success";
502
686
  }>>;
503
687
  durationMs: z.ZodOptional<z.ZodNumber>;
504
688
  }, z.core.$strict>>;
@@ -515,8 +699,8 @@ declare const sessionAgentEventSchema: z.ZodObject<{
515
699
  callId: z.ZodString;
516
700
  subagentType: z.ZodOptional<z.ZodString>;
517
701
  status: z.ZodOptional<z.ZodEnum<{
518
- success: "success";
519
702
  failed: "failed";
703
+ success: "success";
520
704
  }>>;
521
705
  durationMs: z.ZodOptional<z.ZodNumber>;
522
706
  timestamp: z.ZodNumber;
@@ -530,12 +714,12 @@ declare const sessionAgentEventsSchema: z.ZodArray<z.ZodObject<{
530
714
  callId: z.ZodString;
531
715
  subagentType: z.ZodOptional<z.ZodString>;
532
716
  status: z.ZodOptional<z.ZodEnum<{
533
- success: "success";
534
717
  failed: "failed";
718
+ success: "success";
535
719
  }>>;
536
720
  durationMs: z.ZodOptional<z.ZodNumber>;
537
721
  timestamp: z.ZodNumber;
538
722
  }, z.core.$strict>>;
539
723
 
540
- export { sessionWebhookEventPayloadSchema 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, 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, sessionWebhookSubagentSchema as _, sessionAgentEventSchema as a0, sessionAgentEventsSchema as a2, 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 };
541
- export type { AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionTimelineResponse as S, TimelineEvent as T, UpdateAgentModelRequest as U, ExecuteAgentResponse as a, SessionAgentEvent as a1, 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 };
724
+ export { isBlockedWebhookHostname as $, timelineMetricsSchema as B, timelinePromptSchema as D, timelineToolResultSchema as F, timelineRunTurnMetricsSchema as G, timelineEventSchema as H, timelineSpanSchema as I, sessionTimelineResponseSchema as J, sessionThreadUserMessageSchema as K, sessionThreadAssistantMessageSchema as L, sessionThreadTurnSchema as M, 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 p, executeAgentRequestSchema as q, executeAgentSuccessResponseSchema as r, executeAgentErrorResponseSchema as s, executeAgentResponseSchema as t, updateAgentModelRequestSchema as u, updateAgentModelSuccessResponseSchema as v, updateAgentModelErrorResponseSchema as w, updateAgentModelResponseSchema as x, sessionStatusSchema as y, sessionTimelineIdSchema as z };
725
+ export type { AgentInput as A, CancelSessionResponse as C, ExecuteAgentRequest as E, SessionThreadTurn as N, 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, SessionWebhookConfig as f, SessionWebhookEventPayload as g, SessionWebhookEventType as h, SessionWebhookSubagent as i, SessionWebhookUsage as j, TimelineMetrics as k, TimelinePrompt as l, TimelineRunTurnMetrics as m, TimelineSpan as n, TimelineToolResult as o };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/agent-sdk",
3
3
  "type": "module",
4
- "version": "0.5.0",
4
+ "version": "0.6.0",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
7
7
  "type": "git",