@sixb/core 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.js +77 -89
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/run-dispatch.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +2 -0
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/actions/validation.d.ts +1 -1
- package/dist/actions/validation.d.ts.map +1 -1
- package/dist/actions/worker.js +33 -37
- package/dist/actions/worker.js.map +2 -2
- package/dist/agents/adapters.d.ts +3 -3
- package/dist/agents/{context.d.ts → context/entries.d.ts} +3 -3
- package/dist/agents/context/entries.d.ts.map +1 -0
- package/dist/agents/context/index.d.ts +4 -0
- package/dist/agents/context/index.d.ts.map +1 -0
- package/dist/agents/context/index.js +19 -0
- package/dist/agents/{streams.js.map → context/index.js.map} +1 -1
- package/dist/agents/context-model.d.ts +1 -1
- package/dist/agents/context-model.d.ts.map +1 -1
- package/dist/agents/context-resolution.d.ts +1 -1
- package/dist/agents/context-resolution.d.ts.map +1 -1
- package/dist/agents/index.d.ts +4 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +193 -204
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/message.d.ts +1 -1
- package/dist/agents/message.d.ts.map +1 -1
- package/dist/agents/model-loop.d.ts +2 -0
- package/dist/agents/model-loop.d.ts.map +1 -1
- package/dist/agents/request.d.ts +1 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/streams/index.d.ts +4 -0
- package/dist/agents/streams/index.d.ts.map +1 -0
- package/dist/agents/streams/index.js +20 -0
- package/dist/{chunk-y64skrwp.js.map → agents/streams/index.js.map} +1 -1
- package/dist/agents/streams/internal.d.ts +3 -0
- package/dist/agents/streams/internal.d.ts.map +1 -0
- package/dist/agents/streams/internal.js +40 -0
- package/dist/agents/{context.js.map → streams/internal.js.map} +1 -1
- package/dist/agents/{streams.d.ts → streams/protocol.d.ts} +5 -5
- package/dist/agents/streams/protocol.d.ts.map +1 -0
- package/dist/agents/types.d.ts +1 -1
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/auth/index.d.ts +0 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +96 -108
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/strategy.js +8 -9
- package/dist/auth/strategy.js.map +1 -1
- package/dist/authorization/index.js +51 -56
- package/dist/authorization/index.js.map +1 -1
- package/dist/blob-storage/browser.js +15 -17
- package/dist/blob-storage/browser.js.map +1 -1
- package/dist/blob-storage/index.js +36 -38
- package/dist/blob-storage/index.js.map +1 -1
- package/dist/bootstrap/discovery.d.ts +14 -1
- package/dist/bootstrap/discovery.d.ts.map +1 -1
- package/dist/bootstrap/index.d.ts +2 -2
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +80 -88
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/broker/in-memory.d.ts +8 -2
- package/dist/broker/in-memory.d.ts.map +1 -1
- package/dist/broker/index.d.ts +4 -2
- package/dist/broker/index.d.ts.map +1 -1
- package/dist/broker/index.js +12 -10
- package/dist/broker/index.js.map +1 -1
- package/dist/broker/retention.d.ts +4 -0
- package/dist/broker/retention.d.ts.map +1 -0
- package/dist/broker/subscriber.d.ts +10 -0
- package/dist/broker/subscriber.d.ts.map +1 -0
- package/dist/broker/types.d.ts +14 -1
- package/dist/broker/types.d.ts.map +1 -1
- package/dist/chunk-0y39rgsb.js +43 -0
- package/dist/{chunk-c15dr03f.js.map → chunk-0y39rgsb.js.map} +2 -2
- package/dist/{chunk-k522z7v6.js → chunk-17kfctj6.js} +16 -11
- package/dist/chunk-17kfctj6.js.map +10 -0
- package/dist/{chunk-ajnan18g.js → chunk-1824gssz.js} +74 -106
- package/dist/chunk-1824gssz.js.map +12 -0
- package/dist/chunk-28ja2cjs.js +602 -0
- package/dist/chunk-28ja2cjs.js.map +18 -0
- package/dist/{chunk-5gd7tpv6.js → chunk-2c4j899j.js} +4 -4
- package/dist/chunk-2c4j899j.js.map +11 -0
- package/dist/{chunk-rv2hkwwa.js → chunk-358caqf5.js} +157 -180
- package/dist/chunk-358caqf5.js.map +12 -0
- package/dist/{chunk-fvt9rjsa.js → chunk-38zv5rkr.js} +4 -4
- package/dist/{chunk-fvt9rjsa.js.map → chunk-38zv5rkr.js.map} +1 -1
- package/dist/{chunk-w3e09qqk.js → chunk-39tqv9hz.js} +24 -24
- package/dist/{chunk-w3e09qqk.js.map → chunk-39tqv9hz.js.map} +2 -2
- package/dist/{chunk-04b07a9q.js → chunk-3bh94gbw.js} +13 -13
- package/dist/{chunk-04b07a9q.js.map → chunk-3bh94gbw.js.map} +2 -2
- package/dist/{chunk-s5y30bc9.js → chunk-3qms4nax.js} +52 -50
- package/dist/{chunk-s5y30bc9.js.map → chunk-3qms4nax.js.map} +5 -5
- package/dist/{chunk-nf4r78r4.js → chunk-5a4a52tq.js} +4 -4
- package/dist/{chunk-nf4r78r4.js.map → chunk-5a4a52tq.js.map} +2 -2
- package/dist/{chunk-wtf06et8.js → chunk-5c7ga8zz.js} +54 -177
- package/dist/chunk-5c7ga8zz.js.map +12 -0
- package/dist/{chunk-rte5sm3z.js → chunk-5hz0fnca.js} +23 -23
- package/dist/{chunk-rte5sm3z.js.map → chunk-5hz0fnca.js.map} +2 -2
- package/dist/{chunk-xajtptbw.js → chunk-5p1v802y.js} +1401 -445
- package/dist/chunk-5p1v802y.js.map +44 -0
- package/dist/chunk-653vwrzr.js +39 -0
- package/dist/chunk-653vwrzr.js.map +10 -0
- package/dist/{chunk-qw9gvjv5.js → chunk-72w2pxk7.js} +13 -13
- package/dist/{chunk-qw9gvjv5.js.map → chunk-72w2pxk7.js.map} +2 -2
- package/dist/chunk-7apz6hg4.js +50 -0
- package/dist/{chunk-jq43kdvk.js.map → chunk-7apz6hg4.js.map} +2 -2
- package/dist/chunk-7bs40fe1.js +218 -0
- package/dist/{chunk-p1rzczbt.js.map → chunk-7bs40fe1.js.map} +3 -3
- package/dist/chunk-7zgecwy1.js +113 -0
- package/dist/chunk-7zgecwy1.js.map +10 -0
- package/dist/{chunk-xhy826cz.js → chunk-85cd7e8c.js} +8 -7
- package/dist/chunk-85cd7e8c.js.map +10 -0
- package/dist/{chunk-pc7ys28c.js → chunk-860dwwy0.js} +29 -29
- package/dist/{chunk-pc7ys28c.js.map → chunk-860dwwy0.js.map} +2 -2
- package/dist/chunk-8vj0rjgs.js +165 -0
- package/dist/chunk-8vj0rjgs.js.map +15 -0
- package/dist/{chunk-7y0f6rf1.js → chunk-92vk7gta.js} +58 -58
- package/dist/chunk-92vk7gta.js.map +10 -0
- package/dist/{chunk-rafagrwr.js → chunk-93csa55g.js} +45 -17
- package/dist/chunk-93csa55g.js.map +11 -0
- package/dist/{chunk-aa2pen2v.js → chunk-976rxdpx.js} +188 -175
- package/dist/{chunk-aa2pen2v.js.map → chunk-976rxdpx.js.map} +2 -2
- package/dist/{chunk-d8qkxt2v.js → chunk-98cw09sw.js} +7 -7
- package/dist/chunk-98cw09sw.js.map +10 -0
- package/dist/{chunk-n4khvw9n.js → chunk-9qsh3p5y.js} +17 -17
- package/dist/{chunk-n4khvw9n.js.map → chunk-9qsh3p5y.js.map} +2 -2
- package/dist/{chunk-4a849fr1.js → chunk-9tc8dxmn.js} +1 -1
- package/dist/{chunk-9nbmsvn5.js → chunk-9vx5e9g1.js} +9 -9
- package/dist/{chunk-9nbmsvn5.js.map → chunk-9vx5e9g1.js.map} +2 -2
- package/dist/{chunk-8m5ejdpn.js → chunk-9x8dybsb.js} +5 -5
- package/dist/chunk-9x8dybsb.js.map +10 -0
- package/dist/chunk-aa6z4a19.js +358 -0
- package/dist/chunk-aa6z4a19.js.map +12 -0
- package/dist/{chunk-3xep5cjx.js → chunk-agbbygvh.js} +104 -86
- package/dist/chunk-agbbygvh.js.map +15 -0
- package/dist/{chunk-2dw777qw.js → chunk-ap0g1g74.js} +37 -82
- package/dist/{chunk-2dw777qw.js.map → chunk-ap0g1g74.js.map} +3 -4
- package/dist/{chunk-v4en4jc2.js → chunk-awbhdqyc.js} +7 -7
- package/dist/{chunk-v4en4jc2.js.map → chunk-awbhdqyc.js.map} +2 -2
- package/dist/{chunk-w9tg6yyb.js → chunk-b0ec55a1.js} +54 -37
- package/dist/chunk-b0ec55a1.js.map +12 -0
- package/dist/{chunk-ka3a2ft3.js → chunk-b19g04jk.js} +12 -12
- package/dist/{chunk-ka3a2ft3.js.map → chunk-b19g04jk.js.map} +2 -2
- package/dist/{chunk-gbejpkex.js → chunk-bn138h9w.js} +27 -28
- package/dist/{chunk-gbejpkex.js.map → chunk-bn138h9w.js.map} +3 -3
- package/dist/{chunk-nx7k8tpr.js → chunk-br3k6qbf.js} +23 -23
- package/dist/{chunk-nx7k8tpr.js.map → chunk-br3k6qbf.js.map} +2 -2
- package/dist/{chunk-dbc80ad7.js → chunk-c5rkjrgp.js} +28 -28
- package/dist/{chunk-dbc80ad7.js.map → chunk-c5rkjrgp.js.map} +2 -2
- package/dist/{chunk-dktq02ne.js → chunk-cqr3acm1.js} +4 -4
- package/dist/{chunk-dktq02ne.js.map → chunk-cqr3acm1.js.map} +2 -2
- package/dist/chunk-d62kjtbg.js +7 -0
- package/dist/{chunk-zcnhxkvd.js.map → chunk-d62kjtbg.js.map} +2 -2
- package/dist/{chunk-74drx9gd.js → chunk-dfm066qg.js} +10 -10
- package/dist/{chunk-74drx9gd.js.map → chunk-dfm066qg.js.map} +2 -2
- package/dist/{chunk-5e3pq99w.js → chunk-dmn70ztd.js} +30 -30
- package/dist/chunk-dmn70ztd.js.map +11 -0
- package/dist/{chunk-p1x242ad.js → chunk-dz5h08xv.js} +175 -175
- package/dist/{chunk-p1x242ad.js.map → chunk-dz5h08xv.js.map} +2 -2
- package/dist/{chunk-p2vqaxkc.js → chunk-e0d1rzef.js} +27 -22
- package/dist/{chunk-p2vqaxkc.js.map → chunk-e0d1rzef.js.map} +3 -3
- package/dist/{chunk-5sz8ta9r.js → chunk-e1c18xjx.js} +52 -52
- package/dist/{chunk-5sz8ta9r.js.map → chunk-e1c18xjx.js.map} +2 -2
- package/dist/{chunk-19jp6g9d.js → chunk-f0rwz2vh.js} +54 -33
- package/dist/chunk-f0rwz2vh.js.map +11 -0
- package/dist/{chunk-2xns679x.js → chunk-f4w3yp4f.js} +171 -36
- package/dist/chunk-f4w3yp4f.js.map +12 -0
- package/dist/{chunk-979ww6b3.js → chunk-fb3feg1e.js} +29 -29
- package/dist/{chunk-979ww6b3.js.map → chunk-fb3feg1e.js.map} +2 -2
- package/dist/{chunk-f26bck4t.js → chunk-ftv470j8.js} +393 -355
- package/dist/{chunk-f26bck4t.js.map → chunk-ftv470j8.js.map} +7 -7
- package/dist/{chunk-4sm0aznx.js → chunk-g00bfdq6.js} +254 -256
- package/dist/{chunk-4sm0aznx.js.map → chunk-g00bfdq6.js.map} +3 -3
- package/dist/{chunk-p03r0h5s.js → chunk-g53f0e4j.js} +76 -202
- package/dist/chunk-g53f0e4j.js.map +15 -0
- package/dist/chunk-g6cke204.js +124 -0
- package/dist/chunk-g6cke204.js.map +10 -0
- package/dist/{chunk-q0k9nc5a.js → chunk-g7knyczr.js} +98 -98
- package/dist/{chunk-q0k9nc5a.js.map → chunk-g7knyczr.js.map} +2 -2
- package/dist/{chunk-51fjndv0.js → chunk-gfdh9kqa.js} +4 -4
- package/dist/{chunk-51fjndv0.js.map → chunk-gfdh9kqa.js.map} +2 -2
- package/dist/{chunk-8tsf6dmc.js → chunk-gqh45d2n.js} +244 -205
- package/dist/chunk-gqh45d2n.js.map +15 -0
- package/dist/chunk-h3v76ams.js +32 -0
- package/dist/{chunk-08m3b6w8.js.map → chunk-h3v76ams.js.map} +2 -2
- package/dist/{chunk-jecn6t54.js → chunk-jgwb25gc.js} +74 -74
- package/dist/{chunk-jecn6t54.js.map → chunk-jgwb25gc.js.map} +2 -2
- package/dist/{chunk-wdage1eb.js → chunk-jmfet9r4.js} +6 -6
- package/dist/{chunk-wdage1eb.js.map → chunk-jmfet9r4.js.map} +2 -2
- package/dist/{chunk-k34z5rvh.js → chunk-kfee1h52.js} +132 -48
- package/dist/chunk-kfee1h52.js.map +13 -0
- package/dist/{chunk-2ab72m2h.js → chunk-m2ca93my.js} +3 -3
- package/dist/{chunk-2ab72m2h.js.map → chunk-m2ca93my.js.map} +2 -2
- package/dist/{chunk-4jjp5k14.js → chunk-mmagke4x.js} +6 -6
- package/dist/{chunk-4jjp5k14.js.map → chunk-mmagke4x.js.map} +2 -2
- package/dist/{chunk-359jm1jw.js → chunk-mrp7k0pw.js} +20 -20
- package/dist/{chunk-359jm1jw.js.map → chunk-mrp7k0pw.js.map} +2 -2
- package/dist/{chunk-h0k55pc7.js → chunk-ms2tmn1k.js} +139 -139
- package/dist/{chunk-h0k55pc7.js.map → chunk-ms2tmn1k.js.map} +2 -2
- package/dist/{chunk-h5vqbfmd.js → chunk-nmbxcaqx.js} +117 -117
- package/dist/{chunk-h5vqbfmd.js.map → chunk-nmbxcaqx.js.map} +3 -3
- package/dist/{chunk-n2w475r0.js → chunk-nt99sxd6.js} +82 -82
- package/dist/{chunk-n2w475r0.js.map → chunk-nt99sxd6.js.map} +3 -3
- package/dist/{chunk-v1xppd0y.js → chunk-p5vcsw9c.js} +60 -60
- package/dist/{chunk-v1xppd0y.js.map → chunk-p5vcsw9c.js.map} +2 -2
- package/dist/{chunk-sbzzr4kx.js → chunk-p6a4npdx.js} +1260 -1289
- package/dist/chunk-p6a4npdx.js.map +58 -0
- package/dist/{chunk-trxxmgnf.js → chunk-pqajwytd.js} +10 -10
- package/dist/{chunk-trxxmgnf.js.map → chunk-pqajwytd.js.map} +3 -3
- package/dist/{chunk-nn0tekr1.js → chunk-pr2h4bv4.js} +33 -33
- package/dist/{chunk-nn0tekr1.js.map → chunk-pr2h4bv4.js.map} +2 -2
- package/dist/{chunk-xwnf87e1.js → chunk-q5gz3g2j.js} +64 -64
- package/dist/{chunk-xwnf87e1.js.map → chunk-q5gz3g2j.js.map} +2 -2
- package/dist/{chunk-5ntny1qx.js → chunk-qf954wje.js} +6 -6
- package/dist/{chunk-5ntny1qx.js.map → chunk-qf954wje.js.map} +2 -2
- package/dist/chunk-qma80ych.js +30 -0
- package/dist/chunk-qma80ych.js.map +11 -0
- package/dist/{chunk-mth82m8t.js → chunk-qyeptdyv.js} +171 -77
- package/dist/chunk-qyeptdyv.js.map +15 -0
- package/dist/{chunk-b49dgvsj.js → chunk-r2y23egw.js} +3 -3
- package/dist/{chunk-b49dgvsj.js.map → chunk-r2y23egw.js.map} +2 -2
- package/dist/{chunk-mwsxn98e.js → chunk-r7fj830t.js} +253 -200
- package/dist/chunk-r7fj830t.js.map +36 -0
- package/dist/{chunk-4rh2m6zg.js → chunk-rb1xx120.js} +13 -13
- package/dist/{chunk-4rh2m6zg.js.map → chunk-rb1xx120.js.map} +2 -2
- package/dist/{chunk-gzasd5b6.js → chunk-rtk71jzp.js} +22 -22
- package/dist/{chunk-gzasd5b6.js.map → chunk-rtk71jzp.js.map} +2 -2
- package/dist/chunk-s3csryxe.js +152 -0
- package/dist/chunk-s3csryxe.js.map +11 -0
- package/dist/chunk-s670k14v.js +60 -0
- package/dist/{chunk-407j3msh.js.map → chunk-s670k14v.js.map} +2 -2
- package/dist/chunk-skz0hst3.js +788 -0
- package/dist/chunk-skz0hst3.js.map +19 -0
- package/dist/{chunk-3z1qec12.js → chunk-t1f4f1ve.js} +107 -64
- package/dist/{chunk-3z1qec12.js.map → chunk-t1f4f1ve.js.map} +3 -3
- package/dist/chunk-v2vcg0w6.js +151 -0
- package/dist/chunk-v2vcg0w6.js.map +11 -0
- package/dist/{chunk-r8jrnexe.js → chunk-v4jbb3rs.js} +4 -4
- package/dist/{chunk-r8jrnexe.js.map → chunk-v4jbb3rs.js.map} +2 -2
- package/dist/{chunk-w1tvjszy.js → chunk-vsj3mdfj.js} +8 -8
- package/dist/{chunk-w1tvjszy.js.map → chunk-vsj3mdfj.js.map} +2 -2
- package/dist/{chunk-9dzba0f2.js → chunk-wjasrj67.js} +8 -8
- package/dist/{chunk-9dzba0f2.js.map → chunk-wjasrj67.js.map} +2 -2
- package/dist/{chunk-1evzqhks.js → chunk-wr8qp979.js} +6 -6
- package/dist/{chunk-1evzqhks.js.map → chunk-wr8qp979.js.map} +2 -2
- package/dist/{chunk-n6jxh8sw.js → chunk-wy0qdqfm.js} +18 -18
- package/dist/{chunk-n6jxh8sw.js.map → chunk-wy0qdqfm.js.map} +2 -2
- package/dist/{chunk-z4ccwbkz.js → chunk-x9v4cx1d.js} +1 -1
- package/dist/{chunk-ry24jbr1.js → chunk-yv79ncbv.js} +10 -10
- package/dist/{chunk-ry24jbr1.js.map → chunk-yv79ncbv.js.map} +2 -2
- package/dist/{chunk-yp8ee62z.js → chunk-z30bv4ga.js} +35 -35
- package/dist/{chunk-yp8ee62z.js.map → chunk-z30bv4ga.js.map} +2 -2
- package/dist/{chunk-8ydjhh27.js → chunk-z3y411fq.js} +11 -7
- package/dist/{chunk-8ydjhh27.js.map → chunk-z3y411fq.js.map} +3 -3
- package/dist/{chunk-9t8f5xfx.js → chunk-z5rnrmz1.js} +10 -10
- package/dist/{chunk-9t8f5xfx.js.map → chunk-z5rnrmz1.js.map} +2 -2
- package/dist/{chunk-96swp2wd.js → chunk-z667z3sg.js} +3 -3
- package/dist/{chunk-96swp2wd.js.map → chunk-z667z3sg.js.map} +2 -2
- package/dist/{chunk-4yqmp43v.js → chunk-z8fx5cgb.js} +12 -12
- package/dist/{chunk-4yqmp43v.js.map → chunk-z8fx5cgb.js.map} +2 -2
- package/dist/{chunk-yt8wphsx.js → chunk-zvx7h87b.js} +3 -3
- package/dist/{chunk-yt8wphsx.js.map → chunk-zvx7h87b.js.map} +2 -2
- package/dist/connectors/connections/authorizations.d.ts.map +1 -1
- package/dist/connectors/connections/contracts.d.ts +3 -0
- package/dist/connectors/connections/contracts.d.ts.map +1 -1
- package/dist/connectors/connections/internal.js +9 -10
- package/dist/connectors/connections/internal.js.map +1 -1
- package/dist/connectors/connections/request.d.ts +3 -1
- package/dist/connectors/connections/request.d.ts.map +1 -1
- package/dist/connectors/connections/runs.d.ts.map +1 -1
- package/dist/connectors/connections/tokens.d.ts.map +1 -1
- package/dist/connectors/connections/validation.d.ts +5 -1
- package/dist/connectors/connections/validation.d.ts.map +1 -1
- package/dist/connectors/types.d.ts +19 -4
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/datasets/write.js +8 -12
- package/dist/datasets/write.js.map +1 -1
- package/dist/edits/index.js +7 -8
- package/dist/edits/index.js.map +1 -1
- package/dist/error-reporting/internal.js +22 -24
- package/dist/error-reporting/internal.js.map +1 -1
- package/dist/errors/internal.d.ts +1 -1
- package/dist/errors/internal.d.ts.map +1 -1
- package/dist/errors/internal.js +22 -24
- package/dist/errors/internal.js.map +1 -1
- package/dist/errors/redaction.d.ts +8 -0
- package/dist/errors/redaction.d.ts.map +1 -0
- package/dist/errors/types.d.ts +4 -0
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/events/execution.d.ts +1 -1
- package/dist/events/execution.d.ts.map +1 -1
- package/dist/events/index.js +60 -63
- package/dist/events/index.js.map +1 -1
- package/dist/events/scope.js +4 -5
- package/dist/events/scope.js.map +1 -1
- package/dist/events/selectors/index.js +9 -10
- package/dist/events/selectors/index.js.map +1 -1
- package/dist/events/service.d.ts +2 -2
- package/dist/events/service.d.ts.map +1 -1
- package/dist/execution/agent.d.ts +3 -3
- package/dist/execution/agent.d.ts.map +1 -1
- package/dist/execution/agent.js +71 -82
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/durable.d.ts +1 -0
- package/dist/execution/durable.d.ts.map +1 -1
- package/dist/execution/primitive.d.ts +2 -0
- package/dist/execution/primitive.d.ts.map +1 -1
- package/dist/execution/primitive.js +64 -71
- package/dist/execution/primitive.js.map +3 -3
- package/dist/execution/request.d.ts +1 -0
- package/dist/execution/request.d.ts.map +1 -1
- package/dist/execution/request.js +66 -75
- package/dist/execution/request.js.map +3 -3
- package/dist/http/index.js +10 -11
- package/dist/http/index.js.map +1 -1
- package/dist/index.d.ts +17 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +457 -477
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/changes.d.ts +5 -0
- package/dist/lake-storage/changes.d.ts.map +1 -0
- package/dist/lake-storage/in-memory.d.ts +2 -1
- package/dist/lake-storage/in-memory.d.ts.map +1 -1
- package/dist/lake-storage/index.d.ts +2 -1
- package/dist/lake-storage/index.d.ts.map +1 -1
- package/dist/lake-storage/index.js +40 -42
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/lake-storage/types.d.ts +36 -0
- package/dist/lake-storage/types.d.ts.map +1 -1
- package/dist/logging/index.d.ts +3 -4
- package/dist/logging/index.d.ts.map +1 -1
- package/dist/logging/index.js +18 -40
- package/dist/logging/index.js.map +1 -1
- package/dist/logging/internal.d.ts +5 -0
- package/dist/logging/internal.d.ts.map +1 -0
- package/dist/logging/internal.js +43 -0
- package/dist/logging/internal.js.map +9 -0
- package/dist/materialization/index.d.ts +1 -1
- package/dist/materialization/index.d.ts.map +1 -1
- package/dist/materialization/index.js +46 -49
- package/dist/materialization/index.js.map +1 -1
- package/dist/materialization/model.d.ts +12 -1
- package/dist/materialization/model.d.ts.map +1 -1
- package/dist/materializer/index.d.ts +1 -1
- package/dist/materializer/index.d.ts.map +1 -1
- package/dist/materializer/index.js +137 -145
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/materializer.d.ts +5 -1
- package/dist/materializer/materializer.d.ts.map +1 -1
- package/dist/materializer/projections/entry-validator.d.ts +2 -1
- package/dist/materializer/projections/entry-validator.d.ts.map +1 -1
- package/dist/materializer/projections/replace.d.ts.map +1 -1
- package/dist/materializer/projections/source-materialization.d.ts +4 -3
- package/dist/materializer/projections/source-materialization.d.ts.map +1 -1
- package/dist/materializer/shared/normalize.d.ts +2 -1
- package/dist/materializer/shared/normalize.d.ts.map +1 -1
- package/dist/models/errors.d.ts +4 -0
- package/dist/models/errors.d.ts.map +1 -1
- package/dist/models/execution/binding.d.ts +9 -0
- package/dist/models/execution/binding.d.ts.map +1 -0
- package/dist/models/execution/errors.d.ts +9 -0
- package/dist/models/execution/errors.d.ts.map +1 -0
- package/dist/models/execution/index.d.ts +11 -0
- package/dist/models/execution/index.d.ts.map +1 -0
- package/dist/models/execution/index.js +55 -0
- package/dist/models/execution/index.js.map +9 -0
- package/dist/models/execution/model-call-accounting.d.ts +17 -0
- package/dist/models/execution/model-call-accounting.d.ts.map +1 -0
- package/dist/models/execution/model-call-admission.d.ts +47 -0
- package/dist/models/execution/model-call-admission.d.ts.map +1 -0
- package/dist/models/execution/model-call-limits.d.ts +15 -0
- package/dist/models/execution/model-call-limits.d.ts.map +1 -0
- package/dist/models/execution/model-call-recorder.d.ts +40 -0
- package/dist/models/execution/model-call-recorder.d.ts.map +1 -0
- package/dist/models/execution/model-call-recovery.d.ts +12 -0
- package/dist/models/execution/model-call-recovery.d.ts.map +1 -0
- package/dist/models/execution/recovery-queue.d.ts +5 -0
- package/dist/models/execution/recovery-queue.d.ts.map +1 -0
- package/dist/models/execution/types.d.ts +44 -0
- package/dist/models/execution/types.d.ts.map +1 -0
- package/dist/models/execution/usage.d.ts +5 -0
- package/dist/models/execution/usage.d.ts.map +1 -0
- package/dist/models/execution.d.ts +6 -0
- package/dist/models/execution.d.ts.map +1 -0
- package/dist/models/generation-types.d.ts +40 -0
- package/dist/models/generation-types.d.ts.map +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +42 -43
- package/dist/models/index.js.map +1 -1
- package/dist/models/language-model.d.ts +3 -0
- package/dist/models/language-model.d.ts.map +1 -1
- package/dist/models/output.d.ts +5 -0
- package/dist/models/output.d.ts.map +1 -0
- package/dist/models/resolve.d.ts +4 -0
- package/dist/models/resolve.d.ts.map +1 -0
- package/dist/objects/execution.d.ts.map +1 -1
- package/dist/objects/index.js +75 -87
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/query/index.js +67 -76
- package/dist/objects/query/index.js.map +1 -1
- package/dist/ontology/index.d.ts +1 -2
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/index.js +62 -113
- package/dist/ontology/index.js.map +1 -1
- package/dist/ontology/internal.d.ts +7 -0
- package/dist/ontology/internal.d.ts.map +1 -1
- package/dist/ontology/internal.js +65 -116
- package/dist/ontology/internal.js.map +3 -4
- package/dist/pipelines/index.js +57 -66
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pipelines/run-dispatch.d.ts.map +1 -1
- package/dist/projections/internal.js +56 -67
- package/dist/projections/internal.js.map +1 -1
- package/dist/projections/run-dispatch.d.ts.map +1 -1
- package/dist/query.d.ts +0 -1
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +11 -15
- package/dist/query.js.map +1 -1
- package/dist/queues/in-memory.d.ts +7 -3
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/queues/index.d.ts +2 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/index.js +6 -7
- package/dist/queues/index.js.map +1 -1
- package/dist/queues/indexed-heap.d.ts +15 -0
- package/dist/queues/indexed-heap.d.ts.map +1 -0
- package/dist/queues/types.d.ts +3 -20
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/rules/internal.js +4 -5
- package/dist/rules/internal.js.map +1 -1
- package/dist/runtime/create.d.ts +2 -1
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +2 -1
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/internal.js +13 -14
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/ontology-mutations.d.ts +3 -1
- package/dist/runtime/ontology-mutations.d.ts.map +1 -1
- package/dist/runtime/sixb.d.ts +2 -0
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/sandboxes/errors.d.ts +4 -0
- package/dist/sandboxes/errors.d.ts.map +1 -1
- package/dist/sandboxes/index.d.ts +2 -2
- package/dist/sandboxes/index.d.ts.map +1 -1
- package/dist/sandboxes/index.js +14 -13
- package/dist/sandboxes/index.js.map +1 -1
- package/dist/sandboxes/sandbox.d.ts +35 -7
- package/dist/sandboxes/sandbox.d.ts.map +1 -1
- package/dist/scheduler/index.js +9 -10
- package/dist/scheduler/index.js.map +1 -1
- package/dist/schedules/index.js +31 -33
- package/dist/schedules/index.js.map +1 -1
- package/dist/shares/internal.js +46 -54
- package/dist/shares/internal.js.map +2 -2
- package/dist/storage/action-runs/failure.js +7 -9
- package/dist/storage/action-runs/failure.js.map +1 -1
- package/dist/storage/action-runs/provider.js +4 -8
- package/dist/storage/action-runs/provider.js.map +1 -1
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +26 -30
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +0 -3
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/attribution.d.ts +4 -0
- package/dist/storage/ai-cost/attribution.d.ts.map +1 -0
- package/dist/storage/ai-cost/groups.d.ts +3 -0
- package/dist/storage/ai-cost/groups.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.d.ts +1 -0
- package/dist/storage/ai-cost/provider.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +30 -143
- package/dist/storage/ai-cost/provider.js.map +3 -4
- package/dist/storage/ai-cost/types.d.ts +15 -0
- package/dist/storage/ai-cost/types.d.ts.map +1 -1
- package/dist/storage/ai-limits/enforcement.js +14 -16
- package/dist/storage/ai-limits/enforcement.js.map +1 -1
- package/dist/storage/ai-limits/provider.js +56 -57
- package/dist/storage/ai-limits/provider.js.map +1 -1
- package/dist/storage/auth/in-memory.d.ts +1 -1
- package/dist/storage/auth/in-memory.d.ts.map +1 -1
- package/dist/storage/connector-connections/in-memory.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider/runs.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.js +35 -37
- package/dist/storage/connector-connections/provider.js.map +3 -3
- package/dist/storage/connector-connections/types.d.ts +3 -2
- package/dist/storage/connector-connections/types.d.ts.map +1 -1
- package/dist/storage/executions/in-memory.d.ts.map +1 -1
- package/dist/storage/executions/provider.d.ts +2 -1
- package/dist/storage/executions/provider.d.ts.map +1 -1
- package/dist/storage/executions/provider.js +14 -11
- package/dist/storage/executions/provider.js.map +3 -3
- package/dist/storage/executions/types.d.ts +6 -2
- package/dist/storage/executions/types.d.ts.map +1 -1
- package/dist/storage/executions/validation.d.ts +2 -0
- package/dist/storage/executions/validation.d.ts.map +1 -1
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +7 -8
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +221 -256
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +10 -0
- package/dist/storage/internal.d.ts.map +1 -0
- package/dist/storage/internal.js +47 -0
- package/dist/storage/internal.js.map +9 -0
- package/dist/storage/ontology/in-memory/materializations-state.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/shared-state.d.ts +15 -2
- package/dist/storage/ontology/in-memory/shared-state.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/source-roots.d.ts +6 -0
- package/dist/storage/ontology/in-memory/source-roots.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/sources.d.ts.map +1 -1
- package/dist/storage/ontology/index.d.ts +1 -1
- package/dist/storage/ontology/index.d.ts.map +1 -1
- package/dist/storage/ontology/provider.d.ts +16 -0
- package/dist/storage/ontology/provider.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +107 -109
- package/dist/storage/ontology/provider.js.map +1 -1
- package/dist/storage/ontology/sources.d.ts +13 -4
- package/dist/storage/ontology/sources.d.ts.map +1 -1
- package/dist/storage/operation-scope.js +18 -19
- package/dist/storage/operation-scope.js.map +1 -1
- package/dist/storage/pipeline-runs/provider.js +4 -6
- package/dist/storage/pipeline-runs/provider.js.map +1 -1
- package/dist/storage/projection-runs/lifecycle.d.ts.map +1 -1
- package/dist/storage/projection-runs/provider.js +66 -70
- package/dist/storage/projection-runs/provider.js.map +1 -1
- package/dist/storage/projection-runs/types.d.ts +2 -0
- package/dist/storage/projection-runs/types.d.ts.map +1 -1
- package/dist/storage/share-grants/provider.js +17 -19
- package/dist/storage/share-grants/provider.js.map +1 -1
- package/dist/storage/share-sessions/provider.js +14 -15
- package/dist/storage/share-sessions/provider.js.map +1 -1
- package/dist/storage/sync-runs/provider.js +4 -6
- package/dist/storage/sync-runs/provider.js.map +1 -1
- package/dist/storage/webhook-runs/provider.js +4 -6
- package/dist/storage/webhook-runs/provider.js.map +1 -1
- package/dist/storage/workflow-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +13 -21
- package/dist/storage/workflow-runs/provider.js.map +1 -1
- package/dist/storage/workflow-runs/types.d.ts +0 -3
- package/dist/storage/workflow-runs/types.d.ts.map +1 -1
- package/dist/syncs/index.js +56 -65
- package/dist/syncs/index.js.map +1 -1
- package/dist/syncs/run-dispatch.d.ts.map +1 -1
- package/dist/testing/action-execution.d.ts +4 -1
- package/dist/testing/action-execution.d.ts.map +1 -1
- package/dist/testing/agent-execution.d.ts +1 -0
- package/dist/testing/agent-execution.d.ts.map +1 -1
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-model-call-groups-contract.d.ts.map +1 -1
- package/dist/testing/broker-contract.d.ts.map +1 -1
- package/dist/testing/connector-connection-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution.d.ts +1 -0
- package/dist/testing/execution.d.ts.map +1 -1
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +2282 -1662
- package/dist/testing/index.js.map +16 -15
- package/dist/testing/lake-changes-contract.d.ts +6 -0
- package/dist/testing/lake-changes-contract.d.ts.map +1 -0
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/ontology-storage-contract.d.ts.map +1 -1
- package/dist/testing/projection-run-storage-contract.d.ts.map +1 -1
- package/dist/testing/workflow-execution.d.ts +1 -0
- package/dist/testing/workflow-execution.d.ts.map +1 -1
- package/dist/webhooks/connections.d.ts +6 -0
- package/dist/webhooks/connections.d.ts.map +1 -0
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.d.ts.map +1 -1
- package/dist/webhooks/internal.d.ts +2 -0
- package/dist/webhooks/internal.d.ts.map +1 -1
- package/dist/webhooks/internal.js +98 -61
- package/dist/webhooks/internal.js.map +4 -3
- package/dist/webhooks/registry.d.ts +1 -1
- package/dist/webhooks/registry.d.ts.map +1 -1
- package/dist/webhooks/types.d.ts +15 -4
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/workers/index.js +11 -13
- package/dist/workers/index.js.map +2 -2
- package/dist/workflows/failure.d.ts +2 -0
- package/dist/workflows/failure.d.ts.map +1 -1
- package/dist/workflows/index.js +136 -147
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/request.d.ts.map +1 -1
- package/dist/workflows/run-dispatch.d.ts +3 -2
- package/dist/workflows/run-dispatch.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +2 -0
- package/dist/workflows/types.d.ts.map +1 -1
- package/package.json +48 -30
- package/src/actions/run-dispatch.ts +2 -6
- package/src/actions/types/context.ts +2 -0
- package/src/actions/validation.ts +2 -1
- package/src/agents/adapters.ts +4 -9
- package/src/agents/{context.ts → context/entries.ts} +4 -4
- package/src/agents/context/index.ts +15 -0
- package/src/agents/context-model.ts +1 -1
- package/src/agents/context-resolution.ts +1 -1
- package/src/agents/index.ts +4 -4
- package/src/agents/message.ts +1 -1
- package/src/agents/model-loop.ts +8 -0
- package/src/agents/request.ts +11 -26
- package/src/agents/streams/index.ts +18 -0
- package/src/agents/streams/internal.ts +19 -0
- package/src/agents/{streams.ts → streams/protocol.ts} +5 -5
- package/src/agents/types.ts +1 -1
- package/src/agents/validation.ts +3 -7
- package/src/auth/index.ts +0 -1
- package/src/bootstrap/discovery.ts +81 -24
- package/src/bootstrap/index.ts +8 -1
- package/src/broker/in-memory.ts +104 -39
- package/src/broker/index.ts +4 -1
- package/src/broker/retention.ts +28 -0
- package/src/broker/subscriber.ts +21 -0
- package/src/broker/types.ts +15 -1
- package/src/connectors/builders.ts +0 -6
- package/src/connectors/connections/authorizations.ts +11 -5
- package/src/connectors/connections/contracts.ts +3 -0
- package/src/connectors/connections/request.ts +56 -22
- package/src/connectors/connections/runs.ts +1 -0
- package/src/connectors/connections/tokens.ts +4 -0
- package/src/connectors/connections/validation.ts +91 -5
- package/src/connectors/types.ts +19 -4
- package/src/errors/internal.ts +90 -10
- package/src/errors/redaction.ts +98 -0
- package/src/errors/types.ts +4 -0
- package/src/events/execution.ts +2 -2
- package/src/events/service.ts +3 -3
- package/src/execution/agent.ts +5 -3
- package/src/execution/durable.ts +11 -1
- package/src/execution/primitive.ts +5 -1
- package/src/execution/request.ts +3 -0
- package/src/index.ts +30 -20
- package/src/lake-storage/changes.ts +43 -0
- package/src/lake-storage/in-memory.ts +73 -0
- package/src/lake-storage/index.ts +4 -0
- package/src/lake-storage/types.ts +40 -0
- package/src/logging/index.ts +2 -33
- package/src/logging/internal.ts +43 -0
- package/src/logging/service.ts +1 -1
- package/src/materialization/index.ts +2 -0
- package/src/materialization/model.ts +14 -1
- package/src/materializer/index.ts +2 -0
- package/src/materializer/materializer.ts +10 -0
- package/src/materializer/projections/entry-validator.ts +19 -1
- package/src/materializer/projections/replace.ts +36 -1
- package/src/materializer/projections/source-materialization.ts +26 -6
- package/src/materializer/shared/normalize.ts +1 -1
- package/src/models/errors.ts +12 -0
- package/src/models/execution/binding.ts +29 -0
- package/src/models/execution/errors.ts +18 -0
- package/src/models/execution/index.ts +26 -0
- package/src/models/execution/model-call-accounting.ts +211 -0
- package/src/models/execution/model-call-admission.ts +127 -0
- package/src/models/execution/model-call-limits.ts +135 -0
- package/src/models/execution/model-call-recorder.ts +235 -0
- package/src/models/execution/model-call-recovery.ts +125 -0
- package/src/models/execution/recovery-queue.ts +31 -0
- package/src/models/execution/types.ts +58 -0
- package/src/models/execution/usage.ts +23 -0
- package/src/models/execution.ts +207 -0
- package/src/models/generation-types.ts +50 -0
- package/src/models/index.ts +8 -0
- package/src/models/language-model.ts +3 -0
- package/src/models/output.ts +45 -0
- package/src/models/resolve.ts +27 -0
- package/src/objects/execution.ts +1 -1
- package/src/ontology/index.ts +1 -2
- package/src/ontology/internal.ts +35 -0
- package/src/pipelines/run-dispatch.ts +21 -1
- package/src/projections/run-dispatch.ts +31 -68
- package/src/query.ts +0 -1
- package/src/queues/in-memory.ts +105 -62
- package/src/queues/index.ts +4 -2
- package/src/queues/indexed-heap.ts +74 -0
- package/src/queues/types.ts +6 -25
- package/src/runtime/create.ts +2 -1
- package/src/runtime/host.ts +2 -15
- package/src/runtime/ontology-mutations.ts +4 -0
- package/src/runtime/sixb.ts +4 -0
- package/src/sandboxes/errors.ts +5 -0
- package/src/sandboxes/index.ts +3 -0
- package/src/sandboxes/sandbox.ts +35 -7
- package/src/storage/agents/in-memory.ts +0 -3
- package/src/storage/agents/types.ts +0 -3
- package/src/storage/ai-cost/analytics.ts +1 -1
- package/src/storage/ai-cost/attribution.ts +15 -0
- package/src/storage/ai-cost/groups.ts +5 -1
- package/src/storage/ai-cost/provider.ts +1 -0
- package/src/storage/ai-cost/types.ts +7 -0
- package/src/storage/auth/in-memory.ts +1 -1
- package/src/storage/connector-connections/in-memory.ts +3 -1
- package/src/storage/connector-connections/provider/runs.ts +3 -1
- package/src/storage/connector-connections/types.ts +3 -2
- package/src/storage/executions/in-memory.ts +4 -9
- package/src/storage/executions/provider.ts +4 -0
- package/src/storage/executions/types.ts +6 -2
- package/src/storage/executions/validation.ts +32 -0
- package/src/storage/in-memory/index.ts +16 -1
- package/src/storage/index.ts +4 -29
- package/src/storage/internal.ts +20 -0
- package/src/storage/ontology/in-memory/materializations-state.ts +5 -18
- package/src/storage/ontology/in-memory/materializations.ts +73 -92
- package/src/storage/ontology/in-memory/shared-state.ts +26 -1
- package/src/storage/ontology/in-memory/source-roots.ts +123 -0
- package/src/storage/ontology/in-memory/sources.ts +78 -23
- package/src/storage/ontology/index.ts +1 -0
- package/src/storage/ontology/provider.ts +70 -0
- package/src/storage/ontology/sources.ts +14 -3
- package/src/storage/projection-runs/lifecycle.ts +5 -2
- package/src/storage/projection-runs/types.ts +4 -3
- package/src/storage/workflow-runs/in-memory.ts +0 -2
- package/src/storage/workflow-runs/types.ts +0 -3
- package/src/syncs/run-dispatch.ts +19 -1
- package/src/testing/action-execution.ts +9 -2
- package/src/testing/agent-execution.ts +3 -0
- package/src/testing/agent-storage-contract.ts +0 -5
- package/src/testing/ai-model-call-groups-contract.ts +74 -2
- package/src/testing/broker-contract.ts +95 -0
- package/src/testing/connector-connection-storage-contract.ts +18 -1
- package/src/testing/execution-storage-contract.ts +59 -1
- package/src/testing/execution.ts +6 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/lake-changes-contract.ts +240 -0
- package/src/testing/materializer-storage-contract.ts +172 -1
- package/src/testing/ontology-storage-contract.ts +7 -0
- package/src/testing/projection-run-storage-contract.ts +34 -0
- package/src/testing/workflow-execution.ts +4 -0
- package/src/webhooks/connections.ts +56 -0
- package/src/webhooks/index.ts +2 -0
- package/src/webhooks/internal.ts +2 -0
- package/src/webhooks/registry.ts +3 -4
- package/src/webhooks/types.ts +17 -4
- package/src/workflows/failure.ts +62 -1
- package/src/workflows/request.ts +0 -9
- package/src/workflows/run-dispatch.ts +42 -32
- package/src/workflows/types.ts +2 -0
- package/src/workflows/validation.ts +1 -1
- package/dist/agents/context.d.ts.map +0 -1
- package/dist/agents/context.js +0 -23
- package/dist/agents/streams.d.ts.map +0 -1
- package/dist/agents/streams.js +0 -55
- package/dist/chunk-08m3b6w8.js +0 -32
- package/dist/chunk-19jp6g9d.js.map +0 -11
- package/dist/chunk-2xns679x.js.map +0 -11
- package/dist/chunk-3xep5cjx.js.map +0 -15
- package/dist/chunk-407j3msh.js +0 -60
- package/dist/chunk-4qfkag59.js +0 -1568
- package/dist/chunk-4qfkag59.js.map +0 -20
- package/dist/chunk-5e3pq99w.js.map +0 -11
- package/dist/chunk-5gd7tpv6.js.map +0 -11
- package/dist/chunk-7y0f6rf1.js.map +0 -10
- package/dist/chunk-8m5ejdpn.js.map +0 -10
- package/dist/chunk-8tsf6dmc.js.map +0 -15
- package/dist/chunk-ajnan18g.js.map +0 -12
- package/dist/chunk-c15dr03f.js +0 -43
- package/dist/chunk-d8qkxt2v.js.map +0 -10
- package/dist/chunk-jq43kdvk.js +0 -50
- package/dist/chunk-k34z5rvh.js.map +0 -11
- package/dist/chunk-k522z7v6.js.map +0 -10
- package/dist/chunk-mth82m8t.js.map +0 -14
- package/dist/chunk-mwsxn98e.js.map +0 -36
- package/dist/chunk-p03r0h5s.js.map +0 -16
- package/dist/chunk-p1rzczbt.js +0 -218
- package/dist/chunk-rafagrwr.js.map +0 -11
- package/dist/chunk-rv2hkwwa.js.map +0 -14
- package/dist/chunk-sbzzr4kx.js.map +0 -63
- package/dist/chunk-tpnd31c1.js +0 -242
- package/dist/chunk-tpnd31c1.js.map +0 -11
- package/dist/chunk-w9tg6yyb.js.map +0 -12
- package/dist/chunk-wtf06et8.js.map +0 -14
- package/dist/chunk-xajtptbw.js.map +0 -40
- package/dist/chunk-xhy826cz.js.map +0 -10
- package/dist/chunk-y64skrwp.js +0 -19
- package/dist/chunk-zcnhxkvd.js +0 -7
- package/dist/logging/types.js +0 -27
- package/dist/logging/types.js.map +0 -9
- /package/dist/{chunk-zqqz8052.js → chunk-7n30ybym.js} +0 -0
- /package/dist/{chunk-zqqz8052.js.map → chunk-7n30ybym.js.map} +0 -0
- /package/dist/{chunk-4a849fr1.js.map → chunk-9tc8dxmn.js.map} +0 -0
- /package/dist/{chunk-j1sbhm7p.js → chunk-ey1nk510.js} +0 -0
- /package/dist/{chunk-j1sbhm7p.js.map → chunk-ey1nk510.js.map} +0 -0
- /package/dist/{chunk-z4ccwbkz.js.map → chunk-x9v4cx1d.js.map} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
createLinkPathSelection
|
|
4
|
+
} from "./chunk-f0rwz2vh.js";
|
|
5
|
+
|
|
6
|
+
// src/ontology/tokens.ts
|
|
7
|
+
function createPropertyTokenMap2(objectType) {
|
|
8
|
+
const tokenEntries = objectType.properties.map((property) => {
|
|
9
|
+
const token = {
|
|
10
|
+
objectTypeId: objectType.id,
|
|
11
|
+
id: property.id,
|
|
12
|
+
property
|
|
13
|
+
};
|
|
14
|
+
return [property.id, token];
|
|
15
|
+
});
|
|
16
|
+
return Object.fromEntries(tokenEntries);
|
|
17
|
+
}
|
|
18
|
+
function createLinkTokenMap2(objectType) {
|
|
19
|
+
const tokenEntries = objectType.links.map((link) => {
|
|
20
|
+
const token = {
|
|
21
|
+
objectTypeId: objectType.id,
|
|
22
|
+
id: link.id,
|
|
23
|
+
targetObjectTypeId: link.targetObjectTypeId,
|
|
24
|
+
link
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(token, "withLinks", {
|
|
27
|
+
configurable: false,
|
|
28
|
+
enumerable: false,
|
|
29
|
+
writable: false,
|
|
30
|
+
value: (...args) => createLinkPathSelection(token, args.length === 0 ? undefined : args[0])
|
|
31
|
+
});
|
|
32
|
+
return [link.id, token];
|
|
33
|
+
});
|
|
34
|
+
return Object.fromEntries(tokenEntries);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { createPropertyTokenMap2, createLinkTokenMap2 };
|
|
38
|
+
|
|
39
|
+
//# debugId=710872C866C65A1D64756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/ontology/tokens.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import {\n createLinkPathSelection,\n type LinkPathSelectionBuilder,\n type LinkPathSelectionInput,\n} from \"./link-path-selection\"\nimport type { ObjectLink, ObjectType, Property } from \"./types\"\n\ndeclare const propertyTokenBrand: unique symbol\ndeclare const linkTokenBrand: unique symbol\n\n/**\n * Strongly-typed handle to a property on a specific object type.\n *\n * Tokens let runtime APIs accept object properties without using string ids.\n */\nexport type PropertyToken<\n TObjectTypeId extends string = string,\n TPropertyId extends string = string,\n TProperty extends Property = Property,\n> = {\n readonly [propertyTokenBrand]?: never\n readonly objectTypeId: TObjectTypeId\n readonly id: TPropertyId\n readonly property: TProperty\n}\n\nexport type PropertyTokenMap<TObjectType extends ObjectType> = {\n readonly [P in TObjectType[\"properties\"][number] as P[\"id\"]]: PropertyToken<\n TObjectType[\"id\"],\n P[\"id\"],\n P\n >\n}\n\nexport type LinkToken<\n TObjectTypeId extends string = string,\n TLinkId extends string = string,\n TTargetObjectTypeId extends string | readonly string[] = string | readonly string[],\n TLink extends ObjectLink = ObjectLink,\n> = {\n readonly [linkTokenBrand]?: never\n readonly objectTypeId: TObjectTypeId\n readonly id: TLinkId\n readonly targetObjectTypeId: TTargetObjectTypeId\n readonly link: TLink\n} & LinkPathSelectionBuilder<TObjectTypeId, TLinkId, TTargetObjectTypeId>\n\nexport type LinkTokenMap<TObjectType extends ObjectType> = {\n readonly [L in TObjectType[\"links\"][number] as L[\"id\"]]: LinkToken<\n TObjectType[\"id\"],\n L[\"id\"],\n L[\"targetObjectTypeId\"],\n L\n >\n}\n\n/**\n * Object type with property tokens (`p.*`).\n *\n * The original ontology shape is preserved; this only adds typed handles.\n */\nexport type ObjectTypeWithPropertyTokens<TObjectType extends ObjectType = ObjectType> =\n TObjectType & {\n readonly p: PropertyTokenMap<TObjectType>\n }\n\n/**\n * Object type with property tokens (`p.*`) and link tokens (`l.*`).\n *\n * `links` is a plain array for iteration.\n * `l` provides keyed token access (`Room.l.hasThermostat`).\n */\nexport type ObjectTypeWithTokens<TObjectType extends ObjectType = ObjectType> =\n ObjectTypeWithPropertyTokens<TObjectType> & {\n readonly l: LinkTokenMap<TObjectType>\n }\n\n/**\n * Build the `objectType.p.*` token map once when the object type is defined.\n */\nexport function createPropertyTokenMap<TObjectType extends ObjectType>(\n objectType: TObjectType\n): PropertyTokenMap<TObjectType> {\n const tokenEntries = objectType.properties.map((property) => {\n const token: PropertyToken<TObjectType[\"id\"], typeof property.id, typeof property> = {\n objectTypeId: objectType.id,\n id: property.id,\n property,\n }\n return [property.id, token] as const\n })\n\n return Object.fromEntries(tokenEntries) as PropertyTokenMap<TObjectType>\n}\n\n/**\n * Build the `objectType.l.*` link token map once when the object type is defined.\n */\nexport function createLinkTokenMap<TObjectType extends ObjectType>(\n objectType: TObjectType\n): LinkTokenMap<TObjectType> {\n const tokenEntries = objectType.links.map((link) => {\n const token = {\n objectTypeId: objectType.id,\n id: link.id,\n targetObjectTypeId: link.targetObjectTypeId,\n link,\n } as LinkToken<TObjectType[\"id\"], typeof link.id, typeof link.targetObjectTypeId, typeof link>\n Object.defineProperty(token, \"withLinks\", {\n configurable: false,\n enumerable: false,\n writable: false,\n value: (...args: [links?: readonly LinkPathSelectionInput[]]) =>\n createLinkPathSelection(token, args.length === 0 ? undefined : args[0]),\n })\n return [link.id, token] as const\n })\n\n return Object.fromEntries(tokenEntries) as LinkTokenMap<TObjectType>\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;AAgFO,SAAS,uBAAsD,CACpE,YAC+B;AAAA,EAC/B,MAAM,eAAe,WAAW,WAAW,IAAI,CAAC,aAAa;AAAA,IAC3D,MAAM,QAA+E;AAAA,MACnF,cAAc,WAAW;AAAA,MACzB,IAAI,SAAS;AAAA,MACb;AAAA,IACF;AAAA,IACA,OAAO,CAAC,SAAS,IAAI,KAAK;AAAA,GAC3B;AAAA,EAED,OAAO,OAAO,YAAY,YAAY;AAAA;AAMjC,SAAS,mBAAkD,CAChE,YAC2B;AAAA,EAC3B,MAAM,eAAe,WAAW,MAAM,IAAI,CAAC,SAAS;AAAA,IAClD,MAAM,QAAQ;AAAA,MACZ,cAAc,WAAW;AAAA,MACzB,IAAI,KAAK;AAAA,MACT,oBAAoB,KAAK;AAAA,MACzB;AAAA,IACF;AAAA,IACA,OAAO,eAAe,OAAO,aAAa;AAAA,MACxC,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,OAAO,IAAI,SACT,wBAAwB,OAAO,KAAK,WAAW,IAAI,YAAY,KAAK,EAAE;AAAA,IAC1E,CAAC;AAAA,IACD,OAAO,CAAC,KAAK,IAAI,KAAK;AAAA,GACvB;AAAA,EAED,OAAO,OAAO,YAAY,YAAY;AAAA;",
|
|
8
|
+
"debugId": "710872C866C65A1D64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
captureSixbFailure2
|
|
4
|
+
} from "./chunk-f4w3yp4f.js";
|
|
5
5
|
|
|
6
6
|
// src/error-reporting/normalize.ts
|
|
7
7
|
function safeString(value) {
|
|
@@ -11,7 +11,7 @@ function safeString(value) {
|
|
|
11
11
|
return "Unknown thrown value";
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function normalizeReportedError2(value) {
|
|
15
15
|
if (value instanceof Error) {
|
|
16
16
|
return value;
|
|
17
17
|
}
|
|
@@ -38,14 +38,14 @@ function normalizeReportedError(value) {
|
|
|
38
38
|
// src/error-reporting/reporter.ts
|
|
39
39
|
var DEFAULT_FLUSH_TIMEOUT_MS = 5000;
|
|
40
40
|
|
|
41
|
-
class
|
|
41
|
+
class SixbErrorReporter2 {
|
|
42
42
|
handler;
|
|
43
43
|
pending = new Set;
|
|
44
44
|
constructor(handler) {
|
|
45
45
|
this.handler = handler;
|
|
46
46
|
}
|
|
47
47
|
report(error, context) {
|
|
48
|
-
const normalizedError =
|
|
48
|
+
const normalizedError = normalizeReportedError2(error);
|
|
49
49
|
if (!this.handler) {
|
|
50
50
|
reportToConsole(normalizedError, context);
|
|
51
51
|
return;
|
|
@@ -102,7 +102,7 @@ function resolveOccurredAt(occurredAt) {
|
|
|
102
102
|
return occurredAt.toISOString();
|
|
103
103
|
return occurredAt ?? new Date().toISOString();
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function reportRunFailure3(reporter, error, input) {
|
|
106
106
|
const occurredAt = input.failure.at;
|
|
107
107
|
reporter.report(error, {
|
|
108
108
|
...input,
|
|
@@ -111,7 +111,7 @@ function reportRunFailure(reporter, error, input) {
|
|
|
111
111
|
occurredAt
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function reportActionPhaseFailure3(reporter, error, input) {
|
|
115
115
|
reporter.report(error, {
|
|
116
116
|
type: "action.phase.failed",
|
|
117
117
|
notificationId: `project:${input.projectId}:action:${input.actionId}:run:${input.runId}:phase:${input.phase}:failed:${input.failure.at}`,
|
|
@@ -123,12 +123,12 @@ function reportActionPhaseFailure(reporter, error, input) {
|
|
|
123
123
|
failure: input.failure
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function reportEventDeliveryFailure3(reporter, error, input) {
|
|
127
127
|
const occurredAt = input.failure?.at ?? resolveOccurredAt(input.occurredAt);
|
|
128
128
|
const attempts = input.attempts ?? 1;
|
|
129
129
|
const eventIds = input.eventIds === undefined ? undefined : [...input.eventIds].sort();
|
|
130
130
|
const eventTypes = [...input.eventTypes];
|
|
131
|
-
const failure = input.failure ??
|
|
131
|
+
const failure = input.failure ?? captureSixbFailure2(error, {
|
|
132
132
|
allowedCodes: ["event.delivery_failed"],
|
|
133
133
|
defaultCode: "event.delivery_failed",
|
|
134
134
|
details: {
|
|
@@ -151,10 +151,10 @@ function reportEventDeliveryFailure(reporter, error, input) {
|
|
|
151
151
|
...eventIds === undefined ? {} : { eventIds }
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function reportRuleEvaluationFailure3(reporter, error, input) {
|
|
155
155
|
const occurredAt = resolveOccurredAt(input.occurredAt);
|
|
156
156
|
const eventIds = [...input.eventIds ?? []].sort();
|
|
157
|
-
const failure =
|
|
157
|
+
const failure = captureSixbFailure2(error, {
|
|
158
158
|
allowedCodes: ["internal.unexpected"],
|
|
159
159
|
defaultCode: "internal.unexpected",
|
|
160
160
|
details: {
|
|
@@ -179,6 +179,6 @@ function reportRuleEvaluationFailure(reporter, error, input) {
|
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
export {
|
|
182
|
+
export { normalizeReportedError2, SixbErrorReporter2, reportRunFailure3, reportActionPhaseFailure3, reportEventDeliveryFailure3, reportRuleEvaluationFailure3 };
|
|
183
183
|
|
|
184
|
-
//# debugId=
|
|
184
|
+
//# debugId=866F2695F864388E64756E2164756E21
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"import { normalizeReportedError } from \"./normalize\"\nimport type { SixbErrorContext, SixbErrorHandler } from \"./types\"\n\nconst DEFAULT_FLUSH_TIMEOUT_MS = 5_000\n\nexport interface ErrorReporter {\n report(error: unknown, context: SixbErrorContext): void\n}\n\n/** Failure-isolated, non-blocking adapter around the configured callback. */\nexport class SixbErrorReporter implements ErrorReporter {\n private readonly pending = new Set<Promise<void>>()\n\n constructor(private readonly handler?: SixbErrorHandler) {}\n\n report(error: unknown, context: SixbErrorContext): void {\n const normalizedError = normalizeReportedError(error)\n if (!this.handler) {\n reportToConsole(normalizedError, context)\n return\n }\n\n const invocation = Promise.resolve()\n .then(() => this.handler?.(normalizedError, context))\n .then(() => undefined)\n .catch((handlerError) => {\n try {\n console.error(\"[Sixb] onError handler failed:\", handlerError)\n } catch {\n // Error reporting must never escape back into framework execution.\n }\n })\n\n const tracked = invocation.finally(() => {\n this.pending.delete(tracked)\n })\n this.pending.add(tracked)\n }\n\n async flush(timeoutMs = DEFAULT_FLUSH_TIMEOUT_MS): Promise<void> {\n const deadline = Date.now() + Math.max(0, timeoutMs)\n while (this.pending.size > 0) {\n const remainingMs = deadline - Date.now()\n if (remainingMs <= 0 || !(await settleWithin([...this.pending], remainingMs))) {\n try {\n console.error(\n `[Sixb] Timed out after ${timeoutMs}ms waiting for ${this.pending.size} onError handler(s).`\n )\n } catch {\n // Error reporting must never escape back into framework shutdown.\n }\n return\n }\n }\n }\n}\n\nfunction reportToConsole(error: Error, context: SixbErrorContext): void {\n try {\n console.error(`[Sixb] Unhandled ${context.type}:`, error, context)\n } catch {\n // Error reporting must never escape back into framework execution.\n }\n}\n\nasync function settleWithin(\n promises: readonly Promise<void>[],\n timeoutMs: number\n): Promise<boolean> {\n let timeout: ReturnType<typeof setTimeout> | undefined\n try {\n return await Promise.race([\n Promise.allSettled(promises).then(() => true),\n new Promise<false>((resolve) => {\n timeout = setTimeout(() => resolve(false), timeoutMs)\n }),\n ])\n } finally {\n if (timeout) clearTimeout(timeout)\n }\n}\n",
|
|
7
7
|
"import { randomUUID } from \"node:crypto\"\nimport { captureSixbFailure } from \"../errors/internal\"\nimport type { SixbFailure } from \"../errors/types\"\nimport type { ActionRunFailure } from \"../storage/action-runs\"\nimport type { ErrorReporter } from \"./reporter\"\nimport type { SixbFailedRun } from \"./types\"\n\nfunction resolveOccurredAt(occurredAt?: Date | string): string {\n if (occurredAt instanceof Date) return occurredAt.toISOString()\n return occurredAt ?? new Date().toISOString()\n}\n\nexport type ReportRunFailureInput = SixbFailedRun & {\n readonly projectId: string\n readonly attempt?: number\n}\n\nexport function reportRunFailure(\n reporter: ErrorReporter,\n error: unknown,\n input: ReportRunFailureInput\n): void {\n const occurredAt = input.failure.at\n reporter.report(error, {\n ...input,\n type: \"run.failed\",\n notificationId: `project:${input.projectId}:run:${input.runKind}:${input.run.runId}:failed:${occurredAt}`,\n occurredAt,\n })\n}\n\nexport interface ReportActionPhaseFailureInput {\n readonly projectId: string\n readonly actionId: string\n readonly runId: string\n readonly phase: \"effects\"\n readonly failure: ActionRunFailure<\"effects\">\n}\n\nexport function reportActionPhaseFailure(\n reporter: ErrorReporter,\n error: unknown,\n input: ReportActionPhaseFailureInput\n): void {\n reporter.report(error, {\n type: \"action.phase.failed\",\n notificationId: `project:${input.projectId}:action:${input.actionId}:run:${input.runId}:phase:${input.phase}:failed:${input.failure.at}`,\n projectId: input.projectId,\n occurredAt: input.failure.at,\n actionId: input.actionId,\n runId: input.runId,\n phase: input.phase,\n failure: input.failure,\n })\n}\n\nexport interface ReportEventDeliveryFailureInput {\n readonly projectId: string\n /** Exact durable failure when this delivery was persisted by the ontology outbox. */\n readonly failure?: SixbFailure<\"event.delivery_failed\">\n /** Event types that never reached subscribers. Payloads must not be passed in. */\n readonly eventTypes: readonly string[]\n readonly occurredAt?: Date | string\n /** Delivery attempts so far. Defaults to 1, which is right for a rejected emit. */\n readonly attempts?: number\n /** Envelope ids, when the events were persisted before delivery failed. */\n readonly eventIds?: readonly string[]\n /**\n * Identity of this loss, used only when nothing was persisted. Defaults to a fresh id; pass one to\n * make a report reproducible in a test.\n */\n readonly occurrenceId?: string\n}\n\n/**\n * Report that domain events were lost.\n *\n * Both delivery paths land here: the outbox dispatcher, which has persisted envelope ids and retries,\n * and a rejected `events.emit()`, which has only the types. Reporting must work for both — an earlier\n * version returned early on an empty `eventIds`, which silently dropped exactly the case this exists\n * to surface.\n *\n * Each path keys on the strongest identity it has. The outbox persisted its envelopes, so the ids plus\n * the attempt number name the loss exactly and stay stable if one report is delivered twice. A rejected\n * emit persisted nothing and is always terminal at attempt 1, so the type list alone was its whole\n * correlation — and two schedules losing `schedule.triggered` in the same broker outage are dispatched\n * concurrently, land in the same millisecond, and were therefore one notification. A timestamp does not\n * fix that; an identity does.\n */\nexport function reportEventDeliveryFailure(\n reporter: ErrorReporter,\n error: unknown,\n input: ReportEventDeliveryFailureInput\n): void {\n const occurredAt = input.failure?.at ?? resolveOccurredAt(input.occurredAt)\n const attempts = input.attempts ?? 1\n const eventIds = input.eventIds === undefined ? undefined : [...input.eventIds].sort()\n const eventTypes = [...input.eventTypes]\n const failure =\n input.failure ??\n captureSixbFailure(error, {\n allowedCodes: [\"event.delivery_failed\"],\n defaultCode: \"event.delivery_failed\",\n details: {\n attempts,\n eventTypes,\n ...(eventIds === undefined ? {} : { eventIds }),\n },\n at: new Date(occurredAt),\n })\n const firstEventId = eventIds?.[0]\n const occurrence = firstEventId\n ? `events:${firstEventId}:attempt:${attempts}`\n : `emit:${input.occurrenceId ?? randomUUID()}`\n reporter.report(error, {\n type: \"event.delivery.failed\",\n notificationId: `project:${input.projectId}:event-delivery:${occurrence}`,\n projectId: input.projectId,\n occurredAt,\n failure,\n attempts,\n eventTypes,\n ...(eventIds === undefined ? {} : { eventIds }),\n })\n}\n\nexport interface ReportRuleEvaluationFailureInput {\n readonly projectId: string\n readonly source: \"live\" | \"reconciliation\"\n readonly eventIds?: readonly string[]\n readonly occurredAt?: Date | string\n /** Set when the failure could be attributed to one rule/subject candidate. */\n readonly ruleId?: string\n readonly subject?: { readonly objectTypeId: string; readonly primaryId: string }\n}\n\nexport function reportRuleEvaluationFailure(\n reporter: ErrorReporter,\n error: unknown,\n input: ReportRuleEvaluationFailureInput\n): void {\n const occurredAt = resolveOccurredAt(input.occurredAt)\n const eventIds = [...(input.eventIds ?? [])].sort()\n const failure = captureSixbFailure(error, {\n allowedCodes: [\"internal.unexpected\"],\n defaultCode: \"internal.unexpected\",\n details: {\n source: input.source,\n eventIds,\n ...(input.ruleId === undefined ? {} : { ruleId: input.ruleId }),\n ...(input.subject === undefined ? {} : { subject: input.subject }),\n },\n at: new Date(occurredAt),\n })\n // A candidate-level failure keys on the candidate, so two rules failing over the same batch stay\n // two notifications rather than collapsing into one.\n const occurrence =\n input.ruleId && input.subject\n ? `${input.ruleId}:${input.subject.objectTypeId}:${input.subject.primaryId}`\n : (eventIds[0] ?? \"current-state\")\n reporter.report(error, {\n type: \"rule.evaluation.failed\",\n notificationId: `project:${input.projectId}:rule-evaluation:${input.source}:${occurrence}:failed:${occurredAt}`,\n projectId: input.projectId,\n occurredAt,\n failure,\n source: input.source,\n eventIds,\n ...(input.ruleId === undefined ? {} : { ruleId: input.ruleId }),\n ...(input.subject === undefined ? {} : { subject: input.subject }),\n })\n}\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": ";;;;;;AAAA,SAAS,UAAU,CAAC,OAAwB;AAAA,EAC1C,IAAI;AAAA,IACF,OAAO,OAAO,KAAK;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA;AAAA;AAKJ,SAAS,
|
|
10
|
-
"debugId": "
|
|
9
|
+
"mappings": ";;;;;;AAAA,SAAS,UAAU,CAAC,OAAwB;AAAA,EAC1C,IAAI;AAAA,IACF,OAAO,OAAO,KAAK;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA;AAAA;AAKJ,SAAS,uBAAsB,CAAC,OAAuB;AAAA,EAC5D,IAAI,iBAAiB,OAAO;AAAA,IAC1B,OAAO;AAAA,EACT;AAAA,EAEA,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM;AAAA,IAC/C,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,MACF,UAAU,QAAQ,IAAI,OAAO,SAAS;AAAA,MACtC,OAAO,QAAQ,IAAI,OAAO,MAAM;AAAA,MAChC,MAAM;AAAA,MACN,OAAO,IAAI,MAAM,sBAAsB;AAAA;AAAA,IAGzC,IAAI,OAAO,YAAY,UAAU;AAAA,MAC/B,MAAM,QAAQ,IAAI,MAAM,OAAO;AAAA,MAC/B,IAAI,OAAO,SAAS,YAAY,KAAK,KAAK,GAAG;AAAA,QAC3C,MAAM,OAAO;AAAA,MACf;AAAA,MACA,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,OAAO,IAAI,MAAM,WAAW,KAAK,CAAC;AAAA;;;AC9BpC,IAAM,2BAA2B;AAAA;AAO1B,MAAM,m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GD,MAAM,aACJ,MAAM,UAAU,MAAM,UAClB,GAAG,MAAM,UAAU,MAAM,QAAQ,gBAAgB,MAAM,QAAQ,cAC9D,SAAS,MAAM;AAAA,EACtB,SAAS,OAAO,OAAO;AAAA,IACrB,MAAM;AAAA,IACN,gBAAgB,WAAW,MAAM,6BAA6B,MAAM,UAAU,qBAAqB;AAAA,IACnG,WAAW,MAAM;AAAA,IACjB;AAAA,IACA;AAAA,IACA,QAAQ,MAAM;AAAA,IACd;AAAA,OACI,MAAM,WAAW,YAAY,CAAC,IAAI,EAAE,QAAQ,MAAM,OAAO;AAAA,OACzD,MAAM,YAAY,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,QAAQ;AAAA,EAClE,CAAC;AAAA;",
|
|
10
|
+
"debugId": "866F2695F864388E64756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
SixbErrorReporter2,
|
|
4
|
+
reportRunFailure3,
|
|
5
|
+
reportActionPhaseFailure3,
|
|
6
|
+
reportEventDeliveryFailure3,
|
|
7
|
+
reportRuleEvaluationFailure3
|
|
8
|
+
} from "./chunk-72w2pxk7.js";
|
|
9
|
+
|
|
10
|
+
// src/error-reporting/capability.ts
|
|
11
|
+
var ERROR_REPORTER = Symbol("sixb.error-reporter");
|
|
12
|
+
var FALLBACK_REPORTER = new SixbErrorReporter2;
|
|
13
|
+
function asHost(value) {
|
|
14
|
+
if (typeof value !== "object" && typeof value !== "function" || value === null) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
function resolveSixbErrorReporter(host) {
|
|
20
|
+
return asHost(host)?.[ERROR_REPORTER] ?? FALLBACK_REPORTER;
|
|
21
|
+
}
|
|
22
|
+
function attachSixbErrorReporter2(host, handler) {
|
|
23
|
+
const reporter = new SixbErrorReporter2(handler);
|
|
24
|
+
host[ERROR_REPORTER] = reporter;
|
|
25
|
+
return reporter;
|
|
26
|
+
}
|
|
27
|
+
function shareSixbErrorReporter2(source, target) {
|
|
28
|
+
const reporter = source[ERROR_REPORTER];
|
|
29
|
+
if (reporter)
|
|
30
|
+
target[ERROR_REPORTER] = reporter;
|
|
31
|
+
}
|
|
32
|
+
function reportActionPhaseFailure2(host, error, input) {
|
|
33
|
+
reportActionPhaseFailure3(resolveSixbErrorReporter(host), error, input);
|
|
34
|
+
}
|
|
35
|
+
function reportRunFailure2(host, error, input) {
|
|
36
|
+
reportRunFailure3(resolveSixbErrorReporter(host), error, input);
|
|
37
|
+
}
|
|
38
|
+
function reportEventDeliveryFailure2(host, error, input) {
|
|
39
|
+
reportEventDeliveryFailure3(resolveSixbErrorReporter(host), error, input);
|
|
40
|
+
}
|
|
41
|
+
function reportRuleEvaluationFailure2(host, error, input) {
|
|
42
|
+
reportRuleEvaluationFailure3(resolveSixbErrorReporter(host), error, input);
|
|
43
|
+
}
|
|
44
|
+
async function flushSixbErrors2(host, timeoutMs) {
|
|
45
|
+
await resolveSixbErrorReporter(host).flush(timeoutMs);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { attachSixbErrorReporter2, shareSixbErrorReporter2, reportActionPhaseFailure2, reportRunFailure2, reportEventDeliveryFailure2, reportRuleEvaluationFailure2, flushSixbErrors2 };
|
|
49
|
+
|
|
50
|
+
//# debugId=0310499CECFA28FE64756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { SixbErrorReporter } from \"./reporter\"\nimport {\n type ReportActionPhaseFailureInput,\n type ReportEventDeliveryFailureInput,\n type ReportRuleEvaluationFailureInput,\n type ReportRunFailureInput,\n reportActionPhaseFailure as reportActionPhaseFailureWith,\n reportEventDeliveryFailure as reportEventDeliveryFailureWith,\n reportRuleEvaluationFailure as reportRuleEvaluationFailureWith,\n reportRunFailure as reportRunFailureWith,\n} from \"./reports\"\nimport type { SixbErrorHandler } from \"./types\"\n\nconst ERROR_REPORTER = Symbol(\"sixb.error-reporter\")\nconst FALLBACK_REPORTER = new SixbErrorReporter()\n\ntype ErrorReporterHost = {\n [ERROR_REPORTER]?: SixbErrorReporter\n}\n\nfunction asHost(value: unknown): ErrorReporterHost | null {\n if ((typeof value !== \"object\" && typeof value !== \"function\") || value === null) {\n return null\n }\n return value as ErrorReporterHost\n}\n\nfunction resolveSixbErrorReporter(host: unknown): SixbErrorReporter {\n return asHost(host)?.[ERROR_REPORTER] ?? FALLBACK_REPORTER\n}\n\nexport function attachSixbErrorReporter(\n host: object,\n handler?: SixbErrorHandler\n): SixbErrorReporter {\n const reporter = new SixbErrorReporter(handler)\n ;(host as ErrorReporterHost)[ERROR_REPORTER] = reporter\n return reporter\n}\n\nexport function shareSixbErrorReporter(source: object, target: object): void {\n const reporter = (source as ErrorReporterHost)[ERROR_REPORTER]\n if (reporter) (target as ErrorReporterHost)[ERROR_REPORTER] = reporter\n}\n\nexport type {\n ReportActionPhaseFailureInput,\n ReportEventDeliveryFailureInput,\n ReportRuleEvaluationFailureInput,\n ReportRunFailureInput,\n}\n\nexport function reportActionPhaseFailure(\n host: unknown,\n error: unknown,\n input: ReportActionPhaseFailureInput\n): void {\n reportActionPhaseFailureWith(resolveSixbErrorReporter(host), error, input)\n}\n\nexport function reportRunFailure(\n host: unknown,\n error: unknown,\n input: ReportRunFailureInput\n): void {\n reportRunFailureWith(resolveSixbErrorReporter(host), error, input)\n}\n\nexport function reportEventDeliveryFailure(\n host: unknown,\n error: unknown,\n input: ReportEventDeliveryFailureInput\n): void {\n reportEventDeliveryFailureWith(resolveSixbErrorReporter(host), error, input)\n}\n\nexport function reportRuleEvaluationFailure(\n host: unknown,\n error: unknown,\n input: ReportRuleEvaluationFailureInput\n): void {\n reportRuleEvaluationFailureWith(resolveSixbErrorReporter(host), error, input)\n}\n\nexport async function flushSixbErrors(host: unknown, timeoutMs?: number): Promise<void> {\n await resolveSixbErrorReporter(host).flush(time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ACN,4BAA+B,yBAAyB,IAAI,GAAG,OAAO,KAAK;AAAA;AAGtE,SAAS,4BAA2B,CACzC,MACA,OACA,OACM;AAAA,EACN,6BAAgC,yBAAyB,IAAI,GAAG,OAAO,KAAK;AAAA;AAG9E,eAAsB,gBAAe,CAAC,MAAe,WAAmC;AAAA,EACtF,MAAM,yBAAyB,IAAI,EAAE,MAAM,SAAS;AAAA;",
|
|
8
|
+
"debugId": "0310499CECFA28FE64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
MODEL_REASONING_LEVELS2,
|
|
4
|
+
isModelReasoning2
|
|
5
|
+
} from "./chunk-pqajwytd.js";
|
|
6
|
+
import {
|
|
7
|
+
findAgentRunExecution
|
|
8
|
+
} from "./chunk-ey1nk510.js";
|
|
9
|
+
import {
|
|
10
|
+
isFileRef2
|
|
11
|
+
} from "./chunk-h3v76ams.js";
|
|
12
|
+
|
|
13
|
+
// src/storage/agents/provider.ts
|
|
14
|
+
import { isDeepStrictEqual } from "util";
|
|
15
|
+
|
|
16
|
+
// src/agents/types.ts
|
|
17
|
+
var AGENT_REASONING_LEVELS2 = MODEL_REASONING_LEVELS2;
|
|
18
|
+
|
|
19
|
+
// src/storage/agents/errors.ts
|
|
20
|
+
class AgentStorageError2 extends Error {
|
|
21
|
+
code;
|
|
22
|
+
name = "AgentStorageError";
|
|
23
|
+
constructor(code, message) {
|
|
24
|
+
super(message);
|
|
25
|
+
this.code = code;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// src/storage/agents/provider.ts
|
|
30
|
+
function assertConversationAgentRunSpec2(spec, prefix = "Sixb") {
|
|
31
|
+
if (!isRecord(spec) || !isRecord(spec.model)) {
|
|
32
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Conversational Agent run spec must contain a model reference.`);
|
|
33
|
+
}
|
|
34
|
+
for (const [name, value] of [
|
|
35
|
+
["model.provider", spec.model.provider],
|
|
36
|
+
["model.modelId", spec.model.modelId]
|
|
37
|
+
]) {
|
|
38
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
39
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Conversational Agent run '${name}' must not be empty.`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (spec.reasoning !== undefined && !isModelReasoning2(spec.reasoning)) {
|
|
43
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Conversational Agent reasoning must be one of: ${AGENT_REASONING_LEVELS2.join(", ")}, or a nonnegative budgetTokens object.`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function isRecord(value) {
|
|
47
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
48
|
+
}
|
|
49
|
+
async function assertAgentRunExecution2(input) {
|
|
50
|
+
const execution = await findAgentRunExecution({
|
|
51
|
+
executions: input.executions,
|
|
52
|
+
projectId: input.projectId,
|
|
53
|
+
executionId: input.executionId,
|
|
54
|
+
runId: input.runId,
|
|
55
|
+
authority: { type: "inherited" }
|
|
56
|
+
});
|
|
57
|
+
if (!execution) {
|
|
58
|
+
throw new AgentStorageError2("invalid_input", `[Sixb] Execution '${input.executionId}' does not authorize Agent run '${input.runId}'.`);
|
|
59
|
+
}
|
|
60
|
+
return execution;
|
|
61
|
+
}
|
|
62
|
+
function assertCreateSubagentRunInput2(input, prefix = "Sixb") {
|
|
63
|
+
for (const [name, value] of [
|
|
64
|
+
["id", input.id],
|
|
65
|
+
["projectId", input.projectId],
|
|
66
|
+
["executionId", input.executionId],
|
|
67
|
+
["parentRunId", input.parentRunId],
|
|
68
|
+
["parentExecutionToken", input.parentExecutionToken],
|
|
69
|
+
["spawnKey", input.spawnKey],
|
|
70
|
+
["model.provider", input.spec.model.provider],
|
|
71
|
+
["model.modelId", input.spec.model.modelId],
|
|
72
|
+
["task", input.spec.task]
|
|
73
|
+
]) {
|
|
74
|
+
if (value.trim().length === 0) {
|
|
75
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Subagent run '${name}' must not be empty.`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (input.spawnKey.length > 128) {
|
|
79
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Subagent spawn key must not exceed 128 characters.`);
|
|
80
|
+
}
|
|
81
|
+
for (const [name, value] of [
|
|
82
|
+
["maxActiveChildren", input.maxActiveChildren],
|
|
83
|
+
["spec.maxSteps", input.spec.maxSteps]
|
|
84
|
+
]) {
|
|
85
|
+
if (!Number.isSafeInteger(value) || value < 1) {
|
|
86
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Subagent run '${name}' must be a positive safe integer.`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (new Set(input.spec.toolNames).size !== input.spec.toolNames.length) {
|
|
90
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Subagent run tool names must be unique.`);
|
|
91
|
+
}
|
|
92
|
+
if (input.spec.reasoning !== undefined && !isModelReasoning2(input.spec.reasoning)) {
|
|
93
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Subagent reasoning must be one of: ${AGENT_REASONING_LEVELS2.join(", ")}, or a nonnegative budgetTokens object.`);
|
|
94
|
+
}
|
|
95
|
+
if (input.spec.toolNames.some((name) => !name.trim())) {
|
|
96
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Subagent run tool names must not be empty.`);
|
|
97
|
+
}
|
|
98
|
+
if (input.createdAt && !Number.isFinite(input.createdAt.getTime())) {
|
|
99
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Subagent run createdAt must be a valid date.`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function subagentRunMatchesCreateInput2(run, input) {
|
|
103
|
+
return run.kind === "subagent" && run.id === input.id && run.projectId === input.projectId && run.executionId === input.executionId && run.parentRunId === input.parentRunId && run.spawnKey === input.spawnKey && isDeepStrictEqual(run.spec, input.spec);
|
|
104
|
+
}
|
|
105
|
+
function assertSubagentRunResult2(result, runId, prefix = "Sixb") {
|
|
106
|
+
const text = result?.text;
|
|
107
|
+
const files = result?.files;
|
|
108
|
+
const hasText = typeof text === "string" && text.trim().length > 0;
|
|
109
|
+
const hasFiles = Array.isArray(files) && files.length > 0 && files.every(isFileRef2);
|
|
110
|
+
if (!result || !hasText && !hasFiles) {
|
|
111
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Succeeded subagent run '${runId}' requires text or files.`);
|
|
112
|
+
}
|
|
113
|
+
if (text !== undefined && !hasText || files !== undefined && !hasFiles) {
|
|
114
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Subagent run '${runId}' has an invalid result.`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function assertCreateAgentContextCheckpointInput2(input, prefix = "Sixb") {
|
|
118
|
+
for (const [name, value] of [
|
|
119
|
+
["id", input.id],
|
|
120
|
+
["projectId", input.projectId],
|
|
121
|
+
["threadId", input.threadId],
|
|
122
|
+
["createdByRunId", input.createdByRunId],
|
|
123
|
+
["executionToken", input.executionToken],
|
|
124
|
+
["summary", input.summary],
|
|
125
|
+
["summaryModelId", input.summaryModelId]
|
|
126
|
+
]) {
|
|
127
|
+
if (value.trim().length === 0) {
|
|
128
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent context checkpoint '${name}' must not be empty.`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (input.summaryFormatVersion !== 1) {
|
|
132
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent context checkpoint summary format version must be 1.`);
|
|
133
|
+
}
|
|
134
|
+
if (input.reason !== "threshold" && input.reason !== "overflow") {
|
|
135
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent context checkpoint reason must be 'threshold' or 'overflow'.`);
|
|
136
|
+
}
|
|
137
|
+
if (input.expectedPreviousCheckpointId !== null && input.expectedPreviousCheckpointId.trim().length === 0) {
|
|
138
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent context checkpoint expected previous id must not be empty.`);
|
|
139
|
+
}
|
|
140
|
+
if (input.createdAt && !Number.isFinite(input.createdAt.getTime())) {
|
|
141
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent context checkpoint createdAt must be a valid date.`);
|
|
142
|
+
}
|
|
143
|
+
for (const [name, value, minimum] of [
|
|
144
|
+
["expectedHeadSeq", input.expectedHeadSeq, 1],
|
|
145
|
+
["summarizedThroughSeq", input.summarizedThroughSeq, 1],
|
|
146
|
+
["observedHeadSeq", input.observedHeadSeq, 1],
|
|
147
|
+
["estimatedInputTokensBefore", input.estimatedInputTokensBefore, 0],
|
|
148
|
+
["estimatedInputTokensAfter", input.estimatedInputTokensAfter, 0]
|
|
149
|
+
]) {
|
|
150
|
+
if (!Number.isSafeInteger(value) || value < minimum) {
|
|
151
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent context checkpoint '${name}' must be a safe integer greater than or equal to ${minimum}.`);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if (input.observedHeadSeq !== input.expectedHeadSeq) {
|
|
155
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent context checkpoint observed head must equal its expected message head.`);
|
|
156
|
+
}
|
|
157
|
+
if (input.summarizedThroughSeq >= input.observedHeadSeq) {
|
|
158
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent context checkpoint must retain the triggering head message.`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function assertAgentContextCheckpointAuthority2(input) {
|
|
162
|
+
const { create, run, thread } = input;
|
|
163
|
+
const prefix = input.prefix ?? "Sixb";
|
|
164
|
+
if (!run) {
|
|
165
|
+
throw new AgentStorageError2("run_not_found", `[${prefix}] Agent run '${create.createdByRunId}' not found for project '${create.projectId}'.`);
|
|
166
|
+
}
|
|
167
|
+
if (!thread) {
|
|
168
|
+
throw new AgentStorageError2("thread_not_found", `[${prefix}] Agent thread '${create.threadId}' not found for project '${create.projectId}'.`);
|
|
169
|
+
}
|
|
170
|
+
if (run.kind !== "conversation" || run.threadId !== create.threadId) {
|
|
171
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent run '${run.id}' does not belong to thread '${create.threadId}'.`);
|
|
172
|
+
}
|
|
173
|
+
if (run.status !== "running") {
|
|
174
|
+
throw new AgentStorageError2("invalid_state", `[${prefix}] Agent run '${run.id}' is not running (status '${run.status}').`);
|
|
175
|
+
}
|
|
176
|
+
if (!run.execution || run.execution.token !== create.executionToken) {
|
|
177
|
+
throw new AgentStorageError2("execution_lost", `[${prefix}] Execution token is no longer current on agent run '${run.id}'.`);
|
|
178
|
+
}
|
|
179
|
+
if (thread.activeRunId !== run.id) {
|
|
180
|
+
throw new AgentStorageError2("invalid_state", `[${prefix}] Agent run '${run.id}' no longer owns thread '${thread.id}'.`);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function assertAgentContextCheckpointAnchors2(input) {
|
|
184
|
+
const { create, latest, headSeq, firstRetained } = input;
|
|
185
|
+
const prefix = input.prefix ?? "Sixb";
|
|
186
|
+
if (headSeq !== create.expectedHeadSeq) {
|
|
187
|
+
throw new AgentStorageError2("invalid_state", `[${prefix}] Agent thread '${create.threadId}' message head changed from ${create.expectedHeadSeq} to ${headSeq}.`);
|
|
188
|
+
}
|
|
189
|
+
const latestId = latest?.id ?? null;
|
|
190
|
+
if (latestId !== create.expectedPreviousCheckpointId) {
|
|
191
|
+
throw new AgentStorageError2("invalid_state", `[${prefix}] Agent thread '${create.threadId}' checkpoint head changed.`);
|
|
192
|
+
}
|
|
193
|
+
if (latest && create.summarizedThroughSeq <= latest.summarizedThroughSeq) {
|
|
194
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent context checkpoint boundary must advance beyond sequence ${latest.summarizedThroughSeq}.`);
|
|
195
|
+
}
|
|
196
|
+
if (!firstRetained || firstRetained.seq !== create.summarizedThroughSeq + 1) {
|
|
197
|
+
throw new AgentStorageError2("invalid_state", `[${prefix}] Agent context checkpoint boundary does not align with stored thread messages.`);
|
|
198
|
+
}
|
|
199
|
+
if (firstRetained.role !== "user") {
|
|
200
|
+
throw new AgentStorageError2("invalid_input", `[${prefix}] Agent context checkpoint must retain a complete turn beginning with a user message.`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function assertAgentContextCheckpointReplayState2(input) {
|
|
204
|
+
const prefix = input.prefix ?? "Sixb";
|
|
205
|
+
if (input.headSeq !== input.create.expectedHeadSeq) {
|
|
206
|
+
throw new AgentStorageError2("invalid_state", `[${prefix}] Agent thread '${input.create.threadId}' message head changed from ${input.create.expectedHeadSeq} to ${input.headSeq}.`);
|
|
207
|
+
}
|
|
208
|
+
if (input.latest?.id !== input.existing.id) {
|
|
209
|
+
throw new AgentStorageError2("invalid_state", `[${prefix}] Agent thread '${input.create.threadId}' checkpoint head changed after '${input.existing.id}'.`);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function agentContextCheckpointMatchesCreateInput2(record, input) {
|
|
213
|
+
return record.id === input.id && record.projectId === input.projectId && record.threadId === input.threadId && record.createdByRunId === input.createdByRunId && (record.previousCheckpointId ?? null) === input.expectedPreviousCheckpointId && record.reason === input.reason && record.summary === input.summary && record.summaryFormatVersion === input.summaryFormatVersion && record.summarizedThroughSeq === input.summarizedThroughSeq && record.observedHeadSeq === input.observedHeadSeq && record.estimatedInputTokensBefore === input.estimatedInputTokensBefore && record.estimatedInputTokensAfter === input.estimatedInputTokensAfter && record.summaryModelId === input.summaryModelId;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export { AgentStorageError2, AGENT_REASONING_LEVELS2, assertConversationAgentRunSpec2, assertAgentRunExecution2, assertCreateSubagentRunInput2, subagentRunMatchesCreateInput2, assertSubagentRunResult2, assertCreateAgentContextCheckpointInput2, assertAgentContextCheckpointAuthority2, assertAgentContextCheckpointAnchors2, assertAgentContextCheckpointReplayState2, agentContextCheckpointMatchesCreateInput2 };
|
|
217
|
+
|
|
218
|
+
//# debugId=75F4EF2CC8E4D1CC64756E2164756E21
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"sources": ["../src/storage/agents/provider.ts", "../src/agents/types.ts", "../src/storage/agents/errors.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { isDeepStrictEqual } from \"node:util\"\nimport { AGENT_REASONING_LEVELS } from \"../../agents/types\"\nimport { isFileRef } from \"../../blob-storage\"\nimport { isModelReasoning } from \"../../models/language-model\"\nimport type { ExecutionRecord, ExecutionStorage } from \"../executions\"\nimport { findAgentRunExecution } from \"../executions/run-link\"\nimport { AgentStorageError } from \"./errors\"\nimport type {\n AgentContextCheckpointRecord,\n AgentMessageRecord,\n AgentRunRecord,\n AgentThreadRecord,\n ConversationAgentRunSpec,\n CreateAgentContextCheckpointInput,\n CreateSubagentRunInput,\n SubagentRunRecord,\n SubagentRunResult,\n} from \"./types\"\n\n/** Validate the provider-neutral model selection captured for a conversational turn. */\nexport function assertConversationAgentRunSpec(\n spec: ConversationAgentRunSpec,\n prefix = \"Sixb\"\n): void {\n if (!isRecord(spec) || !isRecord(spec.model)) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Conversational Agent run spec must contain a model reference.`\n )\n }\n for (const [name, value] of [\n [\"model.provider\", spec.model.provider],\n [\"model.modelId\", spec.model.modelId],\n ] as const) {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Conversational Agent run '${name}' must not be empty.`\n )\n }\n }\n if (spec.reasoning !== undefined && !isModelReasoning(spec.reasoning)) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Conversational Agent reasoning must be one of: ${AGENT_REASONING_LEVELS.join(\", \")}, or a nonnegative budgetTokens object.`\n )\n }\n}\n\nfunction isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value)\n}\n\n/** Validate the semantic link between a conversational Agent run and its immutable execution. */\nexport async function assertAgentRunExecution(input: {\n readonly executions: ExecutionStorage\n readonly projectId: string\n readonly executionId: string\n readonly runId: string\n}): Promise<ExecutionRecord> {\n const execution = await findAgentRunExecution({\n executions: input.executions,\n projectId: input.projectId,\n executionId: input.executionId,\n runId: input.runId,\n authority: { type: \"inherited\" },\n })\n if (!execution) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[Sixb] Execution '${input.executionId}' does not authorize Agent run '${input.runId}'.`\n )\n }\n return execution\n}\n\n/** Validate the provider-neutral payload of an idempotent child admission. */\nexport function assertCreateSubagentRunInput(input: CreateSubagentRunInput, prefix = \"Sixb\"): void {\n for (const [name, value] of [\n [\"id\", input.id],\n [\"projectId\", input.projectId],\n [\"executionId\", input.executionId],\n [\"parentRunId\", input.parentRunId],\n [\"parentExecutionToken\", input.parentExecutionToken],\n [\"spawnKey\", input.spawnKey],\n [\"model.provider\", input.spec.model.provider],\n [\"model.modelId\", input.spec.model.modelId],\n [\"task\", input.spec.task],\n ] as const) {\n if (value.trim().length === 0) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run '${name}' must not be empty.`\n )\n }\n }\n if (input.spawnKey.length > 128) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent spawn key must not exceed 128 characters.`\n )\n }\n for (const [name, value] of [\n [\"maxActiveChildren\", input.maxActiveChildren],\n [\"spec.maxSteps\", input.spec.maxSteps],\n ] as const) {\n if (!Number.isSafeInteger(value) || value < 1) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run '${name}' must be a positive safe integer.`\n )\n }\n }\n if (new Set(input.spec.toolNames).size !== input.spec.toolNames.length) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run tool names must be unique.`\n )\n }\n if (input.spec.reasoning !== undefined && !isModelReasoning(input.spec.reasoning)) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent reasoning must be one of: ${AGENT_REASONING_LEVELS.join(\", \")}, or a nonnegative budgetTokens object.`\n )\n }\n if (input.spec.toolNames.some((name) => !name.trim())) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run tool names must not be empty.`\n )\n }\n if (input.createdAt && !Number.isFinite(input.createdAt.getTime())) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run createdAt must be a valid date.`\n )\n }\n}\n\n/** Exact semantic match required when a durable spawn key is replayed. */\nexport function subagentRunMatchesCreateInput(\n run: AgentRunRecord,\n input: CreateSubagentRunInput\n): run is SubagentRunRecord {\n return (\n run.kind === \"subagent\" &&\n run.id === input.id &&\n run.projectId === input.projectId &&\n run.executionId === input.executionId &&\n run.parentRunId === input.parentRunId &&\n run.spawnKey === input.spawnKey &&\n isDeepStrictEqual(run.spec, input.spec)\n )\n}\n\n/** Validate the small durable result returned by a successful child. */\nexport function assertSubagentRunResult(\n result: SubagentRunResult | undefined,\n runId: string,\n prefix = \"Sixb\"\n): asserts result is SubagentRunResult {\n const text = result?.text\n const files = result?.files\n const hasText = typeof text === \"string\" && text.trim().length > 0\n const hasFiles = Array.isArray(files) && files.length > 0 && files.every(isFileRef)\n if (!result || (!hasText && !hasFiles)) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Succeeded subagent run '${runId}' requires text or files.`\n )\n }\n if ((text !== undefined && !hasText) || (files !== undefined && !hasFiles)) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run '${runId}' has an invalid result.`\n )\n }\n}\n\n/** Validate provider-independent checkpoint fields before entering a storage critical section. */\nexport function assertCreateAgentContextCheckpointInput(\n input: CreateAgentContextCheckpointInput,\n prefix = \"Sixb\"\n): void {\n for (const [name, value] of [\n [\"id\", input.id],\n [\"projectId\", input.projectId],\n [\"threadId\", input.threadId],\n [\"createdByRunId\", input.createdByRunId],\n [\"executionToken\", input.executionToken],\n [\"summary\", input.summary],\n [\"summaryModelId\", input.summaryModelId],\n ] as const) {\n if (value.trim().length === 0) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint '${name}' must not be empty.`\n )\n }\n }\n\n if (input.summaryFormatVersion !== 1) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint summary format version must be 1.`\n )\n }\n if (input.reason !== \"threshold\" && input.reason !== \"overflow\") {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint reason must be 'threshold' or 'overflow'.`\n )\n }\n if (\n input.expectedPreviousCheckpointId !== null &&\n input.expectedPreviousCheckpointId.trim().length === 0\n ) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint expected previous id must not be empty.`\n )\n }\n if (input.createdAt && !Number.isFinite(input.createdAt.getTime())) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint createdAt must be a valid date.`\n )\n }\n\n for (const [name, value, minimum] of [\n [\"expectedHeadSeq\", input.expectedHeadSeq, 1],\n [\"summarizedThroughSeq\", input.summarizedThroughSeq, 1],\n [\"observedHeadSeq\", input.observedHeadSeq, 1],\n [\"estimatedInputTokensBefore\", input.estimatedInputTokensBefore, 0],\n [\"estimatedInputTokensAfter\", input.estimatedInputTokensAfter, 0],\n ] as const) {\n if (!Number.isSafeInteger(value) || value < minimum) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint '${name}' must be a safe integer greater than or equal to ${minimum}.`\n )\n }\n }\n\n if (input.observedHeadSeq !== input.expectedHeadSeq) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint observed head must equal its expected message head.`\n )\n }\n if (input.summarizedThroughSeq >= input.observedHeadSeq) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint must retain the triggering head message.`\n )\n }\n}\n\n/** Assert that the current delivery still owns the active conversational run. */\nexport function assertAgentContextCheckpointAuthority(input: {\n readonly create: CreateAgentContextCheckpointInput\n readonly run: AgentRunRecord | null\n readonly thread: AgentThreadRecord | null\n readonly prefix?: string\n}): asserts input is typeof input & {\n readonly run: AgentRunRecord\n readonly thread: AgentThreadRecord\n} {\n const { create, run, thread } = input\n const prefix = input.prefix ?? \"Sixb\"\n if (!run) {\n throw new AgentStorageError(\n \"run_not_found\",\n `[${prefix}] Agent run '${create.createdByRunId}' not found for project '${create.projectId}'.`\n )\n }\n if (!thread) {\n throw new AgentStorageError(\n \"thread_not_found\",\n `[${prefix}] Agent thread '${create.threadId}' not found for project '${create.projectId}'.`\n )\n }\n if (run.kind !== \"conversation\" || run.threadId !== create.threadId) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent run '${run.id}' does not belong to thread '${create.threadId}'.`\n )\n }\n if (run.status !== \"running\") {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent run '${run.id}' is not running (status '${run.status}').`\n )\n }\n if (!run.execution || run.execution.token !== create.executionToken) {\n throw new AgentStorageError(\n \"execution_lost\",\n `[${prefix}] Execution token is no longer current on agent run '${run.id}'.`\n )\n }\n if (thread.activeRunId !== run.id) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent run '${run.id}' no longer owns thread '${thread.id}'.`\n )\n }\n}\n\n/** Assert both compare-and-swap anchors and the retained-turn boundary. */\nexport function assertAgentContextCheckpointAnchors(input: {\n readonly create: CreateAgentContextCheckpointInput\n readonly latest: AgentContextCheckpointRecord | null\n readonly headSeq: number\n readonly firstRetained: AgentMessageRecord | null\n readonly prefix?: string\n}): void {\n const { create, latest, headSeq, firstRetained } = input\n const prefix = input.prefix ?? \"Sixb\"\n if (headSeq !== create.expectedHeadSeq) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent thread '${create.threadId}' message head changed from ${create.expectedHeadSeq} to ${headSeq}.`\n )\n }\n\n const latestId = latest?.id ?? null\n if (latestId !== create.expectedPreviousCheckpointId) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent thread '${create.threadId}' checkpoint head changed.`\n )\n }\n if (latest && create.summarizedThroughSeq <= latest.summarizedThroughSeq) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint boundary must advance beyond sequence ${latest.summarizedThroughSeq}.`\n )\n }\n if (!firstRetained || firstRetained.seq !== create.summarizedThroughSeq + 1) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent context checkpoint boundary does not align with stored thread messages.`\n )\n }\n if (firstRetained.role !== \"user\") {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint must retain a complete turn beginning with a user message.`\n )\n }\n}\n\n/** Validate the mutable anchors again before returning an idempotently created checkpoint. */\nexport function assertAgentContextCheckpointReplayState(input: {\n readonly create: CreateAgentContextCheckpointInput\n readonly existing: AgentContextCheckpointRecord\n readonly latest: AgentContextCheckpointRecord | null\n readonly headSeq: number\n readonly prefix?: string\n}): void {\n const prefix = input.prefix ?? \"Sixb\"\n if (input.headSeq !== input.create.expectedHeadSeq) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent thread '${input.create.threadId}' message head changed from ${input.create.expectedHeadSeq} to ${input.headSeq}.`\n )\n }\n if (input.latest?.id !== input.existing.id) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent thread '${input.create.threadId}' checkpoint head changed after '${input.existing.id}'.`\n )\n }\n}\n\n/** Compare the durable semantic payload; delivery token and generated timestamp are not content. */\nexport function agentContextCheckpointMatchesCreateInput(\n record: AgentContextCheckpointRecord,\n input: CreateAgentContextCheckpointInput\n): boolean {\n return (\n record.id === input.id &&\n record.projectId === input.projectId &&\n record.threadId === input.threadId &&\n record.createdByRunId === input.createdByRunId &&\n (record.previousCheckpointId ?? null) === input.expectedPreviousCheckpointId &&\n record.reason === input.reason &&\n record.summary === input.summary &&\n record.summaryFormatVersion === input.summaryFormatVersion &&\n record.summarizedThroughSeq === input.summarizedThroughSeq &&\n record.observedHeadSeq === input.observedHeadSeq &&\n record.estimatedInputTokensBefore === input.estimatedInputTokensBefore &&\n record.estimatedInputTokensAfter === input.estimatedInputTokensAfter &&\n record.summaryModelId === input.summaryModelId\n )\n}\n",
|
|
6
|
-
"import type { BlobBody, FileRef } from \"../blob-storage\"\nimport type { ConnectorRuntime } from \"../connectors\"\nimport type { JsonPrimitive, JsonValue, ReadonlyJsonValue } from \"../json\"\nimport type { Logger } from \"../logging\"\nimport { type LanguageModelRef, MODEL_REASONING_LEVELS, type ModelReasoning } from \"../models\"\nimport type { InferSchema } from \"../ontology/inference\"\nimport type { Schema } from \"../ontology/types\"\n\nexport type {\n AgentContextEntryInput,\n AgentContextInput,\n AgentContextOrigin,\n AgentContextPart,\n} from \"./context\"\n\n/** Public capability reference used by security grants such as `can.run(agent)`. */\nexport interface AgentReference {\n readonly kind: \"agent\"\n readonly usage: AgentUsageReference\n}\n\n/** Project-wide AI accounting and limit capability, independent of permission to run the Agent. */\nexport interface AgentUsageReference {\n readonly kind: \"aiUsage\"\n}\n\n/** Public metadata for the project's conversational Agent. */\nexport interface AgentDescriptor {\n readonly name: string\n readonly model: LanguageModelRef\n}\n\nexport type AgentReasoning = ModelReasoning\n\n/** @deprecated Use {@link AgentReasoning}. */\nexport type AgentReasoningLevel = AgentReasoning\n\nexport const AGENT_REASONING_LEVELS = MODEL_REASONING_LEVELS\n\ntype Simplify<T> = { [K in keyof T]: T[K] } & {}\ntype JsonifyAgentToolInput<T> = unknown extends T\n ? ReadonlyJsonValue\n : T extends Date\n ? string\n : T extends readonly (infer TItem)[]\n ? readonly JsonifyAgentToolInput<TItem>[]\n : T extends JsonPrimitive\n ? T\n : T extends object\n ? { readonly [K in keyof T]: JsonifyAgentToolInput<T[K]> }\n : never\n\n/** A model-facing object shape expressed with Sixb's schema DSL. */\nexport type AgentToolInputSchema = Readonly<Record<string, Schema>>\n\n/** Infer the handler input represented by an agent tool schema. */\nexport type InferAgentToolInputSchema<TInput extends AgentToolInputSchema> =\n string extends keyof TInput\n ? Readonly<Record<string, unknown>>\n : Simplify<{\n readonly [K in keyof TInput]: JsonifyAgentToolInput<InferSchema<TInput[K]>>\n }>\n\n/** Identifies the conversational, workflow, or child Agent execution that invoked a tool. */\nexport type AgentToolRunInfo =\n | {\n readonly kind: \"conversation\"\n readonly id: string\n readonly threadId: string\n }\n | {\n readonly kind: \"subagent\"\n readonly id: string\n readonly parentRunId: string\n }\n | {\n readonly kind: \"workflow\"\n readonly id: string\n readonly workflowId: string\n readonly stepId: string\n }\n\n/** Input accepted by the run-scoped artifact publisher exposed to agent tools. */\nexport interface AgentToolArtifactPutInput {\n readonly body: BlobBody\n readonly fileName: string\n readonly mediaType?: string\n}\n\n/** A durable artifact and its path inside the current run sandbox. */\nexport interface AgentToolArtifact {\n readonly fileRef: FileRef\n readonly sandboxPath: string\n}\n\n/** The narrow artifact-writing surface available to an agent tool call. */\nexport interface AgentToolArtifacts {\n put(input: AgentToolArtifactPutInput): Promise<AgentToolArtifact>\n}\n\nexport type AgentToolTextContent = {\n readonly type: \"text\"\n readonly text: string\n}\n\nexport type AgentToolFileContent = {\n readonly type: \"file\"\n readonly fileRef: FileRef\n}\n\n/** Durable model-facing content returned by a file-aware tool. */\nexport type AgentToolContent = AgentToolTextContent | AgentToolFileContent\n\n/**\n * A file-aware tool result. The tag distinguishes this envelope from an ordinary JSON result while\n * keeping the whole value safe to persist in the durable tool-call trace.\n */\nexport type AgentToolResult = {\n readonly kind: \"agentToolResult\"\n readonly content: readonly AgentToolContent[]\n}\n\n/** The narrow, run-scoped surface passed to an agent tool handler. */\nexport interface AgentToolRunContext<\n TInput extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>,\n> {\n readonly input: TInput\n readonly toolCallId: string\n readonly signal: AbortSignal\n readonly run: AgentToolRunInfo\n readonly connector: ConnectorRuntime\n readonly logger: Logger\n readonly artifacts: AgentToolArtifacts\n}\n\n/** Agent tool handlers may return only values safe to persist in agent messages. */\nexport type AgentToolHandlerResult =\n | ReadonlyJsonValue\n | AgentToolResult\n | Promise<ReadonlyJsonValue | AgentToolResult>\n\nexport type AgentToolHandler<TInput extends Readonly<Record<string, unknown>>> = (\n context: AgentToolRunContext<TInput>\n) => AgentToolHandlerResult\n\n/**\n * Runtime definitions are stored heterogeneously. Keep variance erasure at this\n * boundary only; authoring through `run()` remains strictly contravariant.\n */\ntype StoredAgentToolHandler<TInput extends Readonly<Record<string, unknown>>> = {\n bivarianceHack(context: AgentToolRunContext<TInput>): JsonValue | Promise<JsonValue>\n}[\"bivarianceHack\"]\n\n/** A reusable, inert model tool definition selected explicitly by an agent. */\nexport interface AgentToolDefinition<\n TName extends string = string,\n TInput extends AgentToolInputSchema = AgentToolInputSchema,\n> {\n readonly kind: \"agentTool\"\n readonly name: TName\n readonly description: string\n readonly input: TInput\n readonly handler: StoredAgentToolHandler<InferAgentToolInputSchema<TInput>>\n}\n\n/** Infer the input received by a tool definition's handler. */\nexport type InferAgentToolInput<TTool extends AgentToolDefinition> = InferAgentToolInputSchema<\n TTool[\"input\"]\n>\n\nexport interface AgentToolRunBuilder<TName extends string, TInput extends AgentToolInputSchema> {\n run(\n handler: AgentToolHandler<InferAgentToolInputSchema<TInput>>\n ): AgentToolDefinition<TName, TInput>\n}\n\nexport interface AgentToolInputBuilder<TName extends string> {\n input<const TInput extends AgentToolInputSchema>(\n input: TInput\n ): AgentToolRunBuilder<TName, TInput>\n}\n\nexport interface AgentToolDescriptionBuilder<TName extends string> {\n description(description: string): AgentToolInputBuilder<TName>\n}\n",
|
|
6
|
+
"import type { BlobBody, FileRef } from \"../blob-storage\"\nimport type { ConnectorRuntime } from \"../connectors\"\nimport type { JsonPrimitive, JsonValue, ReadonlyJsonValue } from \"../json\"\nimport type { Logger } from \"../logging\"\nimport { type LanguageModelRef, MODEL_REASONING_LEVELS, type ModelReasoning } from \"../models\"\nimport type { InferSchema } from \"../ontology/inference\"\nimport type { Schema } from \"../ontology/types\"\n\nexport type {\n AgentContextEntryInput,\n AgentContextInput,\n AgentContextOrigin,\n AgentContextPart,\n} from \"./context/entries\"\n\n/** Public capability reference used by security grants such as `can.run(agent)`. */\nexport interface AgentReference {\n readonly kind: \"agent\"\n readonly usage: AgentUsageReference\n}\n\n/** Project-wide AI accounting and limit capability, independent of permission to run the Agent. */\nexport interface AgentUsageReference {\n readonly kind: \"aiUsage\"\n}\n\n/** Public metadata for the project's conversational Agent. */\nexport interface AgentDescriptor {\n readonly name: string\n readonly model: LanguageModelRef\n}\n\nexport type AgentReasoning = ModelReasoning\n\n/** @deprecated Use {@link AgentReasoning}. */\nexport type AgentReasoningLevel = AgentReasoning\n\nexport const AGENT_REASONING_LEVELS = MODEL_REASONING_LEVELS\n\ntype Simplify<T> = { [K in keyof T]: T[K] } & {}\ntype JsonifyAgentToolInput<T> = unknown extends T\n ? ReadonlyJsonValue\n : T extends Date\n ? string\n : T extends readonly (infer TItem)[]\n ? readonly JsonifyAgentToolInput<TItem>[]\n : T extends JsonPrimitive\n ? T\n : T extends object\n ? { readonly [K in keyof T]: JsonifyAgentToolInput<T[K]> }\n : never\n\n/** A model-facing object shape expressed with Sixb's schema DSL. */\nexport type AgentToolInputSchema = Readonly<Record<string, Schema>>\n\n/** Infer the handler input represented by an agent tool schema. */\nexport type InferAgentToolInputSchema<TInput extends AgentToolInputSchema> =\n string extends keyof TInput\n ? Readonly<Record<string, unknown>>\n : Simplify<{\n readonly [K in keyof TInput]: JsonifyAgentToolInput<InferSchema<TInput[K]>>\n }>\n\n/** Identifies the conversational, workflow, or child Agent execution that invoked a tool. */\nexport type AgentToolRunInfo =\n | {\n readonly kind: \"conversation\"\n readonly id: string\n readonly threadId: string\n }\n | {\n readonly kind: \"subagent\"\n readonly id: string\n readonly parentRunId: string\n }\n | {\n readonly kind: \"workflow\"\n readonly id: string\n readonly workflowId: string\n readonly stepId: string\n }\n\n/** Input accepted by the run-scoped artifact publisher exposed to agent tools. */\nexport interface AgentToolArtifactPutInput {\n readonly body: BlobBody\n readonly fileName: string\n readonly mediaType?: string\n}\n\n/** A durable artifact and its path inside the current run sandbox. */\nexport interface AgentToolArtifact {\n readonly fileRef: FileRef\n readonly sandboxPath: string\n}\n\n/** The narrow artifact-writing surface available to an agent tool call. */\nexport interface AgentToolArtifacts {\n put(input: AgentToolArtifactPutInput): Promise<AgentToolArtifact>\n}\n\nexport type AgentToolTextContent = {\n readonly type: \"text\"\n readonly text: string\n}\n\nexport type AgentToolFileContent = {\n readonly type: \"file\"\n readonly fileRef: FileRef\n}\n\n/** Durable model-facing content returned by a file-aware tool. */\nexport type AgentToolContent = AgentToolTextContent | AgentToolFileContent\n\n/**\n * A file-aware tool result. The tag distinguishes this envelope from an ordinary JSON result while\n * keeping the whole value safe to persist in the durable tool-call trace.\n */\nexport type AgentToolResult = {\n readonly kind: \"agentToolResult\"\n readonly content: readonly AgentToolContent[]\n}\n\n/** The narrow, run-scoped surface passed to an agent tool handler. */\nexport interface AgentToolRunContext<\n TInput extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>,\n> {\n readonly input: TInput\n readonly toolCallId: string\n readonly signal: AbortSignal\n readonly run: AgentToolRunInfo\n readonly connector: ConnectorRuntime\n readonly logger: Logger\n readonly artifacts: AgentToolArtifacts\n}\n\n/** Agent tool handlers may return only values safe to persist in agent messages. */\nexport type AgentToolHandlerResult =\n | ReadonlyJsonValue\n | AgentToolResult\n | Promise<ReadonlyJsonValue | AgentToolResult>\n\nexport type AgentToolHandler<TInput extends Readonly<Record<string, unknown>>> = (\n context: AgentToolRunContext<TInput>\n) => AgentToolHandlerResult\n\n/**\n * Runtime definitions are stored heterogeneously. Keep variance erasure at this\n * boundary only; authoring through `run()` remains strictly contravariant.\n */\ntype StoredAgentToolHandler<TInput extends Readonly<Record<string, unknown>>> = {\n bivarianceHack(context: AgentToolRunContext<TInput>): JsonValue | Promise<JsonValue>\n}[\"bivarianceHack\"]\n\n/** A reusable, inert model tool definition selected explicitly by an agent. */\nexport interface AgentToolDefinition<\n TName extends string = string,\n TInput extends AgentToolInputSchema = AgentToolInputSchema,\n> {\n readonly kind: \"agentTool\"\n readonly name: TName\n readonly description: string\n readonly input: TInput\n readonly handler: StoredAgentToolHandler<InferAgentToolInputSchema<TInput>>\n}\n\n/** Infer the input received by a tool definition's handler. */\nexport type InferAgentToolInput<TTool extends AgentToolDefinition> = InferAgentToolInputSchema<\n TTool[\"input\"]\n>\n\nexport interface AgentToolRunBuilder<TName extends string, TInput extends AgentToolInputSchema> {\n run(\n handler: AgentToolHandler<InferAgentToolInputSchema<TInput>>\n ): AgentToolDefinition<TName, TInput>\n}\n\nexport interface AgentToolInputBuilder<TName extends string> {\n input<const TInput extends AgentToolInputSchema>(\n input: TInput\n ): AgentToolRunBuilder<TName, TInput>\n}\n\nexport interface AgentToolDescriptionBuilder<TName extends string> {\n description(description: string): AgentToolInputBuilder<TName>\n}\n",
|
|
7
7
|
"export type AgentStorageErrorCode =\n | \"thread_not_found\"\n | \"active_run_exists\"\n | \"active_child_limit\"\n | \"run_not_found\"\n | \"invalid_input\"\n | \"invalid_state\"\n | \"execution_lost\"\n | \"duplicate_id\"\n\n/**\n * Error for agent-storage invariants and invalid state transitions (single-flight, execution\n * ownership, run lifecycle, message append). Callers branch on `code` rather than message text.\n */\nexport class AgentStorageError extends Error {\n readonly name = \"AgentStorageError\"\n\n constructor(\n readonly code: AgentStorageErrorCode,\n message: string\n ) {\n super(message)\n }\n}\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": ";;;;;;;;;;;;;AAAA;;;ACqCO,IAAM,
|
|
10
|
-
"debugId": "
|
|
9
|
+
"mappings": ";;;;;;;;;;;;;AAAA;;;ACqCO,IAAM,0BAAyB;;;ACvB/B,MAAM,2BAA0B,MAAM;AAAA,EAIhC;AAAA,EAHF,OAAO;AAAA,EAEhB,WAAW,CACA,MACT,SACA;AAAA,IACA,MAAM,OAAO;AAAA,IAHJ;AAAA;AAKb;;;AFHO,SAAS,+BAA8B,CAC5C,MACA,SA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