agentera 3.0.0-dev.16 → 3.0.0-dev.18

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.
Files changed (69) hide show
  1. package/README.md +9 -5
  2. package/bundle/CHANGELOG.md +12 -0
  3. package/bundle/README.md +6 -2
  4. package/bundle/UPGRADE.md +45 -6
  5. package/bundle/references/adapters/package-manifest-interface-model.yaml +0 -4
  6. package/bundle/references/adapters/package-surface-characterization.md +4 -4
  7. package/bundle/references/adapters/runtime-feature-parity.md +10 -2
  8. package/bundle/references/adapters/runtime-lifecycle-authority.yaml +17 -0
  9. package/bundle/references/adapters/runtime-lifecycle-operation-contract.yaml +1 -0
  10. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +61 -1
  11. package/dist/cli/commands/prime/collectOrientationState.js +42 -33
  12. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -1
  13. package/dist/cli/commands/schema.js +12 -3
  14. package/dist/cli/commands/schema.js.map +1 -1
  15. package/dist/cli/commands/state/plan.js +82 -46
  16. package/dist/cli/commands/state/plan.js.map +1 -1
  17. package/dist/cli/help.js +1 -1
  18. package/dist/cli/help.js.map +1 -1
  19. package/dist/cli/orientation/attention.js +99 -1
  20. package/dist/cli/orientation/attention.js.map +1 -1
  21. package/dist/cli/orientation.js +44 -17
  22. package/dist/cli/orientation.js.map +1 -1
  23. package/dist/cli/planArtifacts.js +95 -0
  24. package/dist/cli/planArtifacts.js.map +1 -0
  25. package/dist/cli/planEvidence.js +158 -0
  26. package/dist/cli/planEvidence.js.map +1 -0
  27. package/dist/cli/prime-blob.js +1 -1
  28. package/dist/cli/prime-blob.js.map +1 -1
  29. package/dist/cli/stateQuery.js +1 -0
  30. package/dist/cli/stateQuery.js.map +1 -1
  31. package/dist/hooks/validateArtifact/schema.js +8 -2
  32. package/dist/hooks/validateArtifact/schema.js.map +1 -1
  33. package/dist/registries/runtimeAdapterRegistry.js +4 -1
  34. package/dist/registries/runtimeAdapterRegistry.js.map +1 -1
  35. package/dist/release/releaseMetadata.js +1 -1
  36. package/dist/release/releaseMetadata.js.map +1 -1
  37. package/dist/runtime/lifecycleAdapterContract.js +63 -41
  38. package/dist/runtime/lifecycleAdapterContract.js.map +1 -1
  39. package/dist/runtime/lifecycleAdapters.js +162 -103
  40. package/dist/runtime/lifecycleAdapters.js.map +1 -1
  41. package/dist/runtime/lifecycleAuthority.js +81 -31
  42. package/dist/runtime/lifecycleAuthority.js.map +1 -1
  43. package/dist/runtime/lifecycleOperationContract.js +4 -0
  44. package/dist/runtime/lifecycleOperationContract.js.map +1 -1
  45. package/dist/runtime/lifecycleOperations.js +10 -2
  46. package/dist/runtime/lifecycleOperations.js.map +1 -1
  47. package/dist/runtime/lifecycleSnapshot.js +290 -25
  48. package/dist/runtime/lifecycleSnapshot.js.map +1 -1
  49. package/dist/runtime/retiredRuntimeCleanup.js +15 -9
  50. package/dist/runtime/retiredRuntimeCleanup.js.map +1 -1
  51. package/dist/upgrade/channels.js +6 -8
  52. package/dist/upgrade/channels.js.map +1 -1
  53. package/dist/upgrade/compatibility.js +5 -0
  54. package/dist/upgrade/compatibility.js.map +1 -1
  55. package/dist/upgrade/doctor.js +14 -13
  56. package/dist/upgrade/doctor.js.map +1 -1
  57. package/dist/upgrade/lifecycleUpgrade.js +68 -27
  58. package/dist/upgrade/lifecycleUpgrade.js.map +1 -1
  59. package/dist/upgrade/projectIntegration.js +148 -69
  60. package/dist/upgrade/projectIntegration.js.map +1 -1
  61. package/dist/upgrade/projectIntegrationDecision.js +99 -0
  62. package/dist/upgrade/projectIntegrationDecision.js.map +1 -1
  63. package/dist/upgrade/runtimeMigration.js +2 -2
  64. package/dist/upgrade/runtimeMigration.js.map +1 -1
  65. package/dist/upgrade/upgradeOrchestrator.js +21 -7
  66. package/dist/upgrade/upgradeOrchestrator.js.map +1 -1
  67. package/dist/validate/lifecycleAdapters.js +26 -2
  68. package/dist/validate/lifecycleAdapters.js.map +1 -1
  69. package/package.json +1 -1
