(hookName, action, message, data = {})
| 48 | const ENV_TEMPLATE_SUFFIXES = ['.example', '.sample', '.template']; |
| 49 | |
| 50 | function hookOutput(hookName, action, message, data = {}) { |
| 51 | if (CITADEL_UI) { |
| 52 | process.stdout.write(JSON.stringify({ |
| 53 | hook: hookName, |
| 54 | action, |
| 55 | message, |
| 56 | timestamp: new Date().toISOString(), |
| 57 | data, |
| 58 | })); |
| 59 | } else { |
| 60 | process.stdout.write(message); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // For blocks and errors: keep the stdout payload byte-identical for the |
| 65 | // CITADEL_UI JSON consumers, and mirror the human-readable reason to stderr |
no outgoing calls
no test coverage detected