@adecore/agent-contracts 0.69.1 → 0.70.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/dist/chat.d.ts CHANGED
@@ -128,6 +128,8 @@ export declare const ChatBackgroundTaskSchema: z.ZodObject<{
128
128
  startedAt: z.ZodNumber;
129
129
  }, z.core.$strip>;
130
130
  export type ChatBackgroundTask = z.infer<typeof ChatBackgroundTaskSchema>;
131
+ export declare function scheduledWakeupId(ref: string, scheduledFor: number): string;
132
+ export declare function scheduledWakeupAt(task: Pick<ChatBackgroundTask, 'id'>): number | null;
131
133
  export declare const ChatTurnLimitSchema: z.ZodObject<{
132
134
  kind: z.ZodEnum<{
133
135
  overload: "overload";
@@ -843,6 +845,7 @@ export declare const ChatToolItemSchema: z.ZodObject<{
843
845
  error: "error";
844
846
  running: "running";
845
847
  }>;
848
+ stopped: z.ZodOptional<z.ZodBoolean>;
846
849
  parentToolUseId: z.ZodNullable<z.ZodString>;
847
850
  progress: z.ZodOptional<z.ZodObject<{
848
851
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -1055,6 +1058,7 @@ export declare const ChatTurnItemSchema: z.ZodObject<{
1055
1058
  }, z.core.$strip>>;
1056
1059
  label: z.ZodOptional<z.ZodString>;
1057
1060
  taskToolUseId: z.ZodOptional<z.ZodString>;
1061
+ wakeup: z.ZodOptional<z.ZodBoolean>;
1058
1062
  endedAt: z.ZodNullable<z.ZodNumber>;
1059
1063
  costUsd: z.ZodNumber;
1060
1064
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -1338,6 +1342,7 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1338
1342
  error: "error";
1339
1343
  running: "running";
1340
1344
  }>;
1345
+ stopped: z.ZodOptional<z.ZodBoolean>;
1341
1346
  parentToolUseId: z.ZodNullable<z.ZodString>;
1342
1347
  progress: z.ZodOptional<z.ZodObject<{
1343
1348
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -1491,6 +1496,7 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1491
1496
  }, z.core.$strip>>;
1492
1497
  label: z.ZodOptional<z.ZodString>;
1493
1498
  taskToolUseId: z.ZodOptional<z.ZodString>;
1499
+ wakeup: z.ZodOptional<z.ZodBoolean>;
1494
1500
  endedAt: z.ZodNullable<z.ZodNumber>;
1495
1501
  costUsd: z.ZodNumber;
1496
1502
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -1772,6 +1778,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1772
1778
  error: "error";
1773
1779
  running: "running";
1774
1780
  }>;
1781
+ stopped: z.ZodOptional<z.ZodBoolean>;
1775
1782
  parentToolUseId: z.ZodNullable<z.ZodString>;
1776
1783
  progress: z.ZodOptional<z.ZodObject<{
1777
1784
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -1925,6 +1932,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1925
1932
  }, z.core.$strip>>;
1926
1933
  label: z.ZodOptional<z.ZodString>;
1927
1934
  taskToolUseId: z.ZodOptional<z.ZodString>;
1935
+ wakeup: z.ZodOptional<z.ZodBoolean>;
1928
1936
  endedAt: z.ZodNullable<z.ZodNumber>;
1929
1937
  costUsd: z.ZodNumber;
1930
1938
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -2617,6 +2625,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2617
2625
  error: "error";
2618
2626
  running: "running";
2619
2627
  }>;
2628
+ stopped: z.ZodOptional<z.ZodBoolean>;
2620
2629
  parentToolUseId: z.ZodNullable<z.ZodString>;
2621
2630
  progress: z.ZodOptional<z.ZodObject<{
2622
2631
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -2770,6 +2779,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2770
2779
  }, z.core.$strip>>;
2771
2780
  label: z.ZodOptional<z.ZodString>;
2772
2781
  taskToolUseId: z.ZodOptional<z.ZodString>;
2782
+ wakeup: z.ZodOptional<z.ZodBoolean>;
2773
2783
  endedAt: z.ZodNullable<z.ZodNumber>;
2774
2784
  costUsd: z.ZodNumber;
2775
2785
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -3031,6 +3041,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
3031
3041
  error: "error";
3032
3042
  running: "running";
3033
3043
  }>;
3044
+ stopped: z.ZodOptional<z.ZodBoolean>;
3034
3045
  parentToolUseId: z.ZodNullable<z.ZodString>;
3035
3046
  progress: z.ZodOptional<z.ZodObject<{
3036
3047
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -3184,6 +3195,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
3184
3195
  }, z.core.$strip>>;
3185
3196
  label: z.ZodOptional<z.ZodString>;
3186
3197
  taskToolUseId: z.ZodOptional<z.ZodString>;
3198
+ wakeup: z.ZodOptional<z.ZodBoolean>;
3187
3199
  endedAt: z.ZodNullable<z.ZodNumber>;
3188
3200
  costUsd: z.ZodNumber;
3189
3201
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -3876,6 +3888,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
3876
3888
  error: "error";
3877
3889
  running: "running";
3878
3890
  }>;
3891
+ stopped: z.ZodOptional<z.ZodBoolean>;
3879
3892
  parentToolUseId: z.ZodNullable<z.ZodString>;
3880
3893
  progress: z.ZodOptional<z.ZodObject<{
3881
3894
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -4029,6 +4042,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
4029
4042
  }, z.core.$strip>>;
4030
4043
  label: z.ZodOptional<z.ZodString>;
4031
4044
  taskToolUseId: z.ZodOptional<z.ZodString>;
4045
+ wakeup: z.ZodOptional<z.ZodBoolean>;
4032
4046
  endedAt: z.ZodNullable<z.ZodNumber>;
4033
4047
  costUsd: z.ZodNumber;
4034
4048
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -4384,6 +4398,7 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
4384
4398
  error: "error";
4385
4399
  running: "running";
4386
4400
  }>;
4401
+ stopped: z.ZodOptional<z.ZodBoolean>;
4387
4402
  parentToolUseId: z.ZodNullable<z.ZodString>;
4388
4403
  progress: z.ZodOptional<z.ZodObject<{
4389
4404
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -4537,6 +4552,7 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
4537
4552
  }, z.core.$strip>>;
4538
4553
  label: z.ZodOptional<z.ZodString>;
4539
4554
  taskToolUseId: z.ZodOptional<z.ZodString>;
4555
+ wakeup: z.ZodOptional<z.ZodBoolean>;
4540
4556
  endedAt: z.ZodNullable<z.ZodNumber>;
4541
4557
  costUsd: z.ZodNumber;
4542
4558
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -4837,6 +4853,7 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
4837
4853
  error: "error";
4838
4854
  running: "running";
4839
4855
  }>;
4856
+ stopped: z.ZodOptional<z.ZodBoolean>;
4840
4857
  parentToolUseId: z.ZodNullable<z.ZodString>;
4841
4858
  progress: z.ZodOptional<z.ZodObject<{
4842
4859
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -4990,6 +5007,7 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
4990
5007
  }, z.core.$strip>>;
