agentera 3.0.0-dev.15 → 3.0.0-dev.16

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 (154) hide show
  1. package/README.md +43 -22
  2. package/bundle/.codex-plugin/plugin.json +92 -0
  3. package/bundle/.cursor/agents/agentera.md +7 -0
  4. package/bundle/.cursor/hooks.json +32 -0
  5. package/bundle/.cursor-plugin/plugin.json +34 -0
  6. package/bundle/.github/hooks/postToolUse.json +9 -0
  7. package/bundle/.github/hooks/preToolUse.json +8 -0
  8. package/bundle/.github/hooks/sessionEnd.json +8 -0
  9. package/bundle/.github/hooks/sessionStart.json +8 -0
  10. package/bundle/.github/plugin/plugin.json +7 -0
  11. package/bundle/.opencode/agents/agentera.md +12 -0
  12. package/bundle/.opencode/commands/agentera.md +5 -0
  13. package/bundle/.opencode/package.json +31 -0
  14. package/bundle/.opencode/plugins/agentera.js +820 -0
  15. package/bundle/CHANGELOG.md +1075 -0
  16. package/bundle/DESIGN.md +233 -0
  17. package/bundle/LICENSE +201 -0
  18. package/bundle/README.md +137 -0
  19. package/bundle/UPGRADE.md +188 -0
  20. package/bundle/agents/openai.yaml +87 -0
  21. package/bundle/extract-corpus-parity.json +2 -4
  22. package/bundle/hooks/codex-hooks.json +31 -0
  23. package/bundle/hooks/codex-plugin-hooks.json +31 -0
  24. package/bundle/plugin.json +13 -0
  25. package/bundle/references/adapters/cursor.md +50 -40
  26. package/bundle/references/adapters/opencode.md +22 -23
  27. package/bundle/references/adapters/package-manifest-interface-model.yaml +36 -43
  28. package/bundle/references/adapters/package-registry.yaml +19 -52
  29. package/bundle/references/adapters/package-surface-characterization.md +61 -47
  30. package/bundle/references/adapters/runtime-adapter-characterization.md +44 -79
  31. package/bundle/references/adapters/runtime-adapter-registry.yaml +7 -169
  32. package/bundle/references/adapters/runtime-feature-parity.md +99 -167
  33. package/bundle/references/adapters/runtime-lifecycle-adapters.yaml +288 -0
  34. package/bundle/references/adapters/runtime-lifecycle-authority.yaml +73 -0
  35. package/bundle/references/adapters/runtime-lifecycle-operation-contract.yaml +83 -0
  36. package/bundle/references/adapters/runtime-retired-resources.yaml +33 -0
  37. package/bundle/references/analysis/benchmark.md +5 -5
  38. package/bundle/references/analysis/startup-measurement-contract.yaml +19 -8
  39. package/bundle/references/cli/bundle-skill-vocabulary.yaml +2 -2
  40. package/bundle/references/cli/vocabulary-index.yaml +1 -1
  41. package/bundle/references/cli/vocabulary.md +7 -7
  42. package/bundle/skills/agentera/references/contract.md +10 -3
  43. package/dist/analytics/extractCorpus/cli.js +19 -5
  44. package/dist/analytics/extractCorpus/cli.js.map +1 -1
  45. package/dist/analytics/extractCorpus/copilotSessions.js +6 -3
  46. package/dist/analytics/extractCorpus/copilotSessions.js.map +1 -1
  47. package/dist/analytics/extractCorpus/core.js +40 -11
  48. package/dist/analytics/extractCorpus/core.js.map +1 -1
  49. package/dist/analytics/extractCorpus/corpus.js +39 -16
  50. package/dist/analytics/extractCorpus/corpus.js.map +1 -1
  51. package/dist/analytics/extractCorpus/coverageAudit.js +44 -44
  52. package/dist/analytics/extractCorpus/coverageAudit.js.map +1 -1
  53. package/dist/analytics/extractCorpus/cursorSessions.js +6 -3
  54. package/dist/analytics/extractCorpus/cursorSessions.js.map +1 -1
  55. package/dist/analytics/extractCorpus/extractCorpusParity.js +2 -2
  56. package/dist/analytics/extractCorpus/extractCorpusParity.js.map +1 -1
  57. package/dist/analytics/extractCorpus/filesystemSources.js +1 -4
  58. package/dist/analytics/extractCorpus/filesystemSources.js.map +1 -1
  59. package/dist/analytics/extractCorpus/jsonlSessions.js +24 -4
  60. package/dist/analytics/extractCorpus/jsonlSessions.js.map +1 -1
  61. package/dist/analytics/usageStats.js +51 -7
  62. package/dist/analytics/usageStats.js.map +1 -1
  63. package/dist/bin/agentera.js +3 -1
  64. package/dist/bin/agentera.js.map +1 -1
  65. package/dist/capabilities/discuss/instructions.js +1 -1
  66. package/dist/capabilities/discuss/instructions.js.map +1 -1
  67. package/dist/capabilities/orchestrate/instructions.js +1 -1
  68. package/dist/capabilities/orchestrate/instructions.js.map +1 -1
  69. package/dist/capabilities/profile/instructions.js +1 -1
  70. package/dist/capabilities/profile/instructions.js.map +1 -1
  71. package/dist/cli/capabilityContext/startup.js +1 -0
  72. package/dist/cli/capabilityContext/startup.js.map +1 -1
  73. package/dist/cli/commands/doctor.js +66 -4
  74. package/dist/cli/commands/doctor.js.map +1 -1
  75. package/dist/cli/commands/prime/collectOrientationState.js +15 -1
  76. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -1
  77. package/dist/cli/commands/prime/orientationOutput.js +12 -1
  78. package/dist/cli/commands/prime/orientationOutput.js.map +1 -1
  79. package/dist/cli/commands/report.js +19 -4
  80. package/dist/cli/commands/report.js.map +1 -1
  81. package/dist/cli/commands/schema.js +75 -3
  82. package/dist/cli/commands/schema.js.map +1 -1
  83. package/dist/cli/commands/upgrade.js +18 -2
  84. package/dist/cli/commands/upgrade.js.map +1 -1
  85. package/dist/cli/commands/verify.js +6 -6
  86. package/dist/cli/commands/verify.js.map +1 -1
  87. package/dist/cli/dispatch/lifecycle.js +71 -3
  88. package/dist/cli/dispatch/lifecycle.js.map +1 -1
  89. package/dist/cli/help.js +18 -6
  90. package/dist/cli/help.js.map +1 -1
  91. package/dist/cli/startupCompletenessContract.js +1 -1
  92. package/dist/cli/startupCompletenessContract.js.map +1 -1
  93. package/dist/eval/evalSkills.js +13 -13
  94. package/dist/eval/evalSkills.js.map +1 -1
  95. package/dist/hooks/validateArtifact/runtime.js +4 -4
  96. package/dist/migrate/v2HandoffManifest.js +4 -0
  97. package/dist/migrate/v2HandoffManifest.js.map +1 -1
  98. package/dist/registries/packageRegistry.js +36 -3
  99. package/dist/registries/packageRegistry.js.map +1 -1
  100. package/dist/registries/runtimeAdapterRegistry.js +22 -16
  101. package/dist/registries/runtimeAdapterRegistry.js.map +1 -1
  102. package/dist/runtime/lifecycleAdapterContract.js +436 -0
  103. package/dist/runtime/lifecycleAdapterContract.js.map +1 -0
  104. package/dist/runtime/lifecycleAdapters.js +707 -0
  105. package/dist/runtime/lifecycleAdapters.js.map +1 -0
  106. package/dist/runtime/lifecycleAuthority.js +443 -0
  107. package/dist/runtime/lifecycleAuthority.js.map +1 -0
  108. package/dist/runtime/lifecycleOperationContract.js +109 -0
  109. package/dist/runtime/lifecycleOperationContract.js.map +1 -0
  110. package/dist/runtime/lifecycleOperations.js +627 -0
  111. package/dist/runtime/lifecycleOperations.js.map +1 -0
  112. package/dist/runtime/lifecycleOwnershipJournal.js +623 -0
  113. package/dist/runtime/lifecycleOwnershipJournal.js.map +1 -0
  114. package/dist/runtime/lifecyclePublication.js +395 -0
  115. package/dist/runtime/lifecyclePublication.js.map +1 -0
  116. package/dist/runtime/lifecycleSnapshot.js +174 -0
  117. package/dist/runtime/lifecycleSnapshot.js.map +1 -0
  118. package/dist/runtime/retiredRuntimeCleanup.js +232 -0
  119. package/dist/runtime/retiredRuntimeCleanup.js.map +1 -0
  120. package/dist/setup/codex/installRoot.js +1 -1
  121. package/dist/setup/codex/installRoot.js.map +1 -1
  122. package/dist/setup/copilot.js +1 -1
  123. package/dist/setup/copilot.js.map +1 -1
  124. package/dist/setup/cursor.js +1 -1
  125. package/dist/setup/cursor.js.map +1 -1
  126. package/dist/setup/doctor/core.js +3 -3
  127. package/dist/setup/doctor/core.js.map +1 -1
  128. package/dist/setup/doctor/diagnostics.js +0 -39
  129. package/dist/setup/doctor/diagnostics.js.map +1 -1
  130. package/dist/setup/smokeChecks.js +1 -3
  131. package/dist/setup/smokeChecks.js.map +1 -1
  132. package/dist/upgrade/appContentRefresh.js +8 -1
  133. package/dist/upgrade/appContentRefresh.js.map +1 -1
  134. package/dist/upgrade/doctor.js +4 -0
  135. package/dist/upgrade/doctor.js.map +1 -1
  136. package/dist/upgrade/lifecycleUpgrade.js +386 -0
  137. package/dist/upgrade/lifecycleUpgrade.js.map +1 -0
  138. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
  139. package/dist/upgrade/runtimeMigration.js +1 -8
  140. package/dist/upgrade/runtimeMigration.js.map +1 -1
  141. package/dist/upgrade/upgradeCommands.js +8 -0
  142. package/dist/upgrade/upgradeCommands.js.map +1 -1
  143. package/dist/upgrade/upgradeOrchestrator.js +148 -5
  144. package/dist/upgrade/upgradeOrchestrator.js.map +1 -1
  145. package/dist/validate/appHomeContract.js +1 -1
  146. package/dist/validate/appHomeContract.js.map +1 -1
  147. package/dist/validate/lifecycleAdapters/nodeFormChecks.js +2 -9
  148. package/dist/validate/lifecycleAdapters/nodeFormChecks.js.map +1 -1
  149. package/dist/validate/lifecycleAdapters/shared.js +1 -1
  150. package/dist/validate/lifecycleAdapters/shared.js.map +1 -1
  151. package/dist/validate/lifecycleAdapters.js +77 -2
  152. package/dist/validate/lifecycleAdapters.js.map +1 -1
  153. package/package.json +1 -1
  154. package/bundle/skills/agentera/.claude-plugin/plugin.json +0 -27
