@sixb/core 0.1.25 → 0.1.26
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 +35 -35
- 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/dispatch.d.ts +1 -9
- package/dist/agents/dispatch.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +5 -0
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/index.d.ts +31 -6
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +154 -66
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/model-loop.d.ts +3 -5
- 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 +9 -1
- 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 +49 -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 +110 -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 +37 -0
- package/dist/agents/run-session-http.d.ts.map +1 -0
- package/dist/agents/run-session-serve.d.ts +24 -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 +239 -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 +68 -0
- package/dist/agents/run-tools.d.ts.map +1 -0
- package/dist/agents/run-turn.d.ts +59 -0
- package/dist/agents/run-turn.d.ts.map +1 -0
- package/dist/agents/streams/index.js +1 -1
- 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 +2 -4
- package/dist/agents/streams/internal.js.map +1 -1
- package/dist/agents/streams/protocol.d.ts +1 -96
- 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/tool-files.d.ts +34 -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 +19 -19
- package/dist/auth/index.js +8 -8
- package/dist/authorization/index.js +4 -4
- package/dist/bootstrap/index.js +45 -43
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/{chunk-2fn60nvs.js → chunk-06sg8s4z.js} +2 -2
- package/dist/{chunk-2fn60nvs.js.map → chunk-06sg8s4z.js.map} +1 -1
- package/dist/chunk-07kkp2e1.js.map +1 -1
- package/dist/{chunk-9ntbsnke.js → chunk-0bc3w0zq.js} +7 -7
- package/dist/{chunk-9ntbsnke.js.map → chunk-0bc3w0zq.js.map} +2 -2
- package/dist/{chunk-d2m879s4.js → chunk-0kk2wt0h.js} +27 -27
- package/dist/chunk-0kk2wt0h.js.map +12 -0
- package/dist/chunk-16a9dmfy.js.map +1 -1
- package/dist/chunk-18sk89cg.js.map +2 -2
- 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-hqsp2sx4.js → chunk-1xvqgg88.js} +31 -33
- package/dist/{chunk-hqsp2sx4.js.map → chunk-1xvqgg88.js.map} +6 -6
- package/dist/chunk-2adz0h75.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-vrf90dkv.js → chunk-2vjnyz1s.js} +1 -1
- package/dist/{chunk-vrf90dkv.js.map → chunk-2vjnyz1s.js.map} +1 -1
- package/dist/{chunk-4f3ydv7t.js → chunk-315qye3g.js} +1 -1
- package/dist/{chunk-4f3ydv7t.js.map → chunk-315qye3g.js.map} +1 -1
- 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-45ngkxkp.js.map +1 -1
- package/dist/chunk-48jezz3j.js.map +1 -1
- package/dist/{chunk-vr3j63jq.js → chunk-4jq2bg8t.js} +78 -78
- package/dist/{chunk-vr3j63jq.js.map → chunk-4jq2bg8t.js.map} +4 -4
- package/dist/chunk-4ymrcdbm.js.map +1 -1
- package/dist/chunk-58geavnf.js.map +1 -1
- package/dist/{chunk-6y0mkhex.js → chunk-59kf345w.js} +2 -2
- package/dist/{chunk-6y0mkhex.js.map → chunk-59kf345w.js.map} +1 -1
- package/dist/{chunk-3p93tb91.js → chunk-6qn7nmd3.js} +102 -102
- package/dist/{chunk-3p93tb91.js.map → chunk-6qn7nmd3.js.map} +4 -4
- package/dist/chunk-73j0v4qv.js +355 -0
- package/dist/chunk-73j0v4qv.js.map +13 -0
- package/dist/{chunk-2gjj5dx3.js → chunk-78ymxrn0.js} +1 -1
- package/dist/{chunk-6bkbyer5.js → chunk-7ex2p3zp.js} +3 -3
- package/dist/{chunk-6bkbyer5.js.map → chunk-7ex2p3zp.js.map} +1 -1
- package/dist/{chunk-5tfev0fv.js → chunk-7hf6tkgs.js} +167 -167
- package/dist/{chunk-5tfev0fv.js.map → chunk-7hf6tkgs.js.map} +4 -4
- package/dist/{chunk-8z4726jz.js → chunk-7wn5z7mq.js} +10 -10
- package/dist/{chunk-8z4726jz.js.map → chunk-7wn5z7mq.js.map} +2 -2
- package/dist/{chunk-6n69k945.js → chunk-8mb7mt8n.js} +2 -2
- package/dist/chunk-8ncg20rd.js.map +1 -1
- package/dist/{chunk-68wghpdf.js → chunk-8v5a54qz.js} +50 -11
- package/dist/{chunk-68wghpdf.js.map → chunk-8v5a54qz.js.map} +3 -3
- package/dist/{chunk-gqm0b7vd.js → chunk-8v6xzwgr.js} +92 -76
- package/dist/{chunk-gqm0b7vd.js.map → chunk-8v6xzwgr.js.map} +6 -6
- package/dist/{chunk-m36fw8ft.js → chunk-8wsjr52f.js} +1 -1
- package/dist/{chunk-vd1rk42q.js → chunk-8xnz9vvp.js} +4 -4
- package/dist/{chunk-vd1rk42q.js.map → chunk-8xnz9vvp.js.map} +1 -1
- package/dist/chunk-9mab3dvg.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-62a63pr6.js → chunk-axb4ss9a.js} +7 -7
- package/dist/{chunk-62a63pr6.js.map → chunk-axb4ss9a.js.map} +2 -2
- package/dist/{chunk-z3ryd53f.js → chunk-b6ghvap7.js} +35 -11
- package/dist/{chunk-z3ryd53f.js.map → chunk-b6ghvap7.js.map} +3 -3
- package/dist/{chunk-sqfvnvqj.js → chunk-c14ap3s9.js} +2 -2
- package/dist/{chunk-sqfvnvqj.js.map → chunk-c14ap3s9.js.map} +1 -1
- package/dist/{chunk-661ezhks.js → chunk-cbcgs9f7.js} +87 -8
- package/dist/chunk-cbcgs9f7.js.map +11 -0
- package/dist/chunk-cwdzcv37.js.map +1 -1
- package/dist/{chunk-bab05bhg.js → chunk-dgtd0836.js} +1 -1
- package/dist/{chunk-1j6j0rht.js → chunk-e24fvw8g.js} +1 -1
- package/dist/{chunk-1j6j0rht.js.map → chunk-e24fvw8g.js.map} +1 -1
- package/dist/chunk-e5wf5vz0.js.map +1 -1
- package/dist/chunk-eptrvnby.js.map +1 -1
- package/dist/chunk-ey1nk510.js.map +1 -1
- package/dist/{chunk-j936th07.js → chunk-fakrpfy3.js} +58 -58
- package/dist/{chunk-j936th07.js.map → chunk-fakrpfy3.js.map} +5 -5
- package/dist/chunk-fb3feg1e.js.map +1 -1
- package/dist/chunk-ff5xkv0p.js.map +1 -1
- package/dist/chunk-fntqb7qy.js.map +1 -1
- package/dist/{chunk-7ny9mjgm.js → chunk-ft3w5ahs.js} +1 -1
- package/dist/chunk-g663fahq.js.map +1 -1
- package/dist/{chunk-cdk3egjj.js → chunk-h1na2cxc.js} +1 -1
- package/dist/{chunk-cdk3egjj.js.map → chunk-h1na2cxc.js.map} +1 -1
- package/dist/chunk-hn2r7z41.js.map +1 -1
- package/dist/{chunk-24bqx0dx.js → chunk-hn76sanm.js} +1 -1
- package/dist/{chunk-24bqx0dx.js.map → chunk-hn76sanm.js.map} +1 -1
- package/dist/chunk-jmfet9r4.js.map +1 -1
- package/dist/{chunk-bnr4a734.js → chunk-jn3ysaf2.js} +24 -22
- package/dist/{chunk-bnr4a734.js.map → chunk-jn3ysaf2.js.map} +5 -5
- package/dist/{chunk-4y26vs3v.js → chunk-jspskey0.js} +16 -3
- package/dist/chunk-jspskey0.js.map +10 -0
- package/dist/{chunk-r6szek0x.js → chunk-jt3r6thp.js} +2 -135
- package/dist/chunk-jt3r6thp.js.map +10 -0
- 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-m427qgq0.js.map +1 -1
- package/dist/chunk-mbsbxarb.js.map +1 -1
- package/dist/{chunk-et017krg.js → chunk-mdxmt0n3.js} +8657 -8704
- package/dist/{chunk-et017krg.js.map → chunk-mdxmt0n3.js.map} +37 -37
- package/dist/chunk-mmagke4x.js.map +1 -1
- package/dist/{chunk-2x19q6k6.js → chunk-mqx25wwh.js} +319 -154
- package/dist/chunk-mqx25wwh.js.map +18 -0
- package/dist/chunk-mzx71snp.js.map +1 -1
- package/dist/chunk-n8q5j6y5.js.map +1 -1
- package/dist/chunk-npcr0228.js.map +1 -1
- package/dist/{chunk-m2nevja0.js → chunk-phm3c7b9.js} +1 -1
- package/dist/{chunk-m2nevja0.js.map → chunk-phm3c7b9.js.map} +1 -1
- package/dist/chunk-qf954wje.js.map +1 -1
- package/dist/{chunk-65pyhyas.js → chunk-qgvbxfqv.js} +6 -8
- package/dist/{chunk-65pyhyas.js.map → chunk-qgvbxfqv.js.map} +2 -2
- package/dist/{chunk-hk38wahh.js → chunk-qst145py.js} +4 -4
- package/dist/{chunk-hk38wahh.js.map → chunk-qst145py.js.map} +1 -1
- package/dist/{chunk-c844dkwd.js → chunk-qtzftvxa.js} +4 -5
- package/dist/{chunk-c844dkwd.js.map → chunk-qtzftvxa.js.map} +2 -2
- package/dist/chunk-ratkv4zc.js +3 -0
- package/dist/chunk-ratkv4zc.js.map +9 -0
- package/dist/{chunk-nzapm6p0.js → chunk-s3we74h8.js} +1 -2
- package/dist/chunk-s3we74h8.js.map +12 -0
- package/dist/{chunk-0xmt5p5y.js → chunk-t3brw0wd.js} +1 -2
- package/dist/{chunk-0xmt5p5y.js.map → chunk-t3brw0wd.js.map} +2 -2
- package/dist/chunk-t5608tkq.js.map +1 -1
- package/dist/chunk-tdxfsg1c.js.map +1 -1
- package/dist/{chunk-1t6k1avb.js → chunk-tnhqtfea.js} +1 -1
- package/dist/chunk-vhbw5sqm.js.map +1 -1
- package/dist/{chunk-rp9wwk7b.js → chunk-vx4e4zv4.js} +30 -30
- package/dist/{chunk-rp9wwk7b.js.map → chunk-vx4e4zv4.js.map} +4 -4
- package/dist/chunk-waqk73p1.js.map +1 -1
- package/dist/chunk-x0v3jd47.js.map +1 -1
- package/dist/{chunk-yecwnwpq.js → chunk-xm8qgbqm.js} +58 -29
- package/dist/{chunk-yecwnwpq.js.map → chunk-xm8qgbqm.js.map} +7 -7
- package/dist/{chunk-97wr6p2g.js → chunk-y7j6x4h0.js} +8 -8
- package/dist/{chunk-97wr6p2g.js.map → chunk-y7j6x4h0.js.map} +4 -4
- package/dist/{chunk-xe0732g0.js → chunk-yavhtnac.js} +12 -8
- package/dist/{chunk-xe0732g0.js.map → chunk-yavhtnac.js.map} +4 -4
- package/dist/chunk-yd00vzqr.js +3394 -0
- package/dist/chunk-yd00vzqr.js.map +37 -0
- package/dist/{chunk-n9w3n38q.js → chunk-ye5c8016.js} +54 -8
- package/dist/chunk-ye5c8016.js.map +23 -0
- package/dist/chunk-yw9pyg66.js.map +1 -1
- package/dist/{chunk-nydf3dbe.js → chunk-z9mg7wya.js} +37 -20
- package/dist/chunk-z9mg7wya.js.map +13 -0
- package/dist/chunk-zbc929zg.js.map +1 -1
- package/dist/chunk-zhh1jd89.js +290 -0
- package/dist/chunk-zhh1jd89.js.map +10 -0
- 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/write.js +3 -3
- package/dist/deploy/internal.js +2 -5
- package/dist/deploy/internal.js.map +3 -3
- package/dist/deploy/types.d.ts +0 -2
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/execution/agent.d.ts +2 -2
- package/dist/execution/agent.d.ts.map +1 -1
- package/dist/execution/agent.js +38 -38
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/primitive.js +35 -35
- package/dist/execution/request.js +37 -37
- package/dist/execution/request.js.map +2 -2
- 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 +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +53 -51
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/index.js +3 -3
- package/dist/logging/internal.js +1 -1
- package/dist/materializer/index.js +17 -17
- 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 +2 -1
- package/dist/models/execution/index.d.ts.map +1 -1
- package/dist/models/execution/index.js +55 -50
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/execution/model-call-recorder.d.ts +7 -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/language-call.d.ts +51 -0
- package/dist/models/language-call.d.ts.map +1 -0
- package/dist/objects/index.js +35 -35
- package/dist/objects/query/index.js +17 -17
- 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 +4 -4
- 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 +19 -19
- 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 +17 -17
- 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 +0 -1
- 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/internal.js +23 -23
- package/dist/runtime/internal.js.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/internal.js +1 -1
- package/dist/security/internal.js.map +1 -1
- package/dist/shares/internal.js +17 -17
- package/dist/shares/internal.js.map +1 -1
- package/dist/storage/agents/in-memory.d.ts +3 -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 +6 -0
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +8 -2
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +63 -7
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +2 -2
- package/dist/storage/connector-connections/provider.js.map +1 -1
- package/dist/storage/file-upload-sessions/provider.js +9 -9
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +15 -15
- package/dist/storage/ontology/provider.js +1 -1
- 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 +9 -9
- package/dist/syncs/index.js +20 -20
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +677 -352
- package/dist/testing/index.js.map +9 -7
- 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 +17 -17
- package/dist/webhooks/internal.js.map +1 -1
- package/dist/workers/index.js.map +1 -1
- package/dist/workflows/index.js +41 -39
- package/dist/workflows/index.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/README.md +136 -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/dispatch.ts +6 -58
- package/src/agents/execution.ts +18 -0
- package/src/agents/index.ts +127 -21
- package/src/agents/model-loop.ts +23 -73
- package/src/agents/model-routing.ts +7 -2
- package/src/agents/request.ts +69 -20
- package/src/agents/run-after-finish.ts +133 -0
- package/src/agents/run-artifacts.ts +257 -0
- package/src/agents/run-events.ts +302 -0
- package/src/agents/run-fence.ts +71 -0
- package/src/agents/run-liveness.ts +122 -0
- package/src/agents/run-plan.ts +316 -0
- package/src/agents/run-session-children.ts +303 -0
- package/src/agents/run-session-http.ts +397 -0
- package/src/agents/run-session-serve.ts +479 -0
- package/src/agents/run-session-wire.ts +189 -0
- package/src/agents/run-session.ts +802 -0
- package/src/agents/run-token.ts +124 -0
- package/src/agents/run-tools.ts +180 -0
- package/src/agents/run-turn.ts +265 -0
- package/src/agents/streams/internal.ts +0 -1
- package/src/agents/streams/protocol.ts +0 -292
- package/src/agents/subagent-runs.ts +19 -1
- package/src/agents/tool-files.ts +225 -0
- package/src/agents/workflow-node-session.ts +387 -0
- package/src/artifacts/publish/index.ts +1 -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/deploy/types.ts +0 -2
- package/src/deploy/validation.ts +1 -4
- package/src/execution/agent.ts +2 -2
- package/src/execution/authorized-object-reader.ts +28 -1
- package/src/http/api-routes.ts +114 -27
- package/src/index.ts +3 -1
- package/src/models/execution/README.md +15 -1
- package/src/models/execution/errors.ts +14 -0
- package/src/models/execution/index.ts +2 -1
- package/src/models/execution/model-call-recorder.ts +12 -10
- package/src/models/execution.ts +9 -11
- package/src/models/language-call.ts +247 -0
- 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/host.ts +1 -1
- 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 +17 -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/storage/agents/in-memory.ts +53 -0
- package/src/storage/agents/index.ts +2 -0
- package/src/storage/agents/provider.ts +56 -11
- package/src/storage/agents/types.ts +59 -7
- package/src/storage/index.ts +2 -0
- package/src/storage/types.ts +1 -0
- package/src/testing/agent-storage-contract.ts +175 -2
- package/src/testing/ai-model-call-groups-contract.ts +0 -1
- package/src/testing/index.ts +5 -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/dist/agents/api-gateway.d.ts +0 -26
- package/dist/agents/api-gateway.d.ts.map +0 -1
- 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-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-vpgwq5nf.js +0 -810
- package/dist/chunk-vpgwq5nf.js.map +0 -21
- package/src/agents/api-gateway.ts +0 -68
- /package/dist/{chunk-2gjj5dx3.js.map → chunk-78ymxrn0.js.map} +0 -0
- /package/dist/{chunk-6n69k945.js.map → chunk-8mb7mt8n.js.map} +0 -0
- /package/dist/{chunk-m36fw8ft.js.map → chunk-8wsjr52f.js.map} +0 -0
- /package/dist/{chunk-bab05bhg.js.map → chunk-dgtd0836.js.map} +0 -0
- /package/dist/{chunk-7ny9mjgm.js.map → chunk-ft3w5ahs.js.map} +0 -0
- /package/dist/{chunk-1t6k1avb.js.map → chunk-tnhqtfea.js.map} +0 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import type { BlobStorage } from "../blob-storage";
|
|
2
|
+
import type { Broker } from "../broker";
|
|
3
|
+
import type { AuthorizationRef } from "../execution";
|
|
4
|
+
import { type AgentExecutionHost } from "../execution/agent";
|
|
5
|
+
import { type LoggingService } from "../logging/service";
|
|
6
|
+
import type { LanguageModelRef } from "../models/catalog";
|
|
7
|
+
import { type ModelCallAccountingStorage, type RecoverAiModelCall } from "../models/execution/index";
|
|
8
|
+
import type { LanguageModel } from "../models/language-model";
|
|
9
|
+
import type { SecurityDefinitionCatalog } from "../security";
|
|
10
|
+
import type { Storage } from "../storage";
|
|
11
|
+
import { type AgentRunRecord, type AgentStorage, type AgentThreadSandboxState, type AppendAgentMessageInput, type ConversationAgentRunRecord, type CreateAgentContextCheckpointInput, type FinishAgentRunInput, type TransitionAgentThreadSandboxInput } from "../storage/agents";
|
|
12
|
+
import type { AuthStorage, UserRecord } from "../storage/auth";
|
|
13
|
+
import { type AgentExecutionAuthorization } from "./authority";
|
|
14
|
+
import { type AgentRunArtifacts } from "./run-artifacts";
|
|
15
|
+
import type { StreamSink } from "./run-events";
|
|
16
|
+
import { type AgentRunMemory, type AgentRunPlan, type AgentRunPlanDefinitions } from "./run-plan";
|
|
17
|
+
import { type AgentRunChildren, type AgentRunChildrenHost, type AgentRunThreads } from "./run-session-children";
|
|
18
|
+
import { type AgentToolCall, type AgentToolCallOptions, type AgentToolCallResult } from "./run-tools";
|
|
19
|
+
import { type AgentRunContext, type AgentTurnContext, type AgentTurnHistory } from "./run-turn";
|
|
20
|
+
/**
|
|
21
|
+
* A run's session: the one way its runner reads and writes shared state for it. Claiming the run
|
|
22
|
+
* creates it, with a fresh execution token, and every write it makes is fenced by that token: once
|
|
23
|
+
* another delivery reclaims the run, this session's writes fail with
|
|
24
|
+
* {@link AgentExecutionLostError} and the runner stops touching the run.
|
|
25
|
+
*
|
|
26
|
+
* The worker uses an in-process session. A runner elsewhere will reach the same operations over
|
|
27
|
+
* HTTP, so nothing here may assume it shares a process with storage.
|
|
28
|
+
*/
|
|
29
|
+
export interface AgentRunSession<TRun extends AgentRunRecord = AgentRunRecord> {
|
|
30
|
+
/** The run as the claim left it: `running`, with this session's execution. */
|
|
31
|
+
readonly run: TRun;
|
|
32
|
+
readonly executionToken: string;
|
|
33
|
+
/**
|
|
34
|
+
* Aborts once the run, or any run named in `cancelWith`, is cancelled: when the broker's cancel
|
|
35
|
+
* arrives, or at the claim or a lease renewal that reads a cancel recorded on the run. Also aborts,
|
|
36
|
+
* with an {@link AgentExecutionLostError}, once a renewal finds the run ended or taken over.
|
|
37
|
+
*/
|
|
38
|
+
readonly cancelled: AbortSignal;
|
|
39
|
+
/**
|
|
40
|
+
* The models the run calls. Each call is admitted against the AI limits of whoever the run works
|
|
41
|
+
* for, and records itself before its reader sees it finish (see
|
|
42
|
+
* AiModelCallRecorder.wrapModel): the runner never reports what a call used.
|
|
43
|
+
*/
|
|
44
|
+
readonly models: AgentRunModels;
|
|
45
|
+
/**
|
|
46
|
+
* Live records for whoever watches the run: its start, chunks, compaction, finalized message and
|
|
47
|
+
* end. Best effort: a record that cannot be delivered never fails the run, whose finish is the
|
|
48
|
+
* durable record.
|
|
49
|
+
*/
|
|
50
|
+
readonly events: StreamSink;
|
|
51
|
+
/** Approvals that hold the run: they are created by the API its commands call, never here. */
|
|
52
|
+
readonly heldCalls: AgentRunHeldCalls;
|
|
53
|
+
/** A conversation turn's children: spawning them, and reading them and their threads. */
|
|
54
|
+
readonly children: AgentRunChildren;
|
|
55
|
+
/**
|
|
56
|
+
* Record that the runner still holds the run until `leaseExpiresAt`. A run token fails closed
|
|
57
|
+
* once the last lease recorded lapses, so the session renews it as the queue does. A renewal that
|
|
58
|
+
* reads a recorded cancel aborts `cancelled`.
|
|
59
|
+
*/
|
|
60
|
+
renewLease(leaseExpiresAt: string): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* End the run, with what it did appended first in the same transaction. Absorbs a transient
|
|
63
|
+
* storage failure with a few short retries; see {@link AgentExecutionLostError} and
|
|
64
|
+
* {@link AgentFinalizationError} for what it throws.
|
|
65
|
+
*/
|
|
66
|
+
finish(outcome: AgentRunOutcome, messages?: readonly AppendAgentMessageInput[]): Promise<AgentRunRecord>;
|
|
67
|
+
/**
|
|
68
|
+
* Throws {@link AgentExecutionLostError} unless the run still runs under this session, within
|
|
69
|
+
* its lease. Run it right before a side effect the run must not make once another delivery owns
|
|
70
|
+
* it.
|
|
71
|
+
*/
|
|
72
|
+
assertOwned(): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* What the run is set up with: its model, the project's instructions, skills and tools, and the
|
|
75
|
+
* ontology docs its requester's view gives.
|
|
76
|
+
*/
|
|
77
|
+
plan(): Promise<AgentRunPlan>;
|
|
78
|
+
/**
|
|
79
|
+
* The memory its requester reads, now and as of `asOf`: the start of the conversation, or its
|
|
80
|
+
* latest compaction, which the prompt shows.
|
|
81
|
+
*/
|
|
82
|
+
memory(input: {
|
|
83
|
+
readonly asOf: Date;
|
|
84
|
+
}): Promise<AgentRunMemory>;
|
|
85
|
+
/**
|
|
86
|
+
* What the run starts from, in one read: a turn's thread, the people it names and its history,
|
|
87
|
+
* or a child's parent, threads and messages.
|
|
88
|
+
*/
|
|
89
|
+
context(): Promise<TRun extends ConversationAgentRunRecord ? AgentTurnContext : AgentRunContext>;
|
|
90
|
+
/**
|
|
91
|
+
* Summarize the conversation up to a point, and answer its history from the new checkpoint on.
|
|
92
|
+
* Refused with {@link AgentExecutionLostError} once the run is no longer this session's.
|
|
93
|
+
*/
|
|
94
|
+
checkpoint(input: AgentRunCheckpoint): Promise<AgentTurnHistory>;
|
|
95
|
+
/** A conversation's persistent workspace, as this run holds it. */
|
|
96
|
+
readonly workspace: AgentRunWorkspace;
|
|
97
|
+
/** The messages of the run's conversation, its children's threads included. */
|
|
98
|
+
readonly threads: AgentRunThreads;
|
|
99
|
+
/**
|
|
100
|
+
* Run one call of a project tool the run offers, as the run (see runAgentTool): with the run's
|
|
101
|
+
* SDK, its attachments and its logger, its model calls billed to the run. The files it puts are
|
|
102
|
+
* stored and returned, for the runner to copy into its sandbox.
|
|
103
|
+
*/
|
|
104
|
+
callTool(call: AgentToolCall, options: AgentToolCallOptions): Promise<AgentToolCallResult>;
|
|
105
|
+
/** Its conversation's artifacts: what it reads of them as its requester, and what it publishes. */
|
|
106
|
+
readonly artifacts: AgentRunArtifacts;
|
|
107
|
+
/**
|
|
108
|
+
* The files it stores and reads: its attachments, what its tools and children write, its
|
|
109
|
+
* artifacts' files. Through the run's SDK, as an API request with the run's token stores them.
|
|
110
|
+
*/
|
|
111
|
+
readonly files: AgentRunFileStore;
|
|
112
|
+
/**
|
|
113
|
+
* The authority the run's execution carries now: its requester's groups, as they are today. A
|
|
114
|
+
* runner that binds the project in its own process needs it; a runner over HTTP never holds it.
|
|
115
|
+
*/
|
|
116
|
+
authorization(ref: AuthorizationRef): Promise<AgentExecutionAuthorization>;
|
|
117
|
+
/**
|
|
118
|
+
* Stop watching for cancellation, stop its tools' model calls, and flush their logs. The run
|
|
119
|
+
* itself is unaffected.
|
|
120
|
+
*/
|
|
121
|
+
close(): Promise<void>;
|
|
122
|
+
}
|
|
123
|
+
/** The models a run calls, by the ref its plan names. */
|
|
124
|
+
export interface AgentRunModels {
|
|
125
|
+
/** A language model of the project, resolved once for the session. */
|
|
126
|
+
language(ref: LanguageModelRef): Promise<LanguageModel>;
|
|
127
|
+
}
|
|
128
|
+
/** Where a run's files are stored: put one, open or stat one by its blob id. */
|
|
129
|
+
export type AgentRunFileStore = Pick<BlobStorage, "put" | "open" | "stat">;
|
|
130
|
+
/** A context checkpoint a turn writes; the session adds which run, and its token. */
|
|
131
|
+
export type AgentRunCheckpoint = Omit<CreateAgentContextCheckpointInput, "projectId" | "createdByRunId" | "executionToken">;
|
|
132
|
+
/** The project's members as a workflow step needs them, and the authority its execution carries. */
|
|
133
|
+
export interface AgentRunPeople {
|
|
134
|
+
/** A member: a message's author, or whoever the run works for. */
|
|
135
|
+
user(userId: string): Promise<UserRecord | null>;
|
|
136
|
+
/** Whether a member may run the Agent now: a shared conversation's readers are those who may. */
|
|
137
|
+
canRunAgent(userId: string): Promise<boolean>;
|
|
138
|
+
/** The authority a run's execution carries now: its requester's groups, as they are today. */
|
|
139
|
+
authorization(ref: AuthorizationRef): Promise<AgentExecutionAuthorization>;
|
|
140
|
+
}
|
|
141
|
+
/** A thread's persistent workspace state, moved only by the run that holds the thread. */
|
|
142
|
+
export interface AgentRunWorkspace {
|
|
143
|
+
/** Acquire, replace or settle the thread's workspace; refused once the run lost its execution. */
|
|
144
|
+
transition(input: AgentRunWorkspaceTransition): Promise<AgentThreadSandboxState>;
|
|
145
|
+
}
|
|
146
|
+
/** A workspace transition a run makes; the session adds which run, and its token. */
|
|
147
|
+
export type AgentRunWorkspaceTransition = TransitionAgentThreadSandboxInput extends infer T ? T extends {
|
|
148
|
+
readonly runId: string;
|
|
149
|
+
} ? Omit<T, "projectId" | "runId" | "executionToken"> : never : never;
|
|
150
|
+
export interface AgentRunHeldCalls {
|
|
151
|
+
/** Whether a call of this run, or of one of its children, waits for an approval. */
|
|
152
|
+
holdsRun(): Promise<boolean>;
|
|
153
|
+
/**
|
|
154
|
+
* Whether a conversation turn pauses after the step it just took: a call of its own is held, or
|
|
155
|
+
* a child's is and no child is still at work.
|
|
156
|
+
*/
|
|
157
|
+
pausesAfterStep(): Promise<boolean>;
|
|
158
|
+
}
|
|
159
|
+
/** How a run ended; the session supplies which run, and its token. */
|
|
160
|
+
export type AgentRunOutcome = FinishAgentRunInput extends infer Finish ? Finish extends FinishAgentRunInput ? Omit<Finish, "projectId" | "id" | "executionToken"> : never : never;
|
|
161
|
+
/** What an in-process session works against. */
|
|
162
|
+
export interface AgentRunSessionHost extends AgentRunChildrenHost {
|
|
163
|
+
readonly projectId: string;
|
|
164
|
+
readonly storage: Storage & {
|
|
165
|
+
readonly agents: AgentStorage;
|
|
166
|
+
readonly auth: AuthStorage;
|
|
167
|
+
} & ModelCallAccountingStorage;
|
|
168
|
+
readonly broker: Broker;
|
|
169
|
+
/** Queues a model call's record when storage cannot take it while the run goes on. */
|
|
170
|
+
readonly recoverAiModelCall: RecoverAiModelCall;
|
|
171
|
+
/** Where live records go; the host keeps them best effort (see isolateStreamSink). */
|
|
172
|
+
readonly events: StreamSink;
|
|
173
|
+
/** The project's security definitions, which decide a run's authority. */
|
|
174
|
+
readonly security: SecurityDefinitionCatalog;
|
|
175
|
+
/** Where a project tool's logs go; the project's logging service when absent. */
|
|
176
|
+
readonly logging?: LoggingService;
|
|
177
|
+
/**
|
|
178
|
+
* Binds the run's SDK as its requester, as the API binds a request with the run's token: what
|
|
179
|
+
* the run reads and publishes through its session goes through it.
|
|
180
|
+
*/
|
|
181
|
+
readonly sdk: AgentExecutionHost;
|
|
182
|
+
/** The definitions a run's plan is read from. */
|
|
183
|
+
readonly definitions: AgentRunPlanDefinitions;
|
|
184
|
+
/**
|
|
185
|
+
* What follows a run's end, once `finish` recorded it: a turn's children still at work are
|
|
186
|
+
* stopped, and a turn paused on calls already decided goes on. Best effort: a failure is logged,
|
|
187
|
+
* and the host's repair passes catch up.
|
|
188
|
+
*/
|
|
189
|
+
readonly afterFinish?: (run: AgentRunRecord) => Promise<void>;
|
|
190
|
+
}
|
|
191
|
+
export interface ClaimAgentRunInput<TRun extends AgentRunRecord> {
|
|
192
|
+
/** A queued run, or a running one whose last delivery's lease lapsed. */
|
|
193
|
+
readonly run: TRun;
|
|
194
|
+
readonly modelId?: string;
|
|
195
|
+
/** When the queue delivery that claims the run expires unless renewed. */
|
|
196
|
+
readonly leaseExpiresAt: string;
|
|
197
|
+
/** Other runs whose cancellation cancels this one: a child's parent. */
|
|
198
|
+
readonly cancelWith?: readonly string[];
|
|
199
|
+
/**
|
|
200
|
+
* The runner's own stop: its process shutting down, or its delivery lost. The calls its project
|
|
201
|
+
* tools make stop with it, as the run's own do.
|
|
202
|
+
*/
|
|
203
|
+
readonly stop?: AbortSignal;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Start a queued run, or reclaim a running one, and open its session. Returns null when the run
|
|
207
|
+
* ended meanwhile, so there is nothing to claim.
|
|
208
|
+
*/
|
|
209
|
+
export declare function claimAgentRun<TRun extends AgentRunRecord>(host: AgentRunSessionHost, input: ClaimAgentRunInput<TRun>): Promise<AgentRunSession<TRun> | null>;
|
|
210
|
+
/**
|
|
211
|
+
* The session of a run already claimed: the one its execution token names. A server answering a
|
|
212
|
+
* remote runner opens it per request; the worker opens it once, when it claims the run.
|
|
213
|
+
*/
|
|
214
|
+
export declare function openAgentRunSession<TRun extends AgentRunRecord>(host: AgentRunSessionHost, run: TRun, cancelWith?: readonly string[], stop?: AbortSignal): Promise<AgentRunSession<TRun>>;
|
|
215
|
+
/** A project's members and a run's authority, as the in-process session reads them. */
|
|
216
|
+
export declare function agentRunPeople(host: Pick<AgentRunSessionHost, "projectId" | "security"> & {
|
|
217
|
+
readonly storage: {
|
|
218
|
+
readonly auth: AuthStorage;
|
|
219
|
+
};
|
|
220
|
+
}): AgentRunPeople;
|
|
221
|
+
/**
|
|
222
|
+
* Watch runs for a cancel, best effort: failing to attach a watch costs that run its
|
|
223
|
+
* cancellability, never the run itself. `stop` unsubscribes.
|
|
224
|
+
*/
|
|
225
|
+
export declare function watchAgentRunCancel(host: Pick<AgentRunSessionHost, "projectId" | "broker">, runIds: readonly string[]): Promise<{
|
|
226
|
+
readonly signal: AbortSignal;
|
|
227
|
+
abort(reason: unknown): void;
|
|
228
|
+
readonly stop: () => void;
|
|
229
|
+
}>;
|
|
230
|
+
/**
|
|
231
|
+
* The run's end could not be recorded: storage stayed unavailable across the retries. The runner
|
|
232
|
+
* leaves the delivery for another attempt rather than acknowledging a run that never ended.
|
|
233
|
+
*/
|
|
234
|
+
export declare class AgentFinalizationError extends Error {
|
|
235
|
+
readonly runId: string;
|
|
236
|
+
readonly name = "AgentFinalizationError";
|
|
237
|
+
constructor(runId: string, options?: ErrorOptions);
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=run-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-session.d.ts","sourceRoot":"","sources":["../../src/agents/run-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,oBAAoB,CAAA;AAE/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,EAGL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAG7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EAEjB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,iCAAiC,EACtC,KAAK,mBAAmB,EAGxB,KAAK,iCAAiC,EACvC,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE9D,OAAO,EACL,KAAK,2BAA2B,EAIjC,MAAM,aAAa,CAAA;AAGpB,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,iBAAiB,CAAA;AAC3E,OAAO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Ac,EACnE,IAAI,EAAE,mBAAmB,EACzB,GAAG,EAAE,IAAI,EACT,UAAU,GAAE,SAAS,MAAM,EAAO,EAClC,IAAI,CAAC,EAAE,WAAW,GACjB,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAuRhC;AAkED,uFAAuF;AACvF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IAC1D,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;KAAE,CAAA;CACjD,GACA,cAAc,CAkBhB;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,QAAQ,CAAC,EACvD,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,OAAO,CAAC;IACT,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAC1B,CAAC,CAmBD;AAED;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAG7C,QAAQ,CAAC,KAAK,EAAE,MAAM;IAFxB,QAAQ,CAAC,IAAI,4BAA2B;gBAE7B,KAAK,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,YAAY;CAIzB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type AgentApiEffect } from "../http/api-routes";
|
|
2
|
+
export interface AgentRunTokenInput {
|
|
3
|
+
readonly projectId: string;
|
|
4
|
+
readonly runId: string;
|
|
5
|
+
readonly executionToken: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AgentApiRoute {
|
|
8
|
+
readonly method: string;
|
|
9
|
+
readonly path: string;
|
|
10
|
+
/** What a call changes; a GET reads. */
|
|
11
|
+
readonly effect: AgentApiEffect;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The routes a run token may call — the `agentApi` projection of the canonical
|
|
15
|
+
* {@link SIXB_API_ROUTES} table, so this list can never drift from (nor exceed) the bearer boundary.
|
|
16
|
+
*/
|
|
17
|
+
export declare const AGENT_API_ROUTES: readonly AgentApiRoute[];
|
|
18
|
+
export declare function createAgentRunToken(input: AgentRunTokenInput): string;
|
|
19
|
+
/** Whether a bearer token is a run token, whatever run it names or whether it is still valid. */
|
|
20
|
+
export declare function isAgentRunToken(token: string): boolean;
|
|
21
|
+
/** The run a run token names, unverified; undefined when the token is malformed. */
|
|
22
|
+
export declare function agentRunTokenRunId(token: string): string | undefined;
|
|
23
|
+
/** Whether the token was issued for this run under this execution token. */
|
|
24
|
+
export declare function isValidAgentRunToken(input: AgentRunTokenInput & {
|
|
25
|
+
readonly token: string;
|
|
26
|
+
}): boolean;
|
|
27
|
+
/** The token a run's runner reaches its session with, never handed to the run's commands. */
|
|
28
|
+
export declare function createAgentRunnerToken(input: AgentRunTokenInput): string;
|
|
29
|
+
/** Whether a bearer token is a runner token, whatever run it names or whether it is still valid. */
|
|
30
|
+
export declare function isAgentRunnerToken(token: string): boolean;
|
|
31
|
+
/** The run a runner token names, unverified; undefined when the token is malformed. */
|
|
32
|
+
export declare function agentRunnerTokenRunId(token: string): string | undefined;
|
|
33
|
+
/** Whether the runner token was issued for this run under this execution token. */
|
|
34
|
+
export declare function isValidAgentRunnerToken(input: AgentRunTokenInput & {
|
|
35
|
+
readonly token: string;
|
|
36
|
+
}): boolean;
|
|
37
|
+
export declare function isAllowedAgentApiRequest(method: string, pathname: string): boolean;
|
|
38
|
+
/** The gateway route a request matches, with what it changes. */
|
|
39
|
+
export declare function findAgentApiRoute(method: string, pathname: string): AgentApiRoute | undefined;
|
|
40
|
+
//# sourceMappingURL=run-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-token.d.ts","sourceRoot":"","sources":["../../src/agents/run-token.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OAAO,CAET;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAElF;AAED,iEAAiE;AACjE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAM7F"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { JsonObject, JsonValue } from "../json";
|
|
2
|
+
import type { Logger } from "../logging/types";
|
|
3
|
+
import type { ValueType } from "../ontology/types";
|
|
4
|
+
import type { AgentMessageRecord, SubagentRunFile } from "../storage/agents";
|
|
5
|
+
import type { AgentRunFileStore } from "./run-session";
|
|
6
|
+
import { type AgentToolCallFile } from "./tool-files";
|
|
7
|
+
import type { AgentToolAttachments, AgentToolDefinition, AgentToolRunInfo, AgentToolRuntimeFacade } from "./types";
|
|
8
|
+
/** A project tool as the model is offered it. */
|
|
9
|
+
export interface AgentToolSpec {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly description: string;
|
|
12
|
+
readonly inputSchema: JsonObject;
|
|
13
|
+
}
|
|
14
|
+
/** A call the model made to a project tool. */
|
|
15
|
+
export interface AgentToolCall {
|
|
16
|
+
readonly toolName: string;
|
|
17
|
+
readonly toolCallId: string;
|
|
18
|
+
readonly input: unknown;
|
|
19
|
+
}
|
|
20
|
+
/** How a call runs: until `signal` aborts, its files within what the run's file budget has left. */
|
|
21
|
+
export interface AgentToolCallOptions {
|
|
22
|
+
readonly signal: AbortSignal;
|
|
23
|
+
/** The bytes the run may still store; the put that would pass it is refused. */
|
|
24
|
+
readonly maxFileBytes?: number;
|
|
25
|
+
}
|
|
26
|
+
/** What a project tool returned, and the files it stored for the run's sandbox. */
|
|
27
|
+
export interface AgentToolCallResult {
|
|
28
|
+
readonly output: JsonValue;
|
|
29
|
+
/** Each at its path in the sandbox's context directory. */
|
|
30
|
+
readonly files: readonly AgentToolCallFile[];
|
|
31
|
+
}
|
|
32
|
+
/** The spec the model gets for a project tool: its input as JSON Schema. */
|
|
33
|
+
export declare function agentToolSpec(definition: AgentToolDefinition, valueTypesById: ReadonlyMap<string, ValueType>): AgentToolSpec;
|
|
34
|
+
/**
|
|
35
|
+
* Run one call of a project tool as the run. Input the tool's schema refuses is an
|
|
36
|
+
* {@link AgentToolPublicError}, which the model reads. Whatever the handler throws is thrown as it
|
|
37
|
+
* is: its runner decides what the model may read of it.
|
|
38
|
+
*/
|
|
39
|
+
export declare function runAgentTool(input: {
|
|
40
|
+
readonly definition: AgentToolDefinition;
|
|
41
|
+
readonly valueTypesById: ReadonlyMap<string, ValueType>;
|
|
42
|
+
readonly call: AgentToolCall;
|
|
43
|
+
readonly signal: AbortSignal;
|
|
44
|
+
readonly run: AgentToolRunInfo;
|
|
45
|
+
/** The run's SDK, bound as its requester. */
|
|
46
|
+
readonly sixb: AgentToolRuntimeFacade;
|
|
47
|
+
readonly logger: Logger;
|
|
48
|
+
readonly attachments: AgentToolAttachments;
|
|
49
|
+
/** Where the files it puts are stored. */
|
|
50
|
+
readonly files: Pick<AgentRunFileStore, "put">;
|
|
51
|
+
/** The bytes its files may take in all: the run's budget left. */
|
|
52
|
+
readonly maxFileBytes?: number;
|
|
53
|
+
}): Promise<AgentToolCallResult>;
|
|
54
|
+
/**
|
|
55
|
+
* A chat's attachments: files of its thread's messages, by the key `$SIXB_ATTACHMENTS` lists. A key
|
|
56
|
+
* resolves only in a message of the run's own thread.
|
|
57
|
+
*/
|
|
58
|
+
export declare function threadToolAttachments(input: {
|
|
59
|
+
readonly threadId: string;
|
|
60
|
+
readonly message: (messageId: string) => Promise<AgentMessageRecord | null>;
|
|
61
|
+
readonly files: Pick<AgentRunFileStore, "stat" | "open">;
|
|
62
|
+
}): AgentToolAttachments;
|
|
63
|
+
/** A child Agent's attachments: the files its parent handed over, by their path such as `q3.pdf`. */
|
|
64
|
+
export declare function handedToolAttachments(input: {
|
|
65
|
+
readonly files: readonly SubagentRunFile[];
|
|
66
|
+
readonly store: Pick<AgentRunFileStore, "stat" | "open">;
|
|
67
|
+
}): AgentToolAttachments;
|
|
68
|
+
//# sourceMappingURL=run-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-tools.d.ts","sourceRoot":"","sources":["../../src/agents/run-tools.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAG5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,KAAK,iBAAiB,EAAiD,MAAM,cAAc,CAAA;AACpG,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,SAAS,CAAA;AAQhB,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAA;CACjC;AAED,+CAA+C;AAC/C,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB;AAED,oGAAoG;AACpG,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,gFAAgF;IAChF,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAC/B;AAED,mFAAmF;AACnF,MAAM,WAAW,mBAAmB;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BAAoB,CAWvB;AAED,qGAAqG;AACrG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,QAAQ,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAA;IAC1C,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;CACzD,GAAG,oBAAoB,CASvB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { UserPrincipal } from "../auth/types";
|
|
2
|
+
import type { AgentContextCheckpointRecord, AgentMessageRecord, AgentRunRecord, AgentThreadParticipantRecord, AgentThreadRecord, SubagentRunRecord } from "../storage/agents";
|
|
3
|
+
import type { AiModelCallUsageRecord } from "../storage/ai-usage";
|
|
4
|
+
import type { ExecutionRecord } from "../storage/executions/types";
|
|
5
|
+
import type { AgentRunSessionHost } from "./run-session";
|
|
6
|
+
/** What a run starts from: a conversation turn's, or a child's. */
|
|
7
|
+
export type AgentRunContext = AgentTurnContext | AgentChildContext;
|
|
8
|
+
export interface AgentTurnContext {
|
|
9
|
+
readonly kind: "conversation";
|
|
10
|
+
readonly thread: AgentThreadRecord | null;
|
|
11
|
+
readonly execution: ExecutionRecord | null;
|
|
12
|
+
/** Everyone added to the thread, even someone who cannot read it now. */
|
|
13
|
+
readonly participants: readonly AgentThreadParticipantRecord[];
|
|
14
|
+
/** The participants who can read the thread now: active users the project lets use the Agent. */
|
|
15
|
+
readonly readers: readonly UserPrincipal[];
|
|
16
|
+
/**
|
|
17
|
+
* Display names of the people the turn names, by `type:id`: its requester, the thread's owner,
|
|
18
|
+
* its readers and who wrote its retained messages. Someone without one is absent.
|
|
19
|
+
*/
|
|
20
|
+
readonly names: Readonly<Record<string, string>>;
|
|
21
|
+
readonly history: AgentTurnHistory;
|
|
22
|
+
}
|
|
23
|
+
/** A conversation's history as a turn reads it: the latest checkpoint and what follows it. */
|
|
24
|
+
export interface AgentTurnHistory {
|
|
25
|
+
readonly checkpoint: AgentContextCheckpointRecord | null;
|
|
26
|
+
/** The messages after the checkpoint, oldest first. */
|
|
27
|
+
readonly messages: readonly AgentMessageRecord[];
|
|
28
|
+
/** The time zone of the run that answered each retained user message, by message id. */
|
|
29
|
+
readonly sentTimeZones: Readonly<Record<string, string>>;
|
|
30
|
+
/**
|
|
31
|
+
* The model call that ended the latest assistant message after the checkpoint: what a token
|
|
32
|
+
* estimate anchors on, as the provider counted it.
|
|
33
|
+
*/
|
|
34
|
+
readonly usageAnchor?: {
|
|
35
|
+
readonly messageId: string;
|
|
36
|
+
readonly modelCall: AiModelCallUsageRecord;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface AgentChildContext {
|
|
40
|
+
readonly kind: "subagent";
|
|
41
|
+
/** The turn that spawned the child, as it is now. */
|
|
42
|
+
readonly parent: AgentRunRecord | null;
|
|
43
|
+
readonly execution: ExecutionRecord | null;
|
|
44
|
+
/** The child's own thread. */
|
|
45
|
+
readonly thread: AgentThreadRecord | null;
|
|
46
|
+
/** The thread of the conversation the child works for. */
|
|
47
|
+
readonly conversation: AgentThreadRecord | null;
|
|
48
|
+
/** The child's thread, oldest first. */
|
|
49
|
+
readonly messages: readonly AgentMessageRecord[];
|
|
50
|
+
/** The run of the thread that paused on its held calls, when this run continues it. */
|
|
51
|
+
readonly paused?: SubagentRunRecord;
|
|
52
|
+
/** The display name of whoever asked for the parent turn, by `type:id`, when they have one. */
|
|
53
|
+
readonly names: Readonly<Record<string, string>>;
|
|
54
|
+
}
|
|
55
|
+
/** Read what a run starts from. */
|
|
56
|
+
export declare function readAgentRunContext(host: AgentRunSessionHost, run: AgentRunRecord): Promise<AgentRunContext>;
|
|
57
|
+
/** A conversation's history: its latest checkpoint and the messages after it. */
|
|
58
|
+
export declare function readAgentTurnHistory(host: AgentRunSessionHost, threadId: string): Promise<AgentTurnHistory>;
|
|
59
|
+
//# sourceMappingURL=run-turn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-turn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|
export {
|
|
15
15
|
AGENT_ACTIVITY_STREAM_ID2 as AGENT_ACTIVITY_STREAM_ID,
|
|
16
16
|
AGENT_ACTIVITY_STREAM_SCHEMA_VERSION2 as AGENT_ACTIVITY_STREAM_SCHEMA_VERSION,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Implementation exports for Sixb packages only. */
|
|
2
|
-
export { AGENT_RUN_CANCEL_RECORD, agentActivityStreamDefinition, agentRunActivityEvent, agentRunControlStreamDefinition, agentRunControlStreamId, agentRunFinishedEvent, agentRunStreamDefinition, agentRunStreamEventBase, agentRunStreamId, agentRunStreamIdempotencyKey, DEFAULT_AGENT_ACTIVITY_STREAM_RETENTION, DEFAULT_AGENT_RUN_STREAM_RETENTION,
|
|
2
|
+
export { AGENT_RUN_CANCEL_RECORD, agentActivityStreamDefinition, agentRunActivityEvent, agentRunControlStreamDefinition, agentRunControlStreamId, agentRunFinishedEvent, agentRunStreamDefinition, agentRunStreamEventBase, agentRunStreamId, agentRunStreamIdempotencyKey, DEFAULT_AGENT_ACTIVITY_STREAM_RETENTION, DEFAULT_AGENT_RUN_STREAM_RETENTION, publishAgentRunActivity, publishAgentRunCancel, publishAgentRunFinished, subscribeAgentRunCancel, } from "./protocol";
|
|
3
3
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/agents/streams/internal.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,+BAA+B,EAC/B,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,4BAA4B,EAC5B,uCAAuC,EACvC,kCAAkC,EAClC,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/agents/streams/internal.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,+BAA+B,EAC/B,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,4BAA4B,EAC5B,uCAAuC,EACvC,kCAAkC,EAClC,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,YAAY,CAAA"}
|
|
@@ -14,12 +14,11 @@ import {
|
|
|
14
14
|
agentRunControlStreamDefinition2,
|
|
15
15
|
publishAgentRunCancel2,
|
|
16
16
|
subscribeAgentRunCancel2,
|
|
17
|
-
publishAgentChildFinished2,
|
|
18
17
|
agentRunFinishedEvent2,
|
|
19
18
|
agentRunStreamEventBase2,
|
|
20
19
|
agentRunStreamIdempotencyKey2,
|
|
21
20
|
publishAgentRunFinished2
|
|
22
|
-
} from "../../chunk-
|
|
21
|
+
} from "../../chunk-jt3r6thp.js";
|
|
23
22
|
export {
|
|
24
23
|
AGENT_RUN_CANCEL_RECORD2 as AGENT_RUN_CANCEL_RECORD,
|
|
25
24
|
DEFAULT_AGENT_ACTIVITY_STREAM_RETENTION2 as DEFAULT_AGENT_ACTIVITY_STREAM_RETENTION,
|
|
@@ -33,11 +32,10 @@ export {
|
|
|
33
32
|
agentRunStreamEventBase2 as agentRunStreamEventBase,
|
|
34
33
|
agentRunStreamId2 as agentRunStreamId,
|
|
35
34
|
agentRunStreamIdempotencyKey2 as agentRunStreamIdempotencyKey,
|
|
36
|
-
publishAgentChildFinished2 as publishAgentChildFinished,
|
|
37
35
|
publishAgentRunActivity2 as publishAgentRunActivity,
|
|
38
36
|
publishAgentRunCancel2 as publishAgentRunCancel,
|
|
39
37
|
publishAgentRunFinished2 as publishAgentRunFinished,
|
|
40
38
|
subscribeAgentRunCancel2 as subscribeAgentRunCancel
|
|
41
39
|
};
|
|
42
40
|
|
|
43
|
-
//# debugId=
|
|
41
|
+
//# debugId=76FB451CEEEFC5B564756E2164756E21
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Broker, BrokerStreamDefinition } from "../../broker";
|
|
2
2
|
import type { SixbFailure } from "../../errors/types";
|
|
3
3
|
import { type ModelUiChunk } from "../../models/events";
|
|
4
|
-
import { type AgentApprovalRecord, type AgentApprovalStatus, type AgentContextCheckpointReason, type AgentRunFailureCode, type AgentRunRecord, type ConversationAgentRunRecord
|
|
4
|
+
import { type AgentApprovalRecord, type AgentApprovalStatus, type AgentContextCheckpointReason, type AgentRunFailureCode, type AgentRunRecord, type ConversationAgentRunRecord } from "../../storage/agents/types";
|
|
5
5
|
export declare const AGENT_RUN_STREAM_SCHEMA_VERSION: 1;
|
|
6
6
|
export declare const DEFAULT_AGENT_RUN_STREAM_RETENTION: {
|
|
7
7
|
readonly maxAgeMs: number;
|
|
@@ -89,101 +89,6 @@ export declare function subscribeAgentRunCancel(broker: Broker, params: {
|
|
|
89
89
|
readonly projectId: string;
|
|
90
90
|
readonly runId: string;
|
|
91
91
|
}, onCancel: () => void): Promise<() => void>;
|
|
92
|
-
export type AgentThreadInboxStreamId = `agents.threads.${string}.inbox`;
|
|
93
|
-
export type AgentRunInboxStreamId = `agents.runs.${string}.inbox`;
|
|
94
|
-
export declare function agentThreadInboxStreamId(threadId: string): AgentThreadInboxStreamId;
|
|
95
|
-
export declare function agentRunInboxStreamId(runId: string): AgentRunInboxStreamId;
|
|
96
|
-
/** Whose inbox: a sub-agent's thread, or a turn its children ask. */
|
|
97
|
-
export type AgentInbox = {
|
|
98
|
-
readonly threadId: string;
|
|
99
|
-
} | {
|
|
100
|
-
readonly runId: string;
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* The kinds of mail this version writes and understands:
|
|
104
|
-
*
|
|
105
|
-
* - `message`: the parent steers its child;
|
|
106
|
-
* - `question`: the child asks its parent, and waits;
|
|
107
|
-
* - `answer`: the parent's reply to a question, `inReplyTo`;
|
|
108
|
-
* - `deferred`: the parent's turn ended without one, so the child pauses on its question.
|
|
109
|
-
*/
|
|
110
|
-
export declare const AGENT_MAIL_KINDS: readonly ["message", "question", "answer", "deferred"];
|
|
111
|
-
export type AgentMailKind = (typeof AGENT_MAIL_KINDS)[number];
|
|
112
|
-
/**
|
|
113
|
-
* One message between a turn and its sub-agent: to the child's thread, or, a question, from the
|
|
114
|
-
* child's thread to the turn.
|
|
115
|
-
*/
|
|
116
|
-
export type AgentMail = {
|
|
117
|
-
/** Unique per message: a sender writing it again, or the broker redelivering it, is the same. */
|
|
118
|
-
readonly id: string;
|
|
119
|
-
readonly fromRunId: string;
|
|
120
|
-
readonly kind: AgentMailKind;
|
|
121
|
-
/** The question an `answer` or `deferred` replies to. */
|
|
122
|
-
readonly inReplyTo?: string;
|
|
123
|
-
/** What the reader's model reads, whatever the kind: a reader that does not know it reads this. */
|
|
124
|
-
readonly text: string;
|
|
125
|
-
readonly sentAt: string;
|
|
126
|
-
} & ({
|
|
127
|
-
readonly toThreadId: string;
|
|
128
|
-
} | {
|
|
129
|
-
readonly toRunId: string;
|
|
130
|
-
/** The sub-agent's thread that asks. */
|
|
131
|
-
readonly fromThreadId: string;
|
|
132
|
-
});
|
|
133
|
-
/**
|
|
134
|
-
* Mail as a reader finds it. Its kind may be one a newer sender writes: the reader delivers its
|
|
135
|
-
* text as a message rather than skipping it, so no reader's cursor passes mail it never delivered.
|
|
136
|
-
*/
|
|
137
|
-
export type ReceivedAgentMail = Omit<AgentMail, "kind"> & {
|
|
138
|
-
readonly kind: string;
|
|
139
|
-
};
|
|
140
|
-
export declare function isKnownAgentMailKind(kind: string): kind is AgentMailKind;
|
|
141
|
-
/** Write a message to its recipient's inbox. Idempotent by its id where the broker dedupes. */
|
|
142
|
-
export declare function publishAgentMail(broker: Broker, params: {
|
|
143
|
-
readonly projectId: string;
|
|
144
|
-
readonly mail: AgentMail;
|
|
145
|
-
}): Promise<void>;
|
|
146
|
-
/**
|
|
147
|
-
* Call `onMail` with each page of mail to an inbox as it arrives, from its start. It is a wake: a
|
|
148
|
-
* broker may deliver a record again, so the reader keeps each mail once by its id. Returns the
|
|
149
|
-
* unsubscribe handle.
|
|
150
|
-
*/
|
|
151
|
-
export declare function subscribeAgentMail(broker: Broker, params: {
|
|
152
|
-
readonly projectId: string;
|
|
153
|
-
readonly inbox: AgentInbox;
|
|
154
|
-
}, onMail: (mail: readonly ReceivedAgentMail[]) => void): Promise<() => void>;
|
|
155
|
-
/**
|
|
156
|
-
* Hear an inbox from its start: its mail, and, for a turn's with `childFinished`, the ids of its
|
|
157
|
-
* children as each finishes. Both are wakes: a broker may deliver a record again, and a finish says
|
|
158
|
-
* only that the child's run is worth reading. Returns the unsubscribe handle.
|
|
159
|
-
*/
|
|
160
|
-
export declare function subscribeAgentInbox(broker: Broker, params: {
|
|
161
|
-
readonly projectId: string;
|
|
162
|
-
readonly inbox: AgentInbox;
|
|
163
|
-
}, on: {
|
|
164
|
-
readonly mail: (mail: readonly ReceivedAgentMail[]) => void;
|
|
165
|
-
readonly childFinished?: (runIds: readonly string[]) => void;
|
|
166
|
-
}): Promise<() => void>;
|
|
167
|
-
/**
|
|
168
|
-
* Tell the turn a child works under, on the turn's inbox, that the child finished. Its run stream
|
|
169
|
-
* says so too, but that stream belongs to the transcript sink, which a worker may replace, and
|
|
170
|
-
* hearing it would take one subscription per child, each carrying every chunk the child streams.
|
|
171
|
-
* This record is the platform's, and one subscription per turn hears every child.
|
|
172
|
-
*/
|
|
173
|
-
export declare function publishAgentChildFinished(broker: Broker, run: SubagentRunRecord): Promise<void>;
|
|
174
|
-
/**
|
|
175
|
-
* Read an inbox's mail after `afterCursor`, or from the start, every page of it. Carry the returned
|
|
176
|
-
* cursor to the next read. A record that is not mail at all (no envelope, no text) cannot be
|
|
177
|
-
* delivered: it is reported and passed, never silently.
|
|
178
|
-
*/
|
|
179
|
-
export declare function readAgentMail(broker: Broker, params: {
|
|
180
|
-
readonly projectId: string;
|
|
181
|
-
readonly inbox: AgentInbox;
|
|
182
|
-
readonly afterCursor?: string;
|
|
183
|
-
}): Promise<{
|
|
184
|
-
readonly mail: readonly ReceivedAgentMail[];
|
|
185
|
-
readonly cursor?: string;
|
|
186
|
-
}>;
|
|
187
92
|
/** Exact portable failure exposed by a terminal Agent run stream event. */
|
|
188
93
|
export type AgentRunFailure = SixbFailure<AgentRunFailureCode>;
|
|
189
94
|
export declare const AGENT_COMPACTION_FAILURE_CODES: readonly ["context_limit_exceeded", "summary_failed", "checkpoint_failed"];
|