agentera 0.0.0 → 3.0.0-dev.1

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 (256) hide show
  1. package/README.md +6 -45
  2. package/bundle/.agentera-npx-bundle.json +4 -0
  3. package/bundle/references/adapters/cursor.md +213 -0
  4. package/bundle/references/adapters/opencode.md +530 -0
  5. package/bundle/references/adapters/package-manifest-interface-model.yaml +337 -0
  6. package/bundle/references/adapters/package-registry.yaml +247 -0
  7. package/bundle/references/adapters/package-surface-characterization.md +48 -0
  8. package/bundle/references/adapters/runtime-adapter-characterization.md +79 -0
  9. package/bundle/references/adapters/runtime-adapter-interface-model.yaml +200 -0
  10. package/bundle/references/adapters/runtime-adapter-registry.yaml +548 -0
  11. package/bundle/references/adapters/runtime-feature-parity.md +189 -0
  12. package/bundle/references/analysis/benchmark.md +267 -0
  13. package/bundle/references/analysis/startup-measurement-contract.yaml +424 -0
  14. package/bundle/references/artifacts/artifact-registry-interface-model.yaml +288 -0
  15. package/bundle/references/cli/agent-ready-state-contract.yaml +950 -0
  16. package/bundle/references/cli/app-lifecycle-vocabulary.yaml +241 -0
  17. package/bundle/references/cli/audience-namespace-cli-migration.yaml +355 -0
  18. package/bundle/references/cli/bundle-skill-vocabulary.yaml +278 -0
  19. package/bundle/references/cli/capability-instruction-contract.yaml +123 -0
  20. package/bundle/references/cli/capability-tool-classification.yaml +53 -0
  21. package/bundle/references/cli/routing-execution-vocabulary.yaml +281 -0
  22. package/bundle/references/cli/update-channels.yaml +147 -0
  23. package/bundle/references/cli/vocabulary-index.yaml +160 -0
  24. package/bundle/references/cli/vocabulary.md +566 -0
  25. package/bundle/references/meta/documentation-inventory.md +43 -0
  26. package/bundle/references/v1-section-mapping.md +47 -0
  27. package/bundle/registry.json +39 -0
  28. package/bundle/skills/agentera/.claude-plugin/plugin.json +27 -0
  29. package/bundle/skills/agentera/SKILL.md +470 -0
  30. package/bundle/skills/agentera/agents/dokumentera.toml +6 -0
  31. package/bundle/skills/agentera/agents/hej.toml +6 -0
  32. package/bundle/skills/agentera/agents/inspektera.toml +6 -0
  33. package/bundle/skills/agentera/agents/inspirera.toml +6 -0
  34. package/bundle/skills/agentera/agents/optimera.toml +6 -0
  35. package/bundle/skills/agentera/agents/orkestrera.toml +6 -0
  36. package/bundle/skills/agentera/agents/planera.toml +6 -0
  37. package/bundle/skills/agentera/agents/profilera.toml +6 -0
  38. package/bundle/skills/agentera/agents/realisera.toml +6 -0
  39. package/bundle/skills/agentera/agents/resonera.toml +6 -0
  40. package/bundle/skills/agentera/agents/visionera.toml +6 -0
  41. package/bundle/skills/agentera/agents/visualisera.toml +6 -0
  42. package/bundle/skills/agentera/capabilities/dokumentera/instructions.md +428 -0
  43. package/bundle/skills/agentera/capabilities/dokumentera/schemas/artifacts.yaml +73 -0
  44. package/bundle/skills/agentera/capabilities/dokumentera/schemas/exit.yaml +35 -0
  45. package/bundle/skills/agentera/capabilities/dokumentera/schemas/triggers.yaml +35 -0
  46. package/bundle/skills/agentera/capabilities/dokumentera/schemas/validation.yaml +139 -0
  47. package/bundle/skills/agentera/capabilities/hej/instructions.md +331 -0
  48. package/bundle/skills/agentera/capabilities/hej/schemas/artifacts.yaml +69 -0
  49. package/bundle/skills/agentera/capabilities/hej/schemas/exit.yaml +32 -0
  50. package/bundle/skills/agentera/capabilities/hej/schemas/triggers.yaml +58 -0
  51. package/bundle/skills/agentera/capabilities/hej/schemas/validation.yaml +55 -0
  52. package/bundle/skills/agentera/capabilities/inspektera/instructions.md +514 -0
  53. package/bundle/skills/agentera/capabilities/inspektera/schemas/artifacts.yaml +76 -0
  54. package/bundle/skills/agentera/capabilities/inspektera/schemas/exit.yaml +36 -0
  55. package/bundle/skills/agentera/capabilities/inspektera/schemas/triggers.yaml +38 -0
  56. package/bundle/skills/agentera/capabilities/inspektera/schemas/validation.yaml +113 -0
  57. package/bundle/skills/agentera/capabilities/inspirera/instructions.md +280 -0
  58. package/bundle/skills/agentera/capabilities/inspirera/schemas/artifacts.yaml +24 -0
  59. package/bundle/skills/agentera/capabilities/inspirera/schemas/exit.yaml +33 -0
  60. package/bundle/skills/agentera/capabilities/inspirera/schemas/triggers.yaml +34 -0
  61. package/bundle/skills/agentera/capabilities/inspirera/schemas/validation.yaml +58 -0
  62. package/bundle/skills/agentera/capabilities/optimera/instructions.md +437 -0
  63. package/bundle/skills/agentera/capabilities/optimera/schemas/artifacts.yaml +69 -0
  64. package/bundle/skills/agentera/capabilities/optimera/schemas/exit.yaml +35 -0
  65. package/bundle/skills/agentera/capabilities/optimera/schemas/triggers.yaml +39 -0
  66. package/bundle/skills/agentera/capabilities/optimera/schemas/validation.yaml +91 -0
  67. package/bundle/skills/agentera/capabilities/orkestrera/instructions.md +433 -0
  68. package/bundle/skills/agentera/capabilities/orkestrera/schemas/artifacts.yaml +64 -0
  69. package/bundle/skills/agentera/capabilities/orkestrera/schemas/exit.yaml +34 -0
  70. package/bundle/skills/agentera/capabilities/orkestrera/schemas/triggers.yaml +42 -0
  71. package/bundle/skills/agentera/capabilities/orkestrera/schemas/validation.yaml +107 -0
  72. package/bundle/skills/agentera/capabilities/planera/instructions.md +368 -0
  73. package/bundle/skills/agentera/capabilities/planera/schemas/artifacts.yaml +62 -0
  74. package/bundle/skills/agentera/capabilities/planera/schemas/exit.yaml +33 -0
  75. package/bundle/skills/agentera/capabilities/planera/schemas/triggers.yaml +34 -0
  76. package/bundle/skills/agentera/capabilities/planera/schemas/validation.yaml +61 -0
  77. package/bundle/skills/agentera/capabilities/profilera/instructions.md +419 -0
  78. package/bundle/skills/agentera/capabilities/profilera/schemas/artifacts.yaml +18 -0
  79. package/bundle/skills/agentera/capabilities/profilera/schemas/exit.yaml +34 -0
  80. package/bundle/skills/agentera/capabilities/profilera/schemas/triggers.yaml +45 -0
  81. package/bundle/skills/agentera/capabilities/profilera/schemas/validation.yaml +57 -0
  82. package/bundle/skills/agentera/capabilities/realisera/instructions.md +403 -0
  83. package/bundle/skills/agentera/capabilities/realisera/schemas/artifacts.yaml +80 -0
  84. package/bundle/skills/agentera/capabilities/realisera/schemas/exit.yaml +35 -0
  85. package/bundle/skills/agentera/capabilities/realisera/schemas/triggers.yaml +39 -0
  86. package/bundle/skills/agentera/capabilities/realisera/schemas/validation.yaml +110 -0
  87. package/bundle/skills/agentera/capabilities/resonera/instructions.md +329 -0
  88. package/bundle/skills/agentera/capabilities/resonera/schemas/artifacts.yaml +47 -0
  89. package/bundle/skills/agentera/capabilities/resonera/schemas/exit.yaml +35 -0
  90. package/bundle/skills/agentera/capabilities/resonera/schemas/triggers.yaml +46 -0
  91. package/bundle/skills/agentera/capabilities/resonera/schemas/validation.yaml +77 -0
  92. package/bundle/skills/agentera/capabilities/visionera/instructions.md +309 -0
  93. package/bundle/skills/agentera/capabilities/visionera/schemas/artifacts.yaml +57 -0
  94. package/bundle/skills/agentera/capabilities/visionera/schemas/exit.yaml +35 -0
  95. package/bundle/skills/agentera/capabilities/visionera/schemas/triggers.yaml +41 -0
  96. package/bundle/skills/agentera/capabilities/visionera/schemas/validation.yaml +74 -0
  97. package/bundle/skills/agentera/capabilities/visualisera/instructions.md +400 -0
  98. package/bundle/skills/agentera/capabilities/visualisera/schemas/artifacts.yaml +44 -0
  99. package/bundle/skills/agentera/capabilities/visualisera/schemas/exit.yaml +34 -0
  100. package/bundle/skills/agentera/capabilities/visualisera/schemas/triggers.yaml +33 -0
  101. package/bundle/skills/agentera/capabilities/visualisera/schemas/validation.yaml +80 -0
  102. package/bundle/skills/agentera/capability_schema_contract.yaml +385 -0
  103. package/bundle/skills/agentera/protocol.yaml +463 -0
  104. package/bundle/skills/agentera/references/contract.md +1039 -0
  105. package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +60 -0
  106. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +461 -0
  107. package/bundle/skills/agentera/schemas/artifacts/design.yaml +55 -0
  108. package/bundle/skills/agentera/schemas/artifacts/docs.yaml +402 -0
  109. package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +373 -0
  110. package/bundle/skills/agentera/schemas/artifacts/health.yaml +484 -0
  111. package/bundle/skills/agentera/schemas/artifacts/objective.yaml +399 -0
  112. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +342 -0
  113. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +325 -0
  114. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +110 -0
  115. package/bundle/skills/agentera/schemas/artifacts/vision.yaml +262 -0
  116. package/bundle/skills/hej/.claude-plugin/plugin.json +6 -0
  117. package/bundle/skills/hej/SKILL.md +69 -0
  118. package/bundle/skills/hej/agents/hej.toml +11 -0
  119. package/bundle/skills/hej/agents/openai.yaml +8 -0
  120. package/dist/analytics/extractCorpus.js +1791 -0
  121. package/dist/analytics/extractCorpus.js.map +1 -0
  122. package/dist/analytics/usageStats.js +487 -0
  123. package/dist/analytics/usageStats.js.map +1 -0
  124. package/dist/bin/agentera.js +4 -0
  125. package/dist/bin/agentera.js.map +1 -0
  126. package/dist/cli/appContext.js +226 -0
  127. package/dist/cli/appContext.js.map +1 -0
  128. package/dist/cli/argvalidate.js +41 -0
  129. package/dist/cli/argvalidate.js.map +1 -0
  130. package/dist/cli/capabilityContext.js +2421 -0
  131. package/dist/cli/capabilityContext.js.map +1 -0
  132. package/dist/cli/commands/backfill.js +84 -0
  133. package/dist/cli/commands/backfill.js.map +1 -0
  134. package/dist/cli/commands/capability.js +44 -0
  135. package/dist/cli/commands/capability.js.map +1 -0
  136. package/dist/cli/commands/compact.js +148 -0
  137. package/dist/cli/commands/compact.js.map +1 -0
  138. package/dist/cli/commands/doctor.js +180 -0
  139. package/dist/cli/commands/doctor.js.map +1 -0
  140. package/dist/cli/commands/lint.js +179 -0
  141. package/dist/cli/commands/lint.js.map +1 -0
  142. package/dist/cli/commands/prime.js +544 -0
  143. package/dist/cli/commands/prime.js.map +1 -0
  144. package/dist/cli/commands/query.js +346 -0
  145. package/dist/cli/commands/query.js.map +1 -0
  146. package/dist/cli/commands/report.js +210 -0
  147. package/dist/cli/commands/report.js.map +1 -0
  148. package/dist/cli/commands/schema.js +306 -0
  149. package/dist/cli/commands/schema.js.map +1 -0
  150. package/dist/cli/commands/state.js +1012 -0
  151. package/dist/cli/commands/state.js.map +1 -0
  152. package/dist/cli/commands/upgrade.js +48 -0
  153. package/dist/cli/commands/upgrade.js.map +1 -0
  154. package/dist/cli/commands/validate.js +519 -0
  155. package/dist/cli/commands/validate.js.map +1 -0
  156. package/dist/cli/commands/verify.js +204 -0
  157. package/dist/cli/commands/verify.js.map +1 -0
  158. package/dist/cli/dispatch.js +958 -0
  159. package/dist/cli/dispatch.js.map +1 -0
  160. package/dist/cli/orientation.js +595 -0
  161. package/dist/cli/orientation.js.map +1 -0
  162. package/dist/cli/prime-blob.js +3 -0
  163. package/dist/cli/prime-blob.js.map +1 -0
  164. package/dist/cli/stateQuery.js +292 -0
  165. package/dist/cli/stateQuery.js.map +1 -0
  166. package/dist/cli/structured.js +18 -0
  167. package/dist/cli/structured.js.map +1 -0
  168. package/dist/core/difflib.js +274 -0
  169. package/dist/core/difflib.js.map +1 -0
  170. package/dist/core/git.js +43 -0
  171. package/dist/core/git.js.map +1 -0
  172. package/dist/core/paths.js +50 -0
  173. package/dist/core/paths.js.map +1 -0
  174. package/dist/core/pyjson.js +101 -0
  175. package/dist/core/pyjson.js.map +1 -0
  176. package/dist/core/sourceRoot.js +72 -0
  177. package/dist/core/sourceRoot.js.map +1 -0
  178. package/dist/core/toml.js +11 -0
  179. package/dist/core/toml.js.map +1 -0
  180. package/dist/core/yaml.js +25 -0
  181. package/dist/core/yaml.js.map +1 -0
  182. package/dist/eval/evalSkills.js +258 -0
  183. package/dist/eval/evalSkills.js.map +1 -0
  184. package/dist/eval/semanticEval.js +148 -0
  185. package/dist/eval/semanticEval.js.map +1 -0
  186. package/dist/eval/semanticFixtures.js +227 -0
  187. package/dist/eval/semanticFixtures.js.map +1 -0
  188. package/dist/hooks/common.js +160 -0
  189. package/dist/hooks/common.js.map +1 -0
  190. package/dist/hooks/compaction.js +935 -0
  191. package/dist/hooks/compaction.js.map +1 -0
  192. package/dist/hooks/cursorPreToolUse.js +19 -0
  193. package/dist/hooks/cursorPreToolUse.js.map +1 -0
  194. package/dist/hooks/cursorSessionStart.js +71 -0
  195. package/dist/hooks/cursorSessionStart.js.map +1 -0
  196. package/dist/hooks/sessionStart.js +209 -0
  197. package/dist/hooks/sessionStart.js.map +1 -0
  198. package/dist/hooks/sessionStop.js +212 -0
  199. package/dist/hooks/sessionStop.js.map +1 -0
  200. package/dist/hooks/validateArtifact.js +933 -0
  201. package/dist/hooks/validateArtifact.js.map +1 -0
  202. package/dist/registries/artifactRegistry.js +206 -0
  203. package/dist/registries/artifactRegistry.js.map +1 -0
  204. package/dist/registries/capabilityContract.js +310 -0
  205. package/dist/registries/capabilityContract.js.map +1 -0
  206. package/dist/registries/packageRegistry.js +641 -0
  207. package/dist/registries/packageRegistry.js.map +1 -0
  208. package/dist/registries/runtimeAdapterRegistry.js +315 -0
  209. package/dist/registries/runtimeAdapterRegistry.js.map +1 -0
  210. package/dist/setup/codex.js +1056 -0
  211. package/dist/setup/codex.js.map +1 -0
  212. package/dist/setup/copilot.js +227 -0
  213. package/dist/setup/copilot.js.map +1 -0
  214. package/dist/setup/cursor.js +127 -0
  215. package/dist/setup/cursor.js.map +1 -0
  216. package/dist/setup/doctor.js +1276 -0
  217. package/dist/setup/doctor.js.map +1 -0
  218. package/dist/state/installRoot.js +279 -0
  219. package/dist/state/installRoot.js.map +1 -0
  220. package/dist/state/progressCommit.js +289 -0
  221. package/dist/state/progressCommit.js.map +1 -0
  222. package/dist/state/startupAnalysis.js +1953 -0
  223. package/dist/state/startupAnalysis.js.map +1 -0
  224. package/dist/upgrade/appModel.js +189 -0
  225. package/dist/upgrade/appModel.js.map +1 -0
  226. package/dist/upgrade/channels.js +208 -0
  227. package/dist/upgrade/channels.js.map +1 -0
  228. package/dist/upgrade/compatibility.js +201 -0
  229. package/dist/upgrade/compatibility.js.map +1 -0
  230. package/dist/upgrade/doctor.js +373 -0
  231. package/dist/upgrade/doctor.js.map +1 -0
  232. package/dist/upgrade/migrateArtifactsV2ToV3.js +332 -0
  233. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -0
  234. package/dist/upgrade/runtimeMigration.js +484 -0
  235. package/dist/upgrade/runtimeMigration.js.map +1 -0
  236. package/dist/upgrade/upgradeCommands.js +36 -0
  237. package/dist/upgrade/upgradeCommands.js.map +1 -0
  238. package/dist/upgrade/upgradeOrchestrator.js +299 -0
  239. package/dist/upgrade/upgradeOrchestrator.js.map +1 -0
  240. package/dist/upgrade/versionResolution.js +179 -0
  241. package/dist/upgrade/versionResolution.js.map +1 -0
  242. package/dist/validate/appHomeContract.js +150 -0
  243. package/dist/validate/appHomeContract.js.map +1 -0
  244. package/dist/validate/capability.js +412 -0
  245. package/dist/validate/capability.js.map +1 -0
  246. package/dist/validate/crossCapability.js +145 -0
  247. package/dist/validate/crossCapability.js.map +1 -0
  248. package/dist/validate/lifecycleAdapters.js +772 -0
  249. package/dist/validate/lifecycleAdapters.js.map +1 -0
  250. package/dist/validate/selfAudit.js +107 -0
  251. package/dist/validate/selfAudit.js.map +1 -0
  252. package/package.json +28 -8
  253. package/LICENSE +0 -201
  254. package/bin/agentera.mjs +0 -50
  255. package/lib/exec.mjs +0 -116
  256. package/lib/resolve.mjs +0 -129
