@adecore/agent-contracts 0.40.2 → 0.40.4

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
@@ -409,6 +409,7 @@ export declare const ChatInfoSchema: z.ZodObject<{
409
409
  createdAt: z.ZodNumber;
410
410
  }, z.core.$strip>;
411
411
  export type ChatInfo = z.infer<typeof ChatInfoSchema>;
412
+ export declare function holdsConversation(info: Pick<ChatInfo, 'agentSessionId' | 'activeTurnId'>): boolean;
412
413
  export declare const ChatSkillSourceSchema: z.ZodEnum<{
413
414
  plugin: "plugin";
414
415
  project: "project";
@@ -1416,6 +1417,8 @@ export type ChatTurnItem = z.infer<typeof ChatTurnItemSchema>;
1416
1417
  export type ChatNoteItem = z.infer<typeof ChatNoteItemSchema>;
1417
1418
  export type ChatCompactionItem = z.infer<typeof ChatCompactionItemSchema>;
1418
1419
  export declare function activeSubagents(items: readonly ChatItem[]): ChatSubagentItem[];
1420
+ export declare const CHAT_OUTLINE_TEXT_CHARS = 280;
1421
+ export declare function outlineItems(items: readonly ChatItem[], marked?: ReadonlySet<string>): ChatItem[];
1419
1422
  export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1420
1423
  type: z.ZodLiteral<"item">;
1421
1424
  item: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -6745,6 +6748,348 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6745
6748
  childId: z.ZodOptional<z.ZodString>;
6746
6749
  parentToolUseId: z.ZodOptional<z.ZodString>;
6747
6750
  }, z.core.$strip>>>;
6751
+ outline: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
6752
+ id: z.ZodString;
6753
+ createdAt: z.ZodNumber;
6754
+ turnId: z.ZodNullable<z.ZodString>;
6755
+ kind: z.ZodLiteral<"user">;
6756
+ text: z.ZodString;
6757
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString>>;
6758
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
6759
+ chats: z.ZodOptional<z.ZodArray<z.ZodString>>;
6760
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
6761
+ id: z.ZodString;
6762
+ name: z.ZodString;
6763
+ mime: z.ZodString;
6764
+ size: z.ZodNumber;
6765
+ path: z.ZodString;
6766
+ width: z.ZodOptional<z.ZodNumber>;
6767
+ height: z.ZodOptional<z.ZodNumber>;
6768
+ }, z.core.$strip>>>;
6769
+ uiChoice: z.ZodOptional<z.ZodObject<{
6770
+ itemId: z.ZodString;
6771
+ blockId: z.ZodString;
6772
+ revision: z.ZodString;
6773
+ choiceId: z.ZodString;
6774
+ label: z.ZodString;
6775
+ sourceAt: z.ZodNumber;
6776
+ older: z.ZodBoolean;
6777
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6778
+ at: z.ZodNumber;
6779
+ }, z.core.$strip>>;
6780
+ quoteSource: z.ZodOptional<z.ZodObject<{
6781
+ itemId: z.ZodString;
6782
+ }, z.core.$strip>>;
6783
+ references: z.ZodOptional<z.ZodArray<z.ZodString>>;
6784
+ }, z.core.$strip>, z.ZodObject<{
6785
+ id: z.ZodString;
6786
+ createdAt: z.ZodNumber;
6787
+ turnId: z.ZodNullable<z.ZodString>;
6788
+ kind: z.ZodLiteral<"assistant">;
6789
+ ui: z.ZodOptional<z.ZodArray<z.ZodType<import("@adecore/intelligent-ui/compiler").UiBlock, unknown, z.core.$ZodTypeInternals<import("@adecore/intelligent-ui/compiler").UiBlock, unknown>>>>;
6790
+ uiAnswers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6791
+ itemId: z.ZodString;
6792
+ blockId: z.ZodString;
6793
+ revision: z.ZodString;
6794
+ choiceId: z.ZodString;
6795
+ label: z.ZodString;
6796
+ sourceAt: z.ZodNumber;
6797
+ older: z.ZodBoolean;
6798
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6799
+ at: z.ZodNumber;
6800
+ queued: z.ZodBoolean;
6801
+ turnId: z.ZodString;
6802
+ }, z.core.$strip>>>;
6803
+ uiQueries: z.ZodOptional<z.ZodObject<{
6804
+ authorChatId: z.ZodString;
6805
+ blocks: z.ZodRecord<z.ZodString, z.ZodObject<{
6806
+ revision: z.ZodString;
6807
+ readings: z.ZodRecord<z.ZodString, z.ZodObject<{
6808
+ state: z.ZodEnum<{
6809
+ failed: "failed";
6810
+ fresh: "fresh";
6811
+ refused: "refused";
6812
+ }>;
6813
+ value: z.ZodOptional<z.ZodUnknown>;
6814
+ readId: z.ZodOptional<z.ZodString>;
6815
+ readAt: z.ZodNumber;
6816
+ code: z.ZodOptional<z.ZodString>;
6817
+ reason: z.ZodOptional<z.ZodString>;
6818
+ }, z.core.$strip>>;
6819
+ fallback: z.ZodString;
6820
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6821
+ state: z.ZodEnum<{
6822
+ chip: "chip";
6823
+ plain: "plain";
6824
+ }>;
6825
+ target: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
6826
+ type: z.ZodLiteral<"File">;
6827
+ path: z.ZodString;
6828
+ line: z.ZodOptional<z.ZodNumber>;
6829
+ }, z.core.$strict>, z.ZodObject<{
6830
+ type: z.ZodLiteral<"Diff">;
6831
+ path: z.ZodString;
6832
+ }, z.core.$strict>, z.ZodObject<{
6833
+ type: z.ZodLiteral<"Commit">;
6834
+ sha: z.ZodString;
6835
+ }, z.core.$strict>, z.ZodObject<{
6836
+ type: z.ZodLiteral<"Node">;
6837
+ id: z.ZodString;
6838
+ }, z.core.$strict>], "type">>;
6839
+ cwd: z.ZodOptional<z.ZodString>;
6840
+ viewId: z.ZodOptional<z.ZodString>;
6841
+ projectId: z.ZodOptional<z.ZodString>;
6842
+ staged: z.ZodOptional<z.ZodBoolean>;
6843
+ conflicted: z.ZodOptional<z.ZodBoolean>;
6844
+ relativePath: z.ZodOptional<z.ZodString>;
6845
+ label: z.ZodOptional<z.ZodString>;
6846
+ code: z.ZodOptional<z.ZodString>;
6847
+ reason: z.ZodOptional<z.ZodString>;
6848
+ }, z.core.$strip>>>;
6849
+ places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6850
+ state: z.ZodEnum<{
6851
+ found: "found";
6852
+ missing: "missing";
6853
+ }>;
6854
+ address: z.ZodString;
6855
+ lat: z.ZodOptional<z.ZodNumber>;
6856
+ lon: z.ZodOptional<z.ZodNumber>;
6857
+ label: z.ZodOptional<z.ZodString>;
6858
+ code: z.ZodOptional<z.ZodString>;
6859
+ reason: z.ZodOptional<z.ZodString>;
6860
+ }, z.core.$strip>>>;
6861
+ }, z.core.$strip>>;
6862
+ }, z.core.$strip>>;
6863
+ phase: z.ZodOptional<z.ZodString>;
6864
+ text: z.ZodString;
6865
+ streaming: z.ZodBoolean;
6866
+ parentToolUseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6867
+ }, z.core.$strip>, z.ZodObject<{
6868
+ id: z.ZodString;
6869
+ createdAt: z.ZodNumber;
6870
+ turnId: z.ZodNullable<z.ZodString>;
6871
+ kind: z.ZodLiteral<"thinking">;
6872
+ text: z.ZodString;
6873
+ streaming: z.ZodBoolean;
6874
+ endedAt: z.ZodNullable<z.ZodNumber>;
6875
+ }, z.core.$strip>, z.ZodObject<{
6876
+ id: z.ZodString;
6877
+ createdAt: z.ZodNumber;
6878
+ turnId: z.ZodNullable<z.ZodString>;
6879
+ kind: z.ZodLiteral<"tool">;
6880
+ toolUseId: z.ZodString;
6881
+ name: z.ZodString;
6882
+ input: z.ZodUnknown;
6883
+ output: z.ZodNullable<z.ZodString>;
6884
+ state: z.ZodEnum<{
6885
+ done: "done";
6886
+ error: "error";
6887
+ running: "running";
6888
+ }>;
6889
+ parentToolUseId: z.ZodNullable<z.ZodString>;
6890
+ progress: z.ZodOptional<z.ZodObject<{
6891
+ startedAt: z.ZodNullable<z.ZodNumber>;
6892
+ description: z.ZodNullable<z.ZodString>;
6893
+ output: z.ZodNullable<z.ZodString>;
6894
+ }, z.core.$strip>>;
6895
+ changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
6896
+ path: z.ZodString;
6897
+ kind: z.ZodEnum<{
6898
+ add: "add";
6899
+ delete: "delete";
6900
+ update: "update";
6901
+ }>;
6902
+ diff: z.ZodString;
6903
+ }, z.core.$strip>>>;
6904
+ workflow: z.ZodOptional<z.ZodObject<{
6905
+ name: z.ZodNullable<z.ZodString>;
6906
+ taskId: z.ZodOptional<z.ZodString>;
6907
+ phases: z.ZodArray<z.ZodObject<{
6908
+ index: z.ZodNumber;
6909
+ title: z.ZodString;
6910
+ }, z.core.$strip>>;
6911
+ agents: z.ZodArray<z.ZodObject<{
6912
+ index: z.ZodNumber;
6913
+ label: z.ZodString;
6914
+ phaseIndex: z.ZodNullable<z.ZodNumber>;
6915
+ agentId: z.ZodNullable<z.ZodString>;
6916
+ status: z.ZodEnum<{
6917
+ done: "done";
6918
+ failed: "failed";
6919
+ running: "running";
6920
+ }>;
6921
+ startedAt: z.ZodNullable<z.ZodNumber>;
6922
+ durationMs: z.ZodNullable<z.ZodNumber>;
6923
+ lastTool: z.ZodNullable<z.ZodString>;
6924
+ lastToolSummary: z.ZodOptional<z.ZodString>;
6925
+ promptPreview: z.ZodOptional<z.ZodString>;
6926
+ resultPreview: z.ZodOptional<z.ZodString>;
6927
+ error: z.ZodOptional<z.ZodString>;
6928
+ }, z.core.$strip>>;
6929
+ lastProgressAt: z.ZodOptional<z.ZodNumber>;
6930
+ stalledAt: z.ZodOptional<z.ZodNumber>;
6931
+ }, z.core.$strip>>;
6932
+ }, z.core.$strip>, z.ZodObject<{
6933
+ id: z.ZodString;
6934
+ createdAt: z.ZodNumber;
6935
+ turnId: z.ZodNullable<z.ZodString>;
6936
+ kind: z.ZodLiteral<"subagent">;
6937
+ toolUseId: z.ZodString;
6938
+ description: z.ZodString;
6939
+ subagentType: z.ZodNullable<z.ZodString>;
6940
+ model: z.ZodOptional<z.ZodString>;
6941
+ prompt: z.ZodNullable<z.ZodString>;
6942
+ background: z.ZodBoolean;
6943
+ status: z.ZodEnum<{
6944
+ done: "done";
6945
+ failed: "failed";
6946
+ running: "running";
6947
+ }>;
6948
+ startedAt: z.ZodNumber;
6949
+ finishedAt: z.ZodNullable<z.ZodNumber>;
6950
+ summary: z.ZodNullable<z.ZodString>;
6951
+ result: z.ZodNullable<z.ZodString>;
6952
+ usage: z.ZodNullable<z.ZodObject<{
6953
+ totalTokens: z.ZodNumber;
6954
+ toolUses: z.ZodNumber;
6955
+ durationMs: z.ZodNumber;
6956
+ }, z.core.$strip>>;
6957
+ lastTool: z.ZodNullable<z.ZodString>;
6958
+ outputFile: z.ZodOptional<z.ZodString>;
6959
+ itemsTruncated: z.ZodBoolean;
6960
+ native: z.ZodOptional<z.ZodObject<{
6961
+ agentId: z.ZodOptional<z.ZodString>;
6962
+ threadId: z.ZodOptional<z.ZodString>;
6963
+ }, z.core.$strip>>;
6964
+ origin: z.ZodOptional<z.ZodEnum<{
6965
+ native: "native";
6966
+ ruimte: "ruimte";
6967
+ }>>;
6968
+ childId: z.ZodOptional<z.ZodString>;
6969
+ parentToolUseId: z.ZodOptional<z.ZodString>;
6970
+ }, z.core.$strip>, z.ZodObject<{
6971
+ id: z.ZodString;
6972
+ createdAt: z.ZodNumber;
6973
+ turnId: z.ZodNullable<z.ZodString>;
6974
+ kind: z.ZodLiteral<"approval">;
6975
+ requestId: z.ZodString;
6976
+ toolUseId: z.ZodNullable<z.ZodString>;
6977
+ toolName: z.ZodString;
6978
+ input: z.ZodUnknown;
6979
+ description: z.ZodNullable<z.ZodString>;
6980
+ canAllowAlways: z.ZodBoolean;
6981
+ allowAlways: z.ZodOptional<z.ZodObject<{
6982
+ label: z.ZodString;
6983
+ description: z.ZodString;
6984
+ }, z.core.$strip>>;
6985
+ decision: z.ZodEnum<{
6986
+ allow: "allow";
6987
+ "allow-always": "allow-always";
6988
+ cancelled: "cancelled";
6989
+ deny: "deny";
6990
+ pending: "pending";
6991
+ }>;
6992
+ }, z.core.$strip>, z.ZodObject<{
6993
+ id: z.ZodString;
6994
+ createdAt: z.ZodNumber;
6995
+ turnId: z.ZodNullable<z.ZodString>;
6996
+ kind: z.ZodLiteral<"question">;
6997
+ requestId: z.ZodString;
6998
+ questions: z.ZodArray<z.ZodObject<{
6999
+ id: z.ZodString;
7000
+ header: z.ZodString;
7001
+ question: z.ZodString;
7002
+ choices: z.ZodArray<z.ZodObject<{
7003
+ label: z.ZodString;
7004
+ description: z.ZodString;
7005
+ }, z.core.$strip>>;
7006
+ multiSelect: z.ZodBoolean;
7007
+ }, z.core.$strip>>;
7008
+ async: z.ZodOptional<z.ZodBoolean>;
7009
+ answers: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
7010
+ state: z.ZodEnum<{
7011
+ answered: "answered";
7012
+ cancelled: "cancelled";
7013
+ dismissed: "dismissed";
7014
+ pending: "pending";
7015
+ }>;
7016
+ }, z.core.$strip>, z.ZodObject<{
7017
+ id: z.ZodString;
7018
+ createdAt: z.ZodNumber;
7019
+ turnId: z.ZodNullable<z.ZodString>;
7020
+ kind: z.ZodLiteral<"turn">;
7021
+ state: z.ZodEnum<{
7022
+ aborted: "aborted";
7023
+ done: "done";
7024
+ error: "error";
7025
+ running: "running";
7026
+ }>;
7027
+ origin: z.ZodOptional<z.ZodEnum<{
7028
+ agent: "agent";
7029
+ user: "user";
7030
+ }>>;
7031
+ label: z.ZodOptional<z.ZodString>;
7032
+ taskToolUseId: z.ZodOptional<z.ZodString>;
7033
+ endedAt: z.ZodNullable<z.ZodNumber>;
7034
+ costUsd: z.ZodNumber;
7035
+ checkpoint: z.ZodOptional<z.ZodString>;
7036
+ checkpointHead: z.ZodOptional<z.ZodString>;
7037
+ checkpointHeadAfter: z.ZodOptional<z.ZodString>;
7038
+ checkpointDiff: z.ZodOptional<z.ZodObject<{
7039
+ files: z.ZodArray<z.ZodObject<{
7040
+ path: z.ZodString;
7041
+ kind: z.ZodEnum<{
7042
+ add: "add";
7043
+ delete: "delete";
7044
+ update: "update";
7045
+ }>;
7046
+ added: z.ZodNumber;
7047
+ deleted: z.ZodNumber;
7048
+ diff: z.ZodString;
7049
+ omitted: z.ZodOptional<z.ZodEnum<{
7050
+ binary: "binary";
7051
+ "too-large": "too-large";
7052
+ }>>;
7053
+ }, z.core.$strip>>;
7054
+ truncated: z.ZodBoolean;
7055
+ }, z.core.$strip>>;
7056
+ attempt: z.ZodOptional<z.ZodNumber>;
7057
+ resumePending: z.ZodOptional<z.ZodBoolean>;
7058
+ deliveryPending: z.ZodOptional<z.ZodBoolean>;
7059
+ taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
7060
+ messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
7061
+ native: z.ZodOptional<z.ZodObject<{
7062
+ turnId: z.ZodOptional<z.ZodString>;
7063
+ lastUuid: z.ZodOptional<z.ZodString>;
7064
+ }, z.core.$strip>>;
7065
+ checkpointAfter: z.ZodOptional<z.ZodString>;
7066
+ summaryFor: z.ZodOptional<z.ZodString>;
7067
+ limit: z.ZodOptional<z.ZodObject<{
7068
+ kind: z.ZodEnum<{
7069
+ overload: "overload";
7070
+ usage: "usage";
7071
+ }>;
7072
+ resetsAt: z.ZodOptional<z.ZodNumber>;
7073
+ }, z.core.$strip>>;
7074
+ }, z.core.$strip>, z.ZodObject<{
7075
+ id: z.ZodString;
7076
+ createdAt: z.ZodNumber;
7077
+ turnId: z.ZodNullable<z.ZodString>;
7078
+ kind: z.ZodLiteral<"note">;
7079
+ level: z.ZodEnum<{
7080
+ error: "error";
7081
+ info: "info";
7082
+ warning: "warning";
7083
+ }>;
7084
+ text: z.ZodString;
7085
+ from: z.ZodOptional<z.ZodString>;
7086
+ }, z.core.$strip>, z.ZodObject<{
7087
+ id: z.ZodString;
7088
+ createdAt: z.ZodNumber;
7089
+ turnId: z.ZodNullable<z.ZodString>;
7090
+ kind: z.ZodLiteral<"compaction">;
7091
+ preTokens: z.ZodNullable<z.ZodNumber>;
7092
+ }, z.core.$strip>], "kind">>>;
6748
7093
  }, z.core.$strip>;
