@graphrefly/graphrefly 0.25.0 → 0.26.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 (184) hide show
  1. package/README.md +8 -0
  2. package/dist/{chunk-QOWVNWOC.js → chunk-3ZWCKRHX.js} +27 -25
  3. package/dist/{chunk-QOWVNWOC.js.map → chunk-3ZWCKRHX.js.map} +1 -1
  4. package/dist/chunk-6LDQFTYS.js +102 -0
  5. package/dist/chunk-6LDQFTYS.js.map +1 -0
  6. package/dist/{chunk-IAHGTNOZ.js → chunk-AMCG74RZ.js} +193 -24
  7. package/dist/chunk-AMCG74RZ.js.map +1 -0
  8. package/dist/{chunk-L2GLW2U7.js → chunk-BVZYTZ5H.js} +9 -103
  9. package/dist/chunk-BVZYTZ5H.js.map +1 -0
  10. package/dist/chunk-FQMKGR6L.js +330 -0
  11. package/dist/chunk-FQMKGR6L.js.map +1 -0
  12. package/dist/chunk-HXZEYDUR.js +94 -0
  13. package/dist/chunk-HXZEYDUR.js.map +1 -0
  14. package/dist/{chunk-EVR6UFUV.js → chunk-IZYUSJC7.js} +16 -14
  15. package/dist/{chunk-EVR6UFUV.js.map → chunk-IZYUSJC7.js.map} +1 -1
  16. package/dist/chunk-J22W6HV3.js +107 -0
  17. package/dist/chunk-J22W6HV3.js.map +1 -0
  18. package/dist/{chunk-HWPIFSW2.js → chunk-JSCT3CR4.js} +6 -4
  19. package/dist/{chunk-HWPIFSW2.js.map → chunk-JSCT3CR4.js.map} +1 -1
  20. package/dist/chunk-JYXEWPH4.js +62 -0
  21. package/dist/chunk-JYXEWPH4.js.map +1 -0
  22. package/dist/{chunk-TKE3JGOH.js → chunk-LCE3GF5P.js} +5 -692
  23. package/dist/chunk-LCE3GF5P.js.map +1 -0
  24. package/dist/chunk-MJ2NKQQL.js +119 -0
  25. package/dist/chunk-MJ2NKQQL.js.map +1 -0
  26. package/dist/chunk-N6UR7YVY.js +198 -0
  27. package/dist/chunk-N6UR7YVY.js.map +1 -0
  28. package/dist/chunk-OHISZPOJ.js +97 -0
  29. package/dist/chunk-OHISZPOJ.js.map +1 -0
  30. package/dist/{chunk-5DJTTKX3.js → chunk-PHOUUNK7.js} +74 -111
  31. package/dist/chunk-PHOUUNK7.js.map +1 -0
  32. package/dist/{chunk-PY4XCDLR.js → chunk-RB6QPHJ7.js} +8 -6
  33. package/dist/{chunk-PY4XCDLR.js.map → chunk-RB6QPHJ7.js.map} +1 -1
  34. package/dist/chunk-SN4YWWYO.js +171 -0
  35. package/dist/chunk-SN4YWWYO.js.map +1 -0
  36. package/dist/chunk-SX52TAR4.js +110 -0
  37. package/dist/chunk-SX52TAR4.js.map +1 -0
  38. package/dist/{chunk-XOFWRC73.js → chunk-THTWHNU4.js} +319 -24
  39. package/dist/chunk-THTWHNU4.js.map +1 -0
  40. package/dist/{chunk-H4RVA4VE.js → chunk-VYPWMZ6H.js} +2 -2
  41. package/dist/chunk-XGPU467M.js +136 -0
  42. package/dist/chunk-XGPU467M.js.map +1 -0
  43. package/dist/chunk-ZQMEI34O.js +713 -0
  44. package/dist/chunk-ZQMEI34O.js.map +1 -0
  45. package/dist/compat/index.cjs +7656 -0
  46. package/dist/compat/index.cjs.map +1 -0
  47. package/dist/compat/index.d.cts +18 -0
  48. package/dist/compat/index.d.ts +18 -0
  49. package/dist/compat/index.js +49 -0
  50. package/dist/compat/index.js.map +1 -0
  51. package/dist/compat/jotai/index.cjs +2048 -0
  52. package/dist/compat/jotai/index.cjs.map +1 -0
  53. package/dist/compat/jotai/index.d.cts +2 -0
  54. package/dist/compat/jotai/index.d.ts +2 -0
  55. package/dist/compat/jotai/index.js +9 -0
  56. package/dist/compat/jotai/index.js.map +1 -0
  57. package/dist/compat/nanostores/index.cjs +2175 -0
  58. package/dist/compat/nanostores/index.cjs.map +1 -0
  59. package/dist/compat/nanostores/index.d.cts +2 -0
  60. package/dist/compat/nanostores/index.d.ts +2 -0
  61. package/dist/compat/nanostores/index.js +23 -0
  62. package/dist/compat/nanostores/index.js.map +1 -0
  63. package/dist/compat/nestjs/index.cjs +350 -16
  64. package/dist/compat/nestjs/index.cjs.map +1 -1
  65. package/dist/compat/nestjs/index.d.cts +6 -6
  66. package/dist/compat/nestjs/index.d.ts +6 -6
  67. package/dist/compat/nestjs/index.js +10 -9
  68. package/dist/compat/react/index.cjs +141 -0
  69. package/dist/compat/react/index.cjs.map +1 -0
  70. package/dist/compat/react/index.d.cts +2 -0
  71. package/dist/compat/react/index.d.ts +2 -0
  72. package/dist/compat/react/index.js +12 -0
  73. package/dist/compat/react/index.js.map +1 -0
  74. package/dist/compat/solid/index.cjs +128 -0
  75. package/dist/compat/solid/index.cjs.map +1 -0
  76. package/dist/compat/solid/index.d.cts +2 -0
  77. package/dist/compat/solid/index.d.ts +2 -0
  78. package/dist/compat/solid/index.js +12 -0
  79. package/dist/compat/solid/index.js.map +1 -0
  80. package/dist/compat/svelte/index.cjs +131 -0
  81. package/dist/compat/svelte/index.cjs.map +1 -0
  82. package/dist/compat/svelte/index.d.cts +2 -0
  83. package/dist/compat/svelte/index.d.ts +2 -0
  84. package/dist/compat/svelte/index.js +12 -0
  85. package/dist/compat/svelte/index.js.map +1 -0
  86. package/dist/compat/vue/index.cjs +146 -0
  87. package/dist/compat/vue/index.cjs.map +1 -0
  88. package/dist/compat/vue/index.d.cts +3 -0
  89. package/dist/compat/vue/index.d.ts +3 -0
  90. package/dist/compat/vue/index.js +12 -0
  91. package/dist/compat/vue/index.js.map +1 -0
  92. package/dist/compat/zustand/index.cjs +4931 -0
  93. package/dist/compat/zustand/index.cjs.map +1 -0
  94. package/dist/compat/zustand/index.d.cts +5 -0
  95. package/dist/compat/zustand/index.d.ts +5 -0
  96. package/dist/compat/zustand/index.js +12 -0
  97. package/dist/compat/zustand/index.js.map +1 -0
  98. package/dist/core/index.cjs +53 -4
  99. package/dist/core/index.cjs.map +1 -1
  100. package/dist/core/index.d.cts +3 -3
  101. package/dist/core/index.d.ts +3 -3
  102. package/dist/core/index.js +26 -24
  103. package/dist/demo-shell-26p5fVxn.d.cts +102 -0
  104. package/dist/demo-shell-DEp-nMTl.d.ts +102 -0
  105. package/dist/extra/index.cjs +222 -110
  106. package/dist/extra/index.cjs.map +1 -1
  107. package/dist/extra/index.d.cts +5 -4
  108. package/dist/extra/index.d.ts +5 -4
  109. package/dist/extra/index.js +6 -5
  110. package/dist/extra/sources.cjs +2486 -0
  111. package/dist/extra/sources.cjs.map +1 -0
  112. package/dist/extra/sources.d.cts +465 -0
  113. package/dist/extra/sources.d.ts +465 -0
  114. package/dist/extra/sources.js +57 -0
  115. package/dist/extra/sources.js.map +1 -0
  116. package/dist/graph/index.cjs +408 -14
  117. package/dist/graph/index.cjs.map +1 -1
  118. package/dist/graph/index.d.cts +5 -5
  119. package/dist/graph/index.d.ts +5 -5
  120. package/dist/graph/index.js +13 -5
  121. package/dist/{graph-B6NFqv3z.d.ts → graph-6tZ5jEzr.d.cts} +195 -4
  122. package/dist/{graph-D-3JIQme.d.cts → graph-DQ69XU0g.d.ts} +195 -4
  123. package/dist/index-B4MP_8V_.d.cts +37 -0
  124. package/dist/index-BEfE8H_G.d.cts +121 -0
  125. package/dist/{index-OXImXMq6.d.ts → index-BW1z3BN9.d.ts} +18 -196
  126. package/dist/index-BYOHF0zP.d.ts +34 -0
  127. package/dist/index-B_IP40nB.d.cts +36 -0
  128. package/dist/index-Bd_fwmLf.d.cts +45 -0
  129. package/dist/{index-Ds23Wvou.d.ts → index-BeIdBfcb.d.cts} +120 -573
  130. package/dist/index-BjI6ty9z.d.ts +121 -0
  131. package/dist/index-Bxb5ZYc9.d.cts +34 -0
  132. package/dist/{index-BJB7t9gg.d.cts → index-C0ZXMaXO.d.cts} +2 -2
  133. package/dist/{index-DKE1EATr.d.cts → index-C8mdwMXc.d.cts} +18 -196
  134. package/dist/index-CDAjUFIv.d.ts +36 -0
  135. package/dist/index-CPgZ5wRl.d.ts +44 -0
  136. package/dist/{index-AMWewNDe.d.cts → index-CUwyr1Kk.d.cts} +33 -4
  137. package/dist/index-CUyrtuOf.d.cts +127 -0
  138. package/dist/{index-C-TXEa7C.d.ts → index-CY2TljO4.d.ts} +2 -2
  139. package/dist/index-CmnuOibw.d.ts +37 -0
  140. package/dist/{index-DiobMNwE.d.ts → index-CuYwdKO-.d.ts} +3 -3
  141. package/dist/index-DFhjO4Gg.d.cts +44 -0
  142. package/dist/{index-Ch0IpIO0.d.cts → index-DdD5MVDL.d.ts} +120 -573
  143. package/dist/index-DrISNAOm.d.ts +45 -0
  144. package/dist/index-QBpffFW-.d.cts +86 -0
  145. package/dist/{index-J7Kc0oIQ.d.cts → index-_oMEWlDq.d.cts} +3 -3
  146. package/dist/{index-CYkjxu3s.d.ts → index-eJ6T_qGM.d.ts} +33 -4
  147. package/dist/index-qldRdbQw.d.ts +86 -0
  148. package/dist/index-xdGjv0nO.d.ts +127 -0
  149. package/dist/index.cjs +1780 -176
  150. package/dist/index.cjs.map +1 -1
  151. package/dist/index.d.cts +1007 -648
  152. package/dist/index.d.ts +1007 -648
  153. package/dist/index.js +1202 -1172
  154. package/dist/index.js.map +1 -1
  155. package/dist/{meta-CnkLA_43.d.ts → meta-BGqSZ7mt.d.ts} +1 -1
  156. package/dist/{meta-DWbkoq1s.d.cts → meta-C0-8XW6Q.d.cts} +1 -1
  157. package/dist/{node-B-f-Lu-k.d.cts → node-C_IBuvX2.d.cts} +26 -1
  158. package/dist/{node-B-f-Lu-k.d.ts → node-C_IBuvX2.d.ts} +26 -1
  159. package/dist/{observable-DBnrwcar.d.cts → observable-Crr1jgzx.d.cts} +1 -1
  160. package/dist/{observable-uP-wy_uK.d.ts → observable-DCk45RH5.d.ts} +1 -1
  161. package/dist/patterns/demo-shell.cjs +5604 -0
  162. package/dist/patterns/demo-shell.cjs.map +1 -0
  163. package/dist/patterns/demo-shell.d.cts +6 -0
  164. package/dist/patterns/demo-shell.d.ts +6 -0
  165. package/dist/patterns/demo-shell.js +15 -0
  166. package/dist/patterns/demo-shell.js.map +1 -0
  167. package/dist/patterns/reactive-layout/index.cjs +355 -13
  168. package/dist/patterns/reactive-layout/index.cjs.map +1 -1
  169. package/dist/patterns/reactive-layout/index.d.cts +6 -5
  170. package/dist/patterns/reactive-layout/index.d.ts +6 -5
  171. package/dist/patterns/reactive-layout/index.js +15 -12
  172. package/dist/reactive-layout-BaOQefHu.d.cts +183 -0
  173. package/dist/reactive-layout-D9gejYXE.d.ts +183 -0
  174. package/dist/{storage-BuTdpCI1.d.cts → storage-BMycWEh2.d.ts} +9 -1
  175. package/dist/{storage-F2X1U1x0.d.ts → storage-DiqWHzVI.d.cts} +9 -1
  176. package/package.json +32 -2
  177. package/dist/chunk-5DJTTKX3.js.map +0 -1
  178. package/dist/chunk-IAHGTNOZ.js.map +0 -1
  179. package/dist/chunk-L2GLW2U7.js.map +0 -1
  180. package/dist/chunk-MW4VAKAO.js +0 -47
  181. package/dist/chunk-MW4VAKAO.js.map +0 -1
  182. package/dist/chunk-TKE3JGOH.js.map +0 -1
  183. package/dist/chunk-XOFWRC73.js.map +0 -1
  184. /package/dist/{chunk-H4RVA4VE.js.map → chunk-VYPWMZ6H.js.map} +0 -0
package/README.md CHANGED
@@ -9,6 +9,14 @@ GraphReFly makes long-running human + LLM co-operation reactive, resumable, and
9
9
 
10
10
  [Docs](https://graphrefly.dev) | [Spec](https://graphrefly.dev/spec/) | [Python API](https://graphrefly.dev/py/api/) | [TS API Reference](https://graphrefly.dev/api/node/)
11
11
 
12
+ ## Packages
13
+
14
+ | Package | What it is |
15
+ |---|---|
16
+ | [`@graphrefly/graphrefly`](https://www.npmjs.com/package/@graphrefly/graphrefly) | The library — reactive graph primitives, operators, `Graph` container, framework adapters. |
17
+ | [`@graphrefly/mcp-server`](./packages/mcp-server) | Model Context Protocol server — expose GraphReFly to Claude Desktop, Claude Code, Cline, Cursor, and any MCP client as `graphrefly_*` tools. |
18
+ | [`@graphrefly/cli`](./packages/cli) | Stateless command-line shell — `describe`, `explain`, `observe`, `reduce`, `snapshot`, and `mcp` (boot the server) from your terminal or CI. |
19
+
12
20
  ---
13
21
 
14
22
  <!-- TODO: Demo 0 GIF/video — NL → flow view → running → "why was this flagged?" -->
@@ -1,33 +1,11 @@
1
1
  import {
2
2
  resolveDescribeFields
3
- } from "./chunk-H4RVA4VE.js";
3
+ } from "./chunk-VYPWMZ6H.js";
4
4
  import {
5
- COMPLETE,
6
- COMPLETE_MSG,
7
- COMPLETE_ONLY_BATCH,
8
- DATA,
9
5
  DEFAULT_ACTOR,
10
- DIRTY,
11
- DIRTY_MSG,
12
- DIRTY_ONLY_BATCH,
13
- ERROR,
14
6
  GraphReFlyConfig,
15
7
  GuardDenied,
16
- INVALIDATE,
17
- INVALIDATE_MSG,
18
- INVALIDATE_ONLY_BATCH,
19
8
  NodeImpl,
20
- PAUSE,
21
- RESOLVED,
22
- RESOLVED_MSG,
23
- RESOLVED_ONLY_BATCH,
24
- RESUME,
25
- START,
26
- START_MSG,
27
- TEARDOWN,
28
- TEARDOWN_MSG,
29
- TEARDOWN_ONLY_BATCH,
30
- __export,
31
9
  accessHintForGuard,
32
10
  advanceVersion,
33
11
  autoTrackNode,
@@ -52,7 +30,31 @@ import {
52
30
  registerBuiltins,
53
31
  state,
54
32
  wallClockNs
55
- } from "./chunk-5DJTTKX3.js";
33
+ } from "./chunk-PHOUUNK7.js";
34
+ import {
35
+ COMPLETE,
36
+ COMPLETE_MSG,
37
+ COMPLETE_ONLY_BATCH,
38
+ DATA,
39
+ DIRTY,
40
+ DIRTY_MSG,
41
+ DIRTY_ONLY_BATCH,
42
+ ERROR,
43
+ INVALIDATE,
44
+ INVALIDATE_MSG,
45
+ INVALIDATE_ONLY_BATCH,
46
+ PAUSE,
47
+ RESOLVED,
48
+ RESOLVED_MSG,
49
+ RESOLVED_ONLY_BATCH,
50
+ RESUME,
51
+ START,
52
+ START_MSG,
53
+ TEARDOWN,
54
+ TEARDOWN_MSG,
55
+ TEARDOWN_ONLY_BATCH,
56
+ __export
57
+ } from "./chunk-SX52TAR4.js";
56
58
 
57
59
  // src/core/index.ts
58
60
  var core_exports = {};
@@ -112,4 +114,4 @@ __export(core_exports, {
112
114
  export {
113
115
  core_exports
114
116
  };
115
- //# sourceMappingURL=chunk-QOWVNWOC.js.map
117
+ //# sourceMappingURL=chunk-3ZWCKRHX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/index.ts"],"sourcesContent":["/**\n * Core layer: message protocol, node primitive, lifecycle (Phase 0).\n */\nexport * from \"./actor.js\";\nexport { batch, downWithBatch, isBatching } from \"./batch.js\";\nexport { monotonicNs, wallClockNs } from \"./clock.js\";\nexport {\n\ttype GlobalInspectorEvent,\n\ttype GlobalInspectorHook,\n\tGraphReFlyConfig,\n\ttype MessageContext,\n\ttype NodeActions,\n\ttype NodeCtx,\n\ttype OnMessageHandler,\n\ttype OnSubscribeHandler,\n\tregisterBuiltins,\n\ttype SubscribeContext,\n} from \"./config.js\";\nexport * from \"./guard.js\";\nexport {\n\tCOMPLETE,\n\tCOMPLETE_MSG,\n\tCOMPLETE_ONLY_BATCH,\n\tDATA,\n\tDIRTY,\n\tDIRTY_MSG,\n\tDIRTY_ONLY_BATCH,\n\tERROR,\n\tINVALIDATE,\n\tINVALIDATE_MSG,\n\tINVALIDATE_ONLY_BATCH,\n\ttype Message,\n\ttype Messages,\n\ttype MessageTypeRegistration,\n\ttype MessageTypeRegistrationInput,\n\tPAUSE,\n\tRESOLVED,\n\tRESOLVED_MSG,\n\tRESOLVED_ONLY_BATCH,\n\tRESUME,\n\tSTART,\n\tSTART_MSG,\n\tTEARDOWN,\n\tTEARDOWN_MSG,\n\tTEARDOWN_ONLY_BATCH,\n} from \"./messages.js\";\nexport {\n\ttype DescribeDetail,\n\ttype DescribeField,\n\ttype DescribeNodeOutput,\n\tresolveDescribeFields,\n} from \"./meta.js\";\nexport {\n\tconfigure,\n\ttype DepRecord,\n\tdefaultConfig,\n\ttype FnCtx,\n\ttype Node,\n\ttype NodeDescribeKind,\n\ttype NodeFn,\n\ttype NodeFnCleanup,\n\tNodeImpl,\n\ttype NodeInspectorHook,\n\ttype NodeInspectorHookEvent,\n\ttype NodeOptions,\n\ttype NodeSink,\n\ttype NodeStatus,\n\ttype NodeTransportOptions,\n\tnode,\n} from \"./node.js\";\nexport {\n\ttype AutoTrackOptions,\n\tautoTrackNode,\n\ttype DerivedFn,\n\ttype DynamicFn,\n\tderived,\n\tdynamicNode,\n\ttype EffectFn,\n\teffect,\n\ttype PipeOperator,\n\ttype ProducerFn,\n\tpipe,\n\tproducer,\n\tstate,\n\ttype TrackFn,\n} from \"./sugar.js\";\nexport {\n\tadvanceVersion,\n\tcreateVersioning,\n\tdefaultHash,\n\ttype HashFn,\n\tisV1,\n\ttype NodeVersionInfo,\n\ttype V0,\n\ttype V1,\n\ttype VersioningLevel,\n\ttype VersioningOptions,\n} from \"./versioning.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/core/index.ts"],"sourcesContent":["/**\n * Core layer: message protocol, node primitive, lifecycle (Phase 0).\n */\nexport * from \"./actor.js\";\nexport { batch, downWithBatch, isBatching } from \"./batch.js\";\nexport { monotonicNs, wallClockNs } from \"./clock.js\";\nexport {\n\ttype GlobalInspectorEvent,\n\ttype GlobalInspectorHook,\n\tGraphReFlyConfig,\n\ttype MessageContext,\n\ttype NodeActions,\n\ttype NodeCtx,\n\ttype OnMessageHandler,\n\ttype OnSubscribeHandler,\n\tregisterBuiltins,\n\ttype SubscribeContext,\n} from \"./config.js\";\nexport * from \"./guard.js\";\nexport {\n\tCOMPLETE,\n\tCOMPLETE_MSG,\n\tCOMPLETE_ONLY_BATCH,\n\tDATA,\n\tDIRTY,\n\tDIRTY_MSG,\n\tDIRTY_ONLY_BATCH,\n\tERROR,\n\tINVALIDATE,\n\tINVALIDATE_MSG,\n\tINVALIDATE_ONLY_BATCH,\n\ttype Message,\n\ttype Messages,\n\ttype MessageTypeRegistration,\n\ttype MessageTypeRegistrationInput,\n\tPAUSE,\n\tRESOLVED,\n\tRESOLVED_MSG,\n\tRESOLVED_ONLY_BATCH,\n\tRESUME,\n\tSTART,\n\tSTART_MSG,\n\tTEARDOWN,\n\tTEARDOWN_MSG,\n\tTEARDOWN_ONLY_BATCH,\n} from \"./messages.js\";\nexport {\n\ttype DescribeDetail,\n\ttype DescribeField,\n\ttype DescribeNodeOutput,\n\tresolveDescribeFields,\n} from \"./meta.js\";\nexport {\n\tconfigure,\n\ttype DepRecord,\n\tdefaultConfig,\n\ttype FnCtx,\n\ttype Node,\n\ttype NodeDescribeKind,\n\ttype NodeFn,\n\ttype NodeFnCleanup,\n\tNodeImpl,\n\ttype NodeInspectorHook,\n\ttype NodeInspectorHookEvent,\n\ttype NodeOptions,\n\ttype NodeSink,\n\ttype NodeStatus,\n\ttype NodeTransportOptions,\n\tnode,\n} from \"./node.js\";\nexport {\n\ttype AutoTrackOptions,\n\tautoTrackNode,\n\ttype DerivedFn,\n\ttype DynamicFn,\n\tderived,\n\tdynamicNode,\n\ttype EffectFn,\n\teffect,\n\ttype PipeOperator,\n\ttype ProducerFn,\n\tpipe,\n\tproducer,\n\tstate,\n\ttype TrackFn,\n} from \"./sugar.js\";\nexport {\n\tadvanceVersion,\n\tcreateVersioning,\n\tdefaultHash,\n\ttype HashFn,\n\tisV1,\n\ttype NodeVersionInfo,\n\ttype V0,\n\ttype V1,\n\ttype VersioningLevel,\n\ttype VersioningOptions,\n} from \"./versioning.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}
@@ -0,0 +1,102 @@
1
+ import {
2
+ GRAPH_META_SEGMENT,
3
+ Graph,
4
+ OVERHEAD,
5
+ SIZEOF_SYMBOL,
6
+ SNAPSHOT_VERSION,
7
+ diffForWAL,
8
+ explainPath,
9
+ graphProfile,
10
+ reachable,
11
+ sizeof
12
+ } from "./chunk-THTWHNU4.js";
13
+ import {
14
+ ENVELOPE_VERSION,
15
+ JsonCodec,
16
+ createDagCborCodec,
17
+ createDagCborZstdCodec,
18
+ decodeEnvelope,
19
+ encodeEnvelope,
20
+ registerBuiltinCodecs,
21
+ replayWAL
22
+ } from "./chunk-PHOUUNK7.js";
23
+ import {
24
+ DATA,
25
+ __export
26
+ } from "./chunk-SX52TAR4.js";
27
+
28
+ // src/graph/index.ts
29
+ var graph_exports = {};
30
+ __export(graph_exports, {
31
+ ENVELOPE_VERSION: () => ENVELOPE_VERSION,
32
+ GRAPH_META_SEGMENT: () => GRAPH_META_SEGMENT,
33
+ Graph: () => Graph,
34
+ JsonCodec: () => JsonCodec,
35
+ SIZEOF_OVERHEAD: () => OVERHEAD,
36
+ SIZEOF_SYMBOL: () => SIZEOF_SYMBOL,
37
+ SNAPSHOT_VERSION: () => SNAPSHOT_VERSION,
38
+ createDagCborCodec: () => createDagCborCodec,
39
+ createDagCborZstdCodec: () => createDagCborZstdCodec,
40
+ decodeEnvelope: () => decodeEnvelope,
41
+ diffForWAL: () => diffForWAL,
42
+ encodeEnvelope: () => encodeEnvelope,
43
+ explainPath: () => explainPath,
44
+ graphProfile: () => graphProfile,
45
+ reachable: () => reachable,
46
+ registerBuiltinCodecs: () => registerBuiltinCodecs,
47
+ replayWAL: () => replayWAL,
48
+ sizeof: () => sizeof,
49
+ watchTopologyTree: () => watchTopologyTree
50
+ });
51
+
52
+ // src/graph/topology-tree.ts
53
+ function watchTopologyTree(graph, cb) {
54
+ const subs = /* @__PURE__ */ new Map();
55
+ const wire = (g, prefix) => {
56
+ if (subs.has(g)) return;
57
+ const placeholder = { off: () => {
58
+ }, prefix };
59
+ subs.set(g, placeholder);
60
+ const off = g.topology.subscribe((msgs) => {
61
+ for (const m of msgs) {
62
+ if (m[0] !== DATA) continue;
63
+ const event = m[1];
64
+ cb(event, g, prefix);
65
+ if (event.kind === "added" && event.nodeKind === "mount") {
66
+ const child = g._mounts.get(event.name);
67
+ if (child instanceof Graph) {
68
+ const childPrefix = `${prefix}${event.name}::`;
69
+ wire(child, childPrefix);
70
+ }
71
+ } else if (event.kind === "removed" && event.nodeKind === "mount") {
72
+ const removedPrefix = `${prefix}${event.name}::`;
73
+ for (const [trackedGraph, trackedEntry] of Array.from(subs.entries())) {
74
+ if (trackedGraph === graph) continue;
75
+ if (trackedEntry.prefix.startsWith(removedPrefix)) {
76
+ trackedEntry.off();
77
+ subs.delete(trackedGraph);
78
+ }
79
+ }
80
+ }
81
+ }
82
+ });
83
+ placeholder.off = off;
84
+ for (const [mountName, child] of g._mounts) {
85
+ if (child instanceof Graph) {
86
+ const childPrefix = `${prefix}${mountName}::`;
87
+ wire(child, childPrefix);
88
+ }
89
+ }
90
+ };
91
+ wire(graph, "");
92
+ return () => {
93
+ for (const entry of subs.values()) entry.off();
94
+ subs.clear();
95
+ };
96
+ }
97
+
98
+ export {
99
+ watchTopologyTree,
100
+ graph_exports
101
+ };
102
+ //# sourceMappingURL=chunk-6LDQFTYS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/graph/index.ts","../src/graph/topology-tree.ts"],"sourcesContent":["/**\n * Graph container: registry, wiring, introspection (Phase 1).\n */\n\nexport { OVERHEAD as SIZEOF_OVERHEAD, SIZEOF_SYMBOL, sizeof } from \"../extra/utils/sizeof.js\";\nexport {\n\tcreateDagCborCodec,\n\tcreateDagCborZstdCodec,\n\tdecodeEnvelope,\n\tENVELOPE_VERSION,\n\ttype EvictedSubgraphInfo,\n\ttype EvictionPolicy,\n\tencodeEnvelope,\n\ttype GraphCodec,\n\tJsonCodec,\n\ttype LazyGraphCodec,\n\tregisterBuiltinCodecs,\n\treplayWAL,\n\ttype WALEntry,\n} from \"./codec.js\";\nexport {\n\ttype CausalChain,\n\ttype CausalStep,\n\ttype ExplainPathOptions,\n\texplainPath,\n} from \"./explain.js\";\nexport {\n\ttype DescribeFilter,\n\tdiffForWAL,\n\tGRAPH_META_SEGMENT,\n\tGraph,\n\ttype GraphActorOptions,\n\ttype GraphAttachStorageOptions,\n\ttype GraphCheckpointRecord,\n\ttype GraphDescribeOptions,\n\ttype GraphDescribeOutput,\n\ttype GraphDiagramDirection,\n\ttype GraphDiagramOptions,\n\ttype GraphDiffChange,\n\ttype GraphDiffResult,\n\ttype GraphFactoryContext,\n\ttype GraphNodeFactory,\n\ttype GraphObserveAll,\n\ttype GraphObserveOne,\n\ttype GraphOptions,\n\ttype GraphPersistSnapshot,\n\ttype GraphVersionChange,\n\ttype GraphWALDiff,\n\ttype ObserveDetail,\n\ttype ObserveEvent,\n\ttype ObserveOptions,\n\ttype ObserveResult,\n\ttype ObserveTheme,\n\ttype ObserveThemeName,\n\ttype ReachableDirection,\n\ttype ReachableOptions,\n\treachable,\n\tSNAPSHOT_VERSION,\n\ttype TopologyEvent,\n\ttype TraceEntry,\n} from \"./graph.js\";\nexport {\n\ttype GraphProfileOptions,\n\ttype GraphProfileResult,\n\tgraphProfile,\n\ttype NodeProfile,\n} from \"./profile.js\";\nexport { watchTopologyTree } from \"./topology-tree.js\";\n","/**\n * Transitive structural-change subscription helper.\n *\n * Subscribes to a graph's {@link Graph.topology} event stream AND recurses\n * into every mounted subgraph, auto-wiring new mounts when they appear\n * (via parent `added: mount` events) and tearing down subscriptions for\n * unmounted subgraphs (via `removed: mount` events + the audit record).\n *\n * Lives in `graph/` rather than `patterns/` because it depends only on\n * the `Graph` primitive and the `TopologyEvent` type — no domain-layer\n * factories. Consumers that need full-tree dynamic coverage (e.g.\n * `policyEnforcer`, `graphLens`) import from here to avoid circular\n * references between audit/lens modules.\n *\n * @module\n */\nimport { DATA } from \"../core/messages.js\";\nimport type { TopologyEvent } from \"./graph.js\";\nimport { Graph } from \"./graph.js\";\n\n/**\n * Subscribe to structural changes across `graph` and every transitively\n * mounted subgraph. `cb` fires on every {@link TopologyEvent} from any\n * graph in the tree. Newly-mounted subgraphs are auto-wired when their\n * parent emits `{kind: \"added\", nodeKind: \"mount\"}`; newly-unmounted\n * subgraphs' subscriptions are disposed via the parent's\n * `{kind: \"removed\", nodeKind: \"mount\"}` event plus the returned\n * `GraphRemoveAudit`.\n *\n * The callback receives a third argument `prefix`: the `::`-delimited\n * path from the root watched graph to the emitter, ending with `\"::\"`\n * (empty string when the event comes from the root itself). Compute\n * a qualified path for an added/removed entry as `prefix + event.name`.\n *\n * @param graph - Root graph to watch.\n * @param cb - Receives `(event, emitterGraph, prefix)`.\n * @returns Dispose function — tears down every active subscription.\n *\n * @category observability\n */\nexport function watchTopologyTree(\n\tgraph: Graph,\n\tcb: (event: TopologyEvent, emitter: Graph, prefix: string) => void,\n): () => void {\n\t// Tracks every wired graph with its qualified prefix (path from root).\n\t// Prefix is used for both qualified-path emission to `cb` AND prefix-match\n\t// disposal when a mount is removed — more robust than relying on\n\t// `_parent == null` which only nulls on the direct child, not on\n\t// grandchildren within an unmounted subtree.\n\ttype Entry = { off: () => void; prefix: string };\n\tconst subs = new Map<Graph, Entry>();\n\n\tconst wire = (g: Graph, prefix: string): void => {\n\t\tif (subs.has(g)) return;\n\t\t// Placeholder entry set BEFORE subscribe so any synchronous reentry\n\t\t// (e.g. a mount-added handler firing during subscribe's initial push)\n\t\t// sees this graph as already wired and skips rewiring.\n\t\tconst placeholder: Entry = { off: () => {}, prefix };\n\t\tsubs.set(g, placeholder);\n\t\tconst off = g.topology.subscribe((msgs) => {\n\t\t\tfor (const m of msgs) {\n\t\t\t\tif (m[0] !== DATA) continue;\n\t\t\t\tconst event = m[1] as TopologyEvent;\n\t\t\t\tcb(event, g, prefix);\n\t\t\t\tif (event.kind === \"added\" && event.nodeKind === \"mount\") {\n\t\t\t\t\tconst child = g._mounts.get(event.name);\n\t\t\t\t\tif (child instanceof Graph) {\n\t\t\t\t\t\tconst childPrefix = `${prefix}${event.name}::`;\n\t\t\t\t\t\twire(child, childPrefix);\n\t\t\t\t\t}\n\t\t\t\t} else if (event.kind === \"removed\" && event.nodeKind === \"mount\") {\n\t\t\t\t\t// Dispose every tracked sub whose prefix is under the removed\n\t\t\t\t\t// mount. Matches on qualified-prefix rather than `_parent`\n\t\t\t\t\t// so deep descendants are released even when their parent\n\t\t\t\t\t// pointers haven't been nulled.\n\t\t\t\t\tconst removedPrefix = `${prefix}${event.name}::`;\n\t\t\t\t\tfor (const [trackedGraph, trackedEntry] of Array.from(subs.entries())) {\n\t\t\t\t\t\tif (trackedGraph === graph) continue;\n\t\t\t\t\t\tif (trackedEntry.prefix.startsWith(removedPrefix)) {\n\t\t\t\t\t\t\ttrackedEntry.off();\n\t\t\t\t\t\t\tsubs.delete(trackedGraph);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tplaceholder.off = off;\n\t\t// Recursively wire any children already mounted when this call runs.\n\t\tfor (const [mountName, child] of g._mounts) {\n\t\t\tif (child instanceof Graph) {\n\t\t\t\tconst childPrefix = `${prefix}${mountName}::`;\n\t\t\t\twire(child, childPrefix);\n\t\t\t}\n\t\t}\n\t};\n\n\twire(graph, \"\");\n\n\treturn () => {\n\t\tfor (const entry of subs.values()) entry.off();\n\t\tsubs.clear();\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACwCO,SAAS,kBACf,OACA,IACa;AAOb,QAAM,OAAO,oBAAI,IAAkB;AAEnC,QAAM,OAAO,CAAC,GAAU,WAAyB;AAChD,QAAI,KAAK,IAAI,CAAC,EAAG;AAIjB,UAAM,cAAqB,EAAE,KAAK,MAAM;AAAA,IAAC,GAAG,OAAO;AACnD,SAAK,IAAI,GAAG,WAAW;AACvB,UAAM,MAAM,EAAE,SAAS,UAAU,CAAC,SAAS;AAC1C,iBAAW,KAAK,MAAM;AACrB,YAAI,EAAE,CAAC,MAAM,KAAM;AACnB,cAAM,QAAQ,EAAE,CAAC;AACjB,WAAG,OAAO,GAAG,MAAM;AACnB,YAAI,MAAM,SAAS,WAAW,MAAM,aAAa,SAAS;AACzD,gBAAM,QAAQ,EAAE,QAAQ,IAAI,MAAM,IAAI;AACtC,cAAI,iBAAiB,OAAO;AAC3B,kBAAM,cAAc,GAAG,MAAM,GAAG,MAAM,IAAI;AAC1C,iBAAK,OAAO,WAAW;AAAA,UACxB;AAAA,QACD,WAAW,MAAM,SAAS,aAAa,MAAM,aAAa,SAAS;AAKlE,gBAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,IAAI;AAC5C,qBAAW,CAAC,cAAc,YAAY,KAAK,MAAM,KAAK,KAAK,QAAQ,CAAC,GAAG;AACtE,gBAAI,iBAAiB,MAAO;AAC5B,gBAAI,aAAa,OAAO,WAAW,aAAa,GAAG;AAClD,2BAAa,IAAI;AACjB,mBAAK,OAAO,YAAY;AAAA,YACzB;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD,CAAC;AACD,gBAAY,MAAM;AAElB,eAAW,CAAC,WAAW,KAAK,KAAK,EAAE,SAAS;AAC3C,UAAI,iBAAiB,OAAO;AAC3B,cAAM,cAAc,GAAG,MAAM,GAAG,SAAS;AACzC,aAAK,OAAO,WAAW;AAAA,MACxB;AAAA,IACD;AAAA,EACD;AAEA,OAAK,OAAO,EAAE;AAEd,SAAO,MAAM;AACZ,eAAW,SAAS,KAAK,OAAO,EAAG,OAAM,IAAI;AAC7C,SAAK,MAAM;AAAA,EACZ;AACD;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  createWatermarkController,
4
4
  reactiveLog,
5
5
  toObservable
6
- } from "./chunk-PY4XCDLR.js";
6
+ } from "./chunk-RB6QPHJ7.js";
7
7
  import {
8
8
  cached,
9
9
  empty,
@@ -15,7 +15,6 @@ import {
15
15
  fromAsyncIter,
16
16
  fromCron,
17
17
  fromEvent,
18
- fromFSWatch,
19
18
  fromIter,
20
19
  fromPromise,
21
20
  fromRaf,
@@ -33,11 +32,22 @@ import {
33
32
  shareReplay,
34
33
  throwError,
35
34
  toArray
36
- } from "./chunk-L2GLW2U7.js";
35
+ } from "./chunk-BVZYTZ5H.js";
37
36
  import {
38
37
  ResettableTimer,
39
38
  RingBuffer
40
39
  } from "./chunk-7TAQJHQV.js";
40
+ import {
41
+ batch,
42
+ defaultConfig,
43
+ derived,
44
+ effect,
45
+ monotonicNs,
46
+ node,
47
+ producer,
48
+ state,
49
+ wallClockNs
50
+ } from "./chunk-PHOUUNK7.js";
41
51
  import {
42
52
  COMPLETE,
43
53
  DATA,
@@ -50,17 +60,8 @@ import {
50
60
  START,
51
61
  TEARDOWN,
52
62
  __export,
53
- __require,
54
- batch,
55
- defaultConfig,
56
- derived,
57
- effect,
58
- monotonicNs,
59
- node,
60
- producer,
61
- state,
62
- wallClockNs
63
- } from "./chunk-5DJTTKX3.js";
63
+ __require
64
+ } from "./chunk-SX52TAR4.js";
64
65
 
65
66
  // src/extra/index.ts
66
67
  var extra_exports = {};
@@ -5920,11 +5921,118 @@ function reactiveList(initial, options = {}) {
5920
5921
  };
5921
5922
  }
5922
5923
 
5924
+ // src/extra/sources-fs.ts
5925
+ import { existsSync, watch } from "node:fs";
5926
+ import { resolve as resolvePath } from "node:path";
5927
+ function sourceOpts3(opts) {
5928
+ return { describeKind: "producer", ...opts };
5929
+ }
5930
+ function fromFSWatch(paths, opts) {
5931
+ const list = Array.isArray(paths) ? paths : [paths];
5932
+ if (list.length === 0) {
5933
+ throw new RangeError("fromFSWatch expects at least one path");
5934
+ }
5935
+ const { recursive = true, debounce: debounce2 = 100, include, exclude, ...rest } = opts ?? {};
5936
+ const includePatterns = include?.map(globToRegExp) ?? [];
5937
+ const excludePatterns = (exclude ?? ["**/node_modules/**", "**/.git/**", "**/dist/**"]).map(
5938
+ globToRegExp
5939
+ );
5940
+ return producer((a) => {
5941
+ const pending = /* @__PURE__ */ new Map();
5942
+ const watchers = [];
5943
+ let stopped = false;
5944
+ let terminalEmitted = false;
5945
+ let generation = 0;
5946
+ const closeWatchers = () => {
5947
+ for (const watcher of watchers.splice(0)) watcher.close();
5948
+ };
5949
+ const emitError = (err) => {
5950
+ if (terminalEmitted) return;
5951
+ terminalEmitted = true;
5952
+ stopped = true;
5953
+ if (timer !== void 0) clearTimeout(timer);
5954
+ timer = void 0;
5955
+ pending.clear();
5956
+ closeWatchers();
5957
+ a.down([[ERROR, err]]);
5958
+ };
5959
+ let timer;
5960
+ const flush = (token) => {
5961
+ timer = void 0;
5962
+ if (stopped || terminalEmitted) return;
5963
+ if (pending.size === 0) return;
5964
+ const batchMessages = [];
5965
+ for (const evt of pending.values()) batchMessages.push([DATA, evt]);
5966
+ pending.clear();
5967
+ if (stopped || terminalEmitted || token !== generation) return;
5968
+ a.down(batchMessages);
5969
+ };
5970
+ try {
5971
+ for (const basePath of list) {
5972
+ const watcher = watch(
5973
+ basePath,
5974
+ { recursive },
5975
+ (eventType, fileName) => {
5976
+ if (stopped || terminalEmitted) return;
5977
+ if (fileName == null) return;
5978
+ const rel = String(fileName).replaceAll("\\", "/");
5979
+ const abs = resolvePath(basePath, String(fileName));
5980
+ const normalized = abs.replaceAll("\\", "/");
5981
+ const root = resolvePath(basePath).replaceAll("\\", "/");
5982
+ const relForMatch = rel.startsWith("./") ? rel.slice(2) : rel;
5983
+ const included = includePatterns.length === 0 || matchesAnyPattern(normalized, includePatterns) || matchesAnyPattern(relForMatch, includePatterns);
5984
+ if (!included) return;
5985
+ const excluded = matchesAnyPattern(normalized, excludePatterns) || matchesAnyPattern(relForMatch, excludePatterns);
5986
+ if (excluded) return;
5987
+ let kind = "change";
5988
+ if (eventType === "rename") {
5989
+ try {
5990
+ kind = existsSync(normalized) ? "create" : "delete";
5991
+ } catch {
5992
+ kind = "rename";
5993
+ }
5994
+ }
5995
+ pending.set(normalized, {
5996
+ type: kind,
5997
+ path: normalized,
5998
+ root,
5999
+ relative_path: relForMatch,
6000
+ timestamp_ns: wallClockNs()
6001
+ });
6002
+ if (timer !== void 0) clearTimeout(timer);
6003
+ const token = generation;
6004
+ timer = setTimeout(() => flush(token), debounce2);
6005
+ }
6006
+ );
6007
+ watcher.on("error", (err) => emitError(err));
6008
+ watchers.push(watcher);
6009
+ }
6010
+ } catch (err) {
6011
+ emitError(err);
6012
+ }
6013
+ return () => {
6014
+ stopped = true;
6015
+ generation += 1;
6016
+ if (timer !== void 0) clearTimeout(timer);
6017
+ timer = void 0;
6018
+ closeWatchers();
6019
+ pending.clear();
6020
+ };
6021
+ }, sourceOpts3(rest));
6022
+ }
6023
+
5923
6024
  // src/extra/storage.ts
5924
- import { randomBytes } from "crypto";
5925
- import { mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "fs";
5926
- import { basename, dirname, join } from "path";
5927
- import { DatabaseSync } from "sqlite";
6025
+ import { randomBytes } from "node:crypto";
6026
+ import {
6027
+ mkdirSync,
6028
+ readdirSync,
6029
+ readFileSync,
6030
+ renameSync,
6031
+ unlinkSync,
6032
+ writeFileSync
6033
+ } from "node:fs";
6034
+ import { basename, dirname, join } from "node:path";
6035
+ import { DatabaseSync } from "node:sqlite";
5928
6036
  function sortJsonValue(value) {
5929
6037
  if (value === null || typeof value !== "object") return value;
5930
6038
  if (Array.isArray(value)) return value.map(sortJsonValue);
@@ -5949,6 +6057,9 @@ function memoryStorage() {
5949
6057
  },
5950
6058
  clear(key) {
5951
6059
  data.delete(key);
6060
+ },
6061
+ list() {
6062
+ return [...data.keys()].sort();
5952
6063
  }
5953
6064
  };
5954
6065
  }
@@ -5963,16 +6074,54 @@ function dictStorage(storage) {
5963
6074
  },
5964
6075
  clear(key) {
5965
6076
  delete storage[key];
6077
+ },
6078
+ list() {
6079
+ return Object.keys(storage).sort();
5966
6080
  }
5967
6081
  };
