eagle-mem 4.10.13 → 4.11.0

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/CHANGELOG.md +13 -0
  2. package/README.md +20 -20
  3. package/architecture.html +26 -14
  4. package/bin/eagle-mem +4 -0
  5. package/db/039_recall_events.sql +27 -0
  6. package/db/040_graph_decision_nodes.sql +21 -0
  7. package/db/041_graph_semantic_edge_types.sql +21 -0
  8. package/db/042_orchestration_auto_events.sql +23 -0
  9. package/db/043_eagle_events.sql +22 -0
  10. package/docs/agent-compatibility/README.md +38 -0
  11. package/docs/agent-compatibility/claude-code.md +50 -0
  12. package/docs/agent-compatibility/codex.md +51 -0
  13. package/docs/agent-compatibility/opencode.md +71 -0
  14. package/hooks/post-tool-use.sh +8 -0
  15. package/hooks/pre-tool-use.sh +10 -1
  16. package/hooks/session-end.sh +3 -0
  17. package/hooks/session-start.sh +7 -0
  18. package/hooks/stop.sh +10 -1
  19. package/hooks/user-prompt-submit.sh +79 -6
  20. package/integrations/opencode_eagle_mem_plugin.js +387 -0
  21. package/lib/codex-hooks.sh +13 -6
  22. package/lib/common.sh +63 -0
  23. package/lib/db-events.sh +89 -0
  24. package/lib/db-graph.sh +154 -0
  25. package/lib/db-observations.sh +34 -0
  26. package/lib/db-orchestration.sh +149 -0
  27. package/lib/db.sh +2 -0
  28. package/lib/hooks.sh +12 -7
  29. package/lib/opencode-hooks.sh +105 -0
  30. package/lib/provider.sh +2 -2
  31. package/package.json +5 -2
  32. package/scripts/compaction.sh +108 -8
  33. package/scripts/dashboard.sh +372 -0
  34. package/scripts/doctor.sh +30 -3
  35. package/scripts/health.sh +40 -2
  36. package/scripts/help.sh +10 -2
  37. package/scripts/inspect.sh +285 -0
  38. package/scripts/install.sh +31 -7
  39. package/scripts/memories.sh +13 -0
  40. package/scripts/repair.sh +187 -0
  41. package/scripts/replay.sh +248 -0
  42. package/scripts/search.sh +44 -3
  43. package/scripts/statusline-em.sh +34 -7
  44. package/scripts/tasks.sh +34 -0
  45. package/scripts/test.sh +13 -0
  46. package/scripts/uninstall.sh +9 -0
  47. package/scripts/update.sh +18 -2
  48. package/tests/fixtures/agent-hooks/claude-statusline.json +32 -0
  49. package/tests/fixtures/agent-hooks/claude-user-prompt-submit.json +9 -0
  50. package/tests/fixtures/agent-hooks/codex-pre-tool-use.json +10 -0
  51. package/tests/fixtures/agent-hooks/codex-user-prompt-submit.json +7 -0
  52. package/tests/fixtures/agent-hooks/opencode-chat-message.json +36 -0
  53. package/tests/fixtures/agent-hooks/opencode-session-compacting.json +9 -0
  54. package/tests/fixtures/agent-hooks/opencode-todo-updated.json +13 -0
  55. package/tests/fixtures/agent-hooks/opencode-tool-execute-after.json +15 -0
  56. package/tests/fixtures/agent-hooks/opencode-tool-execute-before.json +12 -0
  57. package/tests/test_agent_compatibility_docs_gate.sh +123 -0
  58. package/tests/test_auto_orchestration_detection.sh +109 -0
  59. package/tests/test_claude_stop_hook_registration.sh +56 -0
  60. package/tests/test_codex_hooks_config.sh +73 -0
  61. package/tests/test_compaction_survival_matrix.sh +237 -0
  62. package/tests/test_dashboard.sh +96 -0
  63. package/tests/test_eagle_events.sh +96 -0
  64. package/tests/test_opencode_hooks_config.sh +56 -0
  65. package/tests/test_opencode_plugin_adapter.sh +202 -0
  66. package/tests/test_recall_observability.sh +144 -0
  67. package/tests/test_repair.sh +63 -0
  68. package/tests/test_rust_migration_plan.sh +75 -0
  69. package/tests/test_trust_surfaces.sh +123 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@ All notable changes to the **Eagle Mem** project are documented here.
4
4
 
5
5
  ---
6
6
 
7
+ ## v4.11.0 Agent Compatibility and Governance Surfaces
8
+
9
+ This feature release expands Eagle Mem from Claude/Codex memory hooks into a broader multi-agent governance substrate:
10
+
11
+ - **Agent Compatibility Docs**: Added official-doc-backed compatibility notes for Claude Code, Codex, and OpenCode hook/plugin behavior.
12
+ - **OpenCode Integration**: Added a local OpenCode plugin adapter, hook normalization fixtures, and install/update checks.
13
+ - **Compaction Survival**: Expanded compaction recovery tests across summaries, memories, tasks, feature verification, recall, and graph memory.
14
+ - **Orchestration Events**: Added durable event tables for orchestration and hook observability, with dashboard and replay/inspect/repair utilities.
15
+ - **Trust Surfaces**: Hardened doctor, statusline, JSON output, repair, and release verification behavior with new regression coverage.
16
+ - **Web/Docs Refresh**: Updated README, architecture page, and compatibility docs to describe the current hook, plugin, dashboard, and governance model.
17
+
18
+ ---
19
+
7
20
  ## v4.10.13 Feature Gate Monorepo Hardening
8
21
 
9
22
  This hotfix closes the feature verification gate false positives found in monorepos with repeated basenames:
package/README.md CHANGED
@@ -7,11 +7,11 @@
7
7
 
8
8
  # Eagle Mem
9
9
 
10
- **Shared memory, release guardrails, and worker lanes for Claude Code, Codex, Grok, and Google Antigravity.**
10
+ **Shared memory, release guardrails, and worker lanes for Claude Code, Codex, OpenCode, Grok, and Google Antigravity.**
11
11
 
12
- Eagle Mem turns AI coding sessions into compounding project knowledge. It gives Claude Code, Codex, and Google Antigravity hook-backed shared memory, gives Grok the same skills and CLI memory surface, labels which agent created each memory, blocks risky release commands until affected features are verified, and lets broad work split into durable worker lanes.
12
+ Eagle Mem turns AI coding sessions into compounding project knowledge. It gives Claude Code, Codex, OpenCode, and Google Antigravity hook-backed shared memory, gives Grok the same skills and CLI memory surface, labels which agent created each memory, blocks risky release commands until affected features are verified, and lets broad work split into durable worker lanes.
13
13
 
