@astrale-os/kernel-client 0.2.3 → 0.3.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 (279) hide show
  1. package/dist/auth/addressing.d.ts +32 -0
  2. package/dist/auth/addressing.d.ts.map +1 -0
  3. package/dist/auth/addressing.js +36 -0
  4. package/dist/auth/addressing.js.map +1 -0
  5. package/dist/auth/api.d.ts +69 -0
  6. package/dist/auth/api.d.ts.map +1 -0
  7. package/dist/auth/api.js +24 -0
  8. package/dist/auth/api.js.map +1 -0
  9. package/dist/auth/batch.d.ts +18 -0
  10. package/dist/auth/batch.d.ts.map +1 -0
  11. package/dist/auth/batch.js +25 -0
  12. package/dist/auth/batch.js.map +1 -0
  13. package/dist/auth/composition.d.ts +27 -0
  14. package/dist/auth/composition.d.ts.map +1 -0
  15. package/dist/auth/composition.js +83 -0
  16. package/dist/auth/composition.js.map +1 -0
  17. package/dist/auth/index.d.ts +14 -0
  18. package/dist/auth/index.d.ts.map +1 -0
  19. package/dist/auth/index.js +9 -0
  20. package/dist/auth/index.js.map +1 -0
  21. package/dist/auth/minting.d.ts +35 -0
  22. package/dist/auth/minting.d.ts.map +1 -0
  23. package/dist/auth/minting.js +35 -0
  24. package/dist/auth/minting.js.map +1 -0
  25. package/dist/auth/permissions.d.ts +55 -0
  26. package/dist/auth/permissions.d.ts.map +1 -0
  27. package/dist/auth/permissions.js +47 -0
  28. package/dist/auth/permissions.js.map +1 -0
  29. package/dist/auth/principal.d.ts +19 -0
  30. package/dist/auth/principal.d.ts.map +1 -0
  31. package/dist/auth/principal.js +46 -0
  32. package/dist/auth/principal.js.map +1 -0
  33. package/dist/errors/errors.d.ts +53 -0
  34. package/dist/errors/errors.d.ts.map +1 -1
  35. package/dist/errors/errors.js +69 -1
  36. package/dist/errors/errors.js.map +1 -1
  37. package/dist/errors/guards.d.ts +39 -0
  38. package/dist/errors/guards.d.ts.map +1 -0
  39. package/dist/errors/guards.js +127 -0
  40. package/dist/errors/guards.js.map +1 -0
  41. package/dist/errors/index.d.ts +4 -2
  42. package/dist/errors/index.d.ts.map +1 -1
  43. package/dist/errors/index.js +2 -1
  44. package/dist/errors/index.js.map +1 -1
  45. package/dist/graph/api.d.ts +82 -0
  46. package/dist/graph/api.d.ts.map +1 -0
  47. package/dist/graph/api.js +64 -0
  48. package/dist/graph/api.js.map +1 -0
  49. package/dist/graph/index.d.ts +24 -0
  50. package/dist/graph/index.d.ts.map +1 -0
  51. package/dist/graph/index.js +20 -0
  52. package/dist/graph/index.js.map +1 -0
  53. package/dist/graph/mutate/builder.d.ts +108 -0
  54. package/dist/graph/mutate/builder.d.ts.map +1 -0
  55. package/dist/graph/mutate/builder.js +127 -0
  56. package/dist/graph/mutate/builder.js.map +1 -0
  57. package/dist/graph/mutate/index.d.ts +5 -0
  58. package/dist/graph/mutate/index.d.ts.map +1 -0
  59. package/dist/graph/mutate/index.js +3 -0
  60. package/dist/graph/mutate/index.js.map +1 -0
  61. package/dist/graph/mutate/shorthands.d.ts +42 -0
  62. package/dist/graph/mutate/shorthands.d.ts.map +1 -0
  63. package/dist/graph/mutate/shorthands.js +65 -0
  64. package/dist/graph/mutate/shorthands.js.map +1 -0
  65. package/dist/graph/named.d.ts +38 -0
  66. package/dist/graph/named.d.ts.map +1 -0
  67. package/dist/graph/named.js +47 -0
  68. package/dist/graph/named.js.map +1 -0
  69. package/dist/graph/query/builder.d.ts +116 -0
  70. package/dist/graph/query/builder.d.ts.map +1 -0
  71. package/dist/graph/query/builder.js +136 -0
  72. package/dist/graph/query/builder.js.map +1 -0
  73. package/dist/graph/query/edge-ref.d.ts +13 -0
  74. package/dist/graph/query/edge-ref.d.ts.map +1 -0
  75. package/dist/graph/query/edge-ref.js +56 -0
  76. package/dist/graph/query/edge-ref.js.map +1 -0
  77. package/dist/graph/query/edges.d.ts +10 -0
  78. package/dist/graph/query/edges.d.ts.map +1 -0
  79. package/dist/graph/query/edges.js +11 -0
  80. package/dist/graph/query/edges.js.map +1 -0
  81. package/dist/graph/query/errors.d.ts +31 -0
  82. package/dist/graph/query/errors.d.ts.map +1 -0
  83. package/dist/graph/query/errors.js +28 -0
  84. package/dist/graph/query/errors.js.map +1 -0
  85. package/dist/graph/query/filter.d.ts +50 -0
  86. package/dist/graph/query/filter.d.ts.map +1 -0
  87. package/dist/graph/query/filter.js +32 -0
  88. package/dist/graph/query/filter.js.map +1 -0
  89. package/dist/graph/query/index.d.ts +12 -0
  90. package/dist/graph/query/index.d.ts.map +1 -0
  91. package/dist/graph/query/index.js +7 -0
  92. package/dist/graph/query/index.js.map +1 -0
  93. package/dist/graph/query/lower.d.ts +30 -0
  94. package/dist/graph/query/lower.d.ts.map +1 -0
  95. package/dist/graph/query/lower.js +171 -0
  96. package/dist/graph/query/lower.js.map +1 -0
  97. package/dist/graph/query/shorthands.d.ts +34 -0
  98. package/dist/graph/query/shorthands.d.ts.map +1 -0
  99. package/dist/graph/query/shorthands.js +71 -0
  100. package/dist/graph/query/shorthands.js.map +1 -0
  101. package/dist/graph/query/traverse.d.ts +59 -0
  102. package/dist/graph/query/traverse.d.ts.map +1 -0
  103. package/dist/graph/query/traverse.js +144 -0
  104. package/dist/graph/query/traverse.js.map +1 -0
  105. package/dist/graph/result/envelope.d.ts +37 -0
  106. package/dist/graph/result/envelope.d.ts.map +1 -0
  107. package/dist/graph/result/envelope.js +59 -0
  108. package/dist/graph/result/envelope.js.map +1 -0
  109. package/dist/graph/result/index.d.ts +6 -0
  110. package/dist/graph/result/index.d.ts.map +1 -0
  111. package/dist/graph/result/index.js +4 -0
  112. package/dist/graph/result/index.js.map +1 -0
  113. package/dist/graph/result/next.d.ts +16 -0
  114. package/dist/graph/result/next.d.ts.map +1 -0
  115. package/dist/graph/result/next.js +77 -0
  116. package/dist/graph/result/next.js.map +1 -0
  117. package/dist/graph/result/paged.d.ts +30 -0
  118. package/dist/graph/result/paged.d.ts.map +1 -0
  119. package/dist/graph/result/paged.js +41 -0
  120. package/dist/graph/result/paged.js.map +1 -0
  121. package/dist/graph/wire.d.ts +33 -0
  122. package/dist/graph/wire.d.ts.map +1 -0
  123. package/dist/graph/wire.js +16 -0
  124. package/dist/graph/wire.js.map +1 -0
  125. package/dist/index.d.ts +11 -3
  126. package/dist/index.d.ts.map +1 -1
  127. package/dist/index.js +10 -1
  128. package/dist/index.js.map +1 -1
  129. package/dist/schema/bound/binder.d.ts +49 -0
  130. package/dist/schema/bound/binder.d.ts.map +1 -0
  131. package/dist/schema/bound/binder.js +192 -0
  132. package/dist/schema/bound/binder.js.map +1 -0
  133. package/dist/schema/bound/bound-node.d.ts +89 -0
  134. package/dist/schema/bound/bound-node.d.ts.map +1 -0
  135. package/dist/schema/bound/bound-node.js +77 -0
  136. package/dist/schema/bound/bound-node.js.map +1 -0
  137. package/dist/schema/bound/index.d.ts +10 -0
  138. package/dist/schema/bound/index.d.ts.map +1 -0
  139. package/dist/schema/bound/index.js +5 -0
  140. package/dist/schema/bound/index.js.map +1 -0
  141. package/dist/schema/bound/view.d.ts +48 -0
  142. package/dist/schema/bound/view.d.ts.map +1 -0
  143. package/dist/schema/bound/view.js +90 -0
  144. package/dist/schema/bound/view.js.map +1 -0
  145. package/dist/schema/bound/write-props.d.ts +38 -0
  146. package/dist/schema/bound/write-props.d.ts.map +1 -0
  147. package/dist/schema/bound/write-props.js +2 -0
  148. package/dist/schema/bound/write-props.js.map +1 -0
  149. package/dist/schema/extract.d.ts +12 -0
  150. package/dist/schema/extract.d.ts.map +1 -1
  151. package/dist/schema/extract.js +16 -0
  152. package/dist/schema/extract.js.map +1 -1
  153. package/dist/schema/index.d.ts +7 -3
  154. package/dist/schema/index.d.ts.map +1 -1
  155. package/dist/schema/index.js +4 -2
  156. package/dist/schema/index.js.map +1 -1
  157. package/dist/schema/node-proxy.d.ts +9 -0
  158. package/dist/schema/node-proxy.d.ts.map +1 -1
  159. package/dist/schema/node-proxy.js +31 -1
  160. package/dist/schema/node-proxy.js.map +1 -1
  161. package/dist/{persistence → schema}/persistence.d.ts +1 -22
  162. package/dist/schema/persistence.d.ts.map +1 -0
  163. package/dist/schema/persistence.js +2 -0
  164. package/dist/schema/persistence.js.map +1 -0
  165. package/dist/schema/proxy-types.d.ts +28 -22
  166. package/dist/schema/proxy-types.d.ts.map +1 -1
  167. package/dist/schema/registry.d.ts +1 -2
  168. package/dist/schema/registry.d.ts.map +1 -1
  169. package/dist/schema/registry.js +1 -2
  170. package/dist/schema/registry.js.map +1 -1
  171. package/dist/session/bound.d.ts.map +1 -1
  172. package/dist/session/bound.js +15 -2
  173. package/dist/session/bound.js.map +1 -1
  174. package/dist/session/client-session.d.ts +1 -1
  175. package/dist/session/client-session.d.ts.map +1 -1
  176. package/dist/session/client-session.js +5 -5
  177. package/dist/session/client-session.js.map +1 -1
  178. package/dist/session/config.d.ts +8 -4
  179. package/dist/session/config.d.ts.map +1 -1
  180. package/dist/{delegation → session/delegation}/cache.d.ts +3 -4
  181. package/dist/session/delegation/cache.d.ts.map +1 -0
  182. package/dist/session/delegation/cache.js.map +1 -0
  183. package/dist/{delegation → session/delegation}/errors.d.ts +1 -1
  184. package/dist/session/delegation/errors.d.ts.map +1 -0
  185. package/dist/{delegation → session/delegation}/errors.js +1 -1
  186. package/dist/session/delegation/errors.js.map +1 -0
  187. package/dist/session/delegation/policy.d.ts.map +1 -0
  188. package/dist/{delegation → session/delegation}/policy.js +1 -1
  189. package/dist/session/delegation/policy.js.map +1 -0
  190. package/dist/session/delegation-mint.d.ts +13 -0
  191. package/dist/session/delegation-mint.d.ts.map +1 -0
  192. package/dist/session/delegation-mint.js +31 -0
  193. package/dist/session/delegation-mint.js.map +1 -0
  194. package/dist/session/errors/index.d.ts +2 -2
  195. package/dist/session/errors/index.d.ts.map +1 -1
  196. package/dist/session/errors/index.js +2 -2
  197. package/dist/session/errors/index.js.map +1 -1
  198. package/dist/session/helpers.js +2 -2
  199. package/dist/session/helpers.js.map +1 -1
  200. package/dist/session/index.d.ts +9 -1
  201. package/dist/session/index.d.ts.map +1 -1
  202. package/dist/session/index.js +6 -1
  203. package/dist/session/index.js.map +1 -1
  204. package/dist/{redirect → session/redirect}/errors.d.ts +1 -1
  205. package/dist/session/redirect/errors.d.ts.map +1 -0
  206. package/dist/{redirect → session/redirect}/errors.js +1 -1
  207. package/dist/session/redirect/errors.js.map +1 -0
  208. package/dist/session/redirect/policy.d.ts.map +1 -0
  209. package/dist/{redirect → session/redirect}/policy.js +1 -1
  210. package/dist/session/redirect/policy.js.map +1 -0
  211. package/dist/session/types.d.ts +13 -2
  212. package/dist/session/types.d.ts.map +1 -1
  213. package/dist/store/canonicalize.d.ts +44 -0
  214. package/dist/store/canonicalize.d.ts.map +1 -0
  215. package/dist/store/canonicalize.js +0 -0
  216. package/dist/store/canonicalize.js.map +1 -0
  217. package/dist/store/entities.d.ts +81 -0
  218. package/dist/store/entities.d.ts.map +1 -0
  219. package/dist/store/entities.js +202 -0
  220. package/dist/store/entities.js.map +1 -0
  221. package/dist/store/index.d.ts +26 -0
  222. package/dist/store/index.d.ts.map +1 -0
  223. package/dist/store/index.js +19 -0
  224. package/dist/store/index.js.map +1 -0
  225. package/dist/store/invalidate.d.ts +66 -0
  226. package/dist/store/invalidate.d.ts.map +1 -0
  227. package/dist/store/invalidate.js +117 -0
  228. package/dist/store/invalidate.js.map +1 -0
  229. package/dist/store/memory.d.ts +97 -0
  230. package/dist/store/memory.d.ts.map +1 -0
  231. package/dist/store/memory.js +790 -0
  232. package/dist/store/memory.js.map +1 -0
  233. package/dist/store/overlay.d.ts +118 -0
  234. package/dist/store/overlay.d.ts.map +1 -0
  235. package/dist/store/overlay.js +237 -0
  236. package/dist/store/overlay.js.map +1 -0
  237. package/dist/store/schedule.d.ts +31 -0
  238. package/dist/store/schedule.d.ts.map +1 -0
  239. package/dist/store/schedule.js +76 -0
  240. package/dist/store/schedule.js.map +1 -0
  241. package/dist/store/shapes.d.ts +92 -0
  242. package/dist/store/shapes.d.ts.map +1 -0
  243. package/dist/store/shapes.js +369 -0
  244. package/dist/store/shapes.js.map +1 -0
  245. package/dist/store/types.d.ts +168 -0
  246. package/dist/store/types.d.ts.map +1 -0
  247. package/dist/store/types.js +7 -0
  248. package/dist/store/types.js.map +1 -0
  249. package/dist/transport/fetch.d.ts +1 -1
  250. package/dist/transport/fetch.js +1 -1
  251. package/package.json +16 -32
  252. package/dist/delegation/cache.d.ts.map +0 -1
  253. package/dist/delegation/cache.js.map +0 -1
  254. package/dist/delegation/errors.d.ts.map +0 -1
  255. package/dist/delegation/errors.js.map +0 -1
  256. package/dist/delegation/index.d.ts +0 -6
  257. package/dist/delegation/index.d.ts.map +0 -1
  258. package/dist/delegation/index.js +0 -4
  259. package/dist/delegation/index.js.map +0 -1
  260. package/dist/delegation/policy.d.ts.map +0 -1
  261. package/dist/delegation/policy.js.map +0 -1
  262. package/dist/persistence/index.d.ts +0 -3
  263. package/dist/persistence/index.d.ts.map +0 -1
  264. package/dist/persistence/index.js +0 -2
  265. package/dist/persistence/index.js.map +0 -1
  266. package/dist/persistence/persistence.d.ts.map +0 -1
  267. package/dist/persistence/persistence.js +0 -32
  268. package/dist/persistence/persistence.js.map +0 -1
  269. package/dist/redirect/errors.d.ts.map +0 -1
  270. package/dist/redirect/errors.js.map +0 -1
  271. package/dist/redirect/index.d.ts +0 -4
  272. package/dist/redirect/index.d.ts.map +0 -1
  273. package/dist/redirect/index.js +0 -3
  274. package/dist/redirect/index.js.map +0 -1
  275. package/dist/redirect/policy.d.ts.map +0 -1
  276. package/dist/redirect/policy.js.map +0 -1
  277. /package/dist/{delegation → session/delegation}/cache.js +0 -0
  278. /package/dist/{delegation → session/delegation}/policy.d.ts +0 -0
  279. /package/dist/{redirect → session/redirect}/policy.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAGvC,OAAO,EACL,eAAe,EACf,eAAe,EACf,QAAQ,EACR,eAAe,EACf,YAAY,GACb,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAGrC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAGnD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Tier-0 invalidation matching (FRONTEND §5.6 / §5.7).