package/README.md CHANGED
@@ -13,7 +13,8 @@ npx -y agentera@next doctor --format json
13
13
  ```
14
14
 
15
15
  `prime` returns a bounded project and four-runtime lifecycle summary. `doctor`
16
- returns detailed read-only evidence and exact user actions.
16
+ returns detailed read-only evidence and exact user actions. The status and
17
+ project-integration projections consume the same lifecycle snapshot.
17
18
 
18
19
  ## Runtime lifecycle
19
20
 
@@ -24,14 +25,17 @@ required and IDE is conditional. The canonical shared skill path is
24
25
  `~/.agents/skills/agentera`.
25
26
 
26
27
  ```bash
28
+ npx -y agentera@next upgrade --dry-run --channel development
27
29
  npx -y agentera@next upgrade --runtime all --dry-run
28
30
  npx -y agentera@next upgrade --runtime all --yes
29
31
  ```
30
32
 
31
- Use one active ID instead of `all` to scope the operation. `--dry-run` has zero
32
- filesystem or state side effects. `--yes` approves only declared Agentera-owned
33
- operations; native install/update, authentication, enablement, and trust remain
34
- user-owned. Secure automatic apply is Linux-only and reports
33
+ On v3 development, the selector-free dry-run previews all active runtimes.
34
+ Use one active ID instead of `all` to scope runtime work. A selector-free apply
35
+ remains app-only; runtime apply requires the selector and `--yes`. `--dry-run`
36
+ has zero filesystem or state side effects. `--yes` approves only declared
37
+ Agentera-owned operations; native install/update, authentication, enablement,
38
+ and trust remain user-owned. Secure automatic apply is Linux-only and reports
35
39
  `action_required` elsewhere.
36
40
 
37
41
  Retired Claude cleanup is intentionally separate:
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ### Added
6
+
7
+ - Added a canonical runtime lifecycle projection with deterministic snapshot identity, applicability, ownership, action classes, counts, and command eligibility for OpenCode, Codex, Cursor, and Copilot.
8
+ - Added bounded prime/status lifecycle attention rows with runtime-scoped repair previews, exact manual procedures, and doctor diagnostics for non-executable blockers.
9
+
10
+ ### Changed
11
+
12
+ - Changed v3 development-channel dry-runs without `--runtime` to show all active runtime lifecycle findings; generated lifecycle apply commands include `--runtime all --yes`, while apply without a selector remains app-only.
13
+ - Changed lifecycle repair to fail closed on incomplete ownership provenance, isolate narrowed runtime selectors, and count explicit Claude cleanup separately from active-runtime work.
14
+ - Changed corrupt or disconnected ownership-journal blockers to report stable causes without volatile event filenames across preview and apply.
15
+ - Synchronized lifecycle projections across prime, status, project integration, and doctor while keeping Cursor CLI required, IDE conditional, and Claude cleanup explicit.
16
+
5
17
  ## [3.0.0] · 2026-07-12
6
18
 
7
19
  ### Key highlights
package/bundle/README.md CHANGED
@@ -47,8 +47,9 @@ Cursor Agent CLI is the required Cursor surface and Cursor IDE is conditional;
47
47
  both belong to the single `cursor` runtime identity. The canonical portable
48
48
  skill is `~/.agents/skills/agentera`.
49
49
 
50
- Runtime lifecycle work is explicit. Preview all active runtimes without making
51
- changes, then approve Agentera-owned operations separately:
50
+ On the v3 development channel, a dry-run without a selector previews lifecycle
51
+ findings for all active runtimes without making changes. Approve Agentera-owned
52
+ runtime operations separately:
52
53
 
53
54
  ```bash
54
55
  npx -y agentera@next upgrade --runtime all --dry-run
@@ -65,6 +66,9 @@ Secure automatic lifecycle apply currently requires Linux `/proc/self/fd`.
65
66
  Other platforms still receive the complete preview and explicit manual actions,
66
67
  but filesystem operations remain `action_required`.
67
68
 
69
+ `prime`, status, and project-integration output summarize the same lifecycle
70
+ snapshot, including runtime counts, blockers, and the recommended next action.
71
+
68
72
  Claude Code is retired from active support. Its only lifecycle command is a
69
73
  separate, explicit cleanup of the exact Agentera-owned legacy skill link:
70
74
 
