@noy-db/hub 0.4.0-pre.6 → 0.4.0-pre.7
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/dist/api-3NKVNZPM.js +20 -0
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-USYSNCYM.js → backup-PTSVXDDW.js} +13 -13
- package/dist/blobs/index.js +13 -13
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/cargo/index.js +31 -29
- package/dist/{chunk-5WLDZZ6S.js → chunk-35NMVJ7I.js} +3 -3
- package/dist/{chunk-ZGEFBDPR.js → chunk-3HUYRN24.js} +3 -3
- package/dist/chunk-3HUYRN24.js.map +1 -0
- package/dist/{chunk-NA374QG7.js → chunk-3XKESW5E.js} +3 -3
- package/dist/{chunk-MUPZ6IZX.js → chunk-4JQK3L4V.js} +2 -2
- package/dist/{chunk-Z4D3YGAB.js → chunk-4ZKNC6A6.js} +2 -2
- package/dist/{chunk-ONB627HU.js → chunk-55LX6FSX.js} +2 -2
- package/dist/{chunk-M7W2KYTL.js → chunk-56IIVAEO.js} +2 -2
- package/dist/{chunk-FHHYCBBP.js → chunk-5DRROK5W.js} +2 -2
- package/dist/{chunk-GTNRMJYH.js → chunk-5GQEU4DN.js} +2 -2
- package/dist/{chunk-XSOGLHGY.js → chunk-6L3DKWRY.js} +6 -6
- package/dist/chunk-6LJY7X5A.js +18 -0
- package/dist/chunk-6LJY7X5A.js.map +1 -0
- package/dist/{chunk-44Y3P5U6.js → chunk-6M2I3DKF.js} +2 -2
- package/dist/{chunk-HDF5R2K6.js → chunk-6R6Q3MRN.js} +7 -7
- package/dist/{chunk-ZUDAK436.js → chunk-6UBZ6I5Z.js} +2 -2
- package/dist/{chunk-SEU6QHH4.js → chunk-6ZNSB3H6.js} +5 -17
- package/dist/chunk-6ZNSB3H6.js.map +1 -0
- package/dist/{chunk-7U6AB7DZ.js → chunk-AKKRXT23.js} +2 -2
- package/dist/{chunk-2PDBYF2O.js → chunk-AT2JJEKJ.js} +4 -4
- package/dist/chunk-AT2JJEKJ.js.map +1 -0
- package/dist/{chunk-OWLZONGX.js → chunk-BLBAQRBM.js} +2 -2
- package/dist/{chunk-XONZGK6J.js → chunk-BN4HRYAZ.js} +2 -2
- package/dist/{chunk-QVGEVZ5F.js → chunk-BQ6DHN4I.js} +3 -3
- package/dist/{chunk-LG2GUYRX.js → chunk-BYFXLDVV.js} +9 -9
- package/dist/{chunk-M4GO4ZJK.js → chunk-C25JXSOR.js} +137 -11
- package/dist/chunk-C25JXSOR.js.map +1 -0
- package/dist/{chunk-3TZUC4WS.js → chunk-CCDP6EPB.js} +13 -355
- package/dist/chunk-CCDP6EPB.js.map +1 -0
- package/dist/{chunk-QRHEAZ2Q.js → chunk-CUZLNGD5.js} +1 -1
- package/dist/{chunk-HXVRRJBD.js → chunk-DGBIHDVK.js} +5 -5
- package/dist/chunk-DSDXAKIP.js +50 -0
- package/dist/chunk-DSDXAKIP.js.map +1 -0
- package/dist/{chunk-JGOKAZNB.js → chunk-DZAF24PG.js} +5 -5
- package/dist/{chunk-NIKO2BBZ.js → chunk-DZFQVICS.js} +2 -2
- package/dist/chunk-DZFQVICS.js.map +1 -0
- package/dist/chunk-E23UGFVC.js +63 -0
- package/dist/chunk-E23UGFVC.js.map +1 -0
- package/dist/{chunk-YGMREQAK.js → chunk-EBKCYQ2D.js} +14 -14
- package/dist/chunk-EBKCYQ2D.js.map +1 -0
- package/dist/{chunk-TMR64XPL.js → chunk-EZNTORXE.js} +2 -2
- package/dist/{chunk-WCJJQV2D.js → chunk-FMNU7IUG.js} +3 -3
- package/dist/{chunk-H5GMROCB.js → chunk-FO6RNKKW.js} +8 -46
- package/dist/chunk-FO6RNKKW.js.map +1 -0
- package/dist/{chunk-YMUGBZN2.js → chunk-FQ5CHJR7.js} +1 -1
- package/dist/chunk-FQ5CHJR7.js.map +1 -0
- package/dist/{chunk-MQBFT2OT.js → chunk-FRMW23UK.js} +7 -7
- package/dist/chunk-FRMW23UK.js.map +1 -0
- package/dist/chunk-GJW4HX2O.js +1 -0
- package/dist/{chunk-JTIPVW4J.js → chunk-GP3UWP22.js} +4 -4
- package/dist/{chunk-DOZFU7OZ.js → chunk-GZACYEOB.js} +1 -1
- package/dist/chunk-GZACYEOB.js.map +1 -0
- package/dist/{chunk-XG7OZDOS.js → chunk-HFUAFR6B.js} +6 -6
- package/dist/{chunk-LN3MQFUE.js → chunk-IF6WNGAK.js} +9 -6
- package/dist/chunk-IF6WNGAK.js.map +1 -0
- package/dist/{chunk-ZX5FNWH7.js → chunk-IG6KUWBX.js} +2 -2
- package/dist/chunk-IG6KUWBX.js.map +1 -0
- package/dist/{chunk-VDTWFN2P.js → chunk-IMRB2C4O.js} +3 -3
- package/dist/{chunk-2BVW754E.js → chunk-ISRKW4YN.js} +3 -3
- package/dist/{chunk-P4NUJVWL.js → chunk-IXNCZTWA.js} +2 -2
- package/dist/{chunk-ZHZ4PET5.js → chunk-JIDLU57U.js} +3 -3
- package/dist/{chunk-PTT2NB46.js → chunk-JYJFGD2H.js} +2 -2
- package/dist/{chunk-XY6MNSAF.js → chunk-JYV4JJV2.js} +5 -5
- package/dist/{chunk-ZHMUFYZF.js → chunk-KBPU5M2E.js} +7 -7
- package/dist/{chunk-AZXEOEQK.js → chunk-KFRPNHWR.js} +4 -4
- package/dist/chunk-KFRPNHWR.js.map +1 -0
- package/dist/{chunk-ZDFU34XY.js → chunk-KPXM4WO6.js} +58 -54
- package/dist/chunk-KPXM4WO6.js.map +1 -0
- package/dist/{chunk-HA7P3BTB.js → chunk-KRCBZYTZ.js} +4 -4
- package/dist/{chunk-VNJMLOQS.js → chunk-KW42W6SV.js} +6 -6
- package/dist/{chunk-GQT6J4FJ.js → chunk-L3YYLT4E.js} +2 -2
- package/dist/chunk-L3YYLT4E.js.map +1 -0
- package/dist/{chunk-3GXDB3NQ.js → chunk-MANUDU7I.js} +6 -6
- package/dist/{chunk-YJ3TREAC.js → chunk-MHMLXJ3I.js} +2 -2
- package/dist/chunk-MHMLXJ3I.js.map +1 -0
- package/dist/{chunk-D4LAJ737.js → chunk-MSMJJB4J.js} +2 -2
- package/dist/chunk-MSMJJB4J.js.map +1 -0
- package/dist/{chunk-RM5EXCFF.js → chunk-MXUT7FTE.js} +2 -2
- package/dist/chunk-MXUT7FTE.js.map +1 -0
- package/dist/{chunk-IUATR5UE.js → chunk-N5PLUFH2.js} +5 -5
- package/dist/{chunk-C2V7AJO2.js → chunk-NEX7JCMO.js} +4 -4
- package/dist/{chunk-5HSSTOOG.js → chunk-NFZGZ4AK.js} +2 -2
- package/dist/{chunk-5ABOFAHN.js → chunk-NJ4DYYO5.js} +2 -2
- package/dist/chunk-NJ4DYYO5.js.map +1 -0
- package/dist/{chunk-2ZSC454H.js → chunk-NQSO4UAH.js} +8 -8
- package/dist/chunk-NQSO4UAH.js.map +1 -0
- package/dist/{chunk-GHEMAVTN.js → chunk-NYEFP7DY.js} +4 -4
- package/dist/chunk-NYEFP7DY.js.map +1 -0
- package/dist/{chunk-32467U5J.js → chunk-OBPVWOSQ.js} +4 -4
- package/dist/{chunk-6SSWOUUS.js → chunk-OLIWCCFM.js} +2 -5
- package/dist/{chunk-UNREYBZO.js → chunk-OLSARBZU.js} +2 -2
- package/dist/{chunk-V2R2VWER.js → chunk-PT4XLP6I.js} +12 -12
- package/dist/{chunk-V2R2VWER.js.map → chunk-PT4XLP6I.js.map} +1 -1
- package/dist/{chunk-LC7DSMHR.js → chunk-PTHKZWEH.js} +2 -14
- package/dist/{chunk-LC7DSMHR.js.map → chunk-PTHKZWEH.js.map} +1 -1
- package/dist/chunk-QADFHRQM.js +367 -0
- package/dist/chunk-QADFHRQM.js.map +1 -0
- package/dist/{chunk-7LP7FFJ2.js → chunk-QD46HPZG.js} +2 -2
- package/dist/{chunk-G4MFQXYX.js → chunk-QJNCB5SK.js} +2 -2
- package/dist/{chunk-6SYOHUHM.js → chunk-QZWTRENR.js} +2 -2
- package/dist/chunk-QZWTRENR.js.map +1 -0
- package/dist/{chunk-TSNRZSRC.js → chunk-RO5NM6UI.js} +2 -2
- package/dist/chunk-RO5NM6UI.js.map +1 -0
- package/dist/{chunk-MMVQ3SUO.js → chunk-RZPOZPZU.js} +8 -8
- package/dist/chunk-SGDPRCC4.js +1075 -0
- package/dist/chunk-SGDPRCC4.js.map +1 -0
- package/dist/{chunk-E7FSBI6I.js → chunk-SGQ4N5FS.js} +5 -5
- package/dist/{chunk-522MBPE5.js → chunk-SHEEBRZ4.js} +2 -2
- package/dist/{chunk-EPME33Y4.js → chunk-SHYIA73K.js} +6 -6
- package/dist/chunk-SKM35Y4Q.js +77 -0
- package/dist/chunk-SKM35Y4Q.js.map +1 -0
- package/dist/{chunk-MLCTPWSO.js → chunk-TE6LH6J2.js} +5 -5
- package/dist/chunk-TG634KCO.js +63 -0
- package/dist/chunk-TG634KCO.js.map +1 -0
- package/dist/{chunk-QVIZDLAR.js → chunk-TIVK6PRK.js} +9 -10
- package/dist/chunk-TIVK6PRK.js.map +1 -0
- package/dist/{chunk-JOCMXSR2.js → chunk-UADPR6F4.js} +3 -3
- package/dist/{chunk-SBOHNJUD.js → chunk-V6UQZA2H.js} +2 -2
- package/dist/chunk-VG2ZSFYD.js +32 -0
- package/dist/chunk-VG2ZSFYD.js.map +1 -0
- package/dist/{chunk-KCZAFDP5.js → chunk-VH6SOCXH.js} +2 -2
- package/dist/chunk-VSRSQ2CR.js +654 -0
- package/dist/chunk-VSRSQ2CR.js.map +1 -0
- package/dist/{chunk-4B3DL75F.js → chunk-W3G5REIU.js} +2 -2
- package/dist/{chunk-EGU4PWQW.js → chunk-W66AM5IB.js} +2 -2
- package/dist/chunk-W66AM5IB.js.map +1 -0
- package/dist/{chunk-MPPWL64H.js → chunk-WBKZUO5V.js} +3 -3
- package/dist/{chunk-WWBC4KLB.js → chunk-WO4T4OD5.js} +2 -2
- package/dist/{chunk-7IQWHYL2.js → chunk-WZ3NCMK6.js} +6 -5
- package/dist/{chunk-BAAUFCJK.js → chunk-X4MVWPHV.js} +3 -3
- package/dist/{chunk-HVPW6PCX.js → chunk-XIDQKFZF.js} +3 -3
- package/dist/{chunk-EWPS35AR.js → chunk-XOBHRD2M.js} +185 -333
- package/dist/chunk-XOBHRD2M.js.map +1 -0
- package/dist/chunk-Y2NBBT6K.js +18 -0
- package/dist/chunk-Y2NBBT6K.js.map +1 -0
- package/dist/{chunk-OWOT7CFC.js → chunk-Y6B6HVKC.js} +2 -2
- package/dist/{chunk-ICYC5YNI.js → chunk-Y6VZQGGH.js} +6 -6
- package/dist/{chunk-ZM72UO3Y.js → chunk-ZFUFAHZ3.js} +4 -4
- package/dist/{chunk-PWWWMRT7.js → chunk-ZTLOXFPB.js} +2 -2
- package/dist/chunk-ZTLOXFPB.js.map +1 -0
- package/dist/{walk-JXMWKKQW.js → chunk-ZWBKDKXC.js} +4 -13
- package/dist/{walk-JXMWKKQW.js.map → chunk-ZWBKDKXC.js.map} +1 -1
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-SVDRXLD3.js → classified-marker-EOOSMWFC.js} +3 -3
- package/dist/collection-facade-TTRF5NFJ.js +45 -0
- package/dist/{computed-33DRJDOC.js → computed-AB45PS4V.js} +3 -3
- package/dist/consent/index.js +9 -9
- package/dist/{cover-ADBCTIKN.js → cover/index.js} +7 -6
- package/dist/custody/index.js +26 -0
- package/dist/{dead-filter-HKDMTMVY.js → dead-filter-6DYY7S64.js} +2 -2
- package/dist/{chunk-ZF572E2M.js → delegation-ONOZVPIP.js} +12 -6
- package/dist/{chunk-ZF572E2M.js.map → delegation-ONOZVPIP.js.map} +1 -1
- package/dist/derivations/index.js +12 -12
- package/dist/derive-IGGVSUPH.js +22 -0
- package/dist/directory/index.js +46 -0
- package/dist/{dispatch-SPMYNXNW.js → dispatch-7T45NN7C.js} +18 -18
- package/dist/{dispatch-V5MSMQYX.js → dispatch-RPTLK7LJ.js} +5 -5
- package/dist/{enclave-ZA7C3H2L.js → enclave-CLJVSDFG.js} +9 -9
- package/dist/executor-IEBLTBCW.js +9 -0
- package/dist/executor-RM7XWQDU.js +9 -0
- package/dist/executor-XZYM4KHT.js +28 -0
- package/dist/export-accessible-24XCCD3A.js +23 -0
- package/dist/extract-partition-H2TPEEOF.js +38 -0
- package/dist/{fanout-sidecar-HRMHC34B.js → fanout-sidecar-TV7CXAJ6.js} +9 -9
- package/dist/find-OZMTRIK3.js +11 -0
- package/dist/forget/index.js +11 -11
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +12 -12
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +14 -17
- package/dist/index.js +192 -1968
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +28 -0
- package/dist/issue-55HJE7JF.js +19 -0
- package/dist/kernel/collection-config.d.ts +1 -1
- package/dist/kernel/collection.d.ts +2 -2
- package/dist/kernel/errors.d.ts +2 -2
- package/dist/kernel/noydb.d.ts +1 -1
- package/dist/kernel/types.d.ts +20 -20
- package/dist/kernel/vault.d.ts +10 -10
- package/dist/{ledger-K6JBFL3Z.js → ledger-XY6NP3J2.js} +11 -11
- package/dist/liberate-LXOJ2EMB.js +24 -0
- package/dist/{link-set-XVZY2ODC.js → link-set-POQB7BU5.js} +11 -11
- package/dist/materialized-views/index.js +19 -19
- package/dist/money/index.js +31 -0
- package/dist/noydb-KXS35UJS.js +82 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +13 -13
- package/dist/pod/index.js +11 -11
- package/dist/{policy-QWGJB7P7.js → policy/index.js} +6 -6
- package/dist/port/with/blob-strategy.d.ts +15 -5
- package/dist/port/with/strategies.d.ts +9 -9
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-5VHHVFJY.js → post-register-URQANI3B.js} +6 -6
- package/dist/query/index.js +3 -3
- package/dist/reduce/index.js +4 -4
- package/dist/register-5W6CG4RM.js +25 -0
- package/dist/registry-7Y5WF7GS.js +9 -0
- package/dist/{registry-VW6P6A3J.js → registry-BWD2ED52.js} +2 -2
- package/dist/registry-MCSGBZXI.js +18 -0
- package/dist/registry-UJFP3NWF.js +19 -0
- package/dist/request-withdrawal-IWYDM4SO.js +31 -0
- package/dist/{reveal-7OOT5XPD.js → reveal-BXZGWIOP.js} +6 -6
- package/dist/revoke-TINYPHYY.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +26 -0
- package/dist/schema-update/index.js.map +1 -0
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +36 -0
- package/dist/search/index.js.map +1 -0
- package/dist/{seed-GVOI6QP6.js → seed-F7YYQTRC.js} +11 -11
- package/dist/sequence/index.js +30 -0
- package/dist/sequence/index.js.map +1 -0
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-WMZKCNKC.js +25 -0
- package/dist/signer-WMZKCNKC.js.map +1 -0
- package/dist/snapshots/index.js +11 -11
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-BJO2WIN7.js → stale-JOE7GBAE.js} +10 -10
- package/dist/stale-JOE7GBAE.js.map +1 -0
- package/dist/storage-B3WBKXKT.js +23 -0
- package/dist/storage-B3WBKXKT.js.map +1 -0
- package/dist/store/index.js +22 -0
- package/dist/store/index.js.map +1 -0
- package/dist/{store-coordination-provider-DX5HECK3.js → store-coordination-provider-5LX2UFU2.js} +3 -3
- package/dist/sync/index.js +10 -10
- package/dist/team/index.js +29 -20
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -1
- package/dist/{tx → transactions}/index.js +3 -3
- package/dist/{tx → transactions}/index.js.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/{verify-5X37OXRY.js → verify-7XWHJWUN.js} +5 -5
- package/dist/via/blob/active.d.ts +7 -18
- package/dist/via/blob/binding.d.ts +1 -1
- package/dist/via/blob/index.d.ts +2 -2
- package/dist/walk-6OHAWGBS.js +21 -0
- package/dist/walk-6OHAWGBS.js.map +1 -0
- package/dist/with-audit/forget/active.d.ts +3 -3
- package/dist/with-audit/forget/index.d.ts +4 -4
- package/dist/with-audit/forget/strategy.d.ts +3 -3
- package/dist/with-audit/guards/executor.d.ts +4 -4
- package/dist/with-audit/guards/immutable-guard.d.ts +3 -3
- package/dist/with-audit/guards/index.d.ts +1 -1
- package/dist/with-audit/guards/registry.d.ts +3 -3
- package/dist/with-audit/guards/transition-guard.d.ts +3 -3
- package/dist/with-audit/guards/types.d.ts +10 -10
- package/dist/with-audit/guards/with-guard.d.ts +2 -2
- package/dist/with-commit/numbering/descriptor.d.ts +16 -6
- package/dist/with-commit/tx/active.d.ts +5 -5
- package/dist/with-commit/tx/index.d.ts +2 -2
- package/dist/with-commit/tx/invariants.d.ts +1 -1
- package/dist/with-commit/tx/strategy.d.ts +3 -3
- package/dist/with-fork/snapshots/active.d.ts +2 -2
- package/dist/with-fork/snapshots/index.d.ts +1 -1
- package/dist/with-fork/snapshots/noydb-facade.d.ts +3 -3
- package/dist/with-fork/snapshots/strategy.d.ts +2 -2
- package/dist/with-formula/derivations/executor.d.ts +2 -2
- package/dist/with-formula/derivations/index.d.ts +2 -1
- package/dist/with-formula/derivations/registry.d.ts +3 -3
- package/dist/with-formula/derivations/stale.d.ts +2 -2
- package/dist/with-formula/derivations/types.d.ts +3 -3
- package/dist/with-formula/derivations/with-derivation.d.ts +2 -2
- package/dist/with-formula/derivations/with-rollup.d.ts +15 -8
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +3 -3
- package/dist/with-formula/materialized-views/index.d.ts +1 -1
- package/dist/with-formula/materialized-views/registry.d.ts +4 -4
- package/dist/with-formula/materialized-views/types.d.ts +4 -4
- package/dist/with-formula/materialized-views/with-materialized-view.d.ts +2 -2
- package/dist/with-formula/overlay-views/index.d.ts +1 -1
- package/dist/with-formula/overlay-views/registry.d.ts +4 -4
- package/dist/with-formula/overlay-views/types.d.ts +3 -3
- package/dist/with-formula/overlay-views/virtual-collection.d.ts +2 -2
- package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +2 -2
- package/dist/with-lookup/indexing/active.d.ts +5 -5
- package/dist/with-lookup/indexing/index.d.ts +1 -1
- package/dist/with-lookup/indexing/strategy.d.ts +3 -3
- package/dist/with-lookup/search/build-docs.d.ts +7 -2
- package/dist/with-lookup/search/index.d.ts +1 -1
- package/dist/with-party/directory/cover/index.d.ts +1 -0
- package/dist/with-party/directory/index.d.ts +2 -0
- package/dist/with-party/team/index.d.ts +2 -0
- package/dist/with-party/team/keyring.d.ts +49 -20
- package/dist/with-party/team/noydb-facade.d.ts +2 -2
- package/dist/with-shape/blobs/blob-set.d.ts +1 -1
- package/dist/with-shape/introspection/index.d.ts +6 -0
- package/dist/with-shape/schema-update/index.d.ts +1 -0
- package/dist/with-store/index.d.ts +3 -2
- package/dist/withdraw-accessible-DEUCOO4F.js +28 -0
- package/dist/withdraw-accessible-DEUCOO4F.js.map +1 -0
- package/package.json +45 -5
- package/dist/api-5QVQX4HG.js +0 -20
- package/dist/chunk-2PDBYF2O.js.map +0 -1
- package/dist/chunk-2ZSC454H.js.map +0 -1
- package/dist/chunk-3S2YNMUS.js +0 -134
- package/dist/chunk-3S2YNMUS.js.map +0 -1
- package/dist/chunk-3TZUC4WS.js.map +0 -1
- package/dist/chunk-5ABOFAHN.js.map +0 -1
- package/dist/chunk-6SYOHUHM.js.map +0 -1
- package/dist/chunk-AZXEOEQK.js.map +0 -1
- package/dist/chunk-D4LAJ737.js.map +0 -1
- package/dist/chunk-DOZFU7OZ.js.map +0 -1
- package/dist/chunk-EGU4PWQW.js.map +0 -1
- package/dist/chunk-EWPS35AR.js.map +0 -1
- package/dist/chunk-GHEMAVTN.js.map +0 -1
- package/dist/chunk-GQT6J4FJ.js.map +0 -1
- package/dist/chunk-H5GMROCB.js.map +0 -1
- package/dist/chunk-LN3MQFUE.js.map +0 -1
- package/dist/chunk-M4GO4ZJK.js.map +0 -1
- package/dist/chunk-MQBFT2OT.js.map +0 -1
- package/dist/chunk-NIKO2BBZ.js.map +0 -1
- package/dist/chunk-PWWWMRT7.js.map +0 -1
- package/dist/chunk-QVIZDLAR.js.map +0 -1
- package/dist/chunk-RM5EXCFF.js.map +0 -1
- package/dist/chunk-SEU6QHH4.js.map +0 -1
- package/dist/chunk-TSNRZSRC.js.map +0 -1
- package/dist/chunk-YGMREQAK.js.map +0 -1
- package/dist/chunk-YJ3TREAC.js.map +0 -1
- package/dist/chunk-YMUGBZN2.js.map +0 -1
- package/dist/chunk-ZDFU34XY.js.map +0 -1
- package/dist/chunk-ZGEFBDPR.js.map +0 -1
- package/dist/chunk-ZX5FNWH7.js.map +0 -1
- package/dist/collection-facade-S5PPKZD5.js +0 -44
- package/dist/delegation-EV7LKJPH.js +0 -25
- package/dist/derive-5LDJW76F.js +0 -21
- package/dist/executor-FCJEH3FU.js +0 -9
- package/dist/executor-OHET7TF7.js +0 -9
- package/dist/executor-SVHAJZ4A.js +0 -28
- package/dist/export-accessible-S35YKIBL.js +0 -23
- package/dist/extract-partition-UVHAM5WZ.js +0 -38
- package/dist/find-LEBUXVL7.js +0 -11
- package/dist/issue-5X3SMCF4.js +0 -19
- package/dist/liberate-NHTCKBU4.js +0 -24
- package/dist/noydb-TI3RFU6M.js +0 -78
- package/dist/register-CEX7R7NE.js +0 -23
- package/dist/registry-7CZWF3EQ.js +0 -9
- package/dist/registry-DIKMRXUC.js +0 -19
- package/dist/registry-EWIB5NTI.js +0 -18
- package/dist/request-withdrawal-AAG57QO4.js +0 -31
- package/dist/revoke-U5LCIJMF.js +0 -24
- package/dist/signer-NAA2OX7H.js +0 -25
- package/dist/storage-FL7XXZTN.js +0 -23
- package/dist/withdraw-accessible-GO6KQJVM.js +0 -28
- /package/dist/{api-5QVQX4HG.js.map → api-3NKVNZPM.js.map} +0 -0
- /package/dist/{backup-USYSNCYM.js.map → backup-PTSVXDDW.js.map} +0 -0
- /package/dist/{chunk-5WLDZZ6S.js.map → chunk-35NMVJ7I.js.map} +0 -0
- /package/dist/{chunk-NA374QG7.js.map → chunk-3XKESW5E.js.map} +0 -0
- /package/dist/{chunk-MUPZ6IZX.js.map → chunk-4JQK3L4V.js.map} +0 -0
- /package/dist/{chunk-Z4D3YGAB.js.map → chunk-4ZKNC6A6.js.map} +0 -0
- /package/dist/{chunk-ONB627HU.js.map → chunk-55LX6FSX.js.map} +0 -0
- /package/dist/{chunk-M7W2KYTL.js.map → chunk-56IIVAEO.js.map} +0 -0
- /package/dist/{chunk-FHHYCBBP.js.map → chunk-5DRROK5W.js.map} +0 -0
- /package/dist/{chunk-GTNRMJYH.js.map → chunk-5GQEU4DN.js.map} +0 -0
- /package/dist/{chunk-XSOGLHGY.js.map → chunk-6L3DKWRY.js.map} +0 -0
- /package/dist/{chunk-44Y3P5U6.js.map → chunk-6M2I3DKF.js.map} +0 -0
- /package/dist/{chunk-HDF5R2K6.js.map → chunk-6R6Q3MRN.js.map} +0 -0
- /package/dist/{chunk-ZUDAK436.js.map → chunk-6UBZ6I5Z.js.map} +0 -0
- /package/dist/{chunk-7U6AB7DZ.js.map → chunk-AKKRXT23.js.map} +0 -0
- /package/dist/{chunk-OWLZONGX.js.map → chunk-BLBAQRBM.js.map} +0 -0
- /package/dist/{chunk-XONZGK6J.js.map → chunk-BN4HRYAZ.js.map} +0 -0
- /package/dist/{chunk-QVGEVZ5F.js.map → chunk-BQ6DHN4I.js.map} +0 -0
- /package/dist/{chunk-LG2GUYRX.js.map → chunk-BYFXLDVV.js.map} +0 -0
- /package/dist/{chunk-QRHEAZ2Q.js.map → chunk-CUZLNGD5.js.map} +0 -0
- /package/dist/{chunk-HXVRRJBD.js.map → chunk-DGBIHDVK.js.map} +0 -0
- /package/dist/{chunk-JGOKAZNB.js.map → chunk-DZAF24PG.js.map} +0 -0
- /package/dist/{chunk-TMR64XPL.js.map → chunk-EZNTORXE.js.map} +0 -0
- /package/dist/{chunk-WCJJQV2D.js.map → chunk-FMNU7IUG.js.map} +0 -0
- /package/dist/{collection-facade-S5PPKZD5.js.map → chunk-GJW4HX2O.js.map} +0 -0
- /package/dist/{chunk-JTIPVW4J.js.map → chunk-GP3UWP22.js.map} +0 -0
- /package/dist/{chunk-XG7OZDOS.js.map → chunk-HFUAFR6B.js.map} +0 -0
- /package/dist/{chunk-VDTWFN2P.js.map → chunk-IMRB2C4O.js.map} +0 -0
- /package/dist/{chunk-2BVW754E.js.map → chunk-ISRKW4YN.js.map} +0 -0
- /package/dist/{chunk-P4NUJVWL.js.map → chunk-IXNCZTWA.js.map} +0 -0
- /package/dist/{chunk-ZHZ4PET5.js.map → chunk-JIDLU57U.js.map} +0 -0
- /package/dist/{chunk-PTT2NB46.js.map → chunk-JYJFGD2H.js.map} +0 -0
- /package/dist/{chunk-XY6MNSAF.js.map → chunk-JYV4JJV2.js.map} +0 -0
- /package/dist/{chunk-ZHMUFYZF.js.map → chunk-KBPU5M2E.js.map} +0 -0
- /package/dist/{chunk-HA7P3BTB.js.map → chunk-KRCBZYTZ.js.map} +0 -0
- /package/dist/{chunk-VNJMLOQS.js.map → chunk-KW42W6SV.js.map} +0 -0
- /package/dist/{chunk-3GXDB3NQ.js.map → chunk-MANUDU7I.js.map} +0 -0
- /package/dist/{chunk-IUATR5UE.js.map → chunk-N5PLUFH2.js.map} +0 -0
- /package/dist/{chunk-C2V7AJO2.js.map → chunk-NEX7JCMO.js.map} +0 -0
- /package/dist/{chunk-5HSSTOOG.js.map → chunk-NFZGZ4AK.js.map} +0 -0
- /package/dist/{chunk-32467U5J.js.map → chunk-OBPVWOSQ.js.map} +0 -0
- /package/dist/{chunk-6SSWOUUS.js.map → chunk-OLIWCCFM.js.map} +0 -0
- /package/dist/{chunk-UNREYBZO.js.map → chunk-OLSARBZU.js.map} +0 -0
- /package/dist/{chunk-7LP7FFJ2.js.map → chunk-QD46HPZG.js.map} +0 -0
- /package/dist/{chunk-G4MFQXYX.js.map → chunk-QJNCB5SK.js.map} +0 -0
- /package/dist/{chunk-MMVQ3SUO.js.map → chunk-RZPOZPZU.js.map} +0 -0
- /package/dist/{chunk-E7FSBI6I.js.map → chunk-SGQ4N5FS.js.map} +0 -0
- /package/dist/{chunk-522MBPE5.js.map → chunk-SHEEBRZ4.js.map} +0 -0
- /package/dist/{chunk-EPME33Y4.js.map → chunk-SHYIA73K.js.map} +0 -0
- /package/dist/{chunk-MLCTPWSO.js.map → chunk-TE6LH6J2.js.map} +0 -0
- /package/dist/{chunk-JOCMXSR2.js.map → chunk-UADPR6F4.js.map} +0 -0
- /package/dist/{chunk-SBOHNJUD.js.map → chunk-V6UQZA2H.js.map} +0 -0
- /package/dist/{chunk-KCZAFDP5.js.map → chunk-VH6SOCXH.js.map} +0 -0
- /package/dist/{chunk-4B3DL75F.js.map → chunk-W3G5REIU.js.map} +0 -0
- /package/dist/{chunk-MPPWL64H.js.map → chunk-WBKZUO5V.js.map} +0 -0
- /package/dist/{chunk-WWBC4KLB.js.map → chunk-WO4T4OD5.js.map} +0 -0
- /package/dist/{chunk-7IQWHYL2.js.map → chunk-WZ3NCMK6.js.map} +0 -0
- /package/dist/{chunk-BAAUFCJK.js.map → chunk-X4MVWPHV.js.map} +0 -0
- /package/dist/{chunk-HVPW6PCX.js.map → chunk-XIDQKFZF.js.map} +0 -0
- /package/dist/{chunk-OWOT7CFC.js.map → chunk-Y6B6HVKC.js.map} +0 -0
- /package/dist/{chunk-ICYC5YNI.js.map → chunk-Y6VZQGGH.js.map} +0 -0
- /package/dist/{chunk-ZM72UO3Y.js.map → chunk-ZFUFAHZ3.js.map} +0 -0
- /package/dist/{classified-marker-SVDRXLD3.js.map → classified-marker-EOOSMWFC.js.map} +0 -0
- /package/dist/{computed-33DRJDOC.js.map → collection-facade-TTRF5NFJ.js.map} +0 -0
- /package/dist/{cover-ADBCTIKN.js.map → computed-AB45PS4V.js.map} +0 -0
- /package/dist/{delegation-EV7LKJPH.js.map → cover/index.js.map} +0 -0
- /package/dist/{derive-5LDJW76F.js.map → custody/index.js.map} +0 -0
- /package/dist/{dead-filter-HKDMTMVY.js.map → dead-filter-6DYY7S64.js.map} +0 -0
- /package/dist/{enclave-ZA7C3H2L.js.map → derive-IGGVSUPH.js.map} +0 -0
- /package/dist/{executor-FCJEH3FU.js.map → directory/index.js.map} +0 -0
- /package/dist/{dispatch-SPMYNXNW.js.map → dispatch-7T45NN7C.js.map} +0 -0
- /package/dist/{dispatch-V5MSMQYX.js.map → dispatch-RPTLK7LJ.js.map} +0 -0
- /package/dist/{executor-OHET7TF7.js.map → enclave-CLJVSDFG.js.map} +0 -0
- /package/dist/{executor-SVHAJZ4A.js.map → executor-IEBLTBCW.js.map} +0 -0
- /package/dist/{export-accessible-S35YKIBL.js.map → executor-RM7XWQDU.js.map} +0 -0
- /package/dist/{extract-partition-UVHAM5WZ.js.map → executor-XZYM4KHT.js.map} +0 -0
- /package/dist/{find-LEBUXVL7.js.map → export-accessible-24XCCD3A.js.map} +0 -0
- /package/dist/{issue-5X3SMCF4.js.map → extract-partition-H2TPEEOF.js.map} +0 -0
- /package/dist/{fanout-sidecar-HRMHC34B.js.map → fanout-sidecar-TV7CXAJ6.js.map} +0 -0
- /package/dist/{ledger-K6JBFL3Z.js.map → find-OZMTRIK3.js.map} +0 -0
- /package/dist/{liberate-NHTCKBU4.js.map → introspection/index.js.map} +0 -0
- /package/dist/{link-set-XVZY2ODC.js.map → issue-55HJE7JF.js.map} +0 -0
- /package/dist/{noydb-TI3RFU6M.js.map → ledger-XY6NP3J2.js.map} +0 -0
- /package/dist/{policy-QWGJB7P7.js.map → liberate-LXOJ2EMB.js.map} +0 -0
- /package/dist/{register-CEX7R7NE.js.map → link-set-POQB7BU5.js.map} +0 -0
- /package/dist/{registry-7CZWF3EQ.js.map → money/index.js.map} +0 -0
- /package/dist/{registry-DIKMRXUC.js.map → noydb-KXS35UJS.js.map} +0 -0
- /package/dist/{registry-EWIB5NTI.js.map → policy/index.js.map} +0 -0
- /package/dist/{post-register-5VHHVFJY.js.map → post-register-URQANI3B.js.map} +0 -0
- /package/dist/{registry-VW6P6A3J.js.map → register-5W6CG4RM.js.map} +0 -0
- /package/dist/{request-withdrawal-AAG57QO4.js.map → registry-7Y5WF7GS.js.map} +0 -0
- /package/dist/{revoke-U5LCIJMF.js.map → registry-BWD2ED52.js.map} +0 -0
- /package/dist/{signer-NAA2OX7H.js.map → registry-MCSGBZXI.js.map} +0 -0
- /package/dist/{stale-BJO2WIN7.js.map → registry-UJFP3NWF.js.map} +0 -0
- /package/dist/{storage-FL7XXZTN.js.map → request-withdrawal-IWYDM4SO.js.map} +0 -0
- /package/dist/{reveal-7OOT5XPD.js.map → reveal-BXZGWIOP.js.map} +0 -0
- /package/dist/{withdraw-accessible-GO6KQJVM.js.map → revoke-TINYPHYY.js.map} +0 -0
- /package/dist/{seed-GVOI6QP6.js.map → seed-F7YYQTRC.js.map} +0 -0
- /package/dist/{store-coordination-provider-DX5HECK3.js.map → store-coordination-provider-5LX2UFU2.js.map} +0 -0
- /package/dist/{verify-5X37OXRY.js.map → verify-7XWHJWUN.js.map} +0 -0
|
@@ -201,7 +201,7 @@ var engineCtx = (ctx) => ({
|
|
|
201
201
|
function withClassified() {
|
|
202
202
|
return {
|
|
203
203
|
async reveal(ctx, id, field) {
|
|
204
|
-
const { revealSealedField } = await import("./reveal-
|
|
204
|
+
const { revealSealedField } = await import("./reveal-BXZGWIOP.js");
|
|
205
205
|
const value = await revealSealedField({
|
|
206
206
|
collection: ctx.collection,
|
|
207
207
|
encrypted: ctx.encrypted,
|
|
@@ -213,26 +213,26 @@ function withClassified() {
|
|
|
213
213
|
return value;
|
|
214
214
|
},
|
|
215
215
|
async verify(ctx, id, field, candidate) {
|
|
216
|
-
const { verifyDigestField } = await import("./verify-
|
|
216
|
+
const { verifyDigestField } = await import("./verify-7XWHJWUN.js");
|
|
217
217
|
const verdict = await verifyDigestField(engineCtx(ctx), id, field, candidate, policyOf(ctx.spec));
|
|
218
218
|
await ctx.onAccess?.("verify", id);
|
|
219
219
|
return verdict;
|
|
220
220
|
},
|
|
221
221
|
async verifyText(ctx, id, field, candidate) {
|
|
222
|
-
const { verifyTextField } = await import("./verify-
|
|
222
|
+
const { verifyTextField } = await import("./verify-7XWHJWUN.js");
|
|
223
223
|
const verdict = await verifyTextField(engineCtx(ctx), id, field, candidate, ctx.spec.verifyNormalize ?? "password");
|
|
224
224
|
await ctx.onAccess?.("verify", id);
|
|
225
225
|
return verdict;
|
|
226
226
|
},
|
|
227
227
|
async matchGroup(ctx, id, answers, opts) {
|
|
228
|
-
const { matchGroupFields } = await import("./verify-
|
|
228
|
+
const { matchGroupFields } = await import("./verify-7XWHJWUN.js");
|
|
229
229
|
const members = (ctx.groupMembers ?? []).map((m) => ({ field: m.field, policy: policyOf(m.spec) }));
|
|
230
230
|
const result = await matchGroupFields(engineCtx(ctx), id, answers, members, opts);
|
|
231
231
|
await ctx.onAccess?.("verify", id);
|
|
232
232
|
return result;
|
|
233
233
|
},
|
|
234
234
|
async computeTarget(ctx, field, candidate, costByte) {
|
|
235
|
-
const { computeBidxTarget } = await import("./find-
|
|
235
|
+
const { computeBidxTarget } = await import("./find-OZMTRIK3.js");
|
|
236
236
|
const dek = await ctx.getDEK();
|
|
237
237
|
return computeBidxTarget(candidate, policyOf(ctx.spec).normalize, dek, ctx.collection, field, costByte);
|
|
238
238
|
}
|
|
@@ -244,4 +244,4 @@ export {
|
|
|
244
244
|
classified,
|
|
245
245
|
withClassified
|
|
246
246
|
};
|
|
247
|
-
//# sourceMappingURL=chunk-
|
|
247
|
+
//# sourceMappingURL=chunk-6L3DKWRY.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/with-shape/schema-update/gate.ts
|
|
2
|
+
var SchemaUpdateGate = class {
|
|
3
|
+
#decision;
|
|
4
|
+
constructor(decision) {
|
|
5
|
+
this.#decision = decision.catch(() => null);
|
|
6
|
+
}
|
|
7
|
+
async assertWritable() {
|
|
8
|
+
const decision = await this.#decision;
|
|
9
|
+
if (decision && decision.action === "reject") {
|
|
10
|
+
throw decision.error;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
SchemaUpdateGate
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=chunk-6LJY7X5A.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-shape/schema-update/gate.ts"],"sourcesContent":["/**\n * Per-collection write gate. Holds the (async) update decision\n * computed at registration; `Collection.put`/`delete` await it before\n * writing and throw the strategy's rejection error.\n *\n * Detection FAILURE (the promise rejecting) is deliberately NOT a write\n * block — schema detection is a fingerprint safety net, not a correctness\n * invariant (matches how persisted-schema write failures are swallowed).\n * Only an explicit `reject` decision blocks writes.\n */\nimport type { UpdateDecision } from './types.js'\n\nexport class SchemaUpdateGate {\n readonly #decision: Promise<UpdateDecision | null>\n\n constructor(decision: Promise<UpdateDecision>) {\n // Swallow detection failures into a non-blocking null.\n this.#decision = decision.catch(() => null)\n }\n\n async assertWritable(): Promise<void> {\n const decision = await this.#decision\n if (decision && decision.action === 'reject') {\n throw decision.error\n }\n // 'cutover' write-gating is handled by coordinatedCutover.\n }\n}\n"],"mappings":";AAYO,IAAM,mBAAN,MAAuB;AAAA,EACnB;AAAA,EAET,YAAY,UAAmC;AAE7C,SAAK,YAAY,SAAS,MAAM,MAAM,IAAI;AAAA,EAC5C;AAAA,EAEA,MAAM,iBAAgC;AACpC,UAAM,WAAW,MAAM,KAAK;AAC5B,QAAI,YAAY,SAAS,WAAW,UAAU;AAC5C,YAAM,SAAS;AAAA,IACjB;AAAA,EAEF;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NOYDB_FORMAT_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GZACYEOB.js";
|
|
4
4
|
|
|
5
5
|
// src/with-shape/schema-update/fence.ts
|
|
6
6
|
var FENCE_RECORD_ID = "schema-fence";
|
|
@@ -37,4 +37,4 @@ export {
|
|
|
37
37
|
loadFence,
|
|
38
38
|
saveFence
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=chunk-
|
|
40
|
+
//# sourceMappingURL=chunk-6M2I3DKF.js.map
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertTierAccess,
|
|
3
3
|
dekKey
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PTHKZWEH.js";
|
|
5
5
|
import {
|
|
6
6
|
applyRewrappedBody,
|
|
7
7
|
rewrapBodyToDek
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RZPOZPZU.js";
|
|
9
9
|
import {
|
|
10
10
|
isDeleteMarker,
|
|
11
11
|
isTombstoneShape
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VH6SOCXH.js";
|
|
13
13
|
import {
|
|
14
14
|
decrypt,
|
|
15
15
|
encrypt,
|
|
16
16
|
unwrapCek
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-AKKRXT23.js";
|
|
18
18
|
import {
|
|
19
19
|
NOYDB_FORMAT_VERSION
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GZACYEOB.js";
|
|
21
21
|
import {
|
|
22
22
|
PersistedIndexCompensationError,
|
|
23
23
|
TierDemoteDeniedError,
|
|
24
24
|
TiersNotEnabledError,
|
|
25
25
|
UnsupportedTierCompositionError
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QZWTRENR.js";
|
|
27
27
|
|
|
28
28
|
// src/with-audit/tiers/active.ts
|
|
29
29
|
function withTiers() {
|
|
@@ -378,4 +378,4 @@ export {
|
|
|
378
378
|
demote,
|
|
379
379
|
classifySealedShred
|
|
380
380
|
};
|
|
381
|
-
//# sourceMappingURL=chunk-
|
|
381
|
+
//# sourceMappingURL=chunk-6R6Q3MRN.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NoydbError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QZWTRENR.js";
|
|
4
4
|
|
|
5
5
|
// src/kernel/via/index.ts
|
|
6
6
|
var binders = /* @__PURE__ */ new Map();
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
isViaInstalled,
|
|
27
27
|
viaBinder
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-6UBZ6I5Z.js.map
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
canonicalize
|
|
3
|
+
} from "./chunk-Y2NBBT6K.js";
|
|
1
4
|
import {
|
|
2
5
|
sha256Hex
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
|
|
5
|
-
// src/with-shape/persisted-schemas/canonicalize.ts
|
|
6
|
-
function canonicalize(value) {
|
|
7
|
-
if (value === null || typeof value !== "object") {
|
|
8
|
-
return JSON.stringify(value);
|
|
9
|
-
}
|
|
10
|
-
if (Array.isArray(value)) {
|
|
11
|
-
return "[" + value.map(canonicalize).join(",") + "]";
|
|
12
|
-
}
|
|
13
|
-
const obj = value;
|
|
14
|
-
const keys = Object.keys(obj).sort();
|
|
15
|
-
const parts = keys.map((k) => JSON.stringify(k) + ":" + canonicalize(obj[k]));
|
|
16
|
-
return "{" + parts.join(",") + "}";
|
|
17
|
-
}
|
|
6
|
+
} from "./chunk-AKKRXT23.js";
|
|
18
7
|
|
|
19
8
|
// src/with-shape/persisted-schemas/derive.ts
|
|
20
9
|
function isZodSchema(value) {
|
|
@@ -86,9 +75,8 @@ async function derivePersistedSchema(validator) {
|
|
|
86
75
|
}
|
|
87
76
|
|
|
88
77
|
export {
|
|
89
|
-
canonicalize,
|
|
90
78
|
isZodSchema,
|
|
91
79
|
isZod4Schema,
|
|
92
80
|
derivePersistedSchema
|
|
93
81
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-6ZNSB3H6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-shape/persisted-schemas/derive.ts"],"sourcesContent":["/**\n * Derive a {@link PersistedSchemaEnvelope} from a Standard Schema v1\n * validator. Supports zod 3 (via the optional `zod-to-json-schema` peer-dep)\n * and zod 4 (via its native `z.toJSONSchema()`); both are loaded lazily so\n * hub never statically imports zod. Other validator families write a stub\n * envelope flagging the kind.\n *\n * @see docs/superpowers/specs/2026-05-22-schema-dump-design.md\n *\n * @module\n */\n\nimport { canonicalize } from './canonicalize.js'\nimport { sha256Hex } from '../../kernel/enclave/index.js'\nimport type { PersistedSchemaEnvelope, PersistedSchemaKind } from './types.js'\n\n/**\n * Heuristic Zod detection — uses the Standard Schema v1 `~standard.vendor`\n * property (present in Zod v3.23+ and Zod v4+). Falls back to the\n * `_def.typeName` heuristic for older Zod v3 builds that predate Standard\n * Schema support.\n */\nexport function isZodSchema(value: unknown): boolean {\n if (value === null || typeof value !== 'object') return false\n // Standard Schema v1 vendor tag — most reliable across Zod majors\n const std = (value as { '~standard'?: { vendor?: unknown } })['~standard']\n if (std && typeof std === 'object' && (std as { vendor?: unknown }).vendor === 'zod') return true\n // Zod v3 fallback: _def.typeName starts with 'Zod' (e.g. 'ZodObject')\n const def = (value as { _def?: { typeName?: unknown } })._def\n if (!def || typeof def !== 'object') return false\n return typeof (def as { typeName?: unknown }).typeName === 'string'\n && ((def as { typeName: string }).typeName).startsWith('Zod')\n}\n\nfunction detectKind(validator: unknown): PersistedSchemaKind {\n if (isZodSchema(validator)) return 'Zod'\n return 'Unknown'\n}\n\n/**\n * Returns `true` when the validator was created with the Zod v4 native API\n * (i.e. `import { z } from 'zod'` where zod resolves to v4). Zod v4 native\n * schemas carry a `_zod` property whereas Zod v3 schemas (and the v3-compat\n * shim shipped inside zod@4 at `zod/v3`) use `_def.typeName`.\n *\n * Kept duck-typed so hub never statically imports zod.\n */\nexport function isZod4Schema(value: unknown): boolean {\n if (value === null || typeof value !== 'object') return false\n return '_zod' in value\n}\n\n/**\n * Lazy-require `zod-to-json-schema`. Returns the converter, or throws a\n * clear error if the peer-dep isn't installed.\n */\nasync function loadZodToJsonSchemaConverter(): Promise<(s: unknown) => object> {\n try {\n const mod = (await import('zod-to-json-schema')) as { zodToJsonSchema?: (s: unknown) => object }\n if (!mod.zodToJsonSchema) {\n throw new Error('zod-to-json-schema export missing')\n }\n return mod.zodToJsonSchema\n } catch (err) {\n throw new Error(\n 'persistJsonSchema requires the optional peer-dep `zod-to-json-schema`. '\n + 'Install it: `pnpm add zod-to-json-schema` (or npm/yarn equivalent). '\n + `Original error: ${err instanceof Error ? err.message : String(err)}`,\n )\n }\n}\n\n/**\n * Lazy-require Zod v4's built-in `toJSONSchema`. Used when the validator is a\n * Zod v4 native schema and `zod-to-json-schema` is absent or cannot handle it.\n * This is a dynamic import so it does not add a static zod dependency to hub.\n */\nasync function loadZodV4Converter(): Promise<(s: unknown) => object> {\n try {\n const mod = (await import('zod')) as { toJSONSchema?: (s: unknown) => object }\n if (typeof mod.toJSONSchema !== 'function') {\n throw new Error('zod.toJSONSchema not available (zod v4 required)')\n }\n return mod.toJSONSchema\n } catch (err) {\n throw new Error(\n 'persistJsonSchema with a Zod v4 schema requires zod@4 with toJSONSchema. '\n + `Original error: ${err instanceof Error ? err.message : String(err)}`,\n )\n }\n}\n\nexport async function derivePersistedSchema(\n validator: unknown,\n): Promise<PersistedSchemaEnvelope> {\n const kind = detectKind(validator)\n const derivedAt = new Date().toISOString()\n\n if (kind === 'Zod') {\n let jsonSchema: object\n\n if (isZod4Schema(validator)) {\n // Zod v4 native schemas: use zod's built-in toJSONSchema (available in\n // zod@4) because zod-to-json-schema@3.x parses _def.typeName which is\n // absent in native v4 schemas.\n const convert = await loadZodV4Converter()\n jsonSchema = convert(validator)\n } else {\n // Zod v3 schemas (or v3-compat shim): use the optional peer-dep\n // zod-to-json-schema for backward compatibility.\n const convert = await loadZodToJsonSchemaConverter()\n jsonSchema = convert(validator)\n }\n\n const canonical = canonicalize(jsonSchema)\n const hash = await sha256Hex(new TextEncoder().encode(canonical))\n return { _noydb_schema: 1, kind, jsonSchema, hash, derivedAt }\n }\n\n return {\n _noydb_schema: 1,\n kind,\n jsonSchema: null,\n hash: null,\n reason: `derivation not yet supported for kind=${kind} (v0 supports Zod only)`,\n derivedAt,\n }\n}\n"],"mappings":";;;;;;;;AAsBO,SAAS,YAAY,OAAyB;AACnD,MAAI,UAAU,QAAQ,OAAO,UAAU,SAAU,QAAO;AAExD,QAAM,MAAO,MAAiD,WAAW;AACzE,MAAI,OAAO,OAAO,QAAQ,YAAa,IAA6B,WAAW,MAAO,QAAO;AAE7F,QAAM,MAAO,MAA4C;AACzD,MAAI,CAAC,OAAO,OAAO,QAAQ,SAAU,QAAO;AAC5C,SAAO,OAAQ,IAA+B,aAAa,YACpD,IAA6B,SAAU,WAAW,KAAK;AAChE;AAEA,SAAS,WAAW,WAAyC;AAC3D,MAAI,YAAY,SAAS,EAAG,QAAO;AACnC,SAAO;AACT;AAUO,SAAS,aAAa,OAAyB;AACpD,MAAI,UAAU,QAAQ,OAAO,UAAU,SAAU,QAAO;AACxD,SAAO,UAAU;AACnB;AAMA,eAAe,+BAAgE;AAC7E,MAAI;AACF,UAAM,MAAO,MAAM,OAAO,oBAAoB;AAC9C,QAAI,CAAC,IAAI,iBAAiB;AACxB,YAAM,IAAI,MAAM,mCAAmC;AAAA,IACrD;AACA,WAAO,IAAI;AAAA,EACb,SAAS,KAAK;AACZ,UAAM,IAAI;AAAA,MACR,kKAEqB,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA,IACvE;AAAA,EACF;AACF;AAOA,eAAe,qBAAsD;AACnE,MAAI;AACF,UAAM,MAAO,MAAM,OAAO,mBAAK;AAC/B,QAAI,OAAO,IAAI,iBAAiB,YAAY;AAC1C,YAAM,IAAI,MAAM,kDAAkD;AAAA,IACpE;AACA,WAAO,IAAI;AAAA,EACb,SAAS,KAAK;AACZ,UAAM,IAAI;AAAA,MACR,4FACqB,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA,IACvE;AAAA,EACF;AACF;AAEA,eAAsB,sBACpB,WACkC;AAClC,QAAM,OAAO,WAAW,SAAS;AACjC,QAAM,aAAY,oBAAI,KAAK,GAAE,YAAY;AAEzC,MAAI,SAAS,OAAO;AAClB,QAAI;AAEJ,QAAI,aAAa,SAAS,GAAG;AAI3B,YAAM,UAAU,MAAM,mBAAmB;AACzC,mBAAa,QAAQ,SAAS;AAAA,IAChC,OAAO;AAGL,YAAM,UAAU,MAAM,6BAA6B;AACnD,mBAAa,QAAQ,SAAS;AAAA,IAChC;AAEA,UAAM,YAAY,aAAa,UAAU;AACzC,UAAM,OAAO,MAAM,UAAU,IAAI,YAAY,EAAE,OAAO,SAAS,CAAC;AAChE,WAAO,EAAE,eAAe,GAAG,MAAM,YAAY,MAAM,UAAU;AAAA,EAC/D;AAEA,SAAO;AAAA,IACL,eAAe;AAAA,IACf;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,QAAQ,yCAAyC,IAAI;AAAA,IACrD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DecryptionError,
|
|
3
3
|
InvalidKeyError,
|
|
4
4
|
TamperedError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QZWTRENR.js";
|
|
6
6
|
|
|
7
7
|
// src/kernel/enclave/crypto.ts
|
|
8
8
|
var PBKDF2_ITERATIONS = 6e5;
|
|
@@ -401,4 +401,4 @@ export {
|
|
|
401
401
|
bufferToBase64,
|
|
402
402
|
base64ToBuffer
|
|
403
403
|
};
|
|
404
|
-
//# sourceMappingURL=chunk-
|
|
404
|
+
//# sourceMappingURL=chunk-AKKRXT23.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViaGraph
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4ZKNC6A6.js";
|
|
4
4
|
import {
|
|
5
5
|
sha256Hex
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AKKRXT23.js";
|
|
7
7
|
import {
|
|
8
8
|
DerivationCycleError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QZWTRENR.js";
|
|
10
10
|
|
|
11
11
|
// src/with-formula/derivations/strategy-hash.ts
|
|
12
12
|
async function computeStrategyHash(source, outputKeys, derive, sources) {
|
|
@@ -161,4 +161,4 @@ var DerivationRegistry = class {
|
|
|
161
161
|
export {
|
|
162
162
|
DerivationRegistry
|
|
163
163
|
};
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
164
|
+
//# sourceMappingURL=chunk-AT2JJEKJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-formula/derivations/strategy-hash.ts","../src/with-formula/derivations/registry.ts"],"sourcesContent":["/**\n * Deterministic hash of a derivation strategy's \"shape\": source\n * collection, declared sibling sources, output keys, derive function\n * source. Used to detect\n * strategy drift: a record whose `_derivedFrom.strategyHash` doesn't\n * match the current strategy is considered stale.\n *\n * Web Crypto SHA-256 — no extra deps.\n */\nimport { sha256Hex } from '../../kernel/enclave/index.js'\n\nexport async function computeStrategyHash(\n source: string,\n outputKeys: readonly string[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n derive: (...args: any[]) => any,\n sources?: ReadonlyArray<string>,\n): Promise<string> {\n const canonical = JSON.stringify({\n source,\n outputs: [...outputKeys].sort(),\n derive: derive.toString(),\n // Declared sibling sources — adding/removing a trigger\n // collection invalidates cached derived records. Omitted when empty\n // so strategies without siblings keep their existing hash.\n ...(sources?.length ? { sources: [...sources].sort() } : {}),\n })\n const bytes = new TextEncoder().encode(canonical)\n return sha256Hex(bytes)\n}\n","import { DerivationCycleError } from '../../kernel/errors.js'\nimport { ViaGraph, type FieldRef, type EdgeKind, type Grain } from '../../kernel/via/graph.js'\nimport { computeStrategyHash } from './strategy-hash.js'\nimport type { DerivationSpec } from './types.js'\n\n/**\n * Whole-record artifact-grain field marker (#638 Task 2). A derivation's\n * `derive()`/a rollup's `compute()` reads the WHOLE source record — there is\n * no single declared field to point at — so a trigger/output collection is\n * modelled as one artifact node per collection (`kernel/via/graph.ts`'s\n * \"Artifact-grain targets... modelled as a field node whose field is the\n * artifact key\" convention). MUST match `materialized-views/registry.ts`'s\n * and `vault.ts`'s overlay-edge marker so cross-registry edges (a derivation\n * feeding into / out of an MV or overlay collection) resolve to the SAME\n * graph node.\n */\nconst WHOLE_RECORD = '*'\n\n/** Strip this registry's `.${WHOLE_RECORD}` artifact suffix off a graph cycle\n * path entry, recovering the bare collection name — preserves the exact\n * pre-#638 `DerivationCycleError` message shape (behavior lock) for a pure\n * record-shape derivation cycle. A rollup's real-field target (not suffixed\n * `.${WHOLE_RECORD}`) is left untouched. */\nfunction stripArtifactSuffix(displayId: string): string {\n const suffix = `.${WHOLE_RECORD}`\n return displayId.endsWith(suffix) ? displayId.slice(0, -suffix.length) : displayId\n}\n\ninterface RegisteredStrategy {\n // Type-erased to allow the registry to hold heterogeneous strategies.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n spec: DerivationSpec<any, any>\n strategyHash: string\n}\n\n/**\n * Vault-internal registry of derivation strategies. Owned by `Vault`;\n * not exported.\n *\n * @internal\n */\nexport class DerivationRegistry {\n private readonly _bySource = new Map<string, RegisteredStrategy[]>()\n private readonly _byOutput = new Map<string, RegisteredStrategy[]>()\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async register(spec: DerivationSpec<any, any>): Promise<void> {\n const outputKeys = Object.keys(spec.outputs)\n const strategyHash = await computeStrategyHash(spec.source, outputKeys, spec.derive, spec.sources)\n const reg: RegisteredStrategy = { spec, strategyHash }\n\n const fromSource = this._bySource.get(spec.source)\n if (fromSource) fromSource.push(reg)\n else this._bySource.set(spec.source, [reg])\n\n // Declared sibling sources index the SAME `reg` under each\n // extra collection so `strategiesForSource(extra)` returns it and a\n // sibling write re-fires the derivation. Sibling keys also enter\n // `_bySource`, so `validate()`'s cycle DFS walks them automatically.\n for (const extra of spec.sources ?? []) {\n const fromExtra = this._bySource.get(extra)\n if (fromExtra) fromExtra.push(reg)\n else this._bySource.set(extra, [reg])\n }\n\n // FK triggers index the SAME `reg` under each parent collection so\n // a parent write re-fires the derivation (fanned out to matching source\n // records in `dispatchDerivations`). Like sources[], these keys enter\n // `_bySource` so the cycle DFS walks the trigger→output edge.\n for (const t of spec.triggerBy ?? []) {\n const fromTrigger = this._bySource.get(t.collection)\n if (fromTrigger) fromTrigger.push(reg)\n else this._bySource.set(t.collection, [reg])\n }\n\n // Rollup: a write to the child `from` collection recomputes\n // the parent (= spec.source = into) at id child[key]. Index under `from`\n // so a child write fires it; spec.source (into) is already indexed above,\n // so a parent write also recomputes its own aggregate (covers the\n // parent-created-after-children case). The from→into edge enters the cycle\n // DFS automatically.\n if (spec.rollup) {\n const fromRollup = this._bySource.get(spec.rollup.from)\n if (fromRollup) fromRollup.push(reg)\n else this._bySource.set(spec.rollup.from, [reg])\n }\n\n for (const key of outputKeys) {\n const output = spec.outputs[key]\n if (!output) continue\n const outputCollection = output.collection\n const arr = this._byOutput.get(outputCollection)\n if (arr) arr.push(reg)\n else this._byOutput.set(outputCollection, [reg])\n }\n }\n\n strategiesForSource(source: string): ReadonlyArray<RegisteredStrategy> {\n return this._bySource.get(source) ?? []\n }\n\n strategiesProducingOutput(collection: string): ReadonlyArray<RegisteredStrategy> {\n return this._byOutput.get(collection) ?? []\n }\n\n /**\n * All registered strategies as a flat, deduplicated array.\n * Each strategy is indexed once per source (not once per output key),\n * so iterating `_bySource.values()` naturally yields each strategy\n * exactly once per source — deduplication is handled by flattening\n * the per-source arrays and collecting into a Set by identity.\n *\n * Used by `dumpSchema()` / `describeDerivations()` in the introspection\n * walker to populate the derivations map.\n */\n all(): ReadonlyArray<RegisteredStrategy> {\n const seen = new Set<RegisteredStrategy>()\n for (const strategies of this._bySource.values()) {\n for (const s of strategies) seen.add(s)\n }\n return [...seen]\n }\n\n /**\n * Graph edges for #638 Task 2: one `'derivation'`/`'record'` edge per\n * (non-self-write) output key — target = the output collection (a\n * `WHOLE_RECORD` artifact node), sources = every collection that can\n * trigger this strategy (`source`, `sources[]`, `triggerBy[].collection`,\n * and — for a rollup — `rollup.from`), mirroring EXACTLY the trigger keys\n * `register()` indexes under `_bySource`. The self-write reverse-denorm\n * output (`output.collection === source` with `denorm` declared) is\n * skipped — the SAME condition the old local DFS used; it is not a cycle\n * (see the comment `validate()` used to carry, now on this skip).\n * Rollups ADDITIONALLY get a dedicated `'rollup'`/`'aggregate'` edge\n * targeting the real `rollup.field` on the parent (`source`) — the\n * self-write output above only covers the cycle-DFS skip, not\n * dispatch/taint (Tasks 3/4/6), which need the real field.\n */\n edges(): ReadonlyArray<{ readonly target: FieldRef; readonly sources: readonly FieldRef[]; readonly kind: EdgeKind; readonly grain: Grain }> {\n const out: Array<{ target: FieldRef; sources: FieldRef[]; kind: EdgeKind; grain: Grain }> = []\n for (const reg of this.all()) {\n const spec = reg.spec\n const triggerCollections = [\n spec.source,\n ...(spec.sources ?? []),\n ...(spec.triggerBy ?? []).map((t) => t.collection),\n ...(spec.rollup ? [spec.rollup.from] : []),\n ]\n const sources: FieldRef[] = triggerCollections.map((c) => ({ collection: c, field: WHOLE_RECORD }))\n for (const key of Object.keys(spec.outputs)) {\n const output = spec.outputs[key]\n if (!output) continue\n if (output.shape === 'record' && output.collection === spec.source && output.denorm !== undefined) continue\n out.push({ target: { collection: output.collection, field: WHOLE_RECORD }, sources, kind: 'derivation', grain: 'record' })\n }\n if (spec.rollup) {\n out.push({\n target: { collection: spec.source, field: spec.rollup.field },\n sources: [{ collection: spec.rollup.from, field: WHOLE_RECORD }],\n kind: 'rollup',\n grain: 'aggregate',\n })\n }\n }\n return out\n }\n\n /**\n * Cycle detection, delegated to `ViaGraph.assertAcyclic()` (#638 Task 2 —\n * retires the local DFS). Call after all `register()` calls complete (i.e.\n * at vault open). Throws `DerivationCycleError` on the first cycle found —\n * SAME class/timing as before; the message/path is byte-identical to the\n * pre-#638 shape for a pure record-shape derivation cycle (the\n * `WHOLE_RECORD` artifact suffix is stripped back to a bare collection\n * name before re-throwing).\n *\n * `graph` is the caller's shared per-vault graph, ALREADY carrying this\n * registry's `edges()` (the caller registers them — see `Vault._initDerivations`)\n * — omit it (e.g. this registry's own unit tests) to validate this\n * registry's edges in isolation against a throwaway graph.\n */\n validate(graph?: ViaGraph): void {\n const g = graph ?? new ViaGraph()\n if (!graph) {\n for (const edge of this.edges()) g.registerDerived(edge.target, edge.sources, edge.kind, edge.grain)\n }\n try {\n g.assertAcyclic()\n } catch (e) {\n if (e instanceof DerivationCycleError) throw new DerivationCycleError(e.path.map(stripArtifactSuffix))\n throw e\n }\n }\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PortabilityNotEnabledError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QZWTRENR.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/portability/strategy.ts
|
|
6
6
|
var NO_PORTABILITY = {
|
|
@@ -27,4 +27,4 @@ var NO_PORTABILITY = {
|
|
|
27
27
|
export {
|
|
28
28
|
NO_PORTABILITY
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-BLBAQRBM.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
chainAnchor,
|
|
5
5
|
loadPeriods,
|
|
6
6
|
validatePeriodName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N5PLUFH2.js";
|
|
8
8
|
|
|
9
9
|
// src/with-audit/periods/active.ts
|
|
10
10
|
function withPeriods() {
|
|
@@ -20,4 +20,4 @@ function withPeriods() {
|
|
|
20
20
|
export {
|
|
21
21
|
withPeriods
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-BN4HRYAZ.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ConflictError,
|
|
7
7
|
InvariantError,
|
|
8
8
|
ValidationError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QZWTRENR.js";
|
|
10
10
|
|
|
11
11
|
// src/kernel/best-effort-revert.ts
|
|
12
12
|
async function bestEffortRevert(executed, adapter, compensate) {
|
|
@@ -231,7 +231,7 @@ async function runTransaction(db, fn, options, txInvariants) {
|
|
|
231
231
|
db._clearActiveTxContext(ctx);
|
|
232
232
|
}
|
|
233
233
|
if (ctx._amendment) {
|
|
234
|
-
const { GuardExecutor } = await import("./executor-
|
|
234
|
+
const { GuardExecutor } = await import("./executor-RM7XWQDU.js");
|
|
235
235
|
try {
|
|
236
236
|
for (const [vaultName, v] of ctx._amendmentVaults) {
|
|
237
237
|
const registry = v._getGuardRegistry();
|
|
@@ -368,4 +368,4 @@ export {
|
|
|
368
368
|
runTransaction,
|
|
369
369
|
revertExecuted
|
|
370
370
|
};
|
|
371
|
-
//# sourceMappingURL=chunk-
|
|
371
|
+
//# sourceMappingURL=chunk-BQ6DHN4I.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SCHEMAS_COLLECTION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OBPVWOSQ.js";
|
|
4
4
|
import {
|
|
5
5
|
BLOB_CHUNKS_COLLECTION,
|
|
6
6
|
BLOB_COLLECTION,
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
BLOB_INTENT_COLLECTION,
|
|
9
9
|
BLOB_SLOTS_PREFIX,
|
|
10
10
|
BLOB_VERSIONS_PREFIX
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NQSO4UAH.js";
|
|
12
12
|
import {
|
|
13
13
|
assembleBundleContainer,
|
|
14
14
|
buildExtractedPartitionWrapper
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SGQ4N5FS.js";
|
|
16
16
|
import {
|
|
17
17
|
generateULID
|
|
18
18
|
} from "./chunk-ZJADGNYF.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
canonicalJson,
|
|
24
24
|
envelopePayloadHash,
|
|
25
25
|
hashEntry
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ISRKW4YN.js";
|
|
27
27
|
import {
|
|
28
28
|
openEnvelopeJson,
|
|
29
29
|
writeEnvelopeBody
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RZPOZPZU.js";
|
|
31
31
|
import {
|
|
32
32
|
bufferToBase64,
|
|
33
33
|
decrypt,
|
|
@@ -37,14 +37,14 @@ import {
|
|
|
37
37
|
generateDEK,
|
|
38
38
|
unwrapCek,
|
|
39
39
|
wrapCek
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-AKKRXT23.js";
|
|
41
41
|
import {
|
|
42
42
|
NOYDB_BACKUP_VERSION,
|
|
43
43
|
NOYDB_FORMAT_VERSION
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-GZACYEOB.js";
|
|
45
45
|
import {
|
|
46
46
|
PartitionExtractionError
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-QZWTRENR.js";
|
|
48
48
|
|
|
49
49
|
// src/with-cargo/walk-closure.ts
|
|
50
50
|
async function walkClosure(vault, opts) {
|
|
@@ -492,4 +492,4 @@ export {
|
|
|
492
492
|
extractPartition,
|
|
493
493
|
extractPartitionCore
|
|
494
494
|
};
|
|
495
|
-
//# sourceMappingURL=chunk-
|
|
495
|
+
//# sourceMappingURL=chunk-BYFXLDVV.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
loadVaultPolicy
|
|
3
|
+
} from "./chunk-56IIVAEO.js";
|
|
1
4
|
import {
|
|
2
5
|
assertStrongSecret,
|
|
3
6
|
mintKeyringCanary,
|
|
4
7
|
persistKeyring
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KPXM4WO6.js";
|
|
6
9
|
import {
|
|
7
10
|
dekKey
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PTHKZWEH.js";
|
|
9
12
|
import {
|
|
10
13
|
openEnvelopeJson
|
|
11
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RZPOZPZU.js";
|
|
12
15
|
import {
|
|
13
16
|
base64ToBuffer,
|
|
14
17
|
bufferToBase64,
|
|
@@ -18,11 +21,11 @@ import {
|
|
|
18
21
|
generateSalt,
|
|
19
22
|
unwrapKey,
|
|
20
23
|
wrapKey
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-AKKRXT23.js";
|
|
22
25
|
import {
|
|
23
26
|
NOYDB_FORMAT_VERSION,
|
|
24
27
|
NOYDB_KEYRING_VERSION
|
|
25
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GZACYEOB.js";
|
|
26
29
|
import {
|
|
27
30
|
DelegationTargetMissingError,
|
|
28
31
|
InvalidKeyError,
|
|
@@ -32,7 +35,7 @@ import {
|
|
|
32
35
|
RecoveryProfileNotImplementedError,
|
|
33
36
|
TeamNotEnabledError,
|
|
34
37
|
ValidationError
|
|
35
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-QZWTRENR.js";
|
|
36
39
|
|
|
37
40
|
// src/port/with/team-strategy.ts
|
|
38
41
|
var NO_TEAM = {
|
|
@@ -232,7 +235,6 @@ async function unwrapDeksFromPaperEntry(entry, code) {
|
|
|
232
235
|
// src/with-party/team/magic-link-grant.ts
|
|
233
236
|
var MAGIC_LINK_GRANTS_COLLECTION = "_magic_link_grants";
|
|
234
237
|
var MAGIC_LINK_CONTENT_INFO_PREFIX = "noydb-magic-link-content-v1:";
|
|
235
|
-
var MAGIC_LINK_KEK_INFO_PREFIX = "noydb-magic-link-v1:";
|
|
236
238
|
async function deriveMagicLinkContentKey(serverSecret, token, vault) {
|
|
237
239
|
const subtle2 = globalThis.crypto.subtle;
|
|
238
240
|
const ikmBytes = serverSecret instanceof Uint8Array ? serverSecret : new TextEncoder().encode(serverSecret);
|
|
@@ -660,6 +662,129 @@ async function recoverUser(store, vault, callerKeyring, options) {
|
|
|
660
662
|
await store.put(vault, "_keyring", options.userId, envelope);
|
|
661
663
|
}
|
|
662
664
|
|
|
665
|
+
// src/with-party/auth-introspection/index.ts
|
|
666
|
+
async function describeAuthConfig(store, vault) {
|
|
667
|
+
const policy = await loadVaultPolicy(store, vault) ?? defaultPolicySnapshot();
|
|
668
|
+
const recoveryProfiles = await listRecoveryProfilesEnrolled(store, vault);
|
|
669
|
+
const lines = [];
|
|
670
|
+
lines.push(`Vault "${vault}" \u2014 three-tier authentication`);
|
|
671
|
+
lines.push("");
|
|
672
|
+
lines.push("Tier 1 \u2014 Secret (master)");
|
|
673
|
+
lines.push(` Phrase format: ${policy.secret?.minWords ?? 6}+ words, lowercase letters, \u2265${policy.secret?.minWordLength ?? 3} chars/word`);
|
|
674
|
+
lines.push(" Strength validator: enforced (override available for tests only)");
|
|
675
|
+
lines.push("");
|
|
676
|
+
lines.push("Tier 2 \u2014 Authenticate (routine login)");
|
|
677
|
+
lines.push(" Allowed methods: WebAuthn (passkey), OIDC, Password");
|
|
678
|
+
lines.push(" Slots per user: unlimited");
|
|
679
|
+
lines.push("");
|
|
680
|
+
lines.push("Tier 3 \u2014 Unlock (quick resume)");
|
|
681
|
+
lines.push(" Method: PIN (per-app configurable)");
|
|
682
|
+
lines.push("");
|
|
683
|
+
lines.push(`Recovery profiles enrolled: ${recoveryProfiles.length === 0 ? "none" : recoveryProfiles.join(", ")}`);
|
|
684
|
+
lines.push("Managed-secret mode: off (post-1.0)");
|
|
685
|
+
lines.push("");
|
|
686
|
+
lines.push("Sensitive-action gates:");
|
|
687
|
+
for (const [gate, gp] of Object.entries(policy.gates)) {
|
|
688
|
+
lines.push(` ${gate} \u2014 ${describeGatePolicy(gp)}`);
|
|
689
|
+
}
|
|
690
|
+
return lines.join("\n");
|
|
691
|
+
}
|
|
692
|
+
async function diagramAuthConfig(store, vault) {
|
|
693
|
+
const policy = await loadVaultPolicy(store, vault) ?? defaultPolicySnapshot();
|
|
694
|
+
const lines = [];
|
|
695
|
+
lines.push("flowchart TB");
|
|
696
|
+
lines.push(` vault["Vault: ${escapeMermaid(vault)}"]`);
|
|
697
|
+
lines.push(' tier1["Tier 1<br/>Secret"]');
|
|
698
|
+
lines.push(' tier2["Tier 2<br/>Multi-slot Authenticate"]');
|
|
699
|
+
lines.push(' tier3["Tier 3<br/>PIN / Quick-resume"]');
|
|
700
|
+
lines.push(" vault --> tier1");
|
|
701
|
+
lines.push(" tier1 --> tier2");
|
|
702
|
+
lines.push(" tier2 --> tier3");
|
|
703
|
+
for (const [gateName, gp] of Object.entries(policy.gates)) {
|
|
704
|
+
if (gp.enabled === false) continue;
|
|
705
|
+
const id = sanitizeId(gateName);
|
|
706
|
+
const label = `${gateName}<br/>tier \u2265 ${gp.minTier}`;
|
|
707
|
+
lines.push(` ${id}["${escapeMermaid(label)}"]`);
|
|
708
|
+
const tierNode = gp.minTier === 1 ? "tier1" : gp.minTier === 2 ? "tier2" : "tier3";
|
|
709
|
+
lines.push(` ${tierNode} --> ${id}`);
|
|
710
|
+
}
|
|
711
|
+
return lines.join("\n");
|
|
712
|
+
}
|
|
713
|
+
async function describeUserAuth(store, vault, userId) {
|
|
714
|
+
const env = await store.get(vault, "_keyring", userId);
|
|
715
|
+
if (!env) return "";
|
|
716
|
+
const file = JSON.parse(env._data);
|
|
717
|
+
const lines = [];
|
|
718
|
+
lines.push(
|
|
719
|
+
`User: ${file.user_id} (joined ${file.created_at.slice(0, 10)}, role: ${file.role})`
|
|
720
|
+
);
|
|
721
|
+
lines.push("");
|
|
722
|
+
lines.push("Tier 2 enrollments:");
|
|
723
|
+
if (!file.authenticators || file.authenticators.length === 0) {
|
|
724
|
+
lines.push(" (none enrolled)");
|
|
725
|
+
} else {
|
|
726
|
+
for (const slot of file.authenticators) {
|
|
727
|
+
lines.push(` - ${describeSlot(slot)}`);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
return lines.join("\n");
|
|
731
|
+
}
|
|
732
|
+
async function describeAllUsersAuth(store, vault) {
|
|
733
|
+
const ids = await store.list(vault, "_keyring");
|
|
734
|
+
const results = [];
|
|
735
|
+
for (const userId of ids) {
|
|
736
|
+
const description = await describeUserAuth(store, vault, userId);
|
|
737
|
+
if (description !== "") results.push({ userId, description });
|
|
738
|
+
}
|
|
739
|
+
return results;
|
|
740
|
+
}
|
|
741
|
+
var SLOT_FIELD_ALLOWLIST = [
|
|
742
|
+
"id",
|
|
743
|
+
"method",
|
|
744
|
+
"enrolled_at",
|
|
745
|
+
"enrolled_via_tier"
|
|
746
|
+
];
|
|
747
|
+
function describeSlot(slot) {
|
|
748
|
+
const sanitized = {};
|
|
749
|
+
for (const key of SLOT_FIELD_ALLOWLIST) {
|
|
750
|
+
if (key in slot) {
|
|
751
|
+
sanitized[key] = slot[key];
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
const date = (sanitized.enrolled_at ?? "").slice(0, 10);
|
|
755
|
+
return `${sanitized.method ?? "?"} (id=${sanitized.id ?? "?"}, enrolled ${date}, via tier ${sanitized.enrolled_via_tier ?? "?"})`;
|
|
756
|
+
}
|
|
757
|
+
function describeGatePolicy(gp) {
|
|
758
|
+
if (gp.enabled === false) return "disabled";
|
|
759
|
+
const parts = [];
|
|
760
|
+
parts.push(`tier ${gp.minTier}`);
|
|
761
|
+
if (gp.factors && gp.factors.length > 0) {
|
|
762
|
+
for (const f of gp.factors) {
|
|
763
|
+
parts.push(`+ ${f.count ?? 1}\xD7 ${f.anyOf.join("|")}`);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
if (gp.warn?.sharedDevice === "block") parts.push("block-on-shared-device");
|
|
767
|
+
return parts.join(" ");
|
|
768
|
+
}
|
|
769
|
+
function defaultPolicySnapshot() {
|
|
770
|
+
return {
|
|
771
|
+
secret: { minWords: 6, minWordLength: 3, rejectRepeatedAdjacent: true },
|
|
772
|
+
gates: {}
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
async function listRecoveryProfilesEnrolled(store, vault) {
|
|
776
|
+
const enrolled = [];
|
|
777
|
+
const paper = await loadPaperRecoveryEntries(store, vault);
|
|
778
|
+
if (paper.length > 0) enrolled.push(`paper (${paper.length} codes)`);
|
|
779
|
+
return enrolled;
|
|
780
|
+
}
|
|
781
|
+
function escapeMermaid(s) {
|
|
782
|
+
return s.replace(/"/g, '\\"').replace(/\n/g, " ");
|
|
783
|
+
}
|
|
784
|
+
function sanitizeId(s) {
|
|
785
|
+
return s.replace(/[^a-zA-Z0-9]/g, "_");
|
|
786
|
+
}
|
|
787
|
+
|
|
663
788
|
// src/with-party/team/authenticators.ts
|
|
664
789
|
async function enrollAuthenticator(store, vault, keyring, options) {
|
|
665
790
|
const existing = keyring.authenticators.find((a) => a.id === options.id);
|
|
@@ -754,12 +879,9 @@ export {
|
|
|
754
879
|
loadShamirRecoveryEntries,
|
|
755
880
|
saveShamirRecoveryEntries,
|
|
756
881
|
mintShamirRecoveryEntry,
|
|
757
|
-
unwrapDeksFromShamirEntry,
|
|
758
882
|
mintPaperRecoveryEntry,
|
|
759
883
|
unwrapDeksFromPaperEntry,
|
|
760
884
|
MAGIC_LINK_GRANTS_COLLECTION,
|
|
761
|
-
MAGIC_LINK_CONTENT_INFO_PREFIX,
|
|
762
|
-
MAGIC_LINK_KEK_INFO_PREFIX,
|
|
763
885
|
deriveMagicLinkContentKey,
|
|
764
886
|
writeMagicLinkGrant,
|
|
765
887
|
readMagicLinkGrantRecord,
|
|
@@ -771,9 +893,13 @@ export {
|
|
|
771
893
|
rotateSecret,
|
|
772
894
|
recoverSecret,
|
|
773
895
|
recoverUser,
|
|
896
|
+
describeAuthConfig,
|
|
897
|
+
diagramAuthConfig,
|
|
898
|
+
describeUserAuth,
|
|
899
|
+
describeAllUsersAuth,
|
|
774
900
|
enrollAuthenticator,
|
|
775
901
|
updateAuthenticator,
|
|
776
902
|
removeAuthenticator,
|
|
777
903
|
findAuthenticator
|
|
778
904
|
};
|
|
779
|
-
//# sourceMappingURL=chunk-
|
|
905
|
+
//# sourceMappingURL=chunk-C25JXSOR.js.map
|