oh-my-opencode 5.0.0-beta.21 → 5.0.0-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/cli/index.js +121 -162
  2. package/dist/cli-node/index.js +121 -162
  3. package/dist/index.js +122 -163
  4. package/dist/tui.js +106 -147
  5. package/package.json +14 -14
  6. package/packages/lsp-daemon/package.json +1 -1
  7. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  8. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  9. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  10. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  11. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  12. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  13. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  14. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  15. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  16. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  17. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  18. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  19. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  20. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  21. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  22. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  23. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  24. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  25. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  26. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  27. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  28. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +2 -2
  29. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  30. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +5 -1
  31. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +2 -1
  32. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +11 -1
  33. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +22 -10
  34. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  35. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  36. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +5 -1
  37. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +13 -1
  38. package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +3 -5
  39. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +26 -2
  40. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  41. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  42. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  43. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  44. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  45. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  46. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  47. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  48. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  49. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  50. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  51. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  52. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  53. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  54. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  55. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  56. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  57. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  58. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +1 -1
  59. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  60. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  61. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  62. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  63. package/packages/omo-codex/plugin/package-lock.json +13 -13
  64. package/packages/omo-codex/plugin/package.json +1 -1
  65. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
10
10
  "timeout": 60,
11
- "statusMessage": "(OmO 5.0.0-beta.21) Checking LSP Diagnostics"
11
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking LSP Diagnostics"
12
12
  }
13
13
  ]
14
14
  }
@@ -21,7 +21,7 @@
21
21
  "type": "command",
22
22
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
23
23
  "timeout": 5,
24
- "statusMessage": "(OmO 5.0.0-beta.21) Resetting LSP Diagnostics Cache"
24
+ "statusMessage": "(OmO 5.0.0-beta.22) Resetting LSP Diagnostics Cache"
25
25
  }
26
26
  ]
27
27
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-lsp",
3
- "version": "5.0.0-beta.21",
3
+ "version": "5.0.0-beta.22",
4
4
  "description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Loading Project Rules"
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Loading Project Rules"
11
11
  }
12
12
  ]
13
13
  }
@@ -19,7 +19,7 @@
19
19
  "type": "command",
20
20
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
21
21
  "timeout": 10,
22
- "statusMessage": "(OmO 5.0.0-beta.21) Loading Project Rules"
22
+ "statusMessage": "(OmO 5.0.0-beta.22) Loading Project Rules"
23
23
  }
24
24
  ]
25
25
  }
@@ -32,7 +32,7 @@
32
32
  "type": "command",
33
33
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
34
34
  "timeout": 10,
35
- "statusMessage": "(OmO 5.0.0-beta.21) Matching Project Rules"
35
+ "statusMessage": "(OmO 5.0.0-beta.22) Matching Project Rules"
36
36
  }
37
37
  ]
38
38
  }
@@ -45,7 +45,7 @@
45
45
  "type": "command",
46
46
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
47
47
  "timeout": 10,
48
- "statusMessage": "(OmO 5.0.0-beta.21) Resetting Project Rule Cache"
48
+ "statusMessage": "(OmO 5.0.0-beta.22) Resetting Project Rule Cache"
49
49
  }
50
50
  ]
51
51
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-rules",
3
- "version": "5.0.0-beta.21",
3
+ "version": "5.0.0-beta.22",
4
4
  "description": "Codex plugin that injects project rule files into model context through lifecycle hooks.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
10
10
  "timeout": 10,
11
- "statusMessage": "(OmO 5.0.0-beta.21) Checking Thread Title Hygiene"
11
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking Thread Title Hygiene"
12
12
  }
13
13
  ]
14
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisyphuslabs/codex-teammode",
3
- "version": "5.0.0-beta.21",
3
+ "version": "5.0.0-beta.22",
4
4
  "description": "Codex team-mode hook component that keeps background thread titles descriptive after create_thread.",
5
5
  "type": "module",
6
6
  "private": true,
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Recording Session Telemetry"
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Recording Session Telemetry"
11
11
  }
12
12
  ]
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-telemetry",
3
- "version": "5.0.0-beta.21",
3
+ "version": "5.0.0-beta.22",
4
4
  "description": "Codex plugin component that emits omo-codex anonymous daily-active telemetry on SessionStart.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Checking Ultrawork Trigger"
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking Ultrawork Trigger"
11
11
  }