4991
5008
  label: z.ZodOptional<z.ZodString>;
4992
5009
  taskToolUseId: z.ZodOptional<z.ZodString>;
5010
+ wakeup: z.ZodOptional<z.ZodBoolean>;
4993
5011
  endedAt: z.ZodNullable<z.ZodNumber>;
4994
5012
  costUsd: z.ZodNumber;
4995
5013
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -5745,6 +5763,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
5745
5763
  error: "error";
5746
5764
  running: "running";
5747
5765
  }>;
5766
+ stopped: z.ZodOptional<z.ZodBoolean>;
5748
5767
  parentToolUseId: z.ZodNullable<z.ZodString>;
5749
5768
  progress: z.ZodOptional<z.ZodObject<{
5750
5769
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -5898,6 +5917,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
5898
5917
  }, z.core.$strip>>;
5899
5918
  label: z.ZodOptional<z.ZodString>;
5900
5919
  taskToolUseId: z.ZodOptional<z.ZodString>;
5920
+ wakeup: z.ZodOptional<z.ZodBoolean>;
5901
5921
  endedAt: z.ZodNullable<z.ZodNumber>;
5902
5922
  costUsd: z.ZodNumber;
5903
5923
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -6153,6 +6173,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6153
6173
  error: "error";
6154
6174
  running: "running";
6155
6175
  }>;
6176
+ stopped: z.ZodOptional<z.ZodBoolean>;
6156
6177
  parentToolUseId: z.ZodNullable<z.ZodString>;
6157
6178
  progress: z.ZodOptional<z.ZodObject<{
6158
6179
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -6306,6 +6327,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6306
6327
  }, z.core.$strip>>;
6307
6328
  label: z.ZodOptional<z.ZodString>;
6308
6329
  taskToolUseId: z.ZodOptional<z.ZodString>;
6330
+ wakeup: z.ZodOptional<z.ZodBoolean>;
6309
6331
  endedAt: z.ZodNullable<z.ZodNumber>;
6310
6332
  costUsd: z.ZodNumber;
6311
6333
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -6560,6 +6582,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6560
6582
  error: "error";
6561
6583
  running: "running";
6562
6584
  }>;
6585
+ stopped: z.ZodOptional<z.ZodBoolean>;
6563
6586
  parentToolUseId: z.ZodNullable<z.ZodString>;
6564
6587
  progress: z.ZodOptional<z.ZodObject<{
6565
6588
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -6713,6 +6736,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6713
6736
  }, z.core.$strip>>;
6714
6737
  label: z.ZodOptional<z.ZodString>;
6715
6738
  taskToolUseId: z.ZodOptional<z.ZodString>;
6739
+ wakeup: z.ZodOptional<z.ZodBoolean>;
6716
6740
  endedAt: z.ZodNullable<z.ZodNumber>;
6717
6741
  costUsd: z.ZodNumber;
6718
6742
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -7405,6 +7429,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
7405
7429
  error: "error";
7406
7430
  running: "running";
7407
7431
  }>;
7432
+ stopped: z.ZodOptional<z.ZodBoolean>;
7408
7433
  parentToolUseId: z.ZodNullable<z.ZodString>;
7409
7434
  progress: z.ZodOptional<z.ZodObject<{
7410
7435
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -7558,6 +7583,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
7558
7583
  }, z.core.$strip>>;
7559
7584
  label: z.ZodOptional<z.ZodString>;
7560
7585
  taskToolUseId: z.ZodOptional<z.ZodString>;
7586
+ wakeup: z.ZodOptional<z.ZodBoolean>;
7561
7587
  endedAt: z.ZodNullable<z.ZodNumber>;
7562
7588
  costUsd: z.ZodNumber;
7563
7589
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -7708,6 +7734,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
7708
7734
  error: "error";
7709
7735
  running: "running";
7710
7736
  }>;
7737
+ stopped: z.ZodOptional<z.ZodBoolean>;
7711
7738
  parentToolUseId: z.ZodNullable<z.ZodString>;
7712
7739
  progress: z.ZodOptional<z.ZodObject<{
7713
7740
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -7931,6 +7958,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
7931
7958
  error: "error";
7932
7959
  running: "running";
7933
7960
  }>;
7961
+ stopped: z.ZodOptional<z.ZodBoolean>;
7934
7962
  parentToolUseId: z.ZodNullable<z.ZodString>;
7935
7963
  progress: z.ZodOptional<z.ZodObject<{
7936
7964
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -8084,6 +8112,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
8084
8112
  }, z.core.$strip>>;
8085
8113
  label: z.ZodOptional<z.ZodString>;
8086
8114
  taskToolUseId: z.ZodOptional<z.ZodString>;
8115
+ wakeup: z.ZodOptional<z.ZodBoolean>;
8087
8116
  endedAt: z.ZodNullable<z.ZodNumber>;
8088
8117
  costUsd: z.ZodNumber;
8089
8118
  checkpoint: z.ZodOptional<z.ZodString>;
package/dist/chat.js CHANGED
@@ -135,6 +135,20 @@ export const ChatBackgroundTaskSchema = z.object({
135
135
  command: z.string().nullable(),
136
136
  startedAt: z.number()
137
137
  });
