@graphrefly/graphrefly 0.6.0 → 0.8.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 (75) hide show
  1. package/README.md +30 -14
  2. package/dist/{chunk-HP7OKEOE.js → chunk-A2AJJOSJ.js} +3 -3
  3. package/dist/chunk-A2AJJOSJ.js.map +1 -0
  4. package/dist/{chunk-CP6MNKAA.js → chunk-E7OH6ZAZ.js} +10 -4
  5. package/dist/{chunk-CP6MNKAA.js.map → chunk-E7OH6ZAZ.js.map} +1 -1
  6. package/dist/chunk-LR2CLSEF.js +106 -0
  7. package/dist/chunk-LR2CLSEF.js.map +1 -0
  8. package/dist/{chunk-5X3LAO3B.js → chunk-QTZSBQGJ.js} +79 -20
  9. package/dist/chunk-QTZSBQGJ.js.map +1 -0
  10. package/dist/{chunk-V3UACY6A.js → chunk-TZLX4KIT.js} +790 -203
  11. package/dist/chunk-TZLX4KIT.js.map +1 -0
  12. package/dist/{chunk-QW7H3ICI.js → chunk-UCW3VWMN.js} +4 -4
  13. package/dist/{chunk-6W5SGIGB.js → chunk-WYI7YW54.js} +142 -30
  14. package/dist/chunk-WYI7YW54.js.map +1 -0
  15. package/dist/chunk-WZ2Z2CRV.js +32 -0
  16. package/dist/chunk-WZ2Z2CRV.js.map +1 -0
  17. package/dist/{chunk-Z4Y4FMQN.js → chunk-XCZPGOVP.js} +7 -7
  18. package/dist/{chunk-KWXPDASV.js → chunk-YWTP2XRJ.js} +2 -2
  19. package/dist/compat/nestjs/index.cjs +268 -61
  20. package/dist/compat/nestjs/index.cjs.map +1 -1
  21. package/dist/compat/nestjs/index.d.cts +4 -4
  22. package/dist/compat/nestjs/index.d.ts +4 -4
  23. package/dist/compat/nestjs/index.js +8 -7
  24. package/dist/core/index.cjs +163 -35
  25. package/dist/core/index.cjs.map +1 -1
  26. package/dist/core/index.d.cts +2 -2
  27. package/dist/core/index.d.ts +2 -2
  28. package/dist/core/index.js +10 -4
  29. package/dist/extra/index.cjs +892 -221
  30. package/dist/extra/index.cjs.map +1 -1
  31. package/dist/extra/index.d.cts +4 -4
  32. package/dist/extra/index.d.ts +4 -4
  33. package/dist/extra/index.js +22 -3
  34. package/dist/graph/index.cjs +268 -61
  35. package/dist/graph/index.cjs.map +1 -1
  36. package/dist/graph/index.d.cts +3 -3
  37. package/dist/graph/index.d.ts +3 -3
  38. package/dist/graph/index.js +4 -4
  39. package/dist/{graph-CL_ZDAj9.d.cts → graph-DqTICAY2.d.cts} +69 -12
  40. package/dist/{graph-D18qmsNm.d.ts → graph-X9uwnD_z.d.ts} +69 -12
  41. package/dist/{index-C3BMRmmp.d.cts → index-3U0WxdD-.d.cts} +3 -3
  42. package/dist/{index-Bk_idZm1.d.cts → index-BP1t_38S.d.cts} +406 -61
  43. package/dist/{index-BtK55IE2.d.ts → index-BPCeYDS4.d.ts} +4 -2
  44. package/dist/{index-Bvy_6CaN.d.ts → index-BVG5pjin.d.ts} +50 -5
  45. package/dist/{index-C5mqLhMX.d.cts → index-BYEgosAX.d.cts} +50 -5
  46. package/dist/{index-D_geH2Bm.d.cts → index-BYa2YMat.d.cts} +3 -3
  47. package/dist/{index-CP_QvbWu.d.ts → index-DLO8wnYU.d.ts} +3 -3
  48. package/dist/{index-B7eOdgEx.d.ts → index-DMv1Etbi.d.ts} +3 -3
  49. package/dist/{index-BvhgZRHK.d.cts → index-DbwgQ4Cw.d.cts} +4 -2
  50. package/dist/{index-B2jmzVxL.d.ts → index-a5gHmH5b.d.ts} +406 -61
  51. package/dist/index.cjs +2966 -1790
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.d.cts +112 -14
  54. package/dist/index.d.ts +112 -14
  55. package/dist/index.js +385 -20
  56. package/dist/index.js.map +1 -1
  57. package/dist/{meta-BsF6Sag9.d.cts → meta-BJEU8fYz.d.cts} +31 -4
  58. package/dist/{meta-BsF6Sag9.d.ts → meta-BJEU8fYz.d.ts} +31 -4
  59. package/dist/patterns/reactive-layout/index.cjs +268 -61
  60. package/dist/patterns/reactive-layout/index.cjs.map +1 -1
  61. package/dist/patterns/reactive-layout/index.d.cts +3 -3
  62. package/dist/patterns/reactive-layout/index.d.ts +3 -3
  63. package/dist/patterns/reactive-layout/index.js +4 -4
  64. package/dist/{reactive-log-BfvfNWQh.d.cts → reactive-log-BfX6bOSZ.d.cts} +2 -2
  65. package/dist/{reactive-log-ohLmTXoZ.d.ts → reactive-log-RhgIog2Z.d.ts} +2 -2
  66. package/package.json +29 -18
  67. package/dist/chunk-5X3LAO3B.js.map +0 -1
  68. package/dist/chunk-6W5SGIGB.js.map +0 -1
  69. package/dist/chunk-HP7OKEOE.js.map +0 -1
  70. package/dist/chunk-O3PI7W45.js +0 -68
  71. package/dist/chunk-O3PI7W45.js.map +0 -1
  72. package/dist/chunk-V3UACY6A.js.map +0 -1
  73. /package/dist/{chunk-QW7H3ICI.js.map → chunk-UCW3VWMN.js.map} +0 -0
  74. /package/dist/{chunk-Z4Y4FMQN.js.map → chunk-XCZPGOVP.js.map} +0 -0
  75. /package/dist/{chunk-KWXPDASV.js.map → chunk-YWTP2XRJ.js.map} +0 -0
