feat(omo-codex): block budgeted create_goal calls

This commit is contained in:
YeonGyu-Kim
2026-05-28 14:19:14 +09:00
parent 68848233c4
commit 1d3847a6d3
7 changed files with 219 additions and 1 deletions
@@ -1,6 +1,6 @@
#!/usr/bin/env node
import { ultragoalCommand } from "./cli-commands.js";
import { runUltragoalHookCli } from "./codex-hook.js";
import { runPreToolUseGoalBudgetGuardCli, runUltragoalHookCli } from "./codex-hook.js";
const TOP_LEVEL_HELP =
"Usage:\n omo ultragoal <subcommand> [args]\n omo hook user-prompt-submit (Codex UserPromptSubmit hook)\n omo help | --help | -h (this message)\n\nRun `omo ultragoal help` for ultragoal subcommands.\n";
@@ -19,6 +19,10 @@ async function main(): Promise<number> {
await runUltragoalHookCli(process.stdin, process.stdout);
return 0;
}
if (sub === "pre-tool-use") {
await runPreToolUseGoalBudgetGuardCli(process.stdin, process.stdout);
return 0;
}
process.stderr.write(`[omo] unknown hook subcommand: ${sub ?? "(none)"}\n`);
return 1;
}