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
|
@@ -5,9 +5,11 @@ import { resolveDoctorInstallRoot, resolveSourceRootStrict, } from "../../upgrad
|
|
|
5
5
|
import { runNpmSmokeChecks } from "../../setup/smokeChecks.js";
|
|
6
6
|
import { APP_MANUAL_REVIEW_NEEDED, APP_MIGRATION_NEEDED, APP_OUTDATED, APP_REPAIR_NEEDED, APP_UP_TO_DATE, appLifecycleActionNoun, buildDoctorStatus, EXPECTED_STATE_COMMANDS, doctorParityJsonEnvelope, } from "../../upgrade/doctor.js";
|
|
7
7
|
import { classifyInstall } from "../../upgrade/compatibility.js";
|
|
8
|
-
import { prependCoexistenceDoctorSection, resolveCoexistenceDoctorLines, } from "../../upgrade/coexistenceProbe.js";
|
|
9
8
|
import { prependNextMajorDoctorSection, resolveNextMajorDoctorLines, } from "../../upgrade/nextMajorDoctor.js";
|
|
10
9
|
import { diagnoseCanonicalSkill } from "../../setup/sharedSkill.js";
|
|
10
|
+
import { diagnoseRetiredResources } from "../../upgrade/retiredResourceDiagnostics.js";
|
|
11
|
+
import { commandText } from "../../upgrade/upgradeCommands.js";
|
|
12
|
+
import { inspectTodoReconciliationState } from "../../state/todoReconciliationInspection.js";
|
|
11
13
|
const PLAIN_STATUS = {
|
|
12
14
|
pending: "ready to fix",
|
|
13
15
|
applied: "fixed",
|
|
@@ -24,7 +26,36 @@ const PLAIN_STATUS = {
|
|
|
24
26
|
function plainStatus(value) {
|
|
25
27
|
return PLAIN_STATUS[value] ?? value.replace(/_/g, " ").replace(/-/g, " ");
|
|
26
28
|
}
|
|
27
|
-
|
|
29
|
+
function previewCommand(resource, context) {
|
|
30
|
+
return commandText([
|
|
31
|
+
"npx",
|
|
32
|
+
"-y",
|
|
33
|
+
"agentera@next",
|
|
34
|
+
"doctor",
|
|
35
|
+
"--home",
|
|
36
|
+
context.home,
|
|
37
|
+
"--project",
|
|
38
|
+
context.project,
|
|
39
|
+
"--install-root",
|
|
40
|
+
context.installRoot,
|
|
41
|
+
"--retired-resource",
|
|
42
|
+
resource.id,
|
|
43
|
+
"--format",
|
|
44
|
+
"json",
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
function doctorRetiredResources(diagnosis, context) {
|
|
48
|
+
return {
|
|
49
|
+
...diagnosis,
|
|
50
|
+
resources: diagnosis.resources.map((resource) => ({
|
|
51
|
+
id: resource.id,
|
|
52
|
+
status: resource.status,
|
|
53
|
+
evidence: resource.evidence,
|
|
54
|
+
preview_command: previewCommand(resource, context),
|
|
55
|
+
})),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export function renderDoctorStatus(status, retiredResources) {
|
|
28
59
|
const actionNoun = appLifecycleActionNoun(String(status.status));
|
|
29
60
|
const lines = [
|
|
30
61
|
"Agentera doctor",
|
|
@@ -42,6 +73,31 @@ export function renderDoctorStatus(status) {
|
|
|
42
73
|
if (signal.missingCommands && signal.missingCommands.length > 0) {
|
|
43
74
|
lines.push(` Missing command: ${signal.missingCommands.join(", ")}`);
|
|
44
75
|
}
|
|
76
|
+
if (signal.kind === "todo_reconciliation") {
|
|
77
|
+
if (signal.reconciliationState)
|
|
78
|
+
lines.push(` Reconciliation state: ${signal.reconciliationState}`);
|
|
79
|
+
if (signal.reconciliationCounts) {
|
|
80
|
+
const counts = ["matched", "converted", "retained", "duplicate", "stale", "conflicting"]
|
|
81
|
+
.filter((name) => name in signal.reconciliationCounts)
|
|
82
|
+
.map((name) => `${name}=${signal.reconciliationCounts[name]}`)
|
|
83
|
+
.join(" | ");
|
|
84
|
+
lines.push(` Counts: ${counts} | omitted=${String(signal.reconciliationOmittedCount ?? 0)}`);
|
|
85
|
+
}
|
|
86
|
+
if (signal.previewCommand)
|
|
87
|
+
lines.push(` Preview: ${signal.previewCommand}`);
|
|
88
|
+
if (signal.applyCommand)
|
|
89
|
+
lines.push(` Apply: ${signal.applyCommand}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const resources = Array.isArray(retiredResources?.resources) ? retiredResources.resources : [];
|
|
94
|
+
const todoReconciliation = status.signals?.some((signal) => signal.kind === "todo_reconciliation") ?? false;
|
|
95
|
+
if (resources.length > 0) {
|
|
96
|
+
lines.push("");
|
|
97
|
+
lines.push("Retired native resources:");
|
|
98
|
+
for (const resource of resources) {
|
|
99
|
+
lines.push(` - action required: ${String(resource.id)}`);
|
|
100
|
+
lines.push(` Preview: ${String(resource.preview_command)}`);
|
|
45
101
|
}
|
|
46
102
|
}
|
|
47
103
|
if (status.status === APP_UP_TO_DATE) {
|
|
@@ -60,6 +116,14 @@ export function renderDoctorStatus(status) {
|
|
|
60
116
|
lines.push(" 3. Then retry Agentera once a retry command is available.");
|
|
61
117
|
}
|
|
62
118
|
}
|
|
119
|
+
else if (todoReconciliation) {
|
|
120
|
+
lines.push("");
|
|
121
|
+
lines.push("Next: run the reported TODO reconciliation preview, review its bounded effect, then use its exact apply_command.");
|
|
122
|
+
}
|
|
123
|
+
else if (resources.length > 0) {
|
|
124
|
+
lines.push("");
|
|
125
|
+
lines.push("Next: review each read-only retirement preview before any explicit cleanup.");
|
|
126
|
+
}
|
|
63
127
|
else {
|
|
64
128
|
lines.push("");
|
|
65
129
|
lines.push("Next: choose a safer Agentera directory, or use `--force` only after checking the directory is safe to replace.");
|
|
@@ -101,6 +165,40 @@ export function cmdDoctor(args, io = {}) {
|
|
|
101
165
|
expectedVersion: args.expectedVersion ?? null,
|
|
102
166
|
expectedCommands,
|
|
103
167
|
});
|
|
168
|
+
const todoReconciliation = inspectTodoReconciliationState(project, sourceRoot);
|
|
169
|
+
if (todoReconciliation?.status === "action_required") {
|
|
170
|
+
status.signals.push({
|
|
171
|
+
status: APP_MANUAL_REVIEW_NEEDED,
|
|
172
|
+
kind: "todo_reconciliation",
|
|
173
|
+
message: `action-required: TODO reconciliation is ${todoReconciliation.state === "inactive" ? "inactive" : todoReconciliation.state === "unsafe_active" ? "unsafe active" : "in an invalid lifecycle state"}`,
|
|
174
|
+
reconciliationState: todoReconciliation.state,
|
|
175
|
+
reconciliationCounts: todoReconciliation.counts,
|
|
176
|
+
reconciliationOmittedCount: todoReconciliation.omitted_count,
|
|
177
|
+
previewCommand: todoReconciliation.preview_command,
|
|
178
|
+
applyCommand: todoReconciliation.apply_command,
|
|
179
|
+
recoveryCommand: todoReconciliation.recovery_command,
|
|
180
|
+
});
|
|
181
|
+
if (status.status === APP_UP_TO_DATE)
|
|
182
|
+
status.status = APP_MANUAL_REVIEW_NEEDED;
|
|
183
|
+
}
|
|
184
|
+
const retiredDiagnosis = diagnoseRetiredResources({
|
|
185
|
+
home,
|
|
186
|
+
project,
|
|
187
|
+
installRoot,
|
|
188
|
+
resourceId: args.retiredResource ?? null,
|
|
189
|
+
});
|
|
190
|
+
const retiredResources = doctorRetiredResources(retiredDiagnosis, { home, project, installRoot });
|
|
191
|
+
if (retiredDiagnosis.status === "action_required") {
|
|
192
|
+
status.signals.push({
|
|
193
|
+
status: APP_MANUAL_REVIEW_NEEDED,
|
|
194
|
+
kind: "retired_native_resources",
|
|
195
|
+
message: "retired native resource candidates need ownership review before cleanup",
|
|
196
|
+
resourceIds: retiredDiagnosis.resources.map((resource) => resource.id),
|
|
197
|
+
omittedResourceCount: retiredDiagnosis.omittedResourceCount,
|
|
198
|
+
});
|
|
199
|
+
if (status.status === APP_UP_TO_DATE)
|
|
200
|
+
status.status = APP_MANUAL_REVIEW_NEEDED;
|
|
201
|
+
}
|
|
104
202
|
const sharedSkill = diagnoseCanonicalSkill(home);
|
|
105
203
|
let smokeReport = null;
|
|
106
204
|
if (args.smoke) {
|
|
@@ -111,17 +209,13 @@ export function cmdDoctor(args, io = {}) {
|
|
|
111
209
|
if ((args.format ?? "text") === "json") {
|
|
112
210
|
const payload = doctorParityJsonEnvelope(status);
|
|
113
211
|
payload.shared_skill = sharedSkill;
|
|
212
|
+
payload.retired_resources = retiredResources;
|
|
114
213
|
if (smokeReport)
|
|
115
214
|
payload.smoke = smokeReport;
|
|
116
215
|
out(pyJsonIndentSorted(payload) + "\n");
|
|
117
216
|
}
|
|
118
217
|
else {
|
|
119
218
|
const install = classifyInstall({ appHome: installRoot, sourceRoot });
|
|
120
|
-
const coexistenceLines = resolveCoexistenceDoctorLines({
|
|
121
|
-
home,
|
|
122
|
-
sourceRoot,
|
|
123
|
-
env: { ...process.env, HOME: home },
|
|
124
|
-
});
|
|
125
219
|
const nextMajorLines = resolveNextMajorDoctorLines({
|
|
126
220
|
sourceRoot,
|
|
127
221
|
home,
|
|
@@ -129,7 +223,9 @@ export function cmdDoctor(args, io = {}) {
|
|
|
129
223
|
install,
|
|
130
224
|
env: process.env,
|
|
131
225
|
});
|
|
132
|
-
const body =
|
|
226
|
+
const body = prependNextMajorDoctorSection(renderDoctorStatus(status, retiredResources), nextMajorLines) +
|
|
227
|
+
`\nShared skill\n ${String(sharedSkill.status)}: ${String(sharedSkill.message)}\n path: ${String(sharedSkill.path)}\n` +
|
|
228
|
+
(smokeReport ? renderDoctorSmoke(smokeReport) : "");
|
|
133
229
|
out(body + "\n");
|
|
134
230
|
}
|
|
135
231
|
if (args.smoke) {
|
|
@@ -139,4 +235,3 @@ export function cmdDoctor(args, io = {}) {
|
|
|
139
235
|
}
|
|
140
236
|
return status.status === APP_UP_TO_DATE && sharedSkill.status === "pass" ? 0 : 1;
|
|
141
237
|
}
|
|
142
|
-
//# sourceMappingURL=doctor.js.map
|
|
@@ -159,4 +159,3 @@ export function cmdLint(args, io = {}) {
|
|
|
159
159
|
const operationalFailure = payload.checks.some((check) => check.status === "fail" && isVerbosityAuthorityError(check.detail));
|
|
160
160
|
return operationalFailure || (args.strict && payload.status === "fail") ? 1 : 0;
|
|
161
161
|
}
|
|
162
|
-
//# sourceMappingURL=lint.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { truncateCodePoints } from "../../../core/text.js";
|
|
2
2
|
import { entityListFamily } from "../../../state/entityRetrievalHelp.js";
|
|
3
|
+
import { preCutoverCommand } from "../../preCutoverCommand.js";
|
|
3
4
|
import { STATE_FAMILY_FALLBACK_COMMANDS } from "../../capabilityContext/types.js";
|
|
4
5
|
/**
|
|
5
6
|
* Bounded default decision brief for the bare `agentera prime --format json`
|
|
@@ -17,10 +18,8 @@ import { STATE_FAMILY_FALLBACK_COMMANDS } from "../../capabilityContext/types.js
|
|
|
17
18
|
* The byte gate is deterministic pretty-JSON UTF-8 measurement
|
|
18
19
|
* (Buffer.byteLength(JSON.stringify(brief, null, 2) + "\n", "utf8")); an
|
|
19
20
|
* over-budget brief is rejected in favor of a bounded degraded envelope.
|
|
20
|
-
* Diagnostics
|
|
21
|
-
*
|
|
22
|
-
* brief_omission_contract and references/artifacts/state-storage-authority.yaml
|
|
23
|
-
* budgets.startup.surfaces.prime_briefing.
|
|
21
|
+
* Diagnostics stay on stderr and are measured separately. The state-storage
|
|
22
|
+
* authority owns the briefing budget.
|
|
24
23
|
*/
|
|
25
24
|
/** Authoritative byte budget for the default bare prime decision brief.
|
|
26
25
|
* Mirrors references/artifacts/state-storage-authority.yaml
|
|
@@ -47,28 +46,26 @@ export function briefByteGate(value, budget = PRIME_BRIEF_MAX_UTF8_BYTES) {
|
|
|
47
46
|
return { accepted: bytes <= budget, bytes };
|
|
48
47
|
}
|
|
49
48
|
/** Rich-state sub-detail projected out of the default brief, each with a named
|
|
50
|
-
* authoritative recovery command
|
|
51
|
-
* references/cli/prime-consumer-compatibility.yaml. */
|
|
49
|
+
* authoritative recovery command. */
|
|
52
50
|
const planTaskFamily = entityListFamily("plan_tasks");
|
|
53
|
-
const planTaskListRecovery = `
|
|
51
|
+
const planTaskListRecovery = preCutoverCommand(`state ${planTaskFamily.commandTokens.join(" ")} list --format json`);
|
|
54
52
|
const OMITTED_RICH_STATE = [
|
|
55
|
-
{ field: "startup.path_diagnostics", reason: "startup_path_diagnostics", recovery: "
|
|
53
|
+
{ field: "startup.path_diagnostics", reason: "startup_path_diagnostics", recovery: preCutoverCommand("doctor --format json") },
|
|
56
54
|
{ field: "plan.tasks", reason: "plan_task_detail", recovery: planTaskListRecovery },
|
|
57
55
|
{ field: "plan.archived_plans", reason: "archive_catalog", recovery: STATE_FAMILY_FALLBACK_COMMANDS.plan },
|
|
58
56
|
{ field: "plan.diagnostics", reason: "plan_diagnostics", recovery: STATE_FAMILY_FALLBACK_COMMANDS.plan },
|
|
59
57
|
{ field: "history.progress.entries", reason: "startup_history_entries", recovery: STATE_FAMILY_FALLBACK_COMMANDS.progress },
|
|
60
58
|
{ field: "history.decisions.entries", reason: "startup_history_entries", recovery: STATE_FAMILY_FALLBACK_COMMANDS.decisions },
|
|
61
59
|
{ field: "history.health.entries", reason: "startup_history_entries", recovery: STATE_FAMILY_FALLBACK_COMMANDS.health },
|
|
62
|
-
{ field: "project_integration.phases", reason: "phase_blockers", recovery: "
|
|
63
|
-
{ field: "source_contract.artifact_writes.artifacts", reason: "writer_contract_detail", recovery: "agentera schema --format json" },
|
|
60
|
+
{ field: "project_integration.phases", reason: "phase_blockers", recovery: preCutoverCommand("doctor --format json") },
|
|
64
61
|
{ field: "docs.source_contract", reason: "docs_state_families", recovery: STATE_FAMILY_FALLBACK_COMMANDS.docs },
|
|
65
|
-
{ field: "profile.bounded_signals", reason: "profile_signal_detail", recovery: "
|
|
62
|
+
{ field: "profile.bounded_signals", reason: "profile_signal_detail", recovery: preCutoverCommand("report profile-grounding --format json") },
|
|
66
63
|
];
|
|
67
64
|
/** Maximum number of ranked next_action alternatives retained in the brief.
|
|
68
65
|
* The recommended entry is always kept; overflow alternatives recover via the
|
|
69
66
|
* state-derived readiness cascade rather than raw artifact access. */
|
|
70
67
|
const BRIEF_NEXT_ACTION_ALTERNATIVES = 3;
|
|
71
|
-
const PATH_DIAGNOSTICS_RECOVERY = "
|
|
68
|
+
const PATH_DIAGNOSTICS_RECOVERY = preCutoverCommand("doctor --format json");
|
|
72
69
|
/** Code-point cap for routing-essential free-text scalars retained in the brief
|
|
73
70
|
* (e.g. progress.latest.what/next). Matches the boundStartupValue 200-cp
|
|
74
71
|
* limit already applied to context payloads so the brief never lets a single
|
|
@@ -466,44 +463,6 @@ function briefCapabilityContext(value, maxChars) {
|
|
|
466
463
|
}
|
|
467
464
|
return out;
|
|
468
465
|
}
|
|
469
|
-
function briefCapabilityStartup(startup, maxChars) {
|
|
470
|
-
if (!isObject(startup))
|
|
471
|
-
return {};
|
|
472
|
-
const out = {};
|
|
473
|
-
if (typeof startup.complete_for_capability_startup === "boolean") {
|
|
474
|
-
out.complete_for_capability_startup = startup.complete_for_capability_startup;
|
|
475
|
-
}
|
|
476
|
-
if (typeof startup.raw_artifact_reads_required === "boolean") {
|
|
477
|
-
out.raw_artifact_reads_required = startup.raw_artifact_reads_required;
|
|
478
|
-
}
|
|
479
|
-
const policy = boundedString(startup.raw_artifact_read_policy, maxChars);
|
|
480
|
-
if (policy !== undefined)
|
|
481
|
-
out.raw_artifact_read_policy = policy;
|
|
482
|
-
for (const [key, maxItems] of [
|
|
483
|
-
["available_state", 64],
|
|
484
|
-
["missing_state", 16],
|
|
485
|
-
["confidence_caveats", 8],
|
|
486
|
-
["cli_fallback", 8],
|
|
487
|
-
]) {
|
|
488
|
-
const bounded = boundedStringList(startup[key], maxItems, maxChars);
|
|
489
|
-
if (bounded !== undefined)
|
|
490
|
-
out[key] = bounded;
|
|
491
|
-
}
|
|
492
|
-
return out;
|
|
493
|
-
}
|
|
494
|
-
function briefArtifactWrites(writes, maxChars) {
|
|
495
|
-
// Keep the discovery pointer (required by the compatibility boundary test)
|
|
496
|
-
// and schema identity; the full writer-operation matrix recovers via schema.
|
|
497
|
-
if (!isObject(writes))
|
|
498
|
-
return {};
|
|
499
|
-
const out = {};
|
|
500
|
-
for (const key of ["schemaVersion", "discovery_command"]) {
|
|
501
|
-
const bounded = boundedString(writes[key], maxChars);
|
|
502
|
-
if (bounded !== undefined)
|
|
503
|
-
out[key] = bounded;
|
|
504
|
-
}
|
|
505
|
-
return out;
|
|
506
|
-
}
|
|
507
466
|
function briefSourceContract(sourceContract, projection = "normal") {
|
|
508
467
|
if (!isObject(sourceContract))
|
|
509
468
|
return {};
|
|
@@ -535,27 +494,6 @@ function briefSourceContract(sourceContract, projection = "normal") {
|
|
|
535
494
|
out.capability_context = { fetch_command: capabilityContext.fetch_command };
|
|
536
495
|
}
|
|
537
496
|
}
|
|
538
|
-
if (isObject(sourceContract.capability_startup)) {
|
|
539
|
-
if (projection === "irreducible") {
|
|
540
|
-
const startup = sourceContract.capability_startup;
|
|
541
|
-
const minimalStartup = {};
|
|
542
|
-
if (typeof startup.complete_for_capability_startup === "boolean") {
|
|
543
|
-
minimalStartup.complete_for_capability_startup = startup.complete_for_capability_startup;
|
|
544
|
-
}
|
|
545
|
-
if (typeof startup.raw_artifact_reads_required === "boolean") {
|
|
546
|
-
minimalStartup.raw_artifact_reads_required = startup.raw_artifact_reads_required;
|
|
547
|
-
}
|
|
548
|
-
out.capability_startup = minimalStartup;
|
|
549
|
-
}
|
|
550
|
-
else {
|
|
551
|
-
out.capability_startup = briefCapabilityStartup(sourceContract.capability_startup, maxChars);
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
if (isObject(sourceContract.artifact_writes)) {
|
|
555
|
-
if (projection !== "irreducible") {
|
|
556
|
-
out.artifact_writes = briefArtifactWrites(sourceContract.artifact_writes, maxChars);
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
497
|
return out;
|
|
560
498
|
}
|
|
561
499
|
/** Project the full orientation payload to a bounded decision brief. The brief
|
|
@@ -587,10 +525,10 @@ export function briefOrientationPayload(payload, options = {}) {
|
|
|
587
525
|
/** Attach the brief meta block and settle `utf8_bytes` to a fixed point so the
|
|
588
526
|
* reported size equals the actual emitted byte count (otherwise the digits of
|
|
589
527
|
* `utf8_bytes` itself would change the measurement). */
|
|
590
|
-
function withBriefMeta(body,
|
|
528
|
+
function withBriefMeta(body, projection, budget, error) {
|
|
591
529
|
const meta = {
|
|
592
530
|
budget_utf8_bytes: budget,
|
|
593
|
-
|
|
531
|
+
projection,
|
|
594
532
|
path_diagnostics_recovery: PATH_DIAGNOSTICS_RECOVERY,
|
|
595
533
|
omitted_rich_state: OMITTED_RICH_STATE.map((entry) => ({ ...entry })),
|
|
596
534
|
};
|
|
@@ -651,7 +589,7 @@ function projectBriefBody(payload) {
|
|
|
651
589
|
out[key] = briefSource(value);
|
|
652
590
|
break;
|
|
653
591
|
default:
|
|
654
|
-
// Command/
|
|
592
|
+
// Command/outcome/mode, bounded ordinary state, shared-skill diagnosis,
|
|
655
593
|
// bespoke context pointers, and active conditional fields pass through
|
|
656
594
|
// at full fidelity.
|
|
657
595
|
out[key] = value;
|
|
@@ -666,7 +604,7 @@ function boundedEnvelopeScalar(value, fallback) {
|
|
|
666
604
|
function degradedBody(payload, projection) {
|
|
667
605
|
const out = {
|
|
668
606
|
command: boundedEnvelopeScalar(payload.command, "prime"),
|
|
669
|
-
|
|
607
|
+
outcome: boundedEnvelopeScalar(payload.outcome, "ok"),
|
|
670
608
|
mode: boundedEnvelopeScalar(payload.mode, "unknown"),
|
|
671
609
|
state_presence: briefStatePresence(payload.state_presence),
|
|
672
610
|
source_contract: briefSourceContract(payload.source_contract, projection),
|
|
@@ -681,12 +619,14 @@ function degradedBody(payload, projection) {
|
|
|
681
619
|
out.shared_skill = briefSharedSkill(payload.shared_skill);
|
|
682
620
|
if ("project_integration" in payload)
|
|
683
621
|
out.project_integration = briefProjectIntegration(payload.project_integration);
|
|
622
|
+
if ("todo_reconciliation" in payload)
|
|
623
|
+
out.todo_reconciliation = payload.todo_reconciliation;
|
|
624
|
+
if ("startup" in payload)
|
|
625
|
+
out.startup = payload.startup;
|
|
684
626
|
if ("health" in payload)
|
|
685
627
|
out.health = briefHealth(payload.health);
|
|
686
628
|
if ("todo" in payload)
|
|
687
629
|
out.todo = payload.todo;
|
|
688
|
-
if ("issues" in payload)
|
|
689
|
-
out.issues = payload.issues;
|
|
690
630
|
if ("progress" in payload)
|
|
691
631
|
out.progress = briefProgress(payload.progress);
|
|
692
632
|
if ("attention" in payload)
|
|
@@ -735,7 +675,7 @@ export class BriefBudgetError extends Error {
|
|
|
735
675
|
budgetBytes;
|
|
736
676
|
minimumBytes;
|
|
737
677
|
constructor(budgetBytes, minimumBytes) {
|
|
738
|
-
super(`brief budget ${budgetBytes} bytes cannot contain the minimum routing envelope (${minimumBytes} bytes); increase the budget or use --
|
|
678
|
+
super(`brief budget ${budgetBytes} bytes cannot contain the minimum routing envelope (${minimumBytes} bytes); increase the budget or use prime --context status`);
|
|
739
679
|
this.name = "BriefBudgetError";
|
|
740
680
|
this.budgetBytes = budgetBytes;
|
|
741
681
|
this.minimumBytes = minimumBytes;
|
|
@@ -744,14 +684,14 @@ export class BriefBudgetError extends Error {
|
|
|
744
684
|
function degradedBriefEnvelope(payload, budget, attemptedBytes, mode) {
|
|
745
685
|
const detailedMeta = {
|
|
746
686
|
budget_utf8_bytes: budget,
|
|
747
|
-
|
|
687
|
+
projection: "degraded",
|
|
748
688
|
attempted_utf8_bytes: attemptedBytes,
|
|
749
689
|
path_diagnostics_recovery: PATH_DIAGNOSTICS_RECOVERY,
|
|
750
690
|
omitted_rich_state: OMITTED_RICH_STATE.map((entry) => ({ ...entry })),
|
|
751
691
|
error: {
|
|
752
692
|
class: "brief_output_budget",
|
|
753
693
|
message: "the projected decision brief exceeded the authority byte budget; a bounded degraded envelope was emitted instead of the over-budget payload",
|
|
754
|
-
recovery:
|
|
694
|
+
recovery: `Run \`${preCutoverCommand("prime --context status --format json")}\` for status startup, or \`${preCutoverCommand("state <artifact> list --format json")}\` for a specific record family.`,
|
|
755
695
|
},
|
|
756
696
|
};
|
|
757
697
|
const body = (projection) => mode === "status_routing"
|
|
@@ -766,13 +706,13 @@ function degradedBriefEnvelope(payload, budget, attemptedBytes, mode) {
|
|
|
766
706
|
// when caller data would make the detailed degraded envelope too large.
|
|
767
707
|
const compactMeta = {
|
|
768
708
|
budget_utf8_bytes: budget,
|
|
769
|
-
|
|
709
|
+
projection: "degraded",
|
|
770
710
|
attempted_utf8_bytes: attemptedBytes,
|
|
771
711
|
path_diagnostics_recovery: PATH_DIAGNOSTICS_RECOVERY,
|
|
772
712
|
error: {
|
|
773
713
|
class: "brief_output_budget",
|
|
774
714
|
message: "the projected decision brief exceeded the authority byte budget; compact recovery metadata was emitted",
|
|
775
|
-
recovery:
|
|
715
|
+
recovery: `Run \`${preCutoverCommand("prime --context status --format json")}\` for status startup.`,
|
|
776
716
|
},
|
|
777
717
|
};
|
|
778
718
|
const compact = settledBriefEnvelope(body("compact"), compactMeta);
|
|
@@ -790,13 +730,13 @@ function degradedBriefEnvelope(payload, budget, attemptedBytes, mode) {
|
|
|
790
730
|
// over-budget JSON document would violate the public output contract.
|
|
791
731
|
const minimumMeta = {
|
|
792
732
|
budget_utf8_bytes: budget,
|
|
793
|
-
|
|
733
|
+
projection: "degraded",
|
|
794
734
|
attempted_utf8_bytes: attemptedBytes,
|
|
795
735
|
path_diagnostics_recovery: PATH_DIAGNOSTICS_RECOVERY,
|
|
796
736
|
error: {
|
|
797
737
|
class: "brief_output_budget",
|
|
798
738
|
message: "the configured budget cannot contain the detailed recovery envelope",
|
|
799
|
-
recovery:
|
|
739
|
+
recovery: `Increase the budget or run \`${preCutoverCommand("prime --context status --format json")}\`.`,
|
|
800
740
|
},
|
|
801
741
|
};
|
|
802
742
|
const minimum = settledBriefEnvelope(body("irreducible"), minimumMeta);
|
|
@@ -805,4 +745,3 @@ function degradedBriefEnvelope(payload, budget, attemptedBytes, mode) {
|
|
|
805
745
|
return minimum;
|
|
806
746
|
throw new BriefBudgetError(budget, minimumBytes);
|
|
807
747
|
}
|
|
808
|
-
//# sourceMappingURL=briefOrientation.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import { hasControlChars } from "../../argvalidate.js";
|
|
3
3
|
import { loadYamlMapping } from "../../../core/yaml.js";
|
|
4
|
+
import { preCutoverCommand } from "../../preCutoverCommand.js";
|
|
4
5
|
export const BUILD_EXECUTION_REQUEST_SCHEMA = "agentera.buildExecutionRequest.v1";
|
|
5
6
|
export const BUILD_EXECUTION_REQUEST_MAX_UTF8_BYTES = 32 * 1024;
|
|
6
7
|
export const BUILD_EXECUTION_REQUEST_MAX_ITEMS = 12;
|
|
@@ -35,7 +36,7 @@ function unreadableInput() {
|
|
|
35
36
|
return fail({
|
|
36
37
|
class: "invalid_format",
|
|
37
38
|
message: "Build execution request input must be one readable regular file or bounded stdin stream",
|
|
38
|
-
syntax: "
|
|
39
|
+
syntax: preCutoverCommand("prime --context build --input <file|-> --format json"),
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
42
|
function oversizedInput() {
|
|
@@ -162,4 +163,3 @@ export function loadBuildExecutionRequest(source, readStdin) {
|
|
|
162
163
|
},
|
|
163
164
|
};
|
|
164
165
|
}
|
|
165
|
-
//# sourceMappingURL=buildExecutionRequest.js.map
|
|
@@ -5,6 +5,7 @@ import { listHealthEntities } from "../../../state/healthEntities.js";
|
|
|
5
5
|
import { listPlanEntities, listPlanTaskEntities } from "../../../state/planEntities.js";
|
|
6
6
|
import { listObjectiveEntities, listExperimentEntities } from "../../../state/objectiveExperimentEntities.js";
|
|
7
7
|
import { assertTodoReconciliationReadable, listTodoDocsEntities, projectTodoReadEntities } from "../../../state/todoDocsEntities.js";
|
|
8
|
+
import { inspectTodoReconciliationState } from "../../../state/todoReconciliationInspection.js";
|
|
8
9
|
import { StateRetrievalFailure } from "../../../state/directRetrieval.js";
|
|
9
10
|
import { discoverEntities } from "../../../state/entityStorage.js";
|
|
10
11
|
import { summaryCaveat } from "../../../state/summaryEntityRead.js";
|
|
@@ -12,6 +13,7 @@ import { boundStartupValue, STARTUP_ARRAY_LIMIT } from "../../../state/startupPr
|
|
|
12
13
|
import { rememberPlanTaskIndex } from "../../planTaskIndex.js";
|
|
13
14
|
import { firstActionablePlanTask } from "../../capabilityContext/planState.js";
|
|
14
15
|
import { issueCounts } from "../../orientation.js";
|
|
16
|
+
import { preCutoverCommand } from "../../preCutoverCommand.js";
|
|
15
17
|
import { evaluateTodoReadinessQueue } from "../../todoReadinessSelection.js";
|
|
16
18
|
import { projectCurrentGlossaryCaveats } from "../../../state/progressGlossaryCaveat.js";
|
|
17
19
|
import { glossaryCaveatContract } from "../../../registries/glossaryCaveatContract.js";
|
|
@@ -36,6 +38,40 @@ function header(entry) {
|
|
|
36
38
|
function terminal(status) {
|
|
37
39
|
return ["complete", "completed", "closed", "done", "resolved", "retired", "superseded"].includes(String(status ?? "").toLowerCase());
|
|
38
40
|
}
|
|
41
|
+
function healthSummary(latest, history) {
|
|
42
|
+
if (!latest) {
|
|
43
|
+
return history
|
|
44
|
+
? { exists: true, status: "degraded", startup_outcome: "degraded", degraded_history: history }
|
|
45
|
+
: { exists: false, status: "absent", startup_outcome: "ok" };
|
|
46
|
+
}
|
|
47
|
+
const healthRecord = record(latest);
|
|
48
|
+
const grades = healthRecord.grades && typeof healthRecord.grades === "object" && !Array.isArray(healthRecord.grades)
|
|
49
|
+
? healthRecord.grades
|
|
50
|
+
: {};
|
|
51
|
+
const ranks = { A: 0, B: 1, C: 2, D: 3, F: 4 };
|
|
52
|
+
let worst = null;
|
|
53
|
+
for (const [dimension, grade] of Object.entries(grades)) {
|
|
54
|
+
const text = String(grade);
|
|
55
|
+
const rank = ranks[text.toUpperCase().slice(0, 1)] ?? -1;
|
|
56
|
+
if (worst === null || rank > worst[2])
|
|
57
|
+
worst = [dimension, text, rank];
|
|
58
|
+
}
|
|
59
|
+
const trajectory = String(healthRecord.trajectory ?? "");
|
|
60
|
+
const degrading = ["degrading", "declining", "worse"].includes(trajectory.toLowerCase()) || (worst !== null && worst[2] >= ranks.D);
|
|
61
|
+
return {
|
|
62
|
+
exists: true,
|
|
63
|
+
status: degrading ? "degraded" : "available",
|
|
64
|
+
startup_outcome: degrading ? "degraded" : "ok",
|
|
65
|
+
id: latest.id,
|
|
66
|
+
artifact: latest.artifact,
|
|
67
|
+
date: String(healthRecord.date ?? ""),
|
|
68
|
+
trajectory,
|
|
69
|
+
grade: worst?.[1] ?? "",
|
|
70
|
+
worst,
|
|
71
|
+
degrading,
|
|
72
|
+
...(history ? { degraded_history: history } : {}),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
39
75
|
function degradedHistory(artifact, totalSummaryCount) {
|
|
40
76
|
if (totalSummaryCount === 0)
|
|
41
77
|
return undefined;
|
|
@@ -44,15 +80,15 @@ function degradedHistory(artifact, totalSummaryCount) {
|
|
|
44
80
|
returned_count: 0,
|
|
45
81
|
omitted_count: totalSummaryCount,
|
|
46
82
|
retrieval: {
|
|
47
|
-
list: `
|
|
48
|
-
get: `
|
|
83
|
+
list: preCutoverCommand(`state ${artifact} list --limit 20 --format json`),
|
|
84
|
+
get: preCutoverCommand(`state ${artifact} get --id ID --format json`),
|
|
49
85
|
},
|
|
50
86
|
};
|
|
51
87
|
}
|
|
52
88
|
function projectedHistory(list, artifact, fullCount, summaryCount, degraded) {
|
|
53
89
|
const total = fullCount + summaryCount;
|
|
54
|
-
const listCommand = `
|
|
55
|
-
const getCommand = `
|
|
90
|
+
const listCommand = preCutoverCommand(`state ${artifact} list --limit 20 --format json`);
|
|
91
|
+
const getCommand = preCutoverCommand(`state ${artifact} get --id ID --format json`);
|
|
56
92
|
return {
|
|
57
93
|
schemaVersion: list.schemaVersion,
|
|
58
94
|
command: list.command,
|
|
@@ -74,7 +110,7 @@ function selected(entries, artifact) {
|
|
|
74
110
|
return entries[0];
|
|
75
111
|
const ids = entries.map((entry) => String(entry.id)).sort().join(", ");
|
|
76
112
|
const noun = artifact === "plan" ? "open plans" : "active objectives";
|
|
77
|
-
const list = `
|
|
113
|
+
const list = preCutoverCommand(`state ${artifact} list --format json`);
|
|
78
114
|
throw new StateRetrievalFailure({
|
|
79
115
|
schemaVersion: "agentera.stateFailure.v1",
|
|
80
116
|
status: "fail",
|
|
@@ -82,8 +118,8 @@ function selected(entries, artifact) {
|
|
|
82
118
|
class: "ambiguous",
|
|
83
119
|
artifact,
|
|
84
120
|
message: `multiple ${noun} require explicit selection: ${ids}`,
|
|
85
|
-
syntax: `
|
|
86
|
-
example: `
|
|
121
|
+
syntax: preCutoverCommand(`state ${artifact} get --id ID --format json`),
|
|
122
|
+
example: preCutoverCommand(`state ${artifact} get --id ${String(entries[0]?.id)} --format json`),
|
|
87
123
|
recovery: `Run ${list}, resolve the competing ${noun}, and retry prime.`,
|
|
88
124
|
},
|
|
89
125
|
}, 1);
|
|
@@ -92,6 +128,7 @@ function selected(entries, artifact) {
|
|
|
92
128
|
export function collectEntityOrientation(projectRoot, sourceRoot) {
|
|
93
129
|
assertTodoReconciliationReadable(projectRoot, sourceRoot);
|
|
94
130
|
const discovery = discoverEntities(projectRoot, sourceRoot);
|
|
131
|
+
const todoReconciliation = inspectTodoReconciliationState(projectRoot, sourceRoot, discovery);
|
|
95
132
|
const caveatContract = glossaryCaveatContract(path.join(sourceRoot, "references", "artifacts", "glossary-entry-contract.yaml"));
|
|
96
133
|
const glossaryCaveatProjection = projectCurrentGlossaryCaveats(discovery.entities, caveatContract);
|
|
97
134
|
const invalidProgress = (entity) => (entity.artifact === "progress" || ["progress_cycle", "progress_summary"].includes(entity.boundary ?? "")) &&
|
|
@@ -148,7 +185,7 @@ export function collectEntityOrientation(projectRoot, sourceRoot) {
|
|
|
148
185
|
const publicTaskEntries = taskEntries.slice(0, STARTUP_ARRAY_LIMIT);
|
|
149
186
|
const taskDetailOmitted = allTaskEntries.length > publicTaskEntries.length;
|
|
150
187
|
const taskRetrieval = selectedPlan
|
|
151
|
-
? { list: `
|
|
188
|
+
? { list: preCutoverCommand(`state plan tasks list ${String(selectedPlan.id)} --limit 100 --format json`), restart: preCutoverCommand(`state plan tasks list ${String(selectedPlan.id)} --limit 100 --format json`), get: preCutoverCommand("state plan tasks get --id ID --format json") }
|
|
152
189
|
: {};
|
|
153
190
|
const plan = selectedPlan ? {
|
|
154
191
|
exists: true,
|
|
@@ -188,23 +225,7 @@ export function collectEntityOrientation(projectRoot, sourceRoot) {
|
|
|
188
225
|
cycle_count: Number(progressList.counts?.total ?? progressEntries.length),
|
|
189
226
|
degraded_history: progressHistory,
|
|
190
227
|
} : { exists: false, status: "missing", cycle_count: 0 };
|
|
191
|
-
const
|
|
192
|
-
const healthRecord = record(latestHealth);
|
|
193
|
-
const grades = healthRecord.grades && typeof healthRecord.grades === "object" && !Array.isArray(healthRecord.grades)
|
|
194
|
-
? healthRecord.grades
|
|
195
|
-
: {};
|
|
196
|
-
const health = latestHealth ? {
|
|
197
|
-
exists: true,
|
|
198
|
-
id: latestHealth.id,
|
|
199
|
-
artifact: latestHealth.artifact,
|
|
200
|
-
date: String(healthRecord.date ?? ""),
|
|
201
|
-
trajectory: String(healthRecord.trajectory ?? ""),
|
|
202
|
-
grade: Object.values(grades).map(String).sort()[0] ?? "",
|
|
203
|
-
...(healthHistory ? { degraded_history: healthHistory } : {}),
|
|
204
|
-
} : healthEntries.length ? {
|
|
205
|
-
exists: true,
|
|
206
|
-
degraded_history: healthHistory,
|
|
207
|
-
} : { exists: false };
|
|
228
|
+
const health = healthSummary(fullHealthEntries[0], healthEntries.length ? healthHistory : undefined);
|
|
208
229
|
const activeObjective = selected(objectiveEntries, "objective");
|
|
209
230
|
const closedObjectiveCount = Number(closedObjectiveList.counts?.total ?? 0);
|
|
210
231
|
const objectiveRecord = record(activeObjective);
|
|
@@ -284,8 +305,7 @@ export function collectEntityOrientation(projectRoot, sourceRoot) {
|
|
|
284
305
|
});
|
|
285
306
|
// The opaque continuation cursor is already list-budget bounded and must stay
|
|
286
307
|
// byte-exact so omitted TODO detail remains recoverable.
|
|
287
|
-
const result = { ...projection, todoDetail, todoReadiness };
|
|
308
|
+
const result = { ...projection, todoDetail, todoReadiness, todoReconciliation };
|
|
288
309
|
rememberPlanTaskIndex(result.plan, allTaskEntries);
|
|
289
310
|
return result;
|
|
290
311
|
}
|
|
291
|
-
//# sourceMappingURL=collectEntityOrientation.js.map
|