@ai-matrx/chat 0.2.2 → 0.2.4
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 +17 -0
- package/dist/agent-copy/AlchemySurfaceBridge.js +1 -1
- package/dist/agent-copy/alchemy-session.d.ts +2 -2
- package/dist/agent-copy/page-capture/pageCapture.d.ts +1 -1
- package/dist/agents/conversation-export/conversation-transfer.d.ts +1 -1
- package/dist/agents/conversation-export/conversation-transfer.js +7 -2
- package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +0 -12
- package/dist/agents/redux/execution-system/thunks/run-headless-agent-json.d.ts +10 -1
- package/dist/agents/redux/execution-system/thunks/run-headless-agent-json.js +12 -11
- package/dist/store/hooks.d.ts +3 -135
- package/dist/store/root-state.d.ts +2 -11
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @ai-matrx/chat
|
|
2
2
|
|
|
3
|
+
## 0.2.4 — 2026-10-06
|
|
4
|
+
|
|
5
|
+
- The Alchemy menu imports come from `@ai-matrx/alchemy/react/workspace` and transfer types from
|
|
6
|
+
`@ai-matrx/alchemy/operate` (ALC-16; design-system 0.69.0 removed `./content-transfer`).
|
|
7
|
+
`conversationJsonFormat` is the contract's lazy `FormatAdapter` (`load()` → `build(draft, options, signal)`).
|
|
8
|
+
- `store/root-state.ts` `ChatHostReadSlices` drops its `[field: string]: unknown` index signatures, so a
|
|
9
|
+
host's concrete slice interfaces (matrx-frontend's `UserAuthState`, …) are assignable to the
|
|
10
|
+
package's emitted selector/thunk signatures (P27: ~490 of the 646 app errors against 0.2.3).
|
|
11
|
+
- Consumer action: none.
|
|
12
|
+
|
|
13
|
+
## 0.2.3
|
|
14
|
+
### The frontend's last in-flight chat edit, carried at the P27 cutover
|
|
15
|
+
|
|
16
|
+
- `run-headless-agent-json.ts`: an edit another lane had uncommitted in matrx-frontend's
|
|
17
|
+
`packages/chat` when that copy was deleted, carried here verbatim.
|
|
18
|
+
- Consumer action: none.
|
|
19
|
+
|
|
3
20
|
## 0.2.2
|
|
4
21
|
### Last re-sync before matrx-frontend consumes the published package (P27)
|
|
5
22
|
|
|
@@ -4,7 +4,7 @@ import { useEffect, useId, useRef } from "react";
|
|
|
4
4
|
import {
|
|
5
5
|
createSurfaceTransferHandle
|
|
6
6
|
} from "@ai-matrx/alchemy/operate";
|
|
7
|
-
import { ContentTransferSurfaceProvider } from "@ai-matrx/
|
|
7
|
+
import { ContentTransferSurfaceProvider } from "@ai-matrx/alchemy/react/workspace";
|
|
8
8
|
import { getSurfaceManifest } from "../host/ui-slots.js";
|
|
9
9
|
function useAlchemySurfaceHandle(surfaceName, getScope) {
|
|
10
10
|
const instanceId = useId();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FormatAdapter, Payload, Source } from "@ai-matrx/
|
|
2
|
-
import type { EnvelopeMeta, TransferMenuVariant } from "@ai-matrx/
|
|
1
|
+
import type { FormatAdapter, Payload, Source } from "@ai-matrx/alchemy/operate";
|
|
2
|
+
import type { EnvelopeMeta, TransferMenuVariant } from "@ai-matrx/alchemy/react/workspace";
|
|
3
3
|
export type AlchemySessionIntent =
|
|
4
4
|
/**
|
|
5
5
|
* The preparation workspace (trim, choose, AI preparation, destinations). `forDestination`: the
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* network — the suite drives it directly.
|
|
16
16
|
*/
|
|
17
17
|
import type { AgentPayloadInput } from "@ai-matrx/alchemy/operate";
|
|
18
|
-
import type { AlchemyGroomerConfig } from "@ai-matrx/
|
|
18
|
+
import type { AlchemyGroomerConfig } from "@ai-matrx/alchemy/react/workspace";
|
|
19
19
|
export type PageCaptureKind = "table-page" | "record" | "dialog" | "admin-page";
|
|
20
20
|
/** A chosen thing, by name and id. Either may be null (not chosen / not loaded). */
|
|
21
21
|
export interface PageCaptureNamed {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ConversationTransferRow } from "./conversation-transfer-rows.js";
|
|
2
2
|
import type { Payload, Section, Source } from "@ai-matrx/alchemy/operate";
|
|
3
|
-
import type { FormatAdapter } from "@ai-matrx/
|
|
3
|
+
import type { FormatAdapter } from "@ai-matrx/alchemy/operate";
|
|
4
4
|
import type { ChatDispatch, ChatRootState } from "../../store/root-state.js";
|
|
5
5
|
export interface ConversationMessageRow {
|
|
6
6
|
role: "user" | "assistant";
|
|
@@ -100,8 +100,13 @@ function conversationJsonFormat(read) {
|
|
|
100
100
|
return {
|
|
101
101
|
id: "json",
|
|
102
102
|
label: "JSON",
|
|
103
|
+
extension: "json",
|
|
104
|
+
mime: "application/json;charset=utf-8",
|
|
105
|
+
modes: ["copy", "download"],
|
|
106
|
+
runsOn: "client",
|
|
103
107
|
supports: (payload) => payload.kind === "markdown" || payload.kind === "text",
|
|
104
|
-
|
|
108
|
+
// The contract's lazy adapter (`@ai-matrx/alchemy/operate`): the engine is this closure.
|
|
109
|
+
load: async () => ({ build: async (draft, _options, signal) => {
|
|
105
110
|
const c = await read();
|
|
106
111
|
signal.throwIfAborted();
|
|
107
112
|
const onlyCut = !draft.manuallyEdited && draft.provenance.every((p) => p.kind === "original" || p.kind === "deterministic") && draft.omissions.every((o) => o.reason === "excluded");
|
|
@@ -128,7 +133,7 @@ function conversationJsonFormat(read) {
|
|
|
128
133
|
file: { filename: `${c.fileBase}.json`, mime: "application/json;charset=utf-8", bytes: new TextEncoder().encode(json) },
|
|
129
134
|
omissions: draft.omissions.map((o) => ({ ...o }))
|
|
130
135
|
});
|
|
131
|
-
}
|
|
136
|
+
} })
|
|
132
137
|
};
|
|
133
138
|
}
|
|
134
139
|
function sourceOf(id, label, read) {
|
|
@@ -418,10 +418,8 @@ export declare function makeSelectAssembledRequest(conversationId: string): ((st
|
|
|
418
418
|
resetResultsCount: () => void;
|
|
419
419
|
} & {
|
|
420
420
|
resultFunc: (resultFuncArgs_0: import("../conversations/conversations.slice.js").ConversationsState, resultFuncArgs_1: import("../instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice, resultFuncArgs_2: import("../instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState, resultFuncArgs_3: import("../instance-resources/instance-resources.slice.js").InstanceResourcesState, resultFuncArgs_4: import("../instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState, resultFuncArgs_5: import("../instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState, resultFuncArgs_6: import("../instance-context/instance-context.slice.js").InstanceContextState, resultFuncArgs_7: import("../instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState, resultFuncArgs_8: {
|
|
421
|
-
[field: string]: unknown;
|
|
422
421
|
organization_id?: string | null;
|
|
423
422
|
} | undefined, resultFuncArgs_9: import("../../../../store/chat-host.slice.js").ChatHostState, resultFuncArgs_10: import("../../../types/agent-definition.types.js").AgentDefinitionSliceState, resultFuncArgs_11: import("../../../../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice, resultFuncArgs_12: import("../messages/messages.slice.js").MessagesState, resultFuncArgs_13: {
|
|
424
|
-
[field: string]: unknown;
|
|
425
423
|
id: string | null;
|
|
426
424
|
email?: string | null;
|
|
427
425
|
isAnonymous?: boolean;
|
|
@@ -430,20 +428,16 @@ export declare function makeSelectAssembledRequest(conversationId: string): ((st
|
|
|
430
428
|
adminLaneOpen?: boolean;
|
|
431
429
|
adminLevel?: string | null;
|
|
432
430
|
} | undefined, resultFuncArgs_14: {
|
|
433
|
-
[field: string]: unknown;
|
|
434
431
|
fingerprintId?: string | null;
|
|
435
432
|
userMetadata?: {
|
|
436
433
|
fullName?: string | null;
|
|
437
434
|
name?: string | null;
|
|
438
435
|
preferredUsername?: string | null;
|
|
439
|
-
[field: string]: unknown;
|
|
440
436
|
} | null;
|
|
441
437
|
} | undefined) => AssembledAgentStartRequest | null;
|
|
442
438
|
memoizedResultFunc: ((resultFuncArgs_0: import("../conversations/conversations.slice.js").ConversationsState, resultFuncArgs_1: import("../instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice, resultFuncArgs_2: import("../instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState, resultFuncArgs_3: import("../instance-resources/instance-resources.slice.js").InstanceResourcesState, resultFuncArgs_4: import("../instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState, resultFuncArgs_5: import("../instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState, resultFuncArgs_6: import("../instance-context/instance-context.slice.js").InstanceContextState, resultFuncArgs_7: import("../instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState, resultFuncArgs_8: {
|
|
443
|
-
[field: string]: unknown;
|
|
444
439
|
organization_id?: string | null;
|
|
445
440
|
} | undefined, resultFuncArgs_9: import("../../../../store/chat-host.slice.js").ChatHostState, resultFuncArgs_10: import("../../../types/agent-definition.types.js").AgentDefinitionSliceState, resultFuncArgs_11: import("../../../../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice, resultFuncArgs_12: import("../messages/messages.slice.js").MessagesState, resultFuncArgs_13: {
|
|
446
|
-
[field: string]: unknown;
|
|
447
441
|
id: string | null;
|
|
448
442
|
email?: string | null;
|
|
449
443
|
isAnonymous?: boolean;
|
|
@@ -452,13 +446,11 @@ export declare function makeSelectAssembledRequest(conversationId: string): ((st
|
|
|
452
446
|
adminLaneOpen?: boolean;
|
|
453
447
|
adminLevel?: string | null;
|
|
454
448
|
} | undefined, resultFuncArgs_14: {
|
|
455
|
-
[field: string]: unknown;
|
|
456
449
|
fingerprintId?: string | null;
|
|
457
450
|
userMetadata?: {
|
|
458
451
|
fullName?: string | null;
|
|
459
452
|
name?: string | null;
|
|
460
453
|
preferredUsername?: string | null;
|
|
461
|
-
[field: string]: unknown;
|
|
462
454
|
} | null;
|
|
463
455
|
} | undefined) => AssembledAgentStartRequest | null) & {
|
|
464
456
|
clearCache: () => void;
|
|
@@ -467,10 +459,8 @@ export declare function makeSelectAssembledRequest(conversationId: string): ((st
|
|
|
467
459
|
};
|
|
468
460
|
lastResult: () => AssembledAgentStartRequest | null;
|
|
469
461
|
dependencies: [(s: ChatRootState) => import("../conversations/conversations.slice.js").ConversationsState, (s: ChatRootState) => import("../instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice, (s: ChatRootState) => import("../instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState, (s: ChatRootState) => import("../instance-resources/instance-resources.slice.js").InstanceResourcesState, (s: ChatRootState) => import("../instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState, (s: ChatRootState) => import("../instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState, (s: ChatRootState) => import("../instance-context/instance-context.slice.js").InstanceContextState, (s: ChatRootState) => import("../instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState, (s: ChatRootState) => {
|
|
470
|
-
[field: string]: unknown;
|
|
471
462
|
organization_id?: string | null;
|
|
472
463
|
} | undefined, (s: ChatRootState) => import("../../../../store/chat-host.slice.js").ChatHostState, (s: ChatRootState) => import("../../../types/agent-definition.types.js").AgentDefinitionSliceState, (s: ChatRootState) => import("../../../../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice, (s: ChatRootState) => import("../messages/messages.slice.js").MessagesState, (s: ChatRootState) => {
|
|
473
|
-
[field: string]: unknown;
|
|
474
464
|
id: string | null;
|
|
475
465
|
email?: string | null;
|
|
476
466
|
isAnonymous?: boolean;
|
|
@@ -479,13 +469,11 @@ export declare function makeSelectAssembledRequest(conversationId: string): ((st
|
|
|
479
469
|
adminLaneOpen?: boolean;
|
|
480
470
|
adminLevel?: string | null;
|
|
481
471
|
} | undefined, (s: ChatRootState) => {
|
|
482
|
-
[field: string]: unknown;
|
|
483
472
|
fingerprintId?: string | null;
|
|
484
473
|
userMetadata?: {
|
|
485
474
|
fullName?: string | null;
|
|
486
475
|
name?: string | null;
|
|
487
476
|
preferredUsername?: string | null;
|
|
488
|
-
[field: string]: unknown;
|
|
489
477
|
} | null;
|
|
490
478
|
} | undefined];
|
|
491
479
|
recomputations: () => number;
|
|
@@ -28,12 +28,21 @@
|
|
|
28
28
|
import type { ChatDispatch, ChatRootState } from "../../../../store/root-state.js";
|
|
29
29
|
import type { MessagePart } from "@ai-matrx/agents/generated/stream-events";
|
|
30
30
|
import type { ContextAnchor, SourceFeature, RequestInitiation } from "../../../types/instance.types.js";
|
|
31
|
+
import type { ApplicationScope } from "../../../types/scope.types.js";
|
|
31
32
|
import type { AnyMandateKey } from "@ai-matrx/agents/mandates";
|
|
32
33
|
export interface HeadlessAgentJsonOptions {
|
|
33
|
-
/** Exact agent to run. Mutually exclusive with mandateKey. */
|
|
34
|
+
/** Exact agent to run. Mutually exclusive with mandateKey and shortcutId. */
|
|
34
35
|
agentId?: string;
|
|
35
36
|
/** Swappable mandate to resolve inside the canonical launcher, preserving config_overrides. */
|
|
36
37
|
mandateKey?: AnyMandateKey;
|
|
38
|
+
/**
|
|
39
|
+
* A saved shortcut to run: the launcher resolves its agent, config and scope
|
|
40
|
+
* mappings exactly as a menu click would. Mutually exclusive with agentId and
|
|
41
|
+
* mandateKey. Pair with `applicationScope` for the shortcut's mapped values.
|
|
42
|
+
*/
|
|
43
|
+
shortcutId?: string;
|
|
44
|
+
/** UI-captured scope values a shortcut's scopeMappings read (selection, content, …). */
|
|
45
|
+
applicationScope?: ApplicationScope;
|
|
37
46
|
/** Stable surface key for telemetry + the focus registry. */
|
|
38
47
|
surfaceKey: string;
|
|
39
48
|
/** UI feature that triggered the run. */
|
|
@@ -176,7 +176,7 @@ async function runHeadlessAgentJson(dispatch, getState, opts) {
|
|
|
176
176
|
{
|
|
177
177
|
onResult: opts.onResult,
|
|
178
178
|
surfaceKey: opts.surfaceKey,
|
|
179
|
-
agentRef: opts.agentId ?? opts.mandateKey ?? "unknown"
|
|
179
|
+
agentRef: opts.agentId ?? opts.mandateKey ?? opts.shortcutId ?? "unknown"
|
|
180
180
|
},
|
|
181
181
|
result
|
|
182
182
|
);
|
|
@@ -244,20 +244,20 @@ async function launchAndWait(dispatch, getState, opts) {
|
|
|
244
244
|
};
|
|
245
245
|
try {
|
|
246
246
|
let executionIdentity;
|
|
247
|
+
const identities = [opts.agentId, opts.mandateKey, opts.shortcutId].filter((v) => v !== void 0);
|
|
248
|
+
if (identities.length !== 1) {
|
|
249
|
+
throw new Error("runHeadlessAgentJson requires exactly one of agentId, mandateKey or shortcutId");
|
|
250
|
+
}
|
|
247
251
|
if (opts.mandateKey !== void 0) {
|
|
248
|
-
if (opts.agentId !== void 0) {
|
|
249
|
-
throw new Error("runHeadlessAgentJson accepts agentId or mandateKey, never both");
|
|
250
|
-
}
|
|
251
252
|
executionIdentity = { mandateKey: opts.mandateKey };
|
|
253
|
+
} else if (opts.shortcutId !== void 0) {
|
|
254
|
+
executionIdentity = { shortcutId: opts.shortcutId };
|
|
252
255
|
} else {
|
|
253
|
-
if (opts.agentId === void 0) {
|
|
254
|
-
throw new Error("runHeadlessAgentJson requires agentId or mandateKey");
|
|
255
|
-
}
|
|
256
256
|
executionIdentity = { agentId: opts.agentId };
|
|
257
257
|
}
|
|
258
258
|
screamIfDeclaredFlattening(
|
|
259
259
|
opts,
|
|
260
|
-
opts.agentId ?? opts.mandateKey ?? "unknown"
|
|
260
|
+
opts.agentId ?? opts.mandateKey ?? opts.shortcutId ?? "unknown"
|
|
261
261
|
);
|
|
262
262
|
const launch = await dispatch(
|
|
263
263
|
launchAgentExecution({
|
|
@@ -282,7 +282,8 @@ async function launchAndWait(dispatch, getState, opts) {
|
|
|
282
282
|
runtime: {
|
|
283
283
|
...opts.surfaceName !== void 0 ? { surfaceName: opts.surfaceName } : {},
|
|
284
284
|
...opts.variables ? { variables: opts.variables } : {},
|
|
285
|
-
...opts.userInput !== void 0 ? { userInput: opts.userInput } : {}
|
|
285
|
+
...opts.userInput !== void 0 ? { userInput: opts.userInput } : {},
|
|
286
|
+
...opts.applicationScope ? { applicationScope: opts.applicationScope } : {}
|
|
286
287
|
},
|
|
287
288
|
// `callerExecutes` is the deliberate half of `autoRun: !twoStep`. A
|
|
288
289
|
// headless launch normally IGNORES autoRun (no interface = nothing to
|
|
@@ -335,7 +336,7 @@ async function launchAndWait(dispatch, getState, opts) {
|
|
|
335
336
|
pollMs,
|
|
336
337
|
settleMs,
|
|
337
338
|
surfaceKey: opts.surfaceKey,
|
|
338
|
-
agentRef: opts.agentId ?? opts.mandateKey ?? "unknown",
|
|
339
|
+
agentRef: opts.agentId ?? opts.mandateKey ?? opts.shortcutId ?? "unknown",
|
|
339
340
|
msgs,
|
|
340
341
|
expect: opts.expect ?? "json",
|
|
341
342
|
...opts.signal ? { signal: opts.signal } : {},
|
|
@@ -351,7 +352,7 @@ async function launchAndWait(dispatch, getState, opts) {
|
|
|
351
352
|
conversationId: conversationId ?? void 0,
|
|
352
353
|
raw: {
|
|
353
354
|
surfaceKey: opts.surfaceKey,
|
|
354
|
-
agent: opts.agentId ?? opts.mandateKey ?? "unknown",
|
|
355
|
+
agent: opts.agentId ?? opts.mandateKey ?? opts.shortcutId ?? "unknown",
|
|
355
356
|
detail,
|
|
356
357
|
// Only when nothing readable came out: the raw shape, so a throw this
|
|
357
358
|
// helper cannot read is a bug report rather than a shrug.
|
package/dist/store/hooks.d.ts
CHANGED
|
@@ -6,138 +6,6 @@ export declare const useChatSelector: UseSelector<ChatRootState>;
|
|
|
6
6
|
export declare const useChatDispatch: UseDispatch<ChatDispatch>;
|
|
7
7
|
/** The chat store itself (for `getState()` inside callbacks). */
|
|
8
8
|
export declare const useChatStore: UseStore<ChatAppStore>;
|
|
9
|
-
export declare const useAppSelector: UseSelector<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
conversationList: import("../agents/redux/conversation-list/conversation-list.types.js").ConversationListState;
|
|
13
|
-
conversationHistory: import("../agents/redux/conversation-history/index.js").ConversationHistoryState;
|
|
14
|
-
agentShortcut: import("../agents/redux/agent-shortcuts/types.js").AgentShortcutSliceState;
|
|
15
|
-
agentShortcutCategory: import("../agents/redux/agent-shortcut-categories/types.js").AgentShortcutCategorySliceState;
|
|
16
|
-
surfaceUserState: import("../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice;
|
|
17
|
-
tools: import("../agents/redux/tools/tools.slice.js").ToolsSliceState;
|
|
18
|
-
conversations: import("../agents/redux/execution-system/conversations/conversations.slice.js").ConversationsState;
|
|
19
|
-
chatIncognito: import("../agents/redux/chat/chat-incognito.slice.js").ChatIncognitoState;
|
|
20
|
-
chatRoute: import("../agents/redux/chat/chat-route.slice.js").ChatRouteState;
|
|
21
|
-
instanceModelOverrides: import("../agents/redux/execution-system/instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState;
|
|
22
|
-
instanceInputCapabilities: import("../agents/redux/execution-system/instance-input-capabilities/instance-input-capabilities.slice.js").InstanceInputCapabilitiesState;
|
|
23
|
-
instanceVariableValues: import("../agents/redux/execution-system/instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState;
|
|
24
|
-
instanceResources: import("../agents/redux/execution-system/instance-resources/instance-resources.slice.js").InstanceResourcesState;
|
|
25
|
-
instanceContext: import("../agents/redux/execution-system/instance-context/instance-context.slice.js").InstanceContextState;
|
|
26
|
-
instanceWorkingDocument: import("../agents/redux/execution-system/instance-working-document/instance-working-document.slice.js").InstanceWorkingDocumentSliceState;
|
|
27
|
-
instanceUserInput: import("../agents/redux/execution-system/instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState;
|
|
28
|
-
instanceClientTools: import("../agents/redux/execution-system/instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState;
|
|
29
|
-
pendingAsks: import("../agents/ui-first-tools/redux/pending-asks.slice.js").PendingAsksState;
|
|
30
|
-
conversationInbox: import("../agents/redux/execution-system/inbox/inbox.slice.js").ConversationInboxState;
|
|
31
|
-
agentLists: import("../agents/ui-first-tools/redux/agent-lists.slice.js").AgentListsState;
|
|
32
|
-
instanceUIState: import("../agents/redux/execution-system/instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice;
|
|
33
|
-
activeTools: import("../agents/redux/execution-system/active-tools/active-tools.slice.js").ActiveToolsState;
|
|
34
|
-
activeRequests: import("../agents/redux/execution-system/active-requests/active-requests.slice.js").ActiveRequestsState;
|
|
35
|
-
runSets: import("../agents/redux/execution-system/run-sets/run-sets.slice.js").RunSetsState;
|
|
36
|
-
messages: import("../agents/redux/execution-system/messages/messages.slice.js").MessagesState;
|
|
37
|
-
observability: import("../agents/redux/execution-system/observability/observability.slice.js").ObservabilityState;
|
|
38
|
-
contextState: import("../agents/redux/execution-system/context-state/context-state.slice.js").ContextStateSliceState;
|
|
39
|
-
observationalMemory: import("../agents/redux/execution-system/observational-memory/observational-memory.slice.js").ObservationalMemoryState;
|
|
40
|
-
cacheBypass: import("../agents/redux/execution-system/message-crud/cache-bypass.slice.js").CacheBypassState;
|
|
41
|
-
conversationFocus: import("../agents/redux/execution-system/conversation-focus/conversation-focus.slice.js").ConversationFocusState;
|
|
42
|
-
surfaces: import("../agents/redux/surfaces/surfaces.slice.js").SurfacesState;
|
|
43
|
-
surfacesCatalog: import("../surfaces/redux/surfacesCatalogSlice.js").SurfacesCatalogSliceState;
|
|
44
|
-
agentSurfaceBindings: import("../surfaces/redux/agentSurfaceBindingsSlice.js").AgentSurfaceBindingsSliceState;
|
|
45
|
-
surfaceConfig: import("../surfaces/redux/surfaceConfigSlice.js").SurfaceConfigSliceState;
|
|
46
|
-
agentAssistantMarkdownDraft: import("../agents/redux/agent-assistant-markdown-draft.slice.js").AgentAssistantMarkdownDraftState;
|
|
47
|
-
mcp: import("../agents/redux/mcp/mcp.slice.js").McpSliceState;
|
|
48
|
-
proposedDirectives: import("../agents/redux/proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
49
|
-
agentSettings: import("../agents/redux/agent-settings/types.js").AgentSettingsState;
|
|
50
|
-
conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
|
|
51
|
-
modelRegistry: import("../agents/model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
52
|
-
chatHost: import("./chat-host.slice.js").ChatHostState;
|
|
53
|
-
} & import("./root-state.js").ChatHostReadSlices>;
|
|
54
|
-
export declare const useAppDispatch: UseDispatch<import("redux-thunk").ThunkDispatch<{
|
|
55
|
-
voiceAgent: import("../voice-agent/types.js").VoiceAgentState;
|
|
56
|
-
agentDefinition: import("../agents/types/agent-definition.types.js").AgentDefinitionSliceState;
|
|
57
|
-
conversationList: import("../agents/redux/conversation-list/conversation-list.types.js").ConversationListState;
|
|
58
|
-
conversationHistory: import("../agents/redux/conversation-history/index.js").ConversationHistoryState;
|
|
59
|
-
agentShortcut: import("../agents/redux/agent-shortcuts/types.js").AgentShortcutSliceState;
|
|
60
|
-
agentShortcutCategory: import("../agents/redux/agent-shortcut-categories/types.js").AgentShortcutCategorySliceState;
|
|
61
|
-
surfaceUserState: import("../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice;
|
|
62
|
-
tools: import("../agents/redux/tools/tools.slice.js").ToolsSliceState;
|
|
63
|
-
conversations: import("../agents/redux/execution-system/conversations/conversations.slice.js").ConversationsState;
|
|
64
|
-
chatIncognito: import("../agents/redux/chat/chat-incognito.slice.js").ChatIncognitoState;
|
|
65
|
-
chatRoute: import("../agents/redux/chat/chat-route.slice.js").ChatRouteState;
|
|
66
|
-
instanceModelOverrides: import("../agents/redux/execution-system/instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState;
|
|
67
|
-
instanceInputCapabilities: import("../agents/redux/execution-system/instance-input-capabilities/instance-input-capabilities.slice.js").InstanceInputCapabilitiesState;
|
|
68
|
-
instanceVariableValues: import("../agents/redux/execution-system/instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState;
|
|
69
|
-
instanceResources: import("../agents/redux/execution-system/instance-resources/instance-resources.slice.js").InstanceResourcesState;
|
|
70
|
-
instanceContext: import("../agents/redux/execution-system/instance-context/instance-context.slice.js").InstanceContextState;
|
|
71
|
-
instanceWorkingDocument: import("../agents/redux/execution-system/instance-working-document/instance-working-document.slice.js").InstanceWorkingDocumentSliceState;
|
|
72
|
-
instanceUserInput: import("../agents/redux/execution-system/instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState;
|
|
73
|
-
instanceClientTools: import("../agents/redux/execution-system/instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState;
|
|
74
|
-
pendingAsks: import("../agents/ui-first-tools/redux/pending-asks.slice.js").PendingAsksState;
|
|
75
|
-
conversationInbox: import("../agents/redux/execution-system/inbox/inbox.slice.js").ConversationInboxState;
|
|
76
|
-
agentLists: import("../agents/ui-first-tools/redux/agent-lists.slice.js").AgentListsState;
|
|
77
|
-
instanceUIState: import("../agents/redux/execution-system/instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice;
|
|
78
|
-
activeTools: import("../agents/redux/execution-system/active-tools/active-tools.slice.js").ActiveToolsState;
|
|
79
|
-
activeRequests: import("../agents/redux/execution-system/active-requests/active-requests.slice.js").ActiveRequestsState;
|
|
80
|
-
runSets: import("../agents/redux/execution-system/run-sets/run-sets.slice.js").RunSetsState;
|
|
81
|
-
messages: import("../agents/redux/execution-system/messages/messages.slice.js").MessagesState;
|
|
82
|
-
observability: import("../agents/redux/execution-system/observability/observability.slice.js").ObservabilityState;
|
|
83
|
-
contextState: import("../agents/redux/execution-system/context-state/context-state.slice.js").ContextStateSliceState;
|
|
84
|
-
observationalMemory: import("../agents/redux/execution-system/observational-memory/observational-memory.slice.js").ObservationalMemoryState;
|
|
85
|
-
cacheBypass: import("../agents/redux/execution-system/message-crud/cache-bypass.slice.js").CacheBypassState;
|
|
86
|
-
conversationFocus: import("../agents/redux/execution-system/conversation-focus/conversation-focus.slice.js").ConversationFocusState;
|
|
87
|
-
surfaces: import("../agents/redux/surfaces/surfaces.slice.js").SurfacesState;
|
|
88
|
-
surfacesCatalog: import("../surfaces/redux/surfacesCatalogSlice.js").SurfacesCatalogSliceState;
|
|
89
|
-
agentSurfaceBindings: import("../surfaces/redux/agentSurfaceBindingsSlice.js").AgentSurfaceBindingsSliceState;
|
|
90
|
-
surfaceConfig: import("../surfaces/redux/surfaceConfigSlice.js").SurfaceConfigSliceState;
|
|
91
|
-
agentAssistantMarkdownDraft: import("../agents/redux/agent-assistant-markdown-draft.slice.js").AgentAssistantMarkdownDraftState;
|
|
92
|
-
mcp: import("../agents/redux/mcp/mcp.slice.js").McpSliceState;
|
|
93
|
-
proposedDirectives: import("../agents/redux/proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
94
|
-
agentSettings: import("../agents/redux/agent-settings/types.js").AgentSettingsState;
|
|
95
|
-
conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
|
|
96
|
-
modelRegistry: import("../agents/model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
97
|
-
chatHost: import("./chat-host.slice.js").ChatHostState;
|
|
98
|
-
} & import("./root-state.js").ChatHostReadSlices, unknown, import("redux").UnknownAction> & import("redux").Dispatch<import("redux").UnknownAction>>;
|
|
99
|
-
export declare const useAppStore: UseStore<import("redux").Store<{
|
|
100
|
-
voiceAgent: import("../voice-agent/types.js").VoiceAgentState;
|
|
101
|
-
agentDefinition: import("../agents/types/agent-definition.types.js").AgentDefinitionSliceState;
|
|
102
|
-
conversationList: import("../agents/redux/conversation-list/conversation-list.types.js").ConversationListState;
|
|
103
|
-
conversationHistory: import("../agents/redux/conversation-history/index.js").ConversationHistoryState;
|
|
104
|
-
agentShortcut: import("../agents/redux/agent-shortcuts/types.js").AgentShortcutSliceState;
|
|
105
|
-
agentShortcutCategory: import("../agents/redux/agent-shortcut-categories/types.js").AgentShortcutCategorySliceState;
|
|
106
|
-
surfaceUserState: import("../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice;
|
|
107
|
-
tools: import("../agents/redux/tools/tools.slice.js").ToolsSliceState;
|
|
108
|
-
conversations: import("../agents/redux/execution-system/conversations/conversations.slice.js").ConversationsState;
|
|
109
|
-
chatIncognito: import("../agents/redux/chat/chat-incognito.slice.js").ChatIncognitoState;
|
|
110
|
-
chatRoute: import("../agents/redux/chat/chat-route.slice.js").ChatRouteState;
|
|
111
|
-
instanceModelOverrides: import("../agents/redux/execution-system/instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState;
|
|
112
|
-
instanceInputCapabilities: import("../agents/redux/execution-system/instance-input-capabilities/instance-input-capabilities.slice.js").InstanceInputCapabilitiesState;
|
|
113
|
-
instanceVariableValues: import("../agents/redux/execution-system/instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState;
|
|
114
|
-
instanceResources: import("../agents/redux/execution-system/instance-resources/instance-resources.slice.js").InstanceResourcesState;
|
|
115
|
-
instanceContext: import("../agents/redux/execution-system/instance-context/instance-context.slice.js").InstanceContextState;
|
|
116
|
-
instanceWorkingDocument: import("../agents/redux/execution-system/instance-working-document/instance-working-document.slice.js").InstanceWorkingDocumentSliceState;
|
|
117
|
-
instanceUserInput: import("../agents/redux/execution-system/instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState;
|
|
118
|
-
instanceClientTools: import("../agents/redux/execution-system/instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState;
|
|
119
|
-
pendingAsks: import("../agents/ui-first-tools/redux/pending-asks.slice.js").PendingAsksState;
|
|
120
|
-
conversationInbox: import("../agents/redux/execution-system/inbox/inbox.slice.js").ConversationInboxState;
|
|
121
|
-
agentLists: import("../agents/ui-first-tools/redux/agent-lists.slice.js").AgentListsState;
|
|
122
|
-
instanceUIState: import("../agents/redux/execution-system/instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice;
|
|
123
|
-
activeTools: import("../agents/redux/execution-system/active-tools/active-tools.slice.js").ActiveToolsState;
|
|
124
|
-
activeRequests: import("../agents/redux/execution-system/active-requests/active-requests.slice.js").ActiveRequestsState;
|
|
125
|
-
runSets: import("../agents/redux/execution-system/run-sets/run-sets.slice.js").RunSetsState;
|
|
126
|
-
messages: import("../agents/redux/execution-system/messages/messages.slice.js").MessagesState;
|
|
127
|
-
observability: import("../agents/redux/execution-system/observability/observability.slice.js").ObservabilityState;
|
|
128
|
-
contextState: import("../agents/redux/execution-system/context-state/context-state.slice.js").ContextStateSliceState;
|
|
129
|
-
observationalMemory: import("../agents/redux/execution-system/observational-memory/observational-memory.slice.js").ObservationalMemoryState;
|
|
130
|
-
cacheBypass: import("../agents/redux/execution-system/message-crud/cache-bypass.slice.js").CacheBypassState;
|
|
131
|
-
conversationFocus: import("../agents/redux/execution-system/conversation-focus/conversation-focus.slice.js").ConversationFocusState;
|
|
132
|
-
surfaces: import("../agents/redux/surfaces/surfaces.slice.js").SurfacesState;
|
|
133
|
-
surfacesCatalog: import("../surfaces/redux/surfacesCatalogSlice.js").SurfacesCatalogSliceState;
|
|
134
|
-
agentSurfaceBindings: import("../surfaces/redux/agentSurfaceBindingsSlice.js").AgentSurfaceBindingsSliceState;
|
|
135
|
-
surfaceConfig: import("../surfaces/redux/surfaceConfigSlice.js").SurfaceConfigSliceState;
|
|
136
|
-
agentAssistantMarkdownDraft: import("../agents/redux/agent-assistant-markdown-draft.slice.js").AgentAssistantMarkdownDraftState;
|
|
137
|
-
mcp: import("../agents/redux/mcp/mcp.slice.js").McpSliceState;
|
|
138
|
-
proposedDirectives: import("../agents/redux/proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
139
|
-
agentSettings: import("../agents/redux/agent-settings/types.js").AgentSettingsState;
|
|
140
|
-
conversationAttachments: import("../agents/connectors/attachments.slice.js").AttachmentsSliceState;
|
|
141
|
-
modelRegistry: import("../agents/model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
142
|
-
chatHost: import("./chat-host.slice.js").ChatHostState;
|
|
143
|
-
} & import("./root-state.js").ChatHostReadSlices, import("redux").UnknownAction, unknown>>;
|
|
9
|
+
export declare const useAppSelector: UseSelector<ChatRootState>;
|
|
10
|
+
export declare const useAppDispatch: UseDispatch<ChatDispatch>;
|
|
11
|
+
export declare const useAppStore: UseStore<ChatAppStore>;
|
|
@@ -6,7 +6,8 @@ export interface ChatStoreRegister {
|
|
|
6
6
|
/**
|
|
7
7
|
* Slices the HOST owns that package code reads when present (§2.3). A private store has none of
|
|
8
8
|
* them, so every read is optional; a registered host store supplies the real shapes. Only the
|
|
9
|
-
* fields the package reads are named
|
|
9
|
+
* fields the package reads are named, with no index signatures, so a host's concrete slice
|
|
10
|
+
* interfaces (which carry extra fields) stay assignable.
|
|
10
11
|
*/
|
|
11
12
|
export interface ChatHostReadSlices {
|
|
12
13
|
userAuth?: {
|
|
@@ -17,11 +18,9 @@ export interface ChatHostReadSlices {
|
|
|
17
18
|
isAdmin?: boolean;
|
|
18
19
|
adminLaneOpen?: boolean;
|
|
19
20
|
adminLevel?: string | null;
|
|
20
|
-
[field: string]: unknown;
|
|
21
21
|
};
|
|
22
22
|
appContext?: {
|
|
23
23
|
organization_id?: string | null;
|
|
24
|
-
[field: string]: unknown;
|
|
25
24
|
};
|
|
26
25
|
userProfile?: {
|
|
27
26
|
fingerprintId?: string | null;
|
|
@@ -29,16 +28,12 @@ export interface ChatHostReadSlices {
|
|
|
29
28
|
fullName?: string | null;
|
|
30
29
|
name?: string | null;
|
|
31
30
|
preferredUsername?: string | null;
|
|
32
|
-
[field: string]: unknown;
|
|
33
31
|
} | null;
|
|
34
|
-
[field: string]: unknown;
|
|
35
32
|
};
|
|
36
33
|
cloudFiles?: {
|
|
37
34
|
filesById: Record<string, {
|
|
38
35
|
fileName?: string | null;
|
|
39
|
-
[field: string]: unknown;
|
|
40
36
|
} | undefined>;
|
|
41
|
-
[field: string]: unknown;
|
|
42
37
|
};
|
|
43
38
|
transcriptStudio?: {
|
|
44
39
|
byId?: Record<string, {
|
|
@@ -46,16 +41,12 @@ export interface ChatHostReadSlices {
|
|
|
46
41
|
assistantConversationId?: string | null;
|
|
47
42
|
assistantConversations?: readonly {
|
|
48
43
|
conversationId: string;
|
|
49
|
-
[field: string]: unknown;
|
|
50
44
|
}[];
|
|
51
|
-
[field: string]: unknown;
|
|
52
45
|
} | undefined>;
|
|
53
46
|
documentsById?: Record<string, Record<string, {
|
|
54
47
|
id?: string;
|
|
55
48
|
content?: string | null;
|
|
56
|
-
[field: string]: unknown;
|
|
57
49
|
} | undefined> | undefined>;
|
|
58
|
-
[field: string]: unknown;
|
|
59
50
|
};
|
|
60
51
|
}
|
|
61
52
|
/** The full store state the package runs in: the host's when registered, else `ChatState` + optional host reads. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/chat",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
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",
|
|
@@ -209,15 +209,15 @@
|
|
|
209
209
|
"@ai-matrx/content-ir": "latest",
|
|
210
210
|
"@ai-matrx/content-ir-react": "latest",
|
|
211
211
|
"@ai-matrx/data": "latest",
|
|
212
|
+
"@ai-matrx/design-system": "latest",
|
|
212
213
|
"@ai-matrx/icons": "latest",
|
|
214
|
+
"@ai-matrx/kit": "latest",
|
|
213
215
|
"@ai-matrx/media": "latest",
|
|
214
|
-
"@ai-matrx/diff": "latest",
|
|
215
216
|
"@ai-matrx/print": "latest",
|
|
216
217
|
"@ai-matrx/realtime": "latest",
|
|
217
|
-
"@ai-matrx/
|
|
218
|
+
"@ai-matrx/diff": "latest",
|
|
218
219
|
"@ai-matrx/records-ui": "latest",
|
|
219
|
-
"@ai-matrx/
|
|
220
|
-
"@ai-matrx/design-system": "latest",
|
|
220
|
+
"@ai-matrx/records": "latest",
|
|
221
221
|
"@ai-matrx/tap-target": "latest"
|
|
222
222
|
},
|
|
223
223
|
"devDependencies": {
|