(hookName, action, message, data = {})
| 32 | const CITADEL_UI = process.env.CITADEL_UI === 'true'; |
| 33 | |
| 34 | function hookOutput(hookName, action, message, data = {}) { |
| 35 | if (CITADEL_UI) { |
| 36 | process.stdout.write(JSON.stringify({ |
| 37 | hook: hookName, |
| 38 | action, |
| 39 | message, |
| 40 | timestamp: new Date().toISOString(), |
| 41 | data, |
| 42 | })); |
| 43 | } else { |
| 44 | process.stdout.write(message); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // ── Main ───────────────────────────────────────────────────────────────────── |
| 49 |
no outgoing calls
no test coverage detected