oh-my-opencode-kikokikok 2.14.0 → 2.14.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
@@ -2253,7 +2253,7 @@ var require_picocolors = __commonJS((exports, module) => {
2253
2253
  var require_package = __commonJS((exports, module) => {
2254
2254
  module.exports = {
2255
2255
  name: "oh-my-opencode-kikokikok",
2256
- version: "2.14.0",
2256
+ version: "2.14.2",
2257
2257
  description: "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
2258
2258
  main: "dist/index.js",
2259
2259
  types: "dist/index.d.ts",
@@ -2355,6 +2355,7 @@ import { stripVTControlCharacters as S2 } from "util";
2355
2355
 
2356
2356
  // node_modules/@clack/core/dist/index.mjs
2357
2357
  var import_sisteransi = __toESM(require_src(), 1);
2358
+ var import_picocolors = __toESM(require_picocolors(), 1);
2358
2359
  import { stdin as j, stdout as M } from "process";
2359
2360
  import * as g from "readline";
2360
2361
  import O from "readline";
@@ -2738,9 +2739,27 @@ class LD extends x {
2738
2739
  this.value = this._value.value;
2739
2740
  }
2740
2741
  }
2742
+ class RD extends x {
2743
+ get valueWithCursor() {
2744
+ if (this.state === "submit")
2745
+ return this.value;
2746
+ if (this.cursor >= this.value.length)
2747
+ return `${this.value}\u2588`;
2748
+ const u = this.value.slice(0, this.cursor), [t, ...F] = this.value.slice(this.cursor);
2749
+ return `${u}${import_picocolors.default.inverse(t)}${F.join("")}`;
2750
+ }
2751
+ get cursor() {
2752
+ return this._cursor;
2753
+ }
2754
+ constructor(u) {
2755
+ super(u), this.on("finalize", () => {
2756
+ this.value || (this.value = u.defaultValue);
2757
+ });
2758
+ }
2759
+ }
2741
2760
 
2742
2761
  // node_modules/@clack/prompts/dist/index.mjs
2743
- var import_picocolors = __toESM(require_picocolors(), 1);
2762
+ var import_picocolors2 = __toESM(require_picocolors(), 1);
2744
2763
  var import_sisteransi2 = __toESM(require_src(), 1);
2745
2764
  import y2 from "process";
2746
2765
  function ce() {
@@ -2773,13 +2792,13 @@ var b2 = (t) => {
2773
2792
  switch (t) {
2774
2793
  case "initial":
2775
2794
  case "active":
2776
- return import_picocolors.default.cyan(le);
2795
+ return import_picocolors2.default.cyan(le);
2777
2796
  case "cancel":
2778
- return import_picocolors.default.red(L2);
2797
+ return import_picocolors2.default.red(L2);
2779
2798
  case "error":
2780
- return import_picocolors.default.yellow(W2);
2799
+ return import_picocolors2.default.yellow(W2);
2781
2800
  case "submit":
2782
- return import_picocolors.default.green(C);
2801
+ return import_picocolors2.default.green(C);
2783
2802
  }
2784
2803
  };
2785
2804
  var G2 = (t) => {
@@ -2787,39 +2806,60 @@ var G2 = (t) => {
2787
2806
  let l2 = 0;
2788
2807
  n >= l2 + a - 3 ? l2 = Math.max(Math.min(n - a + 3, r2.length - a), 0) : n < l2 + 2 && (l2 = Math.max(n - 2, 0));
2789
2808
  const $2 = a < r2.length && l2 > 0, g2 = a < r2.length && l2 + a < r2.length;
2790
- return r2.slice(l2, l2 + a).map((p2, v, f) => {
2791
- const j2 = v === 0 && $2, E = v === f.length - 1 && g2;
2792
- return j2 || E ? import_picocolors.default.dim("...") : i(p2, v + l2 === n);
2809
+ return r2.slice(l2, l2 + a).map((p2, v2, f) => {
2810
+ const j2 = v2 === 0 && $2, E = v2 === f.length - 1 && g2;
2811
+ return j2 || E ? import_picocolors2.default.dim("...") : i(p2, v2 + l2 === n);
2793
2812
  });
2794
2813
  };
2814
+ var he = (t) => new RD({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, render() {
2815
+ const n = `${import_picocolors2.default.gray(o)}
2816
+ ${b2(this.state)} ${t.message}
2817
+ `, r2 = t.placeholder ? import_picocolors2.default.inverse(t.placeholder[0]) + import_picocolors2.default.dim(t.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), i = this.value ? this.valueWithCursor : r2;
2818
+ switch (this.state) {
2819
+ case "error":
2820
+ return `${n.trim()}
2821
+ ${import_picocolors2.default.yellow(o)} ${i}
2822
+ ${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
2823
+ `;
2824
+ case "submit":
2825
+ return `${n}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(this.value || t.placeholder)}`;
2826
+ case "cancel":
2827
+ return `${n}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
2828
+ ${import_picocolors2.default.gray(o)}` : ""}`;
2829
+ default:
2830
+ return `${n}${import_picocolors2.default.cyan(o)} ${i}
2831
+ ${import_picocolors2.default.cyan(d2)}
2832
+ `;
2833
+ }
2834
+ } }).prompt();
2795
2835
  var ve = (t) => {
2796
2836
  const n = (r2, i) => {
2797
2837
  const s = r2.label ?? String(r2.value);
2798
2838
  switch (i) {
2799
2839
  case "selected":
2800
- return `${import_picocolors.default.dim(s)}`;
2840
+ return `${import_picocolors2.default.dim(s)}`;
2801
2841
  case "active":
2802
- return `${import_picocolors.default.green(k2)} ${s} ${r2.hint ? import_picocolors.default.dim(`(${r2.hint})`) : ""}`;
2842
+ return `${import_picocolors2.default.green(k2)} ${s} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}`;
2803
2843
  case "cancelled":
2804
- return `${import_picocolors.default.strikethrough(import_picocolors.default.dim(s))}`;
2844
+ return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}`;
2805
2845
  default:
2806
- return `${import_picocolors.default.dim(P2)} ${import_picocolors.default.dim(s)}`;
2846
+ return `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(s)}`;
2807
2847
  }
2808
2848
  };
2809
2849
  return new LD({ options: t.options, initialValue: t.initialValue, render() {
2810
- const r2 = `${import_picocolors.default.gray(o)}
2850
+ const r2 = `${import_picocolors2.default.gray(o)}
2811
2851
  ${b2(this.state)} ${t.message}
2812
2852
  `;
2813
2853
  switch (this.state) {
2814
2854
  case "submit":
2815
- return `${r2}${import_picocolors.default.gray(o)} ${n(this.options[this.cursor], "selected")}`;
2855
+ return `${r2}${import_picocolors2.default.gray(o)} ${n(this.options[this.cursor], "selected")}`;
2816
2856
  case "cancel":
2817
- return `${r2}${import_picocolors.default.gray(o)} ${n(this.options[this.cursor], "cancelled")}
2818
- ${import_picocolors.default.gray(o)}`;
2857
+ return `${r2}${import_picocolors2.default.gray(o)} ${n(this.options[this.cursor], "cancelled")}
2858
+ ${import_picocolors2.default.gray(o)}`;
2819
2859
  default:
2820
- return `${r2}${import_picocolors.default.cyan(o)} ${G2({ cursor: this.cursor, options: this.options, maxItems: t.maxItems, style: (i, s) => n(i, s ? "active" : "inactive") }).join(`
2821
- ${import_picocolors.default.cyan(o)} `)}
2822
- ${import_picocolors.default.cyan(d2)}
2860
+ return `${r2}${import_picocolors2.default.cyan(o)} ${G2({ cursor: this.cursor, options: this.options, maxItems: t.maxItems, style: (i, s) => n(i, s ? "active" : "inactive") }).join(`
2861
+ ${import_picocolors2.default.cyan(o)} `)}
2862
+ ${import_picocolors2.default.cyan(d2)}
2823
2863
  `;
2824
2864
  }
2825
2865
  } }).prompt();
@@ -2831,63 +2871,63 @@ ${t}
2831
2871
  `), i = S2(n).length, s = Math.max(r2.reduce((a, l2) => {
2832
2872
  const $2 = S2(l2);
2833
2873
  return $2.length > a ? $2.length : a;
2834
- }, 0), i) + 2, c = r2.map((a) => `${import_picocolors.default.gray(o)} ${import_picocolors.default.dim(a)}${" ".repeat(s - S2(a).length)}${import_picocolors.default.gray(o)}`).join(`
2874
+ }, 0), i) + 2, c = r2.map((a) => `${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(a)}${" ".repeat(s - S2(a).length)}${import_picocolors2.default.gray(o)}`).join(`
2835
2875
  `);
2836
- process.stdout.write(`${import_picocolors.default.gray(o)}
2837
- ${import_picocolors.default.green(C)} ${import_picocolors.default.reset(n)} ${import_picocolors.default.gray(_2.repeat(Math.max(s - i - 1, 1)) + me)}
2876
+ process.stdout.write(`${import_picocolors2.default.gray(o)}
2877
+ ${import_picocolors2.default.green(C)} ${import_picocolors2.default.reset(n)} ${import_picocolors2.default.gray(_2.repeat(Math.max(s - i - 1, 1)) + me)}
2838
2878
  ${c}
2839
- ${import_picocolors.default.gray(de + _2.repeat(s + 2) + pe)}
2879
+ ${import_picocolors2.default.gray(de + _2.repeat(s + 2) + pe)}
2840
2880
  `);
2841
2881
  };
2842
2882
  var xe = (t = "") => {
2843
- process.stdout.write(`${import_picocolors.default.gray(d2)} ${import_picocolors.default.red(t)}
2883
+ process.stdout.write(`${import_picocolors2.default.gray(d2)} ${import_picocolors2.default.red(t)}
2844
2884
 
2845
2885
  `);
2846
2886
  };
2847
2887
  var Ie = (t = "") => {
2848
- process.stdout.write(`${import_picocolors.default.gray(ue)} ${t}
2888
+ process.stdout.write(`${import_picocolors2.default.gray(ue)} ${t}
2849
2889
  `);
2850
2890
  };
2851
2891
  var Se = (t = "") => {
2852
- process.stdout.write(`${import_picocolors.default.gray(o)}
2853
- ${import_picocolors.default.gray(d2)} ${t}
2892
+ process.stdout.write(`${import_picocolors2.default.gray(o)}
2893
+ ${import_picocolors2.default.gray(d2)} ${t}
2854
2894
 
2855
2895
  `);
2856
2896
  };
2857
- var M2 = { message: (t = "", { symbol: n = import_picocolors.default.gray(o) } = {}) => {
2858
- const r2 = [`${import_picocolors.default.gray(o)}`];
2897
+ var M2 = { message: (t = "", { symbol: n = import_picocolors2.default.gray(o) } = {}) => {
2898
+ const r2 = [`${import_picocolors2.default.gray(o)}`];
2859
2899
  if (t) {
2860
2900
  const [i, ...s] = t.split(`
2861
2901
  `);
2862
- r2.push(`${n} ${i}`, ...s.map((c) => `${import_picocolors.default.gray(o)} ${c}`));
2902
+ r2.push(`${n} ${i}`, ...s.map((c) => `${import_picocolors2.default.gray(o)} ${c}`));
2863
2903
  }
2864
2904
  process.stdout.write(`${r2.join(`
2865
2905
  `)}
2866
2906
  `);
2867
2907
  }, info: (t) => {
2868
- M2.message(t, { symbol: import_picocolors.default.blue(q) });
2908
+ M2.message(t, { symbol: import_picocolors2.default.blue(q) });
2869
2909
  }, success: (t) => {
2870
- M2.message(t, { symbol: import_picocolors.default.green(D) });
2910
+ M2.message(t, { symbol: import_picocolors2.default.green(D) });
2871
2911
  }, step: (t) => {
2872
- M2.message(t, { symbol: import_picocolors.default.green(C) });
2912
+ M2.message(t, { symbol: import_picocolors2.default.green(C) });
2873
2913
  }, warn: (t) => {
2874
- M2.message(t, { symbol: import_picocolors.default.yellow(U) });
2914
+ M2.message(t, { symbol: import_picocolors2.default.yellow(U) });
2875
2915
  }, warning: (t) => {
2876
2916
  M2.warn(t);
2877
2917
  }, error: (t) => {
2878
- M2.message(t, { symbol: import_picocolors.default.red(K2) });
2918
+ M2.message(t, { symbol: import_picocolors2.default.red(K2) });
2879
2919
  } };
2880
- var J2 = `${import_picocolors.default.gray(o)} `;
2920
+ var J2 = `${import_picocolors2.default.gray(o)} `;
2881
2921
  var Y2 = ({ indicator: t = "dots" } = {}) => {
2882
2922
  const n = V2 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], r2 = V2 ? 80 : 120, i = process.env.CI === "true";
2883
2923
  let s, c, a = false, l2 = "", $2, g2 = performance.now();
2884
2924
  const p2 = (m2) => {
2885
2925
  const h2 = m2 > 1 ? "Something went wrong" : "Canceled";
2886
2926
  a && N2(h2, m2);
2887
- }, v = () => p2(2), f = () => p2(1), j2 = () => {
2888
- process.on("uncaughtExceptionMonitor", v), process.on("unhandledRejection", v), process.on("SIGINT", f), process.on("SIGTERM", f), process.on("exit", p2);
2927
+ }, v2 = () => p2(2), f = () => p2(1), j2 = () => {
2928
+ process.on("uncaughtExceptionMonitor", v2), process.on("unhandledRejection", v2), process.on("SIGINT", f), process.on("SIGTERM", f), process.on("exit", p2);
2889
2929
  }, E = () => {
2890
- process.removeListener("uncaughtExceptionMonitor", v), process.removeListener("unhandledRejection", v), process.removeListener("SIGINT", f), process.removeListener("SIGTERM", f), process.removeListener("exit", p2);
2930
+ process.removeListener("uncaughtExceptionMonitor", v2), process.removeListener("unhandledRejection", v2), process.removeListener("SIGINT", f), process.removeListener("SIGTERM", f), process.removeListener("exit", p2);
2891
2931
  }, B2 = () => {
2892
2932
  if ($2 === undefined)
2893
2933
  return;
@@ -2900,14 +2940,14 @@ var Y2 = ({ indicator: t = "dots" } = {}) => {
2900
2940
  const h2 = (performance.now() - m2) / 1000, w2 = Math.floor(h2 / 60), I2 = Math.floor(h2 % 60);
2901
2941
  return w2 > 0 ? `[${w2}m ${I2}s]` : `[${I2}s]`;
2902
2942
  }, H = (m2 = "") => {
2903
- a = true, s = fD(), l2 = R2(m2), g2 = performance.now(), process.stdout.write(`${import_picocolors.default.gray(o)}
2943
+ a = true, s = fD(), l2 = R2(m2), g2 = performance.now(), process.stdout.write(`${import_picocolors2.default.gray(o)}
2904
2944
  `);
2905
2945
  let h2 = 0, w2 = 0;
2906
2946
  j2(), c = setInterval(() => {
2907
2947
  if (i && l2 === $2)
2908
2948
  return;
2909
2949
  B2(), $2 = l2;
2910
- const I2 = import_picocolors.default.magenta(n[h2]);
2950
+ const I2 = import_picocolors2.default.magenta(n[h2]);
2911
2951
  if (i)
2912
2952
  process.stdout.write(`${I2} ${l2}...`);
2913
2953
  else if (t === "timer")
@@ -2920,7 +2960,7 @@ var Y2 = ({ indicator: t = "dots" } = {}) => {
2920
2960
  }, r2);
2921
2961
  }, N2 = (m2 = "", h2 = 0) => {
2922
2962
  a = false, clearInterval(c), B2();
2923
- const w2 = h2 === 0 ? import_picocolors.default.green(C) : h2 === 1 ? import_picocolors.default.red(L2) : import_picocolors.default.red(W2);
2963
+ const w2 = h2 === 0 ? import_picocolors2.default.green(C) : h2 === 1 ? import_picocolors2.default.red(L2) : import_picocolors2.default.red(W2);
2924
2964
  l2 = R2(m2 ?? l2), t === "timer" ? process.stdout.write(`${w2} ${l2} ${O2(g2)}
2925
2965
  `) : process.stdout.write(`${w2} ${l2}
2926
2966
  `), E(), s();
@@ -2931,7 +2971,7 @@ var Y2 = ({ indicator: t = "dots" } = {}) => {
2931
2971
  };
2932
2972
 
2933
2973
  // src/cli/install.ts
2934
- var import_picocolors2 = __toESM(require_picocolors(), 1);
2974
+ var import_picocolors3 = __toESM(require_picocolors(), 1);
2935
2975
 
2936
2976
  // src/cli/config-manager.ts
2937
2977
  import { existsSync as existsSync3, mkdirSync, readFileSync as readFileSync3, writeFileSync, statSync } from "fs";
@@ -5598,29 +5638,37 @@ import { readFileSync } from "fs";
5598
5638
  import { join, dirname } from "path";
5599
5639
  import { fileURLToPath } from "url";
5600
5640
  var cachedPackageInfo = null;
5641
+ function isValidPackageJson(obj) {
5642
+ return typeof obj === "object" && obj !== null && typeof obj.name === "string" && obj.name.length > 0;
5643
+ }
5601
5644
  function loadPackageJson() {
5602
5645
  if (cachedPackageInfo) {
5603
5646
  return cachedPackageInfo;
5604
5647
  }
5648
+ const fallback = { name: "oh-my-opencode", version: "0.0.0" };
5605
5649
  try {
5606
5650
  const currentDir = dirname(fileURLToPath(import.meta.url));
5607
5651
  const possiblePaths = [
5652
+ join(currentDir, "..", "package.json"),
5608
5653
  join(currentDir, "..", "..", "package.json"),
5609
5654
  join(currentDir, "..", "..", "..", "package.json")
5610
5655
  ];
5611
5656
  for (const pkgPath of possiblePaths) {
5612
5657
  try {
5613
5658
  const content = readFileSync(pkgPath, "utf-8");
5614
- cachedPackageInfo = JSON.parse(content);
5615
- return cachedPackageInfo;
5659
+ const parsed = JSON.parse(content);
5660
+ if (isValidPackageJson(parsed)) {
5661
+ cachedPackageInfo = parsed;
5662
+ return cachedPackageInfo;
5663
+ }
5616
5664
  } catch {
5617
5665
  continue;
5618
5666
  }
5619
5667
  }
5620
- cachedPackageInfo = { name: "oh-my-opencode", version: "0.0.0" };
5668
+ cachedPackageInfo = fallback;
5621
5669
  return cachedPackageInfo;
5622
5670
  } catch {
5623
- cachedPackageInfo = { name: "oh-my-opencode", version: "0.0.0" };
5671
+ cachedPackageInfo = fallback;
5624
5672
  return cachedPackageInfo;
5625
5673
  }
5626
5674
  }
@@ -6784,6 +6832,23 @@ function generateOmoConfig(installConfig) {
6784
6832
  if (installConfig.hasGemini) {
6785
6833
  config.google_auth = false;
6786
6834
  }
6835
+ if (installConfig.memoryProvider === "mem0-cloud" || installConfig.memoryProvider === "mem0-local") {
6836
+ config.mem0 = {
6837
+ enabled: true,
6838
+ userId: "default-user",
6839
+ autoRehydrate: true,
6840
+ rehydrateLayers: ["user", "project"],
6841
+ ...installConfig.memoryProvider === "mem0-local" && installConfig.memoryEndpoint ? { endpoint: installConfig.memoryEndpoint } : {}
6842
+ };
6843
+ } else if (installConfig.memoryProvider === "letta") {
6844
+ config.letta = {
6845
+ enabled: true,
6846
+ endpoint: installConfig.memoryEndpoint ?? "http://localhost:8283",
6847
+ userId: "default-user",
6848
+ autoRehydrate: true,
6849
+ rehydrateLayers: ["user", "project"]
6850
+ };
6851
+ }
6787
6852
  const agents = {};
6788
6853
  if (!installConfig.hasClaude) {
6789
6854
  agents["Sisyphus"] = { model: "opencode/big-pickle" };
@@ -7098,7 +7163,8 @@ function detectCurrentConfig() {
7098
7163
  hasClaude: true,
7099
7164
  isMax20: true,
7100
7165
  hasChatGPT: true,
7101
- hasGemini: false
7166
+ hasGemini: false,
7167
+ memoryProvider: "no"
7102
7168
  };
7103
7169
  const { format: format2, path: path2 } = detectConfigFormat();
7104
7170
  if (format2 === "none") {
@@ -7150,89 +7216,98 @@ function detectCurrentConfig() {
7150
7216
  if (omoConfig.google_auth === false) {
7151
7217
  result.hasGemini = plugins.some((p2) => p2.startsWith("opencode-antigravity-auth"));
7152
7218
  }
7219
+ if (omoConfig.letta?.enabled === true) {
7220
+ result.memoryProvider = "letta";
7221
+ result.memoryEndpoint = omoConfig.letta.endpoint;
7222
+ } else if (omoConfig.mem0?.enabled === true) {
7223
+ result.memoryProvider = omoConfig.mem0.endpoint ? "mem0-local" : "mem0-cloud";
7224
+ result.memoryEndpoint = omoConfig.mem0.endpoint;
7225
+ }
7153
7226
  } catch {}
7154
7227
  return result;
7155
7228
  }
7156
7229
 
7157
7230
  // src/cli/install.ts
7158
7231
  var SYMBOLS = {
7159
- check: import_picocolors2.default.green("\u2713"),
7160
- cross: import_picocolors2.default.red("\u2717"),
7161
- arrow: import_picocolors2.default.cyan("\u2192"),
7162
- bullet: import_picocolors2.default.dim("\u2022"),
7163
- info: import_picocolors2.default.blue("\u2139"),
7164
- warn: import_picocolors2.default.yellow("\u26A0"),
7165
- star: import_picocolors2.default.yellow("\u2605")
7232
+ check: import_picocolors3.default.green("\u2713"),
7233
+ cross: import_picocolors3.default.red("\u2717"),
7234
+ arrow: import_picocolors3.default.cyan("\u2192"),
7235
+ bullet: import_picocolors3.default.dim("\u2022"),
7236
+ info: import_picocolors3.default.blue("\u2139"),
7237
+ warn: import_picocolors3.default.yellow("\u26A0"),
7238
+ star: import_picocolors3.default.yellow("\u2605")
7166
7239
  };
7167
7240
  function formatProvider(name, enabled, detail) {
7168
- const status = enabled ? SYMBOLS.check : import_picocolors2.default.dim("\u25CB");
7169
- const label = enabled ? import_picocolors2.default.white(name) : import_picocolors2.default.dim(name);
7170
- const suffix = detail ? import_picocolors2.default.dim(` (${detail})`) : "";
7241
+ const status = enabled ? SYMBOLS.check : import_picocolors3.default.dim("\u25CB");
7242
+ const label = enabled ? import_picocolors3.default.white(name) : import_picocolors3.default.dim(name);
7243
+ const suffix = detail ? import_picocolors3.default.dim(` (${detail})`) : "";
7171
7244
  return ` ${status} ${label}${suffix}`;
7172
7245
  }
7173
7246
  function formatConfigSummary(config) {
7174
7247
  const lines = [];
7175
- lines.push(import_picocolors2.default.bold(import_picocolors2.default.white("Configuration Summary")));
7248
+ lines.push(import_picocolors3.default.bold(import_picocolors3.default.white("Configuration Summary")));
7176
7249
  lines.push("");
7177
7250
  const claudeDetail = config.hasClaude ? config.isMax20 ? "max20" : "standard" : undefined;
7178
7251
  lines.push(formatProvider("Claude", config.hasClaude, claudeDetail));
7179
7252
  lines.push(formatProvider("ChatGPT", config.hasChatGPT));
7180
7253
  lines.push(formatProvider("Gemini", config.hasGemini));
7254
+ const memoryLabel = config.memoryProvider === "no" ? "Memory" : config.memoryProvider === "mem0-cloud" ? "Memory (Mem0 Cloud)" : config.memoryProvider === "mem0-local" ? "Memory (Mem0 Self-hosted)" : "Memory (Letta)";
7255
+ lines.push(formatProvider(memoryLabel, config.memoryProvider !== "no"));
7181
7256
  lines.push("");
7182
- lines.push(import_picocolors2.default.dim("\u2500".repeat(40)));
7257
+ lines.push(import_picocolors3.default.dim("\u2500".repeat(40)));
7183
7258
  lines.push("");
7184
- lines.push(import_picocolors2.default.bold(import_picocolors2.default.white("Agent Configuration")));
7259
+ lines.push(import_picocolors3.default.bold(import_picocolors3.default.white("Agent Configuration")));
7185
7260
  lines.push("");
7186
7261
  const sisyphusModel = config.hasClaude ? "claude-opus-4-5" : "big-pickle";
7187
7262
  const oracleModel = config.hasChatGPT ? "gpt-5.2" : config.hasClaude ? "claude-opus-4-5" : "big-pickle";
7188
7263
  const librarianModel = config.hasClaude && config.isMax20 ? "claude-sonnet-4-5" : "big-pickle";
7189
7264
  const frontendModel = config.hasGemini ? "gemini-3-pro-high" : config.hasClaude ? "claude-opus-4-5" : "big-pickle";
7190
- lines.push(` ${SYMBOLS.bullet} Sisyphus ${SYMBOLS.arrow} ${import_picocolors2.default.cyan(sisyphusModel)}`);
7191
- lines.push(` ${SYMBOLS.bullet} Oracle ${SYMBOLS.arrow} ${import_picocolors2.default.cyan(oracleModel)}`);
7192
- lines.push(` ${SYMBOLS.bullet} Librarian ${SYMBOLS.arrow} ${import_picocolors2.default.cyan(librarianModel)}`);
7193
- lines.push(` ${SYMBOLS.bullet} Frontend ${SYMBOLS.arrow} ${import_picocolors2.default.cyan(frontendModel)}`);
7265
+ lines.push(` ${SYMBOLS.bullet} Sisyphus ${SYMBOLS.arrow} ${import_picocolors3.default.cyan(sisyphusModel)}`);
7266
+ lines.push(` ${SYMBOLS.bullet} Oracle ${SYMBOLS.arrow} ${import_picocolors3.default.cyan(oracleModel)}`);
7267
+ lines.push(` ${SYMBOLS.bullet} Librarian ${SYMBOLS.arrow} ${import_picocolors3.default.cyan(librarianModel)}`);
7268
+ lines.push(` ${SYMBOLS.bullet} Frontend ${SYMBOLS.arrow} ${import_picocolors3.default.cyan(frontendModel)}`);
7194
7269
  return lines.join(`
7195
7270
  `);
7196
7271
  }
7197
7272
  function printHeader(isUpdate) {
7198
7273
  const mode = isUpdate ? "Update" : "Install";
7199
7274
  console.log();
7200
- console.log(import_picocolors2.default.bgMagenta(import_picocolors2.default.white(` oMoMoMoMo... ${mode} `)));
7275
+ console.log(import_picocolors3.default.bgMagenta(import_picocolors3.default.white(` oMoMoMoMo... ${mode} `)));
7201
7276
  console.log();
7202
7277
  }
7203
7278
  function printStep(step, total, message) {
7204
- const progress = import_picocolors2.default.dim(`[${step}/${total}]`);
7279
+ const progress = import_picocolors3.default.dim(`[${step}/${total}]`);
7205
7280
  console.log(`${progress} ${message}`);
7206
7281
  }
7207
7282
  function printSuccess(message) {
7208
7283
  console.log(`${SYMBOLS.check} ${message}`);
7209
7284
  }
7210
7285
  function printError(message) {
7211
- console.log(`${SYMBOLS.cross} ${import_picocolors2.default.red(message)}`);
7286
+ console.log(`${SYMBOLS.cross} ${import_picocolors3.default.red(message)}`);
7212
7287
  }
7213
7288
  function printInfo(message) {
7214
7289
  console.log(`${SYMBOLS.info} ${message}`);
7215
7290
  }
7216
7291
  function printWarning(message) {
7217
- console.log(`${SYMBOLS.warn} ${import_picocolors2.default.yellow(message)}`);
7292
+ console.log(`${SYMBOLS.warn} ${import_picocolors3.default.yellow(message)}`);
7218
7293
  }
7219
7294
  function printBox(content, title) {
7220
7295
  const lines = content.split(`
7221
7296
  `);
7222
7297
  const maxWidth = Math.max(...lines.map((l2) => l2.replace(/\x1b\[[0-9;]*m/g, "").length), title?.length ?? 0) + 4;
7223
- const border = import_picocolors2.default.dim("\u2500".repeat(maxWidth));
7298
+ const border = import_picocolors3.default.dim("\u2500".repeat(maxWidth));
7224
7299
  console.log();
7225
7300
  if (title) {
7226
- console.log(import_picocolors2.default.dim("\u250C\u2500") + import_picocolors2.default.bold(` ${title} `) + import_picocolors2.default.dim("\u2500".repeat(maxWidth - title.length - 4)) + import_picocolors2.default.dim("\u2510"));
7301
+ console.log(import_picocolors3.default.dim("\u250C\u2500") + import_picocolors3.default.bold(` ${title} `) + import_picocolors3.default.dim("\u2500".repeat(maxWidth - title.length - 4)) + import_picocolors3.default.dim("\u2510"));
7227
7302
  } else {
7228
- console.log(import_picocolors2.default.dim("\u250C") + border + import_picocolors2.default.dim("\u2510"));
7303
+ console.log(import_picocolors3.default.dim("\u250C") + border + import_picocolors3.default.dim("\u2510"));
7229
7304
  }
7230
7305
  for (const line of lines) {
7231
7306
  const stripped = line.replace(/\x1b\[[0-9;]*m/g, "");
7232
7307
  const padding = maxWidth - stripped.length;
7233
- console.log(import_picocolors2.default.dim("\u2502") + ` ${line}${" ".repeat(padding - 1)}` + import_picocolors2.default.dim("\u2502"));
7308
+ console.log(import_picocolors3.default.dim("\u2502") + ` ${line}${" ".repeat(padding - 1)}` + import_picocolors3.default.dim("\u2502"));
7234
7309
  }
7235
- console.log(import_picocolors2.default.dim("\u2514") + border + import_picocolors2.default.dim("\u2518"));
7310
+ console.log(import_picocolors3.default.dim("\u2514") + border + import_picocolors3.default.dim("\u2518"));
7236
7311
  console.log();
7237
7312
  }
7238
7313
  function validateNonTuiArgs(args) {
@@ -7252,6 +7327,9 @@ function validateNonTuiArgs(args) {
7252
7327
  } else if (!["no", "yes"].includes(args.gemini)) {
7253
7328
  errors.push(`Invalid --gemini value: ${args.gemini} (expected: no, yes)`);
7254
7329
  }
7330
+ if (args.memory !== undefined && !["no", "mem0-cloud", "mem0-local", "letta"].includes(args.memory)) {
7331
+ errors.push(`Invalid --memory value: ${args.memory} (expected: no, mem0-cloud, mem0-local, letta)`);
7332
+ }
7255
7333
  return { valid: errors.length === 0, errors };
7256
7334
  }
7257
7335
  function argsToConfig(args) {
@@ -7259,7 +7337,9 @@ function argsToConfig(args) {
7259
7337
  hasClaude: args.claude !== "no",
7260
7338
  isMax20: args.claude === "max20",
7261
7339
  hasChatGPT: args.chatgpt === "yes",
7262
- hasGemini: args.gemini === "yes"
7340
+ hasGemini: args.gemini === "yes",
7341
+ memoryProvider: args.memory ?? "no",
7342
+ memoryEndpoint: args.memory === "mem0-local" || args.memory === "letta" ? args.memoryEndpoint ?? (args.memory === "letta" ? "http://localhost:8283" : "http://localhost:8000/v1") : undefined
7263
7343
  };
7264
7344
  }
7265
7345
  function detectedToInitialValues(detected) {
@@ -7270,7 +7350,8 @@ function detectedToInitialValues(detected) {
7270
7350
  return {
7271
7351
  claude,
7272
7352
  chatgpt: detected.hasChatGPT ? "yes" : "no",
7273
- gemini: detected.hasGemini ? "yes" : "no"
7353
+ gemini: detected.hasGemini ? "yes" : "no",
7354
+ memory: detected.memoryProvider
7274
7355
  };
7275
7356
  }
7276
7357
  async function runTuiMode(detected) {
@@ -7312,11 +7393,51 @@ async function runTuiMode(detected) {
7312
7393
  xe("Installation cancelled.");
7313
7394
  return null;
7314
7395
  }
7396
+ const memory = await ve({
7397
+ message: "Enable persistent memory for agent context?",
7398
+ options: [
7399
+ { value: "no", label: "No", hint: "Skip memory integration" },
7400
+ { value: "mem0-cloud", label: "Mem0 Cloud (mem0.ai)", hint: "Requires MEM0_API_KEY env variable" },
7401
+ { value: "mem0-local", label: "Mem0 Self-hosted", hint: "Uses custom Mem0 endpoint" },
7402
+ { value: "letta", label: "Letta", hint: "Self-hosted Letta server (port 8283)" }
7403
+ ],
7404
+ initialValue: initial.memory
7405
+ });
7406
+ if (pD(memory)) {
7407
+ xe("Installation cancelled.");
7408
+ return null;
7409
+ }
7410
+ let memoryEndpoint;
7411
+ if (memory === "mem0-local") {
7412
+ const endpoint = await he({
7413
+ message: "Enter Mem0 endpoint URL:",
7414
+ placeholder: "http://localhost:8000/v1",
7415
+ defaultValue: "http://localhost:8000/v1"
7416
+ });
7417
+ if (pD(endpoint)) {
7418
+ xe("Installation cancelled.");
7419
+ return null;
7420
+ }
7421
+ memoryEndpoint = endpoint || "http://localhost:8000/v1";
7422
+ } else if (memory === "letta") {
7423
+ const endpoint = await he({
7424
+ message: "Enter Letta server URL:",
7425
+ placeholder: "http://localhost:8283",
7426
+ defaultValue: "http://localhost:8283"
7427
+ });
7428
+ if (pD(endpoint)) {
7429
+ xe("Installation cancelled.");
7430
+ return null;
7431
+ }
7432
+ memoryEndpoint = endpoint || "http://localhost:8283";
7433
+ }
7315
7434
  return {
7316
7435
  hasClaude: claude !== "no",
7317
7436
  isMax20: claude === "max20",
7318
7437
  hasChatGPT: chatgpt === "yes",
7319
- hasGemini: gemini === "yes"
7438
+ hasGemini: gemini === "yes",
7439
+ memoryProvider: memory,
7440
+ memoryEndpoint
7320
7441
  };
7321
7442
  }
7322
7443
  async function runNonTuiInstall(args) {
@@ -7357,7 +7478,7 @@ async function runNonTuiInstall(args) {
7357
7478
  printError(`Failed: ${pluginResult.error}`);
7358
7479
  return 1;
7359
7480
  }
7360
- printSuccess(`Plugin ${isUpdate ? "verified" : "added"} ${SYMBOLS.arrow} ${import_picocolors2.default.dim(pluginResult.configPath)}`);
7481
+ printSuccess(`Plugin ${isUpdate ? "verified" : "added"} ${SYMBOLS.arrow} ${import_picocolors3.default.dim(pluginResult.configPath)}`);
7361
7482
  if (config.hasGemini || config.hasChatGPT) {
7362
7483
  printStep(step++, totalSteps, "Adding auth plugins...");
7363
7484
  const authResult = await addAuthPlugins(config);
@@ -7365,14 +7486,14 @@ async function runNonTuiInstall(args) {
7365
7486
  printError(`Failed: ${authResult.error}`);
7366
7487
  return 1;
7367
7488
  }
7368
- printSuccess(`Auth plugins configured ${SYMBOLS.arrow} ${import_picocolors2.default.dim(authResult.configPath)}`);
7489
+ printSuccess(`Auth plugins configured ${SYMBOLS.arrow} ${import_picocolors3.default.dim(authResult.configPath)}`);
7369
7490
  printStep(step++, totalSteps, "Adding provider configurations...");
7370
7491
  const providerResult = addProviderConfig(config);
7371
7492
  if (!providerResult.success) {
7372
7493
  printError(`Failed: ${providerResult.error}`);
7373
7494
  return 1;
7374
7495
  }
7375
- printSuccess(`Providers configured ${SYMBOLS.arrow} ${import_picocolors2.default.dim(providerResult.configPath)}`);
7496
+ printSuccess(`Providers configured ${SYMBOLS.arrow} ${import_picocolors3.default.dim(providerResult.configPath)}`);
7376
7497
  } else {
7377
7498
  step += 2;
7378
7499
  }
@@ -7383,7 +7504,7 @@ async function runNonTuiInstall(args) {
7383
7504
  printError(`Failed: ${hotfixResult.error}`);
7384
7505
  return 1;
7385
7506
  }
7386
- printSuccess(`Hotfix configured ${SYMBOLS.arrow} ${import_picocolors2.default.dim(hotfixResult.configPath)}`);
7507
+ printSuccess(`Hotfix configured ${SYMBOLS.arrow} ${import_picocolors3.default.dim(hotfixResult.configPath)}`);
7387
7508
  printInfo("Installing dependencies with bun...");
7388
7509
  const bunSuccess = await runBunInstall();
7389
7510
  if (bunSuccess) {
@@ -7400,35 +7521,35 @@ async function runNonTuiInstall(args) {
7400
7521
  printError(`Failed: ${omoResult.error}`);
7401
7522
  return 1;
7402
7523
  }
7403
- printSuccess(`Config written ${SYMBOLS.arrow} ${import_picocolors2.default.dim(omoResult.configPath)}`);
7524
+ printSuccess(`Config written ${SYMBOLS.arrow} ${import_picocolors3.default.dim(omoResult.configPath)}`);
7404
7525
  printBox(formatConfigSummary(config), isUpdate ? "Updated Configuration" : "Installation Complete");
7405
7526
  if (!config.hasClaude && !config.hasChatGPT && !config.hasGemini) {
7406
7527
  printWarning("No model providers configured. Using opencode/big-pickle as fallback.");
7407
7528
  }
7408
7529
  if ((config.hasClaude || config.hasChatGPT || config.hasGemini) && !args.skipAuth) {
7409
- console.log(import_picocolors2.default.bold("Next Steps - Authenticate your providers:"));
7530
+ console.log(import_picocolors3.default.bold("Next Steps - Authenticate your providers:"));
7410
7531
  console.log();
7411
7532
  if (config.hasClaude) {
7412
- console.log(` ${SYMBOLS.arrow} ${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Anthropic \u2192 Claude Pro/Max)")}`);
7533
+ console.log(` ${SYMBOLS.arrow} ${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select Anthropic \u2192 Claude Pro/Max)")}`);
7413
7534
  }
7414
7535
  if (config.hasChatGPT) {
7415
- console.log(` ${SYMBOLS.arrow} ${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select OpenAI \u2192 ChatGPT Plus/Pro)")}`);
7536
+ console.log(` ${SYMBOLS.arrow} ${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select OpenAI \u2192 ChatGPT Plus/Pro)")}`);
7416
7537
  }
7417
7538
  if (config.hasGemini) {
7418
- console.log(` ${SYMBOLS.arrow} ${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Google \u2192 OAuth with Antigravity)")}`);
7539
+ console.log(` ${SYMBOLS.arrow} ${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select Google \u2192 OAuth with Antigravity)")}`);
7419
7540
  }
7420
7541
  console.log();
7421
7542
  }
7422
- console.log(`${SYMBOLS.star} ${import_picocolors2.default.bold(import_picocolors2.default.green(isUpdate ? "Configuration updated!" : "Installation complete!"))}`);
7423
- console.log(` Run ${import_picocolors2.default.cyan("opencode")} to start!`);
7543
+ console.log(`${SYMBOLS.star} ${import_picocolors3.default.bold(import_picocolors3.default.green(isUpdate ? "Configuration updated!" : "Installation complete!"))}`);
7544
+ console.log(` Run ${import_picocolors3.default.cyan("opencode")} to start!`);
7424
7545
  console.log();
7425
- printBox(`${import_picocolors2.default.bold("Pro Tip:")} Include ${import_picocolors2.default.cyan("ultrawork")} (or ${import_picocolors2.default.cyan("ulw")}) in your prompt.
7546
+ printBox(`${import_picocolors3.default.bold("Pro Tip:")} Include ${import_picocolors3.default.cyan("ultrawork")} (or ${import_picocolors3.default.cyan("ulw")}) in your prompt.
7426
7547
  ` + `All features work like magic\u2014parallel agents, background tasks,
7427
7548
  ` + `deep exploration, and relentless execution until completion.`, "\uD83E\uDE84 The Magic Word");
7428
- console.log(`${SYMBOLS.star} ${import_picocolors2.default.yellow("If you found this helpful, consider starring the repo!")}`);
7429
- console.log(` ${import_picocolors2.default.dim("gh repo star code-yeongyu/oh-my-opencode")}`);
7549
+ console.log(`${SYMBOLS.star} ${import_picocolors3.default.yellow("If you found this helpful, consider starring the repo!")}`);
7550
+ console.log(` ${import_picocolors3.default.dim("gh repo star code-yeongyu/oh-my-opencode")}`);
7430
7551
  console.log();
7431
- console.log(import_picocolors2.default.dim("oMoMoMoMo... Enjoy!"));
7552
+ console.log(import_picocolors3.default.dim("oMoMoMoMo... Enjoy!"));
7432
7553
  console.log();
7433
7554
  return 0;
7434
7555
  }
@@ -7438,7 +7559,7 @@ async function install(args) {
7438
7559
  }
7439
7560
  const detected = detectCurrentConfig();
7440
7561
  const isUpdate = detected.isInstalled;
7441
- Ie(import_picocolors2.default.bgMagenta(import_picocolors2.default.white(isUpdate ? " oMoMoMoMo... Update " : " oMoMoMoMo... ")));
7562
+ Ie(import_picocolors3.default.bgMagenta(import_picocolors3.default.white(isUpdate ? " oMoMoMoMo... Update " : " oMoMoMoMo... ")));
7442
7563
  if (isUpdate) {
7443
7564
  const initial = detectedToInitialValues(detected);
7444
7565
  M2.info(`Existing configuration detected: Claude=${initial.claude}, ChatGPT=${initial.chatgpt}, Gemini=${initial.gemini}`);
@@ -7450,11 +7571,11 @@ async function install(args) {
7450
7571
  s.stop("OpenCode is not installed");
7451
7572
  M2.error("OpenCode is not installed on this system.");
7452
7573
  Me("Visit https://opencode.ai/docs for installation instructions", "Installation Guide");
7453
- Se(import_picocolors2.default.red("Please install OpenCode first."));
7574
+ Se(import_picocolors3.default.red("Please install OpenCode first."));
7454
7575
  return 1;
7455
7576
  }
7456
7577
  const version = await getOpenCodeVersion();
7457
- s.stop(`OpenCode ${version ?? "installed"} ${import_picocolors2.default.green("\u2713")}`);
7578
+ s.stop(`OpenCode ${version ?? "installed"} ${import_picocolors3.default.green("\u2713")}`);
7458
7579
  const config = await runTuiMode(detected);
7459
7580
  if (!config)
7460
7581
  return 1;
@@ -7462,53 +7583,53 @@ async function install(args) {
7462
7583
  const pluginResult = addPluginToOpenCodeConfig();
7463
7584
  if (!pluginResult.success) {
7464
7585
  s.stop(`Failed to add plugin: ${pluginResult.error}`);
7465
- Se(import_picocolors2.default.red("Installation failed."));
7586
+ Se(import_picocolors3.default.red("Installation failed."));
7466
7587
  return 1;
7467
7588
  }
7468
- s.stop(`Plugin added to ${import_picocolors2.default.cyan(pluginResult.configPath)}`);
7589
+ s.stop(`Plugin added to ${import_picocolors3.default.cyan(pluginResult.configPath)}`);
7469
7590
  if (config.hasGemini || config.hasChatGPT) {
7470
7591
  s.start("Adding auth plugins (fetching latest versions)");
7471
7592
  const authResult = await addAuthPlugins(config);
7472
7593
  if (!authResult.success) {
7473
7594
  s.stop(`Failed to add auth plugins: ${authResult.error}`);
7474
- Se(import_picocolors2.default.red("Installation failed."));
7595
+ Se(import_picocolors3.default.red("Installation failed."));
7475
7596
  return 1;
7476
7597
  }
7477
- s.stop(`Auth plugins added to ${import_picocolors2.default.cyan(authResult.configPath)}`);
7598
+ s.stop(`Auth plugins added to ${import_picocolors3.default.cyan(authResult.configPath)}`);
7478
7599
  s.start("Adding provider configurations");
7479
7600
  const providerResult = addProviderConfig(config);
7480
7601
  if (!providerResult.success) {
7481
7602
  s.stop(`Failed to add provider config: ${providerResult.error}`);
7482
- Se(import_picocolors2.default.red("Installation failed."));
7603
+ Se(import_picocolors3.default.red("Installation failed."));
7483
7604
  return 1;
7484
7605
  }
7485
- s.stop(`Provider config added to ${import_picocolors2.default.cyan(providerResult.configPath)}`);
7606
+ s.stop(`Provider config added to ${import_picocolors3.default.cyan(providerResult.configPath)}`);
7486
7607
  }
7487
7608
  if (config.hasChatGPT) {
7488
7609
  s.start("Setting up ChatGPT hotfix");
7489
7610
  const hotfixResult = setupChatGPTHotfix();
7490
7611
  if (!hotfixResult.success) {
7491
7612
  s.stop(`Failed to setup hotfix: ${hotfixResult.error}`);
7492
- Se(import_picocolors2.default.red("Installation failed."));
7613
+ Se(import_picocolors3.default.red("Installation failed."));
7493
7614
  return 1;
7494
7615
  }
7495
- s.stop(`Hotfix configured in ${import_picocolors2.default.cyan(hotfixResult.configPath)}`);
7616
+ s.stop(`Hotfix configured in ${import_picocolors3.default.cyan(hotfixResult.configPath)}`);
7496
7617
  s.start("Installing dependencies with bun");
7497
7618
  const bunSuccess = await runBunInstall();
7498
7619
  if (bunSuccess) {
7499
7620
  s.stop("Dependencies installed");
7500
7621
  } else {
7501
- s.stop(import_picocolors2.default.yellow("bun install failed - run manually: cd ~/.config/opencode && bun i"));
7622
+ s.stop(import_picocolors3.default.yellow("bun install failed - run manually: cd ~/.config/opencode && bun i"));
7502
7623
  }
7503
7624
  }
7504
7625
  s.start("Writing oh-my-opencode configuration");
7505
7626
  const omoResult = writeOmoConfig(config);
7506
7627
  if (!omoResult.success) {
7507
7628
  s.stop(`Failed to write config: ${omoResult.error}`);
7508
- Se(import_picocolors2.default.red("Installation failed."));
7629
+ Se(import_picocolors3.default.red("Installation failed."));
7509
7630
  return 1;
7510
7631
  }
7511
- s.stop(`Config written to ${import_picocolors2.default.cyan(omoResult.configPath)}`);
7632
+ s.stop(`Config written to ${import_picocolors3.default.cyan(omoResult.configPath)}`);
7512
7633
  if (!config.hasClaude && !config.hasChatGPT && !config.hasGemini) {
7513
7634
  M2.warn("No model providers configured. Using opencode/big-pickle as fallback.");
7514
7635
  }
@@ -7516,25 +7637,25 @@ async function install(args) {
7516
7637
  if ((config.hasClaude || config.hasChatGPT || config.hasGemini) && !args.skipAuth) {
7517
7638
  const steps = [];
7518
7639
  if (config.hasClaude) {
7519
- steps.push(`${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Anthropic \u2192 Claude Pro/Max)")}`);
7640
+ steps.push(`${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select Anthropic \u2192 Claude Pro/Max)")}`);
7520
7641
  }
7521
7642
  if (config.hasChatGPT) {
7522
- steps.push(`${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select OpenAI \u2192 ChatGPT Plus/Pro)")}`);
7643
+ steps.push(`${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select OpenAI \u2192 ChatGPT Plus/Pro)")}`);
7523
7644
  }
7524
7645
  if (config.hasGemini) {
7525
- steps.push(`${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Google \u2192 OAuth with Antigravity)")}`);
7646
+ steps.push(`${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select Google \u2192 OAuth with Antigravity)")}`);
7526
7647
  }
7527
7648
  Me(steps.join(`
7528
7649
  `), "Next Steps - Authenticate your providers");
7529
7650
  }
7530
- M2.success(import_picocolors2.default.bold(isUpdate ? "Configuration updated!" : "Installation complete!"));
7531
- M2.message(`Run ${import_picocolors2.default.cyan("opencode")} to start!`);
7532
- Me(`Include ${import_picocolors2.default.cyan("ultrawork")} (or ${import_picocolors2.default.cyan("ulw")}) in your prompt.
7651
+ M2.success(import_picocolors3.default.bold(isUpdate ? "Configuration updated!" : "Installation complete!"));
7652
+ M2.message(`Run ${import_picocolors3.default.cyan("opencode")} to start!`);
7653
+ Me(`Include ${import_picocolors3.default.cyan("ultrawork")} (or ${import_picocolors3.default.cyan("ulw")}) in your prompt.
7533
7654
  ` + `All features work like magic\u2014parallel agents, background tasks,
7534
7655
  ` + `deep exploration, and relentless execution until completion.`, "\uD83E\uDE84 The Magic Word");
7535
- M2.message(`${import_picocolors2.default.yellow("\u2605")} If you found this helpful, consider starring the repo!`);
7536
- M2.message(` ${import_picocolors2.default.dim("gh repo star code-yeongyu/oh-my-opencode")}`);
7537
- Se(import_picocolors2.default.green("oMoMoMoMo... Enjoy!"));
7656
+ M2.message(`${import_picocolors3.default.yellow("\u2605")} If you found this helpful, consider starring the repo!`);
7657
+ M2.message(` ${import_picocolors3.default.dim("gh repo star code-yeongyu/oh-my-opencode")}`);
7658
+ Se(import_picocolors3.default.green("oMoMoMoMo... Enjoy!"));
7538
7659
  return 0;
7539
7660
  }
7540
7661
  // node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js
@@ -7705,7 +7826,7 @@ var separatorObjectExplode = (style) => {
7705
7826
  };
7706
7827
  var serializeArrayParam = ({ allowReserved, explode, name, style, value }) => {
7707
7828
  if (!explode) {
7708
- const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
7829
+ const joinedValues2 = (allowReserved ? value : value.map((v2) => encodeURIComponent(v2))).join(separatorArrayNoExplode(style));
7709
7830
  switch (style) {
7710
7831
  case "label":
7711
7832
  return `.${joinedValues2}`;
@@ -7718,14 +7839,14 @@ var serializeArrayParam = ({ allowReserved, explode, name, style, value }) => {
7718
7839
  }
7719
7840
  }
7720
7841
  const separator = separatorArrayExplode(style);
7721
- const joinedValues = value.map((v) => {
7842
+ const joinedValues = value.map((v2) => {
7722
7843
  if (style === "label" || style === "simple") {
7723
- return allowReserved ? v : encodeURIComponent(v);
7844
+ return allowReserved ? v2 : encodeURIComponent(v2);
7724
7845
  }
7725
7846
  return serializePrimitiveParam({
7726
7847
  allowReserved,
7727
7848
  name,
7728
- value: v
7849
+ value: v2
7729
7850
  });
7730
7851
  }).join(separator);
7731
7852
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
@@ -7745,8 +7866,8 @@ var serializeObjectParam = ({ allowReserved, explode, name, style, value, valueO
7745
7866
  }
7746
7867
  if (style !== "deepObject" && !explode) {
7747
7868
  let values = [];
7748
- Object.entries(value).forEach(([key, v]) => {
7749
- values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
7869
+ Object.entries(value).forEach(([key, v2]) => {
7870
+ values = [...values, key, allowReserved ? v2 : encodeURIComponent(v2)];
7750
7871
  });
7751
7872
  const joinedValues2 = values.join(",");
7752
7873
  switch (style) {
@@ -7761,10 +7882,10 @@ var serializeObjectParam = ({ allowReserved, explode, name, style, value, valueO
7761
7882
  }
7762
7883
  }
7763
7884
  const separator = separatorObjectExplode(style);
7764
- const joinedValues = Object.entries(value).map(([key, v]) => serializePrimitiveParam({
7885
+ const joinedValues = Object.entries(value).map(([key, v2]) => serializePrimitiveParam({
7765
7886
  allowReserved,
7766
7887
  name: style === "deepObject" ? `${name}[${key}]` : key,
7767
- value: v
7888
+ value: v2
7768
7889
  })).join(separator);
7769
7890
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
7770
7891
  };
@@ -7968,8 +8089,8 @@ var mergeHeaders = (...headers) => {
7968
8089
  if (value === null) {
7969
8090
  mergedHeaders.delete(key);
7970
8091
  } else if (Array.isArray(value)) {
7971
- for (const v of value) {
7972
- mergedHeaders.append(key, v);
8092
+ for (const v2 of value) {
8093
+ mergedHeaders.append(key, v2);
7973
8094
  }
7974
8095
  } else if (value !== undefined) {
7975
8096
  mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
@@ -8977,10 +9098,10 @@ async function createOpencode(options) {
8977
9098
  }
8978
9099
 
8979
9100
  // src/cli/run/runner.ts
8980
- var import_picocolors5 = __toESM(require_picocolors(), 1);
9101
+ var import_picocolors6 = __toESM(require_picocolors(), 1);
8981
9102
 
8982
9103
  // src/cli/run/completion.ts
8983
- var import_picocolors3 = __toESM(require_picocolors(), 1);
9104
+ var import_picocolors4 = __toESM(require_picocolors(), 1);
8984
9105
  async function checkCompletionConditions(ctx) {
8985
9106
  try {
8986
9107
  if (!await areAllTodosComplete(ctx)) {
@@ -8991,7 +9112,7 @@ async function checkCompletionConditions(ctx) {
8991
9112
  }
8992
9113
  return true;
8993
9114
  } catch (err) {
8994
- console.error(import_picocolors3.default.red(`[completion] API error: ${err}`));
9115
+ console.error(import_picocolors4.default.red(`[completion] API error: ${err}`));
8995
9116
  return false;
8996
9117
  }
8997
9118
  }
@@ -9000,7 +9121,7 @@ async function areAllTodosComplete(ctx) {
9000
9121
  const todos = todosRes.data ?? [];
9001
9122
  const incompleteTodos = todos.filter((t) => t.status !== "completed" && t.status !== "cancelled");
9002
9123
  if (incompleteTodos.length > 0) {
9003
- console.log(import_picocolors3.default.dim(` Waiting: ${incompleteTodos.length} todos remaining`));
9124
+ console.log(import_picocolors4.default.dim(` Waiting: ${incompleteTodos.length} todos remaining`));
9004
9125
  return false;
9005
9126
  }
9006
9127
  return true;
@@ -9021,7 +9142,7 @@ async function areAllDescendantsIdle(ctx, sessionID, allStatuses) {
9021
9142
  for (const child of children) {
9022
9143
  const status = allStatuses[child.id];
9023
9144
  if (status && status.type !== "idle") {
9024
- console.log(import_picocolors3.default.dim(` Waiting: session ${child.id.slice(0, 8)}... is ${status.type}`));
9145
+ console.log(import_picocolors4.default.dim(` Waiting: session ${child.id.slice(0, 8)}... is ${status.type}`));
9025
9146
  return false;
9026
9147
  }
9027
9148
  const descendantsIdle = await areAllDescendantsIdle(ctx, child.id, allStatuses);
@@ -9033,7 +9154,7 @@ async function areAllDescendantsIdle(ctx, sessionID, allStatuses) {
9033
9154
  }
9034
9155
 
9035
9156
  // src/cli/run/events.ts
9036
- var import_picocolors4 = __toESM(require_picocolors(), 1);
9157
+ var import_picocolors5 = __toESM(require_picocolors(), 1);
9037
9158
  function createEventState() {
9038
9159
  return {
9039
9160
  mainSessionIdle: false,
@@ -9051,7 +9172,7 @@ async function processEvents(ctx, stream, state) {
9051
9172
  try {
9052
9173
  const payload = event;
9053
9174
  if (!payload?.type) {
9054
- console.error(import_picocolors4.default.dim(`[event] no type: ${JSON.stringify(event)}`));
9175
+ console.error(import_picocolors5.default.dim(`[event] no type: ${JSON.stringify(event)}`));
9055
9176
  continue;
9056
9177
  }
9057
9178
  logEventVerbose(ctx, payload);
@@ -9063,7 +9184,7 @@ async function processEvents(ctx, stream, state) {
9063
9184
  handleToolExecute(ctx, payload, state);
9064
9185
  handleToolResult(ctx, payload, state);
9065
9186
  } catch (err) {
9066
- console.error(import_picocolors4.default.red(`[event error] ${err}`));
9187
+ console.error(import_picocolors5.default.red(`[event error] ${err}`));
9067
9188
  }
9068
9189
  }
9069
9190
  }
@@ -9072,12 +9193,12 @@ function logEventVerbose(ctx, payload) {
9072
9193
  const info = props?.info;
9073
9194
  const sessionID = props?.sessionID ?? info?.sessionID;
9074
9195
  const isMainSession = sessionID === ctx.sessionID;
9075
- const sessionTag = isMainSession ? import_picocolors4.default.green("[MAIN]") : import_picocolors4.default.yellow(`[${String(sessionID).slice(0, 8)}]`);
9196
+ const sessionTag = isMainSession ? import_picocolors5.default.green("[MAIN]") : import_picocolors5.default.yellow(`[${String(sessionID).slice(0, 8)}]`);
9076
9197
  switch (payload.type) {
9077
9198
  case "session.idle":
9078
9199
  case "session.status": {
9079
9200
  const status = props?.status?.type ?? "idle";
9080
- console.error(import_picocolors4.default.dim(`${sessionTag} ${payload.type}: ${status}`));
9201
+ console.error(import_picocolors5.default.dim(`${sessionTag} ${payload.type}: ${status}`));
9081
9202
  break;
9082
9203
  }
9083
9204
  case "message.part.updated": {
@@ -9085,7 +9206,7 @@ function logEventVerbose(ctx, payload) {
9085
9206
  const part = partProps?.part;
9086
9207
  if (part?.type === "tool-invocation") {
9087
9208
  const toolPart = part;
9088
- console.error(import_picocolors4.default.dim(`${sessionTag} message.part (tool): ${toolPart.toolName} [${toolPart.state}]`));
9209
+ console.error(import_picocolors5.default.dim(`${sessionTag} message.part (tool): ${toolPart.toolName} [${toolPart.state}]`));
9089
9210
  }
9090
9211
  break;
9091
9212
  }
@@ -9094,7 +9215,7 @@ function logEventVerbose(ctx, payload) {
9094
9215
  const role = msgProps?.info?.role ?? "unknown";
9095
9216
  const content = msgProps?.content ?? "";
9096
9217
  const preview = content.slice(0, 100).replace(/\n/g, "\\n");
9097
- console.error(import_picocolors4.default.dim(`${sessionTag} message.updated (${role}): "${preview}${content.length > 100 ? "..." : ""}"`));
9218
+ console.error(import_picocolors5.default.dim(`${sessionTag} message.updated (${role}): "${preview}${content.length > 100 ? "..." : ""}"`));
9098
9219
  break;
9099
9220
  }
9100
9221
  case "tool.execute": {
@@ -9102,19 +9223,19 @@ function logEventVerbose(ctx, payload) {
9102
9223
  const toolName = toolProps?.name ?? "unknown";
9103
9224
  const input = toolProps?.input ?? {};
9104
9225
  const inputStr = JSON.stringify(input).slice(0, 150);
9105
- console.error(import_picocolors4.default.cyan(`${sessionTag} \u26A1 TOOL.EXECUTE: ${import_picocolors4.default.bold(toolName)}`));
9106
- console.error(import_picocolors4.default.dim(` input: ${inputStr}${inputStr.length >= 150 ? "..." : ""}`));
9226
+ console.error(import_picocolors5.default.cyan(`${sessionTag} \u26A1 TOOL.EXECUTE: ${import_picocolors5.default.bold(toolName)}`));
9227
+ console.error(import_picocolors5.default.dim(` input: ${inputStr}${inputStr.length >= 150 ? "..." : ""}`));
9107
9228
  break;
9108
9229
  }
9109
9230
  case "tool.result": {
9110
9231
  const resultProps = props;
9111
9232
  const output = resultProps?.output ?? "";
9112
9233
  const preview = output.slice(0, 200).replace(/\n/g, "\\n");
9113
- console.error(import_picocolors4.default.green(`${sessionTag} \u2713 TOOL.RESULT: "${preview}${output.length > 200 ? "..." : ""}"`));
9234
+ console.error(import_picocolors5.default.green(`${sessionTag} \u2713 TOOL.RESULT: "${preview}${output.length > 200 ? "..." : ""}"`));
9114
9235
  break;
9115
9236
  }
9116
9237
  default:
9117
- console.error(import_picocolors4.default.dim(`${sessionTag} ${payload.type}`));
9238
+ console.error(import_picocolors5.default.dim(`${sessionTag} ${payload.type}`));
9118
9239
  }
9119
9240
  }
9120
9241
  function handleSessionIdle(ctx, payload, state) {
@@ -9140,7 +9261,7 @@ function handleSessionError(ctx, payload, state) {
9140
9261
  if (props?.sessionID === ctx.sessionID) {
9141
9262
  state.mainSessionError = true;
9142
9263
  state.lastError = props?.error ? String(props.error instanceof Error ? props.error.message : props.error) : "Unknown error";
9143
- console.error(import_picocolors4.default.red(`
9264
+ console.error(import_picocolors5.default.red(`
9144
9265
  [session.error] ${state.lastError}`));
9145
9266
  }
9146
9267
  }
@@ -9194,17 +9315,17 @@ function handleToolExecute(ctx, payload, state) {
9194
9315
  if (props?.input) {
9195
9316
  const input = props.input;
9196
9317
  if (input.command) {
9197
- inputPreview = ` ${import_picocolors4.default.dim(String(input.command).slice(0, 60))}`;
9318
+ inputPreview = ` ${import_picocolors5.default.dim(String(input.command).slice(0, 60))}`;
9198
9319
  } else if (input.pattern) {
9199
- inputPreview = ` ${import_picocolors4.default.dim(String(input.pattern).slice(0, 40))}`;
9320
+ inputPreview = ` ${import_picocolors5.default.dim(String(input.pattern).slice(0, 40))}`;
9200
9321
  } else if (input.filePath) {
9201
- inputPreview = ` ${import_picocolors4.default.dim(String(input.filePath))}`;
9322
+ inputPreview = ` ${import_picocolors5.default.dim(String(input.filePath))}`;
9202
9323
  } else if (input.query) {
9203
- inputPreview = ` ${import_picocolors4.default.dim(String(input.query).slice(0, 40))}`;
9324
+ inputPreview = ` ${import_picocolors5.default.dim(String(input.query).slice(0, 40))}`;
9204
9325
  }
9205
9326
  }
9206
9327
  process.stdout.write(`
9207
- ${import_picocolors4.default.cyan("\u26A1")} ${import_picocolors4.default.bold(toolName)}${inputPreview}
9328
+ ${import_picocolors5.default.cyan("\u26A1")} ${import_picocolors5.default.bold(toolName)}${inputPreview}
9208
9329
  `);
9209
9330
  }
9210
9331
  function handleToolResult(ctx, payload, state) {
@@ -9219,7 +9340,7 @@ function handleToolResult(ctx, payload, state) {
9219
9340
  if (preview.trim()) {
9220
9341
  const lines = preview.split(`
9221
9342
  `).slice(0, 3);
9222
- process.stdout.write(import_picocolors4.default.dim(` \u2514\u2500 ${lines.join(`
9343
+ process.stdout.write(import_picocolors5.default.dim(` \u2514\u2500 ${lines.join(`
9223
9344
  `)}
9224
9345
  `));
9225
9346
  }
@@ -9237,12 +9358,12 @@ async function run(options) {
9237
9358
  directory = process.cwd(),
9238
9359
  timeout = DEFAULT_TIMEOUT_MS
9239
9360
  } = options;
9240
- console.log(import_picocolors5.default.cyan("Starting opencode server..."));
9361
+ console.log(import_picocolors6.default.cyan("Starting opencode server..."));
9241
9362
  const abortController = new AbortController;
9242
9363
  let timeoutId = null;
9243
9364
  if (timeout > 0) {
9244
9365
  timeoutId = setTimeout(() => {
9245
- console.log(import_picocolors5.default.yellow(`
9366
+ console.log(import_picocolors6.default.yellow(`
9246
9367
  Timeout reached. Aborting...`));
9247
9368
  abortController.abort();
9248
9369
  }, timeout);
@@ -9257,7 +9378,7 @@ Timeout reached. Aborting...`));
9257
9378
  server2.close();
9258
9379
  };
9259
9380
  process.on("SIGINT", () => {
9260
- console.log(import_picocolors5.default.yellow(`
9381
+ console.log(import_picocolors6.default.yellow(`
9261
9382
  Interrupted. Shutting down...`));
9262
9383
  cleanup();
9263
9384
  process.exit(130);
@@ -9268,10 +9389,10 @@ Interrupted. Shutting down...`));
9268
9389
  });
9269
9390
  const sessionID = sessionRes.data?.id;
9270
9391
  if (!sessionID) {
9271
- console.error(import_picocolors5.default.red("Failed to create session"));
9392
+ console.error(import_picocolors6.default.red("Failed to create session"));
9272
9393
  return 1;
9273
9394
  }
9274
- console.log(import_picocolors5.default.dim(`Session: ${sessionID}`));
9395
+ console.log(import_picocolors6.default.dim(`Session: ${sessionID}`));
9275
9396
  const ctx = {
9276
9397
  client: client3,
9277
9398
  sessionID,
@@ -9281,7 +9402,7 @@ Interrupted. Shutting down...`));
9281
9402
  const events = await client3.event.subscribe();
9282
9403
  const eventState = createEventState();
9283
9404
  const eventProcessor = processEvents(ctx, events.stream, eventState);
9284
- console.log(import_picocolors5.default.dim(`
9405
+ console.log(import_picocolors6.default.dim(`
9285
9406
  Sending prompt...`));
9286
9407
  await client3.session.promptAsync({
9287
9408
  path: { id: sessionID },
@@ -9291,7 +9412,7 @@ Sending prompt...`));
9291
9412
  },
9292
9413
  query: { directory }
9293
9414
  });
9294
- console.log(import_picocolors5.default.dim(`Waiting for completion...
9415
+ console.log(import_picocolors6.default.dim(`Waiting for completion...
9295
9416
  `));
9296
9417
  while (!abortController.signal.aborted) {
9297
9418
  await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
@@ -9299,16 +9420,16 @@ Sending prompt...`));
9299
9420
  continue;
9300
9421
  }
9301
9422
  if (eventState.mainSessionError) {
9302
- console.error(import_picocolors5.default.red(`
9423
+ console.error(import_picocolors6.default.red(`
9303
9424
 
9304
9425
  Session ended with error: ${eventState.lastError}`));
9305
- console.error(import_picocolors5.default.yellow("Check if todos were completed before the error."));
9426
+ console.error(import_picocolors6.default.yellow("Check if todos were completed before the error."));
9306
9427
  cleanup();
9307
9428
  process.exit(1);
9308
9429
  }
9309
9430
  const shouldExit = await checkCompletionConditions(ctx);
9310
9431
  if (shouldExit) {
9311
- console.log(import_picocolors5.default.green(`
9432
+ console.log(import_picocolors6.default.green(`
9312
9433
 
9313
9434
  All tasks completed.`));
9314
9435
  cleanup();
@@ -9328,7 +9449,7 @@ All tasks completed.`));
9328
9449
  if (err instanceof Error && err.name === "AbortError") {
9329
9450
  return 130;
9330
9451
  }
9331
- console.error(import_picocolors5.default.red(`Error: ${err}`));
9452
+ console.error(import_picocolors6.default.red(`Error: ${err}`));
9332
9453
  return 1;
9333
9454
  }
9334
9455
  }
@@ -9519,54 +9640,54 @@ async function getLatestVersion() {
9519
9640
  }
9520
9641
 
9521
9642
  // src/cli/get-local-version/formatter.ts
9522
- var import_picocolors6 = __toESM(require_picocolors(), 1);
9643
+ var import_picocolors7 = __toESM(require_picocolors(), 1);
9523
9644
  var SYMBOLS2 = {
9524
- check: import_picocolors6.default.green("\u2713"),
9525
- cross: import_picocolors6.default.red("\u2717"),
9526
- arrow: import_picocolors6.default.cyan("\u2192"),
9527
- info: import_picocolors6.default.blue("\u2139"),
9528
- warn: import_picocolors6.default.yellow("\u26A0"),
9529
- pin: import_picocolors6.default.magenta("\uD83D\uDCCC"),
9530
- dev: import_picocolors6.default.cyan("\uD83D\uDD27")
9645
+ check: import_picocolors7.default.green("\u2713"),
9646
+ cross: import_picocolors7.default.red("\u2717"),
9647
+ arrow: import_picocolors7.default.cyan("\u2192"),
9648
+ info: import_picocolors7.default.blue("\u2139"),
9649
+ warn: import_picocolors7.default.yellow("\u26A0"),
9650
+ pin: import_picocolors7.default.magenta("\uD83D\uDCCC"),
9651
+ dev: import_picocolors7.default.cyan("\uD83D\uDD27")
9531
9652
  };
9532
9653
  function formatVersionOutput(info) {
9533
9654
  const packageName = getPackageName();
9534
9655
  const lines = [];
9535
9656
  lines.push("");
9536
- lines.push(import_picocolors6.default.bold(import_picocolors6.default.white(`${packageName} Version Information`)));
9537
- lines.push(import_picocolors6.default.dim("\u2500".repeat(50)));
9657
+ lines.push(import_picocolors7.default.bold(import_picocolors7.default.white(`${packageName} Version Information`)));
9658
+ lines.push(import_picocolors7.default.dim("\u2500".repeat(50)));
9538
9659
  lines.push("");
9539
9660
  if (info.currentVersion) {
9540
- lines.push(` Current Version: ${import_picocolors6.default.cyan(info.currentVersion)}`);
9661
+ lines.push(` Current Version: ${import_picocolors7.default.cyan(info.currentVersion)}`);
9541
9662
  } else {
9542
- lines.push(` Current Version: ${import_picocolors6.default.dim("unknown")}`);
9663
+ lines.push(` Current Version: ${import_picocolors7.default.dim("unknown")}`);
9543
9664
  }
9544
9665
  if (!info.isLocalDev && info.latestVersion) {
9545
- lines.push(` Latest Version: ${import_picocolors6.default.cyan(info.latestVersion)}`);
9666
+ lines.push(` Latest Version: ${import_picocolors7.default.cyan(info.latestVersion)}`);
9546
9667
  }
9547
9668
  lines.push("");
9548
9669
  switch (info.status) {
9549
9670
  case "up-to-date":
9550
- lines.push(` ${SYMBOLS2.check} ${import_picocolors6.default.green("You're up to date!")}`);
9671
+ lines.push(` ${SYMBOLS2.check} ${import_picocolors7.default.green("You're up to date!")}`);
9551
9672
  break;
9552
9673
  case "outdated":
9553
- lines.push(` ${SYMBOLS2.warn} ${import_picocolors6.default.yellow("Update available")}`);
9554
- lines.push(` ${import_picocolors6.default.dim("Run:")} ${import_picocolors6.default.cyan(`cd ~/.config/opencode && bun update ${packageName}`)}`);
9674
+ lines.push(` ${SYMBOLS2.warn} ${import_picocolors7.default.yellow("Update available")}`);
9675
+ lines.push(` ${import_picocolors7.default.dim("Run:")} ${import_picocolors7.default.cyan(`cd ~/.config/opencode && bun update ${packageName}`)}`);
9555
9676
  break;
9556
9677
  case "local-dev":
9557
- lines.push(` ${SYMBOLS2.dev} ${import_picocolors6.default.cyan("Running in local development mode")}`);
9558
- lines.push(` ${import_picocolors6.default.dim("Using file:// protocol from config")}`);
9678
+ lines.push(` ${SYMBOLS2.dev} ${import_picocolors7.default.cyan("Running in local development mode")}`);
9679
+ lines.push(` ${import_picocolors7.default.dim("Using file:// protocol from config")}`);
9559
9680
  break;
9560
9681
  case "pinned":
9561
- lines.push(` ${SYMBOLS2.pin} ${import_picocolors6.default.magenta(`Version pinned to ${info.pinnedVersion}`)}`);
9562
- lines.push(` ${import_picocolors6.default.dim("Update check skipped for pinned versions")}`);
9682
+ lines.push(` ${SYMBOLS2.pin} ${import_picocolors7.default.magenta(`Version pinned to ${info.pinnedVersion}`)}`);
9683
+ lines.push(` ${import_picocolors7.default.dim("Update check skipped for pinned versions")}`);
9563
9684
  break;
9564
9685
  case "error":
9565
- lines.push(` ${SYMBOLS2.cross} ${import_picocolors6.default.red("Unable to check for updates")}`);
9566
- lines.push(` ${import_picocolors6.default.dim("Network error or npm registry unavailable")}`);
9686
+ lines.push(` ${SYMBOLS2.cross} ${import_picocolors7.default.red("Unable to check for updates")}`);
9687
+ lines.push(` ${import_picocolors7.default.dim("Network error or npm registry unavailable")}`);
9567
9688
  break;
9568
9689
  case "unknown":
9569
- lines.push(` ${SYMBOLS2.info} ${import_picocolors6.default.yellow("Version information unavailable")}`);
9690
+ lines.push(` ${SYMBOLS2.info} ${import_picocolors7.default.yellow("Version information unavailable")}`);
9570
9691
  break;
9571
9692
  }
9572
9693
  lines.push("");
@@ -9665,21 +9786,21 @@ async function getLocalVersion(options = {}) {
9665
9786
  }
9666
9787
 
9667
9788
  // src/cli/doctor/constants.ts
9668
- var import_picocolors7 = __toESM(require_picocolors(), 1);
9789
+ var import_picocolors8 = __toESM(require_picocolors(), 1);
9669
9790
  var SYMBOLS3 = {
9670
- check: import_picocolors7.default.green("\u2713"),
9671
- cross: import_picocolors7.default.red("\u2717"),
9672
- warn: import_picocolors7.default.yellow("\u26A0"),
9673
- info: import_picocolors7.default.blue("\u2139"),
9674
- arrow: import_picocolors7.default.cyan("\u2192"),
9675
- bullet: import_picocolors7.default.dim("\u2022"),
9676
- skip: import_picocolors7.default.dim("\u25CB")
9791
+ check: import_picocolors8.default.green("\u2713"),
9792
+ cross: import_picocolors8.default.red("\u2717"),
9793
+ warn: import_picocolors8.default.yellow("\u26A0"),
9794
+ info: import_picocolors8.default.blue("\u2139"),
9795
+ arrow: import_picocolors8.default.cyan("\u2192"),
9796
+ bullet: import_picocolors8.default.dim("\u2022"),
9797
+ skip: import_picocolors8.default.dim("\u25CB")
9677
9798
  };
9678
9799
  var STATUS_COLORS = {
9679
- pass: import_picocolors7.default.green,
9680
- fail: import_picocolors7.default.red,
9681
- warn: import_picocolors7.default.yellow,
9682
- skip: import_picocolors7.default.dim
9800
+ pass: import_picocolors8.default.green,
9801
+ fail: import_picocolors8.default.red,
9802
+ warn: import_picocolors8.default.yellow,
9803
+ skip: import_picocolors8.default.dim
9683
9804
  };
9684
9805
  var CHECK_IDS = {
9685
9806
  OPENCODE_INSTALLATION: "opencode-installation",
@@ -9759,8 +9880,8 @@ async function getOpenCodeVersion2(binary2) {
9759
9880
  return null;
9760
9881
  }
9761
9882
  function compareVersions(current, minimum) {
9762
- const parseVersion = (v) => {
9763
- const cleaned = v.replace(/^v/, "").split("-")[0];
9883
+ const parseVersion = (v2) => {
9884
+ const cleaned = v2.replace(/^v/, "").split("-")[0];
9764
9885
  return cleaned.split(".").map((n) => parseInt(n, 10) || 0);
9765
9886
  };
9766
9887
  const curr = parseVersion(current);
@@ -10584,8 +10705,8 @@ function assertNever(_x) {
10584
10705
  }
10585
10706
  function assert(_3) {}
10586
10707
  function getEnumValues(entries) {
10587
- const numericValues = Object.values(entries).filter((v) => typeof v === "number");
10588
- const values = Object.entries(entries).filter(([k3, _3]) => numericValues.indexOf(+k3) === -1).map(([_3, v]) => v);
10708
+ const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number");
10709
+ const values = Object.entries(entries).filter(([k3, _3]) => numericValues.indexOf(+k3) === -1).map(([_3, v2]) => v2);
10589
10710
  return values;
10590
10711
  }
10591
10712
  function joinValues(array, separator = "|") {
@@ -10646,9 +10767,9 @@ function defineLazy(object, key, getter) {
10646
10767
  }
10647
10768
  return value;
10648
10769
  },
10649
- set(v) {
10770
+ set(v2) {
10650
10771
  Object.defineProperty(object, key, {
10651
- value: v
10772
+ value: v2
10652
10773
  });
10653
10774
  },
10654
10775
  configurable: true
@@ -12254,10 +12375,10 @@ var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
12254
12375
  v7: 7,
12255
12376
  v8: 8
12256
12377
  };
12257
- const v = versionMap[def.version];
12258
- if (v === undefined)
12378
+ const v2 = versionMap[def.version];
12379
+ if (v2 === undefined)
12259
12380
  throw new Error(`Invalid UUID version: "${def.version}"`);
12260
- def.pattern ?? (def.pattern = uuid(v));
12381
+ def.pattern ?? (def.pattern = uuid(v2));
12261
12382
  } else
12262
12383
  def.pattern ?? (def.pattern = uuid());
12263
12384
  $ZodStringFormat.init(inst, def);
@@ -12818,8 +12939,8 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
12818
12939
  const field = shape[key]._zod;
12819
12940
  if (field.values) {
12820
12941
  propValues[key] ?? (propValues[key] = new Set);
12821
- for (const v of field.values)
12822
- propValues[key].add(v);
12942
+ for (const v2 of field.values)
12943
+ propValues[key].add(v2);
12823
12944
  }
12824
12945
  }
12825
12946
  return propValues;
@@ -13008,10 +13129,10 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
13008
13129
  const pv = option._zod.propValues;
13009
13130
  if (!pv || Object.keys(pv).length === 0)
13010
13131
  throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
13011
- for (const [k3, v] of Object.entries(pv)) {
13132
+ for (const [k3, v2] of Object.entries(pv)) {
13012
13133
  if (!propValues[k3])
13013
13134
  propValues[k3] = new Set;
13014
- for (const val of v) {
13135
+ for (const val of v2) {
13015
13136
  propValues[k3].add(val);
13016
13137
  }
13017
13138
  }
@@ -13025,11 +13146,11 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
13025
13146
  const values = o2._zod.propValues?.[def.discriminator];
13026
13147
  if (!values || values.size === 0)
13027
13148
  throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o2)}"`);
13028
- for (const v of values) {
13029
- if (map2.has(v)) {
13030
- throw new Error(`Duplicate discriminator value "${String(v)}"`);
13149
+ for (const v2 of values) {
13150
+ if (map2.has(v2)) {
13151
+ throw new Error(`Duplicate discriminator value "${String(v2)}"`);
13031
13152
  }
13032
- map2.set(v, o2);
13153
+ map2.set(v2, o2);
13033
13154
  }
13034
13155
  }
13035
13156
  return map2;
@@ -13565,8 +13686,8 @@ var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
13565
13686
  var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
13566
13687
  $ZodType.init(inst, def);
13567
13688
  defineLazy(inst._zod, "values", () => {
13568
- const v = def.innerType._zod.values;
13569
- return v ? new Set([...v].filter((x2) => x2 !== undefined)) : undefined;
13689
+ const v2 = def.innerType._zod.values;
13690
+ return v2 ? new Set([...v2].filter((x2) => x2 !== undefined)) : undefined;
13570
13691
  });
13571
13692
  inst._zod.parse = (payload, ctx) => {
13572
13693
  const result = def.innerType._zod.run(payload, ctx);
@@ -20120,7 +20241,7 @@ function _set(Class2, valueType, params) {
20120
20241
  });
20121
20242
  }
20122
20243
  function _enum(Class2, values, params) {
20123
- const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
20244
+ const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
20124
20245
  return new Class2({
20125
20246
  type: "enum",
20126
20247
  entries,
@@ -20279,8 +20400,8 @@ function _stringbool(Classes, _params) {
20279
20400
  let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
20280
20401
  let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
20281
20402
  if (params.case !== "sensitive") {
20282
- truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
20283
- falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
20403
+ truthyArray = truthyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
20404
+ falsyArray = falsyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
20284
20405
  }
20285
20406
  const truthySet = new Set(truthyArray);
20286
20407
  const falsySet = new Set(falsyArray);
@@ -20542,11 +20663,11 @@ class JSONSchemaGenerator {
20542
20663
  }
20543
20664
  const allKeys = new Set(Object.keys(shape));
20544
20665
  const requiredKeys = new Set([...allKeys].filter((key) => {
20545
- const v = def.shape[key]._zod;
20666
+ const v2 = def.shape[key]._zod;
20546
20667
  if (this.io === "input") {
20547
- return v.optin === undefined;
20668
+ return v2.optin === undefined;
20548
20669
  } else {
20549
- return v.optout === undefined;
20670
+ return v2.optout === undefined;
20550
20671
  }
20551
20672
  }));
20552
20673
  if (requiredKeys.size > 0) {
@@ -20664,9 +20785,9 @@ class JSONSchemaGenerator {
20664
20785
  case "enum": {
20665
20786
  const json2 = _json;
20666
20787
  const values = getEnumValues(def.entries);
20667
- if (values.every((v) => typeof v === "number"))
20788
+ if (values.every((v2) => typeof v2 === "number"))
20668
20789
  json2.type = "number";
20669
- if (values.every((v) => typeof v === "string"))
20790
+ if (values.every((v2) => typeof v2 === "string"))
20670
20791
  json2.type = "string";
20671
20792
  json2.enum = values;
20672
20793
  break;
@@ -20698,13 +20819,13 @@ class JSONSchemaGenerator {
20698
20819
  json2.const = val;
20699
20820
  }
20700
20821
  } else {
20701
- if (vals.every((v) => typeof v === "number"))
20822
+ if (vals.every((v2) => typeof v2 === "number"))
20702
20823
  json2.type = "number";
20703
- if (vals.every((v) => typeof v === "string"))
20824
+ if (vals.every((v2) => typeof v2 === "string"))
20704
20825
  json2.type = "string";
20705
- if (vals.every((v) => typeof v === "boolean"))
20826
+ if (vals.every((v2) => typeof v2 === "boolean"))
20706
20827
  json2.type = "string";
20707
- if (vals.every((v) => v === null))
20828
+ if (vals.every((v2) => v2 === null))
20708
20829
  json2.type = "null";
20709
20830
  json2.enum = vals;
20710
20831
  }
@@ -21905,7 +22026,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
21905
22026
  };
21906
22027
  });
21907
22028
  function _enum2(values, params) {
21908
- const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
22029
+ const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
21909
22030
  return new ZodEnum({
21910
22031
  type: "enum",
21911
22032
  entries,
@@ -23277,8 +23398,8 @@ function getMcpCheckDefinitions() {
23277
23398
 
23278
23399
  // src/cli/doctor/checks/version.ts
23279
23400
  function compareVersions2(current, latest) {
23280
- const parseVersion = (v) => {
23281
- const cleaned = v.replace(/^v/, "").split("-")[0];
23401
+ const parseVersion = (v2) => {
23402
+ const cleaned = v2.replace(/^v/, "").split("-")[0];
23282
23403
  return cleaned.split(".").map((n) => parseInt(n, 10) || 0);
23283
23404
  };
23284
23405
  const curr = parseVersion(current);
@@ -23402,7 +23523,7 @@ function getAllCheckDefinitions() {
23402
23523
  }
23403
23524
 
23404
23525
  // src/cli/doctor/formatter.ts
23405
- var import_picocolors8 = __toESM(require_picocolors(), 1);
23526
+ var import_picocolors9 = __toESM(require_picocolors(), 1);
23406
23527
  function formatStatusSymbol(status) {
23407
23528
  switch (status) {
23408
23529
  case "pass":
@@ -23419,13 +23540,13 @@ function formatCheckResult(result, verbose) {
23419
23540
  const symbol2 = formatStatusSymbol(result.status);
23420
23541
  const colorFn = STATUS_COLORS[result.status];
23421
23542
  const name = colorFn(result.name);
23422
- const message = import_picocolors8.default.dim(result.message);
23543
+ const message = import_picocolors9.default.dim(result.message);
23423
23544
  let line = ` ${symbol2} ${name}`;
23424
23545
  if (result.message) {
23425
23546
  line += ` ${SYMBOLS3.arrow} ${message}`;
23426
23547
  }
23427
23548
  if (verbose && result.details && result.details.length > 0) {
23428
- const detailLines = result.details.map((d3) => ` ${SYMBOLS3.bullet} ${import_picocolors8.default.dim(d3)}`).join(`
23549
+ const detailLines = result.details.map((d3) => ` ${SYMBOLS3.bullet} ${import_picocolors9.default.dim(d3)}`).join(`
23429
23550
  `);
23430
23551
  line += `
23431
23552
  ` + detailLines;
@@ -23435,44 +23556,44 @@ function formatCheckResult(result, verbose) {
23435
23556
  function formatCategoryHeader(category) {
23436
23557
  const name = CATEGORY_NAMES[category] || category;
23437
23558
  return `
23438
- ${import_picocolors8.default.bold(import_picocolors8.default.white(name))}
23439
- ${import_picocolors8.default.dim("\u2500".repeat(40))}`;
23559
+ ${import_picocolors9.default.bold(import_picocolors9.default.white(name))}
23560
+ ${import_picocolors9.default.dim("\u2500".repeat(40))}`;
23440
23561
  }
23441
23562
  function formatSummary(summary) {
23442
23563
  const lines = [];
23443
- lines.push(import_picocolors8.default.bold(import_picocolors8.default.white("Summary")));
23444
- lines.push(import_picocolors8.default.dim("\u2500".repeat(40)));
23564
+ lines.push(import_picocolors9.default.bold(import_picocolors9.default.white("Summary")));
23565
+ lines.push(import_picocolors9.default.dim("\u2500".repeat(40)));
23445
23566
  lines.push("");
23446
- const passText = summary.passed > 0 ? import_picocolors8.default.green(`${summary.passed} passed`) : import_picocolors8.default.dim("0 passed");
23447
- const failText = summary.failed > 0 ? import_picocolors8.default.red(`${summary.failed} failed`) : import_picocolors8.default.dim("0 failed");
23448
- const warnText = summary.warnings > 0 ? import_picocolors8.default.yellow(`${summary.warnings} warnings`) : import_picocolors8.default.dim("0 warnings");
23449
- const skipText = summary.skipped > 0 ? import_picocolors8.default.dim(`${summary.skipped} skipped`) : "";
23567
+ const passText = summary.passed > 0 ? import_picocolors9.default.green(`${summary.passed} passed`) : import_picocolors9.default.dim("0 passed");
23568
+ const failText = summary.failed > 0 ? import_picocolors9.default.red(`${summary.failed} failed`) : import_picocolors9.default.dim("0 failed");
23569
+ const warnText = summary.warnings > 0 ? import_picocolors9.default.yellow(`${summary.warnings} warnings`) : import_picocolors9.default.dim("0 warnings");
23570
+ const skipText = summary.skipped > 0 ? import_picocolors9.default.dim(`${summary.skipped} skipped`) : "";
23450
23571
  const parts = [passText, failText, warnText];
23451
23572
  if (skipText)
23452
23573
  parts.push(skipText);
23453
23574
  lines.push(` ${parts.join(", ")}`);
23454
- lines.push(` ${import_picocolors8.default.dim(`Total: ${summary.total} checks in ${summary.duration}ms`)}`);
23575
+ lines.push(` ${import_picocolors9.default.dim(`Total: ${summary.total} checks in ${summary.duration}ms`)}`);
23455
23576
  return lines.join(`
23456
23577
  `);
23457
23578
  }
23458
23579
  function formatHeader() {
23459
23580
  return `
23460
- ${import_picocolors8.default.bgMagenta(import_picocolors8.default.white(" oMoMoMoMo... Doctor "))}
23581
+ ${import_picocolors9.default.bgMagenta(import_picocolors9.default.white(" oMoMoMoMo... Doctor "))}
23461
23582
  `;
23462
23583
  }
23463
23584
  function formatFooter(summary) {
23464
23585
  if (summary.failed > 0) {
23465
23586
  return `
23466
- ${SYMBOLS3.cross} ${import_picocolors8.default.red("Issues detected. Please review the errors above.")}
23587
+ ${SYMBOLS3.cross} ${import_picocolors9.default.red("Issues detected. Please review the errors above.")}
23467
23588
  `;
23468
23589
  }
23469
23590
  if (summary.warnings > 0) {
23470
23591
  return `
23471
- ${SYMBOLS3.warn} ${import_picocolors8.default.yellow("All systems operational with warnings.")}
23592
+ ${SYMBOLS3.warn} ${import_picocolors9.default.yellow("All systems operational with warnings.")}
23472
23593
  `;
23473
23594
  }
23474
23595
  return `
23475
- ${SYMBOLS3.check} ${import_picocolors8.default.green("All systems operational!")}
23596
+ ${SYMBOLS3.check} ${import_picocolors9.default.green("All systems operational!")}
23476
23597
  `;
23477
23598
  }
23478
23599
  function formatJsonOutput2(result) {
@@ -23584,22 +23705,33 @@ var packageJson = await Promise.resolve().then(() => __toESM(require_package(),
23584
23705
  var VERSION = packageJson.version;
23585
23706
  var program2 = new Command;
23586
23707
  program2.name("oh-my-opencode").description("The ultimate OpenCode plugin - multi-model orchestration, LSP tools, and more").version(VERSION, "-v, --version", "Show version number");
23587
- 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", `
23708
+ 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("--memory <value>", "Memory provider: no, mem0-cloud, mem0-local, letta (default: no)").option("--memory-endpoint <url>", "Memory endpoint for self-hosted providers").option("--skip-auth", "Skip authentication setup hints").addHelpText("after", `
23588
23709
  Examples:
23589
23710
  $ bunx oh-my-opencode install
23590
23711
  $ bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes
23591
23712
  $ bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no
23713
+ $ bunx oh-my-opencode install --no-tui --claude=yes --chatgpt=yes --gemini=yes --memory=mem0-cloud
23714
+ $ bunx oh-my-opencode install --no-tui --claude=yes --chatgpt=no --gemini=no --memory=mem0-local --memory-endpoint=http://localhost:8000/v1
23715
+ $ bunx oh-my-opencode install --no-tui --claude=yes --chatgpt=yes --gemini=yes --memory=letta --memory-endpoint=http://localhost:8283
23592
23716
 
23593
23717
  Model Providers:
23594
23718
  Claude Required for Sisyphus (main orchestrator) and Librarian agents
23595
23719
  ChatGPT Powers the Oracle agent for debugging and architecture
23596
23720
  Gemini Powers frontend, documentation, and multimodal agents
23721
+
23722
+ Memory Providers:
23723
+ mem0-cloud Mem0 Cloud (mem0.ai) - requires MEM0_API_KEY env var
23724
+ mem0-local Self-hosted Mem0 - requires --memory-endpoint (default: http://localhost:8000/v1)
23725
+ letta Self-hosted Letta server - requires --memory-endpoint (default: http://localhost:8283)
23726
+ See: https://docs.letta.com/guides/selfhosting/
23597
23727
  `).action(async (options) => {
23598
23728
  const args = {
23599
23729
  tui: options.tui !== false,
23600
23730
  claude: options.claude,
23601
23731
  chatgpt: options.chatgpt,
23602
23732
  gemini: options.gemini,
23733
+ memory: options.memory,
23734
+ memoryEndpoint: options.memoryEndpoint,
23603
23735
  skipAuth: options.skipAuth ?? false
23604
23736
  };
23605
23737
  const exitCode = await install(args);