oh-my-codex 0.12.2 → 0.12.3

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.
@@ -210,6 +210,42 @@ describe("codex native hook dispatch", () => {
210
210
  }
211
211
  });
212
212
 
213
+ it("nudges $team prompt-submit routing toward omx team runtime usage", async () => {
214
+ const cwd = await mkdtemp(join(tmpdir(), "omx-native-hook-team-"));
215
+ try {
216
+ await mkdir(join(cwd, ".omx", "state"), { recursive: true });
217
+ const result = await dispatchCodexNativeHook(
218
+ {
219
+ hook_event_name: "UserPromptSubmit",
220
+ cwd,
221
+ session_id: "sess-team-1",
222
+ thread_id: "thread-team-1",
223
+ turn_id: "turn-team-1",
224
+ prompt: "$team ship this fix with verification",
225
+ },
226
+ { cwd },
227
+ );
228
+
229
+ assert.equal(result.omxEventName, "keyword-detector");
230
+ assert.equal(result.skillState?.skill, "team");
231
+ assert.match(
232
+ JSON.stringify(result.outputJson),
233
+ /skill: team activated and initial state initialized at \.omx\/state\/team-state\.json; write subsequent updates via omx_state MCP\./,
234
+ );
235
+ assert.match(JSON.stringify(result.outputJson), /Use the durable OMX team runtime via `omx team \.\.\.`/);
236
+ assert.match(JSON.stringify(result.outputJson), /If you need help, run `omx team --help`\./);
237
+
238
+ const state = JSON.parse(
239
+ await readFile(join(cwd, ".omx", "state", "team-state.json"), "utf-8"),
240
+ ) as { mode?: string; active?: boolean; current_phase?: string };
241
+ assert.equal(state.mode, "team");
242
+ assert.equal(state.active, true);
243
+ assert.equal(state.current_phase, "starting");
244
+ } finally {
245
+ await rm(cwd, { recursive: true, force: true });
246
+ }
247
+ });
248
+
213
249
  it("returns a destructive-command caution on PreToolUse for rm -rf dist", async () => {
214
250
  const cwd = await mkdtemp(join(tmpdir(), "omx-native-hook-pretool-danger-"));
215
251
  try {
@@ -429,6 +429,19 @@ function buildAdditionalContextMessage(prompt: string, skillState?: SkillActiveS
429
429
  const match = detectPrimaryKeyword(prompt);
430
430
  if (!match) return null;
431
431
 
432
+ if (match.skill === "team") {
433
+ const initializedStateMessage = skillState?.initialized_mode && skillState.initialized_state_path
434
+ ? `skill: ${skillState.initialized_mode} activated and initial state initialized at ${skillState.initialized_state_path}; write subsequent updates via omx_state MCP.`
435
+ : null;
436
+ return [
437
+ `OMX native UserPromptSubmit detected workflow keyword "${match.keyword}" -> ${match.skill}.`,
438
+ initializedStateMessage,
439
+ "Use the durable OMX team runtime via `omx team ...` for coordinated execution; do not replace it with in-process fanout.",
440
+ "If you need help, run `omx team --help`.",
441
+ "Follow AGENTS.md routing and preserve ralplan/ralph execution gates.",
442
+ ].filter(Boolean).join(" ");
443
+ }
444
+
432
445
  if (skillState?.initialized_mode && skillState.initialized_state_path) {
433
446
  return [
434
447
  `OMX native UserPromptSubmit detected workflow keyword "${match.keyword}" -> ${match.skill}.`,