@interf/compiler 0.13.0 → 0.18.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/LICENSE.md +1 -0
- package/README.md +50 -7
- package/TRADEMARKS.md +4 -4
- package/agent-skills/interf-actions/SKILL.md +51 -5
- package/agent-skills/interf-actions/references/cli.md +82 -82
- package/builtin-methods/interf-default/README.md +6 -7
- package/builtin-methods/interf-default/method.json +7 -68
- package/builtin-methods/interf-default/method.schema.json +52 -50
- package/dist/cli/commands/agents.d.ts +2 -0
- package/dist/cli/commands/agents.js +213 -0
- package/dist/cli/commands/compile.js +10 -1
- package/dist/cli/commands/doctor.js +1 -1
- package/dist/cli/commands/login.js +1 -1
- package/dist/cli/commands/logout.js +1 -1
- package/dist/cli/commands/mcp.d.ts +42 -0
- package/dist/cli/commands/mcp.js +239 -0
- package/dist/cli/commands/method.js +1 -1
- package/dist/cli/commands/prep.js +81 -7
- package/dist/cli/commands/reset.js +1 -1
- package/dist/cli/commands/runs.js +1 -1
- package/dist/cli/commands/status.js +1 -1
- package/dist/cli/commands/verify.d.ts +10 -0
- package/dist/cli/commands/{test.js → verify.js} +30 -15
- package/dist/cli/commands/web.js +71 -18
- package/dist/cli/commands/wizard.js +462 -107
- package/dist/cli/index.d.ts +4 -2
- package/dist/cli/index.js +7 -3
- 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/{045gole2ojo3g.css → 0_c_tvh-cukjz.css} +1 -1
- package/dist/compiler-ui/_next/static/chunks/0f_geuwdesg_c.js +114 -0
- 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/schema.d.ts +324 -31
- package/dist/packages/contracts/lib/schema.js +281 -21
- package/dist/packages/{local-service → engine}/action-definitions.js +9 -2
- package/dist/packages/{local-service → engine}/action-planner.d.ts +1 -1
- package/dist/packages/{local-service → engine}/action-planner.js +1 -1
- 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 +14 -6
- package/dist/packages/{agents → engine/agents}/lib/shells.js +133 -126
- package/dist/packages/{agents → engine/agents}/lib/user-config.js +2 -2
- 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 +9 -9
- package/dist/packages/{local-service → engine}/client.js +11 -11
- package/dist/packages/engine/cloud-seams.d.ts +115 -0
- package/dist/packages/engine/cloud-seams.js +84 -0
- package/dist/packages/engine/compile/artifact-counts.d.ts +1 -0
- package/dist/packages/{compiler → engine/compile}/artifact-counts.js +4 -4
- package/dist/packages/engine/compile/artifact-status.d.ts +41 -0
- package/dist/packages/engine/compile/artifact-status.js +166 -0
- package/dist/packages/engine/compile/billing-events.d.ts +89 -0
- package/dist/packages/engine/compile/billing-events.js +74 -0
- package/dist/packages/engine/compile/check-evaluator.d.ts +66 -0
- package/dist/packages/engine/compile/check-evaluator.js +298 -0
- package/dist/packages/{compiler → engine/compile}/compiled-pipeline.d.ts +12 -1
- package/dist/packages/{compiler → engine/compile}/compiled-pipeline.js +16 -6
- package/dist/packages/engine/compile/compiled-schema.d.ts +21 -0
- package/dist/packages/engine/compile/compiled-schema.js +126 -0
- package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.d.ts +2 -1
- package/dist/packages/{compiler → engine/compile}/compiled-stage-plan.js +35 -18
- package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/compiled-stage-runner.js +4 -4
- package/dist/packages/{compiler → engine/compile}/compiled-target.d.ts +2 -2
- package/dist/packages/{compiler → engine/compile}/compiled-target.js +2 -2
- package/dist/packages/{compiler → engine/compile}/discovery.js +1 -1
- package/dist/packages/{compiler → engine/compile}/index.d.ts +0 -1
- package/dist/packages/{compiler → engine/compile}/index.js +0 -1
- package/dist/packages/{compiler → engine/compile}/lib/schema.d.ts +113 -94
- package/dist/packages/{compiler → engine/compile}/lib/schema.js +35 -39
- package/dist/packages/engine/compile/method-primitives.d.ts +2 -0
- package/dist/packages/{compiler → engine/compile}/method-primitives.js +1 -1
- package/dist/packages/{compiler → engine/compile}/method-runs.d.ts +3 -3
- package/dist/packages/{compiler → engine/compile}/method-runs.js +3 -3
- package/dist/packages/{compiler → engine/compile}/reset.js +4 -4
- package/dist/packages/{compiler → engine/compile}/runtime-contracts.js +2 -1
- package/dist/packages/{compiler → engine/compile}/runtime-prompt.js +3 -2
- package/dist/packages/{compiler → engine/compile}/runtime-reconcile.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/runtime-reconcile.js +47 -45
- package/dist/packages/{compiler → engine/compile}/runtime-runs.d.ts +1 -2
- package/dist/packages/{compiler → engine/compile}/runtime-runs.js +3 -44
- package/dist/packages/{compiler → engine/compile}/runtime-types.d.ts +7 -12
- package/dist/packages/engine/compile/runtime.d.ts +5 -0
- package/dist/packages/{compiler → engine/compile}/runtime.js +1 -2
- package/dist/packages/{compiler → engine/compile}/source-files.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/source-files.js +3 -3
- package/dist/packages/{compiler → engine/compile}/state-health.js +8 -8
- package/dist/packages/{compiler → engine/compile}/state-io.js +2 -2
- package/dist/packages/{compiler → engine/compile}/state-view.js +9 -8
- package/dist/packages/{compiler → engine/compile}/validate-compiled.js +63 -32
- package/dist/packages/{compiler → engine/compile}/validate.d.ts +1 -1
- package/dist/packages/{compiler → engine/compile}/validate.js +29 -27
- package/dist/packages/{execution → engine/execution}/lib/schema.d.ts +81 -55
- package/dist/packages/{execution → engine/execution}/lib/schema.js +14 -6
- package/dist/packages/engine/index.d.ts +22 -0
- package/dist/packages/engine/index.js +15 -0
- package/dist/packages/{local-service → engine}/lib/schema.d.ts +620 -435
- package/dist/packages/{local-service → engine}/lib/schema.js +103 -63
- package/dist/packages/{local-service → engine}/native-run-handlers.d.ts +7 -5
- package/dist/packages/{local-service → engine}/native-run-handlers.js +81 -29
- package/dist/packages/{local-service → engine}/preparation-store.d.ts +22 -4
- package/dist/packages/{local-service → engine}/preparation-store.js +56 -25
- package/dist/packages/{local-service → engine}/readiness-check-draft.d.ts +2 -2
- package/dist/packages/{local-service → engine}/routes.d.ts +36 -1
- package/dist/packages/{local-service → engine}/routes.js +38 -1
- package/dist/packages/{local-service → engine}/run-observability.d.ts +3 -3
- package/dist/packages/{local-service → engine}/run-observability.js +15 -15
- package/dist/packages/{local-service → engine}/runtime-event-applier.d.ts +1 -1
- package/dist/packages/{local-service → engine}/runtime-event-applier.js +7 -0
- package/dist/packages/{local-service → engine}/runtime-persistence.d.ts +6 -6
- package/dist/packages/{local-service → engine}/runtime-persistence.js +9 -9
- package/dist/packages/{local-service → engine}/runtime-proposal-helpers.d.ts +1 -1
- package/dist/packages/{local-service → engine}/runtime-proposal-helpers.js +5 -5
- package/dist/packages/{local-service → engine}/runtime-resource-builders.d.ts +12 -12
- package/dist/packages/{local-service → engine}/runtime-resource-builders.js +6 -5
- package/dist/packages/{local-service → engine}/runtime.d.ts +147 -56
- package/dist/packages/{local-service → engine}/runtime.js +333 -205
- package/dist/packages/{local-service → engine}/server.d.ts +25 -0
- package/dist/packages/{local-service → engine}/server.js +338 -17
- package/dist/packages/engine/verify/index.d.ts +13 -0
- package/dist/packages/engine/verify/index.js +10 -0
- package/dist/packages/{testing → engine/verify}/lib/schema.d.ts +1 -1
- package/dist/packages/{testing → engine/verify}/lib/schema.js +1 -1
- package/dist/packages/{testing → engine/verify}/readiness-check-run.d.ts +27 -11
- package/dist/packages/{testing → engine/verify}/readiness-check-run.js +72 -60
- package/dist/packages/{testing/test-execution.d.ts → engine/verify/verify-execution.d.ts} +2 -2
- package/dist/packages/{testing/test-execution.js → engine/verify/verify-execution.js} +2 -2
- package/dist/packages/{testing/test-paths.d.ts → engine/verify/verify-paths.d.ts} +1 -1
- package/dist/packages/{testing/test-paths.js → engine/verify/verify-paths.js} +2 -2
- package/dist/packages/{testing/test-sandbox.d.ts → engine/verify/verify-sandbox.d.ts} +1 -1
- package/dist/packages/{testing/test-sandbox.js → engine/verify/verify-sandbox.js} +6 -6
- package/dist/packages/{testing/test-specs.d.ts → engine/verify/verify-specs.d.ts} +1 -1
- package/dist/packages/{testing/test-specs.js → engine/verify/verify-specs.js} +2 -2
- package/dist/packages/{testing/test-targets.d.ts → engine/verify/verify-targets.d.ts} +1 -1
- package/dist/packages/{testing/test-targets.js → engine/verify/verify-targets.js} +3 -3
- package/dist/packages/{testing/test.d.ts → engine/verify/verify.d.ts} +4 -4
- package/dist/packages/{testing/test.js → engine/verify/verify.js} +3 -3
- package/dist/packages/engine/wire-schemas.d.ts +545 -0
- package/dist/packages/engine/wire-schemas.js +59 -0
- package/dist/packages/methods/authoring/method-authoring.d.ts +34 -0
- package/dist/packages/methods/authoring/method-authoring.js +260 -0
- package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.d.ts +2 -2
- package/dist/packages/{method-authoring → methods/authoring}/method-edit-session.js +5 -5
- 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 +12 -12
- package/dist/packages/{method-package → methods/package}/builtin-compiled-method.js +27 -24
- package/dist/packages/methods/package/context-interface.d.ts +73 -0
- package/dist/packages/{method-package → methods/package}/context-interface.js +50 -41
- package/dist/packages/{method-package → methods/package}/interf-method-package.js +31 -49
- package/dist/packages/{method-package → methods/package}/lib/package-root.js +2 -2
- package/dist/packages/{method-package → methods/package}/local-methods.d.ts +10 -5
- package/dist/packages/{method-package → methods/package}/local-methods.js +41 -68
- package/dist/packages/{method-package → methods/package}/method-definitions.d.ts +11 -7
- package/dist/packages/{method-package → methods/package}/method-definitions.js +5 -8
- package/dist/packages/{method-package → methods/package}/method-helpers.d.ts +1 -3
- package/dist/packages/{method-package → methods/package}/method-helpers.js +4 -8
- 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 +1 -29
- package/dist/packages/{method-package → methods/package}/user-methods.js +2 -2
- 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.js +4 -4
- package/dist/packages/{project-model → project}/interf-scaffold.js +18 -18
- package/dist/packages/{project-model → project}/lib/schema.d.ts +2 -2
- package/dist/packages/{project-model → project}/lib/schema.js +1 -1
- package/dist/packages/{project-model → project}/source-config.d.ts +1 -1
- package/dist/packages/{project-model → project}/source-config.js +9 -8
- package/dist/packages/{project-model → project}/source-folders.js +2 -2
- package/package.json +7 -16
- package/dist/cli/commands/test.d.ts +0 -9
- package/dist/compiler-ui/_next/static/chunks/17t-lulmyawg5.js +0 -89
- package/dist/packages/agents/lib/detection.d.ts +0 -7
- package/dist/packages/compiler/artifact-counts.d.ts +0 -1
- package/dist/packages/compiler/compiled-schema.d.ts +0 -31
- package/dist/packages/compiler/compiled-schema.js +0 -141
- package/dist/packages/compiler/method-primitives.d.ts +0 -2
- package/dist/packages/compiler/runtime-acceptance.d.ts +0 -9
- package/dist/packages/compiler/runtime-acceptance.js +0 -262
- package/dist/packages/compiler/runtime.d.ts +0 -6
- package/dist/packages/local-service/index.d.ts +0 -22
- package/dist/packages/local-service/index.js +0 -15
- package/dist/packages/method-authoring/method-authoring.d.ts +0 -24
- package/dist/packages/method-authoring/method-authoring.js +0 -116
- package/dist/packages/method-package/context-interface.d.ts +0 -60
- package/dist/packages/testing/index.d.ts +0 -13
- package/dist/packages/testing/index.js +0 -10
- /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_buildManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_clientMiddlewareManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{C6vVfy3aeYuIO3d2AoNvC → 6qyE1u9m_oBUkvAhhoCmO}/_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}/filesystem.d.ts +0 -0
- /package/dist/packages/{shared → contracts/utils}/filesystem.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-definitions.d.ts +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/{agents → engine/agents}/lib/user-config.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}/compiled-paths.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/compiled-paths.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/discovery.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/reset.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-artifacts.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-artifacts.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-health.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-io.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-paths.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-paths.js +0 -0
- /package/dist/packages/{compiler → engine/compile}/state-view.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state.d.ts +0 -0
- /package/dist/packages/{compiler → engine/compile}/state.js +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/{local-service → engine}/connection-config.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/connection-config.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}/instance-paths.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/instance-paths.js +0 -0
- /package/dist/packages/{local-service → engine}/readiness-check-draft.js +0 -0
- /package/dist/packages/{local-service → engine}/runtime-caches.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/runtime-caches.js +0 -0
- /package/dist/packages/{local-service → engine}/service-registry.d.ts +0 -0
- /package/dist/packages/{local-service → engine}/service-registry.js +0 -0
- /package/dist/packages/{testing/test-profile-presets.d.ts → engine/verify/verify-profile-presets.d.ts} +0 -0
- /package/dist/packages/{testing/test-profile-presets.js → engine/verify/verify-profile-presets.js} +0 -0
- /package/dist/packages/{testing/test-types.d.ts → engine/verify/verify-types.d.ts} +0 -0
- /package/dist/packages/{testing/test-types.js → engine/verify/verify-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-package → methods/package}/interf-method-package.d.ts +0 -0
- /package/dist/packages/{method-package → methods/package}/lib/package-root.d.ts +0 -0
- /package/dist/packages/{method-package → methods/package}/user-methods.d.ts +0 -0
- /package/dist/packages/{project-model → project}/index.d.ts +0 -0
- /package/dist/packages/{project-model → project}/index.js +0 -0
- /package/dist/packages/{project-model → project}/interf-detect.d.ts +0 -0
- /package/dist/packages/{project-model → project}/interf-scaffold.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
- /package/dist/packages/{project-model → project}/preparation-entries.d.ts +0 -0
- /package/dist/packages/{project-model → project}/preparation-entries.js +0 -0
- /package/dist/packages/{project-model → project}/source-folders.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function countCompiledZoneArtifacts(compiledPath: string, zonePath: string, kind: "directory" | "file" | "runtime"): number;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type BuiltinCompiledZoneId } from "../method-package/builtin-compiled-method.js";
|
|
2
|
-
import { type MethodCompiledSchema, type MethodCompiledZone, type MethodZoneId } from "./lib/schema.js";
|
|
3
|
-
export interface MethodSchemaStageLike {
|
|
4
|
-
id: string;
|
|
5
|
-
writes: readonly string[];
|
|
6
|
-
}
|
|
7
|
-
export { BUILTIN_COMPILED_ZONE_IDS } from "../method-package/builtin-compiled-method.js";
|
|
8
|
-
export declare const METHOD_SCHEMA_FILE = "method.schema.json";
|
|
9
|
-
export declare function methodSchemaFilePath(rootPath: string): string;
|
|
10
|
-
export declare function resolveMethodSchemaPath(rootPath: string): string | null;
|
|
11
|
-
export declare function methodSchemaExists(rootPath: string): boolean;
|
|
12
|
-
export declare function methodSchemaRelativePath(): string;
|
|
13
|
-
export declare function listCompiledSchemaZones(schema: MethodCompiledSchema): MethodCompiledZone[];
|
|
14
|
-
export declare function findCompiledSchemaZone(schema: MethodCompiledSchema, zoneId: MethodZoneId): MethodCompiledZone | null;
|
|
15
|
-
export declare function compiledZoneAbsolutePath(compiledPath: string, zone: Pick<MethodCompiledZone, "path">): string;
|
|
16
|
-
export declare function compiledContractArtifactPath(zone: Pick<MethodCompiledZone, "path" | "kind">): string;
|
|
17
|
-
export declare function compiledContractArtifactPathsForZoneIds(schema: MethodCompiledSchema, zoneIds: readonly MethodZoneId[]): string[];
|
|
18
|
-
export declare function builtinCompiledZoneRelativePath(zoneId: BuiltinCompiledZoneId): string;
|
|
19
|
-
export declare function builtinCompiledZoneAbsolutePath(compiledPath: string, zoneId: BuiltinCompiledZoneId): string;
|
|
20
|
-
export declare function compiledSummariesPath(compiledPath: string): string;
|
|
21
|
-
export declare function compiledKnowledgeEntitiesPath(compiledPath: string): string;
|
|
22
|
-
export declare function compiledKnowledgeClaimsPath(compiledPath: string): string;
|
|
23
|
-
export declare function compiledKnowledgeIndexesPath(compiledPath: string): string;
|
|
24
|
-
export declare function compiledKnowledgeRootPath(compiledPath: string): string;
|
|
25
|
-
export declare function compiledHomePath(compiledPath: string): string;
|
|
26
|
-
export declare function ensureCompiledZoneTargets(compiledPath: string, schema: MethodCompiledSchema): void;
|
|
27
|
-
export declare function buildMethodSchema(stages: MethodSchemaStageLike[], label?: string): MethodCompiledSchema;
|
|
28
|
-
export declare function writeMethodSchemaFile(rootPath: string, stages: MethodSchemaStageLike[], label?: string): MethodCompiledSchema;
|
|
29
|
-
export declare function writeMethodSchemaDocument(rootPath: string, schema: MethodCompiledSchema): MethodCompiledSchema;
|
|
30
|
-
export declare function readMethodSchemaFile(rootPath: string): MethodCompiledSchema | null;
|
|
31
|
-
export declare function readCompiledSchemaFile(rootPath: string): MethodCompiledSchema | null;
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { dirname, join } from "node:path";
|
|
3
|
-
import { warnInterf } from "../shared/logger.js";
|
|
4
|
-
import { readJsonFileUnchecked } from "../shared/parse.js";
|
|
5
|
-
import { BUILTIN_COMPILED_ZONE_IDS, listBuiltinCompiledZoneSpecs, requiredCompiledZoneOwners, } from "../method-package/builtin-compiled-method.js";
|
|
6
|
-
import { MethodCompiledSchemaSchema, } from "./lib/schema.js";
|
|
7
|
-
export { BUILTIN_COMPILED_ZONE_IDS } from "../method-package/builtin-compiled-method.js";
|
|
8
|
-
export const METHOD_SCHEMA_FILE = "method.schema.json";
|
|
9
|
-
const BUILTIN_COMPILED_ZONE_SPEC_BY_ID = new Map(listBuiltinCompiledZoneSpecs().map((zone) => [zone.id, zone]));
|
|
10
|
-
export function methodSchemaFilePath(rootPath) {
|
|
11
|
-
return join(rootPath, METHOD_SCHEMA_FILE);
|
|
12
|
-
}
|
|
13
|
-
export function resolveMethodSchemaPath(rootPath) {
|
|
14
|
-
const path = methodSchemaFilePath(rootPath);
|
|
15
|
-
return existsSync(path) ? path : null;
|
|
16
|
-
}
|
|
17
|
-
export function methodSchemaExists(rootPath) {
|
|
18
|
-
return existsSync(methodSchemaFilePath(rootPath));
|
|
19
|
-
}
|
|
20
|
-
export function methodSchemaRelativePath() {
|
|
21
|
-
return `method/${METHOD_SCHEMA_FILE}`;
|
|
22
|
-
}
|
|
23
|
-
export function listCompiledSchemaZones(schema) {
|
|
24
|
-
return [...schema.zones];
|
|
25
|
-
}
|
|
26
|
-
export function findCompiledSchemaZone(schema, zoneId) {
|
|
27
|
-
return schema.zones.find((zone) => zone.id === zoneId) ?? null;
|
|
28
|
-
}
|
|
29
|
-
export function compiledZoneAbsolutePath(compiledPath, zone) {
|
|
30
|
-
return join(compiledPath, zone.path);
|
|
31
|
-
}
|
|
32
|
-
export function compiledContractArtifactPath(zone) {
|
|
33
|
-
if (zone.kind === "file")
|
|
34
|
-
return zone.path;
|
|
35
|
-
return zone.path.endsWith("/") ? zone.path : `${zone.path}/`;
|
|
36
|
-
}
|
|
37
|
-
export function compiledContractArtifactPathsForZoneIds(schema, zoneIds) {
|
|
38
|
-
return zoneIds.map((zoneId) => {
|
|
39
|
-
const zone = findCompiledSchemaZone(schema, zoneId);
|
|
40
|
-
if (!zone) {
|
|
41
|
-
throw new Error(`Compiled schema is missing declared zone "${zoneId}".`);
|
|
42
|
-
}
|
|
43
|
-
return compiledContractArtifactPath(zone);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
export function builtinCompiledZoneRelativePath(zoneId) {
|
|
47
|
-
const zone = BUILTIN_COMPILED_ZONE_SPEC_BY_ID.get(zoneId);
|
|
48
|
-
if (!zone) {
|
|
49
|
-
throw new Error(`Missing built-in compiled zone "${zoneId}".`);
|
|
50
|
-
}
|
|
51
|
-
return zone.path;
|
|
52
|
-
}
|
|
53
|
-
export function builtinCompiledZoneAbsolutePath(compiledPath, zoneId) {
|
|
54
|
-
return join(compiledPath, builtinCompiledZoneRelativePath(zoneId));
|
|
55
|
-
}
|
|
56
|
-
export function compiledSummariesPath(compiledPath) {
|
|
57
|
-
return builtinCompiledZoneAbsolutePath(compiledPath, BUILTIN_COMPILED_ZONE_IDS.SUMMARIES);
|
|
58
|
-
}
|
|
59
|
-
export function compiledKnowledgeEntitiesPath(compiledPath) {
|
|
60
|
-
return builtinCompiledZoneAbsolutePath(compiledPath, BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_ENTITIES);
|
|
61
|
-
}
|
|
62
|
-
export function compiledKnowledgeClaimsPath(compiledPath) {
|
|
63
|
-
return builtinCompiledZoneAbsolutePath(compiledPath, BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_CLAIMS);
|
|
64
|
-
}
|
|
65
|
-
export function compiledKnowledgeIndexesPath(compiledPath) {
|
|
66
|
-
return builtinCompiledZoneAbsolutePath(compiledPath, BUILTIN_COMPILED_ZONE_IDS.KNOWLEDGE_INDEXES);
|
|
67
|
-
}
|
|
68
|
-
export function compiledKnowledgeRootPath(compiledPath) {
|
|
69
|
-
return dirname(compiledKnowledgeEntitiesPath(compiledPath));
|
|
70
|
-
}
|
|
71
|
-
export function compiledHomePath(compiledPath) {
|
|
72
|
-
return builtinCompiledZoneAbsolutePath(compiledPath, BUILTIN_COMPILED_ZONE_IDS.HOME);
|
|
73
|
-
}
|
|
74
|
-
export function ensureCompiledZoneTargets(compiledPath, schema) {
|
|
75
|
-
for (const zone of schema.zones) {
|
|
76
|
-
if (zone.kind === "directory" || zone.kind === "runtime") {
|
|
77
|
-
mkdirSync(compiledZoneAbsolutePath(compiledPath, zone), { recursive: true });
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
mkdirSync(dirname(compiledZoneAbsolutePath(compiledPath, zone)), { recursive: true });
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
function pushZone(zones, zone) {
|
|
84
|
-
if (zones.some((existing) => existing.path === zone.path))
|
|
85
|
-
return;
|
|
86
|
-
zones.push(zone);
|
|
87
|
-
}
|
|
88
|
-
function normalizeMethodSchema(schema) {
|
|
89
|
-
return {
|
|
90
|
-
...schema,
|
|
91
|
-
kind: "method-schema",
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
export function buildMethodSchema(stages, label = "Method schema") {
|
|
95
|
-
const zones = [];
|
|
96
|
-
for (const zone of listBuiltinCompiledZoneSpecs()) {
|
|
97
|
-
pushZone(zones, {
|
|
98
|
-
id: zone.id,
|
|
99
|
-
role: zone.role,
|
|
100
|
-
path: zone.path,
|
|
101
|
-
kind: zone.kind,
|
|
102
|
-
required: zone.required,
|
|
103
|
-
owned_by: requiredCompiledZoneOwners(stages, zone.id),
|
|
104
|
-
description: zone.description,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return {
|
|
108
|
-
kind: "method-schema",
|
|
109
|
-
version: 1,
|
|
110
|
-
target_type: "compiled",
|
|
111
|
-
label,
|
|
112
|
-
zones,
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
export function writeMethodSchemaFile(rootPath, stages, label) {
|
|
116
|
-
const schema = buildMethodSchema(stages, label);
|
|
117
|
-
writeMethodSchemaDocument(rootPath, schema);
|
|
118
|
-
return schema;
|
|
119
|
-
}
|
|
120
|
-
export function writeMethodSchemaDocument(rootPath, schema) {
|
|
121
|
-
const normalized = normalizeMethodSchema(schema);
|
|
122
|
-
writeFileSync(methodSchemaFilePath(rootPath), `${JSON.stringify(normalized, null, 2)}\n`);
|
|
123
|
-
return normalized;
|
|
124
|
-
}
|
|
125
|
-
export function readMethodSchemaFile(rootPath) {
|
|
126
|
-
const path = methodSchemaFilePath(rootPath);
|
|
127
|
-
if (!existsSync(path))
|
|
128
|
-
return null;
|
|
129
|
-
const raw = readJsonFileUnchecked(path, "Method schema");
|
|
130
|
-
if (raw === null)
|
|
131
|
-
return null;
|
|
132
|
-
const parsed = MethodCompiledSchemaSchema.safeParse(raw);
|
|
133
|
-
if (!parsed.success) {
|
|
134
|
-
warnInterf(`Warning: failed to validate Method schema at ${path}: ${parsed.error.issues.map((issue) => issue.message).join("; ")}`);
|
|
135
|
-
return null;
|
|
136
|
-
}
|
|
137
|
-
return normalizeMethodSchema(parsed.data);
|
|
138
|
-
}
|
|
139
|
-
export function readCompiledSchemaFile(rootPath) {
|
|
140
|
-
return readMethodSchemaFile(rootPath);
|
|
141
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type CompiledState, type RuntimeStageAcceptance, type RuntimeStageContract } from "./lib/schema.js";
|
|
2
|
-
import { type RuntimeStageAcceptanceValidation } from "./runtime-types.js";
|
|
3
|
-
export declare function stageRecordFromState(state: CompiledState | null, stageId: string): Record<string, unknown> | null;
|
|
4
|
-
export declare function validateResolvedStageAcceptance(dirPath: string, options: {
|
|
5
|
-
stageId: string;
|
|
6
|
-
acceptance?: RuntimeStageAcceptance;
|
|
7
|
-
counts?: Record<string, number>;
|
|
8
|
-
}): RuntimeStageAcceptanceValidation;
|
|
9
|
-
export declare function validateStageContractAcceptance(dirPath: string, contract?: RuntimeStageContract | null): RuntimeStageAcceptanceValidation;
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
import { existsSync, } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { listFilesRecursive } from "../shared/filesystem.js";
|
|
4
|
-
import { readJsonFileWithSchema } from "../shared/parse.js";
|
|
5
|
-
import { METHOD_SCHEMA_FILE, compiledZoneAbsolutePath, findCompiledSchemaZone, readCompiledSchemaFile, } from "./compiled-schema.js";
|
|
6
|
-
import { RuntimeStageContractSchema, } from "./lib/schema.js";
|
|
7
|
-
import { stageContractPath } from "./runtime-paths.js";
|
|
8
|
-
import { methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
9
|
-
import { loadState } from "./state-io.js";
|
|
10
|
-
import { countBrokenWikilinks, isOutputMarkdownFile, safeReadText, validateSynthFiles } from "./validate.js";
|
|
11
|
-
import { countCompiledZoneArtifacts } from "./artifact-counts.js";
|
|
12
|
-
function toFiniteNumber(value) {
|
|
13
|
-
if (typeof value !== "number" || !Number.isFinite(value))
|
|
14
|
-
return null;
|
|
15
|
-
return value;
|
|
16
|
-
}
|
|
17
|
-
function hasAcceptanceRules(acceptance) {
|
|
18
|
-
if (!acceptance)
|
|
19
|
-
return false;
|
|
20
|
-
return (acceptance.artifacts_exist?.length ?? 0) > 0 ||
|
|
21
|
-
(acceptance.stage_truthy?.length ?? 0) > 0 ||
|
|
22
|
-
Object.keys(acceptance.stage_equals_counts ?? {}).length > 0 ||
|
|
23
|
-
Object.keys(acceptance.stage_at_least ?? {}).length > 0 ||
|
|
24
|
-
Object.keys(acceptance.stage_at_least_counts ?? {}).length > 0 ||
|
|
25
|
-
Object.keys(acceptance.zone_counts_at_least ?? {}).length > 0 ||
|
|
26
|
-
Object.keys(acceptance.zone_counts_at_least_counts ?? {}).length > 0 ||
|
|
27
|
-
(acceptance.markdown_frontmatter_valid_zones?.length ?? 0) > 0 ||
|
|
28
|
-
Object.keys(acceptance.frontmatter_required_keys_in_zones ?? {}).length > 0 ||
|
|
29
|
-
(acceptance.markdown_abstract_valid_zones?.length ?? 0) > 0 ||
|
|
30
|
-
(acceptance.wikilinks_valid_in_zones?.length ?? 0) > 0 ||
|
|
31
|
-
Object.keys(acceptance.artifacts_must_not_contain ?? {}).length > 0;
|
|
32
|
-
}
|
|
33
|
-
function readPathValue(record, keyPath) {
|
|
34
|
-
if (!record)
|
|
35
|
-
return undefined;
|
|
36
|
-
return keyPath
|
|
37
|
-
.split(".")
|
|
38
|
-
.filter((segment) => segment.length > 0)
|
|
39
|
-
.reduce((current, segment) => {
|
|
40
|
-
if (!current || typeof current !== "object" || Array.isArray(current))
|
|
41
|
-
return undefined;
|
|
42
|
-
return current[segment];
|
|
43
|
-
}, record);
|
|
44
|
-
}
|
|
45
|
-
function markdownFilesForZone(compiledPath, zonePath, kind) {
|
|
46
|
-
const absolutePath = compiledZoneAbsolutePath(compiledPath, { path: zonePath });
|
|
47
|
-
if (!existsSync(absolutePath))
|
|
48
|
-
return [];
|
|
49
|
-
if (kind === "file") {
|
|
50
|
-
return isOutputMarkdownFile(absolutePath) ? [absolutePath] : [];
|
|
51
|
-
}
|
|
52
|
-
return listFilesRecursive(absolutePath, isOutputMarkdownFile);
|
|
53
|
-
}
|
|
54
|
-
function zoneRoots(compiledPath, acceptanceZones) {
|
|
55
|
-
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
56
|
-
if (!schema)
|
|
57
|
-
return [];
|
|
58
|
-
return acceptanceZones
|
|
59
|
-
.map((zoneId) => findCompiledSchemaZone(schema, zoneId))
|
|
60
|
-
.filter((zone) => zone !== null)
|
|
61
|
-
.map((zone) => compiledZoneAbsolutePath(compiledPath, zone));
|
|
62
|
-
}
|
|
63
|
-
function readArtifactText(compiledPath, relativePath) {
|
|
64
|
-
const artifactPath = join(compiledPath, relativePath);
|
|
65
|
-
if (!existsSync(artifactPath))
|
|
66
|
-
return null;
|
|
67
|
-
return safeReadText(artifactPath);
|
|
68
|
-
}
|
|
69
|
-
function resolveStageCounts(contract, stageRecord) {
|
|
70
|
-
const merged = { ...contract.counts };
|
|
71
|
-
const fromStage = stageRecord?.counts;
|
|
72
|
-
if (fromStage && typeof fromStage === "object" && !Array.isArray(fromStage)) {
|
|
73
|
-
for (const [key, value] of Object.entries(fromStage)) {
|
|
74
|
-
const numeric = toFiniteNumber(value);
|
|
75
|
-
if (numeric !== null)
|
|
76
|
-
merged[key] = numeric;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return merged;
|
|
80
|
-
}
|
|
81
|
-
export function stageRecordFromState(state, stageId) {
|
|
82
|
-
const stages = state?.stages;
|
|
83
|
-
if (!stages || typeof stages !== "object")
|
|
84
|
-
return null;
|
|
85
|
-
const stage = stages[stageId];
|
|
86
|
-
if (!stage || typeof stage !== "object" || Array.isArray(stage))
|
|
87
|
-
return null;
|
|
88
|
-
return stage;
|
|
89
|
-
}
|
|
90
|
-
export function validateResolvedStageAcceptance(dirPath, options) {
|
|
91
|
-
const acceptance = options.acceptance;
|
|
92
|
-
if (!hasAcceptanceRules(acceptance)) {
|
|
93
|
-
return {
|
|
94
|
-
ok: true,
|
|
95
|
-
summary: "No additional stage acceptance criteria were declared.",
|
|
96
|
-
failures: [],
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(dirPath));
|
|
100
|
-
if (!schema) {
|
|
101
|
-
return {
|
|
102
|
-
ok: false,
|
|
103
|
-
summary: `Stage acceptance failed for ${options.stageId}: missing Method schema.`,
|
|
104
|
-
failures: [`Missing method/${METHOD_SCHEMA_FILE}.`],
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
const failures = [];
|
|
108
|
-
const state = loadState(dirPath);
|
|
109
|
-
const stageRecord = stageRecordFromState(state, options.stageId);
|
|
110
|
-
const counts = options.counts ?? {};
|
|
111
|
-
for (const relativePath of acceptance?.artifacts_exist ?? []) {
|
|
112
|
-
if (!existsSync(join(dirPath, relativePath))) {
|
|
113
|
-
failures.push(`Missing required artifact: ${relativePath}.`);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
for (const keyPath of acceptance?.stage_truthy ?? []) {
|
|
117
|
-
if (!readPathValue(stageRecord, keyPath)) {
|
|
118
|
-
failures.push(`Expected truthy stage value at "${keyPath}".`);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
for (const [keyPath, countKey] of Object.entries(acceptance?.stage_equals_counts ?? {})) {
|
|
122
|
-
const actual = readPathValue(stageRecord, keyPath);
|
|
123
|
-
const expected = counts[countKey];
|
|
124
|
-
if (typeof expected !== "number") {
|
|
125
|
-
failures.push(`Acceptance references missing count "${countKey}" for "${keyPath}".`);
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
|
-
if (actual !== expected) {
|
|
129
|
-
failures.push(`Expected stage "${keyPath}" to equal count "${countKey}" (${expected}), got ${JSON.stringify(actual)}.`);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
for (const [keyPath, minimum] of Object.entries(acceptance?.stage_at_least ?? {})) {
|
|
133
|
-
const actual = toFiniteNumber(readPathValue(stageRecord, keyPath));
|
|
134
|
-
if (actual === null || actual < minimum) {
|
|
135
|
-
failures.push(`Expected stage "${keyPath}" to be at least ${minimum}, got ${actual === null ? "non-numeric" : actual}.`);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
for (const [keyPath, countKey] of Object.entries(acceptance?.stage_at_least_counts ?? {})) {
|
|
139
|
-
const actual = toFiniteNumber(readPathValue(stageRecord, keyPath));
|
|
140
|
-
const expected = counts[countKey];
|
|
141
|
-
if (typeof expected !== "number") {
|
|
142
|
-
failures.push(`Acceptance references missing count "${countKey}" for "${keyPath}".`);
|
|
143
|
-
continue;
|
|
144
|
-
}
|
|
145
|
-
if (actual === null || actual < expected) {
|
|
146
|
-
failures.push(`Expected stage "${keyPath}" to be at least count "${countKey}" (${expected}), got ${actual === null ? "non-numeric" : actual}.`);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
for (const [zoneId, minimum] of Object.entries(acceptance?.zone_counts_at_least ?? {})) {
|
|
150
|
-
const zone = findCompiledSchemaZone(schema, zoneId);
|
|
151
|
-
if (!zone) {
|
|
152
|
-
failures.push(`Acceptance references unknown zone "${zoneId}".`);
|
|
153
|
-
continue;
|
|
154
|
-
}
|
|
155
|
-
const actual = countCompiledZoneArtifacts(dirPath, zone.path, zone.kind);
|
|
156
|
-
if (actual < minimum) {
|
|
157
|
-
failures.push(`Expected zone "${zoneId}" to contain at least ${minimum} artifact(s), got ${actual}.`);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
for (const [zoneId, countKey] of Object.entries(acceptance?.zone_counts_at_least_counts ?? {})) {
|
|
161
|
-
const zone = findCompiledSchemaZone(schema, zoneId);
|
|
162
|
-
if (!zone) {
|
|
163
|
-
failures.push(`Acceptance references unknown zone "${zoneId}".`);
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
const expected = counts[countKey];
|
|
167
|
-
if (typeof expected !== "number") {
|
|
168
|
-
failures.push(`Acceptance references missing count "${countKey}" for zone "${zoneId}".`);
|
|
169
|
-
continue;
|
|
170
|
-
}
|
|
171
|
-
const actual = countCompiledZoneArtifacts(dirPath, zone.path, zone.kind);
|
|
172
|
-
if (actual < expected) {
|
|
173
|
-
failures.push(`Expected zone "${zoneId}" to contain at least count "${countKey}" (${expected}) artifact(s), got ${actual}.`);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
for (const zoneId of acceptance?.markdown_frontmatter_valid_zones ?? []) {
|
|
177
|
-
const zone = findCompiledSchemaZone(schema, zoneId);
|
|
178
|
-
if (!zone) {
|
|
179
|
-
failures.push(`Acceptance references unknown zone "${zoneId}".`);
|
|
180
|
-
continue;
|
|
181
|
-
}
|
|
182
|
-
const validation = validateSynthFiles(markdownFilesForZone(dirPath, zone.path, zone.kind));
|
|
183
|
-
if (validation.invalid_frontmatter > 0) {
|
|
184
|
-
failures.push(`Zone "${zoneId}" has ${validation.invalid_frontmatter} markdown file(s) with invalid or incomplete frontmatter.`);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
for (const [zoneId, requiredKeys] of Object.entries(acceptance?.frontmatter_required_keys_in_zones ?? {})) {
|
|
188
|
-
const zone = findCompiledSchemaZone(schema, zoneId);
|
|
189
|
-
if (!zone) {
|
|
190
|
-
failures.push(`Acceptance references unknown zone "${zoneId}".`);
|
|
191
|
-
continue;
|
|
192
|
-
}
|
|
193
|
-
const validation = validateSynthFiles(markdownFilesForZone(dirPath, zone.path, zone.kind), { requiredFrontmatterKeys: requiredKeys });
|
|
194
|
-
if (validation.invalid_frontmatter > 0) {
|
|
195
|
-
failures.push(`Zone "${zoneId}" has ${validation.invalid_frontmatter} markdown file(s) missing required frontmatter keys (${requiredKeys.join(", ")}).`);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
for (const zoneId of acceptance?.markdown_abstract_valid_zones ?? []) {
|
|
199
|
-
const zone = findCompiledSchemaZone(schema, zoneId);
|
|
200
|
-
if (!zone) {
|
|
201
|
-
failures.push(`Acceptance references unknown zone "${zoneId}".`);
|
|
202
|
-
continue;
|
|
203
|
-
}
|
|
204
|
-
const validation = validateSynthFiles(markdownFilesForZone(dirPath, zone.path, zone.kind));
|
|
205
|
-
if (validation.short_abstracts > 0) {
|
|
206
|
-
failures.push(`Zone "${zoneId}" has ${validation.short_abstracts} markdown file(s) with missing or weak abstracts.`);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
if ((acceptance?.wikilinks_valid_in_zones?.length ?? 0) > 0) {
|
|
210
|
-
const roots = zoneRoots(dirPath, acceptance?.wikilinks_valid_in_zones ?? []);
|
|
211
|
-
const brokenLinks = countBrokenWikilinks(dirPath, roots, roots);
|
|
212
|
-
if (brokenLinks > 0) {
|
|
213
|
-
failures.push(`Detected ${brokenLinks} broken wikilink(s) across the declared acceptance zones.`);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
for (const [relativePath, disallowedTexts] of Object.entries(acceptance?.artifacts_must_not_contain ?? {})) {
|
|
217
|
-
const content = readArtifactText(dirPath, relativePath);
|
|
218
|
-
if (content === null) {
|
|
219
|
-
failures.push(`Missing artifact required for content check: ${relativePath}.`);
|
|
220
|
-
continue;
|
|
221
|
-
}
|
|
222
|
-
for (const disallowed of disallowedTexts) {
|
|
223
|
-
if (content.includes(disallowed)) {
|
|
224
|
-
failures.push(`Artifact "${relativePath}" still contains forbidden text: ${JSON.stringify(disallowed)}.`);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
if (failures.length === 0) {
|
|
229
|
-
return {
|
|
230
|
-
ok: true,
|
|
231
|
-
summary: `Stage acceptance satisfied for ${options.stageId}.`,
|
|
232
|
-
failures: [],
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
return {
|
|
236
|
-
ok: false,
|
|
237
|
-
summary: `Stage acceptance failed for ${options.stageId}: ${failures.join(" ")}`,
|
|
238
|
-
failures,
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
export function validateStageContractAcceptance(dirPath, contract = null) {
|
|
242
|
-
const resolvedContract = contract ?? (() => {
|
|
243
|
-
const path = stageContractPath(dirPath);
|
|
244
|
-
if (!existsSync(path))
|
|
245
|
-
return null;
|
|
246
|
-
return readJsonFileWithSchema(path, "stage contract", RuntimeStageContractSchema);
|
|
247
|
-
})();
|
|
248
|
-
if (!resolvedContract) {
|
|
249
|
-
return {
|
|
250
|
-
ok: true,
|
|
251
|
-
summary: "No active stage contract found for acceptance validation.",
|
|
252
|
-
failures: [],
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
const state = loadState(dirPath);
|
|
256
|
-
const stageRecord = stageRecordFromState(state, resolvedContract.stage);
|
|
257
|
-
return validateResolvedStageAcceptance(dirPath, {
|
|
258
|
-
stageId: resolvedContract.stage,
|
|
259
|
-
acceptance: resolvedContract.acceptance,
|
|
260
|
-
counts: resolveStageCounts(resolvedContract, stageRecord),
|
|
261
|
-
});
|
|
262
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type { RuntimeRunPatch, RuntimeRunStatus, RuntimeStageAcceptanceValidation, RuntimeStageContractDraft, RuntimeStageExecutionOptions, RuntimeSummarizeExecutionOptions, RuntimeStageContractOptions, } from "./runtime-types.js";
|
|
2
|
-
export { archivedStageContractPath, eventLogPath, logsDirPath, promptLogPath, runHistoryPath, runPath, stageContractPath, statusLogPath, } from "./runtime-paths.js";
|
|
3
|
-
export { validateStageContractAcceptance } from "./runtime-acceptance.js";
|
|
4
|
-
export { buildStagePrompt } from "./runtime-prompt.js";
|
|
5
|
-
export { buildRuntimeStageContract, } from "./runtime-contracts.js";
|
|
6
|
-
export { beginRuntimeRun, loadRuntimeRun, markRuntimeRunFailedAfterValidation, markRuntimeRunSucceededAfterValidation, runExecutorStage, runExecutorSummarizeStage, saveRuntimeRun, updateRuntimeRun, writeStageContract, } from "./runtime-runs.js";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export * as schema from "./lib/schema.js";
|
|
2
|
-
export * as actionValues from "./action-values.js";
|
|
3
|
-
export * as actionDefinitions from "./action-definitions.js";
|
|
4
|
-
export * as routes from "./routes.js";
|
|
5
|
-
export * as client from "./client.js";
|
|
6
|
-
export * as runtime from "./runtime.js";
|
|
7
|
-
export * as server from "./server.js";
|
|
8
|
-
export type { CompileRunCreateRequest, CompileRunResource, CompileRunSummary, LocalServiceDiscovery, PortableContextMapping, PreparationRunLinkage, PreparationResource, MethodResource, LocalJobAgent, LocalJobEvent, LocalJobEventAppendRequest, LocalJobEventType, LocalJobRunCreateRequest, LocalJobRunResource, LocalJobStatus, LocalRunHandlerResult, LocalJobStep, LocalJobType, LocalServiceConfig, LocalServiceError, LocalServiceHealth, LocalExecutorStatus, ActionClientOrigin, ActionProposalApproval, ActionProposalApprovalRequest, ActionProposalCreateRequest, ActionProposalListResponse, ActionProposalPlan, ActionProposalPlanActionType, ActionProposalResource, ActionProposalStatus, ActionProposalType, MethodChangeResult, PreparationChangeResult, PreparationSetupResult, ResetRequest, ResetResult, PortableContextResource, ReadinessResource, SourceFileResource, ReadinessCheckDraftCreateRequest, ReadinessCheckDraftResult, TestRunCreateRequest, TestRunResource, TestRunStatus, RunObservabilityListResponse, RunObservabilityResource, MethodAuthoringCreateRequest, MethodAuthoringResult, PreparationListResponse, MethodListResponse, PortableContextListResponse, SourceFileListResponse, OpenPathRequest, OpenPathResponse, WorkspaceFileResource, } from "./lib/schema.js";
|
|
9
|
-
export { CompileRunCreateRequestSchema, CompileRunResourceSchema, CompileRunSummarySchema, LocalServiceDiscoverySchema, PortableContextMappingSchema, PreparationRunLinkageSchema, PreparationResourceSchema, MethodResourceSchema, LocalJobAgentSchema, LocalJobEventAppendRequestSchema, LocalJobEventSchema, LocalJobEventTypeSchema, LocalJobRunCreateRequestSchema, LocalJobRunResourceSchema, LocalJobStatusSchema, LocalRunHandlerResultSchema, LocalJobStepSchema, LocalJobTypeSchema, LocalServiceConfigSchema, LocalServiceErrorSchema, LocalServiceHealthSchema, PortableContextResourceSchema, ReadinessResourceSchema, SourceFileResourceSchema, ReadinessCheckDraftCreateRequestSchema, ReadinessCheckDraftResultSchema, TestRunCreateRequestSchema, TestRunResourceSchema, TestRunStatusSchema, RunObservabilityResourceSchema, RunObservabilityListResponseSchema, LocalExecutorStatusSchema, ActionClientOriginSchema, ActionProposalApprovalRequestSchema, ActionProposalApprovalSchema, ActionProposalCreateRequestSchema, ActionProposalListResponseSchema, ActionProposalPlanSchema, ActionProposalPlanActionTypeSchema, ActionProposalResourceSchema, ActionProposalStatusSchema, ActionProposalTypeSchema, ResetRequestSchema, ResetResultSchema, MethodAuthoringCreateRequestSchema, MethodAuthoringResultSchema, PreparationListResponseSchema, MethodListResponseSchema, PortableContextListResponseSchema, SourceFileListResponseSchema, OpenPathRequestSchema, OpenPathResponseSchema, } from "./lib/schema.js";
|
|
10
|
-
export { LOCAL_SERVICE_DEFAULT_HOST, LOCAL_SERVICE_DEFAULT_PORT, LOCAL_SERVICE_ROUTES, buildLocalServiceUrl, } from "./routes.js";
|
|
11
|
-
export type { ServiceRegistry, ServiceRegistryEntry, ServiceRegistryWorkspace, } from "./lib/schema.js";
|
|
12
|
-
export { ServiceRegistrySchema, ServiceRegistryEntrySchema, ServiceRegistryWorkspaceSchema, } from "./lib/schema.js";
|
|
13
|
-
export { readServiceRegistry, registerServiceLocally, unregisterService, writeServiceRegistry, serviceRegistryPath, } from "./service-registry.js";
|
|
14
|
-
export type { LocalServiceJobSubmission, LocalServiceJobSubmitted, LocalServiceConnection, } from "./client.js";
|
|
15
|
-
export type { LocalCompileRunCancelResult, } from "./client.js";
|
|
16
|
-
export { approveActionProposalInLocalService, cancelLocalCompileRun, configuredLocalServiceUrl, resolveLocalServiceAuthToken, createActionProposalInLocalService, decideActionProposalInLocalService, findLocalService, getLocalJobRun, getLocalCompileRun, getLocalServiceHealth, getLocalTestRun, submitCompileRunToLocalService, submitReadinessCheckDraftToLocalService, submitResetToLocalService, submitTestRunToLocalService, submitMethodAuthoringRunToLocalService, waitForLocalJobRun, waitForLocalCompileRun, waitForLocalTestRun, } from "./client.js";
|
|
17
|
-
export type { LocalServiceActionPlanningContext, LocalServiceCompileRunContext, LocalServiceJobRunContext, LocalServiceRunHandlers, LocalServiceRuntimeOptions, LocalServiceTestRunContext, PreparationContext, } from "./runtime.js";
|
|
18
|
-
export { LocalServiceRuntime, createLocalServiceRuntime, } from "./runtime.js";
|
|
19
|
-
export type { StartedLocalService, StartLocalServiceOptions, } from "./server.js";
|
|
20
|
-
export { createLocalServiceServer, createLocalServiceAuthToken, startLocalService, } from "./server.js";
|
|
21
|
-
export type { NativeLocalServiceRunHandlerOptions, } from "./native-run-handlers.js";
|
|
22
|
-
export { createNativeLocalServiceRunHandlers, } from "./native-run-handlers.js";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * as schema from "./lib/schema.js";
|
|
2
|
-
export * as actionValues from "./action-values.js";
|
|
3
|
-
export * as actionDefinitions from "./action-definitions.js";
|
|
4
|
-
export * as routes from "./routes.js";
|
|
5
|
-
export * as client from "./client.js";
|
|
6
|
-
export * as runtime from "./runtime.js";
|
|
7
|
-
export * as server from "./server.js";
|
|
8
|
-
export { CompileRunCreateRequestSchema, CompileRunResourceSchema, CompileRunSummarySchema, LocalServiceDiscoverySchema, PortableContextMappingSchema, PreparationRunLinkageSchema, PreparationResourceSchema, MethodResourceSchema, LocalJobAgentSchema, LocalJobEventAppendRequestSchema, LocalJobEventSchema, LocalJobEventTypeSchema, LocalJobRunCreateRequestSchema, LocalJobRunResourceSchema, LocalJobStatusSchema, LocalRunHandlerResultSchema, LocalJobStepSchema, LocalJobTypeSchema, LocalServiceConfigSchema, LocalServiceErrorSchema, LocalServiceHealthSchema, PortableContextResourceSchema, ReadinessResourceSchema, SourceFileResourceSchema, ReadinessCheckDraftCreateRequestSchema, ReadinessCheckDraftResultSchema, TestRunCreateRequestSchema, TestRunResourceSchema, TestRunStatusSchema, RunObservabilityResourceSchema, RunObservabilityListResponseSchema, LocalExecutorStatusSchema, ActionClientOriginSchema, ActionProposalApprovalRequestSchema, ActionProposalApprovalSchema, ActionProposalCreateRequestSchema, ActionProposalListResponseSchema, ActionProposalPlanSchema, ActionProposalPlanActionTypeSchema, ActionProposalResourceSchema, ActionProposalStatusSchema, ActionProposalTypeSchema, ResetRequestSchema, ResetResultSchema, MethodAuthoringCreateRequestSchema, MethodAuthoringResultSchema, PreparationListResponseSchema, MethodListResponseSchema, PortableContextListResponseSchema, SourceFileListResponseSchema, OpenPathRequestSchema, OpenPathResponseSchema, } from "./lib/schema.js";
|
|
9
|
-
export { LOCAL_SERVICE_DEFAULT_HOST, LOCAL_SERVICE_DEFAULT_PORT, LOCAL_SERVICE_ROUTES, buildLocalServiceUrl, } from "./routes.js";
|
|
10
|
-
export { ServiceRegistrySchema, ServiceRegistryEntrySchema, ServiceRegistryWorkspaceSchema, } from "./lib/schema.js";
|
|
11
|
-
export { readServiceRegistry, registerServiceLocally, unregisterService, writeServiceRegistry, serviceRegistryPath, } from "./service-registry.js";
|
|
12
|
-
export { approveActionProposalInLocalService, cancelLocalCompileRun, configuredLocalServiceUrl, resolveLocalServiceAuthToken, createActionProposalInLocalService, decideActionProposalInLocalService, findLocalService, getLocalJobRun, getLocalCompileRun, getLocalServiceHealth, getLocalTestRun, submitCompileRunToLocalService, submitReadinessCheckDraftToLocalService, submitResetToLocalService, submitTestRunToLocalService, submitMethodAuthoringRunToLocalService, waitForLocalJobRun, waitForLocalCompileRun, waitForLocalTestRun, } from "./client.js";
|
|
13
|
-
export { LocalServiceRuntime, createLocalServiceRuntime, } from "./runtime.js";
|
|
14
|
-
export { createLocalServiceServer, createLocalServiceAuthToken, startLocalService, } from "./server.js";
|
|
15
|
-
export { createNativeLocalServiceRunHandlers, } from "./native-run-handlers.js";
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { MethodExecutor } from "../agents/lib/executors.js";
|
|
2
|
-
import { validateMethodPackage } from "../method-package/local-methods.js";
|
|
3
|
-
import type { SourceReadinessCheck } from "../project-model/lib/schema.js";
|
|
4
|
-
export interface MethodAuthoringRunResult {
|
|
5
|
-
status: "updated" | "no-change" | "invalid" | "executor-failed";
|
|
6
|
-
changed: boolean;
|
|
7
|
-
summary: string;
|
|
8
|
-
validation: ReturnType<typeof validateMethodPackage> | null;
|
|
9
|
-
methodPath: string;
|
|
10
|
-
shellPath: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function runMethodAuthoringDraft(options: {
|
|
13
|
-
prepDataDir: string;
|
|
14
|
-
sourceFolderPath: string;
|
|
15
|
-
baseMethodId?: string;
|
|
16
|
-
methodId: string;
|
|
17
|
-
label: string;
|
|
18
|
-
hint: string;
|
|
19
|
-
taskPrompt: string;
|
|
20
|
-
checks?: SourceReadinessCheck[];
|
|
21
|
-
executor: MethodExecutor;
|
|
22
|
-
onStatus?: (line: string) => void;
|
|
23
|
-
}): Promise<MethodAuthoringRunResult>;
|
|
24
|
-
export declare function resolveMethodDraftPath(sourcePath: string, methodId: string): string;
|