MCPcopy Create free account
hub / github.com/SethGammon/Citadel / hookOutput

Function hookOutput

hooks_src/restore-compact.js:23–35  ·  view source on GitHub ↗
(hookName, action, message, data = {})

Source from the content-addressed store, hash-verified

21const CITADEL_UI = process.env.CITADEL_UI === 'true';
22
23function hookOutput(hookName, action, message, data = {}) {
24 if (CITADEL_UI) {
25 process.stdout.write(JSON.stringify({
26 hook: hookName,
27 action,
28 message,
29 timestamp: new Date().toISOString(),
30 data,
31 }));
32 } else {
33 process.stdout.write(message);
34 }
35}
36
37function main() {
38 // Try PLUGIN_DATA_DIR first, fall back to legacy .claude/ location

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected