@interf/compiler 0.6.1 → 0.6.4
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 +106 -80
- package/builtin-workflows/interf/README.md +5 -5
- package/builtin-workflows/interf/compile/stages/shape/SKILL.md +4 -4
- package/builtin-workflows/interf/improve/SKILL.md +2 -2
- package/builtin-workflows/interf/use/query/SKILL.md +1 -1
- package/builtin-workflows/interf/workflow.json +6 -6
- package/builtin-workflows/interf/workflow.schema.json +1 -1
- package/dist/bin.js +2 -28
- package/dist/{commands → cli/commands}/check-draft.d.ts +2 -2
- package/dist/{commands → cli/commands}/check-draft.js +16 -16
- package/dist/{commands → cli/commands}/compile-controller.d.ts +3 -3
- package/dist/{commands → cli/commands}/compile-controller.js +37 -35
- package/dist/{commands → cli/commands}/compile.d.ts +2 -2
- package/dist/{commands → cli/commands}/compile.js +15 -11
- package/dist/{commands → cli/commands}/compiled-flow.d.ts +3 -4
- package/dist/{commands → cli/commands}/compiled-flow.js +9 -14
- package/dist/{commands → cli/commands}/create-workflow-wizard.d.ts +3 -3
- package/dist/{commands → cli/commands}/create-workflow-wizard.js +64 -37
- package/dist/{commands → cli/commands}/create.d.ts +1 -1
- package/dist/{commands → cli/commands}/create.js +15 -18
- package/dist/{commands → cli/commands}/dataset-selection.d.ts +1 -1
- package/dist/{commands → cli/commands}/default.js +3 -3
- package/dist/{commands → cli/commands}/doctor.js +5 -6
- package/dist/{commands → cli/commands}/executor-flow.d.ts +1 -1
- package/dist/{commands → cli/commands}/executor-flow.js +13 -16
- package/dist/{commands → cli/commands}/init.d.ts +4 -1
- package/dist/{commands → cli/commands}/init.js +162 -77
- package/dist/{commands → cli/commands}/list.js +6 -6
- package/dist/{commands → cli/commands}/reset.js +4 -4
- package/dist/{commands → cli/commands}/source-config-wizard.d.ts +9 -4
- package/dist/{commands → cli/commands}/source-config-wizard.js +168 -94
- package/dist/{commands → cli/commands}/status.js +20 -11
- package/dist/{commands → cli/commands}/test-flow.d.ts +13 -4
- package/dist/{commands → cli/commands}/test-flow.js +52 -48
- package/dist/cli/commands/test.d.ts +14 -0
- package/dist/{commands → cli/commands}/test.js +40 -24
- package/dist/{commands → cli/commands}/verify.js +4 -4
- package/dist/cli/index.d.ts +21 -0
- package/dist/cli/index.js +33 -0
- package/dist/index.d.ts +22 -11
- package/dist/index.js +15 -6
- package/dist/lib/agent-args.d.ts +1 -4
- package/dist/lib/agent-args.js +1 -52
- package/dist/lib/agent-constants.d.ts +1 -5
- package/dist/lib/agent-constants.js +1 -28
- package/dist/lib/agent-detection.d.ts +1 -7
- package/dist/lib/agent-detection.js +1 -65
- package/dist/lib/agent-execution.d.ts +1 -2
- package/dist/lib/agent-execution.js +1 -243
- package/dist/lib/agent-logs.d.ts +1 -2
- package/dist/lib/agent-logs.js +1 -17
- package/dist/lib/agent-preflight.d.ts +1 -7
- package/dist/lib/agent-preflight.js +1 -77
- package/dist/lib/agent-render.d.ts +1 -8
- package/dist/lib/agent-render.js +1 -218
- package/dist/lib/agent-shells.d.ts +1 -69
- package/dist/lib/agent-shells.js +1 -1021
- package/dist/lib/agent-status.d.ts +1 -3
- package/dist/lib/agent-status.js +1 -58
- package/dist/lib/agent-types.d.ts +1 -30
- package/dist/lib/agent-types.js +1 -1
- package/dist/lib/agents.d.ts +1 -6
- package/dist/lib/agents.js +1 -5
- package/dist/lib/builtin-compiled-workflow.d.ts +1 -38
- package/dist/lib/builtin-compiled-workflow.js +1 -94
- package/dist/lib/chart-guidance.d.ts +1 -1
- package/dist/lib/chart-guidance.js +1 -8
- package/dist/lib/compiled-compile.d.ts +1 -48
- package/dist/lib/compiled-compile.js +1 -255
- package/dist/lib/compiled-paths.d.ts +1 -40
- package/dist/lib/compiled-paths.js +3 -106
- package/dist/lib/compiled-raw.d.ts +1 -49
- package/dist/lib/compiled-raw.js +3 -102
- package/dist/lib/compiled-reset.d.ts +1 -2
- package/dist/lib/compiled-reset.js +3 -72
- package/dist/lib/compiled-schema.d.ts +1 -31
- package/dist/lib/compiled-schema.js +1 -141
- package/dist/lib/discovery.d.ts +1 -7
- package/dist/lib/discovery.js +1 -84
- package/dist/lib/execution-profile.d.ts +1 -17
- package/dist/lib/execution-profile.js +1 -84
- package/dist/lib/executors.d.ts +1 -32
- package/dist/lib/executors.js +1 -43
- package/dist/lib/filesystem.d.ts +1 -2
- package/dist/lib/filesystem.js +1 -55
- package/dist/lib/interf-bootstrap.d.ts +1 -3
- package/dist/lib/interf-bootstrap.js +3 -18
- package/dist/lib/interf-detect.d.ts +1 -33
- package/dist/lib/interf-detect.js +3 -176
- package/dist/lib/interf-scaffold.d.ts +1 -2
- package/dist/lib/interf-scaffold.js +3 -114
- package/dist/lib/interf-workflow-package.d.ts +1 -25
- package/dist/lib/interf-workflow-package.js +1 -342
- package/dist/lib/interf.d.ts +1 -5
- package/dist/lib/interf.js +3 -4
- package/dist/lib/local-workflows.d.ts +1 -54
- package/dist/lib/local-workflows.js +1 -422
- package/dist/lib/logger.d.ts +1 -3
- package/dist/lib/logger.js +1 -10
- package/dist/lib/package-root.d.ts +1 -0
- package/dist/lib/package-root.js +1 -0
- package/dist/lib/parse.d.ts +1 -8
- package/dist/lib/parse.js +1 -145
- package/dist/lib/project-paths.d.ts +1 -11
- package/dist/lib/project-paths.js +3 -32
- package/dist/lib/runtime-acceptance.d.ts +1 -9
- package/dist/lib/runtime-acceptance.js +1 -269
- package/dist/lib/runtime-contracts.d.ts +1 -2
- package/dist/lib/runtime-contracts.js +1 -48
- package/dist/lib/runtime-inventory.d.ts +1 -7
- package/dist/lib/runtime-inventory.js +1 -29
- package/dist/lib/runtime-paths.d.ts +1 -8
- package/dist/lib/runtime-paths.js +1 -26
- package/dist/lib/runtime-prompt.d.ts +1 -2
- package/dist/lib/runtime-prompt.js +1 -48
- package/dist/lib/runtime-reconcile.d.ts +1 -2
- package/dist/lib/runtime-reconcile.js +1 -193
- package/dist/lib/runtime-runs.d.ts +1 -11
- package/dist/lib/runtime-runs.js +1 -262
- package/dist/lib/runtime-types.d.ts +1 -43
- package/dist/lib/runtime-types.js +1 -1
- package/dist/lib/runtime.d.ts +1 -6
- package/dist/lib/runtime.js +1 -5
- package/dist/lib/schema.d.ts +4 -1073
- package/dist/lib/schema.js +6 -542
- package/dist/lib/source-config.d.ts +1 -39
- package/dist/lib/source-config.js +3 -293
- package/dist/lib/state-artifacts.d.ts +1 -8
- package/dist/lib/state-artifacts.js +1 -13
- package/dist/lib/state-health.d.ts +1 -4
- package/dist/lib/state-health.js +1 -132
- package/dist/lib/state-io.d.ts +1 -10
- package/dist/lib/state-io.js +1 -76
- package/dist/lib/state-paths.d.ts +1 -4
- package/dist/lib/state-paths.js +1 -13
- package/dist/lib/state-view.d.ts +1 -4
- package/dist/lib/state-view.js +1 -103
- package/dist/lib/state.d.ts +1 -7
- package/dist/lib/state.js +1 -12
- package/dist/lib/test-execution.d.ts +1 -14
- package/dist/lib/test-execution.js +3 -525
- package/dist/lib/test-matrices.d.ts +1 -90
- package/dist/lib/test-matrices.js +3 -96
- package/dist/lib/test-paths.d.ts +1 -12
- package/dist/lib/test-paths.js +3 -59
- package/dist/lib/test-profile-presets.d.ts +1 -57
- package/dist/lib/test-profile-presets.js +3 -50
- package/dist/lib/test-sandbox.d.ts +1 -11
- package/dist/lib/test-sandbox.js +3 -105
- package/dist/lib/test-specs.d.ts +1 -7
- package/dist/lib/test-specs.js +3 -114
- package/dist/lib/test-targets.d.ts +1 -5
- package/dist/lib/test-targets.js +3 -38
- package/dist/lib/test-types.d.ts +1 -17
- package/dist/lib/test-types.js +3 -1
- package/dist/lib/test.d.ts +1 -4
- package/dist/lib/test.js +3 -3
- package/dist/lib/util.d.ts +1 -4
- package/dist/lib/util.js +1 -25
- package/dist/lib/validate-compiled.d.ts +1 -27
- package/dist/lib/validate-compiled.js +1 -241
- package/dist/lib/validate-helpers.d.ts +1 -12
- package/dist/lib/validate-helpers.js +1 -41
- package/dist/lib/validate.d.ts +1 -21
- package/dist/lib/validate.js +1 -249
- package/dist/lib/workflow-authoring.d.ts +1 -26
- package/dist/lib/workflow-authoring.js +1 -119
- package/dist/lib/workflow-definitions.d.ts +1 -78
- package/dist/lib/workflow-definitions.js +1 -203
- package/dist/lib/workflow-edit-session.d.ts +1 -16
- package/dist/lib/workflow-edit-session.js +1 -57
- package/dist/lib/workflow-edit-utils.d.ts +1 -10
- package/dist/lib/workflow-edit-utils.js +1 -39
- package/dist/lib/workflow-helpers.d.ts +1 -38
- package/dist/lib/workflow-helpers.js +1 -167
- package/dist/lib/workflow-improvement.d.ts +1 -22
- package/dist/lib/workflow-improvement.js +1 -209
- package/dist/lib/workflow-primitives.d.ts +1 -2
- package/dist/lib/workflow-primitives.js +1 -5
- package/dist/lib/workflow-review-paths.d.ts +1 -10
- package/dist/lib/workflow-review-paths.js +1 -27
- package/dist/lib/workflow-stage-policy.d.ts +1 -5
- package/dist/lib/workflow-stage-policy.js +1 -31
- package/dist/lib/workflow-stage-runner.d.ts +1 -41
- package/dist/lib/workflow-stage-runner.js +1 -109
- package/dist/lib/workflows.d.ts +1 -15
- package/dist/lib/workflows.js +1 -31
- package/dist/packages/agents/index.d.ts +18 -0
- package/dist/packages/agents/index.js +16 -0
- package/dist/packages/agents/lib/agents.d.ts +6 -0
- package/dist/packages/agents/lib/agents.js +5 -0
- package/dist/packages/agents/lib/args.d.ts +4 -0
- package/dist/packages/agents/lib/args.js +52 -0
- package/dist/packages/agents/lib/chart-guidance.d.ts +1 -0
- package/dist/packages/agents/lib/chart-guidance.js +8 -0
- package/dist/packages/agents/lib/compiled-bootstrap.d.ts +3 -0
- package/dist/packages/agents/lib/compiled-bootstrap.js +18 -0
- package/dist/packages/agents/lib/constants.d.ts +5 -0
- package/dist/packages/agents/lib/constants.js +28 -0
- package/dist/packages/agents/lib/detection.d.ts +7 -0
- package/dist/packages/agents/lib/detection.js +65 -0
- package/dist/packages/agents/lib/execution-profile.d.ts +17 -0
- package/dist/packages/agents/lib/execution-profile.js +84 -0
- package/dist/packages/agents/lib/execution.d.ts +2 -0
- package/dist/packages/agents/lib/execution.js +243 -0
- package/dist/packages/agents/lib/executors.d.ts +32 -0
- package/dist/packages/agents/lib/executors.js +45 -0
- package/dist/packages/agents/lib/logs.d.ts +2 -0
- package/dist/packages/agents/lib/logs.js +17 -0
- package/dist/packages/agents/lib/preflight.d.ts +7 -0
- package/dist/packages/agents/lib/preflight.js +77 -0
- package/dist/packages/agents/lib/render.d.ts +8 -0
- package/dist/packages/agents/lib/render.js +218 -0
- package/dist/packages/agents/lib/schema.d.ts +8 -0
- package/dist/packages/agents/lib/schema.js +7 -0
- package/dist/packages/agents/lib/shells.d.ts +71 -0
- package/dist/packages/agents/lib/shells.js +1023 -0
- package/dist/packages/agents/lib/status.d.ts +3 -0
- package/dist/packages/agents/lib/status.js +58 -0
- package/dist/packages/agents/lib/types.d.ts +30 -0
- package/dist/packages/agents/lib/types.js +1 -0
- package/dist/{lib → packages/agents/lib}/user-config.d.ts +1 -0
- package/dist/{lib → packages/agents/lib}/user-config.js +3 -2
- package/dist/packages/compiler/compiled-compile.d.ts +4 -0
- package/dist/packages/compiler/compiled-compile.js +4 -0
- package/dist/packages/compiler/compiled-paths.d.ts +40 -0
- package/dist/packages/compiler/compiled-paths.js +106 -0
- package/dist/packages/compiler/compiled-pipeline.d.ts +39 -0
- package/dist/packages/compiler/compiled-pipeline.js +134 -0
- package/dist/packages/compiler/compiled-schema.d.ts +31 -0
- package/dist/packages/compiler/compiled-schema.js +141 -0
- package/dist/packages/compiler/compiled-stage-plan.d.ts +15 -0
- package/dist/packages/compiler/compiled-stage-plan.js +79 -0
- package/dist/packages/compiler/compiled-stage-runner.d.ts +10 -0
- package/dist/packages/compiler/compiled-stage-runner.js +46 -0
- package/dist/packages/compiler/compiled-target.d.ts +11 -0
- package/dist/packages/compiler/compiled-target.js +16 -0
- package/dist/packages/compiler/discovery.d.ts +7 -0
- package/dist/packages/compiler/discovery.js +80 -0
- package/dist/packages/compiler/index.d.ts +24 -0
- package/dist/packages/compiler/index.js +23 -0
- package/dist/packages/compiler/lib/schema.d.ts +684 -0
- package/dist/packages/compiler/lib/schema.js +363 -0
- package/dist/packages/compiler/raw-snapshot.d.ts +49 -0
- package/dist/packages/compiler/raw-snapshot.js +102 -0
- package/dist/packages/compiler/reset.d.ts +2 -0
- package/dist/packages/compiler/reset.js +72 -0
- package/dist/packages/compiler/runtime-acceptance.d.ts +9 -0
- package/dist/packages/compiler/runtime-acceptance.js +269 -0
- package/dist/packages/compiler/runtime-contracts.d.ts +2 -0
- package/dist/packages/compiler/runtime-contracts.js +48 -0
- package/dist/packages/compiler/runtime-inventory.d.ts +7 -0
- package/dist/packages/compiler/runtime-inventory.js +29 -0
- package/dist/packages/compiler/runtime-paths.d.ts +8 -0
- package/dist/packages/compiler/runtime-paths.js +26 -0
- package/dist/packages/compiler/runtime-prompt.d.ts +2 -0
- package/dist/packages/compiler/runtime-prompt.js +48 -0
- package/dist/packages/compiler/runtime-reconcile.d.ts +2 -0
- package/dist/packages/compiler/runtime-reconcile.js +193 -0
- package/dist/packages/compiler/runtime-runs.d.ts +11 -0
- package/dist/packages/compiler/runtime-runs.js +262 -0
- package/dist/packages/compiler/runtime-types.d.ts +43 -0
- package/dist/packages/compiler/runtime-types.js +1 -0
- package/dist/packages/compiler/runtime.d.ts +6 -0
- package/dist/packages/compiler/runtime.js +5 -0
- package/dist/packages/compiler/state-artifacts.d.ts +8 -0
- package/dist/packages/compiler/state-artifacts.js +13 -0
- package/dist/packages/compiler/state-health.d.ts +4 -0
- package/dist/packages/compiler/state-health.js +132 -0
- package/dist/packages/compiler/state-io.d.ts +10 -0
- package/dist/packages/compiler/state-io.js +76 -0
- package/dist/packages/compiler/state-paths.d.ts +4 -0
- package/dist/packages/compiler/state-paths.js +13 -0
- package/dist/packages/compiler/state-view.d.ts +4 -0
- package/dist/packages/compiler/state-view.js +103 -0
- package/dist/packages/compiler/state.d.ts +7 -0
- package/dist/packages/compiler/state.js +12 -0
- package/dist/packages/compiler/validate-compiled.d.ts +27 -0
- package/dist/packages/compiler/validate-compiled.js +241 -0
- package/dist/packages/compiler/validate-helpers.d.ts +12 -0
- package/dist/packages/compiler/validate-helpers.js +41 -0
- package/dist/packages/compiler/validate.d.ts +21 -0
- package/dist/packages/compiler/validate.js +249 -0
- package/dist/packages/compiler/workflow-primitives.d.ts +2 -0
- package/dist/packages/compiler/workflow-primitives.js +5 -0
- package/dist/packages/compiler/workflows.d.ts +15 -0
- package/dist/packages/compiler/workflows.js +31 -0
- package/dist/packages/project-model/compiled-paths.d.ts +1 -0
- package/dist/packages/project-model/compiled-paths.js +1 -0
- package/dist/packages/project-model/compiled-raw.d.ts +1 -0
- package/dist/packages/project-model/compiled-raw.js +1 -0
- package/dist/packages/project-model/compiled-reset.d.ts +1 -0
- package/dist/packages/project-model/compiled-reset.js +1 -0
- package/dist/packages/project-model/index.d.ts +11 -0
- package/dist/packages/project-model/index.js +10 -0
- package/dist/packages/project-model/interf-bootstrap.d.ts +1 -0
- package/dist/packages/project-model/interf-bootstrap.js +1 -0
- package/dist/packages/project-model/interf-detect.d.ts +33 -0
- package/dist/packages/project-model/interf-detect.js +176 -0
- package/dist/packages/project-model/interf-scaffold.d.ts +2 -0
- package/dist/packages/project-model/interf-scaffold.js +124 -0
- package/dist/packages/project-model/interf.d.ts +5 -0
- package/dist/packages/project-model/interf.js +4 -0
- package/dist/packages/project-model/lib/schema.d.ts +125 -0
- package/dist/packages/project-model/lib/schema.js +62 -0
- package/dist/packages/project-model/project-paths.d.ts +11 -0
- package/dist/packages/project-model/project-paths.js +32 -0
- package/dist/packages/project-model/source-config.d.ts +38 -0
- package/dist/packages/project-model/source-config.js +298 -0
- package/dist/packages/shared/file-types.d.ts +1 -0
- package/dist/packages/shared/file-types.js +4 -0
- package/dist/packages/shared/filesystem.d.ts +2 -0
- package/dist/packages/shared/filesystem.js +55 -0
- package/dist/packages/shared/index.d.ts +7 -0
- package/dist/packages/shared/index.js +7 -0
- package/dist/packages/shared/logger.d.ts +3 -0
- package/dist/packages/shared/logger.js +10 -0
- package/dist/packages/shared/naming.d.ts +1 -0
- package/dist/packages/shared/naming.js +8 -0
- package/dist/packages/shared/parse.d.ts +8 -0
- package/dist/packages/shared/parse.js +145 -0
- package/dist/packages/shared/path-guards.d.ts +2 -0
- package/dist/packages/shared/path-guards.js +14 -0
- package/dist/packages/shared/util.d.ts +3 -0
- package/dist/packages/shared/util.js +3 -0
- package/dist/packages/testing/index.d.ts +13 -0
- package/dist/packages/testing/index.js +10 -0
- package/dist/packages/testing/lib/schema.d.ts +261 -0
- package/dist/packages/testing/lib/schema.js +119 -0
- package/dist/packages/testing/test-execution.d.ts +14 -0
- package/dist/packages/testing/test-execution.js +525 -0
- package/dist/packages/testing/test-matrices.d.ts +90 -0
- package/dist/packages/testing/test-matrices.js +96 -0
- package/dist/packages/testing/test-paths.d.ts +12 -0
- package/dist/packages/testing/test-paths.js +59 -0
- package/dist/packages/testing/test-profile-presets.d.ts +57 -0
- package/dist/packages/testing/test-profile-presets.js +50 -0
- package/dist/packages/testing/test-sandbox.d.ts +11 -0
- package/dist/packages/testing/test-sandbox.js +105 -0
- package/dist/packages/testing/test-specs.d.ts +7 -0
- package/dist/packages/testing/test-specs.js +114 -0
- package/dist/packages/testing/test-targets.d.ts +5 -0
- package/dist/packages/testing/test-targets.js +38 -0
- package/dist/packages/testing/test-types.d.ts +16 -0
- package/dist/packages/testing/test-types.js +1 -0
- package/dist/packages/testing/test.d.ts +4 -0
- package/dist/packages/testing/test.js +3 -0
- package/dist/packages/workflow-authoring/index.d.ts +4 -0
- package/dist/packages/workflow-authoring/index.js +4 -0
- package/dist/packages/workflow-authoring/lib/workflow-edit-utils.d.ts +10 -0
- package/dist/packages/workflow-authoring/lib/workflow-edit-utils.js +39 -0
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +26 -0
- package/dist/packages/workflow-authoring/workflow-authoring.js +121 -0
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +16 -0
- package/dist/packages/workflow-authoring/workflow-edit-session.js +57 -0
- package/dist/packages/workflow-authoring/workflow-improvement.d.ts +23 -0
- package/dist/packages/workflow-authoring/workflow-improvement.js +210 -0
- package/dist/packages/workflow-package/builtin-compiled-workflow.d.ts +38 -0
- package/dist/packages/workflow-package/builtin-compiled-workflow.js +94 -0
- package/dist/packages/workflow-package/context-interface.d.ts +96 -0
- package/dist/packages/workflow-package/context-interface.js +146 -0
- package/dist/packages/workflow-package/index.d.ts +11 -0
- package/dist/packages/workflow-package/index.js +11 -0
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +25 -0
- package/dist/packages/workflow-package/interf-workflow-package.js +389 -0
- package/dist/{lib/config.d.ts → packages/workflow-package/lib/package-root.d.ts} +0 -1
- package/dist/packages/workflow-package/lib/package-root.js +6 -0
- package/dist/packages/workflow-package/local-workflows.d.ts +57 -0
- package/dist/packages/workflow-package/local-workflows.js +424 -0
- package/dist/packages/workflow-package/workflow-definitions.d.ts +82 -0
- package/dist/packages/workflow-package/workflow-definitions.js +210 -0
- package/dist/packages/workflow-package/workflow-helpers.d.ts +38 -0
- package/dist/packages/workflow-package/workflow-helpers.js +167 -0
- package/dist/packages/workflow-package/workflow-review-paths.d.ts +10 -0
- package/dist/packages/workflow-package/workflow-review-paths.js +27 -0
- package/dist/packages/workflow-package/workflow-stage-policy.d.ts +5 -0
- package/dist/packages/workflow-package/workflow-stage-policy.js +31 -0
- package/dist/packages/workflow-package/workflow-stage-runner.d.ts +41 -0
- package/dist/packages/workflow-package/workflow-stage-runner.js +109 -0
- package/package.json +43 -19
- package/dist/commands/test.d.ts +0 -3
- package/dist/lib/compiled-home.d.ts +0 -5
- package/dist/lib/compiled-home.js +0 -32
- package/dist/lib/config.js +0 -9
- /package/dist/{commands → cli/commands}/dataset-selection.js +0 -0
- /package/dist/{commands → cli/commands}/default.d.ts +0 -0
- /package/dist/{commands → cli/commands}/doctor.d.ts +0 -0
- /package/dist/{commands → cli/commands}/list.d.ts +0 -0
- /package/dist/{commands → cli/commands}/reset.d.ts +0 -0
- /package/dist/{commands → cli/commands}/status.d.ts +0 -0
- /package/dist/{commands → cli/commands}/verify.d.ts +0 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { mkdirSync, existsSync, writeFileSync, } from "node:fs";
|
|
2
|
+
import { basename, join, relative, sep } from "node:path";
|
|
3
|
+
import { getCompiledWorkflow } from "../workflow-package/workflow-definitions.js";
|
|
4
|
+
import { initializeCompiledRuntimeState, } from "../compiler/state.js";
|
|
5
|
+
import { refreshCompiledBootstrapGuidance } from "../agents/lib/compiled-bootstrap.js";
|
|
6
|
+
import { syncCompiledRawSnapshot } from "../compiler/raw-snapshot.js";
|
|
7
|
+
import { assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
|
|
8
|
+
import { seedCompiledWorkflowPackage } from "../workflow-package/interf-workflow-package.js";
|
|
9
|
+
import { compiledCompiledPathForDataset } from "./project-paths.js";
|
|
10
|
+
import { ensureCompiledZoneTargets, readCompiledSchemaFile } from "../compiler/compiled-schema.js";
|
|
11
|
+
import { findSourceDatasetConfig, listSourceDatasetConfigs, loadSourceFolderConfig, resolveSourceDatasetPath, saveCompiledInterfConfig, } from "./source-config.js";
|
|
12
|
+
import { defaultControlPathForCompiled, workflowPackagePathForCompiled } from "../compiler/compiled-paths.js";
|
|
13
|
+
const DEFAULT_INTERFIGNORE = [
|
|
14
|
+
".claude/",
|
|
15
|
+
".codex/",
|
|
16
|
+
".agents/",
|
|
17
|
+
".cursor/",
|
|
18
|
+
".interf/tests/",
|
|
19
|
+
".interf/tests/targets/sandboxes/",
|
|
20
|
+
".interf/runtime/",
|
|
21
|
+
"",
|
|
22
|
+
].join("\n");
|
|
23
|
+
const UNCOMPILED_COMPILED_PLACEHOLDER = "Not yet compiled. Run `interf compile` to build this portable context.";
|
|
24
|
+
function renderUncompiledCompiledFile(compiledName, relativePath, about) {
|
|
25
|
+
return [
|
|
26
|
+
`# ${compiledName} — ${relativePath}`,
|
|
27
|
+
"",
|
|
28
|
+
UNCOMPILED_COMPILED_PLACEHOLDER,
|
|
29
|
+
...(about ? ["", `About: ${about}`] : []),
|
|
30
|
+
"",
|
|
31
|
+
].join("\n");
|
|
32
|
+
}
|
|
33
|
+
function compiledGitignoreEntries(compiledPath) {
|
|
34
|
+
const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
|
|
35
|
+
const zoneEntries = (schema?.zones ?? [])
|
|
36
|
+
.filter((zone) => zone.kind !== "runtime")
|
|
37
|
+
.map((zone) => zone.kind === "file" ? zone.path : `${zone.path}/`);
|
|
38
|
+
return [
|
|
39
|
+
...zoneEntries,
|
|
40
|
+
".claude/",
|
|
41
|
+
".codex/",
|
|
42
|
+
".agents/",
|
|
43
|
+
".cursor/",
|
|
44
|
+
".interf/tests/",
|
|
45
|
+
".interf/tests/targets/sandboxes/",
|
|
46
|
+
".interf/runtime/",
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
function scaffoldCompiledOutputs(compiledPath, compiledName, about) {
|
|
50
|
+
const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
|
|
51
|
+
if (!schema) {
|
|
52
|
+
throw new Error(`Missing workflow schema at ${workflowPackagePathForCompiled(compiledPath)}.`);
|
|
53
|
+
}
|
|
54
|
+
ensureCompiledZoneTargets(compiledPath, schema);
|
|
55
|
+
for (const zone of schema.zones) {
|
|
56
|
+
if (!zone.required || zone.kind !== "file" || zone.role !== "output")
|
|
57
|
+
continue;
|
|
58
|
+
const targetPath = join(compiledPath, zone.path);
|
|
59
|
+
if (existsSync(targetPath))
|
|
60
|
+
continue;
|
|
61
|
+
writeFileSync(targetPath, renderUncompiledCompiledFile(compiledName, zone.path, about));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export function createCompiled(name, sourcePath, workflowId = "interf", about, datasetPath) {
|
|
65
|
+
assertCompiledName(name, "Portable context");
|
|
66
|
+
assertCompiledContainer(sourcePath);
|
|
67
|
+
const compiledPath = compiledCompiledPathForDataset(sourcePath, name);
|
|
68
|
+
assertWritableTargetDir(compiledPath, "Portable context");
|
|
69
|
+
mkdirSync(compiledPath, { recursive: true });
|
|
70
|
+
const savedCompiled = findSourceDatasetConfig(loadSourceFolderConfig(sourcePath), name);
|
|
71
|
+
const selectedWorkflow = getCompiledWorkflow(workflowId, { sourcePath });
|
|
72
|
+
const resolvedAbout = about ?? savedCompiled?.about;
|
|
73
|
+
const resolvedDatasetPath = (() => {
|
|
74
|
+
if (savedCompiled) {
|
|
75
|
+
return resolveSourceDatasetPath(sourcePath, savedCompiled);
|
|
76
|
+
}
|
|
77
|
+
if (datasetPath) {
|
|
78
|
+
return datasetPath;
|
|
79
|
+
}
|
|
80
|
+
const configuredDatasets = listSourceDatasetConfigs(loadSourceFolderConfig(sourcePath));
|
|
81
|
+
if (configuredDatasets.length === 1) {
|
|
82
|
+
return resolveSourceDatasetPath(sourcePath, configuredDatasets[0]);
|
|
83
|
+
}
|
|
84
|
+
throw new Error("Cannot infer the source folder for this portable context. Select a source folder first or pass an explicit dataset path.");
|
|
85
|
+
})();
|
|
86
|
+
saveCompiledInterfConfig(compiledPath, {
|
|
87
|
+
type: "compiled",
|
|
88
|
+
name,
|
|
89
|
+
...(resolvedAbout ? { about: resolvedAbout } : {}),
|
|
90
|
+
workflow: selectedWorkflow.id,
|
|
91
|
+
...(typeof savedCompiled?.max_attempts === "number"
|
|
92
|
+
? { max_attempts: savedCompiled.max_attempts }
|
|
93
|
+
: {}),
|
|
94
|
+
...(typeof savedCompiled?.max_loops === "number"
|
|
95
|
+
? { max_loops: savedCompiled.max_loops }
|
|
96
|
+
: {}),
|
|
97
|
+
checks: savedCompiled?.checks ?? [],
|
|
98
|
+
workflow_origin: {
|
|
99
|
+
selected: selectedWorkflow.id,
|
|
100
|
+
local_draft: false,
|
|
101
|
+
},
|
|
102
|
+
source: {
|
|
103
|
+
path: "./raw",
|
|
104
|
+
control_path: defaultControlPathForCompiled(compiledPath),
|
|
105
|
+
dataset_path: relative(compiledPath, resolvedDatasetPath).split(sep).join("/") || ".",
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
mkdirSync(join(compiledPath, "raw"), { recursive: true });
|
|
109
|
+
syncCompiledRawSnapshot(compiledPath, resolvedDatasetPath);
|
|
110
|
+
writeFileSync(join(compiledPath, ".interfignore"), DEFAULT_INTERFIGNORE);
|
|
111
|
+
seedCompiledWorkflowPackage({
|
|
112
|
+
compiledPath,
|
|
113
|
+
sourcePath,
|
|
114
|
+
workflowId: selectedWorkflow.id,
|
|
115
|
+
});
|
|
116
|
+
scaffoldCompiledOutputs(compiledPath, name, about);
|
|
117
|
+
refreshCompiledBootstrapGuidance(compiledPath);
|
|
118
|
+
writeFileSync(join(compiledPath, ".gitignore"), [...compiledGitignoreEntries(compiledPath), ""].join("\n"));
|
|
119
|
+
initializeCompiledRuntimeState(compiledPath);
|
|
120
|
+
return compiledPath;
|
|
121
|
+
}
|
|
122
|
+
export function defaultCompiledNameForSource(sourcePath) {
|
|
123
|
+
return basename(sourcePath);
|
|
124
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { INTERF_CONTAINER_NAME, WORKFLOW_CONTAINER_NAME, TEST_CONTAINER_NAME, INTERF_CONFIG_FILE, WORKFLOW_PACKAGE_DIR, readInterfConfig, detectInterf, resolveCompiled, resolveSourceFolderPath, resolveSourceControlPath, resolveSourceInputPath, listCompiledDatasetsForSourceFolder, hasSourceFolderInput, assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
|
|
2
|
+
export type { InterfConfig, ResolvedCompiled } from "./interf-detect.js";
|
|
3
|
+
export { ensureCompiledRawBinding, resolveCompiledRawPath, syncCompiledRawSnapshot, } from "./compiled-raw.js";
|
|
4
|
+
export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "./interf-bootstrap.js";
|
|
5
|
+
export { createCompiled, defaultCompiledNameForSource, } from "./interf-scaffold.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { INTERF_CONTAINER_NAME, WORKFLOW_CONTAINER_NAME, TEST_CONTAINER_NAME, INTERF_CONFIG_FILE, WORKFLOW_PACKAGE_DIR, readInterfConfig, detectInterf, resolveCompiled, resolveSourceFolderPath, resolveSourceControlPath, resolveSourceInputPath, listCompiledDatasetsForSourceFolder, hasSourceFolderInput, assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
|
|
2
|
+
export { ensureCompiledRawBinding, resolveCompiledRawPath, syncCompiledRawSnapshot, } from "./compiled-raw.js";
|
|
3
|
+
export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "./interf-bootstrap.js";
|
|
4
|
+
export { createCompiled, defaultCompiledNameForSource, } from "./interf-scaffold.js";
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const DatasetNameSchema: z.ZodString;
|
|
3
|
+
export declare const SourceTruthCheckSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5
|
+
question: z.ZodString;
|
|
6
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
7
|
+
expect: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
10
|
+
must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
11
|
+
min_words: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
max_words: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
strictness: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
export declare const SourceDatasetConfigSchema: z.ZodObject<{
|
|
17
|
+
id: z.ZodOptional<z.ZodString>;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
path: z.ZodString;
|
|
20
|
+
about: z.ZodOptional<z.ZodString>;
|
|
21
|
+
workflow: z.ZodOptional<z.ZodString>;
|
|
22
|
+
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
25
|
+
id: z.ZodOptional<z.ZodString>;
|
|
26
|
+
question: z.ZodString;
|
|
27
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
28
|
+
expect: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
31
|
+
must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
min_words: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
max_words: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
strictness: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strict>>>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export declare const CompiledInterfConfigSchema: z.ZodObject<{
|
|
39
|
+
type: z.ZodLiteral<"compiled">;
|
|
40
|
+
name: z.ZodString;
|
|
41
|
+
about: z.ZodOptional<z.ZodString>;
|
|
42
|
+
workflow: z.ZodString;
|
|
43
|
+
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
46
|
+
id: z.ZodOptional<z.ZodString>;
|
|
47
|
+
question: z.ZodString;
|
|
48
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
49
|
+
expect: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
52
|
+
must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
53
|
+
min_words: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
max_words: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
strictness: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strict>>>;
|
|
58
|
+
workflow_origin: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
selected: z.ZodString;
|
|
60
|
+
local_draft: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
source: z.ZodObject<{
|
|
63
|
+
path: z.ZodString;
|
|
64
|
+
control_path: z.ZodOptional<z.ZodString>;
|
|
65
|
+
dataset_path: z.ZodString;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
}, z.core.$loose>;
|
|
68
|
+
export declare const InterfConfigSchema: z.ZodObject<{
|
|
69
|
+
type: z.ZodLiteral<"compiled">;
|
|
70
|
+
name: z.ZodString;
|
|
71
|
+
about: z.ZodOptional<z.ZodString>;
|
|
72
|
+
workflow: z.ZodString;
|
|
73
|
+
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
76
|
+
id: z.ZodOptional<z.ZodString>;
|
|
77
|
+
question: z.ZodString;
|
|
78
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
79
|
+
expect: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
81
|
+
must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
82
|
+
must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
|
+
min_words: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
max_words: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
strictness: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, z.core.$strict>>>;
|
|
88
|
+
workflow_origin: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
selected: z.ZodString;
|
|
90
|
+
local_draft: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
source: z.ZodObject<{
|
|
93
|
+
path: z.ZodString;
|
|
94
|
+
control_path: z.ZodOptional<z.ZodString>;
|
|
95
|
+
dataset_path: z.ZodString;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
}, z.core.$loose>;
|
|
98
|
+
export declare const SourceFolderConfigSchema: z.ZodObject<{
|
|
99
|
+
datasets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
|
+
id: z.ZodOptional<z.ZodString>;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
path: z.ZodString;
|
|
103
|
+
about: z.ZodOptional<z.ZodString>;
|
|
104
|
+
workflow: z.ZodOptional<z.ZodString>;
|
|
105
|
+
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
108
|
+
id: z.ZodOptional<z.ZodString>;
|
|
109
|
+
question: z.ZodString;
|
|
110
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
111
|
+
expect: z.ZodOptional<z.ZodObject<{
|
|
112
|
+
must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
113
|
+
must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
114
|
+
must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
115
|
+
min_words: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
max_words: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
}, z.core.$strip>>;
|
|
118
|
+
strictness: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.core.$strict>>>;
|
|
120
|
+
}, z.core.$strict>>>;
|
|
121
|
+
}, z.core.$strict>;
|
|
122
|
+
export type SourceTruthCheck = z.infer<typeof SourceTruthCheckSchema>;
|
|
123
|
+
export type SourceDatasetConfig = z.infer<typeof SourceDatasetConfigSchema>;
|
|
124
|
+
export type InterfConfig = z.infer<typeof InterfConfigSchema>;
|
|
125
|
+
export type SourceFolderConfig = z.infer<typeof SourceFolderConfigSchema>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, WorkflowIdPattern, WorkflowIdSchema, } from "../../compiler/lib/schema.js";
|
|
3
|
+
const DatasetNamePattern = /^[a-z0-9][a-z0-9-]*$/;
|
|
4
|
+
const RESERVED_DATASET_NAMES = new Set(["tests", "workflows"]);
|
|
5
|
+
export const DatasetNameSchema = z
|
|
6
|
+
.string()
|
|
7
|
+
.regex(DatasetNamePattern, "Dataset names must use lowercase letters, numbers, and dashes only.")
|
|
8
|
+
.refine((value) => !RESERVED_DATASET_NAMES.has(value), "Dataset name is reserved.");
|
|
9
|
+
export const SourceTruthCheckSchema = z.object({
|
|
10
|
+
id: z.string().regex(WorkflowIdPattern).optional(),
|
|
11
|
+
question: z.string().min(1),
|
|
12
|
+
answer: z.string().min(1).optional(),
|
|
13
|
+
expect: TestCaseExpectSchema.optional(),
|
|
14
|
+
strictness: z.string().min(1).optional(),
|
|
15
|
+
}).strict().superRefine((value, ctx) => {
|
|
16
|
+
if (!value.answer && !value.expect) {
|
|
17
|
+
ctx.addIssue({
|
|
18
|
+
code: z.ZodIssueCode.custom,
|
|
19
|
+
path: ["answer"],
|
|
20
|
+
message: "Truth checks need `answer` or `expect`.",
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export const SourceDatasetConfigSchema = z.object({
|
|
25
|
+
id: z.string().regex(WorkflowIdPattern).optional(),
|
|
26
|
+
name: DatasetNameSchema,
|
|
27
|
+
path: z.string().min(1),
|
|
28
|
+
about: z.string().min(1).optional(),
|
|
29
|
+
workflow: WorkflowIdSchema.optional(),
|
|
30
|
+
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
31
|
+
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
32
|
+
checks: z.array(SourceTruthCheckSchema).default([]),
|
|
33
|
+
}).strict();
|
|
34
|
+
export const CompiledInterfConfigSchema = z.object({
|
|
35
|
+
type: z.literal("compiled"),
|
|
36
|
+
name: DatasetNameSchema,
|
|
37
|
+
about: z.string().optional(),
|
|
38
|
+
workflow: WorkflowIdSchema,
|
|
39
|
+
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
40
|
+
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
41
|
+
checks: z.array(SourceTruthCheckSchema).default([]),
|
|
42
|
+
workflow_origin: z.object({
|
|
43
|
+
selected: WorkflowIdSchema,
|
|
44
|
+
local_draft: z.boolean().optional(),
|
|
45
|
+
}).optional(),
|
|
46
|
+
source: z.object({
|
|
47
|
+
path: z.string(),
|
|
48
|
+
control_path: z.string().optional(),
|
|
49
|
+
dataset_path: z.string(),
|
|
50
|
+
}),
|
|
51
|
+
}).passthrough();
|
|
52
|
+
export const InterfConfigSchema = CompiledInterfConfigSchema;
|
|
53
|
+
export const SourceFolderConfigSchema = z.object({
|
|
54
|
+
datasets: z.array(SourceDatasetConfigSchema).optional(),
|
|
55
|
+
}).strict().superRefine((value, ctx) => {
|
|
56
|
+
if ((value.datasets?.length ?? 0) === 0) {
|
|
57
|
+
ctx.addIssue({
|
|
58
|
+
code: z.ZodIssueCode.custom,
|
|
59
|
+
message: "Interf project config needs at least one dataset.",
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const PROJECT_INTERF_DIR = "interf";
|
|
2
|
+
export declare const PROJECT_TESTS_DIR = "tests";
|
|
3
|
+
export declare function projectInterfRoot(projectPath: string): string;
|
|
4
|
+
export declare function compiledCompiledPathForDataset(projectPath: string, datasetName: string): string;
|
|
5
|
+
export declare function datasetTestsRoot(projectPath: string, datasetName: string): string;
|
|
6
|
+
export type DatasetTestTargetLabel = "file-as-is" | "compiled";
|
|
7
|
+
export declare function datasetTestRunsRoot(projectPath: string, datasetName: string, target: DatasetTestTargetLabel): string;
|
|
8
|
+
export declare function datasetLatestTestStatePath(projectPath: string, datasetName: string): string;
|
|
9
|
+
export declare function datasetLatestTestSummaryPath(projectPath: string, datasetName: string): string;
|
|
10
|
+
export declare function normalizeDatasetTestRunId(input: string): string;
|
|
11
|
+
export declare function datasetTestRunPath(projectPath: string, datasetName: string, target: DatasetTestTargetLabel, generatedAt: string, runId: string, runSuffix?: string | null): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
export const PROJECT_INTERF_DIR = "interf";
|
|
3
|
+
export const PROJECT_TESTS_DIR = "tests";
|
|
4
|
+
export function projectInterfRoot(projectPath) {
|
|
5
|
+
return join(projectPath, PROJECT_INTERF_DIR);
|
|
6
|
+
}
|
|
7
|
+
export function compiledCompiledPathForDataset(projectPath, datasetName) {
|
|
8
|
+
return join(projectInterfRoot(projectPath), datasetName);
|
|
9
|
+
}
|
|
10
|
+
export function datasetTestsRoot(projectPath, datasetName) {
|
|
11
|
+
return join(projectInterfRoot(projectPath), PROJECT_TESTS_DIR, datasetName);
|
|
12
|
+
}
|
|
13
|
+
export function datasetTestRunsRoot(projectPath, datasetName, target) {
|
|
14
|
+
return join(datasetTestsRoot(projectPath, datasetName), target, "runs");
|
|
15
|
+
}
|
|
16
|
+
export function datasetLatestTestStatePath(projectPath, datasetName) {
|
|
17
|
+
return join(datasetTestsRoot(projectPath, datasetName), "latest.json");
|
|
18
|
+
}
|
|
19
|
+
export function datasetLatestTestSummaryPath(projectPath, datasetName) {
|
|
20
|
+
return join(datasetTestsRoot(projectPath, datasetName), "latest.md");
|
|
21
|
+
}
|
|
22
|
+
export function normalizeDatasetTestRunId(input) {
|
|
23
|
+
return input
|
|
24
|
+
.toLowerCase()
|
|
25
|
+
.trim()
|
|
26
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
27
|
+
.replace(/^-+|-+$/g, "")
|
|
28
|
+
.slice(0, 80);
|
|
29
|
+
}
|
|
30
|
+
export function datasetTestRunPath(projectPath, datasetName, target, generatedAt, runId, runSuffix) {
|
|
31
|
+
return join(datasetTestRunsRoot(projectPath, datasetName, target), `${generatedAt.replace(/[:.]/g, "-")}-${runId}${runSuffix ? `-${normalizeDatasetTestRunId(runSuffix)}` : ""}.json`);
|
|
32
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type InterfConfig, type SourceTruthCheck, type SourceDatasetConfig, type SourceFolderConfig } from "./lib/schema.js";
|
|
2
|
+
import type { TestSpec, TestTargetType } from "../testing/lib/schema.js";
|
|
3
|
+
export declare const SOURCE_FOLDER_CONFIG_FILE = "interf.json";
|
|
4
|
+
export interface LoadedSourceTestSpec extends TestSpec {
|
|
5
|
+
id: string;
|
|
6
|
+
filePath: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function fingerprintTruthChecks(checks: SourceTruthCheck[]): string;
|
|
9
|
+
export declare function loadSourceFolderConfig(sourcePath: string): SourceFolderConfig | null;
|
|
10
|
+
export interface WritableSourceProjectConfig {
|
|
11
|
+
datasets?: SourceDatasetConfig[];
|
|
12
|
+
}
|
|
13
|
+
export declare function listSourceDatasetConfigs(config: SourceFolderConfig | null): SourceDatasetConfig[];
|
|
14
|
+
export declare function resolveDatasetCompileMaxAttempts(datasetConfig: Pick<SourceDatasetConfig, "max_attempts">, override?: number | null): number | null;
|
|
15
|
+
export declare function resolveDatasetCompileMaxLoops(datasetConfig: Pick<SourceDatasetConfig, "max_loops">, override?: number | null): number | null;
|
|
16
|
+
export declare function getDefaultSourceDatasetConfig(config: SourceFolderConfig | null): SourceDatasetConfig | null;
|
|
17
|
+
export declare function findSourceDatasetConfig(config: SourceFolderConfig | null, datasetName: string): SourceDatasetConfig | null;
|
|
18
|
+
export declare function saveSourceFolderConfig(sourcePath: string, config: WritableSourceProjectConfig): void;
|
|
19
|
+
export declare function appendSourceDatasetChecks(sourcePath: string, datasetName: string, checks: SourceTruthCheck[]): void;
|
|
20
|
+
export declare function upsertSourceDatasetConfig(sourcePath: string, datasetConfig: SourceDatasetConfig, options?: {
|
|
21
|
+
matchName?: string;
|
|
22
|
+
}): void;
|
|
23
|
+
export declare function compiledMaxAttempts(maxAttempts: number | null | undefined): number | undefined;
|
|
24
|
+
export declare function compiledMaxLoops(maxLoops: number | null | undefined): number | undefined;
|
|
25
|
+
export declare function sourceDatasetConfigFromInterfConfig(config: InterfConfig, datasetPath?: string): SourceDatasetConfig;
|
|
26
|
+
export declare function loadCompiledDatasetConfig(compiledPath: string): SourceDatasetConfig | null;
|
|
27
|
+
export declare function saveCompiledInterfConfig(compiledPath: string, config: InterfConfig): InterfConfig;
|
|
28
|
+
export declare function syncCompiledInterfConfigFromSourceDatasetConfig(compiledPath: string, datasetConfig: SourceDatasetConfig): InterfConfig;
|
|
29
|
+
export declare function buildTestSpecFromSourceFolderConfig(options: {
|
|
30
|
+
sourcePath: string;
|
|
31
|
+
targetName?: string | null;
|
|
32
|
+
targetType?: TestTargetType;
|
|
33
|
+
}): LoadedSourceTestSpec | null;
|
|
34
|
+
export declare function buildTestSpecFromCompiledDatasetConfig(options: {
|
|
35
|
+
compiledPath: string;
|
|
36
|
+
targetType?: TestTargetType;
|
|
37
|
+
}): LoadedSourceTestSpec | null;
|
|
38
|
+
export declare function resolveSourceDatasetPath(projectPath: string, datasetConfig: Pick<SourceDatasetConfig, "path">): string;
|