6749
7094
  export type ChatAttachResult = z.infer<typeof ChatAttachResultSchema>;
6750
7095
  export declare const ChatDeliverySchema: z.ZodEnum<{
package/dist/chat.js CHANGED
@@ -262,6 +262,14 @@ export const ChatInfoSchema = z.object({
262
262
  goal: ChatGoalSchema.optional(),
263
263
  createdAt: z.number()
264
264
  });
265
+ /*
266
+ * Whether the CLI holds a conversation for the chat, which ties it to the CLI and to accounts that read its
267
+ * transcripts. The CLI names its session during the first turn, so a turn in flight counts too. Past turns do
268
+ * not: a cleared chat keeps its tally, but the next send starts a conversation of its own.
269
+ */
270
+ export function holdsConversation(info) {
271
+ return info.agentSessionId !== null || info.activeTurnId !== null;
272
+ }
265
273
  // Where a skill was found: the person's own folder, the chat's folder, or a plugin.
266
274
  export const ChatSkillSourceSchema = z.enum(['user', 'project', 'plugin']);
267
275
  export const ChatSkillSchema = z.object({
@@ -616,6 +624,30 @@ export function activeSubagents(items) {
616
624
  (item.turnId !== null && turns.has(item.turnId)))
617
625
  .map(({ item }) => item);
618
626
  }
627
+ /* How much of a message the outline keeps: what a hover card over its tick shows. */
628
+ export const CHAT_OUTLINE_TEXT_CHARS = 280;
629
+ /*
630
+ * The places a scrubber over the thread returns to, cut down to what its ticks need: every message of
631
+ * the person, every turn tasks or messages woke, and the replies in `marked`, which a bookmark is on.
632
+ * A message of only attachments keeps their names. `items` is in thread order.
633
+ */
634
+ export function outlineItems(items, marked = new Set()) {
635
+ return items.flatMap((item) => {
636
+ const { id, createdAt, turnId } = item;
637
+ if (item.kind === 'user') {
638
+ const text = item.text.slice(0, CHAT_OUTLINE_TEXT_CHARS);
639
+ return [{ id, createdAt, turnId, kind: 'user', text, ...(text === '' && item.attachments ? { attachments: item.attachments } : {}) }];
640
+ }
641
+ if (item.kind === 'turn' && ((item.taskIds?.length ?? 0) > 0 || (item.messageFrom?.length ?? 0) > 0)) {
642
+ const { checkpointDiff: _checkpointDiff, ...turn } = item;
643
+ return [turn];
644
+ }
645
+ if (item.kind === 'assistant' && marked.has(id)) {
646
+ return [{ id, createdAt, turnId, kind: 'assistant', text: item.text.slice(0, CHAT_OUTLINE_TEXT_CHARS), streaming: false }];
647
+ }
648
+ return [];
649
+ });
650
+ }
619
651
  // Events apply after the `chat.attach` snapshot; item ids make upserts and streamed deltas replayable.
620
652
  export const ChatEventSchema = z.discriminatedUnion('type', [
621
653
  z.object({ type: z.literal('item'), item: ChatItemSchema, historyIndex: z.number().int().nonnegative().optional() }),
@@ -781,7 +813,9 @@ export const ChatAttachResultSchema = z.object({
781
813
  // Absent from a host that keeps no visuals.
782
814
  visuals: ChatVisualsSchema.optional(),
783
815
  // With a page: the active sub-agents (`activeSubagents`) from before it, so the pill over the composer never waits on a scroll.
784
- subagents: z.array(ChatSubagentItemSchema).optional()
816
+ subagents: z.array(ChatSubagentItemSchema).optional(),
817
+ // With a page: the thread before it as `outlineItems` cuts it, so the scrubber reaches the whole thread before a scroll does.
818
+ outline: z.array(ChatItemSchema).optional()
785
819
  });
786
820
  export const ChatDeliverySchema = z.enum(['steer', 'queue']);
787
821
  export const ChatSendPayloadSchema = z
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { KNOWN_AGENT_KINDS, type KnownAgentKind, AGENT_KIND_MAX_LENGTH, AgentKindSchema, type AgentKind, isKnownAgentKind, 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, ChatToolItemSchema, ChatSubagentUsageSchema, type ChatSubagentUsage, HOST_TASK_ORIGIN, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatCompactionItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatCompactionItem, ChatEventSchema, type ChatEvent, 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, 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, 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, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment } 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, 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, ChatToolItemSchema, ChatSubagentUsageSchema, type ChatSubagentUsage, HOST_TASK_ORIGIN, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatCompactionItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatCompactionItem, ChatEventSchema, type ChatEvent, 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, 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, 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, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment, holdsConversation } 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, 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 { KNOWN_AGENT_KINDS, AGENT_KIND_MAX_LENGTH, AgentKindSchema, isKnownAgentKind, 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, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, WAITING_NOTE_PREFIX, ChatNoteItemSchema, 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, ChatAttachResultSchema, ChatDeliverySchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiQueryPayloadSchema, ChatUiLinkPayloadSchema, ChatQueuePayloadSchema, ChatUnqueueResultSchema, ChatApprovePayloadSchema, ChatDismissPayloadSchema, ChatAnswerPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, ChatForkResultSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment } 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, 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, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, 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, ChatAttachResultSchema, ChatDeliverySchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiQueryPayloadSchema, ChatUiLinkPayloadSchema, ChatQueuePayloadSchema, ChatUnqueueResultSchema, ChatApprovePayloadSchema, ChatDismissPayloadSchema, ChatAnswerPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, ChatForkResultSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment, holdsConversation } 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, ProviderListResultSchema, resumeCommandFor } from './model.js';
@@ -2547,6 +2547,348 @@ export declare const AGENT_REQUEST_SCHEMAS: {
2547
2547
  childId: z.ZodOptional<z.ZodString>;
2548
2548
  parentToolUseId: z.ZodOptional<z.ZodString>;
2549
2549
  }, z.core.$strip>>>;
2550
+ outline: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2551
+ id: z.ZodString;
2552
+ createdAt: z.ZodNumber;
2553
+ turnId: z.ZodNullable<z.ZodString>;
2554
+ kind: z.ZodLiteral<"user">;
2555
+ text: z.ZodString;
2556
+ mentions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2557
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
2558
+ chats: z.ZodOptional<z.ZodArray<z.ZodString>>;
2559
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
2560
+ id: z.ZodString;
2561
+ name: z.ZodString;
2562
+ mime: z.ZodString;
2563
+ size: z.ZodNumber;
2564
+ path: z.ZodString;
2565
+ width: z.ZodOptional<z.ZodNumber>;
2566
+ height: z.ZodOptional<z.ZodNumber>;
2567
+ }, z.core.$strip>>>;
2568
+ uiChoice: z.ZodOptional<z.ZodObject<{
2569
+ itemId: z.ZodString;
2570
+ blockId: z.ZodString;
2571
+ revision: z.ZodString;
2572
+ choiceId: z.ZodString;
2573
+ label: z.ZodString;
2574
+ sourceAt: z.ZodNumber;
2575
+ older: z.ZodBoolean;
2576
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2577
+ at: z.ZodNumber;
2578
+ }, z.core.$strip>>;
2579
+ quoteSource: z.ZodOptional<z.ZodObject<{
2580
+ itemId: z.ZodString;
2581
+ }, z.core.$strip>>;
2582
+ references: z.ZodOptional<z.ZodArray<z.ZodString>>;
2583
+ }, z.core.$strip>, z.ZodObject<{
2584
+ id: z.ZodString;
2585
+ createdAt: z.ZodNumber;
2586
+ turnId: z.ZodNullable<z.ZodString>;
2587
+ kind: z.ZodLiteral<"assistant">;
2588
+ ui: z.ZodOptional<z.ZodArray<z.ZodType<import("@adecore/intelligent-ui/compiler").UiBlock, unknown, z.core.$ZodTypeInternals<import("@adecore/intelligent-ui/compiler").UiBlock, unknown>>>>;
2589
+ uiAnswers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2590
+ itemId: z.ZodString;
2591
+ blockId: z.ZodString;
2592
+ revision: z.ZodString;
2593
+ choiceId: z.ZodString;
2594
+ label: z.ZodString;
2595
+ sourceAt: z.ZodNumber;
2596
+ older: z.ZodBoolean;
2597
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2598
+ at: z.ZodNumber;
2599
+ queued: z.ZodBoolean;
2600
+ turnId: z.ZodString;
2601
+ }, z.core.$strip>>>;
2602
+ uiQueries: z.ZodOptional<z.ZodObject<{
2603
+ authorChatId: z.ZodString;
2604
+ blocks: z.ZodRecord<z.ZodString, z.ZodObject<{
2605
+ revision: z.ZodString;
2606
+ readings: z.ZodRecord<z.ZodString, z.ZodObject<{
2607
+ state: z.ZodEnum<{
2608
+ failed: "failed";
2609
+ fresh: "fresh";
2610
+ refused: "refused";
2611
+ }>;
2612
+ value: z.ZodOptional<z.ZodUnknown>;
2613
+ readId: z.ZodOptional<z.ZodString>;
2614
+ readAt: z.ZodNumber;
2615
+ code: z.ZodOptional<z.ZodString>;
2616
+ reason: z.ZodOptional<z.ZodString>;
2617
+ }, z.core.$strip>>;
2618
+ fallback: z.ZodString;
2619
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2620
+ state: z.ZodEnum<{
2621
+ chip: "chip";
2622
+ plain: "plain";
2623
+ }>;
2624
+ target: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2625
+ type: z.ZodLiteral<"File">;
2626
+ path: z.ZodString;
2627
+ line: z.ZodOptional<z.ZodNumber>;
2628
+ }, z.core.$strict>, z.ZodObject<{
2629
+ type: z.ZodLiteral<"Diff">;
2630
+ path: z.ZodString;
2631
+ }, z.core.$strict>, z.ZodObject<{
2632
+ type: z.ZodLiteral<"Commit">;
2633
+ sha: z.ZodString;
2634
+ }, z.core.$strict>, z.ZodObject<{
2635
+ type: z.ZodLiteral<"Node">;
2636
+ id: z.ZodString;
2637
+ }, z.core.$strict>], "type">>;
2638
+ cwd: z.ZodOptional<z.ZodString>;
2639
+ viewId: z.ZodOptional<z.ZodString>;
2640
+ projectId: z.ZodOptional<z.ZodString>;
2641
+ staged: z.ZodOptional<z.ZodBoolean>;
2642
+ conflicted: z.ZodOptional<z.ZodBoolean>;
2643
+ relativePath: z.ZodOptional<z.ZodString>;
2644
+ label: z.ZodOptional<z.ZodString>;
2645
+ code: z.ZodOptional<z.ZodString>;
2646
+ reason: z.ZodOptional<z.ZodString>;
2647
+ }, z.core.$strip>>>;
2648
+ places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2649
+ state: z.ZodEnum<{
2650
+ found: "found";
2651
+ missing: "missing";
2652
+ }>;
2653
+ address: z.ZodString;
2654
+ lat: z.ZodOptional<z.ZodNumber>;
2655
+ lon: z.ZodOptional<z.ZodNumber>;
2656
+ label: z.ZodOptional<z.ZodString>;
2657
+ code: z.ZodOptional<z.ZodString>;
2658
+ reason: z.ZodOptional<z.ZodString>;
2659
+ }, z.core.$strip>>>;
2660
+ }, z.core.$strip>>;
2661
+ }, z.core.$strip>>;
2662
+ phase: z.ZodOptional<z.ZodString>;
2663
+ text: z.ZodString;
2664
+ streaming: z.ZodBoolean;
2665
+ parentToolUseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2666
+ }, z.core.$strip>, z.ZodObject<{
2667
+ id: z.ZodString;
2668
+ createdAt: z.ZodNumber;
2669
+ turnId: z.ZodNullable<z.ZodString>;
2670
+ kind: z.ZodLiteral<"thinking">;
2671
+ text: z.ZodString;
2672
+ streaming: z.ZodBoolean;
2673
+ endedAt: z.ZodNullable<z.ZodNumber>;
2674
+ }, z.core.$strip>, z.ZodObject<{
2675
+ id: z.ZodString;
2676
+ createdAt: z.ZodNumber;
2677
+ turnId: z.ZodNullable<z.ZodString>;
2678
+ kind: z.ZodLiteral<"tool">;
2679
+ toolUseId: z.ZodString;
2680
+ name: z.ZodString;
2681
+ input: z.ZodUnknown;
2682
+ output: z.ZodNullable<z.ZodString>;
2683
+ state: z.ZodEnum<{
2684
+ done: "done";
2685
+ error: "error";
2686
+ running: "running";
2687
+ }>;
2688
+ parentToolUseId: z.ZodNullable<z.ZodString>;
2689
+ progress: z.ZodOptional<z.ZodObject<{
2690
+ startedAt: z.ZodNullable<z.ZodNumber>;
2691
+ description: z.ZodNullable<z.ZodString>;
2692
+ output: z.ZodNullable<z.ZodString>;
2693
+ }, z.core.$strip>>;
2694
+ changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2695
+ path: z.ZodString;
2696
+ kind: z.ZodEnum<{
2697
+ add: "add";
2698
+ delete: "delete";
2699
+ update: "update";
2700
+ }>;
2701
+ diff: z.ZodString;
2702
+ }, z.core.$strip>>>;
2703
+ workflow: z.ZodOptional<z.ZodObject<{
2704
+ name: z.ZodNullable<z.ZodString>;
2705
+ taskId: z.ZodOptional<z.ZodString>;
2706
+ phases: z.ZodArray<z.ZodObject<{
2707
+ index: z.ZodNumber;
2708
+ title: z.ZodString;
2709
+ }, z.core.$strip>>;
2710
+ agents: z.ZodArray<z.ZodObject<{
2711
+ index: z.ZodNumber;
2712
+ label: z.ZodString;
2713
+ phaseIndex: z.ZodNullable<z.ZodNumber>;
2714
+ agentId: z.ZodNullable<z.ZodString>;
2715
+ status: z.ZodEnum<{
2716
+ done: "done";
2717
+ failed: "failed";
2718
+ running: "running";
2719
+ }>;
2720
+ startedAt: z.ZodNullable<z.ZodNumber>;
2721
+ durationMs: z.ZodNullable<z.ZodNumber>;
2722
+ lastTool: z.ZodNullable<z.ZodString>;
2723
+ lastToolSummary: z.ZodOptional<z.ZodString>;
2724
+ promptPreview: z.ZodOptional<z.ZodString>;
2725
+ resultPreview: z.ZodOptional<z.ZodString>;
2726
+ error: z.ZodOptional<z.ZodString>;
2727
+ }, z.core.$strip>>;
2728
+ lastProgressAt: z.ZodOptional<z.ZodNumber>;
2729
+ stalledAt: z.ZodOptional<z.ZodNumber>;
2730
+ }, z.core.$strip>>;
2731
+ }, z.core.$strip>, z.ZodObject<{
2732
+ id: z.ZodString;
2733
+ createdAt: z.ZodNumber;
2734
+ turnId: z.ZodNullable<z.ZodString>;
2735
+ kind: z.ZodLiteral<"subagent">;
2736
+ toolUseId: z.ZodString;
2737
+ description: z.ZodString;
2738
+ subagentType: z.ZodNullable<z.ZodString>;
2739
+ model: z.ZodOptional<z.ZodString>;
2740
+ prompt: z.ZodNullable<z.ZodString>;
2741
+ background: z.ZodBoolean;
2742
+ status: z.ZodEnum<{
2743
+ done: "done";
2744
+ failed: "failed";
2745
+ running: "running";
2746
+ }>;
2747
+ startedAt: z.ZodNumber;
2748
+ finishedAt: z.ZodNullable<z.ZodNumber>;
2749
+ summary: z.ZodNullable<z.ZodString>;
2750
+ result: z.ZodNullable<z.ZodString>;
2751
+ usage: z.ZodNullable<z.ZodObject<{
2752
+ totalTokens: z.ZodNumber;
2753
+ toolUses: z.ZodNumber;
2754
+ durationMs: z.ZodNumber;
2755
+ }, z.core.$strip>>;
2756
+ lastTool: z.ZodNullable<z.ZodString>;
2757
+ outputFile: z.ZodOptional<z.ZodString>;
2758
+ itemsTruncated: z.ZodBoolean;
2759
+ native: z.ZodOptional<z.ZodObject<{
2760
+ agentId: z.ZodOptional<z.ZodString>;
2761
+ threadId: z.ZodOptional<z.ZodString>;
2762
+ }, z.core.$strip>>;
2763
+ origin: z.ZodOptional<z.ZodEnum<{
2764
+ native: "native";
2765
+ ruimte: "ruimte";
2766
+ }>>;
2767
+ childId: z.ZodOptional<z.ZodString>;
2768
+ parentToolUseId: z.ZodOptional<z.ZodString>;
2769
+ }, z.core.$strip>, z.ZodObject<{
2770
+ id: z.ZodString;
2771
+ createdAt: z.ZodNumber;
2772
+ turnId: z.ZodNullable<z.ZodString>;
2773
+ kind: z.ZodLiteral<"approval">;
2774
+ requestId: z.ZodString;
2775
+ toolUseId: z.ZodNullable<z.ZodString>;
2776
+ toolName: z.ZodString;
2777
+ input: z.ZodUnknown;
2778
+ description: z.ZodNullable<z.ZodString>;
2779
+ canAllowAlways: z.ZodBoolean;
2780
+ allowAlways: z.ZodOptional<z.ZodObject<{
2781
+ label: z.ZodString;
2782
+ description: z.ZodString;
2783
+ }, z.core.$strip>>;
2784
+ decision: z.ZodEnum<{
2785
+ allow: "allow";
2786
+ "allow-always": "allow-always";
2787
+ cancelled: "cancelled";
2788
+ deny: "deny";
2789
+ pending: "pending";
2790
+ }>;
2791
+ }, z.core.$strip>, z.ZodObject<{
2792
+ id: z.ZodString;
2793
+ createdAt: z.ZodNumber;
2794
+ turnId: z.ZodNullable<z.ZodString>;
2795
+ kind: z.ZodLiteral<"question">;
2796
+ requestId: z.ZodString;
2797
+ questions: z.ZodArray<z.ZodObject<{
2798
+ id: z.ZodString;
2799
+ header: z.ZodString;
2800
+ question: z.ZodString;
2801
+ choices: z.ZodArray<z.ZodObject<{
2802
+ label: z.ZodString;
2803
+ description: z.ZodString;
2804
+ }, z.core.$strip>>;
2805
+ multiSelect: z.ZodBoolean;
2806
+ }, z.core.$strip>>;
2807
+ async: z.ZodOptional<z.ZodBoolean>;
2808
+ answers: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
2809
+ state: z.ZodEnum<{
2810
+ answered: "answered";
2811
+ cancelled: "cancelled";
2812
+ dismissed: "dismissed";
2813
+ pending: "pending";
2814
+ }>;
2815
+ }, z.core.$strip>, z.ZodObject<{
2816
+ id: z.ZodString;
2817
+ createdAt: z.ZodNumber;
2818
+ turnId: z.ZodNullable<z.ZodString>;
2819
+ kind: z.ZodLiteral<"turn">;
2820
+ state: z.ZodEnum<{
2821
+ aborted: "aborted";
2822
+ done: "done";
2823
+ error: "error";
2824
+ running: "running";
2825
+ }>;
2826
+ origin: z.ZodOptional<z.ZodEnum<{
2827
+ agent: "agent";
2828
+ user: "user";
2829
+ }>>;
2830
+ label: z.ZodOptional<z.ZodString>;
2831
+ taskToolUseId: z.ZodOptional<z.ZodString>;
2832
+ endedAt: z.ZodNullable<z.ZodNumber>;
2833
+ costUsd: z.ZodNumber;
2834
+ checkpoint: z.ZodOptional<z.ZodString>;
2835
+ checkpointHead: z.ZodOptional<z.ZodString>;
2836
+ checkpointHeadAfter: z.ZodOptional<z.ZodString>;
2837
+ checkpointDiff: z.ZodOptional<z.ZodObject<{
2838
+ files: z.ZodArray<z.ZodObject<{
2839
+ path: z.ZodString;
2840
+ kind: z.ZodEnum<{
2841
+ add: "add";
2842
+ delete: "delete";
2843
+ update: "update";
2844
+ }>;
2845
+ added: z.ZodNumber;
2846
+ deleted: z.ZodNumber;
2847
+ diff: z.ZodString;
2848
+ omitted: z.ZodOptional<z.ZodEnum<{
2849
+ binary: "binary";
2850
+ "too-large": "too-large";
2851
+ }>>;
2852
+ }, z.core.$strip>>;
2853
+ truncated: z.ZodBoolean;
2854
+ }, z.core.$strip>>;
2855
+ attempt: z.ZodOptional<z.ZodNumber>;
2856
+ resumePending: z.ZodOptional<z.ZodBoolean>;
2857
+ deliveryPending: z.ZodOptional<z.ZodBoolean>;
2858
+ taskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2859
+ messageFrom: z.ZodOptional<z.ZodArray<z.ZodString>>;
2860
+ native: z.ZodOptional<z.ZodObject<{
2861
+ turnId: z.ZodOptional<z.ZodString>;
2862
+ lastUuid: z.ZodOptional<z.ZodString>;
2863
+ }, z.core.$strip>>;
2864
+ checkpointAfter: z.ZodOptional<z.ZodString>;
2865
+ summaryFor: z.ZodOptional<z.ZodString>;
2866
+ limit: z.ZodOptional<z.ZodObject<{
2867
+ kind: z.ZodEnum<{
2868
+ overload: "overload";
2869
+ usage: "usage";
2870
+ }>;
2871
+ resetsAt: z.ZodOptional<z.ZodNumber>;
2872
+ }, z.core.$strip>>;
2873
+ }, z.core.$strip>, z.ZodObject<{
2874
+ id: z.ZodString;
2875
+ createdAt: z.ZodNumber;
2876
+ turnId: z.ZodNullable<z.ZodString>;
2877
+ kind: z.ZodLiteral<"note">;
2878
+ level: z.ZodEnum<{
2879
+ error: "error";
2880
+ info: "info";
2881
+ warning: "warning";
2882
+ }>;
2883
+ text: z.ZodString;
2884
+ from: z.ZodOptional<z.ZodString>;
2885
+ }, z.core.$strip>, z.ZodObject<{
2886
+ id: z.ZodString;
2887
+ createdAt: z.ZodNumber;
2888
+ turnId: z.ZodNullable<z.ZodString>;
2889
+ kind: z.ZodLiteral<"compaction">;
2890
+ preTokens: z.ZodNullable<z.ZodNumber>;
2891
+ }, z.core.$strip>], "kind">>>;
2550
2892
  }, z.core.$strip>;
