@sixb/core 0.1.6 → 0.1.7
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 +37 -33
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/worker.js +3 -3
- package/dist/agents/adapters.d.ts +33 -76
- package/dist/agents/adapters.d.ts.map +1 -1
- package/dist/agents/authority.d.ts +22 -6
- package/dist/agents/authority.d.ts.map +1 -1
- package/dist/agents/builders.d.ts +3 -11
- package/dist/agents/builders.d.ts.map +1 -1
- package/dist/agents/context.js +2 -2
- package/dist/agents/dispatch.d.ts +9 -1
- package/dist/agents/dispatch.d.ts.map +1 -1
- package/dist/agents/errors.d.ts +2 -2
- package/dist/agents/errors.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +9 -10
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/ids.d.ts +4 -0
- package/dist/agents/ids.d.ts.map +1 -1
- package/dist/agents/index.d.ts +13 -9
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +80 -68
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/message.d.ts +17 -10
- package/dist/agents/message.d.ts.map +1 -1
- package/dist/agents/model-loop.d.ts +56 -0
- package/dist/agents/model-loop.d.ts.map +1 -0
- package/dist/agents/reference.d.ts +4 -0
- package/dist/agents/reference.d.ts.map +1 -0
- package/dist/agents/request.d.ts +10 -8
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/retired-config.d.ts +4 -0
- package/dist/agents/retired-config.d.ts.map +1 -0
- package/dist/agents/streams.d.ts +13 -8
- package/dist/agents/streams.d.ts.map +1 -1
- package/dist/agents/streams.js +7 -5
- package/dist/agents/streams.js.map +1 -1
- package/dist/agents/tool-catalog.d.ts +9 -0
- package/dist/agents/tool-catalog.d.ts.map +1 -0
- package/dist/agents/tool-definition.d.ts +1 -0
- package/dist/agents/tool-definition.d.ts.map +1 -1
- package/dist/agents/types.d.ts +31 -68
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/validation.d.ts +4 -10
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/ai-usage/execution.d.ts +53 -0
- package/dist/ai-usage/execution.d.ts.map +1 -0
- package/dist/ai-usage/index.d.ts +3 -0
- package/dist/ai-usage/index.d.ts.map +1 -0
- package/dist/auth/index.js +7 -7
- package/dist/authorization/decision.d.ts +5 -2
- package/dist/authorization/decision.d.ts.map +1 -1
- package/dist/authorization/grant-kinds.d.ts +24 -8
- package/dist/authorization/grant-kinds.d.ts.map +1 -1
- package/dist/authorization/index.d.ts +1 -1
- package/dist/authorization/index.d.ts.map +1 -1
- package/dist/authorization/index.js +8 -6
- package/dist/authorization/index.js.map +1 -1
- package/dist/authorization/resolve.d.ts +3 -3
- package/dist/authorization/resolve.d.ts.map +1 -1
- package/dist/authorization/types.d.ts +7 -5
- package/dist/authorization/types.d.ts.map +1 -1
- package/dist/blob-storage/browser.js +2 -2
- package/dist/blob-storage/index.js +3 -3
- package/dist/bootstrap/discovery.d.ts +1 -7
- package/dist/bootstrap/discovery.d.ts.map +1 -1
- package/dist/bootstrap/index.js +52 -48
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/broker/index.js +2 -2
- package/dist/{chunk-zqysyfjt.js → chunk-08m3b6w8.js} +1 -1
- package/dist/{chunk-1g8negke.js → chunk-08twe8m6.js} +93 -8
- package/dist/chunk-08twe8m6.js.map +12 -0
- package/dist/{chunk-xkthy56g.js → chunk-1kamz6j0.js} +1 -1
- package/dist/{chunk-dy311asx.js → chunk-2b5qtban.js} +12 -12
- package/dist/{chunk-dy311asx.js.map → chunk-2b5qtban.js.map} +3 -3
- package/dist/{chunk-0172wgm9.js → chunk-2xns679x.js} +10 -2
- package/dist/{chunk-0172wgm9.js.map → chunk-2xns679x.js.map} +3 -3
- package/dist/{chunk-f83ka50g.js → chunk-37wk412q.js} +86 -28
- package/dist/{chunk-f83ka50g.js.map → chunk-37wk412q.js.map} +8 -8
- package/dist/{chunk-md8k0r54.js → chunk-3fqt22c4.js} +4 -4
- package/dist/{chunk-t9xghkva.js → chunk-3kv70xwp.js} +3 -2
- package/dist/{chunk-t9xghkva.js.map → chunk-3kv70xwp.js.map} +3 -3
- package/dist/{chunk-z3zp0bj1.js → chunk-407j3msh.js} +1 -1
- package/dist/{chunk-rhrbz7d4.js → chunk-4a849fr1.js} +1 -1
- package/dist/{chunk-62c7t4jc.js → chunk-4nxeacx7.js} +1 -1
- package/dist/{chunk-cy0n5dms.js → chunk-5jcdmjam.js} +1 -1
- package/dist/{chunk-819wnjz8.js → chunk-64sr682n.js} +7 -7
- package/dist/{chunk-t624af60.js → chunk-6ed5bwnd.js} +646 -67
- package/dist/{chunk-t624af60.js.map → chunk-6ed5bwnd.js.map} +10 -9
- package/dist/{chunk-x2yw73hy.js → chunk-7ds9620f.js} +1 -1
- package/dist/{chunk-dm72y8wt.js → chunk-7y0f6rf1.js} +29 -16
- package/dist/chunk-7y0f6rf1.js.map +10 -0
- package/dist/{chunk-72q2y8hn.js → chunk-8tsf6dmc.js} +2 -2
- package/dist/{chunk-nkbfrt0c.js → chunk-9aehf39w.js} +7 -7
- package/dist/{chunk-ezake7g1.js → chunk-agsvg9ar.js} +1 -1
- package/dist/{chunk-rdeagz6b.js → chunk-atmkaf60.js} +1 -1
- package/dist/{chunk-rdeagz6b.js.map → chunk-atmkaf60.js.map} +2 -2
- package/dist/chunk-c15dr03f.js +43 -0
- package/dist/chunk-c15dr03f.js.map +10 -0
- package/dist/{chunk-0hc5j867.js → chunk-d2ndstdf.js} +8 -6
- package/dist/{chunk-0hc5j867.js.map → chunk-d2ndstdf.js.map} +2 -2
- package/dist/{chunk-rnshztfq.js → chunk-d63tybny.js} +2 -2
- package/dist/{chunk-t0jjkep3.js → chunk-d8qkxt2v.js} +4 -2
- package/dist/chunk-d8qkxt2v.js.map +10 -0
- package/dist/{chunk-vybf6pkp.js → chunk-dbc80ad7.js} +1 -1
- package/dist/{chunk-4gz41why.js → chunk-dqn23610.js} +1 -1
- package/dist/{chunk-5sxb1168.js → chunk-e4rvtvpw.js} +13 -11
- package/dist/{chunk-5sxb1168.js.map → chunk-e4rvtvpw.js.map} +2 -2
- package/dist/{chunk-h9kxd41f.js → chunk-gbrpsx4m.js} +19 -6
- package/dist/chunk-gbrpsx4m.js.map +11 -0
- package/dist/{chunk-nva1xkjz.js → chunk-h0knpbz5.js} +468 -1236
- package/dist/chunk-h0knpbz5.js.map +38 -0
- package/dist/{chunk-tg5mee00.js → chunk-ha58tjtt.js} +6 -6
- package/dist/{chunk-f6erf2vv.js → chunk-hdz94br2.js} +2 -2
- package/dist/chunk-jecn6t54.js +307 -0
- package/dist/chunk-jecn6t54.js.map +12 -0
- package/dist/{chunk-dsrkgtnh.js → chunk-jq43kdvk.js} +1 -1
- package/dist/{chunk-wtmzkcht.js → chunk-k34z5rvh.js} +1 -1
- package/dist/{chunk-htq0qh7z.js → chunk-ka3a2ft3.js} +2 -2
- package/dist/{chunk-znagycq7.js → chunk-kt81c11h.js} +2 -2
- package/dist/chunk-n2arzn6e.js +1745 -0
- package/dist/chunk-n2arzn6e.js.map +20 -0
- package/dist/{chunk-f2rt4vkh.js → chunk-n2w475r0.js} +3 -3
- package/dist/{chunk-t8t39h7v.js → chunk-n6jxh8sw.js} +10 -2
- package/dist/chunk-n6jxh8sw.js.map +10 -0
- package/dist/{chunk-drjqm1aa.js → chunk-p03r0h5s.js} +310 -28
- package/dist/chunk-p03r0h5s.js.map +16 -0
- package/dist/chunk-p2vqaxkc.js +528 -0
- package/dist/chunk-p2vqaxkc.js.map +15 -0
- package/dist/{chunk-n4spznws.js → chunk-qjycjdj6.js} +84 -11
- package/dist/chunk-qjycjdj6.js.map +12 -0
- package/dist/chunk-qjzp9xyb.js +286 -0
- package/dist/chunk-qjzp9xyb.js.map +12 -0
- package/dist/{chunk-5gynx4xn.js → chunk-qv38twt8.js} +50 -69
- package/dist/{chunk-5gynx4xn.js.map → chunk-qv38twt8.js.map} +8 -8
- package/dist/{chunk-bhxaq2nn.js → chunk-qw9gvjv5.js} +1 -1
- package/dist/{chunk-8gv5z0zm.js → chunk-rp1mvzb4.js} +6 -6
- package/dist/{chunk-1e8m6yn3.js → chunk-rre42skh.js} +182 -18
- package/dist/chunk-rre42skh.js.map +39 -0
- package/dist/{chunk-ghteq96b.js → chunk-s5y30bc9.js} +2 -2
- package/dist/{chunk-a31h57d5.js → chunk-tn7xcs2n.js} +2 -2
- package/dist/{chunk-6gjqgd3d.js → chunk-tpnd31c1.js} +2 -1
- package/dist/chunk-tpnd31c1.js.map +11 -0
- package/dist/chunk-trxxmgnf.js +68 -0
- package/dist/chunk-trxxmgnf.js.map +11 -0
- package/dist/{chunk-e42bc6m3.js → chunk-vjjv9mrb.js} +2 -2
- package/dist/{chunk-8b55ygje.js → chunk-w3e09qqk.js} +1 -1
- package/dist/{chunk-ckxfnx7f.js → chunk-wjgm6jjt.js} +2 -2
- package/dist/{chunk-3j7573mj.js → chunk-x0qhkqje.js} +2 -2
- package/dist/{chunk-dysw7nsm.js → chunk-xdpwpkha.js} +2 -2
- package/dist/{chunk-a44d5zgd.js → chunk-y35ma3mj.js} +11 -16
- package/dist/{chunk-a44d5zgd.js.map → chunk-y35ma3mj.js.map} +3 -4
- package/dist/{chunk-qewtks41.js → chunk-z2sery1b.js} +64 -1
- package/dist/{chunk-qewtks41.js.map → chunk-z2sery1b.js.map} +3 -3
- package/dist/error-reporting/internal.js +4 -4
- package/dist/error-reporting/types.d.ts +7 -2
- package/dist/error-reporting/types.d.ts.map +1 -1
- package/dist/errors/catalog.d.ts +8 -0
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/errors/internal.js +2 -2
- package/dist/events/index.js +4 -4
- package/dist/execution/agent.d.ts +18 -9
- package/dist/execution/agent.d.ts.map +1 -1
- package/dist/execution/agent.js +52 -43
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorization.d.ts +14 -4
- package/dist/execution/authorization.d.ts.map +1 -1
- package/dist/execution/primitive.js +45 -43
- package/dist/execution/primitive.js.map +2 -2
- package/dist/execution/request.d.ts +3 -1
- package/dist/execution/request.d.ts.map +1 -1
- package/dist/execution/request.js +46 -44
- package/dist/execution/request.js.map +3 -3
- package/dist/execution/types.d.ts +1 -1
- package/dist/execution/types.d.ts.map +1 -1
- package/dist/http/api-routes.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +82 -77
- package/dist/index.js.map +1 -1
- package/dist/json.d.ts +2 -0
- package/dist/json.d.ts.map +1 -1
- package/dist/lake-storage/index.js +5 -5
- package/dist/logging/index.js +3 -3
- package/dist/logging/types.js +2 -2
- package/dist/materialization/index.js +2 -2
- package/dist/materializer/index.js +33 -29
- package/dist/materializer/index.js.map +1 -1
- package/dist/models/catalog.d.ts +40 -0
- package/dist/models/catalog.d.ts.map +1 -0
- package/dist/models/definitions.d.ts +25 -0
- package/dist/models/definitions.d.ts.map +1 -0
- package/dist/models/errors.d.ts +52 -0
- package/dist/models/errors.d.ts.map +1 -0
- package/dist/models/events.d.ts +192 -0
- package/dist/models/events.d.ts.map +1 -0
- package/dist/models/index.d.ts +17 -39
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +50 -0
- package/dist/models/index.js.map +9 -0
- package/dist/models/language-model.d.ts +90 -0
- package/dist/models/language-model.d.ts.map +1 -0
- package/dist/models/messages.d.ts +74 -0
- package/dist/models/messages.d.ts.map +1 -0
- package/dist/models/pricing.d.ts +69 -0
- package/dist/models/pricing.d.ts.map +1 -0
- package/dist/models/rate-card.d.ts +24 -0
- package/dist/models/rate-card.d.ts.map +1 -0
- package/dist/models/tools.d.ts +24 -0
- package/dist/models/tools.d.ts.map +1 -0
- package/dist/objects/index.js +38 -34
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/query/index.js +32 -28
- package/dist/objects/query/index.js.map +1 -1
- package/dist/ontology/index.js +5 -5
- package/dist/ontology/internal.js +4 -4
- package/dist/pipelines/index.js +37 -35
- package/dist/pipelines/index.js.map +1 -1
- package/dist/projections/internal.js +35 -31
- package/dist/projections/internal.js.map +1 -1
- package/dist/queues/in-memory.d.ts +3 -2
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/queues/index.d.ts +3 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/index.js +1 -1
- package/dist/queues/types.d.ts +15 -3
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/create.d.ts +4 -4
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/definitions.d.ts +2 -2
- package/dist/runtime/definitions.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +3 -2
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/resolve-definitions.d.ts +2 -2
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/runtime/sixb.d.ts +4 -2
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/security/every.d.ts +1 -4
- package/dist/security/every.d.ts.map +1 -1
- package/dist/security/grants.d.ts +6 -5
- package/dist/security/grants.d.ts.map +1 -1
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/registry.d.ts +1 -1
- package/dist/security/registry.d.ts.map +1 -1
- package/dist/security/types.d.ts +13 -5
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/validation.d.ts +4 -2
- package/dist/security/validation.d.ts.map +1 -1
- package/dist/storage/action-runs/failure.js +3 -3
- package/dist/storage/action-runs/provider.js +2 -2
- package/dist/storage/agents/errors.d.ts +1 -1
- package/dist/storage/agents/errors.d.ts.map +1 -1
- package/dist/storage/agents/in-memory.d.ts +3 -2
- 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 +11 -4
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +18 -15
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +65 -17
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/analytics.d.ts +2 -1
- package/dist/storage/ai-cost/analytics.d.ts.map +1 -1
- package/dist/storage/ai-cost/codec.d.ts +3 -2
- package/dist/storage/ai-cost/codec.d.ts.map +1 -1
- package/dist/storage/ai-cost/groups.d.ts +51 -0
- package/dist/storage/ai-cost/groups.d.ts.map +1 -0
- package/dist/storage/ai-cost/in-memory.d.ts +11 -1
- package/dist/storage/ai-cost/in-memory.d.ts.map +1 -1
- package/dist/storage/ai-cost/index.d.ts +1 -1
- package/dist/storage/ai-cost/index.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.d.ts +2 -0
- package/dist/storage/ai-cost/provider.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +29 -13
- package/dist/storage/ai-cost/provider.js.map +3 -3
- package/dist/storage/ai-cost/types.d.ts +64 -15
- package/dist/storage/ai-cost/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/validation.d.ts +2 -1
- package/dist/storage/ai-cost/validation.d.ts.map +1 -1
- package/dist/storage/ai-limits/enforcement.d.ts +14 -0
- package/dist/storage/ai-limits/enforcement.d.ts.map +1 -0
- package/dist/storage/ai-limits/enforcement.js +21 -0
- package/dist/storage/ai-limits/enforcement.js.map +9 -0
- package/dist/storage/ai-limits/errors.d.ts +8 -0
- package/dist/storage/ai-limits/errors.d.ts.map +1 -0
- package/dist/storage/ai-limits/in-memory.d.ts +78 -0
- package/dist/storage/ai-limits/in-memory.d.ts.map +1 -0
- package/dist/storage/ai-limits/index.d.ts +7 -0
- package/dist/storage/ai-limits/index.d.ts.map +1 -0
- package/dist/storage/ai-limits/period.d.ts +4 -0
- package/dist/storage/ai-limits/period.d.ts.map +1 -0
- package/dist/storage/ai-limits/provider.d.ts +85 -0
- package/dist/storage/ai-limits/provider.d.ts.map +1 -0
- package/dist/storage/ai-limits/provider.js +62 -0
- package/dist/storage/ai-limits/provider.js.map +9 -0
- package/dist/storage/ai-limits/types.d.ts +175 -0
- package/dist/storage/ai-limits/types.d.ts.map +1 -0
- package/dist/storage/ai-usage/in-memory.d.ts +4 -0
- package/dist/storage/ai-usage/in-memory.d.ts.map +1 -1
- package/dist/storage/ai-usage/record.d.ts.map +1 -1
- package/dist/storage/ai-usage/types.d.ts +6 -2
- package/dist/storage/ai-usage/types.d.ts.map +1 -1
- package/dist/storage/auth/errors.d.ts +1 -1
- package/dist/storage/auth/errors.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts +4 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/device-authorizations.d.ts +29 -0
- package/dist/storage/auth/in-memory/device-authorizations.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/shared.d.ts +3 -1
- package/dist/storage/auth/in-memory/shared.d.ts.map +1 -1
- package/dist/storage/auth/index.d.ts +2 -1
- package/dist/storage/auth/index.d.ts.map +1 -1
- package/dist/storage/auth/types.d.ts +66 -0
- package/dist/storage/auth/types.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.js +2 -2
- package/dist/storage/executions/provider.js +1 -1
- package/dist/storage/executions/run-link.d.ts +7 -2
- package/dist/storage/executions/run-link.d.ts.map +1 -1
- package/dist/storage/executions/validation.d.ts.map +1 -1
- package/dist/storage/in-memory/index.d.ts +4 -0
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +7 -4
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +51 -38
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/ontology/provider.js +3 -3
- package/dist/storage/pipeline-runs/provider.js +2 -2
- package/dist/storage/projection-runs/provider.js +4 -4
- package/dist/storage/sync-runs/provider.js +2 -2
- package/dist/storage/types.d.ts +5 -1
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/webhook-runs/provider.js +2 -2
- package/dist/storage/workflow-runs/provider.d.ts +1 -1
- package/dist/storage/workflow-runs/provider.js +10 -11
- package/dist/storage/workflow-runs/provider.js.map +1 -1
- package/dist/storage/workflow-runs/types.d.ts +5 -4
- package/dist/storage/workflow-runs/types.d.ts.map +1 -1
- package/dist/syncs/index.js +37 -35
- package/dist/syncs/index.js.map +1 -1
- package/dist/testing/agent-execution.d.ts +3 -1
- package/dist/testing/agent-execution.d.ts.map +1 -1
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-cost-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-limit-storage-contract.d.ts +18 -0
- package/dist/testing/ai-limit-storage-contract.d.ts.map +1 -0
- package/dist/testing/ai-model-call-groups-contract.d.ts +6 -0
- package/dist/testing/ai-model-call-groups-contract.d.ts.map +1 -0
- package/dist/testing/ai-usage-storage-contract.d.ts.map +1 -1
- package/dist/testing/auth-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 +3637 -1962
- package/dist/testing/index.js.map +14 -12
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/webhooks/internal.js +32 -28
- package/dist/webhooks/internal.js.map +2 -2
- package/dist/workers/index.js +2 -2
- package/dist/workflows/agent-step-identity.d.ts +3 -0
- package/dist/workflows/agent-step-identity.d.ts.map +1 -0
- package/dist/workflows/builders.d.ts +2 -3
- package/dist/workflows/builders.d.ts.map +1 -1
- package/dist/workflows/execution.d.ts +1 -1
- package/dist/workflows/execution.d.ts.map +1 -1
- package/dist/workflows/failure.d.ts +1 -1
- package/dist/workflows/failure.d.ts.map +1 -1
- package/dist/workflows/index.d.ts +3 -2
- package/dist/workflows/index.d.ts.map +1 -1
- package/dist/workflows/index.js +53 -45
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/types.d.ts +26 -11
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/validation.d.ts +7 -1
- package/dist/workflows/validation.d.ts.map +1 -1
- package/package.json +19 -4
- package/src/agents/adapters.ts +109 -115
- package/src/agents/authority.ts +214 -32
- package/src/agents/builders.ts +3 -50
- package/src/agents/context-compaction.ts +4 -0
- package/src/agents/dispatch.ts +59 -2
- package/src/agents/errors.ts +5 -2
- package/src/agents/execution.ts +53 -52
- package/src/agents/ids.ts +16 -1
- package/src/agents/index.ts +23 -11
- package/src/agents/message.ts +18 -9
- package/src/agents/model-loop.ts +1023 -0
- package/src/agents/reference.ts +7 -0
- package/src/agents/request.ts +141 -74
- package/src/agents/retired-config.ts +20 -0
- package/src/agents/streams.ts +45 -19
- package/src/agents/tool-catalog.ts +21 -0
- package/src/agents/tool-definition.ts +23 -0
- package/src/agents/types.ts +39 -81
- package/src/agents/validation.ts +34 -180
- package/src/ai-usage/execution.ts +196 -0
- package/src/ai-usage/index.ts +15 -0
- package/src/authorization/decision.ts +27 -10
- package/src/authorization/grant-kinds.ts +62 -15
- package/src/authorization/index.ts +1 -0
- package/src/authorization/resolve.ts +12 -5
- package/src/authorization/types.ts +7 -5
- package/src/bootstrap/discovery.ts +0 -3
- package/src/error-reporting/types.ts +4 -2
- package/src/errors/catalog.ts +8 -0
- package/src/execution/agent.ts +129 -22
- package/src/execution/authorization.ts +48 -18
- package/src/execution/request.ts +4 -1
- package/src/execution/types.ts +1 -1
- package/src/http/api-routes.ts +63 -0
- package/src/index.ts +36 -7
- package/src/json.ts +9 -0
- package/src/models/catalog.ts +137 -0
- package/src/models/definitions.ts +202 -0
- package/src/models/errors.ts +83 -0
- package/src/models/events.ts +198 -0
- package/src/models/index.ts +89 -71
- package/src/models/language-model.ts +143 -0
- package/src/models/messages.ts +78 -0
- package/src/models/pricing.ts +390 -0
- package/src/models/rate-card.ts +101 -0
- package/src/models/tools.ts +29 -0
- package/src/queues/in-memory.ts +5 -0
- package/src/queues/index.ts +11 -0
- package/src/queues/types.ts +20 -3
- package/src/runtime/create.ts +7 -5
- package/src/runtime/definitions.ts +2 -2
- package/src/runtime/host.ts +3 -2
- package/src/runtime/resolve-definitions.ts +13 -36
- package/src/runtime/sixb.ts +6 -8
- package/src/security/every.ts +0 -4
- package/src/security/grants.ts +55 -11
- package/src/security/index.ts +2 -0
- package/src/security/registry.ts +6 -5
- package/src/security/types.ts +15 -4
- package/src/security/validation.ts +30 -9
- package/src/storage/agents/errors.ts +1 -0
- package/src/storage/agents/in-memory.ts +121 -11
- package/src/storage/agents/index.ts +7 -0
- package/src/storage/agents/provider.ts +150 -6
- package/src/storage/agents/types.ts +73 -16
- package/src/storage/ai-cost/analytics.ts +63 -6
- package/src/storage/ai-cost/codec.ts +37 -12
- package/src/storage/ai-cost/groups.ts +248 -0
- package/src/storage/ai-cost/in-memory.ts +42 -0
- package/src/storage/ai-cost/index.ts +6 -0
- package/src/storage/ai-cost/provider.ts +7 -0
- package/src/storage/ai-cost/types.ts +76 -14
- package/src/storage/ai-cost/validation.ts +147 -17
- package/src/storage/ai-limits/enforcement.ts +68 -0
- package/src/storage/ai-limits/errors.ts +23 -0
- package/src/storage/ai-limits/in-memory.ts +671 -0
- package/src/storage/ai-limits/index.ts +31 -0
- package/src/storage/ai-limits/period.ts +11 -0
- package/src/storage/ai-limits/provider.ts +430 -0
- package/src/storage/ai-limits/types.ts +195 -0
- package/src/storage/ai-usage/in-memory.ts +13 -0
- package/src/storage/ai-usage/record.ts +17 -0
- package/src/storage/ai-usage/types.ts +6 -2
- package/src/storage/auth/errors.ts +6 -0
- package/src/storage/auth/in-memory/auth-storage.ts +69 -0
- package/src/storage/auth/in-memory/device-authorizations.ts +145 -0
- package/src/storage/auth/in-memory/shared.ts +7 -0
- package/src/storage/auth/index.ts +7 -0
- package/src/storage/auth/types.ts +73 -0
- package/src/storage/executions/run-link.ts +16 -6
- package/src/storage/executions/validation.ts +36 -6
- package/src/storage/in-memory/index.ts +48 -4
- package/src/storage/index.ts +51 -1
- package/src/storage/types.ts +37 -0
- package/src/storage/workflow-runs/in-memory.ts +3 -3
- package/src/storage/workflow-runs/provider.ts +2 -2
- package/src/storage/workflow-runs/types.ts +6 -3
- package/src/testing/agent-execution.ts +40 -28
- package/src/testing/agent-storage-contract.ts +249 -28
- package/src/testing/ai-cost-storage-contract.ts +96 -8
- package/src/testing/ai-limit-storage-contract.ts +1134 -0
- package/src/testing/ai-model-call-groups-contract.ts +353 -0
- package/src/testing/ai-usage-storage-contract.ts +31 -0
- package/src/testing/auth-storage-contract.ts +85 -0
- package/src/testing/execution-storage-contract.ts +2 -2
- package/src/testing/index.ts +10 -0
- package/src/testing/queues-contract.ts +36 -1
- package/src/workflows/agent-step-identity.ts +4 -0
- package/src/workflows/builders.ts +95 -9
- package/src/workflows/execution.ts +2 -2
- package/src/workflows/failure.ts +2 -2
- package/src/workflows/index.ts +3 -0
- package/src/workflows/types.ts +23 -11
- package/src/workflows/validation.ts +100 -7
- package/dist/chunk-1e8m6yn3.js.map +0 -37
- package/dist/chunk-1g8negke.js.map +0 -11
- package/dist/chunk-6gjqgd3d.js.map +0 -11
- package/dist/chunk-dm72y8wt.js.map +0 -10
- package/dist/chunk-drjqm1aa.js.map +0 -15
- package/dist/chunk-fe5ev6mr.js +0 -55
- package/dist/chunk-fe5ev6mr.js.map +0 -11
- package/dist/chunk-h9kxd41f.js.map +0 -11
- package/dist/chunk-hceck7dq.js +0 -137
- package/dist/chunk-hceck7dq.js.map +0 -10
- package/dist/chunk-n4spznws.js.map +0 -11
- package/dist/chunk-nva1xkjz.js.map +0 -46
- package/dist/chunk-t0jjkep3.js.map +0 -10
- package/dist/chunk-t8t39h7v.js.map +0 -10
- /package/dist/{chunk-zqysyfjt.js.map → chunk-08m3b6w8.js.map} +0 -0
- /package/dist/{chunk-xkthy56g.js.map → chunk-1kamz6j0.js.map} +0 -0
- /package/dist/{chunk-md8k0r54.js.map → chunk-3fqt22c4.js.map} +0 -0
- /package/dist/{chunk-z3zp0bj1.js.map → chunk-407j3msh.js.map} +0 -0
- /package/dist/{chunk-rhrbz7d4.js.map → chunk-4a849fr1.js.map} +0 -0
- /package/dist/{chunk-62c7t4jc.js.map → chunk-4nxeacx7.js.map} +0 -0
- /package/dist/{chunk-cy0n5dms.js.map → chunk-5jcdmjam.js.map} +0 -0
- /package/dist/{chunk-819wnjz8.js.map → chunk-64sr682n.js.map} +0 -0
- /package/dist/{chunk-x2yw73hy.js.map → chunk-7ds9620f.js.map} +0 -0
- /package/dist/{chunk-72q2y8hn.js.map → chunk-8tsf6dmc.js.map} +0 -0
- /package/dist/{chunk-nkbfrt0c.js.map → chunk-9aehf39w.js.map} +0 -0
- /package/dist/{chunk-ezake7g1.js.map → chunk-agsvg9ar.js.map} +0 -0
- /package/dist/{chunk-rnshztfq.js.map → chunk-d63tybny.js.map} +0 -0
- /package/dist/{chunk-vybf6pkp.js.map → chunk-dbc80ad7.js.map} +0 -0
- /package/dist/{chunk-4gz41why.js.map → chunk-dqn23610.js.map} +0 -0
- /package/dist/{chunk-tg5mee00.js.map → chunk-ha58tjtt.js.map} +0 -0
- /package/dist/{chunk-f6erf2vv.js.map → chunk-hdz94br2.js.map} +0 -0
- /package/dist/{chunk-dsrkgtnh.js.map → chunk-jq43kdvk.js.map} +0 -0
- /package/dist/{chunk-wtmzkcht.js.map → chunk-k34z5rvh.js.map} +0 -0
- /package/dist/{chunk-htq0qh7z.js.map → chunk-ka3a2ft3.js.map} +0 -0
- /package/dist/{chunk-znagycq7.js.map → chunk-kt81c11h.js.map} +0 -0
- /package/dist/{chunk-f2rt4vkh.js.map → chunk-n2w475r0.js.map} +0 -0
- /package/dist/{chunk-bhxaq2nn.js.map → chunk-qw9gvjv5.js.map} +0 -0
- /package/dist/{chunk-8gv5z0zm.js.map → chunk-rp1mvzb4.js.map} +0 -0
- /package/dist/{chunk-ghteq96b.js.map → chunk-s5y30bc9.js.map} +0 -0
- /package/dist/{chunk-a31h57d5.js.map → chunk-tn7xcs2n.js.map} +0 -0
- /package/dist/{chunk-e42bc6m3.js.map → chunk-vjjv9mrb.js.map} +0 -0
- /package/dist/{chunk-8b55ygje.js.map → chunk-w3e09qqk.js.map} +0 -0
- /package/dist/{chunk-ckxfnx7f.js.map → chunk-wjgm6jjt.js.map} +0 -0
- /package/dist/{chunk-3j7573mj.js.map → chunk-x0qhkqje.js.map} +0 -0
- /package/dist/{chunk-dysw7nsm.js.map → chunk-xdpwpkha.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
createFileRef,
|
|
9
9
|
readBlobBody,
|
|
10
10
|
streamBlobBody
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-w3e09qqk.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_SIMPLE_FILE_UPLOAD_BYTES,
|
|
14
14
|
fileNameFor
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
isFileRef,
|
|
21
21
|
supportsDirectUpload,
|
|
22
22
|
supportsRangeRead
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import"../chunk-
|
|
23
|
+
} from "../chunk-08m3b6w8.js";
|
|
24
|
+
import"../chunk-n6jxh8sw.js";
|
|
25
25
|
import"../chunk-y64skrwp.js";
|
|
26
26
|
export {
|
|
27
27
|
supportsRangeRead,
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* for the `Sixb` constructor.
|
|
7
7
|
*/
|
|
8
8
|
import { isActionDefinition } from "../actions";
|
|
9
|
-
import { isAgentDefinition } from "../agents";
|
|
10
9
|
import { isConnectorDefinition } from "../connectors";
|
|
11
10
|
import { isDatasetDefinition } from "../datasets";
|
|
12
11
|
import type { OntologySource } from "../ontology/registry";
|
|
@@ -18,7 +17,7 @@ import { isGroupDefinition, isMembershipPolicyDefinition, isRoleDefinition } fro
|
|
|
18
17
|
import { isSyncDefinition } from "../syncs";
|
|
19
18
|
import { isWorkflowDefinition } from "../workflows";
|
|
20
19
|
export declare function discoverOntologySources(projectRoot: string): Promise<readonly OntologySource[]>;
|
|
21
|
-
type DiscoveryModuleKind = "action" | "
|
|
20
|
+
type DiscoveryModuleKind = "action" | "connector" | "dataset" | "group" | "membershipPolicy" | "ontology" | "pipeline" | "projection" | "role" | "rule" | "schedule" | "sync" | "workflow";
|
|
22
21
|
interface DefinitionDiscoveryFamily<TDefinition> {
|
|
23
22
|
readonly directory: readonly string[];
|
|
24
23
|
readonly kind: Exclude<DiscoveryModuleKind, "ontology">;
|
|
@@ -85,11 +84,6 @@ declare const definitionDiscoveryRegistry: {
|
|
|
85
84
|
readonly kind: "membershipPolicy";
|
|
86
85
|
readonly isDefinition: typeof isMembershipPolicyDefinition;
|
|
87
86
|
};
|
|
88
|
-
readonly agents: {
|
|
89
|
-
readonly directory: readonly ["agents"];
|
|
90
|
-
readonly kind: "agent";
|
|
91
|
-
readonly isDefinition: typeof isAgentDefinition;
|
|
92
|
-
};
|
|
93
87
|
};
|
|
94
88
|
type DefinitionFromFamily<TFamily> = TFamily extends DefinitionDiscoveryFamily<infer TDefinition> ? TDefinition : never;
|
|
95
89
|
export type DiscoveredProjectDefinitions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/bootstrap/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/bootstrap/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAyB,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAGjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAA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B,CAC9C,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,4BAA4B,CAAC,CAWvC"}
|
package/dist/bootstrap/index.js
CHANGED
|
@@ -4,73 +4,77 @@ import {
|
|
|
4
4
|
discoverOntologyTypeManifest,
|
|
5
5
|
discoverProjectDefinitions,
|
|
6
6
|
generateOntologyTypeManifest
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import"../chunk-
|
|
9
|
-
import"../chunk-
|
|
10
|
-
import"../chunk-
|
|
7
|
+
} from "../chunk-2b5qtban.js";
|
|
8
|
+
import"../chunk-kt81c11h.js";
|
|
9
|
+
import"../chunk-qjycjdj6.js";
|
|
10
|
+
import"../chunk-vjjv9mrb.js";
|
|
11
11
|
import"../chunk-5sz8ta9r.js";
|
|
12
12
|
import"../chunk-979ww6b3.js";
|
|
13
13
|
import"../chunk-2ab72m2h.js";
|
|
14
|
-
import"../chunk-
|
|
14
|
+
import"../chunk-tn7xcs2n.js";
|
|
15
15
|
import"../chunk-74drx9gd.js";
|
|
16
16
|
import"../chunk-b49dgvsj.js";
|
|
17
|
-
import"../chunk-
|
|
18
|
-
import"../chunk-
|
|
19
|
-
import"../chunk-
|
|
20
|
-
import"../chunk-
|
|
17
|
+
import"../chunk-n2arzn6e.js";
|
|
18
|
+
import"../chunk-h0knpbz5.js";
|
|
19
|
+
import"../chunk-ha58tjtt.js";
|
|
20
|
+
import"../chunk-c15dr03f.js";
|
|
21
|
+
import"../chunk-rp1mvzb4.js";
|
|
22
|
+
import"../chunk-e4rvtvpw.js";
|
|
21
23
|
import"../chunk-4rh2m6zg.js";
|
|
22
24
|
import"../chunk-xhy826cz.js";
|
|
23
|
-
import"../chunk-
|
|
25
|
+
import"../chunk-3fqt22c4.js";
|
|
24
26
|
import"../chunk-rte5sm3z.js";
|
|
25
|
-
import"../chunk-
|
|
26
|
-
import"../chunk-8b55ygje.js";
|
|
27
|
-
import"../chunk-51fjndv0.js";
|
|
27
|
+
import"../chunk-z2sery1b.js";
|
|
28
28
|
import"../chunk-8m5ejdpn.js";
|
|
29
29
|
import"../chunk-nf4r78r4.js";
|
|
30
|
-
import"../chunk-
|
|
31
|
-
import"../chunk-
|
|
32
|
-
import"../chunk-
|
|
30
|
+
import"../chunk-d2ndstdf.js";
|
|
31
|
+
import"../chunk-y35ma3mj.js";
|
|
32
|
+
import"../chunk-9aehf39w.js";
|
|
33
33
|
import"../chunk-96swp2wd.js";
|
|
34
|
-
import"../chunk-
|
|
35
|
-
import"../chunk-
|
|
36
|
-
import"../chunk-
|
|
37
|
-
import"../chunk-
|
|
38
|
-
import"../chunk-
|
|
39
|
-
import"../chunk-dysw7nsm.js";
|
|
40
|
-
import"../chunk-62c7t4jc.js";
|
|
41
|
-
import"../chunk-ezake7g1.js";
|
|
42
|
-
import"../chunk-fe5ev6mr.js";
|
|
43
|
-
import"../chunk-htq0qh7z.js";
|
|
44
|
-
import"../chunk-xkthy56g.js";
|
|
45
|
-
import"../chunk-1g8negke.js";
|
|
46
|
-
import"../chunk-hceck7dq.js";
|
|
47
|
-
import"../chunk-t9xghkva.js";
|
|
48
|
-
import"../chunk-drjqm1aa.js";
|
|
34
|
+
import"../chunk-hdz94br2.js";
|
|
35
|
+
import"../chunk-6ed5bwnd.js";
|
|
36
|
+
import"../chunk-4nxeacx7.js";
|
|
37
|
+
import"../chunk-agsvg9ar.js";
|
|
38
|
+
import"../chunk-qjzp9xyb.js";
|
|
49
39
|
import"../chunk-5gd7tpv6.js";
|
|
50
|
-
import"../chunk-
|
|
40
|
+
import"../chunk-gbrpsx4m.js";
|
|
41
|
+
import"../chunk-8tsf6dmc.js";
|
|
42
|
+
import"../chunk-xc7hq65b.js";
|
|
43
|
+
import"../chunk-5jcdmjam.js";
|
|
44
|
+
import"../chunk-xdpwpkha.js";
|
|
45
|
+
import"../chunk-ka3a2ft3.js";
|
|
46
|
+
import"../chunk-1kamz6j0.js";
|
|
47
|
+
import"../chunk-08twe8m6.js";
|
|
48
|
+
import"../chunk-3kv70xwp.js";
|
|
49
|
+
import"../chunk-p03r0h5s.js";
|
|
50
|
+
import"../chunk-jecn6t54.js";
|
|
51
|
+
import"../chunk-x0qhkqje.js";
|
|
52
|
+
import"../chunk-dqn23610.js";
|
|
51
53
|
import"../chunk-9dzba0f2.js";
|
|
52
|
-
import"../chunk-
|
|
54
|
+
import"../chunk-dbc80ad7.js";
|
|
53
55
|
import"../chunk-ry24jbr1.js";
|
|
54
|
-
import"../chunk-
|
|
55
|
-
import"../chunk-
|
|
56
|
+
import"../chunk-p2vqaxkc.js";
|
|
57
|
+
import"../chunk-trxxmgnf.js";
|
|
56
58
|
import"../chunk-zcnhxkvd.js";
|
|
59
|
+
import"../chunk-w3e09qqk.js";
|
|
60
|
+
import"../chunk-51fjndv0.js";
|
|
57
61
|
import"../chunk-1evzqhks.js";
|
|
58
|
-
import"../chunk-
|
|
59
|
-
import"../chunk-
|
|
62
|
+
import"../chunk-jq43kdvk.js";
|
|
63
|
+
import"../chunk-qw9gvjv5.js";
|
|
60
64
|
import"../chunk-yt8wphsx.js";
|
|
61
|
-
import"../chunk-
|
|
62
|
-
import"../chunk-
|
|
63
|
-
import"../chunk-
|
|
64
|
-
import"../chunk-
|
|
65
|
-
import"../chunk-
|
|
65
|
+
import"../chunk-atmkaf60.js";
|
|
66
|
+
import"../chunk-7y0f6rf1.js";
|
|
67
|
+
import"../chunk-d8qkxt2v.js";
|
|
68
|
+
import"../chunk-rre42skh.js";
|
|
69
|
+
import"../chunk-4a849fr1.js";
|
|
66
70
|
import"../chunk-xwnf87e1.js";
|
|
67
|
-
import"../chunk-
|
|
68
|
-
import"../chunk-
|
|
71
|
+
import"../chunk-37wk412q.js";
|
|
72
|
+
import"../chunk-d63tybny.js";
|
|
69
73
|
import"../chunk-04b07a9q.js";
|
|
70
74
|
import"../chunk-dktq02ne.js";
|
|
71
|
-
import"../chunk-
|
|
72
|
-
import"../chunk-
|
|
73
|
-
import"../chunk-
|
|
75
|
+
import"../chunk-08m3b6w8.js";
|
|
76
|
+
import"../chunk-2xns679x.js";
|
|
77
|
+
import"../chunk-n6jxh8sw.js";
|
|
74
78
|
import"../chunk-y64skrwp.js";
|
|
75
79
|
export {
|
|
76
80
|
generateOntologyTypeManifest,
|
|
@@ -79,4 +83,4 @@ export {
|
|
|
79
83
|
discoverOntologySources
|
|
80
84
|
};
|
|
81
85
|
|
|
82
|
-
//# debugId=
|
|
86
|
+
//# debugId=0634F9D9427C543A64756E2164756E21
|
package/dist/broker/index.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
agentServiceAccountId
|
|
4
|
-
} from "./chunk-hceck7dq.js";
|
|
5
2
|
import {
|
|
6
3
|
findAgentRunExecution
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3kv70xwp.js";
|
|
5
|
+
import {
|
|
6
|
+
MODEL_REASONING_LEVELS,
|
|
7
|
+
isModelReasoning
|
|
8
|
+
} from "./chunk-trxxmgnf.js";
|
|
9
|
+
import {
|
|
10
|
+
isFileRef
|
|
11
|
+
} from "./chunk-08m3b6w8.js";
|
|
12
|
+
|
|
13
|
+
// src/storage/agents/provider.ts
|
|
14
|
+
import { isDeepStrictEqual } from "util";
|
|
15
|
+
|
|
16
|
+
// src/agents/types.ts
|
|
17
|
+
var AGENT_REASONING_LEVELS = MODEL_REASONING_LEVELS;
|
|
8
18
|
|
|
9
19
|
// src/storage/agents/errors.ts
|
|
10
20
|
class AgentStorageError extends Error {
|
|
@@ -17,17 +27,92 @@ class AgentStorageError extends Error {
|
|
|
17
27
|
}
|
|
18
28
|
|
|
19
29
|
// src/storage/agents/provider.ts
|
|
30
|
+
function assertConversationAgentRunSpec(spec, prefix = "Sixb") {
|
|
31
|
+
if (!isRecord(spec) || !isRecord(spec.model)) {
|
|
32
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Conversational Agent run spec must contain a model reference.`);
|
|
33
|
+
}
|
|
34
|
+
for (const [name, value] of [
|
|
35
|
+
["model.provider", spec.model.provider],
|
|
36
|
+
["model.modelId", spec.model.modelId]
|
|
37
|
+
]) {
|
|
38
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
39
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Conversational Agent run '${name}' must not be empty.`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (spec.reasoning !== undefined && !isModelReasoning(spec.reasoning)) {
|
|
43
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Conversational Agent reasoning must be one of: ${AGENT_REASONING_LEVELS.join(", ")}, or a nonnegative budgetTokens object.`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function isRecord(value) {
|
|
47
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
48
|
+
}
|
|
20
49
|
async function assertAgentRunExecution(input) {
|
|
21
50
|
const execution = await findAgentRunExecution({
|
|
22
51
|
executions: input.executions,
|
|
23
52
|
projectId: input.projectId,
|
|
24
53
|
executionId: input.executionId,
|
|
25
54
|
runId: input.runId,
|
|
26
|
-
|
|
55
|
+
authority: { type: "inherited" }
|
|
27
56
|
});
|
|
28
57
|
if (!execution) {
|
|
29
58
|
throw new AgentStorageError("invalid_input", `[Sixb] Execution '${input.executionId}' does not authorize Agent run '${input.runId}'.`);
|
|
30
59
|
}
|
|
60
|
+
return execution;
|
|
61
|
+
}
|
|
62
|
+
function assertCreateSubagentRunInput(input, prefix = "Sixb") {
|
|
63
|
+
for (const [name, value] of [
|
|
64
|
+
["id", input.id],
|
|
65
|
+
["projectId", input.projectId],
|
|
66
|
+
["executionId", input.executionId],
|
|
67
|
+
["parentRunId", input.parentRunId],
|
|
68
|
+
["parentExecutionToken", input.parentExecutionToken],
|
|
69
|
+
["spawnKey", input.spawnKey],
|
|
70
|
+
["model.provider", input.spec.model.provider],
|
|
71
|
+
["model.modelId", input.spec.model.modelId],
|
|
72
|
+
["task", input.spec.task]
|
|
73
|
+
]) {
|
|
74
|
+
if (value.trim().length === 0) {
|
|
75
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Subagent run '${name}' must not be empty.`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (input.spawnKey.length > 128) {
|
|
79
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Subagent spawn key must not exceed 128 characters.`);
|
|
80
|
+
}
|
|
81
|
+
for (const [name, value] of [
|
|
82
|
+
["maxActiveChildren", input.maxActiveChildren],
|
|
83
|
+
["spec.maxSteps", input.spec.maxSteps]
|
|
84
|
+
]) {
|
|
85
|
+
if (!Number.isSafeInteger(value) || value < 1) {
|
|
86
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Subagent run '${name}' must be a positive safe integer.`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (new Set(input.spec.toolNames).size !== input.spec.toolNames.length) {
|
|
90
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Subagent run tool names must be unique.`);
|
|
91
|
+
}
|
|
92
|
+
if (input.spec.reasoning !== undefined && !isModelReasoning(input.spec.reasoning)) {
|
|
93
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Subagent reasoning must be one of: ${AGENT_REASONING_LEVELS.join(", ")}, or a nonnegative budgetTokens object.`);
|
|
94
|
+
}
|
|
95
|
+
if (input.spec.toolNames.some((name) => !name.trim())) {
|
|
96
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Subagent run tool names must not be empty.`);
|
|
97
|
+
}
|
|
98
|
+
if (input.createdAt && !Number.isFinite(input.createdAt.getTime())) {
|
|
99
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Subagent run createdAt must be a valid date.`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function subagentRunMatchesCreateInput(run, input) {
|
|
103
|
+
return run.kind === "subagent" && run.id === input.id && run.projectId === input.projectId && run.executionId === input.executionId && run.parentRunId === input.parentRunId && run.spawnKey === input.spawnKey && isDeepStrictEqual(run.spec, input.spec);
|
|
104
|
+
}
|
|
105
|
+
function assertSubagentRunResult(result, runId, prefix = "Sixb") {
|
|
106
|
+
const text = result?.text;
|
|
107
|
+
const files = result?.files;
|
|
108
|
+
const hasText = typeof text === "string" && text.trim().length > 0;
|
|
109
|
+
const hasFiles = Array.isArray(files) && files.length > 0 && files.every(isFileRef);
|
|
110
|
+
if (!result || !hasText && !hasFiles) {
|
|
111
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Succeeded subagent run '${runId}' requires text or files.`);
|
|
112
|
+
}
|
|
113
|
+
if (text !== undefined && !hasText || files !== undefined && !hasFiles) {
|
|
114
|
+
throw new AgentStorageError("invalid_input", `[${prefix}] Subagent run '${runId}' has an invalid result.`);
|
|
115
|
+
}
|
|
31
116
|
}
|
|
32
117
|
function assertCreateAgentContextCheckpointInput(input, prefix = "Sixb") {
|
|
33
118
|
for (const [name, value] of [
|
|
@@ -82,7 +167,7 @@ function assertAgentContextCheckpointAuthority(input) {
|
|
|
82
167
|
if (!thread) {
|
|
83
168
|
throw new AgentStorageError("thread_not_found", `[${prefix}] Agent thread '${create.threadId}' not found for project '${create.projectId}'.`);
|
|
84
169
|
}
|
|
85
|
-
if (run.threadId !== create.threadId) {
|
|
170
|
+
if (run.kind !== "conversation" || run.threadId !== create.threadId) {
|
|
86
171
|
throw new AgentStorageError("invalid_input", `[${prefix}] Agent run '${run.id}' does not belong to thread '${create.threadId}'.`);
|
|
87
172
|
}
|
|
88
173
|
if (run.status !== "running") {
|
|
@@ -128,6 +213,6 @@ function agentContextCheckpointMatchesCreateInput(record, input) {
|
|
|
128
213
|
return record.id === input.id && record.projectId === input.projectId && record.threadId === input.threadId && record.createdByRunId === input.createdByRunId && (record.previousCheckpointId ?? null) === input.expectedPreviousCheckpointId && record.reason === input.reason && record.summary === input.summary && record.summaryFormatVersion === input.summaryFormatVersion && record.summarizedThroughSeq === input.summarizedThroughSeq && record.observedHeadSeq === input.observedHeadSeq && record.estimatedInputTokensBefore === input.estimatedInputTokensBefore && record.estimatedInputTokensAfter === input.estimatedInputTokensAfter && record.summaryModelId === input.summaryModelId;
|
|
129
214
|
}
|
|
130
215
|
|
|
131
|
-
export { AgentStorageError, assertAgentRunExecution, assertCreateAgentContextCheckpointInput, assertAgentContextCheckpointAuthority, assertAgentContextCheckpointAnchors, assertAgentContextCheckpointReplayState, agentContextCheckpointMatchesCreateInput };
|
|
216
|
+
export { AgentStorageError, AGENT_REASONING_LEVELS, assertConversationAgentRunSpec, assertAgentRunExecution, assertCreateSubagentRunInput, subagentRunMatchesCreateInput, assertSubagentRunResult, assertCreateAgentContextCheckpointInput, assertAgentContextCheckpointAuthority, assertAgentContextCheckpointAnchors, assertAgentContextCheckpointReplayState, agentContextCheckpointMatchesCreateInput };
|
|
132
217
|
|
|
133
|
-
//# debugId=
|
|
218
|
+
//# debugId=FCE91CC06B8ED83764756E2164756E21
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/storage/agents/provider.ts", "../src/agents/types.ts", "../src/storage/agents/errors.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { isDeepStrictEqual } from \"node:util\"\nimport { AGENT_REASONING_LEVELS } from \"../../agents/types\"\nimport { isFileRef } from \"../../blob-storage\"\nimport { isModelReasoning } from \"../../models/language-model\"\nimport type { ExecutionRecord, ExecutionStorage } from \"../executions\"\nimport { findAgentRunExecution } from \"../executions/run-link\"\nimport { AgentStorageError } from \"./errors\"\nimport type {\n AgentContextCheckpointRecord,\n AgentMessageRecord,\n AgentRunRecord,\n AgentThreadRecord,\n ConversationAgentRunSpec,\n CreateAgentContextCheckpointInput,\n CreateSubagentRunInput,\n SubagentRunRecord,\n SubagentRunResult,\n} from \"./types\"\n\n/** Validate the provider-neutral model selection captured for a conversational turn. */\nexport function assertConversationAgentRunSpec(\n spec: ConversationAgentRunSpec,\n prefix = \"Sixb\"\n): void {\n if (!isRecord(spec) || !isRecord(spec.model)) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Conversational Agent run spec must contain a model reference.`\n )\n }\n for (const [name, value] of [\n [\"model.provider\", spec.model.provider],\n [\"model.modelId\", spec.model.modelId],\n ] as const) {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Conversational Agent run '${name}' must not be empty.`\n )\n }\n }\n if (spec.reasoning !== undefined && !isModelReasoning(spec.reasoning)) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Conversational Agent reasoning must be one of: ${AGENT_REASONING_LEVELS.join(\", \")}, or a nonnegative budgetTokens object.`\n )\n }\n}\n\nfunction isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value)\n}\n\n/** Validate the semantic link between a conversational Agent run and its immutable execution. */\nexport async function assertAgentRunExecution(input: {\n readonly executions: ExecutionStorage\n readonly projectId: string\n readonly executionId: string\n readonly runId: string\n}): Promise<ExecutionRecord> {\n const execution = await findAgentRunExecution({\n executions: input.executions,\n projectId: input.projectId,\n executionId: input.executionId,\n runId: input.runId,\n authority: { type: \"inherited\" },\n })\n if (!execution) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[Sixb] Execution '${input.executionId}' does not authorize Agent run '${input.runId}'.`\n )\n }\n return execution\n}\n\n/** Validate the provider-neutral payload of an idempotent child admission. */\nexport function assertCreateSubagentRunInput(input: CreateSubagentRunInput, prefix = \"Sixb\"): void {\n for (const [name, value] of [\n [\"id\", input.id],\n [\"projectId\", input.projectId],\n [\"executionId\", input.executionId],\n [\"parentRunId\", input.parentRunId],\n [\"parentExecutionToken\", input.parentExecutionToken],\n [\"spawnKey\", input.spawnKey],\n [\"model.provider\", input.spec.model.provider],\n [\"model.modelId\", input.spec.model.modelId],\n [\"task\", input.spec.task],\n ] as const) {\n if (value.trim().length === 0) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run '${name}' must not be empty.`\n )\n }\n }\n if (input.spawnKey.length > 128) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent spawn key must not exceed 128 characters.`\n )\n }\n for (const [name, value] of [\n [\"maxActiveChildren\", input.maxActiveChildren],\n [\"spec.maxSteps\", input.spec.maxSteps],\n ] as const) {\n if (!Number.isSafeInteger(value) || value < 1) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run '${name}' must be a positive safe integer.`\n )\n }\n }\n if (new Set(input.spec.toolNames).size !== input.spec.toolNames.length) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run tool names must be unique.`\n )\n }\n if (input.spec.reasoning !== undefined && !isModelReasoning(input.spec.reasoning)) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent reasoning must be one of: ${AGENT_REASONING_LEVELS.join(\", \")}, or a nonnegative budgetTokens object.`\n )\n }\n if (input.spec.toolNames.some((name) => !name.trim())) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run tool names must not be empty.`\n )\n }\n if (input.createdAt && !Number.isFinite(input.createdAt.getTime())) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run createdAt must be a valid date.`\n )\n }\n}\n\n/** Exact semantic match required when a durable spawn key is replayed. */\nexport function subagentRunMatchesCreateInput(\n run: AgentRunRecord,\n input: CreateSubagentRunInput\n): run is SubagentRunRecord {\n return (\n run.kind === \"subagent\" &&\n run.id === input.id &&\n run.projectId === input.projectId &&\n run.executionId === input.executionId &&\n run.parentRunId === input.parentRunId &&\n run.spawnKey === input.spawnKey &&\n isDeepStrictEqual(run.spec, input.spec)\n )\n}\n\n/** Validate the small durable result returned by a successful child. */\nexport function assertSubagentRunResult(\n result: SubagentRunResult | undefined,\n runId: string,\n prefix = \"Sixb\"\n): asserts result is SubagentRunResult {\n const text = result?.text\n const files = result?.files\n const hasText = typeof text === \"string\" && text.trim().length > 0\n const hasFiles = Array.isArray(files) && files.length > 0 && files.every(isFileRef)\n if (!result || (!hasText && !hasFiles)) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Succeeded subagent run '${runId}' requires text or files.`\n )\n }\n if ((text !== undefined && !hasText) || (files !== undefined && !hasFiles)) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Subagent run '${runId}' has an invalid result.`\n )\n }\n}\n\n/** Validate provider-independent checkpoint fields before entering a storage critical section. */\nexport function assertCreateAgentContextCheckpointInput(\n input: CreateAgentContextCheckpointInput,\n prefix = \"Sixb\"\n): void {\n for (const [name, value] of [\n [\"id\", input.id],\n [\"projectId\", input.projectId],\n [\"threadId\", input.threadId],\n [\"createdByRunId\", input.createdByRunId],\n [\"executionToken\", input.executionToken],\n [\"summary\", input.summary],\n [\"summaryModelId\", input.summaryModelId],\n ] as const) {\n if (value.trim().length === 0) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint '${name}' must not be empty.`\n )\n }\n }\n\n if (input.summaryFormatVersion !== 1) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint summary format version must be 1.`\n )\n }\n if (input.reason !== \"threshold\" && input.reason !== \"overflow\") {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint reason must be 'threshold' or 'overflow'.`\n )\n }\n if (\n input.expectedPreviousCheckpointId !== null &&\n input.expectedPreviousCheckpointId.trim().length === 0\n ) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint expected previous id must not be empty.`\n )\n }\n if (input.createdAt && !Number.isFinite(input.createdAt.getTime())) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint createdAt must be a valid date.`\n )\n }\n\n for (const [name, value, minimum] of [\n [\"expectedHeadSeq\", input.expectedHeadSeq, 1],\n [\"summarizedThroughSeq\", input.summarizedThroughSeq, 1],\n [\"observedHeadSeq\", input.observedHeadSeq, 1],\n [\"estimatedInputTokensBefore\", input.estimatedInputTokensBefore, 0],\n [\"estimatedInputTokensAfter\", input.estimatedInputTokensAfter, 0],\n ] as const) {\n if (!Number.isSafeInteger(value) || value < minimum) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint '${name}' must be a safe integer greater than or equal to ${minimum}.`\n )\n }\n }\n\n if (input.observedHeadSeq !== input.expectedHeadSeq) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint observed head must equal its expected message head.`\n )\n }\n if (input.summarizedThroughSeq >= input.observedHeadSeq) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint must retain the triggering head message.`\n )\n }\n}\n\n/** Assert that the current delivery still owns the active conversational run. */\nexport function assertAgentContextCheckpointAuthority(input: {\n readonly create: CreateAgentContextCheckpointInput\n readonly run: AgentRunRecord | null\n readonly thread: AgentThreadRecord | null\n readonly prefix?: string\n}): asserts input is typeof input & {\n readonly run: AgentRunRecord\n readonly thread: AgentThreadRecord\n} {\n const { create, run, thread } = input\n const prefix = input.prefix ?? \"Sixb\"\n if (!run) {\n throw new AgentStorageError(\n \"run_not_found\",\n `[${prefix}] Agent run '${create.createdByRunId}' not found for project '${create.projectId}'.`\n )\n }\n if (!thread) {\n throw new AgentStorageError(\n \"thread_not_found\",\n `[${prefix}] Agent thread '${create.threadId}' not found for project '${create.projectId}'.`\n )\n }\n if (run.kind !== \"conversation\" || run.threadId !== create.threadId) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent run '${run.id}' does not belong to thread '${create.threadId}'.`\n )\n }\n if (run.status !== \"running\") {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent run '${run.id}' is not running (status '${run.status}').`\n )\n }\n if (!run.execution || run.execution.token !== create.executionToken) {\n throw new AgentStorageError(\n \"execution_lost\",\n `[${prefix}] Execution token is no longer current on agent run '${run.id}'.`\n )\n }\n if (thread.activeRunId !== run.id) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent run '${run.id}' no longer owns thread '${thread.id}'.`\n )\n }\n}\n\n/** Assert both compare-and-swap anchors and the retained-turn boundary. */\nexport function assertAgentContextCheckpointAnchors(input: {\n readonly create: CreateAgentContextCheckpointInput\n readonly latest: AgentContextCheckpointRecord | null\n readonly headSeq: number\n readonly firstRetained: AgentMessageRecord | null\n readonly prefix?: string\n}): void {\n const { create, latest, headSeq, firstRetained } = input\n const prefix = input.prefix ?? \"Sixb\"\n if (headSeq !== create.expectedHeadSeq) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent thread '${create.threadId}' message head changed from ${create.expectedHeadSeq} to ${headSeq}.`\n )\n }\n\n const latestId = latest?.id ?? null\n if (latestId !== create.expectedPreviousCheckpointId) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent thread '${create.threadId}' checkpoint head changed.`\n )\n }\n if (latest && create.summarizedThroughSeq <= latest.summarizedThroughSeq) {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint boundary must advance beyond sequence ${latest.summarizedThroughSeq}.`\n )\n }\n if (!firstRetained || firstRetained.seq !== create.summarizedThroughSeq + 1) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent context checkpoint boundary does not align with stored thread messages.`\n )\n }\n if (firstRetained.role !== \"user\") {\n throw new AgentStorageError(\n \"invalid_input\",\n `[${prefix}] Agent context checkpoint must retain a complete turn beginning with a user message.`\n )\n }\n}\n\n/** Validate the mutable anchors again before returning an idempotently created checkpoint. */\nexport function assertAgentContextCheckpointReplayState(input: {\n readonly create: CreateAgentContextCheckpointInput\n readonly existing: AgentContextCheckpointRecord\n readonly latest: AgentContextCheckpointRecord | null\n readonly headSeq: number\n readonly prefix?: string\n}): void {\n const prefix = input.prefix ?? \"Sixb\"\n if (input.headSeq !== input.create.expectedHeadSeq) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent thread '${input.create.threadId}' message head changed from ${input.create.expectedHeadSeq} to ${input.headSeq}.`\n )\n }\n if (input.latest?.id !== input.existing.id) {\n throw new AgentStorageError(\n \"invalid_state\",\n `[${prefix}] Agent thread '${input.create.threadId}' checkpoint head changed after '${input.existing.id}'.`\n )\n }\n}\n\n/** Compare the durable semantic payload; delivery token and generated timestamp are not content. */\nexport function agentContextCheckpointMatchesCreateInput(\n record: AgentContextCheckpointRecord,\n input: CreateAgentContextCheckpointInput\n): boolean {\n return (\n record.id === input.id &&\n record.projectId === input.projectId &&\n record.threadId === input.threadId &&\n record.createdByRunId === input.createdByRunId &&\n (record.previousCheckpointId ?? null) === input.expectedPreviousCheckpointId &&\n record.reason === input.reason &&\n record.summary === input.summary &&\n record.summaryFormatVersion === input.summaryFormatVersion &&\n record.summarizedThroughSeq === input.summarizedThroughSeq &&\n record.observedHeadSeq === input.observedHeadSeq &&\n record.estimatedInputTokensBefore === input.estimatedInputTokensBefore &&\n record.estimatedInputTokensAfter === input.estimatedInputTokensAfter &&\n record.summaryModelId === input.summaryModelId\n )\n}\n",
|
|
6
|
+
"import type { BlobBody, FileRef } from \"../blob-storage\"\nimport type { ConnectorRuntime } from \"../connectors\"\nimport type { JsonPrimitive, JsonValue, ReadonlyJsonValue } from \"../json\"\nimport type { Logger } from \"../logging\"\nimport { type LanguageModelRef, MODEL_REASONING_LEVELS, type ModelReasoning } from \"../models\"\nimport type { InferSchema } from \"../ontology/inference\"\nimport type { Schema } from \"../ontology/types\"\n\nexport type {\n AgentContextEntryInput,\n AgentContextInput,\n AgentContextOrigin,\n AgentContextPart,\n} from \"./context\"\n\n/** Public capability reference used by security grants such as `can.run(agent)`. */\nexport interface AgentReference {\n readonly kind: \"agent\"\n readonly usage: AgentUsageReference\n}\n\n/** Project-wide AI accounting and limit capability, independent of permission to run the Agent. */\nexport interface AgentUsageReference {\n readonly kind: \"aiUsage\"\n}\n\n/** Public metadata for the project's conversational Agent. */\nexport interface AgentDescriptor {\n readonly name: string\n readonly model: LanguageModelRef\n}\n\nexport type AgentReasoning = ModelReasoning\n\n/** @deprecated Use {@link AgentReasoning}. */\nexport type AgentReasoningLevel = AgentReasoning\n\nexport const AGENT_REASONING_LEVELS = MODEL_REASONING_LEVELS\n\ntype Simplify<T> = { [K in keyof T]: T[K] } & {}\ntype JsonifyAgentToolInput<T> = unknown extends T\n ? ReadonlyJsonValue\n : T extends Date\n ? string\n : T extends readonly (infer TItem)[]\n ? readonly JsonifyAgentToolInput<TItem>[]\n : T extends JsonPrimitive\n ? T\n : T extends object\n ? { readonly [K in keyof T]: JsonifyAgentToolInput<T[K]> }\n : never\n\n/** A model-facing object shape expressed with Sixb's schema DSL. */\nexport type AgentToolInputSchema = Readonly<Record<string, Schema>>\n\n/** Infer the handler input represented by an agent tool schema. */\nexport type InferAgentToolInputSchema<TInput extends AgentToolInputSchema> =\n string extends keyof TInput\n ? Readonly<Record<string, unknown>>\n : Simplify<{\n readonly [K in keyof TInput]: JsonifyAgentToolInput<InferSchema<TInput[K]>>\n }>\n\n/** Identifies the conversational, workflow, or child Agent execution that invoked a tool. */\nexport type AgentToolRunInfo =\n | {\n readonly kind: \"conversation\"\n readonly id: string\n readonly threadId: string\n }\n | {\n readonly kind: \"subagent\"\n readonly id: string\n readonly parentRunId: string\n }\n | {\n readonly kind: \"workflow\"\n readonly id: string\n readonly workflowId: string\n readonly stepId: string\n }\n\n/** Input accepted by the run-scoped artifact publisher exposed to agent tools. */\nexport interface AgentToolArtifactPutInput {\n readonly body: BlobBody\n readonly fileName: string\n readonly mediaType?: string\n}\n\n/** A durable artifact and its path inside the current run sandbox. */\nexport interface AgentToolArtifact {\n readonly fileRef: FileRef\n readonly sandboxPath: string\n}\n\n/** The narrow artifact-writing surface available to an agent tool call. */\nexport interface AgentToolArtifacts {\n put(input: AgentToolArtifactPutInput): Promise<AgentToolArtifact>\n}\n\nexport type AgentToolTextContent = {\n readonly type: \"text\"\n readonly text: string\n}\n\nexport type AgentToolFileContent = {\n readonly type: \"file\"\n readonly fileRef: FileRef\n}\n\n/** Durable model-facing content returned by a file-aware tool. */\nexport type AgentToolContent = AgentToolTextContent | AgentToolFileContent\n\n/**\n * A file-aware tool result. The tag distinguishes this envelope from an ordinary JSON result while\n * keeping the whole value safe to persist in the durable tool-call trace.\n */\nexport type AgentToolResult = {\n readonly kind: \"agentToolResult\"\n readonly content: readonly AgentToolContent[]\n}\n\n/** The narrow, run-scoped surface passed to an agent tool handler. */\nexport interface AgentToolRunContext<\n TInput extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>,\n> {\n readonly input: TInput\n readonly toolCallId: string\n readonly signal: AbortSignal\n readonly run: AgentToolRunInfo\n readonly connector: ConnectorRuntime\n readonly logger: Logger\n readonly artifacts: AgentToolArtifacts\n}\n\n/** Agent tool handlers may return only values safe to persist in agent messages. */\nexport type AgentToolHandlerResult =\n | ReadonlyJsonValue\n | AgentToolResult\n | Promise<ReadonlyJsonValue | AgentToolResult>\n\nexport type AgentToolHandler<TInput extends Readonly<Record<string, unknown>>> = (\n context: AgentToolRunContext<TInput>\n) => AgentToolHandlerResult\n\n/**\n * Runtime definitions are stored heterogeneously. Keep variance erasure at this\n * boundary only; authoring through `run()` remains strictly contravariant.\n */\ntype StoredAgentToolHandler<TInput extends Readonly<Record<string, unknown>>> = {\n bivarianceHack(context: AgentToolRunContext<TInput>): JsonValue | Promise<JsonValue>\n}[\"bivarianceHack\"]\n\n/** A reusable, inert model tool definition selected explicitly by an agent. */\nexport interface AgentToolDefinition<\n TName extends string = string,\n TInput extends AgentToolInputSchema = AgentToolInputSchema,\n> {\n readonly kind: \"agentTool\"\n readonly name: TName\n readonly description: string\n readonly input: TInput\n readonly handler: StoredAgentToolHandler<InferAgentToolInputSchema<TInput>>\n}\n\n/** Infer the input received by a tool definition's handler. */\nexport type InferAgentToolInput<TTool extends AgentToolDefinition> = InferAgentToolInputSchema<\n TTool[\"input\"]\n>\n\nexport interface AgentToolRunBuilder<TName extends string, TInput extends AgentToolInputSchema> {\n run(\n handler: AgentToolHandler<InferAgentToolInputSchema<TInput>>\n ): AgentToolDefinition<TName, TInput>\n}\n\nexport interface AgentToolInputBuilder<TName extends string> {\n input<const TInput extends AgentToolInputSchema>(\n input: TInput\n ): AgentToolRunBuilder<TName, TInput>\n}\n\nexport interface AgentToolDescriptionBuilder<TName extends string> {\n description(description: string): AgentToolInputBuilder<TName>\n}\n",
|
|
7
|
+
"export type AgentStorageErrorCode =\n | \"thread_not_found\"\n | \"active_run_exists\"\n | \"active_child_limit\"\n | \"run_not_found\"\n | \"invalid_input\"\n | \"invalid_state\"\n | \"execution_lost\"\n | \"duplicate_id\"\n\n/**\n * Error for agent-storage invariants and invalid state transitions (single-flight, execution\n * ownership, run lifecycle, message append). Callers branch on `code` rather than message text.\n */\nexport class AgentStorageError extends Error {\n readonly name = \"AgentStorageError\"\n\n constructor(\n readonly code: AgentStorageErrorCode,\n message: string\n ) {\n super(message)\n }\n}\n"
|
|
8
|
+
],
|
|
9
|
+
"mappings": ";;;;;;;;;;;;;AAAA;;;ACqCO,IAAM,yBAAyB;;;ACvB/B,MAAM,0BAA0B,MAAM;AAAA,EAIhC;AAAA,EAHF,OAAO;AAAA,EAEhB,WAAW,CACA,MACT,SACA;AAAA,IACA,MAAM,OAAO;AAAA,IAHJ;AAAA;AAKb;;;AFHO,SAAS,8BAA8B,CAC5C,MACA,SAAS,QACH;AAAA,EACN,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,KAAK,KAAK,GAAG;AAAA,IAC5C,MAAM,IAAI,kBACR,iBACA,IAAI,uEACN;AAAA,EACF;AAAA,EACA,YAAY,MAAM,UAAU;AAAA,IAC1B,CAAC,kBAAkB,KAAK,MAAM,QAAQ;AAAA,IACtC,CAAC,iBAAiB,KAAK,MAAM,OAAO;AAAA,EACtC,GAAY;AAAA,IACV,IAAI,OAAO,UAAU,YAAY,MAAM,KAAK,EAAE,WAAW,GAAG;AAAA,MAC1D,MAAM,IAAI,kBACR,iBACA,IAAI,qCAAqC,0BAC3C;AAAA,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AAAA,EACA,IAAI,cAAc,SAAS,QAAQ;AAAA,IACjC,MAAM,IAAI,kBACR,iBACA,IAAI,6FACN;AAAA,EACF;AAAA;AAIK,SAAS,uCAAuC,CAAC,OAM/C;AAAA,EACP,MAAM,SAAS,MAAM,UAAU;AAAA,EAC/B,IAAI,MAAM,YAAY,MAAM,OAAO,iBAAiB;AAAA,IAClD,MAAM,IAAI,kBACR,iBACA,IAAI,yBAAyB,MAAM,OAAO,uCAAuC,MAAM,OAAO,sBAAsB,MAAM,UAC5H;AAAA,EACF;AAAA,EACA,IAAI,MAAM,QAAQ,OAAO,MAAM,SAAS,IAAI;AAAA,IAC1C,MAAM,IAAI,kBACR,iBACA,IAAI,yBAAyB,MAAM,OAAO,4CAA4C,MAAM,SAAS,MACvG;AAAA,EACF;AAAA;AAIK,SAAS,wCAAwC,CACtD,QACA,OACS;AAAA,EACT,OACE,OAAO,OAAO,MAAM,MACpB,OAAO,cAAc,MAAM,aAC3B,OAAO,aAAa,MAAM,YAC1B,OAAO,mBAAmB,MAAM,mBAC/B,OAAO,wBAAwB,UAAU,MAAM,gCAChD,OAAO,WAAW,MAAM,UACxB,OAAO,YAAY,MAAM,WACzB,OAAO,yBAAyB,MAAM,wBACtC,OAAO,yBAAyB,MAAM,wBACtC,OAAO,oBAAoB,MAAM,mBACjC,OAAO,+BAA+B,MAAM,8BAC5C,OAAO,8BAA8B,MAAM,6BAC3C,OAAO,mBAAmB,MAAM;AAAA;",
|
|
10
|
+
"debugId": "FCE91CC06B8ED83764756E2164756E21",
|
|
11
|
+
"names": []
|
|
12
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
isSyncDefinition
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-kt81c11h.js";
|
|
5
5
|
import {
|
|
6
6
|
isPipelineDefinition
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-vjjv9mrb.js";
|
|
8
8
|
import {
|
|
9
9
|
allPredicates,
|
|
10
10
|
anyPredicates,
|
|
@@ -16,26 +16,27 @@ import {
|
|
|
16
16
|
} from "./chunk-5sz8ta9r.js";
|
|
17
17
|
import {
|
|
18
18
|
isDatasetDefinition
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-tn7xcs2n.js";
|
|
20
20
|
import {
|
|
21
|
-
isAgentDefinition,
|
|
22
21
|
isWorkflowDefinition
|
|
23
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-h0knpbz5.js";
|
|
24
23
|
import {
|
|
25
24
|
isConnectorDefinition
|
|
26
25
|
} from "./chunk-8m5ejdpn.js";
|
|
27
26
|
import {
|
|
28
|
-
RuntimeError,
|
|
29
27
|
isActionDefinition
|
|
30
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-y35ma3mj.js";
|
|
29
|
+
import {
|
|
30
|
+
RuntimeError
|
|
31
|
+
} from "./chunk-p2vqaxkc.js";
|
|
31
32
|
import {
|
|
32
33
|
isGroupDefinition,
|
|
33
34
|
isMembershipPolicyDefinition,
|
|
34
35
|
isRoleDefinition
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-rre42skh.js";
|
|
36
37
|
import {
|
|
37
38
|
isProjectionDefinition
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-37wk412q.js";
|
|
39
40
|
|
|
40
41
|
// src/bootstrap/discovery.ts
|
|
41
42
|
import { readdir } from "fs/promises";
|
|
@@ -269,8 +270,7 @@ var definitionDiscoveryRegistry = {
|
|
|
269
270
|
directory: ["security", "policies"],
|
|
270
271
|
kind: "membershipPolicy",
|
|
271
272
|
isDefinition: isMembershipPolicyDefinition
|
|
272
|
-
}
|
|
273
|
-
agents: { directory: ["agents"], kind: "agent", isDefinition: isAgentDefinition }
|
|
273
|
+
}
|
|
274
274
|
};
|
|
275
275
|
async function discoverProjectDefinitions(projectRoot) {
|
|
276
276
|
const entries = await Promise.all(Object.entries(definitionDiscoveryRegistry).map(async ([key, family]) => {
|
|
@@ -602,4 +602,4 @@ function isOntologyDocumentInput2(value) {
|
|
|
602
602
|
}
|
|
603
603
|
export { RuleValidationError, isRuleDefinition, validateRulesAtStartup, defineRule, discoverOntologySources, discoverProjectDefinitions, discoverOntologyTypeManifest, generateOntologyTypeManifest };
|
|
604
604
|
|
|
605
|
-
//# debugId=
|
|
605
|
+
//# debugId=03EE8E60B135B4C464756E2164756E21
|