@ai-matrx/alchemy 0.12.1 → 0.12.3

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/dist/ports.d.cts CHANGED
@@ -5,8 +5,8 @@
5
5
  * no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
6
6
  * handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
7
7
  */
8
- type Json$1 = null | boolean | number | string | Json$1[] | {
9
- [key: string]: Json$1;
8
+ type Json$2 = null | boolean | number | string | Json$2[] | {
9
+ [key: string]: Json$2;
10
10
  };
11
11
  /** Unchanged from `ui_surface_value_type_chk`. */
12
12
  type ValueType = "string" | "number" | "boolean" | "object" | "array" | "document";
@@ -222,6 +222,14 @@ interface ClickTarget {
222
222
  host?: unknown;
223
223
  }
224
224
 
225
+ /**
226
+ * Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
227
+ * Moved from `@ai-matrx/kit/content-transfer` in ALC-16; the format-adapter contract lives in `./contract`.
228
+ */
229
+ type Json$1 = null | boolean | number | string | Json$1[] | {
230
+ [key: string]: Json$1;
231
+ };
232
+
225
233
  /**
226
234
  * Operate — the format and delivery contract (Matrx Alchemy CONTRACT §2.3, ALC-16).
227
235
  *
@@ -250,7 +258,8 @@ type Receipt = {
250
258
  to: WriteTargetRef;
251
259
  sentence: string;
252
260
  warning?: string;
253
- fix?: string;
261
+ fix?: string; /** What the handler produced (e.g. the created record). */
262
+ result?: Json$1;
254
263
  } | {
255
264
  status: "queued";
256
265
  to: WriteTargetRef;
@@ -341,7 +350,8 @@ type CannotApply = "stale" | "missing-record" | "broken-span";
341
350
  */
342
351
  type WriteHandlerResult = void | {
343
352
  status: "applied";
344
- sentence?: string;
353
+ sentence?: string; /** What the write produced (e.g. the created record); passed to `receipt.result` unchanged. */
354
+ result?: Json;
345
355
  } | {
346
356
  status: "cannot-apply";
347
357
  cannotApply: CannotApply;
@@ -409,7 +419,7 @@ type ActionResult<T = unknown> = {
409
419
  /** `POST /actions/run` (aidream) — the request. */
410
420
  interface ServerActionRunRequest {
411
421
  name: string;
412
- input: Json$1;
422
+ input: Json$2;
413
423
  by: ActionCaller;
414
424
  surface_name?: string;
415
425
  policy?: ActionPolicy;
@@ -418,8 +428,8 @@ interface ServerActionRunRequest {
418
428
  interface ServerActionRunResponse {
419
429
  status: "applied" | "proposed" | "refused";
420
430
  message: string;
421
- receipts: Json$1[];
422
- proposal?: Json$1;
431
+ receipts: Json$2[];
432
+ proposal?: Json$2;
423
433
  }
424
434
  /** A mandate run request: by alias (an Action's `target`) or by key. */
425
435
  type MandateRunRequest = ({
@@ -429,7 +439,7 @@ type MandateRunRequest = ({
429
439
  key: string;
430
440
  alias?: never;
431
441
  }) & {
432
- variables: Record<string, Json$1>;
442
+ variables: Record<string, Json$2>;
433
443
  userInput?: string;
434
444
  by: ActionCaller;
435
445
  policy: ActionPolicy;
package/dist/ports.d.ts CHANGED
@@ -5,8 +5,8 @@
5
5
  * no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
6
6
  * handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
7
7
  */
8
- type Json$1 = null | boolean | number | string | Json$1[] | {
9
- [key: string]: Json$1;
8
+ type Json$2 = null | boolean | number | string | Json$2[] | {
9
+ [key: string]: Json$2;
10
10
  };
11
11
  /** Unchanged from `ui_surface_value_type_chk`. */
12
12
  type ValueType = "string" | "number" | "boolean" | "object" | "array" | "document";
@@ -222,6 +222,14 @@ interface ClickTarget {
222
222
  host?: unknown;
223
223
  }
224
224
 
225
+ /**
226
+ * Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
227
+ * Moved from `@ai-matrx/kit/content-transfer` in ALC-16; the format-adapter contract lives in `./contract`.
228
+ */
229
+ type Json$1 = null | boolean | number | string | Json$1[] | {
230
+ [key: string]: Json$1;
231
+ };
232
+
225
233
  /**
226
234
  * Operate — the format and delivery contract (Matrx Alchemy CONTRACT §2.3, ALC-16).
227
235
  *
@@ -250,7 +258,8 @@ type Receipt = {
250
258
  to: WriteTargetRef;
251
259
  sentence: string;
252
260
  warning?: string;
253
- fix?: string;
261
+ fix?: string; /** What the handler produced (e.g. the created record). */
262
+ result?: Json$1;
254
263
  } | {
255
264
  status: "queued";
256
265
  to: WriteTargetRef;
@@ -341,7 +350,8 @@ type CannotApply = "stale" | "missing-record" | "broken-span";
341
350
  */
342
351
  type WriteHandlerResult = void | {
343
352
  status: "applied";
344
- sentence?: string;
353
+ sentence?: string; /** What the write produced (e.g. the created record); passed to `receipt.result` unchanged. */
354
+ result?: Json;
345
355
  } | {
346
356
  status: "cannot-apply";
347
357
  cannotApply: CannotApply;
@@ -409,7 +419,7 @@ type ActionResult<T = unknown> = {
409
419
  /** `POST /actions/run` (aidream) — the request. */
410
420
  interface ServerActionRunRequest {
411
421
  name: string;
412
- input: Json$1;
422
+ input: Json$2;
413
423
  by: ActionCaller;
414
424
  surface_name?: string;
415
425
  policy?: ActionPolicy;
@@ -418,8 +428,8 @@ interface ServerActionRunRequest {
418
428
  interface ServerActionRunResponse {
419
429
  status: "applied" | "proposed" | "refused";
420
430
  message: string;
421
- receipts: Json$1[];
422
- proposal?: Json$1;
431
+ receipts: Json$2[];
432
+ proposal?: Json$2;
423
433
  }
424
434
  /** A mandate run request: by alias (an Action's `target`) or by key. */
425
435
  type MandateRunRequest = ({
@@ -429,7 +439,7 @@ type MandateRunRequest = ({
429
439
  key: string;
430
440
  alias?: never;
431
441
  }) & {
432
- variables: Record<string, Json$1>;
442
+ variables: Record<string, Json$2>;
433
443
  userInput?: string;
434
444
  by: ActionCaller;
435
445
  policy: ActionPolicy;
@@ -8,8 +8,8 @@ import { TransferOutcome } from '@ai-matrx/kit/content-transfer';
8
8
  * no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
9
9
  * handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
10
10
  */
11
- type Json$1 = null | boolean | number | string | Json$1[] | {
12
- [key: string]: Json$1;
11
+ type Json$2 = null | boolean | number | string | Json$2[] | {
12
+ [key: string]: Json$2;
13
13
  };
14
14
  /** Unchanged from `ui_surface_value_type_chk`. */
15
15
  type ValueType = "string" | "number" | "boolean" | "object" | "array" | "document";
@@ -167,7 +167,7 @@ type QualifiedValueKey = string;
167
167
  /** Live slot payloads (page-capture's shapes, kept). */
168
168
  interface LiveValues {
169
169
  selection?: {
170
- choices: Record<string, Json$1>;
170
+ choices: Record<string, Json$2>;
171
171
  text: string | null;
172
172
  };
173
173
  "on-demand"?: readonly OnDemandSection[];
@@ -179,8 +179,8 @@ interface OnDemandSection {
179
179
  title: string;
180
180
  description?: string;
181
181
  role: "data" | "request";
182
- brief?: Json$1;
183
- load(signal: AbortSignal): Promise<Json$1>;
182
+ brief?: Json$2;
183
+ load(signal: AbortSignal): Promise<Json$2>;
184
184
  }
185
185
  interface RecentRequest {
186
186
  method: string;
@@ -190,7 +190,7 @@ interface RecentRequest {
190
190
  durationMs?: number;
191
191
  requestId?: string;
192
192
  client?: string;
193
- requestBody?: Json$1;
193
+ requestBody?: Json$2;
194
194
  requestBodyNote?: string;
195
195
  errorSentence?: string;
196
196
  timestamp: number;
@@ -259,6 +259,14 @@ interface ClickTarget {
259
259
  host?: unknown;
260
260
  }
261
261
 
262
+ /**
263
+ * Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
264
+ * Moved from `@ai-matrx/kit/content-transfer` in ALC-16; the format-adapter contract lives in `./contract`.
265
+ */
266
+ type Json$1 = null | boolean | number | string | Json$1[] | {
267
+ [key: string]: Json$1;
268
+ };
269
+
262
270
  /**
263
271
  * Operate — the format and delivery contract (Matrx Alchemy CONTRACT §2.3, ALC-16).
264
272
  *
@@ -287,7 +295,8 @@ type Receipt = {
287
295
  to: WriteTargetRef;
288
296
  sentence: string;
289
297
  warning?: string;
290
- fix?: string;
298
+ fix?: string; /** What the handler produced (e.g. the created record). */
299
+ result?: Json$1;
291
300
  } | {
292
301
  status: "queued";
293
302
  to: WriteTargetRef;
@@ -378,7 +387,8 @@ type CannotApply = "stale" | "missing-record" | "broken-span";
378
387
  */
379
388
  type WriteHandlerResult = void | {
380
389
  status: "applied";
381
- sentence?: string;
390
+ sentence?: string; /** What the write produced (e.g. the created record); passed to `receipt.result` unchanged. */
391
+ result?: Json;
382
392
  } | {
383
393
  status: "cannot-apply";
384
394
  cannotApply: CannotApply;
@@ -446,7 +456,7 @@ type ActionResult<T = unknown> = {
446
456
  /** `POST /actions/run` (aidream) — the request. */
447
457
  interface ServerActionRunRequest {
448
458
  name: string;
449
- input: Json$1;
459
+ input: Json$2;
450
460
  by: ActionCaller;
451
461
  surface_name?: string;
452
462
  policy?: ActionPolicy;
@@ -455,8 +465,8 @@ interface ServerActionRunRequest {
455
465
  interface ServerActionRunResponse {
456
466
  status: "applied" | "proposed" | "refused";
457
467
  message: string;
458
- receipts: Json$1[];
459
- proposal?: Json$1;
468
+ receipts: Json$2[];
469
+ proposal?: Json$2;
460
470
  }
461
471
  /** A mandate run request: by alias (an Action's `target`) or by key. */
462
472
  type MandateRunRequest = ({
@@ -466,7 +476,7 @@ type MandateRunRequest = ({
466
476
  key: string;
467
477
  alias?: never;
468
478
  }) & {
469
- variables: Record<string, Json$1>;
479
+ variables: Record<string, Json$2>;
470
480
  userInput?: string;
471
481
  by: ActionCaller;
472
482
  policy: ActionPolicy;
@@ -998,11 +1008,11 @@ interface ReadOmission {
998
1008
  */
999
1009
  interface ProjectedReads {
1000
1010
  values(signal: AbortSignal): Promise<{
1001
- values: Record<string, Json$1>;
1011
+ values: Record<string, Json$2>;
1002
1012
  omissions: readonly ReadOmission[];
1003
1013
  }>;
1004
1014
  item(signal: AbortSignal): Promise<{
1005
- values: Record<string, Json$1>;
1015
+ values: Record<string, Json$2>;
1006
1016
  omissions: readonly ReadOmission[];
1007
1017
  } | null>;
1008
1018
  live(signal: AbortSignal): Promise<LiveValues>;
@@ -8,8 +8,8 @@ import { TransferOutcome } from '@ai-matrx/kit/content-transfer';
8
8
  * no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
9
9
  * handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
10
10
  */
11
- type Json$1 = null | boolean | number | string | Json$1[] | {
12
- [key: string]: Json$1;
11
+ type Json$2 = null | boolean | number | string | Json$2[] | {
12
+ [key: string]: Json$2;
13
13
  };
14
14
  /** Unchanged from `ui_surface_value_type_chk`. */
15
15
  type ValueType = "string" | "number" | "boolean" | "object" | "array" | "document";
@@ -167,7 +167,7 @@ type QualifiedValueKey = string;
167
167
  /** Live slot payloads (page-capture's shapes, kept). */
168
168
  interface LiveValues {
169
169
  selection?: {
170
- choices: Record<string, Json$1>;
170
+ choices: Record<string, Json$2>;
171
171
  text: string | null;
172
172
  };
173
173
  "on-demand"?: readonly OnDemandSection[];
@@ -179,8 +179,8 @@ interface OnDemandSection {
179
179
  title: string;
180
180
  description?: string;
181
181
  role: "data" | "request";
182
- brief?: Json$1;
183
- load(signal: AbortSignal): Promise<Json$1>;
182
+ brief?: Json$2;
183
+ load(signal: AbortSignal): Promise<Json$2>;
184
184
  }
185
185
  interface RecentRequest {
186
186
  method: string;
@@ -190,7 +190,7 @@ interface RecentRequest {
190
190
  durationMs?: number;
191
191
  requestId?: string;
192
192
  client?: string;
193
- requestBody?: Json$1;
193
+ requestBody?: Json$2;
194
194
  requestBodyNote?: string;
195
195
  errorSentence?: string;
196
196
  timestamp: number;
@@ -259,6 +259,14 @@ interface ClickTarget {
259
259
  host?: unknown;
260
260
  }
261
261
 
262
+ /**
263
+ * Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
264
+ * Moved from `@ai-matrx/kit/content-transfer` in ALC-16; the format-adapter contract lives in `./contract`.
265
+ */
266
+ type Json$1 = null | boolean | number | string | Json$1[] | {
267
+ [key: string]: Json$1;
268
+ };
269
+
262
270
  /**
263
271
  * Operate — the format and delivery contract (Matrx Alchemy CONTRACT §2.3, ALC-16).
264
272
  *
@@ -287,7 +295,8 @@ type Receipt = {
287
295
  to: WriteTargetRef;
288
296
  sentence: string;
289
297
  warning?: string;
290
- fix?: string;
298
+ fix?: string; /** What the handler produced (e.g. the created record). */
299
+ result?: Json$1;
291
300
  } | {
292
301
  status: "queued";
293
302
  to: WriteTargetRef;
@@ -378,7 +387,8 @@ type CannotApply = "stale" | "missing-record" | "broken-span";
378
387
  */
379
388
  type WriteHandlerResult = void | {
380
389
  status: "applied";
381
- sentence?: string;
390
+ sentence?: string; /** What the write produced (e.g. the created record); passed to `receipt.result` unchanged. */
391
+ result?: Json;
382
392
  } | {
383
393
  status: "cannot-apply";
384
394
  cannotApply: CannotApply;
@@ -446,7 +456,7 @@ type ActionResult<T = unknown> = {
446
456
  /** `POST /actions/run` (aidream) — the request. */
447
457
  interface ServerActionRunRequest {
448
458
  name: string;
449
- input: Json$1;
459
+ input: Json$2;
450
460
  by: ActionCaller;
451
461
  surface_name?: string;
452
462
  policy?: ActionPolicy;
@@ -455,8 +465,8 @@ interface ServerActionRunRequest {
455
465
  interface ServerActionRunResponse {
456
466
  status: "applied" | "proposed" | "refused";
457
467
  message: string;
458
- receipts: Json$1[];
459
- proposal?: Json$1;
468
+ receipts: Json$2[];
469
+ proposal?: Json$2;
460
470
  }
461
471
  /** A mandate run request: by alias (an Action's `target`) or by key. */
462
472
  type MandateRunRequest = ({
@@ -466,7 +476,7 @@ type MandateRunRequest = ({
466
476
  key: string;
467
477
  alias?: never;
468
478
  }) & {
469
- variables: Record<string, Json$1>;
479
+ variables: Record<string, Json$2>;
470
480
  userInput?: string;
471
481
  by: ActionCaller;
472
482
  policy: ActionPolicy;
@@ -998,11 +1008,11 @@ interface ReadOmission {
998
1008
  */
999
1009
  interface ProjectedReads {
1000
1010
  values(signal: AbortSignal): Promise<{
1001
- values: Record<string, Json$1>;
1011
+ values: Record<string, Json$2>;
1002
1012
  omissions: readonly ReadOmission[];
1003
1013
  }>;
1004
1014
  item(signal: AbortSignal): Promise<{
1005
- values: Record<string, Json$1>;
1015
+ values: Record<string, Json$2>;
1006
1016
  omissions: readonly ReadOmission[];
1007
1017
  } | null>;
1008
1018
  live(signal: AbortSignal): Promise<LiveValues>;
@@ -8,8 +8,8 @@ import { TransferOutcome } from '@ai-matrx/kit/content-transfer';
8
8
  * no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
9
9
  * handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
10
10
  */
11
- type Json$1 = null | boolean | number | string | Json$1[] | {
12
- [key: string]: Json$1;
11
+ type Json$2 = null | boolean | number | string | Json$2[] | {
12
+ [key: string]: Json$2;
13
13
  };
14
14
  /** Unchanged from `ui_surface_value_type_chk`. */
15
15
  type ValueType = "string" | "number" | "boolean" | "object" | "array" | "document";
@@ -167,7 +167,7 @@ type QualifiedValueKey = string;
167
167
  /** Live slot payloads (page-capture's shapes, kept). */
168
168
  interface LiveValues {
169
169
  selection?: {
170
- choices: Record<string, Json$1>;
170
+ choices: Record<string, Json$2>;
171
171
  text: string | null;
172
172
  };
173
173
  "on-demand"?: readonly OnDemandSection[];
@@ -179,8 +179,8 @@ interface OnDemandSection {
179
179
  title: string;
180
180
  description?: string;
181
181
  role: "data" | "request";
182
- brief?: Json$1;
183
- load(signal: AbortSignal): Promise<Json$1>;
182
+ brief?: Json$2;
183
+ load(signal: AbortSignal): Promise<Json$2>;
184
184
  }
185
185
  interface RecentRequest {
186
186
  method: string;
@@ -190,7 +190,7 @@ interface RecentRequest {
190
190
  durationMs?: number;
191
191
  requestId?: string;
192
192
  client?: string;
193
- requestBody?: Json$1;
193
+ requestBody?: Json$2;
194
194
  requestBodyNote?: string;
195
195
  errorSentence?: string;
196
196
  timestamp: number;
@@ -259,6 +259,14 @@ interface ClickTarget {
259
259
  host?: unknown;
260
260
  }
261
261
 
262
+ /**
263
+ * Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
264
+ * Moved from `@ai-matrx/kit/content-transfer` in ALC-16; the format-adapter contract lives in `./contract`.
265
+ */
266
+ type Json$1 = null | boolean | number | string | Json$1[] | {
267
+ [key: string]: Json$1;
268
+ };
269
+
262
270
  /**
263
271
  * Operate — the format and delivery contract (Matrx Alchemy CONTRACT §2.3, ALC-16).
264
272
  *
@@ -287,7 +295,8 @@ type Receipt = {
287
295
  to: WriteTargetRef;
288
296
  sentence: string;
289
297
  warning?: string;
290
- fix?: string;
298
+ fix?: string; /** What the handler produced (e.g. the created record). */
299
+ result?: Json$1;
291
300
  } | {
292
301
  status: "queued";
293
302
  to: WriteTargetRef;
@@ -378,7 +387,8 @@ type CannotApply = "stale" | "missing-record" | "broken-span";
378
387
  */
379
388
  type WriteHandlerResult = void | {
380
389
  status: "applied";
381
- sentence?: string;
390
+ sentence?: string; /** What the write produced (e.g. the created record); passed to `receipt.result` unchanged. */
391
+ result?: Json;
382
392
  } | {
383
393
  status: "cannot-apply";
384
394
  cannotApply: CannotApply;
@@ -446,7 +456,7 @@ type ActionResult<T = unknown> = {
446
456
  /** `POST /actions/run` (aidream) — the request. */
447
457
  interface ServerActionRunRequest {
448
458
  name: string;
449
- input: Json$1;
459
+ input: Json$2;
450
460
  by: ActionCaller;
451
461
  surface_name?: string;
452
462
  policy?: ActionPolicy;
@@ -455,8 +465,8 @@ interface ServerActionRunRequest {
455
465
  interface ServerActionRunResponse {
456
466
  status: "applied" | "proposed" | "refused";
457
467
  message: string;
458
- receipts: Json$1[];
459
- proposal?: Json$1;
468
+ receipts: Json$2[];
469
+ proposal?: Json$2;
460
470
  }
461
471
  /** A mandate run request: by alias (an Action's `target`) or by key. */
462
472
  type MandateRunRequest = ({
@@ -466,7 +476,7 @@ type MandateRunRequest = ({
466
476
  key: string;
467
477
  alias?: never;
468
478
  }) & {
469
- variables: Record<string, Json$1>;
479
+ variables: Record<string, Json$2>;
470
480
  userInput?: string;
471
481
  by: ActionCaller;
472
482
  policy: ActionPolicy;
@@ -998,11 +1008,11 @@ interface ReadOmission {
998
1008
  */
999
1009
  interface ProjectedReads {
1000
1010
  values(signal: AbortSignal): Promise<{
1001
- values: Record<string, Json$1>;
1011
+ values: Record<string, Json$2>;
1002
1012
  omissions: readonly ReadOmission[];
1003
1013
  }>;
1004
1014
  item(signal: AbortSignal): Promise<{
1005
- values: Record<string, Json$1>;
1015
+ values: Record<string, Json$2>;
1006
1016
  omissions: readonly ReadOmission[];
1007
1017
  } | null>;
1008
1018
  live(signal: AbortSignal): Promise<LiveValues>;
@@ -8,8 +8,8 @@ import { TransferOutcome } from '@ai-matrx/kit/content-transfer';
8
8
  * no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
9
9
  * handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
10
10
  */
11
- type Json$1 = null | boolean | number | string | Json$1[] | {
12
- [key: string]: Json$1;
11
+ type Json$2 = null | boolean | number | string | Json$2[] | {
12
+ [key: string]: Json$2;
13
13
  };
14
14
  /** Unchanged from `ui_surface_value_type_chk`. */
15
15
  type ValueType = "string" | "number" | "boolean" | "object" | "array" | "document";
@@ -167,7 +167,7 @@ type QualifiedValueKey = string;
167
167
  /** Live slot payloads (page-capture's shapes, kept). */
168
168
  interface LiveValues {
169
169
  selection?: {
170
- choices: Record<string, Json$1>;
170
+ choices: Record<string, Json$2>;
171
171
  text: string | null;
172
172
  };
173
173
  "on-demand"?: readonly OnDemandSection[];
@@ -179,8 +179,8 @@ interface OnDemandSection {
179
179
  title: string;
180
180
  description?: string;
181
181
  role: "data" | "request";
182
- brief?: Json$1;
183
- load(signal: AbortSignal): Promise<Json$1>;
182
+ brief?: Json$2;
183
+ load(signal: AbortSignal): Promise<Json$2>;
184
184
  }
185
185
  interface RecentRequest {
186
186
  method: string;
@@ -190,7 +190,7 @@ interface RecentRequest {
190
190
  durationMs?: number;
191
191
  requestId?: string;
192
192
  client?: string;
193
- requestBody?: Json$1;
193
+ requestBody?: Json$2;
194
194
  requestBodyNote?: string;
195
195
  errorSentence?: string;
196
196
  timestamp: number;
@@ -259,6 +259,14 @@ interface ClickTarget {
259
259
  host?: unknown;
260
260
  }
261
261
 
262
+ /**
263
+ * Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
264
+ * Moved from `@ai-matrx/kit/content-transfer` in ALC-16; the format-adapter contract lives in `./contract`.
265
+ */
266
+ type Json$1 = null | boolean | number | string | Json$1[] | {
267
+ [key: string]: Json$1;
268
+ };
269
+
262
270
  /**
263
271
  * Operate — the format and delivery contract (Matrx Alchemy CONTRACT §2.3, ALC-16).
264
272
  *
@@ -287,7 +295,8 @@ type Receipt = {
287
295
  to: WriteTargetRef;
288
296
  sentence: string;
289
297
  warning?: string;
290
- fix?: string;
298
+ fix?: string; /** What the handler produced (e.g. the created record). */
299
+ result?: Json$1;
291
300
  } | {
292
301
  status: "queued";
293
302
  to: WriteTargetRef;
@@ -378,7 +387,8 @@ type CannotApply = "stale" | "missing-record" | "broken-span";
378
387
  */
379
388
  type WriteHandlerResult = void | {
380
389
  status: "applied";
381
- sentence?: string;
390
+ sentence?: string; /** What the write produced (e.g. the created record); passed to `receipt.result` unchanged. */
391
+ result?: Json;
382
392
  } | {
383
393
  status: "cannot-apply";
384
394
  cannotApply: CannotApply;
@@ -446,7 +456,7 @@ type ActionResult<T = unknown> = {
446
456
  /** `POST /actions/run` (aidream) — the request. */
447
457
  interface ServerActionRunRequest {
448
458
  name: string;
449
- input: Json$1;
459
+ input: Json$2;
450
460
  by: ActionCaller;
451
461
  surface_name?: string;
452
462
  policy?: ActionPolicy;
@@ -455,8 +465,8 @@ interface ServerActionRunRequest {
455
465
  interface ServerActionRunResponse {
456
466
  status: "applied" | "proposed" | "refused";
457
467
  message: string;
458
- receipts: Json$1[];
459
- proposal?: Json$1;
468
+ receipts: Json$2[];
469
+ proposal?: Json$2;
460
470
  }
461
471
  /** A mandate run request: by alias (an Action's `target`) or by key. */
462
472
  type MandateRunRequest = ({
@@ -466,7 +476,7 @@ type MandateRunRequest = ({
466
476
  key: string;
467
477
  alias?: never;
468
478
  }) & {
469
- variables: Record<string, Json$1>;
479
+ variables: Record<string, Json$2>;
470
480
  userInput?: string;
471
481
  by: ActionCaller;
472
482
  policy: ActionPolicy;
@@ -998,11 +1008,11 @@ interface ReadOmission {
998
1008
  */
999
1009
  interface ProjectedReads {
1000
1010
  values(signal: AbortSignal): Promise<{
1001
- values: Record<string, Json$1>;
1011
+ values: Record<string, Json$2>;
1002
1012
  omissions: readonly ReadOmission[];
1003
1013
  }>;
1004
1014
  item(signal: AbortSignal): Promise<{
1005
- values: Record<string, Json$1>;
1015
+ values: Record<string, Json$2>;
1006
1016
  omissions: readonly ReadOmission[];
1007
1017
  } | null>;
1008
1018
  live(signal: AbortSignal): Promise<LiveValues>;
@@ -5,8 +5,8 @@
5
5
  * no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
6
6
  * handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
7
7
  */
8
- type Json$1 = null | boolean | number | string | Json$1[] | {
9
- [key: string]: Json$1;
8
+ type Json$2 = null | boolean | number | string | Json$2[] | {
9
+ [key: string]: Json$2;
10
10
  };
11
11
  /** Unchanged from `ui_surface_value_type_chk`. */
12
12
  type ValueType = "string" | "number" | "boolean" | "object" | "array" | "document";
@@ -254,7 +254,7 @@ type ActionResult<T = unknown> = {
254
254
  /** `POST /actions/run` (aidream) — the request. */
255
255
  interface ServerActionRunRequest {
256
256
  name: string;
257
- input: Json$1;
257
+ input: Json$2;
258
258
  by: ActionCaller;
259
259
  surface_name?: string;
260
260
  policy?: ActionPolicy;
@@ -263,8 +263,8 @@ interface ServerActionRunRequest {
263
263
  interface ServerActionRunResponse {
264
264
  status: "applied" | "proposed" | "refused";
265
265
  message: string;
266
- receipts: Json$1[];
267
- proposal?: Json$1;
266
+ receipts: Json$2[];
267
+ proposal?: Json$2;
268
268
  }
269
269
  /** A mandate run request: by alias (an Action's `target`) or by key. */
270
270
  type MandateRunRequest = ({
@@ -274,7 +274,7 @@ type MandateRunRequest = ({
274
274
  key: string;
275
275
  alias?: never;
276
276
  }) & {
277
- variables: Record<string, Json$1>;
277
+ variables: Record<string, Json$2>;
278
278
  userInput?: string;
279
279
  by: ActionCaller;
280
280
  policy: ActionPolicy;
@@ -402,6 +402,14 @@ interface ClickTarget {
402
402
  host?: unknown;
403
403
  }
404
404
 
405
+ /**
406
+ * Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
407
+ * Moved from `@ai-matrx/kit/content-transfer` in ALC-16; the format-adapter contract lives in `./contract`.
408
+ */
409
+ type Json$1 = null | boolean | number | string | Json$1[] | {
410
+ [key: string]: Json$1;
411
+ };
412
+
405
413
  /**
406
414
  * Operate — the format and delivery contract (Matrx Alchemy CONTRACT §2.3, ALC-16).
407
415
  *
@@ -430,7 +438,8 @@ type Receipt = {
430
438
  to: WriteTargetRef;
431
439
  sentence: string;
432
440
  warning?: string;
433
- fix?: string;
441
+ fix?: string; /** What the handler produced (e.g. the created record). */
442
+ result?: Json$1;
434
443
  } | {
435
444
  status: "queued";
436
445
  to: WriteTargetRef;
@@ -521,7 +530,8 @@ type CannotApply = "stale" | "missing-record" | "broken-span";
521
530
  */
522
531
  type WriteHandlerResult = void | {
523
532
  status: "applied";
524
- sentence?: string;
533
+ sentence?: string; /** What the write produced (e.g. the created record); passed to `receipt.result` unchanged. */
534
+ result?: Json;
525
535
  } | {
526
536
  status: "cannot-apply";
527
537
  cannotApply: CannotApply;