14
- **v4.10.5 and onward focuses on Graph Memory, Dream Cycle Curation, Grok, Google Antigravity support, and Compaction Survival:** Grok users get first-class skill linking and `eagle-mem grok-bootstrap`, while Antigravity users get native Python SDK hook integration via `google_antigravity_hook.py`. Claude Code, Codex, and Antigravity receive the deepest automatic lifecycle support through hooks; Grok currently uses the shared CLI and skill workflow.
14
+ **v4.10.5 and onward focuses on Graph Memory, Dream Cycle Curation, OpenCode, Grok, Google Antigravity support, and Compaction Survival:** OpenCode users get a global local plugin plus linked skills, Grok users get first-class skill linking and `eagle-mem grok-bootstrap`, and Antigravity users get native Python SDK hook integration via `google_antigravity_hook.py`. Claude Code, Codex, OpenCode, and Antigravity receive the deepest automatic lifecycle support through hooks or plugins; Grok currently uses the shared CLI and skill workflow.
15
15
 
16
16
  **Website:** [Product](https://eagleisbatman.github.io/eagle-mem/) |
17
17
  [Architecture](https://eagleisbatman.github.io/eagle-mem/architecture.html) |
@@ -22,12 +22,12 @@ Eagle Mem turns AI coding sessions into compounding project knowledge. It gives
22
22
  - **Start warmer** - every new session can recall project overviews, decisions, gotchas, summaries, hot files, mirrored memories, plans, and tasks.
23
23
  - **Ship safer** - feature-mapped changes create pending verification records, and release-boundary commands stay blocked until the current diff is verified or waived.
24
24
  - **Waste fewer tokens** - Eagle Mem injects compact context, nudges duplicate reads, and can route noisy shell output through RTK.
25
- - **Coordinate agents** - Claude, Codex, Grok, and Antigravity can share one project memory while worker lanes record owner, model, effort, worktree, logs, validation, and handoff.
25
+ - **Coordinate agents** - Claude, Codex, OpenCode, Grok, and Antigravity can share one project memory while worker lanes record owner, model, effort, worktree, logs, validation, and handoff.
26
26
  - **Stay local** - no daemon, no hosted memory service, no vector database. The core is hooks plus SQLite/FTS5.
27
27
 
28
28
  ## The Problem
29
29
 
30
- Claude Code, Codex, Grok, and Google Antigravity start every session with amnesia. They don't remember what you built yesterday, what decisions you made, what files matter, or what broke last time. Every `/compact` wipes context. Every new session is a cold start. You waste tokens re-explaining your project, re-reading files, and watching agents repeat mistakes you already corrected.
30
+ Claude Code, Codex, OpenCode, Grok, and Google Antigravity start every session with amnesia. They don't remember what you built yesterday, what decisions you made, what files matter, or what broke last time. Every `/compact` wipes context. Every new session is a cold start. You waste tokens re-explaining your project, re-reading files, and watching agents repeat mistakes you already corrected.
31
31
 
32
32
  The longer you work with Claude Code, the worse this gets. Projects accumulate history — decisions, gotchas, architectural patterns, feature dependencies — and none of it survives across sessions.
33
33
 
@@ -41,7 +41,7 @@ Eagle Mem is a local runtime layer for AI coding agents. It adds three things th
41
41
  | **Guardrails** | "The agent cannot casually undo known decisions or push unverified feature changes." | Surfaces decisions before edits and enforces feature verification on push, PR, and publish boundaries. |
42
42
  | **Lanes** | "A big task can survive compaction and split across agents." | Persists orchestrations, worker lanes, worktrees, logs, validation commands, and handoffs. |
43
43
 
44
- Claude Code, Codex, and Google Antigravity share the same SQLite database at `~/.eagle-mem/memory.db`, and captured rows are source-attributed as `Claude Code`, `Codex`, or `Antigravity`. Grok uses the same database through skills and CLI commands.
44
+ Claude Code, Codex, OpenCode, and Google Antigravity share the same SQLite database at `~/.eagle-mem/memory.db`, and captured rows are source-attributed as `Claude Code`, `Codex`, `OpenCode`, or `Antigravity`. Grok uses the same database through skills and CLI commands.
45
45
 
46
46
  **Zero per-instance overhead.** No daemon, no vector DB, no MCP server. Just bash/python hooks, sqlite3 (WAL mode, FTS5 full-text search), and jq.
47
47
 
@@ -66,17 +66,17 @@ eagle-mem install
66
66
  eagle-mem doctor
67
67
  ```
68
68
 
69
- That's it. `doctor` should report a healthy install. Open Claude Code or Codex, or import the Antigravity hook in your agent config, and Eagle Mem activates automatically. For Grok, run `eagle-mem grok-bootstrap` after install to confirm the linked skills and CLI workflow.
69
+ That's it. `doctor` should report a healthy install. Open Claude Code, Codex, or OpenCode, or import the Antigravity hook in your agent config, and Eagle Mem activates automatically. For Grok, run `eagle-mem grok-bootstrap` after install to confirm the linked skills and CLI workflow.
70
70
 
71
- For Claude Code, Codex, and Google Antigravity, everything is automatic. Eagle Mem scans your codebase, indexes source files, captures session summaries, mirrors memories and tasks (including planning-mode artifacts like `implementation_plan.md`, `task.md`, and `walkthrough.md`), learns which commands are noisy, and prunes stale data — all in the background via hooks.
71
+ For Claude Code, Codex, OpenCode, and Google Antigravity, everything is automatic. Eagle Mem scans your codebase, indexes source files, captures session summaries, mirrors memories and tasks (including planning-mode artifacts like `implementation_plan.md`, `task.md`, and `walkthrough.md`), learns which commands are noisy, and prunes stale data — all in the background via hooks or plugins.
72
72
 
73
- For Google Antigravity, the installer copies the native Python integration to `~/.eagle-mem/integrations/google_antigravity_hook.py`. For Codex, the installer enables `codex_hooks` in `~/.codex/config.toml`, registers hooks in `~/.codex/hooks.json`, symlinks Eagle Mem skills into `~/.codex/skills`, and patches `~/.codex/AGENTS.md`. For Claude Code, it integrates with `~/.claude/settings.json`, `CLAUDE.md`, and `~/.claude/skills`. Grok users get skill symlinks into `~/.grok/skills/` and can run `eagle-mem grok-bootstrap` for setup guidance and self-linking.
73
+ For Google Antigravity, the installer copies the native Python integration to `~/.eagle-mem/integrations/google_antigravity_hook.py`. For OpenCode, it installs a global local plugin at `~/.config/opencode/plugins/eagle-mem.js` and symlinks skills into `~/.config/opencode/skills`. For Codex, the installer enables `hooks` in `~/.codex/config.toml`, registers hooks in `~/.codex/hooks.json`, symlinks Eagle Mem skills into `~/.codex/skills`, and patches `~/.codex/AGENTS.md`. For Claude Code, it integrates with `~/.claude/settings.json`, `CLAUDE.md`, and `~/.claude/skills`. Grok users get skill symlinks into `~/.grok/skills/` and can run `eagle-mem grok-bootstrap` for setup guidance and self-linking.
74
74
 
75
75
  ### Prerequisites
76
76
 
77
77
  - `sqlite3` with FTS5 support (ships with macOS; Eagle Mem prefers known system/Homebrew SQLite binaries before PATH shims)
78
78
  - `jq` (the installer offers to install if missing)
79
- - [Claude Code](https://docs.anthropic.com/en/docs/claude-code), Codex, Google Antigravity SDK, or a Grok environment (`~/.grok/`)
79
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code), Codex, OpenCode, Google Antigravity SDK, or a Grok environment (`~/.grok/`)
80
80
 
81
81
  ## How It Works
82
82
 
@@ -91,7 +91,7 @@ Hooks fire automatically at different points in the agent lifecycle:
91
91
  | **Stop** | agent turn ends | Saves fast heuristic summaries and extracts `<eagle-summary>` blocks when present. LLM enrichment runs later in the background so the agent lifecycle is not blocked. |
92
92
  | **SessionEnd** | session closes | Re-syncs tasks, marks session completed |
93
93
 
94
- Codex shell hooks are registered for `Bash`, `exec_command`, `shell_command`, and `unified_exec` tool names so release-boundary protection works across current Codex shell paths.
94
+ Codex shell hooks are registered for `Bash`, `exec_command`, `shell_command`, and `unified_exec` tool names so release-boundary protection works across current Codex shell paths. OpenCode uses a global local plugin to normalize `chat.message`, `tool.execute.before`, `tool.execute.after`, `todo.updated`, `session.idle`, and compaction events into the same Eagle Mem hook payloads.
95
95
  Codex recall is emitted as compact hook JSON, so local Codex sessions get shared memory without the multi-screen hook dumps.
96
96
 
97
97
  ### Background Automation
@@ -110,7 +110,7 @@ Eagle Mem actively reduces token consumption:
110
110
 
111
111
  ### Compaction Survival
112
112
 
113
- One of the core promises of Eagle Mem is protecting against `/compact` and session amnesia. Compaction Survival is project-level: it reads shared Eagle Mem state such as durable tasks, enriched summaries, stale work, and orchestration lanes. Claude Code, Codex, and Google Antigravity get automatic hook-backed recovery through `SessionStart`, `Stop`/`post_turn`, and context-pressure nudges. Grok can inspect and use the same state through `eagle-mem compaction`, `eagle-mem tasks`, and the linked skills.
113
+ One of the core promises of Eagle Mem is protecting against `/compact` and session amnesia. Compaction Survival is project-level: it reads shared Eagle Mem state such as durable tasks, enriched summaries, stale work, and orchestration lanes. Claude Code, Codex, OpenCode, and Google Antigravity get automatic hook-backed or plugin-backed recovery through session start, turn-end, and compaction events. Grok can inspect and use the same state through `eagle-mem compaction`, `eagle-mem tasks`, and the linked skills.
114
114
 
115
115
  Run `eagle-mem compaction` anytime to check readiness.
116
116
 
@@ -134,7 +134,7 @@ Eagle Mem prevents Claude from repeating past mistakes:
134
134
  - **Gotcha surfacing** — past surprises and gotchas are surfaced when editing related files
135
135
  - **Stale memory detection** — warns when edits may contradict stored memories
136
136
  - **Token guard** — when `rtk` is installed, raw shell output commands are rewritten or blocked with an RTK equivalent so large output is compacted before it enters agent context
137
- - **Orchestration lanes** — long-running work can be split into durable worker lanes with owners, validation commands, worktree paths, status notes, and handoff output shared across Claude Code, Codex, Grok, and Google Antigravity
137
+ - **Orchestration lanes** — long-running work can be split into durable worker lanes with owners, validation commands, worktree paths, status notes, and handoff output shared across Claude Code, Codex, OpenCode, Grok, and Google Antigravity
138
138
 
139
139
  ## Commands
140
140
 
@@ -199,7 +199,7 @@ eagle-mem uninstall --dry-run
199
199
 
200
200
  Install and update print the files/configs they intend to touch before they change the runtime. The installed runtime writes `~/.eagle-mem/install-manifest.json` with file sizes, modes, and SHA-256 hashes, so `doctor` can tell whether hooks, scripts, libraries, and database helpers still match the package that installed them.
201
201
 
202
- Uninstall removes Claude Code, Codex, Grok, and Google Antigravity hook registrations, Eagle Mem instruction blocks, custom Claude statusline integration, and skill links. It backs up user config files before editing them and keeps `~/.eagle-mem/memory.db` unless you explicitly confirm data deletion.
202
+ Uninstall removes Claude Code, Codex, OpenCode, Grok, and Google Antigravity hook/plugin registrations, Eagle Mem instruction blocks, custom Claude statusline integration, and skill links. It backs up user config files before editing them and keeps `~/.eagle-mem/memory.db` unless you explicitly confirm data deletion.
203
203
 
204
204
  ### Download Counts, Privacy, and Telemetry
205
205
 
@@ -256,7 +256,7 @@ Dry-run validation stays unblocked. For example, `gh pr create --dry-run` and `n
256
256
 
257
257
  ### Orchestrator/Worker Lanes
258
258
 
259
- Use orchestration when a broad task is split across Claude Code, Codex, subagents, or separate worktrees. These are **agent-run commands**: Eagle Mem injects the protocol into Claude Code/Codex, and the active agent runs the lane/status/spawn commands itself. Users should not have to operate this manually.
259
+ Use orchestration when a broad task is split across Claude Code, Codex, OpenCode, subagents, or separate worktrees. These are **agent-run commands**: Eagle Mem injects the protocol into Claude Code, Codex, and OpenCode, and the active agent runs the lane/status/spawn commands itself. Users should not have to operate this manually.
260
260
 
261
261
  By default Eagle Mem uses the opposite-agent worker model:
262
262
 
@@ -284,14 +284,14 @@ Each lane is stored in `orchestration_lanes` and mirrored into `agent_tasks`, so
284
284
 
285
285
  Both agents write to `~/.eagle-mem/memory.db`:
286
286
 
287
- - `sessions.agent` records whether a session came from Claude Code, Codex, or Antigravity
287
+ - `sessions.agent` records whether a session came from Claude Code, Codex, OpenCode, or Antigravity
288
288
  - `summaries.agent` records which agent produced the session summary
289
289
  - mirrored memories, plans, and tasks include `origin_agent`
290
- - SessionStart recall labels sources as `Claude Code`, `Codex`, or `Antigravity`
290
+ - SessionStart recall labels sources as `Claude Code`, `Codex`, `OpenCode`, or `Antigravity`
291
291
 
292
- That means opening the same project in Claude Code, Codex, and Google Antigravity does not create isolated memory worlds. They recall the same project history while preserving the source of each memory. Grok can search, inspect, and update that same project memory through the linked skills and CLI commands.
292
+ That means opening the same project in Claude Code, Codex, OpenCode, and Google Antigravity does not create isolated memory worlds. They recall the same project history while preserving the source of each memory. Grok can search, inspect, and update that same project memory through the linked skills and CLI commands.
293
293
 
294
- ## Skills (Inside Claude Code, Codex, and Grok)
294
+ ## Skills (Inside Claude Code, Codex, OpenCode, and Grok)
295
295
 
296
296
  | Skill | What It Does |
297
297
  |-------|-------------|
@@ -299,7 +299,7 @@ That means opening the same project in Claude Code, Codex, and Google Antigravit
299
299
  | `/eagle-mem-overview` | Build a rich project briefing from README, entry points, and git history |
300
300
  | `/eagle-mem-memories` | View and search mirrored agent memories and plans |
301
301
  | `/eagle-mem-tasks` | TaskAware Compact Loop — break complex work into tasks that survive `/compact` |
302
- | `/eagle-mem-orchestrate` | Orchestrator/worker lane handoffs across Claude Code, Codex, Grok, and Google Antigravity |
302
+ | `/eagle-mem-orchestrate` | Orchestrator/worker lane handoffs across Claude Code, Codex, OpenCode, Grok, and Google Antigravity |
303
303
 
304
304
  ## Data
305
305
 
package/architecture.html CHANGED
@@ -683,7 +683,7 @@
683
683
  <div class="brand">
684
684
  <span class="brand-label">Eagle Mem</span>
685
685
  <h1>Agent Architecture Tutorial</h1>
686
- <p>Technical architecture plus UX architecture for Claude Code, Codex, Grok, Google Antigravity, and future coding agents.</p>
686
+ <p>Technical architecture plus UX architecture for Claude Code, Codex, OpenCode, Grok, Google Antigravity, and future coding agents.</p>
687
687
  </div>
688
688
 
689
689
  <p class="nav-title">Start Here</p>
@@ -732,7 +732,7 @@
732
732
  </div>
733
733
  <div class="meta-box">
734
734
  <strong>Agents</strong>
735
- <span>Claude Code, Codex, and Google Antigravity with hooks; Grok via skills.</span>
735
+ <span>Claude Code, Codex, OpenCode, and Google Antigravity with hooks/plugins; Grok via skills.</span>
736
736
  </div>
737
737
  <div class="meta-box">
738
738
  <strong>Core Promise</strong>
@@ -793,7 +793,7 @@
793
793
 
794
794
  <div class="callout">
795
795
  <h3>Compaction Survival is shared state</h3>
796
- <p><code>eagle-mem compaction</code> reads project-level state from SQLite: enriched summaries, durable tasks, stale tasks, active orchestration lanes, and recent durable updates. Claude Code, Codex, and Google Antigravity have hook-backed automatic recovery around compact and clear events. Grok can use the same state through linked skills and CLI commands.</p>
796
+ <p><code>eagle-mem compaction</code> reads project-level state from SQLite: enriched summaries, durable tasks, stale tasks, active orchestration lanes, and recent durable updates. Claude Code, Codex, OpenCode, and Google Antigravity have hook-backed or plugin-backed automatic recovery around compact and clear events. Grok can use the same state through linked skills and CLI commands.</p>
797
797
  </div>
798
798
 
799
799
  <h3>Vocabulary</h3>
@@ -862,7 +862,7 @@
862
862
  <text x="40" y="42" class="label">User Layer</text>
863
863
  <rect x="40" y="58" width="220" height="72" class="box-cyan"></rect>
864
864
  <text x="62" y="90">Developer</text>
865
- <text x="62" y="112" class="small">Works in Claude, Codex, Grok, or Antigravity</text>
865
+ <text x="62" y="112" class="small">Works in Claude, Codex, OpenCode, Grok, or Antigravity</text>
866
866
 
867
867
  <text x="40" y="178" class="label">Agent Layer</text>
868
868
  <rect x="40" y="194" width="220" height="78" class="box"></rect>
@@ -974,7 +974,7 @@
974
974
  <div class="step-num">5</div>
975
975
  <div>
976
976
  <h3>Agent hooks are registered</h3>
977
- <p>Claude Code hooks are patched into <code>~/.claude/settings.json</code>. Codex hooks are registered in <code>~/.codex/hooks.json</code>. Google Antigravity SDK hooks are registered programmatically in <code>google_antigravity_hook.py</code> using native Python async hooks. Grok has skills and CLI access.</p>
977
+ <p>Claude Code hooks are patched into <code>~/.claude/settings.json</code>. Codex hooks are registered in <code>~/.codex/hooks.json</code>. OpenCode receives a global local plugin at <code>~/.config/opencode/plugins/eagle-mem.js</code>. Google Antigravity SDK hooks are registered programmatically in <code>google_antigravity_hook.py</code> using native Python async hooks. Grok has skills and CLI access.</p>
978
978
  </div>
979
979
  </article>
980
980
 
@@ -982,7 +982,7 @@
982
982
  <div class="step-num">6</div>
983
983
  <div>
984
984
  <h3>Skills and instructions are linked</h3>
985
- <p>Eagle Mem skills are symlinked into each agent's skill directory. Claude receives <code>CLAUDE.md</code> instructions. Codex receives <code>AGENTS.md</code> instructions. Google Antigravity SDK maps and mirrors standard brain planning artifacts (plans, tasks, walkthroughs). Grok receives skills under <code>~/.grok/skills</code>.</p>
985
+ <p>Eagle Mem skills are symlinked into each agent's skill directory. Claude receives <code>CLAUDE.md</code> instructions. Codex receives <code>AGENTS.md</code> instructions. OpenCode receives linked skills under <code>~/.config/opencode/skills</code>. Google Antigravity SDK maps and mirrors standard brain planning artifacts (plans, tasks, walkthroughs). Grok receives skills under <code>~/.grok/skills</code>.</p>
986
986
  </div>
987
987
  </article>
988
988
  </div>
@@ -1097,7 +1097,7 @@
1097
1097
  <p class="section-number">06 / Technical Architecture</p>
1098
1098
  <h2>The Agent Adapter Layer</h2>
1099
1099
  <p class="lead">
1100
- The project is agent-generic below the adapter layer. Claude Code, Codex, and Google Antigravity have direct lifecycle hook adapters, while Grok participates through skills and CLI commands. Eagle Mem normalizes each supported surface into the same project memory model.
1100
+ The project is agent-generic below the adapter layer. Claude Code, Codex, OpenCode, and Google Antigravity have direct lifecycle hook or plugin adapters, while Grok participates through skills and CLI commands. Eagle Mem normalizes each supported surface into the same project memory model.
1101
1101
  </p>
1102
1102
 
1103
1103
  <div class="grid-2">
@@ -1115,7 +1115,7 @@
1115
1115
 
1116
1116
  <article class="adapter-rule">
1117
1117
  <h3>Codex adapter</h3>
1118
- <p>Registered through <code>~/.codex/hooks.json</code> after enabling <code>codex_hooks</code>. Shell protection covers current Codex shell tool paths, including <code>exec_command</code>, <code>shell_command</code>, and <code>unified_exec</code>.</p>
1118
+ <p>Registered through <code>~/.codex/hooks.json</code> after enabling <code>hooks</code>. Shell protection covers current Codex shell tool paths, including <code>exec_command</code>, <code>shell_command</code>, and <code>unified_exec</code>.</p>
1119
1119
  <div class="tag-row">
1120
1120
  <span class="tag">exec_command</span>
1121
1121
  <span class="tag">unified_exec</span>
@@ -1125,6 +1125,17 @@
1125
1125
  </div>
1126
1126
  </article>
1127
1127
 
1128
+ <article class="adapter-rule">
1129
+ <h3>OpenCode plugin adapter</h3>
1130
+ <p>Installed as a global local plugin at <code>~/.config/opencode/plugins/eagle-mem.js</code>. It maps OpenCode <code>chat.message</code>, <code>tool.execute.before</code>, <code>tool.execute.after</code>, <code>todo.updated</code>, <code>session.idle</code>, and <code>experimental.session.compacting</code> into Eagle Mem's hook payloads.</p>
1131
+ <div class="tag-row">
1132
+ <span class="tag">chat.message</span>
1133
+ <span class="tag">tool.execute.before</span>
1134
+ <span class="tag">todo.updated</span>
1135
+ <span class="tag">compacting</span>
1136
+ </div>
1137
+ </article>
1138
+
1128
1139
  <article class="adapter-rule">
1129
1140
  <h3>Grok skill/CLI integration</h3>
1130
1141
  <p>Installed through <code>~/.grok/skills</code> and the <code>eagle-mem grok-bootstrap</code> command. Grok can search memory, inspect tasks, coordinate lanes, and check compaction readiness through the same SQLite-backed CLI. Native lifecycle hooks are not assumed yet.</p>
@@ -1301,7 +1312,7 @@
1301
1312
  </tr>
1302
1313
  <tr>
1303
1314
  <td><code>agent_memories</code>, <code>agent_plans</code>, <code>agent_tasks</code></td>
1304
- <td>What durable agent artifacts should be shared across Claude Code, Codex, Grok, and Antigravity?</td>
1315
+ <td>What durable agent artifacts should be shared across Claude Code, Codex, OpenCode, Grok, and Antigravity?</td>
1305
1316
  <td>PostToolUse, SessionEnd, skills, search CLI</td>
1306
1317
  </tr>
1307
1318
  <tr>
@@ -1507,7 +1518,7 @@ eagle-mem orchestrate handoff --write docs/handoff-context.md</code></pre>
1507
1518
 
1508
1519
  <h3>Why lanes matter for all agents</h3>
1509
1520
  <p>
1510
- Context windows end. Tools fail. A user may switch from Claude Code to Codex, Grok, or Antigravity. A worker may finish while the coordinator is compacted. Lanes make this survivable because the state is outside any one transcript.
1521
+ Context windows end. Tools fail. A user may switch from Claude Code to Codex, OpenCode, Grok, or Antigravity. A worker may finish while the coordinator is compacted. Lanes make this survivable because the state is outside any one transcript.
1511
1522
  </p>
1512
1523
  </div>
1513
1524
  </section>
@@ -1523,7 +1534,7 @@ eagle-mem orchestrate handoff --write docs/handoff-context.md</code></pre>
1523
1534
  <div class="grid-2">
1524
1535
  <article class="principle">
1525
1536
  <h3>1. Stay in the agent's flow</h3>
1526
- <p>Users already live in Claude Code, Codex, Grok, or Antigravity. Eagle Mem should not require them to open a dashboard before every task. Hooks/skills inject context where the agent already is.</p>
1537
+ <p>Users already live in Claude Code, Codex, OpenCode, Grok, or Antigravity. Eagle Mem should not require them to open a dashboard before every task. Hooks, plugins, and skills inject context where the agent already is.</p>
1527
1538
  </article>
1528
1539
  <article class="principle">
1529
1540
  <h3>2. Show up only when useful</h3>
@@ -1614,7 +1625,7 @@ eagle-mem orchestrate handoff --write docs/handoff-context.md</code></pre>
1614
1625
  <p class="section-number">13 / Tutorial</p>
1615
1626
  <h2>Walkthrough: From Empty Memory To Safer Release</h2>
1616
1627
  <p class="lead">
1617
- This walkthrough explains how the system feels to a beginner. The same flow works whether the active agent is Claude Code, Codex, Grok, or Antigravity.
1628
+ This walkthrough explains how the system feels to a beginner. The same flow works whether the active agent is Claude Code, Codex, OpenCode, Grok, or Antigravity.
1618
1629
  </p>
1619
1630
 
1620
1631
  <div class="step-list">
@@ -1692,7 +1703,7 @@ eagle-mem install</code></pre>
1692
1703
  <p class="section-number">14 / All-Agent Applicability</p>
1693
1704
  <h2>How To Add Another Agent</h2>
1694
1705
  <p class="lead">
1695
- The project natively supports Claude Code, Codex, and Google Antigravity with lifecycle hooks, and Grok with skills plus CLI workflows. The architecture should scale to any coding agent that can run local hooks, wrapper scripts, or a skill-like command surface. The integration work should live at the edge, not inside the database model.
1706
+ The project natively supports Claude Code, Codex, OpenCode, and Google Antigravity with lifecycle hooks or plugins, and Grok with skills plus CLI workflows. The architecture should scale to any coding agent that can run local hooks, wrapper scripts, plugins, or a skill-like command surface. The integration work should live at the edge, not inside the database model.
1696
1707
  </p>
1697
1708
 
1698
1709
  <h3>Minimum viable adapter</h3>
@@ -1736,7 +1747,7 @@ eagle-mem install</code></pre>
1736
1747
  <h3>Adapter checklist</h3>
1737
1748
  <ol>
1738
1749
  <li>Register the agent's lifecycle events to call the installed scripts in <code>~/.eagle-mem/hooks/</code>.</li>
1739
- <li>Set <code>EAGLE_AGENT_SOURCE</code> to a stable value, such as <code>codex</code>, <code>claude-code</code>, <code>grok</code>, <code>antigravity</code>, or a future agent key.</li>
1750
+ <li>Set <code>EAGLE_AGENT_SOURCE</code> to a stable value, such as <code>codex</code>, <code>claude-code</code>, <code>opencode</code>, <code>grok</code>, <code>antigravity</code>, or a future agent key.</li>
1740
1751
  <li>Map the agent's shell and file tools into Eagle Mem's known categories.</li>
1741
1752
  <li>Pass enough JSON to identify <code>session_id</code>, <code>cwd</code>, tool name, tool input, and optional transcript path.</li>
1742
1753
  <li>Teach output formatting for the agent: compact JSON, plain additional context, or deny decisions.</li>
@@ -1782,6 +1793,7 @@ eagle-mem install</code></pre>
1782
1793
  <ul>
1783
1794
  <li><code>scripts/install.sh</code> - runtime copy, migrations, hook registration, skills, statusline, config.</li>
1784
1795
  <li><code>lib/codex-hooks.sh</code> - Codex hook enablement and hook registration.</li>
1796
+ <li><code>lib/opencode-hooks.sh</code> and <code>integrations/opencode_eagle_mem_plugin.js</code> - OpenCode plugin and skill registration plus hook normalization.</li>
1785
1797
  <li><code>lib/hooks.sh</code> - Claude Code hook patching.</li>
1786
1798
  </ul>
1787
1799
  </article>
package/bin/eagle-mem CHANGED
@@ -22,6 +22,10 @@ case "$command" in
22
22
  search) bash "$SCRIPTS_DIR/search.sh" "$@" ;;
23
23
  health) bash "$SCRIPTS_DIR/health.sh" "$@" ;;
