agentera 3.0.0-dev.41 → 3.0.0-dev.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -4
- package/bundle/CHANGELOG.md +91 -1
- package/bundle/README.md +26 -19
- package/bundle/UPGRADE.md +50 -15
- package/bundle/references/adapters/package-publication.json +408 -14
- package/bundle/references/adapters/package-registry.yaml +414 -1
- package/bundle/references/adapters/package-surface-characterization.md +20 -0
- package/bundle/references/adapters/runtime-retired-resources.yaml +237 -1
- package/bundle/references/analysis/evidence-tier-authority.yaml +3 -3
- package/bundle/references/analysis/verification-policy.yaml +48 -0
- package/bundle/references/artifacts/artifact-registry-interface-model.yaml +1 -1
- package/bundle/references/artifacts/glossary-entry-contract.yaml +11 -11
- package/bundle/references/artifacts/state-storage-authority.yaml +170 -118
- package/bundle/references/cli/capability-instruction-contract.yaml +4 -4
- package/bundle/references/cli/hybrid-route-contract.yaml +27 -5
- package/bundle/references/cli/routing-model.md +20 -4
- package/bundle/references/cli/trigger-schema-enrichment.md +7 -0
- package/bundle/references/cli/vocabulary-index.yaml +1 -3
- package/bundle/references/cli/vocabulary.md +18 -60
- package/bundle/references/meta/retained-reference-authority.yaml +151 -0
- package/bundle/skills/agentera/SKILL.md +32 -16
- package/bundle/skills/agentera/capabilities/audit/schemas/artifacts.yaml +3 -3
- package/bundle/skills/agentera/capabilities/audit/schemas/validation.yaml +1 -1
- package/bundle/skills/agentera/capabilities/build/schemas/artifacts.yaml +5 -5
- package/bundle/skills/agentera/capabilities/build/schemas/validation.yaml +5 -5
- package/bundle/skills/agentera/capabilities/design/schemas/exit.yaml +2 -2
- package/bundle/skills/agentera/capabilities/discuss/schemas/artifacts.yaml +3 -3
- package/bundle/skills/agentera/capabilities/discuss/schemas/validation.yaml +2 -2
- package/bundle/skills/agentera/capabilities/document/schemas/artifacts.yaml +3 -3
- package/bundle/skills/agentera/capabilities/document/schemas/validation.yaml +1 -1
- package/bundle/skills/agentera/capabilities/optimize/schemas/artifacts.yaml +1 -1
- package/bundle/skills/agentera/capabilities/optimize/schemas/validation.yaml +1 -1
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/artifacts.yaml +5 -5
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/validation.yaml +2 -2
- package/bundle/skills/agentera/capabilities/plan/schemas/artifacts.yaml +1 -1
- package/bundle/skills/agentera/capabilities/plan/schemas/validation.yaml +1 -1
- package/bundle/skills/agentera/capabilities/profile/schemas/validation.yaml +1 -1
- package/bundle/skills/agentera/capability_schema_contract.yaml +2 -2
- package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +3 -3
- package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +3 -3
- package/bundle/skills/agentera/schemas/artifacts/glossary.yaml +1 -1
- package/bundle/skills/agentera/schemas/artifacts/health.yaml +3 -3
- package/bundle/skills/agentera/schemas/artifacts/plan.yaml +12 -10
- package/bundle/skills/agentera/schemas/artifacts/progress.yaml +3 -3
- package/bundle/skills/agentera/schemas/artifacts/todo.yaml +6 -4
- package/dist/analytics/extractCorpus/cli.js +0 -1
- package/dist/analytics/extractCorpus/copilotSessions.js +0 -1
- package/dist/analytics/extractCorpus/core.js +0 -1
- package/dist/analytics/extractCorpus/corpus.js +0 -1
- package/dist/analytics/extractCorpus/coverageAudit.js +0 -1
- package/dist/analytics/extractCorpus/cursorSessions.js +0 -1
- package/dist/analytics/extractCorpus/evidenceTiers.js +0 -1
- package/dist/analytics/extractCorpus/extractCorpusParity.js +0 -1
- package/dist/analytics/extractCorpus/filesystemSources.js +0 -1
- package/dist/analytics/extractCorpus/index.js +0 -1
- package/dist/analytics/extractCorpus/jsonlSessions.js +0 -1
- package/dist/analytics/extractCorpus/sqliteCaps.js +0 -1
- package/dist/analytics/extractCorpus/sqliteSessions.js +0 -1
- package/dist/analytics/extractCorpus/tierReader.js +0 -1
- package/dist/analytics/extractCorpus.js +0 -1
- package/dist/analytics/glossaryAdviceResolution.js +0 -1
- package/dist/analytics/glossaryInputAcquisition.js +0 -1
- package/dist/analytics/personalGlossaryAdmission.js +0 -1
- package/dist/analytics/personalGlossaryProfile.js +0 -1
- package/dist/analytics/profileSignals.js +0 -1
- package/dist/analytics/usageStats.js +0 -1
- package/dist/audit/terminologyDrift.js +0 -1
- package/dist/bin/agentera.js +0 -1
- package/dist/capabilities/audit/instructions.js +3 -4
- package/dist/capabilities/build/instructions.js +2 -3
- package/dist/capabilities/design/instructions.js +1 -2
- package/dist/capabilities/discuss/instructions.js +2 -3
- package/dist/capabilities/document/instructions.js +2 -3
- package/dist/capabilities/index.js +5 -4
- package/dist/capabilities/optimize/instructions.js +1 -2
- package/dist/capabilities/orchestrate/instructions.js +3 -4
- package/dist/capabilities/plan/instructions.js +1 -2
- package/dist/capabilities/profile/instructions.js +1 -2
- package/dist/capabilities/research/instructions.js +1 -2
- package/dist/capabilities/status/instructions.js +1 -2
- package/dist/capabilities/status/startupInstructions.js +0 -5
- package/dist/capabilities/vision/instructions.js +1 -2
- package/dist/cli/appContext.js +0 -1
- package/dist/cli/argvalidate.js +0 -1
- package/dist/cli/capabilityContext/benchmark.js +4 -4
- package/dist/cli/capabilityContext/bespoke.js +0 -1
- package/dist/cli/capabilityContext/build.js +8 -10
- package/dist/cli/capabilityContext/closeout.js +8 -10
- package/dist/cli/capabilityContext/contract.js +7 -42
- package/dist/cli/capabilityContext/evidence.js +12 -14
- package/dist/cli/capabilityContext/index.js +0 -1
- package/dist/cli/capabilityContext/orchestration.js +6 -8
- package/dist/cli/capabilityContext/planState.js +0 -1
- package/dist/cli/capabilityContext/progress.js +0 -1
- package/dist/cli/capabilityContext/projectVerification.js +0 -1
- package/dist/cli/capabilityContext/shared.js +2 -19
- package/dist/cli/capabilityContext/slim.js +0 -1
- package/dist/cli/capabilityContext/startup.js +24 -152
- package/dist/cli/capabilityContext/startupAggregation.js +68 -0
- package/dist/cli/capabilityContext/types.js +4 -4
- package/dist/cli/capabilityContext.js +0 -1
- package/dist/cli/commands/appHome.js +0 -1
- package/dist/cli/commands/capability.js +2 -2
- package/dist/cli/commands/compact.js +0 -1
- package/dist/cli/commands/doctor.js +104 -9
- package/dist/cli/commands/durability.js +0 -1
- package/dist/cli/commands/glossaryAdvice.js +0 -1
- package/dist/cli/commands/lint.js +0 -1
- package/dist/cli/commands/personalGlossary.js +0 -1
- package/dist/cli/commands/prime/briefOrientation.js +24 -85
- package/dist/cli/commands/prime/buildExecutionRequest.js +2 -2
- package/dist/cli/commands/prime/bundleStatus.js +0 -1
- package/dist/cli/commands/prime/collectEntityOrientation.js +47 -27
- package/dist/cli/commands/prime/collectOrientationState.js +36 -2
- package/dist/cli/commands/prime/orientationOutput.js +104 -84
- package/dist/cli/commands/prime/types.js +0 -1
- package/dist/cli/commands/prime/v1Migration.js +0 -1
- package/dist/cli/commands/prime.js +18 -36
- package/dist/cli/commands/profileGrounding.js +0 -1
- package/dist/cli/commands/query.js +2 -2
- package/dist/cli/commands/report.js +0 -1
- package/dist/cli/commands/route.js +3 -3
- package/dist/cli/commands/schema.js +62 -92
- package/dist/cli/commands/state/decisions.js +0 -1
- package/dist/cli/commands/state/docs.js +0 -1
- package/dist/cli/commands/state/experimentRecords.js +0 -1
- package/dist/cli/commands/state/experiments.js +0 -1
- package/dist/cli/commands/state/get.js +0 -1
- package/dist/cli/commands/state/health.js +0 -1
- package/dist/cli/commands/state/index.js +0 -1
- package/dist/cli/commands/state/list.js +0 -1
- package/dist/cli/commands/state/objective.js +0 -1
- package/dist/cli/commands/state/plan.js +0 -1
- package/dist/cli/commands/state/planTasks.js +0 -1
- package/dist/cli/commands/state/plans.js +0 -1
- package/dist/cli/commands/state/progress.js +0 -1
- package/dist/cli/commands/state/shared.js +0 -1
- package/dist/cli/commands/state/todo.js +0 -1
- package/dist/cli/commands/state/write.js +10 -1
- package/dist/cli/commands/upgrade.js +0 -1
- package/dist/cli/commands/upgradeVerify.js +0 -1
- package/dist/cli/commands/validate.js +106 -10
- package/dist/cli/commands/verify.js +0 -1
- package/dist/cli/contracts/bundleStatus.js +0 -1
- package/dist/cli/contracts/orientationState.js +0 -1
- package/dist/cli/dispatch/argvParser.js +0 -1
- package/dist/cli/dispatch/check.js +6 -24
- package/dist/cli/dispatch/commands.js +3 -3
- package/dist/cli/dispatch/index.js +9 -36
- package/dist/cli/dispatch/lifecycle.js +11 -57
- package/dist/cli/dispatch/prime.js +0 -1
- package/dist/cli/dispatch/projections.js +17 -0
- package/dist/cli/dispatch/shared.js +0 -1
- package/dist/cli/dispatch/state.js +0 -1
- package/dist/cli/dispatch.js +0 -1
- package/dist/cli/errors.js +0 -1
- package/dist/cli/help.js +51 -30
- package/dist/cli/migrationRequired.js +3 -5
- package/dist/cli/orientation/attention.js +4 -17
- package/dist/cli/orientation/corpusCoverage.js +0 -1
- package/dist/cli/orientation.js +5 -5
- package/dist/cli/planArtifacts.js +0 -1
- package/dist/cli/planEvidence.js +0 -1
- package/dist/cli/planLifecycleState.js +2 -2
- package/dist/cli/planTaskIndex.js +0 -1
- package/dist/cli/preCutoverCommand.js +32 -0
- package/dist/cli/prime-blob.js +6 -6
- package/dist/cli/profileAcquisition.js +0 -1
- package/dist/cli/startupCompletenessContract.js +0 -1
- package/dist/cli/stateQuery.js +17 -21
- package/dist/cli/structured.js +0 -1
- package/dist/cli/todoMarkdown.js +0 -1
- package/dist/cli/todoReadinessSelection.js +2 -2
- package/dist/cli/todoSeverity.js +0 -1
- package/dist/core/atomicWriter.js +0 -1
- package/dist/core/developmentChannel.js +1 -0
- package/dist/core/developmentInvocation.js +374 -0
- package/dist/core/difflib.js +0 -1
- package/dist/core/envPaths.js +0 -1
- package/dist/core/jsonValue.js +0 -1
- package/dist/core/paths.js +0 -1
- package/dist/core/pyjson.js +0 -1
- package/dist/core/shell.js +0 -1
- package/dist/core/skillIdentity.js +0 -1
- package/dist/core/sourceRoot.js +9 -12
- package/dist/core/text.js +0 -1
- package/dist/core/toml.js +0 -1
- package/dist/core/yaml.js +0 -1
- package/dist/eval/evalSkills.js +0 -1
- package/dist/eval/hybridRouteEvaluation.js +0 -1
- package/dist/eval/semanticEval.js +0 -1
- package/dist/eval/semanticFixtures.js +0 -1
- package/dist/hooks/common.js +1 -54
- package/dist/hooks/compaction/apply.js +0 -1
- package/dist/hooks/compaction/dryRun.js +0 -1
- package/dist/hooks/compaction/index.js +1 -2
- package/dist/hooks/compaction/parse.js +0 -1
- package/dist/hooks/compaction/retention.js +0 -1
- package/dist/hooks/compaction/status.js +0 -1
- package/dist/hooks/compaction/types.js +0 -1
- package/dist/hooks/validateArtifact/agentFacing.js +0 -1
- package/dist/hooks/validateArtifact/index.js +6 -65
- package/dist/hooks/validateArtifact/markdown.js +0 -1
- package/dist/hooks/validateArtifact/schema.js +0 -1
- package/dist/hooks/validateArtifact/traversal.js +0 -1
- package/dist/hooks/validateArtifact/violations.js +0 -1
- package/dist/migrate/v2HandoffManifest.js +0 -3
- package/dist/registries/activationContract.js +2 -0
- package/dist/registries/activationTuples.js +106 -0
- package/dist/registries/artifactProtocolIds.js +0 -1
- package/dist/registries/artifactRegistry.js +0 -1
- package/dist/registries/artifactSchemaProjection.js +0 -1
- package/dist/registries/capabilityContract.js +0 -1
- package/dist/registries/evaluatorHandoffContract.js +0 -1
- package/dist/registries/evidenceTierContract.js +0 -1
- package/dist/registries/glossaryAdviceContract.js +2 -2
- package/dist/registries/glossaryCaveatContract.js +0 -1
- package/dist/registries/glossaryConsumerContractValidation.js +5 -6
- package/dist/registries/glossaryEntryContract.js +8 -8
- package/dist/registries/glossaryTermIdentity.js +0 -1
- package/dist/registries/glossaryTermOccurrence.js +0 -1
- package/dist/registries/hybridRoute.js +73 -2
- package/dist/registries/hybridRouteReceipt.js +2 -2
- package/dist/registries/packagePublication.js +229 -0
- package/dist/registries/packageRegistry.js +118 -2
- package/dist/registries/todoReadinessContract.js +0 -1
- package/dist/registries/triggerLoader.js +0 -1
- package/dist/registries/verbosityBudgetContract.js +0 -1
- package/dist/release/releaseMetadata.js +69 -3
- package/dist/runtime/lifecycleAdapterContract.js +0 -1
- package/dist/runtime/lifecycleAdapters.js +0 -1
- package/dist/runtime/lifecycleAuthority.js +0 -1
- package/dist/runtime/lifecycleOperationContract.js +12 -3
- package/dist/runtime/lifecycleOperations.js +0 -1
- package/dist/runtime/lifecycleOwnershipJournal.js +0 -1
- package/dist/runtime/lifecyclePublication.js +0 -1
- package/dist/runtime/lifecycleSnapshot.js +0 -1
- package/dist/runtime/nativeResourceCleanup.js +191 -6
- package/dist/setup/opencode.js +0 -1
- package/dist/setup/opencodeConstants.js +0 -1
- package/dist/setup/sharedSkill.js +0 -1
- package/dist/setup/smokeChecks.js +1 -33
- package/dist/state/archiveDiscovery.js +0 -1
- package/dist/state/archivePublication.js +0 -1
- package/dist/state/archiveRecovery.js +0 -1
- package/dist/state/archiveReplay.js +0 -1
- package/dist/state/canonicalMigrationRecord.js +0 -1
- package/dist/state/changelog.js +0 -1
- package/dist/state/decisionEntities.js +0 -1
- package/dist/state/decisionLegacyValidation.js +0 -1
- package/dist/state/decisionMigrationProvenance.js +0 -1
- package/dist/state/decisionOverlay.js +0 -1
- package/dist/state/decisionRevision.js +0 -1
- package/dist/state/decisionRevisionMigration.js +0 -1
- package/dist/state/directRetrieval.js +0 -1
- package/dist/state/durability.js +0 -1
- package/dist/state/entityCutover.js +174 -9
- package/dist/state/entityCutoverGit.js +0 -1
- package/dist/state/entityGlossaryAuthority.js +0 -1
- package/dist/state/entityListProjection.js +0 -1
- package/dist/state/entityListRuntimeRegistry.js +46 -11
- package/dist/state/entityMigrationCausality.js +3 -5
- package/dist/state/entityMigrationIdentity.js +0 -1
- package/dist/state/entityMigrationPreview.js +35 -73
- package/dist/state/entityMigrationTodo.js +133 -0
- package/dist/state/entityPublicationContext.js +0 -1
- package/dist/state/entityRetrievalHelp.js +53 -23
- package/dist/state/entityStorage.js +0 -1
- package/dist/state/exactReplacementRecovery.js +0 -1
- package/dist/state/experimentArchive.js +0 -1
- package/dist/state/experimentIdentity.js +0 -1
- package/dist/state/healthEntities.js +0 -1
- package/dist/state/healthEntityValidation.js +0 -1
- package/dist/state/healthRepair.js +0 -1
- package/dist/state/installRoot.js +0 -1
- package/dist/state/legacyEntityCutoverEvidence.js +0 -1
- package/dist/state/legacyIdentity.js +0 -1
- package/dist/state/legacySummaryRecord.js +0 -1
- package/dist/state/listAccounting.js +0 -1
- package/dist/state/listClassification.js +0 -1
- package/dist/state/listCursor.js +0 -1
- package/dist/state/listRetrieval.js +0 -1
- package/dist/state/migrationSourceBinding.js +0 -1
- package/dist/state/objectiveExperimentEntities.js +0 -1
- package/dist/state/planEntities.js +0 -1
- package/dist/state/planIdentity.js +0 -1
- package/dist/state/planRetrieval.js +0 -1
- package/dist/state/planTaskRetrieval.js +0 -1
- package/dist/state/progressEntities.js +0 -1
- package/dist/state/progressGlossaryCaveat.js +0 -1
- package/dist/state/progressPublicationOrder.js +0 -1
- package/dist/state/projectRoot.js +0 -1
- package/dist/state/projectionPolicy.js +0 -1
- package/dist/state/retrievalAuthority.js +0 -1
- package/dist/state/safeProjectFile.js +0 -1
- package/dist/state/startupAnalysis/benchmark.js +0 -1
- package/dist/state/startupAnalysis/contract.js +44 -10
- package/dist/state/startupAnalysis/helpers.js +0 -1
- package/dist/state/startupAnalysis/index.js +0 -1
- package/dist/state/startupAnalysis/metrics.js +0 -1
- package/dist/state/startupAnalysis/records.js +0 -1
- package/dist/state/startupAnalysis/report.js +0 -1
- package/dist/state/startupAnalysis/threshold.js +0 -1
- package/dist/state/startupAnalysis.js +0 -1
- package/dist/state/startupProjection.js +2 -2
- package/dist/state/stateMode.js +0 -1
- package/dist/state/stateStorageAuthority.js +0 -1
- package/dist/state/summaryEntityRead.js +0 -1
- package/dist/state/summaryMigrationProvenance.js +0 -1
- package/dist/state/summarySourceRowAuthority.js +0 -1
- package/dist/state/todoDocsEntities.js +161 -83
- package/dist/state/todoDocsEntityValidation.js +0 -1
- package/dist/state/todoMarkdownProjection.js +51 -0
- package/dist/state/todoReconciliationActivation.js +73 -4
- package/dist/state/todoReconciliationInspection.js +173 -0
- package/dist/state/todoReconciliationRepair.js +170 -0
- package/dist/state/todoReconciliationTransaction.js +41 -13
- package/dist/state/write/assign.js +0 -1
- package/dist/state/write/candidateMutation.js +0 -1
- package/dist/state/write/errors.js +0 -1
- package/dist/state/write/experimentPublication.js +0 -1
- package/dist/state/write/explain.js +0 -1
- package/dist/state/write/fields.js +0 -1
- package/dist/state/write/glossaryPublication.js +0 -1
- package/dist/state/write/grammar.js +13 -4
- package/dist/state/write/helpers.js +0 -1
- package/dist/state/write/index.js +0 -1
- package/dist/state/write/input.js +0 -1
- package/dist/state/write/lock.js +0 -1
- package/dist/state/write/mutation.js +0 -1
- package/dist/state/write/operations.js +0 -1
- package/dist/state/write/planEvaluation.js +0 -1
- package/dist/state/write/planPublication.js +0 -1
- package/dist/state/write/runtimeOperations.js +83 -6
- package/dist/state/write/serialize.js +0 -1
- package/dist/state/write/transaction.js +0 -1
- package/dist/state/write/validate.js +0 -1
- package/dist/upgrade/appContentRefresh.js +0 -1
- package/dist/upgrade/appModel.js +0 -1
- package/dist/upgrade/atomicWriter.js +0 -1
- package/dist/upgrade/bundleEvidence.js +0 -1
- package/dist/upgrade/channels.js +0 -1
- package/dist/upgrade/compatibility.js +0 -1
- package/dist/upgrade/doctor.js +0 -1
- package/dist/upgrade/doctorClassifier.js +0 -1
- package/dist/upgrade/installedHooksRetirement.js +0 -1
- package/dist/upgrade/legacyAgentCleanup.js +0 -1
- package/dist/upgrade/lifecycleUpgrade.js +0 -1
- package/dist/upgrade/migrateArtifactsV2ToV3.js +7 -15
- package/dist/upgrade/migrationPublication.js +0 -1
- package/dist/upgrade/nextMajorDoctor.js +0 -1
- package/dist/upgrade/npxPlatformStatus.js +0 -1
- package/dist/upgrade/projectIntegration.js +4 -17
- package/dist/upgrade/projectIntegrationDecision.js +0 -1
- package/dist/upgrade/retiredResourceDiagnostics.js +117 -0
- package/dist/upgrade/runtimeMigration.js +61 -190
- package/dist/upgrade/upgradeCommands.js +5 -1
- package/dist/upgrade/upgradeLock.js +0 -1
- package/dist/upgrade/upgradeOrchestrator.js +52 -9
- package/dist/upgrade/v3CapabilitySurface.js +0 -1
- package/dist/upgrade/versionResolution.js +0 -1
- package/dist/validate/activationArtifactEvidence.js +844 -0
- package/dist/validate/activationConjunction.js +816 -0
- package/dist/validate/activationEvidenceManifest.js +515 -0
- package/dist/validate/activationPackageSemantics.js +29 -0
- package/dist/validate/appHomeContract.js +0 -2
- package/dist/validate/bootstrapAuthority.js +44 -0
- package/dist/validate/capability.js +0 -1
- package/dist/validate/crossCapability.js +0 -1
- package/dist/validate/retainedReferenceAuthority.js +879 -0
- package/dist/validate/selfAudit.js +0 -1
- package/dist/validate/v1LegacyCruft.js +0 -10
- package/dist/validate/vocabularyAuthority.js +6 -8
- package/package.json +12 -5
- package/bundle/references/adapters/package-manifest-interface-model.yaml +0 -127
- package/bundle/references/analysis/benchmark.md +0 -271
- package/bundle/references/analysis/startup-measurement-contract.yaml +0 -435
- package/bundle/references/cli/agent-ready-state-contract.yaml +0 -1015
- package/bundle/references/cli/audience-namespace-cli-migration.yaml +0 -395
- package/bundle/references/cli/bundle-skill-vocabulary.yaml +0 -241
- package/bundle/references/cli/capability-instruction-structure.md +0 -144
- package/bundle/references/cli/capability-tool-classification.yaml +0 -53
- package/bundle/references/cli/coexistence-probe.yaml +0 -13
- package/bundle/references/cli/parity-expected-actual-template.md +0 -30
- package/bundle/references/cli/prime-consumer-compatibility.yaml +0 -701
- package/bundle/references/cli/routing-execution-vocabulary.yaml +0 -259
- package/bundle/references/cli/single-name-protocol.yaml +0 -42
- package/bundle/references/cli/upgrade-repair-wording.md +0 -25
- package/bundle/references/cli/v3-handoff-manifest.schema.yaml +0 -97
- package/bundle/references/meta/documentation-inventory.md +0 -50
- package/bundle/skills/agentera/references/contract.md +0 -1097
- package/dist/analytics/extractCorpus/cli.js.map +0 -1
- package/dist/analytics/extractCorpus/copilotSessions.js.map +0 -1
- package/dist/analytics/extractCorpus/core.js.map +0 -1
- package/dist/analytics/extractCorpus/corpus.js.map +0 -1
- package/dist/analytics/extractCorpus/coverageAudit.js.map +0 -1
- package/dist/analytics/extractCorpus/cursorSessions.js.map +0 -1
- package/dist/analytics/extractCorpus/evidenceTiers.js.map +0 -1
- package/dist/analytics/extractCorpus/extractCorpusParity.js.map +0 -1
- package/dist/analytics/extractCorpus/filesystemSources.js.map +0 -1
- package/dist/analytics/extractCorpus/index.js.map +0 -1
- package/dist/analytics/extractCorpus/jsonlSessions.js.map +0 -1
- package/dist/analytics/extractCorpus/sqliteCaps.js.map +0 -1
- package/dist/analytics/extractCorpus/sqliteSessions.js.map +0 -1
- package/dist/analytics/extractCorpus/tierReader.js.map +0 -1
- package/dist/analytics/extractCorpus.js.map +0 -1
- package/dist/analytics/glossaryAdviceResolution.js.map +0 -1
- package/dist/analytics/glossaryInputAcquisition.js.map +0 -1
- package/dist/analytics/personalGlossaryAdmission.js.map +0 -1
- package/dist/analytics/personalGlossaryProfile.js.map +0 -1
- package/dist/analytics/profileSignals.js.map +0 -1
- package/dist/analytics/usageStats.js.map +0 -1
- package/dist/audit/terminologyDrift.js.map +0 -1
- package/dist/bin/agentera.js.map +0 -1
- package/dist/capabilities/audit/instructions.js.map +0 -1
- package/dist/capabilities/build/instructions.js.map +0 -1
- package/dist/capabilities/design/instructions.js.map +0 -1
- package/dist/capabilities/discuss/instructions.js.map +0 -1
- package/dist/capabilities/document/instructions.js.map +0 -1
- package/dist/capabilities/index.js.map +0 -1
- package/dist/capabilities/optimize/instructions.js.map +0 -1
- package/dist/capabilities/orchestrate/instructions.js.map +0 -1
- package/dist/capabilities/plan/instructions.js.map +0 -1
- package/dist/capabilities/profile/instructions.js.map +0 -1
- package/dist/capabilities/research/instructions.js.map +0 -1
- package/dist/capabilities/status/instructions.js.map +0 -1
- package/dist/capabilities/status/startupInstructions.js.map +0 -1
- package/dist/capabilities/vision/instructions.js.map +0 -1
- package/dist/cli/appContext.js.map +0 -1
- package/dist/cli/argvalidate.js.map +0 -1
- package/dist/cli/capabilityContext/benchmark.js.map +0 -1
- package/dist/cli/capabilityContext/bespoke.js.map +0 -1
- package/dist/cli/capabilityContext/build.js.map +0 -1
- package/dist/cli/capabilityContext/closeout.js.map +0 -1
- package/dist/cli/capabilityContext/contract.js.map +0 -1
- package/dist/cli/capabilityContext/evidence.js.map +0 -1
- package/dist/cli/capabilityContext/index.js.map +0 -1
- package/dist/cli/capabilityContext/orchestration.js.map +0 -1
- package/dist/cli/capabilityContext/planState.js.map +0 -1
- package/dist/cli/capabilityContext/progress.js.map +0 -1
- package/dist/cli/capabilityContext/projectVerification.js.map +0 -1
- package/dist/cli/capabilityContext/shared.js.map +0 -1
- package/dist/cli/capabilityContext/slim.js.map +0 -1
- package/dist/cli/capabilityContext/startup.js.map +0 -1
- package/dist/cli/capabilityContext/types.js.map +0 -1
- package/dist/cli/capabilityContext.js.map +0 -1
- package/dist/cli/commands/appHome.js.map +0 -1
- package/dist/cli/commands/capability.js.map +0 -1
- package/dist/cli/commands/compact.js.map +0 -1
- package/dist/cli/commands/doctor.js.map +0 -1
- package/dist/cli/commands/durability.js.map +0 -1
- package/dist/cli/commands/entityMigrate.js +0 -132
- package/dist/cli/commands/entityMigrate.js.map +0 -1
- package/dist/cli/commands/glossaryAdvice.js.map +0 -1
- package/dist/cli/commands/lint.js.map +0 -1
- package/dist/cli/commands/personalGlossary.js.map +0 -1
- package/dist/cli/commands/prime/briefOrientation.js.map +0 -1
- package/dist/cli/commands/prime/buildExecutionRequest.js.map +0 -1
- package/dist/cli/commands/prime/bundleStatus.js.map +0 -1
- package/dist/cli/commands/prime/collectEntityOrientation.js.map +0 -1
- package/dist/cli/commands/prime/collectOrientationState.js.map +0 -1
- package/dist/cli/commands/prime/orientationOutput.js.map +0 -1
- package/dist/cli/commands/prime/types.js.map +0 -1
- package/dist/cli/commands/prime/v1Migration.js.map +0 -1
- package/dist/cli/commands/prime.js.map +0 -1
- package/dist/cli/commands/profileGrounding.js.map +0 -1
- package/dist/cli/commands/query.js.map +0 -1
- package/dist/cli/commands/report.js.map +0 -1
- package/dist/cli/commands/route.js.map +0 -1
- package/dist/cli/commands/schema.js.map +0 -1
- package/dist/cli/commands/state/decisions.js.map +0 -1
- package/dist/cli/commands/state/docs.js.map +0 -1
- package/dist/cli/commands/state/experimentRecords.js.map +0 -1
- package/dist/cli/commands/state/experiments.js.map +0 -1
- package/dist/cli/commands/state/get.js.map +0 -1
- package/dist/cli/commands/state/health.js.map +0 -1
- package/dist/cli/commands/state/index.js.map +0 -1
- package/dist/cli/commands/state/list.js.map +0 -1
- package/dist/cli/commands/state/objective.js.map +0 -1
- package/dist/cli/commands/state/plan.js.map +0 -1
- package/dist/cli/commands/state/planTasks.js.map +0 -1
- package/dist/cli/commands/state/plans.js.map +0 -1
- package/dist/cli/commands/state/progress.js.map +0 -1
- package/dist/cli/commands/state/shared.js.map +0 -1
- package/dist/cli/commands/state/todo.js.map +0 -1
- package/dist/cli/commands/state/write.js.map +0 -1
- package/dist/cli/commands/upgrade.js.map +0 -1
- package/dist/cli/commands/upgradeVerify.js.map +0 -1
- package/dist/cli/commands/validate.js.map +0 -1
- package/dist/cli/commands/verify.js.map +0 -1
- package/dist/cli/contracts/bundleStatus.js.map +0 -1
- package/dist/cli/contracts/orientationState.js.map +0 -1
- package/dist/cli/dispatch/argvParser.js.map +0 -1
- package/dist/cli/dispatch/check.js.map +0 -1
- package/dist/cli/dispatch/commands.js.map +0 -1
- package/dist/cli/dispatch/index.js.map +0 -1
- package/dist/cli/dispatch/lifecycle.js.map +0 -1
- package/dist/cli/dispatch/prime.js.map +0 -1
- package/dist/cli/dispatch/shared.js.map +0 -1
- package/dist/cli/dispatch/state.js.map +0 -1
- package/dist/cli/dispatch.js.map +0 -1
- package/dist/cli/errors.js.map +0 -1
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/migrationRequired.js.map +0 -1
- package/dist/cli/orientation/attention.js.map +0 -1
- package/dist/cli/orientation/corpusCoverage.js.map +0 -1
- package/dist/cli/orientation.js.map +0 -1
- package/dist/cli/planArtifacts.js.map +0 -1
- package/dist/cli/planEvidence.js.map +0 -1
- package/dist/cli/planLifecycleState.js.map +0 -1
- package/dist/cli/planTaskIndex.js.map +0 -1
- package/dist/cli/prime-blob.js.map +0 -1
- package/dist/cli/profileAcquisition.js.map +0 -1
- package/dist/cli/startupCompletenessContract.js.map +0 -1
- package/dist/cli/stateQuery.js.map +0 -1
- package/dist/cli/structured.js.map +0 -1
- package/dist/cli/todoMarkdown.js.map +0 -1
- package/dist/cli/todoReadinessSelection.js.map +0 -1
- package/dist/cli/todoSeverity.js.map +0 -1
- package/dist/core/atomicWriter.js.map +0 -1
- package/dist/core/difflib.js.map +0 -1
- package/dist/core/envPaths.js.map +0 -1
- package/dist/core/jsonValue.js.map +0 -1
- package/dist/core/paths.js.map +0 -1
- package/dist/core/pyjson.js.map +0 -1
- package/dist/core/shell.js.map +0 -1
- package/dist/core/skillIdentity.js.map +0 -1
- package/dist/core/sourceRoot.js.map +0 -1
- package/dist/core/text.js.map +0 -1
- package/dist/core/toml.js.map +0 -1
- package/dist/core/yaml.js.map +0 -1
- package/dist/eval/evalSkills.js.map +0 -1
- package/dist/eval/hybridRouteEvaluation.js.map +0 -1
- package/dist/eval/semanticEval.js.map +0 -1
- package/dist/eval/semanticFixtures.js.map +0 -1
- package/dist/hooks/common.js.map +0 -1
- package/dist/hooks/compaction/apply.js.map +0 -1
- package/dist/hooks/compaction/dryRun.js.map +0 -1
- package/dist/hooks/compaction/index.js.map +0 -1
- package/dist/hooks/compaction/parse.js.map +0 -1
- package/dist/hooks/compaction/retention.js.map +0 -1
- package/dist/hooks/compaction/status.js.map +0 -1
- package/dist/hooks/compaction/types.js.map +0 -1
- package/dist/hooks/cursorPreToolUse.js +0 -19
- package/dist/hooks/cursorPreToolUse.js.map +0 -1
- package/dist/hooks/cursorSessionStart.js +0 -64
- package/dist/hooks/cursorSessionStart.js.map +0 -1
- package/dist/hooks/projectHookInput.js +0 -26
- package/dist/hooks/projectHookInput.js.map +0 -1
- package/dist/hooks/sessionStart.js +0 -94
- package/dist/hooks/sessionStart.js.map +0 -1
- package/dist/hooks/sessionStop.js +0 -198
- package/dist/hooks/sessionStop.js.map +0 -1
- package/dist/hooks/validateArtifact/agentFacing.js.map +0 -1
- package/dist/hooks/validateArtifact/index.js.map +0 -1
- package/dist/hooks/validateArtifact/markdown.js.map +0 -1
- package/dist/hooks/validateArtifact/runtime.js +0 -86
- package/dist/hooks/validateArtifact/runtime.js.map +0 -1
- package/dist/hooks/validateArtifact/schema.js.map +0 -1
- package/dist/hooks/validateArtifact/traversal.js.map +0 -1
- package/dist/hooks/validateArtifact/violations.js.map +0 -1
- package/dist/migrate/v2HandoffManifest.js.map +0 -1
- package/dist/registries/artifactProtocolIds.js.map +0 -1
- package/dist/registries/artifactRegistry.js.map +0 -1
- package/dist/registries/artifactSchemaProjection.js.map +0 -1
- package/dist/registries/capabilityContract.js.map +0 -1
- package/dist/registries/evaluatorHandoffContract.js.map +0 -1
- package/dist/registries/evidenceTierContract.js.map +0 -1
- package/dist/registries/glossaryAdviceContract.js.map +0 -1
- package/dist/registries/glossaryCaveatContract.js.map +0 -1
- package/dist/registries/glossaryConsumerContractValidation.js.map +0 -1
- package/dist/registries/glossaryEntryContract.js.map +0 -1
- package/dist/registries/glossaryTermIdentity.js.map +0 -1
- package/dist/registries/glossaryTermOccurrence.js.map +0 -1
- package/dist/registries/hybridRoute.js.map +0 -1
- package/dist/registries/hybridRouteReceipt.js.map +0 -1
- package/dist/registries/packageRegistry.js.map +0 -1
- package/dist/registries/todoReadinessContract.js.map +0 -1
- package/dist/registries/triggerLoader.js.map +0 -1
- package/dist/registries/verbosityBudgetContract.js.map +0 -1
- package/dist/release/releaseMetadata.js.map +0 -1
- package/dist/runtime/lifecycleAdapterContract.js.map +0 -1
- package/dist/runtime/lifecycleAdapters.js.map +0 -1
- package/dist/runtime/lifecycleAuthority.js.map +0 -1
- package/dist/runtime/lifecycleOperationContract.js.map +0 -1
- package/dist/runtime/lifecycleOperations.js.map +0 -1
- package/dist/runtime/lifecycleOwnershipJournal.js.map +0 -1
- package/dist/runtime/lifecyclePublication.js.map +0 -1
- package/dist/runtime/lifecycleSnapshot.js.map +0 -1
- package/dist/runtime/nativeResourceCleanup.js.map +0 -1
- package/dist/setup/codex/cli.js +0 -130
- package/dist/setup/codex/cli.js.map +0 -1
- package/dist/setup/codex/configToml.js +0 -558
- package/dist/setup/codex/configToml.js.map +0 -1
- package/dist/setup/codex/constants.js +0 -14
- package/dist/setup/codex/constants.js.map +0 -1
- package/dist/setup/codex/installRoot.js +0 -64
- package/dist/setup/codex/installRoot.js.map +0 -1
- package/dist/setup/codex/state.js +0 -252
- package/dist/setup/codex/state.js.map +0 -1
- package/dist/setup/codex.js +0 -10
- package/dist/setup/codex.js.map +0 -1
- package/dist/setup/opencode.js.map +0 -1
- package/dist/setup/opencodeConstants.js.map +0 -1
- package/dist/setup/sharedSkill.js.map +0 -1
- package/dist/setup/smokeChecks.js.map +0 -1
- package/dist/state/archiveDiscovery.js.map +0 -1
- package/dist/state/archivePublication.js.map +0 -1
- package/dist/state/archiveRecovery.js.map +0 -1
- package/dist/state/archiveReplay.js.map +0 -1
- package/dist/state/canonicalMigrationRecord.js.map +0 -1
- package/dist/state/changelog.js.map +0 -1
- package/dist/state/decisionEntities.js.map +0 -1
- package/dist/state/decisionLegacyValidation.js.map +0 -1
- package/dist/state/decisionMigrationProvenance.js.map +0 -1
- package/dist/state/decisionOverlay.js.map +0 -1
- package/dist/state/decisionRevision.js.map +0 -1
- package/dist/state/decisionRevisionMigration.js.map +0 -1
- package/dist/state/directRetrieval.js.map +0 -1
- package/dist/state/durability.js.map +0 -1
- package/dist/state/entityCutover.js.map +0 -1
- package/dist/state/entityCutoverGit.js.map +0 -1
- package/dist/state/entityGlossaryAuthority.js.map +0 -1
- package/dist/state/entityListProjection.js.map +0 -1
- package/dist/state/entityListRuntimeRegistry.js.map +0 -1
- package/dist/state/entityMigrationCausality.js.map +0 -1
- package/dist/state/entityMigrationIdentity.js.map +0 -1
- package/dist/state/entityMigrationPreview.js.map +0 -1
- package/dist/state/entityPublicationContext.js.map +0 -1
- package/dist/state/entityRetrievalHelp.js.map +0 -1
- package/dist/state/entityStorage.js.map +0 -1
- package/dist/state/exactReplacementRecovery.js.map +0 -1
- package/dist/state/experimentArchive.js.map +0 -1
- package/dist/state/experimentIdentity.js.map +0 -1
- package/dist/state/healthEntities.js.map +0 -1
- package/dist/state/healthEntityValidation.js.map +0 -1
- package/dist/state/healthRepair.js.map +0 -1
- package/dist/state/installRoot.js.map +0 -1
- package/dist/state/legacyEntityCutoverEvidence.js.map +0 -1
- package/dist/state/legacyIdentity.js.map +0 -1
- package/dist/state/legacySummaryRecord.js.map +0 -1
- package/dist/state/listAccounting.js.map +0 -1
- package/dist/state/listClassification.js.map +0 -1
- package/dist/state/listCursor.js.map +0 -1
- package/dist/state/listRetrieval.js.map +0 -1
- package/dist/state/migrationSourceBinding.js.map +0 -1
- package/dist/state/objectiveExperimentEntities.js.map +0 -1
- package/dist/state/planEntities.js.map +0 -1
- package/dist/state/planIdentity.js.map +0 -1
- package/dist/state/planRetrieval.js.map +0 -1
- package/dist/state/planTaskRetrieval.js.map +0 -1
- package/dist/state/progressEntities.js.map +0 -1
- package/dist/state/progressGlossaryCaveat.js.map +0 -1
- package/dist/state/progressPublicationOrder.js.map +0 -1
- package/dist/state/projectRoot.js.map +0 -1
- package/dist/state/projectionPolicy.js.map +0 -1
- package/dist/state/retrievalAuthority.js.map +0 -1
- package/dist/state/safeProjectFile.js.map +0 -1
- package/dist/state/startupAnalysis/benchmark.js.map +0 -1
- package/dist/state/startupAnalysis/contract.js.map +0 -1
- package/dist/state/startupAnalysis/helpers.js.map +0 -1
- package/dist/state/startupAnalysis/index.js.map +0 -1
- package/dist/state/startupAnalysis/metrics.js.map +0 -1
- package/dist/state/startupAnalysis/records.js.map +0 -1
- package/dist/state/startupAnalysis/report.js.map +0 -1
- package/dist/state/startupAnalysis/threshold.js.map +0 -1
- package/dist/state/startupAnalysis.js.map +0 -1
- package/dist/state/startupProjection.js.map +0 -1
- package/dist/state/stateMode.js.map +0 -1
- package/dist/state/stateStorageAuthority.js.map +0 -1
- package/dist/state/summaryEntityRead.js.map +0 -1
- package/dist/state/summaryMigrationProvenance.js.map +0 -1
- package/dist/state/summarySourceRowAuthority.js.map +0 -1
- package/dist/state/todoDocsEntities.js.map +0 -1
- package/dist/state/todoDocsEntityValidation.js.map +0 -1
- package/dist/state/todoReconciliationActivation.js.map +0 -1
- package/dist/state/todoReconciliationTransaction.js.map +0 -1
- package/dist/state/write/assign.js.map +0 -1
- package/dist/state/write/candidateMutation.js.map +0 -1
- package/dist/state/write/errors.js.map +0 -1
- package/dist/state/write/experimentPublication.js.map +0 -1
- package/dist/state/write/explain.js.map +0 -1
- package/dist/state/write/fields.js.map +0 -1
- package/dist/state/write/glossaryPublication.js.map +0 -1
- package/dist/state/write/grammar.js.map +0 -1
- package/dist/state/write/helpers.js.map +0 -1
- package/dist/state/write/index.js.map +0 -1
- package/dist/state/write/input.js.map +0 -1
- package/dist/state/write/lock.js.map +0 -1
- package/dist/state/write/mutation.js.map +0 -1
- package/dist/state/write/operations.js.map +0 -1
- package/dist/state/write/planEvaluation.js.map +0 -1
- package/dist/state/write/planPublication.js.map +0 -1
- package/dist/state/write/runtimeOperations.js.map +0 -1
- package/dist/state/write/serialize.js.map +0 -1
- package/dist/state/write/transaction.js.map +0 -1
- package/dist/state/write/validate.js.map +0 -1
- package/dist/upgrade/appContentRefresh.js.map +0 -1
- package/dist/upgrade/appModel.js.map +0 -1
- package/dist/upgrade/atomicWriter.js.map +0 -1
- package/dist/upgrade/bundleEvidence.js.map +0 -1
- package/dist/upgrade/channels.js.map +0 -1
- package/dist/upgrade/coexistenceProbe.js +0 -105
- package/dist/upgrade/coexistenceProbe.js.map +0 -1
- package/dist/upgrade/compatibility.js.map +0 -1
- package/dist/upgrade/doctor.js.map +0 -1
- package/dist/upgrade/doctorClassifier.js.map +0 -1
- package/dist/upgrade/installedHooksRetirement.js.map +0 -1
- package/dist/upgrade/legacyAgentCleanup.js.map +0 -1
- package/dist/upgrade/lifecycleUpgrade.js.map +0 -1
- package/dist/upgrade/migrateArtifactsV2ToV3.js.map +0 -1
- package/dist/upgrade/migrationPublication.js.map +0 -1
- package/dist/upgrade/nextMajorDoctor.js.map +0 -1
- package/dist/upgrade/npxPlatformStatus.js.map +0 -1
- package/dist/upgrade/projectIntegration.js.map +0 -1
- package/dist/upgrade/projectIntegrationDecision.js.map +0 -1
- package/dist/upgrade/runtimeMigration.js.map +0 -1
- package/dist/upgrade/upgradeCommands.js.map +0 -1
- package/dist/upgrade/upgradeLock.js.map +0 -1
- package/dist/upgrade/upgradeOrchestrator.js.map +0 -1
- package/dist/upgrade/v3CapabilitySurface.js.map +0 -1
- package/dist/upgrade/versionResolution.js.map +0 -1
- package/dist/validate/appHomeContract.js.map +0 -1
- package/dist/validate/capability.js.map +0 -1
- package/dist/validate/crossCapability.js.map +0 -1
- package/dist/validate/selfAudit.js.map +0 -1
- package/dist/validate/v1LegacyCruft.js.map +0 -1
- package/dist/validate/vocabularyAuthority.js.map +0 -1
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
|
-
import os from "node:os";
|
|
3
2
|
import path from "node:path";
|
|
4
3
|
import { createHash } from "node:crypto";
|
|
5
4
|
import { isFile, pathExists, resolvePath } from "../core/paths.js";
|
|
6
|
-
import { resolveSourceRoot } from "../core/sourceRoot.js";
|
|
7
|
-
import { codexCopiedHooksAreAgenteraOnly, codexPluginHooksEnabled, retireCodexCopiedHookTrust, } from "../setup/codex.js";
|
|
8
5
|
import { hasManagedMarker, opencodeConfigDir, } from "../setup/opencode.js";
|
|
9
6
|
import { OPENCODE_SKILL_NAMES } from "../setup/opencodeConstants.js";
|
|
10
|
-
import { resolveInvokedUpdateChannel } from "./channels.js";
|
|
11
7
|
import { doctorRoots } from "./appModel.js";
|
|
12
|
-
import { bindMigrationResource, removeBoundMigrationResource,
|
|
8
|
+
import { bindMigrationResource, removeBoundMigrationResource, verifyBoundMigrationResource, } from "./migrationPublication.js";
|
|
13
9
|
const PYTHON_MANAGED_PATTERNS = [
|
|
14
10
|
/hooks\/validate_artifact\.py/,
|
|
15
11
|
/hooks\/cursor_session_start\.py/,
|
|
@@ -36,190 +32,94 @@ export function projectHasProjectLevelRuntimeHooks(project) {
|
|
|
36
32
|
return candidates.some((candidate) => isFile(candidate) || pathExists(candidate));
|
|
37
33
|
}
|
|
38
34
|
const OPENCODE_COMMAND_NAMES = ["agentera"];
|
|
39
|
-
export function resolveNpxHookCommands(ctx, resolvedChannel) {
|
|
40
|
-
const env = ctx.env ?? process.env;
|
|
41
|
-
const home = ctx.home ?? env.HOME ?? os.homedir();
|
|
42
|
-
const sourceRoot = ctx.sourceRoot ?? resolveSourceRoot(env);
|
|
43
|
-
const channel = resolvedChannel ?? resolveInvokedUpdateChannel({
|
|
44
|
-
channel: ctx.channel ?? null,
|
|
45
|
-
env,
|
|
46
|
-
home,
|
|
47
|
-
sourceRoot,
|
|
48
|
-
});
|
|
49
|
-
const cliEntrypoint = channel.updateCommand.trim();
|
|
50
|
-
return {
|
|
51
|
-
cliEntrypoint,
|
|
52
|
-
validate: `${cliEntrypoint} hook validate-artifact`,
|
|
53
|
-
cursorSessionStart: `${cliEntrypoint} hook cursor-session-start`,
|
|
54
|
-
cursorSessionStop: `${cliEntrypoint} hook session-stop`,
|
|
55
|
-
cursorPreTool: `${cliEntrypoint} hook cursor-pre-tool-use`,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
35
|
export function textUsesPythonManagedEntrypoint(text) {
|
|
59
36
|
if (/AGENTERA_HOME\s*=/.test(text)) {
|
|
60
37
|
return true;
|
|
61
38
|
}
|
|
62
39
|
return PYTHON_MANAGED_PATTERNS.some((pattern) => pattern.test(text));
|
|
63
40
|
}
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (runtime === "codex") {
|
|
79
|
-
next = next.replace(/AGENTERA_HOME\s*=\s*"[^"]*"/g, "");
|
|
80
|
-
next = next.replace(/AGENTERA_HOME\s*=\s*'[^']*'/g, "");
|
|
81
|
-
next = next.replace(/set\s*=\s*\{\s*,/g, "set = {");
|
|
82
|
-
next = next.replace(/,\s*,/g, ",");
|
|
83
|
-
next = next.replace(/,\s*\}/g, " }");
|
|
84
|
-
next = next.replace(/set\s*=\s*\{\s*\}/g, "set = { }");
|
|
41
|
+
const RETIRED_NPX_HOOK = /\bnpx\s+-y\s+agentera(?:@(?:next|latest))?\s+hook\s+/;
|
|
42
|
+
const V2_AGENTERA_HOOK = /(?:\buv(?:x|\s+run)\b[^"'\n]*(?:\$\{(?:AGENTERA_HOME|PLUGIN_ROOT)\}|hooks\/)\/[^"'\n]*\.py|\$\{AGENTERA_HOME\}\/(?:app\/scripts|(?:app\/)?hooks)\/[^"'\n]*\.py)/;
|
|
43
|
+
function retiredHookCommands(value, commands = []) {
|
|
44
|
+
if (Array.isArray(value)) {
|
|
45
|
+
for (const entry of value)
|
|
46
|
+
retiredHookCommands(entry, commands);
|
|
47
|
+
}
|
|
48
|
+
else if (value !== null && typeof value === "object") {
|
|
49
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
50
|
+
if (key === "command" && typeof entry === "string")
|
|
51
|
+
commands.push(entry);
|
|
52
|
+
else
|
|
53
|
+
retiredHookCommands(entry, commands);
|
|
54
|
+
}
|
|
85
55
|
}
|
|
86
|
-
return
|
|
56
|
+
return commands;
|
|
87
57
|
}
|
|
88
|
-
function
|
|
89
|
-
|
|
90
|
-
|
|
58
|
+
function isRetiredAgenteraHookCommand(command) {
|
|
59
|
+
return V2_AGENTERA_HOOK.test(command) || RETIRED_NPX_HOOK.test(command);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Native hook files have no durable per-entry ownership record. Remove only a
|
|
63
|
+
* file whose every command is a retired Agentera invocation; mixed files are
|
|
64
|
+
* preserved for the owner to review rather than surgically rewritten.
|
|
65
|
+
*/
|
|
66
|
+
export function wholeResourceProvesV2HookOwnership(text) {
|
|
67
|
+
let document;
|
|
68
|
+
try {
|
|
69
|
+
document = JSON.parse(text);
|
|
91
70
|
}
|
|
92
|
-
|
|
93
|
-
return
|
|
71
|
+
catch {
|
|
72
|
+
return false;
|
|
94
73
|
}
|
|
95
|
-
|
|
74
|
+
const commands = retiredHookCommands(document);
|
|
75
|
+
return commands.length > 0 && commands.every(isRetiredAgenteraHookCommand);
|
|
96
76
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
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;
|
|
77
|
+
function textContainsRetiredAgenteraHook(text) {
|
|
78
|
+
return textUsesPythonManagedEntrypoint(text) || RETIRED_NPX_HOOK.test(text);
|
|
106
79
|
}
|
|
107
|
-
function
|
|
80
|
+
function pushRetireHookItem(items, runtime, filePath, allowedRoot) {
|
|
108
81
|
const text = fs.readFileSync(filePath, "utf8");
|
|
109
|
-
|
|
110
|
-
const authoritative = hasManagedMarker(text)
|
|
111
|
-
|| textHasAuthoritativeV2AgenteraEvidence(text)
|
|
112
|
-
|| needsBare;
|
|
113
|
-
if (!authoritative) {
|
|
114
|
-
if (textUsesV3NpmEntrypoint(text)) {
|
|
115
|
-
items.push({
|
|
116
|
-
status: "noop",
|
|
117
|
-
action: "rewire-runtime",
|
|
118
|
-
runtime,
|
|
119
|
-
source: filePath,
|
|
120
|
-
message: "runtime config already references npm self-contained entrypoint",
|
|
121
|
-
});
|
|
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.
|
|
82
|
+
if (!textContainsRetiredAgenteraHook(text)) {
|
|
125
83
|
return;
|
|
126
84
|
}
|
|
127
|
-
const newText = rewireRuntimeText(text, runtime, commands);
|
|
128
|
-
const status = newText === text ? "blocked" : "pending";
|
|
129
85
|
const item = {
|
|
130
|
-
status,
|
|
131
|
-
action: "
|
|
86
|
+
status: wholeResourceProvesV2HookOwnership(text) ? "pending" : "blocked",
|
|
87
|
+
action: "retire-hooks",
|
|
132
88
|
runtime,
|
|
133
89
|
source: filePath,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
? "will rewire runtime config from Python managed app-home to npm self-contained entrypoint"
|
|
138
|
-
: "runtime config uses Python managed paths but could not be rewritten safely",
|
|
90
|
+
message: wholeResourceProvesV2HookOwnership(text)
|
|
91
|
+
? "will remove whole-resource-proven retired Agentera hook"
|
|
92
|
+
: "retired Agentera hook preserved: complete resource ownership is unproven; review and remove it manually",
|
|
139
93
|
};
|
|
140
|
-
|
|
94
|
+
if (item.status === "blocked") {
|
|
95
|
+
items.push(item);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const evidenceError = bindMigrationResource(item, "source", filePath, [allowedRoot], "file");
|
|
141
99
|
if (evidenceError) {
|
|
142
100
|
item.status = "blocked";
|
|
143
|
-
item.message = `
|
|
101
|
+
item.message = `retired Agentera hook preserved: ${evidenceError}; review the unsafe path manually`;
|
|
144
102
|
}
|
|
145
103
|
items.push(item);
|
|
146
104
|
}
|
|
147
|
-
function planCodexItems(items, home, project
|
|
105
|
+
function planCodexItems(items, home, project) {
|
|
148
106
|
for (const root of [project, home]) {
|
|
149
107
|
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
|
-
}
|
|
193
|
-
}
|
|
194
|
-
pushRewireItem(items, "codex", configPath, commands, root);
|
|
195
|
-
}
|
|
196
108
|
if (isFile(hooksPath)) {
|
|
197
|
-
|
|
109
|
+
pushRetireHookItem(items, "codex", hooksPath, root);
|
|
198
110
|
}
|
|
199
111
|
}
|
|
200
112
|
}
|
|
201
|
-
function planCursorItems(items, home, project
|
|
113
|
+
function planCursorItems(items, home, project) {
|
|
202
114
|
for (const [root, hooksPath] of [
|
|
203
115
|
[project, path.join(project, ".cursor", "hooks.json")],
|
|
204
116
|
[home, path.join(home, ".cursor", "hooks.json")],
|
|
205
117
|
]) {
|
|
206
118
|
if (isFile(hooksPath)) {
|
|
207
|
-
|
|
119
|
+
pushRetireHookItem(items, "cursor", hooksPath, root);
|
|
208
120
|
}
|
|
209
121
|
}
|
|
210
122
|
}
|
|
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
123
|
function symlinkOwnership(linkPath, managedSkillsRoot) {
|
|
224
124
|
let stat;
|
|
225
125
|
let target;
|
|
@@ -382,10 +282,10 @@ function walkJsonHookFiles(dir) {
|
|
|
382
282
|
walk(dir);
|
|
383
283
|
return out;
|
|
384
284
|
}
|
|
385
|
-
function planCopilotItems(items, project
|
|
285
|
+
function planCopilotItems(items, project) {
|
|
386
286
|
const hooksDir = path.join(project, ".github", "hooks");
|
|
387
287
|
for (const hookFile of walkJsonHookFiles(hooksDir)) {
|
|
388
|
-
|
|
288
|
+
pushRetireHookItem(items, "copilot", hookFile, project);
|
|
389
289
|
}
|
|
390
290
|
if (!items.some((item) => item.runtime === "copilot")) {
|
|
391
291
|
items.push({
|
|
@@ -396,26 +296,22 @@ function planCopilotItems(items, project, commands) {
|
|
|
396
296
|
});
|
|
397
297
|
}
|
|
398
298
|
}
|
|
399
|
-
export function planRuntimeMigrationItems(ctx
|
|
299
|
+
export function planRuntimeMigrationItems(ctx) {
|
|
400
300
|
if (!ctx.env) {
|
|
401
301
|
throw new Error("MigrationContext.env is required for runtime migration planning; pass sandboxMigrationEnv(home, sourceRoot) in tests or an explicit env in callers.");
|
|
402
302
|
}
|
|
403
303
|
const home = resolvePath(ctx.home);
|
|
404
304
|
const project = resolvePath(ctx.project);
|
|
405
305
|
const env = ctx.env;
|
|
406
|
-
const sourceRoot = resolvePath(ctx.sourceRoot ?? resolveSourceRoot(env));
|
|
407
|
-
const commands = resolveNpxHookCommands({ ...ctx, home, env, sourceRoot }, resolvedChannel);
|
|
408
306
|
const items = [];
|
|
409
|
-
planCodexItems(items, home, project
|
|
410
|
-
planCursorItems(items, home, project
|
|
411
|
-
planOpencodeItems(items, home, env, commands);
|
|
307
|
+
planCodexItems(items, home, project);
|
|
308
|
+
planCursorItems(items, home, project);
|
|
412
309
|
planStaleCommandCleanupItems(ctx, items);
|
|
413
310
|
planStaleSkillCleanupItems(ctx, items);
|
|
414
|
-
planCopilotItems(items, project
|
|
311
|
+
planCopilotItems(items, project);
|
|
415
312
|
return items;
|
|
416
313
|
}
|
|
417
314
|
const RUNTIME_MIGRATION_ACTIONS = new Set([
|
|
418
|
-
"rewire-runtime",
|
|
419
315
|
"retire-hooks",
|
|
420
316
|
"remove-stale-command",
|
|
421
317
|
"remove-stale-skill",
|
|
@@ -423,45 +319,22 @@ const RUNTIME_MIGRATION_ACTIONS = new Set([
|
|
|
423
319
|
function isRuntimeMigrationAction(action) {
|
|
424
320
|
return RUNTIME_MIGRATION_ACTIONS.has(action);
|
|
425
321
|
}
|
|
426
|
-
export function applyRuntimeMigrationItem(item
|
|
322
|
+
export function applyRuntimeMigrationItem(item) {
|
|
427
323
|
if (item.status !== "pending") {
|
|
428
324
|
return;
|
|
429
325
|
}
|
|
430
326
|
try {
|
|
431
327
|
switch (item.action) {
|
|
432
|
-
case "rewire-runtime": {
|
|
433
|
-
if (!item.target || item.newText === undefined) {
|
|
434
|
-
item.status = "failed";
|
|
435
|
-
item.message = "rewire-runtime missing target or newText";
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
updateBoundMigrationFile(item, "target", item.newText);
|
|
439
|
-
item.status = "applied";
|
|
440
|
-
item.message = "runtime config rewired to npm self-contained entrypoint";
|
|
441
|
-
break;
|
|
442
|
-
}
|
|
443
328
|
case "retire-hooks": {
|
|
444
329
|
if (!item.source) {
|
|
445
330
|
item.status = "failed";
|
|
446
331
|
item.message = "retire-hooks missing source";
|
|
447
332
|
return;
|
|
448
333
|
}
|
|
449
|
-
if (!item.target) {
|
|
450
|
-
item.status = "failed";
|
|
451
|
-
item.message = "retire-hooks missing target";
|
|
452
|
-
return;
|
|
453
|
-
}
|
|
454
334
|
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
335
|
removeBoundMigrationResource(item, "source");
|
|
463
336
|
item.status = "applied";
|
|
464
|
-
item.message = "retired
|
|
337
|
+
item.message = "retired whole-resource-proven Agentera hook";
|
|
465
338
|
break;
|
|
466
339
|
}
|
|
467
340
|
case "remove-stale-command": {
|
|
@@ -539,14 +412,13 @@ export function applyRuntimeMigrationItem(item, _commands) {
|
|
|
539
412
|
item.message = `${item.action} preserved the resource: ${exc.message}; rerun migration and review it manually`;
|
|
540
413
|
}
|
|
541
414
|
}
|
|
542
|
-
export function applyRuntimeMigrationItems(items,
|
|
543
|
-
const commands = resolveNpxHookCommands(ctx);
|
|
415
|
+
export function applyRuntimeMigrationItems(items, _ctx) {
|
|
544
416
|
for (const item of items) {
|
|
545
417
|
if (item.status !== "pending") {
|
|
546
418
|
continue;
|
|
547
419
|
}
|
|
548
420
|
if (isRuntimeMigrationAction(item.action)) {
|
|
549
|
-
applyRuntimeMigrationItem(item
|
|
421
|
+
applyRuntimeMigrationItem(item);
|
|
550
422
|
}
|
|
551
423
|
else {
|
|
552
424
|
item.status = "failed";
|
|
@@ -554,4 +426,3 @@ export function applyRuntimeMigrationItems(items, ctx) {
|
|
|
554
426
|
}
|
|
555
427
|
}
|
|
556
428
|
}
|
|
557
|
-
//# sourceMappingURL=runtimeMigration.js.map
|
|
@@ -12,6 +12,11 @@ export function fullEntityUpgradeCommand(project) {
|
|
|
12
12
|
"npx", "-y", "agentera@next", "upgrade", "--channel", "development", "--project", project, "--yes",
|
|
13
13
|
]);
|
|
14
14
|
}
|
|
15
|
+
export function fullEntityUpgradePreviewCommand(project) {
|
|
16
|
+
return commandText([
|
|
17
|
+
"npx", "-y", "agentera@next", "upgrade", "--channel", "development", "--project", project, "--dry-run",
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
15
20
|
/** Channel-aware upgrade preview/apply commands (doctor, prime, orchestrator). */
|
|
16
21
|
export function buildUpgradeCommands(args) {
|
|
17
22
|
const base = args.channel.updateCommand.split(/\s+/).slice(0, 3);
|
|
@@ -46,4 +51,3 @@ export function buildUpgradeCommands(args) {
|
|
|
46
51
|
applyCommand: commandText(applyParts),
|
|
47
52
|
};
|
|
48
53
|
}
|
|
49
|
-
//# sourceMappingURL=upgradeCommands.js.map
|
|
@@ -7,7 +7,7 @@ import { classifyUpgradeOutcome, isBlockedUpgradeOutcome, shouldIncludeCrossMajo
|
|
|
7
7
|
import { resolveInvokedUpdateChannel } from "./channels.js";
|
|
8
8
|
import { buildUpgradeCommands } from "./upgradeCommands.js";
|
|
9
9
|
import { pendingRuntimeMigrationItems } from "./projectIntegration.js";
|
|
10
|
-
import { planLegacyAgentCleanupItems, planLegacyCapabilityAgentCleanupItems, } from "./legacyAgentCleanup.js";
|
|
10
|
+
import { REMOVE_LEGACY_AGENT_ACTION, planLegacyAgentCleanupItems, planLegacyCapabilityAgentCleanupItems, } from "./legacyAgentCleanup.js";
|
|
11
11
|
import { MIGRATION_STATUSES, applyMigrationPhases, delegatePlanLifecycleToEntityCutover, detectV1ArtifactPairs, dryRunMigration, hasPendingPlanLifecycleMigration, } from "./migrateArtifactsV2ToV3.js";
|
|
12
12
|
import { runLifecycleUpgrade, } from "./lifecycleUpgrade.js";
|
|
13
13
|
import { acquireUpgradeLock, releaseUpgradeLock } from "./upgradeLock.js";
|
|
@@ -168,7 +168,7 @@ function entityReadinessPhase(project, sourceRoot, pendingV1Artifacts, selected,
|
|
|
168
168
|
action: empty ? "unsupported-state-source" : "entity-cutover",
|
|
169
169
|
message: empty
|
|
170
170
|
? "marker-absent state has no recognized v2 entity input; preserve it and follow the manual source recovery instructions in UPGRADE.md"
|
|
171
|
-
: `${cutover.entityCount} entity record(s) are ready for marker-last Git cutover`,
|
|
171
|
+
: `${cutover.entityCount} entity record(s) are ready for marker-last Git cutover${cutover.todoReconciliation ? "; apply also journals TODO visible IDs, Markdown-owned public baselines, activation, canonical Markdown, and the authority marker" : ""}`,
|
|
172
172
|
}]);
|
|
173
173
|
}
|
|
174
174
|
catch (error) {
|
|
@@ -196,6 +196,9 @@ function lifecyclePhase(result) {
|
|
|
196
196
|
message: "summary only; selected native Agentera resource cleanup outcomes are reported under lifecycle.nativeResourceCleanup",
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
+
function isIndependentLegacyAgentCollision(phase, item) {
|
|
200
|
+
return phase.name === "cleanup" && item.action === REMOVE_LEGACY_AGENT_ACTION && item.status === "blocked";
|
|
201
|
+
}
|
|
199
202
|
export function buildUpgradePlan(args) {
|
|
200
203
|
if (args.runtime) {
|
|
201
204
|
throw new Error(`--runtime ${args.runtime} is retired; use the shared skill at ~/.agents/skills/agentera plus the CLI and remove --runtime`);
|
|
@@ -255,6 +258,42 @@ function buildUpgradePlanUnlocked(args, home, project, activeUpgradeLockPaths) {
|
|
|
255
258
|
channel,
|
|
256
259
|
});
|
|
257
260
|
const crossMajorBoundary = crossMajorBoundaryApplies(install, sourceRoot);
|
|
261
|
+
if (args.legacyCleanup) {
|
|
262
|
+
const lifecycle = runLifecycleUpgrade({
|
|
263
|
+
home,
|
|
264
|
+
appHome: installRoot,
|
|
265
|
+
apply: Boolean(args.yes),
|
|
266
|
+
resourceCleanup: args.legacyCleanup,
|
|
267
|
+
});
|
|
268
|
+
const phases = [lifecyclePhase(lifecycle)];
|
|
269
|
+
const summary = aggregateSummary(phases);
|
|
270
|
+
const status = workflowStatus(summary);
|
|
271
|
+
const commands = buildUpgradeCommands({
|
|
272
|
+
project,
|
|
273
|
+
installRoot: crossMajorBoundary ? installRoot : null,
|
|
274
|
+
channel,
|
|
275
|
+
legacyCleanup: args.legacyCleanup,
|
|
276
|
+
cwdDefault: true,
|
|
277
|
+
});
|
|
278
|
+
return {
|
|
279
|
+
schemaVersion: UPGRADE_PREVIEW_SCHEMA,
|
|
280
|
+
mode: args.yes ? "apply" : "plan",
|
|
281
|
+
status,
|
|
282
|
+
lifecycleStatus: lifecycleStatusFromWorkflow(status, args.yes ? "apply" : "plan"),
|
|
283
|
+
channel,
|
|
284
|
+
install,
|
|
285
|
+
upgradeOutcome,
|
|
286
|
+
crossMajorBoundary,
|
|
287
|
+
project,
|
|
288
|
+
appHome: installRoot,
|
|
289
|
+
home,
|
|
290
|
+
phases,
|
|
291
|
+
lifecycle,
|
|
292
|
+
summary,
|
|
293
|
+
dryRunCommand: summary.pending > 0 ? commands.dryRunCommand : null,
|
|
294
|
+
applyCommand: summary.pending > 0 ? commands.applyCommand : null,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
258
297
|
const phaseFilter = selectedPhases(args.only);
|
|
259
298
|
const migrationCtx = {
|
|
260
299
|
appHome: installRoot,
|
|
@@ -275,8 +314,10 @@ function buildUpgradePlanUnlocked(args, home, project, activeUpgradeLockPaths) {
|
|
|
275
314
|
&& channel.distributionMajor >= 3
|
|
276
315
|
&& !args.only
|
|
277
316
|
&& !args.legacyCleanup;
|
|
278
|
-
const pendingCleanup =
|
|
279
|
-
|
|
317
|
+
const pendingCleanup = [
|
|
318
|
+
...planLegacyAgentCleanupItems(migrationCtx),
|
|
319
|
+
...planLegacyCapabilityAgentCleanupItems(migrationCtx),
|
|
320
|
+
].some((item) => item.status !== "noop");
|
|
280
321
|
const runMigration = crossMajorMigration || projectEntityCutover || pendingRuntimeSync || pendingV1Artifacts || pendingPlanLifecycleMigration || pendingCleanup;
|
|
281
322
|
const phases = [];
|
|
282
323
|
if (phaseFilter.has("detect")) {
|
|
@@ -392,7 +433,7 @@ export function validateUpgradeApply(args, plan) {
|
|
|
392
433
|
if (plan.crossMajorBoundary && args.only && args.only.length > 0) {
|
|
393
434
|
return "cross-major v2→v3 apply must run as one full upgrade --yes; --only is preview-only at this boundary";
|
|
394
435
|
}
|
|
395
|
-
if (isBlockedUpgradeOutcome(plan.upgradeOutcome)) {
|
|
436
|
+
if (!args.legacyCleanup && isBlockedUpgradeOutcome(plan.upgradeOutcome)) {
|
|
396
437
|
return plan.upgradeOutcome.message ?? "upgrade blocked";
|
|
397
438
|
}
|
|
398
439
|
const appPhases = plan.phases.filter((phase) => phase.name !== "lifecycle");
|
|
@@ -400,11 +441,14 @@ export function validateUpgradeApply(args, plan) {
|
|
|
400
441
|
const applyBlockingPhases = entityImportPending
|
|
401
442
|
? appPhases.filter((phase) => ["detect", "artifacts", "entities"].includes(phase.name))
|
|
402
443
|
: appPhases;
|
|
403
|
-
|
|
404
|
-
|
|
444
|
+
const blockingItems = applyBlockingPhases.flatMap((phase) => phase.items.filter((item) => (item.status === "blocked" || item.status === "failed") && !isIndependentLegacyAgentCollision(phase, item)));
|
|
445
|
+
if (blockingItems.length > 0) {
|
|
446
|
+
return blockingItems[0]?.message
|
|
405
447
|
?? "upgrade preflight is blocked; no changes were applied";
|
|
406
448
|
}
|
|
407
|
-
if (
|
|
449
|
+
if (!args.legacyCleanup
|
|
450
|
+
&&
|
|
451
|
+
plan.crossMajorBoundary &&
|
|
408
452
|
!shouldIncludeCrossMajorPlanItems(plan.channel, plan.upgradeOutcome)) {
|
|
409
453
|
return ("cross-major v2→v3 migration requires the development channel while stable tracks 2.x; " +
|
|
410
454
|
"run the same command with --dry-run on --channel development, then apply with --yes");
|
|
@@ -478,4 +522,3 @@ export function sortKeysDeep(value) {
|
|
|
478
522
|
return value;
|
|
479
523
|
}
|
|
480
524
|
export { MAJOR_BOUNDARY_ITEM_TAG };
|
|
481
|
-
//# sourceMappingURL=upgradeOrchestrator.js.map
|
|
@@ -12,4 +12,3 @@ export function projectUsesV3CapabilityInstructionModules(projectRoot) {
|
|
|
12
12
|
const root = path.resolve(projectRoot);
|
|
13
13
|
return Object.keys(CAPABILITY_INSTRUCTIONS).every((name) => isFile(path.join(root, INSTRUCTION_MODULE_ROOT, name, "instructions.ts")));
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=v3CapabilitySurface.js.map
|