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

Function hookOutput

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

Source from the content-addressed store, hash-verified

38const CITADEL_UI = process.env.CITADEL_UI === 'true';
39
40function 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
54function main() {
55 health.increment('pre-compact', 'count');

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected