@sixb/core 0.1.24 → 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 +6 -3
- package/dist/artifacts/frames/index.js.map +3 -3
- package/dist/artifacts/frames/probe.d.ts.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/frames/probe.ts +14 -1
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"run-events.d.ts","sourceRoot":"","sources":["../../src/agents/run-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAGvC,OAAO,KAAK,EACV,4BAA4B,EAC5B,cAAc,EACd,0BAA0B,EAC3B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,0BAA0B,EAAuB,YAAY,EAAE,MAAM,WAAW,CAAA;AAU9F,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,GAAG,EAAE,0BAA0B,CAAA;IACxC,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAA;IAC7C,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAA;CAC5C;AAED,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAA;CAC3C;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,GAAG,EAAE,0BAA0B,CAAA;IACxC,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAA;IAC7C,QAAQ,CAAC,SAAS,EAAE,0BAA0B,CAAA;CAC/C;AAED,oEAAoE;AACpE,MAAM,WAAW,UAAU;IACzB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClD,wBAAwB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtE,0BAA0B,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1E,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpE,cAAc,CAAC,KAAK,EAAE;QACpB,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAA;QAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;QAC3B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;KAC7B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACjB,uBAAuB,CAAC,KAAK,EAAE;QAC7B,QAAQ,CAAC,GAAG,EAAE,0BAA0B,CAAA;QACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAC3B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACjB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACvD;AAED,sFAAsF;AACtF,eAAO,MAAM,gBAAgB,EAAE,UAQ9B,CAAA;AAED,wEAAwE;AACxE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B,GAAG,UAAU,CAEb;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAyB9D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAkBpF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type AgentStorage } from "../storage/agents";
|
|
2
|
+
/** This session's execution token is stale, so it must make no further durable writes. */
|
|
3
|
+
export declare class AgentExecutionLostError extends Error {
|
|
4
|
+
readonly runId: string;
|
|
5
|
+
readonly name = "AgentExecutionLostError";
|
|
6
|
+
constructor(runId: string);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The session refuses what its run may not do: read beyond its conversation, hand a child what the
|
|
10
|
+
* project does not offer. Its message is the runner's to read, wherever the runner is.
|
|
11
|
+
*/
|
|
12
|
+
export declare class AgentRunRefusedError extends Error {
|
|
13
|
+
readonly name = "AgentRunRefusedError";
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Storage outcomes that mean the run is no longer this session's: another delivery owns it, or it
|
|
17
|
+
* already ended. There is nothing more to record either way.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isTerminalOrExecutionGone(error: unknown): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Make a write the run's token fences, and report the fence as {@link AgentExecutionLostError}: a
|
|
22
|
+
* runner checks for that one error, whichever write found the run gone. `ended` also counts a run
|
|
23
|
+
* that ended as gone, for a write whose storage says so with `invalid_state`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function fenced<T>(runId: string, write: () => Promise<T>, options?: {
|
|
26
|
+
readonly ended?: boolean;
|
|
27
|
+
}): Promise<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Throws {@link AgentExecutionLostError} unless the run still runs under this execution token,
|
|
30
|
+
* within its lease. `agents` may be a transaction's, so the check and the write it guards commit
|
|
31
|
+
* together.
|
|
32
|
+
*/
|
|
33
|
+
export declare function assertAgentRunOwned(agents: AgentStorage, fence: {
|
|
34
|
+
readonly projectId: string;
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly executionToken: string;
|
|
37
|
+
}): Promise<void>;
|
|
38
|
+
//# sourceMappingURL=run-fence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-fence.d.ts","sourceRoot":"","sources":["../../src/agents/run-fence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAqB,MAAM,mBAAmB,CAAA;AAExE,0FAA0F;AAC1F,qBAAa,uBAAwB,SAAQ,KAAK;IAEpC,QAAQ,CAAC,KAAK,EAAE,MAAM;IADlC,QAAQ,CAAC,IAAI,6BAA4B;gBACpB,KAAK,EAAE,MAAM;CAGnC;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,IAAI,0BAAyB;CACvC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAOjE;AAED;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,CAAC,EAC5B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACvB,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GACzC,OAAO,CAAC,CAAC,CAAC,CAWZ;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GAC1F,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type AgentRunRecord } from "../storage/agents";
|
|
2
|
+
import { type AgentRunSessionHost } from "./run-session";
|
|
3
|
+
/**
|
|
4
|
+
* The runner running a turn or child stopped, or died, before finishing it. The run is recorded
|
|
5
|
+
* `cancelled` with `finishReason: "interrupted"` rather than replayed: the user already saw it
|
|
6
|
+
* stream and its model calls were billed, so running it again is their call.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AgentTurnInterruptedError extends Error {
|
|
9
|
+
readonly runId: string;
|
|
10
|
+
readonly name = "AgentTurnInterruptedError";
|
|
11
|
+
constructor(runId: string);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* What a run that stopped with its runner records. A child's tells its parent what to do about it:
|
|
15
|
+
* nothing replays it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function interruptedError(run: AgentRunRecord): AgentTurnInterruptedError;
|
|
18
|
+
/** Whether the lease last recorded on a running run has run out. */
|
|
19
|
+
export declare function agentRunLeaseLapsed(run: AgentRunRecord, now?: number): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* End a turn or child that nothing runs any more, as interrupted and without calling the model.
|
|
22
|
+
* Reclaiming it first rotates its execution token, so a runner that is only slow, not gone, can
|
|
23
|
+
* no longer write to it. Returns the ended run, or null when it ended or moved meanwhile.
|
|
24
|
+
*
|
|
25
|
+
* `leaseMs` bounds the claim this makes, which lasts only as long as recording the end.
|
|
26
|
+
*/
|
|
27
|
+
export declare function endInterruptedAgentRun(host: AgentRunSessionHost, run: AgentRunRecord, leaseMs: number): Promise<AgentRunRecord | null>;
|
|
28
|
+
/**
|
|
29
|
+
* End every running turn and child whose lease lapsed. A queue redelivers a dead runner's turn
|
|
30
|
+
* sooner; this is what ends a run no delivery will come back for: one on a computer, a child, or
|
|
31
|
+
* a turn whose end could not be recorded before its job gave up. Returns how many it ended.
|
|
32
|
+
*/
|
|
33
|
+
export declare function endLapsedAgentRuns(host: AgentRunSessionHost, input: {
|
|
34
|
+
readonly leaseMs: number;
|
|
35
|
+
}): Promise<number>;
|
|
36
|
+
//# sourceMappingURL=run-liveness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-liveness.d.ts","sourceRoot":"","sources":["../../src/agents/run-liveness.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEhF,OAAO,EAAE,KAAK,mBAAmB,EAAiB,MAAM,eAAe,CAAA;AAMvE;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;IAEtC,QAAQ,CAAC,KAAK,EAAE,MAAM;IADlC,QAAQ,CAAC,IAAI,+BAA8B;gBACtB,KAAK,EAAE,MAAM;CAGnC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,yBAAyB,CAO/E;AAED,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,SAAa,GAAG,OAAO,CAMlF;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,mBAAmB,EACzB,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CA+BhC;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClC,OAAO,CAAC,MAAM,CAAC,CA0BjB"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { LanguageModelCatalog, LanguageModelRef, LanguageModelTier, ModelCatalog } from "../models/catalog";
|
|
2
|
+
import type { LanguageModelDefinition } from "../models/definitions";
|
|
3
|
+
import type { PropertyClearance } from "../objects/property-clearance";
|
|
4
|
+
import type { OntologyDocsCatalog } from "../ontology/docs";
|
|
5
|
+
import { type RenderedOntologyDocs } from "../ontology/docs-markdown";
|
|
6
|
+
import type { SixbDefinitions } from "../runtime/definitions";
|
|
7
|
+
import type { Sixb } from "../runtime/sixb";
|
|
8
|
+
import type { AgentRunRecord } from "../storage/agents";
|
|
9
|
+
import type { AgentMemoryRepoView } from "./memory-execution";
|
|
10
|
+
import { type AgentToolSpec } from "./run-tools";
|
|
11
|
+
import type { AgentSkillDefinition } from "./skills";
|
|
12
|
+
import type { AgentReasoning } from "./types";
|
|
13
|
+
/** What a conversation's turn or a child is set up with. */
|
|
14
|
+
export interface AgentRunPlan {
|
|
15
|
+
/** The model the run calls. */
|
|
16
|
+
readonly model: LanguageModelRef;
|
|
17
|
+
/** The reasoning it asks for, frozen when the run was admitted. */
|
|
18
|
+
readonly reasoning?: AgentReasoning;
|
|
19
|
+
/** The project's `SIXB.md`. */
|
|
20
|
+
readonly instructions?: string;
|
|
21
|
+
/** The project's Agent Skills; the harness adds its own. */
|
|
22
|
+
readonly skills: readonly AgentSkillDefinition[];
|
|
23
|
+
/** The project tools the run offers, as the model is offered them. */
|
|
24
|
+
readonly tools: readonly AgentToolSpec[];
|
|
25
|
+
/** The models its `sixb` can call beside its own, as its prompt lists them. */
|
|
26
|
+
readonly sandboxModels: readonly SandboxModel[];
|
|
27
|
+
/** The requester's time zone and locale, when the run captured them. */
|
|
28
|
+
readonly timeZone?: string;
|
|
29
|
+
readonly locale?: string;
|
|
30
|
+
/** Reference docs for the object types its requester can see, from their own view. */
|
|
31
|
+
readonly ontologyDocs: RenderedOntologyDocs;
|
|
32
|
+
/** The models a turn can hand a child; a child spawns none. */
|
|
33
|
+
readonly delegation?: AgentRunDelegation;
|
|
34
|
+
}
|
|
35
|
+
/** The project's language models, as a turn chooses one for a child it spawns. */
|
|
36
|
+
export interface AgentRunDelegation {
|
|
37
|
+
/** In catalog order: with tiers, light, standard then heavy. */
|
|
38
|
+
readonly models: readonly AgentRunDelegationModel[];
|
|
39
|
+
/** The project default, for a child spawned without a model. */
|
|
40
|
+
readonly defaultModel: LanguageModelRef;
|
|
41
|
+
/** The tiers the project configures; empty when `models.language` is a list. */
|
|
42
|
+
readonly tiers: readonly LanguageModelTier[];
|
|
43
|
+
}
|
|
44
|
+
export interface AgentRunDelegationModel extends LanguageModelRef {
|
|
45
|
+
readonly tier?: LanguageModelTier;
|
|
46
|
+
/** As the model's binding configures it, never its provider's catalog. */
|
|
47
|
+
readonly definition: LanguageModelDefinition;
|
|
48
|
+
readonly defaultReasoning?: AgentReasoning;
|
|
49
|
+
}
|
|
50
|
+
export type SandboxModelKind = "language" | "image" | "speech" | "transcription";
|
|
51
|
+
/** One model the agent reaches through `sixb models`, as its prompt describes it. */
|
|
52
|
+
export interface SandboxModel {
|
|
53
|
+
readonly kind: SandboxModelKind;
|
|
54
|
+
readonly provider: string;
|
|
55
|
+
readonly modelId: string;
|
|
56
|
+
/** A language model's tier, when the project configures its language models by tier. */
|
|
57
|
+
readonly tier?: LanguageModelTier;
|
|
58
|
+
/** A language model's display name. */
|
|
59
|
+
readonly name?: string;
|
|
60
|
+
readonly description?: string;
|
|
61
|
+
}
|
|
62
|
+
/** The definitions a run's plan is read from. */
|
|
63
|
+
export type AgentRunPlanDefinitions = Pick<SixbDefinitions, "agent" | "models" | "ontology" | "tools">;
|
|
64
|
+
/** How a run's requester sees the project: through the run's SDK, with their clearance. */
|
|
65
|
+
export interface AgentRunView {
|
|
66
|
+
readonly sixb: Pick<Sixb, "objects" | "actions">;
|
|
67
|
+
/** Marked properties the requester cannot read; absent when they read every property. */
|
|
68
|
+
readonly propertyClearance?: PropertyClearance;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The plan of a conversation's turn or a child. A turn offers every project tool and skill, on the
|
|
72
|
+
* model its admission froze, or the project default for a turn admitted before specs existed. A
|
|
73
|
+
* child keeps the model and tools its parent chose when it spawned it.
|
|
74
|
+
*/
|
|
75
|
+
export declare function readAgentRunPlan(definitions: AgentRunPlanDefinitions, run: AgentRunRecord, view: AgentRunView): AgentRunPlan;
|
|
76
|
+
/**
|
|
77
|
+
* The project's models, with what each is for: its language models in catalog order, then each
|
|
78
|
+
* media kind's, default first. Read from each model's configured definition, never its provider
|
|
79
|
+
* catalog, so the prompt that lists them stays the same from turn to turn.
|
|
80
|
+
*/
|
|
81
|
+
export declare function listSandboxModels(models: ModelCatalog | undefined): readonly SandboxModel[];
|
|
82
|
+
/** What a run reads of its memory: each repo its requester reads, now and as of a moment. */
|
|
83
|
+
export interface AgentRunMemory {
|
|
84
|
+
/** Others take part in the conversation, so the project's memory alone is read. */
|
|
85
|
+
readonly shared: boolean;
|
|
86
|
+
readonly repos: readonly {
|
|
87
|
+
readonly latest: AgentMemoryRepoView;
|
|
88
|
+
readonly then: AgentMemoryRepoView;
|
|
89
|
+
}[];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The repos a run's requester can read, each at its latest revision and as of `asOf`. A requester
|
|
93
|
+
* without a repo of their own, such as a service account, reads the project's alone, and so does a
|
|
94
|
+
* shared conversation: others read it, so it reaches no one's own memory.
|
|
95
|
+
*/
|
|
96
|
+
export declare function readAgentRunMemory(sixb: Pick<Sixb, "agent">, input: {
|
|
97
|
+
readonly shared: boolean;
|
|
98
|
+
readonly asOf: Date;
|
|
99
|
+
}): Promise<AgentRunMemory>;
|
|
100
|
+
/** Reference docs for the object types a run's requester can see, from their own view. */
|
|
101
|
+
export declare function renderAgentRunOntologyDocs(input: {
|
|
102
|
+
/** The run's SDK, bound as its requester. */
|
|
103
|
+
readonly sixb: Pick<Sixb, "objects" | "actions">;
|
|
104
|
+
readonly catalog: OntologyDocsCatalog;
|
|
105
|
+
/** Marked properties the requester cannot read; absent when they read every property. */
|
|
106
|
+
readonly propertyClearance?: PropertyClearance;
|
|
107
|
+
}): RenderedOntologyDocs;
|
|
108
|
+
/** The project's language models, as a turn offers them to the children it spawns. */
|
|
109
|
+
export declare function readAgentRunDelegation(language: LanguageModelCatalog): AgentRunDelegation;
|
|
110
|
+
//# sourceMappingURL=run-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-plan.d.ts","sourceRoot":"","sources":["../../src/agents/run-plan.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACb,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,KAAK,oBAAoB,EAAsB,MAAM,2BAA2B,CAAA;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EA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AW,cAAc;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS;QACvB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAA;QACpC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAA;KACnC,EAAE,CAAA;CACJ;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,EACzB,KAAK,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GACvD,OAAO,CAAC,cAAc,CAAC,CAiBzB;AAMD,0FAA0F;AAC1F,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,6CAA6C;IAC7C,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC,CAAA;IAChD,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAA;IACrC,yFAAyF;IACzF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;CAC/C,GAAG,oBAAoB,CAoCvB;AAED,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,kBAAkB,CAgBzF"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { Storage } from "../storage";
|
|
2
|
+
import type { AgentApprovalRecord, AgentMessageRecord, AgentRunRecord, AgentStorage, CreateSubagentRunInput, ListAgentMessagesInput, ListAgentMessagesResult, ListThreadSubagentsInput, SubagentRunRecord } from "../storage/agents";
|
|
3
|
+
import { type AgentChildApprovalAwaiting } from "./approvals";
|
|
4
|
+
/**
|
|
5
|
+
* A conversation turn's children, as its session reaches them: the runs it spawned, and those of
|
|
6
|
+
* earlier turns of its conversation, with their threads and the approvals that hold them. Every
|
|
7
|
+
* read answers only for runs of the run's own conversation, and every write is fenced by the
|
|
8
|
+
* turn's execution token.
|
|
9
|
+
*/
|
|
10
|
+
export interface AgentRunChildren {
|
|
11
|
+
/** A run of this conversation: one of its turns, or a child of one; null for any other. */
|
|
12
|
+
get(runId: string): Promise<AgentRunRecord | null>;
|
|
13
|
+
getMany(runIds: readonly string[]): Promise<readonly AgentRunRecord[]>;
|
|
14
|
+
/** The children of this conversation's turns, by spawn key or by how they paused. */
|
|
15
|
+
inConversation(input: Omit<ListThreadSubagentsInput, "projectId" | "threadId">): Promise<readonly SubagentRunRecord[]>;
|
|
16
|
+
/** One child thread's runs, oldest first: a child and its continuations. */
|
|
17
|
+
threadRuns(threadId: string): Promise<readonly SubagentRunRecord[]>;
|
|
18
|
+
/** The approvals a run's calls asked for, its children's included. */
|
|
19
|
+
approvals(runId: string): Promise<readonly AgentApprovalRecord[]>;
|
|
20
|
+
holdsRun(runId: string): Promise<boolean>;
|
|
21
|
+
/** This turn's children's calls that wait for an approval, by child. */
|
|
22
|
+
awaitingApproval(childRunIds: readonly string[]): Promise<ReadonlyMap<string, readonly AgentChildApprovalAwaiting[]>>;
|
|
23
|
+
/** How many of this turn's children are queued or running. */
|
|
24
|
+
activeCount(): Promise<number>;
|
|
25
|
+
/**
|
|
26
|
+
* Create a child run of this turn, with its execution, in one transaction that refuses once the
|
|
27
|
+
* turn no longer owns its run. The session decides what the runner may not: the child's id and
|
|
28
|
+
* thread from its key, its authority from the turn's, and how many children may be at work.
|
|
29
|
+
*/
|
|
30
|
+
spawn(child: AgentChildDraft): Promise<SubagentRunRecord>;
|
|
31
|
+
/**
|
|
32
|
+
* Remove what a run left in a child thread under an earlier attempt of this turn, which failed,
|
|
33
|
+
* so the turn can continue the child again. Refused once the turn no longer owns its run.
|
|
34
|
+
*/
|
|
35
|
+
clearAttempt(input: {
|
|
36
|
+
readonly threadId: string;
|
|
37
|
+
readonly runId: string;
|
|
38
|
+
}): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A child as the turn asks for it: under its key, with its task, either in a thread of its own or
|
|
42
|
+
* continuing one of the conversation's child threads.
|
|
43
|
+
*/
|
|
44
|
+
export type AgentChildDraft = Pick<CreateSubagentRunInput, "spawnKey" | "spec" | "trigger"> & {
|
|
45
|
+
readonly thread: {
|
|
46
|
+
readonly create: true;
|
|
47
|
+
} | {
|
|
48
|
+
readonly id: string;
|
|
49
|
+
readonly create: false;
|
|
50
|
+
};
|
|
51
|
+
readonly createdAt?: Date;
|
|
52
|
+
};
|
|
53
|
+
/** How many children one turn may have queued or running at once, unless its host says. */
|
|
54
|
+
export declare const DEFAULT_MAX_ACTIVE_CHILDREN = 4;
|
|
55
|
+
/** The messages of the run's conversation: its threads, and its children's. */
|
|
56
|
+
export interface AgentRunThreads {
|
|
57
|
+
/** A message of the conversation; null for one anywhere else. */
|
|
58
|
+
message(messageId: string): Promise<AgentMessageRecord | null>;
|
|
59
|
+
/** A thread of the conversation's messages; any other thread is refused. */
|
|
60
|
+
messages(input: Omit<ListAgentMessagesInput, "projectId">): Promise<ListAgentMessagesResult>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Which threads a run may read: its conversation's own, and the threads of its children. A runner
|
|
64
|
+
* over HTTP can name any id, so the session answers for these alone. A thread's place never
|
|
65
|
+
* changes, so each is looked up once.
|
|
66
|
+
*/
|
|
67
|
+
export interface AgentRunScope {
|
|
68
|
+
includes(threadId: string): Promise<boolean>;
|
|
69
|
+
}
|
|
70
|
+
export declare function agentRunScope(host: AgentRunChildrenHost, run: AgentRunRecord): AgentRunScope;
|
|
71
|
+
export declare function agentRunThreads(host: AgentRunChildrenHost, run: AgentRunRecord, scope: AgentRunScope): AgentRunThreads;
|
|
72
|
+
export interface AgentRunChildrenHost {
|
|
73
|
+
readonly projectId: string;
|
|
74
|
+
readonly storage: Storage & {
|
|
75
|
+
readonly agents: AgentStorage;
|
|
76
|
+
};
|
|
77
|
+
/** How many children one turn may have queued or running at once. */
|
|
78
|
+
readonly maxActiveChildren?: number;
|
|
79
|
+
}
|
|
80
|
+
/** What a turn may hand its children: the project's tools, and the models it delegates to. */
|
|
81
|
+
export interface AgentRunDelegable {
|
|
82
|
+
readonly tools: readonly string[];
|
|
83
|
+
readonly models: readonly {
|
|
84
|
+
readonly provider: string;
|
|
85
|
+
readonly modelId: string;
|
|
86
|
+
}[];
|
|
87
|
+
}
|
|
88
|
+
export declare function agentRunChildren(host: AgentRunChildrenHost, run: AgentRunRecord, executionToken: string, scope: AgentRunScope, delegable: () => AgentRunDelegable): AgentRunChildren;
|
|
89
|
+
//# sourceMappingURL=run-session-children.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-session-children.d.ts","sourceRoot":"","sources":["../../src/agents/run-session-children.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,KAAK,0BAA0B,EAA8B,MAAM,aAAa,CAAA;AAMzF;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,2FAA2F;IAC3F,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAClD,OAAO,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC,CAAA;IACtE,qFAAqF;IACrF,cAAc,CACZ,KAAK,EAAE,IAAI,CAAC,wBAAwB,EAAE,WAAW,GAAG,UAAU,CAAC,GAC9D,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAAA;IACxC,4EAA4E;IAC5E,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CA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ents";
|
|
2
|
+
import type { AgentRunSession } from "./run-session";
|
|
3
|
+
export interface HttpAgentRunSessionInput<TRun extends AgentRunRecord> {
|
|
4
|
+
/** The API's origin, such as `https://api.example.com`. */
|
|
5
|
+
readonly apiUrl: string;
|
|
6
|
+
/** The runner token its claim returned, which every request carries. */
|
|
7
|
+
readonly runnerToken: string;
|
|
8
|
+
/** The run as its claim left it. */
|
|
9
|
+
readonly run: TRun;
|
|
10
|
+
/** Sends a request; defaults to `fetch`. */
|
|
11
|
+
readonly fetch?: (request: Request) => Promise<Response>;
|
|
12
|
+
}
|
|
13
|
+
export declare function createHttpAgentRunSession<TRun extends AgentRunRecord>(input: HttpAgentRunSessionInput<TRun>): AgentRunSession<TRun>;
|
|
14
|
+
/**
|
|
15
|
+
* Claim a queued conversation turn as its requester, with their signed-in session (`authorization`,
|
|
16
|
+
* such as `Bearer <session token>` from the CLI's sign-in: the route refuses access tokens), and
|
|
17
|
+
* open its session. Null when the run ended or another runner holds it; refused when its runner
|
|
18
|
+
* stopped, which ended it interrupted.
|
|
19
|
+
*/
|
|
20
|
+
export declare function claimAgentRunOverHttp(input: {
|
|
21
|
+
readonly apiUrl: string;
|
|
22
|
+
readonly runId: string;
|
|
23
|
+
readonly authorization: string;
|
|
24
|
+
readonly leaseExpiresAt: string;
|
|
25
|
+
/** The computer claiming it: a computer's turn runs only on the one that runs its thread. */
|
|
26
|
+
readonly computerId?: string;
|
|
27
|
+
readonly fetch?: (request: Request) => Promise<Response>;
|
|
28
|
+
}): Promise<AgentRunSession<ConversationAgentRunRecord> | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Claim a child of a turn this runner runs, with the turn's runner token: the runner runs its
|
|
31
|
+
* turns' children itself. Null when the child ended or another runner holds it.
|
|
32
|
+
*/
|
|
33
|
+
export declare function claimAgentRunChildOverHttp(turn: HttpAgentRunSessionInput<ConversationAgentRunRecord>, input: {
|
|
34
|
+
readonly childRunId: string;
|
|
35
|
+
readonly leaseExpiresAt: string;
|
|
36
|
+
}): Promise<AgentRunSession<SubagentRunRecord> | null>;
|
|
37
|
+
//# sourceMappingURL=run-session-http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-session-http.d.ts","sourceRoot":"","sources":["../../src/agents/run-session-http.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,0BAA0B,EAC1B,iBAAiB,EAClB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAkBpD,MAAM,WAAW,wBAAwB,CAAC,IAAI,SAAS,cAAc;IACnE,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,wEAAwE;IACxE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,oCAAoC;IACpC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAA;IAClB,4CAA4C;IAC5C,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CACzD;AAED,wBAAgB,yBAAyB,CAAC,IAAI,SAAS,cAAc,EACnE,KAAK,EAAE,wBAAwB,CAAC,IAAI,CAAC,GACpC,eAAe,CAAC,IAAI,CAAC,CAgLvB;AAQD;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,6FAA6F;IAC7F,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CACzD,GAAG,OAAO,CAAC,eAAe,CAAC,0BAA0B,CAAC,GAAG,IAAI,CAAC,CAc9D;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,wBAAwB,CAAC,0BAA0B,CAAC,EAC1D,KAAK,EAAE;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GACtE,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,CAqBpD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AgentRunRecord } from "../storage/agents";
|
|
2
|
+
import { type AgentRunSessionHost } from "./run-session";
|
|
3
|
+
/**
|
|
4
|
+
* Answer a request a runner sends its run's session. Returns null for a path that is none of the
|
|
5
|
+
* session's, for the host to route as it would.
|
|
6
|
+
*/
|
|
7
|
+
export declare function serveAgentRunSession(host: AgentRunSessionHost, request: Request): Promise<Response | null>;
|
|
8
|
+
/**
|
|
9
|
+
* Claim a queued run for a runner that reaches it over HTTP: the caller decides who may. Returns
|
|
10
|
+
* the claimed run and the runner token its runner sends with every session request, or null when
|
|
11
|
+
* the run ended or another runner holds it. The run token its commands get comes from the run's
|
|
12
|
+
* execution token, as the worker's does.
|
|
13
|
+
*
|
|
14
|
+
* A running run is never taken over: it already streamed and billed what it did. Once its lease
|
|
15
|
+
* lapsed, it ends interrupted here, as the lapsed-run sweep would end it, and the claim is refused.
|
|
16
|
+
*/
|
|
17
|
+
export declare function claimAgentRunForRunner(host: AgentRunSessionHost, input: {
|
|
18
|
+
readonly run: AgentRunRecord;
|
|
19
|
+
readonly leaseExpiresAt: string;
|
|
20
|
+
}): Promise<{
|
|
21
|
+
readonly run: AgentRunRecord;
|
|
22
|
+
readonly runnerToken: string;
|
|
23
|
+
} | null>;
|
|
24
|
+
//# sourceMappingURL=run-session-serve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-session-serve.d.ts","sourceRoot":"","sources":["../../src/agents/run-session-serve.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGvD,OAAO,EAEL,KAAK,mBAAmB,EAGzB,MAAM,eAAe,CAAA;AAkGtB;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,mBAAmB,EACzB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAuB1B;AAuDD;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GACvE,OAAO,CAAC;IAAE,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CA6BhF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Set on every answer of a run's session once a Stop is recorded on the run. */
|
|
2
|
+
export declare const AGENT_RUN_STOPPED_HEADER = "x-sixb-agent-run-stopped";
|
|
3
|
+
/** Where a runner reaches its run's session. */
|
|
4
|
+
export declare function agentRunSessionPath(runId: string, operation: string): string;
|
|
5
|
+
/** The run and operation a session request names, or null for a path that is not one. */
|
|
6
|
+
export declare function parseAgentRunSessionPath(pathname: string): {
|
|
7
|
+
readonly runId: string;
|
|
8
|
+
readonly operation: string;
|
|
9
|
+
} | null;
|
|
10
|
+
/** JSON that keeps dates, bytes and maps. */
|
|
11
|
+
export declare function encodeWireValue(value: unknown): string;
|
|
12
|
+
export declare function decodeWireValue(text: string): unknown;
|
|
13
|
+
/** An error as it crosses: its kind, and what rebuilding it needs. */
|
|
14
|
+
export interface WireError {
|
|
15
|
+
readonly kind: string;
|
|
16
|
+
readonly message: string;
|
|
17
|
+
readonly code?: string;
|
|
18
|
+
readonly runId?: string;
|
|
19
|
+
readonly toolName?: string;
|
|
20
|
+
readonly reason?: string;
|
|
21
|
+
readonly executionId?: string;
|
|
22
|
+
readonly callId?: string;
|
|
23
|
+
readonly recoveryScheduled?: boolean;
|
|
24
|
+
readonly details?: unknown;
|
|
25
|
+
readonly latest?: unknown;
|
|
26
|
+
}
|
|
27
|
+
export declare function encodeWireError(error: unknown): WireError;
|
|
28
|
+
/** The HTTP status an error answers with. */
|
|
29
|
+
export declare function wireErrorStatus(error: WireError): number;
|
|
30
|
+
export declare function decodeWireError(error: WireError): Error;
|
|
31
|
+
//# sourceMappingURL=run-session-wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-session-wire.d.ts","sourceRoot":"","sources":["../../src/agents/run-session-wire.ts"],"names":[],"mappings":"AAaA,iFAAiF;AACjF,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAElE,gDAAgD;AAChD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED,yFAAyF;AACzF,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,GACf;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI/D;AAID,6CAA6C;AAC7C,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAWtD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOrD;AAWD,sEAAsE;AACtE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ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