@ai-matrx/chat 0.3.33 → 0.4.2
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/CHANGELOG.md +46 -0
- package/dist/agents/addressing/useAgentHref.js +4 -1
- package/dist/agents/api/submit-tool-results.js +11 -1
- package/dist/agents/components/ambient-assistant/intelligence-places.js +2 -2
- package/dist/agents/components/chat/intelligence-places.js +7 -7
- package/dist/agents/components/chat/useCanvasScopedToConversation.js +1 -1
- package/dist/agents/components/inputs/smart-input/RunToolPicker.js +7 -13
- package/dist/agents/components/inputs/smart-input/composer/ComposerAgentPill.js +3 -2
- package/dist/agents/components/inputs/smart-input/composer/useComposerAgent.js +5 -5
- package/dist/agents/components/inputs/smart-input/composer/useComposerAgentFilter.js +3 -2
- package/dist/agents/components/messages-display/AgentConversationDisplay.js +4 -1
- package/dist/agents/components/run-controls/RunConfigOverrides.js +10 -16
- package/dist/agents/components/run-controls/panels/shared.d.ts +1 -1
- package/dist/agents/components/shared/AgentConversationColumn.js +3 -2
- package/dist/agents/components/working-document/workingDocumentSurface.d.ts +1 -1
- package/dist/agents/hooks/useAgentModelLabel.js +4 -3
- package/dist/agents/hooks/useDiffEnrichment.js +3 -5
- package/dist/agents/hooks/useModelControls.d.ts +5 -161
- package/dist/agents/identity/model-catalog.d.ts +37 -0
- package/dist/agents/identity/model-catalog.js +105 -0
- package/dist/agents/redux/agent-definition/selectors.d.ts +237 -237
- package/dist/agents/redux/agent-definition/thunks.d.ts +1 -1
- package/dist/agents/redux/agent-settings/agentSettingsSlice.d.ts +1 -1
- package/dist/agents/redux/agent-settings/agentSettingsSlice.js +4 -6
- package/dist/agents/redux/agent-settings/selectors.d.ts +13 -152
- package/dist/agents/redux/agent-settings/selectors.js +0 -39
- package/dist/agents/redux/agent-settings/useNormalizedControls.d.ts +8 -0
- package/dist/agents/redux/agent-settings/useNormalizedControls.js +24 -0
- package/dist/agents/redux/agent-shortcut-categories/selectors.d.ts +50 -50
- package/dist/agents/redux/agent-shortcuts/selectors.d.ts +147 -147
- package/dist/agents/redux/conversation-history/selectors.d.ts +16 -16
- package/dist/agents/redux/conversation-list/conversation-list.selectors.d.ts +2 -2
- package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.d.ts +54 -54
- package/dist/agents/redux/execution-system/context-state/context-state.selectors.d.ts +14 -14
- package/dist/agents/redux/execution-system/conversations/conversations.selectors.d.ts +5 -5
- package/dist/agents/redux/execution-system/host-conversations/conversation-abilities.d.ts +12 -0
- package/dist/agents/redux/execution-system/host-conversations/conversation-abilities.js +25 -0
- package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.d.ts +50 -0
- package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.js +367 -0
- package/dist/agents/redux/execution-system/host-conversations/host-conversations.selectors.d.ts +28 -0
- package/dist/agents/redux/execution-system/host-conversations/host-conversations.selectors.js +41 -0
- package/dist/agents/redux/execution-system/host-conversations/host-conversations.slice.d.ts +43 -0
- package/dist/agents/redux/execution-system/host-conversations/host-conversations.slice.js +38 -0
- package/dist/agents/redux/execution-system/host-conversations/source-registry.d.ts +9 -0
- package/dist/agents/redux/execution-system/host-conversations/source-registry.js +15 -0
- package/dist/agents/redux/execution-system/host-conversations/useHostConversation.d.ts +4 -0
- package/dist/agents/redux/execution-system/host-conversations/useHostConversation.js +24 -0
- package/dist/agents/redux/execution-system/instance-context/instance-context.selectors.d.ts +3 -3
- package/dist/agents/redux/execution-system/instance-resources/default-remark-durability.d.ts +22 -0
- package/dist/agents/redux/execution-system/instance-resources/default-remark-durability.js +164 -0
- package/dist/agents/redux/execution-system/instance-resources/instance-resources.selectors.d.ts +8 -8
- package/dist/agents/redux/execution-system/instance-ui-state/instance-ui-state.selectors.d.ts +5 -5
- package/dist/agents/redux/execution-system/instance-user-input/composer-draft-store.js +20 -0
- package/dist/agents/redux/execution-system/instance-user-input/useComposerDraftRestore.js +2 -1
- package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.selectors.d.ts +7 -7
- package/dist/agents/redux/execution-system/messages/messages.selectors.d.ts +1 -1
- package/dist/agents/redux/execution-system/observability/observability.selectors.d.ts +7 -7
- package/dist/agents/redux/execution-system/observational-memory/observational-memory.selectors.d.ts +1 -1
- package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +14 -14
- package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +2 -1
- package/dist/agents/redux/execution-system/thunks/execute-manual-instance.thunk.js +4 -3
- package/dist/agents/redux/execution-system/thunks/load-conversation.thunk.js +6 -0
- package/dist/agents/redux/execution-system/thunks/load-older-messages.thunk.js +12 -0
- package/dist/agents/redux/execution-system/thunks/process-stream.js +5 -3
- package/dist/agents/redux/execution-system/thunks/resolve-base-url.js +1 -1
- package/dist/agents/redux/execution-system/thunks/smart-execute.thunk.js +43 -0
- package/dist/agents/redux/execution-system/utils/continuation-body.d.ts +1 -0
- package/dist/agents/redux/execution-system/utils/continuation-body.js +2 -1
- package/dist/agents/redux/model-registry.d.ts +6 -4
- package/dist/agents/redux/model-registry.js +23 -5
- package/dist/agents/redux/proposed-directives/proposedDirectivesSlice.d.ts +1 -1
- package/dist/agents/redux/tools/tools.selectors.d.ts +1 -1
- package/dist/agents/resources/default-picker-items.d.ts +17 -0
- package/dist/agents/resources/default-picker-items.js +48 -0
- package/dist/agents/runtime/generation-job.js +4 -7
- package/dist/agents/runtime/get-model-capabilities.js +3 -3
- package/dist/agents/types/instance.types.d.ts +2 -1
- package/dist/agents/ui-first-tools/redux/agent-lists.selectors.d.ts +2 -2
- package/dist/cx-chat/components/SsrSidebarChats.js +1 -1
- package/dist/cx-chat/components/sidebar/SidebarUserFooter.js +1 -1
- package/dist/host/app-identity.d.ts +20 -0
- package/dist/host/app-identity.js +21 -0
- package/dist/host/bare-host-chrome.d.ts +14 -0
- package/dist/host/bare-host-chrome.js +44 -0
- package/dist/host/configure.d.ts +9 -1
- package/dist/host/configure.js +44 -8
- package/dist/host/content-ir-slots.d.ts +5 -1
- package/dist/host/content-ir-slots.js +5 -1
- package/dist/host/contract.d.ts +39 -2
- package/dist/host/db-types.d.ts +375 -10
- package/dist/host/defaults/navigation-hooks.d.ts +2 -0
- package/dist/host/defaults/navigation-hooks.js +7 -1
- package/dist/host/defaults/navigation.d.ts +4 -3
- package/dist/host/defaults/navigation.js +38 -7
- package/dist/host/defaults/org.d.ts +12 -4
- package/dist/host/defaults/org.js +39 -1
- package/dist/host/defaults/workspace-gate.d.ts +16 -0
- package/dist/host/defaults/workspace-gate.js +88 -0
- package/dist/host/diagnostics.d.ts +7 -2
- package/dist/host/diagnostics.js +6 -0
- package/dist/host/identity.js +2 -1
- package/dist/host/index.d.ts +5 -2
- package/dist/host/index.js +21 -1
- package/dist/host/no-database.d.ts +38 -0
- package/dist/host/no-database.js +107 -0
- package/dist/host/react.d.ts +1 -0
- package/dist/host/react.js +25 -2
- package/dist/host/registered-source.js +2 -2
- package/dist/host/source.d.ts +109 -0
- package/dist/host/source.js +86 -0
- package/dist/host/ui-slots.d.ts +8 -8
- package/dist/host/ui-slots.js +5 -3
- package/dist/mandates/useMandate.js +13 -0
- package/dist/public-chat/components/PublicMessageOptionsMenu.js +1 -1
- package/dist/store/create-chat-store.d.ts +4 -4
- package/dist/store/middlewares.d.ts +5 -5
- package/dist/store/slices.d.ts +1 -1
- package/dist/store/slices.js +4 -3
- package/dist/surfaces/redux/selectors.d.ts +2 -2
- package/dist/testing/turn-harness.d.ts +35 -0
- package/dist/testing/turn-harness.js +85 -0
- package/dist/tool-call-visualization/intelligence-places.js +1 -1
- package/dist/tool-call-visualization/redux/selectors.d.ts +1 -1
- package/dist/voice-agent/intelligence-places.js +6 -6
- package/package.json +9 -6
- package/dist/agents/model-registry/modelRegistrySlice.d.ts +0 -691
- package/dist/agents/model-registry/modelRegistrySlice.js +0 -574
- package/dist/host/model-class.d.ts +0 -33
- package/dist/host/model-class.js +0 -21
|
@@ -84,8 +84,8 @@ export declare const selectOwnVariableValues: (conversationId: string) => ((stat
|
|
|
84
84
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
85
85
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
86
86
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
87
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
88
87
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
88
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
89
89
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => Record<string, unknown>) & {
|
|
90
90
|
clearCache: () => void;
|
|
91
91
|
resultsCount: () => number;
|
|
@@ -150,8 +150,8 @@ export declare const selectOwnSubmittedFirstTurnValues: (conversationId: string)
|
|
|
150
150
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
151
151
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
152
152
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
153
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
154
153
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
154
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
155
155
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => Record<string, unknown>) & {
|
|
156
156
|
clearCache: () => void;
|
|
157
157
|
resultsCount: () => number;
|
|
@@ -223,8 +223,8 @@ export declare const selectHostSubmittedFirstTurnValues: (conversationId: string
|
|
|
223
223
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
224
224
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
225
225
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
226
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
227
226
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
227
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
228
228
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => Record<string, unknown>) & {
|
|
229
229
|
clearCache: () => void;
|
|
230
230
|
resultsCount: () => number;
|
|
@@ -300,8 +300,8 @@ export declare const selectResolvedVariables: (conversationId: string) => ((stat
|
|
|
300
300
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
301
301
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
302
302
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
303
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
304
303
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
304
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
305
305
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => Record<string, unknown>) & {
|
|
306
306
|
clearCache: () => void;
|
|
307
307
|
resultsCount: () => number;
|
|
@@ -377,8 +377,8 @@ export declare const selectVariablesForRequest: (conversationId: string) => ((st
|
|
|
377
377
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
378
378
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
379
379
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
380
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
381
380
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
381
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
382
382
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => Record<string, unknown>) & {
|
|
383
383
|
clearCache: () => void;
|
|
384
384
|
resultsCount: () => number;
|
|
@@ -446,8 +446,8 @@ export declare const selectMissingRequiredVariables: (conversationId: string) =>
|
|
|
446
446
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
447
447
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
448
448
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
449
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
450
449
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
450
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
451
451
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => string[]) & {
|
|
452
452
|
clearCache: () => void;
|
|
453
453
|
resultsCount: () => number;
|
|
@@ -515,8 +515,8 @@ export declare const selectVariableProvenance: (conversationId: string) => ((sta
|
|
|
515
515
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
516
516
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
517
517
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
518
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
519
518
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
519
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
520
520
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => Record<string, "default" | "none" | "scope" | "user">) & {
|
|
521
521
|
clearCache: () => void;
|
|
522
522
|
resultsCount: () => number;
|
|
@@ -270,8 +270,8 @@ export declare const selectMessageInterleavedContent: (conversationId: string, m
|
|
|
270
270
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
271
271
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
272
272
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
273
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
274
273
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
274
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
275
275
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => ContentSegment[]) & {
|
|
276
276
|
clearCache: () => void;
|
|
277
277
|
resultsCount: () => number;
|
|
@@ -45,8 +45,8 @@ export declare const selectUserRequestsForConversation: (conversationId: string)
|
|
|
45
45
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
46
46
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
47
47
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
48
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
49
48
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
49
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
50
50
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => CxUserRequestRecord[]) & {
|
|
51
51
|
clearCache: () => void;
|
|
52
52
|
resultsCount: () => number;
|
|
@@ -111,8 +111,8 @@ export declare const selectRequestsForUserRequest: (userRequestId: string) => ((
|
|
|
111
111
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
112
112
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
113
113
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
114
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
115
114
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
115
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
116
116
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => CxRequestRecord[]) & {
|
|
117
117
|
clearCache: () => void;
|
|
118
118
|
resultsCount: () => number;
|
|
@@ -176,8 +176,8 @@ export declare const selectToolCallsForUserRequest: (userRequestId: string) => (
|
|
|
176
176
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
177
177
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
178
178
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
179
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
180
179
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
180
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
181
181
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => CxToolCallRecord[]) & {
|
|
182
182
|
clearCache: () => void;
|
|
183
183
|
resultsCount: () => number;
|
|
@@ -253,8 +253,8 @@ export declare const selectToolCallsForMessage: (messageId: string) => ((state:
|
|
|
253
253
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
254
254
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
255
255
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
256
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
257
256
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
257
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
258
258
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => CxToolCallRecord[]) & {
|
|
259
259
|
clearCache: () => void;
|
|
260
260
|
resultsCount: () => number;
|
|
@@ -327,8 +327,8 @@ export declare const selectToolCallsForConversation: (conversationId: string) =>
|
|
|
327
327
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
328
328
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
329
329
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
330
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
331
330
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
331
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
332
332
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => CxToolCallRecord[]) & {
|
|
333
333
|
clearCache: () => void;
|
|
334
334
|
resultsCount: () => number;
|
|
@@ -401,8 +401,8 @@ export declare const selectCorrectedToolCallIds: (conversationId: string) => ((s
|
|
|
401
401
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
402
402
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
403
403
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
404
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
405
404
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
405
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
406
406
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => ReadonlySet<string>) & {
|
|
407
407
|
clearCache: () => void;
|
|
408
408
|
resultsCount: () => number;
|
|
@@ -457,8 +457,8 @@ export declare const selectCorrectedToolCallIds: (conversationId: string) => ((s
|
|
|
457
457
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
458
458
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
459
459
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
460
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
461
460
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
461
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
462
462
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => CxToolCallRecord[]) & {
|
|
463
463
|
clearCache: () => void;
|
|
464
464
|
resultsCount: () => number;
|
package/dist/agents/redux/execution-system/observational-memory/observational-memory.selectors.d.ts
CHANGED
|
@@ -65,8 +65,8 @@ export declare const selectRecentMemoryEvents: (conversationId: string | null |
|
|
|
65
65
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
66
66
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
67
67
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
68
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
69
68
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
69
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
70
70
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => MemoryEventEntry[]) & {
|
|
71
71
|
clearCache: () => void;
|
|
72
72
|
resultsCount: () => number;
|
|
@@ -112,8 +112,8 @@ export declare const selectLatestAnswerText: (conversationId: string) => ((state
|
|
|
112
112
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
113
113
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
114
114
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
115
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
116
115
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
116
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
117
117
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => string) & {
|
|
118
118
|
clearCache: () => void;
|
|
119
119
|
resultsCount: () => number;
|
|
@@ -185,8 +185,8 @@ export declare const selectLatestAccumulatedText: (conversationId: string) => ((
|
|
|
185
185
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
186
186
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
187
187
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
188
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
189
188
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
189
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
190
190
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => string) & {
|
|
191
191
|
clearCache: () => void;
|
|
192
192
|
resultsCount: () => number;
|
|
@@ -315,8 +315,8 @@ export declare const selectPendingToolCallsForInstance: (conversationId: string)
|
|
|
315
315
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
316
316
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
317
317
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
318
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
319
318
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
319
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
320
320
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => PendingToolCall[] | undefined) & {
|
|
321
321
|
clearCache: () => void;
|
|
322
322
|
resultsCount: () => number;
|
|
@@ -410,8 +410,8 @@ export declare function makeSelectAssembledRequest(conversationId: string): ((st
|
|
|
410
410
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
411
411
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
412
412
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
413
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
414
413
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
414
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
415
415
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => AssembledAgentStartRequest | null) & {
|
|
416
416
|
clearCache: () => void;
|
|
417
417
|
resultsCount: () => number;
|
|
@@ -533,8 +533,8 @@ export declare const selectInstanceSummary: (conversationId: string) => ((state:
|
|
|
533
533
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
534
534
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
535
535
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
536
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
537
536
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
537
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
538
538
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => {
|
|
539
539
|
conversationId: string;
|
|
540
540
|
agentId: string;
|
|
@@ -698,8 +698,8 @@ export declare const makeSelectInstanceDisplaySnapshot: () => ((state: {
|
|
|
698
698
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
699
699
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
700
700
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
701
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
702
701
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
702
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
703
703
|
} & import("../../../../store/root-state.js").ChatHostReadSlices, conversationId: string) => {
|
|
704
704
|
readonly displayMode: import("../../agent-shortcuts/types.js").ResultDisplayMode;
|
|
705
705
|
readonly isExpanded: boolean;
|
|
@@ -796,8 +796,8 @@ export declare const selectActiveInstancesByDisplayMode: ((state: {
|
|
|
796
796
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
797
797
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
798
798
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
799
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
800
799
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
800
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
801
801
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => Record<string, string[]> | undefined) & {
|
|
802
802
|
clearCache: () => void;
|
|
803
803
|
resultsCount: () => number;
|
|
@@ -865,8 +865,8 @@ export declare const selectOverlayInstancesByDisplayMode: ((state: {
|
|
|
865
865
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
866
866
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
867
867
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
868
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
869
868
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
869
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
870
870
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => Record<string, string[]> | undefined) & {
|
|
871
871
|
clearCache: () => void;
|
|
872
872
|
resultsCount: () => number;
|
|
@@ -933,8 +933,8 @@ export declare const selectActiveModalInstanceIds: ((state: {
|
|
|
933
933
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
934
934
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
935
935
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
936
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
937
936
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
937
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
938
938
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => string[] | undefined) & {
|
|
939
939
|
clearCache: () => void;
|
|
940
940
|
resultsCount: () => number;
|
|
@@ -1001,8 +1001,8 @@ export declare const selectActivePanelInstanceIds: ((state: {
|
|
|
1001
1001
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
1002
1002
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
1003
1003
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
1004
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
1005
1004
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
1005
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
1006
1006
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => string[] | undefined) & {
|
|
1007
1007
|
clearCache: () => void;
|
|
1008
1008
|
resultsCount: () => number;
|
|
@@ -1080,8 +1080,8 @@ export declare const selectLatestRenderBlocks: (conversationId: string) => ((sta
|
|
|
1080
1080
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
1081
1081
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
1082
1082
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
1083
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
1084
1083
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
1084
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
1085
1085
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => RenderBlockPayload[] | undefined) & {
|
|
1086
1086
|
clearCache: () => void;
|
|
1087
1087
|
resultsCount: () => number;
|
|
@@ -1153,8 +1153,8 @@ export declare const selectLatestActiveTools: (conversationId: string) => ((stat
|
|
|
1153
1153
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
1154
1154
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
1155
1155
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
1156
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
1157
1156
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
1157
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
1158
1158
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => ToolLifecycleEntry[] | undefined) & {
|
|
1159
1159
|
clearCache: () => void;
|
|
1160
1160
|
resultsCount: () => number;
|
|
@@ -1222,8 +1222,8 @@ export declare const selectLatestToolLifecycles: (conversationId: string) => ((s
|
|
|
1222
1222
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
1223
1223
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
1224
1224
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
1225
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
1226
1225
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
1226
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
1227
1227
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => ToolLifecycleEntry[] | undefined) & {
|
|
1228
1228
|
clearCache: () => void;
|
|
1229
1229
|
resultsCount: () => number;
|
|
@@ -1336,8 +1336,8 @@ export declare const makeSelectAvailableShortcuts: (context: ShortcutContext) =>
|
|
|
1336
1336
|
proposedDirectives: import("../../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
1337
1337
|
agentSettings: import("../../agent-settings/types.js").AgentSettingsState;
|
|
1338
1338
|
conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
1339
|
-
modelRegistry: import("../../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
1340
1339
|
chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
|
|
1340
|
+
hostConversations: import("../host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
1341
1341
|
} & import("../../../../store/root-state.js").ChatHostReadSlices) => import("../../agent-shortcuts/types.js").AgentShortcutRecord[]) & {
|
|
1342
1342
|
clearCache: () => void;
|
|
1343
1343
|
resultsCount: () => number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executionRejectionMeta
|
|
3
3
|
} from "./execution-rejection-meta.js";
|
|
4
|
+
import { attributionForSend } from "../../../../host/app-identity.js";
|
|
4
5
|
import { mintClientTempId } from "@ai-matrx/kit/ids";
|
|
5
6
|
import { createAsyncThunk } from "@reduxjs/toolkit";
|
|
6
7
|
import { toast } from "../../../../host/notify.js";
|
|
@@ -188,7 +189,7 @@ function assembleRequest(state, conversationId, opts) {
|
|
|
188
189
|
(id) => !!id
|
|
189
190
|
);
|
|
190
191
|
const active_scope_type_ids = selectActiveScopeTypeIds(state) ?? [];
|
|
191
|
-
const { sourceApp, sourceFeature } = instance;
|
|
192
|
+
const { sourceApp, sourceFeature } = attributionForSend(instance);
|
|
192
193
|
const block_mode = selectIsBlockMode(state);
|
|
193
194
|
const snapshot = selectIsSnapshot(state);
|
|
194
195
|
const memoryToggle = selectMemoryToggleRequest(conversationId)(state);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executionRejectionMeta
|
|
3
3
|
} from "./execution-rejection-meta.js";
|
|
4
|
+
import { attributionForSend } from "../../../../host/app-identity.js";
|
|
4
5
|
import { selectAgentById } from "../../agent-definition/selectors.js";
|
|
5
6
|
import { mintClientTempId } from "@ai-matrx/kit/ids";
|
|
6
7
|
import { createAsyncThunk } from "@reduxjs/toolkit";
|
|
@@ -99,7 +100,7 @@ import {
|
|
|
99
100
|
runOutputKindFromModalities,
|
|
100
101
|
runWaitTimeoutMessage
|
|
101
102
|
} from "../../../../host/server/run-wait.js";
|
|
102
|
-
import { selectModelById } from "
|
|
103
|
+
import { readModelRecords, selectModelById } from "../../model-registry.js";
|
|
103
104
|
import { parseCapabilities } from "../../../model-registry/parse.js";
|
|
104
105
|
import { payloadSafetyStore } from "@ai-matrx/kit/payload-safety";
|
|
105
106
|
import { netRequests } from "../../../../host/diagnostics.js";
|
|
@@ -263,7 +264,7 @@ async function assembleManualRequest(state, conversationId, opts) {
|
|
|
263
264
|
mcp: mcpServers
|
|
264
265
|
};
|
|
265
266
|
}
|
|
266
|
-
const { sourceApp, sourceFeature } = instance;
|
|
267
|
+
const { sourceApp, sourceFeature } = attributionForSend(instance);
|
|
267
268
|
const isEphemeral = instance.isEphemeral === true;
|
|
268
269
|
const organization_id = requireExecutionOrganizationId(state, conversationId);
|
|
269
270
|
const request = {
|
|
@@ -568,7 +569,7 @@ const executeManualInstance = createAsyncThunk(
|
|
|
568
569
|
} catch {
|
|
569
570
|
recoveryId = null;
|
|
570
571
|
}
|
|
571
|
-
const runModel = payload.ai_model_id ? selectModelById(
|
|
572
|
+
const runModel = payload.ai_model_id ? selectModelById(readModelRecords(), payload.ai_model_id) : void 0;
|
|
572
573
|
runOutputKind = runModel?.capabilities ? runOutputKindFromModalities(
|
|
573
574
|
parseCapabilities(runModel.capabilities, {
|
|
574
575
|
modelId: runModel.id,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { selectHostConversation } from "../host-conversations/host-conversations.selectors.js";
|
|
2
|
+
import { loadHostHistory } from "../host-conversations/host-conversation.thunks.js";
|
|
1
3
|
import { selectAgentById } from "../../agent-definition/selectors.js";
|
|
2
4
|
import { createAsyncThunk } from "@reduxjs/toolkit";
|
|
3
5
|
import { supabase } from "../../../../host/db.js";
|
|
@@ -84,6 +86,10 @@ const loadConversation = createAsyncThunk(
|
|
|
84
86
|
displayOverrides,
|
|
85
87
|
agentBehindApp = false
|
|
86
88
|
}, { dispatch, getState }) => {
|
|
89
|
+
if (selectHostConversation(conversationId)(getState())) {
|
|
90
|
+
await loadHostHistory(dispatch, getState, conversationId);
|
|
91
|
+
return { conversationId };
|
|
92
|
+
}
|
|
87
93
|
let authedUserId = null;
|
|
88
94
|
try {
|
|
89
95
|
const { data: authData } = await getClaimsUser(supabase);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { selectHostConversation } from "../host-conversations/host-conversations.selectors.js";
|
|
2
|
+
import { loadHostHistory } from "../host-conversations/host-conversation.thunks.js";
|
|
1
3
|
import { createAsyncThunk } from "@reduxjs/toolkit";
|
|
2
4
|
import { prependMessages, setOlderLoading } from "../messages/messages.slice.js";
|
|
3
5
|
import { mergeToolCalls } from "../observability/observability.slice.js";
|
|
@@ -10,6 +12,16 @@ import {
|
|
|
10
12
|
const loadOlderMessages = createAsyncThunk(
|
|
11
13
|
"conversations/loadOlder",
|
|
12
14
|
async ({ conversationId, pageSize = 50 }, { dispatch, getState, rejectWithValue }) => {
|
|
15
|
+
if (selectHostConversation(conversationId)(getState())) {
|
|
16
|
+
const before = getState().messages.byConversationId[conversationId]?.orderedIds.length ?? 0;
|
|
17
|
+
await loadHostHistory(dispatch, getState, conversationId, { older: true });
|
|
18
|
+
const after = getState().messages.byConversationId[conversationId];
|
|
19
|
+
return {
|
|
20
|
+
conversationId,
|
|
21
|
+
prependedCount: Math.max(0, (after?.orderedIds.length ?? 0) - before),
|
|
22
|
+
hasMoreOlder: after?.hasMoreOlder ?? false
|
|
23
|
+
};
|
|
24
|
+
}
|
|
13
25
|
const entry = getState().messages.byConversationId[conversationId];
|
|
14
26
|
if (!entry) {
|
|
15
27
|
return rejectWithValue({ reason: "no-entry" });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { selectHostConversation } from "../host-conversations/host-conversations.selectors.js";
|
|
1
2
|
import {
|
|
2
3
|
applyServerUsageState,
|
|
3
4
|
applyUsageRefusal,
|
|
@@ -2340,8 +2341,9 @@ async function processStream({
|
|
|
2340
2341
|
}
|
|
2341
2342
|
} else if (assistantBlocks.length > 0) {
|
|
2342
2343
|
const conv = finalState.conversations.byConversationId[conversationId];
|
|
2343
|
-
|
|
2344
|
-
|
|
2344
|
+
const clientMintsIds = conv?.isEphemeral === true || selectHostConversation(conversationId)(finalState) !== null;
|
|
2345
|
+
(clientMintsIds ? console.info : console.error)(
|
|
2346
|
+
`[stream:${requestId.slice(0, 8)}] no assistant reservation arrived but ${assistantBlocks.length} content block(s) were produced \u2014 committing to a client-temp message to avoid transcript loss. DIAGNOSIS isEphemeral=${conv?.isEphemeral ?? false} apiEndpointMode=${conv?.apiEndpointMode ?? "agent"} userRequestReserved=${reservedUserRequestId !== null} toolReservations=${toolCallIdByProviderCallId.size} streamError=${!!finalErrorMessage}. ` + (clientMintsIds ? `Expected: the client mints this conversation's message ids (incognito, or a host-owned source), so no reservation arrives.` : `isEphemeral=false: the server should have reserved a cx_message(role=assistant) \u2014 a backend reservation gap (userRequestReserved alone proves nothing; the preamble announces it even for store:false).`)
|
|
2345
2347
|
);
|
|
2346
2348
|
const tempId = mintClientTempId("assistant", requestId);
|
|
2347
2349
|
const existingById = finalState.messages.byConversationId[conversationId]?.byId ?? {};
|
|
@@ -2464,7 +2466,7 @@ async function processStream({
|
|
|
2464
2466
|
if (!textProtected && !hasUnsentResources) {
|
|
2465
2467
|
dispatch(resetUserVariableValues(conversationId));
|
|
2466
2468
|
}
|
|
2467
|
-
if (finalErrorMessage === null && materializeTargets.length > 0) {
|
|
2469
|
+
if (finalErrorMessage === null && materializeTargets.length > 0 && selectHostConversation(conversationId)(getState()) === null) {
|
|
2468
2470
|
void Promise.all(
|
|
2469
2471
|
materializeTargets.map(
|
|
2470
2472
|
(target) => materializeMessageArtifacts({
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
supportsLocalAgentExecution
|
|
15
15
|
} from "../../../../host/server/local-engine.js";
|
|
16
16
|
import { selectOrganizationId } from "../../../../host/org.js";
|
|
17
|
-
const EC2_SANDBOX_SERVER_URL = process.env.NEXT_PUBLIC_EC2_SANDBOX_SERVER_URL || "";
|
|
17
|
+
const EC2_SANDBOX_SERVER_URL = typeof process !== "undefined" && process.env.NEXT_PUBLIC_EC2_SANDBOX_SERVER_URL || "";
|
|
18
18
|
function dedicatedEc2ServerForConversation(state, conversationId) {
|
|
19
19
|
if (selectActiveServer(state) !== "production") return null;
|
|
20
20
|
const ref = resolveAgentSandboxRef(state, conversationId);
|
|
@@ -38,6 +38,9 @@ import {
|
|
|
38
38
|
} from "./settle-after-stop.thunk.js";
|
|
39
39
|
import { cancelAgentRunRequest } from "../../../../host/server/matrx-transport.js";
|
|
40
40
|
import { toast } from "../../../../host/notify.js";
|
|
41
|
+
import { selectHostConversation } from "../host-conversations/host-conversations.selectors.js";
|
|
42
|
+
import { sendToHost, stopHostTurn } from "../host-conversations/host-conversation.thunks.js";
|
|
43
|
+
import { isHostSendRefused } from "../../../../host/source.js";
|
|
41
44
|
import { refreshSurfaceScope } from "./refresh-surface-scope.thunk.js";
|
|
42
45
|
import {
|
|
43
46
|
ensureExecutionOrganization,
|
|
@@ -173,6 +176,36 @@ const smartExecute = createAsyncThunk(
|
|
|
173
176
|
}
|
|
174
177
|
}
|
|
175
178
|
let submission = handed ?? captureSubmission(entryState, conversationId);
|
|
179
|
+
const hosted = selectHostConversation(conversationId)(entryState);
|
|
180
|
+
if (hosted) {
|
|
181
|
+
if (isEmptySubmission(submission)) return;
|
|
182
|
+
if (!hosted.canSend) {
|
|
183
|
+
toast.info("This chat is read-only here");
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
if (hosted.held) {
|
|
187
|
+
toast.info("Not sent yet", { description: hosted.held });
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const busy = selectIsExecuting(conversationId)(entryState);
|
|
191
|
+
if (busy && hosted.whileBusy === "refuse") {
|
|
192
|
+
toast.info("Wait for the answer to finish", {
|
|
193
|
+
description: "This chat takes the next message once the current one ends."
|
|
194
|
+
});
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const mode = busy ? hosted.whileBusy === "steer" ? "steer" : "queue" : "send";
|
|
198
|
+
if (!handed) detachFromComposer(dispatch, getState, conversationId, submission);
|
|
199
|
+
try {
|
|
200
|
+
await sendToHost(dispatch, getState, conversationId, submission.text, mode);
|
|
201
|
+
} catch (error) {
|
|
202
|
+
returnToComposer(dispatch, getState, conversationId, submission);
|
|
203
|
+
toast.error("Message not sent", {
|
|
204
|
+
description: isHostSendRefused(error) ? error.message : error instanceof Error ? error.message : String(error)
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
176
209
|
if (isSendInFlight(conversationId)) {
|
|
177
210
|
if (!handed) {
|
|
178
211
|
if (isEmptySubmission(submission)) return;
|
|
@@ -418,6 +451,11 @@ const cancelExecution = createAsyncThunk(
|
|
|
418
451
|
"instances/cancelExecution",
|
|
419
452
|
async (conversationId, { getState, dispatch }) => {
|
|
420
453
|
const state = getState();
|
|
454
|
+
if (selectHostConversation(conversationId)(state)) {
|
|
455
|
+
await stopHostTurn(conversationId);
|
|
456
|
+
dispatch(resetSubmissionPhase(conversationId));
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
421
459
|
const serverRequestId = latestServerRequestId(state, conversationId);
|
|
422
460
|
abortConversation(conversationId);
|
|
423
461
|
if (serverRequestId) {
|
|
@@ -465,6 +503,11 @@ const interruptAndSend = createAsyncThunk(
|
|
|
465
503
|
"instances/interruptAndSend",
|
|
466
504
|
async ({ conversationId, surfaceKey }, { getState, dispatch }) => {
|
|
467
505
|
const initial = getState();
|
|
506
|
+
if (selectHostConversation(conversationId)(initial)) {
|
|
507
|
+
await stopHostTurn(conversationId);
|
|
508
|
+
await dispatch(smartExecute({ conversationId, surfaceKey }));
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
468
511
|
if (!selectIsExecuting(conversationId)(initial)) {
|
|
469
512
|
await dispatch(smartExecute({ conversationId, surfaceKey }));
|
|
470
513
|
return;
|
|
@@ -56,6 +56,7 @@ export declare const CONTINUATION_FIELD_ROUTING: {
|
|
|
56
56
|
readonly max_iterations: "not assembled by this thunk";
|
|
57
57
|
readonly max_retries_per_iteration: "not assembled by this thunk";
|
|
58
58
|
readonly responder_agent_id: "coding-mirror replies only; not assembled by this thunk";
|
|
59
|
+
readonly host_turn: "host-owned turns only; not assembled by this thunk";
|
|
59
60
|
};
|
|
60
61
|
export interface ContinuationBodyOptions {
|
|
61
62
|
retry: boolean;
|
|
@@ -49,7 +49,8 @@ const CONTINUATION_FIELD_ROUTING = {
|
|
|
49
49
|
allow_context_create: "not assembled by this thunk",
|
|
50
50
|
max_iterations: "not assembled by this thunk",
|
|
51
51
|
max_retries_per_iteration: "not assembled by this thunk",
|
|
52
|
-
responder_agent_id: "coding-mirror replies only; not assembled by this thunk"
|
|
52
|
+
responder_agent_id: "coding-mirror replies only; not assembled by this thunk",
|
|
53
|
+
host_turn: "host-owned turns only; not assembled by this thunk"
|
|
53
54
|
};
|
|
54
55
|
const EMPTY_IS_MEANINGFUL = /* @__PURE__ */ new Set(["tools", "output_kinds"]);
|
|
55
56
|
const FALSE_IS_MEANINGFUL = /* @__PURE__ */ new Set(["memory", "tools_replace", "context_withheld"]);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The ONE door from package code to
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The ONE door from package code to model records (agent core B3). Chat's `modelRegistry` slice is
|
|
3
|
+
* retired; records live in the core model catalog (`@ai-matrx/agents/models`), bound once per page
|
|
4
|
+
* by `agents/identity/model-catalog.ts`. Selectors take the records state (`readModelRecords()` in
|
|
5
|
+
* thunks, `useModelRecords(select)` in components).
|
|
5
6
|
*/
|
|
6
|
-
export {
|
|
7
|
+
export { classConfigKey, selectModelById, selectModelLabelById, selectModelLabelWithClass, selectModelFullyLoaded, selectModelDetailError, selectAllModels, selectModelClassConfig, type ModelRecord as AIModelRecord, type ModelRecord as AIModel, type ModelRecordsState, } from "@ai-matrx/agents/models";
|
|
8
|
+
export { getModelCatalog, getModelRecords, readModelRecords, useModelRecords, useModelRecord, useModelLabel, useModelLabelWithClass } from "../identity/model-catalog.js";
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
|
-
default as default2,
|
|
3
2
|
classConfigKey,
|
|
4
|
-
selectModelById
|
|
5
|
-
|
|
3
|
+
selectModelById,
|
|
4
|
+
selectModelLabelById,
|
|
5
|
+
selectModelLabelWithClass,
|
|
6
|
+
selectModelFullyLoaded,
|
|
7
|
+
selectModelDetailError,
|
|
8
|
+
selectAllModels,
|
|
9
|
+
selectModelClassConfig
|
|
10
|
+
} from "@ai-matrx/agents/models";
|
|
11
|
+
import { getModelCatalog, getModelRecords, readModelRecords, useModelRecords, useModelRecord, useModelLabel, useModelLabelWithClass } from "../identity/model-catalog.js";
|
|
6
12
|
export {
|
|
7
13
|
classConfigKey,
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
getModelCatalog,
|
|
15
|
+
getModelRecords,
|
|
16
|
+
readModelRecords,
|
|
17
|
+
selectAllModels,
|
|
18
|
+
selectModelById,
|
|
19
|
+
selectModelClassConfig,
|
|
20
|
+
selectModelDetailError,
|
|
21
|
+
selectModelFullyLoaded,
|
|
22
|
+
selectModelLabelById,
|
|
23
|
+
selectModelLabelWithClass,
|
|
24
|
+
useModelLabel,
|
|
25
|
+
useModelLabelWithClass,
|
|
26
|
+
useModelRecord,
|
|
27
|
+
useModelRecords
|
|
10
28
|
};
|
|
@@ -109,8 +109,8 @@ export declare const selectProposedDirectives: (conversationId: string) => ((sta
|
|
|
109
109
|
proposedDirectives: ProposedDirectivesState;
|
|
110
110
|
agentSettings: import("../agent-settings/types.js").AgentSettingsState;
|
|
111
111
|
conversationAttachments: import("../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
112
|
-
modelRegistry: import("../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
113
112
|
chatHost: import("../../../store/chat-host.slice.js").ChatHostState;
|
|
113
|
+
hostConversations: import("../execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
114
114
|
} & import("../../../store/root-state.js").ChatHostReadSlices) => ProposedDirective[]) & {
|
|
115
115
|
clearCache: () => void;
|
|
116
116
|
resultsCount: () => number;
|
|
@@ -123,8 +123,8 @@ export declare const makeSelectToolById: () => ((state: {
|
|
|
123
123
|
proposedDirectives: import("../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
124
124
|
agentSettings: import("../agent-settings/types.js").AgentSettingsState;
|
|
125
125
|
conversationAttachments: import("../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
126
|
-
modelRegistry: import("../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
127
126
|
chatHost: import("../../../store/chat-host.slice.js").ChatHostState;
|
|
127
|
+
hostConversations: import("../execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
|
|
128
128
|
} & import("../../../store/root-state.js").ChatHostReadSlices, toolId: string) => {
|
|
129
129
|
admin_only: boolean;
|
|
130
130
|
annotations: import("../../../host/db-types.js").Json | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The resource picker's item list as a bare host sees it: every view id with its label and icon.
|
|
3
|
+
* matrx-frontend registers its own list (brand icons, tints, capability gates) through the
|
|
4
|
+
* `flattenResourcePickerItems` slot; a host that registers none gets these, so the composer's
|
|
5
|
+
* Tools / Connections / Skills doors and the workspace rows have a label instead of throwing.
|
|
6
|
+
*/
|
|
7
|
+
import { type LucideIcon } from "lucide-react";
|
|
8
|
+
import type { ResourcePickerViewId } from "./picker-view-id.js";
|
|
9
|
+
export interface DefaultResourcePickerItem {
|
|
10
|
+
id: Exclude<ResourcePickerViewId, null>;
|
|
11
|
+
label: string;
|
|
12
|
+
icon: LucideIcon;
|
|
13
|
+
iconClassName: string;
|
|
14
|
+
requiresCapability: null | "supportsImageUrls" | "supportsFileUrls" | "supportsYoutubeVideos" | "supportsAudio";
|
|
15
|
+
}
|
|
16
|
+
export declare const DEFAULT_RESOURCE_PICKER_ITEMS: readonly DefaultResourcePickerItem[];
|
|
17
|
+
export declare function defaultResourcePickerItems(): DefaultResourcePickerItem[];
|