@sixb/core 0.2.4 → 0.2.6
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 +41 -40
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/validation.d.ts.map +1 -1
- package/dist/agents/errors.d.ts +1 -1
- package/dist/agents/errors.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +50 -3
- 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 +7 -5
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +74 -50
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/model-routing.d.ts +5 -2
- package/dist/agents/model-routing.d.ts.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 +120 -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 +10 -1
- package/dist/agents/run-events.d.ts.map +1 -1
- package/dist/agents/run-session-children.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 +9 -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.d.ts +2 -1
- package/dist/agents/streams/internal.d.ts.map +1 -1
- package/dist/agents/streams/internal.js +22 -2
- package/dist/agents/streams/internal.js.map +1 -1
- package/dist/agents/streams/protocol.d.ts +53 -0
- package/dist/agents/streams/protocol.d.ts.map +1 -1
- package/dist/agents/streams/steps.d.ts +24 -0
- package/dist/agents/streams/steps.d.ts.map +1 -0
- package/dist/agents/thread-access.d.ts +44 -2
- package/dist/agents/thread-access.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 +29 -24
- 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 +32 -23
- package/dist/artifacts/publish/index.js.map +1 -1
- package/dist/artifacts/publish/merge.d.ts +7 -6
- 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/artifacts/run-query.d.ts.map +1 -1
- package/dist/auth/index.js +6 -6
- package/dist/authorization/event-visibility.d.ts.map +1 -1
- package/dist/authorization/index.js +2 -2
- package/dist/blob-storage/index.js +1 -1
- package/dist/bootstrap/index.js +50 -48
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/calendar.d.ts +55 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +19 -0
- package/dist/calendar.js.map +9 -0
- package/dist/{chunk-5a4a52tq.js → chunk-0pmpwn3g.js} +18 -2
- package/dist/chunk-0pmpwn3g.js.map +10 -0
- package/dist/{chunk-0k3r5kb3.js → chunk-394zjzjs.js} +20 -10
- package/dist/{chunk-0k3r5kb3.js.map → chunk-394zjzjs.js.map} +5 -5
- package/dist/{chunk-stmxh0hv.js → chunk-3neam1y5.js} +2 -2
- package/dist/{chunk-zeykm8my.js → chunk-3qtk0070.js} +16 -42
- package/dist/chunk-3qtk0070.js.map +14 -0
- package/dist/{chunk-p8pgnq8d.js → chunk-425ydk65.js} +5 -5
- package/dist/{chunk-p351afzm.js → chunk-5sswe5ej.js} +2 -2
- 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-6hfbz4d0.js +98 -0
- package/dist/chunk-6hfbz4d0.js.map +10 -0
- package/dist/{chunk-3zagkr6w.js → chunk-7mhbs9yy.js} +4 -4
- package/dist/{chunk-3zagkr6w.js.map → chunk-7mhbs9yy.js.map} +1 -1
- package/dist/{chunk-gxwy4c3s.js → chunk-7r9mqpva.js} +570 -104
- package/dist/chunk-7r9mqpva.js.map +47 -0
- package/dist/{chunk-3014rfjz.js → chunk-88xeh6zx.js} +28 -8
- package/dist/{chunk-3014rfjz.js.map → chunk-88xeh6zx.js.map} +4 -4
- package/dist/{chunk-9nsjjd44.js → chunk-8tv3qd65.js} +2 -1
- package/dist/chunk-8tv3qd65.js.map +12 -0
- package/dist/chunk-90nqenq8.js +386 -0
- package/dist/chunk-90nqenq8.js.map +14 -0
- package/dist/{chunk-fe6r7yhg.js → chunk-92wrka15.js} +1 -1
- package/dist/{chunk-w1wq7gfr.js → chunk-9c9yknwt.js} +464 -29
- package/dist/{chunk-w1wq7gfr.js.map → chunk-9c9yknwt.js.map} +7 -7
- package/dist/{chunk-q9nkpr8k.js → chunk-9tpmfh3n.js} +1 -1
- package/dist/chunk-9wr3yajk.js.map +2 -2
- package/dist/{chunk-rtm1jq00.js → chunk-ats8y3d9.js} +1202 -246
- package/dist/{chunk-rtm1jq00.js.map → chunk-ats8y3d9.js.map} +16 -14
- package/dist/{chunk-td26wjr5.js → chunk-bcz9dxtf.js} +17 -47
- package/dist/chunk-bcz9dxtf.js.map +12 -0
- package/dist/chunk-bqr703h4.js +1799 -0
- package/dist/chunk-bqr703h4.js.map +13 -0
- package/dist/{chunk-sysnvjce.js → chunk-brhp9d97.js} +2 -2
- package/dist/{chunk-8a8k38tz.js → chunk-brybqw5k.js} +1 -1
- package/dist/{chunk-rsxb14an.js → chunk-bs1sd0e0.js} +12 -8
- package/dist/chunk-bs1sd0e0.js.map +18 -0
- package/dist/{chunk-eptrvnby.js → chunk-c29729me.js} +42 -3
- package/dist/chunk-c29729me.js.map +12 -0
- package/dist/{chunk-855w9nvw.js → chunk-cg7cygfj.js} +1 -1
- package/dist/chunk-dq3t5sr3.js +114 -0
- package/dist/chunk-dq3t5sr3.js.map +11 -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-r2psmn42.js → chunk-eg6xqef7.js} +1 -1
- package/dist/{chunk-7kpqntgw.js → chunk-f05994as.js} +1 -1
- package/dist/{chunk-msyevpp3.js → chunk-fmgf9h5e.js} +38 -14
- package/dist/chunk-fmgf9h5e.js.map +22 -0
- package/dist/{chunk-b9qfh2ya.js → chunk-fzbhybya.js} +29 -2
- package/dist/chunk-fzbhybya.js.map +11 -0
- package/dist/{chunk-t0s7b3d1.js → chunk-gaj8djsw.js} +251 -6
- package/dist/chunk-gaj8djsw.js.map +13 -0
- package/dist/{chunk-2bn6813a.js → chunk-grt2j5vp.js} +2 -2
- package/dist/{chunk-s7xqfxs9.js → chunk-hkbks1xm.js} +3 -1
- package/dist/{chunk-s7xqfxs9.js.map → chunk-hkbks1xm.js.map} +3 -3
- package/dist/chunk-hn2r7z41.js.map +1 -1
- package/dist/{chunk-rtdrm592.js → chunk-htdzx40w.js} +2 -2
- package/dist/{chunk-bc3y6gff.js → chunk-jka26v8c.js} +1 -1
- package/dist/{chunk-yy914zfr.js → chunk-jt012fxq.js} +772 -98
- package/dist/chunk-jt012fxq.js.map +34 -0
- package/dist/{chunk-48c1z8nj.js → chunk-kft7mp7z.js} +28 -3
- package/dist/chunk-kft7mp7z.js.map +10 -0
- package/dist/chunk-mbwsgjn7.js +40 -0
- package/dist/chunk-mbwsgjn7.js.map +11 -0
- package/dist/{chunk-wa05txmk.js → chunk-n1hbwc6y.js} +51 -8
- package/dist/chunk-n1hbwc6y.js.map +12 -0
- package/dist/{chunk-n4zzaf6q.js → chunk-nxysqbt0.js} +4 -2
- package/dist/chunk-nxysqbt0.js.map +10 -0
- package/dist/{chunk-6ef4esq4.js → chunk-pqj8vff9.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-n68vz95m.js → chunk-qbd282aa.js} +2 -2
- package/dist/{chunk-e91fmg6t.js → chunk-qsa7nw6f.js} +2 -1
- package/dist/{chunk-e91fmg6t.js.map → chunk-qsa7nw6f.js.map} +3 -3
- package/dist/{chunk-rsrc7vtw.js → chunk-s8xxef60.js} +240 -46
- package/dist/chunk-s8xxef60.js.map +50 -0
- package/dist/{chunk-r9rtavg9.js → chunk-t19wjmnc.js} +7 -7
- package/dist/{chunk-vzkxqf8h.js → chunk-tapdssb5.js} +50 -6
- package/dist/chunk-tapdssb5.js.map +23 -0
- package/dist/{chunk-dhkc9b23.js → chunk-v8a1qjzp.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-8t2ynwg0.js → chunk-wzcjhv54.js} +31 -1
- package/dist/{chunk-8t2ynwg0.js.map → chunk-wzcjhv54.js.map} +3 -3
- package/dist/{chunk-8tqnsx3q.js → chunk-xavet0qs.js} +5 -3
- package/dist/{chunk-8tqnsx3q.js.map → chunk-xavet0qs.js.map} +3 -3
- package/dist/{chunk-8bns0y68.js → chunk-xf76csps.js} +5 -5
- 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-smnt672s.js → chunk-ygvay56w.js} +20 -4
- package/dist/chunk-ygvay56w.js.map +10 -0
- package/dist/{chunk-evj5jxz3.js → chunk-ykchk644.js} +63 -15
- package/dist/{chunk-evj5jxz3.js.map → chunk-ykchk644.js.map} +7 -7
- package/dist/{chunk-vepea5c3.js → chunk-ym1bqd98.js} +6 -6
- package/dist/{chunk-yv8hv4wq.js → chunk-z4jqb44a.js} +3 -1
- package/dist/chunk-z4jqb44a.js.map +10 -0
- 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/capability.d.ts +11 -0
- package/dist/connectors/connections/capability.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/internal.d.ts +2 -1
- package/dist/connectors/connections/internal.d.ts.map +1 -1
- package/dist/connectors/connections/internal.js +8 -4
- package/dist/connectors/connections/internal.js.map +1 -1
- 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 +13 -1
- package/dist/connectors/connections/service.d.ts.map +1 -1
- package/dist/connectors/execution.d.ts +14 -2
- 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/service.d.ts +5 -1
- package/dist/connectors/service.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 +22 -2
- 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 +8 -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/events/types/syncs.d.ts +4 -0
- package/dist/events/types/syncs.d.ts.map +1 -1
- package/dist/execution/agent.js +43 -42
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorization.d.ts +5 -0
- package/dist/execution/authorization.d.ts.map +1 -1
- package/dist/execution/authorized-object-reader.d.ts +4 -0
- package/dist/execution/authorized-object-reader.d.ts.map +1 -1
- package/dist/execution/object-reader-ontology.d.ts +3 -0
- package/dist/execution/object-reader-ontology.d.ts.map +1 -1
- package/dist/execution/primitive.js +41 -40
- package/dist/execution/primitive.js.map +1 -1
- package/dist/execution/request.d.ts +1 -1
- package/dist/execution/request.d.ts.map +1 -1
- package/dist/execution/request.js +39 -38
- package/dist/execution/request.js.map +3 -3
- 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 +13 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +74 -70
- 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 +2 -2
- 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 +24 -23
- package/dist/materializer/index.js.map +1 -1
- 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/audio/runtime.d.ts.map +1 -1
- package/dist/models/audio/types.d.ts +19 -0
- package/dist/models/audio/types.d.ts.map +1 -1
- package/dist/models/execution/index.js +22 -21
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/objects/index.js +41 -40
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/query/executor.d.ts +3 -1
- package/dist/objects/query/executor.d.ts.map +1 -1
- package/dist/objects/query/explain.d.ts +3 -1
- package/dist/objects/query/explain.d.ts.map +1 -1
- package/dist/objects/query/index.d.ts +1 -1
- package/dist/objects/query/index.d.ts.map +1 -1
- package/dist/objects/query/index.js +21 -20
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/link-query-clearance.d.ts +3 -0
- package/dist/objects/query/link-query-clearance.d.ts.map +1 -1
- package/dist/objects/query/links.d.ts +1 -1
- package/dist/objects/query/links.d.ts.map +1 -1
- package/dist/objects/query/validate.d.ts +17 -0
- package/dist/objects/query/validate.d.ts.map +1 -1
- package/dist/objects/sdk/runtime-query-executor.d.ts +1 -1
- package/dist/objects/sdk/runtime-query-executor.d.ts.map +1 -1
- package/dist/ontology/index.js +3 -3
- package/dist/ontology/internal.js +3 -3
- package/dist/pipelines/index.js +27 -26
- package/dist/pipelines/index.js.map +1 -1
- 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 +22 -21
- package/dist/projections/internal.js.map +1 -1
- 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 +3 -2
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/queues/index.d.ts +1 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/index.js +1 -1
- package/dist/queues/types.d.ts +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 +47 -25
- package/dist/runtime/internal.js.map +4 -3
- package/dist/runtime/locale.d.ts +0 -2
- package/dist/runtime/locale.d.ts.map +1 -1
- 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/sandboxes/auth.d.ts +26 -4
- package/dist/sandboxes/auth.d.ts.map +1 -1
- package/dist/sandboxes/index.d.ts +3 -1
- package/dist/sandboxes/index.d.ts.map +1 -1
- package/dist/sandboxes/index.js +5 -5
- 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/security/view-conditions.d.ts.map +1 -1
- package/dist/shares/internal.js +19 -18
- package/dist/shares/internal.js.map +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 +43 -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 +54 -11
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +41 -5
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +291 -3
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/analytics.d.ts +3 -2
- package/dist/storage/ai-cost/analytics.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +4 -3
- package/dist/storage/ai-cost/provider.js.map +1 -1
- package/dist/storage/ai-cost/types.d.ts +5 -1
- package/dist/storage/ai-cost/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 +5 -2
- package/dist/storage/artifacts/record.d.ts.map +1 -1
- package/dist/storage/artifacts/types.d.ts +41 -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 +7 -7
- package/dist/storage/index.d.ts +4 -4
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +30 -25
- 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 +12 -10
- 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/sync-runs/idempotency.d.ts.map +1 -1
- package/dist/storage/sync-runs/in-memory.d.ts +2 -1
- package/dist/storage/sync-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/sync-runs/index.d.ts +1 -1
- package/dist/storage/sync-runs/index.d.ts.map +1 -1
- package/dist/storage/sync-runs/types.d.ts +27 -2
- package/dist/storage/sync-runs/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +7 -7
- package/dist/syncs/accounts.d.ts +36 -0
- package/dist/syncs/accounts.d.ts.map +1 -0
- package/dist/syncs/builders.d.ts.map +1 -1
- package/dist/syncs/connections.d.ts +36 -0
- package/dist/syncs/connections.d.ts.map +1 -0
- package/dist/syncs/execution.d.ts +14 -4
- package/dist/syncs/execution.d.ts.map +1 -1
- package/dist/syncs/index.d.ts +2 -1
- package/dist/syncs/index.d.ts.map +1 -1
- package/dist/syncs/index.js +28 -27
- package/dist/syncs/index.js.map +1 -1
- package/dist/syncs/request.d.ts +16 -2
- package/dist/syncs/request.d.ts.map +1 -1
- package/dist/syncs/run-dispatch.d.ts +14 -2
- package/dist/syncs/run-dispatch.d.ts.map +1 -1
- package/dist/testing/agent-approval-storage-contract.d.ts.map +1 -1
- 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/ai-cost-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 +6589 -4627
- package/dist/testing/index.js.map +13 -12
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/testing/run-claim-storage-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 +22 -54
- 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/index.js +66 -13
- package/dist/workers/index.js.map +4 -4
- package/dist/workers/queue-worker.d.ts +5 -0
- package/dist/workers/queue-worker.d.ts.map +1 -1
- package/dist/workers/queued-run-dispatch.d.ts.map +1 -1
- package/dist/workers/worker.d.ts +8 -0
- package/dist/workers/worker.d.ts.map +1 -1
- package/dist/workflows/index.js +50 -48
- package/dist/workflows/index.js.map +1 -1
- package/package.json +12 -1
- package/src/actions/validation.ts +3 -1
- package/src/agents/README.md +6 -2
- package/src/agents/children.ts +6 -0
- package/src/agents/errors.ts +3 -0
- package/src/agents/execution.ts +331 -43
- package/src/agents/ids.ts +5 -0
- package/src/agents/index.ts +22 -4
- package/src/agents/model-routing.ts +25 -9
- package/src/agents/queued-turn.ts +46 -0
- package/src/agents/request.ts +1444 -210
- package/src/agents/run-after-finish.ts +259 -2
- package/src/agents/run-artifacts.ts +3 -93
- package/src/agents/run-events.ts +256 -34
- package/src/agents/run-session-children.ts +13 -2
- 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 +148 -23
- package/src/agents/streams/index.ts +3 -0
- package/src/agents/streams/internal.ts +12 -0
- package/src/agents/streams/protocol.ts +109 -1
- package/src/agents/streams/steps.ts +131 -0
- package/src/agents/thread-access.ts +57 -2
- 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 +28 -15
- 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/artifacts/run-query.ts +5 -2
- package/src/authorization/event-visibility.ts +13 -0
- package/src/calendar.ts +195 -0
- package/src/connectors/connection-handles.ts +71 -0
- package/src/connectors/connections/authorizations.ts +50 -2
- package/src/connectors/connections/capability.ts +40 -0
- package/src/connectors/connections/events.ts +57 -0
- package/src/connectors/connections/internal.ts +3 -0
- package/src/connectors/connections/runs.ts +5 -0
- package/src/connectors/connections/service.ts +93 -6
- package/src/connectors/execution.ts +35 -8
- package/src/connectors/index.ts +3 -0
- package/src/connectors/service.ts +23 -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 +30 -2
- package/src/events/definitions.ts +14 -0
- package/src/events/execution.ts +51 -4
- 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/events/types/syncs.ts +4 -0
- package/src/execution/authorization.ts +45 -0
- package/src/execution/authorized-object-reader.ts +33 -5
- package/src/execution/durable.ts +2 -0
- package/src/execution/object-reader-ontology.ts +6 -0
- package/src/execution/request.ts +1 -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 +33 -0
- package/src/index.ts +39 -4
- 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/models/audio/runtime.ts +57 -14
- package/src/models/audio/types.ts +20 -0
- package/src/models/index.ts +1 -0
- package/src/objects/query/executor.ts +4 -0
- package/src/objects/query/explain.ts +5 -0
- package/src/objects/query/index.ts +1 -0
- package/src/objects/query/link-query-clearance.ts +4 -1
- package/src/objects/query/links.ts +5 -1
- package/src/objects/query/validate.ts +33 -1
- package/src/objects/sdk/runtime-query-executor.ts +7 -3
- 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 +125 -11
- package/src/runtime/internal.ts +1 -0
- package/src/runtime/locale.ts +0 -10
- package/src/runtime/resolve-definitions.ts +4 -1
- package/src/runtime/script.ts +62 -0
- package/src/runtime/sixb.ts +15 -5
- package/src/sandboxes/README.md +3 -1
- package/src/sandboxes/auth.ts +32 -4
- package/src/sandboxes/index.ts +15 -1
- package/src/schedules/builders.ts +4 -1
- package/src/schedules/runtime.ts +3 -0
- package/src/schedules/validation.ts +20 -2
- package/src/security/view-conditions.ts +2 -1
- package/src/storage/agents/errors.ts +1 -0
- package/src/storage/agents/in-memory.ts +500 -7
- package/src/storage/agents/index.ts +26 -0
- package/src/storage/agents/provider.ts +454 -15
- package/src/storage/agents/types.ts +315 -3
- package/src/storage/ai-cost/analytics.ts +22 -43
- package/src/storage/ai-cost/types.ts +5 -1
- package/src/storage/artifacts/in-memory.ts +52 -6
- package/src/storage/artifacts/index.ts +2 -0
- package/src/storage/artifacts/record.ts +33 -4
- package/src/storage/artifacts/types.ts +44 -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 +29 -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 +2 -0
- package/src/storage/sync-runs/idempotency.ts +1 -0
- package/src/storage/sync-runs/in-memory.ts +43 -1
- package/src/storage/sync-runs/index.ts +1 -0
- package/src/storage/sync-runs/types.ts +30 -1
- package/src/syncs/accounts.ts +85 -0
- package/src/syncs/builders.ts +18 -1
- package/src/syncs/connections.ts +123 -0
- package/src/syncs/execution.ts +64 -22
- package/src/syncs/index.ts +3 -0
- package/src/syncs/request.ts +81 -23
- package/src/syncs/run-dispatch.ts +69 -7
- package/src/testing/agent-approval-storage-contract.ts +123 -0
- package/src/testing/agent-execution.ts +45 -2
- package/src/testing/agent-inbox-storage-contract.ts +874 -0
- package/src/testing/agent-storage-contract.ts +965 -103
- package/src/testing/ai-cost-storage-contract.ts +80 -0
- package/src/testing/artifact-storage-contract.ts +201 -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/testing/run-claim-storage-contract.ts +116 -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/README.md +4 -1
- package/src/workers/lost-runs.ts +1 -0
- package/src/workers/queue-worker.ts +16 -5
- package/src/workers/queued-run-dispatch.ts +8 -1
- package/src/workers/worker.ts +67 -7
- package/dist/chunk-3z1vxzcm.js +0 -234
- package/dist/chunk-3z1vxzcm.js.map +0 -12
- 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-5a4a52tq.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-msyevpp3.js.map +0 -22
- package/dist/chunk-n4zzaf6q.js.map +0 -10
- package/dist/chunk-rsrc7vtw.js.map +0 -49
- package/dist/chunk-rsxb14an.js.map +0 -18
- package/dist/chunk-smnt672s.js.map +0 -10
- package/dist/chunk-t0s7b3d1.js.map +0 -13
- package/dist/chunk-td26wjr5.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-zeykm8my.js.map +0 -14
- /package/dist/{chunk-stmxh0hv.js.map → chunk-3neam1y5.js.map} +0 -0
- /package/dist/{chunk-p8pgnq8d.js.map → chunk-425ydk65.js.map} +0 -0
- /package/dist/{chunk-p351afzm.js.map → chunk-5sswe5ej.js.map} +0 -0
- /package/dist/{chunk-e0hnbb1m.js.map → chunk-61zptves.js.map} +0 -0
- /package/dist/{chunk-fe6r7yhg.js.map → chunk-92wrka15.js.map} +0 -0
- /package/dist/{chunk-q9nkpr8k.js.map → chunk-9tpmfh3n.js.map} +0 -0
- /package/dist/{chunk-sysnvjce.js.map → chunk-brhp9d97.js.map} +0 -0
- /package/dist/{chunk-8a8k38tz.js.map → chunk-brybqw5k.js.map} +0 -0
- /package/dist/{chunk-855w9nvw.js.map → chunk-cg7cygfj.js.map} +0 -0
- /package/dist/{chunk-r2psmn42.js.map → chunk-eg6xqef7.js.map} +0 -0
- /package/dist/{chunk-7kpqntgw.js.map → chunk-f05994as.js.map} +0 -0
- /package/dist/{chunk-2bn6813a.js.map → chunk-grt2j5vp.js.map} +0 -0
- /package/dist/{chunk-rtdrm592.js.map → chunk-htdzx40w.js.map} +0 -0
- /package/dist/{chunk-bc3y6gff.js.map → chunk-jka26v8c.js.map} +0 -0
- /package/dist/{chunk-6ef4esq4.js.map → chunk-pqj8vff9.js.map} +0 -0
- /package/dist/{chunk-n68vz95m.js.map → chunk-qbd282aa.js.map} +0 -0
- /package/dist/{chunk-r9rtavg9.js.map → chunk-t19wjmnc.js.map} +0 -0
- /package/dist/{chunk-dhkc9b23.js.map → chunk-v8a1qjzp.js.map} +0 -0
- /package/dist/{chunk-8bns0y68.js.map → chunk-xf76csps.js.map} +0 -0
- /package/dist/{chunk-vepea5c3.js.map → chunk-ym1bqd98.js.map} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** The longest script path an execution records, so a stored source stays a short label. */
|
|
2
|
+
const MAX_SCRIPT_PATH_LENGTH = 1_024
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A script execution names its file by a path relative to the project, with forward slashes: what
|
|
6
|
+
* a reader of the record can find in the repository.
|
|
7
|
+
*/
|
|
8
|
+
export function isScriptPath(path: unknown): path is string {
|
|
9
|
+
return (
|
|
10
|
+
typeof path === "string" &&
|
|
11
|
+
path !== "" &&
|
|
12
|
+
path.trim() === path &&
|
|
13
|
+
path.length <= MAX_SCRIPT_PATH_LENGTH &&
|
|
14
|
+
!path.startsWith("/") &&
|
|
15
|
+
!path.includes("\\") &&
|
|
16
|
+
!path.includes("\0") &&
|
|
17
|
+
path.split("/").every((segment) => segment !== "" && segment !== "." && segment !== "..")
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function assertScriptPath(path: unknown): asserts path is string {
|
|
22
|
+
if (!isScriptPath(path)) {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`[Sixb] Script path '${String(path)}' must be relative to the project, such as 'scripts/fix.ts'.`
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
}
|
package/src/execution/types.ts
CHANGED
|
@@ -41,6 +41,8 @@ export type ExecutionExecutor =
|
|
|
41
41
|
}
|
|
42
42
|
| { readonly type: "agent"; readonly actorId?: string; readonly runId: string }
|
|
43
43
|
| { readonly type: "kernel"; readonly operation: KernelOperation }
|
|
44
|
+
/** A script someone ran with `sixb run`. */
|
|
45
|
+
| { readonly type: "script"; readonly runId: string }
|
|
44
46
|
|
|
45
47
|
/**
|
|
46
48
|
* Occurrence that directly triggered an execution.
|
|
@@ -55,8 +57,10 @@ export type ExecutionSource =
|
|
|
55
57
|
| { readonly type: "event"; readonly eventId: string }
|
|
56
58
|
| { readonly type: "datasetVersion"; readonly datasetId: string; readonly versionId: string }
|
|
57
59
|
| { readonly type: "execution"; readonly executionId: string }
|
|
60
|
+
/** The script file, relative to the project, that `sixb run` ran. */
|
|
61
|
+
| { readonly type: "script"; readonly path: string }
|
|
58
62
|
|
|
59
|
-
/** Immutable provenance for one request, primitive run, agent run,
|
|
63
|
+
/** Immutable provenance for one request, primitive run, agent run, kernel operation, or script. */
|
|
60
64
|
export interface ExecutionContext {
|
|
61
65
|
readonly id: string
|
|
62
66
|
readonly projectId: string
|
|
@@ -78,6 +82,8 @@ export type AuthorizationRef =
|
|
|
78
82
|
| { readonly type: "trustedPrimitive"; readonly primitive: TrustedPrimitiveRef }
|
|
79
83
|
| { readonly type: "delegated"; readonly delegation: SharedAccessDelegationRef }
|
|
80
84
|
| { readonly type: "kernel"; readonly operation: KernelOperation }
|
|
85
|
+
/** Unrestricted: whoever runs a script already holds the project's storage credentials. */
|
|
86
|
+
| { readonly type: "script"; readonly runId: string }
|
|
81
87
|
| { readonly type: "disabled" }
|
|
82
88
|
|
|
83
89
|
class RuntimeAuthorizationCapability {
|
package/src/http/api-routes.ts
CHANGED
|
@@ -444,6 +444,15 @@ export const SIXB_API_ROUTES: readonly SixbApiRoute[] = [
|
|
|
444
444
|
accessToken: true,
|
|
445
445
|
agentApi: true,
|
|
446
446
|
},
|
|
447
|
+
// What waits beside the turn that runs, for the people reading and writing the thread. A run token
|
|
448
|
+
// reaches none of it: a steer arrives in the turn by itself, and the Agent has no inbox to read.
|
|
449
|
+
{
|
|
450
|
+
operationId: "listAgentThreadInbox",
|
|
451
|
+
method: "GET",
|
|
452
|
+
path: "/api/agent-threads/:threadId/inbox",
|
|
453
|
+
accessToken: true,
|
|
454
|
+
agentApi: false,
|
|
455
|
+
},
|
|
447
456
|
{
|
|
448
457
|
operationId: "getAgentMessageFileContent",
|
|
449
458
|
method: "GET",
|
|
@@ -660,6 +669,22 @@ export const SIXB_API_ROUTES: readonly SixbApiRoute[] = [
|
|
|
660
669
|
agentApi: true,
|
|
661
670
|
sharedSession: true,
|
|
662
671
|
},
|
|
672
|
+
{
|
|
673
|
+
operationId: "printArtifactPdf",
|
|
674
|
+
method: "POST",
|
|
675
|
+
path: "/api/artifacts/:artifactId/versions/:version/pdf",
|
|
676
|
+
accessToken: true,
|
|
677
|
+
agentApi: false,
|
|
678
|
+
sharedSession: true,
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
operationId: "getArtifactPdf",
|
|
682
|
+
method: "GET",
|
|
683
|
+
path: "/api/artifacts/:artifactId/versions/:version/pdf",
|
|
684
|
+
accessToken: true,
|
|
685
|
+
agentApi: false,
|
|
686
|
+
sharedSession: true,
|
|
687
|
+
},
|
|
663
688
|
{
|
|
664
689
|
operationId: "getArtifactBoardPreview",
|
|
665
690
|
method: "GET",
|
|
@@ -855,6 +880,14 @@ export const SIXB_API_ROUTES: readonly SixbApiRoute[] = [
|
|
|
855
880
|
accessToken: true,
|
|
856
881
|
agentApi: true,
|
|
857
882
|
},
|
|
883
|
+
// Account labels are people's sign-in names: for the dashboard and scripts, not the Agent.
|
|
884
|
+
{
|
|
885
|
+
operationId: "listConnectorAccounts",
|
|
886
|
+
method: "GET",
|
|
887
|
+
path: "/api/connectors/:connectorId/accounts",
|
|
888
|
+
accessToken: true,
|
|
889
|
+
agentApi: false,
|
|
890
|
+
},
|
|
858
891
|
{
|
|
859
892
|
operationId: "listSyncRuns",
|
|
860
893
|
method: "GET",
|
package/src/index.ts
CHANGED
|
@@ -235,6 +235,14 @@ export type {
|
|
|
235
235
|
ArtifactCommentedEvent,
|
|
236
236
|
ArtifactEvent,
|
|
237
237
|
ArtifactUpdatedEvent,
|
|
238
|
+
ConnectorConnectionConnectedEvent,
|
|
239
|
+
ConnectorConnectionDisconnectedEvent,
|
|
240
|
+
ConnectorEvent,
|
|
241
|
+
ConnectorEventSelectorBuilder,
|
|
242
|
+
ConnectorEventSelectorContext,
|
|
243
|
+
ConnectorEventSelectorEvent,
|
|
244
|
+
ConnectorEventSelectorOperation,
|
|
245
|
+
ConnectorEventToken,
|
|
238
246
|
DatasetEvent,
|
|
239
247
|
DatasetEventSelectorBuilder,
|
|
240
248
|
DatasetEventSelectorContext,
|
|
@@ -638,6 +646,7 @@ export type {
|
|
|
638
646
|
ObjectExpansion,
|
|
639
647
|
ObjectQuery,
|
|
640
648
|
ObjectQueryDirection,
|
|
649
|
+
ObjectQueryDiscovery,
|
|
641
650
|
ObjectQueryExpand,
|
|
642
651
|
ObjectQueryFilter,
|
|
643
652
|
ObjectQueryLimit,
|
|
@@ -682,16 +691,19 @@ export type {
|
|
|
682
691
|
ConnectorAdapter,
|
|
683
692
|
ConnectorClient,
|
|
684
693
|
ConnectorConnectionClientContext,
|
|
694
|
+
ConnectorConnectionHandle,
|
|
685
695
|
ConnectorConnectionMetadata,
|
|
686
696
|
ConnectorConnectionOptions,
|
|
687
697
|
ConnectorConnectionOwner,
|
|
688
698
|
ConnectorConnectionSelector,
|
|
699
|
+
ConnectorConnections,
|
|
689
700
|
ConnectorContext,
|
|
690
701
|
ConnectorDefinition,
|
|
691
702
|
ConnectorDefinitionOptions,
|
|
692
703
|
ConnectorOAuth2Authentication,
|
|
693
704
|
ConnectorOAuthCredentials,
|
|
694
705
|
ConnectorOAuthErrorKind,
|
|
706
|
+
ConnectorOAuthRevocation,
|
|
695
707
|
ConnectorTokenSource,
|
|
696
708
|
OAuthConnectorAdapter,
|
|
697
709
|
OAuthConnectorAuthorizationContext,
|
|
@@ -710,8 +722,6 @@ export type {
|
|
|
710
722
|
WebhookBodyFormat,
|
|
711
723
|
WebhookBodyParser,
|
|
712
724
|
WebhookBodySchema,
|
|
713
|
-
WebhookConnection,
|
|
714
|
-
WebhookConnections,
|
|
715
725
|
WebhookConnectorClient,
|
|
716
726
|
WebhookDefinition,
|
|
717
727
|
WebhookHandlerContext,
|
|
@@ -740,6 +750,8 @@ export type {
|
|
|
740
750
|
BatchSyncDefinitionConfig,
|
|
741
751
|
DatasetSyncTarget,
|
|
742
752
|
RequestSyncRunInput,
|
|
753
|
+
SyncAccount,
|
|
754
|
+
SyncAccountsRuntime,
|
|
743
755
|
SyncBuilder,
|
|
744
756
|
SyncConnectorConnection,
|
|
745
757
|
SyncDefinition,
|
|
@@ -750,6 +762,7 @@ export type {
|
|
|
750
762
|
SyncReadResult,
|
|
751
763
|
SyncRunRequestOptions,
|
|
752
764
|
SyncRunRequestResult,
|
|
765
|
+
SyncRunRequestResults,
|
|
753
766
|
SyncTargetBuilder,
|
|
754
767
|
} from "./syncs"
|
|
755
768
|
export { defineSync } from "./syncs"
|
|
@@ -946,6 +959,8 @@ export type {
|
|
|
946
959
|
AgentApprovalDecision,
|
|
947
960
|
AgentApprovalsRuntime,
|
|
948
961
|
AgentChildListResult,
|
|
962
|
+
AgentInboxMessageUpdate,
|
|
963
|
+
AgentInboxRuntime,
|
|
949
964
|
AgentPreferences,
|
|
950
965
|
AgentPreferencesRuntime,
|
|
951
966
|
AgentRunListResult,
|
|
@@ -957,6 +972,7 @@ export type {
|
|
|
957
972
|
ConversationAgentRunView,
|
|
958
973
|
DecideExecutionAgentApprovalInput,
|
|
959
974
|
ExecutionAgentRunResult,
|
|
975
|
+
ExecutionAgentSendResult,
|
|
960
976
|
ListAgentChildrenInput,
|
|
961
977
|
ListAgentThreadViewsResult,
|
|
962
978
|
ListExecutionAgentApprovalsInput,
|
|
@@ -972,7 +988,12 @@ export type {
|
|
|
972
988
|
SaveAgentMemoryRuntimeResult,
|
|
973
989
|
} from "./agents/memory-execution"
|
|
974
990
|
export type { AgentThreadParticipantInput } from "./agents/participants"
|
|
975
|
-
export type {
|
|
991
|
+
export type {
|
|
992
|
+
AgentThreadLastRunView,
|
|
993
|
+
AgentThreadParticipant,
|
|
994
|
+
AgentThreadReadView,
|
|
995
|
+
AgentThreadView,
|
|
996
|
+
} from "./agents/thread-access"
|
|
976
997
|
export type { ArtifactAccess } from "./artifacts/access"
|
|
977
998
|
export type { ArtifactCommentInput } from "./artifacts/comments"
|
|
978
999
|
export type { ArtifactRequestErrorCode } from "./artifacts/errors"
|
|
@@ -981,6 +1002,7 @@ export type {
|
|
|
981
1002
|
ArtifactContentInput,
|
|
982
1003
|
ArtifactHolderObject,
|
|
983
1004
|
ArtifactHolders,
|
|
1005
|
+
ArtifactPdf,
|
|
984
1006
|
ArtifactQueryInput,
|
|
985
1007
|
ArtifactStateRuntime,
|
|
986
1008
|
ArtifactStateValue,
|
|
@@ -1142,6 +1164,7 @@ export {
|
|
|
1142
1164
|
SixbHost,
|
|
1143
1165
|
SyncValidationError,
|
|
1144
1166
|
} from "./runtime"
|
|
1167
|
+
export type { ScriptContext } from "./runtime/script"
|
|
1145
1168
|
export type { SchedulesRuntime } from "./schedules/execution"
|
|
1146
1169
|
export type {
|
|
1147
1170
|
ActionRunFailure,
|
|
@@ -1211,6 +1234,7 @@ export type {
|
|
|
1211
1234
|
AgentMailPart,
|
|
1212
1235
|
AgentMemoryReference,
|
|
1213
1236
|
AgentMessage,
|
|
1237
|
+
AgentMessageDelivery,
|
|
1214
1238
|
AgentMessagePart,
|
|
1215
1239
|
AgentMessagePartType,
|
|
1216
1240
|
AgentMessageRole,
|
|
@@ -1252,13 +1276,17 @@ export type {
|
|
|
1252
1276
|
AgentToolTextContent,
|
|
1253
1277
|
AgentUsageReference,
|
|
1254
1278
|
AgentWebOptions,
|
|
1279
|
+
EditAgentMessageInput,
|
|
1255
1280
|
InferAgentToolInput,
|
|
1256
1281
|
InferAgentToolInputSchema,
|
|
1257
1282
|
InferAgentToolOutput,
|
|
1258
1283
|
RequestAgentRunInput,
|
|
1259
1284
|
RequestAgentRunResult,
|
|
1285
|
+
SendAgentMessageInput,
|
|
1286
|
+
SendAgentMessageResult,
|
|
1260
1287
|
} from "./agents"
|
|
1261
1288
|
export {
|
|
1289
|
+
AGENT_MESSAGE_DELIVERIES,
|
|
1262
1290
|
AGENT_REASONING_LEVELS,
|
|
1263
1291
|
AgentDefinitionError,
|
|
1264
1292
|
AgentRequestError,
|
|
@@ -1271,7 +1299,13 @@ export {
|
|
|
1271
1299
|
MAX_AGENT_APP_STATE_TOTAL_BYTES,
|
|
1272
1300
|
MAX_AGENT_CONTEXT_ENTRIES,
|
|
1273
1301
|
} from "./agents"
|
|
1274
|
-
export type {
|
|
1302
|
+
export type {
|
|
1303
|
+
SandboxConnectionTokenResolver,
|
|
1304
|
+
SandboxOAuthConnector,
|
|
1305
|
+
SandboxSourceAuth,
|
|
1306
|
+
SandboxSourceAuthInput,
|
|
1307
|
+
SandboxSourceCredentials,
|
|
1308
|
+
} from "./sandboxes/auth"
|
|
1275
1309
|
export type {
|
|
1276
1310
|
SandboxConfig,
|
|
1277
1311
|
SandboxDefinition,
|
|
@@ -1398,6 +1432,7 @@ export type {
|
|
|
1398
1432
|
ObjectProjectionBuilder,
|
|
1399
1433
|
ObjectProjectionConflictResolution,
|
|
1400
1434
|
ObjectProjectionDefinition,
|
|
1435
|
+
ObjectProjectionMissingPolicy,
|
|
1401
1436
|
ObjectProjectionTarget,
|
|
1402
1437
|
ProjectionDefinition,
|
|
1403
1438
|
ProjectionDefinitionCatalog,
|
package/src/lineage/executors.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { LineageReader } from "./reader"
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The key a run is counted under once hidden, for an executor that names one: a primitive's run or
|
|
10
|
-
* an Agent run. A request
|
|
10
|
+
* an Agent run. A request, a kernel operation, or a script names none.
|
|
11
11
|
*/
|
|
12
12
|
export function executorRunKey(executor: EventExecutor): string | undefined {
|
|
13
13
|
switch (executor.type) {
|
|
@@ -17,6 +17,7 @@ export function executorRunKey(executor: EventExecutor): string | undefined {
|
|
|
17
17
|
return `agent-run:${executor.runId}`
|
|
18
18
|
case "request":
|
|
19
19
|
case "kernel":
|
|
20
|
+
case "script":
|
|
20
21
|
return undefined
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -56,6 +57,7 @@ async function canViewExecutorRun(
|
|
|
56
57
|
switch (executor.type) {
|
|
57
58
|
case "request":
|
|
58
59
|
case "kernel":
|
|
60
|
+
case "script":
|
|
59
61
|
return true
|
|
60
62
|
case "agent":
|
|
61
63
|
return canViewAgentRun(reader, executor.runId)
|
|
@@ -116,13 +116,13 @@ export function materializationEvent(
|
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
118
|
* What the events of a commit say about who asked for it and what wrote it, read from the
|
|
119
|
-
* execution it ran under. A primitive's id lives in the execution's authority
|
|
120
|
-
* durable record keeps
|
|
119
|
+
* execution it ran under. A primitive's id lives in the execution's authority and a script's path
|
|
120
|
+
* in its source, the only places the durable record keeps them.
|
|
121
121
|
*/
|
|
122
122
|
export function eventAttribution(
|
|
123
123
|
execution: Pick<
|
|
124
124
|
ExecutionRecord,
|
|
125
|
-
"id" | "correlationId" | "requestedBy" | "executor" | "authorizationRef"
|
|
125
|
+
"id" | "correlationId" | "requestedBy" | "executor" | "authorizationRef" | "source"
|
|
126
126
|
>
|
|
127
127
|
): OntologyMaterializationEventAttribution {
|
|
128
128
|
const attribution = {
|
|
@@ -135,9 +135,9 @@ export function eventAttribution(
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
function eventExecutor(
|
|
138
|
-
execution: Pick<ExecutionRecord, "id" | "executor" | "authorizationRef">
|
|
138
|
+
execution: Pick<ExecutionRecord, "id" | "executor" | "authorizationRef" | "source">
|
|
139
139
|
): EventExecutor {
|
|
140
|
-
const { executor, authorizationRef } = execution
|
|
140
|
+
const { executor, authorizationRef, source } = execution
|
|
141
141
|
switch (executor.type) {
|
|
142
142
|
case "request":
|
|
143
143
|
return { type: "request", requestId: executor.requestId }
|
|
@@ -145,6 +145,11 @@ function eventExecutor(
|
|
|
145
145
|
return { type: "agent", runId: executor.runId }
|
|
146
146
|
case "kernel":
|
|
147
147
|
return { type: "kernel", operation: structuredClone(executor.operation) }
|
|
148
|
+
case "script":
|
|
149
|
+
if (source.type !== "script") {
|
|
150
|
+
throw new Error(`[Sixb] Script execution '${execution.id}' has no script source.`)
|
|
151
|
+
}
|
|
152
|
+
return { type: "script", runId: executor.runId, path: source.path }
|
|
148
153
|
case "primitive":
|
|
149
154
|
if (
|
|
150
155
|
authorizationRef.type !== "trustedPrimitive" ||
|
|
@@ -29,6 +29,8 @@ export type EventExecutor =
|
|
|
29
29
|
}
|
|
30
30
|
| { readonly type: "agent"; readonly runId: string }
|
|
31
31
|
| { readonly type: "kernel"; readonly operation: KernelOperation }
|
|
32
|
+
/** A `sixb run` script, by its path relative to the project. */
|
|
33
|
+
| { readonly type: "script"; readonly runId: string; readonly path: string }
|
|
32
34
|
|
|
33
35
|
interface OntologyMaterializationEventBase {
|
|
34
36
|
readonly id: string
|
|
@@ -230,6 +230,12 @@ export interface ProjectionSourceReplacement {
|
|
|
230
230
|
/** Without a base, entries replace the whole source. With a base, unchanged roots are retained. */
|
|
231
231
|
readonly entries: AsyncIterable<ProjectionSourceEntry | ProjectionSourceDeletion>
|
|
232
232
|
readonly base?: ProjectionSourceBase
|
|
233
|
+
/**
|
|
234
|
+
* When the data of `datasetVersion` started being read from its source: the earliest start of
|
|
235
|
+
* the sync runs it comes from, through every pipeline in between. Omitted when unknown. A
|
|
236
|
+
* projection that removes what its dataset misses removes nothing an edit wrote after it.
|
|
237
|
+
*/
|
|
238
|
+
readonly sourceReadAt?: string
|
|
233
239
|
readonly signal?: AbortSignal
|
|
234
240
|
}
|
|
235
241
|
|
|
@@ -112,6 +112,16 @@ of the run, unless the active source the plan replaces moved meanwhile: the plan
|
|
|
112
112
|
Storage keeps a plan while its candidate is ready and maintenance deletes it afterwards, before the
|
|
113
113
|
candidate itself, along with the touches no ready plan still needs.
|
|
114
114
|
|
|
115
|
+
An object an edit created exists through its `create` override, whatever the source holds. A
|
|
116
|
+
projection with `.whenMissing("remove")` hands that existence to its source once the source was
|
|
117
|
+
read after the edit: given the read time (`sourceReadAt`, which the worker resolves from the
|
|
118
|
+
dataset version's lineage), the plan rewrites the `create` of an object written before it, and
|
|
119
|
+
missing from the candidate, as a `patch`, in the same commit. The object then goes like any object
|
|
120
|
+
its source withdraws, and its edited values stay dormant until the row comes back. `open` adds the
|
|
121
|
+
created objects no live root asserts; those a live root asserts are planned with their root. That
|
|
122
|
+
holds for a delta too: an object no live root asserts is missing from the whole version unless the
|
|
123
|
+
delta adds it, and one a live root asserts is decided only when the delta replaces that root.
|
|
124
|
+
|
|
115
125
|
The commit time is fixed when the plan opens: every planned row carries it as `updatedAt`, every
|
|
116
126
|
planned event as `occurredAt`. A resumed plan keeps it, so a publication that commits later than
|
|
117
127
|
it opened, after retries, stamps its writes with that earlier time, even over an edit committed in
|
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
OntologyMaterializationStorage,
|
|
24
24
|
OntologySourceRecord,
|
|
25
25
|
OntologyStorage,
|
|
26
|
+
OpenReplacementPlanInput,
|
|
26
27
|
ReplacementPlanRef,
|
|
27
28
|
ReplacementPlanStatus,
|
|
28
29
|
} from "../../storage/ontology"
|
|
@@ -50,6 +51,7 @@ import {
|
|
|
50
51
|
normalizePinnedDatasetVersion,
|
|
51
52
|
normalizeProjectionExecution,
|
|
52
53
|
normalizeProjectionSourceRef,
|
|
54
|
+
normalizeSourceReadAt,
|
|
53
55
|
} from "../shared/normalize"
|
|
54
56
|
import { createProjectionRunMaterializationIdentity } from "../shared/projection-run"
|
|
55
57
|
import { createProjectionEntryValidator } from "./entry-validator"
|
|
@@ -67,6 +69,11 @@ interface PreparedProjectionReplacement {
|
|
|
67
69
|
readonly execution: ProjectionExecution
|
|
68
70
|
readonly entries: AsyncIterable<ProjectionSourceEntry | ProjectionSourceDeletion>
|
|
69
71
|
readonly base?: ProjectionSourceBase
|
|
72
|
+
/**
|
|
73
|
+
* Set when the projection removes what its dataset misses and its source read time is known:
|
|
74
|
+
* an object an edit created before it, which the dataset does not hold, is withdrawn.
|
|
75
|
+
*/
|
|
76
|
+
readonly withdrawCreatesBefore?: string
|
|
70
77
|
readonly signal?: AbortSignal
|
|
71
78
|
readonly resolved: ResolvedSourceProjection
|
|
72
79
|
readonly projectionKind: "object" | "link"
|
|
@@ -127,12 +134,14 @@ function prepareProjectionReplacement(
|
|
|
127
134
|
idempotencyKey: createProjectionIdempotencyKey(runIdentity),
|
|
128
135
|
normalizedCallerIntent: { source, datasetVersion },
|
|
129
136
|
})
|
|
137
|
+
const withdrawCreatesBefore = missingRemovalReadAt(resolved, raw.input.sourceReadAt)
|
|
130
138
|
const command = {
|
|
131
139
|
source,
|
|
132
140
|
datasetVersion,
|
|
133
141
|
execution,
|
|
134
142
|
entries: raw.input.entries,
|
|
135
143
|
...(raw.input.base ? { base: Object.freeze({ ...raw.input.base }) } : {}),
|
|
144
|
+
...(withdrawCreatesBefore ? { withdrawCreatesBefore } : {}),
|
|
136
145
|
resolved,
|
|
137
146
|
projectionKind,
|
|
138
147
|
runIdentity,
|
|
@@ -143,6 +152,21 @@ function prepareProjectionReplacement(
|
|
|
143
152
|
return { ...command, signal: raw.input.signal }
|
|
144
153
|
}
|
|
145
154
|
|
|
155
|
+
/**
|
|
156
|
+
* A read time matters only to a projection that removes what its dataset misses. An unknown one
|
|
157
|
+
* withdraws nothing: the projection keeps what edits created, as it does without the policy.
|
|
158
|
+
*/
|
|
159
|
+
function missingRemovalReadAt(
|
|
160
|
+
resolved: ResolvedSourceProjection,
|
|
161
|
+
sourceReadAt: string | undefined
|
|
162
|
+
): string | undefined {
|
|
163
|
+
if (sourceReadAt === undefined) return undefined
|
|
164
|
+
if (resolved.definition._tag !== "ObjectProjectionDefinition") return undefined
|
|
165
|
+
if (resolved.definition.missing !== "remove") return undefined
|
|
166
|
+
|
|
167
|
+
return normalizeSourceReadAt(sourceReadAt)
|
|
168
|
+
}
|
|
169
|
+
|
|
146
170
|
function validateProjectionDataset(
|
|
147
171
|
resolved: ResolvedSourceProjection,
|
|
148
172
|
datasetVersion: PinnedDatasetVersion
|
|
@@ -351,6 +375,7 @@ async function commitProjectionCandidate(
|
|
|
351
375
|
const { committedAt } = await plans.open({
|
|
352
376
|
...plan,
|
|
353
377
|
commit: projectionCommit(context.projectId, command, ready.identity),
|
|
378
|
+
...createdObjectsToPlan(command),
|
|
354
379
|
})
|
|
355
380
|
const commit = projectionCommit(context.projectId, command, { ...ready.identity, committedAt })
|
|
356
381
|
for (let round = 1; ; round += 1) {
|
|
@@ -510,11 +535,27 @@ function projectionCommit(
|
|
|
510
535
|
}
|
|
511
536
|
}
|
|
512
537
|
|
|
538
|
+
/** The objects edits created, which only a projection that withdraws them has to decide. */
|
|
539
|
+
function createdObjectsToPlan(
|
|
540
|
+
command: PreparedProjectionReplacement
|
|
541
|
+
): Pick<OpenReplacementPlanInput, "createdObjects"> {
|
|
542
|
+
const { definition } = command.resolved
|
|
543
|
+
if (!command.withdrawCreatesBefore || definition._tag !== "ObjectProjectionDefinition") return {}
|
|
544
|
+
|
|
545
|
+
return { createdObjects: { objectTypeId: definition.objectTypeId } }
|
|
546
|
+
}
|
|
547
|
+
|
|
513
548
|
function planInput(
|
|
514
549
|
command: PreparedProjectionReplacement,
|
|
515
550
|
commit: OntologyCommitWrite
|
|
516
551
|
): ProjectionReplacementPlanInput {
|
|
517
|
-
const input = {
|
|
552
|
+
const input = {
|
|
553
|
+
projectionKind: command.projectionKind,
|
|
554
|
+
commit,
|
|
555
|
+
...(command.withdrawCreatesBefore
|
|
556
|
+
? { withdrawCreatesBefore: command.withdrawCreatesBefore }
|
|
557
|
+
: {}),
|
|
558
|
+
}
|
|
518
559
|
return command.signal === undefined ? input : { ...input, signal: command.signal }
|
|
519
560
|
}
|
|
520
561
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
EffectiveLinkChange,
|
|
3
|
+
EffectiveObjectChange,
|
|
4
|
+
ObjectOverride,
|
|
5
|
+
} from "../../materialization/model"
|
|
2
6
|
import {
|
|
3
7
|
linkRefKey,
|
|
4
8
|
linkRefSortKey,
|
|
@@ -8,6 +12,7 @@ import {
|
|
|
8
12
|
utf8JsonByteLength,
|
|
9
13
|
} from "../../materialization/refs"
|
|
10
14
|
import type {
|
|
15
|
+
ExactObjectOverrideWrite,
|
|
11
16
|
MaterializationPlanWorkItem,
|
|
12
17
|
MaterializationWorkRecord,
|
|
13
18
|
OntologyCommitWrite,
|
|
@@ -48,6 +53,8 @@ export interface ProjectionReplacementPlanInput {
|
|
|
48
53
|
readonly projectionKind: "object" | "link"
|
|
49
54
|
/** The commit the plan carries, timed as the plan was opened. */
|
|
50
55
|
readonly commit: OntologyCommitWrite
|
|
56
|
+
/** An object an edit created before this instant, and that the dataset misses, is withdrawn. */
|
|
57
|
+
readonly withdrawCreatesBefore?: string
|
|
51
58
|
readonly signal?: AbortSignal
|
|
52
59
|
}
|
|
53
60
|
|
|
@@ -121,7 +128,9 @@ function planReplacementObject(
|
|
|
121
128
|
input: ProjectionReplacementPlanInput,
|
|
122
129
|
state: SourceReplacementObjectState
|
|
123
130
|
): MaterializationWorkRecord[] {
|
|
124
|
-
const
|
|
131
|
+
const withdrawn = withdrawnCreate(input, state)
|
|
132
|
+
const override = withdrawn ? withdrawn.value : (state.override?.value ?? null)
|
|
133
|
+
const resolved = resolveReplacementObject(context, state, override)
|
|
125
134
|
if (resolved) validateEffectiveObject(context.ontology, resolved.ref, resolved.properties)
|
|
126
135
|
|
|
127
136
|
const change = diffEffectiveObject({
|
|
@@ -144,6 +153,10 @@ function planReplacementObject(
|
|
|
144
153
|
work.push({ kind: "incident-object", recordKey: `incident:${sortKey}`, ref: state.ref })
|
|
145
154
|
}
|
|
146
155
|
|
|
156
|
+
if (withdrawn) {
|
|
157
|
+
work.push(planWork({ kind: "object-override-upsert", value: withdrawn }, sortKey))
|
|
158
|
+
}
|
|
159
|
+
|
|
147
160
|
if (!change) return work
|
|
148
161
|
appendObjectChangeWork(context, work, sortKey, change)
|
|
149
162
|
return work
|
|
@@ -257,15 +270,42 @@ function appendLinkChangeWork(
|
|
|
257
270
|
work.push(eventWork(buildLinkMaterializationEventDraft(change)))
|
|
258
271
|
}
|
|
259
272
|
|
|
273
|
+
/**
|
|
274
|
+
* An edit's create gives its object existence until the source is read after it. A dataset read
|
|
275
|
+
* later that does not hold the object decides: the create becomes a patch, as an edit of a source
|
|
276
|
+
* object would. It keeps every value the edits set and leaves existence to the source, so the
|
|
277
|
+
* object goes like any object its projection withdraws, and comes back with those values if the
|
|
278
|
+
* dataset holds it again. An edit after the read keeps the create until the next one.
|
|
279
|
+
*/
|
|
280
|
+
function withdrawnCreate(
|
|
281
|
+
input: ProjectionReplacementPlanInput,
|
|
282
|
+
state: SourceReplacementObjectState
|
|
283
|
+
): ExactObjectOverrideWrite | null {
|
|
284
|
+
const { withdrawCreatesBefore } = input
|
|
285
|
+
const override = state.override
|
|
286
|
+
if (!withdrawCreatesBefore || state.candidateSource) return null
|
|
287
|
+
if (override?.value.kind !== "create" || override.updatedAt >= withdrawCreatesBefore) return null
|
|
288
|
+
|
|
289
|
+
return {
|
|
290
|
+
ref: state.ref,
|
|
291
|
+
value: { kind: "patch", set: override.value.properties, unset: [] },
|
|
292
|
+
editedAt: storedObjectEditedAt(override),
|
|
293
|
+
expectedLastCommitId: override.lastCommitId,
|
|
294
|
+
lastCommitId: input.commit.id,
|
|
295
|
+
updatedAt: input.commit.committedAt,
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
260
299
|
function resolveReplacementObject(
|
|
261
300
|
context: Pick<MaterializerContext, "ontology">,
|
|
262
|
-
state: SourceReplacementObjectState
|
|
301
|
+
state: SourceReplacementObjectState,
|
|
302
|
+
override: ObjectOverride | null
|
|
263
303
|
) {
|
|
264
304
|
return resolveEffectiveObject({
|
|
265
305
|
ref: state.ref,
|
|
266
306
|
primaryPropertyId: context.ontology.getPrimaryPropertyId(state.ref.objectTypeId),
|
|
267
307
|
source: state.candidateSource,
|
|
268
|
-
override
|
|
308
|
+
override,
|
|
269
309
|
editedAt: storedObjectEditedAt(state.override),
|
|
270
310
|
latestTelemetry: state.latestTelemetry,
|
|
271
311
|
})
|
|
@@ -400,6 +400,10 @@ export function normalizePinnedDatasetVersion(version: PinnedDatasetVersion): Pi
|
|
|
400
400
|
})
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
+
export function normalizeSourceReadAt(value: string): string {
|
|
404
|
+
return normalizeTimestamp(value, "Projection source read time")
|
|
405
|
+
}
|
|
406
|
+
|
|
403
407
|
export function normalizeProjectionRunId(runId: string): string {
|
|
404
408
|
return normalizeNonblank(runId, "Projection run id")
|
|
405
409
|
}
|
|
@@ -18,6 +18,8 @@ import type {
|
|
|
18
18
|
TranscriptionModel,
|
|
19
19
|
TranscriptionModelResponseMetadata,
|
|
20
20
|
TranscriptionModelResult,
|
|
21
|
+
TranscriptionOutput,
|
|
22
|
+
TranscriptionWord,
|
|
21
23
|
} from "./types"
|
|
22
24
|
|
|
23
25
|
export function createAudioRuntime(
|
|
@@ -86,25 +88,66 @@ export function createAudioRuntime(
|
|
|
86
88
|
// A completed, billable reply must survive cancellation and transcript validation failures.
|
|
87
89
|
const event = await recordTranscription(accounting, model, callId, result ?? {})
|
|
88
90
|
signal.throwIfAborted()
|
|
89
|
-
|
|
90
|
-
throw new TranscriptionModelResponseError(
|
|
91
|
-
"[SixbModels] Invalid transcription response.",
|
|
92
|
-
model.providerId,
|
|
93
|
-
model.modelId,
|
|
94
|
-
result ?? {}
|
|
95
|
-
)
|
|
96
|
-
}
|
|
91
|
+
const output = transcriptOutput(result, model)
|
|
97
92
|
|
|
98
|
-
return {
|
|
99
|
-
output: { text: result.output.text },
|
|
100
|
-
usage: event.usage,
|
|
101
|
-
cost: event.cost,
|
|
102
|
-
callId,
|
|
103
|
-
}
|
|
93
|
+
return { output, usage: event.usage, cost: event.cost, callId }
|
|
104
94
|
},
|
|
105
95
|
}
|
|
106
96
|
}
|
|
107
97
|
|
|
98
|
+
/**
|
|
99
|
+
* The validated transcript. A word list a caller cannot trust is worse than none: a playhead
|
|
100
|
+
* would seek to a timestamp that is not there. Refuse the reply instead, as for a missing text;
|
|
101
|
+
* billing for it was recorded already.
|
|
102
|
+
*/
|
|
103
|
+
function transcriptOutput(
|
|
104
|
+
result: TranscriptionModelResult | undefined,
|
|
105
|
+
model: TranscriptionModel
|
|
106
|
+
): TranscriptionOutput {
|
|
107
|
+
const refuse = () =>
|
|
108
|
+
new TranscriptionModelResponseError(
|
|
109
|
+
"[SixbModels] Invalid transcription response.",
|
|
110
|
+
model.providerId,
|
|
111
|
+
model.modelId,
|
|
112
|
+
result ?? {}
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
const output = result?.output
|
|
116
|
+
if (typeof output?.text !== "string") throw refuse()
|
|
117
|
+
|
|
118
|
+
const words: readonly unknown[] | undefined = output.words
|
|
119
|
+
if (words === undefined) return { text: output.text }
|
|
120
|
+
if (!Array.isArray(words)) throw refuse()
|
|
121
|
+
|
|
122
|
+
const timed: TranscriptionWord[] = []
|
|
123
|
+
for (const word of words) {
|
|
124
|
+
const entry = word as Partial<TranscriptionWord> | null | undefined
|
|
125
|
+
if (
|
|
126
|
+
typeof entry?.text !== "string" ||
|
|
127
|
+
!entry.text ||
|
|
128
|
+
!isMillisecond(entry.startMs) ||
|
|
129
|
+
!isMillisecond(entry.endMs) ||
|
|
130
|
+
entry.endMs < entry.startMs ||
|
|
131
|
+
(entry.speaker !== undefined && (typeof entry.speaker !== "string" || !entry.speaker))
|
|
132
|
+
) {
|
|
133
|
+
throw refuse()
|
|
134
|
+
}
|
|
135
|
+
timed.push({
|
|
136
|
+
text: entry.text,
|
|
137
|
+
startMs: entry.startMs,
|
|
138
|
+
endMs: entry.endMs,
|
|
139
|
+
...(entry.speaker === undefined ? {} : { speaker: entry.speaker }),
|
|
140
|
+
})
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// An empty list says nothing; the absent field is the one way to say "no words".
|
|
144
|
+
return timed.length ? { text: output.text, words: timed } : { text: output.text }
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function isMillisecond(value: unknown): value is number {
|
|
148
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0
|
|
149
|
+
}
|
|
150
|
+
|
|
108
151
|
interface PreparedAudio {
|
|
109
152
|
readonly mediaType: string
|
|
110
153
|
readonly sizeBytes: number
|