@kesarcloud/omega-plus-cli 2.0.1 → 2.0.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/package.json +2 -2
- package/src/config-writers.mjs +7 -5
- package/src/constants.mjs +1 -1
- package/src/detector.mjs +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kesarcloud/omega-plus-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Interactive Omega Plus setup wizard for coding CLI tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"author": "KesarCloud Technologies",
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
34
|
-
"url": "https://github.com/karanbavari/OmegaCluster",
|
|
34
|
+
"url": "git+https://github.com/karanbavari/OmegaCluster.git",
|
|
35
35
|
"directory": "packages/omega-cli-helper"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
package/src/config-writers.mjs
CHANGED
|
@@ -79,14 +79,15 @@ async function configureCodex(input) {
|
|
|
79
79
|
const parsed = parseToml(await readText(paths.config, ""));
|
|
80
80
|
|
|
81
81
|
parsed._root.model = options.model;
|
|
82
|
-
parsed._root.model_provider = "
|
|
82
|
+
parsed._root.model_provider = "kesarcloud";
|
|
83
83
|
delete parsed._root.openai_base_url;
|
|
84
|
-
parsed._sections["model_providers.
|
|
85
|
-
name: "
|
|
84
|
+
parsed._sections["model_providers.kesarcloud"] = {
|
|
85
|
+
name: "Kesarcloud",
|
|
86
86
|
base_url: normalizeCodexBaseUrl(options.openaiBaseUrl),
|
|
87
87
|
wire_api: "chat",
|
|
88
88
|
env_key: "OPENAI_API_KEY",
|
|
89
89
|
};
|
|
90
|
+
delete parsed._sections["model_providers.omega"];
|
|
90
91
|
delete parsed._sections["model_providers.omniroute"];
|
|
91
92
|
|
|
92
93
|
const configWrite = await writeTextFile(paths.config, stringifyToml(parsed), options);
|
|
@@ -110,7 +111,7 @@ function buildOpenCodeProvider(options) {
|
|
|
110
111
|
|
|
111
112
|
return {
|
|
112
113
|
npm: "@ai-sdk/anthropic",
|
|
113
|
-
name: "
|
|
114
|
+
name: "Kesarcloud",
|
|
114
115
|
options: {
|
|
115
116
|
baseURL: options.anthropicBaseUrl,
|
|
116
117
|
apiKey: options.apiKey,
|
|
@@ -134,9 +135,10 @@ async function configureOpenCode(input) {
|
|
|
134
135
|
$schema: current.$schema || "https://opencode.ai/config.json",
|
|
135
136
|
provider: {
|
|
136
137
|
...provider,
|
|
137
|
-
|
|
138
|
+
kesarcloud: buildOpenCodeProvider(options),
|
|
138
139
|
},
|
|
139
140
|
};
|
|
141
|
+
if (nextConfig.provider.omega) delete nextConfig.provider.omega;
|
|
140
142
|
if (nextConfig.provider.omniroute) delete nextConfig.provider.omniroute;
|
|
141
143
|
|
|
142
144
|
const write = await writeJsonFile(paths.config, nextConfig, options);
|
package/src/constants.mjs
CHANGED
package/src/detector.mjs
CHANGED
|
@@ -55,13 +55,13 @@ async function configStatus(toolId, options = {}) {
|
|
|
55
55
|
if (toolId === "codex") {
|
|
56
56
|
const config = await readText(paths.config, "");
|
|
57
57
|
const auth = await readJson(paths.auth, {});
|
|
58
|
-
return config.includes("[model_providers.
|
|
58
|
+
return config.includes("[model_providers.kesarcloud]") && auth.OPENAI_API_KEY
|
|
59
59
|
? "configured"
|
|
60
60
|
: "not_configured";
|
|
61
61
|
}
|
|
62
62
|
if (toolId === "opencode") {
|
|
63
63
|
const config = await readJson(paths.config, null);
|
|
64
|
-
return config?.provider?.
|
|
64
|
+
return config?.provider?.kesarcloud?.options?.apiKey ? "configured" : "not_configured";
|
|
65
65
|
}
|
|
66
66
|
if (toolId === "cline") {
|
|
67
67
|
const state = await readJson(paths.globalState, null);
|