@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,642 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ACTION_RUN_PHASES2,
|
|
4
|
+
parseActionRunFailure2
|
|
5
|
+
} from "./chunk-dhcv7yxc.js";
|
|
6
|
+
import {
|
|
7
|
+
isFileRef2
|
|
8
|
+
} from "./chunk-wkv3h3q7.js";
|
|
9
|
+
import {
|
|
10
|
+
createObjectOperationScope2
|
|
11
|
+
} from "./chunk-qczk96d9.js";
|
|
12
|
+
import {
|
|
13
|
+
ActionRunError2
|
|
14
|
+
} from "./chunk-y0c4e6ex.js";
|
|
15
|
+
import {
|
|
16
|
+
isArtifactKind
|
|
17
|
+
} from "./chunk-arns890k.js";
|
|
18
|
+
import {
|
|
19
|
+
ArtifactStorageError
|
|
20
|
+
} from "./chunk-3jms7je7.js";
|
|
21
|
+
import {
|
|
22
|
+
assertJsonValue2,
|
|
23
|
+
cloneJsonValue2,
|
|
24
|
+
stableJsonStringify2
|
|
25
|
+
} from "./chunk-wy0qdqfm.js";
|
|
26
|
+
|
|
27
|
+
// src/storage/action-runs/idempotency.ts
|
|
28
|
+
function actionSubjectsEqual(left, right) {
|
|
29
|
+
if (left.kind !== right.kind)
|
|
30
|
+
return false;
|
|
31
|
+
if (left.kind === "none")
|
|
32
|
+
return true;
|
|
33
|
+
if (right.kind === "none")
|
|
34
|
+
return false;
|
|
35
|
+
return left.objectTypeId === right.objectTypeId && left.primaryId === right.primaryId;
|
|
36
|
+
}
|
|
37
|
+
function actionRunParamsEqual(left, right) {
|
|
38
|
+
return stableJsonStringify2(left) === stableJsonStringify2(right);
|
|
39
|
+
}
|
|
40
|
+
function actionRunRequestsEqual(left, right) {
|
|
41
|
+
return left.actionId === right.actionId && actionSubjectsEqual(left.subject, right.subject) && actionRunParamsEqual(left.params, right.params);
|
|
42
|
+
}
|
|
43
|
+
function actionRunPhaseRecordsEqual(left, right) {
|
|
44
|
+
return actionRunParamsEqual(stripPhaseRecordCompletedAt(left), stripPhaseRecordCompletedAt(right));
|
|
45
|
+
}
|
|
46
|
+
function stripPhaseRecordCompletedAt(record) {
|
|
47
|
+
const { completedAt: _completedAt, ...stableRecord } = record;
|
|
48
|
+
return stableRecord;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/storage/action-runs/record.ts
|
|
52
|
+
function normalizeRecordActionRunInput2(input) {
|
|
53
|
+
const label = `[Sixb] Action run '${input.id}'`;
|
|
54
|
+
for (const field of ["id", "projectId", "executionId", "actionId", "idempotencyKey"]) {
|
|
55
|
+
if (typeof input[field] !== "string" || input[field].trim().length === 0) {
|
|
56
|
+
throw new ActionRunError2(`${label} must have a nonblank ${field}.`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const status = input.status;
|
|
60
|
+
if (status !== "succeeded" && status !== "failed") {
|
|
61
|
+
throw new ActionRunError2(`${label} has unknown status '${status}'.`);
|
|
62
|
+
}
|
|
63
|
+
if (!ACTION_RUN_PHASES2.includes(input.phase)) {
|
|
64
|
+
throw new ActionRunError2(`${label} has unknown phase '${input.phase}'.`);
|
|
65
|
+
}
|
|
66
|
+
if (input.phase === "effects") {
|
|
67
|
+
throw new ActionRunError2(`${label} is recorded before its effects run.`);
|
|
68
|
+
}
|
|
69
|
+
const startedAt = requireDate(input.startedAt, `${label} startedAt`);
|
|
70
|
+
const finishedAt = requireDate(input.finishedAt, `${label} finishedAt`);
|
|
71
|
+
if (finishedAt < startedAt) {
|
|
72
|
+
throw new ActionRunError2(`${label} cannot finish before it started.`);
|
|
73
|
+
}
|
|
74
|
+
assertJsonValue2(input.params, `${label} params`);
|
|
75
|
+
const fields = {
|
|
76
|
+
id: input.id,
|
|
77
|
+
projectId: input.projectId,
|
|
78
|
+
executionId: input.executionId,
|
|
79
|
+
actionId: input.actionId,
|
|
80
|
+
subject: structuredClone(input.subject),
|
|
81
|
+
phase: input.phase,
|
|
82
|
+
startedAt,
|
|
83
|
+
finishedAt,
|
|
84
|
+
params: structuredClone(input.params),
|
|
85
|
+
idempotencyKey: input.idempotencyKey,
|
|
86
|
+
...input.writeback === undefined ? {} : { writeback: normalizeWriteback(input.writeback, label) }
|
|
87
|
+
};
|
|
88
|
+
if (input.status === "succeeded") {
|
|
89
|
+
if (input.error !== undefined) {
|
|
90
|
+
throw new ActionRunError2(`${label} succeeded, so it cannot record a failure.`);
|
|
91
|
+
}
|
|
92
|
+
return { ...fields, status: "succeeded" };
|
|
93
|
+
}
|
|
94
|
+
const error = parseActionRunFailure2(input.error, input.phase);
|
|
95
|
+
if (error.details.runId !== input.id || error.details.actionId !== input.actionId) {
|
|
96
|
+
throw new ActionRunError2(`${label} records the failure of another run.`);
|
|
97
|
+
}
|
|
98
|
+
return { ...fields, status: "failed", error };
|
|
99
|
+
}
|
|
100
|
+
function resolveActionRunEffects2(existing, input) {
|
|
101
|
+
const label = `[Sixb] Action run '${input.id}'`;
|
|
102
|
+
if (!existing) {
|
|
103
|
+
throw new ActionRunError2(`${label} not found for project '${input.projectId}'.`);
|
|
104
|
+
}
|
|
105
|
+
const completedAt = requireDate(input.completedAt ?? new Date, `${label} effects`);
|
|
106
|
+
const effects = input.status === "succeeded" ? { status: "succeeded", completedAt } : { status: "failed", completedAt, error: parseActionRunFailure2(input.error, "effects") };
|
|
107
|
+
if (existing.effects) {
|
|
108
|
+
if (actionRunPhaseRecordsEqual(existing.effects, effects))
|
|
109
|
+
return { run: existing, effects: null };
|
|
110
|
+
throw new ActionRunError2(`${label} already has a different effects record.`);
|
|
111
|
+
}
|
|
112
|
+
if (existing.status !== "succeeded" || existing.phase !== "commit") {
|
|
113
|
+
throw new ActionRunError2(`${label} cannot record effects: it ended '${existing.status}' in phase '${existing.phase}'.`);
|
|
114
|
+
}
|
|
115
|
+
return { run: existing, effects };
|
|
116
|
+
}
|
|
117
|
+
function normalizeWriteback(writeback, label) {
|
|
118
|
+
const completedAt = requireDate(writeback.completedAt, `${label} writeback`);
|
|
119
|
+
if (writeback.status === "succeeded") {
|
|
120
|
+
assertJsonValue2(writeback.result, `${label} writeback result`);
|
|
121
|
+
return { status: "succeeded", completedAt, result: cloneJsonValue2(writeback.result) };
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
status: "failed",
|
|
125
|
+
completedAt,
|
|
126
|
+
error: parseActionRunFailure2(writeback.error, "writeback")
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function requireDate(value, label) {
|
|
130
|
+
const date = value instanceof Date ? new Date(value) : new Date(Number.NaN);
|
|
131
|
+
if (!Number.isFinite(date.getTime())) {
|
|
132
|
+
throw new ActionRunError2(`${label} must be a valid date.`);
|
|
133
|
+
}
|
|
134
|
+
return date;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// src/storage/errors.ts
|
|
138
|
+
class ObjectNotFoundError2 extends Error {
|
|
139
|
+
objectTypeId;
|
|
140
|
+
primaryId;
|
|
141
|
+
context;
|
|
142
|
+
name = "ObjectNotFoundError";
|
|
143
|
+
constructor(objectTypeId, primaryId, context) {
|
|
144
|
+
super(`[Sixb] ${context}: ${objectTypeId}:${primaryId}`);
|
|
145
|
+
this.objectTypeId = objectTypeId;
|
|
146
|
+
this.primaryId = primaryId;
|
|
147
|
+
this.context = context;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
class ObjectStorageError2 extends Error {
|
|
152
|
+
name = "ObjectStorageError";
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
class StorageTransactionError2 extends Error {
|
|
156
|
+
name = "StorageTransactionError";
|
|
157
|
+
code;
|
|
158
|
+
cause;
|
|
159
|
+
constructor(message, options = {}) {
|
|
160
|
+
super(message);
|
|
161
|
+
this.code = options.code;
|
|
162
|
+
this.cause = options.cause;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function isStorageSerializationFailure2(error) {
|
|
166
|
+
return error instanceof StorageTransactionError2 && error.code === "serialization_failure";
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// src/storage/activity/policy.ts
|
|
170
|
+
var ACTIVITY_BATCH_LIMIT2 = 20;
|
|
171
|
+
var ACTIVITY_EVENT_ID_PATTERN2 = /^[a-zA-Z0-9_-]{1,80}$/;
|
|
172
|
+
var ACTIVITY_VISIT_ID_PATTERN2 = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
173
|
+
var ACTIVITY_HOSTNAME_PATTERN2 = /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
174
|
+
var ACTIVITY_LABEL_PATTERN2 = /^[^\x00-\x1f\x7f]*$/;
|
|
175
|
+
var ACTIVITY_LABEL_MAX_LENGTH2 = 100;
|
|
176
|
+
var ACTIVITY_REFERRER_MAX_LENGTH2 = 253;
|
|
177
|
+
var ACTIVITY_ROUTE_MAX_LENGTH2 = 512;
|
|
178
|
+
var ACTIVITY_ID_MAX_LENGTH2 = 256;
|
|
179
|
+
var ACTIVITY_INTERACTION_NAME_PATTERN2 = /^(?!.*\d{4})[a-z][a-z0-9_-]{0,39}(?:\.[a-z][a-z0-9_-]{0,39})*$/;
|
|
180
|
+
var ACTIVITY_INTERACTION_NAME_MAX_LENGTH2 = 100;
|
|
181
|
+
var ACTIVITY_MAX_PERIOD_MS2 = 31 * 24 * 60 * 60000;
|
|
182
|
+
var ACTIVITY_MAX_PAGE_SIZE2 = 100;
|
|
183
|
+
var ACTIVITY_SOURCE_LIMIT_PER_MINUTE = 120;
|
|
184
|
+
var ACTIVITY_MIN_IDLE_TIMEOUT_MS = 60000;
|
|
185
|
+
var ACTIVITY_MAX_VISIT_MS2 = 24 * 60 * 60000;
|
|
186
|
+
var QUOTA_WINDOW_MS = 60000;
|
|
187
|
+
var DAY_MS = 86400000;
|
|
188
|
+
var ATTRIBUTION_KEYS = ["source", "medium", "campaign", "referrer"];
|
|
189
|
+
function validateActivityEvents(events) {
|
|
190
|
+
if (!Array.isArray(events) || events.length === 0 || events.length > ACTIVITY_BATCH_LIMIT2) {
|
|
191
|
+
throw new Error(`[Sixb] Activity batches must contain 1 to ${ACTIVITY_BATCH_LIMIT2} events.`);
|
|
192
|
+
}
|
|
193
|
+
const ids = new Set;
|
|
194
|
+
for (const event of events) {
|
|
195
|
+
if (!event || typeof event.id !== "string" || !ACTIVITY_EVENT_ID_PATTERN2.test(event.id) || ids.has(event.id)) {
|
|
196
|
+
throw new Error("[Sixb] Activity event ids must be unique, nonempty identifiers.");
|
|
197
|
+
}
|
|
198
|
+
ids.add(event.id);
|
|
199
|
+
if (event.type !== "page.view" && event.type !== "visit.activity" && event.type !== "ui.interaction") {
|
|
200
|
+
throw new Error("[Sixb] Unknown activity event type.");
|
|
201
|
+
}
|
|
202
|
+
if (!isActivityRoutePattern2(event.route)) {
|
|
203
|
+
throw new Error("[Sixb] Activity routes must be normalized file-router patterns without URL parameters.");
|
|
204
|
+
}
|
|
205
|
+
if (event.type !== "ui.interaction") {
|
|
206
|
+
serializeActivityAttribution2(event.attribution);
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
if (!isActivityInteractionName(event.name)) {
|
|
210
|
+
throw new Error(`[Sixb] Activity interaction names are lowercase dotted identifiers such as "invoices.export": each segment starts with a letter, holds at most 40 characters and no run of four digits, and the name at most ${ACTIVITY_INTERACTION_NAME_MAX_LENGTH2}.`);
|
|
211
|
+
}
|
|
212
|
+
if (Reflect.get(event, "attribution") !== undefined) {
|
|
213
|
+
throw new Error("[Sixb] Activity interactions carry no attribution.");
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function validateActivityAppend2(input) {
|
|
218
|
+
validateActivityEvents(input.events);
|
|
219
|
+
if (input.actor.type !== "user" && input.actor.type !== "share") {
|
|
220
|
+
throw new Error("[Sixb] Invalid activity actor.");
|
|
221
|
+
}
|
|
222
|
+
const actorId = input.actor.type === "user" ? input.actor.userId : input.actor.grantId;
|
|
223
|
+
for (const value of [input.projectId, input.sessionId, input.newVisitId, actorId]) {
|
|
224
|
+
if (typeof value !== "string" || !value.trim() || value.length > ACTIVITY_ID_MAX_LENGTH2) {
|
|
225
|
+
throw new Error("[Sixb] Invalid activity identity.");
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (!Number.isFinite(input.now.getTime()) || !Number.isSafeInteger(input.idleTimeoutMs) || input.idleTimeoutMs < ACTIVITY_MIN_IDLE_TIMEOUT_MS) {
|
|
229
|
+
throw new Error("[Sixb] Invalid activity clock or inactivity window.");
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function planActivityAppend2(input, current, stored) {
|
|
233
|
+
const fresh = input.events.filter((event) => !isRetry(event, stored));
|
|
234
|
+
if (fresh.length === 0) {
|
|
235
|
+
return { status: "duplicate" };
|
|
236
|
+
}
|
|
237
|
+
const now = Math.max(input.now.getTime(), current?.lastSeenAt ?? 0);
|
|
238
|
+
const windowOpen = current !== undefined && now - current.windowStart < QUOTA_WINDOW_MS;
|
|
239
|
+
const windowStart = windowOpen ? current.windowStart : now;
|
|
240
|
+
const windowCount = windowOpen ? current.windowCount : 0;
|
|
241
|
+
if (windowCount + fresh.length > ACTIVITY_SOURCE_LIMIT_PER_MINUTE) {
|
|
242
|
+
return { status: "throttled" };
|
|
243
|
+
}
|
|
244
|
+
const continued = continuesVisit(current, now, input.idleTimeoutMs) ? current : undefined;
|
|
245
|
+
const visitId = continued?.visitId ?? input.newVisitId;
|
|
246
|
+
const previousSequence = continued?.sequence ?? 0;
|
|
247
|
+
const pageViews = [];
|
|
248
|
+
const interactions = [];
|
|
249
|
+
let sequence = previousSequence;
|
|
250
|
+
fresh.forEach((event, index) => {
|
|
251
|
+
const receivedAt = new Date(now);
|
|
252
|
+
const opensVisit = !continued && index === 0;
|
|
253
|
+
if (event.type === "ui.interaction") {
|
|
254
|
+
if (opensVisit) {
|
|
255
|
+
sequence += 1;
|
|
256
|
+
pageViews.push({
|
|
257
|
+
id: `${event.id}.page`,
|
|
258
|
+
visitId,
|
|
259
|
+
sequence,
|
|
260
|
+
route: event.route,
|
|
261
|
+
receivedAt,
|
|
262
|
+
attribution: {}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
sequence += 1;
|
|
266
|
+
interactions.push({
|
|
267
|
+
id: event.id,
|
|
268
|
+
visitId,
|
|
269
|
+
sequence,
|
|
270
|
+
name: event.name,
|
|
271
|
+
route: event.route,
|
|
272
|
+
receivedAt
|
|
273
|
+
});
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (event.type === "page.view" || opensVisit) {
|
|
277
|
+
sequence += 1;
|
|
278
|
+
pageViews.push({
|
|
279
|
+
id: event.id,
|
|
280
|
+
visitId,
|
|
281
|
+
sequence,
|
|
282
|
+
route: event.route,
|
|
283
|
+
receivedAt,
|
|
284
|
+
...event.attribution === undefined ? {} : { attribution: structuredClone(event.attribution) }
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
const first = fresh[0];
|
|
289
|
+
const arrival = first?.type === "ui.interaction" ? {} : first?.attribution;
|
|
290
|
+
return {
|
|
291
|
+
status: "append",
|
|
292
|
+
newVisit: continued ? null : { attribution: cloneAttribution(arrival) },
|
|
293
|
+
pageViews,
|
|
294
|
+
interactions,
|
|
295
|
+
accepted: fresh.length,
|
|
296
|
+
state: {
|
|
297
|
+
visitId,
|
|
298
|
+
visitStartedAt: continued ? continued.visitStartedAt : now,
|
|
299
|
+
lastSeenAt: now,
|
|
300
|
+
sequence,
|
|
301
|
+
windowStart,
|
|
302
|
+
windowCount: windowCount + fresh.length
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
function continuesVisit(current, now, idleTimeoutMs) {
|
|
307
|
+
return current !== undefined && current.visitStartedAt !== null && now - current.lastSeenAt < idleTimeoutMs && now - current.visitStartedAt < ACTIVITY_MAX_VISIT_MS2;
|
|
308
|
+
}
|
|
309
|
+
function isRetry(event, stored) {
|
|
310
|
+
const previous = stored.find((candidate) => candidate.id === event.id);
|
|
311
|
+
if (!previous) {
|
|
312
|
+
return false;
|
|
313
|
+
}
|
|
314
|
+
const same = event.type === "ui.interaction" ? event.name === previous.name && event.route === previous.route : previous.name === undefined && event.route === previous.route && serializeActivityAttribution2(event.attribution) === serializeActivityAttribution2(previous.attribution);
|
|
315
|
+
if (!same) {
|
|
316
|
+
throw new Error("[Sixb] Activity event id was reused with different content.");
|
|
317
|
+
}
|
|
318
|
+
return true;
|
|
319
|
+
}
|
|
320
|
+
function activityCalendarDays2(period, visits, pageViewsByDay) {
|
|
321
|
+
const visitsByDay = new Map;
|
|
322
|
+
const from = period.from.getTime();
|
|
323
|
+
const last = period.to.getTime() - 1;
|
|
324
|
+
for (const visit of visits) {
|
|
325
|
+
const firstDay = Math.floor(Math.max(visit.startedAt.getTime(), from) / DAY_MS);
|
|
326
|
+
const lastDay = Math.floor(Math.min(visit.lastSeenAt.getTime(), last) / DAY_MS);
|
|
327
|
+
for (let day = firstDay;day <= lastDay; day++) {
|
|
328
|
+
const key = activityDay(day * DAY_MS);
|
|
329
|
+
visitsByDay.set(key, (visitsByDay.get(key) ?? 0) + 1);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
const days = new Set([...visitsByDay.keys(), ...pageViewsByDay.keys()]);
|
|
333
|
+
return [...days].sort().map((day) => ({
|
|
334
|
+
day,
|
|
335
|
+
visits: visitsByDay.get(day) ?? 0,
|
|
336
|
+
pageViews: pageViewsByDay.get(day) ?? 0
|
|
337
|
+
}));
|
|
338
|
+
}
|
|
339
|
+
function activityDay(at) {
|
|
340
|
+
return new Date(at).toISOString().slice(0, 10);
|
|
341
|
+
}
|
|
342
|
+
function activityActor2(type, userId, grantId) {
|
|
343
|
+
if (type === "user" && userId) {
|
|
344
|
+
return { type, userId };
|
|
345
|
+
}
|
|
346
|
+
if (type === "share" && grantId) {
|
|
347
|
+
return { type, grantId };
|
|
348
|
+
}
|
|
349
|
+
throw new Error("[Sixb] Stored activity actor is invalid.");
|
|
350
|
+
}
|
|
351
|
+
function serializeActivityAttribution2(value) {
|
|
352
|
+
if (value === undefined) {
|
|
353
|
+
return null;
|
|
354
|
+
}
|
|
355
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
356
|
+
throw new Error("[Sixb] Invalid activity attribution.");
|
|
357
|
+
}
|
|
358
|
+
if (Object.keys(value).some((key) => !ATTRIBUTION_KEYS.some((field) => field === key))) {
|
|
359
|
+
throw new Error("[Sixb] Unknown activity attribution field.");
|
|
360
|
+
}
|
|
361
|
+
const result = {};
|
|
362
|
+
for (const key of ATTRIBUTION_KEYS) {
|
|
363
|
+
const text = Reflect.get(value, key);
|
|
364
|
+
if (text === undefined) {
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
const maxLength = key === "referrer" ? ACTIVITY_REFERRER_MAX_LENGTH2 : ACTIVITY_LABEL_MAX_LENGTH2;
|
|
368
|
+
if (!isAttributionLabel(text, maxLength)) {
|
|
369
|
+
throw new Error("[Sixb] Activity attribution requires bounded, nonempty labels.");
|
|
370
|
+
}
|
|
371
|
+
if (key === "referrer" && !ACTIVITY_HOSTNAME_PATTERN2.test(text)) {
|
|
372
|
+
throw new Error("[Sixb] Activity referrer must be a hostname, not a URL.");
|
|
373
|
+
}
|
|
374
|
+
result[key] = text;
|
|
375
|
+
}
|
|
376
|
+
return JSON.stringify(result);
|
|
377
|
+
}
|
|
378
|
+
function parseActivityAttribution2(value) {
|
|
379
|
+
if (value === null) {
|
|
380
|
+
return null;
|
|
381
|
+
}
|
|
382
|
+
const data = JSON.parse(value);
|
|
383
|
+
serializeActivityAttribution2(data);
|
|
384
|
+
return data;
|
|
385
|
+
}
|
|
386
|
+
function cloneAttribution(value) {
|
|
387
|
+
return value === undefined ? null : structuredClone(value);
|
|
388
|
+
}
|
|
389
|
+
function isAttributionLabel(value, maxLength) {
|
|
390
|
+
return typeof value === "string" && value.length > 0 && value.length <= maxLength && value === value.trim() && ACTIVITY_LABEL_PATTERN2.test(value);
|
|
391
|
+
}
|
|
392
|
+
function isActivityInteractionName(value) {
|
|
393
|
+
return typeof value === "string" && value.length <= ACTIVITY_INTERACTION_NAME_MAX_LENGTH2 && ACTIVITY_INTERACTION_NAME_PATTERN2.test(value);
|
|
394
|
+
}
|
|
395
|
+
function isActivityRoutePattern2(value) {
|
|
396
|
+
return typeof value === "string" && value.length <= ACTIVITY_ROUTE_MAX_LENGTH2 && value.startsWith("/") && !value.includes("//") && !/[?#%\s\x00-\x1f]/.test(value);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// src/storage/artifacts/record.ts
|
|
400
|
+
function parseArtifactRow2(row) {
|
|
401
|
+
const id = text(row.id, "id", "artifact");
|
|
402
|
+
const where = `artifact '${id}'`;
|
|
403
|
+
const kind = row.kind;
|
|
404
|
+
if (!isArtifactKind(kind))
|
|
405
|
+
throw corrupt(where, "kind is not an artifact kind");
|
|
406
|
+
return {
|
|
407
|
+
projectId: text(row.projectId, "projectId", where),
|
|
408
|
+
id,
|
|
409
|
+
kind,
|
|
410
|
+
title: text(row.title, "title", where),
|
|
411
|
+
owner: principal(row.ownerPrincipalType, row.ownerPrincipalId, "owner", where),
|
|
412
|
+
latestVersion: positiveInteger(row.latestVersion, "latestVersion", where),
|
|
413
|
+
createdAt: date(row.createdAt, "createdAt", where),
|
|
414
|
+
updatedAt: date(row.updatedAt, "updatedAt", where)
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
function parseArtifactVersionRow2(row) {
|
|
418
|
+
const artifactId = text(row.artifactId, "artifactId", "artifact version");
|
|
419
|
+
const version = positiveInteger(row.version, "version", `artifact '${artifactId}'`);
|
|
420
|
+
const where = `artifact '${artifactId}' version ${version}`;
|
|
421
|
+
const originThreadId = row.originThreadId;
|
|
422
|
+
const originRunId = row.originRunId;
|
|
423
|
+
if (originThreadId == null !== (originRunId == null)) {
|
|
424
|
+
throw corrupt(where, "origin needs both a thread and a run");
|
|
425
|
+
}
|
|
426
|
+
return {
|
|
427
|
+
projectId: text(row.projectId, "projectId", where),
|
|
428
|
+
artifactId,
|
|
429
|
+
version,
|
|
430
|
+
title: text(row.title, "title", where),
|
|
431
|
+
entry: text(row.entry, "entry", where),
|
|
432
|
+
files: files(json(row.files, "files", where), where),
|
|
433
|
+
outline: outline(json(row.outline, "outline", where), where),
|
|
434
|
+
references: references(json(row.refs, "refs", where), where),
|
|
435
|
+
author: principal(row.authorPrincipalType, row.authorPrincipalId, "author", where),
|
|
436
|
+
...originThreadId == null ? {} : {
|
|
437
|
+
origin: {
|
|
438
|
+
threadId: text(originThreadId, "originThreadId", where),
|
|
439
|
+
runId: text(originRunId, "originRunId", where)
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
createdAt: date(row.createdAt, "createdAt", where)
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
function parseArtifactFrameGrantRow2(row) {
|
|
446
|
+
const artifactId = text(row.artifactId, "artifactId", "artifact frame grant");
|
|
447
|
+
const where = `frame grant for artifact '${artifactId}'`;
|
|
448
|
+
return {
|
|
449
|
+
projectId: text(row.projectId, "projectId", where),
|
|
450
|
+
tokenHash: text(row.tokenHash, "tokenHash", where),
|
|
451
|
+
artifactId,
|
|
452
|
+
version: positiveInteger(row.version, "version", where),
|
|
453
|
+
targets: frameTargets(json(row.targets, "targets", where), where),
|
|
454
|
+
createdAt: date(row.createdAt, "createdAt", where),
|
|
455
|
+
expiresAt: date(row.expiresAt, "expiresAt", where)
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
var artifactStorageErrors2 = {
|
|
459
|
+
exists: (id) => new ArtifactStorageError("artifact_exists", `[Sixb] Artifact '${id}' already exists.`),
|
|
460
|
+
notFound: (id) => new ArtifactStorageError("artifact_not_found", `[Sixb] Artifact '${id}' was not found.`),
|
|
461
|
+
kindMismatch: (id, kind, requested) => new ArtifactStorageError("artifact_kind_mismatch", `[Sixb] Artifact '${id}' is a ${kind}; it cannot take a ${requested} version.`)
|
|
462
|
+
};
|
|
463
|
+
function files(value, where) {
|
|
464
|
+
if (!Array.isArray(value))
|
|
465
|
+
throw corrupt(where, "files is not a list");
|
|
466
|
+
return value.map((entry) => {
|
|
467
|
+
if (!isObject(entry) || typeof entry.path !== "string" || !isFileRef2(entry.file)) {
|
|
468
|
+
throw corrupt(where, "a file entry is not a path and a file reference");
|
|
469
|
+
}
|
|
470
|
+
return { path: entry.path, file: entry.file };
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
function outline(value, where) {
|
|
474
|
+
if (!isObject(value) || !isArtifactKind(value.kind)) {
|
|
475
|
+
throw corrupt(where, "outline does not name an artifact kind");
|
|
476
|
+
}
|
|
477
|
+
return value;
|
|
478
|
+
}
|
|
479
|
+
function references(value, where) {
|
|
480
|
+
if (!Array.isArray(value))
|
|
481
|
+
throw corrupt(where, "references is not a list");
|
|
482
|
+
return value.map((entry) => {
|
|
483
|
+
if (!isObject(entry) || typeof entry.address !== "string" || entry.as !== "embed" && entry.as !== "link" || typeof entry.at !== "string" || !Number.isSafeInteger(entry.resolvedVersion) || entry.resolvedVersion < 1) {
|
|
484
|
+
throw corrupt(where, "a reference is not an address, a verb, a place, and a version");
|
|
485
|
+
}
|
|
486
|
+
return {
|
|
487
|
+
address: entry.address,
|
|
488
|
+
as: entry.as,
|
|
489
|
+
at: entry.at,
|
|
490
|
+
resolvedVersion: entry.resolvedVersion
|
|
491
|
+
};
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
function frameTargets(value, where) {
|
|
495
|
+
if (!Array.isArray(value))
|
|
496
|
+
throw corrupt(where, "targets is not a list");
|
|
497
|
+
return value.map((entry) => {
|
|
498
|
+
if (!isObject(entry) || typeof entry.address !== "string" || typeof entry.artifactId !== "string" || !Number.isSafeInteger(entry.version) || entry.version < 1) {
|
|
499
|
+
throw corrupt(where, "a target is not an address, an artifact, and a version");
|
|
500
|
+
}
|
|
501
|
+
return {
|
|
502
|
+
address: entry.address,
|
|
503
|
+
artifactId: entry.artifactId,
|
|
504
|
+
version: entry.version
|
|
505
|
+
};
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
var PRINCIPAL_TYPES = new Set(["user", "serviceAccount", "system"]);
|
|
509
|
+
function principal(type, id, column, where) {
|
|
510
|
+
if (typeof type !== "string" || !PRINCIPAL_TYPES.has(type)) {
|
|
511
|
+
throw corrupt(where, `${column} is not a principal`);
|
|
512
|
+
}
|
|
513
|
+
return { type, id: text(id, column, where) };
|
|
514
|
+
}
|
|
515
|
+
function json(value, column, where) {
|
|
516
|
+
if (typeof value !== "string")
|
|
517
|
+
return value;
|
|
518
|
+
try {
|
|
519
|
+
return JSON.parse(value);
|
|
520
|
+
} catch {
|
|
521
|
+
throw corrupt(where, `${column} is not JSON`);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
function text(value, column, where) {
|
|
525
|
+
if (typeof value !== "string" || value.length === 0)
|
|
526
|
+
throw corrupt(where, `${column} is not text`);
|
|
527
|
+
return value;
|
|
528
|
+
}
|
|
529
|
+
function positiveInteger(value, column, where) {
|
|
530
|
+
const number = typeof value === "bigint" ? Number(value) : value;
|
|
531
|
+
if (typeof number !== "number" || !Number.isSafeInteger(number) || number < 1) {
|
|
532
|
+
throw corrupt(where, `${column} is not a positive integer`);
|
|
533
|
+
}
|
|
534
|
+
return number;
|
|
535
|
+
}
|
|
536
|
+
function date(value, column, where) {
|
|
537
|
+
const parsed = value instanceof Date || typeof value === "string" ? new Date(value) : null;
|
|
538
|
+
if (!parsed || !Number.isFinite(parsed.getTime()))
|
|
539
|
+
throw corrupt(where, `${column} is not a date`);
|
|
540
|
+
return parsed;
|
|
541
|
+
}
|
|
542
|
+
function isObject(value) {
|
|
543
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
544
|
+
}
|
|
545
|
+
function corrupt(where, reason) {
|
|
546
|
+
return new Error(`[Sixb] Stored ${where} is invalid: ${reason}.`);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
// src/storage/file-download-grants/record.ts
|
|
550
|
+
function parseFileDownloadGrantRow2(row) {
|
|
551
|
+
const id = text2(row.id, "id", String(row.id));
|
|
552
|
+
const file = typeof row.file === "string" ? JSON.parse(row.file) : row.file;
|
|
553
|
+
if (!isFileRef2(file))
|
|
554
|
+
throw corrupt2(id, "file is not a file reference");
|
|
555
|
+
return {
|
|
556
|
+
id,
|
|
557
|
+
projectId: text2(row.projectId, "projectId", id),
|
|
558
|
+
tokenHash: text2(row.tokenHash, "tokenHash", id),
|
|
559
|
+
file,
|
|
560
|
+
executionId: text2(row.executionId, "executionId", id),
|
|
561
|
+
createdAt: date2(row.createdAt, "createdAt", id),
|
|
562
|
+
expiresAt: date2(row.expiresAt, "expiresAt", id),
|
|
563
|
+
...row.revokedAt == null ? {} : { revokedAt: date2(row.revokedAt, "revokedAt", id) }
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
function cloneFileDownloadGrantRecord(record) {
|
|
567
|
+
return structuredClone(record);
|
|
568
|
+
}
|
|
569
|
+
function text2(value, column, id) {
|
|
570
|
+
if (typeof value !== "string" || value.length === 0)
|
|
571
|
+
throw corrupt2(id, `${column} is not text`);
|
|
572
|
+
return value;
|
|
573
|
+
}
|
|
574
|
+
function date2(value, column, id) {
|
|
575
|
+
const parsed = value instanceof Date || typeof value === "string" ? new Date(value) : null;
|
|
576
|
+
if (!parsed || !Number.isFinite(parsed.getTime()))
|
|
577
|
+
throw corrupt2(id, `${column} is not a date`);
|
|
578
|
+
return parsed;
|
|
579
|
+
}
|
|
580
|
+
function corrupt2(id, reason) {
|
|
581
|
+
return new Error(`[Sixb] Stored file download grant '${id}' is invalid: ${reason}.`);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
// src/storage/pipeline-runs/idempotency.ts
|
|
585
|
+
function canRequeuePipelineRunAfterEnqueueFailure2(existing, input) {
|
|
586
|
+
return existing.status === "failed" && existing.error?.code === "queue.enqueue_failed" && existing.error.retryable && existing.executionId === input.executionId && existing.pipelineId === input.pipelineId;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
// src/storage/sync-runs/idempotency.ts
|
|
590
|
+
function canRequeueSyncRunAfterEnqueueFailure2(existing, input) {
|
|
591
|
+
return existing.status === "failed" && existing.error?.code === "queue.enqueue_failed" && existing.error.retryable && existing.executionId === input.executionId && existing.syncId === input.syncId && existing.datasetId === input.datasetId && existing.mode === input.mode && existing.expectedLatestVersionId === input.expectedLatestVersionId && existing.commitMessage === input.commitMessage;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
// src/storage/transaction.ts
|
|
595
|
+
function createTransactionStorageProxy2(target, isActive) {
|
|
596
|
+
const proxies = new WeakMap;
|
|
597
|
+
const objectStorage = createObjectOperationScope2(target.objects, {
|
|
598
|
+
assertAvailable: () => assertTransactionActive2(isActive),
|
|
599
|
+
run: async (operation) => {
|
|
600
|
+
assertTransactionActive2(isActive);
|
|
601
|
+
return operation();
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
const wrap = (value) => {
|
|
605
|
+
const existing = proxies.get(value);
|
|
606
|
+
if (existing)
|
|
607
|
+
return existing;
|
|
608
|
+
const proxy = new Proxy(value, {
|
|
609
|
+
get(current, property, receiver) {
|
|
610
|
+
assertTransactionActive2(isActive);
|
|
611
|
+
const result = current === target && property === "objects" ? objectStorage : Reflect.get(current, property, receiver);
|
|
612
|
+
if (typeof result === "function") {
|
|
613
|
+
return (...args) => {
|
|
614
|
+
assertTransactionActive2(isActive);
|
|
615
|
+
return result.apply(current, args);
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
if (result && typeof result === "object") {
|
|
619
|
+
return wrap(result);
|
|
620
|
+
}
|
|
621
|
+
return result;
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
proxies.set(value, proxy);
|
|
625
|
+
return proxy;
|
|
626
|
+
};
|
|
627
|
+
return wrap(target);
|
|
628
|
+
}
|
|
629
|
+
function assertTransactionActive2(isActive) {
|
|
630
|
+
if (!isActive()) {
|
|
631
|
+
throw new StorageTransactionError2("[Sixb] Transaction storage cannot be used after transaction completion.", { code: "transaction_inactive" });
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
function throwNestedStorageTransaction2() {
|
|
635
|
+
throw new StorageTransactionError2("[Sixb] Nested storage transactions are not supported yet.", {
|
|
636
|
+
code: "nested_transaction"
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export { actionSubjectsEqual, actionRunRequestsEqual, normalizeRecordActionRunInput2, resolveActionRunEffects2, ObjectNotFoundError2, ObjectStorageError2, StorageTransactionError2, isStorageSerializationFailure2, ACTIVITY_BATCH_LIMIT2, ACTIVITY_EVENT_ID_PATTERN2, ACTIVITY_VISIT_ID_PATTERN2, ACTIVITY_HOSTNAME_PATTERN2, ACTIVITY_LABEL_PATTERN2, ACTIVITY_LABEL_MAX_LENGTH2, ACTIVITY_REFERRER_MAX_LENGTH2, ACTIVITY_ROUTE_MAX_LENGTH2, ACTIVITY_ID_MAX_LENGTH2, ACTIVITY_INTERACTION_NAME_PATTERN2, ACTIVITY_INTERACTION_NAME_MAX_LENGTH2, ACTIVITY_MAX_PERIOD_MS2, ACTIVITY_MAX_PAGE_SIZE2, ACTIVITY_MIN_IDLE_TIMEOUT_MS, ACTIVITY_MAX_VISIT_MS2, validateActivityEvents, validateActivityAppend2, planActivityAppend2, activityCalendarDays2, activityDay, activityActor2, serializeActivityAttribution2, parseActivityAttribution2, isActivityRoutePattern2, parseArtifactRow2, parseArtifactVersionRow2, parseArtifactFrameGrantRow2, artifactStorageErrors2, parseFileDownloadGrantRow2, cloneFileDownloadGrantRecord, canRequeuePipelineRunAfterEnqueueFailure2, canRequeueSyncRunAfterEnqueueFailure2, createTransactionStorageProxy2, assertTransactionActive2, throwNestedStorageTransaction2 };
|
|
641
|
+
|
|
642
|
+
//# debugId=BE6522CD0B17F2AA64756E2164756E21
|