@sixb/core 0.2.2 → 0.2.4
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 +56 -50
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run/executor.d.ts +0 -2
- package/dist/actions/run/executor.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +5 -1
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/agents/cancel.d.ts +1 -1
- package/dist/agents/cancel.d.ts.map +1 -1
- package/dist/agents/child-question.d.ts +35 -2
- package/dist/agents/child-question.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +3 -2
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/fork.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 +4 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +91 -76
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/model-loop.d.ts.map +1 -1
- package/dist/agents/request.d.ts +7 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/run-artifacts.d.ts +73 -10
- package/dist/agents/run-artifacts.d.ts.map +1 -1
- package/dist/agents/run-session-children.d.ts +9 -0
- 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 +3 -0
- package/dist/agents/run-session.d.ts.map +1 -1
- package/dist/agents/streams/index.js +2 -2
- package/dist/agents/streams/internal.js +2 -2
- package/dist/agents/streams/protocol.d.ts.map +1 -1
- package/dist/agents/tool-files.d.ts +1 -1
- package/dist/agents/tool-files.d.ts.map +1 -1
- package/dist/agents/tool-input-coercion.d.ts +20 -0
- package/dist/agents/tool-input-coercion.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/access.d.ts +37 -17
- package/dist/artifacts/access.d.ts.map +1 -1
- package/dist/artifacts/canvas-display.d.ts +65 -0
- package/dist/artifacts/canvas-display.d.ts.map +1 -0
- package/dist/artifacts/canvas.d.ts +6 -1
- package/dist/artifacts/canvas.d.ts.map +1 -1
- package/dist/artifacts/comment-text.d.ts +19 -0
- package/dist/artifacts/comment-text.d.ts.map +1 -0
- package/dist/artifacts/comments.d.ts +52 -0
- package/dist/artifacts/comments.d.ts.map +1 -0
- package/dist/artifacts/errors.d.ts +3 -3
- package/dist/artifacts/errors.d.ts.map +1 -1
- package/dist/artifacts/events.d.ts +14 -0
- package/dist/artifacts/events.d.ts.map +1 -0
- package/dist/artifacts/execution.d.ts +129 -22
- package/dist/artifacts/execution.d.ts.map +1 -1
- package/dist/artifacts/frames/assets.d.ts +12 -1
- package/dist/artifacts/frames/assets.d.ts.map +1 -1
- package/dist/artifacts/frames/grants.d.ts +8 -5
- package/dist/artifacts/frames/grants.d.ts.map +1 -1
- package/dist/artifacts/frames/index.d.ts +1 -1
- package/dist/artifacts/frames/index.d.ts.map +1 -1
- package/dist/artifacts/frames/index.js +32 -964
- package/dist/artifacts/frames/index.js.map +4 -8
- package/dist/artifacts/frames/kit.d.ts.map +1 -1
- package/dist/artifacts/frames/protocol.d.ts +129 -0
- package/dist/artifacts/frames/protocol.d.ts.map +1 -1
- package/dist/artifacts/frames/runtime.d.ts +24 -7
- package/dist/artifacts/frames/runtime.d.ts.map +1 -1
- package/dist/artifacts/holders.d.ts +23 -0
- package/dist/artifacts/holders.d.ts.map +1 -0
- package/dist/artifacts/ids.d.ts +2 -0
- package/dist/artifacts/ids.d.ts.map +1 -1
- package/dist/artifacts/index.d.ts +6 -4
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +134 -13
- package/dist/artifacts/index.js.map +5 -4
- package/dist/artifacts/limits.d.ts +24 -3
- package/dist/artifacts/limits.d.ts.map +1 -1
- package/dist/artifacts/live/board.d.ts +103 -0
- package/dist/artifacts/live/board.d.ts.map +1 -0
- package/dist/artifacts/live/diff.d.ts +43 -0
- package/dist/artifacts/live/diff.d.ts.map +1 -0
- package/dist/artifacts/live/document.d.ts +55 -0
- package/dist/artifacts/live/document.d.ts.map +1 -0
- package/dist/artifacts/live/files.d.ts +16 -0
- package/dist/artifacts/live/files.d.ts.map +1 -0
- package/dist/artifacts/live/index.d.ts +9 -0
- package/dist/artifacts/live/index.d.ts.map +1 -0
- package/dist/artifacts/live/index.js +593 -0
- package/dist/artifacts/live/index.js.map +10 -0
- package/dist/artifacts/live/presence.d.ts +55 -0
- package/dist/artifacts/live/presence.d.ts.map +1 -0
- package/dist/artifacts/live/protocol.d.ts +109 -0
- package/dist/artifacts/live/protocol.d.ts.map +1 -0
- package/dist/artifacts/live/protocol.js +21 -0
- package/dist/artifacts/live/protocol.js.map +9 -0
- package/dist/artifacts/live/server.d.ts +10 -0
- package/dist/artifacts/live/server.d.ts.map +1 -0
- package/dist/artifacts/live/server.js +86 -0
- package/dist/artifacts/live/server.js.map +9 -0
- package/dist/artifacts/live/state.d.ts +26 -0
- package/dist/artifacts/live/state.d.ts.map +1 -0
- package/dist/artifacts/outline.d.ts +11 -0
- package/dist/artifacts/outline.d.ts.map +1 -1
- package/dist/artifacts/publish/index.d.ts +8 -1
- package/dist/artifacts/publish/index.d.ts.map +1 -1
- package/dist/artifacts/publish/index.js +62 -34
- package/dist/artifacts/publish/index.js.map +1 -1
- package/dist/artifacts/publish/merge.d.ts +75 -0
- package/dist/artifacts/publish/merge.d.ts.map +1 -0
- package/dist/artifacts/publish/previews.d.ts +153 -0
- package/dist/artifacts/publish/previews.d.ts.map +1 -0
- package/dist/artifacts/publish/publish.d.ts +29 -8
- package/dist/artifacts/publish/publish.d.ts.map +1 -1
- package/dist/artifacts/publish/query-answers.d.ts +20 -0
- package/dist/artifacts/publish/query-answers.d.ts.map +1 -0
- package/dist/artifacts/publish/references.d.ts +4 -3
- package/dist/artifacts/publish/references.d.ts.map +1 -1
- package/dist/artifacts/publish/validate/canvas.d.ts.map +1 -1
- package/dist/artifacts/theme.d.ts +5 -1
- package/dist/artifacts/theme.d.ts.map +1 -1
- package/dist/auth/directory.d.ts +33 -0
- package/dist/auth/directory.d.ts.map +1 -0
- package/dist/auth/index.js +13 -12
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/member-events.d.ts +5 -1
- package/dist/auth/member-events.d.ts.map +1 -1
- package/dist/auth/runtime.d.ts +22 -1
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/auth/strategy.d.ts +2 -2
- package/dist/auth/strategy.d.ts.map +1 -1
- package/dist/auth/types.d.ts +42 -1
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/authorization/decision.d.ts +6 -5
- package/dist/authorization/decision.d.ts.map +1 -1
- package/dist/authorization/event-visibility.d.ts.map +1 -1
- package/dist/authorization/index.js +7 -6
- package/dist/authorization/index.js.map +1 -1
- package/dist/blob-storage/index.js +4 -4
- package/dist/blob-storage/index.js.map +1 -1
- package/dist/bootstrap/index.js +63 -57
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/broker/in-memory.d.ts.map +1 -1
- package/dist/broker/index.js +1 -1
- package/dist/broker/types.d.ts +4 -0
- package/dist/broker/types.d.ts.map +1 -1
- package/dist/{chunk-s7j8ewqv.js → chunk-0k3r5kb3.js} +257 -43
- package/dist/{chunk-s7j8ewqv.js.map → chunk-0k3r5kb3.js.map} +14 -13
- package/dist/{chunk-e5wf5vz0.js → chunk-0kgrghqx.js} +13 -1
- package/dist/chunk-0kgrghqx.js.map +10 -0
- package/dist/{chunk-80gym75n.js → chunk-186k5yz3.js} +1 -1
- package/dist/chunk-191jz8a6.js +61 -0
- package/dist/chunk-191jz8a6.js.map +10 -0
- package/dist/{chunk-mmagke4x.js → chunk-22d3qg4x.js} +2 -2
- package/dist/{chunk-mmagke4x.js.map → chunk-22d3qg4x.js.map} +3 -3
- package/dist/{chunk-ga63a3dz.js → chunk-2bn6813a.js} +3 -3
- package/dist/chunk-2c4j899j.js.map +2 -2
- package/dist/{chunk-e6xgz4h4.js → chunk-3014rfjz.js} +197 -18
- package/dist/chunk-3014rfjz.js.map +21 -0
- package/dist/{chunk-ytzcxtpt.js → chunk-3ba89vm7.js} +1 -1
- package/dist/chunk-3hzhcfsv.js +139 -0
- package/dist/chunk-3hzhcfsv.js.map +10 -0
- package/dist/chunk-3sgvd10b.js +69 -0
- package/dist/chunk-3sgvd10b.js.map +10 -0
- package/dist/chunk-3z1vxzcm.js +234 -0
- package/dist/chunk-3z1vxzcm.js.map +12 -0
- package/dist/{chunk-djs3hw9p.js → chunk-3zagkr6w.js} +73 -6
- package/dist/chunk-3zagkr6w.js.map +21 -0
- package/dist/{chunk-wkq3kvzd.js → chunk-48c1z8nj.js} +6 -6
- package/dist/chunk-48c1z8nj.js.map +10 -0
- package/dist/{chunk-d04g36fw.js → chunk-5qqmndhm.js} +1 -1
- package/dist/{chunk-scyq22td.js → chunk-5rqqp8cr.js} +19 -4
- package/dist/chunk-5rqqp8cr.js.map +12 -0
- package/dist/chunk-6ef4esq4.js +225 -0
- package/dist/chunk-6ef4esq4.js.map +11 -0
- package/dist/{chunk-jspskey0.js → chunk-7j4yydm2.js} +67 -45
- package/dist/chunk-7j4yydm2.js.map +11 -0
- package/dist/chunk-7kpqntgw.js +70 -0
- package/dist/chunk-7kpqntgw.js.map +10 -0
- package/dist/{chunk-5wtnmpze.js → chunk-7qe46788.js} +1 -1
- package/dist/{chunk-31kcqmhf.js → chunk-855w9nvw.js} +1 -1
- package/dist/{chunk-e7v3trpz.js → chunk-8a8k38tz.js} +4 -3
- package/dist/chunk-8a8k38tz.js.map +10 -0
- package/dist/chunk-8bns0y68.js +1322 -0
- package/dist/chunk-8bns0y68.js.map +25 -0
- package/dist/{chunk-jftd33rc.js → chunk-8t2ynwg0.js} +105 -9
- package/dist/chunk-8t2ynwg0.js.map +11 -0
- package/dist/{chunk-9whfmsfk.js → chunk-8tqnsx3q.js} +1 -1
- package/dist/{chunk-s3we74h8.js → chunk-9nsjjd44.js} +38 -5
- package/dist/chunk-9nsjjd44.js.map +12 -0
- package/dist/{chunk-hz5d43gn.js → chunk-9vsc919v.js} +14 -6
- package/dist/chunk-9vsc919v.js.map +10 -0
- package/dist/{chunk-waqk73p1.js → chunk-a6fjkcne.js} +185 -341
- package/dist/{chunk-waqk73p1.js.map → chunk-a6fjkcne.js.map} +6 -7
- package/dist/chunk-az95tsh3.js.map +2 -2
- package/dist/{chunk-s038wa5v.js → chunk-b9qfh2ya.js} +1 -1
- package/dist/{chunk-5taem5aw.js → chunk-bc3y6gff.js} +13 -4
- package/dist/chunk-bc3y6gff.js.map +10 -0
- package/dist/chunk-bz5bnjjt.js +358 -0
- package/dist/chunk-bz5bnjjt.js.map +12 -0
- package/dist/{chunk-w976a4me.js → chunk-czct88ht.js} +28 -4
- package/dist/chunk-czct88ht.js.map +10 -0
- package/dist/{chunk-5kyvrtjh.js → chunk-d9xbwh3h.js} +131 -32
- package/dist/chunk-d9xbwh3h.js.map +13 -0
- package/dist/{chunk-kfee1h52.js → chunk-dfveegqq.js} +28 -8
- package/dist/chunk-dfveegqq.js.map +13 -0
- package/dist/{chunk-2g0r46hy.js → chunk-dhkc9b23.js} +15 -2
- package/dist/chunk-dhkc9b23.js.map +12 -0
- package/dist/chunk-dmnd9ea6.js +106 -0
- package/dist/chunk-dmnd9ea6.js.map +10 -0
- package/dist/{chunk-nz7815t3.js → chunk-e0hnbb1m.js} +27 -2
- package/dist/chunk-e0hnbb1m.js.map +14 -0
- package/dist/chunk-e91fmg6t.js +288 -0
- package/dist/chunk-e91fmg6t.js.map +11 -0
- package/dist/{chunk-3sqqhpr7.js → chunk-evj5jxz3.js} +134 -19
- package/dist/{chunk-3sqqhpr7.js.map → chunk-evj5jxz3.js.map} +11 -10
- package/dist/{chunk-w122ymx4.js → chunk-f6ahf5gf.js} +15 -4
- package/dist/{chunk-w122ymx4.js.map → chunk-f6ahf5gf.js.map} +3 -3
- package/dist/{chunk-jjmggm9a.js → chunk-fe6r7yhg.js} +1 -1
- package/dist/{chunk-165c9wm6.js → chunk-g2ph4873.js} +1 -1
- package/dist/{chunk-dsv783c3.js → chunk-gxwy4c3s.js} +203 -57
- package/dist/chunk-gxwy4c3s.js.map +47 -0
- package/dist/chunk-hgj98cbb.js +22 -0
- package/dist/chunk-hgj98cbb.js.map +10 -0
- package/dist/chunk-hn2r7z41.js.map +3 -3
- package/dist/chunk-hvbvq7p4.js +1553 -0
- package/dist/chunk-hvbvq7p4.js.map +18 -0
- package/dist/chunk-j0wgh8gv.js +250 -0
- package/dist/chunk-j0wgh8gv.js.map +10 -0
- package/dist/{chunk-z8fx5cgb.js → chunk-j2zm215x.js} +37 -3
- package/dist/chunk-j2zm215x.js.map +12 -0
- package/dist/{chunk-j1ny5fwh.js → chunk-k1g14kk3.js} +11 -83
- package/dist/{chunk-j1ny5fwh.js.map → chunk-k1g14kk3.js.map} +4 -5
- package/dist/chunk-kr6dx38r.js +25 -0
- package/dist/chunk-kr6dx38r.js.map +10 -0
- package/dist/chunk-m2jerfef.js +474 -0
- package/dist/chunk-m2jerfef.js.map +11 -0
- package/dist/{chunk-m2vh8gh0.js → chunk-msyevpp3.js} +62 -15
- package/dist/{chunk-m2vh8gh0.js.map → chunk-msyevpp3.js.map} +5 -5
- package/dist/{chunk-escedwyt.js → chunk-mvz89age.js} +6 -1
- package/dist/{chunk-escedwyt.js.map → chunk-mvz89age.js.map} +3 -3
- package/dist/chunk-mwcqz3e3.js +30 -0
- package/dist/chunk-mwcqz3e3.js.map +10 -0
- package/dist/chunk-n2ay51px.js +21 -0
- package/dist/chunk-n2ay51px.js.map +10 -0
- package/dist/chunk-n4zzaf6q.js.map +1 -1
- package/dist/{chunk-gkv8r794.js → chunk-n68vz95m.js} +5 -5
- package/dist/{chunk-gkv8r794.js.map → chunk-n68vz95m.js.map} +3 -3
- package/dist/{chunk-0j3crh1w.js → chunk-p351afzm.js} +14 -14
- package/dist/{chunk-0j3crh1w.js.map → chunk-p351afzm.js.map} +4 -4
- package/dist/{chunk-c7cfe31p.js → chunk-p8pgnq8d.js} +16 -16
- package/dist/{chunk-c7cfe31p.js.map → chunk-p8pgnq8d.js.map} +1 -1
- package/dist/chunk-pk539cwv.js +370 -0
- package/dist/chunk-pk539cwv.js.map +11 -0
- package/dist/{chunk-jbw70d6t.js → chunk-ppxf7gw2.js} +52 -10
- package/dist/chunk-ppxf7gw2.js.map +11 -0
- package/dist/{chunk-9x8dybsb.js → chunk-pvpq483h.js} +10 -2
- package/dist/chunk-pvpq483h.js.map +10 -0
- package/dist/{chunk-4zm1k3xj.js → chunk-r2psmn42.js} +1 -1
- package/dist/{chunk-a7aa0nzj.js → chunk-r9rtavg9.js} +14 -14
- package/dist/{chunk-a7aa0nzj.js.map → chunk-r9rtavg9.js.map} +1 -1
- package/dist/{chunk-w1btn96n.js → chunk-rsrc7vtw.js} +523 -254
- package/dist/chunk-rsrc7vtw.js.map +49 -0
- package/dist/{chunk-2ajw5rz0.js → chunk-rsxb14an.js} +3 -3
- package/dist/{chunk-kkjfve0t.js → chunk-rt9deb92.js} +4 -3
- package/dist/{chunk-kkjfve0t.js.map → chunk-rt9deb92.js.map} +3 -3
- package/dist/{chunk-r1cxq7vv.js → chunk-rtdrm592.js} +2 -2
- package/dist/{chunk-a5v4gjdx.js → chunk-rtm1jq00.js} +460 -227
- package/dist/{chunk-a5v4gjdx.js.map → chunk-rtm1jq00.js.map} +25 -22
- package/dist/{chunk-4bm0caep.js → chunk-smnt672s.js} +1 -1
- package/dist/{chunk-21q0j5f2.js → chunk-stmxh0hv.js} +2 -2
- package/dist/{chunk-nh26e7c5.js → chunk-sysnvjce.js} +5 -5
- package/dist/{chunk-nh26e7c5.js.map → chunk-sysnvjce.js.map} +3 -3
- package/dist/{chunk-7z5rkf0m.js → chunk-t0s7b3d1.js} +4 -3
- package/dist/{chunk-7z5rkf0m.js.map → chunk-t0s7b3d1.js.map} +3 -3
- package/dist/{chunk-57g0215c.js → chunk-t24yktqr.js} +296 -7
- package/dist/{chunk-57g0215c.js.map → chunk-t24yktqr.js.map} +6 -3
- package/dist/{chunk-mbc5hvnj.js → chunk-td26wjr5.js} +18 -7
- package/dist/{chunk-mbc5hvnj.js.map → chunk-td26wjr5.js.map} +3 -3
- package/dist/{chunk-ff5xkv0p.js → chunk-tfzvjdms.js} +1 -1
- package/dist/{chunk-f1h34y3r.js → chunk-vepea5c3.js} +6 -6
- package/dist/{chunk-f1h34y3r.js.map → chunk-vepea5c3.js.map} +1 -1
- package/dist/chunk-vtjzwymr.js +37 -0
- package/dist/chunk-vtjzwymr.js.map +10 -0
- package/dist/{chunk-twfreyxr.js → chunk-vzkxqf8h.js} +23 -13
- package/dist/{chunk-twfreyxr.js.map → chunk-vzkxqf8h.js.map} +6 -6
- package/dist/{chunk-eqgr6nsa.js → chunk-w1wq7gfr.js} +983 -185
- package/dist/chunk-w1wq7gfr.js.map +75 -0
- package/dist/{chunk-6b61s40c.js → chunk-w3t94hm6.js} +1 -1
- package/dist/{chunk-fwsvshr5.js → chunk-wa05txmk.js} +20 -7
- package/dist/{chunk-fwsvshr5.js.map → chunk-wa05txmk.js.map} +3 -3
- package/dist/chunk-whbwf3np.js +12 -0
- package/dist/chunk-whbwf3np.js.map +10 -0
- package/dist/{chunk-t5608tkq.js → chunk-yv8hv4wq.js} +3 -1
- package/dist/{chunk-t5608tkq.js.map → chunk-yv8hv4wq.js.map} +3 -3
- package/dist/{chunk-j8thxj7w.js → chunk-yy914zfr.js} +1218 -101
- package/dist/chunk-yy914zfr.js.map +30 -0
- package/dist/connectors/builders.d.ts +2 -2
- package/dist/connectors/builders.d.ts.map +1 -1
- package/dist/connectors/connections/access.d.ts +11 -0
- package/dist/connectors/connections/access.d.ts.map +1 -0
- package/dist/connectors/connections/contracts.d.ts +6 -1
- package/dist/connectors/connections/contracts.d.ts.map +1 -1
- package/dist/connectors/connections/internal.js +1 -1
- package/dist/connectors/connections/runs.d.ts +6 -0
- package/dist/connectors/connections/runs.d.ts.map +1 -1
- package/dist/connectors/connections/service.d.ts +25 -0
- package/dist/connectors/connections/service.d.ts.map +1 -1
- package/dist/connectors/connections/views.d.ts +1 -1
- package/dist/connectors/connections/views.d.ts.map +1 -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/service.d.ts +3 -0
- package/dist/connectors/service.d.ts.map +1 -1
- package/dist/connectors/types.d.ts +21 -2
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/datasets/execution.d.ts +12 -6
- package/dist/datasets/execution.d.ts.map +1 -1
- package/dist/datasets/ingest-flush-batch.d.ts +59 -0
- package/dist/datasets/ingest-flush-batch.d.ts.map +1 -0
- package/dist/datasets/ingest-flush-job.d.ts +33 -0
- package/dist/datasets/ingest-flush-job.d.ts.map +1 -0
- package/dist/datasets/ingest-flush.d.ts +66 -0
- package/dist/datasets/ingest-flush.d.ts.map +1 -0
- package/dist/datasets/produced-version.d.ts +21 -0
- package/dist/datasets/produced-version.d.ts.map +1 -0
- package/dist/datasets/write.d.ts +22 -1
- package/dist/datasets/write.d.ts.map +1 -1
- package/dist/datasets/write.js +8 -4
- package/dist/datasets/write.js.map +1 -1
- package/dist/deploy/internal.js +5 -4
- package/dist/deploy/internal.js.map +4 -4
- package/dist/deploy/types.d.ts +2 -3
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/error-reporting/capability.d.ts +8 -2
- package/dist/error-reporting/capability.d.ts.map +1 -1
- package/dist/error-reporting/internal.d.ts +1 -1
- package/dist/error-reporting/internal.d.ts.map +1 -1
- package/dist/error-reporting/internal.js +17 -5
- package/dist/error-reporting/internal.js.map +1 -1
- package/dist/error-reporting/reporter.d.ts.map +1 -1
- package/dist/error-reporting/reports.d.ts +55 -0
- package/dist/error-reporting/reports.d.ts.map +1 -1
- package/dist/error-reporting/types.d.ts +82 -1
- package/dist/error-reporting/types.d.ts.map +1 -1
- package/dist/errors/catalog.d.ts +5 -0
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/errors/internal.js +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 +1 -0
- package/dist/events/execution.d.ts.map +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +5 -5
- package/dist/events/scope.d.ts.map +1 -1
- package/dist/events/scope.js +1 -1
- package/dist/events/selectors/index.js +2 -2
- package/dist/events/types/artifacts.d.ts +38 -0
- package/dist/events/types/artifacts.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/users.d.ts +5 -2
- package/dist/events/types/users.d.ts.map +1 -1
- package/dist/execution/agent.js +58 -52
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorized-object-reader.d.ts +10 -0
- package/dist/execution/authorized-object-reader.d.ts.map +1 -1
- package/dist/execution/object-reader-clearance.d.ts +6 -0
- package/dist/execution/object-reader-clearance.d.ts.map +1 -1
- package/dist/execution/object-reader-security.d.ts +9 -2
- package/dist/execution/object-reader-security.d.ts.map +1 -1
- package/dist/execution/primitive.js +56 -50
- package/dist/execution/primitive.js.map +1 -1
- package/dist/execution/request.js +50 -44
- package/dist/execution/request.js.map +2 -2
- package/dist/http/api-routes.d.ts +1 -1
- package/dist/http/api-routes.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +96 -88
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/errors.d.ts +15 -0
- package/dist/lake-storage/errors.d.ts.map +1 -1
- package/dist/lake-storage/index.d.ts +3 -2
- package/dist/lake-storage/index.d.ts.map +1 -1
- package/dist/lake-storage/index.js +16 -10
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/lake-storage/maintenance.d.ts +88 -0
- package/dist/lake-storage/maintenance.d.ts.map +1 -0
- package/dist/lake-storage/merge.d.ts +3 -1
- package/dist/lake-storage/merge.d.ts.map +1 -1
- package/dist/lake-storage/source-ordering.d.ts +23 -0
- package/dist/lake-storage/source-ordering.d.ts.map +1 -1
- package/dist/lake-storage/types.d.ts +10 -0
- package/dist/lake-storage/types.d.ts.map +1 -1
- package/dist/maintenance/heartbeat.d.ts +5 -0
- package/dist/maintenance/heartbeat.d.ts.map +1 -0
- package/dist/maintenance/index.d.ts +4 -2
- package/dist/maintenance/index.d.ts.map +1 -1
- package/dist/maintenance/index.js +515 -0
- package/dist/maintenance/index.js.map +16 -0
- package/dist/maintenance/lake-retention-status.d.ts +36 -0
- package/dist/maintenance/lake-retention-status.d.ts.map +1 -0
- package/dist/maintenance/lake-retention.d.ts +84 -0
- package/dist/maintenance/lake-retention.d.ts.map +1 -0
- package/dist/maintenance/loop.d.ts +95 -0
- package/dist/maintenance/loop.d.ts.map +1 -0
- package/dist/maintenance/ontology-maintenance.d.ts +17 -16
- package/dist/maintenance/ontology-maintenance.d.ts.map +1 -1
- package/dist/maintenance/passes/cron-pass.d.ts +21 -0
- package/dist/maintenance/passes/cron-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/directory-pass.d.ts +12 -0
- package/dist/maintenance/passes/directory-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/ingest-pass.d.ts +26 -0
- package/dist/maintenance/passes/ingest-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/lake-change-feed.d.ts +38 -0
- package/dist/maintenance/passes/lake-change-feed.d.ts.map +1 -0
- package/dist/maintenance/passes/lake-retention-pass.d.ts +20 -0
- package/dist/maintenance/passes/lake-retention-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/ontology-pass.d.ts +8 -0
- package/dist/maintenance/passes/ontology-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/projections-pass.d.ts +26 -0
- package/dist/maintenance/passes/projections-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/recovery-pass.d.ts +6 -0
- package/dist/maintenance/passes/recovery-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/recovery-passes.d.ts +24 -0
- package/dist/maintenance/passes/recovery-passes.d.ts.map +1 -0
- package/dist/maintenance/passes/runs-pass.d.ts +6 -0
- package/dist/maintenance/passes/runs-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/triggers-pass.d.ts +41 -0
- package/dist/maintenance/passes/triggers-pass.d.ts.map +1 -0
- package/dist/maintenance/status.d.ts +19 -0
- package/dist/maintenance/status.d.ts.map +1 -0
- package/dist/maintenance/types.d.ts +25 -24
- package/dist/maintenance/types.d.ts.map +1 -1
- package/dist/materialization/model.d.ts +11 -2
- package/dist/materialization/model.d.ts.map +1 -1
- package/dist/materializer/edits/artifact-refs.d.ts +33 -0
- package/dist/materializer/edits/artifact-refs.d.ts.map +1 -0
- package/dist/materializer/edits/commit.d.ts.map +1 -1
- package/dist/materializer/edits/operations.d.ts +7 -1
- package/dist/materializer/edits/operations.d.ts.map +1 -1
- package/dist/materializer/edits/plan.d.ts.map +1 -1
- package/dist/materializer/execution/work-records.d.ts +6 -0
- package/dist/materializer/execution/work-records.d.ts.map +1 -1
- package/dist/materializer/index.js +31 -28
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -1
- package/dist/materializer/shared/normalize.d.ts.map +1 -1
- package/dist/materializer/telemetry/plan.d.ts.map +1 -1
- package/dist/models/execution/index.js +30 -27
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/language-model.d.ts +6 -0
- package/dist/models/language-model.d.ts.map +1 -1
- package/dist/models/tools.d.ts +2 -0
- package/dist/models/tools.d.ts.map +1 -1
- package/dist/objects/artifact-refs.d.ts +5 -0
- package/dist/objects/artifact-refs.d.ts.map +1 -0
- package/dist/objects/index.js +59 -54
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/materializer-adapter.d.ts +4 -3
- package/dist/objects/materializer-adapter.d.ts.map +1 -1
- package/dist/objects/object/upsert-batch.d.ts.map +1 -1
- package/dist/objects/object/upsert.d.ts.map +1 -1
- package/dist/objects/query/index.js +29 -26
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/ir.d.ts +3 -1
- package/dist/objects/query/ir.d.ts.map +1 -1
- package/dist/objects/query/scalar-values.d.ts.map +1 -1
- package/dist/objects/runtime-batch.d.ts +2 -0
- package/dist/objects/runtime-batch.d.ts.map +1 -1
- package/dist/ontology/artifact-ref.d.ts +36 -0
- package/dist/ontology/artifact-ref.d.ts.map +1 -0
- package/dist/ontology/docs-markdown.d.ts.map +1 -1
- package/dist/ontology/index.d.ts +3 -1
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/index.js +8 -5
- package/dist/ontology/index.js.map +1 -1
- package/dist/ontology/inference/index.d.ts +2 -0
- package/dist/ontology/inference/index.d.ts.map +1 -1
- package/dist/ontology/internal.js +7 -6
- package/dist/ontology/internal.js.map +1 -1
- package/dist/ontology/json-schema.d.ts.map +1 -1
- package/dist/ontology/primitives.d.ts.map +1 -1
- package/dist/ontology/reference-values.d.ts +10 -0
- package/dist/ontology/reference-values.d.ts.map +1 -0
- package/dist/ontology/refs.d.ts +6 -1
- package/dist/ontology/refs.d.ts.map +1 -1
- package/dist/ontology/registry.d.ts +9 -1
- package/dist/ontology/registry.d.ts.map +1 -1
- package/dist/ontology/types.d.ts +2 -1
- package/dist/ontology/types.d.ts.map +1 -1
- package/dist/ontology/user-ref.d.ts +16 -0
- package/dist/ontology/user-ref.d.ts.map +1 -1
- package/dist/ontology/validation/normalize.d.ts.map +1 -1
- package/dist/ontology/validation/properties.d.ts.map +1 -1
- package/dist/ontology/validation/schema.d.ts.map +1 -1
- package/dist/pending-tasks.d.ts +17 -0
- package/dist/pending-tasks.d.ts.map +1 -0
- package/dist/pipelines/index.js +37 -34
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pipelines/run-dispatch.d.ts +6 -0
- package/dist/pipelines/run-dispatch.d.ts.map +1 -1
- package/dist/predicates/types.d.ts +4 -0
- package/dist/predicates/types.d.ts.map +1 -1
- package/dist/projections/builders.d.ts +13 -11
- package/dist/projections/builders.d.ts.map +1 -1
- package/dist/projections/internal.js +30 -27
- package/dist/projections/internal.js.map +1 -1
- package/dist/projections/types.d.ts +1 -1
- package/dist/projections/types.d.ts.map +1 -1
- package/dist/projections/validation.d.ts +2 -2
- package/dist/projections/validation.d.ts.map +1 -1
- package/dist/queues/in-memory.d.ts +6 -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 +55 -2
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/create.d.ts +3 -0
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +22 -5
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +6 -0
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +52 -31
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/sixb.d.ts +6 -1
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/sandboxes/index.js +8 -7
- package/dist/sandboxes/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +0 -2
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +3 -6
- package/dist/scheduler/index.js.map +1 -1
- package/dist/schedules/index.js +9 -11
- package/dist/schedules/index.js.map +1 -1
- package/dist/security/internal.js +1 -1
- package/dist/shared/backoff.d.ts +12 -0
- package/dist/shared/backoff.d.ts.map +1 -0
- package/dist/shared/duration.d.ts +3 -0
- package/dist/shared/duration.d.ts.map +1 -0
- package/dist/shared/params/artifact-refs.d.ts +19 -0
- package/dist/shared/params/artifact-refs.d.ts.map +1 -0
- package/dist/shares/guest-name.d.ts +8 -0
- package/dist/shares/guest-name.d.ts.map +1 -0
- package/dist/shares/internal.d.ts +1 -0
- package/dist/shares/internal.d.ts.map +1 -1
- package/dist/shares/internal.js +69 -28
- package/dist/shares/internal.js.map +3 -3
- package/dist/shares/session-protocol.d.ts +13 -0
- package/dist/shares/session-protocol.d.ts.map +1 -1
- package/dist/storage/action-runs/failure.js +2 -2
- package/dist/storage/agents/provider.js +1 -1
- package/dist/storage/agents/types.d.ts +1 -1
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-limits/enforcement.js +2 -2
- package/dist/storage/artifacts/errors.d.ts +9 -4
- package/dist/storage/artifacts/errors.d.ts.map +1 -1
- package/dist/storage/artifacts/in-memory.d.ts +27 -4
- 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 +39 -2
- package/dist/storage/artifacts/record.d.ts.map +1 -1
- package/dist/storage/artifacts/types.d.ts +328 -39
- package/dist/storage/artifacts/types.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts +2 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/identities.d.ts +4 -0
- package/dist/storage/auth/in-memory/identities.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/shared.d.ts +3 -1
- package/dist/storage/auth/in-memory/shared.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/users.d.ts.map +1 -1
- package/dist/storage/auth/index.d.ts +1 -1
- package/dist/storage/auth/index.d.ts.map +1 -1
- package/dist/storage/auth/types.d.ts +39 -0
- package/dist/storage/auth/types.d.ts.map +1 -1
- package/dist/storage/connector-connections/in-memory.d.ts +1 -1
- package/dist/storage/connector-connections/in-memory.d.ts.map +1 -1
- package/dist/storage/connector-connections/index.d.ts +1 -1
- package/dist/storage/connector-connections/index.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider/runs.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider/shared.d.ts +12 -2
- package/dist/storage/connector-connections/provider/shared.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.d.ts +1 -0
- package/dist/storage/connector-connections/provider.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.js +21 -5
- package/dist/storage/connector-connections/provider.js.map +5 -5
- package/dist/storage/connector-connections/types.d.ts +1 -1
- package/dist/storage/connector-connections/types.d.ts.map +1 -1
- package/dist/storage/dataset-ingest/codec.d.ts +6 -0
- package/dist/storage/dataset-ingest/codec.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/in-memory.d.ts +28 -0
- package/dist/storage/dataset-ingest/in-memory.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/index.d.ts +4 -0
- package/dist/storage/dataset-ingest/index.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/provider.d.ts +157 -0
- package/dist/storage/dataset-ingest/provider.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/provider.js +17 -0
- package/dist/storage/dataset-ingest/provider.js.map +9 -0
- package/dist/storage/dataset-ingest/types.d.ts +188 -0
- package/dist/storage/dataset-ingest/types.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/provider.js +12 -11
- package/dist/storage/file-upload-sessions/provider.js.map +1 -1
- package/dist/storage/in-memory/index.d.ts +12 -0
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +18 -11
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +56 -46
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +4 -1
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +81 -5
- package/dist/storage/internal.js.map +4 -3
- package/dist/storage/lake-retention-runs/in-memory.d.ts +11 -0
- package/dist/storage/lake-retention-runs/in-memory.d.ts.map +1 -0
- package/dist/storage/lake-retention-runs/index.d.ts +3 -0
- package/dist/storage/lake-retention-runs/index.d.ts.map +1 -0
- package/dist/storage/lake-retention-runs/types.d.ts +21 -0
- package/dist/storage/lake-retention-runs/types.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/in-memory.d.ts +11 -0
- package/dist/storage/maintenance-heartbeats/in-memory.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/index.d.ts +3 -0
- package/dist/storage/maintenance-heartbeats/index.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/record.d.ts +11 -0
- package/dist/storage/maintenance-heartbeats/record.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/types.d.ts +30 -0
- package/dist/storage/maintenance-heartbeats/types.d.ts.map +1 -0
- package/dist/storage/objects/in-memory/query.d.ts.map +1 -1
- package/dist/storage/objects/in-memory/storage.d.ts +15 -1
- package/dist/storage/objects/in-memory/storage.d.ts.map +1 -1
- package/dist/storage/objects/read-scope.d.ts.map +1 -1
- package/dist/storage/objects/types.d.ts +18 -1
- package/dist/storage/objects/types.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts.map +1 -1
- package/dist/storage/ontology/index.d.ts +1 -1
- package/dist/storage/ontology/index.d.ts.map +1 -1
- package/dist/storage/ontology/materializations.d.ts +20 -0
- package/dist/storage/ontology/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/provider-work.d.ts +7 -1
- package/dist/storage/ontology/provider-work.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +1 -1
- package/dist/storage/pipeline-runs/in-memory.d.ts +8 -2
- package/dist/storage/pipeline-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/index.d.ts +1 -1
- package/dist/storage/pipeline-runs/index.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/provider.js +1 -1
- package/dist/storage/pipeline-runs/transitions.d.ts +2 -2
- package/dist/storage/pipeline-runs/transitions.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/types.d.ts +26 -6
- package/dist/storage/pipeline-runs/types.d.ts.map +1 -1
- package/dist/storage/projection-runs/errors.d.ts +6 -0
- package/dist/storage/projection-runs/errors.d.ts.map +1 -1
- package/dist/storage/projection-runs/in-memory.d.ts +5 -1
- package/dist/storage/projection-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/projection-runs/index.d.ts +2 -2
- package/dist/storage/projection-runs/index.d.ts.map +1 -1
- package/dist/storage/projection-runs/lifecycle.d.ts +1 -0
- package/dist/storage/projection-runs/lifecycle.d.ts.map +1 -1
- package/dist/storage/projection-runs/provider.js +2 -2
- package/dist/storage/projection-runs/types.d.ts +16 -0
- package/dist/storage/projection-runs/types.d.ts.map +1 -1
- package/dist/storage/run-claim.d.ts +132 -0
- package/dist/storage/run-claim.d.ts.map +1 -0
- package/dist/storage/share-grants/provider.js +3 -3
- package/dist/storage/share-sessions/in-memory.d.ts +2 -1
- package/dist/storage/share-sessions/in-memory.d.ts.map +1 -1
- package/dist/storage/share-sessions/index.d.ts +1 -1
- package/dist/storage/share-sessions/index.d.ts.map +1 -1
- package/dist/storage/share-sessions/provider.d.ts +1 -1
- package/dist/storage/share-sessions/provider.d.ts.map +1 -1
- package/dist/storage/share-sessions/provider.js +4 -2
- package/dist/storage/share-sessions/provider.js.map +1 -1
- package/dist/storage/share-sessions/record.d.ts +2 -1
- package/dist/storage/share-sessions/record.d.ts.map +1 -1
- package/dist/storage/share-sessions/types.d.ts +17 -1
- package/dist/storage/share-sessions/types.d.ts.map +1 -1
- package/dist/storage/sync-runs/in-memory.d.ts +10 -2
- 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/transitions.d.ts +2 -2
- package/dist/storage/sync-runs/transitions.d.ts.map +1 -1
- package/dist/storage/sync-runs/types.d.ts +29 -3
- package/dist/storage/sync-runs/types.d.ts.map +1 -1
- package/dist/storage/types.d.ts +12 -6
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/webhook-runs/in-memory.d.ts +2 -1
- package/dist/storage/webhook-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/webhook-runs/index.d.ts +2 -2
- package/dist/storage/webhook-runs/index.d.ts.map +1 -1
- package/dist/storage/webhook-runs/types.d.ts +33 -2
- package/dist/storage/webhook-runs/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/in-memory.d.ts +6 -3
- package/dist/storage/workflow-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/workflow-runs/index.d.ts +1 -1
- package/dist/storage/workflow-runs/index.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +12 -11
- package/dist/storage/workflow-runs/provider.js.map +1 -1
- package/dist/storage/workflow-runs/types.d.ts +11 -28
- package/dist/storage/workflow-runs/types.d.ts.map +1 -1
- package/dist/syncs/index.js +38 -35
- package/dist/syncs/index.js.map +1 -1
- package/dist/syncs/run-dispatch.d.ts +2 -0
- package/dist/syncs/run-dispatch.d.ts.map +1 -1
- package/dist/testing/ai-model-call-groups-contract.d.ts.map +1 -1
- package/dist/testing/artifact-holders-contract.d.ts +15 -0
- package/dist/testing/artifact-holders-contract.d.ts.map +1 -0
- package/dist/testing/artifact-storage-contract.d.ts.map +1 -1
- package/dist/testing/auth-storage-contract.d.ts.map +1 -1
- package/dist/testing/broker-contract.d.ts.map +1 -1
- package/dist/testing/connector-connection-storage-contract.d.ts +1 -1
- package/dist/testing/connector-connection-storage-contract.d.ts.map +1 -1
- package/dist/testing/dataset-ingest-storage-contract.d.ts +11 -0
- package/dist/testing/dataset-ingest-storage-contract.d.ts.map +1 -0
- package/dist/testing/dataset-sequence-contract.d.ts +1 -1
- package/dist/testing/dataset-sequence-contract.d.ts.map +1 -1
- package/dist/testing/execution.d.ts.map +1 -1
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +6245 -3192
- package/dist/testing/index.js.map +28 -19
- package/dist/testing/lake-retention-run-storage-contract.d.ts +9 -0
- package/dist/testing/lake-retention-run-storage-contract.d.ts.map +1 -0
- package/dist/testing/maintenance-heartbeat-storage-contract.d.ts +9 -0
- package/dist/testing/maintenance-heartbeat-storage-contract.d.ts.map +1 -0
- package/dist/testing/object-query-contract.d.ts.map +1 -1
- package/dist/testing/pipeline-execution.d.ts.map +1 -1
- package/dist/testing/pipeline-run-read-contract.d.ts +13 -0
- package/dist/testing/pipeline-run-read-contract.d.ts.map +1 -0
- package/dist/testing/projection-run-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 +12 -0
- package/dist/testing/run-claim-storage-contract.d.ts.map +1 -0
- package/dist/testing/run-claim.d.ts +30 -0
- package/dist/testing/run-claim.d.ts.map +1 -0
- package/dist/testing/run-recovery-contract.d.ts +49 -0
- package/dist/testing/run-recovery-contract.d.ts.map +1 -0
- package/dist/testing/share-session-storage-contract.d.ts.map +1 -1
- package/dist/testing/stored-artifacts.d.ts +10 -0
- package/dist/testing/stored-artifacts.d.ts.map +1 -0
- package/dist/testing/sync-execution.d.ts.map +1 -1
- package/dist/testing/webhook-execution.d.ts +1 -1
- package/dist/testing/webhook-execution.d.ts.map +1 -1
- package/dist/testing/webhook-run-storage-contract.d.ts.map +1 -1
- package/dist/users/execution.d.ts +18 -1
- package/dist/users/execution.d.ts.map +1 -1
- package/dist/users/index.d.ts +1 -1
- package/dist/users/index.d.ts.map +1 -1
- package/dist/webhooks/delivery-lease.d.ts +13 -0
- package/dist/webhooks/delivery-lease.d.ts.map +1 -0
- package/dist/webhooks/internal.d.ts +2 -0
- package/dist/webhooks/internal.d.ts.map +1 -1
- package/dist/webhooks/internal.js +68 -36
- package/dist/webhooks/internal.js.map +5 -4
- package/dist/webhooks/run-admission.d.ts.map +1 -1
- package/dist/workers/index.d.ts +5 -1
- package/dist/workers/index.d.ts.map +1 -1
- package/dist/workers/index.js +193 -58
- package/dist/workers/index.js.map +8 -7
- package/dist/workers/job-ids.d.ts +17 -0
- package/dist/workers/job-ids.d.ts.map +1 -0
- package/dist/workers/lost-projection-runs.d.ts +26 -0
- package/dist/workers/lost-projection-runs.d.ts.map +1 -0
- package/dist/workers/lost-runs.d.ts +51 -0
- package/dist/workers/lost-runs.d.ts.map +1 -0
- package/dist/workers/queue-delivery.d.ts.map +1 -1
- package/dist/workers/queue-worker.d.ts +1 -2
- package/dist/workers/queue-worker.d.ts.map +1 -1
- package/dist/workers/queued-run-dispatch.d.ts +90 -0
- package/dist/workers/queued-run-dispatch.d.ts.map +1 -0
- package/dist/workers/run-lease.d.ts +25 -0
- package/dist/workers/run-lease.d.ts.map +1 -0
- package/dist/workers/run-worker.d.ts +95 -0
- package/dist/workers/run-worker.d.ts.map +1 -0
- package/dist/workflows/index.js +64 -58
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/request.d.ts.map +1 -1
- package/dist/workflows/run-dispatch.d.ts +6 -1
- package/dist/workflows/run-dispatch.d.ts.map +1 -1
- package/package.json +41 -3
- package/src/actions/request.ts +24 -7
- package/src/actions/run/executor.ts +9 -42
- package/src/actions/types/context.ts +8 -3
- package/src/agents/approval-outcome.ts +2 -2
- package/src/agents/cancel.ts +2 -2
- package/src/agents/child-question.ts +76 -8
- package/src/agents/execution.ts +11 -3
- package/src/agents/fork.ts +12 -4
- package/src/agents/ids.ts +4 -1
- package/src/agents/index.ts +16 -3
- package/src/agents/model-loop.ts +3 -1
- package/src/agents/request.ts +42 -31
- package/src/agents/run-artifacts.ts +290 -46
- package/src/agents/run-session-children.ts +33 -0
- package/src/agents/run-session-http.ts +5 -0
- package/src/agents/run-session-serve.ts +11 -0
- package/src/agents/run-session.ts +8 -1
- package/src/agents/streams/protocol.ts +5 -10
- package/src/agents/tool-files.ts +1 -1
- package/src/agents/tool-input-coercion.ts +140 -0
- package/src/agents/validation.ts +12 -1
- package/src/artifacts/access.ts +71 -28
- package/src/artifacts/canvas-display.ts +160 -0
- package/src/artifacts/canvas.ts +26 -1
- package/src/artifacts/comment-text.ts +32 -0
- package/src/artifacts/comments.ts +275 -0
- package/src/artifacts/errors.ts +6 -1
- package/src/artifacts/events.ts +58 -0
- package/src/artifacts/execution.ts +496 -53
- package/src/artifacts/frames/assets.ts +20 -1
- package/src/artifacts/frames/grants.ts +31 -10
- package/src/artifacts/frames/index.ts +2 -0
- package/src/artifacts/frames/kit.ts +8 -5
- package/src/artifacts/frames/protocol.ts +231 -0
- package/src/artifacts/frames/runtime.ts +600 -29
- package/src/artifacts/holders.ts +120 -0
- package/src/artifacts/ids.ts +8 -0
- package/src/artifacts/index.ts +31 -2
- package/src/artifacts/limits.ts +28 -4
- package/src/artifacts/live/board.ts +759 -0
- package/src/artifacts/live/diff.ts +297 -0
- package/src/artifacts/live/document.ts +354 -0
- package/src/artifacts/live/files.ts +82 -0
- package/src/artifacts/live/index.ts +50 -0
- package/src/artifacts/live/presence.ts +144 -0
- package/src/artifacts/live/protocol.ts +134 -0
- package/src/artifacts/live/server.ts +16 -0
- package/src/artifacts/live/state.ts +115 -0
- package/src/artifacts/outline.ts +12 -0
- package/src/artifacts/publish/index.ts +26 -1
- package/src/artifacts/publish/merge.ts +271 -0
- package/src/artifacts/publish/previews.ts +485 -0
- package/src/artifacts/publish/publish.ts +92 -39
- package/src/artifacts/publish/query-answers.ts +85 -0
- package/src/artifacts/publish/references.ts +10 -4
- package/src/artifacts/publish/validate/canvas.ts +133 -1
- package/src/artifacts/theme.ts +9 -1
- package/src/auth/directory.ts +166 -0
- package/src/auth/member-events.ts +10 -3
- package/src/auth/runtime.ts +108 -8
- package/src/auth/strategy.ts +3 -1
- package/src/auth/types.ts +44 -0
- package/src/authorization/decision.ts +6 -5
- package/src/authorization/event-visibility.ts +4 -0
- package/src/broker/in-memory.ts +33 -6
- package/src/broker/types.ts +4 -0
- package/src/connectors/builders.ts +34 -2
- package/src/connectors/connections/access.ts +83 -0
- package/src/connectors/connections/contracts.ts +6 -1
- package/src/connectors/connections/execution.ts +2 -2
- package/src/connectors/connections/runs.ts +51 -2
- package/src/connectors/connections/service.ts +208 -41
- package/src/connectors/connections/views.ts +11 -4
- package/src/connectors/execution.ts +27 -3
- package/src/connectors/index.ts +2 -0
- package/src/connectors/service.ts +12 -0
- package/src/connectors/types.ts +37 -2
- package/src/datasets/execution.ts +74 -37
- package/src/datasets/ingest-flush-batch.ts +289 -0
- package/src/datasets/ingest-flush-job.ts +112 -0
- package/src/datasets/ingest-flush.ts +377 -0
- package/src/datasets/produced-version.ts +55 -0
- package/src/datasets/write.ts +65 -11
- package/src/deploy/services.ts +1 -1
- package/src/deploy/types.ts +2 -3
- package/src/deploy/validation.ts +1 -0
- package/src/error-reporting/capability.ts +66 -0
- package/src/error-reporting/internal.ts +12 -0
- package/src/error-reporting/reporter.ts +11 -35
- package/src/error-reporting/reports.ts +167 -0
- package/src/error-reporting/types.ts +99 -0
- package/src/errors/catalog.ts +6 -0
- package/src/events/definitions.ts +14 -0
- package/src/events/execution.ts +77 -28
- package/src/events/index.ts +3 -0
- package/src/events/scope.ts +2 -0
- package/src/events/types/artifacts.ts +40 -0
- package/src/events/types/index.ts +3 -0
- package/src/events/types/users.ts +5 -2
- package/src/execution/authorized-object-reader.ts +34 -0
- package/src/execution/object-reader-clearance.ts +31 -0
- package/src/execution/object-reader-security.ts +33 -13
- package/src/http/api-routes.ts +106 -5
- package/src/index.ts +22 -4
- package/src/lake-storage/errors.ts +21 -0
- package/src/lake-storage/index.ts +9 -1
- package/src/lake-storage/maintenance.ts +93 -0
- package/src/lake-storage/merge.ts +3 -1
- package/src/lake-storage/source-ordering.ts +28 -2
- package/src/lake-storage/types.ts +14 -0
- package/src/maintenance/heartbeat.ts +14 -0
- package/src/maintenance/index.ts +5 -3
- package/src/maintenance/lake-retention-status.ts +81 -0
- package/src/maintenance/lake-retention.ts +347 -0
- package/src/maintenance/loop.ts +365 -0
- package/src/maintenance/ontology-maintenance.ts +76 -229
- package/src/maintenance/passes/cron-pass.ts +217 -0
- package/src/maintenance/passes/directory-pass.ts +22 -0
- package/src/maintenance/passes/ingest-pass.ts +94 -0
- package/src/maintenance/passes/lake-change-feed.ts +112 -0
- package/src/maintenance/passes/lake-retention-pass.ts +71 -0
- package/src/maintenance/passes/ontology-pass.ts +19 -0
- package/src/maintenance/passes/projections-pass.ts +238 -0
- package/src/maintenance/passes/recovery-pass.ts +17 -0
- package/src/maintenance/passes/recovery-passes.ts +39 -0
- package/src/maintenance/passes/runs-pass.ts +12 -0
- package/src/maintenance/passes/triggers-pass.ts +332 -0
- package/src/maintenance/status.ts +75 -0
- package/src/maintenance/types.ts +27 -25
- package/src/materialization/model.ts +33 -21
- package/src/materializer/README.md +13 -2
- package/src/materializer/edits/artifact-refs.ts +140 -0
- package/src/materializer/edits/commit.ts +20 -7
- package/src/materializer/edits/operations.ts +23 -7
- package/src/materializer/edits/plan.ts +2 -0
- package/src/materializer/execution/work-records.ts +61 -0
- package/src/materializer/projections/replacement-plan.ts +2 -0
- package/src/materializer/shared/normalize.ts +14 -0
- package/src/materializer/telemetry/plan.ts +2 -0
- package/src/models/language-model.ts +6 -0
- package/src/models/tools.ts +2 -0
- package/src/objects/artifact-refs.ts +34 -0
- package/src/objects/materializer-adapter.ts +8 -3
- package/src/objects/object/upsert-batch.ts +7 -0
- package/src/objects/object/upsert.ts +11 -2
- package/src/objects/query/ir.ts +2 -0
- package/src/objects/query/scalar-values.ts +5 -3
- package/src/objects/runtime-batch.ts +8 -1
- package/src/objects/vectors/README.md +4 -4
- package/src/ontology/artifact-ref.ts +83 -0
- package/src/ontology/docs-markdown.ts +17 -0
- package/src/ontology/index.ts +3 -1
- package/src/ontology/inference/index.ts +2 -0
- package/src/ontology/json-schema.ts +13 -0
- package/src/ontology/primitives.ts +14 -0
- package/src/ontology/reference-values.ts +62 -0
- package/src/ontology/refs.ts +7 -1
- package/src/ontology/registry.ts +26 -1
- package/src/ontology/types.ts +2 -0
- package/src/ontology/user-ref.ts +35 -45
- package/src/ontology/validation/normalize.ts +13 -0
- package/src/ontology/validation/properties.ts +9 -0
- package/src/ontology/validation/schema.ts +12 -0
- package/src/pending-tasks.ts +51 -0
- package/src/pipelines/run-dispatch.ts +120 -238
- package/src/predicates/types.ts +2 -1
- package/src/projections/builders.ts +28 -13
- package/src/projections/run-dispatch.ts +1 -1
- package/src/projections/types.ts +1 -1
- package/src/projections/validation.ts +22 -8
- package/src/queues/in-memory.ts +50 -3
- package/src/queues/index.ts +4 -0
- package/src/queues/types.ts +68 -1
- package/src/runtime/create.ts +4 -0
- package/src/runtime/host.ts +118 -13
- package/src/runtime/index.ts +0 -1
- package/src/runtime/internal.ts +13 -0
- package/src/runtime/ontology-mutations.ts +1 -1
- package/src/runtime/sixb.ts +14 -5
- package/src/scheduler/index.ts +0 -2
- package/src/shared/backoff.ts +34 -0
- package/src/shared/duration.ts +15 -0
- package/src/shared/params/artifact-refs.ts +42 -0
- package/src/shares/compiler.ts +1 -1
- package/src/shares/guest-name.ts +20 -0
- package/src/shares/internal.ts +1 -0
- package/src/shares/session-protocol.ts +63 -0
- package/src/storage/agents/types.ts +1 -1
- package/src/storage/artifacts/errors.ts +10 -2
- package/src/storage/artifacts/in-memory.ts +579 -96
- package/src/storage/artifacts/index.ts +22 -1
- package/src/storage/artifacts/record.ts +255 -11
- package/src/storage/artifacts/types.ts +343 -40
- package/src/storage/auth/in-memory/auth-storage.ts +42 -5
- package/src/storage/auth/in-memory/identities.ts +16 -0
- package/src/storage/auth/in-memory/shared.ts +15 -0
- package/src/storage/auth/in-memory/users.ts +17 -16
- package/src/storage/auth/index.ts +3 -0
- package/src/storage/auth/types.ts +38 -0
- package/src/storage/connector-connections/in-memory.ts +4 -1
- package/src/storage/connector-connections/index.ts +1 -0
- package/src/storage/connector-connections/provider/runs.ts +3 -0
- package/src/storage/connector-connections/provider/shared.ts +30 -0
- package/src/storage/connector-connections/provider.ts +4 -0
- package/src/storage/connector-connections/types.ts +1 -0
- package/src/storage/dataset-ingest/codec.ts +90 -0
- package/src/storage/dataset-ingest/in-memory.ts +277 -0
- package/src/storage/dataset-ingest/index.ts +16 -0
- package/src/storage/dataset-ingest/provider.ts +592 -0
- package/src/storage/dataset-ingest/types.ts +191 -0
- package/src/storage/in-memory/index.ts +33 -0
- package/src/storage/index.ts +65 -5
- package/src/storage/internal.ts +20 -0
- package/src/storage/lake-retention-runs/in-memory.ts +22 -0
- package/src/storage/lake-retention-runs/index.ts +2 -0
- package/src/storage/lake-retention-runs/types.ts +19 -0
- package/src/storage/maintenance-heartbeats/in-memory.ts +24 -0
- package/src/storage/maintenance-heartbeats/index.ts +7 -0
- package/src/storage/maintenance-heartbeats/record.ts +50 -0
- package/src/storage/maintenance-heartbeats/types.ts +30 -0
- package/src/storage/objects/in-memory/query.ts +1 -0
- package/src/storage/objects/in-memory/storage.ts +81 -0
- package/src/storage/objects/read-scope.ts +1 -0
- package/src/storage/objects/types.ts +16 -1
- package/src/storage/ontology/in-memory/materializations.ts +8 -0
- package/src/storage/ontology/in-memory/replacement-plans.ts +4 -1
- package/src/storage/ontology/index.ts +2 -0
- package/src/storage/ontology/materializations.ts +18 -0
- package/src/storage/ontology/provider-work.ts +39 -0
- package/src/storage/pipeline-runs/in-memory.ts +97 -24
- package/src/storage/pipeline-runs/index.ts +0 -1
- package/src/storage/pipeline-runs/provider.ts +1 -1
- package/src/storage/pipeline-runs/transitions.ts +7 -4
- package/src/storage/pipeline-runs/types.ts +33 -7
- package/src/storage/projection-runs/errors.ts +10 -0
- package/src/storage/projection-runs/in-memory.ts +56 -1
- package/src/storage/projection-runs/index.ts +2 -1
- package/src/storage/projection-runs/lifecycle.ts +9 -1
- package/src/storage/projection-runs/types.ts +20 -1
- package/src/storage/run-claim.ts +224 -0
- package/src/storage/share-sessions/in-memory.ts +21 -0
- package/src/storage/share-sessions/index.ts +1 -0
- package/src/storage/share-sessions/provider.ts +1 -0
- package/src/storage/share-sessions/record.ts +28 -0
- package/src/storage/share-sessions/types.ts +19 -1
- package/src/storage/sync-runs/in-memory.ts +109 -29
- package/src/storage/sync-runs/index.ts +1 -1
- package/src/storage/sync-runs/transitions.ts +7 -4
- package/src/storage/sync-runs/types.ts +36 -3
- package/src/storage/types.ts +15 -5
- package/src/storage/webhook-runs/in-memory.ts +26 -2
- package/src/storage/webhook-runs/index.ts +3 -1
- package/src/storage/webhook-runs/types.ts +44 -3
- package/src/storage/workflow-runs/in-memory.ts +50 -36
- package/src/storage/workflow-runs/index.ts +0 -2
- package/src/storage/workflow-runs/types.ts +18 -30
- package/src/syncs/run-dispatch.ts +118 -239
- package/src/testing/ai-model-call-groups-contract.ts +2 -1
- package/src/testing/artifact-holders-contract.ts +392 -0
- package/src/testing/artifact-storage-contract.ts +1205 -151
- package/src/testing/auth-storage-contract.ts +228 -1
- package/src/testing/broker-contract.ts +56 -0
- package/src/testing/connector-connection-storage-contract.ts +94 -5
- package/src/testing/dataset-ingest-storage-contract.ts +480 -0
- package/src/testing/dataset-sequence-contract.ts +97 -12
- package/src/testing/execution.ts +23 -0
- package/src/testing/index.ts +31 -0
- package/src/testing/lake-retention-run-storage-contract.ts +75 -0
- package/src/testing/maintenance-heartbeat-storage-contract.ts +99 -0
- package/src/testing/object-query-contract.ts +93 -0
- package/src/testing/pipeline-execution.ts +3 -1
- package/src/testing/pipeline-run-read-contract.ts +123 -0
- package/src/testing/projection-run-storage-contract.ts +113 -0
- package/src/testing/queues-contract.ts +112 -0
- package/src/testing/run-claim-storage-contract.ts +736 -0
- package/src/testing/run-claim.ts +69 -0
- package/src/testing/run-recovery-contract.ts +176 -0
- package/src/testing/share-session-storage-contract.ts +43 -0
- package/src/testing/stored-artifacts.ts +43 -0
- package/src/testing/sync-execution.ts +3 -1
- package/src/testing/webhook-execution.ts +7 -2
- package/src/testing/webhook-run-storage-contract.ts +102 -5
- package/src/users/execution.ts +50 -2
- package/src/users/index.ts +1 -0
- package/src/webhooks/delivery-lease.ts +40 -0
- package/src/webhooks/internal.ts +2 -0
- package/src/webhooks/run-admission.ts +22 -9
- package/src/workers/README.md +169 -0
- package/src/workers/index.ts +9 -1
- package/src/workers/job-ids.ts +31 -0
- package/src/workers/lost-projection-runs.ts +114 -0
- package/src/workers/lost-runs.ts +397 -0
- package/src/workers/queue-delivery.ts +2 -14
- package/src/workers/queue-worker.ts +9 -17
- package/src/workers/queued-run-dispatch.ts +308 -0
- package/src/workers/run-lease.ts +46 -0
- package/src/workers/run-worker.ts +312 -0
- package/src/workers/worker.ts +4 -17
- package/src/workflows/request.ts +2 -0
- package/src/workflows/run-dispatch.ts +22 -4
- package/src/workflows/snapshot.ts +1 -0
- package/dist/chunk-2g0r46hy.js.map +0 -12
- package/dist/chunk-3fqxbn31.js +0 -107
- package/dist/chunk-3fqxbn31.js.map +0 -11
- package/dist/chunk-4s753g3k.js +0 -314
- package/dist/chunk-4s753g3k.js.map +0 -12
- package/dist/chunk-5kyvrtjh.js.map +0 -12
- package/dist/chunk-5taem5aw.js.map +0 -10
- package/dist/chunk-65abf64x.js +0 -13
- package/dist/chunk-65abf64x.js.map +0 -10
- package/dist/chunk-9x8dybsb.js.map +0 -10
- package/dist/chunk-az47zep4.js +0 -41
- package/dist/chunk-az47zep4.js.map +0 -10
- package/dist/chunk-c706qvyc.js +0 -299
- package/dist/chunk-c706qvyc.js.map +0 -11
- package/dist/chunk-djs3hw9p.js.map +0 -20
- package/dist/chunk-dsv783c3.js.map +0 -47
- package/dist/chunk-e5wf5vz0.js.map +0 -10
- package/dist/chunk-e6xgz4h4.js.map +0 -21
- package/dist/chunk-e7v3trpz.js.map +0 -10
- package/dist/chunk-eqgr6nsa.js.map +0 -72
- package/dist/chunk-fb3feg1e.js +0 -298
- package/dist/chunk-fb3feg1e.js.map +0 -12
- package/dist/chunk-hz5d43gn.js.map +0 -10
- package/dist/chunk-j8thxj7w.js.map +0 -22
- package/dist/chunk-jbw70d6t.js.map +0 -10
- package/dist/chunk-jftd33rc.js.map +0 -11
- package/dist/chunk-jspskey0.js.map +0 -10
- package/dist/chunk-kfee1h52.js.map +0 -13
- package/dist/chunk-kwfhd1g0.js +0 -144
- package/dist/chunk-kwfhd1g0.js.map +0 -13
- package/dist/chunk-nz7815t3.js.map +0 -14
- package/dist/chunk-s3we74h8.js.map +0 -12
- package/dist/chunk-scyq22td.js.map +0 -12
- package/dist/chunk-w1btn96n.js.map +0 -44
- package/dist/chunk-w976a4me.js.map +0 -10
- package/dist/chunk-wkq3kvzd.js.map +0 -10
- package/dist/chunk-wrjx1fqz.js +0 -587
- package/dist/chunk-wrjx1fqz.js.map +0 -18
- package/dist/chunk-yw9pyg66.js +0 -143
- package/dist/chunk-yw9pyg66.js.map +0 -11
- package/dist/chunk-z8fx5cgb.js.map +0 -11
- package/dist/scheduler/runtime.d.ts +0 -40
- package/dist/scheduler/runtime.d.ts.map +0 -1
- package/dist/workers/unstarted-run.d.ts +0 -10
- package/dist/workers/unstarted-run.d.ts.map +0 -1
- package/src/scheduler/runtime.ts +0 -214
- package/src/workers/unstarted-run.ts +0 -18
- /package/dist/{chunk-80gym75n.js.map → chunk-186k5yz3.js.map} +0 -0
- /package/dist/{chunk-ga63a3dz.js.map → chunk-2bn6813a.js.map} +0 -0
- /package/dist/{chunk-ytzcxtpt.js.map → chunk-3ba89vm7.js.map} +0 -0
- /package/dist/{chunk-d04g36fw.js.map → chunk-5qqmndhm.js.map} +0 -0
- /package/dist/{chunk-5wtnmpze.js.map → chunk-7qe46788.js.map} +0 -0
- /package/dist/{chunk-31kcqmhf.js.map → chunk-855w9nvw.js.map} +0 -0
- /package/dist/{chunk-9whfmsfk.js.map → chunk-8tqnsx3q.js.map} +0 -0
- /package/dist/{chunk-s038wa5v.js.map → chunk-b9qfh2ya.js.map} +0 -0
- /package/dist/{chunk-jjmggm9a.js.map → chunk-fe6r7yhg.js.map} +0 -0
- /package/dist/{chunk-165c9wm6.js.map → chunk-g2ph4873.js.map} +0 -0
- /package/dist/{chunk-4zm1k3xj.js.map → chunk-r2psmn42.js.map} +0 -0
- /package/dist/{chunk-2ajw5rz0.js.map → chunk-rsxb14an.js.map} +0 -0
- /package/dist/{chunk-r1cxq7vv.js.map → chunk-rtdrm592.js.map} +0 -0
- /package/dist/{chunk-4bm0caep.js.map → chunk-smnt672s.js.map} +0 -0
- /package/dist/{chunk-21q0j5f2.js.map → chunk-stmxh0hv.js.map} +0 -0
- /package/dist/{chunk-ff5xkv0p.js.map → chunk-tfzvjdms.js.map} +0 -0
- /package/dist/{chunk-6b61s40c.js.map → chunk-w3t94hm6.js.map} +0 -0
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*
|
|
7
7
|
* In every layout it applies the theme the app sends, then fires `sixb:theme` on the window for
|
|
8
8
|
* what draws its own colors; answers the app's requests; and tells the app about the links the
|
|
9
|
-
* reader follows, to other artifacts or to web pages, for the app to open them,
|
|
10
|
-
* `<sixb-embed>` boxes are, for the app to draw them over the
|
|
11
|
-
* every `section.slide` is a 1280×720 slide, shown one at a time
|
|
12
|
-
* a grid. The URL's fragment can open it at a slide, and with
|
|
13
|
-
* filling the frame, as a thumbnail or an embed does; it tells
|
|
14
|
-
* overview. A page scrolls as it is: it reports the embeds
|
|
15
|
-
* height as it changes.
|
|
9
|
+
* reader follows, to other artifacts or to web pages, for the app to open them, the words of the
|
|
10
|
+
* buttons they press, and where its `<sixb-embed>` boxes are, for the app to draw them over the
|
|
11
|
+
* frame. A deck it also lays out: every `section.slide` is a 1280×720 slide, shown one at a time
|
|
12
|
+
* scaled to fit, or all at once in a grid. The URL's fragment can open it at a slide, and with
|
|
13
|
+
* `sixb-fill` show that slide alone filling the frame, as a thumbnail or an embed does; it tells
|
|
14
|
+
* the app about keys and picks in the overview. A page scrolls as it is: it reports the embeds
|
|
15
|
+
* near its view as it scrolls, and its height as it changes.
|
|
16
16
|
*
|
|
17
17
|
* It gives every layout `window.sixb.state`, where a page keeps JSON values for its reader: each
|
|
18
18
|
* call is a message the app answers, and the app keeps the values. Opened on its own, with no app
|
|
@@ -26,6 +26,23 @@
|
|
|
26
26
|
* When the objects a query reads change, the app reads it again and tells the frame, which fires
|
|
27
27
|
* `sixb:query` on the window with `detail.name`, for the page to call `sixb.query(name)` again.
|
|
28
28
|
* Opened on its own, nothing tells it: the rows the check served are all there is.
|
|
29
|
+
*
|
|
30
|
+
* A canvas's board served for editing has each static element marked with its address
|
|
31
|
+
* (`data-sixb-at`), its kind (`data-sixb-edit`) and a text's words hashed (`data-sixb-text`), as
|
|
32
|
+
* `annotateBoard` writes them. While the app has editing on, a click picks an element instead of
|
|
33
|
+
* following it, the frame reports what the reader points at and picks, and a text element takes
|
|
34
|
+
* the reader's typing, each change posted as its words. What a script built, or a text whose words
|
|
35
|
+
* a script rewrote, is reported as scripted and takes nothing. What others change arrives as
|
|
36
|
+
* patches, element by element; the one the reader is typing in takes its own once they leave it,
|
|
37
|
+
* so their caret stays. What editing reports goes through the port the app hands over with its
|
|
38
|
+
* first `edit` request, taken before the page's scripts run: they cannot post on it. Once it holds
|
|
39
|
+
* that port, the frame also sends the reader's pinches, ⌘-wheel turns and ⌘ +, − and 0 through
|
|
40
|
+
* it, for the app to zoom the opened board instead of the browser zooming everything.
|
|
41
|
+
*
|
|
42
|
+
* A board running on the canvas is handed its port with `canvas` instead: the reader uses its page
|
|
43
|
+
* in place, and the frame sends through the port what moves the canvas, their wheel turns unless
|
|
44
|
+
* the page scrolls them, a finger's drag, Space held to drag, and the zooming above, and the words
|
|
45
|
+
* of what they press, for the canvas to follow the arrow they label.
|
|
29
46
|
*/
|
|
30
47
|
export function frameRuntime(): void {
|
|
31
48
|
const PROTOCOL = "sixb-frame/1"
|
|
@@ -48,6 +65,35 @@ export function frameRuntime(): void {
|
|
|
48
65
|
const MAX_VALUE_BYTES = 65536
|
|
49
66
|
/** A query's name, as `isArtifactQueryName` says: refused here before it is sent. */
|
|
50
67
|
const QUERY_NAME = /^[a-z0-9][a-z0-9-]{0,63}$/
|
|
68
|
+
/** The longest words a press reports, an arrow's label's, as `ARTIFACT_LIMITS` says. */
|
|
69
|
+
const MAX_LABEL_LENGTH = 120
|
|
70
|
+
/** What `annotateBoard` marks a board's elements with. */
|
|
71
|
+
const AT = "data-sixb-at"
|
|
72
|
+
const KIND = "data-sixb-edit"
|
|
73
|
+
const WORDS = "data-sixb-text"
|
|
74
|
+
const MAX_EDIT_LABEL = 80
|
|
75
|
+
/** A comment's bubble, its tip where the pin goes, as the canvas draws it. */
|
|
76
|
+
const COMMENT_CURSOR =
|
|
77
|
+
"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 21V11a8 8 0 1 1 8 8H3z' fill='%23111' stroke='white' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E\") 3 21, crosshair"
|
|
78
|
+
/**
|
|
79
|
+
* How picking shows: editing, a dashed line around what the pointer is over and a solid one
|
|
80
|
+
* around what is picked, under a bubble pointer when commenting. One blue whatever the
|
|
81
|
+
* page or the theme, as a design tool's selection is, so it shows on light and dark alike.
|
|
82
|
+
*/
|
|
83
|
+
const EDITING_CSS = [
|
|
84
|
+
"[data-sixb-editing] [data-sixb-hover] { outline: 1px dashed #0a84ff; outline-offset: 2px; }",
|
|
85
|
+
"[data-sixb-editing] [data-sixb-picked] { outline: 2px solid #0a84ff; outline-offset: 2px; }",
|
|
86
|
+
"[data-sixb-editing] [contenteditable] { cursor: text; }",
|
|
87
|
+
`[data-sixb-commenting], [data-sixb-commenting] * { cursor: ${COMMENT_CURSOR} !important; }`,
|
|
88
|
+
"[data-sixb-commenting] [data-sixb-hover] { outline: 2px dashed #0a84ff; outline-offset: 3px; }",
|
|
89
|
+
"[data-sixb-commenting] [data-sixb-picked] { outline: 2px solid #0a84ff; outline-offset: 3px; }",
|
|
90
|
+
].join(" ")
|
|
91
|
+
/**
|
|
92
|
+
* A board running on the canvas: the page takes no touch gesture of its own, which the canvas
|
|
93
|
+
* takes instead, and its scrolling never carries on to the app around it.
|
|
94
|
+
*/
|
|
95
|
+
const CANVAS_CSS =
|
|
96
|
+
"html { overscroll-behavior: none; } html, html * { touch-action: none !important; }"
|
|
51
97
|
const root = document.documentElement
|
|
52
98
|
// Only set while the runtime itself runs, so kept for what reads it later.
|
|
53
99
|
const script = document.currentScript as HTMLScriptElement | null
|
|
@@ -186,6 +232,485 @@ export function frameRuntime(): void {
|
|
|
186
232
|
reportEmbeds()
|
|
187
233
|
}
|
|
188
234
|
|
|
235
|
+
// ── Editing a board ─────────────────────────────────────────────────
|
|
236
|
+
|
|
237
|
+
// What editing reports goes to the app through the port its first `edit` request hands over, as
|
|
238
|
+
// a board running on the canvas is handed one with `canvas`, never through the window, where the
|
|
239
|
+
// page's own scripts post too. The port, and the way to post on it, are taken before any of the
|
|
240
|
+
// page's scripts run, which cannot reach either.
|
|
241
|
+
const portPost = typeof MessagePort === "function" ? MessagePort.prototype.postMessage : undefined
|
|
242
|
+
const apply = Reflect.apply
|
|
243
|
+
let appPort: MessagePort | null = null
|
|
244
|
+
const postPort = (message: Record<string, unknown>) => {
|
|
245
|
+
if (appPort && portPost) apply(portPost, appPort, [{ protocol: PROTOCOL, ...message }])
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
let editing = false
|
|
249
|
+
/** Whether a text the reader picks takes their typing: not while they pick what to comment on. */
|
|
250
|
+
let typable = true
|
|
251
|
+
let pointed: Element | null = null
|
|
252
|
+
let picked: Element | null = null
|
|
253
|
+
let typing: HTMLElement | null = null
|
|
254
|
+
/** What others changed in the element the reader is typing in, for when they leave it. */
|
|
255
|
+
let held: Record<string, unknown> | null = null
|
|
256
|
+
/** The words the reader's typing starts from: as they began, then as last posted. */
|
|
257
|
+
let typedFrom = ""
|
|
258
|
+
|
|
259
|
+
/** FNV-1a over the words' UTF-16 code units, as `boardTextHash` hashes them. */
|
|
260
|
+
const wordsHash = (text: string): string => {
|
|
261
|
+
let hash = 0x811c9dc5
|
|
262
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
263
|
+
hash ^= text.charCodeAt(index)
|
|
264
|
+
hash = Math.imul(hash, 0x01000193) >>> 0
|
|
265
|
+
}
|
|
266
|
+
return hash.toString(16)
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/** A text's words as they read: a line break between two words parts them. */
|
|
270
|
+
const spokenWords = (element: Element): string => {
|
|
271
|
+
const copy = element.cloneNode(true)
|
|
272
|
+
if (!(copy instanceof Element)) return element.textContent ?? ""
|
|
273
|
+
for (const lineBreak of Array.from(copy.querySelectorAll("br"))) lineBreak.replaceWith(" ")
|
|
274
|
+
for (const code of Array.from(copy.querySelectorAll("script, style, template"))) code.remove()
|
|
275
|
+
return copy.textContent ?? ""
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* What is drawn as picked or pointed at: the element, or, picking what to comment on, what a
|
|
280
|
+
* script built too, which a comment can be about though it cannot be edited.
|
|
281
|
+
*/
|
|
282
|
+
const commentable = (element: Element | null, node: EventTarget | null): Element | null =>
|
|
283
|
+
element ??
|
|
284
|
+
(!typable && node instanceof Element && node !== root && node !== document.body ? node : null)
|
|
285
|
+
|
|
286
|
+
/** The element the reader means by `node`, as the app is told of it. */
|
|
287
|
+
const editTarget = (node: EventTarget | null) => {
|
|
288
|
+
const start = node instanceof Element ? node : null
|
|
289
|
+
const element = start?.closest(`[${AT}]`) ?? null
|
|
290
|
+
const box = (start ?? element)?.getBoundingClientRect()
|
|
291
|
+
const rect = {
|
|
292
|
+
x: box?.left ?? 0,
|
|
293
|
+
y: box?.top ?? 0,
|
|
294
|
+
width: box?.width ?? 0,
|
|
295
|
+
height: box?.height ?? 0,
|
|
296
|
+
}
|
|
297
|
+
const kind = element?.getAttribute(KIND) ?? ""
|
|
298
|
+
// The page itself is no part of it to quote.
|
|
299
|
+
const shown =
|
|
300
|
+
start && start !== root && start !== document.body
|
|
301
|
+
? spokenWords(start).replace(/\s+/g, " ").trim()
|
|
302
|
+
: ""
|
|
303
|
+
const scripted = {
|
|
304
|
+
address: null,
|
|
305
|
+
kind: "scripted",
|
|
306
|
+
within: element?.getAttribute(AT) ?? null,
|
|
307
|
+
...(shown ? { label: shown.slice(0, MAX_EDIT_LABEL) } : {}),
|
|
308
|
+
rect,
|
|
309
|
+
}
|
|
310
|
+
if (!element) return { element: null, target: scripted }
|
|
311
|
+
|
|
312
|
+
// What is inside a text, or drawn whole, is part of it; anything else inside a box that has
|
|
313
|
+
// no address of its own is a script's.
|
|
314
|
+
if (element !== start && kind !== "text" && kind !== "whole") {
|
|
315
|
+
return { element: null, target: scripted }
|
|
316
|
+
}
|
|
317
|
+
const words = element.textContent ?? ""
|
|
318
|
+
if (kind === "text" && wordsHash(words) !== element.getAttribute(WORDS)) {
|
|
319
|
+
return { element: null, target: { ...scripted, within: element.getAttribute(AT) } }
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const own = element.getBoundingClientRect()
|
|
323
|
+
const label = (kind === "image" ? (element.getAttribute("alt") ?? "") : spokenWords(element))
|
|
324
|
+
.replace(/\s+/g, " ")
|
|
325
|
+
.trim()
|
|
326
|
+
.slice(0, MAX_EDIT_LABEL)
|
|
327
|
+
return {
|
|
328
|
+
element,
|
|
329
|
+
target: {
|
|
330
|
+
address: element.getAttribute(AT),
|
|
331
|
+
kind,
|
|
332
|
+
label,
|
|
333
|
+
rect: { x: own.left, y: own.top, width: own.width, height: own.height },
|
|
334
|
+
},
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
const mark = (attribute: string, previous: Element | null, next: Element | null) => {
|
|
339
|
+
previous?.removeAttribute(attribute)
|
|
340
|
+
next?.setAttribute(attribute, "")
|
|
341
|
+
return next
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
const stopTyping = () => {
|
|
345
|
+
const element = typing
|
|
346
|
+
if (!element) return
|
|
347
|
+
typing = null
|
|
348
|
+
element.removeAttribute("contenteditable")
|
|
349
|
+
const patch = held
|
|
350
|
+
held = null
|
|
351
|
+
if (patch) applyPatch(element, patch)
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/** Makes an element what a patch says it holds now: its attributes, then what is inside it. */
|
|
355
|
+
const applyPatch = (element: Element, patch: Record<string, unknown>) => {
|
|
356
|
+
const attributes = patch.attributes
|
|
357
|
+
if (attributes && typeof attributes === "object") {
|
|
358
|
+
const next = attributes as Record<string, unknown>
|
|
359
|
+
for (const name of element.getAttributeNames()) {
|
|
360
|
+
if (!(name in next) && !name.startsWith("data-sixb-")) element.removeAttribute(name)
|
|
361
|
+
}
|
|
362
|
+
for (const [name, value] of Object.entries(next)) {
|
|
363
|
+
if (typeof value === "string" && /^[a-z_:][a-z0-9_.:-]*$/i.test(name)) {
|
|
364
|
+
element.setAttribute(name, value)
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
if (typeof patch.html === "string") element.innerHTML = patch.html
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
const startEditing = (on: boolean, typingAllowed: boolean) => {
|
|
372
|
+
editing = on
|
|
373
|
+
typable = typingAllowed
|
|
374
|
+
if (!typable) stopTyping()
|
|
375
|
+
root.toggleAttribute("data-sixb-editing", on)
|
|
376
|
+
// Picking what to comment on: the pointer is a comment's bubble, and what it would comment on
|
|
377
|
+
// is outlined.
|
|
378
|
+
root.toggleAttribute("data-sixb-commenting", on && !typable)
|
|
379
|
+
if (on && !document.getElementById("sixb-editing")) {
|
|
380
|
+
const style = document.createElement("style")
|
|
381
|
+
style.id = "sixb-editing"
|
|
382
|
+
style.textContent = EDITING_CSS
|
|
383
|
+
document.head.append(style)
|
|
384
|
+
}
|
|
385
|
+
if (!on) {
|
|
386
|
+
stopTyping()
|
|
387
|
+
pointed = mark("data-sixb-hover", pointed, null)
|
|
388
|
+
picked = mark("data-sixb-picked", picked, null)
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// Before anything of the page's own: editing, a click picks, and nothing follows it.
|
|
393
|
+
window.addEventListener(
|
|
394
|
+
"click",
|
|
395
|
+
(event) => {
|
|
396
|
+
// Only the reader's own clicks: the page's scripts can click too.
|
|
397
|
+
if (!editing || !event.isTrusted) return
|
|
398
|
+
if (typing?.contains(event.target as Node | null)) return
|
|
399
|
+
event.preventDefault()
|
|
400
|
+
event.stopPropagation()
|
|
401
|
+
stopTyping()
|
|
402
|
+
|
|
403
|
+
const { element, target } = editTarget(event.target)
|
|
404
|
+
picked = mark("data-sixb-picked", picked, commentable(element, event.target))
|
|
405
|
+
// Where the reader clicked, for a comment's pin.
|
|
406
|
+
const at = { x: event.clientX, y: event.clientY }
|
|
407
|
+
postPort({ event: "edit.select", params: { target, at } })
|
|
408
|
+
if (typable && element instanceof HTMLElement && target.kind === "text") {
|
|
409
|
+
typing = element
|
|
410
|
+
typedFrom = element.textContent ?? ""
|
|
411
|
+
element.setAttribute("contenteditable", "plaintext-only")
|
|
412
|
+
element.focus()
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
true
|
|
416
|
+
)
|
|
417
|
+
document.addEventListener("mouseover", (event) => {
|
|
418
|
+
if (!editing || !event.isTrusted) return
|
|
419
|
+
const { element, target } = editTarget(event.target)
|
|
420
|
+
const shown = commentable(element, event.target)
|
|
421
|
+
if (shown === pointed && shown !== null) return
|
|
422
|
+
pointed = mark("data-sixb-hover", pointed, shown)
|
|
423
|
+
postPort({ event: "edit.hover", params: { target } })
|
|
424
|
+
})
|
|
425
|
+
// The pointer gone from the page, nothing is under it: it left for nothing of the page.
|
|
426
|
+
document.addEventListener("mouseout", (event) => {
|
|
427
|
+
if (!editing || !event.isTrusted || event.relatedTarget !== null || pointed === null) return
|
|
428
|
+
pointed = mark("data-sixb-hover", pointed, null)
|
|
429
|
+
postPort({ event: "edit.hover", params: { target: null } })
|
|
430
|
+
})
|
|
431
|
+
document.addEventListener("input", (event) => {
|
|
432
|
+
if (!editing || !event.isTrusted || !typing || !typing.contains(event.target as Node | null)) {
|
|
433
|
+
return
|
|
434
|
+
}
|
|
435
|
+
const text = typing.textContent ?? ""
|
|
436
|
+
// Its words are the reader's now: still theirs to type in.
|
|
437
|
+
typing.setAttribute(WORDS, wordsHash(text))
|
|
438
|
+
postPort({
|
|
439
|
+
event: "edit.text",
|
|
440
|
+
params: { address: typing.getAttribute(AT), base: typedFrom, text },
|
|
441
|
+
})
|
|
442
|
+
typedFrom = text
|
|
443
|
+
})
|
|
444
|
+
window.addEventListener(
|
|
445
|
+
"keydown",
|
|
446
|
+
(event) => {
|
|
447
|
+
if (!typing || !event.isTrusted) return
|
|
448
|
+
// A text element's words are one block: a new line would be new markup.
|
|
449
|
+
if (event.key === "Enter") event.preventDefault()
|
|
450
|
+
if (event.key === "Escape") typing.blur()
|
|
451
|
+
event.stopPropagation()
|
|
452
|
+
},
|
|
453
|
+
true
|
|
454
|
+
)
|
|
455
|
+
document.addEventListener("focusout", (event) => {
|
|
456
|
+
if (typing && event.target === typing) stopTyping()
|
|
457
|
+
})
|
|
458
|
+
|
|
459
|
+
// ── The reader's gestures over a canvas's board ─────────────────────
|
|
460
|
+
|
|
461
|
+
// A canvas's board is zoomed by the app around it, never by the browser: once the app has handed
|
|
462
|
+
// the port over, a pinch, the wheel with ⌘ or Ctrl, and ⌘ or Ctrl with +, − or 0 go to the app
|
|
463
|
+
// through it, the reader's own alone. Without a port, as a document's or a deck's frame is, they
|
|
464
|
+
// stay the browser's.
|
|
465
|
+
//
|
|
466
|
+
// A board running on the canvas, handed its port with `canvas`, is a page the reader uses in
|
|
467
|
+
// place among the others: its clicks, keys and text stay its own, and what moves the canvas goes
|
|
468
|
+
// to the app. The wheel pans the canvas unless the page scrolls under the pointer; a finger
|
|
469
|
+
// dragging pans it, while a tap stays the page's; Space held outside a field lets the reader
|
|
470
|
+
// drag the canvas.
|
|
471
|
+
const mac = /Mac|iPhone|iPad/.test(window.navigator?.platform ?? "")
|
|
472
|
+
const zoom = (params: Record<string, unknown>) => postPort({ event: "zoom", params })
|
|
473
|
+
const pan = (x: number, y: number, by: "wheel" | "touch") =>
|
|
474
|
+
postPort({ event: "pan", params: { x, y, by } })
|
|
475
|
+
const forwards = (event: Event) => appPort !== null && event.isTrusted
|
|
476
|
+
let onCanvas = false
|
|
477
|
+
/** The canvas is panning by the wheel, as the app last said. */
|
|
478
|
+
let canvasMoving = false
|
|
479
|
+
|
|
480
|
+
/** How long a wheel's turns are one gesture apart: React Flow's own pause before a pan ends. */
|
|
481
|
+
const WHEEL_GESTURE_MS = 150
|
|
482
|
+
/** Less overflow than this is a page's margins, not content to scroll. */
|
|
483
|
+
const MIN_OVERFLOW = 16
|
|
484
|
+
let wheeledAt = Number.NEGATIVE_INFINITY
|
|
485
|
+
let wheelScrolls = false
|
|
486
|
+
|
|
487
|
+
/** Whether what is under `target`, or the page, scrolls further by `x`, `y`. */
|
|
488
|
+
const scrollsUnder = (target: EventTarget | null, x: number, y: number): boolean => {
|
|
489
|
+
const vertical = Math.abs(y) >= Math.abs(x)
|
|
490
|
+
const delta = vertical ? y : x
|
|
491
|
+
if (delta === 0) return false
|
|
492
|
+
|
|
493
|
+
const overflowOf = (element: Element) =>
|
|
494
|
+
getComputedStyle(element)[vertical ? "overflowY" : "overflowX"]
|
|
495
|
+
const scrolls = (size: number, shown: number, at: number) =>
|
|
496
|
+
size - shown >= MIN_OVERFLOW && (delta > 0 ? at + shown < size - 1 : at > 0)
|
|
497
|
+
|
|
498
|
+
for (
|
|
499
|
+
let element = target instanceof Element ? target : null;
|
|
500
|
+
element && element !== root && element !== document.body;
|
|
501
|
+
element = element.parentElement
|
|
502
|
+
) {
|
|
503
|
+
if (!/auto|scroll/.test(overflowOf(element))) continue
|
|
504
|
+
const scrolled = vertical
|
|
505
|
+
? scrolls(element.scrollHeight, element.clientHeight, element.scrollTop)
|
|
506
|
+
: scrolls(element.scrollWidth, element.clientWidth, element.scrollLeft)
|
|
507
|
+
if (scrolled) return true
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
const page = document.scrollingElement
|
|
511
|
+
if (
|
|
512
|
+
!page ||
|
|
513
|
+
[root, document.body].some((each) => each && /hidden|clip/.test(overflowOf(each)))
|
|
514
|
+
) {
|
|
515
|
+
return false
|
|
516
|
+
}
|
|
517
|
+
return vertical
|
|
518
|
+
? scrolls(page.scrollHeight, window.innerHeight, window.scrollY)
|
|
519
|
+
: scrolls(page.scrollWidth, window.innerWidth, window.scrollX)
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
window.addEventListener(
|
|
523
|
+
"wheel",
|
|
524
|
+
(event) => {
|
|
525
|
+
if (!forwards(event)) return
|
|
526
|
+
|
|
527
|
+
if (event.ctrlKey || event.metaKey) {
|
|
528
|
+
event.preventDefault()
|
|
529
|
+
// As the canvas zooms by the wheel: a trackpad's pinch is the wheel with Ctrl, in small steps.
|
|
530
|
+
const unit = event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002
|
|
531
|
+
const factor = 2 ** (-event.deltaY * unit * (event.ctrlKey && mac ? 10 : 1))
|
|
532
|
+
zoom({ factor, at: { x: event.clientX, y: event.clientY } })
|
|
533
|
+
return
|
|
534
|
+
}
|
|
535
|
+
if (!onCanvas) return
|
|
536
|
+
|
|
537
|
+
// Lines, as Firefox turns, count as React Flow counts them; Shift turns the wheel sideways
|
|
538
|
+
// where the system doesn't already.
|
|
539
|
+
const unit = event.deltaMode === 1 ? 20 : event.deltaMode === 2 ? window.innerHeight : 1
|
|
540
|
+
const x = (!mac && event.shiftKey ? event.deltaY : event.deltaX) * unit
|
|
541
|
+
const y = !mac && event.shiftKey ? 0 : event.deltaY * unit
|
|
542
|
+
|
|
543
|
+
// A gesture goes one way from its first turn, as a browser keeps scrolling what it started
|
|
544
|
+
// on. The page scrolls it when something under the pointer scrolls that way and the canvas
|
|
545
|
+
// was not panning: a canvas panned under a still pointer keeps panning as a page comes under
|
|
546
|
+
// it, and a page scrolled to its end lets the next gesture pan.
|
|
547
|
+
if (event.timeStamp - wheeledAt > WHEEL_GESTURE_MS) {
|
|
548
|
+
wheelScrolls = !canvasMoving && scrollsUnder(event.target, x, y)
|
|
549
|
+
}
|
|
550
|
+
wheeledAt = event.timeStamp
|
|
551
|
+
if (wheelScrolls) return
|
|
552
|
+
|
|
553
|
+
event.preventDefault()
|
|
554
|
+
pan(x, y, "wheel")
|
|
555
|
+
},
|
|
556
|
+
{ passive: false }
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
// Two fingers pinch on a touch screen, measured on the screen: the frame grows as the zoom
|
|
560
|
+
// follows them, so in its own pixels they would seem to close. Safari also tells of a pinch as a
|
|
561
|
+
// gesture of its own, which is only stopped here; on a Mac's trackpad, where no finger touches
|
|
562
|
+
// the page, the gesture is it.
|
|
563
|
+
//
|
|
564
|
+
// On the canvas, one finger dragging past a few pixels pans it, and two pan it by their middle as
|
|
565
|
+
// they pinch: the page takes no touch gesture of its own (`touch-action`), and a tap, which
|
|
566
|
+
// moves less, stays a click on the page.
|
|
567
|
+
const TOUCH_SLOP = 6
|
|
568
|
+
let spread = 0
|
|
569
|
+
/** Where the fingers are on screen, one or two's middle, and whether they drag the canvas yet. */
|
|
570
|
+
let touched: { x: number; y: number; dragging: boolean } | null = null
|
|
571
|
+
const spreadOf = (touches: TouchList) => {
|
|
572
|
+
const [one, two] = [touches[0], touches[1]]
|
|
573
|
+
return one && two ? Math.hypot(one.screenX - two.screenX, one.screenY - two.screenY) : 0
|
|
574
|
+
}
|
|
575
|
+
const middleOf = (touches: TouchList) => {
|
|
576
|
+
const fingers = [touches[0], touches[1]].filter((touch) => touch !== undefined)
|
|
577
|
+
const sum = (axis: "screenX" | "screenY") =>
|
|
578
|
+
fingers.reduce((total, touch) => total + touch[axis], 0) / Math.max(1, fingers.length)
|
|
579
|
+
return { x: sum("screenX"), y: sum("screenY") }
|
|
580
|
+
}
|
|
581
|
+
window.addEventListener(
|
|
582
|
+
"touchstart",
|
|
583
|
+
(event) => {
|
|
584
|
+
const ours = forwards(event)
|
|
585
|
+
spread = ours && event.touches.length === 2 ? spreadOf(event.touches) : 0
|
|
586
|
+
touched =
|
|
587
|
+
ours && onCanvas ? { ...middleOf(event.touches), dragging: event.touches.length > 1 } : null
|
|
588
|
+
},
|
|
589
|
+
{ passive: true }
|
|
590
|
+
)
|
|
591
|
+
window.addEventListener(
|
|
592
|
+
"touchmove",
|
|
593
|
+
(event) => {
|
|
594
|
+
if (!forwards(event)) return
|
|
595
|
+
|
|
596
|
+
if (touched && event.touches.length <= 2) {
|
|
597
|
+
// As far as a page would scroll: the other way the fingers move.
|
|
598
|
+
const middle = middleOf(event.touches)
|
|
599
|
+
const x = touched.x - middle.x
|
|
600
|
+
const y = touched.y - middle.y
|
|
601
|
+
if (!touched.dragging && Math.hypot(x, y) < TOUCH_SLOP) return
|
|
602
|
+
|
|
603
|
+
event.preventDefault()
|
|
604
|
+
touched = { ...middle, dragging: true }
|
|
605
|
+
if (x !== 0 || y !== 0) pan(x, y, "touch")
|
|
606
|
+
}
|
|
607
|
+
if (event.touches.length !== 2 || spread === 0) return
|
|
608
|
+
event.preventDefault()
|
|
609
|
+
|
|
610
|
+
const [one, two] = [event.touches[0], event.touches[1]]
|
|
611
|
+
const next = spreadOf(event.touches)
|
|
612
|
+
if (!one || !two || next === 0) return
|
|
613
|
+
zoom({
|
|
614
|
+
factor: next / spread,
|
|
615
|
+
at: { x: (one.clientX + two.clientX) / 2, y: (one.clientY + two.clientY) / 2 },
|
|
616
|
+
})
|
|
617
|
+
spread = next
|
|
618
|
+
},
|
|
619
|
+
{ passive: false }
|
|
620
|
+
)
|
|
621
|
+
const untouch = (event: TouchEvent) => {
|
|
622
|
+
if (event.touches.length < 2) spread = 0
|
|
623
|
+
// A finger lifted: the others drag on from where they are, with no jump.
|
|
624
|
+
if (touched)
|
|
625
|
+
touched = event.touches.length > 0 ? { ...middleOf(event.touches), dragging: true } : null
|
|
626
|
+
}
|
|
627
|
+
window.addEventListener("touchend", untouch)
|
|
628
|
+
window.addEventListener("touchcancel", untouch)
|
|
629
|
+
|
|
630
|
+
let gestured = 1
|
|
631
|
+
const onGesture = (event: Event) => {
|
|
632
|
+
if (!forwards(event)) return
|
|
633
|
+
event.preventDefault()
|
|
634
|
+
|
|
635
|
+
const gesture = event as Event & { scale?: number; clientX?: number; clientY?: number }
|
|
636
|
+
const scale = gesture.scale ?? 1
|
|
637
|
+
if (event.type === "gesturestart" || spread > 0 || scale <= 0) {
|
|
638
|
+
gestured = scale > 0 ? scale : 1
|
|
639
|
+
return
|
|
640
|
+
}
|
|
641
|
+
zoom({ factor: scale / gestured, at: { x: gesture.clientX ?? 0, y: gesture.clientY ?? 0 } })
|
|
642
|
+
gestured = scale
|
|
643
|
+
}
|
|
644
|
+
window.addEventListener("gesturestart", onGesture, { passive: false })
|
|
645
|
+
window.addEventListener("gesturechange", onGesture, { passive: false })
|
|
646
|
+
|
|
647
|
+
// Before the page's own keys, and while the reader types in a text.
|
|
648
|
+
window.addEventListener(
|
|
649
|
+
"keydown",
|
|
650
|
+
(event) => {
|
|
651
|
+
if (!forwards(event) || !(event.metaKey || event.ctrlKey) || event.altKey) return
|
|
652
|
+
const step =
|
|
653
|
+
event.key === "=" || event.key === "+"
|
|
654
|
+
? "in"
|
|
655
|
+
: event.key === "-"
|
|
656
|
+
? "out"
|
|
657
|
+
: event.key === "0"
|
|
658
|
+
? "actual"
|
|
659
|
+
: null
|
|
660
|
+
if (!step) return
|
|
661
|
+
|
|
662
|
+
event.preventDefault()
|
|
663
|
+
zoom({ step })
|
|
664
|
+
},
|
|
665
|
+
true
|
|
666
|
+
)
|
|
667
|
+
|
|
668
|
+
// Space, held on the canvas, lets the reader drag it, as anywhere else on it, unless what has the
|
|
669
|
+
// focus takes Space itself: a field types it, a checkbox or a switch toggles. A button or a link
|
|
670
|
+
// the reader clicked keeps Enter: Space let go over it would press it again after the drag.
|
|
671
|
+
const SPACE_TAKERS = [
|
|
672
|
+
"input:not([type=button], [type=submit], [type=reset], [type=image])",
|
|
673
|
+
"textarea",
|
|
674
|
+
"select",
|
|
675
|
+
...[
|
|
676
|
+
"checkbox",
|
|
677
|
+
"radio",
|
|
678
|
+
"switch",
|
|
679
|
+
"option",
|
|
680
|
+
"menuitemcheckbox",
|
|
681
|
+
"menuitemradio",
|
|
682
|
+
"textbox",
|
|
683
|
+
"searchbox",
|
|
684
|
+
"combobox",
|
|
685
|
+
"slider",
|
|
686
|
+
"spinbutton",
|
|
687
|
+
].map((role) => `[role=${role}]`),
|
|
688
|
+
].join(", ")
|
|
689
|
+
let spaceHeld = false
|
|
690
|
+
const holdSpace = (down: boolean) => {
|
|
691
|
+
if (spaceHeld === down) return
|
|
692
|
+
spaceHeld = down
|
|
693
|
+
postPort({ event: "space", params: { down } })
|
|
694
|
+
}
|
|
695
|
+
const onSpace = (event: KeyboardEvent) => {
|
|
696
|
+
if (!onCanvas || !forwards(event) || event.key !== " ") return
|
|
697
|
+
if (event.metaKey || event.ctrlKey || event.altKey) return
|
|
698
|
+
|
|
699
|
+
const down = event.type === "keydown"
|
|
700
|
+
const focused = document.activeElement
|
|
701
|
+
if (down && focused instanceof HTMLElement) {
|
|
702
|
+
if (focused.isContentEditable || focused.matches(SPACE_TAKERS)) return
|
|
703
|
+
}
|
|
704
|
+
if (!down && !spaceHeld) return
|
|
705
|
+
|
|
706
|
+
event.preventDefault()
|
|
707
|
+
event.stopPropagation()
|
|
708
|
+
holdSpace(down)
|
|
709
|
+
}
|
|
710
|
+
window.addEventListener("keydown", onSpace, true)
|
|
711
|
+
window.addEventListener("keyup", onSpace, true)
|
|
712
|
+
window.addEventListener("blur", () => holdSpace(false))
|
|
713
|
+
|
|
189
714
|
const handle = (method: string, params: Record<string, unknown>) => {
|
|
190
715
|
switch (method) {
|
|
191
716
|
case "theme": {
|
|
@@ -237,6 +762,32 @@ export function frameRuntime(): void {
|
|
|
237
762
|
window.dispatchEvent(new CustomEvent("sixb:query", { detail: { name } }))
|
|
238
763
|
return
|
|
239
764
|
}
|
|
765
|
+
case "edit":
|
|
766
|
+
startEditing(params.on === true, params.typing !== false)
|
|
767
|
+
return
|
|
768
|
+
case "canvas":
|
|
769
|
+
onCanvas = true
|
|
770
|
+
canvasMoving = params.moving === true
|
|
771
|
+
if (!document.getElementById("sixb-canvas")) {
|
|
772
|
+
const style = document.createElement("style")
|
|
773
|
+
style.id = "sixb-canvas"
|
|
774
|
+
style.textContent = CANVAS_CSS
|
|
775
|
+
document.head.append(style)
|
|
776
|
+
}
|
|
777
|
+
return
|
|
778
|
+
case "edit.patch": {
|
|
779
|
+
const patches = Array.isArray(params.patches) ? params.patches : []
|
|
780
|
+
for (const patch of patches as Record<string, unknown>[]) {
|
|
781
|
+
const address = typeof patch?.address === "string" ? patch.address : null
|
|
782
|
+
const element = address
|
|
783
|
+
? document.querySelector(`[${AT}="${CSS.escape(address)}"]`)
|
|
784
|
+
: null
|
|
785
|
+
if (!element) continue
|
|
786
|
+
if (element === typing) held = { ...(held ?? {}), ...patch }
|
|
787
|
+
else applyPatch(element, patch)
|
|
788
|
+
}
|
|
789
|
+
return
|
|
790
|
+
}
|
|
240
791
|
case "scroll":
|
|
241
792
|
if (deck) throw new Error("Only a page scrolls.")
|
|
242
793
|
window.scrollBy({ left: Number(params.x) || 0, top: Number(params.y) || 0 })
|
|
@@ -356,28 +907,37 @@ export function frameRuntime(): void {
|
|
|
356
907
|
enumerable: true,
|
|
357
908
|
})
|
|
358
909
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
910
|
+
// First of all the page's listeners, and the only one to hear the app's requests: a request
|
|
911
|
+
// stops here, so the page's scripts never see the port an `edit` request hands over.
|
|
912
|
+
window.addEventListener(
|
|
913
|
+
"message",
|
|
914
|
+
(event) => {
|
|
915
|
+
if (event.source !== window.parent) return
|
|
916
|
+
const data = event.data as Record<string, unknown> | null
|
|
917
|
+
// The app's answer to a call.
|
|
918
|
+
if (data && data.protocol === PROTOCOL && typeof data.result === "number") {
|
|
919
|
+
const pending = calls.get(data.result)
|
|
920
|
+
calls.delete(data.result)
|
|
921
|
+
if (typeof data.error === "string") pending?.reject(new Error(data.error))
|
|
922
|
+
else pending?.resolve(data.value)
|
|
923
|
+
return
|
|
924
|
+
}
|
|
925
|
+
// Requests only: at the top level, as in the layout check, the frame's own answers come back
|
|
926
|
+
// to it, and answering an answer would trade error messages with itself for good.
|
|
927
|
+
if (!data || data.protocol !== PROTOCOL || typeof data.id !== "number") return
|
|
928
|
+
if (typeof data.method !== "string") return
|
|
929
|
+
event.stopImmediatePropagation()
|
|
930
|
+
const port = event.ports?.[0]
|
|
931
|
+
if ((data.method === "edit" || data.method === "canvas") && port) appPort = port
|
|
932
|
+
try {
|
|
933
|
+
handle(String(data.method), (data.params ?? {}) as Record<string, unknown>)
|
|
934
|
+
post({ id: data.id })
|
|
935
|
+
} catch (error) {
|
|
936
|
+
post({ id: data.id, error: error instanceof Error ? error.message : String(error) })
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
true
|
|
940
|
+
)
|
|
381
941
|
|
|
382
942
|
// A deck's keys move it wherever focus is; a page's keys are its own.
|
|
383
943
|
window.addEventListener("keydown", (event) => {
|
|
@@ -391,6 +951,17 @@ export function frameRuntime(): void {
|
|
|
391
951
|
|
|
392
952
|
document.addEventListener("click", (event) => {
|
|
393
953
|
const target = event.target as HTMLElement | null
|
|
954
|
+
|
|
955
|
+
// A button, or a link within the page, by its words: on a canvas, an opened board follows the
|
|
956
|
+
// arrow they label.
|
|
957
|
+
const pressed = target?.closest<HTMLElement>('button, [role="button"], a[href^="#"]')
|
|
958
|
+
const words = (pressed?.innerText ?? pressed?.textContent ?? "").replace(/\s+/g, " ").trim()
|
|
959
|
+
if (words && words.length <= MAX_LABEL_LENGTH) {
|
|
960
|
+
post({ event: "press", params: { text: words } })
|
|
961
|
+
// On the canvas, the reader's own press also goes through the port, where no script posts.
|
|
962
|
+
if (onCanvas && event.isTrusted) postPort({ event: "press", params: { text: words } })
|
|
963
|
+
}
|
|
964
|
+
|
|
394
965
|
const link = target?.closest<HTMLAnchorElement>("a[href]")
|
|
395
966
|
if (link) {
|
|
396
967
|
const href = link.getAttribute("href") ?? ""
|