agentera 3.0.0-dev.3 → 3.0.0-dev.31
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 +201 -0
- package/README.md +96 -6
- package/bundle/.agentera-npx-bundle.json +1 -1
- package/bundle/CHANGELOG.md +1144 -0
- package/bundle/DESIGN.md +229 -0
- package/bundle/LICENSE +201 -0
- package/bundle/README.md +136 -0
- package/bundle/UPGRADE.md +201 -0
- package/bundle/extract-corpus-parity.json +21 -0
- package/bundle/fixtures/routing/hybrid-corpus.yaml +154 -0
- package/bundle/references/adapters/package-manifest-interface-model.yaml +42 -252
- package/bundle/references/adapters/package-registry.yaml +20 -188
- package/bundle/references/adapters/package-surface-characterization.md +36 -37
- package/bundle/references/adapters/runtime-lifecycle-adapters.yaml +74 -0
- package/bundle/references/adapters/runtime-lifecycle-authority.yaml +62 -0
- package/bundle/references/adapters/runtime-lifecycle-operation-contract.yaml +84 -0
- package/bundle/references/adapters/runtime-retired-resources.yaml +97 -0
- package/bundle/references/analysis/benchmark.md +10 -6
- package/bundle/references/analysis/evidence-tier-authority.yaml +516 -0
- package/bundle/references/analysis/startup-measurement-contract.yaml +37 -26
- package/bundle/references/analysis/verification-policy.yaml +142 -0
- package/bundle/references/artifacts/artifact-registry-interface-model.yaml +9 -8
- package/bundle/references/artifacts/state-storage-authority.yaml +2167 -0
- package/bundle/references/artifacts/verbosity-budget-authority.yaml +42 -0
- package/bundle/references/cli/agent-ready-state-contract.yaml +64 -81
- package/bundle/references/cli/app-lifecycle-vocabulary.yaml +7 -8
- package/bundle/references/cli/audience-namespace-cli-migration.yaml +58 -29
- package/bundle/references/cli/bundle-skill-vocabulary.yaml +12 -49
- package/bundle/references/cli/capability-instruction-contract.yaml +96 -58
- package/bundle/references/cli/capability-instruction-structure.md +144 -0
- package/bundle/references/cli/capability-tool-classification.yaml +14 -14
- package/bundle/references/cli/coexistence-probe.yaml +13 -0
- package/bundle/references/cli/hybrid-route-contract.yaml +416 -0
- package/bundle/references/cli/parity-expected-actual-template.md +30 -0
- package/bundle/references/cli/prime-consumer-compatibility.yaml +651 -0
- package/bundle/references/cli/routing-execution-vocabulary.yaml +16 -38
- package/bundle/references/cli/routing-model.md +139 -0
- package/bundle/references/cli/single-name-protocol.yaml +42 -0
- package/bundle/references/cli/trigger-schema-enrichment.md +140 -0
- package/bundle/references/cli/update-channels.yaml +45 -7
- package/bundle/references/cli/upgrade-repair-wording.md +25 -0
- package/bundle/references/cli/v3-handoff-manifest.schema.yaml +97 -0
- package/bundle/references/cli/vocabulary-index.yaml +23 -18
- package/bundle/references/cli/vocabulary.md +346 -331
- package/bundle/references/meta/documentation-inventory.md +10 -3
- package/bundle/registry.json +14 -14
- package/bundle/skills/agentera/SKILL.md +182 -407
- package/bundle/skills/agentera/capabilities/audit/schemas/artifacts.yaml +84 -0
- package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/exit.yaml +2 -2
- package/bundle/skills/agentera/capabilities/audit/schemas/triggers.yaml +25 -0
- package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/validation.yaml +20 -19
- package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +85 -0
- package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/exit.yaml +3 -3
- package/bundle/skills/agentera/capabilities/build/schemas/triggers.yaml +27 -0
- package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/validation.yaml +16 -16
- package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/artifacts.yaml +12 -12
- package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/exit.yaml +5 -5
- package/bundle/skills/agentera/capabilities/design/schemas/triggers.yaml +16 -0
- package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/validation.yaml +7 -7
- package/bundle/skills/agentera/capabilities/discuss/schemas/artifacts.yaml +49 -0
- package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/exit.yaml +2 -2
- package/bundle/skills/agentera/capabilities/discuss/schemas/triggers.yaml +20 -0
- package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/validation.yaml +9 -8
- package/bundle/skills/agentera/capabilities/document/schemas/artifacts.yaml +80 -0
- package/bundle/skills/agentera/capabilities/document/schemas/triggers.yaml +16 -0
- package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/validation.yaml +18 -18
- package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/artifacts.yaml +17 -17
- package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/exit.yaml +2 -2
- package/bundle/skills/agentera/capabilities/optimize/schemas/triggers.yaml +16 -0
- package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/validation.yaml +9 -9
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml +76 -0
- package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/exit.yaml +9 -7
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/triggers.yaml +23 -0
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/validation.yaml +121 -0
- package/bundle/skills/agentera/capabilities/plan/schemas/artifacts.yaml +63 -0
- package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/exit.yaml +2 -2
- package/bundle/skills/agentera/capabilities/plan/schemas/triggers.yaml +23 -0
- package/bundle/skills/agentera/capabilities/plan/schemas/validation.yaml +89 -0
- package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/artifacts.yaml +4 -4
- package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/exit.yaml +3 -3
- package/bundle/skills/agentera/capabilities/profile/schemas/triggers.yaml +20 -0
- package/bundle/skills/agentera/capabilities/profile/schemas/validation.yaml +85 -0
- package/bundle/skills/agentera/capabilities/research/schemas/artifacts.yaml +24 -0
- package/bundle/skills/agentera/capabilities/research/schemas/triggers.yaml +16 -0
- package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/validation.yaml +2 -2
- package/bundle/skills/agentera/capabilities/status/schemas/artifacts.yaml +72 -0
- package/bundle/skills/agentera/capabilities/status/schemas/triggers.yaml +22 -0
- package/bundle/skills/agentera/capabilities/{hej → status}/schemas/validation.yaml +5 -5
- package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/artifacts.yaml +16 -16
- package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/exit.yaml +7 -6
- package/bundle/skills/agentera/capabilities/vision/schemas/triggers.yaml +23 -0
- package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/validation.yaml +18 -20
- package/bundle/skills/agentera/capability_schema_contract.yaml +200 -37
- package/bundle/skills/agentera/protocol.yaml +31 -31
- package/bundle/skills/agentera/references/contract.md +387 -329
- package/bundle/skills/agentera/route-phrases.yaml +81 -0
- package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +5 -4
- package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +40 -22
- package/bundle/skills/agentera/schemas/artifacts/design.yaml +5 -4
- package/bundle/skills/agentera/schemas/artifacts/docs.yaml +15 -19
- package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +145 -14
- package/bundle/skills/agentera/schemas/artifacts/health.yaml +58 -21
- package/bundle/skills/agentera/schemas/artifacts/objective.yaml +22 -8
- package/bundle/skills/agentera/schemas/artifacts/plan.yaml +327 -15
- package/bundle/skills/agentera/schemas/artifacts/progress.yaml +51 -53
- package/bundle/skills/agentera/schemas/artifacts/todo.yaml +257 -28
- package/bundle/skills/agentera/schemas/artifacts/vision.yaml +3 -3
- package/dist/analytics/extractCorpus/cli.js +191 -0
- package/dist/analytics/extractCorpus/cli.js.map +1 -0
- package/dist/analytics/extractCorpus/copilotSessions.js +276 -0
- package/dist/analytics/extractCorpus/copilotSessions.js.map +1 -0
- package/dist/analytics/extractCorpus/core.js +393 -0
- package/dist/analytics/extractCorpus/core.js.map +1 -0
- package/dist/analytics/extractCorpus/corpus.js +168 -0
- package/dist/analytics/extractCorpus/corpus.js.map +1 -0
- package/dist/analytics/extractCorpus/coverageAudit.js +261 -0
- package/dist/analytics/extractCorpus/coverageAudit.js.map +1 -0
- package/dist/analytics/extractCorpus/cursorSessions.js +426 -0
- package/dist/analytics/extractCorpus/cursorSessions.js.map +1 -0
- package/dist/analytics/extractCorpus/evidenceTiers.js +561 -0
- package/dist/analytics/extractCorpus/evidenceTiers.js.map +1 -0
- package/dist/analytics/extractCorpus/extractCorpusParity.js +106 -0
- package/dist/analytics/extractCorpus/extractCorpusParity.js.map +1 -0
- package/dist/analytics/extractCorpus/filesystemSources.js +119 -0
- package/dist/analytics/extractCorpus/filesystemSources.js.map +1 -0
- package/dist/analytics/extractCorpus/index.js +15 -0
- package/dist/analytics/extractCorpus/index.js.map +1 -0
- package/dist/analytics/extractCorpus/jsonlSessions.js +205 -0
- package/dist/analytics/extractCorpus/jsonlSessions.js.map +1 -0
- package/dist/analytics/extractCorpus/sqliteCaps.js +44 -0
- package/dist/analytics/extractCorpus/sqliteCaps.js.map +1 -0
- package/dist/analytics/extractCorpus/sqliteSessions.js +368 -0
- package/dist/analytics/extractCorpus/sqliteSessions.js.map +1 -0
- package/dist/analytics/extractCorpus/tierReader.js +109 -0
- package/dist/analytics/extractCorpus/tierReader.js.map +1 -0
- package/dist/analytics/extractCorpus.js +2 -1790
- package/dist/analytics/extractCorpus.js.map +1 -1
- package/dist/analytics/profileSignals.js +212 -0
- package/dist/analytics/profileSignals.js.map +1 -0
- package/dist/analytics/usageStats.js +191 -41
- package/dist/analytics/usageStats.js.map +1 -1
- package/dist/bin/agentera.js +3 -1
- package/dist/bin/agentera.js.map +1 -1
- package/dist/capabilities/audit/instructions.js +16 -0
- package/dist/capabilities/audit/instructions.js.map +1 -0
- package/dist/capabilities/build/instructions.js +18 -0
- package/dist/capabilities/build/instructions.js.map +1 -0
- package/dist/capabilities/design/instructions.js +5 -0
- package/dist/capabilities/design/instructions.js.map +1 -0
- package/dist/capabilities/discuss/instructions.js +16 -0
- package/dist/capabilities/discuss/instructions.js.map +1 -0
- package/dist/capabilities/document/instructions.js +12 -0
- package/dist/capabilities/document/instructions.js.map +1 -0
- package/dist/capabilities/index.js +39 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/optimize/instructions.js +14 -0
- package/dist/capabilities/optimize/instructions.js.map +1 -0
- package/dist/capabilities/orchestrate/instructions.js +41 -0
- package/dist/capabilities/orchestrate/instructions.js.map +1 -0
- package/dist/capabilities/plan/instructions.js +15 -0
- package/dist/capabilities/plan/instructions.js.map +1 -0
- package/dist/capabilities/profile/instructions.js +5 -0
- package/dist/capabilities/profile/instructions.js.map +1 -0
- package/dist/capabilities/research/instructions.js +6 -0
- package/dist/capabilities/research/instructions.js.map +1 -0
- package/dist/capabilities/status/instructions.js +5 -0
- package/dist/capabilities/status/instructions.js.map +1 -0
- package/dist/capabilities/status/startupInstructions.js +39 -0
- package/dist/capabilities/status/startupInstructions.js.map +1 -0
- package/dist/capabilities/vision/instructions.js +5 -0
- package/dist/capabilities/vision/instructions.js.map +1 -0
- package/dist/cli/appContext.js +30 -23
- package/dist/cli/appContext.js.map +1 -1
- package/dist/cli/argvalidate.js.map +1 -1
- package/dist/cli/capabilityContext/benchmark.js +564 -0
- package/dist/cli/capabilityContext/benchmark.js.map +1 -0
- package/dist/cli/capabilityContext/bespoke.js +44 -0
- package/dist/cli/capabilityContext/bespoke.js.map +1 -0
- package/dist/cli/capabilityContext/build.js +191 -0
- package/dist/cli/capabilityContext/build.js.map +1 -0
- package/dist/cli/capabilityContext/closeout.js +231 -0
- package/dist/cli/capabilityContext/closeout.js.map +1 -0
- package/dist/cli/capabilityContext/contract.js +214 -0
- package/dist/cli/capabilityContext/contract.js.map +1 -0
- package/dist/cli/capabilityContext/evidence.js +469 -0
- package/dist/cli/capabilityContext/evidence.js.map +1 -0
- package/dist/cli/capabilityContext/index.js +4 -0
- package/dist/cli/capabilityContext/index.js.map +1 -0
- package/dist/cli/capabilityContext/orchestration.js +128 -0
- package/dist/cli/capabilityContext/orchestration.js.map +1 -0
- package/dist/cli/capabilityContext/planState.js +280 -0
- package/dist/cli/capabilityContext/planState.js.map +1 -0
- package/dist/cli/capabilityContext/progress.js +143 -0
- package/dist/cli/capabilityContext/progress.js.map +1 -0
- package/dist/cli/capabilityContext/shared.js +100 -0
- package/dist/cli/capabilityContext/shared.js.map +1 -0
- package/dist/cli/capabilityContext/slim.js +153 -0
- package/dist/cli/capabilityContext/slim.js.map +1 -0
- package/dist/cli/capabilityContext/startup.js +257 -0
- package/dist/cli/capabilityContext/startup.js.map +1 -0
- package/dist/cli/capabilityContext/types.js +51 -0
- package/dist/cli/capabilityContext/types.js.map +1 -0
- package/dist/cli/capabilityContext.js +1 -2420
- package/dist/cli/capabilityContext.js.map +1 -1
- package/dist/cli/commands/appHome.js +23 -0
- package/dist/cli/commands/appHome.js.map +1 -0
- package/dist/cli/commands/capability.js +3 -10
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/compact.js +41 -12
- package/dist/cli/commands/compact.js.map +1 -1
- package/dist/cli/commands/doctor.js +59 -97
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/durability.js +82 -0
- package/dist/cli/commands/durability.js.map +1 -0
- package/dist/cli/commands/entityMigrate.js +132 -0
- package/dist/cli/commands/entityMigrate.js.map +1 -0
- package/dist/cli/commands/lint.js +26 -43
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/prime/briefOrientation.js +592 -0
- package/dist/cli/commands/prime/briefOrientation.js.map +1 -0
- package/dist/cli/commands/prime/bundleStatus.js +191 -0
- package/dist/cli/commands/prime/bundleStatus.js.map +1 -0
- package/dist/cli/commands/prime/collectEntityOrientation.js +266 -0
- package/dist/cli/commands/prime/collectEntityOrientation.js.map +1 -0
- package/dist/cli/commands/prime/collectOrientationState.js +180 -0
- package/dist/cli/commands/prime/collectOrientationState.js.map +1 -0
- package/dist/cli/commands/prime/orientationOutput.js +360 -0
- package/dist/cli/commands/prime/orientationOutput.js.map +1 -0
- package/dist/cli/commands/prime/types.js +2 -0
- package/dist/cli/commands/prime/types.js.map +1 -0
- package/dist/cli/commands/prime/v1Migration.js +39 -0
- package/dist/cli/commands/prime/v1Migration.js.map +1 -0
- package/dist/cli/commands/prime.js +61 -556
- package/dist/cli/commands/prime.js.map +1 -1
- package/dist/cli/commands/query.js +66 -51
- package/dist/cli/commands/query.js.map +1 -1
- package/dist/cli/commands/report.js +100 -24
- package/dist/cli/commands/report.js.map +1 -1
- package/dist/cli/commands/route.js +142 -0
- package/dist/cli/commands/route.js.map +1 -0
- package/dist/cli/commands/schema.js +260 -78
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/state/decisions.js +388 -0
- package/dist/cli/commands/state/decisions.js.map +1 -0
- package/dist/cli/commands/state/docs.js +71 -0
- package/dist/cli/commands/state/docs.js.map +1 -0
- package/dist/cli/commands/state/experimentRecords.js +139 -0
- package/dist/cli/commands/state/experimentRecords.js.map +1 -0
- package/dist/cli/commands/state/experiments.js +15 -0
- package/dist/cli/commands/state/experiments.js.map +1 -0
- package/dist/cli/commands/state/get.js +127 -0
- package/dist/cli/commands/state/get.js.map +1 -0
- package/dist/cli/commands/state/health.js +15 -0
- package/dist/cli/commands/state/health.js.map +1 -0
- package/dist/cli/commands/state/index.js +60 -0
- package/dist/cli/commands/state/index.js.map +1 -0
- package/dist/cli/commands/state/list.js +176 -0
- package/dist/cli/commands/state/list.js.map +1 -0
- package/dist/cli/commands/state/objective.js +26 -0
- package/dist/cli/commands/state/objective.js.map +1 -0
- package/dist/cli/commands/state/plan.js +15 -0
- package/dist/cli/commands/state/plan.js.map +1 -0
- package/dist/cli/commands/state/planTasks.js +142 -0
- package/dist/cli/commands/state/planTasks.js.map +1 -0
- package/dist/cli/commands/state/plans.js +143 -0
- package/dist/cli/commands/state/plans.js.map +1 -0
- package/dist/cli/commands/state/progress.js +14 -0
- package/dist/cli/commands/state/progress.js.map +1 -0
- package/dist/cli/commands/state/shared.js +15 -0
- package/dist/cli/commands/state/shared.js.map +1 -0
- package/dist/cli/commands/state/todo.js +42 -0
- package/dist/cli/commands/state/todo.js.map +1 -0
- package/dist/cli/commands/state/write.js +418 -0
- package/dist/cli/commands/state/write.js.map +1 -0
- package/dist/cli/commands/upgrade.js +146 -4
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/commands/upgradeVerify.js +119 -0
- package/dist/cli/commands/upgradeVerify.js.map +1 -0
- package/dist/cli/commands/validate.js +133 -210
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/commands/verify.js +30 -8
- package/dist/cli/commands/verify.js.map +1 -1
- package/dist/cli/contracts/bundleStatus.js +2 -0
- package/dist/cli/contracts/bundleStatus.js.map +1 -0
- package/dist/cli/contracts/orientationState.js +2 -0
- package/dist/cli/contracts/orientationState.js.map +1 -0
- package/dist/cli/dispatch/argvParser.js +33 -0
- package/dist/cli/dispatch/argvParser.js.map +1 -0
- package/dist/cli/dispatch/check.js +390 -0
- package/dist/cli/dispatch/check.js.map +1 -0
- package/dist/cli/dispatch/commands.js +27 -0
- package/dist/cli/dispatch/commands.js.map +1 -0
- package/dist/cli/dispatch/index.js +226 -0
- package/dist/cli/dispatch/index.js.map +1 -0
- package/dist/cli/dispatch/lifecycle.js +653 -0
- package/dist/cli/dispatch/lifecycle.js.map +1 -0
- package/dist/cli/dispatch/prime.js +119 -0
- package/dist/cli/dispatch/prime.js.map +1 -0
- package/dist/cli/dispatch/shared.js +64 -0
- package/dist/cli/dispatch/shared.js.map +1 -0
- package/dist/cli/dispatch/state.js +174 -0
- package/dist/cli/dispatch/state.js.map +1 -0
- package/dist/cli/dispatch.js +1 -957
- package/dist/cli/dispatch.js.map +1 -1
- package/dist/cli/errors.js +53 -0
- package/dist/cli/errors.js.map +1 -0
- package/dist/cli/help.js +419 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/migrationRequired.js +87 -0
- package/dist/cli/migrationRequired.js.map +1 -0
- package/dist/cli/orientation/attention.js +67 -0
- package/dist/cli/orientation/attention.js.map +1 -0
- package/dist/cli/orientation/corpusCoverage.js +103 -0
- package/dist/cli/orientation/corpusCoverage.js.map +1 -0
- package/dist/cli/orientation.js +407 -159
- package/dist/cli/orientation.js.map +1 -1
- package/dist/cli/planArtifacts.js +351 -0
- package/dist/cli/planArtifacts.js.map +1 -0
- package/dist/cli/planEvidence.js +158 -0
- package/dist/cli/planEvidence.js.map +1 -0
- package/dist/cli/planLifecycleState.js +34 -0
- package/dist/cli/planLifecycleState.js.map +1 -0
- package/dist/cli/planTaskIndex.js +12 -0
- package/dist/cli/planTaskIndex.js.map +1 -0
- package/dist/cli/prime-blob.js +69 -2
- package/dist/cli/prime-blob.js.map +1 -1
- package/dist/cli/startupCompletenessContract.js +57 -0
- package/dist/cli/startupCompletenessContract.js.map +1 -0
- package/dist/cli/stateQuery.js +63 -10
- package/dist/cli/stateQuery.js.map +1 -1
- package/dist/cli/structured.js.map +1 -1
- package/dist/cli/todoMarkdown.js +33 -0
- package/dist/cli/todoMarkdown.js.map +1 -0
- package/dist/cli/todoReadinessSelection.js +157 -0
- package/dist/cli/todoReadinessSelection.js.map +1 -0
- package/dist/cli/todoSeverity.js +19 -0
- package/dist/cli/todoSeverity.js.map +1 -0
- package/dist/core/atomicWriter.js +21 -0
- package/dist/core/atomicWriter.js.map +1 -0
- package/dist/core/difflib.js.map +1 -1
- package/dist/core/envPaths.js +21 -0
- package/dist/core/envPaths.js.map +1 -0
- package/dist/core/jsonValue.js +6 -0
- package/dist/core/jsonValue.js.map +1 -0
- package/dist/core/paths.js.map +1 -1
- package/dist/core/pyjson.js +67 -2
- package/dist/core/pyjson.js.map +1 -1
- package/dist/core/skillIdentity.js +24 -0
- package/dist/core/skillIdentity.js.map +1 -0
- package/dist/core/sourceRoot.js.map +1 -1
- package/dist/core/text.js +11 -0
- package/dist/core/text.js.map +1 -0
- package/dist/core/toml.js.map +1 -1
- package/dist/core/yaml.js +8 -0
- package/dist/core/yaml.js.map +1 -1
- package/dist/eval/evalSkills.js +30 -25
- package/dist/eval/evalSkills.js.map +1 -1
- package/dist/eval/hybridRouteEvaluation.js +156 -0
- package/dist/eval/hybridRouteEvaluation.js.map +1 -0
- package/dist/eval/semanticEval.js +43 -19
- package/dist/eval/semanticEval.js.map +1 -1
- package/dist/eval/semanticFixtures.js +16 -4
- package/dist/eval/semanticFixtures.js.map +1 -1
- package/dist/hooks/common.js +10 -27
- package/dist/hooks/common.js.map +1 -1
- package/dist/hooks/compaction/apply.js +447 -0
- package/dist/hooks/compaction/apply.js.map +1 -0
- package/dist/hooks/compaction/dryRun.js +185 -0
- package/dist/hooks/compaction/dryRun.js.map +1 -0
- package/dist/hooks/compaction/index.js +23 -0
- package/dist/hooks/compaction/index.js.map +1 -0
- package/dist/hooks/compaction/parse.js +326 -0
- package/dist/hooks/compaction/parse.js.map +1 -0
- package/dist/hooks/compaction/retention.js +203 -0
- package/dist/hooks/compaction/retention.js.map +1 -0
- package/dist/hooks/compaction/status.js +361 -0
- package/dist/hooks/compaction/status.js.map +1 -0
- package/dist/hooks/compaction/types.js +6 -0
- package/dist/hooks/compaction/types.js.map +1 -0
- package/dist/hooks/cursorPreToolUse.js +1 -1
- package/dist/hooks/cursorPreToolUse.js.map +1 -1
- package/dist/hooks/cursorSessionStart.js +14 -21
- package/dist/hooks/cursorSessionStart.js.map +1 -1
- package/dist/hooks/projectHookInput.js +26 -0
- package/dist/hooks/projectHookInput.js.map +1 -0
- package/dist/hooks/sessionStart.js +55 -170
- package/dist/hooks/sessionStart.js.map +1 -1
- package/dist/hooks/sessionStop.js +12 -26
- package/dist/hooks/sessionStop.js.map +1 -1
- package/dist/hooks/validateArtifact/agentFacing.js +10 -0
- package/dist/hooks/validateArtifact/agentFacing.js.map +1 -0
- package/dist/hooks/validateArtifact/index.js +151 -0
- package/dist/hooks/validateArtifact/index.js.map +1 -0
- package/dist/hooks/validateArtifact/markdown.js +146 -0
- package/dist/hooks/validateArtifact/markdown.js.map +1 -0
- package/dist/hooks/validateArtifact/runtime.js +86 -0
- package/dist/hooks/validateArtifact/runtime.js.map +1 -0
- package/dist/hooks/validateArtifact/schema.js +541 -0
- package/dist/hooks/validateArtifact/schema.js.map +1 -0
- package/dist/hooks/validateArtifact/traversal.js +108 -0
- package/dist/hooks/validateArtifact/traversal.js.map +1 -0
- package/dist/hooks/validateArtifact/violations.js +108 -0
- package/dist/hooks/validateArtifact/violations.js.map +1 -0
- package/dist/migrate/v2HandoffManifest.js +455 -0
- package/dist/migrate/v2HandoffManifest.js.map +1 -0
- package/dist/registries/artifactProtocolIds.js +77 -0
- package/dist/registries/artifactProtocolIds.js.map +1 -0
- package/dist/registries/artifactRegistry.js +222 -62
- package/dist/registries/artifactRegistry.js.map +1 -1
- package/dist/registries/capabilityContract.js +141 -12
- package/dist/registries/capabilityContract.js.map +1 -1
- package/dist/registries/evaluatorHandoffContract.js +171 -0
- package/dist/registries/evaluatorHandoffContract.js.map +1 -0
- package/dist/registries/evidenceTierContract.js +362 -0
- package/dist/registries/evidenceTierContract.js.map +1 -0
- package/dist/registries/hybridRoute.js +203 -0
- package/dist/registries/hybridRoute.js.map +1 -0
- package/dist/registries/hybridRouteReceipt.js +221 -0
- package/dist/registries/hybridRouteReceipt.js.map +1 -0
- package/dist/registries/packageRegistry.js +90 -230
- package/dist/registries/packageRegistry.js.map +1 -1
- package/dist/registries/todoReadinessContract.js +406 -0
- package/dist/registries/todoReadinessContract.js.map +1 -0
- package/dist/registries/triggerLoader.js +175 -0
- package/dist/registries/triggerLoader.js.map +1 -0
- package/dist/registries/verbosityBudgetContract.js +206 -0
- package/dist/registries/verbosityBudgetContract.js.map +1 -0
- package/dist/release/releaseMetadata.js +319 -0
- package/dist/release/releaseMetadata.js.map +1 -0
- package/dist/runtime/lifecycleAdapterContract.js +458 -0
- package/dist/runtime/lifecycleAdapterContract.js.map +1 -0
- package/dist/runtime/lifecycleAdapters.js +778 -0
- package/dist/runtime/lifecycleAdapters.js.map +1 -0
- package/dist/runtime/lifecycleAuthority.js +454 -0
- package/dist/runtime/lifecycleAuthority.js.map +1 -0
- package/dist/runtime/lifecycleOperationContract.js +114 -0
- package/dist/runtime/lifecycleOperationContract.js.map +1 -0
- package/dist/runtime/lifecycleOperations.js +635 -0
- package/dist/runtime/lifecycleOperations.js.map +1 -0
- package/dist/runtime/lifecycleOwnershipJournal.js +623 -0
- package/dist/runtime/lifecycleOwnershipJournal.js.map +1 -0
- package/dist/runtime/lifecyclePublication.js +416 -0
- package/dist/runtime/lifecyclePublication.js.map +1 -0
- package/dist/runtime/lifecycleSnapshot.js +439 -0
- package/dist/runtime/lifecycleSnapshot.js.map +1 -0
- package/dist/runtime/nativeResourceCleanup.js +317 -0
- package/dist/runtime/nativeResourceCleanup.js.map +1 -0
- package/dist/setup/codex/cli.js +130 -0
- package/dist/setup/codex/cli.js.map +1 -0
- package/dist/setup/codex/configToml.js +558 -0
- package/dist/setup/codex/configToml.js.map +1 -0
- package/dist/setup/codex/constants.js +14 -0
- package/dist/setup/codex/constants.js.map +1 -0
- package/dist/setup/codex/installRoot.js +64 -0
- package/dist/setup/codex/installRoot.js.map +1 -0
- package/dist/setup/codex/state.js +252 -0
- package/dist/setup/codex/state.js.map +1 -0
- package/dist/setup/codex.js +9 -1055
- package/dist/setup/codex.js.map +1 -1
- package/dist/setup/opencode.js +21 -0
- package/dist/setup/opencode.js.map +1 -0
- package/dist/setup/opencodeConstants.js +2 -0
- package/dist/setup/opencodeConstants.js.map +1 -0
- package/dist/setup/sharedSkill.js +46 -0
- package/dist/setup/sharedSkill.js.map +1 -0
- package/dist/setup/smokeChecks.js +82 -0
- package/dist/setup/smokeChecks.js.map +1 -0
- package/dist/state/archiveDiscovery.js +578 -0
- package/dist/state/archiveDiscovery.js.map +1 -0
- package/dist/state/archivePublication.js +226 -0
- package/dist/state/archivePublication.js.map +1 -0
- package/dist/state/archiveRecovery.js +238 -0
- package/dist/state/archiveRecovery.js.map +1 -0
- package/dist/state/archiveReplay.js +54 -0
- package/dist/state/archiveReplay.js.map +1 -0
- package/dist/state/canonicalMigrationRecord.js +37 -0
- package/dist/state/canonicalMigrationRecord.js.map +1 -0
- package/dist/state/decisionEntities.js +322 -0
- package/dist/state/decisionEntities.js.map +1 -0
- package/dist/state/decisionLegacyValidation.js +216 -0
- package/dist/state/decisionLegacyValidation.js.map +1 -0
- package/dist/state/decisionMigrationProvenance.js +117 -0
- package/dist/state/decisionMigrationProvenance.js.map +1 -0
- package/dist/state/decisionOverlay.js +278 -0
- package/dist/state/decisionOverlay.js.map +1 -0
- package/dist/state/decisionRevision.js +632 -0
- package/dist/state/decisionRevision.js.map +1 -0
- package/dist/state/decisionRevisionPublication.js +532 -0
- package/dist/state/decisionRevisionPublication.js.map +1 -0
- package/dist/state/directRetrieval.js +373 -0
- package/dist/state/directRetrieval.js.map +1 -0
- package/dist/state/durability.js +325 -0
- package/dist/state/durability.js.map +1 -0
- package/dist/state/entityCutover.js +294 -0
- package/dist/state/entityCutover.js.map +1 -0
- package/dist/state/entityCutoverGit.js +128 -0
- package/dist/state/entityCutoverGit.js.map +1 -0
- package/dist/state/entityMigrationCausality.js +99 -0
- package/dist/state/entityMigrationCausality.js.map +1 -0
- package/dist/state/entityMigrationPreview.js +864 -0
- package/dist/state/entityMigrationPreview.js.map +1 -0
- package/dist/state/entityPublicationContext.js +662 -0
- package/dist/state/entityPublicationContext.js.map +1 -0
- package/dist/state/entityStorage.js +881 -0
- package/dist/state/entityStorage.js.map +1 -0
- package/dist/state/experimentArchive.js +64 -0
- package/dist/state/experimentArchive.js.map +1 -0
- package/dist/state/experimentIdentity.js +203 -0
- package/dist/state/experimentIdentity.js.map +1 -0
- package/dist/state/experimentRetrieval.js +447 -0
- package/dist/state/experimentRetrieval.js.map +1 -0
- package/dist/state/healthEntities.js +266 -0
- package/dist/state/healthEntities.js.map +1 -0
- package/dist/state/healthEntityValidation.js +19 -0
- package/dist/state/healthEntityValidation.js.map +1 -0
- package/dist/state/healthRepair.js +70 -0
- package/dist/state/healthRepair.js.map +1 -0
- package/dist/state/installRoot.js +64 -24
- package/dist/state/installRoot.js.map +1 -1
- package/dist/state/legacyEntityCutoverEvidence.js +66 -0
- package/dist/state/legacyEntityCutoverEvidence.js.map +1 -0
- package/dist/state/legacyIdentity.js +48 -0
- package/dist/state/legacyIdentity.js.map +1 -0
- package/dist/state/legacySummaryRecord.js +7 -0
- package/dist/state/legacySummaryRecord.js.map +1 -0
- package/dist/state/listAccounting.js +55 -0
- package/dist/state/listAccounting.js.map +1 -0
- package/dist/state/listClassification.js +18 -0
- package/dist/state/listClassification.js.map +1 -0
- package/dist/state/listCursor.js +43 -0
- package/dist/state/listCursor.js.map +1 -0
- package/dist/state/listRetrieval.js +813 -0
- package/dist/state/listRetrieval.js.map +1 -0
- package/dist/state/migrationSourceBinding.js +31 -0
- package/dist/state/migrationSourceBinding.js.map +1 -0
- package/dist/state/objectiveExperimentEntities.js +323 -0
- package/dist/state/objectiveExperimentEntities.js.map +1 -0
- package/dist/state/planEntities.js +444 -0
- package/dist/state/planEntities.js.map +1 -0
- package/dist/state/planIdentity.js +45 -0
- package/dist/state/planIdentity.js.map +1 -0
- package/dist/state/planRetrieval.js +314 -0
- package/dist/state/planRetrieval.js.map +1 -0
- package/dist/state/planTaskRetrieval.js +285 -0
- package/dist/state/planTaskRetrieval.js.map +1 -0
- package/dist/state/progressEntities.js +360 -0
- package/dist/state/progressEntities.js.map +1 -0
- package/dist/state/projectRoot.js +63 -0
- package/dist/state/projectRoot.js.map +1 -0
- package/dist/state/projectionPolicy.js +184 -0
- package/dist/state/projectionPolicy.js.map +1 -0
- package/dist/state/retrievalAuthority.js +343 -0
- package/dist/state/retrievalAuthority.js.map +1 -0
- package/dist/state/safeProjectFile.js +153 -0
- package/dist/state/safeProjectFile.js.map +1 -0
- package/dist/state/startupAnalysis/benchmark.js +433 -0
- package/dist/state/startupAnalysis/benchmark.js.map +1 -0
- package/dist/state/startupAnalysis/contract.js +126 -0
- package/dist/state/startupAnalysis/contract.js.map +1 -0
- package/dist/state/startupAnalysis/helpers.js +287 -0
- package/dist/state/startupAnalysis/helpers.js.map +1 -0
- package/dist/state/startupAnalysis/index.js +7 -0
- package/dist/state/startupAnalysis/index.js.map +1 -0
- package/dist/state/startupAnalysis/metrics.js +341 -0
- package/dist/state/startupAnalysis/metrics.js.map +1 -0
- package/dist/state/startupAnalysis/records.js +199 -0
- package/dist/state/startupAnalysis/records.js.map +1 -0
- package/dist/state/startupAnalysis/report.js +112 -0
- package/dist/state/startupAnalysis/report.js.map +1 -0
- package/dist/state/startupAnalysis/threshold.js +513 -0
- package/dist/state/startupAnalysis/threshold.js.map +1 -0
- package/dist/state/startupAnalysis.js +2 -1952
- package/dist/state/startupAnalysis.js.map +1 -1
- package/dist/state/startupProjection.js +567 -0
- package/dist/state/startupProjection.js.map +1 -0
- package/dist/state/stateMode.js +83 -0
- package/dist/state/stateMode.js.map +1 -0
- package/dist/state/summaryEntityRead.js +26 -0
- package/dist/state/summaryEntityRead.js.map +1 -0
- package/dist/state/summaryMigrationProvenance.js +67 -0
- package/dist/state/summaryMigrationProvenance.js.map +1 -0
- package/dist/state/summarySourceRowAuthority.js +37 -0
- package/dist/state/summarySourceRowAuthority.js.map +1 -0
- package/dist/state/todoDocsEntities.js +267 -0
- package/dist/state/todoDocsEntities.js.map +1 -0
- package/dist/state/todoDocsEntityValidation.js +34 -0
- package/dist/state/todoDocsEntityValidation.js.map +1 -0
- package/dist/state/write/assign.js +21 -0
- package/dist/state/write/assign.js.map +1 -0
- package/dist/state/write/candidateMutation.js +281 -0
- package/dist/state/write/candidateMutation.js.map +1 -0
- package/dist/state/write/errors.js +12 -0
- package/dist/state/write/errors.js.map +1 -0
- package/dist/state/write/experimentPublication.js +193 -0
- package/dist/state/write/experimentPublication.js.map +1 -0
- package/dist/state/write/explain.js +303 -0
- package/dist/state/write/explain.js.map +1 -0
- package/dist/state/write/fields.js +62 -0
- package/dist/state/write/fields.js.map +1 -0
- package/dist/state/write/helpers.js +30 -0
- package/dist/state/write/helpers.js.map +1 -0
- package/dist/state/write/index.js +12 -0
- package/dist/state/write/index.js.map +1 -0
- package/dist/state/write/input.js +22 -0
- package/dist/state/write/input.js.map +1 -0
- package/dist/state/write/lock.js +838 -0
- package/dist/state/write/lock.js.map +1 -0
- package/dist/state/write/mutation.js +235 -0
- package/dist/state/write/mutation.js.map +1 -0
- package/dist/state/write/operations.js +375 -0
- package/dist/state/write/operations.js.map +1 -0
- package/dist/state/write/planEvaluation.js +121 -0
- package/dist/state/write/planEvaluation.js.map +1 -0
- package/dist/state/write/planPublication.js +135 -0
- package/dist/state/write/planPublication.js.map +1 -0
- package/dist/state/write/serialize.js +2 -0
- package/dist/state/write/serialize.js.map +1 -0
- package/dist/state/write/transaction.js +44 -0
- package/dist/state/write/transaction.js.map +1 -0
- package/dist/state/write/validate.js +8 -0
- package/dist/state/write/validate.js.map +1 -0
- package/dist/upgrade/appContentRefresh.js +384 -0
- package/dist/upgrade/appContentRefresh.js.map +1 -0
- package/dist/upgrade/appModel.js +8 -6
- package/dist/upgrade/appModel.js.map +1 -1
- package/dist/upgrade/atomicWriter.js +2 -0
- package/dist/upgrade/atomicWriter.js.map +1 -0
- package/dist/upgrade/bundleEvidence.js +34 -0
- package/dist/upgrade/bundleEvidence.js.map +1 -0
- package/dist/upgrade/channels.js +21 -10
- package/dist/upgrade/channels.js.map +1 -1
- package/dist/upgrade/coexistenceProbe.js +105 -0
- package/dist/upgrade/coexistenceProbe.js.map +1 -0
- package/dist/upgrade/compatibility.js +56 -20
- package/dist/upgrade/compatibility.js.map +1 -1
- package/dist/upgrade/doctor.js +197 -191
- package/dist/upgrade/doctor.js.map +1 -1
- package/dist/upgrade/doctorClassifier.js +188 -0
- package/dist/upgrade/doctorClassifier.js.map +1 -0
- package/dist/upgrade/installedHooksRetirement.js +197 -0
- package/dist/upgrade/installedHooksRetirement.js.map +1 -0
- package/dist/upgrade/legacyAgentCleanup.js +283 -0
- package/dist/upgrade/legacyAgentCleanup.js.map +1 -0
- package/dist/upgrade/lifecycleUpgrade.js +114 -0
- package/dist/upgrade/lifecycleUpgrade.js.map +1 -0
- package/dist/upgrade/migrateArtifactsV2ToV3.js +363 -137
- package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
- package/dist/upgrade/migrationPublication.js +123 -0
- package/dist/upgrade/migrationPublication.js.map +1 -0
- package/dist/upgrade/nextMajorDoctor.js +156 -0
- package/dist/upgrade/nextMajorDoctor.js.map +1 -0
- package/dist/upgrade/npxPlatformStatus.js +23 -0
- package/dist/upgrade/npxPlatformStatus.js.map +1 -0
- package/dist/upgrade/projectIntegration.js +142 -171
- package/dist/upgrade/projectIntegration.js.map +1 -1
- package/dist/upgrade/projectIntegrationDecision.js +51 -0
- package/dist/upgrade/projectIntegrationDecision.js.map +1 -0
- package/dist/upgrade/runtimeMigration.js +336 -281
- package/dist/upgrade/runtimeMigration.js.map +1 -1
- package/dist/upgrade/upgradeCommands.js +9 -0
- package/dist/upgrade/upgradeCommands.js.map +1 -1
- package/dist/upgrade/upgradeLock.js +86 -0
- package/dist/upgrade/upgradeLock.js.map +1 -0
- package/dist/upgrade/upgradeOrchestrator.js +212 -56
- package/dist/upgrade/upgradeOrchestrator.js.map +1 -1
- package/dist/upgrade/v3CapabilitySurface.js +15 -0
- package/dist/upgrade/v3CapabilitySurface.js.map +1 -0
- package/dist/upgrade/versionResolution.js +12 -4
- package/dist/upgrade/versionResolution.js.map +1 -1
- package/dist/validate/appHomeContract.js +5 -9
- package/dist/validate/appHomeContract.js.map +1 -1
- package/dist/validate/capability.js +144 -14
- package/dist/validate/capability.js.map +1 -1
- package/dist/validate/crossCapability.js +12 -9
- package/dist/validate/crossCapability.js.map +1 -1
- package/dist/validate/selfAudit.js +73 -36
- package/dist/validate/selfAudit.js.map +1 -1
- package/dist/validate/vocabularyAuthority.js +303 -0
- package/dist/validate/vocabularyAuthority.js.map +1 -0
- package/package.json +45 -27
- package/bundle/references/adapters/cursor.md +0 -213
- package/bundle/references/adapters/opencode.md +0 -530
- package/bundle/references/adapters/runtime-adapter-characterization.md +0 -79
- package/bundle/references/adapters/runtime-adapter-interface-model.yaml +0 -200
- package/bundle/references/adapters/runtime-adapter-registry.yaml +0 -548
- package/bundle/references/adapters/runtime-feature-parity.md +0 -189
- package/bundle/references/v1-section-mapping.md +0 -47
- package/bundle/skills/agentera/.claude-plugin/plugin.json +0 -27
- package/bundle/skills/agentera/agents/dokumentera.toml +0 -6
- package/bundle/skills/agentera/agents/hej.toml +0 -6
- package/bundle/skills/agentera/agents/inspektera.toml +0 -6
- package/bundle/skills/agentera/agents/inspirera.toml +0 -6
- package/bundle/skills/agentera/agents/optimera.toml +0 -6
- package/bundle/skills/agentera/agents/orkestrera.toml +0 -6
- package/bundle/skills/agentera/agents/planera.toml +0 -6
- package/bundle/skills/agentera/agents/profilera.toml +0 -6
- package/bundle/skills/agentera/agents/realisera.toml +0 -6
- package/bundle/skills/agentera/agents/resonera.toml +0 -6
- package/bundle/skills/agentera/agents/visionera.toml +0 -6
- package/bundle/skills/agentera/agents/visualisera.toml +0 -6
- package/bundle/skills/agentera/capabilities/dokumentera/instructions.md +0 -428
- package/bundle/skills/agentera/capabilities/dokumentera/schemas/artifacts.yaml +0 -73
- package/bundle/skills/agentera/capabilities/dokumentera/schemas/triggers.yaml +0 -35
- package/bundle/skills/agentera/capabilities/hej/instructions.md +0 -331
- package/bundle/skills/agentera/capabilities/hej/schemas/artifacts.yaml +0 -69
- package/bundle/skills/agentera/capabilities/hej/schemas/triggers.yaml +0 -58
- package/bundle/skills/agentera/capabilities/inspektera/instructions.md +0 -514
- package/bundle/skills/agentera/capabilities/inspektera/schemas/artifacts.yaml +0 -76
- package/bundle/skills/agentera/capabilities/inspektera/schemas/triggers.yaml +0 -38
- package/bundle/skills/agentera/capabilities/inspirera/instructions.md +0 -280
- package/bundle/skills/agentera/capabilities/inspirera/schemas/artifacts.yaml +0 -24
- package/bundle/skills/agentera/capabilities/inspirera/schemas/triggers.yaml +0 -34
- package/bundle/skills/agentera/capabilities/optimera/instructions.md +0 -437
- package/bundle/skills/agentera/capabilities/optimera/schemas/triggers.yaml +0 -39
- package/bundle/skills/agentera/capabilities/orkestrera/instructions.md +0 -433
- package/bundle/skills/agentera/capabilities/orkestrera/schemas/artifacts.yaml +0 -64
- package/bundle/skills/agentera/capabilities/orkestrera/schemas/triggers.yaml +0 -42
- package/bundle/skills/agentera/capabilities/orkestrera/schemas/validation.yaml +0 -107
- package/bundle/skills/agentera/capabilities/planera/instructions.md +0 -368
- package/bundle/skills/agentera/capabilities/planera/schemas/artifacts.yaml +0 -62
- package/bundle/skills/agentera/capabilities/planera/schemas/triggers.yaml +0 -34
- package/bundle/skills/agentera/capabilities/planera/schemas/validation.yaml +0 -61
- package/bundle/skills/agentera/capabilities/profilera/instructions.md +0 -419
- package/bundle/skills/agentera/capabilities/profilera/schemas/triggers.yaml +0 -45
- package/bundle/skills/agentera/capabilities/profilera/schemas/validation.yaml +0 -57
- package/bundle/skills/agentera/capabilities/realisera/instructions.md +0 -403
- package/bundle/skills/agentera/capabilities/realisera/schemas/artifacts.yaml +0 -80
- package/bundle/skills/agentera/capabilities/realisera/schemas/triggers.yaml +0 -39
- package/bundle/skills/agentera/capabilities/resonera/instructions.md +0 -329
- package/bundle/skills/agentera/capabilities/resonera/schemas/artifacts.yaml +0 -47
- package/bundle/skills/agentera/capabilities/resonera/schemas/triggers.yaml +0 -46
- package/bundle/skills/agentera/capabilities/visionera/instructions.md +0 -309
- package/bundle/skills/agentera/capabilities/visionera/schemas/triggers.yaml +0 -41
- package/bundle/skills/agentera/capabilities/visualisera/instructions.md +0 -400
- package/bundle/skills/agentera/capabilities/visualisera/schemas/triggers.yaml +0 -33
- package/bundle/skills/hej/.claude-plugin/plugin.json +0 -6
- package/bundle/skills/hej/SKILL.md +0 -69
- package/bundle/skills/hej/agents/hej.toml +0 -11
- package/bundle/skills/hej/agents/openai.yaml +0 -8
- package/dist/cli/commands/backfill.js +0 -84
- package/dist/cli/commands/backfill.js.map +0 -1
- package/dist/cli/commands/state.js +0 -1012
- package/dist/cli/commands/state.js.map +0 -1
- package/dist/core/git.js +0 -43
- package/dist/core/git.js.map +0 -1
- package/dist/hooks/compaction.js +0 -935
- package/dist/hooks/compaction.js.map +0 -1
- package/dist/hooks/validateArtifact.js +0 -933
- package/dist/hooks/validateArtifact.js.map +0 -1
- package/dist/registries/runtimeAdapterRegistry.js +0 -315
- package/dist/registries/runtimeAdapterRegistry.js.map +0 -1
- package/dist/setup/copilot.js +0 -227
- package/dist/setup/copilot.js.map +0 -1
- package/dist/setup/cursor.js +0 -127
- package/dist/setup/cursor.js.map +0 -1
- package/dist/setup/doctor.js +0 -1276
- package/dist/setup/doctor.js.map +0 -1
- package/dist/state/progressCommit.js +0 -289
- package/dist/state/progressCommit.js.map +0 -1
- package/dist/upgrade/migrateArtifactsV1ToV2.js +0 -571
- package/dist/upgrade/migrateArtifactsV1ToV2.js.map +0 -1
- package/dist/validate/lifecycleAdapters.js +0 -772
- package/dist/validate/lifecycleAdapters.js.map +0 -1
- /package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/exit.yaml +0 -0
- /package/bundle/skills/agentera/capabilities/{hej → status}/schemas/exit.yaml +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../home/jgabor/git/agentera/packages/cli/src/cli/dispatch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,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,KAAK,SAAS;YACZ,oBAAoB,CAAC,SAAS,EAAE,eAAe,EAAE,GAAG,CAAC,CAAC;YACtD,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK;gBAClC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,EAAE,kBAAkB,CAAC;gBAC1C,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,kBAAkB,CAAC,CAAC;QAC5C,KAAK,UAAU;YACb,oBAAoB,CAAC,UAAU,EAAE,gBAAgB,EAAE,GAAG,CAAC,CAAC;YACxD,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,mBAAmB,CAAC,CAAC;QACpD;YACE,IAAI,OAAO,IAAI,wBAAwB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC1D,OAAO,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,OAAO,EAAE,CAAC,CAAC;YACjE,CAAC;YACD,OAAO,gBAAgB,CAAC,EAAE,EAAE;gBAC1B,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACJ,KAAK,EAAE,oBAAoB;oBAC3B,OAAO,EAAE,sCAAsC,OAAO,IAAI,QAAQ,EAAE;iBACrE;aACF,CAAC,CAAC;IACP,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,653 @@
|
|
|
1
|
+
import fsForHooks from "node:fs";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { cmdAppHome } from "../commands/appHome.js";
|
|
6
|
+
import { cmdDoctor } from "../commands/doctor.js";
|
|
7
|
+
import { cmdUpgrade } from "../commands/upgrade.js";
|
|
8
|
+
import { cmdVerify } from "../commands/verify.js";
|
|
9
|
+
import { cmdGate } from "../commands/compact.js";
|
|
10
|
+
import { cmdReport } from "../commands/report.js";
|
|
11
|
+
import { runSessionStart } from "../../hooks/sessionStart.js";
|
|
12
|
+
import { runSessionStop } from "../../hooks/sessionStop.js";
|
|
13
|
+
import { runCursorSessionStart } from "../../hooks/cursorSessionStart.js";
|
|
14
|
+
import { runCursorPreToolUse } from "../../hooks/cursorPreToolUse.js";
|
|
15
|
+
import { HookCliAdapter } from "../../hooks/validateArtifact/index.js";
|
|
16
|
+
import { usageMain } from "../../analytics/usageStats.js";
|
|
17
|
+
import { validatePathValue } from "../argvalidate.js";
|
|
18
|
+
import { printAppHomeHelp, printDoctorHelp, printUpgradeHelp, wantsHelp } from "../help.js";
|
|
19
|
+
import { makeArgvValueReader } from "./argvParser.js";
|
|
20
|
+
import { parseCompactArgs } from "./check.js";
|
|
21
|
+
import { asEnvelopeFormat, classifyParseError, detectTopLevelFormat, emitDeprecationAlias } from "./shared.js";
|
|
22
|
+
import { emitInvalidInput } from "../errors.js";
|
|
23
|
+
import { migrationProject } from "../migrationRequired.js";
|
|
24
|
+
import { fullEntityUpgradeCommand } from "../../upgrade/upgradeCommands.js";
|
|
25
|
+
import { nativeResourceCleanupIds } from "../../runtime/nativeResourceCleanup.js";
|
|
26
|
+
function rejectUnsupportedUpgradeFlag(io, format, message, recovery) {
|
|
27
|
+
return emitInvalidInput(io, {
|
|
28
|
+
format: asEnvelopeFormat(format),
|
|
29
|
+
body: { class: "unsupported_target", message, recovery },
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export function runGate(argv, io, prog) {
|
|
33
|
+
const parsed = parseCompactArgs(argv);
|
|
34
|
+
if ("error" in parsed) {
|
|
35
|
+
return emitInvalidInput(io, {
|
|
36
|
+
format: detectTopLevelFormat(argv),
|
|
37
|
+
body: classifyParseError(parsed.error),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
return cmdGate(parsed, io);
|
|
42
|
+
}
|
|
43
|
+
catch (exc) {
|
|
44
|
+
return emitInvalidInput(io, {
|
|
45
|
+
format: asEnvelopeFormat(parsed.format),
|
|
46
|
+
body: { class: "unsupported_target", message: exc.message },
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export function runAppHome(argv, io, prog) {
|
|
51
|
+
const out = io.out ?? ((t) => process.stdout.write(t));
|
|
52
|
+
if (wantsHelp(argv)) {
|
|
53
|
+
out(printAppHomeHelp() + "\n");
|
|
54
|
+
return 0;
|
|
55
|
+
}
|
|
56
|
+
const args = {
|
|
57
|
+
installRoot: null,
|
|
58
|
+
home: null,
|
|
59
|
+
format: "text",
|
|
60
|
+
};
|
|
61
|
+
let i = 0;
|
|
62
|
+
const value = makeArgvValueReader(argv, () => i, (n) => {
|
|
63
|
+
i = n;
|
|
64
|
+
});
|
|
65
|
+
for (; i < argv.length; i++) {
|
|
66
|
+
const a = argv[i];
|
|
67
|
+
let v;
|
|
68
|
+
if ((v = value("--install-root")) !== null)
|
|
69
|
+
args.installRoot = v;
|
|
70
|
+
else if ((v = value("--home")) !== null)
|
|
71
|
+
args.home = v;
|
|
72
|
+
else if ((v = value("--format")) !== null) {
|
|
73
|
+
if (v !== "text" && v !== "json") {
|
|
74
|
+
return emitInvalidInput(io, {
|
|
75
|
+
format: asEnvelopeFormat(args.format),
|
|
76
|
+
body: {
|
|
77
|
+
class: "invalid_choice",
|
|
78
|
+
message: `argument --format: invalid choice: '${v}' (choose from 'text', 'json')`,
|
|
79
|
+
valid_values: ["text", "json"],
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
args.format = v;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return emitInvalidInput(io, {
|
|
87
|
+
format: asEnvelopeFormat(args.format),
|
|
88
|
+
body: { class: "unrecognized_argument", message: `unrecognized arguments: ${a}` },
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
return cmdAppHome(args, io);
|
|
94
|
+
}
|
|
95
|
+
catch (exc) {
|
|
96
|
+
return emitInvalidInput(io, {
|
|
97
|
+
format: asEnvelopeFormat(args.format),
|
|
98
|
+
body: { class: "unsupported_target", message: exc.message },
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export function runDoctor(argv, io, prog) {
|
|
103
|
+
const err = io.err ?? ((t) => process.stderr.write(t));
|
|
104
|
+
const out = io.out ?? ((t) => process.stdout.write(t));
|
|
105
|
+
if (wantsHelp(argv)) {
|
|
106
|
+
out(printDoctorHelp() + "\n");
|
|
107
|
+
return 0;
|
|
108
|
+
}
|
|
109
|
+
const args = {
|
|
110
|
+
installRoot: null,
|
|
111
|
+
home: null,
|
|
112
|
+
project: null,
|
|
113
|
+
expectedVersion: null,
|
|
114
|
+
expectCommand: [],
|
|
115
|
+
smoke: false,
|
|
116
|
+
allowLiveModel: false,
|
|
117
|
+
format: "text",
|
|
118
|
+
};
|
|
119
|
+
let jsonFlag = false;
|
|
120
|
+
let i = 0;
|
|
121
|
+
const value = makeArgvValueReader(argv, () => i, (n) => {
|
|
122
|
+
i = n;
|
|
123
|
+
});
|
|
124
|
+
for (; i < argv.length; i++) {
|
|
125
|
+
const a = argv[i];
|
|
126
|
+
let v;
|
|
127
|
+
if ((v = value("--install-root")) !== null)
|
|
128
|
+
args.installRoot = v;
|
|
129
|
+
else if ((v = value("--home")) !== null)
|
|
130
|
+
args.home = v;
|
|
131
|
+
else if ((v = value("--project")) !== null)
|
|
132
|
+
args.project = v;
|
|
133
|
+
else if ((v = value("--expected-version")) !== null)
|
|
134
|
+
args.expectedVersion = v;
|
|
135
|
+
else if ((v = value("--expect-command")) !== null)
|
|
136
|
+
args.expectCommand.push(v);
|
|
137
|
+
else if ((v = value("--format")) !== null) {
|
|
138
|
+
if (v !== "text" && v !== "json") {
|
|
139
|
+
return emitInvalidInput(io, {
|
|
140
|
+
format: asEnvelopeFormat(args.format),
|
|
141
|
+
body: {
|
|
142
|
+
class: "invalid_choice",
|
|
143
|
+
message: `argument --format: invalid choice: '${v}' (choose from 'text', 'json')`,
|
|
144
|
+
valid_values: ["text", "json"],
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
args.format = v;
|
|
149
|
+
}
|
|
150
|
+
else if (a === "--json")
|
|
151
|
+
jsonFlag = true;
|
|
152
|
+
else if (a === "--smoke")
|
|
153
|
+
args.smoke = true;
|
|
154
|
+
else if (a === "--allow-live-model")
|
|
155
|
+
args.allowLiveModel = true;
|
|
156
|
+
else {
|
|
157
|
+
return emitInvalidInput(io, {
|
|
158
|
+
format: asEnvelopeFormat(args.format),
|
|
159
|
+
body: { class: "unrecognized_argument", message: `unrecognized arguments: ${a}` },
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (jsonFlag) {
|
|
164
|
+
emitDeprecationAlias("doctor --json", "doctor --format json", err);
|
|
165
|
+
args.format = "json";
|
|
166
|
+
}
|
|
167
|
+
try {
|
|
168
|
+
return cmdDoctor(args, io);
|
|
169
|
+
}
|
|
170
|
+
catch (exc) {
|
|
171
|
+
return emitInvalidInput(io, {
|
|
172
|
+
format: asEnvelopeFormat(args.format),
|
|
173
|
+
body: { class: "unsupported_target", message: exc.message },
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
export function readStdin() {
|
|
178
|
+
try {
|
|
179
|
+
return fsForHooks.readFileSync(0, "utf8");
|
|
180
|
+
}
|
|
181
|
+
catch {
|
|
182
|
+
return "";
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
export function runHook(name, argv, io, projectInput) {
|
|
186
|
+
const err = io.err ?? ((t) => process.stderr.write(t));
|
|
187
|
+
const raw = projectInput?.raw ?? (io.stdin ? io.stdin() : readStdin());
|
|
188
|
+
// Each hook owns its own stdout newline convention; do not wrap stdout here.
|
|
189
|
+
switch (name) {
|
|
190
|
+
case "session-start":
|
|
191
|
+
return runSessionStart(projectInput ?? raw, { out: io.out, err: io.err });
|
|
192
|
+
case "session-stop":
|
|
193
|
+
return runSessionStop(projectInput ?? raw);
|
|
194
|
+
case "cursor-session-start":
|
|
195
|
+
return runCursorSessionStart(projectInput ?? raw, { out: io.out, err: io.err });
|
|
196
|
+
case "cursor-pre-tool-use":
|
|
197
|
+
return runCursorPreToolUse(raw);
|
|
198
|
+
case "validate-artifact": {
|
|
199
|
+
const [rc, violations] = new HookCliAdapter().run(raw, null);
|
|
200
|
+
for (const v of violations)
|
|
201
|
+
err(`${v}\n`);
|
|
202
|
+
return rc;
|
|
203
|
+
}
|
|
204
|
+
default:
|
|
205
|
+
return emitInvalidInput(io, {
|
|
206
|
+
format: "text",
|
|
207
|
+
body: {
|
|
208
|
+
class: "unsupported_target",
|
|
209
|
+
message: `unknown hook '${name}'`,
|
|
210
|
+
valid_values: [
|
|
211
|
+
"session-start",
|
|
212
|
+
"session-stop",
|
|
213
|
+
"cursor-session-start",
|
|
214
|
+
"cursor-pre-tool-use",
|
|
215
|
+
"validate-artifact",
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
export function runUsage(argv, io, prog) {
|
|
222
|
+
const realOut = io.out ?? ((t) => process.stdout.write(t));
|
|
223
|
+
const realErr = io.err ?? ((t) => process.stderr.write(t));
|
|
224
|
+
let format = "text";
|
|
225
|
+
let corpus = null;
|
|
226
|
+
let project = null;
|
|
227
|
+
let i = 0;
|
|
228
|
+
const value = makeArgvValueReader(argv, () => i, (n) => {
|
|
229
|
+
i = n;
|
|
230
|
+
});
|
|
231
|
+
for (; i < argv.length; i++) {
|
|
232
|
+
const a = argv[i];
|
|
233
|
+
let v;
|
|
234
|
+
if ((v = value("--format")) !== null)
|
|
235
|
+
format = v;
|
|
236
|
+
else if ((v = value("--corpus")) !== null)
|
|
237
|
+
corpus = v;
|
|
238
|
+
else if ((v = value("--project")) !== null)
|
|
239
|
+
project = v;
|
|
240
|
+
else {
|
|
241
|
+
return emitInvalidInput(io, {
|
|
242
|
+
format: asEnvelopeFormat(format),
|
|
243
|
+
body: { class: "unrecognized_argument", message: `unrecognized arguments: ${a}` },
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
if (corpus !== null) {
|
|
248
|
+
try {
|
|
249
|
+
validatePathValue(corpus, "path");
|
|
250
|
+
}
|
|
251
|
+
catch (e) {
|
|
252
|
+
return emitInvalidInput(io, {
|
|
253
|
+
format: asEnvelopeFormat(format),
|
|
254
|
+
body: {
|
|
255
|
+
class: "invalid_format",
|
|
256
|
+
message: `argument --corpus: ${e.message}`,
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (format !== "text" && format !== "json") {
|
|
262
|
+
return emitInvalidInput(io, {
|
|
263
|
+
format: asEnvelopeFormat(format),
|
|
264
|
+
body: {
|
|
265
|
+
class: "invalid_choice",
|
|
266
|
+
message: `unsupported usage format '${format}'; valid formats: text, json.`,
|
|
267
|
+
valid_values: ["text", "json"],
|
|
268
|
+
syntax: "agentera usage [--format text|json] [--corpus PATH] [--project VALUE]",
|
|
269
|
+
example: "agentera usage --format json --project agentera",
|
|
270
|
+
},
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
const engineArgv = [];
|
|
274
|
+
if (corpus !== null)
|
|
275
|
+
engineArgv.push("--corpus", corpus);
|
|
276
|
+
if (project !== null)
|
|
277
|
+
engineArgv.push("--project", project);
|
|
278
|
+
if (format === "json")
|
|
279
|
+
engineArgv.push("--json");
|
|
280
|
+
return usageMain(engineArgv, {
|
|
281
|
+
out: (t) => realOut(t + "\n"),
|
|
282
|
+
err: (t) => realErr(t + "\n"),
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
export function runUpgrade(argv, io, prog) {
|
|
286
|
+
const err = io.err ?? ((t) => process.stderr.write(t));
|
|
287
|
+
const out = io.out ?? ((t) => process.stdout.write(t));
|
|
288
|
+
if (wantsHelp(argv)) {
|
|
289
|
+
out(printUpgradeHelp() + "\n");
|
|
290
|
+
return 0;
|
|
291
|
+
}
|
|
292
|
+
const args = {
|
|
293
|
+
installRoot: null,
|
|
294
|
+
home: null,
|
|
295
|
+
project: null,
|
|
296
|
+
expectedVersion: null,
|
|
297
|
+
channel: null,
|
|
298
|
+
yes: false,
|
|
299
|
+
dryRun: false,
|
|
300
|
+
only: [],
|
|
301
|
+
force: false,
|
|
302
|
+
verify: false,
|
|
303
|
+
runtime: null,
|
|
304
|
+
legacyCleanup: null,
|
|
305
|
+
format: "text",
|
|
306
|
+
};
|
|
307
|
+
let jsonFlag = false;
|
|
308
|
+
let i = 0;
|
|
309
|
+
const value = makeArgvValueReader(argv, () => i, (n) => {
|
|
310
|
+
i = n;
|
|
311
|
+
});
|
|
312
|
+
for (; i < argv.length; i++) {
|
|
313
|
+
const a = argv[i];
|
|
314
|
+
let v;
|
|
315
|
+
if ((v = value("--install-root")) !== null)
|
|
316
|
+
args.installRoot = v;
|
|
317
|
+
else if ((v = value("--home")) !== null)
|
|
318
|
+
args.home = v;
|
|
319
|
+
else if ((v = value("--project")) !== null)
|
|
320
|
+
args.project = v;
|
|
321
|
+
else if ((v = value("--expected-version")) !== null)
|
|
322
|
+
args.expectedVersion = v;
|
|
323
|
+
else if ((v = value("--channel")) !== null)
|
|
324
|
+
args.channel = v;
|
|
325
|
+
else if ((v = value("--target-major")) !== null) {
|
|
326
|
+
return rejectUnsupportedUpgradeFlag(io, args.format ?? "text", "--target-major was removed; use --channel with dry-run preview then --yes", fullEntityUpgradeCommand(migrationProject(argv)));
|
|
327
|
+
}
|
|
328
|
+
else if ((v = value("--runtime")) !== null) {
|
|
329
|
+
return emitInvalidInput(io, {
|
|
330
|
+
format: detectTopLevelFormat(argv),
|
|
331
|
+
body: {
|
|
332
|
+
class: "invalid_choice",
|
|
333
|
+
message: `argument --runtime ${v} is retired; Agentera now uses the shared skill at ` +
|
|
334
|
+
"~/.agents/skills/agentera plus the CLI. Remove --runtime and rerun the app/project upgrade. " +
|
|
335
|
+
"For explicit Agentera-owned native resource cleanup, use --legacy-cleanup RESOURCE_ID.",
|
|
336
|
+
},
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
else if ((v = value("--legacy-cleanup")) !== null) {
|
|
340
|
+
const validValues = nativeResourceCleanupIds();
|
|
341
|
+
if (!validValues.includes(v)) {
|
|
342
|
+
return emitInvalidInput(io, {
|
|
343
|
+
format: asEnvelopeFormat(args.format),
|
|
344
|
+
body: {
|
|
345
|
+
class: "invalid_choice",
|
|
346
|
+
message: `argument --legacy-cleanup: invalid choice: '${v}' (choose from ${validValues.map((id) => `'${id}'`).join(", ")})`,
|
|
347
|
+
valid_values: validValues,
|
|
348
|
+
},
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
args.legacyCleanup = v;
|
|
352
|
+
}
|
|
353
|
+
else if ((v = value("--only")) !== null) {
|
|
354
|
+
if (v !== "artifacts" && v !== "runtime" && v !== "cleanup") {
|
|
355
|
+
return emitInvalidInput(io, {
|
|
356
|
+
format: asEnvelopeFormat(args.format),
|
|
357
|
+
body: {
|
|
358
|
+
class: "invalid_choice",
|
|
359
|
+
message: `argument --only: invalid choice: '${v}' (choose from 'artifacts', 'runtime', 'cleanup')`,
|
|
360
|
+
valid_values: ["artifacts", "runtime", "cleanup"],
|
|
361
|
+
},
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
args.only.push(v);
|
|
365
|
+
}
|
|
366
|
+
else if ((v = value("--opencode-config-dir")) !== null) {
|
|
367
|
+
return rejectUnsupportedUpgradeFlag(io, args.format ?? "text", "--opencode-config-dir is not yet supported by the TypeScript upgrade command");
|
|
368
|
+
}
|
|
369
|
+
else if (a === "--yes")
|
|
370
|
+
args.yes = true;
|
|
371
|
+
else if (a === "--dry-run")
|
|
372
|
+
args.dryRun = true;
|
|
373
|
+
else if (a === "--force")
|
|
374
|
+
args.force = true;
|
|
375
|
+
else if (a === "--verify")
|
|
376
|
+
args.verify = true;
|
|
377
|
+
else if (a === "--update-packages") {
|
|
378
|
+
return rejectUnsupportedUpgradeFlag(io, args.format ?? "text", "--update-packages is retired; Agentera does not manage host package installation or updates");
|
|
379
|
+
}
|
|
380
|
+
else if (["--restore", "--rollback", "--downgrade"].includes(a)) {
|
|
381
|
+
return rejectUnsupportedUpgradeFlag(io, args.format ?? "text", `${a} was removed; v2-to-v3 upgrade is one-way and apply must run as one full upgrade --yes`, fullEntityUpgradeCommand(migrationProject(argv)));
|
|
382
|
+
}
|
|
383
|
+
else if (a === "--json")
|
|
384
|
+
jsonFlag = true;
|
|
385
|
+
else if ((v = value("--format")) !== null) {
|
|
386
|
+
if (v !== "text" && v !== "json") {
|
|
387
|
+
return emitInvalidInput(io, {
|
|
388
|
+
format: asEnvelopeFormat(args.format),
|
|
389
|
+
body: {
|
|
390
|
+
class: "invalid_choice",
|
|
391
|
+
message: `argument --format: invalid choice: '${v}' (choose from 'text', 'json')`,
|
|
392
|
+
valid_values: ["text", "json"],
|
|
393
|
+
},
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
args.format = v;
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
return emitInvalidInput(io, {
|
|
400
|
+
format: asEnvelopeFormat(args.format),
|
|
401
|
+
body: { class: "unrecognized_argument", message: `unrecognized arguments: ${a}` },
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
if (jsonFlag)
|
|
406
|
+
args.format = "json";
|
|
407
|
+
try {
|
|
408
|
+
return cmdUpgrade(args, io);
|
|
409
|
+
}
|
|
410
|
+
catch (exc) {
|
|
411
|
+
return emitInvalidInput(io, {
|
|
412
|
+
format: asEnvelopeFormat(args.format),
|
|
413
|
+
body: { class: "unsupported_target", message: exc.message },
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
export function runVerify(argv, io, prog) {
|
|
418
|
+
const args = {
|
|
419
|
+
family: null,
|
|
420
|
+
target: null,
|
|
421
|
+
format: "text",
|
|
422
|
+
run: false,
|
|
423
|
+
dryRun: false,
|
|
424
|
+
skill: null,
|
|
425
|
+
timeout: 120,
|
|
426
|
+
parallel: 1,
|
|
427
|
+
runtime: "auto",
|
|
428
|
+
fixtures: [],
|
|
429
|
+
};
|
|
430
|
+
const positionals = [];
|
|
431
|
+
let i = 0;
|
|
432
|
+
const value = makeArgvValueReader(argv, () => i, (n) => {
|
|
433
|
+
i = n;
|
|
434
|
+
});
|
|
435
|
+
for (; i < argv.length; i++) {
|
|
436
|
+
const a = argv[i];
|
|
437
|
+
let v;
|
|
438
|
+
if ((v = value("--format")) !== null) {
|
|
439
|
+
if (v !== "text" && v !== "json") {
|
|
440
|
+
return emitInvalidInput(io, {
|
|
441
|
+
format: asEnvelopeFormat(args.format),
|
|
442
|
+
body: {
|
|
443
|
+
class: "invalid_choice",
|
|
444
|
+
message: `argument --format: invalid choice: '${v}' (choose from 'text', 'json')`,
|
|
445
|
+
valid_values: ["text", "json"],
|
|
446
|
+
},
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
args.format = v;
|
|
450
|
+
}
|
|
451
|
+
else if ((v = value("--skill")) !== null)
|
|
452
|
+
args.skill = v;
|
|
453
|
+
else if ((v = value("--runtime")) !== null)
|
|
454
|
+
args.runtime = v;
|
|
455
|
+
else if ((v = value("--timeout")) !== null)
|
|
456
|
+
args.timeout = Number(v);
|
|
457
|
+
else if ((v = value("--parallel")) !== null)
|
|
458
|
+
args.parallel = Number(v);
|
|
459
|
+
else if (a === "--run")
|
|
460
|
+
args.run = true;
|
|
461
|
+
else if (a === "--dry-run")
|
|
462
|
+
args.dryRun = true;
|
|
463
|
+
else if (a.startsWith("--")) {
|
|
464
|
+
return emitInvalidInput(io, {
|
|
465
|
+
format: detectTopLevelFormat(argv),
|
|
466
|
+
body: { class: "unrecognized_argument", message: `unrecognized arguments: ${a}` },
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
positionals.push(a);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
args.family = positionals[0] ?? null;
|
|
474
|
+
args.target = positionals[1] ?? null;
|
|
475
|
+
args.fixtures = positionals.slice(2);
|
|
476
|
+
try {
|
|
477
|
+
return cmdVerify(args, io);
|
|
478
|
+
}
|
|
479
|
+
catch (exc) {
|
|
480
|
+
return emitInvalidInput(io, {
|
|
481
|
+
format: asEnvelopeFormat(args.format),
|
|
482
|
+
body: { class: "unsupported_target", message: exc.message },
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
export function runReport(argv, io, prog) {
|
|
487
|
+
const args = {
|
|
488
|
+
action: null,
|
|
489
|
+
format: "text",
|
|
490
|
+
project: null,
|
|
491
|
+
sources: "active",
|
|
492
|
+
dryRun: false,
|
|
493
|
+
consent: null,
|
|
494
|
+
projectRoot: [],
|
|
495
|
+
importSources: [],
|
|
496
|
+
};
|
|
497
|
+
const positionals = [];
|
|
498
|
+
let i = 0;
|
|
499
|
+
const value = makeArgvValueReader(argv, () => i, (n) => {
|
|
500
|
+
i = n;
|
|
501
|
+
});
|
|
502
|
+
for (; i < argv.length; i++) {
|
|
503
|
+
const a = argv[i];
|
|
504
|
+
let v;
|
|
505
|
+
if ((v = value("--format")) !== null)
|
|
506
|
+
args.format = v;
|
|
507
|
+
else if ((v = value("--project")) !== null)
|
|
508
|
+
args.project = v;
|
|
509
|
+
else if ((v = value("--sources")) !== null) {
|
|
510
|
+
if (v !== "active" && v !== "all") {
|
|
511
|
+
return emitInvalidInput(io, {
|
|
512
|
+
format: asEnvelopeFormat(args.format),
|
|
513
|
+
body: { class: "invalid_choice", message: `argument --sources: invalid choice: '${v}' (choose from 'active', 'all')`, valid_values: ["active", "all"] },
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
args.sources = v;
|
|
517
|
+
}
|
|
518
|
+
else if ((v = value("--consent")) !== null) {
|
|
519
|
+
if (v !== "local-history") {
|
|
520
|
+
return emitInvalidInput(io, {
|
|
521
|
+
format: asEnvelopeFormat(args.format),
|
|
522
|
+
body: {
|
|
523
|
+
class: "invalid_choice",
|
|
524
|
+
message: `argument --consent: invalid choice: '${v}' (choose from 'local-history')`,
|
|
525
|
+
valid_values: ["local-history"],
|
|
526
|
+
},
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
args.consent = v;
|
|
530
|
+
}
|
|
531
|
+
else if ((v = value("--project-root")) !== null)
|
|
532
|
+
args.projectRoot.push(v);
|
|
533
|
+
else if ((v = value("--output")) !== null)
|
|
534
|
+
args.output = v;
|
|
535
|
+
else if ((v = value("--codex-sessions-dir")) !== null)
|
|
536
|
+
args.codexSessionsDir = v;
|
|
537
|
+
else if ((v = value("--claude-projects-dir")) !== null)
|
|
538
|
+
args.claudeProjectsDir = v;
|
|
539
|
+
else if ((v = value("--import-source")) !== null) {
|
|
540
|
+
if (v !== "claude") {
|
|
541
|
+
return emitInvalidInput(io, {
|
|
542
|
+
format: asEnvelopeFormat(args.format),
|
|
543
|
+
body: {
|
|
544
|
+
class: "invalid_choice",
|
|
545
|
+
message: `argument --import-source: invalid choice: '${v}' (choose from 'claude')`,
|
|
546
|
+
valid_values: ["claude"],
|
|
547
|
+
},
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
if (!args.importSources.includes(v))
|
|
551
|
+
args.importSources.push(v);
|
|
552
|
+
}
|
|
553
|
+
else if ((v = value("--opencode-conversations-dir")) !== null)
|
|
554
|
+
args.opencodeConversationsDir = v;
|
|
555
|
+
else if ((v = value("--copilot-conversations-dir")) !== null)
|
|
556
|
+
args.copilotConversationsDir = v;
|
|
557
|
+
else if ((v = value("--cursor-projects-dir")) !== null)
|
|
558
|
+
args.cursorProjectsDir = v;
|
|
559
|
+
else if ((v = value("--cursor-chats-dir")) !== null)
|
|
560
|
+
args.cursorChatsDir = v;
|
|
561
|
+
else if (a === "--no-codex")
|
|
562
|
+
args.noCodex = true;
|
|
563
|
+
else if (a === "--no-opencode")
|
|
564
|
+
args.noOpencode = true;
|
|
565
|
+
else if (a === "--no-copilot")
|
|
566
|
+
args.noCopilot = true;
|
|
567
|
+
else if (a === "--no-cursor")
|
|
568
|
+
args.noCursor = true;
|
|
569
|
+
else if (a === "--accept-coverage-gap")
|
|
570
|
+
args.acceptCoverageGap = true;
|
|
571
|
+
else if (a === "--coverage-audit-only")
|
|
572
|
+
args.coverageAuditOnly = true;
|
|
573
|
+
else if (a === "--dry-run")
|
|
574
|
+
args.dryRun = true;
|
|
575
|
+
else if (a.startsWith("--")) {
|
|
576
|
+
return emitInvalidInput(io, {
|
|
577
|
+
format: detectTopLevelFormat(argv),
|
|
578
|
+
body: { class: "unrecognized_argument", message: `unrecognized arguments: ${a}` },
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
else {
|
|
582
|
+
positionals.push(a);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
args.action = positionals[0] ?? null;
|
|
586
|
+
try {
|
|
587
|
+
return cmdReport(args, io);
|
|
588
|
+
}
|
|
589
|
+
catch (exc) {
|
|
590
|
+
return emitInvalidInput(io, {
|
|
591
|
+
format: asEnvelopeFormat(args.format),
|
|
592
|
+
body: { class: "unsupported_target", message: exc.message },
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
function resolveCliVersion() {
|
|
597
|
+
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
598
|
+
const candidates = [
|
|
599
|
+
path.resolve(moduleDir, "..", "..", "package.json"),
|
|
600
|
+
path.resolve(moduleDir, "..", "..", "..", "package.json"),
|
|
601
|
+
];
|
|
602
|
+
for (const pkgPath of candidates) {
|
|
603
|
+
try {
|
|
604
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
|
605
|
+
if (typeof pkg.version === "string" && pkg.version) {
|
|
606
|
+
return pkg.version;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
catch {
|
|
610
|
+
continue;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
return "unknown";
|
|
614
|
+
}
|
|
615
|
+
export function runVersion(argv, io) {
|
|
616
|
+
const out = io.out ?? ((t) => process.stdout.write(t));
|
|
617
|
+
const err = io.err ?? ((t) => process.stderr.write(t));
|
|
618
|
+
let format = "text";
|
|
619
|
+
for (let i = 0; i < argv.length; i++) {
|
|
620
|
+
const a = argv[i];
|
|
621
|
+
if (a === "--format") {
|
|
622
|
+
const v = argv[++i];
|
|
623
|
+
if (v !== "text" && v !== "json") {
|
|
624
|
+
return emitInvalidInput(io, {
|
|
625
|
+
format: "text",
|
|
626
|
+
body: {
|
|
627
|
+
class: "invalid_choice",
|
|
628
|
+
message: `argument --format: invalid choice: '${v}' (choose from 'text', 'json')`,
|
|
629
|
+
valid_values: ["text", "json"],
|
|
630
|
+
},
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
format = v;
|
|
634
|
+
}
|
|
635
|
+
else if (a === "--help" || a === "-h") {
|
|
636
|
+
out("usage: agentera --version [--format {text,json}]\n\nPrint the installed Agentera CLI version.\n");
|
|
637
|
+
return 0;
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
err(`agentera --version: unrecognized argument: ${a}\n`);
|
|
641
|
+
return 2;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
const version = resolveCliVersion();
|
|
645
|
+
if (format === "json") {
|
|
646
|
+
out(JSON.stringify({ version }) + "\n");
|
|
647
|
+
}
|
|
648
|
+
else {
|
|
649
|
+
out(version + "\n");
|
|
650
|
+
}
|
|
651
|
+
return 0;
|
|
652
|
+
}
|
|
653
|
+
//# sourceMappingURL=lifecycle.js.map
|