@ai-matrx/chat 0.4.12 → 0.4.15
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 +44 -0
- package/dist/agents/components/shared/AgentModeController.d.ts +1 -1
- package/dist/agents/components/shared/AgentModeController.js +4 -0
- package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.js +1 -1
- package/dist/agents/redux/execution-system/active-requests/active-requests.slice.d.ts +2 -0
- package/dist/agents/redux/execution-system/active-requests/active-requests.slice.js +7 -0
- package/dist/agents/redux/execution-system/conversations/conversation-persistence.js +2 -4
- package/dist/agents/redux/execution-system/instance-context/instance-context.slice.js +1 -1
- package/dist/agents/redux/execution-system/thunks/dispatch-matrx-extend-tool.thunk.js +3 -1
- package/dist/agents/redux/execution-system/thunks/process-stream.js +26 -23
- package/dist/agents/redux/execution-system/thunks/run-headless-agent-json.js +1 -1
- package/dist/agents/runtime-reconnect/api.d.ts +6 -25
- package/dist/agents/runtime-reconnect/api.js +7 -13
- package/dist/agents/runtime-reconnect/reconnect-server-operation.thunk.js +167 -159
- package/dist/agents/runtime-reconnect/types.d.ts +2 -0
- package/dist/agents/services/mcp-connections.service.d.ts +12 -0
- package/dist/agents/services/mcp-connections.service.js +4 -7
- package/dist/agents/types/request.types.d.ts +6 -0
- package/dist/agents/utils/json-extraction.js +2 -2
- package/dist/cx-chat/utils/settings-diff.js +1 -21
- package/dist/host/configure.js +15 -5
- package/dist/host/contract.d.ts +43 -2
- package/dist/host/db-types.d.ts +112 -0
- package/dist/host/db.js +6 -0
- package/dist/host/defaults/diagnostics.d.ts +5 -0
- package/dist/host/defaults/diagnostics.js +1 -2
- package/dist/host/defaults/identity.d.ts +26 -0
- package/dist/host/defaults/identity.js +133 -1
- package/dist/host/identity.d.ts +19 -2
- package/dist/host/identity.js +18 -10
- package/dist/host/session-retry.js +2 -2
- package/dist/host/ui-slots.js +27 -20
- package/dist/surfaces/services/bind-agent-to-surface.service.js +2 -4
- package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +1 -1
- package/dist/ui/mandates-storage/mandateStorage.d.ts +60 -0
- package/dist/ui/mandates-storage/shortcutStorage.d.ts +15 -0
- package/dist/utils/deep-equal.d.ts +5 -0
- package/dist/utils/deep-equal.js +24 -0
- package/package.json +7 -6
|
@@ -16,6 +16,7 @@ import { ensureOrgAvailability } from "../../host/ui-slots.js";
|
|
|
16
16
|
import { assertMappingsAreAnswerable } from "../../ui/mandates-storage/provision-shapes.js";
|
|
17
17
|
import { ensureOrgId } from "../../host/org.js";
|
|
18
18
|
import { readProjectScopeOrganizationId } from "../../host/ui-slots.js";
|
|
19
|
+
import { hasBrowserSession } from "../../host/identity.js";
|
|
19
20
|
function tierFromScope(scope) {
|
|
20
21
|
if (scope.userId) return "user";
|
|
21
22
|
if (scope.organizationId) return "org";
|
|
@@ -359,10 +360,7 @@ async function listAgentSurfaceBindings(agentId) {
|
|
|
359
360
|
async function fetchSurfaceBindingLayers(agentId, surfaceName) {
|
|
360
361
|
const chain = [...getSurfaceAncestry(surfaceName), surfaceName];
|
|
361
362
|
const sb = createClient();
|
|
362
|
-
|
|
363
|
-
data: { session }
|
|
364
|
-
} = await sb.auth.getSession();
|
|
365
|
-
if (!session) return [];
|
|
363
|
+
if (!await hasBrowserSession()) return [];
|
|
366
364
|
const { data, error } = await sb.schema("agent").from("menu_surface").select(MENU_SURFACE_COLUMNS).eq("agent_id", agentId).in("surface_name", chain);
|
|
367
365
|
if (error) throw error;
|
|
368
366
|
const rows = (data ?? []).map(fromRow).filter(
|
|
@@ -9,7 +9,7 @@ import { useConversationTitle } from "../../../agents/hooks/useConversationTitle
|
|
|
9
9
|
import { EntityRef } from "../../../host/ui-slots.js";
|
|
10
10
|
import MarkdownStream from "../../../ui/markdown-stream/MarkdownStream.js";
|
|
11
11
|
import { AnswerValueView } from "../../../host/ui-slots.js";
|
|
12
|
-
import { stripThinkingStreaming } from "@ai-matrx/
|
|
12
|
+
import { stripThinkingStreaming } from "@ai-matrx/content-ir/source";
|
|
13
13
|
import { cn } from "@ai-matrx/design-system";
|
|
14
14
|
import { getCollabCallInfo } from "./collab.js";
|
|
15
15
|
import { ErrorAlchemyMenu } from "../../../host/ui-slots.js";
|
|
@@ -1961,6 +1961,21 @@ declare const definitionTable: (supabase: Client) => import("@supabase/supabase-
|
|
|
1961
1961
|
version_live: boolean;
|
|
1962
1962
|
}[];
|
|
1963
1963
|
};
|
|
1964
|
+
run_history: {
|
|
1965
|
+
Args: {
|
|
1966
|
+
p_agent_id?: string;
|
|
1967
|
+
p_desc?: boolean;
|
|
1968
|
+
p_limit?: number;
|
|
1969
|
+
p_mandate_key?: string;
|
|
1970
|
+
p_offset?: number;
|
|
1971
|
+
p_org_id?: string;
|
|
1972
|
+
p_sort?: string;
|
|
1973
|
+
p_status?: string;
|
|
1974
|
+
p_user_id?: string;
|
|
1975
|
+
p_view?: string;
|
|
1976
|
+
};
|
|
1977
|
+
Returns: Json;
|
|
1978
|
+
};
|
|
1964
1979
|
sanitize_app_segment: {
|
|
1965
1980
|
Args: {
|
|
1966
1981
|
p_seg: string;
|
|
@@ -4099,6 +4114,21 @@ declare const provisionTable: (supabase: Client) => import("@supabase/supabase-j
|
|
|
4099
4114
|
version_live: boolean;
|
|
4100
4115
|
}[];
|
|
4101
4116
|
};
|
|
4117
|
+
run_history: {
|
|
4118
|
+
Args: {
|
|
4119
|
+
p_agent_id?: string;
|
|
4120
|
+
p_desc?: boolean;
|
|
4121
|
+
p_limit?: number;
|
|
4122
|
+
p_mandate_key?: string;
|
|
4123
|
+
p_offset?: number;
|
|
4124
|
+
p_org_id?: string;
|
|
4125
|
+
p_sort?: string;
|
|
4126
|
+
p_status?: string;
|
|
4127
|
+
p_user_id?: string;
|
|
4128
|
+
p_view?: string;
|
|
4129
|
+
};
|
|
4130
|
+
Returns: Json;
|
|
4131
|
+
};
|
|
4102
4132
|
sanitize_app_segment: {
|
|
4103
4133
|
Args: {
|
|
4104
4134
|
p_seg: string;
|
|
@@ -6132,6 +6162,21 @@ declare const bindingTable: (supabase: Client) => import("@supabase/supabase-js"
|
|
|
6132
6162
|
version_live: boolean;
|
|
6133
6163
|
}[];
|
|
6134
6164
|
};
|
|
6165
|
+
run_history: {
|
|
6166
|
+
Args: {
|
|
6167
|
+
p_agent_id?: string;
|
|
6168
|
+
p_desc?: boolean;
|
|
6169
|
+
p_limit?: number;
|
|
6170
|
+
p_mandate_key?: string;
|
|
6171
|
+
p_offset?: number;
|
|
6172
|
+
p_org_id?: string;
|
|
6173
|
+
p_sort?: string;
|
|
6174
|
+
p_status?: string;
|
|
6175
|
+
p_user_id?: string;
|
|
6176
|
+
p_view?: string;
|
|
6177
|
+
};
|
|
6178
|
+
Returns: Json;
|
|
6179
|
+
};
|
|
6135
6180
|
sanitize_app_segment: {
|
|
6136
6181
|
Args: {
|
|
6137
6182
|
p_seg: string;
|
|
@@ -8213,6 +8258,21 @@ declare const treatmentTable: (supabase: Client) => import("@supabase/supabase-j
|
|
|
8213
8258
|
version_live: boolean;
|
|
8214
8259
|
}[];
|
|
8215
8260
|
};
|
|
8261
|
+
run_history: {
|
|
8262
|
+
Args: {
|
|
8263
|
+
p_agent_id?: string;
|
|
8264
|
+
p_desc?: boolean;
|
|
8265
|
+
p_limit?: number;
|
|
8266
|
+
p_mandate_key?: string;
|
|
8267
|
+
p_offset?: number;
|
|
8268
|
+
p_org_id?: string;
|
|
8269
|
+
p_sort?: string;
|
|
8270
|
+
p_status?: string;
|
|
8271
|
+
p_user_id?: string;
|
|
8272
|
+
p_view?: string;
|
|
8273
|
+
};
|
|
8274
|
+
Returns: Json;
|
|
8275
|
+
};
|
|
8216
8276
|
sanitize_app_segment: {
|
|
8217
8277
|
Args: {
|
|
8218
8278
|
p_seg: string;
|
|
@@ -6191,6 +6191,21 @@ declare const mandateContextMenuView: (supabase: Client) => import("@supabase/su
|
|
|
6191
6191
|
version_live: boolean;
|
|
6192
6192
|
}[];
|
|
6193
6193
|
};
|
|
6194
|
+
run_history: {
|
|
6195
|
+
Args: {
|
|
6196
|
+
p_agent_id?: string;
|
|
6197
|
+
p_desc?: boolean;
|
|
6198
|
+
p_limit?: number;
|
|
6199
|
+
p_mandate_key?: string;
|
|
6200
|
+
p_offset?: number;
|
|
6201
|
+
p_org_id?: string;
|
|
6202
|
+
p_sort?: string;
|
|
6203
|
+
p_status?: string;
|
|
6204
|
+
p_user_id?: string;
|
|
6205
|
+
p_view?: string;
|
|
6206
|
+
};
|
|
6207
|
+
Returns: import("../../host/db-types.js").Json;
|
|
6208
|
+
};
|
|
6194
6209
|
sanitize_app_segment: {
|
|
6195
6210
|
Args: {
|
|
6196
6211
|
p_seg: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
function deepEqual(a, b) {
|
|
2
|
+
if (Object.is(a, b)) return true;
|
|
3
|
+
if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) return false;
|
|
4
|
+
if (Array.isArray(a) !== Array.isArray(b)) return false;
|
|
5
|
+
if (a instanceof Date || b instanceof Date) return a instanceof Date && b instanceof Date && a.getTime() === b.getTime();
|
|
6
|
+
if (a instanceof Map || b instanceof Map) {
|
|
7
|
+
if (!(a instanceof Map && b instanceof Map) || a.size !== b.size) return false;
|
|
8
|
+
for (const [k, v] of a) if (!b.has(k) || !deepEqual(v, b.get(k))) return false;
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
if (a instanceof Set || b instanceof Set) {
|
|
12
|
+
if (!(a instanceof Set && b instanceof Set) || a.size !== b.size) return false;
|
|
13
|
+
for (const v of a) if (!b.has(v)) return false;
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
const ra = a;
|
|
17
|
+
const rb = b;
|
|
18
|
+
const keysA = Object.keys(ra);
|
|
19
|
+
if (keysA.length !== Object.keys(rb).length) return false;
|
|
20
|
+
return keysA.every((k) => Object.prototype.hasOwnProperty.call(rb, k) && deepEqual(ra[k], rb[k]));
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
deepEqual
|
|
24
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/chat",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.15",
|
|
4
4
|
"description": "THE one AI Matrx person-to-agent chat system: the full chat (running agents, conversations, tool calls, streaming, context, surfaces, voice) as per-module subpaths @ai-matrx/chat/<domain>/<module> over a host contract (/host, /host/react) whose only required value is a db; plus the kernel compatibility entries (., /external-store, /matrx, /react, /tools, styles.css, tokens.css) until P28.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -230,22 +230,22 @@
|
|
|
230
230
|
"@ai-matrx/alchemy": "latest",
|
|
231
231
|
"@ai-matrx/associations": "latest",
|
|
232
232
|
"@ai-matrx/browser-audio": "latest",
|
|
233
|
-
"@ai-matrx/content-ir": "latest",
|
|
234
233
|
"@ai-matrx/canvas": "latest",
|
|
234
|
+
"@ai-matrx/content-ir": "latest",
|
|
235
235
|
"@ai-matrx/data": "latest",
|
|
236
|
-
"@ai-matrx/content-ir-react": "latest",
|
|
237
236
|
"@ai-matrx/design-system": "latest",
|
|
238
237
|
"@ai-matrx/diff": "latest",
|
|
239
238
|
"@ai-matrx/icons": "latest",
|
|
240
239
|
"@ai-matrx/kit": "latest",
|
|
241
240
|
"@ai-matrx/media": "latest",
|
|
241
|
+
"@ai-matrx/print": "latest",
|
|
242
242
|
"@ai-matrx/realtime": "latest",
|
|
243
243
|
"@ai-matrx/records-ui": "latest",
|
|
244
244
|
"@ai-matrx/rich-content": "latest",
|
|
245
|
-
"@ai-matrx/print": "latest",
|
|
246
245
|
"@ai-matrx/rich-editor": "latest",
|
|
247
246
|
"@ai-matrx/tap-target": "latest",
|
|
248
|
-
"@ai-matrx/records": "latest"
|
|
247
|
+
"@ai-matrx/records": "latest",
|
|
248
|
+
"@ai-matrx/content-ir-react": "latest"
|
|
249
249
|
},
|
|
250
250
|
"devDependencies": {
|
|
251
251
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
@@ -342,6 +342,7 @@
|
|
|
342
342
|
"check:front-door": "node ./scripts/check-front-door.mjs",
|
|
343
343
|
"check:front-door:self-test": "node ./scripts/check-front-door.mjs --self-test",
|
|
344
344
|
"check:front-door:canary": "node ./scripts/check-front-door.mjs --root ./canary/src",
|
|
345
|
-
"deps:write": "node ./scripts/finish-build.mjs --write-deps"
|
|
345
|
+
"deps:write": "node ./scripts/finish-build.mjs --write-deps",
|
|
346
|
+
"check:side-panel-bundle": "node ./scripts/check-side-panel-bundle.mjs"
|
|
346
347
|
}
|
|
347
348
|
}
|