2551
2893
  };
2552
2894
  readonly 'chat.detach': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agent-contracts",
3
- "version": "0.40.2",
3
+ "version": "0.40.4",
4
4
  "description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -86,7 +86,7 @@
86
86
  "test": "bun --conditions=source test"
87
87
  },
88
88
  "dependencies": {
89
- "@adecore/intelligent-ui": "0.40.2",
89
+ "@adecore/intelligent-ui": "0.40.4",
90
90
  "zod": "^4.6.7"
91
91
  },
92
92
  "devDependencies": {
package/src/chat.ts CHANGED
@@ -312,6 +312,15 @@ export const ChatInfoSchema = z.object({
312
312
  });
313
313
  export type ChatInfo = z.infer<typeof ChatInfoSchema>;
314
314
 
315
+ /*
316
+ * Whether the CLI holds a conversation for the chat, which ties it to the CLI and to accounts that read its
317
+ * transcripts. The CLI names its session during the first turn, so a turn in flight counts too. Past turns do
318
+ * not: a cleared chat keeps its tally, but the next send starts a conversation of its own.
319
+ */
320
+ export function holdsConversation(info: Pick<ChatInfo, 'agentSessionId' | 'activeTurnId'>): boolean {
321
+ return info.agentSessionId !== null || info.activeTurnId !== null;
322
+ }
323
+
315
324
  // Where a skill was found: the person's own folder, the chat's folder, or a plugin.
316
325
  export const ChatSkillSourceSchema = z.enum(['user', 'project', 'plugin']);
317
326
  export type ChatSkillSource = z.infer<typeof ChatSkillSourceSchema>;
@@ -750,6 +759,38 @@ export function activeSubagents(items: readonly ChatItem[]): ChatSubagentItem[]
750
759
  .map(({ item }) => item);
751
760
  }
