@sixb/core 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.js +22 -19
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/read-facade.d.ts +1 -1
- package/dist/actions/validation.d.ts.map +1 -1
- package/dist/actions/worker.js +6 -2
- package/dist/actions/worker.js.map +3 -3
- package/dist/agents/adapters.d.ts +7 -0
- package/dist/agents/adapters.d.ts.map +1 -1
- package/dist/agents/authority.d.ts +7 -0
- package/dist/agents/authority.d.ts.map +1 -1
- package/dist/agents/context/entries.d.ts +10 -1
- package/dist/agents/context/entries.d.ts.map +1 -1
- package/dist/agents/context/index.d.ts +1 -1
- package/dist/agents/context/index.d.ts.map +1 -1
- package/dist/agents/context/index.js +4 -2
- package/dist/agents/context/index.js.map +1 -1
- package/dist/agents/context-compaction.d.ts.map +1 -1
- package/dist/agents/errors.d.ts +1 -1
- package/dist/agents/errors.d.ts.map +1 -1
- package/dist/agents/index.d.ts +6 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +44 -37
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/message.d.ts +8 -1
- package/dist/agents/message.d.ts.map +1 -1
- package/dist/agents/request.d.ts +19 -5
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/skills.d.ts +41 -0
- package/dist/agents/skills.d.ts.map +1 -0
- package/dist/agents/streams/index.js +1 -1
- package/dist/agents/streams/internal.js +1 -1
- package/dist/agents/types.d.ts +33 -4
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/auth/index.js +9 -6
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/auth/types.d.ts +6 -0
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/authorization/index.js +5 -3
- package/dist/authorization/index.js.map +1 -1
- package/dist/authorization/resolve.d.ts +1 -1
- package/dist/authorization/resolve.d.ts.map +1 -1
- package/dist/authorization/types.d.ts +7 -0
- package/dist/authorization/types.d.ts.map +1 -1
- package/dist/blob-storage/browser.js +1 -1
- package/dist/blob-storage/execution.d.ts.map +1 -1
- package/dist/blob-storage/file-content.d.ts +18 -0
- package/dist/blob-storage/file-content.d.ts.map +1 -0
- package/dist/blob-storage/index.d.ts +1 -1
- package/dist/blob-storage/index.d.ts.map +1 -1
- package/dist/blob-storage/index.js +2 -2
- package/dist/blob-storage/internal.d.ts +2 -0
- package/dist/blob-storage/internal.d.ts.map +1 -1
- package/dist/blob-storage/internal.js +16 -4
- package/dist/blob-storage/internal.js.map +1 -1
- package/dist/blob-storage/media-type.d.ts +8 -0
- package/dist/blob-storage/media-type.d.ts.map +1 -0
- package/dist/blob-storage/types.d.ts +12 -1
- package/dist/blob-storage/types.d.ts.map +1 -1
- package/dist/blob-storage/validation.d.ts +6 -0
- package/dist/blob-storage/validation.d.ts.map +1 -1
- package/dist/bootstrap/agent-context.d.ts +33 -0
- package/dist/bootstrap/agent-context.d.ts.map +1 -0
- package/dist/bootstrap/discovery.d.ts +23 -3
- package/dist/bootstrap/discovery.d.ts.map +1 -1
- package/dist/bootstrap/index.d.ts +2 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +284 -73
- package/dist/bootstrap/index.js.map +4 -3
- package/dist/bootstrap/ontology-type-manifest.d.ts.map +1 -1
- package/dist/{chunk-gf7yht60.js → chunk-1b1f2d5f.js} +23 -6
- package/dist/chunk-1b1f2d5f.js.map +12 -0
- package/dist/{chunk-9vx5e9g1.js → chunk-1sr8ryzk.js} +3 -3
- package/dist/chunk-1sr8ryzk.js.map +11 -0
- package/dist/{chunk-4gmng3vf.js → chunk-22v5bpz3.js} +1 -1
- package/dist/{chunk-s7ftxrdr.js → chunk-29yx306f.js} +20 -3
- package/dist/{chunk-s7ftxrdr.js.map → chunk-29yx306f.js.map} +3 -3
- package/dist/{chunk-4ra628t7.js → chunk-3zxk45er.js} +70 -6
- package/dist/{chunk-4ra628t7.js.map → chunk-3zxk45er.js.map} +5 -4
- package/dist/{chunk-2am3db31.js → chunk-48e3cn2d.js} +2 -2
- package/dist/{chunk-91kcnbf0.js → chunk-6gmfggss.js} +22 -9
- package/dist/chunk-6gmfggss.js.map +10 -0
- package/dist/{chunk-svabwqdq.js → chunk-6h5m9xjx.js} +43 -415
- package/dist/{chunk-svabwqdq.js.map → chunk-6h5m9xjx.js.map} +7 -11
- package/dist/{chunk-f1xh7a32.js → chunk-7hpdd6r9.js} +2 -2
- package/dist/{chunk-xyvy73tj.js → chunk-bs7sqkre.js} +8 -3
- package/dist/chunk-bs7sqkre.js.map +12 -0
- package/dist/{chunk-rb143ggb.js → chunk-bwjcehza.js} +1 -1
- package/dist/{chunk-t9shqx3w.js → chunk-d0eb5yy6.js} +143 -7
- package/dist/chunk-d0eb5yy6.js.map +14 -0
- package/dist/{chunk-vp3z1ckh.js → chunk-de4z2bj6.js} +5 -5
- package/dist/{chunk-3rrezgyc.js → chunk-dnmadg9k.js} +2 -2
- package/dist/chunk-enpsx8k5.js +127 -0
- package/dist/chunk-enpsx8k5.js.map +10 -0
- package/dist/{chunk-a7er86jd.js → chunk-ex496vct.js} +1 -1
- package/dist/{chunk-jnfxmr3f.js → chunk-f1zxad2t.js} +1 -1
- package/dist/{chunk-6wbm6ymz.js → chunk-fe52eczz.js} +271 -83
- package/dist/chunk-fe52eczz.js.map +49 -0
- package/dist/{chunk-10styjgk.js → chunk-fx93hd2n.js} +71 -29
- package/dist/chunk-fx93hd2n.js.map +20 -0
- package/dist/{chunk-9se093qz.js → chunk-gc4ntf7d.js} +4 -4
- package/dist/{chunk-9se093qz.js.map → chunk-gc4ntf7d.js.map} +1 -1
- package/dist/{chunk-98cw09sw.js → chunk-hkc3jct7.js} +4 -2
- package/dist/chunk-hkc3jct7.js.map +10 -0
- package/dist/{chunk-pja9jfz6.js → chunk-htr6wjmv.js} +115 -53
- package/dist/chunk-htr6wjmv.js.map +19 -0
- package/dist/{chunk-h3v76ams.js → chunk-jhm3zsa7.js} +25 -2
- package/dist/chunk-jhm3zsa7.js.map +12 -0
- package/dist/{chunk-52c5zb0z.js → chunk-k6hrnf35.js} +5 -5
- package/dist/chunk-k6hrnf35.js.map +10 -0
- package/dist/{chunk-c2rga5cx.js → chunk-mfs23znk.js} +1 -1
- package/dist/{chunk-7ecp4v7a.js → chunk-ny3xyvcn.js} +8 -2
- package/dist/{chunk-7ecp4v7a.js.map → chunk-ny3xyvcn.js.map} +3 -3
- package/dist/{chunk-fggq3d9k.js → chunk-p0dqwj3n.js} +5 -5
- package/dist/{chunk-cnb5kv05.js → chunk-p844e0rn.js} +23 -8
- package/dist/chunk-p844e0rn.js.map +19 -0
- package/dist/{chunk-dmn70ztd.js → chunk-pfp1txq2.js} +25 -6
- package/dist/chunk-pfp1txq2.js.map +11 -0
- package/dist/chunk-pqajwytd.js.map +2 -2
- package/dist/{chunk-5be2ath4.js → chunk-qkbx3tf6.js} +17 -128
- package/dist/{chunk-5be2ath4.js.map → chunk-qkbx3tf6.js.map} +6 -7
- package/dist/{chunk-sk0hcjsz.js → chunk-qkvz64nd.js} +2 -2
- package/dist/{chunk-w9yycd3t.js → chunk-qmnnhde6.js} +4 -8
- package/dist/{chunk-w9yycd3t.js.map → chunk-qmnnhde6.js.map} +3 -3
- package/dist/{chunk-5yd8cchh.js → chunk-qq90g05n.js} +8 -8
- package/dist/{chunk-5yd8cchh.js.map → chunk-qq90g05n.js.map} +1 -1
- package/dist/{chunk-tjjgy3z4.js → chunk-qxvp5epv.js} +66 -14
- package/dist/{chunk-tjjgy3z4.js.map → chunk-qxvp5epv.js.map} +9 -8
- package/dist/chunk-rdghfsss.js.map +2 -2
- package/dist/{chunk-rx7h5fdx.js → chunk-rt9p8m9t.js} +1 -1
- package/dist/{chunk-cd234ba4.js → chunk-rz53yb4v.js} +10 -5
- package/dist/chunk-rz53yb4v.js.map +14 -0
- package/dist/{chunk-xcy5ddha.js → chunk-s4jhg8a3.js} +351 -296
- package/dist/chunk-s4jhg8a3.js.map +15 -0
- package/dist/{chunk-69266efg.js → chunk-s54c868q.js} +12 -4
- package/dist/chunk-s54c868q.js.map +12 -0
- package/dist/{chunk-9g6jz9kk.js → chunk-tffvfy6s.js} +6 -5
- package/dist/{chunk-9g6jz9kk.js.map → chunk-tffvfy6s.js.map} +3 -3
- package/dist/{chunk-e67ynxcr.js → chunk-v6xpd60t.js} +3 -3
- package/dist/{chunk-jjrn5v0p.js → chunk-vgk3hknm.js} +1 -1
- package/dist/{chunk-5thzcb8g.js → chunk-vx2yp45y.js} +2 -2
- package/dist/{chunk-dam456ve.js → chunk-vz3gc1tm.js} +394 -31
- package/dist/{chunk-dam456ve.js.map → chunk-vz3gc1tm.js.map} +10 -7
- package/dist/chunk-xt1zt7gv.js +471 -0
- package/dist/chunk-xt1zt7gv.js.map +13 -0
- package/dist/{chunk-rpxz486p.js → chunk-y05543x6.js} +21 -5
- package/dist/{chunk-rpxz486p.js.map → chunk-y05543x6.js.map} +3 -3
- package/dist/{chunk-aq39q04r.js → chunk-y9jmd7e5.js} +4 -4
- package/dist/{chunk-aq39q04r.js.map → chunk-y9jmd7e5.js.map} +1 -1
- package/dist/{chunk-k4g51s47.js → chunk-yv9czyfr.js} +3 -3
- package/dist/{chunk-z5rnrmz1.js → chunk-yw9pyg66.js} +5 -3
- package/dist/chunk-yw9pyg66.js.map +11 -0
- package/dist/{chunk-vre348sb.js → chunk-za5yd58j.js} +2 -2
- package/dist/{chunk-23xs4qp9.js → chunk-zb77kjth.js} +3 -3
- package/dist/{chunk-33saed7g.js → chunk-zxawp1n2.js} +1 -1
- package/dist/datasets/builders.d.ts +12 -1
- package/dist/datasets/builders.d.ts.map +1 -1
- package/dist/datasets/execution.d.ts +27 -1
- package/dist/datasets/execution.d.ts.map +1 -1
- package/dist/datasets/index.d.ts +1 -1
- package/dist/datasets/index.d.ts.map +1 -1
- package/dist/datasets/types.d.ts +2 -0
- package/dist/datasets/types.d.ts.map +1 -1
- package/dist/datasets/write.d.ts +5 -0
- package/dist/datasets/write.d.ts.map +1 -1
- package/dist/datasets/write.js +10 -5
- package/dist/datasets/write.js.map +1 -1
- package/dist/edits/properties.d.ts.map +1 -1
- package/dist/events/execution.d.ts +2 -1
- package/dist/events/execution.d.ts.map +1 -1
- package/dist/events/types/objects.d.ts +5 -0
- package/dist/events/types/objects.d.ts.map +1 -1
- package/dist/execution/agent.d.ts +10 -0
- package/dist/execution/agent.d.ts.map +1 -1
- package/dist/execution/agent.js +39 -34
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorized-object-reader.d.ts +6 -1
- package/dist/execution/authorized-object-reader.d.ts.map +1 -1
- package/dist/execution/primitive.js +37 -34
- package/dist/execution/primitive.js.map +2 -2
- package/dist/execution/request.js +38 -35
- 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 +9 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -52
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/index.js +8 -5
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/materializer/index.js +19 -16
- package/dist/materializer/index.js.map +1 -1
- package/dist/models/catalog.d.ts +1 -1
- package/dist/models/catalog.d.ts.map +1 -1
- package/dist/models/execution/binding.d.ts +6 -0
- package/dist/models/execution/binding.d.ts.map +1 -1
- package/dist/models/execution/index.js +19 -16
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/execution/model-call-recorder.d.ts +4 -0
- package/dist/models/execution/model-call-recorder.d.ts.map +1 -1
- package/dist/models/execution.d.ts.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/language-model.d.ts +6 -0
- package/dist/models/language-model.d.ts.map +1 -1
- package/dist/objects/context/index.d.ts +1 -1
- package/dist/objects/context/index.d.ts.map +1 -1
- package/dist/objects/context/types.d.ts +6 -0
- package/dist/objects/context/types.d.ts.map +1 -1
- package/dist/objects/execution.d.ts +2 -1
- package/dist/objects/execution.d.ts.map +1 -1
- package/dist/objects/index.js +23 -19
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/materializer-adapter.d.ts.map +1 -1
- package/dist/objects/object/upsert-batch.d.ts.map +1 -1
- package/dist/objects/object/upsert.d.ts.map +1 -1
- package/dist/objects/property-clearance.d.ts +41 -0
- package/dist/objects/property-clearance.d.ts.map +1 -0
- package/dist/objects/query/executor.d.ts +3 -0
- package/dist/objects/query/executor.d.ts.map +1 -1
- package/dist/objects/query/index.js +18 -15
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/validate.d.ts +10 -1
- package/dist/objects/query/validate.d.ts.map +1 -1
- package/dist/objects/sdk/file-handle.d.ts +6 -0
- package/dist/objects/sdk/file-handle.d.ts.map +1 -0
- package/dist/objects/sdk/object-handle.d.ts +2 -2
- package/dist/objects/sdk/object-handle.d.ts.map +1 -1
- package/dist/objects/sdk/object-set.d.ts +2 -0
- package/dist/objects/sdk/object-set.d.ts.map +1 -1
- package/dist/ontology/builders.d.ts +12 -1
- package/dist/ontology/builders.d.ts.map +1 -1
- package/dist/ontology/docs-markdown.d.ts +35 -0
- package/dist/ontology/docs-markdown.d.ts.map +1 -0
- package/dist/ontology/docs.d.ts +50 -0
- package/dist/ontology/docs.d.ts.map +1 -0
- package/dist/ontology/index.js +7 -4
- package/dist/ontology/index.js.map +1 -1
- package/dist/ontology/inference/index.d.ts +19 -0
- package/dist/ontology/inference/index.d.ts.map +1 -1
- package/dist/ontology/internal.d.ts +3 -1
- package/dist/ontology/internal.d.ts.map +1 -1
- package/dist/ontology/internal.js +276 -3
- package/dist/ontology/internal.js.map +4 -3
- package/dist/ontology/tokens.d.ts +8 -1
- package/dist/ontology/tokens.d.ts.map +1 -1
- package/dist/ontology/types.d.ts +5 -0
- package/dist/ontology/types.d.ts.map +1 -1
- package/dist/ontology/validation/index.d.ts +1 -1
- package/dist/ontology/validation/index.d.ts.map +1 -1
- package/dist/ontology/validation/schema.d.ts +7 -0
- package/dist/ontology/validation/schema.d.ts.map +1 -1
- package/dist/pipelines/index.js +21 -18
- package/dist/pipelines/index.js.map +1 -1
- package/dist/projections/internal.js +19 -16
- package/dist/projections/internal.js.map +1 -1
- package/dist/runtime/create.d.ts +11 -2
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/definitions.d.ts +3 -1
- package/dist/runtime/definitions.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +13 -2
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/internal.js +21 -18
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/locale.d.ts +9 -0
- package/dist/runtime/locale.d.ts.map +1 -0
- package/dist/runtime/resolve-definitions.d.ts +4 -2
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/runtime/types.d.ts +30 -3
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/sandboxes/index.js +7 -6
- package/dist/sandboxes/index.js.map +1 -1
- package/dist/scheduler/index.js +1 -1
- package/dist/scheduler/runtime.d.ts +3 -0
- package/dist/scheduler/runtime.d.ts.map +1 -1
- package/dist/security/builders.d.ts +11 -2
- package/dist/security/builders.d.ts.map +1 -1
- package/dist/security/index.d.ts +4 -4
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/markings.d.ts +19 -0
- package/dist/security/markings.d.ts.map +1 -0
- package/dist/security/redactions.d.ts +4 -0
- package/dist/security/redactions.d.ts.map +1 -0
- package/dist/security/registry.d.ts +7 -1
- package/dist/security/registry.d.ts.map +1 -1
- package/dist/security/types.d.ts +25 -0
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/validation.d.ts +4 -1
- package/dist/security/validation.d.ts.map +1 -1
- package/dist/shares/internal.js +18 -15
- package/dist/shares/internal.js.map +2 -2
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +5 -4
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +15 -9
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/provider.js +10 -7
- package/dist/storage/file-upload-sessions/provider.js.map +1 -1
- package/dist/storage/index.d.ts +1 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +18 -15
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.js +4 -3
- package/dist/storage/internal.js.map +1 -1
- package/dist/storage/objects/types.d.ts +7 -0
- package/dist/storage/objects/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +10 -7
- package/dist/storage/workflow-runs/provider.js.map +1 -1
- package/dist/syncs/index.js +22 -19
- package/dist/syncs/index.js.map +1 -1
- package/dist/testing/index.js +55 -53
- package/dist/testing/index.js.map +2 -2
- package/dist/webhooks/internal.js +19 -16
- package/dist/webhooks/internal.js.map +2 -2
- package/dist/workflows/builders.d.ts.map +1 -1
- package/dist/workflows/index.js +41 -38
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/request.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +6 -3
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/validation.d.ts +2 -1
- package/dist/workflows/validation.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/actions/read-facade.ts +2 -1
- package/src/actions/validation.ts +4 -1
- package/src/agents/adapters.ts +15 -0
- package/src/agents/authority.ts +15 -0
- package/src/agents/context/entries.ts +48 -4
- package/src/agents/context/index.ts +1 -0
- package/src/agents/context-compaction.ts +6 -0
- package/src/agents/errors.ts +3 -0
- package/src/agents/index.ts +13 -1
- package/src/agents/message.ts +9 -0
- package/src/agents/request.ts +178 -22
- package/src/agents/skills.ts +63 -0
- package/src/agents/types.ts +35 -5
- package/src/auth/runtime.ts +14 -0
- package/src/auth/types.ts +6 -0
- package/src/authorization/resolve.ts +6 -1
- package/src/authorization/types.ts +7 -0
- package/src/blob-storage/execution.ts +12 -0
- package/src/blob-storage/file-content.ts +106 -0
- package/src/blob-storage/index.ts +1 -0
- package/src/blob-storage/internal.ts +7 -0
- package/src/blob-storage/media-type.ts +29 -0
- package/src/blob-storage/types.ts +13 -1
- package/src/blob-storage/validation.ts +13 -0
- package/src/bootstrap/agent-context.ts +356 -0
- package/src/bootstrap/discovery.ts +100 -33
- package/src/bootstrap/index.ts +1 -1
- package/src/bootstrap/ontology-type-manifest.ts +3 -38
- package/src/datasets/builders.ts +17 -1
- package/src/datasets/execution.ts +110 -2
- package/src/datasets/index.ts +7 -1
- package/src/datasets/types.ts +2 -0
- package/src/datasets/write.ts +21 -2
- package/src/edits/properties.ts +3 -0
- package/src/events/execution.ts +15 -16
- package/src/events/types/objects.ts +5 -0
- package/src/execution/agent.ts +27 -0
- package/src/execution/authorization.ts +1 -0
- package/src/execution/authorized-object-reader.ts +96 -34
- package/src/execution/scopes.ts +2 -6
- package/src/http/api-routes.ts +4 -3
- package/src/index.ts +27 -2
- package/src/models/catalog.ts +26 -2
- package/src/models/execution/README.md +4 -3
- package/src/models/execution/binding.ts +6 -0
- package/src/models/execution/model-call-recorder.ts +10 -0
- package/src/models/execution/session.ts +2 -2
- package/src/models/execution.ts +6 -2
- package/src/models/language-model.ts +6 -0
- package/src/objects/context/index.ts +1 -0
- package/src/objects/context/types.ts +7 -0
- package/src/objects/execution.ts +4 -1
- package/src/objects/materializer-adapter.ts +3 -0
- package/src/objects/object/upsert-batch.ts +4 -1
- package/src/objects/object/upsert.ts +3 -1
- package/src/objects/property-clearance.ts +209 -0
- package/src/objects/query/executor.ts +43 -36
- package/src/objects/query/validate.ts +133 -14
- package/src/objects/sdk/file-handle.ts +77 -0
- package/src/objects/sdk/object-handle.ts +8 -4
- package/src/objects/sdk/object-set.ts +5 -2
- package/src/ontology/builders.ts +18 -2
- package/src/ontology/docs-markdown.ts +394 -0
- package/src/ontology/docs.ts +196 -0
- package/src/ontology/inference/index.ts +25 -0
- package/src/ontology/internal.ts +7 -0
- package/src/ontology/tokens.ts +13 -2
- package/src/ontology/types.ts +5 -0
- package/src/ontology/validation/index.ts +1 -0
- package/src/ontology/validation/schema.ts +26 -1
- package/src/runtime/create.ts +34 -4
- package/src/runtime/definitions.ts +3 -1
- package/src/runtime/host.ts +45 -1
- package/src/runtime/index.ts +3 -0
- package/src/runtime/locale.ts +26 -0
- package/src/runtime/resolve-definitions.ts +28 -1
- package/src/runtime/sixb.ts +1 -1
- package/src/runtime/types.ts +39 -3
- package/src/scheduler/runtime.ts +11 -2
- package/src/security/builders.ts +49 -5
- package/src/security/index.ts +6 -1
- package/src/security/markings.ts +313 -0
- package/src/security/redactions.ts +6 -0
- package/src/security/registry.ts +21 -1
- package/src/security/types.ts +26 -0
- package/src/security/validation.ts +59 -2
- package/src/storage/agents/provider.ts +11 -0
- package/src/storage/agents/types.ts +15 -7
- package/src/storage/index.ts +1 -0
- package/src/storage/objects/types.ts +7 -0
- package/src/workflows/builders.ts +24 -1
- package/src/workflows/request.ts +3 -0
- package/src/workflows/types.ts +6 -3
- package/src/workflows/validation.ts +32 -4
- package/dist/chunk-10styjgk.js.map +0 -20
- package/dist/chunk-52c5zb0z.js.map +0 -10
- package/dist/chunk-69266efg.js.map +0 -12
- package/dist/chunk-6wbm6ymz.js.map +0 -48
- package/dist/chunk-91kcnbf0.js.map +0 -10
- package/dist/chunk-98cw09sw.js.map +0 -10
- package/dist/chunk-9vx5e9g1.js.map +0 -11
- package/dist/chunk-cd234ba4.js.map +0 -14
- package/dist/chunk-cnb5kv05.js.map +0 -19
- package/dist/chunk-dmn70ztd.js.map +0 -11
- package/dist/chunk-gf7yht60.js.map +0 -12
- package/dist/chunk-h3v76ams.js.map +0 -11
- package/dist/chunk-pja9jfz6.js.map +0 -19
- package/dist/chunk-t9shqx3w.js.map +0 -12
- package/dist/chunk-xcy5ddha.js.map +0 -15
- package/dist/chunk-xyvy73tj.js.map +0 -12
- package/dist/chunk-z5rnrmz1.js.map +0 -11
- /package/dist/{chunk-4gmng3vf.js.map → chunk-22v5bpz3.js.map} +0 -0
- /package/dist/{chunk-2am3db31.js.map → chunk-48e3cn2d.js.map} +0 -0
- /package/dist/{chunk-f1xh7a32.js.map → chunk-7hpdd6r9.js.map} +0 -0
- /package/dist/{chunk-rb143ggb.js.map → chunk-bwjcehza.js.map} +0 -0
- /package/dist/{chunk-vp3z1ckh.js.map → chunk-de4z2bj6.js.map} +0 -0
- /package/dist/{chunk-3rrezgyc.js.map → chunk-dnmadg9k.js.map} +0 -0
- /package/dist/{chunk-a7er86jd.js.map → chunk-ex496vct.js.map} +0 -0
- /package/dist/{chunk-jnfxmr3f.js.map → chunk-f1zxad2t.js.map} +0 -0
- /package/dist/{chunk-c2rga5cx.js.map → chunk-mfs23znk.js.map} +0 -0
- /package/dist/{chunk-fggq3d9k.js.map → chunk-p0dqwj3n.js.map} +0 -0
- /package/dist/{chunk-sk0hcjsz.js.map → chunk-qkvz64nd.js.map} +0 -0
- /package/dist/{chunk-rx7h5fdx.js.map → chunk-rt9p8m9t.js.map} +0 -0
- /package/dist/{chunk-e67ynxcr.js.map → chunk-v6xpd60t.js.map} +0 -0
- /package/dist/{chunk-jjrn5v0p.js.map → chunk-vgk3hknm.js.map} +0 -0
- /package/dist/{chunk-5thzcb8g.js.map → chunk-vx2yp45y.js.map} +0 -0
- /package/dist/{chunk-k4g51s47.js.map → chunk-yv9czyfr.js.map} +0 -0
- /package/dist/{chunk-vre348sb.js.map → chunk-za5yd58j.js.map} +0 -0
- /package/dist/{chunk-23xs4qp9.js.map → chunk-zb77kjth.js.map} +0 -0
- /package/dist/{chunk-33saed7g.js.map → chunk-zxawp1n2.js.map} +0 -0
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
supportsDirectUpload2
|
|
4
|
+
} from "./chunk-jhm3zsa7.js";
|
|
5
|
+
import {
|
|
6
|
+
SecurityValidationError2
|
|
7
|
+
} from "./chunk-xt1zt7gv.js";
|
|
2
8
|
import {
|
|
3
9
|
OntologyRegistry2
|
|
4
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-bs7sqkre.js";
|
|
5
11
|
import {
|
|
6
12
|
ProjectionRegistry2,
|
|
7
13
|
createOntologyMaterializer2
|
|
8
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-p0dqwj3n.js";
|
|
9
15
|
import {
|
|
10
16
|
captureSixbFailure2,
|
|
11
17
|
isSixbError2
|
|
@@ -13,12 +19,12 @@ import {
|
|
|
13
19
|
import {
|
|
14
20
|
SecurityRegistry,
|
|
15
21
|
AuthRuntime2
|
|
16
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-6h5m9xjx.js";
|
|
17
23
|
import {
|
|
18
24
|
captureExecutionScope,
|
|
19
25
|
resolveExecutionScopeAuthorization,
|
|
20
26
|
AuthorizationError2
|
|
21
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-qkbx3tf6.js";
|
|
22
28
|
import {
|
|
23
29
|
AuthRuntimeError2,
|
|
24
30
|
isMagicLinkAuthStrategy2,
|
|
@@ -31,27 +37,27 @@ import {
|
|
|
31
37
|
RerankingModelResponseError2,
|
|
32
38
|
createModelCatalog2,
|
|
33
39
|
estimateModelCall
|
|
34
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-29yx306f.js";
|
|
35
41
|
import {
|
|
36
42
|
FileUploadSessionError2
|
|
37
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-zxawp1n2.js";
|
|
38
44
|
import {
|
|
39
45
|
isMigrationCapableStorage2,
|
|
40
46
|
checkStorageSchema2
|
|
41
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-qq90g05n.js";
|
|
42
48
|
import {
|
|
43
49
|
createAuthorizedObjectReader
|
|
44
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-fx93hd2n.js";
|
|
45
51
|
import {
|
|
46
52
|
attachSixbErrorReporter2,
|
|
47
53
|
shareSixbErrorReporter2
|
|
48
54
|
} from "./chunk-vjcd8d27.js";
|
|
49
55
|
import {
|
|
50
56
|
ActionRegistry2
|
|
51
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-tffvfy6s.js";
|
|
52
58
|
import {
|
|
53
59
|
assertDatasetDefinition2
|
|
54
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-rz53yb4v.js";
|
|
55
61
|
import {
|
|
56
62
|
OntologyOutboxDispatcher2,
|
|
57
63
|
createDomainEventService2
|
|
@@ -61,7 +67,7 @@ import {
|
|
|
61
67
|
} from "./chunk-e1c18xjx.js";
|
|
62
68
|
import {
|
|
63
69
|
createSandboxDefinition
|
|
64
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-48e3cn2d.js";
|
|
65
71
|
import {
|
|
66
72
|
ConnectorError2,
|
|
67
73
|
ConnectorNotFoundError2,
|
|
@@ -73,16 +79,20 @@ import {
|
|
|
73
79
|
isConnectorStorageError,
|
|
74
80
|
storageBoundaryError,
|
|
75
81
|
recoverConnectorFailure
|
|
76
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-f1zxad2t.js";
|
|
77
83
|
import {
|
|
78
84
|
toolsFromProjectConfig
|
|
79
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-p844e0rn.js";
|
|
80
86
|
import {
|
|
81
87
|
assertNoAgentDefinitions,
|
|
82
88
|
validateWorkflowsAtStartup2,
|
|
83
89
|
validateWorkflowAgentStepGroupReferences2,
|
|
84
|
-
createBoundSixb
|
|
85
|
-
|
|
90
|
+
createBoundSixb,
|
|
91
|
+
DEFAULT_PROJECT_LOCALE,
|
|
92
|
+
DEFAULT_PROJECT_TIME_ZONE,
|
|
93
|
+
canonicalLocale,
|
|
94
|
+
canonicalTimeZone
|
|
95
|
+
} from "./chunk-fe52eczz.js";
|
|
86
96
|
import {
|
|
87
97
|
registerConnectorConnectionCallbackProcess
|
|
88
98
|
} from "./chunk-5a4a52tq.js";
|
|
@@ -92,13 +102,16 @@ import {
|
|
|
92
102
|
} from "./chunk-85cd7e8c.js";
|
|
93
103
|
import {
|
|
94
104
|
SchedulerRuntime2
|
|
95
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-yw9pyg66.js";
|
|
96
106
|
import {
|
|
107
|
+
discoverOntologyFiles,
|
|
108
|
+
discoverAgentSkills,
|
|
109
|
+
discoverProjectInstructions,
|
|
97
110
|
validateRulesAtStartup,
|
|
98
111
|
validateSharesAtStartup,
|
|
99
|
-
|
|
112
|
+
discoverOntologySources,
|
|
100
113
|
discoverProjectDefinitions2
|
|
101
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-s4jhg8a3.js";
|
|
102
115
|
import {
|
|
103
116
|
LoggingService2
|
|
104
117
|
} from "./chunk-3qms4nax.js";
|
|
@@ -107,22 +120,22 @@ import {
|
|
|
107
120
|
createVectorIndexingRuntime,
|
|
108
121
|
registerVectorIndexingRuntime,
|
|
109
122
|
getApiPublicOrigin
|
|
110
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-de4z2bj6.js";
|
|
111
124
|
import {
|
|
112
125
|
registerProjectionRegistry2
|
|
113
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-7hpdd6r9.js";
|
|
114
127
|
import {
|
|
115
128
|
SyncValidationError2
|
|
116
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-yv9czyfr.js";
|
|
117
130
|
import {
|
|
118
131
|
ModelExecutionSession
|
|
119
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-k6hrnf35.js";
|
|
120
133
|
import {
|
|
121
134
|
isOAuthConnectorDefinition2
|
|
122
135
|
} from "./chunk-9x8dybsb.js";
|
|
123
136
|
import {
|
|
124
137
|
ensureExecutionRecord2
|
|
125
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-ex496vct.js";
|
|
126
139
|
import {
|
|
127
140
|
ConnectorConnectionStorageError2,
|
|
128
141
|
CONNECTOR_CONNECTION_RUN_FAILURE_CODES2
|
|
@@ -136,9 +149,6 @@ import {
|
|
|
136
149
|
import {
|
|
137
150
|
sameEmbeddingModel
|
|
138
151
|
} from "./chunk-kyjcwqz6.js";
|
|
139
|
-
import {
|
|
140
|
-
supportsDirectUpload2
|
|
141
|
-
} from "./chunk-h3v76ams.js";
|
|
142
152
|
import {
|
|
143
153
|
isJsonObject2
|
|
144
154
|
} from "./chunk-wy0qdqfm.js";
|
|
@@ -3177,6 +3187,22 @@ function settled(promise) {
|
|
|
3177
3187
|
});
|
|
3178
3188
|
}
|
|
3179
3189
|
|
|
3190
|
+
// src/agents/skills.ts
|
|
3191
|
+
function createAgentSkillCatalog(definitions) {
|
|
3192
|
+
const skills = Object.freeze([...definitions ?? []]);
|
|
3193
|
+
const skillsByName = new Map;
|
|
3194
|
+
for (const skill of skills) {
|
|
3195
|
+
if (skillsByName.has(skill.name)) {
|
|
3196
|
+
throw new RuntimeError2(`[Sixb] Duplicate Agent Skill name: ${skill.name}`);
|
|
3197
|
+
}
|
|
3198
|
+
skillsByName.set(skill.name, skill);
|
|
3199
|
+
}
|
|
3200
|
+
return Object.freeze({
|
|
3201
|
+
list: () => skills,
|
|
3202
|
+
getByName: (name) => skillsByName.get(name) ?? null
|
|
3203
|
+
});
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3180
3206
|
// src/agents/tool-catalog.ts
|
|
3181
3207
|
function createAgentToolCatalog(definitions) {
|
|
3182
3208
|
const tools = toolsFromProjectConfig(definitions);
|
|
@@ -3187,6 +3213,290 @@ function createAgentToolCatalog(definitions) {
|
|
|
3187
3213
|
});
|
|
3188
3214
|
}
|
|
3189
3215
|
|
|
3216
|
+
// src/ontology/docs.ts
|
|
3217
|
+
function createOntologyDocsCatalog(input) {
|
|
3218
|
+
const modules = input.docs?.modules ?? [];
|
|
3219
|
+
const scripts = Object.freeze([...input.docs?.scripts ?? []]);
|
|
3220
|
+
const claimedPaths = new Map(scripts.map((script) => [script.path.toLowerCase(), `script 'ontology/${script.path}'`]));
|
|
3221
|
+
const claim = (path, owner) => {
|
|
3222
|
+
const claimedBy = claimedPaths.get(path.toLowerCase());
|
|
3223
|
+
if (claimedBy !== undefined) {
|
|
3224
|
+
throw new RuntimeError2(`[Sixb] The ${owner} at 'ontology/${path}' collides with ${claimedBy}, which only differs ` + "by case or not at all. Rename one of them.");
|
|
3225
|
+
}
|
|
3226
|
+
claimedPaths.set(path.toLowerCase(), `the ${owner}`);
|
|
3227
|
+
};
|
|
3228
|
+
const docPathByType = new Map;
|
|
3229
|
+
const typeIdsByNotesPath = new Map;
|
|
3230
|
+
const addNotesPath = (path, objectTypeIds) => {
|
|
3231
|
+
const typeIds = typeIdsByNotesPath.get(path.toLowerCase()) ?? new Set;
|
|
3232
|
+
for (const objectTypeId of objectTypeIds)
|
|
3233
|
+
typeIds.add(objectTypeId);
|
|
3234
|
+
typeIdsByNotesPath.set(path.toLowerCase(), typeIds);
|
|
3235
|
+
};
|
|
3236
|
+
for (const objectType of input.objectTypes) {
|
|
3237
|
+
const path = docPathFor(objectType.id, modules);
|
|
3238
|
+
claim(path, `doc of object type '${objectType.id}'`);
|
|
3239
|
+
docPathByType.set(objectType.id, path);
|
|
3240
|
+
addNotesPath(path, [objectType.id]);
|
|
3241
|
+
}
|
|
3242
|
+
for (const module of modules) {
|
|
3243
|
+
if (module.objectTypeIds.length > 0) {
|
|
3244
|
+
addNotesPath(`${withoutExtension(module.path)}.md`, module.objectTypeIds);
|
|
3245
|
+
}
|
|
3246
|
+
}
|
|
3247
|
+
const notesByType = new Map;
|
|
3248
|
+
const docs = [];
|
|
3249
|
+
const docPaths = new Map;
|
|
3250
|
+
for (const doc of input.docs?.docs ?? []) {
|
|
3251
|
+
const sameName = docPaths.get(doc.path.toLowerCase());
|
|
3252
|
+
if (sameName !== undefined) {
|
|
3253
|
+
throw new RuntimeError2(`[Sixb] The ontology docs 'ontology/${sameName}' and 'ontology/${doc.path}' only differ ` + "by case. Rename one of them.");
|
|
3254
|
+
}
|
|
3255
|
+
docPaths.set(doc.path.toLowerCase(), doc.path);
|
|
3256
|
+
const objectTypeIds = typeIdsByNotesPath.get(doc.path.toLowerCase());
|
|
3257
|
+
if (objectTypeIds === undefined) {
|
|
3258
|
+
docs.push(doc);
|
|
3259
|
+
continue;
|
|
3260
|
+
}
|
|
3261
|
+
for (const objectTypeId of objectTypeIds) {
|
|
3262
|
+
notesByType.set(objectTypeId, [...notesByType.get(objectTypeId) ?? [], doc]);
|
|
3263
|
+
}
|
|
3264
|
+
}
|
|
3265
|
+
for (const notes of notesByType.values())
|
|
3266
|
+
notes.sort(byPath);
|
|
3267
|
+
Object.freeze(docs);
|
|
3268
|
+
const wildcardLinks = new Set(input.objectTypes.flatMap((objectType) => objectType.links.filter((link) => link.targetObjectTypeId === "*").map((link) => linkKey(objectType.id, link.id))));
|
|
3269
|
+
return Object.freeze({
|
|
3270
|
+
docPathFor: (objectTypeId) => {
|
|
3271
|
+
const path = docPathByType.get(objectTypeId);
|
|
3272
|
+
if (path === undefined) {
|
|
3273
|
+
throw new RuntimeError2(`[Sixb] Object type '${objectTypeId}' is not registered.`);
|
|
3274
|
+
}
|
|
3275
|
+
return path;
|
|
3276
|
+
},
|
|
3277
|
+
notesFor: (objectTypeId) => notesByType.get(objectTypeId) ?? [],
|
|
3278
|
+
listDocs: () => docs,
|
|
3279
|
+
listScripts: () => scripts,
|
|
3280
|
+
isWildcardLink: (objectTypeId, linkId) => wildcardLinks.has(linkKey(objectTypeId, linkId))
|
|
3281
|
+
});
|
|
3282
|
+
}
|
|
3283
|
+
function docPathFor(objectTypeId, modules) {
|
|
3284
|
+
const rank = (module) => {
|
|
3285
|
+
const name = basename(withoutExtension(module.path));
|
|
3286
|
+
return [
|
|
3287
|
+
kebabCase(name) === kebabCase(objectTypeId) ? 0 : 1,
|
|
3288
|
+
name === "index" ? 1 : 0,
|
|
3289
|
+
module.objectTypeIds.length
|
|
3290
|
+
];
|
|
3291
|
+
};
|
|
3292
|
+
let owner;
|
|
3293
|
+
for (const module of modules) {
|
|
3294
|
+
if (!module.objectTypeIds.includes(objectTypeId))
|
|
3295
|
+
continue;
|
|
3296
|
+
if (owner === undefined || compareRanks(rank(module), rank(owner)) < 0)
|
|
3297
|
+
owner = module;
|
|
3298
|
+
}
|
|
3299
|
+
const fileName = `${objectTypeId.replaceAll(/[^A-Za-z0-9._-]/g, "_")}.md`;
|
|
3300
|
+
if (owner === undefined)
|
|
3301
|
+
return fileName;
|
|
3302
|
+
const base = withoutExtension(owner.path);
|
|
3303
|
+
return owner.objectTypeIds.length === 1 ? `${base}.md` : `${base}/${fileName}`;
|
|
3304
|
+
}
|
|
3305
|
+
function compareRanks(left, right) {
|
|
3306
|
+
for (const [index, value] of left.entries()) {
|
|
3307
|
+
const difference = value - (right[index] ?? 0);
|
|
3308
|
+
if (difference !== 0)
|
|
3309
|
+
return difference;
|
|
3310
|
+
}
|
|
3311
|
+
return 0;
|
|
3312
|
+
}
|
|
3313
|
+
function kebabCase(name) {
|
|
3314
|
+
return name.replaceAll(/([a-z0-9])([A-Z])/g, "$1-$2").replaceAll(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replaceAll(/[\s_]+/g, "-").toLowerCase();
|
|
3315
|
+
}
|
|
3316
|
+
function withoutExtension(path) {
|
|
3317
|
+
return path.replace(/\.[^./]+$/, "");
|
|
3318
|
+
}
|
|
3319
|
+
function basename(path) {
|
|
3320
|
+
return path.slice(path.lastIndexOf("/") + 1);
|
|
3321
|
+
}
|
|
3322
|
+
function linkKey(objectTypeId, linkId) {
|
|
3323
|
+
return JSON.stringify([objectTypeId, linkId]);
|
|
3324
|
+
}
|
|
3325
|
+
function byPath(left, right) {
|
|
3326
|
+
return left.path < right.path ? -1 : left.path > right.path ? 1 : 0;
|
|
3327
|
+
}
|
|
3328
|
+
|
|
3329
|
+
// src/security/markings.ts
|
|
3330
|
+
function validateMarkingsAtStartup(input) {
|
|
3331
|
+
validatePropertyMarkings(input.ontology, input.markingIds);
|
|
3332
|
+
validateColumnMarkings(input.datasetsById, input.markingIds);
|
|
3333
|
+
rejectPipelineStepsOverMarkedColumns(input.pipelines, input.datasetsById);
|
|
3334
|
+
validateProjectionMarkings(input.projections, input.ontology, input.datasetsById);
|
|
3335
|
+
}
|
|
3336
|
+
function validatePropertyMarkings(ontology, markingIds) {
|
|
3337
|
+
for (const objectType of ontology.listObjectTypes()) {
|
|
3338
|
+
for (const property of objectType.properties) {
|
|
3339
|
+
validateProperty(objectType, property, markingIds);
|
|
3340
|
+
}
|
|
3341
|
+
for (const link of objectType.links) {
|
|
3342
|
+
for (const property of link.properties ?? []) {
|
|
3343
|
+
if (property.markings !== undefined) {
|
|
3344
|
+
throw new SecurityValidationError2(`[Sixb] Link property '${objectType.id}.${link.id}.${property.id}' cannot carry markings. Mark object properties instead.`);
|
|
3345
|
+
}
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3348
|
+
assertSubtypeKeepsParentMarkings(objectType, ontology);
|
|
3349
|
+
}
|
|
3350
|
+
}
|
|
3351
|
+
function validateProperty(objectType, property, markingIds) {
|
|
3352
|
+
if (property.markings === undefined)
|
|
3353
|
+
return;
|
|
3354
|
+
const path = `${objectType.id}.${property.id}`;
|
|
3355
|
+
assertMarkingList(property.markings, `Property '${path}'`, markingIds);
|
|
3356
|
+
if (property.primary) {
|
|
3357
|
+
throw new SecurityValidationError2(`[Sixb] Primary property '${path}' cannot carry markings: it identifies the object.`);
|
|
3358
|
+
}
|
|
3359
|
+
if (property.mode === "telemetry") {
|
|
3360
|
+
throw new SecurityValidationError2(`[Sixb] Telemetry property '${path}' cannot carry markings yet.`);
|
|
3361
|
+
}
|
|
3362
|
+
}
|
|
3363
|
+
function assertSubtypeKeepsParentMarkings(objectType, ontology) {
|
|
3364
|
+
if (!objectType.extends)
|
|
3365
|
+
return;
|
|
3366
|
+
const parent = ontology.getObjectTypeById(objectType.extends);
|
|
3367
|
+
if (!parent)
|
|
3368
|
+
return;
|
|
3369
|
+
for (const parentProperty of parent.properties) {
|
|
3370
|
+
const property = objectType.properties.find((candidate) => candidate.id === parentProperty.id);
|
|
3371
|
+
const missing = missingMarkings(parentProperty.markings, property?.markings);
|
|
3372
|
+
if (missing.length > 0) {
|
|
3373
|
+
throw new SecurityValidationError2(`[Sixb] Property '${objectType.id}.${parentProperty.id}' must keep the markings of '${parent.id}.${parentProperty.id}': add ${missing.map((markingId) => `'${markingId}'`).join(", ")}.`);
|
|
3374
|
+
}
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
function validateColumnMarkings(datasetsById, markingIds) {
|
|
3378
|
+
for (const dataset of datasetsById.values()) {
|
|
3379
|
+
for (const column of dataset.schema.columns) {
|
|
3380
|
+
if (column.markings === undefined)
|
|
3381
|
+
continue;
|
|
3382
|
+
assertMarkingList(column.markings, `Dataset column '${dataset.id}.${column.name}'`, markingIds);
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
}
|
|
3386
|
+
function assertMarkingList(markings, subject, markingIds) {
|
|
3387
|
+
if (!Array.isArray(markings) || markings.length === 0) {
|
|
3388
|
+
throw new SecurityValidationError2(`[Sixb] ${subject} markings must be a non-empty list of marking ids.`);
|
|
3389
|
+
}
|
|
3390
|
+
if (new Set(markings).size !== markings.length) {
|
|
3391
|
+
throw new SecurityValidationError2(`[Sixb] ${subject} lists the same marking twice.`);
|
|
3392
|
+
}
|
|
3393
|
+
for (const markingId of markings) {
|
|
3394
|
+
if (typeof markingId !== "string" || !markingIds.has(markingId)) {
|
|
3395
|
+
throw new SecurityValidationError2(`[Sixb] ${subject} references unknown marking '${String(markingId)}'. Add it to 'security/markings/' or pass it to createSixb({ markings }).`);
|
|
3396
|
+
}
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
function rejectPipelineStepsOverMarkedColumns(pipelines, datasetsById) {
|
|
3400
|
+
for (const pipeline of pipelines) {
|
|
3401
|
+
for (const { step } of pipeline.graph.nodes) {
|
|
3402
|
+
for (const input of Object.values(step.inputs)) {
|
|
3403
|
+
const dataset = datasetsById.get(input.id);
|
|
3404
|
+
const column = dataset?.schema.columns.find((candidate) => candidate.markings);
|
|
3405
|
+
if (!dataset || !column)
|
|
3406
|
+
continue;
|
|
3407
|
+
throw new SecurityValidationError2(`[Sixb] Pipeline '${pipeline.id}' step '${step.id}' reads column '${dataset.id}.${column.name}', which carries ${markingList(column.markings)}. Pipeline steps cannot read marked columns yet.`);
|
|
3408
|
+
}
|
|
3409
|
+
}
|
|
3410
|
+
}
|
|
3411
|
+
}
|
|
3412
|
+
function validateProjectionMarkings(projections, ontology, datasetsById) {
|
|
3413
|
+
for (const projection of projections.listObjects()) {
|
|
3414
|
+
const objectType = ontology.getObjectTypeById(projection.objectTypeId);
|
|
3415
|
+
if (objectType)
|
|
3416
|
+
validateObjectProjection(projection, objectType, datasetsById);
|
|
3417
|
+
}
|
|
3418
|
+
for (const projection of projections.listLinks()) {
|
|
3419
|
+
const role = `keys link '${projection.sourceObjectTypeId}.${projection.linkId}'`;
|
|
3420
|
+
for (const columnName of [projection.sourceField, projection.targetField]) {
|
|
3421
|
+
assertUnmarkedColumn(projection, sourceColumn(projection, columnName, datasetsById), role);
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3424
|
+
for (const projection of projections.listTelemetry()) {
|
|
3425
|
+
const columnNames = [
|
|
3426
|
+
projection.objectIdField,
|
|
3427
|
+
projection.atField,
|
|
3428
|
+
...Object.values(projection.properties).flatMap((mapping) => mapping.unitField === undefined ? [mapping.valueField] : [mapping.valueField, mapping.unitField])
|
|
3429
|
+
];
|
|
3430
|
+
for (const columnName of columnNames) {
|
|
3431
|
+
const column = sourceColumn(projection, columnName, datasetsById);
|
|
3432
|
+
if (!column.markings)
|
|
3433
|
+
continue;
|
|
3434
|
+
throw new SecurityValidationError2(`[Sixb] Projection '${projection.id}' reads column '${column.path}', which carries ${markingList(column.markings)}. Telemetry projections cannot read marked columns yet.`);
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
3438
|
+
function validateObjectProjection(projection, objectType, datasetsById) {
|
|
3439
|
+
const keyRoles = objectProjectionKeyRoles(projection, objectType);
|
|
3440
|
+
for (const [propertyId, columnName] of Object.entries(projection.properties)) {
|
|
3441
|
+
const column = sourceColumn(projection, columnName, datasetsById);
|
|
3442
|
+
const property = objectType.properties.find((candidate) => candidate.id === propertyId);
|
|
3443
|
+
const path = `${objectType.id}.${propertyId}`;
|
|
3444
|
+
const keyRole = keyRoles.get(propertyId);
|
|
3445
|
+
if (keyRole) {
|
|
3446
|
+
assertUnmarkedColumn(projection, column, keyRole);
|
|
3447
|
+
if (property?.markings) {
|
|
3448
|
+
throw new SecurityValidationError2(`[Sixb] Projection '${projection.id}': property '${path}' ${keyRole} and cannot carry markings.`);
|
|
3449
|
+
}
|
|
3450
|
+
continue;
|
|
3451
|
+
}
|
|
3452
|
+
const missing = missingMarkings(column.markings, property?.markings);
|
|
3453
|
+
if (missing.length > 0) {
|
|
3454
|
+
throw new SecurityValidationError2(`[Sixb] Projection '${projection.id}': property '${path}' is projected from column '${column.path}', which carries ${markingList(column.markings)}. Add markings: ${markingList(missing)} to the property.`);
|
|
3455
|
+
}
|
|
3456
|
+
}
|
|
3457
|
+
for (const [linkId, link] of Object.entries(projection.links)) {
|
|
3458
|
+
if (link.sourceField === undefined)
|
|
3459
|
+
continue;
|
|
3460
|
+
assertUnmarkedColumn(projection, sourceColumn(projection, link.sourceField, datasetsById), `keys link '${objectType.id}.${linkId}'`);
|
|
3461
|
+
}
|
|
3462
|
+
const conflictResolution = projection.conflictResolution;
|
|
3463
|
+
if (conflictResolution?.strategy === "mostRecent") {
|
|
3464
|
+
assertUnmarkedColumn(projection, sourceColumn(projection, conflictResolution.sourceTimestamp, datasetsById), "decides which value wins under 'mostRecent'");
|
|
3465
|
+
}
|
|
3466
|
+
}
|
|
3467
|
+
function objectProjectionKeyRoles(projection, objectType) {
|
|
3468
|
+
const roles = new Map;
|
|
3469
|
+
for (const property of objectType.properties) {
|
|
3470
|
+
if (property.primary)
|
|
3471
|
+
roles.set(property.id, `becomes the id of '${objectType.id}'`);
|
|
3472
|
+
}
|
|
3473
|
+
for (const [linkId, link] of Object.entries(projection.links)) {
|
|
3474
|
+
if (link.sourcePropertyId === undefined)
|
|
3475
|
+
continue;
|
|
3476
|
+
roles.set(link.sourcePropertyId, `keys link '${objectType.id}.${linkId}'`);
|
|
3477
|
+
}
|
|
3478
|
+
return roles;
|
|
3479
|
+
}
|
|
3480
|
+
function sourceColumn(projection, columnName, datasetsById) {
|
|
3481
|
+
const column = datasetsById.get(projection.datasetId)?.schema.columns.find((candidate) => candidate.name === columnName);
|
|
3482
|
+
if (!column) {
|
|
3483
|
+
throw new Error(`[Sixb] Projection '${projection.id}' maps unknown column '${columnName}'.`);
|
|
3484
|
+
}
|
|
3485
|
+
return { path: `${projection.datasetId}.${columnName}`, markings: column.markings };
|
|
3486
|
+
}
|
|
3487
|
+
function assertUnmarkedColumn(projection, column, role) {
|
|
3488
|
+
if (!column.markings)
|
|
3489
|
+
return;
|
|
3490
|
+
throw new SecurityValidationError2(`[Sixb] Projection '${projection.id}': column '${column.path}' ${role} and cannot carry markings.`);
|
|
3491
|
+
}
|
|
3492
|
+
function missingMarkings(required, declared) {
|
|
3493
|
+
const present = new Set(declared ?? []);
|
|
3494
|
+
return (required ?? []).filter((markingId) => !present.has(markingId));
|
|
3495
|
+
}
|
|
3496
|
+
function markingList(markings) {
|
|
3497
|
+
return `[${(markings ?? []).join(", ")}]`;
|
|
3498
|
+
}
|
|
3499
|
+
|
|
3190
3500
|
// src/syncs/validation.ts
|
|
3191
3501
|
function validateKeyedDatasetWriterTopology(input) {
|
|
3192
3502
|
for (const sync of input.syncs) {
|
|
@@ -3263,6 +3573,11 @@ function resolveDefinitions(options) {
|
|
|
3263
3573
|
}
|
|
3264
3574
|
}
|
|
3265
3575
|
const tools = createAgentToolCatalog(options.tools);
|
|
3576
|
+
const skills = createAgentSkillCatalog(options.agent?.skills);
|
|
3577
|
+
const ontologyDocs = createOntologyDocsCatalog({
|
|
3578
|
+
objectTypes: ontology.listObjectTypes(),
|
|
3579
|
+
...options.agent?.ontologyDocs === undefined ? {} : { docs: options.agent.ontologyDocs }
|
|
3580
|
+
});
|
|
3266
3581
|
const connectorsById = indexUniqueDefinitions("connector", options.connectors ?? []);
|
|
3267
3582
|
const datasetsById = new Map;
|
|
3268
3583
|
for (const dataset of options.datasets ?? []) {
|
|
@@ -3310,10 +3625,12 @@ function resolveDefinitions(options) {
|
|
|
3310
3625
|
registeredSchedules: schedulesById,
|
|
3311
3626
|
registeredActionIds,
|
|
3312
3627
|
...models === undefined ? {} : { models },
|
|
3313
|
-
tools
|
|
3628
|
+
tools,
|
|
3629
|
+
skills
|
|
3314
3630
|
});
|
|
3315
3631
|
const workflowsById = indexUniqueDefinitions("workflow", workflows);
|
|
3316
3632
|
const security = new SecurityRegistry({
|
|
3633
|
+
markings: options.markings ?? [],
|
|
3317
3634
|
groups: options.groups ?? [],
|
|
3318
3635
|
roles: options.roles ?? [],
|
|
3319
3636
|
membershipPolicies: options.membershipPolicies ?? [],
|
|
@@ -3338,10 +3655,22 @@ function resolveDefinitions(options) {
|
|
|
3338
3655
|
syncs,
|
|
3339
3656
|
telemetryProjections: projectionRegistry.listTelemetry()
|
|
3340
3657
|
});
|
|
3658
|
+
validateMarkingsAtStartup({
|
|
3659
|
+
markingIds: new Set(security.listMarkings().map((marking) => marking.id)),
|
|
3660
|
+
ontology,
|
|
3661
|
+
datasetsById,
|
|
3662
|
+
pipelines,
|
|
3663
|
+
projections: projectionRegistry
|
|
3664
|
+
});
|
|
3341
3665
|
return Object.freeze({
|
|
3342
3666
|
ontology,
|
|
3343
3667
|
actions: actionRegistry,
|
|
3344
3668
|
tools,
|
|
3669
|
+
agent: Object.freeze({
|
|
3670
|
+
skills,
|
|
3671
|
+
...options.agent?.instructions === undefined ? {} : { instructions: options.agent.instructions },
|
|
3672
|
+
ontologyDocs
|
|
3673
|
+
}),
|
|
3345
3674
|
connectors: createDefinitionCatalog(connectorsById),
|
|
3346
3675
|
datasets: createDefinitionCatalog(datasetsById),
|
|
3347
3676
|
...models === undefined ? {} : { models },
|
|
@@ -3461,6 +3790,8 @@ function positiveInteger2(value, name) {
|
|
|
3461
3790
|
// src/runtime/host.ts
|
|
3462
3791
|
class SixbHost2 {
|
|
3463
3792
|
projectId;
|
|
3793
|
+
locale;
|
|
3794
|
+
timeZone;
|
|
3464
3795
|
webhookRegistry;
|
|
3465
3796
|
hostContext;
|
|
3466
3797
|
committedFacts;
|
|
@@ -3486,6 +3817,8 @@ class SixbHost2 {
|
|
|
3486
3817
|
constructor(options) {
|
|
3487
3818
|
const errorReporter = attachSixbErrorReporter2(this, options.onError);
|
|
3488
3819
|
this.projectId = options.id ?? "default";
|
|
3820
|
+
this.locale = resolveProjectLocale(options.locale);
|
|
3821
|
+
this.timeZone = resolveProjectTimeZone(options.timeZone);
|
|
3489
3822
|
this.broker = options.broker;
|
|
3490
3823
|
this.eventService = createDomainEventService2({
|
|
3491
3824
|
projectId: this.projectId,
|
|
@@ -3572,7 +3905,8 @@ class SixbHost2 {
|
|
|
3572
3905
|
registerVectorIndexingRuntime(this, createVectorIndexingRuntime(this.hostContext, this.materializer));
|
|
3573
3906
|
this.scheduler = new SchedulerRuntime2({
|
|
3574
3907
|
schedules: definitions.schedules.list(),
|
|
3575
|
-
events: this.eventService
|
|
3908
|
+
events: this.eventService,
|
|
3909
|
+
timeZone: this.timeZone
|
|
3576
3910
|
});
|
|
3577
3911
|
}
|
|
3578
3912
|
withScope(scope) {
|
|
@@ -3659,6 +3993,24 @@ class SixbHost2 {
|
|
|
3659
3993
|
};
|
|
3660
3994
|
}
|
|
3661
3995
|
}
|
|
3996
|
+
function resolveProjectLocale(locale) {
|
|
3997
|
+
if (locale === undefined)
|
|
3998
|
+
return DEFAULT_PROJECT_LOCALE;
|
|
3999
|
+
const canonical = canonicalLocale(locale);
|
|
4000
|
+
if (canonical === undefined) {
|
|
4001
|
+
throw new RuntimeError2(`[Sixb] 'locale' must be a BCP 47 language tag such as "fr-FR"; received ${JSON.stringify(locale)}.`);
|
|
4002
|
+
}
|
|
4003
|
+
return canonical;
|
|
4004
|
+
}
|
|
4005
|
+
function resolveProjectTimeZone(timeZone) {
|
|
4006
|
+
if (timeZone === undefined)
|
|
4007
|
+
return DEFAULT_PROJECT_TIME_ZONE;
|
|
4008
|
+
const canonical = canonicalTimeZone(timeZone);
|
|
4009
|
+
if (canonical === undefined) {
|
|
4010
|
+
throw new RuntimeError2(`[Sixb] 'timeZone' must be an IANA time zone such as "Europe/Paris"; received ${JSON.stringify(timeZone)}.`);
|
|
4011
|
+
}
|
|
4012
|
+
return canonical;
|
|
4013
|
+
}
|
|
3662
4014
|
function validateAuthStrategySecurityReferences(strategy, security) {
|
|
3663
4015
|
if (!isMagicLinkAuthStrategy2(strategy) && !isOidcAuthStrategy2(strategy)) {
|
|
3664
4016
|
return;
|
|
@@ -3685,14 +4037,19 @@ function assertWebhookRunStorage(connectors, storage) {
|
|
|
3685
4037
|
async function createSixb2(options) {
|
|
3686
4038
|
assertNoAgentDefinitions(options);
|
|
3687
4039
|
const projectRoot = resolve2(options.projectRoot ?? process.cwd());
|
|
3688
|
-
const discoveredOntology = await
|
|
3689
|
-
const allSources = [...options.ontologies ?? [], ...discoveredOntology];
|
|
4040
|
+
const discoveredOntology = await discoverOntologySources(projectRoot);
|
|
4041
|
+
const allSources = [...options.ontologies ?? [], ...discoveredOntology.sources];
|
|
3690
4042
|
if (allSources.length === 0) {
|
|
3691
4043
|
throw new RuntimeError2("No ontology found. Create an 'ontology/' folder or pass 'ontologies' to createSixb().");
|
|
3692
4044
|
}
|
|
3693
4045
|
const definitions = await discoverProjectDefinitions2(projectRoot);
|
|
4046
|
+
const skills = await discoverAgentSkills(projectRoot);
|
|
4047
|
+
const instructions = await discoverProjectInstructions(projectRoot);
|
|
4048
|
+
const ontologyFiles = await discoverOntologyFiles(projectRoot);
|
|
3694
4049
|
return new SixbHost2({
|
|
3695
4050
|
id: options.id,
|
|
4051
|
+
locale: options.locale,
|
|
4052
|
+
timeZone: options.timeZone,
|
|
3696
4053
|
ontology: allSources,
|
|
3697
4054
|
broker: options.broker,
|
|
3698
4055
|
storage: options.storage,
|
|
@@ -3715,15 +4072,21 @@ async function createSixb2(options) {
|
|
|
3715
4072
|
projections: [...options.projections ?? [], ...definitions.projections],
|
|
3716
4073
|
rules: [...options.rules ?? [], ...definitions.rules],
|
|
3717
4074
|
workflows: [...options.workflows ?? [], ...definitions.workflows],
|
|
4075
|
+
markings: [...options.markings ?? [], ...definitions.markings],
|
|
3718
4076
|
groups: [...options.groups ?? [], ...definitions.groups],
|
|
3719
4077
|
roles: [...options.roles ?? [], ...definitions.roles],
|
|
3720
4078
|
membershipPolicies: [...options.membershipPolicies ?? [], ...definitions.membershipPolicies],
|
|
3721
4079
|
models: options.models,
|
|
3722
4080
|
tools: options.tools,
|
|
4081
|
+
agent: {
|
|
4082
|
+
skills,
|
|
4083
|
+
...instructions === undefined ? {} : { instructions },
|
|
4084
|
+
ontologyDocs: { modules: discoveredOntology.modules, ...ontologyFiles }
|
|
4085
|
+
},
|
|
3723
4086
|
shares: [...options.shares ?? [], ...definitions.shares],
|
|
3724
4087
|
auth: options.auth
|
|
3725
4088
|
});
|
|
3726
4089
|
}
|
|
3727
4090
|
export { WebhookValidationError2, defineWebhook2, webhookConnector2, UnverifiedWebhookError2, resolveWebhookVerification2, warnUnverifiedWebhook2, SixbHost2, createSixb2 };
|
|
3728
4091
|
|
|
3729
|
-
//# debugId=
|
|
4092
|
+
//# debugId=F00D1642A2671DB564756E2164756E21
|