@ai-matrx/chat 0.7.4 → 0.7.5
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 +6 -0
- package/dist/agents/redux/conversation-list/conversation-row-actions.thunks.d.ts +5 -1
- package/dist/agents/redux/conversation-list/conversation-row-actions.thunks.js +64 -12
- package/dist/agents/redux/execution-system/message-crud/soft-delete-conversation.thunk.js +22 -12
- package/dist/host/defaults/server-api.d.ts +69 -0
- package/dist/host/defaults/server-api.js +6 -0
- package/dist/host/server/call-api.d.ts +69 -0
- package/dist/host/server/call-api.js +8 -0
- package/package.json +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ai-matrx/chat
|
|
2
2
|
|
|
3
|
+
## 0.7.5
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/chat/v0.7.4..npm/chat/v0.7.5 -- apps/shared/chat`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.7.4
|
|
4
10
|
### Unreleased
|
|
5
11
|
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
* 1. Snapshot the current value from the canonical entity store.
|
|
8
8
|
* 2. Patch every slice that mirrors the row (list, history scopes, the
|
|
9
9
|
* active `conversations`/`messages` instance if it's loaded).
|
|
10
|
-
* 3. Hit Supabase directly — RLS scopes the update to the owner.
|
|
10
|
+
* 3. Hit Supabase directly — RLS scopes the update to the owner. On THE ADMIN
|
|
11
|
+
* SEAT (an /administration page, host grants admin) the write goes to the
|
|
12
|
+
* server door instead (`PATCH /cx/conversations/{id}`), which admits the
|
|
13
|
+
* verified admin through the admin lane: `chat.conversation` has only
|
|
14
|
+
* `platform_admin_read`, by design, so a direct write there is refused.
|
|
11
15
|
* 4. On failure, revert to the snapshot in the same slices.
|
|
12
16
|
*
|
|
13
17
|
* No new reducers are needed: the existing generic `patchConversation` and
|
|
@@ -20,6 +20,17 @@ import {
|
|
|
20
20
|
} from "../execution-system/conversations/conversations.slice.js";
|
|
21
21
|
import { selectConversationIsEphemeral } from "../execution-system/conversations/conversations.selectors.js";
|
|
22
22
|
import { forkConversationServer } from "../execution-system/message-crud/server/fork-conversation-server.thunk.js";
|
|
23
|
+
import { adminSeatOpen } from "../../../host/admin-seat.js";
|
|
24
|
+
import {
|
|
25
|
+
callConversationSandboxBind,
|
|
26
|
+
callConversationSandboxUnbind,
|
|
27
|
+
callConversationUpdate
|
|
28
|
+
} from "../../../host/server/call-api.js";
|
|
29
|
+
async function writeSettingsThroughServer(dispatch, conversationId, body, action) {
|
|
30
|
+
const result = await dispatch(callConversationUpdate({ conversationId, body }));
|
|
31
|
+
if (result.error) return refusalWords(result.error, action);
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
23
34
|
function refusalWords(err, action) {
|
|
24
35
|
const w = describeWriteFailure(err, { action, remedy: "Try again." });
|
|
25
36
|
return `${w.title} ${w.description}`;
|
|
@@ -61,10 +72,12 @@ const renameConversation = createAsyncThunk(
|
|
|
61
72
|
title: nextTitle
|
|
62
73
|
})
|
|
63
74
|
);
|
|
64
|
-
const {
|
|
75
|
+
const error = adminSeatOpen(getState()) ? await writeSettingsThroughServer(dispatch, conversationId, { title: nextTitle }, "rename this conversation").then(
|
|
76
|
+
(message) => message ? { message } : null
|
|
77
|
+
) : (await tryWriteOne(
|
|
65
78
|
supabase.schema("chat").from("conversation").update({ title: nextTitle, updated_at: (/* @__PURE__ */ new Date()).toISOString() }).eq("id", conversationId).select("id"),
|
|
66
79
|
{ action: "rename", noun: "conversation" }
|
|
67
|
-
);
|
|
80
|
+
)).error;
|
|
68
81
|
if (error) {
|
|
69
82
|
dispatch(revertRename({ conversationId, previousTitle }));
|
|
70
83
|
dispatch(
|
|
@@ -110,9 +123,14 @@ const setConversationArchived = createAsyncThunk(
|
|
|
110
123
|
const before = findConversationRow(getState(), conversationId);
|
|
111
124
|
const nextStatus = archived ? "archived" : "active";
|
|
112
125
|
const action = archived ? "archive this conversation" : "restore this conversation";
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
126
|
+
if (adminSeatOpen(getState())) {
|
|
127
|
+
const refused = await writeSettingsThroughServer(dispatch, conversationId, { status: nextStatus }, action);
|
|
128
|
+
if (refused) return rejectWithValue({ message: refused });
|
|
129
|
+
} else {
|
|
130
|
+
const { data, error } = await supabase.schema("chat").from("conversation").update({ status: nextStatus, updated_at: (/* @__PURE__ */ new Date()).toISOString() }).eq("id", conversationId).select("id");
|
|
131
|
+
const refusal = error ?? landedOrRefusal(data, `chat.conversation status=${nextStatus} ${conversationId}`);
|
|
132
|
+
if (refusal) return rejectWithValue({ message: refusalWords(refusal, action) });
|
|
133
|
+
}
|
|
116
134
|
dispatch(
|
|
117
135
|
patchConversation({ conversationId, patch: { status: nextStatus } })
|
|
118
136
|
);
|
|
@@ -135,19 +153,27 @@ const setConversationArchived = createAsyncThunk(
|
|
|
135
153
|
);
|
|
136
154
|
const setConversationExcludeFromKg = createAsyncThunk(
|
|
137
155
|
"conversationRow/setExcludeFromKg",
|
|
138
|
-
async ({ conversationId, excludeFromKg }, { dispatch, rejectWithValue }) => {
|
|
156
|
+
async ({ conversationId, excludeFromKg }, { dispatch, getState, rejectWithValue }) => {
|
|
157
|
+
const kgAction = excludeFromKg ? "exclude this conversation from the knowledge graph" : "include this conversation in the knowledge graph";
|
|
158
|
+
if (adminSeatOpen(getState())) {
|
|
159
|
+
const refused = await writeSettingsThroughServer(
|
|
160
|
+
dispatch,
|
|
161
|
+
conversationId,
|
|
162
|
+
{ exclude_from_kg: excludeFromKg },
|
|
163
|
+
kgAction
|
|
164
|
+
);
|
|
165
|
+
if (refused) return rejectWithValue({ message: refused });
|
|
166
|
+
dispatch(patchConversation({ conversationId, patch: { excludeFromKg } }));
|
|
167
|
+
dispatch(patchConversationInScopes({ conversationId, patch: { excludeFromKg } }));
|
|
168
|
+
return { conversationId, excludeFromKg };
|
|
169
|
+
}
|
|
139
170
|
const { data, error } = await supabase.schema("chat").from("conversation").update({
|
|
140
171
|
exclude_from_kg: excludeFromKg,
|
|
141
172
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
142
173
|
}).eq("id", conversationId).select("id");
|
|
143
174
|
const refusal = error ?? landedOrRefusal(data, `chat.conversation exclude_from_kg=${excludeFromKg} ${conversationId}`);
|
|
144
175
|
if (refusal) {
|
|
145
|
-
return rejectWithValue({
|
|
146
|
-
message: refusalWords(
|
|
147
|
-
refusal,
|
|
148
|
-
excludeFromKg ? "exclude this conversation from the knowledge graph" : "include this conversation in the knowledge graph"
|
|
149
|
-
)
|
|
150
|
-
});
|
|
176
|
+
return rejectWithValue({ message: refusalWords(refusal, kgAction) });
|
|
151
177
|
}
|
|
152
178
|
dispatch(patchConversation({ conversationId, patch: { excludeFromKg } }));
|
|
153
179
|
dispatch(
|
|
@@ -199,6 +225,32 @@ const setConversationSandbox = createAsyncThunk(
|
|
|
199
225
|
if (isEphemeral || (record?.cacheOnly ?? true)) {
|
|
200
226
|
return { conversationId, persisted: false };
|
|
201
227
|
}
|
|
228
|
+
if (adminSeatOpen(state)) {
|
|
229
|
+
const revert = () => dispatch(
|
|
230
|
+
patchInstanceConversation({
|
|
231
|
+
conversationId,
|
|
232
|
+
sandboxBinding: previous,
|
|
233
|
+
sandboxBindingPersisted: previousPersisted
|
|
234
|
+
})
|
|
235
|
+
);
|
|
236
|
+
if (ref?.kind === "local-pc") {
|
|
237
|
+
revert();
|
|
238
|
+
return rejectWithValue({
|
|
239
|
+
message: "A local computer can't be bound from the admin section. Open the conversation as its owner to bind it."
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
const result = ref ? await dispatch(
|
|
243
|
+
callConversationSandboxBind({ conversationId, body: { sandbox_instance_id: ref.rowId } })
|
|
244
|
+
) : await dispatch(callConversationSandboxUnbind({ conversationId }));
|
|
245
|
+
if (result.error) {
|
|
246
|
+
revert();
|
|
247
|
+
return rejectWithValue({
|
|
248
|
+
message: refusalWords(result.error, ref ? "bind this sandbox" : "unbind this sandbox")
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
dispatch(patchInstanceConversation({ conversationId, sandboxBindingPersisted: true }));
|
|
252
|
+
return { conversationId, persisted: true };
|
|
253
|
+
}
|
|
202
254
|
const { data: row, error: readError } = await supabase.schema("chat").from("conversation").select("metadata").eq("id", conversationId).single();
|
|
203
255
|
if (readError) {
|
|
204
256
|
dispatch(
|
|
@@ -12,23 +12,33 @@ import { removeConversationFromScopes } from "../../conversation-history/slice.j
|
|
|
12
12
|
import { findConversationRow } from "../../conversation-list/conversation-list.selectors.js";
|
|
13
13
|
import { clearCacheBypass } from "./cache-bypass.slice.js";
|
|
14
14
|
import { invalidateConversationCache } from "./invalidate-conversation-cache.thunk.js";
|
|
15
|
+
import { adminSeatOpen } from "../../../../host/admin-seat.js";
|
|
16
|
+
import { callConversationDelete } from "../../../../host/server/call-api.js";
|
|
15
17
|
const softDeleteConversation = createAsyncThunk(
|
|
16
18
|
"conversations/softDelete",
|
|
17
19
|
async ({ conversationId }, { dispatch, getState, rejectWithValue }) => {
|
|
18
20
|
const snapshot = findConversationRow(getState(), conversationId);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return rejectWithValue({
|
|
30
|
-
message: operationFailed("delete this conversation").message
|
|
21
|
+
if (adminSeatOpen(getState())) {
|
|
22
|
+
const result = await dispatch(callConversationDelete({ conversationId }));
|
|
23
|
+
if (result.error || result.data?.deleted !== true) {
|
|
24
|
+
return rejectWithValue({
|
|
25
|
+
message: operationFailed("delete this conversation", result.error ?? void 0).message
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
const { data, error } = await supabase.rpc("cx_soft_delete_conversation", {
|
|
30
|
+
p_conversation_id: conversationId
|
|
31
31
|
});
|
|
32
|
+
if (error) {
|
|
33
|
+
return rejectWithValue({
|
|
34
|
+
message: operationFailed("delete this conversation", error).message
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
if (data !== true) {
|
|
38
|
+
return rejectWithValue({
|
|
39
|
+
message: operationFailed("delete this conversation").message
|
|
40
|
+
});
|
|
41
|
+
}
|
|
32
42
|
}
|
|
33
43
|
void dispatch(invalidateConversationCache({ conversationId }));
|
|
34
44
|
dispatch(clearCacheBypass(conversationId));
|
|
@@ -70,6 +70,10 @@ export interface DefaultChatServerTypes {
|
|
|
70
70
|
CompactTurnsResult: Schemas["CompactTurnsResponse"];
|
|
71
71
|
ConversationForkBody: Schemas["ForkRequest"];
|
|
72
72
|
ConversationForkAndRunBody: Schemas["ForkAndRunRequest"];
|
|
73
|
+
ConversationSettingsBody: Schemas["ConversationSettingsUpdate"];
|
|
74
|
+
ConversationSettingsResult: Schemas["ConversationSettingsResponse"];
|
|
75
|
+
ConversationDeleteResult: Schemas["ConversationDeleteResponse"];
|
|
76
|
+
SandboxBindBody: Schemas["SandboxBindRequest"];
|
|
73
77
|
MatrxTransportOptions: {
|
|
74
78
|
expectedErrorStatuses?: readonly number[];
|
|
75
79
|
source?: string;
|
|
@@ -220,6 +224,71 @@ export declare function createDefaultServerApi(host: () => ServerHostView): {
|
|
|
220
224
|
turn_count: number;
|
|
221
225
|
position_range: [number, number];
|
|
222
226
|
}>>>;
|
|
227
|
+
callConversationUpdate: (options: {
|
|
228
|
+
conversationId: string;
|
|
229
|
+
body?: unknown;
|
|
230
|
+
signal?: AbortSignal;
|
|
231
|
+
scopeOverrides?: Partial<DefaultCallScope>;
|
|
232
|
+
onStreamStart?: DefaultApiCallConfig["onStreamStart"];
|
|
233
|
+
onStreamEvent?: DefaultApiCallConfig["onStreamEvent"];
|
|
234
|
+
onStreamComplete?: DefaultApiCallConfig["onStreamComplete"];
|
|
235
|
+
onStreamError?: DefaultApiCallConfig["onStreamError"];
|
|
236
|
+
}) => DefaultServerThunk<Promise<DefaultApiCallResult<{
|
|
237
|
+
conversation_id: string;
|
|
238
|
+
fields: string[];
|
|
239
|
+
title?: string | null;
|
|
240
|
+
status?: string | null;
|
|
241
|
+
exclude_from_kg?: boolean | null;
|
|
242
|
+
}>>>;
|
|
243
|
+
callConversationDelete: (options: {
|
|
244
|
+
conversationId: string;
|
|
245
|
+
body?: unknown;
|
|
246
|
+
signal?: AbortSignal;
|
|
247
|
+
scopeOverrides?: Partial<DefaultCallScope>;
|
|
248
|
+
onStreamStart?: DefaultApiCallConfig["onStreamStart"];
|
|
249
|
+
onStreamEvent?: DefaultApiCallConfig["onStreamEvent"];
|
|
250
|
+
onStreamComplete?: DefaultApiCallConfig["onStreamComplete"];
|
|
251
|
+
onStreamError?: DefaultApiCallConfig["onStreamError"];
|
|
252
|
+
}) => DefaultServerThunk<Promise<DefaultApiCallResult<{
|
|
253
|
+
conversation_id: string;
|
|
254
|
+
deleted: boolean;
|
|
255
|
+
}>>>;
|
|
256
|
+
callConversationSandboxBind: (options: {
|
|
257
|
+
conversationId: string;
|
|
258
|
+
body?: unknown;
|
|
259
|
+
signal?: AbortSignal;
|
|
260
|
+
scopeOverrides?: Partial<DefaultCallScope>;
|
|
261
|
+
onStreamStart?: DefaultApiCallConfig["onStreamStart"];
|
|
262
|
+
onStreamEvent?: DefaultApiCallConfig["onStreamEvent"];
|
|
263
|
+
onStreamComplete?: DefaultApiCallConfig["onStreamComplete"];
|
|
264
|
+
onStreamError?: DefaultApiCallConfig["onStreamError"];
|
|
265
|
+
}) => DefaultServerThunk<Promise<DefaultApiCallResult<{
|
|
266
|
+
conversation_id: string;
|
|
267
|
+
sandbox_instance_id?: string | null;
|
|
268
|
+
sandbox_id?: string | null;
|
|
269
|
+
status?: string | null;
|
|
270
|
+
tier?: string | null;
|
|
271
|
+
armed?: boolean;
|
|
272
|
+
reason?: string | null;
|
|
273
|
+
}>>>;
|
|
274
|
+
callConversationSandboxUnbind: (options: {
|
|
275
|
+
conversationId: string;
|
|
276
|
+
body?: unknown;
|
|
277
|
+
signal?: AbortSignal;
|
|
278
|
+
scopeOverrides?: Partial<DefaultCallScope>;
|
|
279
|
+
onStreamStart?: DefaultApiCallConfig["onStreamStart"];
|
|
280
|
+
onStreamEvent?: DefaultApiCallConfig["onStreamEvent"];
|
|
281
|
+
onStreamComplete?: DefaultApiCallConfig["onStreamComplete"];
|
|
282
|
+
onStreamError?: DefaultApiCallConfig["onStreamError"];
|
|
283
|
+
}) => DefaultServerThunk<Promise<DefaultApiCallResult<{
|
|
284
|
+
conversation_id: string;
|
|
285
|
+
sandbox_instance_id?: string | null;
|
|
286
|
+
sandbox_id?: string | null;
|
|
287
|
+
status?: string | null;
|
|
288
|
+
tier?: string | null;
|
|
289
|
+
armed?: boolean;
|
|
290
|
+
reason?: string | null;
|
|
291
|
+
}>>>;
|
|
223
292
|
createMatrxTransport: (_getState?: AnyGetState, options?: {
|
|
224
293
|
organizationId?: string;
|
|
225
294
|
source?: string;
|
|
@@ -171,6 +171,12 @@ function createDefaultServerApi(host) {
|
|
|
171
171
|
callHideMessages: call("POST", "/cx/conversations/{conversation_id}/messages/hide"),
|
|
172
172
|
callRestoreCompaction: call("POST", "/cx/conversations/{conversation_id}/messages/restore"),
|
|
173
173
|
callCompactTurns: call("POST", "/cx/conversations/{conversation_id}/compact"),
|
|
174
|
+
// THE ADMIN SEAT's write doors for a conversation's own settings, its delete and its
|
|
175
|
+
// sandbox binding (aidream cx_data.py / conversations.py, behind require_owned_conversation).
|
|
176
|
+
callConversationUpdate: call("PATCH", "/cx/conversations/{conversation_id}"),
|
|
177
|
+
callConversationDelete: call("DELETE", "/cx/conversations/{conversation_id}"),
|
|
178
|
+
callConversationSandboxBind: call("PUT", "/ai/conversations/{conversation_id}/sandbox"),
|
|
179
|
+
callConversationSandboxUnbind: call("DELETE", "/ai/conversations/{conversation_id}/sandbox"),
|
|
174
180
|
// matrx-transport
|
|
175
181
|
createMatrxTransport: (_getState, options = {}) => transport(options),
|
|
176
182
|
createMatrxTransportFromTarget: (getState, resolveTarget, options = {}) => createPackageTransport({
|
|
@@ -119,6 +119,71 @@ export declare const callCompactTurns: (options: {
|
|
|
119
119
|
turn_count: number;
|
|
120
120
|
position_range: [number, number];
|
|
121
121
|
}>>>;
|
|
122
|
+
export declare const callConversationUpdate: (options: {
|
|
123
|
+
conversationId: string;
|
|
124
|
+
body?: unknown;
|
|
125
|
+
signal?: AbortSignal;
|
|
126
|
+
scopeOverrides?: Partial<import("../defaults/server-api.js").DefaultCallScope>;
|
|
127
|
+
onStreamStart?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamStart"];
|
|
128
|
+
onStreamEvent?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamEvent"];
|
|
129
|
+
onStreamComplete?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamComplete"];
|
|
130
|
+
onStreamError?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamError"];
|
|
131
|
+
}) => import("../defaults/server-api.js").DefaultServerThunk<Promise<import("../defaults/server-api.js").DefaultApiCallResult<{
|
|
132
|
+
conversation_id: string;
|
|
133
|
+
fields: string[];
|
|
134
|
+
title?: string | null;
|
|
135
|
+
status?: string | null;
|
|
136
|
+
exclude_from_kg?: boolean | null;
|
|
137
|
+
}>>>;
|
|
138
|
+
export declare const callConversationDelete: (options: {
|
|
139
|
+
conversationId: string;
|
|
140
|
+
body?: unknown;
|
|
141
|
+
signal?: AbortSignal;
|
|
142
|
+
scopeOverrides?: Partial<import("../defaults/server-api.js").DefaultCallScope>;
|
|
143
|
+
onStreamStart?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamStart"];
|
|
144
|
+
onStreamEvent?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamEvent"];
|
|
145
|
+
onStreamComplete?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamComplete"];
|
|
146
|
+
onStreamError?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamError"];
|
|
147
|
+
}) => import("../defaults/server-api.js").DefaultServerThunk<Promise<import("../defaults/server-api.js").DefaultApiCallResult<{
|
|
148
|
+
conversation_id: string;
|
|
149
|
+
deleted: boolean;
|
|
150
|
+
}>>>;
|
|
151
|
+
export declare const callConversationSandboxBind: (options: {
|
|
152
|
+
conversationId: string;
|
|
153
|
+
body?: unknown;
|
|
154
|
+
signal?: AbortSignal;
|
|
155
|
+
scopeOverrides?: Partial<import("../defaults/server-api.js").DefaultCallScope>;
|
|
156
|
+
onStreamStart?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamStart"];
|
|
157
|
+
onStreamEvent?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamEvent"];
|
|
158
|
+
onStreamComplete?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamComplete"];
|
|
159
|
+
onStreamError?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamError"];
|
|
160
|
+
}) => import("../defaults/server-api.js").DefaultServerThunk<Promise<import("../defaults/server-api.js").DefaultApiCallResult<{
|
|
161
|
+
conversation_id: string;
|
|
162
|
+
sandbox_instance_id?: string | null;
|
|
163
|
+
sandbox_id?: string | null;
|
|
164
|
+
status?: string | null;
|
|
165
|
+
tier?: string | null;
|
|
166
|
+
armed?: boolean;
|
|
167
|
+
reason?: string | null;
|
|
168
|
+
}>>>;
|
|
169
|
+
export declare const callConversationSandboxUnbind: (options: {
|
|
170
|
+
conversationId: string;
|
|
171
|
+
body?: unknown;
|
|
172
|
+
signal?: AbortSignal;
|
|
173
|
+
scopeOverrides?: Partial<import("../defaults/server-api.js").DefaultCallScope>;
|
|
174
|
+
onStreamStart?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamStart"];
|
|
175
|
+
onStreamEvent?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamEvent"];
|
|
176
|
+
onStreamComplete?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamComplete"];
|
|
177
|
+
onStreamError?: import("../defaults/server-api.js").DefaultApiCallConfig["onStreamError"];
|
|
178
|
+
}) => import("../defaults/server-api.js").DefaultServerThunk<Promise<import("../defaults/server-api.js").DefaultApiCallResult<{
|
|
179
|
+
conversation_id: string;
|
|
180
|
+
sandbox_instance_id?: string | null;
|
|
181
|
+
sandbox_id?: string | null;
|
|
182
|
+
status?: string | null;
|
|
183
|
+
tier?: string | null;
|
|
184
|
+
armed?: boolean;
|
|
185
|
+
reason?: string | null;
|
|
186
|
+
}>>>;
|
|
122
187
|
export type ApiCallError = ChatServerTypes["ApiCallError"];
|
|
123
188
|
export type ApiCallResult = ChatServerTypes["ApiCallResult"];
|
|
124
189
|
export type CallScope = ChatServerTypes["CallScope"];
|
|
@@ -132,3 +197,7 @@ export type RestoreCompactionResult = ChatServerTypes["RestoreCompactionResult"]
|
|
|
132
197
|
export type CompactTurnsResult = ChatServerTypes["CompactTurnsResult"];
|
|
133
198
|
export type ConversationForkBody = ChatServerTypes["ConversationForkBody"];
|
|
134
199
|
export type ConversationForkAndRunBody = ChatServerTypes["ConversationForkAndRunBody"];
|
|
200
|
+
export type ConversationSettingsBody = ChatServerTypes["ConversationSettingsBody"];
|
|
201
|
+
export type ConversationSettingsResult = ChatServerTypes["ConversationSettingsResult"];
|
|
202
|
+
export type ConversationDeleteResult = ChatServerTypes["ConversationDeleteResult"];
|
|
203
|
+
export type SandboxBindBody = ChatServerTypes["SandboxBindBody"];
|
|
@@ -11,14 +11,22 @@ const callReplaceMessages = forwardServer("callReplaceMessages");
|
|
|
11
11
|
const callHideMessages = forwardServer("callHideMessages");
|
|
12
12
|
const callRestoreCompaction = forwardServer("callRestoreCompaction");
|
|
13
13
|
const callCompactTurns = forwardServer("callCompactTurns");
|
|
14
|
+
const callConversationUpdate = forwardServer("callConversationUpdate");
|
|
15
|
+
const callConversationDelete = forwardServer("callConversationDelete");
|
|
16
|
+
const callConversationSandboxBind = forwardServer("callConversationSandboxBind");
|
|
17
|
+
const callConversationSandboxUnbind = forwardServer("callConversationSandboxUnbind");
|
|
14
18
|
export {
|
|
15
19
|
buildRequestBody,
|
|
16
20
|
callApi,
|
|
17
21
|
callBatchDeleteMessages,
|
|
18
22
|
callCompactTurns,
|
|
23
|
+
callConversationDelete,
|
|
19
24
|
callConversationFork,
|
|
20
25
|
callConversationForkAndRun,
|
|
21
26
|
callConversationMemoryCost,
|
|
27
|
+
callConversationSandboxBind,
|
|
28
|
+
callConversationSandboxUnbind,
|
|
29
|
+
callConversationUpdate,
|
|
22
30
|
callHideMessages,
|
|
23
31
|
callReplaceMessages,
|
|
24
32
|
callRestoreCompaction,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/chat",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5",
|
|
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 explicit per-module subpaths @ai-matrx/chat/<domain>/<module> (no wildcards: scripts/public-modules.json) over a host contract (/host, /host/react) whose only required value is a db. One chat, one renderer: the old kernel entries (., /external-store, /matrx, /react, /tools, styles.css, tokens.css) are retired.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -4668,12 +4668,11 @@
|
|
|
4668
4668
|
"zod": "^4.6.5",
|
|
4669
4669
|
"@ai-matrx/alchemy": "latest",
|
|
4670
4670
|
"@ai-matrx/associations": "latest",
|
|
4671
|
-
"@ai-matrx/agents": "latest",
|
|
4672
|
-
"@ai-matrx/browser-audio": "latest",
|
|
4673
4671
|
"@ai-matrx/content-ir": "latest",
|
|
4674
|
-
"@ai-matrx/
|
|
4675
|
-
"@ai-matrx/content-ir-react": "latest",
|
|
4672
|
+
"@ai-matrx/agents": "latest",
|
|
4676
4673
|
"@ai-matrx/data": "latest",
|
|
4674
|
+
"@ai-matrx/design-system": "latest",
|
|
4675
|
+
"@ai-matrx/diff": "latest",
|
|
4677
4676
|
"@ai-matrx/icons": "latest",
|
|
4678
4677
|
"@ai-matrx/kit": "latest",
|
|
4679
4678
|
"@ai-matrx/media": "latest",
|
|
@@ -4681,10 +4680,11 @@
|
|
|
4681
4680
|
"@ai-matrx/realtime": "latest",
|
|
4682
4681
|
"@ai-matrx/records": "latest",
|
|
4683
4682
|
"@ai-matrx/records-ui": "latest",
|
|
4684
|
-
"@ai-matrx/rich-content": "latest",
|
|
4685
4683
|
"@ai-matrx/rich-editor": "latest",
|
|
4686
|
-
"@ai-matrx/
|
|
4687
|
-
"@ai-matrx/
|
|
4684
|
+
"@ai-matrx/content-ir-react": "latest",
|
|
4685
|
+
"@ai-matrx/canvas": "latest",
|
|
4686
|
+
"@ai-matrx/browser-audio": "latest",
|
|
4687
|
+
"@ai-matrx/rich-content": "latest"
|
|
4688
4688
|
},
|
|
4689
4689
|
"devDependencies": {
|
|
4690
4690
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
@@ -4781,7 +4781,8 @@
|
|
|
4781
4781
|
"scripts": {
|
|
4782
4782
|
"build": "pnpm --filter @ai-matrx/rich-editor build && pnpm clean && tsup && node ./scripts/tsc-own.mjs -p tsconfig.build.json && node ./scripts/finish-build.mjs",
|
|
4783
4783
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
4784
|
-
"check:
|
|
4784
|
+
"check:styles": "node ../scripts/check-package-styles.mjs --package chat",
|
|
4785
|
+
"check:package": "pnpm build && pnpm check:styles && node ../scripts/check-exports-agreement.mjs && publint && pnpm verify:tarball && pnpm verify:modules-tarball && pnpm check:front-door:self-test && pnpm check:front-door:canary && pnpm check:host-boundary && pnpm check:no-builder-tier && pnpm check:one-holder && pnpm check:host-doors && pnpm check:no-package-slots && pnpm check:public-surface && pnpm check:side-effects && pnpm check:one-block-engine",
|
|
4785
4786
|
"check:host-boundary": "node ./scripts/check-host-boundary.mjs && node ./scripts/check-host-boundary.mjs --self-test",
|
|
4786
4787
|
"check:host-doors": "node ./scripts/check-host-source-doors.mjs && node ./scripts/check-host-source-doors.mjs --self-test",
|
|
4787
4788
|
"check:no-package-slots": "node ./scripts/check-no-package-slots.mjs && node ./scripts/check-no-package-slots.mjs --self-test",
|
|
@@ -4802,5 +4803,5 @@
|
|
|
4802
4803
|
"check:side-effects": "node ../scripts/check-side-effects-listed.mjs . && node ../scripts/check-side-effects-listed.mjs --self-test",
|
|
4803
4804
|
"check:public-surface": "node ./scripts/sync-public-surface.mjs --check && node ./scripts/sync-public-surface.mjs --self-test"
|
|
4804
4805
|
},
|
|
4805
|
-
"gitHead": "
|
|
4806
|
+
"gitHead": "f454ad2b6bb89fd398ef3fb05603ded30ca95dc0"
|
|
4806
4807
|
}
|