@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,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/agents/context-model.ts", "../src/agents/tool-result.ts", "../src/agents/adapters.ts", "../src/agents/api-gateway.ts", "../src/agents/validation.ts", "../src/agents/tool-definition.ts", "../src/agents/builders.ts", "../src/agents/context-compaction.ts", "../src/agents/reference.ts", "../src/agents/thread-context-projection.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { stableJsonStringify } from \"../json\"\nimport type { AgentContextPart } from \"./context/entries\"\n\n/** Project persisted context into one deterministic, escaped data block for the model. */\nexport function serializeAgentContextForModel(\n parts: readonly AgentContextPart[]\n): string | undefined {\n if (parts.length === 0) return undefined\n\n const lines = [\"<sixb_user_context>\"]\n for (const part of parts) {\n if (part.context.kind === \"object\") {\n lines.push(\n \" <object_context>\",\n ` <object_type_id>${escapeXml(part.context.ref.objectTypeId)}</object_type_id>`,\n ` <primary_id>${escapeXml(part.context.ref.primaryId)}</primary_id>`,\n \" </object_context>\"\n )\n continue\n }\n\n lines.push(\n \" <app_state_context>\",\n ` <id>${escapeXml(part.context.id)}</id>`,\n ` <description>${escapeXml(part.context.description)}</description>`,\n ` <value format=\"json\">${escapeXml(stableJsonStringify(part.context.value))}</value>`,\n \" </app_state_context>\"\n )\n }\n lines.push(\"</sixb_user_context>\")\n return lines.join(\"\\n\")\n}\n\nfunction escapeXml(value: string): string {\n return value\n .replaceAll(\"&\", \"&\")\n .replaceAll(\"<\", \"<\")\n .replaceAll(\">\", \">\")\n .replaceAll('\"', \""\")\n .replaceAll(\"'\", \"'\")\n}\n",
|
|
6
|
+
"import { isFileRef } from \"../blob-storage/validation\"\nimport { isPlainRecord } from \"../json\"\nimport type { AgentToolResult } from \"./types\"\n\n/** Narrow a durable JSON tool output to Sixb's file-aware result envelope. */\nexport function isAgentToolResult(value: unknown): value is AgentToolResult {\n return (\n isPlainRecord(value) &&\n value.kind === \"agentToolResult\" &&\n getInvalidAgentToolResultReason(value) === undefined\n )\n}\n\n/** Return a precise path when a tagged result does not satisfy the public rich-result contract. */\nexport function getInvalidAgentToolResultReason(value: unknown): string | undefined {\n if (!isPlainRecord(value) || value.kind !== \"agentToolResult\") {\n return undefined\n }\n\n if (!Array.isArray(value.content)) {\n return \"result.content must be an array\"\n }\n const unsupportedKey = Object.keys(value).find((key) => key !== \"kind\" && key !== \"content\")\n if (unsupportedKey) {\n return `result.${unsupportedKey} is not supported`\n }\n if (value.content.length === 0) {\n return \"result.content must contain at least one content part\"\n }\n\n for (let index = 0; index < value.content.length; index += 1) {\n const part = value.content[index]\n const path = `result.content[${index}]`\n if (!isPlainRecord(part)) {\n return `${path} must be a text or file content part`\n }\n if (part.type === \"text\") {\n if (typeof part.text !== \"string\") {\n return `${path}.text must be a string`\n }\n const unsupportedKey = Object.keys(part).find((key) => key !== \"type\" && key !== \"text\")\n if (unsupportedKey) {\n return `${path}.${unsupportedKey} is not supported`\n }\n continue\n }\n if (part.type === \"file\") {\n if (!isFileRef(part.fileRef)) {\n return `${path}.fileRef must be a valid FileRef`\n }\n const unsupportedKey = Object.keys(part).find((key) => key !== \"type\" && key !== \"fileRef\")\n if (unsupportedKey) {\n return `${path}.${unsupportedKey} is not supported`\n }\n continue\n }\n return `${path}.type must be 'text' or 'file'`\n }\n\n return undefined\n}\n",
|
|
7
|
+
"import type { JsonValue } from \"../json\"\nimport type {\n ModelAssistantPart,\n ModelFilePart,\n ModelMessage,\n ModelTextPart,\n ModelToolCallPart,\n ModelToolOutput,\n ModelToolResultPart,\n ProviderData,\n} from \"../models\"\nimport { serializeAgentContextForModel } from \"./context-model\"\nimport type {\n AgentFilePart,\n AgentMessage,\n AgentMessagePart,\n AgentTextPart,\n AgentToolCallPart,\n} from \"./message\"\nimport { isAgentToolResult } from \"./tool-result\"\nimport type { AgentToolFileContent } from \"./types\"\n\nexport interface AgentFileDataResolverInput<TMessage extends AgentMessage = AgentMessage> {\n readonly message: TMessage\n readonly part: AgentFilePart\n readonly partIndex: number\n}\n\nexport interface AgentFileDataProjection {\n readonly data: URL\n readonly mediaType?: string\n readonly filename?: string\n}\n\nexport interface AgentToolResultFileResolverInput<TMessage extends AgentMessage = AgentMessage> {\n readonly message: TMessage\n readonly part: AgentToolCallPart\n readonly partIndex: number\n readonly contentPart: AgentToolFileContent\n readonly contentIndex: number\n}\n\nexport interface ToModelMessagesOptions<TMessage extends AgentMessage = AgentMessage> {\n /**\n * Convert a stored file reference into model-readable data. When omitted, file parts are skipped\n * rather than leaking blob ids or passing an unsupported Sixb-only shape to model providers.\n */\n readonly fileData?:\n | ((input: AgentFileDataResolverInput<TMessage>) => URL | AgentFileDataProjection | undefined)\n | undefined\n /**\n * Convert a user file reference into model-readable text context. This is appended before any\n * file data part so metadata, truncation notes, and sandbox/API access hints stay visible even for\n * models that cannot consume inline files.\n */\n readonly fileText?: (input: AgentFileDataResolverInput<TMessage>) => string | undefined\n /** Add current metadata, sandbox paths, and projection notes for a tool-result file. */\n readonly toolResultFileText?: (\n input: AgentToolResultFileResolverInput<TMessage>\n ) => string | undefined\n}\n\n/**\n * Project durable messages into Sixb model messages. Assistant parts are grouped\n * into blocks at each `step-start`; each nonempty block yields one `assistant` message plus, for any\n * non-provider-executed tool calls, one `tool` message. Provider-executed tool results stay inline\n * in the assistant message. Without a tool registry, a string output maps to `text` and anything\n * else to `json`; this is the documented fidelity scope (a tool's custom `toModelOutput` is not\n * reproduced). Assistant file attachments are not projected as assistant-authored text.\n */\nexport function toModelMessages<TMessage extends AgentMessage>(\n messages: readonly TMessage[],\n options: ToModelMessagesOptions<TMessage> = {}\n): ModelMessage[] {\n const result: ModelMessage[] = []\n for (const message of messages) {\n switch (message.role) {\n case \"system\":\n result.push(systemModelMessage(message))\n break\n case \"user\":\n result.push(userModelMessage(message, options))\n break\n case \"assistant\":\n appendAssistantModelMessages(result, message, options)\n break\n }\n }\n return result\n}\n\nfunction systemModelMessage(message: AgentMessage): ModelMessage {\n const textParts = message.parts.filter((part) => part.type === \"text\")\n const providerData = mergeProviderMetadata(textParts)\n return {\n role: \"system\",\n content: textParts.map((part) => part.text).join(\"\"),\n ...(providerData === undefined ? {} : { providerData }),\n }\n}\n\nfunction mergeProviderMetadata(parts: readonly AgentTextPart[]): ProviderData | undefined {\n let merged: Record<string, JsonValue> | undefined\n for (const part of parts) {\n const meta = part.providerMetadata\n if (meta !== undefined && typeof meta === \"object\" && meta !== null && !Array.isArray(meta)) {\n merged = { ...(merged ?? {}), ...meta }\n }\n }\n return merged\n}\n\nfunction userModelMessage<TMessage extends AgentMessage>(\n message: TMessage,\n options: ToModelMessagesOptions<TMessage>\n): ModelMessage {\n const content: (ModelTextPart | ModelFilePart)[] = []\n const serializedContext = serializeAgentContextForModel(\n message.parts.filter((part) => part.type === \"context\")\n )\n if (serializedContext) {\n content.push({ type: \"text\", text: `${serializedContext}\\n\\n` })\n }\n message.parts.forEach((part, partIndex) => {\n if (part.type === \"text\") {\n content.push({\n type: \"text\",\n text: part.text,\n ...(part.providerMetadata === undefined ? {} : { providerData: part.providerMetadata }),\n })\n return\n }\n if (part.type === \"file\") {\n const fileContext = options.fileText?.({ message, part, partIndex })\n if (fileContext) {\n content.push({ type: \"text\", text: fileContext })\n }\n const resolved = options.fileData?.({ message, part, partIndex })\n if (resolved) {\n const projection = resolved instanceof URL ? { data: resolved } : resolved\n content.push({\n type: \"file\",\n data: projection.data,\n mediaType: projection.mediaType ?? part.fileRef.mediaType ?? \"application/octet-stream\",\n ...(projection.filename !== undefined\n ? { filename: projection.filename }\n : part.fileRef.fileName === undefined\n ? {}\n : { filename: part.fileRef.fileName }),\n ...(part.providerMetadata === undefined ? {} : { providerData: part.providerMetadata }),\n })\n }\n }\n })\n return { role: \"user\", content }\n}\n\nfunction appendAssistantModelMessages<TMessage extends AgentMessage>(\n result: ModelMessage[],\n message: TMessage,\n options: ToModelMessagesOptions<TMessage>\n): void {\n let block: Array<{ readonly part: AgentMessagePart; readonly partIndex: number }> = []\n const flush = (): void => {\n if (block.length === 0) {\n return\n }\n const current = block\n block = []\n\n const content: ModelAssistantPart[] = []\n const toolResults: ModelToolResultPart[] = []\n for (const { part, partIndex } of current) {\n if (part.type === \"text\" || part.type === \"reasoning\") {\n content.push({\n type: part.type,\n text: part.text,\n ...(part.providerMetadata === undefined ? {} : { providerData: part.providerMetadata }),\n })\n } else if (part.type === \"tool-call\") {\n content.push(toolCallModelPart(part))\n if (part.providerExecuted === true) {\n content.push(toolResultModelPart(message, part, partIndex, \"json\", options))\n } else {\n toolResults.push(toolResultModelPart(message, part, partIndex, \"text\", options))\n }\n } else if (part.type === \"provider-state\") {\n content.push({\n type: \"provider-state\",\n providerId: part.providerId,\n data: part.data,\n })\n }\n }\n if (content.length > 0) result.push({ role: \"assistant\", content })\n\n if (toolResults.length > 0) {\n result.push({ role: \"tool\", content: toolResults })\n }\n }\n\n message.parts.forEach((part, partIndex) => {\n if (part.type === \"step-start\") {\n flush()\n } else {\n block.push({ part, partIndex })\n }\n })\n flush()\n}\n\nfunction toolCallModelPart(part: AgentToolCallPart): ModelToolCallPart {\n return {\n type: \"tool-call\",\n toolCallId: part.toolCallId,\n toolName: part.toolName,\n input: part.input,\n ...(part.providerExecuted === undefined ? {} : { providerExecuted: part.providerExecuted }),\n ...(part.providerMetadata === undefined ? {} : { providerData: part.providerMetadata }),\n }\n}\n\nfunction toolResultModelPart<TMessage extends AgentMessage>(\n message: TMessage,\n part: AgentToolCallPart,\n partIndex: number,\n errorMode: \"text\" | \"json\",\n options: ToModelMessagesOptions<TMessage>\n): ModelToolResultPart {\n // Stored providerMetadata belongs to the call, not this synthesized result. Replaying it here\n // can replace the result with the provider's original tool-call block.\n return {\n type: \"tool-result\",\n toolCallId: part.toolCallId,\n toolName: part.toolName,\n output: toolResultOutput(message, part, partIndex, errorMode, options),\n }\n}\n\nfunction toolResultOutput<TMessage extends AgentMessage>(\n message: TMessage,\n part: AgentToolCallPart,\n partIndex: number,\n errorMode: \"text\" | \"json\",\n options: ToModelMessagesOptions<TMessage>\n): ModelToolOutput {\n if (part.state === \"output-error\") {\n return errorMode === \"json\"\n ? { type: \"error-json\", value: part.errorText }\n : { type: \"error-text\", value: part.errorText }\n }\n if (isAgentToolResult(part.output)) {\n const value: string[] = []\n part.output.content.forEach((contentPart, contentIndex) => {\n if (contentPart.type === \"text\") {\n value.push(contentPart.text)\n return\n }\n\n const fileContext = options.toolResultFileText?.({\n message,\n part,\n partIndex,\n contentPart,\n contentIndex,\n })\n value.push(fileContext ?? toolResultFileFallbackText(contentPart))\n })\n return { type: \"text\", value: value.join(\"\\n\") }\n }\n return typeof part.output === \"string\"\n ? { type: \"text\", value: part.output }\n : { type: \"json\", value: part.output }\n}\n\nfunction toolResultFileFallbackText(part: AgentToolFileContent): string {\n const attributes = [\n part.fileRef.fileName ? `name=${JSON.stringify(part.fileRef.fileName)}` : undefined,\n part.fileRef.mediaType ? `mediaType=${JSON.stringify(part.fileRef.mediaType)}` : undefined,\n `sizeBytes=${part.fileRef.sizeBytes}`,\n ].filter((value): value is string => value !== undefined)\n return `[Tool-created file: ${attributes.join(\" \")}. Contents are not available inline.]`\n}\n",
|
|
8
|
+
"import { createHmac, timingSafeEqual } from \"node:crypto\"\nimport { SIXB_API_ROUTES } from \"../http/api-routes\"\nimport { matchesPathPattern, normalizeRoutePath } from \"../http/route-pattern\"\n\nexport const AGENT_API_GATEWAY_PREFIX = \"/__sixb/agent-api\"\n\nconst AGENT_API_GATEWAY_CAPABILITY_PREFIX = \"sixb_agw_v1_\"\n\nexport interface AgentApiGatewayCapabilityInput {\n readonly projectId: string\n readonly runId: string\n readonly executionToken: string\n}\n\nexport interface AgentApiRoute {\n readonly method: string\n readonly path: string\n}\n\n/**\n * The routes the agent API gateway may proxy — the `agentApi` projection of the canonical\n * {@link SIXB_API_ROUTES} table, so this list can never drift from (nor exceed) the bearer boundary.\n */\nexport const AGENT_API_ROUTES: readonly AgentApiRoute[] = SIXB_API_ROUTES.filter(\n (route) => route.agentApi\n).map((route) => ({ method: route.method, path: route.path }))\n\nexport function createAgentApiGatewayCapability(input: AgentApiGatewayCapabilityInput): string {\n return `${AGENT_API_GATEWAY_CAPABILITY_PREFIX}${capabilityDigest(input)}`\n}\n\nexport function isValidAgentApiGatewayCapability(\n input: AgentApiGatewayCapabilityInput & { readonly capability: string }\n): boolean {\n const expected = createAgentApiGatewayCapability(input)\n const actual = input.capability\n const expectedBuffer = Buffer.from(expected)\n const actualBuffer = Buffer.from(actual)\n return (\n expectedBuffer.byteLength === actualBuffer.byteLength &&\n timingSafeEqual(expectedBuffer, actualBuffer)\n )\n}\n\nexport function isAllowedAgentApiRequest(method: string, pathname: string): boolean {\n const normalizedMethod = method.toUpperCase()\n const normalizedPath = normalizeRoutePath(pathname)\n return AGENT_API_ROUTES.some(\n (route) => route.method === normalizedMethod && matchesPathPattern(normalizedPath, route.path)\n )\n}\n\nfunction capabilityDigest(input: AgentApiGatewayCapabilityInput): string {\n return createHmac(\"sha256\", input.executionToken)\n .update(`agent-api-gateway:${input.projectId}:${input.runId}`)\n .digest(\"base64url\")\n}\n",
|
|
9
|
+
"import { getInvalidJsonValueReason, isPlainRecord, type JsonValue } from \"../json\"\nimport { type ObjectSchema, OntologyValidationError, type ValueType } from \"../ontology\"\nimport { normalizeSchemaValue } from \"../ontology/validation/normalize\"\nimport { validateSchemaValue } from \"../ontology/validation/schema\"\nimport { AgentDefinitionError } from \"./errors\"\nimport type { AgentToolDefinition, AgentToolInputSchema } from \"./types\"\n\nconst AGENT_TOOL_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_-]{0,63}$/\nconst AGENT_TOOL_PRIMITIVE_SCHEMAS = new Set([\n \"string\",\n \"integer\",\n \"double\",\n \"decimal\",\n \"boolean\",\n \"date\",\n \"timestamp\",\n \"uuid\",\n \"fileRef\",\n])\n\nexport const AGENT_RESERVED_TOOL_NAMES = [\n \"bash\",\n \"read\",\n \"view_file\",\n \"spawn_agent\",\n \"wait_agent\",\n] as const\n\nexport function isAgentToolDefinition(value: unknown): value is AgentToolDefinition {\n return (\n isRecord(value) &&\n value.kind === \"agentTool\" &&\n typeof value.name === \"string\" &&\n typeof value.description === \"string\" &&\n isPlainRecord(value.input) &&\n typeof value.handler === \"function\"\n )\n}\n\nexport function assertValidAgentToolName(name: unknown): asserts name is string {\n if (typeof name !== \"string\" || !AGENT_TOOL_NAME_PATTERN.test(name)) {\n throw new AgentDefinitionError(\n \"[Sixb] Agent tool name must be 1-64 characters, start with a letter or underscore, and contain only letters, numbers, underscores, or hyphens.\"\n )\n }\n if ((AGENT_RESERVED_TOOL_NAMES as readonly string[]).includes(name)) {\n throw new AgentDefinitionError(`[Sixb] Agent tool name '${name}' is reserved by the framework.`)\n }\n}\n\nexport function assertValidAgentToolDescription(name: string, description: unknown): void {\n if (typeof description !== \"string\" || !description.trim()) {\n throw new AgentDefinitionError(`[Sixb] Agent tool '${name}' description must not be empty.`)\n }\n}\n\nexport function assertValidAgentToolInput(name: string, input: unknown): void {\n if (!isPlainRecord(input)) {\n throw new AgentDefinitionError(`[Sixb] Agent tool '${name}' input must be a schema object.`)\n }\n\n for (const [field, schema] of Object.entries(input)) {\n if (!field.trim()) {\n throw new AgentDefinitionError(\n `[Sixb] Agent tool '${name}' input field names must not be empty.`\n )\n }\n assertValidAgentToolSchema(name, schema, `input.${field}`, new Set())\n }\n}\n\nexport function validateAndSnapshotAgentToolInput<TInput extends AgentToolInputSchema>(\n toolName: string,\n input: TInput\n): TInput {\n assertValidAgentToolInput(toolName, input)\n try {\n return deepFreeze(structuredClone(input))\n } catch {\n throw new AgentDefinitionError(\n `[Sixb] Agent tool '${toolName}' input must be safely snapshot-compatible.`\n )\n }\n}\n\n/** Validate model input against a tool schema, normalize it to JSON, and lock the snapshot. */\nexport function validateAndNormalizeAgentToolInput(\n toolName: string,\n shape: AgentToolInputSchema,\n value: unknown,\n valueTypesById: ReadonlyMap<string, ValueType>\n): Record<string, JsonValue> {\n const label = `Agent tool '${toolName}' input`\n if (!isPlainRecord(value)) {\n throw new OntologyValidationError(`[Sixb] ${label} must be a JSON object.`)\n }\n\n const reason = getInvalidJsonValueReason(value, label)\n if (reason) {\n throw new OntologyValidationError(`[Sixb] ${label} must be JSON-compatible; ${reason}.`)\n }\n\n const schema: ObjectSchema = {\n type: \"object\",\n properties: Object.fromEntries(\n Object.entries(shape).map(([field, fieldSchema]) => [\n field,\n { schema: fieldSchema, required: true },\n ])\n ),\n }\n validateSchemaValue(schema, value, label, valueTypesById)\n return deepFreeze(\n normalizeSchemaValue(schema, value, label, valueTypesById) as Record<string, JsonValue>\n )\n}\n\nfunction assertValidAgentToolSchema(\n toolName: string,\n schema: unknown,\n path: string,\n visiting: Set<object>\n): void {\n if (typeof schema === \"string\") {\n if (AGENT_TOOL_PRIMITIVE_SCHEMAS.has(schema)) {\n return\n }\n throw invalidAgentToolSchema(toolName, path)\n }\n if (!isPlainRecord(schema) || typeof schema.type !== \"string\" || visiting.has(schema)) {\n throw invalidAgentToolSchema(toolName, path)\n }\n\n visiting.add(schema)\n switch (schema.type) {\n case \"enum\": {\n const values = schema.values\n const validValues = isValidAgentToolEnumValues(values, schema.valueType)\n if (!validValues || new Set(values).size !== values.length) {\n throw invalidAgentToolSchema(toolName, path)\n }\n break\n }\n case \"array\":\n assertValidAgentToolSchema(toolName, schema.items, `${path}.items`, visiting)\n break\n case \"map\":\n if (schema.keySchema !== \"string\") {\n throw invalidAgentToolSchema(toolName, path)\n }\n assertValidAgentToolSchema(toolName, schema.valueSchema, `${path}.valueSchema`, visiting)\n break\n case \"object\": {\n if (!isPlainRecord(schema.properties)) {\n throw invalidAgentToolSchema(toolName, path)\n }\n for (const [fieldId, field] of Object.entries(schema.properties)) {\n if (!fieldId.trim() || !isPlainRecord(field) || !(\"schema\" in field)) {\n throw invalidAgentToolSchema(toolName, `${path}.properties.${fieldId}`)\n }\n if (\n (field.required !== undefined && typeof field.required !== \"boolean\") ||\n (field.nullable !== undefined && typeof field.nullable !== \"boolean\") ||\n (field.description !== undefined &&\n (typeof field.description !== \"string\" || !field.description.trim()))\n ) {\n throw invalidAgentToolSchema(toolName, `${path}.properties.${fieldId}`)\n }\n assertValidAgentToolSchema(\n toolName,\n field.schema,\n `${path}.properties.${fieldId}.schema`,\n visiting\n )\n }\n break\n }\n case \"valueTypeRef\":\n if (typeof schema.valueTypeId !== \"string\" || !schema.valueTypeId.trim()) {\n throw invalidAgentToolSchema(toolName, path)\n }\n if (schema._resolved !== undefined) {\n assertValidAgentToolSchema(toolName, schema._resolved, `${path}._resolved`, visiting)\n }\n break\n default:\n throw invalidAgentToolSchema(toolName, path)\n }\n visiting.delete(schema)\n}\n\nfunction invalidAgentToolSchema(toolName: string, path: string): AgentDefinitionError {\n return new AgentDefinitionError(\n `[Sixb] Agent tool '${toolName}' ${path} must be a valid Sixb schema.`\n )\n}\n\nexport function assertValidProjectAgentToolDefinitions(\n tools: readonly AgentToolDefinition[]\n): void {\n const seen = new Set<string>()\n for (let index = 0; index < tools.length; index += 1) {\n const tool = tools[index]\n if (!Object.hasOwn(tools, index) || !isAgentToolDefinition(tool)) {\n throw new AgentDefinitionError(\n \"[Sixb] Project tools must contain only agent tool definitions.\"\n )\n }\n\n assertValidAgentToolName(tool.name)\n assertValidAgentToolDescription(tool.name, tool.description)\n assertValidAgentToolInput(tool.name, tool.input)\n if (seen.has(tool.name)) {\n throw new AgentDefinitionError(\n `[Sixb] Project tools contain duplicate tool name '${tool.name}'.`\n )\n }\n seen.add(tool.name)\n }\n}\n\nfunction isValidAgentToolEnumValues(values: unknown, valueType: unknown): values is unknown[] {\n if (!Array.isArray(values) || values.length === 0) {\n return false\n }\n\n for (let index = 0; index < values.length; index += 1) {\n if (!Object.hasOwn(values, index)) {\n return false\n }\n const value = values[index]\n if (\n valueType === \"string\"\n ? typeof value !== \"string\"\n : valueType !== \"integer\" || typeof value !== \"number\" || !Number.isInteger(value)\n ) {\n return false\n }\n }\n return true\n}\n\nfunction deepFreeze<T>(value: T, seen: Set<object> = new Set()): T {\n if (value === null || typeof value !== \"object\" || seen.has(value)) {\n return value\n }\n\n seen.add(value)\n for (const key of Reflect.ownKeys(value)) {\n const descriptor = Object.getOwnPropertyDescriptor(value, key)\n if (descriptor && \"value\" in descriptor) {\n deepFreeze(descriptor.value, seen)\n }\n }\n return Object.freeze(value)\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value)\n}\n",
|
|
10
|
+
"import {\n cloneJsonValue,\n getInvalidJsonValueReason,\n type JsonValue,\n type ReadonlyJsonValue,\n} from \"../json\"\nimport { AgentDefinitionError, AgentToolResultValidationError } from \"./errors\"\nimport { getInvalidAgentToolResultReason } from \"./tool-result\"\nimport type {\n AgentToolDefinition,\n AgentToolHandler,\n AgentToolInputSchema,\n InferAgentToolInputSchema,\n} from \"./types\"\nimport {\n assertValidAgentToolDescription,\n assertValidAgentToolName,\n assertValidProjectAgentToolDefinitions,\n validateAndSnapshotAgentToolInput,\n} from \"./validation\"\n\nconst EMPTY_AGENT_TOOLS: readonly AgentToolDefinition[] = Object.freeze([])\nconst normalizedAgentTools = new WeakSet<AgentToolDefinition>()\n\nexport function createAgentToolDefinition<\n const TName extends string,\n const TInput extends AgentToolInputSchema,\n>(definition: {\n readonly name: TName\n readonly description: string\n readonly input: TInput\n readonly handler: AgentToolHandler<InferAgentToolInputSchema<TInput>>\n}): AgentToolDefinition<TName, TInput> {\n assertValidAgentToolName(definition.name)\n assertValidAgentToolDescription(definition.name, definition.description)\n if (typeof definition.handler !== \"function\") {\n throw new AgentDefinitionError(\n `[Sixb] Agent tool '${definition.name}' handler must be a function.`\n )\n }\n\n const input = validateAndSnapshotAgentToolInput(definition.name, definition.input)\n const tool: AgentToolDefinition<TName, TInput> = {\n kind: \"agentTool\",\n name: definition.name,\n description: definition.description,\n input,\n handler: async (context) => {\n const result = await definition.handler(context)\n let snapshot: JsonValue\n try {\n // AgentToolResult is intentionally expressed with FileRef instead of a duplicate JSON-only\n // shape. Runtime validation below proves that the complete envelope crosses the same JSON\n // boundary as legacy results.\n snapshot = cloneJsonValue(result as ReadonlyJsonValue, \"result\")\n } catch (cause) {\n throw new AgentToolResultValidationError(\n definition.name,\n getInvalidJsonValueReason(result, \"result\") ?? \"result could not be cloned safely\",\n { cause }\n )\n }\n const richResultReason = getInvalidAgentToolResultReason(snapshot)\n if (richResultReason) {\n throw new AgentToolResultValidationError(definition.name, richResultReason)\n }\n return snapshot\n },\n }\n\n normalizedAgentTools.add(tool)\n return Object.freeze(tool)\n}\n\nexport function toolsFromProjectConfig(\n tools: readonly AgentToolDefinition[] | undefined\n): readonly AgentToolDefinition[] {\n if (tools === undefined) {\n return EMPTY_AGENT_TOOLS\n }\n if (!Array.isArray(tools)) {\n throw new AgentDefinitionError(\n \"[Sixb] Project tools must be an array of agent tool definitions.\"\n )\n }\n\n assertValidProjectAgentToolDefinitions(tools)\n return normalizeAgentToolDefinitions(tools)\n}\n\nfunction normalizeAgentToolDefinitions(\n tools: readonly AgentToolDefinition[]\n): readonly AgentToolDefinition[] {\n const normalized: AgentToolDefinition[] = []\n for (const tool of tools) {\n normalized.push(normalizeAgentToolDefinition(tool))\n }\n return Object.freeze(normalized)\n}\n\nfunction normalizeAgentToolDefinition(tool: AgentToolDefinition): AgentToolDefinition {\n if (normalizedAgentTools.has(tool)) {\n return tool\n }\n\n return createAgentToolDefinition({\n name: tool.name,\n description: tool.description,\n input: tool.input,\n handler: (context) => tool.handler(context),\n })\n}\n",
|
|
11
|
+
"import { createAgentToolDefinition } from \"./tool-definition\"\nimport type {\n AgentToolDefinition,\n AgentToolDescriptionBuilder,\n AgentToolHandler,\n AgentToolInputBuilder,\n AgentToolInputSchema,\n AgentToolRunBuilder,\n InferAgentToolInputSchema,\n} from \"./types\"\nimport {\n assertValidAgentToolDescription,\n assertValidAgentToolInput,\n assertValidAgentToolName,\n} from \"./validation\"\n\n/**\n * Define a reusable tool registered through `createSixb({ tools })`.\n *\n * The returned definition is inert. The agent worker supplies its run-scoped\n * context and executes the handler only when a run calls the tool.\n */\nexport function defineAgentTool<const TName extends string>(\n name: TName\n): AgentToolDescriptionBuilder<TName> {\n assertValidAgentToolName(name)\n\n return {\n description(description: string): AgentToolInputBuilder<TName> {\n assertValidAgentToolDescription(name, description)\n\n return {\n input<const TInput extends AgentToolInputSchema>(\n input: TInput\n ): AgentToolRunBuilder<TName, TInput> {\n assertValidAgentToolInput(name, input)\n\n return {\n run(\n handler: AgentToolHandler<InferAgentToolInputSchema<TInput>>\n ): AgentToolDefinition<TName, TInput> {\n return createAgentToolDefinition({ name, description, input, handler })\n },\n }\n },\n }\n },\n }\n}\n",
|
|
12
|
+
"import { stableJsonStringify } from \"../json\"\nimport type { AgentMessageRecord } from \"../storage/agents/types\"\nimport type { AgentMessage, AgentMessagePart } from \"./message\"\n\nexport const AGENT_CONTEXT_ESTIMATOR_VERSION = 1 as const\n\nconst CHARS_PER_TOKEN = 4\nconst REQUEST_OVERHEAD_TOKENS = 8\nconst MESSAGE_OVERHEAD_TOKENS = 8\nconst TOOL_OVERHEAD_TOKENS = 16\nconst STEP_OVERHEAD_TOKENS = 2\nconst IMAGE_ALLOWANCE_TOKENS = 1_200\nconst FILE_TEXT_INLINE_MAX_BYTES = 50 * 1024\nconst FILE_TEXT_INLINE_TOTAL_MAX_BYTES = 200 * 1024\nconst TOOL_RESULT_SUMMARY_MAX_CHARS = 2_000\n\nexport interface AgentContextEstimateTool {\n readonly name: string\n readonly description: string\n /** Deterministic JSON-schema serialization sent for this tool. */\n readonly inputSchema: string\n}\n\nexport interface EstimateAgentContextRequestTokensInput {\n readonly systemPrompt: string\n readonly tools: readonly AgentContextEstimateTool[]\n readonly messages: readonly AgentMessage[]\n}\n\nexport interface AgentContextTokenEstimate {\n readonly tokens: number\n readonly estimatorVersion: typeof AGENT_CONTEXT_ESTIMATOR_VERSION\n}\n\nexport interface AgentContextCompactionBoundary {\n readonly messagesToSummarize: readonly AgentMessageRecord[]\n readonly retainedMessages: readonly AgentMessageRecord[]\n readonly summarizedThroughSeq: number\n}\n\n/** Compaction begins only once the estimated request crosses the reserved input budget. */\nexport function shouldCompactAgentContext(input: {\n readonly estimatedInputTokens: number\n readonly inputBudgetTokens: number\n}): boolean {\n return input.estimatedInputTokens > input.inputBudgetTokens\n}\n\n/** Estimate the provider request shape with one stable, conservative character heuristic. */\nexport function estimateAgentContextRequestTokens(\n input: EstimateAgentContextRequestTokensInput\n): AgentContextTokenEstimate {\n const toolTokens = input.tools.reduce(\n (total, tool) =>\n total +\n TOOL_OVERHEAD_TOKENS +\n textTokens(tool.name) +\n textTokens(tool.description) +\n textTokens(tool.inputSchema),\n 0\n )\n return {\n tokens:\n REQUEST_OVERHEAD_TOKENS +\n textTokens(input.systemPrompt) +\n toolTokens +\n estimateAgentContextMessagesTokens(input.messages).tokens,\n estimatorVersion: AGENT_CONTEXT_ESTIMATOR_VERSION,\n }\n}\n\n/** Estimate message-only growth after a provider-usage anchor. */\nexport function estimateAgentContextMessagesTokens(\n messages: readonly AgentMessage[]\n): AgentContextTokenEstimate {\n const attachments = { textBytesRemaining: FILE_TEXT_INLINE_TOTAL_MAX_BYTES }\n let tokens = 0\n for (const message of messages) {\n tokens += estimateMessageTokens(message, attachments)\n }\n return { tokens, estimatorVersion: AGENT_CONTEXT_ESTIMATOR_VERSION }\n}\n\n/** Select the safe user boundary whose retained tail is closest to the configured recent budget. */\nexport function selectAgentContextCompactionBoundary(input: {\n readonly messages: readonly AgentMessageRecord[]\n readonly keepRecentTokens: number\n}): AgentContextCompactionBoundary | null {\n if (input.messages.length < 2) return null\n\n let retainedTokens = 0\n let boundaryIndex: number | null = null\n let closestDistance = Number.POSITIVE_INFINITY\n for (let index = input.messages.length - 1; index > 0; index -= 1) {\n retainedTokens += estimateAgentContextMessagesTokens([input.messages[index]!]).tokens\n if (input.messages[index]?.role !== \"user\") continue\n\n const distance = Math.abs(input.keepRecentTokens - retainedTokens)\n if (distance <= closestDistance) {\n boundaryIndex = index\n closestDistance = distance\n }\n if (retainedTokens >= input.keepRecentTokens) break\n }\n\n if (boundaryIndex === null) return null\n\n const summarizedThroughSeq = input.messages[boundaryIndex - 1]?.seq\n if (summarizedThroughSeq === undefined) return null\n return {\n messagesToSummarize: input.messages.slice(0, boundaryIndex),\n retainedMessages: input.messages.slice(boundaryIndex),\n summarizedThroughSeq,\n }\n}\n\n/** Serialize durable conversation content as escaped quoted data for the summary model. */\nexport function serializeAgentMessagesForSummary(messages: readonly AgentMessageRecord[]): string {\n const lines = [\"<sixb_conversation_history>\"]\n for (const message of messages) {\n lines.push(\n ` <message id=\"${escapeXml(message.id)}\" seq=\"${message.seq}\" role=\"${message.role}\">`\n )\n message.parts.forEach((part, partIndex) => {\n lines.push(...serializeSummaryPart(message, part, partIndex))\n })\n lines.push(\" </message>\")\n }\n lines.push(\"</sixb_conversation_history>\")\n return lines.join(\"\\n\")\n}\n\nfunction estimateMessageTokens(\n message: AgentMessage,\n attachments: { textBytesRemaining: number }\n): number {\n let tokens = MESSAGE_OVERHEAD_TOKENS\n for (const part of message.parts) {\n switch (part.type) {\n case \"text\":\n case \"reasoning\":\n tokens += textTokens(part.text)\n break\n case \"step-start\":\n tokens += STEP_OVERHEAD_TOKENS\n break\n case \"context\":\n tokens += textTokens(stableJsonStringify(part.context))\n break\n case \"provider-state\":\n tokens += textTokens(stableJsonStringify(part.data))\n break\n case \"tool-call\":\n tokens +=\n TOOL_OVERHEAD_TOKENS +\n textTokens(part.toolName) +\n textTokens(stableJsonStringify(part.input)) +\n (part.state === \"output-available\"\n ? textTokens(stableJsonStringify(part.output))\n : textTokens(part.errorText))\n break\n case \"file\": {\n const file = part.fileRef\n tokens += textTokens(\n [file.blobId, file.digest, file.fileName, file.mediaType, file.logicalPath]\n .filter((value): value is string => value !== undefined)\n .join(\" \")\n )\n if (message.role !== \"assistant\") {\n if (looksLikeImage(file.mediaType, file.fileName)) {\n tokens += IMAGE_ALLOWANCE_TOKENS\n } else {\n const inlineBytes = Math.min(\n file.sizeBytes,\n FILE_TEXT_INLINE_MAX_BYTES,\n attachments.textBytesRemaining\n )\n attachments.textBytesRemaining -= inlineBytes\n tokens += Math.ceil(inlineBytes / CHARS_PER_TOKEN)\n }\n }\n break\n }\n }\n }\n return tokens\n}\n\nfunction serializeSummaryPart(\n message: AgentMessageRecord,\n part: AgentMessagePart,\n partIndex: number\n): string[] {\n const indent = \" \"\n switch (part.type) {\n case \"text\":\n return [`${indent}<text>${escapeXml(part.text)}</text>`]\n case \"reasoning\":\n case \"provider-state\":\n case \"step-start\":\n return []\n case \"context\":\n return part.context.kind === \"object\"\n ? [\n `${indent}<object_context origin=\"${part.origin}\" object_type_id=\"${escapeXml(part.context.ref.objectTypeId)}\" primary_id=\"${escapeXml(part.context.ref.primaryId)}\" />`,\n ]\n : [\n `${indent}<app_context origin=\"${part.origin}\" id=\"${escapeXml(part.context.id)}\" label=\"${escapeXml(part.context.label)}\">`,\n `${indent} <description>${escapeXml(part.context.description)}</description>`,\n `${indent} <value format=\"json\">${escapeXml(stableJsonStringify(part.context.value))}</value>`,\n `${indent}</app_context>`,\n ]\n case \"file\": {\n const file = part.fileRef\n const attributes = [\n `message_id=\"${escapeXml(message.id)}\"`,\n `part_index=\"${partIndex}\"`,\n `blob_id=\"${escapeXml(file.blobId)}\"`,\n `digest=\"${escapeXml(file.digest)}\"`,\n `size_bytes=\"${file.sizeBytes}\"`,\n ...(file.fileName === undefined ? [] : [`file_name=\"${escapeXml(file.fileName)}\"`]),\n ...(file.mediaType === undefined ? [] : [`media_type=\"${escapeXml(file.mediaType)}\"`]),\n ...(file.logicalPath === undefined\n ? []\n : [`logical_path=\"${escapeXml(file.logicalPath)}\"`]),\n ]\n return [`${indent}<file ${attributes.join(\" \")} />`]\n }\n case \"tool-call\": {\n const output =\n part.state === \"output-available\"\n ? truncateToolResult(stableJsonStringify(part.output))\n : truncateToolResult(part.errorText)\n return [\n `${indent}<tool_call id=\"${escapeXml(part.toolCallId)}\" name=\"${escapeXml(part.toolName)}\" state=\"${part.state}\">`,\n `${indent} <input format=\"json\">${escapeXml(stableJsonStringify(part.input))}</input>`,\n `${indent} <result>${escapeXml(output)}</result>`,\n `${indent}</tool_call>`,\n ]\n }\n }\n}\n\nfunction truncateToolResult(value: string): string {\n if (value.length <= TOOL_RESULT_SUMMARY_MAX_CHARS) return value\n return `${value.slice(0, TOOL_RESULT_SUMMARY_MAX_CHARS)}\\n[truncated ${value.length - TOOL_RESULT_SUMMARY_MAX_CHARS} characters]`\n}\n\nfunction looksLikeImage(mediaType: string | undefined, fileName: string | undefined): boolean {\n if (mediaType?.toLowerCase().startsWith(\"image/\")) return true\n return /\\.(?:avif|gif|jpe?g|png|webp)$/i.test(fileName ?? \"\")\n}\n\nfunction textTokens(value: string): number {\n return Math.ceil(new TextEncoder().encode(value).byteLength / CHARS_PER_TOKEN)\n}\n\nfunction escapeXml(value: string): string {\n return value\n .replaceAll(\"&\", \"&\")\n .replaceAll(\"<\", \"<\")\n .replaceAll(\">\", \">\")\n .replaceAll('\"', \""\")\n .replaceAll(\"'\", \"'\")\n}\n",
|
|
13
|
+
"import type { AgentReference } from \"./types\"\n\n/** Project Agent capability used in security grants such as `can.run(agent)`. */\nexport const agent: AgentReference = Object.freeze({\n kind: \"agent\",\n usage: Object.freeze({ kind: \"aiUsage\" }),\n})\n",
|
|
14
|
+
"import type { AgentContextCheckpointRecord, AgentMessageRecord } from \"../storage/agents/types\"\nimport type { AgentMessage } from \"./message\"\n\n/** A model-only message. Persisted tail messages carry `id`; the synthetic summary does not. */\nexport interface AgentThreadModelContextMessage extends AgentMessage {\n readonly id?: string\n}\n\nexport interface ProjectAgentThreadModelContextInput {\n readonly checkpoint: AgentContextCheckpointRecord | null\n /** Complete retained tail, ordered by ascending per-thread sequence. */\n readonly messages: readonly AgentMessageRecord[]\n}\n\n/**\n * Build the bounded, model-only view of a durable thread.\n *\n * The function is deliberately pure: storage chooses the latest checkpoint and reads its retained\n * tail; this function validates that projection and prepends one synthetic user-role summary.\n */\nexport function projectAgentThreadModelContext(\n input: ProjectAgentThreadModelContextInput\n): readonly AgentThreadModelContextMessage[] {\n const { checkpoint, messages } = input\n if (!checkpoint) return messages\n\n assertConsistentCheckpointProjection(checkpoint, messages)\n return [\n {\n role: \"user\",\n parts: [{ type: \"text\", text: serializeThreadSummary(checkpoint.summary) }],\n },\n ...messages,\n ]\n}\n\nfunction assertConsistentCheckpointProjection(\n checkpoint: AgentContextCheckpointRecord,\n messages: readonly AgentMessageRecord[]\n): void {\n if (checkpoint.summaryFormatVersion !== 1 || checkpoint.summary.trim().length === 0) {\n throw projectionError(checkpoint, \"has an invalid summary\")\n }\n if (checkpoint.summarizedThroughSeq >= checkpoint.observedHeadSeq) {\n throw projectionError(checkpoint, \"does not retain its observed head\")\n }\n if (messages.length === 0) {\n throw projectionError(checkpoint, \"has no retained messages\")\n }\n\n let expectedSeq = checkpoint.summarizedThroughSeq + 1\n for (const message of messages) {\n if (message.projectId !== checkpoint.projectId || message.threadId !== checkpoint.threadId) {\n throw projectionError(checkpoint, \"contains a message from another thread\")\n }\n if (message.seq !== expectedSeq) {\n throw projectionError(checkpoint, `has a sequence gap before message '${message.id}'`)\n }\n expectedSeq += 1\n }\n\n if (messages[0]?.role !== \"user\") {\n throw projectionError(checkpoint, \"does not begin at a user turn boundary\")\n }\n if ((messages.at(-1)?.seq ?? 0) < checkpoint.observedHeadSeq) {\n throw projectionError(checkpoint, \"ends before the checkpoint's observed head\")\n }\n}\n\nfunction serializeThreadSummary(summary: string): string {\n return [\n \"The earlier conversation was compacted into this continuation summary.\",\n \"\",\n \"<sixb_thread_summary>\",\n escapeXml(summary),\n \"</sixb_thread_summary>\",\n ].join(\"\\n\")\n}\n\nfunction projectionError(checkpoint: AgentContextCheckpointRecord, detail: string): Error {\n return new Error(\n `[Sixb] Agent context checkpoint '${checkpoint.id}' for thread '${checkpoint.threadId}' ${detail}.`\n )\n}\n\nfunction escapeXml(value: string): string {\n return value\n .replaceAll(\"&\", \"&\")\n .replaceAll(\"<\", \"<\")\n .replaceAll(\">\", \">\")\n .replaceAll('\"', \""\")\n .replaceAll(\"'\", \"'\")\n}\n"
|
|
15
|
+
],
|
|
16
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAAS,8BAA6B,CAC3C,OACoB;AAAA,EACpB,IAAI,MAAM,WAAW;AAAA,IAAG;AAAA,EAExB,MAAM,QAAQ,CAAC,qBAAqB;AAAA,EACpC,WAAW,QAAQ,OAAO;AAAA,IACxB,IAAI,KAAK,QAAQ,SAAS,UAAU;AAAA,MAClC,MAAM,KACJ,sBACA,uBAAuB,UAAU,KAAK,QAAQ,IAAI,YAAY,sBAC9D,mBAAmB,UAAU,KAAK,QAAQ,IAAI,SAAS,kBACvD,qBACF;AAAA,MACA;AAAA,IACF;AAAA,IAEA,MAAM,KACJ,yBACA,WAAW,UAAU,KAAK,QAAQ,EAAE,UACpC,oBAAoB,UAAU,KAAK,QAAQ,WAAW,mBACtD,4BAA4B,UAAU,qBAAoB,KAAK,QAAQ,KAAK,CAAC,aAC7E,wBACF;AAAA,EACF;AAAA,EACA,MAAM,KAAK,sBAAsB;AAAA,EACjC,OAAO,MAAM,KAAK;AAAA,CAAI;AAAA;AAGxB,SAAS,SAAS,CAAC,OAAuB;AAAA,EACxC,OAAO,MACJ,WAAW,KAAK,OAAO,EACvB,WAAW,KAAK,MAAM,EACtB,WAAW,KAAK,MAAM,EACtB,WAAW,KAAK,QAAQ,EACxB,WAAW,KAAK,QAAQ;AAAA;;;AClCtB,SAAS,kBAAiB,CAAC,OAA0C;AAAA,EAC1E,OACE,cAAc,KAAK,KACnB,MAAM,SAAS,qBACf,gCAAgC,KAAK,MAAM;AAAA;AAKxC,SAAS,+BAA+B,CAAC,OAAoC;AAAA,EAClF,IAAI,CAAC,cAAc,KAAK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AAyB;AAAA,EACvD,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAU,OAAO;AAAA,IACjB;AAAA,EACF,EAAE,KAAK;AAAA,CAAI;AAAA;AAGb,SAAS,eAAe,CAAC,YAA0C,QAAuB;AAAA,EACxF,OAAO,IAAI,MACT,oCAAoC,WAAW,mBAAmB,WAAW,aAAa,SAC5F;AAAA;AAGF,SAAS,UAAS,CAAC,OAAuB;AAAA,EACxC,OAAO,MACJ,WAAW,KAAK,OAAO,EACvB,WAAW,KAAK,MAAM,EACtB,WAAW,KAAK,MAAM,EACtB,WAAW,KAAK,QAAQ,EACxB,WAAW,KAAK,QAAQ;AAAA;",
|
|
17
|
+
"debugId": "6ABE14EFB7C9999B64756E2164756E21",
|
|
18
|
+
"names": []
|
|
19
|
+
}
|
|
@@ -1,46 +1,51 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
createSixbError2,
|
|
4
|
+
isSixbError2,
|
|
5
|
+
summarizeErrorMessage2
|
|
6
|
+
} from "./chunk-f4w3yp4f.js";
|
|
5
7
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
isActionDefinition2,
|
|
9
|
+
isGroupDefinition
|
|
10
|
+
} from "./chunk-g00bfdq6.js";
|
|
8
11
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
isAgentStepDefinition,
|
|
12
|
-
isInterventionDefinition,
|
|
13
|
-
isStepDefinition
|
|
14
|
-
} from "./chunk-xajtptbw.js";
|
|
12
|
+
isModelReasoning2
|
|
13
|
+
} from "./chunk-pqajwytd.js";
|
|
15
14
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
ModelProviderError2,
|
|
16
|
+
UnsupportedModelFeatureError2,
|
|
17
|
+
StructuredOutputError2
|
|
18
|
+
} from "./chunk-e0d1rzef.js";
|
|
18
19
|
import {
|
|
19
|
-
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
AGENT_REASONING_LEVELS2
|
|
21
|
+
} from "./chunk-7bs40fe1.js";
|
|
21
22
|
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} from "./chunk-4sm0aznx.js";
|
|
23
|
+
isAgentToolDefinition2
|
|
24
|
+
} from "./chunk-skz0hst3.js";
|
|
25
25
|
import {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
WorkflowDefinitionError2,
|
|
27
|
+
assertNonEmpty,
|
|
28
|
+
isStepDefinition2,
|
|
29
|
+
isAgentStepDefinition2,
|
|
30
|
+
isInterventionDefinition2
|
|
31
|
+
} from "./chunk-5p1v802y.js";
|
|
32
|
+
import {
|
|
33
|
+
isScheduleDefinition2
|
|
34
|
+
} from "./chunk-e1c18xjx.js";
|
|
30
35
|
|
|
31
36
|
// src/workflows/agent-step-identity.ts
|
|
32
|
-
function
|
|
37
|
+
function workflowAgentStepActorId2(workflowId, stepId) {
|
|
33
38
|
return `workflow:${encodeURIComponent(workflowId)}:step:${encodeURIComponent(stepId)}`;
|
|
34
39
|
}
|
|
35
40
|
// src/workflows/builders.ts
|
|
36
|
-
function
|
|
41
|
+
function interventionField2(schema, options) {
|
|
37
42
|
return {
|
|
38
43
|
schema,
|
|
39
44
|
required: options?.required ?? true,
|
|
40
45
|
...options?.description !== undefined ? { description: options.description } : {}
|
|
41
46
|
};
|
|
42
47
|
}
|
|
43
|
-
function
|
|
48
|
+
function defineWorkflowStep2(id) {
|
|
44
49
|
assertNonEmpty(id, "Step", "id");
|
|
45
50
|
return {
|
|
46
51
|
input(input) {
|
|
@@ -62,16 +67,16 @@ function defineWorkflowStep(id) {
|
|
|
62
67
|
}
|
|
63
68
|
};
|
|
64
69
|
}
|
|
65
|
-
function
|
|
70
|
+
function defineAgentStep2(id, config) {
|
|
66
71
|
assertNonEmpty(id, "Agent step", "id");
|
|
67
72
|
if (!isRecord(config)) {
|
|
68
|
-
throw new
|
|
73
|
+
throw new WorkflowDefinitionError2(`Agent step "${id}" config must be an object.`);
|
|
69
74
|
}
|
|
70
75
|
if (typeof config.instructions !== "string" || !config.instructions.trim()) {
|
|
71
|
-
throw new
|
|
76
|
+
throw new WorkflowDefinitionError2(`Agent step "${id}" instructions must not be empty.`);
|
|
72
77
|
}
|
|
73
|
-
if (config.reasoning !== undefined && !
|
|
74
|
-
throw new
|
|
78
|
+
if (config.reasoning !== undefined && !isModelReasoning2(config.reasoning)) {
|
|
79
|
+
throw new WorkflowDefinitionError2(`Agent step "${id}" reasoning must be one of: ${AGENT_REASONING_LEVELS2.join(", ")}, or a nonnegative budgetTokens object.`);
|
|
75
80
|
}
|
|
76
81
|
const { model, reasoning, instructions } = config;
|
|
77
82
|
const groupIds = groupIdsFromAgentStepConfig(id, config);
|
|
@@ -83,7 +88,7 @@ function defineAgentStep(id, config) {
|
|
|
83
88
|
return {
|
|
84
89
|
prompt(prompt) {
|
|
85
90
|
if (typeof prompt !== "function") {
|
|
86
|
-
throw new
|
|
91
|
+
throw new WorkflowDefinitionError2(`Agent step "${id}" prompt must be a function.`);
|
|
87
92
|
}
|
|
88
93
|
return {
|
|
89
94
|
kind: "agentStep",
|
|
@@ -106,11 +111,11 @@ function defineAgentStep(id, config) {
|
|
|
106
111
|
}
|
|
107
112
|
function groupIdsFromAgentStepConfig(stepId, config) {
|
|
108
113
|
if (config.groups !== undefined && !Array.isArray(config.groups)) {
|
|
109
|
-
throw new
|
|
114
|
+
throw new WorkflowDefinitionError2(`Agent step "${stepId}" groups must be an array of group definitions.`);
|
|
110
115
|
}
|
|
111
116
|
const groupIds = Array.from(config.groups ?? [], (group) => {
|
|
112
117
|
if (!isGroupDefinition(group)) {
|
|
113
|
-
throw new
|
|
118
|
+
throw new WorkflowDefinitionError2(`Agent step "${stepId}" groups must contain only group definitions.`);
|
|
114
119
|
}
|
|
115
120
|
return group.id;
|
|
116
121
|
});
|
|
@@ -119,11 +124,11 @@ function groupIdsFromAgentStepConfig(stepId, config) {
|
|
|
119
124
|
}
|
|
120
125
|
function toolNamesFromAgentStepConfig(stepId, config) {
|
|
121
126
|
if (config.tools !== undefined && !Array.isArray(config.tools)) {
|
|
122
|
-
throw new
|
|
127
|
+
throw new WorkflowDefinitionError2(`Agent step "${stepId}" tools must be an array of agent tool definitions.`);
|
|
123
128
|
}
|
|
124
129
|
const toolNames = Array.from(config.tools ?? [], (tool) => {
|
|
125
|
-
if (!
|
|
126
|
-
throw new
|
|
130
|
+
if (!isAgentToolDefinition2(tool)) {
|
|
131
|
+
throw new WorkflowDefinitionError2(`Agent step "${stepId}" tools must contain only agent tool definitions.`);
|
|
127
132
|
}
|
|
128
133
|
return tool.name;
|
|
129
134
|
});
|
|
@@ -134,12 +139,12 @@ function assertUniqueAgentStepValues(stepId, kind, values) {
|
|
|
134
139
|
const seen = new Set;
|
|
135
140
|
for (const value of values) {
|
|
136
141
|
if (seen.has(value)) {
|
|
137
|
-
throw new
|
|
142
|
+
throw new WorkflowDefinitionError2(`Agent step "${stepId}" ${kind}s contains duplicate ${kind} '${value}'.`);
|
|
138
143
|
}
|
|
139
144
|
seen.add(value);
|
|
140
145
|
}
|
|
141
146
|
}
|
|
142
|
-
function
|
|
147
|
+
function defineIntervention2(id, options) {
|
|
143
148
|
assertNonEmpty(id, "Intervention", "id");
|
|
144
149
|
return {
|
|
145
150
|
input(input) {
|
|
@@ -156,7 +161,7 @@ function defineIntervention(id, options) {
|
|
|
156
161
|
}
|
|
157
162
|
};
|
|
158
163
|
}
|
|
159
|
-
function
|
|
164
|
+
function defineWorkflow2(id) {
|
|
160
165
|
assertNonEmpty(id, "Workflow", "id");
|
|
161
166
|
return {
|
|
162
167
|
input(input) {
|
|
@@ -170,53 +175,53 @@ function createWorkflowDraftBuilder(id, input) {
|
|
|
170
175
|
let definition = null;
|
|
171
176
|
const appendNode = (nodeDefinition, mapper, ...extraArgs) => {
|
|
172
177
|
if (extraArgs.length > 0) {
|
|
173
|
-
throw new
|
|
178
|
+
throw new WorkflowDefinitionError2(`Invalid workflow "${id}" .then(...) call.`);
|
|
174
179
|
}
|
|
175
|
-
if (
|
|
180
|
+
if (isStepDefinition2(nodeDefinition)) {
|
|
176
181
|
if (mapper !== undefined && !isRuntimeWorkflowMapper(mapper)) {
|
|
177
|
-
throw new
|
|
182
|
+
throw new WorkflowDefinitionError2(`Invalid workflow "${id}" .then(...) call.`);
|
|
178
183
|
}
|
|
179
184
|
nodes.push(createStepNode(id, nodes, nodeDefinition, mapper));
|
|
180
185
|
definition ??= createWorkflowDefinition(id, input, triggers, nodes, appendNode);
|
|
181
186
|
return definition;
|
|
182
187
|
}
|
|
183
|
-
if (
|
|
188
|
+
if (isAgentStepDefinition2(nodeDefinition)) {
|
|
184
189
|
if (mapper !== undefined && !isRuntimeWorkflowMapper(mapper)) {
|
|
185
|
-
throw new
|
|
190
|
+
throw new WorkflowDefinitionError2(`Invalid workflow "${id}" .then(...) call.`);
|
|
186
191
|
}
|
|
187
192
|
nodes.push(createAgentNode(id, nodes, nodeDefinition, mapper));
|
|
188
193
|
definition ??= createWorkflowDefinition(id, input, triggers, nodes, appendNode);
|
|
189
194
|
return definition;
|
|
190
195
|
}
|
|
191
|
-
if (
|
|
196
|
+
if (isInterventionDefinition2(nodeDefinition)) {
|
|
192
197
|
if (mapper !== undefined && !isRuntimeWorkflowMapper(mapper)) {
|
|
193
|
-
throw new
|
|
198
|
+
throw new WorkflowDefinitionError2(`Invalid workflow "${id}" .then(...) call.`);
|
|
194
199
|
}
|
|
195
200
|
nodes.push(createInterventionNode(id, nodes, nodeDefinition, mapper));
|
|
196
201
|
definition ??= createWorkflowDefinition(id, input, triggers, nodes, appendNode);
|
|
197
202
|
return definition;
|
|
198
203
|
}
|
|
199
|
-
if (
|
|
204
|
+
if (isActionDefinition2(nodeDefinition)) {
|
|
200
205
|
if (mapper !== undefined && !isRuntimeWorkflowMapper(mapper)) {
|
|
201
|
-
throw new
|
|
206
|
+
throw new WorkflowDefinitionError2(`Invalid workflow "${id}" .then(...) call.`);
|
|
202
207
|
}
|
|
203
208
|
nodes.push(createActionNode(id, nodes, nodeDefinition, mapper));
|
|
204
209
|
definition ??= createWorkflowDefinition(id, input, triggers, nodes, appendNode);
|
|
205
210
|
return definition;
|
|
206
211
|
}
|
|
207
|
-
throw new
|
|
212
|
+
throw new WorkflowDefinitionError2(`Invalid workflow "${id}" .then(...) call.`);
|
|
208
213
|
};
|
|
209
214
|
let draft;
|
|
210
215
|
function when(schedule, mapper, ...extraArgs) {
|
|
211
216
|
if (extraArgs.length > 0) {
|
|
212
|
-
throw new
|
|
217
|
+
throw new WorkflowDefinitionError2(`Invalid workflow "${id}" .when(...) call.`);
|
|
213
218
|
}
|
|
214
|
-
if (
|
|
219
|
+
if (isScheduleDefinition2(schedule)) {
|
|
215
220
|
if (mapper !== undefined && schedule.trigger.type !== "event") {
|
|
216
|
-
throw new
|
|
221
|
+
throw new WorkflowDefinitionError2(`Workflow "${id}" cron schedules do not accept a mapper.`);
|
|
217
222
|
}
|
|
218
223
|
if (mapper !== undefined && !isRuntimeWorkflowScheduleMapper(mapper)) {
|
|
219
|
-
throw new
|
|
224
|
+
throw new WorkflowDefinitionError2(`Invalid workflow "${id}" .when(...) schedule mapper.`);
|
|
220
225
|
}
|
|
221
226
|
triggers.push({
|
|
222
227
|
type: "schedule",
|
|
@@ -225,7 +230,7 @@ function createWorkflowDraftBuilder(id, input) {
|
|
|
225
230
|
});
|
|
226
231
|
return draft;
|
|
227
232
|
}
|
|
228
|
-
throw new
|
|
233
|
+
throw new WorkflowDefinitionError2(`Workflow "${id}" .when(...) only accepts schedules.`);
|
|
229
234
|
}
|
|
230
235
|
draft = {
|
|
231
236
|
when,
|
|
@@ -316,17 +321,17 @@ function createInterventionNode(workflowId, nodes, intervention, mapper) {
|
|
|
316
321
|
}
|
|
317
322
|
function assertNodeKey(workflowId, nodeId, key) {
|
|
318
323
|
if (key.length === 0) {
|
|
319
|
-
throw new
|
|
324
|
+
throw new WorkflowDefinitionError2(`Workflow "${workflowId}" node id "${nodeId}" must contain at least one letter or number.`);
|
|
320
325
|
}
|
|
321
326
|
}
|
|
322
327
|
function assertUniqueNode(workflowId, nodes, nodeId, key) {
|
|
323
328
|
const duplicateId = nodes.find((node) => node.id === nodeId);
|
|
324
329
|
if (duplicateId) {
|
|
325
|
-
throw new
|
|
330
|
+
throw new WorkflowDefinitionError2(`Duplicate workflow node id "${nodeId}" in workflow "${workflowId}".`);
|
|
326
331
|
}
|
|
327
332
|
const duplicateKey = nodes.find((node) => node.key === key);
|
|
328
333
|
if (duplicateKey) {
|
|
329
|
-
throw new
|
|
334
|
+
throw new WorkflowDefinitionError2(`Duplicate workflow node key "${key}" in workflow "${workflowId}". Node ids "${duplicateKey.id}" and "${nodeId}" derive the same key.`);
|
|
330
335
|
}
|
|
331
336
|
}
|
|
332
337
|
function deriveWorkflowNodeKey(id) {
|
|
@@ -352,21 +357,59 @@ function isRecord(value) {
|
|
|
352
357
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
353
358
|
}
|
|
354
359
|
// src/workflows/failure.ts
|
|
355
|
-
function
|
|
356
|
-
return
|
|
360
|
+
function createWorkflowNodeFailure2(error, identity) {
|
|
361
|
+
return createSixbError2("workflow.node_failed", summarizeErrorMessage2(error, "Workflow node execution failed."), {
|
|
357
362
|
cause: error,
|
|
358
|
-
details:
|
|
363
|
+
details: {
|
|
364
|
+
...workflowNodeFailureDetails(identity),
|
|
365
|
+
...safeModelFailureDetails(error)
|
|
366
|
+
}
|
|
359
367
|
});
|
|
360
368
|
}
|
|
361
|
-
function
|
|
362
|
-
|
|
369
|
+
function safeModelFailureDetails(error) {
|
|
370
|
+
if (error instanceof UnsupportedModelFeatureError2) {
|
|
371
|
+
const reason = error.reason ?? "unsupported-feature";
|
|
372
|
+
const messages = {
|
|
373
|
+
"unsupported-feature": "The adapter cannot support a requested model feature. Check provider configuration.",
|
|
374
|
+
"unsupported-model": "The model is configured without structured-output support. Choose a supported model.",
|
|
375
|
+
"unsupported-schema": "The output schema is incompatible with the adapter. Use valid JSON Schema types, require every property, and disallow additional properties."
|
|
376
|
+
};
|
|
377
|
+
return { modelFailure: { source: "adapter", reason, message: messages[reason] } };
|
|
378
|
+
}
|
|
379
|
+
if (error instanceof ModelProviderError2) {
|
|
380
|
+
const schemaRejected = error.code === "invalid_json_schema" || error.code === "invalid_schema";
|
|
381
|
+
const modelRejected = error.code === "model_not_supported" || error.code === "unsupported_model";
|
|
382
|
+
return {
|
|
383
|
+
modelFailure: {
|
|
384
|
+
source: "provider",
|
|
385
|
+
reason: schemaRejected ? "unsupported-schema" : modelRejected ? "unsupported-model" : "provider-rejection",
|
|
386
|
+
message: schemaRejected ? "The model endpoint rejected the supplied schema. Check the routed provider's supported JSON Schema subset." : modelRejected ? "The model endpoint does not support the requested model configuration. Choose a supported model or route." : "The model endpoint rejected the request or failed its response. Check provider diagnostics for model, schema, authentication, or availability errors.",
|
|
387
|
+
...error.status === undefined ? {} : { status: error.status }
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
if (error instanceof StructuredOutputError2) {
|
|
392
|
+
return {
|
|
393
|
+
modelFailure: {
|
|
394
|
+
source: "validation",
|
|
395
|
+
reason: "invalid-output",
|
|
396
|
+
message: "The model response did not complete with valid output matching the workflow schema."
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
return {};
|
|
401
|
+
}
|
|
402
|
+
function unwrapWorkflowNodeFailure2(error) {
|
|
403
|
+
return isSixbError2(error) && error.code === "workflow.node_failed" && error.cause !== undefined ? error.cause : error;
|
|
363
404
|
}
|
|
364
405
|
function workflowNodeFailureDetails(identity) {
|
|
365
406
|
const base = {
|
|
366
407
|
workflowId: identity.workflowId,
|
|
367
408
|
workflowRunId: identity.workflowRunId,
|
|
368
409
|
nodeId: identity.nodeId,
|
|
369
|
-
...identity.nodeRunId ? { nodeRunId: identity.nodeRunId } : {}
|
|
410
|
+
...identity.nodeRunId ? { nodeRunId: identity.nodeRunId } : {},
|
|
411
|
+
...identity.failurePhase ? { failurePhase: identity.failurePhase } : {},
|
|
412
|
+
...identity.modelId ? { modelId: identity.modelId } : {}
|
|
370
413
|
};
|
|
371
414
|
switch (identity.child.type) {
|
|
372
415
|
case "step":
|
|
@@ -383,6 +426,6 @@ function workflowNodeFailureDetails(identity) {
|
|
|
383
426
|
return { ...base, interventionId: identity.child.interventionId };
|
|
384
427
|
}
|
|
385
428
|
}
|
|
386
|
-
export {
|
|
429
|
+
export { workflowAgentStepActorId2, interventionField2, defineWorkflowStep2, defineAgentStep2, defineIntervention2, defineWorkflow2, createWorkflowNodeFailure2, unwrapWorkflowNodeFailure2 };
|
|
387
430
|
|
|
388
|
-
//# debugId=
|
|
431
|
+
//# debugId=FC7385AD746BC48E64756E2164756E21
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"/** Stable internal actor id for one workflow Agent step. */\nexport function workflowAgentStepActorId(workflowId: string, stepId: string): string {\n return `workflow:${encodeURIComponent(workflowId)}:step:${encodeURIComponent(stepId)}`\n}\n",
|
|
6
6
|
"import type { ActionDefinition } from \"../actions\"\nimport { isActionDefinition } from \"../actions\"\nimport { AGENT_REASONING_LEVELS, isAgentToolDefinition } from \"../agents\"\nimport { isModelReasoning } from \"../models/language-model\"\nimport type { SchemaOrRef } from \"../ontology\"\nimport type { ScheduleDefinition, ScheduleDefinitionForEvent } from \"../schedules\"\nimport { isScheduleDefinition } from \"../schedules\"\nimport { isGroupDefinition } from \"../security\"\nimport { WorkflowDefinitionError } from \"./errors\"\nimport type {\n AgentStepBuilder,\n AgentStepDefinition,\n DefineAgentStepConfig,\n InterventionBuilder,\n InterventionDefaultsRuntimeHandler,\n InterventionDefinition,\n InterventionFieldConfig,\n StepBuilder,\n StepDefinition,\n StepHandler,\n WorkflowBuilder,\n WorkflowChainDefinition,\n WorkflowNodeDefinition,\n WorkflowScheduleMapper,\n WorkflowTriggerDefinition,\n} from \"./types\"\nimport {\n assertNonEmpty,\n isAgentStepDefinition,\n isInterventionDefinition,\n isStepDefinition,\n} from \"./validation\"\n\ntype InterventionOptions = {\n description?: string\n}\n\ntype RuntimeWorkflowInput = Record<string, SchemaOrRef>\ntype RuntimeWorkflowValueInput = Record<string, unknown>\ntype RuntimeWorkflowMapper = (...args: never[]) => unknown\ntype RuntimeWorkflowScheduleMapper = WorkflowScheduleMapper<unknown, RuntimeWorkflowValueInput>\ntype RuntimeWorkflowThenDefinition =\n | StepDefinition\n | InterventionDefinition\n | ActionDefinition\n | AgentStepDefinition\ntype RuntimeWorkflowThen = (\n nodeDefinition: RuntimeWorkflowThenDefinition,\n mapper?: RuntimeWorkflowMapper\n) => WorkflowChainDefinition\ntype RuntimeWorkflowDraftBuilder = {\n when(schedule: ScheduleDefinition): RuntimeWorkflowDraftBuilder\n when(\n schedule: ScheduleDefinitionForEvent,\n mapper: RuntimeWorkflowScheduleMapper\n ): RuntimeWorkflowDraftBuilder\n readonly then: RuntimeWorkflowThen\n}\n\n/**\n * See the action-param helper for why widened booleans are rejected. Optional\n * response fields must be an explicit literal decision so inference stays honest.\n */\ntype StrictBoolean<T extends boolean> = boolean extends T ? never : T\n\ntype InterventionFieldResult<TSchema extends SchemaOrRef, TRequired extends boolean> = {\n readonly schema: TSchema\n readonly required: TRequired\n readonly description?: string\n}\n\nexport function interventionField<const TSchema extends SchemaOrRef>(\n schema: TSchema\n): InterventionFieldResult<TSchema, true>\nexport function interventionField<\n const TSchema extends SchemaOrRef,\n const TRequired extends boolean = true,\n>(\n schema: TSchema,\n options: {\n required?: StrictBoolean<TRequired>\n description?: string\n }\n): InterventionFieldResult<TSchema, TRequired>\nexport function interventionField(\n schema: SchemaOrRef,\n options?: { required?: boolean; description?: string }\n): InterventionFieldConfig {\n return {\n schema,\n required: options?.required ?? true,\n ...(options?.description !== undefined ? { description: options.description } : {}),\n }\n}\n\nexport function defineWorkflowStep<const TId extends string>(id: TId): StepBuilder<TId> {\n assertNonEmpty(id, \"Step\", \"id\")\n\n return {\n input(input: RuntimeWorkflowInput): unknown {\n return {\n output(output: RuntimeWorkflowInput): unknown {\n return {\n run(handler: StepHandler<Record<string, unknown>, Record<string, unknown>>): unknown {\n return {\n kind: \"step\",\n id,\n input,\n output,\n handler,\n }\n },\n }\n },\n }\n },\n } as unknown as StepBuilder<TId>\n}\n\nexport function defineAgentStep<const TId extends string>(\n id: TId,\n config: DefineAgentStepConfig\n): AgentStepBuilder<TId> {\n assertNonEmpty(id, \"Agent step\", \"id\")\n if (!isRecord(config)) {\n throw new WorkflowDefinitionError(`Agent step \"${id}\" config must be an object.`)\n }\n if (typeof config.instructions !== \"string\" || !config.instructions.trim()) {\n throw new WorkflowDefinitionError(`Agent step \"${id}\" instructions must not be empty.`)\n }\n if (config.reasoning !== undefined && !isModelReasoning(config.reasoning)) {\n throw new WorkflowDefinitionError(\n `Agent step \"${id}\" reasoning must be one of: ${AGENT_REASONING_LEVELS.join(\", \")}, or a nonnegative budgetTokens object.`\n )\n }\n const { model, reasoning, instructions } = config\n const groupIds = groupIdsFromAgentStepConfig(id, config)\n const toolNames = toolNamesFromAgentStepConfig(id, config)\n\n return {\n input(input: RuntimeWorkflowInput): unknown {\n return {\n output(output: RuntimeWorkflowInput): unknown {\n return {\n prompt(prompt: unknown): unknown {\n if (typeof prompt !== \"function\") {\n throw new WorkflowDefinitionError(`Agent step \"${id}\" prompt must be a function.`)\n }\n return {\n kind: \"agentStep\",\n id,\n ...(model === undefined ? {} : { model }),\n ...(reasoning === undefined ? {} : { reasoning }),\n instructions,\n groupIds,\n toolNames,\n input,\n output,\n prompt,\n }\n },\n }\n },\n }\n },\n } as unknown as AgentStepBuilder<TId>\n}\n\nfunction groupIdsFromAgentStepConfig(\n stepId: string,\n config: DefineAgentStepConfig\n): readonly string[] {\n if (config.groups !== undefined && !Array.isArray(config.groups)) {\n throw new WorkflowDefinitionError(\n `Agent step \"${stepId}\" groups must be an array of group definitions.`\n )\n }\n const groupIds = Array.from(config.groups ?? [], (group) => {\n if (!isGroupDefinition(group)) {\n throw new WorkflowDefinitionError(\n `Agent step \"${stepId}\" groups must contain only group definitions.`\n )\n }\n return group.id\n })\n assertUniqueAgentStepValues(stepId, \"group\", groupIds)\n return Object.freeze(groupIds)\n}\n\nfunction toolNamesFromAgentStepConfig(\n stepId: string,\n config: DefineAgentStepConfig\n): readonly string[] {\n if (config.tools !== undefined && !Array.isArray(config.tools)) {\n throw new WorkflowDefinitionError(\n `Agent step \"${stepId}\" tools must be an array of agent tool definitions.`\n )\n }\n const toolNames = Array.from(config.tools ?? [], (tool) => {\n if (!isAgentToolDefinition(tool)) {\n throw new WorkflowDefinitionError(\n `Agent step \"${stepId}\" tools must contain only agent tool definitions.`\n )\n }\n return tool.name\n })\n assertUniqueAgentStepValues(stepId, \"tool\", toolNames)\n return Object.freeze(toolNames)\n}\n\nfunction assertUniqueAgentStepValues(\n stepId: string,\n kind: \"group\" | \"tool\",\n values: readonly string[]\n): void {\n const seen = new Set<string>()\n for (const value of values) {\n if (seen.has(value)) {\n throw new WorkflowDefinitionError(\n `Agent step \"${stepId}\" ${kind}s contains duplicate ${kind} '${value}'.`\n )\n }\n seen.add(value)\n }\n}\n\nexport function defineIntervention<const TId extends string>(\n id: TId,\n options?: InterventionOptions\n): InterventionBuilder<TId> {\n assertNonEmpty(id, \"Intervention\", \"id\")\n\n return {\n input(input: RuntimeWorkflowInput): unknown {\n return {\n response(response: Record<string, unknown>): unknown {\n return createInterventionDefinition({\n id,\n input,\n response,\n description: options?.description,\n })\n },\n }\n },\n } as unknown as InterventionBuilder<TId>\n}\n\nexport function defineWorkflow<const TId extends string>(id: TId): WorkflowBuilder<TId> {\n assertNonEmpty(id, \"Workflow\", \"id\")\n\n return {\n input(input: RuntimeWorkflowInput): unknown {\n return createWorkflowDraftBuilder(id, input)\n },\n } as unknown as WorkflowBuilder<TId>\n}\n\nfunction createWorkflowDraftBuilder(\n id: string,\n input: RuntimeWorkflowInput\n): RuntimeWorkflowDraftBuilder {\n const triggers: WorkflowTriggerDefinition[] = []\n const nodes: WorkflowNodeDefinition[] = []\n let definition: WorkflowChainDefinition | null = null\n\n const appendNode = (\n nodeDefinition: unknown,\n mapper?: unknown,\n ...extraArgs: unknown[]\n ): WorkflowChainDefinition => {\n if (extraArgs.length > 0) {\n throw new WorkflowDefinitionError(`Invalid workflow \"${id}\" .then(...) call.`)\n }\n\n if (isStepDefinition(nodeDefinition)) {\n if (mapper !== undefined && !isRuntimeWorkflowMapper(mapper)) {\n throw new WorkflowDefinitionError(`Invalid workflow \"${id}\" .then(...) call.`)\n }\n\n nodes.push(createStepNode(id, nodes, nodeDefinition, mapper))\n definition ??= createWorkflowDefinition(id, input, triggers, nodes, appendNode)\n return definition\n }\n\n if (isAgentStepDefinition(nodeDefinition)) {\n if (mapper !== undefined && !isRuntimeWorkflowMapper(mapper)) {\n throw new WorkflowDefinitionError(`Invalid workflow \"${id}\" .then(...) call.`)\n }\n\n nodes.push(createAgentNode(id, nodes, nodeDefinition, mapper))\n definition ??= createWorkflowDefinition(id, input, triggers, nodes, appendNode)\n return definition\n }\n\n if (isInterventionDefinition(nodeDefinition)) {\n if (mapper !== undefined && !isRuntimeWorkflowMapper(mapper)) {\n throw new WorkflowDefinitionError(`Invalid workflow \"${id}\" .then(...) call.`)\n }\n\n nodes.push(createInterventionNode(id, nodes, nodeDefinition, mapper))\n definition ??= createWorkflowDefinition(id, input, triggers, nodes, appendNode)\n return definition\n }\n\n if (isActionDefinition(nodeDefinition)) {\n if (mapper !== undefined && !isRuntimeWorkflowMapper(mapper)) {\n throw new WorkflowDefinitionError(`Invalid workflow \"${id}\" .then(...) call.`)\n }\n\n nodes.push(createActionNode(id, nodes, nodeDefinition, mapper))\n definition ??= createWorkflowDefinition(id, input, triggers, nodes, appendNode)\n return definition\n }\n\n throw new WorkflowDefinitionError(`Invalid workflow \"${id}\" .then(...) call.`)\n }\n\n let draft: RuntimeWorkflowDraftBuilder\n\n function when(schedule: ScheduleDefinition): RuntimeWorkflowDraftBuilder\n function when(\n schedule: ScheduleDefinitionForEvent,\n mapper: RuntimeWorkflowScheduleMapper\n ): RuntimeWorkflowDraftBuilder\n function when(\n schedule: unknown,\n mapper?: unknown,\n ...extraArgs: unknown[]\n ): RuntimeWorkflowDraftBuilder {\n if (extraArgs.length > 0) {\n throw new WorkflowDefinitionError(`Invalid workflow \"${id}\" .when(...) call.`)\n }\n\n if (isScheduleDefinition(schedule)) {\n if (mapper !== undefined && schedule.trigger.type !== \"event\") {\n throw new WorkflowDefinitionError(`Workflow \"${id}\" cron schedules do not accept a mapper.`)\n }\n if (mapper !== undefined && !isRuntimeWorkflowScheduleMapper(mapper)) {\n throw new WorkflowDefinitionError(`Invalid workflow \"${id}\" .when(...) schedule mapper.`)\n }\n\n triggers.push({\n type: \"schedule\",\n scheduleId: schedule.id,\n ...(mapper !== undefined ? { mapper } : {}),\n })\n return draft\n }\n\n throw new WorkflowDefinitionError(`Workflow \"${id}\" .when(...) only accepts schedules.`)\n }\n\n draft = {\n when,\n // biome-ignore lint/suspicious/noThenProperty: Workflows intentionally expose a chainable .then(...) DSL.\n then: appendNode,\n }\n\n return draft\n}\n\nfunction createWorkflowDefinition(\n id: string,\n input: RuntimeWorkflowInput,\n triggers: readonly WorkflowTriggerDefinition[],\n nodes: readonly WorkflowNodeDefinition[],\n then: (\n nodeDefinition: unknown,\n mapper?: unknown,\n ...extraArgs: unknown[]\n ) => WorkflowChainDefinition\n): WorkflowChainDefinition {\n return {\n kind: \"workflow\",\n id,\n input,\n triggers,\n nodes,\n then,\n } as unknown as WorkflowChainDefinition\n}\n\nfunction createStepNode(\n workflowId: string,\n nodes: readonly WorkflowNodeDefinition[],\n step: StepDefinition,\n mapper: RuntimeWorkflowMapper | undefined\n): WorkflowNodeDefinition {\n const key = deriveWorkflowNodeKey(step.id)\n assertNodeKey(workflowId, step.id, key)\n assertUniqueNode(workflowId, nodes, step.id, key)\n\n return {\n type: \"step\",\n id: step.id,\n key,\n step,\n ...(mapper !== undefined ? { mapper } : {}),\n }\n}\n\nfunction createAgentNode(\n workflowId: string,\n nodes: readonly WorkflowNodeDefinition[],\n agentStep: AgentStepDefinition,\n mapper: RuntimeWorkflowMapper | undefined\n): WorkflowNodeDefinition {\n const key = deriveWorkflowNodeKey(agentStep.id)\n assertNodeKey(workflowId, agentStep.id, key)\n assertUniqueNode(workflowId, nodes, agentStep.id, key)\n\n return {\n type: \"agent\",\n id: agentStep.id,\n key,\n agentStep,\n ...(mapper !== undefined ? { mapper } : {}),\n }\n}\n\nfunction createInterventionDefinition(input: {\n readonly id: string\n readonly input: RuntimeWorkflowInput\n readonly response: Record<string, unknown>\n readonly description?: string\n}): unknown {\n const base = {\n kind: \"intervention\" as const,\n id: input.id,\n input: input.input,\n response: input.response,\n ...(input.description !== undefined ? { description: input.description } : {}),\n }\n\n const defaults = (handlerOrContext: unknown) => {\n if (typeof handlerOrContext === \"function\") {\n return {\n ...base,\n defaults: handlerOrContext as InterventionDefaultsRuntimeHandler,\n }\n }\n\n // A no-defaults intervention is still usable as a definition immediately after\n // `.response(...)`. Treating the builder method as an empty default handler keeps\n // future executor code simple if it calls `definition.defaults?.(ctx) ?? {}`.\n return {}\n }\n\n Object.defineProperty(base, \"defaults\", {\n value: defaults,\n enumerable: false,\n })\n\n return base\n}\n\nfunction createActionNode(\n workflowId: string,\n nodes: readonly WorkflowNodeDefinition[],\n action: ActionDefinition,\n mapper: RuntimeWorkflowMapper | undefined\n): WorkflowNodeDefinition {\n const key = deriveWorkflowNodeKey(action.id)\n assertNodeKey(workflowId, action.id, key)\n assertUniqueNode(workflowId, nodes, action.id, key)\n\n return {\n type: \"action\",\n id: action.id,\n key,\n action,\n ...(mapper !== undefined ? { mapper } : {}),\n }\n}\n\nfunction createInterventionNode(\n workflowId: string,\n nodes: readonly WorkflowNodeDefinition[],\n intervention: InterventionDefinition,\n mapper: RuntimeWorkflowMapper | undefined\n): WorkflowNodeDefinition {\n const key = deriveWorkflowNodeKey(intervention.id)\n assertNodeKey(workflowId, intervention.id, key)\n assertUniqueNode(workflowId, nodes, intervention.id, key)\n\n return {\n type: \"intervention\",\n id: intervention.id,\n key,\n intervention,\n ...(mapper !== undefined ? { mapper } : {}),\n } as WorkflowNodeDefinition\n}\n\nfunction assertNodeKey(workflowId: string, nodeId: string, key: string): void {\n if (key.length === 0) {\n throw new WorkflowDefinitionError(\n `Workflow \"${workflowId}\" node id \"${nodeId}\" must contain at least one letter or number.`\n )\n }\n}\n\nfunction assertUniqueNode(\n workflowId: string,\n nodes: readonly WorkflowNodeDefinition[],\n nodeId: string,\n key: string\n): void {\n const duplicateId = nodes.find((node) => node.id === nodeId)\n if (duplicateId) {\n throw new WorkflowDefinitionError(\n `Duplicate workflow node id \"${nodeId}\" in workflow \"${workflowId}\".`\n )\n }\n\n const duplicateKey = nodes.find((node) => node.key === key)\n if (duplicateKey) {\n throw new WorkflowDefinitionError(\n `Duplicate workflow node key \"${key}\" in workflow \"${workflowId}\". Node ids \"${duplicateKey.id}\" and \"${nodeId}\" derive the same key.`\n )\n }\n}\n\nfunction deriveWorkflowNodeKey(id: string): string {\n const segments = id\n .trim()\n .split(/[^A-Za-z0-9]+/)\n .filter((segment) => segment.length > 0)\n\n return segments\n .map((segment, index) => {\n const normalized = uncapitalize(segment)\n return index === 0 ? normalized : capitalize(normalized)\n })\n .join(\"\")\n}\n\nfunction uncapitalize(value: string): string {\n return value.length === 0 ? value : `${value[0].toLowerCase()}${value.slice(1)}`\n}\n\nfunction capitalize(value: string): string {\n return value.length === 0 ? value : `${value[0].toUpperCase()}${value.slice(1)}`\n}\n\nfunction isRuntimeWorkflowMapper(value: unknown): value is RuntimeWorkflowMapper {\n return typeof value === \"function\"\n}\n\nfunction isRuntimeWorkflowScheduleMapper(value: unknown): value is RuntimeWorkflowScheduleMapper {\n return typeof value === \"function\"\n}\n\nfunction isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value)\n}\n",
|
|
7
|
-
"import { createSixbError, isSixbError, summarizeErrorMessage } from \"../errors/internal\"\n\ninterface WorkflowNodeFailureIdentityBase {\n readonly workflowId: string\n readonly workflowRunId: string\n readonly nodeId: string\n readonly nodeRunId?: string\n}\n\nexport interface WorkflowNodeFailureIdentity extends WorkflowNodeFailureIdentityBase {\n readonly child:\n | { readonly type: \"step\"; readonly stepId: string }\n | {\n readonly type: \"action\"\n readonly actionId: string\n readonly actionRunId?: string\n }\n | { readonly type: \"agent\"; readonly agentStepId: string }\n | { readonly type: \"intervention\"; readonly interventionId: string }\n}\n\n/** Translate a node-local failure into the workflow primitive's durable vocabulary. */\nexport function createWorkflowNodeFailure(error: unknown, identity: WorkflowNodeFailureIdentity) {\n return createSixbError(\n \"workflow.node_failed\",\n summarizeErrorMessage(error, \"Workflow node execution failed.\"),\n {\n cause: error,\n details: workflowNodeFailureDetails(identity),\n }\n )\n}\n\n/** Recover the native child error for direct callers and error-monitoring integrations. */\nexport function unwrapWorkflowNodeFailure(error: unknown): unknown {\n return isSixbError(error) && error.code === \"workflow.node_failed\" && error.cause !== undefined\n ? error.cause\n : error\n}\n\nfunction workflowNodeFailureDetails(identity: WorkflowNodeFailureIdentity) {\n const base = {\n workflowId: identity.workflowId,\n workflowRunId: identity.workflowRunId,\n nodeId: identity.nodeId,\n ...(identity.nodeRunId ? { nodeRunId: identity.nodeRunId } : {}),\n }\n\n switch (identity.child.type) {\n case \"step\":\n return { ...base, stepId: identity.child.stepId }\n case \"action\":\n return {\n ...base,\n actionId: identity.child.actionId,\n ...(identity.child.actionRunId ? { actionRunId: identity.child.actionRunId } : {}),\n }\n case \"agent\":\n return { ...base, agentStepId: identity.child.agentStepId }\n case \"intervention\":\n return { ...base, interventionId: identity.child.interventionId }\n }\n}\n"
|
|
7
|
+
"import { createSixbError, isSixbError, summarizeErrorMessage } from \"../errors/internal\"\nimport type { ReadonlyJsonObject } from \"../json\"\nimport {\n ModelProviderError,\n StructuredOutputError,\n UnsupportedModelFeatureError,\n} from \"../models/errors\"\n\ninterface WorkflowNodeFailureIdentityBase {\n readonly workflowId: string\n readonly workflowRunId: string\n readonly nodeId: string\n readonly nodeRunId?: string\n readonly failurePhase?: \"output-preflight\" | \"agent-loop\" | \"structured-finalizer\"\n readonly modelId?: string\n}\n\nexport interface WorkflowNodeFailureIdentity extends WorkflowNodeFailureIdentityBase {\n readonly child:\n | { readonly type: \"step\"; readonly stepId: string }\n | {\n readonly type: \"action\"\n readonly actionId: string\n readonly actionRunId?: string\n }\n | { readonly type: \"agent\"; readonly agentStepId: string }\n | { readonly type: \"intervention\"; readonly interventionId: string }\n}\n\n/** Translate a node-local failure into the workflow primitive's durable vocabulary. */\nexport function createWorkflowNodeFailure(error: unknown, identity: WorkflowNodeFailureIdentity) {\n return createSixbError(\n \"workflow.node_failed\",\n summarizeErrorMessage(error, \"Workflow node execution failed.\"),\n {\n cause: error,\n details: {\n ...workflowNodeFailureDetails(identity),\n ...safeModelFailureDetails(error),\n },\n }\n )\n}\n\n/** Only controlled diagnostics cross the durable boundary; provider messages/output stay private. */\nfunction safeModelFailureDetails(error: unknown): ReadonlyJsonObject {\n if (error instanceof UnsupportedModelFeatureError) {\n const reason = error.reason ?? \"unsupported-feature\"\n const messages = {\n \"unsupported-feature\":\n \"The adapter cannot support a requested model feature. Check provider configuration.\",\n \"unsupported-model\":\n \"The model is configured without structured-output support. Choose a supported model.\",\n \"unsupported-schema\":\n \"The output schema is incompatible with the adapter. Use valid JSON Schema types, require every property, and disallow additional properties.\",\n }\n return { modelFailure: { source: \"adapter\", reason, message: messages[reason] } }\n }\n if (error instanceof ModelProviderError) {\n // Interpret only known machine codes, never provider prose (which can echo private inputs).\n const schemaRejected = error.code === \"invalid_json_schema\" || error.code === \"invalid_schema\"\n const modelRejected = error.code === \"model_not_supported\" || error.code === \"unsupported_model\"\n return {\n modelFailure: {\n source: \"provider\",\n reason: schemaRejected\n ? \"unsupported-schema\"\n : modelRejected\n ? \"unsupported-model\"\n : \"provider-rejection\",\n message: schemaRejected\n ? \"The model endpoint rejected the supplied schema. Check the routed provider's supported JSON Schema subset.\"\n : modelRejected\n ? \"The model endpoint does not support the requested model configuration. Choose a supported model or route.\"\n : \"The model endpoint rejected the request or failed its response. Check provider diagnostics for model, schema, authentication, or availability errors.\",\n ...(error.status === undefined ? {} : { status: error.status }),\n },\n }\n }\n if (error instanceof StructuredOutputError) {\n return {\n modelFailure: {\n source: \"validation\",\n reason: \"invalid-output\",\n message:\n \"The model response did not complete with valid output matching the workflow schema.\",\n },\n }\n }\n return {}\n}\n\n/** Recover the native child error for direct callers and error-monitoring integrations. */\nexport function unwrapWorkflowNodeFailure(error: unknown): unknown {\n return isSixbError(error) && error.code === \"workflow.node_failed\" && error.cause !== undefined\n ? error.cause\n : error\n}\n\nfunction workflowNodeFailureDetails(identity: WorkflowNodeFailureIdentity) {\n const base = {\n workflowId: identity.workflowId,\n workflowRunId: identity.workflowRunId,\n nodeId: identity.nodeId,\n ...(identity.nodeRunId ? { nodeRunId: identity.nodeRunId } : {}),\n ...(identity.failurePhase ? { failurePhase: identity.failurePhase } : {}),\n ...(identity.modelId ? { modelId: identity.modelId } : {}),\n }\n\n switch (identity.child.type) {\n case \"step\":\n return { ...base, stepId: identity.child.stepId }\n case \"action\":\n return {\n ...base,\n actionId: identity.child.actionId,\n ...(identity.child.actionRunId ? { actionRunId: identity.child.actionRunId } : {}),\n }\n case \"agent\":\n return { ...base, agentStepId: identity.child.agentStepId }\n case \"intervention\":\n return { ...base, interventionId: identity.child.interventionId }\n }\n}\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": "
|
|
10
|
-
"debugId": "
|
|
9
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACO,SAAS,yBAAwB,CAAC,YAAoB,QAAwB;AAAA,EACnF,OAAO,YAAY,mBAAmB,UAAU,UAAU,mBAAmB,MAAM;AAAA;;ACkF9E,SAAS,kBAAiB,CAC/B,QACA,SACyB;AAAA,EACzB,OAAO;AAAA,IACL;AAAA,IAC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