@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.
- package/CHANGELOG.md +19 -0
- package/dist/agents/components/chat/ChatConversationSurface.js +2 -2
- package/dist/agents/components/chat/ChatRunHeader.js +3 -5
- package/dist/agents/components/chat/PinnedAgentsSection.js +2 -2
- package/dist/agents/components/context-preview/ContextCompareView.js +5 -12
- package/dist/agents/components/inputs/smart-input/composer/useComposerAgent.js +4 -5
- package/dist/agents/components/run/AgentRunnerPage.js +3 -3
- package/dist/agents/hooks/useAgentModelLabel.js +6 -2
- package/dist/agents/hooks/useAgentRunSurfaceScope.js +3 -4
- package/dist/agents/identity/agent-catalog-lists.d.ts +45 -0
- package/dist/agents/identity/agent-catalog-lists.js +128 -0
- package/dist/agents/identity/agent-identity.d.ts +52 -0
- package/dist/agents/identity/agent-identity.js +144 -0
- package/dist/agents/identity/run-tier-store.d.ts +15 -0
- package/dist/agents/identity/run-tier-store.js +23 -0
- package/dist/agents/redux/agent-definition/converters.js +1 -1
- package/dist/agents/redux/agent-definition/selectors.d.ts +612 -4581
- package/dist/agents/redux/agent-definition/selectors.js +6 -129
- package/dist/agents/redux/agent-definition/slice.d.ts +1 -0
- package/dist/agents/redux/agent-definition/slice.js +1 -0
- package/dist/agents/redux/agent-definition/thunks.d.ts +9 -205
- package/dist/agents/redux/agent-definition/thunks.js +34 -237
- package/dist/agents/redux/agent-filter/selectors.d.ts +10 -402
- package/dist/agents/redux/agent-filter/selectors.js +23 -45
- package/dist/agents/redux/agent-filter/useAgentIdsForFilter.d.ts +6 -0
- package/dist/agents/redux/agent-filter/useAgentIdsForFilter.js +14 -0
- package/dist/agents/redux/conversation-history/selectors.js +2 -3
- package/dist/agents/redux/execution-system/thunks/launch-agent-execution.thunk.js +2 -2
- package/dist/agents/redux/execution-system/thunks/load-conversation.thunk.js +2 -2
- package/dist/agents/redux/execution-system/thunks/run-headless-agent-json.js +2 -2
- package/dist/agents/redux/execution-system/utils/output-contract-guard.js +2 -1
- package/dist/agents/types/agent-definition.types.d.ts +8 -26
- package/dist/cx-chat/components/ChatMobileAgentName.js +4 -7
- package/dist/cx-chat/components/ChatSidebarClient.js +2 -2
- package/dist/cx-chat/components/agent/AgentPickerSheet.js +10 -11
- package/dist/cx-chat/hooks/useChatCatalogueInit.js +4 -7
- package/dist/cx-chat/hooks/useInstanceBootstrap.js +4 -5
- package/dist/host/db-types.d.ts +122 -0
- package/dist/window-panels/windows/agents/AgentRunWindow.js +4 -6
- package/dist/window-panels/windows/agents/RunControlsWindow.js +2 -4
- package/package.json +9 -8
- package/dist/agents/route/AgentListHydrator.d.ts +0 -4
- 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
|
|
261
|
+
// populated separately by fetchAgentAccessLevel (the list lives in the catalog)
|
|
262
262
|
isOwner: null,
|
|
263
263
|
accessLevel: null,
|
|
264
264
|
sharedByEmail: null,
|