@noy-db/hub 0.6.0-pre.20 → 0.6.0-pre.21
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.
- package/CHANGELOG.md +5234 -0
- package/dist/api-EYNT6KGS.js +20 -0
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-K62BFMYK.js → backup-FSC36VWC.js} +12 -12
- package/dist/blobs/index.js +13 -13
- package/dist/broker/index.js +12 -12
- package/dist/cargo/index.js +29 -29
- package/dist/{chunk-GT72D4FO.js → chunk-2LFOMUEA.js} +3 -3
- package/dist/{chunk-W6NFONOV.js → chunk-32B7VCKU.js} +2 -2
- package/dist/{chunk-PG6PFMDC.js → chunk-3B6S6RSI.js} +2 -2
- package/dist/{chunk-DKYEVHZH.js → chunk-3ENNPCIW.js} +2 -2
- package/dist/{chunk-5J5TTSGW.js → chunk-3O72ZD2E.js} +3 -3
- package/dist/{chunk-WKD5ESK4.js → chunk-3PMFMUFX.js} +2 -2
- package/dist/{chunk-VEX2BQVX.js → chunk-45YHJ3GV.js} +11 -3
- package/dist/{chunk-VEX2BQVX.js.map → chunk-45YHJ3GV.js.map} +1 -1
- package/dist/{chunk-MNUTPZRQ.js → chunk-4A34KWOU.js} +6 -6
- package/dist/{chunk-32O2N2CH.js → chunk-4N5Q23KV.js} +7 -7
- package/dist/{chunk-MQXYR65M.js → chunk-4OQZNXQG.js} +6 -6
- package/dist/{chunk-S55DBWRC.js → chunk-4RAS6HN6.js} +2 -2
- package/dist/{chunk-6S466CMQ.js → chunk-4YL2LMXK.js} +8 -8
- package/dist/{chunk-TC6MBEGH.js → chunk-5Q7AJ7DN.js} +5 -5
- package/dist/{chunk-GDGTIWB4.js → chunk-6JPGVL7X.js} +2 -2
- package/dist/{chunk-GYUCRDAU.js → chunk-6KTVJ5ZZ.js} +4 -4
- package/dist/{chunk-YVTADFTC.js → chunk-6WO62AJW.js} +4 -4
- package/dist/{chunk-RORE2GX2.js → chunk-6YD5SYQS.js} +2 -2
- package/dist/{chunk-JIF3IBRK.js → chunk-7KAE7CQ2.js} +2 -2
- package/dist/{chunk-4HVTRHSA.js → chunk-7LNE2N2V.js} +6 -6
- package/dist/{chunk-M4IKEOJS.js → chunk-7PJ3BKHS.js} +6 -6
- package/dist/{chunk-HTHRCGWP.js → chunk-A4TOGAUW.js} +2 -2
- package/dist/{chunk-VJ4B3ZXY.js → chunk-AU3AUJIZ.js} +2 -2
- package/dist/{chunk-XGQGWZ6D.js → chunk-AUPSEJ7O.js} +4 -4
- package/dist/{chunk-A4K5GLE6.js → chunk-B6IYATME.js} +4 -4
- package/dist/{chunk-CV7WXCZD.js → chunk-BAHOV5I5.js} +10 -10
- package/dist/{chunk-E6VDPBE3.js → chunk-BEZDLIDG.js} +6 -6
- package/dist/{chunk-RKDH6L53.js → chunk-CAGI4LLJ.js} +303 -49
- package/dist/chunk-CAGI4LLJ.js.map +1 -0
- package/dist/{chunk-BTNKPDZM.js → chunk-CLAHBPOI.js} +3 -3
- package/dist/{chunk-P7L3OQLL.js → chunk-CWM4GQD2.js} +15 -1
- package/dist/chunk-CWM4GQD2.js.map +1 -0
- package/dist/{chunk-C7WJNVJG.js → chunk-D3R7Q4QK.js} +2 -2
- package/dist/{chunk-ODVIFBAQ.js → chunk-DIZ6HM7Q.js} +6 -6
- package/dist/{chunk-ICCRAPWD.js → chunk-DVRZYAGT.js} +4 -4
- package/dist/{chunk-SG3OQCRG.js → chunk-DXKLLKME.js} +3 -3
- package/dist/{chunk-RQY5UWEL.js → chunk-E5SC6ENM.js} +12 -12
- package/dist/{chunk-OIIAXFKM.js → chunk-EES37S2V.js} +3 -3
- package/dist/{chunk-REL4OLWW.js → chunk-EKEIEJL6.js} +2 -2
- package/dist/{chunk-ZBDWKPBW.js → chunk-ESKIAXO2.js} +5 -5
- package/dist/{chunk-HJRTFXAA.js → chunk-FFSQFH6D.js} +2 -2
- package/dist/{chunk-A3NTKHDB.js → chunk-FS7NTGCJ.js} +2 -2
- package/dist/{chunk-5BS6IQZZ.js → chunk-FW7NGYLT.js} +5 -5
- package/dist/{chunk-ZPMXYPBR.js → chunk-GBBDFE6C.js} +2 -2
- package/dist/{chunk-OQLYMBJI.js → chunk-GQXFOAYZ.js} +3 -3
- package/dist/{chunk-5JT4Y5UE.js → chunk-GTHVPVAR.js} +10 -10
- package/dist/{chunk-NH2MST6J.js → chunk-GWO2IDAB.js} +2 -2
- package/dist/{chunk-MNMYHZVU.js → chunk-H3G4I3PN.js} +2 -2
- package/dist/{chunk-PNAIDIP7.js → chunk-HQSPF5IY.js} +16 -9
- package/dist/{chunk-PNAIDIP7.js.map → chunk-HQSPF5IY.js.map} +1 -1
- package/dist/{chunk-ZWKF3CD3.js → chunk-HR5R5JOM.js} +2 -2
- package/dist/{chunk-2E2MKBMI.js → chunk-HYYVT2KZ.js} +2 -2
- package/dist/{chunk-HGJC7I5F.js → chunk-I6QKB7MT.js} +2 -2
- package/dist/{chunk-IPDS2TYW.js → chunk-ICDHUUMQ.js} +3 -3
- package/dist/{chunk-3Y4OFWQJ.js → chunk-IGNJOJEP.js} +1 -1
- package/dist/chunk-IGNJOJEP.js.map +1 -0
- package/dist/{chunk-BP4I7IBK.js → chunk-IJ46VCWD.js} +2 -2
- package/dist/{chunk-AQF7JSQR.js → chunk-INMHEMXX.js} +2 -2
- package/dist/{chunk-IOURTXTM.js → chunk-JLYQQNY4.js} +7 -7
- package/dist/{chunk-IOURTXTM.js.map → chunk-JLYQQNY4.js.map} +1 -1
- package/dist/{chunk-KDX6VEYV.js → chunk-JNMTN5D5.js} +2 -2
- package/dist/{chunk-ZXW3X3DQ.js → chunk-JWMBG5S3.js} +7 -7
- package/dist/{chunk-L2XQ776M.js → chunk-KRVS7YWY.js} +2 -2
- package/dist/{chunk-DJ23QZIN.js → chunk-KV6JM2IA.js} +2 -2
- package/dist/{chunk-EJIVFOOQ.js → chunk-KX57HODD.js} +6 -6
- package/dist/{chunk-6TXUVKPG.js → chunk-LGFTOU27.js} +115 -90
- package/dist/chunk-LGFTOU27.js.map +1 -0
- package/dist/{chunk-YOT7D63X.js → chunk-LN7P6MZB.js} +3 -3
- package/dist/{chunk-JHO6FGZX.js → chunk-LX46B56Q.js} +5 -5
- package/dist/{chunk-APV42WPR.js → chunk-LXECF2ZR.js} +2 -2
- package/dist/{chunk-VH2W6BOG.js → chunk-MSLPDFK2.js} +7 -7
- package/dist/{chunk-NYSD43OE.js → chunk-MZTUTEHP.js} +4 -4
- package/dist/{chunk-F5AJZC3U.js → chunk-NCCEDL2K.js} +30 -11
- package/dist/chunk-NCCEDL2K.js.map +1 -0
- package/dist/{chunk-KBOPY6W2.js → chunk-NR2SUJ3H.js} +2 -2
- package/dist/{chunk-HTMQBBF3.js → chunk-NW4TY6VC.js} +3 -3
- package/dist/{chunk-OWGEHDT2.js → chunk-O742QBZZ.js} +5 -5
- package/dist/{chunk-D5UDZANO.js → chunk-OHOKBMTM.js} +96 -8
- package/dist/chunk-OHOKBMTM.js.map +1 -0
- package/dist/{chunk-KM6YR5XF.js → chunk-OIBEJN5H.js} +2 -2
- package/dist/{chunk-N2HKBESK.js → chunk-OMYCSTXL.js} +4 -4
- package/dist/{chunk-N7YAQKAO.js → chunk-ONVD6GBY.js} +2 -2
- package/dist/{chunk-NRNTXBHT.js → chunk-OTHHO3KI.js} +2 -2
- package/dist/{chunk-KUXTWVAR.js → chunk-P2MR5UNE.js} +3 -3
- package/dist/{chunk-ZVAFJQZB.js → chunk-PENPHA45.js} +2 -2
- package/dist/{chunk-47ZFULEZ.js → chunk-PPCOKVFA.js} +2 -2
- package/dist/{chunk-2IK6AC6A.js → chunk-QSIEL6TL.js} +5 -5
- package/dist/{chunk-VHVMJWM6.js → chunk-RFO4UXKQ.js} +6 -6
- package/dist/{chunk-CVYXIN5B.js → chunk-RKCRPPNB.js} +3 -3
- package/dist/{chunk-RSFG7XHM.js → chunk-RSXQNFGO.js} +2 -2
- package/dist/{chunk-DYASJSKI.js → chunk-S56VYR4Q.js} +3 -3
- package/dist/{chunk-7RCZ436O.js → chunk-SYS46BL7.js} +2 -2
- package/dist/{chunk-EG6AQBYW.js → chunk-T7JGWTES.js} +8 -8
- package/dist/{chunk-SA77BQ7F.js → chunk-TDSN2O2V.js} +5 -5
- package/dist/{chunk-SFD2LL7G.js → chunk-TMBSPLUG.js} +2 -2
- package/dist/{chunk-5EJQNA26.js → chunk-TQPASLY4.js} +2 -2
- package/dist/{chunk-QPIUFRUC.js → chunk-TX5MKAHA.js} +3 -3
- package/dist/{chunk-TENLCGYD.js → chunk-U27Y4DJZ.js} +4 -4
- package/dist/{chunk-L6FSZFG7.js → chunk-VVSOPRUE.js} +2 -2
- package/dist/{chunk-437FDIHO.js → chunk-WVE6YKMX.js} +3 -3
- package/dist/{chunk-PZSS7MUM.js → chunk-YALD3SST.js} +5 -5
- package/dist/{chunk-WBNXZU42.js → chunk-YKXZHUOW.js} +4 -4
- package/dist/{chunk-RNSC2ARR.js → chunk-ZLHHE5XZ.js} +3 -3
- package/dist/{chunk-GILI76SU.js → chunk-ZZXLB6AS.js} +2 -2
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-PMDG3O36.js → classified-marker-NA6HUV33.js} +3 -3
- package/dist/collection-facade-VBM35WAH.js +45 -0
- package/dist/{computed-UHCBRILW.js → computed-GSTLWSY5.js} +3 -3
- package/dist/consent/index.js +9 -9
- package/dist/cover/index.js +9 -9
- package/dist/custody/index.js +11 -11
- package/dist/{dead-filter-777VWDER.js → dead-filter-UALP5DJX.js} +2 -2
- package/dist/debug/index.js +1 -1
- package/dist/{delegation-4R5DU23X.js → delegation-JLNXM7KH.js} +11 -11
- package/dist/derivations/index.js +12 -12
- package/dist/derive-YUO3TQYN.js +22 -0
- package/dist/directory/index.js +10 -10
- package/dist/{dispatch-ASL257KG.js → dispatch-4ZHLSFZQ.js} +5 -5
- package/dist/{dispatch-3EN6YCCS.js → dispatch-77CB75KB.js} +18 -18
- package/dist/{enclave-ZJS5R5RH.js → enclave-O4NOROCJ.js} +11 -9
- package/dist/executor-CZDXBXKE.js +29 -0
- package/dist/executor-DVJAWN3B.js +9 -0
- package/dist/executor-VRLG4TQJ.js +9 -0
- package/dist/export-accessible-UXSMG7AB.js +23 -0
- package/dist/extract-partition-TVY7AMKH.js +38 -0
- package/dist/{fanout-sidecar-TFPWDOME.js → fanout-sidecar-NLQ7QAYW.js} +9 -9
- package/dist/find-WSARMJBW.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +7 -7
- package/dist/history/index.js +13 -13
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +2 -1
- package/dist/index.js +95 -91
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/introspection/index.js +11 -11
- package/dist/issue-3JNJNPT3.js +19 -0
- package/dist/kernel/constants.d.ts +18 -0
- package/dist/kernel/enclave/index.d.ts +1 -0
- package/dist/kernel/enclave/record-keys/rekey-blob.d.ts +88 -0
- package/dist/kernel/errors.d.ts +48 -1
- package/dist/kernel/noydb.d.ts +18 -1
- package/dist/kernel/types.d.ts +20 -6
- package/dist/kernel/vault.d.ts +1 -1
- package/dist/{ledger-62CEPRPX.js → ledger-MVPNG5OS.js} +11 -11
- package/dist/liberate-4LOJOLDT.js +24 -0
- package/dist/{link-set-ZRYNUHN3.js → link-set-3POMQR3I.js} +11 -11
- package/dist/{managed-secret-T2WB4O47.js → managed-secret-IARIJJ7Q.js} +10 -10
- package/dist/materialized-views/index.js +20 -20
- package/dist/migrate-cek-XM2ETTZW.js +19 -0
- package/dist/migrate-cek-XM2ETTZW.js.map +1 -0
- package/dist/money/index.js +4 -4
- package/dist/noydb-IRILUDED.js +84 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -12
- package/dist/pod/index.js +55 -55
- package/dist/{pod-handle-UPLXOGIK.js → pod-handle-MELERCKU.js} +9 -9
- package/dist/policy/index.js +10 -10
- package/dist/port/with/team-strategy.d.ts +5 -1
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-J4DEVNXK.js → post-register-Z5T7FY45.js} +6 -6
- package/dist/query/index.js +3 -3
- package/dist/reduce/index.js +4 -4
- package/dist/register-UZ37QPDB.js +32 -0
- package/dist/registry-ETJNA7PO.js +9 -0
- package/dist/registry-F7U6KSLX.js +9 -0
- package/dist/registry-L4ELKX6C.js +18 -0
- package/dist/registry-SDT5LIGO.js +19 -0
- package/dist/request-withdrawal-PVFEYX57.js +31 -0
- package/dist/{reveal-525XWQU2.js → reveal-DQ2E3QAZ.js} +6 -6
- package/dist/revoke-YXY6SHUH.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +4 -4
- package/dist/{seed-SGIF3EN4.js → seed-DZ4ORU5N.js} +11 -11
- package/dist/sequence/index.js +9 -9
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-Q7XQBMPA.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/{stale-PQYPVCER.js → stale-NI7SAXAZ.js} +10 -10
- package/dist/storage-3VNGSHXS.js +23 -0
- package/dist/{store-coordination-provider-TFHZLKHG.js → store-coordination-provider-TYKNR3OU.js} +10 -10
- package/dist/sync/index.js +10 -10
- package/dist/team/index.js +15 -15
- package/dist/tiers/index.js +11 -11
- package/dist/to/index.js +1 -1
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/vault-head/index.js +8 -8
- package/dist/{verify-J6DEOXP3.js → verify-6J2YLKSO.js} +5 -5
- package/dist/walk-WRA7RAPY.js +21 -0
- package/dist/with-party/team/keyring.d.ts +132 -0
- package/dist/with-party/team/noydb-facade.d.ts +5 -1
- package/dist/with-party/team/roster-tag.d.ts +101 -0
- package/dist/with-shape/blobs/blob-set.d.ts +2 -2
- package/dist/withdraw-accessible-4JTDFRFZ.js +28 -0
- package/package.json +4 -3
- package/dist/api-Z5VHH24A.js +0 -20
- package/dist/chunk-3Y4OFWQJ.js.map +0 -1
- package/dist/chunk-6TXUVKPG.js.map +0 -1
- package/dist/chunk-D5UDZANO.js.map +0 -1
- package/dist/chunk-F5AJZC3U.js.map +0 -1
- package/dist/chunk-P7L3OQLL.js.map +0 -1
- package/dist/chunk-RKDH6L53.js.map +0 -1
- package/dist/collection-facade-ZJK5EB33.js +0 -45
- package/dist/derive-3WAS2G5T.js +0 -22
- package/dist/executor-GPM6DNWV.js +0 -9
- package/dist/executor-LJSMZ4IB.js +0 -9
- package/dist/executor-SHUVRZUJ.js +0 -29
- package/dist/export-accessible-GNY6DC6U.js +0 -23
- package/dist/extract-partition-BG3AF4NZ.js +0 -38
- package/dist/find-KX6OKHDP.js +0 -11
- package/dist/issue-PAUM7NCX.js +0 -19
- package/dist/liberate-I6AOLWXW.js +0 -24
- package/dist/noydb-SS6EN7TK.js +0 -84
- package/dist/register-UPD4GKBC.js +0 -32
- package/dist/registry-7KX2HWFS.js +0 -18
- package/dist/registry-PKYYEHEW.js +0 -9
- package/dist/registry-XHCYMD34.js +0 -19
- package/dist/registry-XIRTZHPC.js +0 -9
- package/dist/request-withdrawal-XZSESWZV.js +0 -31
- package/dist/revoke-QI7YHQ2B.js +0 -24
- package/dist/signer-BZWDPGGN.js +0 -25
- package/dist/storage-MJHKNQRO.js +0 -23
- package/dist/walk-BX4NSB5L.js +0 -21
- package/dist/withdraw-accessible-K4CPMH4C.js +0 -28
- /package/dist/{api-Z5VHH24A.js.map → api-EYNT6KGS.js.map} +0 -0
- /package/dist/{backup-K62BFMYK.js.map → backup-FSC36VWC.js.map} +0 -0
- /package/dist/{chunk-GT72D4FO.js.map → chunk-2LFOMUEA.js.map} +0 -0
- /package/dist/{chunk-W6NFONOV.js.map → chunk-32B7VCKU.js.map} +0 -0
- /package/dist/{chunk-PG6PFMDC.js.map → chunk-3B6S6RSI.js.map} +0 -0
- /package/dist/{chunk-DKYEVHZH.js.map → chunk-3ENNPCIW.js.map} +0 -0
- /package/dist/{chunk-5J5TTSGW.js.map → chunk-3O72ZD2E.js.map} +0 -0
- /package/dist/{chunk-WKD5ESK4.js.map → chunk-3PMFMUFX.js.map} +0 -0
- /package/dist/{chunk-MNUTPZRQ.js.map → chunk-4A34KWOU.js.map} +0 -0
- /package/dist/{chunk-32O2N2CH.js.map → chunk-4N5Q23KV.js.map} +0 -0
- /package/dist/{chunk-MQXYR65M.js.map → chunk-4OQZNXQG.js.map} +0 -0
- /package/dist/{chunk-S55DBWRC.js.map → chunk-4RAS6HN6.js.map} +0 -0
- /package/dist/{chunk-6S466CMQ.js.map → chunk-4YL2LMXK.js.map} +0 -0
- /package/dist/{chunk-TC6MBEGH.js.map → chunk-5Q7AJ7DN.js.map} +0 -0
- /package/dist/{chunk-GDGTIWB4.js.map → chunk-6JPGVL7X.js.map} +0 -0
- /package/dist/{chunk-GYUCRDAU.js.map → chunk-6KTVJ5ZZ.js.map} +0 -0
- /package/dist/{chunk-YVTADFTC.js.map → chunk-6WO62AJW.js.map} +0 -0
- /package/dist/{chunk-RORE2GX2.js.map → chunk-6YD5SYQS.js.map} +0 -0
- /package/dist/{chunk-JIF3IBRK.js.map → chunk-7KAE7CQ2.js.map} +0 -0
- /package/dist/{chunk-4HVTRHSA.js.map → chunk-7LNE2N2V.js.map} +0 -0
- /package/dist/{chunk-M4IKEOJS.js.map → chunk-7PJ3BKHS.js.map} +0 -0
- /package/dist/{chunk-HTHRCGWP.js.map → chunk-A4TOGAUW.js.map} +0 -0
- /package/dist/{chunk-VJ4B3ZXY.js.map → chunk-AU3AUJIZ.js.map} +0 -0
- /package/dist/{chunk-XGQGWZ6D.js.map → chunk-AUPSEJ7O.js.map} +0 -0
- /package/dist/{chunk-A4K5GLE6.js.map → chunk-B6IYATME.js.map} +0 -0
- /package/dist/{chunk-CV7WXCZD.js.map → chunk-BAHOV5I5.js.map} +0 -0
- /package/dist/{chunk-E6VDPBE3.js.map → chunk-BEZDLIDG.js.map} +0 -0
- /package/dist/{chunk-BTNKPDZM.js.map → chunk-CLAHBPOI.js.map} +0 -0
- /package/dist/{chunk-C7WJNVJG.js.map → chunk-D3R7Q4QK.js.map} +0 -0
- /package/dist/{chunk-ODVIFBAQ.js.map → chunk-DIZ6HM7Q.js.map} +0 -0
- /package/dist/{chunk-ICCRAPWD.js.map → chunk-DVRZYAGT.js.map} +0 -0
- /package/dist/{chunk-SG3OQCRG.js.map → chunk-DXKLLKME.js.map} +0 -0
- /package/dist/{chunk-RQY5UWEL.js.map → chunk-E5SC6ENM.js.map} +0 -0
- /package/dist/{chunk-OIIAXFKM.js.map → chunk-EES37S2V.js.map} +0 -0
- /package/dist/{chunk-REL4OLWW.js.map → chunk-EKEIEJL6.js.map} +0 -0
- /package/dist/{chunk-ZBDWKPBW.js.map → chunk-ESKIAXO2.js.map} +0 -0
- /package/dist/{chunk-HJRTFXAA.js.map → chunk-FFSQFH6D.js.map} +0 -0
- /package/dist/{chunk-A3NTKHDB.js.map → chunk-FS7NTGCJ.js.map} +0 -0
- /package/dist/{chunk-5BS6IQZZ.js.map → chunk-FW7NGYLT.js.map} +0 -0
- /package/dist/{chunk-ZPMXYPBR.js.map → chunk-GBBDFE6C.js.map} +0 -0
- /package/dist/{chunk-OQLYMBJI.js.map → chunk-GQXFOAYZ.js.map} +0 -0
- /package/dist/{chunk-5JT4Y5UE.js.map → chunk-GTHVPVAR.js.map} +0 -0
- /package/dist/{chunk-NH2MST6J.js.map → chunk-GWO2IDAB.js.map} +0 -0
- /package/dist/{chunk-MNMYHZVU.js.map → chunk-H3G4I3PN.js.map} +0 -0
- /package/dist/{chunk-ZWKF3CD3.js.map → chunk-HR5R5JOM.js.map} +0 -0
- /package/dist/{chunk-2E2MKBMI.js.map → chunk-HYYVT2KZ.js.map} +0 -0
- /package/dist/{chunk-HGJC7I5F.js.map → chunk-I6QKB7MT.js.map} +0 -0
- /package/dist/{chunk-IPDS2TYW.js.map → chunk-ICDHUUMQ.js.map} +0 -0
- /package/dist/{chunk-BP4I7IBK.js.map → chunk-IJ46VCWD.js.map} +0 -0
- /package/dist/{chunk-AQF7JSQR.js.map → chunk-INMHEMXX.js.map} +0 -0
- /package/dist/{chunk-KDX6VEYV.js.map → chunk-JNMTN5D5.js.map} +0 -0
- /package/dist/{chunk-ZXW3X3DQ.js.map → chunk-JWMBG5S3.js.map} +0 -0
- /package/dist/{chunk-L2XQ776M.js.map → chunk-KRVS7YWY.js.map} +0 -0
- /package/dist/{chunk-DJ23QZIN.js.map → chunk-KV6JM2IA.js.map} +0 -0
- /package/dist/{chunk-EJIVFOOQ.js.map → chunk-KX57HODD.js.map} +0 -0
- /package/dist/{chunk-YOT7D63X.js.map → chunk-LN7P6MZB.js.map} +0 -0
- /package/dist/{chunk-JHO6FGZX.js.map → chunk-LX46B56Q.js.map} +0 -0
- /package/dist/{chunk-APV42WPR.js.map → chunk-LXECF2ZR.js.map} +0 -0
- /package/dist/{chunk-VH2W6BOG.js.map → chunk-MSLPDFK2.js.map} +0 -0
- /package/dist/{chunk-NYSD43OE.js.map → chunk-MZTUTEHP.js.map} +0 -0
- /package/dist/{chunk-KBOPY6W2.js.map → chunk-NR2SUJ3H.js.map} +0 -0
- /package/dist/{chunk-HTMQBBF3.js.map → chunk-NW4TY6VC.js.map} +0 -0
- /package/dist/{chunk-OWGEHDT2.js.map → chunk-O742QBZZ.js.map} +0 -0
- /package/dist/{chunk-KM6YR5XF.js.map → chunk-OIBEJN5H.js.map} +0 -0
- /package/dist/{chunk-N2HKBESK.js.map → chunk-OMYCSTXL.js.map} +0 -0
- /package/dist/{chunk-N7YAQKAO.js.map → chunk-ONVD6GBY.js.map} +0 -0
- /package/dist/{chunk-NRNTXBHT.js.map → chunk-OTHHO3KI.js.map} +0 -0
- /package/dist/{chunk-KUXTWVAR.js.map → chunk-P2MR5UNE.js.map} +0 -0
- /package/dist/{chunk-ZVAFJQZB.js.map → chunk-PENPHA45.js.map} +0 -0
- /package/dist/{chunk-47ZFULEZ.js.map → chunk-PPCOKVFA.js.map} +0 -0
- /package/dist/{chunk-2IK6AC6A.js.map → chunk-QSIEL6TL.js.map} +0 -0
- /package/dist/{chunk-VHVMJWM6.js.map → chunk-RFO4UXKQ.js.map} +0 -0
- /package/dist/{chunk-CVYXIN5B.js.map → chunk-RKCRPPNB.js.map} +0 -0
- /package/dist/{chunk-RSFG7XHM.js.map → chunk-RSXQNFGO.js.map} +0 -0
- /package/dist/{chunk-DYASJSKI.js.map → chunk-S56VYR4Q.js.map} +0 -0
- /package/dist/{chunk-7RCZ436O.js.map → chunk-SYS46BL7.js.map} +0 -0
- /package/dist/{chunk-EG6AQBYW.js.map → chunk-T7JGWTES.js.map} +0 -0
- /package/dist/{chunk-SA77BQ7F.js.map → chunk-TDSN2O2V.js.map} +0 -0
- /package/dist/{chunk-SFD2LL7G.js.map → chunk-TMBSPLUG.js.map} +0 -0
- /package/dist/{chunk-5EJQNA26.js.map → chunk-TQPASLY4.js.map} +0 -0
- /package/dist/{chunk-QPIUFRUC.js.map → chunk-TX5MKAHA.js.map} +0 -0
- /package/dist/{chunk-TENLCGYD.js.map → chunk-U27Y4DJZ.js.map} +0 -0
- /package/dist/{chunk-L6FSZFG7.js.map → chunk-VVSOPRUE.js.map} +0 -0
- /package/dist/{chunk-437FDIHO.js.map → chunk-WVE6YKMX.js.map} +0 -0
- /package/dist/{chunk-PZSS7MUM.js.map → chunk-YALD3SST.js.map} +0 -0
- /package/dist/{chunk-WBNXZU42.js.map → chunk-YKXZHUOW.js.map} +0 -0
- /package/dist/{chunk-RNSC2ARR.js.map → chunk-ZLHHE5XZ.js.map} +0 -0
- /package/dist/{chunk-GILI76SU.js.map → chunk-ZZXLB6AS.js.map} +0 -0
- /package/dist/{classified-marker-PMDG3O36.js.map → classified-marker-NA6HUV33.js.map} +0 -0
- /package/dist/{collection-facade-ZJK5EB33.js.map → collection-facade-VBM35WAH.js.map} +0 -0
- /package/dist/{computed-UHCBRILW.js.map → computed-GSTLWSY5.js.map} +0 -0
- /package/dist/{dead-filter-777VWDER.js.map → dead-filter-UALP5DJX.js.map} +0 -0
- /package/dist/{delegation-4R5DU23X.js.map → delegation-JLNXM7KH.js.map} +0 -0
- /package/dist/{derive-3WAS2G5T.js.map → derive-YUO3TQYN.js.map} +0 -0
- /package/dist/{dispatch-ASL257KG.js.map → dispatch-4ZHLSFZQ.js.map} +0 -0
- /package/dist/{dispatch-3EN6YCCS.js.map → dispatch-77CB75KB.js.map} +0 -0
- /package/dist/{enclave-ZJS5R5RH.js.map → enclave-O4NOROCJ.js.map} +0 -0
- /package/dist/{executor-GPM6DNWV.js.map → executor-CZDXBXKE.js.map} +0 -0
- /package/dist/{executor-LJSMZ4IB.js.map → executor-DVJAWN3B.js.map} +0 -0
- /package/dist/{executor-SHUVRZUJ.js.map → executor-VRLG4TQJ.js.map} +0 -0
- /package/dist/{export-accessible-GNY6DC6U.js.map → export-accessible-UXSMG7AB.js.map} +0 -0
- /package/dist/{extract-partition-BG3AF4NZ.js.map → extract-partition-TVY7AMKH.js.map} +0 -0
- /package/dist/{fanout-sidecar-TFPWDOME.js.map → fanout-sidecar-NLQ7QAYW.js.map} +0 -0
- /package/dist/{find-KX6OKHDP.js.map → find-WSARMJBW.js.map} +0 -0
- /package/dist/{issue-PAUM7NCX.js.map → issue-3JNJNPT3.js.map} +0 -0
- /package/dist/{ledger-62CEPRPX.js.map → ledger-MVPNG5OS.js.map} +0 -0
- /package/dist/{liberate-I6AOLWXW.js.map → liberate-4LOJOLDT.js.map} +0 -0
- /package/dist/{link-set-ZRYNUHN3.js.map → link-set-3POMQR3I.js.map} +0 -0
- /package/dist/{managed-secret-T2WB4O47.js.map → managed-secret-IARIJJ7Q.js.map} +0 -0
- /package/dist/{noydb-SS6EN7TK.js.map → noydb-IRILUDED.js.map} +0 -0
- /package/dist/{pod-handle-UPLXOGIK.js.map → pod-handle-MELERCKU.js.map} +0 -0
- /package/dist/{post-register-J4DEVNXK.js.map → post-register-Z5T7FY45.js.map} +0 -0
- /package/dist/{register-UPD4GKBC.js.map → register-UZ37QPDB.js.map} +0 -0
- /package/dist/{registry-7KX2HWFS.js.map → registry-ETJNA7PO.js.map} +0 -0
- /package/dist/{registry-PKYYEHEW.js.map → registry-F7U6KSLX.js.map} +0 -0
- /package/dist/{registry-XHCYMD34.js.map → registry-L4ELKX6C.js.map} +0 -0
- /package/dist/{registry-XIRTZHPC.js.map → registry-SDT5LIGO.js.map} +0 -0
- /package/dist/{request-withdrawal-XZSESWZV.js.map → request-withdrawal-PVFEYX57.js.map} +0 -0
- /package/dist/{reveal-525XWQU2.js.map → reveal-DQ2E3QAZ.js.map} +0 -0
- /package/dist/{revoke-QI7YHQ2B.js.map → revoke-YXY6SHUH.js.map} +0 -0
- /package/dist/{seed-SGIF3EN4.js.map → seed-DZ4ORU5N.js.map} +0 -0
- /package/dist/{signer-BZWDPGGN.js.map → signer-Q7XQBMPA.js.map} +0 -0
- /package/dist/{stale-PQYPVCER.js.map → stale-NI7SAXAZ.js.map} +0 -0
- /package/dist/{storage-MJHKNQRO.js.map → storage-3VNGSHXS.js.map} +0 -0
- /package/dist/{store-coordination-provider-TFHZLKHG.js.map → store-coordination-provider-TYKNR3OU.js.map} +0 -0
- /package/dist/{verify-J6DEOXP3.js.map → verify-6J2YLKSO.js.map} +0 -0
- /package/dist/{walk-BX4NSB5L.js.map → walk-WRA7RAPY.js.map} +0 -0
- /package/dist/{withdraw-accessible-K4CPMH4C.js.map → withdraw-accessible-4JTDFRFZ.js.map} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildRecordAad,
|
|
3
3
|
openEnvelopeJson
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OHOKBMTM.js";
|
|
5
5
|
import {
|
|
6
6
|
buildRecordEnvelope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PENPHA45.js";
|
|
8
8
|
import {
|
|
9
9
|
encrypt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AU3AUJIZ.js";
|
|
11
11
|
import {
|
|
12
12
|
ConflictError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CWM4GQD2.js";
|
|
14
14
|
|
|
15
15
|
// src/with-audit/attestation/signer.ts
|
|
16
16
|
import { generateDocSigningKeyPair } from "@noy-db/attestation";
|
|
@@ -55,4 +55,4 @@ export {
|
|
|
55
55
|
loadSigner,
|
|
56
56
|
loadOrCreateSigner
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-ESKIAXO2.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildRecordEnvelope
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PENPHA45.js";
|
|
4
4
|
|
|
5
5
|
// src/with-shape/schema-update/fence.ts
|
|
6
6
|
var FENCE_RECORD_ID = "schema-fence";
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
loadFence,
|
|
37
37
|
saveFence
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-FFSQFH6D.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CargoNotEnabledError,
|
|
3
3
|
QuiesceTimeoutError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CWM4GQD2.js";
|
|
5
5
|
|
|
6
6
|
// src/with-cargo/strategy.ts
|
|
7
7
|
var NO_CARGO = {
|
|
@@ -60,4 +60,4 @@ export {
|
|
|
60
60
|
isQuorum,
|
|
61
61
|
runDrainBarrier
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-FS7NTGCJ.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
freezeAndDeleteClosure,
|
|
3
3
|
randomId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5Q7AJ7DN.js";
|
|
5
5
|
import {
|
|
6
6
|
buildAccessibleBundle,
|
|
7
7
|
resolveAccessibleCollections
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GBBDFE6C.js";
|
|
9
9
|
import {
|
|
10
10
|
buildRecordEnvelope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PENPHA45.js";
|
|
12
12
|
import {
|
|
13
13
|
NoydbError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CWM4GQD2.js";
|
|
15
15
|
|
|
16
16
|
// src/with-audit/portability/request-withdrawal.ts
|
|
17
17
|
var WITHDRAWAL_REQUESTS_COLLECTION = "_user_withdrawal_requests";
|
|
@@ -158,4 +158,4 @@ export {
|
|
|
158
158
|
approveWithdrawal,
|
|
159
159
|
rejectWithdrawal
|
|
160
160
|
};
|
|
161
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-FW7NGYLT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writePod
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QSIEL6TL.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/portability/export-accessible.ts
|
|
6
6
|
function resolveAccessibleCollections(keyring, scope, writableOnly = false) {
|
|
@@ -42,4 +42,4 @@ export {
|
|
|
42
42
|
buildAccessibleBundle,
|
|
43
43
|
exportAccessibleData
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-GBBDFE6C.js.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
base64ToBuffer,
|
|
3
3
|
decryptBytesWithAAD,
|
|
4
4
|
encryptBytesWithAAD
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AU3AUJIZ.js";
|
|
6
6
|
import {
|
|
7
7
|
TamperedError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CWM4GQD2.js";
|
|
9
9
|
|
|
10
10
|
// src/kernel/enclave/classify/compare.ts
|
|
11
11
|
var subtle = globalThis.crypto.subtle;
|
|
@@ -92,4 +92,4 @@ export {
|
|
|
92
92
|
openVdigPayload,
|
|
93
93
|
evaluateKofN
|
|
94
94
|
};
|
|
95
|
-
//# sourceMappingURL=chunk-
|
|
95
|
+
//# sourceMappingURL=chunk-GQXFOAYZ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAtPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WVE6YKMX.js";
|
|
4
4
|
import {
|
|
5
5
|
SearchNotEnabledError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CWM4GQD2.js";
|
|
7
7
|
|
|
8
8
|
// src/with-lookup/search/tokenize.ts
|
|
9
9
|
var WORD = /[\p{L}\p{N}]+/gu;
|
|
@@ -294,31 +294,31 @@ function buildBlobFieldEntries(filenamesByField) {
|
|
|
294
294
|
function withSearch() {
|
|
295
295
|
return {
|
|
296
296
|
async search(ctx, field, query, opts) {
|
|
297
|
-
const { search } = await import("./collection-facade-
|
|
297
|
+
const { search } = await import("./collection-facade-VBM35WAH.js");
|
|
298
298
|
return search(ctx, field, query, opts);
|
|
299
299
|
},
|
|
300
300
|
async retrieve(ctx, query, opts) {
|
|
301
|
-
const { retrieve } = await import("./collection-facade-
|
|
301
|
+
const { retrieve } = await import("./collection-facade-VBM35WAH.js");
|
|
302
302
|
return retrieve(ctx, query, opts);
|
|
303
303
|
},
|
|
304
304
|
async similarTo(ctx, vector, opts) {
|
|
305
|
-
const { similarTo } = await import("./collection-facade-
|
|
305
|
+
const { similarTo } = await import("./collection-facade-VBM35WAH.js");
|
|
306
306
|
return similarTo(ctx, vector, opts);
|
|
307
307
|
},
|
|
308
308
|
async warmIndex(ctx) {
|
|
309
|
-
const { warmIndex } = await import("./collection-facade-
|
|
309
|
+
const { warmIndex } = await import("./collection-facade-VBM35WAH.js");
|
|
310
310
|
return warmIndex(ctx);
|
|
311
311
|
},
|
|
312
312
|
async flushIndex(ctx) {
|
|
313
|
-
const { flushIndex } = await import("./collection-facade-
|
|
313
|
+
const { flushIndex } = await import("./collection-facade-VBM35WAH.js");
|
|
314
314
|
return flushIndex(ctx);
|
|
315
315
|
},
|
|
316
316
|
async embedOnWrite(ctx, id, record, version) {
|
|
317
|
-
const { embedOnWrite } = await import("./collection-facade-
|
|
317
|
+
const { embedOnWrite } = await import("./collection-facade-VBM35WAH.js");
|
|
318
318
|
return embedOnWrite(ctx, id, record, version);
|
|
319
319
|
},
|
|
320
320
|
async rebuildEmbeddings(ctx) {
|
|
321
|
-
const { rebuildEmbeddings } = await import("./collection-facade-
|
|
321
|
+
const { rebuildEmbeddings } = await import("./collection-facade-VBM35WAH.js");
|
|
322
322
|
return rebuildEmbeddings(ctx);
|
|
323
323
|
}
|
|
324
324
|
};
|
|
@@ -364,4 +364,4 @@ export {
|
|
|
364
364
|
buildBlobFieldEntries,
|
|
365
365
|
withSearch
|
|
366
366
|
};
|
|
367
|
-
//# sourceMappingURL=chunk-
|
|
367
|
+
//# sourceMappingURL=chunk-GTHVPVAR.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NonAdditiveSchemaChangeError,
|
|
3
3
|
SchemaLockedError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CWM4GQD2.js";
|
|
5
5
|
|
|
6
6
|
// src/with-shape/schema-update/strategies.ts
|
|
7
7
|
function blindUpdate() {
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
lockSchema,
|
|
63
63
|
coordinatedCutover
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-GWO2IDAB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ValidationError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CWM4GQD2.js";
|
|
4
4
|
|
|
5
5
|
// src/with-formula/derivations/with-derivation.ts
|
|
6
6
|
function withDerivation(spec) {
|
|
@@ -126,4 +126,4 @@ export {
|
|
|
126
126
|
withDerivation,
|
|
127
127
|
withRollup
|
|
128
128
|
};
|
|
129
|
-
//# sourceMappingURL=chunk-
|
|
129
|
+
//# sourceMappingURL=chunk-H3G4I3PN.js.map
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
freezeSnapshotOnly
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5Q7AJ7DN.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveManagedSecret
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OTHHO3KI.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
assertRosterTagValid,
|
|
9
|
+
createOwnerKeyring,
|
|
10
|
+
mintRosterTag,
|
|
11
|
+
requireRosterKey
|
|
12
|
+
} from "./chunk-CAGI4LLJ.js";
|
|
10
13
|
import {
|
|
11
14
|
buildRecordEnvelope
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PENPHA45.js";
|
|
13
16
|
import {
|
|
14
17
|
wrapKey
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AU3AUJIZ.js";
|
|
16
19
|
import {
|
|
17
20
|
PermissionDeniedError
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CWM4GQD2.js";
|
|
19
22
|
|
|
20
23
|
// src/with-party/team/deed.ts
|
|
21
24
|
var DEED_RECORD_ID = "deed";
|
|
@@ -96,11 +99,15 @@ async function liberateVault(vault, opts) {
|
|
|
96
99
|
throw new PermissionDeniedError(`new owner keyring for "${opts.newOwnerId}" did not persist`);
|
|
97
100
|
}
|
|
98
101
|
const keyringFile = JSON.parse(env._data);
|
|
102
|
+
const mintedRosterKey = requireRosterKey(newOwner, "liberateVault");
|
|
103
|
+
await assertRosterTagValid(keyringFile, mintedRosterKey, opts.newOwnerId);
|
|
99
104
|
const mergedDeks = { ...keyringFile.deks };
|
|
100
105
|
for (const [collection, dek] of keyring.deks) {
|
|
101
106
|
mergedDeks[collection] = await wrapKey(dek, newOwner.kek);
|
|
102
107
|
}
|
|
103
|
-
const
|
|
108
|
+
const rosterKey = requireRosterKey(keyring, "liberateVault");
|
|
109
|
+
const merged = { ...keyringFile, deks: mergedDeks };
|
|
110
|
+
const mergedFile = { ...merged, roster_tag: await mintRosterTag(merged, rosterKey) };
|
|
104
111
|
await adapter.put(vaultName, "_keyring", opts.newOwnerId, { ...env, _data: JSON.stringify(mergedFile) });
|
|
105
112
|
await vault._getLedgerOrNull()?.append({
|
|
106
113
|
op: "lifecycle",
|
|
@@ -128,4 +135,4 @@ export {
|
|
|
128
135
|
isDeedVault,
|
|
129
136
|
liberateVault
|
|
130
137
|
};
|
|
131
|
-
//# sourceMappingURL=chunk-
|
|
138
|
+
//# sourceMappingURL=chunk-HQSPF5IY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-party/team/deed.ts","../src/with-party/custody/liberate.ts"],"sourcesContent":["/**\n * FR-6 — Deed: sealed / hidden-owner provisioning.\n *\n * A **Deed** is a vault owned by a *latent* principal who never\n * authenticates. The owner credential (the random secret that\n * derives `KEK_owner`) is minted machine-side and sealed under a\n * **non-firm** {@link SealingKeyProvider} — that sealing boundary is\n * the cryptographic *inalienability anchor*: whoever holds the\n * provider (the client / their KMS) is the only party that can ever\n * re-derive `KEK_owner`. A firm-side custodian operates the vault\n * fully but can never reach the owner key — there is deliberately NO\n * firm-controlled fallback.\n *\n * Provisioning reuses the managed-mode seam:\n * - {@link resolveManagedSecret} mints + seals + persists the random\n * secret at `_meta/sealed-secret` (and unseals it on every\n * subsequent open through the same provider).\n * - {@link createOwnerKeyring} derives `KEK_owner` from that\n * secret and writes the `_keyring/<ownerUserId>` file.\n *\n * On top of that, a Deed writes a `_meta/deed` **marker**. The marker\n * is PLAINTEXT metadata — it records WHO the latent owner is and WHICH\n * sealing boundary protects them, so it must be readable without\n * unlocking the vault (a custodian or auditor inspecting the vault must\n * be able to see \"this is a Deed vault, owner = X, sealed under Y\"\n * without any key). The marker itself is therefore never sealed; only\n * the owner *credential* is.\n *\n * @module\n */\n\nimport { buildRecordEnvelope } from '../../kernel/enclave/index.js'\nimport type { NoydbStore } from '../../kernel/types.js'\nimport type { UnlockedKeyring } from './keyring.js'\nimport { createOwnerKeyring } from './keyring.js'\nimport type { SealingKeyProvider } from './managed-secret.js'\nimport { resolveManagedSecret } from './managed-secret.js'\n\n/** Reserved id for the Deed marker under `_meta`. */\nexport const DEED_RECORD_ID = 'deed' as const\n\n/**\n * Plaintext metadata recording a vault's latent-owner Deed. Persisted\n * at `_meta/deed`. Readable without unlocking the vault by design — it\n * carries no secret material, only the identity of the latent owner\n * and the sealing boundary that anchors inalienability.\n */\nexport interface DeedMarker {\n /** The latent owner principal — the user id of the `_keyring/<id>` owner file. */\n readonly ownerUserId: string\n /**\n * The `SealingKeyProvider.id` the owner credential is sealed under.\n * The inalienability anchor: only the holder of this (non-firm)\n * provider can re-derive `KEK_owner`. Audit metadata — never secret.\n */\n readonly sealedUnder: string\n /** Always `true` for a Deed — the owner never authenticates interactively. */\n readonly latent: true\n /** ISO-8601 timestamp the Deed was issued. */\n readonly issuedAt: string\n /**\n * ISO-8601 timestamp the vault was liberated (a new owner claimed it\n * via the audited Liberate ceremony), if any. Absent until liberation.\n */\n readonly liberatedAt?: string\n}\n\n/**\n * Wire-format payload stored inside the `_meta/deed` envelope. Carries\n * a magic marker for forensics + the {@link DeedMarker} fields. JSON,\n * AES-GCM bypassed (the marker is plaintext metadata by design).\n */\ninterface DeedEnvelopePayload extends DeedMarker {\n readonly _noydb_deed: 1\n}\n\n/**\n * Provision a Deed: a latent owner whose credential is sealed under\n * `sealing` (a NON-firm provider). Mints + seals the owner secret\n * via {@link resolveManagedSecret}, derives the owner keyring via\n * {@link createOwnerKeyring}, then writes the plaintext `_meta/deed`\n * marker. Returns the unlocked owner keyring.\n *\n * The returned keyring is the only in-memory window onto `KEK_owner`\n * for this call; the persistent re-entry point is the sealing provider\n * (re-run {@link resolveManagedSecret} with the same provider to\n * re-resolve the secret, then {@link createOwnerKeyring}/load to\n * unlock — no interactive secret is ever required).\n *\n * There is deliberately no firm-controlled fallback: the marker's\n * `sealedUnder` is the single cryptographic anchor of ownership.\n */\nexport async function createDeedOwner(\n store: NoydbStore,\n vault: string,\n ownerUserId: string,\n sealing: SealingKeyProvider,\n): Promise<UnlockedKeyring> {\n // 1. Mint + seal + persist the random owner secret under the\n // non-firm provider (writes _meta/sealed-secret).\n const secret = await resolveManagedSecret(store, vault, sealing)\n\n // 2. Derive KEK_owner from the (never-human-seen) secret and\n // write the owner keyring file.\n const keyring = await createOwnerKeyring(store, vault, { userId: ownerUserId, secret: secret })\n\n // 3. Write the plaintext Deed marker. NOT sealed — it is audit\n // metadata that must be readable without unlocking.\n await saveDeedMarker(store, vault, {\n ownerUserId,\n sealedUnder: sealing.id,\n latent: true,\n issuedAt: new Date().toISOString(),\n })\n\n return keyring\n}\n\n/**\n * Read the {@link DeedMarker} from `_meta/deed`, or `null` if the vault\n * has no Deed marker (i.e. it is not a Deed vault). Plaintext read — no\n * unlocking required.\n */\nexport async function loadDeedMarker(\n store: NoydbStore,\n vault: string,\n): Promise<DeedMarker | null> {\n const envelope = await store.get(vault, '_meta', DEED_RECORD_ID)\n if (!envelope) return null\n let payload: unknown\n try {\n payload = JSON.parse(envelope._data)\n } catch {\n return null\n }\n if (typeof payload !== 'object' || payload === null) return null\n const r = payload as Record<string, unknown>\n if (r._noydb_deed !== 1) return null\n if (\n typeof r.ownerUserId !== 'string'\n || typeof r.sealedUnder !== 'string'\n || r.latent !== true\n || typeof r.issuedAt !== 'string'\n ) {\n return null\n }\n const marker: DeedMarker = {\n ownerUserId: r.ownerUserId,\n sealedUnder: r.sealedUnder,\n latent: true,\n issuedAt: r.issuedAt,\n ...(typeof r.liberatedAt === 'string' ? { liberatedAt: r.liberatedAt } : {}),\n }\n return marker\n}\n\n/** Whether `vault` carries a Deed marker (a sealed/latent owner). */\nexport async function isDeedVault(\n store: NoydbStore,\n vault: string,\n): Promise<boolean> {\n return (await loadDeedMarker(store, vault)) !== null\n}\n\n/**\n * Persist a {@link DeedMarker} at `_meta/deed`. Mirrors\n * `saveSealedSecret`'s envelope shape: a standard\n * {@link EncryptedEnvelope} with AES-GCM bypassed (`_iv: ''`), the\n * payload stored as plaintext JSON in `_data`. The marker is metadata,\n * not a secret — sealing it would defeat its purpose (auditors /\n * custodians must read it without a key).\n *\n * @internal — used by `createDeedOwner` and (later) the Liberate\n * ceremony to stamp `liberatedAt`.\n */\nexport async function saveDeedMarker(\n store: NoydbStore,\n vault: string,\n marker: DeedMarker,\n): Promise<void> {\n const persisted: DeedEnvelopePayload = { _noydb_deed: 1, ...marker }\n const prior = await store.get(vault, '_meta', DEED_RECORD_ID)\n const env = buildRecordEnvelope(\n { collection: '_meta', id: DEED_RECORD_ID, version: (prior?._v ?? 0) + 1 },\n // AES-GCM bypassed — the marker is plaintext audit metadata.\n { iv: '', data: JSON.stringify(persisted) },\n )\n await store.put(vault, '_meta', DEED_RECORD_ID, env)\n}\n","/**\n * `liberateVault` — the audited claim of ownership over a\n * sealed-owner (Deed) vault. The inverse of withdrawal.\n *\n * A **Deed** vault's owner credential is sealed under a non-firm provider, so\n * the firm-side **custodian** (which holds every collection DEK and operates\n * the vault fully) can never reach `KEK_owner`. Liberation is the ONLY route\n * by which a custodian assumes ownership, and it is deliberately a manual,\n * audited ceremony:\n *\n * 1. gate `'liberate-vault'` (fail-closed)\n * 2. caller MUST be the `custodian` (the de-facto authority holding the DEKs)\n * 3. freeze a PRE-liberation EVIDENCE snapshot (hash-pinned in the ledger) —\n * but PRESERVE the live data for the new owner (see the freeze decision\n * below)\n * 4. mint a NEW owner keyring re-wrapping the incumbent DEKs under the new\n * owner's KEK\n * 5. lifecycle ledger `liberation-claimed:<newOwnerId>:<legalBasis>`\n * 6. stamp the `_meta/deed` marker with `liberatedAt`\n *\n * ## Security: the inalienability floor\n *\n * Liberation **mints a new owner from the custodian's DEKs** — it does NOT\n * unseal the original sealed owner. The old sealed-owner credential is left\n * untouched and ORPHANED (its `_keyring/<id>` file remains, its KEK is still\n * sealed under the non-firm provider), never impersonated. The new owner is a\n * DISTINCT principal under a fresh KEK derived from `newOwnerSecret`. This\n * preserves the inalienability floor: the act of claiming ownership is itself\n * auditable and produces a different principal, rather than silently assuming\n * the latent owner's identity.\n *\n * ## Freeze decision: snapshot-only, not freeze-and-delete\n *\n * `freezeAndDeleteClosure` (withdraw-accessible.ts) writes a hash-pinned\n * snapshot and THEN delete-closures the live records — correct for a\n * destructive withdrawal, WRONG for liberation. Liberation transfers\n * operational continuity; it must leave the live data intact for the new\n * owner. We therefore call the snapshot-only core `freezeSnapshotOnly`\n * (factored out of that module; the freeze-AND-delete withdrawal path is\n * unchanged) to pin the evidence snapshot while preserving the records.\n *\n * @module\n */\n\nimport type { Vault } from '../../kernel/vault.js'\nimport type { FactorProofBundle, KeyringFile } from '../../kernel/types.js'\nimport { PermissionDeniedError } from '../../kernel/errors.js'\nimport { wrapKey } from '../../kernel/enclave/index.js'\nimport { createOwnerKeyring } from '../team/keyring.js'\nimport type { FrozenSnapshotRef } from '../../with-audit/portability/withdraw-accessible.js'\nimport { freezeSnapshotOnly } from '../../with-audit/portability/withdraw-accessible.js'\nimport { loadDeedMarker, saveDeedMarker } from '../team/deed.js'\n\nexport interface LiberateOptions {\n /** The id of the new owner principal the custodian mints by claiming ownership. */\n readonly newOwnerId: string\n /** The secret that derives the new owner's KEK (the DEKs are re-wrapped under it). */\n readonly newOwnerSecret: string\n /** Legal/contractual basis recorded in the audit (e.g. 'contractual-handover'). */\n readonly legalBasis: string\n readonly factors?: FactorProofBundle\n}\n\nexport interface LiberateResult {\n /** The hash-pinned pre-liberation evidence snapshot. */\n readonly snapshot: FrozenSnapshotRef\n}\n\n/**\n * Audited claim of ownership over a sealed-owner vault by its custodian. See\n * the module doc for the full ceremony + security rationale.\n */\nexport async function liberateVault(\n vault: Vault,\n opts: LiberateOptions,\n): Promise<LiberateResult> {\n // 1. gate — fail-closed `liberate-vault`.\n await vault.noydb.checkGate(vault.name, 'liberate-vault', opts.factors)\n\n // 2. caller must be the custodian (the de-facto authority holding the DEKs).\n const { name: vaultName, adapter, keyring } = vault._introspectState()\n if (keyring.role !== 'custodian') {\n throw new PermissionDeniedError(\n 'liberation is claimed only by the custodian (the de-facto authority holding the DEKs)',\n )\n }\n\n // Refuse to clobber an existing principal: the new owner must be a FRESH id.\n // (Checked before any side effect so a colliding id never leaves a half-run\n // ceremony — no orphan snapshot, no partial keyring overwrite.)\n const existing = await adapter.get(vaultName, '_keyring', opts.newOwnerId)\n if (existing) {\n throw new PermissionDeniedError(\n `liberateVault: newOwnerId \"${opts.newOwnerId}\" already exists as a principal; choose a fresh id (liberation mints a distinct owner, it never overwrites an existing keyring)`,\n )\n }\n\n // 3. Pre-liberation EVIDENCE snapshot of every operational collection —\n // snapshot-only (live data preserved for the new owner; liberation\n // transfers operational continuity, it does not erase).\n const collections = await listOperationalCollections(vault)\n const snapshot = await freezeSnapshotOnly(vault, collections, { actorUserId: keyring.userId })\n\n // 4. Mint a NEW owner keyring, re-wrapping the incumbent DEKs under the new\n // owner's fresh KEK. The old sealed owner is NOT unsealed — a DISTINCT\n // principal is minted and the original owner credential is left orphaned\n // (inalienability floor). Mirrors adopt-partition.ts's DEK re-wrap.\n const newOwner = await createOwnerKeyring(adapter, vaultName, { userId: opts.newOwnerId, secret: opts.newOwnerSecret })\n if (!newOwner.kek) {\n throw new PermissionDeniedError(\n `new owner keyring for \"${opts.newOwnerId}\" has no KEK to re-wrap the incumbent DEKs under`,\n )\n }\n const env = await adapter.get(vaultName, '_keyring', opts.newOwnerId)\n if (!env) {\n throw new PermissionDeniedError(`new owner keyring for \"${opts.newOwnerId}\" did not persist`)\n }\n const keyringFile = JSON.parse(env._data) as KeyringFile\n const mergedDeks: Record<string, string> = { ...keyringFile.deks }\n for (const [collection, dek] of keyring.deks) {\n mergedDeks[collection] = await wrapKey(dek, newOwner.kek)\n }\n const mergedFile: KeyringFile = { ...keyringFile, deks: mergedDeks }\n await adapter.put(vaultName, '_keyring', opts.newOwnerId, { ...env, _data: JSON.stringify(mergedFile) })\n\n // 5. Lifecycle ledger audit (no-op if the history strategy is absent).\n await vault._getLedgerOrNull()?.append({\n op: 'lifecycle', collection: '', id: '', version: 0, actor: opts.newOwnerId, payloadHash: '',\n reason: `liberation-claimed:${opts.newOwnerId}:${opts.legalBasis}`,\n })\n\n // 6. Stamp the Deed marker with `liberatedAt` (if a marker exists).\n const marker = await loadDeedMarker(adapter, vaultName)\n if (marker) {\n await saveDeedMarker(adapter, vaultName, { ...marker, liberatedAt: new Date().toISOString() })\n }\n\n return { snapshot }\n}\n\n/**\n * Enumerate the vault's operational (user-facing) collections — those carried\n * by the caller's keyring DEK map, minus the reserved internal collections\n * (`_*`). These are the collections frozen into the evidence snapshot.\n */\nasync function listOperationalCollections(vault: Vault): Promise<readonly string[]> {\n const { keyring } = vault._introspectState()\n return [...keyring.deks.keys()].filter((c) => !c.startsWith('_'))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuCO,IAAM,iBAAiB;AAqD9B,eAAsB,gBACpB,OACA,OACA,aACA,SAC0B;AAG1B,QAAM,SAAS,MAAM,qBAAqB,OAAO,OAAO,OAAO;AAI/D,QAAM,UAAU,MAAM,mBAAmB,OAAO,OAAO,EAAE,QAAQ,aAAa,OAAe,CAAC;AAI9F,QAAM,eAAe,OAAO,OAAO;AAAA,IACjC;AAAA,IACA,aAAa,QAAQ;AAAA,IACrB,QAAQ;AAAA,IACR,WAAU,oBAAI,KAAK,GAAE,YAAY;AAAA,EACnC,CAAC;AAED,SAAO;AACT;AAOA,eAAsB,eACpB,OACA,OAC4B;AAC5B,QAAM,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,KAAK,UAAU,IAAI,KAAK,UAAU;AAAA,EAClE,CAAC;AAGD,QAAM,SAAS,MAAM,eAAe,SAAS,SAAS;AACtD,MAAI,QAAQ;AACV,UAAM,eAAe,SAAS,WAAW,EAAE,GAAG,QAAQ,cAAa,oBAAI,KAAK,GAAE,YAAY,EAAE,CAAC;AAAA,EAC/F;AAEA,SAAO,EAAE,SAAS;AACpB;AAOA,eAAe,2BAA2B,OAA0C;AAClF,QAAM,EAAE,QAAQ,IAAI,MAAM,iBAAiB;AAC3C,SAAO,CAAC,GAAG,QAAQ,KAAK,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,CAAC;AAClE;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/with-party/team/deed.ts","../src/with-party/custody/liberate.ts"],"sourcesContent":["/**\n * FR-6 — Deed: sealed / hidden-owner provisioning.\n *\n * A **Deed** is a vault owned by a *latent* principal who never\n * authenticates. The owner credential (the random secret that\n * derives `KEK_owner`) is minted machine-side and sealed under a\n * **non-firm** {@link SealingKeyProvider} — that sealing boundary is\n * the cryptographic *inalienability anchor*: whoever holds the\n * provider (the client / their KMS) is the only party that can ever\n * re-derive `KEK_owner`. A firm-side custodian operates the vault\n * fully but can never reach the owner key — there is deliberately NO\n * firm-controlled fallback.\n *\n * Provisioning reuses the managed-mode seam:\n * - {@link resolveManagedSecret} mints + seals + persists the random\n * secret at `_meta/sealed-secret` (and unseals it on every\n * subsequent open through the same provider).\n * - {@link createOwnerKeyring} derives `KEK_owner` from that\n * secret and writes the `_keyring/<ownerUserId>` file.\n *\n * On top of that, a Deed writes a `_meta/deed` **marker**. The marker\n * is PLAINTEXT metadata — it records WHO the latent owner is and WHICH\n * sealing boundary protects them, so it must be readable without\n * unlocking the vault (a custodian or auditor inspecting the vault must\n * be able to see \"this is a Deed vault, owner = X, sealed under Y\"\n * without any key). The marker itself is therefore never sealed; only\n * the owner *credential* is.\n *\n * @module\n */\n\nimport { buildRecordEnvelope } from '../../kernel/enclave/index.js'\nimport type { NoydbStore } from '../../kernel/types.js'\nimport type { UnlockedKeyring } from './keyring.js'\nimport { createOwnerKeyring } from './keyring.js'\nimport type { SealingKeyProvider } from './managed-secret.js'\nimport { resolveManagedSecret } from './managed-secret.js'\n\n/** Reserved id for the Deed marker under `_meta`. */\nexport const DEED_RECORD_ID = 'deed' as const\n\n/**\n * Plaintext metadata recording a vault's latent-owner Deed. Persisted\n * at `_meta/deed`. Readable without unlocking the vault by design — it\n * carries no secret material, only the identity of the latent owner\n * and the sealing boundary that anchors inalienability.\n */\nexport interface DeedMarker {\n /** The latent owner principal — the user id of the `_keyring/<id>` owner file. */\n readonly ownerUserId: string\n /**\n * The `SealingKeyProvider.id` the owner credential is sealed under.\n * The inalienability anchor: only the holder of this (non-firm)\n * provider can re-derive `KEK_owner`. Audit metadata — never secret.\n */\n readonly sealedUnder: string\n /** Always `true` for a Deed — the owner never authenticates interactively. */\n readonly latent: true\n /** ISO-8601 timestamp the Deed was issued. */\n readonly issuedAt: string\n /**\n * ISO-8601 timestamp the vault was liberated (a new owner claimed it\n * via the audited Liberate ceremony), if any. Absent until liberation.\n */\n readonly liberatedAt?: string\n}\n\n/**\n * Wire-format payload stored inside the `_meta/deed` envelope. Carries\n * a magic marker for forensics + the {@link DeedMarker} fields. JSON,\n * AES-GCM bypassed (the marker is plaintext metadata by design).\n */\ninterface DeedEnvelopePayload extends DeedMarker {\n readonly _noydb_deed: 1\n}\n\n/**\n * Provision a Deed: a latent owner whose credential is sealed under\n * `sealing` (a NON-firm provider). Mints + seals the owner secret\n * via {@link resolveManagedSecret}, derives the owner keyring via\n * {@link createOwnerKeyring}, then writes the plaintext `_meta/deed`\n * marker. Returns the unlocked owner keyring.\n *\n * The returned keyring is the only in-memory window onto `KEK_owner`\n * for this call; the persistent re-entry point is the sealing provider\n * (re-run {@link resolveManagedSecret} with the same provider to\n * re-resolve the secret, then {@link createOwnerKeyring}/load to\n * unlock — no interactive secret is ever required).\n *\n * There is deliberately no firm-controlled fallback: the marker's\n * `sealedUnder` is the single cryptographic anchor of ownership.\n */\nexport async function createDeedOwner(\n store: NoydbStore,\n vault: string,\n ownerUserId: string,\n sealing: SealingKeyProvider,\n): Promise<UnlockedKeyring> {\n // 1. Mint + seal + persist the random owner secret under the\n // non-firm provider (writes _meta/sealed-secret).\n const secret = await resolveManagedSecret(store, vault, sealing)\n\n // 2. Derive KEK_owner from the (never-human-seen) secret and\n // write the owner keyring file.\n const keyring = await createOwnerKeyring(store, vault, { userId: ownerUserId, secret: secret })\n\n // 3. Write the plaintext Deed marker. NOT sealed — it is audit\n // metadata that must be readable without unlocking.\n await saveDeedMarker(store, vault, {\n ownerUserId,\n sealedUnder: sealing.id,\n latent: true,\n issuedAt: new Date().toISOString(),\n })\n\n return keyring\n}\n\n/**\n * Read the {@link DeedMarker} from `_meta/deed`, or `null` if the vault\n * has no Deed marker (i.e. it is not a Deed vault). Plaintext read — no\n * unlocking required.\n */\nexport async function loadDeedMarker(\n store: NoydbStore,\n vault: string,\n): Promise<DeedMarker | null> {\n const envelope = await store.get(vault, '_meta', DEED_RECORD_ID)\n if (!envelope) return null\n let payload: unknown\n try {\n payload = JSON.parse(envelope._data)\n } catch {\n return null\n }\n if (typeof payload !== 'object' || payload === null) return null\n const r = payload as Record<string, unknown>\n if (r._noydb_deed !== 1) return null\n if (\n typeof r.ownerUserId !== 'string'\n || typeof r.sealedUnder !== 'string'\n || r.latent !== true\n || typeof r.issuedAt !== 'string'\n ) {\n return null\n }\n const marker: DeedMarker = {\n ownerUserId: r.ownerUserId,\n sealedUnder: r.sealedUnder,\n latent: true,\n issuedAt: r.issuedAt,\n ...(typeof r.liberatedAt === 'string' ? { liberatedAt: r.liberatedAt } : {}),\n }\n return marker\n}\n\n/** Whether `vault` carries a Deed marker (a sealed/latent owner). */\nexport async function isDeedVault(\n store: NoydbStore,\n vault: string,\n): Promise<boolean> {\n return (await loadDeedMarker(store, vault)) !== null\n}\n\n/**\n * Persist a {@link DeedMarker} at `_meta/deed`. Mirrors\n * `saveSealedSecret`'s envelope shape: a standard\n * {@link EncryptedEnvelope} with AES-GCM bypassed (`_iv: ''`), the\n * payload stored as plaintext JSON in `_data`. The marker is metadata,\n * not a secret — sealing it would defeat its purpose (auditors /\n * custodians must read it without a key).\n *\n * @internal — used by `createDeedOwner` and (later) the Liberate\n * ceremony to stamp `liberatedAt`.\n */\nexport async function saveDeedMarker(\n store: NoydbStore,\n vault: string,\n marker: DeedMarker,\n): Promise<void> {\n const persisted: DeedEnvelopePayload = { _noydb_deed: 1, ...marker }\n const prior = await store.get(vault, '_meta', DEED_RECORD_ID)\n const env = buildRecordEnvelope(\n { collection: '_meta', id: DEED_RECORD_ID, version: (prior?._v ?? 0) + 1 },\n // AES-GCM bypassed — the marker is plaintext audit metadata.\n { iv: '', data: JSON.stringify(persisted) },\n )\n await store.put(vault, '_meta', DEED_RECORD_ID, env)\n}\n","/**\n * `liberateVault` — the audited claim of ownership over a\n * sealed-owner (Deed) vault. The inverse of withdrawal.\n *\n * A **Deed** vault's owner credential is sealed under a non-firm provider, so\n * the firm-side **custodian** (which holds every collection DEK and operates\n * the vault fully) can never reach `KEK_owner`. Liberation is the ONLY route\n * by which a custodian assumes ownership, and it is deliberately a manual,\n * audited ceremony:\n *\n * 1. gate `'liberate-vault'` (fail-closed)\n * 2. caller MUST be the `custodian` (the de-facto authority holding the DEKs)\n * 3. freeze a PRE-liberation EVIDENCE snapshot (hash-pinned in the ledger) —\n * but PRESERVE the live data for the new owner (see the freeze decision\n * below)\n * 4. mint a NEW owner keyring re-wrapping the incumbent DEKs under the new\n * owner's KEK\n * 5. lifecycle ledger `liberation-claimed:<newOwnerId>:<legalBasis>`\n * 6. stamp the `_meta/deed` marker with `liberatedAt`\n *\n * ## Security: the inalienability floor\n *\n * Liberation **mints a new owner from the custodian's DEKs** — it does NOT\n * unseal the original sealed owner. The old sealed-owner credential is left\n * untouched and ORPHANED (its `_keyring/<id>` file remains, its KEK is still\n * sealed under the non-firm provider), never impersonated. The new owner is a\n * DISTINCT principal under a fresh KEK derived from `newOwnerSecret`. This\n * preserves the inalienability floor: the act of claiming ownership is itself\n * auditable and produces a different principal, rather than silently assuming\n * the latent owner's identity.\n *\n * ## Freeze decision: snapshot-only, not freeze-and-delete\n *\n * `freezeAndDeleteClosure` (withdraw-accessible.ts) writes a hash-pinned\n * snapshot and THEN delete-closures the live records — correct for a\n * destructive withdrawal, WRONG for liberation. Liberation transfers\n * operational continuity; it must leave the live data intact for the new\n * owner. We therefore call the snapshot-only core `freezeSnapshotOnly`\n * (factored out of that module; the freeze-AND-delete withdrawal path is\n * unchanged) to pin the evidence snapshot while preserving the records.\n *\n * @module\n */\n\nimport type { Vault } from '../../kernel/vault.js'\nimport type { FactorProofBundle, KeyringFile } from '../../kernel/types.js'\nimport { PermissionDeniedError } from '../../kernel/errors.js'\nimport { wrapKey } from '../../kernel/enclave/index.js'\nimport { createOwnerKeyring, requireRosterKey } from '../team/keyring.js'\nimport { mintRosterTag, assertRosterTagValid } from '../team/roster-tag.js'\nimport type { FrozenSnapshotRef } from '../../with-audit/portability/withdraw-accessible.js'\nimport { freezeSnapshotOnly } from '../../with-audit/portability/withdraw-accessible.js'\nimport { loadDeedMarker, saveDeedMarker } from '../team/deed.js'\n\nexport interface LiberateOptions {\n /** The id of the new owner principal the custodian mints by claiming ownership. */\n readonly newOwnerId: string\n /** The secret that derives the new owner's KEK (the DEKs are re-wrapped under it). */\n readonly newOwnerSecret: string\n /** Legal/contractual basis recorded in the audit (e.g. 'contractual-handover'). */\n readonly legalBasis: string\n readonly factors?: FactorProofBundle\n}\n\nexport interface LiberateResult {\n /** The hash-pinned pre-liberation evidence snapshot. */\n readonly snapshot: FrozenSnapshotRef\n}\n\n/**\n * Audited claim of ownership over a sealed-owner vault by its custodian. See\n * the module doc for the full ceremony + security rationale.\n */\nexport async function liberateVault(\n vault: Vault,\n opts: LiberateOptions,\n): Promise<LiberateResult> {\n // 1. gate — fail-closed `liberate-vault`.\n await vault.noydb.checkGate(vault.name, 'liberate-vault', opts.factors)\n\n // 2. caller must be the custodian (the de-facto authority holding the DEKs).\n const { name: vaultName, adapter, keyring } = vault._introspectState()\n if (keyring.role !== 'custodian') {\n throw new PermissionDeniedError(\n 'liberation is claimed only by the custodian (the de-facto authority holding the DEKs)',\n )\n }\n\n // Refuse to clobber an existing principal: the new owner must be a FRESH id.\n // (Checked before any side effect so a colliding id never leaves a half-run\n // ceremony — no orphan snapshot, no partial keyring overwrite.)\n const existing = await adapter.get(vaultName, '_keyring', opts.newOwnerId)\n if (existing) {\n throw new PermissionDeniedError(\n `liberateVault: newOwnerId \"${opts.newOwnerId}\" already exists as a principal; choose a fresh id (liberation mints a distinct owner, it never overwrites an existing keyring)`,\n )\n }\n\n // 3. Pre-liberation EVIDENCE snapshot of every operational collection —\n // snapshot-only (live data preserved for the new owner; liberation\n // transfers operational continuity, it does not erase).\n const collections = await listOperationalCollections(vault)\n const snapshot = await freezeSnapshotOnly(vault, collections, { actorUserId: keyring.userId })\n\n // 4. Mint a NEW owner keyring, re-wrapping the incumbent DEKs under the new\n // owner's fresh KEK. The old sealed owner is NOT unsealed — a DISTINCT\n // principal is minted and the original owner credential is left orphaned\n // (inalienability floor). Mirrors adopt-partition.ts's DEK re-wrap.\n const newOwner = await createOwnerKeyring(adapter, vaultName, { userId: opts.newOwnerId, secret: opts.newOwnerSecret })\n if (!newOwner.kek) {\n throw new PermissionDeniedError(\n `new owner keyring for \"${opts.newOwnerId}\" has no KEK to re-wrap the incumbent DEKs under`,\n )\n }\n const env = await adapter.get(vaultName, '_keyring', opts.newOwnerId)\n if (!env) {\n throw new PermissionDeniedError(`new owner keyring for \"${opts.newOwnerId}\" did not persist`)\n }\n const keyringFile = JSON.parse(env._data) as KeyringFile\n // #1096 — this is a read-BACK of the file `createOwnerKeyring` just wrote, and\n // it is about to be edited and restamped, so the store gets a window to alter\n // it in between. Verified against the NEW owner's own roster key, not the\n // incumbent's: at this instant the file is still stamped under the fresh key\n // minted above (the swap to the incumbent key happens below).\n const mintedRosterKey = requireRosterKey(newOwner, 'liberateVault')\n await assertRosterTagValid(keyringFile, mintedRosterKey, opts.newOwnerId)\n const mergedDeks: Record<string, string> = { ...keyringFile.deks }\n for (const [collection, dek] of keyring.deks) {\n mergedDeks[collection] = await wrapKey(dek, newOwner.kek)\n }\n // #1096 — liberation joins a new owner to an EXISTING vault, so the vault's\n // roster key must stay the incumbent one. `createOwnerKeyring` above minted a\n // fresh roster key (correct for a new vault, wrong here), and the merge loop\n // has just overwritten `_roster` with the incumbent's — so the tag it stamped\n // no longer matches the key in the file. Restamp under the key that actually\n // ends up persisted, or the new owner cannot open the vault they just claimed.\n //\n // Keeping the incumbent key is the substantive half: a fresh one would leave\n // the new owner unable to verify any co-member's roster, and every co-member\n // unable to verify theirs.\n const rosterKey = requireRosterKey(keyring, 'liberateVault')\n const merged: KeyringFile = { ...keyringFile, deks: mergedDeks }\n const mergedFile: KeyringFile = { ...merged, roster_tag: await mintRosterTag(merged, rosterKey) }\n await adapter.put(vaultName, '_keyring', opts.newOwnerId, { ...env, _data: JSON.stringify(mergedFile) })\n\n // 5. Lifecycle ledger audit (no-op if the history strategy is absent).\n await vault._getLedgerOrNull()?.append({\n op: 'lifecycle', collection: '', id: '', version: 0, actor: opts.newOwnerId, payloadHash: '',\n reason: `liberation-claimed:${opts.newOwnerId}:${opts.legalBasis}`,\n })\n\n // 6. Stamp the Deed marker with `liberatedAt` (if a marker exists).\n const marker = await loadDeedMarker(adapter, vaultName)\n if (marker) {\n await saveDeedMarker(adapter, vaultName, { ...marker, liberatedAt: new Date().toISOString() })\n }\n\n return { snapshot }\n}\n\n/**\n * Enumerate the vault's operational (user-facing) collections — those carried\n * by the caller's keyring DEK map, minus the reserved internal collections\n * (`_*`). These are the collections frozen into the evidence snapshot.\n */\nasync function listOperationalCollections(vault: Vault): Promise<readonly string[]> {\n const { keyring } = vault._introspectState()\n return [...keyring.deks.keys()].filter((c) => !c.startsWith('_'))\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5
5
|
// src/with-audit/attestation/strategy.ts
|
|
6
6
|
var NO_ATTESTATION = {
|
|
@@ -27,4 +27,4 @@ var NO_ATTESTATION = {
|
|
|
27
27
|
export {
|
|
28
28
|
NO_ATTESTATION
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-HR5R5JOM.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ValidationError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CWM4GQD2.js";
|
|
4
4
|
|
|
5
5
|
// src/with-formula/overlay-views/with-overlayed-view.ts
|
|
6
6
|
function withOverlayedView(spec) {
|
|
@@ -33,4 +33,4 @@ function withOverlayedView(spec) {
|
|
|
33
33
|
export {
|
|
34
34
|
withOverlayedView
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-HYYVT2KZ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ReadOnlyFrameError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CWM4GQD2.js";
|
|
4
4
|
|
|
5
5
|
// src/with-fork/shadow/vault-frame.ts
|
|
6
6
|
var VaultFrame = class {
|
|
@@ -71,4 +71,4 @@ export {
|
|
|
71
71
|
VaultFrame,
|
|
72
72
|
CollectionFrame
|
|
73
73
|
};
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
74
|
+
//# sourceMappingURL=chunk-I6QKB7MT.js.map
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-IGJCYUT5.js";
|
|
4
4
|
import {
|
|
5
5
|
installViaBinder
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JNMTN5D5.js";
|
|
7
7
|
import {
|
|
8
8
|
NoydbError,
|
|
9
9
|
ValidationError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CWM4GQD2.js";
|
|
11
11
|
|
|
12
12
|
// src/via/money/iso4217.ts
|
|
13
13
|
var MINOR_UNITS = {
|
|
@@ -1044,4 +1044,4 @@ export {
|
|
|
1044
1044
|
decodeMoneyFields,
|
|
1045
1045
|
exactMath
|
|
1046
1046
|
};
|
|
1047
|
-
//# sourceMappingURL=chunk-
|
|
1047
|
+
//# sourceMappingURL=chunk-ICDHUUMQ.js.map
|