@sixb/core 0.1.19 → 0.1.21
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/execution.d.ts.map +1 -1
- package/dist/actions/index.js +54 -47
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run-authorization.d.ts +9 -0
- package/dist/actions/run-authorization.d.ts.map +1 -1
- package/dist/activity/connection.d.ts +62 -0
- package/dist/activity/connection.d.ts.map +1 -0
- package/dist/activity/device.d.ts +8 -0
- package/dist/activity/device.d.ts.map +1 -0
- package/dist/activity/execution.d.ts +48 -0
- package/dist/activity/execution.d.ts.map +1 -0
- package/dist/activity/service.d.ts +79 -0
- package/dist/activity/service.d.ts.map +1 -0
- package/dist/activity/shares.d.ts +24 -0
- package/dist/activity/shares.d.ts.map +1 -0
- package/dist/activity/timeline.d.ts +96 -0
- package/dist/activity/timeline.d.ts.map +1 -0
- package/dist/agents/index.d.ts +2 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +63 -50
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/skills.d.ts.map +1 -1
- package/dist/agents/streams/index.js +3 -3
- package/dist/agents/streams/internal.js +3 -3
- package/dist/agents/types.d.ts +8 -8
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/validation.d.ts +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/artifacts/address.d.ts +48 -0
- package/dist/artifacts/address.d.ts.map +1 -0
- package/dist/artifacts/csv.d.ts +22 -0
- package/dist/artifacts/csv.d.ts.map +1 -0
- package/dist/artifacts/errors.d.ts +11 -0
- package/dist/artifacts/errors.d.ts.map +1 -0
- package/dist/artifacts/execution.d.ts +43 -0
- package/dist/artifacts/execution.d.ts.map +1 -0
- package/dist/artifacts/frames/assets.d.ts +28 -0
- package/dist/artifacts/frames/assets.d.ts.map +1 -0
- package/dist/artifacts/frames/grants.d.ts +37 -0
- package/dist/artifacts/frames/grants.d.ts.map +1 -0
- package/dist/artifacts/frames/index.d.ts +10 -0
- package/dist/artifacts/frames/index.d.ts.map +1 -0
- package/dist/artifacts/frames/index.js +892 -0
- package/dist/artifacts/frames/index.js.map +14 -0
- package/dist/artifacts/frames/kit.d.ts +66 -0
- package/dist/artifacts/frames/kit.d.ts.map +1 -0
- package/dist/artifacts/frames/probe.d.ts +41 -0
- package/dist/artifacts/frames/probe.d.ts.map +1 -0
- package/dist/artifacts/frames/protocol.d.ts +98 -0
- package/dist/artifacts/frames/protocol.d.ts.map +1 -0
- package/dist/artifacts/frames/runtime.d.ts +13 -0
- package/dist/artifacts/frames/runtime.d.ts.map +1 -0
- package/dist/artifacts/html.d.ts +6 -0
- package/dist/artifacts/html.d.ts.map +1 -0
- package/dist/artifacts/ids.d.ts +5 -0
- package/dist/artifacts/ids.d.ts.map +1 -0
- package/dist/artifacts/index.d.ts +16 -0
- package/dist/artifacts/index.d.ts.map +1 -0
- package/dist/artifacts/index.js +125 -0
- package/dist/artifacts/index.js.map +10 -0
- package/dist/artifacts/kinds.d.ts +5 -0
- package/dist/artifacts/kinds.d.ts.map +1 -0
- package/dist/artifacts/limits.d.ts +28 -0
- package/dist/artifacts/limits.d.ts.map +1 -0
- package/dist/artifacts/outline.d.ts +44 -0
- package/dist/artifacts/outline.d.ts.map +1 -0
- package/dist/artifacts/publish/files.d.ts +15 -0
- package/dist/artifacts/publish/files.d.ts.map +1 -0
- package/dist/artifacts/publish/index.d.ts +5 -0
- package/dist/artifacts/publish/index.d.ts.map +1 -0
- package/dist/artifacts/publish/index.js +36 -0
- package/dist/artifacts/publish/index.js.map +9 -0
- package/dist/artifacts/publish/publish.d.ts +52 -0
- package/dist/artifacts/publish/publish.d.ts.map +1 -0
- package/dist/artifacts/publish/references.d.ts +27 -0
- package/dist/artifacts/publish/references.d.ts.map +1 -0
- package/dist/artifacts/publish/validate/document.d.ts +17 -0
- package/dist/artifacts/publish/validate/document.d.ts.map +1 -0
- package/dist/artifacts/publish/validate/file.d.ts +8 -0
- package/dist/artifacts/publish/validate/file.d.ts.map +1 -0
- package/dist/artifacts/publish/validate/sheet.d.ts +15 -0
- package/dist/artifacts/publish/validate/sheet.d.ts.map +1 -0
- package/dist/artifacts/publish/validate/slides.d.ts +21 -0
- package/dist/artifacts/publish/validate/slides.d.ts.map +1 -0
- package/dist/artifacts/references.d.ts +12 -0
- package/dist/artifacts/references.d.ts.map +1 -0
- package/dist/artifacts/resolve.d.ts +41 -0
- package/dist/artifacts/resolve.d.ts.map +1 -0
- package/dist/artifacts/theme.d.ts +19 -0
- package/dist/artifacts/theme.d.ts.map +1 -0
- package/dist/artifacts/warnings.d.ts +11 -0
- package/dist/artifacts/warnings.d.ts.map +1 -0
- package/dist/artifacts/workbook.d.ts +64 -0
- package/dist/artifacts/workbook.d.ts.map +1 -0
- package/dist/auth/cookies.d.ts +2 -4
- package/dist/auth/cookies.d.ts.map +1 -1
- package/dist/auth/index.d.ts +0 -2
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +14 -20
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/runtime.d.ts +8 -10
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/auth/session-cache.d.ts +1 -5
- package/dist/auth/session-cache.d.ts.map +1 -1
- package/dist/auth/strategy.js +1 -1
- package/dist/auth/types.d.ts +4 -8
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/validation.d.ts +0 -1
- package/dist/auth/validation.d.ts.map +1 -1
- package/dist/authorization/decision.d.ts +2 -4
- package/dist/authorization/decision.d.ts.map +1 -1
- package/dist/authorization/grant-kinds.d.ts +6 -8
- package/dist/authorization/grant-kinds.d.ts.map +1 -1
- package/dist/authorization/index.d.ts +0 -1
- package/dist/authorization/index.d.ts.map +1 -1
- package/dist/authorization/index.js +7 -11
- package/dist/authorization/index.js.map +1 -1
- package/dist/authorization/resolve.d.ts +1 -1
- package/dist/authorization/resolve.d.ts.map +1 -1
- package/dist/blob-storage/browser.js +1 -1
- package/dist/blob-storage/index.js +2 -2
- package/dist/blob-storage/internal.d.ts +1 -1
- package/dist/blob-storage/internal.d.ts.map +1 -1
- package/dist/blob-storage/internal.js +11 -5
- package/dist/blob-storage/internal.js.map +1 -1
- package/dist/blob-storage/media-type.d.ts +12 -0
- package/dist/blob-storage/media-type.d.ts.map +1 -1
- package/dist/bootstrap/index.js +54 -48
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/{chunk-t6vq7bff.js → chunk-0bphap9y.js} +5 -5
- package/dist/{chunk-7mbzgd9m.js → chunk-1cc1xaf3.js} +3 -3
- package/dist/chunk-3jms7je7.js +14 -0
- package/dist/chunk-3jms7je7.js.map +10 -0
- package/dist/{chunk-s54c868q.js → chunk-3qct2mdc.js} +3 -13
- package/dist/chunk-3qct2mdc.js.map +12 -0
- package/dist/{chunk-6gmfggss.js → chunk-431pyp2c.js} +3 -3
- package/dist/{chunk-c85m1hyj.js → chunk-447a5c0p.js} +2 -2
- package/dist/chunk-48qjhh6v.js +185 -0
- package/dist/chunk-48qjhh6v.js.map +13 -0
- package/dist/{chunk-80mc0971.js → chunk-561r0yc9.js} +8 -8
- package/dist/{chunk-5e43w60z.js → chunk-5948n82c.js} +2 -2
- package/dist/{chunk-yzwja0mj.js → chunk-5hx48dnn.js} +2 -2
- package/dist/{chunk-tjb1mk5t.js → chunk-5vems3nx.js} +5 -6
- package/dist/{chunk-tjb1mk5t.js.map → chunk-5vems3nx.js.map} +3 -3
- package/dist/{chunk-aff7cyea.js → chunk-61y5xs4p.js} +563 -167
- package/dist/{chunk-aff7cyea.js.map → chunk-61y5xs4p.js.map} +12 -9
- package/dist/chunk-65abf64x.js +13 -0
- package/dist/chunk-65abf64x.js.map +10 -0
- package/dist/{chunk-z3y5kg1x.js → chunk-6eqsgvxk.js} +3 -3
- package/dist/{chunk-z3y5kg1x.js.map → chunk-6eqsgvxk.js.map} +2 -2
- package/dist/chunk-6rqgmkde.js +2028 -0
- package/dist/chunk-6rqgmkde.js.map +29 -0
- package/dist/{chunk-y7rqfrgg.js → chunk-6vb4st8k.js} +29 -38
- package/dist/chunk-6vb4st8k.js.map +23 -0
- package/dist/chunk-7q8t23v4.js +467 -0
- package/dist/chunk-7q8t23v4.js.map +14 -0
- package/dist/{chunk-kyzq4wy9.js → chunk-858emn8m.js} +17 -17
- package/dist/chunk-858emn8m.js.map +18 -0
- package/dist/{chunk-hvsb78a1.js → chunk-8frc8a4j.js} +26 -26
- package/dist/{chunk-hvsb78a1.js.map → chunk-8frc8a4j.js.map} +2 -2
- package/dist/{chunk-3zxk45er.js → chunk-8ncg20rd.js} +3 -68
- package/dist/{chunk-3zxk45er.js.map → chunk-8ncg20rd.js.map} +4 -5
- package/dist/{chunk-j2bp5ryw.js → chunk-918wwnaa.js} +495 -28
- package/dist/{chunk-j2bp5ryw.js.map → chunk-918wwnaa.js.map} +14 -12
- package/dist/{chunk-1f7wpmyp.js → chunk-9j4jw7as.js} +103 -110
- package/dist/chunk-9j4jw7as.js.map +14 -0
- package/dist/chunk-9kgkfg6v.js +502 -0
- package/dist/chunk-9kgkfg6v.js.map +14 -0
- package/dist/chunk-a3faa34j.js +74 -0
- package/dist/chunk-a3faa34j.js.map +10 -0
- package/dist/{chunk-ey3pyej1.js → chunk-akzryx9h.js} +347 -1174
- package/dist/{chunk-ey3pyej1.js.map → chunk-akzryx9h.js.map} +19 -25
- package/dist/chunk-arns890k.js +10 -0
- package/dist/chunk-arns890k.js.map +10 -0
- package/dist/{chunk-zrmy8zvw.js → chunk-bk9svbcq.js} +11 -11
- package/dist/{chunk-zrmy8zvw.js.map → chunk-bk9svbcq.js.map} +2 -2
- package/dist/{chunk-hkc3jct7.js → chunk-c06hmxyy.js} +2 -10
- package/dist/chunk-c06hmxyy.js.map +10 -0
- package/dist/{chunk-q1vkr2ys.js → chunk-c1rxbz5y.js} +3 -3
- package/dist/chunk-cfj9dfbb.js +288 -0
- package/dist/chunk-cfj9dfbb.js.map +12 -0
- package/dist/{chunk-4tcx876c.js → chunk-cn0fwwhy.js} +19 -19
- package/dist/{chunk-4tcx876c.js.map → chunk-cn0fwwhy.js.map} +1 -1
- package/dist/{chunk-gc4ntf7d.js → chunk-cwdzcv37.js} +1 -1
- package/dist/{chunk-fa02jy15.js → chunk-cy4mbddw.js} +1 -1
- package/dist/{chunk-7kg3k1m9.js → chunk-d09e3rax.js} +1 -1
- package/dist/chunk-d5rjr8c0.js +176 -0
- package/dist/chunk-d5rjr8c0.js.map +12 -0
- package/dist/{chunk-rhg02hxq.js → chunk-d7dnxdep.js} +3 -3
- package/dist/{chunk-b38szspf.js → chunk-dhcv7yxc.js} +1 -1
- package/dist/{chunk-b38szspf.js.map → chunk-dhcv7yxc.js.map} +1 -1
- package/dist/{chunk-enpsx8k5.js → chunk-dhdha526.js} +23 -21
- package/dist/chunk-dhdha526.js.map +10 -0
- package/dist/{chunk-8mx7qw3y.js → chunk-dvd2fp9q.js} +2 -2
- package/dist/{chunk-8mx7qw3y.js.map → chunk-dvd2fp9q.js.map} +3 -3
- package/dist/{chunk-bwjcehza.js → chunk-e17zdm62.js} +6 -12
- package/dist/{chunk-bwjcehza.js.map → chunk-e17zdm62.js.map} +3 -4
- package/dist/{chunk-tpn40322.js → chunk-e6k4thh5.js} +11 -10
- package/dist/{chunk-tpn40322.js.map → chunk-e6k4thh5.js.map} +3 -3
- package/dist/{chunk-tw03bsmb.js → chunk-eptrvnby.js} +224 -3
- package/dist/chunk-eptrvnby.js.map +12 -0
- package/dist/{chunk-xt1zt7gv.js → chunk-f4pamkt9.js} +30 -23
- package/dist/chunk-f4pamkt9.js.map +12 -0
- package/dist/chunk-ff5xkv0p.js +211 -0
- package/dist/chunk-ff5xkv0p.js.map +10 -0
- package/dist/{chunk-bpgy64fw.js → chunk-g257jwnc.js} +10 -4
- package/dist/{chunk-bpgy64fw.js.map → chunk-g257jwnc.js.map} +3 -3
- package/dist/chunk-g5bvzyyr.js +32 -0
- package/dist/chunk-g5bvzyyr.js.map +10 -0
- package/dist/{chunk-2jntasmh.js → chunk-hcbyfxbe.js} +25 -49
- package/dist/chunk-hcbyfxbe.js.map +12 -0
- package/dist/chunk-hke9aeen.js +9 -0
- package/dist/chunk-hke9aeen.js.map +10 -0
- package/dist/{chunk-1sr8ryzk.js → chunk-hwksyjks.js} +122 -1
- package/dist/{chunk-1sr8ryzk.js.map → chunk-hwksyjks.js.map} +3 -3
- package/dist/chunk-jcfw4h7m.js +9 -0
- package/dist/chunk-jcfw4h7m.js.map +10 -0
- package/dist/{chunk-85yvv5n0.js → chunk-k43ct2ke.js} +20 -11
- package/dist/chunk-k43ct2ke.js.map +12 -0
- package/dist/{chunk-dnmadg9k.js → chunk-kge7k6ey.js} +40 -8
- package/dist/chunk-kge7k6ey.js.map +15 -0
- package/dist/{chunk-wz0xs816.js → chunk-ky3j490c.js} +2 -2
- package/dist/chunk-mjddfa7k.js +129 -0
- package/dist/chunk-mjddfa7k.js.map +12 -0
- package/dist/{chunk-3gnrh4ve.js → chunk-nn5xnx3s.js} +86 -111
- package/dist/chunk-nn5xnx3s.js.map +40 -0
- package/dist/{chunk-rz53yb4v.js → chunk-q5e5tv4b.js} +35 -7
- package/dist/{chunk-rz53yb4v.js.map → chunk-q5e5tv4b.js.map} +3 -3
- package/dist/{chunk-vyf9kfqf.js → chunk-q7gn29y3.js} +1 -1
- package/dist/{chunk-d2ync1v3.js → chunk-rmakanzx.js} +10 -12
- package/dist/{chunk-d2ync1v3.js.map → chunk-rmakanzx.js.map} +3 -4
- package/dist/{chunk-v9xd5wzd.js → chunk-s7jg7pmn.js} +1 -1
- package/dist/chunk-tbc1ngpd.js +642 -0
- package/dist/chunk-tbc1ngpd.js.map +18 -0
- package/dist/chunk-twe4dx8p.js +676 -0
- package/dist/chunk-twe4dx8p.js.map +15 -0
- package/dist/{chunk-nre82s12.js → chunk-vf57cr4t.js} +2 -2
- package/dist/{chunk-9ybhtmg4.js → chunk-vvxtn22d.js} +1 -1
- package/dist/{chunk-jhm3zsa7.js → chunk-wkv3h3q7.js} +64 -2
- package/dist/{chunk-jhm3zsa7.js.map → chunk-wkv3h3q7.js.map} +3 -3
- package/dist/chunk-x0v3jd47.js +124 -0
- package/dist/chunk-x0v3jd47.js.map +10 -0
- package/dist/{chunk-7t429e3f.js → chunk-xvsc5m8n.js} +1 -1
- package/dist/{chunk-kg5j6fct.js → chunk-y5tah2kf.js} +1 -1
- package/dist/{chunk-52bk93x8.js → chunk-z58tm0hm.js} +2 -2
- package/dist/datasets/builders.d.ts +15 -2
- package/dist/datasets/builders.d.ts.map +1 -1
- package/dist/datasets/column-index.d.ts +7 -0
- package/dist/datasets/column-index.d.ts.map +1 -0
- package/dist/datasets/execution.d.ts +3 -2
- package/dist/datasets/execution.d.ts.map +1 -1
- package/dist/datasets/write.js +8 -8
- package/dist/deploy/internal.js +4 -3
- package/dist/deploy/internal.js.map +4 -4
- package/dist/deploy/services.d.ts.map +1 -1
- package/dist/deploy/types.d.ts +1 -2
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/error-reporting/internal.js +4 -4
- package/dist/errors/internal.d.ts +1 -0
- package/dist/errors/internal.d.ts.map +1 -1
- package/dist/errors/internal.js +7 -4
- package/dist/errors/internal.js.map +1 -1
- package/dist/events/execution.d.ts +12 -2
- package/dist/events/execution.d.ts.map +1 -1
- package/dist/events/index.js +4 -4
- package/dist/execution/agent.js +56 -49
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorization.d.ts.map +1 -1
- package/dist/execution/authorized-object-reader.d.ts +52 -11
- package/dist/execution/authorized-object-reader.d.ts.map +1 -1
- package/dist/execution/object-reader-clearance.d.ts +41 -0
- package/dist/execution/object-reader-clearance.d.ts.map +1 -0
- package/dist/execution/object-reader-ontology.d.ts +12 -0
- package/dist/execution/object-reader-ontology.d.ts.map +1 -0
- package/dist/execution/object-reader-security.d.ts +45 -0
- package/dist/execution/object-reader-security.d.ts.map +1 -0
- package/dist/execution/primitive.js +54 -47
- package/dist/execution/primitive.js.map +1 -1
- package/dist/execution/request.js +49 -42
- package/dist/execution/request.js.map +2 -2
- package/dist/http/api-routes.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +23 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +111 -109
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/in-memory.d.ts +1 -0
- package/dist/lake-storage/in-memory.d.ts.map +1 -1
- package/dist/lake-storage/index.d.ts +6 -3
- package/dist/lake-storage/index.d.ts.map +1 -1
- package/dist/lake-storage/index.js +21 -13
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/lake-storage/lineage.d.ts +94 -0
- package/dist/lake-storage/lineage.d.ts.map +1 -0
- package/dist/lake-storage/sql-transforms.d.ts +45 -0
- package/dist/lake-storage/sql-transforms.d.ts.map +1 -1
- package/dist/lake-storage/types.d.ts +55 -1
- package/dist/lake-storage/types.d.ts.map +1 -1
- package/dist/lake-storage/version-inputs.d.ts +14 -3
- package/dist/lake-storage/version-inputs.d.ts.map +1 -1
- package/dist/maintenance/ontology-maintenance.d.ts.map +1 -1
- package/dist/materializer/index.js +31 -30
- package/dist/materializer/index.js.map +1 -1
- package/dist/models/execution/index.js +26 -25
- package/dist/models/execution/index.js.map +1 -1
- package/dist/objects/clearance-redaction.d.ts +27 -0
- package/dist/objects/clearance-redaction.d.ts.map +1 -0
- package/dist/objects/index.js +54 -47
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/link/authorization.d.ts +8 -5
- package/dist/objects/link/authorization.d.ts.map +1 -1
- package/dist/objects/link/upsert-batch.d.ts.map +1 -1
- package/dist/objects/object/delete.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/property-clearance.d.ts +47 -24
- package/dist/objects/property-clearance.d.ts.map +1 -1
- package/dist/objects/query/clearance-admission.d.ts +10 -0
- package/dist/objects/query/clearance-admission.d.ts.map +1 -0
- package/dist/objects/query/index.js +29 -28
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/link-query-clearance.d.ts +21 -0
- package/dist/objects/query/link-query-clearance.d.ts.map +1 -0
- package/dist/objects/vectors/handle.d.ts.map +1 -1
- package/dist/objects/vectors/profile.d.ts +5 -0
- package/dist/objects/vectors/profile.d.ts.map +1 -1
- package/dist/ontology/builders.d.ts.map +1 -1
- package/dist/ontology/docs-markdown.d.ts +1 -1
- package/dist/ontology/docs-markdown.d.ts.map +1 -1
- package/dist/ontology/index.js +7 -7
- package/dist/ontology/internal.js +4 -4
- package/dist/ontology/internal.js.map +1 -1
- package/dist/pipelines/index.d.ts +2 -0
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js +47 -35
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pipelines/lineage.d.ts +17 -0
- package/dist/pipelines/lineage.d.ts.map +1 -0
- package/dist/projections/internal.d.ts +2 -2
- package/dist/projections/internal.js +30 -29
- package/dist/projections/internal.js.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 +6 -0
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +2 -0
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +46 -42
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/ontology-mutations.d.ts +2 -0
- package/dist/runtime/ontology-mutations.d.ts.map +1 -1
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/runtime/sixb.d.ts +8 -0
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/sandboxes/auth.d.ts +16 -0
- package/dist/sandboxes/auth.d.ts.map +1 -1
- package/dist/sandboxes/config.d.ts.map +1 -1
- package/dist/sandboxes/configuration.d.ts +26 -0
- package/dist/sandboxes/configuration.d.ts.map +1 -1
- package/dist/sandboxes/index.d.ts +1 -1
- package/dist/sandboxes/index.d.ts.map +1 -1
- package/dist/sandboxes/index.js +14 -13
- package/dist/sandboxes/index.js.map +1 -1
- package/dist/sandboxes/sandbox.d.ts +28 -5
- package/dist/sandboxes/sandbox.d.ts.map +1 -1
- package/dist/security/applied-markings-contribution.d.ts +58 -0
- package/dist/security/applied-markings-contribution.d.ts.map +1 -0
- package/dist/security/applied-markings-host.d.ts +10 -0
- package/dist/security/applied-markings-host.d.ts.map +1 -0
- package/dist/security/applied-markings-snapshot.d.ts +67 -0
- package/dist/security/applied-markings-snapshot.d.ts.map +1 -0
- package/dist/security/applied-markings.d.ts +73 -0
- package/dist/security/applied-markings.d.ts.map +1 -0
- package/dist/security/builders.d.ts.map +1 -1
- package/dist/security/dataset-version-markings.d.ts +47 -0
- package/dist/security/dataset-version-markings.d.ts.map +1 -0
- package/dist/security/every.d.ts +1 -4
- package/dist/security/every.d.ts.map +1 -1
- package/dist/security/grants.d.ts +4 -5
- package/dist/security/grants.d.ts.map +1 -1
- package/dist/security/index.d.ts +2 -2
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/internal.d.ts +15 -0
- package/dist/security/internal.d.ts.map +1 -0
- package/dist/security/internal.js +135 -0
- package/dist/security/internal.js.map +10 -0
- package/dist/security/marking-propagation.d.ts +62 -0
- package/dist/security/marking-propagation.d.ts.map +1 -0
- package/dist/security/marking-sets.d.ts +14 -0
- package/dist/security/marking-sets.d.ts.map +1 -0
- package/dist/security/markings.d.ts +6 -3
- package/dist/security/markings.d.ts.map +1 -1
- package/dist/security/membership-policies.d.ts.map +1 -1
- package/dist/security/pipeline-markings.d.ts +20 -0
- package/dist/security/pipeline-markings.d.ts.map +1 -0
- package/dist/security/project.d.ts +4 -0
- package/dist/security/project.d.ts.map +1 -0
- package/dist/security/projection-markings.d.ts +71 -0
- package/dist/security/projection-markings.d.ts.map +1 -0
- package/dist/security/public.d.ts +10 -0
- package/dist/security/public.d.ts.map +1 -0
- package/dist/security/public.js +10 -0
- package/dist/security/public.js.map +9 -0
- package/dist/security/redactions.d.ts +4 -1
- package/dist/security/redactions.d.ts.map +1 -1
- package/dist/security/registry.d.ts +0 -1
- package/dist/security/registry.d.ts.map +1 -1
- package/dist/security/types.d.ts +34 -19
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/validation.d.ts +0 -6
- package/dist/security/validation.d.ts.map +1 -1
- package/dist/shares/internal.js +25 -24
- package/dist/shares/internal.js.map +2 -2
- package/dist/storage/action-runs/failure.js +3 -3
- package/dist/storage/action-runs/in-memory.d.ts +4 -0
- package/dist/storage/action-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/action-runs/types.d.ts +8 -0
- package/dist/storage/action-runs/types.d.ts.map +1 -1
- package/dist/storage/activity/in-memory.d.ts +55 -0
- package/dist/storage/activity/in-memory.d.ts.map +1 -0
- package/dist/storage/activity/index.d.ts +3 -0
- package/dist/storage/activity/index.d.ts.map +1 -0
- package/dist/storage/activity/policy.d.ts +96 -0
- package/dist/storage/activity/policy.d.ts.map +1 -0
- package/dist/storage/activity/types.d.ts +191 -0
- package/dist/storage/activity/types.d.ts.map +1 -0
- package/dist/storage/agents/in-memory.d.ts +4 -0
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +2 -5
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +10 -9
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-limits/enforcement.js +3 -3
- package/dist/storage/artifacts/errors.d.ts +8 -0
- package/dist/storage/artifacts/errors.d.ts.map +1 -0
- package/dist/storage/artifacts/in-memory.d.ts +34 -0
- package/dist/storage/artifacts/in-memory.d.ts.map +1 -0
- package/dist/storage/artifacts/index.d.ts +5 -0
- package/dist/storage/artifacts/index.d.ts.map +1 -0
- package/dist/storage/artifacts/record.d.ts +17 -0
- package/dist/storage/artifacts/record.d.ts.map +1 -0
- package/dist/storage/artifacts/types.d.ts +184 -0
- package/dist/storage/artifacts/types.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/magic-links.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/oidc-attempts.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/sessions.d.ts +2 -11
- package/dist/storage/auth/in-memory/sessions.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/shared.d.ts +1 -2
- package/dist/storage/auth/in-memory/shared.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 +20 -17
- package/dist/storage/auth/types.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.js +2 -2
- package/dist/storage/executions/in-memory.d.ts +2 -1
- package/dist/storage/executions/in-memory.d.ts.map +1 -1
- package/dist/storage/executions/index.d.ts +1 -1
- package/dist/storage/executions/index.d.ts.map +1 -1
- package/dist/storage/executions/provider.d.ts +2 -0
- package/dist/storage/executions/provider.d.ts.map +1 -1
- package/dist/storage/executions/provider.js +9 -223
- package/dist/storage/executions/provider.js.map +3 -4
- package/dist/storage/executions/types.d.ts +31 -0
- package/dist/storage/executions/types.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/provider.js +12 -12
- package/dist/storage/in-memory/index.d.ts +8 -0
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +6 -4
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +47 -46
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +3 -0
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +66 -16
- package/dist/storage/internal.js.map +1 -1
- package/dist/storage/ontology/in-memory/sources.d.ts +2 -1
- package/dist/storage/ontology/in-memory/sources.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/sources.d.ts +15 -0
- package/dist/storage/ontology/sources.d.ts.map +1 -1
- package/dist/storage/projection-runs/provider.js +3 -3
- package/dist/storage/share-grants/in-memory.d.ts +2 -1
- package/dist/storage/share-grants/in-memory.d.ts.map +1 -1
- package/dist/storage/share-grants/index.d.ts +1 -1
- package/dist/storage/share-grants/index.d.ts.map +1 -1
- package/dist/storage/share-grants/types.d.ts +6 -0
- package/dist/storage/share-grants/types.d.ts.map +1 -1
- package/dist/storage/types.d.ts +4 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/in-memory.d.ts +4 -0
- package/dist/storage/workflow-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +14 -13
- package/dist/storage/workflow-runs/provider.js.map +1 -1
- package/dist/storage/workflow-runs/types.d.ts +5 -0
- package/dist/storage/workflow-runs/types.d.ts.map +1 -1
- package/dist/syncs/index.js +35 -34
- package/dist/syncs/index.js.map +1 -1
- package/dist/testing/action-run-storage-contract.d.ts.map +1 -1
- package/dist/testing/activity-storage-contract.d.ts +14 -0
- package/dist/testing/activity-storage-contract.d.ts.map +1 -0
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/artifact-storage-contract.d.ts +13 -0
- package/dist/testing/artifact-storage-contract.d.ts.map +1 -0
- package/dist/testing/auth-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution-storage-contract.d.ts.map +1 -1
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +4493 -3225
- package/dist/testing/index.js.map +14 -12
- package/dist/testing/lake-merge-storage-contract.d.ts.map +1 -1
- package/dist/testing/lake-storage-contract.d.ts +2 -0
- package/dist/testing/lake-storage-contract.d.ts.map +1 -1
- package/dist/testing/ontology-storage-contract.d.ts.map +1 -1
- package/dist/testing/share-grant-storage-contract.d.ts.map +1 -1
- package/dist/webhooks/internal.js +28 -27
- package/dist/webhooks/internal.js.map +2 -2
- package/dist/workers/index.js +2 -2
- package/dist/workflows/builders.d.ts.map +1 -1
- package/dist/workflows/index.js +57 -51
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/types.d.ts +9 -0
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/validation.d.ts +7 -0
- package/dist/workflows/validation.d.ts.map +1 -1
- package/package.json +32 -2
- package/src/actions/execution.ts +18 -13
- package/src/actions/request.ts +18 -3
- package/src/actions/run-authorization.ts +23 -0
- package/src/activity/README.md +155 -0
- package/src/activity/connection.ts +217 -0
- package/src/activity/device.ts +41 -0
- package/src/activity/execution.ts +210 -0
- package/src/activity/service.ts +274 -0
- package/src/activity/shares.ts +62 -0
- package/src/activity/timeline.ts +424 -0
- package/src/agents/index.ts +8 -3
- package/src/agents/request.ts +5 -0
- package/src/agents/skills.ts +6 -0
- package/src/agents/types.ts +8 -8
- package/src/agents/validation.ts +2 -0
- package/src/artifacts/address.ts +132 -0
- package/src/artifacts/csv.ts +108 -0
- package/src/artifacts/errors.ts +21 -0
- package/src/artifacts/execution.ts +153 -0
- package/src/artifacts/frames/assets.ts +88 -0
- package/src/artifacts/frames/grants.ts +124 -0
- package/src/artifacts/frames/index.ts +15 -0
- package/src/artifacts/frames/kit.ts +392 -0
- package/src/artifacts/frames/probe.ts +309 -0
- package/src/artifacts/frames/protocol.ts +174 -0
- package/src/artifacts/frames/runtime.ts +213 -0
- package/src/artifacts/html.ts +25 -0
- package/src/artifacts/ids.ts +18 -0
- package/src/artifacts/index.ts +61 -0
- package/src/artifacts/kinds.ts +8 -0
- package/src/artifacts/limits.ts +27 -0
- package/src/artifacts/outline.ts +62 -0
- package/src/artifacts/publish/files.ts +87 -0
- package/src/artifacts/publish/index.ts +12 -0
- package/src/artifacts/publish/publish.ts +250 -0
- package/src/artifacts/publish/references.ts +130 -0
- package/src/artifacts/publish/validate/document.ts +114 -0
- package/src/artifacts/publish/validate/file.ts +19 -0
- package/src/artifacts/publish/validate/sheet.ts +251 -0
- package/src/artifacts/publish/validate/slides.ts +134 -0
- package/src/artifacts/references.ts +11 -0
- package/src/artifacts/resolve.ts +97 -0
- package/src/artifacts/theme.ts +116 -0
- package/src/artifacts/warnings.ts +10 -0
- package/src/artifacts/workbook.ts +315 -0
- package/src/auth/cookies.ts +3 -20
- package/src/auth/index.ts +0 -6
- package/src/auth/runtime.ts +59 -76
- package/src/auth/session-cache.ts +2 -9
- package/src/auth/types.ts +4 -8
- package/src/auth/validation.ts +0 -2
- package/src/authorization/decision.ts +13 -23
- package/src/authorization/grant-kinds.ts +33 -28
- package/src/authorization/index.ts +0 -1
- package/src/authorization/resolve.ts +10 -6
- package/src/blob-storage/internal.ts +1 -1
- package/src/blob-storage/media-type.ts +69 -0
- package/src/datasets/builders.ts +66 -2
- package/src/datasets/column-index.ts +19 -0
- package/src/datasets/execution.ts +23 -9
- package/src/deploy/services.ts +0 -1
- package/src/deploy/types.ts +1 -2
- package/src/deploy/validation.ts +3 -1
- package/src/errors/internal.ts +1 -0
- package/src/events/execution.ts +134 -21
- package/src/execution/authorization.ts +11 -5
- package/src/execution/authorized-object-reader.ts +270 -256
- package/src/execution/object-reader-clearance.ts +91 -0
- package/src/execution/object-reader-ontology.ts +63 -0
- package/src/execution/object-reader-security.ts +146 -0
- package/src/http/api-routes.ts +125 -0
- package/src/index.ts +72 -17
- package/src/lake-storage/in-memory.ts +26 -3
- package/src/lake-storage/index.ts +13 -1
- package/src/lake-storage/lineage.ts +385 -0
- package/src/lake-storage/sql-transforms.ts +45 -0
- package/src/lake-storage/types.ts +59 -1
- package/src/lake-storage/version-inputs.ts +35 -6
- package/src/maintenance/ontology-maintenance.ts +15 -0
- package/src/models/execution/embedding.ts +6 -6
- package/src/objects/clearance-redaction.ts +138 -0
- package/src/objects/link/authorization.ts +27 -7
- package/src/objects/link/remove.ts +2 -2
- package/src/objects/link/upsert-batch.ts +7 -5
- package/src/objects/link/upsert.ts +2 -2
- package/src/objects/object/delete.ts +2 -0
- package/src/objects/object/upsert-batch.ts +2 -4
- package/src/objects/object/upsert.ts +2 -3
- package/src/objects/property-clearance.ts +171 -152
- package/src/objects/query/clearance-admission.ts +112 -0
- package/src/objects/query/link-query-clearance.ts +73 -0
- package/src/objects/vectors/README.md +4 -0
- package/src/objects/vectors/handle.ts +11 -2
- package/src/objects/vectors/indexing-generate.ts +2 -2
- package/src/objects/vectors/profile.ts +5 -0
- package/src/ontology/builders.ts +12 -1
- package/src/ontology/docs-markdown.ts +1 -1
- package/src/pipelines/index.ts +2 -0
- package/src/pipelines/lineage.ts +45 -0
- package/src/projections/internal.ts +2 -2
- package/src/runtime/create.ts +4 -0
- package/src/runtime/host.ts +55 -0
- package/src/runtime/internal.ts +2 -0
- package/src/runtime/ontology-mutations.ts +19 -4
- package/src/runtime/resolve-definitions.ts +66 -3
- package/src/runtime/sixb.ts +18 -1
- package/src/sandboxes/README.md +29 -7
- package/src/sandboxes/auth.ts +16 -0
- package/src/sandboxes/config.ts +2 -7
- package/src/sandboxes/configuration.ts +61 -7
- package/src/sandboxes/index.ts +1 -0
- package/src/sandboxes/sandbox.ts +27 -5
- package/src/security/applied-markings-contribution.ts +277 -0
- package/src/security/applied-markings-host.ts +41 -0
- package/src/security/applied-markings-snapshot.ts +235 -0
- package/src/security/applied-markings.ts +405 -0
- package/src/security/builders.ts +7 -2
- package/src/security/dataset-version-markings.ts +163 -0
- package/src/security/every.ts +0 -4
- package/src/security/grants.ts +42 -27
- package/src/security/index.ts +3 -3
- package/src/security/internal.ts +18 -0
- package/src/security/marking-propagation.ts +255 -0
- package/src/security/marking-sets.ts +42 -0
- package/src/security/markings.ts +29 -178
- package/src/security/membership-policies.ts +3 -1
- package/src/security/pipeline-markings.ts +175 -0
- package/src/security/project.ts +8 -0
- package/src/security/projection-markings.ts +421 -0
- package/src/security/public.ts +10 -0
- package/src/security/redactions.ts +7 -2
- package/src/security/registry.ts +0 -8
- package/src/security/types.ts +38 -26
- package/src/security/validation.ts +28 -19
- package/src/storage/action-runs/in-memory.ts +18 -0
- package/src/storage/action-runs/types.ts +8 -0
- package/src/storage/activity/in-memory.ts +374 -0
- package/src/storage/activity/index.ts +27 -0
- package/src/storage/activity/policy.ts +430 -0
- package/src/storage/activity/types.ts +211 -0
- package/src/storage/agents/in-memory.ts +10 -0
- package/src/storage/agents/provider.ts +2 -13
- package/src/storage/agents/types.ts +10 -17
- package/src/storage/artifacts/errors.ts +16 -0
- package/src/storage/artifacts/in-memory.ts +240 -0
- package/src/storage/artifacts/index.ts +30 -0
- package/src/storage/artifacts/record.ts +200 -0
- package/src/storage/artifacts/types.ts +209 -0
- package/src/storage/auth/in-memory/auth-storage.ts +0 -18
- package/src/storage/auth/in-memory/magic-links.ts +0 -3
- package/src/storage/auth/in-memory/oidc-attempts.ts +0 -3
- package/src/storage/auth/in-memory/sessions.ts +22 -25
- package/src/storage/auth/in-memory/shared.ts +1 -10
- package/src/storage/auth/index.ts +2 -0
- package/src/storage/auth/types.ts +20 -18
- package/src/storage/executions/in-memory.ts +61 -1
- package/src/storage/executions/index.ts +3 -0
- package/src/storage/executions/provider.ts +12 -0
- package/src/storage/executions/types.ts +30 -0
- package/src/storage/in-memory/index.ts +16 -0
- package/src/storage/index.ts +63 -0
- package/src/storage/internal.ts +30 -0
- package/src/storage/ontology/in-memory/sources.ts +23 -0
- package/src/storage/ontology/index.ts +2 -0
- package/src/storage/ontology/sources.ts +17 -0
- package/src/storage/share-grants/in-memory.ts +8 -0
- package/src/storage/share-grants/index.ts +1 -0
- package/src/storage/share-grants/types.ts +8 -0
- package/src/storage/types.ts +4 -0
- package/src/storage/workflow-runs/in-memory.ts +16 -0
- package/src/storage/workflow-runs/types.ts +5 -0
- package/src/testing/action-run-storage-contract.ts +25 -0
- package/src/testing/activity-storage-contract.ts +840 -0
- package/src/testing/agent-storage-contract.ts +22 -21
- package/src/testing/artifact-storage-contract.ts +517 -0
- package/src/testing/auth-storage-contract.ts +61 -107
- package/src/testing/execution-storage-contract.ts +147 -3
- package/src/testing/index.ts +9 -0
- package/src/testing/lake-merge-storage-contract.ts +38 -0
- package/src/testing/lake-storage-contract.ts +247 -2
- package/src/testing/materializer-storage-contract.ts +1 -0
- package/src/testing/ontology-storage-contract.ts +57 -2
- package/src/testing/share-grant-storage-contract.ts +15 -0
- package/src/workflows/builders.ts +14 -0
- package/src/workflows/types.ts +9 -0
- package/src/workflows/validation.ts +72 -0
- package/dist/auth/audience.d.ts +0 -8
- package/dist/auth/audience.d.ts.map +0 -1
- package/dist/authorization/application-access.d.ts +0 -18
- package/dist/authorization/application-access.d.ts.map +0 -1
- package/dist/chunk-1f7wpmyp.js.map +0 -14
- package/dist/chunk-1k89ecfr.js +0 -85
- package/dist/chunk-1k89ecfr.js.map +0 -10
- package/dist/chunk-2jntasmh.js.map +0 -13
- package/dist/chunk-3gnrh4ve.js.map +0 -40
- package/dist/chunk-85yvv5n0.js.map +0 -12
- package/dist/chunk-9gyp8hg1.js +0 -363
- package/dist/chunk-9gyp8hg1.js.map +0 -14
- package/dist/chunk-dnmadg9k.js.map +0 -15
- package/dist/chunk-enpsx8k5.js.map +0 -10
- package/dist/chunk-hkc3jct7.js.map +0 -10
- package/dist/chunk-kyzq4wy9.js.map +0 -18
- package/dist/chunk-s16apyk9.js +0 -256
- package/dist/chunk-s16apyk9.js.map +0 -16
- package/dist/chunk-s54c868q.js.map +0 -12
- package/dist/chunk-tw03bsmb.js.map +0 -11
- package/dist/chunk-wwdfe68s.js +0 -128
- package/dist/chunk-wwdfe68s.js.map +0 -11
- package/dist/chunk-xt1zt7gv.js.map +0 -13
- package/dist/chunk-y7rqfrgg.js.map +0 -24
- package/dist/security/applications.d.ts +0 -15
- package/dist/security/applications.d.ts.map +0 -1
- package/src/auth/audience.ts +0 -28
- package/src/authorization/application-access.ts +0 -34
- package/src/security/applications.ts +0 -11
- /package/dist/{chunk-t6vq7bff.js.map → chunk-0bphap9y.js.map} +0 -0
- /package/dist/{chunk-7mbzgd9m.js.map → chunk-1cc1xaf3.js.map} +0 -0
- /package/dist/{chunk-6gmfggss.js.map → chunk-431pyp2c.js.map} +0 -0
- /package/dist/{chunk-c85m1hyj.js.map → chunk-447a5c0p.js.map} +0 -0
- /package/dist/{chunk-80mc0971.js.map → chunk-561r0yc9.js.map} +0 -0
- /package/dist/{chunk-5e43w60z.js.map → chunk-5948n82c.js.map} +0 -0
- /package/dist/{chunk-yzwja0mj.js.map → chunk-5hx48dnn.js.map} +0 -0
- /package/dist/{chunk-q1vkr2ys.js.map → chunk-c1rxbz5y.js.map} +0 -0
- /package/dist/{chunk-gc4ntf7d.js.map → chunk-cwdzcv37.js.map} +0 -0
- /package/dist/{chunk-fa02jy15.js.map → chunk-cy4mbddw.js.map} +0 -0
- /package/dist/{chunk-7kg3k1m9.js.map → chunk-d09e3rax.js.map} +0 -0
- /package/dist/{chunk-rhg02hxq.js.map → chunk-d7dnxdep.js.map} +0 -0
- /package/dist/{chunk-wz0xs816.js.map → chunk-ky3j490c.js.map} +0 -0
- /package/dist/{chunk-vyf9kfqf.js.map → chunk-q7gn29y3.js.map} +0 -0
- /package/dist/{chunk-v9xd5wzd.js.map → chunk-s7jg7pmn.js.map} +0 -0
- /package/dist/{chunk-nre82s12.js.map → chunk-vf57cr4t.js.map} +0 -0
- /package/dist/{chunk-9ybhtmg4.js.map → chunk-vvxtn22d.js.map} +0 -0
- /package/dist/{chunk-7t429e3f.js.map → chunk-xvsc5m8n.js.map} +0 -0
- /package/dist/{chunk-kg5j6fct.js.map → chunk-y5tah2kf.js.map} +0 -0
- /package/dist/{chunk-52bk93x8.js.map → chunk-z58tm0hm.js.map} +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type { AuthSessionAudience } from "./audience"
|
|
2
1
|
import type { AuthenticatedAuthSession } from "./types"
|
|
3
2
|
|
|
4
3
|
interface SessionCacheEntry {
|
|
5
4
|
readonly tokenHash: string
|
|
6
5
|
readonly transport: "cookie" | "bearer"
|
|
7
|
-
readonly audience: AuthSessionAudience
|
|
8
6
|
readonly session: AuthenticatedAuthSession
|
|
9
7
|
readonly expiresAtMs: number
|
|
10
8
|
}
|
|
@@ -14,15 +12,12 @@ export interface SessionCacheGetInput {
|
|
|
14
12
|
readonly tokenHash: string
|
|
15
13
|
/** A cookie is only ever answered from a cookie entry, and a bearer token from a bearer entry. */
|
|
16
14
|
readonly transport: "cookie" | "bearer"
|
|
17
|
-
/** The browser audience a cookie was read for. Bearer sessions carry their own. */
|
|
18
|
-
readonly audience?: AuthSessionAudience
|
|
19
15
|
readonly nowMs: number
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
export interface SessionCacheSetInput {
|
|
23
19
|
readonly sessionId: string
|
|
24
20
|
readonly tokenHash: string
|
|
25
|
-
readonly audience: AuthSessionAudience
|
|
26
21
|
readonly nowMs: number
|
|
27
22
|
readonly session: AuthenticatedAuthSession
|
|
28
23
|
readonly sessionExpiresAtMs: number
|
|
@@ -38,7 +33,7 @@ export interface SessionCacheSetInput {
|
|
|
38
33
|
* API stalls. Caching the resolved result for a short TTL collapses those reads to one
|
|
39
34
|
* per session per window.
|
|
40
35
|
*
|
|
41
|
-
* Safety: entries are pinned to the exact token hash
|
|
36
|
+
* Safety: entries are pinned to the exact token hash and transport that produced them and
|
|
42
37
|
* are never served past the session's rolling or absolute deadline. The short TTL bounds how long
|
|
43
38
|
* a revoked session can linger; sign-out additionally invalidates eagerly via
|
|
44
39
|
* {@link SessionCache.invalidate}.
|
|
@@ -60,8 +55,7 @@ export class SessionCache {
|
|
|
60
55
|
if (
|
|
61
56
|
entry.expiresAtMs <= input.nowMs ||
|
|
62
57
|
entry.tokenHash !== input.tokenHash ||
|
|
63
|
-
entry.transport !== input.transport
|
|
64
|
-
(input.audience !== undefined && entry.audience !== input.audience)
|
|
58
|
+
entry.transport !== input.transport
|
|
65
59
|
) {
|
|
66
60
|
this.entries.delete(input.sessionId)
|
|
67
61
|
return undefined
|
|
@@ -88,7 +82,6 @@ export class SessionCache {
|
|
|
88
82
|
this.entries.set(input.sessionId, {
|
|
89
83
|
tokenHash: input.tokenHash,
|
|
90
84
|
transport: bearer ? "bearer" : "cookie",
|
|
91
|
-
audience: input.audience,
|
|
92
85
|
session: input.session,
|
|
93
86
|
expiresAtMs,
|
|
94
87
|
})
|
package/src/auth/types.ts
CHANGED
|
@@ -11,7 +11,6 @@ import type {
|
|
|
11
11
|
SessionRecord,
|
|
12
12
|
UserRecord,
|
|
13
13
|
} from "../storage/auth"
|
|
14
|
-
import type { AuthSessionAudience, AuthSessionAudienceOptions } from "./audience"
|
|
15
14
|
|
|
16
15
|
export type Principal =
|
|
17
16
|
| { readonly type: "user"; readonly id: string }
|
|
@@ -63,7 +62,6 @@ export interface InvitationDeliveryInput {
|
|
|
63
62
|
readonly projectId: string
|
|
64
63
|
readonly authStorage: AuthStorage
|
|
65
64
|
readonly invitation: InvitationRecord
|
|
66
|
-
readonly audience: AuthSessionAudience
|
|
67
65
|
readonly returnTo: string
|
|
68
66
|
readonly requestOrigin: string
|
|
69
67
|
/** Return the delivered link once so the inviter can copy it through an approved channel. */
|
|
@@ -98,7 +96,6 @@ export interface MagicLinkRequestInput {
|
|
|
98
96
|
readonly projectId: string
|
|
99
97
|
readonly authStorage: AuthStorage
|
|
100
98
|
readonly email: string
|
|
101
|
-
readonly audience: AuthSessionAudience
|
|
102
99
|
readonly returnTo: string
|
|
103
100
|
readonly requestOrigin: string
|
|
104
101
|
/**
|
|
@@ -140,7 +137,6 @@ export interface MagicLinkCallbackInput {
|
|
|
140
137
|
}
|
|
141
138
|
|
|
142
139
|
export interface MagicLinkCallbackResult extends CompleteSignInResult {
|
|
143
|
-
readonly audience: AuthSessionAudience
|
|
144
140
|
readonly returnTo: string
|
|
145
141
|
}
|
|
146
142
|
|
|
@@ -182,7 +178,6 @@ export interface MagicLinkAuthStrategy extends InvitationDeliveryAuthStrategy {
|
|
|
182
178
|
export interface OidcStartSignInInput {
|
|
183
179
|
readonly projectId: string
|
|
184
180
|
readonly authStorage: AuthStorage
|
|
185
|
-
readonly audience: AuthSessionAudience
|
|
186
181
|
readonly returnTo: string
|
|
187
182
|
readonly requestOrigin: string
|
|
188
183
|
readonly now?: Date
|
|
@@ -208,7 +203,6 @@ export interface OidcCallbackInput {
|
|
|
208
203
|
}
|
|
209
204
|
|
|
210
205
|
export interface OidcCallbackResult extends CompleteSignInResult {
|
|
211
|
-
readonly audience: AuthSessionAudience
|
|
212
206
|
readonly returnTo: string
|
|
213
207
|
}
|
|
214
208
|
|
|
@@ -277,11 +271,14 @@ export interface MembershipOperationCapabilities {
|
|
|
277
271
|
readonly invite: boolean
|
|
278
272
|
readonly assignGroups: boolean
|
|
279
273
|
readonly suspend: boolean
|
|
274
|
+
readonly serviceAccounts: boolean
|
|
280
275
|
}
|
|
281
276
|
|
|
282
277
|
export interface GetMembershipOptionsResult {
|
|
283
278
|
/** Groups the caller may assign to a member (the `assignGroups` scope). */
|
|
284
279
|
readonly groups: readonly InvitationGroupOption[]
|
|
280
|
+
/** Groups the caller may place a service account in (the `serviceAccounts` scope). */
|
|
281
|
+
readonly serviceAccountGroups: readonly InvitationGroupOption[]
|
|
285
282
|
readonly capabilities: MembershipOperationCapabilities
|
|
286
283
|
}
|
|
287
284
|
|
|
@@ -377,7 +374,7 @@ export interface ReactivateMemberResult {
|
|
|
377
374
|
/** `"session"` reads only the cookie; `"any"` reads a bearer access token, else the cookie. */
|
|
378
375
|
export type AuthCredentialSource = "session" | "any"
|
|
379
376
|
|
|
380
|
-
export interface AuthSessionResolutionOptions
|
|
377
|
+
export interface AuthSessionResolutionOptions {
|
|
381
378
|
readonly credentialSource?: AuthCredentialSource
|
|
382
379
|
/** Marks this request as eligible to renew a near-expiry browser session. */
|
|
383
380
|
readonly sessionActivity?: "foreground"
|
|
@@ -385,7 +382,6 @@ export interface AuthSessionResolutionOptions extends AuthSessionAudienceOptions
|
|
|
385
382
|
|
|
386
383
|
/** Where an invitation link sends its recipient. */
|
|
387
384
|
export interface InvitationDestination {
|
|
388
|
-
readonly audience: AuthSessionAudience
|
|
389
385
|
readonly requestOrigin: string
|
|
390
386
|
readonly returnTo: string
|
|
391
387
|
}
|
package/src/auth/validation.ts
CHANGED
|
@@ -22,8 +22,6 @@ export const MAX_AUTH_INVITATION_TTL_MS = 30 * DAY
|
|
|
22
22
|
*/
|
|
23
23
|
export const DEFAULT_AUTH_SESSION_CACHE_TTL_MS = 5_000
|
|
24
24
|
|
|
25
|
-
export { resolveAuthSessionAudience } from "./audience"
|
|
26
|
-
|
|
27
25
|
export function resolveAuthConfig(config: SixbAuthConfig | undefined): ResolvedAuthConfig {
|
|
28
26
|
if (!config) {
|
|
29
27
|
return {
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* is unrestricted.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import type { AuthSessionAudience } from "../auth/audience"
|
|
14
13
|
import {
|
|
15
14
|
type ResolvedRuntimeAuthorization,
|
|
16
15
|
resolveExecutionScopeAuthorization,
|
|
@@ -18,12 +17,11 @@ import {
|
|
|
18
17
|
} from "../execution/authorization"
|
|
19
18
|
import type { ExecutionContext, RuntimeAuthorization } from "../execution/types"
|
|
20
19
|
import { AuthorizationError } from "./errors"
|
|
21
|
-
import type {
|
|
20
|
+
import type { SingletonGrantKind, TargetedGrantKind } from "./grant-kinds"
|
|
22
21
|
import type { AuthorizationContext, GrantIndex } from "./types"
|
|
23
22
|
|
|
24
23
|
/** Something a principal may attempt, paired with the resource it targets. */
|
|
25
24
|
export type AuthzRequest =
|
|
26
|
-
| { readonly kind: "application.access"; readonly audience: AuthSessionAudience }
|
|
27
25
|
| { readonly kind: "object.view"; readonly objectTypeId: string }
|
|
28
26
|
| { readonly kind: "dataset.view"; readonly datasetId: string }
|
|
29
27
|
| { readonly kind: "object.edit"; readonly objectTypeId: string }
|
|
@@ -36,6 +34,7 @@ export type AuthzRequest =
|
|
|
36
34
|
| { readonly kind: "agent.run" }
|
|
37
35
|
| { readonly kind: "logs.observe" }
|
|
38
36
|
| { readonly kind: "aiUsage.observe" }
|
|
37
|
+
| { readonly kind: "activity.observe" }
|
|
39
38
|
| { readonly kind: "aiUsage.manage" }
|
|
40
39
|
| { readonly kind: "connector.manage"; readonly connectorId: string }
|
|
41
40
|
| { readonly kind: "object.query"; readonly touchedObjectTypeIds: readonly string[] }
|
|
@@ -59,13 +58,11 @@ interface AuthorizedRuntime {
|
|
|
59
58
|
// the two can never drift. `kind` is the resolved-index key, so enforcement is
|
|
60
59
|
// a direct lookup with no per-target dispatch.
|
|
61
60
|
type Atom =
|
|
62
|
-
| { readonly kind:
|
|
63
|
-
| { readonly kind:
|
|
61
|
+
| { readonly kind: SingletonGrantKind }
|
|
62
|
+
| { readonly kind: TargetedGrantKind; readonly id: string }
|
|
64
63
|
|
|
65
64
|
function atomsFor(request: AuthzRequest): readonly Atom[] {
|
|
66
65
|
switch (request.kind) {
|
|
67
|
-
case "application.access":
|
|
68
|
-
return [{ kind: "access:application", id: request.audience }]
|
|
69
66
|
case "object.view":
|
|
70
67
|
return [{ kind: "view:object", id: request.objectTypeId }]
|
|
71
68
|
case "dataset.view":
|
|
@@ -87,11 +84,13 @@ function atomsFor(request: AuthzRequest): readonly Atom[] {
|
|
|
87
84
|
case "agent.run":
|
|
88
85
|
return [{ kind: "run:agent" }]
|
|
89
86
|
case "logs.observe":
|
|
90
|
-
return [{ kind: "observe:logs"
|
|
87
|
+
return [{ kind: "observe:logs" }]
|
|
91
88
|
case "aiUsage.observe":
|
|
92
|
-
return [{ kind: "observe:aiUsage"
|
|
89
|
+
return [{ kind: "observe:aiUsage" }]
|
|
90
|
+
case "activity.observe":
|
|
91
|
+
return [{ kind: "observe:activity" }]
|
|
93
92
|
case "aiUsage.manage":
|
|
94
|
-
return [{ kind: "manage:aiUsage"
|
|
93
|
+
return [{ kind: "manage:aiUsage" }]
|
|
95
94
|
case "connector.manage":
|
|
96
95
|
return [{ kind: "manage:connector", id: request.connectorId }]
|
|
97
96
|
case "object.query":
|
|
@@ -100,20 +99,11 @@ function atomsFor(request: AuthzRequest): readonly Atom[] {
|
|
|
100
99
|
}
|
|
101
100
|
|
|
102
101
|
function atomKey(atom: Atom): string {
|
|
103
|
-
|
|
104
|
-
if (
|
|
105
|
-
atom.kind === "observe:logs" ||
|
|
106
|
-
atom.kind === "observe:aiUsage" ||
|
|
107
|
-
atom.kind === "manage:aiUsage"
|
|
108
|
-
) {
|
|
109
|
-
return atom.kind
|
|
110
|
-
}
|
|
111
|
-
return `${atom.kind}:${atom.id}`
|
|
102
|
+
return "id" in atom ? `${atom.kind}:${atom.id}` : atom.kind
|
|
112
103
|
}
|
|
113
104
|
|
|
114
105
|
function holds(grants: GrantIndex, atom: Atom): boolean {
|
|
115
|
-
|
|
116
|
-
return grants[atom.kind].has(atom.id)
|
|
106
|
+
return "id" in atom ? grants[atom.kind].has(atom.id) : grants[atom.kind]
|
|
117
107
|
}
|
|
118
108
|
|
|
119
109
|
/** Resolve a request against a principal's grants. Never throws. */
|
|
@@ -267,8 +257,6 @@ function deniedMessage(
|
|
|
267
257
|
): string {
|
|
268
258
|
const principalId = authorization?.principal.id ?? "unknown"
|
|
269
259
|
switch (request.kind) {
|
|
270
|
-
case "application.access":
|
|
271
|
-
return `[Sixb] Principal '${principalId}' is not allowed to access application '${request.audience}'.`
|
|
272
260
|
case "object.view":
|
|
273
261
|
return `[Sixb] Principal '${principalId}' is not allowed to view object type '${request.objectTypeId}'.`
|
|
274
262
|
case "dataset.view":
|
|
@@ -293,6 +281,8 @@ function deniedMessage(
|
|
|
293
281
|
return `[Sixb] Principal '${principalId}' is not allowed to observe project logs.`
|
|
294
282
|
case "aiUsage.observe":
|
|
295
283
|
return `[Sixb] Principal '${principalId}' is not allowed to observe project AI usage.`
|
|
284
|
+
case "activity.observe":
|
|
285
|
+
return `[Sixb] Principal '${principalId}' is not allowed to observe project activity.`
|
|
296
286
|
case "aiUsage.manage":
|
|
297
287
|
return `[Sixb] Principal '${principalId}' is not allowed to manage project AI usage limits.`
|
|
298
288
|
case "connector.manage":
|
|
@@ -8,10 +8,9 @@
|
|
|
8
8
|
* entry in `GRANT_KINDS` plus the compile errors that forces at every consumer.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {
|
|
11
|
+
import type { GrantDefinition } from "../security/types"
|
|
12
12
|
|
|
13
13
|
export type GrantKind =
|
|
14
|
-
| "access:application"
|
|
15
14
|
| "view:object"
|
|
16
15
|
| "view:dataset"
|
|
17
16
|
| "edit:object"
|
|
@@ -24,15 +23,21 @@ export type GrantKind =
|
|
|
24
23
|
| "run:agent"
|
|
25
24
|
| "observe:logs"
|
|
26
25
|
| "observe:aiUsage"
|
|
26
|
+
| "observe:activity"
|
|
27
27
|
| "manage:connector"
|
|
28
28
|
| "manage:aiUsage"
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
/** Capabilities over one project-wide surface: held or not, with no ids to select. */
|
|
31
|
+
export type SingletonGrantKind =
|
|
32
|
+
| "run:agent"
|
|
33
|
+
| "observe:logs"
|
|
34
|
+
| "observe:aiUsage"
|
|
35
|
+
| "observe:activity"
|
|
36
|
+
| "manage:aiUsage"
|
|
31
37
|
export type TargetedGrantKind = Exclude<GrantKind, SingletonGrantKind>
|
|
32
38
|
|
|
33
39
|
/** Registered id universes a grant kind ranges over, plus subtype expansion. */
|
|
34
40
|
export interface GrantUniverse {
|
|
35
|
-
readonly applicationIds: ReadonlySet<string>
|
|
36
41
|
readonly objectTypeIds: ReadonlySet<string>
|
|
37
42
|
readonly datasetIds: ReadonlySet<string>
|
|
38
43
|
readonly actionIds: ReadonlySet<string>
|
|
@@ -40,9 +45,7 @@ export interface GrantUniverse {
|
|
|
40
45
|
readonly workflowIds: ReadonlySet<string>
|
|
41
46
|
readonly syncIds: ReadonlySet<string>
|
|
42
47
|
readonly pipelineIds: ReadonlySet<string>
|
|
43
|
-
readonly observableIds: ReadonlySet<string>
|
|
44
48
|
readonly connectorIds: ReadonlySet<string>
|
|
45
|
-
readonly manageableIds: ReadonlySet<string>
|
|
46
49
|
readonly getSubTypes: (objectTypeId: string) => readonly string[]
|
|
47
50
|
}
|
|
48
51
|
|
|
@@ -76,11 +79,6 @@ export const GRANT_KINDS: {
|
|
|
76
79
|
? SingletonGrantKindSpec
|
|
77
80
|
: TargetedGrantKindSpec
|
|
78
81
|
} = {
|
|
79
|
-
"access:application": {
|
|
80
|
-
universeKey: "applicationIds",
|
|
81
|
-
subject: "application",
|
|
82
|
-
fix: "Use an application exported from '@sixb/core'.",
|
|
83
|
-
},
|
|
84
82
|
"view:object": {
|
|
85
83
|
universeKey: "objectTypeIds",
|
|
86
84
|
subject: "object type",
|
|
@@ -136,40 +134,47 @@ export const GRANT_KINDS: {
|
|
|
136
134
|
fix: "Configure models.language and use the exported agent reference in can.run(agent).",
|
|
137
135
|
},
|
|
138
136
|
"observe:logs": {
|
|
139
|
-
|
|
140
|
-
subject: "
|
|
141
|
-
fix:
|
|
137
|
+
singleton: true,
|
|
138
|
+
subject: "logs",
|
|
139
|
+
fix: "Use can.observe(project.logs).",
|
|
142
140
|
},
|
|
143
141
|
"observe:aiUsage": {
|
|
144
|
-
|
|
145
|
-
subject: "
|
|
142
|
+
singleton: true,
|
|
143
|
+
subject: "AI usage",
|
|
146
144
|
fix: "Use can.observe(agent.usage).",
|
|
147
145
|
},
|
|
146
|
+
"observe:activity": {
|
|
147
|
+
singleton: true,
|
|
148
|
+
subject: "activity",
|
|
149
|
+
fix: "Use can.observe(project.activity).",
|
|
150
|
+
},
|
|
148
151
|
"manage:connector": {
|
|
149
152
|
universeKey: "connectorIds",
|
|
150
153
|
subject: "connector",
|
|
151
154
|
fix: "Add it to 'connectors/' or pass it to createSixb({ connectors }).",
|
|
152
155
|
},
|
|
153
156
|
"manage:aiUsage": {
|
|
154
|
-
|
|
155
|
-
subject: "
|
|
157
|
+
singleton: true,
|
|
158
|
+
subject: "AI usage",
|
|
156
159
|
fix: "Use can.manage(agent.usage).",
|
|
157
160
|
},
|
|
158
161
|
}
|
|
159
162
|
|
|
160
163
|
export const GRANT_KIND_KEYS = Object.keys(GRANT_KINDS) as readonly GrantKind[]
|
|
164
|
+
export const SINGLETON_GRANT_KIND_KEYS = GRANT_KIND_KEYS.filter(
|
|
165
|
+
(kind): kind is SingletonGrantKind => "singleton" in GRANT_KINDS[kind]
|
|
166
|
+
)
|
|
161
167
|
export const TARGETED_GRANT_KIND_KEYS = GRANT_KIND_KEYS.filter(
|
|
162
|
-
(kind): kind is TargetedGrantKind =>
|
|
168
|
+
(kind): kind is TargetedGrantKind => !("singleton" in GRANT_KINDS[kind])
|
|
163
169
|
)
|
|
164
170
|
|
|
171
|
+
export function isSingletonGrantKind(kind: GrantKind): kind is SingletonGrantKind {
|
|
172
|
+
return "singleton" in GRANT_KINDS[kind]
|
|
173
|
+
}
|
|
174
|
+
|
|
165
175
|
/** The grant kind a stored grant resolves to. */
|
|
166
|
-
export function grantKindOf(grant: AgentRunGrant): SingletonGrantKind
|
|
167
|
-
export function grantKindOf(grant: Exclude<GrantDefinition, AgentRunGrant>): TargetedGrantKind
|
|
168
|
-
export function grantKindOf(grant: GrantDefinition): GrantKind
|
|
169
176
|
export function grantKindOf(grant: GrantDefinition): GrantKind {
|
|
170
177
|
switch (grant.capability) {
|
|
171
|
-
case "access":
|
|
172
|
-
return "access:application"
|
|
173
178
|
case "view":
|
|
174
179
|
return `view:${grant.target}`
|
|
175
180
|
case "edit":
|
|
@@ -196,7 +201,6 @@ export type MutableGrantIndex = {
|
|
|
196
201
|
|
|
197
202
|
export function emptyGrantSets(): MutableGrantIndex {
|
|
198
203
|
return {
|
|
199
|
-
"access:application": new Set(),
|
|
200
204
|
"view:object": new Set(),
|
|
201
205
|
"view:dataset": new Set(),
|
|
202
206
|
"edit:object": new Set(),
|
|
@@ -207,9 +211,10 @@ export function emptyGrantSets(): MutableGrantIndex {
|
|
|
207
211
|
"run:sync": new Set(),
|
|
208
212
|
"run:pipeline": new Set(),
|
|
209
213
|
"run:agent": false,
|
|
210
|
-
"observe:logs":
|
|
211
|
-
"observe:aiUsage":
|
|
214
|
+
"observe:logs": false,
|
|
215
|
+
"observe:aiUsage": false,
|
|
216
|
+
"observe:activity": false,
|
|
212
217
|
"manage:connector": new Set(),
|
|
213
|
-
"manage:aiUsage":
|
|
218
|
+
"manage:aiUsage": false,
|
|
214
219
|
}
|
|
215
220
|
}
|
|
@@ -5,6 +5,8 @@ import {
|
|
|
5
5
|
GRANT_KINDS,
|
|
6
6
|
type GrantUniverse,
|
|
7
7
|
grantKindOf,
|
|
8
|
+
isSingletonGrantKind,
|
|
9
|
+
SINGLETON_GRANT_KIND_KEYS,
|
|
8
10
|
TARGETED_GRANT_KIND_KEYS,
|
|
9
11
|
} from "./grant-kinds"
|
|
10
12
|
import type { AuthorizationContext, GrantIndex, ResolvedRole } from "./types"
|
|
@@ -14,7 +16,7 @@ import type { AuthorizationContext, GrantIndex, ResolvedRole } from "./types"
|
|
|
14
16
|
*
|
|
15
17
|
* Broad grants (`every.object().except([...])`) expand against the registered
|
|
16
18
|
* universe; object-type grants also expand to subtypes. Resource grants become
|
|
17
|
-
* id sets;
|
|
19
|
+
* id sets; grants on one project-wide surface (the Agent, logs, AI usage) become booleans.
|
|
18
20
|
* The per-kind universe and subtype rules come from the `GRANT_KINDS` table, so
|
|
19
21
|
* this loop never enumerates targets by hand.
|
|
20
22
|
*/
|
|
@@ -22,11 +24,13 @@ export function resolveRoleGrants(role: RoleDefinition, universe: GrantUniverse)
|
|
|
22
24
|
const grants = emptyGrantSets()
|
|
23
25
|
|
|
24
26
|
for (const grant of role.grants) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
const kind = grantKindOf(grant)
|
|
28
|
+
if (isSingletonGrantKind(kind)) {
|
|
29
|
+
grants[kind] = true
|
|
27
30
|
continue
|
|
28
31
|
}
|
|
29
|
-
|
|
32
|
+
// Every other kind carries a selection; this narrows the grant's type to say so.
|
|
33
|
+
if (!("selection" in grant)) continue
|
|
30
34
|
const spec = GRANT_KINDS[kind]
|
|
31
35
|
expandSelection(
|
|
32
36
|
grant.selection,
|
|
@@ -89,8 +93,8 @@ export function resolveAuthorizationContext(input: {
|
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
roleIds.push(role.id)
|
|
92
|
-
|
|
93
|
-
grants[
|
|
96
|
+
for (const kind of SINGLETON_GRANT_KIND_KEYS) {
|
|
97
|
+
if (role.grants[kind]) grants[kind] = true
|
|
94
98
|
}
|
|
95
99
|
for (const kind of TARGETED_GRANT_KIND_KEYS) {
|
|
96
100
|
for (const id of role.grants[kind]) {
|
|
@@ -27,3 +27,72 @@ export function canonicalMediaType(value: unknown): string | null {
|
|
|
27
27
|
}
|
|
28
28
|
return canonical
|
|
29
29
|
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The media type a file's bytes declare by their leading signature, or `undefined` when they carry
|
|
33
|
+
* none this function knows. Only formats with an unambiguous signature are recognized; text formats
|
|
34
|
+
* have none and are left to the file name.
|
|
35
|
+
*/
|
|
36
|
+
export function sniffFileMediaType(bytes: Uint8Array): string | undefined {
|
|
37
|
+
if (startsWith(bytes, [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a])) return "image/png"
|
|
38
|
+
if (startsWith(bytes, [0xff, 0xd8, 0xff])) return "image/jpeg"
|
|
39
|
+
if (asciiAt(bytes, 0, "GIF87a") || asciiAt(bytes, 0, "GIF89a")) return "image/gif"
|
|
40
|
+
if (asciiAt(bytes, 0, "RIFF") && asciiAt(bytes, 8, "WEBP")) return "image/webp"
|
|
41
|
+
if (asciiAt(bytes, 0, "%PDF-")) return "application/pdf"
|
|
42
|
+
return undefined
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The media type of a file handed over without one: its bytes' signature when they have one, else
|
|
47
|
+
* its extension, else `application/octet-stream`. Every place that classifies a sandbox or tool file
|
|
48
|
+
* goes through this one table, so the same file gets the same type wherever it comes from.
|
|
49
|
+
*/
|
|
50
|
+
export function inferFileMediaType(fileName: string, bytes?: Uint8Array): string {
|
|
51
|
+
const sniffed = bytes === undefined ? undefined : sniffFileMediaType(bytes)
|
|
52
|
+
if (sniffed) return sniffed
|
|
53
|
+
const dot = fileName.lastIndexOf(".")
|
|
54
|
+
const extension = dot < 0 ? "" : fileName.slice(dot).toLowerCase()
|
|
55
|
+
return EXTENSION_MEDIA_TYPES[extension] ?? "application/octet-stream"
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const EXTENSION_MEDIA_TYPES: Readonly<Record<string, string>> = {
|
|
59
|
+
".bmp": "image/bmp",
|
|
60
|
+
".css": "text/css",
|
|
61
|
+
".csv": "text/csv",
|
|
62
|
+
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
63
|
+
".gif": "image/gif",
|
|
64
|
+
".htm": "text/html",
|
|
65
|
+
".html": "text/html",
|
|
66
|
+
".jpeg": "image/jpeg",
|
|
67
|
+
".jpg": "image/jpeg",
|
|
68
|
+
".js": "application/javascript",
|
|
69
|
+
".json": "application/json",
|
|
70
|
+
".jsonl": "application/x-ndjson",
|
|
71
|
+
".markdown": "text/markdown",
|
|
72
|
+
".md": "text/markdown",
|
|
73
|
+
".mjs": "application/javascript",
|
|
74
|
+
".pdf": "application/pdf",
|
|
75
|
+
".png": "image/png",
|
|
76
|
+
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
77
|
+
".svg": "image/svg+xml",
|
|
78
|
+
".tsv": "text/tab-separated-values",
|
|
79
|
+
".txt": "text/plain",
|
|
80
|
+
".webp": "image/webp",
|
|
81
|
+
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
82
|
+
".xml": "application/xml",
|
|
83
|
+
".yaml": "application/yaml",
|
|
84
|
+
".yml": "application/yaml",
|
|
85
|
+
".zip": "application/zip",
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function startsWith(bytes: Uint8Array, signature: readonly number[]): boolean {
|
|
89
|
+
return signature.every((byte, index) => bytes[index] === byte)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function asciiAt(bytes: Uint8Array, offset: number, value: string): boolean {
|
|
93
|
+
if (bytes.byteLength < offset + value.length) return false
|
|
94
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
95
|
+
if (bytes[offset + index] !== value.charCodeAt(index)) return false
|
|
96
|
+
}
|
|
97
|
+
return true
|
|
98
|
+
}
|
package/src/datasets/builders.ts
CHANGED
|
@@ -93,6 +93,17 @@ type PickColumns<
|
|
|
93
93
|
? readonly []
|
|
94
94
|
: readonly ColumnDefinitionOf<TColumns, TNames[number]>[]
|
|
95
95
|
|
|
96
|
+
/** A dataset read through some of its columns: `rawInvoices.pick("id", "title")`. */
|
|
97
|
+
type PickableDataset<TId extends string, TColumns extends readonly DatasetColumnDefinition[]> = {
|
|
98
|
+
/**
|
|
99
|
+
* The same dataset with only these columns, in this order. A pipeline step given it as an input
|
|
100
|
+
* reads nothing else, so its output inherits no other column's markings.
|
|
101
|
+
*/
|
|
102
|
+
pick<const TNames extends readonly [ColumnNameOf<TColumns>, ...ColumnNameOf<TColumns>[]]>(
|
|
103
|
+
...columns: TNames
|
|
104
|
+
): DatasetDefinition<TId, PickColumns<TColumns, TNames>>
|
|
105
|
+
}
|
|
106
|
+
|
|
96
107
|
type AddColumns<
|
|
97
108
|
TColumns extends readonly DatasetColumnDefinition[],
|
|
98
109
|
TAdd extends readonly DatasetColumnDefinition[],
|
|
@@ -140,7 +151,8 @@ type DatasetDefinitionResult<TId extends string, TOptions extends DefineDatasetO
|
|
|
140
151
|
FieldFromOptions<TOptions, "sequenceBy", string> &
|
|
141
152
|
FieldFromOptions<TOptions, "primaryKey", DatasetPrimaryKey> &
|
|
142
153
|
FieldFromOptions<TOptions, "partitionBy", readonly string[]> &
|
|
143
|
-
FieldFromOptions<TOptions, "description", string>
|
|
154
|
+
FieldFromOptions<TOptions, "description", string> &
|
|
155
|
+
PickableDataset<TId, TOptions["schema"]>
|
|
144
156
|
|
|
145
157
|
type DerivedDatasetDefinitionResult<
|
|
146
158
|
TId extends string,
|
|
@@ -153,7 +165,8 @@ type DerivedDatasetDefinitionResult<
|
|
|
153
165
|
FieldFromOptions<TOptions, "sequenceBy", string> &
|
|
154
166
|
FieldFromOptions<TOptions, "primaryKey", DatasetPrimaryKey> &
|
|
155
167
|
FieldFromOptions<TOptions, "partitionBy", readonly string[]> &
|
|
156
|
-
FieldFromOptions<TOptions, "description", string>
|
|
168
|
+
FieldFromOptions<TOptions, "description", string> &
|
|
169
|
+
PickableDataset<TId, DerivedColumns<TParent, TOptions>>
|
|
157
170
|
|
|
158
171
|
type CheckedDeriveDatasetOptions<
|
|
159
172
|
TParent extends DatasetDefinition,
|
|
@@ -217,9 +230,60 @@ function createDatasetDefinition(id: string, options: DefineDatasetOptions): Dat
|
|
|
217
230
|
}
|
|
218
231
|
|
|
219
232
|
assertDatasetDefinition(definition, (message) => new DatasetValidationError(message))
|
|
233
|
+
|
|
234
|
+
// Not enumerable: the definition stays plain data for cloning, spreading, and storage.
|
|
235
|
+
Object.defineProperty(definition, "pick", {
|
|
236
|
+
value: (...columns: string[]) => pickDatasetColumns(definition, columns),
|
|
237
|
+
})
|
|
238
|
+
|
|
220
239
|
return definition
|
|
221
240
|
}
|
|
222
241
|
|
|
242
|
+
const datasetPick: unique symbol = Symbol("sixb.datasetPick")
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Whether a definition was made by `pick()`. Only a pick may hold some of a dataset's columns: any
|
|
246
|
+
* other definition with a registered id stands for the whole dataset.
|
|
247
|
+
*/
|
|
248
|
+
export function isDatasetPick(dataset: DatasetDefinition): boolean {
|
|
249
|
+
return (dataset as { readonly [datasetPick]?: true })[datasetPick] === true
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function pickDatasetColumns(
|
|
253
|
+
dataset: DatasetDefinition,
|
|
254
|
+
columnNames: readonly string[]
|
|
255
|
+
): DatasetDefinition {
|
|
256
|
+
if (columnNames.length === 0) {
|
|
257
|
+
throw new DatasetValidationError(
|
|
258
|
+
`[Sixb] Dataset '${dataset.id}' pick needs at least one column.`
|
|
259
|
+
)
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const columnsByName = new Map(dataset.schema.columns.map((column) => [column.name, column]))
|
|
263
|
+
const picked = new Set<string>()
|
|
264
|
+
const columns = columnNames.map((columnName) => {
|
|
265
|
+
if (picked.has(columnName)) {
|
|
266
|
+
throw new DatasetValidationError(
|
|
267
|
+
`[Sixb] Dataset '${dataset.id}' pick lists column '${columnName}' twice.`
|
|
268
|
+
)
|
|
269
|
+
}
|
|
270
|
+
picked.add(columnName)
|
|
271
|
+
|
|
272
|
+
const column = columnsByName.get(columnName)
|
|
273
|
+
if (column === undefined) {
|
|
274
|
+
throw new DatasetValidationError(
|
|
275
|
+
`[Sixb] Dataset '${dataset.id}' has no column '${columnName}' to pick.`
|
|
276
|
+
)
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return column
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
const pick: DatasetDefinition = { kind: "dataset", id: dataset.id, schema: { columns } }
|
|
283
|
+
Object.defineProperty(pick, datasetPick, { value: true })
|
|
284
|
+
return pick
|
|
285
|
+
}
|
|
286
|
+
|
|
223
287
|
function assertStringArray(value: unknown, field: string): asserts value is readonly string[] {
|
|
224
288
|
if (!Array.isArray(value)) {
|
|
225
289
|
throw new DatasetValidationError(`${field} must be an array of column names.`)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DatasetColumnDefinition, DatasetDefinition } from "./types"
|
|
2
|
+
|
|
3
|
+
const indexes = new WeakMap<DatasetDefinition, ReadonlyMap<string, DatasetColumnDefinition>>()
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The columns of a dataset definition by name, built once per definition object. Registered
|
|
7
|
+
* definitions are not changed after startup, so every check and resolver can share one index.
|
|
8
|
+
*/
|
|
9
|
+
export function columnsByName(
|
|
10
|
+
dataset: DatasetDefinition
|
|
11
|
+
): ReadonlyMap<string, DatasetColumnDefinition> {
|
|
12
|
+
let index = indexes.get(dataset)
|
|
13
|
+
if (!index) {
|
|
14
|
+
index = new Map(dataset.schema.columns.map((column) => [column.name, column]))
|
|
15
|
+
indexes.set(dataset, index)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return index
|
|
19
|
+
}
|