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

Function hookOutput

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

Source from the content-addressed store, hash-verified

28const CITADEL_UI = process.env.CITADEL_UI === 'true';
29
30function 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
44function main() {
45 health.increment('post-compact', 'count');

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected