hardness 1.0.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/AGENTS.md +129 -0
- package/CHANGELOG.md +27 -0
- package/LICENSE +21 -0
- package/README.md +269 -0
- package/node_modules/@hardness/analyzers/README.md +31 -0
- package/node_modules/@hardness/analyzers/dist/generic.d.ts +6 -0
- package/node_modules/@hardness/analyzers/dist/generic.js +13 -0
- package/node_modules/@hardness/analyzers/dist/generic.js.map +1 -0
- package/node_modules/@hardness/analyzers/dist/index.d.ts +26 -0
- package/node_modules/@hardness/analyzers/dist/index.js +40 -0
- package/node_modules/@hardness/analyzers/dist/index.js.map +1 -0
- package/node_modules/@hardness/analyzers/dist/typescript-node.d.ts +6 -0
- package/node_modules/@hardness/analyzers/dist/typescript-node.js +110 -0
- package/node_modules/@hardness/analyzers/dist/typescript-node.js.map +1 -0
- package/node_modules/@hardness/analyzers/package.json +47 -0
- package/node_modules/@hardness/core/README.md +20 -0
- package/node_modules/@hardness/core/dist/agent/adapter.d.ts +12 -0
- package/node_modules/@hardness/core/dist/agent/adapter.js +32 -0
- package/node_modules/@hardness/core/dist/agent/adapter.js.map +1 -0
- package/node_modules/@hardness/core/dist/agent/context-gen.d.ts +7 -0
- package/node_modules/@hardness/core/dist/agent/context-gen.js +12 -0
- package/node_modules/@hardness/core/dist/agent/context-gen.js.map +1 -0
- package/node_modules/@hardness/core/dist/common/logger.d.ts +17 -0
- package/node_modules/@hardness/core/dist/common/logger.js +59 -0
- package/node_modules/@hardness/core/dist/common/logger.js.map +1 -0
- package/node_modules/@hardness/core/dist/common/paths.d.ts +22 -0
- package/node_modules/@hardness/core/dist/common/paths.js +72 -0
- package/node_modules/@hardness/core/dist/common/paths.js.map +1 -0
- package/node_modules/@hardness/core/dist/common/preflight.d.ts +9 -0
- package/node_modules/@hardness/core/dist/common/preflight.js +69 -0
- package/node_modules/@hardness/core/dist/common/preflight.js.map +1 -0
- package/node_modules/@hardness/core/dist/common/subprocess.d.ts +18 -0
- package/node_modules/@hardness/core/dist/common/subprocess.js +79 -0
- package/node_modules/@hardness/core/dist/common/subprocess.js.map +1 -0
- package/node_modules/@hardness/core/dist/common/types.d.ts +77 -0
- package/node_modules/@hardness/core/dist/common/types.js +2 -0
- package/node_modules/@hardness/core/dist/common/types.js.map +1 -0
- package/node_modules/@hardness/core/dist/config/manager.d.ts +31 -0
- package/node_modules/@hardness/core/dist/config/manager.js +97 -0
- package/node_modules/@hardness/core/dist/config/manager.js.map +1 -0
- package/node_modules/@hardness/core/dist/config/schema.d.ts +210 -0
- package/node_modules/@hardness/core/dist/config/schema.js +41 -0
- package/node_modules/@hardness/core/dist/config/schema.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/analyzer-gate.d.ts +6 -0
- package/node_modules/@hardness/core/dist/gates/analyzer-gate.js +37 -0
- package/node_modules/@hardness/core/dist/gates/analyzer-gate.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/dependency.d.ts +5 -0
- package/node_modules/@hardness/core/dist/gates/dependency.js +71 -0
- package/node_modules/@hardness/core/dist/gates/dependency.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/engine.d.ts +26 -0
- package/node_modules/@hardness/core/dist/gates/engine.js +68 -0
- package/node_modules/@hardness/core/dist/gates/engine.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/execution.d.ts +9 -0
- package/node_modules/@hardness/core/dist/gates/execution.js +88 -0
- package/node_modules/@hardness/core/dist/gates/execution.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/generic.d.ts +21 -0
- package/node_modules/@hardness/core/dist/gates/generic.js +204 -0
- package/node_modules/@hardness/core/dist/gates/generic.js.map +1 -0
- package/node_modules/@hardness/core/dist/gates/import-resolver.d.ts +6 -0
- package/node_modules/@hardness/core/dist/gates/import-resolver.js +78 -0
- package/node_modules/@hardness/core/dist/gates/import-resolver.js.map +1 -0
- package/node_modules/@hardness/core/dist/index.d.ts +23 -0
- package/node_modules/@hardness/core/dist/index.js +30 -0
- package/node_modules/@hardness/core/dist/index.js.map +1 -0
- package/node_modules/@hardness/core/dist/locks/harness-guard.d.ts +32 -0
- package/node_modules/@hardness/core/dist/locks/harness-guard.js +121 -0
- package/node_modules/@hardness/core/dist/locks/harness-guard.js.map +1 -0
- package/node_modules/@hardness/core/dist/locks/sprint-lock.d.ts +39 -0
- package/node_modules/@hardness/core/dist/locks/sprint-lock.js +143 -0
- package/node_modules/@hardness/core/dist/locks/sprint-lock.js.map +1 -0
- package/node_modules/@hardness/core/dist/orchestrator.d.ts +8 -0
- package/node_modules/@hardness/core/dist/orchestrator.js +160 -0
- package/node_modules/@hardness/core/dist/orchestrator.js.map +1 -0
- package/node_modules/@hardness/core/dist/security/policy.d.ts +10 -0
- package/node_modules/@hardness/core/dist/security/policy.js +32 -0
- package/node_modules/@hardness/core/dist/security/policy.js.map +1 -0
- package/node_modules/@hardness/core/dist/security/redactor.d.ts +5 -0
- package/node_modules/@hardness/core/dist/security/redactor.js +40 -0
- package/node_modules/@hardness/core/dist/security/redactor.js.map +1 -0
- package/node_modules/@hardness/core/dist/sprint/context.d.ts +27 -0
- package/node_modules/@hardness/core/dist/sprint/context.js +119 -0
- package/node_modules/@hardness/core/dist/sprint/context.js.map +1 -0
- package/node_modules/@hardness/core/dist/sprint/scorer.d.ts +20 -0
- package/node_modules/@hardness/core/dist/sprint/scorer.js +109 -0
- package/node_modules/@hardness/core/dist/sprint/scorer.js.map +1 -0
- package/node_modules/@hardness/core/dist/sprint/status.d.ts +20 -0
- package/node_modules/@hardness/core/dist/sprint/status.js +81 -0
- package/node_modules/@hardness/core/dist/sprint/status.js.map +1 -0
- package/node_modules/@hardness/core/dist/sprint/validator.d.ts +17 -0
- package/node_modules/@hardness/core/dist/sprint/validator.js +239 -0
- package/node_modules/@hardness/core/dist/sprint/validator.js.map +1 -0
- package/node_modules/@hardness/core/package.json +53 -0
- package/node_modules/@hardness/prompts/README.md +30 -0
- package/node_modules/@hardness/prompts/dist/index.d.ts +21 -0
- package/node_modules/@hardness/prompts/dist/index.js +63 -0
- package/node_modules/@hardness/prompts/dist/index.js.map +1 -0
- package/node_modules/@hardness/prompts/package.json +46 -0
- package/node_modules/picocolors/LICENSE +15 -0
- package/node_modules/picocolors/README.md +21 -0
- package/node_modules/picocolors/package.json +25 -0
- package/node_modules/picocolors/picocolors.browser.js +4 -0
- package/node_modules/picocolors/picocolors.d.ts +5 -0
- package/node_modules/picocolors/picocolors.js +75 -0
- package/node_modules/picocolors/types.d.ts +51 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/package.json +118 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5136 -0
- package/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/zod/src/v4/core/function.ts +176 -0
- package/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +111 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3775 -0
- package/node_modules/zod/v3/types.d.cts +1031 -0
- package/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/zod/v3/types.js +3693 -0
- package/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/zod/v4/core/function.cjs +102 -0
- package/node_modules/zod/v4/core/function.d.cts +52 -0
- package/node_modules/zod/v4/core/function.d.ts +52 -0
- package/node_modules/zod/v4/core/function.js +75 -0
- package/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +17 -0
- package/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +30 -0
- package/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/zod/v4-mini/index.cjs +17 -0
- package/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/package.json +80 -0
- package/packages/analyzers/README.md +31 -0
- package/packages/analyzers/dist/generic.d.ts +6 -0
- package/packages/analyzers/dist/generic.js +13 -0
- package/packages/analyzers/dist/generic.js.map +1 -0
- package/packages/analyzers/dist/index.d.ts +26 -0
- package/packages/analyzers/dist/index.js +40 -0
- package/packages/analyzers/dist/index.js.map +1 -0
- package/packages/analyzers/dist/typescript-node.d.ts +6 -0
- package/packages/analyzers/dist/typescript-node.js +110 -0
- package/packages/analyzers/dist/typescript-node.js.map +1 -0
- package/packages/analyzers/package.json +47 -0
- package/packages/cli/README.md +27 -0
- package/packages/cli/dist/commands/audit.d.ts +2 -0
- package/packages/cli/dist/commands/audit.js +36 -0
- package/packages/cli/dist/commands/audit.js.map +1 -0
- package/packages/cli/dist/commands/discover.d.ts +2 -0
- package/packages/cli/dist/commands/discover.js +12 -0
- package/packages/cli/dist/commands/discover.js.map +1 -0
- package/packages/cli/dist/commands/dry-run.d.ts +2 -0
- package/packages/cli/dist/commands/dry-run.js +47 -0
- package/packages/cli/dist/commands/dry-run.js.map +1 -0
- package/packages/cli/dist/commands/init.d.ts +2 -0
- package/packages/cli/dist/commands/init.js +93 -0
- package/packages/cli/dist/commands/init.js.map +1 -0
- package/packages/cli/dist/commands/plan.d.ts +2 -0
- package/packages/cli/dist/commands/plan.js +12 -0
- package/packages/cli/dist/commands/plan.js.map +1 -0
- package/packages/cli/dist/commands/run.d.ts +2 -0
- package/packages/cli/dist/commands/run.js +23 -0
- package/packages/cli/dist/commands/run.js.map +1 -0
- package/packages/cli/dist/commands/score.d.ts +2 -0
- package/packages/cli/dist/commands/score.js +51 -0
- package/packages/cli/dist/commands/score.js.map +1 -0
- package/packages/cli/dist/commands/spec.d.ts +2 -0
- package/packages/cli/dist/commands/spec.js +12 -0
- package/packages/cli/dist/commands/spec.js.map +1 -0
- package/packages/cli/dist/commands/status.d.ts +2 -0
- package/packages/cli/dist/commands/status.js +48 -0
- package/packages/cli/dist/commands/status.js.map +1 -0
- package/packages/cli/dist/commands/validate.d.ts +2 -0
- package/packages/cli/dist/commands/validate.js +57 -0
- package/packages/cli/dist/commands/validate.js.map +1 -0
- package/packages/cli/dist/dispatcher.d.ts +1 -0
- package/packages/cli/dist/dispatcher.js +128 -0
- package/packages/cli/dist/dispatcher.js.map +1 -0
- package/packages/cli/dist/index.d.ts +3 -0
- package/packages/cli/dist/index.js +60 -0
- package/packages/cli/dist/index.js.map +1 -0
- package/packages/cli/package.json +58 -0
- package/packages/core/README.md +20 -0
- package/packages/core/dist/agent/adapter.d.ts +12 -0
- package/packages/core/dist/agent/adapter.js +32 -0
- package/packages/core/dist/agent/adapter.js.map +1 -0
- package/packages/core/dist/agent/context-gen.d.ts +7 -0
- package/packages/core/dist/agent/context-gen.js +12 -0
- package/packages/core/dist/agent/context-gen.js.map +1 -0
- package/packages/core/dist/common/logger.d.ts +17 -0
- package/packages/core/dist/common/logger.js +59 -0
- package/packages/core/dist/common/logger.js.map +1 -0
- package/packages/core/dist/common/paths.d.ts +22 -0
- package/packages/core/dist/common/paths.js +72 -0
- package/packages/core/dist/common/paths.js.map +1 -0
- package/packages/core/dist/common/preflight.d.ts +9 -0
- package/packages/core/dist/common/preflight.js +69 -0
- package/packages/core/dist/common/preflight.js.map +1 -0
- package/packages/core/dist/common/subprocess.d.ts +18 -0
- package/packages/core/dist/common/subprocess.js +79 -0
- package/packages/core/dist/common/subprocess.js.map +1 -0
- package/packages/core/dist/common/types.d.ts +77 -0
- package/packages/core/dist/common/types.js +2 -0
- package/packages/core/dist/common/types.js.map +1 -0
- package/packages/core/dist/config/manager.d.ts +31 -0
- package/packages/core/dist/config/manager.js +97 -0
- package/packages/core/dist/config/manager.js.map +1 -0
- package/packages/core/dist/config/schema.d.ts +210 -0
- package/packages/core/dist/config/schema.js +41 -0
- package/packages/core/dist/config/schema.js.map +1 -0
- package/packages/core/dist/gates/analyzer-gate.d.ts +6 -0
- package/packages/core/dist/gates/analyzer-gate.js +37 -0
- package/packages/core/dist/gates/analyzer-gate.js.map +1 -0
- package/packages/core/dist/gates/dependency.d.ts +5 -0
- package/packages/core/dist/gates/dependency.js +71 -0
- package/packages/core/dist/gates/dependency.js.map +1 -0
- package/packages/core/dist/gates/engine.d.ts +26 -0
- package/packages/core/dist/gates/engine.js +68 -0
- package/packages/core/dist/gates/engine.js.map +1 -0
- package/packages/core/dist/gates/execution.d.ts +9 -0
- package/packages/core/dist/gates/execution.js +88 -0
- package/packages/core/dist/gates/execution.js.map +1 -0
- package/packages/core/dist/gates/generic.d.ts +21 -0
- package/packages/core/dist/gates/generic.js +204 -0
- package/packages/core/dist/gates/generic.js.map +1 -0
- package/packages/core/dist/gates/import-resolver.d.ts +6 -0
- package/packages/core/dist/gates/import-resolver.js +78 -0
- package/packages/core/dist/gates/import-resolver.js.map +1 -0
- package/packages/core/dist/index.d.ts +23 -0
- package/packages/core/dist/index.js +30 -0
- package/packages/core/dist/index.js.map +1 -0
- package/packages/core/dist/locks/harness-guard.d.ts +32 -0
- package/packages/core/dist/locks/harness-guard.js +121 -0
- package/packages/core/dist/locks/harness-guard.js.map +1 -0
- package/packages/core/dist/locks/sprint-lock.d.ts +39 -0
- package/packages/core/dist/locks/sprint-lock.js +143 -0
- package/packages/core/dist/locks/sprint-lock.js.map +1 -0
- package/packages/core/dist/orchestrator.d.ts +8 -0
- package/packages/core/dist/orchestrator.js +160 -0
- package/packages/core/dist/orchestrator.js.map +1 -0
- package/packages/core/dist/security/policy.d.ts +10 -0
- package/packages/core/dist/security/policy.js +32 -0
- package/packages/core/dist/security/policy.js.map +1 -0
- package/packages/core/dist/security/redactor.d.ts +5 -0
- package/packages/core/dist/security/redactor.js +40 -0
- package/packages/core/dist/security/redactor.js.map +1 -0
- package/packages/core/dist/sprint/context.d.ts +27 -0
- package/packages/core/dist/sprint/context.js +119 -0
- package/packages/core/dist/sprint/context.js.map +1 -0
- package/packages/core/dist/sprint/scorer.d.ts +20 -0
- package/packages/core/dist/sprint/scorer.js +109 -0
- package/packages/core/dist/sprint/scorer.js.map +1 -0
- package/packages/core/dist/sprint/status.d.ts +20 -0
- package/packages/core/dist/sprint/status.js +81 -0
- package/packages/core/dist/sprint/status.js.map +1 -0
- package/packages/core/dist/sprint/validator.d.ts +17 -0
- package/packages/core/dist/sprint/validator.js +239 -0
- package/packages/core/dist/sprint/validator.js.map +1 -0
- package/packages/core/package.json +53 -0
- package/packages/prompts/README.md +30 -0
- package/packages/prompts/dist/index.d.ts +21 -0
- package/packages/prompts/dist/index.js +63 -0
- package/packages/prompts/dist/index.js.map +1 -0
- package/packages/prompts/package.json +46 -0
- package/schemas/config.schema.json +62 -0
- package/schemas/context.schema.json +36 -0
- package/schemas/index.schema.json +29 -0
- package/schemas/sprint.schema.json +109 -0
- package/templates/PRD-TEMPLATE.md +36 -0
- package/templates/SPEC-TEMPLATE.md +59 -0
- package/templates/SPRINT-TEMPLATE.json +62 -0
- package/templates/config.example.json +30 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export type SprintStatus = 'pending' | 'in-progress' | 'done';
|
|
2
|
+
export type FeatureStatus = 'pending' | 'in-progress' | 'done';
|
|
3
|
+
export interface DependencyVerification {
|
|
4
|
+
name: string;
|
|
5
|
+
manifest?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SmokeVerification {
|
|
8
|
+
command: string;
|
|
9
|
+
executedBy: 'workflow' | 'agent';
|
|
10
|
+
timeoutSeconds?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface AuditCategoryVerification {
|
|
13
|
+
category: string;
|
|
14
|
+
failOnSeverityAtOrAbove: 'LOW' | 'MED' | 'HIGH' | 'NONE';
|
|
15
|
+
}
|
|
16
|
+
export interface AuditFinalVerification {
|
|
17
|
+
failOnSeverityAtOrAbove: 'LOW' | 'MED' | 'HIGH' | 'NONE';
|
|
18
|
+
}
|
|
19
|
+
export interface VerificationConfig {
|
|
20
|
+
typecheck?: boolean;
|
|
21
|
+
typecheckCommand?: string;
|
|
22
|
+
parseable?: boolean;
|
|
23
|
+
grepMustMatch?: string[];
|
|
24
|
+
grepMustNotMatch?: string[];
|
|
25
|
+
grepFiles?: string[];
|
|
26
|
+
dependencies?: DependencyVerification[];
|
|
27
|
+
smoke?: SmokeVerification;
|
|
28
|
+
auditCategory?: AuditCategoryVerification;
|
|
29
|
+
auditFinal?: AuditFinalVerification;
|
|
30
|
+
}
|
|
31
|
+
export type FeatureFileEntry = string | {
|
|
32
|
+
file: string;
|
|
33
|
+
lines: string | 'new';
|
|
34
|
+
};
|
|
35
|
+
export interface Feature {
|
|
36
|
+
id: string;
|
|
37
|
+
title: string;
|
|
38
|
+
description: string;
|
|
39
|
+
specLines: string;
|
|
40
|
+
status: FeatureStatus;
|
|
41
|
+
startedAt?: string;
|
|
42
|
+
completedAt?: string;
|
|
43
|
+
files: FeatureFileEntry[];
|
|
44
|
+
acceptanceCriteria: string[];
|
|
45
|
+
hints: string[];
|
|
46
|
+
verification: VerificationConfig;
|
|
47
|
+
}
|
|
48
|
+
export interface Sprint {
|
|
49
|
+
index: number;
|
|
50
|
+
name: string;
|
|
51
|
+
status: SprintStatus;
|
|
52
|
+
description: string;
|
|
53
|
+
crossCutting?: string[];
|
|
54
|
+
features: Feature[];
|
|
55
|
+
}
|
|
56
|
+
export interface SprintIndexEntry {
|
|
57
|
+
index: number;
|
|
58
|
+
file: string;
|
|
59
|
+
name: string;
|
|
60
|
+
status: SprintStatus;
|
|
61
|
+
featuresCount: number;
|
|
62
|
+
}
|
|
63
|
+
export interface SprintIndex {
|
|
64
|
+
projectName: string;
|
|
65
|
+
specPath: string;
|
|
66
|
+
totalSprints: number;
|
|
67
|
+
schemaVersion: number;
|
|
68
|
+
description: string;
|
|
69
|
+
sprints: SprintIndexEntry[];
|
|
70
|
+
}
|
|
71
|
+
export type Severity = 'LOW' | 'MED' | 'HIGH' | 'NONE';
|
|
72
|
+
export interface GateResult {
|
|
73
|
+
passed: boolean;
|
|
74
|
+
gate: string;
|
|
75
|
+
message: string;
|
|
76
|
+
details?: string;
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HardnessConfig } from './schema.js';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the default Hardness configuration.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getDefaults(): HardnessConfig;
|
|
6
|
+
/**
|
|
7
|
+
* Validates a configuration object and fills in defaults.
|
|
8
|
+
*/
|
|
9
|
+
export declare function validateConfig(configData: any): HardnessConfig;
|
|
10
|
+
/**
|
|
11
|
+
* Resolves the path to the configuration file (.hardness/config.json)
|
|
12
|
+
*/
|
|
13
|
+
export declare function getConfigFilePath(projectRoot?: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Loads the project configuration, applying defaults for missing fields.
|
|
16
|
+
* If the file does not exist, returns the default configuration.
|
|
17
|
+
*/
|
|
18
|
+
export declare function loadConfig(projectRoot?: string): HardnessConfig;
|
|
19
|
+
export type DeepPartial<T> = T extends object ? {
|
|
20
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
21
|
+
} : T;
|
|
22
|
+
/**
|
|
23
|
+
* Saves the provided configuration to .hardness/config.json
|
|
24
|
+
*/
|
|
25
|
+
export declare function saveConfig(config: DeepPartial<HardnessConfig>, projectRoot?: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Returns partial configurations based on common agent presets.
|
|
28
|
+
* Hardness is tool-agnostic: these are just ready-made examples.
|
|
29
|
+
* The user can define their own `agentCommand` directly in config.json.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getPresetConfig(presetName: string): Partial<HardnessConfig>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { getProjectRoot } from '../common/paths.js';
|
|
4
|
+
import { HardnessConfigSchema } from './schema.js';
|
|
5
|
+
/**
|
|
6
|
+
* Returns the default Hardness configuration.
|
|
7
|
+
*/
|
|
8
|
+
export function getDefaults() {
|
|
9
|
+
return HardnessConfigSchema.parse({});
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Validates a configuration object and fills in defaults.
|
|
13
|
+
*/
|
|
14
|
+
export function validateConfig(configData) {
|
|
15
|
+
return HardnessConfigSchema.parse(configData);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Resolves the path to the configuration file (.hardness/config.json)
|
|
19
|
+
*/
|
|
20
|
+
export function getConfigFilePath(projectRoot) {
|
|
21
|
+
const root = projectRoot || getProjectRoot();
|
|
22
|
+
return path.join(root, '.hardness', 'config.json');
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Loads the project configuration, applying defaults for missing fields.
|
|
26
|
+
* If the file does not exist, returns the default configuration.
|
|
27
|
+
*/
|
|
28
|
+
export function loadConfig(projectRoot) {
|
|
29
|
+
const filePath = getConfigFilePath(projectRoot);
|
|
30
|
+
if (!fs.existsSync(filePath)) {
|
|
31
|
+
return getDefaults();
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
const rawContent = fs.readFileSync(filePath, 'utf-8');
|
|
35
|
+
const parsedJson = JSON.parse(rawContent);
|
|
36
|
+
return validateConfig(parsedJson);
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
throw new Error(`Error reading the configuration file at "${filePath}": ${error.message}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Saves the provided configuration to .hardness/config.json
|
|
44
|
+
*/
|
|
45
|
+
export function saveConfig(config, projectRoot) {
|
|
46
|
+
const filePath = getConfigFilePath(projectRoot);
|
|
47
|
+
const parentDir = path.dirname(filePath);
|
|
48
|
+
if (!fs.existsSync(parentDir)) {
|
|
49
|
+
fs.mkdirSync(parentDir, { recursive: true });
|
|
50
|
+
}
|
|
51
|
+
const validated = validateConfig(config);
|
|
52
|
+
try {
|
|
53
|
+
fs.writeFileSync(filePath, JSON.stringify(validated, null, 2), 'utf-8');
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
throw new Error(`Error writing the configuration file at "${filePath}": ${error.message}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns partial configurations based on common agent presets.
|
|
61
|
+
* Hardness is tool-agnostic: these are just ready-made examples.
|
|
62
|
+
* The user can define their own `agentCommand` directly in config.json.
|
|
63
|
+
*/
|
|
64
|
+
export function getPresetConfig(presetName) {
|
|
65
|
+
switch (presetName.toLowerCase()) {
|
|
66
|
+
case 'claude-code':
|
|
67
|
+
return {
|
|
68
|
+
agent: {
|
|
69
|
+
agentCommand: 'claude -p "$(cat {context_file})"',
|
|
70
|
+
thinkingLevel: 'high',
|
|
71
|
+
timeout: 1800,
|
|
72
|
+
retries: 3
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
case 'codex':
|
|
76
|
+
return {
|
|
77
|
+
agent: {
|
|
78
|
+
agentCommand: 'codex exec "$(cat {context_file})"',
|
|
79
|
+
thinkingLevel: 'high',
|
|
80
|
+
timeout: 1800,
|
|
81
|
+
retries: 3
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
case 'manual':
|
|
85
|
+
return {
|
|
86
|
+
agent: {
|
|
87
|
+
agentCommand: 'node -e "console.log(\'Context generated at: {context_file}. Press ENTER after completing the project changes...\')"',
|
|
88
|
+
thinkingLevel: 'none',
|
|
89
|
+
timeout: 86400, // 24 hours
|
|
90
|
+
retries: 1
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
default:
|
|
94
|
+
return {};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/config/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,o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const AgentConfigSchema: z.ZodObject<{
|
|
3
|
+
agentCommand: z.ZodDefault<z.ZodString>;
|
|
4
|
+
thinkingLevel: z.ZodDefault<z.ZodEnum<["none", "low", "medium", "high", "xhigh"]>>;
|
|
5
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
6
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
agentCommand: string;
|
|
9
|
+
thinkingLevel: "none" | "low" | "medium" | "high" | "xhigh";
|
|
10
|
+
timeout: number;
|
|
11
|
+
retries: number;
|
|
12
|
+
}, {
|
|
13
|
+
agentCommand?: string | undefined;
|
|
14
|
+
thinkingLevel?: "none" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
15
|
+
timeout?: number | undefined;
|
|
16
|
+
retries?: number | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const StackConfigSchema: z.ZodObject<{
|
|
19
|
+
stackProfile: z.ZodDefault<z.ZodEnum<["typescript-node", "generic"]>>;
|
|
20
|
+
typecheckCommand: z.ZodDefault<z.ZodString>;
|
|
21
|
+
typecheckTimeout: z.ZodDefault<z.ZodNumber>;
|
|
22
|
+
ignoreDirs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
23
|
+
sourceExtensions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
stackProfile: "typescript-node" | "generic";
|
|
26
|
+
typecheckCommand: string;
|
|
27
|
+
typecheckTimeout: number;
|
|
28
|
+
ignoreDirs: string[];
|
|
29
|
+
sourceExtensions: string[];
|
|
30
|
+
}, {
|
|
31
|
+
stackProfile?: "typescript-node" | "generic" | undefined;
|
|
32
|
+
typecheckCommand?: string | undefined;
|
|
33
|
+
typecheckTimeout?: number | undefined;
|
|
34
|
+
ignoreDirs?: string[] | undefined;
|
|
35
|
+
sourceExtensions?: string[] | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const SecurityConfigSchema: z.ZodObject<{
|
|
38
|
+
allowedCommandPrefixes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
39
|
+
blockedPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
40
|
+
requireTrustedForUnknown: z.ZodDefault<z.ZodBoolean>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
allowedCommandPrefixes: string[];
|
|
43
|
+
blockedPatterns: string[];
|
|
44
|
+
requireTrustedForUnknown: boolean;
|
|
45
|
+
}, {
|
|
46
|
+
allowedCommandPrefixes?: string[] | undefined;
|
|
47
|
+
blockedPatterns?: string[] | undefined;
|
|
48
|
+
requireTrustedForUnknown?: boolean | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const LogsConfigSchema: z.ZodObject<{
|
|
51
|
+
logDir: z.ZodDefault<z.ZodString>;
|
|
52
|
+
redactSecrets: z.ZodDefault<z.ZodBoolean>;
|
|
53
|
+
redactPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
54
|
+
retentionDays: z.ZodDefault<z.ZodNumber>;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
logDir: string;
|
|
57
|
+
redactSecrets: boolean;
|
|
58
|
+
redactPatterns: string[];
|
|
59
|
+
retentionDays: number;
|
|
60
|
+
}, {
|
|
61
|
+
logDir?: string | undefined;
|
|
62
|
+
redactSecrets?: boolean | undefined;
|
|
63
|
+
redactPatterns?: string[] | undefined;
|
|
64
|
+
retentionDays?: number | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export declare const ScoringConfigSchema: z.ZodObject<{
|
|
67
|
+
minScore: z.ZodDefault<z.ZodNumber>;
|
|
68
|
+
blockBelowMin: z.ZodDefault<z.ZodBoolean>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
minScore: number;
|
|
71
|
+
blockBelowMin: boolean;
|
|
72
|
+
}, {
|
|
73
|
+
minScore?: number | undefined;
|
|
74
|
+
blockBelowMin?: boolean | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
export declare const HardnessConfigSchema: z.ZodObject<{
|
|
77
|
+
agent: z.ZodDefault<z.ZodObject<{
|
|
78
|
+
agentCommand: z.ZodDefault<z.ZodString>;
|
|
79
|
+
thinkingLevel: z.ZodDefault<z.ZodEnum<["none", "low", "medium", "high", "xhigh"]>>;
|
|
80
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
81
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
agentCommand: string;
|
|
84
|
+
thinkingLevel: "none" | "low" | "medium" | "high" | "xhigh";
|
|
85
|
+
timeout: number;
|
|
86
|
+
retries: number;
|
|
87
|
+
}, {
|
|
88
|
+
agentCommand?: string | undefined;
|
|
89
|
+
thinkingLevel?: "none" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
90
|
+
timeout?: number | undefined;
|
|
91
|
+
retries?: number | undefined;
|
|
92
|
+
}>>;
|
|
93
|
+
stack: z.ZodDefault<z.ZodObject<{
|
|
94
|
+
stackProfile: z.ZodDefault<z.ZodEnum<["typescript-node", "generic"]>>;
|
|
95
|
+
typecheckCommand: z.ZodDefault<z.ZodString>;
|
|
96
|
+
typecheckTimeout: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
ignoreDirs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
98
|
+
sourceExtensions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
stackProfile: "typescript-node" | "generic";
|
|
101
|
+
typecheckCommand: string;
|
|
102
|
+
typecheckTimeout: number;
|
|
103
|
+
ignoreDirs: string[];
|
|
104
|
+
sourceExtensions: string[];
|
|
105
|
+
}, {
|
|
106
|
+
stackProfile?: "typescript-node" | "generic" | undefined;
|
|
107
|
+
typecheckCommand?: string | undefined;
|
|
108
|
+
typecheckTimeout?: number | undefined;
|
|
109
|
+
ignoreDirs?: string[] | undefined;
|
|
110
|
+
sourceExtensions?: string[] | undefined;
|
|
111
|
+
}>>;
|
|
112
|
+
security: z.ZodDefault<z.ZodObject<{
|
|
113
|
+
allowedCommandPrefixes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
114
|
+
blockedPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
115
|
+
requireTrustedForUnknown: z.ZodDefault<z.ZodBoolean>;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
allowedCommandPrefixes: string[];
|
|
118
|
+
blockedPatterns: string[];
|
|
119
|
+
requireTrustedForUnknown: boolean;
|
|
120
|
+
}, {
|
|
121
|
+
allowedCommandPrefixes?: string[] | undefined;
|
|
122
|
+
blockedPatterns?: string[] | undefined;
|
|
123
|
+
requireTrustedForUnknown?: boolean | undefined;
|
|
124
|
+
}>>;
|
|
125
|
+
logs: z.ZodDefault<z.ZodObject<{
|
|
126
|
+
logDir: z.ZodDefault<z.ZodString>;
|
|
127
|
+
redactSecrets: z.ZodDefault<z.ZodBoolean>;
|
|
128
|
+
redactPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
129
|
+
retentionDays: z.ZodDefault<z.ZodNumber>;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
logDir: string;
|
|
132
|
+
redactSecrets: boolean;
|
|
133
|
+
redactPatterns: string[];
|
|
134
|
+
retentionDays: number;
|
|
135
|
+
}, {
|
|
136
|
+
logDir?: string | undefined;
|
|
137
|
+
redactSecrets?: boolean | undefined;
|
|
138
|
+
redactPatterns?: string[] | undefined;
|
|
139
|
+
retentionDays?: number | undefined;
|
|
140
|
+
}>>;
|
|
141
|
+
scoring: z.ZodDefault<z.ZodObject<{
|
|
142
|
+
minScore: z.ZodDefault<z.ZodNumber>;
|
|
143
|
+
blockBelowMin: z.ZodDefault<z.ZodBoolean>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
minScore: number;
|
|
146
|
+
blockBelowMin: boolean;
|
|
147
|
+
}, {
|
|
148
|
+
minScore?: number | undefined;
|
|
149
|
+
blockBelowMin?: boolean | undefined;
|
|
150
|
+
}>>;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
agent: {
|
|
153
|
+
agentCommand: string;
|
|
154
|
+
thinkingLevel: "none" | "low" | "medium" | "high" | "xhigh";
|
|
155
|
+
timeout: number;
|
|
156
|
+
retries: number;
|
|
157
|
+
};
|
|
158
|
+
stack: {
|
|
159
|
+
stackProfile: "typescript-node" | "generic";
|
|
160
|
+
typecheckCommand: string;
|
|
161
|
+
typecheckTimeout: number;
|
|
162
|
+
ignoreDirs: string[];
|
|
163
|
+
sourceExtensions: string[];
|
|
164
|
+
};
|
|
165
|
+
security: {
|
|
166
|
+
allowedCommandPrefixes: string[];
|
|
167
|
+
blockedPatterns: string[];
|
|
168
|
+
requireTrustedForUnknown: boolean;
|
|
169
|
+
};
|
|
170
|
+
logs: {
|
|
171
|
+
logDir: string;
|
|
172
|
+
redactSecrets: boolean;
|
|
173
|
+
redactPatterns: string[];
|
|
174
|
+
retentionDays: number;
|
|
175
|
+
};
|
|
176
|
+
scoring: {
|
|
177
|
+
minScore: number;
|
|
178
|
+
blockBelowMin: boolean;
|
|
179
|
+
};
|
|
180
|
+
}, {
|
|
181
|
+
agent?: {
|
|
182
|
+
agentCommand?: string | undefined;
|
|
183
|
+
thinkingLevel?: "none" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
184
|
+
timeout?: number | undefined;
|
|
185
|
+
retries?: number | undefined;
|
|
186
|
+
} | undefined;
|
|
187
|
+
stack?: {
|
|
188
|
+
stackProfile?: "typescript-node" | "generic" | undefined;
|
|
189
|
+
typecheckCommand?: string | undefined;
|
|
190
|
+
typecheckTimeout?: number | undefined;
|
|
191
|
+
ignoreDirs?: string[] | undefined;
|
|
192
|
+
sourceExtensions?: string[] | undefined;
|
|
193
|
+
} | undefined;
|
|
194
|
+
security?: {
|
|
195
|
+
allowedCommandPrefixes?: string[] | undefined;
|
|
196
|
+
blockedPatterns?: string[] | undefined;
|
|
197
|
+
requireTrustedForUnknown?: boolean | undefined;
|
|
198
|
+
} | undefined;
|
|
199
|
+
logs?: {
|
|
200
|
+
logDir?: string | undefined;
|
|
201
|
+
redactSecrets?: boolean | undefined;
|
|
202
|
+
redactPatterns?: string[] | undefined;
|
|
203
|
+
retentionDays?: number | undefined;
|
|
204
|
+
} | undefined;
|
|
205
|
+
scoring?: {
|
|
206
|
+
minScore?: number | undefined;
|
|
207
|
+
blockBelowMin?: boolean | undefined;
|
|
208
|
+
} | undefined;
|
|
209
|
+
}>;
|
|
210
|
+
export type HardnessConfig = z.infer<typeof HardnessConfigSchema>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const AgentConfigSchema = z.object({
|
|
3
|
+
// Default is a placeholder that instructs the user to configure their agent.
|
|
4
|
+
// Use `getPresetConfig()` to obtain ready-made commands for common agents.
|
|
5
|
+
agentCommand: z.string().default('echo "[hardness] Configure agentCommand in .hardness/config.json with your agent (use getPresetConfig for presets). Context at: {context_file}"'),
|
|
6
|
+
thinkingLevel: z.enum(['none', 'low', 'medium', 'high', 'xhigh']).default('high'),
|
|
7
|
+
timeout: z.number().default(2400),
|
|
8
|
+
retries: z.number().default(4),
|
|
9
|
+
});
|
|
10
|
+
export const StackConfigSchema = z.object({
|
|
11
|
+
stackProfile: z.enum(['typescript-node', 'generic']).default('typescript-node'),
|
|
12
|
+
typecheckCommand: z.string().default('npm run typecheck'),
|
|
13
|
+
typecheckTimeout: z.number().default(180),
|
|
14
|
+
ignoreDirs: z.array(z.string()).default(['node_modules', 'dist', '.git', '.hardness']),
|
|
15
|
+
sourceExtensions: z.array(z.string()).default(['.ts', '.tsx', '.js', '.jsx', '.json', '.yaml', '.toml']),
|
|
16
|
+
});
|
|
17
|
+
export const SecurityConfigSchema = z.object({
|
|
18
|
+
allowedCommandPrefixes: z.array(z.string()).default(['grep', 'cat', 'node', 'npm', 'npx', 'tsc', 'python']),
|
|
19
|
+
blockedPatterns: z.array(z.string()).default(['rm\\s+-rf', 'curl.*\\|.*sh', 'wget.*\\|.*sh', 'sudo\\s+']),
|
|
20
|
+
requireTrustedForUnknown: z.boolean().default(true),
|
|
21
|
+
});
|
|
22
|
+
export const LogsConfigSchema = z.object({
|
|
23
|
+
logDir: z.string().default('.hardness/logs'),
|
|
24
|
+
redactSecrets: z.boolean().default(true),
|
|
25
|
+
redactPatterns: z.array(z.string()).default([
|
|
26
|
+
'(?i)(api[_-]?key|token|secret|password|auth)\\s*[:=]\\s*\\S+'
|
|
27
|
+
]),
|
|
28
|
+
retentionDays: z.number().default(30),
|
|
29
|
+
});
|
|
30
|
+
export const ScoringConfigSchema = z.object({
|
|
31
|
+
minScore: z.number().default(6.0),
|
|
32
|
+
blockBelowMin: z.boolean().default(true),
|
|
33
|
+
});
|
|
34
|
+
export const HardnessConfigSchema = z.object({
|
|
35
|
+
agent: AgentConfigSchema.default({}),
|
|
36
|
+
stack: StackConfigSchema.default({}),
|
|
37
|
+
security: SecurityConfigSchema.default({}),
|
|
38
|
+
logs: LogsConfigSchema.default({}),
|
|
39
|
+
scoring: ScoringConfigSchema.default({}),
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,6EAA6E;IAC7E,2EAA2E;IAC3E,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,iJAAiJ,CAAC;IACnL,aAAa,EAAE,CAAC,CAAC,IAAI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,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { globalAnalyzerRegistry } from '@hardness/analyzers';
|
|
2
|
+
/**
|
|
3
|
+
* Static Analysis Gate: integrates the orchestrator's gate engine with the
|
|
4
|
+
* global analyzer registry, blocking approval of code with static errors.
|
|
5
|
+
*/
|
|
6
|
+
export const AnalyzerGate = {
|
|
7
|
+
name: 'analyzer',
|
|
8
|
+
async run(feature, config, projectRoot) {
|
|
9
|
+
const profile = config.stack.stackProfile;
|
|
10
|
+
try {
|
|
11
|
+
const diagnostics = await globalAnalyzerRegistry.runAll(profile, projectRoot);
|
|
12
|
+
const errors = diagnostics.filter((d) => d.severity === 'error');
|
|
13
|
+
if (errors.length > 0) {
|
|
14
|
+
const details = errors.map((e) => `[${e.file}${e.line ? `:${e.line}` : ''}] (${e.ruleId}): ${e.message}`);
|
|
15
|
+
return {
|
|
16
|
+
passed: false,
|
|
17
|
+
gate: 'analyzer',
|
|
18
|
+
message: 'Static analysis failed in the registered analyzers.',
|
|
19
|
+
details: details.join('\n')
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
passed: true,
|
|
24
|
+
gate: 'analyzer',
|
|
25
|
+
message: `Static analysis OK. (${diagnostics.length} diagnostics analyzed)`
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
return {
|
|
30
|
+
passed: false,
|
|
31
|
+
gate: 'analyzer',
|
|
32
|
+
message: `Failed to run code analyzers: ${err.message}`
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=analyzer-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyzer-gate.js","sourceRoot":"","sources":["../../src/gates/analyzer-gate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;;GAGG;AACH,MAAM,C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0,0 +1,71 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { safeProjectPath } from '../common/paths.js';
|
|
3
|
+
/**
|
|
4
|
+
* Dependencies Gate: validates that libraries declared in the feature are present in the package manifest.
|
|
5
|
+
*/
|
|
6
|
+
export const DependencyGate = {
|
|
7
|
+
name: 'dependencies',
|
|
8
|
+
async run(feature, config, projectRoot) {
|
|
9
|
+
const deps = feature.verification.dependencies;
|
|
10
|
+
if (!deps || deps.length === 0) {
|
|
11
|
+
return { passed: true, gate: 'dependencies', message: 'No dependencies configured for validation.' };
|
|
12
|
+
}
|
|
13
|
+
const stackProfile = config.stack.stackProfile;
|
|
14
|
+
for (const dep of deps) {
|
|
15
|
+
let manifestFile = dep.manifest;
|
|
16
|
+
// Default manifest resolution per stack profile if not specified
|
|
17
|
+
if (!manifestFile) {
|
|
18
|
+
if (stackProfile === 'typescript-node') {
|
|
19
|
+
manifestFile = 'package.json';
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
// Skip for generic or unmapped profiles
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const absManifest = safeProjectPath(manifestFile, projectRoot);
|
|
28
|
+
if (!fs.existsSync(absManifest)) {
|
|
29
|
+
return {
|
|
30
|
+
passed: false,
|
|
31
|
+
gate: 'dependencies',
|
|
32
|
+
message: `Dependency manifest not found on disk: "${manifestFile}"`
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const raw = fs.readFileSync(absManifest, 'utf-8');
|
|
36
|
+
if (manifestFile.endsWith('package.json')) {
|
|
37
|
+
const pkg = JSON.parse(raw);
|
|
38
|
+
const hasDep = (pkg.dependencies && pkg.dependencies[dep.name]) ||
|
|
39
|
+
(pkg.devDependencies && pkg.devDependencies[dep.name]) ||
|
|
40
|
+
(pkg.peerDependencies && pkg.peerDependencies[dep.name]);
|
|
41
|
+
if (!hasDep) {
|
|
42
|
+
return {
|
|
43
|
+
passed: false,
|
|
44
|
+
gate: 'dependencies',
|
|
45
|
+
message: `Dependency "${dep.name}" not found in "${manifestFile}".`
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
// Textual fallback for other formats (e.g. Cargo.toml, requirements.txt)
|
|
51
|
+
if (!raw.includes(dep.name)) {
|
|
52
|
+
return {
|
|
53
|
+
passed: false,
|
|
54
|
+
gate: 'dependencies',
|
|
55
|
+
message: `Dependency "${dep.name}" not found in "${manifestFile}" (textual search).`
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
return {
|
|
62
|
+
passed: false,
|
|
63
|
+
gate: 'dependencies',
|
|
64
|
+
message: `Error validating dependency "${dep.name}" in manifest "${manifestFile}": ${err.message}`
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return { passed: true, gate: 'dependencies', message: 'Dependencies OK' };
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=dependency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency.js","sourceRoot":"","sources":["../../src/gates/dependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAIpB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAS;IAClC,IAAI,EAAE,cAAc;IACpB,KAAK,CAAC,GAAG,CAAC,OAAgB,EAAE,MAAsB,EAAE,WAAmB;QACrE,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC;QAC/C,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,4CAA4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;4BACL,MAAM,EAAE,KAAK;4BACb,IAAI,EAAE,cAAc;4BACpB,OAAO,EAAE,eAAe,GAAG,CAAC,IAAI,mBAAmB,YAAY,IAAI;yBACpE,CAAC;oBACJ,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,yEAAyE;oBACzE,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;wBAC5B,OAAO;4BACL,MAAM,EAAE,KAAK;4BACb,IAAI,EAAE,cAAc;4BACpB,OAAO,EAAE,eAAe,GAAG,CAAC,IAAI,mBAAmB,YAAY,qBAAqB;yBACrF,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO;oBACL,MAAM,EAAE,KAAK;oBACb,IAAI,EAAE,cAAc;oBACpB,OAAO,EAAE,gCAAgC,GAAG,CAAC,IAAI,kBAAkB,YAAY,MAAO,GAAa,CAAC,OAAO,EAAE;iBAC9G,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC5E,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Feature, GateResult } from '../common/types.js';
|
|
2
|
+
import { HardnessConfig } from '../config/schema.js';
|
|
3
|
+
export interface Gate {
|
|
4
|
+
name: string;
|
|
5
|
+
run(feature: Feature, config: HardnessConfig, projectRoot: string): Promise<GateResult>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Central engine that runs the mechanical validation gates.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GateEngine {
|
|
11
|
+
private gates;
|
|
12
|
+
/**
|
|
13
|
+
* Registers a new mechanical gate in the engine.
|
|
14
|
+
*/
|
|
15
|
+
register(gate: Gate): void;
|
|
16
|
+
/**
|
|
17
|
+
* Returns all registered gates.
|
|
18
|
+
*/
|
|
19
|
+
getRegisteredGates(): Gate[];
|
|
20
|
+
/**
|
|
21
|
+
* Runs all gates in sequence for a given feature.
|
|
22
|
+
* By default, stops at the first failing gate.
|
|
23
|
+
*/
|
|
24
|
+
runAll(feature: Feature, config: HardnessConfig, projectRoot: string, collectAll?: boolean): Promise<GateResult[]>;
|
|
25
|
+
}
|
|
26
|
+
export declare const globalGateEngine: GateEngine;
|