@lapxo/bound 0.2.4 → 0.2.5

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 (250) hide show
  1. package/CITATION.cff +1 -1
  2. package/TARGET.bound +44 -39
  3. package/dist/cli/accept.js +72 -590
  4. package/dist/cli/act-result.js +3 -103
  5. package/dist/cli/args.js +3 -44
  6. package/dist/cli/custodian.js +2 -29
  7. package/dist/cli/host.js +4 -32
  8. package/dist/cli/names.js +1 -12
  9. package/dist/cli/native-descendant.js +1 -19
  10. package/dist/cli/native.js +3 -60
  11. package/dist/cli/observe.js +1 -13
  12. package/dist/cli/owner.js +3 -139
  13. package/dist/cli/pass.js +21 -321
  14. package/dist/cli/place.js +6 -282
  15. package/dist/cli/release-result.js +3 -80
  16. package/dist/cli/retained-judgment.js +1 -25
  17. package/dist/cli/standing-result.js +4 -19
  18. package/dist/cli/takes.js +10 -112
  19. package/dist/cli/verb.d.ts +1 -2
  20. package/dist/cli/verb.js +83 -684
  21. package/dist/engine/computation.js +2 -0
  22. package/dist/engine/conformance.js +4 -0
  23. package/dist/engine/encoding.js +1 -2
  24. package/dist/engine/index.d.ts +1 -13
  25. package/dist/engine/index.js +2 -11
  26. package/dist/engine/object.js +1 -38
  27. package/dist/engine/ports.js +2 -117
  28. package/dist/fold/admission-history.js +1 -17
  29. package/dist/fold/bootstrap-anchor.js +1 -28
  30. package/dist/fold/ceilings.js +1 -142
  31. package/dist/fold/claims.js +2 -132
  32. package/dist/fold/closed.js +24 -235
  33. package/dist/fold/configures.js +1 -25
  34. package/dist/fold/digests.js +10 -226
  35. package/dist/fold/evidence.js +1 -22
  36. package/dist/fold/fold-worker.js +1 -13
  37. package/dist/fold/kept.js +12 -173
  38. package/dist/fold/keys.js +3 -91
  39. package/dist/fold/laid.js +3 -90
  40. package/dist/fold/nos.js +1 -48
  41. package/dist/fold/object.js +1 -2
  42. package/dist/fold/observed.js +27 -534
  43. package/dist/fold/opened.js +1 -33
  44. package/dist/fold/own.js +3 -217
  45. package/dist/fold/paid.js +1 -92
  46. package/dist/fold/place-inputs.js +1 -70
  47. package/dist/fold/places.js +3 -100
  48. package/dist/fold/rank.js +1 -9
  49. package/dist/fold/reach.js +1 -83
  50. package/dist/fold/readers.js +6 -142
  51. package/dist/fold/receipts.js +1 -47
  52. package/dist/fold/region-declarations.js +1 -13
  53. package/dist/fold/region.js +8 -286
  54. package/dist/fold/release-policy.js +1 -101
  55. package/dist/fold/resolved.js +6 -145
  56. package/dist/fold/roles.js +2 -59
  57. package/dist/fold/second.js +4 -71
  58. package/dist/fold/shards.js +12 -100
  59. package/dist/fold/signed.js +3 -81
  60. package/dist/fold/signers.js +1 -54
  61. package/dist/fold/stranger.js +6 -24
  62. package/dist/fold/views.js +1 -66
  63. package/dist/fold/wire.js +1 -46
  64. package/dist/fold/zoom.js +3 -81
  65. package/dist/host/act-cost.js +1 -25
  66. package/dist/host/adapters/keys/ed25519.js +1 -30
  67. package/dist/host/adapters/modules/javascript.js +1 -50
  68. package/dist/host/adapters/transport/http.js +1 -28
  69. package/dist/host/admitted-place.js +1 -35
  70. package/dist/host/archive.js +1 -152
  71. package/dist/host/call-context.js +1 -14
  72. package/dist/host/capsule-process.js +2 -62
  73. package/dist/host/capsule.js +9 -171
  74. package/dist/host/cell-receipts.js +12 -128
  75. package/dist/host/commit-result.js +1 -5
  76. package/dist/host/content-needed.js +1 -8
  77. package/dist/host/content-store.js +1 -31
  78. package/dist/host/contextual-place.js +2 -72
  79. package/dist/host/digest.js +2 -15
  80. package/dist/host/hash.js +1 -9
  81. package/dist/host/host-controls.js +1 -19
  82. package/dist/host/in-process-act.js +3 -84
  83. package/dist/host/in-process-context.js +3 -91
  84. package/dist/host/in-process-root.js +6 -84
  85. package/dist/host/in-process.js +4 -55
  86. package/dist/host/index.d.ts +1 -15
  87. package/dist/host/index.js +1 -7
  88. package/dist/host/io.js +1 -11
  89. package/dist/host/lifetime.js +1 -79
  90. package/dist/host/located.js +6 -105
  91. package/dist/host/native/bounded-file.js +1 -32
  92. package/dist/host/native/command.js +1 -91
  93. package/dist/host/native/control-bridge-worker.js +2 -88
  94. package/dist/host/native/control-bridge.js +1 -110
  95. package/dist/host/native/control-selection.js +1 -32
  96. package/dist/host/native/custody.js +1 -91
  97. package/dist/host/native/deadline.js +1 -28
  98. package/dist/host/native/descendants.js +1 -528
  99. package/dist/host/native/generated-custodian.js +5 -267
  100. package/dist/host/native/generated.js +1 -379
  101. package/dist/host/native/image.js +1 -45
  102. package/dist/host/native/jobs.js +2 -148
  103. package/dist/host/native/loader.js +1 -269
  104. package/dist/host/native/materialize.js +1 -175
  105. package/dist/host/native/module-closure.js +1 -130
  106. package/dist/host/native/module-delivery.d.ts +1 -62
  107. package/dist/host/native/module-delivery.js +1 -151
  108. package/dist/host/native/module-syntax.js +1 -69
  109. package/dist/host/native/native-binary.js +1 -115
  110. package/dist/host/native/native-program.js +1 -72
  111. package/dist/host/native/node-jobs.js +3 -187
  112. package/dist/host/native/node-launch.js +1 -159
  113. package/dist/host/native/preload.js +1 -45
  114. package/dist/host/native/reading.js +1 -249
  115. package/dist/host/native/receipt-environment.js +1 -41
  116. package/dist/host/native/references.js +1 -30
  117. package/dist/host/native/root.js +1 -37
  118. package/dist/host/native/route.js +1 -216
  119. package/dist/host/native/runtime.js +1 -9
  120. package/dist/host/native-reader-context.js +1 -8
  121. package/dist/host/native-receiver.js +1 -25
  122. package/dist/host/objects.js +1 -38
  123. package/dist/host/order.js +1 -2
  124. package/dist/host/place-act-transaction.js +4 -78
  125. package/dist/host/place-clock-selection.js +5 -124
  126. package/dist/host/ports/ingress.js +2 -57
  127. package/dist/host/ports/local-act.js +5 -183
  128. package/dist/host/ports/place-act.js +1 -134
  129. package/dist/host/ports/publication.js +1 -56
  130. package/dist/host/ports/signing.js +1 -74
  131. package/dist/host/ports/store.js +1 -18
  132. package/dist/host/ports/transport.js +1 -48
  133. package/dist/host/process-lifetime.js +1 -17
  134. package/dist/host/provide.js +1 -183
  135. package/dist/host/read-only.js +1 -9
  136. package/dist/host/reading-closures.js +7 -227
  137. package/dist/host/reading-context.js +1 -53
  138. package/dist/host/reading-identity-types.js +0 -0
  139. package/dist/host/reading-identity.js +3 -0
  140. package/dist/host/reading-preparation.js +6 -0
  141. package/dist/host/reference-authenticated.d.ts +1 -40
  142. package/dist/host/reference-authenticated.js +3 -100
  143. package/dist/host/reference-contracts.js +1 -6
  144. package/dist/host/reference-export.js +6 -81
  145. package/dist/host/reference-native-api.d.ts +1 -3
  146. package/dist/host/reference-native-api.js +1 -3
  147. package/dist/host/reference-native.js +1 -74
  148. package/dist/host/reference-profile.js +1 -63
  149. package/dist/host/reference-standing.js +2 -18
  150. package/dist/host/reference.js +1 -24
  151. package/dist/host/refusals.js +2 -43
  152. package/dist/host/release.js +4 -256
  153. package/dist/host/root-clock-source.js +1 -307
  154. package/dist/host/selected-capsules.js +1 -50
  155. package/dist/host/selected-topos.js +1 -80
  156. package/dist/host/signature-era.js +1 -12
  157. package/dist/host/signing.js +2 -48
  158. package/dist/host/source-content.js +2 -111
  159. package/dist/host/standing-carrier.js +1 -18
  160. package/dist/host/standing-projection.js +1 -50
  161. package/dist/host/timing.js +1 -7
  162. package/dist/host/walk.js +20 -193
  163. package/dist/judge/late.js +1 -33
  164. package/dist/judge/take.js +2 -75
  165. package/dist/judge/widening.js +1 -25
  166. package/dist/land/act.js +8 -336
  167. package/dist/land/alias.js +1 -41
  168. package/dist/land/held.js +1 -23
  169. package/dist/land/inert.js +1 -33
  170. package/dist/land/leaving.js +1 -55
  171. package/dist/land/ledger.js +7 -188
  172. package/dist/land/owned.js +4 -66
  173. package/dist/land/sign.js +1 -53
  174. package/dist/land/standing-pin.js +1 -49
  175. package/dist/land/vouched.js +1 -112
  176. package/dist/land/withdraw.js +1 -24
  177. package/dist/observe/files.js +1 -88
  178. package/dist/observe/identity.js +1 -61
  179. package/dist/observe/match.js +1 -8
  180. package/dist/observe/regions.js +7 -306
  181. package/dist/observe/run.js +2 -41
  182. package/dist/observe/runner.js +4 -101
  183. package/dist/public-types.d.ts +1114 -0
  184. package/dist/render/capsule.js +1 -30
  185. package/dist/render/field.js +1 -40
  186. package/dist/render/names.js +1 -4
  187. package/dist/render/open.js +1 -61
  188. package/dist/render/page.js +1 -7
  189. package/dist/render/receipts.js +1 -47
  190. package/dist/render/shape.js +1 -74
  191. package/dist/render/target.js +4 -52
  192. package/dist/render/view.js +7 -197
  193. package/dist/vendor/50086958553b9376d600583f7dff354196bfeb41170fc6d1482ca7bea7c493e2.LICENSE +21 -0
  194. package/dist/vendor/b3e938d28f88a1851af303a40c749e12ebd5a686daac4f0b343b5cdd2e040419.LICENSE +21 -0
  195. package/dist/vendor/bundle.json +1 -0
  196. package/dist/vendor/library11.js +1 -0
  197. package/dist/vendor/object-provider.js +42 -0
  198. package/dist/vendor/runtime.js +38 -0
  199. package/dist/vendor/sources.json +1 -0
  200. package/dist/wasm/adapter.d.ts +1 -51
  201. package/dist/wasm/adapter.js +1 -180
  202. package/dist/wasm/node-worker.js +1 -13
  203. package/dist/wasm/object.js +1 -76
  204. package/dist/wasm/worker.js +1 -7
  205. package/docs/contracts/closure-delivery.md +1 -1
  206. package/docs/contracts/closure-delivery.publication.json +1 -1
  207. package/docs/contracts/conformance.json +142 -0
  208. package/docs/contracts/determinism.bound +9 -0
  209. package/docs/contracts/engine-object-projection.publication.json +1 -1
  210. package/docs/contracts/engine.md +21 -1
  211. package/docs/contracts/native-publication.inventory.json +2 -1
  212. package/docs/contracts/optional-wasm-adapter.publication.json +1 -1
  213. package/docs/contracts/reading-identity.md +37 -0
  214. package/docs/contracts/reading-identity.publication.json +25 -0
  215. package/docs/contracts/refusals.bound +51 -0
  216. package/docs/contracts/refusals.md +18 -3
  217. package/docs/contracts/refusals.publication.json +2 -2
  218. package/docs/contracts/views.md +8 -0
  219. package/docs/reference.md +1 -0
  220. package/package.json +23 -34
  221. package/receipts.bound +11627 -10323
  222. package/samples/reading-identity/no.json +20 -0
  223. package/samples/reading-identity/yes.json +46 -0
  224. package/vectors/native/reading-identity.vector.json +101 -0
  225. package/vectors/native/refusals.vector.json +104 -0
  226. package/vendor/syntax/LICENSE.md +7 -0
  227. package/vendor/syntax/parser.js +1 -0
  228. package/.github/workflows/release.yml +0 -67
  229. package/.github/workflows/test.yml +0 -35
  230. package/dist/engine/object.d.ts +0 -17
  231. package/dist/engine/ports.d.ts +0 -37
  232. package/dist/fold/claims.d.ts +0 -29
  233. package/dist/host/call-context.d.ts +0 -20
  234. package/dist/host/commit-result.d.ts +0 -6
  235. package/dist/host/in-process-act.d.ts +0 -82
  236. package/dist/host/in-process-context.d.ts +0 -46
  237. package/dist/host/in-process-root.d.ts +0 -117
  238. package/dist/host/in-process.d.ts +0 -41
  239. package/dist/host/native/module-closure.d.ts +0 -35
  240. package/dist/host/native-receiver.d.ts +0 -19
  241. package/dist/host/place-act-transaction.d.ts +0 -24
  242. package/dist/host/place-clock-selection.d.ts +0 -55
  243. package/dist/host/ports/local-act.d.ts +0 -44
  244. package/dist/host/ports/place-act.d.ts +0 -49
  245. package/dist/host/ports/publication.d.ts +0 -10
  246. package/dist/host/reference-export.d.ts +0 -33
  247. package/dist/host/reference-native.d.ts +0 -30
  248. package/dist/host/reference-profile.d.ts +0 -23
  249. package/dist/host/refusals.d.ts +0 -14
  250. package/dist/host/root-clock-source.d.ts +0 -86
