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

Function hookOutput

hooks_src/protect-files.js:50–62  ·  view source on GitHub ↗
(hookName, action, message, data = {})

Source from the content-addressed store, hash-verified

48const ENV_TEMPLATE_SUFFIXES = ['.example', '.sample', '.template'];
49
50function 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

Callers 3

blockOutputFunction · 0.70
runFunction · 0.70
checkCampaignScopeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected