@executioncontrolprotocol/core 0.10.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 +42 -0
- package/dist/bindings/extension.d.ts +19 -0
- package/dist/bindings/extension.d.ts.map +1 -0
- package/dist/bindings/extension.js +32 -0
- package/dist/bindings/extension.js.map +1 -0
- package/dist/bindings/harness.d.ts +24 -0
- package/dist/bindings/harness.d.ts.map +1 -0
- package/dist/bindings/harness.js +44 -0
- package/dist/bindings/harness.js.map +1 -0
- package/dist/bindings/policy.d.ts +19 -0
- package/dist/bindings/policy.d.ts.map +1 -0
- package/dist/bindings/policy.js +32 -0
- package/dist/bindings/policy.js.map +1 -0
- package/dist/bindings/runtime.d.ts +19 -0
- package/dist/bindings/runtime.d.ts.map +1 -0
- package/dist/bindings/runtime.js +32 -0
- package/dist/bindings/runtime.js.map +1 -0
- package/dist/bindings/step.d.ts +34 -0
- package/dist/bindings/step.d.ts.map +1 -0
- package/dist/bindings/step.js +59 -0
- package/dist/bindings/step.js.map +1 -0
- package/dist/browser-runtime-entry.d.ts +52 -0
- package/dist/browser-runtime-entry.d.ts.map +1 -0
- package/dist/browser-runtime-entry.js +45 -0
- package/dist/browser-runtime-entry.js.map +1 -0
- package/dist/browser.d.ts +20 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +20 -0
- package/dist/browser.js.map +1 -0
- package/dist/compile/compile-harness-artifact.d.ts +30 -0
- package/dist/compile/compile-harness-artifact.d.ts.map +1 -0
- package/dist/compile/compile-harness-artifact.js +43 -0
- package/dist/compile/compile-harness-artifact.js.map +1 -0
- package/dist/compile/entry.d.ts +3 -0
- package/dist/compile/entry.d.ts.map +1 -0
- package/dist/compile/entry.js +3 -0
- package/dist/compile/entry.js.map +1 -0
- package/dist/compile/evaluate-browser.d.ts +5 -0
- package/dist/compile/evaluate-browser.d.ts.map +1 -0
- package/dist/compile/evaluate-browser.js +15 -0
- package/dist/compile/evaluate-browser.js.map +1 -0
- package/dist/compile/evaluate-harness-artifact.d.ts +3 -0
- package/dist/compile/evaluate-harness-artifact.d.ts.map +1 -0
- package/dist/compile/evaluate-harness-artifact.js +17 -0
- package/dist/compile/evaluate-harness-artifact.js.map +1 -0
- package/dist/compile/evaluate.d.ts +5 -0
- package/dist/compile/evaluate.d.ts.map +1 -0
- package/dist/compile/evaluate.js +20 -0
- package/dist/compile/evaluate.js.map +1 -0
- package/dist/compile/extract-harness-artifact.d.ts +9 -0
- package/dist/compile/extract-harness-artifact.d.ts.map +1 -0
- package/dist/compile/extract-harness-artifact.js +33 -0
- package/dist/compile/extract-harness-artifact.js.map +1 -0
- package/dist/compile/extract-workflow-module.d.ts +4 -0
- package/dist/compile/extract-workflow-module.d.ts.map +1 -0
- package/dist/compile/extract-workflow-module.js +20 -0
- package/dist/compile/extract-workflow-module.js.map +1 -0
- package/dist/compile/index.browser.d.ts +18 -0
- package/dist/compile/index.browser.d.ts.map +1 -0
- package/dist/compile/index.browser.js +50 -0
- package/dist/compile/index.browser.js.map +1 -0
- package/dist/compile/index.d.ts +17 -0
- package/dist/compile/index.d.ts.map +1 -0
- package/dist/compile/index.js +49 -0
- package/dist/compile/index.js.map +1 -0
- package/dist/compile/prepare-browser-source.d.ts +3 -0
- package/dist/compile/prepare-browser-source.d.ts.map +1 -0
- package/dist/compile/prepare-browser-source.js +21 -0
- package/dist/compile/prepare-browser-source.js.map +1 -0
- package/dist/compile/transpile-browser.d.ts +21 -0
- package/dist/compile/transpile-browser.d.ts.map +1 -0
- package/dist/compile/transpile-browser.js +93 -0
- package/dist/compile/transpile-browser.js.map +1 -0
- package/dist/compile/transpile.d.ts +10 -0
- package/dist/compile/transpile.d.ts.map +1 -0
- package/dist/compile/transpile.js +85 -0
- package/dist/compile/transpile.js.map +1 -0
- package/dist/compile/types.d.ts +24 -0
- package/dist/compile/types.d.ts.map +1 -0
- package/dist/compile/types.js +2 -0
- package/dist/compile/types.js.map +1 -0
- package/dist/config-schema/index.d.ts +4 -0
- package/dist/config-schema/index.d.ts.map +1 -0
- package/dist/config-schema/index.js +2 -0
- package/dist/config-schema/index.js.map +1 -0
- package/dist/definitions/capability.d.ts +26 -0
- package/dist/definitions/capability.d.ts.map +1 -0
- package/dist/definitions/capability.js +49 -0
- package/dist/definitions/capability.js.map +1 -0
- package/dist/definitions/extension.d.ts +30 -0
- package/dist/definitions/extension.d.ts.map +1 -0
- package/dist/definitions/extension.js +64 -0
- package/dist/definitions/extension.js.map +1 -0
- package/dist/definitions/hook.d.ts +11 -0
- package/dist/definitions/hook.d.ts.map +1 -0
- package/dist/definitions/hook.js +13 -0
- package/dist/definitions/hook.js.map +1 -0
- package/dist/definitions/index.d.ts +7 -0
- package/dist/definitions/index.d.ts.map +1 -0
- package/dist/definitions/index.js +6 -0
- package/dist/definitions/index.js.map +1 -0
- package/dist/definitions/policy.d.ts +23 -0
- package/dist/definitions/policy.d.ts.map +1 -0
- package/dist/definitions/policy.js +50 -0
- package/dist/definitions/policy.js.map +1 -0
- package/dist/definitions/runtime.d.ts +22 -0
- package/dist/definitions/runtime.d.ts.map +1 -0
- package/dist/definitions/runtime.js +48 -0
- package/dist/definitions/runtime.js.map +1 -0
- package/dist/definitions/types.d.ts +50 -0
- package/dist/definitions/types.d.ts.map +1 -0
- package/dist/definitions/types.js +2 -0
- package/dist/definitions/types.js.map +1 -0
- package/dist/encoding/contracts.d.ts +17 -0
- package/dist/encoding/contracts.d.ts.map +1 -0
- package/dist/encoding/contracts.js +41 -0
- package/dist/encoding/contracts.js.map +1 -0
- package/dist/encoding/decode-builder.d.ts +17 -0
- package/dist/encoding/decode-builder.d.ts.map +1 -0
- package/dist/encoding/decode-builder.js +98 -0
- package/dist/encoding/decode-builder.js.map +1 -0
- package/dist/encoding/encode-builder.d.ts +19 -0
- package/dist/encoding/encode-builder.d.ts.map +1 -0
- package/dist/encoding/encode-builder.js +76 -0
- package/dist/encoding/encode-builder.js.map +1 -0
- package/dist/encoding/errors.d.ts +25 -0
- package/dist/encoding/errors.d.ts.map +1 -0
- package/dist/encoding/errors.js +20 -0
- package/dist/encoding/errors.js.map +1 -0
- package/dist/encoding/index.d.ts +10 -0
- package/dist/encoding/index.d.ts.map +1 -0
- package/dist/encoding/index.js +10 -0
- package/dist/encoding/index.js.map +1 -0
- package/dist/encoding/invoke-utility.d.ts +14 -0
- package/dist/encoding/invoke-utility.d.ts.map +1 -0
- package/dist/encoding/invoke-utility.js +50 -0
- package/dist/encoding/invoke-utility.js.map +1 -0
- package/dist/encoding/json-codec.d.ts +38 -0
- package/dist/encoding/json-codec.d.ts.map +1 -0
- package/dist/encoding/json-codec.js +108 -0
- package/dist/encoding/json-codec.js.map +1 -0
- package/dist/encoding/normalize-workflow.d.ts +7 -0
- package/dist/encoding/normalize-workflow.d.ts.map +1 -0
- package/dist/encoding/normalize-workflow.js +109 -0
- package/dist/encoding/normalize-workflow.js.map +1 -0
- package/dist/encoding/resolve.d.ts +13 -0
- package/dist/encoding/resolve.d.ts.map +1 -0
- package/dist/encoding/resolve.js +48 -0
- package/dist/encoding/resolve.js.map +1 -0
- package/dist/encoding/schemas.d.ts +398 -0
- package/dist/encoding/schemas.d.ts.map +1 -0
- package/dist/encoding/schemas.js +74 -0
- package/dist/encoding/schemas.js.map +1 -0
- package/dist/encoding/strip-harness-typescript-output.d.ts +7 -0
- package/dist/encoding/strip-harness-typescript-output.d.ts.map +1 -0
- package/dist/encoding/strip-harness-typescript-output.js +40 -0
- package/dist/encoding/strip-harness-typescript-output.js.map +1 -0
- package/dist/encoding/strip-markdown-fences.d.ts +6 -0
- package/dist/encoding/strip-markdown-fences.d.ts.map +1 -0
- package/dist/encoding/strip-markdown-fences.js +23 -0
- package/dist/encoding/strip-markdown-fences.js.map +1 -0
- package/dist/encoding/utility-context.d.ts +29 -0
- package/dist/encoding/utility-context.d.ts.map +1 -0
- package/dist/encoding/utility-context.js +33 -0
- package/dist/encoding/utility-context.js.map +1 -0
- package/dist/environment/bindings.d.ts +69 -0
- package/dist/environment/bindings.d.ts.map +1 -0
- package/dist/environment/bindings.js +39 -0
- package/dist/environment/bindings.js.map +1 -0
- package/dist/environment/config-resolver.d.ts +33 -0
- package/dist/environment/config-resolver.d.ts.map +1 -0
- package/dist/environment/config-resolver.js +100 -0
- package/dist/environment/config-resolver.js.map +1 -0
- package/dist/environment/describe.d.ts +6 -0
- package/dist/environment/describe.d.ts.map +1 -0
- package/dist/environment/describe.js +132 -0
- package/dist/environment/describe.js.map +1 -0
- package/dist/environment/ecp.d.ts +58 -0
- package/dist/environment/ecp.d.ts.map +1 -0
- package/dist/environment/ecp.js +49 -0
- package/dist/environment/ecp.js.map +1 -0
- package/dist/environment/encoding-host.d.ts +17 -0
- package/dist/environment/encoding-host.d.ts.map +1 -0
- package/dist/environment/encoding-host.js +2 -0
- package/dist/environment/encoding-host.js.map +1 -0
- package/dist/environment/environment.d.ts +94 -0
- package/dist/environment/environment.d.ts.map +1 -0
- package/dist/environment/environment.js +370 -0
- package/dist/environment/environment.js.map +1 -0
- package/dist/environment/search.d.ts +4 -0
- package/dist/environment/search.d.ts.map +1 -0
- package/dist/environment/search.js +80 -0
- package/dist/environment/search.js.map +1 -0
- package/dist/feedback/collect.d.ts +32 -0
- package/dist/feedback/collect.d.ts.map +1 -0
- package/dist/feedback/collect.js +97 -0
- package/dist/feedback/collect.js.map +1 -0
- package/dist/feedback/index.d.ts +2 -0
- package/dist/feedback/index.d.ts.map +1 -0
- package/dist/feedback/index.js +2 -0
- package/dist/feedback/index.js.map +1 -0
- package/dist/fluent/encode-fluent.d.ts +10 -0
- package/dist/fluent/encode-fluent.d.ts.map +1 -0
- package/dist/fluent/encode-fluent.js +58 -0
- package/dist/fluent/encode-fluent.js.map +1 -0
- package/dist/fluent/index.d.ts +3 -0
- package/dist/fluent/index.d.ts.map +1 -0
- package/dist/fluent/index.js +3 -0
- package/dist/fluent/index.js.map +1 -0
- package/dist/fluent/render-expr.d.ts +7 -0
- package/dist/fluent/render-expr.d.ts.map +1 -0
- package/dist/fluent/render-expr.js +14 -0
- package/dist/fluent/render-expr.js.map +1 -0
- package/dist/fluent/render-node.d.ts +6 -0
- package/dist/fluent/render-node.d.ts.map +1 -0
- package/dist/fluent/render-node.js +92 -0
- package/dist/fluent/render-node.js.map +1 -0
- package/dist/fluent/render-value.d.ts +22 -0
- package/dist/fluent/render-value.d.ts.map +1 -0
- package/dist/fluent/render-value.js +47 -0
- package/dist/fluent/render-value.js.map +1 -0
- package/dist/fluent/render-workflow.d.ts +16 -0
- package/dist/fluent/render-workflow.d.ts.map +1 -0
- package/dist/fluent/render-workflow.js +41 -0
- package/dist/fluent/render-workflow.js.map +1 -0
- package/dist/formats/format-fluent.d.ts +3 -0
- package/dist/formats/format-fluent.d.ts.map +1 -0
- package/dist/formats/format-fluent.js +17 -0
- package/dist/formats/format-fluent.js.map +1 -0
- package/dist/formats/format-json.d.ts +3 -0
- package/dist/formats/format-json.d.ts.map +1 -0
- package/dist/formats/format-json.js +73 -0
- package/dist/formats/format-json.js.map +1 -0
- package/dist/formats/register-core-formats.d.ts +7 -0
- package/dist/formats/register-core-formats.d.ts.map +1 -0
- package/dist/formats/register-core-formats.js +20 -0
- package/dist/formats/register-core-formats.js.map +1 -0
- package/dist/harness/authoring/classified-intent.d.ts +46 -0
- package/dist/harness/authoring/classified-intent.d.ts.map +1 -0
- package/dist/harness/authoring/classified-intent.js +229 -0
- package/dist/harness/authoring/classified-intent.js.map +1 -0
- package/dist/harness/authoring/context-policy.d.ts +45 -0
- package/dist/harness/authoring/context-policy.d.ts.map +1 -0
- package/dist/harness/authoring/context-policy.js +132 -0
- package/dist/harness/authoring/context-policy.js.map +1 -0
- package/dist/harness/authoring/encode-prompt-text.d.ts +7 -0
- package/dist/harness/authoring/encode-prompt-text.d.ts.map +1 -0
- package/dist/harness/authoring/encode-prompt-text.js +13 -0
- package/dist/harness/authoring/encode-prompt-text.js.map +1 -0
- package/dist/harness/authoring/environment-question.d.ts +6 -0
- package/dist/harness/authoring/environment-question.d.ts.map +1 -0
- package/dist/harness/authoring/environment-question.js +11 -0
- package/dist/harness/authoring/environment-question.js.map +1 -0
- package/dist/harness/authoring/index.d.ts +18 -0
- package/dist/harness/authoring/index.d.ts.map +1 -0
- package/dist/harness/authoring/index.js +17 -0
- package/dist/harness/authoring/index.js.map +1 -0
- package/dist/harness/authoring/normalize-create-eql-output.d.ts +27 -0
- package/dist/harness/authoring/normalize-create-eql-output.d.ts.map +1 -0
- package/dist/harness/authoring/normalize-create-eql-output.js +284 -0
- package/dist/harness/authoring/normalize-create-eql-output.js.map +1 -0
- package/dist/harness/authoring/normalize-intent-eql-output.d.ts +7 -0
- package/dist/harness/authoring/normalize-intent-eql-output.d.ts.map +1 -0
- package/dist/harness/authoring/normalize-intent-eql-output.js +59 -0
- package/dist/harness/authoring/normalize-intent-eql-output.js.map +1 -0
- package/dist/harness/authoring/normalize-patch-eql-output.d.ts +28 -0
- package/dist/harness/authoring/normalize-patch-eql-output.d.ts.map +1 -0
- package/dist/harness/authoring/normalize-patch-eql-output.js +200 -0
- package/dist/harness/authoring/normalize-patch-eql-output.js.map +1 -0
- package/dist/harness/authoring/normalize-workflow-output.d.ts +6 -0
- package/dist/harness/authoring/normalize-workflow-output.d.ts.map +1 -0
- package/dist/harness/authoring/normalize-workflow-output.js +51 -0
- package/dist/harness/authoring/normalize-workflow-output.js.map +1 -0
- package/dist/harness/authoring/presentation.d.ts +51 -0
- package/dist/harness/authoring/presentation.d.ts.map +1 -0
- package/dist/harness/authoring/presentation.js +131 -0
- package/dist/harness/authoring/presentation.js.map +1 -0
- package/dist/harness/authoring/recover-structured-patch.d.ts +21 -0
- package/dist/harness/authoring/recover-structured-patch.d.ts.map +1 -0
- package/dist/harness/authoring/recover-structured-patch.js +197 -0
- package/dist/harness/authoring/recover-structured-patch.js.map +1 -0
- package/dist/harness/authoring/repair-workflow-json.d.ts +16 -0
- package/dist/harness/authoring/repair-workflow-json.d.ts.map +1 -0
- package/dist/harness/authoring/repair-workflow-json.js +183 -0
- package/dist/harness/authoring/repair-workflow-json.js.map +1 -0
- package/dist/harness/authoring/safe-reply.d.ts +44 -0
- package/dist/harness/authoring/safe-reply.d.ts.map +1 -0
- package/dist/harness/authoring/safe-reply.js +187 -0
- package/dist/harness/authoring/safe-reply.js.map +1 -0
- package/dist/harness/authoring/summarize-capability-schema.d.ts +20 -0
- package/dist/harness/authoring/summarize-capability-schema.d.ts.map +1 -0
- package/dist/harness/authoring/summarize-capability-schema.js +137 -0
- package/dist/harness/authoring/summarize-capability-schema.js.map +1 -0
- package/dist/harness/authoring/summarize-environment.d.ts +43 -0
- package/dist/harness/authoring/summarize-environment.d.ts.map +1 -0
- package/dist/harness/authoring/summarize-environment.js +164 -0
- package/dist/harness/authoring/summarize-environment.js.map +1 -0
- package/dist/harness/authoring/summarize-run-context.d.ts +28 -0
- package/dist/harness/authoring/summarize-run-context.d.ts.map +1 -0
- package/dist/harness/authoring/summarize-run-context.js +40 -0
- package/dist/harness/authoring/summarize-run-context.js.map +1 -0
- package/dist/harness/authoring/summarize-workflow.d.ts +35 -0
- package/dist/harness/authoring/summarize-workflow.d.ts.map +1 -0
- package/dist/harness/authoring/summarize-workflow.js +109 -0
- package/dist/harness/authoring/summarize-workflow.js.map +1 -0
- package/dist/harness/call-model.d.ts +15 -0
- package/dist/harness/call-model.d.ts.map +1 -0
- package/dist/harness/call-model.js +59 -0
- package/dist/harness/call-model.js.map +1 -0
- package/dist/harness/context.d.ts +28 -0
- package/dist/harness/context.d.ts.map +1 -0
- package/dist/harness/context.js +19 -0
- package/dist/harness/context.js.map +1 -0
- package/dist/harness/define-harness.d.ts +37 -0
- package/dist/harness/define-harness.d.ts.map +1 -0
- package/dist/harness/define-harness.js +88 -0
- package/dist/harness/define-harness.js.map +1 -0
- package/dist/harness/definitions/test-minimal-harness.d.ts +13 -0
- package/dist/harness/definitions/test-minimal-harness.d.ts.map +1 -0
- package/dist/harness/definitions/test-minimal-harness.js +45 -0
- package/dist/harness/definitions/test-minimal-harness.js.map +1 -0
- package/dist/harness/execute-harness.d.ts +9 -0
- package/dist/harness/execute-harness.d.ts.map +1 -0
- package/dist/harness/execute-harness.js +138 -0
- package/dist/harness/execute-harness.js.map +1 -0
- package/dist/harness/format-resolve.d.ts +26 -0
- package/dist/harness/format-resolve.d.ts.map +1 -0
- package/dist/harness/format-resolve.js +50 -0
- package/dist/harness/format-resolve.js.map +1 -0
- package/dist/harness/harness-catalog.d.ts +41 -0
- package/dist/harness/harness-catalog.d.ts.map +1 -0
- package/dist/harness/harness-catalog.js +66 -0
- package/dist/harness/harness-catalog.js.map +1 -0
- package/dist/harness/index.d.ts +11 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +9 -0
- package/dist/harness/index.js.map +1 -0
- package/dist/harness/prompts/build-repair-hint.d.ts +7 -0
- package/dist/harness/prompts/build-repair-hint.d.ts.map +1 -0
- package/dist/harness/prompts/build-repair-hint.js +24 -0
- package/dist/harness/prompts/build-repair-hint.js.map +1 -0
- package/dist/harness/prompts/build-system-prompt.d.ts +7 -0
- package/dist/harness/prompts/build-system-prompt.d.ts.map +1 -0
- package/dist/harness/prompts/build-system-prompt.js +97 -0
- package/dist/harness/prompts/build-system-prompt.js.map +1 -0
- package/dist/harness/prompts/eql-primer.d.ts +13 -0
- package/dist/harness/prompts/eql-primer.d.ts.map +1 -0
- package/dist/harness/prompts/eql-primer.js +171 -0
- package/dist/harness/prompts/eql-primer.js.map +1 -0
- package/dist/harness/prompts/fixtures-root.d.ts +5 -0
- package/dist/harness/prompts/fixtures-root.d.ts.map +1 -0
- package/dist/harness/prompts/fixtures-root.js +7 -0
- package/dist/harness/prompts/fixtures-root.js.map +1 -0
- package/dist/harness/prompts/harness-prompt-fixture-schema.d.ts +95 -0
- package/dist/harness/prompts/harness-prompt-fixture-schema.d.ts.map +1 -0
- package/dist/harness/prompts/harness-prompt-fixture-schema.js +28 -0
- package/dist/harness/prompts/harness-prompt-fixture-schema.js.map +1 -0
- package/dist/harness/prompts/identity-primer.d.ts +6 -0
- package/dist/harness/prompts/identity-primer.d.ts.map +1 -0
- package/dist/harness/prompts/identity-primer.js +9 -0
- package/dist/harness/prompts/identity-primer.js.map +1 -0
- package/dist/harness/prompts/index.d.ts +7 -0
- package/dist/harness/prompts/index.d.ts.map +1 -0
- package/dist/harness/prompts/index.js +7 -0
- package/dist/harness/prompts/index.js.map +1 -0
- package/dist/harness/prompts/load-schema-example.browser.d.ts +11 -0
- package/dist/harness/prompts/load-schema-example.browser.d.ts.map +1 -0
- package/dist/harness/prompts/load-schema-example.browser.js +70 -0
- package/dist/harness/prompts/load-schema-example.browser.js.map +1 -0
- package/dist/harness/prompts/load-schema-example.d.ts +11 -0
- package/dist/harness/prompts/load-schema-example.d.ts.map +1 -0
- package/dist/harness/prompts/load-schema-example.js +22 -0
- package/dist/harness/prompts/load-schema-example.js.map +1 -0
- package/dist/harness/prompts/load-schema-example.node.d.ts +7 -0
- package/dist/harness/prompts/load-schema-example.node.d.ts.map +1 -0
- package/dist/harness/prompts/load-schema-example.node.js +38 -0
- package/dist/harness/prompts/load-schema-example.node.js.map +1 -0
- package/dist/harness/prompts/schema-example-files.d.ts +7 -0
- package/dist/harness/prompts/schema-example-files.d.ts.map +1 -0
- package/dist/harness/prompts/schema-example-files.js +12 -0
- package/dist/harness/prompts/schema-example-files.js.map +1 -0
- package/dist/harness/prompts/typescript-primer.d.ts +11 -0
- package/dist/harness/prompts/typescript-primer.d.ts.map +1 -0
- package/dist/harness/prompts/typescript-primer.js +55 -0
- package/dist/harness/prompts/typescript-primer.js.map +1 -0
- package/dist/harness/repair-loop-timing.d.ts +17 -0
- package/dist/harness/repair-loop-timing.d.ts.map +1 -0
- package/dist/harness/repair-loop-timing.js +89 -0
- package/dist/harness/repair-loop-timing.js.map +1 -0
- package/dist/harness/resolve-harness-binding.d.ts +10 -0
- package/dist/harness/resolve-harness-binding.d.ts.map +1 -0
- package/dist/harness/resolve-harness-binding.js +14 -0
- package/dist/harness/resolve-harness-binding.js.map +1 -0
- package/dist/harness/run-model-repair-loop.d.ts +45 -0
- package/dist/harness/run-model-repair-loop.d.ts.map +1 -0
- package/dist/harness/run-model-repair-loop.js +57 -0
- package/dist/harness/run-model-repair-loop.js.map +1 -0
- package/dist/harness/types.d.ts +34 -0
- package/dist/harness/types.d.ts.map +1 -0
- package/dist/harness/types.js +2 -0
- package/dist/harness/types.js.map +1 -0
- package/dist/helpers/browser.d.ts +12 -0
- package/dist/helpers/browser.d.ts.map +1 -0
- package/dist/helpers/browser.js +12 -0
- package/dist/helpers/browser.js.map +1 -0
- package/dist/helpers/env.d.ts +12 -0
- package/dist/helpers/env.d.ts.map +1 -0
- package/dist/helpers/env.js +12 -0
- package/dist/helpers/env.js.map +1 -0
- package/dist/helpers/expr.d.ts +12 -0
- package/dist/helpers/expr.d.ts.map +1 -0
- package/dist/helpers/expr.js +15 -0
- package/dist/helpers/expr.js.map +1 -0
- package/dist/helpers/ref.d.ts +12 -0
- package/dist/helpers/ref.d.ts.map +1 -0
- package/dist/helpers/ref.js +13 -0
- package/dist/helpers/ref.js.map +1 -0
- package/dist/helpers/secrets.d.ts +12 -0
- package/dist/helpers/secrets.d.ts.map +1 -0
- package/dist/helpers/secrets.js +12 -0
- package/dist/helpers/secrets.js.map +1 -0
- package/dist/helpers/state.d.ts +12 -0
- package/dist/helpers/state.d.ts.map +1 -0
- package/dist/helpers/state.js +15 -0
- package/dist/helpers/state.js.map +1 -0
- package/dist/image/image-ref.d.ts +28 -0
- package/dist/image/image-ref.d.ts.map +1 -0
- package/dist/image/image-ref.js +75 -0
- package/dist/image/image-ref.js.map +1 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/invoke/execute-invoke.d.ts +9 -0
- package/dist/invoke/execute-invoke.d.ts.map +1 -0
- package/dist/invoke/execute-invoke.js +137 -0
- package/dist/invoke/execute-invoke.js.map +1 -0
- package/dist/invoke/index.d.ts +3 -0
- package/dist/invoke/index.d.ts.map +1 -0
- package/dist/invoke/index.js +3 -0
- package/dist/invoke/index.js.map +1 -0
- package/dist/invoke/invoke-builder.d.ts +17 -0
- package/dist/invoke/invoke-builder.d.ts.map +1 -0
- package/dist/invoke/invoke-builder.js +24 -0
- package/dist/invoke/invoke-builder.js.map +1 -0
- package/dist/loaders/files.d.ts +13 -0
- package/dist/loaders/files.d.ts.map +1 -0
- package/dist/loaders/files.js +64 -0
- package/dist/loaders/files.js.map +1 -0
- package/dist/loaders/index.d.ts +2 -0
- package/dist/loaders/index.d.ts.map +1 -0
- package/dist/loaders/index.js +2 -0
- package/dist/loaders/index.js.map +1 -0
- package/dist/node.d.ts +8 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +8 -0
- package/dist/node.js.map +1 -0
- package/dist/patch/apply-patch.d.ts +8 -0
- package/dist/patch/apply-patch.d.ts.map +1 -0
- package/dist/patch/apply-patch.js +286 -0
- package/dist/patch/apply-patch.js.map +1 -0
- package/dist/patch/index.d.ts +7 -0
- package/dist/patch/index.d.ts.map +1 -0
- package/dist/patch/index.js +7 -0
- package/dist/patch/index.js.map +1 -0
- package/dist/patch/normalize-input.d.ts +15 -0
- package/dist/patch/normalize-input.d.ts.map +1 -0
- package/dist/patch/normalize-input.js +68 -0
- package/dist/patch/normalize-input.js.map +1 -0
- package/dist/patch/patch-builder.d.ts +14 -0
- package/dist/patch/patch-builder.d.ts.map +1 -0
- package/dist/patch/patch-builder.js +22 -0
- package/dist/patch/patch-builder.js.map +1 -0
- package/dist/patch/patch-document.d.ts +61 -0
- package/dist/patch/patch-document.d.ts.map +1 -0
- package/dist/patch/patch-document.js +16 -0
- package/dist/patch/patch-document.js.map +1 -0
- package/dist/patch/resolve-path.d.ts +21 -0
- package/dist/patch/resolve-path.d.ts.map +1 -0
- package/dist/patch/resolve-path.js +45 -0
- package/dist/patch/resolve-path.js.map +1 -0
- package/dist/patch/step-index.d.ts +14 -0
- package/dist/patch/step-index.d.ts.map +1 -0
- package/dist/patch/step-index.js +44 -0
- package/dist/patch/step-index.js.map +1 -0
- package/dist/registry/ensure-bound-extensions.d.ts +9 -0
- package/dist/registry/ensure-bound-extensions.d.ts.map +1 -0
- package/dist/registry/ensure-bound-extensions.js +31 -0
- package/dist/registry/ensure-bound-extensions.js.map +1 -0
- package/dist/registry/errors.d.ts +13 -0
- package/dist/registry/errors.d.ts.map +1 -0
- package/dist/registry/errors.js +19 -0
- package/dist/registry/errors.js.map +1 -0
- package/dist/registry/extension-catalog.d.ts +31 -0
- package/dist/registry/extension-catalog.d.ts.map +1 -0
- package/dist/registry/extension-catalog.js +50 -0
- package/dist/registry/extension-catalog.js.map +1 -0
- package/dist/registry/namespace.d.ts +11 -0
- package/dist/registry/namespace.d.ts.map +1 -0
- package/dist/registry/namespace.js +19 -0
- package/dist/registry/namespace.js.map +1 -0
- package/dist/registry/registry.d.ts +45 -0
- package/dist/registry/registry.d.ts.map +1 -0
- package/dist/registry/registry.js +95 -0
- package/dist/registry/registry.js.map +1 -0
- package/dist/runtime/commit.d.ts +11 -0
- package/dist/runtime/commit.d.ts.map +1 -0
- package/dist/runtime/commit.js +44 -0
- package/dist/runtime/commit.js.map +1 -0
- package/dist/runtime/context.d.ts +91 -0
- package/dist/runtime/context.d.ts.map +1 -0
- package/dist/runtime/context.js +32 -0
- package/dist/runtime/context.js.map +1 -0
- package/dist/runtime/executor.d.ts +17 -0
- package/dist/runtime/executor.d.ts.map +1 -0
- package/dist/runtime/executor.js +2 -0
- package/dist/runtime/executor.js.map +1 -0
- package/dist/runtime/in-memory-executor.d.ts +10 -0
- package/dist/runtime/in-memory-executor.d.ts.map +1 -0
- package/dist/runtime/in-memory-executor.js +328 -0
- package/dist/runtime/in-memory-executor.js.map +1 -0
- package/dist/runtime/lifecycle.d.ts +6 -0
- package/dist/runtime/lifecycle.d.ts.map +1 -0
- package/dist/runtime/lifecycle.js +10 -0
- package/dist/runtime/lifecycle.js.map +1 -0
- package/dist/runtime/mutation-records.d.ts +4 -0
- package/dist/runtime/mutation-records.d.ts.map +1 -0
- package/dist/runtime/mutation-records.js +28 -0
- package/dist/runtime/mutation-records.js.map +1 -0
- package/dist/runtime/policy-engine.d.ts +13 -0
- package/dist/runtime/policy-engine.d.ts.map +1 -0
- package/dist/runtime/policy-engine.js +46 -0
- package/dist/runtime/policy-engine.js.map +1 -0
- package/dist/runtime/resolve-input.d.ts +4 -0
- package/dist/runtime/resolve-input.d.ts.map +1 -0
- package/dist/runtime/resolve-input.js +46 -0
- package/dist/runtime/resolve-input.js.map +1 -0
- package/dist/runtime/store.d.ts +38 -0
- package/dist/runtime/store.d.ts.map +1 -0
- package/dist/runtime/store.js +97 -0
- package/dist/runtime/store.js.map +1 -0
- package/dist/testing/index.d.ts +7 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +7 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/test-extension.d.ts +5 -0
- package/dist/testing/test-extension.d.ts.map +1 -0
- package/dist/testing/test-extension.js +52 -0
- package/dist/testing/test-extension.js.map +1 -0
- package/dist/testing/test-lifecycle-extension.d.ts +12 -0
- package/dist/testing/test-lifecycle-extension.d.ts.map +1 -0
- package/dist/testing/test-lifecycle-extension.js +65 -0
- package/dist/testing/test-lifecycle-extension.js.map +1 -0
- package/dist/testing/test-model-generate.d.ts +15 -0
- package/dist/testing/test-model-generate.d.ts.map +1 -0
- package/dist/testing/test-model-generate.js +71 -0
- package/dist/testing/test-model-generate.js.map +1 -0
- package/dist/util/path.d.ts +16 -0
- package/dist/util/path.d.ts.map +1 -0
- package/dist/util/path.js +116 -0
- package/dist/util/path.js.map +1 -0
- package/dist/util/slug.d.ts +3 -0
- package/dist/util/slug.d.ts.map +1 -0
- package/dist/util/slug.js +9 -0
- package/dist/util/slug.js.map +1 -0
- package/dist/validate/environment.d.ts +5 -0
- package/dist/validate/environment.d.ts.map +1 -0
- package/dist/validate/environment.js +30 -0
- package/dist/validate/environment.js.map +1 -0
- package/dist/validate/harness.d.ts +11 -0
- package/dist/validate/harness.d.ts.map +1 -0
- package/dist/validate/harness.js +72 -0
- package/dist/validate/harness.js.map +1 -0
- package/dist/validate/workflow-schema.d.ts +350 -0
- package/dist/validate/workflow-schema.d.ts.map +1 -0
- package/dist/validate/workflow-schema.js +152 -0
- package/dist/validate/workflow-schema.js.map +1 -0
- package/dist/validate/workflow.d.ts +7 -0
- package/dist/validate/workflow.d.ts.map +1 -0
- package/dist/validate/workflow.js +139 -0
- package/dist/validate/workflow.js.map +1 -0
- package/dist/validate/zod-mapper.d.ts +5 -0
- package/dist/validate/zod-mapper.d.ts.map +1 -0
- package/dist/validate/zod-mapper.js +10 -0
- package/dist/validate/zod-mapper.js.map +1 -0
- package/dist/workflow/assign-unique-step-ids.d.ts +7 -0
- package/dist/workflow/assign-unique-step-ids.d.ts.map +1 -0
- package/dist/workflow/assign-unique-step-ids.js +58 -0
- package/dist/workflow/assign-unique-step-ids.js.map +1 -0
- package/dist/workflow/builder.d.ts +35 -0
- package/dist/workflow/builder.d.ts.map +1 -0
- package/dist/workflow/builder.js +63 -0
- package/dist/workflow/builder.js.map +1 -0
- package/dist/workflow/flow.d.ts +36 -0
- package/dist/workflow/flow.d.ts.map +1 -0
- package/dist/workflow/flow.js +51 -0
- package/dist/workflow/flow.js.map +1 -0
- package/fixtures/schema-examples/harness-reply.output.eql +3 -0
- package/fixtures/schema-examples/harness-reply.output.json +11 -0
- package/fixtures/schema-examples/intent.output.eql +1 -0
- package/fixtures/schema-examples/intent.output.json +4 -0
- package/fixtures/schema-examples/patch.output.eql +4 -0
- package/fixtures/schema-examples/patch.output.json +12 -0
- package/fixtures/schema-examples/patch.repair-neutral.eql +4 -0
- package/fixtures/schema-examples/workflow.output.eql +5 -0
- package/fixtures/schema-examples/workflow.output.json +18 -0
- package/package.json +115 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
function sortKeys(obj) {
|
|
2
|
+
const sorted = Object.keys(obj)
|
|
3
|
+
.sort()
|
|
4
|
+
.reduce((acc, key) => {
|
|
5
|
+
acc[key] = obj[key];
|
|
6
|
+
return acc;
|
|
7
|
+
}, {});
|
|
8
|
+
return sorted;
|
|
9
|
+
}
|
|
10
|
+
function normalizeInputValue(value) {
|
|
11
|
+
if (value === null || typeof value !== "object")
|
|
12
|
+
return value;
|
|
13
|
+
if (Array.isArray(value))
|
|
14
|
+
return value.map(normalizeInputValue);
|
|
15
|
+
if ("$ref" in value && typeof value.$ref === "string") {
|
|
16
|
+
return { $ref: value.$ref };
|
|
17
|
+
}
|
|
18
|
+
if ("$state" in value && typeof value.$state === "string") {
|
|
19
|
+
return { $state: value.$state };
|
|
20
|
+
}
|
|
21
|
+
const obj = value;
|
|
22
|
+
const out = {};
|
|
23
|
+
for (const key of Object.keys(obj).sort()) {
|
|
24
|
+
out[key] = normalizeInputValue(obj[key]);
|
|
25
|
+
}
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
function normalizeExpr(expr) {
|
|
29
|
+
if (expr === null || typeof expr !== "object")
|
|
30
|
+
return expr;
|
|
31
|
+
const obj = expr;
|
|
32
|
+
if ("eq" in obj && Array.isArray(obj.eq)) {
|
|
33
|
+
return { eq: [obj.eq[0], obj.eq[1]] };
|
|
34
|
+
}
|
|
35
|
+
if ("neq" in obj && Array.isArray(obj.neq)) {
|
|
36
|
+
return { neq: [obj.neq[0], obj.neq[1]] };
|
|
37
|
+
}
|
|
38
|
+
return sortKeys(obj);
|
|
39
|
+
}
|
|
40
|
+
function normalizeStepNode(node) {
|
|
41
|
+
const out = {
|
|
42
|
+
type: "step",
|
|
43
|
+
id: node.id,
|
|
44
|
+
uses: node.uses,
|
|
45
|
+
};
|
|
46
|
+
if (node.label)
|
|
47
|
+
out.label = node.label;
|
|
48
|
+
if (node.input)
|
|
49
|
+
out.input = normalizeInputValue(node.input);
|
|
50
|
+
if (node.as)
|
|
51
|
+
out.as = node.as;
|
|
52
|
+
if (node.mode)
|
|
53
|
+
out.mode = node.mode;
|
|
54
|
+
if (node.when)
|
|
55
|
+
out.when = normalizeExpr(node.when);
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
function normalizeNode(node) {
|
|
59
|
+
if (!node.type || node.type === "step") {
|
|
60
|
+
return normalizeStepNode(node);
|
|
61
|
+
}
|
|
62
|
+
if (node.type === "loop") {
|
|
63
|
+
const loop = node;
|
|
64
|
+
return {
|
|
65
|
+
type: "loop",
|
|
66
|
+
id: loop.id,
|
|
67
|
+
...(loop.label ? { label: loop.label } : {}),
|
|
68
|
+
...(loop.until ? { until: normalizeExpr(loop.until) } : {}),
|
|
69
|
+
...(loop.maxRounds !== undefined ? { maxRounds: loop.maxRounds } : {}),
|
|
70
|
+
steps: loop.steps.map(normalizeNode),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
if (node.type === "parallel") {
|
|
74
|
+
const par = node;
|
|
75
|
+
return {
|
|
76
|
+
type: "parallel",
|
|
77
|
+
id: par.id,
|
|
78
|
+
...(par.label ? { label: par.label } : {}),
|
|
79
|
+
branches: par.branches.map((b) => b.map(normalizeNode)),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const branch = node;
|
|
83
|
+
return {
|
|
84
|
+
type: "branch",
|
|
85
|
+
id: branch.id,
|
|
86
|
+
...(branch.label ? { label: branch.label } : {}),
|
|
87
|
+
branches: branch.branches.map((b) => ({
|
|
88
|
+
...(b.label ? { label: b.label } : {}),
|
|
89
|
+
when: normalizeExpr(b.when),
|
|
90
|
+
steps: b.steps.map(normalizeNode),
|
|
91
|
+
})),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Normalize a workflow manifest for stable round-trip comparison.
|
|
96
|
+
* @category Encoding
|
|
97
|
+
*/
|
|
98
|
+
export function normalizeWorkflowManifest(manifest) {
|
|
99
|
+
return {
|
|
100
|
+
schema: "@executioncontrolprotocol.workflow",
|
|
101
|
+
version: manifest.version,
|
|
102
|
+
workflow: {
|
|
103
|
+
id: manifest.workflow.id,
|
|
104
|
+
...(manifest.workflow.label ? { label: manifest.workflow.label } : {}),
|
|
105
|
+
},
|
|
106
|
+
steps: manifest.steps.map(normalizeNode),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=normalize-workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-workflow.js","sourceRoot":"","sources":["../../src/encoding/normalize-workflow.ts"],"names":[],"mappings":"AAUA,SAAS,QAAQ,CAAoC,GAAM;IACzD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;SAC5B,IAAI,EAAE;SACN,MAAM,CACL,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACX,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;QACnB,OAAO,GAAG,CAAA;IACZ,CAAC,EACD,EAA6B,CAC9B,CAAA;IACH,OAAO,MAAW,CAAA;AACpB,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAc;IACzC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC7D,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAC/D,IAAI,MAAM,IAAI,KAAK,IAAI,OAAQ,KAA0B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC5E,OAAO,EAAE,IAAI,EAAG,KAA0B,CAAC,IAAI,EAAE,CAAA;IACnD,CAAC;IACD,IAAI,QAAQ,IAAI,KAAK,IAAI,OAAQ,KAA4B,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAClF,OAAO,EAAE,MAAM,EAAG,KAA4B,CAAC,MAAM,EAAE,CAAA;IACzD,CAAC;IACD,MAAM,GAAG,GAAG,KAAgC,CAAA;IAC5C,MAAM,GAAG,GAA4B,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AAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvE;QACD,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC;KACzC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CapabilityDefinition } from "../definitions/types.js";
|
|
2
|
+
import type { Registry } from "../registry/registry.js";
|
|
3
|
+
/**
|
|
4
|
+
* Resolve encode capability for an extension.
|
|
5
|
+
* @category Encoding
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveEncoder(registry: Registry, extensionId: string): CapabilityDefinition;
|
|
8
|
+
/**
|
|
9
|
+
* Resolve decode capability for an extension.
|
|
10
|
+
* @category Encoding
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveDecoder(registry: Registry, extensionId: string): CapabilityDefinition;
|
|
13
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/encoding/resolve.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAQvD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,MAAM,GAClB,oBAAoB,CAoBtB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,MAAM,GAClB,oBAAoB,CAoBtB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ECP_ENCODING_ERROR_CODES } from "@executioncontrolprotocol/types";
|
|
2
|
+
import { normalizeNamespacedId, validateDecodeCapabilityContract, validateEncodeCapabilityContract, } from "./contracts.js";
|
|
3
|
+
import { EcpError } from "./errors.js";
|
|
4
|
+
/**
|
|
5
|
+
* Resolve encode capability for an extension.
|
|
6
|
+
* @category Encoding
|
|
7
|
+
*/
|
|
8
|
+
export function resolveEncoder(registry, extensionId) {
|
|
9
|
+
const normalized = normalizeNamespacedId(extensionId);
|
|
10
|
+
const capabilityId = `${normalized}.encode`;
|
|
11
|
+
const extensionDef = registry.getExtension(normalized);
|
|
12
|
+
if (!extensionDef) {
|
|
13
|
+
throw new EcpError(ECP_ENCODING_ERROR_CODES.FORMAT_EXTENSION_NOT_FOUND, {
|
|
14
|
+
message: `Extension ${normalized} is not registered.`,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const capabilityDef = registry.getCapability(capabilityId);
|
|
18
|
+
if (!capabilityDef) {
|
|
19
|
+
throw new EcpError(ECP_ENCODING_ERROR_CODES.FORMAT_ENCODER_NOT_FOUND, {
|
|
20
|
+
message: `Extension ${normalized} does not provide ${capabilityId}.`,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
validateEncodeCapabilityContract(capabilityDef);
|
|
24
|
+
return capabilityDef;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Resolve decode capability for an extension.
|
|
28
|
+
* @category Encoding
|
|
29
|
+
*/
|
|
30
|
+
export function resolveDecoder(registry, extensionId) {
|
|
31
|
+
const normalized = normalizeNamespacedId(extensionId);
|
|
32
|
+
const capabilityId = `${normalized}.decode`;
|
|
33
|
+
const extensionDef = registry.getExtension(normalized);
|
|
34
|
+
if (!extensionDef) {
|
|
35
|
+
throw new EcpError(ECP_ENCODING_ERROR_CODES.FORMAT_EXTENSION_NOT_FOUND, {
|
|
36
|
+
message: `Extension ${normalized} is not registered.`,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
const capabilityDef = registry.getCapability(capabilityId);
|
|
40
|
+
if (!capabilityDef) {
|
|
41
|
+
throw new EcpError(ECP_ENCODING_ERROR_CODES.FORMAT_DECODER_NOT_FOUND, {
|
|
42
|
+
message: `Extension ${normalized} does not provide ${capabilityId}.`,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
validateDecodeCapabilityContract(capabilityDef);
|
|
46
|
+
return capabilityDef;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/encoding/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAG1E,OAAO,EACL,qBAAqB,EACrB,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,QAAkB,EAClB,WAAmB;IAEnB,MAAM,UAAU,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAA;IACrD,MAAM,YAAY,GAAG,GAAG,UAAU,SAAS,CAAA;IAE3C,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;IACtD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,QAAQ,CAAC,wBAAwB,CAAC,0BAA0B,EAAE;YACtE,OAAO,EAAE,aAAa,UAAU,qBAAqB;SACtD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;IAC1D,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,QAAQ,CAAC,wBAAwB,CAAC,wBAAwB,EAAE;YACpE,OAAO,EAAE,aAAa,UAAU,qBAAqB,YAAY,GAAG;SACrE,CAAC,CAAA;IACJ,CAAC;IAED,gCAAgC,CAAC,aAAa,CAAC,CAAA;IAC/C,OAAO,aAAa,CAAA;AACtB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,QAAkB,EAClB,WAAmB;IAEnB,MAAM,UAAU,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAA;IACrD,MAAM,YAAY,GAAG,GAAG,UAAU,SAAS,CAAA;IAE3C,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;IACtD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,QAAQ,CAAC,wBAAwB,CAAC,0BAA0B,EAAE;YACtE,OAAO,EAAE,aAAa,UAAU,qBAAqB;SACtD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;IAC1D,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,QAAQ,CAAC,wBAAwB,CAAC,wBAAwB,EAAE;YACpE,OAAO,EAAE,aAAa,UAAU,qBAAqB,YAAY,GAAG;SACrE,CAAC,CAAA;IACJ,CAAC;IAED,gCAAgC,CAAC,aAAa,CAAC,CAAA;IAC/C,OAAO,aAAa,CAAA;AACtB,CAAC"}
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Zod schema for encode capability input. @category Encoding */
|
|
3
|
+
export declare const ecpEncodeInputSchema: z.ZodObject<{
|
|
4
|
+
source: z.ZodUnknown;
|
|
5
|
+
sourceSchema: z.ZodOptional<z.ZodString>;
|
|
6
|
+
sourceVersion: z.ZodOptional<z.ZodString>;
|
|
7
|
+
format: z.ZodOptional<z.ZodString>;
|
|
8
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
headers: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
compact: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
as: z.ZodOptional<z.ZodEnum<["object", "string"]>>;
|
|
13
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
14
|
+
headers: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
compact: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
17
|
+
as: z.ZodOptional<z.ZodEnum<["object", "string"]>>;
|
|
18
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
19
|
+
headers: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
compact: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
22
|
+
as: z.ZodOptional<z.ZodEnum<["object", "string"]>>;
|
|
23
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
source?: unknown;
|
|
26
|
+
options?: z.objectOutputType<{
|
|
27
|
+
headers: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
compact: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
30
|
+
as: z.ZodOptional<z.ZodEnum<["object", "string"]>>;
|
|
31
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
32
|
+
sourceSchema?: string | undefined;
|
|
33
|
+
sourceVersion?: string | undefined;
|
|
34
|
+
format?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
source?: unknown;
|
|
37
|
+
options?: z.objectInputType<{
|
|
38
|
+
headers: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
compact: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
41
|
+
as: z.ZodOptional<z.ZodEnum<["object", "string"]>>;
|
|
42
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
43
|
+
sourceSchema?: string | undefined;
|
|
44
|
+
sourceVersion?: string | undefined;
|
|
45
|
+
format?: string | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
/** Zod schema for decode capability input. @category Encoding */
|
|
48
|
+
export declare const ecpDecodeInputSchema: z.ZodObject<{
|
|
49
|
+
input: z.ZodUnknown;
|
|
50
|
+
format: z.ZodOptional<z.ZodString>;
|
|
51
|
+
targetSchema: z.ZodOptional<z.ZodString>;
|
|
52
|
+
targetVersion: z.ZodOptional<z.ZodString>;
|
|
53
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
headers: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
56
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
57
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
headers: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
59
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
60
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
headers: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
62
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
options?: z.objectOutputType<{
|
|
65
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
headers: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
67
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
68
|
+
input?: unknown;
|
|
69
|
+
format?: string | undefined;
|
|
70
|
+
targetSchema?: string | undefined;
|
|
71
|
+
targetVersion?: string | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
options?: z.objectInputType<{
|
|
74
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
headers: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
76
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
77
|
+
input?: unknown;
|
|
78
|
+
format?: string | undefined;
|
|
79
|
+
targetSchema?: string | undefined;
|
|
80
|
+
targetVersion?: string | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
/** Zod schema for encode result output. @category Encoding */
|
|
83
|
+
export declare const ecpEncodeResultSchema: z.ZodObject<{
|
|
84
|
+
schema: z.ZodLiteral<"@executioncontrolprotocol.encode.result">;
|
|
85
|
+
version: z.ZodString;
|
|
86
|
+
success: z.ZodBoolean;
|
|
87
|
+
format: z.ZodString;
|
|
88
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
89
|
+
sourceSchema: z.ZodOptional<z.ZodString>;
|
|
90
|
+
sourceVersion: z.ZodOptional<z.ZodString>;
|
|
91
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
92
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
schema: z.ZodLiteral<"@executioncontrolprotocol.validation.result">;
|
|
94
|
+
version: z.ZodString;
|
|
95
|
+
valid: z.ZodBoolean;
|
|
96
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
97
|
+
severity: z.ZodEnum<["error", "warning", "info"]>;
|
|
98
|
+
message: z.ZodString;
|
|
99
|
+
path: z.ZodOptional<z.ZodString>;
|
|
100
|
+
code: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
message: string;
|
|
103
|
+
severity: "error" | "warning" | "info";
|
|
104
|
+
code?: string | undefined;
|
|
105
|
+
path?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
message: string;
|
|
108
|
+
severity: "error" | "warning" | "info";
|
|
109
|
+
code?: string | undefined;
|
|
110
|
+
path?: string | undefined;
|
|
111
|
+
}>, "many">;
|
|
112
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
113
|
+
severity: z.ZodEnum<["error", "warning", "info"]>;
|
|
114
|
+
message: z.ZodString;
|
|
115
|
+
path: z.ZodOptional<z.ZodString>;
|
|
116
|
+
code: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, "strip", z.ZodTypeAny, {
|
|
118
|
+
message: string;
|
|
119
|
+
severity: "error" | "warning" | "info";
|
|
120
|
+
code?: string | undefined;
|
|
121
|
+
path?: string | undefined;
|
|
122
|
+
}, {
|
|
123
|
+
message: string;
|
|
124
|
+
severity: "error" | "warning" | "info";
|
|
125
|
+
code?: string | undefined;
|
|
126
|
+
path?: string | undefined;
|
|
127
|
+
}>, "many">;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
valid: boolean;
|
|
130
|
+
version: string;
|
|
131
|
+
schema: "@executioncontrolprotocol.validation.result";
|
|
132
|
+
errors: {
|
|
133
|
+
message: string;
|
|
134
|
+
severity: "error" | "warning" | "info";
|
|
135
|
+
code?: string | undefined;
|
|
136
|
+
path?: string | undefined;
|
|
137
|
+
}[];
|
|
138
|
+
warnings: {
|
|
139
|
+
message: string;
|
|
140
|
+
severity: "error" | "warning" | "info";
|
|
141
|
+
code?: string | undefined;
|
|
142
|
+
path?: string | undefined;
|
|
143
|
+
}[];
|
|
144
|
+
}, {
|
|
145
|
+
valid: boolean;
|
|
146
|
+
version: string;
|
|
147
|
+
schema: "@executioncontrolprotocol.validation.result";
|
|
148
|
+
errors: {
|
|
149
|
+
message: string;
|
|
150
|
+
severity: "error" | "warning" | "info";
|
|
151
|
+
code?: string | undefined;
|
|
152
|
+
path?: string | undefined;
|
|
153
|
+
}[];
|
|
154
|
+
warnings: {
|
|
155
|
+
message: string;
|
|
156
|
+
severity: "error" | "warning" | "info";
|
|
157
|
+
code?: string | undefined;
|
|
158
|
+
path?: string | undefined;
|
|
159
|
+
}[];
|
|
160
|
+
}>>;
|
|
161
|
+
diagnostics: z.ZodArray<z.ZodObject<{
|
|
162
|
+
severity: z.ZodEnum<["error", "warning", "info"]>;
|
|
163
|
+
message: z.ZodString;
|
|
164
|
+
path: z.ZodOptional<z.ZodString>;
|
|
165
|
+
code: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, "strip", z.ZodTypeAny, {
|
|
167
|
+
message: string;
|
|
168
|
+
severity: "error" | "warning" | "info";
|
|
169
|
+
code?: string | undefined;
|
|
170
|
+
path?: string | undefined;
|
|
171
|
+
}, {
|
|
172
|
+
message: string;
|
|
173
|
+
severity: "error" | "warning" | "info";
|
|
174
|
+
code?: string | undefined;
|
|
175
|
+
path?: string | undefined;
|
|
176
|
+
}>, "many">;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
version: string;
|
|
179
|
+
schema: "@executioncontrolprotocol.encode.result";
|
|
180
|
+
format: string;
|
|
181
|
+
success: boolean;
|
|
182
|
+
diagnostics: {
|
|
183
|
+
message: string;
|
|
184
|
+
severity: "error" | "warning" | "info";
|
|
185
|
+
code?: string | undefined;
|
|
186
|
+
path?: string | undefined;
|
|
187
|
+
}[];
|
|
188
|
+
validation?: {
|
|
189
|
+
valid: boolean;
|
|
190
|
+
version: string;
|
|
191
|
+
schema: "@executioncontrolprotocol.validation.result";
|
|
192
|
+
errors: {
|
|
193
|
+
message: string;
|
|
194
|
+
severity: "error" | "warning" | "info";
|
|
195
|
+
code?: string | undefined;
|
|
196
|
+
path?: string | undefined;
|
|
197
|
+
}[];
|
|
198
|
+
warnings: {
|
|
199
|
+
message: string;
|
|
200
|
+
severity: "error" | "warning" | "info";
|
|
201
|
+
code?: string | undefined;
|
|
202
|
+
path?: string | undefined;
|
|
203
|
+
}[];
|
|
204
|
+
} | undefined;
|
|
205
|
+
sourceSchema?: string | undefined;
|
|
206
|
+
sourceVersion?: string | undefined;
|
|
207
|
+
mediaType?: string | undefined;
|
|
208
|
+
result?: unknown;
|
|
209
|
+
}, {
|
|
210
|
+
version: string;
|
|
211
|
+
schema: "@executioncontrolprotocol.encode.result";
|
|
212
|
+
format: string;
|
|
213
|
+
success: boolean;
|
|
214
|
+
diagnostics: {
|
|
215
|
+
message: string;
|
|
216
|
+
severity: "error" | "warning" | "info";
|
|
217
|
+
code?: string | undefined;
|
|
218
|
+
path?: string | undefined;
|
|
219
|
+
}[];
|
|
220
|
+
validation?: {
|
|
221
|
+
valid: boolean;
|
|
222
|
+
version: string;
|
|
223
|
+
schema: "@executioncontrolprotocol.validation.result";
|
|
224
|
+
errors: {
|
|
225
|
+
message: string;
|
|
226
|
+
severity: "error" | "warning" | "info";
|
|
227
|
+
code?: string | undefined;
|
|
228
|
+
path?: string | undefined;
|
|
229
|
+
}[];
|
|
230
|
+
warnings: {
|
|
231
|
+
message: string;
|
|
232
|
+
severity: "error" | "warning" | "info";
|
|
233
|
+
code?: string | undefined;
|
|
234
|
+
path?: string | undefined;
|
|
235
|
+
}[];
|
|
236
|
+
} | undefined;
|
|
237
|
+
sourceSchema?: string | undefined;
|
|
238
|
+
sourceVersion?: string | undefined;
|
|
239
|
+
mediaType?: string | undefined;
|
|
240
|
+
result?: unknown;
|
|
241
|
+
}>;
|
|
242
|
+
/** Zod schema for decode result output. @category Encoding */
|
|
243
|
+
export declare const ecpDecodeResultSchema: z.ZodObject<{
|
|
244
|
+
schema: z.ZodLiteral<"@executioncontrolprotocol.decode.result">;
|
|
245
|
+
version: z.ZodString;
|
|
246
|
+
success: z.ZodBoolean;
|
|
247
|
+
targetSchema: z.ZodOptional<z.ZodString>;
|
|
248
|
+
targetVersion: z.ZodOptional<z.ZodString>;
|
|
249
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
250
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
251
|
+
schema: z.ZodLiteral<"@executioncontrolprotocol.validation.result">;
|
|
252
|
+
version: z.ZodString;
|
|
253
|
+
valid: z.ZodBoolean;
|
|
254
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
255
|
+
severity: z.ZodEnum<["error", "warning", "info"]>;
|
|
256
|
+
message: z.ZodString;
|
|
257
|
+
path: z.ZodOptional<z.ZodString>;
|
|
258
|
+
code: z.ZodOptional<z.ZodString>;
|
|
259
|
+
}, "strip", z.ZodTypeAny, {
|
|
260
|
+
message: string;
|
|
261
|
+
severity: "error" | "warning" | "info";
|
|
262
|
+
code?: string | undefined;
|
|
263
|
+
path?: string | undefined;
|
|
264
|
+
}, {
|
|
265
|
+
message: string;
|
|
266
|
+
severity: "error" | "warning" | "info";
|
|
267
|
+
code?: string | undefined;
|
|
268
|
+
path?: string | undefined;
|
|
269
|
+
}>, "many">;
|
|
270
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
271
|
+
severity: z.ZodEnum<["error", "warning", "info"]>;
|
|
272
|
+
message: z.ZodString;
|
|
273
|
+
path: z.ZodOptional<z.ZodString>;
|
|
274
|
+
code: z.ZodOptional<z.ZodString>;
|
|
275
|
+
}, "strip", z.ZodTypeAny, {
|
|
276
|
+
message: string;
|
|
277
|
+
severity: "error" | "warning" | "info";
|
|
278
|
+
code?: string | undefined;
|
|
279
|
+
path?: string | undefined;
|
|
280
|
+
}, {
|
|
281
|
+
message: string;
|
|
282
|
+
severity: "error" | "warning" | "info";
|
|
283
|
+
code?: string | undefined;
|
|
284
|
+
path?: string | undefined;
|
|
285
|
+
}>, "many">;
|
|
286
|
+
}, "strip", z.ZodTypeAny, {
|
|
287
|
+
valid: boolean;
|
|
288
|
+
version: string;
|
|
289
|
+
schema: "@executioncontrolprotocol.validation.result";
|
|
290
|
+
errors: {
|
|
291
|
+
message: string;
|
|
292
|
+
severity: "error" | "warning" | "info";
|
|
293
|
+
code?: string | undefined;
|
|
294
|
+
path?: string | undefined;
|
|
295
|
+
}[];
|
|
296
|
+
warnings: {
|
|
297
|
+
message: string;
|
|
298
|
+
severity: "error" | "warning" | "info";
|
|
299
|
+
code?: string | undefined;
|
|
300
|
+
path?: string | undefined;
|
|
301
|
+
}[];
|
|
302
|
+
}, {
|
|
303
|
+
valid: boolean;
|
|
304
|
+
version: string;
|
|
305
|
+
schema: "@executioncontrolprotocol.validation.result";
|
|
306
|
+
errors: {
|
|
307
|
+
message: string;
|
|
308
|
+
severity: "error" | "warning" | "info";
|
|
309
|
+
code?: string | undefined;
|
|
310
|
+
path?: string | undefined;
|
|
311
|
+
}[];
|
|
312
|
+
warnings: {
|
|
313
|
+
message: string;
|
|
314
|
+
severity: "error" | "warning" | "info";
|
|
315
|
+
code?: string | undefined;
|
|
316
|
+
path?: string | undefined;
|
|
317
|
+
}[];
|
|
318
|
+
}>>;
|
|
319
|
+
diagnostics: z.ZodArray<z.ZodObject<{
|
|
320
|
+
severity: z.ZodEnum<["error", "warning", "info"]>;
|
|
321
|
+
message: z.ZodString;
|
|
322
|
+
path: z.ZodOptional<z.ZodString>;
|
|
323
|
+
code: z.ZodOptional<z.ZodString>;
|
|
324
|
+
}, "strip", z.ZodTypeAny, {
|
|
325
|
+
message: string;
|
|
326
|
+
severity: "error" | "warning" | "info";
|
|
327
|
+
code?: string | undefined;
|
|
328
|
+
path?: string | undefined;
|
|
329
|
+
}, {
|
|
330
|
+
message: string;
|
|
331
|
+
severity: "error" | "warning" | "info";
|
|
332
|
+
code?: string | undefined;
|
|
333
|
+
path?: string | undefined;
|
|
334
|
+
}>, "many">;
|
|
335
|
+
}, "strip", z.ZodTypeAny, {
|
|
336
|
+
version: string;
|
|
337
|
+
schema: "@executioncontrolprotocol.decode.result";
|
|
338
|
+
success: boolean;
|
|
339
|
+
diagnostics: {
|
|
340
|
+
message: string;
|
|
341
|
+
severity: "error" | "warning" | "info";
|
|
342
|
+
code?: string | undefined;
|
|
343
|
+
path?: string | undefined;
|
|
344
|
+
}[];
|
|
345
|
+
validation?: {
|
|
346
|
+
valid: boolean;
|
|
347
|
+
version: string;
|
|
348
|
+
schema: "@executioncontrolprotocol.validation.result";
|
|
349
|
+
errors: {
|
|
350
|
+
message: string;
|
|
351
|
+
severity: "error" | "warning" | "info";
|
|
352
|
+
code?: string | undefined;
|
|
353
|
+
path?: string | undefined;
|
|
354
|
+
}[];
|
|
355
|
+
warnings: {
|
|
356
|
+
message: string;
|
|
357
|
+
severity: "error" | "warning" | "info";
|
|
358
|
+
code?: string | undefined;
|
|
359
|
+
path?: string | undefined;
|
|
360
|
+
}[];
|
|
361
|
+
} | undefined;
|
|
362
|
+
targetSchema?: string | undefined;
|
|
363
|
+
targetVersion?: string | undefined;
|
|
364
|
+
result?: unknown;
|
|
365
|
+
}, {
|
|
366
|
+
version: string;
|
|
367
|
+
schema: "@executioncontrolprotocol.decode.result";
|
|
368
|
+
success: boolean;
|
|
369
|
+
diagnostics: {
|
|
370
|
+
message: string;
|
|
371
|
+
severity: "error" | "warning" | "info";
|
|
372
|
+
code?: string | undefined;
|
|
373
|
+
path?: string | undefined;
|
|
374
|
+
}[];
|
|
375
|
+
validation?: {
|
|
376
|
+
valid: boolean;
|
|
377
|
+
version: string;
|
|
378
|
+
schema: "@executioncontrolprotocol.validation.result";
|
|
379
|
+
errors: {
|
|
380
|
+
message: string;
|
|
381
|
+
severity: "error" | "warning" | "info";
|
|
382
|
+
code?: string | undefined;
|
|
383
|
+
path?: string | undefined;
|
|
384
|
+
}[];
|
|
385
|
+
warnings: {
|
|
386
|
+
message: string;
|
|
387
|
+
severity: "error" | "warning" | "info";
|
|
388
|
+
code?: string | undefined;
|
|
389
|
+
path?: string | undefined;
|
|
390
|
+
}[];
|
|
391
|
+
} | undefined;
|
|
392
|
+
targetSchema?: string | undefined;
|
|
393
|
+
targetVersion?: string | undefined;
|
|
394
|
+
result?: unknown;
|
|
395
|
+
}>;
|
|
396
|
+
/** Default encoded version field. @category Encoding */
|
|
397
|
+
export declare const ENCODED_VERSION: "1.0";
|
|
398
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/encoding/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAoBvB,iEAAiE;AACjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc/B,CAAA;AAEF,iEAAiE;AACjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY/B,CAAA;AAEF,8DAA8D;AAC9D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhC,CAAA;AAEF,8DAA8D;AAC9D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAShC,CAAA;AAEF,wDAAwD;AACxD,eAAO,MAAM,eAAe,OAAqB,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { LATEST_ECP_VERSION } from "@executioncontrolprotocol/types";
|
|
3
|
+
const validationIssueSchema = z.object({
|
|
4
|
+
severity: z.enum(["error", "warning", "info"]),
|
|
5
|
+
message: z.string(),
|
|
6
|
+
path: z.string().optional(),
|
|
7
|
+
code: z.string().optional(),
|
|
8
|
+
});
|
|
9
|
+
const validationResultSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
schema: z.literal("@executioncontrolprotocol.validation.result"),
|
|
12
|
+
version: z.string(),
|
|
13
|
+
valid: z.boolean(),
|
|
14
|
+
errors: z.array(validationIssueSchema),
|
|
15
|
+
warnings: z.array(validationIssueSchema),
|
|
16
|
+
})
|
|
17
|
+
.optional();
|
|
18
|
+
/** Zod schema for encode capability input. @category Encoding */
|
|
19
|
+
export const ecpEncodeInputSchema = z.object({
|
|
20
|
+
source: z.unknown(),
|
|
21
|
+
sourceSchema: z.string().optional(),
|
|
22
|
+
sourceVersion: z.string().optional(),
|
|
23
|
+
format: z.string().optional(),
|
|
24
|
+
options: z
|
|
25
|
+
.object({
|
|
26
|
+
headers: z.boolean().optional(),
|
|
27
|
+
compact: z.boolean().optional(),
|
|
28
|
+
include: z.array(z.string()).optional(),
|
|
29
|
+
as: z.enum(["object", "string"]).optional(),
|
|
30
|
+
})
|
|
31
|
+
.passthrough()
|
|
32
|
+
.optional(),
|
|
33
|
+
});
|
|
34
|
+
/** Zod schema for decode capability input. @category Encoding */
|
|
35
|
+
export const ecpDecodeInputSchema = z.object({
|
|
36
|
+
input: z.unknown(),
|
|
37
|
+
format: z.string().optional(),
|
|
38
|
+
targetSchema: z.string().optional(),
|
|
39
|
+
targetVersion: z.string().optional(),
|
|
40
|
+
options: z
|
|
41
|
+
.object({
|
|
42
|
+
strict: z.boolean().optional(),
|
|
43
|
+
headers: z.union([z.boolean(), z.literal("auto")]).optional(),
|
|
44
|
+
})
|
|
45
|
+
.passthrough()
|
|
46
|
+
.optional(),
|
|
47
|
+
});
|
|
48
|
+
/** Zod schema for encode result output. @category Encoding */
|
|
49
|
+
export const ecpEncodeResultSchema = z.object({
|
|
50
|
+
schema: z.literal("@executioncontrolprotocol.encode.result"),
|
|
51
|
+
version: z.string(),
|
|
52
|
+
success: z.boolean(),
|
|
53
|
+
format: z.string(),
|
|
54
|
+
mediaType: z.string().optional(),
|
|
55
|
+
sourceSchema: z.string().optional(),
|
|
56
|
+
sourceVersion: z.string().optional(),
|
|
57
|
+
result: z.unknown().optional(),
|
|
58
|
+
validation: validationResultSchema,
|
|
59
|
+
diagnostics: z.array(validationIssueSchema),
|
|
60
|
+
});
|
|
61
|
+
/** Zod schema for decode result output. @category Encoding */
|
|
62
|
+
export const ecpDecodeResultSchema = z.object({
|
|
63
|
+
schema: z.literal("@executioncontrolprotocol.decode.result"),
|
|
64
|
+
version: z.string(),
|
|
65
|
+
success: z.boolean(),
|
|
66
|
+
targetSchema: z.string().optional(),
|
|
67
|
+
targetVersion: z.string().optional(),
|
|
68
|
+
result: z.unknown().optional(),
|
|
69
|
+
validation: validationResultSchema,
|
|
70
|
+
diagnostics: z.array(validationIssueSchema),
|
|
71
|
+
});
|
|
72
|
+
/** Default encoded version field. @category Encoding */
|
|
73
|
+
export const ENCODED_VERSION = LATEST_ECP_VERSION;
|
|
74
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/encoding/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAEpE,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAA;AAEF,MAAM,sBAAsB,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,6CAA6C,CAAC;IAChE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC;IACtC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC;CACzC,CAAC;KACD,QAAQ,EAAE,CAAA;AAEb,iEAAiE;AACjE,MAAM,CAAC,MAAM,oBAAoB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