@@ -1,30 +1 @@
1
- import { matches } from '@lapxo/topos/wire';
2
- import { askingOf, capsulesOf } from "../observe/regions.js";
3
- export const capsuleRegions = (fold, asking, shape = '') => capsuleViews(fold, [{ asking, shape }])[0] ?? new Map();
4
- /**
5
- * A region this instrument does not render is rendered by a capsule: one the place uses by the digest of its lock and
6
- * its bytes, or else one the instrument carries. What the views of one fold ask of each capsule is asked at once; a
7
- * region one capsule answered is not asked of another, and one it refused or never answered is named and asked of the
8
- * next only when no region was offered. A refusal from an offered region stops the request; it never selects another implementation.
9
- */
10
- export const capsuleViews = (fold, views) => capsuleAnswers(fold, views).map((answers) => new Map([...answers].map(([name, answer]) => [name, answer.lines])));
11
- /** What each capsule answered a view's regions with, the capsule by its digest, and whether the place's pin chose it. */
12
- export function capsuleAnswers(fold, views) {
13
- const outs = views.map(() => new Map());
14
- if (!views.some((view) => view.asking.length))
15
- return outs;
16
- const asking = askingOf(fold);
17
- for (const capsule of capsulesOf(fold)) {
18
- const asked = views.flatMap((view, i) => view.asking.filter((one) => capsule.declaration.renders.some((glob) => matches(glob, one.name)) && !outs[i].has(one.name))
19
- .flatMap((one) => ((request) => (request === undefined ? [] : [{ i, one, request }]))(asking(capsule.declaration, one, 'render', view.shape))));
20
- const answers = capsule.ask(asked.map((one) => one.request));
21
- asked.forEach(({ i, one, request }, at) => {
22
- const said = answers[at];
23
- if (said?.kind === 'fact')
24
- outs[i].set(one.name, { lines: ((got) => got.lines ?? got.leaf ?? [])(said), by: capsule.digest });
25
- else
26
- throw new Error(`REFUSE·capsule ${capsule.digest} · ${request.rootScope}${one.name} · ${said?.why ?? 'no answer'}`);
27
- });
28
- }
29
- return outs;
30
- }
1
+ var d=Object.defineProperty;var p=(s,e)=>d(s,"name",{value:e,configurable:!0});import{library11_matches as h}from"../vendor/runtime.js";import{askingOf as g,capsulesOf as k}from"../observe/regions.js";const y=p((s,e,n="")=>w(s,[{asking:e,shape:n}])[0]??new Map,"capsuleRegions"),w=p((s,e)=>M(s,e).map(n=>new Map([...n].map(([i,a])=>[i,a.lines]))),"capsuleViews");function M(s,e){const n=e.map(()=>new Map);if(!e.some(a=>a.asking.length))return n;const i=g(s);for(const a of k(s)){const m=e.flatMap((t,c)=>t.asking.filter(r=>a.declaration.renders.some(o=>h(o,r.name))&&!n[c].has(r.name)).flatMap(r=>(o=>o===void 0?[]:[{i:c,one:r,request:o}])(i(a.declaration,r,"render",t.shape)))),u=a.ask(m.map(t=>t.request));m.forEach(({i:t,one:c,request:r},o)=>{const l=u[o];if(l?.kind==="fact")n[t].set(c.name,{lines:(f=>f.lines??f.leaf??[])(l),by:a.digest});else throw new Error(`REFUSE\xB7capsule ${a.digest} \xB7 ${r.rootScope}${c.name} \xB7 ${l?.why??"no answer"}`)})}return n}p(M,"capsuleAnswers");export{M as capsuleAnswers,y as capsuleRegions,w as capsuleViews};
@@ -1,40 +1 @@
1
- import { fieldOf } from "../fold/claims.js";
2
- import { placesIn } from "../fold/places.js";
3
- import { placedAt } from "../fold/reach.js";
4
- import { polesOf, rankOf, unpackRegions } from "../fold/region.js";
5
- import { INTERVALS } from '@lapxo/topos/forms';
6
- const WORST = ['disagreement', 'outside', 'unanswered', 'met'];
7
- const empty = (ceiling) => ceiling !== undefined && 'lo' in ceiling && !INTERVALS.inhabited(ceiling);
8
- /** Host file-region readings, grouped by coordinate prefix. These statuses do not compute object encounters. */
9
- export function field(fold, at) {
10
- if (fold.regions === undefined)
11
- return ['GREY field · this fold carries no region summaries; it is read again at the next fold'];
12
- const regions = unpackRegions(fold.regions);
13
- const places = placesIn(fold.root);
14
- const place = fold.under?.replace(/\/$/, '');
15
- const here = (line) => place === undefined || [place, undefined].includes(placedAt(places, line));
16
- const own = { ...fold.own, unread: fold.ceilings.unread.length + fold.ceilings.vacuous.length };
17
- const poles = new Map();
18
- const states = [
19
- ...regions.bounds.filter((bound) => here(bound.line)).map((bound) => {
20
- const ceiling = (poles.get(bound.region) ?? poles.set(bound.region, polesOf(regions, bound.region)).get(bound.region)).get(`${bound.question} ${bound.measure}`)?.ceiling;
21
- const got = rankOf(regions, bound, own);
22
- return [fieldOf(bound.line, 'scope'), empty(ceiling) ? 'disagreement' : got.bars || got.sums ? 'outside' : got.met ? 'met' : 'unanswered'];
23
- }),
24
- ...fold.missing.filter(here).map((line) => [fieldOf(line, 'scope'), 'unanswered']),
25
- ...fold.forks.flatMap((fork) => fork.lines.slice(0, 1)).filter(here).map((line) => [fieldOf(line, 'scope'), 'disagreement']),
26
- ];
27
- const cells = new Map();
28
- for (const [scope, state] of states) {
29
- const cell = scope.split('/').slice(0, Math.max(1, at)).join('/');
30
- const held = cells.get(cell);
31
- cells.set(cell, { state: held !== undefined && WORST.indexOf(held.state) < WORST.indexOf(state) ? held.state : state, bounds: (held?.bounds ?? 0) + 1 });
32
- }
33
- const ordered = [...cells].sort((a, b) => WORST.indexOf(a[1].state) - WORST.indexOf(b[1].state) || a[0].localeCompare(b[0]));
34
- return [
35
- '## field', '', '```',
36
- `FIELD @${at} · ${cells.size} groups · ${states.length} bounds · readings · no encounters computed · ${WORST.map((state) => `${state} ${ordered.filter(([, one]) => one.state === state).length}`).join(' · ')}`,
37
- ...ordered.map(([cell, one]) => `FIELD ${cell} · ${one.state} · ${one.bounds} bounds`),
38
- '```',
39
- ];
40
- }
1
+ var O=Object.defineProperty;var c=(n,o)=>O(n,"name",{value:o,configurable:!0});import{fieldOf as p}from"../fold/claims.js";import{placesIn as w}from"../fold/places.js";import{placedAt as x}from"../fold/reach.js";import{polesOf as E,rankOf as I,unpackRegions as R}from"../fold/region.js";import{library4_INTERVALS as L}from"../vendor/runtime.js";const i=["disagreement","outside","unanswered","met"],M=c(n=>n!==void 0&&"lo"in n&&!L.inhabited(n),"empty");function D(n,o){if(n.regions===void 0)return["GREY field \xB7 this fold carries no region summaries; it is read again at the next fold"];const l=R(n.regions),$=w(n.root),m=n.under?.replace(/\/$/,""),d=c(e=>m===void 0||[m,void 0].includes(x($,e)),"here"),h={...n.own,unread:n.ceilings.unread.length+n.ceilings.vacuous.length},g=new Map,u=[...l.bounds.filter(e=>d(e.line)).map(e=>{const s=(g.get(e.region)??g.set(e.region,E(l,e.region)).get(e.region)).get(`${e.question} ${e.measure}`)?.ceiling,t=I(l,e,h);return[p(e.line,"scope"),M(s)?"disagreement":t.bars||t.sums?"outside":t.met?"met":"unanswered"]}),...n.missing.filter(d).map(e=>[p(e,"scope"),"unanswered"]),...n.forks.flatMap(e=>e.lines.slice(0,1)).filter(d).map(e=>[p(e,"scope"),"disagreement"])],r=new Map;for(const[e,s]of u){const t=e.split("/").slice(0,Math.max(1,o)).join("/"),a=r.get(t);r.set(t,{state:a!==void 0&&i.indexOf(a.state)<i.indexOf(s)?a.state:s,bounds:(a?.bounds??0)+1})}const f=[...r].sort((e,s)=>i.indexOf(e[1].state)-i.indexOf(s[1].state)||e[0].localeCompare(s[0]));return["## field","","```",`FIELD @${o} \xB7 ${r.size} groups \xB7 ${u.length} bounds \xB7 readings \xB7 no encounters computed \xB7 ${i.map(e=>`${e} ${f.filter(([,s])=>s.state===e).length}`).join(" \xB7 ")}`,...f.map(([e,s])=>`FIELD ${e} \xB7 ${s.state} \xB7 ${s.bounds} bounds`),"```"]}c(D,"field");export{D as field};
@@ -1,4 +1 @@
1
- /** The regions bound renders itself, by name: a view that asks any other is answered by a capsule that declares it, or refused whole. */
2
- export const REGION_NAMES = [
3
- 'receipts', 'help', 'lines', 'red', 'forks', 'programs', 'why', 'sign', 'take', 'history', 'field', 'evidence',
4
- ];
1
+ const e=["receipts","help","lines","red","forks","programs","why","sign","take","history","field","evidence"];export{e as REGION_NAMES};
@@ -1,61 +1 @@
1
- import { fieldOf } from "../fold/claims.js";
2
- import { alphabet } from '@lapxo/topos/wire';
3
- import { declaredConfig as declared } from '@lapxo/topos/forms';
4
- import { bytesDigest } from "../fold/digests.js";
5
- /**
6
- * What is open, as cells, taken once when the tree is folded and read by the view rather than taken again at every
7
- * render. A line of the lock with more than one bit still free is a question this tree has not answered; a cell with
8
- * one legal state is applied and not open; a cell a reading has already answered is applied whatever its width; a
9
- * cell standing on one origin with a closer already named is asked and not open. A cell says of itself that it is a
10
- * decision: a ceiling in force is not a question because it is wide, and a lock with no decision in it is a lock with
11
- * nothing open, which the render says by saying nothing. What each state would be worth is rendered beside it, and a quantity this instrument cannot yet take is
12
- * rendered grey with the name of what would take it, never as a number it invented.
13
- */
14
- export function openCells(input) {
15
- const { store, standing, observed } = input;
16
- const rests = new Map();
17
- const asked = new Set();
18
- for (const line of standing) {
19
- for (const name of fieldOf(line, 'restsOn').split('|').filter(Boolean))
20
- rests.set(name, (rests.get(name) ?? 0) + 1);
21
- for (const need of fieldOf(line, 'needs').split('|').filter(Boolean))
22
- asked.add(need);
23
- }
24
- const by = new Map();
25
- for (const line of [...standing, ...observed]) {
26
- const at = fieldOf(line, 'scope');
27
- by.set(at, (by.get(at) ?? new Set()).add(fieldOf(line, 'by')));
28
- }
29
- const grey = new Set(input.grey.map((line) => fieldOf(line, 'scope')));
30
- const answered = new Set(observed.map((line) => fieldOf(line, 'scope')));
31
- const asDecision = standing.filter((line) => fieldOf(line, 'shape') === 'decision' && fieldOf(line, 'value') !== 'withdraw');
32
- const held = asDecision.length ? asDecision : [];
33
- const out = [];
34
- for (const line of held) {
35
- const scope = fieldOf(line, 'scope');
36
- const value = fieldOf(line, 'value');
37
- const freedom = declared(line);
38
- const bits = freedom.bits;
39
- if (freedom.kind === 'inactive' || (bits !== null && bits < 1))
40
- continue;
41
- if (answered.has(scope) || (grey.has(scope) && asked.has(scope)))
42
- continue;
43
- const needs = fieldOf(line, 'needs');
44
- out.push({
45
- scope,
46
- ceiling: value,
47
- bits,
48
- freedom: freedom.kind,
49
- states: freedom.kind === 'finite' && freedom.form === 'alphabet' ? [...new Set(alphabet(value).members)] : [],
50
- origins: [...(by.get(scope) ?? new Set())].sort(),
51
- rank: rests.get(scope) ?? 0,
52
- cone: needs ? bytesDigest(store, new TextEncoder().encode(needs)).replace(/^[^:]*:/, '').slice(0, 8) : '',
53
- });
54
- }
55
- return out.sort((a, b) => b.rank - a.rank || (b.bits ?? 0) - (a.bits ?? 0) || a.scope.localeCompare(b.scope));
56
- }
57
- export const openCards = (open) => open.flatMap((cell) => [
58
- `OPEN ${cell.scope} · cone ${cell.cone || 'grey · a demand would name it'} · ceiling ${cell.ceiling}`
59
- + ` · origins ${cell.origins.length} ${cell.origins.join(' ')} · ${cell.bits === null ? `unknown freedom (${cell.freedom})` : `${cell.bits.toFixed(1)} bits`}`,
60
- ...cell.states.map((state) => `CANDIDATE ${state} · rank ${cell.rank}`),
61
- ]);
1
+ var $=Object.defineProperty;var f=(s,o)=>$(s,"name",{value:o,configurable:!0});import{fieldOf as t}from"../fold/claims.js";import{library11_alphabet as y}from"../vendor/runtime.js";import{library4_declaredConfig as S}from"../vendor/runtime.js";import{bytesDigest as v}from"../fold/digests.js";function O(s){const{store:o,standing:i,observed:p}=s,a=new Map,m=new Set;for(const e of i){for(const n of t(e,"restsOn").split("|").filter(Boolean))a.set(n,(a.get(n)??0)+1);for(const n of t(e,"needs").split("|").filter(Boolean))m.add(n)}const c=new Map;for(const e of[...i,...p]){const n=t(e,"scope");c.set(n,(c.get(n)??new Set).add(t(e,"by")))}const h=new Set(s.grey.map(e=>t(e,"scope"))),u=new Set(p.map(e=>t(e,"scope"))),l=i.filter(e=>t(e,"shape")==="decision"&&t(e,"value")!=="withdraw"),k=l.length?l:[],g=[];for(const e of k){const n=t(e,"scope"),b=t(e,"value"),r=S(e),d=r.bits;if(r.kind==="inactive"||d!==null&&d<1||u.has(n)||h.has(n)&&m.has(n))continue;const w=t(e,"needs");g.push({scope:n,ceiling:b,bits:d,freedom:r.kind,states:r.kind==="finite"&&r.form==="alphabet"?[...new Set(y(b).members)]:[],origins:[...c.get(n)??new Set].sort(),rank:a.get(n)??0,cone:w?v(o,new TextEncoder().encode(w)).replace(/^[^:]*:/,"").slice(0,8):""})}return g.sort((e,n)=>n.rank-e.rank||(n.bits??0)-(e.bits??0)||e.scope.localeCompare(n.scope))}f(O,"openCells");const A=f(s=>s.flatMap(o=>[`OPEN ${o.scope} \xB7 cone ${o.cone||"grey \xB7 a demand would name it"} \xB7 ceiling ${o.ceiling} \xB7 origins ${o.origins.length} ${o.origins.join(" ")} \xB7 ${o.bits===null?`unknown freedom (${o.freedom})`:`${o.bits.toFixed(1)} bits`}`,...o.states.map(i=>`CANDIDATE ${i} \xB7 rank ${o.rank}`)]),"openCards");export{A as openCards,O as openCells};
@@ -1,7 +1 @@
1
- import { fieldOf } from "../fold/claims.js";
2
- import { ownLock } from "../observe/runner.js";
3
- import { steps } from '@lapxo/topos/wire';
4
- const own = (scope, measure) => fieldOf(ownLock().find((line) => fieldOf(line, 'scope') === scope && (!measure || fieldOf(line, 'measure') === measure) && fieldOf(line, 'value') !== 'withdraw') ?? '', 'value');
5
- export const secondName = () => steps(own('head/second'))[0] ?? '';
6
- export const nameOf = (fold) => (fold.under ?? '').replace(/\/$/, '')
7
- || fieldOf(fold.standing.find((line) => fieldOf(line, 'scope') === 'publish/bootstrap' && fieldOf(line, 'value') !== 'withdraw') ?? '', 'value');
1
+ var a=Object.defineProperty;var s=(r,o)=>a(r,"name",{value:o,configurable:!0});import{fieldOf as e}from"../fold/claims.js";import{ownLock as p}from"../observe/runner.js";import{library11_steps as n}from"../vendor/runtime.js";const c=s((r,o)=>e(p().find(t=>e(t,"scope")===r&&(!o||e(t,"measure")===o)&&e(t,"value")!=="withdraw")??"","value"),"own"),u=s(()=>n(c("head/second"))[0]??"","secondName"),w=s(r=>(r.under??"").replace(/\/$/,"")||e(r.standing.find(o=>e(o,"scope")==="publish/bootstrap"&&e(o,"value")!=="withdraw")??"","value"),"nameOf");export{w as nameOf,u as secondName};
@@ -1,47 +1 @@
1
- import { canonical } from '@lapxo/topos/wire';
2
- import { selectedWireList } from "../host/selected-topos.js";
3
- import { fieldOf } from "../fold/claims.js";
4
- import { ownLockOf } from "../fold/signed.js";
5
- import { receiptProjection } from '@lapxo/topos/receipts';
6
- import { receiptsOf, keepCarried } from "../fold/resolved.js";
7
- import { bytesDigest } from "../fold/digests.js";
8
- import { keyOf } from "../fold/keys.js";
9
- import { fileRegionDigest } from "../fold/closed.js";
10
- import { readersBehind } from "../fold/observed.js";
11
- import { instrumentDigest } from "../fold/digests.js";
12
- import { ownLock, ownRoot, sourceOf } from "../observe/runner.js";
13
- import { wireLine } from "../fold/wire.js";
14
- /** Native receipts are a protocol projection of actual fold observations, not a domain renderer or an acceptance verdict. */
15
- export function receiptRegion(fold, at) {
16
- const local = fold.under ? ownLockOf(fold.root, fold.under.replace(/\/$/, '')) : fold.standing;
17
- const prefix = 'uses/';
18
- const pins = local.filter(line => {
19
- const scope = fieldOf(line, 'scope');
20
- return scope.startsWith(prefix) && scope.length > prefix.length && !scope.slice(prefix.length).includes('/') && fieldOf(line, 'value') !== 'withdraw';
21
- });
22
- const fields = selectedWireList(local, fold.epoch, pins, 'receipt-fields');
23
- const contract = wireLine(ownLock(), 'receipt-instrument');
24
- const coordinate = contract === undefined ? undefined : fieldOf(contract, 'value');
25
- const implementation = coordinate === undefined ? undefined : instrumentDigest(fold.store, sourceOf(), [], ownRoot(), ownLock());
26
- // The current implementation seal is metadata, not an observation carried from a previous fold.
27
- const observed = [...receiptsOf(fold).filter(line => !coordinate || fieldOf(line, 'scope') !== coordinate), ...(coordinate && implementation ? [canonical({ scope: coordinate, role: 'writes', form: 'alphabet', measure: 'digest', value: implementation, at: `place:${implementation}`, by: 'bound' })] : [])];
28
- const hash = (bytes) => bytesDigest(fold.store, new TextEncoder().encode(bytes));
29
- const head = keyOf(fold.store, 'attest');
30
- const projection = receiptProjection(observed, fields, hash, head ? [head] : []);
31
- const set = keepCarried(fold.store, observed);
32
- if (at === 0)
33
- return [canonical({ scope: 'receipts', role: 'writes', form: 'alphabet', measure: 'digest', value: projection.root, at: `place:${set}`, by: 'bound' })];
34
- if (at === 1) {
35
- const algorithm = hash('').split(':')[0];
36
- const current = readersBehind().length === 0;
37
- return projection.regions.flatMap(region => {
38
- const bytes = fileRegionDigest(fold.root, fold.under ?? '', region.scope, algorithm, observed);
39
- const count = canonical({ scope: region.scope, role: 'writes', form: 'interval', measure: 'count', value: `${region.count}..${region.count}`, at: `place:${region.digest}`, by: 'bound' });
40
- // A stale reading remains visible but cannot seal the current file bytes.
41
- return current ? [count, canonical({ scope: region.scope, role: 'writes', form: 'alphabet', measure: 'bytes', value: bytes, at: `place:${bytes}`, by: 'bound' })] : [count];
42
- });
43
- }
44
- if (at === 8)
45
- return observed;
46
- throw Error(`REFUSE·receipt unsupported resolution ${at}`);
47
- }
1
+ var k=Object.defineProperty;var m=(e,r)=>k(e,"name",{value:r,configurable:!0});import{library11_canonical as c}from"../vendor/runtime.js";import{selectedWireList as E}from"../host/selected-topos.js";import{fieldOf as p}from"../fold/claims.js";import{ownLockOf as L}from"../fold/signed.js";import{library6_receiptProjection as R}from"../vendor/runtime.js";import{receiptsOf as j,keepCarried as x}from"../fold/resolved.js";import{bytesDigest as D}from"../fold/digests.js";import{keyOf as P}from"../fold/keys.js";import{fileRegionDigest as W}from"../fold/closed.js";import{readersBehind as _}from"../fold/observed.js";import{instrumentDigest as B}from"../fold/digests.js";import{ownLock as y,ownRoot as C,sourceOf as F}from"../observe/runner.js";import{wireLine as M}from"../fold/wire.js";function X(e,r){const l=e.under?L(e.root,e.under.replace(/\/$/,"")):e.standing,a="uses/",v=l.filter(t=>{const n=p(t,"scope");return n.startsWith(a)&&n.length>a.length&&!n.slice(a.length).includes("/")&&p(t,"value")!=="withdraw"}),$=E(l,e.epoch,v,"receipt-fields"),f=M(y(),"receipt-instrument"),s=f===void 0?void 0:p(f,"value"),u=s===void 0?void 0:B(e.store,F(),[],C(),y()),i=[...j(e).filter(t=>!s||p(t,"scope")!==s),...s&&u?[c({scope:s,role:"writes",form:"alphabet",measure:"digest",value:u,at:`place:${u}`,by:"bound"})]:[]],d=m(t=>D(e.store,new TextEncoder().encode(t)),"hash"),b=P(e.store,"attest"),h=R(i,$,d,b?[b]:[]),O=x(e.store,i);if(r===0)return[c({scope:"receipts",role:"writes",form:"alphabet",measure:"digest",value:h.root,at:`place:${O}`,by:"bound"})];if(r===1){const t=d("").split(":")[0],n=_().length===0;return h.regions.flatMap(o=>{const w=W(e.root,e.under??"",o.scope,t,i),g=c({scope:o.scope,role:"writes",form:"interval",measure:"count",value:`${o.count}..${o.count}`,at:`place:${o.digest}`,by:"bound"});return n?[g,c({scope:o.scope,role:"writes",form:"alphabet",measure:"bytes",value:w,at:`place:${w}`,by:"bound"})]:[g]})}if(r===8)return i;throw Error(`REFUSE\xB7receipt unsupported resolution ${r}`)}m(X,"receiptRegion");export{X as receiptRegion};
@@ -1,74 +1 @@
1
- import { join } from "../host/io.js";
2
- import { coherence } from '@lapxo/obligations/views/field';
3
- import { fieldOf } from "../fold/claims.js";
4
- import { ledgerLines } from "../land/ledger.js";
5
- import { coordinatesUnder } from "../observe/files.js";
6
- import { rolesOf } from "../fold/roles.js";
7
- const headOf = (scope) => scope.split('/')[0] ?? scope;
8
- /**
9
- * A region of the tree read as a cell of the field: its origins are everyone who spoke there, the head that signed a
10
- * line and the reader that landed a reading alike, and its epochs are when they spoke. A scope only one of them ever
11
- * touched is where the region rests on a single origin. What figure the region makes, whether it holds without any
12
- * one of them, how wide in epochs it is and how together its lines arrived are the five questions the algebra asks of
13
- * a cell, asked of the lock that measures the tree.
14
- */
15
- function regionsOf(fold) {
16
- const origins = new Map();
17
- const epochs = new Map();
18
- const scopes = new Map();
19
- const spoke = (at, by, epoch) => {
20
- const head = headOf(at);
21
- origins.set(head, (origins.get(head) ?? new Set()).add(by));
22
- epochs.set(head, [...(epochs.get(head) ?? []), epoch]);
23
- const inside = scopes.get(head) ?? new Map();
24
- inside.set(at, (inside.get(at) ?? new Set()).add(by));
25
- scopes.set(head, inside);
26
- };
27
- for (const line of fold.standing)
28
- spoke(fieldOf(line, 'scope'), fieldOf(line, 'by'), Number(fieldOf(line, 'epoch')) || 0);
29
- for (const line of fold.observed)
30
- spoke(fieldOf(line, 'scope'), fieldOf(line, 'by'), fold.epoch);
31
- return new Map([...origins].sort().map(([head, said]) => [head, {
32
- origins: said,
33
- epochs: epochs.get(head) ?? [],
34
- alone: [...(scopes.get(head) ?? new Map()).values()].filter((by) => by.size < 2).length,
35
- scopes: (scopes.get(head) ?? new Map()).size,
36
- }]));
37
- }
38
- const shapeOf = (held) => (held.origins.size > 2 ? 'polygon' : held.origins.size === 2 ? 'edge' : 'point');
39
- const widthOf = (held) => Math.max(...held.epochs) - Math.min(...held.epochs);
40
- const rhythmOf = (held) => `${new Set(held.epochs).size} of ${widthOf(held) + 1}`;
41
- const periodOf = (fold) => fold.epoch + 1;
42
- const togetherness = (held, period) => coherence(held.epochs.map((epoch, i) => ({ origin: String(i), epoch, span: { lo: 0, hi: 1 } })), period);
43
- export function shapeLines(fold) {
44
- const period = periodOf(fold);
45
- return [...regionsOf(fold)].map(([head, held]) => `SHAPE ${head} · ${shapeOf(held)} of ${held.origins.size} · ${held.alone ? 'fragile' : 'robust'} · coherence ${togetherness(held, period).toFixed(2)}`
46
- + ` · width ${widthOf(held)} · rhythm ${rhythmOf(held)}`);
47
- }
48
- /**
49
- * What moved a verdict: the world under it, or a head that signed. A demand whose judgement came out differently than
50
- * the time before moved by observation unless its own line was re-signed, in which case the lock moved and not the
51
- * world; a verdict moved by a signature is not the world moving.
52
- */
53
- export function moved(fold) {
54
- const said = new Map();
55
- const turned = new Set();
56
- for (const line of ledgerLines(fold.store, 'judge')) {
57
- const at = fieldOf(line, 'scope');
58
- const value = fieldOf(line, 'value');
59
- if (said.has(at) && said.get(at) !== value)
60
- turned.add(at);
61
- said.set(at, value);
62
- }
63
- const resigned = new Set(fold.history.map((line) => fieldOf(line, 'scope')));
64
- const signature = [...turned].filter((at) => resigned.has(at)).length;
65
- return { observation: turned.size - signature, signature };
66
- }
67
- /** The source coordinates of the tree no reader has reached: the number that falls when knowing advances. The walk never enters the store or a foreign directory, whose coordinates are never sources. */
68
- export function horizonOf(fold) {
69
- const role = rolesOf(fold.store);
70
- const sources = coordinatesUnder(join(fold.root, fold.under ?? ''), fold.root, (dir) => dir === '' || (role(dir) !== 'foreign' && join(fold.root, dir) !== fold.store))
71
- .filter((coordinate) => role(coordinate) === 'source');
72
- const seen = new Set(fold.observed.map((line) => fieldOf(line, 'scope')));
73
- return { unread: sources.filter((coordinate) => !seen.has(coordinate)).length, sources: sources.length };
74
- }
1
+ var u=Object.defineProperty;var i=(e,n)=>u(e,"name",{value:n,configurable:!0});import{join as h}from"../host/io.js";import{library14_coherence as w}from"../vendor/runtime.js";import{fieldOf as p}from"../fold/claims.js";import{ledgerLines as M}from"../land/ledger.js";import{coordinatesUnder as O}from"../observe/files.js";import{rolesOf as $}from"../fold/roles.js";const z=i(e=>e.split("/")[0]??e,"headOf");function S(e){const n=new Map,r=new Map,t=new Map,s=i((o,c,a)=>{const g=z(o);n.set(g,(n.get(g)??new Set).add(c)),r.set(g,[...r.get(g)??[],a]);const f=t.get(g)??new Map;f.set(o,(f.get(o)??new Set).add(c)),t.set(g,f)},"spoke");for(const o of e.standing)s(p(o,"scope"),p(o,"by"),Number(p(o,"epoch"))||0);for(const o of e.observed)s(p(o,"scope"),p(o,"by"),e.epoch);return new Map([...n].sort().map(([o,c])=>[o,{origins:c,epochs:r.get(o)??[],alone:[...(t.get(o)??new Map).values()].filter(a=>a.size<2).length,scopes:(t.get(o)??new Map).size}]))}i(S,"regionsOf");const b=i(e=>e.origins.size>2?"polygon":e.origins.size===2?"edge":"point","shapeOf"),m=i(e=>Math.max(...e.epochs)-Math.min(...e.epochs),"widthOf"),l=i(e=>`${new Set(e.epochs).size} of ${m(e)+1}`,"rhythmOf"),v=i(e=>e.epoch+1,"periodOf"),d=i((e,n)=>w(e.epochs.map((r,t)=>({origin:String(t),epoch:r,span:{lo:0,hi:1}})),n),"togetherness");function F(e){const n=v(e);return[...S(e)].map(([r,t])=>`SHAPE ${r} \xB7 ${b(t)} of ${t.origins.size} \xB7 ${t.alone?"fragile":"robust"} \xB7 coherence ${d(t,n).toFixed(2)} \xB7 width ${m(t)} \xB7 rhythm ${l(t)}`)}i(F,"shapeLines");function H(e){const n=new Map,r=new Set;for(const o of M(e.store,"judge")){const c=p(o,"scope"),a=p(o,"value");n.has(c)&&n.get(c)!==a&&r.add(c),n.set(c,a)}const t=new Set(e.history.map(o=>p(o,"scope"))),s=[...r].filter(o=>t.has(o)).length;return{observation:r.size-s,signature:s}}i(H,"moved");function N(e){const n=$(e.store),r=O(h(e.root,e.under??""),e.root,s=>s===""||n(s)!=="foreign"&&h(e.root,s)!==e.store).filter(s=>n(s)==="source"),t=new Set(e.observed.map(s=>p(s,"scope")));return{unread:r.filter(s=>!t.has(s)).length,sources:r.length}}i(N,"horizonOf");export{N as horizonOf,H as moved,F as shapeLines};
@@ -1,52 +1,4 @@
1
- import { claimKey, foldClaims } from "../fold/claims.js";
2
- import { PROTOCOL } from '@lapxo/topos/wire';
3
- const scopeOf = (line) => /(?:^|\s)scope=([^\s]+)/.exec(line)?.[1] ?? '';
4
- /** A root policy line: signed by a key the authority reads, or one of the few scopes that bind unsigned. */
5
- function isRootPolicyLine(line) {
6
- if (!line.startsWith(PROTOCOL))
7
- return false;
8
- return /\bsig=/.test(line);
9
- }
10
- const isExpired = (line, today) => ((expires) => expires !== undefined && expires < today)(/(?:^|\s)expires=(\d{4}-\d{2}-\d{2})/.exec(line)?.[1]);
11
- /** TARGET is a render of the fold of the owner's ledger: a fork shows every signed line that stands, under a note. */
12
- export function renderTarget(ownerLines, today = new Date().toISOString().slice(0, 10), authority, receipts) {
13
- const folded = foldClaims(ownerLines.filter((line) => isRootPolicyLine(line) && !isExpired(line, today)), receipts);
14
- const forked = new Map(folded.forks.map((f) => [f.key, f]));
15
- const sorted = folded.standing.slice().sort((a, b) => {
16
- const left = `${scopeOf(a)} ${claimKey(a)}`;
17
- const right = `${scopeOf(b)} ${claimKey(b)}`;
18
- return left < right ? -1 : left > right ? 1 : 0;
19
- });
20
- const body = [];
21
- const announced = new Set();
22
- const grey = [];
23
- const refused = [];
24
- for (const line of sorted) {
25
- const key = claimKey(line);
26
- const fork = forked.get(key);
27
- if (fork && !announced.has(key)) {
28
- announced.add(key);
29
- body.push(`# fork ${key} · ${fork.lines.length} signed lines stand; narrow or withdraw one`);
30
- }
31
- const verdict = authority?.(line);
32
- if (verdict?.kind === 'grey') {
33
- grey.push(line);
34
- body.push(`# grey ${scopeOf(line)} · ${verdict.why ?? ''}`);
35
- }
36
- else if (verdict?.kind === 'refuse') {
37
- refused.push(line);
38
- body.push(`# refuse ${scopeOf(line)} · ${verdict.why ?? ''}`);
39
- }
40
- body.push(line);
41
- }
42
- return {
43
- text: `# rendered from ledger/owner\n${body.join('\n')}${body.length ? '\n' : ''}`,
44
- standing: folded.standing.length,
45
- superseded: folded.superseded,
46
- retracted: folded.retracted,
47
- forks: folded.forks,
48
- grey,
49
- refused,
50
- vacuous: folded.vacuous,
51
- };
52
- }
1
+ var k=Object.defineProperty;var c=(s,d)=>k(s,"name",{value:d,configurable:!0});import{claimKey as a,foldClaims as w}from"../fold/claims.js";import{library11_PROTOCOL as m}from"../vendor/runtime.js";const u=c(s=>/(?:^|\s)scope=([^\s]+)/.exec(s)?.[1]??"","scopeOf");function O(s){return s.startsWith(m)?/\bsig=/.test(s):!1}c(O,"isRootPolicyLine");const x=c((s,d)=>(f=>f!==void 0&&f<d)(/(?:^|\s)expires=(\d{4}-\d{2}-\d{2})/.exec(s)?.[1]),"isExpired");function P(s,d=new Date().toISOString().slice(0,10),f,h){const n=w(s.filter(e=>O(e)&&!x(e,d)),h),$=new Map(n.forks.map(e=>[e.key,e])),y=n.standing.slice().sort((e,t)=>{const i=`${u(e)} ${a(e)}`,r=`${u(t)} ${a(t)}`;return i<r?-1:i>r?1:0}),o=[],l=new Set,g=[],p=[];for(const e of y){const t=a(e),i=$.get(t);i&&!l.has(t)&&(l.add(t),o.push(`# fork ${t} \xB7 ${i.lines.length} signed lines stand; narrow or withdraw one`));const r=f?.(e);r?.kind==="grey"?(g.push(e),o.push(`# grey ${u(e)} \xB7 ${r.why??""}`)):r?.kind==="refuse"&&(p.push(e),o.push(`# refuse ${u(e)} \xB7 ${r.why??""}`)),o.push(e)}return{text:`# rendered from ledger/owner
2
+ ${o.join(`
3
+ `)}${o.length?`
4
+ `:""}`,standing:n.standing.length,superseded:n.superseded,retracted:n.retracted,forks:n.forks,grey:g,refused:p,vacuous:n.vacuous}}c(P,"renderTarget");export{P as renderTarget};
@@ -1,197 +1,7 @@
1
- import { receiptRegion } from "./receipts.js";
2
- import { releasePolicyLines } from "../fold/release-policy.js";
3
- import { join } from "../host/io.js";
4
- import { observeText } from "../observe/files.js";
5
- import { secondName } from "./page.js";
6
- import { capsuleAnswers, capsuleRegions, capsuleViews } from "./capsule.js";
7
- import { declaredBy } from "../observe/regions.js";
8
- import { readersBehind } from "../fold/observed.js";
9
- import { LOCK, canonical, matches } from '@lapxo/topos/wire';
10
- import { fieldOf, foldClaims, selfName } from "../fold/claims.js";
11
- import { keepRender, keptRender } from "../fold/kept.js";
12
- import { bytesDigest, signaturesOf } from "../fold/digests.js";
13
- import { authorityFor, rootSigner, writerFor } from "../fold/signers.js";
14
- import { lockLines } from "../fold/keys.js";
15
- import { appliedIn } from "../fold/signed.js";
16
- import { ledgerLines } from "../land/ledger.js";
17
- import { horizonOf, moved, shapeLines } from "./shape.js";
18
- import { rankLines } from "../fold/rank.js";
19
- import { differing, regionsOf } from "../fold/region.js";
20
- import { field } from "./field.js";
21
- import { helpLines } from "../cli/names.js";
22
- /** Authenticated delivery history is evidence, not the place's normative standing. */
23
- const evidence = (fold) => {
24
- const authority = authorityFor(lockLines(fold.store), rootSigner(fold.root), signaturesOf(fold.store).admitted);
25
- const place = (fold.under ?? '').replace(/\/$/, '');
26
- const deliveries = place ? appliedIn(fold.root, place)
27
- : [...new Set(authority.admitted.flatMap(key => ledgerLines(fold.store, key.id)))];
28
- return deliveries
29
- .filter(line => authority.of(line).kind === 'admitted');
30
- };
31
- const block = (name, lines) => (lines.length ? [`## ${name}`, '', '```', ...lines, '```'] : []);
32
- const seconds = (ms) => `${(ms / 1000).toFixed(1)} s`;
33
- const programs = (fold) => {
34
- const median = fold.costs.length ? [...fold.costs].sort((a, b) => a - b)[Math.floor(fold.costs.length / 2)] ?? 0 : 0;
35
- const turned = moved(fold);
36
- const far = horizonOf(fold);
37
- const refusedByReader = fold.observed.filter((line) => fieldOf(line, 'scope') === 'refuse/reader').length;
38
- const c = fold.ceilings;
39
- return block('programs', [
40
- `PROGRAMS${fold.under ? ` ${fold.under}` : ''} ${[`${fold.claims} claims`, `${fold.history.length} history`].join(' · ')}`
41
- + ` · ${fold.forks.length + (fold.second.verdict === 'forks' ? 1 : 0)} forks · ${fold.grey.length} grey · ${fold.refused.length} refused · ${fold.vacuous} vacuous`
42
- + ` · ${secondName()} ${fold.second.verdict}${fold.second.verdict === 'agrees' && !fold.second.external ? ', never disagreed' : ''}`
43
- + ` · store ${fold.observed.length} observed${refusedByReader ? ` · ${refusedByReader} refuse·reader` : ''}`
44
- + (fold.under ? ` · ceilings ${c.read} met here · ${c.short.length} short · ${c.over.length} over`
45
- : ` · ceilings ${c.read}/${c.total} read · ${c.short.length} short · ${c.over.length} over · ${c.unread.length} unread${c.vacuous.length ? ` · ${c.vacuous.length} vacuous unread` : ''}`)
46
- + ' · readings · no encounters computed'
47
- + ` · ${fold.effects} · take ${fold.costs.length ? seconds(fold.costs[fold.costs.length - 1] ?? 0) : 'none'} last`
48
- + (fold.costs.length > 1 ? ` · ${seconds(median)} median of ${fold.costs.length}` : ''),
49
- ...shapeLines(fold),
50
- ...rankLines(fold),
51
- `OPEN ${(fold.open ?? []).length} unresolved decisions`,
52
- `MOVED ${turned.observation + turned.signature} verdicts turned · ${turned.observation} by observation · ${turned.signature} by signature`,
53
- `HORIZON ${far.unread} of ${far.sources} sources no reader reaches`,
54
- ...releasePolicyLines(fold.release),
55
- ...asCells(fold),
56
- ]);
57
- };
58
- /**
59
- * A key and a lock are cells under the one relation: what each has signed is its floor, what it may sign its ceiling,
60
- * and it stays grey while it is its own only origin. What a place has already been observed to be travels with it as
61
- * the reader's own lines, digest and all: a clone lands them and runs nothing, since running is how a second head
62
- * disagrees and not how the first one sees green.
63
- */
64
- function asCells(fold) {
65
- const signed = fold.signed;
66
- const coverage = new Map();
67
- for (const line of fold.standing) {
68
- const key = /^keys\/([^/]+)$/.exec(fieldOf(line, 'scope'))?.[1];
69
- if (key && fieldOf(line, 'measure') === 'coverage')
70
- coverage.set(key, fieldOf(line, 'value'));
71
- }
72
- const colour = fold.second.verdict === 'agrees' ? 'green' : fold.second.verdict === 'forks' ? 'fork' : 'grey';
73
- const alone = fold.second.verdict === 'agrees' ? 0 : fold.claims;
74
- return [
75
- ...[...coverage].sort().map(([key, covers]) => `KEY keys/${key} · floor ${signed.get(key) ?? 0} lines signed · ceiling ${covers} · ${signed.get(key) ? colour : 'grey'}`),
76
- `LOCK ${fold.under ?? ''}${LOCK} · floor ${fold.landed} sources vouched · ceiling ${fold.lock} lines · ${colour}`,
77
- `BLIND ${alone} lines stand on one origin · second head ${fold.second.verdict === 'stale' && fold.second.epoch ? `agreed at epoch ${fold.second.epoch}, elsewhere` : fold.second.verdict}`,
78
- ];
79
- }
80
- const whyAt = new WeakMap();
81
- export const askWhy = (fold, coord) => { whyAt.set(fold, coord); };
82
- const why = (fold) => {
83
- const coord = whyAt.get(fold);
84
- if (coord) {
85
- const hits = fold.standing.filter((line) => fieldOf(line, 'needs').split('|').includes(coord) || fieldOf(line, 'shape') === coord);
86
- return block('why', hits.length ? hits.map((line) => `WHY ${fieldOf(line, 'scope')} · ${fieldOf(line, 'at')} · ${fieldOf(line, 'value')}`) : [`OPEN ${coord}`]);
87
- }
88
- const named = fold.standing.find((line) => fieldOf(line, 'scope') === `${fold.under ?? ''}view/why` || fieldOf(line, 'scope') === 'view/why');
89
- const at = fieldOf(named ?? '', 'shape') || fieldOf(named ?? '', 'needs').split('|').find(Boolean) || '';
90
- const held = at ? observeText(join(fold.root, fold.under ?? '', at)) : undefined;
91
- if (held === undefined)
92
- return [];
93
- const prose = held.replace(/^---\n[\s\S]*?\n---\n/, '').split('\n\n')
94
- .map((part) => part.trim()).filter((part) => part && !part.startsWith('#'))
95
- .map((part) => part.split('\n').join(' '));
96
- return prose.length ? ['## why', '', ...prose.flatMap((part) => [part, ''])].slice(0, -1) : [];
97
- };
98
- const sign = (fold) => {
99
- const keys = fold.standing
100
- .filter((line) => /^keys\/[^/]+$/.test(fieldOf(line, 'scope')) && fieldOf(line, 'measure') === 'class')
101
- .map((line) => `KEY ${fieldOf(line, 'scope').slice('keys/'.length)} · ${fieldOf(line, 'value')}`);
102
- return block('sign', [
103
- `SIGN write the lines you propose as by=target, then: ${selfName()} sign <file> --key-file <pem of an admitted key>`,
104
- 'SIGN a line is never edited in place: withdraw the old content in the same batch, or the fold forks',
105
- ...keys,
106
- ]);
107
- };
108
- const take = (fold) => block('take', [
109
- `TAKE ${selfName()} land <batch> --key-file <pem> · the land that takes a demand pays it by moving what it asks about`,
110
- ...fold.missing.map((line) => `TAKE ${fieldOf(line, 'scope')} · open: sign it again in a batch`),
111
- ]);
112
- const red = (fold) => block('red', [
113
- ...readersBehind().map((one) => `GREY reading: ${one.module} · ${one.places} places · lands behind this fold`),
114
- ...fold.ceilings.short.map((s) => `SHORT ${s}`),
115
- ...fold.ceilings.over.map((o) => `OVER ${o}`),
116
- ...fold.missing.map((line) => `MISSING ${fieldOf(line, 'scope')}`),
117
- ...fold.orphans.map((file) => `ORPHAN ${file}`),
118
- ...(fold.under ? [] : [
119
- ...(fold.ceilings.unread.length ? [`UNREAD ${fold.ceilings.unread.join(' · ')}`] : []),
120
- ...(fold.ceilings.vacuous.length ? [`VACUOUS ${fold.ceilings.vacuous.join(' · ')}`] : []),
121
- ...fold.refused.map((line) => `REFUSED ${fieldOf(line, 'scope')}`),
122
- ]),
123
- ]);
124
- const forks = (fold) => block('forks', [
125
- ...fold.forks.map((fork) => `FORK ${fork.key}`),
126
- ...(fold.second.verdict === 'forks' ? [`FORK ${secondName()}/target · the second head finds other lines standing`] : []),
127
- ]);
128
- const history = (fold) => {
129
- const lines = lockLines(fold.store);
130
- const at = (epoch) => foldClaims(lines.filter((line) => (Number(fieldOf(line, 'epoch')) || 0) <= epoch)).standing;
131
- const moved = differing(regionsOf(at(fold.epoch - 1), at(fold.epoch - 1), []), regionsOf(at(fold.epoch), at(fold.epoch), []));
132
- return block('history', [
133
- ...fold.history.map((line) => `HISTORY ${fieldOf(line, 'scope')} · ${fieldOf(line, 'at')}`),
134
- ...moved.regions.map((region) => `MOVED ${region || '.'} · at epoch ${fold.epoch} · ${moved.compared} regions compared`),
135
- ]);
136
- };
137
- const REGIONS = {
138
- receipts: (fold) => receiptRegion(fold, 1),
139
- help: () => helpLines(),
140
- lines: (fold) => fold.standing,
141
- evidence,
142
- red, forks, programs, why, sign, take, history,
143
- field: (fold) => field(fold, 3),
144
- };
145
- const AT = { field, receipts: receiptRegion };
146
- export const unrendered = (fold, view) => ((declared) => view.regions.map((asked) => asked.name).filter((name) => REGIONS[name] === undefined && !declared.some((glob) => matches(glob, name))))(declaredBy(fold));
147
- export function render(fold, regions, shape = '') {
148
- const out = [];
149
- const capsules = capsuleRegions(fold, regions.filter((asked) => REGIONS[asked.name] === undefined), shape);
150
- for (const asked of regions) {
151
- const region = REGIONS[asked.name];
152
- const resolving = AT[asked.name];
153
- const body = resolving !== undefined ? resolving(fold, asked.at) : region !== undefined ? read(region(fold), asked.at) : capsules.get(asked.name) ?? [];
154
- if (body.length)
155
- out.push(...body, '');
156
- }
157
- return `${out.join('\n').replace(/\n+$/, '')}\n`;
158
- }
159
- function read(body, at) {
160
- if (at >= 3 || !body.length)
161
- return body;
162
- const head = body.findIndex((line) => line.startsWith('```'));
163
- if (head < 0)
164
- return at > 1 ? body : body.slice(0, 3);
165
- const lines = body.slice(head + 1, body.lastIndexOf('```'));
166
- const kept = at <= 1 ? lines.slice(0, 1) : lines.map((line) => line.split(' · ').slice(0, at).join(' · '));
167
- return [...body.slice(0, head + 1), ...kept, '```'];
168
- }
169
- export function prerender(fold, views) {
170
- const due = views.filter((view) => 'regions' in view && !(fold.key && keptRender(fold.store, fold.key, view.name) !== undefined));
171
- capsuleViews(fold, due.map((view) => ({ asking: view.regions.filter((asked) => REGIONS[asked.name] === undefined), shape: view.shape })));
172
- }
173
- export function viewOf(fold, view) {
174
- // Native receipts project current file bytes, not only the cached fold's observations.
175
- const live = !view.shape || view.regions.some(asked => asked.name === 'receipts');
176
- const kept = !live && fold.key ? keptRender(fold.store, fold.key, view.name) : undefined;
177
- if (kept !== undefined)
178
- return kept;
179
- const text = render(fold, view.regions, view.shape);
180
- const folder = writerFor(fold.standing, 'fold');
181
- if (!live && fold.key && folder !== undefined)
182
- keepRender(fold.store, folder, fold.key, view.name, fold.epoch, text);
183
- return text;
184
- }
185
- export function renderedOf(fold, view) {
186
- const answers = capsuleAnswers(fold, [{ asking: view.regions.filter((asked) => REGIONS[asked.name] === undefined), shape: view.shape }])[0];
187
- const cone = view.shape ? bytesDigest(fold.store, new TextEncoder().encode(fold.standing.filter((line) => fieldOf(line, 'shape') === view.shape || fieldOf(line, 'needs').split('|').includes(view.shape)).join('\n'))) : '';
188
- const head = cone ? [canonical({ scope: `rendered/${view.name}/cone`, role: 'writes', form: 'alphabet', measure: 'digest', value: cone, at: `place:${view.shape}`, by: 'target' })] : [];
189
- return [...head, ...view.regions.flatMap((asked) => {
190
- const answer = answers?.get(asked.name);
191
- const by = REGIONS[asked.name] !== undefined ? fold.instrument : answer?.by;
192
- if (!by)
193
- return [];
194
- const line = (measure, value) => canonical({ scope: `rendered/${view.name}/${asked.name}`, role: 'writes', form: 'alphabet', measure, value, at: `place:${by}`, by: 'target' });
195
- return [line('digest', by), ...(answer ? [line('pin', `uses/${by}`)] : [])];
196
- })];
197
- }
1
+ var E=Object.defineProperty;var a=(e,n)=>E(e,"name",{value:n,configurable:!0});import{viewInput as N}from"../host/reading-context.js";import{receiptRegion as u}from"./receipts.js";import{releasePolicyLines as S}from"../fold/release-policy.js";import{join as I}from"../host/io.js";import{observeText as w}from"../observe/files.js";import{secondName as d}from"./page.js";import{capsuleAnswers as L,capsuleRegions as M,capsuleViews as A}from"./capsule.js";import{declaredBy as K}from"../observe/regions.js";import{readersBehind as j}from"../fold/observed.js";import{library11_LOCK as T,library11_canonical as $,library11_matches as C}from"../vendor/runtime.js";import{fieldOf as c,foldClaims as D,selfName as l}from"../fold/claims.js";import{keepRender as F,keptRender as y}from"../fold/kept.js";import{bytesDigest as G,signaturesOf as B}from"../fold/digests.js";import{authorityFor as H,rootSigner as P,writerFor as V}from"../fold/signers.js";import{lockLines as f}from"../fold/keys.js";import{appliedIn as W}from"../fold/signed.js";import{ledgerLines as Y}from"../land/ledger.js";import{horizonOf as U,moved as _,shapeLines as z}from"./shape.js";import{rankLines as Z}from"../fold/rank.js";import{differing as q,regionsOf as k}from"../fold/region.js";import{field as v}from"./field.js";import{helpLines as J}from"../cli/names.js";function Q(e,n,t){const r=H(f(n),P(e),B(n).admitted),o=(t??"").replace(/\/$/,"");return(o?W(e,o):[...new Set(r.admitted.flatMap(i=>N("evidence-ledger:"+n+":"+i.id,()=>Y(n,i.id))))]).filter(i=>r.of(i).kind==="admitted")}a(Q,"evidenceLines");const X=a(e=>Q(e.root,e.store,e.under),"evidence"),m=a((e,n)=>n.length?[`## ${e}`,"","```",...n,"```"]:[],"block"),O=a(e=>`${(e/1e3).toFixed(1)} s`,"seconds"),ee=a(e=>{const n=e.costs.length?[...e.costs].sort((i,p)=>i-p)[Math.floor(e.costs.length/2)]??0:0,t=_(e),r=U(e),o=e.observed.filter(i=>c(i,"scope")==="refuse/reader").length,s=e.ceilings;return m("programs",[`PROGRAMS${e.under?` ${e.under}`:""} ${[`${e.claims} claims`,`${e.history.length} history`].join(" \xB7 ")} \xB7 ${e.forks.length+(e.second.verdict==="forks"?1:0)} forks \xB7 ${e.grey.length} grey \xB7 ${e.refused.length} refused \xB7 ${e.vacuous} vacuous \xB7 ${d()} ${e.second.verdict}${e.second.verdict==="agrees"&&!e.second.external?", never disagreed":""} \xB7 store ${e.observed.length} observed${o?` \xB7 ${o} refuse\xB7reader`:""}`+(e.under?` \xB7 ceilings ${s.read} met here \xB7 ${s.short.length} short \xB7 ${s.over.length} over`:` \xB7 ceilings ${s.read}/${s.total} read \xB7 ${s.short.length} short \xB7 ${s.over.length} over \xB7 ${s.unread.length} unread${s.vacuous.length?` \xB7 ${s.vacuous.length} vacuous unread`:""}`)+` \xB7 readings \xB7 no encounters computed \xB7 ${e.effects} \xB7 take ${e.costs.length?O(e.costs[e.costs.length-1]??0):"none"} last`+(e.costs.length>1?` \xB7 ${O(n)} median of ${e.costs.length}`:""),...z(e),...Z(e),`OPEN ${(e.open??[]).length} unresolved decisions`,`MOVED ${t.observation+t.signature} verdicts turned \xB7 ${t.observation} by observation \xB7 ${t.signature} by signature`,`HORIZON ${r.unread} of ${r.sources} sources no reader reaches`,...S(e.release),...ne(e)])},"programs");function ne(e){const n=e.signed,t=new Map;for(const s of e.standing){const i=/^keys\/([^/]+)$/.exec(c(s,"scope"))?.[1];i&&c(s,"measure")==="coverage"&&t.set(i,c(s,"value"))}const r=e.second.verdict==="agrees"?"green":e.second.verdict==="forks"?"fork":"grey",o=e.second.verdict==="agrees"?0:e.claims;return[...[...t].sort().map(([s,i])=>`KEY keys/${s} \xB7 floor ${n.get(s)??0} lines signed \xB7 ceiling ${i} \xB7 ${n.get(s)?r:"grey"}`),`LOCK ${e.under??""}${T} \xB7 floor ${e.landed} sources vouched \xB7 ceiling ${e.lock} lines \xB7 ${r}`,`BLIND ${o} lines stand on one origin \xB7 second head ${e.second.verdict==="stale"&&e.second.epoch?`agreed at epoch ${e.second.epoch}, elsewhere`:e.second.verdict}`]}a(ne,"asCells");const b=new WeakMap,je=a((e,n)=>{b.set(e,n)},"askWhy"),se=a(e=>{const n=b.get(e);if(n){const i=e.standing.filter(p=>c(p,"needs").split("|").includes(n)||c(p,"shape")===n);return m("why",i.length?i.map(p=>`WHY ${c(p,"scope")} \xB7 ${c(p,"at")} \xB7 ${c(p,"value")}`):[`OPEN ${n}`])}const t=e.standing.find(i=>c(i,"scope")===`${e.under??""}view/why`||c(i,"scope")==="view/why"),r=c(t??"","shape")||c(t??"","needs").split("|").find(Boolean)||"",o=r?w(I(e.root,e.under??"",r)):void 0;if(o===void 0)return[];const s=o.replace(/^---\n[\s\S]*?\n---\n/,"").split(`
2
+
3
+ `).map(i=>i.trim()).filter(i=>i&&!i.startsWith("#")).map(i=>i.split(`
4
+ `).join(" "));return s.length?["## why","",...s.flatMap(i=>[i,""])].slice(0,-1):[]},"why"),te=a(e=>{const n=e.standing.filter(t=>/^keys\/[^/]+$/.test(c(t,"scope"))&&c(t,"measure")==="class").map(t=>`KEY ${c(t,"scope").slice(5)} \xB7 ${c(t,"value")}`);return m("sign",[`SIGN write the lines you propose as by=target, then: ${l()} sign <file> --key-file <pem of an admitted key>`,"SIGN a line is never edited in place: withdraw the old content in the same batch, or the fold forks",...n])},"sign"),re=a(e=>m("take",[`TAKE ${l()} land <batch> --key-file <pem> \xB7 the land that takes a demand pays it by moving what it asks about`,...e.missing.map(n=>`TAKE ${c(n,"scope")} \xB7 open: sign it again in a batch`)]),"take"),ie=a(e=>m("red",[...j().map(n=>`GREY reading: ${n.module} \xB7 ${n.places} places \xB7 lands behind this fold`),...e.ceilings.short.map(n=>`SHORT ${n}`),...e.ceilings.over.map(n=>`OVER ${n}`),...e.missing.map(n=>`MISSING ${c(n,"scope")}`),...e.orphans.map(n=>`ORPHAN ${n}`),...e.under?[]:[...e.ceilings.unread.length?[`UNREAD ${e.ceilings.unread.join(" \xB7 ")}`]:[],...e.ceilings.vacuous.length?[`VACUOUS ${e.ceilings.vacuous.join(" \xB7 ")}`]:[],...e.refused.map(n=>`REFUSED ${c(n,"scope")}`)]]),"red"),oe=a(e=>m("forks",[...e.forks.map(n=>`FORK ${n.key}`),...e.second.verdict==="forks"?[`FORK ${d()}/target \xB7 the second head finds other lines standing`]:[]]),"forks"),ae=a(e=>{const n=f(e.store),t=a(o=>D(n.filter(s=>(Number(c(s,"epoch"))||0)<=o)).standing,"at"),r=q(k(t(e.epoch-1),t(e.epoch-1),[]),k(t(e.epoch),t(e.epoch),[]));return m("history",[...e.history.map(o=>`HISTORY ${c(o,"scope")} \xB7 ${c(o,"at")}`),...r.regions.map(o=>`MOVED ${o||"."} \xB7 at epoch ${e.epoch} \xB7 ${r.compared} regions compared`)])},"history"),h={receipts:a(e=>u(e,1),"receipts"),help:a(()=>J(),"help"),lines:a(e=>e.standing,"lines"),evidence:X,red:ie,forks:oe,programs:ee,why:se,sign:te,take:re,history:ae,field:a(e=>v(e,3),"field")},ce={field:v,receipts:u},Te=a((e,n)=>(t=>n.regions.map(r=>r.name).filter(r=>h[r]===void 0&&!t.some(o=>C(o,r))))(K(e)),"unrendered");function pe(e,n,t=""){const r=[],o=M(e,n.filter(s=>h[s.name]===void 0),t);for(const s of n){const i=h[s.name],p=ce[s.name],g=p!==void 0?p(e,s.at):i!==void 0?me(i(e),s.at):o.get(s.name)??[];g.length&&r.push(...g,"")}return`${r.join(`
5
+ `).replace(/\n+$/,"")}
6
+ `}a(pe,"render");function me(e,n){if(n>=3||!e.length)return e;const t=e.findIndex(s=>s.startsWith("```"));if(t<0)return n>1?e:e.slice(0,3);const r=e.slice(t+1,e.lastIndexOf("```")),o=n<=1?r.slice(0,1):r.map(s=>s.split(" \xB7 ").slice(0,n).join(" \xB7 "));return[...e.slice(0,t+1),...o,"```"]}a(me,"read");function Ce(e,n){const t=n.filter(r=>"regions"in r&&!(e.key&&y(e.store,e.key,r.name)!==void 0));A(e,t.map(r=>({asking:r.regions.filter(o=>h[o.name]===void 0),shape:r.shape})))}a(Ce,"prerender");function De(e,n){const t=!n.shape||n.regions.some(i=>i.name==="receipts"),r=!t&&e.key?y(e.store,e.key,n.name):void 0;if(r!==void 0)return r;const o=pe(e,n.regions,n.shape),s=V(e.standing,"fold");return!t&&e.key&&s!==void 0&&F(e.store,s,e.key,n.name,e.epoch,o),o}a(De,"viewOf");function Fe(e,n){const t=L(e,[{asking:n.regions.filter(s=>h[s.name]===void 0),shape:n.shape}])[0],r=n.shape?G(e.store,new TextEncoder().encode(e.standing.filter(s=>c(s,"shape")===n.shape||c(s,"needs").split("|").includes(n.shape)).join(`
7
+ `))):"";return[...r?[$({scope:`rendered/${n.name}/cone`,role:"writes",form:"alphabet",measure:"digest",value:r,at:`place:${n.shape}`,by:"target"})]:[],...n.regions.flatMap(s=>{const i=t?.get(s.name),p=h[s.name]!==void 0?e.instrument:i?.by;if(!p)return[];const g=a((R,x)=>$({scope:`rendered/${n.name}/${s.name}`,role:"writes",form:"alphabet",measure:R,value:x,at:`place:${p}`,by:"target"}),"line");return[g("digest",p),...i?[g("pin",`uses/${p}`)]:[]]})]}a(Fe,"renderedOf");export{je as askWhy,Q as evidenceLines,Ce as prerender,pe as render,Fe as renderedOf,Te as unrendered,De as viewOf};
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lapxo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.