Function
hookOutput
(hookName, action, message, data = {})
Source from the content-addressed store, hash-verified
| 28 | const CITADEL_UI = process.env.CITADEL_UI === 'true'; |
| 29 | |
| 30 | function hookOutput(hookName, action, message, data = {}) { |
| 31 | if (CITADEL_UI) { |
| 32 | process.stdout.write(JSON.stringify({ |
| 33 | hook: hookName, |
| 34 | action, |
| 35 | message, |
| 36 | timestamp: new Date().toISOString(), |
| 37 | data, |
| 38 | })); |
| 39 | } else { |
| 40 | process.stdout.write(message); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | function main() { |
| 45 | health.increment('post-compact', 'count'); |
Tested by
no test coverage detected