Function
hookOutput
(hookName, action, message, data = {})
Source from the content-addressed store, hash-verified
| 58 | } |
| 59 | |
| 60 | function hookOutput(hookName, action, message, data = {}) { |
| 61 | if (CITADEL_UI) { |
| 62 | process.stdout.write(JSON.stringify({ |
| 63 | hook: hookName, |
| 64 | action, |
| 65 | message, |
| 66 | timestamp: new Date().toISOString(), |
| 67 | data, |
| 68 | })); |
| 69 | } else { |
| 70 | process.stdout.write(message); |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | function readEntries(queuePath) { |
| 75 | if (!fs.existsSync(queuePath)) return { exists: false, entries: [], malformed: 0 }; |
Tested by
no test coverage detected