@cassiomc1/forgeloop 1.13.0 → 2.0.0-rc.2
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/AGENT_COMPATIBILITY.md +8 -0
- package/CONTRIBUTING.md +11 -7
- package/DOCS_INDEX.md +37 -4
- package/ENG/c-development-eng.md +2 -2
- package/ENG/cpp-development-eng.md +2 -2
- package/ENG/dotnet-aspnetcore-development-eng.md +7 -1
- package/ENG/flutter-development-eng.md +4 -2
- package/ENG/go-development-eng.md +2 -2
- package/ENG/java-development-eng.md +3 -3
- package/ENG/nodejs-backend-development-eng.md +10 -6
- package/ENG/php-development-eng.md +3 -3
- package/ENG/python-development-eng.md +205 -0
- package/ENG/rust-development-eng.md +42 -1
- package/ENG/sec-code-eng.md +7 -7
- package/ENG/sql-development-eng.md +4 -4
- package/ENG/swift-development-eng.md +5 -4
- package/ENG/test-code-eng.md +1 -1
- package/ENG/typescript-development-eng.md +4 -4
- package/EXECUTION_STATE.md +12 -0
- package/GUIDE_ROUTER.md +6 -0
- package/LICENSE +133 -21
- package/LOOP_ENGINEERING.md +28 -2
- package/LOOP_SYSTEM_DESIGN.md +10 -10
- package/ORCHESTRATOR_INTEGRATION.md +9 -5
- package/PROTOCOL_INTEGRATION.md +55 -2
- package/README.md +63 -59
- package/TERMINOLOGY.md +2 -0
- package/THIRD_PARTY_NOTICES.md +3 -4
- package/THREAT_MODEL.md +140 -1
- package/completions/_forgeloop +29 -3
- package/completions/forgeloop.bash +55 -3
- package/completions/forgeloop.fish +183 -1
- package/docs/ADVISORY_CONTEXT.md +25 -0
- package/docs/AGENT_BROWSER_ADAPTER.md +81 -0
- package/docs/AGENT_BROWSER_VERIFICATION.md +6 -0
- package/docs/AGENT_PROTOCOL_SUMMARY.md +74 -39
- package/docs/AGENT_SKILL.md +66 -0
- package/docs/ARTIFACT_REFERENCE.md +171 -35
- package/docs/AUDIT_UX.md +46 -0
- package/docs/BROWSER_VERIFICATION.md +136 -0
- package/docs/CLI_REFERENCE.md +512 -8
- package/docs/CODE_ATTESTATION.md +2 -2
- package/docs/DOCUMENTATION_GUIDE.md +34 -11
- package/docs/GETTING_STARTED.md +3 -3
- package/docs/JEV_BENCHMARKS.md +31 -0
- package/docs/MODEL_ROUTING.md +37 -0
- package/docs/OPENSRC_ADAPTER.md +241 -0
- package/docs/PACKAGE_CONTENTS.md +46 -18
- package/docs/PROVIDERS.md +126 -0
- package/docs/PROVIDER_ARCHITECTURE.md +199 -0
- package/docs/RECIPES.md +9 -0
- package/docs/RELEASE_CHECKLIST.md +116 -12
- package/docs/SECURITY_REVIEW.md +71 -0
- package/docs/SELF_HOSTED_TESTS.md +121 -0
- package/docs/SEMANTIC_DECISION_PLANE.md +71 -0
- package/docs/TEST_INTELLIGENCE.md +29 -0
- package/docs/TEST_PRUNING.md +14 -0
- package/docs/TROUBLESHOOTING.md +198 -1
- package/docs/UNIVERSAL_INTEGRATION.md +31 -0
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +2 -2
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +5 -5
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +1 -1
- package/docs/assets/diagrams/forgeloop-engineering-flow.html +39 -26
- package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
- package/docs/assets/diagrams/forgeloop-engineering-flow.svg +26 -26
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +2 -1
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +5 -5
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +1 -1
- package/docs/diagrams/README.md +13 -9
- package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +1 -1
- package/docs/diagrams/forgeloop-engineering-flow.workflow.json +24 -19
- package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +1 -0
- package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +4 -4
- package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +4 -4
- package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +4 -4
- package/docs/documentation-manifest.json +774 -16
- package/docs/protocol-requirements.json +24 -0
- package/package.json +43 -11
- package/schemas/config.schema.json +14 -0
- package/schemas/context-plan.schema.json +18 -0
- package/schemas/semantic-decision.schema.json +46 -0
- package/schemas/task-bundle.schema.json +7 -2
- package/schemas/test-utility.schema.json +44 -0
- package/scripts/CI_VALIDATORS.md +6 -6
- package/scripts/benchmark-jev.mjs +5 -0
- package/scripts/benchmark-test-intelligence.mjs +4 -0
- package/scripts/generate-agent-protocol-summary.mjs +6 -3
- package/scripts/generate-forgeloop-skill.mjs +133 -0
- package/scripts/jev-smoke.mjs +19 -0
- package/scripts/run-mcp-clean-tests.mjs +30 -0
- package/skills/forgeloop/README.md +9 -0
- package/skills/forgeloop/SKILL.md +77 -0
- package/skills/forgeloop/references/lifecycle.md +9 -0
- package/skills/forgeloop/references/recovery.md +7 -0
- package/skills/forgeloop/references/verification.md +7 -0
- package/src/adapters/agent-browser/assertions.js +47 -0
- package/src/adapters/agent-browser/commands.js +54 -0
- package/src/adapters/agent-browser/index.js +3 -0
- package/src/adapters/agent-browser/locator.js +40 -0
- package/src/adapters/agent-browser/process.js +215 -0
- package/src/adapters/agent-browser/provider.js +316 -0
- package/src/adapters/emulated-services/constants.js +24 -0
- package/src/adapters/emulated-services/index.js +7 -0
- package/src/adapters/emulated-services/process.js +162 -0
- package/src/adapters/emulated-services/provider.js +289 -0
- package/src/adapters/opensrc/normalize.js +90 -0
- package/src/adapters/opensrc/process.js +248 -0
- package/src/adapters/opensrc/provider.js +338 -0
- package/src/adapters/opensrc/search.js +264 -0
- package/src/adapters/temporary-paths.js +18 -0
- package/src/adapters/typesafe/client.js +28 -0
- package/src/adapters/typesafe/engine.js +63 -0
- package/src/adapters/typesafe/normalize.js +41 -0
- package/src/cli.js +218 -174
- package/src/commands/action-show.js +5 -2
- package/src/commands/advance.js +5 -1
- package/src/commands/baseline.js +13 -11
- package/src/commands/checkpoint-revalidate.js +192 -0
- package/src/commands/complete.js +19 -3
- package/src/commands/context-plan.js +38 -0
- package/src/commands/contract-create.js +266 -0
- package/src/commands/contract-revise.js +236 -0
- package/src/commands/decision-show.js +14 -0
- package/src/commands/decision-status.js +22 -0
- package/src/commands/discover.js +41 -0
- package/src/commands/doctor.js +51 -13
- package/src/commands/gate-record.js +194 -0
- package/src/commands/gate-revalidate.js +135 -0
- package/src/commands/handoff-list.js +6 -1
- package/src/commands/handoff-show.js +6 -1
- package/src/commands/migrate-protocol.js +2 -2
- package/src/commands/model-route.js +40 -0
- package/src/commands/next.js +7 -1
- package/src/commands/policy-diff.js +25 -4
- package/src/commands/progress.js +17 -11
- package/src/commands/record-diagnosis.js +3 -0
- package/src/commands/route.js +146 -18
- package/src/commands/semantic-plan.js +41 -0
- package/src/commands/status.js +6 -1
- package/src/commands/storage-backup.js +15 -0
- package/src/commands/storage-migrate.js +5 -0
- package/src/commands/storage-migration-resume.js +5 -0
- package/src/commands/storage-migration-status.js +44 -0
- package/src/commands/storage-restore-resume.js +7 -0
- package/src/commands/storage-restore.js +8 -0
- package/src/commands/task-abandon.js +224 -0
- package/src/commands/task-list.js +8 -43
- package/src/commands/task-migrate-contract-bootstrap-repair.js +288 -0
- package/src/commands/task-migrate.js +3 -3
- package/src/commands/task-recover.js +10 -2
- package/src/commands/task-repair-contract-bootstrap.js +263 -0
- package/src/commands/task-scope.js +18 -2
- package/src/commands/task-show.js +16 -2
- package/src/commands/test-inventory.js +5 -0
- package/src/commands/test-prune-plan.js +5 -0
- package/src/commands/test-prune-probe.js +5 -0
- package/src/commands/test-utility.js +5 -0
- package/src/commands/validate-protocol.js +39 -15
- package/src/commands/validate-receipt.js +8 -1
- package/src/config/guides.json +4 -0
- package/src/core/action-ledger-projection.js +10 -3
- package/src/core/actions.js +38 -75
- package/src/core/activation.js +11 -3
- package/src/core/approvals.js +17 -51
- package/src/core/artifact-registry.js +83 -2
- package/src/core/artifacts.js +81 -27
- package/src/core/attachment-paths.js +45 -0
- package/src/core/attestation-coverage.js +6 -1
- package/src/core/attestation-verifier.js +21 -2
- package/src/core/attestation.js +17 -6
- package/src/core/audit-ux.js +514 -0
- package/src/core/audit.js +6 -1
- package/src/core/browser-verification/constants.js +149 -0
- package/src/core/browser-verification/normalize.js +254 -0
- package/src/core/browser-verification/provider.js +519 -0
- package/src/core/browser-verification/service.js +115 -0
- package/src/core/bundles.js +160 -66
- package/src/core/checkpoint-revalidation.js +321 -0
- package/src/core/cli-command-definitions.js +350 -7
- package/src/core/code-manifest.js +9 -3
- package/src/core/command-executors.js +274 -108
- package/src/core/command-input.js +136 -44
- package/src/core/completion-artifacts.js +85 -34
- package/src/core/completion-ownership.js +19 -8
- package/src/core/completion-recovery-rebind.js +11 -1
- package/src/core/completion.js +64 -15
- package/src/core/config.js +3 -0
- package/src/core/conformance.js +2 -1
- package/src/core/context-compiler/budget.js +9 -0
- package/src/core/context-compiler/candidates.js +39 -0
- package/src/core/context-compiler/compiler.js +63 -0
- package/src/core/context-compiler/fingerprint.js +11 -0
- package/src/core/context-compiler/policy.js +13 -0
- package/src/core/context-compiler/result.js +23 -0
- package/src/core/continuity-lint.js +13 -2
- package/src/core/continuity-reconciliation.js +16 -3
- package/src/core/continuity.js +16 -8
- package/src/core/contract-bootstrap-recovery.js +656 -0
- package/src/core/contract-revision.js +209 -0
- package/src/core/decision/artifact.js +70 -0
- package/src/core/decision/benchmarks.js +103 -0
- package/src/core/decision/cache.js +27 -0
- package/src/core/decision/constants.js +58 -0
- package/src/core/decision/cutover.js +34 -0
- package/src/core/decision/engine.js +22 -0
- package/src/core/decision/errors.js +68 -0
- package/src/core/decision/events.js +104 -0
- package/src/core/decision/freshness.js +19 -0
- package/src/core/decision/normalizers/index.js +115 -0
- package/src/core/decision/policy.js +18 -0
- package/src/core/decision/projection.js +16 -0
- package/src/core/decision/question-registry.js +201 -0
- package/src/core/decision/request.js +26 -0
- package/src/core/decision/resolver.js +138 -0
- package/src/core/decision/result.js +58 -0
- package/src/core/decision/service.js +181 -0
- package/src/core/decision/state-builder.js +65 -0
- package/src/core/decision/task-bindings.js +35 -0
- package/src/core/decision/test-provider.js +32 -0
- package/src/core/decision/thresholds.js +15 -0
- package/src/core/diagnosis-model.js +11 -0
- package/src/core/diagnosis.js +10 -1
- package/src/core/diagnostic-projection.js +29 -12
- package/src/core/diagnostic-record.js +28 -3
- package/src/core/efficiency.js +6 -1
- package/src/core/error-codes.js +278 -0
- package/src/core/events.js +535 -147
- package/src/core/evidence-readiness.js +9 -0
- package/src/core/execution-prerequisites.js +36 -13
- package/src/core/execution-profile.js +63 -38
- package/src/core/execution.js +26 -40
- package/src/core/filesystem.js +11 -0
- package/src/core/gate-artifact.js +105 -19
- package/src/core/gate-provenance.js +125 -0
- package/src/core/handoff.js +26 -14
- package/src/core/history.js +39 -35
- package/src/core/hypothesis-projection.js +32 -0
- package/src/core/information-gain-projection.js +104 -100
- package/src/core/inspect.js +12 -3
- package/src/core/integration-invocation-policy.js +37 -4
- package/src/core/integration-resources.js +119 -87
- package/src/core/ledger-event-collection.js +189 -0
- package/src/core/ledger-relations.js +23 -0
- package/src/core/model-router/constants.js +10 -0
- package/src/core/model-router/policy.js +103 -0
- package/src/core/model-router/router.js +37 -0
- package/src/core/native-storage.js +12 -0
- package/src/core/next-action-continuity.js +31 -9
- package/src/core/next-action-model.js +58 -0
- package/src/core/next-action-phases.js +131 -43
- package/src/core/next-action-refresh.js +43 -9
- package/src/core/next-action-review-phase.js +9 -4
- package/src/core/next-action-verification-phase.js +2 -1
- package/src/core/next-action.js +56 -9
- package/src/core/phase.js +266 -103
- package/src/core/policy-engine.js +12 -13
- package/src/core/preflight-consistency.js +89 -62
- package/src/core/preflight-loaders.js +48 -9
- package/src/core/preflight-model.js +6 -1
- package/src/core/preflight.js +29 -12
- package/src/core/progress.js +21 -10
- package/src/core/protocol-info.js +68 -0
- package/src/core/protocol-migration.js +7 -6
- package/src/core/protocol.js +20 -0
- package/src/core/reconcile-closure.js +281 -67
- package/src/core/recovery-history.js +67 -47
- package/src/core/reflection.js +72 -77
- package/src/core/responsibility.js +25 -13
- package/src/core/resumability.js +154 -44
- package/src/core/route-artifact.js +28 -4
- package/src/core/router.js +67 -1
- package/src/core/runtime-context.js +123 -61
- package/src/core/schema-validation.js +11 -3
- package/src/core/security-review/constants.js +64 -0
- package/src/core/security-review/normalize.js +245 -0
- package/src/core/security-review/provider.js +204 -0
- package/src/core/security-review/service.js +134 -0
- package/src/core/semantic-planning/constants.js +19 -0
- package/src/core/semantic-planning/projection.js +94 -0
- package/src/core/semantic-planning/service.js +15 -0
- package/src/core/settlement.js +12 -1
- package/src/core/signing/bundle-file.js +53 -0
- package/src/core/signing/bundle-reference.js +15 -0
- package/src/core/signing/sigstore.js +60 -33
- package/src/core/signing/statement-file.js +27 -0
- package/src/core/sources.js +37 -0
- package/src/core/storage-runtime-registry.js +41 -0
- package/src/core/structural-quality/artifacts.js +20 -14
- package/src/core/structural-quality/service.js +81 -56
- package/src/core/target-layout.js +1 -1
- package/src/core/task-claim-state.js +249 -15
- package/src/core/task-command.js +21 -1
- package/src/core/task-conflict-inspection.js +133 -102
- package/src/core/task-descriptor.js +29 -22
- package/src/core/task-discovery.js +288 -90
- package/src/core/task-lock.js +66 -306
- package/src/core/task-migration-validation.js +5 -5
- package/src/core/task-migration.js +17 -287
- package/src/core/task-paths.js +13 -0
- package/src/core/task-recovery.js +1 -0
- package/src/core/task-snapshot.js +51 -8
- package/src/core/task-storage-migration.js +18 -0
- package/src/core/templates.js +23 -8
- package/src/core/test-intelligence/benchmarks.js +68 -0
- package/src/core/test-intelligence/inventory.js +73 -0
- package/src/core/test-intelligence/prune.js +94 -0
- package/src/core/test-intelligence/semantic-state.js +15 -0
- package/src/core/test-intelligence/service.js +40 -0
- package/src/core/test-intelligence/utility.js +50 -0
- package/src/core/trace.js +164 -105
- package/src/core/trajectory-evaluation.js +15 -3
- package/src/core/trajectory-metrics.js +47 -32
- package/src/core/transaction.js +16 -287
- package/src/core/verification-scope.js +20 -12
- package/src/core/work-state.js +100 -59
- package/src/integration.d.ts +492 -0
- package/src/integration.js +54 -0
- package/src/providers/README.md +47 -0
- package/src/providers/capabilities.js +46 -0
- package/src/providers/errors.js +15 -0
- package/src/providers/index.js +29 -0
- package/src/providers/json-snapshot.js +105 -0
- package/src/providers/registry.js +152 -0
- package/src/repository-index/binary-manager.js +7 -5
- package/src/storage/artifact-bytes.js +22 -0
- package/src/storage/attachment-binding.js +11 -0
- package/src/storage/attachment-files.js +82 -0
- package/src/storage/attachment-references.js +36 -0
- package/src/storage/backup.js +53 -0
- package/src/storage/capabilities.js +31 -0
- package/src/storage/connection-owner.js +119 -0
- package/src/storage/connection.js +376 -0
- package/src/storage/existing-project-scope.js +45 -0
- package/src/storage/export-destination.js +44 -0
- package/src/storage/exporter.js +284 -0
- package/src/storage/file-durability.js +46 -0
- package/src/storage/importer.js +461 -0
- package/src/storage/index.js +74 -0
- package/src/storage/leases.js +63 -0
- package/src/storage/ledger-event-snapshot.js +150 -0
- package/src/storage/ledger-relations.js +220 -0
- package/src/storage/legacy-maintenance-boundary.js +18 -0
- package/src/storage/legacy-signature.js +115 -0
- package/src/storage/maintenance-handoff.js +129 -0
- package/src/storage/maintenance-owner.js +42 -0
- package/src/storage/maintenance.js +310 -0
- package/src/storage/metadata-json.js +35 -0
- package/src/storage/migration-activate.js +59 -0
- package/src/storage/migration-archive.js +57 -0
- package/src/storage/migration-attachment-root.js +61 -0
- package/src/storage/migration-candidate.js +398 -0
- package/src/storage/migration-publication.js +143 -0
- package/src/storage/migration-rollback-admission.js +54 -0
- package/src/storage/migration-rollback-preparation.js +132 -0
- package/src/storage/migration-rollback-publication.js +183 -0
- package/src/storage/migration-rollback-release.js +66 -0
- package/src/storage/migration-rollback-source-stage.js +103 -0
- package/src/storage/migration-rollback.js +43 -0
- package/src/storage/migration-source-partition.js +56 -0
- package/src/storage/migration-source.js +255 -0
- package/src/storage/migration-terminal.js +39 -0
- package/src/storage/migration-validation.js +75 -0
- package/src/storage/migration.js +43 -0
- package/src/storage/operational-attachments.js +49 -0
- package/src/storage/operational-context.js +50 -0
- package/src/storage/project-backup.js +98 -0
- package/src/storage/project-bootstrap.js +24 -0
- package/src/storage/project-boundary.js +79 -0
- package/src/storage/project-read-snapshot.js +18 -0
- package/src/storage/project-replacement.js +137 -0
- package/src/storage/project-restore.js +203 -0
- package/src/storage/record-definitions.js +45 -0
- package/src/storage/repository.js +507 -0
- package/src/storage/restore-journal.js +62 -0
- package/src/storage/restore-layout.js +30 -0
- package/src/storage/restore-preparation.js +84 -0
- package/src/storage/restore-replacement-archive.js +162 -0
- package/src/storage/restore-replacement-owner.js +31 -0
- package/src/storage/restore-replacement-preparation.js +128 -0
- package/src/storage/restore-replacement.js +142 -0
- package/src/storage/restore-terminal.js +32 -0
- package/src/storage/runtime.js +31 -0
- package/src/storage/schema.js +214 -0
- package/src/storage/singleton-import.js +84 -0
- package/src/storage/snapshot-continuity.js +16 -0
- package/src/storage/snapshot.js +36 -0
- package/src/storage/storage-marker.js +79 -0
- package/src/storage/task-guards.js +107 -0
- package/src/storage/topology.js +42 -0
- package/src/storage/transaction.js +179 -0
- package/src/storage/unit-of-work.js +663 -0
- package/src/storage/windows-process-incarnation.js +206 -0
- package/.forgeloop/forgeloop.gitignore +0 -4
- package/LICENSE-DOCS.md +0 -13
- package/src/core/transaction-maintenance.js +0 -70
package/src/cli.js
CHANGED
|
@@ -4,92 +4,6 @@ import { readFile } from "node:fs/promises";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
|
|
7
|
-
import { formatStatusResult } from "./commands/status.js";
|
|
8
|
-
import { formatValidateStateResult } from "./commands/validate-state.js";
|
|
9
|
-
import { formatClearStateResult } from "./commands/clear-state.js";
|
|
10
|
-
import { formatInspectResult } from "./commands/inspect.js";
|
|
11
|
-
import { formatRouteResult } from "./commands/route.js";
|
|
12
|
-
import { formatValidateProtocolResult } from "./commands/validate-protocol.js";
|
|
13
|
-
import { formatActivateResult } from "./commands/activate.js";
|
|
14
|
-
import { formatAdvanceResult } from "./commands/advance.js";
|
|
15
|
-
import { formatPreflightResult } from "./commands/preflight.js";
|
|
16
|
-
import { formatQualityBaselineResult } from "./commands/quality-baseline.js";
|
|
17
|
-
import { formatQualityVerifyResult } from "./commands/quality-verify.js";
|
|
18
|
-
import { formatQualityStatusResult } from "./commands/quality-status.js";
|
|
19
|
-
import { formatCompleteResult } from "./commands/complete.js";
|
|
20
|
-
import { formatAuditResult } from "./commands/audit.js";
|
|
21
|
-
import { formatReportResult } from "./commands/report.js";
|
|
22
|
-
import { formatPolicyResult } from "./commands/policy.js";
|
|
23
|
-
import { formatPolicyDiscoverResult } from "./commands/policy-discover.js";
|
|
24
|
-
import { formatPolicyStatusResult } from "./commands/policy-status.js";
|
|
25
|
-
import { formatPolicyDiffResult } from "./commands/policy-diff.js";
|
|
26
|
-
import { formatRuleVerifyResult } from "./commands/rule-verify.js";
|
|
27
|
-
import { formatBaselineResult } from "./commands/baseline.js";
|
|
28
|
-
import { formatProfileInterviewResult } from "./commands/profile-interview.js";
|
|
29
|
-
import { formatBundleResult } from "./commands/bundle.js";
|
|
30
|
-
import { formatPrepareCompletionResult } from "./commands/prepare-completion.js";
|
|
31
|
-
import { formatRecordCheckResult } from "./commands/record-check.js";
|
|
32
|
-
import { formatRunCheckResult } from "./commands/run-check.js";
|
|
33
|
-
import { formatRunActionResult } from "./commands/run-action.js";
|
|
34
|
-
import { formatActionProposeResult } from "./commands/action-propose.js";
|
|
35
|
-
import { formatActionRecordResult } from "./commands/action-record.js";
|
|
36
|
-
import { formatActionAuthorizeResult } from "./commands/action-authorize.js";
|
|
37
|
-
import { formatActionVerifyResult } from "./commands/action-verify.js";
|
|
38
|
-
import { formatActionShowResult } from "./commands/action-show.js";
|
|
39
|
-
import { formatActionReconcileResult } from "./commands/action-reconcile.js";
|
|
40
|
-
import { formatMetricsResult } from "./commands/metrics.js";
|
|
41
|
-
import { formatUsageRecordResult } from "./commands/usage-record.js";
|
|
42
|
-
import { formatEfficiencyResult } from "./commands/efficiency.js";
|
|
43
|
-
import { formatEvalResult } from "./commands/eval.js";
|
|
44
|
-
import { formatApprovalRequestResult } from "./commands/approval-request.js";
|
|
45
|
-
import { formatApprovalResolveResult } from "./commands/approval-resolve.js";
|
|
46
|
-
import { formatReconcileClosureResult } from "./commands/reconcile-closure.js";
|
|
47
|
-
import { formatRecordTerminalResult } from "./commands/record-terminal-result.js";
|
|
48
|
-
import { formatRecordDiagnosisResult } from "./commands/record-diagnosis.js";
|
|
49
|
-
import { formatRecordInterventionResult } from "./commands/record-intervention.js";
|
|
50
|
-
import { formatRecordHypothesisDispositionResult } from "./commands/record-hypothesis-disposition.js";
|
|
51
|
-
import { formatHistoryResult } from "./commands/history.js";
|
|
52
|
-
import { formatTraceResult } from "./commands/trace.js";
|
|
53
|
-
import { formatReflectResult } from "./commands/reflect.js";
|
|
54
|
-
import { formatProgressResult } from "./commands/progress.js";
|
|
55
|
-
import { formatRecordDecisionCriterionResult } from "./commands/record-decision-criterion.js";
|
|
56
|
-
import { formatNextActionResult, formatCompactNextActionResult } from "./commands/next.js";
|
|
57
|
-
import { formatContinuityResult } from "./commands/continuity.js";
|
|
58
|
-
import { formatRecordContinuityResult } from "./commands/record-continuity.js";
|
|
59
|
-
import { formatReconcileContinuityResult } from "./commands/reconcile-continuity.js";
|
|
60
|
-
import { formatClearContinuityResult } from "./commands/clear-continuity.js";
|
|
61
|
-
import { formatTaskCreateResult } from "./commands/task-create.js";
|
|
62
|
-
import { formatTaskListResult } from "./commands/task-list.js";
|
|
63
|
-
import { formatTaskShowResult, formatCompactTaskShowResult } from "./commands/task-show.js";
|
|
64
|
-
import { formatTaskScopeResult } from "./commands/task-scope.js";
|
|
65
|
-
import { formatTaskMigrateResult } from "./commands/task-migrate.js";
|
|
66
|
-
import { formatMigrateProtocolResult } from "./commands/migrate-protocol.js";
|
|
67
|
-
import { formatTaskUnlockResult } from "./commands/task-unlock.js";
|
|
68
|
-
import { formatTaskRecoverResult } from "./commands/task-recover.js";
|
|
69
|
-
import { formatTaskResumeResult } from "./commands/task-resume.js";
|
|
70
|
-
import {
|
|
71
|
-
formatTaskRepairLegacyRecoveryResult,
|
|
72
|
-
} from "./commands/task-repair-legacy-recovery.js";
|
|
73
|
-
import { formatTaskLockStatusResult } from "./commands/task-lock-status.js";
|
|
74
|
-
import { formatProtocolInfoResult } from "./commands/protocol-info.js";
|
|
75
|
-
import { formatWorkspaceBindResult } from "./commands/workspace-bind.js";
|
|
76
|
-
import { formatWorkspaceStatusResult } from "./commands/workspace-status.js";
|
|
77
|
-
import { formatHandoffCreateResult } from "./commands/handoff-create.js";
|
|
78
|
-
import { formatHandoffListResult } from "./commands/handoff-list.js";
|
|
79
|
-
import { formatHandoffShowResult } from "./commands/handoff-show.js";
|
|
80
|
-
import { formatHandoffAcceptResult } from "./commands/handoff-accept.js";
|
|
81
|
-
import { formatResponsibilitySetResult } from "./commands/responsibility-set.js";
|
|
82
|
-
import { formatResponsibilityStatusResult } from "./commands/responsibility-status.js";
|
|
83
|
-
import { formatVerifyScopeResult } from "./commands/verify-scope.js";
|
|
84
|
-
import { formatAttestationCreateResult } from "./commands/attestation-create.js";
|
|
85
|
-
import { formatAttestationVerifyResult } from "./commands/attestation-verify.js";
|
|
86
|
-
import { formatAttestationStatusResult } from "./commands/attestation-status.js";
|
|
87
|
-
import { formatAttestationVerifyRangeResult } from "./commands/attestation-verify-range.js";
|
|
88
|
-
import {
|
|
89
|
-
formatRepositoryIndexResult,
|
|
90
|
-
formatRepositoryIndexStatus,
|
|
91
|
-
formatSearchResult,
|
|
92
|
-
} from "./commands/repository-index.js";
|
|
93
7
|
import { defaultCommandInputValues, validateForgeLoopCommandInput } from "./core/command-input.js";
|
|
94
8
|
import { COMMAND_EXECUTORS } from "./core/command-executors.js";
|
|
95
9
|
import { resolveTarget } from "./core/filesystem.js";
|
|
@@ -349,9 +263,79 @@ function renderJsonOr(options, result, formatter) {
|
|
|
349
263
|
}
|
|
350
264
|
|
|
351
265
|
export const COMMAND_HANDLERS = Object.freeze({
|
|
266
|
+
discover: async ({ target, packageRoot, options }) => {
|
|
267
|
+
const { result } = await COMMAND_EXECUTORS.discover({ target, packageRoot, options });
|
|
268
|
+
renderJsonOr(options, result, (await import("./commands/discover.js")).formatDiscoverResult);
|
|
269
|
+
return 0;
|
|
270
|
+
},
|
|
271
|
+
"contract-create": async ({ target, packageRoot, options }) => {
|
|
272
|
+
const { result } = await COMMAND_EXECUTORS["contract-create"]({ target, packageRoot, options });
|
|
273
|
+
renderJsonOr(options, result, (await import("./commands/contract-create.js")).formatContractCreateResult);
|
|
274
|
+
return 0;
|
|
275
|
+
},
|
|
276
|
+
"contract-revise": async ({ target, packageRoot, options }) => {
|
|
277
|
+
const { result } = await COMMAND_EXECUTORS["contract-revise"]({ target, packageRoot, options });
|
|
278
|
+
renderJsonOr(options, result, (await import("./commands/contract-revise.js")).formatContractReviseResult);
|
|
279
|
+
return 0;
|
|
280
|
+
},
|
|
281
|
+
"gate-record": async ({ target, packageRoot, options }) => {
|
|
282
|
+
const { result } = await COMMAND_EXECUTORS["gate-record"]({ target, packageRoot, options });
|
|
283
|
+
renderJsonOr(options, result, (await import("./commands/gate-record.js")).formatGateRecordResult);
|
|
284
|
+
return 0;
|
|
285
|
+
},
|
|
286
|
+
"gate-revalidate": async ({ target, packageRoot, options }) => {
|
|
287
|
+
const { result } = await COMMAND_EXECUTORS["gate-revalidate"]({ target, packageRoot, options });
|
|
288
|
+
renderJsonOr(options, result, (await import("./commands/gate-revalidate.js")).formatGateRevalidateResult);
|
|
289
|
+
return 0;
|
|
290
|
+
},
|
|
352
291
|
"protocol-info": async ({ packageVersion, options }) => {
|
|
353
292
|
const { result } = await COMMAND_EXECUTORS["protocol-info"]({ packageVersion, options });
|
|
354
|
-
renderJsonOr(options, result, formatProtocolInfoResult);
|
|
293
|
+
renderJsonOr(options, result, (await import("./commands/protocol-info.js")).formatProtocolInfoResult);
|
|
294
|
+
return 0;
|
|
295
|
+
},
|
|
296
|
+
"decision-status": async ({ target, packageRoot, options }) => {
|
|
297
|
+
const { result } = await COMMAND_EXECUTORS["decision-status"]({ target, packageRoot, options });
|
|
298
|
+
renderJsonOr(options, result, (await import("./commands/decision-status.js")).formatDecisionStatusResult);
|
|
299
|
+
return 0;
|
|
300
|
+
},
|
|
301
|
+
"decision-show": async ({ target, packageRoot, options }) => {
|
|
302
|
+
const { result } = await COMMAND_EXECUTORS["decision-show"]({ target, packageRoot, options });
|
|
303
|
+
renderJsonOr(options, result, (await import("./commands/decision-show.js")).formatDecisionShowResult);
|
|
304
|
+
return 0;
|
|
305
|
+
},
|
|
306
|
+
"context-plan": async ({ options }) => {
|
|
307
|
+
const { result } = await COMMAND_EXECUTORS["context-plan"]({ options });
|
|
308
|
+
renderJsonOr(options, result, (await import("./commands/context-plan.js")).formatContextPlanResult);
|
|
309
|
+
return 0;
|
|
310
|
+
},
|
|
311
|
+
"model-route": async ({ options }) => {
|
|
312
|
+
const { result } = await COMMAND_EXECUTORS["model-route"]({ options });
|
|
313
|
+
renderJsonOr(options, result, (await import("./commands/model-route.js")).formatModelRouteResult);
|
|
314
|
+
return 0;
|
|
315
|
+
},
|
|
316
|
+
"semantic-plan": async ({ options }) => {
|
|
317
|
+
const { result } = await COMMAND_EXECUTORS["semantic-plan"]({ options });
|
|
318
|
+
renderJsonOr(options, result, (await import("./commands/semantic-plan.js")).formatSemanticPlanResult);
|
|
319
|
+
return 0;
|
|
320
|
+
},
|
|
321
|
+
"test-inventory": async ({ target, options }) => {
|
|
322
|
+
const { result } = await COMMAND_EXECUTORS["test-inventory"]({ target, options });
|
|
323
|
+
renderJsonOr(options, result, (await import("./commands/test-inventory.js")).formatTestInventoryResult);
|
|
324
|
+
return 0;
|
|
325
|
+
},
|
|
326
|
+
"test-utility": async ({ target, packageRoot, options }) => {
|
|
327
|
+
const { result } = await COMMAND_EXECUTORS["test-utility"]({ target, packageRoot, options });
|
|
328
|
+
renderJsonOr(options, result, (await import("./commands/test-utility.js")).formatTestUtilityResult);
|
|
329
|
+
return 0;
|
|
330
|
+
},
|
|
331
|
+
"test-prune-plan": async ({ target, packageRoot, options }) => {
|
|
332
|
+
const { result } = await COMMAND_EXECUTORS["test-prune-plan"]({ target, packageRoot, options });
|
|
333
|
+
renderJsonOr(options, result, (await import("./commands/test-prune-plan.js")).formatTestPrunePlanResult);
|
|
334
|
+
return 0;
|
|
335
|
+
},
|
|
336
|
+
"test-prune-probe": async ({ target, packageRoot, options }) => {
|
|
337
|
+
const { result } = await COMMAND_EXECUTORS["test-prune-probe"]({ target, packageRoot, options });
|
|
338
|
+
renderJsonOr(options, result, (await import("./commands/test-prune-probe.js")).formatTestPruneProbeResult);
|
|
355
339
|
return 0;
|
|
356
340
|
},
|
|
357
341
|
init: async ({ target, packageRoot, packageVersion, options }) => {
|
|
@@ -359,6 +343,46 @@ export const COMMAND_HANDLERS = Object.freeze({
|
|
|
359
343
|
printActions(result.actions);
|
|
360
344
|
return 0;
|
|
361
345
|
},
|
|
346
|
+
"storage-migration-resume": async ({ target, packageRoot, options }) => {
|
|
347
|
+
const { result, exitCode } = await COMMAND_EXECUTORS["storage-migration-resume"]({ target, packageRoot, options });
|
|
348
|
+
renderJsonOr(options, result, value => `storage recovery: ${value.phase}\ncurrent state verified: ${value.currentStateVerified}`);
|
|
349
|
+
return exitCode;
|
|
350
|
+
},
|
|
351
|
+
"storage-rollback-resume": async ({ target, packageRoot, options }) => {
|
|
352
|
+
const { result, exitCode } = await COMMAND_EXECUTORS["storage-rollback-resume"]({ target, packageRoot, options });
|
|
353
|
+
renderJsonOr(options, result, value => `source restored: ${value.restored}\ntarget version validated: ${value.targetVersionValidated}`);
|
|
354
|
+
return exitCode;
|
|
355
|
+
},
|
|
356
|
+
"storage-rollback": async ({ target, packageRoot, options }) => {
|
|
357
|
+
const { result, exitCode } = await COMMAND_EXECUTORS["storage-rollback"]({ target, packageRoot, options });
|
|
358
|
+
renderJsonOr(options, result, value => `source restored: ${value.restored}\ntarget version validated: ${value.targetVersionValidated}`);
|
|
359
|
+
return exitCode;
|
|
360
|
+
},
|
|
361
|
+
"storage-migrate": async ({ target, packageRoot, options }) => {
|
|
362
|
+
const { result, exitCode } = await COMMAND_EXECUTORS["storage-migrate"]({ target, packageRoot, options });
|
|
363
|
+
renderJsonOr(options, result, value => `storage migration: ${value.phase}\ncurrent state verified: ${value.currentStateVerified}`);
|
|
364
|
+
return exitCode;
|
|
365
|
+
},
|
|
366
|
+
"storage-backup": async ({ target, options }) => {
|
|
367
|
+
const { result, exitCode } = await COMMAND_EXECUTORS["storage-backup"]({ target, options });
|
|
368
|
+
renderJsonOr(options, result, value => `storage backup: ${value.path}\nattachments included: ${value.attachmentsIncluded}`);
|
|
369
|
+
return exitCode;
|
|
370
|
+
},
|
|
371
|
+
"storage-restore": async ({ target, packageRoot, options }) => {
|
|
372
|
+
const { result, exitCode } = await COMMAND_EXECUTORS["storage-restore"]({ target, packageRoot, options });
|
|
373
|
+
renderJsonOr(options, result, value => `storage restore: ${value.path}\nactive: ${value.active}\nretained snapshot: ${value.retainedSnapshot}`);
|
|
374
|
+
return exitCode;
|
|
375
|
+
},
|
|
376
|
+
"storage-restore-resume": async ({ target, packageRoot, options }) => {
|
|
377
|
+
const { result, exitCode } = await COMMAND_EXECUTORS["storage-restore-resume"]({ target, packageRoot, options });
|
|
378
|
+
renderJsonOr(options, result, value => `restore recovery: ${value.active ? "ACTIVE" : "incomplete"}\nrestored snapshot: ${value.restored}\ncurrent state verified: ${value.currentStateVerified ?? false}`);
|
|
379
|
+
return exitCode;
|
|
380
|
+
},
|
|
381
|
+
"storage-migration-status": async ({ target, options }) => {
|
|
382
|
+
const { result, exitCode } = await COMMAND_EXECUTORS["storage-migration-status"]({ target, options });
|
|
383
|
+
renderJsonOr(options, result, value => `storage layout: ${value.layout}\nmaintenance: ${value.maintenance.status}`);
|
|
384
|
+
return exitCode;
|
|
385
|
+
},
|
|
362
386
|
doctor: async ({ target, packageRoot, options }) => {
|
|
363
387
|
const { result } = await COMMAND_EXECUTORS.doctor({ target, packageRoot, options });
|
|
364
388
|
if (options.json) {
|
|
@@ -375,240 +399,240 @@ export const COMMAND_HANDLERS = Object.freeze({
|
|
|
375
399
|
},
|
|
376
400
|
"index-setup": async ({ target, packageRoot, options }) => {
|
|
377
401
|
const { result } = await COMMAND_EXECUTORS["index-setup"]({ target, packageRoot, options });
|
|
378
|
-
renderJsonOr(options, result, formatRepositoryIndexResult);
|
|
402
|
+
renderJsonOr(options, result, (await import("./commands/repository-index.js")).formatRepositoryIndexResult);
|
|
379
403
|
return 0;
|
|
380
404
|
},
|
|
381
405
|
"index-start": async ({ target, packageRoot, options }) => {
|
|
382
406
|
const { result } = await COMMAND_EXECUTORS["index-start"]({ target, packageRoot, options });
|
|
383
|
-
renderJsonOr(options, result, formatRepositoryIndexResult);
|
|
407
|
+
renderJsonOr(options, result, (await import("./commands/repository-index.js")).formatRepositoryIndexResult);
|
|
384
408
|
return 0;
|
|
385
409
|
},
|
|
386
410
|
"index-stop": async ({ target, packageRoot, options }) => {
|
|
387
411
|
const { result } = await COMMAND_EXECUTORS["index-stop"]({ target, packageRoot, options });
|
|
388
|
-
renderJsonOr(options, result, formatRepositoryIndexResult);
|
|
412
|
+
renderJsonOr(options, result, (await import("./commands/repository-index.js")).formatRepositoryIndexResult);
|
|
389
413
|
return 0;
|
|
390
414
|
},
|
|
391
415
|
"index-status": async ({ target, packageRoot, options }) => {
|
|
392
416
|
const { result } = await COMMAND_EXECUTORS["index-status"]({ target, packageRoot, options });
|
|
393
|
-
renderJsonOr(options, result, formatRepositoryIndexStatus);
|
|
417
|
+
renderJsonOr(options, result, (await import("./commands/repository-index.js")).formatRepositoryIndexStatus);
|
|
394
418
|
return 0;
|
|
395
419
|
},
|
|
396
420
|
"index-rebuild": async ({ target, packageRoot, options }) => {
|
|
397
421
|
const { result } = await COMMAND_EXECUTORS["index-rebuild"]({ target, packageRoot, options });
|
|
398
|
-
renderJsonOr(options, result, formatRepositoryIndexResult);
|
|
422
|
+
renderJsonOr(options, result, (await import("./commands/repository-index.js")).formatRepositoryIndexResult);
|
|
399
423
|
return 0;
|
|
400
424
|
},
|
|
401
425
|
search: async ({ target, packageRoot, options }) => {
|
|
402
426
|
const { result, exitCode } = await COMMAND_EXECUTORS.search({ target, packageRoot, options, transport: "cli" });
|
|
403
|
-
renderJsonOr(options, result, formatSearchResult);
|
|
427
|
+
renderJsonOr(options, result, (await import("./commands/repository-index.js")).formatSearchResult);
|
|
404
428
|
return exitCode;
|
|
405
429
|
},
|
|
406
430
|
route: async ({ target, packageRoot, options }) => {
|
|
407
431
|
const { result } = await COMMAND_EXECUTORS.route({ target, packageRoot, options });
|
|
408
|
-
renderJsonOr(options, result, formatRouteResult);
|
|
432
|
+
renderJsonOr(options, result, (await import("./commands/route.js")).formatRouteResult);
|
|
409
433
|
return 0;
|
|
410
434
|
},
|
|
411
435
|
activate: async ({ target, packageRoot, options }) => {
|
|
412
436
|
const { result } = await COMMAND_EXECUTORS.activate({ target, packageRoot, options });
|
|
413
|
-
renderJsonOr(options, result, formatActivateResult);
|
|
437
|
+
renderJsonOr(options, result, (await import("./commands/activate.js")).formatActivateResult);
|
|
414
438
|
return 0;
|
|
415
439
|
},
|
|
416
440
|
preflight: async ({ target, packageRoot, options }) => {
|
|
417
441
|
const { result, exitCode } = await COMMAND_EXECUTORS.preflight({ target, packageRoot, options });
|
|
418
|
-
renderJsonOr(options, result, formatPreflightResult);
|
|
442
|
+
renderJsonOr(options, result, (await import("./commands/preflight.js")).formatPreflightResult);
|
|
419
443
|
return exitCode;
|
|
420
444
|
},
|
|
421
445
|
"quality-baseline": async ({ target, packageRoot, options }) => {
|
|
422
446
|
const { result, exitCode } = await COMMAND_EXECUTORS["quality-baseline"]({ target, packageRoot, options });
|
|
423
|
-
renderJsonOr(options, result, formatQualityBaselineResult);
|
|
447
|
+
renderJsonOr(options, result, (await import("./commands/quality-baseline.js")).formatQualityBaselineResult);
|
|
424
448
|
return exitCode;
|
|
425
449
|
},
|
|
426
450
|
"quality-verify": async ({ target, packageRoot, options }) => {
|
|
427
451
|
const { result, exitCode } = await COMMAND_EXECUTORS["quality-verify"]({ target, packageRoot, options });
|
|
428
|
-
renderJsonOr(options, result, formatQualityVerifyResult);
|
|
452
|
+
renderJsonOr(options, result, (await import("./commands/quality-verify.js")).formatQualityVerifyResult);
|
|
429
453
|
return exitCode;
|
|
430
454
|
},
|
|
431
455
|
"quality-status": async ({ target, packageRoot, options }) => {
|
|
432
456
|
const { result, exitCode } = await COMMAND_EXECUTORS["quality-status"]({ target, packageRoot, options });
|
|
433
|
-
renderJsonOr(options, result, formatQualityStatusResult);
|
|
457
|
+
renderJsonOr(options, result, (await import("./commands/quality-status.js")).formatQualityStatusResult);
|
|
434
458
|
return exitCode;
|
|
435
459
|
},
|
|
436
460
|
advance: async ({ target, packageRoot, options }) => {
|
|
437
461
|
const { result } = await COMMAND_EXECUTORS.advance({ target, packageRoot, options });
|
|
438
|
-
renderJsonOr(options, result, formatAdvanceResult);
|
|
462
|
+
renderJsonOr(options, result, (await import("./commands/advance.js")).formatAdvanceResult);
|
|
439
463
|
return 0;
|
|
440
464
|
},
|
|
441
465
|
next: async ({ target, packageRoot, options }) => {
|
|
442
466
|
const { result } = await COMMAND_EXECUTORS.next({ target, packageRoot, options });
|
|
443
|
-
if (options.compact) console.log(formatCompactNextActionResult(result));
|
|
444
|
-
else renderJsonOr(options, result, formatNextActionResult);
|
|
467
|
+
if (options.compact) console.log((await import("./commands/next.js")).formatCompactNextActionResult(result));
|
|
468
|
+
else renderJsonOr(options, result, (await import("./commands/next.js")).formatNextActionResult);
|
|
445
469
|
return 0;
|
|
446
470
|
},
|
|
447
471
|
continuity: async ({ target, packageRoot, options }) => {
|
|
448
472
|
const { result } = await COMMAND_EXECUTORS.continuity({ target, packageRoot, options });
|
|
449
|
-
renderJsonOr(options, result, formatContinuityResult);
|
|
473
|
+
renderJsonOr(options, result, (await import("./commands/continuity.js")).formatContinuityResult);
|
|
450
474
|
return 0;
|
|
451
475
|
},
|
|
452
476
|
"record-continuity": async ({ target, packageRoot, options }) => {
|
|
453
477
|
const { result } = await COMMAND_EXECUTORS["record-continuity"]({ target, packageRoot, options });
|
|
454
|
-
renderJsonOr(options, result, formatRecordContinuityResult);
|
|
478
|
+
renderJsonOr(options, result, (await import("./commands/record-continuity.js")).formatRecordContinuityResult);
|
|
455
479
|
return 0;
|
|
456
480
|
},
|
|
457
481
|
"reconcile-continuity": async ({ target, packageRoot, options }) => {
|
|
458
482
|
const { result } = await COMMAND_EXECUTORS["reconcile-continuity"]({ target, packageRoot, options });
|
|
459
|
-
renderJsonOr(options, result, formatReconcileContinuityResult);
|
|
483
|
+
renderJsonOr(options, result, (await import("./commands/reconcile-continuity.js")).formatReconcileContinuityResult);
|
|
460
484
|
return 0;
|
|
461
485
|
},
|
|
462
486
|
"clear-continuity": async ({ target, options }) => {
|
|
463
487
|
const { result } = await COMMAND_EXECUTORS["clear-continuity"]({ target, options });
|
|
464
|
-
renderJsonOr(options, result, formatClearContinuityResult);
|
|
488
|
+
renderJsonOr(options, result, (await import("./commands/clear-continuity.js")).formatClearContinuityResult);
|
|
465
489
|
return 0;
|
|
466
490
|
},
|
|
467
491
|
"prepare-completion": async ({ target, packageRoot, options }) => {
|
|
468
492
|
const { result } = await COMMAND_EXECUTORS["prepare-completion"]({ target, packageRoot, options });
|
|
469
|
-
renderJsonOr(options, result, formatPrepareCompletionResult);
|
|
493
|
+
renderJsonOr(options, result, (await import("./commands/prepare-completion.js")).formatPrepareCompletionResult);
|
|
470
494
|
return 0;
|
|
471
495
|
},
|
|
472
496
|
"run-check": async ({ target, packageRoot, options }) => {
|
|
473
497
|
const { result, exitCode } = await COMMAND_EXECUTORS["run-check"]({ target, packageRoot, options });
|
|
474
|
-
renderJsonOr(options, result, formatRunCheckResult);
|
|
498
|
+
renderJsonOr(options, result, (await import("./commands/run-check.js")).formatRunCheckResult);
|
|
475
499
|
return exitCode;
|
|
476
500
|
},
|
|
477
501
|
"workspace-bind": async ({ target, packageRoot, options }) => {
|
|
478
502
|
const { result, exitCode } = await COMMAND_EXECUTORS["workspace-bind"]({ target, packageRoot, options });
|
|
479
|
-
renderJsonOr(options, result, formatWorkspaceBindResult);
|
|
503
|
+
renderJsonOr(options, result, (await import("./commands/workspace-bind.js")).formatWorkspaceBindResult);
|
|
480
504
|
return exitCode;
|
|
481
505
|
},
|
|
482
506
|
"workspace-status": async ({ target, packageRoot, options }) => {
|
|
483
507
|
const { result, exitCode } = await COMMAND_EXECUTORS["workspace-status"]({ target, packageRoot, options });
|
|
484
|
-
renderJsonOr(options, result, formatWorkspaceStatusResult);
|
|
508
|
+
renderJsonOr(options, result, (await import("./commands/workspace-status.js")).formatWorkspaceStatusResult);
|
|
485
509
|
return exitCode;
|
|
486
510
|
},
|
|
487
511
|
"handoff-create": async ({ target, packageRoot, options }) => {
|
|
488
512
|
const { result, exitCode } = await COMMAND_EXECUTORS["handoff-create"]({ target, packageRoot, options });
|
|
489
|
-
renderJsonOr(options, result, formatHandoffCreateResult);
|
|
513
|
+
renderJsonOr(options, result, (await import("./commands/handoff-create.js")).formatHandoffCreateResult);
|
|
490
514
|
return exitCode;
|
|
491
515
|
},
|
|
492
516
|
"handoff-list": async ({ target, packageRoot, options }) => {
|
|
493
517
|
const { result, exitCode } = await COMMAND_EXECUTORS["handoff-list"]({ target, packageRoot, options });
|
|
494
|
-
renderJsonOr(options, result, formatHandoffListResult);
|
|
518
|
+
renderJsonOr(options, result, (await import("./commands/handoff-list.js")).formatHandoffListResult);
|
|
495
519
|
return exitCode;
|
|
496
520
|
},
|
|
497
521
|
"handoff-show": async ({ target, packageRoot, options }) => {
|
|
498
522
|
const { result, exitCode } = await COMMAND_EXECUTORS["handoff-show"]({ target, packageRoot, options });
|
|
499
|
-
renderJsonOr(options, result, formatHandoffShowResult);
|
|
523
|
+
renderJsonOr(options, result, (await import("./commands/handoff-show.js")).formatHandoffShowResult);
|
|
500
524
|
return exitCode;
|
|
501
525
|
},
|
|
502
526
|
"handoff-accept": async ({ target, packageRoot, options }) => {
|
|
503
527
|
const { result, exitCode } = await COMMAND_EXECUTORS["handoff-accept"]({ target, packageRoot, options });
|
|
504
|
-
renderJsonOr(options, result, formatHandoffAcceptResult);
|
|
528
|
+
renderJsonOr(options, result, (await import("./commands/handoff-accept.js")).formatHandoffAcceptResult);
|
|
505
529
|
return exitCode;
|
|
506
530
|
},
|
|
507
531
|
"responsibility-set": async ({ target, packageRoot, options }) => {
|
|
508
532
|
const { result, exitCode } = await COMMAND_EXECUTORS["responsibility-set"]({ target, packageRoot, options });
|
|
509
|
-
renderJsonOr(options, result, formatResponsibilitySetResult);
|
|
533
|
+
renderJsonOr(options, result, (await import("./commands/responsibility-set.js")).formatResponsibilitySetResult);
|
|
510
534
|
return exitCode;
|
|
511
535
|
},
|
|
512
536
|
"responsibility-status": async ({ target, packageRoot, options }) => {
|
|
513
537
|
const { result, exitCode } = await COMMAND_EXECUTORS["responsibility-status"]({ target, packageRoot, options });
|
|
514
|
-
renderJsonOr(options, result, formatResponsibilityStatusResult);
|
|
538
|
+
renderJsonOr(options, result, (await import("./commands/responsibility-status.js")).formatResponsibilityStatusResult);
|
|
515
539
|
return exitCode;
|
|
516
540
|
},
|
|
517
541
|
"verify-scope": async ({ target, packageRoot, options }) => {
|
|
518
542
|
const { result, exitCode } = await COMMAND_EXECUTORS["verify-scope"]({ target, packageRoot, options });
|
|
519
|
-
renderJsonOr(options, result, formatVerifyScopeResult);
|
|
543
|
+
renderJsonOr(options, result, (await import("./commands/verify-scope.js")).formatVerifyScopeResult);
|
|
520
544
|
return exitCode;
|
|
521
545
|
},
|
|
522
546
|
"attestation-create": async ({ target, packageRoot, options }) => {
|
|
523
547
|
const { result, exitCode } = await COMMAND_EXECUTORS["attestation-create"]({ target, packageRoot, options });
|
|
524
|
-
renderJsonOr(options, result, formatAttestationCreateResult);
|
|
548
|
+
renderJsonOr(options, result, (await import("./commands/attestation-create.js")).formatAttestationCreateResult);
|
|
525
549
|
return exitCode;
|
|
526
550
|
},
|
|
527
551
|
"attestation-verify": async ({ target, packageRoot, options }) => {
|
|
528
552
|
const { result, exitCode } = await COMMAND_EXECUTORS["attestation-verify"]({ target, packageRoot, options });
|
|
529
|
-
renderJsonOr(options, result, formatAttestationVerifyResult);
|
|
553
|
+
renderJsonOr(options, result, (await import("./commands/attestation-verify.js")).formatAttestationVerifyResult);
|
|
530
554
|
return exitCode;
|
|
531
555
|
},
|
|
532
556
|
"attestation-status": async ({ target, packageRoot, options }) => {
|
|
533
557
|
const { result, exitCode } = await COMMAND_EXECUTORS["attestation-status"]({ target, packageRoot, options });
|
|
534
|
-
renderJsonOr(options, result, formatAttestationStatusResult);
|
|
558
|
+
renderJsonOr(options, result, (await import("./commands/attestation-status.js")).formatAttestationStatusResult);
|
|
535
559
|
return exitCode;
|
|
536
560
|
},
|
|
537
561
|
"attestation-verify-range": async ({ target, packageRoot, options }) => {
|
|
538
562
|
const { result, exitCode } = await COMMAND_EXECUTORS["attestation-verify-range"]({ target, packageRoot, options });
|
|
539
|
-
renderJsonOr(options, result, formatAttestationVerifyRangeResult);
|
|
563
|
+
renderJsonOr(options, result, (await import("./commands/attestation-verify-range.js")).formatAttestationVerifyRangeResult);
|
|
540
564
|
return exitCode;
|
|
541
565
|
},
|
|
542
566
|
"run-action": async ({ target, packageRoot, options }) => {
|
|
543
567
|
const { result, exitCode } = await COMMAND_EXECUTORS["run-action"]({ target, packageRoot, options });
|
|
544
|
-
renderJsonOr(options, result, formatRunActionResult);
|
|
568
|
+
renderJsonOr(options, result, (await import("./commands/run-action.js")).formatRunActionResult);
|
|
545
569
|
return exitCode;
|
|
546
570
|
},
|
|
547
571
|
"action-propose": async ({ target, packageRoot, options }) => {
|
|
548
572
|
const { result } = await COMMAND_EXECUTORS["action-propose"]({ target, packageRoot, options });
|
|
549
|
-
renderJsonOr(options, result, formatActionProposeResult); return 0;
|
|
573
|
+
renderJsonOr(options, result, (await import("./commands/action-propose.js")).formatActionProposeResult); return 0;
|
|
550
574
|
},
|
|
551
575
|
"action-authorize": async ({ target, packageRoot, options }) => {
|
|
552
576
|
const { result } = await COMMAND_EXECUTORS["action-authorize"]({ target, packageRoot, options });
|
|
553
|
-
renderJsonOr(options, result, formatActionAuthorizeResult); return 0;
|
|
577
|
+
renderJsonOr(options, result, (await import("./commands/action-authorize.js")).formatActionAuthorizeResult); return 0;
|
|
554
578
|
},
|
|
555
579
|
"action-record": async ({ target, packageRoot, options }) => {
|
|
556
580
|
const { result } = await COMMAND_EXECUTORS["action-record"]({ target, packageRoot, options });
|
|
557
|
-
renderJsonOr(options, result, formatActionRecordResult); return 0;
|
|
581
|
+
renderJsonOr(options, result, (await import("./commands/action-record.js")).formatActionRecordResult); return 0;
|
|
558
582
|
},
|
|
559
583
|
"action-verify": async ({ target, packageRoot, options }) => {
|
|
560
584
|
const { result } = await COMMAND_EXECUTORS["action-verify"]({ target, packageRoot, options });
|
|
561
|
-
renderJsonOr(options, result, formatActionVerifyResult); return 0;
|
|
585
|
+
renderJsonOr(options, result, (await import("./commands/action-verify.js")).formatActionVerifyResult); return 0;
|
|
562
586
|
},
|
|
563
587
|
"action-show": async ({ target, packageRoot, options }) => {
|
|
564
588
|
const { result } = await COMMAND_EXECUTORS["action-show"]({ target, packageRoot, options });
|
|
565
|
-
renderJsonOr(options, result, formatActionShowResult); return 0;
|
|
589
|
+
renderJsonOr(options, result, (await import("./commands/action-show.js")).formatActionShowResult); return 0;
|
|
566
590
|
},
|
|
567
591
|
"action-reconcile": async ({ target, packageRoot, options }) => {
|
|
568
592
|
const { result } = await COMMAND_EXECUTORS["action-reconcile"]({ target, packageRoot, options });
|
|
569
|
-
renderJsonOr(options, result, formatActionReconcileResult); return 0;
|
|
593
|
+
renderJsonOr(options, result, (await import("./commands/action-reconcile.js")).formatActionReconcileResult); return 0;
|
|
570
594
|
},
|
|
571
595
|
metrics: async ({ target, packageRoot, options }) => {
|
|
572
596
|
const { result } = await COMMAND_EXECUTORS.metrics({ target, packageRoot, options });
|
|
573
|
-
renderJsonOr(options, result, formatMetricsResult); return 0;
|
|
597
|
+
renderJsonOr(options, result, (await import("./commands/metrics.js")).formatMetricsResult); return 0;
|
|
574
598
|
},
|
|
575
599
|
"usage-record": async ({ target, packageRoot, options }) => {
|
|
576
600
|
const { result } = await COMMAND_EXECUTORS["usage-record"]({ target, packageRoot, options });
|
|
577
|
-
renderJsonOr(options, result, formatUsageRecordResult); return 0;
|
|
601
|
+
renderJsonOr(options, result, (await import("./commands/usage-record.js")).formatUsageRecordResult); return 0;
|
|
578
602
|
},
|
|
579
603
|
efficiency: async ({ target, packageRoot, options }) => {
|
|
580
604
|
const { result } = await COMMAND_EXECUTORS.efficiency({ target, packageRoot, options });
|
|
581
|
-
renderJsonOr(options, result, formatEfficiencyResult); return 0;
|
|
605
|
+
renderJsonOr(options, result, (await import("./commands/efficiency.js")).formatEfficiencyResult); return 0;
|
|
582
606
|
},
|
|
583
607
|
eval: async ({ target, packageRoot, options }) => {
|
|
584
608
|
const { result, exitCode } = await COMMAND_EXECUTORS.eval({ target, packageRoot, options });
|
|
585
|
-
renderJsonOr(options, result, formatEvalResult); return exitCode;
|
|
609
|
+
renderJsonOr(options, result, (await import("./commands/eval.js")).formatEvalResult); return exitCode;
|
|
586
610
|
},
|
|
587
|
-
"approval-request": async ({ target, packageRoot, options }) => { const { result } = await COMMAND_EXECUTORS["approval-request"]({ target, packageRoot, options }); renderJsonOr(options, result, formatApprovalRequestResult); return 0; },
|
|
588
|
-
"approval-resolve": async ({ target, packageRoot, options }) => { const { result } = await COMMAND_EXECUTORS["approval-resolve"]({ target, packageRoot, options }); renderJsonOr(options, result, formatApprovalResolveResult); return 0; },
|
|
611
|
+
"approval-request": async ({ target, packageRoot, options }) => { const { result } = await COMMAND_EXECUTORS["approval-request"]({ target, packageRoot, options }); renderJsonOr(options, result, (await import("./commands/approval-request.js")).formatApprovalRequestResult); return 0; },
|
|
612
|
+
"approval-resolve": async ({ target, packageRoot, options }) => { const { result } = await COMMAND_EXECUTORS["approval-resolve"]({ target, packageRoot, options }); renderJsonOr(options, result, (await import("./commands/approval-resolve.js")).formatApprovalResolveResult); return 0; },
|
|
589
613
|
"record-check": async ({ target, packageRoot, options }) => {
|
|
590
614
|
const { result } = await COMMAND_EXECUTORS["record-check"]({ target, packageRoot, options });
|
|
591
|
-
renderJsonOr(options, result, formatRecordCheckResult);
|
|
615
|
+
renderJsonOr(options, result, (await import("./commands/record-check.js")).formatRecordCheckResult);
|
|
592
616
|
return 0;
|
|
593
617
|
},
|
|
594
618
|
"record-terminal-result": async ({ target, packageRoot, options }) => {
|
|
595
619
|
const { result } = await COMMAND_EXECUTORS["record-terminal-result"]({ target, packageRoot, options });
|
|
596
|
-
renderJsonOr(options, result, formatRecordTerminalResult);
|
|
620
|
+
renderJsonOr(options, result, (await import("./commands/record-terminal-result.js")).formatRecordTerminalResult);
|
|
597
621
|
return 0;
|
|
598
622
|
},
|
|
599
623
|
"record-diagnosis": async ({ target, packageRoot, options }) => {
|
|
600
624
|
const { result } = await COMMAND_EXECUTORS["record-diagnosis"]({ target, packageRoot, options });
|
|
601
|
-
renderJsonOr(options, result, formatRecordDiagnosisResult);
|
|
625
|
+
renderJsonOr(options, result, (await import("./commands/record-diagnosis.js")).formatRecordDiagnosisResult);
|
|
602
626
|
return 0;
|
|
603
627
|
},
|
|
604
628
|
"record-intervention": async ({ target, packageRoot, options }) => {
|
|
605
629
|
const { result } = await COMMAND_EXECUTORS["record-intervention"]({ target, packageRoot, options });
|
|
606
|
-
renderJsonOr(options, result, formatRecordInterventionResult);
|
|
630
|
+
renderJsonOr(options, result, (await import("./commands/record-intervention.js")).formatRecordInterventionResult);
|
|
607
631
|
return 0;
|
|
608
632
|
},
|
|
609
633
|
"record-hypothesis-disposition": async ({ target, packageRoot, options }) => {
|
|
610
634
|
const { result } = await COMMAND_EXECUTORS["record-hypothesis-disposition"]({ target, packageRoot, options });
|
|
611
|
-
renderJsonOr(options, result, formatRecordHypothesisDispositionResult);
|
|
635
|
+
renderJsonOr(options, result, (await import("./commands/record-hypothesis-disposition.js")).formatRecordHypothesisDispositionResult);
|
|
612
636
|
return 0;
|
|
613
637
|
},
|
|
614
638
|
history: async ({ target, packageRoot, options }) => {
|
|
@@ -620,94 +644,94 @@ export const COMMAND_HANDLERS = Object.freeze({
|
|
|
620
644
|
console.log(`${event.timestamp ?? "--:--:--"} ${event.type}`);
|
|
621
645
|
}
|
|
622
646
|
} else if (options.verbose) {
|
|
623
|
-
console.log(formatHistoryResult(result));
|
|
647
|
+
console.log((await import("./commands/history.js")).formatHistoryResult(result));
|
|
624
648
|
for (const event of result.events) {
|
|
625
649
|
console.log(`--- ${event.sequence} ${event.type} ---`);
|
|
626
650
|
console.log(JSON.stringify(event.data, null, 2));
|
|
627
651
|
}
|
|
628
652
|
} else {
|
|
629
|
-
console.log(formatHistoryResult(result));
|
|
653
|
+
console.log((await import("./commands/history.js")).formatHistoryResult(result));
|
|
630
654
|
}
|
|
631
655
|
return exitCode;
|
|
632
656
|
},
|
|
633
657
|
trace: async ({ target, packageRoot, options }) => {
|
|
634
658
|
const { result, exitCode } = await COMMAND_EXECUTORS.trace({ target, packageRoot, options });
|
|
635
|
-
renderJsonOr(options, result, formatTraceResult);
|
|
659
|
+
renderJsonOr(options, result, (await import("./commands/trace.js")).formatTraceResult);
|
|
636
660
|
return exitCode;
|
|
637
661
|
},
|
|
638
662
|
reflect: async ({ target, packageRoot, options }) => {
|
|
639
663
|
const { result, exitCode } = await COMMAND_EXECUTORS.reflect({ target, packageRoot, options });
|
|
640
|
-
renderJsonOr(options, result, formatReflectResult);
|
|
664
|
+
renderJsonOr(options, result, (await import("./commands/reflect.js")).formatReflectResult);
|
|
641
665
|
return exitCode;
|
|
642
666
|
},
|
|
643
667
|
progress: async ({ target, packageRoot, options }) => {
|
|
644
668
|
const { result, exitCode } = await COMMAND_EXECUTORS.progress({ target, packageRoot, options });
|
|
645
|
-
renderJsonOr(options, result, formatProgressResult);
|
|
669
|
+
renderJsonOr(options, result, (await import("./commands/progress.js")).formatProgressResult);
|
|
646
670
|
return exitCode;
|
|
647
671
|
},
|
|
648
672
|
"record-decision-criterion": async ({ target, packageRoot, options }) => {
|
|
649
673
|
const { result } = await COMMAND_EXECUTORS["record-decision-criterion"]({ target, packageRoot, options });
|
|
650
|
-
renderJsonOr(options, result, formatRecordDecisionCriterionResult);
|
|
674
|
+
renderJsonOr(options, result, (await import("./commands/record-decision-criterion.js")).formatRecordDecisionCriterionResult);
|
|
651
675
|
return 0;
|
|
652
676
|
},
|
|
653
677
|
complete: async ({ target, packageRoot, options }) => {
|
|
654
678
|
const { result, exitCode } = await COMMAND_EXECUTORS.complete({ target, packageRoot, options });
|
|
655
|
-
renderJsonOr(options, result, formatCompleteResult);
|
|
679
|
+
renderJsonOr(options, result, (await import("./commands/complete.js")).formatCompleteResult);
|
|
656
680
|
return exitCode;
|
|
657
681
|
},
|
|
658
682
|
audit: async ({ target, packageRoot, options }) => {
|
|
659
683
|
const { result, exitCode } = await COMMAND_EXECUTORS.audit({ target, packageRoot, options });
|
|
660
|
-
renderJsonOr(options, result, formatAuditResult);
|
|
684
|
+
renderJsonOr(options, result, (await import("./commands/audit.js")).formatAuditResult);
|
|
661
685
|
return exitCode;
|
|
662
686
|
},
|
|
663
687
|
report: async ({ target, packageRoot, options }) => {
|
|
664
688
|
const { result, exitCode } = await COMMAND_EXECUTORS.report({ target, packageRoot, options });
|
|
665
|
-
renderJsonOr(options, result, formatReportResult);
|
|
689
|
+
renderJsonOr(options, result, (await import("./commands/report.js")).formatReportResult);
|
|
666
690
|
return exitCode;
|
|
667
691
|
},
|
|
668
692
|
policy: async ({ target, packageRoot, options }) => {
|
|
669
693
|
const { result } = await COMMAND_EXECUTORS.policy({ target, packageRoot, options });
|
|
670
|
-
renderJsonOr(options, result, formatPolicyResult);
|
|
694
|
+
renderJsonOr(options, result, (await import("./commands/policy.js")).formatPolicyResult);
|
|
671
695
|
return 0;
|
|
672
696
|
},
|
|
673
697
|
"policy-discover": async ({ target, packageRoot, options }) => {
|
|
674
698
|
const { result } = await COMMAND_EXECUTORS["policy-discover"]({ target, packageRoot, options });
|
|
675
|
-
renderJsonOr(options, result, formatPolicyDiscoverResult);
|
|
699
|
+
renderJsonOr(options, result, (await import("./commands/policy-discover.js")).formatPolicyDiscoverResult);
|
|
676
700
|
return 0;
|
|
677
701
|
},
|
|
678
702
|
"policy-status": async ({ target, packageRoot, options }) => {
|
|
679
703
|
const { result, exitCode } = await COMMAND_EXECUTORS["policy-status"]({ target, packageRoot, options });
|
|
680
|
-
renderJsonOr(options, result, formatPolicyStatusResult);
|
|
704
|
+
renderJsonOr(options, result, (await import("./commands/policy-status.js")).formatPolicyStatusResult);
|
|
681
705
|
return exitCode;
|
|
682
706
|
},
|
|
683
707
|
"policy-diff": async ({ target, packageRoot, options }) => {
|
|
684
708
|
const { result } = await COMMAND_EXECUTORS["policy-diff"]({ target, packageRoot, options });
|
|
685
|
-
renderJsonOr(options, result, formatPolicyDiffResult);
|
|
709
|
+
renderJsonOr(options, result, (await import("./commands/policy-diff.js")).formatPolicyDiffResult);
|
|
686
710
|
return 0;
|
|
687
711
|
},
|
|
688
712
|
"rule-verify": async ({ target, packageRoot, options }) => {
|
|
689
713
|
const { result, exitCode } = await COMMAND_EXECUTORS["rule-verify"]({ target, packageRoot, options });
|
|
690
|
-
renderJsonOr(options, result, formatRuleVerifyResult);
|
|
714
|
+
renderJsonOr(options, result, (await import("./commands/rule-verify.js")).formatRuleVerifyResult);
|
|
691
715
|
return exitCode;
|
|
692
716
|
},
|
|
693
717
|
baseline: async ({ target, packageRoot, options }) => {
|
|
694
718
|
const { result } = await COMMAND_EXECUTORS.baseline({ target, packageRoot, options });
|
|
695
|
-
renderJsonOr(options, result, formatBaselineResult);
|
|
719
|
+
renderJsonOr(options, result, (await import("./commands/baseline.js")).formatBaselineResult);
|
|
696
720
|
return 0;
|
|
697
721
|
},
|
|
698
722
|
"profile-interview": async ({ target, packageRoot, options }) => {
|
|
699
723
|
const { result } = await COMMAND_EXECUTORS["profile-interview"]({ target, packageRoot, options });
|
|
700
|
-
renderJsonOr(options, result, formatProfileInterviewResult);
|
|
724
|
+
renderJsonOr(options, result, (await import("./commands/profile-interview.js")).formatProfileInterviewResult);
|
|
701
725
|
return 0;
|
|
702
726
|
},
|
|
703
727
|
bundle: async ({ target, packageRoot, options }) => {
|
|
704
728
|
const { result } = await COMMAND_EXECUTORS.bundle({ target, packageRoot, options });
|
|
705
|
-
renderJsonOr(options, result, formatBundleResult);
|
|
729
|
+
renderJsonOr(options, result, (await import("./commands/bundle.js")).formatBundleResult);
|
|
706
730
|
return 0;
|
|
707
731
|
},
|
|
708
732
|
inspect: async ({ target, packageRoot, options }) => {
|
|
709
733
|
const { result, exitCode } = await COMMAND_EXECUTORS.inspect({ target, packageRoot, options });
|
|
710
|
-
renderJsonOr(options, result, formatInspectResult);
|
|
734
|
+
renderJsonOr(options, result, (await import("./commands/inspect.js")).formatInspectResult);
|
|
711
735
|
return exitCode;
|
|
712
736
|
},
|
|
713
737
|
"validate-receipt": async ({ target, packageRoot, options }) => {
|
|
@@ -717,63 +741,63 @@ export const COMMAND_HANDLERS = Object.freeze({
|
|
|
717
741
|
},
|
|
718
742
|
"validate-protocol": async ({ target, packageRoot, options }) => {
|
|
719
743
|
const { result, exitCode } = await COMMAND_EXECUTORS["validate-protocol"]({ target, packageRoot, options });
|
|
720
|
-
renderJsonOr(options, result, formatValidateProtocolResult);
|
|
744
|
+
renderJsonOr(options, result, (await import("./commands/validate-protocol.js")).formatValidateProtocolResult);
|
|
721
745
|
return exitCode;
|
|
722
746
|
},
|
|
723
747
|
status: async ({ target, packageRoot, options }) => {
|
|
724
748
|
const { result } = await COMMAND_EXECUTORS.status({ target, packageRoot, options });
|
|
725
|
-
renderJsonOr(options, result, formatStatusResult);
|
|
749
|
+
renderJsonOr(options, result, (await import("./commands/status.js")).formatStatusResult);
|
|
726
750
|
return 0;
|
|
727
751
|
},
|
|
728
752
|
"validate-state": async ({ target, packageRoot, options }) => {
|
|
729
753
|
const { result, exitCode } = await COMMAND_EXECUTORS["validate-state"]({ target, packageRoot, options });
|
|
730
|
-
renderJsonOr(options, result, formatValidateStateResult);
|
|
754
|
+
renderJsonOr(options, result, (await import("./commands/validate-state.js")).formatValidateStateResult);
|
|
731
755
|
return exitCode;
|
|
732
756
|
},
|
|
733
757
|
"clear-state": async ({ target, options }) => {
|
|
734
758
|
const { result } = await COMMAND_EXECUTORS["clear-state"]({ target, options });
|
|
735
|
-
renderJsonOr(options, result, formatClearStateResult);
|
|
759
|
+
renderJsonOr(options, result, (await import("./commands/clear-state.js")).formatClearStateResult);
|
|
736
760
|
return 0;
|
|
737
761
|
},
|
|
738
762
|
"task-create": async ({ target, packageRoot, options }) => {
|
|
739
763
|
const { result } = await COMMAND_EXECUTORS["task-create"]({ target, packageRoot, options });
|
|
740
|
-
renderJsonOr(options, result, formatTaskCreateResult);
|
|
764
|
+
renderJsonOr(options, result, (await import("./commands/task-create.js")).formatTaskCreateResult);
|
|
741
765
|
return 0;
|
|
742
766
|
},
|
|
743
767
|
"task-list": async ({ target, packageRoot, options }) => {
|
|
744
768
|
const { result } = await COMMAND_EXECUTORS["task-list"]({ target, packageRoot, options });
|
|
745
|
-
renderJsonOr(options, result, formatTaskListResult);
|
|
769
|
+
renderJsonOr(options, result, (await import("./commands/task-list.js")).formatTaskListResult);
|
|
746
770
|
return 0;
|
|
747
771
|
},
|
|
748
772
|
"task-show": async ({ target, packageRoot, options }) => {
|
|
749
773
|
const { result } = await COMMAND_EXECUTORS["task-show"]({ target, packageRoot, options });
|
|
750
|
-
if (options.compact) console.log(formatCompactTaskShowResult(result));
|
|
751
|
-
else renderJsonOr(options, result, formatTaskShowResult);
|
|
774
|
+
if (options.compact) console.log((await import("./commands/task-show.js")).formatCompactTaskShowResult(result));
|
|
775
|
+
else renderJsonOr(options, result, (await import("./commands/task-show.js")).formatTaskShowResult);
|
|
752
776
|
return 0;
|
|
753
777
|
},
|
|
754
778
|
"task-lock-status": async ({ target, packageRoot, options }) => {
|
|
755
779
|
const { result } = await COMMAND_EXECUTORS["task-lock-status"]({ target, packageRoot, options });
|
|
756
|
-
renderJsonOr(options, result, formatTaskLockStatusResult);
|
|
780
|
+
renderJsonOr(options, result, (await import("./commands/task-lock-status.js")).formatTaskLockStatusResult);
|
|
757
781
|
return 0;
|
|
758
782
|
},
|
|
759
783
|
"task-scope": async ({ target, packageRoot, options }) => {
|
|
760
784
|
const { result } = await COMMAND_EXECUTORS["task-scope"]({ target, packageRoot, options });
|
|
761
|
-
renderJsonOr(options, result, formatTaskScopeResult);
|
|
785
|
+
renderJsonOr(options, result, (await import("./commands/task-scope.js")).formatTaskScopeResult);
|
|
762
786
|
return 0;
|
|
763
787
|
},
|
|
764
788
|
"task-migrate": async ({ target, packageRoot, options }) => {
|
|
765
789
|
const { result } = await COMMAND_EXECUTORS["task-migrate"]({ target, packageRoot, options });
|
|
766
|
-
renderJsonOr(options, result, formatTaskMigrateResult);
|
|
790
|
+
renderJsonOr(options, result, (await import("./commands/task-migrate.js")).formatTaskMigrateResult);
|
|
767
791
|
return 0;
|
|
768
792
|
},
|
|
769
793
|
"migrate-protocol": async ({ target, packageRoot, options }) => {
|
|
770
794
|
const { result } = await COMMAND_EXECUTORS["migrate-protocol"]({ target, packageRoot, options });
|
|
771
|
-
renderJsonOr(options, result, formatMigrateProtocolResult);
|
|
795
|
+
renderJsonOr(options, result, (await import("./commands/migrate-protocol.js")).formatMigrateProtocolResult);
|
|
772
796
|
return 0;
|
|
773
797
|
},
|
|
774
798
|
"task-unlock": async ({ target, packageRoot, options }) => {
|
|
775
799
|
const { result } = await COMMAND_EXECUTORS["task-unlock"]({ target, packageRoot, options });
|
|
776
|
-
renderJsonOr(options, result, formatTaskUnlockResult);
|
|
800
|
+
renderJsonOr(options, result, (await import("./commands/task-unlock.js")).formatTaskUnlockResult);
|
|
777
801
|
return 0;
|
|
778
802
|
},
|
|
779
803
|
"task-recover": async ({ target, packageRoot, options }) => {
|
|
@@ -781,22 +805,42 @@ export const COMMAND_HANDLERS = Object.freeze({
|
|
|
781
805
|
console.error("DEPRECATION: --operator-authorized is caller acknowledgement, not host attestation; use --acknowledge-recovery.");
|
|
782
806
|
}
|
|
783
807
|
const { result } = await COMMAND_EXECUTORS["task-recover"]({ target, packageRoot, options });
|
|
784
|
-
renderJsonOr(options, result, formatTaskRecoverResult);
|
|
808
|
+
renderJsonOr(options, result, (await import("./commands/task-recover.js")).formatTaskRecoverResult);
|
|
809
|
+
return 0;
|
|
810
|
+
},
|
|
811
|
+
"task-abandon": async ({ target, packageRoot, options }) => {
|
|
812
|
+
const { result } = await COMMAND_EXECUTORS["task-abandon"]({ target, packageRoot, options });
|
|
813
|
+
renderJsonOr(options, result, (await import("./commands/task-abandon.js")).formatTaskAbandonResult);
|
|
785
814
|
return 0;
|
|
786
815
|
},
|
|
787
816
|
"task-resume": async ({ target, packageRoot, options }) => {
|
|
788
817
|
const { result } = await COMMAND_EXECUTORS["task-resume"]({ target, packageRoot, options });
|
|
789
|
-
renderJsonOr(options, result, formatTaskResumeResult);
|
|
818
|
+
renderJsonOr(options, result, (await import("./commands/task-resume.js")).formatTaskResumeResult);
|
|
819
|
+
return 0;
|
|
820
|
+
},
|
|
821
|
+
"task-repair-contract-bootstrap": async ({ target, packageRoot, options }) => {
|
|
822
|
+
const { result } = await COMMAND_EXECUTORS["task-repair-contract-bootstrap"]({ target, packageRoot, options });
|
|
823
|
+
renderJsonOr(options, result, (await import("./commands/task-repair-contract-bootstrap.js")).formatTaskRepairContractBootstrapResult);
|
|
824
|
+
return 0;
|
|
825
|
+
},
|
|
826
|
+
"task-migrate-contract-bootstrap-repair": async ({ target, packageRoot, options }) => {
|
|
827
|
+
const { result } = await COMMAND_EXECUTORS["task-migrate-contract-bootstrap-repair"]({ target, packageRoot, options });
|
|
828
|
+
renderJsonOr(options, result, (await import("./commands/task-migrate-contract-bootstrap-repair.js")).formatTaskMigrateContractBootstrapRepairResult);
|
|
829
|
+
return 0;
|
|
830
|
+
},
|
|
831
|
+
"checkpoint-revalidate": async ({ target, packageRoot, options }) => {
|
|
832
|
+
const { result } = await COMMAND_EXECUTORS["checkpoint-revalidate"]({ target, packageRoot, options });
|
|
833
|
+
renderJsonOr(options, result, (await import("./commands/checkpoint-revalidate.js")).formatCheckpointRevalidateResult);
|
|
790
834
|
return 0;
|
|
791
835
|
},
|
|
792
836
|
"task-repair-legacy-recovery": async ({ target, packageRoot, options }) => {
|
|
793
837
|
const { result } = await COMMAND_EXECUTORS["task-repair-legacy-recovery"]({ target, packageRoot, options });
|
|
794
|
-
renderJsonOr(options, result, formatTaskRepairLegacyRecoveryResult);
|
|
838
|
+
renderJsonOr(options, result, (await import("./commands/task-repair-legacy-recovery.js")).formatTaskRepairLegacyRecoveryResult);
|
|
795
839
|
return 0;
|
|
796
840
|
},
|
|
797
841
|
"reconcile-closure": async ({ target, packageRoot, options }) => {
|
|
798
842
|
const { result } = await COMMAND_EXECUTORS["reconcile-closure"]({ target, packageRoot, options });
|
|
799
|
-
renderJsonOr(options, result, formatReconcileClosureResult);
|
|
843
|
+
renderJsonOr(options, result, (await import("./commands/reconcile-closure.js")).formatReconcileClosureResult);
|
|
800
844
|
return 0;
|
|
801
845
|
},
|
|
802
846
|
update: async ({ target, packageRoot, packageVersion, options }) => {
|