@ai-matrx/chat 0.4.0 → 0.4.7

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.
Files changed (226) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/agent-copy/RichCopySplit.d.ts +17 -0
  3. package/dist/agent-copy/RichCopySplit.js +34 -0
  4. package/dist/agents/addressing/useAgentHref.js +4 -1
  5. package/dist/agents/api/submit-tool-results.js +11 -1
  6. package/dist/agents/components/agent-widgets/chat-assistant/AssistantMessageCard.js +1 -1
  7. package/dist/agents/components/chat/ConversationRecordsChip.js +1 -1
  8. package/dist/agents/components/chat/useCanvasScopedToConversation.js +1 -1
  9. package/dist/agents/components/context-items/bodies/WorkingDocumentBody.d.ts +5 -2
  10. package/dist/agents/components/context-items/bodies/WorkingDocumentBody.js +6 -1
  11. package/dist/agents/components/context-policies-display/ContextValueBody.js +1 -1
  12. package/dist/agents/components/context-preview/ContextCompareView.js +1 -1
  13. package/dist/agents/components/custom-agent/CustomAgentWindow.js +1 -1
  14. package/dist/agents/components/inputs/smart-input/AgentTextarea.d.ts +6 -1
  15. package/dist/agents/components/inputs/smart-input/AgentTextarea.js +2 -2
  16. package/dist/agents/components/inputs/smart-input/ComposerToolsNotice.d.ts +1 -0
  17. package/dist/agents/components/inputs/smart-input/ComposerToolsNotice.js +5 -0
  18. package/dist/agents/components/inputs/smart-input/ConversationContextRail.d.ts +5 -1
  19. package/dist/agents/components/inputs/smart-input/ConversationContextRail.js +6 -1
  20. package/dist/agents/components/inputs/smart-input/InboxQueueStrip.d.ts +6 -1
  21. package/dist/agents/components/inputs/smart-input/InboxQueueStrip.js +6 -1
  22. package/dist/agents/components/inputs/smart-input/InputActionButtons.js +8 -6
  23. package/dist/agents/components/inputs/smart-input/SmartInputFileDropTarget.d.ts +5 -1
  24. package/dist/agents/components/inputs/smart-input/SmartInputFileDropTarget.js +8 -1
  25. package/dist/agents/components/inputs/smart-input/composer/ComposerAgentPill.js +2 -2
  26. package/dist/agents/components/inputs/smart-input/composer/ComposerChipsRow.d.ts +5 -2
  27. package/dist/agents/components/inputs/smart-input/composer/ComposerChipsRow.js +6 -1
  28. package/dist/agents/components/inputs/smart-input/composer/ComposerMetaRow.d.ts +6 -8
  29. package/dist/agents/components/inputs/smart-input/composer/ComposerMetaRow.js +13 -1
  30. package/dist/agents/components/inputs/smart-input/composer/useOutputShapeCatalog.d.ts +1 -1
  31. package/dist/agents/components/inputs/smart-input/composer/useOutputShapeCatalog.js +1 -1
  32. package/dist/agents/components/live-run/LiveRunDisplay.js +1 -1
  33. package/dist/agents/components/live-run/RunSetDisplay.js +1 -1
  34. package/dist/agents/components/memory/components/AgentMemoryAllView.js +1 -1
  35. package/dist/agents/components/messages-display/AgentConversationDisplay.js +4 -1
  36. package/dist/agents/components/messages-display/assistant/AgentAssistantMessage.d.ts +1 -0
  37. package/dist/agents/components/messages-display/assistant/AgentAssistantMessage.js +4 -3
  38. package/dist/agents/components/messages-display/assistant/AgentEmptyMessageDisplay.js +1 -1
  39. package/dist/agents/components/messages-display/assistant/AssistantMessageFooter.d.ts +2 -2
  40. package/dist/agents/components/messages-display/assistant/AssistantMessageFooter.js +4 -7
  41. package/dist/agents/components/messages-display/assistant/InPlaceAnswerEditor.js +2 -2
  42. package/dist/agents/components/messages-display/citations/MessageSourcesRow.js +1 -1
  43. package/dist/agents/components/messages-display/rich-document/chat-message-source.d.ts +2 -0
  44. package/dist/agents/components/messages-display/rich-document/chat-message-source.js +41 -0
  45. package/dist/agents/components/messages-display/rich-document/chatMessageActions.d.ts +31 -0
  46. package/dist/agents/components/messages-display/rich-document/chatMessageActions.js +39 -0
  47. package/dist/agents/components/messages-display/user/AgentUserMessage.d.ts +1 -0
  48. package/dist/agents/components/messages-display/user/AgentUserMessage.js +7 -4
  49. package/dist/agents/components/messages-display/user/CollabNoteMessage.js +1 -1
  50. package/dist/agents/components/messages-display/user/UserActionBar.js +49 -39
  51. package/dist/agents/components/run-controls/panels/shared.d.ts +1 -0
  52. package/dist/agents/components/shared/AgentConversationColumn.js +3 -2
  53. package/dist/agents/components/working-document/WorkingDocumentEditor.d.ts +1 -1
  54. package/dist/agents/components/working-document/WorkingDocumentPanel.js +2 -1
  55. package/dist/agents/components/working-document/workingDocumentSurface.d.ts +1 -1
  56. package/dist/agents/identity/model-catalog.js +5 -3
  57. package/dist/agents/identity/run-tier-store.js +3 -0
  58. package/dist/agents/redux/agent-definition/cache-bust-middleware.js +2 -0
  59. package/dist/agents/redux/agent-definition/selectors.d.ts +237 -0
  60. package/dist/agents/redux/agent-settings/agentSettingsSlice.d.ts +0 -4
  61. package/dist/agents/redux/agent-settings/agentSettingsSlice.js +12 -5
  62. package/dist/agents/redux/agent-settings/selectors.d.ts +12 -0
  63. package/dist/agents/redux/agent-shortcut-categories/selectors.d.ts +50 -0
  64. package/dist/agents/redux/agent-shortcuts/selectors.d.ts +147 -0
  65. package/dist/agents/redux/conversation-history/selectors.d.ts +16 -0
  66. package/dist/agents/redux/conversation-list/conversation-list.selectors.d.ts +2 -0
  67. package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.d.ts +54 -0
  68. package/dist/agents/redux/execution-system/context-state/context-state.selectors.d.ts +14 -0
  69. package/dist/agents/redux/execution-system/conversations/conversations.selectors.d.ts +5 -0
  70. package/dist/agents/redux/execution-system/host-conversations/conversation-abilities.d.ts +12 -0
  71. package/dist/agents/redux/execution-system/host-conversations/conversation-abilities.js +25 -0
  72. package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.d.ts +53 -0
  73. package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.js +412 -0
  74. package/dist/agents/redux/execution-system/host-conversations/host-conversations.selectors.d.ts +28 -0
  75. package/dist/agents/redux/execution-system/host-conversations/host-conversations.selectors.js +41 -0
  76. package/dist/agents/redux/execution-system/host-conversations/host-conversations.slice.d.ts +43 -0
  77. package/dist/agents/redux/execution-system/host-conversations/host-conversations.slice.js +38 -0
  78. package/dist/agents/redux/execution-system/host-conversations/source-registry.d.ts +9 -0
  79. package/dist/agents/redux/execution-system/host-conversations/source-registry.js +15 -0
  80. package/dist/agents/redux/execution-system/host-conversations/useHostConversation.d.ts +4 -0
  81. package/dist/agents/redux/execution-system/host-conversations/useHostConversation.js +24 -0
  82. package/dist/agents/redux/execution-system/inbox/inbox-turn-end.middleware.js +2 -1
  83. package/dist/agents/redux/execution-system/instance-context/instance-context.selectors.d.ts +3 -0
  84. package/dist/agents/redux/execution-system/instance-resources/default-remark-durability.d.ts +22 -0
  85. package/dist/agents/redux/execution-system/instance-resources/default-remark-durability.js +164 -0
  86. package/dist/agents/redux/execution-system/instance-resources/instance-resources.selectors.d.ts +8 -0
  87. package/dist/agents/redux/execution-system/instance-ui-state/instance-ui-state.selectors.d.ts +5 -0
  88. package/dist/agents/redux/execution-system/instance-ui-state/run-configuration-persist.js +2 -0
  89. package/dist/agents/redux/execution-system/instance-user-input/composer-draft-store.js +20 -0
  90. package/dist/agents/redux/execution-system/instance-user-input/useComposerDraftRestore.js +2 -1
  91. package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.selectors.d.ts +7 -0
  92. package/dist/agents/redux/execution-system/messages/messages.selectors.d.ts +1 -0
  93. package/dist/agents/redux/execution-system/messages/messages.selectors.js +1 -1
  94. package/dist/agents/redux/execution-system/observability/observability.selectors.d.ts +7 -0
  95. package/dist/agents/redux/execution-system/observational-memory/observational-memory.selectors.d.ts +1 -0
  96. package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +14 -0
  97. package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +8 -1
  98. package/dist/agents/redux/execution-system/thunks/execute-manual-instance.thunk.js +2 -1
  99. package/dist/agents/redux/execution-system/thunks/load-conversation.thunk.js +6 -0
  100. package/dist/agents/redux/execution-system/thunks/load-older-messages.thunk.js +12 -0
  101. package/dist/agents/redux/execution-system/thunks/process-stream.js +6 -4
  102. package/dist/agents/redux/execution-system/thunks/resolve-base-url.js +1 -1
  103. package/dist/agents/redux/execution-system/thunks/smart-execute.thunk.js +43 -0
  104. package/dist/agents/redux/execution-system/utils/assemble-cx-content-blocks.js +2 -1
  105. package/dist/agents/redux/execution-system/utils/continuation-body.d.ts +1 -0
  106. package/dist/agents/redux/execution-system/utils/continuation-body.js +2 -1
  107. package/dist/agents/redux/execution-system/utils/inbound-render-block.d.ts +8 -0
  108. package/dist/agents/redux/execution-system/utils/inbound-render-block.js +17 -2
  109. package/dist/agents/redux/execution-system/utils/normalize-content-blocks.js +1 -1
  110. package/dist/agents/redux/execution-system/utils/progress-data-block.d.ts +11 -0
  111. package/dist/agents/redux/execution-system/utils/progress-data-block.js +37 -0
  112. package/dist/agents/redux/execution-system/utils/stream-block-accumulator.js +10 -8
  113. package/dist/agents/redux/mcp/mcp.slice.js +15 -7
  114. package/dist/agents/redux/proposed-directives/proposedDirectivesSlice.d.ts +1 -0
  115. package/dist/agents/redux/tools/tools.selectors.d.ts +1 -0
  116. package/dist/agents/redux/tools/tools.thunks.js +3 -0
  117. package/dist/agents/resources/default-picker-items.d.ts +17 -0
  118. package/dist/agents/resources/default-picker-items.js +48 -0
  119. package/dist/agents/runtime-reconnect/ServerOperationBanner.d.ts +6 -1
  120. package/dist/agents/runtime-reconnect/ServerOperationBanner.js +6 -1
  121. package/dist/agents/types/instance.types.d.ts +2 -1
  122. package/dist/agents/ui-first-tools/redux/agent-lists.selectors.d.ts +2 -0
  123. package/dist/agents/ui-first-tools/ui/ApprovalCard.js +1 -1
  124. package/dist/agents/ui-first-tools/ui/AskCard.js +1 -1
  125. package/dist/agents/ui-first-tools/ui/lists/TaskPanel.js +1 -1
  126. package/dist/conversation/hooks/useDomCapturePrint.js +1 -1
  127. package/dist/conversation/utils/markdown-print.js +1 -1
  128. package/dist/cx-chat/components/SsrSidebarChats.js +1 -1
  129. package/dist/cx-chat/components/messages/AssistantMessage.js +3 -5
  130. package/dist/cx-chat/components/sidebar/SidebarUserFooter.js +1 -1
  131. package/dist/cx-conversation/AssistantMessage.js +3 -5
  132. package/dist/host/app-data-slots.d.ts +85 -0
  133. package/dist/host/app-data-slots.js +42 -0
  134. package/dist/host/app-identity.d.ts +20 -0
  135. package/dist/host/app-identity.js +21 -0
  136. package/dist/host/bare-host-chrome.d.ts +14 -0
  137. package/dist/host/bare-host-chrome.js +45 -0
  138. package/dist/host/configure.d.ts +9 -1
  139. package/dist/host/configure.js +44 -8
  140. package/dist/host/contract.d.ts +39 -2
  141. package/dist/host/db-types.d.ts +99 -1
  142. package/dist/host/defaults/navigation-hooks.d.ts +2 -0
  143. package/dist/host/defaults/navigation-hooks.js +7 -1
  144. package/dist/host/defaults/navigation.d.ts +4 -3
  145. package/dist/host/defaults/navigation.js +38 -7
  146. package/dist/host/defaults/org.d.ts +12 -4
  147. package/dist/host/defaults/org.js +39 -1
  148. package/dist/host/defaults/prefs.d.ts +11 -0
  149. package/dist/host/defaults/prefs.js +43 -0
  150. package/dist/host/defaults/workspace-gate.d.ts +16 -0
  151. package/dist/host/defaults/workspace-gate.js +89 -0
  152. package/dist/host/diagnostics.d.ts +7 -2
  153. package/dist/host/diagnostics.js +6 -0
  154. package/dist/host/identity.js +2 -1
  155. package/dist/host/index.d.ts +6 -3
  156. package/dist/host/index.js +23 -2
  157. package/dist/host/no-database.d.ts +38 -0
  158. package/dist/host/no-database.js +107 -0
  159. package/dist/host/react.d.ts +1 -0
  160. package/dist/host/react.js +40 -2
  161. package/dist/host/registered-source.js +2 -2
  162. package/dist/host/source.d.ts +130 -0
  163. package/dist/host/source.js +86 -0
  164. package/dist/host/ui-slots.d.ts +9 -31
  165. package/dist/host/ui-slots.js +5 -37
  166. package/dist/mandates/useMandate.js +13 -0
  167. package/dist/public-chat/components/PublicMessageOptionsMenu.js +3 -2
  168. package/dist/store/create-chat-store.d.ts +4 -2
  169. package/dist/store/middlewares.d.ts +5 -0
  170. package/dist/store/slices.d.ts +1 -0
  171. package/dist/store/slices.js +4 -1
  172. package/dist/surfaces/redux/selectors.d.ts +2 -0
  173. package/dist/surfaces/redux/surfaceConfigSlice.js +2 -0
  174. package/dist/surfaces/redux/userStateSlice.js +3 -1
  175. package/dist/surfaces/runtime/agent-offer.js +1 -1
  176. package/dist/surfaces/runtime/surface-writeback.js +1 -1
  177. package/dist/testing/turn-harness.d.ts +35 -0
  178. package/dist/testing/turn-harness.js +85 -0
  179. package/dist/tool-call-visualization/db-renderer/fetchToolRendererRow.js +2 -0
  180. package/dist/tool-call-visualization/redux/selectors.d.ts +1 -0
  181. package/dist/tool-call-visualization/renderers/agent-call/AgentCallInline.js +1 -1
  182. package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +1 -1
  183. package/dist/tool-call-visualization/renderers/fs/FsInline.js +1 -1
  184. package/dist/tool-call-visualization/renderers/random-wheel/RandomWheelInline.js +1 -1
  185. package/dist/tool-call-visualization/renderers/research/ResearchOverlay.js +4 -4
  186. package/dist/tool-call-visualization/renderers/research/SubagentReportBlock.js +2 -2
  187. package/dist/tool-call-visualization/renderers/scrape/ScrapeOverlay.js +1 -1
  188. package/dist/tool-call-visualization/renderers/search/SearchInline.js +1 -1
  189. package/dist/tool-call-visualization/renderers/search/SearchOverlay.js +1 -1
  190. package/dist/tool-call-visualization/renderers/sql/SqlInline.js +1 -1
  191. package/dist/tool-call-visualization/result-fields/KeyValueGrid.js +1 -1
  192. package/dist/tool-call-visualization/result-fields/ResultMarkdown.js +1 -1
  193. package/dist/tool-call-visualization/result-fields/ResultValue.js +1 -1
  194. package/dist/tool-call-visualization/surface-write/SurfaceWriteDiff.js +1 -1
  195. package/dist/ui/AudioOutputBlockSkeleton.d.ts +17 -0
  196. package/dist/ui/AudioOutputBlockSkeleton.js +78 -0
  197. package/dist/ui/chat-protocol-from-stream.d.ts +60 -0
  198. package/dist/ui/chat-protocol-from-stream.js +135 -0
  199. package/dist/ui/markdown-stream/EnhancedChatMarkdown.d.ts +59 -0
  200. package/dist/ui/markdown-stream/EnhancedChatMarkdown.js +1108 -0
  201. package/dist/ui/markdown-stream/MarkdownStream.d.ts +88 -0
  202. package/dist/ui/markdown-stream/MarkdownStream.js +14 -0
  203. package/dist/ui/markdown-stream/MarkdownStreamImpl.d.ts +4 -0
  204. package/dist/ui/markdown-stream/MarkdownStreamImpl.js +86 -0
  205. package/dist/ui/markdown-stream/StreamAwareChatMarkdown.d.ts +58 -0
  206. package/dist/ui/markdown-stream/StreamAwareChatMarkdown.js +294 -0
  207. package/dist/ui/markdown-stream/internal-handlers/AgentCallChildTrace.d.ts +22 -0
  208. package/dist/ui/markdown-stream/internal-handlers/AgentCallChildTrace.js +128 -0
  209. package/dist/ui/markdown-stream/internal-handlers/InlineAssistantError.d.ts +3 -0
  210. package/dist/ui/markdown-stream/internal-handlers/InlineAssistantError.js +26 -0
  211. package/dist/ui/markdown-stream/internal-handlers/InlineThinkingSlot.d.ts +14 -0
  212. package/dist/ui/markdown-stream/internal-handlers/InlineThinkingSlot.js +23 -0
  213. package/dist/ui/markdown-stream/internal-handlers/ToolHandlers.d.ts +42 -0
  214. package/dist/ui/markdown-stream/internal-handlers/ToolHandlers.js +109 -0
  215. package/dist/ui/markdown-stream/useBoundAgentOutputSchema.d.ts +2 -0
  216. package/dist/ui/markdown-stream/useBoundAgentOutputSchema.js +33 -0
  217. package/dist/window-panels/windows/agents/AgentAssistantMarkdownDebugWindow.js +1 -1
  218. package/package.json +10 -5
  219. package/dist/host/content-ir-slots.d.ts +0 -231
  220. package/dist/host/content-ir-slots.js +0 -131
  221. package/dist/host/markdown-slots.d.ts +0 -53
  222. package/dist/host/markdown-slots.js +0 -32
  223. package/dist/host/rich-document-slots.d.ts +0 -123
  224. package/dist/host/rich-document-slots.js +0 -36
  225. package/dist/utils/content-ir/report-kind-at-raw-renderer.d.ts +0 -19
  226. package/dist/utils/content-ir/report-kind-at-raw-renderer.js +0 -32
