oh-my-opencode-slim 0.4.0 → 0.4.1
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/agents/fixer.d.ts +2 -0
- package/dist/agents/specialist.d.ts +2 -0
- package/dist/cli/index.js +19 -24
- package/dist/cli/types.d.ts +2 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -377,10 +377,17 @@ var MODEL_MAPPINGS = {
|
|
|
377
377
|
librarian: "cerebras/zai-glm-4.7",
|
|
378
378
|
explorer: "cerebras/zai-glm-4.7",
|
|
379
379
|
designer: "cerebras/zai-glm-4.7"
|
|
380
|
+
},
|
|
381
|
+
opencode: {
|
|
382
|
+
orchestrator: "opencode/glm-4.7-free",
|
|
383
|
+
oracle: "opencode/glm-4.7-free",
|
|
384
|
+
librarian: "opencode/glm-4.7-free",
|
|
385
|
+
explorer: "opencode/glm-4.7-free",
|
|
386
|
+
designer: "opencode/glm-4.7-free"
|
|
380
387
|
}
|
|
381
388
|
};
|
|
382
389
|
function generateLiteConfig(installConfig) {
|
|
383
|
-
const baseProvider = installConfig.hasAntigravity ? "antigravity" : installConfig.hasOpenAI ? "openai" : installConfig.
|
|
390
|
+
const baseProvider = installConfig.hasAntigravity ? "antigravity" : installConfig.hasOpenAI ? "openai" : installConfig.hasOpencodeZen ? "opencode" : "opencode";
|
|
384
391
|
const config = { agents: {} };
|
|
385
392
|
if (baseProvider) {
|
|
386
393
|
const agents = Object.fromEntries(Object.entries(MODEL_MAPPINGS[baseProvider]).map(([k, v]) => [
|
|
@@ -391,11 +398,6 @@ function generateLiteConfig(installConfig) {
|
|
|
391
398
|
if (installConfig.hasOpenAI) {
|
|
392
399
|
agents["oracle"] = { model: "openai/gpt-5.2-codex", skills: DEFAULT_AGENT_SKILLS["oracle"] ?? [] };
|
|
393
400
|
}
|
|
394
|
-
if (installConfig.hasCerebras) {
|
|
395
|
-
agents["explorer"] = { model: "cerebras/zai-glm-4.7", skills: DEFAULT_AGENT_SKILLS["explorer"] ?? [] };
|
|
396
|
-
}
|
|
397
|
-
} else if (installConfig.hasOpenAI && installConfig.hasCerebras) {
|
|
398
|
-
agents["explorer"] = { model: "cerebras/zai-glm-4.7", skills: DEFAULT_AGENT_SKILLS["explorer"] ?? [] };
|
|
399
401
|
}
|
|
400
402
|
config.agents = agents;
|
|
401
403
|
}
|
|
@@ -448,7 +450,7 @@ function detectCurrentConfig() {
|
|
|
448
450
|
isInstalled: false,
|
|
449
451
|
hasAntigravity: false,
|
|
450
452
|
hasOpenAI: false,
|
|
451
|
-
|
|
453
|
+
hasOpencodeZen: false,
|
|
452
454
|
hasTmux: false
|
|
453
455
|
};
|
|
454
456
|
const config = parseConfig(getExistingConfigPath());
|
|
@@ -464,7 +466,7 @@ function detectCurrentConfig() {
|
|
|
464
466
|
if (agents) {
|
|
465
467
|
const models = Object.values(agents).map((a) => a?.model).filter(Boolean);
|
|
466
468
|
result.hasOpenAI = models.some((m) => m?.startsWith("openai/"));
|
|
467
|
-
result.
|
|
469
|
+
result.hasOpencodeZen = models.some((m) => m?.startsWith("opencode/"));
|
|
468
470
|
}
|
|
469
471
|
if (configObj.tmux && typeof configObj.tmux === "object") {
|
|
470
472
|
result.hasTmux = configObj.tmux.enabled === true;
|
|
@@ -537,7 +539,7 @@ function formatConfigSummary(config) {
|
|
|
537
539
|
lines.push("");
|
|
538
540
|
lines.push(` ${config.hasAntigravity ? SYMBOLS.check : DIM + "\u25CB" + RESET} Antigravity`);
|
|
539
541
|
lines.push(` ${config.hasOpenAI ? SYMBOLS.check : DIM + "\u25CB" + RESET} OpenAI`);
|
|
540
|
-
lines.push(` ${
|
|
542
|
+
lines.push(` ${SYMBOLS.check} Opencode Zen (free models)`);
|
|
541
543
|
lines.push(` ${config.hasTmux ? SYMBOLS.check : DIM + "\u25CB" + RESET} Tmux Integration`);
|
|
542
544
|
return lines.join(`
|
|
543
545
|
`);
|
|
@@ -561,7 +563,7 @@ function argsToConfig(args) {
|
|
|
561
563
|
return {
|
|
562
564
|
hasAntigravity: args.antigravity === "yes",
|
|
563
565
|
hasOpenAI: args.openai === "yes",
|
|
564
|
-
|
|
566
|
+
hasOpencodeZen: true,
|
|
565
567
|
hasTmux: args.tmux === "yes"
|
|
566
568
|
};
|
|
567
569
|
}
|
|
@@ -578,7 +580,7 @@ async function askYesNo(rl, prompt, defaultValue = "no") {
|
|
|
578
580
|
}
|
|
579
581
|
async function runInteractiveMode(detected) {
|
|
580
582
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
581
|
-
const totalQuestions =
|
|
583
|
+
const totalQuestions = 2;
|
|
582
584
|
try {
|
|
583
585
|
console.log(`${BOLD}Question 1/${totalQuestions}:${RESET}`);
|
|
584
586
|
printInfo("The Pantheon is tuned for Antigravity's model routing. Other models work, but results may vary.");
|
|
@@ -587,13 +589,10 @@ async function runInteractiveMode(detected) {
|
|
|
587
589
|
console.log(`${BOLD}Question 2/${totalQuestions}:${RESET}`);
|
|
588
590
|
const openai = await askYesNo(rl, "Do you have access to OpenAI API?", detected.hasOpenAI ? "yes" : "no");
|
|
589
591
|
console.log();
|
|
590
|
-
console.log(`${BOLD}Question 3/${totalQuestions}:${RESET}`);
|
|
591
|
-
const cerebras = await askYesNo(rl, "Do you have access to Cerebras API?", detected.hasCerebras ? "yes" : "no");
|
|
592
|
-
console.log();
|
|
593
592
|
return {
|
|
594
593
|
hasAntigravity: antigravity === "yes",
|
|
595
594
|
hasOpenAI: openai === "yes",
|
|
596
|
-
|
|
595
|
+
hasOpencodeZen: true,
|
|
597
596
|
hasTmux: false
|
|
598
597
|
};
|
|
599
598
|
} finally {
|
|
@@ -638,9 +637,8 @@ async function runInstall(config) {
|
|
|
638
637
|
console.log(formatConfigSummary(config));
|
|
639
638
|
console.log();
|
|
640
639
|
printAgentModels(config);
|
|
641
|
-
if (!config.hasAntigravity && !config.hasOpenAI
|
|
642
|
-
printWarning("No providers configured.
|
|
643
|
-
return 1;
|
|
640
|
+
if (!config.hasAntigravity && !config.hasOpenAI) {
|
|
641
|
+
printWarning("No providers configured. Zen free models will be used as fallback.");
|
|
644
642
|
}
|
|
645
643
|
console.log(`${SYMBOLS.star} ${BOLD}${GREEN}${isUpdate ? "Configuration updated!" : "Installation complete!"}${RESET}`);
|
|
646
644
|
console.log();
|
|
@@ -657,7 +655,7 @@ async function runInstall(config) {
|
|
|
657
655
|
}
|
|
658
656
|
async function install(args) {
|
|
659
657
|
if (!args.tui) {
|
|
660
|
-
const requiredArgs = ["antigravity", "openai", "
|
|
658
|
+
const requiredArgs = ["antigravity", "openai", "tmux"];
|
|
661
659
|
const errors = requiredArgs.filter((key) => {
|
|
662
660
|
const value = args[key];
|
|
663
661
|
return value === undefined || !["yes", "no"].includes(value);
|
|
@@ -669,7 +667,7 @@ async function install(args) {
|
|
|
669
667
|
console.log(` ${SYMBOLS.bullet} --${key}=<yes|no>`);
|
|
670
668
|
}
|
|
671
669
|
console.log();
|
|
672
|
-
printInfo("Usage: bunx oh-my-opencode-slim install --no-tui --antigravity=<yes|no> --openai=<yes|no> --
|
|
670
|
+
printInfo("Usage: bunx oh-my-opencode-slim install --no-tui --antigravity=<yes|no> --openai=<yes|no> --tmux=<yes|no>");
|
|
673
671
|
console.log();
|
|
674
672
|
return 1;
|
|
675
673
|
}
|
|
@@ -700,8 +698,6 @@ function parseArgs(args) {
|
|
|
700
698
|
result.antigravity = arg.split("=")[1];
|
|
701
699
|
} else if (arg.startsWith("--openai=")) {
|
|
702
700
|
result.openai = arg.split("=")[1];
|
|
703
|
-
} else if (arg.startsWith("--cerebras=")) {
|
|
704
|
-
result.cerebras = arg.split("=")[1];
|
|
705
701
|
} else if (arg.startsWith("--tmux=")) {
|
|
706
702
|
result.tmux = arg.split("=")[1];
|
|
707
703
|
} else if (arg === "-h" || arg === "--help") {
|
|
@@ -720,7 +716,6 @@ Usage: bunx oh-my-opencode-slim install [OPTIONS]
|
|
|
720
716
|
Options:
|
|
721
717
|
--antigravity=yes|no Antigravity subscription (yes/no)
|
|
722
718
|
--openai=yes|no OpenAI API access (yes/no)
|
|
723
|
-
--cerebras=yes|no Cerebras API access (yes/no)
|
|
724
719
|
--tmux=yes|no Enable tmux integration (yes/no)
|
|
725
720
|
--no-tui Non-interactive mode (requires all flags)
|
|
726
721
|
--skip-auth Skip authentication reminder
|
|
@@ -728,7 +723,7 @@ Options:
|
|
|
728
723
|
|
|
729
724
|
Examples:
|
|
730
725
|
bunx oh-my-opencode-slim install
|
|
731
|
-
bunx oh-my-opencode-slim install --no-tui --antigravity=yes --openai=yes --
|
|
726
|
+
bunx oh-my-opencode-slim install --no-tui --antigravity=yes --openai=yes --tmux=no
|
|
732
727
|
`);
|
|
733
728
|
}
|
|
734
729
|
async function main() {
|
package/dist/cli/types.d.ts
CHANGED
|
@@ -3,14 +3,13 @@ export interface InstallArgs {
|
|
|
3
3
|
tui: boolean;
|
|
4
4
|
antigravity?: BooleanArg;
|
|
5
5
|
openai?: BooleanArg;
|
|
6
|
-
cerebras?: BooleanArg;
|
|
7
6
|
tmux?: BooleanArg;
|
|
8
7
|
skipAuth?: boolean;
|
|
9
8
|
}
|
|
10
9
|
export interface InstallConfig {
|
|
11
10
|
hasAntigravity: boolean;
|
|
12
11
|
hasOpenAI: boolean;
|
|
13
|
-
|
|
12
|
+
hasOpencodeZen: boolean;
|
|
14
13
|
hasTmux: boolean;
|
|
15
14
|
}
|
|
16
15
|
export interface ConfigMergeResult {
|
|
@@ -22,6 +21,6 @@ export interface DetectedConfig {
|
|
|
22
21
|
isInstalled: boolean;
|
|
23
22
|
hasAntigravity: boolean;
|
|
24
23
|
hasOpenAI: boolean;
|
|
25
|
-
|
|
24
|
+
hasOpencodeZen: boolean;
|
|
26
25
|
hasTmux: boolean;
|
|
27
26
|
}
|
package/package.json
CHANGED