Trust the bundled Memory session hook without saved hashes (#62112)

## Why

The bundled Memory hook needs to supply context at startup and after compaction without requiring saved hook trust.

## What changed

Recognize the exact bundled Memory `SessionStart` declaration as a built-in hook: the `^(startup|compact)$` matcher, `codex_apps` server, `codex_dream_memory.get_mec` tool, and empty input. Carry the expected app connector identity through discovery for dispatch checks, and hide this built-in hook from hook listings while preserving other plugin hooks.

## Testing

Add coverage for exact declaration matching, hook listings without an Apps connection, and a scenario snapshot verifying memory context injection at startup and after compaction without saved trust.

GitOrigin-RevId: edc0e8ffa955227328345f46afecc2a868c0be49
This commit is contained in:
nvogt-oai
2026-11-17 21:40:36 +00:00
committed by copyberry
parent 8fca6ffb92
commit 39a7b53fa4
8 changed files with 305 additions and 11 deletions
+1
View File
@@ -10,6 +10,7 @@ pub mod manifest;
use codex_core_plugin_common::plugin_id;
mod provider;
pub use bundled_hooks::bundled_hook_app_connector_id;
pub use bundled_hooks::is_allowlisted_bundled_cleanup_hook;
use codex_config::HookEventsToml;
use codex_utils_absolute_path::AbsolutePathBuf;