@interf/compiler 0.22.2 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -282
- package/dist/bin-mcp.d.ts +2 -0
- package/dist/bin-mcp.js +63 -0
- package/dist/bin-runtime.d.ts +2 -0
- package/dist/bin-runtime.js +111 -0
- package/dist/cli/commands/agents.js +4 -35
- package/dist/cli/commands/auth.d.ts +20 -0
- package/dist/cli/commands/auth.js +161 -0
- package/dist/cli/commands/benchmark.d.ts +9 -0
- package/dist/cli/commands/benchmark.js +58 -0
- package/dist/cli/commands/build-plan.js +107 -139
- package/dist/cli/commands/build.d.ts +3 -4
- package/dist/cli/commands/build.js +16 -45
- package/dist/cli/commands/doctor.js +3 -3
- package/dist/cli/commands/graphs.d.ts +2 -0
- package/dist/cli/commands/graphs.js +344 -0
- package/dist/cli/commands/login.js +4 -6
- package/dist/cli/commands/logout.js +1 -1
- package/dist/cli/commands/mcp.d.ts +4 -2
- package/dist/cli/commands/mcp.js +846 -232
- package/dist/cli/commands/project.d.ts +2 -0
- package/dist/cli/commands/project.js +176 -0
- package/dist/cli/commands/reset.d.ts +3 -4
- package/dist/cli/commands/reset.js +10 -31
- package/dist/cli/commands/runs.js +136 -57
- package/dist/cli/commands/runtime.d.ts +24 -0
- package/dist/cli/commands/runtime.js +373 -0
- package/dist/cli/commands/status.d.ts +1 -0
- package/dist/cli/commands/status.js +35 -45
- package/dist/cli/commands/traces.d.ts +2 -0
- package/dist/cli/commands/traces.js +97 -0
- package/dist/cli/commands/wizard.js +171 -178
- package/dist/cli/index.d.ts +7 -4
- package/dist/cli/index.js +13 -7
- package/dist/cli/lib/http-client.d.ts +39 -0
- package/dist/cli/lib/http-client.js +73 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/packages/build-plans/authoring/brief.d.ts +538 -0
- package/dist/packages/build-plans/authoring/brief.js +89 -0
- package/dist/packages/build-plans/authoring/build-plan-authoring.d.ts +52 -11
- package/dist/packages/build-plans/authoring/build-plan-authoring.js +493 -46
- package/dist/packages/build-plans/authoring/build-plan-edit-session.d.ts +10 -1
- package/dist/packages/build-plans/authoring/build-plan-edit-session.js +27 -4
- package/dist/packages/build-plans/authoring/build-plan-improvement.d.ts +9 -6
- package/dist/packages/build-plans/authoring/build-plan-improvement.js +97 -46
- package/dist/packages/build-plans/authoring/lib/build-plan-edit-utils.d.ts +1 -0
- package/dist/packages/build-plans/authoring/lib/build-plan-edit-utils.js +7 -7
- package/dist/packages/build-plans/build-plan-resolution.d.ts +1 -1
- package/dist/packages/build-plans/build-plan-resolution.js +3 -3
- package/dist/packages/build-plans/index.d.ts +1 -1
- package/dist/packages/build-plans/index.js +1 -1
- package/dist/packages/build-plans/package/build-plan-definitions.d.ts +14 -13
- package/dist/packages/build-plans/package/build-plan-definitions.js +45 -42
- package/dist/packages/build-plans/package/build-plan-helpers.d.ts +3 -2
- package/dist/packages/build-plans/package/build-plan-helpers.js +27 -13
- package/dist/packages/build-plans/package/build-plan-review-paths.d.ts +5 -5
- package/dist/packages/build-plans/package/build-plan-review-paths.js +15 -15
- package/dist/packages/build-plans/package/build-plan-stage-runner.d.ts +5 -4
- package/dist/packages/build-plans/package/build-plan-stage-runner.js +23 -11
- package/dist/packages/build-plans/package/builtin-build-plan.d.ts +7 -8
- package/dist/packages/build-plans/package/builtin-build-plan.js +10 -11
- package/dist/packages/build-plans/package/context-interface.d.ts +14 -9
- package/dist/packages/build-plans/package/context-interface.js +14 -33
- package/dist/packages/build-plans/package/interf-build-plan-package.d.ts +6 -17
- package/dist/packages/build-plans/package/interf-build-plan-package.js +68 -64
- package/dist/packages/build-plans/package/local-build-plans.d.ts +21 -14
- package/dist/packages/build-plans/package/local-build-plans.js +105 -55
- package/dist/packages/build-plans/package/user-build-plans.js +1 -1
- package/dist/packages/contracts/index.d.ts +5 -2
- package/dist/packages/contracts/index.js +3 -1
- package/dist/packages/contracts/lib/context-graph-layer.d.ts +161 -0
- package/dist/packages/contracts/lib/context-graph-layer.js +216 -0
- package/dist/packages/contracts/lib/project-paths.d.ts +144 -0
- package/dist/packages/contracts/lib/project-paths.js +220 -0
- package/dist/packages/contracts/lib/project-schema.d.ts +423 -0
- package/dist/packages/contracts/lib/project-schema.js +138 -0
- package/dist/packages/contracts/lib/schema.d.ts +1273 -81
- package/dist/packages/contracts/lib/schema.js +675 -79
- package/dist/packages/contracts/utils/filesystem.d.ts +1 -0
- package/dist/packages/contracts/utils/filesystem.js +29 -1
- package/dist/packages/contracts/utils/parse.js +67 -0
- package/dist/packages/projects/index.d.ts +6 -0
- package/dist/packages/{project → projects}/index.js +0 -3
- package/dist/packages/{project → projects}/interf-detect.d.ts +12 -12
- package/dist/packages/{project → projects}/interf-detect.js +56 -50
- package/dist/packages/projects/interf.d.ts +2 -0
- package/dist/packages/projects/interf.js +1 -0
- package/dist/packages/projects/lib/schema.d.ts +77 -0
- package/dist/packages/projects/lib/schema.js +91 -0
- package/dist/packages/projects/source-config.d.ts +53 -0
- package/dist/packages/projects/source-config.js +339 -0
- package/dist/packages/projects/source-folders.d.ts +11 -0
- package/dist/packages/{project → projects}/source-folders.js +26 -26
- package/dist/packages/{engine → runtime}/action-planner.d.ts +1 -1
- package/dist/packages/{engine → runtime}/action-planner.js +20 -22
- package/dist/packages/runtime/action-values.d.ts +1 -0
- package/dist/packages/runtime/action-values.js +1 -0
- package/dist/packages/runtime/actions/errors.d.ts +2 -0
- package/dist/packages/runtime/actions/errors.js +12 -0
- package/dist/packages/runtime/actions/fields.d.ts +86 -0
- package/dist/packages/runtime/actions/form-builders.d.ts +14 -0
- package/dist/packages/runtime/actions/form-builders.js +667 -0
- package/dist/packages/runtime/actions/form-validators.d.ts +8 -0
- package/dist/packages/runtime/actions/form-validators.js +134 -0
- package/dist/packages/runtime/actions/helpers.d.ts +11 -0
- package/dist/packages/runtime/actions/helpers.js +80 -0
- package/dist/packages/runtime/actions/index.d.ts +8 -0
- package/dist/packages/runtime/actions/index.js +11 -0
- package/dist/packages/runtime/actions/registry.d.ts +64 -0
- package/dist/packages/runtime/actions/registry.js +62 -0
- package/dist/packages/runtime/actions/requests.d.ts +45 -0
- package/dist/packages/runtime/actions/requests.js +164 -0
- package/dist/packages/runtime/actions/schemas.d.ts +161 -0
- package/dist/packages/runtime/actions/schemas.js +37 -0
- package/dist/packages/runtime/agent-handoff.d.ts +11 -0
- package/dist/packages/runtime/agent-handoff.js +102 -0
- package/dist/packages/{engine → runtime}/agents/index.d.ts +1 -2
- package/dist/packages/{engine → runtime}/agents/index.js +1 -2
- package/dist/packages/runtime/agents/lib/args.d.ts +14 -0
- package/dist/packages/runtime/agents/lib/args.js +24 -0
- package/dist/packages/{engine → runtime}/agents/lib/constants.d.ts +4 -1
- package/dist/packages/runtime/agents/lib/constants.js +13 -0
- package/dist/packages/runtime/agents/lib/context-graph-bootstrap.d.ts +3 -0
- package/dist/packages/{engine/agents/lib/verifiable-context-bootstrap.js → runtime/agents/lib/context-graph-bootstrap.js} +5 -6
- package/dist/packages/{engine → runtime}/agents/lib/detection.d.ts +5 -0
- package/dist/packages/{engine → runtime}/agents/lib/detection.js +16 -7
- package/dist/packages/{engine → runtime}/agents/lib/execution-profile.d.ts +14 -0
- package/dist/packages/{engine → runtime}/agents/lib/execution-profile.js +31 -14
- package/dist/packages/{engine → runtime}/agents/lib/execution.js +22 -6
- package/dist/packages/{engine → runtime}/agents/lib/executors.d.ts +1 -0
- package/dist/packages/{engine → runtime}/agents/lib/executors.js +11 -2
- package/dist/packages/runtime/agents/lib/logs.d.ts +12 -0
- package/dist/packages/runtime/agents/lib/logs.js +41 -0
- package/dist/packages/{engine → runtime}/agents/lib/preflight.js +19 -14
- package/dist/packages/runtime/agents/lib/render.d.ts +26 -0
- package/dist/packages/{engine → runtime}/agents/lib/render.js +48 -22
- package/dist/packages/runtime/agents/lib/shell-fs.d.ts +18 -0
- package/dist/packages/runtime/agents/lib/shell-fs.js +190 -0
- package/dist/packages/runtime/agents/lib/shell-paths.d.ts +16 -0
- package/dist/packages/runtime/agents/lib/shell-paths.js +63 -0
- package/dist/packages/runtime/agents/lib/shell-projection.d.ts +25 -0
- package/dist/packages/runtime/agents/lib/shell-projection.js +314 -0
- package/dist/packages/runtime/agents/lib/shell-templates.d.ts +30 -0
- package/dist/packages/runtime/agents/lib/shell-templates.js +494 -0
- package/dist/packages/runtime/agents/lib/shell-workspace.d.ts +17 -0
- package/dist/packages/runtime/agents/lib/shell-workspace.js +70 -0
- package/dist/packages/runtime/agents/lib/shells.d.ts +92 -0
- package/dist/packages/runtime/agents/lib/shells.js +509 -0
- package/dist/packages/runtime/agents/lib/source-context-scan.d.ts +10 -0
- package/dist/packages/runtime/agents/lib/source-context-scan.js +388 -0
- package/dist/packages/{engine → runtime}/agents/lib/status.js +1 -14
- package/dist/packages/runtime/agents/lib/string-utils.d.ts +16 -0
- package/dist/packages/runtime/agents/lib/string-utils.js +36 -0
- package/dist/packages/{engine → runtime}/agents/lib/types.d.ts +1 -0
- package/dist/packages/{engine → runtime}/agents/lib/user-config.d.ts +8 -2
- package/dist/packages/{engine → runtime}/agents/lib/user-config.js +8 -2
- package/dist/packages/runtime/agents/providers/claude-code.d.ts +13 -0
- package/dist/packages/runtime/agents/providers/claude-code.js +45 -0
- package/dist/packages/runtime/agents/providers/codex.d.ts +17 -0
- package/dist/packages/runtime/agents/providers/codex.js +66 -0
- package/dist/packages/runtime/agents/providers/cursor.d.ts +9 -0
- package/dist/packages/runtime/agents/providers/cursor.js +24 -0
- package/dist/packages/runtime/agents/providers/index.d.ts +9 -0
- package/dist/packages/runtime/agents/providers/index.js +31 -0
- package/dist/packages/runtime/agents/providers/types.d.ts +50 -0
- package/dist/packages/{engine → runtime}/agents/registry.d.ts +13 -2
- package/dist/packages/{engine → runtime}/agents/registry.js +48 -10
- package/dist/packages/{engine → runtime}/agents/role-executors.d.ts +1 -1
- package/dist/packages/{engine → runtime}/agents/role-executors.js +9 -7
- package/dist/packages/{engine → runtime}/agents/role-router.js +7 -5
- package/dist/packages/runtime/auth/account-context.d.ts +52 -0
- package/dist/packages/runtime/auth/account-context.js +68 -0
- package/dist/packages/runtime/auth/auth-flow.d.ts +73 -0
- package/dist/packages/runtime/auth/auth-flow.js +189 -0
- package/dist/packages/runtime/auth/jwt-validator.d.ts +58 -0
- package/dist/packages/runtime/auth/jwt-validator.js +86 -0
- package/dist/packages/runtime/auth/keychain.d.ts +35 -0
- package/dist/packages/runtime/auth/keychain.js +85 -0
- package/dist/packages/runtime/auth/session-store.d.ts +38 -0
- package/dist/packages/runtime/auth/session-store.js +96 -0
- package/dist/packages/runtime/auth/workos-client.d.ts +58 -0
- package/dist/packages/runtime/auth/workos-client.js +87 -0
- package/dist/packages/runtime/benchmark-question-draft.d.ts +23 -0
- package/dist/packages/runtime/benchmark-question-draft.js +153 -0
- package/dist/packages/runtime/build/artifact-counts.d.ts +1 -0
- package/dist/packages/{engine → runtime}/build/artifact-counts.js +5 -9
- package/dist/packages/{engine → runtime}/build/artifact-status.d.ts +6 -6
- package/dist/packages/{engine → runtime}/build/artifact-status.js +26 -24
- package/dist/packages/runtime/build/atomic-fs.d.ts +3 -0
- package/dist/packages/runtime/build/atomic-fs.js +95 -0
- package/dist/packages/runtime/build/billing-events.d.ts +78 -0
- package/dist/packages/{engine → runtime}/build/billing-events.js +17 -19
- package/dist/packages/runtime/build/build-evidence.d.ts +16 -0
- package/dist/packages/runtime/build/build-evidence.js +179 -0
- package/dist/packages/{engine → runtime}/build/build-pipeline.d.ts +12 -8
- package/dist/packages/runtime/build/build-pipeline.js +388 -0
- package/dist/packages/{engine → runtime}/build/build-plan-primitives.d.ts +1 -1
- package/dist/packages/{engine → runtime}/build/build-plan-primitives.js +0 -1
- package/dist/packages/runtime/build/build-plan-runs.d.ts +14 -0
- package/dist/packages/runtime/build/build-plan-runs.js +31 -0
- package/dist/packages/runtime/build/build-stage-plan.d.ts +16 -0
- package/dist/packages/runtime/build/build-stage-plan.js +101 -0
- package/dist/packages/{engine → runtime}/build/build-stage-runner.d.ts +2 -1
- package/dist/packages/runtime/build/build-stage-runner.js +302 -0
- package/dist/packages/{engine → runtime}/build/build-target.d.ts +7 -4
- package/dist/packages/runtime/build/build-target.js +40 -0
- package/dist/packages/{engine → runtime}/build/check-evaluator.d.ts +14 -16
- package/dist/packages/runtime/build/check-evaluator.js +1226 -0
- package/dist/packages/runtime/build/context-graph-paths.d.ts +64 -0
- package/dist/packages/runtime/build/context-graph-paths.js +160 -0
- package/dist/packages/runtime/build/context-graph-schema.d.ts +19 -0
- package/dist/packages/runtime/build/context-graph-schema.js +39 -0
- package/dist/packages/{engine → runtime}/build/discovery.d.ts +2 -2
- package/dist/packages/{engine → runtime}/build/discovery.js +4 -4
- package/dist/packages/{engine → runtime}/build/index.d.ts +7 -5
- package/dist/packages/{engine → runtime}/build/index.js +7 -5
- package/dist/packages/runtime/build/inspect-map.d.ts +10 -0
- package/dist/packages/runtime/build/inspect-map.js +270 -0
- package/dist/packages/{engine → runtime}/build/lib/schema.d.ts +449 -123
- package/dist/packages/runtime/build/lib/schema.js +494 -0
- package/dist/packages/runtime/build/native-entrypoint.d.ts +2 -0
- package/dist/packages/runtime/build/native-entrypoint.js +286 -0
- package/dist/packages/runtime/build/reset.d.ts +2 -0
- package/dist/packages/runtime/build/reset.js +62 -0
- package/dist/packages/{engine → runtime}/build/runtime-contracts.js +13 -7
- package/dist/packages/runtime/build/runtime-inventory.d.ts +7 -0
- package/dist/packages/{engine → runtime}/build/runtime-inventory.js +3 -3
- package/dist/packages/runtime/build/runtime-log-paths.d.ts +3 -0
- package/dist/packages/runtime/build/runtime-log-paths.js +16 -0
- package/dist/packages/{engine → runtime}/build/runtime-prompt.js +12 -9
- package/dist/packages/{engine → runtime}/build/runtime-reconcile.d.ts +1 -1
- package/dist/packages/{engine → runtime}/build/runtime-reconcile.js +25 -21
- package/dist/packages/runtime/build/runtime-runs.d.ts +10 -0
- package/dist/packages/runtime/build/runtime-runs.js +318 -0
- package/dist/packages/{engine → runtime}/build/runtime-types.d.ts +9 -6
- package/dist/packages/runtime/build/runtime-types.js +1 -0
- package/dist/packages/runtime/build/runtime.d.ts +8 -0
- package/dist/packages/runtime/build/runtime.js +7 -0
- package/dist/packages/runtime/build/source-files.d.ts +58 -0
- package/dist/packages/runtime/build/source-files.js +193 -0
- package/dist/packages/runtime/build/source-inventory.d.ts +28 -0
- package/dist/packages/runtime/build/source-inventory.js +512 -0
- package/dist/packages/runtime/build/source-manifest.d.ts +63 -0
- package/dist/packages/runtime/build/source-manifest.js +220 -0
- package/dist/packages/runtime/build/stage-evidence.d.ts +22 -0
- package/dist/packages/runtime/build/stage-evidence.js +386 -0
- package/dist/packages/runtime/build/stage-manifest.d.ts +45 -0
- package/dist/packages/runtime/build/stage-manifest.js +1125 -0
- package/dist/packages/runtime/build/stage-reuse.d.ts +11 -0
- package/dist/packages/runtime/build/stage-reuse.js +154 -0
- package/dist/packages/runtime/build/stage-session.d.ts +81 -0
- package/dist/packages/runtime/build/stage-session.js +308 -0
- package/dist/packages/runtime/build/state-artifacts.d.ts +9 -0
- package/dist/packages/runtime/build/state-artifacts.js +14 -0
- package/dist/packages/runtime/build/state-health.d.ts +4 -0
- package/dist/packages/{engine → runtime}/build/state-health.js +21 -26
- package/dist/packages/runtime/build/state-io.d.ts +12 -0
- package/dist/packages/runtime/build/state-io.js +118 -0
- package/dist/packages/runtime/build/state-view.d.ts +5 -0
- package/dist/packages/runtime/build/state-view.js +121 -0
- package/dist/packages/runtime/build/state.d.ts +7 -0
- package/dist/packages/runtime/build/state.js +12 -0
- package/dist/packages/runtime/build/summary-coverage-index.d.ts +21 -0
- package/dist/packages/runtime/build/summary-coverage-index.js +189 -0
- package/dist/packages/runtime/build/traces.d.ts +30 -0
- package/dist/packages/runtime/build/traces.js +133 -0
- package/dist/packages/{engine/build/validate-verifiable-context.d.ts → runtime/build/validate-context-graph.d.ts} +6 -6
- package/dist/packages/{engine/build/validate-verifiable-context.js → runtime/build/validate-context-graph.js} +49 -36
- package/dist/packages/{engine → runtime}/build/validate.d.ts +5 -5
- package/dist/packages/{engine → runtime}/build/validate.js +26 -26
- package/dist/packages/{engine → runtime}/client.d.ts +18 -18
- package/dist/packages/{engine → runtime}/client.js +48 -36
- package/dist/packages/{engine → runtime}/connection-config.d.ts +3 -2
- package/dist/packages/{engine → runtime}/connection-config.js +9 -8
- package/dist/packages/runtime/context-checks.d.ts +10 -0
- package/dist/packages/runtime/context-checks.js +127 -0
- package/dist/packages/runtime/context-graph-scaffold.d.ts +9 -0
- package/dist/packages/runtime/context-graph-scaffold.js +135 -0
- package/dist/packages/runtime/context-graph-semantic-graph.d.ts +9 -0
- package/dist/packages/runtime/context-graph-semantic-graph.js +416 -0
- package/dist/packages/runtime/entitlement-guard.d.ts +43 -0
- package/dist/packages/runtime/entitlement-guard.js +70 -0
- package/dist/packages/{engine → runtime}/execution/index.d.ts +2 -2
- package/dist/packages/{engine → runtime}/execution/index.js +1 -1
- package/dist/packages/{engine → runtime}/execution/lib/schema.d.ts +272 -191
- package/dist/packages/{engine → runtime}/execution/lib/schema.js +35 -32
- package/dist/packages/runtime/index.d.ts +29 -0
- package/dist/packages/runtime/index.js +21 -0
- package/dist/packages/runtime/instance-paths.d.ts +30 -0
- package/dist/packages/runtime/instance-paths.js +29 -0
- package/dist/packages/runtime/native-run-handlers.d.ts +63 -0
- package/dist/packages/{engine → runtime}/native-run-handlers.js +217 -166
- package/dist/packages/runtime/plan-artifact-contract.d.ts +17 -0
- package/dist/packages/runtime/plan-artifact-contract.js +42 -0
- package/dist/packages/runtime/project-entries.d.ts +11 -0
- package/dist/packages/runtime/project-entries.js +49 -0
- package/dist/packages/runtime/project-source-state.d.ts +26 -0
- package/dist/packages/runtime/project-source-state.js +56 -0
- package/dist/packages/runtime/project-store.d.ts +90 -0
- package/dist/packages/runtime/project-store.js +195 -0
- package/dist/packages/runtime/requested-artifacts.d.ts +7 -0
- package/dist/packages/{engine → runtime}/requested-artifacts.js +23 -1
- package/dist/packages/{engine → runtime}/run-observability.d.ts +2 -1
- package/dist/packages/{engine → runtime}/run-observability.js +174 -87
- package/dist/packages/runtime/runtime-action-proposals.d.ts +7 -0
- package/dist/packages/runtime/runtime-action-proposals.js +542 -0
- package/dist/packages/runtime/runtime-build-plans.d.ts +5 -0
- package/dist/packages/runtime/runtime-build-plans.js +175 -0
- package/dist/packages/runtime/runtime-build-runs.d.ts +47 -0
- package/dist/packages/runtime/runtime-build-runs.js +555 -0
- package/dist/packages/runtime/runtime-caches.d.ts +117 -0
- package/dist/packages/runtime/runtime-caches.js +266 -0
- package/dist/packages/{engine → runtime}/runtime-event-applier.d.ts +3 -1
- package/dist/packages/{engine → runtime}/runtime-event-applier.js +53 -17
- package/dist/packages/runtime/runtime-executor.d.ts +22 -0
- package/dist/packages/runtime/runtime-executor.js +131 -0
- package/dist/packages/runtime/runtime-jobs.d.ts +13 -0
- package/dist/packages/runtime/runtime-jobs.js +463 -0
- package/dist/packages/runtime/runtime-observability.d.ts +11 -0
- package/dist/packages/runtime/runtime-observability.js +39 -0
- package/dist/packages/{engine → runtime}/runtime-persistence.d.ts +9 -18
- package/dist/packages/{engine → runtime}/runtime-persistence.js +25 -25
- package/dist/packages/runtime/runtime-project-mutations.d.ts +7 -0
- package/dist/packages/runtime/runtime-project-mutations.js +65 -0
- package/dist/packages/runtime/runtime-project-reads.d.ts +18 -0
- package/dist/packages/runtime/runtime-project-reads.js +574 -0
- package/dist/packages/runtime/runtime-proposal-helpers.d.ts +22 -0
- package/dist/packages/runtime/runtime-proposal-helpers.js +223 -0
- package/dist/packages/{engine → runtime}/runtime-resource-builders.d.ts +23 -16
- package/dist/packages/{engine → runtime}/runtime-resource-builders.js +58 -46
- package/dist/packages/runtime/runtime-status.d.ts +14 -0
- package/dist/packages/runtime/runtime-status.js +15 -0
- package/dist/packages/runtime/runtime-verify-runs.d.ts +84 -0
- package/dist/packages/runtime/runtime-verify-runs.js +296 -0
- package/dist/packages/runtime/runtime.d.ts +1582 -0
- package/dist/packages/runtime/runtime.js +431 -0
- package/dist/packages/runtime/schemas/actions.d.ts +1206 -0
- package/dist/packages/runtime/schemas/actions.js +117 -0
- package/dist/packages/runtime/schemas/agents.d.ts +104 -0
- package/dist/packages/runtime/schemas/agents.js +74 -0
- package/dist/packages/runtime/schemas/build-plans.d.ts +1132 -0
- package/dist/packages/runtime/schemas/build-plans.js +141 -0
- package/dist/packages/runtime/schemas/context-graphs.d.ts +1522 -0
- package/dist/packages/runtime/schemas/context-graphs.js +110 -0
- package/dist/packages/runtime/schemas/files.d.ts +227 -0
- package/dist/packages/runtime/schemas/files.js +28 -0
- package/dist/packages/runtime/schemas/index.d.ts +9 -0
- package/dist/packages/runtime/schemas/index.js +13 -0
- package/dist/packages/runtime/schemas/instance.d.ts +141 -0
- package/dist/packages/runtime/schemas/instance.js +143 -0
- package/dist/packages/runtime/schemas/jobs.d.ts +339 -0
- package/dist/packages/runtime/schemas/jobs.js +107 -0
- package/dist/packages/runtime/schemas/projects.d.ts +366 -0
- package/dist/packages/runtime/schemas/projects.js +160 -0
- package/dist/packages/runtime/schemas/runs.d.ts +3445 -0
- package/dist/packages/runtime/schemas/runs.js +115 -0
- package/dist/packages/runtime/service/index.d.ts +3 -0
- package/dist/packages/runtime/service/index.js +3 -0
- package/dist/packages/runtime/service/openapi.d.ts +7 -0
- package/dist/packages/runtime/service/openapi.js +118 -0
- package/dist/packages/runtime/service/operations.d.ts +3011 -0
- package/dist/packages/runtime/service/operations.js +375 -0
- package/dist/packages/runtime/service/routes.d.ts +114 -0
- package/dist/packages/runtime/service/routes.js +128 -0
- package/dist/packages/runtime/service/server-api-files.d.ts +10 -0
- package/dist/packages/runtime/service/server-api-files.js +85 -0
- package/dist/packages/runtime/service/server-app-boot.d.ts +4 -0
- package/dist/packages/runtime/service/server-app-boot.js +46 -0
- package/dist/packages/runtime/service/server-guards.d.ts +63 -0
- package/dist/packages/runtime/service/server-guards.js +181 -0
- package/dist/packages/runtime/service/server-helpers.d.ts +38 -0
- package/dist/packages/runtime/service/server-helpers.js +108 -0
- package/dist/packages/runtime/service/server-instance-helpers.d.ts +30 -0
- package/dist/packages/runtime/service/server-instance-helpers.js +114 -0
- package/dist/packages/runtime/service/server-routes-action-proposals.d.ts +3 -0
- package/dist/packages/runtime/service/server-routes-action-proposals.js +45 -0
- package/dist/packages/runtime/service/server-routes-agents.d.ts +4 -0
- package/dist/packages/runtime/service/server-routes-agents.js +132 -0
- package/dist/packages/runtime/service/server-routes-auth.d.ts +33 -0
- package/dist/packages/runtime/service/server-routes-auth.js +138 -0
- package/dist/packages/runtime/service/server-routes-build-plans.d.ts +3 -0
- package/dist/packages/runtime/service/server-routes-build-plans.js +86 -0
- package/dist/packages/runtime/service/server-routes-discovery.d.ts +4 -0
- package/dist/packages/runtime/service/server-routes-discovery.js +196 -0
- package/dist/packages/runtime/service/server-routes-events.d.ts +5 -0
- package/dist/packages/runtime/service/server-routes-events.js +99 -0
- package/dist/packages/runtime/service/server-routes-project-context.d.ts +9 -0
- package/dist/packages/runtime/service/server-routes-project-context.js +287 -0
- package/dist/packages/runtime/service/server-routes-project-jobs.d.ts +9 -0
- package/dist/packages/runtime/service/server-routes-project-jobs.js +137 -0
- package/dist/packages/runtime/service/server-routes-project-runs.d.ts +14 -0
- package/dist/packages/runtime/service/server-routes-project-runs.js +88 -0
- package/dist/packages/runtime/service/server-routes-projects.d.ts +4 -0
- package/dist/packages/runtime/service/server-routes-projects.js +96 -0
- package/dist/packages/runtime/service/server-routes-runs.d.ts +3 -0
- package/dist/packages/runtime/service/server-routes-runs.js +119 -0
- package/dist/packages/runtime/service/server.d.ts +37 -0
- package/dist/packages/runtime/service/server.js +300 -0
- package/dist/packages/{engine → runtime/service}/service-registry.d.ts +5 -5
- package/dist/packages/{engine → runtime/service}/service-registry.js +7 -7
- package/dist/packages/runtime/verify/benchmark-run.d.ts +81 -0
- package/dist/packages/runtime/verify/benchmark-run.js +303 -0
- package/dist/packages/{engine → runtime}/verify/index.d.ts +2 -2
- package/dist/packages/{engine → runtime}/verify/index.js +1 -1
- package/dist/packages/{engine → runtime}/verify/lib/schema.d.ts +83 -16
- package/dist/packages/{engine → runtime}/verify/lib/schema.js +38 -18
- package/dist/packages/runtime/verify/test-file-guard.d.ts +2 -0
- package/dist/packages/runtime/verify/test-file-guard.js +29 -0
- package/dist/packages/{engine → runtime}/verify/verify-execution.d.ts +7 -0
- package/dist/packages/{engine → runtime}/verify/verify-execution.js +119 -45
- package/dist/packages/{engine → runtime}/verify/verify-paths.d.ts +5 -4
- package/dist/packages/runtime/verify/verify-paths.js +65 -0
- package/dist/packages/{engine → runtime}/verify/verify-sandbox.d.ts +1 -1
- package/dist/packages/runtime/verify/verify-sandbox.js +88 -0
- package/dist/packages/{engine → runtime}/verify/verify-specs.d.ts +2 -0
- package/dist/packages/runtime/verify/verify-specs.js +126 -0
- package/dist/packages/runtime/verify/verify-targets.d.ts +5 -0
- package/dist/packages/{engine → runtime}/verify/verify-targets.js +12 -12
- package/dist/packages/runtime/verify/verify-types.js +1 -0
- package/dist/packages/{engine → runtime}/verify/verify.d.ts +1 -1
- package/dist/packages/{engine → runtime}/verify/verify.js +1 -1
- package/dist/packages/runtime/wire-schemas.d.ts +18 -0
- package/dist/packages/runtime/wire-schemas.js +27 -0
- package/package.json +32 -30
- package/public-repo/CONTRIBUTING.md +16 -18
- package/public-repo/README.md +119 -282
- package/public-repo/SECURITY.md +3 -4
- package/public-repo/build-plans/interf-default/README.md +24 -16
- package/public-repo/build-plans/interf-default/build/stages/entrypoint/SKILL.md +74 -0
- package/public-repo/build-plans/interf-default/build/stages/knowledge/SKILL.md +95 -0
- package/public-repo/build-plans/interf-default/build/stages/summarize/SKILL.md +49 -4
- package/public-repo/build-plans/interf-default/build-plan.json +49 -39
- package/public-repo/build-plans/interf-default/build-plan.schema.json +59 -33
- package/public-repo/build-plans/interf-default/improve/SKILL.md +3 -3
- package/public-repo/build-plans/interf-default/use/query/SKILL.md +18 -11
- package/public-repo/openapi/local-service.openapi.json +14227 -0
- package/public-repo/skills/interf/SKILL.md +508 -187
- package/dist/cli/commands/prep.d.ts +0 -2
- package/dist/cli/commands/prep.js +0 -240
- package/dist/cli/commands/test.d.ts +0 -10
- package/dist/cli/commands/test.js +0 -85
- package/dist/cli/commands/web.d.ts +0 -2
- package/dist/cli/commands/web.js +0 -286
- package/dist/interf-ui/404.html +0 -1
- package/dist/interf-ui/__next.__PAGE__.txt +0 -10
- package/dist/interf-ui/__next._full.txt +0 -20
- package/dist/interf-ui/__next._head.txt +0 -5
- package/dist/interf-ui/__next._index.txt +0 -5
- package/dist/interf-ui/__next._tree.txt +0 -5
- package/dist/interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6/_buildManifest.js +0 -11
- package/dist/interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6/_clientMiddlewareManifest.js +0 -1
- package/dist/interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6/_ssgManifest.js +0 -1
- package/dist/interf-ui/_next/static/chunks/0.tjb6f4golw..css +0 -3
- package/dist/interf-ui/_next/static/chunks/03~yq9q893hmn.js +0 -1
- package/dist/interf-ui/_next/static/chunks/085-n_jv2ng_q.css +0 -1
- package/dist/interf-ui/_next/static/chunks/0dn41fa_zvgsl.js +0 -1
- package/dist/interf-ui/_next/static/chunks/0g-ea0zj5d-0k.js +0 -1
- package/dist/interf-ui/_next/static/chunks/0gwqglc4iz583.js +0 -1
- package/dist/interf-ui/_next/static/chunks/0haldgm65ve6l.js +0 -1
- package/dist/interf-ui/_next/static/chunks/0nv3am99vjzn4.js +0 -1
- package/dist/interf-ui/_next/static/chunks/0s77gt_o4jwtx.js +0 -1
- package/dist/interf-ui/_next/static/chunks/0y5z3t-z1c8ks.js.map +0 -5
- package/dist/interf-ui/_next/static/chunks/0~a36ujuzpaz..js +0 -116
- package/dist/interf-ui/_next/static/chunks/10jeodxe4nkgj.js +0 -31
- package/dist/interf-ui/_next/static/chunks/119h2rouych2t.js +0 -1
- package/dist/interf-ui/_next/static/chunks/13c8b~m8knjsf.js +0 -1
- package/dist/interf-ui/_next/static/chunks/14dznb2qpt-ho.js +0 -91
- package/dist/interf-ui/_next/static/chunks/15z_en80lrq-3.js +0 -5
- package/dist/interf-ui/_next/static/chunks/turbopack-0p.pvcjrtq-jh.js +0 -1
- package/dist/interf-ui/_next/static/chunks/turbopack-0usj_75.8frlw.js +0 -1
- package/dist/interf-ui/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -1
- package/dist/interf-ui/_next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- package/dist/interf-ui/_next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- package/dist/interf-ui/_next/static/media/worker.102zas1s52_pf.js +0 -109
- package/dist/interf-ui/_not-found/__next._full.txt +0 -15
- package/dist/interf-ui/_not-found/__next._head.txt +0 -5
- package/dist/interf-ui/_not-found/__next._index.txt +0 -5
- package/dist/interf-ui/_not-found/__next._not-found.__PAGE__.txt +0 -5
- package/dist/interf-ui/_not-found/__next._not-found.txt +0 -5
- package/dist/interf-ui/_not-found/__next._tree.txt +0 -2
- package/dist/interf-ui/_not-found.html +0 -1
- package/dist/interf-ui/_not-found.txt +0 -15
- package/dist/interf-ui/index.html +0 -1
- package/dist/interf-ui/index.txt +0 -20
- package/dist/packages/contracts/lib/preparation-paths.d.ts +0 -117
- package/dist/packages/contracts/lib/preparation-paths.js +0 -177
- package/dist/packages/engine/action-definitions.d.ts +0 -407
- package/dist/packages/engine/action-definitions.js +0 -1158
- package/dist/packages/engine/action-values.d.ts +0 -1
- package/dist/packages/engine/action-values.js +0 -1
- package/dist/packages/engine/agents/lib/args.d.ts +0 -4
- package/dist/packages/engine/agents/lib/args.js +0 -52
- package/dist/packages/engine/agents/lib/chart-guidance.d.ts +0 -1
- package/dist/packages/engine/agents/lib/chart-guidance.js +0 -8
- package/dist/packages/engine/agents/lib/constants.js +0 -28
- package/dist/packages/engine/agents/lib/logs.d.ts +0 -2
- package/dist/packages/engine/agents/lib/logs.js +0 -17
- package/dist/packages/engine/agents/lib/render.d.ts +0 -8
- package/dist/packages/engine/agents/lib/schema.d.ts +0 -8
- package/dist/packages/engine/agents/lib/schema.js +0 -7
- package/dist/packages/engine/agents/lib/shells.d.ts +0 -74
- package/dist/packages/engine/agents/lib/shells.js +0 -1052
- package/dist/packages/engine/agents/lib/verifiable-context-bootstrap.d.ts +0 -3
- package/dist/packages/engine/build/artifact-counts.d.ts +0 -1
- package/dist/packages/engine/build/billing-events.d.ts +0 -89
- package/dist/packages/engine/build/build-pipeline.js +0 -175
- package/dist/packages/engine/build/build-plan-runs.d.ts +0 -14
- package/dist/packages/engine/build/build-plan-runs.js +0 -31
- package/dist/packages/engine/build/build-stage-plan.d.ts +0 -16
- package/dist/packages/engine/build/build-stage-plan.js +0 -100
- package/dist/packages/engine/build/build-stage-runner.js +0 -94
- package/dist/packages/engine/build/build-target.js +0 -16
- package/dist/packages/engine/build/check-evaluator.js +0 -298
- package/dist/packages/engine/build/lib/schema.js +0 -316
- package/dist/packages/engine/build/reset.d.ts +0 -2
- package/dist/packages/engine/build/reset.js +0 -74
- package/dist/packages/engine/build/runtime-inventory.d.ts +0 -7
- package/dist/packages/engine/build/runtime-paths.d.ts +0 -8
- package/dist/packages/engine/build/runtime-paths.js +0 -26
- package/dist/packages/engine/build/runtime-runs.d.ts +0 -10
- package/dist/packages/engine/build/runtime-runs.js +0 -224
- package/dist/packages/engine/build/runtime.d.ts +0 -5
- package/dist/packages/engine/build/runtime.js +0 -4
- package/dist/packages/engine/build/source-files.d.ts +0 -46
- package/dist/packages/engine/build/source-files.js +0 -149
- package/dist/packages/engine/build/state-artifacts.d.ts +0 -9
- package/dist/packages/engine/build/state-artifacts.js +0 -14
- package/dist/packages/engine/build/state-health.d.ts +0 -4
- package/dist/packages/engine/build/state-io.d.ts +0 -11
- package/dist/packages/engine/build/state-io.js +0 -82
- package/dist/packages/engine/build/state-paths.d.ts +0 -5
- package/dist/packages/engine/build/state-paths.js +0 -16
- package/dist/packages/engine/build/state-view.d.ts +0 -5
- package/dist/packages/engine/build/state-view.js +0 -94
- package/dist/packages/engine/build/state.d.ts +0 -7
- package/dist/packages/engine/build/state.js +0 -12
- package/dist/packages/engine/build/validate-helpers.d.ts +0 -12
- package/dist/packages/engine/build/validate-helpers.js +0 -41
- package/dist/packages/engine/build/verifiable-context-paths.d.ts +0 -47
- package/dist/packages/engine/build/verifiable-context-paths.js +0 -121
- package/dist/packages/engine/build/verifiable-context-schema.d.ts +0 -21
- package/dist/packages/engine/build/verifiable-context-schema.js +0 -126
- package/dist/packages/engine/cloud-seams.d.ts +0 -115
- package/dist/packages/engine/cloud-seams.js +0 -84
- package/dist/packages/engine/index.d.ts +0 -22
- package/dist/packages/engine/index.js +0 -15
- package/dist/packages/engine/instance-paths.d.ts +0 -106
- package/dist/packages/engine/instance-paths.js +0 -171
- package/dist/packages/engine/lib/schema.d.ts +0 -6304
- package/dist/packages/engine/lib/schema.js +0 -730
- package/dist/packages/engine/native-run-handlers.d.ts +0 -25
- package/dist/packages/engine/preparation-store.d.ts +0 -105
- package/dist/packages/engine/preparation-store.js +0 -213
- package/dist/packages/engine/readiness-check-draft.d.ts +0 -20
- package/dist/packages/engine/readiness-check-draft.js +0 -111
- package/dist/packages/engine/requested-artifacts.d.ts +0 -5
- package/dist/packages/engine/routes.d.ts +0 -85
- package/dist/packages/engine/routes.js +0 -99
- package/dist/packages/engine/runtime-caches.d.ts +0 -76
- package/dist/packages/engine/runtime-caches.js +0 -191
- package/dist/packages/engine/runtime-proposal-helpers.d.ts +0 -35
- package/dist/packages/engine/runtime-proposal-helpers.js +0 -247
- package/dist/packages/engine/runtime.d.ts +0 -371
- package/dist/packages/engine/runtime.js +0 -2463
- package/dist/packages/engine/server.d.ts +0 -58
- package/dist/packages/engine/server.js +0 -1399
- package/dist/packages/engine/verify/readiness-check-run.d.ts +0 -82
- package/dist/packages/engine/verify/readiness-check-run.js +0 -265
- package/dist/packages/engine/verify/verify-paths.js +0 -61
- package/dist/packages/engine/verify/verify-sandbox.js +0 -88
- package/dist/packages/engine/verify/verify-specs.js +0 -114
- package/dist/packages/engine/verify/verify-targets.d.ts +0 -5
- package/dist/packages/engine/wire-schemas.d.ts +0 -547
- package/dist/packages/engine/wire-schemas.js +0 -59
- package/dist/packages/project/index.d.ts +0 -9
- package/dist/packages/project/interf-bootstrap.d.ts +0 -1
- package/dist/packages/project/interf-bootstrap.js +0 -1
- package/dist/packages/project/interf-scaffold.d.ts +0 -3
- package/dist/packages/project/interf-scaffold.js +0 -136
- package/dist/packages/project/interf.d.ts +0 -4
- package/dist/packages/project/interf.js +0 -3
- package/dist/packages/project/lib/schema.d.ts +0 -328
- package/dist/packages/project/lib/schema.js +0 -136
- package/dist/packages/project/preparation-entries.d.ts +0 -11
- package/dist/packages/project/preparation-entries.js +0 -49
- package/dist/packages/project/source-config.d.ts +0 -46
- package/dist/packages/project/source-config.js +0 -394
- package/dist/packages/project/source-folders.d.ts +0 -11
- package/public-repo/build-plans/interf-default/build/stages/shape/SKILL.md +0 -27
- package/public-repo/build-plans/interf-default/build/stages/structure/SKILL.md +0 -21
- package/public-repo/plugins/README.md +0 -9
- package/public-repo/plugins/interf/.claude-plugin/plugin.json +0 -21
- package/public-repo/plugins/interf/.mcp.json +0 -12
- package/public-repo/plugins/interf/README.md +0 -32
- package/public-repo/plugins/interf/skills/interf/SKILL.md +0 -376
- /package/dist/packages/{engine/agents/lib/types.js → runtime/actions/fields.js} +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/agents.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/agents.js +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/execution.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/preflight.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/status.d.ts +0 -0
- /package/dist/packages/{engine/build/runtime-types.js → runtime/agents/lib/types.js} +0 -0
- /package/dist/packages/{engine/verify/verify-types.js → runtime/agents/providers/types.js} +0 -0
- /package/dist/packages/{engine → runtime}/agents/role-router.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/build/build-execution.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/build/build-execution.js +0 -0
- /package/dist/packages/{engine → runtime}/build/runtime-contracts.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/build/runtime-prompt.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/execution/adapters.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/execution/adapters.js +0 -0
- /package/dist/packages/{engine → runtime}/execution/events.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/execution/events.js +0 -0
- /package/dist/packages/{engine → runtime}/verify/verify-profile-presets.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/verify/verify-profile-presets.js +0 -0
- /package/dist/packages/{engine → runtime}/verify/verify-types.d.ts +0 -0
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import type { AgentExecutor } from "../agents/lib/executors.js";
|
|
2
|
-
import type { SourcePreparationConfig } from "../../project/lib/schema.js";
|
|
3
|
-
import type { TestTargetType } from "../../contracts/lib/schema.js";
|
|
4
|
-
import { type TestTargetCandidate, type TestTargetResult } from "./verify.js";
|
|
5
|
-
import type { TestSandboxRetentionMode } from "./verify-sandbox.js";
|
|
6
|
-
import { type ReadinessCheckRun } from "./lib/schema.js";
|
|
7
|
-
export interface SavedReadinessCheckOutcome {
|
|
8
|
-
runPath: string;
|
|
9
|
-
displayRunPath?: string;
|
|
10
|
-
target: TestTargetCandidate;
|
|
11
|
-
result: TestTargetResult;
|
|
12
|
-
}
|
|
13
|
-
export interface ReadinessCheckRunResult {
|
|
14
|
-
sourcePath: string;
|
|
15
|
-
preparationConfig: SourcePreparationConfig;
|
|
16
|
-
verifiableContextPath: string | null;
|
|
17
|
-
/**
|
|
18
|
-
* 0.17 — restored. Populated when the verify run targets
|
|
19
|
-
* `source-files`; null when targeting verifiable context. Aggregates back
|
|
20
|
-
* onto the saved `ReadinessCheckRun` payload's `source_files` field.
|
|
21
|
-
*/
|
|
22
|
-
sourceFilesOutcome: SavedReadinessCheckOutcome | null;
|
|
23
|
-
verifiableContextOutcome: SavedReadinessCheckOutcome | null;
|
|
24
|
-
readinessRunPath: string | null;
|
|
25
|
-
readinessRun: ReadinessCheckRun | null;
|
|
26
|
-
}
|
|
27
|
-
export declare function readinessPassRate(outcome: SavedReadinessCheckOutcome): number;
|
|
28
|
-
export declare function readSavedReadinessCheckRun(prepDataDir: string, preparationName: string): ReadinessCheckRun | null;
|
|
29
|
-
export declare function parseReadinessCheckRun(value: unknown): ReadinessCheckRun | null;
|
|
30
|
-
export declare function readReadinessCheckRunAtPath(filePath: string, label?: string): ReadinessCheckRun | null;
|
|
31
|
-
export declare function readCurrentSavedReadinessCheckRun(options: {
|
|
32
|
-
prepDataDir: string;
|
|
33
|
-
preparationName: string;
|
|
34
|
-
checks: SourcePreparationConfig["checks"];
|
|
35
|
-
}): {
|
|
36
|
-
readinessRun: ReadinessCheckRun | null;
|
|
37
|
-
stale: boolean;
|
|
38
|
-
};
|
|
39
|
-
export declare function saveReadinessCheckRun(options: {
|
|
40
|
-
sourcePath: string;
|
|
41
|
-
verifiableContextPath: string | null;
|
|
42
|
-
preparationName: string;
|
|
43
|
-
checksFingerprint: string;
|
|
44
|
-
sourceFilesOutcome?: SavedReadinessCheckOutcome | null;
|
|
45
|
-
verifiableContextOutcome: SavedReadinessCheckOutcome | null;
|
|
46
|
-
}): string;
|
|
47
|
-
export declare function runSavedVerifiableContextCheck(options: {
|
|
48
|
-
sourcePath: string;
|
|
49
|
-
preparationConfig: SourcePreparationConfig;
|
|
50
|
-
executor?: AgentExecutor | null;
|
|
51
|
-
verifiableContextPath?: string | null;
|
|
52
|
-
preserveSandboxes?: TestSandboxRetentionMode;
|
|
53
|
-
runSuffix?: string | null;
|
|
54
|
-
}): Promise<SavedReadinessCheckOutcome | null>;
|
|
55
|
-
/**
|
|
56
|
-
* 0.17 — restored. Runs the saved readiness checks against the source
|
|
57
|
-
* folder baseline (no verifiable-context indirection) so users can see how
|
|
58
|
-
* much value the Build Plan actually adds. The lower-level `verify-execution`
|
|
59
|
-
* + `verify-sandbox` source-files paths have stayed in tree since 0.13;
|
|
60
|
-
* this is the orchestrator hook that was missing.
|
|
61
|
-
*/
|
|
62
|
-
export declare function runSavedSourceFilesCheck(options: {
|
|
63
|
-
sourcePath: string;
|
|
64
|
-
preparationConfig: SourcePreparationConfig;
|
|
65
|
-
executor?: AgentExecutor | null;
|
|
66
|
-
preserveSandboxes?: TestSandboxRetentionMode;
|
|
67
|
-
runSuffix?: string | null;
|
|
68
|
-
}): Promise<SavedReadinessCheckOutcome | null>;
|
|
69
|
-
export declare function runReadinessChecksForExecutor(options: {
|
|
70
|
-
sourcePath: string;
|
|
71
|
-
preparationConfig: SourcePreparationConfig;
|
|
72
|
-
verifiableContextPath: string | null;
|
|
73
|
-
executor?: AgentExecutor | null;
|
|
74
|
-
preserveSandboxes?: TestSandboxRetentionMode;
|
|
75
|
-
runSuffix?: string | null;
|
|
76
|
-
saveLatest?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* 0.17 — selects which target the readiness checks judge against.
|
|
79
|
-
* Defaults to verifiable context.
|
|
80
|
-
*/
|
|
81
|
-
target?: TestTargetType;
|
|
82
|
-
}): Promise<ReadinessCheckRunResult>;
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { dirname, join } from "node:path";
|
|
3
|
-
import { buildTestSpecFromPreparationConfig, buildTestSpecFromSourceFolderConfig, fingerprintReadinessChecks, resolveConfiguredSourceFolderPath, resolveSourcePreparationPath, } from "../../project/source-config.js";
|
|
4
|
-
import { asPreparationDataDir, preparationLatestReadinessRunPath, preparationLatestReadinessSummaryPath, preparationTestRunPath, preparationTestRunsRoot, preparationTestsRoot, normalizePreparationTestRunId, preparationVerifiableContextPath, } from "../../contracts/lib/preparation-paths.js";
|
|
5
|
-
import { testRootForVerifiableContext } from "../build/verifiable-context-paths.js";
|
|
6
|
-
import { readJsonFileWithSchema } from "../../contracts/utils/parse.js";
|
|
7
|
-
import { resolveBuildPlanId } from "../../build-plans/build-plan-resolution.js";
|
|
8
|
-
import { createVerifiableContextTestTarget, createSourceFilesTestTarget, runTargetTestsAuto, saveTargetTestRun, } from "./verify.js";
|
|
9
|
-
import { ReadinessCheckRunSchema, } from "./lib/schema.js";
|
|
10
|
-
export function readinessPassRate(outcome) {
|
|
11
|
-
return outcome.result.totalCases > 0
|
|
12
|
-
? Math.round((outcome.result.passedCases / outcome.result.totalCases) * 100)
|
|
13
|
-
: 0;
|
|
14
|
-
}
|
|
15
|
-
function visibleRunPath(outcome) {
|
|
16
|
-
return outcome.displayRunPath ?? outcome.runPath;
|
|
17
|
-
}
|
|
18
|
-
function summarizeSavedTestOutcome(label, outcome) {
|
|
19
|
-
return {
|
|
20
|
-
label,
|
|
21
|
-
run_path: visibleRunPath(outcome),
|
|
22
|
-
ok: outcome.result.ok,
|
|
23
|
-
passed_cases: outcome.result.passedCases,
|
|
24
|
-
total_cases: outcome.result.totalCases,
|
|
25
|
-
passed_checks: outcome.result.passedChecks,
|
|
26
|
-
total_checks: outcome.result.totalChecks,
|
|
27
|
-
target: outcome.target,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function writePreparationTargetRun(options) {
|
|
31
|
-
const dirPath = preparationTestRunsRoot(asPreparationDataDir(options.prepDataDir), options.preparationName, options.target);
|
|
32
|
-
mkdirSync(dirPath, { recursive: true });
|
|
33
|
-
const runPath = preparationTestRunPath(asPreparationDataDir(options.prepDataDir), options.preparationName, options.target, options.generatedAt, options.runId, options.runSuffix);
|
|
34
|
-
writeFileSync(runPath, `${JSON.stringify(options.payload, null, 2)}\n`);
|
|
35
|
-
return runPath;
|
|
36
|
-
}
|
|
37
|
-
function renderLatestSummaryMarkdown(payload) {
|
|
38
|
-
const lines = [
|
|
39
|
-
"# Latest Readiness Results",
|
|
40
|
-
"",
|
|
41
|
-
"| Target | Readiness checks |",
|
|
42
|
-
"| --- | --- |",
|
|
43
|
-
];
|
|
44
|
-
if (payload.source_files) {
|
|
45
|
-
lines.push(`| Source files | \`${payload.source_files.passed_cases}/${payload.source_files.total_cases}\` |`);
|
|
46
|
-
}
|
|
47
|
-
if (payload.verifiable_context) {
|
|
48
|
-
lines.push(`| Verifiable Context | \`${payload.verifiable_context.passed_cases}/${payload.verifiable_context.total_cases}\` |`);
|
|
49
|
-
}
|
|
50
|
-
lines.push("");
|
|
51
|
-
if (payload.source_files) {
|
|
52
|
-
lines.push(`- Latest source-files run: ${payload.source_files.run_path}`);
|
|
53
|
-
}
|
|
54
|
-
if (payload.verifiable_context) {
|
|
55
|
-
lines.push(`- Latest verifiable-context run: ${payload.verifiable_context.run_path}`);
|
|
56
|
-
}
|
|
57
|
-
return `${lines.join("\n")}\n`;
|
|
58
|
-
}
|
|
59
|
-
export function readSavedReadinessCheckRun(prepDataDir, preparationName) {
|
|
60
|
-
const latestPath = preparationLatestReadinessRunPath(asPreparationDataDir(prepDataDir), preparationName);
|
|
61
|
-
if (!existsSync(latestPath))
|
|
62
|
-
return null;
|
|
63
|
-
return readReadinessCheckRunAtPath(latestPath, "latest readiness-check run");
|
|
64
|
-
}
|
|
65
|
-
export function parseReadinessCheckRun(value) {
|
|
66
|
-
const parsed = ReadinessCheckRunSchema.safeParse(value);
|
|
67
|
-
return parsed.success ? parsed.data : null;
|
|
68
|
-
}
|
|
69
|
-
export function readReadinessCheckRunAtPath(filePath, label = "readiness-check run") {
|
|
70
|
-
return readJsonFileWithSchema(filePath, label, ReadinessCheckRunSchema);
|
|
71
|
-
}
|
|
72
|
-
export function readCurrentSavedReadinessCheckRun(options) {
|
|
73
|
-
const latestRun = readSavedReadinessCheckRun(options.prepDataDir, options.preparationName);
|
|
74
|
-
if (!latestRun) {
|
|
75
|
-
return { readinessRun: null, stale: false };
|
|
76
|
-
}
|
|
77
|
-
const currentFingerprint = fingerprintReadinessChecks(options.checks);
|
|
78
|
-
if (!latestRun.checks_fingerprint || latestRun.checks_fingerprint !== currentFingerprint) {
|
|
79
|
-
return { readinessRun: null, stale: true };
|
|
80
|
-
}
|
|
81
|
-
return { readinessRun: latestRun, stale: false };
|
|
82
|
-
}
|
|
83
|
-
function modeForOutcomes(sourceFilesOutcome, verifiableContextOutcome) {
|
|
84
|
-
if (sourceFilesOutcome && verifiableContextOutcome)
|
|
85
|
-
return "both";
|
|
86
|
-
if (sourceFilesOutcome)
|
|
87
|
-
return "source-files";
|
|
88
|
-
return "verifiable-context";
|
|
89
|
-
}
|
|
90
|
-
function passRateOf(summary) {
|
|
91
|
-
if (!summary)
|
|
92
|
-
return null;
|
|
93
|
-
if (summary.total_cases <= 0)
|
|
94
|
-
return 0;
|
|
95
|
-
return Math.round((summary.passed_cases / summary.total_cases) * 100);
|
|
96
|
-
}
|
|
97
|
-
export function saveReadinessCheckRun(options) {
|
|
98
|
-
const generatedAt = new Date().toISOString();
|
|
99
|
-
const sourceFilesOutcome = options.sourceFilesOutcome ?? null;
|
|
100
|
-
const sourceFilesSummary = sourceFilesOutcome
|
|
101
|
-
? summarizeSavedTestOutcome("Source Files", sourceFilesOutcome)
|
|
102
|
-
: null;
|
|
103
|
-
const verifiableContextSummary = options.verifiableContextOutcome
|
|
104
|
-
? summarizeSavedTestOutcome("Verifiable Context", options.verifiableContextOutcome)
|
|
105
|
-
: null;
|
|
106
|
-
const payload = {
|
|
107
|
-
kind: "interf-readiness-check-run",
|
|
108
|
-
version: 1,
|
|
109
|
-
generated_at: generatedAt,
|
|
110
|
-
// 0.17 — verify carries the target it ran against on the wire so
|
|
111
|
-
// dashboards and the UI can show source-files baselines alongside
|
|
112
|
-
// verifiable-context judgments. `both` is reserved for future combined runs.
|
|
113
|
-
mode: modeForOutcomes(sourceFilesOutcome, options.verifiableContextOutcome),
|
|
114
|
-
source_path: options.sourcePath,
|
|
115
|
-
checks_fingerprint: options.checksFingerprint,
|
|
116
|
-
preparation: {
|
|
117
|
-
name: options.preparationName,
|
|
118
|
-
verifiable_context_path: options.verifiableContextPath,
|
|
119
|
-
},
|
|
120
|
-
source_files: sourceFilesSummary,
|
|
121
|
-
verifiable_context: verifiableContextSummary,
|
|
122
|
-
summary: {
|
|
123
|
-
source_files_pass_rate: passRateOf(sourceFilesSummary),
|
|
124
|
-
verifiable_context_pass_rate: passRateOf(verifiableContextSummary),
|
|
125
|
-
},
|
|
126
|
-
};
|
|
127
|
-
const latestStatePath = preparationLatestReadinessRunPath(asPreparationDataDir(options.sourcePath), options.preparationName);
|
|
128
|
-
mkdirSync(dirname(latestStatePath), { recursive: true });
|
|
129
|
-
writeFileSync(latestStatePath, `${JSON.stringify(payload, null, 2)}\n`);
|
|
130
|
-
writeFileSync(preparationLatestReadinessSummaryPath(asPreparationDataDir(options.sourcePath), options.preparationName), renderLatestSummaryMarkdown(payload));
|
|
131
|
-
if (options.verifiableContextPath) {
|
|
132
|
-
mkdirSync(testRootForVerifiableContext(options.verifiableContextPath), { recursive: true });
|
|
133
|
-
writeFileSync(join(testRootForVerifiableContext(options.verifiableContextPath), "latest.json"), `${JSON.stringify(payload, null, 2)}\n`);
|
|
134
|
-
}
|
|
135
|
-
return latestStatePath;
|
|
136
|
-
}
|
|
137
|
-
export async function runSavedVerifiableContextCheck(options) {
|
|
138
|
-
const verifiableContextPath = options.verifiableContextPath
|
|
139
|
-
?? verifiableContextPathForPreparation(options.sourcePath, options.preparationConfig.name);
|
|
140
|
-
const spec = buildTestSpecFromPreparationConfig({
|
|
141
|
-
verifiableContextPath: verifiableContextPath,
|
|
142
|
-
targetType: "verifiable-context",
|
|
143
|
-
});
|
|
144
|
-
if (!spec)
|
|
145
|
-
return null;
|
|
146
|
-
const target = createVerifiableContextTestTarget(verifiableContextPath, options.preparationConfig.name, resolveBuildPlanId(options.preparationConfig));
|
|
147
|
-
if (!target.eligible)
|
|
148
|
-
return null;
|
|
149
|
-
const run = await runTargetTestsAuto(options.sourcePath, spec, [target], {
|
|
150
|
-
executor: options.executor,
|
|
151
|
-
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
152
|
-
artifactRootPath: verifiableContextPath,
|
|
153
|
-
});
|
|
154
|
-
const result = run.results[0];
|
|
155
|
-
if (!result)
|
|
156
|
-
return null;
|
|
157
|
-
const verifiableContextRunPath = saveTargetTestRun(verifiableContextPath, run);
|
|
158
|
-
const preparationRunPath = writePreparationTargetRun({
|
|
159
|
-
prepDataDir: options.sourcePath,
|
|
160
|
-
preparationName: options.preparationConfig.name,
|
|
161
|
-
target: "verifiable-context",
|
|
162
|
-
generatedAt: run.generated_at,
|
|
163
|
-
runId: normalizePreparationTestRunId(spec.id),
|
|
164
|
-
runSuffix: options.runSuffix,
|
|
165
|
-
payload: run,
|
|
166
|
-
});
|
|
167
|
-
return {
|
|
168
|
-
runPath: verifiableContextRunPath,
|
|
169
|
-
displayRunPath: preparationRunPath,
|
|
170
|
-
target,
|
|
171
|
-
result,
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* 0.17 — restored. Runs the saved readiness checks against the source
|
|
176
|
-
* folder baseline (no verifiable-context indirection) so users can see how
|
|
177
|
-
* much value the Build Plan actually adds. The lower-level `verify-execution`
|
|
178
|
-
* + `verify-sandbox` source-files paths have stayed in tree since 0.13;
|
|
179
|
-
* this is the orchestrator hook that was missing.
|
|
180
|
-
*/
|
|
181
|
-
export async function runSavedSourceFilesCheck(options) {
|
|
182
|
-
const spec = buildTestSpecFromSourceFolderConfig({
|
|
183
|
-
prepDataDir: options.sourcePath,
|
|
184
|
-
targetName: options.preparationConfig.name,
|
|
185
|
-
targetType: "source-files",
|
|
186
|
-
});
|
|
187
|
-
if (!spec)
|
|
188
|
-
return null;
|
|
189
|
-
const sourceFolderPath = resolveConfiguredSourceFolderPath(options.sourcePath) ??
|
|
190
|
-
resolveSourcePreparationPath(options.sourcePath, options.preparationConfig);
|
|
191
|
-
const target = createSourceFilesTestTarget(sourceFolderPath);
|
|
192
|
-
if (!target.eligible)
|
|
193
|
-
return null;
|
|
194
|
-
const run = await runTargetTestsAuto(sourceFolderPath, spec, [target], {
|
|
195
|
-
executor: options.executor,
|
|
196
|
-
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
197
|
-
artifactRootPath: preparationTestsRoot(asPreparationDataDir(options.sourcePath), options.preparationConfig.name),
|
|
198
|
-
});
|
|
199
|
-
const result = run.results[0];
|
|
200
|
-
if (!result)
|
|
201
|
-
return null;
|
|
202
|
-
const preparationRunPath = writePreparationTargetRun({
|
|
203
|
-
prepDataDir: options.sourcePath,
|
|
204
|
-
preparationName: options.preparationConfig.name,
|
|
205
|
-
target: "source-files",
|
|
206
|
-
generatedAt: run.generated_at,
|
|
207
|
-
runId: normalizePreparationTestRunId(spec.id),
|
|
208
|
-
runSuffix: options.runSuffix,
|
|
209
|
-
payload: run,
|
|
210
|
-
});
|
|
211
|
-
return {
|
|
212
|
-
runPath: preparationRunPath,
|
|
213
|
-
target,
|
|
214
|
-
result,
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
export async function runReadinessChecksForExecutor(options) {
|
|
218
|
-
const target = options.target ?? "verifiable-context";
|
|
219
|
-
const verifiableContextOutcome = target === "verifiable-context"
|
|
220
|
-
? await runSavedVerifiableContextCheck({
|
|
221
|
-
sourcePath: options.sourcePath,
|
|
222
|
-
preparationConfig: options.preparationConfig,
|
|
223
|
-
executor: options.executor,
|
|
224
|
-
verifiableContextPath: options.verifiableContextPath,
|
|
225
|
-
preserveSandboxes: options.preserveSandboxes,
|
|
226
|
-
runSuffix: options.runSuffix,
|
|
227
|
-
})
|
|
228
|
-
: null;
|
|
229
|
-
const sourceFilesOutcome = target === "source-files"
|
|
230
|
-
? await runSavedSourceFilesCheck({
|
|
231
|
-
sourcePath: options.sourcePath,
|
|
232
|
-
preparationConfig: options.preparationConfig,
|
|
233
|
-
executor: options.executor,
|
|
234
|
-
preserveSandboxes: options.preserveSandboxes,
|
|
235
|
-
runSuffix: options.runSuffix,
|
|
236
|
-
})
|
|
237
|
-
: null;
|
|
238
|
-
const modeSatisfied = Boolean(verifiableContextOutcome) || Boolean(sourceFilesOutcome);
|
|
239
|
-
const shouldSave = options.saveLatest !== false;
|
|
240
|
-
const readinessRunPath = shouldSave && modeSatisfied
|
|
241
|
-
? saveReadinessCheckRun({
|
|
242
|
-
sourcePath: options.sourcePath,
|
|
243
|
-
verifiableContextPath: options.verifiableContextPath,
|
|
244
|
-
preparationName: options.preparationConfig.name,
|
|
245
|
-
checksFingerprint: fingerprintReadinessChecks(options.preparationConfig.checks),
|
|
246
|
-
sourceFilesOutcome,
|
|
247
|
-
verifiableContextOutcome,
|
|
248
|
-
})
|
|
249
|
-
: null;
|
|
250
|
-
const readinessRun = shouldSave && modeSatisfied
|
|
251
|
-
? readSavedReadinessCheckRun(options.sourcePath, options.preparationConfig.name)
|
|
252
|
-
: null;
|
|
253
|
-
return {
|
|
254
|
-
sourcePath: options.sourcePath,
|
|
255
|
-
preparationConfig: options.preparationConfig,
|
|
256
|
-
verifiableContextPath: options.verifiableContextPath,
|
|
257
|
-
sourceFilesOutcome,
|
|
258
|
-
verifiableContextOutcome,
|
|
259
|
-
readinessRunPath,
|
|
260
|
-
readinessRun,
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
function verifiableContextPathForPreparation(sourcePath, preparationName) {
|
|
264
|
-
return preparationVerifiableContextPath(asPreparationDataDir(sourcePath), preparationName);
|
|
265
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { basename, dirname, join } from "node:path";
|
|
3
|
-
import { targetTestRunsRootForVerifiableContext, targetTestSandboxesRootForVerifiableContext, verifiableContextInterfConfigPath, } from "../build/verifiable-context-paths.js";
|
|
4
|
-
import { asPreparationDataDir, preparationTestsSpecsRoot, } from "../../contracts/lib/preparation-paths.js";
|
|
5
|
-
const TEST_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,79}$/;
|
|
6
|
-
export const TEST_SPEC_EXTENSIONS = new Set([".json"]);
|
|
7
|
-
export function testSpecRootPath(sourcePath) {
|
|
8
|
-
return preparationTestsSpecsRoot(asPreparationDataDir(sourcePath));
|
|
9
|
-
}
|
|
10
|
-
export function testSpecTypePath(sourcePath, type) {
|
|
11
|
-
return join(testSpecRootPath(sourcePath), type);
|
|
12
|
-
}
|
|
13
|
-
function isPreparationTestsRootPath(artifactRootPath) {
|
|
14
|
-
return basename(artifactRootPath) === "tests" &&
|
|
15
|
-
basename(dirname(artifactRootPath)) === ".interf";
|
|
16
|
-
}
|
|
17
|
-
export function targetTestRunsPath(verifiableContextPath, type) {
|
|
18
|
-
if (existsSync(verifiableContextInterfConfigPath(verifiableContextPath))) {
|
|
19
|
-
return join(targetTestRunsRootForVerifiableContext(verifiableContextPath), type);
|
|
20
|
-
}
|
|
21
|
-
if (isPreparationTestsRootPath(verifiableContextPath)) {
|
|
22
|
-
return join(verifiableContextPath, type === "source-files" ? "source-files" : "verifiable-context", "runs");
|
|
23
|
-
}
|
|
24
|
-
throw new Error(`Unsupported test artifact root: ${verifiableContextPath}. Expected verifiable context or interf/<preparation>/.interf/tests root.`);
|
|
25
|
-
}
|
|
26
|
-
export function targetTestRunGitignorePath(verifiableContextPath, type) {
|
|
27
|
-
return join(targetTestRunsPath(verifiableContextPath, type), ".gitignore");
|
|
28
|
-
}
|
|
29
|
-
export function targetTestSandboxesPath(verifiableContextPath, type) {
|
|
30
|
-
if (existsSync(verifiableContextInterfConfigPath(verifiableContextPath))) {
|
|
31
|
-
return join(targetTestSandboxesRootForVerifiableContext(verifiableContextPath), type);
|
|
32
|
-
}
|
|
33
|
-
if (isPreparationTestsRootPath(verifiableContextPath)) {
|
|
34
|
-
return join(verifiableContextPath, type === "source-files" ? "source-files" : "verifiable-context", "sandboxes");
|
|
35
|
-
}
|
|
36
|
-
throw new Error(`Unsupported test artifact root: ${verifiableContextPath}. Expected verifiable context or interf/<preparation>/.interf/tests root.`);
|
|
37
|
-
}
|
|
38
|
-
export function targetTestSandboxGitignorePath(verifiableContextPath, type) {
|
|
39
|
-
return join(targetTestSandboxesPath(verifiableContextPath, type), ".gitignore");
|
|
40
|
-
}
|
|
41
|
-
export function testSpecFilePath(sourcePath, type, id) {
|
|
42
|
-
return join(testSpecTypePath(sourcePath, type), `${id}.json`);
|
|
43
|
-
}
|
|
44
|
-
export function normalizeTestId(input) {
|
|
45
|
-
return input
|
|
46
|
-
.toLowerCase()
|
|
47
|
-
.trim()
|
|
48
|
-
.replace(/[^a-z0-9]+/g, "-")
|
|
49
|
-
.replace(/^-+|-+$/g, "")
|
|
50
|
-
.slice(0, 80);
|
|
51
|
-
}
|
|
52
|
-
export function assertTestId(id) {
|
|
53
|
-
if (!TEST_ID_PATTERN.test(id)) {
|
|
54
|
-
throw new Error(`Invalid test id: ${id}`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
export function assertWritableTestSpecPath(filePath) {
|
|
58
|
-
if (existsSync(filePath)) {
|
|
59
|
-
throw new Error(`Test spec already exists: ${filePath}`);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { cpSync, mkdirSync, mkdtempSync, renameSync, rmSync, writeFileSync, } from "node:fs";
|
|
2
|
-
import { tmpdir } from "node:os";
|
|
3
|
-
import { dirname, join } from "node:path";
|
|
4
|
-
import { refreshVerifiableContextBootstrapGuidance } from "../agents/lib/verifiable-context-bootstrap.js";
|
|
5
|
-
import { readInterfConfig, resolveSourceInputPath } from "../../project/interf.js";
|
|
6
|
-
import { projectSourceFilesTestQueryShell } from "../agents/lib/shells.js";
|
|
7
|
-
import { asPreparationDataDir, preparationVerifiableContextPath, } from "../../contracts/lib/preparation-paths.js";
|
|
8
|
-
import { saveVerifiableContextInterfConfig } from "../../project/source-config.js";
|
|
9
|
-
import { buildVerifiableContextSourceFiles } from "../build/source-files.js";
|
|
10
|
-
import { refreshVerifiableContextArtifacts } from "../build/state.js";
|
|
11
|
-
import { testRootForVerifiableContext, stageExecutionShellsRoot, targetTestSandboxesRootForVerifiableContext, buildPlanImprovementLoopsRoot, verifiableContextQueryAcceptanceRoot, verifiableContextRuntimeLogsRoot, } from "../build/verifiable-context-paths.js";
|
|
12
|
-
function sanitizeVerifiableContextArtifacts(verifiableContextPath) {
|
|
13
|
-
for (const absolutePath of [
|
|
14
|
-
testRootForVerifiableContext(verifiableContextPath),
|
|
15
|
-
targetTestSandboxesRootForVerifiableContext(verifiableContextPath),
|
|
16
|
-
stageExecutionShellsRoot(verifiableContextPath),
|
|
17
|
-
buildPlanImprovementLoopsRoot(verifiableContextPath),
|
|
18
|
-
verifiableContextRuntimeLogsRoot(verifiableContextPath),
|
|
19
|
-
verifiableContextQueryAcceptanceRoot(verifiableContextPath),
|
|
20
|
-
]) {
|
|
21
|
-
rmSync(absolutePath, { recursive: true, force: true });
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export function createTestSandbox(target) {
|
|
25
|
-
let sandboxRoot = mkdtempSync(join(tmpdir(), "interf-test-sandbox-"));
|
|
26
|
-
let preserved = false;
|
|
27
|
-
const sandboxVerifiableContextPath = () => (target.type === "verifiable-context"
|
|
28
|
-
? preparationVerifiableContextPath(asPreparationDataDir(sandboxRoot), target.name)
|
|
29
|
-
: null);
|
|
30
|
-
const sandboxTargetPath = () => (target.type === "verifiable-context"
|
|
31
|
-
? preparationVerifiableContextPath(asPreparationDataDir(sandboxRoot), target.name)
|
|
32
|
-
: sandboxRoot);
|
|
33
|
-
try {
|
|
34
|
-
if (target.type === "verifiable-context") {
|
|
35
|
-
const sourceInputPath = resolveSourceInputPath(target.path);
|
|
36
|
-
mkdirSync(dirname(sandboxTargetPath()), { recursive: true });
|
|
37
|
-
cpSync(target.path, sandboxTargetPath(), { recursive: true });
|
|
38
|
-
sanitizeVerifiableContextArtifacts(sandboxTargetPath());
|
|
39
|
-
const sandboxConfig = readInterfConfig(sandboxTargetPath());
|
|
40
|
-
if (!sandboxConfig) {
|
|
41
|
-
throw new Error(`Sandbox verifiable context is missing interf.json: ${sandboxTargetPath()}`);
|
|
42
|
-
}
|
|
43
|
-
saveVerifiableContextInterfConfig(sandboxTargetPath(), {
|
|
44
|
-
...sandboxConfig,
|
|
45
|
-
checks: [],
|
|
46
|
-
source: {
|
|
47
|
-
path: sourceInputPath,
|
|
48
|
-
preparation_path: sourceInputPath,
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
refreshVerifiableContextBootstrapGuidance(sandboxTargetPath());
|
|
52
|
-
refreshVerifiableContextArtifacts(sandboxTargetPath(), { ensureViewSpec: true });
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
mkdirSync(join(sandboxTargetPath(), "runtime"), { recursive: true });
|
|
56
|
-
writeFileSync(join(sandboxTargetPath(), "runtime", "source-files.json"), `${JSON.stringify(buildVerifiableContextSourceFiles(sandboxTargetPath(), target.path), null, 2)}\n`);
|
|
57
|
-
projectSourceFilesTestQueryShell(sandboxTargetPath());
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
catch (error) {
|
|
61
|
-
rmSync(sandboxRoot, { recursive: true, force: true });
|
|
62
|
-
throw error;
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
get rootPath() {
|
|
66
|
-
return sandboxRoot;
|
|
67
|
-
},
|
|
68
|
-
get targetPath() {
|
|
69
|
-
return sandboxTargetPath();
|
|
70
|
-
},
|
|
71
|
-
get verifiableContextPath() {
|
|
72
|
-
return sandboxVerifiableContextPath();
|
|
73
|
-
},
|
|
74
|
-
preserve(destinationPath) {
|
|
75
|
-
mkdirSync(dirname(destinationPath), { recursive: true });
|
|
76
|
-
rmSync(destinationPath, { recursive: true, force: true });
|
|
77
|
-
renameSync(sandboxRoot, destinationPath);
|
|
78
|
-
sandboxRoot = destinationPath;
|
|
79
|
-
preserved = true;
|
|
80
|
-
return sandboxRoot;
|
|
81
|
-
},
|
|
82
|
-
cleanup() {
|
|
83
|
-
if (preserved)
|
|
84
|
-
return;
|
|
85
|
-
rmSync(sandboxRoot, { recursive: true, force: true });
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readdirSync, writeFileSync, } from "node:fs";
|
|
2
|
-
import { basename, extname, join } from "node:path";
|
|
3
|
-
import { readJsonFileWithSchema } from "../../contracts/utils/parse.js";
|
|
4
|
-
import { TestSpecSchema } from "./lib/schema.js";
|
|
5
|
-
import { TEST_SPEC_EXTENSIONS, assertTestId, assertWritableTestSpecPath, testSpecFilePath, testSpecTypePath, normalizeTestId, } from "./verify-paths.js";
|
|
6
|
-
function readTestSpecFile(filePath) {
|
|
7
|
-
const extension = extname(filePath).toLowerCase();
|
|
8
|
-
if (!TEST_SPEC_EXTENSIONS.has(extension))
|
|
9
|
-
return null;
|
|
10
|
-
const parsed = readJsonFileWithSchema(filePath, "test spec", TestSpecSchema);
|
|
11
|
-
if (!parsed)
|
|
12
|
-
return null;
|
|
13
|
-
return {
|
|
14
|
-
...parsed,
|
|
15
|
-
id: basename(filePath, extension),
|
|
16
|
-
filePath,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function serializeTestSpec(spec) {
|
|
20
|
-
return {
|
|
21
|
-
type: spec.type,
|
|
22
|
-
name: spec.name,
|
|
23
|
-
...(spec.description ? { description: spec.description } : {}),
|
|
24
|
-
cases: spec.cases.map((testCase) => ({
|
|
25
|
-
id: testCase.id,
|
|
26
|
-
question: testCase.question,
|
|
27
|
-
...(testCase.file ? { file: testCase.file } : {}),
|
|
28
|
-
...(testCase.answer ? { answer: testCase.answer } : {}),
|
|
29
|
-
...(testCase.strictness ? { strictness: testCase.strictness } : {}),
|
|
30
|
-
...(testCase.expect ? { expect: testCase.expect } : {}),
|
|
31
|
-
})),
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export function listTestSpecs(sourcePath, type) {
|
|
35
|
-
const dirPath = testSpecTypePath(sourcePath, type);
|
|
36
|
-
if (!existsSync(dirPath))
|
|
37
|
-
return [];
|
|
38
|
-
return readdirSync(dirPath)
|
|
39
|
-
.map((entry) => join(dirPath, entry))
|
|
40
|
-
.filter((filePath) => TEST_SPEC_EXTENSIONS.has(extname(filePath).toLowerCase()))
|
|
41
|
-
.map((filePath) => readTestSpecFile(filePath))
|
|
42
|
-
.filter((value) => value !== null)
|
|
43
|
-
.sort((left, right) => left.name.localeCompare(right.name) || left.id.localeCompare(right.id));
|
|
44
|
-
}
|
|
45
|
-
export function loadTestSpec(sourcePath, type, id) {
|
|
46
|
-
const normalizedId = normalizeTestId(id);
|
|
47
|
-
const filePath = join(testSpecTypePath(sourcePath, type), `${normalizedId}.json`);
|
|
48
|
-
if (!existsSync(filePath))
|
|
49
|
-
return null;
|
|
50
|
-
return readTestSpecFile(filePath);
|
|
51
|
-
}
|
|
52
|
-
export function loadTestSpecFromFile(filePath) {
|
|
53
|
-
return readTestSpecFile(filePath);
|
|
54
|
-
}
|
|
55
|
-
export function writeTestSpec(sourcePath, spec) {
|
|
56
|
-
const id = normalizeTestId(spec.id ?? spec.name);
|
|
57
|
-
assertTestId(id);
|
|
58
|
-
const dirPath = testSpecTypePath(sourcePath, spec.type);
|
|
59
|
-
mkdirSync(dirPath, { recursive: true });
|
|
60
|
-
const existingPath = join(dirPath, `${id}.json`);
|
|
61
|
-
if (existsSync(existingPath)) {
|
|
62
|
-
throw new Error(`Test spec already exists: ${existingPath}`);
|
|
63
|
-
}
|
|
64
|
-
const filePath = testSpecFilePath(sourcePath, spec.type, id);
|
|
65
|
-
assertWritableTestSpecPath(filePath);
|
|
66
|
-
const normalizedSpec = {
|
|
67
|
-
type: spec.type,
|
|
68
|
-
name: spec.name.trim(),
|
|
69
|
-
...(spec.description && spec.description.trim().length > 0
|
|
70
|
-
? { description: spec.description.trim() }
|
|
71
|
-
: {}),
|
|
72
|
-
cases: spec.cases.map((testCase) => ({
|
|
73
|
-
id: normalizeTestId(testCase.id),
|
|
74
|
-
question: testCase.question.trim(),
|
|
75
|
-
...(testCase.file && testCase.file.trim().length > 0
|
|
76
|
-
? { file: testCase.file.trim() }
|
|
77
|
-
: {}),
|
|
78
|
-
...(testCase.answer && testCase.answer.trim().length > 0
|
|
79
|
-
? { answer: testCase.answer.trim() }
|
|
80
|
-
: {}),
|
|
81
|
-
...(testCase.strictness && testCase.strictness.trim().length > 0
|
|
82
|
-
? { strictness: testCase.strictness.trim() }
|
|
83
|
-
: {}),
|
|
84
|
-
...(testCase.expect
|
|
85
|
-
? {
|
|
86
|
-
expect: {
|
|
87
|
-
...(testCase.expect.must_include && testCase.expect.must_include.length > 0
|
|
88
|
-
? { must_include: testCase.expect.must_include.map((value) => value.trim()).filter(Boolean) }
|
|
89
|
-
: {}),
|
|
90
|
-
...(testCase.expect.must_include_one_of && testCase.expect.must_include_one_of.length > 0
|
|
91
|
-
? {
|
|
92
|
-
must_include_one_of: testCase.expect.must_include_one_of
|
|
93
|
-
.map((group) => group.map((value) => value.trim()).filter(Boolean))
|
|
94
|
-
.filter((group) => group.length > 0),
|
|
95
|
-
}
|
|
96
|
-
: {}),
|
|
97
|
-
...(testCase.expect.must_not_include && testCase.expect.must_not_include.length > 0
|
|
98
|
-
? { must_not_include: testCase.expect.must_not_include.map((value) => value.trim()).filter(Boolean) }
|
|
99
|
-
: {}),
|
|
100
|
-
...(typeof testCase.expect.min_words === "number"
|
|
101
|
-
? { min_words: testCase.expect.min_words }
|
|
102
|
-
: {}),
|
|
103
|
-
...(typeof testCase.expect.max_words === "number"
|
|
104
|
-
? { max_words: testCase.expect.max_words }
|
|
105
|
-
: {}),
|
|
106
|
-
},
|
|
107
|
-
}
|
|
108
|
-
: {}),
|
|
109
|
-
})),
|
|
110
|
-
};
|
|
111
|
-
const parsed = TestSpecSchema.parse(normalizedSpec);
|
|
112
|
-
writeFileSync(filePath, `${JSON.stringify(serializeTestSpec(parsed), null, 2)}\n`);
|
|
113
|
-
return filePath;
|
|
114
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { TestTargetCandidate } from "./verify-types.js";
|
|
2
|
-
export declare function listVerifiableContextTestTargets(sourcePath: string): TestTargetCandidate[];
|
|
3
|
-
export declare function createVerifiableContextTestTarget(verifiableContextPath: string, verifiableContextName: string, buildPlanId?: string): TestTargetCandidate;
|
|
4
|
-
export declare function createSourceFilesTestTarget(sourcePath: string): TestTargetCandidate;
|
|
5
|
-
export declare function listTestTargets(sourcePath: string): TestTargetCandidate[];
|