@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 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/services/provider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM;IACzD,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAA;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe;IACvE,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAA;IACzB,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;CACvB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAMnE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,EACjD,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,GACrB,QAAQ,IAAI,CAAC,CAEf"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host services bound with {@link Environment.use}.
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
* @category Environment
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Snapshot {@link ServiceProvider.service} as a map key.
|
|
8
|
+
* A later write on the concrete object does not retarget the registration.
|
|
9
|
+
* @category Environment
|
|
10
|
+
*/
|
|
11
|
+
export function snapshotServiceId(provider) {
|
|
12
|
+
const id = provider.service;
|
|
13
|
+
if (typeof id !== "string" || id.length === 0) {
|
|
14
|
+
throw new Error("Service provider requires a non-empty service id");
|
|
15
|
+
}
|
|
16
|
+
return id;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Narrow a provider to `T` when `provider.service` matches {@link ServiceToken.id}.
|
|
20
|
+
* @category Environment
|
|
21
|
+
*/
|
|
22
|
+
export function isService(provider, token) {
|
|
23
|
+
return provider.service === token.id;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/services/provider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAsBH;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAyB;IACzD,MAAM,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAA;IAC3B,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;IACrE,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CACvB,QAAyB,EACzB,KAAsB;IAEtB,OAAO,QAAQ,CAAC,OAAO,KAAK,KAAK,CAAC,EAAE,CAAA;AACtC,CAAC"}
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Test-extension entry for in-process tests. Production CLI loads the same
|
|
3
|
+
* definition from `@executioncontrolprotocol/plugin-test` (not a Node default).
|
|
4
|
+
* Bind {@link testExtension} with `extension(testExtension)`.
|
|
3
5
|
* @category Testing
|
|
4
6
|
*/
|
|
5
|
-
import "./test-extension.js";
|
|
6
7
|
export { registerTestExtension, testExtension } from "./test-extension.js";
|
|
8
|
+
export { createMemoryMediaStore, type MemoryMediaStore, type MemoryMediaRecord, } from "./memory-media-store.js";
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,EACL,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,yBAAyB,CAAA"}
|
package/dist/testing/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Test-extension entry for in-process tests. Production CLI loads the same
|
|
3
|
+
* definition from `@executioncontrolprotocol/plugin-test` (not a Node default).
|
|
4
|
+
* Bind {@link testExtension} with `extension(testExtension)`.
|
|
3
5
|
* @category Testing
|
|
4
6
|
*/
|
|
5
|
-
import "./test-extension.js";
|
|
6
7
|
export { registerTestExtension, testExtension } from "./test-extension.js";
|
|
8
|
+
export { createMemoryMediaStore, } from "./memory-media-store.js";
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,EACL,sBAAsB,GAGvB,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type MediaStore } from "../services/media-store.js";
|
|
2
|
+
/** In-memory bytes keyed by path or artifact URI. @category Testing */
|
|
3
|
+
export interface MemoryMediaRecord {
|
|
4
|
+
/** Raw bytes. */
|
|
5
|
+
bytes: Uint8Array;
|
|
6
|
+
/** MIME type when known. */
|
|
7
|
+
mediaType?: string;
|
|
8
|
+
/** Optional display name. */
|
|
9
|
+
name?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Test {@link MediaStore} that keeps bytes in a map. Not a production host store.
|
|
13
|
+
* @category Testing
|
|
14
|
+
*/
|
|
15
|
+
export interface MemoryMediaStore extends MediaStore {
|
|
16
|
+
/** Bytes keyed by file path or artifact URI. */
|
|
17
|
+
readonly files: Map<string, MemoryMediaRecord>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create a fake {@link MediaStore} for unit tests (no disk I/O).
|
|
21
|
+
* @category Testing
|
|
22
|
+
*/
|
|
23
|
+
export declare function createMemoryMediaStore(): MemoryMediaStore;
|
|
24
|
+
//# sourceMappingURL=memory-media-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-media-store.d.ts","sourceRoot":"","sources":["../../src/testing/memory-media-store.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,UAAU,EAGhB,MAAM,4BAA4B,CAAA;AAKnC,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,iBAAiB;IACjB,KAAK,EAAE,UAAU,CAAA;IACjB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;CAC/C;AAeD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,CAuDzD"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { FILE_REF_KINDS } from "../types/index.js";
|
|
2
|
+
import { isBrowserFileLocator } from "../runtime/blobs.js";
|
|
3
|
+
import { DEFAULT_MEDIA_PREFIX, FILE_ARTIFACT_URI_PREFIX, MEDIA_STORE_ID, } from "../services/media-store.js";
|
|
4
|
+
import { readBrowserLocator } from "../media/browser-locator.js";
|
|
5
|
+
import { defaultArtifactFilename } from "../media/artifact-filename.js";
|
|
6
|
+
function recordToResolved(record, mediaType, name) {
|
|
7
|
+
return {
|
|
8
|
+
bytes: record.bytes,
|
|
9
|
+
mediaType: mediaType ?? record.mediaType,
|
|
10
|
+
sizeBytes: record.bytes.byteLength,
|
|
11
|
+
name: name ?? record.name,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create a fake {@link MediaStore} for unit tests (no disk I/O).
|
|
16
|
+
* @category Testing
|
|
17
|
+
*/
|
|
18
|
+
export function createMemoryMediaStore() {
|
|
19
|
+
const files = new Map();
|
|
20
|
+
const store = {
|
|
21
|
+
service: MEDIA_STORE_ID,
|
|
22
|
+
files,
|
|
23
|
+
async read(ref, ctx) {
|
|
24
|
+
if (ref.kind === FILE_REF_KINDS.FILE) {
|
|
25
|
+
if (isBrowserFileLocator(ref.path)) {
|
|
26
|
+
return readBrowserLocator(ref.path, ctx, ref.mediaType);
|
|
27
|
+
}
|
|
28
|
+
const fromFiles = files.get(ref.path);
|
|
29
|
+
if (fromFiles)
|
|
30
|
+
return recordToResolved(fromFiles, ref.mediaType);
|
|
31
|
+
throw new Error(`File not found: ${ref.path}`);
|
|
32
|
+
}
|
|
33
|
+
if (ref.kind === FILE_REF_KINDS.ARTIFACT) {
|
|
34
|
+
if (isBrowserFileLocator(ref.uri)) {
|
|
35
|
+
return readBrowserLocator(ref.uri, ctx, ref.mediaType);
|
|
36
|
+
}
|
|
37
|
+
const fromFiles = files.get(ref.uri);
|
|
38
|
+
if (fromFiles)
|
|
39
|
+
return recordToResolved(fromFiles, ref.mediaType, ref.name);
|
|
40
|
+
const fromCtx = ctx.artifacts?.get(ref.uri);
|
|
41
|
+
if (fromCtx) {
|
|
42
|
+
const bytes = fromCtx.bytes instanceof Uint8Array ? fromCtx.bytes : new Uint8Array(fromCtx.bytes);
|
|
43
|
+
return {
|
|
44
|
+
bytes,
|
|
45
|
+
mediaType: ref.mediaType ?? fromCtx.mediaType,
|
|
46
|
+
sizeBytes: fromCtx.size,
|
|
47
|
+
name: ref.name ?? fromCtx.name,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
throw new Error(`Artifact not found: ${ref.uri}`);
|
|
51
|
+
}
|
|
52
|
+
throw new Error(`Memory MediaStore cannot read kind ${String(ref.kind)}`);
|
|
53
|
+
},
|
|
54
|
+
async write(bytes, options, _ctx) {
|
|
55
|
+
const prefix = options.prefix ?? DEFAULT_MEDIA_PREFIX;
|
|
56
|
+
const name = options.name ?? defaultArtifactFilename(options.mediaType);
|
|
57
|
+
const uri = `${FILE_ARTIFACT_URI_PREFIX}${prefix}/${name}`;
|
|
58
|
+
const copy = bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes);
|
|
59
|
+
files.set(uri, { bytes: copy, mediaType: options.mediaType, name });
|
|
60
|
+
return {
|
|
61
|
+
kind: FILE_REF_KINDS.ARTIFACT,
|
|
62
|
+
uri,
|
|
63
|
+
mediaType: options.mediaType,
|
|
64
|
+
name,
|
|
65
|
+
sizeBytes: copy.byteLength,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
return store;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=memory-media-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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KAAiB,EACjB,OAA0B,EAC1B,IAAuB;YAEvB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,oBAAoB,CAAA;YACrD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,uBAAuB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;YACvE,MAAM,GAAG,GAAG,GAAG,wBAAwB,GAAG,MAAM,IAAI,IAAI,EAAE,CAAA;YAC1D,MAAM,IAAI,GAAG,KAAK,YAAY,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;YACxE,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;YACnE,OAAO;gBACL,IAAI,EAAE,cAAc,CAAC,QAAQ;gBAC7B,GAAG;gBACH,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,IAAI;gBACJ,SAAS,EAAE,IAAI,CAAC,UAAU;aAC3B,CAAA;QACH,CAAC;KACF,CAAA;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { Registry } from "../registry/registry.js";
|
|
2
|
+
/** HTTP error body returned by {@link testExtension} `fail`. @category Testing */
|
|
3
|
+
export declare const TEST_FAIL_BODY = "{\"error\":\"bad\"}";
|
|
4
|
+
/** Request URL on {@link testExtension} `fail`. @category Testing */
|
|
5
|
+
export declare const TEST_FAIL_URL = "https://example.test/v1/jobs";
|
|
6
|
+
/** Error message thrown by {@link testExtension} `fail`. @category Testing */
|
|
7
|
+
export declare const TEST_FAIL_MESSAGE = "HTTP 400 for https://example.test/v1/jobs";
|
|
8
|
+
/** Partial handler output attached to {@link testExtension} `fail`. @category Testing */
|
|
9
|
+
export declare const TEST_FAIL_OUTPUT: {
|
|
10
|
+
partial: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* In-repo stub extension for examples and tests.
|
|
14
|
+
* Production CLI loads the same definition from `@executioncontrolprotocol/plugin-test`;
|
|
15
|
+
* it is not a Node default.
|
|
16
|
+
* @category Testing
|
|
17
|
+
*/
|
|
18
|
+
export declare const testExtension: import("../index.js").ExtensionDefinition;
|
|
3
19
|
/** Register @executioncontrolprotocol/test capabilities for examples and tests. */
|
|
4
|
-
export declare function registerTestExtension(registry
|
|
20
|
+
export declare function registerTestExtension(registry: Registry): Promise<void>;
|
|
5
21
|
//# sourceMappingURL=test-extension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-extension.d.ts","sourceRoot":"","sources":["../../src/testing/test-extension.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-extension.d.ts","sourceRoot":"","sources":["../../src/testing/test-extension.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAUvD,kFAAkF;AAClF,eAAO,MAAM,cAAc,wBAAoB,CAAA;AAE/C,qEAAqE;AACrE,eAAO,MAAM,aAAa,iCAAiC,CAAA;AAE3D,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,8CAAkC,CAAA;AAEhE,yFAAyF;AACzF,eAAO,MAAM,gBAAgB;;CAAoB,CAAA;AAcjD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,2CAsIhB,CAAA;AAEV,mFAAmF;AACnF,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7E"}
|
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
import { defineExtension } from "../definitions/extension.js";
|
|
2
2
|
import { capabilityFor } from "../definitions/capability.js";
|
|
3
|
-
import { catalogExtension } from "../registry/extension-catalog.js";
|
|
4
|
-
import { globalRegistry } from "../registry/registry.js";
|
|
5
|
-
import { modelGenerateInputSchema, modelGenerateOutputSchema } from "@executioncontrolprotocol/types";
|
|
6
|
-
import { testModelGenerateHandler } from "./test-model-generate.js";
|
|
7
3
|
import { z } from "zod";
|
|
8
4
|
const TestStubInput = z.object({ payload: z.unknown().optional() });
|
|
9
5
|
const TestStubOutput = z.object({ ok: z.boolean(), result: z.unknown().optional() });
|
|
10
6
|
function testStubHandler(input) {
|
|
11
7
|
return { ok: true, result: input.payload ?? "test-stub" };
|
|
12
8
|
}
|
|
13
|
-
/**
|
|
9
|
+
/** HTTP error body returned by {@link testExtension} `fail`. @category Testing */
|
|
10
|
+
export const TEST_FAIL_BODY = '{"error":"bad"}';
|
|
11
|
+
/** Request URL on {@link testExtension} `fail`. @category Testing */
|
|
12
|
+
export const TEST_FAIL_URL = "https://example.test/v1/jobs";
|
|
13
|
+
/** Error message thrown by {@link testExtension} `fail`. @category Testing */
|
|
14
|
+
export const TEST_FAIL_MESSAGE = `HTTP 400 for ${TEST_FAIL_URL}`;
|
|
15
|
+
/** Partial handler output attached to {@link testExtension} `fail`. @category Testing */
|
|
16
|
+
export const TEST_FAIL_OUTPUT = { partial: true };
|
|
17
|
+
class TestHttpError extends Error {
|
|
18
|
+
status = 400;
|
|
19
|
+
bodyText = TEST_FAIL_BODY;
|
|
20
|
+
url = TEST_FAIL_URL;
|
|
21
|
+
output = TEST_FAIL_OUTPUT;
|
|
22
|
+
constructor() {
|
|
23
|
+
super(TEST_FAIL_MESSAGE);
|
|
24
|
+
this.name = "TestHttpError";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* In-repo stub extension for examples and tests.
|
|
29
|
+
* Production CLI loads the same definition from `@executioncontrolprotocol/plugin-test`;
|
|
30
|
+
* it is not a Node default.
|
|
31
|
+
* @category Testing
|
|
32
|
+
*/
|
|
14
33
|
export const testExtension = defineExtension("@executioncontrolprotocol", "test")
|
|
15
34
|
.withConfig({})
|
|
16
35
|
.withMetadata({
|
|
17
36
|
summary: "Stub capabilities for examples, CLI demos, and unit tests.",
|
|
18
|
-
description: "Provides deterministic echo
|
|
37
|
+
description: "Provides deterministic echo and placeholder step handlers used by first-party examples and conformance tests without external services."
|
|
19
38
|
})
|
|
20
39
|
.withCapabilities([
|
|
21
40
|
capabilityFor("@executioncontrolprotocol/test", "echo")
|
|
@@ -27,33 +46,18 @@ export const testExtension = defineExtension("@executioncontrolprotocol", "test"
|
|
|
27
46
|
description: "Echoes the supplied value or a default greeting. Used to verify wiring, refs, and step output propagation in minimal workflows.",
|
|
28
47
|
useCases: [
|
|
29
48
|
"01-echo example demonstrates a single-step workflow.",
|
|
30
|
-
"Integration test asserts invoke and run paths return payloads."
|
|
31
|
-
],
|
|
32
|
-
samplePrompts: [
|
|
33
|
-
"Echo back the value hello.",
|
|
34
|
-
"Run the test echo step with this payload.",
|
|
49
|
+
"Integration test asserts invoke and run paths return payloads."
|
|
35
50
|
],
|
|
51
|
+
projections: [
|
|
52
|
+
{
|
|
53
|
+
summary: "Use the echoed value",
|
|
54
|
+
description: "Take the echo field as the step output for refs and downstream wiring checks."
|
|
55
|
+
}
|
|
56
|
+
]
|
|
36
57
|
})
|
|
37
58
|
.withHandler(async (input) => ({
|
|
38
|
-
echo: input.value ?? "hi"
|
|
59
|
+
echo: input.value ?? "hi"
|
|
39
60
|
})),
|
|
40
|
-
capabilityFor("@executioncontrolprotocol/test", "generate")
|
|
41
|
-
.withInput(modelGenerateInputSchema)
|
|
42
|
-
.withOutput(modelGenerateOutputSchema)
|
|
43
|
-
.withExecution("local")
|
|
44
|
-
.withMetadata({
|
|
45
|
-
summary: "Deterministic stub text generation for tests.",
|
|
46
|
-
description: "Returns predictable text derived from the prompt without calling an external model. Use when examples need a generate-shaped step offline.",
|
|
47
|
-
useCases: [
|
|
48
|
-
"Harness unit test exercises generate input shaping.",
|
|
49
|
-
"Example workflow includes a model step without API keys.",
|
|
50
|
-
],
|
|
51
|
-
samplePrompts: [
|
|
52
|
-
"Generate a stub reply for this prompt.",
|
|
53
|
-
"Run test generate with system and user messages.",
|
|
54
|
-
],
|
|
55
|
-
})
|
|
56
|
-
.withHandler(async (input) => testModelGenerateHandler(input)),
|
|
57
61
|
capabilityFor("@executioncontrolprotocol/test", "summarize")
|
|
58
62
|
.withInput(TestStubInput)
|
|
59
63
|
.withOutput(TestStubOutput)
|
|
@@ -63,12 +67,14 @@ export const testExtension = defineExtension("@executioncontrolprotocol", "test"
|
|
|
63
67
|
description: "Returns a fixed ok stub. Useful in sample workflows that list several capability kinds without real summarization logic.",
|
|
64
68
|
useCases: [
|
|
65
69
|
"Demo manifest shows a summarize step beside echo and translate.",
|
|
66
|
-
"Test verifies multiple capabilities register on one extension."
|
|
67
|
-
],
|
|
68
|
-
samplePrompts: [
|
|
69
|
-
"Invoke the test summarize capability.",
|
|
70
|
-
"Run summarize with a sample payload.",
|
|
70
|
+
"Test verifies multiple capabilities register on one extension."
|
|
71
71
|
],
|
|
72
|
+
projections: [
|
|
73
|
+
{
|
|
74
|
+
summary: "Use the stub result",
|
|
75
|
+
description: "Take ok and result when present as placeholder output for multi-capability demos."
|
|
76
|
+
}
|
|
77
|
+
]
|
|
72
78
|
})
|
|
73
79
|
.withHandler(async (input) => testStubHandler(input)),
|
|
74
80
|
capabilityFor("@executioncontrolprotocol/test", "translate")
|
|
@@ -80,12 +86,14 @@ export const testExtension = defineExtension("@executioncontrolprotocol", "test"
|
|
|
80
86
|
description: "Returns a fixed ok stub. Represents a translate-shaped step in examples without calling a real translation service.",
|
|
81
87
|
useCases: [
|
|
82
88
|
"Sample workflow chains translate after summarize.",
|
|
83
|
-
"Registry test lists distinct capability names on test extension."
|
|
84
|
-
],
|
|
85
|
-
samplePrompts: [
|
|
86
|
-
"Invoke the test translate capability.",
|
|
87
|
-
"Run translate with a sample payload.",
|
|
89
|
+
"Registry test lists distinct capability names on test extension."
|
|
88
90
|
],
|
|
91
|
+
projections: [
|
|
92
|
+
{
|
|
93
|
+
summary: "Use the stub result",
|
|
94
|
+
description: "Take ok and result when present as placeholder output for multi-capability demos."
|
|
95
|
+
}
|
|
96
|
+
]
|
|
89
97
|
})
|
|
90
98
|
.withHandler(async (input) => testStubHandler(input)),
|
|
91
99
|
capabilityFor("@executioncontrolprotocol/test", "notify")
|
|
@@ -97,12 +105,14 @@ export const testExtension = defineExtension("@executioncontrolprotocol", "test"
|
|
|
97
105
|
description: "Returns a fixed ok stub. Stands in for notification side effects in tutorials and tests.",
|
|
98
106
|
useCases: [
|
|
99
107
|
"Example workflow ends with a notify step after processing.",
|
|
100
|
-
"Unit test covers invoke on a non-echo capability id."
|
|
101
|
-
],
|
|
102
|
-
samplePrompts: [
|
|
103
|
-
"Invoke the test notify capability.",
|
|
104
|
-
"Fire the notify stub with this payload.",
|
|
108
|
+
"Unit test covers invoke on a non-echo capability id."
|
|
105
109
|
],
|
|
110
|
+
projections: [
|
|
111
|
+
{
|
|
112
|
+
summary: "Use the stub result",
|
|
113
|
+
description: "Take ok and result when present as placeholder output for multi-capability demos."
|
|
114
|
+
}
|
|
115
|
+
]
|
|
106
116
|
})
|
|
107
117
|
.withHandler(async (input) => testStubHandler(input)),
|
|
108
118
|
capabilityFor("@executioncontrolprotocol/test", "validate")
|
|
@@ -114,19 +124,41 @@ export const testExtension = defineExtension("@executioncontrolprotocol", "test"
|
|
|
114
124
|
description: "Returns a fixed ok stub. Represents a validation-shaped step in sample graphs without running real validators.",
|
|
115
125
|
useCases: [
|
|
116
126
|
"Tutorial workflow includes validate before notify.",
|
|
117
|
-
"Conformance test enumerates all test extension capability ids."
|
|
118
|
-
],
|
|
119
|
-
samplePrompts: [
|
|
120
|
-
"Invoke the test validate capability.",
|
|
121
|
-
"Run validate with a sample payload.",
|
|
127
|
+
"Conformance test enumerates all test extension capability ids."
|
|
122
128
|
],
|
|
129
|
+
projections: [
|
|
130
|
+
{
|
|
131
|
+
summary: "Use the stub result",
|
|
132
|
+
description: "Take ok and result when present as placeholder output for multi-capability demos."
|
|
133
|
+
}
|
|
134
|
+
]
|
|
123
135
|
})
|
|
124
136
|
.withHandler(async (input) => testStubHandler(input)),
|
|
137
|
+
capabilityFor("@executioncontrolprotocol/test", "fail")
|
|
138
|
+
.withInput(z.object({}))
|
|
139
|
+
.withOutput(z.object({ partial: z.boolean() }))
|
|
140
|
+
.withExecution("local")
|
|
141
|
+
.withMetadata({
|
|
142
|
+
summary: "Always fail with an HTTP-shaped error for CLI and journal tests.",
|
|
143
|
+
description: "Throws a deterministic error that carries status, bodyText, url, and a partial output object. Used to assert failure records, not as a product capability.",
|
|
144
|
+
useCases: [
|
|
145
|
+
"CLI spawn asserts failed run and invoke print Error Code and details.",
|
|
146
|
+
"Journal test asserts diagnostics.details and redacted output.",
|
|
147
|
+
],
|
|
148
|
+
projections: [
|
|
149
|
+
{
|
|
150
|
+
summary: "Expect a step failure",
|
|
151
|
+
description: "This capability always throws; read diagnostics.details and the attached partial output.",
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
})
|
|
155
|
+
.withHandler(async () => {
|
|
156
|
+
throw new TestHttpError();
|
|
157
|
+
}),
|
|
125
158
|
])
|
|
126
159
|
.build();
|
|
127
|
-
catalogExtension(testExtension);
|
|
128
160
|
/** Register @executioncontrolprotocol/test capabilities for examples and tests. */
|
|
129
|
-
export async function registerTestExtension(registry
|
|
161
|
+
export async function registerTestExtension(registry) {
|
|
130
162
|
if (!registry.getExtension("@executioncontrolprotocol/test")) {
|
|
131
163
|
await registry.registerExtension(testExtension);
|
|
132
164
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-extension.js","sourceRoot":"","sources":["../../src/testing/test-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"test-extension.js","sourceRoot":"","sources":["../../src/testing/test-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B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AAE,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAA8B,CAAC,CAAC;IAChF,aAAa,CAAC,gCAAgC,EAAE,MAAM,CAAC;SACpD,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;SACvB,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;SAC9C,aAAa,CAAC,OAAO,CAAC;SACtB,YAAY,CAAC;QACZ,OAAO,EAAE,kEAAkE;QAC3E,WAAW,EACT,4JAA4J;QAC9J,QAAQ,EAAE;YACR,uEAAuE;YACvE,+DAA+D;SAChE;QACD,WAAW,EAAE;YACX;gBACE,OAAO,EAAE,uBAAuB;gBAChC,WAAW,EACT,0FAA0F;aAC7F;SACF;KACF,CAAC;SACD,WAAW,CAAC,KAAK,IAAI,EAAE;QACtB,MAAM,IAAI,aAAa,EAAE,CAAA;IAC3B,CAAC,CAAC;CACL,CAAC;KACD,KAAK,EAAE,CAAA;AAEV,mFAAmF;AACnF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,QAAkB;IAC5D,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,gCAAgC,CAAC,EAAE,CAAC;QAC7D,MAAM,QAAQ,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAA;IACjD,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { LifecycleEvent, ValidationIssue } from "
|
|
1
|
+
import type { LifecycleEvent, ValidationIssue } from "../types/index.js";
|
|
2
|
+
import type { Registry } from "../registry/registry.js";
|
|
2
3
|
/** Recorded extension lifecycle hook events (reset via `resetLifecycleSpy()`). */
|
|
3
4
|
export declare const lifecycleSpyEvents: LifecycleEvent[];
|
|
4
5
|
/** Diagnostics from the most recent `step:failed` hook invocation. */
|
|
@@ -8,7 +9,7 @@ export declare let capabilityInvokeCount: number;
|
|
|
8
9
|
/** Reset spy state between tests. */
|
|
9
10
|
export declare function resetLifecycleSpy(): void;
|
|
10
11
|
/** Lifecycle spy extension for conformance tests. @category Testing */
|
|
11
|
-
export declare const lifecycleSpyExtension: import("../
|
|
12
|
-
/** Register lifecycle spy extension on
|
|
13
|
-
export declare function registerLifecycleSpyExtension(): Promise<void>;
|
|
12
|
+
export declare const lifecycleSpyExtension: import("../index.js").ExtensionDefinition;
|
|
13
|
+
/** Register lifecycle spy extension on a registry. */
|
|
14
|
+
export declare function registerLifecycleSpyExtension(registry: Registry): Promise<void>;
|
|
14
15
|
//# sourceMappingURL=test-lifecycle-extension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-lifecycle-extension.d.ts","sourceRoot":"","sources":["../../src/testing/test-lifecycle-extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"test-lifecycle-extension.d.ts","sourceRoot":"","sources":["../../src/testing/test-lifecycle-extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAIxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAGvD,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAAO,CAAA;AAEtD,sEAAsE;AACtE,eAAO,IAAI,qCAAqC,EAAE,eAAe,EAAE,GAAG,SAAS,CAAA;AAE/E,wDAAwD;AACxD,eAAO,IAAI,qBAAqB,QAAI,CAAA;AAEpC,qCAAqC;AACrC,wBAAgB,iBAAiB,IAAI,IAAI,CAIxC;AAWD,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,2CAsFxB,CAAA;AAEV,sDAAsD;AACtD,wBAAsB,6BAA6B,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAIrF"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { defineExtension } from "../definitions/extension.js";
|
|
2
2
|
import { capabilityFor } from "../definitions/capability.js";
|
|
3
3
|
import { hook } from "../definitions/hook.js";
|
|
4
|
-
import { catalogExtension } from "../registry/extension-catalog.js";
|
|
5
|
-
import { globalRegistry } from "../registry/registry.js";
|
|
6
4
|
import { z } from "zod";
|
|
7
5
|
/** Recorded extension lifecycle hook events (reset via `resetLifecycleSpy()`). */
|
|
8
6
|
export const lifecycleSpyEvents = [];
|
|
@@ -29,7 +27,7 @@ export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol"
|
|
|
29
27
|
.withConfig({})
|
|
30
28
|
.withMetadata({
|
|
31
29
|
summary: "Lifecycle hook spy and fault-injection capabilities.",
|
|
32
|
-
description: "Records lifecycle events and exposes echo, throw, and merge-state capabilities for engine conformance and store tests."
|
|
30
|
+
description: "Records lifecycle events and exposes echo, throw, and merge-state capabilities for engine conformance and store tests."
|
|
33
31
|
})
|
|
34
32
|
.withCapabilities([
|
|
35
33
|
capabilityFor("@executioncontrolprotocol/lifecycle-spy", "echo")
|
|
@@ -40,12 +38,14 @@ export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol"
|
|
|
40
38
|
description: "Mirrors test.echo but increments capabilityInvokeCount so tests can assert step invocation order alongside hook events.",
|
|
41
39
|
useCases: [
|
|
42
40
|
"Lifecycle test verifies step:started fires before handler runs.",
|
|
43
|
-
"Conformance suite counts capability invocations per run."
|
|
44
|
-
],
|
|
45
|
-
samplePrompts: [
|
|
46
|
-
"Run lifecycle-spy echo with value probe.",
|
|
47
|
-
"Invoke spy echo to trigger step hooks.",
|
|
41
|
+
"Conformance suite counts capability invocations per run."
|
|
48
42
|
],
|
|
43
|
+
projections: [
|
|
44
|
+
{
|
|
45
|
+
summary: "Use the echoed value",
|
|
46
|
+
description: "Take the echo field as the step output while tests assert hook ordering."
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
49
|
})
|
|
50
50
|
.withHandler(async (input) => {
|
|
51
51
|
capabilityInvokeCount++;
|
|
@@ -59,12 +59,14 @@ export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol"
|
|
|
59
59
|
description: "Throws a fixed error on every invoke. Used to assert failure diagnostics and finally hooks without external dependencies.",
|
|
60
60
|
useCases: [
|
|
61
61
|
"Test asserts step:failed captures handler errors.",
|
|
62
|
-
"Run cancellation path after a forced step failure."
|
|
63
|
-
],
|
|
64
|
-
samplePrompts: [
|
|
65
|
-
"Run the lifecycle-spy throw step.",
|
|
66
|
-
"Trigger a failing capability for hook tests.",
|
|
62
|
+
"Run cancellation path after a forced step failure."
|
|
67
63
|
],
|
|
64
|
+
projections: [
|
|
65
|
+
{
|
|
66
|
+
summary: "Expect a step failure",
|
|
67
|
+
description: "This capability always throws; invoke only when tests need step:failed, not a success payload."
|
|
68
|
+
}
|
|
69
|
+
]
|
|
68
70
|
})
|
|
69
71
|
.withHandler(async () => {
|
|
70
72
|
capabilityInvokeCount++;
|
|
@@ -78,12 +80,14 @@ export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol"
|
|
|
78
80
|
description: "Calls ctx.store.merge on a supplied state handle. Verifies store wiring from capability handlers during integration tests.",
|
|
79
81
|
useCases: [
|
|
80
82
|
"Store test confirms merge from a step handler.",
|
|
81
|
-
"Multi-step run accumulates shared state through spy merge."
|
|
82
|
-
],
|
|
83
|
-
samplePrompts: [
|
|
84
|
-
"Merge { merged: true } into the run state handle.",
|
|
85
|
-
"Invoke lifecycle-spy merge-state on the shared target.",
|
|
83
|
+
"Multi-step run accumulates shared state through spy merge."
|
|
86
84
|
],
|
|
85
|
+
projections: [
|
|
86
|
+
{
|
|
87
|
+
summary: "Confirm store merge",
|
|
88
|
+
description: "When ok is true, the target state handle received the merged test fields."
|
|
89
|
+
}
|
|
90
|
+
]
|
|
87
91
|
})
|
|
88
92
|
.withHandler(async (input, ctx) => {
|
|
89
93
|
capabilityInvokeCount++;
|
|
@@ -91,21 +95,20 @@ export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol"
|
|
|
91
95
|
.target;
|
|
92
96
|
await ctx.store.merge(handle, { merged: true });
|
|
93
97
|
return { ok: true };
|
|
94
|
-
})
|
|
98
|
+
})
|
|
95
99
|
])
|
|
96
100
|
.withHooks([
|
|
97
101
|
spyHook("step:before"),
|
|
98
102
|
spyHook("step:started"),
|
|
99
103
|
spyHook("step:completed"),
|
|
100
104
|
spyHook("step:failed"),
|
|
101
|
-
spyHook("step:finally")
|
|
105
|
+
spyHook("step:finally")
|
|
102
106
|
])
|
|
103
107
|
.build();
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
await globalRegistry.registerExtension(lifecycleSpyExtension);
|
|
108
|
+
/** Register lifecycle spy extension on a registry. */
|
|
109
|
+
export async function registerLifecycleSpyExtension(registry) {
|
|
110
|
+
if (!registry.getExtension("@executioncontrolprotocol/lifecycle-spy")) {
|
|
111
|
+
await registry.registerExtension(lifecycleSpyExtension);
|
|
109
112
|
}
|
|
110
113
|
}
|
|
111
114
|
//# sourceMappingURL=test-lifecycle-extension.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-lifecycle-extension.js","sourceRoot":"","sources":["../../src/testing/test-lifecycle-extension.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"test-lifecycle-extension.js","sourceRoot":"","sources":["../../src/testing/test-lifecycle-extension.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK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YACX;gBACE,OAAO,EAAE,qBAAqB;gBAC9B,WAAW,EAAE,2EAA2E;aACzF;SACF;KACF,CAAC;SACD,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QAChC,qBAAqB,EAAE,CAAA;QACvB,MAAM,MAAM,GAAI,KAA2F;aACxG,MAAM,CAAA;QACT,MAAM,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;QAC/C,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAA;IACrB,CAAC,CAAC;CACL,CAAC;KACD,SAAS,CAAC;IACT,OAAO,CAAC,aAAa,CAAC;IACtB,OAAO,CAAC,cAAc,CAAC;IACvB,OAAO,CAAC,gBAAgB,CAAC;IACzB,OAAO,CAAC,aAAa,CAAC;IACtB,OAAO,CAAC,cAAc,CAAC;CACxB,CAAC;KACD,KAAK,EAAE,CAAA;AAEV,sDAAsD;AACtD,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAAC,QAAkB;IACpE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,yCAAyC,CAAC,EAAE,CAAC;QACtE,MAAM,QAAQ,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,CAAA;IACzD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ValidationIssue } from "./validation.js";
|
|
2
|
+
/** Minimum model generate capability input. @category Capabilities */
|
|
3
|
+
export interface GenerateCapabilityInput {
|
|
4
|
+
prompt: string;
|
|
5
|
+
system?: string;
|
|
6
|
+
context?: unknown;
|
|
7
|
+
options?: Record<string, unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* Prior conversation turns (user/assistant only). The current user turn is always {@link GenerateCapabilityInput.prompt}.
|
|
10
|
+
* System instructions stay in {@link GenerateCapabilityInput.system}.
|
|
11
|
+
*/
|
|
12
|
+
messages?: Array<{
|
|
13
|
+
role: "user" | "assistant";
|
|
14
|
+
content: string;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
/** Minimum model generate capability output. @category Capabilities */
|
|
18
|
+
export interface GenerateCapabilityOutput {
|
|
19
|
+
text: string;
|
|
20
|
+
raw?: unknown;
|
|
21
|
+
usage?: unknown;
|
|
22
|
+
diagnostics?: ValidationIssue[];
|
|
23
|
+
}
|
|
24
|
+
/** Minimum evaluate capability input. @category Capabilities */
|
|
25
|
+
export interface EvaluateCapabilityInput {
|
|
26
|
+
subject: unknown;
|
|
27
|
+
criteria?: unknown;
|
|
28
|
+
rubric?: unknown;
|
|
29
|
+
options?: Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
/** Minimum evaluate capability output. @category Capabilities */
|
|
32
|
+
export interface EvaluateCapabilityOutput {
|
|
33
|
+
passed?: boolean;
|
|
34
|
+
score?: number;
|
|
35
|
+
result?: unknown;
|
|
36
|
+
rationale?: string;
|
|
37
|
+
diagnostics?: ValidationIssue[];
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/types/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,sEAAsE;AACtE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAClE;AAED,uEAAuE;AACvE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,eAAe,EAAE,CAAA;CAChC;AAED,gEAAgE;AAChE,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,iEAAiE;AACjE,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAA;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/types/capabilities.ts"],"names":[],"mappings":""}
|