oh-my-opencode 3.15.0 → 3.15.2

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.
package/dist/cli/index.js CHANGED
@@ -6360,7 +6360,7 @@ function getOpenCodeConfigPaths(options) {
6360
6360
  configJson: join4(configDir, "opencode.json"),
6361
6361
  configJsonc: join4(configDir, "opencode.jsonc"),
6362
6362
  packageJson: join4(configDir, "package.json"),
6363
- omoConfig: join4(configDir, "oh-my-opencode.json")
6363
+ omoConfig: join4(configDir, `${CONFIG_BASENAME}.json`)
6364
6364
  };
6365
6365
  }
6366
6366
  var TAURI_APP_IDENTIFIER = "ai.opencode.desktop", TAURI_APP_IDENTIFIER_DEV = "ai.opencode.desktop.dev";
@@ -48336,7 +48336,6 @@ var init_opencode_storage_paths = __esm(() => {
48336
48336
  // src/shared/opencode-message-dir.ts
48337
48337
  var init_opencode_message_dir = __esm(() => {
48338
48338
  init_opencode_storage_paths();
48339
- init_opencode_storage_detection();
48340
48339
  init_logger();
48341
48340
  });
48342
48341
 
@@ -48621,6 +48620,7 @@ var init_hook_loader = __esm(() => {
48621
48620
  });
48622
48621
 
48623
48622
  // src/features/claude-code-plugin-loader/loader.ts
48623
+ var cachedPluginComponentsByKey;
48624
48624
  var init_loader = __esm(() => {
48625
48625
  init_logger();
48626
48626
  init_discovery();
@@ -48635,6 +48635,7 @@ var init_loader = __esm(() => {
48635
48635
  init_agent_loader();
48636
48636
  init_mcp_server_loader();
48637
48637
  init_hook_loader();
48638
+ cachedPluginComponentsByKey = new Map;
48638
48639
  });
48639
48640
 
48640
48641
  // src/features/claude-code-plugin-loader/index.ts
@@ -48765,6 +48766,10 @@ function getConfigJsonc() {
48765
48766
  return getConfigContext().paths.configJsonc;
48766
48767
  }
48767
48768
  function getOmoConfigPath() {
48769
+ const configDir = getConfigContext().paths.configDir;
48770
+ const detected = detectPluginConfigFile(configDir);
48771
+ if (detected.format !== "none")
48772
+ return detected.path;
48768
48773
  return getConfigContext().paths.omoConfig;
48769
48774
  }
48770
48775
  var configContext = null;
@@ -49465,6 +49470,10 @@ var init_detect_current_config = __esm(() => {
49465
49470
 
49466
49471
  // src/cli/config-manager/bun-install.ts
49467
49472
  import { existsSync as existsSync9 } from "fs";
49473
+ import { join as join8 } from "path";
49474
+ function getDefaultWorkspaceDir() {
49475
+ return join8(getOpenCodeCacheDir(), "packages");
49476
+ }
49468
49477
  function readProcessOutput(stream) {
49469
49478
  if (!stream) {
49470
49479
  return Promise.resolve("");
@@ -49487,7 +49496,7 @@ function logCapturedOutputOnFailure(outputMode, output) {
49487
49496
  }
49488
49497
  async function runBunInstallWithDetails(options) {
49489
49498
  const outputMode = options?.outputMode ?? "pipe";
49490
- const cacheDir = options?.workspaceDir ?? getOpenCodeCacheDir();
49499
+ const cacheDir = options?.workspaceDir ?? getDefaultWorkspaceDir();
49491
49500
  const packageJsonPath = `${cacheDir}/package.json`;
49492
49501
  if (!existsSync9(packageJsonPath)) {
49493
49502
  return {
@@ -49633,16 +49642,23 @@ function getWindowsAppdataDir() {
49633
49642
  return null;
49634
49643
  return process.env.APPDATA ?? path4.join(os3.homedir(), "AppData", "Roaming");
49635
49644
  }
49636
- var PACKAGE_NAME = "oh-my-opencode", NPM_REGISTRY_URL, NPM_FETCH_TIMEOUT = 5000, CACHE_DIR, VERSION_FILE, USER_CONFIG_DIR, USER_OPENCODE_CONFIG, USER_OPENCODE_CONFIG_JSONC, INSTALLED_PACKAGE_JSON;
49645
+ function getUserConfigDir() {
49646
+ return getOpenCodeConfigDir({ binary: "opencode" });
49647
+ }
49648
+ function getUserOpencodeConfig() {
49649
+ return path4.join(getUserConfigDir(), "opencode.json");
49650
+ }
49651
+ function getUserOpencodeConfigJsonc() {
49652
+ return path4.join(getUserConfigDir(), "opencode.jsonc");
49653
+ }
49654
+ var PACKAGE_NAME = "oh-my-openagent", NPM_REGISTRY_URL, NPM_FETCH_TIMEOUT = 5000, CACHE_ROOT_DIR, CACHE_DIR, VERSION_FILE, INSTALLED_PACKAGE_JSON;
49637
49655
  var init_constants3 = __esm(() => {
49638
49656
  init_data_path();
49639
49657
  init_opencode_config_dir();
49640
49658
  NPM_REGISTRY_URL = `https://registry.npmjs.org/-/package/${PACKAGE_NAME}/dist-tags`;
49641
- CACHE_DIR = getOpenCodeCacheDir();
49642
- VERSION_FILE = path4.join(CACHE_DIR, "version");
49643
- USER_CONFIG_DIR = getOpenCodeConfigDir({ binary: "opencode" });
49644
- USER_OPENCODE_CONFIG = path4.join(USER_CONFIG_DIR, "opencode.json");
49645
- USER_OPENCODE_CONFIG_JSONC = path4.join(USER_CONFIG_DIR, "opencode.jsonc");
49659
+ CACHE_ROOT_DIR = getOpenCodeCacheDir();
49660
+ CACHE_DIR = path4.join(CACHE_ROOT_DIR, "packages");
49661
+ VERSION_FILE = path4.join(CACHE_ROOT_DIR, "version");
49646
49662
  INSTALLED_PACKAGE_JSON = path4.join(CACHE_DIR, "node_modules", PACKAGE_NAME, "package.json");
49647
49663
  });
49648
49664
 
@@ -49650,17 +49666,18 @@ var init_constants3 = __esm(() => {
49650
49666
  import * as os4 from "os";
49651
49667
  import * as path5 from "path";
49652
49668
  function getConfigPaths(directory) {
49669
+ const userConfigDir = getUserConfigDir();
49653
49670
  const paths = [
49654
49671
  path5.join(directory, ".opencode", "opencode.json"),
49655
49672
  path5.join(directory, ".opencode", "opencode.jsonc"),
49656
- USER_OPENCODE_CONFIG,
49657
- USER_OPENCODE_CONFIG_JSONC
49673
+ getUserOpencodeConfig(),
49674
+ getUserOpencodeConfigJsonc()
49658
49675
  ];
49659
49676
  if (process.platform === "win32") {
49660
49677
  const crossPlatformDir = path5.join(os4.homedir(), ".config");
49661
49678
  const appdataDir = getWindowsAppdataDir();
49662
49679
  if (appdataDir) {
49663
- const alternateDir = USER_CONFIG_DIR === crossPlatformDir ? appdataDir : crossPlatformDir;
49680
+ const alternateDir = userConfigDir === crossPlatformDir ? appdataDir : crossPlatformDir;
49664
49681
  const alternateConfig = path5.join(alternateDir, "opencode", "opencode.json");
49665
49682
  const alternateConfigJsonc = path5.join(alternateDir, "opencode", "opencode.jsonc");
49666
49683
  if (!paths.includes(alternateConfig)) {
@@ -49986,11 +50003,28 @@ function getIntentVersion(pluginInfo) {
49986
50003
  }
49987
50004
  return pluginInfo.pinnedVersion;
49988
50005
  }
50006
+ function writeCachePackageJson(cachePackageJsonPath, pkgJson) {
50007
+ const tmpPath = `${cachePackageJsonPath}.${crypto.randomUUID()}`;
50008
+ try {
50009
+ fs9.mkdirSync(path8.dirname(cachePackageJsonPath), { recursive: true });
50010
+ fs9.writeFileSync(tmpPath, JSON.stringify(pkgJson, null, 2));
50011
+ fs9.renameSync(tmpPath, cachePackageJsonPath);
50012
+ return { synced: true, error: null };
50013
+ } catch (err) {
50014
+ log("[auto-update-checker] Failed to write cache package.json:", err);
50015
+ safeUnlink(tmpPath);
50016
+ return { synced: false, error: "write_error", message: "Failed to write cache package.json" };
50017
+ }
50018
+ }
49989
50019
  function syncCachePackageJsonToIntent(pluginInfo) {
49990
50020
  const cachePackageJsonPath = path8.join(CACHE_DIR, "package.json");
50021
+ const intentVersion = getIntentVersion(pluginInfo);
49991
50022
  if (!fs9.existsSync(cachePackageJsonPath)) {
49992
- log("[auto-update-checker] Cache package.json not found, nothing to sync");
49993
- return { synced: false, error: "file_not_found", message: "Cache package.json not found" };
50023
+ log("[auto-update-checker] Cache package.json missing, creating workspace package.json", { intentVersion });
50024
+ return {
50025
+ ...writeCachePackageJson(cachePackageJsonPath, { dependencies: { [PACKAGE_NAME]: intentVersion } }),
50026
+ message: `Created cache package.json with: ${intentVersion}`
50027
+ };
49994
50028
  }
49995
50029
  let content;
49996
50030
  let pkgJson;
@@ -50007,11 +50041,20 @@ function syncCachePackageJsonToIntent(pluginInfo) {
50007
50041
  return { synced: false, error: "parse_error", message: "Failed to parse cache package.json (malformed JSON)" };
50008
50042
  }
50009
50043
  if (!pkgJson || !pkgJson.dependencies?.[PACKAGE_NAME]) {
50010
- log("[auto-update-checker] Plugin not in cache package.json dependencies, nothing to sync");
50011
- return { synced: false, error: "plugin_not_in_deps", message: "Plugin not in cache package.json dependencies" };
50044
+ log("[auto-update-checker] Plugin missing from cache package.json dependencies, adding dependency", { intentVersion });
50045
+ const nextPkgJson = {
50046
+ ...pkgJson ?? {},
50047
+ dependencies: {
50048
+ ...pkgJson?.dependencies ?? {},
50049
+ [PACKAGE_NAME]: intentVersion
50050
+ }
50051
+ };
50052
+ return {
50053
+ ...writeCachePackageJson(cachePackageJsonPath, nextPkgJson),
50054
+ message: `Added ${PACKAGE_NAME}: ${intentVersion}`
50055
+ };
50012
50056
  }
50013
50057
  const currentVersion = pkgJson.dependencies[PACKAGE_NAME];
50014
- const intentVersion = getIntentVersion(pluginInfo);
50015
50058
  if (currentVersion === intentVersion) {
50016
50059
  log("[auto-update-checker] Cache package.json already matches intent:", intentVersion);
50017
50060
  return { synced: false, error: null, message: `Already matches intent: ${intentVersion}` };
@@ -50024,16 +50067,10 @@ function syncCachePackageJsonToIntent(pluginInfo) {
50024
50067
  log(`[auto-update-checker] Updating cache package.json: "${currentVersion}" \u2192 "${intentVersion}"`);
50025
50068
  }
50026
50069
  pkgJson.dependencies[PACKAGE_NAME] = intentVersion;
50027
- const tmpPath = `${cachePackageJsonPath}.${crypto.randomUUID()}`;
50028
- try {
50029
- fs9.writeFileSync(tmpPath, JSON.stringify(pkgJson, null, 2));
50030
- fs9.renameSync(tmpPath, cachePackageJsonPath);
50031
- return { synced: true, error: null, message: `Updated: "${currentVersion}" \u2192 "${intentVersion}"` };
50032
- } catch (err) {
50033
- log("[auto-update-checker] Failed to write cache package.json:", err);
50034
- safeUnlink(tmpPath);
50035
- return { synced: false, error: "write_error", message: "Failed to write cache package.json" };
50036
- }
50070
+ return {
50071
+ ...writeCachePackageJson(cachePackageJsonPath, pkgJson),
50072
+ message: `Updated: "${currentVersion}" \u2192 "${intentVersion}"`
50073
+ };
50037
50074
  }
50038
50075
  var EXACT_SEMVER_REGEX2;
50039
50076
  var init_sync_package_json = __esm(() => {
@@ -50097,8 +50134,9 @@ function removeFromBunLock(packageName) {
50097
50134
  }
50098
50135
  function invalidatePackage(packageName = PACKAGE_NAME) {
50099
50136
  try {
50137
+ const userConfigDir = getUserConfigDir();
50100
50138
  const pkgDirs = [
50101
- path9.join(USER_CONFIG_DIR, "node_modules", packageName),
50139
+ path9.join(userConfigDir, "node_modules", packageName),
50102
50140
  path9.join(CACHE_DIR, "node_modules", packageName)
50103
50141
  ];
50104
50142
  let packageRemoved = false;
@@ -50160,13 +50198,16 @@ var init_update_toasts = __esm(() => {
50160
50198
 
50161
50199
  // src/hooks/auto-update-checker/hook/background-update-check.ts
50162
50200
  import { existsSync as existsSync21 } from "fs";
50163
- import { join as join19 } from "path";
50201
+ import { join as join20 } from "path";
50202
+ function getCacheWorkspaceDir(deps) {
50203
+ return deps.join(deps.getOpenCodeCacheDir(), "packages");
50204
+ }
50164
50205
  function getPinnedVersionToastMessage(latestVersion) {
50165
50206
  return `Update available: ${latestVersion} (version pinned, update manually)`;
50166
50207
  }
50167
50208
  function resolveActiveInstallWorkspace(deps) {
50168
50209
  const configPaths = deps.getOpenCodeConfigPaths({ binary: "opencode" });
50169
- const cacheDir = deps.getOpenCodeCacheDir();
50210
+ const cacheDir = getCacheWorkspaceDir(deps);
50170
50211
  const configInstallPath = deps.join(configPaths.configDir, "node_modules", PACKAGE_NAME, "package.json");
50171
50212
  const cacheInstallPath = deps.join(cacheDir, "node_modules", PACKAGE_NAME, "package.json");
50172
50213
  if (deps.existsSync(configInstallPath)) {
@@ -50177,6 +50218,11 @@ function resolveActiveInstallWorkspace(deps) {
50177
50218
  deps.log(`[auto-update-checker] Active workspace: cache-dir (${cacheDir})`);
50178
50219
  return cacheDir;
50179
50220
  }
50221
+ const cachePackageJsonPath = deps.join(cacheDir, "package.json");
50222
+ if (deps.existsSync(cachePackageJsonPath)) {
50223
+ deps.log(`[auto-update-checker] Active workspace: cache-dir (${cacheDir}, package.json present)`);
50224
+ return cacheDir;
50225
+ }
50180
50226
  deps.log(`[auto-update-checker] Active workspace: config-dir (default, no install detected)`);
50181
50227
  return configPaths.configDir;
50182
50228
  }
@@ -50193,6 +50239,14 @@ async function runBunInstallSafe(workspaceDir, deps) {
50193
50239
  return false;
50194
50240
  }
50195
50241
  }
50242
+ async function primeCacheWorkspace(activeWorkspace, deps) {
50243
+ const cacheWorkspace = getCacheWorkspaceDir(deps);
50244
+ if (activeWorkspace === cacheWorkspace) {
50245
+ return true;
50246
+ }
50247
+ deps.log(`[auto-update-checker] Priming cache workspace after install: ${cacheWorkspace}`);
50248
+ return runBunInstallSafe(cacheWorkspace, deps);
50249
+ }
50196
50250
  function createBackgroundUpdateCheckRunner(overrides = {}) {
50197
50251
  const deps = { ...defaultDeps, ...overrides };
50198
50252
  return async function runBackgroundUpdateCheck(ctx, autoUpdate, getToastMessage) {
@@ -50238,6 +50292,12 @@ function createBackgroundUpdateCheckRunner(overrides = {}) {
50238
50292
  const activeWorkspace = resolveActiveInstallWorkspace(deps);
50239
50293
  const installSuccess = await runBunInstallSafe(activeWorkspace, deps);
50240
50294
  if (installSuccess) {
50295
+ const cachePrimed = await primeCacheWorkspace(activeWorkspace, deps);
50296
+ if (!cachePrimed) {
50297
+ await deps.showUpdateAvailableToast(ctx, latestVersion, getToastMessage);
50298
+ deps.log("[auto-update-checker] cache workspace priming failed after install");
50299
+ return;
50300
+ }
50241
50301
  await deps.showAutoUpdatedToast(ctx, currentVersion, latestVersion);
50242
50302
  deps.log(`[auto-update-checker] Update installed: ${currentVersion} \u2192 ${latestVersion}`);
50243
50303
  return;
@@ -50257,7 +50317,7 @@ var init_background_update_check = __esm(() => {
50257
50317
  init_update_toasts();
50258
50318
  defaultDeps = {
50259
50319
  existsSync: existsSync21,
50260
- join: join19,
50320
+ join: join20,
50261
50321
  runBunInstallWithDetails,
50262
50322
  log,
50263
50323
  getOpenCodeCacheDir,
@@ -50537,7 +50597,7 @@ var {
50537
50597
  // package.json
50538
50598
  var package_default = {
50539
50599
  name: "oh-my-opencode",
50540
- version: "3.15.0",
50600
+ version: "3.15.2",
50541
50601
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
50542
50602
  main: "./dist/index.js",
50543
50603
  types: "dist/index.d.ts",
@@ -50615,17 +50675,17 @@ var package_default = {
50615
50675
  typescript: "^5.7.3"
50616
50676
  },
50617
50677
  optionalDependencies: {
50618
- "oh-my-opencode-darwin-arm64": "3.15.0",
50619
- "oh-my-opencode-darwin-x64": "3.15.0",
50620
- "oh-my-opencode-darwin-x64-baseline": "3.15.0",
50621
- "oh-my-opencode-linux-arm64": "3.15.0",
50622
- "oh-my-opencode-linux-arm64-musl": "3.15.0",
50623
- "oh-my-opencode-linux-x64": "3.15.0",
50624
- "oh-my-opencode-linux-x64-baseline": "3.15.0",
50625
- "oh-my-opencode-linux-x64-musl": "3.15.0",
50626
- "oh-my-opencode-linux-x64-musl-baseline": "3.15.0",
50627
- "oh-my-opencode-windows-x64": "3.15.0",
50628
- "oh-my-opencode-windows-x64-baseline": "3.15.0"
50678
+ "oh-my-opencode-darwin-arm64": "3.15.2",
50679
+ "oh-my-opencode-darwin-x64": "3.15.2",
50680
+ "oh-my-opencode-darwin-x64-baseline": "3.15.2",
50681
+ "oh-my-opencode-linux-arm64": "3.15.2",
50682
+ "oh-my-opencode-linux-arm64-musl": "3.15.2",
50683
+ "oh-my-opencode-linux-x64": "3.15.2",
50684
+ "oh-my-opencode-linux-x64-baseline": "3.15.2",
50685
+ "oh-my-opencode-linux-x64-musl": "3.15.2",
50686
+ "oh-my-opencode-linux-x64-musl-baseline": "3.15.2",
50687
+ "oh-my-opencode-windows-x64": "3.15.2",
50688
+ "oh-my-opencode-windows-x64-baseline": "3.15.2"
50629
50689
  },
50630
50690
  overrides: {
50631
50691
  "@opencode-ai/sdk": "^1.2.24"
@@ -66429,11 +66489,11 @@ init_shared();
66429
66489
  init_logger();
66430
66490
  init_write_file_atomically();
66431
66491
  import { existsSync as existsSync10, readFileSync as readFileSync8, renameSync as renameSync2, rmSync } from "fs";
66432
- import { join as join8, dirname, basename } from "path";
66492
+ import { join as join9, dirname, basename } from "path";
66433
66493
  function buildCanonicalPath(legacyPath) {
66434
66494
  const dir = dirname(legacyPath);
66435
66495
  const ext = basename(legacyPath).includes(".jsonc") ? ".jsonc" : ".json";
66436
- return join8(dir, `${CONFIG_BASENAME}${ext}`);
66496
+ return join9(dir, `${CONFIG_BASENAME}${ext}`);
66437
66497
  }
66438
66498
  function archiveLegacyConfigFile(legacyPath) {
66439
66499
  const backupPath = `${legacyPath}.bak`;
@@ -66616,7 +66676,7 @@ function mergeConfigs(base, override) {
66616
66676
  function loadPluginConfig(directory, ctx) {
66617
66677
  const configDir = getOpenCodeConfigDir({ binary: "opencode" });
66618
66678
  const userDetected = detectPluginConfigFile(configDir);
66619
- let userConfigPath = userDetected.format !== "none" ? userDetected.path : path3.join(configDir, "oh-my-opencode.json");
66679
+ let userConfigPath = userDetected.format !== "none" ? userDetected.path : path3.join(configDir, `${CONFIG_BASENAME}.json`);
66620
66680
  if (userDetected.legacyPath) {
66621
66681
  log("Canonical plugin config detected alongside legacy config. Remove the legacy file to avoid confusion.", {
66622
66682
  canonicalPath: userDetected.path,
@@ -66624,12 +66684,15 @@ function loadPluginConfig(directory, ctx) {
66624
66684
  });
66625
66685
  }
66626
66686
  if (userDetected.format !== "none" && path3.basename(userDetected.path).startsWith(LEGACY_CONFIG_BASENAME)) {
66627
- migrateLegacyConfigFile(userDetected.path);
66628
- userConfigPath = path3.join(path3.dirname(userDetected.path), `${CONFIG_BASENAME}${path3.extname(userDetected.path)}`);
66687
+ const migrated = migrateLegacyConfigFile(userDetected.path);
66688
+ const canonicalPath = path3.join(path3.dirname(userDetected.path), `${CONFIG_BASENAME}${path3.extname(userDetected.path)}`);
66689
+ if (migrated || fs3.existsSync(canonicalPath)) {
66690
+ userConfigPath = canonicalPath;
66691
+ }
66629
66692
  }
66630
66693
  const projectBasePath = path3.join(directory, ".opencode");
66631
66694
  const projectDetected = detectPluginConfigFile(projectBasePath);
66632
- let projectConfigPath = projectDetected.format !== "none" ? projectDetected.path : path3.join(projectBasePath, "oh-my-opencode.json");
66695
+ let projectConfigPath = projectDetected.format !== "none" ? projectDetected.path : path3.join(projectBasePath, `${CONFIG_BASENAME}.json`);
66633
66696
  if (projectDetected.legacyPath) {
66634
66697
  log("Canonical plugin config detected alongside legacy config. Remove the legacy file to avoid confusion.", {
66635
66698
  canonicalPath: projectDetected.path,
@@ -66637,8 +66700,11 @@ function loadPluginConfig(directory, ctx) {
66637
66700
  });
66638
66701
  }
66639
66702
  if (projectDetected.format !== "none" && path3.basename(projectDetected.path).startsWith(LEGACY_CONFIG_BASENAME)) {
66640
- migrateLegacyConfigFile(projectDetected.path);
66641
- projectConfigPath = path3.join(path3.dirname(projectDetected.path), `${CONFIG_BASENAME}${path3.extname(projectDetected.path)}`);
66703
+ const projectMigrated = migrateLegacyConfigFile(projectDetected.path);
66704
+ const canonicalProjectPath = path3.join(path3.dirname(projectDetected.path), `${CONFIG_BASENAME}${path3.extname(projectDetected.path)}`);
66705
+ if (projectMigrated || fs3.existsSync(canonicalProjectPath)) {
66706
+ projectConfigPath = canonicalProjectPath;
66707
+ }
66642
66708
  }
66643
66709
  const userConfig = loadConfigFromPath(userConfigPath, ctx);
66644
66710
  let config2 = userConfig ?? OhMyOpenCodeConfigSchema.parse({});
@@ -68107,7 +68173,7 @@ var import_picocolors9 = __toESM(require_picocolors(), 1);
68107
68173
 
68108
68174
  // src/cli/run/opencode-binary-resolver.ts
68109
68175
  init_spawn_with_windows_hide();
68110
- import { delimiter, dirname as dirname3, join as join10 } from "path";
68176
+ import { delimiter, dirname as dirname3, join as join11 } from "path";
68111
68177
  var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
68112
68178
  var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
68113
68179
  function getCommandCandidates(platform) {
@@ -68130,7 +68196,7 @@ function collectCandidateBinaryPaths(pathEnv, which = Bun.which, platform = proc
68130
68196
  }
68131
68197
  for (const entry of (pathEnv ?? "").split(delimiter).filter(Boolean)) {
68132
68198
  for (const command of commandCandidates) {
68133
- addCandidate(join10(entry, command));
68199
+ addCandidate(join11(entry, command));
68134
68200
  }
68135
68201
  }
68136
68202
  return candidates;
@@ -68514,10 +68580,10 @@ var NOTEPAD_DIR = "notepads";
68514
68580
  var NOTEPAD_BASE_PATH = `${BOULDER_DIR}/${NOTEPAD_DIR}`;
68515
68581
  // src/features/boulder-state/storage.ts
68516
68582
  import { existsSync as existsSync12, readFileSync as readFileSync10, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, readdirSync } from "fs";
68517
- import { dirname as dirname4, join as join11, basename as basename3 } from "path";
68583
+ import { dirname as dirname4, join as join12, basename as basename3 } from "path";
68518
68584
  var RESERVED_KEYS = new Set(["__proto__", "prototype", "constructor"]);
68519
68585
  function getBoulderFilePath(directory) {
68520
- return join11(directory, BOULDER_DIR, BOULDER_FILE);
68586
+ return join12(directory, BOULDER_DIR, BOULDER_FILE);
68521
68587
  }
68522
68588
  function readBoulderState(directory) {
68523
68589
  const filePath = getBoulderFilePath(directory);
@@ -68564,9 +68630,9 @@ function getPlanProgress(planPath) {
68564
68630
  var CONTINUATION_MARKER_DIR = ".sisyphus/run-continuation";
68565
68631
  // src/features/run-continuation-state/storage.ts
68566
68632
  import { existsSync as existsSync13, mkdirSync as mkdirSync5, readFileSync as readFileSync11, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "fs";
68567
- import { join as join12 } from "path";
68633
+ import { join as join13 } from "path";
68568
68634
  function getMarkerPath(directory, sessionID) {
68569
- return join12(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
68635
+ return join13(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
68570
68636
  }
68571
68637
  function readContinuationMarker(directory, sessionID) {
68572
68638
  const markerPath = getMarkerPath(directory, sessionID);
@@ -68599,7 +68665,7 @@ function getActiveContinuationMarkerReason(marker) {
68599
68665
  // src/hooks/ralph-loop/storage.ts
68600
68666
  init_frontmatter();
68601
68667
  import { existsSync as existsSync14, readFileSync as readFileSync12, writeFileSync as writeFileSync7, unlinkSync, mkdirSync as mkdirSync6 } from "fs";
68602
- import { dirname as dirname5, join as join13 } from "path";
68668
+ import { dirname as dirname5, join as join14 } from "path";
68603
68669
 
68604
68670
  // src/hooks/ralph-loop/constants.ts
68605
68671
  var DEFAULT_STATE_FILE = ".sisyphus/ralph-loop.local.md";
@@ -68608,7 +68674,7 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";
68608
68674
 
68609
68675
  // src/hooks/ralph-loop/storage.ts
68610
68676
  function getStateFilePath(directory, customPath) {
68611
- return customPath ? join13(directory, customPath) : join13(directory, DEFAULT_STATE_FILE);
68677
+ return customPath ? join14(directory, customPath) : join14(directory, DEFAULT_STATE_FILE);
68612
68678
  }
68613
68679
  function readState(directory, customPath) {
68614
68680
  const filePath = getStateFilePath(directory, customPath);
@@ -69328,24 +69394,24 @@ import { existsSync as existsSync25, readFileSync as readFileSync22 } from "fs";
69328
69394
  init_spawn_with_windows_hide();
69329
69395
  import { existsSync as existsSync22 } from "fs";
69330
69396
  import { homedir as homedir5 } from "os";
69331
- import { join as join20 } from "path";
69397
+ import { join as join21 } from "path";
69332
69398
  function getDesktopAppPaths(platform) {
69333
69399
  const home = homedir5();
69334
69400
  switch (platform) {
69335
69401
  case "darwin":
69336
69402
  return [
69337
69403
  "/Applications/OpenCode.app/Contents/MacOS/OpenCode",
69338
- join20(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
69404
+ join21(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
69339
69405
  ];
69340
69406
  case "win32": {
69341
69407
  const programFiles = process.env.ProgramFiles;
69342
69408
  const localAppData = process.env.LOCALAPPDATA;
69343
69409
  const paths = [];
69344
69410
  if (programFiles) {
69345
- paths.push(join20(programFiles, "OpenCode", "OpenCode.exe"));
69411
+ paths.push(join21(programFiles, "OpenCode", "OpenCode.exe"));
69346
69412
  }
69347
69413
  if (localAppData) {
69348
- paths.push(join20(localAppData, "OpenCode", "OpenCode.exe"));
69414
+ paths.push(join21(localAppData, "OpenCode", "OpenCode.exe"));
69349
69415
  }
69350
69416
  return paths;
69351
69417
  }
@@ -69353,8 +69419,8 @@ function getDesktopAppPaths(platform) {
69353
69419
  return [
69354
69420
  "/usr/bin/opencode",
69355
69421
  "/usr/lib/opencode/opencode",
69356
- join20(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
69357
- join20(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
69422
+ join21(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
69423
+ join21(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
69358
69424
  ];
69359
69425
  default:
69360
69426
  return [];
@@ -69505,21 +69571,21 @@ init_checker();
69505
69571
  init_auto_update_checker();
69506
69572
  import { existsSync as existsSync24, readFileSync as readFileSync21 } from "fs";
69507
69573
  import { homedir as homedir6 } from "os";
69508
- import { join as join21 } from "path";
69574
+ import { join as join22 } from "path";
69509
69575
  init_shared();
69510
69576
  function getPlatformDefaultCacheDir(platform = process.platform) {
69511
69577
  if (platform === "darwin")
69512
- return join21(homedir6(), "Library", "Caches");
69578
+ return join22(homedir6(), "Library", "Caches");
69513
69579
  if (platform === "win32")
69514
- return process.env.LOCALAPPDATA ?? join21(homedir6(), "AppData", "Local");
69515
- return join21(homedir6(), ".cache");
69580
+ return process.env.LOCALAPPDATA ?? join22(homedir6(), "AppData", "Local");
69581
+ return join22(homedir6(), ".cache");
69516
69582
  }
69517
69583
  function resolveOpenCodeCacheDir() {
69518
69584
  const xdgCacheHome = process.env.XDG_CACHE_HOME;
69519
69585
  if (xdgCacheHome)
69520
- return join21(xdgCacheHome, "opencode");
69586
+ return join22(xdgCacheHome, "opencode");
69521
69587
  const fromShared = getOpenCodeCacheDir();
69522
- const platformDefault = join21(getPlatformDefaultCacheDir(), "opencode");
69588
+ const platformDefault = join22(getPlatformDefaultCacheDir(), "opencode");
69523
69589
  if (existsSync24(fromShared) || !existsSync24(platformDefault))
69524
69590
  return fromShared;
69525
69591
  return platformDefault;
@@ -69552,13 +69618,13 @@ function getLoadedPluginVersion() {
69552
69618
  const candidates = [
69553
69619
  {
69554
69620
  cacheDir: configDir,
69555
- cachePackagePath: join21(configDir, "package.json"),
69556
- installedPackagePath: join21(configDir, "node_modules", PACKAGE_NAME2, "package.json")
69621
+ cachePackagePath: join22(configDir, "package.json"),
69622
+ installedPackagePath: join22(configDir, "node_modules", PACKAGE_NAME2, "package.json")
69557
69623
  },
69558
69624
  {
69559
69625
  cacheDir,
69560
- cachePackagePath: join21(cacheDir, "package.json"),
69561
- installedPackagePath: join21(cacheDir, "node_modules", PACKAGE_NAME2, "package.json")
69626
+ cachePackagePath: join22(cacheDir, "package.json"),
69627
+ installedPackagePath: join22(cacheDir, "node_modules", PACKAGE_NAME2, "package.json")
69562
69628
  }
69563
69629
  ];
69564
69630
  const selectedCandidate = candidates.find((candidate) => existsSync24(candidate.installedPackagePath)) ?? candidates[0];
@@ -69708,22 +69774,22 @@ async function checkSystem() {
69708
69774
 
69709
69775
  // src/cli/doctor/checks/config.ts
69710
69776
  import { readFileSync as readFileSync25 } from "fs";
69711
- import { join as join25 } from "path";
69777
+ import { join as join26 } from "path";
69712
69778
  init_shared();
69713
69779
 
69714
69780
  // src/cli/doctor/checks/model-resolution-cache.ts
69715
69781
  init_shared();
69716
69782
  import { existsSync as existsSync26, readFileSync as readFileSync23 } from "fs";
69717
69783
  import { homedir as homedir7 } from "os";
69718
- import { join as join22 } from "path";
69784
+ import { join as join23 } from "path";
69719
69785
  function getOpenCodeCacheDir2() {
69720
69786
  const xdgCache = process.env.XDG_CACHE_HOME;
69721
69787
  if (xdgCache)
69722
- return join22(xdgCache, "opencode");
69723
- return join22(homedir7(), ".cache", "opencode");
69788
+ return join23(xdgCache, "opencode");
69789
+ return join23(homedir7(), ".cache", "opencode");
69724
69790
  }
69725
69791
  function loadAvailableModelsFromCache() {
69726
- const cacheFile = join22(getOpenCodeCacheDir2(), "models.json");
69792
+ const cacheFile = join23(getOpenCodeCacheDir2(), "models.json");
69727
69793
  if (!existsSync26(cacheFile)) {
69728
69794
  return { providers: [], modelCount: 0, cacheExists: false };
69729
69795
  }
@@ -69751,9 +69817,8 @@ init_model_capabilities();
69751
69817
  // src/cli/doctor/checks/model-resolution-config.ts
69752
69818
  init_shared();
69753
69819
  import { readFileSync as readFileSync24 } from "fs";
69754
- import { join as join23 } from "path";
69755
- var USER_CONFIG_DIR2 = getOpenCodeConfigPaths({ binary: "opencode", version: null }).configDir;
69756
- var PROJECT_CONFIG_DIR = join23(process.cwd(), ".opencode");
69820
+ import { join as join24 } from "path";
69821
+ var PROJECT_CONFIG_DIR = join24(process.cwd(), ".opencode");
69757
69822
  function loadOmoConfig() {
69758
69823
  const projectDetected = detectPluginConfigFile(PROJECT_CONFIG_DIR);
69759
69824
  if (projectDetected.format !== "none") {
@@ -69764,7 +69829,8 @@ function loadOmoConfig() {
69764
69829
  return null;
69765
69830
  }
69766
69831
  }
69767
- const userDetected = detectPluginConfigFile(USER_CONFIG_DIR2);
69832
+ const userConfigDir = getOpenCodeConfigDir({ binary: "opencode" });
69833
+ const userDetected = detectPluginConfigFile(userConfigDir);
69768
69834
  if (userDetected.format !== "none") {
69769
69835
  try {
69770
69836
  const content = readFileSync24(userDetected.path, "utf-8");
@@ -69778,7 +69844,7 @@ function loadOmoConfig() {
69778
69844
 
69779
69845
  // src/cli/doctor/checks/model-resolution-details.ts
69780
69846
  init_shared();
69781
- import { join as join24 } from "path";
69847
+ import { join as join25 } from "path";
69782
69848
 
69783
69849
  // src/cli/doctor/checks/model-resolution-variant.ts
69784
69850
  function formatModelWithVariant(model, variant) {
@@ -69820,7 +69886,7 @@ function formatCapabilityResolutionLabel(mode) {
69820
69886
  }
69821
69887
  function buildModelResolutionDetails(options) {
69822
69888
  const details = [];
69823
- const cacheFile = join24(getOpenCodeCacheDir(), "models.json");
69889
+ const cacheFile = join25(getOpenCodeCacheDir(), "models.json");
69824
69890
  details.push("\u2550\u2550\u2550 Available Models (from cache) \u2550\u2550\u2550");
69825
69891
  details.push("");
69826
69892
  if (options.available.cacheExists) {
@@ -69975,13 +70041,13 @@ async function checkModels() {
69975
70041
  }
69976
70042
 
69977
70043
  // src/cli/doctor/checks/config.ts
69978
- var USER_CONFIG_DIR3 = getOpenCodeConfigDir({ binary: "opencode" });
69979
- var PROJECT_CONFIG_DIR2 = join25(process.cwd(), ".opencode");
70044
+ var PROJECT_CONFIG_DIR2 = join26(process.cwd(), ".opencode");
69980
70045
  function findConfigPath() {
69981
70046
  const projectConfig = detectPluginConfigFile(PROJECT_CONFIG_DIR2);
69982
70047
  if (projectConfig.format !== "none")
69983
70048
  return projectConfig.path;
69984
- const userConfig = detectPluginConfigFile(USER_CONFIG_DIR3);
70049
+ const userConfigDir = getOpenCodeConfigDir({ binary: "opencode" });
70050
+ const userConfig = detectPluginConfigFile(userConfigDir);
69985
70051
  if (userConfig.format !== "none")
69986
70052
  return userConfig.path;
69987
70053
  return null;
@@ -70098,7 +70164,7 @@ async function checkConfig() {
70098
70164
  init_spawn_with_windows_hide();
70099
70165
  import { existsSync as existsSync27 } from "fs";
70100
70166
  import { createRequire } from "module";
70101
- import { dirname as dirname8, join as join26 } from "path";
70167
+ import { dirname as dirname9, join as join27 } from "path";
70102
70168
  async function checkBinaryExists(binary2) {
70103
70169
  try {
70104
70170
  const path10 = Bun.which(binary2);
@@ -70155,11 +70221,11 @@ async function checkAstGrepNapi() {
70155
70221
  };
70156
70222
  } catch {
70157
70223
  const { existsSync: existsSync28 } = await import("fs");
70158
- const { join: join27 } = await import("path");
70224
+ const { join: join28 } = await import("path");
70159
70225
  const { homedir: homedir8 } = await import("os");
70160
70226
  const pathsToCheck = [
70161
- join27(homedir8(), ".config", "opencode", "node_modules", "@ast-grep", "napi"),
70162
- join27(process.cwd(), "node_modules", "@ast-grep", "napi")
70227
+ join28(homedir8(), ".config", "opencode", "node_modules", "@ast-grep", "napi"),
70228
+ join28(process.cwd(), "node_modules", "@ast-grep", "napi")
70163
70229
  ];
70164
70230
  for (const napiPath of pathsToCheck) {
70165
70231
  if (existsSync28(napiPath)) {
@@ -70187,7 +70253,7 @@ function findCommentCheckerPackageBinary() {
70187
70253
  try {
70188
70254
  const require2 = createRequire(import.meta.url);
70189
70255
  const pkgPath = require2.resolve("@code-yeongyu/comment-checker/package.json");
70190
- const binaryPath = join26(dirname8(pkgPath), "bin", binaryName);
70256
+ const binaryPath = join27(dirname9(pkgPath), "bin", binaryName);
70191
70257
  if (existsSync27(binaryPath))
70192
70258
  return binaryPath;
70193
70259
  } catch {}
@@ -70346,7 +70412,7 @@ var BUILTIN_SERVERS = {
70346
70412
  };
70347
70413
  // src/tools/lsp/server-config-loader.ts
70348
70414
  import { existsSync as existsSync28, readFileSync as readFileSync26 } from "fs";
70349
- import { join as join27 } from "path";
70415
+ import { join as join28 } from "path";
70350
70416
  init_shared();
70351
70417
  init_jsonc_parser();
70352
70418
  function loadJsonFile(path10) {
@@ -70362,9 +70428,9 @@ function getConfigPaths2() {
70362
70428
  const cwd = process.cwd();
70363
70429
  const configDir = getOpenCodeConfigDir({ binary: "opencode" });
70364
70430
  return {
70365
- project: detectPluginConfigFile(join27(cwd, ".opencode")).path,
70431
+ project: detectPluginConfigFile(join28(cwd, ".opencode")).path,
70366
70432
  user: detectPluginConfigFile(configDir).path,
70367
- opencode: detectConfigFile(join27(configDir, "opencode")).path
70433
+ opencode: detectConfigFile(join28(configDir, "opencode")).path
70368
70434
  };
70369
70435
  }
70370
70436
  function loadAllConfigs() {
@@ -70434,20 +70500,20 @@ function getMergedServers() {
70434
70500
 
70435
70501
  // src/tools/lsp/server-installation.ts
70436
70502
  import { existsSync as existsSync29 } from "fs";
70437
- import { delimiter as delimiter2, join as join29 } from "path";
70503
+ import { delimiter as delimiter2, join as join30 } from "path";
70438
70504
 
70439
70505
  // src/tools/lsp/server-path-bases.ts
70440
70506
  init_shared();
70441
- import { join as join28 } from "path";
70507
+ import { join as join29 } from "path";
70442
70508
  function getLspServerAdditionalPathBases(workingDirectory) {
70443
70509
  const configDir = getOpenCodeConfigDir({ binary: "opencode" });
70444
- const dataDir = join28(getDataDir(), "opencode");
70510
+ const dataDir = join29(getDataDir(), "opencode");
70445
70511
  return [
70446
- join28(workingDirectory, "node_modules", ".bin"),
70447
- join28(configDir, "bin"),
70448
- join28(configDir, "node_modules", ".bin"),
70449
- join28(dataDir, "bin"),
70450
- join28(dataDir, "bin", "node_modules", ".bin")
70512
+ join29(workingDirectory, "node_modules", ".bin"),
70513
+ join29(configDir, "bin"),
70514
+ join29(configDir, "node_modules", ".bin"),
70515
+ join29(dataDir, "bin"),
70516
+ join29(dataDir, "bin", "node_modules", ".bin")
70451
70517
  ];
70452
70518
  }
70453
70519
 
@@ -70478,14 +70544,14 @@ function isServerInstalled(command) {
70478
70544
  const paths = pathEnv.split(delimiter2);
70479
70545
  for (const p2 of paths) {
70480
70546
  for (const suffix of exts) {
70481
- if (existsSync29(join29(p2, cmd + suffix))) {
70547
+ if (existsSync29(join30(p2, cmd + suffix))) {
70482
70548
  return true;
70483
70549
  }
70484
70550
  }
70485
70551
  }
70486
70552
  for (const base of getLspServerAdditionalPathBases(process.cwd())) {
70487
70553
  for (const suffix of exts) {
70488
- if (existsSync29(join29(base, cmd + suffix))) {
70554
+ if (existsSync29(join30(base, cmd + suffix))) {
70489
70555
  return true;
70490
70556
  }
70491
70557
  }
@@ -70549,13 +70615,13 @@ function getInstalledLspServers() {
70549
70615
  init_shared();
70550
70616
  import { existsSync as existsSync30, readFileSync as readFileSync27 } from "fs";
70551
70617
  import { homedir as homedir8 } from "os";
70552
- import { join as join30 } from "path";
70618
+ import { join as join31 } from "path";
70553
70619
  var BUILTIN_MCP_SERVERS = ["context7", "grep_app"];
70554
70620
  function getMcpConfigPaths() {
70555
70621
  return [
70556
- join30(homedir8(), ".claude", ".mcp.json"),
70557
- join30(process.cwd(), ".mcp.json"),
70558
- join30(process.cwd(), ".claude", ".mcp.json")
70622
+ join31(homedir8(), ".claude", ".mcp.json"),
70623
+ join31(process.cwd(), ".mcp.json"),
70624
+ join31(process.cwd(), ".claude", ".mcp.json")
70559
70625
  ];
70560
70626
  }
70561
70627
  function loadUserMcpConfig() {
@@ -71017,11 +71083,11 @@ async function refreshModelCapabilities(options, deps = {}) {
71017
71083
 
71018
71084
  // src/features/mcp-oauth/storage.ts
71019
71085
  init_shared();
71020
- import { chmodSync, existsSync as existsSync31, mkdirSync as mkdirSync7, readFileSync as readFileSync28, unlinkSync as unlinkSync4, writeFileSync as writeFileSync10 } from "fs";
71021
- import { dirname as dirname9, join as join31 } from "path";
71086
+ import { chmodSync, existsSync as existsSync31, mkdirSync as mkdirSync8, readFileSync as readFileSync28, unlinkSync as unlinkSync4, writeFileSync as writeFileSync10 } from "fs";
71087
+ import { dirname as dirname10, join as join32 } from "path";
71022
71088
  var STORAGE_FILE_NAME = "mcp-oauth.json";
71023
71089
  function getMcpOauthStoragePath() {
71024
- return join31(getOpenCodeConfigDir({ binary: "opencode" }), STORAGE_FILE_NAME);
71090
+ return join32(getOpenCodeConfigDir({ binary: "opencode" }), STORAGE_FILE_NAME);
71025
71091
  }
71026
71092
  function normalizeHost(serverHost) {
71027
71093
  let host = serverHost.trim();
@@ -71071,9 +71137,9 @@ function readStore() {
71071
71137
  function writeStore(store2) {
71072
71138
  const filePath = getMcpOauthStoragePath();
71073
71139
  try {
71074
- const dir = dirname9(filePath);
71140
+ const dir = dirname10(filePath);
71075
71141
  if (!existsSync31(dir)) {
71076
- mkdirSync7(dir, { recursive: true });
71142
+ mkdirSync8(dir, { recursive: true });
71077
71143
  }
71078
71144
  writeFileSync10(filePath, JSON.stringify(store2, null, 2), { encoding: "utf-8", mode: 384 });
71079
71145
  chmodSync(filePath, 384);