@interf/compiler 0.9.5 → 0.16.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 +135 -91
- package/TRADEMARKS.md +2 -13
- package/agent-skills/interf-actions/SKILL.md +143 -38
- package/agent-skills/interf-actions/references/cli.md +134 -67
- package/builtin-methods/interf-default/README.md +3 -4
- package/builtin-methods/interf-default/compile/stages/shape/SKILL.md +2 -2
- package/builtin-methods/interf-default/compile/stages/summarize/SKILL.md +2 -1
- package/builtin-methods/interf-default/improve/SKILL.md +1 -1
- package/builtin-methods/interf-default/method.json +10 -4
- package/builtin-methods/interf-default/method.schema.json +0 -9
- package/builtin-methods/interf-default/use/query/SKILL.md +5 -5
- package/dist/cli/commands/agents.d.ts +2 -0
- package/dist/cli/commands/agents.js +213 -0
- package/dist/cli/commands/compile.d.ts +8 -25
- package/dist/cli/commands/compile.js +83 -359
- package/dist/cli/commands/doctor.js +2 -2
- package/dist/cli/commands/login.d.ts +7 -0
- package/dist/cli/commands/login.js +39 -0
- package/dist/cli/commands/logout.d.ts +2 -0
- package/dist/cli/commands/logout.js +16 -0
- package/dist/cli/commands/mcp.d.ts +42 -0
- package/dist/cli/commands/mcp.js +239 -0
- package/dist/cli/commands/method.d.ts +2 -0
- package/dist/cli/commands/method.js +113 -0
- package/dist/cli/commands/prep.d.ts +2 -0
- package/dist/cli/commands/prep.js +152 -0
- package/dist/cli/commands/reset.d.ts +8 -1
- package/dist/cli/commands/reset.js +47 -26
- package/dist/cli/commands/runs.d.ts +2 -0
- package/dist/cli/commands/runs.js +120 -0
- package/dist/cli/commands/status.d.ts +6 -1
- package/dist/cli/commands/status.js +68 -111
- package/dist/cli/commands/verify.d.ts +7 -1
- package/dist/cli/commands/verify.js +69 -85
- package/dist/cli/commands/web.d.ts +0 -9
- package/dist/cli/commands/web.js +201 -121
- package/dist/cli/commands/wizard.d.ts +9 -0
- package/dist/cli/commands/wizard.js +689 -0
- package/dist/cli/index.d.ts +10 -7
- package/dist/cli/index.js +19 -12
- package/dist/compiler-ui/404.html +1 -1
- package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
- package/dist/compiler-ui/__next._full.txt +3 -3
- package/dist/compiler-ui/__next._head.txt +1 -1
- package/dist/compiler-ui/__next._index.txt +2 -2
- package/dist/compiler-ui/__next._tree.txt +2 -2
- package/dist/compiler-ui/_next/static/chunks/{177mvn4rse235.js → 0jipmpez3_ehh.js} +16 -16
- package/dist/compiler-ui/_next/static/chunks/{18a8f2jkv3z.c.css → 13awzu4tooflw.css} +1 -1
- package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
- package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
- package/dist/compiler-ui/_not-found.html +1 -1
- package/dist/compiler-ui/_not-found.txt +2 -2
- package/dist/compiler-ui/index.html +1 -1
- package/dist/compiler-ui/index.txt +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/packages/contracts/index.d.ts +2 -1
- package/dist/packages/contracts/index.js +1 -0
- package/dist/packages/contracts/lib/preparation-paths.d.ts +117 -0
- package/dist/packages/contracts/lib/preparation-paths.js +177 -0
- package/dist/packages/contracts/lib/schema.d.ts +187 -13
- package/dist/packages/contracts/lib/schema.js +148 -3
- package/dist/packages/contracts/utils/filesystem.d.ts +9 -0
- package/dist/packages/contracts/utils/filesystem.js +142 -0
- package/dist/packages/{local-service → engine}/action-definitions.d.ts +14 -14
- package/dist/packages/{local-service → engine}/action-definitions.js +35 -29
- package/dist/packages/{local-service → engine}/action-planner.d.ts +1 -1
- package/dist/packages/{local-service → engine}/action-planner.js +3 -2
- package/dist/packages/{agents → engine/agents}/index.d.ts +3 -0
- package/dist/packages/{agents → engine/agents}/index.js +3 -0
- package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.js +2 -2
- package/dist/packages/engine/agents/lib/detection.d.ts +13 -0
- package/dist/packages/{agents → engine/agents}/lib/detection.js +11 -0
- package/dist/packages/{agents → engine/agents}/lib/executors.d.ts +2 -2
- package/dist/packages/{agents → engine/agents}/lib/shells.d.ts +5 -5
- package/dist/packages/{agents → engine/agents}/lib/shells.js +117 -58
- package/dist/packages/{agents → engine/agents}/lib/user-config.d.ts +4 -2
- package/dist/packages/engine/agents/lib/user-config.js +24 -0
- package/dist/packages/engine/agents/registry.d.ts +91 -0
- package/dist/packages/engine/agents/registry.js +321 -0
- package/dist/packages/engine/agents/role-executors.d.ts +35 -0
- package/dist/packages/engine/agents/role-executors.js +88 -0
- package/dist/packages/engine/agents/role-router.d.ts +66 -0
- package/dist/packages/engine/agents/role-router.js +73 -0
- package/dist/packages/{local-service → engine}/client.d.ts +59 -60
- package/dist/packages/{local-service → engine}/client.js +137 -145
- package/dist/packages/{compiler → engine/compile}/artifact-counts.js +1 -1
- package/dist/packages/{compiler → engine/compile}/compiled-paths.d.ts +9 -2
- package/dist/packages/{compiler → engine/compile}/compiled-paths.js +30 -15
- package/dist/packages/{compiler → engine/compile}/compiled-pipeline.d.ts +12 -1
- package/dist/packages/{compiler → engine/compile}/compiled-pipeline.js +39 -9
- package/dist/packages/{compiler → engine/compile}/compiled-schema.d.ts +2 -2
- package/dist/packages/{compiler → engine/compile}/compiled-schema.js +4 -4
- package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.js +8 -4
- package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.js +3 -3
- package/dist/packages/{compiler → engine/compile}/compiled-target.d.ts +3 -3
- package/dist/packages/{compiler → engine/compile}/compiled-target.js +3 -3
- package/dist/packages/{compiler → engine/compile}/discovery.js +1 -1
- package/dist/packages/{compiler → engine/compile}/index.d.ts +1 -0
- package/dist/packages/{compiler → engine/compile}/index.js +1 -0
- package/dist/packages/{compiler → engine/compile}/lib/schema.d.ts +26 -31
- package/dist/packages/{compiler → engine/compile}/lib/schema.js +2 -13
- package/dist/packages/engine/compile/method-runs.d.ts +14 -0
- package/dist/packages/{compiler → engine/compile}/method-runs.js +5 -6
- package/dist/packages/{compiler → engine/compile}/reset.js +3 -1
- package/dist/packages/{compiler → engine/compile}/runtime-acceptance.js +17 -14
- package/dist/packages/{compiler → engine/compile}/runtime-contracts.js +0 -3
- package/dist/packages/{compiler → engine/compile}/runtime-prompt.js +1 -1
- package/dist/packages/{compiler → engine/compile}/runtime-reconcile.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/runtime-reconcile.js +12 -10
- package/dist/packages/{compiler → engine/compile}/runtime-runs.d.ts +1 -2
- package/dist/packages/{compiler → engine/compile}/runtime-runs.js +3 -43
- package/dist/packages/{compiler → engine/compile}/runtime-types.d.ts +1 -5
- package/dist/packages/{compiler → engine/compile}/runtime.d.ts +2 -2
- package/dist/packages/{compiler → engine/compile}/runtime.js +1 -1
- package/dist/packages/engine/compile/source-files.d.ts +46 -0
- package/dist/packages/engine/compile/source-files.js +149 -0
- package/dist/packages/engine/compile/state-artifacts.d.ts +9 -0
- package/dist/packages/{compiler → engine/compile}/state-artifacts.js +4 -3
- package/dist/packages/{compiler → engine/compile}/state-health.js +2 -2
- package/dist/packages/{compiler → engine/compile}/state-io.d.ts +3 -2
- package/dist/packages/{compiler → engine/compile}/state-io.js +13 -7
- package/dist/packages/{compiler → engine/compile}/state-paths.d.ts +2 -1
- package/dist/packages/engine/compile/state-paths.js +16 -0
- package/dist/packages/engine/compile/state-view.d.ts +5 -0
- package/dist/packages/{compiler → engine/compile}/state-view.js +20 -30
- package/dist/packages/engine/compile/state.d.ts +7 -0
- package/dist/packages/{compiler → engine/compile}/state.js +3 -3
- package/dist/packages/{compiler → engine/compile}/validate-compiled.js +2 -2
- package/dist/packages/{compiler → engine/compile}/validate.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/validate.js +3 -3
- package/dist/packages/engine/connection-config.d.ts +38 -0
- package/dist/packages/engine/connection-config.js +75 -0
- package/dist/packages/{execution → engine/execution}/lib/schema.d.ts +52 -72
- package/dist/packages/{execution → engine/execution}/lib/schema.js +3 -3
- package/dist/packages/engine/index.d.ts +22 -0
- package/dist/packages/engine/index.js +15 -0
- package/dist/packages/engine/instance-paths.d.ts +100 -0
- package/dist/packages/engine/instance-paths.js +165 -0
- package/dist/packages/{local-service → engine}/lib/schema.d.ts +392 -2408
- package/dist/packages/{local-service → engine}/lib/schema.js +164 -76
- package/dist/packages/{local-service → engine}/native-run-handlers.d.ts +7 -5
- package/dist/packages/{local-service → engine}/native-run-handlers.js +71 -27
- package/dist/packages/engine/preparation-store.d.ts +104 -0
- package/dist/packages/engine/preparation-store.js +194 -0
- package/dist/packages/{local-service → engine}/readiness-check-draft.d.ts +2 -2
- package/dist/packages/engine/routes.d.ts +78 -0
- package/dist/packages/engine/routes.js +92 -0
- package/dist/packages/{local-service → engine}/run-observability.d.ts +3 -3
- package/dist/packages/{local-service → engine}/run-observability.js +25 -24
- package/dist/packages/engine/runtime-caches.d.ts +76 -0
- package/dist/packages/engine/runtime-caches.js +191 -0
- package/dist/packages/engine/runtime-event-applier.d.ts +12 -0
- package/dist/packages/engine/runtime-event-applier.js +177 -0
- package/dist/packages/engine/runtime-persistence.d.ts +47 -0
- package/dist/packages/engine/runtime-persistence.js +137 -0
- package/dist/packages/engine/runtime-proposal-helpers.d.ts +35 -0
- package/dist/packages/engine/runtime-proposal-helpers.js +251 -0
- package/dist/packages/engine/runtime-resource-builders.d.ts +52 -0
- package/dist/packages/engine/runtime-resource-builders.js +149 -0
- package/dist/packages/engine/runtime.d.ts +318 -0
- package/dist/packages/{local-service → engine}/runtime.js +835 -1011
- package/dist/packages/{local-service → engine}/server.d.ts +15 -0
- package/dist/packages/engine/server.js +1257 -0
- package/dist/packages/engine/service-registry.d.ts +47 -0
- package/dist/packages/engine/service-registry.js +137 -0
- package/dist/packages/{testing → engine/verify}/lib/schema.d.ts +11 -11
- package/dist/packages/{testing → engine/verify}/lib/schema.js +3 -3
- package/dist/packages/{testing → engine/verify}/readiness-check-run.d.ts +9 -16
- package/dist/packages/{testing → engine/verify}/readiness-check-run.js +38 -94
- package/dist/packages/{testing → engine/verify}/test-execution.js +6 -6
- package/dist/packages/{testing → engine/verify}/test-paths.js +5 -4
- package/dist/packages/{testing → engine/verify}/test-sandbox.d.ts +0 -1
- package/dist/packages/{testing → engine/verify}/test-sandbox.js +17 -33
- package/dist/packages/{testing → engine/verify}/test-specs.js +1 -1
- package/dist/packages/{testing → engine/verify}/test-targets.d.ts +1 -1
- package/dist/packages/{testing → engine/verify}/test-targets.js +9 -9
- package/dist/packages/{testing → engine/verify}/test.d.ts +1 -1
- package/dist/packages/{testing → engine/verify}/test.js +1 -1
- package/dist/packages/{method-authoring → methods/authoring}/method-authoring.d.ts +12 -4
- package/dist/packages/{method-authoring → methods/authoring}/method-authoring.js +70 -7
- package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.d.ts +2 -2
- package/dist/packages/{method-authoring → methods/authoring}/method-improvement.d.ts +4 -4
- package/dist/packages/{method-authoring → methods/authoring}/method-improvement.js +16 -10
- package/dist/packages/{method-package → methods/package}/builtin-compiled-method.d.ts +4 -5
- package/dist/packages/{method-package → methods/package}/builtin-compiled-method.js +10 -16
- package/dist/packages/{method-package → methods/package}/context-interface.d.ts +5 -41
- package/dist/packages/{method-package → methods/package}/context-interface.js +3 -25
- package/dist/packages/{method-package → methods/package}/interf-method-package.d.ts +4 -4
- package/dist/packages/{method-package → methods/package}/interf-method-package.js +24 -35
- package/dist/packages/{method-package → methods/package}/lib/package-root.js +2 -2
- package/dist/packages/{method-package → methods/package}/local-methods.d.ts +18 -8
- package/dist/packages/{method-package → methods/package}/local-methods.js +64 -45
- package/dist/packages/{method-package → methods/package}/method-definitions.d.ts +16 -36
- package/dist/packages/{method-package → methods/package}/method-definitions.js +53 -40
- package/dist/packages/{method-package → methods/package}/method-helpers.d.ts +2 -14
- package/dist/packages/{method-package → methods/package}/method-helpers.js +12 -46
- package/dist/packages/{method-package → methods/package}/method-review-paths.d.ts +1 -1
- package/dist/packages/{method-package → methods/package}/method-review-paths.js +1 -1
- package/dist/packages/{method-package → methods/package}/method-stage-runner.d.ts +4 -9
- package/dist/packages/{method-package → methods/package}/method-stage-runner.js +3 -31
- package/dist/packages/methods/package/user-methods.d.ts +17 -0
- package/dist/packages/methods/package/user-methods.js +77 -0
- package/dist/packages/{project-model → project}/index.d.ts +0 -1
- package/dist/packages/{project-model → project}/index.js +0 -1
- package/dist/packages/{project-model → project}/interf-bootstrap.d.ts +1 -1
- package/dist/packages/{project-model → project}/interf-bootstrap.js +1 -1
- package/dist/packages/{project-model → project}/interf-detect.d.ts +8 -3
- package/dist/packages/{project-model → project}/interf-detect.js +38 -38
- package/dist/packages/project/interf-scaffold.d.ts +3 -0
- package/dist/packages/{project-model → project}/interf-scaffold.js +30 -39
- package/dist/packages/{project-model → project}/lib/schema.d.ts +2 -2
- package/dist/packages/{project-model → project}/lib/schema.js +39 -2
- package/dist/packages/project/preparation-entries.d.ts +11 -0
- package/dist/packages/{project-model → project}/preparation-entries.js +14 -14
- package/dist/packages/{project-model → project}/source-config.d.ts +12 -12
- package/dist/packages/{project-model → project}/source-config.js +81 -53
- package/dist/packages/{project-model → project}/source-folders.d.ts +5 -5
- package/dist/packages/{project-model → project}/source-folders.js +16 -16
- package/package.json +8 -8
- package/CHANGELOG.md +0 -93
- package/LICENSE +0 -183
- package/dist/cli/commands/action-input-cli.d.ts +0 -25
- package/dist/cli/commands/action-input-cli.js +0 -73
- package/dist/cli/commands/control-path.d.ts +0 -11
- package/dist/cli/commands/control-path.js +0 -72
- package/dist/cli/commands/create-method-wizard.d.ts +0 -64
- package/dist/cli/commands/create-method-wizard.js +0 -434
- package/dist/cli/commands/create.d.ts +0 -6
- package/dist/cli/commands/create.js +0 -183
- package/dist/cli/commands/default.d.ts +0 -2
- package/dist/cli/commands/default.js +0 -39
- package/dist/cli/commands/executor-flow.d.ts +0 -29
- package/dist/cli/commands/executor-flow.js +0 -163
- package/dist/cli/commands/init.d.ts +0 -26
- package/dist/cli/commands/init.js +0 -771
- package/dist/cli/commands/list.d.ts +0 -2
- package/dist/cli/commands/list.js +0 -30
- package/dist/cli/commands/preparation-action.d.ts +0 -8
- package/dist/cli/commands/preparation-action.js +0 -29
- package/dist/cli/commands/preparation-picker.d.ts +0 -5
- package/dist/cli/commands/preparation-picker.js +0 -36
- package/dist/cli/commands/preparation-selection.d.ts +0 -6
- package/dist/cli/commands/preparation-selection.js +0 -11
- package/dist/cli/commands/service-action-flow.d.ts +0 -9
- package/dist/cli/commands/service-action-flow.js +0 -19
- package/dist/cli/commands/source-config-wizard.d.ts +0 -51
- package/dist/cli/commands/source-config-wizard.js +0 -670
- package/dist/cli/commands/test.d.ts +0 -17
- package/dist/cli/commands/test.js +0 -188
- package/dist/packages/agents/lib/detection.d.ts +0 -7
- package/dist/packages/agents/lib/user-config.js +0 -16
- package/dist/packages/compiler/method-runs.d.ts +0 -15
- package/dist/packages/compiler/raw-snapshot.d.ts +0 -49
- package/dist/packages/compiler/raw-snapshot.js +0 -101
- package/dist/packages/compiler/state-artifacts.d.ts +0 -8
- package/dist/packages/compiler/state-paths.js +0 -13
- package/dist/packages/compiler/state-view.d.ts +0 -4
- package/dist/packages/compiler/state.d.ts +0 -7
- package/dist/packages/local-service/index.d.ts +0 -18
- package/dist/packages/local-service/index.js +0 -13
- package/dist/packages/local-service/routes.d.ts +0 -32
- package/dist/packages/local-service/routes.js +0 -37
- package/dist/packages/local-service/runtime.d.ts +0 -133
- package/dist/packages/local-service/server.js +0 -627
- package/dist/packages/method-package/index.d.ts +0 -11
- package/dist/packages/method-package/index.js +0 -11
- package/dist/packages/method-package/method-stage-policy.d.ts +0 -5
- package/dist/packages/method-package/method-stage-policy.js +0 -31
- package/dist/packages/project-model/interf-scaffold.d.ts +0 -3
- package/dist/packages/project-model/preparation-entries.d.ts +0 -11
- package/dist/packages/project-model/project-paths.d.ts +0 -12
- package/dist/packages/project-model/project-paths.js +0 -33
- package/dist/packages/shared/filesystem.d.ts +0 -2
- package/dist/packages/shared/filesystem.js +0 -55
- /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → a3UiUF0DiMEbfWy_0gihg}/_buildManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → a3UiUF0DiMEbfWy_0gihg}/_clientMiddlewareManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → a3UiUF0DiMEbfWy_0gihg}/_ssgManifest.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/file-types.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/file-types.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/logger.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/logger.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/naming.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/naming.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/parse.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/parse.js +0 -0
- /package/dist/packages/{shared → contracts/utils}/path-guards.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/path-guards.js +0 -0
- /package/dist/packages/{local-service → engine}/action-values.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/action-values.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/agents.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/agents.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/args.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/args.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/chart-guidance.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/compiled-bootstrap.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/constants.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/constants.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/execution-profile.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/execution-profile.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/execution.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/execution.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/executors.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/logs.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/logs.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/preflight.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/preflight.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/render.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/render.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/schema.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/schema.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/status.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/status.js +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/types.d.ts +0 -0
- /package/dist/packages/{agents → engine/agents}/lib/types.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/artifact-counts.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/compiled-compile.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/compiled-compile.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/discovery.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/method-primitives.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/method-primitives.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/reset.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-acceptance.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-contracts.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-inventory.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-inventory.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-paths.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-paths.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-prompt.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/runtime-types.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-health.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/validate-compiled.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/validate-helpers.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/validate-helpers.js +0 -0
- /package/dist/packages/{execution → engine/execution}/adapters.d.ts +0 -0
- /package/dist/packages/{execution → engine/execution}/adapters.js +0 -0
- /package/dist/packages/{execution → engine/execution}/events.d.ts +0 -0
- /package/dist/packages/{execution → engine/execution}/events.js +0 -0
- /package/dist/packages/{execution → engine/execution}/index.d.ts +0 -0
- /package/dist/packages/{execution → engine/execution}/index.js +0 -0
- /package/dist/packages/{local-service → engine}/readiness-check-draft.js +0 -0
- /package/dist/packages/{testing → engine/verify}/index.d.ts +0 -0
- /package/dist/packages/{testing → engine/verify}/index.js +0 -0
- /package/dist/packages/{testing → engine/verify}/test-execution.d.ts +0 -0
- /package/dist/packages/{testing → engine/verify}/test-paths.d.ts +0 -0
- /package/dist/packages/{testing → engine/verify}/test-profile-presets.d.ts +0 -0
- /package/dist/packages/{testing → engine/verify}/test-profile-presets.js +0 -0
- /package/dist/packages/{testing → engine/verify}/test-specs.d.ts +0 -0
- /package/dist/packages/{testing → engine/verify}/test-types.d.ts +0 -0
- /package/dist/packages/{testing → engine/verify}/test-types.js +0 -0
- /package/dist/packages/{method-authoring → methods/authoring}/index.d.ts +0 -0
- /package/dist/packages/{method-authoring → methods/authoring}/index.js +0 -0
- /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.d.ts +0 -0
- /package/dist/packages/{method-authoring → methods/authoring}/lib/method-edit-utils.js +0 -0
- /package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.js +0 -0
- /package/dist/packages/{method-package → methods/package}/lib/package-root.d.ts +0 -0
- /package/dist/packages/{project-model → project}/interf.d.ts +0 -0
- /package/dist/packages/{project-model → project}/interf.js +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central service registry at `~/.interf/services.json`.
|
|
3
|
+
*
|
|
4
|
+
* One running `interf web` instance can serve N workspaces. Every running
|
|
5
|
+
* instance writes an entry here on start and removes it on close. CLI/UX
|
|
6
|
+
* code consults this registry to decide whether a fresh `interf web` should
|
|
7
|
+
* register a workspace with an existing instance instead of starting a
|
|
8
|
+
* second engine.
|
|
9
|
+
*
|
|
10
|
+
* Entry shape:
|
|
11
|
+
* {
|
|
12
|
+
* pid, host, port, url, started_at,
|
|
13
|
+
* workspaces: [{ control_path, registered_at, last_activity }],
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* Atomic write: write to a sibling tmp file, then rename. Concurrent
|
|
17
|
+
* `interf web` invocations get last-writer-wins semantics; pruning of
|
|
18
|
+
* stale entries makes that self-healing.
|
|
19
|
+
*/
|
|
20
|
+
import { interfHomeRoot, serviceRegistryPath } from "../contracts/lib/preparation-paths.js";
|
|
21
|
+
import { type ServiceRegistryEntry, type ServiceRegistryWorkspace } from "./lib/schema.js";
|
|
22
|
+
/**
|
|
23
|
+
* Read the service registry. Removes entries whose pid is no longer alive
|
|
24
|
+
* before returning. Does not health-check the HTTP endpoint — that is too
|
|
25
|
+
* expensive for the synchronous read path; callers that care can verify
|
|
26
|
+
* with a fetch.
|
|
27
|
+
*/
|
|
28
|
+
export declare function readServiceRegistry(): ServiceRegistryEntry[];
|
|
29
|
+
/** Overwrite the registry with the given list of services. */
|
|
30
|
+
export declare function writeServiceRegistry(services: ServiceRegistryEntry[]): void;
|
|
31
|
+
/**
|
|
32
|
+
* Insert or update the entry for this process's pid. If the pid was
|
|
33
|
+
* already registered, replaces it (so callers can use this to update the
|
|
34
|
+
* workspace list).
|
|
35
|
+
*/
|
|
36
|
+
export declare function registerServiceLocally(entry: ServiceRegistryEntry): ServiceRegistryEntry;
|
|
37
|
+
/** Remove the registry entry for the given pid. */
|
|
38
|
+
export declare function unregisterService(pid: number): void;
|
|
39
|
+
/** Update the workspaces array on the entry for this process's pid. */
|
|
40
|
+
export declare function updateLocalServiceWorkspaces(pid: number, options: {
|
|
41
|
+
host: string;
|
|
42
|
+
port: number;
|
|
43
|
+
url: string;
|
|
44
|
+
started_at: string;
|
|
45
|
+
workspaces: ServiceRegistryWorkspace[];
|
|
46
|
+
}): ServiceRegistryEntry;
|
|
47
|
+
export { interfHomeRoot, serviceRegistryPath };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central service registry at `~/.interf/services.json`.
|
|
3
|
+
*
|
|
4
|
+
* One running `interf web` instance can serve N workspaces. Every running
|
|
5
|
+
* instance writes an entry here on start and removes it on close. CLI/UX
|
|
6
|
+
* code consults this registry to decide whether a fresh `interf web` should
|
|
7
|
+
* register a workspace with an existing instance instead of starting a
|
|
8
|
+
* second engine.
|
|
9
|
+
*
|
|
10
|
+
* Entry shape:
|
|
11
|
+
* {
|
|
12
|
+
* pid, host, port, url, started_at,
|
|
13
|
+
* workspaces: [{ control_path, registered_at, last_activity }],
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* Atomic write: write to a sibling tmp file, then rename. Concurrent
|
|
17
|
+
* `interf web` invocations get last-writer-wins semantics; pruning of
|
|
18
|
+
* stale entries makes that self-healing.
|
|
19
|
+
*/
|
|
20
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync, } from "node:fs";
|
|
21
|
+
import { dirname } from "node:path";
|
|
22
|
+
import { interfHomeRoot, serviceRegistryPath, } from "../contracts/lib/preparation-paths.js";
|
|
23
|
+
import { ServiceRegistrySchema, ServiceRegistryEntrySchema, ServiceRegistryWorkspaceSchema, } from "./lib/schema.js";
|
|
24
|
+
/** Returns true when the OS still has a process with this pid. */
|
|
25
|
+
function isProcessAlive(pid) {
|
|
26
|
+
if (!Number.isInteger(pid) || pid <= 0)
|
|
27
|
+
return false;
|
|
28
|
+
if (pid === process.pid)
|
|
29
|
+
return true;
|
|
30
|
+
try {
|
|
31
|
+
process.kill(pid, 0);
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
const code = error?.code;
|
|
36
|
+
// EPERM means the process exists but we can't signal it — still alive.
|
|
37
|
+
return code === "EPERM";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function readRegistryRaw() {
|
|
41
|
+
const path = serviceRegistryPath();
|
|
42
|
+
if (!existsSync(path))
|
|
43
|
+
return { services: [] };
|
|
44
|
+
try {
|
|
45
|
+
const raw = readFileSync(path, "utf8");
|
|
46
|
+
if (!raw.trim())
|
|
47
|
+
return { services: [] };
|
|
48
|
+
const parsed = ServiceRegistrySchema.safeParse(JSON.parse(raw));
|
|
49
|
+
if (parsed.success)
|
|
50
|
+
return parsed.data;
|
|
51
|
+
return { services: [] };
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return { services: [] };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function writeRegistryRaw(registry) {
|
|
58
|
+
const path = serviceRegistryPath();
|
|
59
|
+
const dir = dirname(path);
|
|
60
|
+
mkdirSync(dir, { recursive: true });
|
|
61
|
+
const tmpPath = `${path}.${process.pid}.${Date.now()}.tmp`;
|
|
62
|
+
const parsed = ServiceRegistrySchema.parse(registry);
|
|
63
|
+
writeFileSync(tmpPath, `${JSON.stringify(parsed, null, 2)}\n`);
|
|
64
|
+
try {
|
|
65
|
+
renameSync(tmpPath, path);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
try {
|
|
69
|
+
rmSync(tmpPath, { force: true });
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
// ignore
|
|
73
|
+
}
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Read the service registry. Removes entries whose pid is no longer alive
|
|
79
|
+
* before returning. Does not health-check the HTTP endpoint — that is too
|
|
80
|
+
* expensive for the synchronous read path; callers that care can verify
|
|
81
|
+
* with a fetch.
|
|
82
|
+
*/
|
|
83
|
+
export function readServiceRegistry() {
|
|
84
|
+
const raw = readRegistryRaw();
|
|
85
|
+
const live = [];
|
|
86
|
+
let pruned = false;
|
|
87
|
+
for (const service of raw.services) {
|
|
88
|
+
if (isProcessAlive(service.pid)) {
|
|
89
|
+
live.push(service);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
pruned = true;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (pruned) {
|
|
96
|
+
try {
|
|
97
|
+
writeRegistryRaw({ services: live });
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
// best effort; another writer may have raced us
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return live;
|
|
104
|
+
}
|
|
105
|
+
/** Overwrite the registry with the given list of services. */
|
|
106
|
+
export function writeServiceRegistry(services) {
|
|
107
|
+
writeRegistryRaw({ services });
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Insert or update the entry for this process's pid. If the pid was
|
|
111
|
+
* already registered, replaces it (so callers can use this to update the
|
|
112
|
+
* workspace list).
|
|
113
|
+
*/
|
|
114
|
+
export function registerServiceLocally(entry) {
|
|
115
|
+
const parsed = ServiceRegistryEntrySchema.parse(entry);
|
|
116
|
+
const existing = readServiceRegistry().filter((service) => service.pid !== parsed.pid);
|
|
117
|
+
const next = [...existing, parsed];
|
|
118
|
+
writeServiceRegistry(next);
|
|
119
|
+
return parsed;
|
|
120
|
+
}
|
|
121
|
+
/** Remove the registry entry for the given pid. */
|
|
122
|
+
export function unregisterService(pid) {
|
|
123
|
+
const remaining = readServiceRegistry().filter((service) => service.pid !== pid);
|
|
124
|
+
writeServiceRegistry(remaining);
|
|
125
|
+
}
|
|
126
|
+
/** Update the workspaces array on the entry for this process's pid. */
|
|
127
|
+
export function updateLocalServiceWorkspaces(pid, options) {
|
|
128
|
+
return registerServiceLocally(ServiceRegistryEntrySchema.parse({
|
|
129
|
+
pid,
|
|
130
|
+
host: options.host,
|
|
131
|
+
port: options.port,
|
|
132
|
+
url: options.url,
|
|
133
|
+
started_at: options.started_at,
|
|
134
|
+
workspaces: options.workspaces.map((workspace) => ServiceRegistryWorkspaceSchema.parse(workspace)),
|
|
135
|
+
}));
|
|
136
|
+
}
|
|
137
|
+
export { interfHomeRoot, serviceRegistryPath };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type TestCaseExpect, type TestTargetType } from "
|
|
2
|
+
import { type TestCaseExpect, type TestTargetType } from "../../../contracts/lib/schema.js";
|
|
3
3
|
export declare const TestCaseSchema: z.ZodObject<{
|
|
4
4
|
id: z.ZodString;
|
|
5
5
|
question: z.ZodString;
|
|
@@ -16,8 +16,8 @@ export declare const TestCaseSchema: z.ZodObject<{
|
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
export declare const TestSpecSchema: z.ZodObject<{
|
|
18
18
|
type: z.ZodEnum<{
|
|
19
|
+
"source-files": "source-files";
|
|
19
20
|
compiled: "compiled";
|
|
20
|
-
raw: "raw";
|
|
21
21
|
}>;
|
|
22
22
|
name: z.ZodString;
|
|
23
23
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -60,8 +60,8 @@ export declare const TestCaseResultSchema: z.ZodObject<{
|
|
|
60
60
|
export declare const TestTargetResultSchema: z.ZodObject<{
|
|
61
61
|
target: z.ZodObject<{
|
|
62
62
|
type: z.ZodEnum<{
|
|
63
|
+
"source-files": "source-files";
|
|
63
64
|
compiled: "compiled";
|
|
64
|
-
raw: "raw";
|
|
65
65
|
}>;
|
|
66
66
|
name: z.ZodString;
|
|
67
67
|
path: z.ZodString;
|
|
@@ -98,8 +98,8 @@ export declare const TestTargetRunSchema: z.ZodObject<{
|
|
|
98
98
|
id: z.ZodString;
|
|
99
99
|
name: z.ZodString;
|
|
100
100
|
type: z.ZodEnum<{
|
|
101
|
+
"source-files": "source-files";
|
|
101
102
|
compiled: "compiled";
|
|
102
|
-
raw: "raw";
|
|
103
103
|
}>;
|
|
104
104
|
file: z.ZodString;
|
|
105
105
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -138,8 +138,8 @@ export declare const TestTargetRunSchema: z.ZodObject<{
|
|
|
138
138
|
results: z.ZodArray<z.ZodObject<{
|
|
139
139
|
target: z.ZodObject<{
|
|
140
140
|
type: z.ZodEnum<{
|
|
141
|
+
"source-files": "source-files";
|
|
141
142
|
compiled: "compiled";
|
|
142
|
-
raw: "raw";
|
|
143
143
|
}>;
|
|
144
144
|
name: z.ZodString;
|
|
145
145
|
path: z.ZodString;
|
|
@@ -170,8 +170,8 @@ export declare const TestTargetRunSchema: z.ZodObject<{
|
|
|
170
170
|
}, z.core.$strip>>;
|
|
171
171
|
}, z.core.$strip>;
|
|
172
172
|
export declare const TestRunModeSchema: z.ZodEnum<{
|
|
173
|
+
"source-files": "source-files";
|
|
173
174
|
compiled: "compiled";
|
|
174
|
-
raw: "raw";
|
|
175
175
|
both: "both";
|
|
176
176
|
}>;
|
|
177
177
|
export declare const TestRunTargetSummarySchema: z.ZodObject<{
|
|
@@ -184,8 +184,8 @@ export declare const TestRunTargetSummarySchema: z.ZodObject<{
|
|
|
184
184
|
total_checks: z.ZodNumber;
|
|
185
185
|
target: z.ZodObject<{
|
|
186
186
|
type: z.ZodEnum<{
|
|
187
|
+
"source-files": "source-files";
|
|
187
188
|
compiled: "compiled";
|
|
188
|
-
raw: "raw";
|
|
189
189
|
}>;
|
|
190
190
|
name: z.ZodString;
|
|
191
191
|
path: z.ZodString;
|
|
@@ -197,8 +197,8 @@ export declare const ReadinessCheckRunSchema: z.ZodObject<{
|
|
|
197
197
|
version: z.ZodLiteral<1>;
|
|
198
198
|
generated_at: z.ZodString;
|
|
199
199
|
mode: z.ZodEnum<{
|
|
200
|
+
"source-files": "source-files";
|
|
200
201
|
compiled: "compiled";
|
|
201
|
-
raw: "raw";
|
|
202
202
|
both: "both";
|
|
203
203
|
}>;
|
|
204
204
|
source_path: z.ZodString;
|
|
@@ -207,7 +207,7 @@ export declare const ReadinessCheckRunSchema: z.ZodObject<{
|
|
|
207
207
|
name: z.ZodString;
|
|
208
208
|
portable_context_path: z.ZodNullable<z.ZodString>;
|
|
209
209
|
}, z.core.$strip>;
|
|
210
|
-
|
|
210
|
+
source_files: z.ZodNullable<z.ZodObject<{
|
|
211
211
|
label: z.ZodString;
|
|
212
212
|
run_path: z.ZodString;
|
|
213
213
|
ok: z.ZodBoolean;
|
|
@@ -217,8 +217,8 @@ export declare const ReadinessCheckRunSchema: z.ZodObject<{
|
|
|
217
217
|
total_checks: z.ZodNumber;
|
|
218
218
|
target: z.ZodObject<{
|
|
219
219
|
type: z.ZodEnum<{
|
|
220
|
+
"source-files": "source-files";
|
|
220
221
|
compiled: "compiled";
|
|
221
|
-
raw: "raw";
|
|
222
222
|
}>;
|
|
223
223
|
name: z.ZodString;
|
|
224
224
|
path: z.ZodString;
|
|
@@ -235,8 +235,8 @@ export declare const ReadinessCheckRunSchema: z.ZodObject<{
|
|
|
235
235
|
total_checks: z.ZodNumber;
|
|
236
236
|
target: z.ZodObject<{
|
|
237
237
|
type: z.ZodEnum<{
|
|
238
|
+
"source-files": "source-files";
|
|
238
239
|
compiled: "compiled";
|
|
239
|
-
raw: "raw";
|
|
240
240
|
}>;
|
|
241
241
|
name: z.ZodString;
|
|
242
242
|
path: z.ZodString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { RuntimeExecutorInfoSchema, TestCaseExpectSchema, TestTargetTypeSchema, PreparationNameSchema, } from "
|
|
2
|
+
import { RuntimeExecutorInfoSchema, TestCaseExpectSchema, TestTargetTypeSchema, PreparationNameSchema, } from "../../../contracts/lib/schema.js";
|
|
3
3
|
const TestCaseCoreSchema = z.object({
|
|
4
4
|
id: z.string().regex(/^[a-z0-9][a-z0-9-]{0,79}$/),
|
|
5
5
|
question: z.string().min(1),
|
|
@@ -81,7 +81,7 @@ export const TestTargetRunSchema = z.object({
|
|
|
81
81
|
target_count: z.number(),
|
|
82
82
|
results: z.array(TestTargetResultSchema),
|
|
83
83
|
});
|
|
84
|
-
export const TestRunModeSchema = z.enum(["
|
|
84
|
+
export const TestRunModeSchema = z.enum(["source-files", "compiled", "both"]);
|
|
85
85
|
export const TestRunTargetSummarySchema = z.object({
|
|
86
86
|
label: z.string(),
|
|
87
87
|
run_path: z.string(),
|
|
@@ -108,7 +108,7 @@ export const ReadinessCheckRunSchema = z.object({
|
|
|
108
108
|
name: PreparationNameSchema,
|
|
109
109
|
portable_context_path: z.string().nullable(),
|
|
110
110
|
}),
|
|
111
|
-
|
|
111
|
+
source_files: TestRunTargetSummarySchema.nullable(),
|
|
112
112
|
compiled: TestRunTargetSummarySchema.nullable(),
|
|
113
113
|
summary: z.object({
|
|
114
114
|
source_files_pass_rate: z.number().nullable(),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { MethodExecutor } from "../agents/lib/executors.js";
|
|
2
|
-
import type { SourcePreparationConfig } from "
|
|
2
|
+
import type { SourcePreparationConfig } from "../../project/lib/schema.js";
|
|
3
3
|
import { type TestTargetCandidate, type TestTargetResult } from "./test.js";
|
|
4
4
|
import type { TestSandboxRetentionMode } from "./test-sandbox.js";
|
|
5
|
-
import { type ReadinessCheckRun
|
|
5
|
+
import { type ReadinessCheckRun } from "./lib/schema.js";
|
|
6
6
|
export interface SavedReadinessCheckOutcome {
|
|
7
7
|
runPath: string;
|
|
8
8
|
displayRunPath?: string;
|
|
@@ -13,18 +13,21 @@ export interface ReadinessCheckRunResult {
|
|
|
13
13
|
sourcePath: string;
|
|
14
14
|
preparationConfig: SourcePreparationConfig;
|
|
15
15
|
portableContextPath: string | null;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* 0.15 — `sourceFilesOutcome` is always `null`. Kept on the type so
|
|
18
|
+
* older readers parse cleanly during the rollout; remove in 0.16+.
|
|
19
|
+
*/
|
|
20
|
+
sourceFilesOutcome: SavedReadinessCheckOutcome | null;
|
|
18
21
|
compiledOutcome: SavedReadinessCheckOutcome | null;
|
|
19
22
|
readinessRunPath: string | null;
|
|
20
23
|
readinessRun: ReadinessCheckRun | null;
|
|
21
24
|
}
|
|
22
25
|
export declare function readinessPassRate(outcome: SavedReadinessCheckOutcome): number;
|
|
23
|
-
export declare function readSavedReadinessCheckRun(
|
|
26
|
+
export declare function readSavedReadinessCheckRun(prepDataDir: string, preparationName: string): ReadinessCheckRun | null;
|
|
24
27
|
export declare function parseReadinessCheckRun(value: unknown): ReadinessCheckRun | null;
|
|
25
28
|
export declare function readReadinessCheckRunAtPath(filePath: string, label?: string): ReadinessCheckRun | null;
|
|
26
29
|
export declare function readCurrentSavedReadinessCheckRun(options: {
|
|
27
|
-
|
|
30
|
+
prepDataDir: string;
|
|
28
31
|
preparationName: string;
|
|
29
32
|
checks: SourcePreparationConfig["checks"];
|
|
30
33
|
}): {
|
|
@@ -36,17 +39,8 @@ export declare function saveReadinessCheckRun(options: {
|
|
|
36
39
|
portableContextPath: string | null;
|
|
37
40
|
preparationName: string;
|
|
38
41
|
checksFingerprint: string;
|
|
39
|
-
mode: TestRunMode;
|
|
40
|
-
rawOutcome: SavedReadinessCheckOutcome | null;
|
|
41
42
|
compiledOutcome: SavedReadinessCheckOutcome | null;
|
|
42
43
|
}): string;
|
|
43
|
-
export declare function runSavedSourceFilesCheck(options: {
|
|
44
|
-
sourcePath: string;
|
|
45
|
-
preparationConfig: SourcePreparationConfig;
|
|
46
|
-
executor?: MethodExecutor | null;
|
|
47
|
-
preserveSandboxes?: TestSandboxRetentionMode;
|
|
48
|
-
runSuffix?: string | null;
|
|
49
|
-
}): Promise<SavedReadinessCheckOutcome | null>;
|
|
50
44
|
export declare function runSavedPortableContextCheck(options: {
|
|
51
45
|
sourcePath: string;
|
|
52
46
|
preparationConfig: SourcePreparationConfig;
|
|
@@ -59,7 +53,6 @@ export declare function runReadinessChecksForExecutor(options: {
|
|
|
59
53
|
sourcePath: string;
|
|
60
54
|
preparationConfig: SourcePreparationConfig;
|
|
61
55
|
portableContextPath: string | null;
|
|
62
|
-
mode: TestRunMode;
|
|
63
56
|
executor?: MethodExecutor | null;
|
|
64
57
|
preserveSandboxes?: TestSandboxRetentionMode;
|
|
65
58
|
runSuffix?: string | null;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
|
-
import { buildTestSpecFromCompiledPreparationConfig,
|
|
4
|
-
import { preparationLatestReadinessRunPath, preparationLatestReadinessSummaryPath, preparationTestRunPath, preparationTestRunsRoot, normalizePreparationTestRunId,
|
|
5
|
-
import { testRootForCompiled } from "../
|
|
6
|
-
import { readJsonFileWithSchema } from "
|
|
7
|
-
import { resolveMethodId } from "
|
|
8
|
-
import { createCompiledTestTarget,
|
|
3
|
+
import { buildTestSpecFromCompiledPreparationConfig, fingerprintReadinessChecks, } from "../../project/source-config.js";
|
|
4
|
+
import { asPreparationDataDir, preparationLatestReadinessRunPath, preparationLatestReadinessSummaryPath, preparationTestRunPath, preparationTestRunsRoot, normalizePreparationTestRunId, preparationPortableContextPath, } from "../../contracts/lib/preparation-paths.js";
|
|
5
|
+
import { testRootForCompiled } from "../compile/compiled-paths.js";
|
|
6
|
+
import { readJsonFileWithSchema } from "../../contracts/utils/parse.js";
|
|
7
|
+
import { resolveMethodId } from "../../methods/method-resolution.js";
|
|
8
|
+
import { createCompiledTestTarget, runTargetTestsAuto, saveTargetTestRun, } from "./test.js";
|
|
9
9
|
import { ReadinessCheckRunSchema, } from "./lib/schema.js";
|
|
10
10
|
export function readinessPassRate(outcome) {
|
|
11
11
|
return outcome.result.totalCases > 0
|
|
@@ -28,9 +28,9 @@ function summarizeSavedTestOutcome(label, outcome) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
function writePreparationTargetRun(options) {
|
|
31
|
-
const dirPath = preparationTestRunsRoot(options.
|
|
31
|
+
const dirPath = preparationTestRunsRoot(asPreparationDataDir(options.prepDataDir), options.preparationName, options.target);
|
|
32
32
|
mkdirSync(dirPath, { recursive: true });
|
|
33
|
-
const runPath = preparationTestRunPath(options.
|
|
33
|
+
const runPath = preparationTestRunPath(asPreparationDataDir(options.prepDataDir), options.preparationName, options.target, options.generatedAt, options.runId, options.runSuffix);
|
|
34
34
|
writeFileSync(runPath, `${JSON.stringify(options.payload, null, 2)}\n`);
|
|
35
35
|
return runPath;
|
|
36
36
|
}
|
|
@@ -41,23 +41,23 @@ function renderLatestSummaryMarkdown(payload) {
|
|
|
41
41
|
"| Target | Readiness checks |",
|
|
42
42
|
"| --- | --- |",
|
|
43
43
|
];
|
|
44
|
-
if (payload.
|
|
45
|
-
lines.push(`| Source files | \`${payload.
|
|
44
|
+
if (payload.source_files) {
|
|
45
|
+
lines.push(`| Source files | \`${payload.source_files.passed_cases}/${payload.source_files.total_cases}\` |`);
|
|
46
46
|
}
|
|
47
47
|
if (payload.compiled) {
|
|
48
48
|
lines.push(`| Portable Context | \`${payload.compiled.passed_cases}/${payload.compiled.total_cases}\` |`);
|
|
49
49
|
}
|
|
50
50
|
lines.push("");
|
|
51
|
-
if (payload.
|
|
52
|
-
lines.push(`- Latest source-files run: ${payload.
|
|
51
|
+
if (payload.source_files) {
|
|
52
|
+
lines.push(`- Latest source-files run: ${payload.source_files.run_path}`);
|
|
53
53
|
}
|
|
54
54
|
if (payload.compiled) {
|
|
55
55
|
lines.push(`- Latest portable-context run: ${payload.compiled.run_path}`);
|
|
56
56
|
}
|
|
57
57
|
return `${lines.join("\n")}\n`;
|
|
58
58
|
}
|
|
59
|
-
export function readSavedReadinessCheckRun(
|
|
60
|
-
const latestPath = preparationLatestReadinessRunPath(
|
|
59
|
+
export function readSavedReadinessCheckRun(prepDataDir, preparationName) {
|
|
60
|
+
const latestPath = preparationLatestReadinessRunPath(asPreparationDataDir(prepDataDir), preparationName);
|
|
61
61
|
if (!existsSync(latestPath))
|
|
62
62
|
return null;
|
|
63
63
|
return readReadinessCheckRunAtPath(latestPath, "latest readiness-check run");
|
|
@@ -70,7 +70,7 @@ export function readReadinessCheckRunAtPath(filePath, label = "readiness-check r
|
|
|
70
70
|
return readJsonFileWithSchema(filePath, label, ReadinessCheckRunSchema);
|
|
71
71
|
}
|
|
72
72
|
export function readCurrentSavedReadinessCheckRun(options) {
|
|
73
|
-
const latestRun = readSavedReadinessCheckRun(options.
|
|
73
|
+
const latestRun = readSavedReadinessCheckRun(options.prepDataDir, options.preparationName);
|
|
74
74
|
if (!latestRun) {
|
|
75
75
|
return { readinessRun: null, stale: false };
|
|
76
76
|
}
|
|
@@ -82,20 +82,9 @@ export function readCurrentSavedReadinessCheckRun(options) {
|
|
|
82
82
|
}
|
|
83
83
|
export function saveReadinessCheckRun(options) {
|
|
84
84
|
const generatedAt = new Date().toISOString();
|
|
85
|
-
const rawSummary = options.rawOutcome
|
|
86
|
-
? summarizeSavedTestOutcome("Source files", options.rawOutcome)
|
|
87
|
-
: null;
|
|
88
85
|
const compiledSummary = options.compiledOutcome
|
|
89
86
|
? summarizeSavedTestOutcome("Portable Context", options.compiledOutcome)
|
|
90
87
|
: null;
|
|
91
|
-
const effectiveMode = rawSummary && compiledSummary
|
|
92
|
-
? "both"
|
|
93
|
-
: rawSummary
|
|
94
|
-
? "raw"
|
|
95
|
-
: "compiled";
|
|
96
|
-
const rawPassRate = rawSummary
|
|
97
|
-
? Math.round((rawSummary.passed_cases / rawSummary.total_cases) * 100)
|
|
98
|
-
: null;
|
|
99
88
|
const compiledPassRate = compiledSummary
|
|
100
89
|
? Math.round((compiledSummary.passed_cases / compiledSummary.total_cases) * 100)
|
|
101
90
|
: null;
|
|
@@ -103,64 +92,33 @@ export function saveReadinessCheckRun(options) {
|
|
|
103
92
|
kind: "interf-readiness-check-run",
|
|
104
93
|
version: 1,
|
|
105
94
|
generated_at: generatedAt,
|
|
106
|
-
mode
|
|
95
|
+
// 0.15 — verify always runs in compiled-only mode. We keep the
|
|
96
|
+
// `mode: "compiled"` literal in the saved payload so existing
|
|
97
|
+
// dashboards / consumers that expect the field still parse.
|
|
98
|
+
mode: "compiled",
|
|
107
99
|
source_path: options.sourcePath,
|
|
108
100
|
checks_fingerprint: options.checksFingerprint,
|
|
109
101
|
preparation: {
|
|
110
102
|
name: options.preparationName,
|
|
111
103
|
portable_context_path: options.portableContextPath,
|
|
112
104
|
},
|
|
113
|
-
|
|
105
|
+
source_files: null,
|
|
114
106
|
compiled: compiledSummary,
|
|
115
107
|
summary: {
|
|
116
|
-
source_files_pass_rate:
|
|
108
|
+
source_files_pass_rate: null,
|
|
117
109
|
portable_context_pass_rate: compiledPassRate,
|
|
118
110
|
},
|
|
119
111
|
};
|
|
120
|
-
const latestStatePath = preparationLatestReadinessRunPath(options.sourcePath, options.preparationName);
|
|
112
|
+
const latestStatePath = preparationLatestReadinessRunPath(asPreparationDataDir(options.sourcePath), options.preparationName);
|
|
121
113
|
mkdirSync(dirname(latestStatePath), { recursive: true });
|
|
122
114
|
writeFileSync(latestStatePath, `${JSON.stringify(payload, null, 2)}\n`);
|
|
123
|
-
writeFileSync(preparationLatestReadinessSummaryPath(options.sourcePath, options.preparationName), renderLatestSummaryMarkdown(payload));
|
|
115
|
+
writeFileSync(preparationLatestReadinessSummaryPath(asPreparationDataDir(options.sourcePath), options.preparationName), renderLatestSummaryMarkdown(payload));
|
|
124
116
|
if (options.portableContextPath) {
|
|
125
117
|
mkdirSync(testRootForCompiled(options.portableContextPath), { recursive: true });
|
|
126
118
|
writeFileSync(join(testRootForCompiled(options.portableContextPath), "latest.json"), `${JSON.stringify(payload, null, 2)}\n`);
|
|
127
119
|
}
|
|
128
120
|
return latestStatePath;
|
|
129
121
|
}
|
|
130
|
-
export async function runSavedSourceFilesCheck(options) {
|
|
131
|
-
const spec = buildTestSpecFromSourceFolderConfig({
|
|
132
|
-
sourcePath: options.sourcePath,
|
|
133
|
-
targetName: options.preparationConfig.name,
|
|
134
|
-
targetType: "raw",
|
|
135
|
-
});
|
|
136
|
-
if (!spec)
|
|
137
|
-
return null;
|
|
138
|
-
const sourceFolderPath = resolveSourcePreparationPath(options.sourcePath, options.preparationConfig);
|
|
139
|
-
const target = createRawTestTarget(sourceFolderPath);
|
|
140
|
-
const artifactRoot = preparationLatestReadinessRunPath(options.sourcePath, options.preparationConfig.name);
|
|
141
|
-
const run = await runTargetTestsAuto(sourceFolderPath, spec, [target], {
|
|
142
|
-
executor: options.executor,
|
|
143
|
-
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
144
|
-
artifactRootPath: dirname(artifactRoot),
|
|
145
|
-
});
|
|
146
|
-
const result = run.results[0];
|
|
147
|
-
if (!result)
|
|
148
|
-
return null;
|
|
149
|
-
const preparationRunPath = writePreparationTargetRun({
|
|
150
|
-
projectPath: options.sourcePath,
|
|
151
|
-
preparationName: options.preparationConfig.name,
|
|
152
|
-
target: "file-as-is",
|
|
153
|
-
generatedAt: run.generated_at,
|
|
154
|
-
runId: normalizePreparationTestRunId(spec.id),
|
|
155
|
-
runSuffix: options.runSuffix,
|
|
156
|
-
payload: run,
|
|
157
|
-
});
|
|
158
|
-
return {
|
|
159
|
-
runPath: preparationRunPath,
|
|
160
|
-
target,
|
|
161
|
-
result,
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
122
|
export async function runSavedPortableContextCheck(options) {
|
|
165
123
|
const portableContextPath = options.portableContextPath
|
|
166
124
|
?? portableContextPathForPreparation(options.sourcePath, options.preparationConfig.name);
|
|
@@ -183,7 +141,7 @@ export async function runSavedPortableContextCheck(options) {
|
|
|
183
141
|
return null;
|
|
184
142
|
const compiledRunPath = saveTargetTestRun(portableContextPath, run);
|
|
185
143
|
const preparationRunPath = writePreparationTargetRun({
|
|
186
|
-
|
|
144
|
+
prepDataDir: options.sourcePath,
|
|
187
145
|
preparationName: options.preparationConfig.name,
|
|
188
146
|
target: "compiled",
|
|
189
147
|
generatedAt: run.generated_at,
|
|
@@ -199,29 +157,18 @@ export async function runSavedPortableContextCheck(options) {
|
|
|
199
157
|
};
|
|
200
158
|
}
|
|
201
159
|
export async function runReadinessChecksForExecutor(options) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
preparationConfig: options.preparationConfig,
|
|
215
|
-
executor: options.executor,
|
|
216
|
-
portableContextPath: options.portableContextPath,
|
|
217
|
-
preserveSandboxes: options.preserveSandboxes,
|
|
218
|
-
runSuffix: options.runSuffix,
|
|
219
|
-
})
|
|
220
|
-
: Promise.resolve(null);
|
|
221
|
-
const [rawOutcome, compiledOutcome] = await Promise.all([rawPromise, compiledPromise]);
|
|
222
|
-
const modeSatisfied = (options.mode !== "raw" || Boolean(rawOutcome)) &&
|
|
223
|
-
(options.mode !== "compiled" || Boolean(compiledOutcome)) &&
|
|
224
|
-
(options.mode !== "both" || (Boolean(rawOutcome) && Boolean(compiledOutcome)));
|
|
160
|
+
// 0.15 — verify runs always judge against the compiled portable
|
|
161
|
+
// context. The legacy `source-files` and `both` modes were retired
|
|
162
|
+
// in 0.13.1 and removed from the wire shape here.
|
|
163
|
+
const compiledOutcome = await runSavedPortableContextCheck({
|
|
164
|
+
sourcePath: options.sourcePath,
|
|
165
|
+
preparationConfig: options.preparationConfig,
|
|
166
|
+
executor: options.executor,
|
|
167
|
+
portableContextPath: options.portableContextPath,
|
|
168
|
+
preserveSandboxes: options.preserveSandboxes,
|
|
169
|
+
runSuffix: options.runSuffix,
|
|
170
|
+
});
|
|
171
|
+
const modeSatisfied = Boolean(compiledOutcome);
|
|
225
172
|
const shouldSave = options.saveLatest !== false;
|
|
226
173
|
const readinessRunPath = shouldSave && modeSatisfied
|
|
227
174
|
? saveReadinessCheckRun({
|
|
@@ -229,8 +176,6 @@ export async function runReadinessChecksForExecutor(options) {
|
|
|
229
176
|
portableContextPath: options.portableContextPath,
|
|
230
177
|
preparationName: options.preparationConfig.name,
|
|
231
178
|
checksFingerprint: fingerprintReadinessChecks(options.preparationConfig.checks),
|
|
232
|
-
mode: options.mode,
|
|
233
|
-
rawOutcome,
|
|
234
179
|
compiledOutcome,
|
|
235
180
|
})
|
|
236
181
|
: null;
|
|
@@ -241,13 +186,12 @@ export async function runReadinessChecksForExecutor(options) {
|
|
|
241
186
|
sourcePath: options.sourcePath,
|
|
242
187
|
preparationConfig: options.preparationConfig,
|
|
243
188
|
portableContextPath: options.portableContextPath,
|
|
244
|
-
|
|
245
|
-
rawOutcome,
|
|
189
|
+
sourceFilesOutcome: null,
|
|
246
190
|
compiledOutcome,
|
|
247
191
|
readinessRunPath,
|
|
248
192
|
readinessRun,
|
|
249
193
|
};
|
|
250
194
|
}
|
|
251
195
|
function portableContextPathForPreparation(sourcePath, preparationName) {
|
|
252
|
-
return
|
|
196
|
+
return preparationPortableContextPath(asPreparationDataDir(sourcePath), preparationName);
|
|
253
197
|
}
|
|
@@ -201,16 +201,16 @@ function buildTestQueryPrompt(target, testCase, answerPath, tracePath) {
|
|
|
201
201
|
"Read `AGENTS.md` first.",
|
|
202
202
|
"Use the local native `interf-query` skill available in this portable context.",
|
|
203
203
|
"Answer the check question the same way you would answer a real user inside this portable context.",
|
|
204
|
-
"Prefer the Method-declared portable-context outputs before consulting
|
|
205
|
-
"This sandbox is self-contained: the copied portable context has
|
|
206
|
-
"The original Interf Workspace is intentionally absent from this sandbox.
|
|
204
|
+
"Prefer the Method-declared portable-context outputs before consulting source references.",
|
|
205
|
+
"This sandbox is self-contained: the copied portable context has source references in `.interf/runtime/source-snapshot.json`.",
|
|
206
|
+
"The original Interf Workspace is intentionally absent from this sandbox. Use the source locators only when the portable context needs verification.",
|
|
207
207
|
]
|
|
208
208
|
: [
|
|
209
|
-
"You are running an Interf baseline test inside an isolated
|
|
209
|
+
"You are running an Interf baseline test inside an isolated source-files test shell.",
|
|
210
210
|
"Read `AGENTS.md` first.",
|
|
211
211
|
"Use the local native `interf-query` skill available in this shell.",
|
|
212
212
|
"There is no portable context in this sandbox.",
|
|
213
|
-
"Answer only from `
|
|
213
|
+
"Answer only from source references listed in `runtime/source-files.json` inside this shell.",
|
|
214
214
|
"The original control plane folder is intentionally absent from this sandbox.",
|
|
215
215
|
];
|
|
216
216
|
return [
|
|
@@ -218,7 +218,7 @@ function buildTestQueryPrompt(target, testCase, answerPath, tracePath) {
|
|
|
218
218
|
"Emit only STATUS:, DONE:, BLOCKED:, or ERROR: lines.",
|
|
219
219
|
"Do not ask follow-up questions.",
|
|
220
220
|
`Write the answer to ${JSON.stringify(answerPath)}.`,
|
|
221
|
-
`Write the trace to ${JSON.stringify(tracePath)} with keys: case_id, target, artifacts_consulted,
|
|
221
|
+
`Write the trace to ${JSON.stringify(tracePath)} with keys: case_id, target, artifacts_consulted, source_paths_read, used_source_files, answer_summary.`,
|
|
222
222
|
`Set \`case_id\` to ${JSON.stringify(testCase.id)}.`,
|
|
223
223
|
`Set \`target\` to ${JSON.stringify(target.type)}.`,
|
|
224
224
|
`Question: ${testCase.question}`,
|