oh-my-opencode 3.0.0-beta.7 → 3.0.0-beta.8

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 (36) hide show
  1. package/README.md +7 -5
  2. package/README.zh-cn.md +5 -0
  3. package/bin/oh-my-opencode.js +80 -0
  4. package/bin/platform.js +38 -0
  5. package/bin/platform.test.ts +148 -0
  6. package/dist/agents/sisyphus-junior.d.ts +1 -1
  7. package/dist/cli/config-manager.d.ts +9 -1
  8. package/dist/cli/index.js +172 -119
  9. package/dist/config/schema.d.ts +2 -0
  10. package/dist/features/background-agent/manager.d.ts +5 -0
  11. package/dist/features/hook-message-injector/index.d.ts +1 -1
  12. package/dist/features/opencode-skill-loader/skill-content.d.ts +10 -0
  13. package/dist/features/skill-mcp-manager/manager.d.ts +10 -0
  14. package/dist/features/task-toast-manager/index.d.ts +1 -1
  15. package/dist/features/task-toast-manager/manager.d.ts +2 -1
  16. package/dist/features/task-toast-manager/types.d.ts +5 -0
  17. package/dist/hooks/comment-checker/cli.d.ts +0 -1
  18. package/dist/hooks/comment-checker/cli.test.d.ts +1 -0
  19. package/dist/hooks/index.d.ts +1 -0
  20. package/dist/hooks/sisyphus-task-retry/index.d.ts +24 -0
  21. package/dist/hooks/sisyphus-task-retry/index.test.d.ts +1 -0
  22. package/dist/index.js +2300 -413
  23. package/dist/shared/index.d.ts +2 -0
  24. package/dist/shared/session-cursor.d.ts +13 -0
  25. package/dist/shared/session-cursor.test.d.ts +1 -0
  26. package/dist/shared/shell-env.d.ts +41 -0
  27. package/dist/shared/shell-env.test.d.ts +1 -0
  28. package/dist/tools/look-at/tools.d.ts +7 -0
  29. package/dist/tools/look-at/tools.test.d.ts +1 -0
  30. package/dist/tools/lsp/client.d.ts +0 -7
  31. package/dist/tools/lsp/constants.d.ts +0 -3
  32. package/dist/tools/lsp/tools.d.ts +0 -3
  33. package/dist/tools/lsp/types.d.ts +0 -56
  34. package/dist/tools/lsp/utils.d.ts +1 -8
  35. package/package.json +18 -3
  36. package/postinstall.mjs +43 -0