5968
6082
  }
5969
6083
  function fileStorage(dir) {
6084
+ const encoder = new TextEncoder();
6085
+ const decoder = new TextDecoder("utf-8", { fatal: true });
5970
6086
  const pathFor = (key) => {
5971
- const safe = key.replace(
5972
- /[^a-zA-Z0-9_-]/g,
5973
- (c) => `%${c.charCodeAt(0).toString(16).padStart(2, "0")}`
5974
- );
5975
- return join(dir, `${safe}.json`);
6087
+ let out = "";
6088
+ for (const ch of key) {
6089
+ if (ch.length === 1 && /[a-zA-Z0-9_-]/.test(ch)) {
6090
+ out += ch;
6091
+ continue;
6092
+ }
6093
+ for (const byte of encoder.encode(ch)) {
6094
+ out += `%${byte.toString(16).padStart(2, "0")}`;
6095
+ }
6096
+ }
6097
+ return join(dir, `${out}.json`);
6098
+ };
6099
+ const keyFromFilename = (filename) => {
6100
+ if (!filename.endsWith(".json")) return null;
6101
+ const stem = filename.slice(0, -".json".length);
6102
+ const bytes = [];
6103
+ const encodeAscii = (s) => {
6104
+ for (let i2 = 0; i2 < s.length; i2++) bytes.push(s.charCodeAt(i2));
6105
+ };
6106
+ let i = 0;
6107
+ while (i < stem.length) {
6108
+ const ch = stem[i];
6109
+ if (ch === "%" && i + 2 < stem.length) {
6110
+ const hex = stem.slice(i + 1, i + 3);
6111
+ if (/^[0-9a-f]{2}$/i.test(hex)) {
6112
+ bytes.push(Number.parseInt(hex, 16));
6113
+ i += 3;
6114
+ continue;
6115
+ }
6116
+ }
6117
+ encodeAscii(ch);
6118
+ i += 1;
6119
+ }
6120
+ try {
6121
+ return decoder.decode(new Uint8Array(bytes));
6122
+ } catch {
6123
+ return null;
6124
+ }
5976
6125
  };
5977
6126
  return {
5978
6127
  save(key, record) {
@@ -6009,6 +6158,21 @@ function fileStorage(dir) {
6009
6158
  } catch (e) {
6010
6159
  if (e.code !== "ENOENT") throw e;
6011
6160
  }
6161
+ },
6162
+ list() {
6163
+ try {
6164
+ const entries = readdirSync(dir);
6165
+ const keys = [];
6166
+ for (const entry of entries) {
6167
+ if (entry.startsWith(".")) continue;
6168
+ const k = keyFromFilename(entry);
6169
+ if (k !== null) keys.push(k);
6170
+ }
6171
+ return keys.sort();
6172
+ } catch (e) {
6173
+ if (e.code === "ENOENT") return [];
6174
+ throw e;
6175
+ }
6012
6176
  }
6013
6177
  };
6014
6178
  }
@@ -6031,6 +6195,10 @@ function sqliteStorage(path) {
6031
6195
  clear(key) {
6032
6196
  db.prepare(`DELETE FROM graphrefly_checkpoint WHERE k = ?`).run(key);
6033
6197
  },
6198
+ list() {
6199
+ const rows = db.prepare(`SELECT k FROM graphrefly_checkpoint ORDER BY k`).all();
6200
+ return rows.map((r) => r.k);
6201
+ },
6034
6202
  close() {
6035
6203
  try {
6036
6204
  db.close();
@@ -6812,6 +6980,7 @@ export {
6812
6980
  reactiveIndex,
6813
6981
  NativeListBackend,
6814
6982
  reactiveList,
6983
+ fromFSWatch,
6815
6984
  memoryStorage,
6816
6985
  dictStorage,
6817
6986
  fileStorage,
@@ -6828,4 +6997,4 @@ export {
6828
6997
  workerSelf,
6829
6998
  extra_exports
6830
6999
  };
6831
- //# sourceMappingURL=chunk-IAHGTNOZ.js.map
7000
+ //# sourceMappingURL=chunk-AMCG74RZ.js.map