@ai-matrx/chat 0.4.0 → 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.
Files changed (102) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/agents/addressing/useAgentHref.js +4 -1
  3. package/dist/agents/api/submit-tool-results.js +11 -1
  4. package/dist/agents/components/chat/useCanvasScopedToConversation.js +1 -1
  5. package/dist/agents/components/messages-display/AgentConversationDisplay.js +4 -1
  6. package/dist/agents/components/run-controls/panels/shared.d.ts +1 -0
  7. package/dist/agents/components/shared/AgentConversationColumn.js +3 -2
  8. package/dist/agents/components/working-document/workingDocumentSurface.d.ts +1 -1
  9. package/dist/agents/identity/model-catalog.js +5 -3
  10. package/dist/agents/redux/agent-definition/selectors.d.ts +237 -0
  11. package/dist/agents/redux/agent-settings/selectors.d.ts +12 -0
  12. package/dist/agents/redux/agent-shortcut-categories/selectors.d.ts +50 -0
  13. package/dist/agents/redux/agent-shortcuts/selectors.d.ts +147 -0
  14. package/dist/agents/redux/conversation-history/selectors.d.ts +16 -0
  15. package/dist/agents/redux/conversation-list/conversation-list.selectors.d.ts +2 -0
  16. package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.d.ts +54 -0
  17. package/dist/agents/redux/execution-system/context-state/context-state.selectors.d.ts +14 -0
  18. package/dist/agents/redux/execution-system/conversations/conversations.selectors.d.ts +5 -0
  19. package/dist/agents/redux/execution-system/host-conversations/conversation-abilities.d.ts +12 -0
  20. package/dist/agents/redux/execution-system/host-conversations/conversation-abilities.js +25 -0
  21. package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.d.ts +50 -0
  22. package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.js +367 -0
  23. package/dist/agents/redux/execution-system/host-conversations/host-conversations.selectors.d.ts +28 -0
  24. package/dist/agents/redux/execution-system/host-conversations/host-conversations.selectors.js +41 -0
  25. package/dist/agents/redux/execution-system/host-conversations/host-conversations.slice.d.ts +43 -0
  26. package/dist/agents/redux/execution-system/host-conversations/host-conversations.slice.js +38 -0
  27. package/dist/agents/redux/execution-system/host-conversations/source-registry.d.ts +9 -0
  28. package/dist/agents/redux/execution-system/host-conversations/source-registry.js +15 -0
  29. package/dist/agents/redux/execution-system/host-conversations/useHostConversation.d.ts +4 -0
  30. package/dist/agents/redux/execution-system/host-conversations/useHostConversation.js +24 -0
  31. package/dist/agents/redux/execution-system/instance-context/instance-context.selectors.d.ts +3 -0
  32. package/dist/agents/redux/execution-system/instance-resources/default-remark-durability.d.ts +22 -0
  33. package/dist/agents/redux/execution-system/instance-resources/default-remark-durability.js +164 -0
  34. package/dist/agents/redux/execution-system/instance-resources/instance-resources.selectors.d.ts +8 -0
  35. package/dist/agents/redux/execution-system/instance-ui-state/instance-ui-state.selectors.d.ts +5 -0
  36. package/dist/agents/redux/execution-system/instance-user-input/composer-draft-store.js +20 -0
  37. package/dist/agents/redux/execution-system/instance-user-input/useComposerDraftRestore.js +2 -1
  38. package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.selectors.d.ts +7 -0
  39. package/dist/agents/redux/execution-system/messages/messages.selectors.d.ts +1 -0
  40. package/dist/agents/redux/execution-system/observability/observability.selectors.d.ts +7 -0
  41. package/dist/agents/redux/execution-system/observational-memory/observational-memory.selectors.d.ts +1 -0
  42. package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +14 -0
  43. package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +2 -1
  44. package/dist/agents/redux/execution-system/thunks/execute-manual-instance.thunk.js +2 -1
  45. package/dist/agents/redux/execution-system/thunks/load-conversation.thunk.js +6 -0
  46. package/dist/agents/redux/execution-system/thunks/load-older-messages.thunk.js +12 -0
  47. package/dist/agents/redux/execution-system/thunks/process-stream.js +5 -3
  48. package/dist/agents/redux/execution-system/thunks/resolve-base-url.js +1 -1
  49. package/dist/agents/redux/execution-system/thunks/smart-execute.thunk.js +43 -0
  50. package/dist/agents/redux/execution-system/utils/continuation-body.d.ts +1 -0
  51. package/dist/agents/redux/execution-system/utils/continuation-body.js +2 -1
  52. package/dist/agents/redux/proposed-directives/proposedDirectivesSlice.d.ts +1 -0
  53. package/dist/agents/redux/tools/tools.selectors.d.ts +1 -0
  54. package/dist/agents/resources/default-picker-items.d.ts +17 -0
  55. package/dist/agents/resources/default-picker-items.js +48 -0
  56. package/dist/agents/types/instance.types.d.ts +2 -1
  57. package/dist/agents/ui-first-tools/redux/agent-lists.selectors.d.ts +2 -0
  58. package/dist/cx-chat/components/SsrSidebarChats.js +1 -1
  59. package/dist/cx-chat/components/sidebar/SidebarUserFooter.js +1 -1
  60. package/dist/host/app-identity.d.ts +20 -0
  61. package/dist/host/app-identity.js +21 -0
  62. package/dist/host/bare-host-chrome.d.ts +14 -0
  63. package/dist/host/bare-host-chrome.js +44 -0
  64. package/dist/host/configure.d.ts +9 -1
  65. package/dist/host/configure.js +44 -8
  66. package/dist/host/content-ir-slots.d.ts +5 -1
  67. package/dist/host/content-ir-slots.js +5 -1
  68. package/dist/host/contract.d.ts +39 -2
  69. package/dist/host/db-types.d.ts +99 -1
  70. package/dist/host/defaults/navigation-hooks.d.ts +2 -0
  71. package/dist/host/defaults/navigation-hooks.js +7 -1
  72. package/dist/host/defaults/navigation.d.ts +4 -3
  73. package/dist/host/defaults/navigation.js +38 -7
  74. package/dist/host/defaults/org.d.ts +12 -4
  75. package/dist/host/defaults/org.js +39 -1
  76. package/dist/host/defaults/workspace-gate.d.ts +16 -0
  77. package/dist/host/defaults/workspace-gate.js +88 -0
  78. package/dist/host/diagnostics.d.ts +7 -2
  79. package/dist/host/diagnostics.js +6 -0
  80. package/dist/host/identity.js +2 -1
  81. package/dist/host/index.d.ts +5 -2
  82. package/dist/host/index.js +21 -1
  83. package/dist/host/no-database.d.ts +38 -0
  84. package/dist/host/no-database.js +107 -0
  85. package/dist/host/react.d.ts +1 -0
  86. package/dist/host/react.js +25 -2
  87. package/dist/host/registered-source.js +2 -2
  88. package/dist/host/source.d.ts +109 -0
  89. package/dist/host/source.js +86 -0
  90. package/dist/host/ui-slots.d.ts +8 -8
  91. package/dist/host/ui-slots.js +5 -3
  92. package/dist/mandates/useMandate.js +13 -0
  93. package/dist/public-chat/components/PublicMessageOptionsMenu.js +1 -1
  94. package/dist/store/create-chat-store.d.ts +4 -2
  95. package/dist/store/middlewares.d.ts +5 -0
  96. package/dist/store/slices.d.ts +1 -0
  97. package/dist/store/slices.js +4 -1
  98. package/dist/surfaces/redux/selectors.d.ts +2 -0
  99. package/dist/testing/turn-harness.d.ts +35 -0
  100. package/dist/testing/turn-harness.js +85 -0
  101. package/dist/tool-call-visualization/redux/selectors.d.ts +1 -0
  102. package/package.json +7 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @ai-matrx/chat
