@sixb/core 0.1.20 → 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/index.js +10 -10
- package/dist/authorization/decision.d.ts +2 -0
- package/dist/authorization/decision.d.ts.map +1 -1
- package/dist/authorization/grant-kinds.d.ts +2 -2
- package/dist/authorization/grant-kinds.d.ts.map +1 -1
- package/dist/authorization/index.js +6 -6
- 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 +53 -47
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/{chunk-xfs8x8m9.js → chunk-0bphap9y.js} +5 -5
- package/dist/{chunk-1zq2p6g0.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-t7x8dmn0.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-ren4kg2j.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-x6m907x7.js → chunk-5vems3nx.js} +5 -6
- package/dist/{chunk-x6m907x7.js.map → chunk-5vems3nx.js.map} +3 -3
- package/dist/{chunk-0rbyz4qy.js → chunk-61y5xs4p.js} +560 -164
- package/dist/{chunk-0rbyz4qy.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-d0bqz29d.js → chunk-6vb4st8k.js} +8 -4
- package/dist/{chunk-d0bqz29d.js.map → chunk-6vb4st8k.js.map} +3 -3
- package/dist/chunk-7q8t23v4.js +467 -0
- package/dist/chunk-7q8t23v4.js.map +14 -0
- package/dist/{chunk-5j58wjct.js → chunk-858emn8m.js} +6 -6
- 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-n33z5bjw.js → chunk-918wwnaa.js} +490 -24
- package/dist/{chunk-n33z5bjw.js.map → chunk-918wwnaa.js.map} +13 -11
- package/dist/{chunk-rrzt8jdy.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-6c6sn0bh.js → chunk-akzryx9h.js} +335 -1167
- package/dist/{chunk-6c6sn0bh.js.map → chunk-akzryx9h.js.map} +18 -24
- package/dist/chunk-arns890k.js +10 -0
- package/dist/chunk-arns890k.js.map +10 -0
- package/dist/{chunk-hjzdd750.js → chunk-bk9svbcq.js} +11 -11
- package/dist/{chunk-hjzdd750.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-6p49a5cq.js → chunk-c1rxbz5y.js} +3 -3
- package/dist/chunk-cfj9dfbb.js +288 -0
- package/dist/chunk-cfj9dfbb.js.map +12 -0
- package/dist/{chunk-bx9q3cwv.js → chunk-cn0fwwhy.js} +7 -7
- package/dist/{chunk-bx9q3cwv.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-9w055r5b.js → chunk-d09e3rax.js} +1 -1
- package/dist/chunk-d5rjr8c0.js +176 -0
- package/dist/chunk-d5rjr8c0.js.map +12 -0
- package/dist/{chunk-dk8tkk5f.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-gsjm1wms.js → chunk-dhdha526.js} +8 -2
- 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-way52z4h.js → chunk-e17zdm62.js} +6 -12
- package/dist/{chunk-way52z4h.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-es1gxsbf.js → chunk-f4pamkt9.js} +8 -10
- 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-d09tj99x.js → chunk-g257jwnc.js} +10 -4
- package/dist/{chunk-d09tj99x.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-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-k6q3n2sc.js → chunk-k43ct2ke.js} +20 -11
- package/dist/chunk-k43ct2ke.js.map +12 -0
- package/dist/{chunk-3t2hgbgd.js → chunk-kge7k6ey.js} +40 -8
- package/dist/chunk-kge7k6ey.js.map +15 -0
- package/dist/{chunk-tg2cw67r.js → chunk-ky3j490c.js} +2 -2
- package/dist/chunk-mjddfa7k.js +129 -0
- package/dist/chunk-mjddfa7k.js.map +12 -0
- package/dist/{chunk-vpq4shxz.js → chunk-nn5xnx3s.js} +45 -10
- package/dist/{chunk-vpq4shxz.js.map → chunk-nn5xnx3s.js.map} +7 -6
- package/dist/{chunk-0yh890a4.js → chunk-q5e5tv4b.js} +35 -7
- package/dist/{chunk-0yh890a4.js.map → chunk-q5e5tv4b.js.map} +3 -3
- package/dist/{chunk-vyf9kfqf.js → chunk-q7gn29y3.js} +1 -1
- package/dist/{chunk-yevzdx4y.js → chunk-rmakanzx.js} +10 -12
- package/dist/{chunk-yevzdx4y.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-9dmt152s.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-z4m0yz8c.js → chunk-y5tah2kf.js} +1 -1
- package/dist/{chunk-fkgc1wt8.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/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/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 +48 -41
- 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 +20 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +112 -97
- 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 +25 -24
- 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/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/dataset-version-markings.d.ts +47 -0
- package/dist/security/dataset-version-markings.d.ts.map +1 -0
- package/dist/security/grants.d.ts +3 -2
- package/dist/security/grants.d.ts.map +1 -1
- package/dist/security/index.d.ts +2 -1
- 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/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.js +2 -2
- package/dist/security/redactions.d.ts +4 -1
- package/dist/security/redactions.d.ts.map +1 -1
- package/dist/security/types.d.ts +22 -2
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/validation.d.ts.map +1 -1
- package/dist/shares/internal.js +24 -23
- 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 +9 -8
- 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/sessions.d.ts +2 -1
- package/dist/storage/auth/in-memory/sessions.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 +19 -0
- 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 +11 -11
- 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 +54 -53
- 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 +13 -12
- 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 +4488 -3137
- 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 +27 -26
- 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 +25 -1
- 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/authorization/decision.ts +5 -0
- package/src/authorization/grant-kinds.ts +14 -2
- 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/errors/internal.ts +1 -0
- package/src/events/execution.ts +134 -21
- 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 +71 -3
- 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/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/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/dataset-version-markings.ts +163 -0
- package/src/security/grants.ts +39 -4
- package/src/security/index.ts +3 -0
- 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/pipeline-markings.ts +175 -0
- package/src/security/project.ts +8 -0
- package/src/security/projection-markings.ts +421 -0
- package/src/security/redactions.ts +7 -2
- package/src/security/types.ts +20 -2
- package/src/security/validation.ts +11 -4
- 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 +9 -16
- 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/sessions.ts +21 -0
- package/src/storage/auth/index.ts +2 -0
- package/src/storage/auth/types.ts +18 -0
- 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 +47 -0
- package/src/testing/execution-storage-contract.ts +147 -1
- 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/chunk-1k89ecfr.js +0 -85
- package/dist/chunk-1k89ecfr.js.map +0 -10
- package/dist/chunk-3t2hgbgd.js.map +0 -15
- package/dist/chunk-4vyr1j8f.js +0 -128
- package/dist/chunk-4vyr1j8f.js.map +0 -11
- package/dist/chunk-9gyp8hg1.js +0 -363
- package/dist/chunk-9gyp8hg1.js.map +0 -14
- package/dist/chunk-es1gxsbf.js.map +0 -13
- package/dist/chunk-gsjm1wms.js.map +0 -10
- package/dist/chunk-hkc3jct7.js.map +0 -10
- package/dist/chunk-k6q3n2sc.js.map +0 -12
- package/dist/chunk-rrzt8jdy.js.map +0 -14
- 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-xfs8x8m9.js.map → chunk-0bphap9y.js.map} +0 -0
- /package/dist/{chunk-1zq2p6g0.js.map → chunk-1cc1xaf3.js.map} +0 -0
- /package/dist/{chunk-t7x8dmn0.js.map → chunk-431pyp2c.js.map} +0 -0
- /package/dist/{chunk-c85m1hyj.js.map → chunk-447a5c0p.js.map} +0 -0
- /package/dist/{chunk-ren4kg2j.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-5j58wjct.js.map → chunk-858emn8m.js.map} +0 -0
- /package/dist/{chunk-6p49a5cq.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-9w055r5b.js.map → chunk-d09e3rax.js.map} +0 -0
- /package/dist/{chunk-dk8tkk5f.js.map → chunk-d7dnxdep.js.map} +0 -0
- /package/dist/{chunk-tg2cw67r.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-9dmt152s.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-z4m0yz8c.js.map → chunk-y5tah2kf.js.map} +0 -0
- /package/dist/{chunk-fkgc1wt8.js.map → chunk-z58tm0hm.js.map} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Publishing for this repo's packages: the Agent publishes through the same checks as the API. */
|
|
2
|
+
|
|
3
|
+
export { isArtifactId } from "../ids"
|
|
4
|
+
export { ARTIFACT_LIMITS } from "../limits"
|
|
5
|
+
export {
|
|
6
|
+
artifactVersionWarnings,
|
|
7
|
+
type PreparedArtifactVersion,
|
|
8
|
+
type PublishArtifactInput,
|
|
9
|
+
prepareArtifactVersion,
|
|
10
|
+
publishArtifact,
|
|
11
|
+
storeArtifactVersion,
|
|
12
|
+
} from "./publish"
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import type { Principal } from "../../auth"
|
|
2
|
+
import { ArtifactStorageError } from "../../storage/artifacts/errors"
|
|
3
|
+
import type {
|
|
4
|
+
ArtifactFile,
|
|
5
|
+
ArtifactOrigin,
|
|
6
|
+
ArtifactRecord,
|
|
7
|
+
ArtifactStorage,
|
|
8
|
+
ArtifactVersionInput,
|
|
9
|
+
ArtifactVersionRecord,
|
|
10
|
+
PublishedArtifactVersion,
|
|
11
|
+
} from "../../storage/artifacts/types"
|
|
12
|
+
import { ArtifactRequestError } from "../errors"
|
|
13
|
+
import { createArtifactId } from "../ids"
|
|
14
|
+
import type { ArtifactKind } from "../kinds"
|
|
15
|
+
import { ARTIFACT_LIMITS } from "../limits"
|
|
16
|
+
import type { ArtifactOutline } from "../outline"
|
|
17
|
+
import { ARTIFACT_THEME_FILE, parseArtifactTheme } from "../theme"
|
|
18
|
+
import type { ArtifactWarning } from "../warnings"
|
|
19
|
+
import {
|
|
20
|
+
type ArtifactBlobStorage,
|
|
21
|
+
checkArtifactFiles,
|
|
22
|
+
invalidArtifact,
|
|
23
|
+
readArtifactText,
|
|
24
|
+
} from "./files"
|
|
25
|
+
import { brokenDependents, type FoundReference, resolveReferences } from "./references"
|
|
26
|
+
import { validateDocument } from "./validate/document"
|
|
27
|
+
import { validateFileArtifact } from "./validate/file"
|
|
28
|
+
import { validateSheet } from "./validate/sheet"
|
|
29
|
+
import { validateSlides } from "./validate/slides"
|
|
30
|
+
|
|
31
|
+
export interface PublishArtifactContext {
|
|
32
|
+
readonly projectId: string
|
|
33
|
+
readonly storage: ArtifactStorage
|
|
34
|
+
readonly blobStorage: ArtifactBlobStorage
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface PublishArtifactInput {
|
|
38
|
+
/** Publishes the next version of this artifact; without it, a new artifact is created. */
|
|
39
|
+
readonly artifactId?: string
|
|
40
|
+
readonly kind: ArtifactKind
|
|
41
|
+
readonly title: string
|
|
42
|
+
readonly files: readonly ArtifactFile[]
|
|
43
|
+
/** Publishes the version, and owns the artifact when this creates it. */
|
|
44
|
+
readonly author: Principal
|
|
45
|
+
readonly origin?: ArtifactOrigin
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface PublishedArtifact {
|
|
49
|
+
readonly artifact: ArtifactRecord
|
|
50
|
+
readonly version: ArtifactVersionRecord
|
|
51
|
+
readonly warnings: readonly ArtifactWarning[]
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const CREATE_ATTEMPTS = 3
|
|
55
|
+
|
|
56
|
+
/** A version checked against its kind and with its addresses resolved, ready to store. */
|
|
57
|
+
export interface PreparedArtifactVersion {
|
|
58
|
+
readonly artifactId?: string
|
|
59
|
+
readonly kind: ArtifactKind
|
|
60
|
+
readonly author: Principal
|
|
61
|
+
readonly version: ArtifactVersionInput
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Validates a version against its kind and stores it. Who may publish is the caller's decision:
|
|
66
|
+
* this checks only what the version holds.
|
|
67
|
+
*/
|
|
68
|
+
export async function publishArtifact(
|
|
69
|
+
context: PublishArtifactContext,
|
|
70
|
+
input: PublishArtifactInput
|
|
71
|
+
): Promise<PublishedArtifact> {
|
|
72
|
+
const prepared = await prepareArtifactVersion(context, input)
|
|
73
|
+
const stored = await storeArtifactVersion(context, prepared)
|
|
74
|
+
return { ...stored, warnings: await artifactVersionWarnings(context, prepared, stored) }
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Everything publishing checks before it stores: the title, the files, the theme, the kind's own
|
|
79
|
+
* format, and every address, resolved against what the author can read. It reads the files back
|
|
80
|
+
* and parses them, so a caller that stores inside a transaction prepares outside it.
|
|
81
|
+
*/
|
|
82
|
+
export async function prepareArtifactVersion(
|
|
83
|
+
context: PublishArtifactContext,
|
|
84
|
+
input: PublishArtifactInput
|
|
85
|
+
): Promise<PreparedArtifactVersion> {
|
|
86
|
+
const title = checkTitle(input.title)
|
|
87
|
+
await checkArtifactFiles(context.blobStorage, input.files)
|
|
88
|
+
if (input.kind !== "file") await checkTheme(context.blobStorage, input.files)
|
|
89
|
+
const validated = await validateKind(context.blobStorage, input.kind, input.files)
|
|
90
|
+
const references = await resolveReferences(
|
|
91
|
+
referenceContext(context, input),
|
|
92
|
+
validated.references ?? []
|
|
93
|
+
)
|
|
94
|
+
return {
|
|
95
|
+
...(input.artifactId ? { artifactId: input.artifactId } : {}),
|
|
96
|
+
kind: input.kind,
|
|
97
|
+
author: input.author,
|
|
98
|
+
version: {
|
|
99
|
+
title,
|
|
100
|
+
entry: validated.entry,
|
|
101
|
+
files: input.files.map(({ path, file }) => ({ path, file: { ...file } })),
|
|
102
|
+
outline: validated.outline,
|
|
103
|
+
references,
|
|
104
|
+
author: input.author,
|
|
105
|
+
...(input.origin ? { origin: input.origin } : {}),
|
|
106
|
+
createdAt: new Date(),
|
|
107
|
+
},
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Stores a prepared version: the next one of its artifact, or the first of a new one. */
|
|
112
|
+
export async function storeArtifactVersion(
|
|
113
|
+
context: PublishArtifactContext,
|
|
114
|
+
prepared: PreparedArtifactVersion
|
|
115
|
+
): Promise<PublishedArtifactVersion> {
|
|
116
|
+
return prepared.artifactId
|
|
117
|
+
? publishVersion(context, prepared.artifactId, prepared.kind, prepared.version)
|
|
118
|
+
: createArtifact(context, prepared.kind, prepared.author, prepared.version)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* What a stored version breaks in other artifacts that show it. A first version breaks nothing:
|
|
123
|
+
* no other artifact could name it yet. The version is stored by now, so a failed check only loses
|
|
124
|
+
* the warnings.
|
|
125
|
+
*/
|
|
126
|
+
export async function artifactVersionWarnings(
|
|
127
|
+
context: PublishArtifactContext,
|
|
128
|
+
prepared: PreparedArtifactVersion,
|
|
129
|
+
stored: PublishedArtifactVersion
|
|
130
|
+
): Promise<readonly ArtifactWarning[]> {
|
|
131
|
+
if (!prepared.artifactId) return []
|
|
132
|
+
try {
|
|
133
|
+
return await brokenDependents(
|
|
134
|
+
referenceContext(context, prepared),
|
|
135
|
+
stored.artifact,
|
|
136
|
+
stored.version
|
|
137
|
+
)
|
|
138
|
+
} catch (error) {
|
|
139
|
+
console.warn(
|
|
140
|
+
`[Sixb] Could not check which artifacts version ${stored.version.version} of '${stored.artifact.id}' breaks:`,
|
|
141
|
+
error
|
|
142
|
+
)
|
|
143
|
+
return []
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function referenceContext(
|
|
148
|
+
context: PublishArtifactContext,
|
|
149
|
+
input: { readonly author: Principal; readonly artifactId?: string }
|
|
150
|
+
) {
|
|
151
|
+
return {
|
|
152
|
+
projectId: context.projectId,
|
|
153
|
+
storage: context.storage,
|
|
154
|
+
author: input.author,
|
|
155
|
+
...(input.artifactId ? { artifactId: input.artifactId } : {}),
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
async function validateKind(
|
|
160
|
+
blobStorage: ArtifactBlobStorage,
|
|
161
|
+
kind: ArtifactKind,
|
|
162
|
+
files: readonly ArtifactFile[]
|
|
163
|
+
): Promise<{
|
|
164
|
+
readonly entry: string
|
|
165
|
+
readonly outline: ArtifactOutline
|
|
166
|
+
readonly references?: readonly FoundReference[]
|
|
167
|
+
}> {
|
|
168
|
+
switch (kind) {
|
|
169
|
+
case "document":
|
|
170
|
+
return validateDocument(blobStorage, files)
|
|
171
|
+
case "file":
|
|
172
|
+
return validateFileArtifact(files)
|
|
173
|
+
case "sheet":
|
|
174
|
+
return validateSheet(blobStorage, files)
|
|
175
|
+
case "slides":
|
|
176
|
+
return validateSlides(blobStorage, files)
|
|
177
|
+
default:
|
|
178
|
+
// A caller past the API's schema, such as a script on the SDK, can name any kind.
|
|
179
|
+
throw invalidArtifact(`'${kind satisfies never}' is not a kind of artifact.`)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
async function checkTheme(
|
|
184
|
+
blobStorage: ArtifactBlobStorage,
|
|
185
|
+
files: readonly ArtifactFile[]
|
|
186
|
+
): Promise<void> {
|
|
187
|
+
const themeFile = files.find((file) => file.path === ARTIFACT_THEME_FILE)
|
|
188
|
+
if (!themeFile) return
|
|
189
|
+
const parsed = parseArtifactTheme(
|
|
190
|
+
await readArtifactText(blobStorage, themeFile, ARTIFACT_LIMITS.maxThemeBytes)
|
|
191
|
+
)
|
|
192
|
+
if ("error" in parsed) throw invalidArtifact(parsed.error)
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function checkTitle(value: string): string {
|
|
196
|
+
const title = typeof value === "string" ? value.trim() : ""
|
|
197
|
+
if (title.length === 0 || /[\u0000-\u001f\u007f]/.test(title)) {
|
|
198
|
+
throw invalidArtifact("An artifact needs a title of plain text.")
|
|
199
|
+
}
|
|
200
|
+
if (title.length > ARTIFACT_LIMITS.maxTitleLength) {
|
|
201
|
+
throw invalidArtifact(`A title may be at most ${ARTIFACT_LIMITS.maxTitleLength} characters.`)
|
|
202
|
+
}
|
|
203
|
+
return title
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
async function publishVersion(
|
|
207
|
+
context: PublishArtifactContext,
|
|
208
|
+
artifactId: string,
|
|
209
|
+
kind: ArtifactKind,
|
|
210
|
+
version: ArtifactVersionInput
|
|
211
|
+
): Promise<PublishedArtifactVersion> {
|
|
212
|
+
try {
|
|
213
|
+
return await context.storage.publish({
|
|
214
|
+
projectId: context.projectId,
|
|
215
|
+
artifactId,
|
|
216
|
+
kind,
|
|
217
|
+
version,
|
|
218
|
+
})
|
|
219
|
+
} catch (error) {
|
|
220
|
+
if (error instanceof ArtifactStorageError && error.code === "artifact_not_found") {
|
|
221
|
+
throw new ArtifactRequestError("artifact_not_found", error.message)
|
|
222
|
+
}
|
|
223
|
+
if (error instanceof ArtifactStorageError && error.code === "artifact_kind_mismatch") {
|
|
224
|
+
throw new ArtifactRequestError("artifact_kind_mismatch", error.message)
|
|
225
|
+
}
|
|
226
|
+
throw error
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
async function createArtifact(
|
|
231
|
+
context: PublishArtifactContext,
|
|
232
|
+
kind: ArtifactKind,
|
|
233
|
+
owner: Principal,
|
|
234
|
+
version: ArtifactVersionInput
|
|
235
|
+
): Promise<PublishedArtifactVersion> {
|
|
236
|
+
for (let attempt = 1; ; attempt += 1) {
|
|
237
|
+
try {
|
|
238
|
+
return await context.storage.create({
|
|
239
|
+
projectId: context.projectId,
|
|
240
|
+
id: createArtifactId(),
|
|
241
|
+
kind,
|
|
242
|
+
owner,
|
|
243
|
+
version,
|
|
244
|
+
})
|
|
245
|
+
} catch (error) {
|
|
246
|
+
const collided = error instanceof ArtifactStorageError && error.code === "artifact_exists"
|
|
247
|
+
if (!collided || attempt === CREATE_ATTEMPTS) throw error
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { type Principal, principalsEqual } from "../../auth"
|
|
2
|
+
import type {
|
|
3
|
+
ArtifactRecord,
|
|
4
|
+
ArtifactStorage,
|
|
5
|
+
ArtifactVersionRecord,
|
|
6
|
+
} from "../../storage/artifacts/types"
|
|
7
|
+
import { parseArtifactAddress } from "../address"
|
|
8
|
+
import { ARTIFACT_LIMITS } from "../limits"
|
|
9
|
+
import type { ArtifactReference } from "../references"
|
|
10
|
+
import { resolveArtifactAddress } from "../resolve"
|
|
11
|
+
import type { ArtifactWarning } from "../warnings"
|
|
12
|
+
import { invalidArtifact } from "./files"
|
|
13
|
+
|
|
14
|
+
/** An address a validator found in a version, before it is resolved. */
|
|
15
|
+
export type FoundReference = Omit<ArtifactReference, "resolvedVersion">
|
|
16
|
+
|
|
17
|
+
interface ReferenceContext {
|
|
18
|
+
readonly projectId: string
|
|
19
|
+
readonly storage: ArtifactStorage
|
|
20
|
+
/** Who publishes: an address resolves only to artifacts they can read. */
|
|
21
|
+
readonly author: Principal
|
|
22
|
+
/** The artifact being published, which an address may not name. */
|
|
23
|
+
readonly artifactId?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Resolves every address a version uses against what its author can read, recording the version
|
|
28
|
+
* each one resolved to. An address that resolves to nothing refuses the version, saying where it
|
|
29
|
+
* is and what the target has instead.
|
|
30
|
+
*/
|
|
31
|
+
export async function resolveReferences(
|
|
32
|
+
context: ReferenceContext,
|
|
33
|
+
found: readonly FoundReference[]
|
|
34
|
+
): Promise<ArtifactReference[]> {
|
|
35
|
+
if (found.length > ARTIFACT_LIMITS.maxReferences) {
|
|
36
|
+
throw invalidArtifact(
|
|
37
|
+
`A version may refer to at most ${ARTIFACT_LIMITS.maxReferences} artifacts; this one has ${found.length} addresses.`
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
const artifacts = new Map<string, Promise<ArtifactRecord | null>>()
|
|
41
|
+
const versions = new Map<string, Promise<ArtifactVersionRecord | null>>()
|
|
42
|
+
const resolved: ArtifactReference[] = []
|
|
43
|
+
for (const reference of found) {
|
|
44
|
+
const where = reference.at
|
|
45
|
+
? `In '${reference.at}', '${reference.address}'`
|
|
46
|
+
: `'${reference.address}'`
|
|
47
|
+
const address = parseArtifactAddress(reference.address)
|
|
48
|
+
if (!address) {
|
|
49
|
+
throw invalidArtifact(
|
|
50
|
+
`${where} is not an artifact address: write artifact:<id>[@<version>][/<file>][#<part>], such as artifact:art_k3m9q2x7tp#chart=revenue.`
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
if (address.artifactId === context.artifactId) {
|
|
54
|
+
throw invalidArtifact(
|
|
55
|
+
`${where} names the artifact being published. Link to one of its sections with #<slug> instead.`
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
let artifact = artifacts.get(address.artifactId)
|
|
59
|
+
if (!artifact) {
|
|
60
|
+
artifact = context.storage
|
|
61
|
+
.get({ projectId: context.projectId, id: address.artifactId })
|
|
62
|
+
.then((record) => (record && readable(context.author, record) ? record : null))
|
|
63
|
+
artifacts.set(address.artifactId, artifact)
|
|
64
|
+
}
|
|
65
|
+
const record = await artifact
|
|
66
|
+
if (!record) {
|
|
67
|
+
throw invalidArtifact(`${where} names no artifact you can read.`)
|
|
68
|
+
}
|
|
69
|
+
const number = address.version ?? record.latestVersion
|
|
70
|
+
const key = `${record.id}@${number}`
|
|
71
|
+
let version = versions.get(key)
|
|
72
|
+
if (!version) {
|
|
73
|
+
version = context.storage.getVersion({
|
|
74
|
+
projectId: context.projectId,
|
|
75
|
+
artifactId: record.id,
|
|
76
|
+
version: number,
|
|
77
|
+
})
|
|
78
|
+
versions.set(key, version)
|
|
79
|
+
}
|
|
80
|
+
const target = await version
|
|
81
|
+
if (!target) throw invalidArtifact(`${where}: “${record.title}” has no version ${number}.`)
|
|
82
|
+
const result = resolveArtifactAddress(address, { kind: record.kind, ...target })
|
|
83
|
+
if ("problem" in result) {
|
|
84
|
+
throw invalidArtifact(`${where}: “${target.title}” ${result.problem}.`)
|
|
85
|
+
}
|
|
86
|
+
resolved.push({ ...reference, resolvedVersion: target.version })
|
|
87
|
+
}
|
|
88
|
+
return resolved
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The artifacts a new version breaks: each one whose latest version follows this artifact's latest
|
|
93
|
+
* and names something this version no longer has. Only artifacts the author can read are named.
|
|
94
|
+
*/
|
|
95
|
+
export async function brokenDependents(
|
|
96
|
+
context: ReferenceContext,
|
|
97
|
+
artifact: ArtifactRecord,
|
|
98
|
+
version: ArtifactVersionRecord
|
|
99
|
+
): Promise<ArtifactWarning[]> {
|
|
100
|
+
const dependents = await context.storage.listReferencingVersions({
|
|
101
|
+
projectId: context.projectId,
|
|
102
|
+
artifactId: artifact.id,
|
|
103
|
+
})
|
|
104
|
+
const warnings: ArtifactWarning[] = []
|
|
105
|
+
for (const dependent of dependents) {
|
|
106
|
+
if (dependent.artifactId === artifact.id) continue
|
|
107
|
+
const owner = await context.storage.get({
|
|
108
|
+
projectId: context.projectId,
|
|
109
|
+
id: dependent.artifactId,
|
|
110
|
+
})
|
|
111
|
+
if (!owner || !readable(context.author, owner)) continue
|
|
112
|
+
for (const reference of dependent.references) {
|
|
113
|
+
const address = parseArtifactAddress(reference.address)
|
|
114
|
+
// A pinned address keeps showing the version it names.
|
|
115
|
+
if (address?.artifactId !== artifact.id || address.version !== undefined) continue
|
|
116
|
+
const result = resolveArtifactAddress(address, { kind: artifact.kind, ...version })
|
|
117
|
+
if (!("problem" in result)) continue
|
|
118
|
+
warnings.push({
|
|
119
|
+
code: "reference_broken",
|
|
120
|
+
message: `“${dependent.title}” (${dependent.artifactId}) ${reference.as === "embed" ? "shows" : "links to"} ${reference.address}, but version ${version.version} ${result.problem}. Publish its next version with an address that resolves, or restore what it names.`,
|
|
121
|
+
})
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return warnings
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Owner-only, as reading is: system code reads every artifact in the project. */
|
|
128
|
+
function readable(reader: Principal, artifact: ArtifactRecord): boolean {
|
|
129
|
+
return reader.type === "system" || principalsEqual(reader, artifact.owner)
|
|
130
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { posix } from "node:path"
|
|
2
|
+
import type { ArtifactFile } from "../../../storage/artifacts/types"
|
|
3
|
+
import { isArtifactAddress } from "../../address"
|
|
4
|
+
import { decodeHtmlEntities } from "../../html"
|
|
5
|
+
import { ARTIFACT_LIMITS } from "../../limits"
|
|
6
|
+
import { createHeadingSlugger, type DocumentHeading, type DocumentOutline } from "../../outline"
|
|
7
|
+
import { type ArtifactBlobStorage, invalidArtifact, readArtifactText } from "../files"
|
|
8
|
+
import type { FoundReference } from "../references"
|
|
9
|
+
|
|
10
|
+
/** The file a document renders from. */
|
|
11
|
+
export const DOCUMENT_ENTRY = "document.md"
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Reads a document's Markdown: its headings become the outline, and every image must be a file in
|
|
15
|
+
* the version or an `artifact:` address, so the document renders the same wherever it is opened.
|
|
16
|
+
* The addresses it shows and links to are returned with the section each sits in, to resolve.
|
|
17
|
+
*/
|
|
18
|
+
export async function validateDocument(
|
|
19
|
+
blobStorage: ArtifactBlobStorage,
|
|
20
|
+
files: readonly ArtifactFile[]
|
|
21
|
+
): Promise<{
|
|
22
|
+
readonly entry: string
|
|
23
|
+
readonly outline: DocumentOutline
|
|
24
|
+
readonly references: readonly FoundReference[]
|
|
25
|
+
}> {
|
|
26
|
+
const entry = files.find((file) => file.path === DOCUMENT_ENTRY)
|
|
27
|
+
if (!entry) throw invalidArtifact(`A document needs its Markdown in '${DOCUMENT_ENTRY}'.`)
|
|
28
|
+
const markdown = await readArtifactText(blobStorage, entry, ARTIFACT_LIMITS.maxDocumentBytes)
|
|
29
|
+
|
|
30
|
+
// The same options the docs site renders with, so headings and images read the same way.
|
|
31
|
+
const html = Bun.markdown.html(markdown, {
|
|
32
|
+
tables: true,
|
|
33
|
+
strikethrough: true,
|
|
34
|
+
tasklists: true,
|
|
35
|
+
autolinks: true,
|
|
36
|
+
})
|
|
37
|
+
const headings: { depth: number; text: string }[] = []
|
|
38
|
+
const images: string[] = []
|
|
39
|
+
// Each address with the index of the heading it follows, -1 before the first.
|
|
40
|
+
const addresses: { address: string; as: "embed" | "link"; heading: number }[] = []
|
|
41
|
+
let heading: { depth: number; text: string } | null = null
|
|
42
|
+
new HTMLRewriter()
|
|
43
|
+
.on("h1, h2, h3, h4, h5, h6", {
|
|
44
|
+
element(element) {
|
|
45
|
+
heading = { depth: Number(element.tagName.slice(1)), text: "" }
|
|
46
|
+
headings.push(heading)
|
|
47
|
+
element.onEndTag(() => {
|
|
48
|
+
heading = null
|
|
49
|
+
})
|
|
50
|
+
},
|
|
51
|
+
text(chunk) {
|
|
52
|
+
if (heading) heading.text += chunk.text
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
.on("img", {
|
|
56
|
+
element(element) {
|
|
57
|
+
const source = decodeHtmlEntities(element.getAttribute("src") ?? "")
|
|
58
|
+
if (isArtifactAddress(source)) {
|
|
59
|
+
addresses.push({ address: source.trim(), as: "embed", heading: headings.length - 1 })
|
|
60
|
+
} else {
|
|
61
|
+
images.push(source)
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
.on("a", {
|
|
66
|
+
element(element) {
|
|
67
|
+
const href = decodeHtmlEntities(element.getAttribute("href") ?? "")
|
|
68
|
+
if (isArtifactAddress(href)) {
|
|
69
|
+
addresses.push({ address: href.trim(), as: "link", heading: headings.length - 1 })
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
})
|
|
73
|
+
.transform(html)
|
|
74
|
+
|
|
75
|
+
const paths = new Set(files.map((file) => file.path))
|
|
76
|
+
for (const source of images) checkImage(source, paths)
|
|
77
|
+
|
|
78
|
+
const slug = createHeadingSlugger()
|
|
79
|
+
const outlined = headings.map(({ depth, text }): DocumentHeading => {
|
|
80
|
+
const plain = decodeHtmlEntities(text).replace(/\s+/g, " ").trim()
|
|
81
|
+
return { depth, text: plain, slug: slug(plain) }
|
|
82
|
+
})
|
|
83
|
+
return {
|
|
84
|
+
entry: DOCUMENT_ENTRY,
|
|
85
|
+
outline: { kind: "document", headings: outlined },
|
|
86
|
+
references: addresses.map(({ address, as, heading: index }) => ({
|
|
87
|
+
address,
|
|
88
|
+
as,
|
|
89
|
+
at: outlined[index]?.slug ?? "",
|
|
90
|
+
})),
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function checkImage(source: string, paths: ReadonlySet<string>): void {
|
|
95
|
+
if (source === "" || source.startsWith("//") || /^[a-z][a-z\d+.-]*:/i.test(source)) {
|
|
96
|
+
throw invalidArtifact(
|
|
97
|
+
`${DOCUMENT_ENTRY} shows the image '${source}'. Images must be files in the artifact, by their relative path, or another artifact's address, such as artifact:art_k3m9q2x7tp#chart=revenue.`
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
const path = posix.normalize(safeDecodeUri(source.split(/[?#]/)[0] ?? ""))
|
|
101
|
+
if (!paths.has(path)) {
|
|
102
|
+
throw invalidArtifact(
|
|
103
|
+
`${DOCUMENT_ENTRY} shows the image '${source}', which is not one of the artifact's files.`
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function safeDecodeUri(value: string): string {
|
|
109
|
+
try {
|
|
110
|
+
return decodeURI(value)
|
|
111
|
+
} catch {
|
|
112
|
+
return value
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { inferFileMediaType } from "../../../blob-storage/media-type"
|
|
2
|
+
import type { ArtifactFile } from "../../../storage/artifacts/types"
|
|
3
|
+
import type { FileOutline } from "../../outline"
|
|
4
|
+
import { invalidArtifact } from "../files"
|
|
5
|
+
|
|
6
|
+
/** A file artifact is one file of any type, delivered as it is. */
|
|
7
|
+
export function validateFileArtifact(files: readonly ArtifactFile[]): {
|
|
8
|
+
readonly entry: string
|
|
9
|
+
readonly outline: FileOutline
|
|
10
|
+
} {
|
|
11
|
+
const [file] = files
|
|
12
|
+
if (!file || files.length > 1) {
|
|
13
|
+
throw invalidArtifact(`A file artifact holds exactly one file; this one has ${files.length}.`)
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
entry: file.path,
|
|
17
|
+
outline: { kind: "file", mediaType: file.file.mediaType ?? inferFileMediaType(file.path) },
|
|
18
|
+
}
|
|
19
|
+
}
|