@@ -0,0 +1,86 @@
1
+ class HostSendRefused extends Error {
2
+ code = "host-send-refused";
3
+ constructor(message) {
4
+ super(message);
5
+ this.name = "HostSendRefused";
6
+ }
7
+ }
8
+ function isHostSendRefused(error) {
9
+ return error instanceof HostSendRefused || typeof error === "object" && error !== null && error.code === "host-send-refused";
10
+ }
11
+ function eventsToResponse(events) {
12
+ const encoder = new TextEncoder();
13
+ const iterator = events[Symbol.asyncIterator]();
14
+ const body = new ReadableStream({
15
+ async pull(controller) {
16
+ try {
17
+ const next = await iterator.next();
18
+ if (next.done) {
19
+ controller.close();
20
+ return;
21
+ }
22
+ controller.enqueue(encoder.encode(`${JSON.stringify(next.value)}
23
+ `));
24
+ } catch (error) {
25
+ controller.error(error);
26
+ }
27
+ },
28
+ async cancel() {
29
+ await iterator.return?.();
30
+ }
31
+ });
32
+ return new Response(body, {
33
+ status: 200,
34
+ headers: { "content-type": "application/x-ndjson" }
35
+ });
36
+ }
37
+ function hostTurnResponse(turn) {
38
+ return turn.events instanceof Response ? turn.events : eventsToResponse(turn.events);
39
+ }
40
+ function createHostTurn(requestId) {
41
+ const buffer = [];
42
+ let finished = false;
43
+ let failure = null;
44
+ let wake = null;
45
+ const notify = () => {
46
+ const w = wake;
47
+ wake = null;
48
+ w?.();
49
+ };
50
+ async function* read() {
51
+ for (; ; ) {
52
+ if (buffer.length > 0) {
53
+ yield buffer.shift();
54
+ continue;
55
+ }
56
+ if (failure) throw failure.error;
57
+ if (finished) return;
58
+ await new Promise((resolve) => {
59
+ wake = resolve;
60
+ });
61
+ }
62
+ }
63
+ return {
64
+ turn: { requestId, events: read() },
65
+ push(event) {
66
+ if (finished || failure) return;
67
+ buffer.push(event);
68
+ notify();
69
+ },
70
+ end() {
71
+ finished = true;
72
+ notify();
73
+ },
74
+ fail(error) {
75
+ failure = { error };
76
+ notify();
77
+ }
78
+ };
79
+ }
80
+ export {
81
+ HostSendRefused,
82
+ createHostTurn,
83
+ eventsToResponse,
84
+ hostTurnResponse,
85
+ isHostSendRefused
86
+ };
@@ -48,11 +48,6 @@ interface InputSlotProps {
48
48
  interface TextInputDialogProps extends OpenChangeProps {
49
49
  onConfirm?: (value: string) => void | Promise<void>;
50
50
  }
51
- interface ModelListDropdownProps {
52
- onValueChange?: (modelId: string) => void;
53
- onOfferingPinChange?: (offeringId: string | undefined) => void;
54
- [extra: string]: any;
55
- }
56
51
  interface ItemMenuProps {
57
52
  onCloseAutoFocus?: (event: Event) => void;
58
53
  [extra: string]: any;
@@ -95,7 +90,6 @@ type SlotComponent<P> = ComponentType<P> | {
95
90
  }["bivarianceHack"];
96
91
  type AnyFn = (...args: any[]) => any;
97
92
  export interface ChatUiSlots {
98
- RichContent: AnyComponent;
99
93
  CopyButtons: AnyComponent;
100
94
  InfoHint: AnyComponent;
101
95
  AnswerValueView: AnyComponent;
@@ -110,14 +104,10 @@ export interface ChatUiSlots {
110
104
  TableChooser: AnyComponent;
111
105
  FileResourceChip: AnyComponent;
112
106
  ConnectorMark: AnyComponent;
113
- InPlaceEditor: AnyComponent;
114
- EditInPlace: AnyComponent;
115
107
  MessageFilesStrip: AnyComponent;
116
108
  RulebookNudge: AnyComponent;
117
109
  NegativeVerdictFollowUp: AnyComponent;
118
110
  SpeakerButton: AnyComponent;
119
- /** The split Copy (one click = the person's flavor; the chevron offers markdown or plain text) over one markdown string: `{ text, label?, size? }`. */
120
- CopySplit: AnyComponent;
121
111
  GmailReviewCard: AnyComponent;
122
112
  ShareButton: AnyComponent;
123
113
  ShareModal: AnyComponent;
@@ -133,16 +123,11 @@ export interface ChatUiSlots {
133
123
  NoteFooter: AnyComponent;
134
124
  NoteTitleActions: AnyComponent;
135
125
  TaskBody: AnyComponent;
136
- RichDocument: AnyComponent;
137
126
  SystemInstructionModal: AnyComponent;
138
127
  confirm: AnyFn;
139
- copyRichContent: AnyFn;
140
- copyContent: AnyFn;
141
128
  useTablesEverywhere: AnyFn;
142
- useTextareaFormatting: AnyFn;
143
129
  useClipboardPaste: AnyFn;
144
130
  useCenterControlFit: AnyFn;
145
- useInPlaceTrigger: AnyFn;
146
131
  connectorDefinitionFromMcp: AnyFn;
147
132
  notesCreate: AnyFn;
148
133
  useKnowledgeAttachSearch: AnyFn;
@@ -311,7 +296,6 @@ export interface ChatUiSlots {
311
296
  OrganizationContextNotice: AnyComponent;
312
297
  JsonInspector: AnyComponent;
313
298
  ConfirmDialog: SlotComponent<OpenChangeProps>;
314
- ModelListDropdown: SlotComponent<ModelListDropdownProps>;
315
299
  TextWithDoors: AnyComponent;
316
300
  EntityDoorControls: AnyComponent;
317
301
  StructuredValueView: AnyComponent;
@@ -441,8 +425,6 @@ export declare function resetChatUiForTests(): void;
441
425
  * unregistered -> the stand-in, reported once.
442
426
  */
443
427
  export declare function hostSlot<K extends keyof ChatUiSlots>(name: K, Fallback?: AnyComponent): ChatUiSlots[K];
444
- /** A host with no rich renderer shows the text as it is. */
445
- export declare const RichContent: AnyComponent;
446
428
  export declare const CopyButtons: AnyComponent;
447
429
  export declare const InfoHint: AnyComponent;
448
430
  export declare const AnswerValueView: AnyComponent;
@@ -460,14 +442,10 @@ export declare const NonEditableContextMenu: ComponentType<import("../context-me
460
442
  export declare const TableChooser: AnyComponent;
461
443
  export declare const FileResourceChip: AnyComponent;
462
444
  export declare const ConnectorMark: AnyComponent;
463
- export declare const InPlaceEditor: AnyComponent;
464
- /** A host with no in-place editor shows the text and offers no edit. */
465
- export declare const EditInPlace: AnyComponent;
466
445
  export declare const MessageFilesStrip: AnyComponent;
467
446
  export declare const RulebookNudge: AnyComponent;
468
447
  export declare const NegativeVerdictFollowUp: AnyComponent;
469
448
  export declare const SpeakerButton: AnyComponent;
470
- export declare const CopySplit: AnyComponent;
471
449
  export declare const GmailReviewCard: AnyComponent;
472
450
  export declare const ShareButton: AnyComponent;
473
451
  export declare const ShareModal: AnyComponent;
@@ -479,17 +457,13 @@ export declare const ConnectorPromptHost: AnyComponent;
479
457
  export declare const WebpageSnapshotView: AnyComponent;
480
458
  /**
481
459
  * A named function or hook slot declared outside this file (by `ChatUiSlots` augmentation, e.g.
482
- * host/markdown-slots), with its stand-in. Same contract as the slots below.
460
+ * host/app-data-slots), with its stand-in. Same contract as the slots below.
483
461
  */
484
462
  export declare function hostFn<K extends keyof ChatUiSlots>(name: K, fallback?: AnyFn): ChatUiSlots[K];
485
463
  export declare const confirm: AnyFn;
486
- export declare const copyRichContent: AnyFn;
487
- export declare const copyContent: AnyFn;
488
464
  export declare const useTablesEverywhere: AnyFn;
489
- export declare const useTextareaFormatting: AnyFn;
490
465
  export declare const useClipboardPaste: AnyFn;
491
466
  export declare const useCenterControlFit: AnyFn;
492
- export declare const useInPlaceTrigger: AnyFn;
493
467
  export declare const connectorDefinitionFromMcp: AnyFn;
494
468
  export declare const notesCreate: AnyFn;
495
469
  export declare const useKnowledgeAttachSearch: AnyFn;
@@ -515,8 +489,6 @@ export declare const traceWarRoomRenderPath: AnyFn;
515
489
  export declare const isWarRoomThreadAgentSurface: AnyFn;
516
490
  /** A host with no cloud browser opens nothing; the opener is a reported no-op. */
517
491
  export declare const useOpenCloudBrowserCanvas: AnyFn;
518
- /** A host with no rich document viewer shows the text as it is, marked as the stand-in. */
519
- export declare const RichDocument: AnyComponent;
520
492
  /** The canvas identity of one chat's cloud browser (the host's own scheme; a bare host just keys by chat). */
521
493
  export declare const cloudBrowserCanvasSourceId: AnyFn;
522
494
  /** Builder doors: a host without the agent builder shows one labelled line where the editor would be. */
@@ -530,7 +502,7 @@ export declare const ResourcePickerMenu: SlotComponent<ResourcePickerMenuProps>;
530
502
  export declare const FilesResourcePicker: SlotComponent<FilesPickerProps>;
531
503
  export declare const NotePickerPopover: SlotComponent<NotePickerProps>;
532
504
  export declare const SmartInputMessageTemplatePicker: SlotComponent<TemplatePickerProps>;
533
- /** A host with no resource picker offers no items. */
505
+ /** A host with no resource picker gets the package's own item list (labels + icons for every view). */
534
506
  export declare const flattenResourcePickerItems: () => Array<{
535
507
  id: string;
536
508
  label: string;
@@ -574,11 +546,17 @@ export declare const ReadFailure: AnyComponent;
574
546
  export declare const ItemRow: ComponentType<ItemRowProps>;
575
547
  export declare const UntrustedCount: AnyComponent;
576
548
  export declare const StaleDataNotice: AnyComponent;
549
+ /** A bare host gets the package's own organization picker (`defaults/workspace-gate`). */
577
550
  export declare const WorkspaceGate: AnyComponent;
578
551
  export declare const OrganizationContextNotice: AnyComponent;
579
552
  export declare const JsonInspector: AnyComponent;
580
553
  export declare const ConfirmDialog: SlotComponent<OpenChangeProps>;
581
- export declare const ModelListDropdown: SlotComponent<ModelListDropdownProps>;
554
+ /**
555
+ * THE model picker is the agents package's own (`@ai-matrx/agents/models/react`), not a slot: a
556
+ * bare host gets the real list (`BareHostChrome` mounts the catalog over `host.db`), a host with
557
+ * its own catalog mounts `ModelCatalogProvider` above the chat (matrx-frontend: ModelCatalogHost).
558
+ */
559
+ export { ModelListDropdown } from "@ai-matrx/agents/models/react";
582
560
  export declare const TextWithDoors: AnyComponent;
583
561
  export declare const EntityDoorControls: AnyComponent;
584
562
  export declare const StructuredValueView: AnyComponent;
@@ -1,11 +1,12 @@
1
1
  "use client";
2
+ import { defaultResourcePickerItems } from "../agents/resources/default-picker-items.js";
2
3
  import { isRfc9562Uuid } from "@ai-matrx/kit/uuid";
3
4
  import { createElement, Fragment, useRef } from "react";
4
5
  import { formatCost, usdToPoints } from "@ai-matrx/kit/format";
5
6
  import { reportUnregisteredHostSlot as reportUnregistered } from "./diagnostics.js";
6
7
  import { DefaultWebpageSnapshotView } from "./defaults/webpage-snapshot-view.js";
8
+ import { DefaultWorkspaceGate } from "./defaults/workspace-gate.js";
7
9
  import { DefaultFullScreenOverlay, DefaultWindowPanel } from "./defaults/window-panel.js";
8
- import { copyText } from "@ai-matrx/kit/clipboard";
9
10
  const slots = {};
10
11
  function registerChatUi(next) {
11
12
  Object.assign(slots, next);
@@ -65,15 +66,6 @@ const failingThunk = (name) => () => () => {
65
66
  };
66
67
  const STAND_INS = {
67
68
  confirm: async () => false,
68
- copyRichContent: async () => false,
69
- // Content-shaped like the host's `copyContent(content, options)`: a string copies as text, anything
70
- // else as JSON. A failed copy is reported through `onError` and returns false, never swallowed.
71
- copyContent: async (content, options) => {
72
- const text = typeof content === "string" ? content : JSON.stringify(content, null, 2);
73
- const landed = await copyText(text ?? "");
74
- if (!landed) options?.onError?.(new Error("Failed to copy"));
75
- return landed;
76
- },
77
69
  useTablesEverywhere: () => NONE,
78
70
  useCenterControlFit: () => true,
79
71
  connectorDefinitionFromMcp: () => null,
@@ -165,10 +157,6 @@ function slotFn(name, declared) {
165
157
  };
166
158
  return fn;
167
159
  }
168
- const RichContent = slotComponent(
169
- "RichContent",
170
- ({ source, className }) => createElement("div", { className, "data-chat-slot-fallback": "RichContent" }, typeof source === "string" ? source : "")
171
- );
172
160
  const CopyButtons = slotComponent("CopyButtons");
173
161
  const InfoHint = slotComponent("InfoHint");
174
162
  const AnswerValueView = slotComponent("AnswerValueView");
@@ -199,13 +187,10 @@ const NonEditableContextMenu = slotComponent("NonEditableContextMenu", contentWi
199
187
  const TableChooser = slotComponent("TableChooser");
200
188
  const FileResourceChip = slotComponent("FileResourceChip");
201
189
  const ConnectorMark = slotComponent("ConnectorMark");
202
- const InPlaceEditor = slotComponent("InPlaceEditor");
203
- const EditInPlace = slotComponent("EditInPlace", ({ children }) => children ?? null);
204
190
  const MessageFilesStrip = slotComponent("MessageFilesStrip", unregisteredWidget("MessageFilesStrip"));
205
191
  const RulebookNudge = slotComponent("RulebookNudge", unregisteredWidget("RulebookNudge"));
206
192
  const NegativeVerdictFollowUp = slotComponent("NegativeVerdictFollowUp", unregisteredWidget("NegativeVerdictFollowUp"));
207
193
  const SpeakerButton = slotComponent("SpeakerButton", unregisteredWidget("SpeakerButton"));
208
- const CopySplit = slotComponent("CopySplit", unregisteredWidget("CopySplit"));
209
194
  const GmailReviewCard = slotComponent("GmailReviewCard", unregisteredWidget("GmailReviewCard"));
210
195
  const ShareButton = slotComponent("ShareButton", unregisteredWidget("ShareButton"));
211
196
  const ShareModal = slotComponent("ShareModal", unregisteredWidget("ShareModal"));
@@ -218,13 +203,9 @@ function hostFn(name, fallback) {
218
203
  return slotFn(name, fallback);
219
204
  }
220
205
  const confirm = slotFn("confirm");
221
- const copyRichContent = slotFn("copyRichContent");
222
- const copyContent = slotFn("copyContent");
223
206
  const useTablesEverywhere = slotFn("useTablesEverywhere");
224
- const useTextareaFormatting = slotFn("useTextareaFormatting", () => void 0);
225
207
  const useClipboardPaste = slotFn("useClipboardPaste", () => void 0);
226
208
  const useCenterControlFit = slotFn("useCenterControlFit");
227
- const useInPlaceTrigger = slotFn("useInPlaceTrigger", () => ({ readProps: {} }));
228
209
  const connectorDefinitionFromMcp = slotFn("connectorDefinitionFromMcp");
229
210
  const notesCreate = slotFn("notesCreate");
230
211
  const useKnowledgeAttachSearch = slotFn("useKnowledgeAttachSearch");
@@ -248,10 +229,6 @@ const loadedSkills = slotFn("loadedSkills", () => ({ status: "idle", skills: []
248
229
  const traceWarRoomRenderPath = slotFn("traceWarRoomRenderPath", () => void 0);
249
230
  const isWarRoomThreadAgentSurface = slotFn("isWarRoomThreadAgentSurface", () => false);
250
231
  const useOpenCloudBrowserCanvas = slotFn("useOpenCloudBrowserCanvas", () => () => void 0);
251
- const RichDocument = slotComponent(
252
- "RichDocument",
253
- ({ content, className }) => createElement("div", { className: `whitespace-pre-wrap text-sm ${className ?? ""}`, "data-chat-slot-fallback": "RichDocument" }, typeof content === "string" ? content : "")
254
- );
255
232
  const cloudBrowserCanvasSourceId = slotFn("cloudBrowserCanvasSourceId", (conversationId) => `cloud-browser:${conversationId}`);
256
233
  const SystemInstructionModal = slotComponent("SystemInstructionModal", unregisteredWidget("SystemInstructionModal"));
257
234
  const WindowPanel = slotComponent("WindowPanel", DefaultWindowPanel);
@@ -264,7 +241,7 @@ const SmartInputMessageTemplatePicker = slotComponent(
264
241
  "SmartInputMessageTemplatePicker",
265
242
  unregisteredWidget("SmartInputMessageTemplatePicker")
266
243
  );
267
- const flattenResourcePickerItems = slotFn("flattenResourcePickerItems", () => []);
244
+ const flattenResourcePickerItems = slotFn("flattenResourcePickerItems", defaultResourcePickerItems);
268
245
  const useRunControlCounts = slotFn("useRunControlCounts", () => ({}));
269
246
  const useAttachResourcePicker = slotFn("useAttachResourcePicker", () => (_options) => void 0);
270
247
  const usePopoutContainer = slotFn("usePopoutContainer", () => void 0);
@@ -308,11 +285,11 @@ const ReadFailure = slotComponent("ReadFailure", unregisteredWidget("ReadFailure
308
285
  const ItemRow = slotComponent("ItemRow", unregisteredWidget("ItemRow"));
309
286
  const UntrustedCount = slotComponent("UntrustedCount", unregisteredWidget("UntrustedCount"));
310
287
  const StaleDataNotice = slotComponent("StaleDataNotice", unregisteredWidget("StaleDataNotice"));
311
- const WorkspaceGate = slotComponent("WorkspaceGate", unregisteredWidget("WorkspaceGate"));
288
+ const WorkspaceGate = slotComponent("WorkspaceGate", DefaultWorkspaceGate);
312
289
  const OrganizationContextNotice = slotComponent("OrganizationContextNotice", unregisteredWidget("OrganizationContextNotice"));
313
290
  const JsonInspector = slotComponent("JsonInspector", unregisteredWidget("JsonInspector"));
314
291
  const ConfirmDialog = slotComponent("ConfirmDialog", unregisteredWidget("ConfirmDialog"));
315
- const ModelListDropdown = slotComponent("ModelListDropdown", unregisteredWidget("ModelListDropdown"));
292
+ import { ModelListDropdown } from "@ai-matrx/agents/models/react";
316
293
  const TextWithDoors = slotComponent("TextWithDoors", unregisteredWidget("TextWithDoors"));
317
294
  const EntityDoorControls = slotComponent("EntityDoorControls", unregisteredWidget("EntityDoorControls"));
318
295
  const StructuredValueView = slotComponent("StructuredValueView", unregisteredWidget("StructuredValueView"));
@@ -504,14 +481,12 @@ export {
504
481
  ConnectorPromptHost,
505
482
  ConversationHoverPreview,
506
483
  CopyButtons,
507
- CopySplit,
508
484
  Cost,
509
485
  CreatorRunPanel,
510
486
  CustomDataBindingPreview,
511
487
  CustomDataBindingSummary,
512
488
  DataRefPreviewContent,
513
489
  DockedSidePanel,
514
- EditInPlace,
515
490
  EditableContextMenu,
516
491
  EmailInputDialog,
517
492
  EntityCommentPopover,
@@ -529,7 +504,6 @@ export {
529
504
  GmailReviewCard,
530
505
  HtmlPreviewFullScreenEditor,
531
506
  IconButton,
532
- InPlaceEditor,
533
507
  InfoHint,
534
508
  InputCapabilitiesEditor,
535
509
  ItemMenu,
@@ -567,8 +541,6 @@ export {
567
541
  ResourcePickerMenu,
568
542
  ResourcePickerWindow,
569
543
  ReviewAnswersLink,
570
- RichContent,
571
- RichDocument,
572
544
  RulebookNudge,
573
545
  SearchGroup,
574
546
  SearchGroupTrigger,
@@ -609,8 +581,6 @@ export {
609
581
  confirm,
610
582
  connectorDefinitionFromMcp,
611
583
  convertMarkdownToHtml,
612
- copyContent,
613
- copyRichContent,
614
584
  createHtmlPage,
615
585
  createSandboxFilesystemAdapter,
616
586
  currentCostUnit,
@@ -709,7 +679,6 @@ export {
709
679
  useGitHubConnection,
710
680
  useHeldWriteTableName,
711
681
  useHtmlPreviewState,
712
- useInPlaceTrigger,
713
682
  useKnowledgeAttachSearch,
714
683
  useLoginHref,
715
684
  useModelFull,
@@ -727,6 +696,5 @@ export {
727
696
  useRunControlCounts,
728
697
  useSkills,
729
698
  useTablesEverywhere,
730
- useTextareaFormatting,
731
699
  useUrlSync
732
700
  };
@@ -8,6 +8,7 @@ import {
8
8
  import { extractErrorMessage } from "@ai-matrx/data/net";
9
9
  import { useAppSelector } from "../store/hooks.js";
10
10
  import { selectOrganizationId } from "../host/org.js";
11
+ import { chatHostHasDatabase } from "../host/configure.js";
11
12
  function useMandate(mandateKey, options = {}) {
12
13
  const hasMandateKey = mandateKey.trim().length > 0;
13
14
  const resolvableKey = hasMandateKey ? mandateKey : null;
@@ -45,6 +46,18 @@ function useMandate(mandateKey, options = {}) {
45
46
  const epoch = state.epoch;
46
47
  useEffect(() => {
47
48
  if (resolvableKey === null) return;
49
+ if (!chatHostHasDatabase()) {
50
+ setState((prev) => ({
51
+ ...prev,
52
+ key: question,
53
+ mandate: null,
54
+ loading: false,
55
+ error: null,
56
+ absent: true,
57
+ organizationPending: false
58
+ }));
59
+ return;
60
+ }
48
61
  let cancelled = false;
49
62
  const org = options.organizationId ?? null;
50
63
  const resolution = options.optional ? resolveMandate(resolvableKey, {
@@ -17,12 +17,12 @@ import {
17
17
  Share2
18
18
  } from "lucide-react";
19
19
  import { getMarkdownStylesheet } from "@ai-matrx/print/markdown";
20
- import { AdvancedMenu, copyContent } from "../../host/ui-slots.js";
20
+ import { AdvancedMenu } from "../../host/ui-slots.js";
21
21
  import { EmailInputDialog } from "../../host/ui-slots.js";
22
22
  import { AuthGateDialog } from "../../host/ui-slots.js";
23
23
  import { notesCreate } from "../../host/ui-slots.js";
24
24
  import { toast } from "../../host/notify.js";
25
- import { useSelector } from "react-redux";
25
+ import { useAppSelector as useSelector } from "../../store/hooks.js";
26
26
  import { selectIsAuthenticated } from "../../host/identity.js";
27
27
  import { useAppDispatch } from "../../store/hooks.js";
28
28
  import { openOverlay, CHAT_WINDOWS } from "../../host/windows.js";
@@ -30,6 +30,7 @@ import { kindTextToMarkdown } from "../../utils/content-ir/surfaces/kind-text-to
30
30
  import { removeCodeSpans, replaceFences } from "@ai-matrx/content-ir/source";
31
31
  import { selectOrganizationId, ensureOrganizationContext, isOrganizationSelectionCancelled } from "../../host/org.js";
32
32
  import { downloadFile } from "@ai-matrx/kit/download";
33
+ import { copyContent } from "@ai-matrx/rich-content/copy/copy-commands";
33
34
  const PENDING_ACTION_KEY = "matrx_pending_post_auth_action";
34
35
  const PublicMessageOptionsMenu = ({
35
36
  content: answerContent,
@@ -9,6 +9,7 @@ export interface CreateChatStoreOptions {
9
9
  files?: Omit<FilesHost, "store">;
10
10
  }
11
11
  export declare function createChatStore(preloadedState?: Partial<ChatState>, options?: CreateChatStoreOptions): import("@reduxjs/toolkit").EnhancedStore<{
12
+ cloudFiles: import("@ai-matrx/media/files/engine").CloudFilesState;
12
13
  voiceAgent: import("../voice-agent/types.js").VoiceAgentState;
13
14
  agentDefinition: import("../agents/types/agent-definition.types.js").AgentDefinitionSliceState;
14
15
  conversationList: import("../agents/redux/conversation-list/conversation-list.types.js").ConversationListState;
@@ -51,9 +52,10 @@ export declare function createChatStore(preloadedState?: Partial<ChatState>, opt
51
52
  agentSettings: import("../agents/redux/agent-settings/types.js").AgentSettingsState;
52
53
  conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
53
54
  chatHost: import("./chat-host.slice.js").ChatHostState;
54
- cloudFiles: import("@ai-matrx/media/files/engine").CloudFilesState;
55
+ hostConversations: import("../agents/redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
55
56
  }, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
56
57
  dispatch: import("redux-thunk").ThunkDispatch<{
58
+ cloudFiles: import("@ai-matrx/media/files/engine").CloudFilesState;
57
59
  voiceAgent: import("../voice-agent/types.js").VoiceAgentState;
58
60
  agentDefinition: import("../agents/types/agent-definition.types.js").AgentDefinitionSliceState;
59
61
  conversationList: import("../agents/redux/conversation-list/conversation-list.types.js").ConversationListState;
@@ -96,7 +98,7 @@ export declare function createChatStore(preloadedState?: Partial<ChatState>, opt
96
98
  agentSettings: import("../agents/redux/agent-settings/types.js").AgentSettingsState;
97
99
  conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
98
100
  chatHost: import("./chat-host.slice.js").ChatHostState;
99
- cloudFiles: import("@ai-matrx/media/files/engine").CloudFilesState;
101
+ hostConversations: import("../agents/redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
100
102
  }, undefined, import("redux").UnknownAction>;
101
103
  }>, import("redux").StoreEnhancer]>>;
102
104
  export type ChatStore = ReturnType<typeof createChatStore>;
@@ -42,6 +42,7 @@ export declare function chatMiddlewares(): readonly [Middleware<{}, any, import(
42
42
  agentSettings: import("../agents/redux/agent-settings/types.js").AgentSettingsState;
43
43
  conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
44
44
  chatHost: import("./chat-host.slice.js").ChatHostState;
45
+ hostConversations: import("../agents/redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
45
46
  } & import("./root-state.js").ChatHostReadSlices, import("redux").Dispatch<import("redux").UnknownAction>>, Middleware<Record<string, never>, {
46
47
  voiceAgent: import("../voice-agent/types.js").VoiceAgentState;
47
48
  agentDefinition: import("../agents/types/agent-definition.types.js").AgentDefinitionSliceState;
@@ -85,6 +86,7 @@ export declare function chatMiddlewares(): readonly [Middleware<{}, any, import(
85
86
  agentSettings: import("../agents/redux/agent-settings/types.js").AgentSettingsState;
86
87
  conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
87
88
  chatHost: import("./chat-host.slice.js").ChatHostState;
89
+ hostConversations: import("../agents/redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
88
90
  } & import("./root-state.js").ChatHostReadSlices, import("redux").Dispatch<import("redux").UnknownAction>>, Middleware<object, {
89
91
  voiceAgent: import("../voice-agent/types.js").VoiceAgentState;
90
92
  agentDefinition: import("../agents/types/agent-definition.types.js").AgentDefinitionSliceState;
@@ -128,6 +130,7 @@ export declare function chatMiddlewares(): readonly [Middleware<{}, any, import(
128
130
  agentSettings: import("../agents/redux/agent-settings/types.js").AgentSettingsState;
129
131
  conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
130
132
  chatHost: import("./chat-host.slice.js").ChatHostState;
133
+ hostConversations: import("../agents/redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
131
134
  } & import("./root-state.js").ChatHostReadSlices, import("redux").Dispatch<import("redux").UnknownAction>>, Middleware<object, {
132
135
  voiceAgent: import("../voice-agent/types.js").VoiceAgentState;
133
136
  agentDefinition: import("../agents/types/agent-definition.types.js").AgentDefinitionSliceState;
@@ -171,6 +174,7 @@ export declare function chatMiddlewares(): readonly [Middleware<{}, any, import(
171
174
  agentSettings: import("../agents/redux/agent-settings/types.js").AgentSettingsState;
172
175
  conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
173
176
  chatHost: import("./chat-host.slice.js").ChatHostState;
177
+ hostConversations: import("../agents/redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
174
178
  } & import("./root-state.js").ChatHostReadSlices, import("redux").Dispatch<import("redux").UnknownAction>>, Middleware<object, {
175
179
  voiceAgent: import("../voice-agent/types.js").VoiceAgentState;
176
180
  agentDefinition: import("../agents/types/agent-definition.types.js").AgentDefinitionSliceState;
@@ -214,4 +218,5 @@ export declare function chatMiddlewares(): readonly [Middleware<{}, any, import(
214
218
  agentSettings: import("../agents/redux/agent-settings/types.js").AgentSettingsState;
215
219
  conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
216
220
  chatHost: import("./chat-host.slice.js").ChatHostState;
221
+ hostConversations: import("../agents/redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
217
222
  } & import("./root-state.js").ChatHostReadSlices, import("redux").Dispatch<import("redux").UnknownAction>>];
@@ -41,6 +41,7 @@ export declare const chatReducers: {
41
41
  agentSettings: import("redux").Reducer<import("../agents/redux/agent-settings/types.js").AgentSettingsState>;
42
42
  conversationAttachments: import("redux").Reducer<import("../agents/connectors/attachments.slice.js").AttachmentsSliceState>;
43
43
  chatHost: import("redux").Reducer<import("./chat-host.slice.js").ChatHostState>;
44
+ hostConversations: import("redux").Reducer<import("../agents/redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState>;
44
45
  };
45
46
  export type ChatReducers = typeof chatReducers;
46
47
  export type ChatSliceKey = keyof ChatReducers;
@@ -40,6 +40,7 @@ import proposedDirectivesReducer from "../agents/redux/proposed-directives/propo
40
40
  import agentSettingsReducer from "../agents/redux/agent-settings/agentSettingsSlice.js";
41
41
  import conversationAttachmentsReducer from "../agents/connectors/attachments.slice.js";
42
42
  import { chatHostReducer } from "./chat-host.slice.js";
43
+ import { hostConversationsReducer } from "../agents/redux/execution-system/host-conversations/host-conversations.slice.js";
43
44
  const chatReducers = {
44
45
  voiceAgent: voiceAgentReducer,
45
46
  agentDefinition: agentDefinitionReducer,
@@ -89,7 +90,9 @@ const chatReducers = {
89
90
  conversationAttachments: conversationAttachmentsReducer,
90
91
  // The AI model catalogue every picker and label reads; package-owned since P17b.
91
92
  // Host state the package reads (identity, active org, server, prefs), synced by <ChatProvider> (P3).
92
- chatHost: chatHostReducer
93
+ chatHost: chatHostReducer,
94
+ // Conversations a host-owned message source carries (host/source, HOST-OWNED-SOURCE-PLAN P28a).
95
+ hostConversations: hostConversationsReducer
93
96
  };
94
97
  export {
95
98
  chatReducers
@@ -48,6 +48,7 @@ export declare const selectActiveSurfaces: ((state: {
48
48
  agentSettings: import("../../agents/redux/agent-settings/types.js").AgentSettingsState;
49
49
  conversationAttachments: import("../../agents/connectors/attachments.slice.js").AttachmentsSliceState;
50
50
  chatHost: import("../../store/chat-host.slice.js").ChatHostState;
51
+ hostConversations: import("../../agents/redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
51
52
  } & import("../../store/root-state.js").ChatHostReadSlices) => import("../services/surfaces.service.js").SurfaceWithStats[]) & {
52
53
  clearCache: () => void;
53
54
  resultsCount: () => number;
@@ -120,6 +121,7 @@ export declare const makeSelectBindingsForAgent: (agentId: string) => ((state: {
120
121
  agentSettings: import("../../agents/redux/agent-settings/types.js").AgentSettingsState;
121
122
  conversationAttachments: import("../../agents/connectors/attachments.slice.js").AttachmentsSliceState;
122
123
  chatHost: import("../../store/chat-host.slice.js").ChatHostState;
124
+ hostConversations: import("../../agents/redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
123
125
  } & import("../../store/root-state.js").ChatHostReadSlices) => AgentSurfaceBinding[]) & {
124
126
  clearCache: () => void;
125
127
  resultsCount: () => number;
@@ -6,6 +6,7 @@ import {
6
6
  fetchSurfaceConfigBundle,
7
7
  resolveSurfaceConfig
8
8
  } from "../services/surface-config.service.js";
9
+ import { chatHostHasDatabase } from "../../host/configure.js";
9
10
  const initialState = { bySurfaceName: {} };
10
11
  const inflight = /* @__PURE__ */ new Map();
11
12
  const ensureSurfaceConfig = createAsyncThunk(
@@ -22,6 +23,7 @@ const ensureSurfaceConfig = createAsyncThunk(
22
23
  },
23
24
  {
24
25
  condition: ({ surfaceName, force }, { getState }) => {
26
+ if (!chatHostHasDatabase()) return false;
25
27
  if (force) return true;
26
28
  const entry = getState().surfaceConfig?.bySurfaceName[surfaceName];
27
29
  return !entry || entry.status === "idle" || entry.status === "error";
@@ -3,6 +3,7 @@ import {
3
3
  surfaceUserStateService
4
4
  } from "../user-state/service.js";
5
5
  import { requireUserId } from "../../host/identity.js";
6
+ import { chatHostHasDatabase } from "../../host/configure.js";
6
7
  const initialState = { byFeature: {} };
7
8
  function ensureFeature(state, feature) {
8
9
  if (!state.byFeature[feature]) {
@@ -50,7 +51,7 @@ function ensureSurfaceFeatureLoaded(feature, force = false) {
50
51
  const p = (async () => {
51
52
  dispatch(surfaceUserStateActions.featureLoading(feature));
52
53
  try {
53
- const rows = await surfaceUserStateService.loadFeature(requireUserId(), feature);
54
+ const rows = !chatHostHasDatabase() ? {} : await surfaceUserStateService.loadFeature(requireUserId(), feature);
54
55
  dispatch(surfaceUserStateActions.featureReceived({ feature, rows }));
55
56
  } catch (e) {
56
57
  dispatch(
@@ -67,6 +68,7 @@ function ensureSurfaceFeatureLoaded(feature, force = false) {
67
68
  function saveSurfaceState(feature, surfaceKey, state) {
68
69
  return async (dispatch) => {
69
70
  dispatch(surfaceUserStateActions.rowSet({ feature, surfaceKey, state }));
71
+ if (!chatHostHasDatabase()) return;
70
72
  try {
71
73
  await surfaceUserStateService.save(requireUserId(), feature, surfaceKey, state);
72
74
  } catch (e) {
@@ -1,5 +1,5 @@
1
1
  import { KIND_KEY } from "@ai-matrx/content-ir";
2
- import { contentIrKindValidator } from "../../host/content-ir-slots.js";
2
+ import { contentIrKindValidator } from "../../host/app-data-slots.js";
3
3
  function summarizeKindSchema(schema) {
4
4
  if (typeof schema !== "object" || schema === null) return null;
5
5
  const s = schema;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { contentIrKindValidator } from "../../host/content-ir-slots.js";
2
+ import { contentIrKindValidator } from "../../host/app-data-slots.js";
3
3
  import { getManifest } from "./registry.js";
4
4
  import {
5
5
  BASELINE_SURFACE_NAME,
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The turn harness (HOST-OWNED-SOURCE-PLAN §3, shared with P24g): a recorded corpus turn as the
3
+ * real server bytes, a recording diagnostics port, and an in-memory prefs port — so a suite runs a
4
+ * real turn through `processStream` on the package's private store without a network.
5
+ *
6
+ * Every stream in it is the LIVE-captured NDJSON in `fixtures/corpus/` (a synthetic stream is a
7
+ * defect — vitest.config.ts).
8
+ */
9
+ import type { ChatDiagnosticContext, ChatDiagnosticsPort, ChatPrefsPort } from "../host/contract.js";
10
+ /** The recorded corpus file's raw NDJSON text. */
11
+ export declare function corpusText(name: string): string;
12
+ /**
13
+ * The corpus file as a streamed `Response`, one line per chunk — the way it came off the wire.
14
+ * `hold` stops before the last `n` lines until `release()` (a turn still running).
15
+ */
16
+ export declare function corpusResponse(name: string, options?: {
17
+ hold?: number;
18
+ }): {
19
+ response: Response;
20
+ release: () => void;
21
+ };
22
+ export interface RecordingDiagnostics extends ChatDiagnosticsPort {
23
+ entries: Array<{
24
+ error: unknown;
25
+ ctx: ChatDiagnosticContext;
26
+ stack: string;
27
+ }>;
28
+ /** Every feature the no-database stand-in refused. */
29
+ noDatabase(): string[];
30
+ }
31
+ export declare function createRecordingDiagnostics(): RecordingDiagnostics;
32
+ /** A host prefs port over a Map (what a host bridge — a file, IPC — would back). */
33
+ export declare function createMemoryPrefs(store?: Map<string, string>): ChatPrefsPort & {
34
+ store: Map<string, string>;
35
+ };