@ai-matrx/chat 0.3.23 → 0.3.25

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 (43) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/agents/components/chat/ChatConversationSurface.js +2 -2
  3. package/dist/agents/components/chat/ChatRunHeader.js +3 -5
  4. package/dist/agents/components/chat/PinnedAgentsSection.js +2 -2
  5. package/dist/agents/components/context-preview/ContextCompareView.js +5 -12
  6. package/dist/agents/components/inputs/smart-input/composer/useComposerAgent.js +4 -5
  7. package/dist/agents/components/run/AgentRunnerPage.js +3 -3
  8. package/dist/agents/hooks/useAgentModelLabel.js +6 -2
  9. package/dist/agents/hooks/useAgentRunSurfaceScope.js +3 -4
  10. package/dist/agents/identity/agent-catalog-lists.d.ts +45 -0
  11. package/dist/agents/identity/agent-catalog-lists.js +128 -0
  12. package/dist/agents/identity/agent-identity.d.ts +52 -0
  13. package/dist/agents/identity/agent-identity.js +144 -0
  14. package/dist/agents/identity/run-tier-store.d.ts +15 -0
  15. package/dist/agents/identity/run-tier-store.js +23 -0
  16. package/dist/agents/redux/agent-definition/converters.js +1 -1
  17. package/dist/agents/redux/agent-definition/selectors.d.ts +612 -4581
  18. package/dist/agents/redux/agent-definition/selectors.js +6 -129
  19. package/dist/agents/redux/agent-definition/slice.d.ts +1 -0
  20. package/dist/agents/redux/agent-definition/slice.js +1 -0
  21. package/dist/agents/redux/agent-definition/thunks.d.ts +9 -205
  22. package/dist/agents/redux/agent-definition/thunks.js +34 -237
  23. package/dist/agents/redux/agent-filter/selectors.d.ts +10 -402
  24. package/dist/agents/redux/agent-filter/selectors.js +23 -45
  25. package/dist/agents/redux/agent-filter/useAgentIdsForFilter.d.ts +6 -0
  26. package/dist/agents/redux/agent-filter/useAgentIdsForFilter.js +14 -0
  27. package/dist/agents/redux/conversation-history/selectors.js +2 -3
  28. package/dist/agents/redux/execution-system/thunks/launch-agent-execution.thunk.js +2 -2
  29. package/dist/agents/redux/execution-system/thunks/load-conversation.thunk.js +2 -2
  30. package/dist/agents/redux/execution-system/thunks/run-headless-agent-json.js +2 -2
  31. package/dist/agents/redux/execution-system/utils/output-contract-guard.js +2 -1
  32. package/dist/agents/types/agent-definition.types.d.ts +8 -26
  33. package/dist/cx-chat/components/ChatMobileAgentName.js +4 -7
  34. package/dist/cx-chat/components/ChatSidebarClient.js +2 -2
  35. package/dist/cx-chat/components/agent/AgentPickerSheet.js +10 -11
  36. package/dist/cx-chat/hooks/useChatCatalogueInit.js +4 -7
  37. package/dist/cx-chat/hooks/useInstanceBootstrap.js +4 -5
  38. package/dist/host/db-types.d.ts +122 -0
  39. package/dist/window-panels/windows/agents/AgentRunWindow.js +4 -6
  40. package/dist/window-panels/windows/agents/RunControlsWindow.js +2 -4
  41. package/package.json +9 -8
  42. package/dist/agents/route/AgentListHydrator.d.ts +0 -4
  43. package/dist/agents/route/AgentListHydrator.js +0 -49
@@ -0,0 +1,23 @@
1
+ import { createRunTierStore } from "@ai-matrx/agents/runtime";
2
+ import { supabase } from "../../host/db.js";
3
+ import { runWithSessionRetry } from "../../host/session-retry.js";
4
+ const KEY = /* @__PURE__ */ Symbol.for("ai-matrx.chat.run-tier-stores");
5
+ function getRunTierStore() {
6
+ const db = supabase;
7
+ const g = globalThis;
8
+ const stores = g[KEY] ??= /* @__PURE__ */ new WeakMap();
9
+ const existing = stores.get(db);
10
+ if (existing) return existing;
11
+ const client = {
12
+ // The access level read is the one that runs at sign-in boundaries (the builder opens
13
+ // straight from a link), so it rides the session retry; the run tier and run controls
14
+ // refuse a signed-out visitor before they read (isSignedOutVisitor in the thunks).
15
+ rpc: (fn, args) => fn === "agx_get_access_level" ? runWithSessionRetry(() => Promise.resolve(db.rpc(fn, args))) : db.rpc(fn, args)
16
+ };
17
+ const store = createRunTierStore({ client });
18
+ stores.set(db, store);
19
+ return store;
20
+ }
21
+ export {
22
+ getRunTierStore
23
+ };
@@ -258,7 +258,7 @@ function dbRowToAgentDefinition(row) {
258
258
  changedAt: null,
259
259
  changeNote: null,
260
260
  // Access metadata not available from a direct row fetch —
261
- // populated separately by fetchAgentsList or fetchAgentAccessLevel
261
+ // populated separately by fetchAgentAccessLevel (the list lives in the catalog)
262
262
  isOwner: null,
263
263
  accessLevel: null,
264
264
  sharedByEmail: null,