zenox 1.1.1 → 1.1.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 +18 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -3255,7 +3255,7 @@ async function createDefaultConfig(configPath) {
|
|
|
3255
3255
|
|
|
3256
3256
|
// src/cli/zenox-config.ts
|
|
3257
3257
|
import { existsSync as existsSync2 } from "node:fs";
|
|
3258
|
-
import { readFile as readFile2, writeFile as writeFile2, mkdir } from "node:fs/promises";
|
|
3258
|
+
import { readFile as readFile2, writeFile as writeFile2, mkdir, unlink } from "node:fs/promises";
|
|
3259
3259
|
import { join as join2, dirname } from "node:path";
|
|
3260
3260
|
import { homedir as homedir2 } from "node:os";
|
|
3261
3261
|
function getZenoxConfigPath() {
|
|
@@ -3283,12 +3283,24 @@ async function writeZenoxConfig(config) {
|
|
|
3283
3283
|
}
|
|
3284
3284
|
async function updateAgentModels(models) {
|
|
3285
3285
|
const existing = await readZenoxConfig() ?? {};
|
|
3286
|
-
const
|
|
3286
|
+
const configPath = getZenoxConfigPath();
|
|
3287
|
+
const agents = {};
|
|
3287
3288
|
for (const [agent, model] of Object.entries(models)) {
|
|
3288
3289
|
if (model) {
|
|
3289
3290
|
agents[agent] = { model };
|
|
3290
3291
|
}
|
|
3291
3292
|
}
|
|
3293
|
+
if (Object.keys(agents).length === 0) {
|
|
3294
|
+
const { agents: _3, ...rest } = existing;
|
|
3295
|
+
if (Object.keys(rest).length === 0) {
|
|
3296
|
+
if (existsSync2(configPath)) {
|
|
3297
|
+
await unlink(configPath);
|
|
3298
|
+
}
|
|
3299
|
+
return;
|
|
3300
|
+
}
|
|
3301
|
+
await writeZenoxConfig(rest);
|
|
3302
|
+
return;
|
|
3303
|
+
}
|
|
3292
3304
|
await writeZenoxConfig({
|
|
3293
3305
|
...existing,
|
|
3294
3306
|
agents
|
|
@@ -3310,9 +3322,13 @@ function getDisabledMcps(config) {
|
|
|
3310
3322
|
}
|
|
3311
3323
|
async function updateDisabledMcps(disabledMcps) {
|
|
3312
3324
|
const existing = await readZenoxConfig() ?? {};
|
|
3325
|
+
const configPath = getZenoxConfigPath();
|
|
3313
3326
|
if (disabledMcps.length === 0) {
|
|
3314
3327
|
const { disabled_mcps: _3, ...rest } = existing;
|
|
3315
3328
|
if (Object.keys(rest).length === 0) {
|
|
3329
|
+
if (existsSync2(configPath)) {
|
|
3330
|
+
await unlink(configPath);
|
|
3331
|
+
}
|
|
3316
3332
|
return;
|
|
3317
3333
|
}
|
|
3318
3334
|
await writeZenoxConfig(rest);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zenox",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "OpenCode plugin with specialized agents (explorer, librarian, oracle, ui-planner), background tasks for parallel execution, and smart orchestration",
|
|
5
5
|
"author": "Ayush",
|
|
6
6
|
"license": "MIT",
|