@executioncontrolprotocol/core 0.14.0 → 0.51.0
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/README.md +25 -36
- package/dist/bindings/extension.d.ts +15 -1
- package/dist/bindings/extension.d.ts.map +1 -1
- package/dist/bindings/extension.js +23 -0
- package/dist/bindings/extension.js.map +1 -1
- package/dist/bindings/policy.d.ts +15 -1
- package/dist/bindings/policy.d.ts.map +1 -1
- package/dist/bindings/policy.js +23 -0
- package/dist/bindings/policy.js.map +1 -1
- package/dist/bindings/step.d.ts +3 -3
- package/dist/bindings/step.d.ts.map +1 -1
- package/dist/compile/extract-workflow-module.d.ts +18 -2
- package/dist/compile/extract-workflow-module.d.ts.map +1 -1
- package/dist/compile/extract-workflow-module.js +39 -10
- package/dist/compile/extract-workflow-module.js.map +1 -1
- package/dist/compile/index.d.ts +4 -13
- package/dist/compile/index.d.ts.map +1 -1
- package/dist/compile/index.js +1 -48
- package/dist/compile/index.js.map +1 -1
- package/dist/compile/types.d.ts +1 -1
- package/dist/compile/types.d.ts.map +1 -1
- package/dist/config/builder.d.ts +39 -0
- package/dist/config/builder.d.ts.map +1 -0
- package/dist/config/builder.js +50 -0
- package/dist/config/builder.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -0
- package/dist/definitions/capability.d.ts +3 -2
- package/dist/definitions/capability.d.ts.map +1 -1
- package/dist/definitions/capability.js +4 -3
- package/dist/definitions/capability.js.map +1 -1
- package/dist/definitions/environment.d.ts +38 -0
- package/dist/definitions/environment.d.ts.map +1 -0
- package/dist/definitions/environment.js +77 -0
- package/dist/definitions/environment.js.map +1 -0
- package/dist/definitions/extension.d.ts +16 -4
- package/dist/definitions/extension.d.ts.map +1 -1
- package/dist/definitions/extension.js +27 -6
- package/dist/definitions/extension.js.map +1 -1
- package/dist/definitions/hook.d.ts +1 -1
- package/dist/definitions/hook.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +2 -2
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/index.js +1 -1
- package/dist/definitions/index.js.map +1 -1
- package/dist/definitions/policy.d.ts +8 -0
- package/dist/definitions/policy.d.ts.map +1 -1
- package/dist/definitions/policy.js +16 -0
- package/dist/definitions/policy.js.map +1 -1
- package/dist/definitions/types.d.ts +23 -5
- package/dist/definitions/types.d.ts.map +1 -1
- package/dist/encoding/contracts.js +1 -1
- package/dist/encoding/contracts.js.map +1 -1
- package/dist/encoding/decode-builder.d.ts +1 -1
- package/dist/encoding/decode-builder.d.ts.map +1 -1
- package/dist/encoding/decode-builder.js +1 -9
- package/dist/encoding/decode-builder.js.map +1 -1
- package/dist/encoding/encode-builder.d.ts +1 -1
- package/dist/encoding/encode-builder.d.ts.map +1 -1
- package/dist/encoding/encode-builder.js +1 -1
- package/dist/encoding/encode-builder.js.map +1 -1
- package/dist/encoding/errors.d.ts +2 -2
- package/dist/encoding/errors.d.ts.map +1 -1
- package/dist/encoding/invoke-utility.d.ts +1 -1
- package/dist/encoding/invoke-utility.d.ts.map +1 -1
- package/dist/encoding/invoke-utility.js +1 -1
- package/dist/encoding/invoke-utility.js.map +1 -1
- package/dist/encoding/json-codec.d.ts +1 -1
- package/dist/encoding/json-codec.d.ts.map +1 -1
- package/dist/encoding/json-codec.js +1 -1
- package/dist/encoding/json-codec.js.map +1 -1
- package/dist/encoding/normalize-workflow.d.ts +1 -1
- package/dist/encoding/normalize-workflow.d.ts.map +1 -1
- package/dist/encoding/resolve.js +1 -1
- package/dist/encoding/resolve.js.map +1 -1
- package/dist/encoding/schemas.d.ts +20 -20
- package/dist/encoding/schemas.js +1 -1
- package/dist/encoding/schemas.js.map +1 -1
- package/dist/environment/bindings.d.ts +4 -14
- package/dist/environment/bindings.d.ts.map +1 -1
- package/dist/environment/bindings.js +2 -7
- package/dist/environment/bindings.js.map +1 -1
- package/dist/environment/config-resolver.d.ts +1 -3
- package/dist/environment/config-resolver.d.ts.map +1 -1
- package/dist/environment/config-resolver.js +13 -19
- package/dist/environment/config-resolver.js.map +1 -1
- package/dist/environment/describe.d.ts +1 -1
- package/dist/environment/describe.d.ts.map +1 -1
- package/dist/environment/describe.js +32 -24
- package/dist/environment/describe.js.map +1 -1
- package/dist/environment/ecp.d.ts +10 -13
- package/dist/environment/ecp.d.ts.map +1 -1
- package/dist/environment/ecp.js +4 -14
- package/dist/environment/ecp.js.map +1 -1
- package/dist/environment/environment.d.ts +99 -49
- package/dist/environment/environment.d.ts.map +1 -1
- package/dist/environment/environment.js +203 -155
- package/dist/environment/environment.js.map +1 -1
- package/dist/environment/search.d.ts +1 -1
- package/dist/environment/search.d.ts.map +1 -1
- package/dist/environment/search.js +10 -7
- package/dist/environment/search.js.map +1 -1
- package/dist/environment/validate-binding-config.d.ts +12 -0
- package/dist/environment/validate-binding-config.d.ts.map +1 -0
- package/dist/environment/validate-binding-config.js +43 -0
- package/dist/environment/validate-binding-config.js.map +1 -0
- package/dist/file/file-ref.d.ts +1 -1
- package/dist/file/file-ref.d.ts.map +1 -1
- package/dist/file/file-ref.js +1 -1
- package/dist/file/file-ref.js.map +1 -1
- package/dist/fluent/encode-fluent.d.ts +1 -1
- package/dist/fluent/encode-fluent.d.ts.map +1 -1
- package/dist/fluent/encode-fluent.js +1 -1
- package/dist/fluent/encode-fluent.js.map +1 -1
- package/dist/fluent/render-expr.d.ts +1 -1
- package/dist/fluent/render-expr.d.ts.map +1 -1
- package/dist/fluent/render-node.d.ts +1 -1
- package/dist/fluent/render-node.d.ts.map +1 -1
- package/dist/fluent/render-value.d.ts +1 -2
- package/dist/fluent/render-value.d.ts.map +1 -1
- package/dist/fluent/render-value.js +0 -5
- package/dist/fluent/render-value.js.map +1 -1
- package/dist/fluent/render-workflow.d.ts +1 -1
- package/dist/fluent/render-workflow.d.ts.map +1 -1
- package/dist/fluent/render-workflow.js +0 -2
- package/dist/fluent/render-workflow.js.map +1 -1
- package/dist/formats/format-fluent.d.ts.map +1 -1
- package/dist/formats/format-fluent.js +10 -8
- package/dist/formats/format-fluent.js.map +1 -1
- package/dist/formats/format-json.d.ts.map +1 -1
- package/dist/formats/format-json.js +22 -27
- package/dist/formats/format-json.js.map +1 -1
- package/dist/formats/register-core-formats.d.ts +2 -1
- package/dist/formats/register-core-formats.d.ts.map +1 -1
- package/dist/formats/register-core-formats.js +2 -4
- package/dist/formats/register-core-formats.js.map +1 -1
- package/dist/helpers/env.d.ts +1 -1
- package/dist/helpers/env.d.ts.map +1 -1
- package/dist/helpers/expr.d.ts +1 -1
- package/dist/helpers/expr.d.ts.map +1 -1
- package/dist/helpers/merge-parameter-body.d.ts +11 -0
- package/dist/helpers/merge-parameter-body.d.ts.map +1 -0
- package/dist/helpers/merge-parameter-body.js +36 -0
- package/dist/helpers/merge-parameter-body.js.map +1 -0
- package/dist/{harness/authoring/to-provider-chat-turns.d.ts → helpers/provider-chat-turns.d.ts} +7 -7
- package/dist/helpers/provider-chat-turns.d.ts.map +1 -0
- package/dist/{harness/authoring/to-provider-chat-turns.js → helpers/provider-chat-turns.js} +4 -4
- package/dist/helpers/provider-chat-turns.js.map +1 -0
- package/dist/helpers/ref.d.ts +1 -1
- package/dist/helpers/ref.d.ts.map +1 -1
- package/dist/helpers/secrets.d.ts +1 -1
- package/dist/helpers/secrets.d.ts.map +1 -1
- package/dist/helpers/state.d.ts +1 -1
- package/dist/helpers/state.d.ts.map +1 -1
- package/dist/index.d.ts +28 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -21
- package/dist/index.js.map +1 -1
- package/dist/invoke/execute-invoke.d.ts +2 -2
- package/dist/invoke/execute-invoke.d.ts.map +1 -1
- package/dist/invoke/execute-invoke.js +8 -20
- package/dist/invoke/execute-invoke.js.map +1 -1
- package/dist/invoke/invoke-builder.d.ts +1 -3
- package/dist/invoke/invoke-builder.d.ts.map +1 -1
- package/dist/invoke/invoke-builder.js +1 -6
- package/dist/invoke/invoke-builder.js.map +1 -1
- package/dist/media/base64.d.ts +11 -0
- package/dist/media/base64.d.ts.map +1 -0
- package/dist/media/base64.js +30 -0
- package/dist/media/base64.js.map +1 -0
- package/dist/media/browser-locator.d.ts +8 -0
- package/dist/media/browser-locator.d.ts.map +1 -0
- package/dist/media/browser-locator.js +22 -0
- package/dist/media/browser-locator.js.map +1 -0
- package/dist/media/index.d.ts +4 -2
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +4 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/resolve-file.d.ts +17 -15
- package/dist/media/resolve-file.d.ts.map +1 -1
- package/dist/media/resolve-file.js +28 -85
- package/dist/media/resolve-file.js.map +1 -1
- package/dist/media/resolved-file.d.ts +15 -0
- package/dist/media/resolved-file.d.ts.map +1 -0
- package/dist/media/resolved-file.js +2 -0
- package/dist/media/resolved-file.js.map +1 -0
- package/dist/media/write-media.d.ts +3 -14
- package/dist/media/write-media.d.ts.map +1 -1
- package/dist/media/write-media.js +17 -99
- package/dist/media/write-media.js.map +1 -1
- package/dist/patch/apply-patch.d.ts +2 -2
- package/dist/patch/apply-patch.d.ts.map +1 -1
- package/dist/patch/apply-patch.js +1 -1
- package/dist/patch/apply-patch.js.map +1 -1
- package/dist/patch/normalize-input.d.ts +1 -1
- package/dist/patch/normalize-input.d.ts.map +1 -1
- package/dist/patch/normalize-input.js +1 -1
- package/dist/patch/normalize-input.js.map +1 -1
- package/dist/patch/patch-builder.d.ts +1 -1
- package/dist/patch/patch-builder.d.ts.map +1 -1
- package/dist/patch/patch-builder.js.map +1 -1
- package/dist/patch/patch-document.d.ts +2 -2
- package/dist/patch/resolve-path.d.ts +2 -2
- package/dist/patch/resolve-path.d.ts.map +1 -1
- package/dist/patch/resolve-path.js +1 -1
- package/dist/patch/resolve-path.js.map +1 -1
- package/dist/patch/step-index.d.ts +1 -1
- package/dist/patch/step-index.d.ts.map +1 -1
- package/dist/policies/registry-control.d.ts +20 -0
- package/dist/policies/registry-control.d.ts.map +1 -0
- package/dist/policies/registry-control.js +72 -0
- package/dist/policies/registry-control.js.map +1 -0
- package/dist/registry/ensure-bound-extensions.d.ts +1 -1
- package/dist/registry/ensure-bound-extensions.js +2 -2
- package/dist/registry/ensure-bound-extensions.js.map +1 -1
- package/dist/registry/errors.d.ts +1 -1
- package/dist/registry/errors.d.ts.map +1 -1
- package/dist/registry/errors.js +2 -1
- package/dist/registry/errors.js.map +1 -1
- package/dist/registry/extension-catalog.d.ts +3 -18
- package/dist/registry/extension-catalog.d.ts.map +1 -1
- package/dist/registry/extension-catalog.js +3 -25
- package/dist/registry/extension-catalog.js.map +1 -1
- package/dist/registry/registry.d.ts +8 -9
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +9 -10
- package/dist/registry/registry.js.map +1 -1
- package/dist/runtime/capability-execution.d.ts +9 -8
- package/dist/runtime/capability-execution.d.ts.map +1 -1
- package/dist/runtime/capability-execution.js +11 -11
- package/dist/runtime/capability-execution.js.map +1 -1
- package/dist/runtime/commit.d.ts +2 -2
- package/dist/runtime/commit.d.ts.map +1 -1
- package/dist/runtime/context.d.ts +24 -4
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/dispatch-capability.d.ts +1 -1
- package/dist/runtime/dispatch-capability.d.ts.map +1 -1
- package/dist/runtime/dispatch-capability.js +10 -5
- package/dist/runtime/dispatch-capability.js.map +1 -1
- package/dist/runtime/error-details.d.ts +13 -0
- package/dist/runtime/error-details.d.ts.map +1 -0
- package/dist/runtime/error-details.js +56 -0
- package/dist/runtime/error-details.js.map +1 -0
- package/dist/runtime/executor.d.ts +14 -5
- package/dist/runtime/executor.d.ts.map +1 -1
- package/dist/runtime/in-memory-executor.d.ts +1 -1
- package/dist/runtime/in-memory-executor.d.ts.map +1 -1
- package/dist/runtime/in-memory-executor.js +195 -27
- package/dist/runtime/in-memory-executor.js.map +1 -1
- package/dist/runtime/lifecycle.d.ts +1 -1
- package/dist/runtime/lifecycle.d.ts.map +1 -1
- package/dist/runtime/mutation-records.d.ts +1 -1
- package/dist/runtime/mutation-records.d.ts.map +1 -1
- package/dist/runtime/policy-engine.d.ts +3 -2
- package/dist/runtime/policy-engine.d.ts.map +1 -1
- package/dist/runtime/policy-engine.js +12 -3
- package/dist/runtime/policy-engine.js.map +1 -1
- package/dist/runtime/remote-invoke.d.ts +22 -2
- package/dist/runtime/remote-invoke.d.ts.map +1 -1
- package/dist/runtime/remote-invoke.js +43 -6
- package/dist/runtime/remote-invoke.js.map +1 -1
- package/dist/runtime/resolve-input.d.ts +1 -1
- package/dist/runtime/resolve-input.d.ts.map +1 -1
- package/dist/runtime/resolve-input.js +6 -0
- package/dist/runtime/resolve-input.js.map +1 -1
- package/dist/runtime/runtime-ids.d.ts +4 -4
- package/dist/runtime/runtime-ids.d.ts.map +1 -1
- package/dist/runtime/runtime-ids.js +4 -4
- package/dist/runtime/runtime-ids.js.map +1 -1
- package/dist/runtime/step-order.d.ts +32 -0
- package/dist/runtime/step-order.d.ts.map +1 -0
- package/dist/runtime/step-order.js +85 -0
- package/dist/runtime/step-order.js.map +1 -0
- package/dist/runtime/store.d.ts +1 -1
- package/dist/runtime/store.d.ts.map +1 -1
- package/dist/schema/json-schema.d.ts +20 -4
- package/dist/schema/json-schema.d.ts.map +1 -1
- package/dist/schema/json-schema.js +66 -10
- package/dist/schema/json-schema.js.map +1 -1
- package/dist/schema/workflow-io.d.ts +1 -1
- package/dist/schema/workflow-io.d.ts.map +1 -1
- package/dist/schemas/decode.result.json +165 -0
- package/dist/schemas/encode.result.json +172 -0
- package/dist/schemas/environment.describe.json +362 -0
- package/dist/schemas/environment.manifest.json +159 -0
- package/dist/schemas/environment.search.json +72 -0
- package/dist/schemas/patch.json +104 -0
- package/dist/schemas/patch.result.json +270 -0
- package/dist/schemas/requirements.json +102 -0
- package/dist/schemas/run.journal.json +158 -0
- package/dist/schemas/run.request.json +491 -0
- package/dist/schemas/run.result.json +240 -0
- package/dist/schemas/validation.result.json +99 -0
- package/dist/schemas/workflow.manifest.json +457 -0
- package/dist/services/index.d.ts +4 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +4 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/map.d.ts +24 -0
- package/dist/services/map.d.ts.map +1 -0
- package/dist/services/map.js +37 -0
- package/dist/services/map.js.map +1 -0
- package/dist/services/media-store.d.ts +78 -0
- package/dist/services/media-store.d.ts.map +1 -0
- package/dist/services/media-store.js +16 -0
- package/dist/services/media-store.js.map +1 -0
- package/dist/services/provider.d.ts +35 -0
- package/dist/services/provider.d.ts.map +1 -0
- package/dist/services/provider.js +25 -0
- package/dist/services/provider.js.map +1 -0
- package/dist/testing/index.d.ts +4 -2
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +4 -2
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/memory-media-store.d.ts +24 -0
- package/dist/testing/memory-media-store.d.ts.map +1 -0
- package/dist/testing/memory-media-store.js +71 -0
- package/dist/testing/memory-media-store.js.map +1 -0
- package/dist/testing/test-extension.d.ts +19 -3
- package/dist/testing/test-extension.d.ts.map +1 -1
- package/dist/testing/test-extension.js +83 -51
- package/dist/testing/test-extension.js.map +1 -1
- package/dist/testing/test-lifecycle-extension.d.ts +5 -4
- package/dist/testing/test-lifecycle-extension.d.ts.map +1 -1
- package/dist/testing/test-lifecycle-extension.js +28 -25
- package/dist/testing/test-lifecycle-extension.js.map +1 -1
- package/dist/types/capabilities.d.ts +39 -0
- package/dist/types/capabilities.d.ts.map +1 -0
- package/dist/types/capabilities.js +2 -0
- package/dist/types/capabilities.js.map +1 -0
- package/dist/types/capability-execution.d.ts +5 -0
- package/dist/types/capability-execution.d.ts.map +1 -0
- package/dist/types/capability-execution.js +3 -0
- package/dist/types/capability-execution.js.map +1 -0
- package/dist/types/capability-metadata.d.ts +216 -0
- package/dist/types/capability-metadata.d.ts.map +1 -0
- package/dist/types/capability-metadata.js +138 -0
- package/dist/types/capability-metadata.js.map +1 -0
- package/dist/types/encoding.d.ts +103 -0
- package/dist/types/encoding.d.ts.map +1 -0
- package/dist/types/encoding.js +29 -0
- package/dist/types/encoding.js.map +1 -0
- package/dist/types/environment.d.ts +155 -0
- package/dist/types/environment.d.ts.map +1 -0
- package/dist/types/environment.js +2 -0
- package/dist/types/environment.js.map +1 -0
- package/dist/types/errors.d.ts +93 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +89 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/file-ref.d.ts +84 -0
- package/dist/types/file-ref.d.ts.map +1 -0
- package/dist/types/file-ref.js +117 -0
- package/dist/types/file-ref.js.map +1 -0
- package/dist/types/image-output.d.ts +32 -0
- package/dist/types/image-output.d.ts.map +1 -0
- package/dist/types/image-output.js +11 -0
- package/dist/types/image-output.js.map +1 -0
- package/dist/types/index.d.ts +36 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +13 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/invoke.d.ts +51 -0
- package/dist/types/invoke.d.ts.map +1 -0
- package/dist/types/invoke.js +32 -0
- package/dist/types/invoke.js.map +1 -0
- package/dist/types/journal.d.ts +121 -0
- package/dist/types/journal.d.ts.map +1 -0
- package/dist/types/journal.js +3 -0
- package/dist/types/journal.js.map +1 -0
- package/dist/types/lifecycle.d.ts +27 -0
- package/dist/types/lifecycle.d.ts.map +1 -0
- package/dist/types/lifecycle.js +2 -0
- package/dist/types/lifecycle.js.map +1 -0
- package/dist/types/model.d.ts +102 -0
- package/dist/types/model.d.ts.map +1 -0
- package/dist/types/model.js +51 -0
- package/dist/types/model.js.map +1 -0
- package/dist/types/patch-errors.d.ts +11 -0
- package/dist/types/patch-errors.d.ts.map +1 -0
- package/dist/types/patch-errors.js +9 -0
- package/dist/types/patch-errors.js.map +1 -0
- package/dist/types/patch.d.ts +51 -0
- package/dist/types/patch.d.ts.map +1 -0
- package/dist/types/patch.js +2 -0
- package/dist/types/patch.js.map +1 -0
- package/dist/types/registry.d.ts +24 -0
- package/dist/types/registry.d.ts.map +1 -0
- package/dist/types/registry.js +2 -0
- package/dist/types/registry.js.map +1 -0
- package/dist/types/requirements.d.ts +42 -0
- package/dist/types/requirements.d.ts.map +1 -0
- package/dist/types/requirements.js +2 -0
- package/dist/types/requirements.js.map +1 -0
- package/dist/types/run-events.d.ts +32 -0
- package/dist/types/run-events.d.ts.map +1 -0
- package/dist/types/run-events.js +8 -0
- package/dist/types/run-events.js.map +1 -0
- package/dist/types/run.d.ts +48 -0
- package/dist/types/run.d.ts.map +1 -0
- package/dist/types/run.js +2 -0
- package/dist/types/run.js.map +1 -0
- package/dist/types/schema.d.ts +58 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +2 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/types/store.d.ts +30 -0
- package/dist/types/store.d.ts.map +1 -0
- package/dist/types/store.js +2 -0
- package/dist/types/store.js.map +1 -0
- package/dist/types/validation.d.ts +30 -0
- package/dist/types/validation.d.ts.map +1 -0
- package/dist/types/validation.js +2 -0
- package/dist/types/validation.js.map +1 -0
- package/dist/types/version.d.ts +5 -0
- package/dist/types/version.d.ts.map +1 -0
- package/dist/types/version.js +3 -0
- package/dist/types/version.js.map +1 -0
- package/dist/types/workflow.d.ts +80 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/types/workflow.js +2 -0
- package/dist/types/workflow.js.map +1 -0
- package/dist/util/semver-range.d.ts +6 -0
- package/dist/util/semver-range.d.ts.map +1 -0
- package/dist/util/semver-range.js +9 -0
- package/dist/util/semver-range.js.map +1 -0
- package/dist/validate/environment.d.ts +5 -2
- package/dist/validate/environment.d.ts.map +1 -1
- package/dist/validate/environment.js +38 -19
- package/dist/validate/environment.js.map +1 -1
- package/dist/validate/workflow-schema.d.ts +17 -31
- package/dist/validate/workflow-schema.d.ts.map +1 -1
- package/dist/validate/workflow-schema.js +1 -10
- package/dist/validate/workflow-schema.js.map +1 -1
- package/dist/validate/workflow.d.ts +1 -1
- package/dist/validate/workflow.d.ts.map +1 -1
- package/dist/validate/workflow.js +2 -11
- package/dist/validate/workflow.js.map +1 -1
- package/dist/validate/zod-mapper.d.ts +1 -1
- package/dist/validate/zod-mapper.d.ts.map +1 -1
- package/dist/workflow/assign-unique-step-ids.d.ts +1 -1
- package/dist/workflow/assign-unique-step-ids.d.ts.map +1 -1
- package/dist/workflow/builder.d.ts +17 -1
- package/dist/workflow/builder.d.ts.map +1 -1
- package/dist/workflow/builder.js +27 -1
- package/dist/workflow/builder.js.map +1 -1
- package/dist/workflow/flow.d.ts +2 -2
- package/dist/workflow/flow.d.ts.map +1 -1
- package/dist/workflow/requirements.d.ts +34 -0
- package/dist/workflow/requirements.d.ts.map +1 -0
- package/dist/workflow/requirements.js +134 -0
- package/dist/workflow/requirements.js.map +1 -0
- package/package.json +13 -86
- package/dist/bindings/harness.d.ts +0 -24
- package/dist/bindings/harness.d.ts.map +0 -1
- package/dist/bindings/harness.js +0 -44
- package/dist/bindings/harness.js.map +0 -1
- package/dist/bindings/runtime.d.ts +0 -19
- package/dist/bindings/runtime.d.ts.map +0 -1
- package/dist/bindings/runtime.js +0 -32
- package/dist/bindings/runtime.js.map +0 -1
- package/dist/browser-runtime-entry.d.ts +0 -61
- package/dist/browser-runtime-entry.d.ts.map +0 -1
- package/dist/browser-runtime-entry.js +0 -54
- package/dist/browser-runtime-entry.js.map +0 -1
- package/dist/browser.d.ts +0 -20
- package/dist/browser.d.ts.map +0 -1
- package/dist/browser.js +0 -20
- package/dist/browser.js.map +0 -1
- package/dist/compile/compile-harness-artifact.d.ts +0 -30
- package/dist/compile/compile-harness-artifact.d.ts.map +0 -1
- package/dist/compile/compile-harness-artifact.js +0 -43
- package/dist/compile/compile-harness-artifact.js.map +0 -1
- package/dist/compile/entry.d.ts +0 -3
- package/dist/compile/entry.d.ts.map +0 -1
- package/dist/compile/entry.js +0 -3
- package/dist/compile/entry.js.map +0 -1
- package/dist/compile/evaluate-browser.d.ts +0 -7
- package/dist/compile/evaluate-browser.d.ts.map +0 -1
- package/dist/compile/evaluate-browser.js +0 -26
- package/dist/compile/evaluate-browser.js.map +0 -1
- package/dist/compile/evaluate-harness-artifact.d.ts +0 -3
- package/dist/compile/evaluate-harness-artifact.d.ts.map +0 -1
- package/dist/compile/evaluate-harness-artifact.js +0 -17
- package/dist/compile/evaluate-harness-artifact.js.map +0 -1
- package/dist/compile/evaluate.d.ts +0 -5
- package/dist/compile/evaluate.d.ts.map +0 -1
- package/dist/compile/evaluate.js +0 -20
- package/dist/compile/evaluate.js.map +0 -1
- package/dist/compile/extract-harness-artifact.d.ts +0 -9
- package/dist/compile/extract-harness-artifact.d.ts.map +0 -1
- package/dist/compile/extract-harness-artifact.js +0 -33
- package/dist/compile/extract-harness-artifact.js.map +0 -1
- package/dist/compile/index.browser.d.ts +0 -49
- package/dist/compile/index.browser.d.ts.map +0 -1
- package/dist/compile/index.browser.js +0 -93
- package/dist/compile/index.browser.js.map +0 -1
- package/dist/compile/prepare-browser-source.d.ts +0 -3
- package/dist/compile/prepare-browser-source.d.ts.map +0 -1
- package/dist/compile/prepare-browser-source.js +0 -25
- package/dist/compile/prepare-browser-source.js.map +0 -1
- package/dist/compile/transpile-browser.d.ts +0 -44
- package/dist/compile/transpile-browser.d.ts.map +0 -1
- package/dist/compile/transpile-browser.js +0 -120
- package/dist/compile/transpile-browser.js.map +0 -1
- package/dist/compile/transpile.d.ts +0 -27
- package/dist/compile/transpile.d.ts.map +0 -1
- package/dist/compile/transpile.js +0 -150
- package/dist/compile/transpile.js.map +0 -1
- package/dist/definitions/runtime.d.ts +0 -22
- package/dist/definitions/runtime.d.ts.map +0 -1
- package/dist/definitions/runtime.js +0 -48
- package/dist/definitions/runtime.js.map +0 -1
- package/dist/encoding/strip-harness-typescript-output.d.ts +0 -7
- package/dist/encoding/strip-harness-typescript-output.d.ts.map +0 -1
- package/dist/encoding/strip-harness-typescript-output.js +0 -40
- package/dist/encoding/strip-harness-typescript-output.js.map +0 -1
- package/dist/encoding/strip-markdown-fences.d.ts +0 -6
- package/dist/encoding/strip-markdown-fences.d.ts.map +0 -1
- package/dist/encoding/strip-markdown-fences.js +0 -23
- package/dist/encoding/strip-markdown-fences.js.map +0 -1
- package/dist/feedback/collect.d.ts +0 -32
- package/dist/feedback/collect.d.ts.map +0 -1
- package/dist/feedback/collect.js +0 -97
- package/dist/feedback/collect.js.map +0 -1
- package/dist/feedback/index.d.ts +0 -2
- package/dist/feedback/index.d.ts.map +0 -1
- package/dist/feedback/index.js +0 -2
- package/dist/feedback/index.js.map +0 -1
- package/dist/harness/authoring/chat-result.d.ts +0 -19
- package/dist/harness/authoring/chat-result.d.ts.map +0 -1
- package/dist/harness/authoring/chat-result.js +0 -56
- package/dist/harness/authoring/chat-result.js.map +0 -1
- package/dist/harness/authoring/classified-intent.d.ts +0 -46
- package/dist/harness/authoring/classified-intent.d.ts.map +0 -1
- package/dist/harness/authoring/classified-intent.js +0 -261
- package/dist/harness/authoring/classified-intent.js.map +0 -1
- package/dist/harness/authoring/context-policy.d.ts +0 -47
- package/dist/harness/authoring/context-policy.d.ts.map +0 -1
- package/dist/harness/authoring/context-policy.js +0 -160
- package/dist/harness/authoring/context-policy.js.map +0 -1
- package/dist/harness/authoring/describe-for-prompt.d.ts +0 -19
- package/dist/harness/authoring/describe-for-prompt.d.ts.map +0 -1
- package/dist/harness/authoring/describe-for-prompt.js +0 -105
- package/dist/harness/authoring/describe-for-prompt.js.map +0 -1
- package/dist/harness/authoring/encode-prompt-text.d.ts +0 -7
- package/dist/harness/authoring/encode-prompt-text.d.ts.map +0 -1
- package/dist/harness/authoring/encode-prompt-text.js +0 -13
- package/dist/harness/authoring/encode-prompt-text.js.map +0 -1
- package/dist/harness/authoring/environment-question.d.ts +0 -6
- package/dist/harness/authoring/environment-question.d.ts.map +0 -1
- package/dist/harness/authoring/environment-question.js +0 -11
- package/dist/harness/authoring/environment-question.js.map +0 -1
- package/dist/harness/authoring/index.d.ts +0 -23
- package/dist/harness/authoring/index.d.ts.map +0 -1
- package/dist/harness/authoring/index.js +0 -22
- package/dist/harness/authoring/index.js.map +0 -1
- package/dist/harness/authoring/normalize-create-eql-output.d.ts +0 -27
- package/dist/harness/authoring/normalize-create-eql-output.d.ts.map +0 -1
- package/dist/harness/authoring/normalize-create-eql-output.js +0 -284
- package/dist/harness/authoring/normalize-create-eql-output.js.map +0 -1
- package/dist/harness/authoring/normalize-intent-eql-output.d.ts +0 -7
- package/dist/harness/authoring/normalize-intent-eql-output.d.ts.map +0 -1
- package/dist/harness/authoring/normalize-intent-eql-output.js +0 -59
- package/dist/harness/authoring/normalize-intent-eql-output.js.map +0 -1
- package/dist/harness/authoring/normalize-patch-eql-output.d.ts +0 -28
- package/dist/harness/authoring/normalize-patch-eql-output.d.ts.map +0 -1
- package/dist/harness/authoring/normalize-patch-eql-output.js +0 -202
- package/dist/harness/authoring/normalize-patch-eql-output.js.map +0 -1
- package/dist/harness/authoring/normalize-workflow-output.d.ts +0 -6
- package/dist/harness/authoring/normalize-workflow-output.d.ts.map +0 -1
- package/dist/harness/authoring/normalize-workflow-output.js +0 -51
- package/dist/harness/authoring/normalize-workflow-output.js.map +0 -1
- package/dist/harness/authoring/patch-clear-intent.d.ts +0 -17
- package/dist/harness/authoring/patch-clear-intent.d.ts.map +0 -1
- package/dist/harness/authoring/patch-clear-intent.js +0 -46
- package/dist/harness/authoring/patch-clear-intent.js.map +0 -1
- package/dist/harness/authoring/presentation.d.ts +0 -57
- package/dist/harness/authoring/presentation.d.ts.map +0 -1
- package/dist/harness/authoring/presentation.js +0 -137
- package/dist/harness/authoring/presentation.js.map +0 -1
- package/dist/harness/authoring/recover-structured-patch.d.ts +0 -21
- package/dist/harness/authoring/recover-structured-patch.d.ts.map +0 -1
- package/dist/harness/authoring/recover-structured-patch.js +0 -230
- package/dist/harness/authoring/recover-structured-patch.js.map +0 -1
- package/dist/harness/authoring/repair-workflow-json.d.ts +0 -16
- package/dist/harness/authoring/repair-workflow-json.d.ts.map +0 -1
- package/dist/harness/authoring/repair-workflow-json.js +0 -183
- package/dist/harness/authoring/repair-workflow-json.js.map +0 -1
- package/dist/harness/authoring/safe-reply.d.ts +0 -71
- package/dist/harness/authoring/safe-reply.d.ts.map +0 -1
- package/dist/harness/authoring/safe-reply.js +0 -291
- package/dist/harness/authoring/safe-reply.js.map +0 -1
- package/dist/harness/authoring/summarize-capability-schema.d.ts +0 -20
- package/dist/harness/authoring/summarize-capability-schema.d.ts.map +0 -1
- package/dist/harness/authoring/summarize-capability-schema.js +0 -141
- package/dist/harness/authoring/summarize-capability-schema.js.map +0 -1
- package/dist/harness/authoring/summarize-environment.d.ts +0 -77
- package/dist/harness/authoring/summarize-environment.d.ts.map +0 -1
- package/dist/harness/authoring/summarize-environment.js +0 -298
- package/dist/harness/authoring/summarize-environment.js.map +0 -1
- package/dist/harness/authoring/summarize-probe-context.d.ts +0 -31
- package/dist/harness/authoring/summarize-probe-context.d.ts.map +0 -1
- package/dist/harness/authoring/summarize-probe-context.js +0 -134
- package/dist/harness/authoring/summarize-probe-context.js.map +0 -1
- package/dist/harness/authoring/summarize-run-context.d.ts +0 -28
- package/dist/harness/authoring/summarize-run-context.d.ts.map +0 -1
- package/dist/harness/authoring/summarize-run-context.js +0 -40
- package/dist/harness/authoring/summarize-run-context.js.map +0 -1
- package/dist/harness/authoring/summarize-workflow.d.ts +0 -37
- package/dist/harness/authoring/summarize-workflow.d.ts.map +0 -1
- package/dist/harness/authoring/summarize-workflow.js +0 -148
- package/dist/harness/authoring/summarize-workflow.js.map +0 -1
- package/dist/harness/authoring/to-provider-chat-turns.d.ts.map +0 -1
- package/dist/harness/authoring/to-provider-chat-turns.js.map +0 -1
- package/dist/harness/call-model.d.ts +0 -15
- package/dist/harness/call-model.d.ts.map +0 -1
- package/dist/harness/call-model.js +0 -59
- package/dist/harness/call-model.js.map +0 -1
- package/dist/harness/context.d.ts +0 -28
- package/dist/harness/context.d.ts.map +0 -1
- package/dist/harness/context.js +0 -19
- package/dist/harness/context.js.map +0 -1
- package/dist/harness/define-harness.d.ts +0 -37
- package/dist/harness/define-harness.d.ts.map +0 -1
- package/dist/harness/define-harness.js +0 -88
- package/dist/harness/define-harness.js.map +0 -1
- package/dist/harness/definitions/test-minimal-harness.d.ts +0 -13
- package/dist/harness/definitions/test-minimal-harness.d.ts.map +0 -1
- package/dist/harness/definitions/test-minimal-harness.js +0 -45
- package/dist/harness/definitions/test-minimal-harness.js.map +0 -1
- package/dist/harness/execute-harness.d.ts +0 -9
- package/dist/harness/execute-harness.d.ts.map +0 -1
- package/dist/harness/execute-harness.js +0 -142
- package/dist/harness/execute-harness.js.map +0 -1
- package/dist/harness/format-resolve.d.ts +0 -26
- package/dist/harness/format-resolve.d.ts.map +0 -1
- package/dist/harness/format-resolve.js +0 -50
- package/dist/harness/format-resolve.js.map +0 -1
- package/dist/harness/harness-catalog.d.ts +0 -41
- package/dist/harness/harness-catalog.d.ts.map +0 -1
- package/dist/harness/harness-catalog.js +0 -66
- package/dist/harness/harness-catalog.js.map +0 -1
- package/dist/harness/index.d.ts +0 -11
- package/dist/harness/index.d.ts.map +0 -1
- package/dist/harness/index.js +0 -9
- package/dist/harness/index.js.map +0 -1
- package/dist/harness/prompts/build-repair-hint.d.ts +0 -8
- package/dist/harness/prompts/build-repair-hint.d.ts.map +0 -1
- package/dist/harness/prompts/build-repair-hint.js +0 -28
- package/dist/harness/prompts/build-repair-hint.js.map +0 -1
- package/dist/harness/prompts/build-system-prompt.d.ts +0 -7
- package/dist/harness/prompts/build-system-prompt.d.ts.map +0 -1
- package/dist/harness/prompts/build-system-prompt.js +0 -97
- package/dist/harness/prompts/build-system-prompt.js.map +0 -1
- package/dist/harness/prompts/eql-primer.d.ts +0 -14
- package/dist/harness/prompts/eql-primer.d.ts.map +0 -1
- package/dist/harness/prompts/eql-primer.js +0 -221
- package/dist/harness/prompts/eql-primer.js.map +0 -1
- package/dist/harness/prompts/fixtures-root.d.ts +0 -5
- package/dist/harness/prompts/fixtures-root.d.ts.map +0 -1
- package/dist/harness/prompts/fixtures-root.js +0 -7
- package/dist/harness/prompts/fixtures-root.js.map +0 -1
- package/dist/harness/prompts/harness-prompt-fixture-schema.d.ts +0 -95
- package/dist/harness/prompts/harness-prompt-fixture-schema.d.ts.map +0 -1
- package/dist/harness/prompts/harness-prompt-fixture-schema.js +0 -28
- package/dist/harness/prompts/harness-prompt-fixture-schema.js.map +0 -1
- package/dist/harness/prompts/identity-primer.d.ts +0 -6
- package/dist/harness/prompts/identity-primer.d.ts.map +0 -1
- package/dist/harness/prompts/identity-primer.js +0 -9
- package/dist/harness/prompts/identity-primer.js.map +0 -1
- package/dist/harness/prompts/index.d.ts +0 -7
- package/dist/harness/prompts/index.d.ts.map +0 -1
- package/dist/harness/prompts/index.js +0 -7
- package/dist/harness/prompts/index.js.map +0 -1
- package/dist/harness/prompts/load-schema-example.browser.d.ts +0 -11
- package/dist/harness/prompts/load-schema-example.browser.d.ts.map +0 -1
- package/dist/harness/prompts/load-schema-example.browser.js +0 -70
- package/dist/harness/prompts/load-schema-example.browser.js.map +0 -1
- package/dist/harness/prompts/load-schema-example.d.ts +0 -11
- package/dist/harness/prompts/load-schema-example.d.ts.map +0 -1
- package/dist/harness/prompts/load-schema-example.js +0 -22
- package/dist/harness/prompts/load-schema-example.js.map +0 -1
- package/dist/harness/prompts/load-schema-example.node.d.ts +0 -7
- package/dist/harness/prompts/load-schema-example.node.d.ts.map +0 -1
- package/dist/harness/prompts/load-schema-example.node.js +0 -38
- package/dist/harness/prompts/load-schema-example.node.js.map +0 -1
- package/dist/harness/prompts/schema-example-files.d.ts +0 -7
- package/dist/harness/prompts/schema-example-files.d.ts.map +0 -1
- package/dist/harness/prompts/schema-example-files.js +0 -12
- package/dist/harness/prompts/schema-example-files.js.map +0 -1
- package/dist/harness/prompts/typescript-primer.d.ts +0 -11
- package/dist/harness/prompts/typescript-primer.d.ts.map +0 -1
- package/dist/harness/prompts/typescript-primer.js +0 -80
- package/dist/harness/prompts/typescript-primer.js.map +0 -1
- package/dist/harness/repair-loop-timing.d.ts +0 -17
- package/dist/harness/repair-loop-timing.d.ts.map +0 -1
- package/dist/harness/repair-loop-timing.js +0 -89
- package/dist/harness/repair-loop-timing.js.map +0 -1
- package/dist/harness/resolve-harness-binding.d.ts +0 -10
- package/dist/harness/resolve-harness-binding.d.ts.map +0 -1
- package/dist/harness/resolve-harness-binding.js +0 -14
- package/dist/harness/resolve-harness-binding.js.map +0 -1
- package/dist/harness/run-model-repair-loop.d.ts +0 -45
- package/dist/harness/run-model-repair-loop.d.ts.map +0 -1
- package/dist/harness/run-model-repair-loop.js +0 -57
- package/dist/harness/run-model-repair-loop.js.map +0 -1
- package/dist/harness/types.d.ts +0 -34
- package/dist/harness/types.d.ts.map +0 -1
- package/dist/harness/types.js +0 -2
- package/dist/harness/types.js.map +0 -1
- package/dist/helpers/browser.d.ts +0 -12
- package/dist/helpers/browser.d.ts.map +0 -1
- package/dist/helpers/browser.js +0 -12
- package/dist/helpers/browser.js.map +0 -1
- package/dist/loaders/files.d.ts +0 -13
- package/dist/loaders/files.d.ts.map +0 -1
- package/dist/loaders/files.js +0 -66
- package/dist/loaders/files.js.map +0 -1
- package/dist/loaders/index.d.ts +0 -2
- package/dist/loaders/index.d.ts.map +0 -1
- package/dist/loaders/index.js +0 -2
- package/dist/loaders/index.js.map +0 -1
- package/dist/loaders/read-media-file.d.ts +0 -6
- package/dist/loaders/read-media-file.d.ts.map +0 -1
- package/dist/loaders/read-media-file.js +0 -10
- package/dist/loaders/read-media-file.js.map +0 -1
- package/dist/node.d.ts +0 -8
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -8
- package/dist/node.js.map +0 -1
- package/dist/runtime/test-session-state.d.ts +0 -23
- package/dist/runtime/test-session-state.d.ts.map +0 -1
- package/dist/runtime/test-session-state.js +0 -62
- package/dist/runtime/test-session-state.js.map +0 -1
- package/dist/test-session/index.d.ts +0 -2
- package/dist/test-session/index.d.ts.map +0 -1
- package/dist/test-session/index.js +0 -2
- package/dist/test-session/index.js.map +0 -1
- package/dist/test-session/test-session.d.ts +0 -36
- package/dist/test-session/test-session.d.ts.map +0 -1
- package/dist/test-session/test-session.js +0 -115
- package/dist/test-session/test-session.js.map +0 -1
- package/dist/testing/test-model-generate.d.ts +0 -15
- package/dist/testing/test-model-generate.d.ts.map +0 -1
- package/dist/testing/test-model-generate.js +0 -71
- package/dist/testing/test-model-generate.js.map +0 -1
- package/dist/validate/harness.d.ts +0 -11
- package/dist/validate/harness.d.ts.map +0 -1
- package/dist/validate/harness.js +0 -72
- package/dist/validate/harness.js.map +0 -1
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/WorkflowManifest",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"WorkflowManifest": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"schema": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"const": "@executioncontrolprotocol.workflow"
|
|
11
|
+
},
|
|
12
|
+
"version": {
|
|
13
|
+
"$ref": "#/definitions/EcpVersion"
|
|
14
|
+
},
|
|
15
|
+
"workflow": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"properties": {
|
|
18
|
+
"id": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Workflow id."
|
|
21
|
+
},
|
|
22
|
+
"label": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Display label."
|
|
25
|
+
},
|
|
26
|
+
"accepts": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": {},
|
|
29
|
+
"description": "JSON Schema (object) for run input (`ecp.run(..., { input })`). Property names seed workflow state and are read with `ref(\"name\")`."
|
|
30
|
+
},
|
|
31
|
+
"returns": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": {},
|
|
34
|
+
"description": "JSON Schema (object) for public run output. Property names are top-level state keys (typically a step `.as()`)."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": [
|
|
38
|
+
"id"
|
|
39
|
+
],
|
|
40
|
+
"additionalProperties": false
|
|
41
|
+
},
|
|
42
|
+
"steps": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"$ref": "#/definitions/WorkflowNode"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"discovery": {
|
|
49
|
+
"$ref": "#/definitions/WorkflowDiscoveryMarker",
|
|
50
|
+
"description": "Present when this manifest is a disposable discovery / inspect workflow. Hosts read this instead of guessing from step ids."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": [
|
|
54
|
+
"schema",
|
|
55
|
+
"version",
|
|
56
|
+
"workflow",
|
|
57
|
+
"steps"
|
|
58
|
+
],
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"description": "Portable workflow manifest.",
|
|
61
|
+
"category": "Workflow"
|
|
62
|
+
},
|
|
63
|
+
"EcpVersion": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "ECP semantic version literal.",
|
|
66
|
+
"category": "Common"
|
|
67
|
+
},
|
|
68
|
+
"WorkflowNode": {
|
|
69
|
+
"anyOf": [
|
|
70
|
+
{
|
|
71
|
+
"$ref": "#/definitions/StepNode"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"$ref": "#/definitions/ParallelNode"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"$ref": "#/definitions/BranchNode"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"$ref": "#/definitions/LoopNode"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"description": "Workflow graph node union.",
|
|
84
|
+
"category": "Workflow"
|
|
85
|
+
},
|
|
86
|
+
"StepNode": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"type": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"const": "step"
|
|
92
|
+
},
|
|
93
|
+
"id": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"label": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"uses": {
|
|
100
|
+
"anyOf": [
|
|
101
|
+
{
|
|
102
|
+
"$ref": "#/definitions/CapabilityId"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "string"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"input": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"additionalProperties": {
|
|
112
|
+
"$ref": "#/definitions/InputValue"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"as": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "State key for committed output (fluent `.as()`)."
|
|
118
|
+
},
|
|
119
|
+
"mode": {
|
|
120
|
+
"$ref": "#/definitions/CommitMode",
|
|
121
|
+
"description": "Commit mode when `as` is set (fluent `.as(key, { mode })`)."
|
|
122
|
+
},
|
|
123
|
+
"when": {
|
|
124
|
+
"$ref": "#/definitions/ExprValue"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": [
|
|
128
|
+
"id",
|
|
129
|
+
"uses"
|
|
130
|
+
],
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"description": "Single capability step.",
|
|
133
|
+
"category": "Workflow"
|
|
134
|
+
},
|
|
135
|
+
"CapabilityId": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"description": "Capability id (`@namespace/name.capability`).",
|
|
138
|
+
"category": "Common"
|
|
139
|
+
},
|
|
140
|
+
"InputValue": {
|
|
141
|
+
"anyOf": [
|
|
142
|
+
{
|
|
143
|
+
"type": "string"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "number"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "boolean"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"type": "null"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"type": "array",
|
|
156
|
+
"items": {
|
|
157
|
+
"$ref": "#/definitions/InputValue"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"type": "object",
|
|
162
|
+
"additionalProperties": {
|
|
163
|
+
"$ref": "#/definitions/InputValue"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"$ref": "#/definitions/RefValue"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"$ref": "#/definitions/StateValue"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"$ref": "#/definitions/EnvValue"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"$ref": "#/definitions/SecretValue"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"description": "Input value allowed in step config.",
|
|
180
|
+
"category": "Workflow"
|
|
181
|
+
},
|
|
182
|
+
"RefValue": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"properties": {
|
|
185
|
+
"$ref": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"description": "State path prefixed with `state.` in manifests."
|
|
188
|
+
},
|
|
189
|
+
"optional": {
|
|
190
|
+
"type": "boolean",
|
|
191
|
+
"description": "When true, missing state does not fail resolution."
|
|
192
|
+
},
|
|
193
|
+
"fallback": {
|
|
194
|
+
"description": "Fallback when optional ref is missing."
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"required": [
|
|
198
|
+
"$ref"
|
|
199
|
+
],
|
|
200
|
+
"additionalProperties": false,
|
|
201
|
+
"description": "Workflow reference to committed state.",
|
|
202
|
+
"category": "Workflow"
|
|
203
|
+
},
|
|
204
|
+
"StateValue": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"properties": {
|
|
207
|
+
"$state": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "State path for staged mutations."
|
|
210
|
+
},
|
|
211
|
+
"optional": {
|
|
212
|
+
"type": "boolean"
|
|
213
|
+
},
|
|
214
|
+
"fallback": {}
|
|
215
|
+
},
|
|
216
|
+
"required": [
|
|
217
|
+
"$state"
|
|
218
|
+
],
|
|
219
|
+
"additionalProperties": false,
|
|
220
|
+
"description": "Mutable state handle in step input.",
|
|
221
|
+
"category": "Workflow"
|
|
222
|
+
},
|
|
223
|
+
"EnvValue": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"properties": {
|
|
226
|
+
"$env": {
|
|
227
|
+
"type": "string"
|
|
228
|
+
},
|
|
229
|
+
"optional": {
|
|
230
|
+
"type": "boolean"
|
|
231
|
+
},
|
|
232
|
+
"fallback": {}
|
|
233
|
+
},
|
|
234
|
+
"required": [
|
|
235
|
+
"$env"
|
|
236
|
+
],
|
|
237
|
+
"additionalProperties": false,
|
|
238
|
+
"description": "Environment config secret reference (not portable in workflows).",
|
|
239
|
+
"category": "Environment"
|
|
240
|
+
},
|
|
241
|
+
"SecretValue": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"properties": {
|
|
244
|
+
"$secret": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "Logical key in the OS secrets store."
|
|
247
|
+
},
|
|
248
|
+
"optional": {
|
|
249
|
+
"type": "boolean",
|
|
250
|
+
"description": "When true, missing secret does not fail resolution."
|
|
251
|
+
},
|
|
252
|
+
"fallback": {
|
|
253
|
+
"description": "Fallback when optional secret is missing."
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"required": [
|
|
257
|
+
"$secret"
|
|
258
|
+
],
|
|
259
|
+
"additionalProperties": false,
|
|
260
|
+
"description": "OS secrets reference (not portable in workflows).",
|
|
261
|
+
"category": "Environment"
|
|
262
|
+
},
|
|
263
|
+
"CommitMode": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"enum": [
|
|
266
|
+
"create",
|
|
267
|
+
"replace",
|
|
268
|
+
"merge",
|
|
269
|
+
"append",
|
|
270
|
+
"version"
|
|
271
|
+
],
|
|
272
|
+
"description": "Commit mode for step output.",
|
|
273
|
+
"category": "Workflow"
|
|
274
|
+
},
|
|
275
|
+
"ExprValue": {
|
|
276
|
+
"anyOf": [
|
|
277
|
+
{
|
|
278
|
+
"type": "object",
|
|
279
|
+
"properties": {
|
|
280
|
+
"eq": {
|
|
281
|
+
"type": "array",
|
|
282
|
+
"minItems": 2,
|
|
283
|
+
"items": [
|
|
284
|
+
{
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
287
|
+
{}
|
|
288
|
+
],
|
|
289
|
+
"maxItems": 2
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"required": [
|
|
293
|
+
"eq"
|
|
294
|
+
],
|
|
295
|
+
"additionalProperties": false
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"type": "object",
|
|
299
|
+
"properties": {
|
|
300
|
+
"neq": {
|
|
301
|
+
"type": "array",
|
|
302
|
+
"minItems": 2,
|
|
303
|
+
"items": [
|
|
304
|
+
{
|
|
305
|
+
"type": "string"
|
|
306
|
+
},
|
|
307
|
+
{}
|
|
308
|
+
],
|
|
309
|
+
"maxItems": 2
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": [
|
|
313
|
+
"neq"
|
|
314
|
+
],
|
|
315
|
+
"additionalProperties": false
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"type": "object",
|
|
319
|
+
"additionalProperties": {}
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"description": "Expression value in workflow conditions.",
|
|
323
|
+
"category": "Workflow"
|
|
324
|
+
},
|
|
325
|
+
"ParallelNode": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"properties": {
|
|
328
|
+
"type": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"const": "parallel"
|
|
331
|
+
},
|
|
332
|
+
"id": {
|
|
333
|
+
"type": "string"
|
|
334
|
+
},
|
|
335
|
+
"label": {
|
|
336
|
+
"type": "string"
|
|
337
|
+
},
|
|
338
|
+
"branches": {
|
|
339
|
+
"type": "array",
|
|
340
|
+
"items": {
|
|
341
|
+
"type": "array",
|
|
342
|
+
"items": {
|
|
343
|
+
"$ref": "#/definitions/WorkflowNode"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"required": [
|
|
349
|
+
"type",
|
|
350
|
+
"id",
|
|
351
|
+
"branches"
|
|
352
|
+
],
|
|
353
|
+
"additionalProperties": false,
|
|
354
|
+
"description": "Parallel branches.",
|
|
355
|
+
"category": "Workflow"
|
|
356
|
+
},
|
|
357
|
+
"BranchNode": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"properties": {
|
|
360
|
+
"type": {
|
|
361
|
+
"type": "string",
|
|
362
|
+
"const": "branch"
|
|
363
|
+
},
|
|
364
|
+
"id": {
|
|
365
|
+
"type": "string"
|
|
366
|
+
},
|
|
367
|
+
"label": {
|
|
368
|
+
"type": "string"
|
|
369
|
+
},
|
|
370
|
+
"branches": {
|
|
371
|
+
"type": "array",
|
|
372
|
+
"items": {
|
|
373
|
+
"type": "object",
|
|
374
|
+
"properties": {
|
|
375
|
+
"label": {
|
|
376
|
+
"type": "string"
|
|
377
|
+
},
|
|
378
|
+
"when": {
|
|
379
|
+
"$ref": "#/definitions/ExprValue"
|
|
380
|
+
},
|
|
381
|
+
"steps": {
|
|
382
|
+
"type": "array",
|
|
383
|
+
"items": {
|
|
384
|
+
"$ref": "#/definitions/WorkflowNode"
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"required": [
|
|
389
|
+
"when",
|
|
390
|
+
"steps"
|
|
391
|
+
],
|
|
392
|
+
"additionalProperties": false
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
"required": [
|
|
397
|
+
"type",
|
|
398
|
+
"id",
|
|
399
|
+
"branches"
|
|
400
|
+
],
|
|
401
|
+
"additionalProperties": false,
|
|
402
|
+
"description": "Conditional branches.",
|
|
403
|
+
"category": "Workflow"
|
|
404
|
+
},
|
|
405
|
+
"LoopNode": {
|
|
406
|
+
"type": "object",
|
|
407
|
+
"properties": {
|
|
408
|
+
"type": {
|
|
409
|
+
"type": "string",
|
|
410
|
+
"const": "loop"
|
|
411
|
+
},
|
|
412
|
+
"id": {
|
|
413
|
+
"type": "string"
|
|
414
|
+
},
|
|
415
|
+
"label": {
|
|
416
|
+
"type": "string"
|
|
417
|
+
},
|
|
418
|
+
"until": {
|
|
419
|
+
"$ref": "#/definitions/ExprValue"
|
|
420
|
+
},
|
|
421
|
+
"maxRounds": {
|
|
422
|
+
"type": "number"
|
|
423
|
+
},
|
|
424
|
+
"steps": {
|
|
425
|
+
"type": "array",
|
|
426
|
+
"items": {
|
|
427
|
+
"$ref": "#/definitions/WorkflowNode"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"required": [
|
|
432
|
+
"type",
|
|
433
|
+
"id",
|
|
434
|
+
"steps"
|
|
435
|
+
],
|
|
436
|
+
"additionalProperties": false,
|
|
437
|
+
"description": "Loop until condition.",
|
|
438
|
+
"category": "Workflow"
|
|
439
|
+
},
|
|
440
|
+
"WorkflowDiscoveryMarker": {
|
|
441
|
+
"type": "object",
|
|
442
|
+
"properties": {
|
|
443
|
+
"capabilityId": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"description": "Capability id the inspect workflow calls."
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"required": [
|
|
449
|
+
"capabilityId"
|
|
450
|
+
],
|
|
451
|
+
"additionalProperties": false,
|
|
452
|
+
"description": "Marker for a disposable one-step inspect workflow compiled from a capability.",
|
|
453
|
+
"category": "Workflow"
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
"$id": "https://ecp.dev/schemas/workflow.manifest.json"
|
|
457
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { snapshotServiceId, isService, type ServiceProvider, type ServiceToken, } from "./provider.js";
|
|
2
|
+
export { ServiceMap } from "./map.js";
|
|
3
|
+
export { MEDIA_STORE_ID, FILE_ARTIFACT_URI_PREFIX, DEFAULT_MEDIA_PREFIX, MEDIA_HTTP_PATH, MediaStore, type MediaStoreContext, type MediaWriteOptions, type MediaHttpWriteRequest, type MediaHttpReadResponse, } from "./media-store.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,YAAY,GAClB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,GAGV,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,UAAU,GAKX,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ServiceProvider, type ServiceToken } from "./provider.js";
|
|
2
|
+
/**
|
|
3
|
+
* Environment-scoped map of service id → provider.
|
|
4
|
+
* @category Environment
|
|
5
|
+
*/
|
|
6
|
+
export declare class ServiceMap {
|
|
7
|
+
private readonly providers;
|
|
8
|
+
/**
|
|
9
|
+
* Bind a provider. A second call with the same id replaces the previous one.
|
|
10
|
+
* @category Environment
|
|
11
|
+
*/
|
|
12
|
+
use(provider: ServiceProvider): this;
|
|
13
|
+
/**
|
|
14
|
+
* Look up a provider by token id.
|
|
15
|
+
* @category Environment
|
|
16
|
+
*/
|
|
17
|
+
get<T extends ServiceProvider>(token: ServiceToken<T>): T | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Copy the map. Provider objects are shared; keys stay the snapshot ids.
|
|
20
|
+
* @category Environment
|
|
21
|
+
*/
|
|
22
|
+
clone(): ServiceMap;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/services/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAA;AAEtB;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqC;IAE/D;;;OAGG;IACH,GAAG,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAMpC;;;OAGG;IACH,GAAG,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS;IAKrE;;;OAGG;IACH,KAAK,IAAI,UAAU;CAOpB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { snapshotServiceId, } from "./provider.js";
|
|
2
|
+
/**
|
|
3
|
+
* Environment-scoped map of service id → provider.
|
|
4
|
+
* @category Environment
|
|
5
|
+
*/
|
|
6
|
+
export class ServiceMap {
|
|
7
|
+
providers = new Map();
|
|
8
|
+
/**
|
|
9
|
+
* Bind a provider. A second call with the same id replaces the previous one.
|
|
10
|
+
* @category Environment
|
|
11
|
+
*/
|
|
12
|
+
use(provider) {
|
|
13
|
+
const id = snapshotServiceId(provider);
|
|
14
|
+
this.providers.set(id, provider);
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Look up a provider by token id.
|
|
19
|
+
* @category Environment
|
|
20
|
+
*/
|
|
21
|
+
get(token) {
|
|
22
|
+
const found = this.providers.get(token.id);
|
|
23
|
+
return found;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Copy the map. Provider objects are shared; keys stay the snapshot ids.
|
|
27
|
+
* @category Environment
|
|
28
|
+
*/
|
|
29
|
+
clone() {
|
|
30
|
+
const next = new ServiceMap();
|
|
31
|
+
for (const [id, provider] of this.providers) {
|
|
32
|
+
next.providers.set(id, provider);
|
|
33
|
+
}
|
|
34
|
+
return next;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/services/map.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,GAGlB,MAAM,eAAe,CAAA;AAEtB;;;GAGG;AACH,MAAM,OAAO,UAAU;IACJ,SAAS,GAAG,IAAI,GAAG,EAA2B,CAAA;IAE/D;;;OAGG;IACH,GAAG,CAAC,QAAyB;QAC3B,MAAM,EAAE,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAA;QACtC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;QAChC,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;OAGG;IACH,GAAG,CAA4B,KAAsB;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAC1C,OAAO,KAAsB,CAAA;IAC/B,CAAC;IAED;;;OAGG;IACH,KAAK;QACH,MAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAA;QAC7B,KAAK,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC5C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;QAClC,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { FileRef } from "../types/index.js";
|
|
2
|
+
import type { CapabilityArtifactStore } from "../runtime/artifacts.js";
|
|
3
|
+
import type { CapabilityBlobStore } from "../runtime/blobs.js";
|
|
4
|
+
import type { RemoteInvokeBinding } from "../runtime/remote-invoke.js";
|
|
5
|
+
import type { ResolvedFile } from "../media/resolved-file.js";
|
|
6
|
+
import type { ServiceProvider, ServiceToken } from "./provider.js";
|
|
7
|
+
/** Interface id for {@link MediaStore}. @category Media */
|
|
8
|
+
export declare const MEDIA_STORE_ID: "@executioncontrolprotocol/MediaStore";
|
|
9
|
+
/** URI prefix for disk-backed artifacts (`ecp://file/<relative>`). @category Media */
|
|
10
|
+
export declare const FILE_ARTIFACT_URI_PREFIX = "ecp://file/";
|
|
11
|
+
/** Default URI path prefix when a write omits `prefix`. @category Media */
|
|
12
|
+
export declare const DEFAULT_MEDIA_PREFIX = "artifacts/media";
|
|
13
|
+
/** HTTP path for paired-host media upload and download. @category Media */
|
|
14
|
+
export declare const MEDIA_HTTP_PATH = "/v1/media";
|
|
15
|
+
/**
|
|
16
|
+
* Context a {@link MediaStore} may use (blobs, pairing, extension config).
|
|
17
|
+
* @category Media
|
|
18
|
+
*/
|
|
19
|
+
export interface MediaStoreContext {
|
|
20
|
+
/** Run-scoped browser files keyed by `ecp://browser/<id>` locators. */
|
|
21
|
+
blobs?: CapabilityBlobStore;
|
|
22
|
+
/** Optional in-process artifact map for same-run preview. */
|
|
23
|
+
artifacts?: CapabilityArtifactStore;
|
|
24
|
+
/** Paired Node host for browser upload/read. */
|
|
25
|
+
remoteInvoke?: RemoteInvokeBinding;
|
|
26
|
+
/** Bound extension config (output prefix). */
|
|
27
|
+
extensionConfig?: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Options for {@link MediaStore.write}.
|
|
31
|
+
* @category Media
|
|
32
|
+
*/
|
|
33
|
+
export interface MediaWriteOptions {
|
|
34
|
+
/** MIME type. */
|
|
35
|
+
mediaType: string;
|
|
36
|
+
/** Optional filename. */
|
|
37
|
+
name?: string;
|
|
38
|
+
/** URI path prefix under the store (default {@link DEFAULT_MEDIA_PREFIX}). */
|
|
39
|
+
prefix?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Host file read/write bound with {@link Environment.use}.
|
|
43
|
+
* @category Media
|
|
44
|
+
*/
|
|
45
|
+
export interface MediaStore extends ServiceProvider<typeof MEDIA_STORE_ID> {
|
|
46
|
+
/** Resolve a `file` or `artifact` {@link FileRef} to bytes. */
|
|
47
|
+
read(ref: FileRef, ctx: MediaStoreContext): Promise<ResolvedFile>;
|
|
48
|
+
/** Persist bytes and return an artifact {@link FileRef}. */
|
|
49
|
+
write(bytes: Uint8Array, options: MediaWriteOptions, ctx: MediaStoreContext): Promise<FileRef>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Lookup token for {@link Environment.get} / {@link ServiceMap.get}.
|
|
53
|
+
* @category Media
|
|
54
|
+
*/
|
|
55
|
+
export declare const MediaStore: ServiceToken<MediaStore>;
|
|
56
|
+
/** JSON body for `POST {@link MEDIA_HTTP_PATH}`. @category Media */
|
|
57
|
+
export interface MediaHttpWriteRequest {
|
|
58
|
+
/** File bytes as base64. */
|
|
59
|
+
bytes: string;
|
|
60
|
+
/** MIME type. */
|
|
61
|
+
mediaType: string;
|
|
62
|
+
/** Optional filename. */
|
|
63
|
+
name?: string;
|
|
64
|
+
/** Optional URI path prefix. */
|
|
65
|
+
prefix?: string;
|
|
66
|
+
}
|
|
67
|
+
/** JSON body for `GET {@link MEDIA_HTTP_PATH}?uri=`. @category Media */
|
|
68
|
+
export interface MediaHttpReadResponse {
|
|
69
|
+
/** File bytes as base64. */
|
|
70
|
+
bytes: string;
|
|
71
|
+
/** MIME type when known. */
|
|
72
|
+
mediaType?: string;
|
|
73
|
+
/** Optional display name. */
|
|
74
|
+
name?: string;
|
|
75
|
+
/** Byte length. */
|
|
76
|
+
sizeBytes: number;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=media-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-store.d.ts","sourceRoot":"","sources":["../../src/services/media-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAElE,2DAA2D;AAC3D,eAAO,MAAM,cAAc,EAAG,sCAA+C,CAAA;AAE7E,sFAAsF;AACtF,eAAO,MAAM,wBAAwB,gBAAgB,CAAA;AAErD,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,oBAAoB,CAAA;AAErD,2EAA2E;AAC3E,eAAO,MAAM,eAAe,cAAc,CAAA;AAE1C;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,6DAA6D;IAC7D,SAAS,CAAC,EAAE,uBAAuB,CAAA;IACnC,gDAAgD;IAChD,YAAY,CAAC,EAAE,mBAAmB,CAAA;IAClC,8CAA8C;IAC9C,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,eAAe,CAAC,OAAO,cAAc,CAAC;IACxE,+DAA+D;IAC/D,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAA;IACjE,4DAA4D;IAC5D,KAAK,CACH,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAE,iBAAiB,GACrB,OAAO,CAAC,OAAO,CAAC,CAAA;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,UAAU,CAE/C,CAAA;AAED,oEAAoE;AACpE,MAAM,WAAW,qBAAqB;IACpC,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,wEAAwE;AACxE,MAAM,WAAW,qBAAqB;IACpC,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mBAAmB;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Interface id for {@link MediaStore}. @category Media */
|
|
2
|
+
export const MEDIA_STORE_ID = "@executioncontrolprotocol/MediaStore";
|
|
3
|
+
/** URI prefix for disk-backed artifacts (`ecp://file/<relative>`). @category Media */
|
|
4
|
+
export const FILE_ARTIFACT_URI_PREFIX = "ecp://file/";
|
|
5
|
+
/** Default URI path prefix when a write omits `prefix`. @category Media */
|
|
6
|
+
export const DEFAULT_MEDIA_PREFIX = "artifacts/media";
|
|
7
|
+
/** HTTP path for paired-host media upload and download. @category Media */
|
|
8
|
+
export const MEDIA_HTTP_PATH = "/v1/media";
|
|
9
|
+
/**
|
|
10
|
+
* Lookup token for {@link Environment.get} / {@link ServiceMap.get}.
|
|
11
|
+
* @category Media
|
|
12
|
+
*/
|
|
13
|
+
export const MediaStore = {
|
|
14
|
+
id: MEDIA_STORE_ID,
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=media-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-store.js","sourceRoot":"","sources":["../../src/services/media-store.ts"],"names":[],"mappings":"AAOA,2DAA2D;AAC3D,MAAM,CAAC,MAAM,cAAc,GAAG,sCAA+C,CAAA;AAE7E,sFAAsF;AACtF,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAA;AAErD,2EAA2E;AAC3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAA;AAErD,2EAA2E;AAC3E,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAA;AA6C1C;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAA6B;IAClD,EAAE,EAAE,cAAc;CACnB,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host services bound with {@link Environment.use}.
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
* @category Environment
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Every `.use()` provider. `service` is required and not assignable.
|
|
8
|
+
* @category Environment
|
|
9
|
+
*/
|
|
10
|
+
export interface ServiceProvider<Id extends string = string> {
|
|
11
|
+
/** Interface id this object implements (OSGi-style). */
|
|
12
|
+
readonly service: Id;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Lookup token for {@link Environment.get}. The phantom field selects `T`.
|
|
16
|
+
* @category Environment
|
|
17
|
+
*/
|
|
18
|
+
export interface ServiceToken<T extends ServiceProvider = ServiceProvider> {
|
|
19
|
+
/** Interface id, equal to {@link ServiceProvider.service}. */
|
|
20
|
+
readonly id: T["service"];
|
|
21
|
+
/** Phantom so {@link ServiceMap.get} returns `T`. */
|
|
22
|
+
readonly __service?: T;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Snapshot {@link ServiceProvider.service} as a map key.
|
|
26
|
+
* A later write on the concrete object does not retarget the registration.
|
|
27
|
+
* @category Environment
|
|
28
|
+
*/
|
|
29
|
+
export declare function snapshotServiceId(provider: ServiceProvider): string;
|
|
30
|
+
/**
|
|
31
|
+
* Narrow a provider to `T` when `provider.service` matches {@link ServiceToken.id}.
|
|
32
|
+
* @category Environment
|
|
33
|
+
*/
|
|
34
|
+
export declare function isService<T extends ServiceProvider>(provider: ServiceProvider, token: ServiceToken<T>): provider is T;
|
|
35
|
+
//# sourceMappingURL=provider.d.ts.map
|