agentera 3.0.0-dev.4 → 3.0.0-dev.41
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 +79 -22
- package/bundle/.agentera-npx-bundle.json +1 -1
- package/bundle/CHANGELOG.md +1261 -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-publication.json +43 -0
- package/bundle/references/adapters/package-registry.yaml +20 -188
- package/bundle/references/adapters/package-surface-characterization.md +59 -48
- 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 +518 -0
- package/bundle/references/analysis/startup-measurement-contract.yaml +37 -26
- package/bundle/references/analysis/verification-policy.yaml +143 -0
- package/bundle/references/artifacts/artifact-registry-interface-model.yaml +20 -10
- package/bundle/references/artifacts/glossary-entry-contract.yaml +1254 -0
- package/bundle/references/artifacts/state-storage-authority.yaml +2930 -0
- package/bundle/references/artifacts/verbosity-budget-authority.yaml +42 -0
- package/bundle/references/cli/agent-ready-state-contract.yaml +133 -71
- package/bundle/references/cli/app-lifecycle-vocabulary.yaml +7 -8
- package/bundle/references/cli/audience-namespace-cli-migration.yaml +73 -33
- 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 +701 -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 +35 -2
- 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 +341 -328
- package/bundle/references/meta/documentation-inventory.md +10 -3
- package/bundle/registry.json +14 -14
- package/bundle/skills/agentera/SKILL.md +202 -408
- 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 +37 -18
- package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +102 -0
- package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/exit.yaml +6 -5
- package/bundle/skills/agentera/capabilities/build/schemas/triggers.yaml +27 -0
- package/bundle/skills/agentera/capabilities/build/schemas/validation.yaml +176 -0
- 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 +51 -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/discuss/schemas/validation.yaml +144 -0
- 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 +66 -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 +121 -0
- package/bundle/skills/agentera/capabilities/profile/schemas/artifacts.yaml +23 -0
- package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/exit.yaml +6 -5
- package/bundle/skills/agentera/capabilities/profile/schemas/triggers.yaml +20 -0
- package/bundle/skills/agentera/capabilities/profile/schemas/validation.yaml +115 -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 +73 -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/glossary.yaml +82 -0
- 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 +419 -33
- package/bundle/skills/agentera/schemas/artifacts/progress.yaml +143 -53
- package/bundle/skills/agentera/schemas/artifacts/todo.yaml +343 -31
- 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 +604 -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/glossaryAdviceResolution.js +167 -0
- package/dist/analytics/glossaryAdviceResolution.js.map +1 -0
- package/dist/analytics/glossaryInputAcquisition.js +320 -0
- package/dist/analytics/glossaryInputAcquisition.js.map +1 -0
- package/dist/analytics/personalGlossaryAdmission.js +134 -0
- package/dist/analytics/personalGlossaryAdmission.js.map +1 -0
- package/dist/analytics/personalGlossaryProfile.js +220 -0
- package/dist/analytics/personalGlossaryProfile.js.map +1 -0
- package/dist/analytics/profileSignals.js +212 -0
- package/dist/analytics/profileSignals.js.map +1 -0
- package/dist/analytics/usageStats.js +169 -41
- package/dist/analytics/usageStats.js.map +1 -1
- package/dist/audit/terminologyDrift.js +282 -0
- package/dist/audit/terminologyDrift.js.map +1 -0
- package/dist/bin/agentera.js +3 -1
- package/dist/bin/agentera.js.map +1 -1
- package/dist/capabilities/audit/instructions.js +17 -0
- package/dist/capabilities/audit/instructions.js.map +1 -0
- package/dist/capabilities/build/instructions.js +57 -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 +30 -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 +15 -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 +33 -0
- package/dist/capabilities/plan/instructions.js.map +1 -0
- package/dist/capabilities/profile/instructions.js +71 -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 +12 -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 +565 -0
- package/dist/cli/capabilityContext/benchmark.js.map +1 -0
- package/dist/cli/capabilityContext/bespoke.js +45 -0
- package/dist/cli/capabilityContext/bespoke.js.map +1 -0
- package/dist/cli/capabilityContext/build.js +244 -0
- package/dist/cli/capabilityContext/build.js.map +1 -0
- package/dist/cli/capabilityContext/closeout.js +235 -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 +465 -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 +133 -0
- package/dist/cli/capabilityContext/orchestration.js.map +1 -0
- package/dist/cli/capabilityContext/planState.js +261 -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/projectVerification.js +410 -0
- package/dist/cli/capabilityContext/projectVerification.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 +278 -0
- package/dist/cli/capabilityContext/startup.js.map +1 -0
- package/dist/cli/capabilityContext/types.js +56 -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 +34 -99
- 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/glossaryAdvice.js +139 -0
- package/dist/cli/commands/glossaryAdvice.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/personalGlossary.js +177 -0
- package/dist/cli/commands/personalGlossary.js.map +1 -0
- package/dist/cli/commands/prime/briefOrientation.js +808 -0
- package/dist/cli/commands/prime/briefOrientation.js.map +1 -0
- package/dist/cli/commands/prime/buildExecutionRequest.js +165 -0
- package/dist/cli/commands/prime/buildExecutionRequest.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 +291 -0
- package/dist/cli/commands/prime/collectEntityOrientation.js.map +1 -0
- package/dist/cli/commands/prime/collectOrientationState.js +178 -0
- package/dist/cli/commands/prime/collectOrientationState.js.map +1 -0
- package/dist/cli/commands/prime/orientationOutput.js +377 -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 +96 -556
- package/dist/cli/commands/prime.js.map +1 -1
- package/dist/cli/commands/profileGrounding.js +56 -0
- package/dist/cli/commands/profileGrounding.js.map +1 -0
- package/dist/cli/commands/query.js +77 -52
- package/dist/cli/commands/query.js.map +1 -1
- package/dist/cli/commands/report.js +96 -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 +258 -105
- 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 +152 -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 +130 -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 +17 -0
- package/dist/cli/commands/state/index.js.map +1 -0
- package/dist/cli/commands/state/list.js +195 -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 +155 -0
- package/dist/cli/commands/state/planTasks.js.map +1 -0
- package/dist/cli/commands/state/plans.js +155 -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 +43 -0
- package/dist/cli/commands/state/todo.js.map +1 -0
- package/dist/cli/commands/state/write.js +425 -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 +173 -210
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/commands/verify.js +24 -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 +234 -0
- package/dist/cli/dispatch/index.js.map +1 -0
- package/dist/cli/dispatch/lifecycle.js +698 -0
- package/dist/cli/dispatch/lifecycle.js.map +1 -0
- package/dist/cli/dispatch/prime.js +140 -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 +141 -0
- package/dist/cli/dispatch/state.js.map +1 -0
- package/dist/cli/dispatch.js +1 -995
- 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 +356 -30
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/migrationRequired.js +89 -0
- package/dist/cli/migrationRequired.js.map +1 -0
- package/dist/cli/orientation/attention.js +72 -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 +443 -172
- 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 +36 -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 +70 -2
- package/dist/cli/prime-blob.js.map +1 -1
- package/dist/cli/profileAcquisition.js +168 -0
- package/dist/cli/profileAcquisition.js.map +1 -0
- package/dist/cli/startupCompletenessContract.js +60 -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 +47 -0
- package/dist/cli/todoMarkdown.js.map +1 -0
- package/dist/cli/todoReadinessSelection.js +192 -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/shell.js +5 -0
- package/dist/core/shell.js.map +1 -0
- 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 +547 -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 +79 -0
- package/dist/registries/artifactProtocolIds.js.map +1 -0
- package/dist/registries/artifactRegistry.js +224 -62
- package/dist/registries/artifactRegistry.js.map +1 -1
- package/dist/registries/artifactSchemaProjection.js +46 -0
- package/dist/registries/artifactSchemaProjection.js.map +1 -0
- 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 +372 -0
- package/dist/registries/evidenceTierContract.js.map +1 -0
- package/dist/registries/glossaryAdviceContract.js +79 -0
- package/dist/registries/glossaryAdviceContract.js.map +1 -0
- package/dist/registries/glossaryCaveatContract.js +68 -0
- package/dist/registries/glossaryCaveatContract.js.map +1 -0
- package/dist/registries/glossaryConsumerContractValidation.js +788 -0
- package/dist/registries/glossaryConsumerContractValidation.js.map +1 -0
- package/dist/registries/glossaryEntryContract.js +757 -0
- package/dist/registries/glossaryEntryContract.js.map +1 -0
- package/dist/registries/glossaryTermIdentity.js +18 -0
- package/dist/registries/glossaryTermIdentity.js.map +1 -0
- package/dist/registries/glossaryTermOccurrence.js +21 -0
- package/dist/registries/glossaryTermOccurrence.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 +449 -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 +24 -53
- package/dist/setup/smokeChecks.js.map +1 -1
- package/dist/state/archiveDiscovery.js +581 -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/changelog.js +222 -0
- package/dist/state/changelog.js.map +1 -0
- package/dist/state/decisionEntities.js +368 -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 +200 -0
- package/dist/state/decisionMigrationProvenance.js.map +1 -0
- package/dist/state/decisionOverlay.js +255 -0
- package/dist/state/decisionOverlay.js.map +1 -0
- package/dist/state/decisionRevision.js +257 -0
- package/dist/state/decisionRevision.js.map +1 -0
- package/dist/state/decisionRevisionMigration.js +90 -0
- package/dist/state/decisionRevisionMigration.js.map +1 -0
- package/dist/state/directRetrieval.js +324 -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/entityGlossaryAuthority.js +14 -0
- package/dist/state/entityGlossaryAuthority.js.map +1 -0
- package/dist/state/entityListProjection.js +188 -0
- package/dist/state/entityListProjection.js.map +1 -0
- package/dist/state/entityListRuntimeRegistry.js +50 -0
- package/dist/state/entityListRuntimeRegistry.js.map +1 -0
- package/dist/state/entityMigrationCausality.js +99 -0
- package/dist/state/entityMigrationCausality.js.map +1 -0
- package/dist/state/entityMigrationIdentity.js +6 -0
- package/dist/state/entityMigrationIdentity.js.map +1 -0
- package/dist/state/entityMigrationPreview.js +884 -0
- package/dist/state/entityMigrationPreview.js.map +1 -0
- package/dist/state/entityPublicationContext.js +807 -0
- package/dist/state/entityPublicationContext.js.map +1 -0
- package/dist/state/entityRetrievalHelp.js +476 -0
- package/dist/state/entityRetrievalHelp.js.map +1 -0
- package/dist/state/entityStorage.js +897 -0
- package/dist/state/entityStorage.js.map +1 -0
- package/dist/state/exactReplacementRecovery.js +19 -0
- package/dist/state/exactReplacementRecovery.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/healthEntities.js +263 -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 +782 -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 +531 -0
- package/dist/state/planEntities.js.map +1 -0
- package/dist/state/planIdentity.js +48 -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 +295 -0
- package/dist/state/planTaskRetrieval.js.map +1 -0
- package/dist/state/progressEntities.js +513 -0
- package/dist/state/progressEntities.js.map +1 -0
- package/dist/state/progressGlossaryCaveat.js +169 -0
- package/dist/state/progressGlossaryCaveat.js.map +1 -0
- package/dist/state/progressPublicationOrder.js +20 -0
- package/dist/state/progressPublicationOrder.js.map +1 -0
- package/dist/state/projectRoot.js +63 -0
- package/dist/state/projectRoot.js.map +1 -0
- package/dist/state/projectionPolicy.js +191 -0
- package/dist/state/projectionPolicy.js.map +1 -0
- package/dist/state/retrievalAuthority.js +157 -0
- package/dist/state/retrievalAuthority.js.map +1 -0
- package/dist/state/safeProjectFile.js +156 -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 +499 -0
- package/dist/state/startupProjection.js.map +1 -0
- package/dist/state/stateMode.js +86 -0
- package/dist/state/stateMode.js.map +1 -0
- package/dist/state/stateStorageAuthority.js +48 -0
- package/dist/state/stateStorageAuthority.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 +986 -0
- package/dist/state/todoDocsEntities.js.map +1 -0
- package/dist/state/todoDocsEntityValidation.js +159 -0
- package/dist/state/todoDocsEntityValidation.js.map +1 -0
- package/dist/state/todoReconciliationActivation.js +63 -0
- package/dist/state/todoReconciliationActivation.js.map +1 -0
- package/dist/state/todoReconciliationTransaction.js +554 -0
- package/dist/state/todoReconciliationTransaction.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 +270 -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 +333 -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/glossaryPublication.js +264 -0
- package/dist/state/write/glossaryPublication.js.map +1 -0
- package/dist/state/write/grammar.js +271 -0
- package/dist/state/write/grammar.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 +13 -0
- package/dist/state/write/index.js.map +1 -0
- package/dist/state/write/input.js +368 -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 +170 -0
- package/dist/state/write/operations.js.map +1 -0
- package/dist/state/write/planEvaluation.js +129 -0
- package/dist/state/write/planEvaluation.js.map +1 -0
- package/dist/state/write/planPublication.js +180 -0
- package/dist/state/write/planPublication.js.map +1 -0
- package/dist/state/write/runtimeOperations.js +65 -0
- package/dist/state/write/runtimeOperations.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 +53 -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 +12 -7
- 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 +217 -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 +15 -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/v1LegacyCruft.js +141 -0
- package/dist/validate/v1LegacyCruft.js.map +1 -0
- package/dist/validate/vocabularyAuthority.js +305 -0
- package/dist/validate/vocabularyAuthority.js.map +1 -0
- package/package.json +46 -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/artifacts.yaml +0 -18
- 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/realisera/schemas/validation.yaml +0 -110
- 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/resonera/schemas/validation.yaml +0 -77
- 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 -1297
- 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
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
4
5
|
import { isFile, pathExists, resolvePath } from "../core/paths.js";
|
|
5
6
|
import { resolveSourceRoot } from "../core/sourceRoot.js";
|
|
6
|
-
import { loadRegistry } from "../registries/runtimeAdapterRegistry.js";
|
|
7
7
|
import { codexCopiedHooksAreAgenteraOnly, codexPluginHooksEnabled, retireCodexCopiedHookTrust, } from "../setup/codex.js";
|
|
8
|
-
import { hasManagedMarker,
|
|
9
|
-
import {
|
|
8
|
+
import { hasManagedMarker, opencodeConfigDir, } from "../setup/opencode.js";
|
|
9
|
+
import { OPENCODE_SKILL_NAMES } from "../setup/opencodeConstants.js";
|
|
10
|
+
import { resolveInvokedUpdateChannel } from "./channels.js";
|
|
11
|
+
import { doctorRoots } from "./appModel.js";
|
|
12
|
+
import { bindMigrationResource, removeBoundMigrationResource, updateBoundMigrationFile, verifyBoundMigrationResource, } from "./migrationPublication.js";
|
|
10
13
|
const PYTHON_MANAGED_PATTERNS = [
|
|
11
14
|
/hooks\/validate_artifact\.py/,
|
|
15
|
+
/hooks\/cursor_session_start\.py/,
|
|
16
|
+
/hooks\/cursor_pre_tool_use\.py/,
|
|
17
|
+
/hooks\/cursor_session_stop\.py/,
|
|
18
|
+
/hooks\/session_start\.py/,
|
|
19
|
+
/hooks\/session_stop\.py/,
|
|
12
20
|
/\buv run\b/,
|
|
13
21
|
/\buvx\b/,
|
|
14
22
|
/scripts\/agentera/,
|
|
@@ -17,14 +25,6 @@ const PYTHON_MANAGED_PATTERNS = [
|
|
|
17
25
|
/cursor_pre_tool_use\.py/,
|
|
18
26
|
/cursor_session_stop\.py/,
|
|
19
27
|
];
|
|
20
|
-
const RUNTIME_MIGRATION_ACTIONS = new Set([
|
|
21
|
-
"rewire-runtime",
|
|
22
|
-
"retire-hooks",
|
|
23
|
-
"copy-plugin",
|
|
24
|
-
"copy-agent",
|
|
25
|
-
"copy-command",
|
|
26
|
-
"link-skill",
|
|
27
|
-
]);
|
|
28
28
|
export function projectHasProjectLevelRuntimeHooks(project) {
|
|
29
29
|
const root = resolvePath(project);
|
|
30
30
|
const candidates = [
|
|
@@ -36,13 +36,11 @@ export function projectHasProjectLevelRuntimeHooks(project) {
|
|
|
36
36
|
return candidates.some((candidate) => isFile(candidate) || pathExists(candidate));
|
|
37
37
|
}
|
|
38
38
|
const OPENCODE_COMMAND_NAMES = ["agentera"];
|
|
39
|
-
|
|
40
|
-
const CURSOR_AGENT_MARKER = "<!-- agentera: managed -->";
|
|
41
|
-
export function resolveNpxHookCommands(ctx) {
|
|
39
|
+
export function resolveNpxHookCommands(ctx, resolvedChannel) {
|
|
42
40
|
const env = ctx.env ?? process.env;
|
|
43
41
|
const home = ctx.home ?? env.HOME ?? os.homedir();
|
|
44
42
|
const sourceRoot = ctx.sourceRoot ?? resolveSourceRoot(env);
|
|
45
|
-
const channel =
|
|
43
|
+
const channel = resolvedChannel ?? resolveInvokedUpdateChannel({
|
|
46
44
|
channel: ctx.channel ?? null,
|
|
47
45
|
env,
|
|
48
46
|
home,
|
|
@@ -63,18 +61,18 @@ export function textUsesPythonManagedEntrypoint(text) {
|
|
|
63
61
|
}
|
|
64
62
|
return PYTHON_MANAGED_PATTERNS.some((pattern) => pattern.test(text));
|
|
65
63
|
}
|
|
64
|
+
const V3_NPX_ENTRYPOINT = /\bnpx\s+-y\s+agentera\b/;
|
|
65
|
+
export function textUsesV3NpmEntrypoint(text) {
|
|
66
|
+
return V3_NPX_ENTRYPOINT.test(text);
|
|
67
|
+
}
|
|
66
68
|
export function rewireRuntimeText(text, runtime, commands) {
|
|
67
69
|
let next = text;
|
|
68
70
|
next = next.replace(/uv run\s+\\?"?\$\{AGENTERA_HOME\}\/hooks\/validate_artifact\.py\\?"?/g, commands.validate);
|
|
71
|
+
next = next.replace(/uv run\s+\\?"?\$\{AGENTERA_HOME\}\/app\/hooks\/validate_artifact\.py\\?"?/g, commands.validate);
|
|
69
72
|
next = next.replace(/uv run\s+\\?"?\$\{PLUGIN_ROOT\}\/hooks\/validate_artifact\.py\\?"?/g, commands.validate);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
next = next.replace(/["']?[^"'\n]*cursor_session_start\.py[^"'\n]*["']?/g, `"${commands.cursorSessionStart}"`);
|
|
74
|
-
next = next.replace(/["']?[^"'\n]*cursor_pre_tool_use\.py[^"'\n]*["']?/g, `"${commands.cursorPreTool}"`);
|
|
75
|
-
next = next.replace(/["']?[^"'\n]*cursor_session_stop\.py[^"'\n]*["']?/g, `"${commands.cursorSessionStop}"`);
|
|
76
|
-
next = next.replace(/["']?[^"'\n]*\/app\/scripts\/agentera[^"'\n]*["']?/g, `"${commands.cliEntrypoint}"`);
|
|
77
|
-
next = next.replace(/["']?[^"'\n]*scripts\/agentera[^"'\n]*["']?/g, `"${commands.cliEntrypoint}"`);
|
|
73
|
+
next = next.replace(/uv run\s+\\?"?\$\{AGENTERA_HOME\}\/(?:app\/scripts|(?:app\/)?hooks)\/cursor_session_start\.py\\?"?/g, `"${commands.cursorSessionStart}"`);
|
|
74
|
+
next = next.replace(/uv run\s+\\?"?\$\{AGENTERA_HOME\}\/(?:app\/)?hooks\/cursor_pre_tool_use\.py\\?"?/g, `"${commands.cursorPreTool}"`);
|
|
75
|
+
next = next.replace(/uv run\s+\\?"?\$\{AGENTERA_HOME\}\/(?:app\/)?hooks\/cursor_session_stop\.py\\?"?/g, `"${commands.cursorSessionStop}"`);
|
|
78
76
|
next = next.replace(/npx -y agentera hook /g, `${commands.cliEntrypoint} hook `);
|
|
79
77
|
next = next.replace(/npx -y agentera@latest hook /g, `${commands.cliEntrypoint} hook `);
|
|
80
78
|
if (runtime === "codex") {
|
|
@@ -96,11 +94,24 @@ function needsChannelNpxRewire(text, cliEntrypoint) {
|
|
|
96
94
|
}
|
|
97
95
|
return false;
|
|
98
96
|
}
|
|
99
|
-
function
|
|
97
|
+
function textHasAuthoritativeV2AgenteraEvidence(text) {
|
|
98
|
+
const variableReference = /\$\{AGENTERA_HOME\}\/(?:app\/scripts\/(?:agentera|cursor_session_start\.py)|(?:app\/)?hooks\/(?:validate_artifact|cursor_session_start|cursor_pre_tool_use|cursor_session_stop|session_start|session_stop)\.py)/;
|
|
99
|
+
if (variableReference.test(text))
|
|
100
|
+
return true;
|
|
101
|
+
if (/AGENTERA_HOME\s*=/.test(text))
|
|
102
|
+
return true;
|
|
103
|
+
if (/\[plugins\."agentera@agentera"\]/.test(text) && /AGENTERA_HOME\s*=/.test(text))
|
|
104
|
+
return true;
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
function pushRewireItem(items, runtime, filePath, commands, allowedRoot) {
|
|
100
108
|
const text = fs.readFileSync(filePath, "utf8");
|
|
101
109
|
const needsBare = needsChannelNpxRewire(text, commands.cliEntrypoint);
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
const authoritative = hasManagedMarker(text)
|
|
111
|
+
|| textHasAuthoritativeV2AgenteraEvidence(text)
|
|
112
|
+
|| needsBare;
|
|
113
|
+
if (!authoritative) {
|
|
114
|
+
if (textUsesV3NpmEntrypoint(text)) {
|
|
104
115
|
items.push({
|
|
105
116
|
status: "noop",
|
|
106
117
|
action: "rewire-runtime",
|
|
@@ -109,11 +120,13 @@ function pushRewireItem(items, runtime, filePath, commands) {
|
|
|
109
120
|
message: "runtime config already references npm self-contained entrypoint",
|
|
110
121
|
});
|
|
111
122
|
}
|
|
123
|
+
// If the file has no Agentera content at all (no v2 Python, no v3 npm),
|
|
124
|
+
// it is not Agentera-managed. Do not push a blocked item — just return.
|
|
112
125
|
return;
|
|
113
126
|
}
|
|
114
127
|
const newText = rewireRuntimeText(text, runtime, commands);
|
|
115
128
|
const status = newText === text ? "blocked" : "pending";
|
|
116
|
-
|
|
129
|
+
const item = {
|
|
117
130
|
status,
|
|
118
131
|
action: "rewire-runtime",
|
|
119
132
|
runtime,
|
|
@@ -123,247 +136,230 @@ function pushRewireItem(items, runtime, filePath, commands) {
|
|
|
123
136
|
message: status === "pending"
|
|
124
137
|
? "will rewire runtime config from Python managed app-home to npm self-contained entrypoint"
|
|
125
138
|
: "runtime config uses Python managed paths but could not be rewritten safely",
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
function copyIfChanged(source, target) {
|
|
132
|
-
if (!isFile(source)) {
|
|
133
|
-
return false;
|
|
134
|
-
}
|
|
135
|
-
if (isFile(target)) {
|
|
136
|
-
const before = fs.readFileSync(source);
|
|
137
|
-
const after = fs.readFileSync(target);
|
|
138
|
-
if (before.equals(after)) {
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
139
|
+
};
|
|
140
|
+
const evidenceError = bindMigrationResource(item, "target", filePath, [allowedRoot], "file");
|
|
141
|
+
if (evidenceError) {
|
|
142
|
+
item.status = "blocked";
|
|
143
|
+
item.message = `runtime config preserved: ${evidenceError}; review the unsafe path manually`;
|
|
141
144
|
}
|
|
142
|
-
|
|
143
|
-
fs.copyFileSync(source, target);
|
|
144
|
-
return true;
|
|
145
|
+
items.push(item);
|
|
145
146
|
}
|
|
146
|
-
function planCodexItems(items, home,
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
source
|
|
173
|
-
target
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
147
|
+
function planCodexItems(items, home, project, commands) {
|
|
148
|
+
for (const root of [project, home]) {
|
|
149
|
+
const hooksPath = path.join(root, ".codex", "hooks", "codex-hooks.json");
|
|
150
|
+
const configPath = path.join(root, ".codex", "config.toml");
|
|
151
|
+
if (isFile(configPath)) {
|
|
152
|
+
const configText = fs.readFileSync(configPath, "utf8");
|
|
153
|
+
const pluginHooks = codexPluginHooksEnabled(configText);
|
|
154
|
+
if (pluginHooks && isFile(hooksPath)) {
|
|
155
|
+
let hooksText;
|
|
156
|
+
try {
|
|
157
|
+
hooksText = fs.readFileSync(hooksPath, "utf8");
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
hooksText = "";
|
|
161
|
+
}
|
|
162
|
+
if (codexCopiedHooksAreAgenteraOnly(hooksText)) {
|
|
163
|
+
const rewiredConfig = rewireRuntimeText(configText, "codex", commands);
|
|
164
|
+
const item = {
|
|
165
|
+
status: "pending",
|
|
166
|
+
action: "retire-hooks",
|
|
167
|
+
runtime: "codex",
|
|
168
|
+
source: hooksPath,
|
|
169
|
+
target: configPath,
|
|
170
|
+
newText: retireCodexCopiedHookTrust(rewiredConfig, hooksPath),
|
|
171
|
+
message: "will remove Agentera-owned copied Codex hooks because plugin hooks are enabled",
|
|
172
|
+
};
|
|
173
|
+
const sourceError = bindMigrationResource(item, "source", hooksPath, [root], "file");
|
|
174
|
+
const targetError = bindMigrationResource(item, "target", configPath, [root], "file");
|
|
175
|
+
if (sourceError || targetError) {
|
|
176
|
+
item.status = "blocked";
|
|
177
|
+
item.message = `copied Codex hooks preserved: ${sourceError ?? targetError}; review the unsafe path manually`;
|
|
178
|
+
}
|
|
179
|
+
items.push(item);
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
else if (hooksText.includes("validate_artifact") || hooksText.includes("hook validate-artifact")) {
|
|
183
|
+
items.push({
|
|
184
|
+
status: "blocked",
|
|
185
|
+
action: "retire-hooks",
|
|
186
|
+
runtime: "codex",
|
|
187
|
+
source: hooksPath,
|
|
188
|
+
target: configPath,
|
|
189
|
+
message: "plugin hooks are enabled, but copied hook target needs manual review before retirement",
|
|
190
|
+
});
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
186
193
|
}
|
|
194
|
+
pushRewireItem(items, "codex", configPath, commands, root);
|
|
195
|
+
}
|
|
196
|
+
if (isFile(hooksPath)) {
|
|
197
|
+
pushRewireItem(items, "codex", hooksPath, commands, root);
|
|
187
198
|
}
|
|
188
199
|
}
|
|
189
200
|
}
|
|
190
|
-
function planCursorItems(items, home, project,
|
|
191
|
-
for (const hooksPath of [
|
|
192
|
-
path.join(project, ".cursor", "hooks.json"),
|
|
193
|
-
path.join(home, ".cursor", "hooks.json"),
|
|
201
|
+
function planCursorItems(items, home, project, commands) {
|
|
202
|
+
for (const [root, hooksPath] of [
|
|
203
|
+
[project, path.join(project, ".cursor", "hooks.json")],
|
|
204
|
+
[home, path.join(home, ".cursor", "hooks.json")],
|
|
194
205
|
]) {
|
|
195
206
|
if (isFile(hooksPath)) {
|
|
196
|
-
pushRewireItem(items, "cursor", hooksPath, commands);
|
|
207
|
+
pushRewireItem(items, "cursor", hooksPath, commands, root);
|
|
197
208
|
}
|
|
198
209
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
210
|
+
}
|
|
211
|
+
function planOpencodeItems(items, home, env, commands) {
|
|
212
|
+
const configDir = opencodeConfigDir(home, env);
|
|
213
|
+
const existingResources = [
|
|
214
|
+
path.join(configDir, "plugins", "agentera.js"),
|
|
215
|
+
...OPENCODE_COMMAND_NAMES.map((name) => path.join(configDir, "commands", `${name}.md`)),
|
|
216
|
+
path.join(configDir, "agents", "agentera.md"),
|
|
217
|
+
];
|
|
218
|
+
for (const resource of existingResources) {
|
|
219
|
+
if (isFile(resource))
|
|
220
|
+
pushRewireItem(items, "opencode", resource, commands, configDir);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
function symlinkOwnership(linkPath, managedSkillsRoot) {
|
|
224
|
+
let stat;
|
|
225
|
+
let target;
|
|
226
|
+
try {
|
|
227
|
+
stat = fs.lstatSync(linkPath);
|
|
228
|
+
if (!stat.isSymbolicLink())
|
|
229
|
+
return null;
|
|
230
|
+
target = fs.readlinkSync(linkPath);
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
const resolvedTarget = path.resolve(path.dirname(linkPath), target);
|
|
236
|
+
const relative = path.relative(managedSkillsRoot, resolvedTarget);
|
|
237
|
+
if (relative === "" || relative.startsWith("..") || path.isAbsolute(relative))
|
|
238
|
+
return null;
|
|
239
|
+
return {
|
|
240
|
+
kind: "managed-app-symlink",
|
|
241
|
+
identity: `${stat.dev}:${stat.ino}`,
|
|
242
|
+
fingerprint: `sha256:${createHash("sha256").update(target).digest("hex")}`,
|
|
243
|
+
root: managedSkillsRoot,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
export function planStaleCommandCleanupItems(ctx, items) {
|
|
247
|
+
const env = ctx.env ?? process.env;
|
|
248
|
+
const home = resolvePath(ctx.home);
|
|
249
|
+
const commandsDir = path.join(opencodeConfigDir(home, env), "commands");
|
|
250
|
+
if (!pathExists(commandsDir) || !fs.statSync(commandsDir).isDirectory()) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
const currentNames = new Set(OPENCODE_COMMAND_NAMES);
|
|
254
|
+
for (const entry of fs.readdirSync(commandsDir)) {
|
|
255
|
+
if (!entry.endsWith(".md")) {
|
|
256
|
+
continue;
|
|
225
257
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
source: src,
|
|
238
|
-
target: dst,
|
|
239
|
-
message: "will copy managed Cursor capability agent",
|
|
240
|
-
});
|
|
241
|
-
continue;
|
|
242
|
-
}
|
|
243
|
-
const dstText = fs.readFileSync(dst, "utf8");
|
|
244
|
-
const srcText = fs.readFileSync(src, "utf8");
|
|
245
|
-
if (hasCursorManagedAgentMarker(dstText) && dstText !== srcText) {
|
|
246
|
-
items.push({
|
|
247
|
-
status: "pending",
|
|
248
|
-
action: "copy-agent",
|
|
249
|
-
runtime: "cursor",
|
|
250
|
-
source: src,
|
|
251
|
-
target: dst,
|
|
252
|
-
message: "will refresh stale managed Cursor capability agent",
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
}
|
|
258
|
+
const filePath = path.join(commandsDir, entry);
|
|
259
|
+
if (!isFile(filePath)) {
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
const body = fs.readFileSync(filePath, "utf8");
|
|
263
|
+
if (!hasManagedMarker(body)) {
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
const name = entry.slice(0, -3);
|
|
267
|
+
if (currentNames.has(name)) {
|
|
268
|
+
continue;
|
|
256
269
|
}
|
|
270
|
+
const item = {
|
|
271
|
+
status: "pending",
|
|
272
|
+
action: "remove-stale-command",
|
|
273
|
+
runtime: "opencode",
|
|
274
|
+
source: filePath,
|
|
275
|
+
message: `will remove stale managed command ${path.basename(filePath)}`,
|
|
276
|
+
};
|
|
277
|
+
const evidenceError = bindMigrationResource(item, "source", filePath, [home], "file");
|
|
278
|
+
if (evidenceError) {
|
|
279
|
+
item.status = "blocked";
|
|
280
|
+
item.message = `stale command preserved: ${evidenceError}; review the unsafe path manually`;
|
|
281
|
+
}
|
|
282
|
+
items.push(item);
|
|
257
283
|
}
|
|
258
284
|
}
|
|
259
|
-
function
|
|
260
|
-
const
|
|
261
|
-
const
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
285
|
+
export function planStaleSkillCleanupItems(ctx, items) {
|
|
286
|
+
const env = ctx.env ?? process.env;
|
|
287
|
+
const home = resolvePath(ctx.home);
|
|
288
|
+
const skillsDir = path.join(opencodeConfigDir(home, env), "skills");
|
|
289
|
+
let skillsDirectory;
|
|
290
|
+
try {
|
|
291
|
+
skillsDirectory = fs.lstatSync(skillsDir);
|
|
292
|
+
}
|
|
293
|
+
catch {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
if (!skillsDirectory.isDirectory()) {
|
|
267
297
|
items.push({
|
|
268
|
-
status:
|
|
269
|
-
action: "
|
|
298
|
+
status: "blocked",
|
|
299
|
+
action: "remove-stale-skill",
|
|
270
300
|
runtime: "opencode",
|
|
271
|
-
source:
|
|
272
|
-
|
|
273
|
-
message: needsCopy
|
|
274
|
-
? "will copy current Agentera OpenCode plugin to native plugin path"
|
|
275
|
-
: "OpenCode plugin already current at native plugin path",
|
|
301
|
+
source: skillsDir,
|
|
302
|
+
message: `preserved ${skillsDir}: the legacy skills path is not a real directory; replace the unsafe path or review it manually`,
|
|
276
303
|
});
|
|
304
|
+
return;
|
|
277
305
|
}
|
|
278
|
-
const
|
|
279
|
-
const
|
|
280
|
-
for (const
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
message: needsCopy ? "will sync managed OpenCode command" : "OpenCode managed command already current",
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
const agentsSourceDir = path.join(sourceRoot, ".opencode", "agents");
|
|
297
|
-
const agentsTargetDir = path.join(configDir, "agents");
|
|
298
|
-
if (pathExists(agentsSourceDir)) {
|
|
299
|
-
for (const entry of fs.readdirSync(agentsSourceDir)) {
|
|
300
|
-
if (!entry.endsWith(".md"))
|
|
301
|
-
continue;
|
|
302
|
-
const src = path.join(agentsSourceDir, entry);
|
|
303
|
-
const dst = path.join(agentsTargetDir, entry);
|
|
304
|
-
const needsCopy = !isFile(dst) || !fs.readFileSync(src).equals(fs.readFileSync(dst));
|
|
305
|
-
items.push({
|
|
306
|
-
status: needsCopy ? "pending" : "noop",
|
|
307
|
-
action: "copy-agent",
|
|
308
|
-
runtime: "opencode",
|
|
309
|
-
source: src,
|
|
310
|
-
target: dst,
|
|
311
|
-
message: needsCopy ? "will copy managed OpenCode capability agent" : "OpenCode agent already current",
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
const skillsSourceRoot = path.join(sourceRoot, "skills");
|
|
316
|
-
const skillsTargetDir = path.join(configDir, "skills");
|
|
317
|
-
for (const name of OPENCODE_SKILL_NAMES) {
|
|
318
|
-
const src = path.join(skillsSourceRoot, name);
|
|
319
|
-
const dst = path.join(skillsTargetDir, name);
|
|
320
|
-
if (!isFile(path.join(src, "SKILL.md"))) {
|
|
306
|
+
const requiredNames = new Set(OPENCODE_SKILL_NAMES);
|
|
307
|
+
const managedSkillsRoot = path.join(doctorRoots(resolvePath(ctx.appHome)).activeBundleRoot, "skills");
|
|
308
|
+
for (const entry of fs.readdirSync(skillsDir, { withFileTypes: true })) {
|
|
309
|
+
const linkPath = path.join(skillsDir, entry.name);
|
|
310
|
+
if (!entry.isSymbolicLink()) {
|
|
311
|
+
if (requiredNames.has(entry.name)) {
|
|
312
|
+
items.push({
|
|
313
|
+
status: "blocked",
|
|
314
|
+
action: "remove-stale-skill",
|
|
315
|
+
runtime: "opencode",
|
|
316
|
+
source: linkPath,
|
|
317
|
+
message: `preserved ${linkPath}: name and directory shape do not prove Agentera ownership; review and remove it manually if appropriate`,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
321
320
|
continue;
|
|
322
321
|
}
|
|
323
|
-
|
|
322
|
+
let linkTarget;
|
|
323
|
+
try {
|
|
324
|
+
linkTarget = fs.readlinkSync(linkPath);
|
|
325
|
+
}
|
|
326
|
+
catch {
|
|
324
327
|
items.push({
|
|
325
|
-
status: "
|
|
326
|
-
action: "
|
|
328
|
+
status: "blocked",
|
|
329
|
+
action: "remove-stale-skill",
|
|
327
330
|
runtime: "opencode",
|
|
328
|
-
source:
|
|
329
|
-
|
|
330
|
-
message: "will create OpenCode skill link",
|
|
331
|
+
source: linkPath,
|
|
332
|
+
message: `preserved ${linkPath}: the symlink target could not be inspected; review the unsafe resource manually`,
|
|
331
333
|
});
|
|
332
334
|
continue;
|
|
333
335
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
if (
|
|
336
|
+
const ownership = symlinkOwnership(linkPath, managedSkillsRoot);
|
|
337
|
+
if (!ownership) {
|
|
338
|
+
if (requiredNames.has(entry.name) || linkTarget.toLowerCase().includes("agentera")) {
|
|
337
339
|
items.push({
|
|
338
340
|
status: "blocked",
|
|
339
|
-
action: "
|
|
341
|
+
action: "remove-stale-skill",
|
|
340
342
|
runtime: "opencode",
|
|
341
|
-
source:
|
|
342
|
-
|
|
343
|
-
message: "OpenCode skill path is user-owned; manual review required",
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
else if (path.resolve(path.dirname(dst), linkTarget) !== path.resolve(src)) {
|
|
347
|
-
items.push({
|
|
348
|
-
status: "pending",
|
|
349
|
-
action: "link-skill",
|
|
350
|
-
runtime: "opencode",
|
|
351
|
-
source: src,
|
|
352
|
-
target: dst,
|
|
353
|
-
message: "will update stale Agentera-managed OpenCode skill link",
|
|
343
|
+
source: linkPath,
|
|
344
|
+
message: `preserved ${linkPath}: skill name or target text does not prove Agentera ownership; confirm ownership and remove it manually if appropriate`,
|
|
354
345
|
});
|
|
355
346
|
}
|
|
347
|
+
continue;
|
|
356
348
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
349
|
+
const item = {
|
|
350
|
+
status: "pending",
|
|
351
|
+
action: "remove-stale-skill",
|
|
352
|
+
runtime: "opencode",
|
|
353
|
+
source: linkPath,
|
|
354
|
+
ownership,
|
|
355
|
+
message: `will remove v2 app-owned OpenCode skill symlink ${entry.name}`,
|
|
356
|
+
};
|
|
357
|
+
const evidenceError = bindMigrationResource(item, "source", linkPath, [home], "symlink");
|
|
358
|
+
if (evidenceError) {
|
|
359
|
+
item.status = "blocked";
|
|
360
|
+
item.message = `legacy skill preserved: ${evidenceError}; review the unsafe path manually`;
|
|
366
361
|
}
|
|
362
|
+
items.push(item);
|
|
367
363
|
}
|
|
368
364
|
}
|
|
369
365
|
function walkJsonHookFiles(dir) {
|
|
@@ -389,7 +385,7 @@ function walkJsonHookFiles(dir) {
|
|
|
389
385
|
function planCopilotItems(items, project, commands) {
|
|
390
386
|
const hooksDir = path.join(project, ".github", "hooks");
|
|
391
387
|
for (const hookFile of walkJsonHookFiles(hooksDir)) {
|
|
392
|
-
pushRewireItem(items, "copilot", hookFile, commands);
|
|
388
|
+
pushRewireItem(items, "copilot", hookFile, commands, project);
|
|
393
389
|
}
|
|
394
390
|
if (!items.some((item) => item.runtime === "copilot")) {
|
|
395
391
|
items.push({
|
|
@@ -400,28 +396,34 @@ function planCopilotItems(items, project, commands) {
|
|
|
400
396
|
});
|
|
401
397
|
}
|
|
402
398
|
}
|
|
403
|
-
function
|
|
404
|
-
if (!
|
|
405
|
-
|
|
399
|
+
export function planRuntimeMigrationItems(ctx, resolvedChannel) {
|
|
400
|
+
if (!ctx.env) {
|
|
401
|
+
throw new Error("MigrationContext.env is required for runtime migration planning; pass sandboxMigrationEnv(home, sourceRoot) in tests or an explicit env in callers.");
|
|
406
402
|
}
|
|
407
|
-
}
|
|
408
|
-
export function planRuntimeMigrationItems(ctx) {
|
|
409
403
|
const home = resolvePath(ctx.home);
|
|
410
404
|
const project = resolvePath(ctx.project);
|
|
411
|
-
const env = ctx.env
|
|
405
|
+
const env = ctx.env;
|
|
412
406
|
const sourceRoot = resolvePath(ctx.sourceRoot ?? resolveSourceRoot(env));
|
|
413
|
-
const commands = resolveNpxHookCommands({ ...ctx, home, env, sourceRoot });
|
|
407
|
+
const commands = resolveNpxHookCommands({ ...ctx, home, env, sourceRoot }, resolvedChannel);
|
|
414
408
|
const items = [];
|
|
415
|
-
planCodexItems(items, home,
|
|
416
|
-
planCursorItems(items, home, project,
|
|
417
|
-
planOpencodeItems(items, home,
|
|
409
|
+
planCodexItems(items, home, project, commands);
|
|
410
|
+
planCursorItems(items, home, project, commands);
|
|
411
|
+
planOpencodeItems(items, home, env, commands);
|
|
412
|
+
planStaleCommandCleanupItems(ctx, items);
|
|
413
|
+
planStaleSkillCleanupItems(ctx, items);
|
|
418
414
|
planCopilotItems(items, project, commands);
|
|
419
|
-
planEnvRuntimeNoops(items, "claude", "Claude Code plugin installs expose the app home without local config writes; use --update-packages to refresh marketplace surfaces");
|
|
420
|
-
planEnvRuntimeNoops(items, "cursor-agent", "Cursor Agent CLI inherits workspace Cursor hooks; no separate managed install surface");
|
|
421
|
-
void loadRegistry();
|
|
422
415
|
return items;
|
|
423
416
|
}
|
|
424
|
-
|
|
417
|
+
const RUNTIME_MIGRATION_ACTIONS = new Set([
|
|
418
|
+
"rewire-runtime",
|
|
419
|
+
"retire-hooks",
|
|
420
|
+
"remove-stale-command",
|
|
421
|
+
"remove-stale-skill",
|
|
422
|
+
]);
|
|
423
|
+
function isRuntimeMigrationAction(action) {
|
|
424
|
+
return RUNTIME_MIGRATION_ACTIONS.has(action);
|
|
425
|
+
}
|
|
426
|
+
export function applyRuntimeMigrationItem(item, _commands) {
|
|
425
427
|
if (item.status !== "pending") {
|
|
426
428
|
return;
|
|
427
429
|
}
|
|
@@ -433,70 +435,123 @@ export function applyRuntimeMigrationItem(item, commands) {
|
|
|
433
435
|
item.message = "rewire-runtime missing target or newText";
|
|
434
436
|
return;
|
|
435
437
|
}
|
|
436
|
-
|
|
438
|
+
updateBoundMigrationFile(item, "target", item.newText);
|
|
437
439
|
item.status = "applied";
|
|
438
440
|
item.message = "runtime config rewired to npm self-contained entrypoint";
|
|
439
441
|
break;
|
|
440
442
|
}
|
|
441
|
-
case "
|
|
442
|
-
|
|
443
|
-
case "copy-command": {
|
|
444
|
-
if (!item.source || !item.target) {
|
|
443
|
+
case "retire-hooks": {
|
|
444
|
+
if (!item.source) {
|
|
445
445
|
item.status = "failed";
|
|
446
|
-
item.message =
|
|
446
|
+
item.message = "retire-hooks missing source";
|
|
447
447
|
return;
|
|
448
448
|
}
|
|
449
|
-
|
|
449
|
+
if (!item.target) {
|
|
450
|
+
item.status = "failed";
|
|
451
|
+
item.message = "retire-hooks missing target";
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
verifyBoundMigrationResource(item, "source");
|
|
455
|
+
verifyBoundMigrationResource(item, "target");
|
|
456
|
+
if (item.newText === undefined) {
|
|
457
|
+
item.status = "failed";
|
|
458
|
+
item.message = "retire-hooks missing newText";
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
updateBoundMigrationFile(item, "target", item.newText);
|
|
462
|
+
removeBoundMigrationResource(item, "source");
|
|
450
463
|
item.status = "applied";
|
|
451
|
-
item.message =
|
|
464
|
+
item.message = "retired Agentera-owned copied Codex hooks";
|
|
452
465
|
break;
|
|
453
466
|
}
|
|
454
|
-
case "
|
|
455
|
-
if (!item.source
|
|
467
|
+
case "remove-stale-command": {
|
|
468
|
+
if (!item.source) {
|
|
456
469
|
item.status = "failed";
|
|
457
|
-
item.message = "
|
|
470
|
+
item.message = "remove-stale-command missing source";
|
|
458
471
|
return;
|
|
459
472
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
473
|
+
if (!pathExists(item.source)) {
|
|
474
|
+
item.status = "noop";
|
|
475
|
+
item.message = `stale command already absent at ${item.source}`;
|
|
476
|
+
}
|
|
477
|
+
else {
|
|
478
|
+
removeBoundMigrationResource(item, "source");
|
|
479
|
+
item.status = "applied";
|
|
480
|
+
item.message = `removed stale managed command ${path.basename(item.source)}`;
|
|
463
481
|
}
|
|
464
|
-
fs.symlinkSync(item.source, item.target);
|
|
465
|
-
item.status = "applied";
|
|
466
|
-
item.message = "OpenCode skill link created";
|
|
467
482
|
break;
|
|
468
483
|
}
|
|
469
|
-
case "
|
|
484
|
+
case "remove-stale-skill": {
|
|
470
485
|
if (!item.source) {
|
|
471
486
|
item.status = "failed";
|
|
472
|
-
item.message = "
|
|
487
|
+
item.message = "remove-stale-skill missing source";
|
|
473
488
|
return;
|
|
474
489
|
}
|
|
475
|
-
|
|
476
|
-
fs.
|
|
490
|
+
try {
|
|
491
|
+
const stat = fs.lstatSync(item.source);
|
|
492
|
+
if (stat.isSymbolicLink()) {
|
|
493
|
+
const target = fs.readlinkSync(item.source);
|
|
494
|
+
const identity = `${stat.dev}:${stat.ino}`;
|
|
495
|
+
const fingerprint = `sha256:${createHash("sha256").update(target).digest("hex")}`;
|
|
496
|
+
const resolvedTarget = path.resolve(path.dirname(item.source), target);
|
|
497
|
+
const relative = item.ownership?.root
|
|
498
|
+
? path.relative(item.ownership.root, resolvedTarget)
|
|
499
|
+
: "..";
|
|
500
|
+
if (item.ownership?.kind !== "managed-app-symlink"
|
|
501
|
+
|| item.ownership.identity !== identity
|
|
502
|
+
|| item.ownership.fingerprint !== fingerprint
|
|
503
|
+
|| relative === ""
|
|
504
|
+
|| relative.startsWith("..")
|
|
505
|
+
|| path.isAbsolute(relative)) {
|
|
506
|
+
item.status = "blocked";
|
|
507
|
+
item.message = `preserved ${item.source}: authoritative symlink ownership changed or is missing; rerun migration and review the resource`;
|
|
508
|
+
break;
|
|
509
|
+
}
|
|
510
|
+
removeBoundMigrationResource(item, "source");
|
|
511
|
+
item.status = "applied";
|
|
512
|
+
item.message = `removed stale skill symlink ${path.basename(item.source)}`;
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
item.status = "blocked";
|
|
516
|
+
item.message = `preserved ${item.source}: only a fingerprinted v2 app-owned symlink is eligible; review it manually`;
|
|
517
|
+
}
|
|
477
518
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
519
|
+
catch (error) {
|
|
520
|
+
if (error.code === "ENOENT") {
|
|
521
|
+
item.status = "noop";
|
|
522
|
+
item.message = "stale skill already absent";
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
item.status = "failed";
|
|
526
|
+
item.message = `remove-stale-skill failed: ${error.message}`;
|
|
527
|
+
}
|
|
482
528
|
}
|
|
483
|
-
item.status = "applied";
|
|
484
|
-
item.message = "retired Agentera-owned copied Codex hooks";
|
|
485
529
|
break;
|
|
486
530
|
}
|
|
487
531
|
default:
|
|
532
|
+
item.status = "failed";
|
|
533
|
+
item.message = `unsupported runtime migration action: ${item.action}`;
|
|
488
534
|
break;
|
|
489
535
|
}
|
|
490
536
|
}
|
|
491
537
|
catch (exc) {
|
|
492
|
-
item.status = "
|
|
493
|
-
item.message = `${item.action}
|
|
538
|
+
item.status = "blocked";
|
|
539
|
+
item.message = `${item.action} preserved the resource: ${exc.message}; rerun migration and review it manually`;
|
|
494
540
|
}
|
|
495
541
|
}
|
|
496
542
|
export function applyRuntimeMigrationItems(items, ctx) {
|
|
497
543
|
const commands = resolveNpxHookCommands(ctx);
|
|
498
544
|
for (const item of items) {
|
|
499
|
-
|
|
545
|
+
if (item.status !== "pending") {
|
|
546
|
+
continue;
|
|
547
|
+
}
|
|
548
|
+
if (isRuntimeMigrationAction(item.action)) {
|
|
549
|
+
applyRuntimeMigrationItem(item, commands);
|
|
550
|
+
}
|
|
551
|
+
else {
|
|
552
|
+
item.status = "failed";
|
|
553
|
+
item.message = `unsupported runtime migration action: ${item.action}`;
|
|
554
|
+
}
|
|
500
555
|
}
|
|
501
556
|
}
|
|
502
557
|
//# sourceMappingURL=runtimeMigration.js.map
|