Skip to content

The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.

chore: sync Codex marketplace v5.1.14

github-actions[bot]af3ec0c07a5f
diff --git a/plugins/omo/.codex-plugin/plugin.json b/plugins/omo/.codex-plugin/plugin.json
index 42c9bd92..f21af4b5 100644
--- a/plugins/omo/.codex-plugin/plugin.json
+++ b/plugins/omo/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "omo",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "One Codex plugin namespace for Yeongyu's local Codex components.",
"author": {
"name": "Yeongyu Kim",
diff --git a/plugins/omo/components/bootstrap/hooks/hooks.json b/plugins/omo/components/bootstrap/hooks/hooks.json
index 05dc963a..fc594c36 100644
--- a/plugins/omo/components/bootstrap/hooks/hooks.json
+++ b/plugins/omo/components/bootstrap/hooks/hooks.json
@@ -8,7 +8,7 @@
"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
"timeout": 30,
- "statusMessage": "(OmO 5.1.13) Checking Bootstrap Provisioning"
+ "statusMessage": "(OmO 5.1.14) Checking Bootstrap Provisioning"
}
]
}
diff --git a/plugins/omo/components/bootstrap/package.json b/plugins/omo/components/bootstrap/package.json
index 47fa6270..85a7ebca 100644
--- a/plugins/omo/components/bootstrap/package.json
+++ b/plugins/omo/components/bootstrap/package.json
@@ -1,6 +1,6 @@
{
"name": "@sisyphuslabs/codex-bootstrap",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.",
"type": "module",
"private": true,
diff --git a/plugins/omo/components/comment-checker/hooks/hooks.json b/plugins/omo/components/comment-checker/hooks/hooks.json
index 568105c0..537b2705 100644
--- a/plugins/omo/components/comment-checker/hooks/hooks.json
+++ b/plugins/omo/components/comment-checker/hooks/hooks.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
"timeout": 30,
- "statusMessage": "(OmO 5.1.13) Checking Comments"
+ "statusMessage": "(OmO 5.1.14) Checking Comments"
}
]
}
diff --git a/plugins/omo/components/comment-checker/package.json b/plugins/omo/components/comment-checker/package.json
index f972e1df..a1931079 100644
--- a/plugins/omo/components/comment-checker/package.json
+++ b/plugins/omo/components/comment-checker/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-comment-checker",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex plugin that runs comment-checker after edit-like PostToolUse hooks.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/git-bash/hooks/hooks.json b/plugins/omo/components/git-bash/hooks/hooks.json
index 3500fb29..c683fe27 100644
--- a/plugins/omo/components/git-bash/hooks/hooks.json
+++ b/plugins/omo/components/git-bash/hooks/hooks.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Recommending Git Bash MCP"
+ "statusMessage": "(OmO 5.1.14) Recommending Git Bash MCP"
}
]
}
@@ -20,7 +20,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Resetting Git Bash MCP Reminder"
+ "statusMessage": "(OmO 5.1.14) Resetting Git Bash MCP Reminder"
}
]
}
diff --git a/plugins/omo/components/git-bash/package.json b/plugins/omo/components/git-bash/package.json
index b10b3bce..369a8955 100644
--- a/plugins/omo/components/git-bash/package.json
+++ b/plugins/omo/components/git-bash/package.json
@@ -1,6 +1,6 @@
{
"name": "@sisyphuslabs/codex-git-bash-hook",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex hook component that reminds Windows sessions to prefer the OMO git_bash MCP.",
"type": "module",
"private": true,
diff --git a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json
index 9f2573be..bab790e0 100644
--- a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json
+++ b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Verifying LazyCodex Executor Evidence"
+ "statusMessage": "(OmO 5.1.14) Verifying LazyCodex Executor Evidence"
}
]
}
diff --git a/plugins/omo/components/lazycodex-executor-verify/package.json b/plugins/omo/components/lazycodex-executor-verify/package.json
index 3566209f..62f3ad44 100644
--- a/plugins/omo/components/lazycodex-executor-verify/package.json
+++ b/plugins/omo/components/lazycodex-executor-verify/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-lazycodex-executor-verify",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex SubagentStop evidence verifier for LazyCodex executor completions.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/lsp/dist/.omo-runtime-manifest.json b/plugins/omo/components/lsp/dist/.omo-runtime-manifest.json
index a412de91..6ecc1716 100644
--- a/plugins/omo/components/lsp/dist/.omo-runtime-manifest.json
+++ b/plugins/omo/components/lsp/dist/.omo-runtime-manifest.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
- "version": "5.1.13",
- "inputDigest": "sha256:1987f296d40fe07041a3d11da647afb8018ce55fed91453f9ed0c42fa6523d38",
+ "version": "5.1.14",
+ "inputDigest": "sha256:d1ee8c51725f4649bd6437bbe0a02cf6f922ce19e2229d12d02c4d3ddccdafde",
"outputs": [
{
"path": "cli.d.ts",
@@ -9,7 +9,7 @@
},
{
"path": "cli.js",
- "sha256": "d793d83fb82b1fafe52e619f545c5195398498d1f95f15d84904fe3d0a20befe"
+ "sha256": "f2776c0f9c2a893136e9e8e36c2e086172f10c0ab3566a730cff4443b712f956"
},
{
"path": "codex-hook-cli.d.ts",
@@ -25,7 +25,7 @@
},
{
"path": "codex-hook.js",
- "sha256": "9a4f53b980521752f603c9a46de8001294c1b964a31f7945eb48ecdae4bf12ac"
+ "sha256": "6e054189fe9efc941916d3469f1342344aadc20215c91fa6209e2f98139d6ed5"
},
{
"path": "daemon-cli-path.d.ts",
diff --git a/plugins/omo/components/lsp/dist/cli.js b/plugins/omo/components/lsp/dist/cli.js
index 023064d9..4a1e4476 100644
--- a/plugins/omo/components/lsp/dist/cli.js
+++ b/plugins/omo/components/lsp/dist/cli.js
@@ -5958,7 +5958,11 @@ async function collectPostEditDiagnostics(input) {
observations.push({ filePath: result.filePath, kind: "not_configured" });
break;
case "block":
- blocks.push({ filePath: result.filePath, diagnostics: classification.diagnostics });
+ blocks.push({ filePath: result.filePath, diagnostics: classification.diagnostics, blocking: true });
+ observations.push({ filePath: result.filePath, kind: "block" });
+ break;
+ case "guidance":
+ blocks.push({ filePath: result.filePath, diagnostics: classification.text, blocking: false });
observations.push({ filePath: result.filePath, kind: "block" });
break;
default: {
@@ -6020,7 +6024,7 @@ function normalizeDiagnosticsOutcome(outcome) {
return outcome;
}
function classifyNotInstalled(guidance) {
- return guidance === undefined ? { kind: "not_installed" } : { kind: "block", diagnostics: guidance };
+ return guidance === undefined ? { kind: "not_installed" } : { kind: "guidance", text: guidance };
}
function normalizeDiagnosticsText(text) {
return text.trim();
@@ -6277,22 +6281,33 @@ async function runLspDiagnosticsText(filePath) {
return postEditOutcomeFromDaemonResult(result);
}
function postEditOutcomeFromDaemonResult(result) {
- const availability = notConfiguredAvailability(result.details);
- if (availability !== undefined)
- return { kind: "not_configured", extension: availability.extension };
- return result.content.map((block) => block.text).join(`
+ const text = result.content.map((block) => block.text).join(`
`);
+ const availability = availabilityDetails2(result.details);
+ if (availability === undefined)
+ return text;
+ if (availability["kind"] === "not_configured") {
+ const extension = availability["extension"];
+ return typeof extension === "string" && extension.length > 0 ? { kind: "not_configured", extension } : text;
+ }
+ if (availability["kind"] === "not_installed")
+ return notInstalledOutcome(availability, text) ?? text;
+ return text;
}
-function notConfiguredAvailability(details) {
+function availabilityDetails2(details) {
if (!isRecord11(details))
return;
const availability = details["availability"];
- if (!isRecord11(availability))
- return;
- if (availability["kind"] !== "not_configured")
+ return isRecord11(availability) ? availability : undefined;
+}
+function notInstalledOutcome(availability, text) {
+ const serverId = availability["serverId"];
+ const installDecisionTool = availability["installDecisionTool"];
+ if (typeof serverId !== "string" || serverId.length === 0 || typeof installDecisionTool !== "boolean")
return;
- const extension = availability["extension"];
- return typeof extension === "string" && extension.length > 0 ? { extension } : undefined;
+ const decision = availability["decision"];
+ const base = { kind: "not_installed", serverId, installDecisionTool, text };
+ return decision === "declined" || decision === "allowed" ? { ...base, decision } : base;
}
function codexLspRequestContext(env = process.env, cwd = process.cwd()) {
const canonicalCwd = realpathSync7(resolve11(cwd));
@@ -6320,14 +6335,13 @@ async function runLspPostToolUseHook(input, runDiagnostics = runLspDiagnosticsTe
`);
const reason = limitHookText(rawReason, hookFeedbackLimit(input.transcript_path));
- const output = {
- decision: "block",
- reason,
- hookSpecificOutput: {
- hookEventName: "PostToolUse",
- additionalContext: reason
- }
+ const context = {
+ hookSpecificOutput: { hookEventName: "PostToolUse", additionalContext: reason }
};
+ if (!blocks.some((block) => block.blocking))
+ return `${JSON.stringify(context)}
+`;
+ const output = { decision: "block", reason, ...context };
return `${JSON.stringify(output)}
`;
}
diff --git a/plugins/omo/components/lsp/dist/codex-hook.js b/plugins/omo/components/lsp/dist/codex-hook.js
index f5fdc2ee..1316488e 100644
--- a/plugins/omo/components/lsp/dist/codex-hook.js
+++ b/plugins/omo/components/lsp/dist/codex-hook.js
@@ -27,21 +27,32 @@ export async function runLspDiagnosticsText(filePath) {
return postEditOutcomeFromDaemonResult(result);
}
function postEditOutcomeFromDaemonResult(result) {
- const availability = notConfiguredAvailability(result.details);
- if (availability !== undefined)
- return { kind: "not_configured", extension: availability.extension };
- return result.content.map((block) => block.text).join("\n");
+ const text = result.content.map((block) => block.text).join("\n");
+ const availability = availabilityDetails(result.details);
+ if (availability === undefined)
+ return text;
+ if (availability["kind"] === "not_configured") {
+ const extension = availability["extension"];
+ return typeof extension === "string" && extension.length > 0 ? { kind: "not_configured", extension } : text;
+ }
+ if (availability["kind"] === "not_installed")
+ return notInstalledOutcome(availability, text) ?? text;
+ return text;
}
-function notConfiguredAvailability(details) {
+function availabilityDetails(details) {
if (!isRecord(details))
return undefined;
const availability = details["availability"];
- if (!isRecord(availability))
- return undefined;
- if (availability["kind"] !== "not_configured")
+ return isRecord(availability) ? availability : undefined;
+}
+function notInstalledOutcome(availability, text) {
+ const serverId = availability["serverId"];
+ const installDecisionTool = availability["installDecisionTool"];
+ if (typeof serverId !== "string" || serverId.length === 0 || typeof installDecisionTool !== "boolean")
return undefined;
- const extension = availability["extension"];
- return typeof extension === "string" && extension.length > 0 ? { extension } : undefined;
+ const decision = availability["decision"];
+ const base = { kind: "not_installed", serverId, installDecisionTool, text };
+ return decision === "declined" || decision === "allowed" ? { ...base, decision } : base;
}
export function codexLspRequestContext(env = process.env, cwd = process.cwd()) {
const canonicalCwd = realpathSync(resolve(cwd));
@@ -67,14 +78,13 @@ export async function runLspPostToolUseHook(input, runDiagnostics = runLspDiagno
return "";
const rawReason = blocks.map(formatDiagnosticBlock).join("\n\n");
const reason = limitHookText(rawReason, hookFeedbackLimit(input.transcript_path));
- const output = {
- decision: "block",
- reason,
- hookSpecificOutput: {
- hookEventName: "PostToolUse",
- additionalContext: reason,
- },
+ const context = {
+ hookSpecificOutput: { hookEventName: "PostToolUse", additionalContext: reason },
};
+ // Missing-server guidance alone is a note for the model; only real diagnostics block the edit.
+ if (!blocks.some((block) => block.blocking))
+ return `${JSON.stringify(context)}\n`;
+ const output = { decision: "block", reason, ...context };
return `${JSON.stringify(output)}\n`;
}
export async function runLspPostCompactHook(input) {
diff --git a/plugins/omo/components/lsp/hooks/hooks.json b/plugins/omo/components/lsp/hooks/hooks.json
index 24dbaa59..c538ce28 100644
--- a/plugins/omo/components/lsp/hooks/hooks.json
+++ b/plugins/omo/components/lsp/hooks/hooks.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
"timeout": 60,
- "statusMessage": "(OmO 5.1.13) Checking LSP Diagnostics"
+ "statusMessage": "(OmO 5.1.14) Checking LSP Diagnostics"
}
]
}
@@ -21,7 +21,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Resetting LSP Diagnostics Cache"
+ "statusMessage": "(OmO 5.1.14) Resetting LSP Diagnostics Cache"
}
]
}
diff --git a/plugins/omo/components/lsp/package.json b/plugins/omo/components/lsp/package.json
index 19d7bf9b..bede6eea 100644
--- a/plugins/omo/components/lsp/package.json
+++ b/plugins/omo/components/lsp/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-lsp",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/lsp/src/codex-hook.ts b/plugins/omo/components/lsp/src/codex-hook.ts
index 7e1346dd..509e9cdb 100644
--- a/plugins/omo/components/lsp/src/codex-hook.ts
+++ b/plugins/omo/components/lsp/src/codex-hook.ts
@@ -35,17 +35,21 @@ export interface CodexPostCompactInput {
interface DiagnosticBlock {
filePath: string;
diagnostics: string;
+ blocking: boolean;
}
-interface PostToolUseHookOutput {
- decision: "block";
- reason: string;
+interface PostToolUseHookContext {
hookSpecificOutput: {
hookEventName: "PostToolUse";
additionalContext: string;
};
}
+interface PostToolUseHookOutput extends PostToolUseHookContext {
+ decision: "block";
+ reason: string;
+}
+
const DIAGNOSTIC_START_PATTERN = /(?:error|warning|information|hint)\[[^\]\r\n]+\] \(\d+\) at \d+:\d+:/g;
const DIAGNOSTIC_CHUNK_PATTERN = /^(?:error|warning|information|hint)\[[^\]\r\n]+\] \(\d+\) at \d+:\d+:/;
const DEFAULT_MAX_HOOK_FEEDBACK_CHARS = 8000;
@@ -70,18 +74,34 @@ function postEditOutcomeFromDaemonResult(result: {
readonly content: readonly { readonly type: string; readonly text?: string }[];
readonly details?: unknown;
}): PostEditDiagnosticsOutcome {
- const availability = notConfiguredAvailability(result.details);
- if (availability !== undefined) return { kind: "not_configured", extension: availability.extension };
- return result.content.map((block) => block.text).join("\n");
+ const text = result.content.map((block) => block.text).join("\n");
+ const availability = availabilityDetails(result.details);
+ if (availability === undefined) return text;
+ if (availability["kind"] === "not_configured") {
+ const extension = availability["extension"];
+ return typeof extension === "string" && extension.length > 0 ? { kind: "not_configured", extension } : text;
+ }
+ if (availability["kind"] === "not_installed") return notInstalledOutcome(availability, text) ?? text;
+ return text;
}
-function notConfiguredAvailability(details: unknown): { readonly extension: string } | undefined {
+function availabilityDetails(details: unknown): Record<string, unknown> | undefined {
if (!isRecord(details)) return undefined;
const availability = details["availability"];
- if (!isRecord(availability)) return undefined;
- if (availability["kind"] !== "not_configured") return undefined;
- const extension = availability["extension"];
- return typeof extension === "string" && extension.length > 0 ? { extension } : undefined;
+ return isRecord(availability) ? availability : undefined;
+}
+
+function notInstalledOutcome(
+ availability: Record<string, unknown>,
+ text: string,
+): PostEditDiagnosticsOutcome | undefined {
+ const serverId = availability["serverId"];
+ const installDecisionTool = availability["installDecisionTool"];
+ if (typeof serverId !== "string" || serverId.length === 0 || typeof installDecisionTool !== "boolean")
+ return undefined;
+ const decision = availability["decision"];
+ const base = { kind: "not_installed", serverId, installDecisionTool, text } as const;
+ return decision === "declined" || decision === "allowed" ? { ...base, decision } : base;
}
export function codexLspRequestContext(
@@ -116,14 +136,12 @@ export async function runLspPostToolUseHook(
const rawReason = blocks.map(formatDiagnosticBlock).join("\n\n");
const reason = limitHookText(rawReason, hookFeedbackLimit(input.transcript_path));
- const output: PostToolUseHookOutput = {
- decision: "block",
- reason,
- hookSpecificOutput: {
- hookEventName: "PostToolUse",
- additionalContext: reason,
- },
+ const context: PostToolUseHookContext = {
+ hookSpecificOutput: { hookEventName: "PostToolUse", additionalContext: reason },
};
+ // Missing-server guidance alone is a note for the model; only real diagnostics block the edit.
+ if (!blocks.some((block) => block.blocking)) return `${JSON.stringify(context)}\n`;
+ const output: PostToolUseHookOutput = { decision: "block", reason, ...context };
return `${JSON.stringify(output)}\n`;
}
diff --git a/plugins/omo/components/lsp/test/codex-hook-not-installed.test.ts b/plugins/omo/components/lsp/test/codex-hook-not-installed.test.ts
new file mode 100644
index 00000000..7496bae6
--- /dev/null
+++ b/plugins/omo/components/lsp/test/codex-hook-not-installed.test.ts
@@ -0,0 +1,203 @@
+import { mkdtempSync, rmSync } from "node:fs";
+import { tmpdir } from "node:os";
+import path from "node:path";
+import { afterEach, describe, expect, it, vi } from "vitest";
+
+import { runLspPostToolUseHook } from "../src/codex-hook.js";
+
+interface DaemonResult {
+ readonly content: readonly { readonly type: string; readonly text?: string }[];
+ readonly details?: unknown;
+}
+
+const daemonResults = vi.hoisted(() => new Map<string, DaemonResult>());
+
+vi.mock("@code-yeongyu/lsp-daemon/client", async (importOriginal) => ({
+ ...(await importOriginal<Record<string, unknown>>()),
+ callDiagnosticsViaDaemon: async (filePath: string) => {
+ const result = daemonResults.get(filePath);
+ if (result === undefined) throw new Error(`unexpected diagnostics request for ${filePath}`);
+ return result;
+ },
+}));
+
+const UNDECIDED_TEXT = [
+ "LSP server 'biome' for .json, .jsonc is NOT INSTALLED.",
+ "",
+ "Command not found: biome",
+ "",
+ "To install, run:",
+ " npm install -g @biomejs/biome",
+].join("\n");
+const DECLINED_TEXT =
+ "LSP server 'biome' (.json, .jsonc) is NOT INSTALLED; user previously declined installation — proceed without LSP.";
+const TS_ERROR = "error[typescript] (2322) at 1:7: Type 'string' is not assignable to type 'number'.";
+
+const tempDirs: string[] = [];
+
+afterEach(() => {
+ daemonResults.clear();
+ for (const tempDir of tempDirs.splice(0)) rmSync(tempDir, { recursive: true, force: true });
+});
+
+describe("codex PostToolUse hook with a language server that is not installed", () => {
+ it("#given biome is not installed and the user has not decided #when a .json file is edited #then the install guidance is a note, not a block", async () => {
+ // given
+ daemonAnswering({ "config.json": biomeNotInstalled(null, UNDECIDED_TEXT) });
+
+ // when
+ const output = await withPluginData(() => runLspPostToolUseHook(editOf("s-undecided", "config.json")));
+
+ // then
+ const parsed = parseHookOutput(output);
+ expect(parsed["decision"]).toBeUndefined();
+ expect(parsed["reason"]).toBeUndefined();
+ expect(additionalContext(parsed)).toContain("npm install -g @biomejs/biome");
+ });
+
+ it("#given the user declined biome #when a .json file is edited #then the hook does not block", async () => {
+ // given
+ daemonAnswering({ "config.json": biomeNotInstalled("declined", DECLINED_TEXT) });
+
+ // when
+ const output = await withPluginData(() => runLspPostToolUseHook(editOf("s-declined", "config.json")));
+
+ // then
+ const parsed = parseHookOutput(output);
+ expect(parsed["decision"]).toBeUndefined();
+ expect(additionalContext(parsed)).toContain("proceed without LSP");
+ });
+
+ it("#given biome is not installed #when the same session edits .json twice #then neither edit is blocked", async () => {
+ // given
+ daemonAnswering({ "config.json": biomeNotInstalled(null, UNDECIDED_TEXT) });
+
+ // when
+ const outputs = await withPluginData(async () => [
+ await runLspPostToolUseHook(editOf("s-repeat", "config.json")),
+ await runLspPostToolUseHook(editOf("s-repeat", "config.json")),
+ ]);
+
+ // then
+ for (const output of outputs) expect(parseHookOutput(output)["decision"]).toBeUndefined();
+ });
+
+ it("#given one edit touches a .json without biome and a .ts with a type error #when the hook runs #then the type error still blocks", async () => {
+ // given
+ daemonAnswering({
+ "config.json": biomeNotInstalled(null, UNDECIDED_TEXT),
+ "src/value.ts": diagnosticsText(TS_ERROR),
+ });
+
+ // when
+ const output = await withPluginData(() =>
+ runLspPostToolUseHook(patchOf("s-mixed", ["config.json", "src/value.ts"])),
+ );
+
+ // then
+ const parsed = parseHookOutput(output);
+ expect(parsed["decision"]).toBe("block");
+ expect(parsed["reason"]).toContain(TS_ERROR);
+ });
+
+ it("#given only a real type error #when a .ts file is edited #then the hook blocks with the diagnostic", async () => {
+ // given
+ daemonAnswering({ "src/value.ts": diagnosticsText(TS_ERROR) });
+
+ // when
+ const output = await withPluginData(() => runLspPostToolUseHook(editOf("s-real", "src/value.ts")));
+
+ // then
+ const parsed = parseHookOutput(output);
+ expect(parsed["decision"]).toBe("block");
+ expect(parsed["reason"]).toContain(TS_ERROR);
+ });
+});
+
+function daemonAnswering(results: Readonly<Record<string, DaemonResult>>): void {
+ for (const [filePath, result] of Object.entries(results)) daemonResults.set(filePath, result);
+}
+
+function biomeNotInstalled(decision: "declined" | null, text: string): DaemonResult {
+ return {
+ content: [{ type: "text", text }],
+ details: {
+ error: text,
+ errorKind: "missing_dependency",
+ availability: {
+ kind: "not_installed",
+ serverId: "biome",
+ command: ["biome", "lsp-proxy"],
+ extensions: [".json", ".jsonc"],
+ installHint: "npm install -g @biomejs/biome",
+ installDecisionTool: true,
+ installDecisionsPath: "/codex-home/lsp-install-decisions.json",
+ decision,
+ },
+ },
+ };
+}
+
+function diagnosticsText(text: string): DaemonResult {
+ return { content: [{ type: "text", text }] };
+}
+
+function editOf(sessionId: string, filePath: string) {
+ return hookInput(sessionId, "write", { path: filePath });
+}
+
+function patchOf(sessionId: string, filePaths: readonly string[]) {
+ const command = [
+ "*** Begin Patch",
+ ...filePaths.flatMap((file) => [`*** Update File: ${file}`, "@@", "-a", "+b"]),
+ "*** End Patch",
+ ];
+ return hookInput(sessionId, "apply_patch", { command: command.join("\n") });
+}
+
+function hookInput(sessionId: string, toolName: string, toolInput: Record<string, unknown>) {
+ return {
+ cwd: "/repo",
+ hook_event_name: "PostToolUse",
+ model: "gpt-5.5",
+ permission_mode: "default",
+ session_id: sessionId,
+ tool_input: toolInput,
+ tool_name: toolName,
+ tool_response: { ok: true },
+ tool_use_id: "tool-use-1",
+ transcript_path: null,
+ turn_id: "turn-1",
+ };
+}
+
+async function withPluginData<T>(fn: () => Promise<T>): Promise<T> {
+ const pluginData = mkdtempSync(path.join(tmpdir(), "codex-lsp-not-installed-"));
+ tempDirs.push(pluginData);
+ const previous = process.env["PLUGIN_DATA"];
+ process.env["PLUGIN_DATA"] = pluginData;
+ try {
+ return await fn();
+ } finally {
+ if (previous === undefined) delete process.env["PLUGIN_DATA"];
+ else process.env["PLUGIN_DATA"] = previous;
+ }
+}
+
+function parseHookOutput(output: string): Record<string, unknown> {
+ expect(output).not.toBe("");
+ const parsed: unknown = JSON.parse(output);
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
+ throw new Error(`hook output is not an object: ${output}`);
+ return { ...parsed };
+}
+
+function additionalContext(parsed: Record<string, unknown>): string {
+ const specific = parsed["hookSpecificOutput"];
+ if (typeof specific !== "object" || specific === null) throw new Error("hookSpecificOutput missing");
+ const context = Reflect.get(specific, "additionalContext");
+ const eventName = Reflect.get(specific, "hookEventName");
+ expect(eventName).toBe("PostToolUse");
+ if (typeof context !== "string") throw new Error("additionalContext missing");
+ return context;
+}
diff --git a/plugins/omo/components/rules/CHANGELOG.md b/plugins/omo/components/rules/CHANGELOG.md
index ae8f598c..2fe6b236 100644
--- a/plugins/omo/components/rules/CHANGELOG.md
+++ b/plugins/omo/components/rules/CHANGELOG.md
@@ -2,6 +2,7 @@
## Unreleased
+- Align the Hephaestus GPT-6 rule's delegation paragraph with the senpi GPT-6 preset (oh-my-openagent#9499): reading, lookups and own-change checks stay in the session however many calls they take; a subagent is for a track that runs beside the session's own and lands the task sooner.
- Restrict the default `PostToolUse` hook matcher to Codex's canonical `apply_patch` tool name.
- Add opt-in `NODE_DEBUG=codex-rules` phase timing logs for `PostToolUse` debugging.
- Harden dynamic hook coverage for additional-context JSON output, disabled/static modes, failed tool responses, and duplicate suppression.
diff --git a/plugins/omo/components/rules/bundled-rules/hephaestus/gpt-6.md b/plugins/omo/components/rules/bundled-rules/hephaestus/gpt-6.md
index 4983dc0f..c5d852f2 100644
--- a/plugins/omo/components/rules/bundled-rules/hephaestus/gpt-6.md
+++ b/plugins/omo/components/rules/bundled-rules/hephaestus/gpt-6.md
@@ -37,7 +37,7 @@ Use direct calls when batching buys nothing: a lone call, an already-small resul
Memory of file contents is unreliable: read before claiming and re-read before editing or accepting a hand-off. Where LSP tools exist, use them for definitions, callers, rename impact, workspace symbols, and diagnostics on touched files. Text search is for literal strings, filenames, and commit history. Stop searching once a wave answers the question or two waves add nothing new. A finding that looks too simple deserves one more layer of callers or dependencies; prefer the root fix over the symptom.
-Do the work yourself by default. Whatever closes in a handful of calls is yours, and a follow-up on delegated work is yours to take back, not forward. Only a sizeable track independent of your own earns a subagent. Spawn those tracks together in the background, each brief stating its output, allowed edit paths, observable stop condition, and evidence to return. Do non-overlapping work while they run, then check their evidence and integrate the results. Never duplicate a running search. Agent messages and final answers are read by people: full sentences, proper spaces between words and numbers, no private shorthand. Concrete spawn contracts are below.
+Do the work yourself by default: reading, lookups, and checks on your own change are yours however many calls they take, and a follow-up on delegated work is yours to take back, not forward. A subagent is for a track that runs beside yours and lands the task sooner - a wide investigation across many files, or an implementation unit beyond one coherent edit in files you are not touching. Spawn those tracks together in the background, each brief naming its output, allowed edit paths, stop condition, and returned evidence. Do non-overlapping work while they run, then check their evidence and integrate the results. Never duplicate a running search. Agent messages and final answers are read by people: full sentences, proper spaces between words and numbers, no private shorthand. Concrete spawn contracts are below.
Use `update_plan` for multi-step work, uncertain scope, multiple files, or branching investigation. Cut items into the smallest standalone outcomes, each pairing an edit with its proof. A one-step ask carries no list. Keep exactly one item `in_progress`; move each item the instant it opens, finishes, is discovered and appended, or is abandoned and removed. Update the plan in the same response when discovery changes it. Before ending, reconcile every item as completed, blocked with a reason, or removed with a reason. Commit follow-up work to the plan only if you will do it now.
diff --git a/plugins/omo/components/rules/hooks/hooks.json b/plugins/omo/components/rules/hooks/hooks.json
index 724f6e57..ce4aebd5 100644
--- a/plugins/omo/components/rules/hooks/hooks.json
+++ b/plugins/omo/components/rules/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Loading Project Rules"
+ "statusMessage": "(OmO 5.1.14) Loading Project Rules"
}
]
}
@@ -19,7 +19,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Loading Project Rules"
+ "statusMessage": "(OmO 5.1.14) Loading Project Rules"
}
]
}
@@ -32,7 +32,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Matching Project Rules"
+ "statusMessage": "(OmO 5.1.14) Matching Project Rules"
}
]
}
@@ -45,7 +45,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Resetting Project Rule Cache"
+ "statusMessage": "(OmO 5.1.14) Resetting Project Rule Cache"
}
]
}
diff --git a/plugins/omo/components/rules/package.json b/plugins/omo/components/rules/package.json
index e3877f4b..b214906e 100644
--- a/plugins/omo/components/rules/package.json
+++ b/plugins/omo/components/rules/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-rules",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex plugin that injects project rule files into model context through lifecycle hooks.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/teammode/hooks/hooks.json b/plugins/omo/components/teammode/hooks/hooks.json
index 169ed784..55571dce 100644
--- a/plugins/omo/components/teammode/hooks/hooks.json
+++ b/plugins/omo/components/teammode/hooks/hooks.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Checking Thread Title Hygiene"
+ "statusMessage": "(OmO 5.1.14) Checking Thread Title Hygiene"
}
]
}
diff --git a/plugins/omo/components/teammode/package.json b/plugins/omo/components/teammode/package.json
index 6e60d9c6..86fa0ccd 100644
--- a/plugins/omo/components/teammode/package.json
+++ b/plugins/omo/components/teammode/package.json
@@ -1,6 +1,6 @@
{
"name": "@sisyphuslabs/codex-teammode",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex team-mode hook component that keeps background thread titles descriptive after create_thread.",
"type": "module",
"private": true,
diff --git a/plugins/omo/components/telemetry/hooks/hooks.json b/plugins/omo/components/telemetry/hooks/hooks.json
index f6dd1527..f90d83f1 100644
--- a/plugins/omo/components/telemetry/hooks/hooks.json
+++ b/plugins/omo/components/telemetry/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Recording Session Telemetry"
+ "statusMessage": "(OmO 5.1.14) Recording Session Telemetry"
}
]
}
diff --git a/plugins/omo/components/telemetry/package.json b/plugins/omo/components/telemetry/package.json
index a9453387..deedcd86 100644
--- a/plugins/omo/components/telemetry/package.json
+++ b/plugins/omo/components/telemetry/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-telemetry",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex plugin component that emits omo-codex anonymous daily-active telemetry on SessionStart.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/ultrawork/hooks/hooks.json b/plugins/omo/components/ultrawork/hooks/hooks.json
index b814876b..c721bba2 100644
--- a/plugins/omo/components/ultrawork/hooks/hooks.json
+++ b/plugins/omo/components/ultrawork/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Checking Ultrawork Trigger"
+ "statusMessage": "(OmO 5.1.14) Checking Ultrawork Trigger"
}
]
}
diff --git a/plugins/omo/components/ultrawork/package.json b/plugins/omo/components/ultrawork/package.json
index 93489c34..f6648b14 100644
--- a/plugins/omo/components/ultrawork/package.json
+++ b/plugins/omo/components/ultrawork/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-ultrawork",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex plugin that injects the ultrawork orchestration directive and ships LazyCodex planning, review, QA, and gate agent roles.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/ulw-execute-continuation/hooks/hooks.json b/plugins/omo/components/ulw-execute-continuation/hooks/hooks.json
index cc9ecf15..5e12c792 100644
--- a/plugins/omo/components/ulw-execute-continuation/hooks/hooks.json
+++ b/plugins/omo/components/ulw-execute-continuation/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-execute-continuation/dist/cli.js\" hook stop",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Checking Ulw-Execute Continuation"
+ "statusMessage": "(OmO 5.1.14) Checking Ulw-Execute Continuation"
}
]
}
diff --git a/plugins/omo/components/ulw-execute-continuation/package.json b/plugins/omo/components/ulw-execute-continuation/package.json
index e42473c2..11f90b44 100644
--- a/plugins/omo/components/ulw-execute-continuation/package.json
+++ b/plugins/omo/components/ulw-execute-continuation/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-ulw-execute-continuation",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex Stop hook continuation injector for omo-codex ulw-execute plans.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/ulw-loop/hooks/hooks.json b/plugins/omo/components/ulw-loop/hooks/hooks.json
index d2cee8cf..8f9a993c 100644
--- a/plugins/omo/components/ulw-loop/hooks/hooks.json
+++ b/plugins/omo/components/ulw-loop/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit --with-ultrawork",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Checking Ulw-Loop Steering"
+ "statusMessage": "(OmO 5.1.14) Checking Ulw-Loop Steering"
}
]
}
@@ -20,7 +20,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use-spawn",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Recording Spawn Admission"
+ "statusMessage": "(OmO 5.1.14) Recording Spawn Admission"
}
]
}
@@ -33,7 +33,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Enforcing Unlimited Ulw-Loop Budget"
+ "statusMessage": "(OmO 5.1.14) Enforcing Unlimited Ulw-Loop Budget"
}
]
},
@@ -44,7 +44,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use-spawn",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Guarding Ulw-Loop Spawns"
+ "statusMessage": "(OmO 5.1.14) Guarding Ulw-Loop Spawns"
}
]
}
@@ -56,7 +56,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook stop",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Checking Ulw-Loop Resume"
+ "statusMessage": "(OmO 5.1.14) Checking Ulw-Loop Resume"
}
]
}
diff --git a/plugins/omo/components/ulw-loop/package.json b/plugins/omo/components/ulw-loop/package.json
index 460934ce..ec41b5b9 100644
--- a/plugins/omo/components/ulw-loop/package.json
+++ b/plugins/omo/components/ulw-loop/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-ulw-loop",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Codex plugin: durable repo-native multi-goal orchestration with embedded success criteria and observable evidence audit.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/dist/cli-node/index.js b/plugins/omo/dist/cli-node/index.js
index 54ae547c..daff27ab 100755
--- a/plugins/omo/dist/cli-node/index.js
+++ b/plugins/omo/dist/cli-node/index.js
@@ -65,7 +65,7 @@ var package_default;
var init_package = __esm(() => {
package_default = {
name: "oh-my-opencode",
- version: "5.1.13",
+ version: "5.1.14",
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
main: "./dist/index.js",
types: "dist/index.d.ts",
@@ -242,7 +242,7 @@ var init_package = __esm(() => {
},
devDependencies: {
"@clack/prompts": "^1.8.1",
- "@code-yeongyu/senpi": "2026.10.3",
+ "@code-yeongyu/senpi": "2026.10.5",
"@modelcontextprotocol/sdk": "^1.30.0",
"@oh-my-opencode/agents-md-core": "workspace:*",
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
@@ -300,18 +300,18 @@ var init_package = __esm(() => {
typescript: "^7.0.2"
},
optionalDependencies: {
- "oh-my-opencode-darwin-arm64": "5.1.13",
- "oh-my-opencode-darwin-x64": "5.1.13",
- "oh-my-opencode-darwin-x64-baseline": "5.1.13",
- "oh-my-opencode-linux-arm64": "5.1.13",
- "oh-my-opencode-linux-arm64-musl": "5.1.13",
- "oh-my-opencode-linux-x64": "5.1.13",
- "oh-my-opencode-linux-x64-baseline": "5.1.13",
- "oh-my-opencode-linux-x64-musl": "5.1.13",
- "oh-my-opencode-linux-x64-musl-baseline": "5.1.13",
- "oh-my-opencode-windows-arm64": "5.1.13",
- "oh-my-opencode-windows-x64": "5.1.13",
- "oh-my-opencode-windows-x64-baseline": "5.1.13"
+ "oh-my-opencode-darwin-arm64": "5.1.14",
+ "oh-my-opencode-darwin-x64": "5.1.14",
+ "oh-my-opencode-darwin-x64-baseline": "5.1.14",
+ "oh-my-opencode-linux-arm64": "5.1.14",
+ "oh-my-opencode-linux-arm64-musl": "5.1.14",
+ "oh-my-opencode-linux-x64": "5.1.14",
+ "oh-my-opencode-linux-x64-baseline": "5.1.14",
+ "oh-my-opencode-linux-x64-musl": "5.1.14",
+ "oh-my-opencode-linux-x64-musl-baseline": "5.1.14",
+ "oh-my-opencode-windows-arm64": "5.1.14",
+ "oh-my-opencode-windows-x64": "5.1.14",
+ "oh-my-opencode-windows-x64-baseline": "5.1.14"
},
overrides: {
hono: "^4.13.8",
@@ -9494,7 +9494,7 @@ You are working on tasks that don't fit specific categories but require moderate
</Category_Context>`, UNSPECIFIED_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits, effort is moderate, and scope stays within a few files/modules. Prefer any matching specialist category.</Selection_Gate>
<Caller_Warning>Provide explicit must-do steps, forbidden scope, and concrete success criteria.</Caller_Warning>`, UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on tasks that don't fit specific categories but require substantial effort.
-</Category_Context>`, UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits and substantial effort spans systems/modules with broad impact. Use unspecified-low for contained moderate work.</Selection_Gate>`, DEEP_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Route here when one subsystem plus its callers holds the mechanism and the evidence, once read, leaves one right answer. Wide but mechanical work belongs here or in a quick batch. When unsure, choose deep-low: a misrouted child returns \`ESCALATE: deep-high\` after one cheap attempt; re-spawn the same brief as deep-high with its findings.</Selection_Gate>`, DEEP_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Route here only when you can name the decision evidence cannot settle: a trade-off with no single right answer, a contract change crossing a package or process boundary, a mechanism with no in-repo pattern to copy, or correctness argued from invariants rather than observed in a test. Wide scope with easy decisions is deep-low or unspecified-high; reasoning as the deliverable is ultrabrain.</Selection_Gate>`, DEEP_LOW_GATE_MODELS, DEEP_HIGH_GATE_MODEL = "gpt-6-astra", OPENAI_CATEGORIES;
+</Category_Context>`, UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits and substantial effort spans systems/modules with broad impact. Use unspecified-low for contained moderate work.</Selection_Gate>`, DEEP_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Of the two deep lanes this is the default: the child settles its decisions from what it reads. When unsure, choose deep-low; a misrouted child returns \`ESCALATE: deep-high\` after one cheap attempt, and you re-spawn the same brief as deep-high with its findings.</Selection_Gate>`, DEEP_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Route here only when you can name the decision evidence cannot settle: a trade-off with no single right answer, a contract change crossing a package or process boundary, a mechanism with no in-repo pattern to copy, or correctness argued from invariants rather than observed in a test. Wide scope with easy decisions is deep-low or unspecified-high; reasoning as the deliverable is ultrabrain.</Selection_Gate>`, DEEP_LOW_GATE_MODELS, DEEP_HIGH_GATE_MODEL = "gpt-6-astra", OPENAI_CATEGORIES;
var init_openai_categories = __esm(() => {
init_types();
DEEP_LOW_GATE_MODELS = ["gpt-6.1-sol", "gpt-6.1-sol-fast", "gpt-5.6-sol-fast", "gpt-5.6-sol"];
@@ -9509,7 +9509,7 @@ var init_openai_categories = __esm(() => {
{
name: "deep-low",
config: { model: "openai/gpt-6.1-sol", variant: "medium" },
- description: "Default deep lane: one goal, one deliverable, decisions the child can settle from what it reads. **3D graphics, computer/browser use, CAPTCHA, multimodal, backend, logic, and algorithm work is routed here.** Multiple goals fan out as parallel calls.",
+ description: "Default deep lane: one goal, one deliverable, decisions the child can settle from what it reads; preferred over deep-high for 3D graphics, computer/browser use, CAPTCHA, multimodal, backend, logic, and algorithm work. Multiple goals fan out as parallel calls.",
callerGuidance: DEEP_LOW_CATEGORY_CALLER_GUIDANCE,
promptAppend: DEEP_LOW_CATEGORY_PROMPT_APPEND,
resolvePromptAppend: resolveDeepLowCategoryPromptAppend,
@@ -89448,7 +89448,7 @@ var package_default2;
var init_package2 = __esm(() => {
package_default2 = {
name: "@oh-my-opencode/omo-codex",
- version: "5.1.13",
+ version: "5.1.14",
type: "module",
private: true,
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
diff --git a/plugins/omo/dist/cli/index.js b/plugins/omo/dist/cli/index.js
index f625399f..feb5fcf8 100755
--- a/plugins/omo/dist/cli/index.js
+++ b/plugins/omo/dist/cli/index.js
@@ -64,7 +64,7 @@ var package_default;
var init_package = __esm(() => {
package_default = {
name: "oh-my-opencode",
- version: "5.1.13",
+ version: "5.1.14",
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
main: "./dist/index.js",
types: "dist/index.d.ts",
@@ -241,7 +241,7 @@ var init_package = __esm(() => {
},
devDependencies: {
"@clack/prompts": "^1.8.1",
- "@code-yeongyu/senpi": "2026.10.3",
+ "@code-yeongyu/senpi": "2026.10.5",
"@modelcontextprotocol/sdk": "^1.30.0",
"@oh-my-opencode/agents-md-core": "workspace:*",
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
@@ -299,18 +299,18 @@ var init_package = __esm(() => {
typescript: "^7.0.2"
},
optionalDependencies: {
- "oh-my-opencode-darwin-arm64": "5.1.13",
- "oh-my-opencode-darwin-x64": "5.1.13",
- "oh-my-opencode-darwin-x64-baseline": "5.1.13",
- "oh-my-opencode-linux-arm64": "5.1.13",
- "oh-my-opencode-linux-arm64-musl": "5.1.13",
- "oh-my-opencode-linux-x64": "5.1.13",
- "oh-my-opencode-linux-x64-baseline": "5.1.13",
- "oh-my-opencode-linux-x64-musl": "5.1.13",
- "oh-my-opencode-linux-x64-musl-baseline": "5.1.13",
- "oh-my-opencode-windows-arm64": "5.1.13",
- "oh-my-opencode-windows-x64": "5.1.13",
- "oh-my-opencode-windows-x64-baseline": "5.1.13"
+ "oh-my-opencode-darwin-arm64": "5.1.14",
+ "oh-my-opencode-darwin-x64": "5.1.14",
+ "oh-my-opencode-darwin-x64-baseline": "5.1.14",
+ "oh-my-opencode-linux-arm64": "5.1.14",
+ "oh-my-opencode-linux-arm64-musl": "5.1.14",
+ "oh-my-opencode-linux-x64": "5.1.14",
+ "oh-my-opencode-linux-x64-baseline": "5.1.14",
+ "oh-my-opencode-linux-x64-musl": "5.1.14",
+ "oh-my-opencode-linux-x64-musl-baseline": "5.1.14",
+ "oh-my-opencode-windows-arm64": "5.1.14",
+ "oh-my-opencode-windows-x64": "5.1.14",
+ "oh-my-opencode-windows-x64-baseline": "5.1.14"
},
overrides: {
hono: "^4.13.8",
@@ -9493,7 +9493,7 @@ You are working on tasks that don't fit specific categories but require moderate
</Category_Context>`, UNSPECIFIED_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits, effort is moderate, and scope stays within a few files/modules. Prefer any matching specialist category.</Selection_Gate>
<Caller_Warning>Provide explicit must-do steps, forbidden scope, and concrete success criteria.</Caller_Warning>`, UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on tasks that don't fit specific categories but require substantial effort.
-</Category_Context>`, UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits and substantial effort spans systems/modules with broad impact. Use unspecified-low for contained moderate work.</Selection_Gate>`, DEEP_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Route here when one subsystem plus its callers holds the mechanism and the evidence, once read, leaves one right answer. Wide but mechanical work belongs here or in a quick batch. When unsure, choose deep-low: a misrouted child returns \`ESCALATE: deep-high\` after one cheap attempt; re-spawn the same brief as deep-high with its findings.</Selection_Gate>`, DEEP_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Route here only when you can name the decision evidence cannot settle: a trade-off with no single right answer, a contract change crossing a package or process boundary, a mechanism with no in-repo pattern to copy, or correctness argued from invariants rather than observed in a test. Wide scope with easy decisions is deep-low or unspecified-high; reasoning as the deliverable is ultrabrain.</Selection_Gate>`, DEEP_LOW_GATE_MODELS, DEEP_HIGH_GATE_MODEL = "gpt-6-astra", OPENAI_CATEGORIES;
+</Category_Context>`, UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits and substantial effort spans systems/modules with broad impact. Use unspecified-low for contained moderate work.</Selection_Gate>`, DEEP_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Of the two deep lanes this is the default: the child settles its decisions from what it reads. When unsure, choose deep-low; a misrouted child returns \`ESCALATE: deep-high\` after one cheap attempt, and you re-spawn the same brief as deep-high with its findings.</Selection_Gate>`, DEEP_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Route here only when you can name the decision evidence cannot settle: a trade-off with no single right answer, a contract change crossing a package or process boundary, a mechanism with no in-repo pattern to copy, or correctness argued from invariants rather than observed in a test. Wide scope with easy decisions is deep-low or unspecified-high; reasoning as the deliverable is ultrabrain.</Selection_Gate>`, DEEP_LOW_GATE_MODELS, DEEP_HIGH_GATE_MODEL = "gpt-6-astra", OPENAI_CATEGORIES;
var init_openai_categories = __esm(() => {
init_types();
DEEP_LOW_GATE_MODELS = ["gpt-6.1-sol", "gpt-6.1-sol-fast", "gpt-5.6-sol-fast", "gpt-5.6-sol"];
@@ -9508,7 +9508,7 @@ var init_openai_categories = __esm(() => {
{
name: "deep-low",
config: { model: "openai/gpt-6.1-sol", variant: "medium" },
- description: "Default deep lane: one goal, one deliverable, decisions the child can settle from what it reads. **3D graphics, computer/browser use, CAPTCHA, multimodal, backend, logic, and algorithm work is routed here.** Multiple goals fan out as parallel calls.",
+ description: "Default deep lane: one goal, one deliverable, decisions the child can settle from what it reads; preferred over deep-high for 3D graphics, computer/browser use, CAPTCHA, multimodal, backend, logic, and algorithm work. Multiple goals fan out as parallel calls.",
callerGuidance: DEEP_LOW_CATEGORY_CALLER_GUIDANCE,
promptAppend: DEEP_LOW_CATEGORY_PROMPT_APPEND,
resolvePromptAppend: resolveDeepLowCategoryPromptAppend,
@@ -89369,7 +89369,7 @@ var package_default2;
var init_package2 = __esm(() => {
package_default2 = {
name: "@oh-my-opencode/omo-codex",
- version: "5.1.13",
+ version: "5.1.14",
type: "module",
private: true,
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
diff --git a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json
index 6a2467bb..5477ac94 100644
--- a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json
+++ b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Resetting Git Bash MCP Reminder",
+ "statusMessage": "(OmO 5.1.14) Resetting Git Bash MCP Reminder",
"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"
}
],
diff --git a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json
index b7ad6452..2f60cb09 100644
--- a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json
+++ b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Resetting LSP Diagnostics Cache",
+ "statusMessage": "(OmO 5.1.14) Resetting LSP Diagnostics Cache",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-compact"
}
],
diff --git a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json
index d2f89c73..4b67d6eb 100644
--- a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json
+++ b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-compact",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Resetting Project Rule Cache",
+ "statusMessage": "(OmO 5.1.14) Resetting Project Rule Cache",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-compact"
}
],
diff --git a/plugins/omo/hooks/post-tool-use-checking-comments.json b/plugins/omo/hooks/post-tool-use-checking-comments.json
index dc5dc052..11269332 100644
--- a/plugins/omo/hooks/post-tool-use-checking-comments.json
+++ b/plugins/omo/hooks/post-tool-use-checking-comments.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/comment-checker/dist/cli.js\" hook post-tool-use",
"timeout": 30,
- "statusMessage": "(OmO 5.1.13) Checking Comments",
+ "statusMessage": "(OmO 5.1.14) Checking Comments",
"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"
}
],
diff --git a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json
index 420da3c7..7426bff2 100644
--- a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json
+++ b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-tool-use",
"timeout": 60,
- "statusMessage": "(OmO 5.1.13) Checking LSP Diagnostics",
+ "statusMessage": "(OmO 5.1.14) Checking LSP Diagnostics",
"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"
}
],
diff --git a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json
index aa72101c..10418a57 100644
--- a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json
+++ b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/teammode/dist/cli.js\" hook post-tool-use",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Checking Thread Title Hygiene",
+ "statusMessage": "(OmO 5.1.14) Checking Thread Title Hygiene",
"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"
}
]
diff --git a/plugins/omo/hooks/post-tool-use-matching-project-rules.json b/plugins/omo/hooks/post-tool-use-matching-project-rules.json
index 2e18907f..ded91916 100644
--- a/plugins/omo/hooks/post-tool-use-matching-project-rules.json
+++ b/plugins/omo/hooks/post-tool-use-matching-project-rules.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-tool-use",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Matching Project Rules",
+ "statusMessage": "(OmO 5.1.14) Matching Project Rules",
"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"
}
],
diff --git a/plugins/omo/hooks/post-tool-use-recording-spawn-admission.json b/plugins/omo/hooks/post-tool-use-recording-spawn-admission.json
index 7765c476..a02a249e 100644
--- a/plugins/omo/hooks/post-tool-use-recording-spawn-admission.json
+++ b/plugins/omo/hooks/post-tool-use-recording-spawn-admission.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook post-tool-use-spawn",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Recording Spawn Admission",
+ "statusMessage": "(OmO 5.1.14) Recording Spawn Admission",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook post-tool-use-spawn"
}
]
diff --git a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json
index ba50b733..f27ad5e5 100644
--- a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json
+++ b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Enforcing Unlimited Goal Budget",
+ "statusMessage": "(OmO 5.1.14) Enforcing Unlimited Goal Budget",
"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"
}
],
diff --git a/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json b/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json
index 094228ae..ce1bbe6a 100644
--- a/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json
+++ b/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use-spawn",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Guarding Ulw-Loop Spawns",
+ "statusMessage": "(OmO 5.1.14) Guarding Ulw-Loop Spawns",
"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"
}
]
diff --git a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json
index f933858d..d158a1be 100644
--- a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json
+++ b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Recommending Git Bash MCP",
+ "statusMessage": "(OmO 5.1.14) Recommending Git Bash MCP",
"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"
}
],
diff --git a/plugins/omo/hooks/session-start-checking-auto-update.json b/plugins/omo/hooks/session-start-checking-auto-update.json
index 96b6abc2..059c6b79 100644
--- a/plugins/omo/hooks/session-start-checking-auto-update.json
+++ b/plugins/omo/hooks/session-start-checking-auto-update.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/scripts/auto-update.mjs\" hook session-start",
"timeout": 15,
- "statusMessage": "(OmO 5.1.13) Checking Auto Update",
+ "statusMessage": "(OmO 5.1.14) Checking Auto Update",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\scripts\\auto-update.mjs\" hook session-start"
}
],
diff --git a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json
index 05dc963a..fc594c36 100644
--- a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json
+++ b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json
@@ -8,7 +8,7 @@
"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
"timeout": 30,
- "statusMessage": "(OmO 5.1.13) Checking Bootstrap Provisioning"
+ "statusMessage": "(OmO 5.1.14) Checking Bootstrap Provisioning"
}
]
}
diff --git a/plugins/omo/hooks/session-start-loading-project-rules.json b/plugins/omo/hooks/session-start-loading-project-rules.json
index 7aaedf28..8d05064d 100644
--- a/plugins/omo/hooks/session-start-loading-project-rules.json
+++ b/plugins/omo/hooks/session-start-loading-project-rules.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook session-start",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Loading Project Rules",
+ "statusMessage": "(OmO 5.1.14) Loading Project Rules",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook session-start"
}
]
diff --git a/plugins/omo/hooks/session-start-recording-session-telemetry.json b/plugins/omo/hooks/session-start-recording-session-telemetry.json
index 35dbde72..42807cf9 100644
--- a/plugins/omo/hooks/session-start-recording-session-telemetry.json
+++ b/plugins/omo/hooks/session-start-recording-session-telemetry.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/telemetry/dist/cli.js\" hook session-start",
"timeout": 15,
- "statusMessage": "(OmO 5.1.13) Recording Session Telemetry",
+ "statusMessage": "(OmO 5.1.14) Recording Session Telemetry",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\telemetry\\dist\\cli.js\" hook session-start"
}
]
diff --git a/plugins/omo/hooks/stop-checking-ulw-execute-continuation.json b/plugins/omo/hooks/stop-checking-ulw-execute-continuation.json
index 884cd12f..d4575a9a 100644
--- a/plugins/omo/hooks/stop-checking-ulw-execute-continuation.json
+++ b/plugins/omo/hooks/stop-checking-ulw-execute-continuation.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-execute-continuation/dist/cli.js\" hook stop",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Checking Ulw-Execute Continuation",
+ "statusMessage": "(OmO 5.1.14) Checking Ulw-Execute Continuation",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-execute-continuation\\dist\\cli.js\" hook stop"
}
]
diff --git a/plugins/omo/hooks/stop-checking-ulw-loop-resume.json b/plugins/omo/hooks/stop-checking-ulw-loop-resume.json
index 7a91aa07..cc39b936 100644
--- a/plugins/omo/hooks/stop-checking-ulw-loop-resume.json
+++ b/plugins/omo/hooks/stop-checking-ulw-loop-resume.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook stop",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Checking Ulw-Loop Resume",
+ "statusMessage": "(OmO 5.1.14) Checking Ulw-Loop Resume",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook stop"
}
]
diff --git a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json
index b0f0e9aa..908c75c6 100644
--- a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json
+++ b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Verifying LazyCodex Executor Evidence",
+ "statusMessage": "(OmO 5.1.14) Verifying LazyCodex Executor Evidence",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lazycodex-executor-verify\\dist\\cli.js\" hook subagent-stop"
}
],
diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json
index 6edca3a2..abfaed7f 100644
--- a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json
+++ b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ultrawork/dist/cli.js\" hook user-prompt-submit",
"timeout": 5,
- "statusMessage": "(OmO 5.1.13) Checking Ultrawork Trigger",
+ "statusMessage": "(OmO 5.1.14) Checking Ultrawork Trigger",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ultrawork\\dist\\cli.js\" hook user-prompt-submit"
}
]
diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json
index e0aaf52b..c0c1b198 100644
--- a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json
+++ b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook user-prompt-submit",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Checking Ulw-Loop Steering",
+ "statusMessage": "(OmO 5.1.14) Checking Ulw-Loop Steering",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook user-prompt-submit"
}
]
diff --git a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json
index f2639b2a..e59cecd5 100644
--- a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json
+++ b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook user-prompt-submit",
"timeout": 10,
- "statusMessage": "(OmO 5.1.13) Loading Project Rules",
+ "statusMessage": "(OmO 5.1.14) Loading Project Rules",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook user-prompt-submit"
}
]
diff --git a/plugins/omo/package-lock.json b/plugins/omo/package-lock.json
index 799b3387..a95ef290 100644
--- a/plugins/omo/package-lock.json
+++ b/plugins/omo/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@sisyphuslabs/omo-codex-plugin",
- "version": "5.1.13",
+ "version": "5.1.14",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@sisyphuslabs/omo-codex-plugin",
- "version": "5.1.13",
+ "version": "5.1.14",
"workspaces": [
"components/comment-checker",
"components/git-bash",
@@ -95,7 +95,7 @@
},
"components/comment-checker": {
"name": "@code-yeongyu/codex-comment-checker",
- "version": "5.1.13",
+ "version": "5.1.14",
"license": "MIT",
"bin": {
"omo-comment-checker": "dist/cli.js"
@@ -117,7 +117,7 @@
},
"components/git-bash": {
"name": "@sisyphuslabs/codex-git-bash-hook",
- "version": "5.1.13",
+ "version": "5.1.14",
"bin": {
"omo-git-bash-hook": "dist/cli.js"
},
@@ -131,7 +131,7 @@
},
"components/lazycodex-executor-verify": {
"name": "@code-yeongyu/codex-lazycodex-executor-verify",
- "version": "5.1.13",
+ "version": "5.1.14",
"license": "MIT",
"bin": {
"lazycodex-executor-verify": "dist/cli.js"
@@ -149,7 +149,7 @@
},
"components/lsp": {
"name": "@code-yeongyu/codex-lsp",
- "version": "5.1.13",
+ "version": "5.1.14",
"license": "MIT",
"dependencies": {
"@code-yeongyu/lsp-daemon": "file:../../../../lsp-daemon",
@@ -171,7 +171,7 @@
},
"components/rules": {
"name": "@code-yeongyu/codex-rules",
- "version": "5.1.13",
+ "version": "5.1.14",
"license": "MIT",
"dependencies": {
"picomatch": "^4.0.7"
@@ -194,7 +194,7 @@
},
"components/teammode": {
"name": "@sisyphuslabs/codex-teammode",
- "version": "5.1.13",
+ "version": "5.1.14",
"devDependencies": {
"@types/node": "^26.6.2",
"@vitest/coverage-v8": "5.0.1",
@@ -208,7 +208,7 @@
},
"components/telemetry": {
"name": "@code-yeongyu/codex-telemetry",
- "version": "5.1.13",
+ "version": "5.1.14",
"license": "MIT",
"bin": {
"omo-telemetry": "dist/cli.js"
@@ -227,7 +227,7 @@
},
"components/ultrawork": {
"name": "@code-yeongyu/codex-ultrawork",
- "version": "5.1.13",
+ "version": "5.1.14",
"license": "MIT",
"bin": {
"omo-ultrawork": "dist/cli.js"
@@ -246,7 +246,7 @@
},
"components/ulw-execute-continuation": {
"name": "@code-yeongyu/codex-ulw-execute-continuation",
- "version": "5.1.13",
+ "version": "5.1.14",
"license": "MIT",
"bin": {
"omo-ulw-execute-continuation": "dist/cli.js"
@@ -264,7 +264,7 @@
},
"components/ulw-loop": {
"name": "@code-yeongyu/codex-ulw-loop",
- "version": "5.1.13",
+ "version": "5.1.14",
"license": "MIT",
"bin": {
"omo-ulw-loop": "dist/cli.js",
diff --git a/plugins/omo/package.json b/plugins/omo/package.json
index 2daa0ccf..b19024b9 100644
--- a/plugins/omo/package.json
+++ b/plugins/omo/package.json
@@ -1,6 +1,6 @@
{
"name": "@sisyphuslabs/omo-codex-plugin",
- "version": "5.1.13",
+ "version": "5.1.14",
"description": "Aggregate Codex plugin root for OMO components.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/skills/browser/SKILL.md b/plugins/omo/skills/browser/SKILL.md
index d74d09c4..5388b1a0 100644
--- a/plugins/omo/skills/browser/SKILL.md
+++ b/plugins/omo/skills/browser/SKILL.md
@@ -18,7 +18,31 @@ one where a human is a single call away. Never substitute one engine for the oth
the attached engine is not set up, run the onboarding script and tell the user its one remaining
step.
-## Step 0 — load omowright and prove the stack
+## Step 0 — which engine this session is allowed to use
+
+When `OMO_BROWSER_ENGINE` is set (the OmO desktop app sets it for every session), it wins over the table above:
+
+| Value | What you do |
+|---|---|
+| `connected` | Use `connectBrowserSkill()` only. If the user's browser is not connected you get a "Connect your browser" error: relay it and stop. Never open another browser |
+| `builtin` | Do not call `connectBrowserSkill()`; use the app's in-app browser tools |
+| `none` | Do not do browser work. Say that agent browser access is off for this project |
+| unset | The table above, as before (terminal use) |
+
+While any engine is set, `loadOmowright()` returns a guarded library. The owned engine (`connectPipe`,
+`connectCloakProfile`, `connect`) and every other export that acts on a browser is refused, so the table above
+does not apply: do not look for a way around it, and tell the user what the session allows. Under `connected`
+the app sees what the browser is doing, and before a click, Enter or script that sends, posts, pays, orders,
+subscribes, deletes or closes an account, and before Enter in a message box, it asks the user first. A "No" fails the action with
+`BrowserActionDeclinedError`: report that, never retry it or go around it (`session.tool()` lets only reads
+through; `evaluate` is guarded too). If the user presses Stop, the next call throws `BrowserUserStoppedError`: tell
+the user browser use was stopped and start no new session this turn.
+
+The guard prevents mistakes by a cooperating agent. It is not a security boundary: code that imports the raw
+entry (`resolveOmowrightEntry()`) is not guarded, and a host without the `omo_browser_bridge` tool cannot show state or
+honor Stop, though questions are still asked.
+
+## Step 1 — load omowright and prove the stack
```js
const { loadOmowright } = await import("<skill-root>/scripts/omowright.mjs")
@@ -94,7 +118,7 @@ changing the extension's automation settings.
out everywhere. No flow here needs it.
- **`focused: false` by default.** The browser belongs to someone who is probably using it.
- **One short, named session per task,** always stopped.
-- **Bot-scored or WAF targets go to the owned engine.** The attached engine's daemon enables console
+- **Bot-scored or WAF targets go to the owned engine** (not while `OMO_BROWSER_ENGINE` is set: then say the site needs a browser the session does not allow). The attached engine's daemon enables console
capture on every tab it drives, which is a known automation signal; CloakBrowser through
`connectCloakProfile()` is the stealth path.
diff --git a/plugins/omo/skills/browser/references/commands.md b/plugins/omo/skills/browser/references/commands.md
index ee7aeb5c..479726b8 100644
--- a/plugins/omo/skills/browser/references/commands.md
+++ b/plugins/omo/skills/browser/references/commands.md
@@ -98,8 +98,17 @@ Every refusal is a `BskRpcError` with the daemon's own `code`:
| `invalid_params` | wrong option shape | fix the call, do not retry as-is |
| `permission_denied` | `evaluate` on a tab outside the Agent Window, or a denied borrow | stop; the user said no |
| `timeout` | the tool did not finish in its budget | read the page state before retrying once |
-| `user_aborted` | the user pressed Stop in the browser | stop the task and report |
+| `user_aborted` | the user pressed Stop in the browser | stop the task and report; under `OMO_BROWSER_ENGINE` this surfaces as `BrowserUserStoppedError` and no session starts again this turn |
| `cdp_failed` | the page cannot be attached (restricted URL, DevTools open) | say which page and why |
+Typed errors under `OMO_BROWSER_ENGINE` (see SKILL.md Step 0):
+
+| Error | `code` | Meaning |
+|---|---|---|
+| `BrowserNotConnectedError` | `browser_not_connected` | the user's browser is not connected; ask them to connect it |
+| `BrowserEngineRefusal` | `browser_engine_none` / `browser_engine_builtin` / `browser_engine_unsupported` / `browser_tool_blocked` | this engine setting does not allow that call |
+| `BrowserActionDeclinedError` | `user_declined` | the user said no, or no question could be asked; do not retry |
+| `BrowserUserStoppedError` | `user_stopped` | the user stopped browser use |
+
Long calls can be cancelled: `const h = session.client.callWithHandle("tool.navigate", {...})`
then `await session.client.cancel(h.rpcId)`.
diff --git a/plugins/omo/skills/browser/references/install.md b/plugins/omo/skills/browser/references/install.md
index 1f758da9..0ce5b255 100644
--- a/plugins/omo/skills/browser/references/install.md
+++ b/plugins/omo/skills/browser/references/install.md
@@ -8,6 +8,13 @@ Three pieces. The onboarding script prepares all three; a human finishes exactly
| Browser extension | registered from the Web Store listing through Chrome's external-extension mechanism | **yes, up to one click** — the browser asks the user to enable it |
| Daemon process | auto-starts on the first call | nothing to do |
+## Inside the OmO desktop app
+
+The app installs the `bsk` CLI and starts its daemon itself, and keeps the daemon running when the app closes.
+Do not run `browser-install.mjs` there unless the doctor says the app's engine is missing; a session set to
+`OMO_BROWSER_ENGINE=builtin` or `none` never uses this skill's attached engine at all. `BSK_HOME` and `BSK_BIN`
+still decide where the CLI and daemon are found, here and everywhere else.
+
## Supported
| | |
diff --git a/plugins/omo/skills/browser/runtime/omowright/manifest.json b/plugins/omo/skills/browser/runtime/omowright/manifest.json
index ccc1a1ac..e13b249d 100644
--- a/plugins/omo/skills/browser/runtime/omowright/manifest.json
+++ b/plugins/omo/skills/browser/runtime/omowright/manifest.json
@@ -5,5 +5,5 @@
"index.js": "b6b064fab277031c6c51f5a58b84b31040f9960bf767bf646adc0540c1d25c1b",
"page-bundle.js": "bfd51e8383cf47200d57387bbbed258bce5a3a3d00c38fc108034d2888e23f0c"
},
- "stagedAtUtc": "2026-10-03T10:08:04.243Z"
+ "stagedAtUtc": "2026-10-03T23:31:28.413Z"
}
diff --git a/plugins/omo/skills/browser/scripts/browser-engine-guard.mjs b/plugins/omo/skills/browser/scripts/browser-engine-guard.mjs
new file mode 100644
index 00000000..ae73528c
--- /dev/null
+++ b/plugins/omo/skills/browser/scripts/browser-engine-guard.mjs
@@ -0,0 +1,506 @@
+export const BROWSER_CONFIRMATION_POLICY = "ask-before-irreversible"
+export const BROWSER_ENGINE_ENV = "OMO_BROWSER_ENGINE"
+export const BROWSER_STATE_EVENT = "omo.browser.state"
+
+const BRIDGE_TOOL = "omo_browser_bridge"
+const ENGINES = new Set(["connected", "builtin", "none"])
+const NOT_CONNECTED_CODES = new Set(["no_browser_connected", "no_daemon", "unsupported"])
+const CLASSIFY_HTML_BYTES = 4096
+const QUESTION_HEADER = "Browser"
+const ALLOW = "Allow"
+const DECLINE = "Don't allow"
+const READ_ONLY_RAW_TOOLS = new Set(["observe", "snapshot", "get_html", "screenshot", "tab_list", "console", "network"])
+
+const OWNED_SESSION_CREATORS = new Set(["connect", "connectPipe", "connectCloakProfile"])
+const PASSTHROUGH_FUNCTIONS = new Set([
+ "bskDoctor",
+ "bskOnboard",
+ "installBskCli",
+ "readDaemonInfo",
+ "resolveBskHome",
+ "listBrowsers",
+ "catalogBrowsers",
+ "detectBrowsers",
+ "identifyBrowser",
+ "probeBrowserSignals",
+ "findCloakBrowserPath",
+ "resolveCloakProfile",
+ "registerExternalExtension",
+ "unregisterExternalExtension",
+ "externalExtensionEntry",
+ "buildSnapshotExpression",
+ "buildCloakBrowserArgs",
+ "compactSnapshot",
+ "snapshotTokens",
+ "describeLayers",
+ "layersHeader",
+ "decodeFrames",
+ "encodeFrame",
+ "reconcileFrames",
+ "normalizeDialogPolicy",
+ "resolveDialogAction",
+ "sanitizeCookies",
+ "toHar",
+ "BskRpcError",
+ "BridgeProtocolError",
+ "BridgeUnavailableError",
+ "BrowserCdpCommandError",
+ "UnsupportedOperationError",
+])
+
+class CodedError extends Error {
+ constructor(name, code, message, options) {
+ super(message, options)
+ this.name = name
+ this.code = code
+ }
+}
+
+export class BrowserEngineRefusal extends CodedError {
+ constructor(code, message) {
+ super("BrowserEngineRefusal", code, message)
+ }
+}
+
+export class BrowserNotConnectedError extends CodedError {
+ constructor(message, options) {
+ super("BrowserNotConnectedError", "browser_not_connected", message, options)
+ }
+}
+
+export class BrowserUserStoppedError extends CodedError {
+ constructor(message = "The user stopped browser use. Report that and do not start another browser session this turn.") {
+ super("BrowserUserStoppedError", "user_stopped", message)
+ }
+}
+
+export class BrowserActionDeclinedError extends CodedError {
+ constructor(message, code = "user_declined") {
+ super("BrowserActionDeclinedError", code, message)
+ }
+}
+
+const IRREVERSIBLE_LABELS = [
+ /\b(send|post|publish|tweet|reply)\b/i,
+ /\b(pay|purchase|buy|subscribe|donate|checkout|submit|confirm|transfer|approve|merge)\b/i,
+ /\b(e-?sign|sign\s+(the\s+|this\s+|your\s+)?(document|contract|agreement|transaction|petition|form))\b/i,
+ /\border\b(?!\s+(history|status|details|number|tracking))/i,
+ /\b(delete|remove|unsubscribe|deactivate)\b/i,
+ /\bcancel\s+(my\s+|your\s+)?(subscription|membership|plan|account)\b/i,
+ /\bclose\s+(my\s+|your\s+)?account\b/i,
+ /결제|구매|주문|구독|삭제|제거|탈퇴|전송|발송|게시|발행|제출|승인|송금|이체|병합/,
+]
+const IRREVERSIBLE_ACTION_PATH = /\/(send|post|publish|pay|purchase|order|subscribe|delete|remove)\b/i
+const SCRIPT_DRIVES_UI = /\.(click|submit|requestSubmit)\s*\(|\bdispatchEvent\b/
+const SCRIPT_BEACON = /\bsendBeacon\s*\(/
+const SCRIPT_REACHES_NETWORK = /\b(fetch|XMLHttpRequest)\b/
+const SCRIPT_WRITES = /["'`](POST|PUT|PATCH|DELETE)["'`]/i
+const ENTER_KEY = /(^|\+)(Enter|Return)$/i
+const SENDING_CHORD = /(^|\+)(Control|Ctrl|Meta|Cmd|Command)\+/i
+
+export function isIrreversibleLabel(label) {
+ return typeof label === "string" && IRREVERSIBLE_LABELS.some((pattern) => pattern.test(label))
+}
+
+function labelsOf(descriptor) {
+ return [descriptor?.text, descriptor?.ariaLabel, descriptor?.title, descriptor?.value].filter((label) => typeof label === "string" && label.length > 0)
+}
+
+function markupIsEditable(html) {
+ return /\bcontenteditable\b(?!\s*=\s*["']?false)|\brole\s*=\s*["']textbox["']|<textarea\b/i.test(html)
+}
+
+function labelsFromMarkup(html) {
+ const labels = []
+ for (const match of html.matchAll(/\b(?:aria-label|title|value|alt)\s*=\s*"([^"]*)"/gi)) labels.push(match[1])
+ labels.push(html.replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim())
+ return labels.filter((label) => label.length > 0)
+}
+
+function scriptNeedsConfirmation(expression) {
+ if (typeof expression !== "string") return false
+ if (SCRIPT_DRIVES_UI.test(expression) || SCRIPT_BEACON.test(expression)) return true
+ return SCRIPT_REACHES_NETWORK.test(expression) && SCRIPT_WRITES.test(expression)
+}
+
+function describeElementExpression(selector) {
+ return `(function (selector) {
+ const el = selector ? document.querySelector(selector) : document.activeElement
+ if (!el || el === document.body || el === document.documentElement) return null
+ const text = (el.innerText || el.textContent || "").trim().slice(0, 200)
+ const form = el.form || (el.closest ? el.closest("form") : null)
+ return {
+ tag: el.localName,
+ editable: el.isContentEditable === true || el.localName === "textarea" || el.getAttribute("role") === "textbox",
+ text,
+ ariaLabel: el.getAttribute("aria-label") || undefined,
+ title: el.getAttribute("title") || undefined,
+ value: el.localName === "button" || (el.localName === "input" && /^(submit|button|image)$/i.test(el.type)) ? el.value : undefined,
+ form: form ? {
+ action: form.getAttribute("action") || "",
+ method: (form.getAttribute("method") || "get").toLowerCase(),
+ submitLabels: Array.from(form.querySelectorAll("button, input[type=submit], input[type=image]")).filter((b) => (b.type || "submit") === "submit").map((b) => (b.innerText || b.value || b.getAttribute("aria-label") || "").trim().slice(0, 100)),
+ } : undefined,
+ }
+})(${JSON.stringify(selector ?? null)})`
+}
+
+function codeOf(error) {
+ return typeof error?.code === "string" ? error.code : error instanceof Error ? error.name : "error"
+}
+
+function targetKind(target) {
+ if (typeof target === "string") return /^@?e\d+$/.test(target) ? { kind: "ref", ref: target } : { kind: "selector", selector: target }
+ if (target && typeof target === "object") {
+ if (typeof target.ref === "string") return { kind: "ref", ref: target.ref }
+ if (typeof target.selector === "string") return { kind: "selector", selector: target.selector }
+ }
+ return { kind: "point" }
+}
+
+function createBridge(host, context) {
+ const call = async (args) => {
+ if (host === undefined) return undefined
+ try {
+ const result = await host.callTool(BRIDGE_TOOL, args)
+ return result?.hasError === true ? undefined : result
+ } catch {
+ return undefined
+ }
+ }
+ return {
+ async emit(status, extra = {}) {
+ const data = { engine: context.engine, status }
+ if (context.sessionId !== undefined) data.session = context.sessionId
+ for (const [key, value] of Object.entries(extra)) if (value !== undefined) data[key] = value
+ await call({ op: "state", data })
+ },
+ async stopped() {
+ return (await call({ op: "status" }))?.details?.stopped === true
+ },
+ async markStopped() {
+ await call({ op: "stopped" })
+ },
+ }
+}
+
+function describeTab(tab) {
+ if (!tab || typeof tab !== "object") return undefined
+ const favicon = tab.favicon_url ?? tab.faviconUrl ?? tab.favIconUrl ?? tab.favicon
+ const described = { id: tab.id, url: tab.url, title: tab.title }
+ if (typeof favicon === "string") described.favicon = favicon
+ return described
+}
+
+async function currentTab(rawSession) {
+ try {
+ const { tabs } = await rawSession.tabList({ scope: "agent" })
+ return describeTab(tabs?.find((tab) => tab.active) ?? tabs?.[0])
+ } catch {
+ return undefined
+ }
+}
+
+function questionFor(variant, description) {
+ const options = [
+ { label: ALLOW, description: "Do it this once." },
+ { label: DECLINE, description: "Stop this action and tell the agent." },
+ ]
+ const question = `Allow the agent to ${description}?`
+ if (variant === "ask_user_question") {
+ return { waitForAnswer: true, questions: [{ header: QUESTION_HEADER, question, multiSelect: false, options }] }
+ }
+ return { wait_for_answer: true, questions: [{ id: "confirm_browser_action", header: QUESTION_HEADER, question, options }] }
+}
+
+function chosenAnswer(variant, details) {
+ if (details?.status !== "answered") return undefined
+ const entries = Object.values(details.answers ?? {})
+ if (entries.length !== 1) return undefined
+ return variant === "ask_user_question" ? entries[0] : entries[0]?.answers?.[0]
+}
+
+async function confirmWithUser({ host, bridge, rawSession, description, action }) {
+ const decline = (unavailableReason) =>
+ unavailableReason === undefined
+ ? new BrowserActionDeclinedError(`The user declined: ${description}. Nothing was done; report that and do not retry it.`)
+ : new BrowserActionDeclinedError(`Nothing was done: ${description}. ${unavailableReason}`, "confirmation_unavailable")
+ let variant
+ try {
+ const names = host === undefined ? [] : await host.listTools()
+ variant = ["ask_user_question", "request_user_input"].find((name) => names.includes(name))
+ } catch {
+ variant = undefined
+ }
+ if (host === undefined || variant === undefined) {
+ throw decline("The user could not be asked because this session has no question tool.")
+ }
+ const tab = await currentTab(rawSession)
+ await bridge.emit("awaiting_confirmation", { action, tab })
+ let answer
+ try {
+ const result = await host.callTool(variant, questionFor(variant, description))
+ answer = result?.hasError === true ? undefined : chosenAnswer(variant, result?.details)
+ } catch {
+ answer = undefined
+ }
+ if (answer !== ALLOW) {
+ await bridge.emit("failed", { action, reason: "user_declined", tab })
+ throw decline()
+ }
+}
+
+function hostOf(url) {
+ try {
+ return new URL(url).host
+ } catch {
+ return undefined
+ }
+}
+
+async function describeForConfirmation(rawSession, label, rawSessionTab) {
+ const site = hostOf(rawSessionTab?.url)
+ return site === undefined ? label : `${label} on ${site}`
+}
+
+function wrapSession(rawSession, context, bridge, host) {
+ const nowStopped = async () => {
+ if (!(await bridge.stopped())) return
+ try {
+ await rawSession.stop()
+ } catch {
+ // The daemon may already have ended the session.
+ }
+ throw new BrowserUserStoppedError()
+ }
+
+ const confirm = async (action, label) => {
+ const tab = await currentTab(rawSession)
+ await confirmWithUser({ host, bridge, rawSession, description: await describeForConfirmation(rawSession, label, tab), action })
+ }
+
+ const readTarget = async (target) => {
+ const kind = targetKind(target)
+ if (kind.kind === "point") return { unknown: true, labels: [] }
+ try {
+ if (kind.kind === "ref") {
+ const reply = await rawSession.getHtml({ ref: kind.ref, maxBytes: CLASSIFY_HTML_BYTES })
+ const html = String(reply?.html ?? "")
+ return { unknown: false, labels: labelsFromMarkup(html), editable: markupIsEditable(html) }
+ }
+ const reply = await rawSession.evaluate(describeElementExpression(kind.selector), { returnByValue: true, awaitPromise: false })
+ if (!reply || reply.ok === false) return { unknown: true, labels: [] }
+ if (reply.value === null || reply.value === undefined) return { unknown: false, labels: [], missing: true }
+ return { unknown: false, labels: labelsOf(reply.value), descriptor: reply.value }
+ } catch {
+ return { unknown: true, labels: [] }
+ }
+ }
+
+ const preflightClick = async (target) => {
+ const read = await readTarget(target)
+ if (read.unknown) return confirm("click", "click a control whose label could not be read")
+ const label = read.labels.find(isIrreversibleLabel)
+ if (label !== undefined) return confirm("click", `click "${label}"`)
+ return undefined
+ }
+
+ const preflightPress = async (key, options) => {
+ if (typeof key !== "string" || !ENTER_KEY.test(key)) return undefined
+ if (SENDING_CHORD.test(key)) return confirm("press", `press ${key}, which sends in many apps`)
+ if (/(^|\+)Shift\+/i.test(key)) return undefined
+ const sendsFromMessageBox = () => confirm("press", "press Enter in a message box, which sends in many apps")
+ const target = options?.target
+ if (target !== undefined && targetKind(target).kind !== "selector") {
+ const read = await readTarget(target)
+ if (read.unknown) return confirm("press", "press Enter on a control that could not be read")
+ if (read.editable) return sendsFromMessageBox()
+ const label = read.labels.find(isIrreversibleLabel)
+ return label === undefined ? undefined : confirm("press", `press Enter on "${label}"`)
+ }
+ let described
+ try {
+ const reply = await rawSession.evaluate(describeElementExpression(target === undefined ? undefined : targetKind(target).selector), {
+ returnByValue: true,
+ awaitPromise: false,
+ })
+ if (!reply || reply.ok === false) return confirm("press", "press Enter in a field that could not be read")
+ described = reply.value
+ } catch {
+ return confirm("press", "press Enter in a field that could not be read")
+ }
+ if (described === null || described === undefined) return undefined
+ const form = described.form
+ if (described.editable === true && (form === undefined || form.method !== "get")) return sendsFromMessageBox()
+ const own = labelsOf(described).find(isIrreversibleLabel)
+ if (own !== undefined && described.tag !== "input") return confirm("press", `press Enter on "${own}"`)
+ if (form === undefined) return undefined
+ const submit = (form.submitLabels ?? []).find(isIrreversibleLabel)
+ if (submit !== undefined) return confirm("press", `submit a form with "${submit}"`)
+ if (form.method === "post" && IRREVERSIBLE_ACTION_PATH.test(String(form.action))) return confirm("press", "submit a form that sends")
+ return undefined
+ }
+
+ const act = async (kind, run, { navigates = false, preflight } = {}) => {
+ await nowStopped()
+ if (preflight !== undefined) await preflight()
+ await bridge.emit("acting", { action: kind })
+ let result
+ try {
+ result = await run()
+ } catch (error) {
+ if (codeOf(error) === "user_aborted") {
+ await bridge.markStopped()
+ await bridge.emit("user_stopped", { action: kind })
+ try {
+ await rawSession.stop()
+ } catch {
+ // The daemon already ended it.
+ }
+ throw new BrowserUserStoppedError()
+ }
+ await bridge.emit("failed", { action: kind, reason: codeOf(error) })
+ throw error
+ }
+ if (navigates) await bridge.emit("navigated", { action: kind, tab: await currentTab(rawSession) })
+ await bridge.emit("idle", { action: kind })
+ return result
+ }
+
+ const plain = (method, navigates) => (...args) => act(method, () => rawSession[method](...args), { navigates })
+ const handlers = {
+ navigate: plain("navigate", true),
+ back: plain("back", true),
+ forward: plain("forward", true),
+ reload: plain("reload", true),
+ waitForNavigation: plain("waitForNavigation", true),
+ tabCreate: plain("tabCreate", true),
+ tabSelect: plain("tabSelect", true),
+ tabClose: plain("tabClose", true),
+ tabBorrow: plain("tabBorrow", true),
+ tabReturn: plain("tabReturn", true),
+ fill: plain("fill", false),
+ select: plain("select", false),
+ hover: plain("hover", false),
+ focus: plain("focus", false),
+ blur: plain("blur", false),
+ scrollTo: plain("scrollTo", false),
+ wheel: plain("wheel", false),
+ click: (target, options) => act("click", () => rawSession.click(target, options), { preflight: () => preflightClick(target) }),
+ press: (key, options) => act("press", () => rawSession.press(key, options), { preflight: () => preflightPress(key, options) }),
+ evaluate: (expression, options) =>
+ act("evaluate", () => rawSession.evaluate(expression, options), {
+ preflight: () => (scriptNeedsConfirmation(expression) ? confirm("evaluate", "run a script that can click, submit or send in your browser") : undefined),
+ }),
+ tool: async (name, params) => {
+ if (!READ_ONLY_RAW_TOOLS.has(name)) {
+ throw new BrowserEngineRefusal("browser_tool_blocked", `session.tool("${name}") skips the confirmation policy; only reads go through it. Call the matching session method instead.`)
+ }
+ return await rawSession.tool(name, params)
+ },
+ async stop() {
+ if (rawSession.stopped) return null
+ try {
+ return await rawSession.stop()
+ } finally {
+ await bridge.emit("stopped")
+ }
+ },
+ }
+
+ return new Proxy(rawSession, {
+ get(target, property) {
+ if (Object.hasOwn(handlers, property)) return handlers[property]
+ const value = Reflect.get(target, property, target)
+ return typeof value === "function" ? value.bind(target) : value
+ },
+ })
+}
+
+const GUARDED_SESSIONS = new WeakMap()
+
+function connectErrorFor(error) {
+ if (NOT_CONNECTED_CODES.has(codeOf(error))) {
+ return new BrowserNotConnectedError(
+ "Connect your browser: this session is set to drive the user's own browser, and none is connected. Ask the user to open the browser that has the BrowserSkill extension enabled, then try again. Do not use or launch another browser.",
+ { cause: error },
+ )
+ }
+ return error
+}
+
+export function guardOmowright(raw, { env = process.env, host } = {}) {
+ const engine = env[BROWSER_ENGINE_ENV]
+ if (engine === undefined || engine === "") return raw
+
+ const connectBrowserSkill = async (options) => {
+ if (!ENGINES.has(engine)) {
+ throw new BrowserEngineRefusal("browser_engine_unsupported", `${BROWSER_ENGINE_ENV} is "${engine}", which is not connected, builtin or none; browser use is refused.`)
+ }
+ if (engine === "none") {
+ throw new BrowserEngineRefusal("browser_engine_none", "Agent browser access is off for this project. Tell the user; do not try another browser.")
+ }
+ if (engine === "builtin") {
+ throw new BrowserEngineRefusal("browser_engine_builtin", "This session uses the app's built-in browser. Do not call connectBrowserSkill(); use the app's in-app browser tools.")
+ }
+ const context = { engine, sessionId: undefined }
+ const bridge = createBridge(host, context)
+ if (await bridge.stopped()) throw new BrowserUserStoppedError()
+ let rawSession
+ try {
+ rawSession = await raw.connectBrowserSkill(options)
+ } catch (error) {
+ await bridge.emit("connect_failed", { reason: codeOf(error) })
+ throw connectErrorFor(error)
+ }
+ context.sessionId = rawSession.sessionId
+ const session = wrapSession(rawSession, context, bridge, host)
+ GUARDED_SESSIONS.set(session, rawSession)
+ await bridge.emit("started")
+ return session
+ }
+
+ const bskSnapshot = (session, options) => raw.bskSnapshot(GUARDED_SESSIONS.get(session) ?? session, options)
+
+ return allowlistedLibrary(raw, engine, { connectBrowserSkill, bskSnapshot })
+}
+
+function ownedBrowserRefusal(engine) {
+ const why =
+ engine === "none"
+ ? "Agent browser access is off for this project."
+ : engine === "builtin"
+ ? "This session uses the app's built-in browser."
+ : engine === "connected"
+ ? "This session drives the user's own browser only."
+ : `${BROWSER_ENGINE_ENV} is "${engine}", which is not connected, builtin or none.`
+ const refusal = new BrowserEngineRefusal("browser_engine_owned_blocked", `${why} Do not launch an owned browser; tell the user instead.`)
+ refusal.engine = engine
+ return refusal
+}
+
+function blockedExport(name, engine) {
+ const blocked = function () {
+ const refusal = new BrowserEngineRefusal(
+ OWNED_SESSION_CREATORS.has(name) ? "browser_engine_owned_blocked" : "browser_engine_export_blocked",
+ OWNED_SESSION_CREATORS.has(name)
+ ? ownedBrowserRefusal(engine).message
+ : `omowright.${name} is not available while ${BROWSER_ENGINE_ENV} is set; it can act on a browser without the engine and confirmation policy.`,
+ )
+ refusal.engine = engine
+ if (new.target !== undefined) throw refusal
+ return Promise.reject(refusal)
+ }
+ Object.defineProperty(blocked, "name", { value: name })
+ return blocked
+}
+
+function allowlistedLibrary(raw, engine, guarded) {
+ const library = {}
+ for (const [name, value] of Object.entries(raw)) {
+ if (typeof value !== "function") library[name] = value
+ else if (PASSTHROUGH_FUNCTIONS.has(name)) library[name] = value
+ else library[name] = blockedExport(name, engine)
+ }
+ return Object.assign(library, guarded)
+}
diff --git a/plugins/omo/skills/browser/scripts/omowright.mjs b/plugins/omo/skills/browser/scripts/omowright.mjs
index 8812f7f3..03b93b17 100644
--- a/plugins/omo/skills/browser/scripts/omowright.mjs
+++ b/plugins/omo/skills/browser/scripts/omowright.mjs
@@ -1,6 +1,18 @@
import { existsSync } from "node:fs"
import { dirname, join } from "node:path"
import { fileURLToPath, pathToFileURL } from "node:url"
+import { guardOmowright } from "./browser-engine-guard.mjs"
+
+export {
+ BROWSER_CONFIRMATION_POLICY,
+ BROWSER_ENGINE_ENV,
+ BROWSER_STATE_EVENT,
+ BrowserActionDeclinedError,
+ BrowserEngineRefusal,
+ BrowserNotConnectedError,
+ BrowserUserStoppedError,
+ guardOmowright,
+} from "./browser-engine-guard.mjs"
const scriptDir = dirname(fileURLToPath(import.meta.url))
const skillRoot = dirname(scriptDir)
@@ -14,12 +26,27 @@ export function resolveOmowrightEntry(env = process.env) {
return candidates.find((candidate) => existsSync(candidate))
}
-export async function loadOmowright(env = process.env) {
+function kernelHost() {
+ const { tool, tool_schema: toolSchema } = globalThis
+ if (typeof toolSchema !== "function" || tool === undefined || tool === null) return undefined
+ return {
+ async listTools() {
+ const listed = await toolSchema()
+ return Array.isArray(listed?.tools) ? listed.tools : []
+ },
+ async callTool(name, args) {
+ return await tool[name](args)
+ },
+ }
+}
+
+export async function loadOmowright(env = process.env, host = kernelHost()) {
const entry = resolveOmowrightEntry(env)
if (entry === undefined) {
throw new Error(
"omowright is not staged in this skill; run `node packages/shared-skills/stage-omowright-runtime.mjs` in a checkout, or set OMOWRIGHT_ROOT to a directory holding its bundled index.js",
)
}
- return { entry, omowright: await import(pathToFileURL(entry).href) }
+ const raw = await import(pathToFileURL(entry).href)
+ return { entry, omowright: guardOmowright(raw, { env, host }) }
}