@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
|
@@ -0,0 +1,1165 @@
|
|
|
1
|
+
import { type ArtifactRef, type BuildRun, type InterfRunEvent, type EvidenceRecord } from "./execution/lib/schema.js";
|
|
2
|
+
import { type RunEventSink } from "./execution/events.js";
|
|
3
|
+
import { RunListingCache, ReadinessCache, MtimeListingCache, BuildPlanListingCache } from "./runtime-caches.js";
|
|
4
|
+
import { type Readiness } from "../contracts/lib/schema.js";
|
|
5
|
+
import type { ProjectConfig } from "../projects/lib/schema.js";
|
|
6
|
+
import type { ActionProposalCreateRequest, ActionProposalPlan, ActionProposalResource, BuildPlanAuthoringRuntimeRequest, BuildPlanAuthoringResult, BuildPlanChangeResult, BuildPlanResource, BuildRunCreateRequest, BuildRunResource, LocalExecutorStatus, LocalJobEvent, LocalJobEventAppendRequest, LocalJobRunResource, LocalRunHandlerResult, LocalServiceHealth, ProjectResource, BenchmarkQuestionDraftRuntimeRequest, BenchmarkQuestionDraftResult, ResetResult, RunObservabilityResource, SourceFileResource, ContextGraphResource, VerifyRunCreateRequest, VerifyRunResource } from "./schemas/index.js";
|
|
7
|
+
import { type AgentsRegistryRoleState, type AgentsRegistryState } from "./runtime-executor.js";
|
|
8
|
+
import type { AgentPrefs, AgentRecord, RoleMap } from "../contracts/lib/schema.js";
|
|
9
|
+
export interface LocalServiceBuildRunContext {
|
|
10
|
+
runId: string;
|
|
11
|
+
sourcePath: string;
|
|
12
|
+
contextGraphPath: string;
|
|
13
|
+
projectConfig: ProjectConfig;
|
|
14
|
+
events: RunEventSink;
|
|
15
|
+
}
|
|
16
|
+
export interface LocalServiceVerifyRunContext {
|
|
17
|
+
runId: string;
|
|
18
|
+
sourcePath: string;
|
|
19
|
+
contextGraphPath: string;
|
|
20
|
+
projectConfig: ProjectConfig;
|
|
21
|
+
}
|
|
22
|
+
export interface LocalServiceJobRunContext {
|
|
23
|
+
runId: string;
|
|
24
|
+
sourcePath: string;
|
|
25
|
+
emit(event: LocalJobEventAppendRequest): void;
|
|
26
|
+
}
|
|
27
|
+
export interface LocalServiceActionPlanningContext {
|
|
28
|
+
sourcePath: string;
|
|
29
|
+
projects: ProjectConfig[];
|
|
30
|
+
projectHealth: Array<{
|
|
31
|
+
name: string;
|
|
32
|
+
benchmark_questions: number;
|
|
33
|
+
context_graph_ready: boolean;
|
|
34
|
+
can_run_benchmark: boolean;
|
|
35
|
+
recommended_next_actions: string[];
|
|
36
|
+
}>;
|
|
37
|
+
sourceFolders: Array<{
|
|
38
|
+
value: string;
|
|
39
|
+
label: string;
|
|
40
|
+
hint: string;
|
|
41
|
+
}>;
|
|
42
|
+
recentProposals: ActionProposalResource[];
|
|
43
|
+
}
|
|
44
|
+
export interface LocalServiceRunHandlers {
|
|
45
|
+
planActionProposal(request: ActionProposalCreateRequest, context: LocalServiceActionPlanningContext): Promise<ActionProposalPlan>;
|
|
46
|
+
createBuildRun(request: BuildRunCreateRequest, context: LocalServiceBuildRunContext): Promise<LocalRunHandlerResult>;
|
|
47
|
+
createVerifyRun(request: VerifyRunCreateRequest, context: LocalServiceVerifyRunContext): Promise<LocalRunHandlerResult>;
|
|
48
|
+
createBenchmarkQuestionDraft(request: BenchmarkQuestionDraftRuntimeRequest, context: LocalServiceJobRunContext): Promise<BenchmarkQuestionDraftResult>;
|
|
49
|
+
createBuildPlanAuthoringRun(request: BuildPlanAuthoringRuntimeRequest, context: LocalServiceJobRunContext): Promise<BuildPlanAuthoringResult>;
|
|
50
|
+
}
|
|
51
|
+
export interface LocalServiceRuntimeOptions {
|
|
52
|
+
rootPath: string;
|
|
53
|
+
host: string;
|
|
54
|
+
port: number;
|
|
55
|
+
packageVersion?: string;
|
|
56
|
+
ownerKind?: "desktop-app" | "headless";
|
|
57
|
+
ownerPid?: number;
|
|
58
|
+
startedAt?: string;
|
|
59
|
+
handlers?: Partial<LocalServiceRunHandlers>;
|
|
60
|
+
/**
|
|
61
|
+
* Per-instance bearer token. The server requires it on protected local
|
|
62
|
+
* API requests: mutating routes plus non-discovery `/v1` reads.
|
|
63
|
+
* Optional only because test code can opt into tokenless-dev mode.
|
|
64
|
+
*/
|
|
65
|
+
authToken?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Active account context for this engine. Populated at boot from
|
|
68
|
+
* `~/.interf/auth/session.json`. Null for pre-auth / loopback sessions.
|
|
69
|
+
* Entitlement guards treat null as Free tier.
|
|
70
|
+
*/
|
|
71
|
+
currentAccount?: import("./auth/account-context.js").CurrentAccount | null;
|
|
72
|
+
/**
|
|
73
|
+
* How the server authenticates mutating requests.
|
|
74
|
+
*
|
|
75
|
+
* `"hex"` (default) — per-instance hex bearer compared against `authToken`.
|
|
76
|
+
* The loopback engine uses this. The loopback bind + CORS allowlist are
|
|
77
|
+
* the real security boundary; the hex bearer is a belt-and-braces guard.
|
|
78
|
+
*
|
|
79
|
+
* `"jwt"` — `Authorization: Bearer <jwt>` validated against the WorkOS
|
|
80
|
+
* JWKS. Used by the cloud engine binding when it lands. Validated claims
|
|
81
|
+
* are attached to the request as `(req as any).interfAccount` so route
|
|
82
|
+
* handlers can stamp `account_id` without re-parsing.
|
|
83
|
+
*/
|
|
84
|
+
authMode?: "hex" | "jwt";
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Per-Project context tracked by the runtime. Multiple Projects can
|
|
88
|
+
* be registered against one running service; each one owns its rootPath and
|
|
89
|
+
* activity timestamps. Routes pass the project explicitly to every
|
|
90
|
+
* runtime operation that needs one, so there is no swap-state to manage.
|
|
91
|
+
*/
|
|
92
|
+
export interface ProjectContext {
|
|
93
|
+
rootPath: string;
|
|
94
|
+
startedAt: string;
|
|
95
|
+
lastActivity: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Tracking record for a Build run that the runtime can still cancel. The
|
|
99
|
+
* record is created when the background build starts and cleared when it
|
|
100
|
+
* reaches a terminal state. `cancelled` is set once a cancel request has
|
|
101
|
+
* been observed so the background loop can record the right terminal event
|
|
102
|
+
* (and so the persisted record is marked even when no executor child is
|
|
103
|
+
* running yet). `projectDataDir` lets the cancel path invalidate the right
|
|
104
|
+
* Project's caches without walking the registry.
|
|
105
|
+
*/
|
|
106
|
+
export interface ActiveBuildRunHandle {
|
|
107
|
+
projectDataDir: string;
|
|
108
|
+
contextGraphPath: string;
|
|
109
|
+
project: string;
|
|
110
|
+
cancelled: boolean;
|
|
111
|
+
cancelledAt?: string;
|
|
112
|
+
}
|
|
113
|
+
export declare class LocalServiceRuntime {
|
|
114
|
+
readonly host: string;
|
|
115
|
+
port: number;
|
|
116
|
+
readonly startedAt: string;
|
|
117
|
+
readonly packageVersion?: string;
|
|
118
|
+
readonly ownerKind: "desktop-app" | "headless";
|
|
119
|
+
readonly ownerPid?: number;
|
|
120
|
+
readonly handlers: Partial<LocalServiceRunHandlers>;
|
|
121
|
+
/**
|
|
122
|
+
* The seed root path the runtime was constructed with. Used as a
|
|
123
|
+
* non-Project fallback when a Project-independent route
|
|
124
|
+
* (Build Plans, action proposals, runs listings) needs an anchor to load
|
|
125
|
+
* shared state (user-library Build Plans, bundled Build Plans, etc).
|
|
126
|
+
*/
|
|
127
|
+
readonly rootPath: string;
|
|
128
|
+
/**
|
|
129
|
+
* Per-instance bearer token. Protected routes require this on the
|
|
130
|
+
* Authorization header. `null` means tokenless-dev mode (test harness).
|
|
131
|
+
*/
|
|
132
|
+
readonly authToken: string | null;
|
|
133
|
+
/**
|
|
134
|
+
* Auth dispatch mode. See {@link LocalServiceRuntimeOptions.authMode}.
|
|
135
|
+
* Default is `"hex"` so loopback engines and existing tests are unaffected.
|
|
136
|
+
*/
|
|
137
|
+
readonly authMode: "hex" | "jwt";
|
|
138
|
+
/**
|
|
139
|
+
* Active account / signed-in user for this engine instance. Populated at
|
|
140
|
+
* boot from `~/.interf/auth/session.json`. `null` for pre-auth /
|
|
141
|
+
* anonymous sessions; entitlement guards treat null as Free tier.
|
|
142
|
+
*/
|
|
143
|
+
currentAccount: import("./auth/account-context.js").CurrentAccount | null;
|
|
144
|
+
/** Map of projectDataDir -> ProjectContext. */
|
|
145
|
+
private projectContexts;
|
|
146
|
+
/** Hook called whenever a Project is registered or deregistered. */
|
|
147
|
+
private onRegistryChanged;
|
|
148
|
+
/** In-flight runs across all projects. Used for `idle_for_seconds`. */
|
|
149
|
+
private activeRunCount;
|
|
150
|
+
/**
|
|
151
|
+
* Active Build run cancellation handles, keyed by run id. Populated
|
|
152
|
+
* when a Build run is launched and cleared once the run reaches a
|
|
153
|
+
* terminal state. Each entry remembers where the persisted record lives
|
|
154
|
+
* so cancel can mark it without re-resolving the Project.
|
|
155
|
+
*/
|
|
156
|
+
activeBuildRuns: Map<string, ActiveBuildRunHandle>;
|
|
157
|
+
/**
|
|
158
|
+
* Active local job runs, keyed by run id. Build Plan drafting,
|
|
159
|
+
* Build Plan improvement, and benchmark-question drafting all persist
|
|
160
|
+
* through the local-job store; recovery must not mark these as
|
|
161
|
+
* interrupted while this runtime is still executing them.
|
|
162
|
+
*/
|
|
163
|
+
activeJobRuns: Set<string>;
|
|
164
|
+
/**
|
|
165
|
+
* Idempotency-key cache for `POST .../build-runs`. Outer key is the
|
|
166
|
+
* resolved project root; inner key is the client-supplied idempotency
|
|
167
|
+
* value. Namespacing per project prevents key collisions across
|
|
168
|
+
* tenants on the same engine (CSO finding: a malicious project could
|
|
169
|
+
* otherwise hijack another project's run id by reusing its key).
|
|
170
|
+
* Entries expire after the idempotency TTL defined in `runtime-build-runs.ts`.
|
|
171
|
+
*/
|
|
172
|
+
idempotencyKeyCache: Map<string, Map<string, {
|
|
173
|
+
runId: string;
|
|
174
|
+
expiresAt: number;
|
|
175
|
+
}>>;
|
|
176
|
+
/**
|
|
177
|
+
* Read-side caches. Polling clients (Interf Desktop renderer, CLI status loops)
|
|
178
|
+
* hit list/get endpoints multiple times per second; without these,
|
|
179
|
+
* every request re-walks the filesystem and re-parses every JSON
|
|
180
|
+
* record through Zod. The runtime invalidates each cache on the
|
|
181
|
+
* matching write path. See {@link runtime-caches} for design notes.
|
|
182
|
+
*/
|
|
183
|
+
readonly buildRunCache: RunListingCache<{
|
|
184
|
+
kind: "interf-build-run";
|
|
185
|
+
version: 1;
|
|
186
|
+
run_id: string;
|
|
187
|
+
status: "running" | "failed" | "cancelled" | "queued" | "succeeded";
|
|
188
|
+
project: string;
|
|
189
|
+
build_plan: string;
|
|
190
|
+
backend: "native";
|
|
191
|
+
source_path: string;
|
|
192
|
+
context_graph_path: string;
|
|
193
|
+
created_at: string;
|
|
194
|
+
stages: {
|
|
195
|
+
run_id: string;
|
|
196
|
+
stage_id: string;
|
|
197
|
+
status: "running" | "failed" | "queued" | "succeeded";
|
|
198
|
+
artifacts: {
|
|
199
|
+
path: string;
|
|
200
|
+
role: "runtime" | "output" | "source" | "evidence" | "benchmark";
|
|
201
|
+
stage_id?: string | null | undefined;
|
|
202
|
+
label?: string | undefined;
|
|
203
|
+
sha256?: string | undefined;
|
|
204
|
+
}[];
|
|
205
|
+
stage_label?: string | undefined;
|
|
206
|
+
stage_index?: number | undefined;
|
|
207
|
+
stage_total?: number | undefined;
|
|
208
|
+
started_at?: string | null | undefined;
|
|
209
|
+
finished_at?: string | null | undefined;
|
|
210
|
+
summary?: string | null | undefined;
|
|
211
|
+
contract?: {
|
|
212
|
+
reads: string[];
|
|
213
|
+
writes: string[];
|
|
214
|
+
stage_label?: string | undefined;
|
|
215
|
+
stage_index?: number | undefined;
|
|
216
|
+
stage_total?: number | undefined;
|
|
217
|
+
} | undefined;
|
|
218
|
+
executor?: {
|
|
219
|
+
kind: "local-agent" | "connected-provider" | "managed";
|
|
220
|
+
name: string;
|
|
221
|
+
display_name: string;
|
|
222
|
+
command: string | null;
|
|
223
|
+
model?: string | null | undefined;
|
|
224
|
+
effort?: string | null | undefined;
|
|
225
|
+
profile?: string | null | undefined;
|
|
226
|
+
timeout_ms?: number | null | undefined;
|
|
227
|
+
} | null | undefined;
|
|
228
|
+
logs?: {
|
|
229
|
+
prompt_path?: string | undefined;
|
|
230
|
+
event_stream_path?: string | undefined;
|
|
231
|
+
status_path?: string | undefined;
|
|
232
|
+
contract_path?: string | undefined;
|
|
233
|
+
evidence_path?: string | undefined;
|
|
234
|
+
} | undefined;
|
|
235
|
+
latest_evidence?: {
|
|
236
|
+
id: string;
|
|
237
|
+
run_id: string;
|
|
238
|
+
generated_at: string;
|
|
239
|
+
summary: string;
|
|
240
|
+
artifacts: {
|
|
241
|
+
path: string;
|
|
242
|
+
role: "runtime" | "output" | "source" | "evidence" | "benchmark";
|
|
243
|
+
stage_id?: string | null | undefined;
|
|
244
|
+
label?: string | undefined;
|
|
245
|
+
sha256?: string | undefined;
|
|
246
|
+
}[];
|
|
247
|
+
checks: {
|
|
248
|
+
id: string;
|
|
249
|
+
label: string;
|
|
250
|
+
ok: boolean;
|
|
251
|
+
detail?: string | undefined;
|
|
252
|
+
}[];
|
|
253
|
+
stage_id?: string | null | undefined;
|
|
254
|
+
files_processed?: number | undefined;
|
|
255
|
+
} | null | undefined;
|
|
256
|
+
failure?: string | null | undefined;
|
|
257
|
+
}[];
|
|
258
|
+
events: ({
|
|
259
|
+
event_id: string;
|
|
260
|
+
run_id: string;
|
|
261
|
+
timestamp: string;
|
|
262
|
+
type: "run.started";
|
|
263
|
+
project: string;
|
|
264
|
+
backend: "native";
|
|
265
|
+
build_plan?: string | undefined;
|
|
266
|
+
context_graph_path?: string | undefined;
|
|
267
|
+
} | {
|
|
268
|
+
event_id: string;
|
|
269
|
+
run_id: string;
|
|
270
|
+
timestamp: string;
|
|
271
|
+
type: "stage.started";
|
|
272
|
+
stage_id: string;
|
|
273
|
+
stage_index?: number | undefined;
|
|
274
|
+
stage_total?: number | undefined;
|
|
275
|
+
logs?: {
|
|
276
|
+
prompt_path?: string | undefined;
|
|
277
|
+
event_stream_path?: string | undefined;
|
|
278
|
+
status_path?: string | undefined;
|
|
279
|
+
contract_path?: string | undefined;
|
|
280
|
+
evidence_path?: string | undefined;
|
|
281
|
+
} | undefined;
|
|
282
|
+
} | {
|
|
283
|
+
event_id: string;
|
|
284
|
+
run_id: string;
|
|
285
|
+
timestamp: string;
|
|
286
|
+
type: "file.processed";
|
|
287
|
+
stage_id: string;
|
|
288
|
+
path: string;
|
|
289
|
+
} | {
|
|
290
|
+
event_id: string;
|
|
291
|
+
run_id: string;
|
|
292
|
+
timestamp: string;
|
|
293
|
+
type: "artifact.written";
|
|
294
|
+
stage_id: string;
|
|
295
|
+
artifact: {
|
|
296
|
+
path: string;
|
|
297
|
+
role: "runtime" | "output" | "source" | "evidence" | "benchmark";
|
|
298
|
+
stage_id?: string | null | undefined;
|
|
299
|
+
label?: string | undefined;
|
|
300
|
+
sha256?: string | undefined;
|
|
301
|
+
};
|
|
302
|
+
} | {
|
|
303
|
+
event_id: string;
|
|
304
|
+
run_id: string;
|
|
305
|
+
timestamp: string;
|
|
306
|
+
type: "evidence.updated";
|
|
307
|
+
evidence: {
|
|
308
|
+
id: string;
|
|
309
|
+
run_id: string;
|
|
310
|
+
generated_at: string;
|
|
311
|
+
summary: string;
|
|
312
|
+
artifacts: {
|
|
313
|
+
path: string;
|
|
314
|
+
role: "runtime" | "output" | "source" | "evidence" | "benchmark";
|
|
315
|
+
stage_id?: string | null | undefined;
|
|
316
|
+
label?: string | undefined;
|
|
317
|
+
sha256?: string | undefined;
|
|
318
|
+
}[];
|
|
319
|
+
checks: {
|
|
320
|
+
id: string;
|
|
321
|
+
label: string;
|
|
322
|
+
ok: boolean;
|
|
323
|
+
detail?: string | undefined;
|
|
324
|
+
}[];
|
|
325
|
+
stage_id?: string | null | undefined;
|
|
326
|
+
files_processed?: number | undefined;
|
|
327
|
+
};
|
|
328
|
+
stage_id?: string | null | undefined;
|
|
329
|
+
} | {
|
|
330
|
+
event_id: string;
|
|
331
|
+
run_id: string;
|
|
332
|
+
timestamp: string;
|
|
333
|
+
type: "log.appended";
|
|
334
|
+
stream: "status" | "trace" | "system";
|
|
335
|
+
message: string;
|
|
336
|
+
stage_id?: string | null | undefined;
|
|
337
|
+
} | {
|
|
338
|
+
event_id: string;
|
|
339
|
+
run_id: string;
|
|
340
|
+
timestamp: string;
|
|
341
|
+
type: "stage.passed";
|
|
342
|
+
stage_id: string;
|
|
343
|
+
summary?: string | undefined;
|
|
344
|
+
} | {
|
|
345
|
+
event_id: string;
|
|
346
|
+
run_id: string;
|
|
347
|
+
timestamp: string;
|
|
348
|
+
type: "stage.failed";
|
|
349
|
+
stage_id: string;
|
|
350
|
+
error: string;
|
|
351
|
+
} | {
|
|
352
|
+
event_id: string;
|
|
353
|
+
run_id: string;
|
|
354
|
+
timestamp: string;
|
|
355
|
+
type: "run.completed";
|
|
356
|
+
summary?: string | undefined;
|
|
357
|
+
} | {
|
|
358
|
+
event_id: string;
|
|
359
|
+
run_id: string;
|
|
360
|
+
timestamp: string;
|
|
361
|
+
type: "run.failed";
|
|
362
|
+
error: string;
|
|
363
|
+
} | {
|
|
364
|
+
event_id: string;
|
|
365
|
+
run_id: string;
|
|
366
|
+
timestamp: string;
|
|
367
|
+
type: "run.cancelled";
|
|
368
|
+
reason?: string | undefined;
|
|
369
|
+
} | {
|
|
370
|
+
event_id: string;
|
|
371
|
+
run_id: string;
|
|
372
|
+
timestamp: string;
|
|
373
|
+
type: "checks.evaluated";
|
|
374
|
+
passed: number;
|
|
375
|
+
total: number;
|
|
376
|
+
target?: "source-files" | "context-graph" | undefined;
|
|
377
|
+
checks_fingerprint?: string | undefined;
|
|
378
|
+
stale?: boolean | undefined;
|
|
379
|
+
test_run_id?: string | undefined;
|
|
380
|
+
} | {
|
|
381
|
+
event_id: string;
|
|
382
|
+
run_id: string;
|
|
383
|
+
timestamp: string;
|
|
384
|
+
type: "readiness.updated";
|
|
385
|
+
project: string;
|
|
386
|
+
readiness: {
|
|
387
|
+
kind: "interf-readiness-state";
|
|
388
|
+
version: 1;
|
|
389
|
+
generated_at: string;
|
|
390
|
+
project: string;
|
|
391
|
+
status: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale";
|
|
392
|
+
ready: boolean;
|
|
393
|
+
summary: string;
|
|
394
|
+
context_graph_path: string | null;
|
|
395
|
+
build: {
|
|
396
|
+
gate: "context-graph" | "project-config" | "build-run" | "artifact-diagnostics" | "context-checks" | "benchmarks" | "benchmarks-current";
|
|
397
|
+
ok: boolean;
|
|
398
|
+
summary: string;
|
|
399
|
+
status?: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale" | undefined;
|
|
400
|
+
detail?: string | undefined;
|
|
401
|
+
run_id?: string | null | undefined;
|
|
402
|
+
artifact_path?: string | null | undefined;
|
|
403
|
+
} | null;
|
|
404
|
+
check_results: {
|
|
405
|
+
configured: number;
|
|
406
|
+
fingerprint: string | null;
|
|
407
|
+
source_files: {
|
|
408
|
+
passed: number;
|
|
409
|
+
total: number;
|
|
410
|
+
pass_rate: number | null;
|
|
411
|
+
stale: boolean;
|
|
412
|
+
checks_fingerprint?: string | null | undefined;
|
|
413
|
+
run_id?: string | null | undefined;
|
|
414
|
+
run_path?: string | null | undefined;
|
|
415
|
+
} | null;
|
|
416
|
+
context_graph: {
|
|
417
|
+
passed: number;
|
|
418
|
+
total: number;
|
|
419
|
+
pass_rate: number | null;
|
|
420
|
+
stale: boolean;
|
|
421
|
+
checks_fingerprint?: string | null | undefined;
|
|
422
|
+
run_id?: string | null | undefined;
|
|
423
|
+
run_path?: string | null | undefined;
|
|
424
|
+
} | null;
|
|
425
|
+
};
|
|
426
|
+
checks: {
|
|
427
|
+
gate: "context-graph" | "project-config" | "build-run" | "artifact-diagnostics" | "context-checks" | "benchmarks" | "benchmarks-current";
|
|
428
|
+
ok: boolean;
|
|
429
|
+
summary: string;
|
|
430
|
+
status?: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale" | undefined;
|
|
431
|
+
detail?: string | undefined;
|
|
432
|
+
run_id?: string | null | undefined;
|
|
433
|
+
artifact_path?: string | null | undefined;
|
|
434
|
+
}[];
|
|
435
|
+
latest_build_run_id?: string | null | undefined;
|
|
436
|
+
latest_benchmark_run_id?: string | null | undefined;
|
|
437
|
+
};
|
|
438
|
+
})[];
|
|
439
|
+
context_checks: {
|
|
440
|
+
id: string;
|
|
441
|
+
label: string;
|
|
442
|
+
backed_by_artifact_ids: string[];
|
|
443
|
+
required: boolean;
|
|
444
|
+
description?: string | undefined;
|
|
445
|
+
evidence_expectation?: string | undefined;
|
|
446
|
+
status?: "passed" | "pending" | "running" | "failed" | "skipped" | undefined;
|
|
447
|
+
evidence?: string | undefined;
|
|
448
|
+
issue?: string | undefined;
|
|
449
|
+
}[];
|
|
450
|
+
artifacts: {
|
|
451
|
+
artifact_id: string;
|
|
452
|
+
status: "failed" | "skipped" | "ready" | "not_ready";
|
|
453
|
+
built_by_stages: string[];
|
|
454
|
+
check_results: {
|
|
455
|
+
check_id: string;
|
|
456
|
+
kind: "file_exists" | "source_manifest_valid" | "min_file_count" | "min_file_count_matches_source" | "source_summary_folders" | "source_page_coverage" | "frontmatter_valid" | "frontmatter_required_keys" | "frontmatter_nonempty_keys" | "source_refs_required" | "wikilinks_valid" | "must_not_contain" | "must_contain" | "qa_match";
|
|
457
|
+
passed: boolean;
|
|
458
|
+
required: boolean;
|
|
459
|
+
summary: string;
|
|
460
|
+
evaluated_at: string;
|
|
461
|
+
details?: Record<string, unknown> | undefined;
|
|
462
|
+
}[];
|
|
463
|
+
summary?: string | undefined;
|
|
464
|
+
}[];
|
|
465
|
+
started_at?: string | null | undefined;
|
|
466
|
+
finished_at?: string | null | undefined;
|
|
467
|
+
latest_evidence?: {
|
|
468
|
+
id: string;
|
|
469
|
+
run_id: string;
|
|
470
|
+
generated_at: string;
|
|
471
|
+
summary: string;
|
|
472
|
+
artifacts: {
|
|
473
|
+
path: string;
|
|
474
|
+
role: "runtime" | "output" | "source" | "evidence" | "benchmark";
|
|
475
|
+
stage_id?: string | null | undefined;
|
|
476
|
+
label?: string | undefined;
|
|
477
|
+
sha256?: string | undefined;
|
|
478
|
+
}[];
|
|
479
|
+
checks: {
|
|
480
|
+
id: string;
|
|
481
|
+
label: string;
|
|
482
|
+
ok: boolean;
|
|
483
|
+
detail?: string | undefined;
|
|
484
|
+
}[];
|
|
485
|
+
stage_id?: string | null | undefined;
|
|
486
|
+
files_processed?: number | undefined;
|
|
487
|
+
} | null | undefined;
|
|
488
|
+
readiness?: {
|
|
489
|
+
kind: "interf-readiness-state";
|
|
490
|
+
version: 1;
|
|
491
|
+
generated_at: string;
|
|
492
|
+
project: string;
|
|
493
|
+
status: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale";
|
|
494
|
+
ready: boolean;
|
|
495
|
+
summary: string;
|
|
496
|
+
context_graph_path: string | null;
|
|
497
|
+
build: {
|
|
498
|
+
gate: "context-graph" | "project-config" | "build-run" | "artifact-diagnostics" | "context-checks" | "benchmarks" | "benchmarks-current";
|
|
499
|
+
ok: boolean;
|
|
500
|
+
summary: string;
|
|
501
|
+
status?: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale" | undefined;
|
|
502
|
+
detail?: string | undefined;
|
|
503
|
+
run_id?: string | null | undefined;
|
|
504
|
+
artifact_path?: string | null | undefined;
|
|
505
|
+
} | null;
|
|
506
|
+
check_results: {
|
|
507
|
+
configured: number;
|
|
508
|
+
fingerprint: string | null;
|
|
509
|
+
source_files: {
|
|
510
|
+
passed: number;
|
|
511
|
+
total: number;
|
|
512
|
+
pass_rate: number | null;
|
|
513
|
+
stale: boolean;
|
|
514
|
+
checks_fingerprint?: string | null | undefined;
|
|
515
|
+
run_id?: string | null | undefined;
|
|
516
|
+
run_path?: string | null | undefined;
|
|
517
|
+
} | null;
|
|
518
|
+
context_graph: {
|
|
519
|
+
passed: number;
|
|
520
|
+
total: number;
|
|
521
|
+
pass_rate: number | null;
|
|
522
|
+
stale: boolean;
|
|
523
|
+
checks_fingerprint?: string | null | undefined;
|
|
524
|
+
run_id?: string | null | undefined;
|
|
525
|
+
run_path?: string | null | undefined;
|
|
526
|
+
} | null;
|
|
527
|
+
};
|
|
528
|
+
checks: {
|
|
529
|
+
gate: "context-graph" | "project-config" | "build-run" | "artifact-diagnostics" | "context-checks" | "benchmarks" | "benchmarks-current";
|
|
530
|
+
ok: boolean;
|
|
531
|
+
summary: string;
|
|
532
|
+
status?: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale" | undefined;
|
|
533
|
+
detail?: string | undefined;
|
|
534
|
+
run_id?: string | null | undefined;
|
|
535
|
+
artifact_path?: string | null | undefined;
|
|
536
|
+
}[];
|
|
537
|
+
latest_build_run_id?: string | null | undefined;
|
|
538
|
+
latest_benchmark_run_id?: string | null | undefined;
|
|
539
|
+
} | null | undefined;
|
|
540
|
+
}>;
|
|
541
|
+
readonly verifyRunCache: RunListingCache<{
|
|
542
|
+
run_id: string;
|
|
543
|
+
status: "running" | "failed" | "cancelled" | "queued" | "succeeded";
|
|
544
|
+
project: string;
|
|
545
|
+
source_path: string;
|
|
546
|
+
context_graph_path: string | null;
|
|
547
|
+
benchmark_run: {
|
|
548
|
+
kind: "interf-benchmark-run";
|
|
549
|
+
version: 1;
|
|
550
|
+
generated_at: string;
|
|
551
|
+
mode: "source-files" | "context-graph" | "both";
|
|
552
|
+
source_path: string;
|
|
553
|
+
project: {
|
|
554
|
+
name: string;
|
|
555
|
+
context_graph_path: string | null;
|
|
556
|
+
};
|
|
557
|
+
source_files: {
|
|
558
|
+
label: string;
|
|
559
|
+
run_path: string;
|
|
560
|
+
ok: boolean;
|
|
561
|
+
passed_cases: number;
|
|
562
|
+
total_cases: number;
|
|
563
|
+
passed_checks: number;
|
|
564
|
+
total_checks: number;
|
|
565
|
+
source_usage: "unknown" | "source-baseline" | "graph-only" | "graph-source-verified";
|
|
566
|
+
target: {
|
|
567
|
+
type: "source-files" | "context-graph";
|
|
568
|
+
name: string;
|
|
569
|
+
path: string;
|
|
570
|
+
build_plan: string;
|
|
571
|
+
};
|
|
572
|
+
executor?: {
|
|
573
|
+
kind: "local-agent" | "connected-provider" | "managed";
|
|
574
|
+
name: string;
|
|
575
|
+
display_name: string;
|
|
576
|
+
command: string | null;
|
|
577
|
+
model?: string | null | undefined;
|
|
578
|
+
effort?: string | null | undefined;
|
|
579
|
+
profile?: string | null | undefined;
|
|
580
|
+
timeout_ms?: number | null | undefined;
|
|
581
|
+
} | null | undefined;
|
|
582
|
+
} | null;
|
|
583
|
+
context_graph: {
|
|
584
|
+
label: string;
|
|
585
|
+
run_path: string;
|
|
586
|
+
ok: boolean;
|
|
587
|
+
passed_cases: number;
|
|
588
|
+
total_cases: number;
|
|
589
|
+
passed_checks: number;
|
|
590
|
+
total_checks: number;
|
|
591
|
+
source_usage: "unknown" | "source-baseline" | "graph-only" | "graph-source-verified";
|
|
592
|
+
target: {
|
|
593
|
+
type: "source-files" | "context-graph";
|
|
594
|
+
name: string;
|
|
595
|
+
path: string;
|
|
596
|
+
build_plan: string;
|
|
597
|
+
};
|
|
598
|
+
executor?: {
|
|
599
|
+
kind: "local-agent" | "connected-provider" | "managed";
|
|
600
|
+
name: string;
|
|
601
|
+
display_name: string;
|
|
602
|
+
command: string | null;
|
|
603
|
+
model?: string | null | undefined;
|
|
604
|
+
effort?: string | null | undefined;
|
|
605
|
+
profile?: string | null | undefined;
|
|
606
|
+
timeout_ms?: number | null | undefined;
|
|
607
|
+
} | null | undefined;
|
|
608
|
+
} | null;
|
|
609
|
+
summary: {
|
|
610
|
+
source_files_pass_rate: number | null;
|
|
611
|
+
context_graph_pass_rate: number | null;
|
|
612
|
+
};
|
|
613
|
+
checks_fingerprint?: string | undefined;
|
|
614
|
+
} | null;
|
|
615
|
+
events: ({
|
|
616
|
+
event_id: string;
|
|
617
|
+
run_id: string;
|
|
618
|
+
timestamp: string;
|
|
619
|
+
type: "run.started";
|
|
620
|
+
project: string;
|
|
621
|
+
backend: "native";
|
|
622
|
+
build_plan?: string | undefined;
|
|
623
|
+
context_graph_path?: string | undefined;
|
|
624
|
+
} | {
|
|
625
|
+
event_id: string;
|
|
626
|
+
run_id: string;
|
|
627
|
+
timestamp: string;
|
|
628
|
+
type: "stage.started";
|
|
629
|
+
stage_id: string;
|
|
630
|
+
stage_index?: number | undefined;
|
|
631
|
+
stage_total?: number | undefined;
|
|
632
|
+
logs?: {
|
|
633
|
+
prompt_path?: string | undefined;
|
|
634
|
+
event_stream_path?: string | undefined;
|
|
635
|
+
status_path?: string | undefined;
|
|
636
|
+
contract_path?: string | undefined;
|
|
637
|
+
evidence_path?: string | undefined;
|
|
638
|
+
} | undefined;
|
|
639
|
+
} | {
|
|
640
|
+
event_id: string;
|
|
641
|
+
run_id: string;
|
|
642
|
+
timestamp: string;
|
|
643
|
+
type: "file.processed";
|
|
644
|
+
stage_id: string;
|
|
645
|
+
path: string;
|
|
646
|
+
} | {
|
|
647
|
+
event_id: string;
|
|
648
|
+
run_id: string;
|
|
649
|
+
timestamp: string;
|
|
650
|
+
type: "artifact.written";
|
|
651
|
+
stage_id: string;
|
|
652
|
+
artifact: {
|
|
653
|
+
path: string;
|
|
654
|
+
role: "runtime" | "output" | "source" | "evidence" | "benchmark";
|
|
655
|
+
stage_id?: string | null | undefined;
|
|
656
|
+
label?: string | undefined;
|
|
657
|
+
sha256?: string | undefined;
|
|
658
|
+
};
|
|
659
|
+
} | {
|
|
660
|
+
event_id: string;
|
|
661
|
+
run_id: string;
|
|
662
|
+
timestamp: string;
|
|
663
|
+
type: "evidence.updated";
|
|
664
|
+
evidence: {
|
|
665
|
+
id: string;
|
|
666
|
+
run_id: string;
|
|
667
|
+
generated_at: string;
|
|
668
|
+
summary: string;
|
|
669
|
+
artifacts: {
|
|
670
|
+
path: string;
|
|
671
|
+
role: "runtime" | "output" | "source" | "evidence" | "benchmark";
|
|
672
|
+
stage_id?: string | null | undefined;
|
|
673
|
+
label?: string | undefined;
|
|
674
|
+
sha256?: string | undefined;
|
|
675
|
+
}[];
|
|
676
|
+
checks: {
|
|
677
|
+
id: string;
|
|
678
|
+
label: string;
|
|
679
|
+
ok: boolean;
|
|
680
|
+
detail?: string | undefined;
|
|
681
|
+
}[];
|
|
682
|
+
stage_id?: string | null | undefined;
|
|
683
|
+
files_processed?: number | undefined;
|
|
684
|
+
};
|
|
685
|
+
stage_id?: string | null | undefined;
|
|
686
|
+
} | {
|
|
687
|
+
event_id: string;
|
|
688
|
+
run_id: string;
|
|
689
|
+
timestamp: string;
|
|
690
|
+
type: "log.appended";
|
|
691
|
+
stream: "status" | "trace" | "system";
|
|
692
|
+
message: string;
|
|
693
|
+
stage_id?: string | null | undefined;
|
|
694
|
+
} | {
|
|
695
|
+
event_id: string;
|
|
696
|
+
run_id: string;
|
|
697
|
+
timestamp: string;
|
|
698
|
+
type: "stage.passed";
|
|
699
|
+
stage_id: string;
|
|
700
|
+
summary?: string | undefined;
|
|
701
|
+
} | {
|
|
702
|
+
event_id: string;
|
|
703
|
+
run_id: string;
|
|
704
|
+
timestamp: string;
|
|
705
|
+
type: "stage.failed";
|
|
706
|
+
stage_id: string;
|
|
707
|
+
error: string;
|
|
708
|
+
} | {
|
|
709
|
+
event_id: string;
|
|
710
|
+
run_id: string;
|
|
711
|
+
timestamp: string;
|
|
712
|
+
type: "run.completed";
|
|
713
|
+
summary?: string | undefined;
|
|
714
|
+
} | {
|
|
715
|
+
event_id: string;
|
|
716
|
+
run_id: string;
|
|
717
|
+
timestamp: string;
|
|
718
|
+
type: "run.failed";
|
|
719
|
+
error: string;
|
|
720
|
+
} | {
|
|
721
|
+
event_id: string;
|
|
722
|
+
run_id: string;
|
|
723
|
+
timestamp: string;
|
|
724
|
+
type: "run.cancelled";
|
|
725
|
+
reason?: string | undefined;
|
|
726
|
+
} | {
|
|
727
|
+
event_id: string;
|
|
728
|
+
run_id: string;
|
|
729
|
+
timestamp: string;
|
|
730
|
+
type: "checks.evaluated";
|
|
731
|
+
passed: number;
|
|
732
|
+
total: number;
|
|
733
|
+
target?: "source-files" | "context-graph" | undefined;
|
|
734
|
+
checks_fingerprint?: string | undefined;
|
|
735
|
+
stale?: boolean | undefined;
|
|
736
|
+
test_run_id?: string | undefined;
|
|
737
|
+
} | {
|
|
738
|
+
event_id: string;
|
|
739
|
+
run_id: string;
|
|
740
|
+
timestamp: string;
|
|
741
|
+
type: "readiness.updated";
|
|
742
|
+
project: string;
|
|
743
|
+
readiness: {
|
|
744
|
+
kind: "interf-readiness-state";
|
|
745
|
+
version: 1;
|
|
746
|
+
generated_at: string;
|
|
747
|
+
project: string;
|
|
748
|
+
status: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale";
|
|
749
|
+
ready: boolean;
|
|
750
|
+
summary: string;
|
|
751
|
+
context_graph_path: string | null;
|
|
752
|
+
build: {
|
|
753
|
+
gate: "context-graph" | "project-config" | "build-run" | "artifact-diagnostics" | "context-checks" | "benchmarks" | "benchmarks-current";
|
|
754
|
+
ok: boolean;
|
|
755
|
+
summary: string;
|
|
756
|
+
status?: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale" | undefined;
|
|
757
|
+
detail?: string | undefined;
|
|
758
|
+
run_id?: string | null | undefined;
|
|
759
|
+
artifact_path?: string | null | undefined;
|
|
760
|
+
} | null;
|
|
761
|
+
check_results: {
|
|
762
|
+
configured: number;
|
|
763
|
+
fingerprint: string | null;
|
|
764
|
+
source_files: {
|
|
765
|
+
passed: number;
|
|
766
|
+
total: number;
|
|
767
|
+
pass_rate: number | null;
|
|
768
|
+
stale: boolean;
|
|
769
|
+
checks_fingerprint?: string | null | undefined;
|
|
770
|
+
run_id?: string | null | undefined;
|
|
771
|
+
run_path?: string | null | undefined;
|
|
772
|
+
} | null;
|
|
773
|
+
context_graph: {
|
|
774
|
+
passed: number;
|
|
775
|
+
total: number;
|
|
776
|
+
pass_rate: number | null;
|
|
777
|
+
stale: boolean;
|
|
778
|
+
checks_fingerprint?: string | null | undefined;
|
|
779
|
+
run_id?: string | null | undefined;
|
|
780
|
+
run_path?: string | null | undefined;
|
|
781
|
+
} | null;
|
|
782
|
+
};
|
|
783
|
+
checks: {
|
|
784
|
+
gate: "context-graph" | "project-config" | "build-run" | "artifact-diagnostics" | "context-checks" | "benchmarks" | "benchmarks-current";
|
|
785
|
+
ok: boolean;
|
|
786
|
+
summary: string;
|
|
787
|
+
status?: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale" | undefined;
|
|
788
|
+
detail?: string | undefined;
|
|
789
|
+
run_id?: string | null | undefined;
|
|
790
|
+
artifact_path?: string | null | undefined;
|
|
791
|
+
}[];
|
|
792
|
+
latest_build_run_id?: string | null | undefined;
|
|
793
|
+
latest_benchmark_run_id?: string | null | undefined;
|
|
794
|
+
};
|
|
795
|
+
})[];
|
|
796
|
+
target?: "source-files" | "context-graph" | "both" | undefined;
|
|
797
|
+
started_at?: string | null | undefined;
|
|
798
|
+
finished_at?: string | null | undefined;
|
|
799
|
+
executor?: {
|
|
800
|
+
kind: "local-agent" | "connected-provider" | "managed";
|
|
801
|
+
name: string;
|
|
802
|
+
display_name: string;
|
|
803
|
+
command: string | null;
|
|
804
|
+
model?: string | null | undefined;
|
|
805
|
+
effort?: string | null | undefined;
|
|
806
|
+
profile?: string | null | undefined;
|
|
807
|
+
timeout_ms?: number | null | undefined;
|
|
808
|
+
} | null | undefined;
|
|
809
|
+
agent_label?: string | null | undefined;
|
|
810
|
+
parent_run_id?: string | null | undefined;
|
|
811
|
+
batch?: {
|
|
812
|
+
child_run_ids: string[];
|
|
813
|
+
total_agents: number;
|
|
814
|
+
completed_agents: number;
|
|
815
|
+
succeeded_agents: number;
|
|
816
|
+
failed_agents: number;
|
|
817
|
+
} | null | undefined;
|
|
818
|
+
readiness?: {
|
|
819
|
+
kind: "interf-readiness-state";
|
|
820
|
+
version: 1;
|
|
821
|
+
generated_at: string;
|
|
822
|
+
project: string;
|
|
823
|
+
status: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale";
|
|
824
|
+
ready: boolean;
|
|
825
|
+
summary: string;
|
|
826
|
+
context_graph_path: string | null;
|
|
827
|
+
build: {
|
|
828
|
+
gate: "context-graph" | "project-config" | "build-run" | "artifact-diagnostics" | "context-checks" | "benchmarks" | "benchmarks-current";
|
|
829
|
+
ok: boolean;
|
|
830
|
+
summary: string;
|
|
831
|
+
status?: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale" | undefined;
|
|
832
|
+
detail?: string | undefined;
|
|
833
|
+
run_id?: string | null | undefined;
|
|
834
|
+
artifact_path?: string | null | undefined;
|
|
835
|
+
} | null;
|
|
836
|
+
check_results: {
|
|
837
|
+
configured: number;
|
|
838
|
+
fingerprint: string | null;
|
|
839
|
+
source_files: {
|
|
840
|
+
passed: number;
|
|
841
|
+
total: number;
|
|
842
|
+
pass_rate: number | null;
|
|
843
|
+
stale: boolean;
|
|
844
|
+
checks_fingerprint?: string | null | undefined;
|
|
845
|
+
run_id?: string | null | undefined;
|
|
846
|
+
run_path?: string | null | undefined;
|
|
847
|
+
} | null;
|
|
848
|
+
context_graph: {
|
|
849
|
+
passed: number;
|
|
850
|
+
total: number;
|
|
851
|
+
pass_rate: number | null;
|
|
852
|
+
stale: boolean;
|
|
853
|
+
checks_fingerprint?: string | null | undefined;
|
|
854
|
+
run_id?: string | null | undefined;
|
|
855
|
+
run_path?: string | null | undefined;
|
|
856
|
+
} | null;
|
|
857
|
+
};
|
|
858
|
+
checks: {
|
|
859
|
+
gate: "context-graph" | "project-config" | "build-run" | "artifact-diagnostics" | "context-checks" | "benchmarks" | "benchmarks-current";
|
|
860
|
+
ok: boolean;
|
|
861
|
+
summary: string;
|
|
862
|
+
status?: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale" | undefined;
|
|
863
|
+
detail?: string | undefined;
|
|
864
|
+
run_id?: string | null | undefined;
|
|
865
|
+
artifact_path?: string | null | undefined;
|
|
866
|
+
}[];
|
|
867
|
+
latest_build_run_id?: string | null | undefined;
|
|
868
|
+
latest_benchmark_run_id?: string | null | undefined;
|
|
869
|
+
} | null | undefined;
|
|
870
|
+
error?: string | null | undefined;
|
|
871
|
+
}>;
|
|
872
|
+
readonly readinessCache: ReadinessCache<{
|
|
873
|
+
kind: "interf-readiness-state";
|
|
874
|
+
version: 1;
|
|
875
|
+
generated_at: string;
|
|
876
|
+
project: string;
|
|
877
|
+
status: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale";
|
|
878
|
+
ready: boolean;
|
|
879
|
+
summary: string;
|
|
880
|
+
context_graph_path: string | null;
|
|
881
|
+
build: {
|
|
882
|
+
gate: "context-graph" | "project-config" | "build-run" | "artifact-diagnostics" | "context-checks" | "benchmarks" | "benchmarks-current";
|
|
883
|
+
ok: boolean;
|
|
884
|
+
summary: string;
|
|
885
|
+
status?: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale" | undefined;
|
|
886
|
+
detail?: string | undefined;
|
|
887
|
+
run_id?: string | null | undefined;
|
|
888
|
+
artifact_path?: string | null | undefined;
|
|
889
|
+
} | null;
|
|
890
|
+
check_results: {
|
|
891
|
+
configured: number;
|
|
892
|
+
fingerprint: string | null;
|
|
893
|
+
source_files: {
|
|
894
|
+
passed: number;
|
|
895
|
+
total: number;
|
|
896
|
+
pass_rate: number | null;
|
|
897
|
+
stale: boolean;
|
|
898
|
+
checks_fingerprint?: string | null | undefined;
|
|
899
|
+
run_id?: string | null | undefined;
|
|
900
|
+
run_path?: string | null | undefined;
|
|
901
|
+
} | null;
|
|
902
|
+
context_graph: {
|
|
903
|
+
passed: number;
|
|
904
|
+
total: number;
|
|
905
|
+
pass_rate: number | null;
|
|
906
|
+
stale: boolean;
|
|
907
|
+
checks_fingerprint?: string | null | undefined;
|
|
908
|
+
run_id?: string | null | undefined;
|
|
909
|
+
run_path?: string | null | undefined;
|
|
910
|
+
} | null;
|
|
911
|
+
};
|
|
912
|
+
checks: {
|
|
913
|
+
gate: "context-graph" | "project-config" | "build-run" | "artifact-diagnostics" | "context-checks" | "benchmarks" | "benchmarks-current";
|
|
914
|
+
ok: boolean;
|
|
915
|
+
summary: string;
|
|
916
|
+
status?: "failed" | "ready" | "not-configured" | "not-built" | "building" | "built" | "checking" | "not-ready" | "stale" | undefined;
|
|
917
|
+
detail?: string | undefined;
|
|
918
|
+
run_id?: string | null | undefined;
|
|
919
|
+
artifact_path?: string | null | undefined;
|
|
920
|
+
}[];
|
|
921
|
+
latest_build_run_id?: string | null | undefined;
|
|
922
|
+
latest_benchmark_run_id?: string | null | undefined;
|
|
923
|
+
}>;
|
|
924
|
+
readonly sourceFilesCache: MtimeListingCache<{
|
|
925
|
+
project: string;
|
|
926
|
+
path: string;
|
|
927
|
+
absolute_path: string;
|
|
928
|
+
size_bytes: number;
|
|
929
|
+
modified_at: string | null;
|
|
930
|
+
source_folder_path: string;
|
|
931
|
+
source_manifest_id?: string | undefined;
|
|
932
|
+
source_file_id?: string | undefined;
|
|
933
|
+
locator?: string | undefined;
|
|
934
|
+
kind?: "image" | "pdf" | "document" | "spreadsheet" | "presentation" | "text" | "other" | undefined;
|
|
935
|
+
}[]>;
|
|
936
|
+
readonly buildPlanListingCache: BuildPlanListingCache<{
|
|
937
|
+
id: string;
|
|
938
|
+
build_plan_id: string;
|
|
939
|
+
path: string;
|
|
940
|
+
inputs: {
|
|
941
|
+
id: string;
|
|
942
|
+
label: string;
|
|
943
|
+
description: string;
|
|
944
|
+
required: boolean;
|
|
945
|
+
examples?: string[] | undefined;
|
|
946
|
+
}[];
|
|
947
|
+
source_kind: "builtin" | "local";
|
|
948
|
+
built_in: boolean;
|
|
949
|
+
active_for_projects: string[];
|
|
950
|
+
context_checks: {
|
|
951
|
+
id: string;
|
|
952
|
+
label: string;
|
|
953
|
+
backed_by_artifact_ids: string[];
|
|
954
|
+
required: boolean;
|
|
955
|
+
description?: string | undefined;
|
|
956
|
+
evidence_expectation?: string | undefined;
|
|
957
|
+
}[];
|
|
958
|
+
artifacts: {
|
|
959
|
+
id: string;
|
|
960
|
+
description: string;
|
|
961
|
+
shape: {
|
|
962
|
+
kind: "path";
|
|
963
|
+
path: string;
|
|
964
|
+
artifact_kind: "file" | "directory";
|
|
965
|
+
};
|
|
966
|
+
checks: {
|
|
967
|
+
id: string;
|
|
968
|
+
kind: "file_exists" | "source_manifest_valid" | "min_file_count" | "min_file_count_matches_source" | "source_summary_folders" | "source_page_coverage" | "frontmatter_valid" | "frontmatter_required_keys" | "frontmatter_nonempty_keys" | "source_refs_required" | "wikilinks_valid" | "must_not_contain" | "must_contain" | "qa_match";
|
|
969
|
+
required: boolean;
|
|
970
|
+
description?: string | undefined;
|
|
971
|
+
params?: Record<string, unknown> | undefined;
|
|
972
|
+
}[];
|
|
973
|
+
built_by_stages: string[];
|
|
974
|
+
}[];
|
|
975
|
+
stages: {
|
|
976
|
+
id: string;
|
|
977
|
+
label: string;
|
|
978
|
+
contract_type: string;
|
|
979
|
+
skill_dir: string;
|
|
980
|
+
role: string;
|
|
981
|
+
reads: string[];
|
|
982
|
+
writes: string[];
|
|
983
|
+
description?: string | undefined;
|
|
984
|
+
}[];
|
|
985
|
+
label?: string | undefined;
|
|
986
|
+
hint?: string | undefined;
|
|
987
|
+
purpose?: {
|
|
988
|
+
label: string;
|
|
989
|
+
task_hint: string;
|
|
990
|
+
} | undefined;
|
|
991
|
+
brief?: {
|
|
992
|
+
requested_artifacts: {
|
|
993
|
+
title: string;
|
|
994
|
+
checks: (string | {
|
|
995
|
+
label: string;
|
|
996
|
+
})[];
|
|
997
|
+
id?: string | undefined;
|
|
998
|
+
purpose?: string | undefined;
|
|
999
|
+
description?: string | undefined;
|
|
1000
|
+
output?: {
|
|
1001
|
+
checks: {
|
|
1002
|
+
id: string;
|
|
1003
|
+
kind: "file_exists" | "source_manifest_valid" | "min_file_count" | "min_file_count_matches_source" | "source_summary_folders" | "source_page_coverage" | "frontmatter_valid" | "frontmatter_required_keys" | "frontmatter_nonempty_keys" | "source_refs_required" | "wikilinks_valid" | "must_not_contain" | "must_contain" | "qa_match";
|
|
1004
|
+
required: boolean;
|
|
1005
|
+
description?: string | undefined;
|
|
1006
|
+
params?: Record<string, unknown> | undefined;
|
|
1007
|
+
}[];
|
|
1008
|
+
path?: string | undefined;
|
|
1009
|
+
shape?: {
|
|
1010
|
+
kind: "path";
|
|
1011
|
+
path: string;
|
|
1012
|
+
artifact_kind: "file" | "directory";
|
|
1013
|
+
} | undefined;
|
|
1014
|
+
stage_hint?: string | undefined;
|
|
1015
|
+
} | undefined;
|
|
1016
|
+
}[];
|
|
1017
|
+
checks: {
|
|
1018
|
+
label: string;
|
|
1019
|
+
backed_by_artifact_ids: string[];
|
|
1020
|
+
required: boolean;
|
|
1021
|
+
id?: string | undefined;
|
|
1022
|
+
description?: string | undefined;
|
|
1023
|
+
evidence?: string | undefined;
|
|
1024
|
+
evidence_expectation?: string | undefined;
|
|
1025
|
+
}[];
|
|
1026
|
+
artifact_requirements: {
|
|
1027
|
+
id: string;
|
|
1028
|
+
shape: {
|
|
1029
|
+
kind: "path";
|
|
1030
|
+
path: string;
|
|
1031
|
+
artifact_kind: "file" | "directory";
|
|
1032
|
+
};
|
|
1033
|
+
checks: {
|
|
1034
|
+
id: string;
|
|
1035
|
+
kind: "file_exists" | "source_manifest_valid" | "min_file_count" | "min_file_count_matches_source" | "source_summary_folders" | "source_page_coverage" | "frontmatter_valid" | "frontmatter_required_keys" | "frontmatter_nonempty_keys" | "source_refs_required" | "wikilinks_valid" | "must_not_contain" | "must_contain" | "qa_match";
|
|
1036
|
+
required: boolean;
|
|
1037
|
+
description?: string | undefined;
|
|
1038
|
+
params?: Record<string, unknown> | undefined;
|
|
1039
|
+
}[];
|
|
1040
|
+
description?: string | undefined;
|
|
1041
|
+
stage_hint?: string | undefined;
|
|
1042
|
+
}[];
|
|
1043
|
+
intent: string;
|
|
1044
|
+
user_prep_instructions?: string | undefined;
|
|
1045
|
+
source_context?: {
|
|
1046
|
+
items: {
|
|
1047
|
+
name?: string | undefined;
|
|
1048
|
+
path?: string | undefined;
|
|
1049
|
+
kind?: string | undefined;
|
|
1050
|
+
page_count?: number | undefined;
|
|
1051
|
+
note?: string | undefined;
|
|
1052
|
+
}[];
|
|
1053
|
+
observations: string[];
|
|
1054
|
+
limitations: string[];
|
|
1055
|
+
summary?: string | undefined;
|
|
1056
|
+
} | null | undefined;
|
|
1057
|
+
} | undefined;
|
|
1058
|
+
}[]>;
|
|
1059
|
+
constructor(options: LocalServiceRuntimeOptions);
|
|
1060
|
+
setBoundPort(port: number): void;
|
|
1061
|
+
/** Set a hook that fires whenever the registered Projects change. */
|
|
1062
|
+
setOnRegistryChanged(handler: (() => void) | null): void;
|
|
1063
|
+
/**
|
|
1064
|
+
* Register a Project with this runtime. Returns the ProjectContext.
|
|
1065
|
+
* Idempotent: re-registering an existing Project updates `lastActivity`.
|
|
1066
|
+
*/
|
|
1067
|
+
registerProject(projectDataDir: string): ProjectContext;
|
|
1068
|
+
/**
|
|
1069
|
+
* Remove a project from the runtime. Returns true if a project was
|
|
1070
|
+
* removed.
|
|
1071
|
+
*/
|
|
1072
|
+
deregisterProject(projectDataDir: string): boolean;
|
|
1073
|
+
/**
|
|
1074
|
+
* Most recently active project, or the first registered if none has
|
|
1075
|
+
* activity yet. Server code uses this as the fallback when a request
|
|
1076
|
+
* does not specify a project. Throws if none are registered.
|
|
1077
|
+
*/
|
|
1078
|
+
defaultProjectDataDir(): string;
|
|
1079
|
+
/** Look up a Project context by rootPath. */
|
|
1080
|
+
getProjectContext(projectDataDir: string): ProjectContext | null;
|
|
1081
|
+
/** All registered Projects, ordered by registration time. */
|
|
1082
|
+
listRegisteredProjects(): ProjectContext[];
|
|
1083
|
+
/** True when no projects are registered. */
|
|
1084
|
+
hasNoProjects(): boolean;
|
|
1085
|
+
/** Number of registered Projects. */
|
|
1086
|
+
registeredProjectCount(): number;
|
|
1087
|
+
/** Increment in-flight run counter. Call when a long-running run starts. */
|
|
1088
|
+
beginActiveRun(): void;
|
|
1089
|
+
/** Decrement in-flight run counter. Pair with `beginActiveRun`. */
|
|
1090
|
+
endActiveRun(): void;
|
|
1091
|
+
/** Sum of in-flight runs across all projects. */
|
|
1092
|
+
activeRuns(): number;
|
|
1093
|
+
beginActiveJobRun(runId: string): void;
|
|
1094
|
+
endActiveJobRun(runId: string): void;
|
|
1095
|
+
/**
|
|
1096
|
+
* Mark the project as recently active. Routes call this on entry so
|
|
1097
|
+
* `idleForSeconds` and the registry graphs stay in sync with the
|
|
1098
|
+
* actual request cadence.
|
|
1099
|
+
*/
|
|
1100
|
+
touchProject(projectDataDir: string): void;
|
|
1101
|
+
/** Seconds since the most recent Project activity (0 if active). */
|
|
1102
|
+
idleForSeconds(): number;
|
|
1103
|
+
health(projectDataDir?: string): LocalServiceHealth;
|
|
1104
|
+
listProjects(projectDataDir: string): ProjectResource[];
|
|
1105
|
+
getProject(projectDataDir: string, projectName: string): ProjectResource | null;
|
|
1106
|
+
listProjectReadiness(projectDataDir: string): Readiness[];
|
|
1107
|
+
getProjectReadiness(projectDataDir: string, projectName: string): Readiness | null;
|
|
1108
|
+
listReadiness(projectDataDir: string): Readiness[];
|
|
1109
|
+
getReadiness(projectDataDir: string, projectName: string): Readiness | null;
|
|
1110
|
+
computeProjectReadiness(projectDataDir: string, project: ProjectConfig): Readiness;
|
|
1111
|
+
listSourceFiles(projectDataDir: string, projectName?: string | null): SourceFileResource[];
|
|
1112
|
+
listContextGraphs(projectDataDir: string, projectName?: string | null): ContextGraphResource[];
|
|
1113
|
+
getContextGraph(projectDataDir: string, graphId: string): ContextGraphResource | null;
|
|
1114
|
+
getLatestContextGraph(projectDataDir: string, projectName: string): ContextGraphResource | null;
|
|
1115
|
+
listBuildPlans(projectDataDir: string): BuildPlanResource[];
|
|
1116
|
+
getBuildPlanResource(projectDataDir: string, buildPlanId: string): BuildPlanResource | null;
|
|
1117
|
+
applyBuildPlanChange(projectDataDir: string, requestValue: unknown): BuildPlanChangeResult;
|
|
1118
|
+
applyReset(projectDataDir: string, requestValue: unknown): ResetResult;
|
|
1119
|
+
resolveProjectConfig(projectDataDir: string, projectName: string, overrides?: Partial<Pick<ProjectConfig, "build_plan">>): ProjectConfig;
|
|
1120
|
+
ensureContextGraphForRun(projectDataDir: string, projectConfig: ProjectConfig, runId: string): string;
|
|
1121
|
+
defaultProjectId(projectDataDir: string): string;
|
|
1122
|
+
getExecutorStatus(): LocalExecutorStatus;
|
|
1123
|
+
selectExecutor(requestValue: unknown): LocalExecutorStatus;
|
|
1124
|
+
getAgentsRegistry(): AgentsRegistryState;
|
|
1125
|
+
registerCustomAgent(input: {
|
|
1126
|
+
name: string;
|
|
1127
|
+
display_name: string;
|
|
1128
|
+
command: string;
|
|
1129
|
+
}): AgentsRegistryState;
|
|
1130
|
+
unregisterCustomAgent(name: string): AgentsRegistryState;
|
|
1131
|
+
patchAgentsRoleMap(patch: Record<string, string>): AgentsRegistryRoleState;
|
|
1132
|
+
setAgentPrefs(name: string, prefs: AgentPrefs): AgentsRegistryState;
|
|
1133
|
+
listActionProposals(projectDataDir: string): ActionProposalResource[];
|
|
1134
|
+
getActionProposal(projectDataDir: string, proposalId: string): ActionProposalResource | null;
|
|
1135
|
+
createActionProposal(projectDataDir: string, requestValue: unknown): Promise<ActionProposalResource>;
|
|
1136
|
+
decideActionProposal(projectDataDir: string, proposalId: string, requestValue: unknown): Promise<ActionProposalResource | null>;
|
|
1137
|
+
listRunObservability(projectDataDir: string): RunObservabilityResource[];
|
|
1138
|
+
getRunObservability(projectDataDir: string, runId: string): RunObservabilityResource | null;
|
|
1139
|
+
listBuildPlanRuns(projectDataDir: string, buildPlanId: string): RunObservabilityResource[];
|
|
1140
|
+
listBuildRuns(projectDataDir: string): BuildRunResource[];
|
|
1141
|
+
listBuildRunsForProject(projectDataDir: string, projectName: string): BuildRun[];
|
|
1142
|
+
getBuildRun(projectDataDir: string, runId: string): BuildRunResource | null;
|
|
1143
|
+
getBuildRunEvents(projectDataDir: string, runId: string): InterfRunEvent[] | null;
|
|
1144
|
+
getBuildRunEvidence(projectDataDir: string, runId: string): EvidenceRecord[] | null;
|
|
1145
|
+
getBuildRunArtifacts(projectDataDir: string, runId: string): ArtifactRef[] | null;
|
|
1146
|
+
createBuildRun(projectDataDir: string, requestValue: unknown): Promise<BuildRunResource>;
|
|
1147
|
+
cancelBuildRun(runId: string): {
|
|
1148
|
+
cancelled: boolean;
|
|
1149
|
+
reason?: string;
|
|
1150
|
+
};
|
|
1151
|
+
findIdempotentBuildRun(projectDataDir: string, key: string): string | null;
|
|
1152
|
+
recordIdempotentBuildRun(projectDataDir: string, key: string, runId: string): void;
|
|
1153
|
+
expireIdempotencyKeyForTesting(projectDataDir: string, key: string): boolean;
|
|
1154
|
+
listVerifyRuns(projectDataDir: string): VerifyRunResource[];
|
|
1155
|
+
listVerifyRunsForProject(projectDataDir: string, projectName: string): VerifyRunResource[];
|
|
1156
|
+
getVerifyRun(projectDataDir: string, runId: string): VerifyRunResource | null;
|
|
1157
|
+
createVerifyRun(projectDataDir: string, requestValue: unknown): Promise<VerifyRunResource>;
|
|
1158
|
+
listJobs(projectDataDir: string): LocalJobRunResource[];
|
|
1159
|
+
getJob(projectDataDir: string, runId: string): LocalJobRunResource | null;
|
|
1160
|
+
getJobEvents(projectDataDir: string, runId: string): LocalJobEvent[] | null;
|
|
1161
|
+
createBenchmarkQuestionDraftRun(projectDataDir: string, requestValue: unknown): Promise<LocalJobRunResource>;
|
|
1162
|
+
createBuildPlanAuthoringRun(projectDataDir: string, requestValue: unknown, jobType?: "build-plan-draft" | "build-plan-improvement"): Promise<LocalJobRunResource>;
|
|
1163
|
+
}
|
|
1164
|
+
export declare function createLocalServiceRuntime(options: LocalServiceRuntimeOptions): LocalServiceRuntime;
|
|
1165
|
+
export type { AgentPrefs, AgentRecord, RoleMap };
|