752
761
 
762
+ /* How much of a message the outline keeps: what a hover card over its tick shows. */
763
+ export const CHAT_OUTLINE_TEXT_CHARS = 280;
764
+
765
+ /*
766
+ * The places a scrubber over the thread returns to, cut down to what its ticks need: every message of
767
+ * the person, every turn tasks or messages woke, and the replies in `marked`, which a bookmark is on.
768
+ * A message of only attachments keeps their names. `items` is in thread order.
769
+ */
770
+ export function outlineItems(items: readonly ChatItem[], marked: ReadonlySet<string> = new Set()): ChatItem[] {
771
+ return items.flatMap((item): ChatItem[] => {
772
+ const { id, createdAt, turnId } = item;
773
+
774
+ if (item.kind === 'user') {
775
+ const text = item.text.slice(0, CHAT_OUTLINE_TEXT_CHARS);
776
+
777
+ return [{ id, createdAt, turnId, kind: 'user', text, ...(text === '' && item.attachments ? { attachments: item.attachments } : {}) }];
778
+ }
779
+
780
+ if (item.kind === 'turn' && ((item.taskIds?.length ?? 0) > 0 || (item.messageFrom?.length ?? 0) > 0)) {
781
+ const { checkpointDiff: _checkpointDiff, ...turn } = item;
782
+
783
+ return [turn];
784
+ }
785
+
786
+ if (item.kind === 'assistant' && marked.has(id)) {
787
+ return [{ id, createdAt, turnId, kind: 'assistant', text: item.text.slice(0, CHAT_OUTLINE_TEXT_CHARS), streaming: false }];
788
+ }
789
+
790
+ return [];
791
+ });
792
+ }
793
+
753
794
  // Events apply after the `chat.attach` snapshot; item ids make upserts and streamed deltas replayable.
