@executioncontrolprotocol/core 0.13.2 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -36
- package/dist/bindings/extension.d.ts +15 -1
- package/dist/bindings/extension.d.ts.map +1 -1
- package/dist/bindings/extension.js +23 -0
- package/dist/bindings/extension.js.map +1 -1
- package/dist/bindings/policy.d.ts +15 -1
- package/dist/bindings/policy.d.ts.map +1 -1
- package/dist/bindings/policy.js +23 -0
- package/dist/bindings/policy.js.map +1 -1
- package/dist/bindings/step.d.ts +3 -3
- package/dist/bindings/step.d.ts.map +1 -1
- package/dist/compile/extract-workflow-module.d.ts +18 -2
- package/dist/compile/extract-workflow-module.d.ts.map +1 -1
- package/dist/compile/extract-workflow-module.js +39 -10
- package/dist/compile/extract-workflow-module.js.map +1 -1
- package/dist/compile/index.d.ts +4 -13
- package/dist/compile/index.d.ts.map +1 -1
- package/dist/compile/index.js +1 -48
- package/dist/compile/index.js.map +1 -1
- package/dist/compile/types.d.ts +1 -1
- package/dist/compile/types.d.ts.map +1 -1
- package/dist/definitions/capability.d.ts +3 -2
- package/dist/definitions/capability.d.ts.map +1 -1
- package/dist/definitions/capability.js +4 -3
- package/dist/definitions/capability.js.map +1 -1
- package/dist/definitions/environment.d.ts +38 -0
- package/dist/definitions/environment.d.ts.map +1 -0
- package/dist/definitions/environment.js +77 -0
- package/dist/definitions/environment.js.map +1 -0
- package/dist/definitions/extension.d.ts +16 -4
- package/dist/definitions/extension.d.ts.map +1 -1
- package/dist/definitions/extension.js +27 -6
- package/dist/definitions/extension.js.map +1 -1
- package/dist/definitions/hook.d.ts +1 -1
- package/dist/definitions/hook.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +2 -2
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/index.js +1 -1
- package/dist/definitions/index.js.map +1 -1
- package/dist/definitions/policy.d.ts +8 -0
- package/dist/definitions/policy.d.ts.map +1 -1
- package/dist/definitions/policy.js +16 -0
- package/dist/definitions/policy.js.map +1 -1
- package/dist/definitions/types.d.ts +23 -5
- package/dist/definitions/types.d.ts.map +1 -1
- package/dist/encoding/contracts.js +1 -1
- package/dist/encoding/contracts.js.map +1 -1
- package/dist/encoding/decode-builder.d.ts +1 -1
- package/dist/encoding/decode-builder.d.ts.map +1 -1
- package/dist/encoding/decode-builder.js +1 -9
- package/dist/encoding/decode-builder.js.map +1 -1
- package/dist/encoding/encode-builder.d.ts +1 -1
- package/dist/encoding/encode-builder.d.ts.map +1 -1
- package/dist/encoding/encode-builder.js +1 -1
- package/dist/encoding/encode-builder.js.map +1 -1
- package/dist/encoding/errors.d.ts +2 -2
- package/dist/encoding/errors.d.ts.map +1 -1
- package/dist/encoding/invoke-utility.d.ts +1 -1
- package/dist/encoding/invoke-utility.d.ts.map +1 -1
- package/dist/encoding/invoke-utility.js +1 -1
- package/dist/encoding/invoke-utility.js.map +1 -1
- package/dist/encoding/json-codec.d.ts +1 -1
- package/dist/encoding/json-codec.d.ts.map +1 -1
- package/dist/encoding/json-codec.js +1 -1
- package/dist/encoding/json-codec.js.map +1 -1
- package/dist/encoding/normalize-workflow.d.ts +1 -1
- package/dist/encoding/normalize-workflow.d.ts.map +1 -1
- package/dist/encoding/resolve.js +1 -1
- package/dist/encoding/resolve.js.map +1 -1
- package/dist/encoding/schemas.d.ts +20 -20
- package/dist/encoding/schemas.js +1 -1
- package/dist/encoding/schemas.js.map +1 -1
- package/dist/environment/bindings.d.ts +4 -14
- package/dist/environment/bindings.d.ts.map +1 -1
- package/dist/environment/bindings.js +2 -7
- package/dist/environment/bindings.js.map +1 -1
- package/dist/environment/config-resolver.d.ts +1 -3
- package/dist/environment/config-resolver.d.ts.map +1 -1
- package/dist/environment/config-resolver.js +13 -19
- package/dist/environment/config-resolver.js.map +1 -1
- package/dist/environment/describe.d.ts +1 -1
- package/dist/environment/describe.d.ts.map +1 -1
- package/dist/environment/describe.js +35 -24
- package/dist/environment/describe.js.map +1 -1
- package/dist/environment/ecp.d.ts +2 -12
- package/dist/environment/ecp.d.ts.map +1 -1
- package/dist/environment/ecp.js +1 -8
- package/dist/environment/ecp.js.map +1 -1
- package/dist/environment/environment.d.ts +71 -48
- package/dist/environment/environment.d.ts.map +1 -1
- package/dist/environment/environment.js +165 -159
- package/dist/environment/environment.js.map +1 -1
- package/dist/environment/search.d.ts +1 -1
- package/dist/environment/search.d.ts.map +1 -1
- package/dist/environment/search.js +10 -7
- package/dist/environment/search.js.map +1 -1
- package/dist/environment/validate-binding-config.d.ts +12 -0
- package/dist/environment/validate-binding-config.d.ts.map +1 -0
- package/dist/environment/validate-binding-config.js +43 -0
- package/dist/environment/validate-binding-config.js.map +1 -0
- package/dist/file/file-ref.d.ts +1 -1
- package/dist/file/file-ref.d.ts.map +1 -1
- package/dist/file/file-ref.js +1 -1
- package/dist/file/file-ref.js.map +1 -1
- package/dist/fluent/encode-fluent.d.ts +1 -1
- package/dist/fluent/encode-fluent.d.ts.map +1 -1
- package/dist/fluent/encode-fluent.js +1 -1
- package/dist/fluent/encode-fluent.js.map +1 -1
- package/dist/fluent/render-expr.d.ts +1 -1
- package/dist/fluent/render-expr.d.ts.map +1 -1
- package/dist/fluent/render-node.d.ts +1 -1
- package/dist/fluent/render-node.d.ts.map +1 -1
- package/dist/fluent/render-value.d.ts +1 -2
- package/dist/fluent/render-value.d.ts.map +1 -1
- package/dist/fluent/render-value.js +0 -5
- package/dist/fluent/render-value.js.map +1 -1
- package/dist/fluent/render-workflow.d.ts +1 -1
- package/dist/fluent/render-workflow.d.ts.map +1 -1
- package/dist/fluent/render-workflow.js +0 -2
- package/dist/fluent/render-workflow.js.map +1 -1
- package/dist/formats/format-fluent.d.ts.map +1 -1
- package/dist/formats/format-fluent.js +10 -7
- package/dist/formats/format-fluent.js.map +1 -1
- package/dist/formats/format-json.d.ts.map +1 -1
- package/dist/formats/format-json.js +22 -26
- package/dist/formats/format-json.js.map +1 -1
- package/dist/formats/register-core-formats.d.ts +2 -1
- package/dist/formats/register-core-formats.d.ts.map +1 -1
- package/dist/formats/register-core-formats.js +2 -4
- package/dist/formats/register-core-formats.js.map +1 -1
- package/dist/helpers/env.d.ts +1 -1
- package/dist/helpers/env.d.ts.map +1 -1
- package/dist/helpers/expr.d.ts +1 -1
- package/dist/helpers/expr.d.ts.map +1 -1
- package/dist/{harness/authoring/to-provider-chat-turns.d.ts → helpers/provider-chat-turns.d.ts} +7 -7
- package/dist/helpers/provider-chat-turns.d.ts.map +1 -0
- package/dist/{harness/authoring/to-provider-chat-turns.js → helpers/provider-chat-turns.js} +4 -4
- package/dist/helpers/provider-chat-turns.js.map +1 -0
- package/dist/helpers/ref.d.ts +1 -1
- package/dist/helpers/ref.d.ts.map +1 -1
- package/dist/helpers/secrets.d.ts +1 -1
- package/dist/helpers/secrets.d.ts.map +1 -1
- package/dist/helpers/state.d.ts +1 -1
- package/dist/helpers/state.d.ts.map +1 -1
- package/dist/index.d.ts +20 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -19
- package/dist/index.js.map +1 -1
- package/dist/invoke/execute-invoke.d.ts +2 -2
- package/dist/invoke/execute-invoke.d.ts.map +1 -1
- package/dist/invoke/execute-invoke.js +5 -19
- package/dist/invoke/execute-invoke.js.map +1 -1
- package/dist/invoke/invoke-builder.d.ts +1 -3
- package/dist/invoke/invoke-builder.d.ts.map +1 -1
- package/dist/invoke/invoke-builder.js +1 -6
- package/dist/invoke/invoke-builder.js.map +1 -1
- package/dist/media/index.d.ts +2 -6
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +1 -5
- package/dist/media/index.js.map +1 -1
- package/dist/media/resolve-file.d.ts +11 -1
- package/dist/media/resolve-file.d.ts.map +1 -1
- package/dist/media/resolve-file.js +24 -10
- package/dist/media/resolve-file.js.map +1 -1
- package/dist/media/write-media.d.ts +14 -5
- package/dist/media/write-media.d.ts.map +1 -1
- package/dist/media/write-media.js +91 -25
- package/dist/media/write-media.js.map +1 -1
- package/dist/patch/apply-patch.d.ts +2 -2
- package/dist/patch/apply-patch.d.ts.map +1 -1
- package/dist/patch/apply-patch.js +1 -1
- package/dist/patch/apply-patch.js.map +1 -1
- package/dist/patch/normalize-input.d.ts +1 -1
- package/dist/patch/normalize-input.d.ts.map +1 -1
- package/dist/patch/normalize-input.js +1 -1
- package/dist/patch/normalize-input.js.map +1 -1
- package/dist/patch/patch-builder.d.ts +1 -1
- package/dist/patch/patch-builder.d.ts.map +1 -1
- package/dist/patch/patch-builder.js.map +1 -1
- package/dist/patch/patch-document.d.ts +2 -2
- package/dist/patch/resolve-path.d.ts +2 -2
- package/dist/patch/resolve-path.d.ts.map +1 -1
- package/dist/patch/resolve-path.js +1 -1
- package/dist/patch/resolve-path.js.map +1 -1
- package/dist/patch/step-index.d.ts +1 -1
- package/dist/patch/step-index.d.ts.map +1 -1
- package/dist/policies/registry-control.d.ts +20 -0
- package/dist/policies/registry-control.d.ts.map +1 -0
- package/dist/policies/registry-control.js +72 -0
- package/dist/policies/registry-control.js.map +1 -0
- package/dist/registry/ensure-bound-extensions.d.ts +1 -1
- package/dist/registry/ensure-bound-extensions.js +2 -2
- package/dist/registry/ensure-bound-extensions.js.map +1 -1
- package/dist/registry/errors.d.ts +1 -1
- package/dist/registry/errors.d.ts.map +1 -1
- package/dist/registry/errors.js +2 -1
- package/dist/registry/errors.js.map +1 -1
- package/dist/registry/extension-catalog.d.ts +3 -18
- package/dist/registry/extension-catalog.d.ts.map +1 -1
- package/dist/registry/extension-catalog.js +3 -25
- package/dist/registry/extension-catalog.js.map +1 -1
- package/dist/registry/registry.d.ts +8 -9
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +9 -10
- package/dist/registry/registry.js.map +1 -1
- package/dist/runtime/capability-execution.d.ts +9 -8
- package/dist/runtime/capability-execution.d.ts.map +1 -1
- package/dist/runtime/capability-execution.js +11 -11
- package/dist/runtime/capability-execution.js.map +1 -1
- package/dist/runtime/commit.d.ts +2 -2
- package/dist/runtime/commit.d.ts.map +1 -1
- package/dist/runtime/context.d.ts +18 -4
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/dispatch-capability.d.ts +1 -1
- package/dist/runtime/dispatch-capability.d.ts.map +1 -1
- package/dist/runtime/dispatch-capability.js +3 -3
- package/dist/runtime/dispatch-capability.js.map +1 -1
- package/dist/runtime/executor.d.ts +11 -5
- package/dist/runtime/executor.d.ts.map +1 -1
- package/dist/runtime/in-memory-executor.d.ts +1 -1
- package/dist/runtime/in-memory-executor.d.ts.map +1 -1
- package/dist/runtime/in-memory-executor.js +144 -27
- package/dist/runtime/in-memory-executor.js.map +1 -1
- package/dist/runtime/lifecycle.d.ts +1 -1
- package/dist/runtime/lifecycle.d.ts.map +1 -1
- package/dist/runtime/mutation-records.d.ts +1 -1
- package/dist/runtime/mutation-records.d.ts.map +1 -1
- package/dist/runtime/policy-engine.d.ts +3 -2
- package/dist/runtime/policy-engine.d.ts.map +1 -1
- package/dist/runtime/policy-engine.js +12 -3
- package/dist/runtime/policy-engine.js.map +1 -1
- package/dist/runtime/remote-invoke.d.ts +15 -2
- package/dist/runtime/remote-invoke.d.ts.map +1 -1
- package/dist/runtime/remote-invoke.js +34 -2
- package/dist/runtime/remote-invoke.js.map +1 -1
- package/dist/runtime/resolve-input.d.ts +1 -1
- package/dist/runtime/resolve-input.d.ts.map +1 -1
- package/dist/runtime/resolve-input.js +6 -0
- package/dist/runtime/resolve-input.js.map +1 -1
- package/dist/runtime/runtime-ids.d.ts +4 -4
- package/dist/runtime/runtime-ids.d.ts.map +1 -1
- package/dist/runtime/runtime-ids.js +4 -4
- package/dist/runtime/runtime-ids.js.map +1 -1
- package/dist/runtime/step-order.d.ts +32 -0
- package/dist/runtime/step-order.d.ts.map +1 -0
- package/dist/runtime/step-order.js +85 -0
- package/dist/runtime/step-order.js.map +1 -0
- package/dist/runtime/store.d.ts +1 -1
- package/dist/runtime/store.d.ts.map +1 -1
- package/dist/schema/json-schema.js +1 -1
- package/dist/schema/json-schema.js.map +1 -1
- package/dist/schema/workflow-io.d.ts +1 -1
- package/dist/schema/workflow-io.d.ts.map +1 -1
- package/dist/schemas/decode.result.json +155 -0
- package/dist/schemas/encode.result.json +162 -0
- package/dist/schemas/environment.describe.json +362 -0
- package/dist/schemas/environment.manifest.json +159 -0
- package/dist/schemas/environment.search.json +72 -0
- package/dist/schemas/patch.json +104 -0
- package/dist/schemas/patch.result.json +260 -0
- package/dist/schemas/requirements.json +102 -0
- package/dist/schemas/run.journal.json +142 -0
- package/dist/schemas/run.request.json +491 -0
- package/dist/schemas/run.result.json +230 -0
- package/dist/schemas/validation.result.json +89 -0
- package/dist/schemas/workflow.manifest.json +457 -0
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +2 -2
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/test-extension.d.ts +3 -2
- package/dist/testing/test-extension.d.ts.map +1 -1
- package/dist/testing/test-extension.js +39 -51
- package/dist/testing/test-extension.js.map +1 -1
- package/dist/testing/test-lifecycle-extension.d.ts +5 -4
- package/dist/testing/test-lifecycle-extension.d.ts.map +1 -1
- package/dist/testing/test-lifecycle-extension.js +28 -25
- package/dist/testing/test-lifecycle-extension.js.map +1 -1
- package/dist/types/capabilities.d.ts +39 -0
- package/dist/types/capabilities.d.ts.map +1 -0
- package/dist/types/capabilities.js +2 -0
- package/dist/types/capabilities.js.map +1 -0
- package/dist/types/capability-execution.d.ts +5 -0
- package/dist/types/capability-execution.d.ts.map +1 -0
- package/dist/types/capability-execution.js +3 -0
- package/dist/types/capability-execution.js.map +1 -0
- package/dist/types/capability-metadata.d.ts +216 -0
- package/dist/types/capability-metadata.d.ts.map +1 -0
- package/dist/types/capability-metadata.js +138 -0
- package/dist/types/capability-metadata.js.map +1 -0
- package/dist/types/encoding.d.ts +103 -0
- package/dist/types/encoding.d.ts.map +1 -0
- package/dist/types/encoding.js +29 -0
- package/dist/types/encoding.js.map +1 -0
- package/dist/types/environment.d.ts +155 -0
- package/dist/types/environment.d.ts.map +1 -0
- package/dist/types/environment.js +2 -0
- package/dist/types/environment.js.map +1 -0
- package/dist/types/errors.d.ts +93 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +89 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/file-ref.d.ts +84 -0
- package/dist/types/file-ref.d.ts.map +1 -0
- package/dist/types/file-ref.js +117 -0
- package/dist/types/file-ref.js.map +1 -0
- package/dist/types/image-output.d.ts +32 -0
- package/dist/types/image-output.d.ts.map +1 -0
- package/dist/types/image-output.js +11 -0
- package/dist/types/image-output.js.map +1 -0
- package/dist/types/index.d.ts +36 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +13 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/invoke.d.ts +51 -0
- package/dist/types/invoke.d.ts.map +1 -0
- package/dist/types/invoke.js +32 -0
- package/dist/types/invoke.js.map +1 -0
- package/dist/types/journal.d.ts +113 -0
- package/dist/types/journal.d.ts.map +1 -0
- package/dist/types/journal.js +3 -0
- package/dist/types/journal.js.map +1 -0
- package/dist/types/lifecycle.d.ts +27 -0
- package/dist/types/lifecycle.d.ts.map +1 -0
- package/dist/types/lifecycle.js +2 -0
- package/dist/types/lifecycle.js.map +1 -0
- package/dist/types/model.d.ts +102 -0
- package/dist/types/model.d.ts.map +1 -0
- package/dist/types/model.js +51 -0
- package/dist/types/model.js.map +1 -0
- package/dist/types/patch-errors.d.ts +11 -0
- package/dist/types/patch-errors.d.ts.map +1 -0
- package/dist/types/patch-errors.js +9 -0
- package/dist/types/patch-errors.js.map +1 -0
- package/dist/types/patch.d.ts +51 -0
- package/dist/types/patch.d.ts.map +1 -0
- package/dist/types/patch.js +2 -0
- package/dist/types/patch.js.map +1 -0
- package/dist/types/registry.d.ts +24 -0
- package/dist/types/registry.d.ts.map +1 -0
- package/dist/types/registry.js +2 -0
- package/dist/types/registry.js.map +1 -0
- package/dist/types/requirements.d.ts +42 -0
- package/dist/types/requirements.d.ts.map +1 -0
- package/dist/types/requirements.js +2 -0
- package/dist/types/requirements.js.map +1 -0
- package/dist/types/run-events.d.ts +32 -0
- package/dist/types/run-events.d.ts.map +1 -0
- package/dist/types/run-events.js +8 -0
- package/dist/types/run-events.js.map +1 -0
- package/dist/types/run.d.ts +48 -0
- package/dist/types/run.d.ts.map +1 -0
- package/dist/types/run.js +2 -0
- package/dist/types/run.js.map +1 -0
- package/dist/types/schema.d.ts +58 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +2 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/types/store.d.ts +30 -0
- package/dist/types/store.d.ts.map +1 -0
- package/dist/types/store.js +2 -0
- package/dist/types/store.js.map +1 -0
- package/dist/types/validation.d.ts +20 -0
- package/dist/types/validation.d.ts.map +1 -0
- package/dist/types/validation.js +2 -0
- package/dist/types/validation.js.map +1 -0
- package/dist/types/version.d.ts +5 -0
- package/dist/types/version.d.ts.map +1 -0
- package/dist/types/version.js +3 -0
- package/dist/types/version.js.map +1 -0
- package/dist/types/workflow.d.ts +80 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/types/workflow.js +2 -0
- package/dist/types/workflow.js.map +1 -0
- package/dist/util/semver-range.d.ts +6 -0
- package/dist/util/semver-range.d.ts.map +1 -0
- package/dist/util/semver-range.js +9 -0
- package/dist/util/semver-range.js.map +1 -0
- package/dist/validate/environment.d.ts +5 -2
- package/dist/validate/environment.d.ts.map +1 -1
- package/dist/validate/environment.js +38 -19
- package/dist/validate/environment.js.map +1 -1
- package/dist/validate/workflow-schema.d.ts +17 -31
- package/dist/validate/workflow-schema.d.ts.map +1 -1
- package/dist/validate/workflow-schema.js +1 -10
- package/dist/validate/workflow-schema.js.map +1 -1
- package/dist/validate/workflow.d.ts +1 -1
- package/dist/validate/workflow.d.ts.map +1 -1
- package/dist/validate/workflow.js +2 -11
- package/dist/validate/workflow.js.map +1 -1
- package/dist/validate/zod-mapper.d.ts +1 -1
- package/dist/validate/zod-mapper.d.ts.map +1 -1
- package/dist/workflow/assign-unique-step-ids.d.ts +1 -1
- package/dist/workflow/assign-unique-step-ids.d.ts.map +1 -1
- package/dist/workflow/builder.d.ts +17 -1
- package/dist/workflow/builder.d.ts.map +1 -1
- package/dist/workflow/builder.js +27 -1
- package/dist/workflow/builder.js.map +1 -1
- package/dist/workflow/flow.d.ts +2 -2
- package/dist/workflow/flow.d.ts.map +1 -1
- package/dist/workflow/requirements.d.ts +34 -0
- package/dist/workflow/requirements.d.ts.map +1 -0
- package/dist/workflow/requirements.js +135 -0
- package/dist/workflow/requirements.js.map +1 -0
- package/package.json +13 -86
- package/dist/bindings/harness.d.ts +0 -24
- package/dist/bindings/harness.d.ts.map +0 -1
- package/dist/bindings/harness.js +0 -44
- package/dist/bindings/harness.js.map +0 -1
- package/dist/bindings/runtime.d.ts +0 -19
- package/dist/bindings/runtime.d.ts.map +0 -1
- package/dist/bindings/runtime.js +0 -32
- package/dist/bindings/runtime.js.map +0 -1
- package/dist/browser-runtime-entry.d.ts +0 -61
- package/dist/browser-runtime-entry.d.ts.map +0 -1
- package/dist/browser-runtime-entry.js +0 -54
- package/dist/browser-runtime-entry.js.map +0 -1
- package/dist/browser.d.ts +0 -20
- package/dist/browser.d.ts.map +0 -1
- package/dist/browser.js +0 -20
- package/dist/browser.js.map +0 -1
- package/dist/compile/compile-harness-artifact.d.ts +0 -30
- package/dist/compile/compile-harness-artifact.d.ts.map +0 -1
- package/dist/compile/compile-harness-artifact.js +0 -43
- package/dist/compile/compile-harness-artifact.js.map +0 -1
- package/dist/compile/entry.d.ts +0 -3
- package/dist/compile/entry.d.ts.map +0 -1
- package/dist/compile/entry.js +0 -3
- package/dist/compile/entry.js.map +0 -1
- package/dist/compile/evaluate-browser.d.ts +0 -7
- package/dist/compile/evaluate-browser.d.ts.map +0 -1
- package/dist/compile/evaluate-browser.js +0 -26
- package/dist/compile/evaluate-browser.js.map +0 -1
- package/dist/compile/evaluate-harness-artifact.d.ts +0 -3
- package/dist/compile/evaluate-harness-artifact.d.ts.map +0 -1
- package/dist/compile/evaluate-harness-artifact.js +0 -17
- package/dist/compile/evaluate-harness-artifact.js.map +0 -1
- package/dist/compile/evaluate.d.ts +0 -5
- package/dist/compile/evaluate.d.ts.map +0 -1
- package/dist/compile/evaluate.js +0 -20
- package/dist/compile/evaluate.js.map +0 -1
- package/dist/compile/extract-harness-artifact.d.ts +0 -9
- package/dist/compile/extract-harness-artifact.d.ts.map +0 -1
- package/dist/compile/extract-harness-artifact.js +0 -33
- package/dist/compile/extract-harness-artifact.js.map +0 -1
- package/dist/compile/index.browser.d.ts +0 -49
- package/dist/compile/index.browser.d.ts.map +0 -1
- package/dist/compile/index.browser.js +0 -93
- package/dist/compile/index.browser.js.map +0 -1
- package/dist/compile/prepare-browser-source.d.ts +0 -3
- package/dist/compile/prepare-browser-source.d.ts.map +0 -1
- package/dist/compile/prepare-browser-source.js +0 -25
- package/dist/compile/prepare-browser-source.js.map +0 -1
- package/dist/compile/transpile-browser.d.ts +0 -44
- package/dist/compile/transpile-browser.d.ts.map +0 -1
- package/dist/compile/transpile-browser.js +0 -120
- package/dist/compile/transpile-browser.js.map +0 -1
- package/dist/compile/transpile.d.ts +0 -27
- package/dist/compile/transpile.d.ts.map +0 -1
- package/dist/compile/transpile.js +0 -150
- package/dist/compile/transpile.js.map +0 -1
- package/dist/definitions/runtime.d.ts +0 -22
- package/dist/definitions/runtime.d.ts.map +0 -1
- package/dist/definitions/runtime.js +0 -48
- package/dist/definitions/runtime.js.map +0 -1
- package/dist/encoding/strip-harness-typescript-output.d.ts +0 -7
- package/dist/encoding/strip-harness-typescript-output.d.ts.map +0 -1
- package/dist/encoding/strip-harness-typescript-output.js +0 -40
- package/dist/encoding/strip-harness-typescript-output.js.map +0 -1
- package/dist/encoding/strip-markdown-fences.d.ts +0 -6
- package/dist/encoding/strip-markdown-fences.d.ts.map +0 -1
- package/dist/encoding/strip-markdown-fences.js +0 -23
- package/dist/encoding/strip-markdown-fences.js.map +0 -1
- package/dist/feedback/collect.d.ts +0 -32
- package/dist/feedback/collect.d.ts.map +0 -1
- package/dist/feedback/collect.js +0 -97
- package/dist/feedback/collect.js.map +0 -1
- package/dist/feedback/index.d.ts +0 -2
- package/dist/feedback/index.d.ts.map +0 -1
- package/dist/feedback/index.js +0 -2
- package/dist/feedback/index.js.map +0 -1
- package/dist/harness/authoring/chat-result.d.ts +0 -19
- package/dist/harness/authoring/chat-result.d.ts.map +0 -1
- package/dist/harness/authoring/chat-result.js +0 -56
- package/dist/harness/authoring/chat-result.js.map +0 -1
- package/dist/harness/authoring/classified-intent.d.ts +0 -46
- package/dist/harness/authoring/classified-intent.d.ts.map +0 -1
- package/dist/harness/authoring/classified-intent.js +0 -261
- package/dist/harness/authoring/classified-intent.js.map +0 -1
- package/dist/harness/authoring/context-policy.d.ts +0 -47
- package/dist/harness/authoring/context-policy.d.ts.map +0 -1
- package/dist/harness/authoring/context-policy.js +0 -160
- package/dist/harness/authoring/context-policy.js.map +0 -1
- package/dist/harness/authoring/describe-for-prompt.d.ts +0 -19
- package/dist/harness/authoring/describe-for-prompt.d.ts.map +0 -1
- package/dist/harness/authoring/describe-for-prompt.js +0 -105
- package/dist/harness/authoring/describe-for-prompt.js.map +0 -1
- package/dist/harness/authoring/encode-prompt-text.d.ts +0 -7
- package/dist/harness/authoring/encode-prompt-text.d.ts.map +0 -1
- package/dist/harness/authoring/encode-prompt-text.js +0 -13
- package/dist/harness/authoring/encode-prompt-text.js.map +0 -1
- package/dist/harness/authoring/environment-question.d.ts +0 -6
- package/dist/harness/authoring/environment-question.d.ts.map +0 -1
- package/dist/harness/authoring/environment-question.js +0 -11
- package/dist/harness/authoring/environment-question.js.map +0 -1
- package/dist/harness/authoring/index.d.ts +0 -23
- package/dist/harness/authoring/index.d.ts.map +0 -1
- package/dist/harness/authoring/index.js +0 -22
- package/dist/harness/authoring/index.js.map +0 -1
- package/dist/harness/authoring/normalize-create-eql-output.d.ts +0 -27
- package/dist/harness/authoring/normalize-create-eql-output.d.ts.map +0 -1
- package/dist/harness/authoring/normalize-create-eql-output.js +0 -284
- package/dist/harness/authoring/normalize-create-eql-output.js.map +0 -1
- package/dist/harness/authoring/normalize-intent-eql-output.d.ts +0 -7
- package/dist/harness/authoring/normalize-intent-eql-output.d.ts.map +0 -1
- package/dist/harness/authoring/normalize-intent-eql-output.js +0 -59
- package/dist/harness/authoring/normalize-intent-eql-output.js.map +0 -1
- package/dist/harness/authoring/normalize-patch-eql-output.d.ts +0 -28
- package/dist/harness/authoring/normalize-patch-eql-output.d.ts.map +0 -1
- package/dist/harness/authoring/normalize-patch-eql-output.js +0 -202
- package/dist/harness/authoring/normalize-patch-eql-output.js.map +0 -1
- package/dist/harness/authoring/normalize-workflow-output.d.ts +0 -6
- package/dist/harness/authoring/normalize-workflow-output.d.ts.map +0 -1
- package/dist/harness/authoring/normalize-workflow-output.js +0 -51
- package/dist/harness/authoring/normalize-workflow-output.js.map +0 -1
- package/dist/harness/authoring/patch-clear-intent.d.ts +0 -17
- package/dist/harness/authoring/patch-clear-intent.d.ts.map +0 -1
- package/dist/harness/authoring/patch-clear-intent.js +0 -46
- package/dist/harness/authoring/patch-clear-intent.js.map +0 -1
- package/dist/harness/authoring/presentation.d.ts +0 -57
- package/dist/harness/authoring/presentation.d.ts.map +0 -1
- package/dist/harness/authoring/presentation.js +0 -137
- package/dist/harness/authoring/presentation.js.map +0 -1
- package/dist/harness/authoring/recover-structured-patch.d.ts +0 -21
- package/dist/harness/authoring/recover-structured-patch.d.ts.map +0 -1
- package/dist/harness/authoring/recover-structured-patch.js +0 -230
- package/dist/harness/authoring/recover-structured-patch.js.map +0 -1
- package/dist/harness/authoring/repair-workflow-json.d.ts +0 -16
- package/dist/harness/authoring/repair-workflow-json.d.ts.map +0 -1
- package/dist/harness/authoring/repair-workflow-json.js +0 -183
- package/dist/harness/authoring/repair-workflow-json.js.map +0 -1
- package/dist/harness/authoring/safe-reply.d.ts +0 -71
- package/dist/harness/authoring/safe-reply.d.ts.map +0 -1
- package/dist/harness/authoring/safe-reply.js +0 -291
- package/dist/harness/authoring/safe-reply.js.map +0 -1
- package/dist/harness/authoring/summarize-capability-schema.d.ts +0 -20
- package/dist/harness/authoring/summarize-capability-schema.d.ts.map +0 -1
- package/dist/harness/authoring/summarize-capability-schema.js +0 -141
- package/dist/harness/authoring/summarize-capability-schema.js.map +0 -1
- package/dist/harness/authoring/summarize-environment.d.ts +0 -62
- package/dist/harness/authoring/summarize-environment.d.ts.map +0 -1
- package/dist/harness/authoring/summarize-environment.js +0 -300
- package/dist/harness/authoring/summarize-environment.js.map +0 -1
- package/dist/harness/authoring/summarize-probe-context.d.ts +0 -31
- package/dist/harness/authoring/summarize-probe-context.d.ts.map +0 -1
- package/dist/harness/authoring/summarize-probe-context.js +0 -134
- package/dist/harness/authoring/summarize-probe-context.js.map +0 -1
- package/dist/harness/authoring/summarize-run-context.d.ts +0 -28
- package/dist/harness/authoring/summarize-run-context.d.ts.map +0 -1
- package/dist/harness/authoring/summarize-run-context.js +0 -40
- package/dist/harness/authoring/summarize-run-context.js.map +0 -1
- package/dist/harness/authoring/summarize-workflow.d.ts +0 -37
- package/dist/harness/authoring/summarize-workflow.d.ts.map +0 -1
- package/dist/harness/authoring/summarize-workflow.js +0 -148
- package/dist/harness/authoring/summarize-workflow.js.map +0 -1
- package/dist/harness/authoring/to-provider-chat-turns.d.ts.map +0 -1
- package/dist/harness/authoring/to-provider-chat-turns.js.map +0 -1
- package/dist/harness/call-model.d.ts +0 -15
- package/dist/harness/call-model.d.ts.map +0 -1
- package/dist/harness/call-model.js +0 -59
- package/dist/harness/call-model.js.map +0 -1
- package/dist/harness/context.d.ts +0 -28
- package/dist/harness/context.d.ts.map +0 -1
- package/dist/harness/context.js +0 -19
- package/dist/harness/context.js.map +0 -1
- package/dist/harness/define-harness.d.ts +0 -37
- package/dist/harness/define-harness.d.ts.map +0 -1
- package/dist/harness/define-harness.js +0 -88
- package/dist/harness/define-harness.js.map +0 -1
- package/dist/harness/definitions/test-minimal-harness.d.ts +0 -13
- package/dist/harness/definitions/test-minimal-harness.d.ts.map +0 -1
- package/dist/harness/definitions/test-minimal-harness.js +0 -45
- package/dist/harness/definitions/test-minimal-harness.js.map +0 -1
- package/dist/harness/execute-harness.d.ts +0 -9
- package/dist/harness/execute-harness.d.ts.map +0 -1
- package/dist/harness/execute-harness.js +0 -142
- package/dist/harness/execute-harness.js.map +0 -1
- package/dist/harness/format-resolve.d.ts +0 -26
- package/dist/harness/format-resolve.d.ts.map +0 -1
- package/dist/harness/format-resolve.js +0 -50
- package/dist/harness/format-resolve.js.map +0 -1
- package/dist/harness/harness-catalog.d.ts +0 -41
- package/dist/harness/harness-catalog.d.ts.map +0 -1
- package/dist/harness/harness-catalog.js +0 -66
- package/dist/harness/harness-catalog.js.map +0 -1
- package/dist/harness/index.d.ts +0 -11
- package/dist/harness/index.d.ts.map +0 -1
- package/dist/harness/index.js +0 -9
- package/dist/harness/index.js.map +0 -1
- package/dist/harness/prompts/build-repair-hint.d.ts +0 -8
- package/dist/harness/prompts/build-repair-hint.d.ts.map +0 -1
- package/dist/harness/prompts/build-repair-hint.js +0 -28
- package/dist/harness/prompts/build-repair-hint.js.map +0 -1
- package/dist/harness/prompts/build-system-prompt.d.ts +0 -7
- package/dist/harness/prompts/build-system-prompt.d.ts.map +0 -1
- package/dist/harness/prompts/build-system-prompt.js +0 -97
- package/dist/harness/prompts/build-system-prompt.js.map +0 -1
- package/dist/harness/prompts/eql-primer.d.ts +0 -14
- package/dist/harness/prompts/eql-primer.d.ts.map +0 -1
- package/dist/harness/prompts/eql-primer.js +0 -221
- package/dist/harness/prompts/eql-primer.js.map +0 -1
- package/dist/harness/prompts/fixtures-root.d.ts +0 -5
- package/dist/harness/prompts/fixtures-root.d.ts.map +0 -1
- package/dist/harness/prompts/fixtures-root.js +0 -7
- package/dist/harness/prompts/fixtures-root.js.map +0 -1
- package/dist/harness/prompts/harness-prompt-fixture-schema.d.ts +0 -95
- package/dist/harness/prompts/harness-prompt-fixture-schema.d.ts.map +0 -1
- package/dist/harness/prompts/harness-prompt-fixture-schema.js +0 -28
- package/dist/harness/prompts/harness-prompt-fixture-schema.js.map +0 -1
- package/dist/harness/prompts/identity-primer.d.ts +0 -6
- package/dist/harness/prompts/identity-primer.d.ts.map +0 -1
- package/dist/harness/prompts/identity-primer.js +0 -9
- package/dist/harness/prompts/identity-primer.js.map +0 -1
- package/dist/harness/prompts/index.d.ts +0 -7
- package/dist/harness/prompts/index.d.ts.map +0 -1
- package/dist/harness/prompts/index.js +0 -7
- package/dist/harness/prompts/index.js.map +0 -1
- package/dist/harness/prompts/load-schema-example.browser.d.ts +0 -11
- package/dist/harness/prompts/load-schema-example.browser.d.ts.map +0 -1
- package/dist/harness/prompts/load-schema-example.browser.js +0 -70
- package/dist/harness/prompts/load-schema-example.browser.js.map +0 -1
- package/dist/harness/prompts/load-schema-example.d.ts +0 -11
- package/dist/harness/prompts/load-schema-example.d.ts.map +0 -1
- package/dist/harness/prompts/load-schema-example.js +0 -22
- package/dist/harness/prompts/load-schema-example.js.map +0 -1
- package/dist/harness/prompts/load-schema-example.node.d.ts +0 -7
- package/dist/harness/prompts/load-schema-example.node.d.ts.map +0 -1
- package/dist/harness/prompts/load-schema-example.node.js +0 -38
- package/dist/harness/prompts/load-schema-example.node.js.map +0 -1
- package/dist/harness/prompts/schema-example-files.d.ts +0 -7
- package/dist/harness/prompts/schema-example-files.d.ts.map +0 -1
- package/dist/harness/prompts/schema-example-files.js +0 -12
- package/dist/harness/prompts/schema-example-files.js.map +0 -1
- package/dist/harness/prompts/typescript-primer.d.ts +0 -11
- package/dist/harness/prompts/typescript-primer.d.ts.map +0 -1
- package/dist/harness/prompts/typescript-primer.js +0 -80
- package/dist/harness/prompts/typescript-primer.js.map +0 -1
- package/dist/harness/repair-loop-timing.d.ts +0 -17
- package/dist/harness/repair-loop-timing.d.ts.map +0 -1
- package/dist/harness/repair-loop-timing.js +0 -89
- package/dist/harness/repair-loop-timing.js.map +0 -1
- package/dist/harness/resolve-harness-binding.d.ts +0 -10
- package/dist/harness/resolve-harness-binding.d.ts.map +0 -1
- package/dist/harness/resolve-harness-binding.js +0 -14
- package/dist/harness/resolve-harness-binding.js.map +0 -1
- package/dist/harness/run-model-repair-loop.d.ts +0 -45
- package/dist/harness/run-model-repair-loop.d.ts.map +0 -1
- package/dist/harness/run-model-repair-loop.js +0 -57
- package/dist/harness/run-model-repair-loop.js.map +0 -1
- package/dist/harness/types.d.ts +0 -34
- package/dist/harness/types.d.ts.map +0 -1
- package/dist/harness/types.js +0 -2
- package/dist/harness/types.js.map +0 -1
- package/dist/helpers/browser.d.ts +0 -12
- package/dist/helpers/browser.d.ts.map +0 -1
- package/dist/helpers/browser.js +0 -12
- package/dist/helpers/browser.js.map +0 -1
- package/dist/loaders/files.d.ts +0 -13
- package/dist/loaders/files.d.ts.map +0 -1
- package/dist/loaders/files.js +0 -66
- package/dist/loaders/files.js.map +0 -1
- package/dist/loaders/index.d.ts +0 -2
- package/dist/loaders/index.d.ts.map +0 -1
- package/dist/loaders/index.js +0 -2
- package/dist/loaders/index.js.map +0 -1
- package/dist/loaders/read-media-file.d.ts +0 -6
- package/dist/loaders/read-media-file.d.ts.map +0 -1
- package/dist/loaders/read-media-file.js +0 -10
- package/dist/loaders/read-media-file.js.map +0 -1
- package/dist/node.d.ts +0 -8
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -8
- package/dist/node.js.map +0 -1
- package/dist/runtime/test-session-state.d.ts +0 -23
- package/dist/runtime/test-session-state.d.ts.map +0 -1
- package/dist/runtime/test-session-state.js +0 -62
- package/dist/runtime/test-session-state.js.map +0 -1
- package/dist/test-session/index.d.ts +0 -2
- package/dist/test-session/index.d.ts.map +0 -1
- package/dist/test-session/index.js +0 -2
- package/dist/test-session/index.js.map +0 -1
- package/dist/test-session/test-session.d.ts +0 -36
- package/dist/test-session/test-session.d.ts.map +0 -1
- package/dist/test-session/test-session.js +0 -115
- package/dist/test-session/test-session.js.map +0 -1
- package/dist/testing/test-model-generate.d.ts +0 -15
- package/dist/testing/test-model-generate.d.ts.map +0 -1
- package/dist/testing/test-model-generate.js +0 -71
- package/dist/testing/test-model-generate.js.map +0 -1
- package/dist/validate/harness.d.ts +0 -11
- package/dist/validate/harness.d.ts.map +0 -1
- package/dist/validate/harness.js +0 -72
- package/dist/validate/harness.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { LifecycleEvent, ValidationIssue } from "
|
|
1
|
+
import type { LifecycleEvent, ValidationIssue } from "../types/index.js";
|
|
2
|
+
import type { Registry } from "../registry/registry.js";
|
|
2
3
|
/** Recorded extension lifecycle hook events (reset via `resetLifecycleSpy()`). */
|
|
3
4
|
export declare const lifecycleSpyEvents: LifecycleEvent[];
|
|
4
5
|
/** Diagnostics from the most recent `step:failed` hook invocation. */
|
|
@@ -8,7 +9,7 @@ export declare let capabilityInvokeCount: number;
|
|
|
8
9
|
/** Reset spy state between tests. */
|
|
9
10
|
export declare function resetLifecycleSpy(): void;
|
|
10
11
|
/** Lifecycle spy extension for conformance tests. @category Testing */
|
|
11
|
-
export declare const lifecycleSpyExtension: import("../
|
|
12
|
-
/** Register lifecycle spy extension on
|
|
13
|
-
export declare function registerLifecycleSpyExtension(): Promise<void>;
|
|
12
|
+
export declare const lifecycleSpyExtension: import("../index.js").ExtensionDefinition;
|
|
13
|
+
/** Register lifecycle spy extension on a registry. */
|
|
14
|
+
export declare function registerLifecycleSpyExtension(registry: Registry): Promise<void>;
|
|
14
15
|
//# sourceMappingURL=test-lifecycle-extension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-lifecycle-extension.d.ts","sourceRoot":"","sources":["../../src/testing/test-lifecycle-extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"test-lifecycle-extension.d.ts","sourceRoot":"","sources":["../../src/testing/test-lifecycle-extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAIxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAGvD,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAAO,CAAA;AAEtD,sEAAsE;AACtE,eAAO,IAAI,qCAAqC,EAAE,eAAe,EAAE,GAAG,SAAS,CAAA;AAE/E,wDAAwD;AACxD,eAAO,IAAI,qBAAqB,QAAI,CAAA;AAEpC,qCAAqC;AACrC,wBAAgB,iBAAiB,IAAI,IAAI,CAIxC;AAWD,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,2CAsFxB,CAAA;AAEV,sDAAsD;AACtD,wBAAsB,6BAA6B,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAIrF"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { defineExtension } from "../definitions/extension.js";
|
|
2
2
|
import { capabilityFor } from "../definitions/capability.js";
|
|
3
3
|
import { hook } from "../definitions/hook.js";
|
|
4
|
-
import { catalogExtension } from "../registry/extension-catalog.js";
|
|
5
|
-
import { globalRegistry } from "../registry/registry.js";
|
|
6
4
|
import { z } from "zod";
|
|
7
5
|
/** Recorded extension lifecycle hook events (reset via `resetLifecycleSpy()`). */
|
|
8
6
|
export const lifecycleSpyEvents = [];
|
|
@@ -29,7 +27,7 @@ export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol"
|
|
|
29
27
|
.withConfig({})
|
|
30
28
|
.withMetadata({
|
|
31
29
|
summary: "Lifecycle hook spy and fault-injection capabilities.",
|
|
32
|
-
description: "Records lifecycle events and exposes echo, throw, and merge-state capabilities for engine conformance and store tests."
|
|
30
|
+
description: "Records lifecycle events and exposes echo, throw, and merge-state capabilities for engine conformance and store tests."
|
|
33
31
|
})
|
|
34
32
|
.withCapabilities([
|
|
35
33
|
capabilityFor("@executioncontrolprotocol/lifecycle-spy", "echo")
|
|
@@ -40,12 +38,14 @@ export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol"
|
|
|
40
38
|
description: "Mirrors test.echo but increments capabilityInvokeCount so tests can assert step invocation order alongside hook events.",
|
|
41
39
|
useCases: [
|
|
42
40
|
"Lifecycle test verifies step:started fires before handler runs.",
|
|
43
|
-
"Conformance suite counts capability invocations per run."
|
|
44
|
-
],
|
|
45
|
-
samplePrompts: [
|
|
46
|
-
"Run lifecycle-spy echo with value probe.",
|
|
47
|
-
"Invoke spy echo to trigger step hooks.",
|
|
41
|
+
"Conformance suite counts capability invocations per run."
|
|
48
42
|
],
|
|
43
|
+
projections: [
|
|
44
|
+
{
|
|
45
|
+
summary: "Use the echoed value",
|
|
46
|
+
description: "Take the echo field as the step output while tests assert hook ordering."
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
49
|
})
|
|
50
50
|
.withHandler(async (input) => {
|
|
51
51
|
capabilityInvokeCount++;
|
|
@@ -59,12 +59,14 @@ export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol"
|
|
|
59
59
|
description: "Throws a fixed error on every invoke. Used to assert failure diagnostics and finally hooks without external dependencies.",
|
|
60
60
|
useCases: [
|
|
61
61
|
"Test asserts step:failed captures handler errors.",
|
|
62
|
-
"Run cancellation path after a forced step failure."
|
|
63
|
-
],
|
|
64
|
-
samplePrompts: [
|
|
65
|
-
"Run the lifecycle-spy throw step.",
|
|
66
|
-
"Trigger a failing capability for hook tests.",
|
|
62
|
+
"Run cancellation path after a forced step failure."
|
|
67
63
|
],
|
|
64
|
+
projections: [
|
|
65
|
+
{
|
|
66
|
+
summary: "Expect a step failure",
|
|
67
|
+
description: "This capability always throws; invoke only when tests need step:failed, not a success payload."
|
|
68
|
+
}
|
|
69
|
+
]
|
|
68
70
|
})
|
|
69
71
|
.withHandler(async () => {
|
|
70
72
|
capabilityInvokeCount++;
|
|
@@ -78,12 +80,14 @@ export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol"
|
|
|
78
80
|
description: "Calls ctx.store.merge on a supplied state handle. Verifies store wiring from capability handlers during integration tests.",
|
|
79
81
|
useCases: [
|
|
80
82
|
"Store test confirms merge from a step handler.",
|
|
81
|
-
"Multi-step run accumulates shared state through spy merge."
|
|
82
|
-
],
|
|
83
|
-
samplePrompts: [
|
|
84
|
-
"Merge { merged: true } into the run state handle.",
|
|
85
|
-
"Invoke lifecycle-spy merge-state on the shared target.",
|
|
83
|
+
"Multi-step run accumulates shared state through spy merge."
|
|
86
84
|
],
|
|
85
|
+
projections: [
|
|
86
|
+
{
|
|
87
|
+
summary: "Confirm store merge",
|
|
88
|
+
description: "When ok is true, the target state handle received the merged test fields."
|
|
89
|
+
}
|
|
90
|
+
]
|
|
87
91
|
})
|
|
88
92
|
.withHandler(async (input, ctx) => {
|
|
89
93
|
capabilityInvokeCount++;
|
|
@@ -91,21 +95,20 @@ export const lifecycleSpyExtension = defineExtension("@executioncontrolprotocol"
|
|
|
91
95
|
.target;
|
|
92
96
|
await ctx.store.merge(handle, { merged: true });
|
|
93
97
|
return { ok: true };
|
|
94
|
-
})
|
|
98
|
+
})
|
|
95
99
|
])
|
|
96
100
|
.withHooks([
|
|
97
101
|
spyHook("step:before"),
|
|
98
102
|
spyHook("step:started"),
|
|
99
103
|
spyHook("step:completed"),
|
|
100
104
|
spyHook("step:failed"),
|
|
101
|
-
spyHook("step:finally")
|
|
105
|
+
spyHook("step:finally")
|
|
102
106
|
])
|
|
103
107
|
.build();
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
await globalRegistry.registerExtension(lifecycleSpyExtension);
|
|
108
|
+
/** Register lifecycle spy extension on a registry. */
|
|
109
|
+
export async function registerLifecycleSpyExtension(registry) {
|
|
110
|
+
if (!registry.getExtension("@executioncontrolprotocol/lifecycle-spy")) {
|
|
111
|
+
await registry.registerExtension(lifecycleSpyExtension);
|
|
109
112
|
}
|
|
110
113
|
}
|
|
111
114
|
//# sourceMappingURL=test-lifecycle-extension.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-lifecycle-extension.js","sourceRoot":"","sources":["../../src/testing/test-lifecycle-extension.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"test-lifecycle-extension.js","sourceRoot":"","sources":["../../src/testing/test-lifecycle-extension.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,kFAAkF;AAClF,MAAM,CAAC,MAAM,kBAAkB,GAAqB,EAAE,CAAA;AAEtD,sEAAsE;AACtE,MAAM,CAAC,IAAI,qCAAoE,CAAA;AAE/E,wDAAwD;AACxD,MAAM,CAAC,IAAI,qBAAqB,GAAG,CAAC,CAAA;AAEpC,qCAAqC;AACrC,MAAM,UAAU,iBAAiB;IAC/B,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAA;IAC7B,qCAAqC,GAAG,SAAS,CAAA;IACjD,qBAAqB,GAAG,CAAC,CAAA;AAC3B,CAAC;AAED,SAAS,OAAO,CAAC,KAAqB;IACpC,OAAO,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QAC/B,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC9B,IAAI,KAAK,KAAK,aAAa,IAAI,aAAa,IAAI,GAAG,EAAE,CAAC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KACD,KAAK,EAAE,CAAA;AAEV,sDAAsD;AACtD,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAAC,QAAkB;IACpE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,yCAAyC,CAAC,EAAE,CAAC;QACtE,MAAM,QAAQ,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,CAAA;IACzD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ValidationIssue } from "./validation.js";
|
|
2
|
+
/** Minimum model generate capability input. @category Capabilities */
|
|
3
|
+
export interface GenerateCapabilityInput {
|
|
4
|
+
prompt: string;
|
|
5
|
+
system?: string;
|
|
6
|
+
context?: unknown;
|
|
7
|
+
options?: Record<string, unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* Prior conversation turns (user/assistant only). The current user turn is always {@link GenerateCapabilityInput.prompt}.
|
|
10
|
+
* System instructions stay in {@link GenerateCapabilityInput.system}.
|
|
11
|
+
*/
|
|
12
|
+
messages?: Array<{
|
|
13
|
+
role: "user" | "assistant";
|
|
14
|
+
content: string;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
/** Minimum model generate capability output. @category Capabilities */
|
|
18
|
+
export interface GenerateCapabilityOutput {
|
|
19
|
+
text: string;
|
|
20
|
+
raw?: unknown;
|
|
21
|
+
usage?: unknown;
|
|
22
|
+
diagnostics?: ValidationIssue[];
|
|
23
|
+
}
|
|
24
|
+
/** Minimum evaluate capability input. @category Capabilities */
|
|
25
|
+
export interface EvaluateCapabilityInput {
|
|
26
|
+
subject: unknown;
|
|
27
|
+
criteria?: unknown;
|
|
28
|
+
rubric?: unknown;
|
|
29
|
+
options?: Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
/** Minimum evaluate capability output. @category Capabilities */
|
|
32
|
+
export interface EvaluateCapabilityOutput {
|
|
33
|
+
passed?: boolean;
|
|
34
|
+
score?: number;
|
|
35
|
+
result?: unknown;
|
|
36
|
+
rationale?: string;
|
|
37
|
+
diagnostics?: ValidationIssue[];
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/types/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,sEAAsE;AACtE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAClE;AAED,uEAAuE;AACvE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,eAAe,EAAE,CAAA;CAChC;AAED,gEAAgE;AAChE,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,iEAAiE;AACjE,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAA;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/types/capabilities.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Where a capability may execute. @category Capabilities */
|
|
2
|
+
export declare const CAPABILITY_EXECUTION: readonly ["local", "host", "mixed"];
|
|
3
|
+
/** Capability execution kind. @category Capabilities */
|
|
4
|
+
export type CapabilityExecution = (typeof CAPABILITY_EXECUTION)[number];
|
|
5
|
+
//# sourceMappingURL=capability-execution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-execution.d.ts","sourceRoot":"","sources":["../../src/types/capability-execution.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,eAAO,MAAM,oBAAoB,qCAAsC,CAAA;AAEvE,wDAAwD;AACxD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-execution.js","sourceRoot":"","sources":["../../src/types/capability-execution.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAU,CAAA"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Banned protocol/schema how-to phrases in author prose. @category Schema */
|
|
3
|
+
export declare const METADATA_PROSE_BANNED_PHRASES: readonly ["inputschema", "outputschema", "withinput", "withoutput", "exact-id describe", "exact id describe", "json schema", "do not invent fields"];
|
|
4
|
+
/**
|
|
5
|
+
* Find a banned schema-howto phrase in author prose (case-insensitive).
|
|
6
|
+
* @category Schema
|
|
7
|
+
*/
|
|
8
|
+
export declare function findBannedMetadataProsePhrase(text: string): string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Plain-text note for what to take from a capability output after the call.
|
|
11
|
+
* Used after discovery / inspect runs; not a sample payload or path query.
|
|
12
|
+
* Shape matches {@link capabilityProjectionSchema} (Zod is the runtime source of truth).
|
|
13
|
+
* @category Schema
|
|
14
|
+
*/
|
|
15
|
+
export interface CapabilityProjection {
|
|
16
|
+
/** What to take from the output after the call. */
|
|
17
|
+
summary: string;
|
|
18
|
+
/** How to take it, in sentences. */
|
|
19
|
+
description: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Agent-facing capability docs authored via {@code .withMetadata()}.
|
|
23
|
+
* Shape matches {@link capabilityMetadataSchema} (Zod is the runtime source of truth).
|
|
24
|
+
* Declared as an interface so JSON Schema generation and object-literal checks stay stable.
|
|
25
|
+
* @category Schema
|
|
26
|
+
*/
|
|
27
|
+
export interface CapabilityMetadata {
|
|
28
|
+
/** One-line what + when (inventory / catalog). */
|
|
29
|
+
summary: string;
|
|
30
|
+
/** Full agent docs: behavior, product limits, when this capability applies. */
|
|
31
|
+
description: string;
|
|
32
|
+
/** Concrete situations an agent should recognize (before the call). */
|
|
33
|
+
useCases: string[];
|
|
34
|
+
/** Optional distinct display title; describe falls back to capability name. */
|
|
35
|
+
label?: string;
|
|
36
|
+
/**
|
|
37
|
+
* What to take from the output after the call, in plain text.
|
|
38
|
+
* Stays off authoring inventory; shown with exact-id detail and after inspect runs.
|
|
39
|
+
*/
|
|
40
|
+
projections: CapabilityProjection[];
|
|
41
|
+
/** Non-standard extensions (vendor docs urls, tags, …). */
|
|
42
|
+
_meta?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Agent-facing extension docs authored via {@code .withMetadata()}.
|
|
46
|
+
* Shape matches {@link extensionMetadataSchema} (Zod is the runtime source of truth).
|
|
47
|
+
* @category Schema
|
|
48
|
+
*/
|
|
49
|
+
export interface ExtensionMetadata {
|
|
50
|
+
/** One-line what + when. */
|
|
51
|
+
summary: string;
|
|
52
|
+
/** Full agent docs for the extension package. */
|
|
53
|
+
description: string;
|
|
54
|
+
/** Optional situations an agent should recognize. */
|
|
55
|
+
useCases?: string[];
|
|
56
|
+
/** Optional distinct display title. */
|
|
57
|
+
label?: string;
|
|
58
|
+
/**
|
|
59
|
+
* When `false`, capability inventory omits this extension.
|
|
60
|
+
* Default / omit is `true` (workflow-facing packages stay visible).
|
|
61
|
+
*/
|
|
62
|
+
isAuthorable?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Optional kebab-case oclif topic alias generated by `ecp plugins build`.
|
|
65
|
+
* Commands stay under {@code definition.name}; the alias is extra, not a second definition.
|
|
66
|
+
*/
|
|
67
|
+
topicAlias?: string;
|
|
68
|
+
/** Non-standard extensions. */
|
|
69
|
+
_meta?: Record<string, unknown>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Zod schema for {@link CapabilityProjection}.
|
|
73
|
+
* Unknown keys are rejected; prose bans are enforced at parse time.
|
|
74
|
+
* @category Schema
|
|
75
|
+
*/
|
|
76
|
+
export declare const capabilityProjectionSchema: z.ZodEffects<z.ZodObject<{
|
|
77
|
+
summary: z.ZodString;
|
|
78
|
+
description: z.ZodString;
|
|
79
|
+
}, "strict", z.ZodTypeAny, {
|
|
80
|
+
summary: string;
|
|
81
|
+
description: string;
|
|
82
|
+
}, {
|
|
83
|
+
summary: string;
|
|
84
|
+
description: string;
|
|
85
|
+
}>, {
|
|
86
|
+
summary: string;
|
|
87
|
+
description: string;
|
|
88
|
+
}, {
|
|
89
|
+
summary: string;
|
|
90
|
+
description: string;
|
|
91
|
+
}>;
|
|
92
|
+
/**
|
|
93
|
+
* Zod schema for {@link CapabilityMetadata}.
|
|
94
|
+
* Unknown keys (e.g. legacy {@code samplePrompts}) are rejected.
|
|
95
|
+
* @category Schema
|
|
96
|
+
*/
|
|
97
|
+
export declare const capabilityMetadataSchema: z.ZodEffects<z.ZodObject<{
|
|
98
|
+
summary: z.ZodString;
|
|
99
|
+
description: z.ZodString;
|
|
100
|
+
useCases: z.ZodArray<z.ZodString, "many">;
|
|
101
|
+
label: z.ZodOptional<z.ZodString>;
|
|
102
|
+
projections: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
103
|
+
summary: z.ZodString;
|
|
104
|
+
description: z.ZodString;
|
|
105
|
+
}, "strict", z.ZodTypeAny, {
|
|
106
|
+
summary: string;
|
|
107
|
+
description: string;
|
|
108
|
+
}, {
|
|
109
|
+
summary: string;
|
|
110
|
+
description: string;
|
|
111
|
+
}>, {
|
|
112
|
+
summary: string;
|
|
113
|
+
description: string;
|
|
114
|
+
}, {
|
|
115
|
+
summary: string;
|
|
116
|
+
description: string;
|
|
117
|
+
}>, "many">;
|
|
118
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
119
|
+
}, "strict", z.ZodTypeAny, {
|
|
120
|
+
summary: string;
|
|
121
|
+
description: string;
|
|
122
|
+
useCases: string[];
|
|
123
|
+
projections: {
|
|
124
|
+
summary: string;
|
|
125
|
+
description: string;
|
|
126
|
+
}[];
|
|
127
|
+
label?: string | undefined;
|
|
128
|
+
_meta?: Record<string, unknown> | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
summary: string;
|
|
131
|
+
description: string;
|
|
132
|
+
useCases: string[];
|
|
133
|
+
projections: {
|
|
134
|
+
summary: string;
|
|
135
|
+
description: string;
|
|
136
|
+
}[];
|
|
137
|
+
label?: string | undefined;
|
|
138
|
+
_meta?: Record<string, unknown> | undefined;
|
|
139
|
+
}>, {
|
|
140
|
+
summary: string;
|
|
141
|
+
description: string;
|
|
142
|
+
useCases: string[];
|
|
143
|
+
projections: {
|
|
144
|
+
summary: string;
|
|
145
|
+
description: string;
|
|
146
|
+
}[];
|
|
147
|
+
label?: string | undefined;
|
|
148
|
+
_meta?: Record<string, unknown> | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
summary: string;
|
|
151
|
+
description: string;
|
|
152
|
+
useCases: string[];
|
|
153
|
+
projections: {
|
|
154
|
+
summary: string;
|
|
155
|
+
description: string;
|
|
156
|
+
}[];
|
|
157
|
+
label?: string | undefined;
|
|
158
|
+
_meta?: Record<string, unknown> | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
/**
|
|
161
|
+
* Zod schema for {@link ExtensionMetadata}.
|
|
162
|
+
* Unknown keys (e.g. legacy {@code samplePrompts}) are rejected.
|
|
163
|
+
* @category Schema
|
|
164
|
+
*/
|
|
165
|
+
export declare const extensionMetadataSchema: z.ZodEffects<z.ZodObject<{
|
|
166
|
+
summary: z.ZodString;
|
|
167
|
+
description: z.ZodString;
|
|
168
|
+
useCases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
169
|
+
label: z.ZodOptional<z.ZodString>;
|
|
170
|
+
isAuthorable: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
topicAlias: z.ZodOptional<z.ZodString>;
|
|
172
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
173
|
+
}, "strict", z.ZodTypeAny, {
|
|
174
|
+
summary: string;
|
|
175
|
+
description: string;
|
|
176
|
+
useCases?: string[] | undefined;
|
|
177
|
+
label?: string | undefined;
|
|
178
|
+
_meta?: Record<string, unknown> | undefined;
|
|
179
|
+
isAuthorable?: boolean | undefined;
|
|
180
|
+
topicAlias?: string | undefined;
|
|
181
|
+
}, {
|
|
182
|
+
summary: string;
|
|
183
|
+
description: string;
|
|
184
|
+
useCases?: string[] | undefined;
|
|
185
|
+
label?: string | undefined;
|
|
186
|
+
_meta?: Record<string, unknown> | undefined;
|
|
187
|
+
isAuthorable?: boolean | undefined;
|
|
188
|
+
topicAlias?: string | undefined;
|
|
189
|
+
}>, {
|
|
190
|
+
summary: string;
|
|
191
|
+
description: string;
|
|
192
|
+
useCases?: string[] | undefined;
|
|
193
|
+
label?: string | undefined;
|
|
194
|
+
_meta?: Record<string, unknown> | undefined;
|
|
195
|
+
isAuthorable?: boolean | undefined;
|
|
196
|
+
topicAlias?: string | undefined;
|
|
197
|
+
}, {
|
|
198
|
+
summary: string;
|
|
199
|
+
description: string;
|
|
200
|
+
useCases?: string[] | undefined;
|
|
201
|
+
label?: string | undefined;
|
|
202
|
+
_meta?: Record<string, unknown> | undefined;
|
|
203
|
+
isAuthorable?: boolean | undefined;
|
|
204
|
+
topicAlias?: string | undefined;
|
|
205
|
+
}>;
|
|
206
|
+
/**
|
|
207
|
+
* Parse and validate capability metadata (throws on invalid / banned prose / unknown keys).
|
|
208
|
+
* @category Schema
|
|
209
|
+
*/
|
|
210
|
+
export declare function parseCapabilityMetadata(input: unknown): CapabilityMetadata;
|
|
211
|
+
/**
|
|
212
|
+
* Parse and validate extension metadata (throws on invalid / banned prose / unknown keys).
|
|
213
|
+
* @category Schema
|
|
214
|
+
*/
|
|
215
|
+
export declare function parseExtensionMetadata(input: unknown): ExtensionMetadata;
|
|
216
|
+
//# sourceMappingURL=capability-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-metadata.d.ts","sourceRoot":"","sources":["../../src/types/capability-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,sJAShC,CAAA;AAEV;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAM9E;AAiBD;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAA;IACf,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAA;IACf,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAA;IACnB,uEAAuE;IACvE,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,WAAW,EAAE,oBAAoB,EAAE,CAAA;IACnC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAA;IACnB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC;AAED;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;EAgBO,CAAA;AAE9C;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBO,CAAA;AAE5C;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BO,CAAA;AAE3C;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAE1E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAExE"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Banned protocol/schema how-to phrases in author prose. @category Schema */
|
|
3
|
+
export const METADATA_PROSE_BANNED_PHRASES = [
|
|
4
|
+
"inputschema",
|
|
5
|
+
"outputschema",
|
|
6
|
+
"withinput",
|
|
7
|
+
"withoutput",
|
|
8
|
+
"exact-id describe",
|
|
9
|
+
"exact id describe",
|
|
10
|
+
"json schema",
|
|
11
|
+
"do not invent fields",
|
|
12
|
+
];
|
|
13
|
+
/**
|
|
14
|
+
* Find a banned schema-howto phrase in author prose (case-insensitive).
|
|
15
|
+
* @category Schema
|
|
16
|
+
*/
|
|
17
|
+
export function findBannedMetadataProsePhrase(text) {
|
|
18
|
+
const hay = text.toLowerCase();
|
|
19
|
+
for (const phrase of METADATA_PROSE_BANNED_PHRASES) {
|
|
20
|
+
if (hay.includes(phrase))
|
|
21
|
+
return phrase;
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
function assertProseClean(field, value) {
|
|
26
|
+
const banned = findBannedMetadataProsePhrase(value);
|
|
27
|
+
if (banned) {
|
|
28
|
+
throw new Error(`Capability/extension metadata.${field} must not contain schema how-to phrase "${banned}"`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function assertProseListClean(field, values) {
|
|
32
|
+
for (const value of values) {
|
|
33
|
+
assertProseClean(field, value);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Zod schema for {@link CapabilityProjection}.
|
|
38
|
+
* Unknown keys are rejected; prose bans are enforced at parse time.
|
|
39
|
+
* @category Schema
|
|
40
|
+
*/
|
|
41
|
+
export const capabilityProjectionSchema = z
|
|
42
|
+
.object({
|
|
43
|
+
summary: z.string().min(1),
|
|
44
|
+
description: z.string().min(1),
|
|
45
|
+
})
|
|
46
|
+
.strict()
|
|
47
|
+
.superRefine((value, ctx) => {
|
|
48
|
+
try {
|
|
49
|
+
assertProseClean("projections.summary", value.summary);
|
|
50
|
+
assertProseClean("projections.description", value.description);
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
ctx.addIssue({
|
|
54
|
+
code: z.ZodIssueCode.custom,
|
|
55
|
+
message: err instanceof Error ? err.message : String(err),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* Zod schema for {@link CapabilityMetadata}.
|
|
61
|
+
* Unknown keys (e.g. legacy {@code samplePrompts}) are rejected.
|
|
62
|
+
* @category Schema
|
|
63
|
+
*/
|
|
64
|
+
export const capabilityMetadataSchema = z
|
|
65
|
+
.object({
|
|
66
|
+
summary: z.string().min(1),
|
|
67
|
+
description: z.string().min(1),
|
|
68
|
+
useCases: z.array(z.string().min(1)).min(1),
|
|
69
|
+
label: z.string().min(1).optional(),
|
|
70
|
+
projections: z.array(capabilityProjectionSchema).min(1),
|
|
71
|
+
_meta: z.record(z.string(), z.unknown()).optional(),
|
|
72
|
+
})
|
|
73
|
+
.strict()
|
|
74
|
+
.superRefine((value, ctx) => {
|
|
75
|
+
try {
|
|
76
|
+
assertProseClean("summary", value.summary);
|
|
77
|
+
assertProseClean("description", value.description);
|
|
78
|
+
assertProseListClean("useCases", value.useCases);
|
|
79
|
+
if (value.label)
|
|
80
|
+
assertProseClean("label", value.label);
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
ctx.addIssue({
|
|
84
|
+
code: z.ZodIssueCode.custom,
|
|
85
|
+
message: err instanceof Error ? err.message : String(err),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
/**
|
|
90
|
+
* Zod schema for {@link ExtensionMetadata}.
|
|
91
|
+
* Unknown keys (e.g. legacy {@code samplePrompts}) are rejected.
|
|
92
|
+
* @category Schema
|
|
93
|
+
*/
|
|
94
|
+
export const extensionMetadataSchema = z
|
|
95
|
+
.object({
|
|
96
|
+
summary: z.string().min(1),
|
|
97
|
+
description: z.string().min(1),
|
|
98
|
+
useCases: z.array(z.string().min(1)).optional(),
|
|
99
|
+
label: z.string().min(1).optional(),
|
|
100
|
+
isAuthorable: z.boolean().optional(),
|
|
101
|
+
topicAlias: z
|
|
102
|
+
.string()
|
|
103
|
+
.regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, "topicAlias must be kebab-case")
|
|
104
|
+
.optional(),
|
|
105
|
+
_meta: z.record(z.string(), z.unknown()).optional(),
|
|
106
|
+
})
|
|
107
|
+
.strict()
|
|
108
|
+
.superRefine((value, ctx) => {
|
|
109
|
+
try {
|
|
110
|
+
assertProseClean("summary", value.summary);
|
|
111
|
+
assertProseClean("description", value.description);
|
|
112
|
+
if (value.useCases)
|
|
113
|
+
assertProseListClean("useCases", value.useCases);
|
|
114
|
+
if (value.label)
|
|
115
|
+
assertProseClean("label", value.label);
|
|
116
|
+
}
|
|
117
|
+
catch (err) {
|
|
118
|
+
ctx.addIssue({
|
|
119
|
+
code: z.ZodIssueCode.custom,
|
|
120
|
+
message: err instanceof Error ? err.message : String(err),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
/**
|
|
125
|
+
* Parse and validate capability metadata (throws on invalid / banned prose / unknown keys).
|
|
126
|
+
* @category Schema
|
|
127
|
+
*/
|
|
128
|
+
export function parseCapabilityMetadata(input) {
|
|
129
|
+
return capabilityMetadataSchema.parse(input);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Parse and validate extension metadata (throws on invalid / banned prose / unknown keys).
|
|
133
|
+
* @category Schema
|
|
134
|
+
*/
|
|
135
|
+
export function parseExtensionMetadata(input) {
|
|
136
|
+
return extensionMetadataSchema.parse(input);
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=capability-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-metadata.js","sourceRoot":"","sources":["../../src/types/capability-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,8EAA8E;AAC9E,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,aAAa;IACb,cAAc;IACd,WAAW;IACX,YAAY;IACZ,mBAAmB;IACnB,mBAAmB;IACnB,aAAa;IACb,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