@sixb/core 0.1.8 → 0.1.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/dist/actions/index.js +77 -89
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/run-dispatch.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +2 -0
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/actions/validation.d.ts +1 -1
- package/dist/actions/validation.d.ts.map +1 -1
- package/dist/actions/worker.js +33 -37
- package/dist/actions/worker.js.map +2 -2
- package/dist/agents/adapters.d.ts +3 -3
- package/dist/agents/{context.d.ts → context/entries.d.ts} +3 -3
- package/dist/agents/context/entries.d.ts.map +1 -0
- package/dist/agents/context/index.d.ts +4 -0
- package/dist/agents/context/index.d.ts.map +1 -0
- package/dist/agents/context/index.js +19 -0
- package/dist/agents/{streams.js.map → context/index.js.map} +1 -1
- package/dist/agents/context-model.d.ts +1 -1
- package/dist/agents/context-model.d.ts.map +1 -1
- package/dist/agents/context-resolution.d.ts +1 -1
- package/dist/agents/context-resolution.d.ts.map +1 -1
- package/dist/agents/index.d.ts +4 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +193 -204
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/message.d.ts +1 -1
- package/dist/agents/message.d.ts.map +1 -1
- package/dist/agents/model-loop.d.ts +2 -0
- package/dist/agents/model-loop.d.ts.map +1 -1
- package/dist/agents/request.d.ts +1 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/streams/index.d.ts +4 -0
- package/dist/agents/streams/index.d.ts.map +1 -0
- package/dist/agents/streams/index.js +20 -0
- package/dist/{chunk-y64skrwp.js.map → agents/streams/index.js.map} +1 -1
- package/dist/agents/streams/internal.d.ts +3 -0
- package/dist/agents/streams/internal.d.ts.map +1 -0
- package/dist/agents/streams/internal.js +40 -0
- package/dist/agents/{context.js.map → streams/internal.js.map} +1 -1
- package/dist/agents/{streams.d.ts → streams/protocol.d.ts} +5 -5
- package/dist/agents/streams/protocol.d.ts.map +1 -0
- package/dist/agents/types.d.ts +1 -1
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/auth/index.d.ts +0 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +96 -108
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/strategy.js +8 -9
- package/dist/auth/strategy.js.map +1 -1
- package/dist/authorization/index.js +51 -56
- package/dist/authorization/index.js.map +1 -1
- package/dist/blob-storage/browser.js +15 -17
- package/dist/blob-storage/browser.js.map +1 -1
- package/dist/blob-storage/index.js +36 -38
- package/dist/blob-storage/index.js.map +1 -1
- package/dist/bootstrap/discovery.d.ts +14 -1
- package/dist/bootstrap/discovery.d.ts.map +1 -1
- package/dist/bootstrap/index.d.ts +2 -2
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +80 -88
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/broker/in-memory.d.ts +8 -2
- package/dist/broker/in-memory.d.ts.map +1 -1
- package/dist/broker/index.d.ts +4 -2
- package/dist/broker/index.d.ts.map +1 -1
- package/dist/broker/index.js +12 -10
- package/dist/broker/index.js.map +1 -1
- package/dist/broker/retention.d.ts +4 -0
- package/dist/broker/retention.d.ts.map +1 -0
- package/dist/broker/subscriber.d.ts +10 -0
- package/dist/broker/subscriber.d.ts.map +1 -0
- package/dist/broker/types.d.ts +14 -1
- package/dist/broker/types.d.ts.map +1 -1
- package/dist/chunk-0y39rgsb.js +43 -0
- package/dist/{chunk-c15dr03f.js.map → chunk-0y39rgsb.js.map} +2 -2
- package/dist/{chunk-k522z7v6.js → chunk-17kfctj6.js} +16 -11
- package/dist/chunk-17kfctj6.js.map +10 -0
- package/dist/{chunk-ajnan18g.js → chunk-1824gssz.js} +74 -106
- package/dist/chunk-1824gssz.js.map +12 -0
- package/dist/chunk-28ja2cjs.js +602 -0
- package/dist/chunk-28ja2cjs.js.map +18 -0
- package/dist/{chunk-5gd7tpv6.js → chunk-2c4j899j.js} +4 -4
- package/dist/chunk-2c4j899j.js.map +11 -0
- package/dist/{chunk-rv2hkwwa.js → chunk-358caqf5.js} +157 -180
- package/dist/chunk-358caqf5.js.map +12 -0
- package/dist/{chunk-fvt9rjsa.js → chunk-38zv5rkr.js} +4 -4
- package/dist/{chunk-fvt9rjsa.js.map → chunk-38zv5rkr.js.map} +1 -1
- package/dist/{chunk-w3e09qqk.js → chunk-39tqv9hz.js} +24 -24
- package/dist/{chunk-w3e09qqk.js.map → chunk-39tqv9hz.js.map} +2 -2
- package/dist/{chunk-04b07a9q.js → chunk-3bh94gbw.js} +13 -13
- package/dist/{chunk-04b07a9q.js.map → chunk-3bh94gbw.js.map} +2 -2
- package/dist/{chunk-s5y30bc9.js → chunk-3qms4nax.js} +52 -50
- package/dist/{chunk-s5y30bc9.js.map → chunk-3qms4nax.js.map} +5 -5
- package/dist/{chunk-nf4r78r4.js → chunk-5a4a52tq.js} +4 -4
- package/dist/{chunk-nf4r78r4.js.map → chunk-5a4a52tq.js.map} +2 -2
- package/dist/{chunk-wtf06et8.js → chunk-5c7ga8zz.js} +54 -177
- package/dist/chunk-5c7ga8zz.js.map +12 -0
- package/dist/{chunk-rte5sm3z.js → chunk-5hz0fnca.js} +23 -23
- package/dist/{chunk-rte5sm3z.js.map → chunk-5hz0fnca.js.map} +2 -2
- package/dist/{chunk-xajtptbw.js → chunk-5p1v802y.js} +1401 -445
- package/dist/chunk-5p1v802y.js.map +44 -0
- package/dist/chunk-653vwrzr.js +39 -0
- package/dist/chunk-653vwrzr.js.map +10 -0
- package/dist/{chunk-qw9gvjv5.js → chunk-72w2pxk7.js} +13 -13
- package/dist/{chunk-qw9gvjv5.js.map → chunk-72w2pxk7.js.map} +2 -2
- package/dist/chunk-7apz6hg4.js +50 -0
- package/dist/{chunk-jq43kdvk.js.map → chunk-7apz6hg4.js.map} +2 -2
- package/dist/chunk-7bs40fe1.js +218 -0
- package/dist/{chunk-p1rzczbt.js.map → chunk-7bs40fe1.js.map} +3 -3
- package/dist/chunk-7zgecwy1.js +113 -0
- package/dist/chunk-7zgecwy1.js.map +10 -0
- package/dist/{chunk-xhy826cz.js → chunk-85cd7e8c.js} +8 -7
- package/dist/chunk-85cd7e8c.js.map +10 -0
- package/dist/{chunk-pc7ys28c.js → chunk-860dwwy0.js} +29 -29
- package/dist/{chunk-pc7ys28c.js.map → chunk-860dwwy0.js.map} +2 -2
- package/dist/chunk-8vj0rjgs.js +165 -0
- package/dist/chunk-8vj0rjgs.js.map +15 -0
- package/dist/{chunk-7y0f6rf1.js → chunk-92vk7gta.js} +58 -58
- package/dist/chunk-92vk7gta.js.map +10 -0
- package/dist/{chunk-rafagrwr.js → chunk-93csa55g.js} +45 -17
- package/dist/chunk-93csa55g.js.map +11 -0
- package/dist/{chunk-aa2pen2v.js → chunk-976rxdpx.js} +188 -175
- package/dist/{chunk-aa2pen2v.js.map → chunk-976rxdpx.js.map} +2 -2
- package/dist/{chunk-d8qkxt2v.js → chunk-98cw09sw.js} +7 -7
- package/dist/chunk-98cw09sw.js.map +10 -0
- package/dist/{chunk-n4khvw9n.js → chunk-9qsh3p5y.js} +17 -17
- package/dist/{chunk-n4khvw9n.js.map → chunk-9qsh3p5y.js.map} +2 -2
- package/dist/{chunk-4a849fr1.js → chunk-9tc8dxmn.js} +1 -1
- package/dist/{chunk-9nbmsvn5.js → chunk-9vx5e9g1.js} +9 -9
- package/dist/{chunk-9nbmsvn5.js.map → chunk-9vx5e9g1.js.map} +2 -2
- package/dist/{chunk-8m5ejdpn.js → chunk-9x8dybsb.js} +5 -5
- package/dist/chunk-9x8dybsb.js.map +10 -0
- package/dist/chunk-aa6z4a19.js +358 -0
- package/dist/chunk-aa6z4a19.js.map +12 -0
- package/dist/{chunk-3xep5cjx.js → chunk-agbbygvh.js} +104 -86
- package/dist/chunk-agbbygvh.js.map +15 -0
- package/dist/{chunk-2dw777qw.js → chunk-ap0g1g74.js} +37 -82
- package/dist/{chunk-2dw777qw.js.map → chunk-ap0g1g74.js.map} +3 -4
- package/dist/{chunk-v4en4jc2.js → chunk-awbhdqyc.js} +7 -7
- package/dist/{chunk-v4en4jc2.js.map → chunk-awbhdqyc.js.map} +2 -2
- package/dist/{chunk-w9tg6yyb.js → chunk-b0ec55a1.js} +54 -37
- package/dist/chunk-b0ec55a1.js.map +12 -0
- package/dist/{chunk-ka3a2ft3.js → chunk-b19g04jk.js} +12 -12
- package/dist/{chunk-ka3a2ft3.js.map → chunk-b19g04jk.js.map} +2 -2
- package/dist/{chunk-gbejpkex.js → chunk-bn138h9w.js} +27 -28
- package/dist/{chunk-gbejpkex.js.map → chunk-bn138h9w.js.map} +3 -3
- package/dist/{chunk-nx7k8tpr.js → chunk-br3k6qbf.js} +23 -23
- package/dist/{chunk-nx7k8tpr.js.map → chunk-br3k6qbf.js.map} +2 -2
- package/dist/{chunk-dbc80ad7.js → chunk-c5rkjrgp.js} +28 -28
- package/dist/{chunk-dbc80ad7.js.map → chunk-c5rkjrgp.js.map} +2 -2
- package/dist/{chunk-dktq02ne.js → chunk-cqr3acm1.js} +4 -4
- package/dist/{chunk-dktq02ne.js.map → chunk-cqr3acm1.js.map} +2 -2
- package/dist/chunk-d62kjtbg.js +7 -0
- package/dist/{chunk-zcnhxkvd.js.map → chunk-d62kjtbg.js.map} +2 -2
- package/dist/{chunk-74drx9gd.js → chunk-dfm066qg.js} +10 -10
- package/dist/{chunk-74drx9gd.js.map → chunk-dfm066qg.js.map} +2 -2
- package/dist/{chunk-5e3pq99w.js → chunk-dmn70ztd.js} +30 -30
- package/dist/chunk-dmn70ztd.js.map +11 -0
- package/dist/{chunk-p1x242ad.js → chunk-dz5h08xv.js} +175 -175
- package/dist/{chunk-p1x242ad.js.map → chunk-dz5h08xv.js.map} +2 -2
- package/dist/{chunk-p2vqaxkc.js → chunk-e0d1rzef.js} +27 -22
- package/dist/{chunk-p2vqaxkc.js.map → chunk-e0d1rzef.js.map} +3 -3
- package/dist/{chunk-5sz8ta9r.js → chunk-e1c18xjx.js} +52 -52
- package/dist/{chunk-5sz8ta9r.js.map → chunk-e1c18xjx.js.map} +2 -2
- package/dist/{chunk-19jp6g9d.js → chunk-f0rwz2vh.js} +54 -33
- package/dist/chunk-f0rwz2vh.js.map +11 -0
- package/dist/{chunk-2xns679x.js → chunk-f4w3yp4f.js} +171 -36
- package/dist/chunk-f4w3yp4f.js.map +12 -0
- package/dist/{chunk-979ww6b3.js → chunk-fb3feg1e.js} +29 -29
- package/dist/{chunk-979ww6b3.js.map → chunk-fb3feg1e.js.map} +2 -2
- package/dist/{chunk-f26bck4t.js → chunk-ftv470j8.js} +393 -355
- package/dist/{chunk-f26bck4t.js.map → chunk-ftv470j8.js.map} +7 -7
- package/dist/{chunk-4sm0aznx.js → chunk-g00bfdq6.js} +254 -256
- package/dist/{chunk-4sm0aznx.js.map → chunk-g00bfdq6.js.map} +3 -3
- package/dist/{chunk-p03r0h5s.js → chunk-g53f0e4j.js} +76 -202
- package/dist/chunk-g53f0e4j.js.map +15 -0
- package/dist/chunk-g6cke204.js +124 -0
- package/dist/chunk-g6cke204.js.map +10 -0
- package/dist/{chunk-q0k9nc5a.js → chunk-g7knyczr.js} +98 -98
- package/dist/{chunk-q0k9nc5a.js.map → chunk-g7knyczr.js.map} +2 -2
- package/dist/{chunk-51fjndv0.js → chunk-gfdh9kqa.js} +4 -4
- package/dist/{chunk-51fjndv0.js.map → chunk-gfdh9kqa.js.map} +2 -2
- package/dist/{chunk-8tsf6dmc.js → chunk-gqh45d2n.js} +244 -205
- package/dist/chunk-gqh45d2n.js.map +15 -0
- package/dist/chunk-h3v76ams.js +32 -0
- package/dist/{chunk-08m3b6w8.js.map → chunk-h3v76ams.js.map} +2 -2
- package/dist/{chunk-jecn6t54.js → chunk-jgwb25gc.js} +74 -74
- package/dist/{chunk-jecn6t54.js.map → chunk-jgwb25gc.js.map} +2 -2
- package/dist/{chunk-wdage1eb.js → chunk-jmfet9r4.js} +6 -6
- package/dist/{chunk-wdage1eb.js.map → chunk-jmfet9r4.js.map} +2 -2
- package/dist/{chunk-k34z5rvh.js → chunk-kfee1h52.js} +132 -48
- package/dist/chunk-kfee1h52.js.map +13 -0
- package/dist/{chunk-2ab72m2h.js → chunk-m2ca93my.js} +3 -3
- package/dist/{chunk-2ab72m2h.js.map → chunk-m2ca93my.js.map} +2 -2
- package/dist/{chunk-4jjp5k14.js → chunk-mmagke4x.js} +6 -6
- package/dist/{chunk-4jjp5k14.js.map → chunk-mmagke4x.js.map} +2 -2
- package/dist/{chunk-359jm1jw.js → chunk-mrp7k0pw.js} +20 -20
- package/dist/{chunk-359jm1jw.js.map → chunk-mrp7k0pw.js.map} +2 -2
- package/dist/{chunk-h0k55pc7.js → chunk-ms2tmn1k.js} +139 -139
- package/dist/{chunk-h0k55pc7.js.map → chunk-ms2tmn1k.js.map} +2 -2
- package/dist/{chunk-h5vqbfmd.js → chunk-nmbxcaqx.js} +117 -117
- package/dist/{chunk-h5vqbfmd.js.map → chunk-nmbxcaqx.js.map} +3 -3
- package/dist/{chunk-n2w475r0.js → chunk-nt99sxd6.js} +82 -82
- package/dist/{chunk-n2w475r0.js.map → chunk-nt99sxd6.js.map} +3 -3
- package/dist/{chunk-v1xppd0y.js → chunk-p5vcsw9c.js} +60 -60
- package/dist/{chunk-v1xppd0y.js.map → chunk-p5vcsw9c.js.map} +2 -2
- package/dist/{chunk-sbzzr4kx.js → chunk-p6a4npdx.js} +1260 -1289
- package/dist/chunk-p6a4npdx.js.map +58 -0
- package/dist/{chunk-trxxmgnf.js → chunk-pqajwytd.js} +10 -10
- package/dist/{chunk-trxxmgnf.js.map → chunk-pqajwytd.js.map} +3 -3
- package/dist/{chunk-nn0tekr1.js → chunk-pr2h4bv4.js} +33 -33
- package/dist/{chunk-nn0tekr1.js.map → chunk-pr2h4bv4.js.map} +2 -2
- package/dist/{chunk-xwnf87e1.js → chunk-q5gz3g2j.js} +64 -64
- package/dist/{chunk-xwnf87e1.js.map → chunk-q5gz3g2j.js.map} +2 -2
- package/dist/{chunk-5ntny1qx.js → chunk-qf954wje.js} +6 -6
- package/dist/{chunk-5ntny1qx.js.map → chunk-qf954wje.js.map} +2 -2
- package/dist/chunk-qma80ych.js +30 -0
- package/dist/chunk-qma80ych.js.map +11 -0
- package/dist/{chunk-mth82m8t.js → chunk-qyeptdyv.js} +171 -77
- package/dist/chunk-qyeptdyv.js.map +15 -0
- package/dist/{chunk-b49dgvsj.js → chunk-r2y23egw.js} +3 -3
- package/dist/{chunk-b49dgvsj.js.map → chunk-r2y23egw.js.map} +2 -2
- package/dist/{chunk-mwsxn98e.js → chunk-r7fj830t.js} +253 -200
- package/dist/chunk-r7fj830t.js.map +36 -0
- package/dist/{chunk-4rh2m6zg.js → chunk-rb1xx120.js} +13 -13
- package/dist/{chunk-4rh2m6zg.js.map → chunk-rb1xx120.js.map} +2 -2
- package/dist/{chunk-gzasd5b6.js → chunk-rtk71jzp.js} +22 -22
- package/dist/{chunk-gzasd5b6.js.map → chunk-rtk71jzp.js.map} +2 -2
- package/dist/chunk-s3csryxe.js +152 -0
- package/dist/chunk-s3csryxe.js.map +11 -0
- package/dist/chunk-s670k14v.js +60 -0
- package/dist/{chunk-407j3msh.js.map → chunk-s670k14v.js.map} +2 -2
- package/dist/chunk-skz0hst3.js +788 -0
- package/dist/chunk-skz0hst3.js.map +19 -0
- package/dist/{chunk-3z1qec12.js → chunk-t1f4f1ve.js} +107 -64
- package/dist/{chunk-3z1qec12.js.map → chunk-t1f4f1ve.js.map} +3 -3
- package/dist/chunk-v2vcg0w6.js +151 -0
- package/dist/chunk-v2vcg0w6.js.map +11 -0
- package/dist/{chunk-r8jrnexe.js → chunk-v4jbb3rs.js} +4 -4
- package/dist/{chunk-r8jrnexe.js.map → chunk-v4jbb3rs.js.map} +2 -2
- package/dist/{chunk-w1tvjszy.js → chunk-vsj3mdfj.js} +8 -8
- package/dist/{chunk-w1tvjszy.js.map → chunk-vsj3mdfj.js.map} +2 -2
- package/dist/{chunk-9dzba0f2.js → chunk-wjasrj67.js} +8 -8
- package/dist/{chunk-9dzba0f2.js.map → chunk-wjasrj67.js.map} +2 -2
- package/dist/{chunk-1evzqhks.js → chunk-wr8qp979.js} +6 -6
- package/dist/{chunk-1evzqhks.js.map → chunk-wr8qp979.js.map} +2 -2
- package/dist/{chunk-n6jxh8sw.js → chunk-wy0qdqfm.js} +18 -18
- package/dist/{chunk-n6jxh8sw.js.map → chunk-wy0qdqfm.js.map} +2 -2
- package/dist/{chunk-z4ccwbkz.js → chunk-x9v4cx1d.js} +1 -1
- package/dist/{chunk-ry24jbr1.js → chunk-yv79ncbv.js} +10 -10
- package/dist/{chunk-ry24jbr1.js.map → chunk-yv79ncbv.js.map} +2 -2
- package/dist/{chunk-yp8ee62z.js → chunk-z30bv4ga.js} +35 -35
- package/dist/{chunk-yp8ee62z.js.map → chunk-z30bv4ga.js.map} +2 -2
- package/dist/{chunk-8ydjhh27.js → chunk-z3y411fq.js} +11 -7
- package/dist/{chunk-8ydjhh27.js.map → chunk-z3y411fq.js.map} +3 -3
- package/dist/{chunk-9t8f5xfx.js → chunk-z5rnrmz1.js} +10 -10
- package/dist/{chunk-9t8f5xfx.js.map → chunk-z5rnrmz1.js.map} +2 -2
- package/dist/{chunk-96swp2wd.js → chunk-z667z3sg.js} +3 -3
- package/dist/{chunk-96swp2wd.js.map → chunk-z667z3sg.js.map} +2 -2
- package/dist/{chunk-4yqmp43v.js → chunk-z8fx5cgb.js} +12 -12
- package/dist/{chunk-4yqmp43v.js.map → chunk-z8fx5cgb.js.map} +2 -2
- package/dist/{chunk-yt8wphsx.js → chunk-zvx7h87b.js} +3 -3
- package/dist/{chunk-yt8wphsx.js.map → chunk-zvx7h87b.js.map} +2 -2
- package/dist/connectors/connections/authorizations.d.ts.map +1 -1
- package/dist/connectors/connections/contracts.d.ts +3 -0
- package/dist/connectors/connections/contracts.d.ts.map +1 -1
- package/dist/connectors/connections/internal.js +9 -10
- package/dist/connectors/connections/internal.js.map +1 -1
- package/dist/connectors/connections/request.d.ts +3 -1
- package/dist/connectors/connections/request.d.ts.map +1 -1
- package/dist/connectors/connections/runs.d.ts.map +1 -1
- package/dist/connectors/connections/tokens.d.ts.map +1 -1
- package/dist/connectors/connections/validation.d.ts +5 -1
- package/dist/connectors/connections/validation.d.ts.map +1 -1
- package/dist/connectors/types.d.ts +19 -4
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/datasets/write.js +8 -12
- package/dist/datasets/write.js.map +1 -1
- package/dist/edits/index.js +7 -8
- package/dist/edits/index.js.map +1 -1
- package/dist/error-reporting/internal.js +22 -24
- package/dist/error-reporting/internal.js.map +1 -1
- package/dist/errors/internal.d.ts +1 -1
- package/dist/errors/internal.d.ts.map +1 -1
- package/dist/errors/internal.js +22 -24
- package/dist/errors/internal.js.map +1 -1
- package/dist/errors/redaction.d.ts +8 -0
- package/dist/errors/redaction.d.ts.map +1 -0
- package/dist/errors/types.d.ts +4 -0
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/events/execution.d.ts +1 -1
- package/dist/events/execution.d.ts.map +1 -1
- package/dist/events/index.js +60 -63
- package/dist/events/index.js.map +1 -1
- package/dist/events/scope.js +4 -5
- package/dist/events/scope.js.map +1 -1
- package/dist/events/selectors/index.js +9 -10
- package/dist/events/selectors/index.js.map +1 -1
- package/dist/events/service.d.ts +2 -2
- package/dist/events/service.d.ts.map +1 -1
- package/dist/execution/agent.d.ts +3 -3
- package/dist/execution/agent.d.ts.map +1 -1
- package/dist/execution/agent.js +71 -82
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/durable.d.ts +1 -0
- package/dist/execution/durable.d.ts.map +1 -1
- package/dist/execution/primitive.d.ts +2 -0
- package/dist/execution/primitive.d.ts.map +1 -1
- package/dist/execution/primitive.js +64 -71
- package/dist/execution/primitive.js.map +3 -3
- package/dist/execution/request.d.ts +1 -0
- package/dist/execution/request.d.ts.map +1 -1
- package/dist/execution/request.js +66 -75
- package/dist/execution/request.js.map +3 -3
- package/dist/http/index.js +10 -11
- package/dist/http/index.js.map +1 -1
- package/dist/index.d.ts +17 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +457 -477
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/changes.d.ts +5 -0
- package/dist/lake-storage/changes.d.ts.map +1 -0
- package/dist/lake-storage/in-memory.d.ts +2 -1
- package/dist/lake-storage/in-memory.d.ts.map +1 -1
- package/dist/lake-storage/index.d.ts +2 -1
- package/dist/lake-storage/index.d.ts.map +1 -1
- package/dist/lake-storage/index.js +40 -42
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/lake-storage/types.d.ts +36 -0
- package/dist/lake-storage/types.d.ts.map +1 -1
- package/dist/logging/index.d.ts +3 -4
- package/dist/logging/index.d.ts.map +1 -1
- package/dist/logging/index.js +18 -40
- package/dist/logging/index.js.map +1 -1
- package/dist/logging/internal.d.ts +5 -0
- package/dist/logging/internal.d.ts.map +1 -0
- package/dist/logging/internal.js +43 -0
- package/dist/logging/internal.js.map +9 -0
- package/dist/materialization/index.d.ts +1 -1
- package/dist/materialization/index.d.ts.map +1 -1
- package/dist/materialization/index.js +46 -49
- package/dist/materialization/index.js.map +1 -1
- package/dist/materialization/model.d.ts +12 -1
- package/dist/materialization/model.d.ts.map +1 -1
- package/dist/materializer/index.d.ts +1 -1
- package/dist/materializer/index.d.ts.map +1 -1
- package/dist/materializer/index.js +137 -145
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/materializer.d.ts +5 -1
- package/dist/materializer/materializer.d.ts.map +1 -1
- package/dist/materializer/projections/entry-validator.d.ts +2 -1
- package/dist/materializer/projections/entry-validator.d.ts.map +1 -1
- package/dist/materializer/projections/replace.d.ts.map +1 -1
- package/dist/materializer/projections/source-materialization.d.ts +4 -3
- package/dist/materializer/projections/source-materialization.d.ts.map +1 -1
- package/dist/materializer/shared/normalize.d.ts +2 -1
- package/dist/materializer/shared/normalize.d.ts.map +1 -1
- package/dist/models/errors.d.ts +4 -0
- package/dist/models/errors.d.ts.map +1 -1
- package/dist/models/execution/binding.d.ts +9 -0
- package/dist/models/execution/binding.d.ts.map +1 -0
- package/dist/models/execution/errors.d.ts +9 -0
- package/dist/models/execution/errors.d.ts.map +1 -0
- package/dist/models/execution/index.d.ts +11 -0
- package/dist/models/execution/index.d.ts.map +1 -0
- package/dist/models/execution/index.js +55 -0
- package/dist/models/execution/index.js.map +9 -0
- package/dist/models/execution/model-call-accounting.d.ts +17 -0
- package/dist/models/execution/model-call-accounting.d.ts.map +1 -0
- package/dist/models/execution/model-call-admission.d.ts +47 -0
- package/dist/models/execution/model-call-admission.d.ts.map +1 -0
- package/dist/models/execution/model-call-limits.d.ts +15 -0
- package/dist/models/execution/model-call-limits.d.ts.map +1 -0
- package/dist/models/execution/model-call-recorder.d.ts +40 -0
- package/dist/models/execution/model-call-recorder.d.ts.map +1 -0
- package/dist/models/execution/model-call-recovery.d.ts +12 -0
- package/dist/models/execution/model-call-recovery.d.ts.map +1 -0
- package/dist/models/execution/recovery-queue.d.ts +5 -0
- package/dist/models/execution/recovery-queue.d.ts.map +1 -0
- package/dist/models/execution/types.d.ts +44 -0
- package/dist/models/execution/types.d.ts.map +1 -0
- package/dist/models/execution/usage.d.ts +5 -0
- package/dist/models/execution/usage.d.ts.map +1 -0
- package/dist/models/execution.d.ts +6 -0
- package/dist/models/execution.d.ts.map +1 -0
- package/dist/models/generation-types.d.ts +40 -0
- package/dist/models/generation-types.d.ts.map +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +42 -43
- package/dist/models/index.js.map +1 -1
- package/dist/models/language-model.d.ts +3 -0
- package/dist/models/language-model.d.ts.map +1 -1
- package/dist/models/output.d.ts +5 -0
- package/dist/models/output.d.ts.map +1 -0
- package/dist/models/resolve.d.ts +4 -0
- package/dist/models/resolve.d.ts.map +1 -0
- package/dist/objects/execution.d.ts.map +1 -1
- package/dist/objects/index.js +75 -87
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/query/index.js +67 -76
- package/dist/objects/query/index.js.map +1 -1
- package/dist/ontology/index.d.ts +1 -2
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/index.js +62 -113
- package/dist/ontology/index.js.map +1 -1
- package/dist/ontology/internal.d.ts +7 -0
- package/dist/ontology/internal.d.ts.map +1 -1
- package/dist/ontology/internal.js +65 -116
- package/dist/ontology/internal.js.map +3 -4
- package/dist/pipelines/index.js +57 -66
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pipelines/run-dispatch.d.ts.map +1 -1
- package/dist/projections/internal.js +56 -67
- package/dist/projections/internal.js.map +1 -1
- package/dist/projections/run-dispatch.d.ts.map +1 -1
- package/dist/query.d.ts +0 -1
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +11 -15
- package/dist/query.js.map +1 -1
- package/dist/queues/in-memory.d.ts +7 -3
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/queues/index.d.ts +2 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/index.js +6 -7
- package/dist/queues/index.js.map +1 -1
- package/dist/queues/indexed-heap.d.ts +15 -0
- package/dist/queues/indexed-heap.d.ts.map +1 -0
- package/dist/queues/types.d.ts +3 -20
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/rules/internal.js +4 -5
- package/dist/rules/internal.js.map +1 -1
- package/dist/runtime/create.d.ts +2 -1
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +2 -1
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/internal.js +13 -14
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/ontology-mutations.d.ts +3 -1
- package/dist/runtime/ontology-mutations.d.ts.map +1 -1
- package/dist/runtime/sixb.d.ts +2 -0
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/sandboxes/errors.d.ts +4 -0
- package/dist/sandboxes/errors.d.ts.map +1 -1
- package/dist/sandboxes/index.d.ts +2 -2
- package/dist/sandboxes/index.d.ts.map +1 -1
- package/dist/sandboxes/index.js +14 -13
- package/dist/sandboxes/index.js.map +1 -1
- package/dist/sandboxes/sandbox.d.ts +35 -7
- package/dist/sandboxes/sandbox.d.ts.map +1 -1
- package/dist/scheduler/index.js +9 -10
- package/dist/scheduler/index.js.map +1 -1
- package/dist/schedules/index.js +31 -33
- package/dist/schedules/index.js.map +1 -1
- package/dist/shares/internal.js +46 -54
- package/dist/shares/internal.js.map +2 -2
- package/dist/storage/action-runs/failure.js +7 -9
- package/dist/storage/action-runs/failure.js.map +1 -1
- package/dist/storage/action-runs/provider.js +4 -8
- package/dist/storage/action-runs/provider.js.map +1 -1
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +26 -30
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +0 -3
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/attribution.d.ts +4 -0
- package/dist/storage/ai-cost/attribution.d.ts.map +1 -0
- package/dist/storage/ai-cost/groups.d.ts +3 -0
- package/dist/storage/ai-cost/groups.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.d.ts +1 -0
- package/dist/storage/ai-cost/provider.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +30 -143
- package/dist/storage/ai-cost/provider.js.map +3 -4
- package/dist/storage/ai-cost/types.d.ts +15 -0
- package/dist/storage/ai-cost/types.d.ts.map +1 -1
- package/dist/storage/ai-limits/enforcement.js +14 -16
- package/dist/storage/ai-limits/enforcement.js.map +1 -1
- package/dist/storage/ai-limits/provider.js +56 -57
- package/dist/storage/ai-limits/provider.js.map +1 -1
- package/dist/storage/auth/in-memory.d.ts +1 -1
- package/dist/storage/auth/in-memory.d.ts.map +1 -1
- package/dist/storage/connector-connections/in-memory.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider/runs.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.js +35 -37
- package/dist/storage/connector-connections/provider.js.map +3 -3
- package/dist/storage/connector-connections/types.d.ts +3 -2
- package/dist/storage/connector-connections/types.d.ts.map +1 -1
- package/dist/storage/executions/in-memory.d.ts.map +1 -1
- package/dist/storage/executions/provider.d.ts +2 -1
- package/dist/storage/executions/provider.d.ts.map +1 -1
- package/dist/storage/executions/provider.js +14 -11
- package/dist/storage/executions/provider.js.map +3 -3
- package/dist/storage/executions/types.d.ts +6 -2
- package/dist/storage/executions/types.d.ts.map +1 -1
- package/dist/storage/executions/validation.d.ts +2 -0
- package/dist/storage/executions/validation.d.ts.map +1 -1
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +7 -8
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +221 -256
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +10 -0
- package/dist/storage/internal.d.ts.map +1 -0
- package/dist/storage/internal.js +47 -0
- package/dist/storage/internal.js.map +9 -0
- package/dist/storage/ontology/in-memory/materializations-state.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/shared-state.d.ts +15 -2
- package/dist/storage/ontology/in-memory/shared-state.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/source-roots.d.ts +6 -0
- package/dist/storage/ontology/in-memory/source-roots.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/sources.d.ts.map +1 -1
- package/dist/storage/ontology/index.d.ts +1 -1
- package/dist/storage/ontology/index.d.ts.map +1 -1
- package/dist/storage/ontology/provider.d.ts +16 -0
- package/dist/storage/ontology/provider.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +107 -109
- package/dist/storage/ontology/provider.js.map +1 -1
- package/dist/storage/ontology/sources.d.ts +13 -4
- package/dist/storage/ontology/sources.d.ts.map +1 -1
- package/dist/storage/operation-scope.js +18 -19
- package/dist/storage/operation-scope.js.map +1 -1
- package/dist/storage/pipeline-runs/provider.js +4 -6
- package/dist/storage/pipeline-runs/provider.js.map +1 -1
- package/dist/storage/projection-runs/lifecycle.d.ts.map +1 -1
- package/dist/storage/projection-runs/provider.js +66 -70
- package/dist/storage/projection-runs/provider.js.map +1 -1
- package/dist/storage/projection-runs/types.d.ts +2 -0
- package/dist/storage/projection-runs/types.d.ts.map +1 -1
- package/dist/storage/share-grants/provider.js +17 -19
- package/dist/storage/share-grants/provider.js.map +1 -1
- package/dist/storage/share-sessions/provider.js +14 -15
- package/dist/storage/share-sessions/provider.js.map +1 -1
- package/dist/storage/sync-runs/provider.js +4 -6
- package/dist/storage/sync-runs/provider.js.map +1 -1
- package/dist/storage/webhook-runs/provider.js +4 -6
- package/dist/storage/webhook-runs/provider.js.map +1 -1
- package/dist/storage/workflow-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +13 -21
- package/dist/storage/workflow-runs/provider.js.map +1 -1
- package/dist/storage/workflow-runs/types.d.ts +0 -3
- package/dist/storage/workflow-runs/types.d.ts.map +1 -1
- package/dist/syncs/index.js +56 -65
- package/dist/syncs/index.js.map +1 -1
- package/dist/syncs/run-dispatch.d.ts.map +1 -1
- package/dist/testing/action-execution.d.ts +4 -1
- package/dist/testing/action-execution.d.ts.map +1 -1
- package/dist/testing/agent-execution.d.ts +1 -0
- package/dist/testing/agent-execution.d.ts.map +1 -1
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-model-call-groups-contract.d.ts.map +1 -1
- package/dist/testing/broker-contract.d.ts.map +1 -1
- package/dist/testing/connector-connection-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution.d.ts +1 -0
- package/dist/testing/execution.d.ts.map +1 -1
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +2282 -1662
- package/dist/testing/index.js.map +16 -15
- package/dist/testing/lake-changes-contract.d.ts +6 -0
- package/dist/testing/lake-changes-contract.d.ts.map +1 -0
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/ontology-storage-contract.d.ts.map +1 -1
- package/dist/testing/projection-run-storage-contract.d.ts.map +1 -1
- package/dist/testing/workflow-execution.d.ts +1 -0
- package/dist/testing/workflow-execution.d.ts.map +1 -1
- package/dist/webhooks/connections.d.ts +6 -0
- package/dist/webhooks/connections.d.ts.map +1 -0
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.d.ts.map +1 -1
- package/dist/webhooks/internal.d.ts +2 -0
- package/dist/webhooks/internal.d.ts.map +1 -1
- package/dist/webhooks/internal.js +98 -61
- package/dist/webhooks/internal.js.map +4 -3
- package/dist/webhooks/registry.d.ts +1 -1
- package/dist/webhooks/registry.d.ts.map +1 -1
- package/dist/webhooks/types.d.ts +15 -4
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/workers/index.js +11 -13
- package/dist/workers/index.js.map +2 -2
- package/dist/workflows/failure.d.ts +2 -0
- package/dist/workflows/failure.d.ts.map +1 -1
- package/dist/workflows/index.js +136 -147
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/request.d.ts.map +1 -1
- package/dist/workflows/run-dispatch.d.ts +3 -2
- package/dist/workflows/run-dispatch.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +2 -0
- package/dist/workflows/types.d.ts.map +1 -1
- package/package.json +48 -30
- package/src/actions/run-dispatch.ts +2 -6
- package/src/actions/types/context.ts +2 -0
- package/src/actions/validation.ts +2 -1
- package/src/agents/adapters.ts +4 -9
- package/src/agents/{context.ts → context/entries.ts} +4 -4
- package/src/agents/context/index.ts +15 -0
- package/src/agents/context-model.ts +1 -1
- package/src/agents/context-resolution.ts +1 -1
- package/src/agents/index.ts +4 -4
- package/src/agents/message.ts +1 -1
- package/src/agents/model-loop.ts +8 -0
- package/src/agents/request.ts +11 -26
- package/src/agents/streams/index.ts +18 -0
- package/src/agents/streams/internal.ts +19 -0
- package/src/agents/{streams.ts → streams/protocol.ts} +5 -5
- package/src/agents/types.ts +1 -1
- package/src/agents/validation.ts +3 -7
- package/src/auth/index.ts +0 -1
- package/src/bootstrap/discovery.ts +81 -24
- package/src/bootstrap/index.ts +8 -1
- package/src/broker/in-memory.ts +104 -39
- package/src/broker/index.ts +4 -1
- package/src/broker/retention.ts +28 -0
- package/src/broker/subscriber.ts +21 -0
- package/src/broker/types.ts +15 -1
- package/src/connectors/builders.ts +0 -6
- package/src/connectors/connections/authorizations.ts +11 -5
- package/src/connectors/connections/contracts.ts +3 -0
- package/src/connectors/connections/request.ts +56 -22
- package/src/connectors/connections/runs.ts +1 -0
- package/src/connectors/connections/tokens.ts +4 -0
- package/src/connectors/connections/validation.ts +91 -5
- package/src/connectors/types.ts +19 -4
- package/src/errors/internal.ts +90 -10
- package/src/errors/redaction.ts +98 -0
- package/src/errors/types.ts +4 -0
- package/src/events/execution.ts +2 -2
- package/src/events/service.ts +3 -3
- package/src/execution/agent.ts +5 -3
- package/src/execution/durable.ts +11 -1
- package/src/execution/primitive.ts +5 -1
- package/src/execution/request.ts +3 -0
- package/src/index.ts +30 -20
- package/src/lake-storage/changes.ts +43 -0
- package/src/lake-storage/in-memory.ts +73 -0
- package/src/lake-storage/index.ts +4 -0
- package/src/lake-storage/types.ts +40 -0
- package/src/logging/index.ts +2 -33
- package/src/logging/internal.ts +43 -0
- package/src/logging/service.ts +1 -1
- package/src/materialization/index.ts +2 -0
- package/src/materialization/model.ts +14 -1
- package/src/materializer/index.ts +2 -0
- package/src/materializer/materializer.ts +10 -0
- package/src/materializer/projections/entry-validator.ts +19 -1
- package/src/materializer/projections/replace.ts +36 -1
- package/src/materializer/projections/source-materialization.ts +26 -6
- package/src/materializer/shared/normalize.ts +1 -1
- package/src/models/errors.ts +12 -0
- package/src/models/execution/binding.ts +29 -0
- package/src/models/execution/errors.ts +18 -0
- package/src/models/execution/index.ts +26 -0
- package/src/models/execution/model-call-accounting.ts +211 -0
- package/src/models/execution/model-call-admission.ts +127 -0
- package/src/models/execution/model-call-limits.ts +135 -0
- package/src/models/execution/model-call-recorder.ts +235 -0
- package/src/models/execution/model-call-recovery.ts +125 -0
- package/src/models/execution/recovery-queue.ts +31 -0
- package/src/models/execution/types.ts +58 -0
- package/src/models/execution/usage.ts +23 -0
- package/src/models/execution.ts +207 -0
- package/src/models/generation-types.ts +50 -0
- package/src/models/index.ts +8 -0
- package/src/models/language-model.ts +3 -0
- package/src/models/output.ts +45 -0
- package/src/models/resolve.ts +27 -0
- package/src/objects/execution.ts +1 -1
- package/src/ontology/index.ts +1 -2
- package/src/ontology/internal.ts +35 -0
- package/src/pipelines/run-dispatch.ts +21 -1
- package/src/projections/run-dispatch.ts +31 -68
- package/src/query.ts +0 -1
- package/src/queues/in-memory.ts +105 -62
- package/src/queues/index.ts +4 -2
- package/src/queues/indexed-heap.ts +74 -0
- package/src/queues/types.ts +6 -25
- package/src/runtime/create.ts +2 -1
- package/src/runtime/host.ts +2 -15
- package/src/runtime/ontology-mutations.ts +4 -0
- package/src/runtime/sixb.ts +4 -0
- package/src/sandboxes/errors.ts +5 -0
- package/src/sandboxes/index.ts +3 -0
- package/src/sandboxes/sandbox.ts +35 -7
- package/src/storage/agents/in-memory.ts +0 -3
- package/src/storage/agents/types.ts +0 -3
- package/src/storage/ai-cost/analytics.ts +1 -1
- package/src/storage/ai-cost/attribution.ts +15 -0
- package/src/storage/ai-cost/groups.ts +5 -1
- package/src/storage/ai-cost/provider.ts +1 -0
- package/src/storage/ai-cost/types.ts +7 -0
- package/src/storage/auth/in-memory.ts +1 -1
- package/src/storage/connector-connections/in-memory.ts +3 -1
- package/src/storage/connector-connections/provider/runs.ts +3 -1
- package/src/storage/connector-connections/types.ts +3 -2
- package/src/storage/executions/in-memory.ts +4 -9
- package/src/storage/executions/provider.ts +4 -0
- package/src/storage/executions/types.ts +6 -2
- package/src/storage/executions/validation.ts +32 -0
- package/src/storage/in-memory/index.ts +16 -1
- package/src/storage/index.ts +4 -29
- package/src/storage/internal.ts +20 -0
- package/src/storage/ontology/in-memory/materializations-state.ts +5 -18
- package/src/storage/ontology/in-memory/materializations.ts +73 -92
- package/src/storage/ontology/in-memory/shared-state.ts +26 -1
- package/src/storage/ontology/in-memory/source-roots.ts +123 -0
- package/src/storage/ontology/in-memory/sources.ts +78 -23
- package/src/storage/ontology/index.ts +1 -0
- package/src/storage/ontology/provider.ts +70 -0
- package/src/storage/ontology/sources.ts +14 -3
- package/src/storage/projection-runs/lifecycle.ts +5 -2
- package/src/storage/projection-runs/types.ts +4 -3
- package/src/storage/workflow-runs/in-memory.ts +0 -2
- package/src/storage/workflow-runs/types.ts +0 -3
- package/src/syncs/run-dispatch.ts +19 -1
- package/src/testing/action-execution.ts +9 -2
- package/src/testing/agent-execution.ts +3 -0
- package/src/testing/agent-storage-contract.ts +0 -5
- package/src/testing/ai-model-call-groups-contract.ts +74 -2
- package/src/testing/broker-contract.ts +95 -0
- package/src/testing/connector-connection-storage-contract.ts +18 -1
- package/src/testing/execution-storage-contract.ts +59 -1
- package/src/testing/execution.ts +6 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/lake-changes-contract.ts +240 -0
- package/src/testing/materializer-storage-contract.ts +172 -1
- package/src/testing/ontology-storage-contract.ts +7 -0
- package/src/testing/projection-run-storage-contract.ts +34 -0
- package/src/testing/workflow-execution.ts +4 -0
- package/src/webhooks/connections.ts +56 -0
- package/src/webhooks/index.ts +2 -0
- package/src/webhooks/internal.ts +2 -0
- package/src/webhooks/registry.ts +3 -4
- package/src/webhooks/types.ts +17 -4
- package/src/workflows/failure.ts +62 -1
- package/src/workflows/request.ts +0 -9
- package/src/workflows/run-dispatch.ts +42 -32
- package/src/workflows/types.ts +2 -0
- package/src/workflows/validation.ts +1 -1
- package/dist/agents/context.d.ts.map +0 -1
- package/dist/agents/context.js +0 -23
- package/dist/agents/streams.d.ts.map +0 -1
- package/dist/agents/streams.js +0 -55
- package/dist/chunk-08m3b6w8.js +0 -32
- package/dist/chunk-19jp6g9d.js.map +0 -11
- package/dist/chunk-2xns679x.js.map +0 -11
- package/dist/chunk-3xep5cjx.js.map +0 -15
- package/dist/chunk-407j3msh.js +0 -60
- package/dist/chunk-4qfkag59.js +0 -1568
- package/dist/chunk-4qfkag59.js.map +0 -20
- package/dist/chunk-5e3pq99w.js.map +0 -11
- package/dist/chunk-5gd7tpv6.js.map +0 -11
- package/dist/chunk-7y0f6rf1.js.map +0 -10
- package/dist/chunk-8m5ejdpn.js.map +0 -10
- package/dist/chunk-8tsf6dmc.js.map +0 -15
- package/dist/chunk-ajnan18g.js.map +0 -12
- package/dist/chunk-c15dr03f.js +0 -43
- package/dist/chunk-d8qkxt2v.js.map +0 -10
- package/dist/chunk-jq43kdvk.js +0 -50
- package/dist/chunk-k34z5rvh.js.map +0 -11
- package/dist/chunk-k522z7v6.js.map +0 -10
- package/dist/chunk-mth82m8t.js.map +0 -14
- package/dist/chunk-mwsxn98e.js.map +0 -36
- package/dist/chunk-p03r0h5s.js.map +0 -16
- package/dist/chunk-p1rzczbt.js +0 -218
- package/dist/chunk-rafagrwr.js.map +0 -11
- package/dist/chunk-rv2hkwwa.js.map +0 -14
- package/dist/chunk-sbzzr4kx.js.map +0 -63
- package/dist/chunk-tpnd31c1.js +0 -242
- package/dist/chunk-tpnd31c1.js.map +0 -11
- package/dist/chunk-w9tg6yyb.js.map +0 -12
- package/dist/chunk-wtf06et8.js.map +0 -14
- package/dist/chunk-xajtptbw.js.map +0 -40
- package/dist/chunk-xhy826cz.js.map +0 -10
- package/dist/chunk-y64skrwp.js +0 -19
- package/dist/chunk-zcnhxkvd.js +0 -7
- package/dist/logging/types.js +0 -27
- package/dist/logging/types.js.map +0 -9
- /package/dist/{chunk-zqqz8052.js → chunk-7n30ybym.js} +0 -0
- /package/dist/{chunk-zqqz8052.js.map → chunk-7n30ybym.js.map} +0 -0
- /package/dist/{chunk-4a849fr1.js.map → chunk-9tc8dxmn.js.map} +0 -0
- /package/dist/{chunk-j1sbhm7p.js → chunk-ey1nk510.js} +0 -0
- /package/dist/{chunk-j1sbhm7p.js.map → chunk-ey1nk510.js.map} +0 -0
- /package/dist/{chunk-z4ccwbkz.js.map → chunk-x9v4cx1d.js.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
3
|
+
compileSelectedObjectReadScope2,
|
|
4
|
+
captureSelectedObjectReadScope
|
|
5
|
+
} from "./chunk-v4jbb3rs.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
stableJsonStringify2
|
|
8
|
+
} from "./chunk-wy0qdqfm.js";
|
|
9
9
|
|
|
10
10
|
// src/storage/share-grants/errors.ts
|
|
11
|
-
class
|
|
11
|
+
class ShareGrantStorageError2 extends Error {
|
|
12
12
|
code;
|
|
13
13
|
name = "ShareGrantStorageError";
|
|
14
14
|
constructor(code, message, options) {
|
|
@@ -120,7 +120,7 @@ function addActionIdentifierCharacters(budget, count) {
|
|
|
120
120
|
}
|
|
121
121
|
function validateMergedViewSelection(roots) {
|
|
122
122
|
const selection = captureSelectedObjectReadScope({ kind: "selected", roots });
|
|
123
|
-
|
|
123
|
+
compileSelectedObjectReadScope2(selection);
|
|
124
124
|
return selection;
|
|
125
125
|
}
|
|
126
126
|
function assembleAccessPlanSnapshot(capturedGrants, selection) {
|
|
@@ -158,7 +158,7 @@ var MAX_LIST_LIMIT = 200;
|
|
|
158
158
|
var MAX_DESTINATION_PATH_LENGTH = 4096;
|
|
159
159
|
var SHA256_HEX = /^[0-9a-f]{64}$/;
|
|
160
160
|
var SHARED_APP_PATH_PREFIX = "/shared";
|
|
161
|
-
function
|
|
161
|
+
function normalizeShareGrantCreate2(input) {
|
|
162
162
|
if (!isRecord2(input))
|
|
163
163
|
throw invalidInput("Share grant create input must be an object.");
|
|
164
164
|
const projectId = identifier(input.projectId, "Project id");
|
|
@@ -181,14 +181,14 @@ function normalizeShareGrantCreate(input) {
|
|
|
181
181
|
target,
|
|
182
182
|
issuedBy,
|
|
183
183
|
authoritySnapshot,
|
|
184
|
-
authorityDigest:
|
|
184
|
+
authorityDigest: shareAuthorityDigest2(authoritySnapshot),
|
|
185
185
|
tokenHash,
|
|
186
186
|
destinationPath,
|
|
187
187
|
createdAt,
|
|
188
188
|
expiresAt
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function parseShareGrantRecord2(input) {
|
|
192
192
|
if (!isRecord2(input))
|
|
193
193
|
throw invalidRecord("Share grant row must be an object.");
|
|
194
194
|
try {
|
|
@@ -199,7 +199,7 @@ function parseShareGrantRecord(input) {
|
|
|
199
199
|
const issuedBy = normalizeAuthorizablePrincipal(input.issuedBy, "Share issuer");
|
|
200
200
|
const authoritySnapshot = normalizeAuthoritySnapshot(input.authoritySnapshot, target);
|
|
201
201
|
const authorityDigest = sha256(input.authorityDigest, "Share authority digest");
|
|
202
|
-
const expectedDigest =
|
|
202
|
+
const expectedDigest = shareAuthorityDigest2(authoritySnapshot);
|
|
203
203
|
if (authorityDigest !== expectedDigest) {
|
|
204
204
|
throw invalidRecord("Share authority digest does not match its snapshot.");
|
|
205
205
|
}
|
|
@@ -239,7 +239,7 @@ function parseShareGrantRecord(input) {
|
|
|
239
239
|
...revokedBy === undefined ? {} : { revokedBy }
|
|
240
240
|
};
|
|
241
241
|
} catch (error) {
|
|
242
|
-
if (error instanceof
|
|
242
|
+
if (error instanceof ShareGrantStorageError2) {
|
|
243
243
|
if (error.code === "invalid_record")
|
|
244
244
|
throw error;
|
|
245
245
|
throw invalidRecord(error.message.replace(/^\[Sixb\] /, ""), error);
|
|
@@ -247,7 +247,7 @@ function parseShareGrantRecord(input) {
|
|
|
247
247
|
throw error;
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function normalizeGetShareGrantByIdInput2(input) {
|
|
251
251
|
if (!isRecord2(input))
|
|
252
252
|
throw invalidInput("Share grant lookup input must be an object.");
|
|
253
253
|
return {
|
|
@@ -255,7 +255,7 @@ function normalizeGetShareGrantByIdInput(input) {
|
|
|
255
255
|
id: identifier(input.id, "Share grant id")
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function normalizeListShareGrantsInput2(input) {
|
|
259
259
|
if (!isRecord2(input))
|
|
260
260
|
throw invalidInput("Share grant list input must be an object.");
|
|
261
261
|
const projectId = identifier(input.projectId, "Project id");
|
|
@@ -280,7 +280,7 @@ function normalizeListShareGrantsInput(input) {
|
|
|
280
280
|
offset
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function normalizeRevokeShareGrantInput2(input, createdAt) {
|
|
284
284
|
if (!isRecord2(input))
|
|
285
285
|
throw invalidInput("Share grant revocation input must be an object.");
|
|
286
286
|
const normalized = {
|
|
@@ -294,11 +294,11 @@ function normalizeRevokeShareGrantInput(input, createdAt) {
|
|
|
294
294
|
}
|
|
295
295
|
return normalized;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function cloneShareGrantRecord2(input) {
|
|
298
298
|
return structuredClone(input);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
return createHash("sha256").update(
|
|
300
|
+
function shareAuthorityDigest2(snapshot) {
|
|
301
|
+
return createHash("sha256").update(stableJsonStringify2(snapshot)).digest("hex");
|
|
302
302
|
}
|
|
303
303
|
function normalizeAuthoritySnapshot(value, target) {
|
|
304
304
|
if (!isRecord2(value) || value.version !== 1 || !isRecord2(value.access)) {
|
|
@@ -308,7 +308,7 @@ function normalizeAuthoritySnapshot(value, target) {
|
|
|
308
308
|
try {
|
|
309
309
|
access = snapshotShareAccessPlan(value.access);
|
|
310
310
|
} catch (error) {
|
|
311
|
-
if (error instanceof
|
|
311
|
+
if (error instanceof ShareGrantStorageError2)
|
|
312
312
|
throw error;
|
|
313
313
|
const reason = error instanceof Error ? error.message.replace(/^\[Sixb\] /, "") : String(error);
|
|
314
314
|
throw invalidInput(`Share authority snapshot is invalid: ${reason}`, error);
|
|
@@ -425,12 +425,12 @@ function isRecord2(value) {
|
|
|
425
425
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
426
426
|
}
|
|
427
427
|
function invalidInput(message, cause) {
|
|
428
|
-
return new
|
|
428
|
+
return new ShareGrantStorageError2("invalid_input", `[Sixb] ${message}`, { cause });
|
|
429
429
|
}
|
|
430
430
|
function invalidRecord(message, cause) {
|
|
431
|
-
return new
|
|
431
|
+
return new ShareGrantStorageError2("invalid_record", `[Sixb] ${message}`, { cause });
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
-
export {
|
|
434
|
+
export { ShareGrantStorageError2, snapshotShareAccessPlan, objectReadScopeForAccessPlan, normalizeShareGrantCreate2, parseShareGrantRecord2, normalizeGetShareGrantByIdInput2, normalizeListShareGrantsInput2, normalizeRevokeShareGrantInput2, cloneShareGrantRecord2, shareAuthorityDigest2 };
|
|
435
435
|
|
|
436
|
-
//# debugId=
|
|
436
|
+
//# debugId=9B16B0CFE0D7229264756E2164756E21
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"import type { ObjectRef } from \"../ontology\"\nimport {\n captureSelectedObjectReadScope,\n compileSelectedObjectReadScope,\n} from \"../storage/objects/read-scope\"\nimport type { ObjectReadRoot, SelectedObjectReadScope } from \"../storage/objects/types\"\n\nconst MAX_SCOPED_GRANTS = 1_024\nconst MAX_SCOPED_VIEW_ROOTS_BEFORE_COMPILATION = 1_024\nconst MAX_SCOPED_ACTION_SUBJECTS = 4_096\nconst MAX_SCOPED_ACTION_IDENTIFIER_CHARACTERS = 1_000_000\n\n/** One capability paired with the exact resources it authorizes. */\nexport type ShareScopedGrant = ShareScopedViewGrant | ShareScopedActionGrant\n\nexport interface ShareScopedViewGrant {\n readonly kind: \"object.view\"\n readonly selection: SelectedObjectReadScope\n}\n\nexport interface ShareScopedActionGrant {\n readonly kind: \"action.apply\"\n readonly actionId: string\n readonly subjects: readonly ObjectRef[]\n}\n\n/** Internal authority compiled from a delegation such as a shared-access grant. */\nexport interface ShareAccessPlan {\n readonly grants: readonly ShareScopedGrant[]\n}\n\ninterface CapturedViewGrant {\n readonly kind: \"object.view\"\n readonly rootStart: number\n readonly rootCount: number\n}\n\ntype CapturedGrant = CapturedViewGrant | ShareScopedActionGrant\n\ninterface ActionCaptureBudget {\n subjectCount: number\n identifierCharacters: number\n}\n\n/** Validate and detach an access plan before registering process-local authority. */\nexport function snapshotShareAccessPlan(input: ShareAccessPlan): ShareAccessPlan {\n const captured = captureAccessPlanGrants(input)\n const selection = validateMergedViewSelection(captured.viewRoots)\n return assembleAccessPlanSnapshot(captured.grants, selection)\n}\n\nfunction captureAccessPlanGrants(input: ShareAccessPlan): {\n readonly grants: readonly CapturedGrant[]\n readonly viewRoots: readonly ObjectReadRoot[]\n} {\n if (!isRecord(input)) {\n throw new Error(\"[Sixb] Share access plan must contain scoped grants.\")\n }\n const authoredGrants = input.grants\n if (!Array.isArray(authoredGrants)) {\n throw new Error(\"[Sixb] Share access plan must contain scoped grants.\")\n }\n const grantCount = authoredGrants.length\n if (grantCount > MAX_SCOPED_GRANTS) {\n throw new Error(\n `[Sixb] Share access plan exceeds the maximum of ${MAX_SCOPED_GRANTS} scoped grants.`\n )\n }\n\n // Share budgets across grants and capture caller-controlled fields exactly once.\n const budget: ActionCaptureBudget = { subjectCount: 0, identifierCharacters: 0 }\n const viewRoots: ObjectReadRoot[] = []\n const grants: CapturedGrant[] = []\n for (let index = 0; index < grantCount; index += 1) {\n const grant = authoredGrants[index]\n if (!isRecord(grant)) {\n throw new Error(`[Sixb] Scoped grant ${index} must be an object.`)\n }\n const kind = grant.kind\n switch (kind) {\n case \"object.view\":\n grants.push(captureViewGrant(grant, index, viewRoots))\n break\n case \"action.apply\":\n grants.push(captureActionGrant(grant, index, budget))\n break\n default:\n throw new Error(`[Sixb] Unknown scoped grant kind '${String(kind)}'.`)\n }\n }\n return { grants, viewRoots }\n}\n\nfunction captureViewGrant(\n grant: Record<string, unknown>,\n index: number,\n viewRoots: ObjectReadRoot[]\n): CapturedViewGrant {\n const selection = grant.selection\n if (!isRecord(selection)) {\n throw new Error(`[Sixb] Scoped grant ${index} requires a selected object read scope.`)\n }\n const selectionKind = selection.kind\n const roots = selection.roots\n if (selectionKind !== \"selected\" || !Array.isArray(roots)) {\n throw new Error(`[Sixb] Scoped grant ${index} requires a selected object read scope.`)\n }\n const rootCount = roots.length\n if (rootCount > MAX_SCOPED_VIEW_ROOTS_BEFORE_COMPILATION - viewRoots.length) {\n throw new Error(\n `[Sixb] Share access plan exceeds the maximum of ${MAX_SCOPED_VIEW_ROOTS_BEFORE_COMPILATION} raw scoped view roots.`\n )\n }\n const rootStart = viewRoots.length\n for (let rootIndex = 0; rootIndex < rootCount; rootIndex += 1) {\n viewRoots.push(roots[rootIndex] as ObjectReadRoot)\n }\n return { kind: \"object.view\", rootStart, rootCount }\n}\n\nfunction captureActionGrant(\n grant: Record<string, unknown>,\n index: number,\n budget: ActionCaptureBudget\n): ShareScopedActionGrant {\n const authoredActionId = grant.actionId\n const authoredSubjects = grant.subjects\n const actionId = nonEmpty(authoredActionId, `Scoped grant ${index} action id`)\n addActionIdentifierCharacters(budget, actionId.length)\n if (!Array.isArray(authoredSubjects)) {\n throw new Error(`[Sixb] Scoped grant ${index} action subjects must be an array.`)\n }\n const subjectCount = authoredSubjects.length\n budget.subjectCount += subjectCount\n if (budget.subjectCount > MAX_SCOPED_ACTION_SUBJECTS) {\n throw new Error(\n `[Sixb] Share access plan exceeds the maximum of ${MAX_SCOPED_ACTION_SUBJECTS} scoped action subjects.`\n )\n }\n const subjects: ObjectRef[] = []\n for (let subjectIndex = 0; subjectIndex < subjectCount; subjectIndex += 1) {\n const subject = captureActionSubject(authoredSubjects[subjectIndex], index, subjectIndex)\n addActionIdentifierCharacters(budget, subject.objectTypeId.length + subject.primaryId.length)\n subjects.push(subject)\n }\n return Object.freeze({ kind: \"action.apply\", actionId, subjects: Object.freeze(subjects) })\n}\n\nfunction captureActionSubject(\n subject: unknown,\n grantIndex: number,\n subjectIndex: number\n): ObjectRef {\n if (!isRecord(subject)) {\n throw new Error(`[Sixb] Scoped grant ${grantIndex} subject ${subjectIndex} must be an object.`)\n }\n const authoredObjectTypeId = subject.objectTypeId\n const authoredPrimaryId = subject.primaryId\n const objectTypeId = nonEmpty(\n authoredObjectTypeId,\n `Scoped grant ${grantIndex} subject ${subjectIndex} object type id`\n )\n const primaryId = nonEmpty(\n authoredPrimaryId,\n `Scoped grant ${grantIndex} subject ${subjectIndex} primary id`\n )\n return Object.freeze({ objectTypeId, primaryId })\n}\n\nfunction addActionIdentifierCharacters(budget: ActionCaptureBudget, count: number): void {\n budget.identifierCharacters += count\n if (budget.identifierCharacters > MAX_SCOPED_ACTION_IDENTIFIER_CHARACTERS) {\n throw new Error(\n `[Sixb] Share access plan exceeds the maximum of ${MAX_SCOPED_ACTION_IDENTIFIER_CHARACTERS} scoped action identifier characters.`\n )\n }\n}\n\nfunction validateMergedViewSelection(roots: readonly ObjectReadRoot[]): SelectedObjectReadScope {\n // Snapshot all roots together so the provider's limits apply globally across view grants.\n const selection = captureSelectedObjectReadScope({ kind: \"selected\", roots })\n // Compile the exact immutable snapshot, without rereading caller-controlled data.\n compileSelectedObjectReadScope(selection)\n return selection\n}\n\nfunction assembleAccessPlanSnapshot(\n capturedGrants: readonly CapturedGrant[],\n selection: SelectedObjectReadScope\n): ShareAccessPlan {\n const grants = capturedGrants.map((grant): ShareScopedGrant => {\n if (grant.kind === \"action.apply\") return grant\n const roots = Object.freeze(\n selection.roots.slice(grant.rootStart, grant.rootStart + grant.rootCount)\n )\n return Object.freeze({\n kind: \"object.view\",\n selection: Object.freeze({ kind: \"selected\", roots }),\n })\n })\n return Object.freeze({ grants: Object.freeze(grants) })\n}\n\n/** Merge view grants only; capability/resource pairing remains intact for every other grant. */\nexport function objectReadScopeForAccessPlan(plan: ShareAccessPlan): SelectedObjectReadScope {\n return Object.freeze({\n kind: \"selected\",\n roots: Object.freeze(\n plan.grants.flatMap((grant) =>\n grant.kind === \"object.view\" ? [...grant.selection.roots] : []\n )\n ),\n })\n}\n\nfunction nonEmpty(value: unknown, label: string): string {\n if (typeof value !== \"string\" || !value.trim()) {\n throw new Error(`[Sixb] ${label} must not be empty.`)\n }\n return value\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null\n}\n",
|
|
7
7
|
"import { createHash } from \"node:crypto\"\nimport type { Principal } from \"../../auth\"\nimport type { AuthorizablePrincipal } from \"../../execution/types\"\nimport { stableJsonStringify } from \"../../json\"\nimport type { ObjectRef } from \"../../ontology\"\nimport { snapshotShareAccessPlan } from \"../../shares/access-plan\"\nimport { ShareGrantStorageError } from \"./errors\"\nimport type {\n CreateShareGrantInput,\n GetShareGrantByIdInput,\n ListShareGrantsInput,\n NormalizedListShareGrantsInput,\n RevokeShareGrantInput,\n ShareAuthoritySnapshot,\n ShareGrantRecord,\n} from \"./types\"\n\nconst DEFAULT_LIST_LIMIT = 50\nconst MAX_LIST_LIMIT = 200\nconst MAX_DESTINATION_PATH_LENGTH = 4_096\nconst SHA256_HEX = /^[0-9a-f]{64}$/\nconst SHARED_APP_PATH_PREFIX = \"/shared\"\n\n/** Normalize, detach, and derive every persisted field owned by Share grant storage. */\nexport function normalizeShareGrantCreate(input: CreateShareGrantInput): ShareGrantRecord {\n if (!isRecord(input)) throw invalidInput(\"Share grant create input must be an object.\")\n const projectId = identifier(input.projectId, \"Project id\")\n const id = identifier(input.id, \"Share grant id\")\n const definitionId = identifier(input.definitionId, \"Share definition id\")\n const target = normalizeObjectRef(input.target, \"Share target\")\n const issuedBy = normalizeAuthorizablePrincipal(input.issuedBy, \"Share issuer\")\n const authoritySnapshot = normalizeAuthoritySnapshot(input.authoritySnapshot, target)\n const tokenHash = sha256(input.tokenHash, \"Share token hash\")\n const destinationPath = normalizeDestinationPath(input.destinationPath)\n const createdAt = inputDate(input.createdAt, \"Share creation time\")\n const expiresAt = inputDate(input.expiresAt, \"Share expiry time\")\n\n if (expiresAt.getTime() <= createdAt.getTime()) {\n throw invalidInput(\"Share expiry time must be later than creation time.\")\n }\n\n return {\n id,\n projectId,\n definitionId,\n target,\n issuedBy,\n authoritySnapshot,\n authorityDigest: shareAuthorityDigest(authoritySnapshot),\n tokenHash,\n destinationPath,\n createdAt,\n expiresAt,\n }\n}\n\n/** Parse a provider row and reject unknown/corrupt durable authority instead of widening it. */\nexport function parseShareGrantRecord(input: unknown): ShareGrantRecord {\n if (!isRecord(input)) throw invalidRecord(\"Share grant row must be an object.\")\n\n try {\n const projectId = identifier(input.projectId, \"Project id\")\n const id = identifier(input.id, \"Share grant id\")\n const definitionId = identifier(input.definitionId, \"Share definition id\")\n const target = normalizeObjectRef(input.target, \"Share target\")\n const issuedBy = normalizeAuthorizablePrincipal(input.issuedBy, \"Share issuer\")\n const authoritySnapshot = normalizeAuthoritySnapshot(input.authoritySnapshot, target)\n const authorityDigest = sha256(input.authorityDigest, \"Share authority digest\")\n const expectedDigest = shareAuthorityDigest(authoritySnapshot)\n if (authorityDigest !== expectedDigest) {\n throw invalidRecord(\"Share authority digest does not match its snapshot.\")\n }\n const tokenHash = sha256(input.tokenHash, \"Share token hash\")\n const destinationPath = normalizeDestinationPath(input.destinationPath)\n const createdAt = storedDate(input.createdAt, \"Share creation time\")\n const expiresAt = storedDate(input.expiresAt, \"Share expiry time\")\n if (expiresAt.getTime() <= createdAt.getTime()) {\n throw invalidRecord(\"Share expiry time must be later than creation time.\")\n }\n\n const revokedAtValue = input.revokedAt\n const revokedByValue = input.revokedBy\n if ((revokedAtValue === undefined) !== (revokedByValue === undefined)) {\n throw invalidRecord(\"Share revocation time and actor must be stored together.\")\n }\n if (revokedAtValue === null || revokedByValue === null) {\n throw invalidRecord(\"Share revocation fields must be omitted rather than null.\")\n }\n\n const revokedAt =\n revokedAtValue === undefined ? undefined : storedDate(revokedAtValue, \"Share revocation time\")\n const revokedBy =\n revokedByValue === undefined\n ? undefined\n : normalizePrincipal(revokedByValue, \"Share revocation actor\")\n if (revokedAt && revokedAt.getTime() < createdAt.getTime()) {\n throw invalidRecord(\"Share revocation time must not precede creation time.\")\n }\n\n return {\n id,\n projectId,\n definitionId,\n target,\n issuedBy,\n authoritySnapshot,\n authorityDigest,\n tokenHash,\n destinationPath,\n createdAt,\n expiresAt,\n ...(revokedAt === undefined ? {} : { revokedAt }),\n ...(revokedBy === undefined ? {} : { revokedBy }),\n }\n } catch (error) {\n if (error instanceof ShareGrantStorageError) {\n if (error.code === \"invalid_record\") throw error\n throw invalidRecord(error.message.replace(/^\\[Sixb\\] /, \"\"), error)\n }\n throw error\n }\n}\n\nexport function normalizeGetShareGrantByIdInput(\n input: GetShareGrantByIdInput\n): GetShareGrantByIdInput {\n if (!isRecord(input)) throw invalidInput(\"Share grant lookup input must be an object.\")\n return {\n projectId: identifier(input.projectId, \"Project id\"),\n id: identifier(input.id, \"Share grant id\"),\n }\n}\n\nexport function normalizeListShareGrantsInput(\n input: ListShareGrantsInput\n): NormalizedListShareGrantsInput {\n if (!isRecord(input)) throw invalidInput(\"Share grant list input must be an object.\")\n const projectId = identifier(input.projectId, \"Project id\")\n const definitionId =\n input.definitionId === undefined\n ? undefined\n : identifier(input.definitionId, \"Share definition id\")\n const target =\n input.target === undefined ? undefined : normalizeObjectRef(input.target, \"Share target\")\n const includeRevoked = optionalBoolean(input.includeRevoked, \"includeRevoked\")\n const includeExpired = optionalBoolean(input.includeExpired, \"includeExpired\")\n const now = inputDate(input.now, \"Share grant list time\")\n const limit = safeInteger(input.limit ?? DEFAULT_LIST_LIMIT, \"Share grant list limit\", 1)\n const offset = safeInteger(input.offset ?? 0, \"Share grant list offset\", 0)\n if (limit > MAX_LIST_LIMIT) {\n throw invalidInput(`Share grant list limit must not exceed ${MAX_LIST_LIMIT}.`)\n }\n\n return {\n projectId,\n ...(definitionId === undefined ? {} : { definitionId }),\n ...(target === undefined ? {} : { target }),\n includeRevoked,\n includeExpired,\n now,\n limit,\n offset,\n }\n}\n\nexport function normalizeRevokeShareGrantInput(\n input: RevokeShareGrantInput,\n createdAt?: Date\n): RevokeShareGrantInput {\n if (!isRecord(input)) throw invalidInput(\"Share grant revocation input must be an object.\")\n const normalized = {\n projectId: identifier(input.projectId, \"Project id\"),\n id: identifier(input.id, \"Share grant id\"),\n revokedAt: inputDate(input.revokedAt, \"Share revocation time\"),\n revokedBy: normalizePrincipal(input.revokedBy, \"Share revocation actor\"),\n }\n if (createdAt && normalized.revokedAt.getTime() < createdAt.getTime()) {\n throw invalidInput(\"Share revocation time must not precede creation time.\")\n }\n return normalized\n}\n\nexport function cloneShareGrantRecord(input: ShareGrantRecord): ShareGrantRecord {\n return structuredClone(input)\n}\n\nexport function shareAuthorityDigest(snapshot: ShareAuthoritySnapshot): string {\n return createHash(\"sha256\").update(stableJsonStringify(snapshot)).digest(\"hex\")\n}\n\nfunction normalizeAuthoritySnapshot(value: unknown, target: ObjectRef): ShareAuthoritySnapshot {\n if (!isRecord(value) || value.version !== 1 || !isRecord(value.access)) {\n throw invalidInput(\"Share authority snapshot version is unsupported.\")\n }\n let access: ShareAuthoritySnapshot[\"access\"]\n try {\n access = snapshotShareAccessPlan(value.access as never)\n } catch (error) {\n if (error instanceof ShareGrantStorageError) throw error\n const reason = error instanceof Error ? error.message.replace(/^\\[Sixb\\] /, \"\") : String(error)\n throw invalidInput(`Share authority snapshot is invalid: ${reason}`, error)\n }\n assertAccessTargets(access, target)\n return Object.freeze({ version: 1, access })\n}\n\nfunction assertAccessTargets(access: ShareAuthoritySnapshot[\"access\"], target: ObjectRef): void {\n for (const grant of access.grants) {\n if (grant.kind === \"object.view\") {\n for (const root of grant.selection.roots) {\n if (!sameObjectRef(root.anchor, target)) {\n throw invalidInput(\"Every Share view root must match the exact Share target.\")\n }\n }\n continue\n }\n for (const subject of grant.subjects) {\n if (!sameObjectRef(subject, target)) {\n throw invalidInput(\"Every shared Action subject must match the exact Share target.\")\n }\n }\n }\n}\n\nfunction sameObjectRef(left: ObjectRef, right: ObjectRef): boolean {\n return left.objectTypeId === right.objectTypeId && left.primaryId === right.primaryId\n}\n\nfunction normalizeObjectRef(value: unknown, label: string): ObjectRef {\n if (!isRecord(value)) throw invalidInput(`${label} must be an exact object reference.`)\n return Object.freeze({\n objectTypeId: identifier(value.objectTypeId, `${label} object type id`),\n primaryId: identifier(value.primaryId, `${label} primary id`),\n })\n}\n\nfunction normalizeAuthorizablePrincipal(value: unknown, label: string): AuthorizablePrincipal {\n const principal = normalizePrincipal(value, label)\n if (principal.type === \"system\") {\n throw invalidInput(`${label} must be a user or service account.`)\n }\n return principal\n}\n\nfunction normalizePrincipal(value: unknown, label: string): Principal {\n if (!isRecord(value)) throw invalidInput(`${label} must be a principal.`)\n if (value.type !== \"user\" && value.type !== \"serviceAccount\" && value.type !== \"system\") {\n throw invalidInput(`${label} has an unsupported type.`)\n }\n return Object.freeze({ type: value.type, id: identifier(value.id, `${label} id`) })\n}\n\nfunction normalizeDestinationPath(value: unknown): string {\n if (typeof value !== \"string\" || value.length === 0) {\n throw invalidInput(\"Share destination path must not be empty.\")\n }\n if (value.length > MAX_DESTINATION_PATH_LENGTH) {\n throw invalidInput(\n `Share destination path must not exceed ${MAX_DESTINATION_PATH_LENGTH} characters.`\n )\n }\n if (\n !value.startsWith(\"/\") ||\n value.includes(\"//\") ||\n value.includes(\"?\") ||\n value.includes(\"#\") ||\n value.includes(\"\\\\\") ||\n value.includes(\"\\0\")\n ) {\n throw invalidInput(\n \"Share destination path must be an absolute same-origin pathname without query or fragment.\"\n )\n }\n const normalized = new URL(value, \"https://sixb.invalid\").pathname\n if (normalized !== value) {\n throw invalidInput(\"Share destination path must already be canonical.\")\n }\n let decoded: string\n try {\n decoded = decodeURIComponent(value).replaceAll(\"\\\\\", \"/\")\n } catch {\n throw invalidInput(\"Share destination path must contain valid percent-encoding.\")\n }\n if (decoded === SHARED_APP_PATH_PREFIX || decoded.startsWith(`${SHARED_APP_PATH_PREFIX}/`)) {\n throw invalidInput(\n \"Share destination path must not use the framework-owned '/shared' namespace.\"\n )\n }\n return value\n}\n\nfunction identifier(value: unknown, label: string): string {\n if (typeof value !== \"string\" || value.trim().length === 0 || value.includes(\"\\0\")) {\n throw invalidInput(`${label} must be a non-empty string without NUL bytes.`)\n }\n return value\n}\n\nfunction sha256(value: unknown, label: string): string {\n if (typeof value !== \"string\" || !SHA256_HEX.test(value)) {\n throw invalidInput(`${label} must be a lowercase SHA-256 hex digest.`)\n }\n return value\n}\n\nfunction inputDate(value: unknown, label: string): Date {\n if (!(value instanceof Date) || !Number.isFinite(value.getTime())) {\n throw invalidInput(`${label} must be a valid Date.`)\n }\n return new Date(value)\n}\n\nfunction storedDate(value: unknown, label: string): Date {\n const parsed =\n value instanceof Date\n ? new Date(value)\n : typeof value === \"string\"\n ? new Date(value)\n : new Date(Number.NaN)\n if (!Number.isFinite(parsed.getTime())) throw invalidRecord(`${label} is invalid.`)\n return parsed\n}\n\nfunction optionalBoolean(value: unknown, label: string): boolean {\n if (value === undefined) return false\n if (typeof value !== \"boolean\") throw invalidInput(`${label} must be a boolean.`)\n return value\n}\n\nfunction safeInteger(value: unknown, label: string, minimum: number): number {\n if (!Number.isSafeInteger(value) || (value as number) < minimum) {\n throw invalidInput(`${label} must be a safe integer greater than or equal to ${minimum}.`)\n }\n return value as number\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value)\n}\n\nfunction invalidInput(message: string, cause?: unknown): ShareGrantStorageError {\n return new ShareGrantStorageError(\"invalid_input\", `[Sixb] ${message}`, { cause })\n}\n\nfunction invalidRecord(message: string, cause?: unknown): ShareGrantStorageError {\n return new ShareGrantStorageError(\"invalid_record\", `[Sixb] ${message}`, { cause })\n}\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": ";;;;;;;;;;AAGO,MAAM,+BAA+B,MAAM;AAAA,EAIrC;AAAA,EAHF,O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E,MAAM,CAAC;AAAA;AAGnF,SAAS,aAAa,CAAC,SAAiB,OAAyC;AAAA,EAC/E,OAAO,IAAI,wBAAuB,kBAAkB,UAAU,WAAW,EAAE,MAAM,CAAC;AAAA;",
|
|
10
|
+
"debugId": "9B16B0CFE0D7229264756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
MaterializationValidationError2
|
|
4
|
+
} from "./chunk-yv79ncbv.js";
|
|
5
5
|
import {
|
|
6
6
|
compareStrings
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-wy0qdqfm.js";
|
|
8
8
|
|
|
9
9
|
// src/materialization/refs.ts
|
|
10
10
|
var textEncoder = new TextEncoder;
|
|
11
11
|
function assertIdentifier(value, label) {
|
|
12
12
|
if (typeof value !== "string" || value.trim().length === 0) {
|
|
13
|
-
throw new
|
|
13
|
+
throw new MaterializationValidationError2(`${label} must be a nonblank string.`);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function normalizeObjectRef2(ref) {
|
|
17
17
|
assertIdentifier(ref.objectTypeId, "Object type id");
|
|
18
18
|
assertIdentifier(ref.primaryId, "Object primary id");
|
|
19
19
|
return Object.freeze({ objectTypeId: ref.objectTypeId, primaryId: ref.primaryId });
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function normalizeLinkRef2(ref) {
|
|
22
22
|
assertIdentifier(ref.linkId, "Link id");
|
|
23
23
|
return Object.freeze({
|
|
24
|
-
source:
|
|
24
|
+
source: normalizeObjectRef2(ref.source),
|
|
25
25
|
linkId: ref.linkId,
|
|
26
|
-
target:
|
|
26
|
+
target: normalizeObjectRef2(ref.target)
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function objectRefKey2(ref) {
|
|
30
30
|
return JSON.stringify([ref.objectTypeId, ref.primaryId]);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function linkRefKey2(ref) {
|
|
33
33
|
return JSON.stringify([
|
|
34
34
|
ref.source.objectTypeId,
|
|
35
35
|
ref.source.primaryId,
|
|
@@ -38,7 +38,7 @@ function linkRefKey(ref) {
|
|
|
38
38
|
ref.target.primaryId
|
|
39
39
|
]);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function projectionEntityKey2(entity) {
|
|
42
42
|
return entity.kind === "object" ? JSON.stringify(["object", entity.ref.objectTypeId, entity.ref.primaryId]) : JSON.stringify([
|
|
43
43
|
"link",
|
|
44
44
|
entity.ref.source.objectTypeId,
|
|
@@ -54,10 +54,10 @@ function linkOwnershipKey(sourceObjectTypeId, linkId) {
|
|
|
54
54
|
function telemetryOwnershipKey(objectTypeId, propertyId) {
|
|
55
55
|
return JSON.stringify([objectTypeId, propertyId]);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function telemetrySeriesKey2(series) {
|
|
58
58
|
return JSON.stringify([series.object.objectTypeId, series.object.primaryId, series.propertyId]);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function telemetryPointKey2(series, at) {
|
|
61
61
|
return JSON.stringify([
|
|
62
62
|
series.object.objectTypeId,
|
|
63
63
|
series.object.primaryId,
|
|
@@ -65,7 +65,7 @@ function telemetryPointKey(series, at) {
|
|
|
65
65
|
at
|
|
66
66
|
]);
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function canonicalIdentitySortKey2(parts) {
|
|
69
69
|
let result = "";
|
|
70
70
|
for (const byte of textEncoder.encode(JSON.stringify(parts))) {
|
|
71
71
|
result += byte.toString(16).padStart(2, "0");
|
|
@@ -75,11 +75,11 @@ function canonicalIdentitySortKey(parts) {
|
|
|
75
75
|
function utf8JsonByteLength(value) {
|
|
76
76
|
return textEncoder.encode(JSON.stringify(value)).byteLength;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
78
|
+
function objectRefSortKey2(ref) {
|
|
79
|
+
return canonicalIdentitySortKey2([ref.objectTypeId, ref.primaryId]);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
81
|
+
function linkRefSortKey2(ref) {
|
|
82
|
+
return canonicalIdentitySortKey2([
|
|
83
83
|
ref.source.objectTypeId,
|
|
84
84
|
ref.source.primaryId,
|
|
85
85
|
ref.linkId,
|
|
@@ -90,24 +90,24 @@ function linkRefSortKey(ref) {
|
|
|
90
90
|
function linkScopeKey(source, linkId) {
|
|
91
91
|
return JSON.stringify([source.objectTypeId, source.primaryId, linkId]);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
93
|
+
function linkScopeSortKey2(source, linkId) {
|
|
94
|
+
return canonicalIdentitySortKey2([source.objectTypeId, source.primaryId, linkId]);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
return
|
|
96
|
+
function telemetryPointSortKey2(series, at) {
|
|
97
|
+
return canonicalIdentitySortKey2([
|
|
98
98
|
series.object.objectTypeId,
|
|
99
99
|
series.object.primaryId,
|
|
100
100
|
series.propertyId,
|
|
101
101
|
at
|
|
102
102
|
]);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
return compareStrings(
|
|
104
|
+
function compareObjectRefs2(left, right) {
|
|
105
|
+
return compareStrings(objectRefSortKey2(left), objectRefSortKey2(right));
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
return compareStrings(
|
|
107
|
+
function compareLinkRefs2(left, right) {
|
|
108
|
+
return compareStrings(linkRefSortKey2(left), linkRefSortKey2(right));
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
export {
|
|
111
|
+
export { normalizeObjectRef2, normalizeLinkRef2, objectRefKey2, linkRefKey2, projectionEntityKey2, linkOwnershipKey, telemetryOwnershipKey, telemetrySeriesKey2, telemetryPointKey2, canonicalIdentitySortKey2, utf8JsonByteLength, objectRefSortKey2, linkRefSortKey2, linkScopeKey, linkScopeSortKey2, telemetryPointSortKey2, compareObjectRefs2, compareLinkRefs2 };
|
|
112
112
|
|
|
113
|
-
//# debugId=
|
|
113
|
+
//# debugId=1182BD7C8CFFA82F64756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { compareStrings } from \"../json\"\nimport { MaterializationValidationError } from \"./errors\"\nimport type {\n OntologyLinkRef,\n OntologyObjectRef,\n ProjectionEntityRef,\n TelemetrySeriesRef,\n} from \"./model\"\n\nconst textEncoder = new TextEncoder()\n\nfunction assertIdentifier(value: string, label: string): void {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new MaterializationValidationError(`${label} must be a nonblank string.`)\n }\n}\n\nexport function normalizeObjectRef(ref: OntologyObjectRef): OntologyObjectRef {\n assertIdentifier(ref.objectTypeId, \"Object type id\")\n assertIdentifier(ref.primaryId, \"Object primary id\")\n return Object.freeze({ objectTypeId: ref.objectTypeId, primaryId: ref.primaryId })\n}\n\nexport function normalizeLinkRef(ref: OntologyLinkRef): OntologyLinkRef {\n assertIdentifier(ref.linkId, \"Link id\")\n return Object.freeze({\n source: normalizeObjectRef(ref.source),\n linkId: ref.linkId,\n target: normalizeObjectRef(ref.target),\n })\n}\n\nexport function objectRefKey(ref: OntologyObjectRef): string {\n return JSON.stringify([ref.objectTypeId, ref.primaryId])\n}\n\nexport function linkRefKey(ref: OntologyLinkRef): string {\n return JSON.stringify([\n ref.source.objectTypeId,\n ref.source.primaryId,\n ref.linkId,\n ref.target.objectTypeId,\n ref.target.primaryId,\n ])\n}\n\nexport function projectionEntityKey(entity: ProjectionEntityRef): string {\n return entity.kind === \"object\"\n ? JSON.stringify([\"object\", entity.ref.objectTypeId, entity.ref.primaryId])\n : JSON.stringify([\n \"link\",\n entity.ref.source.objectTypeId,\n entity.ref.source.primaryId,\n entity.ref.linkId,\n entity.ref.target.objectTypeId,\n entity.ref.target.primaryId,\n ])\n}\n\nexport function linkOwnershipKey(sourceObjectTypeId: string, linkId: string): string {\n return JSON.stringify([sourceObjectTypeId, linkId])\n}\n\nexport function telemetryOwnershipKey(objectTypeId: string, propertyId: string): string {\n return JSON.stringify([objectTypeId, propertyId])\n}\n\nexport function telemetrySeriesKey(series: TelemetrySeriesRef): string {\n return JSON.stringify([series.object.objectTypeId, series.object.primaryId, series.propertyId])\n}\n\nexport function telemetryPointKey(series: TelemetrySeriesRef, at: string): string {\n return JSON.stringify([\n series.object.objectTypeId,\n series.object.primaryId,\n series.propertyId,\n at,\n ])\n}\n\n/**\n * A provider-collation-independent byte key. Providers compare this lowercase hexadecimal value\n * verbatim; all ontology identity structure is supplied by core in the canonical JSON tuple.\n */\nexport function canonicalIdentitySortKey(parts: readonly string[]): string {\n let result = \"\"\n for (const byte of textEncoder.encode(JSON.stringify(parts))) {\n result += byte.toString(16).padStart(2, \"0\")\n }\n return result\n}\n\nexport function utf8JsonByteLength(value: unknown): number {\n return textEncoder.encode(JSON.stringify(value)).byteLength\n}\n\nexport function objectRefSortKey(ref: OntologyObjectRef): string {\n return canonicalIdentitySortKey([ref.objectTypeId, ref.primaryId])\n}\n\nexport function linkRefSortKey(ref: OntologyLinkRef): string {\n return canonicalIdentitySortKey([\n ref.source.objectTypeId,\n ref.source.primaryId,\n ref.linkId,\n ref.target.objectTypeId,\n ref.target.primaryId,\n ])\n}\n\nexport function linkScopeKey(source: OntologyObjectRef, linkId: string): string {\n return JSON.stringify([source.objectTypeId, source.primaryId, linkId])\n}\n\nexport function linkScopeSortKey(source: OntologyObjectRef, linkId: string): string {\n return canonicalIdentitySortKey([source.objectTypeId, source.primaryId, linkId])\n}\n\nexport function telemetryPointSortKey(series: TelemetrySeriesRef, at: string): string {\n return canonicalIdentitySortKey([\n series.object.objectTypeId,\n series.object.primaryId,\n series.propertyId,\n at,\n ])\n}\n\nexport function compareObjectRefs(left: OntologyObjectRef, right: OntologyObjectRef): number {\n return compareStrings(objectRefSortKey(left), objectRefSortKey(right))\n}\n\nexport function compareLinkRefs(left: OntologyLinkRef, right: OntologyLinkRef): number {\n return compareStrings(linkRefSortKey(left), linkRefSortKey(right))\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";;;;;;;;;AASA,IAAM,cAAc,IAAI;AAExB,SAAS,gBAAgB,CAAC,OAAe,OAAqB;AAAA,EAC5D,IAAI,OAAO,UAAU,YAAY,MAAM,KAAK,EAAE,WAAW,GAAG;AAAA,IAC1D,MAAM,IAAI
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;AASA,IAAM,cAAc,IAAI;AAExB,SAAS,gBAAgB,CAAC,OAAe,OAAqB;AAAA,EAC5D,IAAI,OAAO,UAAU,YAAY,MAAM,KAAK,EAAE,WAAW,GAAG;AAAA,IAC1D,MAAM,IAAI,gCAA+B,GAAG,kCAAkC;AAAA,EAChF;AAAA;AAGK,SAAS,mBAAkB,CAAC,KAA2C;AAAA,EAC5E,iBAAiB,IAAI,cAAc,gBAAgB;AAAA,EACnD,iBAAiB,IAAI,WAAW,mBAAmB;AAAA,EACnD,OAAO,OAAO,OAAO,EAAE,cAAc,IAAI,cAAc,WAAW,IAAI,UAAU,CAAC;AAAA;AAG5E,SAAS,iBAAgB,CAAC,KAAuC;AAAA,EACtE,iBAAiB,IAAI,QAAQ,SAAS;AAAA,EACtC,OAAO,OAAO,OAAO;AAAA,IACnB,QAAQ,oBAAmB,IAAI,MAAM;AAAA,IACrC,QAAQ,IAAI;AAAA,IACZ,QAAQ,oBAAmB,IAAI,MAAM;AAAA,EACvC,CAAC;AAAA;AAGI,SAAS,aAAY,CAAC,KAAgC;AAAA,EAC3D,OAAO,KAAK,UAAU,CAAC,IAAI,cAAc,IAAI,SAAS,CAAC;AAAA;AAGlD,SAAS,WAAU,CAAC,KAA8B;AAAA,EACvD,OAAO,KAAK,UAAU;AAAA,IACpB,IAAI,OAAO;AAAA,IACX,IAAI,OAAO;AAAA,IACX,IAAI;AAAA,IACJ,IAAI,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,CAAC,KAAgC;AAAA,EAC/D,OAAO,0BAAyB,CAAC,IAAI,cAAc,IAAI,SAAS,CAAC;AAAA;AAG5D,SAAS,eAAc,CAAC,KAA8B;AAAA,EAC3D,OAAO,0BAAyB;AAAA,IAC9B,IAAI,OAAO;AAAA,IACX,IAAI,OAAO;AAAA,IACX,IAAI;AAAA,IACJ,IAAI,OAAO;AAAA,IACX,IAAI,OAAO;AAAA,EACb,CAAC;AAAA;AAGI,SAAS,YAAY,CAAC,QAA2B,QAAwB;AAAA,EAC9E,OAAO,KAAK,UAAU,CAAC,OAAO,cAAc,OAAO,WAAW,MAAM,CAAC;AAAA;AAGhE,SAAS,iBAAgB,CAAC,QAA2B,QAAwB;AAAA,EAClF,OAAO,0BAAyB,CAAC,OAAO,cAAc,OAAO,WAAW,MAAM,CAAC;AAAA;AAG1E,SAAS,sBAAqB,CAAC,QAA4B,IAAoB;AAAA,EACpF,OAAO,0BAAyB;AAAA,IAC9B,OAAO,OAAO;AAAA,IACd,OAAO,OAAO;AAAA,IACd,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AAAA;AAGI,SAAS,kBAAiB,CAAC,MAAyB,OAAkC;AAAA,EAC3F,OAAO,eAAe,kBAAiB,IAAI,GAAG,kBAAiB,KAAK,CAAC;AAAA;AAGhE,SAAS,gBAAe,CAAC,MAAuB,OAAgC;AAAA,EACrF,OAAO,eAAe,gBAAe,IAAI,GAAG,gBAAe,KAAK,CAAC;AAAA;",
|
|
8
|
+
"debugId": "1182BD7C8CFFA82F64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/ontology/errors.ts
|
|
3
|
-
class
|
|
3
|
+
class OntologyValidationError2 extends Error {
|
|
4
4
|
name = "OntologyValidationError";
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class OntologyNotFoundError2 extends OntologyValidationError2 {
|
|
8
8
|
name = "OntologyNotFoundError";
|
|
9
9
|
}
|
|
10
10
|
function formatUnknownObjectTypeMessage(objectTypeId) {
|
|
11
11
|
return `Unknown object type '${objectTypeId}'. Object type IDs are case-sensitive.`;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export {
|
|
14
|
+
export { OntologyValidationError2, OntologyNotFoundError2, formatUnknownObjectTypeMessage };
|
|
15
15
|
|
|
16
|
-
//# debugId=
|
|
16
|
+
//# debugId=AEA05E8B19C76AD464756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"/**\n * Thrown when input violates an ontology constraint\n * (unknown property, missing required, invalid value, invalid target type, etc.).\n */\nexport class OntologyValidationError extends Error {\n // Widened from the literal so subclasses (notably MaterializationValidationError) can name\n // themselves while still being caught by `instanceof OntologyValidationError`.\n readonly name: string = \"OntologyValidationError\"\n}\n\n/**\n * The caller named a definition the ontology does not register — an object type, a link.\n *\n * A subclass rather than a sibling, so every `instanceof OntologyValidationError` still catches it.\n * The distinction it adds is *missing resource* versus *invalid input*: both are the caller's\n * mistake, but only one of them is answered with a 404. Everything else `OntologyValidationError`\n * covers — unknown property, missing required, bad value, wrong target type — is a 400.\n */\nexport class OntologyNotFoundError extends OntologyValidationError {\n readonly name: string = \"OntologyNotFoundError\"\n}\n\nexport function formatUnknownObjectTypeMessage(objectTypeId: string): string {\n return `Unknown object type '${objectTypeId}'. Object type IDs are case-sensitive.`\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";;AAIO,MAAM,
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;AAIO,MAAM,iCAAgC,MAAM;AAAA,EAGxC,OAAe;AAC1B;AAAA;AAUO,MAAM,+BAA8B,yBAAwB;AAAA,EACxD,OAAe;AAC1B;AAEO,SAAS,8BAA8B,CAAC,cAA8B;AAAA,EAC3E,OAAO,wBAAwB;AAAA;",
|
|
8
|
+
"debugId": "AEA05E8B19C76AD464756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { SixbErrorCode, SixbFailure } from \"../../errors/types\"\nimport type { OntologyMaterializationEvent } from \"../../materialization/events\"\n\nexport type {\n OntologyMaterializationEvent,\n OntologyMaterializationEventDraft,\n} from \"../../materialization/events\"\n\nexport interface OntologyOutboxWrite {\n /** Providers may index envelope identity fields, but the envelope remains authoritative. */\n readonly envelope: OntologyMaterializationEvent\n readonly availableAt: string\n readonly createdAt: string\n}\n\n/** Error codes a durable ontology outbox delivery can persist. */\nexport const ONTOLOGY_OUTBOX_FAILURE_CODES = [\"event.delivery_failed\"] as const satisfies readonly [\n SixbErrorCode,\n ...SixbErrorCode[],\n]\n\nexport type OntologyOutboxFailureCode = (typeof ONTOLOGY_OUTBOX_FAILURE_CODES)[number]\nexport type OntologyOutboxFailure = SixbFailure<OntologyOutboxFailureCode>\n\nexport interface OntologyOutboxRecord {\n readonly envelope: OntologyMaterializationEvent\n readonly availableAt: string\n readonly attempts: number\n readonly leaseId: string | null\n readonly leaseExpiresAt: string | null\n readonly publishedAt: string | null\n readonly lastFailure: OntologyOutboxFailure | null\n readonly createdAt: string\n}\n\nexport interface ClaimOntologyOutboxInput {\n readonly projectId: string\n readonly now: string\n readonly limit: number\n readonly leaseId: string\n readonly leaseExpiresAt: string\n}\n\nexport interface ClaimedOntologyOutboxRow extends OntologyOutboxRecord {\n readonly leaseId: string\n readonly leaseExpiresAt: string\n}\n\nexport interface CompleteOntologyOutboxLeaseInput {\n readonly projectId: string\n readonly ids: readonly string[]\n readonly leaseId: string\n readonly publishedAt: string\n}\n\nexport interface RescheduleOntologyOutboxLeaseInput {\n readonly projectId: string\n readonly ids: readonly string[]\n readonly leaseId: string\n readonly availableAt: string\n /** The delivery failure that caused this retry. Omitted for lifecycle-only rescheduling. */\n readonly failure?: OntologyOutboxFailure\n}\n\nexport interface PurgePublishedOntologyOutboxInput {\n readonly projectId: string\n readonly publishedBefore: string\n readonly limit: number\n}\n\nexport interface SummarizeOntologyOutboxInput {\n readonly projectId: string\n}\n\nexport interface OntologyOutboxSummary {\n readonly pendingCount: number\n readonly oldestPendingAt: string | null\n /** Pending rows that have already been claimed at least once. */\n readonly retryingCount: number\n readonly maxAttempts: number\n}\n\nexport interface OntologyOutboxStorage {\n /** Selects each claimed batch deterministically; concurrent publishers may complete out of order. */\n claim(input: ClaimOntologyOutboxInput): Promise<readonly ClaimedOntologyOutboxRow[]>\n markPublished(input: CompleteOntologyOutboxLeaseInput): Promise<void>\n reschedule(input: RescheduleOntologyOutboxLeaseInput): Promise<void>\n purgePublished(input: PurgePublishedOntologyOutboxInput): Promise<number>\n summarize(input: SummarizeOntologyOutboxInput): Promise<OntologyOutboxSummary>\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";;AAgBO,IAAM,
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;AAgBO,IAAM,iCAAgC,CAAC,uBAAuB;",
|
|
8
|
+
"debugId": "6CB44AB153CCE5CD64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
scopeKeysForEvent2
|
|
4
|
+
} from "./chunk-r2y23egw.js";
|
|
5
5
|
|
|
6
6
|
// src/events/selectors/builder.ts
|
|
7
7
|
class EventSelectorSpecView {
|
|
@@ -228,7 +228,7 @@ class PipelineEventSelectorBuilderImpl extends EventSelectorSpecView {
|
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
var
|
|
231
|
+
var events2 = {
|
|
232
232
|
object(objectType) {
|
|
233
233
|
return new ObjectEventSelectorBuilderImpl(objectType, { objectTypeId: objectType.id });
|
|
234
234
|
},
|
|
@@ -286,7 +286,7 @@ function eventTypesForPropertyOperation(topic, propertyOperation) {
|
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
288
288
|
// src/events/selectors/predicate.ts
|
|
289
|
-
function
|
|
289
|
+
function eventSelectorSpec2(selector) {
|
|
290
290
|
return {
|
|
291
291
|
...selector.topic !== undefined ? { topic: selector.topic } : {},
|
|
292
292
|
...selector.types !== undefined ? { types: selector.types } : {},
|
|
@@ -304,14 +304,14 @@ function eventSelectorSpec(selector) {
|
|
|
304
304
|
...selector.runId !== undefined ? { runId: selector.runId } : {}
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
const filter =
|
|
307
|
+
function buildEventSelectorPredicate2(selector) {
|
|
308
|
+
const filter = eventSelectorSpec2(selector);
|
|
309
309
|
return (event) => {
|
|
310
310
|
if (filter.topic && event.topic !== filter.topic)
|
|
311
311
|
return false;
|
|
312
312
|
if (filter.types && filter.types.length > 0 && !filter.types.includes(event.type))
|
|
313
313
|
return false;
|
|
314
|
-
const scope =
|
|
314
|
+
const scope = scopeKeysForEvent2(event);
|
|
315
315
|
if (filter.objectTypeId !== undefined && scope.objectTypeId !== filter.objectTypeId)
|
|
316
316
|
return false;
|
|
317
317
|
if (filter.primaryId !== undefined && scope.primaryId !== filter.primaryId)
|
|
@@ -345,7 +345,7 @@ function matchesPropertyChange(event, filter) {
|
|
|
345
345
|
return filter.propertyOperation === undefined;
|
|
346
346
|
}
|
|
347
347
|
if (!hasPropertyChanges(event)) {
|
|
348
|
-
const scope =
|
|
348
|
+
const scope = scopeKeysForEvent2(event);
|
|
349
349
|
return filter.propertyOperation === undefined && scope.propertyId === filter.propertyId;
|
|
350
350
|
}
|
|
351
351
|
const change = event.payload.propertyChanges[filter.propertyId];
|
|
@@ -357,6 +357,6 @@ function matchesPropertyChange(event, filter) {
|
|
|
357
357
|
function hasPropertyChanges(event) {
|
|
358
358
|
return event.payload !== null && typeof event.payload === "object" && "propertyChanges" in event.payload;
|
|
359
359
|
}
|
|
360
|
-
export {
|
|
360
|
+
export { events2, eventSelectorSpec2, buildEventSelectorPredicate2 };
|
|
361
361
|
|
|
362
|
-
//# debugId=
|
|
362
|
+
//# debugId=FA82749A1A75436A64756E2164756E21
|