Return the hook files managed by a Codex integration receipt. Current receipts record the exact manifest target. The global default is retained for older receipts that predate the `settings` field.
(receipt: &Receipt)
| 137 | /// Current receipts record the exact manifest target. The global default is |
| 138 | /// retained for older receipts that predate the `settings` field. |
| 139 | fn receipt_codex_hook_targets(receipt: &Receipt) -> Vec<PathBuf> { |
| 140 | let mut targets = Vec::new(); |
| 141 | for settings in &receipt.settings { |
| 142 | if settings.command_prefix.contains("atomic agent hooks codex") |
| 143 | && !targets.contains(&settings.target) |
| 144 | { |
| 145 | targets.push(settings.target.clone()); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | if targets.is_empty() { |
| 150 | if let Some(path) = CodexHook::global_hooks_path() { |
| 151 | targets.push(path); |
| 152 | } |
| 153 | } |
| 154 | targets |
| 155 | } |
| 156 | |
| 157 | /// Migrate stale Codex hooks in the settings files owned by an integration |
| 158 | /// receipt. `None` means every receipt-managed target was already current. |
no test coverage detected