@ai-matrx/alchemy 0.12.2 → 0.13.0
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 +23 -0
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.d.cts +27 -17
- package/dist/actions.d.ts +27 -17
- package/dist/actions.js.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +4 -2
- package/dist/core.d.ts +4 -2
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/dist/declare.cjs.map +1 -1
- package/dist/declare.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/menu.d.cts +25 -15
- package/dist/menu.d.ts +25 -15
- package/dist/operate.cjs +1 -1
- package/dist/operate.cjs.map +1 -1
- package/dist/operate.d.cts +4 -2
- package/dist/operate.d.ts +4 -2
- package/dist/operate.js +1 -1
- package/dist/operate.js.map +1 -1
- package/dist/ports.d.cts +18 -8
- package/dist/ports.d.ts +18 -8
- package/dist/react-bar.cjs.map +1 -1
- package/dist/react-bar.d.cts +1 -1
- package/dist/react-bar.d.ts +1 -1
- package/dist/react-bar.js.map +1 -1
- package/dist/react-host.d.cts +25 -15
- package/dist/react-host.d.ts +25 -15
- package/dist/react-menu.cjs.map +1 -1
- package/dist/react-menu.d.cts +1 -1
- package/dist/react-menu.d.ts +1 -1
- package/dist/react-menu.js.map +1 -1
- package/dist/react-overflow.cjs.map +1 -1
- package/dist/react-overflow.d.cts +25 -15
- package/dist/react-overflow.d.ts +25 -15
- package/dist/react-overflow.js.map +1 -1
- package/dist/react-palette.cjs.map +1 -1
- package/dist/react-palette.d.cts +1 -1
- package/dist/react-palette.d.ts +1 -1
- package/dist/react-palette.js.map +1 -1
- package/dist/react-selection.cjs.map +1 -1
- package/dist/react-selection.d.cts +1 -1
- package/dist/react-selection.d.ts +1 -1
- package/dist/react-selection.js.map +1 -1
- package/dist/react-sheet.cjs.map +1 -1
- package/dist/react-sheet.d.cts +1 -1
- package/dist/react-sheet.d.ts +1 -1
- package/dist/react-sheet.js.map +1 -1
- package/dist/react-workspace.cjs +7 -0
- package/dist/react-workspace.cjs.map +1 -0
- package/dist/react-workspace.d.cts +441 -0
- package/dist/react-workspace.d.ts +441 -0
- package/dist/react-workspace.js +7 -0
- package/dist/react-workspace.js.map +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/surface.cjs.map +1 -1
- package/dist/surface.d.cts +18 -8
- package/dist/surface.d.ts +18 -8
- package/dist/surface.js.map +1 -1
- package/package.json +13 -3
package/dist/actions.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransferOutcome } from '@ai-matrx/
|
|
1
|
+
import { TransferOutcome } from '@ai-matrx/alchemy/operate';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Matrx Alchemy — Declare types (CONTRACT §2.1).
|
|
@@ -7,8 +7,8 @@ import { TransferOutcome } from '@ai-matrx/kit/content-transfer';
|
|
|
7
7
|
* no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
|
|
8
8
|
* handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
|
|
9
9
|
*/
|
|
10
|
-
type Json$
|
|
11
|
-
[key: string]: Json$
|
|
10
|
+
type Json$2 = null | boolean | number | string | Json$2[] | {
|
|
11
|
+
[key: string]: Json$2;
|
|
12
12
|
};
|
|
13
13
|
/** Unchanged from `ui_surface_value_type_chk`. */
|
|
14
14
|
type ValueType = "string" | "number" | "boolean" | "object" | "array" | "document";
|
|
@@ -166,7 +166,7 @@ type QualifiedValueKey = string;
|
|
|
166
166
|
/** Live slot payloads (page-capture's shapes, kept). */
|
|
167
167
|
interface LiveValues {
|
|
168
168
|
selection?: {
|
|
169
|
-
choices: Record<string, Json$
|
|
169
|
+
choices: Record<string, Json$2>;
|
|
170
170
|
text: string | null;
|
|
171
171
|
};
|
|
172
172
|
"on-demand"?: readonly OnDemandSection[];
|
|
@@ -178,8 +178,8 @@ interface OnDemandSection {
|
|
|
178
178
|
title: string;
|
|
179
179
|
description?: string;
|
|
180
180
|
role: "data" | "request";
|
|
181
|
-
brief?: Json$
|
|
182
|
-
load(signal: AbortSignal): Promise<Json$
|
|
181
|
+
brief?: Json$2;
|
|
182
|
+
load(signal: AbortSignal): Promise<Json$2>;
|
|
183
183
|
}
|
|
184
184
|
interface RecentRequest {
|
|
185
185
|
method: string;
|
|
@@ -189,7 +189,7 @@ interface RecentRequest {
|
|
|
189
189
|
durationMs?: number;
|
|
190
190
|
requestId?: string;
|
|
191
191
|
client?: string;
|
|
192
|
-
requestBody?: Json$
|
|
192
|
+
requestBody?: Json$2;
|
|
193
193
|
requestBodyNote?: string;
|
|
194
194
|
errorSentence?: string;
|
|
195
195
|
timestamp: number;
|
|
@@ -258,6 +258,14 @@ interface ClickTarget {
|
|
|
258
258
|
host?: unknown;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
|
|
263
|
+
* Moved from `@ai-matrx/kit/content-transfer` in ALC-16; the format-adapter contract lives in `./contract`.
|
|
264
|
+
*/
|
|
265
|
+
type Json$1 = null | boolean | number | string | Json$1[] | {
|
|
266
|
+
[key: string]: Json$1;
|
|
267
|
+
};
|
|
268
|
+
|
|
261
269
|
/**
|
|
262
270
|
* Operate — the format and delivery contract (Matrx Alchemy CONTRACT §2.3, ALC-16).
|
|
263
271
|
*
|
|
@@ -286,7 +294,8 @@ type Receipt = {
|
|
|
286
294
|
to: WriteTargetRef;
|
|
287
295
|
sentence: string;
|
|
288
296
|
warning?: string;
|
|
289
|
-
fix?: string;
|
|
297
|
+
fix?: string; /** What the handler produced (e.g. the created record). */
|
|
298
|
+
result?: Json$1;
|
|
290
299
|
} | {
|
|
291
300
|
status: "queued";
|
|
292
301
|
to: WriteTargetRef;
|
|
@@ -377,7 +386,8 @@ type CannotApply = "stale" | "missing-record" | "broken-span";
|
|
|
377
386
|
*/
|
|
378
387
|
type WriteHandlerResult = void | {
|
|
379
388
|
status: "applied";
|
|
380
|
-
sentence?: string;
|
|
389
|
+
sentence?: string; /** What the write produced (e.g. the created record); passed to `receipt.result` unchanged. */
|
|
390
|
+
result?: Json;
|
|
381
391
|
} | {
|
|
382
392
|
status: "cannot-apply";
|
|
383
393
|
cannotApply: CannotApply;
|
|
@@ -518,7 +528,7 @@ type ActionResult<T = unknown> = {
|
|
|
518
528
|
/** `POST /actions/run` (aidream) — the request. */
|
|
519
529
|
interface ServerActionRunRequest {
|
|
520
530
|
name: string;
|
|
521
|
-
input: Json$
|
|
531
|
+
input: Json$2;
|
|
522
532
|
by: ActionCaller;
|
|
523
533
|
surface_name?: string;
|
|
524
534
|
policy?: ActionPolicy;
|
|
@@ -527,8 +537,8 @@ interface ServerActionRunRequest {
|
|
|
527
537
|
interface ServerActionRunResponse {
|
|
528
538
|
status: "applied" | "proposed" | "refused";
|
|
529
539
|
message: string;
|
|
530
|
-
receipts: Json$
|
|
531
|
-
proposal?: Json$
|
|
540
|
+
receipts: Json$2[];
|
|
541
|
+
proposal?: Json$2;
|
|
532
542
|
}
|
|
533
543
|
/** A mandate run request: by alias (an Action's `target`) or by key. */
|
|
534
544
|
type MandateRunRequest = ({
|
|
@@ -538,7 +548,7 @@ type MandateRunRequest = ({
|
|
|
538
548
|
key: string;
|
|
539
549
|
alias?: never;
|
|
540
550
|
}) & {
|
|
541
|
-
variables: Record<string, Json$
|
|
551
|
+
variables: Record<string, Json$2>;
|
|
542
552
|
userInput?: string;
|
|
543
553
|
by: ActionCaller;
|
|
544
554
|
policy: ActionPolicy;
|
|
@@ -1089,11 +1099,11 @@ interface ReadOmission {
|
|
|
1089
1099
|
*/
|
|
1090
1100
|
interface ProjectedReads {
|
|
1091
1101
|
values(signal: AbortSignal): Promise<{
|
|
1092
|
-
values: Record<string, Json$
|
|
1102
|
+
values: Record<string, Json$2>;
|
|
1093
1103
|
omissions: readonly ReadOmission[];
|
|
1094
1104
|
}>;
|
|
1095
1105
|
item(signal: AbortSignal): Promise<{
|
|
1096
|
-
values: Record<string, Json$
|
|
1106
|
+
values: Record<string, Json$2>;
|
|
1097
1107
|
omissions: readonly ReadOmission[];
|
|
1098
1108
|
} | null>;
|
|
1099
1109
|
live(signal: AbortSignal): Promise<LiveValues>;
|
|
@@ -1225,7 +1235,7 @@ interface ProjectionSource {
|
|
|
1225
1235
|
}
|
|
1226
1236
|
/** Keep declared, ordinary, exportable values; record every removal. */
|
|
1227
1237
|
declare function projectValues(raw: Record<string, unknown>, declared: readonly Pick<DeclaredValue, "name" | "sensitivity">[], pathPrefix?: string): {
|
|
1228
|
-
values: Record<string, Json$
|
|
1238
|
+
values: Record<string, Json$2>;
|
|
1229
1239
|
omissions: ReadOmission[];
|
|
1230
1240
|
};
|
|
1231
1241
|
declare function createProjectedReads(source: ProjectionSource): ProjectedReads;
|
|
@@ -1322,7 +1332,7 @@ interface ClientToolRow {
|
|
|
1322
1332
|
name: string;
|
|
1323
1333
|
label: string;
|
|
1324
1334
|
description: string;
|
|
1325
|
-
input_schema: Json$
|
|
1335
|
+
input_schema: Json$2;
|
|
1326
1336
|
/** Live values: "ui" (applied directly) | "draft" (proposed for review). */
|
|
1327
1337
|
mode: "ui" | "draft";
|
|
1328
1338
|
declared_by?: ActionDeclaredBy;
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransferOutcome } from '@ai-matrx/
|
|
1
|
+
import { TransferOutcome } from '@ai-matrx/alchemy/operate';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Matrx Alchemy — Declare types (CONTRACT §2.1).
|
|
@@ -7,8 +7,8 @@ import { TransferOutcome } from '@ai-matrx/kit/content-transfer';
|
|
|
7
7
|
* no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
|
|
8
8
|
* handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
|
|
9
9
|
*/
|
|
10
|
-
type Json$
|
|
11
|
-
[key: string]: Json$
|
|
10
|
+
type Json$2 = null | boolean | number | string | Json$2[] | {
|
|
11
|
+
[key: string]: Json$2;
|
|
12
12
|
};
|
|
13
13
|
/** Unchanged from `ui_surface_value_type_chk`. */
|
|
14
14
|
type ValueType = "string" | "number" | "boolean" | "object" | "array" | "document";
|
|
@@ -166,7 +166,7 @@ type QualifiedValueKey = string;
|
|
|
166
166
|
/** Live slot payloads (page-capture's shapes, kept). */
|
|
167
167
|
interface LiveValues {
|
|
168
168
|
selection?: {
|
|
169
|
-
choices: Record<string, Json$
|
|
169
|
+
choices: Record<string, Json$2>;
|
|
170
170
|
text: string | null;
|
|
171
171
|
};
|
|
172
172
|
"on-demand"?: readonly OnDemandSection[];
|
|
@@ -178,8 +178,8 @@ interface OnDemandSection {
|
|
|
178
178
|
title: string;
|
|
179
179
|
description?: string;
|
|
180
180
|
role: "data" | "request";
|
|
181
|
-
brief?: Json$
|
|
182
|
-
load(signal: AbortSignal): Promise<Json$
|
|
181
|
+
brief?: Json$2;
|
|
182
|
+
load(signal: AbortSignal): Promise<Json$2>;
|
|
183
183
|
}
|
|
184
184
|
interface RecentRequest {
|
|
185
185
|
method: string;
|
|
@@ -189,7 +189,7 @@ interface RecentRequest {
|
|
|
189
189
|
durationMs?: number;
|
|
190
190
|
requestId?: string;
|
|
191
191
|
client?: string;
|
|
192
|
-
requestBody?: Json$
|
|
192
|
+
requestBody?: Json$2;
|
|
193
193
|
requestBodyNote?: string;
|
|
194
194
|
errorSentence?: string;
|
|
195
195
|
timestamp: number;
|
|
@@ -258,6 +258,14 @@ interface ClickTarget {
|
|
|
258
258
|
host?: unknown;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
|
|
263
|
+
* Moved from `@ai-matrx/kit/content-transfer` in ALC-16; the format-adapter contract lives in `./contract`.
|
|
264
|
+
*/
|
|
265
|
+
type Json$1 = null | boolean | number | string | Json$1[] | {
|
|
266
|
+
[key: string]: Json$1;
|
|
267
|
+
};
|
|
268
|
+
|
|
261
269
|
/**
|
|
262
270
|
* Operate — the format and delivery contract (Matrx Alchemy CONTRACT §2.3, ALC-16).
|
|
263
271
|
*
|
|
@@ -286,7 +294,8 @@ type Receipt = {
|
|
|
286
294
|
to: WriteTargetRef;
|
|
287
295
|
sentence: string;
|
|
288
296
|
warning?: string;
|
|
289
|
-
fix?: string;
|
|
297
|
+
fix?: string; /** What the handler produced (e.g. the created record). */
|
|
298
|
+
result?: Json$1;
|
|
290
299
|
} | {
|
|
291
300
|
status: "queued";
|
|
292
301
|
to: WriteTargetRef;
|
|
@@ -377,7 +386,8 @@ type CannotApply = "stale" | "missing-record" | "broken-span";
|
|
|
377
386
|
*/
|
|
378
387
|
type WriteHandlerResult = void | {
|
|
379
388
|
status: "applied";
|
|
380
|
-
sentence?: string;
|
|
389
|
+
sentence?: string; /** What the write produced (e.g. the created record); passed to `receipt.result` unchanged. */
|
|
390
|
+
result?: Json;
|
|
381
391
|
} | {
|
|
382
392
|
status: "cannot-apply";
|
|
383
393
|
cannotApply: CannotApply;
|
|
@@ -518,7 +528,7 @@ type ActionResult<T = unknown> = {
|
|
|
518
528
|
/** `POST /actions/run` (aidream) — the request. */
|
|
519
529
|
interface ServerActionRunRequest {
|
|
520
530
|
name: string;
|
|
521
|
-
input: Json$
|
|
531
|
+
input: Json$2;
|
|
522
532
|
by: ActionCaller;
|
|
523
533
|
surface_name?: string;
|
|
524
534
|
policy?: ActionPolicy;
|
|
@@ -527,8 +537,8 @@ interface ServerActionRunRequest {
|
|
|
527
537
|
interface ServerActionRunResponse {
|
|
528
538
|
status: "applied" | "proposed" | "refused";
|
|
529
539
|
message: string;
|
|
530
|
-
receipts: Json$
|
|
531
|
-
proposal?: Json$
|
|
540
|
+
receipts: Json$2[];
|
|
541
|
+
proposal?: Json$2;
|
|
532
542
|
}
|
|
533
543
|
/** A mandate run request: by alias (an Action's `target`) or by key. */
|
|
534
544
|
type MandateRunRequest = ({
|
|
@@ -538,7 +548,7 @@ type MandateRunRequest = ({
|
|
|
538
548
|
key: string;
|
|
539
549
|
alias?: never;
|
|
540
550
|
}) & {
|
|
541
|
-
variables: Record<string, Json$
|
|
551
|
+
variables: Record<string, Json$2>;
|
|
542
552
|
userInput?: string;
|
|
543
553
|
by: ActionCaller;
|
|
544
554
|
policy: ActionPolicy;
|
|
@@ -1089,11 +1099,11 @@ interface ReadOmission {
|
|
|
1089
1099
|
*/
|
|
1090
1100
|
interface ProjectedReads {
|
|
1091
1101
|
values(signal: AbortSignal): Promise<{
|
|
1092
|
-
values: Record<string, Json$
|
|
1102
|
+
values: Record<string, Json$2>;
|
|
1093
1103
|
omissions: readonly ReadOmission[];
|
|
1094
1104
|
}>;
|
|
1095
1105
|
item(signal: AbortSignal): Promise<{
|
|
1096
|
-
values: Record<string, Json$
|
|
1106
|
+
values: Record<string, Json$2>;
|
|
1097
1107
|
omissions: readonly ReadOmission[];
|
|
1098
1108
|
} | null>;
|
|
1099
1109
|
live(signal: AbortSignal): Promise<LiveValues>;
|
|
@@ -1225,7 +1235,7 @@ interface ProjectionSource {
|
|
|
1225
1235
|
}
|
|
1226
1236
|
/** Keep declared, ordinary, exportable values; record every removal. */
|
|
1227
1237
|
declare function projectValues(raw: Record<string, unknown>, declared: readonly Pick<DeclaredValue, "name" | "sensitivity">[], pathPrefix?: string): {
|
|
1228
|
-
values: Record<string, Json$
|
|
1238
|
+
values: Record<string, Json$2>;
|
|
1229
1239
|
omissions: ReadOmission[];
|
|
1230
1240
|
};
|
|
1231
1241
|
declare function createProjectedReads(source: ProjectionSource): ProjectedReads;
|
|
@@ -1322,7 +1332,7 @@ interface ClientToolRow {
|
|
|
1322
1332
|
name: string;
|
|
1323
1333
|
label: string;
|
|
1324
1334
|
description: string;
|
|
1325
|
-
input_schema: Json$
|
|
1335
|
+
input_schema: Json$2;
|
|
1326
1336
|
/** Live values: "ui" (applied directly) | "draft" (proposed for review). */
|
|
1327
1337
|
mode: "ui" | "draft";
|
|
1328
1338
|
declared_by?: ActionDeclaredBy;
|