@@ -544,9 +544,9 @@ declare function node<T = unknown>(depsOrFn?: readonly Node[] | NodeFn<T> | Node
544
544
  /** JSON-shaped slice of a node for Phase 1 `Graph.describe()` (GRAPHREFLY-SPEC §3.6, Appendix B). */
545
545
  type DescribeNodeOutput = {
546
546
  type: "state" | "derived" | "producer" | "operator" | "effect";
547
- status: Node["status"];
547
+ status?: Node["status"];
548
548
  deps: string[];
549
- meta: Record<string, unknown>;
549
+ meta?: Record<string, unknown>;
550
550
  name?: string;
551
551
  value?: unknown;
552
552
  /** Node versioning info (GRAPHREFLY-SPEC §7). Present only when versioning is enabled. */
@@ -556,7 +556,28 @@ type DescribeNodeOutput = {
556
556
  cid?: string;
557
557
  prev?: string | null;
558
558
  };
559
+ /** Guard info (full detail). */
560
+ guard?: string;
561
+ /** Last mutation attribution (full detail). */
562
+ lastMutation?: Readonly<{
563
+ actor: Actor;
564
+ timestamp_ns: number;
565
+ }>;
559
566
  };
567
+ /**
568
+ * Detail level for `describe()` progressive disclosure (Phase 3.3b).
569
+ * - `"minimal"` — type + deps only (default). LLM-friendly.
570
+ * - `"standard"` — type, status, value, deps, meta, versioning (`v`).
571
+ * - `"full"` — standard + guard, lastMutation.
572
+ */
573
+ type DescribeDetail = "minimal" | "standard" | "full";
574
+ /**
575
+ * Valid field names for `describe({ fields: [...] })` (Phase 3.3b).
576
+ * Dotted paths like `"meta.label"` select specific meta keys.
577
+ */
578
+ type DescribeField = "type" | "status" | "value" | "deps" | "meta" | "v" | "guard" | "lastMutation" | `meta.${string}`;
579
+ /** Resolve which fields to include based on detail level or explicit field list. */
580
+ declare function resolveDescribeFields(detail?: DescribeDetail, fields?: readonly DescribeField[]): Set<string> | null;
560
581
  /**
561
582
  * Reads the current cached value of every companion meta field on a node,
562
583
  * suitable for merging into `describe()`-style JSON (GRAPHREFLY-SPEC §2.3, §3.6).
@@ -602,6 +623,12 @@ declare function metaSnapshot(node: Node): Record<string, unknown>;
602
623
  * describeNode(state(0));
603
624
  * ```
604
625
  */
605
- declare function describeNode(node: Node): DescribeNodeOutput;
626
+ /**
627
+ * Builds a single-node slice for `Graph.describe()`.
628
+ *
629
+ * @param node - Node to introspect.
630
+ * @param includeFields - Set of fields to include, or `null` for all. When omitted, all fields are included (legacy behavior).
631
+ */
632
+ declare function describeNode(node: Node, includeFields?: Set<string> | null): DescribeNodeOutput;
606
633
 
607
- export { propagatesToMeta as $, type Actor as A, describeNode as B, COMPLETE as C, DATA as D, ERROR as E, isKnownMessageType as F, type GuardAction as G, type HashFn as H, INVALIDATE as I, isPhase2Message as J, isTerminalMessage as K, isV1 as L, type Message as M, type Node as N, type OnMessageHandler as O, PAUSE as P, knownMessageTypes as Q, RESOLVED as R, type SubscribeHints as S, TEARDOWN as T, messageTier as U, type V0 as V, metaSnapshot as W, node as X, normalizeActor as Y, policy as Z, policyFromRules as _, type NodeOptions as a, type NodeInspectorHook as a0, type NodeActions as b, type NodeFn as c, DEFAULT_ACTOR as d, DIRTY as e, type DescribeNodeOutput as f, GuardDenied as g, type GuardDeniedDetails as h, type Messages as i, type NodeDescribeKind as j, type NodeGuard as k, type NodeSink as l, type NodeStatus as m, type NodeTransportOptions as n, type NodeVersionInfo as o, type PolicyAllow as p, type PolicyDeny as q, type PolicyRuleData as r, RESUME as s, type V1 as t, type VersioningLevel as u, type VersioningOptions as v, accessHintForGuard as w, advanceVersion as x, createVersioning as y, defaultHash as z };
634
+ export { policy as $, type Actor as A, createVersioning as B, COMPLETE as C, DATA as D, ERROR as E, defaultHash as F, type GuardAction as G, type HashFn as H, INVALIDATE as I, describeNode as J, isKnownMessageType as K, isPhase2Message as L, type Message as M, type Node as N, type OnMessageHandler as O, PAUSE as P, isTerminalMessage as Q, RESOLVED as R, type SubscribeHints as S, TEARDOWN as T, isV1 as U, type V0 as V, knownMessageTypes as W, messageTier as X, metaSnapshot as Y, node as Z, normalizeActor as _, type NodeOptions as a, policyFromRules as a0, propagatesToMeta as a1, resolveDescribeFields as a2, type NodeInspectorHook as a3, type NodeActions as b, type NodeFn as c, DEFAULT_ACTOR as d, DIRTY as e, type DescribeDetail as f, type DescribeField as g, type DescribeNodeOutput as h, GuardDenied as i, type GuardDeniedDetails as j, type Messages as k, type NodeDescribeKind as l, type NodeGuard as m, type NodeSink as n, type NodeStatus as o, type NodeTransportOptions as p, type NodeVersionInfo as q, type PolicyAllow as r, type PolicyDeny as s, type PolicyRuleData as t, RESUME as u, type V1 as v, type VersioningLevel as w, type VersioningOptions as x, accessHintForGuard as y, advanceVersion as z };
@@ -544,9 +544,9 @@ declare function node<T = unknown>(depsOrFn?: readonly Node[] | NodeFn<T> | Node
544
544
  /** JSON-shaped slice of a node for Phase 1 `Graph.describe()` (GRAPHREFLY-SPEC §3.6, Appendix B). */
545
545
  type DescribeNodeOutput = {
546
546
  type: "state" | "derived" | "producer" | "operator" | "effect";
547
- status: Node["status"];
547
+ status?: Node["status"];
548
548
  deps: string[];
549
- meta: Record<string, unknown>;
549
+ meta?: Record<string, unknown>;
550
550
  name?: string;
551
551
  value?: unknown;
552
552
  /** Node versioning info (GRAPHREFLY-SPEC §7). Present only when versioning is enabled. */
@@ -556,7 +556,28 @@ type DescribeNodeOutput = {
556
556
  cid?: string;
557
557
  prev?: string | null;
558
558
  };
559
+ /** Guard info (full detail). */
560
+ guard?: string;
561
+ /** Last mutation attribution (full detail). */
562
+ lastMutation?: Readonly<{
563
+ actor: Actor;
564
+ timestamp_ns: number;
565
+ }>;
559
566
  };
567
+ /**
568
+ * Detail level for `describe()` progressive disclosure (Phase 3.3b).
569
+ * - `"minimal"` — type + deps only (default). LLM-friendly.
570
+ * - `"standard"` — type, status, value, deps, meta, versioning (`v`).
571
+ * - `"full"` — standard + guard, lastMutation.
572
+ */
573
+ type DescribeDetail = "minimal" | "standard" | "full";
574
+ /**
575
+ * Valid field names for `describe({ fields: [...] })` (Phase 3.3b).
576
+ * Dotted paths like `"meta.label"` select specific meta keys.
577
+ */
578
+ type DescribeField = "type" | "status" | "value" | "deps" | "meta" | "v" | "guard" | "lastMutation" | `meta.${string}`;
579
+ /** Resolve which fields to include based on detail level or explicit field list. */
580
+ declare function resolveDescribeFields(detail?: DescribeDetail, fields?: readonly DescribeField[]): Set<string> | null;
560
581
  /**
561
582
  * Reads the current cached value of every companion meta field on a node,
562
583
  * suitable for merging into `describe()`-style JSON (GRAPHREFLY-SPEC §2.3, §3.6).
@@ -602,6 +623,12 @@ declare function metaSnapshot(node: Node): Record<string, unknown>;
602
623
  * describeNode(state(0));
603
624
  * ```
604
625
  */
605
- declare function describeNode(node: Node): DescribeNodeOutput;
626
+ /**
627
+ * Builds a single-node slice for `Graph.describe()`.
628
+ *
629
+ * @param node - Node to introspect.
630
+ * @param includeFields - Set of fields to include, or `null` for all. When omitted, all fields are included (legacy behavior).
631
+ */
632
+ declare function describeNode(node: Node, includeFields?: Set<string> | null): DescribeNodeOutput;
606
633
 
607
- export { propagatesToMeta as $, type Actor as A, describeNode as B, COMPLETE as C, DATA as D, ERROR as E, isKnownMessageType as F, type GuardAction as G, type HashFn as H, INVALIDATE as I, isPhase2Message as J, isTerminalMessage as K, isV1 as L, type Message as M, type Node as N, type OnMessageHandler as O, PAUSE as P, knownMessageTypes as Q, RESOLVED as R, type SubscribeHints as S, TEARDOWN as T, messageTier as U, type V0 as V, metaSnapshot as W, node as X, normalizeActor as Y, policy as Z, policyFromRules as _, type NodeOptions as a, type NodeInspectorHook as a0, type NodeActions as b, type NodeFn as c, DEFAULT_ACTOR as d, DIRTY as e, type DescribeNodeOutput as f, GuardDenied as g, type GuardDeniedDetails as h, type Messages as i, type NodeDescribeKind as j, type NodeGuard as k, type NodeSink as l, type NodeStatus as m, type NodeTransportOptions as n, type NodeVersionInfo as o, type PolicyAllow as p, type PolicyDeny as q, type PolicyRuleData as r, RESUME as s, type V1 as t, type VersioningLevel as u, type VersioningOptions as v, accessHintForGuard as w, advanceVersion as x, createVersioning as y, defaultHash as z };
634
+ export { policy as $, type Actor as A, createVersioning as B, COMPLETE as C, DATA as D, ERROR as E, defaultHash as F, type GuardAction as G, type HashFn as H, INVALIDATE as I, describeNode as J, isKnownMessageType as K, isPhase2Message as L, type Message as M, type Node as N, type OnMessageHandler as O, PAUSE as P, isTerminalMessage as Q, RESOLVED as R, type SubscribeHints as S, TEARDOWN as T, isV1 as U, type V0 as V, knownMessageTypes as W, messageTier as X, metaSnapshot as Y, node as Z, normalizeActor as _, type NodeOptions as a, policyFromRules as a0, propagatesToMeta as a1, resolveDescribeFields as a2, type NodeInspectorHook as a3, type NodeActions as b, type NodeFn as c, DEFAULT_ACTOR as d, DIRTY as e, type DescribeDetail as f, type DescribeField as g, type DescribeNodeOutput as h, GuardDenied as i, type GuardDeniedDetails as j, type Messages as k, type NodeDescribeKind as l, type NodeGuard as m, type NodeSink as n, type NodeStatus as o, type NodeTransportOptions as p, type NodeVersionInfo as q, type PolicyAllow as r, type PolicyDeny as s, type PolicyRuleData as t, RESUME as u, type V1 as v, type VersioningLevel as w, type VersioningOptions as x, accessHintForGuard as y, advanceVersion as z };