@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
|
@@ -38,11 +38,16 @@ class AgentRequestError2 extends Error {
|
|
|
38
38
|
var MAX_AGENT_CONTEXT_ENTRIES2 = 12;
|
|
39
39
|
var MAX_AGENT_APP_STATE_ENTRY_BYTES2 = 16 * 1024;
|
|
40
40
|
var MAX_AGENT_APP_STATE_TOTAL_BYTES2 = 64 * 1024;
|
|
41
|
+
var MAX_AGENT_CONTEXT_LABEL_LENGTH2 = 200;
|
|
41
42
|
var agentContext2 = {
|
|
42
|
-
object(objectType, primaryId) {
|
|
43
|
+
object(objectType, primaryId, options = {}) {
|
|
44
|
+
const label = options.label === undefined ? undefined : objectContextLabel(options.label, "agentContext.object() label", (message) => {
|
|
45
|
+
throw new TypeError(`[Sixb] ${message}.`);
|
|
46
|
+
});
|
|
43
47
|
return {
|
|
44
48
|
kind: "object",
|
|
45
|
-
ref: { objectTypeId: objectType.id, primaryId }
|
|
49
|
+
ref: { objectTypeId: objectType.id, primaryId },
|
|
50
|
+
...label === undefined ? {} : { label }
|
|
46
51
|
};
|
|
47
52
|
},
|
|
48
53
|
appState(id, input) {
|
|
@@ -69,7 +74,7 @@ function normalizeAgentContextEntries2(input) {
|
|
|
69
74
|
for (const [index, rawEntry] of input.entries()) {
|
|
70
75
|
const entry = normalizeEntry(rawEntry, index);
|
|
71
76
|
const identity = agentContextIdentity2(entry.context);
|
|
72
|
-
const serialized = stableJsonStringify2(entry);
|
|
77
|
+
const serialized = stableJsonStringify2(entry.context.kind === "object" ? { ...entry, context: { kind: "object", ref: entry.context.ref } } : entry);
|
|
73
78
|
const existing = byIdentity.get(identity);
|
|
74
79
|
if (existing !== undefined) {
|
|
75
80
|
if (existing === serialized)
|
|
@@ -105,8 +110,13 @@ function normalizeEntry(rawEntry, index) {
|
|
|
105
110
|
invalidContext(`context[${index}].context.ref must be an object`);
|
|
106
111
|
const objectTypeId = requireNonEmptyString(context.ref.objectTypeId, `context[${index}].context.ref.objectTypeId`);
|
|
107
112
|
const primaryId = requireNonEmptyString(context.ref.primaryId, `context[${index}].context.ref.primaryId`);
|
|
113
|
+
const label = context.label === undefined ? undefined : objectContextLabel(context.label, `context[${index}].context.label`, invalidContext);
|
|
108
114
|
return {
|
|
109
|
-
context: {
|
|
115
|
+
context: {
|
|
116
|
+
kind: "object",
|
|
117
|
+
ref: { objectTypeId, primaryId },
|
|
118
|
+
...label === undefined ? {} : { label }
|
|
119
|
+
},
|
|
110
120
|
origin: rawEntry.origin
|
|
111
121
|
};
|
|
112
122
|
}
|
|
@@ -131,6 +141,15 @@ function normalizeEntry(rawEntry, index) {
|
|
|
131
141
|
}
|
|
132
142
|
invalidContext(`context[${index}].context.kind must be 'object' or 'app-state'`);
|
|
133
143
|
}
|
|
144
|
+
function objectContextLabel(value, label, fail) {
|
|
145
|
+
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
146
|
+
if (!trimmed)
|
|
147
|
+
fail(`${label} must be a non-empty string`);
|
|
148
|
+
if (trimmed.length > MAX_AGENT_CONTEXT_LABEL_LENGTH2) {
|
|
149
|
+
fail(`${label} must be at most ${MAX_AGENT_CONTEXT_LABEL_LENGTH2} characters`);
|
|
150
|
+
}
|
|
151
|
+
return trimmed;
|
|
152
|
+
}
|
|
134
153
|
function requireNonEmptyString(value, label) {
|
|
135
154
|
if (typeof value !== "string" || value.trim().length === 0) {
|
|
136
155
|
invalidContext(`${label} must be a non-empty string`);
|
|
@@ -147,6 +166,6 @@ function invalidContext(message) {
|
|
|
147
166
|
throw new AgentRequestError2("invalid_context", `[Sixb] Invalid agent context: ${message}.`);
|
|
148
167
|
}
|
|
149
168
|
|
|
150
|
-
export { AgentDefinitionError2, AgentToolPublicError2, AgentToolResultValidationError2, AgentRequestError2, MAX_AGENT_CONTEXT_ENTRIES2, MAX_AGENT_APP_STATE_ENTRY_BYTES2, MAX_AGENT_APP_STATE_TOTAL_BYTES2, agentContext2, agentContextIdentity2, agentContextFingerprint2, normalizeAgentContextEntries2 };
|
|
169
|
+
export { AgentDefinitionError2, AgentToolPublicError2, AgentToolResultValidationError2, AgentRequestError2, MAX_AGENT_CONTEXT_ENTRIES2, MAX_AGENT_APP_STATE_ENTRY_BYTES2, MAX_AGENT_APP_STATE_TOTAL_BYTES2, MAX_AGENT_CONTEXT_LABEL_LENGTH2, agentContext2, agentContextIdentity2, agentContextFingerprint2, normalizeAgentContextEntries2 };
|
|
151
170
|
|
|
152
|
-
//# debugId=
|
|
171
|
+
//# debugId=D2B517DE0E9AFCDE64756E2164756E21
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/agents/errors.ts", "../src/agents/context/entries.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Base error for the agents module. Specific subclasses extend this so callers\n * can catch any agent-scoped failure with a single `instanceof AgentDefinitionError` check.\n */\nexport class AgentDefinitionError extends Error {\n readonly name: string = \"AgentDefinitionError\"\n}\n\n/**\n * An agent-tool failure whose message is intentionally safe to expose to the model and persist in\n * the durable trace. Tool authors must keep the message free of credentials and internal details;\n * unknown errors remain masked by the worker.\n */\nexport class AgentToolPublicError extends Error {\n readonly name: string = \"AgentToolPublicError\"\n}\n\n/** Raised when an agent tool result cannot cross the durable message boundary. */\nexport class AgentToolResultValidationError extends Error {\n readonly name = \"AgentToolResultValidationError\"\n\n constructor(\n readonly toolName: string,\n readonly reason: string,\n options?: ErrorOptions\n ) {\n super(`[Sixb] Agent tool '${toolName}' returned an invalid result; ${reason}.`, options)\n }\n}\n\nexport type AgentRequestErrorCode =\n | \"agent_selector_removed\"\n | \"agent_not_found\"\n | \"model_not_found\"\n | \"invalid_model_selection\"\n | \"invalid_locale\"\n | \"invalid_message\"\n | \"run_not_found\"\n | \"run_not_retryable\"\n | \"thread_not_found\"\n | \"active_run_exists\"\n | \"authority_not_inheritable\"\n | \"invalid_context\"\n | \"invalid_attachment\"\n | \"storage_unavailable\"\n | \"sandbox_not_configured\"\n | \"invalid_sandbox_params\"\n | \"sandbox_execution_unavailable\"\n\n/**\n * Raised by {@link requestAgentRun} (the trigger). Callers branch on `code` rather than message text\n * — e.g. the HTTP layer maps `active_run_exists` to 409 and `agent_not_found` to 404.\n */\nexport class AgentRequestError extends Error {\n readonly name = \"AgentRequestError\"\n\n constructor(\n readonly code: AgentRequestErrorCode,\n message: string\n ) {\n super(message)\n }\n}\n",
|
|
6
|
+
"import type { JsonValue } from \"../../json\"\nimport { cloneJsonValue, getInvalidJsonValueReason, stableJsonStringify } from \"../../json\"\nimport type { ObjectRef } from \"../../ontology/refs\"\nimport { AgentRequestError } from \"../errors\"\n\nexport type AgentContextInput =\n | {\n readonly kind: \"object\"\n readonly ref: ObjectRef\n /**\n * What the chat shows for this object instead of its title. Display only: it is not part of\n * the context's identity and is never sent to the model.\n */\n readonly label?: string\n }\n | {\n readonly kind: \"app-state\"\n readonly id: string\n readonly label: string\n readonly description: string\n readonly value: JsonValue\n }\n\nexport type AgentContextOrigin = \"ambient\" | \"explicit\"\n\nexport interface AgentContextEntryInput {\n readonly context: AgentContextInput\n readonly origin: AgentContextOrigin\n}\n\n/** Durable user-message part. Origin is display provenance, never an authorization grant. */\nexport interface AgentContextPart extends AgentContextEntryInput {\n readonly type: \"context\"\n}\n\nexport const MAX_AGENT_CONTEXT_ENTRIES = 12\nexport const MAX_AGENT_APP_STATE_ENTRY_BYTES = 16 * 1024\nexport const MAX_AGENT_APP_STATE_TOTAL_BYTES = 64 * 1024\nexport const MAX_AGENT_CONTEXT_LABEL_LENGTH = 200\n\n/** Typed constructors for context values shared by custom apps and agent clients. */\nexport const agentContext = {\n object<const TObjectTypeId extends string>(\n objectType: { readonly id: TObjectTypeId },\n primaryId: string,\n options: { readonly label?: string } = {}\n ) {\n const label =\n options.label === undefined\n ? undefined\n : objectContextLabel(options.label, \"agentContext.object() label\", (message) => {\n throw new TypeError(`[Sixb] ${message}.`)\n })\n return {\n kind: \"object\" as const,\n ref: { objectTypeId: objectType.id, primaryId },\n ...(label === undefined ? {} : { label }),\n }\n },\n\n appState<const TValue extends JsonValue>(\n id: string,\n input: {\n readonly label: string\n readonly description: string\n readonly value: TValue\n }\n ) {\n return { kind: \"app-state\" as const, id, ...input }\n },\n}\n\n/** Stable identity shared by core deduplication and context-aware clients. */\nexport function agentContextIdentity(context: AgentContextInput): string {\n return context.kind === \"object\"\n ? `object:${encodeURIComponent(context.ref.objectTypeId)}:${encodeURIComponent(context.ref.primaryId)}`\n : `app-state:${encodeURIComponent(context.id)}`\n}\n\n/** Stable semantic key for client-side comparisons. */\nexport function agentContextFingerprint(context: AgentContextInput): string {\n return stableJsonStringify(context)\n}\n\n/**\n * Validate transport-independent context rules and clone mutable app state before it can become\n * durable. Object existence and visibility are resolved separately because they require a runtime.\n */\nexport function normalizeAgentContextEntries(\n input: readonly AgentContextEntryInput[] | undefined\n): readonly AgentContextEntryInput[] {\n if (input === undefined) return []\n if (!Array.isArray(input)) invalidContext(\"context must be an array\")\n if (input.length > MAX_AGENT_CONTEXT_ENTRIES) {\n invalidContext(`context cannot contain more than ${MAX_AGENT_CONTEXT_ENTRIES} entries`)\n }\n\n const entries: AgentContextEntryInput[] = []\n const byIdentity = new Map<string, string>()\n let totalAppStateBytes = 0\n\n for (const [index, rawEntry] of input.entries()) {\n const entry = normalizeEntry(rawEntry, index)\n const identity = agentContextIdentity(entry.context)\n // A label is display only, so two entries that differ only by label are the same entry; the\n // first one's label is kept.\n const serialized = stableJsonStringify(\n entry.context.kind === \"object\"\n ? { ...entry, context: { kind: \"object\", ref: entry.context.ref } }\n : entry\n )\n const existing = byIdentity.get(identity)\n\n if (existing !== undefined) {\n if (existing === serialized) continue\n invalidContext(`context contains conflicting entries for '${identity}'`)\n }\n\n if (entry.context.kind === \"app-state\") {\n const bytes = utf8ByteLength(serialized)\n if (bytes > MAX_AGENT_APP_STATE_ENTRY_BYTES) {\n invalidContext(\n `context entry '${identity}' exceeds the ${MAX_AGENT_APP_STATE_ENTRY_BYTES}-byte limit`\n )\n }\n totalAppStateBytes += bytes\n if (totalAppStateBytes > MAX_AGENT_APP_STATE_TOTAL_BYTES) {\n invalidContext(\n `app-state context exceeds the ${MAX_AGENT_APP_STATE_TOTAL_BYTES}-byte message limit`\n )\n }\n }\n\n byIdentity.set(identity, serialized)\n entries.push(entry)\n }\n\n return entries\n}\n\nfunction normalizeEntry(rawEntry: unknown, index: number): AgentContextEntryInput {\n if (!isRecord(rawEntry)) invalidContext(`context[${index}] must be an object`)\n if (rawEntry.origin !== \"ambient\" && rawEntry.origin !== \"explicit\") {\n invalidContext(`context[${index}].origin must be 'ambient' or 'explicit'`)\n }\n if (!isRecord(rawEntry.context)) invalidContext(`context[${index}].context must be an object`)\n\n const context = rawEntry.context\n if (context.kind === \"object\") {\n if (!isRecord(context.ref)) invalidContext(`context[${index}].context.ref must be an object`)\n const objectTypeId = requireNonEmptyString(\n context.ref.objectTypeId,\n `context[${index}].context.ref.objectTypeId`\n )\n const primaryId = requireNonEmptyString(\n context.ref.primaryId,\n `context[${index}].context.ref.primaryId`\n )\n const label =\n context.label === undefined\n ? undefined\n : objectContextLabel(context.label, `context[${index}].context.label`, invalidContext)\n return {\n context: {\n kind: \"object\",\n ref: { objectTypeId, primaryId },\n ...(label === undefined ? {} : { label }),\n },\n origin: rawEntry.origin,\n }\n }\n\n if (context.kind === \"app-state\") {\n const id = requireNonEmptyString(context.id, `context[${index}].context.id`)\n const label = requireNonEmptyString(context.label, `context[${index}].context.label`)\n const description = requireNonEmptyString(\n context.description,\n `context[${index}].context.description`\n )\n const reason = getInvalidJsonValueReason(context.value, `context[${index}].context.value`)\n if (reason) {\n invalidContext(`context[${index}].context.value must be a JSON value; ${reason}`)\n }\n return {\n context: {\n kind: \"app-state\",\n id,\n label,\n description,\n value: cloneJsonValue(context.value as JsonValue),\n },\n origin: rawEntry.origin,\n }\n }\n\n invalidContext(`context[${index}].context.kind must be 'object' or 'app-state'`)\n}\n\nfunction objectContextLabel(\n value: unknown,\n label: string,\n fail: (message: string) => never\n): string {\n const trimmed = typeof value === \"string\" ? value.trim() : \"\"\n if (!trimmed) fail(`${label} must be a non-empty string`)\n if (trimmed.length > MAX_AGENT_CONTEXT_LABEL_LENGTH) {\n fail(`${label} must be at most ${MAX_AGENT_CONTEXT_LABEL_LENGTH} characters`)\n }\n return trimmed\n}\n\nfunction requireNonEmptyString(value: unknown, label: string): string {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n invalidContext(`${label} must be a non-empty string`)\n }\n return value\n}\n\nfunction utf8ByteLength(value: string): number {\n return new TextEncoder().encode(value).byteLength\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value)\n}\n\nfunction invalidContext(message: string): never {\n throw new AgentRequestError(\"invalid_context\", `[Sixb] Invalid agent context: ${message}.`)\n}\n"
|
|
7
|
+
],
|
|
8
|
+
"mappings": ";;;;;;;;AAIO,MAAM,8BAA6B,MAAM;AAAA,EACrC,OAAe;AAC1B;AAAA;AAOO,MAAM,8BAA6B,MAAM;AAAA,EACrC,OAAe;AAC1B;AAAA;AAGO,MAAM,wCAAuC,MAAM;AAAA,EAI7C;AAAA,EACA;AAAA,EAJF,OAAO;AAAA,EAEhB,WAAW,CACA,UACA,QACT,SACA;AAAA,IACA,MAAM,sBAAsB,yCAAyC,WAAW,OAAO;AAAA,IAJ9E;AAAA,IACA;AAAA;AAKb;AAAA;AAyBO,MAAM,2BAA0B,MAAM;AAAA,EAIhC;AAAA,EAHF,OAAO;AAAA,EAEhB,WAAW,CACA,MACT,SACA;AAAA,IACA,MAAM,OAAO;AAAA,IAHJ;AAAA;AAKb;;;AC3BO,IAAM,6BAA4B;AAClC,IAAM,mCAAkC,KAAK;AAC7C,IAAM,mCAAkC,KAAK;AAC7C,IAAM,kCAAiC;AAGvC,IAAM,gBAAe;AAAA,EAC1B,MAA0C,CACxC,YACA,WACA,UAAuC,CAAC,GACxC;AAAA,IACA,MAAM,QACJ,QAAQ,UAAU,YACd,YACA,mBAAmB,QAAQ,OAAO,+BAA+B,CAAC,YAAY;AAAA,MAC5E,MAAM,IAAI,UAAU,UAAU,UAAU;AAAA,KACzC;AAAA,IACP,OAAO;AAAA,MACL,MAAM;AAAA,MACN,KAAK,EAAE,cAAc,WAAW,IAAI,UAAU;AAAA,SAC1C,UAAU,YAAY,CAAC,IAAI,EAAE,MAAM;AAAA,IACzC;AAAA;AAAA,EAGF,QAAwC,CACtC,IACA,OAKA;AA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
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/models/language-model.ts", "../src/models/events.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { JsonObject, ReadonlyJsonObject } from \"../json\"\nimport type { LanguageModelDefinitionCatalog, ModelDefinitionCatalog } from \"./catalog\"\nimport type { LanguageModelDefinition } from \"./definitions\"\nimport type { LanguageModelStreamEvent } from \"./events\"\nimport type { ModelMessage } from \"./messages\"\nimport type { ModelCostEstimator } from \"./pricing\"\n\nexport const MODEL_REASONING_EFFORTS = [\"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] as const\n\nexport type ModelReasoningEffort = (typeof MODEL_REASONING_EFFORTS)[number]\n\nexport const MODEL_REASONING_LEVELS = [\n \"provider-default\",\n \"none\",\n ...MODEL_REASONING_EFFORTS,\n] as const\n\nexport type ModelReasoningLevel = (typeof MODEL_REASONING_LEVELS)[number]\n\n/** Exact provider-native reasoning budget, expressed in tokens. */\nexport interface ModelReasoningBudget extends ReadonlyJsonObject {\n readonly budgetTokens: number\n}\n\n/** Provider-neutral reasoning preference accepted by every language-model runtime. */\nexport type ModelReasoning = ModelReasoningLevel | ModelReasoningBudget\n\nexport interface ModelReasoningBudgetCapabilities {\n readonly min?: number\n readonly max?: number\n}\n\n/** Controls exposed by one concrete model offering through one provider. */\nexport interface ModelReasoningCapabilities {\n readonly canDisable?: boolean\n readonly efforts?: readonly ModelReasoningEffort[]\n readonly budgetTokens?: ModelReasoningBudgetCapabilities\n}\n\nexport interface ModelCapabilities {\n readonly inputMediaTypes?: readonly string[] | \"any\"\n /** `undefined` is unknown, `false` is unsupported, and an object describes supported controls. */\n readonly reasoning?: false | ModelReasoningCapabilities\n readonly localTools?: boolean\n readonly parallelToolCalls?: boolean\n /** `undefined` is unknown, not an assertion that schema-constrained output is unsupported. */\n readonly nativeStructuredOutput?: boolean\n readonly providerExecutedTools?: boolean\n}\n\nexport interface ModelToolSpecification {\n readonly name: string\n readonly description: string\n readonly inputSchema: JsonObject\n}\n\nexport interface ModelResponseFormat {\n readonly type: \"json\"\n readonly name: string\n readonly description?: string\n readonly schema: JsonObject\n}\n\nexport interface LanguageModelRequest {\n readonly callId: string\n readonly messages: readonly ModelMessage[]\n readonly tools: readonly ModelToolSpecification[]\n readonly reasoning?: ModelReasoning\n /** Per-call output ceiling; providers must not exceed a stricter configured model limit. */\n readonly maxOutputTokens?: number\n /** Disable automatic prompt caching without overriding explicit provider configuration. */\n readonly caching?: \"auto\" | \"off\"\n readonly responseFormat?: ModelResponseFormat\n readonly signal: AbortSignal\n}\n\nexport interface LanguageModelStream {\n readonly events: AsyncIterable<LanguageModelStreamEvent>\n}\n\nexport interface LanguageModel {\n readonly providerId: string\n readonly modelId: string\n readonly definition: LanguageModelDefinition\n readonly costEstimator?: ModelCostEstimator\n /**\n * Return an executable model pinned to operational metadata, preserving model identity.\n * `offline` requires a local snapshot without catalog I/O. Workers retain this model\n * for generation and compaction; later catalog refreshes must not change its capabilities/limits.\n * Throw ModelCatalogUnavailableError for catalog transport/access failures to allow workers to\n * retry with an offline snapshot. Invalid definitions and other resolver errors remain fatal.\n */\n resolve?(options?: { readonly offline?: boolean }): Promise<LanguageModel>\n /** Validate known output constraints without inference. Success does not certify endpoint support. */\n validateResponseFormat?(format: ModelResponseFormat): void | Promise<void>\n stream(request: LanguageModelRequest): Promise<LanguageModelStream>\n}\n\n/** The common callable provider shape. Provider packages may accept additional model options. */\nexport interface ModelProvider<TCatalog extends ModelDefinitionCatalog = ModelDefinitionCatalog> {\n readonly providerId: string\n readonly catalog: TCatalog\n}\n\nexport interface LanguageModelProvider extends ModelProvider<LanguageModelDefinitionCatalog> {\n (modelId: string): LanguageModel\n}\n\nexport function isModelReasoning(value: unknown): value is ModelReasoning {\n if (typeof value === \"string\") {\n return (MODEL_REASONING_LEVELS as readonly string[]).includes(value)\n }\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return false\n if (Object.keys(value).length !== 1) return false\n const budgetTokens = (value as { readonly budgetTokens?: unknown }).budgetTokens\n return typeof budgetTokens === \"number\" && Number.isSafeInteger(budgetTokens) && budgetTokens >= 0\n}\n\n/** Explain why a request cannot be represented by known model capabilities. Unknown is allowed. */\nexport function modelReasoningSupportIssue(\n capabilities: ModelCapabilities[\"reasoning\"],\n reasoning: unknown\n): string | undefined {\n if (reasoning === undefined) return undefined\n if (!isModelReasoning(reasoning)) return \"the reasoning preference is invalid\"\n if (reasoning === \"provider-default\") return undefined\n if (capabilities === undefined) return undefined\n if (capabilities === false) return \"reasoning is not supported\"\n if (reasoning === \"none\") {\n return capabilities.canDisable === true ? undefined : \"reasoning cannot be disabled\"\n }\n if (typeof reasoning === \"string\") {\n return capabilities.efforts?.includes(reasoning) === true\n ? undefined\n : `reasoning effort '${reasoning}' is not supported`\n }\n const budget = capabilities.budgetTokens\n if (budget === undefined) return \"reasoning token budgets are not supported\"\n if (budget.min !== undefined && reasoning.budgetTokens < budget.min) {\n return `reasoning token budget must be at least ${budget.min}`\n }\n if (budget.max !== undefined && reasoning.budgetTokens > budget.max) {\n return `reasoning token budget must not exceed ${budget.max}`\n }\n return undefined\n}\n",
|
|
5
|
+
"import type { JsonObject, ReadonlyJsonObject } from \"../json\"\nimport type { LanguageModelDefinitionCatalog, ModelDefinitionCatalog } from \"./catalog\"\nimport type { LanguageModelDefinition } from \"./definitions\"\nimport type { LanguageModelStreamEvent } from \"./events\"\nimport type { ModelMessage } from \"./messages\"\nimport type { ModelCostEstimator } from \"./pricing\"\n\nexport const MODEL_REASONING_EFFORTS = [\"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] as const\n\nexport type ModelReasoningEffort = (typeof MODEL_REASONING_EFFORTS)[number]\n\nexport const MODEL_REASONING_LEVELS = [\n \"provider-default\",\n \"none\",\n ...MODEL_REASONING_EFFORTS,\n] as const\n\nexport type ModelReasoningLevel = (typeof MODEL_REASONING_LEVELS)[number]\n\n/** Exact provider-native reasoning budget, expressed in tokens. */\nexport interface ModelReasoningBudget extends ReadonlyJsonObject {\n readonly budgetTokens: number\n}\n\n/** Provider-neutral reasoning preference accepted by every language-model runtime. */\nexport type ModelReasoning = ModelReasoningLevel | ModelReasoningBudget\n\nexport interface ModelReasoningBudgetCapabilities {\n readonly min?: number\n readonly max?: number\n}\n\n/** Controls exposed by one concrete model offering through one provider. */\nexport interface ModelReasoningCapabilities {\n readonly canDisable?: boolean\n readonly efforts?: readonly ModelReasoningEffort[]\n readonly budgetTokens?: ModelReasoningBudgetCapabilities\n}\n\nexport interface ModelCapabilities {\n readonly inputMediaTypes?: readonly string[] | \"any\"\n /** `undefined` is unknown, `false` is unsupported, and an object describes supported controls. */\n readonly reasoning?: false | ModelReasoningCapabilities\n readonly localTools?: boolean\n readonly parallelToolCalls?: boolean\n /** `undefined` is unknown, not an assertion that schema-constrained output is unsupported. */\n readonly nativeStructuredOutput?: boolean\n readonly providerExecutedTools?: boolean\n}\n\nexport interface ModelToolSpecification {\n readonly name: string\n readonly description: string\n readonly inputSchema: JsonObject\n}\n\nexport interface ModelResponseFormat {\n readonly type: \"json\"\n readonly name: string\n readonly description?: string\n readonly schema: JsonObject\n}\n\nexport interface LanguageModelRequest {\n readonly callId: string\n readonly messages: readonly ModelMessage[]\n readonly tools: readonly ModelToolSpecification[]\n readonly reasoning?: ModelReasoning\n /** Per-call output ceiling; providers must not exceed a stricter configured model limit. */\n readonly maxOutputTokens?: number\n /** Disable automatic prompt caching without overriding explicit provider configuration. */\n readonly caching?: \"auto\" | \"off\"\n readonly responseFormat?: ModelResponseFormat\n readonly signal: AbortSignal\n}\n\nexport interface LanguageModelStream {\n readonly events: AsyncIterable<LanguageModelStreamEvent>\n}\n\nexport interface LanguageModel {\n readonly providerId: string\n readonly modelId: string\n readonly definition: LanguageModelDefinition\n readonly costEstimator?: ModelCostEstimator\n /**\n * Reasoning Sixb applies whenever this model runs without an explicit choice: chat turns, AI\n * workflow steps, subagents, and direct generation. Providers set it from their model options;\n * Sixb checks it against `definition.capabilities` at startup.\n */\n readonly defaultReasoning?: ModelReasoningLevel\n /**\n * Return an executable model pinned to operational metadata, preserving model identity.\n * `offline` requires a local snapshot without catalog I/O. Workers retain this model\n * for generation and compaction; later catalog refreshes must not change its capabilities/limits.\n * Throw ModelCatalogUnavailableError for catalog transport/access failures to allow workers to\n * retry with an offline snapshot. Invalid definitions and other resolver errors remain fatal.\n */\n resolve?(options?: { readonly offline?: boolean }): Promise<LanguageModel>\n /** Validate known output constraints without inference. Success does not certify endpoint support. */\n validateResponseFormat?(format: ModelResponseFormat): void | Promise<void>\n stream(request: LanguageModelRequest): Promise<LanguageModelStream>\n}\n\n/** The common callable provider shape. Provider packages may accept additional model options. */\nexport interface ModelProvider<TCatalog extends ModelDefinitionCatalog = ModelDefinitionCatalog> {\n readonly providerId: string\n readonly catalog: TCatalog\n}\n\nexport interface LanguageModelProvider extends ModelProvider<LanguageModelDefinitionCatalog> {\n (modelId: string): LanguageModel\n}\n\nexport function isModelReasoning(value: unknown): value is ModelReasoning {\n if (typeof value === \"string\") {\n return (MODEL_REASONING_LEVELS as readonly string[]).includes(value)\n }\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return false\n if (Object.keys(value).length !== 1) return false\n const budgetTokens = (value as { readonly budgetTokens?: unknown }).budgetTokens\n return typeof budgetTokens === \"number\" && Number.isSafeInteger(budgetTokens) && budgetTokens >= 0\n}\n\n/** Explain why a request cannot be represented by known model capabilities. Unknown is allowed. */\nexport function modelReasoningSupportIssue(\n capabilities: ModelCapabilities[\"reasoning\"],\n reasoning: unknown\n): string | undefined {\n if (reasoning === undefined) return undefined\n if (!isModelReasoning(reasoning)) return \"the reasoning preference is invalid\"\n if (reasoning === \"provider-default\") return undefined\n if (capabilities === undefined) return undefined\n if (capabilities === false) return \"reasoning is not supported\"\n if (reasoning === \"none\") {\n return capabilities.canDisable === true ? undefined : \"reasoning cannot be disabled\"\n }\n if (typeof reasoning === \"string\") {\n return capabilities.efforts?.includes(reasoning) === true\n ? undefined\n : `reasoning effort '${reasoning}' is not supported`\n }\n const budget = capabilities.budgetTokens\n if (budget === undefined) return \"reasoning token budgets are not supported\"\n if (budget.min !== undefined && reasoning.budgetTokens < budget.min) {\n return `reasoning token budget must be at least ${budget.min}`\n }\n if (budget.max !== undefined && reasoning.budgetTokens > budget.max) {\n return `reasoning token budget must not exceed ${budget.max}`\n }\n return undefined\n}\n",
|
|
6
6
|
"import type { JsonObject, JsonValue } from \"../json\"\nimport type { ModelReasoning } from \"./language-model\"\nimport type {\n ModelAssistantPart,\n ModelToolCallPart,\n ModelToolResultPart,\n ProviderData,\n} from \"./messages\"\nimport type { ModelCallCost, ModelCostEstimate, ModelReportedCost } from \"./pricing\"\n\nexport interface ModelRoute {\n /** Provider selected by a routing gateway, when it differs from the provider being called. */\n readonly providerId?: string\n readonly modelId?: string\n}\n\n/** Only identifiers supplied by the provider. Internal call/response fallback IDs never belong here. */\nexport type ModelProviderIds = {\n readonly requestId?: string\n readonly responseId?: string\n readonly generationId?: string\n}\n\nexport function normalizeModelProviderIds(value: unknown): ModelProviderIds {\n if (typeof value !== \"object\" || value === null || Array.isArray(value))\n throw new TypeError(\"[Sixb] Provider identifiers must be an object.\")\n const result: { requestId?: string; responseId?: string; generationId?: string } = {}\n for (const [key, id] of Object.entries(value)) {\n if (key !== \"requestId\" && key !== \"responseId\" && key !== \"generationId\") continue\n if (id === undefined) continue\n if (typeof id !== \"string\" || !id.trim())\n throw new TypeError(`[Sixb] Provider ${key} must be nonblank.`)\n result[key] = id\n }\n return Object.freeze(result)\n}\n\nexport type ModelFinishReason =\n | \"stop\"\n | \"length\"\n | \"content-filter\"\n | \"tool-calls\"\n | \"pause\"\n | \"error\"\n | \"other\"\n | \"unknown\"\n\nexport interface ModelUsage {\n /** Audio content duration in milliseconds, rounded to the nearest millisecond. Not billed duration. */\n readonly audioDurationMs?: number\n readonly inputTokens?: number\n readonly outputTokens?: number\n readonly uncachedInputTokens?: number\n readonly cacheReadInputTokens?: number\n readonly cacheWriteInputTokens?: number\n readonly cacheWrite5mInputTokens?: number\n readonly cacheWrite1hInputTokens?: number\n readonly textOutputTokens?: number\n readonly reasoningOutputTokens?: number\n readonly raw?: JsonObject\n}\n\nexport type LanguageModelStreamEvent =\n | { readonly type: \"stream-start\" }\n | {\n readonly type: \"response-metadata\"\n readonly providerIds?: ModelProviderIds\n readonly id?: string\n readonly modelId?: string\n }\n | { readonly type: \"text-start\"; readonly id: string; readonly providerData?: ProviderData }\n | { readonly type: \"text-delta\"; readonly id: string; readonly delta: string }\n | { readonly type: \"text-end\"; readonly id: string; readonly providerData?: ProviderData }\n | {\n readonly type: \"reasoning-start\"\n readonly id: string\n readonly providerData?: ProviderData\n }\n | { readonly type: \"reasoning-delta\"; readonly id: string; readonly delta: string }\n | { readonly type: \"reasoning-end\"; readonly id: string; readonly providerData?: ProviderData }\n | {\n readonly type: \"tool-input-start\"\n readonly id: string\n readonly toolName: string\n readonly providerData?: ProviderData\n readonly providerExecuted?: boolean\n readonly dynamic?: boolean\n }\n | { readonly type: \"tool-input-delta\"; readonly id: string; readonly delta: string }\n | { readonly type: \"tool-input-end\"; readonly id: string; readonly providerData?: ProviderData }\n | {\n readonly type: \"tool-call\"\n readonly toolCallId: string\n readonly toolName: string\n readonly input: string\n readonly providerData?: ProviderData\n readonly providerExecuted?: boolean\n readonly dynamic?: boolean\n }\n | {\n readonly type: \"tool-result\"\n readonly toolCallId: string\n readonly toolName: string\n readonly output: JsonValue\n readonly isError?: boolean\n readonly providerData?: ProviderData\n readonly providerExecuted?: boolean\n readonly dynamic?: boolean\n }\n | {\n readonly type: \"provider-state\"\n readonly providerId: string\n readonly data: JsonValue\n }\n | {\n readonly type: \"finish\"\n readonly finishReason: ModelFinishReason\n readonly rawFinishReason?: string\n readonly usage: ModelUsage\n readonly providerData?: ProviderData\n readonly reportedCost?: ModelReportedCost\n readonly route?: ModelRoute\n }\n | { readonly type: \"error\"; readonly error: unknown }\n\nexport type ModelUiChunk =\n | { readonly type: \"start-step\" }\n | { readonly type: \"text-start\"; readonly id: string }\n | { readonly type: \"text-delta\"; readonly id: string; readonly delta: string }\n | { readonly type: \"text-end\"; readonly id: string }\n | { readonly type: \"reasoning-start\"; readonly id: string }\n | { readonly type: \"reasoning-delta\"; readonly id: string; readonly delta: string }\n | { readonly type: \"reasoning-end\"; readonly id: string }\n | {\n readonly type: \"tool-input-start\"\n readonly toolCallId: string\n readonly toolName: string\n }\n | {\n readonly type: \"tool-input-delta\"\n readonly toolCallId: string\n readonly toolName: string\n readonly inputTextDelta: string\n }\n | {\n readonly type: \"tool-input-available\"\n readonly toolCallId: string\n readonly toolName: string\n readonly input: JsonValue\n }\n | {\n readonly type: \"tool-input-error\"\n readonly toolCallId: string\n readonly toolName: string\n readonly input: JsonValue\n readonly errorText: string\n }\n | {\n readonly type: \"tool-output-available\"\n readonly toolCallId: string\n readonly toolName: string\n readonly output: JsonValue\n }\n | {\n readonly type: \"tool-output-error\"\n readonly toolCallId: string\n readonly toolName: string\n readonly errorText: string\n }\n | { readonly type: \"error\"; readonly errorText: string }\n\nexport interface ModelCallEndEvent {\n readonly modelKind?: import(\"./definitions\").ModelKind\n readonly providerIds?: ModelProviderIds\n /** Retained independently when the selected display cost is provider-reported. */\n readonly estimate?: ModelCostEstimate\n readonly callId: string\n readonly providerId: string\n readonly modelId: string\n readonly responseId: string\n readonly responseModelId?: string\n readonly usage: ModelUsage\n readonly cost: ModelCallCost\n readonly requestedReasoning?: ModelReasoning\n readonly route?: ModelRoute\n}\n\nexport interface ModelStep {\n readonly content: readonly (ModelAssistantPart | ModelToolResultPart)[]\n readonly finishReason: ModelFinishReason\n readonly rawFinishReason?: string\n readonly usage: ModelUsage\n readonly responseId: string\n readonly responseModelId?: string\n readonly cost: ModelCallCost\n readonly route?: ModelRoute\n}\n\nexport interface ModelLoopPartial {\n readonly content: readonly (ModelAssistantPart | ModelToolCallPart | ModelToolResultPart)[]\n}\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings":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,UAAU,eAAe,OAAO,KAAK;AAAA,IACnE,OAAO,2CAA2C,OAAO;AAAA,EAC3D;AAAA,EACA,IAAI,OAAO,QAAQ,aAAa,UAAU,eAAe,OAAO,KAAK;AAAA,IACnE,OAAO,0CAA0C,OAAO;AAAA,EAC1D;AAAA,EACA;AAAA;;;AC/HK,SAAS,0BAAyB,CAAC,OAAkC;AAAA,EAC1E,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK;AAAA,IACpE,MAAM,IAAI,UAAU,gDAAgD;AAAA,EACtE,MAAM,SAA6E,CAAC;AAAA,EACpF,YAAY,KAAK,OAAO,OAAO,QAAQ,KAAK,GAAG;AAAA,IAC7C,IAAI,QAAQ,eAAe,QAAQ,gBAAgB,QAAQ;AAAA,MAAgB;AAAA,IAC3E,IAAI,OAAO;AAAA,MAAW;AAAA,IACtB,IAAI,OAAO,OAAO,YAAY,CAAC,GAAG,KAAK;AAAA,MACrC,MAAM,IAAI,UAAU,mBAAmB,uBAAuB;AAAA,IAChE,OAAO,OAAO;AAAA,EAChB;AAAA,EACA,OAAO,OAAO,OAAO,MAAM;AAAA;",
|
|
9
9
|
"debugId": "1D80C81FE1B8244564756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
GRANT_KINDS,
|
|
4
|
+
TARGETED_GRANT_KIND_KEYS,
|
|
5
|
+
grantKindOf,
|
|
6
|
+
emptyGrantSets
|
|
7
|
+
} from "./chunk-enpsx8k5.js";
|
|
2
8
|
import {
|
|
3
9
|
createSixbError2
|
|
4
10
|
} from "./chunk-6fsr7y93.js";
|
|
@@ -8,7 +14,7 @@ import {
|
|
|
8
14
|
import {
|
|
9
15
|
findPrimitiveSchema,
|
|
10
16
|
resolveSemanticType2
|
|
11
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-y05543x6.js";
|
|
12
18
|
import {
|
|
13
19
|
kernelOperationId,
|
|
14
20
|
kernelOperationFromId
|
|
@@ -25,129 +31,6 @@ function agentServiceAccountId2(actorId) {
|
|
|
25
31
|
return `svc_agent_${actorId}`;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
|
-
// src/authorization/grant-kinds.ts
|
|
29
|
-
var GRANT_KINDS = {
|
|
30
|
-
"access:application": {
|
|
31
|
-
universeKey: "applicationIds",
|
|
32
|
-
subject: "application",
|
|
33
|
-
fix: "Use an application exported from '@sixb/core'."
|
|
34
|
-
},
|
|
35
|
-
"view:object": {
|
|
36
|
-
universeKey: "objectTypeIds",
|
|
37
|
-
subject: "object type",
|
|
38
|
-
fix: "Register it in 'ontology/' or pass it to createSixb({ ontologies }).",
|
|
39
|
-
expandsSubtypes: true
|
|
40
|
-
},
|
|
41
|
-
"view:dataset": {
|
|
42
|
-
universeKey: "datasetIds",
|
|
43
|
-
subject: "dataset",
|
|
44
|
-
fix: "Add it to 'datasets/' or pass it to createSixb({ datasets })."
|
|
45
|
-
},
|
|
46
|
-
"edit:object": {
|
|
47
|
-
universeKey: "objectTypeIds",
|
|
48
|
-
subject: "object type",
|
|
49
|
-
fix: "Register it in 'ontology/' or pass it to createSixb({ ontologies })."
|
|
50
|
-
},
|
|
51
|
-
"append:telemetry": {
|
|
52
|
-
universeKey: "objectTypeIds",
|
|
53
|
-
subject: "object type",
|
|
54
|
-
fix: "Register it in 'ontology/' or pass it to createSixb({ ontologies })."
|
|
55
|
-
},
|
|
56
|
-
"apply:action": {
|
|
57
|
-
universeKey: "actionIds",
|
|
58
|
-
subject: "action",
|
|
59
|
-
fix: "Add it to 'actions/' or pass it to createSixb({ actions })."
|
|
60
|
-
},
|
|
61
|
-
"share:share": {
|
|
62
|
-
universeKey: "shareIds",
|
|
63
|
-
subject: "share",
|
|
64
|
-
fix: "Add it to 'shares/' or pass it to createSixb({ shares })."
|
|
65
|
-
},
|
|
66
|
-
"run:workflow": {
|
|
67
|
-
universeKey: "workflowIds",
|
|
68
|
-
subject: "workflow",
|
|
69
|
-
fix: "Add it to 'workflows/' or pass it to createSixb({ workflows })."
|
|
70
|
-
},
|
|
71
|
-
"run:sync": {
|
|
72
|
-
universeKey: "syncIds",
|
|
73
|
-
subject: "sync",
|
|
74
|
-
fix: "Add it to 'syncs/' or pass it to createSixb({ syncs })."
|
|
75
|
-
},
|
|
76
|
-
"run:pipeline": {
|
|
77
|
-
universeKey: "pipelineIds",
|
|
78
|
-
subject: "pipeline",
|
|
79
|
-
fix: "Add it to 'pipelines/' or pass it to createSixb({ pipelines })."
|
|
80
|
-
},
|
|
81
|
-
"run:agent": {
|
|
82
|
-
singleton: true,
|
|
83
|
-
subject: "agent",
|
|
84
|
-
fix: "Configure models.language and use the exported agent reference in can.run(agent)."
|
|
85
|
-
},
|
|
86
|
-
"observe:logs": {
|
|
87
|
-
universeKey: "observableIds",
|
|
88
|
-
subject: "observability surface",
|
|
89
|
-
fix: 'Use can.observe("logs").'
|
|
90
|
-
},
|
|
91
|
-
"observe:aiUsage": {
|
|
92
|
-
universeKey: "observableIds",
|
|
93
|
-
subject: "observability surface",
|
|
94
|
-
fix: "Use can.observe(agent.usage)."
|
|
95
|
-
},
|
|
96
|
-
"manage:connector": {
|
|
97
|
-
universeKey: "connectorIds",
|
|
98
|
-
subject: "connector",
|
|
99
|
-
fix: "Add it to 'connectors/' or pass it to createSixb({ connectors })."
|
|
100
|
-
},
|
|
101
|
-
"manage:aiUsage": {
|
|
102
|
-
universeKey: "manageableIds",
|
|
103
|
-
subject: "management surface",
|
|
104
|
-
fix: "Use can.manage(agent.usage)."
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
var GRANT_KIND_KEYS = Object.keys(GRANT_KINDS);
|
|
108
|
-
var TARGETED_GRANT_KIND_KEYS = GRANT_KIND_KEYS.filter((kind) => kind !== "run:agent");
|
|
109
|
-
function grantKindOf(grant) {
|
|
110
|
-
switch (grant.capability) {
|
|
111
|
-
case "access":
|
|
112
|
-
return "access:application";
|
|
113
|
-
case "view":
|
|
114
|
-
return `view:${grant.target}`;
|
|
115
|
-
case "edit":
|
|
116
|
-
return "edit:object";
|
|
117
|
-
case "append":
|
|
118
|
-
return "append:telemetry";
|
|
119
|
-
case "apply":
|
|
120
|
-
return "apply:action";
|
|
121
|
-
case "share":
|
|
122
|
-
return "share:share";
|
|
123
|
-
case "run":
|
|
124
|
-
return `run:${grant.target}`;
|
|
125
|
-
case "observe":
|
|
126
|
-
return `observe:${grant.target}`;
|
|
127
|
-
case "manage":
|
|
128
|
-
return `manage:${grant.target}`;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function emptyGrantSets() {
|
|
132
|
-
return {
|
|
133
|
-
"access:application": new Set,
|
|
134
|
-
"view:object": new Set,
|
|
135
|
-
"view:dataset": new Set,
|
|
136
|
-
"edit:object": new Set,
|
|
137
|
-
"append:telemetry": new Set,
|
|
138
|
-
"apply:action": new Set,
|
|
139
|
-
"share:share": new Set,
|
|
140
|
-
"run:workflow": new Set,
|
|
141
|
-
"run:sync": new Set,
|
|
142
|
-
"run:pipeline": new Set,
|
|
143
|
-
"run:agent": false,
|
|
144
|
-
"observe:logs": new Set,
|
|
145
|
-
"observe:aiUsage": new Set,
|
|
146
|
-
"manage:connector": new Set,
|
|
147
|
-
"manage:aiUsage": new Set
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
|
|
151
34
|
// src/storage/objects/execution-limits.ts
|
|
152
35
|
var MAX_OBJECT_READ_FACETS2 = 16;
|
|
153
36
|
var MAX_OUTPUT_JSON_DEPTH = 64;
|
|
@@ -729,7 +612,8 @@ function snapshotAuthorizationContext(context) {
|
|
|
729
612
|
...context.sessionId === undefined ? {} : { sessionId: context.sessionId },
|
|
730
613
|
groupIds: Object.freeze([...context.groupIds]),
|
|
731
614
|
roleIds: Object.freeze([...context.roleIds]),
|
|
732
|
-
grants: frozenGrants
|
|
615
|
+
grants: frozenGrants,
|
|
616
|
+
clearances: new ImmutableGrantSet(context.clearances ?? [])
|
|
733
617
|
});
|
|
734
618
|
}
|
|
735
619
|
|
|
@@ -1151,6 +1035,7 @@ function resolveAuthorizationContext2(input) {
|
|
|
1151
1035
|
const memberGroupIds = new Set(input.groupIds);
|
|
1152
1036
|
const roleIds = [];
|
|
1153
1037
|
const grants = emptyGrantSets();
|
|
1038
|
+
const clearances = new Set;
|
|
1154
1039
|
for (const role of input.roles) {
|
|
1155
1040
|
if (!role.grantedToGroupIds.some((groupId) => memberGroupIds.has(groupId))) {
|
|
1156
1041
|
continue;
|
|
@@ -1164,13 +1049,17 @@ function resolveAuthorizationContext2(input) {
|
|
|
1164
1049
|
grants[kind].add(id);
|
|
1165
1050
|
}
|
|
1166
1051
|
}
|
|
1052
|
+
for (const markingId of role.clearances ?? []) {
|
|
1053
|
+
clearances.add(markingId);
|
|
1054
|
+
}
|
|
1167
1055
|
}
|
|
1168
1056
|
return {
|
|
1169
1057
|
principal: input.principal,
|
|
1170
1058
|
...input.sessionId !== undefined ? { sessionId: input.sessionId } : {},
|
|
1171
1059
|
groupIds: input.groupIds,
|
|
1172
1060
|
roleIds,
|
|
1173
|
-
grants
|
|
1061
|
+
grants,
|
|
1062
|
+
clearances
|
|
1174
1063
|
};
|
|
1175
1064
|
}
|
|
1176
1065
|
// src/projections/errors.ts
|
|
@@ -1901,6 +1790,6 @@ function canViewProjection2(authorization, projection) {
|
|
|
1901
1790
|
function emptyGrantIndex2() {
|
|
1902
1791
|
return emptyGrantSets();
|
|
1903
1792
|
}
|
|
1904
|
-
export { ProjectionValidationError2, computeProjectionOwnership2, validateProjectionOwnership2, validateTelemetryProjectionFieldMapping2, validateProjectionsAtStartup, defineProjection2, fromForeignKey2, isObjectProjectionDefinition2, isLinkProjectionDefinition2, isTelemetryProjectionDefinition2, isProjectionDefinition2, projectionTargetOf2, agentServiceAccountId2,
|
|
1793
|
+
export { ProjectionValidationError2, computeProjectionOwnership2, validateProjectionOwnership2, validateTelemetryProjectionFieldMapping2, validateProjectionsAtStartup, defineProjection2, fromForeignKey2, isObjectProjectionDefinition2, isLinkProjectionDefinition2, isTelemetryProjectionDefinition2, isProjectionDefinition2, projectionTargetOf2, agentServiceAccountId2, MAX_OBJECT_READ_FACETS2, ObjectReadLimitExceededError2, snapshotObjectReadExecutionLimits2, assertObjectReadFacetCount2, assertObjectReadOutputWithinLimit2, createPrincipalRuntimeAuthorization, createAgentRuntimeAuthorization, createDisabledRuntimeAuthorization, createDelegatedRuntimeAuthorization, createTrustedPrimitiveRuntimeAuthorization, createKernelRuntimeAuthorization, resolveRuntimeAuthorizationForProject, getAuthorizationRef, captureExecutionScope, resolveExecutionScopeAuthorization, AuthorizationError2, evaluate2, isAllowed2, assertAuthorized2, isRuntimeAllowed2, assertRuntimeAuthorizationBound2, assertCanEdit2, assertCanAppendTelemetry2, assertCanManageConnector2, assertPrivileged2, assertProviderAccess2, isApplicationAccessControlled2, canAccessApplication2, canViewEvent2, resolveRoleGrants2, resolveAuthorizationContext2, canViewActionRun2, canViewWorkflowRun2, canViewWorkflowIntervention2, canViewPipelineRun2, canViewProjectionRun2, canViewProjection2, emptyGrantIndex2 };
|
|
1905
1794
|
|
|
1906
|
-
//# debugId=
|
|
1795
|
+
//# debugId=EE4F623367B105A264756E2164756E21
|