@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,78 +1,91 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
resolveRuntimeAuthorizationForProject,
|
|
4
|
+
assertAuthorized2,
|
|
5
|
+
assertCanEdit2,
|
|
6
|
+
assertCanAppendTelemetry2
|
|
7
|
+
} from "./chunk-dz5h08xv.js";
|
|
6
8
|
import {
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
createSixbError2
|
|
10
|
+
} from "./chunk-f4w3yp4f.js";
|
|
9
11
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
normalizeObjectProperties2,
|
|
13
|
+
assertPropertyTokenBelongsToObjectType2,
|
|
14
|
+
assertLinkTokenBelongsToObjectType2,
|
|
15
|
+
assertKnownProperties2,
|
|
16
|
+
validateObjectProperties2,
|
|
17
|
+
assertLinkTargetType2,
|
|
18
|
+
normalizeLinkProperties2,
|
|
19
|
+
validateLinkProperties2,
|
|
20
|
+
assertTelemetryProperty2
|
|
21
|
+
} from "./chunk-ms2tmn1k.js";
|
|
15
22
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} from "./chunk-q0k9nc5a.js";
|
|
23
|
+
RuntimeError2
|
|
24
|
+
} from "./chunk-e0d1rzef.js";
|
|
19
25
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./chunk-
|
|
26
|
+
ObjectNotFoundError2
|
|
27
|
+
} from "./chunk-8vj0rjgs.js";
|
|
22
28
|
import {
|
|
23
|
-
|
|
24
|
-
} from "./chunk-
|
|
29
|
+
objectBatchKey2
|
|
30
|
+
} from "./chunk-mjbk2djy.js";
|
|
25
31
|
import {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} from "./chunk-
|
|
32
|
+
linkRefKey2,
|
|
33
|
+
telemetryPointKey2
|
|
34
|
+
} from "./chunk-c5rkjrgp.js";
|
|
29
35
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} from "./chunk-
|
|
36
|
+
validateObjectQuery2,
|
|
37
|
+
explainObjectQuery2
|
|
38
|
+
} from "./chunk-0w35wavj.js";
|
|
33
39
|
import {
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
assertAuthorizedObjectReaderBinding,
|
|
41
|
+
getAuthorizedOntologyView,
|
|
42
|
+
requestAction3,
|
|
43
|
+
requestActionAndWait2
|
|
44
|
+
} from "./chunk-ypbtykv6.js";
|
|
36
45
|
import {
|
|
37
|
-
|
|
38
|
-
} from "./chunk-
|
|
46
|
+
shareSixbErrorReporter2
|
|
47
|
+
} from "./chunk-7apz6hg4.js";
|
|
39
48
|
import {
|
|
40
|
-
|
|
41
|
-
} from "./chunk-
|
|
49
|
+
normalizeJsonProperties2
|
|
50
|
+
} from "./chunk-an5tt9y0.js";
|
|
42
51
|
import {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
resolveRuntimeAuthorizationForProject
|
|
47
|
-
} from "./chunk-p1x242ad.js";
|
|
52
|
+
getOntologyMutationRuntime2,
|
|
53
|
+
shareOntologyMutationRuntime2
|
|
54
|
+
} from "./chunk-zcnq6105.js";
|
|
48
55
|
import {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
assertLinkTokenBelongsToObjectType,
|
|
52
|
-
assertPropertyTokenBelongsToObjectType,
|
|
53
|
-
assertTelemetryProperty,
|
|
54
|
-
normalizeLinkProperties,
|
|
55
|
-
normalizeObjectProperties,
|
|
56
|
-
validateLinkProperties,
|
|
57
|
-
validateObjectProperties
|
|
58
|
-
} from "./chunk-h0k55pc7.js";
|
|
56
|
+
createObjectQueryBuilder2
|
|
57
|
+
} from "./chunk-rb1xx120.js";
|
|
59
58
|
import {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
} from "./chunk-dktq02ne.js";
|
|
59
|
+
ObjectQueryPlanningError2
|
|
60
|
+
} from "./chunk-5hz0fnca.js";
|
|
63
61
|
import {
|
|
64
|
-
|
|
65
|
-
} from "./chunk-
|
|
62
|
+
MaterializationObjectNotFoundError2
|
|
63
|
+
} from "./chunk-yv79ncbv.js";
|
|
66
64
|
import {
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
OntologyValidationError2,
|
|
66
|
+
OntologyNotFoundError2
|
|
67
|
+
} from "./chunk-cqr3acm1.js";
|
|
69
68
|
import {
|
|
70
|
-
|
|
71
|
-
} from "./chunk-
|
|
69
|
+
stableJsonStringify2
|
|
70
|
+
} from "./chunk-wy0qdqfm.js";
|
|
71
|
+
var __defProp = Object.defineProperty;
|
|
72
|
+
var __returnValue = (v) => v;
|
|
73
|
+
function __exportSetter(name, newValue) {
|
|
74
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
75
|
+
}
|
|
76
|
+
var __export = (target, all) => {
|
|
77
|
+
for (var name in all)
|
|
78
|
+
__defProp(target, name, {
|
|
79
|
+
get: all[name],
|
|
80
|
+
enumerable: true,
|
|
81
|
+
configurable: true,
|
|
82
|
+
set: __exportSetter.bind(all, name)
|
|
83
|
+
});
|
|
84
|
+
};
|
|
72
85
|
|
|
73
86
|
// src/objects/action/request.ts
|
|
74
87
|
async function requestAction2(ctx, params) {
|
|
75
|
-
return
|
|
88
|
+
return requestAction3(ctx, ctx.execution, {
|
|
76
89
|
actionId: params.actionId,
|
|
77
90
|
subject: {
|
|
78
91
|
kind: "object",
|
|
@@ -84,8 +97,8 @@ async function requestAction2(ctx, params) {
|
|
|
84
97
|
signal: params.options?.signal
|
|
85
98
|
});
|
|
86
99
|
}
|
|
87
|
-
async function
|
|
88
|
-
return
|
|
100
|
+
async function requestActionAndWait(ctx, params) {
|
|
101
|
+
return requestActionAndWait2(ctx, ctx.execution, {
|
|
89
102
|
actionId: params.actionId,
|
|
90
103
|
subject: {
|
|
91
104
|
kind: "object",
|
|
@@ -100,14 +113,14 @@ async function requestActionAndWait2(ctx, params) {
|
|
|
100
113
|
});
|
|
101
114
|
}
|
|
102
115
|
// src/objects/errors.ts
|
|
103
|
-
class
|
|
116
|
+
class ObjectError2 extends Error {
|
|
104
117
|
name = "ObjectError";
|
|
105
118
|
}
|
|
106
119
|
|
|
107
120
|
// src/objects/materializer-adapter.ts
|
|
108
121
|
import { randomUUID } from "crypto";
|
|
109
122
|
async function commitRuntimeOperations(ctx, operations) {
|
|
110
|
-
const mutations =
|
|
123
|
+
const mutations = getOntologyMutationRuntime2(ctx);
|
|
111
124
|
const commit = await mutations.commitEdits({
|
|
112
125
|
mode: "atomic",
|
|
113
126
|
source: { kind: "runtime", requestId: randomUUID() },
|
|
@@ -124,7 +137,7 @@ async function commitRuntimeBatch(ctx, groups) {
|
|
|
124
137
|
return { commit: null, outcomes: new Map };
|
|
125
138
|
}
|
|
126
139
|
const operationGroups = groups.filter((group) => group.operations.length > 1).map((group) => group.operations.map((operation) => operation.id));
|
|
127
|
-
const mutations =
|
|
140
|
+
const mutations = getOntologyMutationRuntime2(ctx);
|
|
128
141
|
const commit = await mutations.commitEdits({
|
|
129
142
|
mode: "continue",
|
|
130
143
|
source: { kind: "runtime", requestId: randomUUID() },
|
|
@@ -143,27 +156,27 @@ function runtimeOperationId(index, subOrdinal = 0) {
|
|
|
143
156
|
}
|
|
144
157
|
function normalizeRuntimeObject(input) {
|
|
145
158
|
const { objectType, primaryPropertyId, properties, valueTypesById } = input;
|
|
146
|
-
|
|
147
|
-
|
|
159
|
+
assertKnownProperties2(objectType, properties);
|
|
160
|
+
validateObjectProperties2(objectType, properties, valueTypesById);
|
|
148
161
|
const primaryValue = properties[primaryPropertyId];
|
|
149
162
|
if (primaryValue === undefined || primaryValue === null) {
|
|
150
|
-
throw new
|
|
163
|
+
throw new OntologyValidationError2(`[Sixb] Missing primary property '${primaryPropertyId}' in upsert for '${objectType.id}'`);
|
|
151
164
|
}
|
|
152
|
-
const normalized =
|
|
165
|
+
const normalized = normalizeObjectProperties2(objectType.properties, properties, valueTypesById, objectType.id);
|
|
153
166
|
const { [primaryPropertyId]: _identity, ...managed } = normalized;
|
|
154
167
|
return {
|
|
155
168
|
primaryId: String(primaryValue),
|
|
156
|
-
properties:
|
|
169
|
+
properties: normalizeJsonProperties2(managed, `${objectType.id} properties`)
|
|
157
170
|
};
|
|
158
171
|
}
|
|
159
172
|
function normalizeRuntimeLink(input) {
|
|
160
173
|
const { objectType, linkDefinition, linkId, targetTypeId, properties, valueTypesById } = input;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const normalized =
|
|
174
|
+
assertLinkTargetType2(objectType.id, linkId, linkDefinition, targetTypeId, input.isValidLinkTarget);
|
|
175
|
+
validateLinkProperties2(objectType, linkDefinition, properties, undefined, valueTypesById);
|
|
176
|
+
const normalized = normalizeLinkProperties2(objectType, linkDefinition, properties, valueTypesById);
|
|
164
177
|
if (normalized === undefined)
|
|
165
178
|
return;
|
|
166
|
-
return
|
|
179
|
+
return normalizeJsonProperties2(normalized, `${objectType.id}.${linkId} properties`);
|
|
167
180
|
}
|
|
168
181
|
function objectUpsertOperation(input) {
|
|
169
182
|
return { id: input.id, kind: "object.upsert", ref: input.ref, properties: input.properties };
|
|
@@ -188,13 +201,13 @@ function linkDeleteOperation(input) {
|
|
|
188
201
|
function requireItemOutcomes(commit, index) {
|
|
189
202
|
const outcomes = commit.outcomes.get(index);
|
|
190
203
|
if (!outcomes || outcomes.length === 0) {
|
|
191
|
-
throw new
|
|
204
|
+
throw new ObjectError2(`[Sixb] Materializer returned no outcome for batch item ${index}.`);
|
|
192
205
|
}
|
|
193
206
|
return outcomes;
|
|
194
207
|
}
|
|
195
208
|
function requireEffectiveObject(outcome) {
|
|
196
209
|
if (!outcome.ok || !outcome.object) {
|
|
197
|
-
throw new
|
|
210
|
+
throw new ObjectError2(`[Sixb] Materializer returned no effective object for '${outcome.id}'.`);
|
|
198
211
|
}
|
|
199
212
|
return outcome.object;
|
|
200
213
|
}
|
|
@@ -213,29 +226,29 @@ function toObjectRow(projectId, snapshot) {
|
|
|
213
226
|
function toItemError(error) {
|
|
214
227
|
switch (error.code) {
|
|
215
228
|
case "validation":
|
|
216
|
-
return new
|
|
229
|
+
return new OntologyValidationError2(error.message);
|
|
217
230
|
}
|
|
218
231
|
}
|
|
219
232
|
function requireOutcome(outcomes, id) {
|
|
220
233
|
const outcome = outcomes.get(id);
|
|
221
234
|
if (!outcome) {
|
|
222
|
-
throw new
|
|
235
|
+
throw new ObjectError2(`[Sixb] Materializer returned no outcome for '${id}'.`);
|
|
223
236
|
}
|
|
224
237
|
return outcome;
|
|
225
238
|
}
|
|
226
239
|
|
|
227
240
|
// src/objects/link/authorization.ts
|
|
228
241
|
function assertCanWriteLink(ctx, endpoints) {
|
|
229
|
-
|
|
230
|
-
|
|
242
|
+
assertCanEdit2(ctx, endpoints.sourceTypeId);
|
|
243
|
+
assertAuthorized2(ctx, { kind: "object.view", objectTypeId: endpoints.targetTypeId });
|
|
231
244
|
}
|
|
232
245
|
|
|
233
246
|
// src/objects/link/remove.ts
|
|
234
|
-
async function
|
|
247
|
+
async function removeLink2(ctx, params) {
|
|
235
248
|
const { objectType, linkDefinition, ontology } = ctx;
|
|
236
249
|
const { sourceId, linkId, targetTypeId, targetId } = params;
|
|
237
250
|
assertCanWriteLink(ctx, { sourceTypeId: objectType.id, targetTypeId });
|
|
238
|
-
|
|
251
|
+
assertLinkTargetType2(objectType.id, linkId, linkDefinition, targetTypeId, (expected, actual) => ontology.isValidLinkTarget(expected, actual));
|
|
239
252
|
await commitRuntimeOperations(ctx, [
|
|
240
253
|
linkDeleteOperation({
|
|
241
254
|
id: runtimeOperationId(0),
|
|
@@ -277,18 +290,18 @@ async function loadEndpointExistence(ctx, lookups) {
|
|
|
277
290
|
}
|
|
278
291
|
function requireEndpoints(item, existing) {
|
|
279
292
|
if (!existing.has(endpointKey(item.objectType.id, item.sourceId))) {
|
|
280
|
-
throw new
|
|
293
|
+
throw new ObjectNotFoundError2(item.objectType.id, item.sourceId, "Source object not found");
|
|
281
294
|
}
|
|
282
295
|
if (!existing.has(endpointKey(item.targetTypeId, item.targetId))) {
|
|
283
|
-
throw new
|
|
296
|
+
throw new ObjectNotFoundError2(item.targetTypeId, item.targetId, "Target object not found");
|
|
284
297
|
}
|
|
285
298
|
}
|
|
286
299
|
function endpointKey(objectTypeId, primaryId) {
|
|
287
|
-
return
|
|
300
|
+
return objectBatchKey2(objectTypeId, primaryId);
|
|
288
301
|
}
|
|
289
302
|
|
|
290
303
|
// src/objects/link/upsert.ts
|
|
291
|
-
async function
|
|
304
|
+
async function upsertLink2(ctx, params) {
|
|
292
305
|
const { objectType, linkDefinition, ontology } = ctx;
|
|
293
306
|
const { sourceId, linkId, targetTypeId, targetId, properties } = params;
|
|
294
307
|
assertCanWriteLink(ctx, { sourceTypeId: objectType.id, targetTypeId });
|
|
@@ -341,7 +354,7 @@ async function runRuntimeItemBatch(batch) {
|
|
|
341
354
|
if (claimed.fingerprint !== plan.fingerprint) {
|
|
342
355
|
results[index] = {
|
|
343
356
|
ok: false,
|
|
344
|
-
error: new
|
|
357
|
+
error: new OntologyValidationError2(`[Sixb] Conflicting duplicate ${plan.label} at batch positions ${claimed.index} and ${index}`)
|
|
345
358
|
};
|
|
346
359
|
continue;
|
|
347
360
|
}
|
|
@@ -364,7 +377,7 @@ async function runRuntimeItemBatch(batch) {
|
|
|
364
377
|
}
|
|
365
378
|
|
|
366
379
|
// src/objects/link/upsert-batch.ts
|
|
367
|
-
async function
|
|
380
|
+
async function upsertLinkBatch2(ctx, items) {
|
|
368
381
|
const { ontology } = ctx;
|
|
369
382
|
if (items.length === 0)
|
|
370
383
|
return [];
|
|
@@ -395,11 +408,11 @@ async function upsertLinkBatch(ctx, items) {
|
|
|
395
408
|
linkId: item.linkId,
|
|
396
409
|
target: { objectTypeId: item.targetTypeId, primaryId: item.targetId }
|
|
397
410
|
};
|
|
398
|
-
const edge =
|
|
411
|
+
const edge = linkRefKey2(ref);
|
|
399
412
|
return {
|
|
400
413
|
key: edge,
|
|
401
414
|
label: `link '${item.objectType.id}:${item.sourceId}.${item.linkId} -> ${item.targetTypeId}:${item.targetId}'`,
|
|
402
|
-
fingerprint:
|
|
415
|
+
fingerprint: stableJsonStringify2(properties ?? null),
|
|
403
416
|
operations: [
|
|
404
417
|
linkUpsertOperation({
|
|
405
418
|
id: runtimeOperationId(index),
|
|
@@ -415,8 +428,8 @@ async function upsertLinkBatch(ctx, items) {
|
|
|
415
428
|
});
|
|
416
429
|
}
|
|
417
430
|
// src/objects/object/delete.ts
|
|
418
|
-
async function
|
|
419
|
-
|
|
431
|
+
async function deleteObject2(ctx, primaryId) {
|
|
432
|
+
assertCanEdit2(ctx, ctx.objectType.id);
|
|
420
433
|
await commitRuntimeOperations(ctx, [
|
|
421
434
|
objectDeleteOperation({
|
|
422
435
|
id: runtimeOperationId(0),
|
|
@@ -424,8 +437,8 @@ async function deleteObject(ctx, primaryId) {
|
|
|
424
437
|
})
|
|
425
438
|
]);
|
|
426
439
|
}
|
|
427
|
-
async function
|
|
428
|
-
|
|
440
|
+
async function restoreObject2(ctx, primaryId) {
|
|
441
|
+
assertCanEdit2(ctx, ctx.objectType.id);
|
|
429
442
|
await commitRuntimeOperations(ctx, [
|
|
430
443
|
objectRestoreOperation({
|
|
431
444
|
id: runtimeOperationId(0),
|
|
@@ -435,8 +448,8 @@ async function restoreObject(ctx, primaryId) {
|
|
|
435
448
|
}
|
|
436
449
|
|
|
437
450
|
// src/objects/object/upsert.ts
|
|
438
|
-
async function
|
|
439
|
-
|
|
451
|
+
async function upsertObject2(ctx, properties) {
|
|
452
|
+
assertCanEdit2(ctx, ctx.objectType.id);
|
|
440
453
|
const { objectType, primaryPropertyId, ontology } = ctx;
|
|
441
454
|
const normalized = normalizeRuntimeObject({
|
|
442
455
|
objectType,
|
|
@@ -452,8 +465,8 @@ async function upsertObject(ctx, properties) {
|
|
|
452
465
|
}
|
|
453
466
|
|
|
454
467
|
// src/objects/object/upsert-batch.ts
|
|
455
|
-
async function
|
|
456
|
-
|
|
468
|
+
async function upsertObjectBatch2(ctx, items) {
|
|
469
|
+
assertCanEdit2(ctx, ctx.objectType.id);
|
|
457
470
|
const { objectType, primaryPropertyId, ontology } = ctx;
|
|
458
471
|
const valueTypesById = ontology.getValueTypesById();
|
|
459
472
|
return runRuntimeItemBatch({
|
|
@@ -470,7 +483,7 @@ async function upsertObjectBatch(ctx, items) {
|
|
|
470
483
|
return {
|
|
471
484
|
key: `${ref.objectTypeId}:${ref.primaryId}`,
|
|
472
485
|
label: `object '${ref.objectTypeId}:${ref.primaryId}'`,
|
|
473
|
-
fingerprint:
|
|
486
|
+
fingerprint: stableJsonStringify2(normalized.properties),
|
|
474
487
|
operations: [
|
|
475
488
|
objectUpsertOperation({
|
|
476
489
|
id: runtimeOperationId(index),
|
|
@@ -485,21 +498,21 @@ async function upsertObjectBatch(ctx, items) {
|
|
|
485
498
|
}
|
|
486
499
|
// src/objects/telemetry/write-batch.ts
|
|
487
500
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
488
|
-
async function
|
|
501
|
+
async function writeTelemetryBatch2(ctx, points) {
|
|
489
502
|
for (const objectTypeId of new Set(points.map((point) => point.series.object.objectTypeId))) {
|
|
490
|
-
|
|
503
|
+
assertCanAppendTelemetry2(ctx, objectTypeId);
|
|
491
504
|
}
|
|
492
505
|
if (points.length === 0)
|
|
493
506
|
return null;
|
|
494
507
|
let commit;
|
|
495
508
|
try {
|
|
496
|
-
commit = await
|
|
509
|
+
commit = await getOntologyMutationRuntime2(ctx).appendTelemetry({
|
|
497
510
|
source: { kind: "runtime", requestId: randomUUID2() },
|
|
498
511
|
points
|
|
499
512
|
});
|
|
500
513
|
} catch (error) {
|
|
501
|
-
if (error instanceof
|
|
502
|
-
throw new
|
|
514
|
+
if (error instanceof MaterializationObjectNotFoundError2) {
|
|
515
|
+
throw new ObjectNotFoundError2(error.objectTypeId, error.primaryId, "Object not found for telemetry append");
|
|
503
516
|
}
|
|
504
517
|
throw error;
|
|
505
518
|
}
|
|
@@ -514,8 +527,8 @@ function isUnitBearingValue(raw) {
|
|
|
514
527
|
const record = raw;
|
|
515
528
|
return "value" in record && typeof record.unit === "string" && Object.keys(record).length === 2;
|
|
516
529
|
}
|
|
517
|
-
async function
|
|
518
|
-
|
|
530
|
+
async function appendTelemetryBatch2(ctx, items) {
|
|
531
|
+
assertCanAppendTelemetry2(ctx, ctx.objectType.id);
|
|
519
532
|
const { objectType } = ctx;
|
|
520
533
|
const points = new Map;
|
|
521
534
|
for (const item of items) {
|
|
@@ -523,14 +536,14 @@ async function appendTelemetryBatch(ctx, items) {
|
|
|
523
536
|
for (const [propertyId, rawValue] of Object.entries(item.properties)) {
|
|
524
537
|
const propertyToken = objectType.p[propertyId];
|
|
525
538
|
if (!propertyToken) {
|
|
526
|
-
throw new
|
|
539
|
+
throw new OntologyValidationError2(`Unknown property '${objectType.id}.${propertyId}'`);
|
|
527
540
|
}
|
|
528
|
-
|
|
541
|
+
assertTelemetryProperty2(propertyToken.property);
|
|
529
542
|
const series = {
|
|
530
543
|
object: { objectTypeId: objectType.id, primaryId: item.id },
|
|
531
544
|
propertyId: propertyToken.id
|
|
532
545
|
};
|
|
533
|
-
points.set(
|
|
546
|
+
points.set(telemetryPointKey2(series, at), {
|
|
534
547
|
series,
|
|
535
548
|
value: isUnitBearingValue(rawValue) ? rawValue.value : rawValue,
|
|
536
549
|
...isUnitBearingValue(rawValue) ? { unit: rawValue.unit } : {},
|
|
@@ -538,11 +551,11 @@ async function appendTelemetryBatch(ctx, items) {
|
|
|
538
551
|
});
|
|
539
552
|
}
|
|
540
553
|
}
|
|
541
|
-
await
|
|
554
|
+
await writeTelemetryBatch2(ctx, [...points.values()]);
|
|
542
555
|
}
|
|
543
556
|
|
|
544
557
|
// src/objects/telemetry/history.ts
|
|
545
|
-
async function
|
|
558
|
+
async function getTelemetryHistoryBatch2(input, options) {
|
|
546
559
|
const objectReader = options.objectReader;
|
|
547
560
|
const storage = options.storage;
|
|
548
561
|
const projectId = objectReader.projectId;
|
|
@@ -729,7 +742,7 @@ function snapshotProviderPoint(point) {
|
|
|
729
742
|
}
|
|
730
743
|
}
|
|
731
744
|
function invalidTimeseriesProviderResult(cause) {
|
|
732
|
-
return
|
|
745
|
+
return createSixbError2("internal.unexpected", "[Sixb] Timeseries storage returned data outside the requested series.", cause === undefined ? {} : { cause });
|
|
733
746
|
}
|
|
734
747
|
function isInvalidTimeseriesProviderResult(error) {
|
|
735
748
|
return error instanceof Error && "code" in error && error.code === "internal.unexpected" && error.message === "[Sixb] Timeseries storage returned data outside the requested series.";
|
|
@@ -744,31 +757,31 @@ function seriesKey(series) {
|
|
|
744
757
|
return JSON.stringify([series.objectTypeId, series.objectId, series.propertyId]);
|
|
745
758
|
}
|
|
746
759
|
// src/objects/context/resolve.ts
|
|
747
|
-
function
|
|
760
|
+
function requireLinkDefinition2(objectType, linkId) {
|
|
748
761
|
const def = objectType.links.find((l) => l.id === linkId);
|
|
749
762
|
if (!def)
|
|
750
|
-
throw new
|
|
763
|
+
throw new OntologyNotFoundError2(`Unknown link '${objectType.id}.${linkId}'`);
|
|
751
764
|
return def;
|
|
752
765
|
}
|
|
753
|
-
function
|
|
766
|
+
function resolveObjectContext2(runtime, objectTypeId) {
|
|
754
767
|
const objectType = runtime.ontology.resolveObjectType(objectTypeId);
|
|
755
768
|
const primaryPropertyId = runtime.ontology.getPrimaryPropertyId(objectTypeId);
|
|
756
769
|
return { ...runtime, objectType, primaryPropertyId };
|
|
757
770
|
}
|
|
758
|
-
function
|
|
759
|
-
const linkDefinition =
|
|
771
|
+
function resolveLinkContext2(objCtx, linkId) {
|
|
772
|
+
const linkDefinition = requireLinkDefinition2(objCtx.objectType, linkId);
|
|
760
773
|
return { ...objCtx, linkDefinition };
|
|
761
774
|
}
|
|
762
775
|
// src/objects/sdk/telemetry-channel.ts
|
|
763
776
|
function createTelemetryChannel(ctx, primaryId) {
|
|
764
777
|
return (property) => {
|
|
765
778
|
const { objectType } = ctx;
|
|
766
|
-
|
|
767
|
-
|
|
779
|
+
assertPropertyTokenBelongsToObjectType2(objectType, property);
|
|
780
|
+
assertTelemetryProperty2(property.property);
|
|
768
781
|
const series = { objectTypeId: objectType.id, objectId: primaryId, propertyId: property.id };
|
|
769
782
|
const channel = {
|
|
770
783
|
append: async (input) => {
|
|
771
|
-
await
|
|
784
|
+
await writeTelemetryBatch2(ctx, [
|
|
772
785
|
{
|
|
773
786
|
series: {
|
|
774
787
|
object: { objectTypeId: objectType.id, primaryId },
|
|
@@ -784,13 +797,13 @@ function createTelemetryChannel(ctx, primaryId) {
|
|
|
784
797
|
const timeseries = ctx.storage.timeseries;
|
|
785
798
|
const objectReader = ctx.objectReader;
|
|
786
799
|
if (!timeseries) {
|
|
787
|
-
throw new
|
|
800
|
+
throw new RuntimeError2("[Sixb] Reading telemetry requires storage.timeseries support.");
|
|
788
801
|
}
|
|
789
802
|
const from = input.from;
|
|
790
803
|
const to = input.to;
|
|
791
804
|
const limit = input.limit;
|
|
792
805
|
const order = input.order;
|
|
793
|
-
const [result] = await
|
|
806
|
+
const [result] = await getTelemetryHistoryBatch2({
|
|
794
807
|
series: [series],
|
|
795
808
|
...from !== undefined ? { from } : {},
|
|
796
809
|
...to !== undefined ? { to } : {},
|
|
@@ -823,7 +836,7 @@ function createObjectByIdHandle(ctx, primaryId) {
|
|
|
823
836
|
},
|
|
824
837
|
listLinks: async (linkToken) => {
|
|
825
838
|
if (linkToken) {
|
|
826
|
-
|
|
839
|
+
assertLinkTokenBelongsToObjectType2(ctx.objectType, linkToken);
|
|
827
840
|
}
|
|
828
841
|
return ctx.objectReader.listLinks({
|
|
829
842
|
objectTypeId: ctx.objectType.id,
|
|
@@ -832,9 +845,9 @@ function createObjectByIdHandle(ctx, primaryId) {
|
|
|
832
845
|
});
|
|
833
846
|
},
|
|
834
847
|
link: async (linkToken, target, options) => {
|
|
835
|
-
|
|
848
|
+
assertLinkTokenBelongsToObjectType2(ctx.objectType, linkToken);
|
|
836
849
|
const linkCtx = { ...ctx, linkDefinition: linkToken.link };
|
|
837
|
-
await
|
|
850
|
+
await upsertLink2(linkCtx, {
|
|
838
851
|
sourceId: primaryId,
|
|
839
852
|
linkId: linkToken.id,
|
|
840
853
|
targetTypeId: target.objectTypeId,
|
|
@@ -843,9 +856,9 @@ function createObjectByIdHandle(ctx, primaryId) {
|
|
|
843
856
|
});
|
|
844
857
|
},
|
|
845
858
|
unlink: async (linkToken, target) => {
|
|
846
|
-
|
|
859
|
+
assertLinkTokenBelongsToObjectType2(ctx.objectType, linkToken);
|
|
847
860
|
const linkCtx = { ...ctx, linkDefinition: linkToken.link };
|
|
848
|
-
await
|
|
861
|
+
await removeLink2(linkCtx, {
|
|
849
862
|
sourceId: primaryId,
|
|
850
863
|
linkId: linkToken.id,
|
|
851
864
|
targetTypeId: target.objectTypeId,
|
|
@@ -853,15 +866,15 @@ function createObjectByIdHandle(ctx, primaryId) {
|
|
|
853
866
|
});
|
|
854
867
|
},
|
|
855
868
|
delete: async () => {
|
|
856
|
-
await
|
|
869
|
+
await deleteObject2(ctx, primaryId);
|
|
857
870
|
},
|
|
858
871
|
restore: async () => {
|
|
859
|
-
await
|
|
872
|
+
await restoreObject2(ctx, primaryId);
|
|
860
873
|
},
|
|
861
874
|
requestAction: async (input) => {
|
|
862
875
|
const actionId = input.action?.id ?? input.actionId;
|
|
863
876
|
if (!actionId) {
|
|
864
|
-
throw new
|
|
877
|
+
throw new OntologyValidationError2("[Sixb] requestAction requires either 'action' or 'actionId'");
|
|
865
878
|
}
|
|
866
879
|
return requestAction2(ctx, {
|
|
867
880
|
primaryId,
|
|
@@ -873,9 +886,9 @@ function createObjectByIdHandle(ctx, primaryId) {
|
|
|
873
886
|
requestActionAndWait: async (input) => {
|
|
874
887
|
const actionId = input.action?.id ?? input.actionId;
|
|
875
888
|
if (!actionId) {
|
|
876
|
-
throw new
|
|
889
|
+
throw new OntologyValidationError2("[Sixb] requestActionAndWait requires either 'action' or 'actionId'");
|
|
877
890
|
}
|
|
878
|
-
return
|
|
891
|
+
return requestActionAndWait(ctx, {
|
|
879
892
|
primaryId,
|
|
880
893
|
actionId,
|
|
881
894
|
params: input.params,
|
|
@@ -898,7 +911,7 @@ function createRuntimeQueryExecutor(params) {
|
|
|
898
911
|
try {
|
|
899
912
|
return await objectReader.executeQuery({ query, includeTotal: options?.includeTotal });
|
|
900
913
|
} catch (error) {
|
|
901
|
-
if (error instanceof
|
|
914
|
+
if (error instanceof ObjectQueryPlanningError2) {
|
|
902
915
|
throw addSdkPlanningHints(error);
|
|
903
916
|
}
|
|
904
917
|
throw error;
|
|
@@ -920,24 +933,24 @@ function createRuntimeQueryExecutor(params) {
|
|
|
920
933
|
}));
|
|
921
934
|
},
|
|
922
935
|
validate(query) {
|
|
923
|
-
return
|
|
936
|
+
return validateObjectQuery2(query, { ontology, normalize: false });
|
|
924
937
|
},
|
|
925
938
|
explain(query) {
|
|
926
|
-
return
|
|
939
|
+
return explainObjectQuery2(query, { ontology, normalize: false });
|
|
927
940
|
}
|
|
928
941
|
};
|
|
929
942
|
}
|
|
930
943
|
function addSdkPlanningHints(error) {
|
|
931
944
|
if (!error.issues.some((issue) => issue.code === "fallback_requires_bound"))
|
|
932
945
|
return error;
|
|
933
|
-
return new
|
|
946
|
+
return new ObjectQueryPlanningError2(error.issues.map((issue) => issue.code === "fallback_requires_bound" ? {
|
|
934
947
|
...issue,
|
|
935
948
|
message: "Object query fallback requires an explicit result bound. Add .limit(n) or .page({ pageSize: n }) before .list()."
|
|
936
949
|
} : issue));
|
|
937
950
|
}
|
|
938
951
|
|
|
939
952
|
// src/objects/sdk/object-set.ts
|
|
940
|
-
function
|
|
953
|
+
function createObjectSet2(params) {
|
|
941
954
|
assertAuthorizedObjectReaderBinding({
|
|
942
955
|
reader: params.objectReader,
|
|
943
956
|
scope: { execution: params.execution, authorization: params.runtimeAuthorization }
|
|
@@ -945,7 +958,7 @@ function createObjectSet(params) {
|
|
|
945
958
|
const { objectType } = params;
|
|
946
959
|
const primaryProp = objectType.properties.find((p) => p.primary);
|
|
947
960
|
if (!primaryProp) {
|
|
948
|
-
throw new
|
|
961
|
+
throw new OntologyValidationError2(`Object type '${objectType.id}' has no primary property`);
|
|
949
962
|
}
|
|
950
963
|
const primaryPropertyId = primaryProp.id;
|
|
951
964
|
const {
|
|
@@ -980,8 +993,8 @@ function createObjectSet(params) {
|
|
|
980
993
|
objectType,
|
|
981
994
|
primaryPropertyId
|
|
982
995
|
};
|
|
983
|
-
|
|
984
|
-
|
|
996
|
+
shareOntologyMutationRuntime2(params, resolvedCtx);
|
|
997
|
+
shareSixbErrorReporter2(params, resolvedCtx);
|
|
985
998
|
const objectSet = {
|
|
986
999
|
get: async (id) => {
|
|
987
1000
|
const row = await objectReader.getByPrimaryId({
|
|
@@ -991,10 +1004,10 @@ function createObjectSet(params) {
|
|
|
991
1004
|
return row ? row : null;
|
|
992
1005
|
},
|
|
993
1006
|
upsert: async (input) => {
|
|
994
|
-
const row = await
|
|
1007
|
+
const row = await upsertObject2(resolvedCtx, input.properties);
|
|
995
1008
|
return row;
|
|
996
1009
|
},
|
|
997
|
-
query: () =>
|
|
1010
|
+
query: () => createObjectQueryBuilder2({
|
|
998
1011
|
query: { kind: "start", objectTypeId: objectType.id },
|
|
999
1012
|
executor: queryExecutor
|
|
1000
1013
|
}),
|
|
@@ -1020,12 +1033,12 @@ function createObjectSet(params) {
|
|
|
1020
1033
|
};
|
|
1021
1034
|
},
|
|
1022
1035
|
appendTelemetryBatch: async (items) => {
|
|
1023
|
-
await
|
|
1036
|
+
await appendTelemetryBatch2(resolvedCtx, items);
|
|
1024
1037
|
},
|
|
1025
1038
|
requestAction: async (input) => {
|
|
1026
1039
|
const actionId = input.action?.id ?? input.actionId;
|
|
1027
1040
|
if (!actionId) {
|
|
1028
|
-
throw new
|
|
1041
|
+
throw new OntologyValidationError2("[Sixb] requestAction requires either 'action' or 'actionId'");
|
|
1029
1042
|
}
|
|
1030
1043
|
return requestAction2(resolvedCtx, {
|
|
1031
1044
|
primaryId: input.id,
|
|
@@ -1037,9 +1050,9 @@ function createObjectSet(params) {
|
|
|
1037
1050
|
requestActionAndWait: async (input) => {
|
|
1038
1051
|
const actionId = input.action?.id ?? input.actionId;
|
|
1039
1052
|
if (!actionId) {
|
|
1040
|
-
throw new
|
|
1053
|
+
throw new OntologyValidationError2("[Sixb] requestActionAndWait requires either 'action' or 'actionId'");
|
|
1041
1054
|
}
|
|
1042
|
-
return
|
|
1055
|
+
return requestActionAndWait(resolvedCtx, {
|
|
1043
1056
|
primaryId: input.id,
|
|
1044
1057
|
actionId,
|
|
1045
1058
|
params: input.params,
|
|
@@ -1050,9 +1063,9 @@ function createObjectSet(params) {
|
|
|
1050
1063
|
});
|
|
1051
1064
|
},
|
|
1052
1065
|
upsertLink: async (input) => {
|
|
1053
|
-
const linkDefinition =
|
|
1066
|
+
const linkDefinition = requireLinkDefinition2(objectType, input.linkId);
|
|
1054
1067
|
const linkCtx = { ...resolvedCtx, linkDefinition };
|
|
1055
|
-
await
|
|
1068
|
+
await upsertLink2(linkCtx, {
|
|
1056
1069
|
sourceId: input.sourceId,
|
|
1057
1070
|
linkId: input.linkId,
|
|
1058
1071
|
targetTypeId: input.targetTypeId,
|
|
@@ -1061,9 +1074,9 @@ function createObjectSet(params) {
|
|
|
1061
1074
|
});
|
|
1062
1075
|
},
|
|
1063
1076
|
removeLink: async (input) => {
|
|
1064
|
-
const linkDefinition =
|
|
1077
|
+
const linkDefinition = requireLinkDefinition2(objectType, input.linkId);
|
|
1065
1078
|
const linkCtx = { ...resolvedCtx, linkDefinition };
|
|
1066
|
-
await
|
|
1079
|
+
await removeLink2(linkCtx, {
|
|
1067
1080
|
sourceId: input.sourceId,
|
|
1068
1081
|
linkId: input.linkId,
|
|
1069
1082
|
targetTypeId: input.targetTypeId,
|
|
@@ -1076,31 +1089,31 @@ function createObjectSet(params) {
|
|
|
1076
1089
|
// src/objects/service/index.ts
|
|
1077
1090
|
var exports_service = {};
|
|
1078
1091
|
__export(exports_service, {
|
|
1079
|
-
|
|
1080
|
-
upsertObject: () => upsertObject2,
|
|
1081
|
-
upsertLinkBatch: () => upsertLinkBatch2,
|
|
1082
|
-
upsertLink: () => upsertLink2,
|
|
1083
|
-
requestActionAndWait: () => requestActionAndWait3,
|
|
1084
|
-
requestAction: () => requestAction3,
|
|
1085
|
-
removeLink: () => removeLink2,
|
|
1092
|
+
appendTelemetry: () => appendTelemetry,
|
|
1086
1093
|
listObjects: () => listObjects,
|
|
1087
|
-
|
|
1094
|
+
removeLink: () => removeLink3,
|
|
1095
|
+
requestAction: () => requestAction,
|
|
1096
|
+
requestActionAndWait: () => requestActionAndWait3,
|
|
1097
|
+
upsertLink: () => upsertLink3,
|
|
1098
|
+
upsertLinkBatch: () => upsertLinkBatch3,
|
|
1099
|
+
upsertObject: () => upsertObject3,
|
|
1100
|
+
upsertObjectBatch: () => upsertObjectBatch3
|
|
1088
1101
|
});
|
|
1089
1102
|
|
|
1090
1103
|
// src/objects/service/action-service.ts
|
|
1091
|
-
async function
|
|
1092
|
-
const ctx = { ...
|
|
1104
|
+
async function requestAction(runtime, execution, objectTypeId, primaryId, actionId, params, options) {
|
|
1105
|
+
const ctx = { ...resolveObjectContext2(runtime, objectTypeId), execution };
|
|
1093
1106
|
return requestAction2(ctx, { primaryId, actionId, params, options });
|
|
1094
1107
|
}
|
|
1095
1108
|
async function requestActionAndWait3(runtime, execution, objectTypeId, primaryId, actionId, params, options) {
|
|
1096
|
-
const ctx = { ...
|
|
1097
|
-
return
|
|
1109
|
+
const ctx = { ...resolveObjectContext2(runtime, objectTypeId), execution };
|
|
1110
|
+
return requestActionAndWait(ctx, { primaryId, actionId, params, options });
|
|
1098
1111
|
}
|
|
1099
1112
|
// src/objects/service/link-service.ts
|
|
1100
|
-
async function
|
|
1101
|
-
const ctx =
|
|
1102
|
-
const linkCtx =
|
|
1103
|
-
await
|
|
1113
|
+
async function upsertLink3(runtime, objectTypeId, sourceId, linkId, target) {
|
|
1114
|
+
const ctx = resolveObjectContext2(runtime, objectTypeId);
|
|
1115
|
+
const linkCtx = resolveLinkContext2(ctx, linkId);
|
|
1116
|
+
await upsertLink2(linkCtx, {
|
|
1104
1117
|
sourceId,
|
|
1105
1118
|
linkId,
|
|
1106
1119
|
targetTypeId: target.targetTypeId,
|
|
@@ -1108,10 +1121,10 @@ async function upsertLink2(runtime, objectTypeId, sourceId, linkId, target) {
|
|
|
1108
1121
|
properties: target.properties
|
|
1109
1122
|
});
|
|
1110
1123
|
}
|
|
1111
|
-
async function
|
|
1124
|
+
async function upsertLinkBatch3(runtime, items) {
|
|
1112
1125
|
const resolvedItems = items.map((item) => {
|
|
1113
1126
|
const objectType = runtime.ontology.resolveObjectType(item.objectTypeId);
|
|
1114
|
-
const linkDefinition =
|
|
1127
|
+
const linkDefinition = requireLinkDefinition2(objectType, item.linkId);
|
|
1115
1128
|
return {
|
|
1116
1129
|
objectType,
|
|
1117
1130
|
linkDefinition,
|
|
@@ -1122,12 +1135,12 @@ async function upsertLinkBatch2(runtime, items) {
|
|
|
1122
1135
|
properties: item.target.properties
|
|
1123
1136
|
};
|
|
1124
1137
|
});
|
|
1125
|
-
return
|
|
1138
|
+
return upsertLinkBatch2(runtime, resolvedItems);
|
|
1126
1139
|
}
|
|
1127
|
-
async function
|
|
1128
|
-
const ctx =
|
|
1129
|
-
const linkCtx =
|
|
1130
|
-
await
|
|
1140
|
+
async function removeLink3(runtime, objectTypeId, sourceId, linkId, target) {
|
|
1141
|
+
const ctx = resolveObjectContext2(runtime, objectTypeId);
|
|
1142
|
+
const linkCtx = resolveLinkContext2(ctx, linkId);
|
|
1143
|
+
await removeLink2(linkCtx, {
|
|
1131
1144
|
sourceId,
|
|
1132
1145
|
linkId,
|
|
1133
1146
|
targetTypeId: target.targetTypeId,
|
|
@@ -1169,17 +1182,17 @@ function resolveTypeFilter(runtime, requested) {
|
|
|
1169
1182
|
return requested ? [...new Set(requested.flatMap((id) => [id, ...ontology.listSubTypes(id)]))] : undefined;
|
|
1170
1183
|
}
|
|
1171
1184
|
// src/objects/service/object-service.ts
|
|
1172
|
-
async function
|
|
1173
|
-
return
|
|
1185
|
+
async function upsertObject3(runtime, objectTypeId, properties) {
|
|
1186
|
+
return upsertObject2(resolveObjectContext2(runtime, objectTypeId), properties);
|
|
1174
1187
|
}
|
|
1175
|
-
async function
|
|
1176
|
-
return
|
|
1188
|
+
async function upsertObjectBatch3(runtime, objectTypeId, items) {
|
|
1189
|
+
return upsertObjectBatch2(resolveObjectContext2(runtime, objectTypeId), items);
|
|
1177
1190
|
}
|
|
1178
1191
|
// src/objects/service/telemetry-service.ts
|
|
1179
1192
|
async function appendTelemetry(runtime, objectTypeId, items) {
|
|
1180
|
-
const ctx =
|
|
1181
|
-
await
|
|
1193
|
+
const ctx = resolveObjectContext2(runtime, objectTypeId);
|
|
1194
|
+
await appendTelemetryBatch2(ctx, items);
|
|
1182
1195
|
}
|
|
1183
|
-
export { requestAction2
|
|
1196
|
+
export { requestAction2, ObjectError2, removeLink2, upsertLink2, upsertLinkBatch2, deleteObject2, restoreObject2, upsertObject2, upsertObjectBatch2, writeTelemetryBatch2, appendTelemetryBatch2, getTelemetryHistoryBatch2, getLatestTelemetryPoint, requireLinkDefinition2, resolveObjectContext2, resolveLinkContext2, createObjectSet2, upsertLink3, upsertLinkBatch3, removeLink3, listObjects, upsertObject3, upsertObjectBatch3, appendTelemetry, exports_service };
|
|
1184
1197
|
|
|
1185
|
-
//# debugId=
|
|
1198
|
+
//# debugId=0ED9DE016D18A46464756E2164756E21
|