@sixb/core 0.0.1
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/LICENSE +21 -0
- package/README.md +470 -0
- package/dist/actions/builders/define-action.d.ts +7 -0
- package/dist/actions/builders/define-action.d.ts.map +1 -0
- package/dist/actions/builders/params.d.ts +23 -0
- package/dist/actions/builders/params.d.ts.map +1 -0
- package/dist/actions/builders.d.ts +3 -0
- package/dist/actions/builders.d.ts.map +1 -0
- package/dist/actions/commit-edits.d.ts +54 -0
- package/dist/actions/commit-edits.d.ts.map +1 -0
- package/dist/actions/errors.d.ts +9 -0
- package/dist/actions/errors.d.ts.map +1 -0
- package/dist/actions/index.d.ts +14 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +73 -0
- package/dist/actions/index.js.map +9 -0
- package/dist/actions/read-facade.d.ts +56 -0
- package/dist/actions/read-facade.d.ts.map +1 -0
- package/dist/actions/registry.d.ts +17 -0
- package/dist/actions/registry.d.ts.map +1 -0
- package/dist/actions/request.d.ts +37 -0
- package/dist/actions/request.d.ts.map +1 -0
- package/dist/actions/run-id.d.ts +3 -0
- package/dist/actions/run-id.d.ts.map +1 -0
- package/dist/actions/runtime.d.ts +11 -0
- package/dist/actions/runtime.d.ts.map +1 -0
- package/dist/actions/types/context.d.ts +147 -0
- package/dist/actions/types/context.d.ts.map +1 -0
- package/dist/actions/types/definitions.d.ts +67 -0
- package/dist/actions/types/definitions.d.ts.map +1 -0
- package/dist/actions/types/handlers.d.ts +19 -0
- package/dist/actions/types/handlers.d.ts.map +1 -0
- package/dist/actions/types/params.d.ts +45 -0
- package/dist/actions/types/params.d.ts.map +1 -0
- package/dist/actions/types.d.ts +5 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/actions/validation.d.ts +33 -0
- package/dist/actions/validation.d.ts.map +1 -0
- package/dist/actions/validators.d.ts +8 -0
- package/dist/actions/validators.d.ts.map +1 -0
- package/dist/actions/worker.d.ts +3 -0
- package/dist/actions/worker.d.ts.map +1 -0
- package/dist/actions/worker.js +324 -0
- package/dist/actions/worker.js.map +11 -0
- package/dist/agents/adapters.d.ts +185 -0
- package/dist/agents/adapters.d.ts.map +1 -0
- package/dist/agents/api-gateway.d.ts +21 -0
- package/dist/agents/api-gateway.d.ts.map +1 -0
- package/dist/agents/builders.d.ts +10 -0
- package/dist/agents/builders.d.ts.map +1 -0
- package/dist/agents/context-model.d.ts +4 -0
- package/dist/agents/context-model.d.ts.map +1 -0
- package/dist/agents/context-resolution.d.ts +5 -0
- package/dist/agents/context-resolution.d.ts.map +1 -0
- package/dist/agents/context.d.ts +57 -0
- package/dist/agents/context.d.ts.map +1 -0
- package/dist/agents/context.js +23 -0
- package/dist/agents/context.js.map +9 -0
- package/dist/agents/dispatch.d.ts +36 -0
- package/dist/agents/dispatch.d.ts.map +1 -0
- package/dist/agents/errors.d.ts +27 -0
- package/dist/agents/errors.d.ts.map +1 -0
- package/dist/agents/ids.d.ts +11 -0
- package/dist/agents/ids.d.ts.map +1 -0
- package/dist/agents/index.d.ts +24 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +121 -0
- package/dist/agents/index.js.map +9 -0
- package/dist/agents/message.d.ts +78 -0
- package/dist/agents/message.d.ts.map +1 -0
- package/dist/agents/prompt.d.ts +15 -0
- package/dist/agents/prompt.d.ts.map +1 -0
- package/dist/agents/request.d.ts +42 -0
- package/dist/agents/request.d.ts.map +1 -0
- package/dist/agents/runtime.d.ts +41 -0
- package/dist/agents/runtime.d.ts.map +1 -0
- package/dist/agents/streams.d.ts +72 -0
- package/dist/agents/streams.d.ts.map +1 -0
- package/dist/agents/streams.js +32 -0
- package/dist/agents/streams.js.map +9 -0
- package/dist/agents/types.d.ts +52 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/validation.d.ts +10 -0
- package/dist/agents/validation.d.ts.map +1 -0
- package/dist/auth/access-tokens.d.ts +19 -0
- package/dist/auth/access-tokens.d.ts.map +1 -0
- package/dist/auth/audience.d.ts +8 -0
- package/dist/auth/audience.d.ts.map +1 -0
- package/dist/auth/cookies.d.ts +50 -0
- package/dist/auth/cookies.d.ts.map +1 -0
- package/dist/auth/csrf.d.ts +8 -0
- package/dist/auth/csrf.d.ts.map +1 -0
- package/dist/auth/errors.d.ts +7 -0
- package/dist/auth/errors.d.ts.map +1 -0
- package/dist/auth/index.d.ts +15 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +101 -0
- package/dist/auth/index.js.map +9 -0
- package/dist/auth/runtime.d.ts +129 -0
- package/dist/auth/runtime.d.ts.map +1 -0
- package/dist/auth/session-cache.d.ts +44 -0
- package/dist/auth/session-cache.d.ts.map +1 -0
- package/dist/auth/sessions.d.ts +16 -0
- package/dist/auth/sessions.d.ts.map +1 -0
- package/dist/auth/strategy.d.ts +11 -0
- package/dist/auth/strategy.d.ts.map +1 -0
- package/dist/auth/strategy.js +14 -0
- package/dist/auth/strategy.js.map +9 -0
- package/dist/auth/types.d.ts +460 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/validation.d.ts +26 -0
- package/dist/auth/validation.d.ts.map +1 -0
- package/dist/authorization/application-access.d.ts +18 -0
- package/dist/authorization/application-access.d.ts.map +1 -0
- package/dist/authorization/decision.d.ts +104 -0
- package/dist/authorization/decision.d.ts.map +1 -0
- package/dist/authorization/errors.d.ts +10 -0
- package/dist/authorization/errors.d.ts.map +1 -0
- package/dist/authorization/event-visibility.d.ts +16 -0
- package/dist/authorization/event-visibility.d.ts.map +1 -0
- package/dist/authorization/grant-kinds.d.ts +48 -0
- package/dist/authorization/grant-kinds.d.ts.map +1 -0
- package/dist/authorization/index.d.ts +11 -0
- package/dist/authorization/index.d.ts.map +1 -0
- package/dist/authorization/index.js +48 -0
- package/dist/authorization/index.js.map +9 -0
- package/dist/authorization/resolve.d.ts +28 -0
- package/dist/authorization/resolve.d.ts.map +1 -0
- package/dist/authorization/run-visibility.d.ts +15 -0
- package/dist/authorization/run-visibility.d.ts.map +1 -0
- package/dist/authorization/types.d.ts +46 -0
- package/dist/authorization/types.d.ts.map +1 -0
- package/dist/blob-storage/browser.d.ts +14 -0
- package/dist/blob-storage/browser.d.ts.map +1 -0
- package/dist/blob-storage/browser.js +22 -0
- package/dist/blob-storage/browser.js.map +9 -0
- package/dist/blob-storage/constants.d.ts +10 -0
- package/dist/blob-storage/constants.d.ts.map +1 -0
- package/dist/blob-storage/derive.d.ts +4 -0
- package/dist/blob-storage/derive.d.ts.map +1 -0
- package/dist/blob-storage/errors.d.ts +7 -0
- package/dist/blob-storage/errors.d.ts.map +1 -0
- package/dist/blob-storage/in-memory.d.ts +10 -0
- package/dist/blob-storage/in-memory.d.ts.map +1 -0
- package/dist/blob-storage/index.d.ts +8 -0
- package/dist/blob-storage/index.d.ts.map +1 -0
- package/dist/blob-storage/index.js +44 -0
- package/dist/blob-storage/index.js.map +9 -0
- package/dist/blob-storage/types.d.ts +126 -0
- package/dist/blob-storage/types.d.ts.map +1 -0
- package/dist/blob-storage/utils.d.ts +9 -0
- package/dist/blob-storage/utils.d.ts.map +1 -0
- package/dist/blob-storage/validation.d.ts +6 -0
- package/dist/blob-storage/validation.d.ts.map +1 -0
- package/dist/bootstrap/discovery.d.ts +34 -0
- package/dist/bootstrap/discovery.d.ts.map +1 -0
- package/dist/bootstrap/index.d.ts +4 -0
- package/dist/bootstrap/index.d.ts.map +1 -0
- package/dist/bootstrap/index.js +80 -0
- package/dist/bootstrap/index.js.map +9 -0
- package/dist/bootstrap/ontology-type-manifest.d.ts +22 -0
- package/dist/bootstrap/ontology-type-manifest.d.ts.map +1 -0
- package/dist/broker/errors.d.ts +12 -0
- package/dist/broker/errors.d.ts.map +1 -0
- package/dist/broker/in-memory.d.ts +53 -0
- package/dist/broker/in-memory.d.ts.map +1 -0
- package/dist/broker/index.d.ts +5 -0
- package/dist/broker/index.d.ts.map +1 -0
- package/dist/broker/index.js +15 -0
- package/dist/broker/index.js.map +9 -0
- package/dist/broker/types.d.ts +119 -0
- package/dist/broker/types.d.ts.map +1 -0
- package/dist/chunk-04b07a9q.js +89 -0
- package/dist/chunk-04b07a9q.js.map +10 -0
- package/dist/chunk-0fygrz37.js +354 -0
- package/dist/chunk-0fygrz37.js.map +17 -0
- package/dist/chunk-0psb6kdw.js +989 -0
- package/dist/chunk-0psb6kdw.js.map +15 -0
- package/dist/chunk-1evzqhks.js +76 -0
- package/dist/chunk-1evzqhks.js.map +10 -0
- package/dist/chunk-1vffvydj.js +109 -0
- package/dist/chunk-1vffvydj.js.map +10 -0
- package/dist/chunk-2ab72m2h.js +59 -0
- package/dist/chunk-2ab72m2h.js.map +10 -0
- package/dist/chunk-2gpr6jsz.js +1968 -0
- package/dist/chunk-2gpr6jsz.js.map +13 -0
- package/dist/chunk-2s6sydsh.js +368 -0
- package/dist/chunk-2s6sydsh.js.map +12 -0
- package/dist/chunk-45tw90k7.js +72 -0
- package/dist/chunk-45tw90k7.js.map +11 -0
- package/dist/chunk-4pycxcj3.js +35 -0
- package/dist/chunk-4pycxcj3.js.map +11 -0
- package/dist/chunk-50kv63vj.js +523 -0
- package/dist/chunk-50kv63vj.js.map +12 -0
- package/dist/chunk-51fjndv0.js +17 -0
- package/dist/chunk-51fjndv0.js.map +11 -0
- package/dist/chunk-590dejbp.js +49 -0
- package/dist/chunk-590dejbp.js.map +10 -0
- package/dist/chunk-5yny9z0e.js +60 -0
- package/dist/chunk-5yny9z0e.js.map +10 -0
- package/dist/chunk-6wetht33.js +89 -0
- package/dist/chunk-6wetht33.js.map +10 -0
- package/dist/chunk-74drx9gd.js +362 -0
- package/dist/chunk-74drx9gd.js.map +11 -0
- package/dist/chunk-867jxh7c.js +1156 -0
- package/dist/chunk-867jxh7c.js.map +19 -0
- package/dist/chunk-88ppkr54.js +257 -0
- package/dist/chunk-88ppkr54.js.map +12 -0
- package/dist/chunk-8r8cw2xw.js +373 -0
- package/dist/chunk-8r8cw2xw.js.map +11 -0
- package/dist/chunk-8ydjhh27.js +95 -0
- package/dist/chunk-8ydjhh27.js.map +11 -0
- package/dist/chunk-9dzba0f2.js +43 -0
- package/dist/chunk-9dzba0f2.js.map +10 -0
- package/dist/chunk-aebzcsxr.js +5272 -0
- package/dist/chunk-aebzcsxr.js.map +48 -0
- package/dist/chunk-b49dgvsj.js +49 -0
- package/dist/chunk-b49dgvsj.js.map +10 -0
- package/dist/chunk-btpe64e4.js +554 -0
- package/dist/chunk-btpe64e4.js.map +13 -0
- package/dist/chunk-c3zd880g.js +629 -0
- package/dist/chunk-c3zd880g.js.map +14 -0
- package/dist/chunk-dcgrzj1t.js +2954 -0
- package/dist/chunk-dcgrzj1t.js.map +36 -0
- package/dist/chunk-dhmj53mx.js +501 -0
- package/dist/chunk-dhmj53mx.js.map +16 -0
- package/dist/chunk-dktq02ne.js +16 -0
- package/dist/chunk-dktq02ne.js.map +10 -0
- package/dist/chunk-f2b5e2gf.js +141 -0
- package/dist/chunk-f2b5e2gf.js.map +11 -0
- package/dist/chunk-gqdd7508.js +273 -0
- package/dist/chunk-gqdd7508.js.map +11 -0
- package/dist/chunk-hsv43v58.js +1390 -0
- package/dist/chunk-hsv43v58.js.map +21 -0
- package/dist/chunk-jdwx7vzs.js +454 -0
- package/dist/chunk-jdwx7vzs.js.map +14 -0
- package/dist/chunk-k25jm1x5.js +102 -0
- package/dist/chunk-k25jm1x5.js.map +10 -0
- package/dist/chunk-k41ajtz7.js +352 -0
- package/dist/chunk-k41ajtz7.js.map +13 -0
- package/dist/chunk-k6j72mtt.js +9 -0
- package/dist/chunk-k6j72mtt.js.map +10 -0
- package/dist/chunk-mx84y05q.js +426 -0
- package/dist/chunk-mx84y05q.js.map +11 -0
- package/dist/chunk-nvamz5dv.js +819 -0
- package/dist/chunk-nvamz5dv.js.map +21 -0
- package/dist/chunk-p6r5g77m.js +113 -0
- package/dist/chunk-p6r5g77m.js.map +10 -0
- package/dist/chunk-pv1yad91.js +1165 -0
- package/dist/chunk-pv1yad91.js.map +27 -0
- package/dist/chunk-q4qzq0ea.js +832 -0
- package/dist/chunk-q4qzq0ea.js.map +14 -0
- package/dist/chunk-r65yscvk.js +187 -0
- package/dist/chunk-r65yscvk.js.map +11 -0
- package/dist/chunk-ry24jbr1.js +50 -0
- package/dist/chunk-ry24jbr1.js.map +10 -0
- package/dist/chunk-t358gywy.js +991 -0
- package/dist/chunk-t358gywy.js.map +34 -0
- package/dist/chunk-t72dvahb.js +167 -0
- package/dist/chunk-t72dvahb.js.map +12 -0
- package/dist/chunk-tsk2bxs3.js +1254 -0
- package/dist/chunk-tsk2bxs3.js.map +17 -0
- package/dist/chunk-v5c085yp.js +49 -0
- package/dist/chunk-v5c085yp.js.map +10 -0
- package/dist/chunk-vj723r3p.js +146 -0
- package/dist/chunk-vj723r3p.js.map +12 -0
- package/dist/chunk-wj01s5hr.js +363 -0
- package/dist/chunk-wj01s5hr.js.map +11 -0
- package/dist/chunk-wxhdnwh4.js +37 -0
- package/dist/chunk-wxhdnwh4.js.map +10 -0
- package/dist/chunk-xqbtf4wn.js +170 -0
- package/dist/chunk-xqbtf4wn.js.map +10 -0
- package/dist/chunk-xwnf87e1.js +324 -0
- package/dist/chunk-xwnf87e1.js.map +13 -0
- package/dist/chunk-xz5g49bp.js +239 -0
- package/dist/chunk-xz5g49bp.js.map +11 -0
- package/dist/chunk-y64skrwp.js +19 -0
- package/dist/chunk-y64skrwp.js.map +9 -0
- package/dist/chunk-ya6brh8a.js +136 -0
- package/dist/chunk-ya6brh8a.js.map +11 -0
- package/dist/chunk-yt8wphsx.js +12 -0
- package/dist/chunk-yt8wphsx.js.map +10 -0
- package/dist/chunk-yvef9xwc.js +3842 -0
- package/dist/chunk-yvef9xwc.js.map +44 -0
- package/dist/chunk-yxss87qa.js +821 -0
- package/dist/chunk-yxss87qa.js.map +14 -0
- package/dist/connectors/builders.d.ts +10 -0
- package/dist/connectors/builders.d.ts.map +1 -0
- package/dist/connectors/errors.d.ts +14 -0
- package/dist/connectors/errors.d.ts.map +1 -0
- package/dist/connectors/index.d.ts +5 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/runtime.d.ts +13 -0
- package/dist/connectors/runtime.d.ts.map +1 -0
- package/dist/connectors/types.d.ts +39 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/datasets/builders.d.ts +54 -0
- package/dist/datasets/builders.d.ts.map +1 -0
- package/dist/datasets/errors.d.ts +4 -0
- package/dist/datasets/errors.d.ts.map +1 -0
- package/dist/datasets/index.d.ts +5 -0
- package/dist/datasets/index.d.ts.map +1 -0
- package/dist/datasets/types.d.ts +23 -0
- package/dist/datasets/types.d.ts.map +1 -0
- package/dist/datasets/validation.d.ts +8 -0
- package/dist/datasets/validation.d.ts.map +1 -0
- package/dist/edits/errors.d.ts +4 -0
- package/dist/edits/errors.d.ts.map +1 -0
- package/dist/edits/index.d.ts +4 -0
- package/dist/edits/index.d.ts.map +1 -0
- package/dist/edits/index.js +14 -0
- package/dist/edits/index.js.map +9 -0
- package/dist/edits/normalize.d.ts +14 -0
- package/dist/edits/normalize.d.ts.map +1 -0
- package/dist/edits/properties.d.ts +25 -0
- package/dist/edits/properties.d.ts.map +1 -0
- package/dist/edits/recorder.d.ts +4 -0
- package/dist/edits/recorder.d.ts.map +1 -0
- package/dist/edits/types.d.ts +159 -0
- package/dist/edits/types.d.ts.map +1 -0
- package/dist/error-reporting/capability.d.ts +57 -0
- package/dist/error-reporting/capability.d.ts.map +1 -0
- package/dist/error-reporting/internal.d.ts +4 -0
- package/dist/error-reporting/internal.d.ts.map +1 -0
- package/dist/error-reporting/internal.js +24 -0
- package/dist/error-reporting/internal.js.map +9 -0
- package/dist/error-reporting/normalize.d.ts +3 -0
- package/dist/error-reporting/normalize.d.ts.map +1 -0
- package/dist/error-reporting/reporter.d.ts +10 -0
- package/dist/error-reporting/reporter.d.ts.map +1 -0
- package/dist/error-reporting/types.d.ts +112 -0
- package/dist/error-reporting/types.d.ts.map +1 -0
- package/dist/events/definitions.d.ts +76 -0
- package/dist/events/definitions.d.ts.map +1 -0
- package/dist/events/envelope.d.ts +56 -0
- package/dist/events/envelope.d.ts.map +1 -0
- package/dist/events/errors.d.ts +8 -0
- package/dist/events/errors.d.ts.map +1 -0
- package/dist/events/index.d.ts +11 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +68 -0
- package/dist/events/index.js.map +9 -0
- package/dist/events/outbox-dispatcher.d.ts +82 -0
- package/dist/events/outbox-dispatcher.d.ts.map +1 -0
- package/dist/events/property-changes.d.ts +16 -0
- package/dist/events/property-changes.d.ts.map +1 -0
- package/dist/events/runtime.d.ts +87 -0
- package/dist/events/runtime.d.ts.map +1 -0
- package/dist/events/scope.d.ts +25 -0
- package/dist/events/scope.d.ts.map +1 -0
- package/dist/events/scope.js +10 -0
- package/dist/events/scope.js.map +9 -0
- package/dist/events/selectors/builder.d.ts +64 -0
- package/dist/events/selectors/builder.d.ts.map +1 -0
- package/dist/events/selectors/index.d.ts +5 -0
- package/dist/events/selectors/index.d.ts.map +1 -0
- package/dist/events/selectors/index.js +15 -0
- package/dist/events/selectors/index.js.map +9 -0
- package/dist/events/selectors/predicate.d.ts +5 -0
- package/dist/events/selectors/predicate.d.ts.map +1 -0
- package/dist/events/selectors/types.d.ts +141 -0
- package/dist/events/selectors/types.d.ts.map +1 -0
- package/dist/events/toStoredEvent.d.ts +10 -0
- package/dist/events/toStoredEvent.d.ts.map +1 -0
- package/dist/events/types/actions.d.ts +39 -0
- package/dist/events/types/actions.d.ts.map +1 -0
- package/dist/events/types/datasets.d.ts +20 -0
- package/dist/events/types/datasets.d.ts.map +1 -0
- package/dist/events/types/index.d.ts +137 -0
- package/dist/events/types/index.d.ts.map +1 -0
- package/dist/events/types/links.d.ts +37 -0
- package/dist/events/types/links.d.ts.map +1 -0
- package/dist/events/types/objects.d.ts +33 -0
- package/dist/events/types/objects.d.ts.map +1 -0
- package/dist/events/types/pipelines.d.ts +59 -0
- package/dist/events/types/pipelines.d.ts.map +1 -0
- package/dist/events/types/rules.d.ts +28 -0
- package/dist/events/types/rules.d.ts.map +1 -0
- package/dist/events/types/schedules.d.ts +14 -0
- package/dist/events/types/schedules.d.ts.map +1 -0
- package/dist/events/types/syncs.d.ts +25 -0
- package/dist/events/types/syncs.d.ts.map +1 -0
- package/dist/events/types/telemetry.d.ts +17 -0
- package/dist/events/types/telemetry.d.ts.map +1 -0
- package/dist/events/types/workflows.d.ts +150 -0
- package/dist/events/types/workflows.d.ts.map +1 -0
- package/dist/http/api-routes.d.ts +24 -0
- package/dist/http/api-routes.d.ts.map +1 -0
- package/dist/http/index.d.ts +4 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +16 -0
- package/dist/http/index.js.map +9 -0
- package/dist/http/route-pattern.d.ts +14 -0
- package/dist/http/route-pattern.d.ts.map +1 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +430 -0
- package/dist/index.js.map +9 -0
- package/dist/json.d.ts +14 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/lake-storage/definition-updates.d.ts +40 -0
- package/dist/lake-storage/definition-updates.d.ts.map +1 -0
- package/dist/lake-storage/errors.d.ts +7 -0
- package/dist/lake-storage/errors.d.ts.map +1 -0
- package/dist/lake-storage/in-memory.d.ts +25 -0
- package/dist/lake-storage/in-memory.d.ts.map +1 -0
- package/dist/lake-storage/index.d.ts +9 -0
- package/dist/lake-storage/index.d.ts.map +1 -0
- package/dist/lake-storage/index.js +24 -0
- package/dist/lake-storage/index.js.map +9 -0
- package/dist/lake-storage/sql-transforms.d.ts +45 -0
- package/dist/lake-storage/sql-transforms.d.ts.map +1 -0
- package/dist/lake-storage/types.d.ts +114 -0
- package/dist/lake-storage/types.d.ts.map +1 -0
- package/dist/logging/console-logger.d.ts +17 -0
- package/dist/logging/console-logger.d.ts.map +1 -0
- package/dist/logging/index.d.ts +5 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +45 -0
- package/dist/logging/index.js.map +9 -0
- package/dist/logging/record.d.ts +10 -0
- package/dist/logging/record.d.ts.map +1 -0
- package/dist/logging/run-logger.d.ts +61 -0
- package/dist/logging/run-logger.d.ts.map +1 -0
- package/dist/logging/runtime.d.ts +87 -0
- package/dist/logging/runtime.d.ts.map +1 -0
- package/dist/logging/stream.d.ts +24 -0
- package/dist/logging/stream.d.ts.map +1 -0
- package/dist/logging/types.d.ts +82 -0
- package/dist/logging/types.d.ts.map +1 -0
- package/dist/logging/types.js +27 -0
- package/dist/logging/types.js.map +9 -0
- package/dist/maintenance/index.d.ts +3 -0
- package/dist/maintenance/index.d.ts.map +1 -0
- package/dist/maintenance/ontology-maintenance.d.ts +48 -0
- package/dist/maintenance/ontology-maintenance.d.ts.map +1 -0
- package/dist/maintenance/types.d.ts +53 -0
- package/dist/maintenance/types.d.ts.map +1 -0
- package/dist/materialization/dataset-watermark.d.ts +5 -0
- package/dist/materialization/dataset-watermark.d.ts.map +1 -0
- package/dist/materialization/errors.d.ts +37 -0
- package/dist/materialization/errors.d.ts.map +1 -0
- package/dist/materialization/events.d.ts +57 -0
- package/dist/materialization/events.d.ts.map +1 -0
- package/dist/materialization/identity.d.ts +8 -0
- package/dist/materialization/identity.d.ts.map +1 -0
- package/dist/materialization/index.d.ts +13 -0
- package/dist/materialization/index.d.ts.map +1 -0
- package/dist/materialization/index.js +56 -0
- package/dist/materialization/index.js.map +9 -0
- package/dist/materialization/model.d.ts +342 -0
- package/dist/materialization/model.d.ts.map +1 -0
- package/dist/materialization/refs.d.ts +24 -0
- package/dist/materialization/refs.d.ts.map +1 -0
- package/dist/materializer/context.d.ts +34 -0
- package/dist/materializer/context.d.ts.map +1 -0
- package/dist/materializer/edits/apply.d.ts +35 -0
- package/dist/materializer/edits/apply.d.ts.map +1 -0
- package/dist/materializer/edits/commit.d.ts +4 -0
- package/dist/materializer/edits/commit.d.ts.map +1 -0
- package/dist/materializer/edits/execution-units.d.ts +14 -0
- package/dist/materializer/edits/execution-units.d.ts.map +1 -0
- package/dist/materializer/edits/load-state.d.ts +6 -0
- package/dist/materializer/edits/load-state.d.ts.map +1 -0
- package/dist/materializer/edits/operations.d.ts +32 -0
- package/dist/materializer/edits/operations.d.ts.map +1 -0
- package/dist/materializer/edits/plan.d.ts +18 -0
- package/dist/materializer/edits/plan.d.ts.map +1 -0
- package/dist/materializer/edits/read-set.d.ts +8 -0
- package/dist/materializer/edits/read-set.d.ts.map +1 -0
- package/dist/materializer/edits/working-state.d.ts +30 -0
- package/dist/materializer/edits/working-state.d.ts.map +1 -0
- package/dist/materializer/effective/build-events.d.ts +26 -0
- package/dist/materializer/effective/build-events.d.ts.map +1 -0
- package/dist/materializer/effective/diff.d.ts +15 -0
- package/dist/materializer/effective/diff.d.ts.map +1 -0
- package/dist/materializer/effective/load-state.d.ts +7 -0
- package/dist/materializer/effective/load-state.d.ts.map +1 -0
- package/dist/materializer/effective/resolve.d.ts +26 -0
- package/dist/materializer/effective/resolve.d.ts.map +1 -0
- package/dist/materializer/effective/validate.d.ts +11 -0
- package/dist/materializer/effective/validate.d.ts.map +1 -0
- package/dist/materializer/execution/commit-lifecycle.d.ts +8 -0
- package/dist/materializer/execution/commit-lifecycle.d.ts.map +1 -0
- package/dist/materializer/execution/plan-stream.d.ts +8 -0
- package/dist/materializer/execution/plan-stream.d.ts.map +1 -0
- package/dist/materializer/execution/run-correlation.d.ts +19 -0
- package/dist/materializer/execution/run-correlation.d.ts.map +1 -0
- package/dist/materializer/execution/work-executor.d.ts +13 -0
- package/dist/materializer/execution/work-executor.d.ts.map +1 -0
- package/dist/materializer/execution/work-records.d.ts +15 -0
- package/dist/materializer/execution/work-records.d.ts.map +1 -0
- package/dist/materializer/index.d.ts +15 -0
- package/dist/materializer/index.d.ts.map +1 -0
- package/dist/materializer/index.js +134 -0
- package/dist/materializer/index.js.map +9 -0
- package/dist/materializer/materializer.d.ts +27 -0
- package/dist/materializer/materializer.d.ts.map +1 -0
- package/dist/materializer/projections/entry-validator.d.ts +8 -0
- package/dist/materializer/projections/entry-validator.d.ts.map +1 -0
- package/dist/materializer/projections/finish-run.d.ts +4 -0
- package/dist/materializer/projections/finish-run.d.ts.map +1 -0
- package/dist/materializer/projections/replace.d.ts +4 -0
- package/dist/materializer/projections/replace.d.ts.map +1 -0
- package/dist/materializer/projections/replacement-plan.d.ts +14 -0
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -0
- package/dist/materializer/projections/source-materialization.d.ts +27 -0
- package/dist/materializer/projections/source-materialization.d.ts.map +1 -0
- package/dist/materializer/shared/abort.d.ts +2 -0
- package/dist/materializer/shared/abort.d.ts.map +1 -0
- package/dist/materializer/shared/batching.d.ts +11 -0
- package/dist/materializer/shared/batching.d.ts.map +1 -0
- package/dist/materializer/shared/chunking.d.ts +6 -0
- package/dist/materializer/shared/chunking.d.ts.map +1 -0
- package/dist/materializer/shared/identity.d.ts +38 -0
- package/dist/materializer/shared/identity.d.ts.map +1 -0
- package/dist/materializer/shared/normalize.d.ts +10 -0
- package/dist/materializer/shared/normalize.d.ts.map +1 -0
- package/dist/materializer/shared/projection-run.d.ts +19 -0
- package/dist/materializer/shared/projection-run.d.ts.map +1 -0
- package/dist/materializer/telemetry/append.d.ts +4 -0
- package/dist/materializer/telemetry/append.d.ts.map +1 -0
- package/dist/materializer/telemetry/plan.d.ts +12 -0
- package/dist/materializer/telemetry/plan.d.ts.map +1 -0
- package/dist/objects/action/errors.d.ts +39 -0
- package/dist/objects/action/errors.d.ts.map +1 -0
- package/dist/objects/action/index.d.ts +4 -0
- package/dist/objects/action/index.d.ts.map +1 -0
- package/dist/objects/action/request.d.ts +23 -0
- package/dist/objects/action/request.d.ts.map +1 -0
- package/dist/objects/context/index.d.ts +3 -0
- package/dist/objects/context/index.d.ts.map +1 -0
- package/dist/objects/context/resolve.d.ts +27 -0
- package/dist/objects/context/resolve.d.ts.map +1 -0
- package/dist/objects/context/types.d.ts +28 -0
- package/dist/objects/context/types.d.ts.map +1 -0
- package/dist/objects/contexts.d.ts +45 -0
- package/dist/objects/contexts.d.ts.map +1 -0
- package/dist/objects/errors.d.ts +8 -0
- package/dist/objects/errors.d.ts.map +1 -0
- package/dist/objects/helpers.d.ts +7 -0
- package/dist/objects/helpers.d.ts.map +1 -0
- package/dist/objects/index.d.ts +18 -0
- package/dist/objects/index.d.ts.map +1 -0
- package/dist/objects/index.js +71 -0
- package/dist/objects/index.js.map +9 -0
- package/dist/objects/link/authorization.d.ts +25 -0
- package/dist/objects/link/authorization.d.ts.map +1 -0
- package/dist/objects/link/endpoints.d.ts +28 -0
- package/dist/objects/link/endpoints.d.ts.map +1 -0
- package/dist/objects/link/index.d.ts +4 -0
- package/dist/objects/link/index.d.ts.map +1 -0
- package/dist/objects/link/remove.d.ts +8 -0
- package/dist/objects/link/remove.d.ts.map +1 -0
- package/dist/objects/link/upsert-batch.d.ts +11 -0
- package/dist/objects/link/upsert-batch.d.ts.map +1 -0
- package/dist/objects/link/upsert.d.ts +12 -0
- package/dist/objects/link/upsert.d.ts.map +1 -0
- package/dist/objects/materializer-adapter.d.ts +114 -0
- package/dist/objects/materializer-adapter.d.ts.map +1 -0
- package/dist/objects/object/delete.d.ts +17 -0
- package/dist/objects/object/delete.d.ts.map +1 -0
- package/dist/objects/object/index.d.ts +4 -0
- package/dist/objects/object/index.d.ts.map +1 -0
- package/dist/objects/object/upsert-batch.d.ts +7 -0
- package/dist/objects/object/upsert-batch.d.ts.map +1 -0
- package/dist/objects/object/upsert.d.ts +7 -0
- package/dist/objects/object/upsert.d.ts.map +1 -0
- package/dist/objects/query/errors.d.ts +23 -0
- package/dist/objects/query/errors.d.ts.map +1 -0
- package/dist/objects/query/executor.d.ts +63 -0
- package/dist/objects/query/executor.d.ts.map +1 -0
- package/dist/objects/query/explain-format.d.ts +10 -0
- package/dist/objects/query/explain-format.d.ts.map +1 -0
- package/dist/objects/query/explain.d.ts +26 -0
- package/dist/objects/query/explain.d.ts.map +1 -0
- package/dist/objects/query/index.d.ts +14 -0
- package/dist/objects/query/index.d.ts.map +1 -0
- package/dist/objects/query/index.js +54 -0
- package/dist/objects/query/index.js.map +9 -0
- package/dist/objects/query/ir.d.ts +166 -0
- package/dist/objects/query/ir.d.ts.map +1 -0
- package/dist/objects/query/normalize.d.ts +12 -0
- package/dist/objects/query/normalize.d.ts.map +1 -0
- package/dist/objects/query/planner.d.ts +32 -0
- package/dist/objects/query/planner.d.ts.map +1 -0
- package/dist/objects/query/scalar-values.d.ts +6 -0
- package/dist/objects/query/scalar-values.d.ts.map +1 -0
- package/dist/objects/query/validate.d.ts +23 -0
- package/dist/objects/query/validate.d.ts.map +1 -0
- package/dist/objects/runtime-batch.d.ts +29 -0
- package/dist/objects/runtime-batch.d.ts.map +1 -0
- package/dist/objects/sdk/index.d.ts +3 -0
- package/dist/objects/sdk/index.d.ts.map +1 -0
- package/dist/objects/sdk/object-handle.d.ts +6 -0
- package/dist/objects/sdk/object-handle.d.ts.map +1 -0
- package/dist/objects/sdk/object-set.d.ts +14 -0
- package/dist/objects/sdk/object-set.d.ts.map +1 -0
- package/dist/objects/sdk/query-builder.d.ts +20 -0
- package/dist/objects/sdk/query-builder.d.ts.map +1 -0
- package/dist/objects/sdk/query-executor.d.ts +51 -0
- package/dist/objects/sdk/query-executor.d.ts.map +1 -0
- package/dist/objects/sdk/runtime-query-executor.d.ts +16 -0
- package/dist/objects/sdk/runtime-query-executor.d.ts.map +1 -0
- package/dist/objects/sdk/telemetry-channel.d.ts +6 -0
- package/dist/objects/sdk/telemetry-channel.d.ts.map +1 -0
- package/dist/objects/sdk/where.d.ts +15 -0
- package/dist/objects/sdk/where.d.ts.map +1 -0
- package/dist/objects/service/action-service.d.ts +12 -0
- package/dist/objects/service/action-service.d.ts.map +1 -0
- package/dist/objects/service/index.d.ts +7 -0
- package/dist/objects/service/index.d.ts.map +1 -0
- package/dist/objects/service/link-service.d.ts +26 -0
- package/dist/objects/service/link-service.d.ts.map +1 -0
- package/dist/objects/service/list-service.d.ts +24 -0
- package/dist/objects/service/list-service.d.ts.map +1 -0
- package/dist/objects/service/object-service.d.ts +12 -0
- package/dist/objects/service/object-service.d.ts.map +1 -0
- package/dist/objects/service/telemetry-service.d.ts +12 -0
- package/dist/objects/service/telemetry-service.d.ts.map +1 -0
- package/dist/objects/telemetry/append-batch.d.ts +10 -0
- package/dist/objects/telemetry/append-batch.d.ts.map +1 -0
- package/dist/objects/telemetry/history.d.ts +8 -0
- package/dist/objects/telemetry/history.d.ts.map +1 -0
- package/dist/objects/telemetry/index.d.ts +5 -0
- package/dist/objects/telemetry/index.d.ts.map +1 -0
- package/dist/objects/telemetry/write-batch.d.ts +8 -0
- package/dist/objects/telemetry/write-batch.d.ts.map +1 -0
- package/dist/ontology/builders.d.ts +323 -0
- package/dist/ontology/builders.d.ts.map +1 -0
- package/dist/ontology/decimal.d.ts +28 -0
- package/dist/ontology/decimal.d.ts.map +1 -0
- package/dist/ontology/errors.d.ts +20 -0
- package/dist/ontology/errors.d.ts.map +1 -0
- package/dist/ontology/index.d.ts +23 -0
- package/dist/ontology/index.d.ts.map +1 -0
- package/dist/ontology/index.js +120 -0
- package/dist/ontology/index.js.map +9 -0
- package/dist/ontology/inference/index.d.ts +112 -0
- package/dist/ontology/inference/index.d.ts.map +1 -0
- package/dist/ontology/internal.d.ts +4 -0
- package/dist/ontology/internal.d.ts.map +1 -0
- package/dist/ontology/internal.js +118 -0
- package/dist/ontology/internal.js.map +10 -0
- package/dist/ontology/json-schema.d.ts +9 -0
- package/dist/ontology/json-schema.d.ts.map +1 -0
- package/dist/ontology/refs.d.ts +16 -0
- package/dist/ontology/refs.d.ts.map +1 -0
- package/dist/ontology/registry.d.ts +82 -0
- package/dist/ontology/registry.d.ts.map +1 -0
- package/dist/ontology/tokens.d.ts +54 -0
- package/dist/ontology/tokens.d.ts.map +1 -0
- package/dist/ontology/types.d.ts +402 -0
- package/dist/ontology/types.d.ts.map +1 -0
- package/dist/ontology/units/index.d.ts +74 -0
- package/dist/ontology/units/index.d.ts.map +1 -0
- package/dist/ontology/units/quantitative-types.d.ts +1605 -0
- package/dist/ontology/units/quantitative-types.d.ts.map +1 -0
- package/dist/ontology/units/types.d.ts +26 -0
- package/dist/ontology/units/types.d.ts.map +1 -0
- package/dist/ontology/validation/index.d.ts +7 -0
- package/dist/ontology/validation/index.d.ts.map +1 -0
- package/dist/ontology/validation/links.d.ts +18 -0
- package/dist/ontology/validation/links.d.ts.map +1 -0
- package/dist/ontology/validation/normalize.d.ts +21 -0
- package/dist/ontology/validation/normalize.d.ts.map +1 -0
- package/dist/ontology/validation/properties.d.ts +19 -0
- package/dist/ontology/validation/properties.d.ts.map +1 -0
- package/dist/ontology/validation/query.d.ts +3 -0
- package/dist/ontology/validation/query.d.ts.map +1 -0
- package/dist/ontology/validation/schema.d.ts +7 -0
- package/dist/ontology/validation/schema.d.ts.map +1 -0
- package/dist/ontology/validation/telemetry.d.ts +7 -0
- package/dist/ontology/validation/telemetry.d.ts.map +1 -0
- package/dist/pipelines/builders.d.ts +14 -0
- package/dist/pipelines/builders.d.ts.map +1 -0
- package/dist/pipelines/errors.d.ts +4 -0
- package/dist/pipelines/errors.d.ts.map +1 -0
- package/dist/pipelines/index.d.ts +7 -0
- package/dist/pipelines/index.d.ts.map +1 -0
- package/dist/pipelines/request.d.ts +31 -0
- package/dist/pipelines/request.d.ts.map +1 -0
- package/dist/pipelines/types.d.ts +84 -0
- package/dist/pipelines/types.d.ts.map +1 -0
- package/dist/predicates/builders.d.ts +24 -0
- package/dist/predicates/builders.d.ts.map +1 -0
- package/dist/predicates/evaluate.d.ts +8 -0
- package/dist/predicates/evaluate.d.ts.map +1 -0
- package/dist/predicates/index.d.ts +5 -0
- package/dist/predicates/index.d.ts.map +1 -0
- package/dist/predicates/types.d.ts +69 -0
- package/dist/predicates/types.d.ts.map +1 -0
- package/dist/predicates/validation.d.ts +15 -0
- package/dist/predicates/validation.d.ts.map +1 -0
- package/dist/projections/builders.d.ts +212 -0
- package/dist/projections/builders.d.ts.map +1 -0
- package/dist/projections/errors.d.ts +4 -0
- package/dist/projections/errors.d.ts.map +1 -0
- package/dist/projections/index.d.ts +5 -0
- package/dist/projections/index.d.ts.map +1 -0
- package/dist/projections/internal.d.ts +24 -0
- package/dist/projections/internal.d.ts.map +1 -0
- package/dist/projections/internal.js +26 -0
- package/dist/projections/internal.js.map +9 -0
- package/dist/projections/ownership.d.ts +9 -0
- package/dist/projections/ownership.d.ts.map +1 -0
- package/dist/projections/registry.d.ts +30 -0
- package/dist/projections/registry.d.ts.map +1 -0
- package/dist/projections/revision.d.ts +7 -0
- package/dist/projections/revision.d.ts.map +1 -0
- package/dist/projections/types.d.ts +153 -0
- package/dist/projections/types.d.ts.map +1 -0
- package/dist/projections/validation.d.ts +97 -0
- package/dist/projections/validation.d.ts.map +1 -0
- package/dist/provider-scope.d.ts +12 -0
- package/dist/provider-scope.d.ts.map +1 -0
- package/dist/query.d.ts +17 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/query.js +21 -0
- package/dist/query.js.map +9 -0
- package/dist/queues/errors.d.ts +7 -0
- package/dist/queues/errors.d.ts.map +1 -0
- package/dist/queues/in-memory.d.ts +73 -0
- package/dist/queues/in-memory.d.ts.map +1 -0
- package/dist/queues/index.d.ts +5 -0
- package/dist/queues/index.d.ts.map +1 -0
- package/dist/queues/index.js +12 -0
- package/dist/queues/index.js.map +9 -0
- package/dist/queues/types.d.ts +182 -0
- package/dist/queues/types.d.ts.map +1 -0
- package/dist/rules/builders.d.ts +10 -0
- package/dist/rules/builders.d.ts.map +1 -0
- package/dist/rules/dependencies.d.ts +9 -0
- package/dist/rules/dependencies.d.ts.map +1 -0
- package/dist/rules/errors.d.ts +11 -0
- package/dist/rules/errors.d.ts.map +1 -0
- package/dist/rules/index.d.ts +6 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/internal.d.ts +9 -0
- package/dist/rules/internal.d.ts.map +1 -0
- package/dist/rules/internal.js +10 -0
- package/dist/rules/internal.js.map +9 -0
- package/dist/rules/types.d.ts +72 -0
- package/dist/rules/types.d.ts.map +1 -0
- package/dist/rules/validation.d.ts +23 -0
- package/dist/rules/validation.d.ts.map +1 -0
- package/dist/runtime/create.d.ts +68 -0
- package/dist/runtime/create.d.ts.map +1 -0
- package/dist/runtime/errors.d.ts +9 -0
- package/dist/runtime/errors.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +26 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/internal.d.ts +3 -0
- package/dist/runtime/internal.d.ts.map +1 -0
- package/dist/runtime/internal.js +16 -0
- package/dist/runtime/internal.js.map +9 -0
- package/dist/runtime/ontology-mutations.d.ts +16 -0
- package/dist/runtime/ontology-mutations.d.ts.map +1 -0
- package/dist/runtime/scoped.d.ts +158 -0
- package/dist/runtime/scoped.d.ts.map +1 -0
- package/dist/runtime/sixb.d.ts +226 -0
- package/dist/runtime/sixb.d.ts.map +1 -0
- package/dist/runtime/storage-readiness.d.ts +20 -0
- package/dist/runtime/storage-readiness.d.ts.map +1 -0
- package/dist/runtime/types.d.ts +840 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/sandboxes/errors.d.ts +20 -0
- package/dist/sandboxes/errors.d.ts.map +1 -0
- package/dist/sandboxes/exec.d.ts +17 -0
- package/dist/sandboxes/exec.d.ts.map +1 -0
- package/dist/sandboxes/index.d.ts +5 -0
- package/dist/sandboxes/index.d.ts.map +1 -0
- package/dist/sandboxes/index.js +18 -0
- package/dist/sandboxes/index.js.map +9 -0
- package/dist/sandboxes/sandbox.d.ts +110 -0
- package/dist/sandboxes/sandbox.d.ts.map +1 -0
- package/dist/scheduler/errors.d.ts +7 -0
- package/dist/scheduler/errors.d.ts.map +1 -0
- package/dist/scheduler/index.d.ts +4 -0
- package/dist/scheduler/index.d.ts.map +1 -0
- package/dist/scheduler/index.js +18 -0
- package/dist/scheduler/index.js.map +9 -0
- package/dist/scheduler/runtime.d.ts +32 -0
- package/dist/scheduler/runtime.d.ts.map +1 -0
- package/dist/schedules/builders.d.ts +4 -0
- package/dist/schedules/builders.d.ts.map +1 -0
- package/dist/schedules/cron.d.ts +14 -0
- package/dist/schedules/cron.d.ts.map +1 -0
- package/dist/schedules/errors.d.ts +7 -0
- package/dist/schedules/errors.d.ts.map +1 -0
- package/dist/schedules/index.d.ts +12 -0
- package/dist/schedules/index.d.ts.map +1 -0
- package/dist/schedules/index.js +37 -0
- package/dist/schedules/index.js.map +9 -0
- package/dist/schedules/next-occurrence.d.ts +11 -0
- package/dist/schedules/next-occurrence.d.ts.map +1 -0
- package/dist/schedules/runtime.d.ts +17 -0
- package/dist/schedules/runtime.d.ts.map +1 -0
- package/dist/schedules/types.d.ts +99 -0
- package/dist/schedules/types.d.ts.map +1 -0
- package/dist/schedules/validation.d.ts +13 -0
- package/dist/schedules/validation.d.ts.map +1 -0
- package/dist/security/applications.d.ts +15 -0
- package/dist/security/applications.d.ts.map +1 -0
- package/dist/security/builders.d.ts +20 -0
- package/dist/security/builders.d.ts.map +1 -0
- package/dist/security/errors.d.ts +4 -0
- package/dist/security/errors.d.ts.map +1 -0
- package/dist/security/every.d.ts +68 -0
- package/dist/security/every.d.ts.map +1 -0
- package/dist/security/grants.d.ts +40 -0
- package/dist/security/grants.d.ts.map +1 -0
- package/dist/security/index.d.ts +12 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/membership-policies.d.ts +17 -0
- package/dist/security/membership-policies.d.ts.map +1 -0
- package/dist/security/runtime.d.ts +16 -0
- package/dist/security/runtime.d.ts.map +1 -0
- package/dist/security/types.d.ts +133 -0
- package/dist/security/types.d.ts.map +1 -0
- package/dist/security/validation.d.ts +36 -0
- package/dist/security/validation.d.ts.map +1 -0
- package/dist/storage/action-runs/errors.d.ts +10 -0
- package/dist/storage/action-runs/errors.d.ts.map +1 -0
- package/dist/storage/action-runs/idempotency.d.ts +10 -0
- package/dist/storage/action-runs/idempotency.d.ts.map +1 -0
- package/dist/storage/action-runs/in-memory.d.ts +28 -0
- package/dist/storage/action-runs/in-memory.d.ts.map +1 -0
- package/dist/storage/action-runs/index.d.ts +6 -0
- package/dist/storage/action-runs/index.d.ts.map +1 -0
- package/dist/storage/action-runs/types.d.ts +138 -0
- package/dist/storage/action-runs/types.d.ts.map +1 -0
- package/dist/storage/agents/errors.d.ts +11 -0
- package/dist/storage/agents/errors.d.ts.map +1 -0
- package/dist/storage/agents/in-memory.d.ts +70 -0
- package/dist/storage/agents/in-memory.d.ts.map +1 -0
- package/dist/storage/agents/index.d.ts +7 -0
- package/dist/storage/agents/index.d.ts.map +1 -0
- package/dist/storage/agents/types.d.ts +295 -0
- package/dist/storage/agents/types.d.ts.map +1 -0
- package/dist/storage/auth/errors.d.ts +10 -0
- package/dist/storage/auth/errors.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/access-tokens.d.ts +32 -0
- package/dist/storage/auth/in-memory/access-tokens.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/auth-storage.d.ts +36 -0
- package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/group-memberships.d.ts +21 -0
- package/dist/storage/auth/in-memory/group-memberships.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/identities.d.ts +17 -0
- package/dist/storage/auth/in-memory/identities.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/index.d.ts +2 -0
- package/dist/storage/auth/in-memory/index.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/invitations.d.ts +28 -0
- package/dist/storage/auth/in-memory/invitations.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/magic-links.d.ts +28 -0
- package/dist/storage/auth/in-memory/magic-links.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/oidc-attempts.d.ts +18 -0
- package/dist/storage/auth/in-memory/oidc-attempts.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/service-account-group-memberships.d.ts +17 -0
- package/dist/storage/auth/in-memory/service-account-group-memberships.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/service-accounts.d.ts +14 -0
- package/dist/storage/auth/in-memory/service-accounts.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/sessions.d.ts +55 -0
- package/dist/storage/auth/in-memory/sessions.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/shared.d.ts +71 -0
- package/dist/storage/auth/in-memory/shared.d.ts.map +1 -0
- package/dist/storage/auth/in-memory/users.d.ts +19 -0
- package/dist/storage/auth/in-memory/users.d.ts.map +1 -0
- package/dist/storage/auth/in-memory.d.ts +2 -0
- package/dist/storage/auth/in-memory.d.ts.map +1 -0
- package/dist/storage/auth/index.d.ts +5 -0
- package/dist/storage/auth/index.d.ts.map +1 -0
- package/dist/storage/auth/types.d.ts +584 -0
- package/dist/storage/auth/types.d.ts.map +1 -0
- package/dist/storage/errors.d.ts +27 -0
- package/dist/storage/errors.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/errors.d.ts +15 -0
- package/dist/storage/file-upload-sessions/errors.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/in-memory.d.ts +27 -0
- package/dist/storage/file-upload-sessions/in-memory.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/index.d.ts +6 -0
- package/dist/storage/file-upload-sessions/index.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/types.d.ts +53 -0
- package/dist/storage/file-upload-sessions/types.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/utils.d.ts +11 -0
- package/dist/storage/file-upload-sessions/utils.d.ts.map +1 -0
- package/dist/storage/in-memory/index.d.ts +105 -0
- package/dist/storage/in-memory/index.d.ts.map +1 -0
- package/dist/storage/in-memory/testing.d.ts +8 -0
- package/dist/storage/in-memory/testing.d.ts.map +1 -0
- package/dist/storage/index.d.ts +44 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +144 -0
- package/dist/storage/index.js.map +9 -0
- package/dist/storage/migrations/check-schema.d.ts +19 -0
- package/dist/storage/migrations/check-schema.d.ts.map +1 -0
- package/dist/storage/migrations/index.d.ts +5 -0
- package/dist/storage/migrations/index.d.ts.map +1 -0
- package/dist/storage/migrations/migrate-storage.d.ts +6 -0
- package/dist/storage/migrations/migrate-storage.d.ts.map +1 -0
- package/dist/storage/migrations/migration-set.d.ts +27 -0
- package/dist/storage/migrations/migration-set.d.ts.map +1 -0
- package/dist/storage/migrations/types.d.ts +115 -0
- package/dist/storage/migrations/types.d.ts.map +1 -0
- package/dist/storage/objects/in-memory.d.ts +126 -0
- package/dist/storage/objects/in-memory.d.ts.map +1 -0
- package/dist/storage/objects/index.d.ts +2 -0
- package/dist/storage/objects/index.d.ts.map +1 -0
- package/dist/storage/objects/types.d.ts +222 -0
- package/dist/storage/objects/types.d.ts.map +1 -0
- package/dist/storage/ontology/commits.d.ts +117 -0
- package/dist/storage/ontology/commits.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/commits.d.ts +12 -0
- package/dist/storage/ontology/in-memory/commits.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/index.d.ts +36 -0
- package/dist/storage/ontology/in-memory/index.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/materializations-finalization.d.ts +5 -0
- package/dist/storage/ontology/in-memory/materializations-finalization.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/materializations-state.d.ts +20 -0
- package/dist/storage/ontology/in-memory/materializations-state.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/materializations-work.d.ts +6 -0
- package/dist/storage/ontology/in-memory/materializations-work.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/materializations.d.ts +101 -0
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/outbox.d.ts +19 -0
- package/dist/storage/ontology/in-memory/outbox.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/shared-state.d.ts +48 -0
- package/dist/storage/ontology/in-memory/shared-state.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/sources.d.ts +23 -0
- package/dist/storage/ontology/in-memory/sources.d.ts.map +1 -0
- package/dist/storage/ontology/in-memory/testing.d.ts +11 -0
- package/dist/storage/ontology/in-memory/testing.d.ts.map +1 -0
- package/dist/storage/ontology/index.d.ts +16 -0
- package/dist/storage/ontology/index.d.ts.map +1 -0
- package/dist/storage/ontology/materializations.d.ts +333 -0
- package/dist/storage/ontology/materializations.d.ts.map +1 -0
- package/dist/storage/ontology/outbox.d.ts +66 -0
- package/dist/storage/ontology/outbox.d.ts.map +1 -0
- package/dist/storage/ontology/provider-header-validation.d.ts +4 -0
- package/dist/storage/ontology/provider-header-validation.d.ts.map +1 -0
- package/dist/storage/ontology/provider-validation.d.ts +6 -0
- package/dist/storage/ontology/provider-validation.d.ts.map +1 -0
- package/dist/storage/ontology/provider-work.d.ts +12 -0
- package/dist/storage/ontology/provider-work.d.ts.map +1 -0
- package/dist/storage/ontology/provider.d.ts +191 -0
- package/dist/storage/ontology/provider.d.ts.map +1 -0
- package/dist/storage/ontology/provider.js +115 -0
- package/dist/storage/ontology/provider.js.map +9 -0
- package/dist/storage/ontology/sources.d.ts +151 -0
- package/dist/storage/ontology/sources.d.ts.map +1 -0
- package/dist/storage/operation-scope.d.ts +32 -0
- package/dist/storage/operation-scope.d.ts.map +1 -0
- package/dist/storage/operation-scope.js +22 -0
- package/dist/storage/operation-scope.js.map +9 -0
- package/dist/storage/pagination.d.ts +11 -0
- package/dist/storage/pagination.d.ts.map +1 -0
- package/dist/storage/pipeline-runs/errors.d.ts +7 -0
- package/dist/storage/pipeline-runs/errors.d.ts.map +1 -0
- package/dist/storage/pipeline-runs/in-memory.d.ts +26 -0
- package/dist/storage/pipeline-runs/in-memory.d.ts.map +1 -0
- package/dist/storage/pipeline-runs/index.d.ts +4 -0
- package/dist/storage/pipeline-runs/index.d.ts.map +1 -0
- package/dist/storage/pipeline-runs/types.d.ts +133 -0
- package/dist/storage/pipeline-runs/types.d.ts.map +1 -0
- package/dist/storage/projection-runs/errors.d.ts +9 -0
- package/dist/storage/projection-runs/errors.d.ts.map +1 -0
- package/dist/storage/projection-runs/in-memory.d.ts +42 -0
- package/dist/storage/projection-runs/in-memory.d.ts.map +1 -0
- package/dist/storage/projection-runs/index.d.ts +5 -0
- package/dist/storage/projection-runs/index.d.ts.map +1 -0
- package/dist/storage/projection-runs/lifecycle.d.ts +93 -0
- package/dist/storage/projection-runs/lifecycle.d.ts.map +1 -0
- package/dist/storage/projection-runs/lifecycle.js +64 -0
- package/dist/storage/projection-runs/lifecycle.js.map +9 -0
- package/dist/storage/projection-runs/types.d.ts +175 -0
- package/dist/storage/projection-runs/types.d.ts.map +1 -0
- package/dist/storage/rules/in-memory.d.ts +26 -0
- package/dist/storage/rules/in-memory.d.ts.map +1 -0
- package/dist/storage/rules/index.d.ts +3 -0
- package/dist/storage/rules/index.d.ts.map +1 -0
- package/dist/storage/rules/types.d.ts +60 -0
- package/dist/storage/rules/types.d.ts.map +1 -0
- package/dist/storage/run-listing.d.ts +36 -0
- package/dist/storage/run-listing.d.ts.map +1 -0
- package/dist/storage/sync-runs/errors.d.ts +8 -0
- package/dist/storage/sync-runs/errors.d.ts.map +1 -0
- package/dist/storage/sync-runs/in-memory.d.ts +16 -0
- package/dist/storage/sync-runs/in-memory.d.ts.map +1 -0
- package/dist/storage/sync-runs/index.d.ts +4 -0
- package/dist/storage/sync-runs/index.d.ts.map +1 -0
- package/dist/storage/sync-runs/types.d.ts +85 -0
- package/dist/storage/sync-runs/types.d.ts.map +1 -0
- package/dist/storage/timeseries/index.d.ts +2 -0
- package/dist/storage/timeseries/index.d.ts.map +1 -0
- package/dist/storage/timeseries/store.d.ts +46 -0
- package/dist/storage/timeseries/store.d.ts.map +1 -0
- package/dist/storage/timeseries/types.d.ts +50 -0
- package/dist/storage/timeseries/types.d.ts.map +1 -0
- package/dist/storage/transaction.d.ts +4 -0
- package/dist/storage/transaction.d.ts.map +1 -0
- package/dist/storage/types.d.ts +78 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/webhook-deliveries/in-memory.d.ts +18 -0
- package/dist/storage/webhook-deliveries/in-memory.d.ts.map +1 -0
- package/dist/storage/webhook-deliveries/index.d.ts +3 -0
- package/dist/storage/webhook-deliveries/index.d.ts.map +1 -0
- package/dist/storage/webhook-deliveries/types.d.ts +43 -0
- package/dist/storage/webhook-deliveries/types.d.ts.map +1 -0
- package/dist/storage/webhook-runs/errors.d.ts +7 -0
- package/dist/storage/webhook-runs/errors.d.ts.map +1 -0
- package/dist/storage/webhook-runs/in-memory.d.ts +16 -0
- package/dist/storage/webhook-runs/in-memory.d.ts.map +1 -0
- package/dist/storage/webhook-runs/index.d.ts +4 -0
- package/dist/storage/webhook-runs/index.d.ts.map +1 -0
- package/dist/storage/webhook-runs/types.d.ts +66 -0
- package/dist/storage/webhook-runs/types.d.ts.map +1 -0
- package/dist/storage/workflow-interventions/errors.d.ts +7 -0
- package/dist/storage/workflow-interventions/errors.d.ts.map +1 -0
- package/dist/storage/workflow-interventions/in-memory.d.ts +18 -0
- package/dist/storage/workflow-interventions/in-memory.d.ts.map +1 -0
- package/dist/storage/workflow-interventions/index.d.ts +4 -0
- package/dist/storage/workflow-interventions/index.d.ts.map +1 -0
- package/dist/storage/workflow-interventions/types.d.ts +94 -0
- package/dist/storage/workflow-interventions/types.d.ts.map +1 -0
- package/dist/storage/workflow-runs/errors.d.ts +7 -0
- package/dist/storage/workflow-runs/errors.d.ts.map +1 -0
- package/dist/storage/workflow-runs/in-memory.d.ts +83 -0
- package/dist/storage/workflow-runs/in-memory.d.ts.map +1 -0
- package/dist/storage/workflow-runs/index.d.ts +4 -0
- package/dist/storage/workflow-runs/index.d.ts.map +1 -0
- package/dist/storage/workflow-runs/types.d.ts +305 -0
- package/dist/storage/workflow-runs/types.d.ts.map +1 -0
- package/dist/syncs/builders.d.ts +9 -0
- package/dist/syncs/builders.d.ts.map +1 -0
- package/dist/syncs/errors.d.ts +4 -0
- package/dist/syncs/errors.d.ts.map +1 -0
- package/dist/syncs/index.d.ts +7 -0
- package/dist/syncs/index.d.ts.map +1 -0
- package/dist/syncs/request.d.ts +41 -0
- package/dist/syncs/request.d.ts.map +1 -0
- package/dist/syncs/types.d.ts +76 -0
- package/dist/syncs/types.d.ts.map +1 -0
- package/dist/testing/agent-storage-contract.d.ts +16 -0
- package/dist/testing/agent-storage-contract.d.ts.map +1 -0
- package/dist/testing/auth-storage-contract.d.ts +16 -0
- package/dist/testing/auth-storage-contract.d.ts.map +1 -0
- package/dist/testing/blob-storage-contract.d.ts +10 -0
- package/dist/testing/blob-storage-contract.d.ts.map +1 -0
- package/dist/testing/broker-contract.d.ts +39 -0
- package/dist/testing/broker-contract.d.ts.map +1 -0
- package/dist/testing/effective-storage-contract.d.ts +7 -0
- package/dist/testing/effective-storage-contract.d.ts.map +1 -0
- package/dist/testing/index.d.ts +15 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +7000 -0
- package/dist/testing/index.js.map +24 -0
- package/dist/testing/lake-storage-contract.d.ts +29 -0
- package/dist/testing/lake-storage-contract.d.ts.map +1 -0
- package/dist/testing/materialization-failure-contract.d.ts +26 -0
- package/dist/testing/materialization-failure-contract.d.ts.map +1 -0
- package/dist/testing/materializer-fixture.d.ts +35 -0
- package/dist/testing/materializer-fixture.d.ts.map +1 -0
- package/dist/testing/materializer-storage-contract.d.ts +7 -0
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -0
- package/dist/testing/object-query-contract.d.ts +21 -0
- package/dist/testing/object-query-contract.d.ts.map +1 -0
- package/dist/testing/ontology-contract-fixture.d.ts +33 -0
- package/dist/testing/ontology-contract-fixture.d.ts.map +1 -0
- package/dist/testing/ontology-storage-contract.d.ts +21 -0
- package/dist/testing/ontology-storage-contract.d.ts.map +1 -0
- package/dist/testing/projection-run-storage-contract.d.ts +10 -0
- package/dist/testing/projection-run-storage-contract.d.ts.map +1 -0
- package/dist/testing/queues-contract.d.ts +31 -0
- package/dist/testing/queues-contract.d.ts.map +1 -0
- package/dist/testing/sandboxes-contract.d.ts +31 -0
- package/dist/testing/sandboxes-contract.d.ts.map +1 -0
- package/dist/tsconfig.json +5 -0
- package/dist/webhooks/builders.d.ts +41 -0
- package/dist/webhooks/builders.d.ts.map +1 -0
- package/dist/webhooks/connector.d.ts +10 -0
- package/dist/webhooks/connector.d.ts.map +1 -0
- package/dist/webhooks/errors.d.ts +4 -0
- package/dist/webhooks/errors.d.ts.map +1 -0
- package/dist/webhooks/index.d.ts +9 -0
- package/dist/webhooks/index.d.ts.map +1 -0
- package/dist/webhooks/registry.d.ts +7 -0
- package/dist/webhooks/registry.d.ts.map +1 -0
- package/dist/webhooks/types.d.ts +79 -0
- package/dist/webhooks/types.d.ts.map +1 -0
- package/dist/webhooks/unverified.d.ts +57 -0
- package/dist/webhooks/unverified.d.ts.map +1 -0
- package/dist/workers/errors.d.ts +17 -0
- package/dist/workers/errors.d.ts.map +1 -0
- package/dist/workers/index.d.ts +7 -0
- package/dist/workers/index.d.ts.map +1 -0
- package/dist/workers/index.js +506 -0
- package/dist/workers/index.js.map +13 -0
- package/dist/workers/queue-delivery.d.ts +38 -0
- package/dist/workers/queue-delivery.d.ts.map +1 -0
- package/dist/workers/queue-worker.d.ts +30 -0
- package/dist/workers/queue-worker.d.ts.map +1 -0
- package/dist/workers/worker.d.ts +14 -0
- package/dist/workers/worker.d.ts.map +1 -0
- package/dist/workflows/builders.d.ts +27 -0
- package/dist/workflows/builders.d.ts.map +1 -0
- package/dist/workflows/errors.d.ts +11 -0
- package/dist/workflows/errors.d.ts.map +1 -0
- package/dist/workflows/index.d.ts +9 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/index.js +108 -0
- package/dist/workflows/index.js.map +9 -0
- package/dist/workflows/request.d.ts +29 -0
- package/dist/workflows/request.d.ts.map +1 -0
- package/dist/workflows/runtime.d.ts +33 -0
- package/dist/workflows/runtime.d.ts.map +1 -0
- package/dist/workflows/snapshot.d.ts +55 -0
- package/dist/workflows/snapshot.d.ts.map +1 -0
- package/dist/workflows/types.d.ts +288 -0
- package/dist/workflows/types.d.ts.map +1 -0
- package/dist/workflows/validation.d.ts +66 -0
- package/dist/workflows/validation.d.ts.map +1 -0
- package/package.json +312 -0
- package/src/actions/builders/define-action.ts +243 -0
- package/src/actions/builders/params.ts +48 -0
- package/src/actions/builders.ts +2 -0
- package/src/actions/commit-edits.ts +110 -0
- package/src/actions/errors.ts +15 -0
- package/src/actions/index.ts +75 -0
- package/src/actions/read-facade.ts +224 -0
- package/src/actions/registry.ts +135 -0
- package/src/actions/request.ts +407 -0
- package/src/actions/run-id.ts +17 -0
- package/src/actions/runtime.ts +31 -0
- package/src/actions/types/context.ts +224 -0
- package/src/actions/types/definitions.ts +181 -0
- package/src/actions/types/handlers.ts +68 -0
- package/src/actions/types/params.ts +82 -0
- package/src/actions/types.ts +4 -0
- package/src/actions/validation.ts +186 -0
- package/src/actions/validators.ts +56 -0
- package/src/actions/worker.ts +2 -0
- package/src/agents/adapters.ts +647 -0
- package/src/agents/api-gateway.ts +57 -0
- package/src/agents/builders.ts +46 -0
- package/src/agents/context-model.ts +41 -0
- package/src/agents/context-resolution.ts +43 -0
- package/src/agents/context.ts +185 -0
- package/src/agents/dispatch.ts +107 -0
- package/src/agents/errors.ts +40 -0
- package/src/agents/ids.ts +24 -0
- package/src/agents/index.ts +122 -0
- package/src/agents/message.ts +91 -0
- package/src/agents/prompt.ts +45 -0
- package/src/agents/request.ts +198 -0
- package/src/agents/runtime.ts +124 -0
- package/src/agents/streams.ts +194 -0
- package/src/agents/types.ts +70 -0
- package/src/agents/validation.ts +151 -0
- package/src/auth/access-tokens.ts +125 -0
- package/src/auth/audience.ts +28 -0
- package/src/auth/cookies.ts +263 -0
- package/src/auth/csrf.ts +41 -0
- package/src/auth/errors.ts +19 -0
- package/src/auth/index.ts +149 -0
- package/src/auth/runtime.ts +1642 -0
- package/src/auth/session-cache.ts +112 -0
- package/src/auth/sessions.ts +55 -0
- package/src/auth/strategy.ts +46 -0
- package/src/auth/types.ts +573 -0
- package/src/auth/validation.ts +241 -0
- package/src/authorization/application-access.ts +34 -0
- package/src/authorization/decision.ts +215 -0
- package/src/authorization/errors.ts +12 -0
- package/src/authorization/event-visibility.ts +99 -0
- package/src/authorization/grant-kinds.ts +149 -0
- package/src/authorization/index.ts +24 -0
- package/src/authorization/resolve.ts +101 -0
- package/src/authorization/run-visibility.ts +78 -0
- package/src/authorization/types.ts +52 -0
- package/src/blob-storage/browser.ts +28 -0
- package/src/blob-storage/constants.ts +9 -0
- package/src/blob-storage/derive.ts +13 -0
- package/src/blob-storage/errors.ts +6 -0
- package/src/blob-storage/in-memory.ts +74 -0
- package/src/blob-storage/index.ts +37 -0
- package/src/blob-storage/types.ts +143 -0
- package/src/blob-storage/utils.ts +126 -0
- package/src/blob-storage/validation.ts +58 -0
- package/src/bootstrap/discovery.ts +507 -0
- package/src/bootstrap/index.ts +26 -0
- package/src/bootstrap/ontology-type-manifest.ts +316 -0
- package/src/broker/errors.ts +15 -0
- package/src/broker/in-memory.ts +511 -0
- package/src/broker/index.ts +12 -0
- package/src/broker/types.ts +129 -0
- package/src/connectors/builders.ts +33 -0
- package/src/connectors/errors.ts +15 -0
- package/src/connectors/index.ts +9 -0
- package/src/connectors/runtime.ts +100 -0
- package/src/connectors/types.ts +64 -0
- package/src/datasets/builders.ts +233 -0
- package/src/datasets/errors.ts +3 -0
- package/src/datasets/index.ts +13 -0
- package/src/datasets/types.ts +52 -0
- package/src/datasets/validation.ts +251 -0
- package/src/edits/errors.ts +6 -0
- package/src/edits/index.ts +24 -0
- package/src/edits/normalize.ts +87 -0
- package/src/edits/properties.ts +153 -0
- package/src/edits/recorder.ts +312 -0
- package/src/edits/types.ts +275 -0
- package/src/error-reporting/capability.ts +160 -0
- package/src/error-reporting/internal.ts +13 -0
- package/src/error-reporting/normalize.ts +35 -0
- package/src/error-reporting/reporter.ts +65 -0
- package/src/error-reporting/types.ts +125 -0
- package/src/events/definitions.ts +241 -0
- package/src/events/envelope.ts +68 -0
- package/src/events/errors.ts +7 -0
- package/src/events/index.ts +167 -0
- package/src/events/outbox-dispatcher.ts +534 -0
- package/src/events/property-changes.ts +9 -0
- package/src/events/runtime.ts +401 -0
- package/src/events/scope.ts +71 -0
- package/src/events/selectors/builder.ts +531 -0
- package/src/events/selectors/index.ts +42 -0
- package/src/events/selectors/predicate.ts +91 -0
- package/src/events/selectors/types.ts +258 -0
- package/src/events/toStoredEvent.ts +35 -0
- package/src/events/types/actions.ts +42 -0
- package/src/events/types/datasets.ts +21 -0
- package/src/events/types/index.ts +206 -0
- package/src/events/types/links.ts +42 -0
- package/src/events/types/objects.ts +38 -0
- package/src/events/types/pipelines.ts +67 -0
- package/src/events/types/rules.ts +31 -0
- package/src/events/types/schedules.ts +15 -0
- package/src/events/types/syncs.ts +27 -0
- package/src/events/types/telemetry.ts +19 -0
- package/src/events/types/workflows.ts +172 -0
- package/src/http/api-routes.ts +384 -0
- package/src/http/index.ts +3 -0
- package/src/http/route-pattern.ts +37 -0
- package/src/index.ts +916 -0
- package/src/json.ts +137 -0
- package/src/lake-storage/definition-updates.ts +263 -0
- package/src/lake-storage/errors.ts +6 -0
- package/src/lake-storage/in-memory.ts +348 -0
- package/src/lake-storage/index.ts +48 -0
- package/src/lake-storage/sql-transforms.ts +67 -0
- package/src/lake-storage/types.ts +135 -0
- package/src/logging/console-logger.ts +63 -0
- package/src/logging/index.ts +43 -0
- package/src/logging/record.ts +126 -0
- package/src/logging/run-logger.ts +350 -0
- package/src/logging/runtime.ts +341 -0
- package/src/logging/stream.ts +38 -0
- package/src/logging/types.ts +156 -0
- package/src/maintenance/index.ts +9 -0
- package/src/maintenance/ontology-maintenance.ts +351 -0
- package/src/maintenance/types.ts +57 -0
- package/src/materialization/dataset-watermark.ts +52 -0
- package/src/materialization/errors.ts +73 -0
- package/src/materialization/events.ts +92 -0
- package/src/materialization/identity.ts +36 -0
- package/src/materialization/index.ts +75 -0
- package/src/materialization/model.ts +394 -0
- package/src/materialization/refs.ts +134 -0
- package/src/materializer/README.md +130 -0
- package/src/materializer/context.ts +75 -0
- package/src/materializer/edits/apply.ts +241 -0
- package/src/materializer/edits/commit.ts +311 -0
- package/src/materializer/edits/execution-units.ts +32 -0
- package/src/materializer/edits/load-state.ts +148 -0
- package/src/materializer/edits/operations.ts +298 -0
- package/src/materializer/edits/plan.ts +192 -0
- package/src/materializer/edits/read-set.ts +79 -0
- package/src/materializer/edits/working-state.ts +171 -0
- package/src/materializer/effective/build-events.ts +197 -0
- package/src/materializer/effective/diff.ts +169 -0
- package/src/materializer/effective/load-state.ts +75 -0
- package/src/materializer/effective/resolve.ts +96 -0
- package/src/materializer/effective/validate.ts +180 -0
- package/src/materializer/execution/commit-lifecycle.ts +57 -0
- package/src/materializer/execution/plan-stream.ts +97 -0
- package/src/materializer/execution/run-correlation.ts +73 -0
- package/src/materializer/execution/work-executor.ts +143 -0
- package/src/materializer/execution/work-records.ts +186 -0
- package/src/materializer/index.ts +109 -0
- package/src/materializer/materializer.ts +64 -0
- package/src/materializer/projections/entry-validator.ts +162 -0
- package/src/materializer/projections/finish-run.ts +194 -0
- package/src/materializer/projections/replace.ts +447 -0
- package/src/materializer/projections/replacement-plan.ts +376 -0
- package/src/materializer/projections/source-materialization.ts +99 -0
- package/src/materializer/shared/abort.ts +7 -0
- package/src/materializer/shared/batching.ts +32 -0
- package/src/materializer/shared/chunking.ts +27 -0
- package/src/materializer/shared/identity.ts +141 -0
- package/src/materializer/shared/normalize.ts +527 -0
- package/src/materializer/shared/projection-run.ts +61 -0
- package/src/materializer/telemetry/append.ts +503 -0
- package/src/materializer/telemetry/plan.ts +363 -0
- package/src/objects/action/errors.ts +56 -0
- package/src/objects/action/index.ts +3 -0
- package/src/objects/action/request.ts +63 -0
- package/src/objects/context/index.ts +6 -0
- package/src/objects/context/resolve.ts +51 -0
- package/src/objects/context/types.ts +31 -0
- package/src/objects/contexts.ts +64 -0
- package/src/objects/errors.ts +7 -0
- package/src/objects/helpers.ts +18 -0
- package/src/objects/index.ts +26 -0
- package/src/objects/link/authorization.ts +26 -0
- package/src/objects/link/endpoints.ts +66 -0
- package/src/objects/link/index.ts +3 -0
- package/src/objects/link/remove.ts +42 -0
- package/src/objects/link/upsert-batch.ts +80 -0
- package/src/objects/link/upsert.ts +56 -0
- package/src/objects/materializer-adapter.ts +307 -0
- package/src/objects/object/delete.ts +47 -0
- package/src/objects/object/index.ts +3 -0
- package/src/objects/object/upsert-batch.ts +57 -0
- package/src/objects/object/upsert.ts +38 -0
- package/src/objects/query/errors.ts +55 -0
- package/src/objects/query/executor.ts +1345 -0
- package/src/objects/query/explain-format.ts +34 -0
- package/src/objects/query/explain.ts +215 -0
- package/src/objects/query/index.ts +77 -0
- package/src/objects/query/ir.ts +211 -0
- package/src/objects/query/normalize.ts +245 -0
- package/src/objects/query/planner.ts +538 -0
- package/src/objects/query/scalar-values.ts +100 -0
- package/src/objects/query/validate.ts +1276 -0
- package/src/objects/runtime-batch.ts +105 -0
- package/src/objects/sdk/index.ts +2 -0
- package/src/objects/sdk/object-handle.ts +139 -0
- package/src/objects/sdk/object-set.ts +224 -0
- package/src/objects/sdk/query-builder.ts +386 -0
- package/src/objects/sdk/query-executor.ts +62 -0
- package/src/objects/sdk/runtime-query-executor.ts +88 -0
- package/src/objects/sdk/telemetry-channel.ts +81 -0
- package/src/objects/sdk/where.ts +87 -0
- package/src/objects/service/action-service.ts +40 -0
- package/src/objects/service/index.ts +6 -0
- package/src/objects/service/link-service.ts +74 -0
- package/src/objects/service/list-service.ts +89 -0
- package/src/objects/service/object-service.ts +28 -0
- package/src/objects/service/telemetry-service.ts +17 -0
- package/src/objects/telemetry/append-batch.ts +74 -0
- package/src/objects/telemetry/history.ts +32 -0
- package/src/objects/telemetry/index.ts +4 -0
- package/src/objects/telemetry/write-batch.ts +52 -0
- package/src/ontology/builders.ts +695 -0
- package/src/ontology/decimal.ts +120 -0
- package/src/ontology/errors.ts +25 -0
- package/src/ontology/index.ts +80 -0
- package/src/ontology/inference/index.ts +215 -0
- package/src/ontology/internal.ts +3 -0
- package/src/ontology/json-schema.ts +123 -0
- package/src/ontology/refs.ts +80 -0
- package/src/ontology/registry.ts +417 -0
- package/src/ontology/tokens.ts +113 -0
- package/src/ontology/types.ts +436 -0
- package/src/ontology/units/index.ts +115 -0
- package/src/ontology/units/quantitative-types.ts +608 -0
- package/src/ontology/units/types.ts +27 -0
- package/src/ontology/validation/index.ts +36 -0
- package/src/ontology/validation/links.ts +126 -0
- package/src/ontology/validation/normalize.ts +215 -0
- package/src/ontology/validation/properties.ts +235 -0
- package/src/ontology/validation/query.ts +300 -0
- package/src/ontology/validation/schema.ts +174 -0
- package/src/ontology/validation/telemetry.ts +53 -0
- package/src/pipelines/builders.ts +155 -0
- package/src/pipelines/errors.ts +3 -0
- package/src/pipelines/index.ts +26 -0
- package/src/pipelines/request.ts +71 -0
- package/src/pipelines/types.ts +199 -0
- package/src/predicates/builders.ts +152 -0
- package/src/predicates/evaluate.ts +107 -0
- package/src/predicates/index.ts +28 -0
- package/src/predicates/types.ts +124 -0
- package/src/predicates/validation.ts +152 -0
- package/src/projections/builders.ts +770 -0
- package/src/projections/errors.ts +3 -0
- package/src/projections/index.ts +32 -0
- package/src/projections/internal.ts +75 -0
- package/src/projections/ownership.ts +134 -0
- package/src/projections/registry.ts +269 -0
- package/src/projections/revision.ts +245 -0
- package/src/projections/types.ts +165 -0
- package/src/projections/validation.ts +531 -0
- package/src/provider-scope.ts +11 -0
- package/src/query.ts +75 -0
- package/src/queues/errors.ts +6 -0
- package/src/queues/in-memory.ts +364 -0
- package/src/queues/index.ts +23 -0
- package/src/queues/types.ts +230 -0
- package/src/rules/builders.ts +126 -0
- package/src/rules/dependencies.ts +76 -0
- package/src/rules/errors.ts +11 -0
- package/src/rules/index.ts +30 -0
- package/src/rules/internal.ts +8 -0
- package/src/rules/types.ts +113 -0
- package/src/rules/validation.ts +153 -0
- package/src/runtime/create.ts +163 -0
- package/src/runtime/errors.ts +8 -0
- package/src/runtime/index.ts +67 -0
- package/src/runtime/internal.ts +7 -0
- package/src/runtime/ontology-mutations.ts +90 -0
- package/src/runtime/scoped.ts +436 -0
- package/src/runtime/sixb.ts +822 -0
- package/src/runtime/storage-readiness.ts +91 -0
- package/src/runtime/types.ts +1401 -0
- package/src/sandboxes/errors.ts +22 -0
- package/src/sandboxes/exec.ts +102 -0
- package/src/sandboxes/index.ts +19 -0
- package/src/sandboxes/sandbox.ts +124 -0
- package/src/scheduler/errors.ts +7 -0
- package/src/scheduler/index.ts +3 -0
- package/src/scheduler/runtime.ts +174 -0
- package/src/schedules/builders.ts +257 -0
- package/src/schedules/cron.ts +166 -0
- package/src/schedules/errors.ts +7 -0
- package/src/schedules/index.ts +44 -0
- package/src/schedules/next-occurrence.ts +217 -0
- package/src/schedules/runtime.ts +241 -0
- package/src/schedules/types.ts +212 -0
- package/src/schedules/validation.ts +398 -0
- package/src/security/applications.ts +11 -0
- package/src/security/builders.ts +128 -0
- package/src/security/errors.ts +3 -0
- package/src/security/every.ts +108 -0
- package/src/security/grants.ts +215 -0
- package/src/security/index.ts +51 -0
- package/src/security/membership-policies.ts +101 -0
- package/src/security/runtime.ts +101 -0
- package/src/security/types.ts +156 -0
- package/src/security/validation.ts +430 -0
- package/src/storage/action-runs/errors.ts +13 -0
- package/src/storage/action-runs/idempotency.ts +68 -0
- package/src/storage/action-runs/in-memory.ts +420 -0
- package/src/storage/action-runs/index.ts +31 -0
- package/src/storage/action-runs/types.ts +169 -0
- package/src/storage/agents/errors.ts +22 -0
- package/src/storage/agents/in-memory.ts +498 -0
- package/src/storage/agents/index.ts +42 -0
- package/src/storage/agents/types.ts +348 -0
- package/src/storage/auth/errors.ts +40 -0
- package/src/storage/auth/in-memory/access-tokens.ts +123 -0
- package/src/storage/auth/in-memory/auth-storage.ts +559 -0
- package/src/storage/auth/in-memory/group-memberships.ts +46 -0
- package/src/storage/auth/in-memory/identities.ts +66 -0
- package/src/storage/auth/in-memory/index.ts +1 -0
- package/src/storage/auth/in-memory/invitations.ts +165 -0
- package/src/storage/auth/in-memory/magic-links.ts +98 -0
- package/src/storage/auth/in-memory/oidc-attempts.ts +75 -0
- package/src/storage/auth/in-memory/service-account-group-memberships.ts +102 -0
- package/src/storage/auth/in-memory/service-accounts.ts +80 -0
- package/src/storage/auth/in-memory/sessions.ts +177 -0
- package/src/storage/auth/in-memory/shared.ts +602 -0
- package/src/storage/auth/in-memory/users.ts +139 -0
- package/src/storage/auth/in-memory.ts +1 -0
- package/src/storage/auth/index.ts +58 -0
- package/src/storage/auth/types.ts +639 -0
- package/src/storage/errors.ts +45 -0
- package/src/storage/file-upload-sessions/errors.ts +24 -0
- package/src/storage/file-upload-sessions/in-memory.ts +161 -0
- package/src/storage/file-upload-sessions/index.ts +19 -0
- package/src/storage/file-upload-sessions/types.ts +61 -0
- package/src/storage/file-upload-sessions/utils.ts +49 -0
- package/src/storage/in-memory/index.ts +297 -0
- package/src/storage/in-memory/testing.ts +21 -0
- package/src/storage/index.ts +489 -0
- package/src/storage/migrations/check-schema.ts +49 -0
- package/src/storage/migrations/index.ts +23 -0
- package/src/storage/migrations/migrate-storage.ts +24 -0
- package/src/storage/migrations/migration-set.ts +270 -0
- package/src/storage/migrations/types.ts +129 -0
- package/src/storage/objects/in-memory.ts +1154 -0
- package/src/storage/objects/index.ts +24 -0
- package/src/storage/objects/types.ts +244 -0
- package/src/storage/ontology/commits.ts +132 -0
- package/src/storage/ontology/in-memory/commits.ts +122 -0
- package/src/storage/ontology/in-memory/index.ts +94 -0
- package/src/storage/ontology/in-memory/materializations-finalization.ts +484 -0
- package/src/storage/ontology/in-memory/materializations-state.ts +183 -0
- package/src/storage/ontology/in-memory/materializations-work.ts +62 -0
- package/src/storage/ontology/in-memory/materializations.ts +1192 -0
- package/src/storage/ontology/in-memory/outbox.ts +227 -0
- package/src/storage/ontology/in-memory/shared-state.ts +161 -0
- package/src/storage/ontology/in-memory/sources.ts +566 -0
- package/src/storage/ontology/in-memory/testing.ts +29 -0
- package/src/storage/ontology/index.ts +119 -0
- package/src/storage/ontology/materializations.ts +414 -0
- package/src/storage/ontology/outbox.ts +79 -0
- package/src/storage/ontology/provider-header-validation.ts +173 -0
- package/src/storage/ontology/provider-validation.ts +36 -0
- package/src/storage/ontology/provider-work.ts +330 -0
- package/src/storage/ontology/provider.ts +852 -0
- package/src/storage/ontology/sources.ts +195 -0
- package/src/storage/operation-scope.ts +248 -0
- package/src/storage/pagination.ts +23 -0
- package/src/storage/pipeline-runs/errors.ts +6 -0
- package/src/storage/pipeline-runs/in-memory.ts +307 -0
- package/src/storage/pipeline-runs/index.ts +19 -0
- package/src/storage/pipeline-runs/types.ts +148 -0
- package/src/storage/projection-runs/errors.ts +15 -0
- package/src/storage/projection-runs/in-memory.ts +321 -0
- package/src/storage/projection-runs/index.ts +36 -0
- package/src/storage/projection-runs/lifecycle.ts +793 -0
- package/src/storage/projection-runs/types.ts +254 -0
- package/src/storage/rules/in-memory.ts +191 -0
- package/src/storage/rules/index.ts +12 -0
- package/src/storage/rules/types.ts +80 -0
- package/src/storage/run-listing.ts +107 -0
- package/src/storage/sync-runs/errors.ts +7 -0
- package/src/storage/sync-runs/in-memory.ts +181 -0
- package/src/storage/sync-runs/index.ts +14 -0
- package/src/storage/sync-runs/types.ts +93 -0
- package/src/storage/timeseries/index.ts +7 -0
- package/src/storage/timeseries/store.ts +214 -0
- package/src/storage/timeseries/types.ts +57 -0
- package/src/storage/transaction.ts +56 -0
- package/src/storage/types.ts +299 -0
- package/src/storage/webhook-deliveries/in-memory.ts +108 -0
- package/src/storage/webhook-deliveries/index.ts +9 -0
- package/src/storage/webhook-deliveries/types.ts +41 -0
- package/src/storage/webhook-runs/errors.ts +6 -0
- package/src/storage/webhook-runs/in-memory.ts +131 -0
- package/src/storage/webhook-runs/index.ts +12 -0
- package/src/storage/webhook-runs/types.ts +69 -0
- package/src/storage/workflow-interventions/errors.ts +6 -0
- package/src/storage/workflow-interventions/in-memory.ts +192 -0
- package/src/storage/workflow-interventions/index.ts +14 -0
- package/src/storage/workflow-interventions/types.ts +100 -0
- package/src/storage/workflow-runs/errors.ts +6 -0
- package/src/storage/workflow-runs/in-memory.ts +777 -0
- package/src/storage/workflow-runs/index.ts +45 -0
- package/src/storage/workflow-runs/types.ts +344 -0
- package/src/syncs/builders.ts +101 -0
- package/src/syncs/errors.ts +3 -0
- package/src/syncs/index.ts +22 -0
- package/src/syncs/request.ts +91 -0
- package/src/syncs/types.ts +136 -0
- package/src/testing/agent-storage-contract.ts +824 -0
- package/src/testing/auth-storage-contract.ts +1932 -0
- package/src/testing/blob-storage-contract.ts +108 -0
- package/src/testing/broker-contract.ts +819 -0
- package/src/testing/effective-storage-contract.ts +182 -0
- package/src/testing/index.ts +65 -0
- package/src/testing/lake-storage-contract.ts +699 -0
- package/src/testing/materialization-failure-contract.ts +66 -0
- package/src/testing/materializer-fixture.ts +119 -0
- package/src/testing/materializer-storage-contract.ts +389 -0
- package/src/testing/object-query-contract.ts +1205 -0
- package/src/testing/ontology-contract-fixture.ts +192 -0
- package/src/testing/ontology-storage-contract.ts +922 -0
- package/src/testing/projection-run-storage-contract.ts +372 -0
- package/src/testing/queues-contract.ts +634 -0
- package/src/testing/sandboxes-contract.ts +404 -0
- package/src/webhooks/builders.ts +154 -0
- package/src/webhooks/connector.ts +19 -0
- package/src/webhooks/errors.ts +3 -0
- package/src/webhooks/index.ts +25 -0
- package/src/webhooks/registry.ts +127 -0
- package/src/webhooks/types.ts +98 -0
- package/src/webhooks/unverified.ts +82 -0
- package/src/workers/errors.ts +25 -0
- package/src/workers/index.ts +6 -0
- package/src/workers/queue-delivery.ts +309 -0
- package/src/workers/queue-worker.ts +260 -0
- package/src/workers/worker.ts +87 -0
- package/src/workflows/builders.ts +471 -0
- package/src/workflows/errors.ts +13 -0
- package/src/workflows/index.ts +94 -0
- package/src/workflows/request.ts +161 -0
- package/src/workflows/runtime.ts +68 -0
- package/src/workflows/snapshot.ts +383 -0
- package/src/workflows/types.ts +781 -0
- package/src/workflows/validation.ts +572 -0
|
@@ -0,0 +1,840 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core type definitions for the runtime layer.
|
|
3
|
+
*
|
|
4
|
+
* Hierarchy: Broker + Storage + Queues → Sixb → ObjectSet → ObjectByIdHandle
|
|
5
|
+
* Each level narrows generic parameters so downstream code stays type-safe.
|
|
6
|
+
*/
|
|
7
|
+
import type { ActionDefinition, ActionParamsConfig, ActionRegistry, ActionsRuntime, InferActionParams, RequestActionAndWaitInput, RequestActionInput, RequestActionResult } from "../actions";
|
|
8
|
+
import type { AgentsRuntime, RequestAgentRunInput, RequestAgentRunResult } from "../agents";
|
|
9
|
+
import type { AuthRuntime } from "../auth";
|
|
10
|
+
import type { AuthorizationContext } from "../authorization";
|
|
11
|
+
import type { BlobStorage } from "../blob-storage";
|
|
12
|
+
import type { Broker } from "../broker";
|
|
13
|
+
import type { ConnectorAdapter, ConnectorClient, ConnectorDefinition } from "../connectors";
|
|
14
|
+
import type { DatasetDefinition } from "../datasets";
|
|
15
|
+
import type { DomainEventLog } from "../events";
|
|
16
|
+
import type { LakeStorage } from "../lake-storage";
|
|
17
|
+
import type { LogsRuntime } from "../logging";
|
|
18
|
+
import type { OntologyMaintenanceHandle, OntologyOperationalStatus, SixbReadiness } from "../maintenance";
|
|
19
|
+
import type { ObjectQuery, ObjectQueryExplanation, ObjectQueryPredicateComparison, ObjectQueryPredicateContains, ObjectQueryPredicateExists, ObjectQueryPredicateGroup, ObjectQueryPredicateIn, ObjectQueryPredicateNot, ObjectQuerySortDirection, ValidatedObjectQuery } from "../objects/query";
|
|
20
|
+
import type { ObjectLinkTargetType, ObjectRef, ObjectType, Property, ValueType } from "../ontology";
|
|
21
|
+
import type { InferObjectProperties, InferPropertyUnit, InferPropertyValue, InferTelemetryBatchProperties, InferTelemetryPropertyIds } from "../ontology/inference";
|
|
22
|
+
import type { OntologyDocumentInput, OntologyRegistry, OntologySource } from "../ontology/registry";
|
|
23
|
+
import type { LinkToken, ObjectTypeWithPropertyTokens, PropertyToken } from "../ontology/tokens";
|
|
24
|
+
import type { PipelineRunRequestResult, RequestPipelineRunInput } from "../pipelines/request";
|
|
25
|
+
import type { PipelineDefinition } from "../pipelines/types";
|
|
26
|
+
import type { LinkProjectionDefinition, ObjectProjectionDefinition, ProjectionDefinition, TelemetryProjectionDefinition } from "../projections/types";
|
|
27
|
+
import type { Queues } from "../queues";
|
|
28
|
+
import type { RuleDefinition } from "../rules";
|
|
29
|
+
import type { SandboxFactory } from "../sandboxes";
|
|
30
|
+
import type { ScheduleDefinition } from "../schedules";
|
|
31
|
+
import type { SecurityRegistry } from "../security";
|
|
32
|
+
import type { ActionRunRecord, ObjectLinkRow, ObjectRow, Storage } from "../storage";
|
|
33
|
+
import type { RequestSyncRunInput, SyncDefinition, SyncRunRequestResult } from "../syncs";
|
|
34
|
+
import type { RegisteredWebhook } from "../webhooks";
|
|
35
|
+
import type { RequestWorkflowRunInput, WorkflowRunRequestResult, WorkflowsRuntime } from "../workflows";
|
|
36
|
+
import type { ScopedSixb } from "./scoped";
|
|
37
|
+
/**
|
|
38
|
+
* Shared runtime context holding infrastructure + ontology registry.
|
|
39
|
+
*
|
|
40
|
+
* Built once by `Sixb` at construction time and threaded to `objects/`
|
|
41
|
+
* service and leaf functions.
|
|
42
|
+
*
|
|
43
|
+
* `Sixb` satisfies this structurally — callers can pass `sixb` directly
|
|
44
|
+
* wherever a `SixbRuntimeContext` is expected.
|
|
45
|
+
*/
|
|
46
|
+
export interface SixbRuntimeContext {
|
|
47
|
+
readonly projectId: string;
|
|
48
|
+
readonly ontology: OntologyRegistry;
|
|
49
|
+
readonly actionRegistry: ActionRegistry;
|
|
50
|
+
readonly events: DomainEventLog;
|
|
51
|
+
readonly storage: Storage;
|
|
52
|
+
readonly lakeStorage: LakeStorage;
|
|
53
|
+
readonly blobStorage: BlobStorage;
|
|
54
|
+
readonly queues: Queues;
|
|
55
|
+
readonly sandboxes?: SandboxFactory;
|
|
56
|
+
readonly rules?: readonly RuleDefinition[];
|
|
57
|
+
/**
|
|
58
|
+
* Principal scope for this context. Absent on privileged runtimes (raw
|
|
59
|
+
* `sixb`, syncs, workers, tests); present on contexts created by
|
|
60
|
+
* `sixb.as(context)`, where data operations enforce default-deny grants.
|
|
61
|
+
*/
|
|
62
|
+
readonly authorization?: AuthorizationContext;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Per-item result for batch operations.
|
|
66
|
+
*
|
|
67
|
+
* Allows batch ops to report successes and failures per item without throwing,
|
|
68
|
+
* so callers (e.g. projection executors) can map failures to per-row issues.
|
|
69
|
+
*/
|
|
70
|
+
export type BatchItemResult<T> = {
|
|
71
|
+
readonly ok: true;
|
|
72
|
+
readonly value: T;
|
|
73
|
+
} | {
|
|
74
|
+
readonly ok: false;
|
|
75
|
+
readonly error: Error;
|
|
76
|
+
};
|
|
77
|
+
export type { OntologyDocumentInput, OntologySource };
|
|
78
|
+
type ObjectTypeFromSource<TSource> = TSource extends {
|
|
79
|
+
objectTypes: infer TObjectTypes extends readonly ObjectTypeWithPropertyTokens[];
|
|
80
|
+
} ? TObjectTypes[number] : TSource extends ObjectTypeWithPropertyTokens ? TSource : never;
|
|
81
|
+
type ValueTypeFromSource<TSource> = TSource extends {
|
|
82
|
+
valueTypes: infer TValueTypes extends readonly ValueType[];
|
|
83
|
+
} ? TValueTypes[number] : never;
|
|
84
|
+
export type RegisteredObjectType<TOntologySources extends readonly OntologySource[]> = ObjectTypeFromSource<TOntologySources[number]>;
|
|
85
|
+
export type RegisteredValueTypes<TOntologySources extends readonly OntologySource[]> = readonly ValueTypeFromSource<TOntologySources[number]>[];
|
|
86
|
+
export type TwinObject<TObjectType extends ObjectType, TValueTypes extends readonly ValueType[]> = {
|
|
87
|
+
primaryId: string;
|
|
88
|
+
objectTypeId: TObjectType["id"];
|
|
89
|
+
properties: InferObjectProperties<TObjectType, TValueTypes>;
|
|
90
|
+
createdAt: Date;
|
|
91
|
+
updatedAt: Date;
|
|
92
|
+
};
|
|
93
|
+
type MaterializedObjectRow<TObjectType extends Pick<ObjectType, "id" | "properties">, TValueTypes extends readonly ValueType[]> = {
|
|
94
|
+
primaryId: string;
|
|
95
|
+
objectTypeId: TObjectType["id"];
|
|
96
|
+
properties: InferObjectProperties<TObjectType, TValueTypes>;
|
|
97
|
+
createdAt: Date;
|
|
98
|
+
updatedAt: Date;
|
|
99
|
+
};
|
|
100
|
+
type Simplify<T> = {
|
|
101
|
+
[K in keyof T]: T[K];
|
|
102
|
+
} & {};
|
|
103
|
+
export type { ObjectRef };
|
|
104
|
+
/**
|
|
105
|
+
* Resolve link target type id for ObjectRef:
|
|
106
|
+
* - `string[]` → union of elements
|
|
107
|
+
* - `"*"` → any string
|
|
108
|
+
* - `string` → literal
|
|
109
|
+
*/
|
|
110
|
+
type ResolveTargetTypeId<T> = T extends readonly string[] ? T[number] : T extends "*" ? string : T;
|
|
111
|
+
/**
|
|
112
|
+
* Link token constrained to the given object type.
|
|
113
|
+
*
|
|
114
|
+
* This powers `byId(...).link(Room.l.hasThermostat, target)` style APIs.
|
|
115
|
+
*/
|
|
116
|
+
type LinkTokenForObjectType<TObjectType extends ObjectTypeWithPropertyTokens> = LinkToken<TObjectType["id"], TObjectType["links"][number]["id"], TObjectType["links"][number]["targetObjectTypeId"], TObjectType["links"][number]>;
|
|
117
|
+
type PropertyById<TObjectType extends ObjectTypeWithPropertyTokens, TPropertyId extends TObjectType["properties"][number]["id"]> = Extract<TObjectType["properties"][number], {
|
|
118
|
+
id: TPropertyId;
|
|
119
|
+
}>;
|
|
120
|
+
type PropertyWhereValue<TObjectType extends ObjectTypeWithPropertyTokens, TPropertyId extends TObjectType["properties"][number]["id"], TValueTypes extends readonly ValueType[]> = InferPropertyValue<PropertyById<TObjectType, TPropertyId>, TValueTypes>;
|
|
121
|
+
type PropertyWhereContainsValue<TObjectType extends ObjectTypeWithPropertyTokens, TPropertyId extends TObjectType["properties"][number]["id"], TValueTypes extends readonly ValueType[]> = NonNullable<PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>> extends string ? string : NonNullable<PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>> extends readonly (infer TItem)[] ? TItem : NonNullable<PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>> extends Record<string, unknown> ? string : never;
|
|
122
|
+
type PropertyWhereComparisonClause<TObjectType extends ObjectTypeWithPropertyTokens, TPropertyId extends TObjectType["properties"][number]["id"], TValueTypes extends readonly ValueType[]> = Omit<ObjectQueryPredicateComparison, "propertyId" | "value"> & {
|
|
123
|
+
propertyId: TPropertyId;
|
|
124
|
+
value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>;
|
|
125
|
+
};
|
|
126
|
+
type PropertyWhereInClause<TObjectType extends ObjectTypeWithPropertyTokens, TPropertyId extends TObjectType["properties"][number]["id"], TValueTypes extends readonly ValueType[]> = Omit<ObjectQueryPredicateIn, "propertyId" | "values"> & {
|
|
127
|
+
propertyId: TPropertyId;
|
|
128
|
+
values: readonly PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>[];
|
|
129
|
+
};
|
|
130
|
+
type PropertyWhereExistsClause<TObjectType extends ObjectTypeWithPropertyTokens, TPropertyId extends TObjectType["properties"][number]["id"]> = Omit<ObjectQueryPredicateExists, "propertyId"> & {
|
|
131
|
+
propertyId: TPropertyId;
|
|
132
|
+
};
|
|
133
|
+
type PropertyWhereContainsClause<TObjectType extends ObjectTypeWithPropertyTokens, TPropertyId extends TObjectType["properties"][number]["id"], TValueTypes extends readonly ValueType[]> = Omit<ObjectQueryPredicateContains, "propertyId" | "value"> & {
|
|
134
|
+
propertyId: TPropertyId;
|
|
135
|
+
value: PropertyWhereContainsValue<TObjectType, TPropertyId, TValueTypes>;
|
|
136
|
+
};
|
|
137
|
+
/** Predicate operators exposed on `where` builder properties. */
|
|
138
|
+
type PropertyPredicate<TObjectType extends ObjectTypeWithPropertyTokens, TPropertyId extends TObjectType["properties"][number]["id"], TValueTypes extends readonly ValueType[]> = {
|
|
139
|
+
eq(value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & {
|
|
140
|
+
op: "eq";
|
|
141
|
+
};
|
|
142
|
+
neq(value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & {
|
|
143
|
+
op: "neq";
|
|
144
|
+
};
|
|
145
|
+
lt(value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & {
|
|
146
|
+
op: "lt";
|
|
147
|
+
};
|
|
148
|
+
lte(value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & {
|
|
149
|
+
op: "lte";
|
|
150
|
+
};
|
|
151
|
+
gt(value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & {
|
|
152
|
+
op: "gt";
|
|
153
|
+
};
|
|
154
|
+
gte(value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & {
|
|
155
|
+
op: "gte";
|
|
156
|
+
};
|
|
157
|
+
in(values: readonly PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>[]): PropertyWhereInClause<TObjectType, TPropertyId, TValueTypes>;
|
|
158
|
+
exists(value?: boolean): PropertyWhereExistsClause<TObjectType, TPropertyId>;
|
|
159
|
+
contains(value: PropertyWhereContainsValue<TObjectType, TPropertyId, TValueTypes>): PropertyWhereContainsClause<TObjectType, TPropertyId, TValueTypes>;
|
|
160
|
+
};
|
|
161
|
+
type PropertyWhereClause<TObjectType extends ObjectTypeWithPropertyTokens, TValueTypes extends readonly ValueType[]> = HasKnownPropertyIds<TObjectType> extends false ? ObjectQueryPredicateComparison | ObjectQueryPredicateIn | ObjectQueryPredicateExists | ObjectQueryPredicateContains : {
|
|
162
|
+
[TPropertyId in TObjectType["properties"][number]["id"]]: PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> | PropertyWhereInClause<TObjectType, TPropertyId, TValueTypes> | PropertyWhereExistsClause<TObjectType, TPropertyId> | PropertyWhereContainsClause<TObjectType, TPropertyId, TValueTypes>;
|
|
163
|
+
}[TObjectType["properties"][number]["id"]];
|
|
164
|
+
/**
|
|
165
|
+
* Predicate operators for an object type whose properties are not statically
|
|
166
|
+
* known, such as after traversing a link whose target type is unresolved.
|
|
167
|
+
* Mirrors `PropertyPredicate` with IR-level value types, and keeps the type
|
|
168
|
+
* shallow — instantiating the typed predicate map over the broad `Property`
|
|
169
|
+
* union overflows TypeScript's recursion limits.
|
|
170
|
+
*/
|
|
171
|
+
type UntypedPropertyPredicate = {
|
|
172
|
+
eq(value: unknown): ObjectQueryPredicateComparison & {
|
|
173
|
+
op: "eq";
|
|
174
|
+
};
|
|
175
|
+
neq(value: unknown): ObjectQueryPredicateComparison & {
|
|
176
|
+
op: "neq";
|
|
177
|
+
};
|
|
178
|
+
lt(value: unknown): ObjectQueryPredicateComparison & {
|
|
179
|
+
op: "lt";
|
|
180
|
+
};
|
|
181
|
+
lte(value: unknown): ObjectQueryPredicateComparison & {
|
|
182
|
+
op: "lte";
|
|
183
|
+
};
|
|
184
|
+
gt(value: unknown): ObjectQueryPredicateComparison & {
|
|
185
|
+
op: "gt";
|
|
186
|
+
};
|
|
187
|
+
gte(value: unknown): ObjectQueryPredicateComparison & {
|
|
188
|
+
op: "gte";
|
|
189
|
+
};
|
|
190
|
+
in(values: readonly unknown[]): ObjectQueryPredicateIn;
|
|
191
|
+
exists(value?: boolean): ObjectQueryPredicateExists;
|
|
192
|
+
contains(value: unknown): ObjectQueryPredicateContains;
|
|
193
|
+
};
|
|
194
|
+
/** True when the object type's property ids are statically known literals. */
|
|
195
|
+
type HasKnownPropertyIds<TObjectType extends ObjectTypeWithPropertyTokens> = string extends TObjectType["properties"][number]["id"] ? false : true;
|
|
196
|
+
/** Typed ObjectSet where predicate. Serialized shape matches object query IR predicates. */
|
|
197
|
+
export type ObjectWhereClause<TObjectType extends ObjectTypeWithPropertyTokens, TValueTypes extends readonly ValueType[]> = PropertyWhereClause<TObjectType, TValueTypes> | (Omit<ObjectQueryPredicateGroup, "items"> & {
|
|
198
|
+
items: readonly ObjectWhereClause<TObjectType, TValueTypes>[];
|
|
199
|
+
}) | (Omit<ObjectQueryPredicateNot, "item"> & {
|
|
200
|
+
item: ObjectWhereClause<TObjectType, TValueTypes>;
|
|
201
|
+
});
|
|
202
|
+
/**
|
|
203
|
+
* Builder object passed to object query `where` callbacks.
|
|
204
|
+
*
|
|
205
|
+
* Example: `(r) => r.p.externalId.eq("RM-101")`
|
|
206
|
+
*/
|
|
207
|
+
export type ObjectWhereBuilder<TObjectType extends ObjectTypeWithPropertyTokens, TValueTypes extends readonly ValueType[]> = {
|
|
208
|
+
p: HasKnownPropertyIds<TObjectType> extends false ? Record<string, UntypedPropertyPredicate> : {
|
|
209
|
+
[TPropertyId in TObjectType["properties"][number]["id"]]: PropertyPredicate<TObjectType, TPropertyId, TValueTypes>;
|
|
210
|
+
};
|
|
211
|
+
and(...items: readonly ObjectWhereClause<TObjectType, TValueTypes>[]): ObjectWhereClause<TObjectType, TValueTypes>;
|
|
212
|
+
or(...items: readonly ObjectWhereClause<TObjectType, TValueTypes>[]): ObjectWhereClause<TObjectType, TValueTypes>;
|
|
213
|
+
not(item: ObjectWhereClause<TObjectType, TValueTypes>): ObjectWhereClause<TObjectType, TValueTypes>;
|
|
214
|
+
};
|
|
215
|
+
export type TelemetryPropertyToken<TObjectType extends ObjectTypeWithPropertyTokens> = TObjectType["p"][InferTelemetryPropertyIds<TObjectType>];
|
|
216
|
+
type AnyPropertyToken = PropertyToken<string, string, Property>;
|
|
217
|
+
type ObjectSetPropertyId<TObjectType extends ObjectTypeWithPropertyTokens> = TObjectType["properties"][number]["id"];
|
|
218
|
+
export type ObjectSetQueryPropertyToken<TObjectType extends ObjectTypeWithPropertyTokens> = TObjectType["p"][ObjectSetPropertyId<TObjectType>];
|
|
219
|
+
/**
|
|
220
|
+
* Unit requirement is conditional:
|
|
221
|
+
* - if property has a semantic type, unit is required
|
|
222
|
+
* - otherwise unit is disallowed
|
|
223
|
+
*/
|
|
224
|
+
type TelemetryUnitField<TToken extends AnyPropertyToken, TValueTypes extends readonly ValueType[]> = InferPropertyUnit<TToken["property"], TValueTypes> extends never ? {
|
|
225
|
+
unit?: never;
|
|
226
|
+
} : {
|
|
227
|
+
unit: InferPropertyUnit<TToken["property"], TValueTypes>;
|
|
228
|
+
};
|
|
229
|
+
export type TelemetryAppendInput<TToken extends AnyPropertyToken, TValueTypes extends readonly ValueType[]> = {
|
|
230
|
+
value: InferPropertyValue<TToken["property"], TValueTypes>;
|
|
231
|
+
at: Date;
|
|
232
|
+
} & TelemetryUnitField<TToken, TValueTypes>;
|
|
233
|
+
export interface TelemetryHistoryInput {
|
|
234
|
+
readonly from?: Date;
|
|
235
|
+
readonly to?: Date;
|
|
236
|
+
readonly limit?: number;
|
|
237
|
+
readonly order?: "asc" | "desc";
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* One object's telemetry for one property, readable and writable.
|
|
241
|
+
*
|
|
242
|
+
* Named a channel rather than an appender because telemetry is not write-only: `history()` reads the
|
|
243
|
+
* same series back, typed through the same token, instead of sending the caller under the typed
|
|
244
|
+
* surface to `sixb.storage.timeseries`.
|
|
245
|
+
*/
|
|
246
|
+
export type TelemetryChannel<TToken extends AnyPropertyToken, TValueTypes extends readonly ValueType[]> = {
|
|
247
|
+
append(input: TelemetryAppendInput<TToken, TValueTypes>): Promise<void>;
|
|
248
|
+
/**
|
|
249
|
+
* Points for this series, oldest first unless `order: "desc"`.
|
|
250
|
+
*
|
|
251
|
+
* The default matches `storage.timeseries.getHistoryBatch`, deliberately: a typed read that ordered
|
|
252
|
+
* differently from the contract underneath it would be its own trap.
|
|
253
|
+
*
|
|
254
|
+
* The point shape is written inline rather than extracted into a named alias. One more level of
|
|
255
|
+
* alias indirection around `InferPropertyValue` in this output position overflows TS's instantiation
|
|
256
|
+
* depth (TS2589) in consumers as ordinary as `points.map(...)` — the same budget the note on
|
|
257
|
+
* `TwinObject` describes. `unit` is inferred through the same token as `append` writes it, rather
|
|
258
|
+
* than widened to `string`: a read that kept `value` precise and gave up on `unit` would be an
|
|
259
|
+
* arbitrary line, and both are the current ontology's view of a series it validated on write.
|
|
260
|
+
*/
|
|
261
|
+
history(input?: TelemetryHistoryInput): Promise<readonly {
|
|
262
|
+
readonly value: InferPropertyValue<TToken["property"], TValueTypes>;
|
|
263
|
+
readonly at: Date;
|
|
264
|
+
readonly unit?: InferPropertyUnit<TToken["property"], TValueTypes>;
|
|
265
|
+
}[]>;
|
|
266
|
+
};
|
|
267
|
+
type TypedActionReference<TParams extends ActionParamsConfig = ActionParamsConfig> = {
|
|
268
|
+
readonly id: string;
|
|
269
|
+
readonly params: TParams;
|
|
270
|
+
};
|
|
271
|
+
type TypedActionParams<TAction extends TypedActionReference> = TAction extends TypedActionReference<infer TParams> ? InferActionParams<TParams> : never;
|
|
272
|
+
export type ListResult<T> = {
|
|
273
|
+
objects: T[];
|
|
274
|
+
hasMore: boolean;
|
|
275
|
+
nextPageToken?: string;
|
|
276
|
+
total: number;
|
|
277
|
+
};
|
|
278
|
+
export type ListResultWithoutTotal<T> = {
|
|
279
|
+
objects: T[];
|
|
280
|
+
hasMore: boolean;
|
|
281
|
+
nextPageToken?: string;
|
|
282
|
+
total?: undefined;
|
|
283
|
+
};
|
|
284
|
+
export type ObjectQueryListOptions = {
|
|
285
|
+
includeTotal?: boolean;
|
|
286
|
+
};
|
|
287
|
+
export type ObjectQueryFacetInput<TObjectType extends ObjectTypeWithPropertyTokens> = {
|
|
288
|
+
property: ObjectSetQueryPropertyToken<TObjectType>;
|
|
289
|
+
limit: number;
|
|
290
|
+
};
|
|
291
|
+
export type ObjectQueryFacetBucket = {
|
|
292
|
+
value: unknown;
|
|
293
|
+
count: number;
|
|
294
|
+
};
|
|
295
|
+
export type ObjectQueryFacetResult = {
|
|
296
|
+
propertyId: string;
|
|
297
|
+
buckets: ObjectQueryFacetBucket[];
|
|
298
|
+
};
|
|
299
|
+
export type ObjectSetListInput = {
|
|
300
|
+
idPrefix?: string;
|
|
301
|
+
idSuffix?: string;
|
|
302
|
+
updatedAfter?: Date;
|
|
303
|
+
updatedBefore?: Date;
|
|
304
|
+
createdAfter?: Date;
|
|
305
|
+
createdBefore?: Date;
|
|
306
|
+
limit?: number;
|
|
307
|
+
offset?: number;
|
|
308
|
+
orderBy?: "createdAt" | "updatedAt" | "primaryId";
|
|
309
|
+
order?: "asc" | "desc";
|
|
310
|
+
};
|
|
311
|
+
type LinkTargetObjectTypeIdValue = string | readonly string[];
|
|
312
|
+
type LinkTargetObjectTypeId<TLinkToken> = TLinkToken extends LinkToken<string, string, infer TTargetObjectTypeId> ? TTargetObjectTypeId extends readonly (infer TTargetId extends string)[] ? TTargetId : TTargetObjectTypeId extends string ? TTargetObjectTypeId : never : never;
|
|
313
|
+
type ObjectTypeForId<TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens, TObjectTypeId extends string> = [Extract<TRegisteredObjectTypes, {
|
|
314
|
+
id: TObjectTypeId;
|
|
315
|
+
}>] extends [never] ? ObjectTypeWithPropertyTokens : Extract<TRegisteredObjectTypes, {
|
|
316
|
+
id: TObjectTypeId;
|
|
317
|
+
}>;
|
|
318
|
+
type DirectObjectTypeForLink<TLinkToken> = TLinkToken extends LinkToken<string, string, LinkTargetObjectTypeIdValue, infer TLink> ? Extract<ObjectLinkTargetType<TLink>, ObjectTypeWithPropertyTokens> : never;
|
|
319
|
+
type ObjectTypeForLinkTarget<TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens, TLinkToken> = [DirectObjectTypeForLink<TLinkToken>] extends [never] ? ObjectTypeForId<TRegisteredObjectTypes, LinkTargetObjectTypeId<TLinkToken>> : DirectObjectTypeForLink<TLinkToken>;
|
|
320
|
+
/**
|
|
321
|
+
* True when the target type is a concrete ontology type rather than the degraded
|
|
322
|
+
* generic base. Direct ObjectType links resolve before this point; unresolved
|
|
323
|
+
* id-only refs fall back to the base type, whose property ids are `string`.
|
|
324
|
+
* Instantiating the typed token map over the broad `Property` union there
|
|
325
|
+
* overflows TypeScript (the same reason `UntypedPropertyPredicate` exists). The
|
|
326
|
+
* expand option/sort types degrade to a loose shape in that case so unresolved
|
|
327
|
+
* client paths stay shallow instead of failing.
|
|
328
|
+
*/
|
|
329
|
+
type HasKnownObjectType<TObjectType extends ObjectTypeWithPropertyTokens> = string extends TObjectType["id"] ? false : true;
|
|
330
|
+
/** Deterministic top-N ordering for a bounded `"many"` expansion, typed against the target type. */
|
|
331
|
+
export type ObjectExpansionSort<TObjectType extends ObjectTypeWithPropertyTokens> = HasKnownObjectType<TObjectType> extends false ? {
|
|
332
|
+
property: PropertyToken;
|
|
333
|
+
direction?: ObjectQuerySortDirection;
|
|
334
|
+
} : {
|
|
335
|
+
property: ObjectSetQueryPropertyToken<TObjectType>;
|
|
336
|
+
direction?: ObjectQuerySortDirection;
|
|
337
|
+
};
|
|
338
|
+
/** Options for a single `.expand(...)` of an outgoing link. */
|
|
339
|
+
export type ObjectExpandOptions<TObjectType extends ObjectTypeWithPropertyTokens> = {
|
|
340
|
+
/** Bound a `"many"` expansion to the top-N target objects per parent. */
|
|
341
|
+
limit?: number;
|
|
342
|
+
/** Order the target objects of a bounded `"many"` expansion. */
|
|
343
|
+
orderBy?: readonly ObjectExpansionSort<TObjectType>[];
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Cardinality declared on a link token's underlying link; absent cardinality is
|
|
347
|
+
* treated as `"many"`, matching the executor (`link.cardinality ?? "many"`) and
|
|
348
|
+
* the ontology default.
|
|
349
|
+
*/
|
|
350
|
+
type LinkTokenCardinality<TLinkToken> = TLinkToken extends LinkToken<string, string, LinkTargetObjectTypeIdValue, infer TLink> ? TLink extends {
|
|
351
|
+
cardinality: infer TCardinality extends string;
|
|
352
|
+
} ? TCardinality : "many" : "many";
|
|
353
|
+
type LinkTokenId<TLinkToken> = TLinkToken extends LinkToken<string, infer TLinkId, LinkTargetObjectTypeIdValue> ? TLinkId : never;
|
|
354
|
+
type LinkTokenSourceObjectTypeId<TLinkToken> = TLinkToken extends LinkToken<infer TObjectTypeId, string, LinkTargetObjectTypeIdValue> ? TObjectTypeId : string;
|
|
355
|
+
type ObjectLinkCardinality<TLink> = TLink extends {
|
|
356
|
+
cardinality: infer TCardinality extends string;
|
|
357
|
+
} ? TCardinality : "many";
|
|
358
|
+
type ObjectLinkTarget<TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens, TLink> = [
|
|
359
|
+
Extract<ObjectLinkTargetType<TLink>, ObjectTypeWithPropertyTokens>
|
|
360
|
+
] extends [never] ? TLink extends {
|
|
361
|
+
targetObjectTypeId: infer TTargetObjectTypeId extends LinkTargetObjectTypeIdValue;
|
|
362
|
+
} ? ObjectTypeForId<TRegisteredObjectTypes, ResolveTargetTypeId<TTargetObjectTypeId>> : ObjectTypeWithPropertyTokens : Extract<ObjectLinkTargetType<TLink>, ObjectTypeWithPropertyTokens>;
|
|
363
|
+
type ObjectLinkById<TObjectType extends Pick<ObjectType, "links">, TLinkId extends string> = Extract<TObjectType["links"][number], {
|
|
364
|
+
id: TLinkId;
|
|
365
|
+
}>;
|
|
366
|
+
type HasKnownObjectLinkIds<TObjectType extends Pick<ObjectType, "links">> = string extends TObjectType["links"][number]["id"] ? false : true;
|
|
367
|
+
/**
|
|
368
|
+
* A branded accumulator entry for one expanded link. Unconstrained on purpose —
|
|
369
|
+
* keeping recursion out of constraints is what avoids TS2589.
|
|
370
|
+
*/
|
|
371
|
+
type ExpansionNode<TLinkToken, TRegisteredObjectTypes, TTarget, TCardinality, TChildren> = {
|
|
372
|
+
readonly __linkToken: TLinkToken;
|
|
373
|
+
readonly __registeredObjectTypes: TRegisteredObjectTypes;
|
|
374
|
+
readonly __target: TTarget;
|
|
375
|
+
readonly __cardinality: TCardinality;
|
|
376
|
+
readonly __children: TChildren;
|
|
377
|
+
};
|
|
378
|
+
/** The single-key accumulator contribution of one `.expand(link, …)` call. */
|
|
379
|
+
type ExpansionEntry<TLinkToken extends LinkToken<string, string, LinkTargetObjectTypeIdValue>, TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens, TChild> = {
|
|
380
|
+
[K in TLinkToken["id"]]: ExpansionNode<TLinkToken, TRegisteredObjectTypes, ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>, LinkTokenCardinality<TLinkToken>, TChild>;
|
|
381
|
+
};
|
|
382
|
+
type ExpansionNodeForSource<TNode, TObjectType extends Pick<ObjectType, "id" | "links">> = TNode extends ExpansionNode<infer TLinkToken, infer TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens, infer TTarget, infer TCardinality, infer TChildren> ? LinkTokenId<TLinkToken> extends infer TLinkId extends string ? HasKnownObjectLinkIds<TObjectType> extends true ? [ObjectLinkById<TObjectType, TLinkId>] extends [never] ? never : ExpansionNode<TLinkToken, TRegisteredObjectTypes, ObjectLinkTarget<TRegisteredObjectTypes, ObjectLinkById<TObjectType, TLinkId>>, ObjectLinkCardinality<ObjectLinkById<TObjectType, TLinkId>>, TChildren> : LinkTokenSourceObjectTypeId<TLinkToken> extends TObjectType["id"] ? ExpansionNode<TLinkToken, TRegisteredObjectTypes, TTarget, TCardinality, TChildren> : never : never : never;
|
|
383
|
+
type ExpansionLinksForSource<TLinks, TObjectType extends Pick<ObjectType, "id" | "links">> = {
|
|
384
|
+
[K in keyof TLinks as [ExpansionNodeForSource<TLinks[K], TObjectType>] extends [never] ? never : K]: ExpansionNodeForSource<TLinks[K], TObjectType>;
|
|
385
|
+
};
|
|
386
|
+
/** Materialize one accumulated expansion entry into its row value. */
|
|
387
|
+
type ExpandedLinkType<TNode, TValueTypes extends readonly ValueType[]> = TNode extends ExpansionNode<unknown, infer TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens, infer TTarget, infer TCardinality, infer TChildren> ? TCardinality extends "one" ? ExpandedRowType<TTarget, TChildren, TValueTypes, TRegisteredObjectTypes> | null : ExpandedRowType<TTarget, TChildren, TValueTypes, TRegisteredObjectTypes>[] : never;
|
|
388
|
+
/**
|
|
389
|
+
* An expanded child row: the target object, optional edge `linkProperties` (the
|
|
390
|
+
* executor attaches it only when the relationship carries metadata), and its own
|
|
391
|
+
* nested `links` (present only when the child was itself expanded). The recursion
|
|
392
|
+
* is confined to this lazily-evaluated position.
|
|
393
|
+
*/
|
|
394
|
+
/**
|
|
395
|
+
* Loud row substituted for a `.expand()` whose target type is MISSING from an
|
|
396
|
+
* otherwise-present ontology manifest (a stale manifest, or a wrong link target
|
|
397
|
+
* id). Reading a real property is then a compile error pointing at the fix,
|
|
398
|
+
* instead of the old silent `Record<string, unknown>`. The no-manifest loose
|
|
399
|
+
* default stays graceful — this only fires when the registry is concrete yet the
|
|
400
|
+
* target id is absent, i.e. precision was expected but lost.
|
|
401
|
+
*/
|
|
402
|
+
type UnresolvedExpansionRow = {
|
|
403
|
+
primaryId: string;
|
|
404
|
+
objectTypeId: string;
|
|
405
|
+
properties: {
|
|
406
|
+
readonly sixb_unresolvedExpansionTarget: "This expansion target is not in the generated ontology manifest. Run `sixb build` / `dev` / `check` to regenerate types, or fix the link's target id.";
|
|
407
|
+
};
|
|
408
|
+
createdAt: Date;
|
|
409
|
+
updatedAt: Date;
|
|
410
|
+
};
|
|
411
|
+
type ExpandedRowType<TTarget, TChildren, TValueTypes extends readonly ValueType[], TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens> = TTarget extends Pick<ObjectType, "id" | "properties" | "links"> ? string extends TTarget["id"] ? string extends TRegisteredObjectTypes["id"] ? ExpandedRowForSource<TTarget, TValueTypes, ExpansionLinksForSource<TChildren, TTarget>, {
|
|
412
|
+
linkProperties?: Record<string, unknown>;
|
|
413
|
+
}> : UnresolvedExpansionRow : ExpandedRowForSource<TTarget, TValueTypes, ExpansionLinksForSource<TChildren, TTarget>, {
|
|
414
|
+
linkProperties?: Record<string, unknown>;
|
|
415
|
+
}> : never;
|
|
416
|
+
type ExpandedRowForSource<TObjectType extends Pick<ObjectType, "id" | "properties" | "links">, TValueTypes extends readonly ValueType[], TLinks, TExtra = unknown> = Simplify<MaterializedObjectRow<TObjectType, TValueTypes> & TExtra & ([keyof TLinks] extends [never] ? unknown : {
|
|
417
|
+
links: {
|
|
418
|
+
[K in keyof TLinks]: ExpandedLinkType<TLinks[K], TValueTypes>;
|
|
419
|
+
};
|
|
420
|
+
})>;
|
|
421
|
+
/**
|
|
422
|
+
* The terminal row of a query: the matched object, plus a typed `links` map once
|
|
423
|
+
* the query accumulated expansions. A query with no `.expand(...)` returns the
|
|
424
|
+
* plain materialized row, so existing `list`/`first` consumers are unchanged.
|
|
425
|
+
*/
|
|
426
|
+
export type ObjectQueryRow<TObjectType extends ObjectTypeWithPropertyTokens, TValueTypes extends readonly ValueType[], TLinks> = TObjectType extends ObjectTypeWithPropertyTokens ? ExpandedRowForSource<TObjectType, TValueTypes, ExpansionLinksForSource<TLinks, TObjectType>> : never;
|
|
427
|
+
/**
|
|
428
|
+
* Builder passed to the nested `.expand(..., (e) => …)` callback. Exposes only
|
|
429
|
+
* `expand`, resolving the next target type from direct metadata or the id
|
|
430
|
+
* registry so deeper hops stay typed and accumulating `TAccumulated` so the
|
|
431
|
+
* nested `.links` shape is recovered from the callback's return.
|
|
432
|
+
*
|
|
433
|
+
* A type alias (not an interface) so relating two instantiations stays
|
|
434
|
+
* structural — the same discipline `TwinObject` follows to avoid TS2589
|
|
435
|
+
* (see the note above `TwinObject`). The only recursion is in the lazily
|
|
436
|
+
* evaluated return/callback positions.
|
|
437
|
+
*
|
|
438
|
+
* When the target type is the degraded base (an unresolved id-only target), the
|
|
439
|
+
* builder collapses to the untyped, non-generic {@link UntypedExpandBuilder}:
|
|
440
|
+
* nested expansion still works, just without target-specific link/property
|
|
441
|
+
* checking, and — crucially — without the self-referential generic instantiation
|
|
442
|
+
* over the broad base type that would otherwise overflow TypeScript.
|
|
443
|
+
*/
|
|
444
|
+
export type ObjectExpandBuilder<TObjectType extends ObjectTypeWithPropertyTokens, TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens, TAccumulated = unknown> = HasKnownObjectType<TObjectType> extends false ? UntypedExpandBuilder : {
|
|
445
|
+
readonly __links?: TAccumulated;
|
|
446
|
+
expand<TLinkToken extends LinkToken<TObjectType["id"], string, LinkTargetObjectTypeIdValue>, TChild = unknown>(link: TLinkToken, build: ObjectExpandNested<TLinkToken, TRegisteredObjectTypes, TChild>): ObjectExpandBuilder<TObjectType, TRegisteredObjectTypes, TAccumulated & ExpansionEntry<TLinkToken, TRegisteredObjectTypes, TChild>>;
|
|
447
|
+
expand<TLinkToken extends LinkToken<TObjectType["id"], string, LinkTargetObjectTypeIdValue>, TChild = unknown>(link: TLinkToken, options?: ObjectExpandOptions<ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>>, build?: ObjectExpandNested<TLinkToken, TRegisteredObjectTypes, TChild>): ObjectExpandBuilder<TObjectType, TRegisteredObjectTypes, TAccumulated & ExpansionEntry<TLinkToken, TRegisteredObjectTypes, TChild>>;
|
|
448
|
+
};
|
|
449
|
+
/**
|
|
450
|
+
* Loose expand builder for degraded targets. Non-generic and self-referential,
|
|
451
|
+
* so it never instantiates the typed token machinery over the broad base type.
|
|
452
|
+
* Nested expansions still run; their shape simply degrades to the loose row.
|
|
453
|
+
*/
|
|
454
|
+
type UntypedExpandBuilder = {
|
|
455
|
+
expand(link: LinkToken, optionsOrBuild?: ObjectExpandOptions<ObjectTypeWithPropertyTokens> | ((nested: UntypedExpandBuilder) => UntypedExpandBuilder), build?: (nested: UntypedExpandBuilder) => UntypedExpandBuilder): UntypedExpandBuilder;
|
|
456
|
+
};
|
|
457
|
+
/**
|
|
458
|
+
* The nested-expansion callback for a link token's resolved target type. `TChild`
|
|
459
|
+
* is inferred from the returned builder's accumulator, recovering the nested
|
|
460
|
+
* `.links` shape; on the degraded path the builder collapses and `TChild` stays
|
|
461
|
+
* its `unknown` default.
|
|
462
|
+
*
|
|
463
|
+
* Kept a plain (non-conditional) function type on purpose: wrapping the callback
|
|
464
|
+
* in a `TLinkToken extends … ? … : never` conditional blocks inference of
|
|
465
|
+
* `TChild` from the argument, so it would silently fall back to `unknown`.
|
|
466
|
+
*/
|
|
467
|
+
type ObjectExpandNested<TLinkToken extends LinkToken<string, string, LinkTargetObjectTypeIdValue>, TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens, TChild> = (nested: ObjectExpandBuilder<ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>, TRegisteredObjectTypes>) => ObjectExpandBuilder<ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>, TRegisteredObjectTypes, TChild>;
|
|
468
|
+
export interface ObjectQueryBuilder<TObjectType extends ObjectTypeWithPropertyTokens, TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens, TValueTypes extends readonly ValueType[], TLinks = unknown> {
|
|
469
|
+
/** Normalized provider-neutral query IR. */
|
|
470
|
+
readonly ir: ObjectQuery;
|
|
471
|
+
/** Add a typed property predicate at the current object type. */
|
|
472
|
+
where(where: (builder: ObjectWhereBuilder<TObjectType, TValueTypes>) => ObjectWhereClause<TObjectType, TValueTypes> | readonly ObjectWhereClause<TObjectType, TValueTypes>[]): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>;
|
|
473
|
+
/** Search configured text fields at the current object type. */
|
|
474
|
+
search(query: string, options?: {
|
|
475
|
+
fields?: readonly ObjectSetQueryPropertyToken<TObjectType>[];
|
|
476
|
+
}): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>;
|
|
477
|
+
/** Search a vector property at the current object type. */
|
|
478
|
+
vector(property: ObjectSetQueryPropertyToken<TObjectType>, vector: readonly number[], options: {
|
|
479
|
+
k: number;
|
|
480
|
+
}): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>;
|
|
481
|
+
/** Follow an outgoing link and make the linked object type the current result type. */
|
|
482
|
+
traverse<TLinkToken extends LinkToken<TObjectType["id"], string, LinkTargetObjectTypeIdValue>>(link: TLinkToken, options?: {
|
|
483
|
+
direction?: "outgoing";
|
|
484
|
+
}): ObjectQueryBuilder<ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>, TRegisteredObjectTypes, TValueTypes>;
|
|
485
|
+
/** Follow an incoming link and make the link source object type the current result type. */
|
|
486
|
+
traverse<TLinkToken extends LinkToken<string, string, TObjectType["id"] | readonly string[]>>(link: TLinkToken, options: {
|
|
487
|
+
direction: "incoming";
|
|
488
|
+
}): ObjectQueryBuilder<ObjectTypeForId<TRegisteredObjectTypes, TLinkToken["objectTypeId"]>, TRegisteredObjectTypes, TValueTypes>;
|
|
489
|
+
/**
|
|
490
|
+
* Attach an outgoing link's target objects to each row under `.links`, without
|
|
491
|
+
* changing the result type — the additive counterpart to `traverse` (which
|
|
492
|
+
* replaces the set). The callback nests deeper hops.
|
|
493
|
+
*
|
|
494
|
+
* Each call widens `TLinks`, so `list`/`first` rows gain a typed `.links` entry
|
|
495
|
+
* for this link (cardinality `"one"` → `Target | null`, `"many"` → `Target[]`,
|
|
496
|
+
* each carrying optional `linkProperties` and its own nested `.links`). Nested
|
|
497
|
+
* targets stay precise when the link uses direct object targets or when the id
|
|
498
|
+
* target resolves through the registry, and otherwise degrade to the loose base.
|
|
499
|
+
*/
|
|
500
|
+
expand<TLinkToken extends LinkToken<TObjectType["id"], string, LinkTargetObjectTypeIdValue>, TChild = unknown>(link: TLinkToken, build: ObjectExpandNested<TLinkToken, TRegisteredObjectTypes, TChild>): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks & ExpansionEntry<TLinkToken, TRegisteredObjectTypes, TChild>>;
|
|
501
|
+
expand<TLinkToken extends LinkToken<TObjectType["id"], string, LinkTargetObjectTypeIdValue>, TChild = unknown>(link: TLinkToken, options?: ObjectExpandOptions<ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>>, build?: ObjectExpandNested<TLinkToken, TRegisteredObjectTypes, TChild>): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks & ExpansionEntry<TLinkToken, TRegisteredObjectTypes, TChild>>;
|
|
502
|
+
/** Add property ordering at the current object type. */
|
|
503
|
+
orderBy(property: ObjectSetQueryPropertyToken<TObjectType>, direction?: ObjectQuerySortDirection): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>;
|
|
504
|
+
/** Add relevance ordering for providers that support ranked search. */
|
|
505
|
+
orderByRelevance(direction?: ObjectQuerySortDirection): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>;
|
|
506
|
+
/** Bound the result count. */
|
|
507
|
+
limit(limit: number): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>;
|
|
508
|
+
/** Request one page of results. */
|
|
509
|
+
page(input: {
|
|
510
|
+
pageSize: number;
|
|
511
|
+
pageToken?: string;
|
|
512
|
+
}): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>;
|
|
513
|
+
/** Validate this query against the registered ontology. */
|
|
514
|
+
validate(): ValidatedObjectQuery;
|
|
515
|
+
/** Return a provider-neutral explanation tree for this query. */
|
|
516
|
+
explain(): ObjectQueryExplanation;
|
|
517
|
+
/** Format `explain()` as a compact diagnostic string. */
|
|
518
|
+
formatExplanation(): string;
|
|
519
|
+
/** Execute this query and return matching objects (rows carry `.links` when expanded). */
|
|
520
|
+
list(): Promise<ListResult<ObjectQueryRow<TObjectType, TValueTypes, TLinks>>>;
|
|
521
|
+
list(options: {
|
|
522
|
+
includeTotal: false;
|
|
523
|
+
}): Promise<ListResultWithoutTotal<ObjectQueryRow<TObjectType, TValueTypes, TLinks>>>;
|
|
524
|
+
list(options: {
|
|
525
|
+
includeTotal?: true;
|
|
526
|
+
}): Promise<ListResult<ObjectQueryRow<TObjectType, TValueTypes, TLinks>>>;
|
|
527
|
+
list(options?: ObjectQueryListOptions): Promise<ListResult<ObjectQueryRow<TObjectType, TValueTypes, TLinks>> | ListResultWithoutTotal<ObjectQueryRow<TObjectType, TValueTypes, TLinks>>>;
|
|
528
|
+
/** Count the matching objects without returning rows. */
|
|
529
|
+
count(): Promise<number>;
|
|
530
|
+
/** Check whether any object matches without returning rows. */
|
|
531
|
+
exists(): Promise<boolean>;
|
|
532
|
+
/** Count matching objects by configured facetable properties. */
|
|
533
|
+
facets(input: readonly ObjectQueryFacetInput<TObjectType>[]): Promise<ObjectQueryFacetResult[]>;
|
|
534
|
+
/** Execute this query with an outer limit of one and return the first object. */
|
|
535
|
+
first(): Promise<ObjectQueryRow<TObjectType, TValueTypes, TLinks> | null>;
|
|
536
|
+
}
|
|
537
|
+
export interface ObjectByIdHandle<TObjectType extends ObjectTypeWithPropertyTokens, TValueTypes extends readonly ValueType[]> {
|
|
538
|
+
/** Get the object at this id, or null if it doesn't exist. */
|
|
539
|
+
get(): Promise<TwinObject<TObjectType, TValueTypes> | null>;
|
|
540
|
+
/** List links from this object, optionally filtered by link token. */
|
|
541
|
+
listLinks(link?: LinkTokenForObjectType<TObjectType>): Promise<readonly ObjectLinkRow[]>;
|
|
542
|
+
/** Create or update a link from the current object to a target object. */
|
|
543
|
+
link<TLinkToken extends LinkTokenForObjectType<TObjectType>>(link: TLinkToken, target: ObjectRef<ResolveTargetTypeId<TLinkToken["targetObjectTypeId"]>>, options?: {
|
|
544
|
+
properties?: Record<string, unknown>;
|
|
545
|
+
}): Promise<void>;
|
|
546
|
+
/** Remove a link from the current object to a target object. */
|
|
547
|
+
unlink<TLinkToken extends LinkTokenForObjectType<TObjectType>>(link: TLinkToken, target: ObjectRef<ResolveTargetTypeId<TLinkToken["targetObjectTypeId"]>>): Promise<void>;
|
|
548
|
+
/** Request an action on this object by id (dynamic / server contexts). */
|
|
549
|
+
requestAction(input: {
|
|
550
|
+
actionId: string;
|
|
551
|
+
params?: Record<string, unknown>;
|
|
552
|
+
runId?: string;
|
|
553
|
+
}): Promise<RequestActionResult>;
|
|
554
|
+
/**
|
|
555
|
+
* Request an action on this object using a typed action reference.
|
|
556
|
+
* Params are inferred from the action's declared shape.
|
|
557
|
+
*/
|
|
558
|
+
requestAction<const TAction extends TypedActionReference>(input: {
|
|
559
|
+
action: TAction;
|
|
560
|
+
params: NoInfer<TypedActionParams<TAction>>;
|
|
561
|
+
runId?: string;
|
|
562
|
+
}): Promise<RequestActionResult>;
|
|
563
|
+
/** Request an action and wait for the terminal lifecycle event. */
|
|
564
|
+
requestActionAndWait(input: {
|
|
565
|
+
actionId: string;
|
|
566
|
+
params?: Record<string, unknown>;
|
|
567
|
+
timeoutMs?: number;
|
|
568
|
+
signal?: AbortSignal;
|
|
569
|
+
}): Promise<ActionRunRecord>;
|
|
570
|
+
/** Request a typed action and wait for the terminal lifecycle event. */
|
|
571
|
+
requestActionAndWait<const TAction extends TypedActionReference>(input: {
|
|
572
|
+
action: TAction;
|
|
573
|
+
params: NoInfer<TypedActionParams<TAction>>;
|
|
574
|
+
timeoutMs?: number;
|
|
575
|
+
signal?: AbortSignal;
|
|
576
|
+
}): Promise<ActionRunRecord>;
|
|
577
|
+
/**
|
|
578
|
+
* Delete this object, cascading over its links in the same commit.
|
|
579
|
+
*
|
|
580
|
+
* For an object written only from code this is not reversible — the identity ceases to exist, and
|
|
581
|
+
* `restore()` has nothing to bring back. For an object a projection also writes, the delete records
|
|
582
|
+
* a managed override: the object stays hidden even while the projection keeps asserting it, until
|
|
583
|
+
* `restore()` withdraws the override.
|
|
584
|
+
*
|
|
585
|
+
* Deleting a missing object is a no-op.
|
|
586
|
+
*/
|
|
587
|
+
delete(): Promise<void>;
|
|
588
|
+
/** Withdraw a previous `delete()`. A no-op unless a projection still asserts this object. */
|
|
589
|
+
restore(): Promise<void>;
|
|
590
|
+
/** Read and write telemetry for one telemetry-mode property token. */
|
|
591
|
+
telemetry<TToken extends TelemetryPropertyToken<TObjectType>>(property: TToken): TelemetryChannel<TToken, TValueTypes>;
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Public API surface of a Sixb runtime instance.
|
|
595
|
+
*
|
|
596
|
+
* The class `Sixb<T>` implements this interface so the contract is
|
|
597
|
+
* enforced at compile time and easy to scan in one place.
|
|
598
|
+
*/
|
|
599
|
+
export interface SixbInstance<_ extends readonly OntologySource[]> {
|
|
600
|
+
readonly id: string;
|
|
601
|
+
readonly ontology: OntologyRegistry;
|
|
602
|
+
readonly broker: Broker;
|
|
603
|
+
readonly events: DomainEventLog;
|
|
604
|
+
readonly logs: LogsRuntime;
|
|
605
|
+
readonly storage: Storage;
|
|
606
|
+
readonly lakeStorage: LakeStorage;
|
|
607
|
+
readonly blobStorage: BlobStorage;
|
|
608
|
+
readonly queues: Queues;
|
|
609
|
+
readonly sandboxes?: SandboxFactory;
|
|
610
|
+
readonly rules?: readonly RuleDefinition[];
|
|
611
|
+
readonly security: SecurityRegistry;
|
|
612
|
+
readonly auth: AuthRuntime;
|
|
613
|
+
readonly actions: ActionsRuntime;
|
|
614
|
+
readonly workflows: WorkflowsRuntime;
|
|
615
|
+
readonly agents: AgentsRuntime;
|
|
616
|
+
/** Create a principal-scoped runtime surface that enforces authorization grants. */
|
|
617
|
+
as(context: AuthorizationContext): ScopedSixb<_>;
|
|
618
|
+
/** All registered object types. */
|
|
619
|
+
listObjectTypes(): readonly ObjectTypeWithPropertyTokens[];
|
|
620
|
+
/** Lookup an object type by id. */
|
|
621
|
+
getObjectTypeById(objectTypeId: string): ObjectTypeWithPropertyTokens | null;
|
|
622
|
+
/** Resolve an object type by id, or throw if it is unknown. */
|
|
623
|
+
resolveObjectType(objectTypeId: string): ObjectTypeWithPropertyTokens;
|
|
624
|
+
/** Value types registered in the runtime ontology, keyed by id. */
|
|
625
|
+
getValueTypesById(): ReadonlyMap<string, ValueType>;
|
|
626
|
+
/** All registered action definitions. */
|
|
627
|
+
listActions(): readonly ActionDefinition[];
|
|
628
|
+
/** Lookup an action definition by id. */
|
|
629
|
+
getActionById(actionId: string): ActionDefinition | null;
|
|
630
|
+
/** All registered global actions. */
|
|
631
|
+
listGlobalActions(): readonly ActionDefinition[];
|
|
632
|
+
/** All actions valid for an object type, including inherited actions. */
|
|
633
|
+
listActionsForType(objectType: ObjectType): readonly ActionDefinition[];
|
|
634
|
+
/** All registered dataset definitions. */
|
|
635
|
+
listDatasets(): readonly DatasetDefinition[];
|
|
636
|
+
/** Lookup a dataset definition by id. */
|
|
637
|
+
getDatasetById(datasetId: string): DatasetDefinition | null;
|
|
638
|
+
/** All registered sync definitions. */
|
|
639
|
+
listSyncs(): readonly SyncDefinition[];
|
|
640
|
+
/** Lookup a sync definition by id. */
|
|
641
|
+
getSyncById(syncId: string): SyncDefinition | null;
|
|
642
|
+
/** All registered pipeline definitions. */
|
|
643
|
+
listPipelines(): readonly PipelineDefinition[];
|
|
644
|
+
/** Lookup a pipeline definition by id. */
|
|
645
|
+
getPipelineById(pipelineId: string): PipelineDefinition | null;
|
|
646
|
+
/**
|
|
647
|
+
* Request an action run by id. Queued, not run inline — see `requestActionAndWait`.
|
|
648
|
+
*
|
|
649
|
+
* Every start verb on this runtime is `request*` for that reason: `run*` implied inline execution
|
|
650
|
+
* that never happened.
|
|
651
|
+
*/
|
|
652
|
+
requestAction(input: RequestActionInput): Promise<RequestActionResult>;
|
|
653
|
+
/** Request an action run and wait for it to reach a terminal state. */
|
|
654
|
+
requestActionAndWait(input: RequestActionAndWaitInput): Promise<ActionRunRecord>;
|
|
655
|
+
/** Queue a workflow run by id. */
|
|
656
|
+
requestWorkflowRun(input: RequestWorkflowRunInput): Promise<WorkflowRunRequestResult>;
|
|
657
|
+
/** Queue a sync run by id. */
|
|
658
|
+
requestSyncRun(input: RequestSyncRunInput): Promise<SyncRunRequestResult>;
|
|
659
|
+
/** Queue a pipeline run by id. */
|
|
660
|
+
requestPipelineRun(input: RequestPipelineRunInput): Promise<PipelineRunRequestResult>;
|
|
661
|
+
/** Queue an agent turn by id. */
|
|
662
|
+
requestAgentRun(input: RequestAgentRunInput): Promise<RequestAgentRunResult>;
|
|
663
|
+
/** All registered schedule definitions. */
|
|
664
|
+
listSchedules(): readonly ScheduleDefinition[];
|
|
665
|
+
/** Lookup a schedule definition by id. */
|
|
666
|
+
getScheduleById(scheduleId: string): ScheduleDefinition | null;
|
|
667
|
+
/** All registered rule definitions. */
|
|
668
|
+
listRules(): readonly RuleDefinition[];
|
|
669
|
+
/** Lookup a rule definition by id. */
|
|
670
|
+
getRuleById(ruleId: string): RuleDefinition | null;
|
|
671
|
+
/** All registered connector definitions. */
|
|
672
|
+
listConnectors(): readonly ConnectorDefinition[];
|
|
673
|
+
/** Lookup a connector definition by id. */
|
|
674
|
+
getConnectorById(connectorId: string): ConnectorDefinition | null;
|
|
675
|
+
/** All webhook endpoints registered through connector adapters. */
|
|
676
|
+
listWebhooks(): readonly RegisteredWebhook[];
|
|
677
|
+
/** Lookup a registered connector webhook by connector id and webhook id. */
|
|
678
|
+
getWebhookById(connectorId: string, webhookId: string): RegisteredWebhook | null;
|
|
679
|
+
/**
|
|
680
|
+
* Resolve a connector definition to its connected client.
|
|
681
|
+
*
|
|
682
|
+
* The first call connects lazily and caches the result for reuse within the runtime.
|
|
683
|
+
*/
|
|
684
|
+
connector<TAdapter extends ConnectorAdapter>(definition: ConnectorDefinition<string, TAdapter>): Promise<ConnectorClient<TAdapter>>;
|
|
685
|
+
/** Start the scheduler runtime for all registered schedules. */
|
|
686
|
+
startScheduler(): Promise<void>;
|
|
687
|
+
/** Stop the scheduler runtime. */
|
|
688
|
+
stopScheduler(): Promise<void>;
|
|
689
|
+
/** Start durable outbox recovery and bounded ontology retention. */
|
|
690
|
+
startOntologyMaintenance(): Promise<OntologyMaintenanceHandle>;
|
|
691
|
+
/** Latest cached asynchronous delivery and cleanup status. */
|
|
692
|
+
getOntologyOperationalStatus(): OntologyOperationalStatus;
|
|
693
|
+
/** Verify required storage reachability and migration state. */
|
|
694
|
+
checkReadiness(): Promise<SixbReadiness>;
|
|
695
|
+
/** Disconnect all currently connected connector clients. */
|
|
696
|
+
disconnectConnectors(): Promise<void>;
|
|
697
|
+
/** Close the runtime broker provider if it owns external resources. */
|
|
698
|
+
closeBroker(): Promise<void>;
|
|
699
|
+
/** Close the process logger provider, flushing buffered output. */
|
|
700
|
+
closeLogger(): Promise<void>;
|
|
701
|
+
/**
|
|
702
|
+
* Type-safe ObjectSet for a registered object type.
|
|
703
|
+
*
|
|
704
|
+
* Not part of this interface because `ObjectSet` triggers deep type
|
|
705
|
+
* instantiation when the generic parameter is the widened base
|
|
706
|
+
* `ObjectTypeWithPropertyTokens`. Use `sixb.objects(MyConcreteType)`
|
|
707
|
+
* directly — TypeScript infers the narrow type from the literal.
|
|
708
|
+
*
|
|
709
|
+
* Signature: `objects<T>(objectType: T): ObjectSet<T, RegisteredValueTypes>`
|
|
710
|
+
*/
|
|
711
|
+
/** Get the primary property id for a given object type. */
|
|
712
|
+
getPrimaryPropertyId(objectTypeId: string): string;
|
|
713
|
+
/** Upsert an object by type id (for server / dynamic contexts). */
|
|
714
|
+
upsertObject(objectTypeId: string, properties: Record<string, unknown>): Promise<ObjectRow>;
|
|
715
|
+
/** Append telemetry for multiple objects of a given type. */
|
|
716
|
+
appendTelemetry(objectTypeId: string, items: readonly {
|
|
717
|
+
id: string;
|
|
718
|
+
properties: Record<string, unknown>;
|
|
719
|
+
at?: Date;
|
|
720
|
+
}[]): Promise<void>;
|
|
721
|
+
/** Create or update a link from source to target. */
|
|
722
|
+
upsertLink(objectTypeId: string, sourceId: string, linkId: string, target: {
|
|
723
|
+
targetTypeId: string;
|
|
724
|
+
targetId: string;
|
|
725
|
+
properties?: Record<string, unknown>;
|
|
726
|
+
}): Promise<void>;
|
|
727
|
+
/** Remove a link from source to target. */
|
|
728
|
+
removeLink(objectTypeId: string, sourceId: string, linkId: string, target: {
|
|
729
|
+
targetTypeId: string;
|
|
730
|
+
targetId: string;
|
|
731
|
+
}): Promise<void>;
|
|
732
|
+
/** Batch upsert objects of a single type. Returns per-item results. */
|
|
733
|
+
upsertObjectBatch(objectTypeId: string, items: readonly {
|
|
734
|
+
properties: Record<string, unknown>;
|
|
735
|
+
}[]): Promise<readonly BatchItemResult<ObjectRow>[]>;
|
|
736
|
+
/** Batch upsert links. Returns per-item results. */
|
|
737
|
+
upsertLinkBatch(items: readonly {
|
|
738
|
+
objectTypeId: string;
|
|
739
|
+
sourceId: string;
|
|
740
|
+
linkId: string;
|
|
741
|
+
target: {
|
|
742
|
+
targetTypeId: string;
|
|
743
|
+
targetId: string;
|
|
744
|
+
properties?: Record<string, unknown>;
|
|
745
|
+
};
|
|
746
|
+
}[]): Promise<readonly BatchItemResult<void>[]>;
|
|
747
|
+
/** Cross-type object listing for dashboards and search. */
|
|
748
|
+
list(params: {
|
|
749
|
+
objectTypeIds?: readonly string[];
|
|
750
|
+
idPrefix?: string;
|
|
751
|
+
idSuffix?: string;
|
|
752
|
+
updatedAfter?: Date;
|
|
753
|
+
updatedBefore?: Date;
|
|
754
|
+
createdAfter?: Date;
|
|
755
|
+
createdBefore?: Date;
|
|
756
|
+
limit?: number;
|
|
757
|
+
offset?: number;
|
|
758
|
+
orderBy?: "createdAt" | "updatedAt" | "primaryId";
|
|
759
|
+
order?: "asc" | "desc";
|
|
760
|
+
}): Promise<ListResult<ObjectRow>>;
|
|
761
|
+
/** Collect all transitive sub-types of the given object type id. */
|
|
762
|
+
listSubTypes(objectTypeId: string): string[];
|
|
763
|
+
/** All registered object projection definitions. */
|
|
764
|
+
listObjectProjections(): readonly ObjectProjectionDefinition[];
|
|
765
|
+
/** All registered link projection definitions. */
|
|
766
|
+
listLinkProjections(): readonly LinkProjectionDefinition[];
|
|
767
|
+
/** All registered telemetry projection definitions. */
|
|
768
|
+
listTelemetryProjections(): readonly TelemetryProjectionDefinition[];
|
|
769
|
+
/** Lookup a registered projection by id. */
|
|
770
|
+
getProjectionById(projectionId: string): ProjectionDefinition | null;
|
|
771
|
+
}
|
|
772
|
+
export interface ObjectSet<TObjectType extends ObjectTypeWithPropertyTokens, TValueTypes extends readonly ValueType[], TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens = TObjectType> {
|
|
773
|
+
/** Get an object by id, or null if it doesn't exist. */
|
|
774
|
+
get(id: string): Promise<TwinObject<TObjectType, TValueTypes> | null>;
|
|
775
|
+
/** Upsert object state facts (latest projection). */
|
|
776
|
+
upsert(input: {
|
|
777
|
+
properties: InferObjectProperties<TObjectType, TValueTypes>;
|
|
778
|
+
}): Promise<TwinObject<TObjectType, TValueTypes>>;
|
|
779
|
+
/** Build an executable provider-neutral object query rooted at this object type. */
|
|
780
|
+
query(): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes>;
|
|
781
|
+
/** Bind operations to a specific object id. */
|
|
782
|
+
byId(id: string): ObjectByIdHandle<TObjectType, TValueTypes>;
|
|
783
|
+
/** List stored objects of this type with storage-system filtering and pagination. */
|
|
784
|
+
list(input?: ObjectSetListInput): Promise<ListResult<TwinObject<TObjectType, TValueTypes>>>;
|
|
785
|
+
/** Append telemetry for multiple objects in a single batch. */
|
|
786
|
+
appendTelemetryBatch(items: readonly {
|
|
787
|
+
id: string;
|
|
788
|
+
properties: InferTelemetryBatchProperties<TObjectType, TValueTypes>;
|
|
789
|
+
at?: Date;
|
|
790
|
+
}[]): Promise<void>;
|
|
791
|
+
/** Request an action on an object of this type by id (dynamic / server contexts). */
|
|
792
|
+
requestAction(input: {
|
|
793
|
+
id: string;
|
|
794
|
+
actionId: string;
|
|
795
|
+
params?: Record<string, unknown>;
|
|
796
|
+
runId?: string;
|
|
797
|
+
}): Promise<RequestActionResult>;
|
|
798
|
+
/**
|
|
799
|
+
* Request an action on an object of this type using a typed action reference.
|
|
800
|
+
* Params are inferred from the action's declared shape.
|
|
801
|
+
*/
|
|
802
|
+
requestAction<const TAction extends TypedActionReference>(input: {
|
|
803
|
+
id: string;
|
|
804
|
+
action: TAction;
|
|
805
|
+
params: NoInfer<TypedActionParams<TAction>>;
|
|
806
|
+
runId?: string;
|
|
807
|
+
}): Promise<RequestActionResult>;
|
|
808
|
+
/** Request an action on an object and wait for the terminal lifecycle event. */
|
|
809
|
+
requestActionAndWait(input: {
|
|
810
|
+
id: string;
|
|
811
|
+
actionId: string;
|
|
812
|
+
params?: Record<string, unknown>;
|
|
813
|
+
timeoutMs?: number;
|
|
814
|
+
signal?: AbortSignal;
|
|
815
|
+
}): Promise<ActionRunRecord>;
|
|
816
|
+
/** Request a typed action and wait for the terminal lifecycle event. */
|
|
817
|
+
requestActionAndWait<const TAction extends TypedActionReference>(input: {
|
|
818
|
+
id: string;
|
|
819
|
+
action: TAction;
|
|
820
|
+
params: NoInfer<TypedActionParams<TAction>>;
|
|
821
|
+
timeoutMs?: number;
|
|
822
|
+
signal?: AbortSignal;
|
|
823
|
+
}): Promise<ActionRunRecord>;
|
|
824
|
+
/** Create or update a link (string-based, for server/dynamic usage). */
|
|
825
|
+
upsertLink(input: {
|
|
826
|
+
sourceId: string;
|
|
827
|
+
linkId: string;
|
|
828
|
+
targetTypeId: string;
|
|
829
|
+
targetId: string;
|
|
830
|
+
properties?: Record<string, unknown>;
|
|
831
|
+
}): Promise<void>;
|
|
832
|
+
/** Remove a link (string-based, for server/dynamic usage). */
|
|
833
|
+
removeLink(input: {
|
|
834
|
+
sourceId: string;
|
|
835
|
+
linkId: string;
|
|
836
|
+
targetTypeId: string;
|
|
837
|
+
targetId: string;
|
|
838
|
+
}): Promise<void>;
|
|
839
|
+
}
|
|
840
|
+
//# sourceMappingURL=types.d.ts.map
|