zelari-code 1.17.1 → 1.18.0
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/browser/driver.js +5 -1
- package/dist/cli/browser/driver.js.map +1 -1
- package/dist/cli/main.bundled.js +343 -12
- package/dist/cli/main.bundled.js.map +4 -4
- package/dist/cli/main.js +13 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/plugins/cliFlags.js +91 -0
- package/dist/cli/plugins/cliFlags.js.map +1 -0
- package/dist/cli/plugins/installer.js +73 -11
- package/dist/cli/plugins/installer.js.map +1 -1
- package/package.json +2 -2
|
@@ -90,7 +90,11 @@ export async function runBrowserCheck(options, loader) {
|
|
|
90
90
|
if (!pw) {
|
|
91
91
|
return {
|
|
92
92
|
...base,
|
|
93
|
-
error: 'browser automation unavailable —
|
|
93
|
+
error: 'browser automation unavailable — Playwright is not installed in this workspace. ' +
|
|
94
|
+
'Install it with: `zelari-code --plugins-install playwright --cwd .` ' +
|
|
95
|
+
'(or Desktop banner “Install”, or CLI `/plugins install playwright`, or ' +
|
|
96
|
+
'`npm i -D playwright && npx playwright install chromium`). ' +
|
|
97
|
+
'Then re-run browser_check.',
|
|
94
98
|
};
|
|
95
99
|
}
|
|
96
100
|
const timeout = options.timeoutMs ?? 15_000;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../../src/cli/browser/driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAiEzC,0EAA0E;AAC1E,SAAS,YAAY,CAAC,GAAY;IAChC,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACjD,MAAM,CA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AG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IAC9E,CAAC;YAAS,CAAC;QACT,IAAI,CAAC;YACH,MAAM,OAAO,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;QAAC,MAAM,CAAC;YACP,YAAY;QACd,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/cli/main.bundled.js
CHANGED
|
@@ -18415,6 +18415,7 @@ Earlier members' outputs are shared context. Build on them; do not re-derive or
|
|
|
18415
18415
|
- Pass complete, valid arguments. Required parameters must be present.
|
|
18416
18416
|
- Prefer tools over asking the user to paste file contents.
|
|
18417
18417
|
- After durable changes, briefly name what you created or modified.
|
|
18418
|
+
- **Act, don't narrate**: if you will edit/fix files, call the tools in this turn. Do not restate the same diagnosis or "I will fix\u2026" plan on a loop without tool calls.
|
|
18418
18419
|
- Text-only tool blocks (\`---TOOLS---\` JSON) are a legacy fallback \u2014 use them only if the runtime has no native tool channel.`
|
|
18419
18420
|
};
|
|
18420
18421
|
CODING_PRACTICES_MODULE = {
|
|
@@ -18429,7 +18430,8 @@ Earlier members' outputs are shared context. Build on them; do not re-derive or
|
|
|
18429
18430
|
- **Don't invent**: no fake APIs, deps, or config keys \u2014 discover from the tree or package manifests.
|
|
18430
18431
|
- **Verify**: after non-trivial edits, run the project's tests/typecheck/build when available; fix failures you introduced.
|
|
18431
18432
|
- **Use project scripts**: prefer package.json / Makefile / existing tooling over ad-hoc commands.
|
|
18432
|
-
- **Finish**: list the paths you wrote/edited and how to verify. If you wrote nothing, say so honestly \u2014 do not invent a done report
|
|
18433
|
+
- **Finish**: list the paths you wrote/edited and how to verify. If you wrote nothing, say so honestly \u2014 do not invent a done report.
|
|
18434
|
+
- **No spam**: never repeat the same paragraph or status line. One diagnosis, then tools (or one short final answer).`
|
|
18433
18435
|
};
|
|
18434
18436
|
CLARIFICATION_PROTOCOL_MODULE = {
|
|
18435
18437
|
type: "custom",
|
|
@@ -19124,6 +19126,159 @@ var init_events = __esm({
|
|
|
19124
19126
|
}
|
|
19125
19127
|
});
|
|
19126
19128
|
|
|
19129
|
+
// packages/core/dist/core/textLoopDetect.js
|
|
19130
|
+
function normalizeLoopUnit(s) {
|
|
19131
|
+
return s.replace(/<\/?small>/gi, "").replace(/<\/?(?:p|div|span|b|i|em|strong|br)\b[^>]*>/gi, "").replace(/\s+/g, " ").trim();
|
|
19132
|
+
}
|
|
19133
|
+
function detectChunkSequenceLoop(chunks, kind) {
|
|
19134
|
+
if (chunks.length < MIN_REPEATS)
|
|
19135
|
+
return { looping: false };
|
|
19136
|
+
const maxK = Math.min(12, Math.floor(chunks.length / MIN_REPEATS));
|
|
19137
|
+
for (let k = 1; k <= maxK; k++) {
|
|
19138
|
+
const unitParts = chunks.slice(chunks.length - k);
|
|
19139
|
+
const unitKey = unitParts.join("\n");
|
|
19140
|
+
if (normalizeLoopUnit(unitKey).length < MIN_UNIT)
|
|
19141
|
+
continue;
|
|
19142
|
+
let count = 1;
|
|
19143
|
+
let pos = chunks.length - k;
|
|
19144
|
+
while (pos - k >= 0) {
|
|
19145
|
+
const prev2 = chunks.slice(pos - k, pos);
|
|
19146
|
+
let same = true;
|
|
19147
|
+
for (let i = 0; i < k; i++) {
|
|
19148
|
+
if (prev2[i] !== unitParts[i]) {
|
|
19149
|
+
same = false;
|
|
19150
|
+
break;
|
|
19151
|
+
}
|
|
19152
|
+
}
|
|
19153
|
+
if (!same)
|
|
19154
|
+
break;
|
|
19155
|
+
count++;
|
|
19156
|
+
pos -= k;
|
|
19157
|
+
}
|
|
19158
|
+
if (count >= MIN_REPEATS) {
|
|
19159
|
+
return {
|
|
19160
|
+
looping: true,
|
|
19161
|
+
unit: unitKey,
|
|
19162
|
+
count,
|
|
19163
|
+
kind
|
|
19164
|
+
};
|
|
19165
|
+
}
|
|
19166
|
+
}
|
|
19167
|
+
return { looping: false };
|
|
19168
|
+
}
|
|
19169
|
+
function detectSuffixPeriod(text) {
|
|
19170
|
+
const compact = text.replace(/\s+/g, " ").trim();
|
|
19171
|
+
if (compact.length < MIN_UNIT * MIN_REPEATS)
|
|
19172
|
+
return { looping: false };
|
|
19173
|
+
const tail = compact.slice(-Math.min(compact.length, MAX_TAIL));
|
|
19174
|
+
const maxP = Math.min(MAX_PERIOD, Math.floor(tail.length / MIN_REPEATS));
|
|
19175
|
+
for (let period = MIN_UNIT; period <= maxP; period++) {
|
|
19176
|
+
const need = period * MIN_REPEATS;
|
|
19177
|
+
if (tail.length < need)
|
|
19178
|
+
continue;
|
|
19179
|
+
const unit = tail.slice(tail.length - period);
|
|
19180
|
+
if (normalizeLoopUnit(unit).length < MIN_UNIT * 0.55)
|
|
19181
|
+
continue;
|
|
19182
|
+
let ok = true;
|
|
19183
|
+
for (let r = 1; r < MIN_REPEATS; r++) {
|
|
19184
|
+
const start = tail.length - period * (r + 1);
|
|
19185
|
+
if (tail.slice(start, start + period) !== unit) {
|
|
19186
|
+
ok = false;
|
|
19187
|
+
break;
|
|
19188
|
+
}
|
|
19189
|
+
}
|
|
19190
|
+
if (!ok)
|
|
19191
|
+
continue;
|
|
19192
|
+
let count = MIN_REPEATS;
|
|
19193
|
+
let end = tail.length - period * MIN_REPEATS;
|
|
19194
|
+
while (end >= period && tail.slice(end - period, end) === unit) {
|
|
19195
|
+
count++;
|
|
19196
|
+
end -= period;
|
|
19197
|
+
}
|
|
19198
|
+
return {
|
|
19199
|
+
looping: true,
|
|
19200
|
+
unit,
|
|
19201
|
+
count,
|
|
19202
|
+
kind: "suffix"
|
|
19203
|
+
};
|
|
19204
|
+
}
|
|
19205
|
+
return { looping: false };
|
|
19206
|
+
}
|
|
19207
|
+
function detectAssistantTextLoop(text) {
|
|
19208
|
+
if (!text || text.length < MIN_UNIT * MIN_REPEATS) {
|
|
19209
|
+
return { looping: false };
|
|
19210
|
+
}
|
|
19211
|
+
const nl = text.replace(/\r\n/g, "\n");
|
|
19212
|
+
const paragraphs = nl.split(/\n\s*\n+/).map((p3) => normalizeLoopUnit(p3)).filter((p3) => p3.length > 0);
|
|
19213
|
+
const paraHit = detectChunkSequenceLoop(paragraphs, "paragraph");
|
|
19214
|
+
if (paraHit.looping)
|
|
19215
|
+
return paraHit;
|
|
19216
|
+
const lines = nl.split("\n").map((l) => normalizeLoopUnit(l)).filter((l) => l.length > 0);
|
|
19217
|
+
const lineHit = detectChunkSequenceLoop(lines, "line");
|
|
19218
|
+
if (lineHit.looping)
|
|
19219
|
+
return lineHit;
|
|
19220
|
+
return detectSuffixPeriod(nl);
|
|
19221
|
+
}
|
|
19222
|
+
function collapseLoopedAssistantText(text) {
|
|
19223
|
+
const hit = detectAssistantTextLoop(text);
|
|
19224
|
+
if (!hit.looping)
|
|
19225
|
+
return text;
|
|
19226
|
+
const note = `
|
|
19227
|
+
|
|
19228
|
+
[system: stopped repeating the same text \xD7${hit.count}; call tools or finish.]`;
|
|
19229
|
+
if (hit.kind === "paragraph" || hit.kind === "line") {
|
|
19230
|
+
const joinSep = hit.kind === "paragraph" ? "\n\n" : "\n";
|
|
19231
|
+
const unitParts = hit.unit.split("\n").map((p3) => normalizeLoopUnit(p3));
|
|
19232
|
+
const k = unitParts.length;
|
|
19233
|
+
if (k === 0)
|
|
19234
|
+
return text + note;
|
|
19235
|
+
const rawParts = text.replace(/\r\n/g, "\n").split(hit.kind === "paragraph" ? /\n\s*\n+/ : /\n/).filter((p3) => normalizeLoopUnit(p3).length > 0);
|
|
19236
|
+
if (rawParts.length < k * MIN_REPEATS) {
|
|
19237
|
+
return collapseByCharBudget(text, hit.unit, hit.count) + note;
|
|
19238
|
+
}
|
|
19239
|
+
let trailBlocks = 0;
|
|
19240
|
+
let pos = rawParts.length;
|
|
19241
|
+
while (pos >= k) {
|
|
19242
|
+
let same = true;
|
|
19243
|
+
for (let i = 0; i < k; i++) {
|
|
19244
|
+
if (normalizeLoopUnit(rawParts[pos - k + i]) !== unitParts[i]) {
|
|
19245
|
+
same = false;
|
|
19246
|
+
break;
|
|
19247
|
+
}
|
|
19248
|
+
}
|
|
19249
|
+
if (!same)
|
|
19250
|
+
break;
|
|
19251
|
+
trailBlocks++;
|
|
19252
|
+
pos -= k;
|
|
19253
|
+
}
|
|
19254
|
+
if (trailBlocks < MIN_REPEATS) {
|
|
19255
|
+
return collapseByCharBudget(text, hit.unit, hit.count) + note;
|
|
19256
|
+
}
|
|
19257
|
+
const keepBlocks = 2;
|
|
19258
|
+
const keepParts = rawParts.slice(0, rawParts.length - k * (trailBlocks - keepBlocks));
|
|
19259
|
+
return keepParts.join(joinSep).trimEnd() + note;
|
|
19260
|
+
}
|
|
19261
|
+
return collapseByCharBudget(text, hit.unit, hit.count) + note;
|
|
19262
|
+
}
|
|
19263
|
+
function collapseByCharBudget(text, unit, count) {
|
|
19264
|
+
const unitLen = Math.max(unit.length, MIN_UNIT);
|
|
19265
|
+
if (count < MIN_REPEATS)
|
|
19266
|
+
return text;
|
|
19267
|
+
const drop = unitLen * (count - 2);
|
|
19268
|
+
const cut = Math.max(0, text.length - drop);
|
|
19269
|
+
return text.slice(0, cut).trimEnd();
|
|
19270
|
+
}
|
|
19271
|
+
var MIN_UNIT, MIN_REPEATS, MAX_TAIL, MAX_PERIOD;
|
|
19272
|
+
var init_textLoopDetect = __esm({
|
|
19273
|
+
"packages/core/dist/core/textLoopDetect.js"() {
|
|
19274
|
+
"use strict";
|
|
19275
|
+
MIN_UNIT = 48;
|
|
19276
|
+
MIN_REPEATS = 3;
|
|
19277
|
+
MAX_TAIL = 6e3;
|
|
19278
|
+
MAX_PERIOD = 600;
|
|
19279
|
+
}
|
|
19280
|
+
});
|
|
19281
|
+
|
|
19127
19282
|
// packages/core/dist/core/AgentHarness.js
|
|
19128
19283
|
function hashToolCall(toolName, args) {
|
|
19129
19284
|
const canonical = stableStringify(args);
|
|
@@ -19362,6 +19517,8 @@ var init_AgentHarness = __esm({
|
|
|
19362
19517
|
"packages/core/dist/core/AgentHarness.js"() {
|
|
19363
19518
|
"use strict";
|
|
19364
19519
|
init_events();
|
|
19520
|
+
init_textLoopDetect();
|
|
19521
|
+
init_textLoopDetect();
|
|
19365
19522
|
AgentHarness = class {
|
|
19366
19523
|
config;
|
|
19367
19524
|
eventBus;
|
|
@@ -19811,6 +19968,7 @@ ${shared2.content}`,
|
|
|
19811
19968
|
const turnToolCalls = [];
|
|
19812
19969
|
const turnToolResults = [];
|
|
19813
19970
|
const pendingNativeTools = [];
|
|
19971
|
+
let lastLoopCheckLen = 0;
|
|
19814
19972
|
for await (const delta of stream) {
|
|
19815
19973
|
if (this.cancelled) {
|
|
19816
19974
|
const cancelEvent = createBrainEvent("error", this.sessionId, {
|
|
@@ -19827,6 +19985,29 @@ ${shared2.content}`,
|
|
|
19827
19985
|
const deltaEvent = createBrainEvent("message_delta", this.sessionId, { messageId, delta: delta.delta, ...this.memberFields() });
|
|
19828
19986
|
this.emit(deltaEvent);
|
|
19829
19987
|
yield deltaEvent;
|
|
19988
|
+
if (turnText.length >= 48 * 3 && turnText.length - lastLoopCheckLen >= 48) {
|
|
19989
|
+
lastLoopCheckLen = turnText.length;
|
|
19990
|
+
const loopHit = detectAssistantTextLoop(turnText);
|
|
19991
|
+
if (loopHit.looping) {
|
|
19992
|
+
const loopErr = createBrainEvent("error", this.sessionId, {
|
|
19993
|
+
severity: "recoverable",
|
|
19994
|
+
message: `Assistant text loop detected (same block \xD7${loopHit.count}). Stopped generation \u2014 model was repeating instead of calling tools or finishing. Retry or ask it to apply changes with tools.`,
|
|
19995
|
+
code: "assistant_text_loop"
|
|
19996
|
+
});
|
|
19997
|
+
this.emit(loopErr);
|
|
19998
|
+
yield loopErr;
|
|
19999
|
+
finishRef.value = "stop";
|
|
20000
|
+
const sealed = collapseLoopedAssistantText(turnText);
|
|
20001
|
+
if (sealed.length > 0 || turnReasoning.length > 0) {
|
|
20002
|
+
this.config.messages.push({
|
|
20003
|
+
role: "assistant",
|
|
20004
|
+
content: sealed,
|
|
20005
|
+
...turnReasoning.length > 0 ? { reasoningContent: turnReasoning } : {}
|
|
20006
|
+
});
|
|
20007
|
+
}
|
|
20008
|
+
break;
|
|
20009
|
+
}
|
|
20010
|
+
}
|
|
19830
20011
|
} else if (delta.kind === "thinking") {
|
|
19831
20012
|
turnReasoning += delta.delta;
|
|
19832
20013
|
const thinkEvent = createBrainEvent("thinking_delta", this.sessionId, {
|
|
@@ -20247,7 +20428,10 @@ var harness_exports = {};
|
|
|
20247
20428
|
__export(harness_exports, {
|
|
20248
20429
|
AgentHarness: () => AgentHarness,
|
|
20249
20430
|
SessionJsonlWriter: () => SessionJsonlWriter,
|
|
20431
|
+
collapseLoopedAssistantText: () => collapseLoopedAssistantText,
|
|
20432
|
+
detectAssistantTextLoop: () => detectAssistantTextLoop,
|
|
20250
20433
|
hashToolCall: () => hashToolCall,
|
|
20434
|
+
normalizeLoopUnit: () => normalizeLoopUnit,
|
|
20251
20435
|
normalizeTextToolArgs: () => normalizeTextToolArgs,
|
|
20252
20436
|
parseMinimaxStyleToolCalls: () => parseMinimaxStyleToolCalls,
|
|
20253
20437
|
parseTextToolCalls: () => parseTextToolCalls,
|
|
@@ -22449,7 +22633,7 @@ async function runBrowserCheck(options, loader) {
|
|
|
22449
22633
|
if (!pw) {
|
|
22450
22634
|
return {
|
|
22451
22635
|
...base,
|
|
22452
|
-
error: "browser automation unavailable \u2014 install
|
|
22636
|
+
error: "browser automation unavailable \u2014 Playwright is not installed in this workspace. Install it with: `zelari-code --plugins-install playwright --cwd .` (or Desktop banner \u201CInstall\u201D, or CLI `/plugins install playwright`, or `npm i -D playwright && npx playwright install chromium`). Then re-run browser_check."
|
|
22453
22637
|
};
|
|
22454
22638
|
}
|
|
22455
22639
|
const timeout = options.timeoutMs ?? 15e3;
|
|
@@ -39277,18 +39461,65 @@ import { spawn as spawn10 } from "node:child_process";
|
|
|
39277
39461
|
async function installPlugin(spec, cwd, executor = spawn10) {
|
|
39278
39462
|
const scopeFlag = spec.installScope === "global" ? "-g" : "-D";
|
|
39279
39463
|
const args = ["install", scopeFlag, spec.npmPackage];
|
|
39280
|
-
|
|
39281
|
-
if (
|
|
39282
|
-
|
|
39283
|
-
|
|
39284
|
-
|
|
39285
|
-
|
|
39286
|
-
|
|
39287
|
-
|
|
39464
|
+
let result = await runNpm2(executor, args, cwd, "shim");
|
|
39465
|
+
if (!result.ok) {
|
|
39466
|
+
const npmCli = resolveBundledNpmCli();
|
|
39467
|
+
if (npmCli && looksLikeBrokenShim(result.exitCode, result.output)) {
|
|
39468
|
+
const fallback = await runNpm2(executor, args, cwd, "bundled", npmCli);
|
|
39469
|
+
result = {
|
|
39470
|
+
...fallback,
|
|
39471
|
+
output: `[plugins] npm shim failed (${result.error ?? "exit " + result.exitCode}); retried via bundled npm (${npmCli}).
|
|
39288
39472
|
${fallback.output}`
|
|
39473
|
+
};
|
|
39474
|
+
}
|
|
39475
|
+
}
|
|
39476
|
+
if (!result.ok) return result;
|
|
39477
|
+
if (spec.id === "playwright") {
|
|
39478
|
+
const browsers = await runPlaywrightInstallChromium(cwd, executor);
|
|
39479
|
+
result = {
|
|
39480
|
+
...result,
|
|
39481
|
+
ok: browsers.ok ? true : result.ok,
|
|
39482
|
+
// Prefer package success even if browser download fails — surface both.
|
|
39483
|
+
output: (result.output ? result.output + "\n" : "") + (browsers.output ? `[playwright browsers]
|
|
39484
|
+
${browsers.output}` : "") + (browsers.ok ? "" : `
|
|
39485
|
+
[playwright] Chromium install failed: ${browsers.error ?? "unknown"}. Run: npx playwright install chromium`),
|
|
39486
|
+
error: browsers.ok ? result.error : result.error ?? `playwright package installed but Chromium download failed: ${browsers.error ?? "unknown"}`
|
|
39289
39487
|
};
|
|
39488
|
+
result = { ...result, ok: true };
|
|
39290
39489
|
}
|
|
39291
|
-
return
|
|
39490
|
+
return result;
|
|
39491
|
+
}
|
|
39492
|
+
function runPlaywrightInstallChromium(cwd, executor) {
|
|
39493
|
+
return new Promise((resolve) => {
|
|
39494
|
+
let stdout = "";
|
|
39495
|
+
let stderr = "";
|
|
39496
|
+
const stdio = ["ignore", "pipe", "pipe"];
|
|
39497
|
+
const args = ["playwright", "install", "chromium"];
|
|
39498
|
+
const child = process.platform === "win32" ? executor(buildCmdLine("npx", args), { stdio, shell: true, cwd }) : executor("npx", args, { stdio, cwd });
|
|
39499
|
+
child.stdout?.on("data", (chunk) => {
|
|
39500
|
+
stdout += chunk.toString();
|
|
39501
|
+
});
|
|
39502
|
+
child.stderr?.on("data", (chunk) => {
|
|
39503
|
+
stderr += chunk.toString();
|
|
39504
|
+
});
|
|
39505
|
+
child.on("error", (err) => {
|
|
39506
|
+
resolve({
|
|
39507
|
+
ok: false,
|
|
39508
|
+
output: stdout + stderr,
|
|
39509
|
+
error: err.message,
|
|
39510
|
+
exitCode: null
|
|
39511
|
+
});
|
|
39512
|
+
});
|
|
39513
|
+
child.on("close", (code) => {
|
|
39514
|
+
const ok = code === 0;
|
|
39515
|
+
resolve({
|
|
39516
|
+
ok,
|
|
39517
|
+
output: stdout + stderr,
|
|
39518
|
+
exitCode: code,
|
|
39519
|
+
error: ok ? void 0 : `npx playwright install chromium exited ${code}`
|
|
39520
|
+
});
|
|
39521
|
+
});
|
|
39522
|
+
});
|
|
39292
39523
|
}
|
|
39293
39524
|
function runNpm2(executor, args, cwd, mode, npmCliPath) {
|
|
39294
39525
|
return new Promise((resolve) => {
|
|
@@ -42750,6 +42981,98 @@ async function runDiscoverModels(providerArg) {
|
|
|
42750
42981
|
}
|
|
42751
42982
|
}
|
|
42752
42983
|
|
|
42984
|
+
// src/cli/plugins/cliFlags.ts
|
|
42985
|
+
init_registry2();
|
|
42986
|
+
function getArg(argv, flag) {
|
|
42987
|
+
const i = argv.indexOf(flag);
|
|
42988
|
+
if (i < 0) return void 0;
|
|
42989
|
+
return argv[i + 1];
|
|
42990
|
+
}
|
|
42991
|
+
function resolveCwd(argv) {
|
|
42992
|
+
return getArg(argv, "--cwd") ?? process.cwd();
|
|
42993
|
+
}
|
|
42994
|
+
function wantsPluginsStatus(argv) {
|
|
42995
|
+
return argv.includes("--plugins-status");
|
|
42996
|
+
}
|
|
42997
|
+
function wantsPluginsInstall(argv) {
|
|
42998
|
+
return argv.includes("--plugins-install");
|
|
42999
|
+
}
|
|
43000
|
+
async function runPluginsStatus(argv) {
|
|
43001
|
+
const cwd = resolveCwd(argv);
|
|
43002
|
+
const plugins = [];
|
|
43003
|
+
for (const spec of PLUGINS) {
|
|
43004
|
+
let present = false;
|
|
43005
|
+
try {
|
|
43006
|
+
present = await spec.detect(cwd);
|
|
43007
|
+
} catch {
|
|
43008
|
+
present = false;
|
|
43009
|
+
}
|
|
43010
|
+
plugins.push({
|
|
43011
|
+
id: spec.id,
|
|
43012
|
+
label: spec.label,
|
|
43013
|
+
present,
|
|
43014
|
+
description: spec.description,
|
|
43015
|
+
postInstallHint: spec.postInstallHint ?? null,
|
|
43016
|
+
npmPackage: spec.npmPackage,
|
|
43017
|
+
installScope: spec.installScope
|
|
43018
|
+
});
|
|
43019
|
+
}
|
|
43020
|
+
process.stdout.write(JSON.stringify({ cwd, plugins }, null, 2) + "\n");
|
|
43021
|
+
return 0;
|
|
43022
|
+
}
|
|
43023
|
+
async function runPluginsInstall(argv) {
|
|
43024
|
+
const cwd = resolveCwd(argv);
|
|
43025
|
+
const id = getArg(argv, "--plugins-install");
|
|
43026
|
+
if (!id) {
|
|
43027
|
+
process.stderr.write(
|
|
43028
|
+
"[plugins] usage: zelari-code --plugins-install <id> [--cwd <path>]\n"
|
|
43029
|
+
);
|
|
43030
|
+
process.stdout.write(
|
|
43031
|
+
JSON.stringify({
|
|
43032
|
+
ok: false,
|
|
43033
|
+
id: "",
|
|
43034
|
+
message: "missing plugin id"
|
|
43035
|
+
}) + "\n"
|
|
43036
|
+
);
|
|
43037
|
+
return 1;
|
|
43038
|
+
}
|
|
43039
|
+
const spec = findPlugin(id);
|
|
43040
|
+
if (!spec) {
|
|
43041
|
+
const msg = `unknown plugin id: ${id}. Available: ${PLUGINS.map((p3) => p3.id).join(", ")}`;
|
|
43042
|
+
process.stderr.write(`[plugins] ${msg}
|
|
43043
|
+
`);
|
|
43044
|
+
process.stdout.write(
|
|
43045
|
+
JSON.stringify({ ok: false, id, message: msg }) + "\n"
|
|
43046
|
+
);
|
|
43047
|
+
return 1;
|
|
43048
|
+
}
|
|
43049
|
+
process.stderr.write(
|
|
43050
|
+
`[plugins] installing ${spec.label} into ${cwd}\u2026
|
|
43051
|
+
`
|
|
43052
|
+
);
|
|
43053
|
+
const result = await installPlugin(spec, cwd);
|
|
43054
|
+
const payload = {
|
|
43055
|
+
ok: result.ok,
|
|
43056
|
+
id: spec.id,
|
|
43057
|
+
message: result.ok ? `Installed ${spec.label}` : result.error ?? `Install failed for ${spec.label}`,
|
|
43058
|
+
output: result.output?.slice(-4e3),
|
|
43059
|
+
postInstallHint: spec.postInstallHint ?? null
|
|
43060
|
+
};
|
|
43061
|
+
process.stdout.write(JSON.stringify(payload, null, 2) + "\n");
|
|
43062
|
+
if (!result.ok) {
|
|
43063
|
+
process.stderr.write(`[plugins] \u2717 ${payload.message}
|
|
43064
|
+
`);
|
|
43065
|
+
return 1;
|
|
43066
|
+
}
|
|
43067
|
+
process.stderr.write(`[plugins] \u2713 ${payload.message}
|
|
43068
|
+
`);
|
|
43069
|
+
if (spec.postInstallHint) {
|
|
43070
|
+
process.stderr.write(`[plugins] \u2192 ${spec.postInstallHint}
|
|
43071
|
+
`);
|
|
43072
|
+
}
|
|
43073
|
+
return 0;
|
|
43074
|
+
}
|
|
43075
|
+
|
|
42753
43076
|
// src/cli/skillsMd.ts
|
|
42754
43077
|
init_skills2();
|
|
42755
43078
|
import { existsSync as existsSync36, readdirSync as readdirSync5, readFileSync as readFileSync30 } from "node:fs";
|
|
@@ -42934,6 +43257,14 @@ function pickRootComponent() {
|
|
|
42934
43257
|
console.log(`zelari-code v${VERSION}`);
|
|
42935
43258
|
process.exit(0);
|
|
42936
43259
|
}
|
|
43260
|
+
if (wantsPluginsStatus(argv)) {
|
|
43261
|
+
void runPluginsStatus(argv).then((code) => process.exit(code));
|
|
43262
|
+
return { kind: "done" };
|
|
43263
|
+
}
|
|
43264
|
+
if (wantsPluginsInstall(argv)) {
|
|
43265
|
+
void runPluginsInstall(argv).then((code) => process.exit(code));
|
|
43266
|
+
return { kind: "done" };
|
|
43267
|
+
}
|
|
42937
43268
|
if (argv.includes("--doctor") || argv.includes("doctor")) {
|
|
42938
43269
|
const { runDoctor: runDoctor2 } = (init_doctor(), __toCommonJS(doctor_exports));
|
|
42939
43270
|
void runDoctor2().then((healthy) => process.exit(healthy ? 0 : 1));
|
|
@@ -42963,7 +43294,7 @@ function pickRootComponent() {
|
|
|
42963
43294
|
}
|
|
42964
43295
|
if (argv.includes("--help") || argv.includes("-h")) {
|
|
42965
43296
|
console.log(
|
|
42966
|
-
"zelari-code \u2014 AI Council coding agent CLI.\n\nUsage: zelari-code [options]\n\nOptions:\n --version, -v Print version and exit\n --help, -h Print this help and exit\n --doctor Diagnose install health (shim, bundle, PATH, deps,\n node/git/bash in the agent shell)\n --fix-path Add the npm global prefix to the user PATH\n (Windows only; fixes 'command not found' after install)\n --skip-checks Skip the boot-time prerequisite check\n (alias for ZELARI_SKIP_PREFLIGHT=1)\n --no-wizard Skip the first-run wizard\n --reset-config Re-run the wizard (clears provider.json on commit)\n --headless Run a single task without mounting the TUI\n --task <text> Task prompt (required in headless mode)\n --output json|plain Output format (default: json)\n --mode agent|council|zelari Dispatch mode (default: agent)\n --council Alias for --mode council\n --phase plan|build Work phase (default: build)\n --provider <id> Provider override (default: active)\n --model <id> Model override (default: provider default)\n --print-config Print provider/model config as JSON (no secrets)\n --set-config Persist provider/model/endpoint\n --provider <id> Set active provider\n --model <id> Set model for that provider\n --endpoint <url> Custom OpenAI-compatible base URL\n --endpoint-clear Remove custom endpoint override\n --set-key Store an API key (never printed back)\n --provider <id> Provider id (required)\n --key <secret> API key (required)\n --discover-models Refresh model list for a provider\n --provider <id> Provider (default: active)\n --print-mcp Print MCP server config (user + project)\n --cwd <path> Project root for .zelari/mcp.json\n --set-mcp Add/update an MCP server entry\n --name <id> Server name (required)\n --command <bin> Executable (required)\n --args <json> JSON array of args (optional)\n --scope user|project Default: user\n --enabled true|false Default: true\n --cwd <path> Required when scope=project\n --set-mcp-preset Install a named MCP preset (e.g. cua)\n --preset cua Cua Driver desktop computer-use (MCP)\n --scope user|project Default: user\n --cwd <path> Required when scope=project\n --remove-mcp Remove an MCP server entry\n --name <id> --scope user|project [--cwd <path>]\n --print-ssh-targets Print SSH deploy/monitor targets\n --set-ssh-target Upsert target (--json '{...}' or flags)\n --remove-ssh-target --id <id>\n --test-ssh-target --id <id> (BatchMode ssh true)\n --print-ssh-pubkey --path <private-or-.pub> (display public key)\n\nEnvironment:\n ZELARI_NO_WIZARD=1 Skip the first-run wizard\n ZELARI_SKIP_PREFLIGHT=1 Skip the boot prerequisite check\n ZELARI_NO_PLUGIN_PROMPT=1 Skip the boot plugin-install prompt\n ANATHEMA_DEV=1 Disable background update check + preflight\n"
|
|
43297
|
+
"zelari-code \u2014 AI Council coding agent CLI.\n\nUsage: zelari-code [options]\n\nOptions:\n --version, -v Print version and exit\n --help, -h Print this help and exit\n --doctor Diagnose install health (shim, bundle, PATH, deps,\n node/git/bash in the agent shell)\n --fix-path Add the npm global prefix to the user PATH\n (Windows only; fixes 'command not found' after install)\n --skip-checks Skip the boot-time prerequisite check\n (alias for ZELARI_SKIP_PREFLIGHT=1)\n --no-wizard Skip the first-run wizard\n --reset-config Re-run the wizard (clears provider.json on commit)\n --headless Run a single task without mounting the TUI\n --task <text> Task prompt (required in headless mode)\n --output json|plain Output format (default: json)\n --mode agent|council|zelari Dispatch mode (default: agent)\n --council Alias for --mode council\n --phase plan|build Work phase (default: build)\n --provider <id> Provider override (default: active)\n --model <id> Model override (default: provider default)\n --print-config Print provider/model config as JSON (no secrets)\n --plugins-status JSON status of optional plugins (Playwright, eslint, \u2026)\n --plugins-install <id> Install plugin (playwright also fetches Chromium)\n --cwd <path> Workspace for -D installs (default: process.cwd())\n --set-config Persist provider/model/endpoint\n --provider <id> Set active provider\n --model <id> Set model for that provider\n --endpoint <url> Custom OpenAI-compatible base URL\n --endpoint-clear Remove custom endpoint override\n --set-key Store an API key (never printed back)\n --provider <id> Provider id (required)\n --key <secret> API key (required)\n --discover-models Refresh model list for a provider\n --provider <id> Provider (default: active)\n --print-mcp Print MCP server config (user + project)\n --cwd <path> Project root for .zelari/mcp.json\n --set-mcp Add/update an MCP server entry\n --name <id> Server name (required)\n --command <bin> Executable (required)\n --args <json> JSON array of args (optional)\n --scope user|project Default: user\n --enabled true|false Default: true\n --cwd <path> Required when scope=project\n --set-mcp-preset Install a named MCP preset (e.g. cua)\n --preset cua Cua Driver desktop computer-use (MCP)\n --scope user|project Default: user\n --cwd <path> Required when scope=project\n --remove-mcp Remove an MCP server entry\n --name <id> --scope user|project [--cwd <path>]\n --print-ssh-targets Print SSH deploy/monitor targets\n --set-ssh-target Upsert target (--json '{...}' or flags)\n --remove-ssh-target --id <id>\n --test-ssh-target --id <id> (BatchMode ssh true)\n --print-ssh-pubkey --path <private-or-.pub> (display public key)\n\nEnvironment:\n ZELARI_NO_WIZARD=1 Skip the first-run wizard\n ZELARI_SKIP_PREFLIGHT=1 Skip the boot prerequisite check\n ZELARI_NO_PLUGIN_PROMPT=1 Skip the boot plugin-install prompt\n ANATHEMA_DEV=1 Disable background update check + preflight\n"
|
|
42967
43298
|
);
|
|
42968
43299
|
process.exit(0);
|
|
42969
43300
|
}
|