Function
hookOutput
(hookName, action, message, data = {})
Source from the content-addressed store, hash-verified
| 38 | const CITADEL_UI = process.env.CITADEL_UI === 'true'; |
| 39 | |
| 40 | function hookOutput(hookName, action, message, data = {}) { |
| 41 | if (CITADEL_UI) { |
| 42 | process.stdout.write(JSON.stringify({ |
| 43 | hook: hookName, |
| 44 | action, |
| 45 | message, |
| 46 | timestamp: new Date().toISOString(), |
| 47 | data, |
| 48 | })); |
| 49 | } else { |
| 50 | process.stdout.write(message); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | function main() { |
| 55 | health.increment('pre-compact', 'count'); |
Tested by
no test coverage detected