package/bundle/UPGRADE.md CHANGED
@@ -10,11 +10,12 @@ not publish or retag as part of an upgrade run.
10
10
  ## Start with a preview
11
11
 
12
12
  ```bash
13
- npx -y agentera@next upgrade --dry-run
13
+ npx -y agentera@next upgrade --dry-run --channel development
14
14
  ```
15
15
 
16
- Without `--runtime`, upgrade handles only applicable project/app migration.
17
- Runtime lifecycle repair is opt-in:
16
+ On the v3 development channel, a dry-run without `--runtime` also observes all
17
+ active runtimes so blocked app or channel phases do not hide lifecycle findings.
18
+ The preview remains read-only. Runtime apply is explicit:
18
19
 
19
20
  ```bash
20
21
  npx -y agentera@next upgrade --runtime all --dry-run
@@ -45,19 +46,32 @@ npx -y agentera@next prime --format json
45
46
  npx -y agentera@next doctor --format json
46
47
  ```
47
48
 
49
+ Status and project-integration recommendations use the same lifecycle identity,
50
+ counts, blockers, and retry guidance as `prime` and `doctor`.
51
+
48
52
  ## Apply approved Agentera-owned work
49
53
 
50
- After reviewing the preview, rerun the same selection with `--yes`:
54
+ After reviewing an all-runtime preview, use its generated command or rerun the
55
+ selection explicitly with `--runtime all --yes`:
51
56
 
52
57
  ```bash
53
58
  npx -y agentera@next upgrade --runtime all --yes
54
59
  ```
55
60
 
61
+ An apply invoked without `--runtime` retains the existing app-only behavior.
62
+ Named selectors such as `--runtime cursor` limit runtime-specific writes to that
63
+ identity. Stable-channel v2 behavior remains app-only.
64
+
56
65
  Apply can write only resources declared by the lifecycle contract and proven
57
66
  Agentera-owned by the append-only ownership journal. Matching names or bytes do
58
67
  not establish ownership. User-owned, ambiguous, shadowed, or malformed targets
59
68
  remain blocked.
60
69
 
70
+ For every blocked collision, the exact remediation is: “The destination is not
71
+ ledger-owned; review the collision manually. Agentera will not adopt it by name
72
+ or equality.” The destination remains unchanged until authoritative ownership is
73
+ available.
74
+
61
75
  The operation outcomes are:
62
76
 
63
77
  - `applied` — the declared change was published;
@@ -133,7 +147,20 @@ npx -y agentera@next report refresh --import-source claude
133
147
  Imported records carry `historical_import` provenance, have no active runtime
134
148
  ID, and remain excluded from default active-runtime analytics.
135
149
 
136
- ## v2 to v3 project migration
150
+ ## Recommended upgrade v1 & v2 stable channel
151
+
152
+ The stable `@latest` channel remains on the supported 2.x line. Preview before
153
+ applying an in-line upgrade:
154
+
155
+ ```bash
156
+ npx -y agentera@latest upgrade --dry-run
157
+ npx -y agentera@latest upgrade --yes
158
+ ```
159
+
160
+ Use the v3 development migration below only when you explicitly intend to
161
+ leave the stable line.
162
+
163
+ ## Upgrading v2 to v3 development channel (irreversible)
137
164
 
138
165
  Use the development channel explicitly while 3.0 is on `@next`:
139
166
 
@@ -146,6 +173,10 @@ The preview reports artifact migration, app migration, legacy cleanup, and any
146
173
  explicitly selected runtime work as separate phases. It does not cross the
147
174
  major boundary or mutate the project without `--yes`.
148
175
 
176
+ Forward migration to v3 is one-way. Returning to the prior Python 2.x support
177
+ line is permanently unsupported; review the development-channel preview before
178
+ applying it.
179
+
149
180
  Useful phase filters are repeatable:
150
181
 
151
182
  ```bash
@@ -154,6 +185,12 @@ npx -y agentera@next upgrade --only runtime --dry-run
154
185
  npx -y agentera@next upgrade --only cleanup --dry-run
155
186
  ```
156
187
 
188
+ `--only runtime` filters the v2-to-v3 project-migration runtime phase. It does
189
+ not select an Agentera runtime identity or limit lifecycle diagnosis. Use
190
+ `--runtime all|opencode|codex|cursor|copilot` for lifecycle work; it cannot be
191
+ combined with `--only`. Development-channel dry-runs without `--runtime` still
192
+ observe all active lifecycle runtimes.
193
+
157
194
  ## Verification and recovery
158
195
 
159
196
  After apply:
@@ -163,7 +200,9 @@ npx -y agentera@next doctor --format json
163
200
  npx -y agentera@next prime --format json
164
201
  ```
165
202
 
166
- `upgrade --verify` adds doctor and capability-schema checks to an upgrade run.
203
+ `upgrade --verify` without `--yes` is a read-only doctor and capability-context
204
+ verification. With `--yes`, it runs those checks after the approved upgrade
205
+ apply. Lifecycle selections with `--verify` require `--yes`.
167
206
  `upgrade --restore` restores the latest supported app-migration snapshot; it
168
207
  does not bypass lifecycle ownership or trust checks. For lifecycle partial
169
208
  failure, rerun the same preview and apply selection. Do not delete or hand-edit
@@ -183,9 +183,6 @@ sample_manifest:
183
183
  - id: cli-suite-marker
184
184
  path: packages/cli/package.json
185
185
  selector: agentera.suiteVersion
186
- - id: cli-package-lock
187
- path: packages/cli/package-lock.json
188
- selector: version
189
186
  - id: copilot-root
190
187
  path: plugin.json
191
188
  selector: version
@@ -310,7 +307,6 @@ sample_manifest:
310
307
  version_files_source: .agentera/docs.yaml conventions.version_files
311
308
  version_files:
312
309
  - packages/cli/package.json
313
- - packages/cli/package-lock.json
314
310
  - plugin.json
315
311
  - .github/plugin/plugin.json
316
312
  - .codex-plugin/plugin.json
@@ -6,13 +6,13 @@ Current Agentera 3.0 package behavior is owned by
6
6
 
7
7
  ## Version matrix
8
8
 
9
- `registry.json` `skills[0].version` is the persisted suite authority. These
10
- mirrors must match it:
9
+ `registry.json` `skills[0].version` is the persisted suite authority. Tracked
10
+ suite mirrors must match it exactly. The npm package `version` may carry a
11
+ development pre-release suffix, but its `X.Y.Z` core must match the suite:
11
12
 
12
13
  | Surface | Selector |
13
14
  | --- | --- |
14
- | `packages/cli/package.json` | `version` and `agentera.suiteVersion` |
15
- | `packages/cli/package-lock.json` | `version` |
15
+ | `packages/cli/package.json` | `version` (development pre-release) and `agentera.suiteVersion` (suite) |
16
16
  | `plugin.json` | `version` |
17
17
  | `.github/plugin/plugin.json` | `version` |
18
18
  | `.codex-plugin/plugin.json` | `version` |
@@ -25,7 +25,10 @@ diagnosed as degraded. An unobserved conditional Cursor IDE is
25
25
  `not_applicable` and does not block CLI support.
26
26
 
27
27
  `prime` projects a bounded summary from this lifecycle snapshot. `doctor`
28
- projects detailed evidence and exact actions from the same snapshot.
28
+ projects detailed evidence and exact actions from the same snapshot. The
29
+ `status` projection and project-integration recommendation consume that same
30
+ snapshot, so runtime identities, counts, blockers, and next actions do not
31
+ drift between surfaces.
29
32
 
30
33
  ## Common adapter contract
31
34
 
@@ -67,7 +70,12 @@ are emitted as `action_required`.
67
70
 
68
71
  ## Lifecycle repair
69
72
 
73
+ On the v3 development channel, a dry-run without `--runtime` previews all
74
+ active runtimes. Applying without a selector remains the existing app-only
75
+ operation; runtime apply requires an explicit selector and `--yes`:
76
+
70
77
  ```bash
78
+ agentera upgrade --dry-run --channel development
71
79
  agentera upgrade --runtime all --dry-run
72
80
  agentera upgrade --runtime all --yes
73
81
  ```
@@ -116,6 +124,6 @@ runtime source:
116
124
  - all eight categories and every declared runtime surface;
117
125
  - package-manifest coverage for all active runtimes;
118
126
  - npm-bundle coverage for every lifecycle source and runtime manifest;
119
- - 3.0.0 version mirrors;
127
+ - 3.0.0 suite mirrors and the development package core;
120
128
  - runtime-specific hook and documentation claims;
121
129
  - absence of retired Claude package manifests.
@@ -7,6 +7,23 @@ retired_cleanup_contract: references/adapters/runtime-retired-resources.yaml
7
7
  canonical_skill:
8
8
  path: ~/.agents/skills/agentera
9
9
  required_for_support_floor: true
10
+ projection_contract:
11
+ schema_version: agentera.runtimeLifecycleProjection.v1
12
+ snapshot_identity: deterministic_sha256
13
+ applicability:
14
+ - required
15
+ - conditional
16
+ - not_applicable
17
+ action_classes:
18
+ - repairable_owned
19
+ - manual_verification
20
+ - unobservable_gap
21
+ command_eligibility:
22
+ - preview
23
+ - apply
24
+ - manual
25
+ - diagnostic
26
+ shared_resource_rule: selected_and_required_by_at_least_one_selected_runtime
10
27
  evidence_contract:
11
28
  mandatory_fields:
12
29
  - host_present
@@ -11,6 +11,7 @@ ownership:
11
11
  collision_rule: Pre-existing resources without matching ledger ownership are never replaced or removed.
12
12
  identity_rule: Managed and published pending-create records bind the filesystem device and inode observed at publication.
13
13
  removal_rule: Removal requires a matching whole-resource ledger identity and fingerprint, a pinned non-symlink parent, and Linux /proc/self/fd directory-relative access.
14
+ manual_review_guidance: The destination is not ledger-owned; review the collision manually. Agentera will not adopt it by name or equality.
14
15
  interrupted_create_rule: A pending_create record may be finalized when its recorded identity and expected fingerprint match, or when the durable pre-create record survived and the exclusively declared resource is observed at the exact expected kind and fingerprint after restart.
15
16
  journal_rule: Apply publishes fsynced append-only ledger snapshots atomically at final names and accepts only a contiguous sequence-one hash chain with no gaps, forks, duplicate sequences, digest mismatches, or disconnected events.
16
17
  journal_statuses:
@@ -32,6 +32,8 @@
32
32
  # **Acceptance**: <criteria list> TASK.acceptance PL19
33
33
  # ## Overall Acceptance PLAN.overall_acceptance PL20
34
34
  # ## Surprises PLAN.surprises PL21
35
+ # ## Unknowns UNKNOWN.entry PU1
36
+ # ## Rejected Review Findings REJECTED.entry PR1
35
37
  #
36
38
  # Protocol references:
37
39
  # status visual tokens: VT1-VT4 (protocol.yaml VISUAL_TOKENS)
@@ -55,6 +57,8 @@ GROUP_PREFIXES:
55
57
  PLAN: PL
56
58
  SCOPE: PS
57
59
  TASK: PT
60
+ UNKNOWN: PU
61
+ REJECTED: PR
58
62
  VALIDATION: PV
59
63
 
60
64
  BUDGET:
@@ -134,7 +138,7 @@ HEADER:
134
138
  type: string
135
139
  required: true
136
140
  description: >-
137
- Short plan title. Used in archive naming and plan listing.
141
+ Short plan title. Used in archive naming and active/archived plan listing.
138
142
  Format: 'Plan: <descriptive name>'.
139
143
  validation:
140
144
  - "Non-empty string"
@@ -201,6 +205,62 @@ PLAN:
201
205
  Path to the previous active plan archived when this plan was created.
202
206
  Preserves plan lineage without changing lifecycle status.
203
207
 
208
+ UNKNOWN:
209
+ 1:
210
+ id: PU1
211
+ field: entry
212
+ type: map
213
+ required: true
214
+ description: >-
215
+ A planning-time question that can change whether downstream work remains
216
+ necessary as written. Full plans require at least one entry.
217
+ min_count: 1
218
+ 2:
219
+ id: PU2
220
+ field: question
221
+ parent: UNKNOWN.entry
222
+ type: string
223
+ required: true
224
+ description: "The unresolved planning-time question."
225
+ 3:
226
+ id: PU3
227
+ field: affects_task
228
+ parent: UNKNOWN.entry
229
+ type: integer
230
+ required: true
231
+ description: "The task number whose scope depends on the answer."
232
+ 4:
233
+ id: PU4
234
+ field: resolve_by
235
+ parent: UNKNOWN.entry
236
+ type: string
237
+ required: true
238
+ description: "How the affected task will resolve the question."
239
+
240
+ REJECTED:
241
+ 1:
242
+ id: PR1
243
+ field: entry
244
+ type: map
245
+ required: true
246
+ description: >-
247
+ A dismissed adversarial-review finding preserved with its rationale.
248
+ min_count: 1
249
+ 2:
250
+ id: PR2
251
+ field: issue
252
+ parent: REJECTED.entry
253
+ type: string
254
+ required: true
255
+ description: "The critic finding that was dismissed."
256
+ 3:
257
+ id: PR3
258
+ field: rationale
259
+ parent: REJECTED.entry
260
+ type: string
261
+ required: true
262
+ description: "Why the finding was dismissed rather than addressed."
263
+
204
264
  SCOPE:
205
265
  1:
206
266
  id: PS11
@@ -2,16 +2,15 @@ import fs from "node:fs";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
4
  import { detectV1ArtifactPairs } from "../../../upgrade/migrateArtifactsV2ToV3.js";
5
- import { summarizeProjectIntegration } from "../../../upgrade/projectIntegration.js";
6
- import { doctorRoots, resolveSourceRootStrict } from "../../../upgrade/appModel.js";
5
+ import { observeProjectIntegrationLifecycle, summarizeProjectIntegration, } from "../../../upgrade/projectIntegration.js";
6
+ import { resolveSourceRootStrict } from "../../../upgrade/appModel.js";
7
7
  import { discoverSchemasDir, loadSchemas } from "../../appContext.js";
8
8
  import { activeObjectiveSummary, checkProfileStaleness, decisionFollowUp, decisionReviewAttention, docsSummary, healthSummary, issueCounts, loadTodoItems, parseProfileHeaderDates, planSummary, progressSummary, registryArtifactPath, selectStatusReadiness, statePresence, } from "../../orientation.js";
9
9
  import { buildOrientationAttention } from "../../orientation/attention.js";
10
10
  import { corpusCoverageSummary } from "../../orientation/corpusCoverage.js";
11
11
  import { statusBundleStatus } from "./bundleStatus.js";
12
12
  import { v1MigrationSummary } from "./v1Migration.js";
13
- import { observeRuntimeLifecycle, summarizeRuntimeLifecycle, } from "../../../runtime/lifecycleSnapshot.js";
14
- import { lifecycleOwnershipJournalPath, readLifecycleOwnershipJournal, } from "../../../runtime/lifecycleOwnershipJournal.js";
13
+ import { summarizeRuntimeLifecycle, } from "../../../runtime/lifecycleSnapshot.js";
15
14
  export function collectOrientationState(opts) {
16
15
  const env = opts.env ?? process.env;
17
16
  const home = opts.home ? opts.home : os.homedir();
@@ -68,45 +67,28 @@ export function collectOrientationState(opts) {
68
67
  const decisionAttention = decisionReviewAttention(schemas);
69
68
  const corpusCoverage = corpusCoverageSummary(env, process.platform);
70
69
  const project = process.cwd();
71
- const projectIntegration = summarizeProjectIntegration({
70
+ const lifecycleSnapshot = observeProjectIntegrationLifecycle({
71
+ home,
72
72
  project,
73
73
  sourceRoot,
74
- home,
75
74
  env,
76
75
  installRoot: String(bundle.appHome),
77
76
  bundleStatus: String(bundle.status),
78
- crossMajorBoundaryDetected: bundle.crossMajorBoundaryDetected ?? false,
79
77
  });
80
- const lifecycleOwnership = readLifecycleOwnershipJournal(lifecycleOwnershipJournalPath(String(bundle.appHome)));
81
- const canonicalSkillTarget = path.join(doctorRoots(String(bundle.appHome)).activeBundleRoot, "skills", "agentera");
82
- const runtimeLifecycle = summarizeRuntimeLifecycle(observeRuntimeLifecycle({
83
- home,
78
+ const runtimeLifecycle = summarizeRuntimeLifecycle(lifecycleSnapshot);
79
+ const projectIntegration = summarizeProjectIntegration({
84
80
  project,
85
81
  sourceRoot,
82
+ home,
86
83
  env,
87
- ledger: lifecycleOwnership.ledger,
88
- canonicalSkillTarget,
89
- }));
84
+ installRoot: String(bundle.appHome),
85
+ bundleStatus: String(bundle.status),
86
+ retryCommand: bundle.retryCommand,
87
+ crossMajorBoundaryDetected: bundle.crossMajorBoundaryDetected ?? false,
88
+ lifecycleSnapshot,
89
+ });
90
90
  const readiness = selectStatusReadiness(plan, health, objective, todoItems, decision, savedContext);
91
- const nextAction = projectIntegration.recommendation === "upgrade"
92
- ? withRecommended(readiness, {
93
- object: projectIntegration.pending_artifacts > 0
94
- ? "Upgrade Agentera artifacts"
95
- : projectIntegration.pending_runtime > 0
96
- ? "Upgrade Agentera runtime wiring"
97
- : "Upgrade Agentera",
98
- capability: "status",
99
- reason: projectIntegration.message,
100
- phase: "build",
101
- })
102
- : projectIntegration.major_boundary_block
103
- ? withRecommended(readiness, {
104
- object: "Await v3 successor announcement",
105
- capability: "status",
106
- reason: projectIntegration.major_boundary_block,
107
- phase: "audit",
108
- })
109
- : readiness;
91
+ const nextAction = selectProjectIntegrationNextAction(readiness, projectIntegration);
110
92
  const attention = buildOrientationAttention({
111
93
  schemas_dir: schemasDir,
112
94
  schemas,
@@ -117,6 +99,7 @@ export function collectOrientationState(opts) {
117
99
  profile,
118
100
  v1_migration: v1Migration,
119
101
  project_integration: projectIntegration,
102
+ runtime_lifecycle_snapshot: lifecycleSnapshot,
120
103
  runtime_lifecycle: runtimeLifecycle,
121
104
  plan,
122
105
  docs,
@@ -141,6 +124,7 @@ export function collectOrientationState(opts) {
141
124
  profile,
142
125
  v1_migration: v1Migration,
143
126
  project_integration: projectIntegration,
127
+ runtime_lifecycle_snapshot: lifecycleSnapshot,
144
128
  runtime_lifecycle: runtimeLifecycle,
145
129
  plan,
146
130
  docs,
@@ -161,6 +145,31 @@ export function collectOrientationState(opts) {
161
145
  * override (upgrade, major-boundary block) takes precedence over the
162
146
  * state-derived cascade; the demoted candidates remain visible as what to do
163
147
  * once the override is resolved. */
148
+ export function selectProjectIntegrationNextAction(readiness, projectIntegration) {
149
+ if (projectIntegration.recommendation === "upgrade") {
150
+ return withRecommended(readiness, {
151
+ object: projectIntegration.pending_artifacts > 0
152
+ ? "Upgrade Agentera artifacts"
153
+ : projectIntegration.pending_runtime > 0
154
+ ? "Upgrade Agentera runtime wiring"
155
+ : "Upgrade Agentera",
156
+ capability: "status",
157
+ reason: projectIntegration.dry_run_command
158
+ ? `${projectIntegration.message} Exact preview: ${projectIntegration.dry_run_command}`
159
+ : projectIntegration.message,
160
+ phase: "build",
161
+ });
162
+ }
163
+ if (projectIntegration.major_boundary_block) {
164
+ return withRecommended(readiness, {
165
+ object: "Await v3 successor announcement",
166
+ capability: "status",
167
+ reason: projectIntegration.major_boundary_block,
168
+ phase: "audit",
169
+ });
170
+ }
171
+ return readiness;
172
+ }
164
173
  function withRecommended(hint, newRecommended) {
165
174
  return {
166
175
  recommended: newRecommended,
@@ -1 +1 @@
1
- {"version":3,"file":"collectOrientationState.js","sourceRoot":"","sources":["../../../../src/cli/commands/prime/collectOrientationState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAA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QACrB,MAAM;QACN,kBAAkB,EAAE,iBAAiB;QACrC,WAAW,EAAE,UAAU;QACvB,SAAS;KACV,CAAC;AACJ,CAAC;AAED;;;;qCAIqC;AACrC,SAAS,eAAe,CAAC,IAAmB,EAAE,cAA0B;IACtE,OAAO;QACL,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;KACvD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"collectOrientationState.js","sourceRoot":"","sources":["../../../../src/cli/commands/prime/collectOrientationState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EACL,kCAAkC,EAClC,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,uBAAuB,EACvB,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EACL,yBAAyB,GAC1B,MAAM,uCAAuC,CAAC;AAE/C,MA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,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,eAAe,CAAC,SAAS,EAAE;YAChC,MAAM,EACH,kBAAkB,CAAC,iBAA4B,GAAG,CAAC;gBAClD,CAAC,CAAC,4BAA4B;gBAC9B,CAAC,CAAE,kBAAkB,CAAC,eAA0B,GAAG,CAAC;oBAClD,CAAC,CAAC,iCAAiC;oBACnC,CAAC,CAAC,kBAAkB;YAC1B,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,kBAAkB,CAAC,eAAe;gBACxC,CAAC,CAAC,GAAG,kBAAkB,CAAC,OAAO,mBAAmB,kBAAkB,CAAC,eAAe,EAAE;gBACtF,CAAC,CAAC,kBAAkB,CAAC,OAAO;YAC9B,KAAK,EAAE,OAAO;SACf,CAAC,CAAC;IACL,CAAC;IACD,IAAI,kBAAkB,CAAC,oBAAoB,EAAE,CAAC;QAC5C,OAAO,eAAe,CAAC,SAAS,EAAE;YAChC,MAAM,EAAE,iCAAiC;YACzC,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,kBAAkB,CAAC,oBAAoB;YAC/C,KAAK,EAAE,OAAO;SACf,CAAC,CAAC;IACL,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,eAAe,CAAC,IAAmB,EAAE,cAA0B;IACtE,OAAO;QACL,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;KACvD,CAAC;AACJ,CAAC"}
@@ -6,9 +6,9 @@ import { emitStructured } from "../structured.js";
6
6
  import { appModelPayload, REQUIRED_SPARSE_CONTEXT_FIELDS, ROUTINE_STRUCTURED_FIELDS, surfaceMissingMessage, } from "../stateQuery.js";
7
7
  import { artifactLocationContract } from "./query.js";
8
8
  import { stateWriterArtifactContract, stateWriterContract, } from "../../state/write/operations.js";
9
- import { loadLifecycleAuthority } from "../../runtime/lifecycleAuthority.js";
9
+ import { LIFECYCLE_ACTION_CLASS_VALUES, LIFECYCLE_APPLICABILITY_VALUES, LIFECYCLE_COMMAND_ELIGIBILITY_VALUES, loadLifecycleAuthority, } from "../../runtime/lifecycleAuthority.js";
10
10
  import { loadRetiredRuntimeCleanupContract } from "../../runtime/retiredRuntimeCleanup.js";
11
- import { LIFECYCLE_SNAPSHOT_SCHEMA_VERSION, LIFECYCLE_STATUS_VOCABULARY_VERSION, LIFECYCLE_SUMMARY_SCHEMA_VERSION, } from "../../runtime/lifecycleSnapshot.js";
11
+ import { LIFECYCLE_SNAPSHOT_SCHEMA_VERSION, LIFECYCLE_PROJECTION_SCHEMA_VERSION, LIFECYCLE_STATUS_VOCABULARY_VERSION, LIFECYCLE_SUMMARY_SCHEMA_VERSION, } from "../../runtime/lifecycleSnapshot.js";
12
12
  import { ACTIVE_RUNTIME_SELECTORS, LIFECYCLE_UPGRADE_SCHEMA, } from "../../upgrade/lifecycleUpgrade.js";
13
13
  const CAPABILITY_NAMES = [
14
14
  "status", "vision", "discuss", "research", "plan", "build",
@@ -32,7 +32,7 @@ const COMMAND_DESCRIPTIONS = {
32
32
  prime: "Composite orientation briefing and capability startup context.",
33
33
  status: "Deprecated alias for prime.",
34
34
  schema: "Runtime CLI/schema introspection.",
35
- plan: "Deprecated alias for state plan. Active plan summary.",
35
+ plan: "Deprecated alias for state plan. Plans, archived history, task evidence, and provenance.",
36
36
  progress: "Deprecated alias for state progress. Recent cycle summary.",
37
37
  health: "Deprecated alias for state health. Latest project artifact health audit.",
38
38
  todo: "Deprecated alias for state todo. TODO summary.",
@@ -286,8 +286,16 @@ export function buildSchemaPayload(command = "schema") {
286
286
  runtime_lifecycle: {
287
287
  authority: lifecycleAuthority.sourcePath,
288
288
  snapshot_schema_version: LIFECYCLE_SNAPSHOT_SCHEMA_VERSION,
289
+ projection_schema_version: LIFECYCLE_PROJECTION_SCHEMA_VERSION,
289
290
  summary_schema_version: LIFECYCLE_SUMMARY_SCHEMA_VERSION,
290
291
  status_vocabulary_version: LIFECYCLE_STATUS_VOCABULARY_VERSION,
292
+ projection: {
293
+ snapshot_identity: "deterministic_sha256",
294
+ applicability: [...LIFECYCLE_APPLICABILITY_VALUES],
295
+ action_classes: [...LIFECYCLE_ACTION_CLASS_VALUES],
296
+ command_eligibility: [...LIFECYCLE_COMMAND_ELIGIBILITY_VALUES],
297
+ shared_resource_rule: "selected_and_required_by_at_least_one_selected_runtime",
298
+ },
291
299
  projections: {
292
300
  prime: "bounded summary without category evidence or native command lists",
293
301
  doctor: "detailed surfaces, eight categories, evidence, precedence, and user-owned native steps",
@@ -297,6 +305,7 @@ export function buildSchemaPayload(command = "schema") {
297
305
  schema_version: LIFECYCLE_UPGRADE_SCHEMA,
298
306
  command: "agentera upgrade --runtime <all|runtime> --dry-run|--yes",
299
307
  selectors: ["all", ...ACTIVE_RUNTIME_SELECTORS],
308
+ projection: "lifecycle.projection is the canonical runtime lifecycle snapshot shared with doctor, prime, status, and project integration",
300
309
  default_without_runtime_selector: "app_upgrade_only",
301
310
  preview: "strictly_read_only",
302
311
  apply_requires: "--yes",