138
+ const SCHEDULED_WAKEUP_ID = /^wakeup-(\d+)-./;
139
+ /*
140
+ * A wakeup the CLI scheduled for itself, which starts a turn of its own at `scheduledFor`, is a monitor in the
141
+ * chat's background work. Its time rides in the id, so a client that does not know wakeups still draws a
142
+ * row with a stop, and the wire keeps its shape.
143
+ */
144
+ export function scheduledWakeupId(ref, scheduledFor) {
145
+ return `wakeup-${Math.round(scheduledFor)}-${ref}`;
146
+ }
147
+ /* When a background task that is a scheduled wakeup fires; null for any other task. */
148
+ export function scheduledWakeupAt(task) {
149
+ const match = SCHEDULED_WAKEUP_ID.exec(task.id);
150
+ return match === null ? null : Number(match[1]);
151
+ }
138
152
  /*
139
153
  * Why a turn stopped short, when its CLI said so in its own stream: the plan's usage limit, or a model
140
154
  * too busy to answer. Not a state of its own, since a client that validates `state` knows four.
@@ -458,6 +472,8 @@ export const ChatToolItemSchema = z.object({
458
472
  input: z.unknown(),
459
473
  output: z.string().nullable(),
460
474
  state: ChatToolStateSchema,
475
+ // Set on a call in `error` that ended because a person stopped it, not because it failed.
476
+ stopped: z.boolean().optional(),
461
477
  // Set for a tool call made by a subagent, with the id of the Task call that spawned it.
462
478
  parentToolUseId: z.string().nullable(),
463
479
  progress: ChatToolProgressSchema.optional(),
@@ -574,6 +590,8 @@ export const ChatTurnItemSchema = z.object({
574
590
  label: z.string().optional(),
575
591
  // The Agent call the CLI woke up about, so the header can point at the subagent row it belongs to.
576
592
  taskToolUseId: z.string().optional(),
593
+ // Set on an agent turn a wakeup the agent scheduled for itself started.
594
+ wakeup: z.boolean().optional(),
577
595
  endedAt: z.number().nullable(),
578
596
  costUsd: z.number().nonnegative(),
579
597
  // The git tree of the chat's folder when the turn started; absent outside a repository.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { AGENT_KIND_MAX_LENGTH, AgentKindSchema, type AgentKind, AgentStatusSchema, type AgentStatus, SUGGESTED_TITLE_LIMIT, SuggestedTitleSchema, AgentRequestSchema, type AgentRequest, AgentInfoSchema, type AgentInfo, SessionStatusEventSchema, type SessionStatusEvent, AgentResumePayloadSchema, type AgentResumePayload, ApprovalChoiceSchema, type ApprovalChoice, ApprovalRequestSchema, type ApprovalRequest, SessionApprovalsEventSchema, type SessionApprovalsEvent, ApprovalAnswerPayloadSchema, type ApprovalAnswerPayload, ApprovalAnswerResultSchema, type ApprovalAnswerResult, ApprovalPreferencePayloadSchema, type ApprovalPreferencePayload } from './agent.ts';
2
- export { ChatIdSchema, type ChatId, ChatContextBreakdownSchema, type ChatContextBreakdown, ChatUsageSchema, type ChatUsage, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, type ChatAttachmentUpload, ChatAttachmentUploadsSchema, ChatAttachmentSchema, type ChatAttachment, ChatUiChoiceOriginSchema, type ChatUiChoiceOrigin, ChatUiAnswerSchema, type ChatUiAnswer, ChatQuoteSourceSchema, type ChatQuoteSource, ChatQueuedMessageSchema, type ChatQueuedMessage, ChatBackgroundTaskSchema, type ChatBackgroundTask, ChatTurnLimitSchema, type ChatTurnLimit, ChatGoalStatusSchema, type ChatGoalStatus, ChatGoalSchema, type ChatGoal, ChatQuestionSchema, type ChatQuestion, ChatRequestKindSchema, type ChatRequestKind, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, type ChatRequestApproval, ChatRequestSummarySchema, type ChatRequestSummary, ChatInfoSchema, type ChatInfo, ChatSkillSourceSchema, type ChatSkillSource, ChatSkillSchema, type ChatSkill, SkillsListPayloadSchema, type SkillsListPayload, SkillsListResultSchema, type SkillsListResult, ChatUserItemSchema, ChatUiQueryReadingSchema, type ChatUiQueryReading, ChatUiLinkReadingSchema, type ChatUiLinkReading, ChatUiPlaceReadingSchema, type ChatUiPlaceReading, ChatUiQueryStateSchema, type ChatUiQueryState, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, type ChatToolState, ChatToolProgressSchema, type ChatToolProgress, ChatFileChangeSchema, type ChatFileChange, ChatSubagentStatusSchema, type ChatSubagentStatus, ChatWorkflowPhaseSchema, type ChatWorkflowPhase, ChatWorkflowAgentSchema, type ChatWorkflowAgent, ChatWorkflowSchema, type ChatWorkflow, workflowAgentRef, workflowAgentIdOf, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, type ChatPayloadRef, ChatToolItemSchema, ChatSubagentUsageSchema, type ChatSubagentUsage, HOST_TASK_ORIGIN, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatNoteMessage, type ChatCompactionItem, type ChatUnknownItem, ChatEventSchema, type ChatEvent, type ChatUnknownEvent, ChatEventEnvelopeSchema, type ChatEventEnvelope, ChatCreatePayloadSchema, type ChatCreatePayload, ChatConfigurePayloadSchema, type ChatConfigurePayload, ChatPreferencesPayloadSchema, type ChatPreferencesPayload, ChatTargetPayloadSchema, type ChatTargetPayload, ChatClearPayloadSchema, type ChatClearPayload, ChatCancelPayloadSchema, type ChatCancelPayload, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, type ChatHistoryResult, ChatSubagentPayloadSchema, type ChatSubagentPayload, ChatStopSubagentPayloadSchema, type ChatStopSubagentPayload, ChatGoalActionSchema, type ChatGoalAction, ChatGoalPayloadSchema, type ChatGoalPayload, ChatStopTaskPayloadSchema, type ChatStopTaskPayload, ChatSubagentPageSchema, ChatSubagentSourceSchema, type ChatSubagentSource, ChatSubagentResultSchema, type ChatSubagentResult, ChatStatusEventSchema, type ChatStatusEvent, ChatSubagentChangedEventSchema, type ChatSubagentChangedEvent, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, type ChatBookmark, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, type ChatAddBookmarkPayload, ChatRenameBookmarkPayloadSchema, type ChatRenameBookmarkPayload, ChatRemoveBookmarkPayloadSchema, type ChatRemoveBookmarkPayload, ChatBookmarksResultSchema, type ChatBookmarksResult, ChatBookmarksEventSchema, type ChatBookmarksEvent, ChatRemoveVisualPayloadSchema, type ChatRemoveVisualPayload, ChatVisualsResultSchema, type ChatVisualsResult, ChatVisualsEventSchema, type ChatVisualsEvent, ChatSuggestionEventSchema, type ChatSuggestionEvent, ChatAttachResultSchema, type ChatAttachResult, ChatDeliverySchema, type ChatDelivery, ChatSendPayloadSchema, type ChatSendPayload, ChatSendResultSchema, type ChatSendResult, ChatUiChoicePayloadSchema, type ChatUiChoicePayload, ChatUiQueryPayloadSchema, type ChatUiQueryPayload, ChatUiLinkPayloadSchema, type ChatUiLinkPayload, ChatQueuePayloadSchema, type ChatQueuePayload, ChatUnqueueResultSchema, type ChatUnqueueResult, ChatApprovePayloadSchema, type ChatApprovePayload, ChatDismissPayloadSchema, type ChatDismissPayload, ChatAnswerPayloadSchema, type ChatAnswerPayload, ChatTurnDiffPayloadSchema, type ChatTurnDiffPayload, ChatTurnDiffResultSchema, type ChatTurnDiffResult, ChatToolOutputPayloadSchema, type ChatToolOutputPayload, ChatToolOutputResultSchema, type ChatToolOutputResult, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, type ChatForkPayload, ChatForkResultSchema, type ChatForkResult, ChatContinueOnPayloadSchema, type ChatContinueOnPayload, ChatContinueOnResultSchema, type ChatContinueOnResult, ChatSummarizePayloadSchema, type ChatSummarizePayload, ChatSummarizeResultSchema, type ChatSummarizeResult, ChatForkInfoPayloadSchema, type ChatForkInfoPayload, ChatForkInfoResultSchema, type ChatForkInfoResult, ChatListPayloadSchema, type ChatListPayload, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment, holdsConversation, chatActivity, type ChatActivity } from './chat.ts';
2
+ export { ChatIdSchema, type ChatId, ChatContextBreakdownSchema, type ChatContextBreakdown, ChatUsageSchema, type ChatUsage, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, type ChatAttachmentUpload, ChatAttachmentUploadsSchema, ChatAttachmentSchema, type ChatAttachment, ChatUiChoiceOriginSchema, type ChatUiChoiceOrigin, ChatUiAnswerSchema, type ChatUiAnswer, ChatQuoteSourceSchema, type ChatQuoteSource, ChatQueuedMessageSchema, type ChatQueuedMessage, ChatBackgroundTaskSchema, type ChatBackgroundTask, scheduledWakeupId, scheduledWakeupAt, ChatTurnLimitSchema, type ChatTurnLimit, ChatGoalStatusSchema, type ChatGoalStatus, ChatGoalSchema, type ChatGoal, ChatQuestionSchema, type ChatQuestion, ChatRequestKindSchema, type ChatRequestKind, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, type ChatRequestApproval, ChatRequestSummarySchema, type ChatRequestSummary, ChatInfoSchema, type ChatInfo, ChatSkillSourceSchema, type ChatSkillSource, ChatSkillSchema, type ChatSkill, SkillsListPayloadSchema, type SkillsListPayload, SkillsListResultSchema, type SkillsListResult, ChatUserItemSchema, ChatUiQueryReadingSchema, type ChatUiQueryReading, ChatUiLinkReadingSchema, type ChatUiLinkReading, ChatUiPlaceReadingSchema, type ChatUiPlaceReading, ChatUiQueryStateSchema, type ChatUiQueryState, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, type ChatToolState, ChatToolProgressSchema, type ChatToolProgress, ChatFileChangeSchema, type ChatFileChange, ChatSubagentStatusSchema, type ChatSubagentStatus, ChatWorkflowPhaseSchema, type ChatWorkflowPhase, ChatWorkflowAgentSchema, type ChatWorkflowAgent, ChatWorkflowSchema, type ChatWorkflow, workflowAgentRef, workflowAgentIdOf, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, type ChatPayloadRef, ChatToolItemSchema, ChatSubagentUsageSchema, type ChatSubagentUsage, HOST_TASK_ORIGIN, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatNoteMessage, type ChatCompactionItem, type ChatUnknownItem, ChatEventSchema, type ChatEvent, type ChatUnknownEvent, ChatEventEnvelopeSchema, type ChatEventEnvelope, ChatCreatePayloadSchema, type ChatCreatePayload, ChatConfigurePayloadSchema, type ChatConfigurePayload, ChatPreferencesPayloadSchema, type ChatPreferencesPayload, ChatTargetPayloadSchema, type ChatTargetPayload, ChatClearPayloadSchema, type ChatClearPayload, ChatCancelPayloadSchema, type ChatCancelPayload, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, type ChatHistoryResult, ChatSubagentPayloadSchema, type ChatSubagentPayload, ChatStopSubagentPayloadSchema, type ChatStopSubagentPayload, ChatGoalActionSchema, type ChatGoalAction, ChatGoalPayloadSchema, type ChatGoalPayload, ChatStopTaskPayloadSchema, type ChatStopTaskPayload, ChatSubagentPageSchema, ChatSubagentSourceSchema, type ChatSubagentSource, ChatSubagentResultSchema, type ChatSubagentResult, ChatStatusEventSchema, type ChatStatusEvent, ChatSubagentChangedEventSchema, type ChatSubagentChangedEvent, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, type ChatBookmark, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, type ChatAddBookmarkPayload, ChatRenameBookmarkPayloadSchema, type ChatRenameBookmarkPayload, ChatRemoveBookmarkPayloadSchema, type ChatRemoveBookmarkPayload, ChatBookmarksResultSchema, type ChatBookmarksResult, ChatBookmarksEventSchema, type ChatBookmarksEvent, ChatRemoveVisualPayloadSchema, type ChatRemoveVisualPayload, ChatVisualsResultSchema, type ChatVisualsResult, ChatVisualsEventSchema, type ChatVisualsEvent, ChatSuggestionEventSchema, type ChatSuggestionEvent, ChatAttachResultSchema, type ChatAttachResult, ChatDeliverySchema, type ChatDelivery, ChatSendPayloadSchema, type ChatSendPayload, ChatSendResultSchema, type ChatSendResult, ChatUiChoicePayloadSchema, type ChatUiChoicePayload, ChatUiQueryPayloadSchema, type ChatUiQueryPayload, ChatUiLinkPayloadSchema, type ChatUiLinkPayload, ChatQueuePayloadSchema, type ChatQueuePayload, ChatUnqueueResultSchema, type ChatUnqueueResult, ChatApprovePayloadSchema, type ChatApprovePayload, ChatDismissPayloadSchema, type ChatDismissPayload, ChatAnswerPayloadSchema, type ChatAnswerPayload, ChatTurnDiffPayloadSchema, type ChatTurnDiffPayload, ChatTurnDiffResultSchema, type ChatTurnDiffResult, ChatToolOutputPayloadSchema, type ChatToolOutputPayload, ChatToolOutputResultSchema, type ChatToolOutputResult, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, type ChatForkPayload, ChatForkResultSchema, type ChatForkResult, ChatContinueOnPayloadSchema, type ChatContinueOnPayload, ChatContinueOnResultSchema, type ChatContinueOnResult, ChatSummarizePayloadSchema, type ChatSummarizePayload, ChatSummarizeResultSchema, type ChatSummarizeResult, ChatForkInfoPayloadSchema, type ChatForkInfoPayload, ChatForkInfoResultSchema, type ChatForkInfoResult, ChatListPayloadSchema, type ChatListPayload, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment, holdsConversation, chatActivity, type ChatActivity } from './chat.ts';
3
3
  export { ErrorSchema, type WireError, RequestSchema, type Request, ReplyOkSchema, type ReplyOk, ReplyErrorSchema, type ReplyError, ReplySchema, type Reply, EventSchema, type Event, ServerFrameSchema, type ServerFrame, type ParseResult, parseRequest, parseServerFrame } from './envelope.ts';
4
4
  export { SessionIdSchema, type SessionId } from './ids.ts';
5
5
  export { ModelOptionChoiceSchema, type ModelOptionChoice, ModelOptionDescriptorSchema, type ModelOptionDescriptor, ModelInfoSchema, type ModelInfo, ModelSelectionSchema, type ModelSelection, ModelCatalogProfileSchema, type ModelCatalogProfile, ModelCatalogEntrySchema, type ModelCatalogEntry, ModelCatalogDataSchema, type ModelCatalogData, RuntimeModeSchema, type RuntimeMode, ProviderCapabilitiesSchema, type ProviderCapabilities, ProviderPlatformSchema, type ProviderPlatform, ProviderSignInSchema, type ProviderSignIn, ProviderInstallSchema, type ProviderInstall, ProviderInfoSchema, type ProviderInfo, FRONTIER_PROVIDER_KINDS, API_PROVIDER_KINDS, type ProviderPickerGroup, type ProviderPickerGroups, providerGroupOf, pickerGroupsOf, inPickerOrder, separatesGroups, ProviderListResultSchema, type ProviderListResult, resumeCommandFor } from './model.ts';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Public API: exports.test.ts snapshots this list, so a name added or dropped here is an API change.
2
2
  export { AGENT_KIND_MAX_LENGTH, AgentKindSchema, AgentStatusSchema, SUGGESTED_TITLE_LIMIT, SuggestedTitleSchema, AgentRequestSchema, AgentInfoSchema, SessionStatusEventSchema, AgentResumePayloadSchema, ApprovalChoiceSchema, ApprovalRequestSchema, SessionApprovalsEventSchema, ApprovalAnswerPayloadSchema, ApprovalAnswerResultSchema, ApprovalPreferencePayloadSchema } from './agent.js';
3
- export { ChatIdSchema, ChatContextBreakdownSchema, ChatUsageSchema, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, ChatAttachmentUploadsSchema, ChatAttachmentSchema, ChatUiChoiceOriginSchema, ChatUiAnswerSchema, ChatQuoteSourceSchema, ChatQueuedMessageSchema, ChatBackgroundTaskSchema, ChatTurnLimitSchema, ChatGoalStatusSchema, ChatGoalSchema, ChatQuestionSchema, ChatRequestKindSchema, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, ChatRequestSummarySchema, ChatInfoSchema, ChatSkillSourceSchema, ChatSkillSchema, SkillsListPayloadSchema, SkillsListResultSchema, ChatUserItemSchema, ChatUiQueryReadingSchema, ChatUiLinkReadingSchema, ChatUiPlaceReadingSchema, ChatUiQueryStateSchema, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, ChatToolProgressSchema, ChatFileChangeSchema, ChatSubagentStatusSchema, ChatWorkflowPhaseSchema, ChatWorkflowAgentSchema, ChatWorkflowSchema, workflowAgentRef, workflowAgentIdOf, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatItemSchema, ChatEventSchema, ChatEventEnvelopeSchema, ChatCreatePayloadSchema, ChatConfigurePayloadSchema, ChatPreferencesPayloadSchema, ChatTargetPayloadSchema, ChatClearPayloadSchema, ChatCancelPayloadSchema, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, ChatSubagentPayloadSchema, ChatStopSubagentPayloadSchema, ChatGoalActionSchema, ChatGoalPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentPageSchema, ChatSubagentSourceSchema, ChatSubagentResultSchema, ChatStatusEventSchema, ChatSubagentChangedEventSchema, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatBookmarksResultSchema, ChatBookmarksEventSchema, ChatRemoveVisualPayloadSchema, ChatVisualsResultSchema, ChatVisualsEventSchema, ChatSuggestionEventSchema, ChatAttachResultSchema, ChatDeliverySchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiQueryPayloadSchema, ChatUiLinkPayloadSchema, ChatQueuePayloadSchema, ChatUnqueueResultSchema, ChatApprovePayloadSchema, ChatDismissPayloadSchema, ChatAnswerPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, ChatToolOutputPayloadSchema, ChatToolOutputResultSchema, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, ChatForkResultSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatListPayloadSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment, holdsConversation, chatActivity } from './chat.js';
3
+ export { ChatIdSchema, ChatContextBreakdownSchema, ChatUsageSchema, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, ChatAttachmentUploadsSchema, ChatAttachmentSchema, ChatUiChoiceOriginSchema, ChatUiAnswerSchema, ChatQuoteSourceSchema, ChatQueuedMessageSchema, ChatBackgroundTaskSchema, scheduledWakeupId, scheduledWakeupAt, ChatTurnLimitSchema, ChatGoalStatusSchema, ChatGoalSchema, ChatQuestionSchema, ChatRequestKindSchema, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, ChatRequestSummarySchema, ChatInfoSchema, ChatSkillSourceSchema, ChatSkillSchema, SkillsListPayloadSchema, SkillsListResultSchema, ChatUserItemSchema, ChatUiQueryReadingSchema, ChatUiLinkReadingSchema, ChatUiPlaceReadingSchema, ChatUiQueryStateSchema, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, ChatToolProgressSchema, ChatFileChangeSchema, ChatSubagentStatusSchema, ChatWorkflowPhaseSchema, ChatWorkflowAgentSchema, ChatWorkflowSchema, workflowAgentRef, workflowAgentIdOf, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatItemSchema, ChatEventSchema, ChatEventEnvelopeSchema, ChatCreatePayloadSchema, ChatConfigurePayloadSchema, ChatPreferencesPayloadSchema, ChatTargetPayloadSchema, ChatClearPayloadSchema, ChatCancelPayloadSchema, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, ChatSubagentPayloadSchema, ChatStopSubagentPayloadSchema, ChatGoalActionSchema, ChatGoalPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentPageSchema, ChatSubagentSourceSchema, ChatSubagentResultSchema, ChatStatusEventSchema, ChatSubagentChangedEventSchema, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatBookmarksResultSchema, ChatBookmarksEventSchema, ChatRemoveVisualPayloadSchema, ChatVisualsResultSchema, ChatVisualsEventSchema, ChatSuggestionEventSchema, ChatAttachResultSchema, ChatDeliverySchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiQueryPayloadSchema, ChatUiLinkPayloadSchema, ChatQueuePayloadSchema, ChatUnqueueResultSchema, ChatApprovePayloadSchema, ChatDismissPayloadSchema, ChatAnswerPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, ChatToolOutputPayloadSchema, ChatToolOutputResultSchema, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, ChatForkResultSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatListPayloadSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment, holdsConversation, chatActivity } from './chat.js';
4
4
  export { ErrorSchema, RequestSchema, ReplyOkSchema, ReplyErrorSchema, ReplySchema, EventSchema, ServerFrameSchema, parseRequest, parseServerFrame } from './envelope.js';
5
5
  export { SessionIdSchema } from './ids.js';
6
6
  export { ModelOptionChoiceSchema, ModelOptionDescriptorSchema, ModelInfoSchema, ModelSelectionSchema, ModelCatalogProfileSchema, ModelCatalogEntrySchema, ModelCatalogDataSchema, RuntimeModeSchema, ProviderCapabilitiesSchema, ProviderPlatformSchema, ProviderSignInSchema, ProviderInstallSchema, ProviderInfoSchema, FRONTIER_PROVIDER_KINDS, API_PROVIDER_KINDS, providerGroupOf, pickerGroupsOf, inPickerOrder, separatesGroups, ProviderListResultSchema, resumeCommandFor } from './model.js';
@@ -368,6 +368,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
368
368
  error: "error";
369
369
  running: "running";
370
370
  }>;
371
+ stopped: z.ZodOptional<z.ZodBoolean>;
371
372
  parentToolUseId: z.ZodNullable<z.ZodString>;
372
373
  progress: z.ZodOptional<z.ZodObject<{
373
374
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -521,6 +522,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
521
522
  }, z.core.$strip>>;
522
523
  label: z.ZodOptional<z.ZodString>;
523
524
  taskToolUseId: z.ZodOptional<z.ZodString>;
525
+ wakeup: z.ZodOptional<z.ZodBoolean>;
524
526
  endedAt: z.ZodNullable<z.ZodNumber>;
525
527
  costUsd: z.ZodNumber;
526
528
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -968,6 +970,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
968
970
  error: "error";
969
971
  running: "running";
970
972
  }>;
973
+ stopped: z.ZodOptional<z.ZodBoolean>;
971
974
  parentToolUseId: z.ZodNullable<z.ZodString>;
972
975
  progress: z.ZodOptional<z.ZodObject<{
973
976
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -1121,6 +1124,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1121
1124
  }, z.core.$strip>>;
1122
1125
  label: z.ZodOptional<z.ZodString>;
1123
1126
  taskToolUseId: z.ZodOptional<z.ZodString>;
1127
+ wakeup: z.ZodOptional<z.ZodBoolean>;
1124
1128
  endedAt: z.ZodNullable<z.ZodNumber>;
1125
1129
  costUsd: z.ZodNumber;
1126
1130
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -1376,6 +1380,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1376
1380
  error: "error";
1377
1381
  running: "running";
1378
1382
  }>;
1383
+ stopped: z.ZodOptional<z.ZodBoolean>;
1379
1384
  parentToolUseId: z.ZodNullable<z.ZodString>;
1380
1385
  progress: z.ZodOptional<z.ZodObject<{
1381
1386
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -1529,6 +1534,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1529
1534
  }, z.core.$strip>>;
1530
1535
  label: z.ZodOptional<z.ZodString>;
1531
1536
  taskToolUseId: z.ZodOptional<z.ZodString>;
1537
+ wakeup: z.ZodOptional<z.ZodBoolean>;
1532
1538
  endedAt: z.ZodNullable<z.ZodNumber>;
1533
1539
  costUsd: z.ZodNumber;
1534
1540
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -1783,6 +1789,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1783
1789
  error: "error";
1784
1790
  running: "running";
1785
1791
  }>;
1792
+ stopped: z.ZodOptional<z.ZodBoolean>;
1786
1793
  parentToolUseId: z.ZodNullable<z.ZodString>;
1787
1794
  progress: z.ZodOptional<z.ZodObject<{
1788
1795
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -1936,6 +1943,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1936
1943
  }, z.core.$strip>>;
1937
1944
  label: z.ZodOptional<z.ZodString>;
1938
1945
  taskToolUseId: z.ZodOptional<z.ZodString>;
1946
+ wakeup: z.ZodOptional<z.ZodBoolean>;
1939
1947
  endedAt: z.ZodNullable<z.ZodNumber>;
1940
1948
  costUsd: z.ZodNumber;
1941
1949
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -2628,6 +2636,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
2628
2636
  error: "error";
2629
2637
  running: "running";
2630
2638
  }>;
2639
+ stopped: z.ZodOptional<z.ZodBoolean>;
2631
2640
  parentToolUseId: z.ZodNullable<z.ZodString>;
2632
2641
  progress: z.ZodOptional<z.ZodObject<{
2633
2642
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -2781,6 +2790,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
2781
2790
  }, z.core.$strip>>;
2782
2791
  label: z.ZodOptional<z.ZodString>;
2783
2792
  taskToolUseId: z.ZodOptional<z.ZodString>;
2793
+ wakeup: z.ZodOptional<z.ZodBoolean>;
2784
2794
  endedAt: z.ZodNullable<z.ZodNumber>;
2785
2795
  costUsd: z.ZodNumber;
2786
2796
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -2931,6 +2941,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
2931
2941
  error: "error";
2932
2942
  running: "running";
2933
2943
  }>;
2944
+ stopped: z.ZodOptional<z.ZodBoolean>;
2934
2945
  parentToolUseId: z.ZodNullable<z.ZodString>;
2935
2946
  progress: z.ZodOptional<z.ZodObject<{
2936
2947
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -3154,6 +3165,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
3154
3165
  error: "error";
3155
3166
  running: "running";
3156
3167
  }>;
3168
+ stopped: z.ZodOptional<z.ZodBoolean>;
3157
3169
  parentToolUseId: z.ZodNullable<z.ZodString>;
3158
3170
  progress: z.ZodOptional<z.ZodObject<{
3159
3171
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -3307,6 +3319,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
3307
3319
  }, z.core.$strip>>;
3308
3320
  label: z.ZodOptional<z.ZodString>;
3309
3321
  taskToolUseId: z.ZodOptional<z.ZodString>;
3322
+ wakeup: z.ZodOptional<z.ZodBoolean>;
3310
3323
  endedAt: z.ZodNullable<z.ZodNumber>;
3311
3324
  costUsd: z.ZodNumber;
3312
3325
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -4450,6 +4463,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4450
4463
  error: "error";
4451
4464
  running: "running";
4452
4465
  }>;
4466
+ stopped: z.ZodOptional<z.ZodBoolean>;
4453
4467
  parentToolUseId: z.ZodNullable<z.ZodString>;
4454
4468
  progress: z.ZodOptional<z.ZodObject<{
4455
4469
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -4603,6 +4617,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4603
4617
  }, z.core.$strip>>;
4604
4618
  label: z.ZodOptional<z.ZodString>;
4605
4619
  taskToolUseId: z.ZodOptional<z.ZodString>;
4620
+ wakeup: z.ZodOptional<z.ZodBoolean>;
4606
4621
  endedAt: z.ZodNullable<z.ZodNumber>;
4607
4622
  costUsd: z.ZodNumber;
4608
4623
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -5277,6 +5292,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
5277
5292
  slot: z.ZodString;
5278
5293
  provider: z.ZodEnum<{
5279
5294
  "anthropic-claude-api": "anthropic-claude-api";
5295
+ antigravity: "antigravity";
5280
5296
  claude: "claude";
5281
5297
  codex: "codex";
5282
5298
  copilot: "copilot";
@@ -5301,6 +5317,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
5301
5317
  models: z.ZodArray<z.ZodObject<{
5302
5318
  provider: z.ZodEnum<{
5303
5319
  "anthropic-claude-api": "anthropic-claude-api";
5320
+ antigravity: "antigravity";
5304
5321
  claude: "claude";
5305
5322
  codex: "codex";
5306
5323
  copilot: "copilot";
@@ -5333,6 +5350,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
5333
5350
  projectId: z.ZodNullable<z.ZodString>;
5334
5351
  byProvider: z.ZodRecord<z.ZodEnum<{
5335
5352
  "anthropic-claude-api": "anthropic-claude-api";
5353
+ antigravity: "antigravity";
5336
5354
  claude: "claude";
5337
5355
  codex: "codex";
5338
5356
  copilot: "copilot";
@@ -5380,6 +5398,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
5380
5398
  roots: z.ZodArray<z.ZodObject<{
5381
5399
  provider: z.ZodEnum<{
5382
5400
  "anthropic-claude-api": "anthropic-claude-api";
5401
+ antigravity: "antigravity";
5383
5402
  claude: "claude";
5384
5403
  codex: "codex";
5385
5404
  copilot: "copilot";
@@ -5398,6 +5417,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
5398
5417
  id: z.ZodString;
5399
5418
  kind: z.ZodEnum<{
5400
5419
  "anthropic-claude-api": "anthropic-claude-api";
5420
+ antigravity: "antigravity";
5401
5421
  claude: "claude";
5402
5422
  codex: "codex";
5403
5423
  copilot: "copilot";
@@ -5423,6 +5443,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
5423
5443
  providers: z.ZodArray<z.ZodObject<{
5424
5444
  kind: z.ZodEnum<{
5425
5445
  "anthropic-claude-api": "anthropic-claude-api";
5446
+ antigravity: "antigravity";
5426
5447
  claude: "claude";
5427
5448
  codex: "codex";
5428
5449
  copilot: "copilot";
@@ -5473,6 +5494,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
5473
5494
  providers: z.ZodArray<z.ZodObject<{
5474
5495
  kind: z.ZodEnum<{
5475
5496
  "anthropic-claude-api": "anthropic-claude-api";
5497
+ antigravity: "antigravity";
5476
5498
  claude: "claude";
5477
5499
  codex: "codex";
5478
5500
  copilot: "copilot";
@@ -5883,6 +5905,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
5883
5905
  error: "error";
5884
5906
  running: "running";
5885
5907
  }>;
5908
+ stopped: z.ZodOptional<z.ZodBoolean>;
5886
5909
  parentToolUseId: z.ZodNullable<z.ZodString>;
5887
5910
  progress: z.ZodOptional<z.ZodObject<{
5888
5911
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -6036,6 +6059,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
6036
6059
  }, z.core.$strip>>;
6037
6060
  label: z.ZodOptional<z.ZodString>;
6038
6061
  taskToolUseId: z.ZodOptional<z.ZodString>;
6062
+ wakeup: z.ZodOptional<z.ZodBoolean>;
6039
6063
  endedAt: z.ZodNullable<z.ZodNumber>;
6040
6064
  costUsd: z.ZodNumber;
6041
6065
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -6728,6 +6752,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
6728
6752
  error: "error";
6729
6753
  running: "running";
6730
6754
  }>;
6755
+ stopped: z.ZodOptional<z.ZodBoolean>;
6731
6756
  parentToolUseId: z.ZodNullable<z.ZodString>;
6732
6757
  progress: z.ZodOptional<z.ZodObject<{
6733
6758
  startedAt: z.ZodNullable<z.ZodNumber>;
@@ -6881,6 +6906,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
6881
6906
  }, z.core.$strip>>;
6882
6907
  label: z.ZodOptional<z.ZodString>;
6883
6908
  taskToolUseId: z.ZodOptional<z.ZodString>;
6909
+ wakeup: z.ZodOptional<z.ZodBoolean>;
6884
6910
  endedAt: z.ZodNullable<z.ZodNumber>;
6885
6911
  costUsd: z.ZodNumber;
6886
6912
  checkpoint: z.ZodOptional<z.ZodString>;
@@ -7171,6 +7197,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
7171
7197
  providers: z.ZodArray<z.ZodObject<{
7172
7198
  kind: z.ZodEnum<{
7173
7199
  "anthropic-claude-api": "anthropic-claude-api";
7200
+ antigravity: "antigravity";
7174
7201
  claude: "claude";
7175
7202
  codex: "codex";
7176
7203
  copilot: "copilot";
package/dist/usage.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const UsageProviderSchema: z.ZodEnum<{
3
3
  "anthropic-claude-api": "anthropic-claude-api";
4
+ antigravity: "antigravity";
4
5
  claude: "claude";
5
6
  codex: "codex";
6
7
  copilot: "copilot";
@@ -8,7 +9,7 @@ export declare const UsageProviderSchema: z.ZodEnum<{
8
9
  nanogpt: "nanogpt";
9
10
  }>;
10
11
  export type UsageProvider = z.infer<typeof UsageProviderSchema>;
11
- export declare const USAGE_PROVIDERS: ("anthropic-claude-api" | "claude" | "codex" | "copilot" | "grok" | "nanogpt")[];
12
+ export declare const USAGE_PROVIDERS: ("anthropic-claude-api" | "antigravity" | "claude" | "codex" | "copilot" | "grok" | "nanogpt")[];
12
13
  export declare const UsageResolutionSchema: z.ZodEnum<{
13
14
  day: "day";
14
15
  hour: "hour";
@@ -31,6 +32,7 @@ export declare const UsageAccountSchema: z.ZodObject<{
31
32
  id: z.ZodString;
32
33
  kind: z.ZodEnum<{
33
34
  "anthropic-claude-api": "anthropic-claude-api";
35
+ antigravity: "antigravity";
34
36
  claude: "claude";
35
37
  codex: "codex";
36
38
  copilot: "copilot";
@@ -45,6 +47,7 @@ export declare const UsageBucketSchema: z.ZodObject<{
45
47
  slot: z.ZodString;
46
48
  provider: z.ZodEnum<{
47
49
  "anthropic-claude-api": "anthropic-claude-api";
50
+ antigravity: "antigravity";
48
51
  claude: "claude";
49
52
  codex: "codex";
50
53
  copilot: "copilot";
@@ -77,6 +80,7 @@ export type UsagePriceBasis = z.infer<typeof UsagePriceBasisSchema>;
77
80
  export declare const UsageModelSchema: z.ZodObject<{
78
81
  provider: z.ZodEnum<{
79
82
  "anthropic-claude-api": "anthropic-claude-api";
83
+ antigravity: "antigravity";
80
84
  claude: "claude";
81
85
  codex: "codex";
82
86
  copilot: "copilot";
@@ -110,6 +114,7 @@ export declare const UsageProjectSchema: z.ZodObject<{
110
114
  projectId: z.ZodNullable<z.ZodString>;
111
115
  byProvider: z.ZodRecord<z.ZodEnum<{
112
116
  "anthropic-claude-api": "anthropic-claude-api";
117
+ antigravity: "antigravity";
113
118
  claude: "claude";
114
119
  codex: "codex";
115
120
  copilot: "copilot";
@@ -164,6 +169,7 @@ export type UsagePricing = z.infer<typeof UsagePricingSchema>;
164
169
  export declare const UsageRootSchema: z.ZodObject<{
165
170
  provider: z.ZodEnum<{
166
171
  "anthropic-claude-api": "anthropic-claude-api";
172
+ antigravity: "antigravity";
167
173
  claude: "claude";
168
174
  codex: "codex";
169
175
  copilot: "copilot";
@@ -198,6 +204,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
198
204
  slot: z.ZodString;
199
205
  provider: z.ZodEnum<{
200
206
  "anthropic-claude-api": "anthropic-claude-api";
207
+ antigravity: "antigravity";
201
208
  claude: "claude";
202
209
  codex: "codex";
203
210
  copilot: "copilot";
@@ -222,6 +229,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
222
229
  models: z.ZodArray<z.ZodObject<{
223
230
  provider: z.ZodEnum<{
224
231
  "anthropic-claude-api": "anthropic-claude-api";
232
+ antigravity: "antigravity";
225
233
  claude: "claude";
226
234
  codex: "codex";
227
235
  copilot: "copilot";
@@ -254,6 +262,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
254
262
  projectId: z.ZodNullable<z.ZodString>;
255
263
  byProvider: z.ZodRecord<z.ZodEnum<{
256
264
  "anthropic-claude-api": "anthropic-claude-api";
265
+ antigravity: "antigravity";
257
266
  claude: "claude";
258
267
  codex: "codex";
259
268
  copilot: "copilot";
@@ -301,6 +310,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
301
310
  roots: z.ZodArray<z.ZodObject<{
302
311
  provider: z.ZodEnum<{
303
312
  "anthropic-claude-api": "anthropic-claude-api";
313
+ antigravity: "antigravity";
304
314
  claude: "claude";
305
315
  codex: "codex";
306
316
  copilot: "copilot";
@@ -319,6 +329,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
319
329
  id: z.ZodString;
320
330
  kind: z.ZodEnum<{
321
331
  "anthropic-claude-api": "anthropic-claude-api";
332
+ antigravity: "antigravity";
322
333
  claude: "claude";
323
334
  codex: "codex";
324
335
  copilot: "copilot";
@@ -357,6 +368,7 @@ export declare function evenPace(window: UsageWindow, now: number): EvenPace | n
357
368
  export declare const UsageLimitsProviderSchema: z.ZodObject<{
358
369
  kind: z.ZodEnum<{
359
370
  "anthropic-claude-api": "anthropic-claude-api";
371
+ antigravity: "antigravity";
360
372
  claude: "claude";
361
373
  codex: "codex";
362
374
  copilot: "copilot";
@@ -404,6 +416,7 @@ export declare const UsageLimitsSnapshotSchema: z.ZodObject<{
404
416
  providers: z.ZodArray<z.ZodObject<{
405
417
  kind: z.ZodEnum<{
406
418
  "anthropic-claude-api": "anthropic-claude-api";
419
+ antigravity: "antigravity";
407
420
  claude: "claude";
408
421
  codex: "codex";
409
422
  copilot: "copilot";
package/dist/usage.js CHANGED
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { ProviderAccountIdSchema } from './provider-accounts.js';
3
3
  import { openValues } from './wire-stamps.js';
4
4
  /* The providers whose usage the daemon reads: the CLIs' own records, and the log a host keeps of what it calls itself. A subset of `AgentKindSchema`: it grows with the readers. */