package/dist/cli/index.js CHANGED
@@ -5943,6 +5943,11 @@ var init_external_plugin_detector = __esm(() => {
5943
5943
 
5944
5944
  // src/shared/zip-extractor.ts
5945
5945
  var init_zip_extractor = () => {};
5946
+ // src/shared/session-cursor.ts
5947
+ var sessionCursors;
5948
+ var init_session_cursor = __esm(() => {
5949
+ sessionCursors = new Map;
5950
+ });
5946
5951
  // src/shared/index.ts
5947
5952
  var init_shared = __esm(() => {
5948
5953
  init_frontmatter();
@@ -5965,6 +5970,7 @@ var init_shared = __esm(() => {
5965
5970
  init_permission_compat();
5966
5971
  init_external_plugin_detector();
5967
5972
  init_zip_extractor();
5973
+ init_session_cursor();
5968
5974
  });
5969
5975
 
5970
5976
  // src/cli/config-manager.ts
@@ -6030,6 +6036,31 @@ async function fetchLatestVersion(packageName) {
6030
6036
  return null;
6031
6037
  }
6032
6038
  }
6039
+ async function fetchNpmDistTags(packageName) {
6040
+ try {
6041
+ const res = await fetch(`https://registry.npmjs.org/-/package/${packageName}/dist-tags`, {
6042
+ signal: AbortSignal.timeout(NPM_FETCH_TIMEOUT_MS)
6043
+ });
6044
+ if (!res.ok)
6045
+ return null;
6046
+ const data = await res.json();
6047
+ return data;
6048
+ } catch {
6049
+ return null;
6050
+ }
6051
+ }
6052
+ async function getPluginNameWithVersion(currentVersion) {
6053
+ const distTags = await fetchNpmDistTags(PACKAGE_NAME);
6054
+ if (distTags) {
6055
+ const allTags = new Set([...PRIORITIZED_TAGS, ...Object.keys(distTags)]);
6056
+ for (const tag of allTags) {
6057
+ if (distTags[tag] === currentVersion) {
6058
+ return `${PACKAGE_NAME}@${tag}`;
6059
+ }
6060
+ }
6061
+ }
6062
+ return `${PACKAGE_NAME}@${currentVersion}`;
6063
+ }
6033
6064
  function detectConfigFormat() {
6034
6065
  const configJsonc = getConfigJsonc();
6035
6066
  const configJson = getConfigJson();
@@ -6072,17 +6103,17 @@ function ensureConfigDir() {
6072
6103
  mkdirSync(configDir, { recursive: true });
6073
6104
  }
6074
6105
  }
6075
- function addPluginToOpenCodeConfig() {
6106
+ async function addPluginToOpenCodeConfig(currentVersion) {
6076
6107
  try {
6077
6108
  ensureConfigDir();
6078
6109
  } catch (err) {
6079
6110
  return { success: false, configPath: getConfigDir(), error: formatErrorWithSuggestion(err, "create config directory") };
6080
6111
  }
6081
6112
  const { format: format2, path: path2 } = detectConfigFormat();
6082
- const pluginName = "oh-my-opencode";
6113
+ const pluginEntry = await getPluginNameWithVersion(currentVersion);
6083
6114
  try {
6084
6115
  if (format2 === "none") {
6085
- const config2 = { plugin: [pluginName] };
6116
+ const config2 = { plugin: [pluginEntry] };
6086
6117
  writeFileSync(path2, JSON.stringify(config2, null, 2) + `
6087
6118
  `);
6088
6119
  return { success: true, configPath: path2 };
@@ -6093,25 +6124,30 @@ function addPluginToOpenCodeConfig() {
6093
6124
  }
6094
6125
  const config = parseResult.config;
6095
6126
  const plugins = config.plugin ?? [];
6096
- if (plugins.some((p2) => p2.startsWith(pluginName))) {
6097
- return { success: true, configPath: path2 };
6127
+ const existingIndex = plugins.findIndex((p2) => p2 === PACKAGE_NAME || p2.startsWith(`${PACKAGE_NAME}@`));
6128
+ if (existingIndex !== -1) {
6129
+ if (plugins[existingIndex] === pluginEntry) {
6130
+ return { success: true, configPath: path2 };
6131
+ }
6132
+ plugins[existingIndex] = pluginEntry;
6133
+ } else {
6134
+ plugins.push(pluginEntry);
6098
6135
  }
6099
- config.plugin = [...plugins, pluginName];
6136
+ config.plugin = plugins;
6100
6137
  if (format2 === "jsonc") {
6101
6138
  const content = readFileSync2(path2, "utf-8");
6102
6139
  const pluginArrayRegex = /"plugin"\s*:\s*\[([\s\S]*?)\]/;
6103
6140
  const match = content.match(pluginArrayRegex);
6104
6141
  if (match) {
6105
- const arrayContent = match[1].trim();
6106
- const newArrayContent = arrayContent ? `${arrayContent},
6107
- "${pluginName}"` : `"${pluginName}"`;
6142
+ const formattedPlugins = plugins.map((p2) => `"${p2}"`).join(`,
6143
+ `);
6108
6144
  const newContent = content.replace(pluginArrayRegex, `"plugin": [
6109
- ${newArrayContent}
6145
+ ${formattedPlugins}
6110
6146
  ]`);
6111
6147
  writeFileSync(path2, newContent);
6112
6148
  } else {
6113
6149
  const newContent = content.replace(/^(\s*\{)/, `$1
6114
- "plugin": ["${pluginName}"],`);
6150
+ "plugin": ["${pluginEntry}"],`);
6115
6151
  writeFileSync(path2, newContent);
6116
6152
  }
6117
6153
  } else {
@@ -6431,11 +6467,12 @@ function detectCurrentConfig() {
6431
6467
  } catch {}
6432
6468
  return result;
6433
6469
  }
6434
- var OPENCODE_BINARIES, configContext = null, BUN_INSTALL_TIMEOUT_SECONDS = 60, BUN_INSTALL_TIMEOUT_MS, ANTIGRAVITY_PROVIDER_CONFIG;
6470
+ var OPENCODE_BINARIES, configContext = null, BUN_INSTALL_TIMEOUT_SECONDS = 60, BUN_INSTALL_TIMEOUT_MS, NPM_FETCH_TIMEOUT_MS = 5000, PACKAGE_NAME = "oh-my-opencode", PRIORITIZED_TAGS, ANTIGRAVITY_PROVIDER_CONFIG;
6435
6471
  var init_config_manager = __esm(() => {
6436
6472
  init_shared();
6437
6473
  OPENCODE_BINARIES = ["opencode", "opencode-desktop"];
6438
6474
  BUN_INSTALL_TIMEOUT_MS = BUN_INSTALL_TIMEOUT_SECONDS * 1000;
6475
+ PRIORITIZED_TAGS = ["latest", "beta", "next"];
6439
6476
  ANTIGRAVITY_PROVIDER_CONFIG = {
6440
6477
  google: {
6441
6478
  name: "Google",
@@ -6493,12 +6530,12 @@ function getWindowsAppdataDir() {
6493
6530
  return null;
6494
6531
  return process.env.APPDATA ?? path2.join(os2.homedir(), "AppData", "Roaming");
6495
6532
  }
6496
- var PACKAGE_NAME = "oh-my-opencode", NPM_REGISTRY_URL, NPM_FETCH_TIMEOUT = 5000, CACHE_DIR, VERSION_FILE, INSTALLED_PACKAGE_JSON, USER_CONFIG_DIR, USER_OPENCODE_CONFIG, USER_OPENCODE_CONFIG_JSONC;
6533
+ var PACKAGE_NAME2 = "oh-my-opencode", NPM_REGISTRY_URL, NPM_FETCH_TIMEOUT = 5000, CACHE_DIR, VERSION_FILE, INSTALLED_PACKAGE_JSON, USER_CONFIG_DIR, USER_OPENCODE_CONFIG, USER_OPENCODE_CONFIG_JSONC;
6497
6534
  var init_constants = __esm(() => {
6498
- NPM_REGISTRY_URL = `https://registry.npmjs.org/-/package/${PACKAGE_NAME}/dist-tags`;
6535
+ NPM_REGISTRY_URL = `https://registry.npmjs.org/-/package/${PACKAGE_NAME2}/dist-tags`;
6499
6536
  CACHE_DIR = getCacheDir();
6500
6537
  VERSION_FILE = path2.join(CACHE_DIR, "version");
6501
- INSTALLED_PACKAGE_JSON = path2.join(CACHE_DIR, "node_modules", PACKAGE_NAME, "package.json");
6538
+ INSTALLED_PACKAGE_JSON = path2.join(CACHE_DIR, "node_modules", PACKAGE_NAME2, "package.json");
6502
6539
  USER_CONFIG_DIR = getUserConfigDir();
6503
6540
  USER_OPENCODE_CONFIG = path2.join(USER_CONFIG_DIR, "opencode", "opencode.json");
6504
6541
  USER_OPENCODE_CONFIG_JSONC = path2.join(USER_CONFIG_DIR, "opencode", "opencode.jsonc");
@@ -6535,7 +6572,7 @@ function removeFromBunLock(packageName) {
6535
6572
  return false;
6536
6573
  }
6537
6574
  }
6538
- function invalidatePackage(packageName = PACKAGE_NAME) {
6575
+ function invalidatePackage(packageName = PACKAGE_NAME2) {
6539
6576
  try {
6540
6577
  const pkgDir = path3.join(CACHE_DIR, "node_modules", packageName);
6541
6578
  const pkgJsonPath = path3.join(CACHE_DIR, "package.json");
@@ -6696,9 +6733,9 @@ async function runBackgroundUpdateCheck(ctx, autoUpdate, getToastMessage) {
6696
6733
  log("[auto-update-checker] Failed to update pinned version in config");
6697
6734
  return;
6698
6735
  }
6699
- log(`[auto-update-checker] Config updated: ${pluginInfo.entry} \u2192 ${PACKAGE_NAME}@${latestVersion}`);
6736
+ log(`[auto-update-checker] Config updated: ${pluginInfo.entry} \u2192 ${PACKAGE_NAME2}@${latestVersion}`);
6700
6737
  }
6701
- invalidatePackage(PACKAGE_NAME);
6738
+ invalidatePackage(PACKAGE_NAME2);
6702
6739
  const installSuccess = await runBunInstallSafe();
6703
6740
  if (installSuccess) {
6704
6741
  await showAutoUpdatedToast(ctx, currentVersion, latestVersion);
@@ -6843,7 +6880,7 @@ function getLocalDevPath(directory) {
6843
6880
  const config = JSON.parse(stripJsonComments(content));
6844
6881
  const plugins = config.plugin ?? [];
6845
6882
  for (const entry of plugins) {
6846
- if (entry.startsWith("file://") && entry.includes(PACKAGE_NAME)) {
6883
+ if (entry.startsWith("file://") && entry.includes(PACKAGE_NAME2)) {
6847
6884
  try {
6848
6885
  return fileURLToPath(entry);
6849
6886
  } catch {
@@ -6867,7 +6904,7 @@ function findPackageJsonUp(startPath) {
6867
6904
  try {
6868
6905
  const content = fs4.readFileSync(pkgPath, "utf-8");
6869
6906
  const pkg = JSON.parse(content);
6870
- if (pkg.name === PACKAGE_NAME)
6907
+ if (pkg.name === PACKAGE_NAME2)
6871
6908
  return pkgPath;
6872
6909
  } catch {}
6873
6910
  }
@@ -6903,11 +6940,11 @@ function findPluginEntry(directory) {
6903
6940
  const config = JSON.parse(stripJsonComments(content));
6904
6941
  const plugins = config.plugin ?? [];
6905
6942
  for (const entry of plugins) {
6906
- if (entry === PACKAGE_NAME) {
6943
+ if (entry === PACKAGE_NAME2) {
6907
6944
  return { entry, isPinned: false, pinnedVersion: null, configPath };
6908
6945
  }
6909
- if (entry.startsWith(`${PACKAGE_NAME}@`)) {
6910
- const pinnedVersion = entry.slice(PACKAGE_NAME.length + 1);
6946
+ if (entry.startsWith(`${PACKAGE_NAME2}@`)) {
6947
+ const pinnedVersion = entry.slice(PACKAGE_NAME2.length + 1);
6911
6948
  const isPinned = pinnedVersion !== "latest";
6912
6949
  return { entry, isPinned, pinnedVersion: isPinned ? pinnedVersion : null, configPath };
6913
6950
  }
@@ -6944,7 +6981,7 @@ function getCachedVersion() {
6944
6981
  function updatePinnedVersion(configPath, oldEntry, newVersion) {
6945
6982
  try {
6946
6983
  const content = fs4.readFileSync(configPath, "utf-8");
6947
- const newEntry = `${PACKAGE_NAME}@${newVersion}`;
6984
+ const newEntry = `${PACKAGE_NAME2}@${newVersion}`;
6948
6985
  const pluginMatch = content.match(/"plugin"\s*:\s*\[/);
6949
6986
  if (!pluginMatch || pluginMatch.index === undefined) {
6950
6987
  log(`[auto-update-checker] No "plugin" array found in ${configPath}`);
@@ -7032,88 +7069,6 @@ var init_checker = __esm(() => {
7032
7069
  init_logger();
7033
7070
  });
7034
7071
 
7035
- // package.json
7036
- var require_package = __commonJS((exports, module) => {
7037
- module.exports = {
7038
- name: "oh-my-opencode",
7039
- version: "3.0.0-beta.7",
7040
- description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
7041
- main: "dist/index.js",
7042
- types: "dist/index.d.ts",
7043
- type: "module",
7044
- bin: {
7045
- "oh-my-opencode": "./dist/cli/index.js"
7046
- },
7047
- files: [
7048
- "dist"
7049
- ],
7050
- exports: {
7051
- ".": {
7052
- types: "./dist/index.d.ts",
7053
- import: "./dist/index.js"
7054
- },
7055
- "./schema.json": "./dist/oh-my-opencode.schema.json"
7056
- },
7057
- scripts: {
7058
- build: "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
7059
- "build:schema": "bun run script/build-schema.ts",
7060
- clean: "rm -rf dist",
7061
- prepublishOnly: "bun run clean && bun run build",
7062
- typecheck: "tsc --noEmit",
7063
- test: "bun test"
7064
- },
7065
- keywords: [
7066
- "opencode",
7067
- "plugin",
7068
- "oracle",
7069
- "librarian",
7070
- "agents",
7071
- "ai",
7072
- "llm"
7073
- ],
7074
- author: "YeonGyu-Kim",
7075
- license: "SUL-1.0",
7076
- repository: {
7077
- type: "git",
7078
- url: "git+https://github.com/code-yeongyu/oh-my-opencode.git"
7079
- },
7080
- bugs: {
7081
- url: "https://github.com/code-yeongyu/oh-my-opencode/issues"
7082
- },
7083
- homepage: "https://github.com/code-yeongyu/oh-my-opencode#readme",
7084
- dependencies: {
7085
- "@ast-grep/cli": "^0.40.0",
7086
- "@ast-grep/napi": "^0.40.0",
7087
- "@clack/prompts": "^0.11.0",
7088
- "@code-yeongyu/comment-checker": "^0.6.1",
7089
- "@modelcontextprotocol/sdk": "^1.25.1",
7090
- "@openauthjs/openauth": "^0.4.3",
7091
- "@opencode-ai/plugin": "^1.1.19",
7092
- "@opencode-ai/sdk": "^1.1.19",
7093
- commander: "^14.0.2",
7094
- hono: "^4.10.4",
7095
- "js-yaml": "^4.1.1",
7096
- "jsonc-parser": "^3.3.1",
7097
- open: "^11.0.0",
7098
- picocolors: "^1.1.1",
7099
- picomatch: "^4.0.2",
7100
- "xdg-basedir": "^5.1.0",
7101
- zod: "^4.1.8"
7102
- },
7103
- devDependencies: {
7104
- "@types/js-yaml": "^4.0.9",
7105
- "@types/picomatch": "^3.0.2",
7106
- "bun-types": "latest",
7107
- typescript: "^5.7.3"
7108
- },
7109
- trustedDependencies: [
7110
- "@ast-grep/cli",
7111
- "@ast-grep/napi",
7112
- "@code-yeongyu/comment-checker"
7113
- ]
7114
- };
7115
- });
7116
-
7117
7072
  // node_modules/commander/esm.mjs
7118
7073
  var import__ = __toESM(require_commander(), 1);
7119
7074
  var {
@@ -7713,6 +7668,103 @@ var Y2 = ({ indicator: t = "dots" } = {}) => {
7713
7668
  // src/cli/install.ts
7714
7669
  init_config_manager();
7715
7670
  var import_picocolors2 = __toESM(require_picocolors(), 1);
7671
+ // package.json
7672
+ var package_default = {
7673
+ name: "oh-my-opencode",
7674
+ version: "3.0.0-beta.8",
7675
+ description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
7676
+ main: "dist/index.js",
7677
+ types: "dist/index.d.ts",
7678
+ type: "module",
7679
+ bin: {
7680
+ "oh-my-opencode": "./bin/oh-my-opencode.js"
7681
+ },
7682
+ files: [
7683
+ "dist",
7684
+ "bin",
7685
+ "postinstall.mjs"
7686
+ ],
7687
+ exports: {
7688
+ ".": {
7689
+ types: "./dist/index.d.ts",
7690
+ import: "./dist/index.js"
7691
+ },
7692
+ "./schema.json": "./dist/oh-my-opencode.schema.json"
7693
+ },
7694
+ scripts: {
7695
+ build: "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
7696
+ "build:all": "bun run build && bun run build:binaries",
7697
+ "build:binaries": "bun run script/build-binaries.ts",
7698
+ "build:schema": "bun run script/build-schema.ts",
7699
+ clean: "rm -rf dist",
7700
+ postinstall: "node postinstall.mjs",
7701
+ prepublishOnly: "bun run clean && bun run build",
7702
+ typecheck: "tsc --noEmit",
7703
+ test: "bun test"
7704
+ },
7705
+ keywords: [
7706
+ "opencode",
7707
+ "plugin",
7708
+ "oracle",
7709
+ "librarian",
7710
+ "agents",
7711
+ "ai",
7712
+ "llm"
7713
+ ],
7714
+ author: "YeonGyu-Kim",
7715
+ license: "SUL-1.0",
7716
+ repository: {
7717
+ type: "git",
7718
+ url: "git+https://github.com/code-yeongyu/oh-my-opencode.git"
7719
+ },
7720
+ bugs: {
7721
+ url: "https://github.com/code-yeongyu/oh-my-opencode/issues"
7722
+ },
7723
+ homepage: "https://github.com/code-yeongyu/oh-my-opencode#readme",
7724
+ dependencies: {
7725
+ "@ast-grep/cli": "^0.40.0",
7726
+ "@ast-grep/napi": "^0.40.0",
7727
+ "@clack/prompts": "^0.11.0",
7728
+ "@code-yeongyu/comment-checker": "^0.6.1",
7729
+ "@modelcontextprotocol/sdk": "^1.25.1",
7730
+ "@openauthjs/openauth": "^0.4.3",
7731
+ "@opencode-ai/plugin": "^1.1.19",
7732
+ "@opencode-ai/sdk": "^1.1.19",
7733
+ commander: "^14.0.2",
7734
+ "detect-libc": "^2.0.0",
7735
+ hono: "^4.10.4",
7736
+ "js-yaml": "^4.1.1",
7737
+ "jsonc-parser": "^3.3.1",
7738
+ open: "^11.0.0",
7739
+ picocolors: "^1.1.1",
7740
+ picomatch: "^4.0.2",
7741
+ "xdg-basedir": "^5.1.0",
7742
+ zod: "^4.1.8"
7743
+ },
7744
+ devDependencies: {
7745
+ "@types/js-yaml": "^4.0.9",
7746
+ "@types/picomatch": "^3.0.2",
7747
+ "bun-types": "latest",
7748
+ typescript: "^5.7.3"
7749
+ },
7750
+ optionalDependencies: {
7751
+ "oh-my-opencode-darwin-arm64": "3.0.0-beta.8",
7752
+ "oh-my-opencode-darwin-x64": "3.0.0-beta.8",
7753
+ "oh-my-opencode-linux-arm64": "3.0.0-beta.8",
7754
+ "oh-my-opencode-linux-arm64-musl": "3.0.0-beta.8",
7755
+ "oh-my-opencode-linux-x64": "3.0.0-beta.8",
7756
+ "oh-my-opencode-linux-x64-musl": "3.0.0-beta.8",
7757
+ "oh-my-opencode-windows-x64": "3.0.0-beta.8"
7758
+ },
7759
+ trustedDependencies: [
7760
+ "@ast-grep/cli",
7761
+ "@ast-grep/napi",
7762
+ "@code-yeongyu/comment-checker"
7763
+ ]
7764
+ };
7765
+
7766
+ // src/cli/install.ts
7767
+ var VERSION = package_default.version;
7716
7768
  var SYMBOLS = {
7717
7769
  check: import_picocolors2.default.green("\u2713"),
7718
7770
  cross: import_picocolors2.default.red("\u2717"),
@@ -7931,7 +7983,7 @@ async function runNonTuiInstall(args) {
7931
7983
  }
7932
7984
  const config = argsToConfig(args);
7933
7985
  printStep(step++, totalSteps, "Adding oh-my-opencode plugin...");
7934
- const pluginResult = addPluginToOpenCodeConfig();
7986
+ const pluginResult = await addPluginToOpenCodeConfig(VERSION);
7935
7987
  if (!pluginResult.success) {
7936
7988
  printError(`Failed: ${pluginResult.error}`);
7937
7989
  return 1;
@@ -8013,7 +8065,7 @@ async function install(args) {
8013
8065
  if (!config)
8014
8066
  return 1;
8015
8067
  s.start("Adding oh-my-opencode to OpenCode config");
8016
- const pluginResult = addPluginToOpenCodeConfig();
8068
+ const pluginResult = await addPluginToOpenCodeConfig(VERSION);
8017
8069
  if (!pluginResult.success) {
8018
8070
  s.stop(`Failed to add plugin: ${pluginResult.error}`);
8019
8071
  Se(import_picocolors2.default.red("Installation failed."));
@@ -10131,7 +10183,7 @@ var EXIT_CODES = {
10131
10183
  FAILURE: 1
10132
10184
  };
10133
10185
  var MIN_OPENCODE_VERSION = "1.0.150";
10134
- var PACKAGE_NAME2 = "oh-my-opencode";
10186
+ var PACKAGE_NAME3 = "oh-my-opencode";
10135
10187
  var OPENCODE_BINARIES2 = ["opencode", "opencode-desktop"];
10136
10188
 
10137
10189
  // src/cli/doctor/checks/opencode.ts
@@ -10255,7 +10307,7 @@ function detectConfigPath() {
10255
10307
  }
10256
10308
  function findPluginEntry2(plugins) {
10257
10309
  for (const plugin of plugins) {
10258
- if (plugin === PACKAGE_NAME2 || plugin.startsWith(`${PACKAGE_NAME2}@`)) {
10310
+ if (plugin === PACKAGE_NAME3 || plugin.startsWith(`${PACKAGE_NAME3}@`)) {
10259
10311
  const isPinned = plugin.includes("@");
10260
10312
  const version = isPinned ? plugin.split("@")[1] : null;
10261
10313
  return { entry: plugin, isPinned, version };
@@ -22749,6 +22801,7 @@ var HookNameSchema = exports_external.enum([
22749
22801
  "claude-code-hooks",
22750
22802
  "auto-slash-command",
22751
22803
  "edit-error-recovery",
22804
+ "sisyphus-task-retry",
22752
22805
  "prometheus-md-only",
22753
22806
  "start-work",
22754
22807
  "sisyphus-orchestrator"
@@ -22945,8 +22998,8 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
22945
22998
  });
22946
22999
  // src/cli/doctor/checks/config.ts
22947
23000
  var USER_CONFIG_DIR2 = join6(homedir4(), ".config", "opencode");
22948
- var USER_CONFIG_BASE = join6(USER_CONFIG_DIR2, `${PACKAGE_NAME2}`);
22949
- var PROJECT_CONFIG_BASE = join6(process.cwd(), ".opencode", PACKAGE_NAME2);
23001
+ var USER_CONFIG_BASE = join6(USER_CONFIG_DIR2, `${PACKAGE_NAME3}`);
23002
+ var PROJECT_CONFIG_BASE = join6(process.cwd(), ".opencode", PACKAGE_NAME3);
22950
23003
  function findConfigPath() {
22951
23004
  const projectDetected = detectConfigFile(PROJECT_CONFIG_BASE);
22952
23005
  if (projectDetected.format !== "none") {
@@ -23900,15 +23953,14 @@ async function doctor(options = {}) {
23900
23953
  }
23901
23954
 
23902
23955
  // src/cli/index.ts
23903
- var packageJson = await Promise.resolve().then(() => __toESM(require_package(), 1));
23904
- var VERSION = packageJson.version;
23956
+ var VERSION2 = package_default.version;
23905
23957
  var program2 = new Command;
23906
- program2.name("oh-my-opencode").description("The ultimate OpenCode plugin - multi-model orchestration, LSP tools, and more").version(VERSION, "-v, --version", "Show version number");
23907
- program2.command("install").description("Install and configure oh-my-opencode with interactive setup").option("--no-tui", "Run in non-interactive mode (requires all options)").option("--claude <value>", "Claude subscription: no, yes, max20").option("--chatgpt <value>", "ChatGPT subscription: no, yes").option("--gemini <value>", "Gemini integration: no, yes").option("--skip-auth", "Skip authentication setup hints").addHelpText("after", `
23958
+ program2.name("oh-my-opencode").description("The ultimate OpenCode plugin - multi-model orchestration, LSP tools, and more").version(VERSION2, "-v, --version", "Show version number");
23959
+ program2.command("install").description("Install and configure oh-my-opencode with interactive setup").option("--no-tui", "Run in non-interactive mode (requires all options)").option("--claude <value>", "Claude subscription: no, yes, max20").option("--chatgpt <value>", "ChatGPT subscription: no, yes").option("--gemini <value>", "Gemini integration: no, yes").option("--copilot <value>", "GitHub Copilot subscription: no, yes").option("--skip-auth", "Skip authentication setup hints").addHelpText("after", `
23908
23960
  Examples:
23909
23961
  $ bunx oh-my-opencode install
23910
- $ bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes
23911
- $ bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no
23962
+ $ bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes --copilot=no
23963
+ $ bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no --copilot=yes
23912
23964
 
23913
23965
  Model Providers:
23914
23966
  Claude Required for Sisyphus (main orchestrator) and Librarian agents
@@ -23920,6 +23972,7 @@ Model Providers:
23920
23972
  claude: options.claude,
23921
23973
  chatgpt: options.chatgpt,
23922
23974
  gemini: options.gemini,
23975
+ copilot: options.copilot,
23923
23976
  skipAuth: options.skipAuth ?? false
23924
23977
  };
23925
23978
  const exitCode = await install(args);
@@ -23987,6 +24040,6 @@ Categories:
23987
24040
  process.exit(exitCode);
23988
24041
  });
23989
24042
  program2.command("version").description("Show version information").action(() => {
23990
- console.log(`oh-my-opencode v${VERSION}`);
24043
+ console.log(`oh-my-opencode v${VERSION2}`);
23991
24044
  });
23992
24045
  program2.parse();
@@ -74,6 +74,7 @@ export declare const HookNameSchema: z.ZodEnum<{
74
74
  "claude-code-hooks": "claude-code-hooks";
75
75
  "auto-slash-command": "auto-slash-command";
76
76
  "edit-error-recovery": "edit-error-recovery";
77
+ "sisyphus-task-retry": "sisyphus-task-retry";
77
78
  "prometheus-md-only": "prometheus-md-only";
78
79
  "start-work": "start-work";
79
80
  "sisyphus-orchestrator": "sisyphus-orchestrator";
@@ -1144,6 +1145,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
1144
1145
  "claude-code-hooks": "claude-code-hooks";
1145
1146
  "auto-slash-command": "auto-slash-command";
1146
1147
  "edit-error-recovery": "edit-error-recovery";
1148
+ "sisyphus-task-retry": "sisyphus-task-retry";
1147
1149
  "prometheus-md-only": "prometheus-md-only";
1148
1150
  "start-work": "start-work";
1149
1151
  "sisyphus-orchestrator": "sisyphus-orchestrator";
@@ -50,6 +50,11 @@ export declare class BackgroundManager {
50
50
  */
51
51
  private validateSessionHasOutput;
52
52
  private clearNotificationsForTask;
53
+ /**
54
+ * Remove task from pending tracking for its parent session.
55
+ * Cleans up the parent entry if no pending tasks remain.
56
+ */
57
+ private cleanupPendingByParent;
53
58
  private startPolling;
54
59
  private stopPolling;
55
60
  cleanup(): void;
@@ -1,4 +1,4 @@
1
1
  export { injectHookMessage, findNearestMessageWithFields, findFirstMessageWithAgent } from "./injector";
2
2
  export type { StoredMessage } from "./injector";
3
- export type { MessageMeta, OriginalMessageContext, TextPart } from "./types";
3
+ export type { MessageMeta, OriginalMessageContext, TextPart, ToolPermission } from "./types";
4
4
  export { MESSAGE_STORAGE } from "./constants";
@@ -1,9 +1,19 @@
1
+ import type { LoadedSkill } from "./types";
1
2
  import type { GitMasterConfig } from "../../config/schema";
2
3
  export interface SkillResolutionOptions {
3
4
  gitMasterConfig?: GitMasterConfig;
4
5
  }
6
+ declare function clearSkillCache(): void;
7
+ declare function getAllSkills(): Promise<LoadedSkill[]>;
8
+ declare function extractSkillTemplate(skill: LoadedSkill): Promise<string>;
9
+ export { clearSkillCache, getAllSkills, extractSkillTemplate };
5
10
  export declare function resolveSkillContent(skillName: string, options?: SkillResolutionOptions): string | null;
6
11
  export declare function resolveMultipleSkills(skillNames: string[], options?: SkillResolutionOptions): {
7
12
  resolved: Map<string, string>;
8
13
  notFound: string[];
9
14
  };
15
+ export declare function resolveSkillContentAsync(skillName: string, options?: SkillResolutionOptions): Promise<string | null>;
16
+ export declare function resolveMultipleSkillsAsync(skillNames: string[], options?: SkillResolutionOptions): Promise<{
17
+ resolved: Map<string, string>;
18
+ notFound: string[];
19
+ }>;
@@ -12,6 +12,16 @@ export declare class SkillMcpManager {
12
12
  private registerProcessCleanup;
13
13
  getOrCreateClient(info: SkillMcpClientInfo, config: ClaudeCodeMcpServer): Promise<Client>;
14
14
  private createClient;
15
+ /**
16
+ * Create an HTTP-based MCP client using StreamableHTTPClientTransport.
17
+ * Supports remote MCP servers with optional authentication headers.
18
+ */
19
+ private createHttpClient;
20
+ /**
21
+ * Create a stdio-based MCP client using StdioClientTransport.
22
+ * Spawns a local process and communicates via stdin/stdout.
23
+ */
24
+ private createStdioClient;
15
25
  disconnectSession(sessionID: string): Promise<void>;
16
26
  disconnectAll(): Promise<void>;
17
27
  private startCleanupTimer;
@@ -1,2 +1,2 @@
1
1
  export { TaskToastManager, getTaskToastManager, initTaskToastManager } from "./manager";
2
- export type { TrackedTask, TaskStatus, TaskToastOptions } from "./types";
2
+ export type { TrackedTask, TaskStatus, TaskToastOptions, ModelFallbackInfo } from "./types";
@@ -1,5 +1,5 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
- import type { TrackedTask, TaskStatus } from "./types";
2
+ import type { TrackedTask, TaskStatus, ModelFallbackInfo } from "./types";
3
3
  import type { ConcurrencyManager } from "../background-agent/concurrency";
4
4
  type OpencodeClient = PluginInput["client"];
5
5
  export declare class TaskToastManager {
@@ -15,6 +15,7 @@ export declare class TaskToastManager {
15
15
  isBackground: boolean;
16
16
  status?: TaskStatus;
17
17
  skills?: string[];
18
+ modelInfo?: ModelFallbackInfo;
18
19
  }): void;
19
20
  /**
20
21
  * Update task status
@@ -1,4 +1,8 @@
1
1
  export type TaskStatus = "running" | "queued" | "completed" | "error";
2
+ export interface ModelFallbackInfo {
3
+ model: string;
4
+ type: "user-defined" | "inherited" | "category-default" | "system-default";
5
+ }
2
6
  export interface TrackedTask {
3
7
  id: string;
4
8
  description: string;
@@ -7,6 +11,7 @@ export interface TrackedTask {
7
11
  startedAt: Date;
8
12
  isBackground: boolean;
9
13
  skills?: string[];
14
+ modelInfo?: ModelFallbackInfo;
10
15
  }
11
16
  export interface TaskToastOptions {
12
17
  title: string;
@@ -13,7 +13,6 @@ export declare function getCommentCheckerPathSync(): string | null;
13
13
  * Call this early to trigger download while other init happens.
14
14
  */
15
15
  export declare function startBackgroundInit(): void;
16
- export declare const COMMENT_CHECKER_CLI_PATH: string | null;
17
16
  export interface HookInput {
18
17
  session_id: string;
19
18
  tool_name: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -29,3 +29,4 @@ export { createPrometheusMdOnlyHook } from "./prometheus-md-only";
29
29
  export { createTaskResumeInfoHook } from "./task-resume-info";
30
30
  export { createStartWorkHook } from "./start-work";
31
31
  export { createSisyphusOrchestratorHook } from "./sisyphus-orchestrator";
32
+ export { createSisyphusTaskRetryHook } from "./sisyphus-task-retry";
@@ -0,0 +1,24 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export interface SisyphusTaskErrorPattern {
3
+ pattern: string;
4
+ errorType: string;
5
+ fixHint: string;
6
+ }
7
+ export declare const SISYPHUS_TASK_ERROR_PATTERNS: SisyphusTaskErrorPattern[];
8
+ export interface DetectedError {
9
+ errorType: string;
10
+ originalOutput: string;
11
+ }
12
+ export declare function detectSisyphusTaskError(output: string): DetectedError | null;
13
+ export declare function buildRetryGuidance(errorInfo: DetectedError): string;
14
+ export declare function createSisyphusTaskRetryHook(_ctx: PluginInput): {
15
+ "tool.execute.after": (input: {
16
+ tool: string;
17
+ sessionID: string;
18
+ callID: string;
19
+ }, output: {
20
+ title: string;
21
+ output: string;
22
+ metadata: unknown;
23
+ }) => Promise<void>;
24
+ };
@@ -0,0 +1 @@
1
+ export {};