@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
@@ -0,0 +1,2 @@
1
+ var x=Object.defineProperty;var c=(t,i)=>x(t,"name",{value:i,configurable:!0});import{library2_readingIdentityBytes as w,library2_readingReceiptBytes as U}from"../vendor/runtime.js";import{encodeUTF8 as B}from"./encoding.js";import{invokeByteComputationPort as q,invokeFrameSigningPort as v,invokeSignatureVerificationPort as p}from"./ports.js";import{BoundRefusal as A}from"../host/refusals.js";const a=c(t=>{throw new A("computation/"+t,"REFUSE\xB7computation/"+t)},"refuse"),f=c(t=>{(typeof t!="string"||!/^sha256:[a-f0-9]{64}$/.test(t))&&a("context")},"pin"),d=c(async(t,i)=>{const n=await t(new Uint8Array(i));return f(n),n},"hash"),b="computation/request";async function k(t,i,n){(!t||!t.reading||!(i instanceof Uint8Array)||typeof t.keyId!="string"||!t.keyId||typeof t.algorithm!="string"||!t.algorithm)&&a("context");let e;try{e=structuredClone(t)}catch{return a("context")}f(e.contract),f(e.numericPolicy);try{w(e.reading)}catch{return a("context")}for(const r of[e.reading.instrument,e.reading.implementation,e.reading.policy])f(r);e.reading.inputs.some(([r])=>r===b)&&a("context");const s={...e.reading,inputs:[...e.reading.inputs,[b,await d(n,i)]]};let o;try{o=w(s)}catch{return a("context")}const g=JSON.parse(new TextDecoder().decode(o)),y=await d(n,B(JSON.stringify(["computation-request@1",e.contract,e.numericPolicy,g[3],g[4],g[5]])));return{held:e,question:y,reading:await d(n,o)}}c(k,"prepare");function m(t){return JSON.stringify([t.profile,t.question,t.reading,t.origin,t.result,t.commitment,t.keyId,t.algorithm])+`
2
+ `}c(m,"frame");async function I(t,i,n){const e=await d(n,i);return{profile:"bound-computation@1",question:t.question,reading:t.reading,origin:t.held.reading.implementation,result:e,commitment:await d(n,U(t.reading,e)),keyId:t.held.keyId,algorithm:t.held.algorithm}}c(I,"statement");async function R(t,i,n,e,s){(!(i instanceof Uint8Array)||i.byteLength>e.maxBytes)&&a("budget");const o=new Uint8Array(i),g=await k(t,o,n.digest),y=await q(o,n.evaluate,e,s),r=await I(g,y,n.digest),u=m(r),h=await v({bytes:[u],keyId:r.keyId,algorithm:r.algorithm},n.sign,e,s),l=h[0];return await p(u,l,r.algorithm,n.verify,e,s)||a("signature"),{statement:Object.freeze({...r,signature:l.signature}),output:y}}c(R,"executeComputation");async function z(t,i,n,e,s,o,g){(!(i instanceof Uint8Array)||!(n instanceof Uint8Array)||i.byteLength>o.maxBytes||n.byteLength>o.maxBytes)&&a("budget"),(!e||Object.keys(e).sort().join(",")!=="algorithm,commitment,keyId,origin,profile,question,reading,result,signature"||typeof e.signature!="string")&&a("signature");const y=await k(t,new Uint8Array(i),s.digest),r=await I(y,new Uint8Array(n),s.digest),{signature:u,...h}=e;return m(h)!==m(r)&&a("context"),await p(m(r),{keyId:r.keyId,signature:u},r.algorithm,s.verify,o,g)||a("signature"),Object.freeze({...r,signature:u})}c(z,"verifyComputation");export{R as executeComputation,z as verifyComputation};
@@ -0,0 +1,4 @@
1
+ var j=Object.defineProperty;var f=(t,c)=>j(t,"name",{value:c,configurable:!0});import{encodeUTF8 as u}from"./encoding.js";import{invokeByteComputationPort as q}from"./ports.js";import{BoundRefusal as d}from"../host/refusals.js";const o=f(t=>{throw new d("conformance/"+t,"REFUSE\xB7conformance/"+t)},"fail"),A=f(t=>{(typeof t!="string"||!/^sha256:[a-f0-9]{64}$/.test(t))&&o("context")},"pin"),C=f((t,c)=>t.length===c.length&&t.every((l,i)=>l===c[i]),"equal"),m=f(t=>Array.isArray(t)&&t.every(c=>typeof c=="string"&&c.length>0)&&new Set(t).size===t.length,"unique");async function k(t,c,l,i,p){(!(t instanceof Uint8Array)||!i||!Number.isSafeInteger(i.maxCases)||i.maxCases<1||t.byteLength>i.maxBytes)&&o("budget"),(!c||typeof c!="object")&&o("context");let n;try{n=structuredClone(c)}catch{return o("context")}for(const e of[n.suite,n.implementation,n.contract])A(e);(!m(n.rules)||!m(n.refusals))&&o("coverage");const y=f(async e=>{const r=await l.digest(new Uint8Array(e));return A(r),r},"hash"),w=new Uint8Array(t);await y(w)!==n.suite&&o("integrity");let a;try{a=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(w))}catch{return o("suite")}(!a||Object.keys(a).sort().join(",")!=="cases,contract,profile"||a.profile!=="bound-conformance@1"||a.contract!==n.contract||!Array.isArray(a.cases)||!a.cases.length||a.cases.length>i.maxCases)&&o("suite");const v=new Set,x=new Set,S=[...n.rules.map(e=>"rule/"+e),...n.refusals.map(e=>"refusal/"+e)];for(const e of a.cases){(!e||Object.keys(e).sort().join(",")!=="covers,expected,id,request"||typeof e.id!="string"||!e.id||v.has(e.id)||!m(e.covers)||!e.covers.length||typeof e.request!="string"||typeof e.expected!="string")&&o("suite"),v.add(e.id);let r;try{r=JSON.parse(e.expected)}catch{return o("suite")}if(!Array.isArray(r)||r.length!==2||!["fact","refuse"].includes(r[0]))return o("suite");for(const s of e.covers)S.includes(s)||o("coverage"),s.startsWith("refusal/")&&(r[0]!=="refuse"||r[1]!==s.slice(8))&&o("coverage"),x.add(s)}S.some(e=>!x.has(e))&&o("coverage");const h=[];for(const e of a.cases){if(p?.aborted)throw new d("host-port/cancelled","REFUSE\xB7host-port/cancelled");let r;try{r=await q(u(e.request),async(s,O)=>{try{return await l.evaluate(s,O)}catch(g){if(g instanceof d)return u(JSON.stringify(["refuse",g.code])+`
2
+ `);throw g}},i,p)}catch(s){if(p?.aborted||s instanceof d&&["host-port/cancelled","host-port/timeout","host-port/budget"].includes(s.code))throw s;r=u(JSON.stringify(["refuse",s instanceof d?s.code:"operation/failed"])+`
3
+ `)}h.push({id:e.id,met:C(r,u(e.expected)),response:await y(r)})}const b={profile:"bound-conformance-report@1",suite:n.suite,implementation:n.implementation,contract:n.contract,met:h.every(e=>e.met),cases:h};return Object.freeze({...b,commitment:await y(u(JSON.stringify(b)+`
4
+ `))})}f(k,"runConformance");export{k as runConformance};
@@ -1,2 +1 @@
1
- /** Shared, host-free UTF-8 encoding for protocol byte budgets. */
2
- export const encodeUTF8 = (text) => new TextEncoder().encode(text);
1
+ var c=Object.defineProperty;var o=(e,t)=>c(e,"name",{value:t,configurable:!0});const n=o(e=>new TextEncoder().encode(e),"encodeUTF8"),r=o(e=>new TextDecoder("utf-8",{fatal:!0}).decode(e),"decodeUTF8");export{r as decodeUTF8,n as encodeUTF8};
@@ -1,13 +1 @@
1
- /**
2
- * Pure projection of already admitted typed-object records.
3
- * Input is the effective history already admitted by the host, preserving cell
4
- * declarations before uses within each epoch and a deterministic selected context.
5
- * This API performs no admission,
6
- * signature verification, storage, transport, clock selection or execution.
7
- * Object operations delegate to the existing Obligations implementation.
8
- */
9
- export { objectFold } from './object.ts';
10
- export type { ObjectReading } from './object.ts';
11
- export type { ObjectRecord, ObjectContext } from '@lapxo/topos/wire';
12
- export { readContent, retainContent, invokeSigningPort } from './ports.ts';
13
- export type { PortLimits, ContentReadPort, PersistencePort, DigestPort, SigningPort, SigningLot, SignatureRecord } from './ports.ts';
1
+ export {public1_ByteComputationPort as ByteComputationPort,public1_ComputationContext as ComputationContext,public1_ComputationStatement as ComputationStatement,public1_ConformanceCase as ConformanceCase,public1_ConformanceReceiver as ConformanceReceiver,public1_ConformanceReport as ConformanceReport,public1_ConformanceSuite as ConformanceSuite,public1_ContentReadPort as ContentReadPort,public1_DigestPort as DigestPort,public1_ObjectContext as ObjectContext,public1_ObjectReading as ObjectReading,public1_ObjectRecord as ObjectRecord,public1_PersistencePort as PersistencePort,public1_PortLimits as PortLimits,public1_RefusalEntry as RefusalEntry,public1_SignatureRecord as SignatureRecord,public1_SignatureVerificationPort as SignatureVerificationPort,public1_SigningLot as SigningLot,public1_SigningPort as SigningPort,public1_executeComputation as executeComputation,public1_invokeSigningPort as invokeSigningPort,public1_objectFold as objectFold,public1_objectFoldBytes as objectFoldBytes,public1_readContent as readContent,public1_readRefusalCatalog as readRefusalCatalog,public1_retainContent as retainContent,public1_runConformance as runConformance,public1_verifyComputation as verifyComputation} from "../public-types.js";
@@ -1,11 +1,2 @@
1
- /**
2
- * Pure projection of already admitted typed-object records.
3
- * Input is the effective history already admitted by the host, preserving cell
4
- * declarations before uses within each epoch and a deterministic selected context.
5
- * This API performs no admission,
6
- * signature verification, storage, transport, clock selection or execution.
7
- * Object operations delegate to the existing Obligations implementation.
8
- */
9
- export { objectFold } from "./object.js";
10
- // Optional host operations are explicit and injected; objectFold itself never invokes them.
11
- export { readContent, retainContent, invokeSigningPort } from "./ports.js";
1
+ var a=Object.defineProperty;var i=(n,t)=>a(n,"name",{value:t,configurable:!0});import{objectFold as b}from"./object.js";import{readContent as C,retainContent as E,invokeSigningPort as h}from"./ports.js";import{executeComputation as S,verifyComputation as R}from"./computation.js";import{runConformance as v}from"./conformance.js";import{readRefusalCatalog as O}from"../host/refusals.js";import{library11_validateObjectContext as c}from"../vendor/runtime.js";import{objectFold as f}from"./object.js";import{BoundRefusal as o}from"../host/refusals.js";import{encodeUTF8 as p,decodeUTF8 as u}from"./encoding.js";function x(n,t){let e;try{e=JSON.parse(u(n))}catch{throw new o("engine/input","REFUSE\xB7engine/input")}if(!Array.isArray(e)||e.length!==2||e[0]!=="bound-object-request@1"||!Array.isArray(e[1]))throw new o("engine/input","REFUSE\xB7engine/input");let r;try{r=c(e[1],t)}catch{throw new o("engine/context","REFUSE\xB7engine/context")}if(r.kind!=="fact")throw new o("engine/context","REFUSE\xB7engine/context");return p(JSON.stringify(["fact",f(r.value,t)])+`
2
+ `)}i(x,"objectFoldBytes");export{S as executeComputation,h as invokeSigningPort,b as objectFold,x as objectFoldBytes,C as readContent,O as readRefusalCatalog,E as retainContent,v as runConformance,R as verifyComputation};
@@ -1,38 +1 @@
1
- import { cell, sign, join, require as requireFloor, observe, mark, parts, state, live, restOf } from '@lapxo/obligations/views/field';
2
- import { restCoordinates } from '@lapxo/topos/wire';
3
- export function objectFold(records, context) {
4
- let world = new Map();
5
- const definitions = new Map(records.filter(r => r.record === 'cell').map(r => [r.fields.scope, r]));
6
- const codecs = new Map([...definitions].map(([name, c]) => [name, context.resolve(c)]));
7
- const ids = new Map(records.map(r => [r.fields.id, r]));
8
- for (const record of [...records].sort((a, b) => Number(a.fields.epoch) - Number(b.fields.epoch))) {
9
- const f = record.fields, name = f.scope, at = Number(f.epoch);
10
- if (record.record === 'cell') {
11
- world = new Map([...world, [name, cell(name, at, [], restCoordinates(f.restsOn))]]);
12
- continue;
13
- }
14
- const codec = codecs.get(name), L = codec.form.lattice(codec.params), held = world.get(name);
15
- if (record.record === 'claim') {
16
- const target = f.sign === '-1' ? ids.get(f.takes).fields : f;
17
- const changed = observe(held, { id: f.id, at, origin: target.origin, span: codec.form.parse(codec.params, target.value), ...(f.takes ? { takes: f.takes } : {}) }, f.sign === '-1' ? -1 : 1);
18
- const seen = [...changed.seen];
19
- seen[seen.length - 1] = { ...seen.at(-1), id: f.id };
20
- world = new Map([...world, [name, { ...changed, seen }]]);
21
- }
22
- else if (f.sign === '-1') {
23
- const target = ids.get(f.takes).fields;
24
- world = new Map([...world, [name, { ...held, marks: [...(held.marks ?? []), mark({ id: f.id, at, takes: f.takes, pole: target.pole, reach: 'local', span: codec.form.parse(codec.params, target.value) })] }]]);
25
- }
26
- else if (f.widens !== undefined) {
27
- const changed = join(L, held, codec.form.parse(codec.params, f.value), f.widens, at);
28
- const marks = [...(changed.marks ?? [])];
29
- marks[marks.length - 1] = { ...marks.at(-1), id: f.id };
30
- world = new Map([...world, [name, { ...changed, marks }]]);
31
- }
32
- else {
33
- const span = codec.form.parse(codec.params, f.value);
34
- world = f.pole === 'floor' ? requireFloor(L, world, name, span, { id: f.id, at }) : sign(L, world, name, span, { id: f.id, at });
35
- }
36
- }
37
- return [...world].map(([name, c]) => { const codec = codecs.get(name), L = codec.form.lattice(codec.params); return { cell: name, state: state(L, c, world), parts: parts(L, c, world), rest: restOf(c, world), ownMarks: live(c.marks ?? []).map(m => m.id), ownClaims: live(c.seen).map(s => ({ id: s.id, origin: s.origin })), marks: live(c.marks ?? []), claims: live(c.seen) }; });
38
- }
1
+ var w=Object.defineProperty;var k=(l,m)=>w(l,"name",{value:m,configurable:!0});import{library14_cell as y,library14_sign as _,library14_join as h,library14_require as v,library14_observe as M,library14_mark as j,library14_parts as C,library14_state as N,library14_live as c,library14_restOf as O}from"../vendor/runtime.js";import{library11_restCoordinates as q}from"../vendor/runtime.js";function z(l,m){let a=new Map;const u=new Map(l.filter(s=>s.record==="cell").map(s=>[s.fields.scope,s])),g=new Map([...u].map(([s,e])=>[s,m.resolve(e)])),b=new Map(l.map(s=>[s.fields.id,s]));for(const s of[...l].sort((e,i)=>Number(e.fields.epoch)-Number(i.fields.epoch))){const e=s.fields,i=e.scope,o=Number(e.epoch);if(s.record==="cell"){a=new Map([...a,[i,y(i,o,[],q(e.restsOn))]]);continue}const r=g.get(i),f=r.form.lattice(r.params),d=a.get(i);if(s.record==="claim"){const t=e.sign==="-1"?b.get(e.takes).fields:e,n=M(d,{id:e.id,at:o,origin:t.origin,span:r.form.parse(r.params,t.value),...e.takes?{takes:e.takes}:{}},e.sign==="-1"?-1:1),p=[...n.seen];p[p.length-1]={...p.at(-1),id:e.id},a=new Map([...a,[i,{...n,seen:p}]])}else if(e.sign==="-1"){const t=b.get(e.takes).fields;a=new Map([...a,[i,{...d,marks:[...d.marks??[],j({id:e.id,at:o,takes:e.takes,pole:t.pole,reach:"local",span:r.form.parse(r.params,t.value)})]}]])}else if(e.widens!==void 0){const t=h(f,d,r.form.parse(r.params,e.value),e.widens,o),n=[...t.marks??[]];n[n.length-1]={...n.at(-1),id:e.id},a=new Map([...a,[i,{...t,marks:n}]])}else{const t=r.form.parse(r.params,e.value);a=e.pole==="floor"?v(f,a,i,t,{id:e.id,at:o}):_(f,a,i,t,{id:e.id,at:o})}}return[...a].map(([s,e])=>{const i=g.get(s),o=i.form.lattice(i.params);return{cell:s,state:N(o,e,a),parts:C(o,e,a),rest:O(e,a),ownMarks:c(e.marks??[]).map(r=>r.id),ownClaims:c(e.seen).map(r=>({id:r.id,origin:r.origin})),marks:c(e.marks??[]),claims:c(e.seen)}})}k(z,"objectFold");export{z as objectFold};
@@ -1,117 +1,2 @@
1
- import { signerRequestBytes, signerResponseBytes, signerResponseOf } from '@lapxo/topos/wire';
2
- import { BoundRefusal } from "../host/refusals.js";
3
- import { encodeUTF8 as encoded } from "./encoding.js";
4
- class PortFault extends BoundRefusal {
5
- }
6
- const fail = (code) => { throw new PortFault('host-port/' + code, 'REFUSE·host-port/' + code); };
7
- function limitsOf(limits) { if (!limits || !Number.isSafeInteger(limits.timeoutMs) || limits.timeoutMs < 1 || limits.timeoutMs > 2147483647 || !Number.isSafeInteger(limits.maxBytes) || limits.maxBytes < 1)
8
- fail('budget'); }
9
- /** The callback must cooperate with cancellation; JavaScript callbacks are not a sandbox. */
10
- async function bounded(limits, signal, run) {
11
- limitsOf(limits);
12
- if (signal?.aborted)
13
- fail('cancelled');
14
- return new Promise((resolve, reject) => {
15
- const controller = new AbortController();
16
- let done = false;
17
- const finish = (code, value) => { if (done)
18
- return; done = true; clearTimeout(timer); signal?.removeEventListener('abort', abort); if (code) {
19
- controller.abort();
20
- reject(new BoundRefusal('host-port/' + code, 'REFUSE·host-port/' + code));
21
- }
22
- else
23
- resolve(value); };
24
- const abort = () => finish('cancelled'), timer = setTimeout(() => finish('timeout'), limits.timeoutMs);
25
- signal?.addEventListener('abort', abort, { once: true });
26
- if (signal?.aborted) {
27
- abort();
28
- return;
29
- }
30
- Promise.resolve().then(() => { if (done)
31
- fail('cancelled'); return run(controller.signal); }).then(value => finish(undefined, value), error => finish(error instanceof PortFault ? error.code.slice('host-port/'.length) : 'failed'));
32
- });
33
- }
34
- function owned(bytes, maxBytes) { if (!(bytes instanceof Uint8Array))
35
- fail('response'); if (bytes.byteLength > maxBytes)
36
- fail('budget'); if (typeof SharedArrayBuffer !== 'undefined' && bytes.buffer instanceof SharedArrayBuffer)
37
- fail('response'); return new Uint8Array(bytes); }
38
- const identity = (digest) => { if (!/^sha256:[a-f0-9]{64}$/.test(digest))
39
- fail('integrity'); };
40
- export async function readContent(source, digest, ports, limits, signal) {
41
- limitsOf(limits);
42
- identity(digest);
43
- return bounded(limits, signal, async (s) => { const bytes = owned(await ports.read(source, digest, s), limits.maxBytes); if (s.aborted)
44
- fail('cancelled'); if (await ports.digestBytes(new Uint8Array(bytes)) !== digest)
45
- fail('integrity'); if (s.aborted)
46
- fail('cancelled'); return bytes; });
47
- }
48
- /** Verify before invoking retention; no operation automatically writes the projected result. */
49
- export async function retainContent(digest, bytes, ports, limits, signal) {
50
- limitsOf(limits);
51
- identity(digest);
52
- if (signal?.aborted)
53
- fail('cancelled');
54
- const copy = owned(bytes, limits.maxBytes);
55
- return bounded(limits, signal, async (s) => { if (await ports.digestBytes(new Uint8Array(copy)) !== digest)
56
- fail('integrity'); if (s.aborted)
57
- fail('cancelled'); const result = await ports.retain(digest, copy, s); if (result !== undefined)
58
- fail('response'); return Object.freeze({ digest, bytes: copy.byteLength }); });
59
- }
60
- /** Acquire canonical line signatures only. The line protocol is not widened
61
- * for contextual receipt frames. Both operations share bounds and response checks. */
62
- export async function invokeSigningPort(lot, sign, limits, signal) {
63
- validateSigningLot(lot, limits);
64
- let request;
65
- try {
66
- request = signerRequestBytes(lot);
67
- }
68
- catch {
69
- return fail('response');
70
- }
71
- return invokeDeclaredSignatures(lot, request, sign, limits, signal);
72
- }
73
- /** Host-prepared signature frames. This acquires no authority: the contextual
74
- * transaction validates the frame's domain/receiver and verifies every signature.
75
- * A carrier cannot select this operation or supply a signature verifier. */
76
- export async function invokeFrameSigningPort(lot, sign, limits, signal) {
77
- validateSigningLot(lot, limits);
78
- return invokeDeclaredSignatures(lot, JSON.stringify(lot) + '\n', sign, limits, signal);
79
- }
80
- function validateSigningLot(lot, limits) {
81
- limitsOf(limits);
82
- if (!lot || !Array.isArray(lot.bytes) || !lot.bytes.length || typeof lot.keyId !== 'string' || !lot.keyId || typeof lot.algorithm !== 'string' || !lot.algorithm)
83
- fail('budget');
84
- let size = 0;
85
- for (const bytes of lot.bytes) {
86
- if (typeof bytes !== 'string' || bytes.length > limits.maxBytes - size)
87
- fail('budget');
88
- size += encoded(bytes).length + 1;
89
- if (size > limits.maxBytes)
90
- fail('budget');
91
- }
92
- }
93
- function invokeDeclaredSignatures(lot, request, sign, limits, signal) {
94
- if (encoded(request).length > limits.maxBytes)
95
- fail('budget');
96
- const input = Object.freeze({ ...lot, bytes: Object.freeze([...lot.bytes]) });
97
- return bounded(limits, signal, async (s) => {
98
- const records = await sign(input, s);
99
- if (!Array.isArray(records) || records.length !== lot.bytes.length || records.some(r => !r || typeof r.signature !== 'string' || r.signature.length > limits.maxBytes))
100
- fail('response');
101
- let response;
102
- try {
103
- response = signerResponseBytes(records);
104
- }
105
- catch {
106
- return fail('response');
107
- }
108
- if (encoded(response).length > limits.maxBytes)
109
- fail('budget');
110
- try {
111
- return Object.freeze(signerResponseOf(response, lot).map(record => Object.freeze({ ...record })));
112
- }
113
- catch {
114
- return fail('response');
115
- }
116
- });
117
- }
1
+ var v=Object.defineProperty;var s=(e,t)=>v(e,"name",{value:t,configurable:!0});import{library11_signerRequestBytes as A,library11_signerResponseBytes as O,library11_signerResponseOf as R}from"../vendor/runtime.js";import{BoundRefusal as B}from"../host/refusals.js";import{encodeUTF8 as b}from"./encoding.js";function j(e,t,n,r){g(n);const a=h(e,n.maxBytes);return p(n,r,async i=>h(await t(a,i),n.maxBytes))}s(j,"invokeByteComputationPort");function E(e,t,n,r,a,i){return g(a),b(e).length+b(t.signature).length>a.maxBytes&&o("budget"),p(a,i,async f=>{const c=await r(e,Object.freeze({...t}),n,f);return typeof c!="boolean"&&o("response"),c})}s(E,"invokeSignatureVerificationPort");class x extends B{static{s(this,"PortFault")}}const o=s(e=>{throw new x("host-port/"+e,"REFUSE\xB7host-port/"+e)},"fail");function g(e){(!e||!Number.isSafeInteger(e.timeoutMs)||e.timeoutMs<1||e.timeoutMs>2147483647||!Number.isSafeInteger(e.maxBytes)||e.maxBytes<1)&&o("budget")}s(g,"limitsOf");async function p(e,t,n){return g(e),t?.aborted&&o("cancelled"),new Promise((r,a)=>{const i=new AbortController;let f=!1;const c=s((u,S)=>{f||(f=!0,clearTimeout(d),t?.removeEventListener("abort",y),u?(i.abort(),a(new B("host-port/"+u,"REFUSE\xB7host-port/"+u))):r(S))},"finish"),y=s(()=>c("cancelled"),"abort"),d=setTimeout(()=>c("timeout"),e.timeoutMs);if(t?.addEventListener("abort",y,{once:!0}),t?.aborted){y();return}Promise.resolve().then(()=>(f&&o("cancelled"),n(i.signal))).then(u=>c(void 0,u),u=>c(u instanceof x?u.code.slice(10):"failed"))})}s(p,"bounded");function h(e,t){return e instanceof Uint8Array||o("response"),e.byteLength>t&&o("budget"),typeof SharedArrayBuffer<"u"&&e.buffer instanceof SharedArrayBuffer&&o("response"),new Uint8Array(e)}s(h,"owned");const l=s(e=>{/^sha256:[a-f0-9]{64}$/.test(e)||o("integrity")},"identity");async function F(e,t,n,r,a){return g(r),l(t),p(r,a,async i=>{const f=h(await n.read(e,t,i),r.maxBytes);return i.aborted&&o("cancelled"),await n.digestBytes(new Uint8Array(f))!==t&&o("integrity"),i.aborted&&o("cancelled"),f})}s(F,"readContent");async function L(e,t,n,r,a){g(r),l(e),a?.aborted&&o("cancelled");const i=h(t,r.maxBytes);return p(r,a,async f=>(await n.digestBytes(new Uint8Array(i))!==e&&o("integrity"),f.aborted&&o("cancelled"),await n.retain(e,i,f)!==void 0&&o("response"),Object.freeze({digest:e,bytes:i.byteLength})))}s(L,"retainContent");async function C(e,t,n,r){m(e,n);let a;try{a=A(e)}catch{return o("response")}return w(e,a,t,n,r)}s(C,"invokeSigningPort");async function I(e,t,n,r){return m(e,n),w(e,JSON.stringify(e)+`
2
+ `,t,n,r)}s(I,"invokeFrameSigningPort");function m(e,t){g(t),(!e||!Array.isArray(e.bytes)||!e.bytes.length||typeof e.keyId!="string"||!e.keyId||typeof e.algorithm!="string"||!e.algorithm)&&o("budget");let n=0;for(const r of e.bytes)(typeof r!="string"||r.length>t.maxBytes-n)&&o("budget"),n+=b(r).length+1,n>t.maxBytes&&o("budget")}s(m,"validateSigningLot");function w(e,t,n,r,a){b(t).length>r.maxBytes&&o("budget");const i=Object.freeze({...e,bytes:Object.freeze([...e.bytes])});return p(r,a,async f=>{const c=await n(i,f);(!Array.isArray(c)||c.length!==e.bytes.length||c.some(d=>!d||typeof d.signature!="string"||d.signature.length>r.maxBytes))&&o("response");let y;try{y=O(c)}catch{return o("response")}b(y).length>r.maxBytes&&o("budget");try{return Object.freeze(R(y,e).map(d=>Object.freeze({...d})))}catch{return o("response")}})}s(w,"invokeDeclaredSignatures");export{j as invokeByteComputationPort,I as invokeFrameSigningPort,E as invokeSignatureVerificationPort,C as invokeSigningPort,F as readContent,L as retainContent};
@@ -1,17 +1 @@
1
- import { bootstrapAnchor } from "./bootstrap-anchor.js";
2
- import { rootLedgerLines, storeOf } from "../land/ledger.js";
3
- import { fieldOf, isConfig } from "./claims.js";
4
- /** Local admission history only. Foreign ingress is evidence, never coverage.
5
- * The clock cutoff is meaningful for configuration; object clocks stay intact. */
6
- export function admissionHistoryAt(root, epoch) {
7
- const store = storeOf(root);
8
- return [...new Set(rootLedgerLines(store))]
9
- .filter(line => fieldOf(line, 'sig') !== '' && (!isConfig(line) || Number(fieldOf(line, 'epoch')) <= epoch));
10
- }
11
- /** The original local bootstrap, never today's key selection. */
12
- export function admissionAnchor(root) {
13
- const anchor = bootstrapAnchor(root);
14
- if (!anchor)
15
- throw Error('REFUSE·act historical admission requires one bootstrap anchor');
16
- return { id: anchor.id, keyClass: 'authorize', publicKey: anchor.publicKey, coverage: anchor.coverage, depth: { lo: 1, hi: 16 }, admittedBy: [] };
17
- }
1
+ var n=Object.defineProperty;var i=(r,o)=>n(r,"name",{value:o,configurable:!0});import{bootstrapAnchor as c}from"./bootstrap-anchor.js";import{rootLedgerLines as a,storeOf as f}from"../land/ledger.js";import{fieldOf as e,isConfig as m}from"./claims.js";function b(r,o){const s=f(r);return[...new Set(a(s))].filter(t=>e(t,"sig")!==""&&(!m(t)||Number(e(t,"epoch"))<=o))}i(b,"admissionHistoryAt");function g(r){const o=c(r);if(!o)throw Error("REFUSE\xB7act historical admission requires one bootstrap anchor");return{id:o.id,keyClass:"authorize",publicKey:o.publicKey,coverage:o.coverage,depth:{lo:1,hi:16},admittedBy:[]}}i(g,"admissionAnchor");export{g as admissionAnchor,b as admissionHistoryAt};
@@ -1,28 +1 @@
1
- import { join } from 'node:path';
2
- import { existsSync, readFileSync, readdirSync } from 'node:fs';
3
- import { storeOf } from "../land/ledger.js";
4
- /** Read the existing place-local root of trust. Names and current claims select no authority. */
5
- export function bootstrapAnchor(root) {
6
- const store = storeOf(root);
7
- const files = existsSync(store) ? readdirSync(store).filter(name => name.endsWith('.keys')).sort() : [];
8
- if (!files.length)
9
- return undefined;
10
- const candidates = files.map(name => {
11
- let keys;
12
- try {
13
- keys = JSON.parse(readFileSync(join(store, name), 'utf8'));
14
- }
15
- catch {
16
- throw Error('REFUSE·act bootstrap anchor is unreadable');
17
- }
18
- const anchors = Object.values(keys ?? {}), anchor = anchors[0];
19
- if (anchors.length !== 1 || !anchor || typeof anchor.id !== 'string' || !anchor.id || typeof anchor.publicKey !== 'string' || !anchor.publicKey || !Array.isArray(anchor.coverage) || !anchor.coverage.length || anchor.coverage.some(scope => typeof scope !== 'string' || !scope))
20
- throw Error('REFUSE·act historical admission requires one bootstrap anchor');
21
- return anchor;
22
- });
23
- const identities = new Set(candidates.map(anchor => JSON.stringify([anchor.id, anchor.publicKey, [...new Set(anchor.coverage)].sort()])));
24
- if (identities.size !== 1)
25
- throw Error('REFUSE·act conflicting bootstrap anchors');
26
- const anchor = candidates[0];
27
- return { id: anchor.id, publicKey: anchor.publicKey, coverage: anchor.coverage };
28
- }
1
+ var y=Object.defineProperty;var f=(o,e)=>y(o,"name",{value:e,configurable:!0});import{viewInput as d}from"../host/reading-context.js";import{join as l}from"node:path";import{existsSync as h,readFileSync as u,readdirSync as g}from"node:fs";import{storeOf as b}from"../land/ledger.js";function F(o){const e=b(o),n=d("anchor-files:"+e,()=>h(e)?g(e).filter(t=>t.endsWith(".keys")).sort():[]);if(!n.length)return;const s=n.map(t=>{let c;try{c=JSON.parse(d("anchor:"+l(e,t),()=>u(l(e,t),"utf8")))}catch{throw Error("REFUSE\xB7act bootstrap anchor is unreadable")}const a=Object.values(c??{}),r=a[0];if(a.length!==1||!r||typeof r.id!="string"||!r.id||typeof r.publicKey!="string"||!r.publicKey||!Array.isArray(r.coverage)||!r.coverage.length||r.coverage.some(p=>typeof p!="string"||!p))throw Error("REFUSE\xB7act historical admission requires one bootstrap anchor");return r});if(new Set(s.map(t=>JSON.stringify([t.id,t.publicKey,[...new Set(t.coverage)].sort()]))).size!==1)throw Error("REFUSE\xB7act conflicting bootstrap anchors");const i=s[0];return{id:i.id,publicKey:i.publicKey,coverage:i.coverage}}f(F,"bootstrapAnchor");export{F as bootstrapAnchor};
@@ -1,142 +1 @@
1
- import { point, region, within } from '@lapxo/obligations/field';
2
- import { fieldOf } from "./claims.js";
3
- import { wordOf, wordsOf } from "./wire.js";
4
- import { lockStanding } from "./keys.js";
5
- import { ownLock, ownStore } from "../observe/runner.js";
6
- import { ALPHABETS, idsOf, INTERVALS, spanOf } from '@lapxo/topos/forms';
7
- import { placedReadings } from "./observed.js";
8
- import { combine, matches } from '@lapxo/topos/wire';
9
- function meeting(scope) {
10
- const whole = region(scope);
11
- const steps = scope.split('/');
12
- const cuts = steps.slice(1).map((_, i) => ({ head: region(steps.slice(0, i + 1).join('/')), tail: region(steps.slice(i + 1).join('/')) }));
13
- const globbed = steps.some((step) => step.includes('*') && step !== '*' && step !== '**');
14
- return (reading) => within(reading.asked, whole)
15
- || cuts.some(({ head, tail }) => (within(reading.asked, head) && within(reading.where, tail))
16
- || (within(reading.where, head) && within(reading.asked, tail)))
17
- || (globbed && steps.slice(1).some((_, i) => matches(steps.slice(0, i + 1).join('/'), reading.question) && matches(steps.slice(i + 1).join('/'), reading.where.at.join('/'))));
18
- }
19
- export const answersElsewhere = (ceiling, own, under, places) => {
20
- const measure = fieldOf(ceiling, 'measure');
21
- const step = fieldOf(ceiling, 'scope').split('/')[0] ?? '';
22
- const here = under?.split('/')[0];
23
- return here !== undefined && step !== here && (places?.has(step) ?? false) && (own[measure] ?? (measure === 'count' ? own[fieldOf(ceiling, 'scope')] : undefined)) !== undefined;
24
- };
25
- export function foldCeilings(input) {
26
- const readings = new Map();
27
- for (const got of placedReadings(input.observed)) {
28
- const mine = readings.get(got.measure) ?? [];
29
- mine.push({ question: got.question, measure: got.measure, value: got.value, asked: point(got.question), where: point(got.place) });
30
- readings.set(got.measure, mine);
31
- }
32
- const unreadOf = (standing) => wordsOf(standing, 'states').includes('unread') ? wordOf(standing, 'states', 'unread') : undefined;
33
- const UNREAD = unreadOf(input.standing) ?? unreadOf(ownLock()) ?? unreadOf(lockStanding(ownStore()));
34
- const read = [];
35
- const over = [];
36
- const unmet = [];
37
- const lines = new Map();
38
- for (const one of readings.get('line') ?? []) {
39
- lines.set(`${one.question} ${one.where.at.join('/')}`, new Map(one.value.split('|').filter(Boolean).map((pair) => [pair.slice(0, pair.lastIndexOf(':')), pair.slice(pair.lastIndexOf(':') + 1)])));
40
- }
41
- const said = new Map();
42
- const bound = (ceiling, question, met, at) => {
43
- const scope = fieldOf(ceiling, 'scope');
44
- const want = fieldOf(ceiling, 'value');
45
- const heard = (got) => void said.set(scope, [...(said.get(scope) ?? []), question === scope ? got : `${question} ${got}`]);
46
- if (fieldOf(ceiling, 'form') === 'interval') {
47
- const span = spanOf(want);
48
- if (!span)
49
- return;
50
- const lows = met.map((value) => spanOf(value)?.lo ?? 0);
51
- let total;
52
- try {
53
- total = combine(fieldOf(ceiling, 'measure'), lows);
54
- }
55
- catch {
56
- over.push({ ceiling: scope, question, got: `no combination for ${fieldOf(ceiling, 'measure')}, read ${lows.length} times`, side: 'over' });
57
- return;
58
- }
59
- const at = { lo: total, hi: total };
60
- heard(String(total));
61
- if (!INTERVALS.leq(at, { lo: span.lo, hi: Infinity }))
62
- over.push({ ceiling: scope, question, got: String(total), side: 'short' });
63
- if (!INTERVALS.leq(at, { lo: -Infinity, hi: span.hi }))
64
- over.push({ ceiling: scope, question, got: String(total), side: 'over' });
65
- return;
66
- }
67
- const joined = new Set(met.flatMap((value) => [...idsOf(value).values]));
68
- heard([...joined].sort().join('|') || 'none');
69
- const allowed = idsOf(want);
70
- if (!ALPHABETS.leq({ polarity: 'permit', values: joined }, allowed)) {
71
- const outside = [...joined].filter((id) => allowed.values.has(id) === (allowed.polarity === 'forbid')).sort();
72
- const line = (id) => (at === undefined || lines.get(at)?.get(id) === undefined ? id : `${id}:${lines.get(at).get(id)}`);
73
- over.push({ ceiling: scope, question, got: outside.map(line).join('|'), side: 'over' });
74
- }
75
- };
76
- const own = (measure) => (measure === UNREAD ? undefined : input.own[measure]);
77
- // A coordinate projected into this place is not a narrower question merely
78
- // because its host prefix adds a segment.
79
- const localScope = (scope) => input.under && scope.startsWith(input.under)
80
- ? scope.slice(input.under.length) : scope;
81
- const literal = (scope) => localScope(scope).split('/').filter((step) => !step.includes('*')).length;
82
- const last = [];
83
- for (const ceiling of input.ceilings) {
84
- const measure = fieldOf(ceiling, 'measure');
85
- if (measure === UNREAD) {
86
- last.push(ceiling);
87
- continue;
88
- }
89
- const mine = own(measure) ?? (measure === 'count' ? input.own[fieldOf(ceiling, 'scope')] : undefined);
90
- if (answersElsewhere(ceiling, input.own, input.under, input.places))
91
- continue;
92
- if (mine !== undefined) {
93
- read.push(ceiling);
94
- bound(ceiling, fieldOf(ceiling, 'scope'), [`${mine}..${mine}`]);
95
- continue;
96
- }
97
- const byQuestion = new Map();
98
- const where = new Map();
99
- const meets = meeting(fieldOf(ceiling, 'scope'));
100
- const alone = measure === 'per-file' || fieldOf(ceiling, 'scope').endsWith('/*') || fieldOf(ceiling, 'form') === 'alphabet';
101
- const narrower = spanOf(fieldOf(ceiling, 'value')) ? input.ceilings.filter((other) => fieldOf(other, 'measure') === measure && spanOf(fieldOf(other, 'value')) && literal(fieldOf(other, 'scope')) > literal(fieldOf(ceiling, 'scope'))).map((other) => meeting(fieldOf(other, 'scope'))) : [];
102
- for (const reading of readings.get(measure) ?? []) {
103
- if (!meets(reading) || narrower.some((one) => one(reading)))
104
- continue;
105
- const question = alone ? reading.where.at.join('/') : reading.question;
106
- byQuestion.set(question, [...(byQuestion.get(question) ?? []), reading.value]);
107
- where.set(question, `${reading.question} ${reading.where.at.join('/')}`);
108
- }
109
- if (!byQuestion.size) {
110
- unmet.push(ceiling);
111
- continue;
112
- }
113
- read.push(ceiling);
114
- for (const [question, met] of byQuestion)
115
- bound(ceiling, question, met, where.get(question));
116
- }
117
- for (const ceiling of last) {
118
- read.push(ceiling);
119
- bound(ceiling, fieldOf(ceiling, 'scope'), [`${unmet.length}..${unmet.length}`]);
120
- }
121
- const epochOf = (line) => Number(fieldOf(line, 'epoch')) || 0;
122
- return {
123
- read,
124
- over,
125
- unread: unmet.filter((line) => epochOf(line) > input.epoch - 3),
126
- vacuous: unmet.filter((line) => epochOf(line) <= input.epoch - 3),
127
- readings: said,
128
- };
129
- }
130
- function listed(misses) {
131
- const by = new Map();
132
- for (const o of misses)
133
- by.set(o.ceiling, [...(by.get(o.ceiling) ?? []), o.question === o.ceiling ? o.got : `${o.question}=${o.got}`]);
134
- return [...by].map(([scope, got]) => `${scope} · ${got.length > 4 ? `${got.slice(0, 4).join(' ')} +${got.length - 4}` : got.join(' ')}`);
135
- }
136
- /** One summary for fresh and retained judgments over the same declared bounds. */
137
- export function ceilingSummary(fold, total, shared = new Set()) {
138
- return { read: fold.read.length, total, unread: fold.unread.map(line => fieldOf(line, 'scope')),
139
- vacuous: fold.vacuous.map(line => fieldOf(line, 'scope')),
140
- short: listed(fold.over.filter(one => one.side === 'short' && !shared.has(one.question))),
141
- over: listed(fold.over.filter(one => one.side === 'over')) };
142
- }
1
+ var V=Object.defineProperty;var f=(o,a)=>V(o,"name",{value:a,configurable:!0});import{library12_point as I,library12_region as q,library12_within as $}from"../vendor/runtime.js";import{fieldOf as n}from"./claims.js";import{wordOf as W,wordsOf as z}from"./wire.js";import{lockStanding as C}from"./keys.js";import{ownLock as D,ownStore as Q}from"../observe/runner.js";import{library4_ALPHABETS as U,library4_idsOf as x,library4_INTERVALS as L,library4_spanOf as S}from"../vendor/runtime.js";import{placedReadings as F}from"./observed.js";import{library11_combine as G,library11_matches as N}from"../vendor/runtime.js";function R(o){const a=q(o),s=o.split("/"),r=s.slice(1).map((i,u)=>({head:q(s.slice(0,u+1).join("/")),tail:q(s.slice(u+1).join("/"))})),p=s.some(i=>i.includes("*")&&i!=="*"&&i!=="**");return i=>$(i.asked,a)||r.some(({head:u,tail:h})=>$(i.asked,u)&&$(i.where,h)||$(i.where,u)&&$(i.asked,h))||p&&s.slice(1).some((u,h)=>N(s.slice(0,h+1).join("/"),i.question)&&N(s.slice(h+1).join("/"),i.where.at.join("/")))}f(R,"meeting");const J=f((o,a,s,r)=>{const p=n(o,"measure"),i=n(o,"scope").split("/")[0]??"",u=s?.split("/")[0];return u!==void 0&&i!==u&&(r?.has(i)??!1)&&(a[p]??(p==="count"?a[n(o,"scope")]:void 0))!==void 0},"answersElsewhere");function ie(o){const a=new Map;for(const e of F(o.observed)){const t=a.get(e.measure)??[];t.push({question:e.question,measure:e.measure,value:e.value,asked:I(e.question),where:I(e.place)}),a.set(e.measure,t)}const s=f(e=>z(e,"states").includes("unread")?W(e,"states","unread"):void 0,"unreadOf"),r=s(o.standing)??s(D())??s(C(Q())),p=[],i=[],u=[],h=new Map;for(const e of a.get("line")??[])h.set(`${e.question} ${e.where.at.join("/")}`,new Map(e.value.split("|").filter(Boolean).map(t=>[t.slice(0,t.lastIndexOf(":")),t.slice(t.lastIndexOf(":")+1)])));const O=new Map,_=f((e,t,w,g)=>{const m=n(e,"scope"),y=n(e,"value"),j=f(l=>{O.set(m,[...O.get(m)??[],t===m?l:`${t} ${l}`])},"heard");if(n(e,"form")==="interval"){const l=S(y);if(!l)return;const v=w.map(P=>S(P)?.lo??0);let d;try{d=G(n(e,"measure"),v)}catch{i.push({ceiling:m,question:t,got:`no combination for ${n(e,"measure")}, read ${v.length} times`,side:"over"});return}const E={lo:d,hi:d};j(String(d)),L.leq(E,{lo:l.lo,hi:1/0})||i.push({ceiling:m,question:t,got:String(d),side:"short"}),L.leq(E,{lo:-1/0,hi:l.hi})||i.push({ceiling:m,question:t,got:String(d),side:"over"});return}const b=new Set(w.flatMap(l=>[...x(l).values]));j([...b].sort().join("|")||"none");const c=x(y);if(!U.leq({polarity:"permit",values:b},c)){const l=[...b].filter(d=>c.values.has(d)===(c.polarity==="forbid")).sort(),v=f(d=>g===void 0||h.get(g)?.get(d)===void 0?d:`${d}:${h.get(g).get(d)}`,"line");i.push({ceiling:m,question:t,got:l.map(v).join("|"),side:"over"})}},"bound"),B=f(e=>e===r?void 0:o.own[e],"own"),H=f(e=>o.under&&e.startsWith(o.under)?e.slice(o.under.length):e,"localScope"),M=f(e=>H(e).split("/").filter(t=>!t.includes("*")).length,"literal"),A=[];for(const e of o.ceilings){const t=n(e,"measure");if(t===r){A.push(e);continue}const w=B(t)??(t==="count"?o.own[n(e,"scope")]:void 0);if(J(e,o.own,o.under,o.places))continue;if(w!==void 0){p.push(e),_(e,n(e,"scope"),[`${w}..${w}`]);continue}const g=new Map,m=new Map,y=R(n(e,"scope")),j=t==="per-file"||n(e,"scope").endsWith("/*")||n(e,"form")==="alphabet",b=S(n(e,"value"))?o.ceilings.filter(c=>n(c,"measure")===t&&S(n(c,"value"))&&M(n(c,"scope"))>M(n(e,"scope"))).map(c=>R(n(c,"scope"))):[];for(const c of a.get(t)??[]){if(!y(c)||b.some(v=>v(c)))continue;const l=j?c.where.at.join("/"):c.question;g.set(l,[...g.get(l)??[],c.value]),m.set(l,`${c.question} ${c.where.at.join("/")}`)}if(!g.size){u.push(e);continue}p.push(e);for(const[c,l]of g)_(e,c,l,m.get(c))}for(const e of A)p.push(e),_(e,n(e,"scope"),[`${u.length}..${u.length}`]);const k=f(e=>Number(n(e,"epoch"))||0,"epochOf");return{read:p,over:i,unread:u.filter(e=>k(e)>o.epoch-3),vacuous:u.filter(e=>k(e)<=o.epoch-3),readings:O}}f(ie,"foldCeilings");function T(o){const a=new Map;for(const s of o)a.set(s.ceiling,[...a.get(s.ceiling)??[],s.question===s.ceiling?s.got:`${s.question}=${s.got}`]);return[...a].map(([s,r])=>`${s} \xB7 ${r.length>4?`${r.slice(0,4).join(" ")} +${r.length-4}`:r.join(" ")}`)}f(T,"listed");function re(o,a,s=new Set){return{read:o.read.length,total:a,unread:o.unread.map(r=>n(r,"scope")),vacuous:o.vacuous.map(r=>n(r,"scope")),short:T(o.over.filter(r=>r.side==="short"&&!s.has(r.question))),over:T(o.over.filter(r=>r.side==="over"))}}f(re,"ceilingSummary");export{J as answersElsewhere,re as ceilingSummary,ie as foldCeilings};
@@ -1,132 +1,2 @@
1
- import { basename } from "../host/io.js";
2
- import { contracts, exclusive, point, region } from '@lapxo/obligations/field';
3
- import { ENVELOPE, PROTOCOL, recordKind, signedBytes, parse } from '@lapxo/topos/wire';
4
- export { CAPSULE, EXTENSION, LOCK, RECEIPTS } from '@lapxo/topos/wire';
5
- import { ownRoot } from "../observe/runner.js";
6
- import { hostInstrumentName } from "../host/call-context.js";
7
- const decoded = new Map();
8
- const parsed = new Map();
9
- const kinds = new Map();
10
- /** Pure syntax is retained by the exact record bytes, never by a path, epoch or
11
- * claimed digest. This does not retain admission, coverage or current grants. */
12
- export function parsedLine(line) {
13
- const held = parsed.get(line);
14
- if (held !== undefined)
15
- return held;
16
- const got = parse(line);
17
- if (got.kind === 'fact') {
18
- Object.freeze(got.value.fields);
19
- if (got.value.keys)
20
- Object.freeze(got.value.keys);
21
- Object.freeze(got.value);
22
- }
23
- Object.freeze(got);
24
- parsed.set(line, got);
25
- return got;
26
- }
27
- /** Field access uses the Topos wire parser; decoding is shared for this CLI process. */
28
- function wireFields(line) {
29
- const held = decoded.get(line);
30
- if (held !== undefined)
31
- return held;
32
- const got = parsedLine(line);
33
- const fields = got.kind === 'fact' ? got.value.fields : {};
34
- decoded.set(line, fields);
35
- return fields;
36
- }
37
- export const fieldOf = (line, name) => wireFields(line)[name] ?? '';
38
- export const fieldsOf = (line) => ({ ...wireFields(line) });
39
- export function selfName() { return hostInstrumentName() ?? basename(ownRoot()); }
40
- export function isWire(line) { return line.startsWith(PROTOCOL); }
41
- export const wireLinesOf = (text) => (text ?? '').split('\n').filter(isWire);
42
- export const isConfig = (line) => { const held = kinds.get(line); if (held !== undefined)
43
- return held; const k = recordKind(line), value = k.kind === 'fact' && k.value === 'config'; kinds.set(line, value); return value; };
44
- export const sayingOf = (line) => !isConfig(line) ? ((p) => p.kind === 'fact' ? signedBytes(p.value.fields) : line)(parsedLine(line)) : Object.entries(fieldsOf(line)).filter(([k]) => !ENVELOPE.has(k)).sort(([a], [b]) => (a < b ? -1 : 1)).map(([k, v]) => `${k}=${v}`).join(' ');
45
- /** One key per claim: scope, role and measure; what a line says, its envelope set aside, is one however often it landed. */
46
- export function claimKey(line) {
47
- const f = fieldsOf(line);
48
- return `${f['scope'] ?? ''} ${f['role'] ?? ''} ${f['measure'] ?? ''}`;
49
- }
50
- function contentOf(fields, at = true) {
51
- return Object.keys(fields)
52
- .filter((k) => !ENVELOPE.has(k) && k !== 'value' && (at || k !== 'at'))
53
- .sort()
54
- .map((k) => `${k}=${fields[k]}`)
55
- .join(' ');
56
- }
57
- function regionsOf(line) {
58
- return (fieldsOf(line)['needs'] ?? '').split('|').filter(Boolean).map((need) => region(need));
59
- }
60
- function contracted(line, sides, receipts) {
61
- const scope = fieldsOf(line)['scope'] ?? '';
62
- const named = regionsOf(line);
63
- // File receipts can discharge only declared file regions. No region is not an empty proof.
64
- if (named.length === 0)
65
- return false;
66
- const mine = exclusive(named, sides.filter((other) => other !== line).map(regionsOf));
67
- const touched = receipts.filter((r) => r.scope === scope).flatMap((r) => r.moved.map((coordinate) => point(coordinate)));
68
- return contracts(mine, touched);
69
- }
70
- function retracts(withdraw, line) {
71
- return Object.keys(withdraw)
72
- .filter((k) => !ENVELOPE.has(k) && k !== 'value')
73
- .every((k) => line[k] === withdraw[k]);
74
- }
75
- export function foldClaims(lines, receipts, _placed = false) {
76
- const groups = new Map();
77
- for (const line of lines.filter(isConfig)) {
78
- const key = claimKey(line);
79
- const group = groups.get(key) ?? [];
80
- if (!group.includes(line))
81
- group.push(line);
82
- groups.set(key, group);
83
- }
84
- const standing = [...new Set(lines.filter(line => !isConfig(line)))];
85
- const retracted = [];
86
- const spent = [];
87
- const vacuous = [];
88
- const forks = [];
89
- for (const [key, group] of groups) {
90
- const parsed = group.map((line) => ({ line, fields: fieldsOf(line) }));
91
- const withdraws = parsed.filter((p) => p.fields['value'] === 'withdraw');
92
- const claims = parsed.filter((p) => p.fields['value'] !== 'withdraw');
93
- const stands = new Set(claims.flatMap((p, i) => withdraws.some(w => retracts(w.fields, p.fields)) ? [] : [String(i)]));
94
- retracted.push(...claims.filter((_, i) => !stands.has(String(i))).map((p) => p.line));
95
- const kept = claims.filter((_, i) => stands.has(String(i)));
96
- if (!kept.length) {
97
- const lastByContent = new Map();
98
- for (const w of withdraws)
99
- lastByContent.set(contentOf(w.fields), w.line);
100
- const shownWithdraws = [...lastByContent.values()];
101
- standing.push(...shownWithdraws);
102
- spent.push(...withdraws.map((w) => w.line).filter((line) => !shownWithdraws.includes(line)));
103
- continue;
104
- }
105
- spent.push(...withdraws.map((w) => w.line));
106
- const epochOf = (p) => Number(p.fields['epoch']) || 0;
107
- const latestOf = new Map();
108
- const who = (p) => `${p.fields['by'] ?? ''} ${contentOf(p.fields)}`;
109
- for (const p of kept)
110
- latestOf.set(who(p), Math.max(latestOf.get(who(p)) ?? 0, epochOf(p)));
111
- const revised = kept.filter((p) => epochOf(p) < (latestOf.get(who(p)) ?? 0));
112
- spent.push(...revised.map((p) => p.line));
113
- // Epoch revisions are host history. Distinct origins remain separate inscriptions.
114
- const values = kept.filter(p => !revised.includes(p));
115
- const bySigner = new Map();
116
- for (const p of values) {
117
- const by = p.fields['by'] ?? '';
118
- const identity = who(p);
119
- const sayings = bySigner.get(identity) ?? new Set();
120
- sayings.add(sayingOf(p.line));
121
- bySigner.set(identity, sayings);
122
- if (sayings.size > 1)
123
- throw Error(`REFUSE·document ${key} · ${by} has two live inscriptions without withdrawal`);
124
- }
125
- const shown = [...new Set(values.map(p => p.line))];
126
- const resting = receipts && shown.length > 1 ? shown.filter((line) => !contracted(line, shown, receipts)) : shown;
127
- vacuous.push(...shown.filter((line) => !resting.includes(line)));
128
- standing.push(...resting);
129
- }
130
- const accounted = new Set([...standing, ...retracted, ...spent, ...vacuous]);
131
- return { standing, superseded: [...new Set([...spent, ...lines.filter((l) => !accounted.has(l))])], retracted, forks, vacuous };
132
- }
1
+ var W=Object.defineProperty;var r=(e,s)=>W(e,"name",{value:s,configurable:!0});import{basename as F}from"../host/io.js";import{library12_contracts as U,library12_exclusive as V,library12_point as A,library12_region as X}from"../vendor/runtime.js";import{library11_ENVELOPE as S,library11_PROTOCOL as q,library11_recordKind as D,library11_signedBytes as G,library11_parse as H}from"../vendor/runtime.js";import{CAPSULE as he,EXTENSION as ge,LOCK as we,RECEIPTS as ye}from"../vendor/library11.js";import{ownRoot as J}from"../observe/runner.js";import{hostInstrumentName as Q}from"../host/call-context.js";const N=new Map,P=new Map,z=new Map;function R(e){const s=P.get(e);if(s!==void 0)return s;const n=H(e);return n.kind==="fact"&&(Object.freeze(n.value.fields),n.value.keys&&Object.freeze(n.value.keys),Object.freeze(n.value)),Object.freeze(n),P.set(e,n),n}r(R,"parsedLine");function B(e){const s=N.get(e);if(s!==void 0)return s;const n=R(e),o=n.kind==="fact"?n.value.fields:{};return N.set(e,o),o}r(B,"wireFields");const fe=r((e,s)=>B(e)[s]??"","fieldOf"),h=r(e=>({...B(e)}),"fieldsOf");function le(){return Q()??F(J())}r(le,"selfName");function Y(e){return e.startsWith(q)}r(Y,"isWire");const ue=r(e=>(e??"").split(`
2
+ `).filter(Y),"wireLinesOf"),_=r(e=>{const s=z.get(e);if(s!==void 0)return s;const n=D(e),o=n.kind==="fact"&&n.value==="config";return z.set(e,o),o},"isConfig"),Z=r(e=>_(e)?Object.entries(h(e)).filter(([s])=>!S.has(s)).sort(([s],[n])=>s<n?-1:1).map(([s,n])=>`${s}=${n}`).join(" "):(s=>s.kind==="fact"?G(s.value.fields):e)(R(e)),"sayingOf");function ee(e){const s=h(e);return`${s.scope??""} ${s.role??""} ${s.measure??""}`}r(ee,"claimKey");function K(e,s=!0){return Object.keys(e).filter(n=>!S.has(n)&&n!=="value"&&(s||n!=="at")).sort().map(n=>`${n}=${e[n]}`).join(" ")}r(K,"contentOf");function T(e){return(h(e).needs??"").split("|").filter(Boolean).map(s=>X(s))}r(T,"regionsOf");function te(e,s,n){const o=h(e).scope??"",l=T(e);if(l.length===0)return!1;const p=V(l,s.filter(a=>a!==e).map(T)),u=n.filter(a=>a.scope===o).flatMap(a=>a.moved.map(b=>A(b)));return U(p,u)}r(te,"contracted");function se(e,s){return Object.keys(e).filter(n=>!S.has(n)&&n!=="value").every(n=>s[n]===e[n])}r(se,"retracts");function de(e,s,n=!1){const o=new Map;for(const f of e.filter(_)){const g=ee(f),d=o.get(g)??[];d.includes(f)||d.push(f),o.set(g,d)}const l=[...new Set(e.filter(f=>!_(f)))],p=[],u=[],a=[],b=[];for(const[f,g]of o){const d=g.map(t=>({line:t,fields:h(t)})),w=d.filter(t=>t.fields.value==="withdraw"),v=d.filter(t=>t.fields.value!=="withdraw"),$=new Set(v.flatMap((t,c)=>w.some(i=>se(i.fields,t.fields))?[]:[String(c)]));p.push(...v.filter((t,c)=>!$.has(String(c))).map(t=>t.line));const y=v.filter((t,c)=>$.has(String(c)));if(!y.length){const t=new Map;for(const i of w)t.set(K(i.fields),i.line);const c=[...t.values()];l.push(...c),u.push(...w.map(i=>i.line).filter(i=>!c.includes(i)));continue}u.push(...w.map(t=>t.line));const M=r(t=>Number(t.fields.epoch)||0,"epochOf"),x=new Map,O=r(t=>`${t.fields.by??""} ${K(t.fields)}`,"who");for(const t of y)x.set(O(t),Math.max(x.get(O(t))??0,M(t)));const j=y.filter(t=>M(t)<(x.get(O(t))??0));u.push(...j.map(t=>t.line));const k=y.filter(t=>!j.includes(t)),C=new Map;for(const t of k){const c=t.fields.by??"",i=O(t),E=C.get(i)??new Set;if(E.add(Z(t.line)),C.set(i,E),E.size>1)throw Error(`REFUSE\xB7document ${f} \xB7 ${c} has two live inscriptions without withdrawal`)}const m=[...new Set(k.map(t=>t.line))],L=s&&m.length>1?m.filter(t=>!te(t,m,s)):m;a.push(...m.filter(t=>!L.includes(t))),l.push(...L)}const I=new Set([...l,...p,...u,...a]);return{standing:l,superseded:[...new Set([...u,...e.filter(f=>!I.has(f))])],retracted:p,forks:b,vacuous:a}}r(de,"foldClaims");export{he as CAPSULE,ge as EXTENSION,we as LOCK,ye as RECEIPTS,ee as claimKey,fe as fieldOf,h as fieldsOf,de as foldClaims,_ as isConfig,Y as isWire,R as parsedLine,Z as sayingOf,le as selfName,ue as wireLinesOf};