@sixb/core 0.1.25 → 0.2.0
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 +52 -52
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run/context.d.ts +1 -0
- package/dist/actions/run/context.d.ts.map +1 -1
- package/dist/actions/run/execute.d.ts +3 -0
- package/dist/actions/run/execute.d.ts.map +1 -1
- package/dist/actions/run/executor.d.ts +3 -0
- package/dist/actions/run/executor.d.ts.map +1 -1
- package/dist/actions/run/types.d.ts +5 -0
- package/dist/actions/run/types.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +11 -0
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/agents/adapters.d.ts +30 -4
- package/dist/agents/adapters.d.ts.map +1 -1
- package/dist/agents/approvals.d.ts +8 -0
- package/dist/agents/approvals.d.ts.map +1 -1
- package/dist/agents/attachment-keys.d.ts +25 -0
- package/dist/agents/attachment-keys.d.ts.map +1 -0
- package/dist/agents/cancel.d.ts +12 -0
- package/dist/agents/cancel.d.ts.map +1 -1
- package/dist/agents/children.d.ts.map +1 -1
- package/dist/agents/context-budget.d.ts +48 -0
- package/dist/agents/context-budget.d.ts.map +1 -0
- package/dist/agents/context-compaction.d.ts +89 -9
- package/dist/agents/context-compaction.d.ts.map +1 -1
- package/dist/agents/context-files.d.ts +12 -0
- package/dist/agents/context-files.d.ts.map +1 -0
- package/dist/agents/context-parts.d.ts +41 -0
- package/dist/agents/context-parts.d.ts.map +1 -0
- package/dist/agents/context-request.d.ts +47 -0
- package/dist/agents/context-request.d.ts.map +1 -0
- package/dist/agents/context-token-rate.d.ts +98 -0
- package/dist/agents/context-token-rate.d.ts.map +1 -0
- package/dist/agents/context-use.d.ts +51 -0
- package/dist/agents/context-use.d.ts.map +1 -0
- package/dist/agents/dispatch.d.ts +1 -9
- package/dist/agents/dispatch.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +18 -1
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/index.d.ts +51 -12
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +227 -85
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/inline-images.d.ts +17 -0
- package/dist/agents/inline-images.d.ts.map +1 -0
- package/dist/agents/message.d.ts +55 -0
- package/dist/agents/message.d.ts.map +1 -1
- package/dist/agents/model-loop.d.ts +25 -7
- package/dist/agents/model-loop.d.ts.map +1 -1
- package/dist/agents/model-routing.d.ts +4 -1
- package/dist/agents/model-routing.d.ts.map +1 -1
- package/dist/agents/request.d.ts +15 -2
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/run-after-finish.d.ts +11 -0
- package/dist/agents/run-after-finish.d.ts.map +1 -0
- package/dist/agents/run-artifacts.d.ts +56 -0
- package/dist/agents/run-artifacts.d.ts.map +1 -0
- package/dist/agents/run-events.d.ts +50 -0
- package/dist/agents/run-events.d.ts.map +1 -0
- package/dist/agents/run-fence.d.ts +38 -0
- package/dist/agents/run-fence.d.ts.map +1 -0
- package/dist/agents/run-liveness.d.ts +36 -0
- package/dist/agents/run-liveness.d.ts.map +1 -0
- package/dist/agents/run-plan.d.ts +120 -0
- package/dist/agents/run-plan.d.ts.map +1 -0
- package/dist/agents/run-session-children.d.ts +89 -0
- package/dist/agents/run-session-children.d.ts.map +1 -0
- package/dist/agents/run-session-http.d.ts +40 -0
- package/dist/agents/run-session-http.d.ts.map +1 -0
- package/dist/agents/run-session-serve.d.ts +40 -0
- package/dist/agents/run-session-serve.d.ts.map +1 -0
- package/dist/agents/run-session-wire.d.ts +31 -0
- package/dist/agents/run-session-wire.d.ts.map +1 -0
- package/dist/agents/run-session.d.ts +241 -0
- package/dist/agents/run-session.d.ts.map +1 -0
- package/dist/agents/run-token.d.ts +40 -0
- package/dist/agents/run-token.d.ts.map +1 -0
- package/dist/agents/run-tools.d.ts +75 -0
- package/dist/agents/run-tools.d.ts.map +1 -0
- package/dist/agents/run-turn.d.ts +94 -0
- package/dist/agents/run-turn.d.ts.map +1 -0
- package/dist/agents/skills.d.ts +9 -2
- package/dist/agents/skills.d.ts.map +1 -1
- package/dist/agents/step-limits.d.ts +18 -0
- package/dist/agents/step-limits.d.ts.map +1 -0
- package/dist/agents/streams/index.d.ts +1 -1
- package/dist/agents/streams/index.d.ts.map +1 -1
- package/dist/agents/streams/index.js +2 -2
- package/dist/agents/streams/internal.d.ts +1 -1
- package/dist/agents/streams/internal.d.ts.map +1 -1
- package/dist/agents/streams/internal.js +7 -5
- package/dist/agents/streams/internal.js.map +1 -1
- package/dist/agents/streams/protocol.d.ts +37 -97
- package/dist/agents/streams/protocol.d.ts.map +1 -1
- package/dist/agents/subagent-runs.d.ts +7 -1
- package/dist/agents/subagent-runs.d.ts.map +1 -1
- package/dist/agents/thread-context-projection.d.ts +10 -0
- package/dist/agents/thread-context-projection.d.ts.map +1 -1
- package/dist/agents/tool-files.d.ts +56 -0
- package/dist/agents/tool-files.d.ts.map +1 -0
- package/dist/agents/workflow-node-session.d.ts +99 -0
- package/dist/agents/workflow-node-session.d.ts.map +1 -0
- package/dist/artifacts/frames/index.js +1 -1
- package/dist/artifacts/frames/index.js.map +1 -1
- package/dist/artifacts/index.js.map +1 -1
- package/dist/artifacts/publish/index.d.ts +1 -1
- package/dist/artifacts/publish/index.d.ts.map +1 -1
- package/dist/artifacts/publish/index.js +30 -30
- package/dist/auth/index.js +14 -14
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/runtime.d.ts +2 -0
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/auth/types.d.ts +5 -0
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/authorization/decision.d.ts +2 -0
- package/dist/authorization/decision.d.ts.map +1 -1
- package/dist/authorization/grant-kinds.d.ts +2 -2
- package/dist/authorization/grant-kinds.d.ts.map +1 -1
- package/dist/authorization/index.d.ts +1 -1
- package/dist/authorization/index.d.ts.map +1 -1
- package/dist/authorization/index.js +9 -7
- package/dist/authorization/index.js.map +1 -1
- package/dist/authorization/run-visibility.d.ts +17 -0
- package/dist/authorization/run-visibility.d.ts.map +1 -1
- package/dist/bootstrap/index.js +60 -58
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/{chunk-0xmt5p5y.js → chunk-0g5nyx0k.js} +181 -31
- package/dist/chunk-0g5nyx0k.js.map +14 -0
- package/dist/{chunk-j936th07.js → chunk-0k1h5hmr.js} +59 -58
- package/dist/chunk-0k1h5hmr.js.map +12 -0
- package/dist/{chunk-c0vk1djt.js → chunk-165c9wm6.js} +1 -1
- package/dist/chunk-16a9dmfy.js.map +1 -1
- package/dist/{chunk-3qms4nax.js → chunk-1vg43g9q.js} +20 -20
- package/dist/{chunk-3qms4nax.js.map → chunk-1vg43g9q.js.map} +4 -4
- package/dist/{chunk-6n69k945.js → chunk-21q0j5f2.js} +2 -2
- package/dist/{chunk-24bqx0dx.js → chunk-23s66j86.js} +1 -1
- package/dist/{chunk-24bqx0dx.js.map → chunk-23s66j86.js.map} +1 -1
- package/dist/{chunk-cdk3egjj.js → chunk-2g0r46hy.js} +2 -2
- package/dist/{chunk-cdk3egjj.js.map → chunk-2g0r46hy.js.map} +1 -1
- package/dist/{chunk-fm62y49k.js → chunk-2pk5hjj9.js} +5 -3
- package/dist/{chunk-fm62y49k.js.map → chunk-2pk5hjj9.js.map} +5 -5
- package/dist/{chunk-rap5w0x0.js → chunk-31khg3g0.js} +1 -1
- package/dist/{chunk-rap5w0x0.js.map → chunk-31khg3g0.js.map} +1 -1
- package/dist/{chunk-gqm0b7vd.js → chunk-3x3bebz7.js} +182 -90
- package/dist/chunk-3x3bebz7.js.map +49 -0
- package/dist/{chunk-tdxfsg1c.js → chunk-47e09r7z.js} +2 -2
- package/dist/{chunk-tdxfsg1c.js.map → chunk-47e09r7z.js.map} +1 -1
- package/dist/chunk-4zm1k3xj.js +367 -0
- package/dist/chunk-4zm1k3xj.js.map +13 -0
- package/dist/chunk-58geavnf.js.map +1 -1
- package/dist/{chunk-npcr0228.js → chunk-5kyvrtjh.js} +1 -1
- package/dist/{chunk-npcr0228.js.map → chunk-5kyvrtjh.js.map} +1 -1
- package/dist/chunk-5taem5aw.js +290 -0
- package/dist/chunk-5taem5aw.js.map +10 -0
- package/dist/{chunk-1t6k1avb.js → chunk-6b61s40c.js} +1 -1
- package/dist/{chunk-4ymrcdbm.js → chunk-7hd2ez3q.js} +1 -1
- package/dist/{chunk-4ymrcdbm.js.map → chunk-7hd2ez3q.js.map} +1 -1
- package/dist/{chunk-4f3ydv7t.js → chunk-80nh73br.js} +1 -1
- package/dist/{chunk-4f3ydv7t.js.map → chunk-80nh73br.js.map} +1 -1
- package/dist/{chunk-m2nevja0.js → chunk-855n80en.js} +1 -1
- package/dist/{chunk-m2nevja0.js.map → chunk-855n80en.js.map} +1 -1
- package/dist/{chunk-hk38wahh.js → chunk-8dcfj58k.js} +24 -14
- package/dist/chunk-8dcfj58k.js.map +18 -0
- package/dist/{chunk-8z4726jz.js → chunk-8hvfs0fr.js} +11 -11
- package/dist/{chunk-8z4726jz.js.map → chunk-8hvfs0fr.js.map} +2 -2
- package/dist/chunk-8ncg20rd.js.map +1 -1
- package/dist/{chunk-m36fw8ft.js → chunk-8wsjr52f.js} +1 -1
- package/dist/chunk-9mab3dvg.js.map +1 -1
- package/dist/{chunk-vrf90dkv.js → chunk-9rh8ncs5.js} +2 -2
- package/dist/{chunk-vrf90dkv.js.map → chunk-9rh8ncs5.js.map} +1 -1
- package/dist/chunk-9tc8dxmn.js.map +1 -1
- package/dist/chunk-9x8dybsb.js.map +2 -2
- package/dist/chunk-a3faa34j.js.map +1 -1
- package/dist/{chunk-pgrf64hp.js → chunk-agn8d8ys.js} +1 -1
- package/dist/{chunk-2x19q6k6.js → chunk-c78jjzhy.js} +326 -159
- package/dist/chunk-c78jjzhy.js.map +18 -0
- package/dist/{chunk-6bkbyer5.js → chunk-cgznz22f.js} +3 -3
- package/dist/{chunk-6bkbyer5.js.map → chunk-cgznz22f.js.map} +1 -1
- package/dist/chunk-cwdzcv37.js.map +1 -1
- package/dist/{chunk-2fn60nvs.js → chunk-d3t26vah.js} +2 -2
- package/dist/{chunk-2fn60nvs.js.map → chunk-d3t26vah.js.map} +1 -1
- package/dist/{chunk-vhbw5sqm.js → chunk-d7v97qxq.js} +7 -1
- package/dist/chunk-d7v97qxq.js.map +10 -0
- package/dist/chunk-de5sfbc3.js +3 -0
- package/dist/chunk-de5sfbc3.js.map +9 -0
- package/dist/{chunk-65pyhyas.js → chunk-djs3hw9p.js} +7 -9
- package/dist/{chunk-65pyhyas.js.map → chunk-djs3hw9p.js.map} +2 -2
- package/dist/{chunk-n9w3n38q.js → chunk-dz7a4t3a.js} +78 -11
- package/dist/chunk-dz7a4t3a.js.map +23 -0
- package/dist/chunk-e5wf5vz0.js.map +1 -1
- package/dist/{chunk-bab05bhg.js → chunk-e7v3trpz.js} +1 -1
- package/dist/{chunk-68wghpdf.js → chunk-e99kp9jh.js} +194 -32
- package/dist/{chunk-68wghpdf.js.map → chunk-e99kp9jh.js.map} +10 -10
- package/dist/{chunk-nydf3dbe.js → chunk-edx8xcsm.js} +142 -25
- package/dist/chunk-edx8xcsm.js.map +13 -0
- package/dist/{chunk-9ntbsnke.js → chunk-ekkpzcka.js} +8 -8
- package/dist/{chunk-9ntbsnke.js.map → chunk-ekkpzcka.js.map} +2 -2
- package/dist/chunk-eptrvnby.js.map +1 -1
- package/dist/{chunk-zbc929zg.js → chunk-escedwyt.js} +9 -1
- package/dist/{chunk-zbc929zg.js.map → chunk-escedwyt.js.map} +3 -3
- package/dist/chunk-ey1nk510.js.map +1 -1
- package/dist/{chunk-vr3j63jq.js → chunk-f2w6328x.js} +79 -79
- package/dist/{chunk-vr3j63jq.js.map → chunk-f2w6328x.js.map} +4 -4
- package/dist/chunk-fb3feg1e.js.map +1 -1
- package/dist/{chunk-z3ryd53f.js → chunk-fb3m4sa1.js} +35 -11
- package/dist/{chunk-z3ryd53f.js.map → chunk-fb3m4sa1.js.map} +3 -3
- package/dist/{chunk-xe0732g0.js → chunk-fdkpkkpw.js} +94 -44
- package/dist/{chunk-xe0732g0.js.map → chunk-fdkpkkpw.js.map} +5 -5
- package/dist/chunk-ff5xkv0p.js.map +1 -1
- package/dist/{chunk-r6szek0x.js → chunk-fg1db9xx.js} +46 -139
- package/dist/chunk-fg1db9xx.js.map +10 -0
- package/dist/chunk-fntqb7qy.js.map +1 -1
- package/dist/{chunk-73v685wb.js → chunk-frsz8wxd.js} +4 -4
- package/dist/{chunk-73v685wb.js.map → chunk-frsz8wxd.js.map} +3 -3
- package/dist/{chunk-bnr4a734.js → chunk-he7g39e5.js} +26 -24
- package/dist/{chunk-bnr4a734.js.map → chunk-he7g39e5.js.map} +5 -5
- package/dist/chunk-hjy3dsws.js +4049 -0
- package/dist/chunk-hjy3dsws.js.map +45 -0
- package/dist/chunk-hn2r7z41.js.map +1 -1
- package/dist/{chunk-6y0mkhex.js → chunk-jbw70d6t.js} +2 -2
- package/dist/{chunk-6y0mkhex.js.map → chunk-jbw70d6t.js.map} +1 -1
- package/dist/{chunk-661ezhks.js → chunk-jftd33rc.js} +107 -28
- package/dist/chunk-jftd33rc.js.map +11 -0
- package/dist/{chunk-2gjj5dx3.js → chunk-jhbk10wf.js} +1 -1
- package/dist/{chunk-18sk89cg.js → chunk-jk97v21j.js} +7 -2
- package/dist/chunk-jk97v21j.js.map +10 -0
- package/dist/chunk-jmfet9r4.js.map +1 -1
- package/dist/{chunk-4y26vs3v.js → chunk-jspskey0.js} +16 -3
- package/dist/chunk-jspskey0.js.map +10 -0
- package/dist/chunk-kcqpk9w1.js.map +2 -2
- package/dist/chunk-kfee1h52.js.map +1 -1
- package/dist/{chunk-qx00vjrj.js → chunk-kwfhd1g0.js} +23 -23
- package/dist/{chunk-qx00vjrj.js.map → chunk-kwfhd1g0.js.map} +4 -4
- package/dist/{chunk-7ny9mjgm.js → chunk-m3qe54bb.js} +1 -1
- package/dist/chunk-m427qgq0.js.map +1 -1
- package/dist/chunk-mbsbxarb.js.map +1 -1
- package/dist/chunk-mmagke4x.js.map +1 -1
- package/dist/chunk-mzx71snp.js.map +1 -1
- package/dist/{chunk-vd1rk42q.js → chunk-n54k068r.js} +22 -18
- package/dist/chunk-n54k068r.js.map +12 -0
- package/dist/chunk-n8q5j6y5.js.map +1 -1
- package/dist/{chunk-97wr6p2g.js → chunk-neftrg0n.js} +9 -9
- package/dist/{chunk-97wr6p2g.js.map → chunk-neftrg0n.js.map} +4 -4
- package/dist/{chunk-07kkp2e1.js → chunk-nghc7eq0.js} +2 -2
- package/dist/{chunk-07kkp2e1.js.map → chunk-nghc7eq0.js.map} +1 -1
- package/dist/{chunk-hqsp2sx4.js → chunk-nz7815t3.js} +48 -34
- package/dist/chunk-nz7815t3.js.map +14 -0
- package/dist/{chunk-fe8zwt8b.js → chunk-peggaard.js} +2 -2
- package/dist/{chunk-1j6j0rht.js → chunk-qbrmpgvv.js} +1 -1
- package/dist/{chunk-1j6j0rht.js.map → chunk-qbrmpgvv.js.map} +1 -1
- package/dist/chunk-qf954wje.js.map +1 -1
- package/dist/{chunk-dp0cdtj2.js → chunk-qsg8rw04.js} +2 -2
- package/dist/{chunk-et017krg.js → chunk-qya541bk.js} +10374 -9471
- package/dist/chunk-qya541bk.js.map +129 -0
- package/dist/{chunk-d2m879s4.js → chunk-r1cxq7vv.js} +27 -27
- package/dist/chunk-r1cxq7vv.js.map +12 -0
- package/dist/{chunk-kyjcwqz6.js → chunk-rtkqczbr.js} +3 -1
- package/dist/{chunk-kyjcwqz6.js.map → chunk-rtkqczbr.js.map} +3 -3
- package/dist/{chunk-nzapm6p0.js → chunk-s3we74h8.js} +1 -2
- package/dist/chunk-s3we74h8.js.map +12 -0
- package/dist/{chunk-2adz0h75.js → chunk-s7xqfxs9.js} +35 -3
- package/dist/chunk-s7xqfxs9.js.map +11 -0
- package/dist/{chunk-g663fahq.js → chunk-scyq22td.js} +1 -1
- package/dist/{chunk-g663fahq.js.map → chunk-scyq22td.js.map} +1 -1
- package/dist/{chunk-yecwnwpq.js → chunk-semf1yqn.js} +92 -53
- package/dist/{chunk-yecwnwpq.js.map → chunk-semf1yqn.js.map} +10 -10
- package/dist/chunk-t5608tkq.js.map +1 -1
- package/dist/{chunk-pdt5cw8z.js → chunk-tvefbgvw.js} +5 -2
- package/dist/{chunk-pdt5cw8z.js.map → chunk-tvefbgvw.js.map} +3 -3
- package/dist/{chunk-rp9wwk7b.js → chunk-vkweppkw.js} +30 -30
- package/dist/{chunk-rp9wwk7b.js.map → chunk-vkweppkw.js.map} +4 -4
- package/dist/{chunk-45ngkxkp.js → chunk-w122ymx4.js} +2 -2
- package/dist/{chunk-45ngkxkp.js.map → chunk-w122ymx4.js.map} +1 -1
- package/dist/{chunk-48jezz3j.js → chunk-w976a4me.js} +1 -1
- package/dist/{chunk-48jezz3j.js.map → chunk-w976a4me.js.map} +1 -1
- package/dist/chunk-waqk73p1.js.map +1 -1
- package/dist/{chunk-c844dkwd.js → chunk-wx7smkn2.js} +4 -5
- package/dist/{chunk-c844dkwd.js.map → chunk-wx7smkn2.js.map} +2 -2
- package/dist/chunk-x0v3jd47.js.map +1 -1
- package/dist/{chunk-3p93tb91.js → chunk-xj97s5js.js} +105 -105
- package/dist/{chunk-3p93tb91.js.map → chunk-xj97s5js.js.map} +4 -4
- package/dist/{chunk-sqfvnvqj.js → chunk-y2x2935j.js} +3 -3
- package/dist/{chunk-sqfvnvqj.js.map → chunk-y2x2935j.js.map} +1 -1
- package/dist/{chunk-5tfev0fv.js → chunk-ytzcxtpt.js} +171 -171
- package/dist/{chunk-5tfev0fv.js.map → chunk-ytzcxtpt.js.map} +4 -4
- package/dist/chunk-yw9pyg66.js.map +1 -1
- package/dist/{chunk-62a63pr6.js → chunk-ztf5vtmp.js} +8 -8
- package/dist/{chunk-62a63pr6.js.map → chunk-ztf5vtmp.js.map} +2 -2
- package/dist/connectors/connections/authorizations.d.ts +2 -2
- package/dist/connectors/connections/authorizations.d.ts.map +1 -1
- package/dist/connectors/connections/service.d.ts.map +1 -1
- package/dist/connectors/connections/tokens.d.ts +2 -2
- package/dist/connectors/connections/tokens.d.ts.map +1 -1
- package/dist/connectors/connections/validation.d.ts +5 -0
- package/dist/connectors/connections/validation.d.ts.map +1 -1
- package/dist/connectors/types.d.ts +9 -2
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/datasets/execution.d.ts +26 -1
- package/dist/datasets/execution.d.ts.map +1 -1
- package/dist/datasets/index.d.ts +1 -1
- package/dist/datasets/index.d.ts.map +1 -1
- package/dist/datasets/lineage.d.ts +55 -0
- package/dist/datasets/lineage.d.ts.map +1 -0
- package/dist/datasets/write.js +5 -5
- package/dist/deploy/internal.js +2 -5
- package/dist/deploy/internal.js.map +3 -3
- package/dist/deploy/types.d.ts +8 -3
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/env/index.d.ts +36 -0
- package/dist/env/index.d.ts.map +1 -0
- package/dist/env/index.js +17 -0
- package/dist/env/index.js.map +10 -0
- package/dist/error-reporting/internal.js +3 -3
- package/dist/errors/catalog.d.ts +8 -0
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/errors/internal.js +1 -1
- package/dist/events/index.js +3 -3
- package/dist/execution/agent.d.ts +2 -2
- package/dist/execution/agent.d.ts.map +1 -1
- package/dist/execution/agent.js +55 -55
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/index.d.ts +1 -0
- package/dist/execution/index.d.ts.map +1 -1
- package/dist/execution/primitive.js +52 -52
- package/dist/execution/request-client.d.ts +21 -0
- package/dist/execution/request-client.d.ts.map +1 -0
- package/dist/execution/request.d.ts.map +1 -1
- package/dist/execution/request.js +54 -52
- package/dist/execution/request.js.map +3 -3
- package/dist/http/api-routes.d.ts +12 -11
- package/dist/http/api-routes.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +72 -70
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/index.js +5 -5
- package/dist/lineage/commits.d.ts +45 -0
- package/dist/lineage/commits.d.ts.map +1 -0
- package/dist/lineage/executors.d.ts +14 -0
- package/dist/lineage/executors.d.ts.map +1 -0
- package/dist/lineage/link.d.ts +10 -0
- package/dist/lineage/link.d.ts.map +1 -0
- package/dist/lineage/object.d.ts +10 -0
- package/dist/lineage/object.d.ts.map +1 -0
- package/dist/lineage/projections.d.ts +34 -0
- package/dist/lineage/projections.d.ts.map +1 -0
- package/dist/lineage/reader.d.ts +34 -0
- package/dist/lineage/reader.d.ts.map +1 -0
- package/dist/lineage/sources.d.ts +62 -0
- package/dist/lineage/sources.d.ts.map +1 -0
- package/dist/lineage/types.d.ts +140 -0
- package/dist/lineage/types.d.ts.map +1 -0
- package/dist/logging/internal.js +1 -1
- package/dist/materializer/effective/resolve.d.ts +63 -6
- package/dist/materializer/effective/resolve.d.ts.map +1 -1
- package/dist/materializer/index.js +30 -30
- package/dist/models/errors.d.ts +8 -0
- package/dist/models/errors.d.ts.map +1 -1
- package/dist/models/events.d.ts +10 -0
- package/dist/models/events.d.ts.map +1 -1
- package/dist/models/execution/errors.d.ts +5 -0
- package/dist/models/execution/errors.d.ts.map +1 -1
- package/dist/models/execution/index.d.ts +3 -1
- package/dist/models/execution/index.d.ts.map +1 -1
- package/dist/models/execution/index.js +60 -52
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/execution/model-call-recorder.d.ts +9 -2
- package/dist/models/execution/model-call-recorder.d.ts.map +1 -1
- package/dist/models/execution.d.ts.map +1 -1
- package/dist/models/index.d.ts +2 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +3 -3
- package/dist/models/language-call.d.ts +51 -0
- package/dist/models/language-call.d.ts.map +1 -0
- package/dist/models/language-model.d.ts +29 -2
- package/dist/models/language-model.d.ts.map +1 -1
- package/dist/objects/execution.d.ts +4 -1
- package/dist/objects/execution.d.ts.map +1 -1
- package/dist/objects/index.js +52 -52
- package/dist/objects/query/executor.d.ts.map +1 -1
- package/dist/objects/query/index.d.ts +1 -0
- package/dist/objects/query/index.d.ts.map +1 -1
- package/dist/objects/query/index.js +33 -31
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/ir.d.ts +16 -0
- package/dist/objects/query/ir.d.ts.map +1 -1
- package/dist/objects/query/link-endpoints.d.ts +11 -0
- package/dist/objects/query/link-endpoints.d.ts.map +1 -0
- package/dist/objects/query/normalize.d.ts.map +1 -1
- package/dist/objects/query/planner.d.ts +5 -0
- package/dist/objects/query/planner.d.ts.map +1 -1
- package/dist/objects/query/validate.d.ts +2 -0
- package/dist/objects/query/validate.d.ts.map +1 -1
- package/dist/objects/sdk/object-set.d.ts +2 -0
- package/dist/objects/sdk/object-set.d.ts.map +1 -1
- package/dist/ontology/docs-markdown.d.ts.map +1 -1
- package/dist/ontology/index.d.ts +1 -1
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/index.js +6 -6
- package/dist/ontology/internal.js +8 -275
- package/dist/ontology/internal.js.map +3 -4
- package/dist/ontology/user-ref.d.ts +21 -3
- package/dist/ontology/user-ref.d.ts.map +1 -1
- package/dist/pipelines/index.js +34 -34
- package/dist/projections/builders.d.ts +13 -2
- package/dist/projections/builders.d.ts.map +1 -1
- package/dist/projections/index.d.ts +1 -1
- package/dist/projections/index.d.ts.map +1 -1
- package/dist/projections/internal.js +30 -30
- package/dist/projections/types.d.ts +7 -0
- package/dist/projections/types.d.ts.map +1 -1
- package/dist/projections/validation.d.ts +2 -0
- package/dist/projections/validation.d.ts.map +1 -1
- package/dist/query.js +2 -2
- package/dist/queues/in-memory.d.ts +1 -2
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/queues/index.d.ts +1 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/index.js +1 -1
- package/dist/queues/types.d.ts +0 -8
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/create.d.ts +3 -0
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/internal.js +37 -37
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/runtime/types.d.ts +16 -0
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/sandboxes/configuration.d.ts +4 -6
- package/dist/sandboxes/configuration.d.ts.map +1 -1
- package/dist/sandboxes/environment.d.ts.map +1 -1
- package/dist/sandboxes/exec.d.ts +5 -3
- package/dist/sandboxes/exec.d.ts.map +1 -1
- package/dist/sandboxes/guest-credentials.d.ts +61 -0
- package/dist/sandboxes/guest-credentials.d.ts.map +1 -0
- package/dist/sandboxes/index.d.ts +2 -0
- package/dist/sandboxes/index.d.ts.map +1 -1
- package/dist/sandboxes/index.js +23 -9
- package/dist/sandboxes/index.js.map +1 -1
- package/dist/sandboxes/sandbox.d.ts +18 -4
- package/dist/sandboxes/sandbox.d.ts.map +1 -1
- package/dist/security/grants.d.ts +1 -1
- package/dist/security/grants.d.ts.map +1 -1
- package/dist/security/internal.js +1 -1
- package/dist/security/internal.js.map +1 -1
- package/dist/security/project.d.ts.map +1 -1
- package/dist/security/public.js +2 -2
- package/dist/security/types.d.ts +10 -3
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/validation.d.ts.map +1 -1
- package/dist/shares/execution.d.ts +9 -0
- package/dist/shares/execution.d.ts.map +1 -1
- package/dist/shares/index.d.ts +1 -1
- package/dist/shares/index.d.ts.map +1 -1
- package/dist/shares/internal.js +28 -28
- package/dist/shares/internal.js.map +1 -1
- package/dist/storage/action-runs/failure.js +2 -2
- package/dist/storage/agents/in-memory.d.ts +40 -1
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/index.d.ts +1 -1
- package/dist/storage/agents/index.d.ts.map +1 -1
- package/dist/storage/agents/provider.d.ts +45 -1
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +34 -4
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +186 -8
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/analytics.d.ts +13 -5
- package/dist/storage/ai-cost/analytics.d.ts.map +1 -1
- package/dist/storage/ai-cost/groups.d.ts +19 -2
- package/dist/storage/ai-cost/groups.d.ts.map +1 -1
- package/dist/storage/ai-cost/in-memory.d.ts +6 -1
- package/dist/storage/ai-cost/in-memory.d.ts.map +1 -1
- package/dist/storage/ai-cost/index.d.ts +1 -1
- package/dist/storage/ai-cost/index.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.d.ts +1 -1
- package/dist/storage/ai-cost/provider.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +7 -5
- package/dist/storage/ai-cost/provider.js.map +1 -1
- package/dist/storage/ai-cost/types.d.ts +65 -9
- package/dist/storage/ai-cost/types.d.ts.map +1 -1
- package/dist/storage/ai-limits/enforcement.js +4 -4
- package/dist/storage/ai-limits/provider.js +2 -2
- package/dist/storage/connector-connections/provider.js +1 -1
- package/dist/storage/connector-connections/provider.js.map +1 -1
- package/dist/storage/file-upload-sessions/provider.js +12 -12
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +34 -34
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.js +6 -6
- package/dist/storage/objects/in-memory/query.d.ts.map +1 -1
- package/dist/storage/objects/query-preparation.d.ts +5 -0
- package/dist/storage/objects/query-preparation.d.ts.map +1 -1
- package/dist/storage/ontology/commits.d.ts +6 -1
- package/dist/storage/ontology/commits.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/commits.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts +2 -1
- package/dist/storage/ontology/in-memory/materializations.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/materializations.d.ts +16 -0
- package/dist/storage/ontology/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/provider.d.ts +6 -1
- package/dist/storage/ontology/provider.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +4 -2
- package/dist/storage/ontology/provider.js.map +1 -1
- package/dist/storage/operation-scope.d.ts +10 -0
- package/dist/storage/operation-scope.d.ts.map +1 -1
- package/dist/storage/operation-scope.js +7 -3
- package/dist/storage/operation-scope.js.map +1 -1
- package/dist/storage/projection-runs/provider.js +2 -2
- package/dist/storage/share-grants/provider.js +3 -3
- package/dist/storage/types.d.ts +1 -1
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +12 -12
- package/dist/syncs/index.js +35 -35
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/agent-token-rate-storage-contract.d.ts +14 -0
- package/dist/testing/agent-token-rate-storage-contract.d.ts.map +1 -0
- package/dist/testing/ai-model-call-groups-contract.d.ts +1 -1
- package/dist/testing/ai-model-call-groups-contract.d.ts.map +1 -1
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +4671 -3499
- package/dist/testing/index.js.map +14 -11
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/object-query-contract.d.ts.map +1 -1
- package/dist/testing/ontology-contract-fixture.d.ts +3 -3
- package/dist/testing/ontology-contract-fixture.d.ts.map +1 -1
- package/dist/testing/ontology-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/testing/sandbox-credentials-contract.d.ts +27 -0
- package/dist/testing/sandbox-credentials-contract.d.ts.map +1 -0
- package/dist/testing/sandboxes-contract.d.ts.map +1 -1
- package/dist/testing/users.d.ts +20 -0
- package/dist/testing/users.d.ts.map +1 -0
- package/dist/users/execution.d.ts +6 -2
- package/dist/users/execution.d.ts.map +1 -1
- package/dist/users/index.d.ts +1 -1
- package/dist/users/index.d.ts.map +1 -1
- package/dist/webhooks/internal.js +28 -28
- package/dist/webhooks/internal.js.map +1 -1
- package/dist/workers/index.js +1 -1
- package/dist/workers/index.js.map +1 -1
- package/dist/workflows/builders.d.ts.map +1 -1
- package/dist/workflows/index.js +58 -56
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/types.d.ts +6 -0
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/validation.d.ts.map +1 -1
- package/package.json +7 -1
- package/src/actions/request.ts +6 -0
- package/src/actions/run/context.ts +6 -0
- package/src/actions/run/execute.ts +8 -2
- package/src/actions/run/executor.ts +4 -0
- package/src/actions/run/types.ts +5 -0
- package/src/actions/types/context.ts +11 -0
- package/src/agents/README.md +144 -0
- package/src/agents/adapters.ts +73 -23
- package/src/agents/approvals.ts +22 -0
- package/src/agents/attachment-keys.ts +83 -0
- package/src/agents/cancel.ts +16 -1
- package/src/agents/children.ts +5 -3
- package/src/agents/context-budget.ts +121 -0
- package/src/agents/context-compaction.ts +317 -150
- package/src/agents/context-files.ts +48 -0
- package/src/agents/context-parts.ts +219 -0
- package/src/agents/context-request.ts +100 -0
- package/src/agents/context-token-rate.ts +224 -0
- package/src/agents/context-use.ts +187 -0
- package/src/agents/dispatch.ts +8 -58
- package/src/agents/execution.ts +123 -0
- package/src/agents/index.ts +173 -23
- package/src/agents/inline-images.ts +17 -0
- package/src/agents/message.ts +70 -1
- package/src/agents/model-loop.ts +209 -128
- package/src/agents/model-routing.ts +7 -2
- package/src/agents/request.ts +87 -21
- package/src/agents/run-after-finish.ts +133 -0
- package/src/agents/run-artifacts.ts +257 -0
- package/src/agents/run-events.ts +303 -0
- package/src/agents/run-fence.ts +71 -0
- package/src/agents/run-liveness.ts +122 -0
- package/src/agents/run-plan.ts +335 -0
- package/src/agents/run-session-children.ts +303 -0
- package/src/agents/run-session-http.ts +400 -0
- package/src/agents/run-session-serve.ts +603 -0
- package/src/agents/run-session-wire.ts +189 -0
- package/src/agents/run-session.ts +828 -0
- package/src/agents/run-token.ts +124 -0
- package/src/agents/run-tools.ts +188 -0
- package/src/agents/run-turn.ts +355 -0
- package/src/agents/skills.ts +9 -2
- package/src/agents/step-limits.ts +27 -0
- package/src/agents/streams/index.ts +2 -0
- package/src/agents/streams/internal.ts +2 -1
- package/src/agents/streams/protocol.ts +125 -294
- package/src/agents/subagent-runs.ts +19 -1
- package/src/agents/thread-context-projection.ts +25 -17
- package/src/agents/tool-files.ts +263 -0
- package/src/agents/workflow-node-session.ts +387 -0
- package/src/artifacts/publish/index.ts +1 -0
- package/src/auth/runtime.ts +30 -1
- package/src/auth/types.ts +5 -0
- package/src/authorization/decision.ts +5 -0
- package/src/authorization/grant-kinds.ts +8 -0
- package/src/authorization/index.ts +2 -0
- package/src/authorization/run-visibility.ts +37 -0
- package/src/connectors/connections/authorizations.ts +3 -2
- package/src/connectors/connections/service.ts +5 -1
- package/src/connectors/connections/tokens.ts +41 -5
- package/src/connectors/connections/validation.ts +21 -0
- package/src/connectors/types.ts +12 -2
- package/src/datasets/execution.ts +89 -2
- package/src/datasets/index.ts +1 -0
- package/src/datasets/lineage.ts +194 -0
- package/src/deploy/types.ts +8 -3
- package/src/deploy/validation.ts +1 -4
- package/src/env/index.ts +46 -0
- package/src/errors/catalog.ts +12 -0
- package/src/execution/agent.ts +2 -2
- package/src/execution/authorized-object-reader.ts +28 -1
- package/src/execution/index.ts +1 -0
- package/src/execution/request-client.ts +44 -0
- package/src/execution/request.ts +2 -0
- package/src/http/api-routes.ts +136 -50
- package/src/index.ts +35 -1
- package/src/lineage/README.md +107 -0
- package/src/lineage/commits.ts +173 -0
- package/src/lineage/executors.ts +103 -0
- package/src/lineage/link.ts +138 -0
- package/src/lineage/object.ts +218 -0
- package/src/lineage/projections.ts +174 -0
- package/src/lineage/reader.ts +89 -0
- package/src/lineage/sources.ts +156 -0
- package/src/lineage/types.ts +149 -0
- package/src/materializer/effective/resolve.ts +198 -50
- package/src/models/errors.ts +10 -0
- package/src/models/events.ts +13 -1
- package/src/models/execution/README.md +15 -1
- package/src/models/execution/errors.ts +14 -0
- package/src/models/execution/index.ts +3 -1
- package/src/models/execution/model-call-recorder.ts +19 -11
- package/src/models/execution.ts +9 -11
- package/src/models/index.ts +3 -0
- package/src/models/language-call.ts +247 -0
- package/src/models/language-model.ts +34 -2
- package/src/objects/execution.ts +6 -1
- package/src/objects/query/executor.ts +28 -13
- package/src/objects/query/index.ts +1 -0
- package/src/objects/query/ir.ts +16 -0
- package/src/objects/query/link-endpoints.ts +29 -0
- package/src/objects/query/normalize.ts +3 -0
- package/src/objects/query/planner.ts +5 -0
- package/src/objects/query/validate.ts +73 -3
- package/src/objects/sdk/object-set.ts +33 -1
- package/src/ontology/docs-markdown.ts +14 -0
- package/src/ontology/index.ts +1 -1
- package/src/ontology/user-ref.ts +40 -6
- package/src/projections/builders.ts +48 -4
- package/src/projections/index.ts +1 -0
- package/src/projections/registry.ts +1 -0
- package/src/projections/revision.ts +10 -0
- package/src/projections/types.ts +8 -0
- package/src/projections/validation.ts +52 -6
- package/src/queues/in-memory.ts +0 -5
- package/src/queues/index.ts +0 -2
- package/src/queues/types.ts +0 -13
- package/src/runtime/create.ts +6 -0
- package/src/runtime/host.ts +1 -1
- package/src/runtime/resolve-definitions.ts +7 -0
- package/src/runtime/sixb.ts +4 -1
- package/src/runtime/types.ts +18 -0
- package/src/sandboxes/README.md +17 -6
- package/src/sandboxes/configuration.ts +7 -9
- package/src/sandboxes/environment.ts +1 -0
- package/src/sandboxes/exec.ts +36 -9
- package/src/sandboxes/guest-credentials.ts +262 -0
- package/src/sandboxes/index.ts +14 -0
- package/src/sandboxes/sandbox.ts +19 -4
- package/src/security/grants.ts +3 -0
- package/src/security/project.ts +1 -0
- package/src/security/types.ts +8 -3
- package/src/security/validation.ts +5 -4
- package/src/shares/execution.ts +35 -3
- package/src/shares/index.ts +1 -0
- package/src/storage/agents/in-memory.ts +225 -1
- package/src/storage/agents/index.ts +10 -0
- package/src/storage/agents/provider.ts +270 -12
- package/src/storage/agents/types.ts +195 -7
- package/src/storage/ai-cost/analytics.ts +177 -10
- package/src/storage/ai-cost/groups.ts +122 -35
- package/src/storage/ai-cost/in-memory.ts +10 -4
- package/src/storage/ai-cost/index.ts +5 -0
- package/src/storage/ai-cost/provider.ts +5 -1
- package/src/storage/ai-cost/types.ts +65 -9
- package/src/storage/in-memory/index.ts +10 -0
- package/src/storage/index.ts +17 -0
- package/src/storage/objects/in-memory/query.ts +5 -1
- package/src/storage/objects/query-preparation.ts +10 -0
- package/src/storage/ontology/commits.ts +6 -1
- package/src/storage/ontology/in-memory/commits.ts +7 -0
- package/src/storage/ontology/in-memory/materializations.ts +24 -0
- package/src/storage/ontology/index.ts +2 -0
- package/src/storage/ontology/materializations.ts +21 -0
- package/src/storage/ontology/provider.ts +41 -1
- package/src/storage/operation-scope.ts +41 -0
- package/src/storage/types.ts +1 -0
- package/src/testing/agent-storage-contract.ts +581 -2
- package/src/testing/agent-token-rate-storage-contract.ts +171 -0
- package/src/testing/ai-model-call-groups-contract.ts +225 -8
- package/src/testing/index.ts +10 -0
- package/src/testing/materializer-storage-contract.ts +294 -10
- package/src/testing/object-query-contract.ts +48 -0
- package/src/testing/ontology-contract-fixture.ts +18 -7
- package/src/testing/ontology-storage-contract.ts +42 -0
- package/src/testing/queues-contract.ts +0 -16
- package/src/testing/sandbox-credentials-contract.ts +284 -0
- package/src/testing/sandboxes-contract.ts +21 -0
- package/src/testing/users.ts +39 -0
- package/src/users/execution.ts +33 -7
- package/src/users/index.ts +7 -1
- package/src/workflows/builders.ts +8 -1
- package/src/workflows/types.ts +6 -0
- package/src/workflows/validation.ts +1 -0
- package/dist/agents/api-gateway.d.ts +0 -26
- package/dist/agents/api-gateway.d.ts.map +0 -1
- package/dist/chunk-0xmt5p5y.js.map +0 -14
- package/dist/chunk-18sk89cg.js.map +0 -10
- package/dist/chunk-2adz0h75.js.map +0 -11
- package/dist/chunk-2x19q6k6.js.map +0 -17
- package/dist/chunk-4y26vs3v.js.map +0 -10
- package/dist/chunk-661ezhks.js.map +0 -11
- package/dist/chunk-d2m879s4.js.map +0 -12
- package/dist/chunk-et017krg.js.map +0 -120
- package/dist/chunk-gqm0b7vd.js.map +0 -48
- package/dist/chunk-hk38wahh.js.map +0 -18
- package/dist/chunk-hqsp2sx4.js.map +0 -14
- package/dist/chunk-j936th07.js.map +0 -12
- package/dist/chunk-n9w3n38q.js.map +0 -23
- package/dist/chunk-nydf3dbe.js.map +0 -13
- package/dist/chunk-nzapm6p0.js.map +0 -12
- package/dist/chunk-r6szek0x.js.map +0 -10
- package/dist/chunk-vabga7fk.js +0 -176
- package/dist/chunk-vabga7fk.js.map +0 -12
- package/dist/chunk-vd1rk42q.js.map +0 -12
- package/dist/chunk-vhbw5sqm.js.map +0 -10
- package/dist/chunk-vpgwq5nf.js +0 -810
- package/dist/chunk-vpgwq5nf.js.map +0 -21
- package/src/agents/api-gateway.ts +0 -68
- /package/dist/{chunk-c0vk1djt.js.map → chunk-165c9wm6.js.map} +0 -0
- /package/dist/{chunk-6n69k945.js.map → chunk-21q0j5f2.js.map} +0 -0
- /package/dist/{chunk-1t6k1avb.js.map → chunk-6b61s40c.js.map} +0 -0
- /package/dist/{chunk-m36fw8ft.js.map → chunk-8wsjr52f.js.map} +0 -0
- /package/dist/{chunk-pgrf64hp.js.map → chunk-agn8d8ys.js.map} +0 -0
- /package/dist/{chunk-bab05bhg.js.map → chunk-e7v3trpz.js.map} +0 -0
- /package/dist/{chunk-2gjj5dx3.js.map → chunk-jhbk10wf.js.map} +0 -0
- /package/dist/{chunk-7ny9mjgm.js.map → chunk-m3qe54bb.js.map} +0 -0
- /package/dist/{chunk-fe8zwt8b.js.map → chunk-peggaard.js.map} +0 -0
- /package/dist/{chunk-dp0cdtj2.js.map → chunk-qsg8rw04.js.map} +0 -0
|
@@ -6,23 +6,25 @@ import {
|
|
|
6
6
|
createSixbError2,
|
|
7
7
|
toSixbFailure2,
|
|
8
8
|
parseSixbFailure2
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-escedwyt.js";
|
|
10
10
|
import {
|
|
11
11
|
vectorSources,
|
|
12
12
|
hasVectorProfile2,
|
|
13
|
+
linkTargetObjectTypeIds,
|
|
14
|
+
linkEndpointObjectTypeIds2,
|
|
13
15
|
paginate,
|
|
14
16
|
InMemoryAuthStorage2,
|
|
15
17
|
principalsEqual2
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3x3bebz7.js";
|
|
17
19
|
import {
|
|
18
20
|
ObjectReadLimitExceededError2,
|
|
19
21
|
snapshotObjectReadExecutionLimits2,
|
|
20
22
|
assertObjectReadFacetCount2,
|
|
21
23
|
assertObjectReadOutputWithinLimit2
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-dz7a4t3a.js";
|
|
23
25
|
import {
|
|
24
26
|
assertObjectReaderProject2
|
|
25
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-31khg3g0.js";
|
|
26
28
|
import {
|
|
27
29
|
UNIQUE_VALUE_KEY_VERSION,
|
|
28
30
|
uniquePropertiesOf,
|
|
@@ -30,7 +32,7 @@ import {
|
|
|
30
32
|
queryScalarKindForSchema,
|
|
31
33
|
resolvePropertyQueryCapabilities2,
|
|
32
34
|
resolveQuerySchema
|
|
33
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-djs3hw9p.js";
|
|
34
36
|
import {
|
|
35
37
|
createEventId2
|
|
36
38
|
} from "./chunk-zrvhsq7f.js";
|
|
@@ -44,6 +46,15 @@ import {
|
|
|
44
46
|
countsAsThreadMessage2,
|
|
45
47
|
planAgentThreadFork2,
|
|
46
48
|
assertConversationAgentRunSpec2,
|
|
49
|
+
assertAgentThreadComputer2,
|
|
50
|
+
assertComputerPlace2,
|
|
51
|
+
assertAgentComputerSession2,
|
|
52
|
+
assertAssignableComputer2,
|
|
53
|
+
assertMovableToCloud2,
|
|
54
|
+
assertTurnInThreadPlace2,
|
|
55
|
+
assertStartsOnComputer2,
|
|
56
|
+
movesComputerPlace2,
|
|
57
|
+
queuedTurnInCloud2,
|
|
47
58
|
assertAgentApprovalModeInput2,
|
|
48
59
|
assertAgentRunExecution2,
|
|
49
60
|
assertCreateSubagentRunInput2,
|
|
@@ -61,6 +72,7 @@ import {
|
|
|
61
72
|
agentMemoryConflicts2,
|
|
62
73
|
compareAgentMemoryPaths2,
|
|
63
74
|
agentMemoryHistoryCutoff2,
|
|
75
|
+
assertAgentTokenRateRecord2,
|
|
64
76
|
LIVE_AGENT_APPROVAL_STATUSES2,
|
|
65
77
|
agentApprovalHoldsRun2,
|
|
66
78
|
assertAwaitingApprovalFinish2,
|
|
@@ -73,7 +85,7 @@ import {
|
|
|
73
85
|
assertAgentApprovalCaller2,
|
|
74
86
|
newAgentApprovalRecord2,
|
|
75
87
|
agentApprovalMatches2
|
|
76
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-edx8xcsm.js";
|
|
77
89
|
import {
|
|
78
90
|
InMemoryAiUsageStorage2,
|
|
79
91
|
buildAiAccountingOverview,
|
|
@@ -82,7 +94,7 @@ import {
|
|
|
82
94
|
buildAiModelCallGroups,
|
|
83
95
|
normalizeAiModelCallCostRecord2,
|
|
84
96
|
aiModelCallCostMatchesUsage2
|
|
85
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-0g5nyx0k.js";
|
|
86
98
|
import {
|
|
87
99
|
AiLimitStorageError2,
|
|
88
100
|
aiLimitCalendarMonth2,
|
|
@@ -108,14 +120,14 @@ import {
|
|
|
108
120
|
cloneAiLimitPolicy2,
|
|
109
121
|
assertNonBlank2,
|
|
110
122
|
cloneValidDate2
|
|
111
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-7hd2ez3q.js";
|
|
112
124
|
import {
|
|
113
125
|
isAbandonedFileUploadSession,
|
|
114
126
|
shouldDeleteFileUploadSession
|
|
115
127
|
} from "./chunk-h89wz928.js";
|
|
116
128
|
import {
|
|
117
129
|
DurableFileUploadSessions2
|
|
118
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-23s66j86.js";
|
|
119
131
|
import {
|
|
120
132
|
actionSubjectsEqual,
|
|
121
133
|
normalizeRecordActionRunInput2,
|
|
@@ -135,7 +147,7 @@ import {
|
|
|
135
147
|
canRequeueSyncRunAfterEnqueueFailure2,
|
|
136
148
|
createTransactionStorageProxy2,
|
|
137
149
|
throwNestedStorageTransaction2
|
|
138
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-peggaard.js";
|
|
139
151
|
import {
|
|
140
152
|
ExecutionStorageError2,
|
|
141
153
|
prepareExecutionRecord2,
|
|
@@ -181,6 +193,7 @@ import {
|
|
|
181
193
|
ProviderMaterializationTransactionLifecycle2,
|
|
182
194
|
prepareMaterializationWork2,
|
|
183
195
|
uniqueSorted2,
|
|
196
|
+
prepareMaterializationStateRead2,
|
|
184
197
|
assertExpectedObjectRevision2,
|
|
185
198
|
assertExpectedLinkRevision2,
|
|
186
199
|
assertExpectedLinkScopeRevision2,
|
|
@@ -195,7 +208,7 @@ import {
|
|
|
195
208
|
assertSourceStagedRow2,
|
|
196
209
|
isExactStagingManifest2,
|
|
197
210
|
sourceConflict2
|
|
198
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-nz7815t3.js";
|
|
199
212
|
import {
|
|
200
213
|
createStorageOperationScope2,
|
|
201
214
|
createOperationScopedFacade2,
|
|
@@ -204,7 +217,7 @@ import {
|
|
|
204
217
|
createOntologyOperationScope2,
|
|
205
218
|
createObjectOperationScope2,
|
|
206
219
|
createWorkflowRunOperationScope2
|
|
207
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-s7xqfxs9.js";
|
|
208
221
|
import {
|
|
209
222
|
PipelineRunError2,
|
|
210
223
|
assertPipelineRunExecution2
|
|
@@ -239,7 +252,7 @@ import {
|
|
|
239
252
|
assertProjectionMissingTarget2,
|
|
240
253
|
requireTelemetryProjectionRun2,
|
|
241
254
|
assertProjectionRunDurableExecution2
|
|
242
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-scyq22td.js";
|
|
243
256
|
import {
|
|
244
257
|
SyncRunError2,
|
|
245
258
|
assertSyncRunExecution2
|
|
@@ -252,7 +265,7 @@ import {
|
|
|
252
265
|
WorkflowRunError2,
|
|
253
266
|
assertWorkflowRunExecution2,
|
|
254
267
|
assertWorkflowAgentNodeRunExecution2
|
|
255
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-neftrg0n.js";
|
|
256
269
|
import {
|
|
257
270
|
ShareGrantStorageError2,
|
|
258
271
|
normalizeShareGrantCreate2,
|
|
@@ -261,7 +274,7 @@ import {
|
|
|
261
274
|
normalizeListShareGrantsInput2,
|
|
262
275
|
normalizeRevokeShareGrantInput2,
|
|
263
276
|
cloneShareGrantRecord2
|
|
264
|
-
} from "./chunk-
|
|
277
|
+
} from "./chunk-2pk5hjj9.js";
|
|
265
278
|
import {
|
|
266
279
|
ShareSessionStorageError2,
|
|
267
280
|
normalizeShareSessionCreate2,
|
|
@@ -271,13 +284,13 @@ import {
|
|
|
271
284
|
normalizeRevokeShareSessionInput2,
|
|
272
285
|
cloneShareSessionRecord2
|
|
273
286
|
} from "./chunk-z8fx5cgb.js";
|
|
287
|
+
import {
|
|
288
|
+
ActionRunError2
|
|
289
|
+
} from "./chunk-3gbefjg5.js";
|
|
274
290
|
import {
|
|
275
291
|
ConnectorConnectionStorageError2,
|
|
276
292
|
CONNECTOR_CONNECTION_RUN_FAILURE_CODES2
|
|
277
293
|
} from "./chunk-2c4j899j.js";
|
|
278
|
-
import {
|
|
279
|
-
ActionRunError2
|
|
280
|
-
} from "./chunk-3gbefjg5.js";
|
|
281
294
|
import {
|
|
282
295
|
assertPinnedDatasetWatermark2
|
|
283
296
|
} from "./chunk-n8q5j6y5.js";
|
|
@@ -290,8 +303,9 @@ import {
|
|
|
290
303
|
compareDecimalValues2
|
|
291
304
|
} from "./chunk-3bh94gbw.js";
|
|
292
305
|
import {
|
|
293
|
-
AGENT_RUN_FAILURE_CODES2
|
|
294
|
-
|
|
306
|
+
AGENT_RUN_FAILURE_CODES2,
|
|
307
|
+
AGENT_TOKEN_RATE_SAMPLES2
|
|
308
|
+
} from "./chunk-jk97v21j.js";
|
|
295
309
|
import {
|
|
296
310
|
cloneJsonValue2,
|
|
297
311
|
stableJsonStringify2
|
|
@@ -443,6 +457,7 @@ class InMemoryAgentThreadStore {
|
|
|
443
457
|
return clone(sandboxState);
|
|
444
458
|
}
|
|
445
459
|
async create(input) {
|
|
460
|
+
assertComputerPlace2(input.runsOn, input.computer);
|
|
446
461
|
const sandboxParams = input.sandboxParams === undefined ? undefined : snapshotAgentThreadSandboxParams2(input.sandboxParams);
|
|
447
462
|
const threadKey = key(input.projectId, input.id);
|
|
448
463
|
if (this.state.threads.has(threadKey)) {
|
|
@@ -456,6 +471,8 @@ class InMemoryAgentThreadStore {
|
|
|
456
471
|
ownerPrincipal: clone(input.ownerPrincipal),
|
|
457
472
|
...sandboxParams === undefined ? {} : { sandboxParams },
|
|
458
473
|
...input.title === undefined ? {} : { title: input.title },
|
|
474
|
+
...input.runsOn === undefined ? {} : { runsOn: input.runsOn },
|
|
475
|
+
...input.computer === undefined ? {} : { computer: clone(input.computer) },
|
|
459
476
|
status: input.status ?? "active",
|
|
460
477
|
activeRunId: null,
|
|
461
478
|
messageCount: 0,
|
|
@@ -479,6 +496,7 @@ class InMemoryAgentThreadStore {
|
|
|
479
496
|
const messages = [...this.state.messages.values()].filter((message) => message.projectId === input.projectId).filter((message) => message.threadId === source.id).sort((left, right) => left.seq - right.seq);
|
|
480
497
|
const checkpoints = [...this.state.checkpoints.values()].filter((checkpoint) => checkpoint.projectId === input.projectId).filter((checkpoint) => checkpoint.threadId === source.id).sort(compareLatestCheckpoints);
|
|
481
498
|
const plan = planAgentThreadFork2(input, {
|
|
499
|
+
workspace: source,
|
|
482
500
|
...activeRun?.kind === "conversation" ? { triggerMessageId: activeRun.triggerMessageId } : {},
|
|
483
501
|
messages: messages.map((message) => ({
|
|
484
502
|
...message,
|
|
@@ -518,6 +536,11 @@ class InMemoryAgentThreadStore {
|
|
|
518
536
|
const order = input.order ?? "desc";
|
|
519
537
|
const statuses = input.statuses ? new Set(input.statuses) : null;
|
|
520
538
|
const filtered = [...this.state.threads.values()].filter((thread) => thread.projectId === input.projectId).filter((thread) => thread.kind === "conversation").filter((thread) => statuses ? statuses.has(thread.status) : true).filter((thread) => input.ownerPrincipal ? principalsEqual2(thread.ownerPrincipal, input.ownerPrincipal) : true).filter((thread) => {
|
|
539
|
+
const on = input.activeOnComputer;
|
|
540
|
+
if (!on)
|
|
541
|
+
return true;
|
|
542
|
+
return thread.activeRunId !== null && thread.computer?.id === on.id && thread.computer.folder === on.folder;
|
|
543
|
+
}).filter((thread) => {
|
|
521
544
|
const participant = input.participantPrincipal;
|
|
522
545
|
if (!participant)
|
|
523
546
|
return true;
|
|
@@ -555,6 +578,33 @@ class InMemoryAgentThreadStore {
|
|
|
555
578
|
this.state.participants.set(threadKey, kept);
|
|
556
579
|
return true;
|
|
557
580
|
}
|
|
581
|
+
async assignComputer(input) {
|
|
582
|
+
assertAgentThreadComputer2(input.computer);
|
|
583
|
+
const threadKey = key(input.projectId, input.id);
|
|
584
|
+
const thread = this.state.threads.get(threadKey) ?? null;
|
|
585
|
+
const active = thread?.activeRunId ? this.state.runs.get(key(input.projectId, thread.activeRunId)) ?? null : null;
|
|
586
|
+
assertAssignableComputer2(thread, active, input.computer, input.id);
|
|
587
|
+
const assigned = {
|
|
588
|
+
...thread,
|
|
589
|
+
computer: clone(input.computer),
|
|
590
|
+
...movesComputerPlace2(thread, input.computer) ? { movedAt: new Date(input.movedAt ?? new Date) } : {}
|
|
591
|
+
};
|
|
592
|
+
this.state.threads.set(threadKey, assigned);
|
|
593
|
+
return clone(assigned);
|
|
594
|
+
}
|
|
595
|
+
async moveToCloud(input) {
|
|
596
|
+
const threadKey = key(input.projectId, input.id);
|
|
597
|
+
const thread = this.state.threads.get(threadKey) ?? null;
|
|
598
|
+
const active = thread?.activeRunId ? this.state.runs.get(key(input.projectId, thread.activeRunId)) ?? null : null;
|
|
599
|
+
assertMovableToCloud2(thread, active, input.id);
|
|
600
|
+
const queued = queuedTurnInCloud2(active);
|
|
601
|
+
if (queued)
|
|
602
|
+
this.state.runs.set(key(input.projectId, queued.id), queued);
|
|
603
|
+
const { runsOn: _runsOn, computer: _computer, ...rest } = thread;
|
|
604
|
+
const moved = { ...rest, movedAt: new Date(input.movedAt ?? new Date) };
|
|
605
|
+
this.state.threads.set(threadKey, moved);
|
|
606
|
+
return { thread: clone(moved), ...queued ? { queued: clone(queued) } : {} };
|
|
607
|
+
}
|
|
558
608
|
async listParticipants(input) {
|
|
559
609
|
return [...new Set(input.threadIds)].flatMap((threadId) => clone(this.participantsOf(input.projectId, threadId))).sort(compareAgentThreadParticipants2);
|
|
560
610
|
}
|
|
@@ -587,6 +637,7 @@ class InMemoryAgentRunStore {
|
|
|
587
637
|
if (thread.activeRunId !== null) {
|
|
588
638
|
throw new AgentStorageError2("active_run_exists", `[Sixb] Agent thread '${input.threadId}' already has an active run '${thread.activeRunId}'.`);
|
|
589
639
|
}
|
|
640
|
+
assertTurnInThreadPlace2(thread.runsOn, input.spec, input.threadId);
|
|
590
641
|
const runKey = key(input.projectId, input.id);
|
|
591
642
|
if (this.state.runs.has(runKey)) {
|
|
592
643
|
throw new AgentStorageError2("duplicate_id", `[Sixb] Agent run '${input.id}' already exists for project '${input.projectId}'.`);
|
|
@@ -710,6 +761,10 @@ class InMemoryAgentRunStore {
|
|
|
710
761
|
}
|
|
711
762
|
async start(input) {
|
|
712
763
|
const run = this.requireStatus(input.projectId, input.id, "queued");
|
|
764
|
+
if (input.onComputer) {
|
|
765
|
+
const thread = this.state.threads.get(key(input.projectId, run.threadId));
|
|
766
|
+
assertStartsOnComputer2(run, thread?.computer, input.onComputer);
|
|
767
|
+
}
|
|
713
768
|
const startedAt = new Date(input.startedAt ?? new Date);
|
|
714
769
|
const next = {
|
|
715
770
|
...run,
|
|
@@ -737,6 +792,9 @@ class InMemoryAgentRunStore {
|
|
|
737
792
|
}
|
|
738
793
|
async reclaim(input) {
|
|
739
794
|
const run = this.requireRunning(input.projectId, input.id);
|
|
795
|
+
if (input.ifLapsedBy && run.execution && run.execution.queueLeaseExpiresAt.getTime() > input.ifLapsedBy.getTime()) {
|
|
796
|
+
throw leaseStillHeld(input.id);
|
|
797
|
+
}
|
|
740
798
|
const next = {
|
|
741
799
|
...run,
|
|
742
800
|
attempt: run.attempt + 1,
|
|
@@ -760,6 +818,17 @@ class InMemoryAgentRunStore {
|
|
|
760
818
|
this.state.runs.set(key(input.projectId, input.id), clone(next));
|
|
761
819
|
return clone(next);
|
|
762
820
|
}
|
|
821
|
+
async requestCancel(input) {
|
|
822
|
+
const run = this.state.runs.get(key(input.projectId, input.id));
|
|
823
|
+
if (!run) {
|
|
824
|
+
throw new AgentStorageError2("run_not_found", `[Sixb] Agent run '${input.id}' was not found.`);
|
|
825
|
+
}
|
|
826
|
+
if (run.status !== "running" || run.cancelRequestedAt)
|
|
827
|
+
return clone(run);
|
|
828
|
+
const next = { ...run, cancelRequestedAt: input.at ?? new Date };
|
|
829
|
+
this.state.runs.set(key(input.projectId, input.id), clone(next));
|
|
830
|
+
return clone(next);
|
|
831
|
+
}
|
|
763
832
|
async finish(input) {
|
|
764
833
|
const run = this.requireRunning(input.projectId, input.id);
|
|
765
834
|
if (!run.execution || run.execution.token !== input.executionToken) {
|
|
@@ -810,7 +879,7 @@ class InMemoryAgentRunStore {
|
|
|
810
879
|
const order = input.order ?? "desc";
|
|
811
880
|
const statuses = input.statuses ? new Set(input.statuses) : null;
|
|
812
881
|
const kinds = input.kinds ? new Set(input.kinds) : null;
|
|
813
|
-
const filtered = [...this.state.runs.values()].filter((run) => run.projectId === input.projectId).filter((run) => kinds ? kinds.has(run.kind) : true).filter((run) => input.threadId ? run.threadId === input.threadId : true).filter((run) => input.parentRunId ? run.kind === "subagent" && run.parentRunId === input.parentRunId : true).filter((run) => statuses ? statuses.has(run.status) : true).filter((run) => input.startedAfter ? (run.startedAt ?? run.createdAt) >= input.startedAfter : true).filter((run) => input.startedBefore ? (run.startedAt ?? run.createdAt) <= input.startedBefore : true).sort((a, b) => compareByDate(a.startedAt ?? a.createdAt, b.startedAt ?? b.createdAt, a.id, b.id, order));
|
|
882
|
+
const filtered = [...this.state.runs.values()].filter((run) => run.projectId === input.projectId).filter((run) => kinds ? kinds.has(run.kind) : true).filter((run) => input.threadId ? run.threadId === input.threadId : true).filter((run) => input.parentRunId ? run.kind === "subagent" && run.parentRunId === input.parentRunId : true).filter((run) => statuses ? statuses.has(run.status) : true).filter((run) => !input.excludeComputerTurns || run.kind !== "conversation" || run.spec?.runsOn !== "computer").filter((run) => input.startedAfter ? (run.startedAt ?? run.createdAt) >= input.startedAfter : true).filter((run) => input.startedBefore ? (run.startedAt ?? run.createdAt) <= input.startedBefore : true).sort((a, b) => compareByDate(a.startedAt ?? a.createdAt, b.startedAt ?? b.createdAt, a.id, b.id, order));
|
|
814
883
|
const { page, hasMore, total } = applyWindow(filtered, input.offset, input.limit);
|
|
815
884
|
return { runs: page.map(clone), hasMore, total };
|
|
816
885
|
}
|
|
@@ -901,6 +970,12 @@ class InMemoryAgentMessageStore {
|
|
|
901
970
|
return clone(message);
|
|
902
971
|
}
|
|
903
972
|
async deleteByRunId(input) {
|
|
973
|
+
if (input.fence) {
|
|
974
|
+
const owner = this.state.runs.get(key(input.projectId, input.fence.runId));
|
|
975
|
+
if (owner?.status !== "running" || owner.execution?.token !== input.fence.executionToken) {
|
|
976
|
+
throw new AgentStorageError2("execution_lost", `[Sixb] Execution token is no longer current on agent run '${input.fence.runId}'.`);
|
|
977
|
+
}
|
|
978
|
+
}
|
|
904
979
|
const threadKey = key(input.projectId, input.threadId);
|
|
905
980
|
const thread = this.state.threads.get(threadKey);
|
|
906
981
|
if (!thread) {
|
|
@@ -1237,6 +1312,34 @@ function compareApprovals(left, right) {
|
|
|
1237
1312
|
return compareByDate(left.createdAt, right.createdAt, left.id, right.id, "asc");
|
|
1238
1313
|
}
|
|
1239
1314
|
|
|
1315
|
+
class InMemoryAgentComputerSessionStore {
|
|
1316
|
+
sessions = new Map;
|
|
1317
|
+
async hold(input) {
|
|
1318
|
+
assertAgentComputerSession2(input);
|
|
1319
|
+
this.sessions.set(sessionKey(input), clone(input));
|
|
1320
|
+
}
|
|
1321
|
+
async release(input) {
|
|
1322
|
+
const held = this.sessions.get(sessionKey(input)) ?? null;
|
|
1323
|
+
this.sessions.delete(sessionKey(input));
|
|
1324
|
+
return held && clone(held);
|
|
1325
|
+
}
|
|
1326
|
+
async listLive(input) {
|
|
1327
|
+
return [...this.sessions.values()].filter((session) => session.projectId === input.projectId && principalsEqual2(session.ownerPrincipal, input.ownerPrincipal) && session.expiresAt > input.now).map(clone);
|
|
1328
|
+
}
|
|
1329
|
+
async removeLapsed(input) {
|
|
1330
|
+
const lapsed = [...this.sessions.values()].filter((session) => session.projectId === input.projectId && session.expiresAt <= input.now);
|
|
1331
|
+
for (const session of lapsed)
|
|
1332
|
+
this.sessions.delete(sessionKey(session));
|
|
1333
|
+
return lapsed.map(clone);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
function sessionKey(input) {
|
|
1337
|
+
return JSON.stringify([input.projectId, principalKeyOf(input.ownerPrincipal), input.id]);
|
|
1338
|
+
}
|
|
1339
|
+
function principalKeyOf(principal) {
|
|
1340
|
+
return `${principal.type}:${principal.id}`;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1240
1343
|
class InMemoryAgentApprovalModeStore {
|
|
1241
1344
|
state;
|
|
1242
1345
|
constructor(state) {
|
|
@@ -1272,6 +1375,27 @@ function threadModeKey(input) {
|
|
|
1272
1375
|
return JSON.stringify([input.projectId, input.threadId, input.principal.type, input.principal.id]);
|
|
1273
1376
|
}
|
|
1274
1377
|
|
|
1378
|
+
class InMemoryAgentTokenRateStore {
|
|
1379
|
+
state;
|
|
1380
|
+
constructor(state) {
|
|
1381
|
+
this.state = state;
|
|
1382
|
+
}
|
|
1383
|
+
async record(input) {
|
|
1384
|
+
assertAgentTokenRateRecord2(input);
|
|
1385
|
+
this.state.tokenRates.set(JSON.stringify([input.projectId, input.runId]), { ...input });
|
|
1386
|
+
const dropped = this.ofModel(input).slice(AGENT_TOKEN_RATE_SAMPLES2);
|
|
1387
|
+
for (const record of dropped) {
|
|
1388
|
+
this.state.tokenRates.delete(JSON.stringify([record.projectId, record.runId]));
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
async listLatest(input) {
|
|
1392
|
+
return this.ofModel(input).slice(0, AGENT_TOKEN_RATE_SAMPLES2).map((record) => ({ ...record }));
|
|
1393
|
+
}
|
|
1394
|
+
ofModel(model) {
|
|
1395
|
+
return [...this.state.tokenRates.values()].filter((record) => record.projectId === model.projectId && record.providerId === model.providerId && record.modelId === model.modelId).sort((left, right) => compareByDate(left.measuredAt, right.measuredAt, left.runId, right.runId, "desc"));
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1275
1399
|
class InMemoryAgentStorage2 {
|
|
1276
1400
|
state = {
|
|
1277
1401
|
threads: new Map,
|
|
@@ -1281,7 +1405,8 @@ class InMemoryAgentStorage2 {
|
|
|
1281
1405
|
checkpoints: new Map,
|
|
1282
1406
|
memory: new Map,
|
|
1283
1407
|
approvals: new Map,
|
|
1284
|
-
approvalModes: new Map
|
|
1408
|
+
approvalModes: new Map,
|
|
1409
|
+
tokenRates: new Map
|
|
1285
1410
|
};
|
|
1286
1411
|
threads;
|
|
1287
1412
|
runs;
|
|
@@ -1290,6 +1415,8 @@ class InMemoryAgentStorage2 {
|
|
|
1290
1415
|
memory;
|
|
1291
1416
|
approvals;
|
|
1292
1417
|
approvalModes;
|
|
1418
|
+
tokenRates;
|
|
1419
|
+
computers = new InMemoryAgentComputerSessionStore;
|
|
1293
1420
|
constructor(executions) {
|
|
1294
1421
|
this.threads = new InMemoryAgentThreadStore(this.state);
|
|
1295
1422
|
this.runs = new InMemoryAgentRunStore(this.state, executions);
|
|
@@ -1298,6 +1425,7 @@ class InMemoryAgentStorage2 {
|
|
|
1298
1425
|
this.memory = new InMemoryAgentMemoryStore(this.state);
|
|
1299
1426
|
this.approvals = new InMemoryAgentApprovalStore(this.state);
|
|
1300
1427
|
this.approvalModes = new InMemoryAgentApprovalModeStore(this.state);
|
|
1428
|
+
this.tokenRates = new InMemoryAgentTokenRateStore(this.state);
|
|
1301
1429
|
}
|
|
1302
1430
|
snapshot() {
|
|
1303
1431
|
return {
|
|
@@ -1308,7 +1436,8 @@ class InMemoryAgentStorage2 {
|
|
|
1308
1436
|
checkpoints: structuredClone(this.state.checkpoints),
|
|
1309
1437
|
memory: structuredClone(this.state.memory),
|
|
1310
1438
|
approvals: structuredClone(this.state.approvals),
|
|
1311
|
-
approvalModes: structuredClone(this.state.approvalModes)
|
|
1439
|
+
approvalModes: structuredClone(this.state.approvalModes),
|
|
1440
|
+
tokenRates: structuredClone(this.state.tokenRates)
|
|
1312
1441
|
};
|
|
1313
1442
|
}
|
|
1314
1443
|
restore(snapshot) {
|
|
@@ -1320,6 +1449,7 @@ class InMemoryAgentStorage2 {
|
|
|
1320
1449
|
replace(this.state.memory, snapshot.memory);
|
|
1321
1450
|
replace(this.state.approvals, snapshot.approvals);
|
|
1322
1451
|
replace(this.state.approvalModes, snapshot.approvalModes);
|
|
1452
|
+
replace(this.state.tokenRates, snapshot.tokenRates);
|
|
1323
1453
|
}
|
|
1324
1454
|
}
|
|
1325
1455
|
function replace(target, source) {
|
|
@@ -1328,6 +1458,9 @@ function replace(target, source) {
|
|
|
1328
1458
|
target.set(k, value);
|
|
1329
1459
|
}
|
|
1330
1460
|
}
|
|
1461
|
+
function leaseStillHeld(id) {
|
|
1462
|
+
return new AgentStorageError2("invalid_state", `[Sixb] Agent run '${id}' is still held by its runner, whose lease has not lapsed.`);
|
|
1463
|
+
}
|
|
1331
1464
|
// src/storage/ai-cost/errors.ts
|
|
1332
1465
|
class AiCostStorageError2 extends Error {
|
|
1333
1466
|
code;
|
|
@@ -1412,14 +1545,14 @@ class InMemoryAiCostStorage2 {
|
|
|
1412
1545
|
async accountingItems() {
|
|
1413
1546
|
return Promise.all([...this.usage.snapshot().records.values()].map(async (usage) => {
|
|
1414
1547
|
const cost = this.recordsByUsage.get(usageRecordKey(usage.projectId, usage.id));
|
|
1415
|
-
const
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
});
|
|
1548
|
+
const execution = { projectId: usage.projectId, executionId: usage.executionId };
|
|
1549
|
+
const attribution = await this.attribution?.resolve(execution);
|
|
1550
|
+
const requester = await this.attribution?.requester?.(execution);
|
|
1419
1551
|
return {
|
|
1420
1552
|
usage,
|
|
1421
1553
|
...attribution ? { attribution } : {},
|
|
1422
|
-
...cost ? { cost } : {}
|
|
1554
|
+
...cost ? { cost } : {},
|
|
1555
|
+
...requester ? { requester } : {}
|
|
1423
1556
|
};
|
|
1424
1557
|
}));
|
|
1425
1558
|
}
|
|
@@ -3759,7 +3892,8 @@ function evaluateObjectQuery(query, source) {
|
|
|
3759
3892
|
case "traverse": {
|
|
3760
3893
|
const input = evaluateObjectQuery(query.input, source);
|
|
3761
3894
|
const entries = query.direction === "outgoing" ? traverseOutgoing(input.entries, query.linkId, source) : traverseIncoming(input.entries, query.linkId, query.sourceObjectTypeId, source);
|
|
3762
|
-
|
|
3895
|
+
const endpoints = linkEndpointObjectTypeIds2(query);
|
|
3896
|
+
return completeEvaluation(endpoints ? entries.filter((entry) => endpoints.includes(entry.row.objectTypeId)) : entries);
|
|
3763
3897
|
}
|
|
3764
3898
|
case "set":
|
|
3765
3899
|
return evaluateSet(query.op, query.inputs, source);
|
|
@@ -5063,8 +5197,11 @@ class InMemoryOntologyCommitStorage {
|
|
|
5063
5197
|
if (!Number.isSafeInteger(offset) || offset < 0 || !Number.isSafeInteger(limit) || limit < 0) {
|
|
5064
5198
|
throw new Error("[Sixb] Ontology commit list limit and offset must be nonnegative integers.");
|
|
5065
5199
|
}
|
|
5200
|
+
if (input.committedAt !== undefined) {
|
|
5201
|
+
assertTimestamp(input.committedAt, "Ontology commit list committedAt");
|
|
5202
|
+
}
|
|
5066
5203
|
const direction = input.order === "desc" ? -1 : 1;
|
|
5067
|
-
const commits = [...this.state.commitsById.values()].filter((commit) => commit.projectId === input.projectId).filter((commit) => input.run ? commitMatchesRun(commit, input.run) : true).sort((left, right) => {
|
|
5204
|
+
const commits = [...this.state.commitsById.values()].filter((commit) => commit.projectId === input.projectId).filter((commit) => input.run ? commitMatchesRun(commit, input.run) : true).filter((commit) => input.committedAt === undefined ? true : commit.committedAt === input.committedAt).sort((left, right) => {
|
|
5068
5205
|
if (input.run?.kind === "projection") {
|
|
5069
5206
|
const byOrdinal = projectionRunOrdinal(left) - projectionRunOrdinal(right);
|
|
5070
5207
|
if (byOrdinal !== 0)
|
|
@@ -6330,6 +6467,19 @@ class InMemoryOntologyMaterializationStorage {
|
|
|
6330
6467
|
}
|
|
6331
6468
|
}
|
|
6332
6469
|
}
|
|
6470
|
+
async readState(input) {
|
|
6471
|
+
const request = prepareMaterializationStateRead2(input);
|
|
6472
|
+
const objects = [];
|
|
6473
|
+
for (const ref of request.objects) {
|
|
6474
|
+
objects.push(await this.reader.objectState(request.projectId, ref));
|
|
6475
|
+
}
|
|
6476
|
+
const links = [];
|
|
6477
|
+
for (const ref of request.links) {
|
|
6478
|
+
links.push(await this.reader.linkState(request.projectId, ref));
|
|
6479
|
+
}
|
|
6480
|
+
const linkScopes = request.linkScopes.map((scope) => this.reader.linkSlotState(request.projectId, scope.source, scope.linkId));
|
|
6481
|
+
return { objects, links, linkScopes };
|
|
6482
|
+
}
|
|
6333
6483
|
async stageWork(input) {
|
|
6334
6484
|
const session = this.requireSession(input.session);
|
|
6335
6485
|
for (const { record, uniqueKey } of prepareMaterializationWork2(session, input)) {
|
|
@@ -9405,6 +9555,14 @@ class InMemoryStorage2 {
|
|
|
9405
9555
|
aiUsageStorage = new InMemoryAiUsageStorage2(this.executionStorage);
|
|
9406
9556
|
aiCostStorage = new InMemoryAiCostStorage2(this.aiUsageStorage, {
|
|
9407
9557
|
resolve: (input) => this.resolveAiAccountingAttribution(input),
|
|
9558
|
+
requester: async (input) => {
|
|
9559
|
+
const execution = await this.executionStorage.getById({
|
|
9560
|
+
projectId: input.projectId,
|
|
9561
|
+
id: input.executionId
|
|
9562
|
+
});
|
|
9563
|
+
const by = execution?.requestedBy;
|
|
9564
|
+
return by?.type === "user" || by?.type === "serviceAccount" ? { type: by.type, id: by.id } : undefined;
|
|
9565
|
+
},
|
|
9408
9566
|
resolveGroup: async (input) => {
|
|
9409
9567
|
const attribution = await this.resolveAiAccountingAttribution(input);
|
|
9410
9568
|
if (attribution?.kind !== "subagent")
|
|
@@ -9739,7 +9897,11 @@ async function prepareObjectQueries2(input) {
|
|
|
9739
9897
|
text: capabilities.text
|
|
9740
9898
|
};
|
|
9741
9899
|
}).filter((property) => property.filterable || property.sortable || property.text),
|
|
9742
|
-
indexes: type.query?.indexes ?? []
|
|
9900
|
+
indexes: type.query?.indexes ?? [],
|
|
9901
|
+
links: type.links.map((link) => ({
|
|
9902
|
+
linkId: link.id,
|
|
9903
|
+
targetObjectTypeIds: linkTargetObjectTypeIds(link.targetObjectTypeId, input.ontology)
|
|
9904
|
+
}))
|
|
9743
9905
|
}));
|
|
9744
9906
|
return input.storage.prepareObjectQueries({ projectId: input.projectId, objectTypes });
|
|
9745
9907
|
}
|
|
@@ -10066,4 +10228,4 @@ var VECTOR_INDEXING_FAILURE_CODES2 = [
|
|
|
10066
10228
|
];
|
|
10067
10229
|
export { InMemoryActionRunStorage2, AGENT_MESSAGE_CONTENT_VERSION2, InMemoryAgentStorage2, AiCostStorageError2, InMemoryAiCostStorage2, InMemoryAiLimitStorage2, InMemoryConnectorConnectionStorage2, InMemoryFileUploadSessions2, objectBatchKey2, linkBatchKey2, objectLinkCursor2, compareQueryScalarValues, matchesPredicate, PIPELINE_RUN_FAILURE_CODES2, InMemoryPipelineRunStorage2, InMemoryProjectionRunStorage2, InMemoryRulesStorage2, InMemoryShareGrantStorage2, InMemoryShareSessionStorage2, SYNC_RUN_FAILURE_CODES2, InMemorySyncRunStorage2, WEBHOOK_RUN_FAILURE_CODES2, canRetryWebhookRun2, InMemoryWebhookRunStorage2, WorkflowInterventionError2, InMemoryWorkflowInterventionStorage2, WORKFLOW_RUN_FAILURE_CODES2, InMemoryWorkflowRunStorage2, InMemoryWorkflowNodeRunStorage2, InMemoryWorkflowAgentNodeRunStorage2, InMemoryStorage2, prepareObjectQueries2, isMigrationCapableStorage2, migrateStorage2, checkStorageSchema2, step2, defineMigrations2, runMigrationSet2, describeMigrationHistory2, VECTOR_INDEXING_FAILURE_CODES2 };
|
|
10068
10230
|
|
|
10069
|
-
//# debugId=
|
|
10231
|
+
//# debugId=CE2240DFDF28A14664756E2164756E21
|