2
2
 
3
+ ## 0.4.2
4
+ ### P29a round 2 (a bare host is a real app)
5
+
6
+ - **Front door = the real screens.** `FRONT_DOOR` now names `agents/components/chat/ChatNewClient` and
7
+ `ChatConversationRoom`; the `cx-chat` demo screens are out. The default navigation port is
8
+ CLIENT-SIDE (history API + a notify event; same-origin `Link` clicks move the history, no page load);
9
+ `@ai-matrx/chat/host/react` exports `useRouter`/`usePathname`/`useSearchParams`/`Link` over the host's
10
+ navigation port. `check:front-door:canary` scans the canary.
11
+ - **A host names itself.** `ChatHost.app = { sourceApp, sourceFeature? }` stamps `source_app` /
12
+ `source_feature` on every send; absent = the neutral `chat` producer (said once), never matrx-frontend.
13
+ matrx-frontend sets `app: { sourceApp: "matrx-frontend" }` explicitly. Both names must be registered
14
+ with the server.
15
+ - **The model picker is the agents package's own** (`@ai-matrx/agents/models/react`); `ModelListDropdown` is
16
+ no longer a slot. A bare host's `BareHostChrome` mounts the catalog + favorites over `host.db`.
17
+ - **Unsent chips persist server-side in a bare host** (`default-remark-durability`: `block_state_set` /
18
+ `block_state_list_staged` / `block_state_dismiss_chip`), registered by `<ChatProvider>` for a private store.
19
+ - **Stand-ins report quietly.** An unregistered optional slot is one `console.info` line, once; only a
20
+ registration the package cannot run without (`SLOT_CANNOT_RUN`) warns and reaches diagnostics.
21
+ A bare host also gets the associations service (working document + scratchpad restore) from its own store.
22
+
23
+ ## 0.4.1
24
+
25
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
26
+ `git diff npm/chat/v0.4.0..npm/chat/v0.4.1 -- apps/shared/chat`).
27
+ No source changes intended and no consumer action required.
28
+
3
29
  ## 0.4.0