@@ -0,0 +1,188 @@
1
+ # Upgrade and runtime lifecycle
2
+
3
+ Agentera 3.0 uses one upgrade command for project/app migration and explicitly
4
+ selected runtime lifecycle work. Preview and apply are separate operations.
5
+
6
+ Before the npm stable dist-tag promotion, use `agentera@next`. The stable 2.x
7
+ channel remains `agentera@latest` until that promotion; this repository does
8
+ not publish or retag as part of an upgrade run.
9
+
10
+ ## Start with a preview
11
+
12
+ ```bash
13
+ npx -y agentera@next upgrade --dry-run
14
+ ```
15
+
16
+ Without `--runtime`, upgrade handles only applicable project/app migration.
17
+ Runtime lifecycle repair is opt-in:
18
+
19
+ ```bash
20
+ npx -y agentera@next upgrade --runtime all --dry-run
21
+ npx -y agentera@next upgrade --runtime cursor --dry-run
22
+ ```
23
+
24
+ The active runtimes are OpenCode, Codex, Cursor, and GitHub Copilot. Selectors
25
+ are `all`, `opencode`, `codex`, `cursor`, and `copilot`.
26
+ `cursor-agent` is not a selector: Cursor Agent CLI and Cursor IDE are surfaces
27
+ of the one `cursor` identity. CLI is required; IDE is conditional.
28
+
29
+ The preview is strictly read-only. It creates no files, directories, locks,
30
+ caches, ownership journals, telemetry, or other state changes. Its output
31
+ includes:
32
+
33
+ - observed runtime and surface evidence;
34
+ - skill, plugin, hook, agent, configuration, enablement, trust, and native-action state;
35
+ - planned operations and dependencies;
36
+ - current ownership evidence and blocked reasons;
37
+ - exact manual or host-native actions;
38
+ - required support-floor gaps.
39
+
40
+ `prime` exposes a bounded projection of the same snapshot. `doctor` exposes the
41
+ detailed read-only diagnosis:
42
+
43
+ ```bash
44
+ npx -y agentera@next prime --format json
45
+ npx -y agentera@next doctor --format json
46
+ ```
47
+
48
+ ## Apply approved Agentera-owned work
49
+
50
+ After reviewing the preview, rerun the same selection with `--yes`:
51
+
52
+ ```bash
53
+ npx -y agentera@next upgrade --runtime all --yes
54
+ ```
55
+
56
+ Apply can write only resources declared by the lifecycle contract and proven
57
+ Agentera-owned by the append-only ownership journal. Matching names or bytes do
58
+ not establish ownership. User-owned, ambiguous, shadowed, or malformed targets
59
+ remain blocked.
60
+
61
+ The operation outcomes are:
62
+
63
+ - `applied` — the declared change was published;
64
+ - `noop` — desired state was already exact;
65
+ - `failed` — this operation failed; independent operations may continue;
66
+ - `blocked_unowned` — ownership was not proven;
67
+ - `skipped_dependency` — a prerequisite did not complete;
68
+ - `action_required` — the user or host must perform the step.
69
+
70
+ Retries are designed to converge. Completed work becomes `noop`; failed or
71
+ pending work is re-observed and retried. Corrupt, forked, disconnected, or
72
+ non-contiguous ownership journals fail closed.
73
+
74
+ Secure automatic filesystem publication currently requires Linux
75
+ `/proc/self/fd`. On macOS, Windows, or a Linux environment without that secure
76
+ primitive, preview and diagnosis still work but mutation is returned as
77
+ `action_required`.
78
+
79
+ ## Ownership and trust boundary
80
+
81
+ The canonical skill is:
82
+
83
+ ```text
84
+ ~/.agents/skills/agentera
85
+ ```
86
+
87
+ Agentera can maintain declared Agentera-owned skill, plugin, hook, and agent
88
+ resources. It does not run native runtime package managers or approve:
89
+
90
+ - runtime installation or self-update;
91
+ - authentication;
92
+ - plugin or hook enablement;
93
+ - trust prompts or organizational policy;
94
+ - user-owned configuration collisions.
95
+
96
+ Those steps are reported with exact remediation and remain user-owned.
97
+
98
+ ## Cursor lifecycle
99
+
100
+ Cursor is one runtime identity with two surfaces:
101
+
102
+ | Surface | Support-floor role | Typical source |
103
+ | --- | --- | --- |
104
+ | Agent CLI | required | Cursor CLI binary and canonical shared skill |
105
+ | IDE | conditional | `.cursor-plugin/plugin.json`, `.cursor/hooks.json`, `.cursor/agents/` |
106
+
107
+ An absent IDE does not block a CLI-only installation. Once IDE evidence is
108
+ present, its incomplete or denied mandatory evidence is reported beneath the
109
+ same Cursor identity.
110
+
111
+ ## Retired Claude cleanup
112
+
113
+ Claude Code is not an active Agentera runtime and cannot be passed to
114
+ `--runtime`. Its legacy cleanup is a separate explicit selection:
115
+
116
+ ```bash
117
+ npx -y agentera@next upgrade --legacy-cleanup claude --dry-run
118
+ npx -y agentera@next upgrade --legacy-cleanup claude --yes
119
+ ```
120
+
121
+ Cleanup is limited to the exact Agentera-owned legacy skill link recorded by
122
+ the ownership ledger. It never removes Claude projects, transcripts, settings,
123
+ credentials, caches, or other user data. Ambiguous or unowned resources remain
124
+ blocked.
125
+
126
+ Historical transcript import is independent of cleanup. Default extraction and
127
+ analytics do not read Claude history. Import requires explicit local consent:
128
+
129
+ ```bash
130
+ npx -y agentera@next report refresh --import-source claude
131
+ ```
132
+
133
+ Imported records carry `historical_import` provenance, have no active runtime
134
+ ID, and remain excluded from default active-runtime analytics.
135
+
136
+ ## v2 to v3 project migration
137
+
138
+ Use the development channel explicitly while 3.0 is on `@next`:
139
+
140
+ ```bash
141
+ npx -y agentera@next upgrade --channel development --project "$PWD" --dry-run
142
+ npx -y agentera@next upgrade --channel development --project "$PWD" --yes
143
+ ```
144
+
145
+ The preview reports artifact migration, app migration, legacy cleanup, and any
146
+ explicitly selected runtime work as separate phases. It does not cross the
147
+ major boundary or mutate the project without `--yes`.
148
+
149
+ Useful phase filters are repeatable:
150
+
151
+ ```bash
152
+ npx -y agentera@next upgrade --only artifacts --dry-run
153
+ npx -y agentera@next upgrade --only runtime --dry-run
154
+ npx -y agentera@next upgrade --only cleanup --dry-run
155
+ ```
156
+
157
+ ## Verification and recovery
158
+
159
+ After apply:
160
+
161
+ ```bash
162
+ npx -y agentera@next doctor --format json
163
+ npx -y agentera@next prime --format json
164
+ ```
165
+
166
+ `upgrade --verify` adds doctor and capability-schema checks to an upgrade run.
167
+ `upgrade --restore` restores the latest supported app-migration snapshot; it
168
+ does not bypass lifecycle ownership or trust checks. For lifecycle partial
169
+ failure, rerun the same preview and apply selection. Do not delete or hand-edit
170
+ the ownership journal to force adoption.
171
+
172
+ `--force` applies only where the owning migration contract explicitly permits
173
+ replacement. It does not convert user-owned resources into Agentera-owned
174
+ resources and does not approve native or trust actions.
175
+
176
+ ## Maintainer verification
177
+
178
+ Release preparation does not publish, tag, or push:
179
+
180
+ ```bash
181
+ pnpm -C packages/cli test
182
+ pnpm -C packages/cli run typecheck
183
+ pnpm -C packages/cli build
184
+ node packages/cli/dist/bin/agentera.js check validate lifecycle-adapters
185
+ node packages/cli/dist/bin/agentera.js check validate release-metadata
186
+ pnpm -C packages/cli run bundle:data
187
+ npm pack --dry-run --json --ignore-scripts
188
+ ```
@@ -0,0 +1,87 @@
1
+ display_name: Agentera
2
+ description: Portable Agentera suite for Codex: one bundled skill with exact bare `/agentera` routing and twelve routed capabilities.
3
+ icon: AG
4
+ brand_color: "#111827"
5
+ default_prompt: Use $agentera to inspect project state and route to the right capability; exact bare `/agentera` uses the agentera prime dashboard path.
6
+ policy:
7
+ allow_implicit_invocation: true
8
+ support:
9
+ skill_discovery: /skills
10
+ plugin_discovery: /plugins
11
+ explicit_invocation: $agentera
12
+ implicit_invocation: the bundled skill may be invoked implicitly; exact bare `/agentera` belongs to agentera, not the legacy hej bridge
13
+ lifecycle_hooks: stable via codex_hooks; bundled config lives at hooks/codex-hooks.json and can be copied to ~/.codex/hooks.json or a project .codex/hooks.json for apply_patch artifact validation
14
+ skills:
15
+ - name: agentera
16
+ display_name: agentera
17
+ path: ./skills/agentera
18
+ metadata: ./agents/openai.yaml
19
+ description: Compound agent orchestration suite with exact bare `/agentera` routing and twelve capabilities in one bundled skill.
20
+ invocation_hint: Use $agentera, or inspect it with /skills and /plugins. For a complete bare `/agentera` message, use the agentera prime dashboard path.
21
+ policy:
22
+ allow_implicit_invocation: true
23
+ capabilities:
24
+ - name: status
25
+ description: Entry-point orientation and routing for fresh or returning projects, including a complete user message exactly `/agentera`.
26
+ invocation_hint: Use $agentera status or ask $agentera for project status; exact bare `/agentera` uses this dashboard path.
27
+ policy:
28
+ allow_implicit_invocation: true
29
+ - name: research
30
+ description: External-source analysis mapped onto a project through Agentera artifacts.
31
+ invocation_hint: Use $agentera research for links or external source analysis.
32
+ policy:
33
+ allow_implicit_invocation: true
34
+ - name: profile
35
+ description: Decision-profile mining. Limited to available bounded Codex history, session, or config corpus data.
36
+ invocation_hint: Use $agentera profile when bounded Codex history, session, or config corpus data is available.
37
+ policy:
38
+ allow_implicit_invocation: false
39
+ required_capabilities:
40
+ - name: codex_session_corpus
41
+ status: ok
42
+ action: Run profile extraction; bounded Codex history, session, or config corpus data lands in the Section 22 corpus when present, with absent source families reported in corpus metadata.
43
+ - name: build
44
+ description: Autonomous development cycles grounded in project vision, TODO, and verification.
45
+ invocation_hint: Use $agentera build for autonomous development cycles.
46
+ policy:
47
+ allow_implicit_invocation: true
48
+ - name: optimize
49
+ description: Metric-driven optimization loops for measurable objectives.
50
+ invocation_hint: Use $agentera optimize for measured optimization work.
51
+ policy:
52
+ allow_implicit_invocation: true
53
+ - name: discuss
54
+ description: Structured deliberation for consequential decisions and tradeoffs.
55
+ invocation_hint: Use $agentera discuss for decision framing.
56
+ policy:
57
+ allow_implicit_invocation: true
58
+ - name: audit
59
+ description: Codebase health audits with severity, confidence, and trend tracking.
60
+ invocation_hint: Use $agentera audit for codebase health audits.
61
+ policy:
62
+ allow_implicit_invocation: true
63
+ - name: plan
64
+ description: Scale-adaptive planning with behavioral acceptance criteria.
65
+ invocation_hint: Use $agentera plan for multi-step planning.
66
+ policy:
67
+ allow_implicit_invocation: true
68
+ - name: vision
69
+ description: Project vision creation and refinement.
70
+ invocation_hint: Use $agentera vision for project direction work.
71
+ policy:
72
+ allow_implicit_invocation: true
73
+ - name: document
74
+ description: DTC-first documentation creation, maintenance, and audit.
75
+ invocation_hint: Use $agentera document for documentation work.
76
+ policy:
77
+ allow_implicit_invocation: true
78
+ - name: design
79
+ description: Visual identity system creation, refinement, and audit.
80
+ invocation_hint: Use $agentera design for design system work.
81
+ policy:
82
+ allow_implicit_invocation: true
83
+ - name: orchestrate
84
+ description: Plan-driven orchestration that dispatches capabilities and evaluates results.
85
+ invocation_hint: Use $agentera orchestrate for plan execution.
86
+ policy:
87
+ allow_implicit_invocation: true
@@ -1,17 +1,15 @@
1
1
  {
2
2
  "schema_version": "agentera-extract-corpus-parity-v1",
3
- "adapter_version": "agentera-v2-corpus-1",
3
+ "adapter_version": "agentera-v3-corpus-2",
4
4
  "max_sqlite_sessions": 60,
5
5
  "max_sqlite_rows": 100000,
6
6
  "max_tool_arg_text": 500,
7
7
  "copilot_sparse_remediation": "/chronicle reindex",
8
8
  "runtime_store_globs": {
9
9
  "codex": "*.jsonl",
10
- "claude-code": "*.jsonl",
11
10
  "cursor": "*.jsonl",
12
- "cursor-agent": "store.db",
13
11
  "opencode": "opencode.db",
14
- "github-copilot": "session-store.db"
12
+ "copilot": "session-store.db"
15
13
  },
16
14
  "families": [
17
15
  "instruction_document",
@@ -0,0 +1,31 @@
1
+ {
2
+ "description": "agentera v3 Codex CLI hooks (PascalCase lifecycle events PreToolUse, PostToolUse): schema-backed apply_patch artifact validation; copied to ~/.codex/hooks/codex-hooks.json by upgrade",
3
+ "hooks": {
4
+ "PreToolUse": [
5
+ {
6
+ "matcher": "^apply_patch$",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "npx -y agentera@next hook validate-artifact",
11
+ "timeout": 10,
12
+ "statusMessage": "validating artifact"
13
+ }
14
+ ]
15
+ }
16
+ ],
17
+ "PostToolUse": [
18
+ {
19
+ "matcher": "^apply_patch$",
20
+ "hooks": [
21
+ {
22
+ "type": "command",
23
+ "command": "npx -y agentera@next hook validate-artifact",
24
+ "timeout": 10,
25
+ "statusMessage": "validating artifact"
26
+ }
27
+ ]
28
+ }
29
+ ]
30
+ }
31
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "description": "agentera v3 Codex plugin hooks (PascalCase lifecycle events PreToolUse, PostToolUse): schema-backed apply_patch artifact validation bundled via .codex-plugin/plugin.json using PLUGIN_ROOT",
3
+ "hooks": {
4
+ "PreToolUse": [
5
+ {
6
+ "matcher": "^apply_patch$",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "npx -y agentera@next hook validate-artifact",
11
+ "timeout": 10,
12
+ "statusMessage": "validating artifact"
13
+ }
14
+ ]
15
+ }
16
+ ],
17
+ "PostToolUse": [
18
+ {
19
+ "matcher": "^apply_patch$",
20
+ "hooks": [
21
+ {
22
+ "type": "command",
23
+ "command": "npx -y agentera@next hook validate-artifact",
24
+ "timeout": 10,
25
+ "statusMessage": "validating artifact"
26
+ }
27
+ ]
28
+ }
29
+ ]
30
+ }
31
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "agentera",
3
+ "version": "3.0.0",
4
+ "description": "Agentera 3.0.0 for GitHub Copilot CLI: one portable skill, twelve capabilities, shared project state, lifecycle hooks, and exact /agentera dashboard routing. profile uses bounded Copilot corpus metadata when present and reports missing source families. Runtime installation, enablement, authentication, and trust remain user-owned.",
5
+ "skills": "skills",
6
+ "hooks": ".github/hooks",
7
+ "agentera": {
8
+ "packageShape": "suite-bundle",
9
+ "installRoot": ".",
10
+ "sharedPaths": ["skills", "hooks", "registry.json", "plugin.json", "README.md", "UPGRADE.md"],
11
+ "singleSkillInstall": "Single-skill installs keep core SKILL.md workflow behavior; suite tools are bundle-only enhancements."
12
+ }
13
+ }
@@ -1,14 +1,12 @@
1
1
  # Cursor adapter reference
