@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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { isMethodId, listLocalMethodDefinitions, loadLocalMethodDefinition, loadMethodDefinitionFromDir, } from "./local-methods.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { builtinMethodPackagePath, isMethodId, listLocalMethodDefinitions, loadLocalMethodDefinition, loadMethodDefinitionFromDir, mergeStagePolicyNotesForStages, } from "./local-methods.js";
|
|
4
|
+
import { listUserMethodDefinitions, loadUserMethodDefinition, } from "./user-methods.js";
|
|
5
|
+
import { warnInterf } from "../../contracts/utils/logger.js";
|
|
6
|
+
import { methodPackagePathForCompiled } from "../../engine/compile/compiled-paths.js";
|
|
7
|
+
import { asPreparationDataDir, preparationMethodPackagePath } from "../../contracts/lib/preparation-paths.js";
|
|
8
|
+
import { resolveSourceControlPath } from "../../project/interf.js";
|
|
8
9
|
import { deriveMethodInputsFromContextInterface, } from "./context-interface.js";
|
|
9
|
-
import { mergeStagePolicyNotesForStages } from "./method-stage-policy.js";
|
|
10
10
|
const DEFAULT_METHOD_ID = "interf-default";
|
|
11
11
|
let builtinDefaultMethodCache = null;
|
|
12
12
|
function toMethodStages(stages) {
|
|
@@ -16,6 +16,7 @@ function toMethodStages(stages) {
|
|
|
16
16
|
description: stage.description ?? stage.label,
|
|
17
17
|
contractType: stage.contract_type,
|
|
18
18
|
skillDir: stage.skill_dir ?? stage.id,
|
|
19
|
+
role: stage.role && stage.role.trim().length > 0 ? stage.role : "general",
|
|
19
20
|
reads: [...stage.reads],
|
|
20
21
|
writes: [...stage.writes],
|
|
21
22
|
...(stage.acceptance ? { acceptance: stage.acceptance } : {}),
|
|
@@ -56,9 +57,6 @@ export function standaloneMethodDefinitionFromLocalPackage(local) {
|
|
|
56
57
|
scope: "local",
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
|
-
function builtinMethodPackagePath(methodId) {
|
|
60
|
-
return join(PACKAGE_ROOT, "builtin-methods", methodId);
|
|
61
|
-
}
|
|
62
60
|
function getBuiltinDefaultMethod() {
|
|
63
61
|
if (builtinDefaultMethodCache)
|
|
64
62
|
return builtinDefaultMethodCache;
|
|
@@ -78,24 +76,41 @@ function getBuiltinDefaultMethod() {
|
|
|
78
76
|
function listBuiltinCompiledMethods() {
|
|
79
77
|
return [getBuiltinDefaultMethod()];
|
|
80
78
|
}
|
|
81
|
-
function resolveCompiledMethodFromLocal(methodId,
|
|
82
|
-
const local = loadLocalMethodDefinition(
|
|
79
|
+
function resolveCompiledMethodFromLocal(methodId, prepDataDir) {
|
|
80
|
+
const local = loadLocalMethodDefinition(prepDataDir, methodId);
|
|
83
81
|
if (!local)
|
|
84
82
|
return null;
|
|
85
83
|
const resolved = standaloneMethodDefinitionFromLocalPackage(local);
|
|
86
84
|
return resolved;
|
|
87
85
|
}
|
|
88
|
-
|
|
86
|
+
function resolveCompiledMethodFromUserLibrary(methodId) {
|
|
87
|
+
const user = loadUserMethodDefinition(methodId);
|
|
88
|
+
if (!user)
|
|
89
|
+
return null;
|
|
90
|
+
const resolved = standaloneMethodDefinitionFromLocalPackage(user);
|
|
91
|
+
return { ...resolved, scope: "user" };
|
|
92
|
+
}
|
|
93
|
+
export function listCompiledMethodChoices(prepDataDir) {
|
|
89
94
|
const builtins = listBuiltinCompiledMethods();
|
|
90
|
-
if (!sourcePath)
|
|
91
|
-
return builtins;
|
|
92
95
|
const methodsById = new Map();
|
|
93
96
|
for (const method of builtins) {
|
|
94
97
|
methodsById.set(method.id, method);
|
|
95
98
|
}
|
|
96
|
-
for (const definition of
|
|
99
|
+
for (const definition of listUserMethodDefinitions()) {
|
|
100
|
+
try {
|
|
101
|
+
const method = resolveCompiledMethodFromUserLibrary(definition.id);
|
|
102
|
+
if (method)
|
|
103
|
+
methodsById.set(method.id, method);
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
warnInterf(`Warning: skipping user Method "${definition.id}" because it could not be resolved cleanly: ${error instanceof Error ? error.message : String(error)}`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (!prepDataDir)
|
|
110
|
+
return [...methodsById.values()];
|
|
111
|
+
for (const definition of listLocalMethodDefinitions(prepDataDir)) {
|
|
97
112
|
try {
|
|
98
|
-
const method = resolveCompiledMethodFromLocal(definition.id,
|
|
113
|
+
const method = resolveCompiledMethodFromLocal(definition.id, prepDataDir);
|
|
99
114
|
if (method)
|
|
100
115
|
methodsById.set(method.id, method);
|
|
101
116
|
}
|
|
@@ -106,16 +121,21 @@ export function listCompiledMethodChoices(sourcePath) {
|
|
|
106
121
|
return [...methodsById.values()];
|
|
107
122
|
}
|
|
108
123
|
export function getCompiledMethod(methodId, options = {}) {
|
|
124
|
+
if (options.prepDataDir) {
|
|
125
|
+
const local = resolveCompiledMethodFromLocal(methodId, options.prepDataDir);
|
|
126
|
+
if (local)
|
|
127
|
+
return local;
|
|
128
|
+
}
|
|
129
|
+
const user = resolveCompiledMethodFromUserLibrary(methodId);
|
|
130
|
+
if (user)
|
|
131
|
+
return user;
|
|
109
132
|
const builtin = listBuiltinCompiledMethods().find((candidate) => candidate.id === methodId);
|
|
110
133
|
if (builtin)
|
|
111
134
|
return builtin;
|
|
112
|
-
if (options.
|
|
113
|
-
|
|
114
|
-
if (local)
|
|
115
|
-
return local;
|
|
116
|
-
throw new Error(`No local Method package found for "${methodId}" under ${join(options.sourcePath, "interf", "methods", methodId)}.`);
|
|
135
|
+
if (options.prepDataDir) {
|
|
136
|
+
throw new Error(`No Method "${methodId}" found in this workspace, in your user library, or among bundled Methods. Looked under ${preparationMethodPackagePath(asPreparationDataDir(options.prepDataDir), methodId)} and ~/.interf/methods/${methodId}.`);
|
|
117
137
|
}
|
|
118
|
-
throw new Error(`Method "${methodId}" is not built-in
|
|
138
|
+
throw new Error(`Method "${methodId}" is not built-in and no workspace root was provided to look for a local override.`);
|
|
119
139
|
}
|
|
120
140
|
export function getActiveCompiledMethod(compiledPath) {
|
|
121
141
|
const methodPath = methodPackagePathForCompiled(compiledPath);
|
|
@@ -147,15 +167,12 @@ export function resolveRequiredCompiledMethodFromConfig(config, label = "compile
|
|
|
147
167
|
}
|
|
148
168
|
return methodId;
|
|
149
169
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (sourcePath &&
|
|
155
|
-
existsSync(join(methodPackagePathForCompiled(sourcePath), "method.json"))) {
|
|
156
|
-
return getActiveCompiledMethod(sourcePath);
|
|
170
|
+
function resolveMethodDefinitionForStageMetadata(methodId, prepDataDir) {
|
|
171
|
+
if (prepDataDir &&
|
|
172
|
+
existsSync(join(methodPackagePathForCompiled(prepDataDir), "method.json"))) {
|
|
173
|
+
return getActiveCompiledMethod(prepDataDir);
|
|
157
174
|
}
|
|
158
|
-
return getCompiledMethod(methodId, {
|
|
175
|
+
return getCompiledMethod(methodId, { prepDataDir });
|
|
159
176
|
}
|
|
160
177
|
function formatMethodStageStep(method, stage) {
|
|
161
178
|
const stageIndex = method.stages.findIndex((candidate) => candidate.id === stage);
|
|
@@ -168,12 +185,12 @@ function formatMethodStageStep(method, stage) {
|
|
|
168
185
|
}
|
|
169
186
|
return `Stage ${stageIndex + 1}/${method.stages.length} - ${stageDefinition.label}`;
|
|
170
187
|
}
|
|
171
|
-
export function getMethodStageDefinition(methodId, stage,
|
|
172
|
-
const method = resolveMethodDefinitionForStageMetadata(methodId,
|
|
188
|
+
export function getMethodStageDefinition(methodId, stage, prepDataDir) {
|
|
189
|
+
const method = resolveMethodDefinitionForStageMetadata(methodId, prepDataDir);
|
|
173
190
|
return method.stages.find((candidate) => candidate.id === stage) ?? null;
|
|
174
191
|
}
|
|
175
|
-
export function getMethodStagePosition(methodId, stage,
|
|
176
|
-
const stages = getMethodStages(methodId,
|
|
192
|
+
export function getMethodStagePosition(methodId, stage, prepDataDir) {
|
|
193
|
+
const stages = getMethodStages(methodId, prepDataDir);
|
|
177
194
|
const stageIndex = stages.findIndex((candidate) => candidate === stage);
|
|
178
195
|
if (stageIndex === -1)
|
|
179
196
|
return null;
|
|
@@ -183,16 +200,12 @@ export function getMethodStagePosition(methodId, stage, sourcePath) {
|
|
|
183
200
|
stages: [...stages],
|
|
184
201
|
};
|
|
185
202
|
}
|
|
186
|
-
export function getMethodStages(methodId,
|
|
187
|
-
return resolveMethodDefinitionForStageMetadata(methodId,
|
|
203
|
+
export function getMethodStages(methodId, prepDataDir) {
|
|
204
|
+
return resolveMethodDefinitionForStageMetadata(methodId, prepDataDir).stages.map((definition) => definition.id);
|
|
188
205
|
}
|
|
189
206
|
export function getActiveCompiledStages(compiledPath) {
|
|
190
207
|
return getActiveCompiledMethod(compiledPath).stages.map((definition) => definition.id);
|
|
191
208
|
}
|
|
192
|
-
export function getMethodStagePolicyNotes(methodId, stage, sourcePath) {
|
|
193
|
-
const method = resolveMethodDefinitionForStageMetadata(methodId, sourcePath);
|
|
194
|
-
return [...(method.stagePolicyNotes?.[stage] ?? [])];
|
|
195
|
-
}
|
|
196
209
|
export function getActiveCompiledStagePolicyNotes(compiledPath, stage) {
|
|
197
210
|
const method = getActiveCompiledMethod(compiledPath);
|
|
198
211
|
return [...(method.stagePolicyNotes?.[stage] ?? [])];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type LocalInstructionMode, type RuntimeInstructionMode, type RuntimeStageInstructions } from "
|
|
1
|
+
import { type LocalInstructionMode, type RuntimeInstructionMode, type RuntimeStageInstructions } from "../../engine/compile/lib/schema.js";
|
|
2
2
|
import { type MethodStageDefinition } from "./method-definitions.js";
|
|
3
3
|
export interface MethodReporter {
|
|
4
4
|
line?: (message: string) => void;
|
|
@@ -9,8 +9,6 @@ export interface MethodStageResult {
|
|
|
9
9
|
code: number;
|
|
10
10
|
summary?: string | null;
|
|
11
11
|
}
|
|
12
|
-
export declare function methodQueryDirectory(): string;
|
|
13
|
-
export declare function methodImproveDirectory(): string;
|
|
14
12
|
export declare function methodCompileStageDirectory(stageDir: string): string;
|
|
15
13
|
export interface LocalSkillContractExtension {
|
|
16
14
|
reads: string[];
|
|
@@ -20,19 +18,9 @@ export interface LocalSkillContractExtension {
|
|
|
20
18
|
effectiveMode: RuntimeInstructionMode;
|
|
21
19
|
modeSources: string[];
|
|
22
20
|
}
|
|
23
|
-
export declare function emptyLocalSkillContractExtension(): LocalSkillContractExtension;
|
|
24
21
|
export declare function buildLocalSkillContractExtension(rootPath: string, directories: string[], purpose: string): LocalSkillContractExtension;
|
|
25
|
-
export declare function buildLocalSkillContractExtensionRelativeTo(rootPath: string, relativeToPath: string, directories: string[], purpose: string): LocalSkillContractExtension;
|
|
26
|
-
export declare function mergeLocalSkillContractExtensions(extensions: LocalSkillContractExtension[]): LocalSkillContractExtension;
|
|
27
22
|
export declare function buildStageInstructions(stageSkillDir: string, localSkills: LocalSkillContractExtension): RuntimeStageInstructions;
|
|
28
23
|
export declare function reportLine(reporter: MethodReporter | undefined, message: string): void;
|
|
29
24
|
export declare function reportBlankLine(reporter: MethodReporter | undefined): void;
|
|
30
25
|
export declare function reportValidationFailure(reporter: MethodReporter | undefined, summary: string, errors?: string[]): void;
|
|
31
|
-
export declare function resolveStageAcceptance(methodId: string, stageId: string,
|
|
32
|
-
export declare function validateStageOutcome(_dirPath: string, validation: {
|
|
33
|
-
ok: boolean;
|
|
34
|
-
summary: string;
|
|
35
|
-
}): {
|
|
36
|
-
ok: boolean;
|
|
37
|
-
summary: string;
|
|
38
|
-
};
|
|
26
|
+
export declare function resolveStageAcceptance(methodId: string, stageId: string, prepDataDir?: string): MethodStageDefinition["acceptance"] | undefined;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join, relative, sep } from "node:path";
|
|
3
|
-
import { listFilesRecursive } from "
|
|
4
|
-
import { parseJsonFrontmatter } from "
|
|
5
|
-
import { isMarkdownFile } from "
|
|
3
|
+
import { listFilesRecursive } from "../../contracts/utils/filesystem.js";
|
|
4
|
+
import { parseJsonFrontmatter } from "../../contracts/utils/parse.js";
|
|
5
|
+
import { isMarkdownFile } from "../../contracts/utils/file-types.js";
|
|
6
6
|
import { getCompiledMethod, } from "./method-definitions.js";
|
|
7
|
-
import { COMPILED_METHOD_DIR, methodPackagePathForCompiled } from "
|
|
7
|
+
import { COMPILED_METHOD_DIR, methodPackagePathForCompiled } from "../../engine/compile/compiled-paths.js";
|
|
8
8
|
const LOCAL_SKILL_READ_LIMIT = 50;
|
|
9
|
-
export function methodQueryDirectory() {
|
|
10
|
-
return `${COMPILED_METHOD_DIR}/use/query`;
|
|
11
|
-
}
|
|
12
|
-
export function methodImproveDirectory() {
|
|
13
|
-
return `${COMPILED_METHOD_DIR}/improve`;
|
|
14
|
-
}
|
|
15
9
|
export function methodCompileStageDirectory(stageDir) {
|
|
16
10
|
return `${COMPILED_METHOD_DIR}/compile/stages/${stageDir}`;
|
|
17
11
|
}
|
|
18
|
-
|
|
12
|
+
function emptyLocalSkillContractExtension() {
|
|
19
13
|
return {
|
|
20
14
|
reads: [],
|
|
21
15
|
count: 0,
|
|
@@ -36,14 +30,11 @@ function readLocalInstructionMode(filePath) {
|
|
|
36
30
|
}
|
|
37
31
|
}
|
|
38
32
|
function collectLocalSkillDocs(rootPath, directories) {
|
|
39
|
-
return collectLocalSkillDocsRelativeTo(rootPath, rootPath, directories);
|
|
40
|
-
}
|
|
41
|
-
function collectLocalSkillDocsRelativeTo(rootPath, relativeToPath, directories) {
|
|
42
33
|
const docs = new Map();
|
|
43
34
|
const methodRoot = methodPackagePathForCompiled(rootPath);
|
|
44
35
|
const rootReadme = join(methodRoot, "README.md");
|
|
45
36
|
if (existsSync(rootReadme)) {
|
|
46
|
-
const read = projectMethodReadPath(rootPath,
|
|
37
|
+
const read = projectMethodReadPath(rootPath, rootReadme);
|
|
47
38
|
docs.set(read, {
|
|
48
39
|
read,
|
|
49
40
|
absolutePath: rootReadme,
|
|
@@ -53,7 +44,7 @@ function collectLocalSkillDocsRelativeTo(rootPath, relativeToPath, directories)
|
|
|
53
44
|
for (const directory of directories) {
|
|
54
45
|
const absoluteDirectory = resolveAuthoringDirectory(rootPath, directory);
|
|
55
46
|
for (const filePath of listFilesRecursive(absoluteDirectory, isMarkdownFile)) {
|
|
56
|
-
const read = projectMethodReadPath(rootPath,
|
|
47
|
+
const read = projectMethodReadPath(rootPath, filePath);
|
|
57
48
|
docs.set(read, {
|
|
58
49
|
read,
|
|
59
50
|
absolutePath: filePath,
|
|
@@ -75,23 +66,19 @@ function resolveAuthoringDirectory(rootPath, directory) {
|
|
|
75
66
|
}
|
|
76
67
|
return join(rootPath, directory);
|
|
77
68
|
}
|
|
78
|
-
function projectMethodReadPath(rootPath,
|
|
69
|
+
function projectMethodReadPath(rootPath, absolutePath) {
|
|
79
70
|
const methodRoot = methodPackagePathForCompiled(rootPath);
|
|
80
71
|
const normalizedMethodRoot = `${methodRoot}${sep}`;
|
|
81
72
|
if (absolutePath === methodRoot || absolutePath.startsWith(normalizedMethodRoot)) {
|
|
82
73
|
const relativeMethodPath = relative(methodRoot, absolutePath);
|
|
83
|
-
return relative(
|
|
74
|
+
return relative(rootPath, join(rootPath, COMPILED_METHOD_DIR, relativeMethodPath));
|
|
84
75
|
}
|
|
85
|
-
return relative(
|
|
76
|
+
return relative(rootPath, absolutePath);
|
|
86
77
|
}
|
|
87
78
|
export function buildLocalSkillContractExtension(rootPath, directories, purpose) {
|
|
88
79
|
const docs = collectLocalSkillDocs(rootPath, directories);
|
|
89
80
|
return buildContractExtensionFromDocs(docs, directories, purpose);
|
|
90
81
|
}
|
|
91
|
-
export function buildLocalSkillContractExtensionRelativeTo(rootPath, relativeToPath, directories, purpose) {
|
|
92
|
-
const docs = collectLocalSkillDocsRelativeTo(rootPath, relativeToPath, directories);
|
|
93
|
-
return buildContractExtensionFromDocs(docs, directories, purpose);
|
|
94
|
-
}
|
|
95
82
|
function buildContractExtensionFromDocs(docs, directories, purpose) {
|
|
96
83
|
const reads = docs.map((doc) => doc.read);
|
|
97
84
|
const modeSources = docs.filter((doc) => doc.mode !== null).map((doc) => doc.read);
|
|
@@ -120,24 +107,6 @@ function buildContractExtensionFromDocs(docs, directories, purpose) {
|
|
|
120
107
|
modeSources,
|
|
121
108
|
};
|
|
122
109
|
}
|
|
123
|
-
export function mergeLocalSkillContractExtensions(extensions) {
|
|
124
|
-
const reads = Array.from(new Set(extensions.flatMap((extension) => extension.reads)));
|
|
125
|
-
const notes = Array.from(new Set(extensions.flatMap((extension) => extension.notes)));
|
|
126
|
-
const modeSources = Array.from(new Set(extensions.flatMap((extension) => extension.modeSources)));
|
|
127
|
-
const localMode = extensions.some((extension) => extension.localMode === "override")
|
|
128
|
-
? "override"
|
|
129
|
-
: extensions.some((extension) => extension.localMode === "extend")
|
|
130
|
-
? "extend"
|
|
131
|
-
: null;
|
|
132
|
-
return {
|
|
133
|
-
reads,
|
|
134
|
-
count: reads.length,
|
|
135
|
-
notes,
|
|
136
|
-
localMode,
|
|
137
|
-
effectiveMode: localMode ?? "builtin",
|
|
138
|
-
modeSources,
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
110
|
export function buildStageInstructions(stageSkillDir, localSkills) {
|
|
142
111
|
return {
|
|
143
112
|
stage_skill_dir: stageSkillDir,
|
|
@@ -159,9 +128,6 @@ export function reportValidationFailure(reporter, summary, errors = []) {
|
|
|
159
128
|
reportLine(reporter, `- ${error}`);
|
|
160
129
|
}
|
|
161
130
|
}
|
|
162
|
-
export function resolveStageAcceptance(methodId, stageId,
|
|
163
|
-
return getCompiledMethod(methodId, {
|
|
164
|
-
}
|
|
165
|
-
export function validateStageOutcome(_dirPath, validation) {
|
|
166
|
-
return validation;
|
|
131
|
+
export function resolveStageAcceptance(methodId, stageId, prepDataDir) {
|
|
132
|
+
return getCompiledMethod(methodId, { prepDataDir }).stages.find((stage) => stage.id === stageId)?.acceptance;
|
|
167
133
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MethodImprovementContext } from "
|
|
1
|
+
import type { MethodImprovementContext } from "../../engine/compile/lib/schema.js";
|
|
2
2
|
export interface MethodImprovementReviewSourcePaths {
|
|
3
3
|
compiledRuntime: string | null;
|
|
4
4
|
readinessRuns: string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { testRootForCompiled, targetTestRunsRootForCompiled, targetTestSandboxesRootForCompiled, stageExecutionShellsRoot, compiledRuntimeRoot, } from "
|
|
3
|
+
import { testRootForCompiled, targetTestRunsRootForCompiled, targetTestSandboxesRootForCompiled, stageExecutionShellsRoot, compiledRuntimeRoot, } from "../../engine/compile/compiled-paths.js";
|
|
4
4
|
export function resolveMethodImprovementReviewSourcePaths(compiledPath) {
|
|
5
5
|
const compiledRuntime = compiledRuntimeRoot(compiledPath);
|
|
6
6
|
const readinessRuns = testRootForCompiled(compiledPath);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type MethodExecutor } from "
|
|
2
|
-
import { type RuntimeStageInstructions } from "
|
|
3
|
-
import type { RuntimeContractType } from "
|
|
4
|
-
import { type RuntimeStageContractDraft } from "
|
|
1
|
+
import { type MethodExecutor } from "../../engine/agents/lib/executors.js";
|
|
2
|
+
import { type RuntimeStageInstructions } from "../../engine/compile/lib/schema.js";
|
|
3
|
+
import type { RuntimeContractType } from "../../contracts/lib/schema.js";
|
|
4
|
+
import { type RuntimeStageContractDraft } from "../../engine/compile/runtime.js";
|
|
5
5
|
import { type MethodReporter, type MethodStageResult } from "./method-helpers.js";
|
|
6
6
|
interface MethodStageShape<TContractType extends RuntimeContractType> {
|
|
7
7
|
id: string;
|
|
@@ -31,13 +31,8 @@ interface ExecuteValidatedStageOptions<TContractType extends RuntimeContractType
|
|
|
31
31
|
summary: string;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
interface ExecuteValidatedSummarizeStageOptions<TContractType extends RuntimeContractType> extends ExecuteValidatedStageOptions<TContractType> {
|
|
35
|
-
startingSummaryCount: number;
|
|
36
|
-
targetCount: number;
|
|
37
|
-
}
|
|
38
34
|
export declare function findStageByContractType<TStage extends {
|
|
39
35
|
contractType: string;
|
|
40
36
|
}>(stages: TStage[], contractType: TStage["contractType"]): TStage;
|
|
41
37
|
export declare function executeValidatedStage<TContractType extends RuntimeContractType>(options: ExecuteValidatedStageOptions<TContractType>): Promise<MethodStageResult>;
|
|
42
|
-
export declare function executeValidatedSummarizeStage<TContractType extends RuntimeContractType>(options: ExecuteValidatedSummarizeStageOptions<TContractType>): Promise<MethodStageResult>;
|
|
43
38
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { markRuntimeRunSucceededAfterValidation, buildStagePrompt, markRuntimeRunFailedAfterValidation, runExecutorStage,
|
|
2
|
-
import { reportValidationFailure,
|
|
1
|
+
import { markRuntimeRunSucceededAfterValidation, buildStagePrompt, markRuntimeRunFailedAfterValidation, runExecutorStage, } from "../../engine/compile/runtime.js";
|
|
2
|
+
import { reportValidationFailure, } from "./method-helpers.js";
|
|
3
3
|
export function findStageByContractType(stages, contractType) {
|
|
4
4
|
const stage = stages.find((candidate) => candidate.contractType === contractType);
|
|
5
5
|
if (!stage) {
|
|
@@ -33,40 +33,12 @@ export async function executeValidatedStage(options) {
|
|
|
33
33
|
});
|
|
34
34
|
return finalizeValidatedStage(options, code);
|
|
35
35
|
}
|
|
36
|
-
export async function executeValidatedSummarizeStage(options) {
|
|
37
|
-
const completionCheck = options.completionCheck
|
|
38
|
-
? () => {
|
|
39
|
-
options.syncWrites?.();
|
|
40
|
-
options.reconcile?.();
|
|
41
|
-
return options.completionCheck?.() === true;
|
|
42
|
-
}
|
|
43
|
-
: undefined;
|
|
44
|
-
const code = await runExecutorSummarizeStage({
|
|
45
|
-
executor: options.executor,
|
|
46
|
-
compiledPath: options.compiledPath,
|
|
47
|
-
executionPath: options.executionPath,
|
|
48
|
-
compiledName: options.targetName,
|
|
49
|
-
method: options.method,
|
|
50
|
-
methodSourcePath: options.methodSourcePath,
|
|
51
|
-
stage: options.stageDefinition.id,
|
|
52
|
-
stageLabel: options.stageDefinition.label,
|
|
53
|
-
contractType: options.stageDefinition.contractType,
|
|
54
|
-
summary: options.summary,
|
|
55
|
-
contract: options.contract,
|
|
56
|
-
buildPrompt: (contractPath) => buildStagePrompt(options.instructions, contractPath, options.statusLines),
|
|
57
|
-
completionCheck,
|
|
58
|
-
onStatus: options.onStatus,
|
|
59
|
-
startingSummaryCount: options.startingSummaryCount,
|
|
60
|
-
targetCount: options.targetCount,
|
|
61
|
-
});
|
|
62
|
-
return finalizeValidatedStage(options, code);
|
|
63
|
-
}
|
|
64
36
|
function finalizeValidatedStage(options, code) {
|
|
65
37
|
const refreshAndValidate = () => {
|
|
66
38
|
options.syncWrites?.();
|
|
67
39
|
options.reconcile?.();
|
|
68
40
|
options.refreshArtifacts?.();
|
|
69
|
-
return
|
|
41
|
+
return options.validate();
|
|
70
42
|
};
|
|
71
43
|
if (code !== 0) {
|
|
72
44
|
let completionSatisfied = false;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type LocalMethodDefinition } from "./local-methods.js";
|
|
2
|
+
export declare function userMethodPath(id: string): string;
|
|
3
|
+
export declare function userMethodExists(id: string): boolean;
|
|
4
|
+
export declare function listUserMethodDefinitions(): LocalMethodDefinition[];
|
|
5
|
+
export declare function loadUserMethodDefinition(id: string): LocalMethodDefinition | null;
|
|
6
|
+
export interface InstallUserMethodOptions {
|
|
7
|
+
sourceDir: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
overwrite?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface InstallUserMethodResult {
|
|
12
|
+
id: string;
|
|
13
|
+
path: string;
|
|
14
|
+
overwritten: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function installUserMethod(options: InstallUserMethodOptions): InstallUserMethodResult;
|
|
17
|
+
export declare function removeUserMethod(id: string): boolean;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync, } from "node:fs";
|
|
2
|
+
import { dirname, join, resolve } from "node:path";
|
|
3
|
+
import { warnInterf } from "../../contracts/utils/logger.js";
|
|
4
|
+
import { userMethodPackagePath, userMethodsRoot, } from "../../contracts/lib/preparation-paths.js";
|
|
5
|
+
import { loadMethodDefinitionFromDir, } from "./local-methods.js";
|
|
6
|
+
export function userMethodPath(id) {
|
|
7
|
+
return userMethodPackagePath(id);
|
|
8
|
+
}
|
|
9
|
+
export function userMethodExists(id) {
|
|
10
|
+
return existsSync(join(userMethodPath(id), "method.json"));
|
|
11
|
+
}
|
|
12
|
+
export function listUserMethodDefinitions() {
|
|
13
|
+
const root = userMethodsRoot();
|
|
14
|
+
if (!existsSync(root))
|
|
15
|
+
return [];
|
|
16
|
+
const definitions = [];
|
|
17
|
+
for (const entry of readdirSync(root)) {
|
|
18
|
+
const entryPath = join(root, entry);
|
|
19
|
+
try {
|
|
20
|
+
if (!statSync(entryPath).isDirectory())
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
const definition = loadMethodDefinitionFromDir(entryPath);
|
|
27
|
+
if (definition)
|
|
28
|
+
definitions.push(definition);
|
|
29
|
+
}
|
|
30
|
+
return definitions.sort((a, b) => a.label.localeCompare(b.label));
|
|
31
|
+
}
|
|
32
|
+
export function loadUserMethodDefinition(id) {
|
|
33
|
+
return loadMethodDefinitionFromDir(userMethodPath(id));
|
|
34
|
+
}
|
|
35
|
+
export function installUserMethod(options) {
|
|
36
|
+
const sourceDir = resolve(options.sourceDir);
|
|
37
|
+
if (!existsSync(join(sourceDir, "method.json"))) {
|
|
38
|
+
throw new Error(`No method.json found at ${sourceDir}.`);
|
|
39
|
+
}
|
|
40
|
+
const definition = loadMethodDefinitionFromDir(sourceDir);
|
|
41
|
+
if (!definition) {
|
|
42
|
+
throw new Error(`Could not load Method package at ${sourceDir}.`);
|
|
43
|
+
}
|
|
44
|
+
const id = options.id ?? definition.id;
|
|
45
|
+
if (!id)
|
|
46
|
+
throw new Error("Method id is required.");
|
|
47
|
+
const targetPath = userMethodPath(id);
|
|
48
|
+
const existed = existsSync(targetPath);
|
|
49
|
+
if (existed && !options.overwrite) {
|
|
50
|
+
throw new Error(`User Method "${id}" already exists at ${targetPath}. Pass overwrite to replace it.`);
|
|
51
|
+
}
|
|
52
|
+
mkdirSync(dirname(targetPath), { recursive: true });
|
|
53
|
+
if (existed)
|
|
54
|
+
rmSync(targetPath, { recursive: true, force: true });
|
|
55
|
+
cpSync(sourceDir, targetPath, { recursive: true, force: true });
|
|
56
|
+
if (id !== definition.id) {
|
|
57
|
+
const targetMethodJson = join(targetPath, "method.json");
|
|
58
|
+
const raw = readFileSync(targetMethodJson, "utf8");
|
|
59
|
+
const parsed = JSON.parse(raw);
|
|
60
|
+
parsed.id = id;
|
|
61
|
+
writeFileSync(targetMethodJson, `${JSON.stringify(parsed, null, 2)}\n`);
|
|
62
|
+
}
|
|
63
|
+
return { id, path: targetPath, overwritten: existed };
|
|
64
|
+
}
|
|
65
|
+
export function removeUserMethod(id) {
|
|
66
|
+
const target = userMethodPath(id);
|
|
67
|
+
if (!existsSync(target))
|
|
68
|
+
return false;
|
|
69
|
+
try {
|
|
70
|
+
rmSync(target, { recursive: true, force: true });
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
warnInterf(`Warning: failed to remove user Method ${id} at ${target}: ${error instanceof Error ? error.message : String(error)}`);
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -5,6 +5,5 @@ export * as interf from "./interf.js";
|
|
|
5
5
|
export * as detect from "./interf-detect.js";
|
|
6
6
|
export * as bootstrap from "./interf-bootstrap.js";
|
|
7
7
|
export * as scaffold from "./interf-scaffold.js";
|
|
8
|
-
export * as projectPaths from "./project-paths.js";
|
|
9
8
|
export * as preparationEntries from "./preparation-entries.js";
|
|
10
9
|
export type { InterfConfig, MethodId, PreparationName, SourceFolderBinding, SourcePreparationConfig, SourceReadinessCheck, SourceFolderConfig, } from "./lib/schema.js";
|
|
@@ -5,5 +5,4 @@ export * as interf from "./interf.js";
|
|
|
5
5
|
export * as detect from "./interf-detect.js";
|
|
6
6
|
export * as bootstrap from "./interf-bootstrap.js";
|
|
7
7
|
export * as scaffold from "./interf-scaffold.js";
|
|
8
|
-
export * as projectPaths from "./project-paths.js";
|
|
9
8
|
export * as preparationEntries from "./preparation-entries.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "../agents/lib/compiled-bootstrap.js";
|
|
1
|
+
export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "../engine/agents/lib/compiled-bootstrap.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "../agents/lib/compiled-bootstrap.js";
|
|
1
|
+
export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "../engine/agents/lib/compiled-bootstrap.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type InterfConfig } from "./lib/schema.js";
|
|
2
2
|
export type { InterfConfig } from "./lib/schema.js";
|
|
3
3
|
export interface ResolvedCompiled {
|
|
4
|
-
|
|
4
|
+
prepDataDir: string;
|
|
5
5
|
compiledPath: string;
|
|
6
6
|
config: InterfConfig;
|
|
7
7
|
}
|
|
@@ -16,6 +16,11 @@ export declare function hasSourceFolderInput(config: InterfConfig | null | undef
|
|
|
16
16
|
path: string;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
+
export declare function hasSourcePreparationInput(config: InterfConfig | null | undefined): config is InterfConfig & {
|
|
20
|
+
source: {
|
|
21
|
+
preparation_path: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
19
24
|
export declare function detectInterf(cwd: string): {
|
|
20
25
|
path: string;
|
|
21
26
|
config: InterfConfig;
|
|
@@ -24,10 +29,10 @@ export declare function resolveCompiled(cwd: string): ResolvedCompiled | null;
|
|
|
24
29
|
export declare function resolveSourceFolderPath(compiledPath: string, config?: InterfConfig | null): string;
|
|
25
30
|
export declare function resolveSourceControlPath(compiledPath: string): string;
|
|
26
31
|
export declare function resolveSourceInputPath(compiledPath: string): string;
|
|
27
|
-
export declare function listPortableContextsForSourceFolder(
|
|
32
|
+
export declare function listPortableContextsForSourceFolder(prepDataDir: string): Array<{
|
|
28
33
|
path: string;
|
|
29
34
|
config: InterfConfig;
|
|
30
35
|
}>;
|
|
31
|
-
export declare function assertCompiledContainer(
|
|
36
|
+
export declare function assertCompiledContainer(prepDataDir: string): string;
|
|
32
37
|
export declare function assertWritableTargetDir(dirPath: string, label: string): void;
|
|
33
38
|
export declare function assertCompiledName(name: string, label: string): void;
|