@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,49 +0,0 @@
|
|
|
1
|
-
import { listVerifiableContextsForSourceFolder, } from "./interf-detect.js";
|
|
2
|
-
import { createVerifiableContext, ensureVerifiableContextScaffold, } from "./interf-scaffold.js";
|
|
3
|
-
import { listSourcePreparationConfigs, loadVerifiableContextPreparationConfig, loadSourceFolderConfig, resolveSourcePreparationPath, sourcePreparationConfigFromInterfConfig, syncVerifiableContextInterfConfigFromSourcePreparationConfig, } from "./source-config.js";
|
|
4
|
-
import { DEFAULT_BUILD_PLAN_ID, buildPlanIdForSourcePreparationConfig, } from "../build-plans/build-plan-resolution.js";
|
|
5
|
-
export function listSavedPreparationEntries(prepDataDir) {
|
|
6
|
-
const builtEntries = new Map();
|
|
7
|
-
for (const builtContext of listVerifiableContextsForSourceFolder(prepDataDir)) {
|
|
8
|
-
const preparationConfig = loadVerifiableContextPreparationConfig(builtContext.path)
|
|
9
|
-
?? sourcePreparationConfigFromInterfConfig(builtContext.config);
|
|
10
|
-
builtEntries.set(builtContext.config.name, {
|
|
11
|
-
config: preparationConfig,
|
|
12
|
-
path: builtContext.path,
|
|
13
|
-
localDraft: builtContext.config.build_plan_origin?.local_draft === true,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
const entries = new Map();
|
|
17
|
-
for (const config of listSourcePreparationConfigs(loadSourceFolderConfig(prepDataDir))) {
|
|
18
|
-
const built = builtEntries.get(config.name);
|
|
19
|
-
entries.set(config.name, {
|
|
20
|
-
config,
|
|
21
|
-
path: built?.path ?? null,
|
|
22
|
-
localDraft: built?.localDraft ?? false,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return Array.from(entries.values()).sort((left, right) => left.config.name.localeCompare(right.config.name));
|
|
26
|
-
}
|
|
27
|
-
export function findBuiltVerifiableContextPath(prepDataDir, preparationName) {
|
|
28
|
-
return listSavedPreparationEntries(prepDataDir).find((entry) => entry.config.name === preparationName)?.path ?? null;
|
|
29
|
-
}
|
|
30
|
-
export function findSavedPreparationConfig(prepDataDir, preparationName) {
|
|
31
|
-
return listSavedPreparationEntries(prepDataDir).find((entry) => entry.config.name === preparationName)?.config ?? null;
|
|
32
|
-
}
|
|
33
|
-
export function createVerifiableContextFromConfig(prepDataDir, preparationConfig) {
|
|
34
|
-
const buildPlanId = buildPlanIdForSourcePreparationConfig(preparationConfig) ?? DEFAULT_BUILD_PLAN_ID;
|
|
35
|
-
const sourceFolderPath = resolveSourcePreparationPath(prepDataDir, preparationConfig);
|
|
36
|
-
const verifiableContextPath = createVerifiableContext(preparationConfig.name, prepDataDir, buildPlanId, preparationConfig.about, sourceFolderPath);
|
|
37
|
-
syncVerifiableContextInterfConfigFromSourcePreparationConfig(verifiableContextPath, preparationConfig);
|
|
38
|
-
return verifiableContextPath;
|
|
39
|
-
}
|
|
40
|
-
export function ensureVerifiableContextFromConfig(prepDataDir, preparationConfig) {
|
|
41
|
-
const buildPlanId = buildPlanIdForSourcePreparationConfig(preparationConfig) ?? DEFAULT_BUILD_PLAN_ID;
|
|
42
|
-
const existingPath = findBuiltVerifiableContextPath(prepDataDir, preparationConfig.name);
|
|
43
|
-
if (existingPath) {
|
|
44
|
-
ensureVerifiableContextScaffold(prepDataDir, preparationConfig.name, buildPlanId);
|
|
45
|
-
syncVerifiableContextInterfConfigFromSourcePreparationConfig(existingPath, preparationConfig);
|
|
46
|
-
return existingPath;
|
|
47
|
-
}
|
|
48
|
-
return createVerifiableContextFromConfig(prepDataDir, preparationConfig);
|
|
49
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type InterfConfig, type SourceFolderBinding, type SourceReadinessCheck, type SourcePreparationConfig, type SourceFolderConfig } from "./lib/schema.js";
|
|
2
|
-
import type { TestSpec, TestTargetType } from "../engine/verify/lib/schema.js";
|
|
3
|
-
export declare const SOURCE_FOLDER_CONFIG_FILE = "interf.json";
|
|
4
|
-
export declare const SOURCE_FOLDER_CONFIG_PATH = "interf.json";
|
|
5
|
-
export interface LoadedSourceTestSpec extends TestSpec {
|
|
6
|
-
id: string;
|
|
7
|
-
filePath: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function sourceFolderConfigPath(prepDataDir: string): string;
|
|
10
|
-
export declare function resolveSourceFolderConfigPath(prepDataDir: string): string;
|
|
11
|
-
export declare function fingerprintReadinessChecks(checks: SourceReadinessCheck[]): string;
|
|
12
|
-
export declare function loadSourceFolderConfig(prepDataDir: string): SourceFolderConfig | null;
|
|
13
|
-
export interface WritableSourceProjectConfig {
|
|
14
|
-
source_folder?: SourceFolderBinding;
|
|
15
|
-
preparations?: SourcePreparationConfig[];
|
|
16
|
-
}
|
|
17
|
-
export { DEFAULT_BUILD_PLAN_ID, buildPlanIdForSourcePreparationConfig } from "../build-plans/build-plan-resolution.js";
|
|
18
|
-
export declare function listSourcePreparationConfigs(config: SourceFolderConfig | null): SourcePreparationConfig[];
|
|
19
|
-
export declare function resolvePreparationBuildMaxAttempts(preparationConfig: Pick<SourcePreparationConfig, "max_attempts">, override?: number | null): number | null;
|
|
20
|
-
export declare function resolvePreparationBuildMaxLoops(preparationConfig: Pick<SourcePreparationConfig, "max_loops">, override?: number | null): number | null;
|
|
21
|
-
export declare function getDefaultSourcePreparationConfig(config: SourceFolderConfig | null): SourcePreparationConfig | null;
|
|
22
|
-
export declare function findSourcePreparationConfig(config: SourceFolderConfig | null, preparationName: string): SourcePreparationConfig | null;
|
|
23
|
-
export declare function configuredSourceFolderPath(config: SourceFolderConfig | WritableSourceProjectConfig | null | undefined): string | null;
|
|
24
|
-
export declare function resolveConfiguredSourceFolderPath(prepDataDir: string, config?: SourceFolderConfig | WritableSourceProjectConfig | null | undefined): string | null;
|
|
25
|
-
export declare function saveSourceFolderConfig(prepDataDir: string, config: WritableSourceProjectConfig): void;
|
|
26
|
-
export declare function appendSourcePreparationChecks(prepDataDir: string, preparationName: string, checks: SourceReadinessCheck[]): void;
|
|
27
|
-
export declare function upsertSourcePreparationConfig(prepDataDir: string, preparationConfig: SourcePreparationConfig, options?: {
|
|
28
|
-
matchName?: string;
|
|
29
|
-
}): void;
|
|
30
|
-
export declare function removeSourcePreparationConfig(prepDataDir: string, preparationName: string): boolean;
|
|
31
|
-
export declare function buildMaxAttempts(maxAttempts: number | null | undefined): number | undefined;
|
|
32
|
-
export declare function buildMaxLoops(maxLoops: number | null | undefined): number | undefined;
|
|
33
|
-
export declare function sourcePreparationConfigFromInterfConfig(config: InterfConfig, preparationPath?: string): SourcePreparationConfig;
|
|
34
|
-
export declare function loadVerifiableContextPreparationConfig(verifiableContextPath: string): SourcePreparationConfig | null;
|
|
35
|
-
export declare function saveVerifiableContextInterfConfig(verifiableContextPath: string, config: InterfConfig): InterfConfig;
|
|
36
|
-
export declare function syncVerifiableContextInterfConfigFromSourcePreparationConfig(verifiableContextPath: string, preparationConfig: SourcePreparationConfig): InterfConfig;
|
|
37
|
-
export declare function buildTestSpecFromSourceFolderConfig(options: {
|
|
38
|
-
prepDataDir: string;
|
|
39
|
-
targetName?: string | null;
|
|
40
|
-
targetType?: TestTargetType;
|
|
41
|
-
}): LoadedSourceTestSpec | null;
|
|
42
|
-
export declare function buildTestSpecFromPreparationConfig(options: {
|
|
43
|
-
verifiableContextPath: string;
|
|
44
|
-
targetType?: TestTargetType;
|
|
45
|
-
}): LoadedSourceTestSpec | null;
|
|
46
|
-
export declare function resolveSourcePreparationPath(prepDataDir: string, preparationConfig: Pick<SourcePreparationConfig, "path">): string;
|
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
4
|
-
import { refreshVerifiableContextBootstrapGuidance } from "../engine/agents/lib/verifiable-context-bootstrap.js";
|
|
5
|
-
import { readInterfConfig, } from "./interf.js";
|
|
6
|
-
import { seedVerifiableContextBuildPlanPackage } from "../build-plans/package/interf-build-plan-package.js";
|
|
7
|
-
import { readJsonFileWithSchema } from "../contracts/utils/parse.js";
|
|
8
|
-
import { getBuildPlan } from "../build-plans/package/build-plan-definitions.js";
|
|
9
|
-
import { DEFAULT_BUILD_PLAN_ID, buildPlanIdForSourcePreparationConfig, } from "../build-plans/build-plan-resolution.js";
|
|
10
|
-
import { SourceFolderConfigSchema, } from "./lib/schema.js";
|
|
11
|
-
import { slugify } from "../contracts/utils/naming.js";
|
|
12
|
-
import { assertPathWithinRoot, isPathWithinRoot } from "../contracts/utils/path-guards.js";
|
|
13
|
-
import { defaultControlPathForVerifiableContext, resolveSourceControlPathForVerifiableContext, verifiableContextInterfConfigPath, verifiableContextInterfRoot, } from "../engine/build/verifiable-context-paths.js";
|
|
14
|
-
import { asPreparationDataDir, preparationConfigPath, PREPARATION_CONFIG_FILENAME, } from "../contracts/lib/preparation-paths.js";
|
|
15
|
-
export const SOURCE_FOLDER_CONFIG_FILE = PREPARATION_CONFIG_FILENAME;
|
|
16
|
-
export const SOURCE_FOLDER_CONFIG_PATH = SOURCE_FOLDER_CONFIG_FILE;
|
|
17
|
-
export function sourceFolderConfigPath(prepDataDir) {
|
|
18
|
-
return preparationConfigPath(asPreparationDataDir(prepDataDir));
|
|
19
|
-
}
|
|
20
|
-
export function resolveSourceFolderConfigPath(prepDataDir) {
|
|
21
|
-
return sourceFolderConfigPath(prepDataDir);
|
|
22
|
-
}
|
|
23
|
-
function readSourceFolderConfigFile(filePath) {
|
|
24
|
-
return readJsonFileWithSchema(filePath, "Interf project config", SourceFolderConfigSchema);
|
|
25
|
-
}
|
|
26
|
-
function normalizeReadinessChecks(cases) {
|
|
27
|
-
const seen = new Set();
|
|
28
|
-
return cases.map((caseSpec, index) => {
|
|
29
|
-
const baseId = slugify(caseSpec.id ?? caseSpec.question) || `check-${index + 1}`;
|
|
30
|
-
let id = baseId;
|
|
31
|
-
let suffix = 2;
|
|
32
|
-
while (seen.has(id)) {
|
|
33
|
-
id = `${baseId}-${suffix}`;
|
|
34
|
-
suffix += 1;
|
|
35
|
-
}
|
|
36
|
-
seen.add(id);
|
|
37
|
-
return {
|
|
38
|
-
id,
|
|
39
|
-
question: caseSpec.question.trim(),
|
|
40
|
-
...(caseSpec.answer ? { answer: caseSpec.answer.trim() } : {}),
|
|
41
|
-
...(caseSpec.strictness ? { strictness: caseSpec.strictness.trim() } : {}),
|
|
42
|
-
...(caseSpec.expect ? { expect: caseSpec.expect } : {}),
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
export function fingerprintReadinessChecks(checks) {
|
|
47
|
-
const normalized = checks.map((check) => ({
|
|
48
|
-
question: check.question.trim(),
|
|
49
|
-
...(check.answer ? { answer: check.answer.trim() } : {}),
|
|
50
|
-
...(check.strictness ? { strictness: check.strictness.trim() } : {}),
|
|
51
|
-
...(check.expect ? { expect: check.expect } : {}),
|
|
52
|
-
}));
|
|
53
|
-
return createHash("sha256")
|
|
54
|
-
.update(JSON.stringify(normalized))
|
|
55
|
-
.digest("hex")
|
|
56
|
-
.slice(0, 16);
|
|
57
|
-
}
|
|
58
|
-
export function loadSourceFolderConfig(prepDataDir) {
|
|
59
|
-
const filePath = resolveSourceFolderConfigPath(prepDataDir);
|
|
60
|
-
if (!existsSync(filePath))
|
|
61
|
-
return null;
|
|
62
|
-
return readSourceFolderConfigFile(filePath);
|
|
63
|
-
}
|
|
64
|
-
export { DEFAULT_BUILD_PLAN_ID, buildPlanIdForSourcePreparationConfig } from "../build-plans/build-plan-resolution.js";
|
|
65
|
-
function normalizeSourcePreparationConfig(preparationConfig) {
|
|
66
|
-
const buildPlan = buildPlanIdForSourcePreparationConfig(preparationConfig);
|
|
67
|
-
return {
|
|
68
|
-
...preparationConfig,
|
|
69
|
-
...(buildPlan ? { build_plan: buildPlan } : {}),
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
export function listSourcePreparationConfigs(config) {
|
|
73
|
-
return (config?.preparations ?? []).map((preparation) => normalizeSourcePreparationConfig(preparation));
|
|
74
|
-
}
|
|
75
|
-
export function resolvePreparationBuildMaxAttempts(preparationConfig, override = null) {
|
|
76
|
-
const configured = override ?? preparationConfig.max_attempts ?? null;
|
|
77
|
-
if (configured == null)
|
|
78
|
-
return null;
|
|
79
|
-
const normalized = Math.trunc(configured);
|
|
80
|
-
if (!Number.isFinite(normalized) || normalized < 1)
|
|
81
|
-
return 1;
|
|
82
|
-
return Math.min(5, normalized);
|
|
83
|
-
}
|
|
84
|
-
export function resolvePreparationBuildMaxLoops(preparationConfig, override = null) {
|
|
85
|
-
const configured = override ?? preparationConfig.max_loops ?? null;
|
|
86
|
-
if (configured == null)
|
|
87
|
-
return null;
|
|
88
|
-
const normalized = Math.trunc(configured);
|
|
89
|
-
if (!Number.isFinite(normalized) || normalized < 1)
|
|
90
|
-
return 1;
|
|
91
|
-
return Math.min(3, normalized);
|
|
92
|
-
}
|
|
93
|
-
export function getDefaultSourcePreparationConfig(config) {
|
|
94
|
-
const preparations = listSourcePreparationConfigs(config);
|
|
95
|
-
return preparations[0] ?? null;
|
|
96
|
-
}
|
|
97
|
-
export function findSourcePreparationConfig(config, preparationName) {
|
|
98
|
-
return listSourcePreparationConfigs(config).find((preparation) => preparation.name === preparationName) ?? null;
|
|
99
|
-
}
|
|
100
|
-
export function configuredSourceFolderPath(config) {
|
|
101
|
-
return config?.source_folder?.path ?? null;
|
|
102
|
-
}
|
|
103
|
-
export function resolveConfiguredSourceFolderPath(prepDataDir, config = loadSourceFolderConfig(prepDataDir)) {
|
|
104
|
-
const configuredPath = configuredSourceFolderPath(config);
|
|
105
|
-
return configuredPath ? resolve(prepDataDir, configuredPath) : null;
|
|
106
|
-
}
|
|
107
|
-
function toWritableSourceProjectConfig(config) {
|
|
108
|
-
const preparations = config?.preparations ?? [];
|
|
109
|
-
const sourceFolder = config?.source_folder;
|
|
110
|
-
if (preparations.length > 0) {
|
|
111
|
-
return {
|
|
112
|
-
...(sourceFolder ? { source_folder: sourceFolder } : {}),
|
|
113
|
-
preparations: preparations.map((preparation) => toWritableSourcePreparationConfig(preparation)),
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
return {
|
|
117
|
-
...(sourceFolder ? { source_folder: sourceFolder } : {}),
|
|
118
|
-
preparations: [],
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
function toWritableSourcePreparationConfig(preparation) {
|
|
122
|
-
const buildPlan = buildPlanIdForSourcePreparationConfig(preparation);
|
|
123
|
-
return {
|
|
124
|
-
name: preparation.name,
|
|
125
|
-
path: preparation.path,
|
|
126
|
-
...(preparation.about ? { about: preparation.about } : {}),
|
|
127
|
-
...(buildPlan ? { build_plan: buildPlan } : {}),
|
|
128
|
-
...(typeof preparation.max_attempts === "number" ? { max_attempts: preparation.max_attempts } : {}),
|
|
129
|
-
...(typeof preparation.max_loops === "number" ? { max_loops: preparation.max_loops } : {}),
|
|
130
|
-
checks: preparation.checks,
|
|
131
|
-
...(preparation.requested_artifacts?.length
|
|
132
|
-
? { requested_artifacts: preparation.requested_artifacts }
|
|
133
|
-
: {}),
|
|
134
|
-
...(preparation.source_profile ? { source_profile: preparation.source_profile } : {}),
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
export function saveSourceFolderConfig(prepDataDir, config) {
|
|
138
|
-
const existing = loadSourceFolderConfig(prepDataDir);
|
|
139
|
-
const mergedConfig = {
|
|
140
|
-
...(existing?.source_folder && !config.source_folder ? { source_folder: existing.source_folder } : {}),
|
|
141
|
-
...config,
|
|
142
|
-
};
|
|
143
|
-
mkdirSync(prepDataDir, { recursive: true });
|
|
144
|
-
writeFileSync(sourceFolderConfigPath(prepDataDir), JSON.stringify(toWritableSourceProjectConfig(mergedConfig), null, 2) + "\n");
|
|
145
|
-
}
|
|
146
|
-
export function appendSourcePreparationChecks(prepDataDir, preparationName, checks) {
|
|
147
|
-
const existing = loadSourceFolderConfig(prepDataDir);
|
|
148
|
-
const currentPreparation = findSourcePreparationConfig(existing, preparationName);
|
|
149
|
-
const otherPreparations = listSourcePreparationConfigs(existing).filter((preparation) => preparation.name !== preparationName);
|
|
150
|
-
const currentChecks = currentPreparation?.checks ?? [];
|
|
151
|
-
const nextPreparation = {
|
|
152
|
-
...toWritableSourcePreparationConfig(currentPreparation ?? {
|
|
153
|
-
name: preparationName,
|
|
154
|
-
path: `./${preparationName}`,
|
|
155
|
-
checks: [],
|
|
156
|
-
}),
|
|
157
|
-
checks: [...currentChecks, ...checks],
|
|
158
|
-
};
|
|
159
|
-
saveSourceFolderConfig(prepDataDir, {
|
|
160
|
-
preparations: [
|
|
161
|
-
nextPreparation,
|
|
162
|
-
...otherPreparations,
|
|
163
|
-
],
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
export function upsertSourcePreparationConfig(prepDataDir, preparationConfig, options = {}) {
|
|
167
|
-
const existing = loadSourceFolderConfig(prepDataDir);
|
|
168
|
-
const preparations = listSourcePreparationConfigs(existing);
|
|
169
|
-
const candidateNames = Array.from(new Set([preparationConfig.name, options.matchName].filter((value) => Boolean(value))));
|
|
170
|
-
const existingIndex = preparations.findIndex((entry) => candidateNames.includes(entry.name));
|
|
171
|
-
if (existingIndex >= 0) {
|
|
172
|
-
preparations[existingIndex] = normalizeSourcePreparationConfig(preparationConfig);
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
preparations.push(normalizeSourcePreparationConfig(preparationConfig));
|
|
176
|
-
}
|
|
177
|
-
saveSourceFolderConfig(prepDataDir, {
|
|
178
|
-
preparations,
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
export function removeSourcePreparationConfig(prepDataDir, preparationName) {
|
|
182
|
-
const existing = loadSourceFolderConfig(prepDataDir);
|
|
183
|
-
const preparations = listSourcePreparationConfigs(existing);
|
|
184
|
-
const nextPreparations = preparations.filter((entry) => entry.name !== preparationName);
|
|
185
|
-
if (nextPreparations.length === preparations.length)
|
|
186
|
-
return false;
|
|
187
|
-
saveSourceFolderConfig(prepDataDir, {
|
|
188
|
-
preparations: nextPreparations,
|
|
189
|
-
});
|
|
190
|
-
return true;
|
|
191
|
-
}
|
|
192
|
-
export function buildMaxAttempts(maxAttempts) {
|
|
193
|
-
if (maxAttempts == null)
|
|
194
|
-
return undefined;
|
|
195
|
-
return resolvePreparationBuildMaxAttempts({ max_attempts: maxAttempts }, null) ?? 1;
|
|
196
|
-
}
|
|
197
|
-
export function buildMaxLoops(maxLoops) {
|
|
198
|
-
if (maxLoops == null)
|
|
199
|
-
return undefined;
|
|
200
|
-
return resolvePreparationBuildMaxLoops({ max_loops: maxLoops }, null) ?? 1;
|
|
201
|
-
}
|
|
202
|
-
export function sourcePreparationConfigFromInterfConfig(config, preparationPath = `./${config.name}`) {
|
|
203
|
-
return {
|
|
204
|
-
name: config.name,
|
|
205
|
-
path: preparationPath,
|
|
206
|
-
...(config.about ? { about: config.about } : {}),
|
|
207
|
-
build_plan: config.build_plan,
|
|
208
|
-
...(typeof config.max_attempts === "number"
|
|
209
|
-
? { max_attempts: config.max_attempts }
|
|
210
|
-
: {}),
|
|
211
|
-
...(typeof config.max_loops === "number"
|
|
212
|
-
? { max_loops: config.max_loops }
|
|
213
|
-
: {}),
|
|
214
|
-
checks: config.checks ?? [],
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
export function loadVerifiableContextPreparationConfig(verifiableContextPath) {
|
|
218
|
-
const config = readInterfConfig(verifiableContextPath);
|
|
219
|
-
if (!config)
|
|
220
|
-
return null;
|
|
221
|
-
const prepDataDir = resolveSourceControlPathForVerifiableContext(verifiableContextPath);
|
|
222
|
-
const configuredPreparations = listSourcePreparationConfigs(loadSourceFolderConfig(prepDataDir));
|
|
223
|
-
const defaultPreparationPath = configuredPreparations.length === 1
|
|
224
|
-
? configuredPreparations[0].path
|
|
225
|
-
: `./${config.name}`;
|
|
226
|
-
const sourceBinding = typeof config.source?.preparation_path === "string" && config.source.preparation_path.length > 0
|
|
227
|
-
? config.source.preparation_path
|
|
228
|
-
: null;
|
|
229
|
-
const preparationPath = sourceBinding
|
|
230
|
-
? (() => {
|
|
231
|
-
const sourceAbsolutePath = resolve(verifiableContextPath, sourceBinding);
|
|
232
|
-
if (!isPathWithinRoot(prepDataDir, sourceAbsolutePath)) {
|
|
233
|
-
return sourceAbsolutePath;
|
|
234
|
-
}
|
|
235
|
-
return relative(prepDataDir, sourceAbsolutePath).split(sep).join("/") || defaultPreparationPath;
|
|
236
|
-
})()
|
|
237
|
-
: defaultPreparationPath;
|
|
238
|
-
return sourcePreparationConfigFromInterfConfig(config, preparationPath);
|
|
239
|
-
}
|
|
240
|
-
export function saveVerifiableContextInterfConfig(verifiableContextPath, config) {
|
|
241
|
-
mkdirSync(verifiableContextInterfRoot(verifiableContextPath), { recursive: true });
|
|
242
|
-
writeFileSync(verifiableContextInterfConfigPath(verifiableContextPath), JSON.stringify(config, null, 2) + "\n");
|
|
243
|
-
return config;
|
|
244
|
-
}
|
|
245
|
-
export function syncVerifiableContextInterfConfigFromSourcePreparationConfig(verifiableContextPath, preparationConfig) {
|
|
246
|
-
const current = readInterfConfig(verifiableContextPath);
|
|
247
|
-
const prepDataDir = resolveSourceControlPathForVerifiableContext(verifiableContextPath);
|
|
248
|
-
const preparationAbsolutePath = resolveConfiguredSourceFolderPath(prepDataDir) ??
|
|
249
|
-
resolveSourcePreparationPath(prepDataDir, preparationConfig);
|
|
250
|
-
const preparationRelativePath = relative(verifiableContextPath, preparationAbsolutePath).split(sep).join("/") || ".";
|
|
251
|
-
const buildPlanId = buildPlanIdForSourcePreparationConfig(preparationConfig)
|
|
252
|
-
?? buildPlanIdForSourcePreparationConfig(current)
|
|
253
|
-
?? DEFAULT_BUILD_PLAN_ID;
|
|
254
|
-
const buildPlanChanged = current?.build_plan !== undefined && current.build_plan !== buildPlanId;
|
|
255
|
-
const buildPlanOrigin = buildPlanChanged || !current?.build_plan_origin
|
|
256
|
-
? {
|
|
257
|
-
selected: buildPlanId,
|
|
258
|
-
local_draft: false,
|
|
259
|
-
}
|
|
260
|
-
: current.build_plan_origin;
|
|
261
|
-
const { type: _ignoredType, name: _ignoredName, about: _ignoredAbout, build_plan: _ignoredBuildPlan, max_attempts: _ignoredMaxAttempts, max_loops: _ignoredMaxLoops, checks: _ignoredChecks, build_plan_origin: _ignoredBuildPlanOrigin, source: _ignoredSource, ...passthrough } = current ?? {};
|
|
262
|
-
const nextConfig = {
|
|
263
|
-
...passthrough,
|
|
264
|
-
...(!current ? {
|
|
265
|
-
type: "verifiable-context",
|
|
266
|
-
source: {
|
|
267
|
-
path: preparationRelativePath,
|
|
268
|
-
},
|
|
269
|
-
} : {}),
|
|
270
|
-
type: "verifiable-context",
|
|
271
|
-
name: preparationConfig.name,
|
|
272
|
-
...(preparationConfig.about ? { about: preparationConfig.about } : {}),
|
|
273
|
-
build_plan: buildPlanId,
|
|
274
|
-
...(typeof preparationConfig.max_attempts === "number"
|
|
275
|
-
? { max_attempts: preparationConfig.max_attempts }
|
|
276
|
-
: {}),
|
|
277
|
-
...(typeof preparationConfig.max_loops === "number"
|
|
278
|
-
? { max_loops: preparationConfig.max_loops }
|
|
279
|
-
: {}),
|
|
280
|
-
checks: preparationConfig.checks,
|
|
281
|
-
build_plan_origin: buildPlanOrigin,
|
|
282
|
-
source: {
|
|
283
|
-
path: preparationRelativePath,
|
|
284
|
-
control_path: defaultControlPathForVerifiableContext(verifiableContextPath),
|
|
285
|
-
preparation_path: preparationRelativePath,
|
|
286
|
-
},
|
|
287
|
-
};
|
|
288
|
-
const saved = saveVerifiableContextInterfConfig(verifiableContextPath, nextConfig);
|
|
289
|
-
if (buildPlanChanged) {
|
|
290
|
-
const selectedBuildPlan = getBuildPlan(buildPlanId, { prepDataDir });
|
|
291
|
-
seedVerifiableContextBuildPlanPackage({
|
|
292
|
-
verifiableContextPath,
|
|
293
|
-
prepDataDir,
|
|
294
|
-
buildPlanId: selectedBuildPlan.id,
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
refreshVerifiableContextBootstrapGuidance(verifiableContextPath);
|
|
298
|
-
return saved;
|
|
299
|
-
}
|
|
300
|
-
function buildLoadedTestSpec(options) {
|
|
301
|
-
if (options.checks.length === 0)
|
|
302
|
-
return null;
|
|
303
|
-
const testId = options.id ?? slugify(options.name);
|
|
304
|
-
return {
|
|
305
|
-
id: options.targetType === "source-files" ? `${testId}-source-files` : `${testId}-verifiable-context`,
|
|
306
|
-
filePath: options.filePath,
|
|
307
|
-
type: options.targetType,
|
|
308
|
-
name: options.name,
|
|
309
|
-
description: options.about ?? options.defaultDescription,
|
|
310
|
-
cases: normalizeReadinessChecks(options.checks),
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
export function buildTestSpecFromSourceFolderConfig(options) {
|
|
314
|
-
const { prepDataDir, targetName, targetType = "verifiable-context" } = options;
|
|
315
|
-
const config = loadSourceFolderConfig(prepDataDir);
|
|
316
|
-
if (!config)
|
|
317
|
-
return null;
|
|
318
|
-
const preparations = listSourcePreparationConfigs(config);
|
|
319
|
-
if (preparations.length === 0)
|
|
320
|
-
return null;
|
|
321
|
-
const match = targetName
|
|
322
|
-
? preparations.find((entry) => entry.name === targetName)
|
|
323
|
-
: preparations.length === 1
|
|
324
|
-
? preparations[0]
|
|
325
|
-
: getDefaultSourcePreparationConfig(config);
|
|
326
|
-
if (!match)
|
|
327
|
-
return null;
|
|
328
|
-
const configPath = resolveSourceFolderConfigPath(prepDataDir);
|
|
329
|
-
return buildLoadedTestSpec({
|
|
330
|
-
id: match.id,
|
|
331
|
-
name: match.name,
|
|
332
|
-
about: match.about,
|
|
333
|
-
checks: match.checks,
|
|
334
|
-
targetType,
|
|
335
|
-
filePath: targetType === "source-files"
|
|
336
|
-
? `${configPath}#preparations/${match.name}:source-files`
|
|
337
|
-
: `${configPath}#preparations/${match.name}:verifiable-context`,
|
|
338
|
-
defaultDescription: `Derived from saved Preparation checks in ${SOURCE_FOLDER_CONFIG_PATH}`,
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
export function buildTestSpecFromPreparationConfig(options) {
|
|
342
|
-
const { verifiableContextPath, targetType = "verifiable-context" } = options;
|
|
343
|
-
const config = readInterfConfig(verifiableContextPath);
|
|
344
|
-
const configPath = verifiableContextInterfConfigPath(verifiableContextPath);
|
|
345
|
-
if (!config)
|
|
346
|
-
return null;
|
|
347
|
-
return buildLoadedTestSpec({
|
|
348
|
-
name: config.name,
|
|
349
|
-
about: config.about,
|
|
350
|
-
checks: config.checks ?? [],
|
|
351
|
-
targetType,
|
|
352
|
-
filePath: targetType === "source-files"
|
|
353
|
-
? `${configPath}#checks:source-files`
|
|
354
|
-
: `${configPath}#checks:verifiable-context`,
|
|
355
|
-
defaultDescription: "Derived from checks in the verifiable-context config.",
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* System path prefixes the runtime must never operate on, even when an
|
|
360
|
-
* absolute `preparation.path` was authored by hand. The schema-level
|
|
361
|
-
* refinement in `SourcePreparationConfigSchema` is the primary line of
|
|
362
|
-
* defense; this is the in-process backstop for callers that hand-craft a
|
|
363
|
-
* SourcePreparationConfig at runtime (e.g. Build Plan authoring helpers that
|
|
364
|
-
* construct a config from an InterfConfig).
|
|
365
|
-
*/
|
|
366
|
-
const FORBIDDEN_PREPARATION_PATH_PREFIXES = [
|
|
367
|
-
"/etc",
|
|
368
|
-
"/sys",
|
|
369
|
-
"/proc",
|
|
370
|
-
"/dev",
|
|
371
|
-
"/var/run",
|
|
372
|
-
"/var/lib",
|
|
373
|
-
"/usr",
|
|
374
|
-
"/bin",
|
|
375
|
-
"/sbin",
|
|
376
|
-
"/boot",
|
|
377
|
-
];
|
|
378
|
-
function rejectForbiddenPreparationPath(absolutePath) {
|
|
379
|
-
for (const prefix of FORBIDDEN_PREPARATION_PATH_PREFIXES) {
|
|
380
|
-
if (absolutePath === prefix || absolutePath.startsWith(`${prefix}/`)) {
|
|
381
|
-
throw new Error(`Preparation path may not target system directory ${prefix}: ${absolutePath}`);
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
export function resolveSourcePreparationPath(prepDataDir, preparationConfig) {
|
|
386
|
-
const configuredPath = preparationConfig.path.trim();
|
|
387
|
-
const resolvedPath = resolve(prepDataDir, configuredPath);
|
|
388
|
-
if (isAbsolute(configuredPath)) {
|
|
389
|
-
rejectForbiddenPreparationPath(resolvedPath);
|
|
390
|
-
return resolvedPath;
|
|
391
|
-
}
|
|
392
|
-
rejectForbiddenPreparationPath(resolvedPath);
|
|
393
|
-
return assertPathWithinRoot(prepDataDir, resolvedPath, "Source folder path");
|
|
394
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare function listVisibleSourceFolders(prepDataDir: string): string[];
|
|
2
|
-
export declare function isReservedSourcePreparationPath(relativePath: string): boolean;
|
|
3
|
-
export declare function normalizeSourcePreparationPathForConfig(prepDataDir: string, value: string): string;
|
|
4
|
-
export declare function defaultPreparationNameForPath(sourceFolderPath: string): string;
|
|
5
|
-
export declare function findSingleSourceFolderCandidate(prepDataDir: string): string | null;
|
|
6
|
-
export declare function listSourceFolderChoices(prepDataDir?: string): Array<{
|
|
7
|
-
value: string;
|
|
8
|
-
label: string;
|
|
9
|
-
hint: string;
|
|
10
|
-
}>;
|
|
11
|
-
export declare function defaultSourcePreparationPathForPrompt(name: string, introStyle: "first" | "additional" | "edit", prepDataDir?: string): string;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Shape
|
|
2
|
-
|
|
3
|
-
Shape the final verifiable context around the saved task focus and readiness checks.
|
|
4
|
-
|
|
5
|
-
Contract type: `build-query-shape`
|
|
6
|
-
|
|
7
|
-
## Requirements
|
|
8
|
-
|
|
9
|
-
- Use the Build run task focus plus saved readiness-check text to shape `home.md` and retrieval routes.
|
|
10
|
-
- Rewrite `home.md` into a real entrypoint note. Do not leave the scaffold `Not yet built.` placeholder in place.
|
|
11
|
-
- When you add wikilinks, target real verifiable-context notes by exact basename or explicit relative path.
|
|
12
|
-
- If you introduce a new note name in `home.md` or another shaped output, the same stage must also create that note file.
|
|
13
|
-
- Prefer direct file-reading and search tools over shell commands for routine file inspection.
|
|
14
|
-
- When a source value is approximate, preserve it as a bounded range and say why it is approximate.
|
|
15
|
-
- Do not invent finer precision than the source supports.
|
|
16
|
-
- Keep approximate values consistent across `home.md`, focused indexes, and claim/entity notes.
|
|
17
|
-
- Do not copy expected answers into the verifiable context.
|
|
18
|
-
|
|
19
|
-
## Notes
|
|
20
|
-
|
|
21
|
-
- Use the saved task focus and readiness checks to bias the final verifiable context toward the job it should be especially good at.
|
|
22
|
-
- Do not copy expected answers into the final verifiable context just because the checks imply them.
|
|
23
|
-
- Prefer the saved summary evidence and structured notes when they already preserve the bounded chart/table reads plus provenance you need.
|
|
24
|
-
- Reopen source references during shaping only when the verifiable context is missing the needed value, the metric family is ambiguous, or the earlier bounded read is clearly inconsistent.
|
|
25
|
-
- If a saved readiness check depends on source-derived values, carry the final bounded values into focused notes with provenance instead of repeatedly recomputing them from source files.
|
|
26
|
-
- Prefer better routing, prioritization, and focused navigation over speculative synthesis.
|
|
27
|
-
- Any wikilinks you add to `home.md` or indexes must resolve to real verifiable-context note basenames or explicit relative paths.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Structure
|
|
2
|
-
|
|
3
|
-
Build the cross-file knowledge structure from the summaries.
|
|
4
|
-
|
|
5
|
-
Contract type: `build-knowledge-structure`
|
|
6
|
-
|
|
7
|
-
## Requirements
|
|
8
|
-
|
|
9
|
-
- Treat the knowledge layer as retrieval structure, not final truth.
|
|
10
|
-
- Prefer durable entity, claim, and index notes over one giant catch-all file.
|
|
11
|
-
- Keep structure-stage links stage-local: prefer linking only to summaries or knowledge notes that are already meaningful by the end of this stage. Avoid relying on `home.md` or other shape-stage routes as the main navigation surface.
|
|
12
|
-
- Prefer direct file-reading and search tools over shell commands for routine file inspection.
|
|
13
|
-
|
|
14
|
-
## Notes
|
|
15
|
-
|
|
16
|
-
- Bias structure toward canonical entities, claims, timelines, and stable indexes.
|
|
17
|
-
- Use taxonomy and ontology only as means to improve retrieval, navigation, and evidence tracking.
|
|
18
|
-
- For small source folders, prefer a minimal stable substrate over exhaustive graph sprawl.
|
|
19
|
-
- When you add wikilinks, target real verifiable-context notes by exact basename or explicit relative path. Do not invent title-style links unless that exact title is also a declared note label or alias.
|
|
20
|
-
- Do not add wikilinks in structure outputs to files that the shape stage creates later. If a route belongs in `home.md` or a later shaped note, leave plain text now and let the later stage add the link.
|
|
21
|
-
- For summary references, prefer explicit links like `[[summaries/<file-stem>]]` or plain code paths. For knowledge notes, prefer the final filename stem under `knowledge/`.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Plugins
|
|
2
|
-
|
|
3
|
-
Host plugin bundles for agent-first Interf use.
|
|
4
|
-
|
|
5
|
-
This directory is the source of truth for package-shipped plugin assets.
|
|
6
|
-
|
|
7
|
-
Each plugin should stay thin: a host manifest, the canonical Interf Skill, and
|
|
8
|
-
configuration that starts `interf mcp`. The MCP server itself ships inside
|
|
9
|
-
`interf`.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
|
|
3
|
-
"name": "interf",
|
|
4
|
-
"version": "0.1.0",
|
|
5
|
-
"description": "Build verifiable context for agents from source files with Interf.",
|
|
6
|
-
"author": {
|
|
7
|
-
"name": "Interf Inc.",
|
|
8
|
-
"url": "https://interf.com"
|
|
9
|
-
},
|
|
10
|
-
"homepage": "https://interf.com",
|
|
11
|
-
"repository": "https://github.com/interf-labs/interf",
|
|
12
|
-
"license": "SEE LICENSE IN LICENSE.md",
|
|
13
|
-
"keywords": [
|
|
14
|
-
"interf",
|
|
15
|
-
"agents",
|
|
16
|
-
"data-preparation",
|
|
17
|
-
"verifiable-context"
|
|
18
|
-
],
|
|
19
|
-
"skills": "./skills/",
|
|
20
|
-
"mcpServers": "./.mcp.json"
|
|
21
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# Interf MCP Integration
|
|
2
|
-
|
|
3
|
-
This bundle packages Interf for agent hosts that can launch a local MCP server.
|
|
4
|
-
It is not a standalone Interf engine and it should not be treated as a verified
|
|
5
|
-
marketplace plugin format for every host.
|
|
6
|
-
|
|
7
|
-
Interf builds verifiable context for agents from your files. It turns hidden
|
|
8
|
-
file discovery into traceable artifacts with proof of how they were built.
|
|
9
|
-
|
|
10
|
-
It contains:
|
|
11
|
-
|
|
12
|
-
- the same `/interf` Skill available at [`skills/interf`](../../skills/interf/)
|
|
13
|
-
- a local MCP server definition that runs `interf mcp`
|
|
14
|
-
|
|
15
|
-
The Skill teaches the agent when to use Interf and how to propose requested
|
|
16
|
-
Artifacts. The MCP server gives the host agent tools for Preparations, Build
|
|
17
|
-
Plans, runs, and verifiable context locators.
|
|
18
|
-
|
|
19
|
-
If the host launches this MCP server on the user's device, the MCP tools can
|
|
20
|
-
call `web_start` to start the local Interf engine and then connect to
|
|
21
|
-
`127.0.0.1:4873`. If the host only runs inside a remote sandbox and does not
|
|
22
|
-
launch a local MCP server, it cannot reach the user's local engine; the user
|
|
23
|
-
must start Interf locally, use a host-provided local connector, or connect to a
|
|
24
|
-
future remote Interf instance.
|
|
25
|
-
|
|
26
|
-
You can also start the local engine manually with:
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
interf web start
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
or connect a remote Interf instance before using the MCP tools.
|