@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.
Files changed (72) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/actions.cjs.map +1 -1
  3. package/dist/actions.d.cts +27 -17
  4. package/dist/actions.d.ts +27 -17
  5. package/dist/actions.js.map +1 -1
  6. package/dist/core.cjs +1 -1
  7. package/dist/core.cjs.map +1 -1
  8. package/dist/core.d.cts +4 -2
  9. package/dist/core.d.ts +4 -2
  10. package/dist/core.js +1 -1
  11. package/dist/core.js.map +1 -1
  12. package/dist/declare.cjs.map +1 -1
  13. package/dist/declare.js.map +1 -1
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +4 -2
  17. package/dist/index.d.ts +4 -2
  18. package/dist/index.js +1 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/menu.d.cts +25 -15
  21. package/dist/menu.d.ts +25 -15
  22. package/dist/operate.cjs +1 -1
  23. package/dist/operate.cjs.map +1 -1
  24. package/dist/operate.d.cts +4 -2
  25. package/dist/operate.d.ts +4 -2
  26. package/dist/operate.js +1 -1
  27. package/dist/operate.js.map +1 -1
  28. package/dist/ports.d.cts +18 -8
  29. package/dist/ports.d.ts +18 -8
  30. package/dist/react-bar.cjs.map +1 -1
  31. package/dist/react-bar.d.cts +1 -1
  32. package/dist/react-bar.d.ts +1 -1
  33. package/dist/react-bar.js.map +1 -1
  34. package/dist/react-host.d.cts +25 -15
  35. package/dist/react-host.d.ts +25 -15
  36. package/dist/react-menu.cjs.map +1 -1
  37. package/dist/react-menu.d.cts +1 -1
  38. package/dist/react-menu.d.ts +1 -1
  39. package/dist/react-menu.js.map +1 -1
  40. package/dist/react-overflow.cjs.map +1 -1
  41. package/dist/react-overflow.d.cts +25 -15
  42. package/dist/react-overflow.d.ts +25 -15
  43. package/dist/react-overflow.js.map +1 -1
  44. package/dist/react-palette.cjs.map +1 -1
  45. package/dist/react-palette.d.cts +1 -1
  46. package/dist/react-palette.d.ts +1 -1
  47. package/dist/react-palette.js.map +1 -1
  48. package/dist/react-selection.cjs.map +1 -1
  49. package/dist/react-selection.d.cts +1 -1
  50. package/dist/react-selection.d.ts +1 -1
  51. package/dist/react-selection.js.map +1 -1
  52. package/dist/react-sheet.cjs.map +1 -1
  53. package/dist/react-sheet.d.cts +1 -1
  54. package/dist/react-sheet.d.ts +1 -1
  55. package/dist/react-sheet.js.map +1 -1
  56. package/dist/react-workspace.cjs +7 -0
  57. package/dist/react-workspace.cjs.map +1 -0
  58. package/dist/react-workspace.d.cts +441 -0
  59. package/dist/react-workspace.d.ts +441 -0
  60. package/dist/react-workspace.js +7 -0
  61. package/dist/react-workspace.js.map +1 -0
  62. package/dist/react.cjs +1 -1
  63. package/dist/react.cjs.map +1 -1
  64. package/dist/react.d.cts +2 -2
  65. package/dist/react.d.ts +2 -2
  66. package/dist/react.js +1 -1
  67. package/dist/react.js.map +1 -1
  68. package/dist/surface.cjs.map +1 -1
  69. package/dist/surface.d.cts +18 -8
  70. package/dist/surface.d.ts +18 -8
  71. package/dist/surface.js.map +1 -1
  72. package/package.json +13 -3
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { TransferOutcome } from '@ai-matrx/kit/content-transfer';
2
+ import { TransferOutcome } from '@ai-matrx/alchemy/operate';
3
3
 
4
4
  /**
5
5
  * Matrx Alchemy — Declare types (CONTRACT §2.1).
@@ -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>;