oh-my-opencode 5.0.0-beta.44 → 5.0.0-beta.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/cli/index.js +43 -27
  2. package/dist/cli-node/index.js +43 -27
  3. package/dist/features/background-agent/error-classifier.d.ts +1 -0
  4. package/dist/index.js +59 -16
  5. package/package.json +14 -14
  6. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  7. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  8. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  9. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  10. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  11. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  12. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  13. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  14. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  15. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  16. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  17. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  18. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  19. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  20. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  21. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  22. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  23. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  24. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  25. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  26. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +2 -2
  27. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  28. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  29. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  30. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  31. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  32. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  33. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  34. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  35. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  36. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  37. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  38. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  39. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  40. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  41. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  42. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  43. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  44. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  45. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  46. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +1 -1
  47. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  48. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  49. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  50. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  51. package/packages/omo-codex/plugin/package-lock.json +12 -12
  52. package/packages/omo-codex/plugin/package.json +1 -1
  53. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
  54. package/postinstall.mjs +2 -0
package/dist/cli/index.js CHANGED
@@ -54,7 +54,7 @@ var package_default;
54
54
  var init_package = __esm(() => {
55
55
  package_default = {
56
56
  name: "oh-my-opencode",
57
- version: "5.0.0-beta.44",
57
+ version: "5.0.0-beta.46",
58
58
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
59
59
  main: "./dist/index.js",
60
60
  types: "dist/index.d.ts",
@@ -238,7 +238,7 @@ var init_package = __esm(() => {
238
238
  zod: "^4.4.3"
239
239
  },
240
240
  devDependencies: {
241
- "@code-yeongyu/senpi": "2026.9.5-3",
241
+ "@code-yeongyu/senpi": "2026.9.7",
242
242
  "@oh-my-opencode/agents-md-core": "workspace:*",
243
243
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
244
244
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -279,18 +279,18 @@ var init_package = __esm(() => {
279
279
  typescript: "^7.0.2"
280
280
  },
281
281
  optionalDependencies: {
282
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.44",
283
- "oh-my-opencode-darwin-x64": "5.0.0-beta.44",
284
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.44",
285
- "oh-my-opencode-linux-arm64": "5.0.0-beta.44",
286
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.44",
287
- "oh-my-opencode-linux-x64": "5.0.0-beta.44",
288
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.44",
289
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.44",
290
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.44",
291
- "oh-my-opencode-windows-arm64": "5.0.0-beta.44",
292
- "oh-my-opencode-windows-x64": "5.0.0-beta.44",
293
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.44"
282
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.46",
283
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.46",
284
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.46",
285
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.46",
286
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.46",
287
+ "oh-my-opencode-linux-x64": "5.0.0-beta.46",
288
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.46",
289
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.46",
290
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.46",
291
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.46",
292
+ "oh-my-opencode-windows-x64": "5.0.0-beta.46",
293
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.46"
294
294
  },
295
295
  overrides: {
296
296
  "@earendil-works/pi-agent-core": "0.84.2",
@@ -94447,7 +94447,7 @@ var package_default2;
94447
94447
  var init_package2 = __esm(() => {
94448
94448
  package_default2 = {
94449
94449
  name: "@oh-my-opencode/omo-codex",
94450
- version: "5.0.0-beta.44",
94450
+ version: "5.0.0-beta.46",
94451
94451
  type: "module",
94452
94452
  private: true,
94453
94453
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -103484,8 +103484,9 @@ import { dirname as dirname23, join as join60 } from "path";
103484
103484
  // packages/omo-senpi/src/install/senpi-settings.ts
103485
103485
  import { constants as constants8 } from "fs";
103486
103486
  import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "fs/promises";
103487
- import { dirname as dirname22, join as join59, resolve as resolve18 } from "path";
103487
+ import { basename as basename9, dirname as dirname22, join as join59, resolve as resolve18 } from "path";
103488
103488
  var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
103489
+ var GENERATED_PLUGIN_BASENAME = /^omo-senpi-cli-plugin-[A-Za-z0-9]{6}$/;
103489
103490
  var LEGACY_BUILTIN_SHADOW_PACKAGES = [
103490
103491
  join59("packages", "pi-goal"),
103491
103492
  join59("packages", "pi-webfetch")
@@ -103526,7 +103527,11 @@ async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir
103526
103527
  const packagePath = resolve18(agentDir, entry);
103527
103528
  if (packagePath === currentPath)
103528
103529
  return currentPath;
103529
- return await readPackageName(packagePath) === OMO_SENPI_PACKAGE_NAME ? undefined : entry;
103530
+ if (await readPackageName(packagePath) === OMO_SENPI_PACKAGE_NAME)
103531
+ return;
103532
+ if (GENERATED_PLUGIN_BASENAME.test(basename9(entry)) && !await fileExists(packagePath))
103533
+ return;
103534
+ return entry;
103530
103535
  }));
103531
103536
  return entries.filter((entry) => entry !== undefined);
103532
103537
  }
@@ -103569,7 +103574,14 @@ async function readPackageName(packagePath) {
103569
103574
  return;
103570
103575
  throw error51;
103571
103576
  }
103572
- const parsed = JSON.parse(raw);
103577
+ let parsed;
103578
+ try {
103579
+ parsed = JSON.parse(raw);
103580
+ } catch (error51) {
103581
+ if (error51 instanceof SyntaxError)
103582
+ return;
103583
+ throw error51;
103584
+ }
103573
103585
  return isRecord12(parsed) && typeof parsed.name === "string" ? parsed.name : undefined;
103574
103586
  }
103575
103587
  async function fileExists(path7) {
@@ -103727,9 +103739,10 @@ async function runSenpiInstaller(options = {}) {
103727
103739
  packages.push(context.pluginPath);
103728
103740
  settings.packages = packages;
103729
103741
  const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
103730
- installLocalLauncher({
103742
+ const launcherPath = installLocalLauncher({
103731
103743
  pluginPath: context.pluginPath,
103732
- senpiCliPath: join61(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
103744
+ senpiCliPath: join61(context.repoRoot, "packages", "coding-agent", "dist", "cli.js"),
103745
+ homeDir: context.homeDir
103733
103746
  });
103734
103747
  return {
103735
103748
  ok: true,
@@ -103737,6 +103750,7 @@ async function runSenpiInstaller(options = {}) {
103737
103750
  agentDir: context.agentDir,
103738
103751
  settingsPath: context.settingsPath,
103739
103752
  pluginPath: context.pluginPath,
103753
+ launcherPath,
103740
103754
  changed: JSON.stringify(settings) !== before,
103741
103755
  backupPath
103742
103756
  };
@@ -103745,12 +103759,14 @@ function resolveInstallContext(options) {
103745
103759
  const env2 = options.env ?? process.env;
103746
103760
  const allowBuild = options.pluginPath === undefined;
103747
103761
  const repoRoot = resolve19(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname24(fileURLToPath(import.meta.url))) : dirname24(resolve19(options.pluginPath))));
103748
- const agentDir = resolve19(options.agentDir ?? resolveAgentHome({ env: env2, homeDir: env2.HOME ?? homedir11() }));
103762
+ const homeDir = options.homeDir ?? env2.HOME ?? homedir11();
103763
+ const agentDir = resolve19(options.agentDir ?? resolveAgentHome({ env: env2, homeDir }));
103749
103764
  const pluginPath = resolve19(options.pluginPath ?? join61(repoRoot, "packages", "omo-senpi", "plugin"));
103750
103765
  return {
103751
103766
  env: env2,
103752
103767
  repoRoot,
103753
103768
  agentDir,
103769
+ homeDir,
103754
103770
  settingsPath: join61(agentDir, "settings.json"),
103755
103771
  pluginPath,
103756
103772
  platform: options.platform ?? process.platform,
@@ -111256,7 +111272,7 @@ function hasCliSuffix(candidatePath, suffix) {
111256
111272
 
111257
111273
  // packages/omo-opencode/src/mcp/runtime-executable.ts
111258
111274
  init_bun_which_shim();
111259
- import { basename as basename9 } from "path";
111275
+ import { basename as basename10 } from "path";
111260
111276
  var NODE_EXECUTABLE_NAMES = new Set(["node", "node.exe"]);
111261
111277
  function isUnsafeCommandName2(commandName) {
111262
111278
  if (commandName.length === 0)
@@ -111272,7 +111288,7 @@ function isUnsafeCommandName2(commandName) {
111272
111288
  return false;
111273
111289
  }
111274
111290
  function isNodeExecPath(execPath) {
111275
- return NODE_EXECUTABLE_NAMES.has(basename9(execPath).toLowerCase());
111291
+ return NODE_EXECUTABLE_NAMES.has(basename10(execPath).toLowerCase());
111276
111292
  }
111277
111293
  function resolveRuntimeExecutable(commandName, options = {}) {
111278
111294
  if (isUnsafeCommandName2(commandName)) {
@@ -111759,7 +111775,7 @@ init_src();
111759
111775
  import { existsSync as existsSync58 } from "fs";
111760
111776
  import { lstat as lstat15, readdir as readdir14, readFile as readFile27 } from "fs/promises";
111761
111777
  import { homedir as homedir22 } from "os";
111762
- import { basename as basename10, join as join83, resolve as resolve23 } from "path";
111778
+ import { basename as basename11, join as join83, resolve as resolve23 } from "path";
111763
111779
  // packages/omo-opencode/package.json
111764
111780
  var package_default3 = {
111765
111781
  name: "@oh-my-opencode/omo-opencode",
@@ -111996,7 +112012,7 @@ async function readLinkedAgents(codexHome) {
111996
112012
  if (!existsSync58(agentsDir))
111997
112013
  return [];
111998
112014
  const entries = await readdir14(agentsDir, { withFileTypes: true });
111999
- return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename10(entry.name, ".toml")).sort();
112015
+ return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename11(entry.name, ".toml")).sort();
112000
112016
  }
112001
112017
  async function readJson(path15) {
112002
112018
  try {
@@ -112926,7 +112942,7 @@ import {
112926
112942
  unlinkSync as unlinkSync9,
112927
112943
  writeFileSync as writeFileSync12
112928
112944
  } from "fs";
112929
- import { basename as basename11, dirname as dirname34, join as join88 } from "path";
112945
+ import { basename as basename12, dirname as dirname34, join as join88 } from "path";
112930
112946
 
112931
112947
  // packages/mcp-client-core/src/config-dir.ts
112932
112948
  import { existsSync as existsSync60, realpathSync as realpathSync8 } from "fs";
@@ -113211,7 +113227,7 @@ function listAllTokens() {
113211
113227
  if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
113212
113228
  continue;
113213
113229
  const token = readTokenFile(join88(dir, entry.name));
113214
- const hash2 = basename11(entry.name, ".json");
113230
+ const hash2 = basename12(entry.name, ".json");
113215
113231
  if (token)
113216
113232
  result[index[hash2] ?? hash2] = token;
113217
113233
  }
@@ -55,7 +55,7 @@ var package_default;
55
55
  var init_package = __esm(() => {
56
56
  package_default = {
57
57
  name: "oh-my-opencode",
58
- version: "5.0.0-beta.44",
58
+ version: "5.0.0-beta.46",
59
59
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
60
60
  main: "./dist/index.js",
61
61
  types: "dist/index.d.ts",
@@ -239,7 +239,7 @@ var init_package = __esm(() => {
239
239
  zod: "^4.4.3"
240
240
  },
241
241
  devDependencies: {
242
- "@code-yeongyu/senpi": "2026.9.5-3",
242
+ "@code-yeongyu/senpi": "2026.9.7",
243
243
  "@oh-my-opencode/agents-md-core": "workspace:*",
244
244
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
245
245
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -280,18 +280,18 @@ var init_package = __esm(() => {
280
280
  typescript: "^7.0.2"
281
281
  },
282
282
  optionalDependencies: {
283
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.44",
284
- "oh-my-opencode-darwin-x64": "5.0.0-beta.44",
285
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.44",
286
- "oh-my-opencode-linux-arm64": "5.0.0-beta.44",
287
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.44",
288
- "oh-my-opencode-linux-x64": "5.0.0-beta.44",
289
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.44",
290
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.44",
291
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.44",
292
- "oh-my-opencode-windows-arm64": "5.0.0-beta.44",
293
- "oh-my-opencode-windows-x64": "5.0.0-beta.44",
294
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.44"
283
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.46",
284
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.46",
285
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.46",
286
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.46",
287
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.46",
288
+ "oh-my-opencode-linux-x64": "5.0.0-beta.46",
289
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.46",
290
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.46",
291
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.46",
292
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.46",
293
+ "oh-my-opencode-windows-x64": "5.0.0-beta.46",
294
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.46"
295
295
  },
296
296
  overrides: {
297
297
  "@earendil-works/pi-agent-core": "0.84.2",
@@ -94526,7 +94526,7 @@ var package_default2;
94526
94526
  var init_package2 = __esm(() => {
94527
94527
  package_default2 = {
94528
94528
  name: "@oh-my-opencode/omo-codex",
94529
- version: "5.0.0-beta.44",
94529
+ version: "5.0.0-beta.46",
94530
94530
  type: "module",
94531
94531
  private: true,
94532
94532
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -103563,8 +103563,9 @@ import { dirname as dirname23, join as join60 } from "node:path";
103563
103563
  // packages/omo-senpi/src/install/senpi-settings.ts
103564
103564
  import { constants as constants8 } from "node:fs";
103565
103565
  import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "node:fs/promises";
103566
- import { dirname as dirname22, join as join59, resolve as resolve18 } from "node:path";
103566
+ import { basename as basename9, dirname as dirname22, join as join59, resolve as resolve18 } from "node:path";
103567
103567
  var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
103568
+ var GENERATED_PLUGIN_BASENAME = /^omo-senpi-cli-plugin-[A-Za-z0-9]{6}$/;
103568
103569
  var LEGACY_BUILTIN_SHADOW_PACKAGES = [
103569
103570
  join59("packages", "pi-goal"),
103570
103571
  join59("packages", "pi-webfetch")
@@ -103605,7 +103606,11 @@ async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir
103605
103606
  const packagePath = resolve18(agentDir, entry);
103606
103607
  if (packagePath === currentPath)
103607
103608
  return currentPath;
103608
- return await readPackageName(packagePath) === OMO_SENPI_PACKAGE_NAME ? undefined : entry;
103609
+ if (await readPackageName(packagePath) === OMO_SENPI_PACKAGE_NAME)
103610
+ return;
103611
+ if (GENERATED_PLUGIN_BASENAME.test(basename9(entry)) && !await fileExists(packagePath))
103612
+ return;
103613
+ return entry;
103609
103614
  }));
103610
103615
  return entries.filter((entry) => entry !== undefined);
103611
103616
  }
@@ -103648,7 +103653,14 @@ async function readPackageName(packagePath) {
103648
103653
  return;
103649
103654
  throw error51;
103650
103655
  }
103651
- const parsed = JSON.parse(raw);
103656
+ let parsed;
103657
+ try {
103658
+ parsed = JSON.parse(raw);
103659
+ } catch (error51) {
103660
+ if (error51 instanceof SyntaxError)
103661
+ return;
103662
+ throw error51;
103663
+ }
103652
103664
  return isRecord12(parsed) && typeof parsed.name === "string" ? parsed.name : undefined;
103653
103665
  }
103654
103666
  async function fileExists(path7) {
@@ -103806,9 +103818,10 @@ async function runSenpiInstaller(options = {}) {
103806
103818
  packages.push(context.pluginPath);
103807
103819
  settings.packages = packages;
103808
103820
  const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
103809
- installLocalLauncher({
103821
+ const launcherPath = installLocalLauncher({
103810
103822
  pluginPath: context.pluginPath,
103811
- senpiCliPath: join61(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
103823
+ senpiCliPath: join61(context.repoRoot, "packages", "coding-agent", "dist", "cli.js"),
103824
+ homeDir: context.homeDir
103812
103825
  });
103813
103826
  return {
103814
103827
  ok: true,
@@ -103816,6 +103829,7 @@ async function runSenpiInstaller(options = {}) {
103816
103829
  agentDir: context.agentDir,
103817
103830
  settingsPath: context.settingsPath,
103818
103831
  pluginPath: context.pluginPath,
103832
+ launcherPath,
103819
103833
  changed: JSON.stringify(settings) !== before,
103820
103834
  backupPath
103821
103835
  };
@@ -103824,12 +103838,14 @@ function resolveInstallContext(options) {
103824
103838
  const env2 = options.env ?? process.env;
103825
103839
  const allowBuild = options.pluginPath === undefined;
103826
103840
  const repoRoot = resolve19(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname24(fileURLToPath(import.meta.url))) : dirname24(resolve19(options.pluginPath))));
103827
- const agentDir = resolve19(options.agentDir ?? resolveAgentHome({ env: env2, homeDir: env2.HOME ?? homedir11() }));
103841
+ const homeDir = options.homeDir ?? env2.HOME ?? homedir11();
103842
+ const agentDir = resolve19(options.agentDir ?? resolveAgentHome({ env: env2, homeDir }));
103828
103843
  const pluginPath = resolve19(options.pluginPath ?? join61(repoRoot, "packages", "omo-senpi", "plugin"));
103829
103844
  return {
103830
103845
  env: env2,
103831
103846
  repoRoot,
103832
103847
  agentDir,
103848
+ homeDir,
103833
103849
  settingsPath: join61(agentDir, "settings.json"),
103834
103850
  pluginPath,
103835
103851
  platform: options.platform ?? process.platform,
@@ -111335,7 +111351,7 @@ function hasCliSuffix(candidatePath, suffix) {
111335
111351
 
111336
111352
  // packages/omo-opencode/src/mcp/runtime-executable.ts
111337
111353
  init_bun_which_shim();
111338
- import { basename as basename9 } from "node:path";
111354
+ import { basename as basename10 } from "node:path";
111339
111355
  var NODE_EXECUTABLE_NAMES = new Set(["node", "node.exe"]);
111340
111356
  function isUnsafeCommandName2(commandName) {
111341
111357
  if (commandName.length === 0)
@@ -111351,7 +111367,7 @@ function isUnsafeCommandName2(commandName) {
111351
111367
  return false;
111352
111368
  }
111353
111369
  function isNodeExecPath(execPath) {
111354
- return NODE_EXECUTABLE_NAMES.has(basename9(execPath).toLowerCase());
111370
+ return NODE_EXECUTABLE_NAMES.has(basename10(execPath).toLowerCase());
111355
111371
  }
111356
111372
  function resolveRuntimeExecutable(commandName, options = {}) {
111357
111373
  if (isUnsafeCommandName2(commandName)) {
@@ -111838,7 +111854,7 @@ init_src();
111838
111854
  import { existsSync as existsSync58 } from "node:fs";
111839
111855
  import { lstat as lstat15, readdir as readdir14, readFile as readFile27 } from "node:fs/promises";
111840
111856
  import { homedir as homedir22 } from "node:os";
111841
- import { basename as basename10, join as join83, resolve as resolve23 } from "node:path";
111857
+ import { basename as basename11, join as join83, resolve as resolve23 } from "node:path";
111842
111858
  // packages/omo-opencode/package.json
111843
111859
  var package_default3 = {
111844
111860
  name: "@oh-my-opencode/omo-opencode",
@@ -112075,7 +112091,7 @@ async function readLinkedAgents(codexHome) {
112075
112091
  if (!existsSync58(agentsDir))
112076
112092
  return [];
112077
112093
  const entries = await readdir14(agentsDir, { withFileTypes: true });
112078
- return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename10(entry.name, ".toml")).sort();
112094
+ return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename11(entry.name, ".toml")).sort();
112079
112095
  }
112080
112096
  async function readJson(path15) {
112081
112097
  try {
@@ -113005,7 +113021,7 @@ import {
113005
113021
  unlinkSync as unlinkSync9,
113006
113022
  writeFileSync as writeFileSync12
113007
113023
  } from "node:fs";
113008
- import { basename as basename11, dirname as dirname34, join as join88 } from "node:path";
113024
+ import { basename as basename12, dirname as dirname34, join as join88 } from "node:path";
113009
113025
 
113010
113026
  // packages/mcp-client-core/src/config-dir.ts
113011
113027
  import { existsSync as existsSync60, realpathSync as realpathSync8 } from "node:fs";
@@ -113290,7 +113306,7 @@ function listAllTokens() {
113290
113306
  if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
113291
113307
  continue;
113292
113308
  const token = readTokenFile(join88(dir, entry.name));
113293
- const hash2 = basename11(entry.name, ".json");
113309
+ const hash2 = basename12(entry.name, ".json");
113294
113310
  if (token)
113295
113311
  result[index[hash2] ?? hash2] = token;
113296
113312
  }
@@ -1,6 +1,7 @@
1
1
  import { isRecord } from "@oh-my-opencode/utils";
2
2
  export { isRecord };
3
3
  export declare function isAbortedSessionError(error: unknown): boolean;
4
+ export declare function isTransportUnreachableError(error: unknown): boolean;
4
5
  export declare function getErrorText(error: unknown): string;
5
6
  export declare function extractErrorName(error: unknown): string | undefined;
6
7
  export declare function extractErrorMessage(error: unknown): string | undefined;
package/dist/index.js CHANGED
@@ -96714,7 +96714,7 @@ function getCachedVersion(options = {}) {
96714
96714
  // package.json
96715
96715
  var package_default = {
96716
96716
  name: "oh-my-opencode",
96717
- version: "5.0.0-beta.44",
96717
+ version: "5.0.0-beta.46",
96718
96718
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
96719
96719
  main: "./dist/index.js",
96720
96720
  types: "dist/index.d.ts",
@@ -96898,7 +96898,7 @@ var package_default = {
96898
96898
  zod: "^4.4.3"
96899
96899
  },
96900
96900
  devDependencies: {
96901
- "@code-yeongyu/senpi": "2026.9.5-3",
96901
+ "@code-yeongyu/senpi": "2026.9.7",
96902
96902
  "@oh-my-opencode/agents-md-core": "workspace:*",
96903
96903
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
96904
96904
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -96939,18 +96939,18 @@ var package_default = {
96939
96939
  typescript: "^7.0.2"
96940
96940
  },
96941
96941
  optionalDependencies: {
96942
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.44",
96943
- "oh-my-opencode-darwin-x64": "5.0.0-beta.44",
96944
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.44",
96945
- "oh-my-opencode-linux-arm64": "5.0.0-beta.44",
96946
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.44",
96947
- "oh-my-opencode-linux-x64": "5.0.0-beta.44",
96948
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.44",
96949
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.44",
96950
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.44",
96951
- "oh-my-opencode-windows-arm64": "5.0.0-beta.44",
96952
- "oh-my-opencode-windows-x64": "5.0.0-beta.44",
96953
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.44"
96942
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.46",
96943
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.46",
96944
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.46",
96945
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.46",
96946
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.46",
96947
+ "oh-my-opencode-linux-x64": "5.0.0-beta.46",
96948
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.46",
96949
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.46",
96950
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.46",
96951
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.46",
96952
+ "oh-my-opencode-windows-x64": "5.0.0-beta.46",
96953
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.46"
96954
96954
  },
96955
96955
  overrides: {
96956
96956
  "@earendil-works/pi-agent-core": "0.84.2",
@@ -125828,6 +125828,23 @@ function isAbortedSessionError(error) {
125828
125828
  const message = getErrorText(error);
125829
125829
  return message.toLowerCase().includes("aborted");
125830
125830
  }
125831
+ var TRANSPORT_UNREACHABLE_PATTERNS = [
125832
+ /unable to connect/i,
125833
+ /econnrefused/i,
125834
+ /econnreset/i,
125835
+ /enotfound/i,
125836
+ /socket hang up/i,
125837
+ /fetch failed/i,
125838
+ /network(?:\s|_)?error/i,
125839
+ /not connected/i,
125840
+ /connection (?:closed|refused|reset)/i
125841
+ ];
125842
+ function isTransportUnreachableError(error) {
125843
+ const text = extractErrorMessage(error) ?? getErrorText(error);
125844
+ if (!text)
125845
+ return false;
125846
+ return TRANSPORT_UNREACHABLE_PATTERNS.some((pattern) => pattern.test(text));
125847
+ }
125831
125848
  function getErrorText(error) {
125832
125849
  if (!error)
125833
125850
  return "";
@@ -136643,10 +136660,14 @@ async function checkSessionExistence(client3, sessionID, directory) {
136643
136660
  ...directory ? { query: { directory } } : {}
136644
136661
  });
136645
136662
  if (response.error !== undefined && response.error !== null) {
136663
+ if (isTransportUnreachableError(response.error))
136664
+ return "missing";
136646
136665
  return isSessionNotFoundError(response.error) ? "missing" : "unknown";
136647
136666
  }
136648
136667
  return response.data != null ? "exists" : "missing";
136649
136668
  } catch (error) {
136669
+ if (isTransportUnreachableError(error))
136670
+ return "missing";
136650
136671
  return isSessionNotFoundError(error) ? "missing" : "unknown";
136651
136672
  }
136652
136673
  }
@@ -137137,12 +137158,23 @@ async function getSessionActivityFromClient(client3, sessionID, directory) {
137137
137158
  ...directory ? { query: { directory } } : {}
137138
137159
  });
137139
137160
  if (isRecord(response) && response.error !== undefined && response.error !== null) {
137161
+ if (isTransportUnreachableError(response.error)) {
137162
+ log2("[background-agent] Session server is unreachable while reading activity:", { sessionID, error: response.error });
137163
+ return { type: "missing" };
137164
+ }
137140
137165
  log2("[background-agent] Failed to read session activity:", { sessionID, error: response.error });
137141
137166
  return { type: "unavailable" };
137142
137167
  }
137143
137168
  const sessionInfo = isRecord(response) && "data" in response ? response.data : response;
137144
137169
  return sessionActivityLookupFromInfo(sessionInfo);
137145
137170
  } catch (error) {
137171
+ if (isTransportUnreachableError(error)) {
137172
+ log2("[background-agent] Session server is unreachable while reading activity:", {
137173
+ sessionID,
137174
+ error: error instanceof Error ? error.message : error
137175
+ });
137176
+ return { type: "missing" };
137177
+ }
137146
137178
  if (error instanceof Error) {
137147
137179
  log2("[background-agent] Failed to read session activity:", { sessionID, error: error.message });
137148
137180
  return { type: "unavailable" };
@@ -137257,6 +137289,7 @@ async function interruptStaleTask(args) {
137257
137289
  const {
137258
137290
  task,
137259
137291
  client: client3,
137292
+ directory,
137260
137293
  concurrencyManager,
137261
137294
  notifyParentSession,
137262
137295
  onTaskInterrupted,
@@ -137269,12 +137302,20 @@ async function interruptStaleTask(args) {
137269
137302
  } = args;
137270
137303
  const aborted = await abortWithTimeout(client3, sessionID);
137271
137304
  if (!aborted) {
137272
- log2("[background-agent] Task stale interruption skipped because session abort failed:", {
137305
+ const existence = await checkSessionExistence(client3, sessionID, directory);
137306
+ if (existence !== "missing") {
137307
+ log2("[background-agent] Task stale interruption skipped because session abort failed:", {
137308
+ taskId: task.id,
137309
+ sessionID,
137310
+ reason
137311
+ });
137312
+ return;
137313
+ }
137314
+ log2("[background-agent] Session is gone and cannot be aborted; finalizing the stale task:", {
137273
137315
  taskId: task.id,
137274
137316
  sessionID,
137275
137317
  reason
137276
137318
  });
137277
- return;
137278
137319
  }
137279
137320
  if (task.status !== "running" || task.sessionId !== sessionID)
137280
137321
  return;
@@ -137357,6 +137398,7 @@ async function checkAndInterruptStaleTasks(args) {
137357
137398
  staleInterruptions.push(interruptStaleTask({
137358
137399
  task,
137359
137400
  client: client3,
137401
+ directory,
137360
137402
  concurrencyManager,
137361
137403
  notifyParentSession,
137362
137404
  onTaskInterrupted,
@@ -137404,6 +137446,7 @@ async function checkAndInterruptStaleTasks(args) {
137404
137446
  staleInterruptions.push(interruptStaleTask({
137405
137447
  task,
137406
137448
  client: client3,
137449
+ directory,
137407
137450
  concurrencyManager,
137408
137451
  notifyParentSession,
137409
137452
  onTaskInterrupted,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "5.0.0-beta.44",
3
+ "version": "5.0.0-beta.46",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "./dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -184,7 +184,7 @@
184
184
  "zod": "^4.4.3"
185
185
  },
186
186
  "devDependencies": {
187
- "@code-yeongyu/senpi": "2026.9.5-3",
187
+ "@code-yeongyu/senpi": "2026.9.7",
188
188
  "@oh-my-opencode/agents-md-core": "workspace:*",
189
189
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
190
190
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -225,18 +225,18 @@
225
225
  "typescript": "^7.0.2"
226
226
  },
227
227
  "optionalDependencies": {
228
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.44",
229
- "oh-my-opencode-darwin-x64": "5.0.0-beta.44",
230
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.44",
231
- "oh-my-opencode-linux-arm64": "5.0.0-beta.44",
232
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.44",
233
- "oh-my-opencode-linux-x64": "5.0.0-beta.44",
234
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.44",
235
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.44",
236
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.44",
237
- "oh-my-opencode-windows-arm64": "5.0.0-beta.44",
238
- "oh-my-opencode-windows-x64": "5.0.0-beta.44",
239
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.44"
228
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.46",
229
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.46",
230
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.46",
231
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.46",
232
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.46",
233
+ "oh-my-opencode-linux-x64": "5.0.0-beta.46",
234
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.46",
235
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.46",
236
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.46",
237
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.46",
238
+ "oh-my-opencode-windows-x64": "5.0.0-beta.46",
239
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.46"
240
240
  },
241
241
  "overrides": {
242
242
  "@earendil-works/pi-agent-core": "0.84.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omo",
3
- "version": "5.0.0-beta.44",
3
+ "version": "5.0.0-beta.46",
4
4
  "description": "One Codex plugin namespace for Yeongyu's local Codex components.",
5
5
  "author": {
6
6
  "name": "Yeongyu Kim",
@@ -8,7 +8,7 @@
8
8
  "command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
9
9
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
10
10
  "timeout": 30,
11
- "statusMessage": "(OmO 5.0.0-beta.44) Checking Bootstrap Provisioning"
11
+ "statusMessage": "(OmO 5.0.0-beta.46) Checking Bootstrap Provisioning"
12
12
  }
13
13
  ]
14
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisyphuslabs/codex-bootstrap",
3
- "version": "5.0.0-beta.44",
3
+ "version": "5.0.0-beta.46",
4
4
  "description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.",
5
5
  "type": "module",
6
6
  "private": true,
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
10
10
  "timeout": 30,
11
- "statusMessage": "(OmO 5.0.0-beta.44) Checking Comments"
11
+ "statusMessage": "(OmO 5.0.0-beta.46) Checking Comments"
12
12
  }
13
13
  ]
14
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-comment-checker",
3
- "version": "5.0.0-beta.44",
3
+ "version": "5.0.0-beta.46",
4
4
  "description": "Codex plugin that runs comment-checker after edit-like PostToolUse hooks.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
10
10
  "timeout": 5,
11
- "statusMessage": "(OmO 5.0.0-beta.44) Recommending Git Bash MCP"
11
+ "statusMessage": "(OmO 5.0.0-beta.46) Recommending Git Bash MCP"
12
12
  }
13
13
  ]
14
14
  }
@@ -20,7 +20,7 @@
20
20
  "type": "command",
21
21
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
22
22
  "timeout": 5,
23
- "statusMessage": "(OmO 5.0.0-beta.44) Resetting Git Bash MCP Reminder"
23
+ "statusMessage": "(OmO 5.0.0-beta.46) Resetting Git Bash MCP Reminder"
24
24
  }
25
25
  ]
26
26
  }