@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,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
ExecutionStorageError
|
|
4
|
-
} from "./chunk-rafagrwr.js";
|
|
5
2
|
import {
|
|
6
3
|
createTrustedPrimitiveRuntimeAuthorization,
|
|
7
4
|
getAuthorizationRef,
|
|
8
5
|
resolveExecutionScopeAuthorization
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-dz5h08xv.js";
|
|
7
|
+
import {
|
|
8
|
+
ExecutionStorageError2
|
|
9
|
+
} from "./chunk-93csa55g.js";
|
|
10
10
|
|
|
11
11
|
// src/execution/durable.ts
|
|
12
12
|
import { isDeepStrictEqual } from "util";
|
|
@@ -26,7 +26,7 @@ function executionRecordInputFromRuntime(input) {
|
|
|
26
26
|
authorizationRef: getAuthorizationRef(input.runtimeAuthorization)
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
async function
|
|
29
|
+
async function ensureExecutionRecord2(storage, input) {
|
|
30
30
|
const existing = await storage.getById({ projectId: input.projectId, id: input.id });
|
|
31
31
|
if (existing) {
|
|
32
32
|
assertExecutionRecordMatches(existing, input);
|
|
@@ -35,7 +35,7 @@ async function ensureExecutionRecord(storage, input) {
|
|
|
35
35
|
try {
|
|
36
36
|
return await storage.create(input);
|
|
37
37
|
} catch (error) {
|
|
38
|
-
if (!(error instanceof
|
|
38
|
+
if (!(error instanceof ExecutionStorageError2) || error.code !== "duplicate_execution") {
|
|
39
39
|
throw error;
|
|
40
40
|
}
|
|
41
41
|
const raced = await storage.getById({ projectId: input.projectId, id: input.id });
|
|
@@ -48,11 +48,13 @@ async function ensureExecutionRecord(storage, input) {
|
|
|
48
48
|
function createPrimitiveExecutionRecord(input) {
|
|
49
49
|
const provenance = input.origin.type === "execution" ? {
|
|
50
50
|
projectId: input.origin.parent.projectId,
|
|
51
|
+
requesterGroupIds: [...input.origin.parent.requesterGroupIds],
|
|
51
52
|
...input.origin.parent.requestedBy === undefined ? {} : { requestedBy: structuredClone(input.origin.parent.requestedBy) },
|
|
52
53
|
source: { type: "execution", executionId: input.origin.parent.id },
|
|
53
54
|
correlationId: input.origin.parent.correlationId
|
|
54
55
|
} : {
|
|
55
56
|
projectId: input.origin.projectId,
|
|
57
|
+
...input.origin.requesterGroupIds === undefined ? {} : { requesterGroupIds: [...input.origin.requesterGroupIds] },
|
|
56
58
|
...input.origin.requestedBy === undefined ? {} : { requestedBy: structuredClone(input.origin.requestedBy) },
|
|
57
59
|
source: structuredClone(input.origin.source),
|
|
58
60
|
correlationId: input.origin.correlationId
|
|
@@ -107,17 +109,20 @@ function durableExecutor(execution) {
|
|
|
107
109
|
}
|
|
108
110
|
function assertExecutionRecordMatches(existing, input) {
|
|
109
111
|
const { createdAt: _createdAt, ...stored } = existing;
|
|
110
|
-
if (!isDeepStrictEqual(stored,
|
|
111
|
-
|
|
112
|
+
if (!isDeepStrictEqual(stored, {
|
|
113
|
+
...input,
|
|
114
|
+
requesterGroupIds: input.requesterGroupIds ?? stored.requesterGroupIds
|
|
115
|
+
})) {
|
|
116
|
+
throw new ExecutionStorageError2("duplicate_execution", `[Sixb] Execution '${input.id}' already exists with different immutable provenance.`);
|
|
112
117
|
}
|
|
113
118
|
}
|
|
114
119
|
function assertPrimitiveExecution(execution, primitive) {
|
|
115
120
|
const authority = execution.authorizationRef;
|
|
116
121
|
if (execution.executor.type !== "primitive" || execution.executor.kind !== primitive.kind || execution.executor.runId !== primitive.runId || authority.type !== "trustedPrimitive" || authority.primitive.kind !== primitive.kind || authority.primitive.id !== primitive.id || authority.primitive.runId !== primitive.runId) {
|
|
117
|
-
throw new
|
|
122
|
+
throw new ExecutionStorageError2("invalid_input", `[Sixb] Execution '${execution.id}' does not authorize ${primitive.kind} run '${primitive.runId}'.`);
|
|
118
123
|
}
|
|
119
124
|
}
|
|
120
125
|
|
|
121
|
-
export { executionRecordInputFromRuntime,
|
|
126
|
+
export { executionRecordInputFromRuntime, ensureExecutionRecord2, createPrimitiveExecutionRecord, restoreTrustedPrimitiveExecutionScope };
|
|
122
127
|
|
|
123
|
-
//# debugId=
|
|
128
|
+
//# debugId=100DAA50343550BA64756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/execution/durable.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { isDeepStrictEqual } from \"node:util\"\nimport {\n type CreateExecutionInput,\n type ExecutionRecord,\n type ExecutionStorage,\n ExecutionStorageError,\n} from \"../storage/executions\"\nimport {\n createTrustedPrimitiveRuntimeAuthorization,\n getAuthorizationRef,\n resolveExecutionScopeAuthorization,\n} from \"./authorization\"\nimport type {\n ExecutionContext,\n ExecutionScope,\n RuntimeAuthorization,\n TrustedPrimitiveRef,\n} from \"./types\"\n\n/** Convert one currently bound execution to the immutable provider representation. */\nexport function executionRecordInputFromRuntime(input: {\n readonly execution: ExecutionContext\n readonly runtimeAuthorization: RuntimeAuthorization\n}): CreateExecutionInput {\n const execution = input.execution\n resolveExecutionScopeAuthorization(execution.projectId, {\n execution,\n authorization: input.runtimeAuthorization,\n })\n return {\n id: execution.id,\n projectId: execution.projectId,\n ...(execution.requestedBy === undefined\n ? {}\n : { requestedBy: structuredClone(execution.requestedBy) }),\n executor: durableExecutor(execution),\n source: structuredClone(execution.source),\n correlationId: execution.correlationId,\n authorizationRef: getAuthorizationRef(input.runtimeAuthorization),\n }\n}\n\n/**\n * Store a caller execution once. Repeated boundaries may observe the same immutable execution;\n * only an exact match is idempotent.\n */\nexport async function ensureExecutionRecord(\n storage: ExecutionStorage,\n input: CreateExecutionInput\n): Promise<ExecutionRecord> {\n const existing = await storage.getById({ projectId: input.projectId, id: input.id })\n if (existing) {\n assertExecutionRecordMatches(existing, input)\n return existing\n }\n\n try {\n return await storage.create(input)\n } catch (error) {\n if (!(error instanceof ExecutionStorageError) || error.code !== \"duplicate_execution\") {\n throw error\n }\n\n const raced = await storage.getById({ projectId: input.projectId, id: input.id })\n if (!raced) throw error\n assertExecutionRecordMatches(raced, input)\n return raced\n }\n}\n\ntype PrimitiveExecutionOrigin =\n | {\n readonly type: \"execution\"\n readonly parent: ExecutionRecord\n }\n | {\n readonly type: \"automatic\"\n readonly projectId: string\n readonly source: Extract<\n CreateExecutionInput[\"source\"],\n { readonly type: \"schedule\" | \"event\" | \"datasetVersion\" | \"webhook\" }\n >\n readonly correlationId: string\n readonly requestedBy?: CreateExecutionInput[\"requestedBy\"]\n readonly requesterGroupIds?: readonly string[]\n }\n\n/** Build an immutable primitive execution from its parent execution or automatic trigger. */\nexport function createPrimitiveExecutionRecord(input: {\n readonly id: string\n readonly primitive: TrustedPrimitiveRef\n readonly origin: PrimitiveExecutionOrigin\n}): CreateExecutionInput {\n const provenance =\n input.origin.type === \"execution\"\n ? {\n projectId: input.origin.parent.projectId,\n requesterGroupIds: [...input.origin.parent.requesterGroupIds],\n ...(input.origin.parent.requestedBy === undefined\n ? {}\n : { requestedBy: structuredClone(input.origin.parent.requestedBy) }),\n source: { type: \"execution\" as const, executionId: input.origin.parent.id },\n correlationId: input.origin.parent.correlationId,\n }\n : {\n projectId: input.origin.projectId,\n ...(input.origin.requesterGroupIds === undefined\n ? {}\n : { requesterGroupIds: [...input.origin.requesterGroupIds] }),\n ...(input.origin.requestedBy === undefined\n ? {}\n : { requestedBy: structuredClone(input.origin.requestedBy) }),\n source: structuredClone(input.origin.source),\n correlationId: input.origin.correlationId,\n }\n\n return {\n id: input.id,\n ...provenance,\n executor: {\n type: \"primitive\",\n kind: input.primitive.kind,\n runId: input.primitive.runId,\n },\n authorizationRef: {\n type: \"trustedPrimitive\",\n primitive: structuredClone(input.primitive),\n },\n }\n}\n\n/** Restore the trusted scope of a provider-validated primitive execution record. */\nexport function restoreTrustedPrimitiveExecutionScope(input: {\n readonly execution: ExecutionRecord\n readonly primitive: TrustedPrimitiveRef\n}): ExecutionScope {\n assertPrimitiveExecution(input.execution, input.primitive)\n const context: ExecutionContext = Object.freeze({\n id: input.execution.id,\n projectId: input.execution.projectId,\n ...(input.execution.requestedBy === undefined\n ? {}\n : { requestedBy: Object.freeze(structuredClone(input.execution.requestedBy)) }),\n executor: Object.freeze({ type: \"primitive\", ...structuredClone(input.primitive) }),\n source: Object.freeze(structuredClone(input.execution.source)),\n correlationId: input.execution.correlationId,\n })\n return Object.freeze({\n execution: context,\n authorization: createTrustedPrimitiveRuntimeAuthorization({\n execution: context,\n primitive: input.primitive,\n }),\n })\n}\n\nfunction durableExecutor(execution: ExecutionContext): CreateExecutionInput[\"executor\"] {\n switch (execution.executor.type) {\n case \"request\":\n return { type: \"request\", requestId: execution.executor.requestId }\n case \"primitive\":\n return {\n type: \"primitive\",\n kind: execution.executor.kind,\n runId: execution.executor.runId,\n }\n case \"agent\":\n return { type: \"agent\", runId: execution.executor.runId }\n case \"kernel\":\n return { type: \"kernel\", operation: structuredClone(execution.executor.operation) }\n }\n}\n\nfunction assertExecutionRecordMatches(\n existing: ExecutionRecord,\n input: CreateExecutionInput\n): void {\n const { createdAt: _createdAt, ...stored } = existing\n if (\n !isDeepStrictEqual(stored, {\n ...input,\n requesterGroupIds: input.requesterGroupIds ?? stored.requesterGroupIds,\n })\n ) {\n throw new ExecutionStorageError(\n \"duplicate_execution\",\n `[Sixb] Execution '${input.id}' already exists with different immutable provenance.`\n )\n }\n}\n\nfunction assertPrimitiveExecution(\n execution: ExecutionRecord,\n primitive: TrustedPrimitiveRef\n): void {\n const authority = execution.authorizationRef\n if (\n execution.executor.type !== \"primitive\" ||\n execution.executor.kind !== primitive.kind ||\n execution.executor.runId !== primitive.runId ||\n authority.type !== \"trustedPrimitive\" ||\n authority.primitive.kind !== primitive.kind ||\n authority.primitive.id !== primitive.id ||\n authority.primitive.runId !== primitive.runId\n ) {\n throw new ExecutionStorageError(\n \"invalid_input\",\n `[Sixb] Execution '${execution.id}' does not authorize ${primitive.kind} run '${primitive.runId}'.`\n )\n }\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;AAAA;AAoBO,SAAS,+BAA+B,CAAC,OAGvB;AAAA,EACvB,MAAM,YAAY,MAAM;AAAA,EACxB,mCAAmC,UAAU,WAAW;AAAA,IACtD;AAAA,IACA,eAAe,MAAM;AAAA,EACvB,CAAC;AAAA,EACD,OAAO;AAAA,IACL,IAAI,UAAU;AAAA,IACd,WAAW,UAAU;AAAA,OACjB,UAAU,gBAAgB,YAC1B,CAAC,IACD,EAAE,aAAa,gBAAgB,UAAU,WAAW,EAAE;AAAA,IAC1D,UAAU,gBAAgB,SAAS;AAAA,IACnC,QAAQ,gBAAgB,UAAU,MAAM;AAAA,IACxC,eAAe,UAAU;AAAA,IACzB,kBAAkB,oBAAoB,MAAM,oBAAoB;AAAA,EAClE;AAAA;AAOF,eAAsB,sBAAqB,CACzC,SACA,OAC0B;AAAA,EAC1B,MAAM,WAAW,MAAM,QAAQ,QAAQ,EAAE,WAAW,MAAM,WAAW,IAAI,MAAM,GAAG,CAAC;AAAA,EACnF,IAAI,UAAU;AAAA,IACZ,6BAA6B,UAAU,KAAK;AAAA,IAC5C,OAAO;AAAA,EACT;AAAA,EAEA,IAAI;AAAA,IACF,OAAO,MAAM,QAAQ,OAAO,KAAK;AAAA,IACjC,OAAO,OAAO;AAAA,IACd,IAAI,EAAE,iBAAiB,2BAA0B,MAAM,SAAS,uBAAuB;AAAA,MACrF,MAAM;AAAA,IACR;AAAA,IAEA,MAAM,QAAQ,MAAM,QAAQ,QAAQ,EAAE,WAAW,MAAM,WAAW,IAAI,MAAM,GAAG,CAAC;AAAA,IAChF,IAAI,CAAC;AAAA,MAAO,MAAM;AAAA,IAClB,6BAA6B,OAAO,KAAK;AAAA,IACzC,OAAO;AAAA;AAAA;AAsBJ,SAAS,8BAA8B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AS,sBACnB,UAAU,UAAU,SAAS,UAAU,QACvC,UAAU,UAAU,OAAO,UAAU,MACrC,UAAU,UAAU,UAAU,UAAU,OACxC;AAAA,IACA,MAAM,IAAI,uBACR,iBACA,qBAAqB,UAAU,0BAA0B,UAAU,aAAa,UAAU,SAC5F;AAAA,EACF;AAAA;",
|
|
8
|
+
"debugId": "100DAA50343550BA64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -1,32 +1,24 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
PROJECTION_RUN_FAILURE_CODES,
|
|
7
|
-
ProjectionRunError,
|
|
8
|
-
assertProjectionRunDurableExecution,
|
|
9
|
-
assertProjectionRunIdentityMatches
|
|
10
|
-
} from "./chunk-rv2hkwwa.js";
|
|
11
|
-
import {
|
|
12
|
-
sha256Canonical
|
|
13
|
-
} from "./chunk-8tsf6dmc.js";
|
|
3
|
+
ProjectionValidationError2
|
|
4
|
+
} from "./chunk-dz5h08xv.js";
|
|
14
5
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./chunk-
|
|
6
|
+
sha256Canonical2
|
|
7
|
+
} from "./chunk-gqh45d2n.js";
|
|
17
8
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
ProjectionRunError2,
|
|
10
|
+
assertProjectionRunIdentityMatches2,
|
|
11
|
+
assertProjectionRunDurableExecution2
|
|
12
|
+
} from "./chunk-358caqf5.js";
|
|
20
13
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
14
|
+
createPrimitiveExecutionRecord
|
|
15
|
+
} from "./chunk-17kfctj6.js";
|
|
23
16
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} from "./chunk-2xns679x.js";
|
|
17
|
+
findPrimitiveRunExecution
|
|
18
|
+
} from "./chunk-ey1nk510.js";
|
|
27
19
|
// src/projections/capability.ts
|
|
28
20
|
var projectionRegistryKey = Symbol("sixb.projectionRegistry");
|
|
29
|
-
function
|
|
21
|
+
function registerProjectionRegistry2(owner, registry) {
|
|
30
22
|
const registered = owner[projectionRegistryKey];
|
|
31
23
|
if (registered && registered !== registry) {
|
|
32
24
|
throw new Error("[Sixb] Projection registry is already registered for this owner.");
|
|
@@ -38,24 +30,24 @@ function registerProjectionRegistry(owner, registry) {
|
|
|
38
30
|
writable: false
|
|
39
31
|
});
|
|
40
32
|
}
|
|
41
|
-
function
|
|
33
|
+
function getProjectionRegistry2(owner) {
|
|
42
34
|
const registry = owner[projectionRegistryKey];
|
|
43
35
|
if (registry)
|
|
44
36
|
return registry;
|
|
45
37
|
throw new Error("[Sixb] Projection registry is not registered for this runtime.");
|
|
46
38
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
39
|
+
function getProjectionDispatchDescriptors2(owner) {
|
|
40
|
+
return getProjectionRegistry2(owner).getDispatchDescriptors();
|
|
49
41
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
42
|
+
function shareProjectionRegistry2(source, target) {
|
|
43
|
+
registerProjectionRegistry2(target, getProjectionRegistry2(source));
|
|
52
44
|
}
|
|
53
45
|
// src/projections/run-dispatch.ts
|
|
54
46
|
import { randomUUID } from "crypto";
|
|
55
47
|
|
|
56
48
|
// src/projections/run-id.ts
|
|
57
|
-
function
|
|
58
|
-
return
|
|
49
|
+
function createProjectionRunId2(projectId, identity) {
|
|
50
|
+
return sha256Canonical2({
|
|
59
51
|
projectId,
|
|
60
52
|
projectionId: identity.projectionId,
|
|
61
53
|
projectionKind: identity.projectionKind,
|
|
@@ -70,46 +62,49 @@ function createProjectionRunId(projectId, identity) {
|
|
|
70
62
|
}
|
|
71
63
|
|
|
72
64
|
// src/projections/run-dispatch.ts
|
|
73
|
-
var
|
|
65
|
+
var PROJECTION_TELEMETRY_BATCH_SIZE2 = 500;
|
|
74
66
|
|
|
75
|
-
class
|
|
67
|
+
class ProjectionRunDispatcher2 {
|
|
76
68
|
dependencies;
|
|
77
69
|
constructor(dependencies) {
|
|
78
70
|
this.dependencies = dependencies;
|
|
79
71
|
}
|
|
80
72
|
async dispatch(input) {
|
|
81
73
|
assertDispatchInput(input);
|
|
82
|
-
const registry =
|
|
74
|
+
const registry = getProjectionRegistry2(this.dependencies);
|
|
83
75
|
const descriptor = registry.resolveDispatch(input.projectionId);
|
|
84
76
|
if (descriptor.datasetId !== input.datasetVersion.datasetId) {
|
|
85
|
-
throw new
|
|
77
|
+
throw new ProjectionValidationError2(`[Sixb] Projection '${input.projectionId}' consumes dataset '${descriptor.datasetId}', not '${input.datasetVersion.datasetId}'.`);
|
|
86
78
|
}
|
|
87
79
|
const projection = this.dependencies.definitions.projections.getById(input.projectionId);
|
|
88
80
|
if (!projection) {
|
|
89
|
-
throw new
|
|
81
|
+
throw new ProjectionValidationError2(`[Sixb] Unknown projection '${input.projectionId}'.`);
|
|
90
82
|
}
|
|
91
83
|
const version = await this.dependencies.lakeStorage.getVersion(input.datasetVersion.datasetId, input.datasetVersion.versionId);
|
|
92
84
|
if (!version || version.createdAt.toISOString() !== input.datasetVersion.createdAt) {
|
|
93
|
-
throw new
|
|
85
|
+
throw new ProjectionValidationError2(`[Sixb] Dataset '${input.datasetVersion.datasetId}' version '${input.datasetVersion.versionId}' does not match its immutable metadata.`);
|
|
94
86
|
}
|
|
95
87
|
if (version.mode === "schema") {
|
|
96
|
-
throw new
|
|
88
|
+
throw new ProjectionValidationError2(`[Sixb] Projection '${input.projectionId}' cannot materialize a schema-only dataset version.`);
|
|
97
89
|
}
|
|
98
90
|
const { datasetId: _datasetId, ...semanticIdentity } = descriptor;
|
|
99
91
|
const identity = {
|
|
100
92
|
...semanticIdentity,
|
|
101
93
|
datasetVersion: structuredClone(input.datasetVersion)
|
|
102
94
|
};
|
|
103
|
-
const runId =
|
|
95
|
+
const runId = createProjectionRunId2(this.dependencies.id, identity);
|
|
104
96
|
const projectionRuns = requireProjectionRunStorage(this.dependencies.storage);
|
|
105
97
|
const existing = await projectionRuns.getById({ projectId: this.dependencies.id, id: runId });
|
|
106
|
-
|
|
98
|
+
let persisted = existing ? await reuseProjectionRun(this.dependencies, existing, identity) : await persistProjectionRun({
|
|
107
99
|
dependencies: this.dependencies,
|
|
108
100
|
runId,
|
|
109
101
|
identity,
|
|
110
102
|
projection,
|
|
111
103
|
producerExecution: await resolveProducerExecution(this.dependencies.storage, this.dependencies.id, version.producer)
|
|
112
104
|
});
|
|
105
|
+
if (!persisted.publish && persisted.run.status === "queued") {
|
|
106
|
+
persisted = await reuseProjectionRun(this.dependencies, persisted.run, identity);
|
|
107
|
+
}
|
|
113
108
|
if (!persisted.publish)
|
|
114
109
|
return existingResult(persisted.run);
|
|
115
110
|
return publishProjectionRun(this.dependencies, input.metadata, persisted);
|
|
@@ -128,6 +123,7 @@ async function persistProjectionRun(input) {
|
|
|
128
123
|
versionId: input.identity.datasetVersion.versionId
|
|
129
124
|
},
|
|
130
125
|
correlationId: input.producerExecution?.correlationId ?? input.runId,
|
|
126
|
+
requesterGroupIds: input.producerExecution?.requesterGroupIds,
|
|
131
127
|
...input.producerExecution?.requestedBy === undefined ? {} : { requestedBy: input.producerExecution.requestedBy }
|
|
132
128
|
}
|
|
133
129
|
});
|
|
@@ -155,7 +151,7 @@ async function persistProjectionRun(input) {
|
|
|
155
151
|
return { publish: true, run, queuedAt, created: true };
|
|
156
152
|
}, { isolation: "serializable" });
|
|
157
153
|
} catch (error) {
|
|
158
|
-
if (!(error instanceof
|
|
154
|
+
if (!(error instanceof ProjectionRunError2))
|
|
159
155
|
throw error;
|
|
160
156
|
const raced = await requireProjectionRunStorage(input.dependencies.storage).getById({
|
|
161
157
|
projectId: input.dependencies.id,
|
|
@@ -169,6 +165,9 @@ async function persistProjectionRun(input) {
|
|
|
169
165
|
}
|
|
170
166
|
async function reuseProjectionRun(dependencies, existing, identity) {
|
|
171
167
|
await assertExistingRun(dependencies.storage, existing, identity);
|
|
168
|
+
if (existing.status === "queued") {
|
|
169
|
+
return { publish: true, run: existing, queuedAt: existing.queuedAt, created: false };
|
|
170
|
+
}
|
|
172
171
|
if (existing.status !== "failed" || existing.error?.code !== "queue.enqueue_failed" || !existing.error.retryable) {
|
|
173
172
|
return { publish: false, run: existing };
|
|
174
173
|
}
|
|
@@ -178,7 +177,7 @@ async function reuseProjectionRun(dependencies, existing, identity) {
|
|
|
178
177
|
const run = await requeueProjectionRun(projectionRuns, existing, queuedAt);
|
|
179
178
|
return { publish: true, run, queuedAt, created: false };
|
|
180
179
|
} catch (error) {
|
|
181
|
-
if (!(error instanceof
|
|
180
|
+
if (!(error instanceof ProjectionRunError2))
|
|
182
181
|
throw error;
|
|
183
182
|
const raced = await projectionRuns.getById({ projectId: existing.projectId, id: existing.id });
|
|
184
183
|
if (!raced || raced.status === "failed" && raced.error?.code === "queue.enqueue_failed" && raced.error.retryable) {
|
|
@@ -189,50 +188,31 @@ async function reuseProjectionRun(dependencies, existing, identity) {
|
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
190
|
async function publishProjectionRun(dependencies, metadata, persisted) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
projectionId: persisted.run.identity.projectionId,
|
|
206
|
-
runId: persisted.run.id,
|
|
207
|
-
queuedAt: persisted.queuedAt.toISOString(),
|
|
208
|
-
...job?.id ? { jobId: job.id } : {},
|
|
209
|
-
created: persisted.created
|
|
210
|
-
};
|
|
211
|
-
} catch (error) {
|
|
212
|
-
const failedAt = new Date;
|
|
213
|
-
const failure = toEnqueueFailure(error, persisted.run, failedAt);
|
|
214
|
-
const failed = await requireProjectionRunStorage(dependencies.storage).failEnqueue({
|
|
215
|
-
projectId: dependencies.id,
|
|
216
|
-
id: persisted.run.id,
|
|
217
|
-
finishedAt: failedAt,
|
|
218
|
-
error: failure
|
|
219
|
-
});
|
|
220
|
-
reportRunFailure(dependencies, error, {
|
|
221
|
-
projectId: dependencies.id,
|
|
222
|
-
runKind: "projection",
|
|
223
|
-
run: {
|
|
224
|
-
runId: failed.id,
|
|
225
|
-
projectionId: failed.identity.projectionId,
|
|
226
|
-
projectionKind: failed.identity.projectionKind
|
|
227
|
-
},
|
|
228
|
-
failure
|
|
229
|
-
});
|
|
230
|
-
throw error;
|
|
191
|
+
const [job] = await dependencies.queues.projections.enqueue({
|
|
192
|
+
projectId: dependencies.id,
|
|
193
|
+
jobs: [
|
|
194
|
+
{
|
|
195
|
+
id: persisted.run.id,
|
|
196
|
+
type: "projection.run.requested",
|
|
197
|
+
payload: { runId: persisted.run.id },
|
|
198
|
+
...metadata === undefined ? {} : { metadata }
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
});
|
|
202
|
+
if (!job || job.id !== persisted.run.id) {
|
|
203
|
+
throw new ProjectionRunError2(`[Sixb] Queue did not acknowledge Projection run '${persisted.run.id}'.`);
|
|
231
204
|
}
|
|
205
|
+
return {
|
|
206
|
+
projectionId: persisted.run.identity.projectionId,
|
|
207
|
+
runId: persisted.run.id,
|
|
208
|
+
queuedAt: persisted.queuedAt.toISOString(),
|
|
209
|
+
...job?.id ? { jobId: job.id } : {},
|
|
210
|
+
created: persisted.created
|
|
211
|
+
};
|
|
232
212
|
}
|
|
233
213
|
async function assertExistingRun(storage, run, identity) {
|
|
234
|
-
|
|
235
|
-
await
|
|
214
|
+
assertProjectionRunIdentityMatches2(run, identity);
|
|
215
|
+
await assertProjectionRunDurableExecution2({
|
|
236
216
|
executions: storage.executions,
|
|
237
217
|
projectId: run.projectId,
|
|
238
218
|
executionId: run.executionId,
|
|
@@ -249,15 +229,15 @@ async function resolveProducerExecution(storage, projectId, producer) {
|
|
|
249
229
|
if (!producer?.runId)
|
|
250
230
|
return null;
|
|
251
231
|
if (producer.kind === "sync") {
|
|
252
|
-
const
|
|
253
|
-
if (!
|
|
232
|
+
const run = await storage.syncRuns?.getById({ projectId, id: producer.runId });
|
|
233
|
+
if (!run)
|
|
254
234
|
return null;
|
|
255
|
-
assertProducerId(producer,
|
|
235
|
+
assertProducerId(producer, run.syncId);
|
|
256
236
|
return requireProducerExecution({
|
|
257
237
|
executions: storage.executions,
|
|
258
238
|
projectId,
|
|
259
|
-
executionId:
|
|
260
|
-
primitive: { kind: "sync", id:
|
|
239
|
+
executionId: run.executionId,
|
|
240
|
+
primitive: { kind: "sync", id: run.syncId, runId: run.id }
|
|
261
241
|
});
|
|
262
242
|
}
|
|
263
243
|
const run = await storage.pipelineRuns?.getById({ projectId, id: producer.runId });
|
|
@@ -281,17 +261,17 @@ async function requireProducerExecution(input) {
|
|
|
281
261
|
});
|
|
282
262
|
if (execution)
|
|
283
263
|
return execution;
|
|
284
|
-
throw new
|
|
264
|
+
throw new ProjectionValidationError2(`[Sixb] Dataset producer run '${input.primitive.runId}' references an invalid execution.`);
|
|
285
265
|
}
|
|
286
266
|
function assertProducerId(producer, runOwnerId) {
|
|
287
267
|
if (producer.id === undefined || producer.id === runOwnerId)
|
|
288
268
|
return;
|
|
289
|
-
throw new
|
|
269
|
+
throw new ProjectionValidationError2(`[Sixb] Dataset producer '${producer.kind}:${producer.id}' does not match run '${producer.runId}'.`);
|
|
290
270
|
}
|
|
291
271
|
function requireProjectionRunStorage(storage) {
|
|
292
272
|
if (storage.projectionRuns)
|
|
293
273
|
return storage.projectionRuns;
|
|
294
|
-
throw new
|
|
274
|
+
throw new ProjectionValidationError2("[Sixb] Projection run storage is not configured.");
|
|
295
275
|
}
|
|
296
276
|
function queueProjectionRun(storage, input) {
|
|
297
277
|
const common = {
|
|
@@ -338,7 +318,7 @@ function telemetryProjectionBatchRowCount(projection) {
|
|
|
338
318
|
const mappedPropertyCount = Object.keys(projection.properties).length;
|
|
339
319
|
if (mappedPropertyCount === 0)
|
|
340
320
|
throw invalidProjectionDefinition(projection.id);
|
|
341
|
-
return Math.max(1, Math.floor(
|
|
321
|
+
return Math.max(1, Math.floor(PROJECTION_TELEMETRY_BATCH_SIZE2 / mappedPropertyCount));
|
|
342
322
|
}
|
|
343
323
|
function requeueProjectionRun(storage, run, queuedAt) {
|
|
344
324
|
const common = {
|
|
@@ -372,7 +352,7 @@ function requeueProjectionRun(storage, run, queuedAt) {
|
|
|
372
352
|
}
|
|
373
353
|
}
|
|
374
354
|
function invalidProjectionDefinition(runId) {
|
|
375
|
-
return new
|
|
355
|
+
return new ProjectionValidationError2(`[Sixb] Projection run '${runId}' has inconsistent definition metadata.`);
|
|
376
356
|
}
|
|
377
357
|
function existingResult(run) {
|
|
378
358
|
return {
|
|
@@ -389,25 +369,13 @@ function assertDispatchInput(input) {
|
|
|
389
369
|
["versionId", input.datasetVersion.versionId]
|
|
390
370
|
]) {
|
|
391
371
|
if (!value.trim())
|
|
392
|
-
throw new
|
|
372
|
+
throw new ProjectionValidationError2(`[Sixb] Projection ${field} is required.`);
|
|
393
373
|
}
|
|
394
374
|
const timestamp = Date.parse(input.datasetVersion.createdAt);
|
|
395
375
|
if (!Number.isFinite(timestamp) || new Date(timestamp).toISOString() !== input.datasetVersion.createdAt) {
|
|
396
|
-
throw new
|
|
376
|
+
throw new ProjectionValidationError2("[Sixb] Projection dataset version timestamp is invalid.");
|
|
397
377
|
}
|
|
398
378
|
}
|
|
399
|
-
|
|
400
|
-
const enqueueError = createSixbError("queue.enqueue_failed", `[Sixb] Could not enqueue Projection run '${run.id}'.`, {
|
|
401
|
-
cause: error,
|
|
402
|
-
details: {
|
|
403
|
-
projectionId: run.identity.projectionId,
|
|
404
|
-
projectionKind: run.identity.projectionKind,
|
|
405
|
-
runId: run.id,
|
|
406
|
-
phase: "enqueue"
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
return toSixbFailure(enqueueError, { allowedCodes: PROJECTION_RUN_FAILURE_CODES, at });
|
|
410
|
-
}
|
|
411
|
-
export { registerProjectionRegistry, getProjectionRegistry, getProjectionDispatchDescriptors, shareProjectionRegistry, createProjectionRunId, PROJECTION_TELEMETRY_BATCH_SIZE, ProjectionRunDispatcher };
|
|
379
|
+
export { registerProjectionRegistry2, getProjectionRegistry2, getProjectionDispatchDescriptors2, shareProjectionRegistry2, createProjectionRunId2, PROJECTION_TELEMETRY_BATCH_SIZE2, ProjectionRunDispatcher2 };
|
|
412
380
|
|
|
413
|
-
//# debugId=
|
|
381
|
+
//# debugId=62D632045115139564756E2164756E21
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/projections/capability.ts", "../src/projections/run-dispatch.ts", "../src/projections/run-id.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { ProjectionRegistry } from \"./registry\"\nimport type { ProjectionDispatchDescriptor } from \"./types\"\n\nconst projectionRegistryKey: unique symbol = Symbol(\"sixb.projectionRegistry\")\n\ninterface ProjectionRegistryOwner {\n readonly [projectionRegistryKey]?: ProjectionRegistry\n}\n\nexport function registerProjectionRegistry(owner: object, registry: ProjectionRegistry): void {\n const registered = (owner as ProjectionRegistryOwner)[projectionRegistryKey]\n if (registered && registered !== registry) {\n throw new Error(\"[Sixb] Projection registry is already registered for this owner.\")\n }\n Object.defineProperty(owner, projectionRegistryKey, {\n configurable: false,\n enumerable: false,\n value: registry,\n writable: false,\n })\n}\n\nexport function getProjectionRegistry(owner: object): ProjectionRegistry {\n const registry = (owner as ProjectionRegistryOwner)[projectionRegistryKey]\n if (registry) return registry\n throw new Error(\"[Sixb] Projection registry is not registered for this runtime.\")\n}\n\nexport function getProjectionDispatchDescriptors(\n owner: object\n): readonly ProjectionDispatchDescriptor[] {\n return getProjectionRegistry(owner).getDispatchDescriptors()\n}\n\nexport function shareProjectionRegistry(source: object, target: object): void {\n registerProjectionRegistry(target, getProjectionRegistry(source))\n}\n",
|
|
6
|
+
"import { randomUUID } from \"node:crypto\"\nimport type { RunDispatcher } from \"../execution/dispatch\"\nimport { createPrimitiveExecutionRecord } from \"../execution/durable\"\nimport type { DatasetProducer, LakeStorage } from \"../lake-storage\"\nimport type { Queues } from \"../queues\"\nimport type { SixbDefinitions } from \"../runtime/definitions\"\nimport type { ExecutionRecord, ProjectionRunRecord, Storage } from \"../storage\"\nimport { ProjectionRunError } from \"../storage\"\nimport { findPrimitiveRunExecution } from \"../storage/executions/run-link\"\nimport {\n assertProjectionRunDurableExecution,\n assertProjectionRunIdentityMatches,\n} from \"../storage/projection-runs/provider\"\nimport { getProjectionRegistry } from \"./capability\"\nimport { ProjectionValidationError } from \"./errors\"\nimport { createProjectionRunId } from \"./run-id\"\nimport type { ProjectionDefinition } from \"./types\"\n\n/** Target maximum mapped points per telemetry commit; a single-property projection reads 500 rows. */\nexport const PROJECTION_TELEMETRY_BATCH_SIZE = 500\n\nexport interface ProjectionRunDispatchInput {\n readonly projectionId: string\n readonly datasetVersion: {\n readonly datasetId: string\n readonly versionId: string\n readonly createdAt: string\n }\n readonly metadata?: Readonly<Record<string, string>>\n}\n\nexport interface ProjectionRunDispatchResult {\n readonly projectionId: string\n readonly runId: string\n readonly queuedAt: string\n readonly jobId?: string\n readonly created: boolean\n}\n\nexport type ProjectionRunDispatchPort = RunDispatcher<\n ProjectionRunDispatchInput,\n ProjectionRunDispatchResult\n>\n\nexport interface ProjectionRunDispatcherDependencies {\n readonly id: string\n readonly definitions: Pick<SixbDefinitions, \"projections\">\n readonly lakeStorage: Pick<LakeStorage, \"getVersion\">\n readonly storage: Storage\n readonly queues: Pick<Queues, \"projections\">\n}\n\ntype PersistedProjectionRun =\n | { readonly publish: false; readonly run: ProjectionRunRecord }\n | {\n readonly publish: true\n readonly run: ProjectionRunRecord\n readonly queuedAt: Date\n readonly created: boolean\n }\n\n/** Core-owned durable dispatch boundary for immutable dataset-version materialization. */\nexport class ProjectionRunDispatcher implements ProjectionRunDispatchPort {\n constructor(private readonly dependencies: ProjectionRunDispatcherDependencies) {}\n\n async dispatch(input: ProjectionRunDispatchInput): Promise<ProjectionRunDispatchResult> {\n assertDispatchInput(input)\n const registry = getProjectionRegistry(this.dependencies)\n const descriptor = registry.resolveDispatch(input.projectionId)\n if (descriptor.datasetId !== input.datasetVersion.datasetId) {\n throw new ProjectionValidationError(\n `[Sixb] Projection '${input.projectionId}' consumes dataset '${descriptor.datasetId}', not '${input.datasetVersion.datasetId}'.`\n )\n }\n const projection = this.dependencies.definitions.projections.getById(input.projectionId)\n if (!projection) {\n throw new ProjectionValidationError(`[Sixb] Unknown projection '${input.projectionId}'.`)\n }\n const version = await this.dependencies.lakeStorage.getVersion(\n input.datasetVersion.datasetId,\n input.datasetVersion.versionId\n )\n if (!version || version.createdAt.toISOString() !== input.datasetVersion.createdAt) {\n throw new ProjectionValidationError(\n `[Sixb] Dataset '${input.datasetVersion.datasetId}' version '${input.datasetVersion.versionId}' does not match its immutable metadata.`\n )\n }\n if (version.mode === \"schema\") {\n throw new ProjectionValidationError(\n `[Sixb] Projection '${input.projectionId}' cannot materialize a schema-only dataset version.`\n )\n }\n\n const { datasetId: _datasetId, ...semanticIdentity } = descriptor\n const identity = {\n ...semanticIdentity,\n datasetVersion: structuredClone(input.datasetVersion),\n }\n const runId = createProjectionRunId(this.dependencies.id, identity)\n const projectionRuns = requireProjectionRunStorage(this.dependencies.storage)\n const existing = await projectionRuns.getById({ projectId: this.dependencies.id, id: runId })\n let persisted = existing\n ? await reuseProjectionRun(this.dependencies, existing, identity)\n : await persistProjectionRun({\n dependencies: this.dependencies,\n runId,\n identity,\n projection,\n producerExecution: await resolveProducerExecution(\n this.dependencies.storage,\n this.dependencies.id,\n version.producer\n ),\n })\n\n if (!persisted.publish && persisted.run.status === \"queued\") {\n persisted = await reuseProjectionRun(this.dependencies, persisted.run, identity)\n }\n if (!persisted.publish) return existingResult(persisted.run)\n return publishProjectionRun(this.dependencies, input.metadata, persisted)\n }\n}\n\nasync function persistProjectionRun(input: {\n readonly dependencies: ProjectionRunDispatcherDependencies\n readonly runId: string\n readonly identity: ProjectionRunRecord[\"identity\"]\n readonly projection: ProjectionDefinition\n readonly producerExecution: ExecutionRecord | null\n}): Promise<PersistedProjectionRun> {\n const execution = createPrimitiveExecutionRecord({\n id: `exec_${randomUUID()}`,\n primitive: { kind: \"projection\", id: input.identity.projectionId, runId: input.runId },\n origin: {\n type: \"automatic\",\n projectId: input.dependencies.id,\n source: {\n type: \"datasetVersion\",\n datasetId: input.identity.datasetVersion.datasetId,\n versionId: input.identity.datasetVersion.versionId,\n },\n correlationId: input.producerExecution?.correlationId ?? input.runId,\n requesterGroupIds: input.producerExecution?.requesterGroupIds,\n ...(input.producerExecution?.requestedBy === undefined\n ? {}\n : { requestedBy: input.producerExecution.requestedBy }),\n },\n })\n const queuedAt = new Date()\n\n try {\n return await input.dependencies.storage.transaction(\n async (tx): Promise<PersistedProjectionRun> => {\n const projectionRuns = requireProjectionRunStorage(tx)\n const raced = await projectionRuns.getById({\n projectId: input.dependencies.id,\n id: input.runId,\n })\n if (raced) {\n await assertExistingRun(tx, raced, input.identity)\n return { publish: false, run: raced }\n }\n await tx.executions.create(execution)\n const run = await queueProjectionRun(projectionRuns, {\n id: input.runId,\n projectId: input.dependencies.id,\n executionId: execution.id,\n identity: input.identity,\n projection: input.projection,\n queuedAt,\n })\n return { publish: true, run, queuedAt, created: true }\n },\n { isolation: \"serializable\" }\n )\n } catch (error) {\n if (!(error instanceof ProjectionRunError)) throw error\n const raced = await requireProjectionRunStorage(input.dependencies.storage).getById({\n projectId: input.dependencies.id,\n id: input.runId,\n })\n if (!raced) throw error\n await assertExistingRun(input.dependencies.storage, raced, input.identity)\n return { publish: false, run: raced }\n }\n}\n\nasync function reuseProjectionRun(\n dependencies: ProjectionRunDispatcherDependencies,\n existing: ProjectionRunRecord,\n identity: ProjectionRunRecord[\"identity\"]\n): Promise<PersistedProjectionRun> {\n await assertExistingRun(dependencies.storage, existing, identity)\n if (existing.status === \"queued\") {\n return { publish: true, run: existing, queuedAt: existing.queuedAt, created: false }\n }\n if (\n existing.status !== \"failed\" ||\n existing.error?.code !== \"queue.enqueue_failed\" ||\n !existing.error.retryable\n ) {\n return { publish: false, run: existing }\n }\n const queuedAt = new Date()\n const projectionRuns = requireProjectionRunStorage(dependencies.storage)\n try {\n const run = await requeueProjectionRun(projectionRuns, existing, queuedAt)\n return { publish: true, run, queuedAt, created: false }\n } catch (error) {\n if (!(error instanceof ProjectionRunError)) throw error\n const raced = await projectionRuns.getById({ projectId: existing.projectId, id: existing.id })\n if (\n !raced ||\n (raced.status === \"failed\" &&\n raced.error?.code === \"queue.enqueue_failed\" &&\n raced.error.retryable)\n ) {\n throw error\n }\n await assertExistingRun(dependencies.storage, raced, identity)\n return { publish: false, run: raced }\n }\n}\n\nasync function publishProjectionRun(\n dependencies: ProjectionRunDispatcherDependencies,\n metadata: Readonly<Record<string, string>> | undefined,\n persisted: Extract<PersistedProjectionRun, { readonly publish: true }>\n): Promise<ProjectionRunDispatchResult> {\n // Keep the run queued on uncertain publication; the caller retries the same identity.\n const [job] = await dependencies.queues.projections.enqueue({\n projectId: dependencies.id,\n jobs: [\n {\n id: persisted.run.id,\n type: \"projection.run.requested\",\n payload: { runId: persisted.run.id },\n ...(metadata === undefined ? {} : { metadata }),\n },\n ],\n })\n if (!job || job.id !== persisted.run.id) {\n throw new ProjectionRunError(\n `[Sixb] Queue did not acknowledge Projection run '${persisted.run.id}'.`\n )\n }\n return {\n projectionId: persisted.run.identity.projectionId,\n runId: persisted.run.id,\n queuedAt: persisted.queuedAt.toISOString(),\n ...(job?.id ? { jobId: job.id } : {}),\n created: persisted.created,\n }\n}\n\nasync function assertExistingRun(\n storage: Storage,\n run: ProjectionRunRecord,\n identity: ProjectionRunRecord[\"identity\"]\n): Promise<void> {\n assertProjectionRunIdentityMatches(run, identity)\n await assertProjectionRunDurableExecution({\n executions: storage.executions,\n projectId: run.projectId,\n executionId: run.executionId,\n runId: run.id,\n projectionId: run.identity.projectionId,\n datasetId: run.identity.datasetVersion.datasetId,\n datasetVersionId: run.identity.datasetVersion.versionId,\n })\n}\n\nasync function resolveProducerExecution(\n storage: Storage,\n projectId: string,\n producer: DatasetProducer | undefined\n): Promise<ExecutionRecord | null> {\n if (producer?.kind === \"ingest\") {\n return producer.id ? storage.executions.getById({ projectId, id: producer.id }) : null\n }\n if (!producer?.runId) return null\n if (producer.kind === \"sync\") {\n const run = await storage.syncRuns?.getById({ projectId, id: producer.runId })\n if (!run) return null\n assertProducerId(producer, run.syncId)\n return requireProducerExecution({\n executions: storage.executions,\n projectId,\n executionId: run.executionId,\n primitive: { kind: \"sync\", id: run.syncId, runId: run.id },\n })\n }\n\n const run = await storage.pipelineRuns?.getById({ projectId, id: producer.runId })\n if (!run) return null\n assertProducerId(producer, run.pipelineId)\n return requireProducerExecution({\n executions: storage.executions,\n projectId,\n executionId: run.executionId,\n primitive: { kind: \"pipeline\", id: run.pipelineId, runId: run.id },\n })\n}\n\nasync function requireProducerExecution(input: {\n readonly executions: Storage[\"executions\"]\n readonly projectId: string\n readonly executionId: string\n readonly primitive:\n | { readonly kind: \"sync\"; readonly id: string; readonly runId: string }\n | { readonly kind: \"pipeline\"; readonly id: string; readonly runId: string }\n}): Promise<ExecutionRecord> {\n const execution = await findPrimitiveRunExecution({\n executions: input.executions,\n projectId: input.projectId,\n executionId: input.executionId,\n primitive: input.primitive,\n sourceTypes: [\"execution\", \"schedule\", \"event\"],\n })\n if (execution) return execution\n throw new ProjectionValidationError(\n `[Sixb] Dataset producer run '${input.primitive.runId}' references an invalid execution.`\n )\n}\n\nfunction assertProducerId(producer: DatasetProducer, runOwnerId: string): void {\n if (producer.id === undefined || producer.id === runOwnerId) return\n throw new ProjectionValidationError(\n `[Sixb] Dataset producer '${producer.kind}:${producer.id}' does not match run '${producer.runId}'.`\n )\n}\n\nfunction requireProjectionRunStorage(storage: Storage): NonNullable<Storage[\"projectionRuns\"]> {\n if (storage.projectionRuns) return storage.projectionRuns\n throw new ProjectionValidationError(\"[Sixb] Projection run storage is not configured.\")\n}\n\nfunction queueProjectionRun(\n storage: NonNullable<Storage[\"projectionRuns\"]>,\n input: {\n readonly id: string\n readonly projectId: string\n readonly executionId: string\n readonly identity: ProjectionRunRecord[\"identity\"]\n readonly projection: ProjectionDefinition\n readonly queuedAt: Date\n }\n): Promise<ProjectionRunRecord> {\n const common = {\n id: input.id,\n projectId: input.projectId,\n executionId: input.executionId,\n queuedAt: input.queuedAt,\n }\n switch (input.projection._tag) {\n case \"ObjectProjectionDefinition\":\n if (input.identity.projectionKind !== \"object\") {\n throw invalidProjectionDefinition(input.id)\n }\n return storage.queue({\n ...common,\n identity: input.identity,\n target: { objectTypeId: input.projection.objectTypeId },\n })\n case \"LinkProjectionDefinition\":\n if (input.identity.projectionKind !== \"link\") {\n throw invalidProjectionDefinition(input.id)\n }\n return storage.queue({\n ...common,\n identity: input.identity,\n target: {\n sourceObjectTypeId: input.projection.sourceObjectTypeId,\n targetObjectTypeId: input.projection.targetObjectTypeId,\n },\n })\n case \"TelemetryProjectionDefinition\":\n if (input.identity.projectionKind !== \"telemetry\") {\n throw invalidProjectionDefinition(input.id)\n }\n return storage.queue({\n ...common,\n identity: input.identity,\n target: { objectTypeId: input.projection.objectTypeId },\n fixedBatchSize: telemetryProjectionBatchRowCount(input.projection),\n })\n }\n}\n\nfunction telemetryProjectionBatchRowCount(\n projection: Extract<ProjectionDefinition, { readonly _tag: \"TelemetryProjectionDefinition\" }>\n): number {\n const mappedPropertyCount = Object.keys(projection.properties).length\n if (mappedPropertyCount === 0) throw invalidProjectionDefinition(projection.id)\n return Math.max(1, Math.floor(PROJECTION_TELEMETRY_BATCH_SIZE / mappedPropertyCount))\n}\n\nfunction requeueProjectionRun(\n storage: NonNullable<Storage[\"projectionRuns\"]>,\n run: ProjectionRunRecord,\n queuedAt: Date\n): Promise<ProjectionRunRecord> {\n const common = {\n id: run.id,\n projectId: run.projectId,\n executionId: run.executionId,\n queuedAt,\n }\n switch (run.identity.projectionKind) {\n case \"object\": {\n if (!(\"objectTypeId\" in run.target)) throw invalidProjectionDefinition(run.id)\n return storage.queue({ ...common, identity: run.identity, target: run.target })\n }\n case \"link\": {\n if (!(\"sourceObjectTypeId\" in run.target)) throw invalidProjectionDefinition(run.id)\n return storage.queue({ ...common, identity: run.identity, target: run.target })\n }\n case \"telemetry\": {\n if (!(\"objectTypeId\" in run.target) || !run.telemetryCheckpoint) {\n throw invalidProjectionDefinition(run.id)\n }\n return storage.queue({\n ...common,\n identity: run.identity,\n target: run.target,\n fixedBatchSize: run.telemetryCheckpoint.fixedBatchSize,\n })\n }\n }\n}\n\nfunction invalidProjectionDefinition(runId: string): ProjectionValidationError {\n return new ProjectionValidationError(\n `[Sixb] Projection run '${runId}' has inconsistent definition metadata.`\n )\n}\n\nfunction existingResult(run: ProjectionRunRecord): ProjectionRunDispatchResult {\n return {\n projectionId: run.identity.projectionId,\n runId: run.id,\n queuedAt: run.queuedAt.toISOString(),\n created: false,\n }\n}\n\nfunction assertDispatchInput(input: ProjectionRunDispatchInput): void {\n for (const [field, value] of [\n [\"projectionId\", input.projectionId],\n [\"datasetId\", input.datasetVersion.datasetId],\n [\"versionId\", input.datasetVersion.versionId],\n ] as const) {\n if (!value.trim())\n throw new ProjectionValidationError(`[Sixb] Projection ${field} is required.`)\n }\n const timestamp = Date.parse(input.datasetVersion.createdAt)\n if (\n !Number.isFinite(timestamp) ||\n new Date(timestamp).toISOString() !== input.datasetVersion.createdAt\n ) {\n throw new ProjectionValidationError(\"[Sixb] Projection dataset version timestamp is invalid.\")\n }\n}\n",
|
|
7
|
+
"import { sha256Canonical } from \"../materialization/identity\"\nimport type { ProjectionMaterializationIdentity } from \"../materialization/model\"\n\nexport function createProjectionRunId(\n projectId: string,\n identity: ProjectionMaterializationIdentity\n): string {\n return sha256Canonical({\n projectId,\n projectionId: identity.projectionId,\n projectionKind: identity.projectionKind,\n protocol: identity.protocol,\n datasetId: identity.datasetVersion.datasetId,\n versionId: identity.datasetVersion.versionId,\n createdAt: identity.datasetVersion.createdAt,\n ontologyRevision: identity.ontologyRevision,\n projectionRevision: identity.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