2
2
 
3
- Agentera v1 ships Cursor as two registry identities:
3
+ Agentera ships one active Cursor registry identity: `cursor`. The accepted
4
+ `cursor-agent` spelling is an inactive compatibility alias that resolves to
5
+ Cursor-owned behavior and source data; it is not independently discoverable.
4
6
 
5
- | Identity | Host | Support status |
6
- | -------- | ---- | -------------- |
7
- | `cursor` | Cursor IDE (Composer / Agent) | supported |
8
- | `cursor-agent` | Cursor Agent CLI (`cursor-agent`, `agent`) | degraded |
9
-
10
- Decision 63 owns v1 scope. Cloud agents are unsupported. Bare text `hej` routing
11
- stays metadata-only like Claude, Copilot, and Codex.
7
+ Cursor Agent CLI is the required lifecycle surface and Cursor IDE is
8
+ conditional. Cloud agents are unsupported. Bare prompt routing remains
9
+ metadata-only like GitHub Copilot and Codex.
12
10
 
13
11
  ## Quick install
14
12
 
@@ -32,16 +30,16 @@ and project walk-up do not resolve a managed root).
32
30
 
33
31
  ```bash
34
32
  npx skills add jgabor/agentera -g -a cursor --skill agentera -y
35
- uvx --from git+https://github.com/jgabor/agentera agentera upgrade --project "$PWD" --runtime cursor --yes
36
- uvx --from git+https://github.com/jgabor/agentera agentera doctor --runtime cursor
33
+ npx -y agentera@next upgrade --project "$PWD" --runtime cursor --dry-run
34
+ npx -y agentera@next upgrade --project "$PWD" --runtime cursor --yes
35
+ npx -y agentera@next doctor --format json
37
36
  ```
