@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,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `interf runs` — observe / cancel / fetch run records on the connected instance.
|
|
3
|
+
*
|
|
4
|
+
* interf runs ls [--prep <id>]
|
|
5
|
+
* interf runs status <run-id>
|
|
6
|
+
* interf runs cancel <run-id>
|
|
7
|
+
* interf runs fetch <run-id> --to <path>
|
|
8
|
+
*/
|
|
9
|
+
import chalk from "chalk";
|
|
10
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
11
|
+
import { dirname, isAbsolute, resolve } from "node:path";
|
|
12
|
+
import { CONNECT_OR_ERROR_HINT, readActiveConnection } from "../../packages/engine/connection-config.js";
|
|
13
|
+
function resolveConnection(args) {
|
|
14
|
+
const conn = readActiveConnection({
|
|
15
|
+
urlOverride: args.url,
|
|
16
|
+
authTokenOverride: args.token,
|
|
17
|
+
});
|
|
18
|
+
if (!conn) {
|
|
19
|
+
console.error(CONNECT_OR_ERROR_HINT);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
return { url: conn.url.replace(/\/+$/, ""), token: conn.auth_token };
|
|
23
|
+
}
|
|
24
|
+
async function callJson(url, token, init = {}) {
|
|
25
|
+
const headers = new Headers(init.headers ?? {});
|
|
26
|
+
if (token)
|
|
27
|
+
headers.set("authorization", `Bearer ${token}`);
|
|
28
|
+
if (init.body && !headers.has("content-type"))
|
|
29
|
+
headers.set("content-type", "application/json");
|
|
30
|
+
const response = await fetch(url, { ...init, headers });
|
|
31
|
+
const raw = await response.text();
|
|
32
|
+
let body = null;
|
|
33
|
+
if (raw) {
|
|
34
|
+
try {
|
|
35
|
+
body = JSON.parse(raw);
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
body = null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return { status: response.status, body, raw };
|
|
42
|
+
}
|
|
43
|
+
export const runsCommand = {
|
|
44
|
+
command: "runs <subcommand>",
|
|
45
|
+
describe: "Inspect runs on the connected instance",
|
|
46
|
+
builder: (yargs) => yargs
|
|
47
|
+
.option("url", { type: "string", describe: "Override the active connection URL" })
|
|
48
|
+
.option("token", { type: "string", describe: "Override the active bearer token" })
|
|
49
|
+
.command("ls", "List runs (optionally filtered by preparation)", (y) => y.option("prep", { type: "string", describe: "Filter by preparation id" }), async (args) => {
|
|
50
|
+
const { url, token } = resolveConnection(args);
|
|
51
|
+
const path = args.prep
|
|
52
|
+
? `/v1/preparations/${encodeURIComponent(args.prep)}/runs`
|
|
53
|
+
: "/v1/runs";
|
|
54
|
+
const { status, body, raw } = await callJson(`${url}${path}`, token);
|
|
55
|
+
if (status !== 200) {
|
|
56
|
+
console.error(chalk.red(`Failed to list runs (HTTP ${status}).`));
|
|
57
|
+
if (raw)
|
|
58
|
+
console.error(raw);
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
const runs = body?.runs
|
|
62
|
+
?? (body?.compile_runs ?? []).map((r) => r.run).filter(Boolean);
|
|
63
|
+
if (runs.length === 0) {
|
|
64
|
+
console.log(chalk.dim(" No runs."));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
console.log();
|
|
68
|
+
for (const run of runs) {
|
|
69
|
+
console.log(` ${chalk.bold(run.run_id)} ${chalk.dim(`(${run.status ?? "?"})`)}`);
|
|
70
|
+
if (run.preparation)
|
|
71
|
+
console.log(chalk.dim(` prep: ${run.preparation}`));
|
|
72
|
+
if (run.started_at)
|
|
73
|
+
console.log(chalk.dim(` started: ${run.started_at}`));
|
|
74
|
+
}
|
|
75
|
+
console.log();
|
|
76
|
+
})
|
|
77
|
+
.command("status <run-id>", "Show full record for a run", (y) => y.positional("run-id", { type: "string", demandOption: true, describe: "Run id" }), async (args) => {
|
|
78
|
+
const { url, token } = resolveConnection(args);
|
|
79
|
+
const { status, raw } = await callJson(`${url}/v1/runs/${encodeURIComponent(args.runId)}`, token);
|
|
80
|
+
if (status !== 200) {
|
|
81
|
+
console.error(chalk.red(`Failed to read run ${args.runId} (HTTP ${status}).`));
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
console.log(raw);
|
|
85
|
+
})
|
|
86
|
+
.command("cancel <run-id>", "Cancel a running run", (y) => y.positional("run-id", { type: "string", demandOption: true, describe: "Run id" }), async (args) => {
|
|
87
|
+
const { url, token } = resolveConnection(args);
|
|
88
|
+
const { status, raw } = await callJson(`${url}/v1/runs/${encodeURIComponent(args.runId)}/cancel`, token, { method: "POST", body: JSON.stringify({}) });
|
|
89
|
+
if (status !== 200 && status !== 202 && status !== 204) {
|
|
90
|
+
console.error(chalk.red(`Failed to cancel ${args.runId} (HTTP ${status}).`));
|
|
91
|
+
if (raw)
|
|
92
|
+
console.error(raw);
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
console.log(chalk.green(`Cancelled ${chalk.bold(args.runId)}.`));
|
|
96
|
+
})
|
|
97
|
+
.command("fetch <run-id>", "Download a run's portable context", (y) => y
|
|
98
|
+
.positional("run-id", { type: "string", demandOption: true, describe: "Run id" })
|
|
99
|
+
.option("to", { type: "string", demandOption: true, describe: "Target path" }), async (args) => {
|
|
100
|
+
const { url, token } = resolveConnection(args);
|
|
101
|
+
const headers = new Headers();
|
|
102
|
+
if (token)
|
|
103
|
+
headers.set("authorization", `Bearer ${token}`);
|
|
104
|
+
const response = await fetch(`${url}/v1/runs/${encodeURIComponent(args.runId)}/artifacts/portable-context`, { headers });
|
|
105
|
+
if (response.status !== 200) {
|
|
106
|
+
console.error(chalk.red(`Failed to fetch artifact (HTTP ${response.status}).`));
|
|
107
|
+
process.exit(1);
|
|
108
|
+
}
|
|
109
|
+
const target = isAbsolute(args.to) ? args.to : resolve(process.cwd(), args.to);
|
|
110
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
111
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
112
|
+
writeFileSync(target, buffer);
|
|
113
|
+
console.log(chalk.green(`Wrote ${target} (${buffer.length} bytes).`));
|
|
114
|
+
})
|
|
115
|
+
.demandCommand(1)
|
|
116
|
+
.strict(),
|
|
117
|
+
handler: () => {
|
|
118
|
+
/* yargs subcommand handlers do the work */
|
|
119
|
+
},
|
|
120
|
+
};
|
|
@@ -1,121 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `interf status` — print connection state + preparation summary.
|
|
3
|
+
*/
|
|
1
4
|
import chalk from "chalk";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
import { CONNECT_OR_ERROR_HINT, readActiveConnection } from "../../packages/engine/connection-config.js";
|
|
6
|
+
async function callJson(url, token) {
|
|
7
|
+
const headers = new Headers();
|
|
8
|
+
if (token)
|
|
9
|
+
headers.set("authorization", `Bearer ${token}`);
|
|
10
|
+
try {
|
|
11
|
+
const response = await fetch(url, { headers });
|
|
12
|
+
const raw = await response.text();
|
|
13
|
+
let body = null;
|
|
14
|
+
if (raw) {
|
|
15
|
+
try {
|
|
16
|
+
body = JSON.parse(raw);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
body = null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return { status: response.status, body };
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return { status: 0, body: null };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
5
28
|
export const statusCommand = {
|
|
6
29
|
command: "status",
|
|
7
|
-
describe: "Show
|
|
8
|
-
builder: (yargs) => yargs
|
|
9
|
-
type: "
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const serviceProjectPath = detected ? resolveSourceControlPath(detected.path) : resolveCommandControlPath();
|
|
16
|
-
const service = await findLocalService({
|
|
17
|
-
projectPath: serviceProjectPath,
|
|
18
|
-
timeoutMs: 200,
|
|
30
|
+
describe: "Show connection + preparation summary",
|
|
31
|
+
builder: (yargs) => yargs
|
|
32
|
+
.option("url", { type: "string", describe: "Override the active connection URL" })
|
|
33
|
+
.option("token", { type: "string", describe: "Override the active bearer token" }),
|
|
34
|
+
handler: async (args) => {
|
|
35
|
+
const conn = readActiveConnection({
|
|
36
|
+
urlOverride: args.url,
|
|
37
|
+
authTokenOverride: args.token,
|
|
19
38
|
});
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
if (!conn) {
|
|
40
|
+
console.error(CONNECT_OR_ERROR_HINT);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
const url = conn.url.replace(/\/+$/, "");
|
|
44
|
+
const token = conn.auth_token;
|
|
45
|
+
const instance = await callJson(`${url}/v1/instance`, token);
|
|
46
|
+
if (instance.status === 0) {
|
|
47
|
+
console.error(chalk.red(`Connection ${url} is unreachable.`));
|
|
48
|
+
console.error(CONNECT_OR_ERROR_HINT);
|
|
49
|
+
process.exit(1);
|
|
26
50
|
}
|
|
27
|
-
process.exitCode = 1;
|
|
28
|
-
console.log(chalk.red(" Interf local service is not running."));
|
|
29
|
-
console.log(chalk.dim(" Start `interf web`, then rerun `interf status` so status comes from the service source of truth."));
|
|
30
|
-
return;
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
function formatEventTime(value) {
|
|
34
|
-
const date = new Date(value);
|
|
35
|
-
if (Number.isNaN(date.valueOf()))
|
|
36
|
-
return value;
|
|
37
|
-
return date.toLocaleTimeString([], {
|
|
38
|
-
hour: "2-digit",
|
|
39
|
-
minute: "2-digit",
|
|
40
|
-
second: "2-digit",
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function testScore(run) {
|
|
44
|
-
const compiled = run.readiness_run?.compiled;
|
|
45
|
-
const raw = run.readiness_run?.raw;
|
|
46
|
-
if (compiled)
|
|
47
|
-
return `${compiled.passed_cases}/${compiled.total_cases}`;
|
|
48
|
-
if (raw)
|
|
49
|
-
return `${raw.passed_cases}/${raw.total_cases}`;
|
|
50
|
-
return "pending";
|
|
51
|
-
}
|
|
52
|
-
function compileRunEventDetail(event) {
|
|
53
|
-
if ("message" in event && typeof event.message === "string")
|
|
54
|
-
return event.message;
|
|
55
|
-
if ("summary" in event && typeof event.summary === "string")
|
|
56
|
-
return event.summary;
|
|
57
|
-
if ("error" in event && typeof event.error === "string")
|
|
58
|
-
return event.error;
|
|
59
|
-
if ("stage_id" in event && typeof event.stage_id === "string")
|
|
60
|
-
return event.stage_id;
|
|
61
|
-
return "recorded";
|
|
62
|
-
}
|
|
63
|
-
async function printLocalServiceStatus(serviceUrl) {
|
|
64
|
-
const { jobs, compileRuns, testRuns } = await readLocalServiceRunSnapshot({ serviceUrl });
|
|
65
|
-
const latestJob = jobs[0] ?? null;
|
|
66
|
-
const latestCompile = compileRuns[0]?.run ?? null;
|
|
67
|
-
const latestTest = testRuns[0] ?? null;
|
|
68
|
-
console.log();
|
|
69
|
-
console.log(chalk.green(" Interf local service is running"));
|
|
70
|
-
console.log(chalk.dim(` Interf: ${serviceUrl}/`));
|
|
71
|
-
if (latestJob) {
|
|
72
51
|
console.log();
|
|
73
|
-
console.log(chalk.bold(
|
|
74
|
-
console.log(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
console.log(chalk.dim(` steps: ${stepSummary}`));
|
|
82
|
-
for (const event of latestJob.events.slice(-4)) {
|
|
83
|
-
const detail = event.message ?? event.step_id ?? "recorded";
|
|
84
|
-
console.log(chalk.dim(` ${formatEventTime(event.timestamp)} ${event.type} ${detail}`));
|
|
52
|
+
console.log(chalk.bold(" Interf engine"));
|
|
53
|
+
console.log(` URL: ${url}`);
|
|
54
|
+
if (instance.body?.pid)
|
|
55
|
+
console.log(` PID: ${instance.body.pid}`);
|
|
56
|
+
if (instance.body?.package_version)
|
|
57
|
+
console.log(` Version: ${instance.body.package_version}`);
|
|
58
|
+
if (instance.body?.uptime_seconds !== undefined) {
|
|
59
|
+
console.log(` Uptime: ${instance.body.uptime_seconds}s`);
|
|
85
60
|
}
|
|
86
|
-
|
|
87
|
-
|
|
61
|
+
console.log(` Auth: ${instance.body?.auth_required ? "required (token in connection.json)" : "open (loopback)"}`);
|
|
62
|
+
const preps = await callJson(`${url}/v1/preparations`, token);
|
|
63
|
+
const list = preps.body?.preparations ?? [];
|
|
88
64
|
console.log();
|
|
89
|
-
console.log(chalk.bold(`
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
for (const event of events) {
|
|
100
|
-
const detail = compileRunEventDetail(event);
|
|
101
|
-
console.log(chalk.dim(` ${formatEventTime(event.timestamp)} ${event.type} ${detail}`));
|
|
65
|
+
console.log(chalk.bold(` Preparations (${list.length})`));
|
|
66
|
+
if (list.length === 0) {
|
|
67
|
+
console.log(chalk.dim(" No preparations yet. `interf prep create <id> --source <path> --method <id>`."));
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
for (const prep of list) {
|
|
71
|
+
const readiness = prep.readiness?.status ?? "—";
|
|
72
|
+
console.log(` ${chalk.bold(prep.id)} ${chalk.dim(`(${prep.method_id} · ${readiness})`)}`);
|
|
73
|
+
console.log(chalk.dim(` source: ${prep.source.locator}`));
|
|
74
|
+
}
|
|
102
75
|
}
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
console.log(chalk.dim(" No prepare runs recorded by the local service yet."));
|
|
106
|
-
}
|
|
107
|
-
if (latestTest) {
|
|
108
76
|
console.log();
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
console.log(chalk.dim(` mode: ${latestTest.mode}`));
|
|
112
|
-
console.log(chalk.dim(` readiness checks: ${testScore(latestTest)}`));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
async function watchLocalServiceStatus(serviceUrl) {
|
|
116
|
-
while (true) {
|
|
117
|
-
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
118
|
-
console.clear();
|
|
119
|
-
await printLocalServiceStatus(serviceUrl);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
77
|
+
},
|
|
78
|
+
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import type { CommandModule } from "yargs";
|
|
2
|
-
|
|
2
|
+
interface VerifyArgs {
|
|
3
|
+
prepId: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
token?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const verifyCommand: CommandModule<unknown, VerifyArgs>;
|
|
8
|
+
export {};
|
|
@@ -1,94 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `interf verify <prep-id>` — verify a preparation's claim-checks via a
|
|
3
|
+
* judge against the latest compiled portable context. Together with the
|
|
4
|
+
* method's structural checks (auto-run on every `interf compile`), this
|
|
5
|
+
* feeds the preparation's overall readiness state.
|
|
6
|
+
*
|
|
7
|
+
* interf verify bristol
|
|
8
|
+
*/
|
|
1
9
|
import chalk from "chalk";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return "method";
|
|
14
|
-
return null;
|
|
10
|
+
import { CONNECT_OR_ERROR_HINT, readActiveConnection } from "../../packages/engine/connection-config.js";
|
|
11
|
+
function resolveConnection(args) {
|
|
12
|
+
const conn = readActiveConnection({
|
|
13
|
+
urlOverride: args.url,
|
|
14
|
+
authTokenOverride: args.token,
|
|
15
|
+
});
|
|
16
|
+
if (!conn) {
|
|
17
|
+
console.error(CONNECT_OR_ERROR_HINT);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
return { url: conn.url.replace(/\/+$/, ""), token: conn.auth_token };
|
|
15
21
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
type
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
.option("path", {
|
|
29
|
-
type: "string",
|
|
30
|
-
describe: "Path to a Method package when using `verify method`",
|
|
31
|
-
})
|
|
32
|
-
.option("json", {
|
|
33
|
-
type: "boolean",
|
|
34
|
-
default: false,
|
|
35
|
-
describe: "Print JSON output",
|
|
36
|
-
}),
|
|
37
|
-
handler: async (argv) => {
|
|
38
|
-
const check = normalizeVerifyCheck(argv.check);
|
|
39
|
-
if (!check) {
|
|
40
|
-
process.exitCode = 1;
|
|
41
|
-
console.log(chalk.red(`Unknown verify check: ${String(argv.check)}`));
|
|
42
|
-
return;
|
|
22
|
+
async function callJson(url, token, init = {}) {
|
|
23
|
+
const headers = new Headers(init.headers ?? {});
|
|
24
|
+
if (token)
|
|
25
|
+
headers.set("authorization", `Bearer ${token}`);
|
|
26
|
+
if (init.body && !headers.has("content-type"))
|
|
27
|
+
headers.set("content-type", "application/json");
|
|
28
|
+
const response = await fetch(url, { ...init, headers });
|
|
29
|
+
const raw = await response.text();
|
|
30
|
+
let body = null;
|
|
31
|
+
if (raw.length > 0) {
|
|
32
|
+
try {
|
|
33
|
+
body = JSON.parse(raw);
|
|
43
34
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const path = argv.path;
|
|
47
|
-
if (!path) {
|
|
48
|
-
process.exitCode = 1;
|
|
49
|
-
console.log(chalk.red("`interf verify method` needs --path <method-dir>."));
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
result = validateMethodPackage(path);
|
|
35
|
+
catch {
|
|
36
|
+
body = null;
|
|
53
37
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
38
|
+
}
|
|
39
|
+
return { status: response.status, body, raw };
|
|
40
|
+
}
|
|
41
|
+
export const verifyCommand = {
|
|
42
|
+
command: "verify <prep-id>",
|
|
43
|
+
describe: "Verify a preparation's claim-checks against its portable context",
|
|
44
|
+
builder: (yargs) => yargs
|
|
45
|
+
.positional("prep-id", { type: "string", demandOption: true, describe: "Preparation id" })
|
|
46
|
+
.option("url", { type: "string", describe: "Override the active connection URL" })
|
|
47
|
+
.option("token", { type: "string", describe: "Override the active bearer token" }),
|
|
48
|
+
handler: async (args) => {
|
|
49
|
+
const { url, token } = resolveConnection(args);
|
|
50
|
+
// 0.15 hard-error: refuse to start a verify run if the engine has
|
|
51
|
+
// zero connected agents — verifier-role stages can't run without
|
|
52
|
+
// one.
|
|
53
|
+
const instance = await callJson(`${url}/v1/instance`, token);
|
|
54
|
+
if (instance.body && instance.body.agent_count === 0) {
|
|
55
|
+
console.error(chalk.red(" Cannot verify — no agents available."));
|
|
56
|
+
console.error(" Install Claude Code, Codex, Gemini, or another agent CLI, or");
|
|
57
|
+
console.error(" register a custom CLI: `interf agents register <name> --command <cmd>`.");
|
|
58
|
+
process.exit(1);
|
|
73
59
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
60
|
+
// Verify the user's claims against the compiled portable context.
|
|
61
|
+
// The legacy "source-files" / "both" targets (file-as-is judging)
|
|
62
|
+
// are gone — claims are evaluated against the compiled output only.
|
|
63
|
+
const { status, body, raw } = await callJson(`${url}/v1/preparations/${encodeURIComponent(args.prepId)}/verify-runs`, token, { method: "POST", body: JSON.stringify({ mode: "compiled" }) });
|
|
64
|
+
if (status !== 201 && status !== 200) {
|
|
65
|
+
console.error(chalk.red(`Failed to start verify run for ${args.prepId} (HTTP ${status}).`));
|
|
66
|
+
if (raw)
|
|
67
|
+
console.error(raw);
|
|
68
|
+
process.exit(1);
|
|
80
69
|
}
|
|
81
|
-
const typed = result;
|
|
82
70
|
console.log();
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
for (const error of typed.errors ?? []) {
|
|
90
|
-
console.log(chalk.dim(` - ${error}`));
|
|
91
|
-
}
|
|
92
|
-
}
|
|
71
|
+
console.log(` Run ${chalk.bold(body?.run_id ?? "(?)")} ${chalk.dim(`(${body?.status ?? "started"})`)}`);
|
|
72
|
+
if (body?.readiness?.status)
|
|
73
|
+
console.log(` Readiness: ${body.readiness.status}`);
|
|
74
|
+
if (body?.error)
|
|
75
|
+
console.log(chalk.red(` Error: ${body.error}`));
|
|
76
|
+
console.log();
|
|
93
77
|
},
|
|
94
78
|
};
|
|
@@ -1,11 +1,2 @@
|
|
|
1
1
|
import type { CommandModule } from "yargs";
|
|
2
2
|
export declare const webCommand: CommandModule;
|
|
3
|
-
export interface WebProjectPaths {
|
|
4
|
-
controlPath: string;
|
|
5
|
-
sourceFolderPath: string | null;
|
|
6
|
-
}
|
|
7
|
-
export declare function resolveWebProjectPaths(argv?: Record<string, unknown>, cwd?: string): WebProjectPaths;
|
|
8
|
-
export declare function ensureWebProjectInitialized(controlPath: string, options?: {
|
|
9
|
-
sourceFolderPath?: string | null;
|
|
10
|
-
}): void;
|
|
11
|
-
export declare function runWebCommand(argv?: Record<string, unknown>): Promise<void>;
|