24
24
  doctor) bash "$SCRIPTS_DIR/doctor.sh" "$PACKAGE_DIR" "$@" ;;
25
+ repair) bash "$SCRIPTS_DIR/repair.sh" "$@" ;;
26
+ inspect) bash "$SCRIPTS_DIR/inspect.sh" "$@" ;;
27
+ replay) bash "$SCRIPTS_DIR/replay.sh" "$@" ;;
28
+ dashboard) bash "$SCRIPTS_DIR/dashboard.sh" "$@" ;;
25
29
  logs) bash "$SCRIPTS_DIR/logs.sh" "$@" ;;
26
30
  config) bash "$SCRIPTS_DIR/config.sh" "$@" ;;
27
31
  updates) bash "$SCRIPTS_DIR/updates.sh" "$@" ;;
@@ -0,0 +1,27 @@
1
+ CREATE TABLE IF NOT EXISTS recall_events (
2
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
3
+ session_id TEXT,
4
+ project TEXT NOT NULL,
5
+ cwd TEXT,
6
+ agent TEXT,
7
+ hook_name TEXT NOT NULL DEFAULT 'UserPromptSubmit',
8
+ prompt_snippet TEXT,
9
+ fts_query TEXT,
10
+ summary_matches INTEGER NOT NULL DEFAULT 0,
11
+ memory_matches INTEGER NOT NULL DEFAULT 0,
12
+ code_matches INTEGER NOT NULL DEFAULT 0,
13
+ summary_refs TEXT NOT NULL DEFAULT '[]',
14
+ memory_refs TEXT NOT NULL DEFAULT '[]',
15
+ code_refs TEXT NOT NULL DEFAULT '[]',
16
+ injected_chars INTEGER NOT NULL DEFAULT 0,
17
+ injected_token_estimate INTEGER NOT NULL DEFAULT 0,
18
+ status TEXT NOT NULL DEFAULT 'ok',
19
+ error TEXT,
20
+ created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))
21
+ );
22
+
23
+ CREATE INDEX IF NOT EXISTS idx_recall_events_project_created
24
+ ON recall_events(project, created_at DESC);
25
+
26
+ CREATE INDEX IF NOT EXISTS idx_recall_events_session
27
+ ON recall_events(session_id, created_at DESC);
@@ -0,0 +1,21 @@
1
+ -- Migration 040: Allow durable decision nodes in the project graph.
2
+ -- Decisions are first-class compaction-survival entities captured from summaries.
3
+
4
+ DROP TRIGGER IF EXISTS val_graph_nodes_insert;
5
+ DROP TRIGGER IF EXISTS val_graph_nodes_update;
6
+
7
+ CREATE TRIGGER val_graph_nodes_insert BEFORE INSERT ON graph_nodes
8
+ BEGIN
9
+ SELECT CASE
10
+ WHEN NEW.node_type NOT IN ('project', 'file', 'feature', 'memory', 'task', 'session', 'decision', 'tag', 'class', 'struct', 'function', 'func', 'fn', 'def')
11
+ THEN RAISE(ABORT, 'Data Integrity Error: Invalid node type. Must be one of project, file, feature, memory, task, session, decision, tag, class, struct, function, func, fn, def')
12
+ END;
13
+ END;
14
+
15
+ CREATE TRIGGER val_graph_nodes_update BEFORE UPDATE OF node_type ON graph_nodes
16
+ BEGIN
17
+ SELECT CASE
18
+ WHEN NEW.node_type NOT IN ('project', 'file', 'feature', 'memory', 'task', 'session', 'decision', 'tag', 'class', 'struct', 'function', 'func', 'fn', 'def')
19
+ THEN RAISE(ABORT, 'Data Integrity Error: Invalid node type. Must be one of project, file, feature, memory, task, session, decision, tag, class, struct, function, func, fn, def')
20
+ END;
21
+ END;
@@ -0,0 +1,21 @@
1
+ -- Migration 041: Allow semantic project-graph relationships.
2
+ -- These edges connect durable context entities used for compaction survival.
3
+
4
+ DROP TRIGGER IF EXISTS val_graph_edges_insert;
5
+ DROP TRIGGER IF EXISTS val_graph_edges_update;
6
+
7
+ CREATE TRIGGER val_graph_edges_insert BEFORE INSERT ON graph_edges
8
+ BEGIN
9
+ SELECT CASE
10
+ WHEN NEW.edge_type NOT IN ('imports', 'declares', 'references', 'verifies', 'contains', 'supersedes', 'co_edited', 'modified', 'read', 'covers', 'mentions', 'touches', 'recorded_in', 'originated_in', 'planned_in')
11
+ THEN RAISE(ABORT, 'Data Integrity Error: Invalid edge type. Must be one of imports, declares, references, verifies, contains, supersedes, co_edited, modified, read, covers, mentions, touches, recorded_in, originated_in, planned_in')
12
+ END;
13
+ END;
14
+
15
+ CREATE TRIGGER val_graph_edges_update BEFORE UPDATE OF edge_type ON graph_edges
16
+ BEGIN
17
+ SELECT CASE
18
+ WHEN NEW.edge_type NOT IN ('imports', 'declares', 'references', 'verifies', 'contains', 'supersedes', 'co_edited', 'modified', 'read', 'covers', 'mentions', 'touches', 'recorded_in', 'originated_in', 'planned_in')
19
+ THEN RAISE(ABORT, 'Data Integrity Error: Invalid edge type. Must be one of imports, declares, references, verifies, contains, supersedes, co_edited, modified, read, covers, mentions, touches, recorded_in, originated_in, planned_in')
20
+ END;
21
+ END;
@@ -0,0 +1,23 @@
1
+ -- Migration 042: Auto-orchestration detection events.
2
+ -- Records when hooks detect broad work and create durable lane/task state.
3
+
4
+ CREATE TABLE IF NOT EXISTS orchestration_auto_events (
5
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
6
+ session_id TEXT,
7
+ project TEXT NOT NULL,
8
+ cwd TEXT,
9
+ agent TEXT,
10
+ prompt_snippet TEXT,
11
+ trigger TEXT NOT NULL DEFAULT 'broad_prompt',
12
+ orchestration_id INTEGER REFERENCES orchestrations(id) ON DELETE SET NULL,
13
+ orchestration_name TEXT NOT NULL DEFAULT 'auto',
14
+ lanes TEXT NOT NULL DEFAULT '[]',
15
+ status TEXT NOT NULL DEFAULT 'created',
16
+ created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))
17
+ );
18
+
19
+ CREATE INDEX IF NOT EXISTS idx_orchestration_auto_events_project_created
20
+ ON orchestration_auto_events(project, created_at DESC);
21
+
22
+ CREATE INDEX IF NOT EXISTS idx_orchestration_auto_events_session
23
+ ON orchestration_auto_events(session_id, created_at DESC);
@@ -0,0 +1,22 @@
1
+ CREATE TABLE IF NOT EXISTS eagle_events (
2
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
3
+ project TEXT,
4
+ session_id TEXT,
5
+ agent TEXT,
6
+ event_type TEXT NOT NULL,
7
+ command TEXT,
8
+ hook_event_name TEXT,
9
+ status TEXT NOT NULL DEFAULT 'ok',
10
+ detail_json TEXT NOT NULL DEFAULT '{}',
11
+ created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))
12
+ );
13
+
14
+ CREATE INDEX IF NOT EXISTS idx_eagle_events_project_created
15
+ ON eagle_events(project, created_at DESC);
16
+
17
+ CREATE INDEX IF NOT EXISTS idx_eagle_events_session_created
18
+ ON eagle_events(session_id, created_at DESC);
19
+
20
+ CREATE INDEX IF NOT EXISTS idx_eagle_events_type_created
21
+ ON eagle_events(event_type, created_at DESC);
22
+
@@ -0,0 +1,38 @@
1
+ # Agent Compatibility Gate
2
+
3
+ Eagle Mem depends on external coding-agent lifecycle contracts. Hook, statusline, config, and instruction-file behavior can change independently of this repository, so these integrations must be reverified before they are edited.
4
+
5
+ ## Required Workflow
6
+
7
+ Before modifying any file that changes Claude Code, Codex, OpenCode, Grok, Antigravity, hook, plugin, statusline, config-installation, or agent-instruction behavior:
8
+
9
+ 1. Read the current official documentation for the affected agent surface.
10
+ 2. Update the matching file in `docs/agent-compatibility/` with:
11
+ - `Last verified: YYYY-MM-DD`
12
+ - official source URLs
13
+ - the exact behavior relied on
14
+ - the Eagle Mem files that depend on that behavior
15
+ - fixture or golden-test coverage that proves the behavior
16
+ 3. Add or update a fixture or regression test for the behavior before editing implementation code.
17
+ 4. Prefer additive compatibility changes when older installed users may still depend on the previous behavior.
18
+ 5. Do not implement agent hook or statusline changes from memory.
19
+
20
+ ## Sensitive Files
21
+
22
+ The compatibility gate applies to these file groups:
23
+
24
+ - `hooks/*.sh`
25
+ - `lib/hooks.sh`
26
+ - `lib/codex-hooks.sh`
27
+ - `lib/opencode-hooks.sh`
28
+ - `integrations/opencode_eagle_mem_plugin.js`
29
+ - `scripts/install.sh`
30
+ - `scripts/update.sh`
31
+ - `scripts/uninstall.sh`
32
+ - `scripts/doctor.sh`
33
+ - `scripts/statusline-em.sh`
34
+ - `lib/common.sh`
35
+ - `AGENTS.md`
36
+ - `CLAUDE.md` when present
37
+
38
+ The test `tests/test_agent_compatibility_docs_gate.sh` enforces that these docs and fixtures exist. When sensitive files are changed in an uncommitted worktree, the same test also requires a changed compatibility doc or agent-hook fixture in the same diff.
@@ -0,0 +1,50 @@
1
+ # Claude Code Compatibility
2
+
3
+ Last verified: 2026-06-02
4
+
5
+ ## Official Sources
6
+
7
+ - Hooks reference: https://code.claude.com/docs/en/hooks
8
+ - Statusline reference: https://code.claude.com/docs/en/statusline
9
+ - Settings reference: https://code.claude.com/docs/en/settings
10
+
11
+ ## Behavior Relied On
12
+
13
+ - Command hooks receive JSON on stdin.
14
+ - `SessionStart` runs when a session begins or resumes.
15
+ - `UserPromptSubmit` runs before Claude processes the user prompt and can add context.
16
+ - `PreToolUse` and `PostToolUse` match tool names such as `Bash`, `Read`, `Edit`, and `Write`.
17
+ - `TaskCreated` and `TaskCompleted` expose durable task fields that can be mirrored into Eagle Mem.
18
+ - `Stop` runs after the main assistant response and exposes the last assistant message.
19
+ - `PreCompact` runs before manual or automatic compaction and receives `trigger` plus `custom_instructions`.
20
+ - `PostCompact` runs after compaction and receives `trigger` plus `compact_summary`.
21
+ - `SessionEnd` runs when a session terminates.
22
+ - The custom statusline is configured with `statusLine` in Claude settings; its command receives JSON on stdin and the first stdout line becomes the visible statusline text.
23
+
24
+ ## Eagle Mem Files Depending On This
25
+
26
+ - `lib/hooks.sh`
27
+ - `scripts/install.sh`
28
+ - `scripts/update.sh`
29
+ - `scripts/uninstall.sh`
30
+ - `scripts/statusline-em.sh`
31
+ - `hooks/session-start.sh`
32
+ - `hooks/user-prompt-submit.sh`
33
+ - `hooks/pre-tool-use.sh`
34
+ - `hooks/post-tool-use.sh`
35
+ - `hooks/stop.sh`
36
+ - `hooks/session-end.sh`
37
+
38
+ ## Fixtures And Tests
39
+
40
+ - `tests/fixtures/agent-hooks/claude-user-prompt-submit.json`
41
+ - `tests/fixtures/agent-hooks/claude-statusline.json`
42
+ - `tests/test_agent_compatibility_docs_gate.sh`
43
+ - `tests/test_recall_observability.sh`
44
+ - `tests/test_compaction_survival_matrix.sh`
45
+ - `tests/test_trust_surfaces.sh`
46
+
47
+ ## Reverification Notes
48
+
49
+ When editing Claude Code hooks, update this file with the new verification date and include the exact hook event names, input fields, and output semantics used by the implementation. When editing brand visibility or statusline behavior, re-read the statusline reference first and update `claude-statusline.json` if the stdin schema changed.
50
+
@@ -0,0 +1,51 @@
1
+ # Codex Compatibility
2
+
3
+ Last verified: 2026-06-02
4
+
5
+ ## Official Sources
6
+
7
+ - Codex manual: https://developers.openai.com/codex/codex-manual.md
8
+ - Hooks reference: https://developers.openai.com/codex/hooks.md
9
+ - AGENTS.md reference: https://developers.openai.com/codex/guides/agents-md.md
10
+ - Advanced config reference: https://developers.openai.com/codex/config-advanced.md
11
+ - Memories reference: https://developers.openai.com/codex/memories.md
12
+
13
+ ## Behavior Relied On
14
+
15
+ - `AGENTS.md` is the durable repo-instruction surface for Codex. Closer nested files override earlier guidance because Codex concatenates instruction files from the project root down to the current working directory.
16
+ - Codex hooks are discovered from active config layers through `hooks.json` or inline `[hooks]` tables in `config.toml`.
17
+ - `features.hooks` is the canonical feature key. `features.codex_hooks` is a deprecated alias and should not be the primary setting.
18
+ - `SessionStart`, `PreToolUse`, `PostToolUse`, `PreCompact`, `PostCompact`, `UserPromptSubmit`, `SubagentStop`, and `Stop` run at the documented lifecycle scopes.
19
+ - `SessionStart` matchers use `startup`, `resume`, `clear`, and `compact`.
20
+ - `PreToolUse` and `PostToolUse` match tool names, including `Bash`, `apply_patch`, MCP tool names, and aliases such as `Edit` and `Write` for `apply_patch`.
21
+ - `UserPromptSubmit` and `Stop` do not support matchers; configured matchers are ignored for those events.
22
+ - Hook `timeout` is measured in seconds; `statusMessage` is optional.
23
+ - Codex memory files are generated state. Required team guidance belongs in `AGENTS.md` or checked-in documentation, not only in local memories.
24
+
25
+ ## Eagle Mem Files Depending On This
26
+
27
+ - `lib/codex-hooks.sh`
28
+ - `lib/provider.sh`
29
+ - `scripts/install.sh`
30
+ - `scripts/update.sh`
31
+ - `scripts/uninstall.sh`
32
+ - `hooks/session-start.sh`
33
+ - `hooks/user-prompt-submit.sh`
34
+ - `hooks/pre-tool-use.sh`
35
+ - `hooks/post-tool-use.sh`
36
+ - `hooks/stop.sh`
37
+ - `AGENTS.md`
38
+
39
+ ## Fixtures And Tests
40
+
41
+ - `tests/fixtures/agent-hooks/codex-user-prompt-submit.json`
42
+ - `tests/fixtures/agent-hooks/codex-pre-tool-use.json`
43
+ - `tests/test_agent_compatibility_docs_gate.sh`
44
+ - `tests/test_codex_hooks_config.sh`
45
+ - `tests/test_auto_orchestration_detection.sh`
46
+ - `tests/test_recall_observability.sh`
47
+ - `tests/test_trust_surfaces.sh`
48
+
49
+ ## Reverification Notes
50
+
51
+ When editing Codex hooks or install/update behavior, update this file with the new verification date and source URLs. If a future Codex version changes hook feature flags, matcher support, trust review, event names, or input/output schema, update fixtures first and then implementation.