oh-my-opencode-kikokikok 2.14.1 → 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 +366 -242
- package/dist/cli/types.d.ts +7 -0
- package/package.json +1 -1
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.
|
|
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
|
|
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
|
|
2795
|
+
return import_picocolors2.default.cyan(le);
|
|
2777
2796
|
case "cancel":
|
|
2778
|
-
return
|
|
2797
|
+
return import_picocolors2.default.red(L2);
|
|
2779
2798
|
case "error":
|
|
2780
|
-
return
|
|
2799
|
+
return import_picocolors2.default.yellow(W2);
|
|
2781
2800
|
case "submit":
|
|
2782
|
-
return
|
|
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,
|
|
2791
|
-
const j2 =
|
|
2792
|
-
return j2 || E ?
|
|
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 `${
|
|
2840
|
+
return `${import_picocolors2.default.dim(s)}`;
|
|
2801
2841
|
case "active":
|
|
2802
|
-
return `${
|
|
2842
|
+
return `${import_picocolors2.default.green(k2)} ${s} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}`;
|
|
2803
2843
|
case "cancelled":
|
|
2804
|
-
return `${
|
|
2844
|
+
return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}`;
|
|
2805
2845
|
default:
|
|
2806
|
-
return `${
|
|
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 = `${
|
|
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}${
|
|
2855
|
+
return `${r2}${import_picocolors2.default.gray(o)} ${n(this.options[this.cursor], "selected")}`;
|
|
2816
2856
|
case "cancel":
|
|
2817
|
-
return `${r2}${
|
|
2818
|
-
${
|
|
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}${
|
|
2821
|
-
${
|
|
2822
|
-
${
|
|
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) => `${
|
|
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(`${
|
|
2837
|
-
${
|
|
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
|
-
${
|
|
2879
|
+
${import_picocolors2.default.gray(de + _2.repeat(s + 2) + pe)}
|
|
2840
2880
|
`);
|
|
2841
2881
|
};
|
|
2842
2882
|
var xe = (t = "") => {
|
|
2843
|
-
process.stdout.write(`${
|
|
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(`${
|
|
2888
|
+
process.stdout.write(`${import_picocolors2.default.gray(ue)} ${t}
|
|
2849
2889
|
`);
|
|
2850
2890
|
};
|
|
2851
2891
|
var Se = (t = "") => {
|
|
2852
|
-
process.stdout.write(`${
|
|
2853
|
-
${
|
|
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 =
|
|
2858
|
-
const r2 = [`${
|
|
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) => `${
|
|
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:
|
|
2908
|
+
M2.message(t, { symbol: import_picocolors2.default.blue(q) });
|
|
2869
2909
|
}, success: (t) => {
|
|
2870
|
-
M2.message(t, { symbol:
|
|
2910
|
+
M2.message(t, { symbol: import_picocolors2.default.green(D) });
|
|
2871
2911
|
}, step: (t) => {
|
|
2872
|
-
M2.message(t, { symbol:
|
|
2912
|
+
M2.message(t, { symbol: import_picocolors2.default.green(C) });
|
|
2873
2913
|
}, warn: (t) => {
|
|
2874
|
-
M2.message(t, { symbol:
|
|
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:
|
|
2918
|
+
M2.message(t, { symbol: import_picocolors2.default.red(K2) });
|
|
2879
2919
|
} };
|
|
2880
|
-
var J2 = `${
|
|
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
|
-
},
|
|
2888
|
-
process.on("uncaughtExceptionMonitor",
|
|
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",
|
|
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(`${
|
|
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 =
|
|
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 ?
|
|
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
|
|
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";
|
|
@@ -6792,6 +6832,23 @@ function generateOmoConfig(installConfig) {
|
|
|
6792
6832
|
if (installConfig.hasGemini) {
|
|
6793
6833
|
config.google_auth = false;
|
|
6794
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
|
+
}
|
|
6795
6852
|
const agents = {};
|
|
6796
6853
|
if (!installConfig.hasClaude) {
|
|
6797
6854
|
agents["Sisyphus"] = { model: "opencode/big-pickle" };
|
|
@@ -7106,7 +7163,8 @@ function detectCurrentConfig() {
|
|
|
7106
7163
|
hasClaude: true,
|
|
7107
7164
|
isMax20: true,
|
|
7108
7165
|
hasChatGPT: true,
|
|
7109
|
-
hasGemini: false
|
|
7166
|
+
hasGemini: false,
|
|
7167
|
+
memoryProvider: "no"
|
|
7110
7168
|
};
|
|
7111
7169
|
const { format: format2, path: path2 } = detectConfigFormat();
|
|
7112
7170
|
if (format2 === "none") {
|
|
@@ -7158,89 +7216,98 @@ function detectCurrentConfig() {
|
|
|
7158
7216
|
if (omoConfig.google_auth === false) {
|
|
7159
7217
|
result.hasGemini = plugins.some((p2) => p2.startsWith("opencode-antigravity-auth"));
|
|
7160
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
|
+
}
|
|
7161
7226
|
} catch {}
|
|
7162
7227
|
return result;
|
|
7163
7228
|
}
|
|
7164
7229
|
|
|
7165
7230
|
// src/cli/install.ts
|
|
7166
7231
|
var SYMBOLS = {
|
|
7167
|
-
check:
|
|
7168
|
-
cross:
|
|
7169
|
-
arrow:
|
|
7170
|
-
bullet:
|
|
7171
|
-
info:
|
|
7172
|
-
warn:
|
|
7173
|
-
star:
|
|
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")
|
|
7174
7239
|
};
|
|
7175
7240
|
function formatProvider(name, enabled, detail) {
|
|
7176
|
-
const status = enabled ? SYMBOLS.check :
|
|
7177
|
-
const label = enabled ?
|
|
7178
|
-
const suffix = 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})`) : "";
|
|
7179
7244
|
return ` ${status} ${label}${suffix}`;
|
|
7180
7245
|
}
|
|
7181
7246
|
function formatConfigSummary(config) {
|
|
7182
7247
|
const lines = [];
|
|
7183
|
-
lines.push(
|
|
7248
|
+
lines.push(import_picocolors3.default.bold(import_picocolors3.default.white("Configuration Summary")));
|
|
7184
7249
|
lines.push("");
|
|
7185
7250
|
const claudeDetail = config.hasClaude ? config.isMax20 ? "max20" : "standard" : undefined;
|
|
7186
7251
|
lines.push(formatProvider("Claude", config.hasClaude, claudeDetail));
|
|
7187
7252
|
lines.push(formatProvider("ChatGPT", config.hasChatGPT));
|
|
7188
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"));
|
|
7189
7256
|
lines.push("");
|
|
7190
|
-
lines.push(
|
|
7257
|
+
lines.push(import_picocolors3.default.dim("\u2500".repeat(40)));
|
|
7191
7258
|
lines.push("");
|
|
7192
|
-
lines.push(
|
|
7259
|
+
lines.push(import_picocolors3.default.bold(import_picocolors3.default.white("Agent Configuration")));
|
|
7193
7260
|
lines.push("");
|
|
7194
7261
|
const sisyphusModel = config.hasClaude ? "claude-opus-4-5" : "big-pickle";
|
|
7195
7262
|
const oracleModel = config.hasChatGPT ? "gpt-5.2" : config.hasClaude ? "claude-opus-4-5" : "big-pickle";
|
|
7196
7263
|
const librarianModel = config.hasClaude && config.isMax20 ? "claude-sonnet-4-5" : "big-pickle";
|
|
7197
7264
|
const frontendModel = config.hasGemini ? "gemini-3-pro-high" : config.hasClaude ? "claude-opus-4-5" : "big-pickle";
|
|
7198
|
-
lines.push(` ${SYMBOLS.bullet} Sisyphus ${SYMBOLS.arrow} ${
|
|
7199
|
-
lines.push(` ${SYMBOLS.bullet} Oracle ${SYMBOLS.arrow} ${
|
|
7200
|
-
lines.push(` ${SYMBOLS.bullet} Librarian ${SYMBOLS.arrow} ${
|
|
7201
|
-
lines.push(` ${SYMBOLS.bullet} Frontend ${SYMBOLS.arrow} ${
|
|
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)}`);
|
|
7202
7269
|
return lines.join(`
|
|
7203
7270
|
`);
|
|
7204
7271
|
}
|
|
7205
7272
|
function printHeader(isUpdate) {
|
|
7206
7273
|
const mode = isUpdate ? "Update" : "Install";
|
|
7207
7274
|
console.log();
|
|
7208
|
-
console.log(
|
|
7275
|
+
console.log(import_picocolors3.default.bgMagenta(import_picocolors3.default.white(` oMoMoMoMo... ${mode} `)));
|
|
7209
7276
|
console.log();
|
|
7210
7277
|
}
|
|
7211
7278
|
function printStep(step, total, message) {
|
|
7212
|
-
const progress =
|
|
7279
|
+
const progress = import_picocolors3.default.dim(`[${step}/${total}]`);
|
|
7213
7280
|
console.log(`${progress} ${message}`);
|
|
7214
7281
|
}
|
|
7215
7282
|
function printSuccess(message) {
|
|
7216
7283
|
console.log(`${SYMBOLS.check} ${message}`);
|
|
7217
7284
|
}
|
|
7218
7285
|
function printError(message) {
|
|
7219
|
-
console.log(`${SYMBOLS.cross} ${
|
|
7286
|
+
console.log(`${SYMBOLS.cross} ${import_picocolors3.default.red(message)}`);
|
|
7220
7287
|
}
|
|
7221
7288
|
function printInfo(message) {
|
|
7222
7289
|
console.log(`${SYMBOLS.info} ${message}`);
|
|
7223
7290
|
}
|
|
7224
7291
|
function printWarning(message) {
|
|
7225
|
-
console.log(`${SYMBOLS.warn} ${
|
|
7292
|
+
console.log(`${SYMBOLS.warn} ${import_picocolors3.default.yellow(message)}`);
|
|
7226
7293
|
}
|
|
7227
7294
|
function printBox(content, title) {
|
|
7228
7295
|
const lines = content.split(`
|
|
7229
7296
|
`);
|
|
7230
7297
|
const maxWidth = Math.max(...lines.map((l2) => l2.replace(/\x1b\[[0-9;]*m/g, "").length), title?.length ?? 0) + 4;
|
|
7231
|
-
const border =
|
|
7298
|
+
const border = import_picocolors3.default.dim("\u2500".repeat(maxWidth));
|
|
7232
7299
|
console.log();
|
|
7233
7300
|
if (title) {
|
|
7234
|
-
console.log(
|
|
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"));
|
|
7235
7302
|
} else {
|
|
7236
|
-
console.log(
|
|
7303
|
+
console.log(import_picocolors3.default.dim("\u250C") + border + import_picocolors3.default.dim("\u2510"));
|
|
7237
7304
|
}
|
|
7238
7305
|
for (const line of lines) {
|
|
7239
7306
|
const stripped = line.replace(/\x1b\[[0-9;]*m/g, "");
|
|
7240
7307
|
const padding = maxWidth - stripped.length;
|
|
7241
|
-
console.log(
|
|
7308
|
+
console.log(import_picocolors3.default.dim("\u2502") + ` ${line}${" ".repeat(padding - 1)}` + import_picocolors3.default.dim("\u2502"));
|
|
7242
7309
|
}
|
|
7243
|
-
console.log(
|
|
7310
|
+
console.log(import_picocolors3.default.dim("\u2514") + border + import_picocolors3.default.dim("\u2518"));
|
|
7244
7311
|
console.log();
|
|
7245
7312
|
}
|
|
7246
7313
|
function validateNonTuiArgs(args) {
|
|
@@ -7260,6 +7327,9 @@ function validateNonTuiArgs(args) {
|
|
|
7260
7327
|
} else if (!["no", "yes"].includes(args.gemini)) {
|
|
7261
7328
|
errors.push(`Invalid --gemini value: ${args.gemini} (expected: no, yes)`);
|
|
7262
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
|
+
}
|
|
7263
7333
|
return { valid: errors.length === 0, errors };
|
|
7264
7334
|
}
|
|
7265
7335
|
function argsToConfig(args) {
|
|
@@ -7267,7 +7337,9 @@ function argsToConfig(args) {
|
|
|
7267
7337
|
hasClaude: args.claude !== "no",
|
|
7268
7338
|
isMax20: args.claude === "max20",
|
|
7269
7339
|
hasChatGPT: args.chatgpt === "yes",
|
|
7270
|
-
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
|
|
7271
7343
|
};
|
|
7272
7344
|
}
|
|
7273
7345
|
function detectedToInitialValues(detected) {
|
|
@@ -7278,7 +7350,8 @@ function detectedToInitialValues(detected) {
|
|
|
7278
7350
|
return {
|
|
7279
7351
|
claude,
|
|
7280
7352
|
chatgpt: detected.hasChatGPT ? "yes" : "no",
|
|
7281
|
-
gemini: detected.hasGemini ? "yes" : "no"
|
|
7353
|
+
gemini: detected.hasGemini ? "yes" : "no",
|
|
7354
|
+
memory: detected.memoryProvider
|
|
7282
7355
|
};
|
|
7283
7356
|
}
|
|
7284
7357
|
async function runTuiMode(detected) {
|
|
@@ -7320,11 +7393,51 @@ async function runTuiMode(detected) {
|
|
|
7320
7393
|
xe("Installation cancelled.");
|
|
7321
7394
|
return null;
|
|
7322
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
|
+
}
|
|
7323
7434
|
return {
|
|
7324
7435
|
hasClaude: claude !== "no",
|
|
7325
7436
|
isMax20: claude === "max20",
|
|
7326
7437
|
hasChatGPT: chatgpt === "yes",
|
|
7327
|
-
hasGemini: gemini === "yes"
|
|
7438
|
+
hasGemini: gemini === "yes",
|
|
7439
|
+
memoryProvider: memory,
|
|
7440
|
+
memoryEndpoint
|
|
7328
7441
|
};
|
|
7329
7442
|
}
|
|
7330
7443
|
async function runNonTuiInstall(args) {
|
|
@@ -7365,7 +7478,7 @@ async function runNonTuiInstall(args) {
|
|
|
7365
7478
|
printError(`Failed: ${pluginResult.error}`);
|
|
7366
7479
|
return 1;
|
|
7367
7480
|
}
|
|
7368
|
-
printSuccess(`Plugin ${isUpdate ? "verified" : "added"} ${SYMBOLS.arrow} ${
|
|
7481
|
+
printSuccess(`Plugin ${isUpdate ? "verified" : "added"} ${SYMBOLS.arrow} ${import_picocolors3.default.dim(pluginResult.configPath)}`);
|
|
7369
7482
|
if (config.hasGemini || config.hasChatGPT) {
|
|
7370
7483
|
printStep(step++, totalSteps, "Adding auth plugins...");
|
|
7371
7484
|
const authResult = await addAuthPlugins(config);
|
|
@@ -7373,14 +7486,14 @@ async function runNonTuiInstall(args) {
|
|
|
7373
7486
|
printError(`Failed: ${authResult.error}`);
|
|
7374
7487
|
return 1;
|
|
7375
7488
|
}
|
|
7376
|
-
printSuccess(`Auth plugins configured ${SYMBOLS.arrow} ${
|
|
7489
|
+
printSuccess(`Auth plugins configured ${SYMBOLS.arrow} ${import_picocolors3.default.dim(authResult.configPath)}`);
|
|
7377
7490
|
printStep(step++, totalSteps, "Adding provider configurations...");
|
|
7378
7491
|
const providerResult = addProviderConfig(config);
|
|
7379
7492
|
if (!providerResult.success) {
|
|
7380
7493
|
printError(`Failed: ${providerResult.error}`);
|
|
7381
7494
|
return 1;
|
|
7382
7495
|
}
|
|
7383
|
-
printSuccess(`Providers configured ${SYMBOLS.arrow} ${
|
|
7496
|
+
printSuccess(`Providers configured ${SYMBOLS.arrow} ${import_picocolors3.default.dim(providerResult.configPath)}`);
|
|
7384
7497
|
} else {
|
|
7385
7498
|
step += 2;
|
|
7386
7499
|
}
|
|
@@ -7391,7 +7504,7 @@ async function runNonTuiInstall(args) {
|
|
|
7391
7504
|
printError(`Failed: ${hotfixResult.error}`);
|
|
7392
7505
|
return 1;
|
|
7393
7506
|
}
|
|
7394
|
-
printSuccess(`Hotfix configured ${SYMBOLS.arrow} ${
|
|
7507
|
+
printSuccess(`Hotfix configured ${SYMBOLS.arrow} ${import_picocolors3.default.dim(hotfixResult.configPath)}`);
|
|
7395
7508
|
printInfo("Installing dependencies with bun...");
|
|
7396
7509
|
const bunSuccess = await runBunInstall();
|
|
7397
7510
|
if (bunSuccess) {
|
|
@@ -7408,35 +7521,35 @@ async function runNonTuiInstall(args) {
|
|
|
7408
7521
|
printError(`Failed: ${omoResult.error}`);
|
|
7409
7522
|
return 1;
|
|
7410
7523
|
}
|
|
7411
|
-
printSuccess(`Config written ${SYMBOLS.arrow} ${
|
|
7524
|
+
printSuccess(`Config written ${SYMBOLS.arrow} ${import_picocolors3.default.dim(omoResult.configPath)}`);
|
|
7412
7525
|
printBox(formatConfigSummary(config), isUpdate ? "Updated Configuration" : "Installation Complete");
|
|
7413
7526
|
if (!config.hasClaude && !config.hasChatGPT && !config.hasGemini) {
|
|
7414
7527
|
printWarning("No model providers configured. Using opencode/big-pickle as fallback.");
|
|
7415
7528
|
}
|
|
7416
7529
|
if ((config.hasClaude || config.hasChatGPT || config.hasGemini) && !args.skipAuth) {
|
|
7417
|
-
console.log(
|
|
7530
|
+
console.log(import_picocolors3.default.bold("Next Steps - Authenticate your providers:"));
|
|
7418
7531
|
console.log();
|
|
7419
7532
|
if (config.hasClaude) {
|
|
7420
|
-
console.log(` ${SYMBOLS.arrow} ${
|
|
7533
|
+
console.log(` ${SYMBOLS.arrow} ${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select Anthropic \u2192 Claude Pro/Max)")}`);
|
|
7421
7534
|
}
|
|
7422
7535
|
if (config.hasChatGPT) {
|
|
7423
|
-
console.log(` ${SYMBOLS.arrow} ${
|
|
7536
|
+
console.log(` ${SYMBOLS.arrow} ${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select OpenAI \u2192 ChatGPT Plus/Pro)")}`);
|
|
7424
7537
|
}
|
|
7425
7538
|
if (config.hasGemini) {
|
|
7426
|
-
console.log(` ${SYMBOLS.arrow} ${
|
|
7539
|
+
console.log(` ${SYMBOLS.arrow} ${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select Google \u2192 OAuth with Antigravity)")}`);
|
|
7427
7540
|
}
|
|
7428
7541
|
console.log();
|
|
7429
7542
|
}
|
|
7430
|
-
console.log(`${SYMBOLS.star} ${
|
|
7431
|
-
console.log(` Run ${
|
|
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!`);
|
|
7432
7545
|
console.log();
|
|
7433
|
-
printBox(`${
|
|
7546
|
+
printBox(`${import_picocolors3.default.bold("Pro Tip:")} Include ${import_picocolors3.default.cyan("ultrawork")} (or ${import_picocolors3.default.cyan("ulw")}) in your prompt.
|
|
7434
7547
|
` + `All features work like magic\u2014parallel agents, background tasks,
|
|
7435
7548
|
` + `deep exploration, and relentless execution until completion.`, "\uD83E\uDE84 The Magic Word");
|
|
7436
|
-
console.log(`${SYMBOLS.star} ${
|
|
7437
|
-
console.log(` ${
|
|
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")}`);
|
|
7438
7551
|
console.log();
|
|
7439
|
-
console.log(
|
|
7552
|
+
console.log(import_picocolors3.default.dim("oMoMoMoMo... Enjoy!"));
|
|
7440
7553
|
console.log();
|
|
7441
7554
|
return 0;
|
|
7442
7555
|
}
|
|
@@ -7446,7 +7559,7 @@ async function install(args) {
|
|
|
7446
7559
|
}
|
|
7447
7560
|
const detected = detectCurrentConfig();
|
|
7448
7561
|
const isUpdate = detected.isInstalled;
|
|
7449
|
-
Ie(
|
|
7562
|
+
Ie(import_picocolors3.default.bgMagenta(import_picocolors3.default.white(isUpdate ? " oMoMoMoMo... Update " : " oMoMoMoMo... ")));
|
|
7450
7563
|
if (isUpdate) {
|
|
7451
7564
|
const initial = detectedToInitialValues(detected);
|
|
7452
7565
|
M2.info(`Existing configuration detected: Claude=${initial.claude}, ChatGPT=${initial.chatgpt}, Gemini=${initial.gemini}`);
|
|
@@ -7458,11 +7571,11 @@ async function install(args) {
|
|
|
7458
7571
|
s.stop("OpenCode is not installed");
|
|
7459
7572
|
M2.error("OpenCode is not installed on this system.");
|
|
7460
7573
|
Me("Visit https://opencode.ai/docs for installation instructions", "Installation Guide");
|
|
7461
|
-
Se(
|
|
7574
|
+
Se(import_picocolors3.default.red("Please install OpenCode first."));
|
|
7462
7575
|
return 1;
|
|
7463
7576
|
}
|
|
7464
7577
|
const version = await getOpenCodeVersion();
|
|
7465
|
-
s.stop(`OpenCode ${version ?? "installed"} ${
|
|
7578
|
+
s.stop(`OpenCode ${version ?? "installed"} ${import_picocolors3.default.green("\u2713")}`);
|
|
7466
7579
|
const config = await runTuiMode(detected);
|
|
7467
7580
|
if (!config)
|
|
7468
7581
|
return 1;
|
|
@@ -7470,53 +7583,53 @@ async function install(args) {
|
|
|
7470
7583
|
const pluginResult = addPluginToOpenCodeConfig();
|
|
7471
7584
|
if (!pluginResult.success) {
|
|
7472
7585
|
s.stop(`Failed to add plugin: ${pluginResult.error}`);
|
|
7473
|
-
Se(
|
|
7586
|
+
Se(import_picocolors3.default.red("Installation failed."));
|
|
7474
7587
|
return 1;
|
|
7475
7588
|
}
|
|
7476
|
-
s.stop(`Plugin added to ${
|
|
7589
|
+
s.stop(`Plugin added to ${import_picocolors3.default.cyan(pluginResult.configPath)}`);
|
|
7477
7590
|
if (config.hasGemini || config.hasChatGPT) {
|
|
7478
7591
|
s.start("Adding auth plugins (fetching latest versions)");
|
|
7479
7592
|
const authResult = await addAuthPlugins(config);
|
|
7480
7593
|
if (!authResult.success) {
|
|
7481
7594
|
s.stop(`Failed to add auth plugins: ${authResult.error}`);
|
|
7482
|
-
Se(
|
|
7595
|
+
Se(import_picocolors3.default.red("Installation failed."));
|
|
7483
7596
|
return 1;
|
|
7484
7597
|
}
|
|
7485
|
-
s.stop(`Auth plugins added to ${
|
|
7598
|
+
s.stop(`Auth plugins added to ${import_picocolors3.default.cyan(authResult.configPath)}`);
|
|
7486
7599
|
s.start("Adding provider configurations");
|
|
7487
7600
|
const providerResult = addProviderConfig(config);
|
|
7488
7601
|
if (!providerResult.success) {
|
|
7489
7602
|
s.stop(`Failed to add provider config: ${providerResult.error}`);
|
|
7490
|
-
Se(
|
|
7603
|
+
Se(import_picocolors3.default.red("Installation failed."));
|
|
7491
7604
|
return 1;
|
|
7492
7605
|
}
|
|
7493
|
-
s.stop(`Provider config added to ${
|
|
7606
|
+
s.stop(`Provider config added to ${import_picocolors3.default.cyan(providerResult.configPath)}`);
|
|
7494
7607
|
}
|
|
7495
7608
|
if (config.hasChatGPT) {
|
|
7496
7609
|
s.start("Setting up ChatGPT hotfix");
|
|
7497
7610
|
const hotfixResult = setupChatGPTHotfix();
|
|
7498
7611
|
if (!hotfixResult.success) {
|
|
7499
7612
|
s.stop(`Failed to setup hotfix: ${hotfixResult.error}`);
|
|
7500
|
-
Se(
|
|
7613
|
+
Se(import_picocolors3.default.red("Installation failed."));
|
|
7501
7614
|
return 1;
|
|
7502
7615
|
}
|
|
7503
|
-
s.stop(`Hotfix configured in ${
|
|
7616
|
+
s.stop(`Hotfix configured in ${import_picocolors3.default.cyan(hotfixResult.configPath)}`);
|
|
7504
7617
|
s.start("Installing dependencies with bun");
|
|
7505
7618
|
const bunSuccess = await runBunInstall();
|
|
7506
7619
|
if (bunSuccess) {
|
|
7507
7620
|
s.stop("Dependencies installed");
|
|
7508
7621
|
} else {
|
|
7509
|
-
s.stop(
|
|
7622
|
+
s.stop(import_picocolors3.default.yellow("bun install failed - run manually: cd ~/.config/opencode && bun i"));
|
|
7510
7623
|
}
|
|
7511
7624
|
}
|
|
7512
7625
|
s.start("Writing oh-my-opencode configuration");
|
|
7513
7626
|
const omoResult = writeOmoConfig(config);
|
|
7514
7627
|
if (!omoResult.success) {
|
|
7515
7628
|
s.stop(`Failed to write config: ${omoResult.error}`);
|
|
7516
|
-
Se(
|
|
7629
|
+
Se(import_picocolors3.default.red("Installation failed."));
|
|
7517
7630
|
return 1;
|
|
7518
7631
|
}
|
|
7519
|
-
s.stop(`Config written to ${
|
|
7632
|
+
s.stop(`Config written to ${import_picocolors3.default.cyan(omoResult.configPath)}`);
|
|
7520
7633
|
if (!config.hasClaude && !config.hasChatGPT && !config.hasGemini) {
|
|
7521
7634
|
M2.warn("No model providers configured. Using opencode/big-pickle as fallback.");
|
|
7522
7635
|
}
|
|
@@ -7524,25 +7637,25 @@ async function install(args) {
|
|
|
7524
7637
|
if ((config.hasClaude || config.hasChatGPT || config.hasGemini) && !args.skipAuth) {
|
|
7525
7638
|
const steps = [];
|
|
7526
7639
|
if (config.hasClaude) {
|
|
7527
|
-
steps.push(`${
|
|
7640
|
+
steps.push(`${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select Anthropic \u2192 Claude Pro/Max)")}`);
|
|
7528
7641
|
}
|
|
7529
7642
|
if (config.hasChatGPT) {
|
|
7530
|
-
steps.push(`${
|
|
7643
|
+
steps.push(`${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select OpenAI \u2192 ChatGPT Plus/Pro)")}`);
|
|
7531
7644
|
}
|
|
7532
7645
|
if (config.hasGemini) {
|
|
7533
|
-
steps.push(`${
|
|
7646
|
+
steps.push(`${import_picocolors3.default.dim("opencode auth login")} ${import_picocolors3.default.gray("(select Google \u2192 OAuth with Antigravity)")}`);
|
|
7534
7647
|
}
|
|
7535
7648
|
Me(steps.join(`
|
|
7536
7649
|
`), "Next Steps - Authenticate your providers");
|
|
7537
7650
|
}
|
|
7538
|
-
M2.success(
|
|
7539
|
-
M2.message(`Run ${
|
|
7540
|
-
Me(`Include ${
|
|
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.
|
|
7541
7654
|
` + `All features work like magic\u2014parallel agents, background tasks,
|
|
7542
7655
|
` + `deep exploration, and relentless execution until completion.`, "\uD83E\uDE84 The Magic Word");
|
|
7543
|
-
M2.message(`${
|
|
7544
|
-
M2.message(` ${
|
|
7545
|
-
Se(
|
|
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!"));
|
|
7546
7659
|
return 0;
|
|
7547
7660
|
}
|
|
7548
7661
|
// node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js
|
|
@@ -7713,7 +7826,7 @@ var separatorObjectExplode = (style) => {
|
|
|
7713
7826
|
};
|
|
7714
7827
|
var serializeArrayParam = ({ allowReserved, explode, name, style, value }) => {
|
|
7715
7828
|
if (!explode) {
|
|
7716
|
-
const joinedValues2 = (allowReserved ? value : value.map((
|
|
7829
|
+
const joinedValues2 = (allowReserved ? value : value.map((v2) => encodeURIComponent(v2))).join(separatorArrayNoExplode(style));
|
|
7717
7830
|
switch (style) {
|
|
7718
7831
|
case "label":
|
|
7719
7832
|
return `.${joinedValues2}`;
|
|
@@ -7726,14 +7839,14 @@ var serializeArrayParam = ({ allowReserved, explode, name, style, value }) => {
|
|
|
7726
7839
|
}
|
|
7727
7840
|
}
|
|
7728
7841
|
const separator = separatorArrayExplode(style);
|
|
7729
|
-
const joinedValues = value.map((
|
|
7842
|
+
const joinedValues = value.map((v2) => {
|
|
7730
7843
|
if (style === "label" || style === "simple") {
|
|
7731
|
-
return allowReserved ?
|
|
7844
|
+
return allowReserved ? v2 : encodeURIComponent(v2);
|
|
7732
7845
|
}
|
|
7733
7846
|
return serializePrimitiveParam({
|
|
7734
7847
|
allowReserved,
|
|
7735
7848
|
name,
|
|
7736
|
-
value:
|
|
7849
|
+
value: v2
|
|
7737
7850
|
});
|
|
7738
7851
|
}).join(separator);
|
|
7739
7852
|
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
@@ -7753,8 +7866,8 @@ var serializeObjectParam = ({ allowReserved, explode, name, style, value, valueO
|
|
|
7753
7866
|
}
|
|
7754
7867
|
if (style !== "deepObject" && !explode) {
|
|
7755
7868
|
let values = [];
|
|
7756
|
-
Object.entries(value).forEach(([key,
|
|
7757
|
-
values = [...values, key, allowReserved ?
|
|
7869
|
+
Object.entries(value).forEach(([key, v2]) => {
|
|
7870
|
+
values = [...values, key, allowReserved ? v2 : encodeURIComponent(v2)];
|
|
7758
7871
|
});
|
|
7759
7872
|
const joinedValues2 = values.join(",");
|
|
7760
7873
|
switch (style) {
|
|
@@ -7769,10 +7882,10 @@ var serializeObjectParam = ({ allowReserved, explode, name, style, value, valueO
|
|
|
7769
7882
|
}
|
|
7770
7883
|
}
|
|
7771
7884
|
const separator = separatorObjectExplode(style);
|
|
7772
|
-
const joinedValues = Object.entries(value).map(([key,
|
|
7885
|
+
const joinedValues = Object.entries(value).map(([key, v2]) => serializePrimitiveParam({
|
|
7773
7886
|
allowReserved,
|
|
7774
7887
|
name: style === "deepObject" ? `${name}[${key}]` : key,
|
|
7775
|
-
value:
|
|
7888
|
+
value: v2
|
|
7776
7889
|
})).join(separator);
|
|
7777
7890
|
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
7778
7891
|
};
|
|
@@ -7976,8 +8089,8 @@ var mergeHeaders = (...headers) => {
|
|
|
7976
8089
|
if (value === null) {
|
|
7977
8090
|
mergedHeaders.delete(key);
|
|
7978
8091
|
} else if (Array.isArray(value)) {
|
|
7979
|
-
for (const
|
|
7980
|
-
mergedHeaders.append(key,
|
|
8092
|
+
for (const v2 of value) {
|
|
8093
|
+
mergedHeaders.append(key, v2);
|
|
7981
8094
|
}
|
|
7982
8095
|
} else if (value !== undefined) {
|
|
7983
8096
|
mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
|
|
@@ -8985,10 +9098,10 @@ async function createOpencode(options) {
|
|
|
8985
9098
|
}
|
|
8986
9099
|
|
|
8987
9100
|
// src/cli/run/runner.ts
|
|
8988
|
-
var
|
|
9101
|
+
var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
8989
9102
|
|
|
8990
9103
|
// src/cli/run/completion.ts
|
|
8991
|
-
var
|
|
9104
|
+
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
8992
9105
|
async function checkCompletionConditions(ctx) {
|
|
8993
9106
|
try {
|
|
8994
9107
|
if (!await areAllTodosComplete(ctx)) {
|
|
@@ -8999,7 +9112,7 @@ async function checkCompletionConditions(ctx) {
|
|
|
8999
9112
|
}
|
|
9000
9113
|
return true;
|
|
9001
9114
|
} catch (err) {
|
|
9002
|
-
console.error(
|
|
9115
|
+
console.error(import_picocolors4.default.red(`[completion] API error: ${err}`));
|
|
9003
9116
|
return false;
|
|
9004
9117
|
}
|
|
9005
9118
|
}
|
|
@@ -9008,7 +9121,7 @@ async function areAllTodosComplete(ctx) {
|
|
|
9008
9121
|
const todos = todosRes.data ?? [];
|
|
9009
9122
|
const incompleteTodos = todos.filter((t) => t.status !== "completed" && t.status !== "cancelled");
|
|
9010
9123
|
if (incompleteTodos.length > 0) {
|
|
9011
|
-
console.log(
|
|
9124
|
+
console.log(import_picocolors4.default.dim(` Waiting: ${incompleteTodos.length} todos remaining`));
|
|
9012
9125
|
return false;
|
|
9013
9126
|
}
|
|
9014
9127
|
return true;
|
|
@@ -9029,7 +9142,7 @@ async function areAllDescendantsIdle(ctx, sessionID, allStatuses) {
|
|
|
9029
9142
|
for (const child of children) {
|
|
9030
9143
|
const status = allStatuses[child.id];
|
|
9031
9144
|
if (status && status.type !== "idle") {
|
|
9032
|
-
console.log(
|
|
9145
|
+
console.log(import_picocolors4.default.dim(` Waiting: session ${child.id.slice(0, 8)}... is ${status.type}`));
|
|
9033
9146
|
return false;
|
|
9034
9147
|
}
|
|
9035
9148
|
const descendantsIdle = await areAllDescendantsIdle(ctx, child.id, allStatuses);
|
|
@@ -9041,7 +9154,7 @@ async function areAllDescendantsIdle(ctx, sessionID, allStatuses) {
|
|
|
9041
9154
|
}
|
|
9042
9155
|
|
|
9043
9156
|
// src/cli/run/events.ts
|
|
9044
|
-
var
|
|
9157
|
+
var import_picocolors5 = __toESM(require_picocolors(), 1);
|
|
9045
9158
|
function createEventState() {
|
|
9046
9159
|
return {
|
|
9047
9160
|
mainSessionIdle: false,
|
|
@@ -9059,7 +9172,7 @@ async function processEvents(ctx, stream, state) {
|
|
|
9059
9172
|
try {
|
|
9060
9173
|
const payload = event;
|
|
9061
9174
|
if (!payload?.type) {
|
|
9062
|
-
console.error(
|
|
9175
|
+
console.error(import_picocolors5.default.dim(`[event] no type: ${JSON.stringify(event)}`));
|
|
9063
9176
|
continue;
|
|
9064
9177
|
}
|
|
9065
9178
|
logEventVerbose(ctx, payload);
|
|
@@ -9071,7 +9184,7 @@ async function processEvents(ctx, stream, state) {
|
|
|
9071
9184
|
handleToolExecute(ctx, payload, state);
|
|
9072
9185
|
handleToolResult(ctx, payload, state);
|
|
9073
9186
|
} catch (err) {
|
|
9074
|
-
console.error(
|
|
9187
|
+
console.error(import_picocolors5.default.red(`[event error] ${err}`));
|
|
9075
9188
|
}
|
|
9076
9189
|
}
|
|
9077
9190
|
}
|
|
@@ -9080,12 +9193,12 @@ function logEventVerbose(ctx, payload) {
|
|
|
9080
9193
|
const info = props?.info;
|
|
9081
9194
|
const sessionID = props?.sessionID ?? info?.sessionID;
|
|
9082
9195
|
const isMainSession = sessionID === ctx.sessionID;
|
|
9083
|
-
const sessionTag = isMainSession ?
|
|
9196
|
+
const sessionTag = isMainSession ? import_picocolors5.default.green("[MAIN]") : import_picocolors5.default.yellow(`[${String(sessionID).slice(0, 8)}]`);
|
|
9084
9197
|
switch (payload.type) {
|
|
9085
9198
|
case "session.idle":
|
|
9086
9199
|
case "session.status": {
|
|
9087
9200
|
const status = props?.status?.type ?? "idle";
|
|
9088
|
-
console.error(
|
|
9201
|
+
console.error(import_picocolors5.default.dim(`${sessionTag} ${payload.type}: ${status}`));
|
|
9089
9202
|
break;
|
|
9090
9203
|
}
|
|
9091
9204
|
case "message.part.updated": {
|
|
@@ -9093,7 +9206,7 @@ function logEventVerbose(ctx, payload) {
|
|
|
9093
9206
|
const part = partProps?.part;
|
|
9094
9207
|
if (part?.type === "tool-invocation") {
|
|
9095
9208
|
const toolPart = part;
|
|
9096
|
-
console.error(
|
|
9209
|
+
console.error(import_picocolors5.default.dim(`${sessionTag} message.part (tool): ${toolPart.toolName} [${toolPart.state}]`));
|
|
9097
9210
|
}
|
|
9098
9211
|
break;
|
|
9099
9212
|
}
|
|
@@ -9102,7 +9215,7 @@ function logEventVerbose(ctx, payload) {
|
|
|
9102
9215
|
const role = msgProps?.info?.role ?? "unknown";
|
|
9103
9216
|
const content = msgProps?.content ?? "";
|
|
9104
9217
|
const preview = content.slice(0, 100).replace(/\n/g, "\\n");
|
|
9105
|
-
console.error(
|
|
9218
|
+
console.error(import_picocolors5.default.dim(`${sessionTag} message.updated (${role}): "${preview}${content.length > 100 ? "..." : ""}"`));
|
|
9106
9219
|
break;
|
|
9107
9220
|
}
|
|
9108
9221
|
case "tool.execute": {
|
|
@@ -9110,19 +9223,19 @@ function logEventVerbose(ctx, payload) {
|
|
|
9110
9223
|
const toolName = toolProps?.name ?? "unknown";
|
|
9111
9224
|
const input = toolProps?.input ?? {};
|
|
9112
9225
|
const inputStr = JSON.stringify(input).slice(0, 150);
|
|
9113
|
-
console.error(
|
|
9114
|
-
console.error(
|
|
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 ? "..." : ""}`));
|
|
9115
9228
|
break;
|
|
9116
9229
|
}
|
|
9117
9230
|
case "tool.result": {
|
|
9118
9231
|
const resultProps = props;
|
|
9119
9232
|
const output = resultProps?.output ?? "";
|
|
9120
9233
|
const preview = output.slice(0, 200).replace(/\n/g, "\\n");
|
|
9121
|
-
console.error(
|
|
9234
|
+
console.error(import_picocolors5.default.green(`${sessionTag} \u2713 TOOL.RESULT: "${preview}${output.length > 200 ? "..." : ""}"`));
|
|
9122
9235
|
break;
|
|
9123
9236
|
}
|
|
9124
9237
|
default:
|
|
9125
|
-
console.error(
|
|
9238
|
+
console.error(import_picocolors5.default.dim(`${sessionTag} ${payload.type}`));
|
|
9126
9239
|
}
|
|
9127
9240
|
}
|
|
9128
9241
|
function handleSessionIdle(ctx, payload, state) {
|
|
@@ -9148,7 +9261,7 @@ function handleSessionError(ctx, payload, state) {
|
|
|
9148
9261
|
if (props?.sessionID === ctx.sessionID) {
|
|
9149
9262
|
state.mainSessionError = true;
|
|
9150
9263
|
state.lastError = props?.error ? String(props.error instanceof Error ? props.error.message : props.error) : "Unknown error";
|
|
9151
|
-
console.error(
|
|
9264
|
+
console.error(import_picocolors5.default.red(`
|
|
9152
9265
|
[session.error] ${state.lastError}`));
|
|
9153
9266
|
}
|
|
9154
9267
|
}
|
|
@@ -9202,17 +9315,17 @@ function handleToolExecute(ctx, payload, state) {
|
|
|
9202
9315
|
if (props?.input) {
|
|
9203
9316
|
const input = props.input;
|
|
9204
9317
|
if (input.command) {
|
|
9205
|
-
inputPreview = ` ${
|
|
9318
|
+
inputPreview = ` ${import_picocolors5.default.dim(String(input.command).slice(0, 60))}`;
|
|
9206
9319
|
} else if (input.pattern) {
|
|
9207
|
-
inputPreview = ` ${
|
|
9320
|
+
inputPreview = ` ${import_picocolors5.default.dim(String(input.pattern).slice(0, 40))}`;
|
|
9208
9321
|
} else if (input.filePath) {
|
|
9209
|
-
inputPreview = ` ${
|
|
9322
|
+
inputPreview = ` ${import_picocolors5.default.dim(String(input.filePath))}`;
|
|
9210
9323
|
} else if (input.query) {
|
|
9211
|
-
inputPreview = ` ${
|
|
9324
|
+
inputPreview = ` ${import_picocolors5.default.dim(String(input.query).slice(0, 40))}`;
|
|
9212
9325
|
}
|
|
9213
9326
|
}
|
|
9214
9327
|
process.stdout.write(`
|
|
9215
|
-
${
|
|
9328
|
+
${import_picocolors5.default.cyan("\u26A1")} ${import_picocolors5.default.bold(toolName)}${inputPreview}
|
|
9216
9329
|
`);
|
|
9217
9330
|
}
|
|
9218
9331
|
function handleToolResult(ctx, payload, state) {
|
|
@@ -9227,7 +9340,7 @@ function handleToolResult(ctx, payload, state) {
|
|
|
9227
9340
|
if (preview.trim()) {
|
|
9228
9341
|
const lines = preview.split(`
|
|
9229
9342
|
`).slice(0, 3);
|
|
9230
|
-
process.stdout.write(
|
|
9343
|
+
process.stdout.write(import_picocolors5.default.dim(` \u2514\u2500 ${lines.join(`
|
|
9231
9344
|
`)}
|
|
9232
9345
|
`));
|
|
9233
9346
|
}
|
|
@@ -9245,12 +9358,12 @@ async function run(options) {
|
|
|
9245
9358
|
directory = process.cwd(),
|
|
9246
9359
|
timeout = DEFAULT_TIMEOUT_MS
|
|
9247
9360
|
} = options;
|
|
9248
|
-
console.log(
|
|
9361
|
+
console.log(import_picocolors6.default.cyan("Starting opencode server..."));
|
|
9249
9362
|
const abortController = new AbortController;
|
|
9250
9363
|
let timeoutId = null;
|
|
9251
9364
|
if (timeout > 0) {
|
|
9252
9365
|
timeoutId = setTimeout(() => {
|
|
9253
|
-
console.log(
|
|
9366
|
+
console.log(import_picocolors6.default.yellow(`
|
|
9254
9367
|
Timeout reached. Aborting...`));
|
|
9255
9368
|
abortController.abort();
|
|
9256
9369
|
}, timeout);
|
|
@@ -9265,7 +9378,7 @@ Timeout reached. Aborting...`));
|
|
|
9265
9378
|
server2.close();
|
|
9266
9379
|
};
|
|
9267
9380
|
process.on("SIGINT", () => {
|
|
9268
|
-
console.log(
|
|
9381
|
+
console.log(import_picocolors6.default.yellow(`
|
|
9269
9382
|
Interrupted. Shutting down...`));
|
|
9270
9383
|
cleanup();
|
|
9271
9384
|
process.exit(130);
|
|
@@ -9276,10 +9389,10 @@ Interrupted. Shutting down...`));
|
|
|
9276
9389
|
});
|
|
9277
9390
|
const sessionID = sessionRes.data?.id;
|
|
9278
9391
|
if (!sessionID) {
|
|
9279
|
-
console.error(
|
|
9392
|
+
console.error(import_picocolors6.default.red("Failed to create session"));
|
|
9280
9393
|
return 1;
|
|
9281
9394
|
}
|
|
9282
|
-
console.log(
|
|
9395
|
+
console.log(import_picocolors6.default.dim(`Session: ${sessionID}`));
|
|
9283
9396
|
const ctx = {
|
|
9284
9397
|
client: client3,
|
|
9285
9398
|
sessionID,
|
|
@@ -9289,7 +9402,7 @@ Interrupted. Shutting down...`));
|
|
|
9289
9402
|
const events = await client3.event.subscribe();
|
|
9290
9403
|
const eventState = createEventState();
|
|
9291
9404
|
const eventProcessor = processEvents(ctx, events.stream, eventState);
|
|
9292
|
-
console.log(
|
|
9405
|
+
console.log(import_picocolors6.default.dim(`
|
|
9293
9406
|
Sending prompt...`));
|
|
9294
9407
|
await client3.session.promptAsync({
|
|
9295
9408
|
path: { id: sessionID },
|
|
@@ -9299,7 +9412,7 @@ Sending prompt...`));
|
|
|
9299
9412
|
},
|
|
9300
9413
|
query: { directory }
|
|
9301
9414
|
});
|
|
9302
|
-
console.log(
|
|
9415
|
+
console.log(import_picocolors6.default.dim(`Waiting for completion...
|
|
9303
9416
|
`));
|
|
9304
9417
|
while (!abortController.signal.aborted) {
|
|
9305
9418
|
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
@@ -9307,16 +9420,16 @@ Sending prompt...`));
|
|
|
9307
9420
|
continue;
|
|
9308
9421
|
}
|
|
9309
9422
|
if (eventState.mainSessionError) {
|
|
9310
|
-
console.error(
|
|
9423
|
+
console.error(import_picocolors6.default.red(`
|
|
9311
9424
|
|
|
9312
9425
|
Session ended with error: ${eventState.lastError}`));
|
|
9313
|
-
console.error(
|
|
9426
|
+
console.error(import_picocolors6.default.yellow("Check if todos were completed before the error."));
|
|
9314
9427
|
cleanup();
|
|
9315
9428
|
process.exit(1);
|
|
9316
9429
|
}
|
|
9317
9430
|
const shouldExit = await checkCompletionConditions(ctx);
|
|
9318
9431
|
if (shouldExit) {
|
|
9319
|
-
console.log(
|
|
9432
|
+
console.log(import_picocolors6.default.green(`
|
|
9320
9433
|
|
|
9321
9434
|
All tasks completed.`));
|
|
9322
9435
|
cleanup();
|
|
@@ -9336,7 +9449,7 @@ All tasks completed.`));
|
|
|
9336
9449
|
if (err instanceof Error && err.name === "AbortError") {
|
|
9337
9450
|
return 130;
|
|
9338
9451
|
}
|
|
9339
|
-
console.error(
|
|
9452
|
+
console.error(import_picocolors6.default.red(`Error: ${err}`));
|
|
9340
9453
|
return 1;
|
|
9341
9454
|
}
|
|
9342
9455
|
}
|
|
@@ -9527,54 +9640,54 @@ async function getLatestVersion() {
|
|
|
9527
9640
|
}
|
|
9528
9641
|
|
|
9529
9642
|
// src/cli/get-local-version/formatter.ts
|
|
9530
|
-
var
|
|
9643
|
+
var import_picocolors7 = __toESM(require_picocolors(), 1);
|
|
9531
9644
|
var SYMBOLS2 = {
|
|
9532
|
-
check:
|
|
9533
|
-
cross:
|
|
9534
|
-
arrow:
|
|
9535
|
-
info:
|
|
9536
|
-
warn:
|
|
9537
|
-
pin:
|
|
9538
|
-
dev:
|
|
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")
|
|
9539
9652
|
};
|
|
9540
9653
|
function formatVersionOutput(info) {
|
|
9541
9654
|
const packageName = getPackageName();
|
|
9542
9655
|
const lines = [];
|
|
9543
9656
|
lines.push("");
|
|
9544
|
-
lines.push(
|
|
9545
|
-
lines.push(
|
|
9657
|
+
lines.push(import_picocolors7.default.bold(import_picocolors7.default.white(`${packageName} Version Information`)));
|
|
9658
|
+
lines.push(import_picocolors7.default.dim("\u2500".repeat(50)));
|
|
9546
9659
|
lines.push("");
|
|
9547
9660
|
if (info.currentVersion) {
|
|
9548
|
-
lines.push(` Current Version: ${
|
|
9661
|
+
lines.push(` Current Version: ${import_picocolors7.default.cyan(info.currentVersion)}`);
|
|
9549
9662
|
} else {
|
|
9550
|
-
lines.push(` Current Version: ${
|
|
9663
|
+
lines.push(` Current Version: ${import_picocolors7.default.dim("unknown")}`);
|
|
9551
9664
|
}
|
|
9552
9665
|
if (!info.isLocalDev && info.latestVersion) {
|
|
9553
|
-
lines.push(` Latest Version: ${
|
|
9666
|
+
lines.push(` Latest Version: ${import_picocolors7.default.cyan(info.latestVersion)}`);
|
|
9554
9667
|
}
|
|
9555
9668
|
lines.push("");
|
|
9556
9669
|
switch (info.status) {
|
|
9557
9670
|
case "up-to-date":
|
|
9558
|
-
lines.push(` ${SYMBOLS2.check} ${
|
|
9671
|
+
lines.push(` ${SYMBOLS2.check} ${import_picocolors7.default.green("You're up to date!")}`);
|
|
9559
9672
|
break;
|
|
9560
9673
|
case "outdated":
|
|
9561
|
-
lines.push(` ${SYMBOLS2.warn} ${
|
|
9562
|
-
lines.push(` ${
|
|
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}`)}`);
|
|
9563
9676
|
break;
|
|
9564
9677
|
case "local-dev":
|
|
9565
|
-
lines.push(` ${SYMBOLS2.dev} ${
|
|
9566
|
-
lines.push(` ${
|
|
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")}`);
|
|
9567
9680
|
break;
|
|
9568
9681
|
case "pinned":
|
|
9569
|
-
lines.push(` ${SYMBOLS2.pin} ${
|
|
9570
|
-
lines.push(` ${
|
|
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")}`);
|
|
9571
9684
|
break;
|
|
9572
9685
|
case "error":
|
|
9573
|
-
lines.push(` ${SYMBOLS2.cross} ${
|
|
9574
|
-
lines.push(` ${
|
|
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")}`);
|
|
9575
9688
|
break;
|
|
9576
9689
|
case "unknown":
|
|
9577
|
-
lines.push(` ${SYMBOLS2.info} ${
|
|
9690
|
+
lines.push(` ${SYMBOLS2.info} ${import_picocolors7.default.yellow("Version information unavailable")}`);
|
|
9578
9691
|
break;
|
|
9579
9692
|
}
|
|
9580
9693
|
lines.push("");
|
|
@@ -9673,21 +9786,21 @@ async function getLocalVersion(options = {}) {
|
|
|
9673
9786
|
}
|
|
9674
9787
|
|
|
9675
9788
|
// src/cli/doctor/constants.ts
|
|
9676
|
-
var
|
|
9789
|
+
var import_picocolors8 = __toESM(require_picocolors(), 1);
|
|
9677
9790
|
var SYMBOLS3 = {
|
|
9678
|
-
check:
|
|
9679
|
-
cross:
|
|
9680
|
-
warn:
|
|
9681
|
-
info:
|
|
9682
|
-
arrow:
|
|
9683
|
-
bullet:
|
|
9684
|
-
skip:
|
|
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")
|
|
9685
9798
|
};
|
|
9686
9799
|
var STATUS_COLORS = {
|
|
9687
|
-
pass:
|
|
9688
|
-
fail:
|
|
9689
|
-
warn:
|
|
9690
|
-
skip:
|
|
9800
|
+
pass: import_picocolors8.default.green,
|
|
9801
|
+
fail: import_picocolors8.default.red,
|
|
9802
|
+
warn: import_picocolors8.default.yellow,
|
|
9803
|
+
skip: import_picocolors8.default.dim
|
|
9691
9804
|
};
|
|
9692
9805
|
var CHECK_IDS = {
|
|
9693
9806
|
OPENCODE_INSTALLATION: "opencode-installation",
|
|
@@ -9767,8 +9880,8 @@ async function getOpenCodeVersion2(binary2) {
|
|
|
9767
9880
|
return null;
|
|
9768
9881
|
}
|
|
9769
9882
|
function compareVersions(current, minimum) {
|
|
9770
|
-
const parseVersion = (
|
|
9771
|
-
const cleaned =
|
|
9883
|
+
const parseVersion = (v2) => {
|
|
9884
|
+
const cleaned = v2.replace(/^v/, "").split("-")[0];
|
|
9772
9885
|
return cleaned.split(".").map((n) => parseInt(n, 10) || 0);
|
|
9773
9886
|
};
|
|
9774
9887
|
const curr = parseVersion(current);
|
|
@@ -10592,8 +10705,8 @@ function assertNever(_x) {
|
|
|
10592
10705
|
}
|
|
10593
10706
|
function assert(_3) {}
|
|
10594
10707
|
function getEnumValues(entries) {
|
|
10595
|
-
const numericValues = Object.values(entries).filter((
|
|
10596
|
-
const values = Object.entries(entries).filter(([k3, _3]) => numericValues.indexOf(+k3) === -1).map(([_3,
|
|
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);
|
|
10597
10710
|
return values;
|
|
10598
10711
|
}
|
|
10599
10712
|
function joinValues(array, separator = "|") {
|
|
@@ -10654,9 +10767,9 @@ function defineLazy(object, key, getter) {
|
|
|
10654
10767
|
}
|
|
10655
10768
|
return value;
|
|
10656
10769
|
},
|
|
10657
|
-
set(
|
|
10770
|
+
set(v2) {
|
|
10658
10771
|
Object.defineProperty(object, key, {
|
|
10659
|
-
value:
|
|
10772
|
+
value: v2
|
|
10660
10773
|
});
|
|
10661
10774
|
},
|
|
10662
10775
|
configurable: true
|
|
@@ -12262,10 +12375,10 @@ var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
|
|
|
12262
12375
|
v7: 7,
|
|
12263
12376
|
v8: 8
|
|
12264
12377
|
};
|
|
12265
|
-
const
|
|
12266
|
-
if (
|
|
12378
|
+
const v2 = versionMap[def.version];
|
|
12379
|
+
if (v2 === undefined)
|
|
12267
12380
|
throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
12268
|
-
def.pattern ?? (def.pattern = uuid(
|
|
12381
|
+
def.pattern ?? (def.pattern = uuid(v2));
|
|
12269
12382
|
} else
|
|
12270
12383
|
def.pattern ?? (def.pattern = uuid());
|
|
12271
12384
|
$ZodStringFormat.init(inst, def);
|
|
@@ -12826,8 +12939,8 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
12826
12939
|
const field = shape[key]._zod;
|
|
12827
12940
|
if (field.values) {
|
|
12828
12941
|
propValues[key] ?? (propValues[key] = new Set);
|
|
12829
|
-
for (const
|
|
12830
|
-
propValues[key].add(
|
|
12942
|
+
for (const v2 of field.values)
|
|
12943
|
+
propValues[key].add(v2);
|
|
12831
12944
|
}
|
|
12832
12945
|
}
|
|
12833
12946
|
return propValues;
|
|
@@ -13016,10 +13129,10 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
13016
13129
|
const pv = option._zod.propValues;
|
|
13017
13130
|
if (!pv || Object.keys(pv).length === 0)
|
|
13018
13131
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
|
|
13019
|
-
for (const [k3,
|
|
13132
|
+
for (const [k3, v2] of Object.entries(pv)) {
|
|
13020
13133
|
if (!propValues[k3])
|
|
13021
13134
|
propValues[k3] = new Set;
|
|
13022
|
-
for (const val of
|
|
13135
|
+
for (const val of v2) {
|
|
13023
13136
|
propValues[k3].add(val);
|
|
13024
13137
|
}
|
|
13025
13138
|
}
|
|
@@ -13033,11 +13146,11 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
13033
13146
|
const values = o2._zod.propValues?.[def.discriminator];
|
|
13034
13147
|
if (!values || values.size === 0)
|
|
13035
13148
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o2)}"`);
|
|
13036
|
-
for (const
|
|
13037
|
-
if (map2.has(
|
|
13038
|
-
throw new Error(`Duplicate discriminator value "${String(
|
|
13149
|
+
for (const v2 of values) {
|
|
13150
|
+
if (map2.has(v2)) {
|
|
13151
|
+
throw new Error(`Duplicate discriminator value "${String(v2)}"`);
|
|
13039
13152
|
}
|
|
13040
|
-
map2.set(
|
|
13153
|
+
map2.set(v2, o2);
|
|
13041
13154
|
}
|
|
13042
13155
|
}
|
|
13043
13156
|
return map2;
|
|
@@ -13573,8 +13686,8 @@ var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
|
|
|
13573
13686
|
var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
|
|
13574
13687
|
$ZodType.init(inst, def);
|
|
13575
13688
|
defineLazy(inst._zod, "values", () => {
|
|
13576
|
-
const
|
|
13577
|
-
return
|
|
13689
|
+
const v2 = def.innerType._zod.values;
|
|
13690
|
+
return v2 ? new Set([...v2].filter((x2) => x2 !== undefined)) : undefined;
|
|
13578
13691
|
});
|
|
13579
13692
|
inst._zod.parse = (payload, ctx) => {
|
|
13580
13693
|
const result = def.innerType._zod.run(payload, ctx);
|
|
@@ -20128,7 +20241,7 @@ function _set(Class2, valueType, params) {
|
|
|
20128
20241
|
});
|
|
20129
20242
|
}
|
|
20130
20243
|
function _enum(Class2, values, params) {
|
|
20131
|
-
const entries = Array.isArray(values) ? Object.fromEntries(values.map((
|
|
20244
|
+
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
|
|
20132
20245
|
return new Class2({
|
|
20133
20246
|
type: "enum",
|
|
20134
20247
|
entries,
|
|
@@ -20287,8 +20400,8 @@ function _stringbool(Classes, _params) {
|
|
|
20287
20400
|
let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
|
|
20288
20401
|
let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
|
|
20289
20402
|
if (params.case !== "sensitive") {
|
|
20290
|
-
truthyArray = truthyArray.map((
|
|
20291
|
-
falsyArray = falsyArray.map((
|
|
20403
|
+
truthyArray = truthyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
|
|
20404
|
+
falsyArray = falsyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
|
|
20292
20405
|
}
|
|
20293
20406
|
const truthySet = new Set(truthyArray);
|
|
20294
20407
|
const falsySet = new Set(falsyArray);
|
|
@@ -20550,11 +20663,11 @@ class JSONSchemaGenerator {
|
|
|
20550
20663
|
}
|
|
20551
20664
|
const allKeys = new Set(Object.keys(shape));
|
|
20552
20665
|
const requiredKeys = new Set([...allKeys].filter((key) => {
|
|
20553
|
-
const
|
|
20666
|
+
const v2 = def.shape[key]._zod;
|
|
20554
20667
|
if (this.io === "input") {
|
|
20555
|
-
return
|
|
20668
|
+
return v2.optin === undefined;
|
|
20556
20669
|
} else {
|
|
20557
|
-
return
|
|
20670
|
+
return v2.optout === undefined;
|
|
20558
20671
|
}
|
|
20559
20672
|
}));
|
|
20560
20673
|
if (requiredKeys.size > 0) {
|
|
@@ -20672,9 +20785,9 @@ class JSONSchemaGenerator {
|
|
|
20672
20785
|
case "enum": {
|
|
20673
20786
|
const json2 = _json;
|
|
20674
20787
|
const values = getEnumValues(def.entries);
|
|
20675
|
-
if (values.every((
|
|
20788
|
+
if (values.every((v2) => typeof v2 === "number"))
|
|
20676
20789
|
json2.type = "number";
|
|
20677
|
-
if (values.every((
|
|
20790
|
+
if (values.every((v2) => typeof v2 === "string"))
|
|
20678
20791
|
json2.type = "string";
|
|
20679
20792
|
json2.enum = values;
|
|
20680
20793
|
break;
|
|
@@ -20706,13 +20819,13 @@ class JSONSchemaGenerator {
|
|
|
20706
20819
|
json2.const = val;
|
|
20707
20820
|
}
|
|
20708
20821
|
} else {
|
|
20709
|
-
if (vals.every((
|
|
20822
|
+
if (vals.every((v2) => typeof v2 === "number"))
|
|
20710
20823
|
json2.type = "number";
|
|
20711
|
-
if (vals.every((
|
|
20824
|
+
if (vals.every((v2) => typeof v2 === "string"))
|
|
20712
20825
|
json2.type = "string";
|
|
20713
|
-
if (vals.every((
|
|
20826
|
+
if (vals.every((v2) => typeof v2 === "boolean"))
|
|
20714
20827
|
json2.type = "string";
|
|
20715
|
-
if (vals.every((
|
|
20828
|
+
if (vals.every((v2) => v2 === null))
|
|
20716
20829
|
json2.type = "null";
|
|
20717
20830
|
json2.enum = vals;
|
|
20718
20831
|
}
|
|
@@ -21913,7 +22026,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
|
21913
22026
|
};
|
|
21914
22027
|
});
|
|
21915
22028
|
function _enum2(values, params) {
|
|
21916
|
-
const entries = Array.isArray(values) ? Object.fromEntries(values.map((
|
|
22029
|
+
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
|
|
21917
22030
|
return new ZodEnum({
|
|
21918
22031
|
type: "enum",
|
|
21919
22032
|
entries,
|
|
@@ -23285,8 +23398,8 @@ function getMcpCheckDefinitions() {
|
|
|
23285
23398
|
|
|
23286
23399
|
// src/cli/doctor/checks/version.ts
|
|
23287
23400
|
function compareVersions2(current, latest) {
|
|
23288
|
-
const parseVersion = (
|
|
23289
|
-
const cleaned =
|
|
23401
|
+
const parseVersion = (v2) => {
|
|
23402
|
+
const cleaned = v2.replace(/^v/, "").split("-")[0];
|
|
23290
23403
|
return cleaned.split(".").map((n) => parseInt(n, 10) || 0);
|
|
23291
23404
|
};
|
|
23292
23405
|
const curr = parseVersion(current);
|
|
@@ -23410,7 +23523,7 @@ function getAllCheckDefinitions() {
|
|
|
23410
23523
|
}
|
|
23411
23524
|
|
|
23412
23525
|
// src/cli/doctor/formatter.ts
|
|
23413
|
-
var
|
|
23526
|
+
var import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
23414
23527
|
function formatStatusSymbol(status) {
|
|
23415
23528
|
switch (status) {
|
|
23416
23529
|
case "pass":
|
|
@@ -23427,13 +23540,13 @@ function formatCheckResult(result, verbose) {
|
|
|
23427
23540
|
const symbol2 = formatStatusSymbol(result.status);
|
|
23428
23541
|
const colorFn = STATUS_COLORS[result.status];
|
|
23429
23542
|
const name = colorFn(result.name);
|
|
23430
|
-
const message =
|
|
23543
|
+
const message = import_picocolors9.default.dim(result.message);
|
|
23431
23544
|
let line = ` ${symbol2} ${name}`;
|
|
23432
23545
|
if (result.message) {
|
|
23433
23546
|
line += ` ${SYMBOLS3.arrow} ${message}`;
|
|
23434
23547
|
}
|
|
23435
23548
|
if (verbose && result.details && result.details.length > 0) {
|
|
23436
|
-
const detailLines = result.details.map((d3) => ` ${SYMBOLS3.bullet} ${
|
|
23549
|
+
const detailLines = result.details.map((d3) => ` ${SYMBOLS3.bullet} ${import_picocolors9.default.dim(d3)}`).join(`
|
|
23437
23550
|
`);
|
|
23438
23551
|
line += `
|
|
23439
23552
|
` + detailLines;
|
|
@@ -23443,44 +23556,44 @@ function formatCheckResult(result, verbose) {
|
|
|
23443
23556
|
function formatCategoryHeader(category) {
|
|
23444
23557
|
const name = CATEGORY_NAMES[category] || category;
|
|
23445
23558
|
return `
|
|
23446
|
-
${
|
|
23447
|
-
${
|
|
23559
|
+
${import_picocolors9.default.bold(import_picocolors9.default.white(name))}
|
|
23560
|
+
${import_picocolors9.default.dim("\u2500".repeat(40))}`;
|
|
23448
23561
|
}
|
|
23449
23562
|
function formatSummary(summary) {
|
|
23450
23563
|
const lines = [];
|
|
23451
|
-
lines.push(
|
|
23452
|
-
lines.push(
|
|
23564
|
+
lines.push(import_picocolors9.default.bold(import_picocolors9.default.white("Summary")));
|
|
23565
|
+
lines.push(import_picocolors9.default.dim("\u2500".repeat(40)));
|
|
23453
23566
|
lines.push("");
|
|
23454
|
-
const passText = summary.passed > 0 ?
|
|
23455
|
-
const failText = summary.failed > 0 ?
|
|
23456
|
-
const warnText = summary.warnings > 0 ?
|
|
23457
|
-
const skipText = summary.skipped > 0 ?
|
|
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`) : "";
|
|
23458
23571
|
const parts = [passText, failText, warnText];
|
|
23459
23572
|
if (skipText)
|
|
23460
23573
|
parts.push(skipText);
|
|
23461
23574
|
lines.push(` ${parts.join(", ")}`);
|
|
23462
|
-
lines.push(` ${
|
|
23575
|
+
lines.push(` ${import_picocolors9.default.dim(`Total: ${summary.total} checks in ${summary.duration}ms`)}`);
|
|
23463
23576
|
return lines.join(`
|
|
23464
23577
|
`);
|
|
23465
23578
|
}
|
|
23466
23579
|
function formatHeader() {
|
|
23467
23580
|
return `
|
|
23468
|
-
${
|
|
23581
|
+
${import_picocolors9.default.bgMagenta(import_picocolors9.default.white(" oMoMoMoMo... Doctor "))}
|
|
23469
23582
|
`;
|
|
23470
23583
|
}
|
|
23471
23584
|
function formatFooter(summary) {
|
|
23472
23585
|
if (summary.failed > 0) {
|
|
23473
23586
|
return `
|
|
23474
|
-
${SYMBOLS3.cross} ${
|
|
23587
|
+
${SYMBOLS3.cross} ${import_picocolors9.default.red("Issues detected. Please review the errors above.")}
|
|
23475
23588
|
`;
|
|
23476
23589
|
}
|
|
23477
23590
|
if (summary.warnings > 0) {
|
|
23478
23591
|
return `
|
|
23479
|
-
${SYMBOLS3.warn} ${
|
|
23592
|
+
${SYMBOLS3.warn} ${import_picocolors9.default.yellow("All systems operational with warnings.")}
|
|
23480
23593
|
`;
|
|
23481
23594
|
}
|
|
23482
23595
|
return `
|
|
23483
|
-
${SYMBOLS3.check} ${
|
|
23596
|
+
${SYMBOLS3.check} ${import_picocolors9.default.green("All systems operational!")}
|
|
23484
23597
|
`;
|
|
23485
23598
|
}
|
|
23486
23599
|
function formatJsonOutput2(result) {
|
|
@@ -23592,22 +23705,33 @@ var packageJson = await Promise.resolve().then(() => __toESM(require_package(),
|
|
|
23592
23705
|
var VERSION = packageJson.version;
|
|
23593
23706
|
var program2 = new Command;
|
|
23594
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");
|
|
23595
|
-
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", `
|
|
23596
23709
|
Examples:
|
|
23597
23710
|
$ bunx oh-my-opencode install
|
|
23598
23711
|
$ bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes
|
|
23599
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
|
|
23600
23716
|
|
|
23601
23717
|
Model Providers:
|
|
23602
23718
|
Claude Required for Sisyphus (main orchestrator) and Librarian agents
|
|
23603
23719
|
ChatGPT Powers the Oracle agent for debugging and architecture
|
|
23604
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/
|
|
23605
23727
|
`).action(async (options) => {
|
|
23606
23728
|
const args = {
|
|
23607
23729
|
tui: options.tui !== false,
|
|
23608
23730
|
claude: options.claude,
|
|
23609
23731
|
chatgpt: options.chatgpt,
|
|
23610
23732
|
gemini: options.gemini,
|
|
23733
|
+
memory: options.memory,
|
|
23734
|
+
memoryEndpoint: options.memoryEndpoint,
|
|
23611
23735
|
skipAuth: options.skipAuth ?? false
|
|
23612
23736
|
};
|
|
23613
23737
|
const exitCode = await install(args);
|