5
- export const UsageProviderSchema = openValues(z.enum(['claude', 'codex', 'nanogpt', 'grok', 'copilot', 'anthropic-claude-api']), 'UsageProvider', {
5
+ export const UsageProviderSchema = openValues(z.enum(['claude', 'codex', 'nanogpt', 'grok', 'copilot', 'anthropic-claude-api', 'antigravity']), 'UsageProvider', {
6
6
  words: 'strings'
7
7
  });
8
8
  export const USAGE_PROVIDERS = UsageProviderSchema.options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agent-contracts",
3
- "version": "0.69.1",
3
+ "version": "0.70.0",
4
4
  "description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -86,8 +86,8 @@
86
86
  "test": "bun --conditions=source test"
87
87
  },
88
88
  "dependencies": {
89
- "@adecore/intelligent-ui": "0.69.1",
90
- "@adecore/utils": "0.69.1",
89
+ "@adecore/intelligent-ui": "0.70.0",
90
+ "@adecore/utils": "0.70.0",
91
91
  "zod": "^4.6.7"
92
92
  },
93
93
  "devDependencies": {
package/src/chat.ts CHANGED
@@ -168,6 +168,24 @@ export const ChatBackgroundTaskSchema = z.object({
168
168
  });
169
169
  export type ChatBackgroundTask = z.infer<typeof ChatBackgroundTaskSchema>;
170
170
 
171
+ const SCHEDULED_WAKEUP_ID = /^wakeup-(\d+)-./;
172
+
173
+ /*
174
+ * A wakeup the CLI scheduled for itself, which starts a turn of its own at `scheduledFor`, is a monitor in the
175
+ * chat's background work. Its time rides in the id, so a client that does not know wakeups still draws a
176
+ * row with a stop, and the wire keeps its shape.
177
+ */
178
+ export function scheduledWakeupId(ref: string, scheduledFor: number): string {
179
+ return `wakeup-${Math.round(scheduledFor)}-${ref}`;
180
+ }
181
+
182
+ /* When a background task that is a scheduled wakeup fires; null for any other task. */
183
+ export function scheduledWakeupAt(task: Pick<ChatBackgroundTask, 'id'>): number | null {
184
+ const match = SCHEDULED_WAKEUP_ID.exec(task.id);
185
+
186
+ return match === null ? null : Number(match[1]);
187
+ }
188
+
171
189
  /*
172
190
  * Why a turn stopped short, when its CLI said so in its own stream: the plan's usage limit, or a model
173
191
  * too busy to answer. Not a state of its own, since a client that validates `state` knows four.
@@ -576,6 +594,8 @@ export const ChatToolItemSchema = z.object({
576
594
  input: z.unknown(),
577
595
  output: z.string().nullable(),
578
596
  state: ChatToolStateSchema,
597
+ // Set on a call in `error` that ended because a person stopped it, not because it failed.
598
+ stopped: z.boolean().optional(),
579
599
  // Set for a tool call made by a subagent, with the id of the Task call that spawned it.
580
600
  parentToolUseId: z.string().nullable(),
581
601
  progress: ChatToolProgressSchema.optional(),
@@ -708,6 +728,8 @@ export const ChatTurnItemSchema = z.object({
708
728
  label: z.string().optional(),
709
729
  // The Agent call the CLI woke up about, so the header can point at the subagent row it belongs to.
710
730
  taskToolUseId: z.string().optional(),
731
+ // Set on an agent turn a wakeup the agent scheduled for itself started.
732
+ wakeup: z.boolean().optional(),
711
733
  endedAt: z.number().nullable(),
712
734
  costUsd: z.number().nonnegative(),
713
735
  // The git tree of the chat's folder when the turn started; absent outside a repository.
package/src/index.ts CHANGED
@@ -55,6 +55,8 @@ export {
55
55
  type ChatQueuedMessage,
56
56
  ChatBackgroundTaskSchema,
57
57
  type ChatBackgroundTask,
58
+ scheduledWakeupId,
59
+ scheduledWakeupAt,
58
60
  ChatTurnLimitSchema,
59
61
  type ChatTurnLimit,
60
62
  ChatGoalStatusSchema,
package/src/usage.ts CHANGED
@@ -3,9 +3,13 @@ import { ProviderAccountIdSchema } from './provider-accounts.ts';
3
3
  import { openValues } from './wire-stamps.ts';
4
4
 
5
5
  /* The providers whose usage the daemon reads: the CLIs' own records, and the log a host keeps of what it calls itself. A subset of `AgentKindSchema`: it grows with the readers. */
6
- export const UsageProviderSchema = openValues(z.enum(['claude', 'codex', 'nanogpt', 'grok', 'copilot', 'anthropic-claude-api']), 'UsageProvider', {
7
- words: 'strings'
8
- });
6
+ export const UsageProviderSchema = openValues(
7
+ z.enum(['claude', 'codex', 'nanogpt', 'grok', 'copilot', 'anthropic-claude-api', 'antigravity']),
8
+ 'UsageProvider',
9
+ {
10
+ words: 'strings'
11
+ }
12
+ );
9
13
  export type UsageProvider = z.infer<typeof UsageProviderSchema>;
10
14
 
11
15
  export const USAGE_PROVIDERS = UsageProviderSchema.options;