@adecore/agent-contracts 0.46.3 → 0.47.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 +71 -0
- package/dist/chat.js +5 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/protocol.d.ts +45 -0
- package/package.json +2 -2
- package/src/chat.ts +7 -1
- package/src/index.ts +2 -0
package/dist/chat.d.ts
CHANGED
|
@@ -1059,6 +1059,11 @@ export declare function abortedByEnd(turn: {
|
|
|
1059
1059
|
turnId: string | null;
|
|
1060
1060
|
}[]): boolean;
|
|
1061
1061
|
export declare const WAITING_NOTE_PREFIX = "waiting-";
|
|
1062
|
+
export declare const ChatNoteMessageSchema: z.ZodObject<{
|
|
1063
|
+
from: z.ZodString;
|
|
1064
|
+
title: z.ZodString;
|
|
1065
|
+
text: z.ZodString;
|
|
1066
|
+
}, z.core.$strip>;
|
|
1062
1067
|
export declare const ChatNoteItemSchema: z.ZodObject<{
|
|
1063
1068
|
id: z.ZodString;
|
|
1064
1069
|
createdAt: z.ZodNumber;
|
|
@@ -1071,6 +1076,11 @@ export declare const ChatNoteItemSchema: z.ZodObject<{
|
|
|
1071
1076
|
}>;
|
|
1072
1077
|
text: z.ZodString;
|
|
1073
1078
|
from: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
1080
|
+
from: z.ZodString;
|
|
1081
|
+
title: z.ZodString;
|
|
1082
|
+
text: z.ZodString;
|
|
1083
|
+
}, z.core.$strip>>;
|
|
1074
1084
|
}, z.core.$strip>;
|
|
1075
1085
|
export declare const ChatCompactionItemSchema: z.ZodObject<{
|
|
1076
1086
|
id: z.ZodString;
|
|
@@ -1423,6 +1433,11 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1423
1433
|
}>;
|
|
1424
1434
|
text: z.ZodString;
|
|
1425
1435
|
from: z.ZodOptional<z.ZodString>;
|
|
1436
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
1437
|
+
from: z.ZodString;
|
|
1438
|
+
title: z.ZodString;
|
|
1439
|
+
text: z.ZodString;
|
|
1440
|
+
}, z.core.$strip>>;
|
|
1426
1441
|
}, z.core.$strip>, z.ZodObject<{
|
|
1427
1442
|
id: z.ZodString;
|
|
1428
1443
|
createdAt: z.ZodNumber;
|
|
@@ -1440,6 +1455,7 @@ export type ChatApprovalItem = z.infer<typeof ChatApprovalItemSchema>;
|
|
|
1440
1455
|
export type ChatQuestionItem = z.infer<typeof ChatQuestionItemSchema>;
|
|
1441
1456
|
export type ChatTurnItem = z.infer<typeof ChatTurnItemSchema>;
|
|
1442
1457
|
export type ChatNoteItem = z.infer<typeof ChatNoteItemSchema>;
|
|
1458
|
+
export type ChatNoteMessage = z.infer<typeof ChatNoteMessageSchema>;
|
|
1443
1459
|
export type ChatCompactionItem = z.infer<typeof ChatCompactionItemSchema>;
|
|
1444
1460
|
export declare function activeSubagents(items: readonly ChatItem[]): ChatSubagentItem[];
|
|
1445
1461
|
export declare function workflowEndedAt(workflow: ChatWorkflow): number | null;
|
|
@@ -1792,6 +1808,11 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1792
1808
|
}>;
|
|
1793
1809
|
text: z.ZodString;
|
|
1794
1810
|
from: z.ZodOptional<z.ZodString>;
|
|
1811
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
1812
|
+
from: z.ZodString;
|
|
1813
|
+
title: z.ZodString;
|
|
1814
|
+
text: z.ZodString;
|
|
1815
|
+
}, z.core.$strip>>;
|
|
1795
1816
|
}, z.core.$strip>, z.ZodObject<{
|
|
1796
1817
|
id: z.ZodString;
|
|
1797
1818
|
createdAt: z.ZodNumber;
|
|
@@ -2544,6 +2565,11 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2544
2565
|
}>;
|
|
2545
2566
|
text: z.ZodString;
|
|
2546
2567
|
from: z.ZodOptional<z.ZodString>;
|
|
2568
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
2569
|
+
from: z.ZodString;
|
|
2570
|
+
title: z.ZodString;
|
|
2571
|
+
text: z.ZodString;
|
|
2572
|
+
}, z.core.$strip>>;
|
|
2547
2573
|
}, z.core.$strip>, z.ZodObject<{
|
|
2548
2574
|
id: z.ZodString;
|
|
2549
2575
|
createdAt: z.ZodNumber;
|
|
@@ -2901,6 +2927,11 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
2901
2927
|
}>;
|
|
2902
2928
|
text: z.ZodString;
|
|
2903
2929
|
from: z.ZodOptional<z.ZodString>;
|
|
2930
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
2931
|
+
from: z.ZodString;
|
|
2932
|
+
title: z.ZodString;
|
|
2933
|
+
text: z.ZodString;
|
|
2934
|
+
}, z.core.$strip>>;
|
|
2904
2935
|
}, z.core.$strip>, z.ZodObject<{
|
|
2905
2936
|
id: z.ZodString;
|
|
2906
2937
|
createdAt: z.ZodNumber;
|
|
@@ -3653,6 +3684,11 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3653
3684
|
}>;
|
|
3654
3685
|
text: z.ZodString;
|
|
3655
3686
|
from: z.ZodOptional<z.ZodString>;
|
|
3687
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
3688
|
+
from: z.ZodString;
|
|
3689
|
+
title: z.ZodString;
|
|
3690
|
+
text: z.ZodString;
|
|
3691
|
+
}, z.core.$strip>>;
|
|
3656
3692
|
}, z.core.$strip>, z.ZodObject<{
|
|
3657
3693
|
id: z.ZodString;
|
|
3658
3694
|
createdAt: z.ZodNumber;
|
|
@@ -4092,6 +4128,11 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
|
|
|
4092
4128
|
}>;
|
|
4093
4129
|
text: z.ZodString;
|
|
4094
4130
|
from: z.ZodOptional<z.ZodString>;
|
|
4131
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
4132
|
+
from: z.ZodString;
|
|
4133
|
+
title: z.ZodString;
|
|
4134
|
+
text: z.ZodString;
|
|
4135
|
+
}, z.core.$strip>>;
|
|
4095
4136
|
}, z.core.$strip>, z.ZodObject<{
|
|
4096
4137
|
id: z.ZodString;
|
|
4097
4138
|
createdAt: z.ZodNumber;
|
|
@@ -4492,6 +4533,11 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
|
|
|
4492
4533
|
}>;
|
|
4493
4534
|
text: z.ZodString;
|
|
4494
4535
|
from: z.ZodOptional<z.ZodString>;
|
|
4536
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
4537
|
+
from: z.ZodString;
|
|
4538
|
+
title: z.ZodString;
|
|
4539
|
+
text: z.ZodString;
|
|
4540
|
+
}, z.core.$strip>>;
|
|
4495
4541
|
}, z.core.$strip>, z.ZodObject<{
|
|
4496
4542
|
id: z.ZodString;
|
|
4497
4543
|
createdAt: z.ZodNumber;
|
|
@@ -5338,6 +5384,11 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5338
5384
|
}>;
|
|
5339
5385
|
text: z.ZodString;
|
|
5340
5386
|
from: z.ZodOptional<z.ZodString>;
|
|
5387
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
5388
|
+
from: z.ZodString;
|
|
5389
|
+
title: z.ZodString;
|
|
5390
|
+
text: z.ZodString;
|
|
5391
|
+
}, z.core.$strip>>;
|
|
5341
5392
|
}, z.core.$strip>, z.ZodObject<{
|
|
5342
5393
|
id: z.ZodString;
|
|
5343
5394
|
createdAt: z.ZodNumber;
|
|
@@ -5693,6 +5744,11 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5693
5744
|
}>;
|
|
5694
5745
|
text: z.ZodString;
|
|
5695
5746
|
from: z.ZodOptional<z.ZodString>;
|
|
5747
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
5748
|
+
from: z.ZodString;
|
|
5749
|
+
title: z.ZodString;
|
|
5750
|
+
text: z.ZodString;
|
|
5751
|
+
}, z.core.$strip>>;
|
|
5696
5752
|
}, z.core.$strip>, z.ZodObject<{
|
|
5697
5753
|
id: z.ZodString;
|
|
5698
5754
|
createdAt: z.ZodNumber;
|
|
@@ -6047,6 +6103,11 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6047
6103
|
}>;
|
|
6048
6104
|
text: z.ZodString;
|
|
6049
6105
|
from: z.ZodOptional<z.ZodString>;
|
|
6106
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
6107
|
+
from: z.ZodString;
|
|
6108
|
+
title: z.ZodString;
|
|
6109
|
+
text: z.ZodString;
|
|
6110
|
+
}, z.core.$strip>>;
|
|
6050
6111
|
}, z.core.$strip>, z.ZodObject<{
|
|
6051
6112
|
id: z.ZodString;
|
|
6052
6113
|
createdAt: z.ZodNumber;
|
|
@@ -6799,6 +6860,11 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6799
6860
|
}>;
|
|
6800
6861
|
text: z.ZodString;
|
|
6801
6862
|
from: z.ZodOptional<z.ZodString>;
|
|
6863
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
6864
|
+
from: z.ZodString;
|
|
6865
|
+
title: z.ZodString;
|
|
6866
|
+
text: z.ZodString;
|
|
6867
|
+
}, z.core.$strip>>;
|
|
6802
6868
|
}, z.core.$strip>, z.ZodObject<{
|
|
6803
6869
|
id: z.ZodString;
|
|
6804
6870
|
createdAt: z.ZodNumber;
|
|
@@ -7272,6 +7338,11 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
7272
7338
|
}>;
|
|
7273
7339
|
text: z.ZodString;
|
|
7274
7340
|
from: z.ZodOptional<z.ZodString>;
|
|
7341
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
7342
|
+
from: z.ZodString;
|
|
7343
|
+
title: z.ZodString;
|
|
7344
|
+
text: z.ZodString;
|
|
7345
|
+
}, z.core.$strip>>;
|
|
7275
7346
|
}, z.core.$strip>, z.ZodObject<{
|
|
7276
7347
|
id: z.ZodString;
|
|
7277
7348
|
createdAt: z.ZodNumber;
|
package/dist/chat.js
CHANGED
|
@@ -591,13 +591,17 @@ export function abortedByEnd(turn, items) {
|
|
|
591
591
|
}
|
|
592
592
|
/* The id prefix of the note a host leaves in a parent about a child that waits on a request. */
|
|
593
593
|
export const WAITING_NOTE_PREFIX = 'waiting-';
|
|
594
|
+
/* A message another node sent a chat: its id, the name it had on the canvas then, and what it said. */
|
|
595
|
+
export const ChatNoteMessageSchema = z.object({ from: z.string().min(1), title: z.string(), text: z.string() });
|
|
594
596
|
export const ChatNoteItemSchema = z.object({
|
|
595
597
|
...base,
|
|
596
598
|
kind: z.literal('note'),
|
|
597
599
|
level: z.enum(['info', 'warning', 'error']),
|
|
598
600
|
text: z.string(),
|
|
599
601
|
// The chat a delivered summary came from, so a client can offer to open it.
|
|
600
|
-
from: ChatIdSchema.optional()
|
|
602
|
+
from: ChatIdSchema.optional(),
|
|
603
|
+
// A message another node sent, which a client draws as said to this chat; `text` holds it as a line for one that does not know this.
|
|
604
|
+
message: ChatNoteMessageSchema.optional()
|
|
601
605
|
});
|
|
602
606
|
export const ChatCompactionItemSchema = z.object({
|
|
603
607
|
...base,
|
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, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, type ChatPayloadRef, 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, activeWorkflows, workflowEndedAt, 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, 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, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment, holdsConversation } 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, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, type ChatPayloadRef, 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, 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, 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, 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, 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, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, 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, 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, ChatToolOutputPayloadSchema, ChatToolOutputResultSchema, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, ChatForkResultSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment, holdsConversation } 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, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, 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, 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, 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';
|
package/dist/protocol.d.ts
CHANGED
|
@@ -536,6 +536,11 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
536
536
|
}>;
|
|
537
537
|
text: z.ZodString;
|
|
538
538
|
from: z.ZodOptional<z.ZodString>;
|
|
539
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
540
|
+
from: z.ZodString;
|
|
541
|
+
title: z.ZodString;
|
|
542
|
+
text: z.ZodString;
|
|
543
|
+
}, z.core.$strip>>;
|
|
539
544
|
}, z.core.$strip>, z.ZodObject<{
|
|
540
545
|
id: z.ZodString;
|
|
541
546
|
createdAt: z.ZodNumber;
|
|
@@ -1065,6 +1070,11 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1065
1070
|
}>;
|
|
1066
1071
|
text: z.ZodString;
|
|
1067
1072
|
from: z.ZodOptional<z.ZodString>;
|
|
1073
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
1074
|
+
from: z.ZodString;
|
|
1075
|
+
title: z.ZodString;
|
|
1076
|
+
text: z.ZodString;
|
|
1077
|
+
}, z.core.$strip>>;
|
|
1068
1078
|
}, z.core.$strip>, z.ZodObject<{
|
|
1069
1079
|
id: z.ZodString;
|
|
1070
1080
|
createdAt: z.ZodNumber;
|
|
@@ -1420,6 +1430,11 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1420
1430
|
}>;
|
|
1421
1431
|
text: z.ZodString;
|
|
1422
1432
|
from: z.ZodOptional<z.ZodString>;
|
|
1433
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
1434
|
+
from: z.ZodString;
|
|
1435
|
+
title: z.ZodString;
|
|
1436
|
+
text: z.ZodString;
|
|
1437
|
+
}, z.core.$strip>>;
|
|
1423
1438
|
}, z.core.$strip>, z.ZodObject<{
|
|
1424
1439
|
id: z.ZodString;
|
|
1425
1440
|
createdAt: z.ZodNumber;
|
|
@@ -1774,6 +1789,11 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1774
1789
|
}>;
|
|
1775
1790
|
text: z.ZodString;
|
|
1776
1791
|
from: z.ZodOptional<z.ZodString>;
|
|
1792
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
1793
|
+
from: z.ZodString;
|
|
1794
|
+
title: z.ZodString;
|
|
1795
|
+
text: z.ZodString;
|
|
1796
|
+
}, z.core.$strip>>;
|
|
1777
1797
|
}, z.core.$strip>, z.ZodObject<{
|
|
1778
1798
|
id: z.ZodString;
|
|
1779
1799
|
createdAt: z.ZodNumber;
|
|
@@ -2526,6 +2546,11 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2526
2546
|
}>;
|
|
2527
2547
|
text: z.ZodString;
|
|
2528
2548
|
from: z.ZodOptional<z.ZodString>;
|
|
2549
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
2550
|
+
from: z.ZodString;
|
|
2551
|
+
title: z.ZodString;
|
|
2552
|
+
text: z.ZodString;
|
|
2553
|
+
}, z.core.$strip>>;
|
|
2529
2554
|
}, z.core.$strip>, z.ZodObject<{
|
|
2530
2555
|
id: z.ZodString;
|
|
2531
2556
|
createdAt: z.ZodNumber;
|
|
@@ -2999,6 +3024,11 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2999
3024
|
}>;
|
|
3000
3025
|
text: z.ZodString;
|
|
3001
3026
|
from: z.ZodOptional<z.ZodString>;
|
|
3027
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
3028
|
+
from: z.ZodString;
|
|
3029
|
+
title: z.ZodString;
|
|
3030
|
+
text: z.ZodString;
|
|
3031
|
+
}, z.core.$strip>>;
|
|
3002
3032
|
}, z.core.$strip>, z.ZodObject<{
|
|
3003
3033
|
id: z.ZodString;
|
|
3004
3034
|
createdAt: z.ZodNumber;
|
|
@@ -4234,6 +4264,11 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4234
4264
|
}>;
|
|
4235
4265
|
text: z.ZodString;
|
|
4236
4266
|
from: z.ZodOptional<z.ZodString>;
|
|
4267
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
4268
|
+
from: z.ZodString;
|
|
4269
|
+
title: z.ZodString;
|
|
4270
|
+
text: z.ZodString;
|
|
4271
|
+
}, z.core.$strip>>;
|
|
4237
4272
|
}, z.core.$strip>, z.ZodObject<{
|
|
4238
4273
|
id: z.ZodString;
|
|
4239
4274
|
createdAt: z.ZodNumber;
|
|
@@ -5495,6 +5530,11 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5495
5530
|
}>;
|
|
5496
5531
|
text: z.ZodString;
|
|
5497
5532
|
from: z.ZodOptional<z.ZodString>;
|
|
5533
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
5534
|
+
from: z.ZodString;
|
|
5535
|
+
title: z.ZodString;
|
|
5536
|
+
text: z.ZodString;
|
|
5537
|
+
}, z.core.$strip>>;
|
|
5498
5538
|
}, z.core.$strip>, z.ZodObject<{
|
|
5499
5539
|
id: z.ZodString;
|
|
5500
5540
|
createdAt: z.ZodNumber;
|
|
@@ -6247,6 +6287,11 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6247
6287
|
}>;
|
|
6248
6288
|
text: z.ZodString;
|
|
6249
6289
|
from: z.ZodOptional<z.ZodString>;
|
|
6290
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
6291
|
+
from: z.ZodString;
|
|
6292
|
+
title: z.ZodString;
|
|
6293
|
+
text: z.ZodString;
|
|
6294
|
+
}, z.core.$strip>>;
|
|
6250
6295
|
}, z.core.$strip>, z.ZodObject<{
|
|
6251
6296
|
id: z.ZodString;
|
|
6252
6297
|
createdAt: z.ZodNumber;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agent-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
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.
|
|
89
|
+
"@adecore/intelligent-ui": "0.47.0",
|
|
90
90
|
"zod": "^4.6.7"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
package/src/chat.ts
CHANGED
|
@@ -710,13 +710,18 @@ export function abortedByEnd(turn: { id: string; state: string }, items: readonl
|
|
|
710
710
|
/* The id prefix of the note a host leaves in a parent about a child that waits on a request. */
|
|
711
711
|
export const WAITING_NOTE_PREFIX = 'waiting-';
|
|
712
712
|
|
|
713
|
+
/* A message another node sent a chat: its id, the name it had on the canvas then, and what it said. */
|
|
714
|
+
export const ChatNoteMessageSchema = z.object({ from: z.string().min(1), title: z.string(), text: z.string() });
|
|
715
|
+
|
|
713
716
|
export const ChatNoteItemSchema = z.object({
|
|
714
717
|
...base,
|
|
715
718
|
kind: z.literal('note'),
|
|
716
719
|
level: z.enum(['info', 'warning', 'error']),
|
|
717
720
|
text: z.string(),
|
|
718
721
|
// The chat a delivered summary came from, so a client can offer to open it.
|
|
719
|
-
from: ChatIdSchema.optional()
|
|
722
|
+
from: ChatIdSchema.optional(),
|
|
723
|
+
// A message another node sent, which a client draws as said to this chat; `text` holds it as a line for one that does not know this.
|
|
724
|
+
message: ChatNoteMessageSchema.optional()
|
|
720
725
|
});
|
|
721
726
|
|
|
722
727
|
export const ChatCompactionItemSchema = z.object({
|
|
@@ -752,6 +757,7 @@ export type ChatApprovalItem = z.infer<typeof ChatApprovalItemSchema>;
|
|
|
752
757
|
export type ChatQuestionItem = z.infer<typeof ChatQuestionItemSchema>;
|
|
753
758
|
export type ChatTurnItem = z.infer<typeof ChatTurnItemSchema>;
|
|
754
759
|
export type ChatNoteItem = z.infer<typeof ChatNoteItemSchema>;
|
|
760
|
+
export type ChatNoteMessage = z.infer<typeof ChatNoteMessageSchema>;
|
|
755
761
|
export type ChatCompactionItem = z.infer<typeof ChatCompactionItemSchema>;
|
|
756
762
|
|
|
757
763
|
/*
|
package/src/index.ts
CHANGED
|
@@ -138,6 +138,7 @@ export {
|
|
|
138
138
|
outlineItems,
|
|
139
139
|
WAITING_NOTE_PREFIX,
|
|
140
140
|
ChatNoteItemSchema,
|
|
141
|
+
ChatNoteMessageSchema,
|
|
141
142
|
ChatCompactionItemSchema,
|
|
142
143
|
ChatItemSchema,
|
|
143
144
|
type ChatItem,
|
|
@@ -150,6 +151,7 @@ export {
|
|
|
150
151
|
type ChatQuestionItem,
|
|
151
152
|
type ChatTurnItem,
|
|
152
153
|
type ChatNoteItem,
|
|
154
|
+
type ChatNoteMessage,
|
|
153
155
|
type ChatCompactionItem,
|
|
154
156
|
ChatEventSchema,
|
|
155
157
|
type ChatEvent,
|