package/README.md CHANGED
@@ -1,48 +1,9 @@
1
- # agentera (npm)
1
+ # Agentera CLI (v3)
2
2
 
3
- Placeholder npm package that reserves the [`agentera`](https://www.npmjs.com/package/agentera) name for `npx agentera` ahead of the Agentera 3.0 TypeScript CLI.
3
+ Placeholder for the planned TypeScript CLI rewrite.
4
4
 
5
- **0.x** releases are a thin Node shim. **3.0.0** will ship the native Bun/npm CLI described in the main repository.
5
+ The current Python CLI lives at `scripts/agentera` in the repository root.
6
+ This package will eventually host the v3 TypeScript implementation.
6
7
 
7
- ## Usage
8
-
9
- ```bash
10
- npx agentera --version
11
- npx agentera prime
12
- npm install -g agentera
13
- ```
14
-
15
- ## Delegation order
16
-
17
- When you run `agentera`, the shim forwards to the existing Python CLI using the first match:
18
-
19
- 1. **Installed app-home** — `$AGENTERA_HOME/app/scripts/agentera` via `uv run`
20
- 2. **Repository checkout** — nearest parent directory containing `scripts/agentera`, via `uv run scripts/agentera`
21
- 3. **`uvx` from GitHub** — `uvx --from git+https://github.com/jgabor/agentera@<tag> agentera` (tag pinned in `package.json` → `agentera.gitRef`)
22
- 4. **Install help** — stderr guidance and exit code 1 if nothing above applies
23
-
24
- The shim does not bundle Python, skills, or hooks. Install paths for runtimes remain in the [main README](https://github.com/jgabor/agentera#get-started).
25
-
26
- ## Publishing (maintainers)
27
-
28
- From this directory after review:
29
-
30
- ```bash
31
- npm pack
32
- npm publish --access public
33
- ```
34
-
35
- Verify from a clean directory:
36
-
37
- ```bash
38
- npx agentera@0.0.0 --version
39
- ```
40
-
41
- ## Development
42
-
43
- ```bash
44
- node packages/cli/bin/agentera.mjs --version
45
- node packages/cli/bin/agentera.mjs --help
46
- ```
47
-
48
- Suite version pin lives in `package.json` under `agentera.suiteVersion` / `agentera.gitRef`; npm `version` stays on the `0.0.x` line until 3.0.
8
+ See the [Agentera repository](https://github.com/jgabor/agentera) for the
9
+ current CLI documentation and usage.
@@ -0,0 +1,4 @@
1
+ {
2
+ "kind": "agentera-npx-bundle",
3
+ "suiteVersion": "2.7.6"
4
+ }
@@ -0,0 +1,213 @@
1
+ # Cursor adapter reference
2
+
3
+ Agentera v1 ships Cursor as two registry identities:
4
+
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.
12
+
13
+ ## Quick install
14
+
15
+ **Local plugin (no Marketplace listing required)**
16
+
17
+ ```bash
18
+ git clone https://github.com/jgabor/agentera.git ~/.cursor/plugins/local/agentera
19
+ # or: ln -s /path/to/agentera ~/.cursor/plugins/local/agentera
20
+ ```
21
+
22
+ Restart Cursor or run **Developer: Reload Window**. The plugin root must contain
23
+ `.cursor-plugin/plugin.json`. Agentera is not published to the Cursor Marketplace
24
+ yet; use this manual local path or Cursor's local plugin loading UI instead.
25
+
26
+ The plugin loads skills, managed capability agents, and plugin hooks. When you open
27
+ a project that is not an Agentera install root, `sessionStart` exports
28
+ `AGENTERA_HOME` from the plugin checkout (including a plugin-root fallback when env
29
+ and project walk-up do not resolve a managed root).
30
+
31
+ **Portable skill plus project upgrade**
32
+
33
+ ```bash
34
+ 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
37
+ ```
38
+
39
+ Use the plugin path for a user-global install. Use upgrade when you need
40
+ project-committed `.cursor/hooks.json` and `.cursor/agents/` copies. Both paths can
41
+ be combined.
42
+
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
45
+ [`UPGRADE.md`](../../UPGRADE.md).
46
+
47
+ ## Repo-native surfaces
48
+
49
+ This repository dogfoods committed Cursor surfaces:
50
+
51
+ - `.cursor/hooks.json` — sessionStart env export, preToolUse hard gate, postToolUse advisory validation
52
+ - `.cursor/agents/*.md` — twelve managed capability descriptors
53
+ - `.cursor-plugin/plugin.json` — marketplace submission-ready manifest
54
+
55
+ Hooks resolve helper scripts through `uv run hooks/...` from the project root.
56
+ `sessionStart` exports `AGENTERA_HOME` through Cursor hook JSON (`env`) before
57
+ subsequent hook executions run.
58
+
59
+ ## AGENTERA_HOME wiring
60
+
61
+ Primary path: `hooks/cursor_session_start.py` resolves the install root from
62
+ `AGENTERA_HOME`, project walk-up, or the plugin/checkout root (`hooks/` parent)
63
+ when the hook runs from a plugin install, then returns
64
+ `{"env": {"AGENTERA_HOME": "<root>"}}` plus optional `additional_context` from
65
+ the shared session digest.
66
+
67
+ Fallback: `scripts/setup_cursor.py` reports persistent shell configuration only
68
+ when live shell-tool smoke proves session env does not propagate to CLI
69
+ subprocesses. Agentera does not write shell rc files by default.
70
+
71
+ ## Artifact validation
72
+
73
+ | Surface | Behavior | Claim status |
74
+ | ------- | -------- | ------------ |
75
+ | IDE `preToolUse` (Write/Edit) | Deny invalid reconstructable artifact candidates | Verified after live preToolUse Write smoke (2026-05-24) |
76
+ | IDE `postToolUse` (Write/Edit) | Advisory validation through shared `validate_artifact.py` | Active |
77
+ | CLI | Degraded; depends on workspace hook install and env propagation | Follows IDE smoke evidence only |
78
+
79
+ Live preToolUse Write smoke passed on 2026-05-24 with invalid-block and valid-allow
80
+ cases recorded in `.agentera/smoke-cursor-pretooluse-evidence.txt`. Conditional
81
+ hard-gate claims for reconstructable IDE Write and Edit candidates are verified;
82
+ release tagging and marketplace publication remain blocked pending broader release
83
+ closeout.
84
+
85
+ ## Subagent dispatch
86
+
87
+ IDE: managed descriptors under `.cursor/agents/` with `<!-- agentera: managed -->`
88
+ ownership markers. Upgrade refreshes Agentera-owned targets and preserves unknown
89
+ collisions.
90
+
91
+ CLI: host-managed `cursor-agent` print mode; no separate TOML descriptor install.
92
+ Eval coverage targets `cursor-agent` first.
93
+
94
+ ## Upgrade and doctor
95
+
96
+ ```bash
97
+ uv run scripts/agentera upgrade --runtime cursor --dry-run
98
+ uv run scripts/agentera doctor --runtime cursor
99
+ ```
100
+
101
+ Upgrade copies managed hooks, agents, and plugin metadata into target projects
102
+ with the same ownership protections used for OpenCode and Codex.
103
+
104
+ Doctor reports helper access, hook presence, and managed agent alignment.
105
+
106
+ ## Eval
107
+
108
+ ```bash
109
+ uv run scripts/eval_skills.py --runtime cursor-agent --skill hej --dry-run
110
+ ```
111
+
112
+ Print mode uses `cursor-agent -p --output-format json --force`. Harnesses apply
113
+ bounded timeouts because some CLI builds hang after completion.
114
+
115
+ ## Unsupported in v1
116
+
117
+ - Cloud agents (no project hook or managed-agent guarantees)
118
+ - Bare `hej` prompt rewrite routing
119
+ - Session compaction injection beyond shared hook helpers
120
+ - Separate cursor-agent hook install distinct from IDE workspace surfaces
121
+
122
+ ## Profilera session corpus (Section 22)
123
+
124
+ Profilera mines five canonical record types from host session data. This section
125
+ maps each record type to Cursor IDE local storage on disk.
126
+
127
+ ### Probe paths
128
+
129
+ | Path | Purpose |
130
+ | ---- | ------- |
131
+ | `~/.cursor/projects/` | Root directory for workspace-scoped Cursor state |
132
+ | `~/.cursor/projects/<project-slug>/agent-transcripts/<session-id>/*.jsonl` | Agent session transcripts (Composer / Agent) |
133
+ | `~/.cursor/projects/<project-slug>/repo.json` | Workspace metadata (`id` UUID); slug mapping is primary for project scoping |
134
+ | `~/.config/cursor/chats/<md5(project-path)>/<session-id>/store.db` | Cursor Agent CLI chat store (gap-fill when JSONL absent) |
135
+
136
+ Override the projects root with `--cursor-projects-dir`, the CLI chats root with
137
+ `--cursor-chats-dir`, or disable both Cursor runtimes with `--no-cursor` on
138
+ `scripts/extract_corpus.py` and `agentera stats refresh`.
139
+
140
+ Project slug convention: absolute project path segments joined with `-`, lowercased
141
+ (for example `/home/user/git/agentera` → `home-user-git-agentera`). CLI workspace
142
+ hashes use `md5(absolute-project-path)` hex (same string Cursor uses under
143
+ `~/.config/cursor/chats/`). When `--project-root` is supplied, extraction prefers
144
+ matching slugs and workspace hashes over unrelated stores.
145
+
146
+ ### Transcript JSONL shape
147
+
148
+ Each line is a JSON object:
149
+
150
+ ```json
151
+ {"role": "user", "message": {"content": [{"type": "text", "text": "..."}]}}
152
+ {"role": "assistant", "message": {"content": [{"type": "text", "text": "..."}, {"type": "tool_use", "name": "grep", "input": {"pattern": "..."}}]}}
153
+ ```
154
+
155
+ Roles are `user` or `assistant`. `message.content` is a list of blocks. Text blocks
156
+ use `type: "text"`. Tool blocks use `type: "tool_use"` with `name` and `input`.
157
+
158
+ ### Cursor Agent CLI `store.db` shape
159
+
160
+ Runtime id `cursor-agent` reads SQLite stores at
161
+ `~/.config/cursor/chats/<workspace-hash>/<session-id>/store.db`. Each store has:
162
+
163
+ | Table | Purpose |
164
+ | ----- | ------- |
165
+ | `blobs` | JSON message payloads keyed by content hash (`role`, `content`, optional tool blocks) |
166
+ | `meta` | Session metadata (`agentId`, model, mode) |
167
+
168
+ JSON blobs use `role` values such as `user`, `assistant`, and `tool`. User content is
169
+ often a plain string; assistant content is a list that may include `text` and
170
+ `tool-call` items (`toolName`, `args`). Sessions that already have IDE JSONL under
171
+ `agent-transcripts/<same-session-id>/` are skipped (gap-fill only).
172
+
173
+ ### Portable record families
174
+
175
+ | Family | Cursor source | Status |
176
+ | ------ | ------------- | ------ |
177
+ | Decision history | `history_prompt` from decision-rich user text blocks | Yes (local JSONL) |
178
+ | Conversation exchanges | `conversation_turn` from user/assistant lines | Yes (local JSONL) |
179
+ | Tool usage | `tool_call` from `tool_use` / `tool-call` blocks | Yes (bounded args) |
180
+ | Instruction documents | Project `AGENTS.md` via shared `--project-root` scan | Yes (filesystem) |
181
+ | Project config signals | Project manifests via shared `--project-root` scan | Yes (filesystem) |
182
+
183
+ ### Degradation and privacy
184
+
185
+ Extraction is read-only and local-only. Runtime status uses the shared
186
+ `runtime_statuses` vocabulary (`ok`, `missing`, `sparse`, `degraded`, `skipped`).
187
+ Diagnostics report counts and bounded reasons only; raw transcript text must not
188
+ appear in errors, smoke output, or test assertions.
189
+
190
+ | Condition | Status | Reason |
191
+ | --------- | ------ | ------ |
192
+ | Store path disabled (`--no-cursor`) | `skipped` | `disabled` |
193
+ | `~/.cursor/projects` or `~/.config/cursor/chats` absent | `missing` | `store_absent` |
194
+ | No `*.jsonl` under `agent-transcripts` / no gap-fill `store.db` | `sparse` | `no_candidate_files` / `no_matching_records` |
195
+ | Permission denied | `degraded` | `store_locked` |
196
+ | Invalid JSONL lines | `degraded` | `schema_divergent` |
197
+ | Candidates present but no normalized records | `sparse` | `no_matching_records` |
198
+
199
+ ### Gaps
200
+
201
+ - Numeric or opaque project directory names (no slug) skip filesystem project-path
202
+ inference; `--project-root` mapping still scopes extraction when the slug matches.
203
+ - Cloud agent sessions do not write local `agent-transcripts` in v1.
204
+ - `cursor-agent` `store.db` sessions that already have IDE JSONL transcripts are skipped
205
+ to avoid duplicate corpus records; gap-fill covers chat-only CLI sessions.
206
+ - Binary or non-JSON blobs in `store.db` degrade with bounded diagnostics and do not
207
+ leak transcript text.
208
+
209
+ ## Source of truth
210
+
211
+ RuntimeAdapter records live in
212
+ `references/adapters/runtime-adapter-registry.yaml`. Parity comparisons belong in
213
+ `references/adapters/runtime-feature-parity.md`.