zelari-code 1.0.3 → 1.1.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/README.md +4 -1
- package/dist/cli/app.js +2 -1
- package/dist/cli/app.js.map +1 -1
- package/dist/cli/keyStore.js +1 -0
- package/dist/cli/keyStore.js.map +1 -1
- package/dist/cli/main.bundled.js +100 -48
- package/dist/cli/main.bundled.js.map +3 -3
- package/dist/cli/modelDiscovery.js +2 -0
- package/dist/cli/modelDiscovery.js.map +1 -1
- package/dist/cli/modelPricing.js +4 -0
- package/dist/cli/modelPricing.js.map +1 -1
- package/dist/cli/provider/openai-compatible.js +3 -0
- package/dist/cli/provider/openai-compatible.js.map +1 -1
- package/dist/cli/providerConfig.js +1 -0
- package/dist/cli/providerConfig.js.map +1 -1
- package/dist/cli/slashCommands.js +2 -2
- package/dist/cli/slashCommands.js.map +1 -1
- package/dist/cli/slashHandlers/provider.js +3 -3
- package/dist/cli/slashHandlers/provider.js.map +1 -1
- package/dist/cli/slashHandlers/updater.js +18 -0
- package/dist/cli/slashHandlers/updater.js.map +1 -1
- package/dist/cli/updater.js +83 -5
- package/dist/cli/updater.js.map +1 -1
- package/package.json +2 -2
- package/scripts/postinstall.mjs +131 -0
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ the regular TUI:
|
|
|
83
83
|
The wizard walks you through:
|
|
84
84
|
|
|
85
85
|
1. **Welcome** — overview + how to quit.
|
|
86
|
-
2. **Provider** — pick from `grok`, `minimax`, `glm`, `openai-compatible` (↑/↓ + Enter).
|
|
86
|
+
2. **Provider** — pick from `grok`, `minimax`, `glm`, `deepseek`, `openai-compatible` (↑/↓ + Enter).
|
|
87
87
|
3. **Model** — type a model name or accept the default (Enter).
|
|
88
88
|
4. **API key** — choose `env` (use `GROK_API_KEY` etc.), `keystore` (save locally), or `skip` (set later via `/login`).
|
|
89
89
|
5. **Confirm** — review + Enter to commit.
|
|
@@ -220,8 +220,11 @@ zelari-code (CLI, proprietary)
|
|
|
220
220
|
| `OPENAI_BASE_URL` | Custom OpenAI-compatible endpoint |
|
|
221
221
|
| `GLM_API_KEY` | GLM/Z.AI API key |
|
|
222
222
|
| `GROK_API_KEY` | xAI Grok API key (alternative to OAuth) |
|
|
223
|
+
| `DEEPSEEK_API_KEY` | DeepSeek API key (models auto-discovered; default `deepseek-v4-pro`) |
|
|
224
|
+
| `MINIMAX_API_KEY` | MiniMax API key |
|
|
223
225
|
| `ANATHEMA_DEV=1` | Disable silent update check on startup |
|
|
224
226
|
| `ZELARI_NO_WIZARD=1` | Skip first-run wizard |
|
|
227
|
+
| `ZELARI_NO_SHIM_REPAIR=1` | Disable auto-repair of a missing Windows bin shim on install |
|
|
225
228
|
| `ZELARI_COUNCIL_TIER=lite` | Council with 3 members instead of 6 |
|
|
226
229
|
| `ZELARI_MCP=0` | Disable MCP servers |
|
|
227
230
|
| `ANATHEMA_FAILOVER=0` | Disable cross-provider failover |
|
package/dist/cli/app.js
CHANGED
|
@@ -41,6 +41,7 @@ const providerDefaults = {
|
|
|
41
41
|
'grok': 'grok-4',
|
|
42
42
|
'minimax': 'MiniMax-chat-latest',
|
|
43
43
|
'glm': 'glm-4.5',
|
|
44
|
+
'deepseek': 'deepseek-v4-pro',
|
|
44
45
|
};
|
|
45
46
|
/**
|
|
46
47
|
* App — Ink UI shell (v0.7.0 static-scrollback layout).
|
|
@@ -94,7 +95,7 @@ export function App() {
|
|
|
94
95
|
// tab-completion show current choices without an explicit /discover.
|
|
95
96
|
useEffect(() => {
|
|
96
97
|
const id = activeProviderSpec.id;
|
|
97
|
-
if (!['grok', 'glm', 'minimax', 'openai-compatible'].includes(id))
|
|
98
|
+
if (!['grok', 'glm', 'minimax', 'deepseek', 'openai-compatible'].includes(id))
|
|
98
99
|
return;
|
|
99
100
|
if (!isModelsCacheStale(id))
|
|
100
101
|
return;
|
package/dist/cli/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","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c,EAAE,MAAM,qBAAqB,CAAC;AAErD,yEAAyE;AACzE,kDAAkD;AAClD,KAAK,KAAK,CAAC;AAAC,KAAK,QAAQ,CAAC"}
|
package/dist/cli/keyStore.js
CHANGED
|
@@ -25,6 +25,7 @@ export const PROVIDERS = [
|
|
|
25
25
|
{ id: 'minimax', displayName: 'MiniMax', envVar: 'MINIMAX_API_KEY', baseUrl: 'https://api.minimax.io/v1' },
|
|
26
26
|
{ id: 'glm', displayName: 'GLM / Z.AI', envVar: 'GLM_API_KEY', baseUrl: 'https://api.z.ai/api/coding/paas/v4' },
|
|
27
27
|
{ id: 'grok', displayName: 'xAI Grok', envVar: 'GROK_API_KEY', baseUrl: 'https://api.x.ai/v1' },
|
|
28
|
+
{ id: 'deepseek', displayName: 'DeepSeek', envVar: 'DEEPSEEK_API_KEY', baseUrl: 'https://api.deepseek.com' },
|
|
28
29
|
];
|
|
29
30
|
export function getKeyStorePath() {
|
|
30
31
|
return process.env.ANATHEMA_KEYSTORE_FILE
|
package/dist/cli/keyStore.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyStore.js","sourceRoot":"","sources":["../../src/cli/keyStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC7F,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EACL,cAAc,EACd,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAE9B,4EAA4E;AAC5E,uDAAuD;AACvD,2BAA2B,EAAE,CAAC;AAe9B,MAAM,CAAC,MAAM,SAAS,GAA4B;IAChD,EAAE,EAAE,EAAE,mBAAmB,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,gBAAgB,EAAE;IACvF,EAAE,EAAE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,CAAC;QACvC,IAAI,MAAM,CAAC,SAAS,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;YAC7D,KAAK,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC3D,MAAM,IAAI,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;gBAC3C,IAAI,IAAI;oBAAE,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;YAClC,CAAC;QACH,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/cli/main.bundled.js
CHANGED
|
@@ -560,7 +560,8 @@ var init_keyStore = __esm({
|
|
|
560
560
|
{ id: "openai-compatible", displayName: "OpenAI-compatible", envVar: "OPENAI_API_KEY" },
|
|
561
561
|
{ id: "minimax", displayName: "MiniMax", envVar: "MINIMAX_API_KEY", baseUrl: "https://api.minimax.io/v1" },
|
|
562
562
|
{ id: "glm", displayName: "GLM / Z.AI", envVar: "GLM_API_KEY", baseUrl: "https://api.z.ai/api/coding/paas/v4" },
|
|
563
|
-
{ id: "grok", displayName: "xAI Grok", envVar: "GROK_API_KEY", baseUrl: "https://api.x.ai/v1" }
|
|
563
|
+
{ id: "grok", displayName: "xAI Grok", envVar: "GROK_API_KEY", baseUrl: "https://api.x.ai/v1" },
|
|
564
|
+
{ id: "deepseek", displayName: "DeepSeek", envVar: "DEEPSEEK_API_KEY", baseUrl: "https://api.deepseek.com" }
|
|
564
565
|
];
|
|
565
566
|
defaultRefreshImpl = async (providerId, refreshToken) => {
|
|
566
567
|
const impl = getRefreshImpl(providerId);
|
|
@@ -744,6 +745,7 @@ var init_providerConfig = __esm({
|
|
|
744
745
|
"minimax": "MiniMax-M2.5",
|
|
745
746
|
"glm": "glm-4.6",
|
|
746
747
|
"grok": "grok-4",
|
|
748
|
+
"deepseek": "deepseek-v4-pro",
|
|
747
749
|
"custom": ""
|
|
748
750
|
},
|
|
749
751
|
customEndpoints: {}
|
|
@@ -18928,6 +18930,9 @@ var init_openai_compatible = __esm({
|
|
|
18928
18930
|
// Pay-per-token API users can override with `/provider custom https://api.z.ai/api/paas/v4`.
|
|
18929
18931
|
"glm": "https://api.z.ai/api/coding/paas/v4",
|
|
18930
18932
|
"grok": "https://api.x.ai/v1",
|
|
18933
|
+
// DeepSeek global platform (OpenAI-compatible). Chat → /chat/completions,
|
|
18934
|
+
// discovery → /models against this same host.
|
|
18935
|
+
"deepseek": "https://api.deepseek.com",
|
|
18931
18936
|
"custom": ""
|
|
18932
18937
|
};
|
|
18933
18938
|
}
|
|
@@ -24488,12 +24493,35 @@ __export(updater_exports, {
|
|
|
24488
24493
|
compareSemver: () => compareSemver,
|
|
24489
24494
|
fetchLatestVersion: () => fetchLatestVersion,
|
|
24490
24495
|
getCurrentVersion: () => getCurrentVersion,
|
|
24491
|
-
performUpdate: () => performUpdate
|
|
24496
|
+
performUpdate: () => performUpdate,
|
|
24497
|
+
resolveBundledNpmCli: () => resolveBundledNpmCli
|
|
24492
24498
|
});
|
|
24493
24499
|
import { createRequire } from "node:module";
|
|
24494
24500
|
import { spawn as spawn2 } from "node:child_process";
|
|
24501
|
+
import { existsSync as existsSync15 } from "node:fs";
|
|
24495
24502
|
import path15 from "node:path";
|
|
24496
24503
|
import { fileURLToPath } from "node:url";
|
|
24504
|
+
function resolveBundledNpmCli(execPath = process.execPath) {
|
|
24505
|
+
const dir = path15.dirname(execPath);
|
|
24506
|
+
const candidates = [
|
|
24507
|
+
// Windows: C:\...\node.exe → C:\...\node_modules\npm\bin\npm-cli.js
|
|
24508
|
+
path15.join(dir, "node_modules", "npm", "bin", "npm-cli.js"),
|
|
24509
|
+
// POSIX: <prefix>/bin/node → <prefix>/lib/node_modules/npm/bin/npm-cli.js
|
|
24510
|
+
path15.join(dir, "..", "lib", "node_modules", "npm", "bin", "npm-cli.js")
|
|
24511
|
+
];
|
|
24512
|
+
for (const candidate of candidates) {
|
|
24513
|
+
try {
|
|
24514
|
+
if (existsSync15(candidate)) return candidate;
|
|
24515
|
+
} catch {
|
|
24516
|
+
}
|
|
24517
|
+
}
|
|
24518
|
+
return null;
|
|
24519
|
+
}
|
|
24520
|
+
function looksLikeBrokenShim(exitCode, output) {
|
|
24521
|
+
if (exitCode === 127) return true;
|
|
24522
|
+
const h = output.toLowerCase();
|
|
24523
|
+
return h.includes("shim target not found") || h.includes("is not recognized");
|
|
24524
|
+
}
|
|
24497
24525
|
function getCurrentVersion() {
|
|
24498
24526
|
try {
|
|
24499
24527
|
const pkgPath = path15.resolve(__dirname2, "..", "..", "package.json");
|
|
@@ -24556,13 +24584,27 @@ async function checkForUpdate(fetcher = fetch, registryUrl) {
|
|
|
24556
24584
|
updateAvailable: cmp < 0
|
|
24557
24585
|
};
|
|
24558
24586
|
}
|
|
24559
|
-
async function performUpdate(packageName = "zelari-code", executor = spawn2) {
|
|
24587
|
+
async function performUpdate(packageName = "zelari-code", executor = spawn2, resolveNpmCli = resolveBundledNpmCli) {
|
|
24588
|
+
const args = ["install", "-g", `${packageName}@latest`];
|
|
24589
|
+
const primary = await runNpm(executor, args, "shim");
|
|
24590
|
+
if (primary.ok) return primary;
|
|
24591
|
+
const npmCli = resolveNpmCli();
|
|
24592
|
+
if (npmCli && looksLikeBrokenShim(primary.exitCode, primary.output)) {
|
|
24593
|
+
const fallback = await runNpm(executor, args, "bundled", npmCli);
|
|
24594
|
+
return {
|
|
24595
|
+
...fallback,
|
|
24596
|
+
output: `[update] npm shim failed (${primary.error ?? "exit " + primary.exitCode}); retried via bundled npm (${npmCli}).
|
|
24597
|
+
${fallback.output}`
|
|
24598
|
+
};
|
|
24599
|
+
}
|
|
24600
|
+
return primary;
|
|
24601
|
+
}
|
|
24602
|
+
function runNpm(executor, args, mode, npmCliPath) {
|
|
24560
24603
|
return new Promise((resolve) => {
|
|
24561
|
-
const args = ["install", "-g", `${packageName}@latest`];
|
|
24562
24604
|
let stdout = "";
|
|
24563
24605
|
let stderr = "";
|
|
24564
24606
|
const stdio = ["ignore", "pipe", "pipe"];
|
|
24565
|
-
const child = process.platform === "win32" ? executor(buildCmdLine("npm", args), { stdio, shell: true }) : executor("npm", args, { stdio });
|
|
24607
|
+
const child = mode === "bundled" && npmCliPath ? executor(process.execPath, [npmCliPath, ...args], { stdio }) : process.platform === "win32" ? executor(buildCmdLine("npm", args), { stdio, shell: true }) : executor("npm", args, { stdio });
|
|
24566
24608
|
child.stdout?.on("data", (chunk) => {
|
|
24567
24609
|
stdout += chunk.toString();
|
|
24568
24610
|
});
|
|
@@ -24775,7 +24817,7 @@ __export(mcpManager_exports, {
|
|
|
24775
24817
|
readMcpConfig: () => readMcpConfig,
|
|
24776
24818
|
registerMcpTools: () => registerMcpTools
|
|
24777
24819
|
});
|
|
24778
|
-
import { existsSync as
|
|
24820
|
+
import { existsSync as existsSync16, readFileSync as readFileSync15 } from "node:fs";
|
|
24779
24821
|
import { join as join15 } from "node:path";
|
|
24780
24822
|
import { homedir as homedir4 } from "node:os";
|
|
24781
24823
|
function readMcpConfig(projectRoot = process.cwd()) {
|
|
@@ -24786,7 +24828,7 @@ function readMcpConfig(projectRoot = process.cwd()) {
|
|
|
24786
24828
|
// later = higher precedence
|
|
24787
24829
|
];
|
|
24788
24830
|
for (const p3 of paths) {
|
|
24789
|
-
if (!
|
|
24831
|
+
if (!existsSync16(p3)) continue;
|
|
24790
24832
|
try {
|
|
24791
24833
|
const parsed = JSON.parse(readFileSync15(p3, "utf8"));
|
|
24792
24834
|
for (const [name, cfg] of Object.entries(parsed.mcpServers ?? {})) {
|
|
@@ -24920,11 +24962,11 @@ var planDetect_exports = {};
|
|
|
24920
24962
|
__export(planDetect_exports, {
|
|
24921
24963
|
hasWorkspacePlan: () => hasWorkspacePlan
|
|
24922
24964
|
});
|
|
24923
|
-
import { existsSync as
|
|
24965
|
+
import { existsSync as existsSync17, readFileSync as readFileSync16 } from "node:fs";
|
|
24924
24966
|
import { join as join16 } from "node:path";
|
|
24925
24967
|
function hasWorkspacePlan(projectRoot = process.cwd()) {
|
|
24926
24968
|
const planPath = join16(resolveWorkspaceRoot(projectRoot), "plan.json");
|
|
24927
|
-
if (!
|
|
24969
|
+
if (!existsSync17(planPath)) return false;
|
|
24928
24970
|
try {
|
|
24929
24971
|
const parsed = JSON.parse(readFileSync16(planPath, "utf8"));
|
|
24930
24972
|
return Array.isArray(parsed.phases) && parsed.phases.length > 0;
|
|
@@ -25023,13 +25065,13 @@ __export(agentsMd_exports, {
|
|
|
25023
25065
|
serializeAgentsMd: () => serializeAgentsMd,
|
|
25024
25066
|
updateAgentsMd: () => updateAgentsMd
|
|
25025
25067
|
});
|
|
25026
|
-
import { existsSync as
|
|
25068
|
+
import { existsSync as existsSync18, readFileSync as readFileSync17, writeFileSync as writeFileSync13 } from "node:fs";
|
|
25027
25069
|
import { createHash as createHash2 } from "node:crypto";
|
|
25028
25070
|
import { join as join17 } from "node:path";
|
|
25029
25071
|
import { readFile } from "node:fs/promises";
|
|
25030
25072
|
async function readPackageJson2(projectRoot) {
|
|
25031
25073
|
const path25 = join17(projectRoot, "package.json");
|
|
25032
|
-
if (!
|
|
25074
|
+
if (!existsSync18(path25)) return null;
|
|
25033
25075
|
try {
|
|
25034
25076
|
return JSON.parse(await readFile(path25, "utf8"));
|
|
25035
25077
|
} catch {
|
|
@@ -25054,7 +25096,7 @@ async function genTechStack(ctx) {
|
|
|
25054
25096
|
}
|
|
25055
25097
|
async function genDecisions(ctx) {
|
|
25056
25098
|
const decisionsDir = join17(ctx.rootDir, "decisions");
|
|
25057
|
-
if (!
|
|
25099
|
+
if (!existsSync18(decisionsDir)) return "_No ADRs yet._";
|
|
25058
25100
|
const files = ctx.storage.listMarkdown(decisionsDir).sort();
|
|
25059
25101
|
const accepted = [];
|
|
25060
25102
|
const proposed = [];
|
|
@@ -25080,7 +25122,7 @@ async function genDecisions(ctx) {
|
|
|
25080
25122
|
async function genConventions(ctx) {
|
|
25081
25123
|
const lines = [];
|
|
25082
25124
|
const claudeMd = join17(ctx.projectRoot, "CLAUDE.MD");
|
|
25083
|
-
if (
|
|
25125
|
+
if (existsSync18(claudeMd)) {
|
|
25084
25126
|
const content = readFileSync17(claudeMd, "utf8");
|
|
25085
25127
|
const match = content.match(/## Architecture rules[\s\S]+?(?=\n## |\n*$)/);
|
|
25086
25128
|
if (match) {
|
|
@@ -25114,7 +25156,7 @@ async function genBuild(ctx) {
|
|
|
25114
25156
|
}
|
|
25115
25157
|
async function genOpenQuestions(ctx) {
|
|
25116
25158
|
const path25 = join17(ctx.rootDir, "risks.md");
|
|
25117
|
-
if (!
|
|
25159
|
+
if (!existsSync18(path25)) return "_No open questions._";
|
|
25118
25160
|
const content = readFileSync17(path25, "utf8");
|
|
25119
25161
|
const lines = content.split("\n");
|
|
25120
25162
|
const questions = [];
|
|
@@ -25190,7 +25232,7 @@ function titleCase(id) {
|
|
|
25190
25232
|
}
|
|
25191
25233
|
async function updateAgentsMd(ctx, projectRoot) {
|
|
25192
25234
|
const agentsPath = join17(projectRoot, "AGENTS.MD");
|
|
25193
|
-
if (
|
|
25235
|
+
if (existsSync18(agentsPath)) {
|
|
25194
25236
|
const content = readFileSync17(agentsPath, "utf8");
|
|
25195
25237
|
const hasAnyMarker = AUTO_SECTIONS.some((id) => content.includes(MARKER_OPEN(id)));
|
|
25196
25238
|
if (!hasAnyMarker) {
|
|
@@ -25206,7 +25248,7 @@ async function updateAgentsMd(ctx, projectRoot) {
|
|
|
25206
25248
|
newSections.set(id, await GENERATORS[id](ctx));
|
|
25207
25249
|
}
|
|
25208
25250
|
let manualContent = "";
|
|
25209
|
-
if (
|
|
25251
|
+
if (existsSync18(agentsPath)) {
|
|
25210
25252
|
const { manualBlocks } = parseAgentsMd(readFileSync17(agentsPath, "utf8"));
|
|
25211
25253
|
manualContent = manualBlocks.after;
|
|
25212
25254
|
} else {
|
|
@@ -25223,7 +25265,7 @@ async function updateAgentsMd(ctx, projectRoot) {
|
|
|
25223
25265
|
""
|
|
25224
25266
|
].join("\n");
|
|
25225
25267
|
}
|
|
25226
|
-
const oldContent =
|
|
25268
|
+
const oldContent = existsSync18(agentsPath) ? readFileSync17(agentsPath, "utf8") : "";
|
|
25227
25269
|
const { sections: oldSections } = parseAgentsMd(oldContent);
|
|
25228
25270
|
const changedSections = [];
|
|
25229
25271
|
for (const id of AUTO_SECTIONS) {
|
|
@@ -25361,7 +25403,7 @@ var init_completeDesign = __esm({
|
|
|
25361
25403
|
|
|
25362
25404
|
// src/cli/workspace/projectSmoke.ts
|
|
25363
25405
|
import { spawn as spawn4 } from "node:child_process";
|
|
25364
|
-
import { existsSync as
|
|
25406
|
+
import { existsSync as existsSync19, readFileSync as readFileSync18 } from "node:fs";
|
|
25365
25407
|
import { join as join18 } from "node:path";
|
|
25366
25408
|
function pickSmokeScript(scripts) {
|
|
25367
25409
|
if (!scripts) return null;
|
|
@@ -25375,7 +25417,7 @@ async function runProjectSmoke(projectRoot, timeoutMs = DEFAULT_TIMEOUT_MS) {
|
|
|
25375
25417
|
return { ran: false, reason: "ZELARI_SMOKE=0 (disabled)" };
|
|
25376
25418
|
}
|
|
25377
25419
|
const pkgPath = join18(projectRoot, "package.json");
|
|
25378
|
-
if (!
|
|
25420
|
+
if (!existsSync19(pkgPath)) {
|
|
25379
25421
|
return { ran: false, reason: "no package.json (skipped)" };
|
|
25380
25422
|
}
|
|
25381
25423
|
let scripts = {};
|
|
@@ -25464,7 +25506,7 @@ __export(postCouncilHook_exports, {
|
|
|
25464
25506
|
runPostCouncilHook: () => runPostCouncilHook
|
|
25465
25507
|
});
|
|
25466
25508
|
import { spawn as spawn5 } from "node:child_process";
|
|
25467
|
-
import { existsSync as
|
|
25509
|
+
import { existsSync as existsSync20, readFileSync as readFileSync19 } from "node:fs";
|
|
25468
25510
|
import { join as join19 } from "node:path";
|
|
25469
25511
|
async function runCompleteDesignPostProcessor(ctx, options) {
|
|
25470
25512
|
if (options?.runMode === "implementation") {
|
|
@@ -25478,7 +25520,7 @@ async function runCompleteDesignPostProcessor(ctx, options) {
|
|
|
25478
25520
|
}
|
|
25479
25521
|
const planJsonPath2 = join19(ctx.rootDir, "plan.json");
|
|
25480
25522
|
const scriptPath = join19(ctx.projectRoot, "complete-design.mjs");
|
|
25481
|
-
if (!
|
|
25523
|
+
if (!existsSync20(planJsonPath2)) {
|
|
25482
25524
|
return {
|
|
25483
25525
|
ran: false,
|
|
25484
25526
|
reason: ".zelari/plan.json missing (not design-phase)"
|
|
@@ -25494,7 +25536,7 @@ async function runCompleteDesignPostProcessor(ctx, options) {
|
|
|
25494
25536
|
if (phaseCount === 0) {
|
|
25495
25537
|
return { ran: false, reason: ".zelari/plan.json has no phases" };
|
|
25496
25538
|
}
|
|
25497
|
-
if (!
|
|
25539
|
+
if (!existsSync20(scriptPath)) {
|
|
25498
25540
|
try {
|
|
25499
25541
|
const builtin = await runBuiltinCompleteDesign(ctx);
|
|
25500
25542
|
return {
|
|
@@ -25715,12 +25757,12 @@ var buildLessonsSummary_exports = {};
|
|
|
25715
25757
|
__export(buildLessonsSummary_exports, {
|
|
25716
25758
|
buildLessonsSummary: () => buildLessonsSummary
|
|
25717
25759
|
});
|
|
25718
|
-
import { existsSync as
|
|
25760
|
+
import { existsSync as existsSync21 } from "node:fs";
|
|
25719
25761
|
import { join as join20 } from "node:path";
|
|
25720
25762
|
function buildLessonsSummary(projectRoot = process.cwd(), taskText) {
|
|
25721
25763
|
if (process.env["ZELARI_LESSONS"] === "0") return null;
|
|
25722
25764
|
const zelariRoot = resolveWorkspaceRoot(projectRoot);
|
|
25723
|
-
if (!
|
|
25765
|
+
if (!existsSync21(join20(zelariRoot, "lessons.jsonl"))) return null;
|
|
25724
25766
|
const lessons = recallLessons(zelariRoot, {
|
|
25725
25767
|
maxLessons: 5,
|
|
25726
25768
|
maxBytes: 2048,
|
|
@@ -25743,7 +25785,7 @@ __export(councilFeedback_exports, {
|
|
|
25743
25785
|
});
|
|
25744
25786
|
import {
|
|
25745
25787
|
promises as fs12,
|
|
25746
|
-
existsSync as
|
|
25788
|
+
existsSync as existsSync22,
|
|
25747
25789
|
readFileSync as readFileSync20,
|
|
25748
25790
|
writeFileSync as writeFileSync14,
|
|
25749
25791
|
mkdirSync as mkdirSync9
|
|
@@ -25852,7 +25894,7 @@ var init_councilFeedback = __esm({
|
|
|
25852
25894
|
}
|
|
25853
25895
|
// --- persistence ---------------------------------------------------------
|
|
25854
25896
|
load() {
|
|
25855
|
-
if (!
|
|
25897
|
+
if (!existsSync22(this.file)) return;
|
|
25856
25898
|
try {
|
|
25857
25899
|
const raw = readFileSync20(this.file, "utf-8");
|
|
25858
25900
|
const parsed = JSON.parse(raw);
|
|
@@ -26173,7 +26215,7 @@ __export(doctor_exports, {
|
|
|
26173
26215
|
runDoctor: () => runDoctor
|
|
26174
26216
|
});
|
|
26175
26217
|
import { execSync } from "node:child_process";
|
|
26176
|
-
import { existsSync as
|
|
26218
|
+
import { existsSync as existsSync27, readFileSync as readFileSync23, readlinkSync, statSync as statSync6 } from "node:fs";
|
|
26177
26219
|
import { createRequire as createRequire2 } from "node:module";
|
|
26178
26220
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
26179
26221
|
import path24 from "node:path";
|
|
@@ -26181,7 +26223,7 @@ function findPackageRoot(start) {
|
|
|
26181
26223
|
let dir = start;
|
|
26182
26224
|
for (let i = 0; i < 6; i += 1) {
|
|
26183
26225
|
const candidate = path24.join(dir, "package.json");
|
|
26184
|
-
if (
|
|
26226
|
+
if (existsSync27(candidate)) {
|
|
26185
26227
|
try {
|
|
26186
26228
|
const pkg = JSON.parse(readFileSync23(candidate, "utf8"));
|
|
26187
26229
|
if (pkg.name === "zelari-code") return dir;
|
|
@@ -26223,7 +26265,7 @@ function checkShim(pkgName) {
|
|
|
26223
26265
|
const isWin = process.platform === "win32";
|
|
26224
26266
|
const shimName = isWin ? "zelari-code.cmd" : "zelari-code";
|
|
26225
26267
|
const shimPath = path24.join(prefix, shimName);
|
|
26226
|
-
if (!
|
|
26268
|
+
if (!existsSync27(shimPath)) {
|
|
26227
26269
|
return FAIL(
|
|
26228
26270
|
`shim not found at ${shimPath}
|
|
26229
26271
|
fix: npm install -g ${pkgName}@latest --force`
|
|
@@ -26291,7 +26333,7 @@ function checkNode(pkg) {
|
|
|
26291
26333
|
}
|
|
26292
26334
|
function checkBundle() {
|
|
26293
26335
|
const bundle = path24.join(packageRoot, "dist", "cli", "main.bundled.js");
|
|
26294
|
-
if (!
|
|
26336
|
+
if (!existsSync27(bundle)) {
|
|
26295
26337
|
return FAIL(
|
|
26296
26338
|
`dist/cli/main.bundled.js missing at ${bundle}
|
|
26297
26339
|
fix: npm run build:cli (then reinstall or run via tsx)`
|
|
@@ -26965,6 +27007,8 @@ var PROVIDER_BASE_URLS = {
|
|
|
26965
27007
|
// Must match PROVIDER_ENDPOINTS in provider/openai-compatible.ts (chat host).
|
|
26966
27008
|
"glm": "https://api.z.ai/api/coding/paas/v4",
|
|
26967
27009
|
"minimax": "https://api.minimax.io/v1",
|
|
27010
|
+
// Must match PROVIDER_ENDPOINTS in provider/openai-compatible.ts (chat host).
|
|
27011
|
+
"deepseek": "https://api.deepseek.com",
|
|
26968
27012
|
"openai-compatible": "https://api.x.ai/v1"
|
|
26969
27013
|
};
|
|
26970
27014
|
async function resolveDiscoveryBaseUrl(provider, options) {
|
|
@@ -30347,6 +30391,10 @@ var PRICES_PER_MILLION = {
|
|
|
30347
30391
|
"MiniMax-M2.5": { input: 0.2, output: 1.1 },
|
|
30348
30392
|
"MiniMax-M2": { input: 0.2, output: 1.1 },
|
|
30349
30393
|
"MiniMax-M2-her": { input: 0.3, output: 1.2 },
|
|
30394
|
+
// DeepSeek (global platform) — estimated list prices; override via
|
|
30395
|
+
// ANATHEMA_PRICE_DEEPSEEK_V4_FLASH / ANATHEMA_PRICE_DEEPSEEK_V4_PRO.
|
|
30396
|
+
"deepseek-v4-flash": { input: 0.14, output: 0.28 },
|
|
30397
|
+
"deepseek-v4-pro": { input: 0.55, output: 2.19 },
|
|
30350
30398
|
// OpenAI (for openai-compatible fallback)
|
|
30351
30399
|
"gpt-4o": { input: 2.5, output: 10 },
|
|
30352
30400
|
"gpt-4o-mini": { input: 0.15, output: 0.6 },
|
|
@@ -31394,14 +31442,14 @@ ${formatSkillList(availableSkills)}`
|
|
|
31394
31442
|
return {
|
|
31395
31443
|
handled: true,
|
|
31396
31444
|
kind: "provider_picker",
|
|
31397
|
-
message: "Usage: /provider \u2014 pick from a list\n /provider <name> \u2014 switch active provider\n /provider list \u2014 print the current provider + available ids\n /provider custom <baseUrl> \u2014 set custom base URL (Ollama, LM Studio, vLLM, ...)\n /provider custom clear \u2014 clear the custom override\n /provider <name> refresh \u2014 force token refresh (v3-F)\n /provider <name> status \u2014 show key source, expiry, refresh impl (v3-F)\nAvailable: openai-compatible, minimax, glm, grok, custom"
|
|
31445
|
+
message: "Usage: /provider \u2014 pick from a list\n /provider <name> \u2014 switch active provider\n /provider list \u2014 print the current provider + available ids\n /provider custom <baseUrl> \u2014 set custom base URL (Ollama, LM Studio, vLLM, ...)\n /provider custom clear \u2014 clear the custom override\n /provider <name> refresh \u2014 force token refresh (v3-F)\n /provider <name> status \u2014 show key source, expiry, refresh impl (v3-F)\nAvailable: openai-compatible, minimax, glm, grok, deepseek, custom"
|
|
31398
31446
|
};
|
|
31399
31447
|
}
|
|
31400
31448
|
if (subcommand === "list") {
|
|
31401
31449
|
return {
|
|
31402
31450
|
handled: true,
|
|
31403
31451
|
kind: "provider_list",
|
|
31404
|
-
message: "Usage: /provider <name> \u2014 switch active provider\nAvailable: openai-compatible, minimax, glm, grok, custom"
|
|
31452
|
+
message: "Usage: /provider <name> \u2014 switch active provider\nAvailable: openai-compatible, minimax, glm, grok, deepseek, custom"
|
|
31405
31453
|
};
|
|
31406
31454
|
}
|
|
31407
31455
|
if (subcommand === "custom") {
|
|
@@ -31949,6 +31997,9 @@ ${output}`.toLowerCase();
|
|
|
31949
31997
|
if (haystack.includes("eacces") || haystack.includes("eperm")) {
|
|
31950
31998
|
return "\u{1F4A1} hint: permission denied. On macOS/Linux, avoid sudo with npm:\n https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally\n On Windows, re-run the terminal as Administrator.";
|
|
31951
31999
|
}
|
|
32000
|
+
if (haystack.includes("shim target not found") || haystack.includes("is not recognized") || exitCode === 127) {
|
|
32001
|
+
return '\u{1F4A1} hint: `npm` could not be launched \u2014 its bin shim is broken.\n "Shim target not found: npm.cmd" / exit 127 means a Node version\n manager (Volta, nvm-windows, fnm) has a stale npm shim, so npm\n itself won\'t run until you repair it:\n \u2022 Volta: volta install node (reinstalls node + npm shims)\n \u2022 nvm-windows: nvm use <version> (re-links node + npm)\n \u2022 fnm: fnm use --install-if-missing\n Then verify with `npm --version`, and re-run `/update --yes`.\n (zelari-code retried automatically via the npm bundled with your\n Node; if you still see this, that bundled npm was unavailable too.)';
|
|
32002
|
+
}
|
|
31952
32003
|
if (haystack.includes("enoent") && haystack.includes("npm")) {
|
|
31953
32004
|
return '\u{1F4A1} hint: `npm` was not found on PATH for the spawned shell.\n Re-open the terminal so it picks up your current PATH, or set:\n export PATH="$(npm prefix -g)/bin:$PATH" (POSIX)\n $env:Path = "$(npm prefix -g);$env:Path" (PowerShell)';
|
|
31954
32005
|
}
|
|
@@ -31985,7 +32036,7 @@ async function handlePromoteMember(ctx, memberId) {
|
|
|
31985
32036
|
}
|
|
31986
32037
|
|
|
31987
32038
|
// src/cli/branchManager.ts
|
|
31988
|
-
import { promises as fs16, existsSync as
|
|
32039
|
+
import { promises as fs16, existsSync as existsSync23, readFileSync as readFileSync21, writeFileSync as writeFileSync15, mkdirSync as mkdirSync10, statSync as statSync4, rmSync } from "node:fs";
|
|
31989
32040
|
import path21 from "node:path";
|
|
31990
32041
|
import os9 from "node:os";
|
|
31991
32042
|
var META_FILENAME = "meta.json";
|
|
@@ -32007,7 +32058,7 @@ function sessionsPathFor(name, baseDir) {
|
|
|
32007
32058
|
}
|
|
32008
32059
|
function readBranchMeta(name, baseDir) {
|
|
32009
32060
|
const metaPath = metaPathFor(name, baseDir);
|
|
32010
|
-
if (!
|
|
32061
|
+
if (!existsSync23(metaPath)) {
|
|
32011
32062
|
throw new BranchNotFoundError(`Branch "${name}" not found`);
|
|
32012
32063
|
}
|
|
32013
32064
|
try {
|
|
@@ -32067,7 +32118,7 @@ var SessionNotFoundError = class extends Error {
|
|
|
32067
32118
|
};
|
|
32068
32119
|
function branchExists(name, baseDir = getBranchesBaseDir()) {
|
|
32069
32120
|
const bp = branchPathFor(name, baseDir);
|
|
32070
|
-
return
|
|
32121
|
+
return existsSync23(bp) && existsSync23(metaPathFor(name, baseDir));
|
|
32071
32122
|
}
|
|
32072
32123
|
async function createBranch(name, fromSessionId, baseDir = getBranchesBaseDir(), sessionsBaseDir = getSessionsBaseDir()) {
|
|
32073
32124
|
if (!name || name.trim().length === 0) {
|
|
@@ -32080,7 +32131,7 @@ async function createBranch(name, fromSessionId, baseDir = getBranchesBaseDir(),
|
|
|
32080
32131
|
throw new BranchAlreadyExistsError(name);
|
|
32081
32132
|
}
|
|
32082
32133
|
const sourcePath = path21.join(sessionsBaseDir, `${fromSessionId}.jsonl`);
|
|
32083
|
-
if (!
|
|
32134
|
+
if (!existsSync23(sourcePath)) {
|
|
32084
32135
|
throw new SessionNotFoundError(`Source session "${fromSessionId}" not found at ${sourcePath}`);
|
|
32085
32136
|
}
|
|
32086
32137
|
const branchPath = branchPathFor(name, baseDir);
|
|
@@ -32113,7 +32164,7 @@ async function listBranches(baseDir = getBranchesBaseDir()) {
|
|
|
32113
32164
|
const results = [];
|
|
32114
32165
|
for (const entry of entries) {
|
|
32115
32166
|
const metaPath = metaPathFor(entry, baseDir);
|
|
32116
|
-
if (!
|
|
32167
|
+
if (!existsSync23(metaPath)) continue;
|
|
32117
32168
|
try {
|
|
32118
32169
|
const meta3 = readBranchMeta(entry, baseDir);
|
|
32119
32170
|
const sessionCount = await countSessions(entry, baseDir);
|
|
@@ -32349,15 +32400,15 @@ async function validateApiKey(providerId, apiKey, options = {}) {
|
|
|
32349
32400
|
|
|
32350
32401
|
// src/cli/slashHandlers/provider.ts
|
|
32351
32402
|
init_providerConfig();
|
|
32352
|
-
var UNKNOWN_PROVIDER_MSG = (id) => `[provider] unknown: ${id}. Available: openai-compatible, minimax, glm, grok, custom`;
|
|
32353
|
-
var DISCOVERABLE_PROVIDERS = ["grok", "glm", "minimax", "openai-compatible"];
|
|
32403
|
+
var UNKNOWN_PROVIDER_MSG = (id) => `[provider] unknown: ${id}. Available: openai-compatible, minimax, glm, grok, deepseek, custom`;
|
|
32404
|
+
var DISCOVERABLE_PROVIDERS = ["grok", "glm", "minimax", "deepseek", "openai-compatible"];
|
|
32354
32405
|
function handleProviderList(ctx) {
|
|
32355
32406
|
const list = getActiveProvider();
|
|
32356
32407
|
const customEp = getCustomEndpoint(list.id);
|
|
32357
32408
|
const epHint = customEp ? ` \u2014 custom endpoint: ${customEp}` : "";
|
|
32358
32409
|
appendSystem(
|
|
32359
32410
|
ctx.setMessages,
|
|
32360
|
-
`[provider] current: ${list.displayName} (model: ${ctx.activeModel})${epHint} \u2014 available: openai-compatible, minimax, glm, grok, custom`
|
|
32411
|
+
`[provider] current: ${list.displayName} (model: ${ctx.activeModel})${epHint} \u2014 available: openai-compatible, minimax, glm, grok, deepseek, custom`
|
|
32361
32412
|
);
|
|
32362
32413
|
}
|
|
32363
32414
|
function handleProviderSet(ctx, providerId) {
|
|
@@ -32649,7 +32700,7 @@ import path23 from "node:path";
|
|
|
32649
32700
|
import os10 from "node:os";
|
|
32650
32701
|
|
|
32651
32702
|
// src/cli/skillHistory.ts
|
|
32652
|
-
import { promises as fs18, existsSync as
|
|
32703
|
+
import { promises as fs18, existsSync as existsSync24, statSync as statSync5, renameSync as renameSync4, appendFileSync as appendFileSync3, mkdirSync as mkdirSync11 } from "node:fs";
|
|
32653
32704
|
var SKILL_HISTORY_ROTATE_BYTES = 10 * 1024 * 1024;
|
|
32654
32705
|
async function readSkillHistory(file2) {
|
|
32655
32706
|
let raw = "";
|
|
@@ -33236,7 +33287,8 @@ var providerDefaults = {
|
|
|
33236
33287
|
"openai-compatible": "grok-4",
|
|
33237
33288
|
"grok": "grok-4",
|
|
33238
33289
|
"minimax": "MiniMax-chat-latest",
|
|
33239
|
-
"glm": "glm-4.5"
|
|
33290
|
+
"glm": "glm-4.5",
|
|
33291
|
+
"deepseek": "deepseek-v4-pro"
|
|
33240
33292
|
};
|
|
33241
33293
|
function App() {
|
|
33242
33294
|
const [input, setInput] = useState8("");
|
|
@@ -33266,7 +33318,7 @@ function App() {
|
|
|
33266
33318
|
);
|
|
33267
33319
|
useEffect7(() => {
|
|
33268
33320
|
const id = activeProviderSpec.id;
|
|
33269
|
-
if (!["grok", "glm", "minimax", "openai-compatible"].includes(id)) return;
|
|
33321
|
+
if (!["grok", "glm", "minimax", "deepseek", "openai-compatible"].includes(id)) return;
|
|
33270
33322
|
if (!isModelsCacheStale(id)) return;
|
|
33271
33323
|
discoverModelsInBackground(id, {});
|
|
33272
33324
|
}, []);
|
|
@@ -33551,9 +33603,9 @@ function SplashGate({
|
|
|
33551
33603
|
init_providerConfig();
|
|
33552
33604
|
|
|
33553
33605
|
// src/cli/wizard/firstRun.ts
|
|
33554
|
-
import { existsSync as
|
|
33606
|
+
import { existsSync as existsSync25 } from "node:fs";
|
|
33555
33607
|
function shouldRunWizard(input) {
|
|
33556
|
-
const exists = input.exists ??
|
|
33608
|
+
const exists = input.exists ?? existsSync25;
|
|
33557
33609
|
if (input.hasResetConfigFlag) {
|
|
33558
33610
|
return { shouldRun: true, reason: "--reset-config flag forced wizard" };
|
|
33559
33611
|
}
|
|
@@ -34042,7 +34094,7 @@ async function runHeadlessCouncil(opts, provider, model, providerStream) {
|
|
|
34042
34094
|
|
|
34043
34095
|
// src/cli/skillsMd.ts
|
|
34044
34096
|
init_skills2();
|
|
34045
|
-
import { existsSync as
|
|
34097
|
+
import { existsSync as existsSync26, readdirSync as readdirSync4, readFileSync as readFileSync22 } from "node:fs";
|
|
34046
34098
|
import { join as join23 } from "node:path";
|
|
34047
34099
|
import { homedir as homedir5 } from "node:os";
|
|
34048
34100
|
var CODING_CATEGORIES = /* @__PURE__ */ new Set([
|
|
@@ -34120,7 +34172,7 @@ function loadSkillMdSkills(projectRoot = process.cwd(), options = {}) {
|
|
|
34120
34172
|
const summary = { loaded: [], skipped: [] };
|
|
34121
34173
|
const seen = new Set(options.existingIds ?? []);
|
|
34122
34174
|
for (const dir of skillMdSearchDirs(projectRoot)) {
|
|
34123
|
-
if (!
|
|
34175
|
+
if (!existsSync26(dir)) continue;
|
|
34124
34176
|
let entries;
|
|
34125
34177
|
try {
|
|
34126
34178
|
entries = readdirSync4(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name);
|
|
@@ -34129,7 +34181,7 @@ function loadSkillMdSkills(projectRoot = process.cwd(), options = {}) {
|
|
|
34129
34181
|
}
|
|
34130
34182
|
for (const entry of entries) {
|
|
34131
34183
|
const skillPath = join23(dir, entry, "SKILL.md");
|
|
34132
|
-
if (!
|
|
34184
|
+
if (!existsSync26(skillPath)) continue;
|
|
34133
34185
|
try {
|
|
34134
34186
|
const parsed = parseSkillMd(readFileSync22(skillPath, "utf8"), skillPath);
|
|
34135
34187
|
if (!parsed) {
|