@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,97 @@
|
|
|
1
|
+
import { getAtPath, setAtPath } from "../util/path.js";
|
|
2
|
+
function randomUUID() {
|
|
3
|
+
return globalThis.crypto.randomUUID();
|
|
4
|
+
}
|
|
5
|
+
export function createMutationBuffer(_state, _allowedPaths) {
|
|
6
|
+
const mutations = [];
|
|
7
|
+
return {
|
|
8
|
+
pending: () => [...mutations],
|
|
9
|
+
push(m) {
|
|
10
|
+
mutations.push(m);
|
|
11
|
+
},
|
|
12
|
+
preview(base) {
|
|
13
|
+
const copy = structuredClone(base);
|
|
14
|
+
for (const m of mutations) {
|
|
15
|
+
if (m.op === "append") {
|
|
16
|
+
const existing = getAtPath(copy, m.path);
|
|
17
|
+
const arr = Array.isArray(existing) ? [...existing] : [];
|
|
18
|
+
arr.push(m.value);
|
|
19
|
+
setAtPath(copy, m.path, arr);
|
|
20
|
+
}
|
|
21
|
+
else if (m.op === "merge" && typeof m.value === "object") {
|
|
22
|
+
const existing = getAtPath(copy, m.path);
|
|
23
|
+
setAtPath(copy, m.path, {
|
|
24
|
+
...(typeof existing === "object" && existing !== null ? existing : {}),
|
|
25
|
+
...m.value,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
setAtPath(copy, m.path, m.value);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return copy;
|
|
33
|
+
},
|
|
34
|
+
discard() {
|
|
35
|
+
mutations.length = 0;
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function createTransactionalStore(options) {
|
|
40
|
+
const { state, buffer, allowedHandles } = options;
|
|
41
|
+
function pathFromHandle(handle) {
|
|
42
|
+
return typeof handle === "string" ? handle : handle.path;
|
|
43
|
+
}
|
|
44
|
+
function assertAllowed(path) {
|
|
45
|
+
if (!allowedHandles.has(path)) {
|
|
46
|
+
throw new Error(`Store write to '${path}' requires a state() handle in step input`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function record(op, path, value, opts) {
|
|
50
|
+
assertAllowed(path);
|
|
51
|
+
const m = {
|
|
52
|
+
id: randomUUID(),
|
|
53
|
+
op,
|
|
54
|
+
path,
|
|
55
|
+
value,
|
|
56
|
+
status: "pending",
|
|
57
|
+
...(opts?.reason ? { reason: opts.reason } : {}),
|
|
58
|
+
...(opts?.metadata ? { metadata: opts.metadata } : {}),
|
|
59
|
+
};
|
|
60
|
+
buffer.push(m);
|
|
61
|
+
return m;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
async read(handleOrPath, readOpts) {
|
|
65
|
+
const path = pathFromHandle(handleOrPath);
|
|
66
|
+
const base = readOpts?.includePending ? buffer.preview(state) : state;
|
|
67
|
+
return getAtPath(base, path);
|
|
68
|
+
},
|
|
69
|
+
async set(handle, value, opts) {
|
|
70
|
+
return record("set", pathFromHandle(handle), value, opts);
|
|
71
|
+
},
|
|
72
|
+
async replace(handle, value, opts) {
|
|
73
|
+
return record("replace", pathFromHandle(handle), value, opts);
|
|
74
|
+
},
|
|
75
|
+
async merge(handle, value, opts) {
|
|
76
|
+
return record("merge", pathFromHandle(handle), value, opts);
|
|
77
|
+
},
|
|
78
|
+
async append(handle, value, opts) {
|
|
79
|
+
return record("append", pathFromHandle(handle), value, opts);
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export function collectStateHandles(input) {
|
|
84
|
+
const paths = new Set();
|
|
85
|
+
function walk(v) {
|
|
86
|
+
if (v && typeof v === "object" && "$state" in v) {
|
|
87
|
+
paths.add(String(v.$state));
|
|
88
|
+
}
|
|
89
|
+
if (v && typeof v === "object") {
|
|
90
|
+
for (const child of Object.values(v))
|
|
91
|
+
walk(child);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
walk(input);
|
|
95
|
+
return paths;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/runtime/store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEtD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CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;YAChD,KAAK,CAAC,GAAG,CAAC,MAAM,CAAE,CAAwB,CAAC,MAAM,CAAC,CAAC,CAAA;QACrD,CAAC;QACD,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC/B,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;gBAAE,IAAI,CAAC,KAAK,CAAC,CAAA;QACnD,CAAC;IACH,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,CAAA;IACX,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side-effect entry: catalogs {@link testExtension} for `extension("@executioncontrolprotocol/test")` bindings.
|
|
3
|
+
* @category Testing
|
|
4
|
+
*/
|
|
5
|
+
import "./test-extension.js";
|
|
6
|
+
export { registerTestExtension, testExtension } from "./test-extension.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side-effect entry: catalogs {@link testExtension} for `extension("@executioncontrolprotocol/test")` bindings.
|
|
3
|
+
* @category Testing
|
|
4
|
+
*/
|
|
5
|
+
import "./test-extension.js";
|
|
6
|
+
export { registerTestExtension, testExtension } from "./test-extension.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** In-repo stub extension for examples and tests. @category Testing */
|
|
2
|
+
export declare const testExtension: import("../browser-runtime-entry.js").ExtensionDefinition;
|
|
3
|
+
/** Register @executioncontrolprotocol/test capabilities for examples and tests. */
|
|
4
|
+
export declare function registerTestExtension(registry?: import("../registry/registry.js").Registry): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=test-extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-extension.d.ts","sourceRoot":"","sources":["../../src/testing/test-extension.ts"],"names":[],"mappings":"AAeA,uEAAuE;AACvE,eAAO,MAAM,aAAa,2DAgChB,CAAA;AAIV,mFAAmF;AACnF,wBAAsB,qBAAqB,CACzC,QAAQ,6CAAiB,GACxB,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineExtension } from "../definitions/extension.js";
|
|
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
|
+
import { z } from "zod";
|
|
8
|
+
const TestStubInput = z.object({ payload: z.unknown().optional() });
|
|
9
|
+
const TestStubOutput = z.object({ ok: z.boolean(), result: z.unknown().optional() });
|
|
10
|
+
function testStubHandler(input) {
|
|
11
|
+
return { ok: true, result: input.payload ?? "test-stub" };
|
|
12
|
+
}
|
|
13
|
+
/** In-repo stub extension for examples and tests. @category Testing */
|
|
14
|
+
export const testExtension = defineExtension("@executioncontrolprotocol", "test")
|
|
15
|
+
.withConfig({})
|
|
16
|
+
.withCapabilities([
|
|
17
|
+
capabilityFor("@executioncontrolprotocol/test", "echo")
|
|
18
|
+
.withInput(z.object({ value: z.unknown().optional() }))
|
|
19
|
+
.withOutput(z.object({ echo: z.unknown() }))
|
|
20
|
+
.withHandler(async (input) => ({
|
|
21
|
+
echo: input.value ?? "hi",
|
|
22
|
+
})),
|
|
23
|
+
capabilityFor("@executioncontrolprotocol/test", "generate")
|
|
24
|
+
.withInput(modelGenerateInputSchema)
|
|
25
|
+
.withOutput(modelGenerateOutputSchema)
|
|
26
|
+
.withHandler(async (input) => testModelGenerateHandler(input)),
|
|
27
|
+
capabilityFor("@executioncontrolprotocol/test", "summarize")
|
|
28
|
+
.withInput(TestStubInput)
|
|
29
|
+
.withOutput(TestStubOutput)
|
|
30
|
+
.withHandler(async (input) => testStubHandler(input)),
|
|
31
|
+
capabilityFor("@executioncontrolprotocol/test", "translate")
|
|
32
|
+
.withInput(TestStubInput)
|
|
33
|
+
.withOutput(TestStubOutput)
|
|
34
|
+
.withHandler(async (input) => testStubHandler(input)),
|
|
35
|
+
capabilityFor("@executioncontrolprotocol/test", "notify")
|
|
36
|
+
.withInput(TestStubInput)
|
|
37
|
+
.withOutput(TestStubOutput)
|
|
38
|
+
.withHandler(async (input) => testStubHandler(input)),
|
|
39
|
+
capabilityFor("@executioncontrolprotocol/test", "validate")
|
|
40
|
+
.withInput(TestStubInput)
|
|
41
|
+
.withOutput(TestStubOutput)
|
|
42
|
+
.withHandler(async (input) => testStubHandler(input)),
|
|
43
|
+
])
|
|
44
|
+
.build();
|
|
45
|
+
catalogExtension(testExtension);
|
|
46
|
+
/** Register @executioncontrolprotocol/test capabilities for examples and tests. */
|
|
47
|
+
export async function registerTestExtension(registry = globalRegistry) {
|
|
48
|
+
if (!registry.getExtension("@executioncontrolprotocol/test")) {
|
|
49
|
+
await registry.registerExtension(testExtension);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=test-extension.js.map
|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gB,CAAC,aAAa,CAAC,CAAA;AAE/B,mFAAmF;AACnF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,QAAQ,GAAG,cAAc;IAEzB,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,gCAAgC,CAAC,EAAE,CAAC;QAC7D,MAAM,QAAQ,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAA;IACjD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LifecycleEvent } from "@executioncontrolprotocol/types";
|
|
2
|
+
/** Recorded extension lifecycle hook events (reset via `resetLifecycleSpy()`). */
|
|
3
|
+
export declare const lifecycleSpyEvents: LifecycleEvent[];
|
|
4
|
+
/** Capability invocation count for spy capabilities. */
|
|
5
|
+
export declare let capabilityInvokeCount: number;
|
|
6
|
+
/** Reset spy state between tests. */
|
|
7
|
+
export declare function resetLifecycleSpy(): void;
|
|
8
|
+
/** Lifecycle spy extension for conformance tests. @category Testing */
|
|
9
|
+
export declare const lifecycleSpyExtension: import("../browser-runtime-entry.js").ExtensionDefinition;
|
|
10
|
+
/** Register lifecycle spy extension on global registry. */
|
|
11
|
+
export declare function registerLifecycleSpyExtension(): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=test-lifecycle-extension.d.ts.map
|
|
@@ -0,0 +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,MAAM,iCAAiC,CAAA;AAQrE,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAAO,CAAA;AAEtD,wDAAwD;AACxD,eAAO,IAAI,qBAAqB,QAAI,CAAA;AAEpC,qCAAqC;AACrC,wBAAgB,iBAAiB,IAAI,IAAI,CAGxC;AAQD,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,2DAmCxB,CAAA;AAIV,2DAA2D;AAC3D,wBAAsB,6BAA6B,IAAI,OAAO,CAAC,IAAI,CAAC,CAInE"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineExtension } from "../definitions/extension.js";
|
|
2
|
+
import { capabilityFor } from "../definitions/capability.js";
|
|
3
|
+
import { hook } from "../definitions/hook.js";
|
|
4
|
+
import { catalogExtension } from "../registry/extension-catalog.js";
|
|
5
|
+
import { globalRegistry } from "../registry/registry.js";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
/** Recorded extension lifecycle hook events (reset via `resetLifecycleSpy()`). */
|
|
8
|
+
export const lifecycleSpyEvents = [];
|
|
9
|
+
/** Capability invocation count for spy capabilities. */
|
|
10
|
+
export let capabilityInvokeCount = 0;
|
|
11
|
+
/** Reset spy state between tests. */
|
|
12
|
+
export function resetLifecycleSpy() {
|
|
13
|
+
lifecycleSpyEvents.length = 0;
|
|
14
|
+
capabilityInvokeCount = 0;
|
|
15
|
+
}
|
|
16
|
+
function spyHook(event) {
|
|
17
|
+
return hook(event, async () => {
|
|
18
|
+
lifecycleSpyEvents.push(event);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/** Lifecycle spy extension for conformance tests. @category Testing */
|
|
22
|
+
export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol", "lifecycle-spy")
|
|
23
|
+
.withConfig({})
|
|
24
|
+
.withCapabilities([
|
|
25
|
+
capabilityFor("@executioncontrolprotocol/lifecycle-spy", "echo")
|
|
26
|
+
.withInput(z.object({ value: z.unknown().optional() }))
|
|
27
|
+
.withOutput(z.object({ echo: z.unknown() }))
|
|
28
|
+
.withHandler(async (input) => {
|
|
29
|
+
capabilityInvokeCount++;
|
|
30
|
+
return { echo: input.value ?? "hi" };
|
|
31
|
+
}),
|
|
32
|
+
capabilityFor("@executioncontrolprotocol/lifecycle-spy", "throw")
|
|
33
|
+
.withInput(z.object({}))
|
|
34
|
+
.withOutput(z.object({}))
|
|
35
|
+
.withHandler(async () => {
|
|
36
|
+
capabilityInvokeCount++;
|
|
37
|
+
throw new Error("capability failed");
|
|
38
|
+
}),
|
|
39
|
+
capabilityFor("@executioncontrolprotocol/lifecycle-spy", "merge-state")
|
|
40
|
+
.withInput(z.object({ target: z.unknown() }))
|
|
41
|
+
.withOutput(z.object({ ok: z.boolean() }))
|
|
42
|
+
.withHandler(async (input, ctx) => {
|
|
43
|
+
capabilityInvokeCount++;
|
|
44
|
+
const handle = input
|
|
45
|
+
.target;
|
|
46
|
+
await ctx.store.merge(handle, { merged: true });
|
|
47
|
+
return { ok: true };
|
|
48
|
+
}),
|
|
49
|
+
])
|
|
50
|
+
.withHooks([
|
|
51
|
+
spyHook("step:before"),
|
|
52
|
+
spyHook("step:started"),
|
|
53
|
+
spyHook("step:completed"),
|
|
54
|
+
spyHook("step:failed"),
|
|
55
|
+
spyHook("step:finally"),
|
|
56
|
+
])
|
|
57
|
+
.build();
|
|
58
|
+
catalogExtension(lifecycleSpyExtension);
|
|
59
|
+
/** Register lifecycle spy extension on global registry. */
|
|
60
|
+
export async function registerLifecycleSpyExtension() {
|
|
61
|
+
if (!globalRegistry.getExtension("@executioncontrolprotocol/lifecycle-spy")) {
|
|
62
|
+
await globalRegistry.registerExtension(lifecycleSpyExtension);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=test-lifecycle-extension.js.map
|
|
@@ -0,0 +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;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE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AC,KAAK,IAAI,EAAE;QACtB,qBAAqB,EAAE,CAAA;QACvB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;IACtC,CAAC,CAAC;IACJ,aAAa,CAAC,yCAAyC,EAAE,aAAa,CAAC;SACpE,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;SAC5C,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;SACzC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QAChC,qBAAqB,EAAE,CAAA;QACvB,MAAM,MAAM,GAAI,KAAyG;aACtH,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,gBAAgB,CAAC,qBAAqB,CAAC,CAAA;AAEvC,2DAA2D;AAC3D,MAAM,CAAC,KAAK,UAAU,6BAA6B;IACjD,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,yCAAyC,CAAC,EAAE,CAAC;QAC5E,MAAM,cAAc,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,CAAA;IAC/D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Deterministic model generate handler for framework unit tests. @category Testing */
|
|
2
|
+
export interface TestModelGenerateInput {
|
|
3
|
+
/** User prompt text. */
|
|
4
|
+
prompt?: string;
|
|
5
|
+
/** Optional system prompt. */
|
|
6
|
+
system?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Deterministic generate handler for `@executioncontrolprotocol/test.generate`.
|
|
10
|
+
* @category Testing
|
|
11
|
+
*/
|
|
12
|
+
export declare function testModelGenerateHandler(input: TestModelGenerateInput): {
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=test-model-generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-model-generate.d.ts","sourceRoot":"","sources":["../../src/testing/test-model-generate.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAEvF,MAAM,WAAW,sBAAsB;IACrC,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAoCD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,sBAAsB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CA8BxF"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** Deterministic model generate handler for framework unit tests. @category Testing */
|
|
2
|
+
function testIntentResponse(prompt) {
|
|
3
|
+
const lower = prompt.toLowerCase();
|
|
4
|
+
let intent = "general";
|
|
5
|
+
if (/create.*workflow|new workflow|sends.*email|build a workflow/.test(lower)) {
|
|
6
|
+
intent = "workflow-create";
|
|
7
|
+
}
|
|
8
|
+
else if (/update|patch|change.*step|modify.*workflow|failed on|help me fix/.test(lower)) {
|
|
9
|
+
intent = "workflow-patch";
|
|
10
|
+
}
|
|
11
|
+
else if (/what is ecp|how does|how do|execution control protocol/.test(lower)) {
|
|
12
|
+
intent = "faq";
|
|
13
|
+
}
|
|
14
|
+
return `INTENT ${intent}`;
|
|
15
|
+
}
|
|
16
|
+
function testAssistantResponse(prompt) {
|
|
17
|
+
const msgMatch = prompt.match(/User message:\s*(.+?)(?:\n|$)/i);
|
|
18
|
+
const message = (msgMatch?.[1] ?? prompt).toLowerCase();
|
|
19
|
+
if (/what is ecp|execution control protocol/.test(message)) {
|
|
20
|
+
return 'REPLY\n ANSWER "ECP is the Execution Control Protocol: portable workflows run in governed environments that bind tools, models, policies, and runtimes."';
|
|
21
|
+
}
|
|
22
|
+
if (/what can you do|what are you good at/.test(message)) {
|
|
23
|
+
return 'REPLY\n ANSWER "I build and patch ECP workflows, answer ECP questions, and explain capabilities registered in this environment. I cannot install extensions."';
|
|
24
|
+
}
|
|
25
|
+
if (/register|install.*extension/.test(message)) {
|
|
26
|
+
return 'REPLY\n ANSWER "I cannot register or install extensions. I can list loaded capabilities and help you build workflows with them."';
|
|
27
|
+
}
|
|
28
|
+
if (/capabilit|extensions?|plugins?/.test(message)) {
|
|
29
|
+
return 'REPLY\n ANSWER "Loaded capabilities include @executioncontrolprotocol/test.echo and @executioncontrolprotocol/test.summarize, @executioncontrolprotocol/test.validate, @executioncontrolprotocol/test.notify, @executioncontrolprotocol/test.translate."\n CITATION extension @executioncontrolprotocol/test "@executioncontrolprotocol/test.echo"';
|
|
30
|
+
}
|
|
31
|
+
if (/error|fail|fix/.test(message)) {
|
|
32
|
+
return 'REPLY\n ANSWER "The echo step failed with an error; patch the echo step input to recover."\n CITATION step echo "Failed echo step in run context."';
|
|
33
|
+
}
|
|
34
|
+
return 'REPLY\n ANSWER "I am the ECP assistant. Ask about workflows, ECP, or available capabilities."';
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Deterministic generate handler for `@executioncontrolprotocol/test.generate`.
|
|
38
|
+
* @category Testing
|
|
39
|
+
*/
|
|
40
|
+
export function testModelGenerateHandler(input) {
|
|
41
|
+
const prompt = input.prompt ?? "";
|
|
42
|
+
const system = input.system ?? "";
|
|
43
|
+
if (/intent router/i.test(system)) {
|
|
44
|
+
return { text: testIntentResponse(prompt) };
|
|
45
|
+
}
|
|
46
|
+
if (/ECP assistant|harness\.reply|REPLY block/i.test(system)) {
|
|
47
|
+
return { text: testAssistantResponse(prompt) };
|
|
48
|
+
}
|
|
49
|
+
if (prompt.includes("User message:")) {
|
|
50
|
+
return { text: testIntentResponse(prompt) };
|
|
51
|
+
}
|
|
52
|
+
if (prompt.includes("@executioncontrolprotocol.patch") || /PATCH\s+WORKFLOW/i.test(prompt)) {
|
|
53
|
+
return {
|
|
54
|
+
text: [
|
|
55
|
+
"PATCH WORKFLOW echo-test",
|
|
56
|
+
"UPDATE STEP echo",
|
|
57
|
+
' WITH value = "patched"',
|
|
58
|
+
].join("\n"),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
text: [
|
|
63
|
+
'WORKFLOW demo-generated "Demo generated"',
|
|
64
|
+
"STEP echo USES @executioncontrolprotocol/test.echo",
|
|
65
|
+
' LABEL "Demo Echo"',
|
|
66
|
+
' WITH value = "hello"',
|
|
67
|
+
" AS echo",
|
|
68
|
+
].join("\n"),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=test-model-generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-model-generate.js","sourceRoot":"","sources":["../../src/testing/test-model-generate.ts"],"names":[],"mappings":"AAAA,uFAAuF;AASvF,SAAS,kBAAkB,CAAC,MAAc;IACxC,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,EAAE,CAAA;IAClC,IAAI,MAAM,GAAG,SAAS,CAAA;IACtB,IAAI,6DAA6D,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9E,MAAM,GAAG,iBAAiB,CAAA;IAC5B,CAAC;SAAM,IAAI,kEAAkE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1F,MAAM,GAAG,gBAAgB,CAAA;IAC3B,CAAC;SAAM,IAAI,wDAAwD,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QA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AE,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAA;IAChD,CAAC;IACD,IAAI,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QACrC,OAAO,EAAE,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,IAAI,MAAM,CAAC,QAAQ,CAAC,iCAAiC,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3F,OAAO;YACL,IAAI,EAAE;gBACJ,0BAA0B;gBAC1B,kBAAkB;gBAClB,0BAA0B;aAC3B,CAAC,IAAI,CAAC,IAAI,CAAC;SACb,CAAA;IACH,CAAC;IACD,OAAO;QACL,IAAI,EAAE;YACJ,0CAA0C;YAC1C,oDAAoD;YACpD,qBAAqB;YACrB,wBAAwB;YACxB,WAAW;SACZ,CAAC,IAAI,CAAC,IAAI,CAAC;KACb,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read a value at a lodash-style or dotted path.
|
|
3
|
+
* @category Common
|
|
4
|
+
*/
|
|
5
|
+
export declare function getAtPath(obj: unknown, path: string): unknown;
|
|
6
|
+
/**
|
|
7
|
+
* Write a value at a lodash-style or dotted path, creating intermediate objects/arrays as needed.
|
|
8
|
+
* @category Common
|
|
9
|
+
*/
|
|
10
|
+
export declare function setAtPath(obj: unknown, path: string, value: unknown): void;
|
|
11
|
+
/**
|
|
12
|
+
* Deep-merge plain objects (arrays and primitives from `source` replace `target`).
|
|
13
|
+
* @category Common
|
|
14
|
+
*/
|
|
15
|
+
export declare function deepMerge<T extends object>(target: T, source: object): T;
|
|
16
|
+
//# sourceMappingURL=path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/util/path.ts"],"names":[],"mappings":"AAsCA;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAc7D;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAkC1E;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,CAkBxE"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a lodash-style path (`steps[0].label`, `workflow.version`) into segments.
|
|
3
|
+
* @category Common
|
|
4
|
+
*/
|
|
5
|
+
function parsePath(path) {
|
|
6
|
+
const segments = [];
|
|
7
|
+
let i = 0;
|
|
8
|
+
while (i < path.length) {
|
|
9
|
+
if (path[i] === ".") {
|
|
10
|
+
i++;
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
if (path[i] === "[") {
|
|
14
|
+
const end = path.indexOf("]", i);
|
|
15
|
+
if (end === -1) {
|
|
16
|
+
throw new Error(`Invalid path: ${path}`);
|
|
17
|
+
}
|
|
18
|
+
const index = Number(path.slice(i + 1, end));
|
|
19
|
+
if (!Number.isInteger(index)) {
|
|
20
|
+
throw new Error(`Invalid path index: ${path}`);
|
|
21
|
+
}
|
|
22
|
+
segments.push(index);
|
|
23
|
+
i = end + 1;
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
let j = i;
|
|
27
|
+
while (j < path.length && path[j] !== "." && path[j] !== "[") {
|
|
28
|
+
j++;
|
|
29
|
+
}
|
|
30
|
+
segments.push(path.slice(i, j));
|
|
31
|
+
i = j;
|
|
32
|
+
}
|
|
33
|
+
return segments;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Read a value at a lodash-style or dotted path.
|
|
37
|
+
* @category Common
|
|
38
|
+
*/
|
|
39
|
+
export function getAtPath(obj, path) {
|
|
40
|
+
const segments = parsePath(path);
|
|
41
|
+
let cur = obj;
|
|
42
|
+
for (const seg of segments) {
|
|
43
|
+
if (cur === null || cur === undefined) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
if (typeof seg === "number") {
|
|
47
|
+
cur = Array.isArray(cur) ? cur[seg] : undefined;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
cur = typeof cur === "object" ? cur[seg] : undefined;
|
|
51
|
+
}
|
|
52
|
+
return cur;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Write a value at a lodash-style or dotted path, creating intermediate objects/arrays as needed.
|
|
56
|
+
* @category Common
|
|
57
|
+
*/
|
|
58
|
+
export function setAtPath(obj, path, value) {
|
|
59
|
+
const segments = parsePath(path);
|
|
60
|
+
if (segments.length === 0) {
|
|
61
|
+
throw new Error("Empty path");
|
|
62
|
+
}
|
|
63
|
+
let cur = obj;
|
|
64
|
+
for (let i = 0; i < segments.length - 1; i++) {
|
|
65
|
+
const seg = segments[i];
|
|
66
|
+
const nextSeg = segments[i + 1];
|
|
67
|
+
if (typeof seg === "number") {
|
|
68
|
+
if (!Array.isArray(cur)) {
|
|
69
|
+
throw new Error(`Cannot index non-array at path: ${path}`);
|
|
70
|
+
}
|
|
71
|
+
if (cur[seg] === undefined || cur[seg] === null) {
|
|
72
|
+
cur[seg] = typeof nextSeg === "number" ? [] : {};
|
|
73
|
+
}
|
|
74
|
+
cur = cur[seg];
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const record = cur;
|
|
78
|
+
if (!(seg in record) || record[seg] === null || typeof record[seg] !== "object") {
|
|
79
|
+
record[seg] = typeof nextSeg === "number" ? [] : {};
|
|
80
|
+
}
|
|
81
|
+
cur = record[seg];
|
|
82
|
+
}
|
|
83
|
+
const last = segments[segments.length - 1];
|
|
84
|
+
if (typeof last === "number") {
|
|
85
|
+
if (!Array.isArray(cur)) {
|
|
86
|
+
throw new Error(`Cannot index non-array at path: ${path}`);
|
|
87
|
+
}
|
|
88
|
+
cur[last] = value;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
;
|
|
92
|
+
cur[last] = value;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Deep-merge plain objects (arrays and primitives from `source` replace `target`).
|
|
96
|
+
* @category Common
|
|
97
|
+
*/
|
|
98
|
+
export function deepMerge(target, source) {
|
|
99
|
+
const result = structuredClone(target);
|
|
100
|
+
for (const [key, value] of Object.entries(source)) {
|
|
101
|
+
const existing = result[key];
|
|
102
|
+
if (value !== null &&
|
|
103
|
+
typeof value === "object" &&
|
|
104
|
+
!Array.isArray(value) &&
|
|
105
|
+
existing !== null &&
|
|
106
|
+
typeof existing === "object" &&
|
|
107
|
+
!Array.isArray(existing)) {
|
|
108
|
+
result[key] = deepMerge(existing, value);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
result[key] = structuredClone(value);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/util/path.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,QAAQ,GAAkB,EAAE,CAAA;IAClC,IAAI,CAAC,GAAG,CAAC,CAAA;IACT,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACvB,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;YACpB,CAAC,EAAE,CAAA;YACH,SAAQ;QACV,CAAC;QACD,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;YACpB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;YAChC,IAAI,GAAG,KAAK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YACrB,QAAQ,KAAK,IAAI;YACjB,OAAO,QAAQ,KAAK,QAAQ;YAC5B,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EACxB,CAAC;YACD,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAkB,EAAE,KAAe,CAAC,CAAA;QAC9D,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAA;QACtC,CAAC;IACH,CAAC;IACD,OAAO,MAAW,CAAA;AACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slug.d.ts","sourceRoot":"","sources":["../../src/util/slug.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAM7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slug.js","sourceRoot":"","sources":["../../src/util/slug.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,OAAO,KAAK;SACT,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,UAAU,CAAA;AAC/B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EnvironmentDescriptor, ValidationResult, WorkflowManifest } from "@executioncontrolprotocol/types";
|
|
2
|
+
import type { ResolvedBindings } from "../environment/bindings.js";
|
|
3
|
+
/** Validate workflow against a live environment. */
|
|
4
|
+
export declare function validateEnvironmentWithWorkflow(workflow: WorkflowManifest, descriptor: EnvironmentDescriptor, bindings: ResolvedBindings): ValidationResult;
|
|
5
|
+
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/validate/environment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAGhH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAElE,oDAAoD;AACpD,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,qBAAqB,EACjC,QAAQ,EAAE,gBAAgB,GACzB,gBAAgB,CA0BlB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LATEST_ECP_VERSION } from "@executioncontrolprotocol/types";
|
|
2
|
+
import { globalRegistry } from "../registry/registry.js";
|
|
3
|
+
import { validateWorkflow } from "./workflow.js";
|
|
4
|
+
/** Validate workflow against a live environment. */
|
|
5
|
+
export function validateEnvironmentWithWorkflow(workflow, descriptor, bindings) {
|
|
6
|
+
const result = validateWorkflow(workflow, descriptor);
|
|
7
|
+
const rtId = String(bindings.runtime.id);
|
|
8
|
+
for (const ext of bindings.extensions) {
|
|
9
|
+
const def = globalRegistry.getExtension(String(ext.id));
|
|
10
|
+
const supported = def?.supportedRuntimes;
|
|
11
|
+
if (supported?.length && !supported.includes(rtId)) {
|
|
12
|
+
result.valid = false;
|
|
13
|
+
result.errors.push({
|
|
14
|
+
code: "UNSUPPORTED_RUNTIME_EXTENSION",
|
|
15
|
+
message: `Extension ${ext.id} does not support runtime ${rtId}. Supported: ${supported.join(", ")}`,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
if (rtId === "@executioncontrolprotocol/local") {
|
|
20
|
+
result.valid = false;
|
|
21
|
+
result.errors.push({
|
|
22
|
+
code: "DEPRECATED_RUNTIME",
|
|
23
|
+
message: "Runtime @executioncontrolprotocol/local was replaced by @executioncontrolprotocol/node.",
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
result.schema = "@executioncontrolprotocol.validation.result";
|
|
27
|
+
result.version = LATEST_ECP_VERSION;
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/validate/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAGhD,oDAAoD;AACpD,MAAM,UAAU,+BAA+B,CAC7C,QAA0B,EAC1B,UAAiC,EACjC,QAA0B;IAE1B,MAAM,MAAM,GAAG,gBAAgB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;IACrD,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAExC,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,cAAc,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;QACvD,MAAM,SAAS,GAAG,GAAG,EAAE,iBAAiB,CAAA;QACxC,IAAI,SAAS,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAkC,CAAC,EAAE,CAAC;YACjF,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;YACpB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;gBACjB,IAAI,EAAE,+BAA+B;gBACrC,OAAO,EAAE,aAAa,GAAG,CAAC,EAAE,6BAA6B,IAAI,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;aACpG,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAED,IAAI,IAAI,KAAK,iCAAiC,EAAE,CAAC;QAC/C,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;QACpB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;YACjB,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,yFAAyF;SACnG,CAAC,CAAA;IACJ,CAAC;IACD,MAAM,CAAC,MAAM,GAAG,6CAA6C,CAAA;IAC7D,MAAM,CAAC,OAAO,GAAG,kBAAkB,CAAA;IACnC,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ECP_CORE_FORMATTER_IDS, type ValidationResult } from "@executioncontrolprotocol/types";
|
|
2
|
+
import type { Registry } from "../registry/registry.js";
|
|
3
|
+
import type { ResolvedBindings } from "../environment/bindings.js";
|
|
4
|
+
/**
|
|
5
|
+
* Validate harness bindings against registry and environment extensions.
|
|
6
|
+
* @category Harness
|
|
7
|
+
*/
|
|
8
|
+
export declare function validateHarnessBindings(registry: Registry, bindings: ResolvedBindings): ValidationResult;
|
|
9
|
+
/** Known core formatter ids for tests. @internal */
|
|
10
|
+
export { ECP_CORE_FORMATTER_IDS };
|
|
11
|
+
//# sourceMappingURL=harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../../src/validate/harness.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAKtB,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAalE;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,gBAAgB,GACzB,gBAAgB,CA6GlB;AAED,oDAAoD;AACpD,OAAO,EAAE,sBAAsB,EAAE,CAAA"}
|