@sixb/core 0.1.8 → 0.1.9
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 +192 -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 +79 -88
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/broker/index.js +8 -10
- package/dist/broker/index.js.map +1 -1
- package/dist/{chunk-k34z5rvh.js → chunk-0rdrecsb.js} +18 -18
- package/dist/{chunk-k34z5rvh.js.map → chunk-0rdrecsb.js.map} +2 -2
- package/dist/{chunk-q0k9nc5a.js → chunk-0w35wavj.js} +98 -98
- package/dist/{chunk-q0k9nc5a.js.map → chunk-0w35wavj.js.map} +2 -2
- 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-aa2pen2v.js → chunk-1enhpacz.js} +188 -175
- package/dist/{chunk-aa2pen2v.js.map → chunk-1enhpacz.js.map} +2 -2
- package/dist/{chunk-5gd7tpv6.js → chunk-2c4j899j.js} +4 -4
- package/dist/{chunk-5gd7tpv6.js.map → chunk-2c4j899j.js.map} +2 -2
- 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-8m5ejdpn.js → chunk-3f7veca0.js} +4 -4
- package/dist/{chunk-8m5ejdpn.js.map → chunk-3f7veca0.js.map} +2 -2
- package/dist/chunk-3frsnm7x.js +32 -0
- package/dist/chunk-3frsnm7x.js.map +11 -0
- package/dist/{chunk-n2w475r0.js → chunk-3tgwrcyh.js} +81 -81
- package/dist/{chunk-n2w475r0.js.map → chunk-3tgwrcyh.js.map} +2 -2
- package/dist/{chunk-mwsxn98e.js → chunk-52hbv0ak.js} +170 -170
- package/dist/{chunk-mwsxn98e.js.map → chunk-52hbv0ak.js.map} +4 -4
- 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-rte5sm3z.js → chunk-5hz0fnca.js} +23 -23
- package/dist/{chunk-rte5sm3z.js.map → chunk-5hz0fnca.js.map} +2 -2
- 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-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-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-f26bck4t.js → chunk-an5tt9y0.js} +353 -353
- package/dist/{chunk-f26bck4t.js.map → chunk-an5tt9y0.js.map} +2 -2
- 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-ka3a2ft3.js → chunk-b19g04jk.js} +12 -12
- package/dist/{chunk-ka3a2ft3.js.map → chunk-b19g04jk.js.map} +2 -2
- 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-wtf06et8.js → chunk-emyyk7dx.js} +55 -55
- package/dist/{chunk-wtf06et8.js.map → chunk-emyyk7dx.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-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-51fjndv0.js → chunk-gfdh9kqa.js} +4 -4
- package/dist/{chunk-51fjndv0.js.map → chunk-gfdh9kqa.js.map} +2 -2
- package/dist/chunk-h1gfhhbh.js +602 -0
- package/dist/chunk-h1gfhhbh.js.map +18 -0
- package/dist/chunk-h3v76ams.js +32 -0
- package/dist/{chunk-08m3b6w8.js.map → chunk-h3v76ams.js.map} +2 -2
- package/dist/{chunk-xajtptbw.js → chunk-hpr1r6av.js} +1367 -418
- package/dist/chunk-hpr1r6av.js.map +44 -0
- 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-w9tg6yyb.js → chunk-jjy0fhrn.js} +36 -36
- package/dist/{chunk-w9tg6yyb.js.map → chunk-jjy0fhrn.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-ajnan18g.js → chunk-k3cqkkn2.js} +58 -55
- package/dist/chunk-k3cqkkn2.js.map +12 -0
- package/dist/{chunk-s5y30bc9.js → chunk-kxwa347f.js} +51 -49
- package/dist/{chunk-s5y30bc9.js.map → chunk-kxwa347f.js.map} +4 -4
- 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-3z1qec12.js → chunk-m3z3x9v0.js} +107 -64
- package/dist/{chunk-3z1qec12.js.map → chunk-m3z3x9v0.js.map} +3 -3
- package/dist/{chunk-sbzzr4kx.js → chunk-mjbk2djy.js} +1061 -1195
- package/dist/{chunk-sbzzr4kx.js.map → chunk-mjbk2djy.js.map} +9 -15
- 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-rv2hkwwa.js → chunk-ppytyr6w.js} +156 -179
- package/dist/{chunk-rv2hkwwa.js.map → chunk-ppytyr6w.js.map} +3 -5
- 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-mth82m8t.js → chunk-qhcpj9wc.js} +77 -77
- package/dist/{chunk-mth82m8t.js.map → chunk-qhcpj9wc.js.map} +2 -2
- package/dist/{chunk-tpnd31c1.js → chunk-r29fxdhn.js} +12 -12
- package/dist/{chunk-tpnd31c1.js.map → chunk-r29fxdhn.js.map} +2 -2
- 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-3xep5cjx.js → chunk-r4tfx1sf.js} +104 -86
- package/dist/chunk-r4tfx1sf.js.map +15 -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-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-r8jrnexe.js → chunk-v4jbb3rs.js} +4 -4
- package/dist/{chunk-r8jrnexe.js.map → chunk-v4jbb3rs.js.map} +2 -2
- package/dist/{chunk-v1xppd0y.js → chunk-vf691g1r.js} +60 -60
- package/dist/{chunk-v1xppd0y.js.map → chunk-vf691g1r.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-8tsf6dmc.js → chunk-x57ycxq0.js} +204 -204
- package/dist/{chunk-8tsf6dmc.js.map → chunk-x57ycxq0.js.map} +2 -2
- package/dist/{chunk-z4ccwbkz.js → chunk-x9v4cx1d.js} +1 -1
- package/dist/{chunk-gbejpkex.js → chunk-xfbydgzy.js} +26 -26
- package/dist/{chunk-gbejpkex.js.map → chunk-xfbydgzy.js.map} +2 -2
- package/dist/{chunk-gzasd5b6.js → chunk-xyr8kppc.js} +22 -22
- package/dist/{chunk-gzasd5b6.js.map → chunk-xyr8kppc.js.map} +2 -2
- package/dist/{chunk-h5vqbfmd.js → chunk-ypbtykv6.js} +117 -117
- package/dist/{chunk-h5vqbfmd.js.map → chunk-ypbtykv6.js.map} +3 -3
- 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-xhy826cz.js → chunk-zcnq6105.js} +7 -7
- package/dist/{chunk-xhy826cz.js.map → chunk-zcnq6105.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/internal.js +9 -10
- package/dist/connectors/connections/internal.js.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/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/execution/agent.d.ts +3 -3
- package/dist/execution/agent.d.ts.map +1 -1
- package/dist/execution/agent.js +70 -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 +63 -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 +65 -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 +14 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +455 -477
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/index.js +38 -42
- package/dist/lake-storage/index.js.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.js +46 -49
- package/dist/materialization/index.js.map +1 -1
- package/dist/materializer/index.js +137 -145
- package/dist/materializer/index.js.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/projections/internal.js +58 -67
- package/dist/projections/internal.js.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/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/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/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/provider.js +34 -36
- package/dist/storage/connector-connections/provider.js.map +2 -2
- 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 +6 -7
- 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/provider.js +105 -109
- package/dist/storage/ontology/provider.js.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/provider.js +66 -70
- package/dist/storage/projection-runs/provider.js.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 +55 -65
- package/dist/syncs/index.js.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/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.js +911 -799
- package/dist/testing/index.js.map +9 -9
- package/dist/testing/workflow-execution.d.ts +1 -0
- package/dist/testing/workflow-execution.d.ts.map +1 -1
- package/dist/webhooks/internal.js +51 -59
- package/dist/webhooks/internal.js.map +2 -2
- 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 +135 -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 +0 -1
- 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/errors/internal.ts +90 -10
- package/src/errors/redaction.ts +98 -0
- package/src/errors/types.ts +4 -0
- 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 +20 -18
- package/src/logging/index.ts +2 -33
- package/src/logging/internal.ts +43 -0
- 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/projections/run-dispatch.ts +1 -0
- package/src/query.ts +0 -1
- package/src/queues/index.ts +4 -2
- package/src/queues/types.ts +6 -25
- package/src/runtime/create.ts +2 -1
- package/src/runtime/host.ts +2 -1
- 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/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 +3 -29
- package/src/storage/internal.ts +20 -0
- package/src/storage/workflow-runs/in-memory.ts +0 -2
- package/src/storage/workflow-runs/types.ts +0 -3
- 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/execution-storage-contract.ts +59 -1
- package/src/testing/execution.ts +6 -0
- package/src/testing/workflow-execution.ts +4 -0
- package/src/workflows/failure.ts +62 -1
- package/src/workflows/request.ts +0 -9
- package/src/workflows/run-dispatch.ts +0 -3
- 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-7y0f6rf1.js.map +0 -10
- 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-k522z7v6.js.map +0 -10
- 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-xajtptbw.js.map +0 -40
- 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,6 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
snapshotRequesterGroupIds,
|
|
4
|
+
normalizeRequesterGroupIds
|
|
5
|
+
} from "./chunk-9tc8dxmn.js";
|
|
6
|
+
|
|
2
7
|
// src/storage/executions/errors.ts
|
|
3
|
-
class
|
|
8
|
+
class ExecutionStorageError2 extends Error {
|
|
4
9
|
code;
|
|
5
10
|
name = "ExecutionStorageError";
|
|
6
11
|
constructor(code, message, options = {}) {
|
|
@@ -11,10 +16,30 @@ class ExecutionStorageError extends Error {
|
|
|
11
16
|
|
|
12
17
|
// src/storage/executions/validation.ts
|
|
13
18
|
import { isDeepStrictEqual } from "util";
|
|
14
|
-
function
|
|
19
|
+
async function prepareExecutionRecord2(input, lookup) {
|
|
20
|
+
let groups = input.requesterGroupIds;
|
|
21
|
+
if (groups === undefined && input.source.type === "execution") {
|
|
22
|
+
const parent = await lookup.getExecution({
|
|
23
|
+
projectId: input.projectId,
|
|
24
|
+
id: input.source.executionId
|
|
25
|
+
});
|
|
26
|
+
groups = parent?.requesterGroupIds;
|
|
27
|
+
} else if (groups === undefined && input.requestedBy) {
|
|
28
|
+
groups = await snapshotRequesterGroupIds({
|
|
29
|
+
auth: lookup.auth,
|
|
30
|
+
projectId: input.projectId,
|
|
31
|
+
principal: input.requestedBy
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const record = normalizeExecutionRecord2({ ...input, requesterGroupIds: groups ?? [] });
|
|
35
|
+
await validateExecutionRecordReferences2(record, lookup);
|
|
36
|
+
return record;
|
|
37
|
+
}
|
|
38
|
+
function normalizeExecutionRecord2(input, createdAt = new Date) {
|
|
15
39
|
const record = {
|
|
16
40
|
id: input.id,
|
|
17
41
|
projectId: input.projectId,
|
|
42
|
+
requesterGroupIds: normalizeRequesterGroupIds(input.requesterGroupIds ?? []),
|
|
18
43
|
...input.requestedBy === undefined ? {} : { requestedBy: structuredClone(input.requestedBy) },
|
|
19
44
|
executor: structuredClone(input.executor),
|
|
20
45
|
source: structuredClone(input.source),
|
|
@@ -26,7 +51,7 @@ function normalizeExecutionRecord(input, createdAt = new Date) {
|
|
|
26
51
|
assertExecutorAuthority(record);
|
|
27
52
|
return record;
|
|
28
53
|
}
|
|
29
|
-
async function
|
|
54
|
+
async function validateExecutionRecordReferences2(record, lookup) {
|
|
30
55
|
await validatePrincipal(record.requestedBy, record.projectId, "Requested-by principal", lookup);
|
|
31
56
|
if (record.authorizationRef.type === "principal") {
|
|
32
57
|
await validatePrincipal(record.authorizationRef.principal, record.projectId, "Authority principal", lookup);
|
|
@@ -194,7 +219,7 @@ async function validatePrincipal(principal, projectId, label, lookup) {
|
|
|
194
219
|
return;
|
|
195
220
|
const record = principal.type === "user" ? await lookup.auth.users.getById({ projectId, id: principal.id }) : await lookup.auth.serviceAccounts.getById({ projectId, id: principal.id });
|
|
196
221
|
if (!record) {
|
|
197
|
-
throw new
|
|
222
|
+
throw new ExecutionStorageError2("missing_principal", `[Sixb] ${label} '${principal.id}' does not exist in project '${projectId}'.`);
|
|
198
223
|
}
|
|
199
224
|
}
|
|
200
225
|
async function validateCredential(record, lookup) {
|
|
@@ -207,10 +232,10 @@ async function validateCredential(record, lookup) {
|
|
|
207
232
|
id: credential.id
|
|
208
233
|
});
|
|
209
234
|
if (!session) {
|
|
210
|
-
throw new
|
|
235
|
+
throw new ExecutionStorageError2("missing_credential", `[Sixb] Authority session '${credential.id}' does not exist in project '${record.projectId}'.`);
|
|
211
236
|
}
|
|
212
237
|
if (principal.type !== "user" || session.userId !== principal.id) {
|
|
213
|
-
throw new
|
|
238
|
+
throw new ExecutionStorageError2("invalid_credential", `[Sixb] Authority session '${credential.id}' does not belong to principal '${principal.id}'.`);
|
|
214
239
|
}
|
|
215
240
|
return;
|
|
216
241
|
}
|
|
@@ -219,10 +244,10 @@ async function validateCredential(record, lookup) {
|
|
|
219
244
|
id: credential.id
|
|
220
245
|
});
|
|
221
246
|
if (!token) {
|
|
222
|
-
throw new
|
|
247
|
+
throw new ExecutionStorageError2("missing_credential", `[Sixb] Authority access token '${credential.id}' does not exist in project '${record.projectId}'.`);
|
|
223
248
|
}
|
|
224
249
|
if (token.subjectType !== principal.type || token.subjectId !== principal.id) {
|
|
225
|
-
throw new
|
|
250
|
+
throw new ExecutionStorageError2("invalid_credential", `[Sixb] Authority access token '${credential.id}' does not belong to principal '${principal.id}'.`);
|
|
226
251
|
}
|
|
227
252
|
}
|
|
228
253
|
async function validateDelegation(record, lookup) {
|
|
@@ -231,10 +256,10 @@ async function validateDelegation(record, lookup) {
|
|
|
231
256
|
const { grantId, sessionId } = record.authorizationRef.delegation;
|
|
232
257
|
const session = await lookup.getShareSession({ projectId: record.projectId, id: sessionId });
|
|
233
258
|
if (!session) {
|
|
234
|
-
throw new
|
|
259
|
+
throw new ExecutionStorageError2("missing_credential", `[Sixb] Authority shared session '${sessionId}' does not exist in project '${record.projectId}'.`);
|
|
235
260
|
}
|
|
236
261
|
if (session.grantId !== grantId) {
|
|
237
|
-
throw new
|
|
262
|
+
throw new ExecutionStorageError2("invalid_credential", `[Sixb] Authority shared session '${sessionId}' does not belong to grant '${grantId}'.`);
|
|
238
263
|
}
|
|
239
264
|
}
|
|
240
265
|
async function validateParent(record, lookup) {
|
|
@@ -246,16 +271,19 @@ async function validateParent(record, lookup) {
|
|
|
246
271
|
id: parentExecutionId
|
|
247
272
|
});
|
|
248
273
|
if (!parent) {
|
|
249
|
-
throw new
|
|
274
|
+
throw new ExecutionStorageError2("missing_parent_execution", `[Sixb] Parent execution '${parentExecutionId}' does not exist in project '${record.projectId}'.`);
|
|
250
275
|
}
|
|
251
276
|
if (parent.correlationId !== record.correlationId) {
|
|
252
|
-
throw new
|
|
277
|
+
throw new ExecutionStorageError2("invalid_parent_execution", `[Sixb] Child execution '${record.id}' must preserve its parent correlation id.`);
|
|
253
278
|
}
|
|
254
279
|
if (!principalsEqual(parent.requestedBy, record.requestedBy)) {
|
|
255
|
-
throw new
|
|
280
|
+
throw new ExecutionStorageError2("invalid_parent_execution", `[Sixb] Child execution '${record.id}' must preserve its parent requested-by principal.`);
|
|
281
|
+
}
|
|
282
|
+
if (!isDeepStrictEqual(parent.requesterGroupIds, record.requesterGroupIds)) {
|
|
283
|
+
throw new ExecutionStorageError2("invalid_parent_execution", `[Sixb] Child execution '${record.id}' must preserve its parent requester-group snapshot.`);
|
|
256
284
|
}
|
|
257
285
|
if (record.executor.type === "agent" && isInheritedAgentAuthority(record.authorizationRef) && !isDeepStrictEqual(parent.authorizationRef, record.authorizationRef)) {
|
|
258
|
-
throw new
|
|
286
|
+
throw new ExecutionStorageError2("invalid_parent_execution", `[Sixb] Child Agent execution '${record.id}' must inherit its parent's authorization reference.`);
|
|
259
287
|
}
|
|
260
288
|
}
|
|
261
289
|
function isInheritedAgentAuthority(ref) {
|
|
@@ -295,7 +323,7 @@ function kernelOperationsEqual(left, right) {
|
|
|
295
323
|
return left.type === right.type && left.recoveryId === right.recoveryId;
|
|
296
324
|
}
|
|
297
325
|
function invalid(message) {
|
|
298
|
-
throw new
|
|
326
|
+
throw new ExecutionStorageError2("invalid_input", `[Sixb] ${message}`);
|
|
299
327
|
}
|
|
300
328
|
var TRUSTED_PRIMITIVE_KINDS = new Set([
|
|
301
329
|
"action",
|
|
@@ -307,6 +335,6 @@ var TRUSTED_PRIMITIVE_KINDS = new Set([
|
|
|
307
335
|
"workflow"
|
|
308
336
|
]);
|
|
309
337
|
|
|
310
|
-
export {
|
|
338
|
+
export { ExecutionStorageError2, prepareExecutionRecord2, normalizeExecutionRecord2, validateExecutionRecordReferences2, cloneExecutionRecord };
|
|
311
339
|
|
|
312
|
-
//# debugId=
|
|
340
|
+
//# debugId=78FF364F2E082FE564756E2164756E21
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/storage/executions/errors.ts", "../src/storage/executions/validation.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"export type ExecutionStorageErrorCode =\n | \"duplicate_execution\"\n | \"invalid_credential\"\n | \"invalid_input\"\n | \"invalid_parent_execution\"\n | \"missing_credential\"\n | \"missing_parent_execution\"\n | \"missing_principal\"\n\n/** Stable error raised when an execution record would violate ledger invariants. */\nexport class ExecutionStorageError extends Error {\n readonly name = \"ExecutionStorageError\"\n\n constructor(\n readonly code: ExecutionStorageErrorCode,\n message: string,\n options: ErrorOptions = {}\n ) {\n super(message, options)\n }\n}\n",
|
|
6
|
+
"import { isDeepStrictEqual } from \"node:util\"\nimport { normalizeRequesterGroupIds, snapshotRequesterGroupIds } from \"../../auth/attribution\"\nimport type {\n AuthorizablePrincipal,\n AuthorizationRef,\n KernelOperation,\n} from \"../../execution/types\"\nimport type { AuthStorage } from \"../auth\"\nimport { ExecutionStorageError } from \"./errors\"\nimport type {\n CreateExecutionInput,\n DurableExecutionExecutor,\n DurableExecutionSource,\n ExecutionRecord,\n} from \"./types\"\n\nexport interface ExecutionValidationLookup {\n readonly auth: AuthStorage\n getExecution(params: {\n readonly projectId: string\n readonly id: string\n }): Promise<ExecutionRecord | null>\n getShareSession(params: {\n readonly projectId: string\n readonly id: string\n }): Promise<{ readonly grantId: string } | null>\n}\n\n/** Capture accounting attribution at the same storage boundary that admits the execution. */\nexport async function prepareExecutionRecord(\n input: CreateExecutionInput,\n lookup: ExecutionValidationLookup\n): Promise<ExecutionRecord> {\n let groups = input.requesterGroupIds\n if (groups === undefined && input.source.type === \"execution\") {\n const parent = await lookup.getExecution({\n projectId: input.projectId,\n id: input.source.executionId,\n })\n groups = parent?.requesterGroupIds\n } else if (groups === undefined && input.requestedBy) {\n groups = await snapshotRequesterGroupIds({\n auth: lookup.auth,\n projectId: input.projectId,\n principal: input.requestedBy,\n })\n }\n const record = normalizeExecutionRecord({ ...input, requesterGroupIds: groups ?? [] })\n await validateExecutionRecordReferences(record, lookup)\n return record\n}\n\nexport function normalizeExecutionRecord(\n input: CreateExecutionInput,\n createdAt: Date = new Date()\n): ExecutionRecord {\n const record: ExecutionRecord = {\n id: input.id,\n projectId: input.projectId,\n requesterGroupIds: normalizeRequesterGroupIds(input.requesterGroupIds ?? []),\n ...(input.requestedBy === undefined ? {} : { requestedBy: structuredClone(input.requestedBy) }),\n executor: structuredClone(input.executor),\n source: structuredClone(input.source),\n correlationId: input.correlationId,\n authorizationRef: structuredClone(input.authorizationRef),\n createdAt: new Date(createdAt),\n }\n\n assertRecordShape(record)\n assertExecutorAuthority(record)\n return record\n}\n\nexport async function validateExecutionRecordReferences(\n record: ExecutionRecord,\n lookup: ExecutionValidationLookup\n): Promise<void> {\n await validatePrincipal(record.requestedBy, record.projectId, \"Requested-by principal\", lookup)\n\n if (record.authorizationRef.type === \"principal\") {\n await validatePrincipal(\n record.authorizationRef.principal,\n record.projectId,\n \"Authority principal\",\n lookup\n )\n await validateCredential(record, lookup)\n }\n if (record.authorizationRef.type === \"delegated\") {\n await validateDelegation(record, lookup)\n }\n\n await validateParent(record, lookup)\n}\n\nexport function cloneExecutionRecord(record: ExecutionRecord): ExecutionRecord {\n return structuredClone(record)\n}\n\nfunction assertRecordShape(record: ExecutionRecord): void {\n assertNonBlank(record.id, \"Execution id\")\n assertNonBlank(record.projectId, \"Execution project id\")\n assertNonBlank(record.correlationId, \"Execution correlation id\")\n assertValidDate(record.createdAt, \"Execution createdAt\")\n\n if (record.requestedBy) {\n assertPrincipal(record.requestedBy, \"Requested-by principal\")\n }\n\n assertExecutor(record.executor)\n assertSource(record.source)\n assertAuthorizationRef(record.authorizationRef)\n}\n\nfunction assertExecutor(executor: DurableExecutionExecutor): void {\n switch (executor.type) {\n case \"request\":\n assertNonBlank(executor.requestId, \"Executor request id\")\n return\n case \"primitive\":\n assertTrustedPrimitiveKind(executor.kind, \"Executor primitive kind\")\n assertNonBlank(executor.runId, \"Executor primitive run id\")\n return\n case \"agent\":\n assertNonBlank(executor.runId, \"Executor agent run id\")\n return\n case \"kernel\":\n assertKernelOperation(executor.operation, \"Executor kernel operation\")\n return\n default:\n invalid(`Unknown execution executor type '${String((executor as { type?: unknown }).type)}'.`)\n }\n}\n\nfunction assertSource(source: DurableExecutionSource): void {\n switch (source.type) {\n case \"http\":\n assertNonBlank(source.requestId, \"Execution source request id\")\n return\n case \"webhook\":\n assertNonBlank(source.deliveryId, \"Execution source delivery id\")\n return\n case \"schedule\":\n case \"event\":\n assertNonBlank(source.eventId, \"Execution source event id\")\n return\n case \"datasetVersion\":\n assertNonBlank(source.datasetId, \"Execution source dataset id\")\n assertNonBlank(source.versionId, \"Execution source dataset version id\")\n return\n case \"execution\":\n assertNonBlank(source.executionId, \"Execution source execution id\")\n return\n default:\n invalid(\n `Execution source type '${String((source as { type?: unknown }).type)}' is not durable.`\n )\n }\n}\n\nfunction assertAuthorizationRef(ref: AuthorizationRef): void {\n switch (ref.type) {\n case \"principal\":\n assertPrincipal(ref.principal, \"Authority principal\")\n if (ref.credential) {\n if (ref.credential.type !== \"session\" && ref.credential.type !== \"accessToken\") {\n invalid(\n `Unknown authority credential type '${String(\n (ref.credential as { type?: unknown }).type\n )}'.`\n )\n }\n assertNonBlank(ref.credential.id, \"Authority credential id\")\n }\n return\n case \"trustedPrimitive\":\n assertTrustedPrimitiveKind(ref.primitive.kind, \"Authority primitive kind\")\n assertNonBlank(ref.primitive.id, \"Authority primitive id\")\n assertNonBlank(ref.primitive.runId, \"Authority primitive run id\")\n return\n case \"delegated\":\n if (ref.delegation.kind !== \"share\") {\n invalid(\n `Unknown authority delegation kind '${String(\n (ref.delegation as { kind?: unknown }).kind\n )}'.`\n )\n }\n assertNonBlank(ref.delegation.grantId, \"Authority delegation grant id\")\n assertNonBlank(ref.delegation.sessionId, \"Authority delegation session id\")\n return\n case \"kernel\":\n assertKernelOperation(ref.operation, \"Authority kernel operation\")\n return\n case \"disabled\":\n return\n default:\n invalid(`Unknown authorization reference type '${String((ref as { type?: unknown }).type)}'.`)\n }\n}\n\nfunction assertExecutorAuthority(record: ExecutionRecord): void {\n const { executor, authorizationRef, requestedBy, source } = record\n\n switch (executor.type) {\n case \"request\": {\n if (source.type !== \"http\" || source.requestId !== executor.requestId) {\n invalid(\"Request executions require a matching HTTP source request id.\")\n }\n if (authorizationRef.type === \"principal\") {\n if (!principalsEqual(requestedBy, authorizationRef.principal)) {\n invalid(\"Request authority must match its requested-by principal.\")\n }\n return\n }\n if (authorizationRef.type === \"disabled\") {\n if (requestedBy !== undefined) {\n invalid(\"Auth-disabled request executions cannot have a requested-by principal.\")\n }\n return\n }\n if (authorizationRef.type === \"delegated\") {\n if (requestedBy !== undefined) {\n invalid(\"Delegated request executions cannot have a requested-by principal.\")\n }\n return\n }\n invalid(\"Request executions require principal, delegated, or explicitly disabled authority.\")\n break\n }\n case \"primitive\": {\n if (authorizationRef.type !== \"trustedPrimitive\") {\n invalid(\"Primitive executions require trusted primitive authority.\")\n }\n if (\n authorizationRef.primitive.kind !== executor.kind ||\n authorizationRef.primitive.runId !== executor.runId\n ) {\n invalid(\"Trusted primitive authority must match the executor kind and run id.\")\n }\n return\n }\n case \"agent\": {\n if (source.type !== \"execution\") {\n invalid(\"Agent executions require a parent execution source.\")\n }\n if (\n authorizationRef.type === \"principal\" &&\n authorizationRef.principal.type === \"serviceAccount\" &&\n authorizationRef.credential === undefined\n ) {\n return\n }\n if (\n authorizationRef.type === \"principal\" &&\n authorizationRef.principal.type === \"user\" &&\n authorizationRef.credential !== undefined\n ) {\n return\n }\n if (authorizationRef.type === \"disabled\") return\n invalid(\n \"Agent executions require managed service-account, credentialed user, or explicitly disabled authority.\"\n )\n break\n }\n case \"kernel\": {\n if (\n authorizationRef.type !== \"kernel\" ||\n !kernelOperationsEqual(authorizationRef.operation, executor.operation)\n ) {\n invalid(\"Kernel authority must match the executor operation.\")\n }\n if (requestedBy !== undefined) {\n invalid(\"Kernel executions cannot have a requested-by principal.\")\n }\n return\n }\n }\n}\n\nasync function validatePrincipal(\n principal: AuthorizablePrincipal | undefined,\n projectId: string,\n label: string,\n lookup: ExecutionValidationLookup\n): Promise<void> {\n if (!principal) return\n\n const record =\n principal.type === \"user\"\n ? await lookup.auth.users.getById({ projectId, id: principal.id })\n : await lookup.auth.serviceAccounts.getById({ projectId, id: principal.id })\n if (!record) {\n throw new ExecutionStorageError(\n \"missing_principal\",\n `[Sixb] ${label} '${principal.id}' does not exist in project '${projectId}'.`\n )\n }\n}\n\nasync function validateCredential(\n record: ExecutionRecord,\n lookup: ExecutionValidationLookup\n): Promise<void> {\n if (record.authorizationRef.type !== \"principal\" || !record.authorizationRef.credential) return\n\n const { principal, credential } = record.authorizationRef\n if (credential.type === \"session\") {\n const session = await lookup.auth.sessions.getById({\n projectId: record.projectId,\n id: credential.id,\n })\n if (!session) {\n throw new ExecutionStorageError(\n \"missing_credential\",\n `[Sixb] Authority session '${credential.id}' does not exist in project '${record.projectId}'.`\n )\n }\n if (principal.type !== \"user\" || session.userId !== principal.id) {\n throw new ExecutionStorageError(\n \"invalid_credential\",\n `[Sixb] Authority session '${credential.id}' does not belong to principal '${principal.id}'.`\n )\n }\n return\n }\n\n const token = await lookup.auth.accessTokens.getById({\n projectId: record.projectId,\n id: credential.id,\n })\n if (!token) {\n throw new ExecutionStorageError(\n \"missing_credential\",\n `[Sixb] Authority access token '${credential.id}' does not exist in project '${record.projectId}'.`\n )\n }\n if (token.subjectType !== principal.type || token.subjectId !== principal.id) {\n throw new ExecutionStorageError(\n \"invalid_credential\",\n `[Sixb] Authority access token '${credential.id}' does not belong to principal '${principal.id}'.`\n )\n }\n}\n\nasync function validateDelegation(\n record: ExecutionRecord,\n lookup: ExecutionValidationLookup\n): Promise<void> {\n if (record.authorizationRef.type !== \"delegated\") return\n const { grantId, sessionId } = record.authorizationRef.delegation\n const session = await lookup.getShareSession({ projectId: record.projectId, id: sessionId })\n if (!session) {\n throw new ExecutionStorageError(\n \"missing_credential\",\n `[Sixb] Authority shared session '${sessionId}' does not exist in project '${record.projectId}'.`\n )\n }\n if (session.grantId !== grantId) {\n throw new ExecutionStorageError(\n \"invalid_credential\",\n `[Sixb] Authority shared session '${sessionId}' does not belong to grant '${grantId}'.`\n )\n }\n}\n\nasync function validateParent(\n record: ExecutionRecord,\n lookup: ExecutionValidationLookup\n): Promise<void> {\n if (record.source.type !== \"execution\") return\n const parentExecutionId = record.source.executionId\n\n const parent = await lookup.getExecution({\n projectId: record.projectId,\n id: parentExecutionId,\n })\n if (!parent) {\n throw new ExecutionStorageError(\n \"missing_parent_execution\",\n `[Sixb] Parent execution '${parentExecutionId}' does not exist in project '${record.projectId}'.`\n )\n }\n if (parent.correlationId !== record.correlationId) {\n throw new ExecutionStorageError(\n \"invalid_parent_execution\",\n `[Sixb] Child execution '${record.id}' must preserve its parent correlation id.`\n )\n }\n if (!principalsEqual(parent.requestedBy, record.requestedBy)) {\n throw new ExecutionStorageError(\n \"invalid_parent_execution\",\n `[Sixb] Child execution '${record.id}' must preserve its parent requested-by principal.`\n )\n }\n if (!isDeepStrictEqual(parent.requesterGroupIds, record.requesterGroupIds)) {\n throw new ExecutionStorageError(\n \"invalid_parent_execution\",\n `[Sixb] Child execution '${record.id}' must preserve its parent requester-group snapshot.`\n )\n }\n if (\n record.executor.type === \"agent\" &&\n isInheritedAgentAuthority(record.authorizationRef) &&\n !isDeepStrictEqual(parent.authorizationRef, record.authorizationRef)\n ) {\n throw new ExecutionStorageError(\n \"invalid_parent_execution\",\n `[Sixb] Child Agent execution '${record.id}' must inherit its parent's authorization reference.`\n )\n }\n}\n\nfunction isInheritedAgentAuthority(ref: AuthorizationRef): boolean {\n return (\n ref.type === \"disabled\" ||\n (ref.type === \"principal\" && ref.principal.type === \"user\" && ref.credential !== undefined)\n )\n}\n\nfunction assertPrincipal(principal: AuthorizablePrincipal, label: string): void {\n if (principal.type !== \"user\" && principal.type !== \"serviceAccount\") {\n invalid(`${label} has unsupported type '${String((principal as { type?: unknown }).type)}'.`)\n }\n assertNonBlank(principal.id, `${label} id`)\n}\n\nfunction assertKernelOperation(operation: KernelOperation, label: string): void {\n if (operation.type !== \"ontology.recover\") {\n invalid(`${label} has unsupported type '${String((operation as { type?: unknown }).type)}'.`)\n }\n assertNonBlank(operation.recoveryId, `${label} recovery id`)\n}\n\nfunction assertTrustedPrimitiveKind(value: string, label: string): void {\n if (!TRUSTED_PRIMITIVE_KINDS.has(value)) {\n invalid(`${label} '${value}' is not supported.`)\n }\n}\n\nfunction assertNonBlank(value: string, label: string): void {\n if (typeof value !== \"string\" || !value.trim()) {\n invalid(`${label} must be a non-empty string.`)\n }\n}\n\nfunction assertValidDate(value: Date, label: string): void {\n if (!(value instanceof Date) || !Number.isFinite(value.getTime())) {\n invalid(`${label} must be a valid date.`)\n }\n}\n\nfunction principalsEqual(\n left: AuthorizablePrincipal | undefined,\n right: AuthorizablePrincipal | undefined\n): boolean {\n return left?.type === right?.type && left?.id === right?.id\n}\n\nfunction kernelOperationsEqual(left: KernelOperation, right: KernelOperation): boolean {\n return left.type === right.type && left.recoveryId === right.recoveryId\n}\n\nfunction invalid(message: string): never {\n throw new ExecutionStorageError(\"invalid_input\", `[Sixb] ${message}`)\n}\n\nconst TRUSTED_PRIMITIVE_KINDS = new Set([\n \"action\",\n \"pipeline\",\n \"projection\",\n \"rule\",\n \"sync\",\n \"webhook\",\n \"workflow\",\n])\n"
|
|
7
|
+
],
|
|
8
|
+
"mappings": ";;;;;;;AAUO,MAAM,+BAA8B,MAAM;AAAA,EAIpC;AAAA,EAHF,OAAO;AAAA,EAEhB,WAAW,CACA,MACT,SACA,UAAwB,CAAC,GACzB;AAAA,IACA,MAAM,SAAS,OAAO;AAAA,IAJb;AAAA;AAMb;;;ACpBA;AA6BA,eAAsB,uBAAsB,CAC1C,OACA,QAC0B;AAAA,EAC1B,IAAI,SAAS,MAAM;AAAA,EACnB,IAAI,WAAW,aAAa,MAAM,O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AAGF,SAAS,cAAc,CAAC,OAAe,OAAqB;AAAA,EAC1D,IAAI,OAAO,UAAU,YAAY,CAAC,MAAM,KAAK,GAAG;AAAA,IAC9C,QAAQ,GAAG,mCAAmC;AAAA,EAChD;AAAA;AAGF,SAAS,eAAe,CAAC,OAAa,OAAqB;AAAA,EACzD,IAAI,EAAE,iBAAiB,SAAS,CAAC,OAAO,SAAS,MAAM,QAAQ,CAAC,GAAG;AAAA,IACjE,QAAQ,GAAG,6BAA6B;AAAA,EAC1C;AAAA;AAGF,SAAS,eAAe,CACtB,MACA,OACS;AAAA,EACT,OAAO,MAAM,SAAS,OAAO,QAAQ,MAAM,OAAO,OAAO;AAAA;AAG3D,SAAS,qBAAqB,CAAC,MAAuB,OAAiC;AAAA,EACrF,OAAO,KAAK,SAAS,MAAM,QAAQ,KAAK,eAAe,MAAM;AAAA;AAG/D,SAAS,OAAO,CAAC,SAAwB;AAAA,EACvC,MAAM,IAAI,uBAAsB,iBAAiB,UAAU,SAAS;AAAA;AAGtE,IAAM,0BAA0B,IAAI,IAAI;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;",
|
|
9
|
+
"debugId": "78FF364F2E082FE564756E2164756E21",
|
|
10
|
+
"names": []
|
|
11
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/storage/agents/types.ts
|
|
3
|
-
var
|
|
3
|
+
var AGENT_RUN_FAILURE_CODES2 = [
|
|
4
4
|
"internal.unexpected",
|
|
5
5
|
"runtime.cancelled",
|
|
6
6
|
"agent.execution_failed",
|
|
7
7
|
"ai.usage_limit_exceeded",
|
|
8
8
|
"ai.usage_limit_unavailable"
|
|
9
9
|
];
|
|
10
|
-
var
|
|
10
|
+
var AGENT_RUN_FINISH_REASONS2 = [
|
|
11
11
|
"stop",
|
|
12
12
|
"length",
|
|
13
13
|
"content-filter",
|
|
@@ -17,13 +17,13 @@ var AGENT_RUN_FINISH_REASONS = [
|
|
|
17
17
|
"other",
|
|
18
18
|
"unknown"
|
|
19
19
|
];
|
|
20
|
-
function
|
|
20
|
+
function coerceAgentRunFinishReason2(value) {
|
|
21
21
|
if (value === null || value === undefined) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return AGENT_RUN_FINISH_REASONS2.includes(value) ? value : "unknown";
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var AGENT_RUN_DIAGNOSTIC_CODES2 = [
|
|
27
27
|
"output_file_limit_exceeded",
|
|
28
28
|
"output_file_too_large",
|
|
29
29
|
"output_budget_exhausted",
|
|
@@ -32,6 +32,6 @@ var AGENT_RUN_DIAGNOSTIC_CODES = [
|
|
|
32
32
|
"output_storage_failed"
|
|
33
33
|
];
|
|
34
34
|
|
|
35
|
-
export {
|
|
35
|
+
export { AGENT_RUN_FAILURE_CODES2, AGENT_RUN_FINISH_REASONS2, coerceAgentRunFinishReason2, AGENT_RUN_DIAGNOSTIC_CODES2 };
|
|
36
36
|
|
|
37
|
-
//# debugId=
|
|
37
|
+
//# debugId=305DAAAEB1335EE664756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/storage/agents/types.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { AgentMessage, AgentMessagePart, AgentMessageRole } from \"../../agents/message\"\nimport type { AgentReasoningLevel } from \"../../agents/types\"\nimport type { Principal } from \"../../auth\"\nimport type { FileRef } from \"../../blob-storage\"\nimport type { SixbErrorCode, SixbFailure } from \"../../errors/types\"\nimport type { JsonValue } from \"../../json\"\nimport type { LanguageModelRef } from \"../../models\"\n\n// ── agent_threads — one conversation with an agent ──────────────────────────────────────────────\n\nexport type AgentThreadStatus = \"active\" | \"archived\"\n\nexport interface AgentThreadRecord {\n readonly id: string\n readonly projectId: string\n /** Who owns/opened the thread. Reuses the canonical auth principal (gains `agent` later for free). */\n readonly ownerPrincipal: Principal\n readonly title?: string\n readonly status: AgentThreadStatus\n /** Single-flight anchor: the id of the one run currently allowed to write, or `null` when idle. */\n readonly activeRunId: string | null\n readonly lastMessageAt?: Date\n readonly messageCount: number\n readonly createdAt: Date\n readonly updatedAt: Date\n}\n\nexport interface CreateAgentThreadInput {\n readonly id: string\n readonly projectId: string\n readonly ownerPrincipal: Principal\n readonly title?: string\n readonly status?: AgentThreadStatus\n readonly createdAt?: Date\n readonly updatedAt?: Date\n}\n\nexport interface ListAgentThreadsInput {\n readonly projectId: string\n readonly statuses?: readonly AgentThreadStatus[]\n readonly ownerPrincipal?: Principal\n readonly limit?: number\n readonly offset?: number\n readonly order?: \"asc\" | \"desc\"\n}\n\nexport interface ListAgentThreadsResult {\n readonly threads: readonly AgentThreadRecord[]\n readonly hasMore: boolean\n readonly total: number\n}\n\n// ── agent_runs — one loop execution (the worker job; attribution + fencing) ───────────────────\n\n/** Lifecycle shared by every durable agent execution, conversational or workflow-owned. */\nexport type AgentExecutionStatus = \"queued\" | \"running\" | \"succeeded\" | \"failed\" | \"cancelled\"\n\nexport type AgentRunStatus = AgentExecutionStatus\nexport type AgentRunKind = \"conversation\" | \"subagent\"\n\n/** Error codes an agent execution can persist and expose through its public contract. */\nexport const AGENT_RUN_FAILURE_CODES = [\n \"internal.unexpected\",\n \"runtime.cancelled\",\n \"agent.execution_failed\",\n \"ai.usage_limit_exceeded\",\n \"ai.usage_limit_unavailable\",\n] as const satisfies readonly [SixbErrorCode, ...SixbErrorCode[]]\n\nexport type AgentRunFailureCode = (typeof AGENT_RUN_FAILURE_CODES)[number]\n\n/**\n * Why a run ended — Sixb's provider-independent vocabulary. It includes model-loop reasons plus\n * platform-level endings such as `timeout`, so reads remain typed and exhaustive. `other` and\n * `unknown` preserve terminal state when a provider adds a new reason.\n */\nexport const AGENT_RUN_FINISH_REASONS = [\n \"stop\",\n \"length\",\n \"content-filter\",\n \"tool-calls\",\n \"timeout\",\n \"error\",\n \"other\",\n \"unknown\",\n] as const\n\nexport type AgentRunFinishReason = (typeof AGENT_RUN_FINISH_REASONS)[number]\n\n/**\n * Coerce an external finish-reason string — a DB column or an SDK value — to {@link\n * AgentRunFinishReason}. An unrecognised value becomes `\"unknown\"` rather than being dropped.\n */\nexport function coerceAgentRunFinishReason(\n value: string | null | undefined\n): AgentRunFinishReason | undefined {\n if (value === null || value === undefined) {\n return undefined\n }\n return (AGENT_RUN_FINISH_REASONS as readonly string[]).includes(value)\n ? (value as AgentRunFinishReason)\n : \"unknown\"\n}\n\n/** Stable, user-facing diagnostics emitted by the platform while executing a run. */\nexport const AGENT_RUN_DIAGNOSTIC_CODES = [\n \"output_file_limit_exceeded\",\n \"output_file_too_large\",\n \"output_budget_exhausted\",\n \"output_collection_failed\",\n \"output_file_changed\",\n \"output_storage_failed\",\n] as const\n\n/**\n * Closed on purpose, and the wire is closed with it.\n *\n * Sixb writes these codes and the generated client is what reads them, so an open union would only\n * be honest if the HTTP schema were open too — and that costs the OpenAPI enum, the client's\n * autocompletion, and Atlas's exhaustive `switch`. Sixb owns both ends, so a new code is a minor\n * version bump: cheap here, and a broken `switch` is better than a 500 from `z.enum`.\n */\nexport type AgentRunDiagnosticCode = (typeof AGENT_RUN_DIAGNOSTIC_CODES)[number]\nexport type AgentRunDiagnosticSeverity = \"warning\" | \"error\"\n\nexport interface AgentRunDiagnostic {\n readonly code: AgentRunDiagnosticCode\n readonly severity: AgentRunDiagnosticSeverity\n readonly scope: \"output\"\n /** Relative path inside the run's published output directory, when one file is involved. */\n readonly path?: string\n /** Sanitized, stable copy suitable for display to an end user. */\n readonly message: string\n}\n\n/**\n * Authorization state for the current queue delivery.\n *\n * `queueLeaseExpiresAt` is a persisted projection of `ClaimedQueueJob.leaseExpiresAt`, not an\n * independently managed run lease. It may only be extended from a successful queue lease renewal.\n */\nexport interface AgentRunExecution {\n readonly token: string\n readonly queueLeaseExpiresAt: Date\n}\n\ninterface AgentRunRecordBase {\n readonly id: string\n readonly projectId: string\n readonly executionId: string\n readonly status: AgentRunStatus\n readonly modelId?: string\n /** Why the run ended (our own SDK-independent enum). */\n readonly finishReason?: AgentRunFinishReason\n /** Platform diagnostics are transcript annotations, never agent-authored message content. */\n readonly diagnostics?: readonly AgentRunDiagnostic[]\n /** Portable failure snapshot when the run did not succeed. */\n readonly error?: SixbFailure<AgentRunFailureCode>\n /** Execution attempts: `0` while queued, `1` on first start, incremented on redelivery. */\n readonly attempt: number\n readonly execution?: AgentRunExecution\n readonly createdAt: Date\n readonly startedAt?: Date\n readonly completedAt?: Date\n}\n\nexport interface ConversationAgentRunRecord extends AgentRunRecordBase {\n readonly kind: \"conversation\"\n readonly threadId: string\n readonly triggerMessageId: string\n /** Immutable model selection captured at admission. Absent only on runs predating this field. */\n readonly spec?: ConversationAgentRunSpec\n}\n\n/** Immutable, serialisable model selection for one conversational turn. */\nexport interface ConversationAgentRunSpec {\n readonly model: LanguageModelRef\n readonly reasoning?: AgentReasoningLevel\n}\n\n/** Immutable, serialisable child configuration captured before dispatch. */\nexport interface SubagentRunSpec {\n readonly model: LanguageModelRef\n readonly reasoning?: AgentReasoningLevel\n /** Focused task supplied by the parent Agent. */\n readonly task: string\n /** Project tools available when the child was admitted. Runtime tools are injected separately. */\n readonly toolNames: readonly string[]\n readonly maxSteps: number\n}\n\n/** Durable child output returned to its parent by `wait_agent`. */\nexport interface SubagentRunResult {\n readonly text?: string\n readonly files?: readonly FileRef[]\n}\n\nexport interface SubagentRunRecord extends AgentRunRecordBase {\n readonly kind: \"subagent\"\n readonly parentRunId: string\n /** Stable parent-selected key that makes repeated tool execution idempotent. */\n readonly spawnKey: string\n readonly spec: SubagentRunSpec\n readonly result?: SubagentRunResult\n}\n\nexport type AgentRunRecord = ConversationAgentRunRecord | SubagentRunRecord\n\nexport interface CreateAgentRunInput {\n readonly id: string\n readonly projectId: string\n readonly executionId: string\n readonly threadId: string\n readonly triggerMessageId: string\n readonly spec: ConversationAgentRunSpec\n readonly createdAt?: Date\n}\n\nexport interface CreateSubagentRunInput {\n readonly id: string\n readonly projectId: string\n readonly executionId: string\n readonly parentRunId: string\n /** Current parent delivery token. New children are admitted only while that delivery owns it. */\n readonly parentExecutionToken: string\n readonly spawnKey: string\n readonly spec: SubagentRunSpec\n /** Internal safety bound enforced atomically across worker processes. */\n readonly maxActiveChildren: number\n readonly createdAt?: Date\n}\n\nexport interface StartAgentRunInput {\n readonly id: string\n readonly projectId: string\n readonly modelId?: string\n readonly execution: AgentRunExecution\n readonly startedAt?: Date\n}\n\nexport interface FinishQueuedAgentRunInput {\n readonly id: string\n readonly projectId: string\n readonly status: \"failed\" | \"cancelled\"\n readonly error?: SixbFailure<AgentRunFailureCode>\n readonly completedAt?: Date\n}\n\nexport interface ReclaimAgentRunInput {\n readonly id: string\n readonly projectId: string\n readonly execution: AgentRunExecution\n}\n\nexport interface ConfirmAgentRunExecutionOwnershipInput {\n readonly id: string\n readonly projectId: string\n readonly executionToken: string\n /** Exact expiration returned by the queue claim or its latest successful renewal. */\n readonly queueLeaseExpiresAt: Date\n}\n\nexport type FinishAgentRunInput =\n | {\n readonly id: string\n readonly projectId: string\n readonly executionToken: string\n readonly status: \"succeeded\"\n readonly modelId?: string\n readonly finishReason?: AgentRunFinishReason\n readonly diagnostics?: readonly AgentRunDiagnostic[]\n readonly result?: SubagentRunResult\n readonly completedAt?: Date\n }\n | {\n readonly id: string\n readonly projectId: string\n readonly executionToken: string\n readonly status: \"failed\" | \"cancelled\"\n readonly modelId?: string\n readonly finishReason?: AgentRunFinishReason\n readonly diagnostics?: readonly AgentRunDiagnostic[]\n readonly error?: SixbFailure<AgentRunFailureCode>\n readonly completedAt?: Date\n }\n\nexport interface ListAgentRunsInput {\n readonly projectId: string\n readonly kinds?: readonly AgentRunKind[]\n readonly threadId?: string\n readonly parentRunId?: string\n readonly statuses?: readonly AgentRunStatus[]\n /** Effective start time; runs that never started use `createdAt`. */\n readonly startedAfter?: Date\n /** Effective start time; runs that never started use `createdAt`. */\n readonly startedBefore?: Date\n readonly limit?: number\n readonly offset?: number\n readonly order?: \"asc\" | \"desc\"\n}\n\nexport interface ListAgentRunsResult {\n readonly runs: readonly AgentRunRecord[]\n readonly hasMore: boolean\n readonly total: number\n}\n\n// ── agent_messages — one message (assistant messages inserted only once finalized) ─────────────\n\nexport type { AgentMessageRole }\n\nexport interface AgentMessageRecord {\n readonly id: string\n readonly projectId: string\n readonly threadId: string\n /** The run that produced this message; `null` for user-authored messages. */\n readonly runId: string | null\n readonly role: AgentMessageRole\n /** Principal that authored this persisted message: caller for user messages, agent identity later for assistant messages. */\n readonly authorPrincipal?: Principal\n /** Monotonic per thread, assigned by the store. */\n readonly seq: number\n /** Structured message content — text / reasoning / step boundaries / tool calls. */\n readonly parts: readonly AgentMessagePart[]\n /** Message-level metadata (mirrors `UIMessage.metadata`). */\n readonly metadata?: JsonValue\n /** Versions the `parts` shape so it can be migrated; stamped from `AGENT_MESSAGE_CONTENT_VERSION`. */\n readonly contentVersion: number\n readonly createdAt: Date\n readonly completedAt?: Date\n}\n\n/** Append a message: a {@link AgentMessage} (role + parts + metadata) plus its storage identity. */\nexport interface AppendAgentMessageInput extends AgentMessage {\n readonly id: string\n readonly projectId: string\n readonly threadId: string\n readonly runId: string | null\n readonly authorPrincipal?: Principal\n readonly createdAt?: Date\n readonly completedAt?: Date\n}\n\nexport interface DeleteAgentMessagesByRunInput {\n readonly projectId: string\n readonly threadId: string\n readonly runId: string\n}\n\nexport interface ListAgentMessagesInput {\n readonly projectId: string\n readonly threadId: string\n /** Return only messages whose per-thread sequence is greater than this retained boundary. */\n readonly afterSeq?: number\n readonly roles?: readonly AgentMessageRole[]\n readonly limit?: number\n readonly offset?: number\n readonly order?: \"asc\" | \"desc\"\n}\n\nexport interface ListAgentMessagesResult {\n readonly messages: readonly AgentMessageRecord[]\n readonly hasMore: boolean\n readonly total: number\n}\n\n// ── agent_context_checkpoints — append-only model-context boundaries ──────────────────────────\n\nexport type AgentContextCheckpointReason = \"threshold\" | \"overflow\"\n\n/**\n * A durable summary boundary used only when projecting a thread into model context.\n *\n * Checkpoints never replace or mutate transcript messages. Normal thread reads remain authoritative\n * and complete; the worker reads the latest checkpoint and only the retained message tail.\n */\nexport interface AgentContextCheckpointRecord {\n readonly id: string\n readonly projectId: string\n readonly threadId: string\n readonly createdByRunId: string\n readonly previousCheckpointId?: string\n readonly reason: AgentContextCheckpointReason\n readonly summary: string\n readonly summaryFormatVersion: 1\n readonly summarizedThroughSeq: number\n readonly observedHeadSeq: number\n readonly estimatedInputTokensBefore: number\n readonly estimatedInputTokensAfter: number\n readonly summaryModelId: string\n readonly createdAt: Date\n}\n\nexport interface CreateAgentContextCheckpointInput {\n readonly id: string\n readonly projectId: string\n readonly threadId: string\n readonly createdByRunId: string\n /** Compare-and-swap anchor. `null` means the thread must not have a prior checkpoint. */\n readonly expectedPreviousCheckpointId: string | null\n /** Compare-and-swap anchor for the complete transcript observed by the summarizer. */\n readonly expectedHeadSeq: number\n /** Current delivery token for `createdByRunId`; stale redeliveries must not write. */\n readonly executionToken: string\n readonly reason: AgentContextCheckpointReason\n readonly summary: string\n readonly summaryFormatVersion: 1\n readonly summarizedThroughSeq: number\n readonly observedHeadSeq: number\n readonly estimatedInputTokensBefore: number\n readonly estimatedInputTokensAfter: number\n readonly summaryModelId: string\n readonly createdAt?: Date\n}\n\n// ── Store ───────────────────────────────────────────────────────────────────────────────────────\n\nexport interface AgentThreadStore {\n create(input: CreateAgentThreadInput): Promise<AgentThreadRecord>\n getById(params: { projectId: string; id: string }): Promise<AgentThreadRecord | null>\n list(input: ListAgentThreadsInput): Promise<ListAgentThreadsResult>\n}\n\nexport interface AgentRunStore {\n /** Persist a queued run and atomically claim the thread's single-flight slot. */\n create(input: CreateAgentRunInput): Promise<ConversationAgentRunRecord>\n /** Persist or replay one idempotent child run while atomically enforcing parent fan-out. */\n createSubagent(input: CreateSubagentRunInput): Promise<SubagentRunRecord>\n /** Transition a queued run to running and install the first delivery's execution token. */\n start(input: StartAgentRunInput): Promise<AgentRunRecord>\n /** Finish a queued run before execution and release the thread's single-flight slot. */\n finishQueued(input: FinishQueuedAgentRunInput): Promise<AgentRunRecord>\n /** Rotate the execution token for a redelivered running job (`attempt++`). */\n reclaim(input: ReclaimAgentRunInput): Promise<AgentRunRecord>\n /**\n * Project the queue's latest confirmed ownership expiration onto the current execution.\n * Implementations must fence by token and must never move the expiration backwards.\n */\n confirmExecutionOwnership(input: ConfirmAgentRunExecutionOwnershipInput): Promise<AgentRunRecord>\n /** Finalize a run and release the thread's `activeRunId`. */\n finish(input: FinishAgentRunInput): Promise<AgentRunRecord>\n getById(params: { projectId: string; id: string }): Promise<AgentRunRecord | null>\n getByIds(params: {\n projectId: string\n ids: readonly string[]\n }): Promise<readonly AgentRunRecord[]>\n list(input: ListAgentRunsInput): Promise<ListAgentRunsResult>\n}\n\nexport interface AgentMessageStore {\n /** Insert a message (its `parts` are the canonical content) and bump thread stats. */\n append(input: AppendAgentMessageInput): Promise<AgentMessageRecord>\n /** Delete every message produced by one run and repair the thread's message stats. */\n deleteByRunId(input: DeleteAgentMessagesByRunInput): Promise<number>\n getById(params: { projectId: string; id: string }): Promise<AgentMessageRecord | null>\n list(input: ListAgentMessagesInput): Promise<ListAgentMessagesResult>\n}\n\nexport interface AgentContextCheckpointStore {\n /**\n * Append one checkpoint after atomically validating run ownership and both transcript anchors.\n * Repeating the same payload for the same creating run is idempotent.\n */\n create(input: CreateAgentContextCheckpointInput): Promise<AgentContextCheckpointRecord>\n /** Return checkpoints created by the requested runs, in first-occurrence input order. */\n getByRunIds(input: {\n readonly projectId: string\n readonly runIds: readonly string[]\n }): Promise<readonly AgentContextCheckpointRecord[]>\n getLatest(input: {\n readonly projectId: string\n readonly threadId: string\n }): Promise<AgentContextCheckpointRecord | null>\n}\n\nexport interface AgentStorage {\n readonly threads: AgentThreadStore\n readonly runs: AgentRunStore\n readonly messages: AgentMessageStore\n readonly checkpoints: AgentContextCheckpointStore\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;AA6DO,IAAM,2BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AASO,IAAM,4BAA2B;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAQO,SAAS,2BAA0B,CACxC,OACkC;AAAA,EAClC,IAAI,UAAU,QAAQ,UAAU,WAAW;AAAA,IACzC;AAAA,EACF;AAAA,EACA,OAAQ,0BAA+C,SAAS,KAAK,IAChE,QACD;AAAA;AAIC,IAAM,8BAA6B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
8
|
+
"debugId": "305DAAAEB1335EE664756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
3
|
+
getDatasetSequenceValidationError,
|
|
4
|
+
getDatasetRowValidationError2
|
|
5
|
+
} from "./chunk-860dwwy0.js";
|
|
6
6
|
import {
|
|
7
7
|
isPlainRecord
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-wy0qdqfm.js";
|
|
9
9
|
|
|
10
10
|
// src/lake-storage/errors.ts
|
|
11
|
-
class
|
|
11
|
+
class LakeStorageError2 extends Error {
|
|
12
12
|
name = "LakeStorageError";
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class LakeConcurrencyError2 extends LakeStorageError2 {
|
|
16
16
|
name = "LakeConcurrencyError";
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// src/lake-storage/merge-validation.ts
|
|
20
|
-
function
|
|
20
|
+
function getDatasetPrimaryKeyColumns2(dataset) {
|
|
21
21
|
if (dataset.primaryKey === undefined) {
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
24
|
return typeof dataset.primaryKey === "string" ? [dataset.primaryKey] : [...dataset.primaryKey];
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const columns =
|
|
26
|
+
function encodeDatasetPrimaryKey2(dataset, value) {
|
|
27
|
+
const columns = getDatasetPrimaryKeyColumns2(dataset);
|
|
28
28
|
if (columns === null) {
|
|
29
|
-
throw new
|
|
29
|
+
throw new LakeStorageError2(`[SixbLake] Dataset '${dataset.id}' must define a primaryKey before rows can be keyed.`);
|
|
30
30
|
}
|
|
31
31
|
const values = columns.map((columnName) => {
|
|
32
32
|
const columnValue = value[columnName];
|
|
33
33
|
if (typeof columnValue !== "string") {
|
|
34
|
-
throw new
|
|
34
|
+
throw new LakeStorageError2(`[SixbLake] Dataset '${dataset.id}' primary-key column '${columnName}' must be a string.`);
|
|
35
35
|
}
|
|
36
36
|
return columnValue;
|
|
37
37
|
});
|
|
38
38
|
return JSON.stringify(values);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const primaryKeyColumns =
|
|
40
|
+
function getDatasetMergeChangeValidationError2(change, dataset) {
|
|
41
|
+
const primaryKeyColumns = getDatasetPrimaryKeyColumns2(dataset);
|
|
42
42
|
if (primaryKeyColumns === null) {
|
|
43
43
|
return `Dataset '${dataset.id}' must define a primaryKey before it can be merged.`;
|
|
44
44
|
}
|
|
@@ -50,7 +50,7 @@ function getDatasetMergeChangeValidationError(change, dataset) {
|
|
|
50
50
|
if (shapeError) {
|
|
51
51
|
return shapeError;
|
|
52
52
|
}
|
|
53
|
-
return
|
|
53
|
+
return getDatasetRowValidationError2(change.row, dataset);
|
|
54
54
|
}
|
|
55
55
|
if (change.kind === "delete") {
|
|
56
56
|
const shapeError = getChangeShapeError(change, dataset, "key");
|
|
@@ -64,7 +64,7 @@ function getDatasetMergeChangeValidationError(change, dataset) {
|
|
|
64
64
|
}
|
|
65
65
|
return `Dataset '${dataset.id}' merge change kind must be 'upsert' or 'delete'.`;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function cloneDatasetMergeChange2(change) {
|
|
68
68
|
return change.kind === "upsert" ? { kind: "upsert", row: structuredClone(change.row) } : {
|
|
69
69
|
kind: "delete",
|
|
70
70
|
key: structuredClone(change.key),
|
|
@@ -106,6 +106,6 @@ function getDeleteKeyValidationError(key, dataset, primaryKeyColumns) {
|
|
|
106
106
|
return null;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
export {
|
|
109
|
+
export { LakeStorageError2, LakeConcurrencyError2, getDatasetPrimaryKeyColumns2, encodeDatasetPrimaryKey2, getDatasetMergeChangeValidationError2, cloneDatasetMergeChange2 };
|
|
110
110
|
|
|
111
|
-
//# debugId=
|
|
111
|
+
//# debugId=2A3D5BE02AEF44AF64756E2164756E21
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"/**\n * Error for lake-storage invariants and invalid lake operations.\n */\nexport class LakeStorageError extends Error {\n readonly name: string = \"LakeStorageError\"\n}\n\n/** A known, uncommitted version/transaction conflict; safe to retry staged changes. */\nexport class LakeConcurrencyError extends LakeStorageError {\n override readonly name = \"LakeConcurrencyError\"\n}\n",
|
|
6
6
|
"import type { DatasetDefinition, MergeChange } from \"../datasets\"\nimport { getDatasetRowValidationError } from \"../datasets\"\nimport { getDatasetSequenceValidationError } from \"../datasets/sequence\"\nimport { isPlainRecord } from \"../json\"\nimport { LakeStorageError } from \"./errors\"\nimport type { DatasetRow } from \"./types\"\n\n/** Return a new ordered primary-key column list, or `null` for an unkeyed dataset. */\nexport function getDatasetPrimaryKeyColumns(dataset: DatasetDefinition): readonly string[] | null {\n if (dataset.primaryKey === undefined) {\n return null\n }\n return typeof dataset.primaryKey === \"string\" ? [dataset.primaryKey] : [...dataset.primaryKey]\n}\n\n/** Collision-safe internal identity for a validated row or delete-key object. */\nexport function encodeDatasetPrimaryKey(dataset: DatasetDefinition, value: DatasetRow): string {\n const columns = getDatasetPrimaryKeyColumns(dataset)\n if (columns === null) {\n throw new LakeStorageError(\n `[SixbLake] Dataset '${dataset.id}' must define a primaryKey before rows can be keyed.`\n )\n }\n\n const values = columns.map((columnName) => {\n const columnValue = value[columnName]\n if (typeof columnValue !== \"string\") {\n throw new LakeStorageError(\n `[SixbLake] Dataset '${dataset.id}' primary-key column '${columnName}' must be a string.`\n )\n }\n return columnValue\n })\n return JSON.stringify(values)\n}\n\nexport function getDatasetMergeChangeValidationError(\n change: unknown,\n dataset: DatasetDefinition\n): string | null {\n const primaryKeyColumns = getDatasetPrimaryKeyColumns(dataset)\n if (primaryKeyColumns === null) {\n return `Dataset '${dataset.id}' must define a primaryKey before it can be merged.`\n }\n if (!isPlainRecord(change)) {\n return `Dataset '${dataset.id}' merge changes must be plain objects.`\n }\n\n if (change.kind === \"upsert\") {\n const shapeError = getChangeShapeError(change, dataset, \"row\")\n if (shapeError) {\n return shapeError\n }\n return getDatasetRowValidationError(change.row, dataset)\n }\n\n if (change.kind === \"delete\") {\n const shapeError = getChangeShapeError(change, dataset, \"key\")\n if (shapeError) {\n return shapeError\n }\n const keyError = getDeleteKeyValidationError(change.key, dataset, primaryKeyColumns)\n if (keyError) return keyError\n return dataset.sequenceBy === undefined\n ? null\n : getDatasetSequenceValidationError(dataset, change.sequence)\n }\n\n return `Dataset '${dataset.id}' merge change kind must be 'upsert' or 'delete'.`\n}\n\n/** Clone a validated change before a provider stages it beyond the caller's ownership. */\nexport function cloneDatasetMergeChange(\n change: MergeChange<DatasetRow, DatasetRow>\n): MergeChange<DatasetRow, DatasetRow> {\n return change.kind === \"upsert\"\n ? { kind: \"upsert\", row: structuredClone(change.row) }\n : {\n kind: \"delete\",\n key: structuredClone(change.key),\n ...(change.sequence !== undefined ? { sequence: structuredClone(change.sequence) } : {}),\n }\n}\n\nfunction getChangeShapeError(\n change: Record<string, unknown>,\n dataset: DatasetDefinition,\n payloadField: \"row\" | \"key\"\n): string | null {\n const allowedFields = new Set([\"kind\", payloadField])\n if (payloadField === \"key\" && dataset.sequenceBy !== undefined) allowedFields.add(\"sequence\")\n for (const field of Object.keys(change)) {\n if (!allowedFields.has(field)) {\n return `Dataset '${dataset.id}' ${change.kind as string} change contains unknown field '${field}'.`\n }\n }\n if (!Object.hasOwn(change, payloadField)) {\n return `Dataset '${dataset.id}' ${change.kind as string} change is missing '${payloadField}'.`\n }\n return null\n}\n\nfunction getDeleteKeyValidationError(\n key: unknown,\n dataset: DatasetDefinition,\n primaryKeyColumns: readonly string[]\n): string | null {\n if (!isPlainRecord(key)) {\n return `Dataset '${dataset.id}' delete keys must be plain objects.`\n }\n\n const expectedColumns = new Set(primaryKeyColumns)\n for (const columnName of Object.keys(key)) {\n if (!expectedColumns.has(columnName)) {\n return `Dataset '${dataset.id}' delete key contains unknown column '${columnName}'.`\n }\n }\n for (const columnName of primaryKeyColumns) {\n if (!Object.hasOwn(key, columnName)) {\n return `Dataset '${dataset.id}' delete key is missing primary-key column '${columnName}'.`\n }\n if (typeof key[columnName] !== \"string\") {\n return `Dataset '${dataset.id}' delete key column '${columnName}' must be a string.`\n }\n }\n return null\n}\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": ";;;;;;;;;;AAGO,MAAM,
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": ";;;;;;;;;;AAGO,MAAM,0BAAyB,MAAM;AAAA,EACjC,OAAe;AAC1B;AAAA;AAGO,MAAM,8BAA6B,kBAAiB;AAAA,EACvC,OAAO;AAC3B;;;ACFO,SAAS,4BAA2B,CAAC,SAAsD;AAAA,EAChG,IAAI,QAAQ,eAAe,WAAW;AAAA,IACpC,OAAO;AAAA,EACT;AAAA,EACA,OAAO,OAAO,QAAQ,eAAe,WAAW,CAAC,QAAQ,UAAU,IAAI,CAAC,GAAG,QAAQ,UAAU;AAAA;AAIxF,SAAS,wBAAuB,CAAC,SAA4B,OAA2B;AAAA,EAC7F,MAAM,UAAU,6BAA4B,OAAO;AAAA,EACnD,IAAI,YAAY,MAAM;AAAA,IACpB,MAAM,IAA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ACA,OAAO;AAAA;",
|
|
9
|
+
"debugId": "2A3D5BE02AEF44AF64756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/http/api-routes.ts
|
|
3
|
-
var
|
|
3
|
+
var SIXB_API_ROUTES2 = [
|
|
4
4
|
{
|
|
5
5
|
operationId: "getProjectInfo",
|
|
6
6
|
method: "GET",
|
|
@@ -476,19 +476,19 @@ var SIXB_API_ROUTES = [
|
|
|
476
476
|
agentApi: false
|
|
477
477
|
}
|
|
478
478
|
];
|
|
479
|
-
for (const route of
|
|
479
|
+
for (const route of SIXB_API_ROUTES2) {
|
|
480
480
|
if (route.agentApi && !route.accessToken) {
|
|
481
481
|
throw new Error(`[Sixb] agent API route '${route.method} ${route.path}' must also be an access-token route.`);
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
// src/http/route-pattern.ts
|
|
486
|
-
function
|
|
486
|
+
function pathSegmentsFor2(pathname) {
|
|
487
487
|
return pathname.split("/").filter(Boolean);
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
const pathSegments =
|
|
491
|
-
const patternSegments =
|
|
489
|
+
function matchesPathPattern2(pathname, pattern) {
|
|
490
|
+
const pathSegments = pathSegmentsFor2(pathname);
|
|
491
|
+
const patternSegments = pathSegmentsFor2(pattern);
|
|
492
492
|
if (pathSegments.length !== patternSegments.length) {
|
|
493
493
|
return false;
|
|
494
494
|
}
|
|
@@ -499,13 +499,13 @@ function matchesPathPattern(pathname, pattern) {
|
|
|
499
499
|
return patternSegment === pathSegments[index];
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function normalizeRoutePath2(pathname) {
|
|
503
503
|
if (pathname.length > 1 && pathname.endsWith("/")) {
|
|
504
504
|
return pathname.slice(0, -1);
|
|
505
505
|
}
|
|
506
506
|
return pathname;
|
|
507
507
|
}
|
|
508
508
|
|
|
509
|
-
export {
|
|
509
|
+
export { SIXB_API_ROUTES2, pathSegmentsFor2, matchesPathPattern2, normalizeRoutePath2 };
|
|
510
510
|
|
|
511
|
-
//# debugId=
|
|
511
|
+
//# debugId=F7A146857839ED1764756E2164756E21
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"/**\n * The single source of truth for the Sixb HTTP API surface and its auth capabilities.\n *\n * Two views are derived from this one table:\n * - `AGENT_API_ROUTES` (@sixb/core agent gateway) = the `agentApi` rows, projected to {method, path}.\n * - `ACCESS_TOKEN_ROUTES` (@sixb/server bearer boundary) = the `accessToken` rows, with operationId.\n *\n * Because both views are projections of this table, the agent gateway allow-list is structurally a\n * subset of the bearer boundary — the invariant below enforces `agentApi ⇒ accessToken` at load\n * time. This table lives in @sixb/core (never @sixb/server) because @sixb/server depends on core,\n * not the reverse; the operationId strings are opaque here.\n */\nexport interface SixbApiRoute {\n /** OpenAPI operationId — the server keys its bearer security requirement off this. */\n readonly operationId: string\n readonly method: string\n readonly path: string\n /** The route accepts a bearer access token (enforced by the server access-token boundary). */\n readonly accessToken: boolean\n /** The route is proxied by the agent API gateway (a strict subset of the accessToken routes). */\n readonly agentApi: boolean\n /** The canonical handler may run under an explicitly selected shared session. */\n readonly sharedSession?: boolean\n}\n\nexport const SIXB_API_ROUTES: readonly SixbApiRoute[] = [\n {\n operationId: \"getProjectInfo\",\n method: \"GET\",\n path: \"/api/project\",\n accessToken: true,\n agentApi: true,\n },\n // Token and service-account management is bearer-capable so the CLI can authenticate with a\n // personal access token. It is NOT exposed to agents. The runtime still confines every operation\n // to the caller's own groups, and service-account tokens are rejected (only user principals may\n // manage credentials).\n {\n operationId: \"getAuthAccessManagementOptions\",\n method: \"GET\",\n path: \"/api/auth/access-management-options\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"listAuthAccessTokens\",\n method: \"GET\",\n path: \"/api/auth/access-tokens\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"createAuthPersonalAccessToken\",\n method: \"POST\",\n path: \"/api/auth/access-tokens\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"revokeAuthAccessToken\",\n method: \"POST\",\n path: \"/api/auth/access-tokens/:tokenId/revoke\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"listAuthServiceAccounts\",\n method: \"GET\",\n path: \"/api/auth/service-accounts\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"createAuthServiceAccount\",\n method: \"POST\",\n path: \"/api/auth/service-accounts\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"disableAuthServiceAccount\",\n method: \"POST\",\n path: \"/api/auth/service-accounts/:serviceAccountId/disable\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"listAuthServiceAccountAccessTokens\",\n method: \"GET\",\n path: \"/api/auth/service-accounts/:serviceAccountId/access-tokens\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"createAuthServiceAccountAccessToken\",\n method: \"POST\",\n path: \"/api/auth/service-accounts/:serviceAccountId/access-tokens\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"revokeAuthServiceAccountAccessToken\",\n method: \"POST\",\n path: \"/api/auth/service-accounts/:serviceAccountId/access-tokens/:tokenId/revoke\",\n accessToken: true,\n agentApi: false,\n },\n // Share lifecycle management is bearer-capable for programmatic administration but never\n // agent-proxied. Shared sessions themselves use the canonical object/action routes and land in\n // the request boundary separately.\n {\n operationId: \"issueSharedAccessGrant\",\n method: \"POST\",\n path: \"/api/share-grants\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"listSharedAccessGrants\",\n method: \"GET\",\n path: \"/api/share-grants\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"revokeSharedAccessGrant\",\n method: \"DELETE\",\n path: \"/api/share-grants/:grantId\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"listObjectTypes\",\n method: \"GET\",\n path: \"/api/object-types\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"getObjectType\",\n method: \"GET\",\n path: \"/api/object-types/:objectTypeId\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"listObjects\",\n method: \"GET\",\n path: \"/api/objects\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"queryObjects\",\n method: \"POST\",\n path: \"/api/objects/query\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"queryObjectLinks\",\n method: \"POST\",\n path: \"/api/objects/query/links\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"countObjects\",\n method: \"POST\",\n path: \"/api/objects/query/count\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"existsObjects\",\n method: \"POST\",\n path: \"/api/objects/query/exists\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"facetObjects\",\n method: \"POST\",\n path: \"/api/objects/query/facets\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"getObject\",\n method: \"GET\",\n path: \"/api/objects/:objectTypeId/:objectId\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n // The four write routes. Bearer-capable because their execution facade enforces authorization\n // (`edit:object` / `append:telemetry`), which is exactly the precondition this table requires.\n // NOT agent-proxied: letting an agent turn write objects on its own is a separate decision, and\n // the gateway already hands routes an execution SDK, so flipping `agentApi` later needs no\n // authorization work — only that decision.\n {\n operationId: \"upsertObject\",\n method: \"PUT\",\n path: \"/api/objects/:objectTypeId/:objectId\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"upsertObjectLink\",\n method: \"PUT\",\n path: \"/api/objects/:objectTypeId/:objectId/links/:linkId\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"removeObjectLink\",\n method: \"DELETE\",\n path: \"/api/objects/:objectTypeId/:objectId/links/:linkId\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"appendTelemetry\",\n method: \"POST\",\n path: \"/api/objects/:objectTypeId/:objectId/telemetry/:propertyId\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"getBulkTelemetryHistory\",\n method: \"POST\",\n path: \"/api/telemetry/history\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"getTelemetryHistory\",\n method: \"GET\",\n path: \"/api/objects/:objectTypeId/:objectId/telemetry/:propertyId/history\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"getLatestTelemetry\",\n method: \"GET\",\n path: \"/api/objects/:objectTypeId/:objectId/telemetry/:propertyId/latest\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"getObjectFileContent\",\n method: \"GET\",\n path: \"/api/objects/:objectTypeId/:objectId/files/content\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n // Bearer-capable (CLI/programmatic existence + range probes) but NOT agent-proxied: the agent\n // API gateway only forwards GET/POST, and an agent gains nothing from HEAD over GET (a file's\n // size already travels in its FileRef). Keeping this agentApi:true would throw at gateway\n // registration (\"Unsupported agent API gateway method 'HEAD'\") and stop the server booting.\n operationId: \"headObjectFileContent\",\n method: \"HEAD\",\n path: \"/api/objects/:objectTypeId/:objectId/files/content\",\n accessToken: true,\n agentApi: false,\n sharedSession: true,\n },\n {\n operationId: \"listActions\",\n method: \"GET\",\n path: \"/api/actions\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"getAction\",\n method: \"GET\",\n path: \"/api/actions/:actionId\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"requestAction\",\n method: \"POST\",\n path: \"/api/actions/:actionId\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"uploadFileRaw\",\n method: \"POST\",\n path: \"/api/files\",\n accessToken: true,\n agentApi: true,\n },\n {\n operationId: \"listActionRuns\",\n method: \"GET\",\n path: \"/api/action-runs\",\n accessToken: true,\n agentApi: true,\n },\n {\n operationId: \"getActionRun\",\n method: \"GET\",\n path: \"/api/action-runs/:runId\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"getActionRunFileContent\",\n method: \"GET\",\n path: \"/api/action-runs/:runId/files/content\",\n accessToken: true,\n agentApi: true,\n },\n {\n operationId: \"headActionRunFileContent\",\n method: \"HEAD\",\n path: \"/api/action-runs/:runId/files/content\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"listWorkflows\",\n method: \"GET\",\n path: \"/api/workflows\",\n accessToken: true,\n agentApi: true,\n },\n {\n operationId: \"getWorkflow\",\n method: \"GET\",\n path: \"/api/workflows/:workflowId\",\n accessToken: true,\n agentApi: true,\n },\n {\n operationId: \"requestWorkflowRun\",\n method: \"POST\",\n path: \"/api/workflows/:workflowId/runs\",\n accessToken: true,\n agentApi: true,\n },\n {\n operationId: \"listWorkflowRuns\",\n method: \"GET\",\n path: \"/api/workflow-runs\",\n accessToken: true,\n agentApi: true,\n },\n {\n operationId: \"getWorkflowRun\",\n method: \"GET\",\n path: \"/api/workflow-runs/:runId\",\n accessToken: true,\n agentApi: true,\n },\n {\n operationId: \"cancelWorkflowRun\",\n method: \"POST\",\n path: \"/api/workflow-runs/:runId/cancel\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"getWorkflowAgentNodeExecution\",\n method: \"GET\",\n path: \"/api/workflow-runs/:runId/nodes/:nodeKey/agent-execution\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"getWorkflowRunFileContent\",\n method: \"GET\",\n path: \"/api/workflow-runs/:runId/files/content\",\n accessToken: true,\n agentApi: true,\n },\n {\n operationId: \"headWorkflowRunFileContent\",\n method: \"HEAD\",\n path: \"/api/workflow-runs/:runId/files/content\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"getWorkflowNodeRunFileContent\",\n method: \"GET\",\n path: \"/api/workflow-runs/:runId/nodes/:nodeKey/files/content\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"headWorkflowNodeRunFileContent\",\n method: \"HEAD\",\n path: \"/api/workflow-runs/:runId/nodes/:nodeKey/files/content\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"getAgentMessageFileContent\",\n method: \"GET\",\n path: \"/api/agent-threads/:threadId/messages/:messageId/files/content\",\n accessToken: true,\n agentApi: true,\n },\n {\n operationId: \"headAgentMessageFileContent\",\n method: \"HEAD\",\n path: \"/api/agent-threads/:threadId/messages/:messageId/files/content\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"searchObjects\",\n method: \"GET\",\n path: \"/api/objects/search\",\n accessToken: true,\n agentApi: true,\n sharedSession: true,\n },\n {\n operationId: \"listEvents\",\n method: \"GET\",\n path: \"/api/events\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"listLogs\",\n method: \"GET\",\n path: \"/api/logs\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"getAiAccountingOverview\",\n method: \"GET\",\n path: \"/api/ai/accounting/overview\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"listAiModelCalls\",\n method: \"GET\",\n path: \"/api/ai/model-calls\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"listAiModelCallGroups\",\n method: \"GET\",\n path: \"/api/ai/model-call-groups\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"listAiLimitPolicies\",\n method: \"GET\",\n path: \"/api/ai/limits\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"getAiLimitStatus\",\n method: \"GET\",\n path: \"/api/ai/limits/status\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"getAiLimitSubjectOptions\",\n method: \"GET\",\n path: \"/api/ai/limits/subjects\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"createAiLimitPolicy\",\n method: \"POST\",\n path: \"/api/ai/limits\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"updateAiLimitPolicy\",\n method: \"PUT\",\n path: \"/api/ai/limits/:limitId\",\n accessToken: true,\n agentApi: false,\n },\n {\n operationId: \"deleteAiLimitPolicy\",\n method: \"DELETE\",\n path: \"/api/ai/limits/:limitId\",\n accessToken: true,\n agentApi: false,\n },\n]\n\n// Enforce the subset invariant at module load: a gateway-proxied route must also be a bearer route,\n// or the gateway would expose a surface the access-token boundary does not recognize.\nfor (const route of SIXB_API_ROUTES) {\n if (route.agentApi && !route.accessToken) {\n throw new Error(\n `[Sixb] agent API route '${route.method} ${route.path}' must also be an access-token route.`\n )\n }\n}\n",
|
|
6
6
|
"/**\n * Shared HTTP route-pattern matching. Used by both the agent API gateway allow-list (@sixb/core)\n * and the server's access-token boundary (@sixb/server) so the two never drift.\n */\n\n/** Split a path into its non-empty segments (drops leading/trailing/empty parts). */\nexport function pathSegmentsFor(pathname: string): string[] {\n return pathname.split(\"/\").filter(Boolean)\n}\n\n/**\n * Match a concrete pathname against a route pattern. A `:param` pattern segment matches any single\n * non-empty segment; every other segment must match exactly. Segment counts must be equal.\n */\nexport function matchesPathPattern(pathname: string, pattern: string): boolean {\n const pathSegments = pathSegmentsFor(pathname)\n const patternSegments = pathSegmentsFor(pattern)\n\n if (pathSegments.length !== patternSegments.length) {\n return false\n }\n\n return patternSegments.every((patternSegment, index) => {\n if (patternSegment.startsWith(\":\")) {\n return pathSegments[index] !== \"\"\n }\n return patternSegment === pathSegments[index]\n })\n}\n\n/** Strip a single trailing slash so `/api/foo` and `/api/foo/` compare equal (leaves \"/\" alone). */\nexport function normalizeRoutePath(pathname: string): string {\n if (pathname.length > 1 && pathname.endsWith(\"/\")) {\n return pathname.slice(0, -1)\n }\n return pathname\n}\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": ";;AAyBO,IAAM,
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": ";;AAyBO,IAAM,mBAA2C;AAAA,EACtD;AAAA,IACE,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,aAAa;AAAA,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