@interf/compiler 0.22.2 → 0.33.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 +175 -234
- 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 -4
- package/dist/cli/commands/auth.d.ts +20 -0
- package/dist/cli/commands/auth.js +161 -0
- package/dist/cli/commands/benchmark.d.ts +10 -0
- package/dist/cli/commands/benchmark.js +88 -0
- package/dist/cli/commands/build-plan.js +95 -103
- package/dist/cli/commands/build.d.ts +1 -1
- package/dist/cli/commands/build.js +16 -15
- package/dist/cli/commands/doctor.js +3 -3
- package/dist/cli/commands/graphs.d.ts +2 -0
- package/dist/cli/commands/graphs.js +199 -0
- package/dist/cli/commands/login.js +4 -6
- package/dist/cli/commands/logout.js +1 -1
- package/dist/cli/commands/mcp.d.ts +3 -2
- package/dist/cli/commands/mcp.js +721 -204
- package/dist/cli/commands/project.d.ts +2 -0
- package/dist/cli/commands/project.js +202 -0
- package/dist/cli/commands/reset.d.ts +1 -1
- package/dist/cli/commands/reset.js +10 -10
- package/dist/cli/commands/runs.js +52 -26
- 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 +33 -22
- package/dist/cli/commands/traces.d.ts +2 -0
- package/dist/cli/commands/traces.js +125 -0
- package/dist/cli/commands/wizard.js +155 -150
- package/dist/cli/index.d.ts +7 -4
- package/dist/cli/index.js +13 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/packages/build-plans/authoring/brief.d.ts +517 -0
- package/dist/packages/build-plans/authoring/brief.js +89 -0
- package/dist/packages/build-plans/authoring/build-plan-authoring.d.ts +10 -10
- package/dist/packages/build-plans/authoring/build-plan-authoring.js +66 -26
- package/dist/packages/build-plans/authoring/build-plan-edit-session.d.ts +1 -1
- package/dist/packages/build-plans/authoring/build-plan-edit-session.js +8 -2
- package/dist/packages/build-plans/authoring/build-plan-improvement.d.ts +9 -6
- package/dist/packages/build-plans/authoring/build-plan-improvement.js +39 -42
- 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 -12
- package/dist/packages/build-plans/package/build-plan-definitions.js +40 -39
- 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 +4 -4
- package/dist/packages/build-plans/package/build-plan-stage-runner.js +22 -11
- package/dist/packages/build-plans/package/builtin-build-plan.d.ts +5 -6
- package/dist/packages/build-plans/package/builtin-build-plan.js +7 -8
- package/dist/packages/build-plans/package/context-interface.d.ts +11 -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 +56 -52
- package/dist/packages/build-plans/package/local-build-plans.d.ts +12 -10
- package/dist/packages/build-plans/package/local-build-plans.js +56 -31
- package/dist/packages/build-plans/package/user-build-plans.js +1 -1
- package/dist/packages/contracts/index.d.ts +4 -2
- package/dist/packages/contracts/index.js +2 -1
- package/dist/packages/contracts/lib/project-paths.d.ts +137 -0
- package/dist/packages/contracts/lib/project-paths.js +211 -0
- package/dist/packages/contracts/lib/project-schema.d.ts +160 -0
- package/dist/packages/contracts/lib/project-schema.js +113 -0
- package/dist/packages/contracts/lib/schema.d.ts +739 -80
- package/dist/packages/contracts/lib/schema.js +410 -75
- 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 +79 -0
- package/dist/packages/projects/lib/schema.js +89 -0
- package/dist/packages/projects/source-config.d.ts +58 -0
- package/dist/packages/projects/source-config.js +352 -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 +82 -0
- package/dist/packages/runtime/actions/form-builders.d.ts +14 -0
- package/dist/packages/runtime/actions/form-builders.js +619 -0
- package/dist/packages/runtime/actions/form-validators.d.ts +8 -0
- package/dist/packages/runtime/actions/form-validators.js +128 -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 +158 -0
- package/dist/packages/runtime/actions/schemas.d.ts +154 -0
- package/dist/packages/runtime/actions/schemas.js +36 -0
- package/dist/packages/runtime/agent-handoff.d.ts +11 -0
- package/dist/packages/runtime/agent-handoff.js +101 -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.js +8 -14
- package/dist/packages/{engine → runtime}/agents/lib/execution.js +14 -4
- package/dist/packages/{engine → runtime}/agents/lib/preflight.js +15 -13
- package/dist/packages/{engine → runtime}/agents/lib/render.js +4 -4
- 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 +452 -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 +63 -0
- package/dist/packages/runtime/agents/lib/shells.js +383 -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 +64 -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 +7 -6
- 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 +88 -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 +20 -0
- package/dist/packages/runtime/benchmark-question-draft.js +124 -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 +5 -5
- package/dist/packages/{engine → runtime}/build/artifact-status.js +25 -23
- 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 +15 -0
- package/dist/packages/runtime/build/build-evidence.js +173 -0
- package/dist/packages/{engine → runtime}/build/build-pipeline.d.ts +12 -8
- package/dist/packages/runtime/build/build-pipeline.js +304 -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/{engine → runtime}/build/build-stage-plan.js +28 -29
- package/dist/packages/{engine → runtime}/build/build-stage-runner.d.ts +2 -1
- package/dist/packages/runtime/build/build-stage-runner.js +165 -0
- package/dist/packages/{engine → runtime}/build/build-target.d.ts +4 -4
- package/dist/packages/runtime/build/build-target.js +16 -0
- package/dist/packages/{engine → runtime}/build/check-evaluator.d.ts +14 -16
- package/dist/packages/runtime/build/check-evaluator.js +575 -0
- package/dist/packages/runtime/build/context-graph-paths.d.ts +51 -0
- package/dist/packages/runtime/build/context-graph-paths.js +133 -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 +5 -3
- package/dist/packages/{engine → runtime}/build/index.js +5 -3
- package/dist/packages/{engine → runtime}/build/lib/schema.d.ts +221 -88
- package/dist/packages/{engine → runtime}/build/lib/schema.js +61 -41
- 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 +5 -5
- 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/{engine → runtime}/build/runtime-paths.js +6 -6
- package/dist/packages/{engine → runtime}/build/runtime-prompt.js +7 -6
- 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 +265 -0
- package/dist/packages/{engine → runtime}/build/runtime-types.d.ts +6 -6
- package/dist/packages/runtime/build/runtime-types.js +1 -0
- package/dist/packages/runtime/build/runtime.d.ts +6 -0
- package/dist/packages/runtime/build/runtime.js +5 -0
- package/dist/packages/runtime/build/source-files.d.ts +58 -0
- package/dist/packages/runtime/build/source-files.js +184 -0
- package/dist/packages/runtime/build/source-inventory.d.ts +27 -0
- package/dist/packages/runtime/build/source-inventory.js +273 -0
- package/dist/packages/runtime/build/source-manifest.d.ts +52 -0
- package/dist/packages/runtime/build/source-manifest.js +192 -0
- package/dist/packages/runtime/build/stage-evidence.d.ts +22 -0
- package/dist/packages/runtime/build/stage-evidence.js +317 -0
- package/dist/packages/runtime/build/stage-reuse.d.ts +11 -0
- package/dist/packages/runtime/build/stage-reuse.js +142 -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 +119 -0
- package/dist/packages/{engine → runtime}/build/state-paths.d.ts +3 -1
- package/dist/packages/runtime/build/state-paths.js +22 -0
- package/dist/packages/runtime/build/state-view.d.ts +5 -0
- package/dist/packages/{engine → runtime}/build/state-view.js +60 -33
- package/dist/packages/runtime/build/state.d.ts +7 -0
- package/dist/packages/runtime/build/state.js +12 -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} +48 -35
- 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 +15 -15
- package/dist/packages/{engine → runtime}/client.js +41 -24
- 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 +114 -0
- package/dist/packages/runtime/context-graph-scaffold.d.ts +9 -0
- package/dist/packages/runtime/context-graph-scaffold.js +134 -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 +270 -192
- 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/{engine → runtime}/native-run-handlers.d.ts +4 -4
- package/dist/packages/{engine → runtime}/native-run-handlers.js +184 -152
- 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 +53 -0
- package/dist/packages/runtime/project-store.d.ts +85 -0
- package/dist/packages/runtime/project-store.js +168 -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 +166 -84
- 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 +131 -0
- package/dist/packages/runtime/runtime-build-runs.d.ts +47 -0
- package/dist/packages/runtime/runtime-build-runs.js +562 -0
- package/dist/packages/runtime/runtime-caches.d.ts +91 -0
- package/dist/packages/{engine → runtime}/runtime-caches.js +77 -49
- 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 +64 -0
- package/dist/packages/runtime/runtime-project-reads.d.ts +15 -0
- package/dist/packages/runtime/runtime-project-reads.js +381 -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 +21 -16
- package/dist/packages/{engine → runtime}/runtime-resource-builders.js +48 -38
- package/dist/packages/runtime/runtime-verify-runs.d.ts +84 -0
- package/dist/packages/runtime/runtime-verify-runs.js +295 -0
- package/dist/packages/runtime/runtime.d.ts +1165 -0
- package/dist/packages/runtime/runtime.js +417 -0
- package/dist/packages/runtime/schemas/actions.d.ts +1182 -0
- package/dist/packages/runtime/schemas/actions.js +117 -0
- package/dist/packages/runtime/schemas/agents.d.ts +76 -0
- package/dist/packages/runtime/schemas/agents.js +41 -0
- package/dist/packages/runtime/schemas/build-plans.d.ts +959 -0
- package/dist/packages/runtime/schemas/build-plans.js +107 -0
- package/dist/packages/runtime/schemas/files.d.ts +567 -0
- package/dist/packages/runtime/schemas/files.js +51 -0
- package/dist/packages/runtime/schemas/index.d.ts +8 -0
- package/dist/packages/runtime/schemas/index.js +12 -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 +103 -0
- package/dist/packages/runtime/schemas/projects.d.ts +339 -0
- package/dist/packages/runtime/schemas/projects.js +136 -0
- package/dist/packages/runtime/schemas/runs.d.ts +2676 -0
- package/dist/packages/runtime/schemas/runs.js +98 -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 +117 -0
- package/dist/packages/runtime/service/operations.d.ts +1490 -0
- package/dist/packages/runtime/service/operations.js +245 -0
- package/dist/packages/runtime/service/routes.d.ts +106 -0
- package/dist/packages/runtime/service/routes.js +120 -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 +27 -0
- package/dist/packages/runtime/service/server-helpers.js +89 -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 +43 -0
- package/dist/packages/runtime/service/server-routes-agents.d.ts +4 -0
- package/dist/packages/runtime/service/server-routes-agents.js +198 -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 +83 -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 +192 -0
- package/dist/packages/runtime/service/server-routes-project-jobs.d.ts +9 -0
- package/dist/packages/runtime/service/server-routes-project-jobs.js +130 -0
- package/dist/packages/runtime/service/server-routes-project-runs.d.ts +14 -0
- package/dist/packages/runtime/service/server-routes-project-runs.js +85 -0
- package/dist/packages/runtime/service/server-routes-projects.d.ts +4 -0
- package/dist/packages/runtime/service/server-routes-projects.js +92 -0
- package/dist/packages/runtime/service/server-routes-runs.d.ts +3 -0
- package/dist/packages/runtime/service/server-routes-runs.js +112 -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 +26 -18
- package/dist/packages/{engine → runtime}/verify/verify-execution.js +11 -11
- package/dist/packages/{engine → runtime}/verify/verify-paths.d.ts +4 -4
- package/dist/packages/runtime/verify/verify-paths.js +61 -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/{engine → runtime}/verify/verify-specs.js +5 -3
- 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 +39 -31
- package/public-repo/CONTRIBUTING.md +7 -16
- package/public-repo/README.md +175 -234
- package/public-repo/SECURITY.md +3 -4
- package/public-repo/build-plans/interf-default/README.md +19 -14
- package/public-repo/build-plans/interf-default/build/stages/shape/SKILL.md +18 -11
- package/public-repo/build-plans/interf-default/build/stages/structure/SKILL.md +12 -5
- package/public-repo/build-plans/interf-default/build/stages/summarize/SKILL.md +16 -4
- package/public-repo/build-plans/interf-default/build-plan.json +34 -28
- package/public-repo/build-plans/interf-default/build-plan.schema.json +54 -32
- package/public-repo/build-plans/interf-default/improve/SKILL.md +3 -3
- package/public-repo/build-plans/interf-default/use/query/SKILL.md +17 -11
- package/public-repo/openapi/local-service.openapi.json +6803 -0
- package/public-repo/skills/interf/SKILL.md +460 -179
- 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/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-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/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-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.js +0 -16
- package/dist/packages/engine/build/state-view.d.ts +0 -5
- 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/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-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-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/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-profile.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/execution.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/executors.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/executors.js +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/logs.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/logs.js +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/preflight.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/render.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/status.d.ts +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/status.js +0 -0
- /package/dist/packages/{engine → runtime}/agents/lib/types.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-paths.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-execution.d.ts +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,240 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `interf prep` — preparation CRUD against a connected instance.
|
|
3
|
-
*
|
|
4
|
-
* interf prep ls
|
|
5
|
-
* interf prep create <id> --source <path> [--build-plan <id>] [--about <text>]
|
|
6
|
-
* interf prep show <id>
|
|
7
|
-
* interf prep rm <id>
|
|
8
|
-
*
|
|
9
|
-
* Every subcommand requires an active connection. If `~/.interf/connection.json`
|
|
10
|
-
* is missing or unreachable, the command exits non-zero with the
|
|
11
|
-
* connect-or-error hint.
|
|
12
|
-
*/
|
|
13
|
-
import { resolve } from "node:path";
|
|
14
|
-
import chalk from "chalk";
|
|
15
|
-
import { CONNECT_OR_ERROR_HINT, readActiveConnection, } from "../../packages/engine/connection-config.js";
|
|
16
|
-
import { preparationResourcePath } from "../../packages/engine/routes.js";
|
|
17
|
-
import { requestedArtifactCheckLabel } from "../../packages/engine/requested-artifacts.js";
|
|
18
|
-
import { RequestedArtifactSchema, SourceProfileSchema, } from "../../packages/project/lib/schema.js";
|
|
19
|
-
function requireConnection(args) {
|
|
20
|
-
const conn = readActiveConnection({
|
|
21
|
-
urlOverride: args.url,
|
|
22
|
-
authTokenOverride: args.token,
|
|
23
|
-
});
|
|
24
|
-
if (!conn) {
|
|
25
|
-
console.error(CONNECT_OR_ERROR_HINT);
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
return { url: conn.url.replace(/\/+$/, ""), token: conn.auth_token };
|
|
29
|
-
}
|
|
30
|
-
async function callJson(url, token, init = {}) {
|
|
31
|
-
const headers = new Headers(init.headers ?? {});
|
|
32
|
-
if (token)
|
|
33
|
-
headers.set("authorization", `Bearer ${token}`);
|
|
34
|
-
if (init.body && !headers.has("content-type")) {
|
|
35
|
-
headers.set("content-type", "application/json");
|
|
36
|
-
}
|
|
37
|
-
const response = await fetch(url, { ...init, headers });
|
|
38
|
-
const raw = await response.text();
|
|
39
|
-
let body = null;
|
|
40
|
-
if (raw.length > 0) {
|
|
41
|
-
try {
|
|
42
|
-
body = JSON.parse(raw);
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
body = null;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return { status: response.status, body, raw };
|
|
49
|
-
}
|
|
50
|
-
const RequestedArtifactsCliSchema = RequestedArtifactSchema.array();
|
|
51
|
-
function parseJsonOption(label, value, parse) {
|
|
52
|
-
if (!value)
|
|
53
|
-
return undefined;
|
|
54
|
-
let parsed;
|
|
55
|
-
try {
|
|
56
|
-
parsed = JSON.parse(value);
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
console.error(chalk.red(`Invalid JSON for ${label}.`));
|
|
60
|
-
console.error(chalk.dim(error instanceof Error ? error.message : String(error)));
|
|
61
|
-
process.exit(1);
|
|
62
|
-
}
|
|
63
|
-
try {
|
|
64
|
-
return parse(parsed);
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
67
|
-
console.error(chalk.red(`Invalid ${label}.`));
|
|
68
|
-
console.error(chalk.dim(error instanceof Error ? error.message : String(error)));
|
|
69
|
-
process.exit(1);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
function statusColor(status) {
|
|
73
|
-
if (status === "ready")
|
|
74
|
-
return chalk.green;
|
|
75
|
-
if (status === "failed")
|
|
76
|
-
return chalk.red;
|
|
77
|
-
if (status === "skipped")
|
|
78
|
-
return chalk.dim;
|
|
79
|
-
return chalk.yellow;
|
|
80
|
-
}
|
|
81
|
-
function renderPreparationSummary(prep) {
|
|
82
|
-
console.log();
|
|
83
|
-
console.log(` ${chalk.bold(prep.name)}`);
|
|
84
|
-
console.log(chalk.dim(` Build Plan: ${prep.build_plan_id ?? "(not selected)"}`));
|
|
85
|
-
if (prep.source_path)
|
|
86
|
-
console.log(chalk.dim(` source: ${prep.source_path}`));
|
|
87
|
-
if (prep.verifiable_context_path) {
|
|
88
|
-
console.log(chalk.dim(` output: ${prep.verifiable_context_path}`));
|
|
89
|
-
}
|
|
90
|
-
if (prep.readiness?.status) {
|
|
91
|
-
const aggColor = prep.readiness.ready ? chalk.green : chalk.yellow;
|
|
92
|
-
console.log(` readiness: ${aggColor(prep.readiness.status)}${prep.readiness.summary ? chalk.dim(` (${prep.readiness.summary})`) : ""}`);
|
|
93
|
-
}
|
|
94
|
-
if (prep.artifacts && prep.artifacts.length > 0) {
|
|
95
|
-
console.log();
|
|
96
|
-
console.log(chalk.bold(" Artifacts"));
|
|
97
|
-
const idWidth = Math.max(...prep.artifacts.map((entry) => entry.artifact_id.length), 8);
|
|
98
|
-
for (const artifact of prep.artifacts) {
|
|
99
|
-
const colored = statusColor(artifact.status)(artifact.status);
|
|
100
|
-
const stages = artifact.built_by_stages && artifact.built_by_stages.length > 0
|
|
101
|
-
? chalk.dim(` ← ${artifact.built_by_stages.join(", ")}`)
|
|
102
|
-
: "";
|
|
103
|
-
console.log(` ${artifact.artifact_id.padEnd(idWidth)} ${colored}${stages}`);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
if (prep.requested_artifacts && prep.requested_artifacts.length > 0) {
|
|
107
|
-
console.log();
|
|
108
|
-
console.log(chalk.bold(" Requested Artifacts"));
|
|
109
|
-
for (const artifact of prep.requested_artifacts) {
|
|
110
|
-
console.log(` ${chalk.bold(artifact.title)}`);
|
|
111
|
-
if (artifact.purpose ?? artifact.description) {
|
|
112
|
-
console.log(chalk.dim(` ${artifact.purpose ?? artifact.description}`));
|
|
113
|
-
}
|
|
114
|
-
const checks = artifact.checks ?? [];
|
|
115
|
-
for (const check of checks.slice(0, 4)) {
|
|
116
|
-
console.log(chalk.dim(` - ${requestedArtifactCheckLabel(check)}`));
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
if (prep.latest_build_run_id) {
|
|
121
|
-
console.log();
|
|
122
|
-
console.log(chalk.dim(` latest Build run: ${prep.latest_build_run_id}`));
|
|
123
|
-
}
|
|
124
|
-
if (prep.latest_test_run_id) {
|
|
125
|
-
console.log(chalk.dim(` latest check run: ${prep.latest_test_run_id}`));
|
|
126
|
-
}
|
|
127
|
-
console.log();
|
|
128
|
-
console.log(chalk.dim(` Run with --json for the raw resource record.`));
|
|
129
|
-
console.log();
|
|
130
|
-
}
|
|
131
|
-
export const prepCommand = {
|
|
132
|
-
command: "prep <subcommand>",
|
|
133
|
-
describe: "Manage preparations on the connected instance",
|
|
134
|
-
builder: (yargs) => yargs
|
|
135
|
-
.option("url", { type: "string", describe: "Override the active connection URL" })
|
|
136
|
-
.option("token", { type: "string", describe: "Override the active bearer token" })
|
|
137
|
-
.command("ls", "List preparations", (y) => y, async (args) => {
|
|
138
|
-
const { url, token } = requireConnection(args);
|
|
139
|
-
const { status, body, raw } = await callJson(`${url}/v1/preparations`, token);
|
|
140
|
-
if (status !== 200 || !body) {
|
|
141
|
-
console.error(chalk.red(`Failed to list preparations (HTTP ${status}).`));
|
|
142
|
-
if (raw)
|
|
143
|
-
console.error(raw);
|
|
144
|
-
process.exit(1);
|
|
145
|
-
}
|
|
146
|
-
const preparations = body.preparations ?? [];
|
|
147
|
-
if (preparations.length === 0) {
|
|
148
|
-
console.log(chalk.dim(" No preparations yet. Create one with `interf prep create <id> --source <path>`."));
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
console.log();
|
|
152
|
-
console.log(chalk.bold(" Preparations"));
|
|
153
|
-
console.log();
|
|
154
|
-
for (const prep of preparations) {
|
|
155
|
-
const sourceLabel = prep.source?.locator ?? prep.source_path ?? "(no source)";
|
|
156
|
-
const buildPlan = prep.build_plan_id ?? "(no Build Plan)";
|
|
157
|
-
const readiness = prep.readiness?.status ?? "—";
|
|
158
|
-
const requested = prep.requested_artifacts?.length ?? 0;
|
|
159
|
-
console.log(` ${prep.id}`);
|
|
160
|
-
console.log(chalk.dim(` source: ${sourceLabel}`));
|
|
161
|
-
console.log(chalk.dim(` Build Plan: ${buildPlan}`));
|
|
162
|
-
console.log(chalk.dim(` requested Artifacts: ${requested}`));
|
|
163
|
-
console.log(chalk.dim(` readiness: ${readiness}`));
|
|
164
|
-
}
|
|
165
|
-
})
|
|
166
|
-
.command("create <prep-id>", "Create a Preparation (Build Plan optional — select or draft it later)", (y) => y
|
|
167
|
-
.positional("prep-id", { type: "string", demandOption: true, describe: "Preparation id (lowercase, dash-separated)" })
|
|
168
|
-
.option("source", { type: "string", demandOption: true, describe: "Path to the Source" })
|
|
169
|
-
.option("build-plan", { type: "string", describe: "Build Plan id. Optional — select later with `interf build-plan select`." })
|
|
170
|
-
.option("about", { type: "string", describe: "One-line description of the agent work" })
|
|
171
|
-
.option("requested-artifacts-json", { type: "string", describe: "JSON array of requested Artifacts for this Preparation" })
|
|
172
|
-
.option("source-profile-json", { type: "string", describe: "JSON object describing the agent's advisory source profile" }), async (args) => {
|
|
173
|
-
const { url, token } = requireConnection(args);
|
|
174
|
-
const sourceAbs = resolve(process.cwd(), args.source);
|
|
175
|
-
const requestedArtifacts = parseJsonOption("--requested-artifacts-json", args.requestedArtifactsJson, (input) => RequestedArtifactsCliSchema.parse(input));
|
|
176
|
-
const sourceProfile = parseJsonOption("--source-profile-json", args.sourceProfileJson, (input) => SourceProfileSchema.parse(input));
|
|
177
|
-
const requestBody = {
|
|
178
|
-
id: args.prepId,
|
|
179
|
-
source: { kind: "local-folder", locator: sourceAbs },
|
|
180
|
-
...(args.buildPlan ? { build_plan_id: args.buildPlan } : {}),
|
|
181
|
-
about: args.about,
|
|
182
|
-
...(requestedArtifacts ? { requested_artifacts: requestedArtifacts } : {}),
|
|
183
|
-
...(sourceProfile ? { source_profile: sourceProfile } : {}),
|
|
184
|
-
checks: [],
|
|
185
|
-
};
|
|
186
|
-
const { status, body, raw } = await callJson(`${url}/v1/preparations`, token, { method: "POST", body: JSON.stringify(requestBody) });
|
|
187
|
-
if (status !== 201 && status !== 200) {
|
|
188
|
-
console.error(chalk.red(`Failed to create preparation (HTTP ${status}).`));
|
|
189
|
-
if (raw)
|
|
190
|
-
console.error(raw);
|
|
191
|
-
process.exit(1);
|
|
192
|
-
}
|
|
193
|
-
console.log(chalk.green(`Created preparation ${chalk.bold(args.prepId)}.`));
|
|
194
|
-
if (!args.buildPlan) {
|
|
195
|
-
console.log(chalk.dim(` no Build Plan selected yet — pick or draft one before building:`));
|
|
196
|
-
console.log(chalk.dim(` interf build-plan select ${args.prepId} <build-plan-id>`));
|
|
197
|
-
console.log(chalk.dim(` interf build-plan draft ${args.prepId}`));
|
|
198
|
-
}
|
|
199
|
-
if (body?.build_plan_id && body?.verifiable_context?.value) {
|
|
200
|
-
console.log(chalk.dim(` verifiable context (locator): ${body.verifiable_context.value}`));
|
|
201
|
-
}
|
|
202
|
-
})
|
|
203
|
-
.command("show <prep-id>", "Show a preparation's full record", (y) => y
|
|
204
|
-
.positional("prep-id", { type: "string", demandOption: true, describe: "Preparation id" })
|
|
205
|
-
.option("json", {
|
|
206
|
-
type: "boolean",
|
|
207
|
-
default: false,
|
|
208
|
-
describe: "Print the raw JSON record instead of the formatted summary",
|
|
209
|
-
}), async (args) => {
|
|
210
|
-
const { url, token } = requireConnection(args);
|
|
211
|
-
const { status, body, raw } = await callJson(`${url}${preparationResourcePath(args.prepId)}`, token);
|
|
212
|
-
if (status !== 200) {
|
|
213
|
-
console.error(chalk.red(`Failed to read preparation ${args.prepId} (HTTP ${status}).`));
|
|
214
|
-
if (raw)
|
|
215
|
-
console.error(raw);
|
|
216
|
-
process.exit(1);
|
|
217
|
-
}
|
|
218
|
-
if (args.json || !body) {
|
|
219
|
-
console.log(JSON.stringify(body, null, 2));
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
renderPreparationSummary(body);
|
|
223
|
-
})
|
|
224
|
-
.command("rm <prep-id>", "Delete a preparation", (y) => y.positional("prep-id", { type: "string", demandOption: true, describe: "Preparation id" }), async (args) => {
|
|
225
|
-
const { url, token } = requireConnection(args);
|
|
226
|
-
const { status, raw } = await callJson(`${url}${preparationResourcePath(args.prepId)}`, token, { method: "DELETE" });
|
|
227
|
-
if (status !== 200 && status !== 204) {
|
|
228
|
-
console.error(chalk.red(`Failed to delete preparation ${args.prepId} (HTTP ${status}).`));
|
|
229
|
-
if (raw)
|
|
230
|
-
console.error(raw);
|
|
231
|
-
process.exit(1);
|
|
232
|
-
}
|
|
233
|
-
console.log(chalk.green(`Deleted preparation ${chalk.bold(args.prepId)}.`));
|
|
234
|
-
})
|
|
235
|
-
.demandCommand(1)
|
|
236
|
-
.strict(),
|
|
237
|
-
handler: () => {
|
|
238
|
-
/* yargs subcommand handlers do the work */
|
|
239
|
-
},
|
|
240
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CommandModule } from "yargs";
|
|
2
|
-
type TestTarget = "verifiable-context" | "source-files";
|
|
3
|
-
interface TestArgs {
|
|
4
|
-
prepId: string;
|
|
5
|
-
target?: TestTarget;
|
|
6
|
-
url?: string;
|
|
7
|
-
token?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const testCommand: CommandModule<unknown, TestArgs>;
|
|
10
|
-
export {};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `interf test <prep-id>` — run readiness checks for a Preparation via a
|
|
3
|
-
* judge against the latest verifiable context (default) or against the source
|
|
4
|
-
* baseline (`--target source-files`). The source-files target reveals how
|
|
5
|
-
* much value the Build Plan adds. Together with Build Plan Artifact checks
|
|
6
|
-
* (auto-run on every `interf build`), this feeds the Preparation's
|
|
7
|
-
* overall readiness state.
|
|
8
|
-
*
|
|
9
|
-
* interf test bristol
|
|
10
|
-
* interf test bristol --target source-files
|
|
11
|
-
*/
|
|
12
|
-
import chalk from "chalk";
|
|
13
|
-
import { CONNECT_OR_ERROR_HINT, readActiveConnection } from "../../packages/engine/connection-config.js";
|
|
14
|
-
function resolveConnection(args) {
|
|
15
|
-
const conn = readActiveConnection({
|
|
16
|
-
urlOverride: args.url,
|
|
17
|
-
authTokenOverride: args.token,
|
|
18
|
-
});
|
|
19
|
-
if (!conn) {
|
|
20
|
-
console.error(CONNECT_OR_ERROR_HINT);
|
|
21
|
-
process.exit(1);
|
|
22
|
-
}
|
|
23
|
-
return { url: conn.url.replace(/\/+$/, ""), token: conn.auth_token };
|
|
24
|
-
}
|
|
25
|
-
async function callJson(url, token, init = {}) {
|
|
26
|
-
const headers = new Headers(init.headers ?? {});
|
|
27
|
-
if (token)
|
|
28
|
-
headers.set("authorization", `Bearer ${token}`);
|
|
29
|
-
if (init.body && !headers.has("content-type"))
|
|
30
|
-
headers.set("content-type", "application/json");
|
|
31
|
-
const response = await fetch(url, { ...init, headers });
|
|
32
|
-
const raw = await response.text();
|
|
33
|
-
let body = null;
|
|
34
|
-
if (raw.length > 0) {
|
|
35
|
-
try {
|
|
36
|
-
body = JSON.parse(raw);
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
body = null;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return { status: response.status, body, raw };
|
|
43
|
-
}
|
|
44
|
-
export const testCommand = {
|
|
45
|
-
command: "test <prep-id>",
|
|
46
|
-
describe: "Run readiness checks against a Preparation's verifiable context (or source-files baseline)",
|
|
47
|
-
builder: (yargs) => yargs
|
|
48
|
-
.positional("prep-id", { type: "string", demandOption: true, describe: "Preparation id" })
|
|
49
|
-
.option("target", {
|
|
50
|
-
type: "string",
|
|
51
|
-
choices: ["verifiable-context", "source-files"],
|
|
52
|
-
default: "verifiable-context",
|
|
53
|
-
describe: "Judge target: 'verifiable-context' (default) checks built output, 'source-files' checks the raw Source baseline",
|
|
54
|
-
})
|
|
55
|
-
.option("url", { type: "string", describe: "Override the active connection URL" })
|
|
56
|
-
.option("token", { type: "string", describe: "Override the active bearer token" }),
|
|
57
|
-
handler: async (args) => {
|
|
58
|
-
const { url, token } = resolveConnection(args);
|
|
59
|
-
// 0.15 hard-error: refuse to start a readiness-check run if the engine
|
|
60
|
-
// has zero connected agents — verifier-role stages can't run without one.
|
|
61
|
-
const instance = await callJson(`${url}/v1/instance`, token);
|
|
62
|
-
if (instance.body && instance.body.agent_count === 0) {
|
|
63
|
-
console.error(chalk.red(" Cannot run readiness checks — no agents available."));
|
|
64
|
-
console.error(" Install Claude Code, Codex, Gemini, or another agent CLI, or");
|
|
65
|
-
console.error(" register a custom CLI: `interf agents register <name> --command <cmd>`.");
|
|
66
|
-
process.exit(1);
|
|
67
|
-
}
|
|
68
|
-
const target = args.target ?? "verifiable-context";
|
|
69
|
-
const { status, body, raw } = await callJson(`${url}/v1/preparations/${encodeURIComponent(args.prepId)}/verify-runs`, token, { method: "POST", body: JSON.stringify({ target }) });
|
|
70
|
-
if (status !== 201 && status !== 200) {
|
|
71
|
-
console.error(chalk.red(`Failed to start readiness-check run for ${args.prepId} (HTTP ${status}).`));
|
|
72
|
-
if (raw)
|
|
73
|
-
console.error(raw);
|
|
74
|
-
process.exit(1);
|
|
75
|
-
}
|
|
76
|
-
console.log();
|
|
77
|
-
console.log(` Run ${chalk.bold(body?.run_id ?? "(?)")} ${chalk.dim(`(${body?.status ?? "started"})`)}`);
|
|
78
|
-
console.log(` Target: ${target}`);
|
|
79
|
-
if (body?.readiness?.status)
|
|
80
|
-
console.log(` Readiness: ${body.readiness.status}`);
|
|
81
|
-
if (body?.error)
|
|
82
|
-
console.log(chalk.red(` Error: ${body.error}`));
|
|
83
|
-
console.log();
|
|
84
|
-
},
|
|
85
|
-
};
|
package/dist/cli/commands/web.js
DELETED
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `interf web` — start the engine in the foreground until Ctrl-C.
|
|
3
|
-
*
|
|
4
|
-
* interf web # start on default port; hard error if port busy
|
|
5
|
-
* interf web start # start the engine in the background
|
|
6
|
-
* interf web stop # send SIGTERM to the running engine
|
|
7
|
-
* interf web status # print engine info via the connected URL
|
|
8
|
-
*
|
|
9
|
-
* Pure server. No reuse / register-with-existing logic. Writes
|
|
10
|
-
* `~/.interf/connection.json` on startup so subsequent CLI commands can
|
|
11
|
-
* connect without a pointer file.
|
|
12
|
-
*/
|
|
13
|
-
import chalk from "chalk";
|
|
14
|
-
import { closeSync, mkdirSync, openSync, readFileSync } from "node:fs";
|
|
15
|
-
import { spawn } from "node:child_process";
|
|
16
|
-
import { dirname } from "node:path";
|
|
17
|
-
import { LOCAL_SERVICE_DEFAULT_HOST, LOCAL_SERVICE_DEFAULT_PORT, buildLocalServiceUrl, } from "../../packages/engine/routes.js";
|
|
18
|
-
import { startLocalService } from "../../packages/engine/server.js";
|
|
19
|
-
import { createNativeLocalServiceRunHandlers } from "../../packages/engine/native-run-handlers.js";
|
|
20
|
-
import { CONNECT_OR_ERROR_HINT, clearConnection, readActiveConnection, writeConnection, } from "../../packages/engine/connection-config.js";
|
|
21
|
-
import { serviceRegistryPath } from "../../packages/engine/instance-paths.js";
|
|
22
|
-
function packageVersionFromManifest() {
|
|
23
|
-
try {
|
|
24
|
-
const url = new URL("../../../package.json", import.meta.url);
|
|
25
|
-
const raw = readFileSync(url, "utf8");
|
|
26
|
-
const parsed = JSON.parse(raw);
|
|
27
|
-
return parsed.version;
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function isPortInUseError(error) {
|
|
34
|
-
if (!error || typeof error !== "object")
|
|
35
|
-
return false;
|
|
36
|
-
const code = error.code;
|
|
37
|
-
return code === "EADDRINUSE";
|
|
38
|
-
}
|
|
39
|
-
async function runWebForeground(args) {
|
|
40
|
-
const host = args.host ?? LOCAL_SERVICE_DEFAULT_HOST;
|
|
41
|
-
const port = args.port ?? LOCAL_SERVICE_DEFAULT_PORT;
|
|
42
|
-
let service;
|
|
43
|
-
try {
|
|
44
|
-
service = await startLocalService({
|
|
45
|
-
host,
|
|
46
|
-
port,
|
|
47
|
-
packageVersion: packageVersionFromManifest(),
|
|
48
|
-
handlers: createNativeLocalServiceRunHandlers(),
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
if (isPortInUseError(error)) {
|
|
53
|
-
console.error(chalk.red(`Error: another Interf engine is already running at ${buildLocalServiceUrl({ host, port })}.`));
|
|
54
|
-
console.error(`Stop it first with \`interf web stop\`.`);
|
|
55
|
-
process.exit(1);
|
|
56
|
-
}
|
|
57
|
-
throw error;
|
|
58
|
-
}
|
|
59
|
-
const shutdown = async () => {
|
|
60
|
-
try {
|
|
61
|
-
await service.close();
|
|
62
|
-
}
|
|
63
|
-
catch {
|
|
64
|
-
// best effort
|
|
65
|
-
}
|
|
66
|
-
process.exit(0);
|
|
67
|
-
};
|
|
68
|
-
console.log();
|
|
69
|
-
console.log(` Interf engine: ${chalk.bold(service.url)}`);
|
|
70
|
-
console.log(` Interf UI: ${service.url}/`);
|
|
71
|
-
console.log(` Health: ${service.url}/health`);
|
|
72
|
-
console.log(chalk.dim(" Press Ctrl-C to stop."));
|
|
73
|
-
console.log();
|
|
74
|
-
process.on("SIGINT", shutdown);
|
|
75
|
-
process.on("SIGTERM", shutdown);
|
|
76
|
-
await new Promise(() => {
|
|
77
|
-
/* block forever; signals trigger shutdown */
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
async function isEngineReachable(url) {
|
|
81
|
-
try {
|
|
82
|
-
const response = await fetch(`${url}/health`);
|
|
83
|
-
return response.status === 200;
|
|
84
|
-
}
|
|
85
|
-
catch {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
async function waitForEngine(url, timeoutMs) {
|
|
90
|
-
const started = Date.now();
|
|
91
|
-
while (Date.now() - started < timeoutMs) {
|
|
92
|
-
if (await isEngineReachable(url))
|
|
93
|
-
return true;
|
|
94
|
-
await new Promise((resolveWait) => setTimeout(resolveWait, 150));
|
|
95
|
-
}
|
|
96
|
-
return false;
|
|
97
|
-
}
|
|
98
|
-
function managedWebLogPath(port) {
|
|
99
|
-
return `${dirname(serviceRegistryPath())}/interf-web-${port}.log`;
|
|
100
|
-
}
|
|
101
|
-
async function runWebStart(args) {
|
|
102
|
-
const host = args.host ?? LOCAL_SERVICE_DEFAULT_HOST;
|
|
103
|
-
const port = args.port ?? LOCAL_SERVICE_DEFAULT_PORT;
|
|
104
|
-
const url = buildLocalServiceUrl({ host, port });
|
|
105
|
-
if (await isEngineReachable(url)) {
|
|
106
|
-
writeConnection({ url, auth_token: null });
|
|
107
|
-
console.log(chalk.green(`Interf engine already running at ${chalk.bold(url)}.`));
|
|
108
|
-
console.log(`Interf UI: ${url}/`);
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const binPath = process.argv[1];
|
|
112
|
-
if (!binPath) {
|
|
113
|
-
console.error(chalk.red("Cannot locate the Interf CLI entrypoint for managed start."));
|
|
114
|
-
console.error(`Try running \`interf web\` in a separate terminal instead.`);
|
|
115
|
-
process.exit(1);
|
|
116
|
-
}
|
|
117
|
-
const logPath = args.log ?? managedWebLogPath(port);
|
|
118
|
-
mkdirSync(dirname(logPath), { recursive: true });
|
|
119
|
-
const stdoutFd = openSync(logPath, "a");
|
|
120
|
-
const stderrFd = openSync(logPath, "a");
|
|
121
|
-
let child;
|
|
122
|
-
try {
|
|
123
|
-
child = spawn(process.execPath, [binPath, "web", "--host", host, "--port", String(port)], {
|
|
124
|
-
detached: true,
|
|
125
|
-
stdio: ["ignore", stdoutFd, stderrFd],
|
|
126
|
-
env: process.env,
|
|
127
|
-
});
|
|
128
|
-
child.unref();
|
|
129
|
-
}
|
|
130
|
-
finally {
|
|
131
|
-
closeSync(stdoutFd);
|
|
132
|
-
closeSync(stderrFd);
|
|
133
|
-
}
|
|
134
|
-
const ready = await waitForEngine(url, args.timeoutMs ?? 5000);
|
|
135
|
-
if (!ready) {
|
|
136
|
-
console.error(chalk.red(`Timed out waiting for Interf engine at ${url}.`));
|
|
137
|
-
console.error(`Log: ${logPath}`);
|
|
138
|
-
process.exit(1);
|
|
139
|
-
}
|
|
140
|
-
writeConnection({ url, auth_token: null });
|
|
141
|
-
console.log(chalk.green(`Started Interf engine at ${chalk.bold(url)}.`));
|
|
142
|
-
console.log(`Interf UI: ${url}/`);
|
|
143
|
-
console.log(`Log: ${logPath}`);
|
|
144
|
-
console.log(chalk.dim(`Stop it with \`interf web stop\`.`));
|
|
145
|
-
}
|
|
146
|
-
function findEnginePidByUrl(url) {
|
|
147
|
-
try {
|
|
148
|
-
const raw = readFileSync(serviceRegistryPath(), "utf8");
|
|
149
|
-
const parsed = JSON.parse(raw);
|
|
150
|
-
const entry = parsed.services?.find((s) => s.url === url);
|
|
151
|
-
return entry?.pid ?? null;
|
|
152
|
-
}
|
|
153
|
-
catch {
|
|
154
|
-
return null;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function isPidAlive(pid) {
|
|
158
|
-
try {
|
|
159
|
-
// Signal 0 is a no-op probe — succeeds if the PID exists and we can
|
|
160
|
-
// signal it; throws ESRCH otherwise.
|
|
161
|
-
process.kill(pid, 0);
|
|
162
|
-
return true;
|
|
163
|
-
}
|
|
164
|
-
catch {
|
|
165
|
-
return false;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Scan ~/.interf/services.json for engines whose PID is still alive.
|
|
170
|
-
* Used by `interf web stop` when ~/.interf/connection.json is missing
|
|
171
|
-
* — the registry tells us which engine processes are actually running
|
|
172
|
-
* regardless of which one the wizard last connected to.
|
|
173
|
-
*/
|
|
174
|
-
function listLiveEnginesFromRegistry() {
|
|
175
|
-
try {
|
|
176
|
-
const raw = readFileSync(serviceRegistryPath(), "utf8");
|
|
177
|
-
const parsed = JSON.parse(raw);
|
|
178
|
-
return (parsed.services ?? []).filter((entry) => typeof entry.pid === "number" && isPidAlive(entry.pid));
|
|
179
|
-
}
|
|
180
|
-
catch {
|
|
181
|
-
return [];
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
async function runWebStop(args) {
|
|
185
|
-
// Resolution order: explicit --url override → active connection.json
|
|
186
|
-
// → fall back to scanning services.json for any live engine. The
|
|
187
|
-
// last fallback recovers from the case where connection.json was
|
|
188
|
-
// cleared while an engine was still running (e.g. another `interf
|
|
189
|
-
// web` attempt failed mid-startup, or `interf logout` was run while
|
|
190
|
-
// the engine kept going).
|
|
191
|
-
const conn = readActiveConnection({
|
|
192
|
-
urlOverride: args.url,
|
|
193
|
-
authTokenOverride: args.token,
|
|
194
|
-
});
|
|
195
|
-
let urlToStop = conn ? conn.url.replace(/\/+$/, "") : null;
|
|
196
|
-
let pidToStop = urlToStop ? findEnginePidByUrl(urlToStop) : null;
|
|
197
|
-
if (!pidToStop) {
|
|
198
|
-
const liveEngines = listLiveEnginesFromRegistry();
|
|
199
|
-
if (liveEngines.length === 0) {
|
|
200
|
-
console.error("No live Interf engine to stop.");
|
|
201
|
-
console.error("Checked ~/.interf/connection.json and ~/.interf/services.json — neither pointed at a running process.");
|
|
202
|
-
process.exit(1);
|
|
203
|
-
}
|
|
204
|
-
if (liveEngines.length > 1 && !urlToStop) {
|
|
205
|
-
console.error(`Multiple live Interf engines registered. Pick one with --url:`);
|
|
206
|
-
for (const entry of liveEngines) {
|
|
207
|
-
console.error(` ${entry.url} (pid ${entry.pid})`);
|
|
208
|
-
}
|
|
209
|
-
process.exit(1);
|
|
210
|
-
}
|
|
211
|
-
const target = urlToStop
|
|
212
|
-
? liveEngines.find((entry) => entry.url === urlToStop)
|
|
213
|
-
: liveEngines[0];
|
|
214
|
-
if (!target) {
|
|
215
|
-
console.error(`No live engine matches ${urlToStop ?? "the active connection"} in services.json.`);
|
|
216
|
-
process.exit(1);
|
|
217
|
-
}
|
|
218
|
-
urlToStop = target.url;
|
|
219
|
-
pidToStop = target.pid;
|
|
220
|
-
if (!conn) {
|
|
221
|
-
console.log(chalk.dim(` No active connection.json — recovering engine pid ${pidToStop} from services.json.`));
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
try {
|
|
225
|
-
process.kill(pidToStop, "SIGTERM");
|
|
226
|
-
console.log(chalk.green(`Sent SIGTERM to engine pid ${pidToStop} (${urlToStop}).`));
|
|
227
|
-
if (conn)
|
|
228
|
-
clearConnection();
|
|
229
|
-
}
|
|
230
|
-
catch (error) {
|
|
231
|
-
console.error(`Failed to stop engine pid ${pidToStop}: ${error instanceof Error ? error.message : String(error)}`);
|
|
232
|
-
process.exit(1);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
async function runWebStatus(args) {
|
|
236
|
-
const conn = readActiveConnection({
|
|
237
|
-
urlOverride: args.url,
|
|
238
|
-
authTokenOverride: args.token,
|
|
239
|
-
});
|
|
240
|
-
if (!conn) {
|
|
241
|
-
console.error(CONNECT_OR_ERROR_HINT);
|
|
242
|
-
process.exit(1);
|
|
243
|
-
}
|
|
244
|
-
const url = conn.url.replace(/\/+$/, "");
|
|
245
|
-
try {
|
|
246
|
-
const headers = new Headers();
|
|
247
|
-
if (conn.auth_token)
|
|
248
|
-
headers.set("authorization", `Bearer ${conn.auth_token}`);
|
|
249
|
-
const response = await fetch(`${url}/v1/instance`, { headers });
|
|
250
|
-
const raw = await response.text();
|
|
251
|
-
if (response.status !== 200) {
|
|
252
|
-
console.error(chalk.red(`Engine status request failed (HTTP ${response.status}).`));
|
|
253
|
-
if (raw)
|
|
254
|
-
console.error(raw);
|
|
255
|
-
process.exit(1);
|
|
256
|
-
}
|
|
257
|
-
console.log(raw);
|
|
258
|
-
}
|
|
259
|
-
catch (error) {
|
|
260
|
-
console.error(chalk.red(`Engine ${url} unreachable: ${error instanceof Error ? error.message : String(error)}`));
|
|
261
|
-
process.exit(1);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
export const webCommand = {
|
|
265
|
-
command: "web [subcommand]",
|
|
266
|
-
describe: "Start / stop / inspect the Interf engine",
|
|
267
|
-
builder: (yargs) => yargs
|
|
268
|
-
.command("start", "Start the engine in the background", (y) => y
|
|
269
|
-
.option("host", { type: "string", default: LOCAL_SERVICE_DEFAULT_HOST, describe: "Host to bind" })
|
|
270
|
-
.option("port", { type: "number", default: LOCAL_SERVICE_DEFAULT_PORT, describe: "Port to bind" })
|
|
271
|
-
.option("timeout-ms", { type: "number", default: 5000, describe: "How long to wait for startup" })
|
|
272
|
-
.option("log", { type: "string", describe: "Path to write background engine logs" }), runWebStart)
|
|
273
|
-
.command("stop", "Stop the connected engine", (y) => y
|
|
274
|
-
.option("url", { type: "string", describe: "Override the active connection URL" })
|
|
275
|
-
.option("token", { type: "string", describe: "Override the active bearer token" }), runWebStop)
|
|
276
|
-
.command("status", "Show engine status via the connected URL", (y) => y
|
|
277
|
-
.option("url", { type: "string", describe: "Override the active connection URL" })
|
|
278
|
-
.option("token", { type: "string", describe: "Override the active bearer token" }), runWebStatus)
|
|
279
|
-
.command("$0", "Start the engine in the foreground (default)", (y) => y
|
|
280
|
-
.option("host", { type: "string", default: LOCAL_SERVICE_DEFAULT_HOST, describe: "Host to bind" })
|
|
281
|
-
.option("port", { type: "number", default: LOCAL_SERVICE_DEFAULT_PORT, describe: "Port to bind" }), runWebForeground)
|
|
282
|
-
.strict(),
|
|
283
|
-
handler: () => {
|
|
284
|
-
/* yargs subcommand handlers do the work */
|
|
285
|
-
},
|
|
286
|
-
};
|
package/dist/interf-ui/404.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="dark geistsans_d5a4f12f-module__eFBk2G__variable geistmono_157ca88a-module__DegD4G__variable" lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0.tjb6f4golw..css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/10jeodxe4nkgj.js"/><script src="/_next/static/chunks/15z_en80lrq-3.js" async=""></script><script src="/_next/static/chunks/13c8b~m8knjsf.js" async=""></script><script src="/_next/static/chunks/turbopack-0usj_75.8frlw.js" async=""></script><script src="/_next/static/chunks/0g-ea0zj5d-0k.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Interf UI</title><meta name="description" content="Local Interf instance for Preparations, Build Plans, Build runs, readiness checks, and verifiable context."/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/10jeodxe4nkgj.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[58316,[\"/_next/static/chunks/0g-ea0zj5d-0k.js\"],\"default\"]\n3:I[87122,[\"/_next/static/chunks/0g-ea0zj5d-0k.js\"],\"default\"]\n4:I[36487,[\"/_next/static/chunks/0g-ea0zj5d-0k.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[36487,[\"/_next/static/chunks/0g-ea0zj5d-0k.js\"],\"ViewportBoundary\"]\na:I[36487,[\"/_next/static/chunks/0g-ea0zj5d-0k.js\"],\"MetadataBoundary\"]\nc:I[74130,[\"/_next/static/chunks/0g-ea0zj5d-0k.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0.tjb6f4golw..css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0.tjb6f4golw..css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0g-ea0zj5d-0k.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"className\":\"dark geistsans_d5a4f12f-module__eFBk2G__variable geistmono_157ca88a-module__DegD4G__variable\",\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0.tjb6f4golw..css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"--reS3xBzM5zc6QxNjZd6\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Interf UI\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Local Interf instance for Preparations, Build Plans, Build runs, readiness checks, and verifiable context.\"}]]\n"])</script></body></html>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
1:"$Sreact.fragment"
|
|
2
|
-
2:I[30739,["/_next/static/chunks/0g-ea0zj5d-0k.js"],"ClientPageRoot"]
|
|
3
|
-
3:I[71439,["/_next/static/chunks/0g-ea0zj5d-0k.js","/_next/static/chunks/0haldgm65ve6l.js","/_next/static/chunks/0dn41fa_zvgsl.js","/_next/static/chunks/0~a36ujuzpaz..js","/_next/static/chunks/14dznb2qpt-ho.js"],"default"]
|
|
4
|
-
6:I[36487,["/_next/static/chunks/0g-ea0zj5d-0k.js"],"OutletBoundary"]
|
|
5
|
-
7:"$Sreact.suspense"
|
|
6
|
-
:HL["/_next/static/chunks/085-n_jv2ng_q.css","style"]
|
|
7
|
-
0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/085-n_jv2ng_q.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0haldgm65ve6l.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0dn41fa_zvgsl.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/0~a36ujuzpaz..js","async":true}],["$","script","script-3",{"src":"/_next/static/chunks/14dznb2qpt-ho.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"--reS3xBzM5zc6QxNjZd6"}
|
|
8
|
-
4:{}
|
|
9
|
-
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
|
|
10
|
-
8:null
|