@noy-db/hub 0.6.0-pre.0 → 0.6.0-pre.10
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/codemods/0.4.0-pre.json +699 -0
- package/dist/{api-67SBPMMH.js → api-RXUMEKT3.js} +6 -6
- package/dist/attestation/index.js +12 -12
- package/dist/attestation/index.js.map +1 -1
- package/dist/{backup-GAYWQAFN.js → backup-AVAGHAJE.js} +25 -6
- package/dist/backup-AVAGHAJE.js.map +1 -0
- package/dist/blobs/index.js +5 -5
- package/dist/broker/index.js +6 -6
- package/dist/{bundle-handle-5OUAI7CV.js → bundle-handle-GFNHT52M.js} +2 -2
- package/dist/cargo/index.js +18 -18
- package/dist/{chunk-CYQOUTMY.js → chunk-2BMRJ6LQ.js} +2 -2
- package/dist/{chunk-HS7HNYBD.js → chunk-2DHSSLOD.js} +6 -6
- package/dist/{chunk-JH3OHQM4.js → chunk-2Z3NCLNX.js} +6 -6
- package/dist/{chunk-NVU7ZMPN.js → chunk-3IXIU6FP.js} +2 -2
- package/dist/{chunk-XBLKM73C.js → chunk-3JVXVJ7L.js} +8 -8
- package/dist/{chunk-FY343IZR.js → chunk-3URQC7EH.js} +3 -3
- package/dist/{chunk-BPTZ4K5L.js → chunk-4GZ6XOVW.js} +7 -7
- package/dist/{chunk-ROWL352P.js → chunk-4I72F5DF.js} +4 -4
- package/dist/{chunk-EK7DT5BT.js → chunk-4VUPLMZ6.js} +39 -3
- package/dist/chunk-4VUPLMZ6.js.map +1 -0
- package/dist/{chunk-LBGPO5RL.js → chunk-52JPHN5N.js} +4 -4
- package/dist/{chunk-27TCYH6G.js → chunk-5JY5TSVY.js} +3 -3
- package/dist/{chunk-27TCYH6G.js.map → chunk-5JY5TSVY.js.map} +1 -1
- package/dist/chunk-5O5HRRTV.js +201 -0
- package/dist/chunk-5O5HRRTV.js.map +1 -0
- package/dist/{chunk-ZXJXDHNK.js → chunk-5ZKS6ZE2.js} +2 -2
- package/dist/{chunk-ZXJXDHNK.js.map → chunk-5ZKS6ZE2.js.map} +1 -1
- package/dist/{chunk-MVOWXQHN.js → chunk-6BU3L4UE.js} +2 -2
- package/dist/{chunk-OSFPNKY4.js → chunk-6FJWSWFT.js} +2 -2
- package/dist/chunk-6FJWSWFT.js.map +1 -0
- package/dist/{chunk-CJ73OLMW.js → chunk-6HFM7EIT.js} +1 -1
- package/dist/chunk-6HFM7EIT.js.map +1 -0
- package/dist/{chunk-PGAPBZEK.js → chunk-6NVPFKN3.js} +4 -4
- package/dist/{chunk-24UICKTB.js → chunk-6SAFL5YE.js} +2 -2
- package/dist/chunk-6SAFL5YE.js.map +1 -0
- package/dist/{chunk-NQRJ5AJO.js → chunk-7H73RIE3.js} +2 -2
- package/dist/{chunk-NQCNSVGI.js → chunk-7MNBICB5.js} +3 -3
- package/dist/{chunk-T4GPR2IR.js → chunk-7TSYBD3E.js} +1 -1
- package/dist/chunk-7TSYBD3E.js.map +1 -0
- package/dist/{chunk-TLNNHG3A.js → chunk-ADW22QSB.js} +3 -3
- package/dist/{chunk-TLNNHG3A.js.map → chunk-ADW22QSB.js.map} +1 -1
- package/dist/{chunk-3UK6STWO.js → chunk-BEFVYAR5.js} +3 -3
- package/dist/{chunk-TFZ7LLOQ.js → chunk-BRVW2GS5.js} +5 -5
- package/dist/{chunk-V5C5NNBR.js → chunk-CDB2HVQW.js} +3 -3
- package/dist/{chunk-3HYWYLXL.js → chunk-CEJWMBXO.js} +1 -1
- package/dist/chunk-CEJWMBXO.js.map +1 -0
- package/dist/{chunk-2KIV7BEK.js → chunk-FDX7OWWI.js} +1 -1
- package/dist/chunk-FDX7OWWI.js.map +1 -0
- package/dist/{chunk-4MQDV3HZ.js → chunk-FFDNKRCY.js} +2 -2
- package/dist/{chunk-PP5CO2PR.js → chunk-FMQJZH4R.js} +2 -2
- package/dist/{chunk-JSRU5W2M.js → chunk-FZ6NYJ7L.js} +3 -3
- package/dist/{chunk-ZGGVOADG.js → chunk-G6S5VVHP.js} +2 -2
- package/dist/{chunk-3IIPWA75.js → chunk-GAG7QOVO.js} +27 -2
- package/dist/chunk-GAG7QOVO.js.map +1 -0
- package/dist/{chunk-JXIDGFKS.js → chunk-HPLWFNG4.js} +3 -1
- package/dist/chunk-HPLWFNG4.js.map +1 -0
- package/dist/{chunk-ZWMO5GL5.js → chunk-JJNOLSG5.js} +3 -3
- package/dist/{chunk-RLWY6Z44.js → chunk-JRKZTEZZ.js} +62 -6
- package/dist/chunk-JRKZTEZZ.js.map +1 -0
- package/dist/chunk-N35NC4JH.js +123 -0
- package/dist/chunk-N35NC4JH.js.map +1 -0
- package/dist/{chunk-3CLZY46Y.js → chunk-N3BI6P3J.js} +295 -109
- package/dist/chunk-N3BI6P3J.js.map +1 -0
- package/dist/{chunk-SRGJET2F.js → chunk-NJDQ4YSV.js} +2 -2
- package/dist/{chunk-JEM2IGS3.js → chunk-NPP5R7FF.js} +5 -5
- package/dist/{chunk-DPJTDNUF.js → chunk-O2ERS4UJ.js} +5 -5
- package/dist/{chunk-F3GVO44K.js → chunk-PDLLCOGD.js} +3 -3
- package/dist/{chunk-VBY6ZLJT.js → chunk-PL2GHSCM.js} +3 -3
- package/dist/{chunk-DCMQR46R.js → chunk-PNKHAKQ7.js} +3 -3
- package/dist/{chunk-MXZ5TSTR.js → chunk-PPMBY7YS.js} +6 -6
- package/dist/{chunk-ZK4CO2KZ.js → chunk-Q6TEJXBX.js} +4 -4
- package/dist/{chunk-GS5RT2KK.js → chunk-QULVCV3M.js} +2 -2
- package/dist/chunk-QULVCV3M.js.map +1 -0
- package/dist/{chunk-KZ3KMDN3.js → chunk-RTAMLDWP.js} +6 -2
- package/dist/chunk-RTAMLDWP.js.map +1 -0
- package/dist/{chunk-MZ5ZFO2D.js → chunk-RXYYFSBB.js} +82 -110
- package/dist/chunk-RXYYFSBB.js.map +1 -0
- package/dist/{chunk-4VCWI42L.js → chunk-SUFG5E73.js} +2 -2
- package/dist/{chunk-SKONR2OL.js → chunk-U5O6GIWZ.js} +2 -2
- package/dist/{chunk-HFKGIBMD.js → chunk-VZ3XFUQ7.js} +2 -2
- package/dist/{chunk-3EO7RZLJ.js → chunk-W77KZHCW.js} +4 -4
- package/dist/{chunk-P7NGLLUF.js → chunk-WASHZV34.js} +2 -2
- package/dist/{chunk-XB7LUDKM.js → chunk-WFUIE565.js} +3 -3
- package/dist/{chunk-RPXL6KSX.js → chunk-WLZ47GSL.js} +3 -3
- package/dist/{chunk-MJWCLSQL.js → chunk-X56RTUK3.js} +3 -3
- package/dist/{chunk-OMSAULZM.js → chunk-XEJA6K76.js} +9 -9
- package/dist/{chunk-MC2LFTQM.js → chunk-XWX7GL56.js} +2 -2
- package/dist/{chunk-46V67XP5.js → chunk-YJ6IONGA.js} +2 -2
- package/dist/chunk-YJ6IONGA.js.map +1 -0
- package/dist/{chunk-24ZLWWEO.js → chunk-YPYHVOXP.js} +1 -1
- package/dist/chunk-YPYHVOXP.js.map +1 -0
- package/dist/{chunk-2LGDCNFJ.js → chunk-Z45YRGFO.js} +1 -1
- package/dist/chunk-Z45YRGFO.js.map +1 -0
- package/dist/classified/index.js +3 -3
- package/dist/{classified-marker-MH3ON5OL.js → classified-marker-2KJAXRRO.js} +3 -3
- package/dist/{collection-facade-AHT7FATG.js → collection-facade-QEJIM6BC.js} +8 -8
- package/dist/consent/index.js +4 -4
- package/dist/cover/index.js +2 -2
- package/dist/custody/index.js +6 -6
- package/dist/{dead-filter-U575NGSH.js → dead-filter-DCB62VWW.js} +2 -2
- package/dist/{delegation-PDYL6RWT.js → delegation-MO7YZYJS.js} +4 -4
- package/dist/derivations/index.js +6 -6
- package/dist/{derive-AKT4KU36.js → derive-IUA6JFLB.js} +5 -5
- package/dist/directory/index.js +5 -5
- package/dist/{dispatch-4XIJSFTT.js → dispatch-FZEAWKVM.js} +5 -5
- package/dist/{dispatch-N5HGVUGU.js → dispatch-MJ6SHB3Y.js} +9 -9
- package/dist/{enclave-OPK24QDR.js → enclave-JU4YIEPB.js} +4 -4
- package/dist/{executor-3JZ4POTW.js → executor-YIQB2S6N.js} +9 -8
- package/dist/{export-accessible-CPTP5STN.js → export-accessible-4S36PQNR.js} +7 -7
- package/dist/{extract-partition-TWXPHVU7.js → extract-partition-IO7FDZ2P.js} +10 -10
- package/dist/{fanout-sidecar-T2ZGLQFE.js → fanout-sidecar-NNAJQXMX.js} +4 -4
- package/dist/forget/index.js +4 -4
- package/dist/guards/index.js +1 -1
- package/dist/history/index.js +6 -6
- package/dist/i18n/index.js +6 -6
- package/dist/index.d.ts +3 -2
- package/dist/index.js +69 -63
- package/dist/index.js.map +1 -1
- package/dist/introspection/index.js +6 -6
- package/dist/{issue-N74C55X6.js → issue-RIVHSY2S.js} +6 -6
- package/dist/kernel/secret-mode.d.ts +1 -1
- package/dist/kernel/types.d.ts +41 -6
- package/dist/kernel/vault.d.ts +19 -15
- package/dist/{ledger-DONWFC5M.js → ledger-AETNF4OM.js} +6 -6
- package/dist/liberate-GFN4C7RR.js +24 -0
- package/dist/{link-set-2TTP4VLO.js → link-set-E5HNY67I.js} +5 -5
- package/dist/{managed-secret-EAOYWRYF.js → managed-secret-CWQ6PND5.js} +3 -3
- package/dist/materialized-views/index.js +10 -9
- package/dist/money/index.js +10 -6
- package/dist/{noydb-6W2XGQCS.js → noydb-SNZONAYA.js} +28 -28
- package/dist/overlay-views/index.js +1 -1
- package/dist/periods/index.js +17 -7
- package/dist/pod/index.js +31 -31
- package/dist/policy/index.js +3 -3
- package/dist/port/with/collection-options.d.ts +1 -1
- package/dist/portability/index.js +6 -6
- package/dist/{post-register-ORQOQJCS.js → post-register-2XSSMGEQ.js} +4 -4
- package/dist/{register-LHETZRJM.js → register-4EFJCVYD.js} +11 -11
- package/dist/{registry-JRIN447B.js → registry-4SDHHOJ7.js} +6 -6
- package/dist/{registry-AMAZ6QRZ.js → registry-OYTFGWVK.js} +4 -4
- package/dist/{request-withdrawal-2DN2RGCO.js → request-withdrawal-KGXGDPVQ.js} +9 -9
- package/dist/{reveal-AG4SCHUQ.js → reveal-BW36KCOQ.js} +3 -3
- package/dist/{revoke-ZX4NM2CJ.js → revoke-JFN773KF.js} +6 -6
- package/dist/sealed-record/index.js +6 -6
- package/dist/search/index.js +1 -1
- package/dist/{seed-IRCDGIRK.js → seed-GDV5PT4R.js} +6 -6
- package/dist/sequence/index.js +4 -4
- package/dist/session/index.js +3 -3
- package/dist/{signer-7KHD4OL2.js → signer-TA55QB6R.js} +5 -5
- package/dist/snapshots/index.js +5 -5
- package/dist/{stale-K734VACF.js → stale-ARHFVL5U.js} +5 -5
- package/dist/{storage-4H2GF6RQ.js → storage-V7MTFAQJ.js} +5 -5
- package/dist/{store-coordination-provider-4SKLSFUG.js → store-coordination-provider-GFCUOBR6.js} +3 -3
- package/dist/sync/index.js +5 -5
- package/dist/team/index.js +8 -8
- package/dist/tiers/index.js +4 -4
- package/dist/via/classified/descriptor.d.ts +1 -1
- package/dist/via/money/exact.d.ts +44 -0
- package/dist/via/money/index.d.ts +2 -0
- package/dist/via/money/normalize.d.ts +20 -0
- package/dist/{walk-MQHYNDLZ.js → walk-3ZECBFDA.js} +7 -7
- package/dist/with-audit/attestation/index.d.ts +1 -1
- package/dist/with-audit/guards/immutable-guard.d.ts +14 -0
- package/dist/with-audit/guards/with-guard.d.ts +1 -1
- package/dist/with-audit/periods/active.d.ts +28 -1
- package/dist/with-audit/periods/index.d.ts +4 -2
- package/dist/with-audit/periods/periods.d.ts +160 -5
- package/dist/with-audit/periods/strategy.d.ts +13 -4
- package/dist/with-audit/periods/vault-facade.d.ts +89 -10
- package/dist/with-audit/periods/window.d.ts +10 -0
- package/dist/with-cargo/index.d.ts +2 -2
- package/dist/with-commit/history/ledger/entry.d.ts +1 -1
- package/dist/with-commit/numbering/descriptor.d.ts +1 -1
- package/dist/with-formula/derivations/with-derivation.d.ts +1 -1
- package/dist/with-formula/materialized-views/types.d.ts +52 -0
- package/dist/with-formula/materialized-views/with-materialized-view.d.ts +3 -3
- package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +1 -1
- package/dist/with-party/custody/index.d.ts +1 -1
- package/dist/with-party/directory/user-envelope/index.d.ts +1 -1
- package/dist/with-party/directory/user-envelope/storage.d.ts +1 -1
- package/dist/with-party/team/echo-ceremony.d.ts +3 -3
- package/dist/with-party/team/echo-secret.d.ts +2 -2
- package/dist/with-party/team/keyring.d.ts +10 -1
- package/dist/with-pod/bundle.d.ts +15 -0
- package/dist/with-shape/introspection/index.d.ts +2 -1
- package/dist/with-shape/introspection/types.d.ts +1 -1
- package/dist/with-shape/persisted-schemas/derive.d.ts +1 -1
- package/dist/with-shape/persisted-schemas/index.d.ts +1 -1
- package/dist/with-shape/persisted-schemas/types.d.ts +1 -1
- package/dist/{withdraw-accessible-JSDQHXHE.js → withdraw-accessible-7PG4DYQK.js} +8 -8
- package/package.json +6 -4
- package/dist/backup-GAYWQAFN.js.map +0 -1
- package/dist/chunk-24UICKTB.js.map +0 -1
- package/dist/chunk-24ZLWWEO.js.map +0 -1
- package/dist/chunk-2KIV7BEK.js.map +0 -1
- package/dist/chunk-2LGDCNFJ.js.map +0 -1
- package/dist/chunk-3CLZY46Y.js.map +0 -1
- package/dist/chunk-3HYWYLXL.js.map +0 -1
- package/dist/chunk-3IIPWA75.js.map +0 -1
- package/dist/chunk-46V67XP5.js.map +0 -1
- package/dist/chunk-CJ73OLMW.js.map +0 -1
- package/dist/chunk-EK7DT5BT.js.map +0 -1
- package/dist/chunk-GS5RT2KK.js.map +0 -1
- package/dist/chunk-JXIDGFKS.js.map +0 -1
- package/dist/chunk-KZ3KMDN3.js.map +0 -1
- package/dist/chunk-LTU4FLHG.js +0 -131
- package/dist/chunk-LTU4FLHG.js.map +0 -1
- package/dist/chunk-MZ5ZFO2D.js.map +0 -1
- package/dist/chunk-OSFPNKY4.js.map +0 -1
- package/dist/chunk-RLWY6Z44.js.map +0 -1
- package/dist/chunk-T4GPR2IR.js.map +0 -1
- package/dist/liberate-KICI7AJN.js +0 -24
- /package/dist/{api-67SBPMMH.js.map → api-RXUMEKT3.js.map} +0 -0
- /package/dist/{bundle-handle-5OUAI7CV.js.map → bundle-handle-GFNHT52M.js.map} +0 -0
- /package/dist/{chunk-CYQOUTMY.js.map → chunk-2BMRJ6LQ.js.map} +0 -0
- /package/dist/{chunk-HS7HNYBD.js.map → chunk-2DHSSLOD.js.map} +0 -0
- /package/dist/{chunk-JH3OHQM4.js.map → chunk-2Z3NCLNX.js.map} +0 -0
- /package/dist/{chunk-NVU7ZMPN.js.map → chunk-3IXIU6FP.js.map} +0 -0
- /package/dist/{chunk-XBLKM73C.js.map → chunk-3JVXVJ7L.js.map} +0 -0
- /package/dist/{chunk-FY343IZR.js.map → chunk-3URQC7EH.js.map} +0 -0
- /package/dist/{chunk-BPTZ4K5L.js.map → chunk-4GZ6XOVW.js.map} +0 -0
- /package/dist/{chunk-ROWL352P.js.map → chunk-4I72F5DF.js.map} +0 -0
- /package/dist/{chunk-LBGPO5RL.js.map → chunk-52JPHN5N.js.map} +0 -0
- /package/dist/{chunk-MVOWXQHN.js.map → chunk-6BU3L4UE.js.map} +0 -0
- /package/dist/{chunk-PGAPBZEK.js.map → chunk-6NVPFKN3.js.map} +0 -0
- /package/dist/{chunk-NQRJ5AJO.js.map → chunk-7H73RIE3.js.map} +0 -0
- /package/dist/{chunk-NQCNSVGI.js.map → chunk-7MNBICB5.js.map} +0 -0
- /package/dist/{chunk-3UK6STWO.js.map → chunk-BEFVYAR5.js.map} +0 -0
- /package/dist/{chunk-TFZ7LLOQ.js.map → chunk-BRVW2GS5.js.map} +0 -0
- /package/dist/{chunk-V5C5NNBR.js.map → chunk-CDB2HVQW.js.map} +0 -0
- /package/dist/{chunk-4MQDV3HZ.js.map → chunk-FFDNKRCY.js.map} +0 -0
- /package/dist/{chunk-PP5CO2PR.js.map → chunk-FMQJZH4R.js.map} +0 -0
- /package/dist/{chunk-JSRU5W2M.js.map → chunk-FZ6NYJ7L.js.map} +0 -0
- /package/dist/{chunk-ZGGVOADG.js.map → chunk-G6S5VVHP.js.map} +0 -0
- /package/dist/{chunk-ZWMO5GL5.js.map → chunk-JJNOLSG5.js.map} +0 -0
- /package/dist/{chunk-SRGJET2F.js.map → chunk-NJDQ4YSV.js.map} +0 -0
- /package/dist/{chunk-JEM2IGS3.js.map → chunk-NPP5R7FF.js.map} +0 -0
- /package/dist/{chunk-DPJTDNUF.js.map → chunk-O2ERS4UJ.js.map} +0 -0
- /package/dist/{chunk-F3GVO44K.js.map → chunk-PDLLCOGD.js.map} +0 -0
- /package/dist/{chunk-VBY6ZLJT.js.map → chunk-PL2GHSCM.js.map} +0 -0
- /package/dist/{chunk-DCMQR46R.js.map → chunk-PNKHAKQ7.js.map} +0 -0
- /package/dist/{chunk-MXZ5TSTR.js.map → chunk-PPMBY7YS.js.map} +0 -0
- /package/dist/{chunk-ZK4CO2KZ.js.map → chunk-Q6TEJXBX.js.map} +0 -0
- /package/dist/{chunk-4VCWI42L.js.map → chunk-SUFG5E73.js.map} +0 -0
- /package/dist/{chunk-SKONR2OL.js.map → chunk-U5O6GIWZ.js.map} +0 -0
- /package/dist/{chunk-HFKGIBMD.js.map → chunk-VZ3XFUQ7.js.map} +0 -0
- /package/dist/{chunk-3EO7RZLJ.js.map → chunk-W77KZHCW.js.map} +0 -0
- /package/dist/{chunk-P7NGLLUF.js.map → chunk-WASHZV34.js.map} +0 -0
- /package/dist/{chunk-XB7LUDKM.js.map → chunk-WFUIE565.js.map} +0 -0
- /package/dist/{chunk-RPXL6KSX.js.map → chunk-WLZ47GSL.js.map} +0 -0
- /package/dist/{chunk-MJWCLSQL.js.map → chunk-X56RTUK3.js.map} +0 -0
- /package/dist/{chunk-OMSAULZM.js.map → chunk-XEJA6K76.js.map} +0 -0
- /package/dist/{chunk-MC2LFTQM.js.map → chunk-XWX7GL56.js.map} +0 -0
- /package/dist/{classified-marker-MH3ON5OL.js.map → classified-marker-2KJAXRRO.js.map} +0 -0
- /package/dist/{collection-facade-AHT7FATG.js.map → collection-facade-QEJIM6BC.js.map} +0 -0
- /package/dist/{dead-filter-U575NGSH.js.map → dead-filter-DCB62VWW.js.map} +0 -0
- /package/dist/{delegation-PDYL6RWT.js.map → delegation-MO7YZYJS.js.map} +0 -0
- /package/dist/{derive-AKT4KU36.js.map → derive-IUA6JFLB.js.map} +0 -0
- /package/dist/{dispatch-4XIJSFTT.js.map → dispatch-FZEAWKVM.js.map} +0 -0
- /package/dist/{dispatch-N5HGVUGU.js.map → dispatch-MJ6SHB3Y.js.map} +0 -0
- /package/dist/{enclave-OPK24QDR.js.map → enclave-JU4YIEPB.js.map} +0 -0
- /package/dist/{executor-3JZ4POTW.js.map → executor-YIQB2S6N.js.map} +0 -0
- /package/dist/{export-accessible-CPTP5STN.js.map → export-accessible-4S36PQNR.js.map} +0 -0
- /package/dist/{extract-partition-TWXPHVU7.js.map → extract-partition-IO7FDZ2P.js.map} +0 -0
- /package/dist/{fanout-sidecar-T2ZGLQFE.js.map → fanout-sidecar-NNAJQXMX.js.map} +0 -0
- /package/dist/{issue-N74C55X6.js.map → issue-RIVHSY2S.js.map} +0 -0
- /package/dist/{ledger-DONWFC5M.js.map → ledger-AETNF4OM.js.map} +0 -0
- /package/dist/{liberate-KICI7AJN.js.map → liberate-GFN4C7RR.js.map} +0 -0
- /package/dist/{link-set-2TTP4VLO.js.map → link-set-E5HNY67I.js.map} +0 -0
- /package/dist/{managed-secret-EAOYWRYF.js.map → managed-secret-CWQ6PND5.js.map} +0 -0
- /package/dist/{noydb-6W2XGQCS.js.map → noydb-SNZONAYA.js.map} +0 -0
- /package/dist/{post-register-ORQOQJCS.js.map → post-register-2XSSMGEQ.js.map} +0 -0
- /package/dist/{register-LHETZRJM.js.map → register-4EFJCVYD.js.map} +0 -0
- /package/dist/{registry-AMAZ6QRZ.js.map → registry-4SDHHOJ7.js.map} +0 -0
- /package/dist/{registry-JRIN447B.js.map → registry-OYTFGWVK.js.map} +0 -0
- /package/dist/{request-withdrawal-2DN2RGCO.js.map → request-withdrawal-KGXGDPVQ.js.map} +0 -0
- /package/dist/{reveal-AG4SCHUQ.js.map → reveal-BW36KCOQ.js.map} +0 -0
- /package/dist/{revoke-ZX4NM2CJ.js.map → revoke-JFN773KF.js.map} +0 -0
- /package/dist/{seed-IRCDGIRK.js.map → seed-GDV5PT4R.js.map} +0 -0
- /package/dist/{signer-7KHD4OL2.js.map → signer-TA55QB6R.js.map} +0 -0
- /package/dist/{stale-K734VACF.js.map → stale-ARHFVL5U.js.map} +0 -0
- /package/dist/{storage-4H2GF6RQ.js.map → storage-V7MTFAQJ.js.map} +0 -0
- /package/dist/{store-coordination-provider-4SKLSFUG.js.map → store-coordination-provider-GFCUOBR6.js.map} +0 -0
- /package/dist/{walk-MQHYNDLZ.js.map → walk-3ZECBFDA.js.map} +0 -0
- /package/dist/{withdraw-accessible-JSDQHXHE.js.map → withdraw-accessible-7PG4DYQK.js.map} +0 -0
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
*/
|
|
147
147
|
import type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js';
|
|
148
148
|
import type { LedgerStore } from '../../with-commit/history/ledger/index.js';
|
|
149
|
-
export { PERIODS_COLLECTION, PERIOD_FREEZES_COLLECTION, PERIOD_ARCHIVES_COLLECTION, PERIOD_TARGET_PURGES_COLLECTION, periodExclusiveUpperBound, } from './window.js';
|
|
149
|
+
export { PERIODS_COLLECTION, PERIOD_FREEZES_COLLECTION, PERIOD_ARCHIVES_COLLECTION, PERIOD_TARGET_PURGES_COLLECTION, PERIOD_REOPENS_COLLECTION, periodExclusiveUpperBound, } from './window.js';
|
|
150
150
|
/**
|
|
151
151
|
* Companion record recording that a closed period was frozen (its delete
|
|
152
152
|
* markers physically purged). Stored in {@link PERIOD_FREEZES_COLLECTION},
|
|
@@ -177,6 +177,73 @@ export interface TargetPurgeCount {
|
|
|
177
177
|
readonly role: 'backup' | 'archive';
|
|
178
178
|
readonly purgedCount: number;
|
|
179
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* One entry in a period's append-only reopen/reclose log (#1022).
|
|
182
|
+
*
|
|
183
|
+
* Real accounting close is a three-state lifecycle — open / closed / reopened
|
|
184
|
+
* — not a one-way door. A month gets closed, a missing invoice arrives or a
|
|
185
|
+
* filing is rejected, the month is reopened, corrected, and reclosed. The audit
|
|
186
|
+
* value is not the ability to write again; it is the chain being able to say
|
|
187
|
+
* *closed at T1, reopened at T2 by U, reclosed at T3*.
|
|
188
|
+
*/
|
|
189
|
+
export interface PeriodReopenEvent {
|
|
190
|
+
readonly op: 'reopen' | 'reclose';
|
|
191
|
+
/** ISO timestamp the event was recorded. */
|
|
192
|
+
readonly at: string;
|
|
193
|
+
/** userId of the keyring that performed it. */
|
|
194
|
+
readonly by: string;
|
|
195
|
+
/**
|
|
196
|
+
* `reopen` only — ISO instant after which the period re-seals on its own,
|
|
197
|
+
* with nobody acting. Absent means the window stays open until an explicit
|
|
198
|
+
* `reclosePeriod`.
|
|
199
|
+
*/
|
|
200
|
+
readonly until?: string;
|
|
201
|
+
/** Free-text justification, carried verbatim into the audit trail. */
|
|
202
|
+
readonly reason?: string;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Companion holding a period's reopen/reclose history (#1022). Stored in
|
|
206
|
+
* {@link PERIOD_REOPENS_COLLECTION}, keyed by the period's storage key — kept
|
|
207
|
+
* OFF the hash-chained `_periods/<name>` record for the same reason freeze and
|
|
208
|
+
* archive are: reopening must never rewrite the close, or the chain that proves
|
|
209
|
+
* the close happened is the very thing the reopen destroys.
|
|
210
|
+
*
|
|
211
|
+
* `events` is APPEND-ONLY. Where the other companions are single-shot and
|
|
212
|
+
* idempotent, this one accumulates, because the cycle repeats.
|
|
213
|
+
*/
|
|
214
|
+
export interface PeriodReopenRecord {
|
|
215
|
+
readonly period: string;
|
|
216
|
+
readonly partition?: PeriodPartition;
|
|
217
|
+
readonly events: readonly PeriodReopenEvent[];
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Collapse an append-only reopen log into the return-only fields merged onto a
|
|
221
|
+
* {@link PeriodRecord} on read.
|
|
222
|
+
*
|
|
223
|
+
* Expiry is deliberately NOT resolved here: `reopenedUntil` is carried through
|
|
224
|
+
* verbatim and compared against the clock at write-guard time, so a bounded
|
|
225
|
+
* window re-seals on its own without anything having to run.
|
|
226
|
+
*
|
|
227
|
+
* @internal
|
|
228
|
+
*/
|
|
229
|
+
export declare function resolveReopenState(events: readonly PeriodReopenEvent[]): {
|
|
230
|
+
reopenedAt?: string;
|
|
231
|
+
reopenedBy?: string;
|
|
232
|
+
reopenedUntil?: string;
|
|
233
|
+
reopenReason?: string;
|
|
234
|
+
reclosedAt?: string;
|
|
235
|
+
reopenCount: number;
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Is this period writable right now on account of a reopen? (#1022)
|
|
239
|
+
*
|
|
240
|
+
* Three ways to be sealed again: never reopened, explicitly reclosed after the
|
|
241
|
+
* last reopen, or a bounded window that has elapsed. The clock is read by the
|
|
242
|
+
* caller and passed in, so the guard and any diagnostic agree on one instant.
|
|
243
|
+
*
|
|
244
|
+
* @internal
|
|
245
|
+
*/
|
|
246
|
+
export declare function isEffectivelyReopened(period: PeriodRecord, nowIso: string): boolean;
|
|
180
247
|
/**
|
|
181
248
|
* Companion record noting that a closed+frozen period's delete markers were
|
|
182
249
|
* swept off the vault's push-only sync targets (#615). Stored in
|
|
@@ -189,6 +256,46 @@ export interface PeriodTargetPurgeRecord {
|
|
|
189
256
|
readonly purgedBy: string;
|
|
190
257
|
readonly targets: readonly TargetPurgeCount[];
|
|
191
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Scope tuple for a period timeline (#1005).
|
|
261
|
+
*
|
|
262
|
+
* Identical in shape and semantics to `SequenceOptions.partition`: a
|
|
263
|
+
* partitioned timeline is always disjoint from any unpartitioned one, and from
|
|
264
|
+
* every other tuple. `['acme', 'vat']` and `['acme', 'wht']` are two
|
|
265
|
+
* independent close calendars for the same subject — which is the whole point,
|
|
266
|
+
* since sub-ledgers for one legal entity and one month routinely close on
|
|
267
|
+
* different statutory deadlines.
|
|
268
|
+
*/
|
|
269
|
+
export type PeriodPartition = readonly (string | number)[];
|
|
270
|
+
/**
|
|
271
|
+
* Resolve the `_periods` storage key for a (name, partition) pair.
|
|
272
|
+
*
|
|
273
|
+
* Deliberately the same encoding as `resolveSequenceKey`: `name` verbatim when
|
|
274
|
+
* unpartitioned, else `${name}\x00${parts}` with each component
|
|
275
|
+
* `encodeURIComponent`d and `'/'`-joined. The null-byte separator cannot occur
|
|
276
|
+
* in a period name, so a partitioned key never collides with an unpartitioned
|
|
277
|
+
* one; URI-encoding keeps `['a/b']` distinct from `['a','b']`.
|
|
278
|
+
*
|
|
279
|
+
* @throws {ValidationError} on an empty component or a non-finite number.
|
|
280
|
+
* @internal
|
|
281
|
+
*/
|
|
282
|
+
export declare function resolvePeriodKey(name: string, partition?: PeriodPartition): string;
|
|
283
|
+
/**
|
|
284
|
+
* Do two partitions denote the same timeline? Absent and empty both mean "the
|
|
285
|
+
* unpartitioned timeline", so they compare equal.
|
|
286
|
+
*
|
|
287
|
+
* @internal
|
|
288
|
+
*/
|
|
289
|
+
export declare function samePartition(a?: PeriodPartition, b?: PeriodPartition): boolean;
|
|
290
|
+
/**
|
|
291
|
+
* Resolves a record to the timeline that governs it. Supplied by
|
|
292
|
+
* `withPeriods({ subjects })`; returns `undefined` for any collection with no
|
|
293
|
+
* mapping, which is what keeps an unconfigured vault on the single vault-wide
|
|
294
|
+
* timeline it has always had.
|
|
295
|
+
*
|
|
296
|
+
* @internal
|
|
297
|
+
*/
|
|
298
|
+
export type PartitionResolver = (collection: string, record: Record<string, unknown>) => PeriodPartition | undefined;
|
|
192
299
|
/**
|
|
193
300
|
* Stored record for one closed or opened accounting period. One entry
|
|
194
301
|
* per period, keyed by `name` in the reserved `_periods` collection.
|
|
@@ -199,8 +306,19 @@ export interface PeriodTargetPurgeRecord {
|
|
|
199
306
|
* into the next one, the same way the ledger's `prevHash` works.
|
|
200
307
|
*/
|
|
201
308
|
export interface PeriodRecord {
|
|
202
|
-
/**
|
|
309
|
+
/**
|
|
310
|
+
* Human-readable name (e.g., `'FY2026-Q1'`). Unique per PARTITION — two
|
|
311
|
+
* timelines may each carry a `'2026-06'`, which is the normal case when one
|
|
312
|
+
* vault serves several subjects (#1005). Unique per vault when unpartitioned.
|
|
313
|
+
*/
|
|
203
314
|
readonly name: string;
|
|
315
|
+
/**
|
|
316
|
+
* The timeline this period belongs to. Absent = the vault-wide timeline.
|
|
317
|
+
* Two periods with the same `name` and different `partition` are unrelated:
|
|
318
|
+
* separate hash chains, separate close state, and the write guard applies
|
|
319
|
+
* each only to records that resolve to its own tuple.
|
|
320
|
+
*/
|
|
321
|
+
readonly partition?: PeriodPartition;
|
|
204
322
|
/**
|
|
205
323
|
* Role discriminator. A period is `'closed'` from the moment its
|
|
206
324
|
* `closedAt` is recorded; `'opened'` marks a period whose opening
|
|
@@ -261,6 +379,19 @@ export interface PeriodRecord {
|
|
|
261
379
|
readonly targetsPurgedAt?: string;
|
|
262
380
|
readonly targetsPurgedBy?: string;
|
|
263
381
|
readonly targetsPurged?: readonly TargetPurgeCount[];
|
|
382
|
+
/** #1022 return-only — collapsed from the `_period_reopens/<key>` append-only
|
|
383
|
+
* log on read; NEVER written into the stored `_periods/<name>` record, so a
|
|
384
|
+
* reopen cannot disturb the inter-period hash chain. Absent = never reopened.
|
|
385
|
+
* `reclosedAt` present (and >= `reopenedAt`) means the window was closed
|
|
386
|
+
* again explicitly; `reopenedUntil` in the past means it lapsed on its own.
|
|
387
|
+
* Use {@link isEffectivelyReopened} rather than reading these directly. */
|
|
388
|
+
readonly reopenedAt?: string;
|
|
389
|
+
readonly reopenedBy?: string;
|
|
390
|
+
readonly reopenedUntil?: string;
|
|
391
|
+
readonly reopenReason?: string;
|
|
392
|
+
readonly reclosedAt?: string;
|
|
393
|
+
/** How many times this period has been reopened, ever. */
|
|
394
|
+
readonly reopenCount?: number;
|
|
264
395
|
}
|
|
265
396
|
/** Options for `vault.closePeriod()`. */
|
|
266
397
|
export interface ClosePeriodOptions {
|
|
@@ -283,11 +414,32 @@ export interface ClosePeriodOptions {
|
|
|
283
414
|
* an explicit `dateField`.
|
|
284
415
|
*/
|
|
285
416
|
readonly dateField?: string;
|
|
417
|
+
/**
|
|
418
|
+
* Close only this timeline (#1005). Omit for the vault-wide timeline.
|
|
419
|
+
*
|
|
420
|
+
* ```ts
|
|
421
|
+
* vault.closePeriod({
|
|
422
|
+
* name: '2026-06', endDate: '2026-06-30', dateField: 'issuedAt',
|
|
423
|
+
* partition: [clientId, 'vat'],
|
|
424
|
+
* })
|
|
425
|
+
* ```
|
|
426
|
+
*
|
|
427
|
+
* Which records the resulting seal applies to is decided by the
|
|
428
|
+
* `subjects` map passed to `withPeriods()` — without one, no record ever
|
|
429
|
+
* resolves to a partition and a partitioned close seals nothing.
|
|
430
|
+
*/
|
|
431
|
+
readonly partition?: PeriodPartition;
|
|
286
432
|
}
|
|
287
433
|
/** Options for `vault.openPeriod()`. */
|
|
288
434
|
export interface OpenPeriodOptions<TCollections = Record<string, Record<string, unknown>>> {
|
|
289
435
|
/** Human-readable name for the new period. Must be unique. */
|
|
290
436
|
readonly name: string;
|
|
437
|
+
/**
|
|
438
|
+
* The timeline to open in. Must match the partition of `fromPeriod` — a
|
|
439
|
+
* period cannot chain across timelines, since each carries its own hash
|
|
440
|
+
* chain (#1005).
|
|
441
|
+
*/
|
|
442
|
+
readonly partition?: PeriodPartition;
|
|
291
443
|
/** ISO lower bound of the new period (usually prior `endDate + 1 day`). */
|
|
292
444
|
readonly startDate: string;
|
|
293
445
|
/**
|
|
@@ -357,7 +509,7 @@ export declare function loadPeriods(adapter: NoydbStore, vault: string, decrypt:
|
|
|
357
509
|
*
|
|
358
510
|
* @internal
|
|
359
511
|
*/
|
|
360
|
-
export declare function chainAnchor(records: readonly PeriodRecord[]): Promise<{
|
|
512
|
+
export declare function chainAnchor(records: readonly PeriodRecord[], partition?: PeriodPartition): Promise<{
|
|
361
513
|
priorPeriodName?: string;
|
|
362
514
|
priorPeriodHash: string;
|
|
363
515
|
}>;
|
|
@@ -382,7 +534,10 @@ export declare function chainAnchor(records: readonly PeriodRecord[]): Promise<{
|
|
|
382
534
|
export declare function assertTsWritable(existing: {
|
|
383
535
|
ts: string | null;
|
|
384
536
|
record: Record<string, unknown> | null;
|
|
385
|
-
} | null, incomingRecord: Record<string, unknown> | null, closedPeriods: readonly PeriodRecord[]
|
|
537
|
+
} | null, incomingRecord: Record<string, unknown> | null, closedPeriods: readonly PeriodRecord[], scope?: {
|
|
538
|
+
collection: string;
|
|
539
|
+
resolve?: PartitionResolver;
|
|
540
|
+
}): void;
|
|
386
541
|
/**
|
|
387
542
|
* Sanity-check a proposed period name + endDate against existing
|
|
388
543
|
* records. Shared by closePeriod / openPeriod so the two pathways
|
|
@@ -390,7 +545,7 @@ export declare function assertTsWritable(existing: {
|
|
|
390
545
|
*
|
|
391
546
|
* @internal
|
|
392
547
|
*/
|
|
393
|
-
export declare function validatePeriodName(name: string, existing: readonly PeriodRecord[]): void;
|
|
548
|
+
export declare function validatePeriodName(name: string, existing: readonly PeriodRecord[], partition?: PeriodPartition): void;
|
|
394
549
|
/**
|
|
395
550
|
* Wire a reserved-collection ledger append for a period record. The
|
|
396
551
|
* period itself is stored via the adapter as an encrypted envelope;
|
|
@@ -12,21 +12,30 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import type { EncryptedEnvelope, NoydbStore } from '../../kernel/types.js';
|
|
14
14
|
import type { LedgerStore } from '../../with-commit/history/ledger/store.js';
|
|
15
|
-
import type { PeriodRecord } from './periods.js';
|
|
15
|
+
import type { PeriodRecord, PeriodPartition, PartitionResolver } from './periods.js';
|
|
16
16
|
/**
|
|
17
17
|
* @internal
|
|
18
18
|
*/
|
|
19
19
|
export interface PeriodsStrategy {
|
|
20
20
|
loadPeriods(adapter: NoydbStore, vault: string, decrypt: (envelope: EncryptedEnvelope) => Promise<PeriodRecord>): Promise<PeriodRecord[]>;
|
|
21
|
-
chainAnchor(records: readonly PeriodRecord[]): Promise<{
|
|
21
|
+
chainAnchor(records: readonly PeriodRecord[], partition?: PeriodPartition): Promise<{
|
|
22
22
|
priorPeriodName?: string;
|
|
23
23
|
priorPeriodHash: string;
|
|
24
24
|
}>;
|
|
25
25
|
assertTsWritable(existing: {
|
|
26
26
|
ts: string | null;
|
|
27
27
|
record: Record<string, unknown> | null;
|
|
28
|
-
} | null, incoming: Record<string, unknown> | null, periods: readonly PeriodRecord[]
|
|
29
|
-
|
|
28
|
+
} | null, incoming: Record<string, unknown> | null, periods: readonly PeriodRecord[], scope?: {
|
|
29
|
+
collection: string;
|
|
30
|
+
resolve?: PartitionResolver;
|
|
31
|
+
}): void;
|
|
32
|
+
validatePeriodName(name: string, existing: readonly PeriodRecord[], partition?: PeriodPartition): void;
|
|
33
|
+
/**
|
|
34
|
+
* Record → timeline resolver built from `withPeriods({ subjects })` (#1005).
|
|
35
|
+
* `undefined` when the caller configured no subjects, which keeps every
|
|
36
|
+
* record on the vault-wide timeline.
|
|
37
|
+
*/
|
|
38
|
+
readonly partitionOf?: PartitionResolver;
|
|
30
39
|
appendPeriodLedgerEntry(ledger: LedgerStore | null, actor: string, envelope: EncryptedEnvelope, periodName: string, collection?: string): Promise<void>;
|
|
31
40
|
}
|
|
32
41
|
export declare const NO_PERIODS: PeriodsStrategy;
|
|
@@ -3,7 +3,31 @@ import type { NoydbStore } from '../../kernel/types.js';
|
|
|
3
3
|
import type { LedgerStore } from '../../with-commit/history/ledger/store.js';
|
|
4
4
|
import type { Collection } from '../../kernel/collection.js';
|
|
5
5
|
import type { PeriodsStrategy } from './strategy.js';
|
|
6
|
-
import { type PeriodRecord, type TargetPurgeCount, type ClosePeriodOptions, type OpenPeriodOptions } from './periods.js';
|
|
6
|
+
import { type PeriodRecord, type TargetPurgeCount, type ClosePeriodOptions, type OpenPeriodOptions, type PeriodPartition, type PeriodReopenEvent } from './periods.js';
|
|
7
|
+
/** Selects one period timeline. Omit — or pass an empty tuple — for the vault-wide one (#1005). */
|
|
8
|
+
export interface PeriodScope {
|
|
9
|
+
readonly partition?: PeriodPartition;
|
|
10
|
+
}
|
|
11
|
+
/** A scoped operation that also records a free-text justification in the audit trail. */
|
|
12
|
+
export interface PeriodScopeWithReason extends PeriodScope {
|
|
13
|
+
readonly reason?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Options for `vault.reopenPeriod()` (#1022). */
|
|
16
|
+
export interface ReopenPeriodOptions extends PeriodScopeWithReason {
|
|
17
|
+
/**
|
|
18
|
+
* ISO instant after which the period re-seals BY ITSELF, with nobody acting.
|
|
19
|
+
* Omit for a window that stays open until an explicit `reclosePeriod()`.
|
|
20
|
+
*
|
|
21
|
+
* Expiry is evaluated against the clock on every write check, so a lapsed
|
|
22
|
+
* window needs no sweep, no timer and no cache invalidation to take effect.
|
|
23
|
+
*/
|
|
24
|
+
readonly until?: string;
|
|
25
|
+
}
|
|
26
|
+
/** The persisted side of a write, as the period write-guard sees it. */
|
|
27
|
+
export interface PeriodGuardPrior {
|
|
28
|
+
readonly ts: string | null;
|
|
29
|
+
readonly record: Record<string, unknown> | null;
|
|
30
|
+
}
|
|
7
31
|
/** Everything the moving period methods touched on the vault's `this.*`. */
|
|
8
32
|
export interface VaultPeriodsDeps {
|
|
9
33
|
/** Resolved periods strategy (NO_PERIODS when not configured). */
|
|
@@ -56,7 +80,7 @@ export declare class VaultPeriods {
|
|
|
56
80
|
* read only. Idempotent: a second call is a no-op that returns the
|
|
57
81
|
* same merged record without re-purging or re-appending a ledger entry.
|
|
58
82
|
*/
|
|
59
|
-
freezePeriod(name: string): Promise<PeriodRecord>;
|
|
83
|
+
freezePeriod(name: string, options?: PeriodScope): Promise<PeriodRecord>;
|
|
60
84
|
/**
|
|
61
85
|
* Archive a closed period (#613): physically relocates its in-window
|
|
62
86
|
* records (those with `_ts < periodExclusiveUpperBound(endDate)`) from the
|
|
@@ -66,7 +90,7 @@ export declare class VaultPeriods {
|
|
|
66
90
|
* through to cold) and idempotent: a second call is a no-op returning the
|
|
67
91
|
* same merged record.
|
|
68
92
|
*/
|
|
69
|
-
archivePeriod(name: string): Promise<PeriodRecord>;
|
|
93
|
+
archivePeriod(name: string, options?: PeriodScope): Promise<PeriodRecord>;
|
|
70
94
|
/**
|
|
71
95
|
* Target-purge a closed period (#615): sweeps delete markers off the vault's
|
|
72
96
|
* PUSH-ONLY sync targets (`backup`/`archive`) via `purgeTargets`, recording a
|
|
@@ -76,22 +100,77 @@ export declare class VaultPeriods {
|
|
|
76
100
|
* Idempotent once run; with no push-only targets it writes no companion and
|
|
77
101
|
* is re-runnable.
|
|
78
102
|
*/
|
|
79
|
-
purgePeriodTargets(name: string): Promise<PeriodRecord>;
|
|
103
|
+
purgePeriodTargets(name: string, options?: PeriodScope): Promise<PeriodRecord>;
|
|
80
104
|
/** Merge target-purge companion fields into a fresh `PeriodRecord` copy — never mutates `periodCache`. */
|
|
81
105
|
private mergeTargetPurge;
|
|
82
106
|
/** Merge archive companion fields into a fresh `PeriodRecord` copy — never mutates `periodCache`. */
|
|
83
107
|
private mergeArchive;
|
|
84
108
|
/** Merge freeze companion fields into a fresh `PeriodRecord` copy — never mutates `periodCache`. */
|
|
85
109
|
private mergeFreeze;
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Return every closed / opened period in `closedAt` order, merged with any
|
|
112
|
+
* freeze + archive companions.
|
|
113
|
+
*
|
|
114
|
+
* With no argument this spans EVERY timeline — the pre-#1005 behaviour, and
|
|
115
|
+
* the right default for an audit sweep. Pass `{ partition }` to scope to one
|
|
116
|
+
* timeline; `{ partition: [] }` (or omitting it) means the vault-wide one.
|
|
117
|
+
*/
|
|
118
|
+
listPeriods(options?: PeriodScope): Promise<readonly PeriodRecord[]>;
|
|
119
|
+
/**
|
|
120
|
+
* Look up a single period by name within one timeline, merged with its
|
|
121
|
+
* freeze + archive + target-purge companions if any. Returns `null` if not
|
|
122
|
+
* found.
|
|
123
|
+
*
|
|
124
|
+
* Names are only unique per partition (#1005), so this resolves against the
|
|
125
|
+
* VAULT-WIDE timeline unless `{ partition }` says otherwise — matching how
|
|
126
|
+
* every pre-partition period is stored.
|
|
127
|
+
*/
|
|
128
|
+
getPeriod(name: string, options?: PeriodScope): Promise<PeriodRecord | null>;
|
|
129
|
+
/**
|
|
130
|
+
* The full append-only reopen/reclose log for one period (#1022) — the record
|
|
131
|
+
* an audit actually asks for, in order. `[]` when never reopened.
|
|
132
|
+
*/
|
|
133
|
+
listPeriodReopens(name: string, options?: PeriodScope): Promise<readonly PeriodReopenEvent[]>;
|
|
134
|
+
/**
|
|
135
|
+
* Return a closed period to a writable state (#1022).
|
|
136
|
+
*
|
|
137
|
+
* Close is a three-state lifecycle in practice — open / closed / reopened —
|
|
138
|
+
* because a month gets closed and then a missing invoice arrives, or a filing
|
|
139
|
+
* is rejected and must be amended. That is routine, and it is supposed to
|
|
140
|
+
* leave a trail.
|
|
141
|
+
*
|
|
142
|
+
* The `_periods/<key>` record is NOT touched: the reopen is appended to a
|
|
143
|
+
* companion log, so the inter-period hash chain that proves the close
|
|
144
|
+
* happened survives the reopen intact. The chain reads *closed at T1,
|
|
145
|
+
* reopened at T2 by U, reclosed at T3*.
|
|
146
|
+
*
|
|
147
|
+
* A reopen withdraws the PERIOD's veto and nothing else. Record-level rules —
|
|
148
|
+
* an `immutableGuard` on a sent receipt, a frozen field — are separate gate
|
|
149
|
+
* handlers registered ahead of the period gate, so a reopened month cannot
|
|
150
|
+
* resurrect a document that is independently locked. Period state can only
|
|
151
|
+
* ever widen what the record-level rule already permits.
|
|
152
|
+
*
|
|
153
|
+
* Reopening an already-open window is allowed and appends another event: that
|
|
154
|
+
* is how a window gets extended, and the log keeps both.
|
|
155
|
+
*/
|
|
156
|
+
reopenPeriod(name: string, options?: ReopenPeriodOptions): Promise<PeriodRecord>;
|
|
157
|
+
/**
|
|
158
|
+
* Seal a reopened period again (#1022), ending the window explicitly rather
|
|
159
|
+
* than waiting for an `until` to lapse. Appends to the same log, so the
|
|
160
|
+
* close → reopen → reclose sequence is recoverable in order.
|
|
161
|
+
*/
|
|
162
|
+
reclosePeriod(name: string, options?: PeriodScopeWithReason): Promise<PeriodRecord>;
|
|
163
|
+
/** Append one entry to a period's reopen log, ledger it, and invalidate the guard's view. */
|
|
164
|
+
private appendReopenEvent;
|
|
165
|
+
/** Merge each period's reopen log onto it. One adapter listing, not one per period. */
|
|
166
|
+
private mergeReopenState;
|
|
167
|
+
/** Resolve one period within the timeline named by `options` (vault-wide when absent). */
|
|
168
|
+
private findPeriod;
|
|
169
|
+
/** Called by the gate bus before put/delete. `collection` selects the subject mapping (#1005). */
|
|
91
170
|
assertTsWritable(existing: {
|
|
92
171
|
ts: string | null;
|
|
93
172
|
record: Record<string, unknown> | null;
|
|
94
|
-
} | null, incoming: Record<string, unknown> | null): Promise<void>;
|
|
173
|
+
} | null, incoming: Record<string, unknown> | null, collection?: string): Promise<void>;
|
|
95
174
|
private loadPeriodsCache;
|
|
96
175
|
/** Generic reserved-collection writer — serves `_periods` and `_period_freezes` alike. */
|
|
97
176
|
private writeReserved;
|
|
@@ -6,6 +6,16 @@ export declare const PERIOD_FREEZES_COLLECTION = "_period_freezes";
|
|
|
6
6
|
export declare const PERIOD_ARCHIVES_COLLECTION = "_period_archives";
|
|
7
7
|
/** Sibling of {@link PERIODS_COLLECTION} holding target-purge companions (#615). */
|
|
8
8
|
export declare const PERIOD_TARGET_PURGES_COLLECTION = "_period_target_purges";
|
|
9
|
+
/**
|
|
10
|
+
* Sibling of {@link PERIODS_COLLECTION} holding reopen/reclose companions (#1022).
|
|
11
|
+
*
|
|
12
|
+
* Unlike the freeze / archive / target-purge companions — each a single,
|
|
13
|
+
* idempotent, once-only record — this one holds an APPEND-ONLY EVENT LIST,
|
|
14
|
+
* because reopening is a repeating cycle: a month can be closed, reopened,
|
|
15
|
+
* reclosed, and reopened again. The audit value is the sequence, not the
|
|
16
|
+
* latest state.
|
|
17
|
+
*/
|
|
18
|
+
export declare const PERIOD_REOPENS_COLLECTION = "_period_reopens";
|
|
9
19
|
/**
|
|
10
20
|
* Exclusive upper bound for a period's delete-marker purge window (#604).
|
|
11
21
|
* Markers carry no business date (empty body), only write-time `_ts`, so freeze
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* distributed query, addressing, and change-observation. It consolidates the
|
|
9
9
|
* runtime floor formerly published as `/kernel` plus the orchestration delta.
|
|
10
10
|
*
|
|
11
|
-
* See docs/
|
|
11
|
+
* See docs/foundations/architecture-lexicon.md.
|
|
12
12
|
*
|
|
13
13
|
* @packageDocumentation
|
|
14
14
|
*/
|
|
@@ -37,7 +37,7 @@ export type { ExtractPartitionResult } from './extract-partition.js';
|
|
|
37
37
|
export { adoptPartition, unsealDeks, createOwnerOnAdoptedPartition } from './adopt-partition.js';
|
|
38
38
|
export type { AdoptPartitionOptions, AdoptPartitionResult, CreateOwnerResult, CreateOwnerOptions, CreateOwnerStandardOptions, CreateOwnerManagedOptions, } from './adopt-partition.js';
|
|
39
39
|
export { TransferSealError, AdoptionStateError, PartitionExtractionError } from '../kernel/errors.js';
|
|
40
|
-
export type { WriteHook } from '../port/with/write-hooks.js';
|
|
40
|
+
export type { WriteHook, WriteEvent } from '../port/with/write-hooks.js';
|
|
41
41
|
export type { WriteQueue } from '../kernel/write-queue.js';
|
|
42
42
|
export type { WriteConflict } from '../kernel/types.js';
|
|
43
43
|
export type { AccessibleVault } from '../kernel/types.js';
|
|
@@ -128,7 +128,7 @@ export interface LedgerEntry {
|
|
|
128
128
|
* the role of the actor, the (collection, id, vBefore, vAfter) tuple
|
|
129
129
|
* for every record touched, and which guard invariants passed.
|
|
130
130
|
*
|
|
131
|
-
* See
|
|
131
|
+
* See design-history/2026-05-18-guards-design.md.
|
|
132
132
|
*/
|
|
133
133
|
readonly amendment?: {
|
|
134
134
|
readonly reason: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @category capability
|
|
3
3
|
* Deferred-numbering config descriptor. See
|
|
4
|
-
*
|
|
4
|
+
* design-history/2026-06-08-sealed-numbering-and-store-clock-design.md.
|
|
5
5
|
*/
|
|
6
6
|
/** A registered deferred-numbering series. */
|
|
7
7
|
export interface DeferredNumberingConfig {
|
|
@@ -5,6 +5,6 @@ import type { DerivationSpec, DerivationStrategy } from './types.js';
|
|
|
5
5
|
* plaintext after DEK unwrap. Outputs are encrypted with the same DEK
|
|
6
6
|
* as the source and written via the standard `Collection.put` path.
|
|
7
7
|
*
|
|
8
|
-
* See
|
|
8
|
+
* See design-history/2026-05-01-dim14-derivation-v1-design.md.
|
|
9
9
|
*/
|
|
10
10
|
export declare function withDerivation<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>>(spec: DerivationSpec<TSource, TOutputs>): DerivationStrategy;
|
|
@@ -4,6 +4,7 @@ import type { ReduceSpec, Reduction } from '../../with-lookup/reduce/reduction.j
|
|
|
4
4
|
import type { GroupedReduction } from '../../with-lookup/reduce/groupby.js';
|
|
5
5
|
import type { JoinStrategy } from '../../kernel/query/join.js';
|
|
6
6
|
import type { MoneyDescriptor } from '../../via/money/descriptor.js';
|
|
7
|
+
import type { ExactMath } from '../../via/money/exact.js';
|
|
7
8
|
import type { I18nTextDescriptor } from '../../via/i18n/core.js';
|
|
8
9
|
/**
|
|
9
10
|
* Minimal vault-shaped accessor passed to the MV `query()` callback.
|
|
@@ -269,6 +270,57 @@ export interface MaterializedViewSpec<TRow extends Record<string, unknown>> {
|
|
|
269
270
|
* UNION-mode only. Ignored if {@link query} is set.
|
|
270
271
|
*/
|
|
271
272
|
aggregate?: ReduceSpec;
|
|
273
|
+
/**
|
|
274
|
+
* Post-aggregate projection over ONE finished row (#1007).
|
|
275
|
+
*
|
|
276
|
+
* `aggregate` accepts reducers only, so a row can carry every input a
|
|
277
|
+
* derived value needs and still not express it — `max(0, netTotal - paid)`
|
|
278
|
+
* is not a reduction. `derive` closes that gap: it receives the row the
|
|
279
|
+
* grouping/aggregation pipeline just produced and returns a patch merged
|
|
280
|
+
* onto it, immediately before materialisation.
|
|
281
|
+
*
|
|
282
|
+
* ```ts
|
|
283
|
+
* aggregate: { paid: sum('paid'), netTotal: sum('netTotal') },
|
|
284
|
+
* derive: (row) => ({ toPay: Math.max(0, row.netTotal - row.paid) }),
|
|
285
|
+
* ```
|
|
286
|
+
*
|
|
287
|
+
* Deliberately narrow, and the narrowness is what keeps it safe under
|
|
288
|
+
* incremental recompute: **pure, single-row, no cross-row access, no second
|
|
289
|
+
* aggregation pass.** It only ever sees the row the reducer just produced,
|
|
290
|
+
* so a refresh triggered by one source write recomputes it correctly without
|
|
291
|
+
* the engine needing to know anything about the function.
|
|
292
|
+
*
|
|
293
|
+
* Returning `null` / `undefined` leaves the row unchanged. Returned keys
|
|
294
|
+
* that collide with a {@link groupBy} field throw
|
|
295
|
+
* `MaterializedViewConfigError` — a group key is the row's identity and
|
|
296
|
+
* feeds {@link rowKey}, so rewriting it would silently re-home the row.
|
|
297
|
+
*
|
|
298
|
+
* **Money:** money leaves a reducer as an exact decimal string, and
|
|
299
|
+
* `Number(a) - Number(b)` would put it straight back through binary floating
|
|
300
|
+
* point — `10.05 - 0.10` becomes `9.950000000000001`, which the money
|
|
301
|
+
* quantiser then refuses rather than storing drift. So `derive` receives
|
|
302
|
+
* {@link ExactMath} as its second argument; it works in scaled BigInt and
|
|
303
|
+
* cannot introduce a representation error:
|
|
304
|
+
*
|
|
305
|
+
* ```ts
|
|
306
|
+
* moneyFields: { netTotal: THB, paid: THB, toPay: THB },
|
|
307
|
+
* derive: (row, exact) => ({ toPay: exact.max(0, exact.sub(row.netTotal, row.paid)) }),
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* Declare the derived field in {@link moneyFields} and the result is
|
|
311
|
+
* quantised through that descriptor before storage, exact at its scale.
|
|
312
|
+
*
|
|
313
|
+
* Note the one place `TRow` under-describes what arrives: a field declared
|
|
314
|
+
* in {@link moneyFields} reaches `derive` DECODED — the decimal string a
|
|
315
|
+
* reader would see, not the scaled integer the reducer left behind — even
|
|
316
|
+
* where `TRow` types it as `number` (which is what the arms' `map` emits).
|
|
317
|
+
* `ExactMath` accepts both, which is why its operations are the right tool
|
|
318
|
+
* here and why no cast is needed.
|
|
319
|
+
*
|
|
320
|
+
* Applies to every MV form (union, projection, and query), always as the
|
|
321
|
+
* last step before rows are materialised.
|
|
322
|
+
*/
|
|
323
|
+
derive?: (row: TRow, exact: ExactMath) => Record<string, unknown> | null | undefined;
|
|
272
324
|
/**
|
|
273
325
|
* Money descriptors for the UNION-mode aggregate, keyed by the
|
|
274
326
|
* OUTPUT/intermediate field name as it appears in the mapped row and
|
|
@@ -21,8 +21,8 @@ import type { MaterializedViewSpec, MaterializedViewStrategy } from './types.js'
|
|
|
21
21
|
* The three modes are mutually exclusive — exactly one of `query` /
|
|
22
22
|
* `unionSources` / `projection` must be set at registration time.
|
|
23
23
|
*
|
|
24
|
-
* See
|
|
25
|
-
*
|
|
26
|
-
* and
|
|
24
|
+
* See design-history/2026-05-20-dim14-mv-v2-design.md (single-source v2),
|
|
25
|
+
* design-history/2026-05-21-dim14-mv-multikey-and-union.md (UNION),
|
|
26
|
+
* and design-history/2026-07-25-join-projection-mv-design.md (projection).
|
|
27
27
|
*/
|
|
28
28
|
export declare function withMaterializedView<TRow extends Record<string, unknown>>(spec: MaterializedViewSpec<TRow>): MaterializedViewStrategy;
|
|
@@ -4,6 +4,6 @@ import type { OverlayedViewSpec, OverlayedViewStrategy } from './types.js';
|
|
|
4
4
|
* a user-writable overlay so consumers can express operator-editable
|
|
5
5
|
* lifecycles as one declarative block.
|
|
6
6
|
*
|
|
7
|
-
* See
|
|
7
|
+
* See design-history/2026-05-20-dim14-mv-v2-design.md.
|
|
8
8
|
*/
|
|
9
9
|
export declare function withOverlayedView(spec: OverlayedViewSpec): OverlayedViewStrategy;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* vault instance (and thus no custody namespace) yet — it stays the exported
|
|
21
21
|
* `team/deed.ts` function.
|
|
22
22
|
*
|
|
23
|
-
* @see
|
|
23
|
+
* @see design-history/2026-06-17-fr6-deed-custodian-liberate-design.md
|
|
24
24
|
* @module
|
|
25
25
|
*/
|
|
26
26
|
import type { GrantOptions, RevokeOptions, FactorProofBundle } from '../../kernel/types.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* `UserEnvelopeOversizedError` live in the kernel spine
|
|
6
6
|
* (`kernel/types.ts` / `kernel/constants.ts` / `kernel/errors.ts`).
|
|
7
7
|
*
|
|
8
|
-
* @see
|
|
8
|
+
* @see design-history/2026-05-05-user-envelope-design.md
|
|
9
9
|
*
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* (`vault.user.*`) sits on top of this; permission gates, own-only
|
|
13
13
|
* write enforcement, and presence-channel propagation live there.
|
|
14
14
|
*
|
|
15
|
-
* @see
|
|
15
|
+
* @see design-history/2026-05-05-user-envelope-design.md
|
|
16
16
|
*
|
|
17
17
|
* @module
|
|
18
18
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `beginEchoUnlock` — the interactive ceremony API (spec
|
|
3
|
-
*
|
|
3
|
+
* design-history/2026-08-02-echo-secret-design.md, #940, Task 6).
|
|
4
4
|
*
|
|
5
5
|
* Split out of `echo-secret.ts` (which owns only the block builders +
|
|
6
6
|
* verifiers) because this module orchestrates BOTH `echo-secret.ts`
|
|
@@ -33,7 +33,7 @@ export interface EchoCeremony {
|
|
|
33
33
|
* TYPE it.
|
|
34
34
|
*
|
|
35
35
|
* Conforming-player contract (spec
|
|
36
|
-
*
|
|
36
|
+
* design-history/2026-08-02-echo-secret-design.md, "Ceremony"):
|
|
37
37
|
* when the owner does NOT recognize the revealed echo, the player MUST show
|
|
38
38
|
* a hard phishing warning — do not continue, open the official app, rotate
|
|
39
39
|
* the secret immediately — MUST NOT offer any skip or
|
|
@@ -57,7 +57,7 @@ export interface EchoCeremony {
|
|
|
57
57
|
* cannot be resolved — sealed reveal under a foreign device).
|
|
58
58
|
*
|
|
59
59
|
* Conforming-player contract (spec
|
|
60
|
-
*
|
|
60
|
+
* design-history/2026-08-02-echo-secret-design.md): an owner who does
|
|
61
61
|
* not recognize `ceremony.reveal` is looking at a phish. The player MUST then
|
|
62
62
|
* show a hard warning (stop, open the official app, rotate the secret now),
|
|
63
63
|
* MUST NOT offer a skip / "verification unavailable" fallback or any
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Echo-block builders + verifiers (spec
|
|
3
|
-
*
|
|
3
|
+
* design-history/2026-08-02-echo-secret-design.md, #940).
|
|
4
4
|
*
|
|
5
5
|
* Builds and verifies the on-keyring {@link KeyringEchoBlock} declaration
|
|
6
6
|
* for the 3-part echo ceremony (prompt → echo → key). This module owns:
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* offline brute-force oracles for anyone holding the keyring file (600K
|
|
25
25
|
* PBKDF2 per guess), and the `sealed` reveal blob is unpadded so its length
|
|
26
26
|
* discloses the echo's UTF-8 byte length — see the threat model in
|
|
27
|
-
* `
|
|
27
|
+
* `design-history/2026-08-02-echo-secret-design.md`.
|
|
28
28
|
*
|
|
29
29
|
* @module
|
|
30
30
|
*/
|
|
@@ -368,8 +368,17 @@ export declare function listUsersWithEnvelopes<T = unknown>(store: NoydbStore, v
|
|
|
368
368
|
user: UserInfo;
|
|
369
369
|
envelope: UserEnvelope<T> | null;
|
|
370
370
|
}>>;
|
|
371
|
-
/** Ensure a DEK exists for a collection. Generates one if new. */
|
|
372
371
|
export declare function ensureCollectionDEK(store: NoydbStore, vault: string, keyring: UnlockedKeyring): Promise<(collectionName: string) => Promise<EnclaveKey>>;
|
|
372
|
+
/**
|
|
373
|
+
* The `Permissions` catch-all key (#1010). `Permissions` has always documented
|
|
374
|
+
* `'*'` as "the wildcard collection matching all collections in the vault", but
|
|
375
|
+
* nothing expanded it — a grantee handed the documented catch-all got no keys
|
|
376
|
+
* at all. It is honoured in three places, and they must agree: the DEK wrapping
|
|
377
|
+
* in `grant()`, and both permission checks below.
|
|
378
|
+
*/
|
|
379
|
+
export declare const PERMISSION_WILDCARD = "*";
|
|
380
|
+
/** Does this permission map hand over the whole vault? */
|
|
381
|
+
export declare function permissionsAreWildcard(permissions: Permissions | undefined): boolean;
|
|
373
382
|
/** Check if a user has write permission for a collection. */
|
|
374
383
|
export declare function hasWritePermission(keyring: UnlockedKeyring, collectionName: string): boolean;
|
|
375
384
|
/** Check if a user has any access to a collection. */
|