12
12
  ]
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-ultrawork",
3
- "version": "5.0.0-beta.21",
3
+ "version": "5.0.0-beta.22",
4
4
  "description": "Codex plugin that injects the ultrawork orchestration directive and ships LazyCodex planning, review, QA, and gate agent roles.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/ulw-execute-continuation/dist/cli.js\" hook stop",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Checking Ulw-Execute Continuation"
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking Ulw-Execute Continuation"
11
11
  }
12
12
  ]
13
13
  }
@@ -19,7 +19,7 @@
19
19
  "type": "command",
20
20
  "command": "node \"${PLUGIN_ROOT}/components/ulw-execute-continuation/dist/cli.js\" hook subagent-stop",
21
21
  "timeout": 10,
22
- "statusMessage": "(OmO 5.0.0-beta.21) Checking Ulw-Execute Continuation"
22
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking Ulw-Execute Continuation"
23
23
  }
24
24
  ]
25
25
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-ulw-execute-continuation",
3
- "version": "5.0.0-beta.21",
3
+ "version": "5.0.0-beta.22",
4
4
  "description": "Codex Stop hook continuation injector for omo-codex ulw-execute plans.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -1,6 +1,6 @@
1
1
  import { checkpoint } from "./checkpoint-continuation.js";
2
2
  import { hasFlag, readValue } from "./cli-arg-parser.js";
3
- import { printJsonError, ULW_LOOP_HELP } from "./cli-output.js";
3
+ import { printJsonError, subcommandHelp, ULW_LOOP_HELP } from "./cli-output.js";
4
4
  import { addGoal, captureEvidence, completeGoals, createGoals, criteria, reviewBlockers, status, steer, } from "./cli-subcommands.js";
5
5
  import { resolveUlwLoopSessionIdFromEnv } from "./paths.js";
6
6
  import { UlwLoopError } from "./types.js";
@@ -37,6 +37,10 @@ export async function ulwLoopCommand(argv) {
37
37
  process.stdout.write(`${ULW_LOOP_HELP}\n`);
38
38
  return 1;
39
39
  }