38
37
 
39
38
  Use the plugin path for a user-global install. Use upgrade when you need
40
39
  project-committed `.cursor/hooks.json` and `.cursor/agents/` copies. Both paths can
41
40
  be combined.
42
41
 
43
- From a clone, replace `uvx agentera` with `uv run scripts/agentera`. User-facing
44
- install steps also live in [`README.md`](../../README.md) and
42
+ User-facing install steps also live in [`README.md`](../../README.md) and
45
43
  [`UPGRADE.md`](../../UPGRADE.md).
46
44
 
47
45
  ## Repo-native surfaces
@@ -52,18 +50,21 @@ This repository dogfoods committed Cursor surfaces:
52
50
  - `.cursor/agents/agentera.md` — single managed agent descriptor (D73)
53
51
  - `.cursor-plugin/plugin.json` — marketplace submission-ready manifest
54
52
 
55
- Hooks invoke the TypeScript CLI through `npx -y agentera hook …` (or
56
- `npx -y agentera@next hook …` on the development channel). `sessionStart` exports
57
- `AGENTERA_HOME` through Cursor hook JSON (`env`) before subsequent hook executions
58
- run.
53
+ Install and repair these Cursor IDE resources through the public lifecycle command
54
+ `agentera upgrade --runtime cursor`: use `--dry-run` to preview and `--yes` to
55
+ apply Agentera-owned operations. The installed hook file calls private lifecycle
56
+ callbacks packaged with the CLI; those callbacks are runtime wiring, not a
57
+ user-facing command namespace, and are intentionally absent from public CLI help.
58
+ The managed `sessionStart` callback exports `AGENTERA_HOME` through Cursor hook JSON
59
+ (`env`) before subsequent callbacks run.
59
60
 
60
61
  ## AGENTERA_HOME wiring
61
62
 
62
- Primary path: `agentera hook cursor-session-start` resolves the install root from
63
- `AGENTERA_HOME`, project walk-up, the plugin/checkout root, or the platform default
64
- app home when env and walk-up do not resolve a managed root, then returns
65
- `{"env": {"AGENTERA_HOME": "<root>"}}` plus optional `additional_context` from
66
- the shared session digest.
63
+ Primary path: the managed Cursor IDE `sessionStart` callback resolves the install
64
+ root from `AGENTERA_HOME`, project walk-up, the plugin/checkout root, or the
65
+ platform default app home when env and walk-up do not resolve a managed root,
66
+ then returns `{"env": {"AGENTERA_HOME": "<root>"}}` plus optional
67
+ `additional_context` from the shared session digest.
67
68
 
68
69
  Fallback: `packages/cli/src/setup/cursor.ts` reports persistent shell configuration
69
70
  only when live shell-tool smoke proves session env does not propagate to CLI
@@ -74,7 +75,7 @@ subprocesses. Agentera does not write shell rc files by default.
74
75
  | Surface | Behavior | Claim status |
75
76
  | ------- | -------- | ------------ |
76
77
  | IDE `preToolUse` (Write/Edit) | Deny invalid reconstructable artifact candidates | Verified after live preToolUse Write smoke (2026-05-24) |
