@sixb/core 0.2.4 → 0.2.5
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 +28 -28
- package/dist/agents/execution.d.ts +34 -2
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/ids.d.ts +2 -0
- package/dist/agents/ids.d.ts.map +1 -1
- package/dist/agents/index.d.ts +6 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +51 -33
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/queued-turn.d.ts +16 -0
- package/dist/agents/queued-turn.d.ts.map +1 -0
- package/dist/agents/request.d.ts +79 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/run-after-finish.d.ts +10 -0
- package/dist/agents/run-after-finish.d.ts.map +1 -1
- package/dist/agents/run-artifacts.d.ts +0 -38
- package/dist/agents/run-artifacts.d.ts.map +1 -1
- package/dist/agents/run-events.d.ts +6 -1
- package/dist/agents/run-events.d.ts.map +1 -1
- package/dist/agents/run-session-http.d.ts.map +1 -1
- package/dist/agents/run-session-serve.d.ts.map +1 -1
- package/dist/agents/run-session.d.ts +14 -1
- package/dist/agents/run-session.d.ts.map +1 -1
- package/dist/agents/run-turn.d.ts.map +1 -1
- package/dist/agents/streams/index.d.ts +1 -1
- package/dist/agents/streams/index.d.ts.map +1 -1
- package/dist/agents/streams/index.js +1 -1
- package/dist/agents/streams/internal.js +1 -1
- package/dist/agents/streams/protocol.d.ts +16 -0
- package/dist/agents/streams/protocol.d.ts.map +1 -1
- package/dist/agents/turn-answered.d.ts +7 -0
- package/dist/agents/turn-answered.d.ts.map +1 -0
- package/dist/agents/validation.d.ts +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/artifacts/canvas-display.d.ts +3 -5
- package/dist/artifacts/canvas-display.d.ts.map +1 -1
- package/dist/artifacts/comments.d.ts +14 -3
- package/dist/artifacts/comments.d.ts.map +1 -1
- package/dist/artifacts/document-fill.d.ts +18 -0
- package/dist/artifacts/document-fill.d.ts.map +1 -0
- package/dist/artifacts/errors.d.ts +1 -1
- package/dist/artifacts/errors.d.ts.map +1 -1
- package/dist/artifacts/events.d.ts +3 -2
- package/dist/artifacts/events.d.ts.map +1 -1
- package/dist/artifacts/execution.d.ts +40 -4
- package/dist/artifacts/execution.d.ts.map +1 -1
- package/dist/artifacts/frames/assets.d.ts +8 -1
- package/dist/artifacts/frames/assets.d.ts.map +1 -1
- package/dist/artifacts/frames/document-data.d.ts +98 -0
- package/dist/artifacts/frames/document-data.d.ts.map +1 -0
- package/dist/artifacts/frames/entries.d.ts +12 -7
- package/dist/artifacts/frames/entries.d.ts.map +1 -1
- package/dist/artifacts/frames/index.d.ts +2 -1
- package/dist/artifacts/frames/index.d.ts.map +1 -1
- package/dist/artifacts/frames/index.js +22 -13
- package/dist/artifacts/frames/index.js.map +4 -4
- package/dist/artifacts/frames/kit.d.ts +15 -0
- package/dist/artifacts/frames/kit.d.ts.map +1 -1
- package/dist/artifacts/frames/protocol.d.ts +12 -1
- package/dist/artifacts/frames/protocol.d.ts.map +1 -1
- package/dist/artifacts/frames/runtime.d.ts +24 -4
- package/dist/artifacts/frames/runtime.d.ts.map +1 -1
- package/dist/artifacts/index.d.ts +3 -1
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +9 -3
- package/dist/artifacts/index.js.map +3 -3
- package/dist/artifacts/live/blocks.d.ts +62 -0
- package/dist/artifacts/live/blocks.d.ts.map +1 -0
- package/dist/artifacts/live/board.d.ts +6 -0
- package/dist/artifacts/live/board.d.ts.map +1 -1
- package/dist/artifacts/live/document.d.ts +12 -0
- package/dist/artifacts/live/document.d.ts.map +1 -1
- package/dist/artifacts/live/index.d.ts +2 -0
- package/dist/artifacts/live/index.d.ts.map +1 -1
- package/dist/artifacts/live/index.js +148 -44
- package/dist/artifacts/live/index.js.map +3 -3
- package/dist/artifacts/live/page.d.ts +49 -0
- package/dist/artifacts/live/page.d.ts.map +1 -0
- package/dist/artifacts/live/protocol.d.ts +5 -0
- package/dist/artifacts/live/protocol.d.ts.map +1 -1
- package/dist/artifacts/live/server.d.ts +2 -2
- package/dist/artifacts/live/server.d.ts.map +1 -1
- package/dist/artifacts/live/server.js +23 -19
- package/dist/artifacts/live/server.js.map +1 -1
- package/dist/artifacts/live/state.d.ts +4 -1
- package/dist/artifacts/live/state.d.ts.map +1 -1
- package/dist/artifacts/outline.d.ts +16 -0
- package/dist/artifacts/outline.d.ts.map +1 -1
- package/dist/artifacts/paper.d.ts +22 -0
- package/dist/artifacts/paper.d.ts.map +1 -0
- package/dist/artifacts/pdf-job.d.ts +9 -0
- package/dist/artifacts/pdf-job.d.ts.map +1 -0
- package/dist/artifacts/publish/fields.d.ts +25 -0
- package/dist/artifacts/publish/fields.d.ts.map +1 -0
- package/dist/artifacts/publish/index.d.ts +2 -1
- package/dist/artifacts/publish/index.d.ts.map +1 -1
- package/dist/artifacts/publish/index.js +26 -18
- package/dist/artifacts/publish/index.js.map +1 -1
- package/dist/artifacts/publish/merge.d.ts +5 -5
- package/dist/artifacts/publish/merge.d.ts.map +1 -1
- package/dist/artifacts/publish/pdf.d.ts +28 -0
- package/dist/artifacts/publish/pdf.d.ts.map +1 -0
- package/dist/artifacts/publish/previews.d.ts +12 -20
- package/dist/artifacts/publish/previews.d.ts.map +1 -1
- package/dist/artifacts/publish/publish.d.ts.map +1 -1
- package/dist/artifacts/publish/queries.d.ts +6 -1
- package/dist/artifacts/publish/queries.d.ts.map +1 -1
- package/dist/artifacts/publish/query-answers.d.ts +5 -2
- package/dist/artifacts/publish/query-answers.d.ts.map +1 -1
- package/dist/artifacts/publish/validate/document-html.d.ts +24 -0
- package/dist/artifacts/publish/validate/document-html.d.ts.map +1 -0
- package/dist/artifacts/publish/validate/document.d.ts +5 -3
- package/dist/artifacts/publish/validate/document.d.ts.map +1 -1
- package/dist/artifacts/queries.d.ts +16 -2
- package/dist/artifacts/queries.d.ts.map +1 -1
- package/dist/auth/index.js +2 -2
- package/dist/authorization/event-visibility.d.ts.map +1 -1
- package/dist/authorization/index.js +1 -1
- package/dist/blob-storage/index.js +1 -1
- package/dist/bootstrap/index.js +38 -38
- package/dist/{chunk-8bns0y68.js → chunk-0hkdtwqk.js} +5 -5
- package/dist/{chunk-p8pgnq8d.js → chunk-0mvjpgvm.js} +5 -5
- package/dist/{chunk-2bn6813a.js → chunk-1yh6jgtz.js} +1 -1
- package/dist/{chunk-msyevpp3.js → chunk-5t9gm5tt.js} +4 -4
- package/dist/{chunk-a6fjkcne.js → chunk-60662fyv.js} +54 -28
- package/dist/{chunk-a6fjkcne.js.map → chunk-60662fyv.js.map} +7 -6
- package/dist/{chunk-e0hnbb1m.js → chunk-61zptves.js} +1 -1
- package/dist/{chunk-td26wjr5.js → chunk-68hm50qh.js} +3 -3
- package/dist/{chunk-9nsjjd44.js → chunk-8tv3qd65.js} +2 -1
- package/dist/chunk-8tv3qd65.js.map +12 -0
- package/dist/{chunk-fe6r7yhg.js → chunk-92wrka15.js} +1 -1
- package/dist/{chunk-3z1vxzcm.js → chunk-aw1z0gre.js} +4 -4
- package/dist/{chunk-evj5jxz3.js → chunk-b4escq4c.js} +62 -14
- package/dist/{chunk-evj5jxz3.js.map → chunk-b4escq4c.js.map} +7 -7
- package/dist/chunk-bqr703h4.js +1799 -0
- package/dist/chunk-bqr703h4.js.map +13 -0
- package/dist/{chunk-eptrvnby.js → chunk-c29729me.js} +42 -3
- package/dist/chunk-c29729me.js.map +12 -0
- package/dist/{chunk-t24yktqr.js → chunk-dvgc56n2.js} +20 -4
- package/dist/{chunk-t24yktqr.js.map → chunk-dvgc56n2.js.map} +5 -5
- package/dist/{chunk-3014rfjz.js → chunk-ewqn51gr.js} +25 -7
- package/dist/{chunk-3014rfjz.js.map → chunk-ewqn51gr.js.map} +3 -3
- package/dist/{chunk-t0s7b3d1.js → chunk-ey1p8w68.js} +173 -4
- package/dist/chunk-ey1p8w68.js.map +13 -0
- package/dist/{chunk-gxwy4c3s.js → chunk-fpf57gca.js} +316 -57
- package/dist/chunk-fpf57gca.js.map +47 -0
- package/dist/{chunk-r9rtavg9.js → chunk-fzae1jpq.js} +7 -7
- package/dist/{chunk-b9qfh2ya.js → chunk-fzbhybya.js} +29 -2
- package/dist/chunk-fzbhybya.js.map +11 -0
- package/dist/{chunk-w1wq7gfr.js → chunk-gjhrz66x.js} +225 -17
- package/dist/{chunk-w1wq7gfr.js.map → chunk-gjhrz66x.js.map} +5 -5
- package/dist/chunk-hn2r7z41.js.map +1 -1
- package/dist/{chunk-vepea5c3.js → chunk-k29n4176.js} +6 -6
- package/dist/{chunk-48c1z8nj.js → chunk-k3jh8gsg.js} +10 -2
- package/dist/chunk-k3jh8gsg.js.map +10 -0
- package/dist/{chunk-yy914zfr.js → chunk-m3qx2pns.js} +751 -93
- package/dist/chunk-m3qx2pns.js.map +34 -0
- package/dist/{chunk-smnt672s.js → chunk-m9ketb51.js} +20 -4
- package/dist/chunk-m9ketb51.js.map +10 -0
- package/dist/chunk-mbwsgjn7.js +40 -0
- package/dist/chunk-mbwsgjn7.js.map +11 -0
- package/dist/{chunk-sysnvjce.js → chunk-naxjka9v.js} +2 -2
- package/dist/{chunk-n4zzaf6q.js → chunk-nxysqbt0.js} +4 -2
- package/dist/chunk-nxysqbt0.js.map +10 -0
- package/dist/{chunk-vzkxqf8h.js → chunk-paxabbqd.js} +49 -5
- package/dist/chunk-paxabbqd.js.map +23 -0
- package/dist/{chunk-8tqnsx3q.js → chunk-pc7kra3k.js} +5 -3
- package/dist/{chunk-8tqnsx3q.js.map → chunk-pc7kra3k.js.map} +3 -3
- package/dist/{chunk-6ef4esq4.js → chunk-pqvvqc65.js} +4 -4
- package/dist/chunk-pvpq483h.js.map +2 -2
- package/dist/{chunk-mzx71snp.js → chunk-q7g9cqwt.js} +7 -2
- package/dist/{chunk-mzx71snp.js.map → chunk-q7g9cqwt.js.map} +3 -3
- package/dist/{chunk-8t2ynwg0.js → chunk-q8d9p0tb.js} +24 -1
- package/dist/{chunk-8t2ynwg0.js.map → chunk-q8d9p0tb.js.map} +3 -3
- package/dist/{chunk-wa05txmk.js → chunk-qavwr628.js} +49 -5
- package/dist/chunk-qavwr628.js.map +12 -0
- package/dist/{chunk-rsrc7vtw.js → chunk-rg725hry.js} +174 -30
- package/dist/{chunk-rsrc7vtw.js.map → chunk-rg725hry.js.map} +9 -8
- package/dist/{chunk-rsxb14an.js → chunk-s1mqyqmm.js} +3 -3
- package/dist/{chunk-p351afzm.js → chunk-s5pj68fa.js} +2 -2
- package/dist/{chunk-855w9nvw.js → chunk-vehcr9eb.js} +1 -1
- package/dist/{chunk-hvbvq7p4.js → chunk-vs2s3p8n.js} +731 -10
- package/dist/chunk-vs2s3p8n.js.map +20 -0
- package/dist/chunk-vtjzwymr.js.map +2 -2
- package/dist/{chunk-n68vz95m.js → chunk-wqe9shx2.js} +1 -1
- package/dist/{chunk-0k3r5kb3.js → chunk-xcrnrpfh.js} +1 -1
- package/dist/{chunk-cwdzcv37.js → chunk-xrmbhap8.js} +2 -2
- package/dist/{chunk-cwdzcv37.js.map → chunk-xrmbhap8.js.map} +2 -2
- package/dist/{chunk-f6ahf5gf.js → chunk-xxfj0rr2.js} +20 -5
- package/dist/chunk-xxfj0rr2.js.map +13 -0
- package/dist/{chunk-3hzhcfsv.js → chunk-y8fwm3z2.js} +2 -2
- package/dist/{chunk-3hzhcfsv.js.map → chunk-y8fwm3z2.js.map} +3 -3
- package/dist/{chunk-rtm1jq00.js → chunk-z1njfqqs.js} +439 -48
- package/dist/{chunk-rtm1jq00.js.map → chunk-z1njfqqs.js.map} +10 -8
- package/dist/{chunk-yv8hv4wq.js → chunk-z4jqb44a.js} +3 -1
- package/dist/chunk-z4jqb44a.js.map +10 -0
- package/dist/{chunk-s7xqfxs9.js → chunk-zft9bzbc.js} +2 -1
- package/dist/{chunk-s7xqfxs9.js.map → chunk-zft9bzbc.js.map} +3 -3
- package/dist/{chunk-7kpqntgw.js → chunk-zxhym8tr.js} +1 -1
- package/dist/connectors/connection-handles.d.ts +9 -0
- package/dist/connectors/connection-handles.d.ts.map +1 -0
- package/dist/connectors/connections/authorizations.d.ts +9 -0
- package/dist/connectors/connections/authorizations.d.ts.map +1 -1
- package/dist/connectors/connections/events.d.ts +17 -0
- package/dist/connectors/connections/events.d.ts.map +1 -0
- package/dist/connectors/connections/runs.d.ts +3 -0
- package/dist/connectors/connections/runs.d.ts.map +1 -1
- package/dist/connectors/connections/service.d.ts +4 -0
- package/dist/connectors/connections/service.d.ts.map +1 -1
- package/dist/connectors/execution.d.ts +7 -1
- package/dist/connectors/execution.d.ts.map +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.d.ts.map +1 -1
- package/dist/connectors/types.d.ts +22 -1
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/datasets/write.js +1 -1
- package/dist/deploy/index.d.ts +1 -1
- package/dist/deploy/index.d.ts.map +1 -1
- package/dist/deploy/internal.js +3 -2
- package/dist/deploy/internal.js.map +3 -3
- package/dist/deploy/services.d.ts.map +1 -1
- package/dist/deploy/types.d.ts +18 -1
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/events/definitions.d.ts +4 -0
- package/dist/events/definitions.d.ts.map +1 -1
- package/dist/events/execution.d.ts.map +1 -1
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +3 -3
- package/dist/events/outbox-dispatcher.d.ts +7 -0
- package/dist/events/outbox-dispatcher.d.ts.map +1 -1
- package/dist/events/scope.d.ts +1 -0
- package/dist/events/scope.d.ts.map +1 -1
- package/dist/events/scope.js +1 -1
- package/dist/events/selectors/builder.d.ts +9 -1
- package/dist/events/selectors/builder.d.ts.map +1 -1
- package/dist/events/selectors/index.d.ts +2 -2
- package/dist/events/selectors/index.d.ts.map +1 -1
- package/dist/events/selectors/index.js +2 -2
- package/dist/events/selectors/predicate.d.ts.map +1 -1
- package/dist/events/selectors/types.d.ts +18 -3
- package/dist/events/selectors/types.d.ts.map +1 -1
- package/dist/events/types/artifacts.d.ts +7 -1
- package/dist/events/types/artifacts.d.ts.map +1 -1
- package/dist/events/types/connectors.d.ts +32 -0
- package/dist/events/types/connectors.d.ts.map +1 -0
- package/dist/events/types/index.d.ts +3 -1
- package/dist/events/types/index.d.ts.map +1 -1
- package/dist/execution/agent.js +28 -28
- package/dist/execution/authorization.d.ts +5 -0
- package/dist/execution/authorization.d.ts.map +1 -1
- package/dist/execution/primitive.js +28 -28
- package/dist/execution/request.js +29 -29
- package/dist/execution/scopes.d.ts +8 -0
- package/dist/execution/scopes.d.ts.map +1 -1
- package/dist/execution/script.d.ts +7 -0
- package/dist/execution/script.d.ts.map +1 -0
- package/dist/execution/types.d.ts +16 -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 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -44
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/index.js +1 -1
- package/dist/lineage/executors.d.ts +1 -1
- package/dist/lineage/executors.d.ts.map +1 -1
- package/dist/maintenance/index.js +1 -1
- package/dist/materialization/event-envelopes.d.ts +3 -3
- package/dist/materialization/event-envelopes.d.ts.map +1 -1
- package/dist/materialization/events.d.ts +6 -0
- package/dist/materialization/events.d.ts.map +1 -1
- package/dist/materialization/index.js +1 -1
- package/dist/materialization/model.d.ts +6 -0
- package/dist/materialization/model.d.ts.map +1 -1
- package/dist/materializer/index.js +13 -13
- package/dist/materializer/projections/replace.d.ts.map +1 -1
- package/dist/materializer/projections/replacement-plan.d.ts +2 -0
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -1
- package/dist/materializer/shared/normalize.d.ts +1 -0
- package/dist/materializer/shared/normalize.d.ts.map +1 -1
- package/dist/models/execution/index.js +12 -12
- package/dist/objects/index.js +28 -28
- package/dist/objects/query/index.js +12 -12
- package/dist/pipelines/index.js +18 -18
- package/dist/projections/builders.d.ts +7 -1
- 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 +13 -13
- package/dist/projections/types.d.ts +10 -0
- package/dist/projections/types.d.ts.map +1 -1
- package/dist/projections/validation.d.ts.map +1 -1
- package/dist/queues/in-memory.d.ts +2 -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 +40 -13
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +13 -0
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +1 -0
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +39 -18
- package/dist/runtime/internal.js.map +4 -3
- package/dist/runtime/resolve-definitions.d.ts +1 -1
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/runtime/script.d.ts +39 -0
- package/dist/runtime/script.d.ts.map +1 -0
- package/dist/runtime/sixb.d.ts +2 -2
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/schedules/builders.d.ts.map +1 -1
- package/dist/schedules/index.js +3 -3
- package/dist/schedules/runtime.d.ts.map +1 -1
- package/dist/schedules/validation.d.ts +2 -0
- package/dist/schedules/validation.d.ts.map +1 -1
- package/dist/shares/internal.js +12 -12
- 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 +26 -1
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/index.d.ts +2 -2
- package/dist/storage/agents/index.d.ts.map +1 -1
- package/dist/storage/agents/provider.d.ts +12 -3
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +25 -5
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +155 -0
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/artifacts/in-memory.d.ts +7 -1
- package/dist/storage/artifacts/in-memory.d.ts.map +1 -1
- package/dist/storage/artifacts/index.d.ts +1 -1
- package/dist/storage/artifacts/index.d.ts.map +1 -1
- package/dist/storage/artifacts/record.d.ts +2 -1
- package/dist/storage/artifacts/record.d.ts.map +1 -1
- package/dist/storage/artifacts/types.d.ts +34 -0
- package/dist/storage/artifacts/types.d.ts.map +1 -1
- package/dist/storage/executions/provider.d.ts +3 -3
- package/dist/storage/executions/provider.d.ts.map +1 -1
- package/dist/storage/executions/provider.js +1 -1
- package/dist/storage/executions/types.d.ts +6 -0
- package/dist/storage/executions/types.d.ts.map +1 -1
- package/dist/storage/executions/validation.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/provider.js +3 -3
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +18 -14
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +1 -1
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +8 -6
- package/dist/storage/internal.js.map +2 -2
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts +2 -0
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +1 -1
- package/dist/storage/ontology/replacement-plans.d.ts +8 -0
- package/dist/storage/ontology/replacement-plans.d.ts.map +1 -1
- package/dist/storage/operation-scope.d.ts.map +1 -1
- package/dist/storage/operation-scope.js +1 -1
- package/dist/storage/workflow-runs/provider.js +3 -3
- package/dist/syncs/index.js +19 -19
- package/dist/testing/agent-execution.d.ts +3 -0
- package/dist/testing/agent-execution.d.ts.map +1 -1
- package/dist/testing/agent-inbox-storage-contract.d.ts +15 -0
- package/dist/testing/agent-inbox-storage-contract.d.ts.map +1 -0
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/artifact-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution-storage-contract.d.ts.map +1 -1
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +5524 -4555
- package/dist/testing/index.js.map +10 -9
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/webhooks/connections.d.ts +3 -4
- package/dist/webhooks/connections.d.ts.map +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.d.ts.map +1 -1
- package/dist/webhooks/internal.js +16 -49
- package/dist/webhooks/internal.js.map +3 -3
- package/dist/webhooks/types.d.ts +2 -11
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/workers/queued-run-dispatch.d.ts.map +1 -1
- package/dist/workflows/index.js +35 -35
- package/package.json +6 -1
- package/src/agents/README.md +6 -2
- package/src/agents/execution.ts +167 -29
- package/src/agents/ids.ts +5 -0
- package/src/agents/index.ts +18 -4
- package/src/agents/queued-turn.ts +46 -0
- package/src/agents/request.ts +517 -2
- package/src/agents/run-after-finish.ts +259 -2
- package/src/agents/run-artifacts.ts +3 -93
- package/src/agents/run-events.ts +26 -1
- package/src/agents/run-session-http.ts +9 -2
- package/src/agents/run-session-serve.ts +2 -8
- package/src/agents/run-session.ts +142 -3
- package/src/agents/run-turn.ts +8 -0
- package/src/agents/streams/index.ts +1 -0
- package/src/agents/streams/protocol.ts +41 -1
- package/src/agents/turn-answered.ts +31 -0
- package/src/agents/validation.ts +2 -0
- package/src/artifacts/canvas-display.ts +4 -6
- package/src/artifacts/comments.ts +70 -17
- package/src/artifacts/document-fill.ts +103 -0
- package/src/artifacts/errors.ts +2 -0
- package/src/artifacts/events.ts +4 -1
- package/src/artifacts/execution.ts +265 -31
- package/src/artifacts/frames/assets.ts +42 -7
- package/src/artifacts/frames/document-data.ts +353 -0
- package/src/artifacts/frames/entries.ts +22 -16
- package/src/artifacts/frames/grants.ts +2 -2
- package/src/artifacts/frames/index.ts +3 -0
- package/src/artifacts/frames/kit.ts +102 -0
- package/src/artifacts/frames/protocol.ts +12 -1
- package/src/artifacts/frames/runtime.ts +413 -6
- package/src/artifacts/index.ts +3 -0
- package/src/artifacts/live/blocks.ts +889 -0
- package/src/artifacts/live/board.ts +195 -42
- package/src/artifacts/live/document.ts +170 -5
- package/src/artifacts/live/index.ts +7 -0
- package/src/artifacts/live/page.ts +807 -0
- package/src/artifacts/live/protocol.ts +5 -0
- package/src/artifacts/live/server.ts +2 -2
- package/src/artifacts/live/state.ts +9 -4
- package/src/artifacts/outline.ts +17 -0
- package/src/artifacts/paper.ts +173 -0
- package/src/artifacts/pdf-job.ts +11 -0
- package/src/artifacts/publish/fields.ts +177 -0
- package/src/artifacts/publish/index.ts +6 -1
- package/src/artifacts/publish/merge.ts +14 -12
- package/src/artifacts/publish/pdf.ts +82 -0
- package/src/artifacts/publish/previews.ts +24 -34
- package/src/artifacts/publish/publish.ts +26 -3
- package/src/artifacts/publish/queries.ts +20 -4
- package/src/artifacts/publish/query-answers.ts +14 -3
- package/src/artifacts/publish/validate/document-html.ts +245 -0
- package/src/artifacts/publish/validate/document.ts +34 -3
- package/src/artifacts/queries.ts +59 -13
- package/src/authorization/event-visibility.ts +13 -0
- package/src/connectors/connection-handles.ts +71 -0
- package/src/connectors/connections/authorizations.ts +50 -2
- package/src/connectors/connections/events.ts +57 -0
- package/src/connectors/connections/runs.ts +5 -0
- package/src/connectors/connections/service.ts +19 -1
- package/src/connectors/execution.ts +30 -2
- package/src/connectors/index.ts +3 -0
- package/src/connectors/types.ts +29 -1
- package/src/deploy/index.ts +1 -0
- package/src/deploy/services.ts +1 -0
- package/src/deploy/types.ts +26 -1
- package/src/events/definitions.ts +14 -0
- package/src/events/execution.ts +9 -2
- package/src/events/index.ts +8 -0
- package/src/events/outbox-dispatcher.ts +12 -2
- package/src/events/scope.ts +3 -0
- package/src/events/selectors/builder.ts +49 -0
- package/src/events/selectors/index.ts +5 -0
- package/src/events/selectors/predicate.ts +2 -0
- package/src/events/selectors/types.ts +30 -1
- package/src/events/types/artifacts.ts +7 -1
- package/src/events/types/connectors.ts +36 -0
- package/src/events/types/index.ts +7 -0
- package/src/execution/authorization.ts +45 -0
- package/src/execution/durable.ts +2 -0
- package/src/execution/scopes.ts +24 -0
- package/src/execution/script.ts +27 -0
- package/src/execution/types.ts +7 -1
- package/src/http/api-routes.ts +25 -0
- package/src/index.ts +21 -2
- package/src/lineage/executors.ts +3 -1
- package/src/materialization/event-envelopes.ts +10 -5
- package/src/materialization/events.ts +2 -0
- package/src/materialization/model.ts +6 -0
- package/src/materializer/README.md +10 -0
- package/src/materializer/projections/replace.ts +42 -1
- package/src/materializer/projections/replacement-plan.ts +44 -4
- package/src/materializer/shared/normalize.ts +4 -0
- package/src/projections/builders.ts +20 -0
- package/src/projections/index.ts +1 -0
- package/src/projections/registry.ts +1 -0
- package/src/projections/revision.ts +2 -0
- package/src/projections/types.ts +11 -0
- package/src/projections/validation.ts +6 -0
- package/src/queues/in-memory.ts +5 -0
- package/src/queues/index.ts +3 -1
- package/src/queues/types.ts +45 -14
- package/src/runtime/host.ts +112 -4
- package/src/runtime/internal.ts +1 -0
- package/src/runtime/resolve-definitions.ts +4 -1
- package/src/runtime/script.ts +62 -0
- package/src/runtime/sixb.ts +3 -3
- package/src/schedules/builders.ts +4 -1
- package/src/schedules/runtime.ts +3 -0
- package/src/schedules/validation.ts +20 -2
- package/src/storage/agents/errors.ts +1 -0
- package/src/storage/agents/in-memory.ts +229 -1
- package/src/storage/agents/index.ts +16 -0
- package/src/storage/agents/provider.ts +284 -2
- package/src/storage/agents/types.ts +167 -0
- package/src/storage/artifacts/in-memory.ts +32 -1
- package/src/storage/artifacts/index.ts +2 -0
- package/src/storage/artifacts/record.ts +25 -2
- package/src/storage/artifacts/types.ts +37 -0
- package/src/storage/executions/provider.ts +22 -2
- package/src/storage/executions/types.ts +2 -0
- package/src/storage/executions/validation.ts +27 -0
- package/src/storage/index.ts +18 -0
- package/src/storage/internal.ts +1 -0
- package/src/storage/ontology/in-memory/replacement-plans.ts +22 -0
- package/src/storage/ontology/replacement-plans.ts +6 -0
- package/src/storage/operation-scope.ts +1 -0
- package/src/testing/agent-execution.ts +45 -2
- package/src/testing/agent-inbox-storage-contract.ts +815 -0
- package/src/testing/agent-storage-contract.ts +103 -0
- package/src/testing/artifact-storage-contract.ts +72 -4
- package/src/testing/execution-storage-contract.ts +31 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/materializer-storage-contract.ts +139 -1
- package/src/testing/queues-contract.ts +22 -0
- package/src/webhooks/connections.ts +9 -50
- package/src/webhooks/index.ts +0 -2
- package/src/webhooks/types.ts +2 -13
- package/src/workers/queued-run-dispatch.ts +8 -1
- package/dist/chunk-48c1z8nj.js.map +0 -10
- package/dist/chunk-58geavnf.js +0 -29
- package/dist/chunk-58geavnf.js.map +0 -10
- package/dist/chunk-9nsjjd44.js.map +0 -12
- package/dist/chunk-b9qfh2ya.js.map +0 -11
- package/dist/chunk-eptrvnby.js.map +0 -12
- package/dist/chunk-f6ahf5gf.js.map +0 -13
- package/dist/chunk-gxwy4c3s.js.map +0 -47
- package/dist/chunk-hvbvq7p4.js.map +0 -18
- package/dist/chunk-m2jerfef.js +0 -474
- package/dist/chunk-m2jerfef.js.map +0 -11
- package/dist/chunk-n4zzaf6q.js.map +0 -10
- package/dist/chunk-smnt672s.js.map +0 -10
- package/dist/chunk-t0s7b3d1.js.map +0 -13
- package/dist/chunk-vzkxqf8h.js.map +0 -23
- package/dist/chunk-wa05txmk.js.map +0 -11
- package/dist/chunk-yv8hv4wq.js.map +0 -10
- package/dist/chunk-yy914zfr.js.map +0 -30
- /package/dist/{chunk-8bns0y68.js.map → chunk-0hkdtwqk.js.map} +0 -0
- /package/dist/{chunk-p8pgnq8d.js.map → chunk-0mvjpgvm.js.map} +0 -0
- /package/dist/{chunk-2bn6813a.js.map → chunk-1yh6jgtz.js.map} +0 -0
- /package/dist/{chunk-msyevpp3.js.map → chunk-5t9gm5tt.js.map} +0 -0
- /package/dist/{chunk-e0hnbb1m.js.map → chunk-61zptves.js.map} +0 -0
- /package/dist/{chunk-td26wjr5.js.map → chunk-68hm50qh.js.map} +0 -0
- /package/dist/{chunk-fe6r7yhg.js.map → chunk-92wrka15.js.map} +0 -0
- /package/dist/{chunk-3z1vxzcm.js.map → chunk-aw1z0gre.js.map} +0 -0
- /package/dist/{chunk-r9rtavg9.js.map → chunk-fzae1jpq.js.map} +0 -0
- /package/dist/{chunk-vepea5c3.js.map → chunk-k29n4176.js.map} +0 -0
- /package/dist/{chunk-sysnvjce.js.map → chunk-naxjka9v.js.map} +0 -0
- /package/dist/{chunk-6ef4esq4.js.map → chunk-pqvvqc65.js.map} +0 -0
- /package/dist/{chunk-rsxb14an.js.map → chunk-s1mqyqmm.js.map} +0 -0
- /package/dist/{chunk-p351afzm.js.map → chunk-s5pj68fa.js.map} +0 -0
- /package/dist/{chunk-855w9nvw.js.map → chunk-vehcr9eb.js.map} +0 -0
- /package/dist/{chunk-n68vz95m.js.map → chunk-wqe9shx2.js.map} +0 -0
- /package/dist/{chunk-0k3r5kb3.js.map → chunk-xcrnrpfh.js.map} +0 -0
- /package/dist/{chunk-7kpqntgw.js.map → chunk-zxhym8tr.js.map} +0 -0
|
@@ -412,6 +412,28 @@ export interface PutArtifactBoardPreviewsInput {
|
|
|
412
412
|
readonly previews: readonly Omit<ArtifactBoardPreviewRecord, "projectId">[]
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
+
/**
|
|
416
|
+
* A designed document printed to PDF, kept under its render key: a hash of what it prints, which
|
|
417
|
+
* its version names. Versions that print the same share it. When it could not be printed, why is
|
|
418
|
+
* kept in its place, until it prints or someone asks for it again.
|
|
419
|
+
*/
|
|
420
|
+
export type ArtifactPdfRecord = ArtifactPdfKeyInput & { readonly createdAt: Date } & (
|
|
421
|
+
| {
|
|
422
|
+
readonly file: FileRef
|
|
423
|
+
/** How many pages it printed on. */
|
|
424
|
+
readonly pages: number
|
|
425
|
+
}
|
|
426
|
+
| {
|
|
427
|
+
/** Why it could not be printed, as whoever asked for it hears it. */
|
|
428
|
+
readonly failure: string
|
|
429
|
+
}
|
|
430
|
+
)
|
|
431
|
+
|
|
432
|
+
export interface ArtifactPdfKeyInput {
|
|
433
|
+
readonly projectId: string
|
|
434
|
+
readonly renderKey: string
|
|
435
|
+
}
|
|
436
|
+
|
|
415
437
|
/**
|
|
416
438
|
* What a comment is about: a canvas's board, an element of it by its address, as
|
|
417
439
|
* `boardElements` writes one, or the artifact itself, at the revision the author saw.
|
|
@@ -439,6 +461,11 @@ export interface ArtifactGuest {
|
|
|
439
461
|
/** The shared link's session they comment from: each session is one guest. */
|
|
440
462
|
readonly id: string
|
|
441
463
|
readonly name: string
|
|
464
|
+
/**
|
|
465
|
+
* The shared link they came through, by its grant: whoever opens it, in any session, reads the
|
|
466
|
+
* threads its guests start, and no other.
|
|
467
|
+
*/
|
|
468
|
+
readonly grantId: string
|
|
442
469
|
}
|
|
443
470
|
|
|
444
471
|
/** Who wrote a comment: someone who signed in, the project's code, or a shared link's guest. */
|
|
@@ -574,6 +601,16 @@ export interface ArtifactStorage {
|
|
|
574
601
|
* what the board shows, so both are pictures of the same page. Deleting an artifact keeps them.
|
|
575
602
|
*/
|
|
576
603
|
putBoardPreviews(input: PutArtifactBoardPreviewsInput): Promise<void>
|
|
604
|
+
/** The PDF kept under a render key, or why it could not be printed; null when neither is. */
|
|
605
|
+
getPdf(input: ArtifactPdfKeyInput): Promise<ArtifactPdfRecord | null>
|
|
606
|
+
/**
|
|
607
|
+
* Keeps a PDF, or why it could not be printed, under its render key. A PDF replaces a failure;
|
|
608
|
+
* anything else already kept there stays: the key names what it prints. Deleting an artifact
|
|
609
|
+
* keeps them.
|
|
610
|
+
*/
|
|
611
|
+
putPdf(input: ArtifactPdfRecord): Promise<void>
|
|
612
|
+
/** Forgets why the PDF under a render key could not be printed. A PDF kept there stays. */
|
|
613
|
+
clearPdfFailure(input: ArtifactPdfKeyInput): Promise<void>
|
|
577
614
|
/**
|
|
578
615
|
* Adds a comment, or a reply to one. Throws `artifact_not_found`; `comment_not_found` when
|
|
579
616
|
* `parentId` names no comment of the artifact, or a reply; and `artifact_comments_full` past
|
|
@@ -27,7 +27,7 @@ export function compareExecutionCreation(
|
|
|
27
27
|
export interface ExecutionStorageRow {
|
|
28
28
|
readonly projectId: string
|
|
29
29
|
readonly id: string
|
|
30
|
-
readonly executorKind: "agent" | "kernel" | "request" | TrustedPrimitiveKind
|
|
30
|
+
readonly executorKind: "agent" | "kernel" | "request" | "script" | TrustedPrimitiveKind
|
|
31
31
|
readonly executorId: string
|
|
32
32
|
readonly sourceKind:
|
|
33
33
|
| "ontologyCommit"
|
|
@@ -36,6 +36,7 @@ export interface ExecutionStorageRow {
|
|
|
36
36
|
| "execution"
|
|
37
37
|
| "http"
|
|
38
38
|
| "schedule"
|
|
39
|
+
| "script"
|
|
39
40
|
| "webhook"
|
|
40
41
|
readonly sourceId: string
|
|
41
42
|
readonly requestedByUserId: string | null
|
|
@@ -44,7 +45,13 @@ export interface ExecutionStorageRow {
|
|
|
44
45
|
readonly correlationId: string
|
|
45
46
|
/** SQL-only projection of an execution source, used to enforce the parent foreign key. */
|
|
46
47
|
readonly parentExecutionId: string | null
|
|
47
|
-
readonly authorityKind:
|
|
48
|
+
readonly authorityKind:
|
|
49
|
+
| "delegated"
|
|
50
|
+
| "disabled"
|
|
51
|
+
| "kernel"
|
|
52
|
+
| "principal"
|
|
53
|
+
| "script"
|
|
54
|
+
| "trustedPrimitive"
|
|
48
55
|
readonly authorityUserId: string | null
|
|
49
56
|
readonly authorityServiceAccountId: string | null
|
|
50
57
|
readonly authoritySessionId: string | null
|
|
@@ -129,6 +136,8 @@ function flattenExecutor(
|
|
|
129
136
|
return { executorKind: "agent", executorId: record.executor.runId }
|
|
130
137
|
case "kernel":
|
|
131
138
|
return { executorKind: "kernel", executorId: kernelOperationId(record.executor.operation) }
|
|
139
|
+
case "script":
|
|
140
|
+
return { executorKind: "script", executorId: record.executor.runId }
|
|
132
141
|
}
|
|
133
142
|
}
|
|
134
143
|
|
|
@@ -152,6 +161,8 @@ function flattenSource(
|
|
|
152
161
|
}
|
|
153
162
|
case "execution":
|
|
154
163
|
return { sourceKind: "execution", sourceId: record.source.executionId }
|
|
164
|
+
case "script":
|
|
165
|
+
return { sourceKind: "script", sourceId: record.source.path }
|
|
155
166
|
}
|
|
156
167
|
}
|
|
157
168
|
|
|
@@ -227,6 +238,9 @@ function flattenAuthority(
|
|
|
227
238
|
authorityKind: "kernel",
|
|
228
239
|
authorityKernelOperation: record.authorizationRef.operation.type,
|
|
229
240
|
}
|
|
241
|
+
case "script":
|
|
242
|
+
// The run id is the executor's, which the row already holds.
|
|
243
|
+
return { ...empty, authorityKind: "script" }
|
|
230
244
|
case "disabled":
|
|
231
245
|
return { ...empty, authorityKind: "disabled" }
|
|
232
246
|
}
|
|
@@ -246,6 +260,8 @@ function inflateExecutor(row: ExecutionStorageRow): CreateExecutionInput["execut
|
|
|
246
260
|
row.executorId
|
|
247
261
|
),
|
|
248
262
|
}
|
|
263
|
+
case "script":
|
|
264
|
+
return { type: "script", runId: row.executorId }
|
|
249
265
|
default:
|
|
250
266
|
return { type: "primitive", kind: row.executorKind, runId: row.executorId }
|
|
251
267
|
}
|
|
@@ -268,6 +284,8 @@ function inflateSource(row: ExecutionStorageRow): CreateExecutionInput["source"]
|
|
|
268
284
|
}
|
|
269
285
|
case "execution":
|
|
270
286
|
return { type: "execution", executionId: row.sourceId }
|
|
287
|
+
case "script":
|
|
288
|
+
return { type: "script", path: row.sourceId }
|
|
271
289
|
}
|
|
272
290
|
}
|
|
273
291
|
|
|
@@ -336,6 +354,8 @@ function inflateAuthority(row: ExecutionStorageRow): CreateExecutionInput["autho
|
|
|
336
354
|
row.executorId
|
|
337
355
|
),
|
|
338
356
|
}
|
|
357
|
+
case "script":
|
|
358
|
+
return { type: "script", runId: row.executorId }
|
|
339
359
|
case "disabled":
|
|
340
360
|
return { type: "disabled" }
|
|
341
361
|
}
|
|
@@ -11,6 +11,7 @@ export type DurableExecutionExecutor =
|
|
|
11
11
|
| { readonly type: "primitive"; readonly kind: TrustedPrimitiveKind; readonly runId: string }
|
|
12
12
|
| { readonly type: "agent"; readonly runId: string }
|
|
13
13
|
| { readonly type: "kernel"; readonly operation: KernelOperation }
|
|
14
|
+
| { readonly type: "script"; readonly runId: string }
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Durable trigger provenance. An `execution` source is the single logical parent; queue delivery
|
|
@@ -24,6 +25,7 @@ export type DurableExecutionSource =
|
|
|
24
25
|
| { readonly type: "event"; readonly eventId: string }
|
|
25
26
|
| { readonly type: "datasetVersion"; readonly datasetId: string; readonly versionId: string }
|
|
26
27
|
| { readonly type: "execution"; readonly executionId: string }
|
|
28
|
+
| { readonly type: "script"; readonly path: string }
|
|
27
29
|
|
|
28
30
|
/** Immutable execution provenance and the reference required to restore its runtime authority. */
|
|
29
31
|
export interface ExecutionRecord {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isDeepStrictEqual } from "node:util"
|
|
2
2
|
import { normalizeRequesterGroupIds, snapshotRequesterGroupIds } from "../../auth/attribution"
|
|
3
3
|
import { kernelOperationId } from "../../execution/kernel-operation"
|
|
4
|
+
import { isScriptPath } from "../../execution/script"
|
|
4
5
|
import type {
|
|
5
6
|
AuthorizablePrincipal,
|
|
6
7
|
AuthorizationRef,
|
|
@@ -128,6 +129,9 @@ function assertExecutor(executor: DurableExecutionExecutor): void {
|
|
|
128
129
|
case "kernel":
|
|
129
130
|
assertKernelOperation(executor.operation, "Executor kernel operation")
|
|
130
131
|
return
|
|
132
|
+
case "script":
|
|
133
|
+
assertNonBlank(executor.runId, "Executor script run id")
|
|
134
|
+
return
|
|
131
135
|
default:
|
|
132
136
|
invalid(`Unknown execution executor type '${String((executor as { type?: unknown }).type)}'.`)
|
|
133
137
|
}
|
|
@@ -155,6 +159,11 @@ function assertSource(source: DurableExecutionSource): void {
|
|
|
155
159
|
case "execution":
|
|
156
160
|
assertNonBlank(source.executionId, "Execution source execution id")
|
|
157
161
|
return
|
|
162
|
+
case "script":
|
|
163
|
+
if (!isScriptPath(source.path)) {
|
|
164
|
+
invalid("Execution source script path must be relative to the project.")
|
|
165
|
+
}
|
|
166
|
+
return
|
|
158
167
|
default:
|
|
159
168
|
invalid(
|
|
160
169
|
`Execution source type '${String((source as { type?: unknown }).type)}' is not durable.`
|
|
@@ -196,6 +205,9 @@ function assertAuthorizationRef(ref: AuthorizationRef): void {
|
|
|
196
205
|
case "kernel":
|
|
197
206
|
assertKernelOperation(ref.operation, "Authority kernel operation")
|
|
198
207
|
return
|
|
208
|
+
case "script":
|
|
209
|
+
assertNonBlank(ref.runId, "Authority script run id")
|
|
210
|
+
return
|
|
199
211
|
case "disabled":
|
|
200
212
|
return
|
|
201
213
|
default:
|
|
@@ -205,6 +217,9 @@ function assertAuthorizationRef(ref: AuthorizationRef): void {
|
|
|
205
217
|
|
|
206
218
|
function assertExecutorAuthority(record: ExecutionRecord): void {
|
|
207
219
|
const { executor, authorizationRef, requestedBy, source } = record
|
|
220
|
+
if (source.type === "script" && executor.type !== "script") {
|
|
221
|
+
invalid("Only a script execution has a script source.")
|
|
222
|
+
}
|
|
208
223
|
|
|
209
224
|
switch (executor.type) {
|
|
210
225
|
case "request": {
|
|
@@ -280,6 +295,18 @@ function assertExecutorAuthority(record: ExecutionRecord): void {
|
|
|
280
295
|
}
|
|
281
296
|
return
|
|
282
297
|
}
|
|
298
|
+
case "script": {
|
|
299
|
+
if (source.type !== "script") {
|
|
300
|
+
invalid("Script executions require a script source.")
|
|
301
|
+
}
|
|
302
|
+
if (authorizationRef.type !== "script" || authorizationRef.runId !== executor.runId) {
|
|
303
|
+
invalid("Script authority must match the executor run id.")
|
|
304
|
+
}
|
|
305
|
+
if (requestedBy !== undefined) {
|
|
306
|
+
invalid("Script executions cannot have a requested-by principal.")
|
|
307
|
+
}
|
|
308
|
+
return
|
|
309
|
+
}
|
|
283
310
|
}
|
|
284
311
|
}
|
|
285
312
|
|
package/src/storage/index.ts
CHANGED
|
@@ -100,6 +100,11 @@ export type {
|
|
|
100
100
|
AgentContextCheckpointStore,
|
|
101
101
|
AgentExecutionStatus,
|
|
102
102
|
AgentHoldingApprovalMode,
|
|
103
|
+
AgentInboxClaim,
|
|
104
|
+
AgentInboxItemRecord,
|
|
105
|
+
AgentInboxMode,
|
|
106
|
+
AgentInboxSpec,
|
|
107
|
+
AgentInboxStore,
|
|
103
108
|
AgentMemoryChange,
|
|
104
109
|
AgentMemoryFile,
|
|
105
110
|
AgentMemoryRepoRecord,
|
|
@@ -135,6 +140,7 @@ export type {
|
|
|
135
140
|
AppendAgentMessageInput,
|
|
136
141
|
AssignAgentThreadComputerInput,
|
|
137
142
|
ConfirmAgentRunExecutionOwnershipInput,
|
|
143
|
+
ConsumeClaimedAgentInboxInput,
|
|
138
144
|
ConversationAgentRunRecord,
|
|
139
145
|
ConversationAgentRunSpec,
|
|
140
146
|
CreateAgentContextCheckpointInput,
|
|
@@ -144,11 +150,14 @@ export type {
|
|
|
144
150
|
DecideAgentApprovalInput,
|
|
145
151
|
DecideAgentApprovalResult,
|
|
146
152
|
DeleteAgentMessagesByRunInput,
|
|
153
|
+
EnqueueAgentInboxItemInput,
|
|
154
|
+
EnqueueAgentInboxItemResult,
|
|
147
155
|
FinishAgentRunInput,
|
|
148
156
|
FinishQueuedAgentRunInput,
|
|
149
157
|
ForkAgentThreadInput,
|
|
150
158
|
ListAgentApprovalsInput,
|
|
151
159
|
ListAgentApprovalsResult,
|
|
160
|
+
ListAgentInboxItemsInput,
|
|
152
161
|
ListAgentMemoryRevisionsInput,
|
|
153
162
|
ListAgentMemoryRevisionsResult,
|
|
154
163
|
ListAgentMessagesInput,
|
|
@@ -160,10 +169,12 @@ export type {
|
|
|
160
169
|
ListAgentThreadsInput,
|
|
161
170
|
ListAgentThreadsResult,
|
|
162
171
|
ListThreadSubagentsInput,
|
|
172
|
+
ListWaitingAgentInboxThreadsInput,
|
|
163
173
|
MarkAgentApprovalsReportedInput,
|
|
164
174
|
MoveAgentThreadToCloudInput,
|
|
165
175
|
MoveAgentThreadToCloudResult,
|
|
166
176
|
ReclaimAgentRunInput,
|
|
177
|
+
RemoveAgentInboxItemInput,
|
|
167
178
|
RemoveAgentThreadParticipantInput,
|
|
168
179
|
RequestAgentApprovalInput,
|
|
169
180
|
RequestAgentApprovalResult,
|
|
@@ -178,15 +189,20 @@ export type {
|
|
|
178
189
|
SubagentRunRecord,
|
|
179
190
|
SubagentRunResult,
|
|
180
191
|
SubagentRunSpec,
|
|
192
|
+
TakeAgentInboxSteersInput,
|
|
193
|
+
TakeNextQueuedAgentInboxInput,
|
|
181
194
|
TransitionAgentThreadSandboxInput,
|
|
195
|
+
UpdateAgentInboxItemInput,
|
|
182
196
|
} from "./agents"
|
|
183
197
|
export {
|
|
184
198
|
AGENT_APPROVAL_MODES,
|
|
185
199
|
AGENT_APPROVAL_STATUSES,
|
|
186
200
|
AGENT_HOLDING_APPROVAL_MODES,
|
|
201
|
+
AGENT_INBOX_MODES,
|
|
187
202
|
AGENT_RUN_DIAGNOSTIC_CODES,
|
|
188
203
|
AGENT_RUN_FAILURE_CODES,
|
|
189
204
|
AGENT_RUN_FINISH_REASONS,
|
|
205
|
+
AGENT_THREAD_INBOX_MAX_ITEMS,
|
|
190
206
|
AgentStorageError,
|
|
191
207
|
coerceAgentRunFinishReason,
|
|
192
208
|
InMemoryAgentStorage,
|
|
@@ -302,6 +318,8 @@ export type {
|
|
|
302
318
|
ArtifactLatestVersion,
|
|
303
319
|
ArtifactOrigin,
|
|
304
320
|
ArtifactOutline,
|
|
321
|
+
ArtifactPdfKeyInput,
|
|
322
|
+
ArtifactPdfRecord,
|
|
305
323
|
ArtifactRecord,
|
|
306
324
|
ArtifactReference,
|
|
307
325
|
ArtifactRestorePointReason,
|
package/src/storage/internal.ts
CHANGED
|
@@ -215,11 +215,33 @@ export class InMemoryOntologyReplacementPlanStorage implements OntologyReplaceme
|
|
|
215
215
|
addIdentity(plan, row.assertion, true)
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
+
if (input.createdObjects) {
|
|
219
|
+
for (const ref of this.unassertedCreatedObjects(input, input.createdObjects.objectTypeId)) {
|
|
220
|
+
addIdentity(plan, { kind: "object", ref }, true)
|
|
221
|
+
}
|
|
222
|
+
}
|
|
218
223
|
this.state.replacementPlans.set(key, plan)
|
|
219
224
|
return { committedAt: plan.committedAt }
|
|
220
225
|
})
|
|
221
226
|
}
|
|
222
227
|
|
|
228
|
+
/** The objects of `objectTypeId` an edit created and no live root of the source asserts. */
|
|
229
|
+
private *unassertedCreatedObjects(
|
|
230
|
+
input: OpenReplacementPlanInput,
|
|
231
|
+
objectTypeId: string
|
|
232
|
+
): Iterable<OntologyObjectRef> {
|
|
233
|
+
const liveRoots = this.state.activeSourceRoots.get(
|
|
234
|
+
projectEntityKey(input.projectId, input.source.projectionId)
|
|
235
|
+
)
|
|
236
|
+
for (const stored of this.state.objectOverrides.values()) {
|
|
237
|
+
if (stored.projectId !== input.projectId || stored.ref.objectTypeId !== objectTypeId) continue
|
|
238
|
+
if (stored.value.kind !== "create") continue
|
|
239
|
+
if (liveRoots?.has(projectionEntityKey({ kind: "object", ref: stored.ref }))) continue
|
|
240
|
+
|
|
241
|
+
yield stored.ref
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
223
245
|
async *streamState(
|
|
224
246
|
input: StreamReplacementPlanStateInput
|
|
225
247
|
): AsyncIterable<ReplacementPlanStatePage> {
|
|
@@ -23,6 +23,12 @@ export interface ReplacementPlanRef {
|
|
|
23
23
|
export interface OpenReplacementPlanInput extends ReplacementPlanRef {
|
|
24
24
|
/** The commit the plan's work will carry, timed for a plan opened now. */
|
|
25
25
|
readonly commit: OntologyCommitWrite
|
|
26
|
+
/**
|
|
27
|
+
* Also plans every object of this type that an edit created and no live root of the source
|
|
28
|
+
* asserts, whichever roots the candidate replaces: a source that removes what its dataset misses
|
|
29
|
+
* decides their existence too.
|
|
30
|
+
*/
|
|
31
|
+
readonly createdObjects?: { readonly objectTypeId: string }
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
export interface OpenedReplacementPlan {
|
|
@@ -293,6 +293,7 @@ export function createAgentOperationScope<T extends AgentStorage>(
|
|
|
293
293
|
approvals: createOperationScopedFacade(target.approvals, scope),
|
|
294
294
|
approvalModes: createOperationScopedFacade(target.approvalModes, scope),
|
|
295
295
|
tokenRates: createOperationScopedFacade(target.tokenRates, scope),
|
|
296
|
+
inbox: createOperationScopedFacade(target.inbox, scope),
|
|
296
297
|
computers: createOperationScopedFacade(target.computers, scope),
|
|
297
298
|
}) as T
|
|
298
299
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { agentServiceAccountId } from "../agents/authority"
|
|
2
|
-
import { SYSTEM_PRINCIPAL } from "../auth"
|
|
2
|
+
import { SYSTEM_PRINCIPAL, type UserPrincipal } from "../auth"
|
|
3
|
+
import type { AuthorizationRef } from "../execution"
|
|
3
4
|
import type { AuthStorage } from "../storage/auth"
|
|
4
5
|
import { AuthStorageError } from "../storage/auth"
|
|
5
6
|
import type { ExecutionStorage } from "../storage/executions"
|
|
@@ -16,6 +17,8 @@ export async function createTestAgentExecution(
|
|
|
16
17
|
readonly requesterGroupIds?: readonly string[]
|
|
17
18
|
/** Conversational runs inherit authority; workflow fixtures use managed authority. */
|
|
18
19
|
readonly authority?: "managed" | "inherited"
|
|
20
|
+
/** The person the run's request came from, signed in with a session; none by default. */
|
|
21
|
+
readonly requestedBy?: UserPrincipal
|
|
19
22
|
}
|
|
20
23
|
): Promise<string> {
|
|
21
24
|
const authority = input.authority ?? (input.actorId === undefined ? "inherited" : "managed")
|
|
@@ -64,14 +67,24 @@ export async function createTestAgentExecution(
|
|
|
64
67
|
id: sourceExecutionId,
|
|
65
68
|
})
|
|
66
69
|
if (!parent) {
|
|
70
|
+
const requestedBy = input.requestedBy
|
|
71
|
+
const authorizationRef: AuthorizationRef = requestedBy
|
|
72
|
+
? {
|
|
73
|
+
type: "principal",
|
|
74
|
+
principal: requestedBy,
|
|
75
|
+
credential: { type: "session", id: await ensureTestSession(storage, input, requestedBy) },
|
|
76
|
+
}
|
|
77
|
+
: { type: "disabled" }
|
|
78
|
+
|
|
67
79
|
parent = await storage.executions.create({
|
|
68
80
|
id: sourceExecutionId,
|
|
69
81
|
requesterGroupIds: input.requesterGroupIds ?? [],
|
|
70
82
|
projectId: input.projectId,
|
|
83
|
+
...(requestedBy ? { requestedBy } : {}),
|
|
71
84
|
executor: { type: "request", requestId: `test_request:${input.runId}` },
|
|
72
85
|
source: { type: "http", requestId: `test_request:${input.runId}` },
|
|
73
86
|
correlationId: `test_correlation:${input.runId}`,
|
|
74
|
-
authorizationRef
|
|
87
|
+
authorizationRef,
|
|
75
88
|
})
|
|
76
89
|
}
|
|
77
90
|
await storage.executions.create({
|
|
@@ -94,3 +107,33 @@ export async function createTestAgentExecution(
|
|
|
94
107
|
})
|
|
95
108
|
return executionId
|
|
96
109
|
}
|
|
110
|
+
|
|
111
|
+
/** The user and a session of theirs, created once, that a signed-in request's execution names. */
|
|
112
|
+
async function ensureTestSession(
|
|
113
|
+
storage: { readonly auth?: AuthStorage },
|
|
114
|
+
input: { readonly projectId: string },
|
|
115
|
+
user: UserPrincipal
|
|
116
|
+
): Promise<string> {
|
|
117
|
+
const auth = storage.auth
|
|
118
|
+
if (!auth) throw new Error("Requested Agent execution fixtures require auth storage.")
|
|
119
|
+
|
|
120
|
+
const projectId = input.projectId
|
|
121
|
+
if (!(await auth.users.getById({ projectId, id: user.id }))) {
|
|
122
|
+
await auth.users.create({ projectId, id: user.id, email: `${user.id}@example.com` })
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const id = `test_session:${user.id}`
|
|
126
|
+
if (!(await auth.sessions.getById({ projectId, id }))) {
|
|
127
|
+
const now = new Date()
|
|
128
|
+
await auth.sessions.create({
|
|
129
|
+
id,
|
|
130
|
+
projectId,
|
|
131
|
+
userId: user.id,
|
|
132
|
+
strategyId: "test",
|
|
133
|
+
tokenHash: id,
|
|
134
|
+
createdAt: now,
|
|
135
|
+
expiresAt: new Date(now.getTime() + 60 * 60_000),
|
|
136
|
+
})
|
|
137
|
+
}
|
|
138
|
+
return id
|
|
139
|
+
}
|