40
+ if (command !== "help" && (hasFlag(rest, "--help") || hasFlag(rest, "-h"))) {
41
+ process.stdout.write(`${subcommandHelp(command)}\n`);
42
+ return 0;
43
+ }
40
44
  switch (command) {
41
45
  case "help":
42
46
  process.stdout.write(`${ULW_LOOP_HELP}\n`);
@@ -1,5 +1,6 @@
1
1
  import type { UlwLoopCodexGoalMode, UlwLoopPlan } from "./types.js";
2
- export declare const ULW_LOOP_HELP = "Usage:\n omo-agent-toolkit ulw-loop create-goals --brief \"...\" [--brief-file <path>] [--from-stdin] [--codex-goal-mode aggregate|per_story] [--validation-batch-json <json-or-path>] [--force] [--json]\n omo-agent-toolkit ulw-loop status [--json]\n omo-agent-toolkit ulw-loop complete-goals [--retry-failed] [--json]\n omo-agent-toolkit ulw-loop criteria --goal-id <id> [--json]\n omo-agent-toolkit ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status pass|fail|blocked --evidence \"...\" [--notes \"...\"] [--json]\n omo-agent-toolkit ulw-loop checkpoint --goal-id <id> --status complete|failed|blocked --evidence \"...\" --codex-goal-json <...> [--quality-gate-json <...>] [--no-advance] [--json]\n omo-agent-toolkit ulw-loop steer --kind <kind> ... --evidence \"...\" --rationale \"...\" [--proposals-json <json-or-path>] [--json]\n omo-agent-toolkit ulw-loop add-goal --title \"...\" --objective \"...\" [--json]\n omo-agent-toolkit ulw-loop record-review-blockers --goal-id <id> --title \"...\" --objective \"...\" --evidence \"...\" --codex-goal-json <...> [--json]\n\nAll subcommands accept [--session-id <id>] to isolate state under .omo/ulw-loop/<id>/; without it, Codex session env is used when present.";
2
+ export declare const ULW_LOOP_HELP = "Usage:\n omo-agent-toolkit hook user-prompt-submit [--with-ultrawork] (Codex UserPromptSubmit hook)\n omo-agent-toolkit help | --help | -h (this message)\n omo-agent-toolkit ulw-loop help\n omo-agent-toolkit ulw-loop create-goals --brief \"...\" [--brief-file <path>] [--from-stdin] [--codex-goal-mode aggregate|per_story] [--validation-batch-json <json-or-path>] [--force] [--json]\n omo-agent-toolkit ulw-loop status [--json]\n omo-agent-toolkit ulw-loop complete-goals [--retry-failed] [--json]\n omo-agent-toolkit ulw-loop criteria --goal-id <id> [--json]\n omo-agent-toolkit ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status pass|fail|blocked --evidence \"...\" [--notes \"...\"] [--json]\n omo-agent-toolkit ulw-loop checkpoint --goal-id <id> --status complete|failed|blocked --evidence \"...\" --codex-goal-json <...> [--quality-gate-json <...>] [--no-advance] [--json]\n omo-agent-toolkit ulw-loop steer --kind <kind> ... --evidence \"...\" --rationale \"...\" [--proposals-json <json-or-path>] [--json]\n omo-agent-toolkit ulw-loop add-goal --title \"...\" --objective \"...\" [--json]\n omo-agent-toolkit ulw-loop record-review-blockers --goal-id <id> --title \"...\" --objective \"...\" --evidence \"...\" --codex-goal-json <...> [--json]\n\nAll subcommands accept [--session-id <id>] to isolate state under .omo/ulw-loop/<id>/; without it, Codex session env is used when present.\nEvery subcommand accepts --help | -h to print its own usage line.";
3
+ export declare function subcommandHelp(subcommand: string): string;
3
4
  export declare function printJson(value: unknown): void;
4
5
  export declare function printJsonError(error: unknown): void;
5
6
  export declare function printStatus(plan: UlwLoopPlan): void;
@@ -1,5 +1,8 @@
1
1
  import { UlwLoopError } from "./types.js";
2
2
  export const ULW_LOOP_HELP = `Usage:
3
+ omo-agent-toolkit hook user-prompt-submit [--with-ultrawork] (Codex UserPromptSubmit hook)
4
+ omo-agent-toolkit help | --help | -h (this message)
5
+ omo-agent-toolkit ulw-loop help
3
6
  omo-agent-toolkit ulw-loop create-goals --brief "..." [--brief-file <path>] [--from-stdin] [--codex-goal-mode aggregate|per_story] [--validation-batch-json <json-or-path>] [--force] [--json]
4
7
  omo-agent-toolkit ulw-loop status [--json]
5
8
  omo-agent-toolkit ulw-loop complete-goals [--retry-failed] [--json]
@@ -10,7 +13,14 @@ export const ULW_LOOP_HELP = `Usage:
10
13
  omo-agent-toolkit ulw-loop add-goal --title "..." --objective "..." [--json]
11
14
  omo-agent-toolkit ulw-loop record-review-blockers --goal-id <id> --title "..." --objective "..." --evidence "..." --codex-goal-json <...> [--json]
12
15
 
13
- All subcommands accept [--session-id <id>] to isolate state under .omo/ulw-loop/<id>/; without it, Codex session env is used when present.`;
16
+ All subcommands accept [--session-id <id>] to isolate state under .omo/ulw-loop/<id>/; without it, Codex session env is used when present.
17
+ Every subcommand accepts --help | -h to print its own usage line.`;
18
+ export function subcommandHelp(subcommand) {
19
+ const lines = ULW_LOOP_HELP.split("\n").filter((line) => line.trimStart().startsWith(`omo-agent-toolkit ulw-loop ${subcommand}`));
20
+ if (lines.length === 0)
21
+ return ULW_LOOP_HELP;
22
+ return ["Usage:", ...lines].join("\n");
23
+ }
14
24
  export function printJson(value) {
15
25
  process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
16
26
  }
@@ -1252,6 +1252,9 @@ async function checkpointUlwLoop(repoRoot, args, scope) {
1252
1252
 
1253
1253
  // packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts
1254
1254
  var ULW_LOOP_HELP = `Usage:
1255
+ omo-agent-toolkit hook user-prompt-submit [--with-ultrawork] (Codex UserPromptSubmit hook)
1256
+ omo-agent-toolkit help | --help | -h (this message)
1257
+ omo-agent-toolkit ulw-loop help
1255
1258
  omo-agent-toolkit ulw-loop create-goals --brief "..." [--brief-file <path>] [--from-stdin] [--codex-goal-mode aggregate|per_story] [--validation-batch-json <json-or-path>] [--force] [--json]
1256
1259
  omo-agent-toolkit ulw-loop status [--json]
1257
1260
  omo-agent-toolkit ulw-loop complete-goals [--retry-failed] [--json]
@@ -1262,7 +1265,16 @@ var ULW_LOOP_HELP = `Usage:
1262
1265
  omo-agent-toolkit ulw-loop add-goal --title "..." --objective "..." [--json]
1263
1266
  omo-agent-toolkit ulw-loop record-review-blockers --goal-id <id> --title "..." --objective "..." --evidence "..." --codex-goal-json <...> [--json]
1264
1267
 
1265
- All subcommands accept [--session-id <id>] to isolate state under .omo/ulw-loop/<id>/; without it, Codex session env is used when present.`;
1268
+ All subcommands accept [--session-id <id>] to isolate state under .omo/ulw-loop/<id>/; without it, Codex session env is used when present.
1269
+ Every subcommand accepts --help | -h to print its own usage line.`;
1270
+ function subcommandHelp(subcommand) {
1271
+ const lines = ULW_LOOP_HELP.split(`
1272
+ `).filter((line) => line.trimStart().startsWith(`omo-agent-toolkit ulw-loop ${subcommand}`));
1273
+ if (lines.length === 0)
1274
+ return ULW_LOOP_HELP;
1275
+ return ["Usage:", ...lines].join(`
1276
+ `);
1277
+ }
1266
1278
  function printJson(value) {
1267
1279
  process.stdout.write(`${JSON.stringify(value, null, 2)}
1268
1280
  `);
@@ -2720,6 +2732,11 @@ async function ulwLoopCommand(argv) {
2720
2732
  `);
2721
2733
  return 1;
2722
2734
  }
2735
+ if (command !== "help" && (hasFlag(rest, "--help") || hasFlag(rest, "-h"))) {
2736
+ process.stdout.write(`${subcommandHelp(command)}
2737
+ `);
2738
+ return 0;
2739
+ }
2723
2740
  switch (command) {
2724
2741
  case "help":
2725
2742
  process.stdout.write(`${ULW_LOOP_HELP}
@@ -3398,18 +3415,12 @@ function parseStopPayload(value) {
3398
3415
  }
3399
3416
 
3400
3417
  // packages/omo-codex/plugin/components/ulw-loop/src/cli.ts
3401
- var TOP_LEVEL_HELP = `Usage:
3402
- omo-agent-toolkit ulw-loop <subcommand> [args]
3403
- omo-agent-toolkit hook user-prompt-submit [--with-ultrawork] (Codex UserPromptSubmit hook)
3404
- omo-agent-toolkit help | --help | -h (this message)
3405
-
3406
- Run \`omo-agent-toolkit ulw-loop help\` for ulw-loop subcommands.
3407
- `;
3408
3418
  async function main() {
3409
3419
  const argv = process.argv.slice(2);
3410
3420
  const command = argv[0];
3411
3421
  if (command === undefined || command === "help" || command === "--help" || command === "-h") {
3412
- process.stdout.write(TOP_LEVEL_HELP);
3422
+ process.stdout.write(`${ULW_LOOP_HELP}
3423
+ `);
3413
3424
  return 0;
3414
3425
  }
3415
3426
  if (command === "ulw-loop")
@@ -3441,7 +3452,8 @@ async function main() {
3441
3452
  if (isUlwLoopSubcommand(command))
3442
3453
  return ulwLoopCommand(argv);
3443
3454
  process.stderr.write(`[omo] unknown command: ${command}
3444
- ${TOP_LEVEL_HELP}`);
3455
+ ${ULW_LOOP_HELP}
3456
+ `);
3445
3457
  return 1;
3446
3458
  }
3447
3459
  main().then((code) => {
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit --with-ultrawork",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Checking Ulw-Loop Steering"
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking Ulw-Loop Steering"
11
11
  }
12
12
  ]
13
13
  }
@@ -20,7 +20,7 @@
20
20
  "type": "command",
21
21
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
22
22
  "timeout": 5,
23
- "statusMessage": "(OmO 5.0.0-beta.21) Enforcing Unlimited Ulw-Loop Budget"
23
+ "statusMessage": "(OmO 5.0.0-beta.22) Enforcing Unlimited Ulw-Loop Budget"
24
24
  }
25
25
  ]
26
26
  },
@@ -31,7 +31,7 @@
31
31
  "type": "command",
32
32
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use-spawn",
33
33
  "timeout": 5,
34
- "statusMessage": "(OmO 5.0.0-beta.21) Guarding Ulw-Loop Spawns"
34
+ "statusMessage": "(OmO 5.0.0-beta.22) Guarding Ulw-Loop Spawns"
35
35
  }
36
36
  ]
37
37
  }
@@ -43,7 +43,7 @@
43
43
  "type": "command",
44
44
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook stop",
45
45
  "timeout": 10,
46
- "statusMessage": "(OmO 5.0.0-beta.21) Checking Ulw-Loop Resume"
46
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking Ulw-Loop Resume"
47
47
  }
48
48
  ]
49
49
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-ulw-loop",
3
- "version": "5.0.0-beta.21",
3
+ "version": "5.0.0-beta.22",
4
4
  "description": "Codex plugin: durable repo-native multi-goal orchestration with embedded success criteria and observable evidence audit.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -1,6 +1,6 @@
1
1
  import { checkpoint } from "./checkpoint-continuation.js";
2
2
  import { hasFlag, readValue } from "./cli-arg-parser.js";
3
- import { printJsonError, ULW_LOOP_HELP } from "./cli-output.js";
3
+ import { printJsonError, subcommandHelp, ULW_LOOP_HELP } from "./cli-output.js";
4
4
  import {
5
5
  addGoal,
6
6
  captureEvidence,
@@ -53,6 +53,10 @@ export async function ulwLoopCommand(argv: readonly string[]): Promise<number> {
53
53
  process.stdout.write(`${ULW_LOOP_HELP}\n`);
54
54
  return 1;
55
55
  }
56
+ if (command !== "help" && (hasFlag(rest, "--help") || hasFlag(rest, "-h"))) {
57
+ process.stdout.write(`${subcommandHelp(command)}\n`);
58
+ return 0;
59
+ }
56
60
  switch (command) {
57
61
  case "help":
58
62
  process.stdout.write(`${ULW_LOOP_HELP}\n`);
@@ -2,6 +2,9 @@ import type { UlwLoopCodexGoalMode, UlwLoopItem, UlwLoopPlan } from "./types.js"
2
2
  import { UlwLoopError } from "./types.js";
3
3
 
4
4
  export const ULW_LOOP_HELP = `Usage:
5
+ omo-agent-toolkit hook user-prompt-submit [--with-ultrawork] (Codex UserPromptSubmit hook)
6
+ omo-agent-toolkit help | --help | -h (this message)
7
+ omo-agent-toolkit ulw-loop help
5
8
  omo-agent-toolkit ulw-loop create-goals --brief "..." [--brief-file <path>] [--from-stdin] [--codex-goal-mode aggregate|per_story] [--validation-batch-json <json-or-path>] [--force] [--json]
6
9
  omo-agent-toolkit ulw-loop status [--json]
7
10
  omo-agent-toolkit ulw-loop complete-goals [--retry-failed] [--json]
@@ -12,7 +15,16 @@ export const ULW_LOOP_HELP = `Usage:
12
15
  omo-agent-toolkit ulw-loop add-goal --title "..." --objective "..." [--json]
13
16
  omo-agent-toolkit ulw-loop record-review-blockers --goal-id <id> --title "..." --objective "..." --evidence "..." --codex-goal-json <...> [--json]
14
17
 
15
- All subcommands accept [--session-id <id>] to isolate state under .omo/ulw-loop/<id>/; without it, Codex session env is used when present.`;
18
+ All subcommands accept [--session-id <id>] to isolate state under .omo/ulw-loop/<id>/; without it, Codex session env is used when present.
19
+ Every subcommand accepts --help | -h to print its own usage line.`;
20
+
21
+ export function subcommandHelp(subcommand: string): string {
22
+ const lines = ULW_LOOP_HELP.split("\n").filter((line) =>
23
+ line.trimStart().startsWith(`omo-agent-toolkit ulw-loop ${subcommand}`),
24
+ );
25
+ if (lines.length === 0) return ULW_LOOP_HELP;
26
+ return ["Usage:", ...lines].join("\n");
27
+ }
16
28
 
17
29
  type CriteriaCounts = { readonly pass: number; readonly total: number };
18
30
 
@@ -1,17 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import { isUlwLoopSubcommand, ulwLoopCommand } from "./cli-commands.js";
3
+ import { ULW_LOOP_HELP } from "./cli-output.js";
3
4
  import { runPreToolUseGoalBudgetGuardCli, runUlwLoopHookCli } from "./codex-hook.js";
4
5
  import { runSpawnGuardCli } from "./spawn-guard.js";
5
6
  import { runStopResumeHookCli } from "./stop-resume-hook.js";
6
7
 
7
- const TOP_LEVEL_HELP =
8
- "Usage:\n omo-agent-toolkit ulw-loop <subcommand> [args]\n omo-agent-toolkit hook user-prompt-submit [--with-ultrawork] (Codex UserPromptSubmit hook)\n omo-agent-toolkit help | --help | -h (this message)\n\nRun `omo-agent-toolkit ulw-loop help` for ulw-loop subcommands.\n";
9
-
10
8
  async function main(): Promise<number> {
11
9
  const argv = process.argv.slice(2);
12
10
  const command = argv[0];
13
11
  if (command === undefined || command === "help" || command === "--help" || command === "-h") {
14
- process.stdout.write(TOP_LEVEL_HELP);
12
+ process.stdout.write(`${ULW_LOOP_HELP}\n`);
15
13
  return 0;
16
14
  }
17
15
  if (command === "ulw-loop") return ulwLoopCommand(argv.slice(1));
@@ -39,7 +37,7 @@ async function main(): Promise<number> {
39
37
  return 1;
40
38
  }
41
39
  if (isUlwLoopSubcommand(command)) return ulwLoopCommand(argv);
42
- process.stderr.write(`[omo] unknown command: ${command}\n${TOP_LEVEL_HELP}`);
40
+ process.stderr.write(`[omo] unknown command: ${command}\n${ULW_LOOP_HELP}\n`);
43
41
  return 1;
44
42
  }
45
43
 
@@ -91,12 +91,36 @@ describe("dist/cli.js entrypoint dispatch", () => {
91
91
  expect(result.code).toBe(1);
92
92
  });
93
93
 
94
- it("#given the top-level entrypoint #when invoked with 'help' #then prints usage and exits 0", async () => {
94
+ it("#given the top-level entrypoint #when invoked with 'help' #then prints the merged hook and subcommand usage and exits 0", async () => {
95
95
  const result = await runCli(["help"]);
96
96
 
97
97
  expect(result.code).toBe(0);
98
98
  expect(result.stdout).toContain("Usage:");
99
- expect(result.stdout).toContain("omo-agent-toolkit ulw-loop <subcommand>");
99
+ expect(result.stdout).toContain("hook user-prompt-submit");
100
+ expect(result.stdout).toContain("create-goals");
101
+ expect(result.stdout).toContain("complete-goals");
102
+ expect(result.stdout).toContain("record-review-blockers");
103
+ expect(result.stdout).not.toContain("for ulw-loop subcommands");
104
+ });
105
+
106
+ it("#given the staged router strips nothing #when invoked with 'ulw-loop help' #then prints the same merged help text", async () => {
107
+ const bare = await runCli(["help"]);
108
+ const nested = await runCli(["ulw-loop", "help"]);
109
+
110
+ expect(nested.code).toBe(0);
111
+ expect(nested.stdout.trim()).toBe(bare.stdout.trim());
112
+ expect(nested.stdout).toContain("hook user-prompt-submit");
113
+ expect(nested.stdout).toContain("record-review-blockers");
114
+ expect(nested.stdout).not.toContain("for ulw-loop subcommands");
115
+ });
116
+
117
+ it("#given a subcommand with required args #when invoked with 'create-goals --help' #then prints its usage and exits 0", async () => {
118
+ const result = await runCli(["create-goals", "--help"]);
119
+
120
+ expect(result.code).toBe(0);
121
+ expect(result.stdout).toContain("Usage:");
122
+ expect(result.stdout).toContain("create-goals");
123
+ expect(`${result.stdout}${result.stderr}`).not.toContain("Missing brief text");
100
124
  });
101
125
 
102
126
  it("#given a command outside the ulw-loop vocabulary #when invoked with 'frobnicate' #then fails as unknown command", async () => {
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook post-compact",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Resetting Git Bash MCP Reminder",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Resetting Git Bash MCP Reminder",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook post-compact"
12
12
  }
13
13
  ],
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-compact",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Resetting LSP Diagnostics Cache",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Resetting LSP Diagnostics Cache",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-compact"
12
12
  }
13
13
  ],
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-compact",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Resetting Project Rule Cache",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Resetting Project Rule Cache",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-compact"
12
12
  }
13
13
  ],
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook post-tool-use",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Checking CodeGraph Init Guidance",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking CodeGraph Init Guidance",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook post-tool-use"
12
12
  }
13
13
  ],
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/comment-checker/dist/cli.js\" hook post-tool-use",
9
9
  "timeout": 30,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Checking Comments",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking Comments",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\comment-checker\\dist\\cli.js\" hook post-tool-use"
12
12
  }
13
13
  ],
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-tool-use",
9
9
  "timeout": 60,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Checking LSP Diagnostics",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking LSP Diagnostics",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-tool-use"
12
12
  }
13
13
  ],
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/components/teammode/dist/cli.js\" hook post-tool-use",
10
10
  "timeout": 10,
11
- "statusMessage": "(OmO 5.0.0-beta.21) Checking Thread Title Hygiene",
11
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking Thread Title Hygiene",
12
12
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\teammode\\dist\\cli.js\" hook post-tool-use"
13
13
  }
14
14
  ]
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-tool-use",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Matching Project Rules",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Matching Project Rules",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-tool-use"
12
12
  }
13
13
  ],
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Enforcing Unlimited Goal Budget",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Enforcing Unlimited Goal Budget",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook pre-tool-use"
12
12
  }
13
13
  ],
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use-spawn",
10
10
  "timeout": 5,
11
- "statusMessage": "(OmO 5.0.0-beta.21) Guarding Ulw-Loop Spawns",
11
+ "statusMessage": "(OmO 5.0.0-beta.22) Guarding Ulw-Loop Spawns",
12
12
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook pre-tool-use-spawn"
13
13
  }
14
14
  ]
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook pre-tool-use",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Recommending Git Bash MCP",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Recommending Git Bash MCP",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook pre-tool-use"
12
12
  }
13
13
  ],
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/scripts/auto-update.mjs\" hook session-start",
9
9
  "timeout": 15,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Checking Auto Update",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking Auto Update",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\scripts\\auto-update.mjs\" hook session-start"
12
12
  }
13
13
  ],
@@ -8,7 +8,7 @@
8
8
  "command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
9
9
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
10
10
  "timeout": 30,
11
- "statusMessage": "(OmO 5.0.0-beta.21) Checking Bootstrap Provisioning"
11
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking Bootstrap Provisioning"
12
12
  }
13
13
  ]
14
14
  }
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook session-start",
9
9
  "timeout": 15,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Checking CodeGraph Bootstrap",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Checking CodeGraph Bootstrap",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook session-start"
12
12
  }
13
13
  ]
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook session-start",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Loading Project Rules",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Loading Project Rules",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook session-start"
12
12
  }
13
13
  ]
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/telemetry/dist/cli.js\" hook session-start",
9
9
  "timeout": 15,
10
- "statusMessage": "(OmO 5.0.0-beta.21) Recording Session Telemetry",
10
+ "statusMessage": "(OmO 5.0.0-beta.22) Recording Session Telemetry",
11
11
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\telemetry\\dist\\cli.js\" hook session-start"
12
12
  }
13
13
  ]