754
795
  export const ChatEventSchema = z.discriminatedUnion('type', [
755
796
  z.object({ type: z.literal('item'), item: ChatItemSchema, historyIndex: z.number().int().nonnegative().optional() }),
@@ -975,7 +1016,9 @@ export const ChatAttachResultSchema = z.object({
975
1016
  // Absent from a host that keeps no visuals.
976
1017
  visuals: ChatVisualsSchema.optional(),
977
1018
  // With a page: the active sub-agents (`activeSubagents`) from before it, so the pill over the composer never waits on a scroll.
978
- subagents: z.array(ChatSubagentItemSchema).optional()
1019
+ subagents: z.array(ChatSubagentItemSchema).optional(),
1020
+ // With a page: the thread before it as `outlineItems` cuts it, so the scrubber reaches the whole thread before a scroll does.
1021
+ outline: z.array(ChatItemSchema).optional()
979
1022
  });
980
1023
  export type ChatAttachResult = z.infer<typeof ChatAttachResultSchema>;
981
1024
 
package/src/index.ts CHANGED
@@ -129,6 +129,8 @@ export {
129
129
  ENDED_NOTE_PREFIX,
130
130
  abortedByEnd,
131
131
  activeSubagents,
132
+ CHAT_OUTLINE_TEXT_CHARS,
133
+ outlineItems,
132
134
  WAITING_NOTE_PREFIX,
133
135
  ChatNoteItemSchema,
134
136
  ChatCompactionItemSchema,
@@ -253,7 +255,8 @@ export {
253
255
  type ChatListResult,
254
256
  GeneratedImageInputSchema,
255
257
  type GeneratedImageInput,
256
- generatedImageAttachment
258
+ generatedImageAttachment,
259
+ holdsConversation
257
260
  } from './chat.ts';
258
261
  export {
259
262
  ErrorSchema,