lazycodex-ai 5.0.0-beta.45 → 5.0.0-beta.47

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 (99) hide show
  1. package/dist/cli/index.js +43 -27
  2. package/dist/cli-node/index.js +43 -27
  3. package/package.json +1 -1
  4. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  5. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  6. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  7. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  8. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  9. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  10. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  11. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  12. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  13. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  14. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  15. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  16. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  17. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  18. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  19. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  20. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  21. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  22. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  23. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  24. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +2 -2
  25. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  26. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +15 -7
  27. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +1 -1
  28. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +1 -1
  29. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +294 -96
  30. package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.d.ts +1 -0
  31. package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.js +1 -0
  32. package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +1 -0
  33. package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +12 -3
  34. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +1 -0
  35. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +21 -6
  36. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.d.ts +1 -0
  37. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.js +10 -0
  38. package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.d.ts +4 -1
  39. package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +25 -57
  40. package/packages/omo-codex/plugin/components/ulw-loop/dist/state-lock.d.ts +9 -0
  41. package/packages/omo-codex/plugin/components/ulw-loop/dist/state-lock.js +227 -0
  42. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +17 -3
  43. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  44. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  45. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +2 -1
  46. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +10 -7
  47. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +18 -7
  48. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +1 -1
  49. package/packages/omo-codex/plugin/components/ulw-loop/src/constants.ts +1 -0
  50. package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +24 -3
  51. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +25 -5
  52. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-missing-recovery.ts +11 -0
  53. package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +34 -64
  54. package/packages/omo-codex/plugin/components/ulw-loop/src/state-lock.ts +239 -0
  55. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +16 -3
  56. package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-template.test.ts +14 -4
  57. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint-continuation.test.ts +4 -2
  58. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint.test.ts +4 -2
  59. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-commands.test.ts +2 -0
  60. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-complete-goals.test.ts +3 -1
  61. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +10 -8
  62. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +12 -2
  63. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-json-errors.test.ts +2 -0
  64. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-scope-required.test.ts +144 -0
  65. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-status-next-actions.test.ts +7 -5
  66. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-batch.test.ts +8 -3
  67. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-validation-batch.test.ts +6 -0
  68. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/cli-session.ts +4 -0
  69. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +2 -1
  70. package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io-cross-process.test.ts +106 -0
  71. package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io.test.ts +36 -2
  72. package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +37 -0
  73. package/packages/omo-codex/plugin/components/ulw-loop/test/state-lock.test.ts +218 -0
  74. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  83. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  84. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  85. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  86. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  87. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  88. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  89. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  90. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +1 -1
  91. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  92. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  93. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  94. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  95. package/packages/omo-codex/plugin/package-lock.json +12 -12
  96. package/packages/omo-codex/plugin/package.json +1 -1
  97. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +2 -1
  98. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +10 -7
  99. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-ulw-execute-continuation",
3
- "version": "5.0.0-beta.45",
3
+ "version": "5.0.0-beta.47",
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",
@@ -3,7 +3,8 @@ import { hasFlag, readValue } from "./cli-arg-parser.js";
3
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
- import { sessionIdRequiredMessage } from "./plan-missing-recovery.js";
6
+ import { listUlwLoopSessionIds } from "./plan-io.js";
7
+ import { sessionIdRequiredMessage, sessionScopeRequiredMessage } from "./plan-missing-recovery.js";
7
8
  import { UlwLoopError } from "./types.js";
8
9
  export const ULW_LOOP_SUBCOMMANDS = [
9
10
  "help",
@@ -27,7 +28,6 @@ export async function ulwLoopCommand(argv) {
27
28
  const repoRoot = process.cwd();
28
29
  const json = hasFlag(rest, "--json");
29
30
  try {
30
- const scope = commandScope(rest);
31
31
  if (!isUlwLoopSubcommand(command)) {
32
32
  if (json) {
33
33
  printJsonError(new UlwLoopError(`Unknown ulw-loop subcommand: ${command}.`, "ULW_LOOP_SUBCOMMAND_UNKNOWN", {
@@ -42,10 +42,12 @@ export async function ulwLoopCommand(argv) {
42
42
  process.stdout.write(`${subcommandHelp(command)}\n`);
43
43
  return 0;
44
44
  }
45
+ if (command === "help") {
46
+ process.stdout.write(`${ULW_LOOP_HELP}\n`);
47
+ return 0;
48
+ }
49
+ const scope = commandScope(repoRoot, rest);
45
50
  switch (command) {
46
- case "help":
47
- process.stdout.write(`${ULW_LOOP_HELP}\n`);
48
- return 0;
49
51
  case "create-goals":
50
52
  return await createGoals(repoRoot, rest, json, scope);
51
53
  case "status":
@@ -89,7 +91,10 @@ const SESSION_ID_FLAG = "--session-id";
89
91
  function sessionIdFlagPresent(argv) {
90
92
  return hasFlag(argv, SESSION_ID_FLAG) || argv.some((arg) => arg.startsWith(`${SESSION_ID_FLAG}=`));
91
93
  }
92
- function commandScope(argv) {
94
+ // Every state subcommand runs against exactly one session directory. Without a flag or
95
+ // a session env there is no owner to resolve, so the command refuses instead of
96
+ // falling back to the repo-global root that every session in the cwd would share.
97
+ function commandScope(repoRoot, argv) {
93
98
  if (sessionIdFlagPresent(argv)) {
94
99
  const sessionId = readValue(argv, SESSION_ID_FLAG)?.trim();
95
100
  if (!sessionId) {
@@ -100,5 +105,8 @@ function commandScope(argv) {
100
105
  return { sessionId };
101
106
  }
102
107
  const sessionId = resolveUlwLoopSessionIdFromEnv();
103
- return sessionId === null ? undefined : { sessionId };
108
+ if (sessionId !== null)
109
+ return { sessionId };
110
+ const existingSessionIds = listUlwLoopSessionIds(repoRoot);
111
+ throw new UlwLoopError(sessionScopeRequiredMessage(SESSION_ID_FLAG, existingSessionIds), "ULW_LOOP_SESSION_SCOPE_REQUIRED", { details: { flag: SESSION_ID_FLAG, existingSessionIds } });
104
112
  }
@@ -1,5 +1,5 @@
1
1
  import type { UlwLoopCodexGoalMode, UlwLoopPlan } from "./types.js";
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 --print-template [--goal-id <id>] [--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.";
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 --print-template [--goal-id <id>] [--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\nEvery state subcommand needs a session scope: [--session-id <id>] or the session env (OMO_ULW_LOOP_SESSION_ID / CODEX_SESSION_ID / CODEX_THREAD_ID / PI_SESSION_ID); state lives under .omo/ulw-loop/<id>/ and the unscoped root is never used implicitly.\nEvery subcommand accepts --help | -h to print its own usage line.";
3
3
  export declare function subcommandHelp(subcommand: string): string;
4
4
  export declare function printJson(value: unknown): void;
5
5
  export declare function printJsonError(error: unknown): void;
@@ -14,7 +14,7 @@ export const ULW_LOOP_HELP = `Usage:
14
14
  omo-agent-toolkit ulw-loop add-goal --title "..." --objective "..." [--json]
15
15
  omo-agent-toolkit ulw-loop record-review-blockers --goal-id <id> --title "..." --objective "..." --evidence "..." --codex-goal-json <...> [--json]
16
16
 
17
- 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 state subcommand needs a session scope: [--session-id <id>] or the session env (OMO_ULW_LOOP_SESSION_ID / CODEX_SESSION_ID / CODEX_THREAD_ID / PI_SESSION_ID); state lives under .omo/ulw-loop/<id>/ and the unscoped root is never used implicitly.
18
18
  Every subcommand accepts --help | -h to print its own usage line.`;
19
19
  export function subcommandHelp(subcommand) {
20
20
  const lines = ULW_LOOP_HELP.split("\n").filter((line) => line.trimStart().startsWith(`omo-agent-toolkit ulw-loop ${subcommand}`));