77
- | IDE `postToolUse` (Write/Edit) | Advisory validation through shared `validate_artifact.py` | Active |
78
+ | IDE `postToolUse` (Write/Edit) | Advisory validation through the managed artifact-validation callback | Active |
78
79
  | CLI | Degraded; depends on workspace hook install and env propagation | Follows IDE smoke evidence only |
79
80
 
80
81
  Live preToolUse Write smoke passed on 2026-05-24 with invalid-block and valid-allow
@@ -89,36 +90,42 @@ IDE: managed descriptors under `.cursor/agents/` with `<!-- agentera: managed --
89
90
  ownership markers. Upgrade refreshes Agentera-owned targets and preserves unknown
90
91
  collisions.
91
92
 
92
- CLI: host-managed `cursor-agent` print mode; no separate TOML descriptor install.
93
- Eval coverage targets `cursor-agent` first.
93
+ CLI: host-managed `cursor-agent` print mode through the inactive Cursor alias;
94
+ there is no separate descriptor install. Eval coverage may accept the alias but
95
+ must report the canonical runtime identity as `cursor`.
94
96
 
95
97
  ## Upgrade and doctor
96
98
 
97
99
  ```bash
98
- uv run scripts/agentera upgrade --runtime cursor --dry-run
99
- uv run scripts/agentera doctor --runtime cursor
100
+ npx -y agentera@next upgrade --project "$PWD" --runtime cursor --dry-run
101
+ npx -y agentera@next upgrade --project "$PWD" --runtime cursor --yes
102
+ npx -y agentera@next doctor --format json
100
103
  ```
101
104
 
102
- Upgrade copies managed hooks, agents, and plugin metadata into target projects
103
- with the same ownership protections used for OpenCode and Codex.
105
+ Upgrade treats Cursor Agent CLI and Cursor IDE as surfaces of one `cursor` runtime.
106
+ It manages the shared canonical skill used by both surfaces and, for the
107
+ conditional IDE surface, project hooks, the Agentera descriptor, and plugin
108
+ metadata. The shared lifecycle engine creates or repairs only Agentera-owned
109
+ resources and preserves unowned collisions.
104
110
 
105
- Doctor reports helper access, hook presence, and managed agent alignment.
111
+ Doctor reports all active runtimes in one read-only lifecycle snapshot, including
112
+ Cursor CLI and IDE evidence; it does not accept a Cursor-only runtime filter.
106
113
 
107
114
  ## Eval
108
115
 
109
116
  ```bash
110
- uv run scripts/eval_skills.py --runtime cursor-agent --skill hej --dry-run
117
+ agentera check verify eval skills --runtime cursor --skill agentera --dry-run
111
118
  ```
112
119
 
113
120
  Print mode uses `cursor-agent -p --output-format json --force`. Harnesses apply
114
121
  bounded timeouts because some CLI builds hang after completion.
115
122
 
116
- ## Unsupported in v1
123
+ ## Current limitations
117
124
 
118
125
  - Cloud agents (no project hook or managed-agent guarantees)
119
- - Bare `hej` prompt rewrite routing
126
+ - Bare prompt rewrite routing
120
127
  - Session compaction injection beyond shared hook helpers
121
- - Separate cursor-agent hook install distinct from IDE workspace surfaces
128
+ - No separate Cursor Agent CLI hook install distinct from Cursor workspace surfaces
122
129
 
123
130
  ## Profilera session corpus (Section 22)
124
131
 
@@ -135,8 +142,9 @@ maps each record type to Cursor IDE local storage on disk.
135
142
  | `~/.config/cursor/chats/<md5(project-path)>/<session-id>/store.db` | Cursor Agent CLI chat store (gap-fill when JSONL absent) |
136
143
 
137
144
  Override the projects root with `--cursor-projects-dir`, the CLI chats root with
138
- `--cursor-chats-dir`, or disable both Cursor runtimes with `--no-cursor` on
139
- `scripts/extract_corpus.py` and `agentera stats refresh`.
145
+ `--cursor-chats-dir`, or disable both Cursor source stores with `--no-cursor` on
146
+ `agentera report refresh`. The Python extractor wrapper is a maintainer-only parity
147
+ surface, not the user-facing command.
140
148
 
141
149
  Project slug convention: absolute project path segments joined with `-`, lowercased
142
150
  (for example `/home/user/git/agentera` → `home-user-git-agentera`). CLI workspace
@@ -156,9 +164,9 @@ Each line is a JSON object:
156
164
  Roles are `user` or `assistant`. `message.content` is a list of blocks. Text blocks
157
165
  use `type: "text"`. Tool blocks use `type: "tool_use"` with `name` and `input`.
158
166
 
159
- ### Cursor Agent CLI `store.db` shape
167
+ ### Cursor source-product `store.db` shape
160
168
 
161
- Runtime id `cursor-agent` reads SQLite stores at
169
+ The inactive `cursor-agent` input alias reads Cursor-owned SQLite stores at
162
170
  `~/.config/cursor/chats/<workspace-hash>/<session-id>/store.db`. Each store has:
163
171
 
164
172
  | Table | Purpose |
@@ -209,6 +217,8 @@ appear in errors, smoke output, or test assertions.
209
217
 
210
218
  ## Source of truth
211
219
 
212
- RuntimeAdapter records live in
213
- `references/adapters/runtime-adapter-registry.yaml`. Parity comparisons belong in
214
- `references/adapters/runtime-feature-parity.md`.
220
+ Runtime identity and surfaces live in
221
+ `references/adapters/runtime-lifecycle-authority.yaml`; eight-category behavior
222
+ lives in `references/adapters/runtime-lifecycle-adapters.yaml`. Host-event facts
223
+ remain in `references/adapters/runtime-adapter-registry.yaml`, and parity
224
+ comparisons belong in `references/adapters/runtime-feature-parity.md`.