3
+ *
4
+ * Because the runnable algebra is closed (a single `has_parent` descent + N
5
+ * single-hop gathers), "does patch P affect shape S" is decidable client-side
6
+ * with no kernel change. This module is pure over a {@link ShapeView} — the
7
+ * ShapeStore supplies the view, the overlay/memory apply the matches.
8
+ *
9
+ * SHIM CONTRACT (§5.7): this is a deliberately OVER-BROAD disposable shim, the
10
+ * whole reason SAFE MODE is "slow but never wrong". A false positive costs one
11
+ * needless refetch; a false NEGATIVE is a shape that silently never reconciles —
12
+ * a stale view and hours of debugging, and is FORBIDDEN. So every arm biases to
13
+ * "affected" the instant it is uncertain (an unresolved class, an unknown edge
14
+ * selector, a path form it cannot compare). Do NOT grow this toward faithful
15
+ * query semantics to shave refetches — `function.watch` (§7) deletes it whole,
16
+ * and with it the whole dual-semantics burden.
17
+ */
18
+ import type { GraphNodeWire } from '../graph';
19
+ import type { NormalPatch } from './overlay';
20
+ type NodeId = GraphNodeWire['id'];
21
+ /** One gather step's selector: which edge classes, which direction. */
22
+ export interface GatherSpec {
23
+ /** Matched edge classes; `undefined` = all classes. */
24
+ readonly edgeClasses?: readonly string[];
25
+ readonly dir: 'in' | 'out' | 'both';
26
+ }
27
+ /** The projection of a shape the matcher needs — produced by the ShapeStore. */
28
+ export interface ShapeView {
29
+ readonly id: string;
30
+ /** Resolved root paths (raw). */
31
+ readonly rootPaths: readonly string[];
32
+ /** `has_parent` descent depth; 0 for a point read (no move). */
33
+ readonly depth: number;
34
+ /** The move's `children.classes` restriction, or `undefined` for all. */
35
+ readonly moveClasses?: readonly string[];
36
+ readonly gathers: readonly GatherSpec[];
37
+ /** Membership test — is this node id a root or a member of the shape? */
38
+ hasNode(id: NodeId): boolean;
39
+ }
40
+ /** Context the matcher resolves paths and identifies the tree edge with. */
41
+ export interface InvalidateCtx {
42
+ readonly hasParentClass: string;
43
+ /** Resolve a raw path to a live node id (confirmed ⊕ overlay). */
44
+ resolve(raw: string): NodeId | undefined;
45
+ }
46
+ /** The set of shape ids a patch affects. */
47
+ export declare function affectedShapes(patch: NormalPatch, shapes: Iterable<ShapeView>, ctx: InvalidateCtx): Set<string>;
48
+ /**
49
+ * A node create/delete at `pRaw` (class `cls`) affects a shape when `pRaw`
50
+ * falls in a root's subtree within `depth` and the move's class filter admits
51
+ * it (the root itself is never class-filtered — it is the seed, not a child).
52
+ */
53
+ export declare function matchesNodeStructural(shape: ShapeView, pRaw: string, cls: string | undefined): boolean;
54
+ /**
55
+ * An edge op affects a shape when some gather selector matches its class and a
56
+ * root is the near endpoint; a `has_parent` edge additionally re-tests subtree
57
+ * membership at its child (source) endpoint.
58
+ */
59
+ export declare function matchesEdge(shape: ShapeView, edgeClass: string, sourceRaw: string, targetRaw: string, hasParentClass: string): boolean;
60
+ /**
61
+ * Depth of `pRaw` below `rootRaw` in the tree (0 = the root itself), or `null`
62
+ * when `pRaw` is not within the root's subtree. Slug-segment prefix test.
63
+ */
64
+ export declare function subtreeDelta(rootRaw: string, pRaw: string): number | null;
65
+ export {};
66
+ //# sourceMappingURL=invalidate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalidate.d.ts","sourceRoot":"","sources":["../../src/store/invalidate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,WAA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,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,GACrB,OAAO,CAQT;AAYD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASzE"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Tier-0 invalidation matching (FRONTEND §5.6 / §5.7).
3
+ *
4
+ * Because the runnable algebra is closed (a single `has_parent` descent + N
5
+ * single-hop gathers), "does patch P affect shape S" is decidable client-side
6
+ * with no kernel change. This module is pure over a {@link ShapeView} — the
7
+ * ShapeStore supplies the view, the overlay/memory apply the matches.
8
+ *
9
+ * SHIM CONTRACT (§5.7): this is a deliberately OVER-BROAD disposable shim, the
10
+ * whole reason SAFE MODE is "slow but never wrong". A false positive costs one
11
+ * needless refetch; a false NEGATIVE is a shape that silently never reconciles —
12
+ * a stale view and hours of debugging, and is FORBIDDEN. So every arm biases to
13
+ * "affected" the instant it is uncertain (an unresolved class, an unknown edge
14
+ * selector, a path form it cannot compare). Do NOT grow this toward faithful
15
+ * query semantics to shave refetches — `function.watch` (§7) deletes it whole,
16
+ * and with it the whole dual-semantics burden.
17
+ */
18
+ /** The set of shape ids a patch affects. */
19
+ export function affectedShapes(patch, shapes, ctx) {
20
+ const out = new Set();
21
+ for (const shape of shapes) {
22
+ if (shapeAffected(shape, patch, ctx))
23
+ out.add(shape.id);
24
+ }
25
+ return out;
26
+ }
27
+ function shapeAffected(shape, patch, ctx) {
28
+ // node create/delete — ancestor-chain + class-filter test against resolved roots
29
+ for (const c of patch.nodes.create) {
30
+ if (matchesNodeStructural(shape, c.at, c.class))
31
+ return true;
32
+ }
33
+ for (const d of patch.nodes.delete) {
34
+ if (matchesNodeStructural(shape, d.path, d.class))
35
+ return true;
36
+ const id = ctx.resolve(d.path);
37
+ if (id !== undefined && shape.hasNode(id))
38
+ return true;
39
+ }
40
+ // node update — membership (order re-sort is handled by the resulting recompute)
41
+ for (const u of patch.nodes.update) {
42
+ const id = ctx.resolve(u.path);
43
+ if (id !== undefined && shape.hasNode(id))
44
+ return true;
45
+ }
46
+ // edge create/update/delete — gather selector + endpoint-in-roots; has_parent
47
+ // additionally re-tests subtree membership at the child endpoint
48
+ for (const e of [...patch.edges.create, ...patch.edges.update, ...patch.edges.delete]) {
49
+ if (matchesEdge(shape, e.class, e.source, e.target, ctx.hasParentClass))
50
+ return true;
51
+ }
52
+ return false;
53
+ }
54
+ /**
55
+ * A node create/delete at `pRaw` (class `cls`) affects a shape when `pRaw`
56
+ * falls in a root's subtree within `depth` and the move's class filter admits
57
+ * it (the root itself is never class-filtered — it is the seed, not a child).
58
+ */
59
+ export function matchesNodeStructural(shape, pRaw, cls) {
60
+ for (const root of shape.rootPaths) {
61
+ const delta = subtreeDelta(root, pRaw);
62
+ if (delta === null || delta > shape.depth)
63
+ continue;
64
+ // Bias to affected (§5.7): the root is never class-filtered, an all-classes
65
+ // move admits everything, and an UNKNOWN class (`cls === undefined`) is
66
+ // treated as admitted — a possible false positive (one refetch), never a
67
+ // false negative (a class we couldn't read silently excluding a real child).
68
+ const admits = delta === 0 ||
69
+ shape.moveClasses === undefined ||
70
+ cls === undefined ||
71
+ shape.moveClasses.includes(cls);
72
+ if (admits)
73
+ return true;
74
+ }
75
+ return false;
76
+ }
77
+ /**
78
+ * An edge op affects a shape when some gather selector matches its class and a
79
+ * root is the near endpoint; a `has_parent` edge additionally re-tests subtree
80
+ * membership at its child (source) endpoint.
81
+ */
82
+ export function matchesEdge(shape, edgeClass, sourceRaw, targetRaw, hasParentClass) {
83
+ if (edgeClass === hasParentClass && matchesNodeStructural(shape, sourceRaw, undefined))
84
+ return true;
85
+ for (const g of shape.gathers) {
86
+ if (g.edgeClasses !== undefined && !g.edgeClasses.includes(edgeClass))
87
+ continue;
88
+ if (endpointInRoots(shape.rootPaths, g.dir, sourceRaw, targetRaw))
89
+ return true;
90
+ }
91
+ return false;
92
+ }
93
+ function endpointInRoots(rootPaths, dir, sourceRaw, targetRaw) {
94
+ const near = dir === 'out' ? [sourceRaw] : dir === 'in' ? [targetRaw] : [sourceRaw, targetRaw];
95
+ return near.some((p) => rootPaths.includes(p));
96
+ }
97
+ /**
98
+ * Depth of `pRaw` below `rootRaw` in the tree (0 = the root itself), or `null`
99
+ * when `pRaw` is not within the root's subtree. Slug-segment prefix test.
100
+ */
101
+ export function subtreeDelta(rootRaw, pRaw) {
102
+ if (rootRaw === pRaw)
103
+ return 0;
104
+ const rs = segments(rootRaw);
105
+ const ps = segments(pRaw);
106
+ if (ps.length <= rs.length)
107
+ return null;
108
+ for (let i = 0; i < rs.length; i++) {
109
+ if (rs[i] !== ps[i])
110
+ return null;
111
+ }
112
+ return ps.length - rs.length;
113
+ }
114
+ function segments(raw) {
115
+ return raw.split('/').filter((s) => s.length > 0);
116
+ }
117
+ //# sourceMappingURL=invalidate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalidate.js","sourceRoot":"","sources":["../../src/store/invalidate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAmCH,4CAA4C;AAC5C,MAAM,UAAU,cAAc,CAC5B,KAAkB,EAClB,MAA2B,EAC3B,GAAkB;IAElB,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAA;IAC7B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IACzD,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,SAAS,aAAa,CAAC,KAAgB,EAAE,KAAkB,EAAE,GAAkB;IAC7E,iFAAiF;IACjF,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACnC,IAAI,qBAAqB,CAAC,KAAK,EAA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AG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;IAC9F,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;AAChD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe,EAAE,IAAY;IACxD,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,CAAC,CAAA;IAC9B,MAAM,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC5B,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;IACzB,IAAI,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAAE,OAAO,IAAI,CAAA;IAClC,CAAC;IACD,OAAO,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,MAAM,CAAA;AAC9B,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW;IAC3B,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACnD,CAAC"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * createMemory (FRONTEND §4.5, SHELL_REACT §5) — the framework-free memory
3
+ * facade over a `GraphApi`.
4
+ *
5
+ * One partial client copy of the graph per scope (= principal): entity store +
6
+ * shape store + optimistic overlay. Reads are shape-keyed, deduped, and
7
+ * stale-while-revalidate; a `subscribe`/`getSnapshot` pair gives
8
+ * useSyncExternalStore semantics (tear-free, referentially stable when
9
+ * unchanged) and `promise` a cold-shape handle for React suspense.
10
+ *
11
+ * SAFE MODE (§5.7 — ratified until the §6 wire amendments land). One rule:
12
+ * **confirmed state comes only from server responses; client predictions live
13
+ * only in a display layer guaranteed to be discarded and replaced by server
14
+ * truth.** Concretely:
15
+ * - Confirmed state (EntityStore + shape membership) is written ONLY by read
16
+ * responses (`integrate` / `integrateShape`).
17
+ * - Every write DISPATCHES, then marks the shapes it touched stale and
18
+ * REVALIDATES them (refetch = reconcile). "Slow but never wrong."
19
+ * - The optimistic overlay is DISPLAY-ONLY. Prop updates on cached nodes and
20
+ * deletes get an overlay (no-flicker prediction); creates/links/unlinks are
21
+ * reconcile-only (a create/link misprediction is a phantom, forbidden; a
22
+ * delete misprediction is loud — a brief reappearance). The overlay is held
23
+ * from apply until the reconciling refetch lands, then dropped — never
24
+ * folded into confirmed state.
25
+ * - Ordering: the logical merge clock is stamped at response ARRIVAL, and a
26
+ * per-scope mutation EPOCH closes the read-straddles-commit window (a
27
+ * response older than a commit is integrated-then-restaled).
28
+ * - Isolation: the `with` lens partitions the ENTITY store, not just the
29
+ * shape key — lenses never share entities.
30
+ *
31
+ * The public surface (`GraphMemory`/`LiveResult`, `createMemory`) is stable:
32
+ * when seq/rev/delta/watch (§6/§7) land, this becomes "fast and never wrong"
33
+ * with no surface change (`commitOverlay` is already the server-delta seam).
34
+ */
35
+ import type { Node } from '@astrale-os/kernel-core';
36
+ import type { EdgeIdentity, GraphApi, MutationResultWire, PatchBuilder, PatchInput, PathLike, Properties } from '../graph';
37
+ import type { ShapeInput } from './canonicalize';
38
+ import type { LiveResult, MutateOptions, ReadOptions, MemoryOptions } from './types';
39
+ /** The framework-free memory surface (SHELL_REACT §5 + FRONTEND §4.5). */
40
+ export interface GraphMemory {
41
+ /** The principal/isolation key this handle is bound to. */
42
+ readonly scope: string;
43
+ /** The raw floor, untouched. */
44
+ readonly api: GraphApi;
45
+ /** Read-through: resolve the shape, fetching if cold, then return the live result. */
46
+ query(shape: ShapeInput, opts?: ReadOptions): Promise<LiveResult>;
47
+ /** Memory-only, synchronous — no I/O. `null` when the shape is cold. */
48
+ peek(shape: ShapeInput, opts?: ReadOptions): LiveResult | null;
49
+ /** Warm the exact shape a later render reads. */
50
+ preload(shape: ShapeInput, opts?: ReadOptions): Promise<void>;
51
+ /** External-store subscription: `onStoreChange` fires when this shape changes. */
52
+ subscribe(shape: ShapeInput, onStoreChange: () => void, opts?: ReadOptions): () => void;
53
+ /** The current live result for a shape — stable ref when unchanged (getSnapshot). */
54
+ getSnapshot(shape: ShapeInput, opts?: ReadOptions): LiveResult;
55
+ /** A promise that resolves once the shape first has confirmed data (suspense). */
56
+ promise(shape: ShapeInput, opts?: ReadOptions): Promise<LiveResult>;
57
+ /** Convenience: subscribe + push the current (and each subsequent) snapshot to `cb`. */
58
+ watch(shape: ShapeInput, cb: (result: LiveResult) => void, opts?: ReadOptions): () => void;
59
+ /** Batch write — optimistic-auto (§4.4). Builder or pre-built patch. */
60
+ mutate(arg: ((m: PatchBuilder) => void | Promise<void>) | PatchInput, opts?: MutateOptions): Promise<MutationResultWire>;
61
+ update(node: Node | PathLike, props: Properties, opts?: MutateOptions): Promise<void>;
62
+ create(cls: PathLike, at: PathLike, props?: Properties, opts?: MutateOptions): Promise<string>;
63
+ remove(node: Node | PathLike, opts?: MutateOptions): Promise<void>;
64
+ link(edge: EdgeIdentity & {
65
+ props?: Properties;
66
+ }, opts?: MutateOptions): Promise<string>;
67
+ unlink(edge: EdgeIdentity, opts?: MutateOptions): Promise<void>;
68
+ /**
69
+ * Apply a MANUAL optimistic overlay decoupled from any dispatch (§1.6 — the
70
+ * method-dispatch seam a patch arm can't express, e.g. `user::switchSpace`).
71
+ * SAFE MODE: only the display-safe arms (prop updates on cached nodes,
72
+ * deletes) predict; the caller dispatches whatever it likes, then `commit()`s
73
+ * (reconcile the touched shapes from the server, drop the overlay) or
74
+ * `rollback()`s.
75
+ */
76
+ overlay(build: (m: PatchBuilder) => void, opts?: {
77
+ scope?: string;
78
+ }): OptimisticOverlay;
79
+ /** An isolated handle for another scope (principal). No store sharing (§5.4). */
80
+ forScope(scope: string, api?: GraphApi): GraphMemory;
81
+ /** Release unobserved shapes past their ttl and GC unreachable entities. */
82
+ sweep(): void;
83
+ }
84
+ /** A live manual-overlay handle (see {@link GraphMemory.overlay}). */
85
+ export interface OptimisticOverlay {
86
+ /**
87
+ * Reconcile the shapes this overlay touched from the server and drop the
88
+ * display prediction. The `result` param is retained for the §6.3 server-delta
89
+ * path; on Tier-0 it is unused (reconciliation is by refetch).
90
+ */
91
+ commit(result?: MutationResultWire): void;
92
+ /** Drop the overlay — the dispatch failed. */
93
+ rollback(): void;
94
+ }
95
+ /** Bind the memory onto a `GraphApi`. */
96
+ export declare function createMemory(api: GraphApi, opts?: MemoryOptions): GraphMemory;
97
+ //# sourceMappingURL=memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/store/memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAInD,OAAO,KAAK,EACV,YAAY,EAEZ,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,UAAU,EAEX,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAe,aAAa,EAAE,MAAM,SAAS,CAAA;AAgBjG,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,gCAAgC;IAChC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAA;IAEtB,sFAAsF;IACtF,KAAK,CAAC,K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