4
30
 
5
31
  Agent core B3 + the B2 tail — every piece of agent and model state has one holder:
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { useContext, useEffect, useState, useSyncExternalStore } from "react";
3
3
  import { ReactReduxContext } from "react-redux";
4
+ import { ChatStoreContext } from "../../store/context.js";
4
5
  import {
5
6
  agentDoorFor,
6
7
  agentGoHref,
@@ -15,7 +16,9 @@ import { selectIsAdmin } from "../../host/identity.js";
15
16
  const noSubscribe = () => () => {
16
17
  };
17
18
  function useAgentAddressViewer() {
18
- const store = useContext(ReactReduxContext)?.store;
19
+ const chatStore = useContext(ChatStoreContext)?.store;
20
+ const hostStore = useContext(ReactReduxContext)?.store;
21
+ const store = chatStore ?? hostStore;
19
22
  const read = () => store ? selectIsAdmin(store.getState()) : void 0;
20
23
  const isAdmin = useSyncExternalStore(
21
24
  store ? store.subscribe : noSubscribe,
@@ -1,3 +1,5 @@
1
+ import { selectHostConversation } from "../redux/execution-system/host-conversations/host-conversations.selectors.js";
2
+ import { answerHostAsk } from "../redux/execution-system/host-conversations/host-conversation.thunks.js";
1
3
  import { callApi } from "../../host/server/call-api.js";
2
4
  import { toast } from "../../host/notify.js";
3
5
  import { formatDurationMs } from "@ai-matrx/kit/format";
@@ -232,7 +234,7 @@ async function failLifecycleForCalls(dispatch, getState, conversationId, results
232
234
  }
233
235
  }
234
236
  const submitToolResult = (pending) => {
235
- return (dispatch) => {
237
+ return (dispatch, getState) => {
236
238
  dispatch(settleClientToolCall(pending));
237
239
  if (!pending.is_error && nonErrorOutputReadsAsFailure(pending.output)) {
238
240
  console.error(
@@ -240,6 +242,14 @@ const submitToolResult = (pending) => {
240
242
  );
241
243
  }
242
244
  const { conversationId, ...rest } = pending;
245
+ if (selectHostConversation(conversationId)(getState())) {
246
+ void answerHostAsk(conversationId, rest.call_id, rest).catch((error) => {
247
+ toast.error("Your answer did not reach this chat", {
248
+ description: error instanceof Error ? error.message : String(error)
249
+ });
250
+ });
251
+ return;
252
+ }
243
253
  const bucket = queue.get(conversationId) ?? [];
244
254
  bucket.push(rest);
245
255
  queue.set(conversationId, bucket);
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { useEffect } from "react";
3
- import { useStore } from "react-redux";
3
+ import { useAppStore as useStore } from "../../../store/hooks.js";
4
4
  import { useOptionalCanvas } from "@ai-matrx/canvas/react";
5
5
  import { selectCanvasIsHydrated } from "@ai-matrx/canvas";
6
6
  function canvasItemConversation(item, conversationOfMessage) {
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useConversationAbilities } from "../../redux/execution-system/host-conversations/conversation-abilities.js";
3
4
  import { useEffect, useMemo, useRef, useState } from "react";
4
5
  import { useAppDispatch, useAppSelector } from "../../../store/hooks.js";
5
6
  import { loadConversation } from "../../redux/execution-system/thunks/load-conversation.thunk.js";
@@ -101,9 +102,11 @@ function AgentConversationDisplay({
101
102
  () => setFindOpen(true),
102
103
  displayGroups.length > 0
103
104
  );
105
+ const { database: canPin } = useConversationAbilities();
104
106
  useEffect(() => {
107
+ if (!canPin) return;
105
108
  void hydratePinnedMessages(messages.map((m) => m.id));
106
- }, [messages]);
109
+ }, [messages, canPin]);
107
110
  const [findHistory, setFindHistory] = useState({
108
111
  state: "loading",
109
112
  loaded: 0
@@ -65,6 +65,7 @@ export declare function makeSelectConversationRequests(conversationId: string):
65
65
  agentSettings: import("../../../redux/agent-settings/types.js").AgentSettingsState;
66
66
  conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
67
67
  chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
68
+ hostConversations: import("../../../redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
68
69
  } & import("../../../../store/root-state.js").ChatHostReadSlices) => ActiveRequest[]) & {
69
70
  clearCache: () => void;
70
71
  resultsCount: () => number;
@@ -26,6 +26,7 @@ import {
26
26
  } from "../../redux/execution-system/messages/messages.slice.js";
27
27
  import { selectStreamPhase } from "../../redux/execution-system/selectors/aggregate.selectors.js";
28
28
  import { selectShowCreatorPanel } from "../../../host/prefs.js";
29
+ import { ConversationAbilitiesProvider } from "../../redux/execution-system/host-conversations/conversation-abilities.js";
29
30
  import {
30
31
  TranscriptAudienceProvider
31
32
  } from "./transcript-audience.js";
@@ -202,7 +203,7 @@ function AgentConversationColumn({
202
203
  }, []);
203
204
  const edgeScroll = constrainWidth && edgeToEdgeScroll;
204
205
  const centerWrap = edgeScroll ? cn(ASSISTANT_MESSAGE_COLUMN_CLASS, ASSISTANT_MESSAGE_COLUMN_INSET_CLASS) : "contents";
205
- return /* @__PURE__ */ jsx(TranscriptAudienceProvider, { audience, children: /* @__PURE__ */ jsxs(
206
+ return /* @__PURE__ */ jsx(ConversationAbilitiesProvider, { conversationId: displayId, children: /* @__PURE__ */ jsx(TranscriptAudienceProvider, { audience, children: /* @__PURE__ */ jsxs(
206
207
  "div",
207
208
  {
208
209
  className: cn(
@@ -347,7 +348,7 @@ function AgentConversationColumn({
347
348
  )
348
349
  ]
349
350
  }
350
- ) });
351
+ ) }) });
351
352
  }
352
353
  export {
353
354
  AgentConversationColumn
@@ -20,7 +20,7 @@ export declare function surfaceNameForKind(kind: WorkingDocumentKind): string;
20
20
  export declare function sourceFeatureForKind(kind: WorkingDocumentKind): SourceFeature;
21
21
  /** `UnifiedAgentContextMenu` prop bundle for a document kind. */
22
22
  export declare function workingDocumentContextMenuProps(kind: WorkingDocumentKind): {
23
- sourceFeature: "action_request_continuation" | "action_request_credential" | "action_request_one_time_code" | "action_request_park" | "action_request_resolve" | "admin" | "agent" | "agent-app" | "agent-builder" | "agent-comparison" | "agent-factory" | "agent-generator" | "agent-runner" | "agent-service" | "agent-studio" | "agent_blocks" | "agent_call" | "agent_factory.copy_probe" | "agent_factory.tool_probe" | "agent_flow_v1" | "agent_foundry_v1" | "agent_run" | "agent_structure_builder" | "agent_tool" | "agent_usage_sync" | "agents-other" | "ai-results" | "ai_judge" | "analysis-studio" | "auto_ingest" | "auto_ingest_ner" | "background_agent" | "billing" | "browser_handoff_delegate" | "browser_handoff_resolve" | "browser_session_health" | "builtin_agent" | "builtin_categorize" | "canvas" | "chat" | "claude-code" | "clean_pdf_extracted_content" | "client-unmapped" | "cloud_browser.local_login_learning" | "cms" | "code-editor" | "codex" | "coding_session_bridge.backfill" | "coding_session_native" | "coding_session_reply" | "communications.sms" | "conductor" | "content-extractor" | "content_plan_acceptance" | "content_plan_cms_fill" | "content_plan_cms_fill_preview" | "content_plan_deepen" | "content_plan_generate" | "content_processing" | "content_processing.research_landing" | "content_processing.transcript_landing" | "content_processing_upload_hook" | "context-parity" | "context_compare_answer" | "context_follow_listener" | "context_summary" | "conversation" | "conversation_context" | "conversation_crash_recovery" | "conversation_fork" | "conversation_resume" | "coverage" | "crawl_run" | "crm" | "crm.media_list_refresh" | "crm.media_list_research" | "crm.party_kind" | "crm.personalization" | "cursor" | "deep_research_v1" | "deferred_claim_recovery" | "dictionary" | "distillation_coherence" | "doc_verify" | "documents" | "education-analytics" | "education-assessment" | "education-fastfire" | "education-flashcards" | "education-ingest" | "education-media-reconcile" | "education-mindmap" | "education-planner" | "education-tutor" | "education_card_image_generator" | "education_card_image_prompt_writer" | "education_card_image_qc_judge" | "education_card_image_rot" | "education_card_image_web_source" | "education_card_images" | "education_study_pack" | "education_study_pack_v2" | "endpoint_family_sweep" | "external_url_change" | "files" | "fork_and_run" | "google_workspace.approval_replay" | "group_chat_cadence" | "hindsight" | "hindsight/crystallization" | "hindsight/wire_replay" | "hindsight_replay" | "hindsight_replay_worker" | "hindsight_shadow_recompilation" | "hr" | "human_decisions" | "image-studio" | "incident-assurance" | "internal" | "judge" | "kg_clustering_namer" | "legal" | "local_proxy" | "mandate_candidate_review" | "mandates.batch_lane" | "manual" | "marketing" | "masterwork" | "masterwork_audition_elicitation_vanilla" | "masterwork_audition_outcome_vanilla" | "masterwork_audition_unfolding_vanilla" | "masterwork_audition_vanilla" | "masterwork_bench_a2" | "masterwork_bench_extract" | "masterwork_bench_judge" | "masterwork_bench_panel" | "masterwork_build" | "masterwork_recovery" | "media_catalog" | "media_heal" | "meet:after_meeting_workflow" | "mermaid-workbench" | "messages" | "ner" | "news_monitor" | "notes" | "notify_listener" | "outcome_attribution" | "outreach" | "page_extraction" | "page_extraction_retry" | "pdf-cleaner" | "pdf-extractor" | "pdf-widgets" | "personal-staff" | "personal_staff_workspace_listener" | "platform_checks" | "platform_checks_drain" | "podcasts" | "print" | "product_capture_intake" | "product_capture_research" | "projects" | "prompt" | "proof_run:content_plan_family_grounding" | "proof_run:news_self_validating" | "provenance" | "provider_outage" | "rag" | "rag-search" | "rag.page_clean" | "rag_chunk_contextualizer" | "rag_hyde_generator" | "rag_pdf_page_cleaner" | "rag_query_expander" | "reachability" | "realtime" | "realtime_tool" | "registry_ingestion.pass" | "request_snapshot_blob" | "reroute" | "research" | "research_condenser_1" | "research_condenser_2" | "research_refresh_dispatch" | "row_history" | "scanner" | "scheduled" | "schema_coerce" | "scraper" | "scratchpad" | "screen_tool_run" | "seo" | "seo.engine_schedule_dispatcher" | "seo.keyword_place_backfill" | "seo.page_analysis" | "seo.rank_schedule" | "seo_analysis_sweep" | "seo_keyword_research" | "server-door" | "server-run" | "sharing" | "sms-assistant" | "sms-outbound" | "socket_compat" | "source_intelligence" | "staff-inbox-driver" | "suggestion_sweep" | "summarize_content" | "sweep_listener" | "system" | "tasks" | "test.agent_factory.intake" | "tool-call-visualization" | "tool-testing" | "transcription" | "udt" | "vision_interview" | "vision_interview_tracker" | "voice-agent" | "vscode" | "web-capture" | "web_crawl_crash_resume" | "web_crawl_schedule_dispatch" | "web_research" | "web_url_announce" | "whole_value_follower" | "workflow_decision_fallback" | "workflow_extract_sweep" | "workflow_holder_proof" | "workflow_node_test" | "workflow_plan_assist" | "workflow_recovery_advisor" | "workflow_recovery_push" | "workflow_recovery_resolve" | "workflow_run" | "workflow_run_assists" | "workflow_worker" | "working-document" | "youtube_research_processing" | "youtube_transcription";
23
+ sourceFeature: "action_request_continuation" | "action_request_credential" | "action_request_one_time_code" | "action_request_park" | "action_request_resolve" | "admin" | "agent" | "agent-app" | "agent-builder" | "agent-comparison" | "agent-factory" | "agent-generator" | "agent-runner" | "agent-service" | "agent-studio" | "agent_blocks" | "agent_call" | "agent_factory.copy_probe" | "agent_factory.tool_probe" | "agent_flow_v1" | "agent_foundry_v1" | "agent_run" | "agent_structure_builder" | "agent_tool" | "agent_usage_sync" | "agents-other" | "ai-results" | "ai_judge" | "analysis-studio" | "auto_ingest" | "auto_ingest_ner" | "background_agent" | "billing" | "browser_handoff_delegate" | "browser_handoff_resolve" | "browser_session_health" | "builtin_agent" | "builtin_categorize" | "canvas" | "chat" | "chat-canary" | "claude-code" | "clean_pdf_extracted_content" | "client-unmapped" | "cloud_browser.local_login_learning" | "cms" | "code-editor" | "codex" | "coding_session_bridge.backfill" | "coding_session_native" | "coding_session_reply" | "communications.sms" | "conductor" | "content-extractor" | "content_plan_acceptance" | "content_plan_cms_fill" | "content_plan_cms_fill_preview" | "content_plan_deepen" | "content_plan_generate" | "content_processing" | "content_processing.research_landing" | "content_processing.transcript_landing" | "content_processing_upload_hook" | "context-parity" | "context_compare_answer" | "context_follow_listener" | "context_summary" | "conversation" | "conversation_context" | "conversation_crash_recovery" | "conversation_fork" | "conversation_resume" | "coverage" | "crawl_run" | "crm" | "crm.media_list_refresh" | "crm.media_list_research" | "crm.party_kind" | "crm.personalization" | "cursor" | "deep_research_v1" | "deferred_claim_recovery" | "dictionary" | "distillation_coherence" | "doc_verify" | "documents" | "education-analytics" | "education-assessment" | "education-fastfire" | "education-flashcards" | "education-ingest" | "education-media-reconcile" | "education-mindmap" | "education-planner" | "education-tutor" | "education_card_image_generator" | "education_card_image_prompt_writer" | "education_card_image_qc_judge" | "education_card_image_rot" | "education_card_image_web_source" | "education_card_images" | "education_study_pack" | "education_study_pack_v2" | "endpoint_family_sweep" | "external_url_change" | "files" | "fork_and_run" | "google_workspace.approval_replay" | "group_chat_cadence" | "hindsight" | "hindsight/crystallization" | "hindsight/wire_replay" | "hindsight_replay" | "hindsight_replay_worker" | "hindsight_shadow_recompilation" | "hr" | "human_decisions" | "image-studio" | "incident-assurance" | "internal" | "judge" | "kg_clustering_namer" | "legal" | "local_proxy" | "mandate_candidate_review" | "mandates.batch_lane" | "manual" | "marketing" | "masterwork" | "masterwork_audition_elicitation_vanilla" | "masterwork_audition_outcome_vanilla" | "masterwork_audition_unfolding_vanilla" | "masterwork_audition_vanilla" | "masterwork_bench_a2" | "masterwork_bench_extract" | "masterwork_bench_judge" | "masterwork_bench_panel" | "masterwork_build" | "masterwork_recovery" | "media_catalog" | "media_heal" | "meet:after_meeting_workflow" | "mermaid-workbench" | "messages" | "ner" | "news_monitor" | "notes" | "notify_listener" | "outcome_attribution" | "outreach" | "page_extraction" | "page_extraction_retry" | "pdf-cleaner" | "pdf-extractor" | "pdf-widgets" | "personal-staff" | "personal_staff_workspace_listener" | "platform_checks" | "platform_checks_drain" | "podcasts" | "print" | "product_capture_intake" | "product_capture_research" | "projects" | "prompt" | "proof_run:content_plan_family_grounding" | "proof_run:news_self_validating" | "provenance" | "provider_outage" | "rag" | "rag-search" | "rag.page_clean" | "rag_chunk_contextualizer" | "rag_hyde_generator" | "rag_pdf_page_cleaner" | "rag_query_expander" | "reachability" | "realtime" | "realtime_tool" | "registry_ingestion.pass" | "request_snapshot_blob" | "reroute" | "research" | "research_condenser_1" | "research_condenser_2" | "research_refresh_dispatch" | "row_history" | "scanner" | "scheduled" | "schema_coerce" | "scraper" | "scratchpad" | "screen_tool_run" | "seo" | "seo.engine_schedule_dispatcher" | "seo.keyword_place_backfill" | "seo.page_analysis" | "seo.rank_schedule" | "seo_analysis_sweep" | "seo_keyword_research" | "server-door" | "server-run" | "sharing" | "sms-assistant" | "sms-outbound" | "socket_compat" | "source_intelligence" | "staff-inbox-driver" | "suggestion_sweep" | "summarize_content" | "sweep_listener" | "system" | "tasks" | "test.agent_factory.intake" | "tool-call-visualization" | "tool-testing" | "transcription" | "udt" | "vision_interview" | "vision_interview_tracker" | "voice-agent" | "vscode" | "web-capture" | "web_crawl_crash_resume" | "web_crawl_schedule_dispatch" | "web_research" | "web_url_announce" | "whole_value_follower" | "workflow_decision_fallback" | "workflow_extract_sweep" | "workflow_holder_proof" | "workflow_node_test" | "workflow_plan_assist" | "workflow_recovery_advisor" | "workflow_recovery_push" | "workflow_recovery_resolve" | "workflow_run" | "workflow_run_assists" | "workflow_worker" | "working-document" | "youtube_research_processing" | "youtube_transcription";
24
24
  surfaceName: string;
25
25
  isEditable: true;
26
26
  enabledPlacements: ("ai-action" | "content-block" | "quick-action")[];
@@ -12,6 +12,7 @@ import { useModelRecordsSelector } from "@ai-matrx/agents/models/react";
12
12
  import { supabase } from "../../host/db.js";
13
13
  import { captureError } from "../../host/diagnostics.js";
14
14
  import { isSignedOutVisitor } from "../../host/identity.js";
15
+ import { chatHostHasDatabase } from "../../host/configure.js";
15
16
  const KEY = /* @__PURE__ */ Symbol.for("ai-matrx.chat.model-catalog");
16
17
  function getModelCatalog() {
17
18
  const g = globalThis;
@@ -19,7 +20,8 @@ function getModelCatalog() {
19
20
  const catalog = createModelCatalog({
20
21
  // supabase-js satisfies the catalog's structural client as-is.
21
22
  client: supabase,
22
- isSignedIn: async () => !await isSignedOutVisitor(),
23
+ // A host with no database has no catalog to read (host/source): nobody is signed in.
24
+ isSignedIn: async () => chatHostHasDatabase() && !await isSignedOutVisitor(),
23
25
  errorSink: (event) => {
24
26
  captureError({
25
27
  source: "supabase-postgrest",
@@ -69,13 +71,13 @@ function useModelLabel(modelId) {
69
71
  function useModelLabelWithClass(modelId, offeringId) {
70
72
  useModelLabel(modelId);
71
73
  useEffect(() => {
72
- void getModelRecords().loadClasses();
74
+ if (chatHostHasDatabase()) void getModelRecords().loadClasses();
73
75
  }, []);
74
76
  return useModelRecords((s) => selectModelLabelWithClass(s, modelId, offeringId));
75
77
  }
76
78
  function useModelClassLabels() {
77
79
  useEffect(() => {
78
- void getModelRecords().loadClasses();
80
+ if (chatHostHasDatabase()) void getModelRecords().loadClasses();
79
81
  }, []);
80
82
  }
81
83
  function useModelClassControls(modelId, offeringId) {