@duheso/zerocli 1.0.2 → 1.0.4
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 +29 -0
- package/dist/cli.mjs +506 -307
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -117893,6 +117893,7 @@ running code.`,
|
|
|
117893
117893
|
cmd_login: "Log in to Anthropic",
|
|
117894
117894
|
cmd_logout: "Sign out from your Anthropic account",
|
|
117895
117895
|
cmd_advisor: "Configure the advisor model",
|
|
117896
|
+
cmd_council: "⚖️ Summon the Council Tribunal — 5 AI advisors debate your problem from radically different perspectives",
|
|
117896
117897
|
cmd_skills: "List available skills",
|
|
117897
117898
|
cmd_rewind: "Restore the code and/or conversation to a previous point",
|
|
117898
117899
|
cmd_btw: "Ask a quick side question without interrupting the main conversation",
|
|
@@ -118508,6 +118509,7 @@ executar código.`,
|
|
|
118508
118509
|
cmd_login: "Entrar na Anthropic",
|
|
118509
118510
|
cmd_logout: "Sair da conta Anthropic",
|
|
118510
118511
|
cmd_advisor: "Configurar o modelo advisor",
|
|
118512
|
+
cmd_council: "⚖️ Tribunal do Conselho — 5 conselheiros, discordam e debatem sobre seu problema",
|
|
118511
118513
|
cmd_skills: "Listar as skills disponíveis",
|
|
118512
118514
|
cmd_rewind: "Restaurar o código e/ou a conversa a um ponto anterior",
|
|
118513
118515
|
cmd_btw: "Fazer uma pergunta rápida sem interromper a conversa principal",
|
|
@@ -118638,7 +118640,7 @@ executar código.`,
|
|
|
118638
118640
|
council_invoking: "Invocando o Tribunal do Conselho...",
|
|
118639
118641
|
council_question_label: "Questão",
|
|
118640
118642
|
council_pack_label: "Pack",
|
|
118641
|
-
council_round_title: (round, total) => `TRIBUNAL DO CONSELHO — Rodada ${round}/${total}`,
|
|
118643
|
+
council_round_title: (round, total) => `TRIBUNAL DO CONSELHO — Convoca a Rodada ${round}/${total}`,
|
|
118642
118644
|
council_verdict_title: "VEREDITO FINAL DO CONSELHO",
|
|
118643
118645
|
council_consensus: "CONSENSO",
|
|
118644
118646
|
council_dissent: "DIVERGÊNCIAS",
|
|
@@ -119224,7 +119226,7 @@ function buildProviderInfoLines() {
|
|
|
119224
119226
|
const sLen = ` ● ${sL} ${sReady}`.length;
|
|
119225
119227
|
out.push(boxRow(sRow, W2, sLen));
|
|
119226
119228
|
out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
|
|
119227
|
-
out.push(` ${DIM}${rgb(...DIMCOL)}zero ${RESET}${rgb(...ACCENT)}v${"1.0.
|
|
119229
|
+
out.push(` ${DIM}${rgb(...DIMCOL)}zero ${RESET}${rgb(...ACCENT)}v${"1.0.4"}${RESET}`);
|
|
119228
119230
|
return out;
|
|
119229
119231
|
}
|
|
119230
119232
|
function printStartupScreen() {}
|
|
@@ -147415,7 +147417,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
147415
147417
|
if (!isAttributionHeaderEnabled()) {
|
|
147416
147418
|
return "";
|
|
147417
147419
|
}
|
|
147418
|
-
const version2 = `${"1.0.
|
|
147420
|
+
const version2 = `${"1.0.4"}.${fingerprint}`;
|
|
147419
147421
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
147420
147422
|
const cch = "";
|
|
147421
147423
|
const workload = getWorkload();
|
|
@@ -190425,7 +190427,7 @@ var init_imageValidation = __esm(() => {
|
|
|
190425
190427
|
|
|
190426
190428
|
// src/utils/userAgent.ts
|
|
190427
190429
|
function getZeroCodeUserAgent() {
|
|
190428
|
-
return `claude-code/${"1.0.
|
|
190430
|
+
return `claude-code/${"1.0.4"}`;
|
|
190429
190431
|
}
|
|
190430
190432
|
|
|
190431
190433
|
// src/utils/http.ts
|
|
@@ -190434,7 +190436,7 @@ function getUserAgent() {
|
|
|
190434
190436
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
190435
190437
|
const workload = getWorkload();
|
|
190436
190438
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
190437
|
-
return `claude-cli/${"1.0.
|
|
190439
|
+
return `claude-cli/${"1.0.4"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
190438
190440
|
}
|
|
190439
190441
|
function getMCPUserAgent() {
|
|
190440
190442
|
const parts = [];
|
|
@@ -190448,7 +190450,7 @@ function getMCPUserAgent() {
|
|
|
190448
190450
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
190449
190451
|
}
|
|
190450
190452
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
190451
|
-
return `claude-code/${"1.0.
|
|
190453
|
+
return `claude-code/${"1.0.4"}${suffix}`;
|
|
190452
190454
|
}
|
|
190453
190455
|
function getWebFetchUserAgent() {
|
|
190454
190456
|
const supportUrl = getAPIProvider() === "firstParty" ? "https://support.anthropic.com/" : "https://github.com/Duheso/ZeroCLI";
|
|
@@ -244934,7 +244936,7 @@ function getTelemetryAttributes() {
|
|
|
244934
244936
|
attributes["session.id"] = sessionId;
|
|
244935
244937
|
}
|
|
244936
244938
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
244937
|
-
attributes["app.version"] = "1.0.
|
|
244939
|
+
attributes["app.version"] = "1.0.4";
|
|
244938
244940
|
}
|
|
244939
244941
|
const oauthAccount = getOauthAccountInfo();
|
|
244940
244942
|
if (oauthAccount) {
|
|
@@ -257173,7 +257175,7 @@ function computeFingerprint(messageText, version2) {
|
|
|
257173
257175
|
}
|
|
257174
257176
|
function computeFingerprintFromMessages(messages) {
|
|
257175
257177
|
const firstMessageText = extractFirstMessageText(messages);
|
|
257176
|
-
return computeFingerprint(firstMessageText, "1.0.
|
|
257178
|
+
return computeFingerprint(firstMessageText, "1.0.4");
|
|
257177
257179
|
}
|
|
257178
257180
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
257179
257181
|
var init_fingerprint = () => {};
|
|
@@ -257215,7 +257217,7 @@ async function sideQuery(opts) {
|
|
|
257215
257217
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
257216
257218
|
}
|
|
257217
257219
|
const messageText = extractFirstUserMessageText(messages);
|
|
257218
|
-
const fingerprint = computeFingerprint(messageText, "1.0.
|
|
257220
|
+
const fingerprint = computeFingerprint(messageText, "1.0.4");
|
|
257219
257221
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
257220
257222
|
const systemBlocks = [
|
|
257221
257223
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -266117,7 +266119,7 @@ var init_user = __esm(() => {
|
|
|
266117
266119
|
deviceId,
|
|
266118
266120
|
sessionId: getSessionId(),
|
|
266119
266121
|
email: getEmail(),
|
|
266120
|
-
appVersion: "1.0.
|
|
266122
|
+
appVersion: "1.0.4",
|
|
266121
266123
|
platform: getHostPlatformForAnalytics(),
|
|
266122
266124
|
organizationUuid,
|
|
266123
266125
|
accountUuid,
|
|
@@ -266511,7 +266513,7 @@ async function initializeBetaTracing(resource) {
|
|
|
266511
266513
|
});
|
|
266512
266514
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
266513
266515
|
setLoggerProvider(loggerProvider);
|
|
266514
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.0.
|
|
266516
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.0.4");
|
|
266515
266517
|
setEventLogger(eventLogger);
|
|
266516
266518
|
process.on("beforeExit", async () => {
|
|
266517
266519
|
await loggerProvider?.forceFlush();
|
|
@@ -266551,7 +266553,7 @@ async function initializeTelemetry() {
|
|
|
266551
266553
|
const platform3 = getPlatform();
|
|
266552
266554
|
const baseAttributes = {
|
|
266553
266555
|
[ATTR_SERVICE_NAME3]: "claude-code",
|
|
266554
|
-
[ATTR_SERVICE_VERSION3]: "1.0.
|
|
266556
|
+
[ATTR_SERVICE_VERSION3]: "1.0.4"
|
|
266555
266557
|
};
|
|
266556
266558
|
if (platform3 === "wsl") {
|
|
266557
266559
|
const wslVersion = getWslVersion();
|
|
@@ -266596,7 +266598,7 @@ async function initializeTelemetry() {
|
|
|
266596
266598
|
} catch {}
|
|
266597
266599
|
};
|
|
266598
266600
|
registerCleanup(shutdownTelemetry2);
|
|
266599
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", "1.0.
|
|
266601
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", "1.0.4");
|
|
266600
266602
|
}
|
|
266601
266603
|
const meterProvider = new MeterProvider3({
|
|
266602
266604
|
resource,
|
|
@@ -266616,7 +266618,7 @@ async function initializeTelemetry() {
|
|
|
266616
266618
|
});
|
|
266617
266619
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
266618
266620
|
setLoggerProvider(loggerProvider);
|
|
266619
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.0.
|
|
266621
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.0.4");
|
|
266620
266622
|
setEventLogger(eventLogger);
|
|
266621
266623
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
266622
266624
|
process.on("beforeExit", async () => {
|
|
@@ -266678,7 +266680,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
266678
266680
|
}
|
|
266679
266681
|
};
|
|
266680
266682
|
registerCleanup(shutdownTelemetry);
|
|
266681
|
-
return meterProvider.getMeter("com.anthropic.claude_code", "1.0.
|
|
266683
|
+
return meterProvider.getMeter("com.anthropic.claude_code", "1.0.4");
|
|
266682
266684
|
}
|
|
266683
266685
|
async function flushTelemetry() {
|
|
266684
266686
|
const meterProvider = getMeterProvider();
|
|
@@ -267490,9 +267492,9 @@ async function assertMinVersion() {
|
|
|
267490
267492
|
}
|
|
267491
267493
|
try {
|
|
267492
267494
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
267493
|
-
if (versionConfig.minVersion && lt("1.0.
|
|
267495
|
+
if (versionConfig.minVersion && lt("1.0.4", versionConfig.minVersion)) {
|
|
267494
267496
|
console.error(`
|
|
267495
|
-
It looks like your version of ZeroCLI (${"1.0.
|
|
267497
|
+
It looks like your version of ZeroCLI (${"1.0.4"}) needs an update.
|
|
267496
267498
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
267497
267499
|
|
|
267498
267500
|
To update, please run:
|
|
@@ -267708,7 +267710,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
267708
267710
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
267709
267711
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
267710
267712
|
pid: process.pid,
|
|
267711
|
-
currentVersion: "1.0.
|
|
267713
|
+
currentVersion: "1.0.4"
|
|
267712
267714
|
});
|
|
267713
267715
|
return "in_progress";
|
|
267714
267716
|
}
|
|
@@ -267717,7 +267719,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
267717
267719
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
267718
267720
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
267719
267721
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
267720
|
-
currentVersion: "1.0.
|
|
267722
|
+
currentVersion: "1.0.4"
|
|
267721
267723
|
});
|
|
267722
267724
|
console.error(`
|
|
267723
267725
|
Error: Windows NPM detected in WSL
|
|
@@ -268271,7 +268273,7 @@ async function getDoctorDiagnostic() {
|
|
|
268271
268273
|
const installationType = await getCurrentInstallationType();
|
|
268272
268274
|
let version2;
|
|
268273
268275
|
try {
|
|
268274
|
-
version2 = "1.0.
|
|
268276
|
+
version2 = "1.0.4";
|
|
268275
268277
|
} catch {
|
|
268276
268278
|
version2 = "unknown";
|
|
268277
268279
|
}
|
|
@@ -269765,7 +269767,7 @@ function getInstallationEnv() {
|
|
|
269765
269767
|
return;
|
|
269766
269768
|
}
|
|
269767
269769
|
function getZeroCodeVersion() {
|
|
269768
|
-
return "1.0.
|
|
269770
|
+
return "1.0.4";
|
|
269769
269771
|
}
|
|
269770
269772
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
269771
269773
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -271132,8 +271134,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
271132
271134
|
const maxVersion = await getMaxVersion();
|
|
271133
271135
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
271134
271136
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
271135
|
-
if (gte("1.0.
|
|
271136
|
-
logForDebugging(`Native installer: current version ${"1.0.
|
|
271137
|
+
if (gte("1.0.4", maxVersion)) {
|
|
271138
|
+
logForDebugging(`Native installer: current version ${"1.0.4"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
271137
271139
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
271138
271140
|
latency_ms: Date.now() - startTime2,
|
|
271139
271141
|
max_version: maxVersion,
|
|
@@ -271144,7 +271146,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
271144
271146
|
version2 = maxVersion;
|
|
271145
271147
|
}
|
|
271146
271148
|
}
|
|
271147
|
-
if (!forceReinstall && version2 === "1.0.
|
|
271149
|
+
if (!forceReinstall && version2 === "1.0.4" && await versionIsAvailable(version2) && await isPossibleZeroBinary(executablePath)) {
|
|
271148
271150
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
271149
271151
|
logEvent("tengu_native_update_complete", {
|
|
271150
271152
|
latency_ms: Date.now() - startTime2,
|
|
@@ -359228,7 +359230,7 @@ INSTRUCTIONS:
|
|
|
359228
359230
|
1. Give your FULL opinion on this question, grounded in your worldview and decision-making method.
|
|
359229
359231
|
2. Be specific and actionable — avoid vague platitudes.
|
|
359230
359232
|
3. This is Round 1. You haven't heard the others yet, so speak from your own perspective only.
|
|
359231
|
-
4. Keep your response between 150-
|
|
359233
|
+
4. Keep your response between 150-1500 words.
|
|
359232
359234
|
5. End with a clear, one-sentence position statement.`;
|
|
359233
359235
|
}
|
|
359234
359236
|
function buildSubsequentRoundPrompt(member, clarifiedPrompt, allMembers, previousRounds, currentRound, totalMaxRounds) {
|
|
@@ -359256,7 +359258,7 @@ INSTRUCTIONS (ROUND ${currentRound} of max ${totalMaxRounds}):
|
|
|
359256
359258
|
2. Refine or update your position based on the debate so far.
|
|
359257
359259
|
3. You may change your mind if another advisor made a compelling argument — or double down if you still disagree.
|
|
359258
359260
|
4. Be specific. Reference other advisors BY NAME.
|
|
359259
|
-
5. Keep your response between 150-
|
|
359261
|
+
5. Keep your response between 150-1500 words.
|
|
359260
359262
|
6. End with your updated one-sentence position statement.
|
|
359261
359263
|
7. If you believe the council is reaching consensus, say so. If you still strongly dissent, make that clear.`;
|
|
359262
359264
|
}
|
|
@@ -359510,7 +359512,7 @@ async function generateClarifyingQuestions(userPrompt, signal) {
|
|
|
359510
359512
|
|
|
359511
359513
|
"${userPrompt}"
|
|
359512
359514
|
|
|
359513
|
-
Generate
|
|
359515
|
+
Generate 3 to 13 clarifying questions (no more than 13) to fully understand their situation.`,
|
|
359514
359516
|
signal,
|
|
359515
359517
|
options: {
|
|
359516
359518
|
model,
|
|
@@ -359536,7 +359538,7 @@ Generate 2-10 clarifying questions to fully understand their situation.`,
|
|
|
359536
359538
|
"What outcome would you consider ideal?"
|
|
359537
359539
|
];
|
|
359538
359540
|
}
|
|
359539
|
-
return questions.slice(0,
|
|
359541
|
+
return questions.slice(0, 5);
|
|
359540
359542
|
}
|
|
359541
359543
|
function buildEnrichedPrompt(originalPrompt, clarifications) {
|
|
359542
359544
|
const clarificationText = Object.entries(clarifications).map(([question, answer]) => `Q: ${question}
|
|
@@ -359571,21 +359573,25 @@ async function runCouncilTribunal(input) {
|
|
|
359571
359573
|
}
|
|
359572
359574
|
var MESSENGER_SYSTEM_PROMPT = `You are the Messenger of the Council Tribunal ("Mensageiro do Tribunal do Conselho"). Your sole job is to prepare the user's question for the Council of 5 AI advisors.
|
|
359573
359575
|
|
|
359574
|
-
You
|
|
359575
|
-
1. Highly relevant — they should
|
|
359576
|
-
2. Specific — avoid generic questions. Tailor them to the user's actual prompt.
|
|
359577
|
-
3. Actionable — the answers should materially change the advice the Council gives.
|
|
359576
|
+
You should generate 3 to 13 clarifying questions, depending on the complexity, that should help the Board fully understand the user's situation. The questions should be:
|
|
359577
|
+
1. Highly relevant — they should reveal the context, constraints, priorities, or desired outcomes.
|
|
359578
359578
|
|
|
359579
|
+
2. Specific — avoid generic questions. Adapt them to the user's actual request.
|
|
359580
|
+
|
|
359581
|
+
3. Actionable — the answers should substantially alter the Board's recommendation.
|
|
359582
|
+
|
|
359583
|
+
4. Non-redundant — each question must cover a DIFFERENT aspect of the problem.
|
|
359579
359584
|
NOTHING should remain abstract or ambiguous. The Council needs complete context to deliberate effectively.
|
|
359580
359585
|
|
|
359581
359586
|
Detect the language of the user's prompt and write your questions in the SAME language.
|
|
359582
359587
|
|
|
359583
|
-
OUTPUT FORMAT:
|
|
359588
|
+
OUTPUT FORMAT:(if there is more than one question, use the AskUserQuestionTool multi-questions function)
|
|
359584
359589
|
Return ONLY the questions, one per line, prefixed with a number:
|
|
359585
359590
|
1. [question]
|
|
359586
359591
|
2. [question]
|
|
359587
359592
|
3. [question]
|
|
359588
|
-
4. [question] (
|
|
359593
|
+
4. [question] (if needed)
|
|
359594
|
+
5. [question] (if needed)`;
|
|
359589
359595
|
var init_councilOrchestrator = __esm(() => {
|
|
359590
359596
|
init_claude();
|
|
359591
359597
|
init_messages3();
|
|
@@ -359635,7 +359641,7 @@ function DebateRoundView({ round: round2, totalRounds }) {
|
|
|
359635
359641
|
bold: true,
|
|
359636
359642
|
color: "ansi:yellow",
|
|
359637
359643
|
children: [
|
|
359638
|
-
"⚖️ TRIBUNAL DO CONSELHO — Rodada ",
|
|
359644
|
+
"⚖️ TRIBUNAL DO CONSELHO — Convoca a Rodada ",
|
|
359639
359645
|
round2.roundNumber,
|
|
359640
359646
|
"/",
|
|
359641
359647
|
totalRounds
|
|
@@ -359834,6 +359840,98 @@ function renderClarificationPhase(questions) {
|
|
|
359834
359840
|
]
|
|
359835
359841
|
});
|
|
359836
359842
|
}
|
|
359843
|
+
function ProgressRoundView({ round: round2 }) {
|
|
359844
|
+
return /* @__PURE__ */ jsx_runtime140.jsxs(ThemedBox_default, {
|
|
359845
|
+
flexDirection: "column",
|
|
359846
|
+
marginBottom: 1,
|
|
359847
|
+
children: [
|
|
359848
|
+
/* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
359849
|
+
marginBottom: 1,
|
|
359850
|
+
children: /* @__PURE__ */ jsx_runtime140.jsxs(ThemedText, {
|
|
359851
|
+
bold: true,
|
|
359852
|
+
color: "ansi:yellow",
|
|
359853
|
+
children: [
|
|
359854
|
+
"⚖️ TRIBUNAL DO CONSELHO — Convoca a Rodada ",
|
|
359855
|
+
round2.roundNumber
|
|
359856
|
+
]
|
|
359857
|
+
})
|
|
359858
|
+
}),
|
|
359859
|
+
/* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
359860
|
+
flexDirection: "column",
|
|
359861
|
+
marginLeft: 1,
|
|
359862
|
+
children: round2.opinions.map((op, i3) => /* @__PURE__ */ jsx_runtime140.jsxs(ThemedBox_default, {
|
|
359863
|
+
flexDirection: "column",
|
|
359864
|
+
marginBottom: 1,
|
|
359865
|
+
children: [
|
|
359866
|
+
/* @__PURE__ */ jsx_runtime140.jsxs(ThemedText, {
|
|
359867
|
+
bold: true,
|
|
359868
|
+
children: [
|
|
359869
|
+
op.icon,
|
|
359870
|
+
" ",
|
|
359871
|
+
op.memberName,
|
|
359872
|
+
" (",
|
|
359873
|
+
op.role,
|
|
359874
|
+
"):"
|
|
359875
|
+
]
|
|
359876
|
+
}),
|
|
359877
|
+
/* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
359878
|
+
marginLeft: 2,
|
|
359879
|
+
children: /* @__PURE__ */ jsx_runtime140.jsx(ThemedText, {
|
|
359880
|
+
wrap: "wrap",
|
|
359881
|
+
children: op.opinion
|
|
359882
|
+
})
|
|
359883
|
+
})
|
|
359884
|
+
]
|
|
359885
|
+
}, i3))
|
|
359886
|
+
})
|
|
359887
|
+
]
|
|
359888
|
+
});
|
|
359889
|
+
}
|
|
359890
|
+
function renderCouncilProgress(progressMessages) {
|
|
359891
|
+
const councilMessages = progressMessages.filter((msg) => msg.data?.type === "council_progress");
|
|
359892
|
+
const lastProgress = councilMessages.at(-1);
|
|
359893
|
+
if (!lastProgress?.data) {
|
|
359894
|
+
return /* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
359895
|
+
children: /* @__PURE__ */ jsx_runtime140.jsx(ThemedText, {
|
|
359896
|
+
dimColor: true,
|
|
359897
|
+
children: "⚖️ Preparando o Tribunal do Conselho..."
|
|
359898
|
+
})
|
|
359899
|
+
});
|
|
359900
|
+
}
|
|
359901
|
+
const data = lastProgress.data;
|
|
359902
|
+
return /* @__PURE__ */ jsx_runtime140.jsxs(ThemedBox_default, {
|
|
359903
|
+
flexDirection: "column",
|
|
359904
|
+
children: [
|
|
359905
|
+
data.completedRounds.map((round2) => /* @__PURE__ */ jsx_runtime140.jsx(ProgressRoundView, {
|
|
359906
|
+
round: round2
|
|
359907
|
+
}, round2.roundNumber)),
|
|
359908
|
+
data.phase === "clarifying" && /* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
359909
|
+
children: /* @__PURE__ */ jsx_runtime140.jsx(ThemedText, {
|
|
359910
|
+
dimColor: true,
|
|
359911
|
+
children: "\uD83D\uDCE8 O Mensageiro está esclarecendo a questão..."
|
|
359912
|
+
})
|
|
359913
|
+
}),
|
|
359914
|
+
data.phase === "debating" && data.currentRound && data.maxRounds && /* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
359915
|
+
children: /* @__PURE__ */ jsx_runtime140.jsxs(ThemedText, {
|
|
359916
|
+
dimColor: true,
|
|
359917
|
+
children: [
|
|
359918
|
+
"⚔️ O Conselho está debatendo — Rodada ",
|
|
359919
|
+
data.currentRound,
|
|
359920
|
+
"/",
|
|
359921
|
+
data.maxRounds,
|
|
359922
|
+
"..."
|
|
359923
|
+
]
|
|
359924
|
+
})
|
|
359925
|
+
}),
|
|
359926
|
+
data.phase === "synthesizing" && /* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
359927
|
+
children: /* @__PURE__ */ jsx_runtime140.jsx(ThemedText, {
|
|
359928
|
+
dimColor: true,
|
|
359929
|
+
children: "\uD83D\uDCDC O Sintetizador está consolidando o veredito..."
|
|
359930
|
+
})
|
|
359931
|
+
})
|
|
359932
|
+
]
|
|
359933
|
+
});
|
|
359934
|
+
}
|
|
359837
359935
|
var jsx_runtime140;
|
|
359838
359936
|
var init_UI15 = __esm(() => {
|
|
359839
359937
|
init_ink2();
|
|
@@ -359874,7 +359972,7 @@ var init_CouncilTool = __esm(() => {
|
|
|
359874
359972
|
CouncilTool = buildTool({
|
|
359875
359973
|
name: COUNCIL_TOOL_NAME,
|
|
359876
359974
|
searchHint: "tribunal do conselho agent advisor multi-perspective debate council panel advisors",
|
|
359877
|
-
maxResultSizeChars:
|
|
359975
|
+
maxResultSizeChars: 150000,
|
|
359878
359976
|
async description() {
|
|
359879
359977
|
return DESCRIPTION9;
|
|
359880
359978
|
},
|
|
@@ -359915,8 +360013,8 @@ var init_CouncilTool = __esm(() => {
|
|
|
359915
360013
|
renderToolUseMessage(input) {
|
|
359916
360014
|
return renderCouncilToolUse(input);
|
|
359917
360015
|
},
|
|
359918
|
-
renderToolUseProgressMessage() {
|
|
359919
|
-
return
|
|
360016
|
+
renderToolUseProgressMessage(progressMessagesForMessage) {
|
|
360017
|
+
return renderCouncilProgress(progressMessagesForMessage);
|
|
359920
360018
|
},
|
|
359921
360019
|
renderToolResultMessage(output) {
|
|
359922
360020
|
if (output.error) {
|
|
@@ -359938,11 +360036,25 @@ var init_CouncilTool = __esm(() => {
|
|
|
359938
360036
|
renderToolUseErrorMessage() {
|
|
359939
360037
|
return null;
|
|
359940
360038
|
},
|
|
359941
|
-
async call(input, context4) {
|
|
360039
|
+
async call(input, context4, _canUseTool, _parentMessage, onProgress) {
|
|
359942
360040
|
const abortController = new AbortController;
|
|
359943
360041
|
const { signal } = abortController;
|
|
360042
|
+
let progressCounter = 0;
|
|
360043
|
+
const emitProgress = (data) => {
|
|
360044
|
+
if (onProgress) {
|
|
360045
|
+
onProgress({
|
|
360046
|
+
toolUseID: `council-progress-${progressCounter++}`,
|
|
360047
|
+
data
|
|
360048
|
+
});
|
|
360049
|
+
}
|
|
360050
|
+
};
|
|
359944
360051
|
try {
|
|
359945
360052
|
if (!input.clarifications) {
|
|
360053
|
+
emitProgress({
|
|
360054
|
+
type: "council_progress",
|
|
360055
|
+
phase: "clarifying",
|
|
360056
|
+
completedRounds: []
|
|
360057
|
+
});
|
|
359946
360058
|
const questions = await generateClarifyingQuestions(input.prompt, signal);
|
|
359947
360059
|
return {
|
|
359948
360060
|
data: {
|
|
@@ -359952,13 +360064,49 @@ var init_CouncilTool = __esm(() => {
|
|
|
359952
360064
|
};
|
|
359953
360065
|
}
|
|
359954
360066
|
const enrichedPrompt = buildEnrichedPrompt(input.prompt, input.clarifications);
|
|
360067
|
+
const maxRounds = input.max_rounds ?? MAX_DEBATE_ROUNDS;
|
|
360068
|
+
const completedRoundSnapshots = [];
|
|
360069
|
+
emitProgress({
|
|
360070
|
+
type: "council_progress",
|
|
360071
|
+
phase: "debating",
|
|
360072
|
+
currentRound: 1,
|
|
360073
|
+
maxRounds,
|
|
360074
|
+
completedRounds: []
|
|
360075
|
+
});
|
|
359955
360076
|
const result = await runCouncilTribunal({
|
|
359956
360077
|
enrichedPrompt,
|
|
359957
360078
|
packId: input.pack ?? "default",
|
|
359958
360079
|
minRounds: input.min_rounds ?? MIN_DEBATE_ROUNDS,
|
|
359959
|
-
maxRounds
|
|
360080
|
+
maxRounds,
|
|
359960
360081
|
customPersonas: input.custom_personas,
|
|
359961
|
-
signal
|
|
360082
|
+
signal,
|
|
360083
|
+
onRoundComplete: (round2) => {
|
|
360084
|
+
completedRoundSnapshots.push({
|
|
360085
|
+
roundNumber: round2.roundNumber,
|
|
360086
|
+
opinions: round2.opinions.map((op) => ({
|
|
360087
|
+
icon: op.icon,
|
|
360088
|
+
memberName: op.memberName,
|
|
360089
|
+
role: op.role,
|
|
360090
|
+
opinion: op.opinion
|
|
360091
|
+
}))
|
|
360092
|
+
});
|
|
360093
|
+
const nextRound = round2.roundNumber + 1;
|
|
360094
|
+
if (nextRound <= maxRounds) {
|
|
360095
|
+
emitProgress({
|
|
360096
|
+
type: "council_progress",
|
|
360097
|
+
phase: "debating",
|
|
360098
|
+
currentRound: nextRound,
|
|
360099
|
+
maxRounds,
|
|
360100
|
+
completedRounds: [...completedRoundSnapshots]
|
|
360101
|
+
});
|
|
360102
|
+
}
|
|
360103
|
+
}
|
|
360104
|
+
});
|
|
360105
|
+
emitProgress({
|
|
360106
|
+
type: "council_progress",
|
|
360107
|
+
phase: "synthesizing",
|
|
360108
|
+
maxRounds,
|
|
360109
|
+
completedRounds: completedRoundSnapshots
|
|
359962
360110
|
});
|
|
359963
360111
|
return {
|
|
359964
360112
|
data: {
|
|
@@ -359991,15 +360139,21 @@ var init_CouncilTool = __esm(() => {
|
|
|
359991
360139
|
`);
|
|
359992
360140
|
return {
|
|
359993
360141
|
type: "tool_result",
|
|
359994
|
-
content: `The Council Tribunal's Messenger has prepared
|
|
360142
|
+
content: `The Council Tribunal's Messenger has prepared ${questions.length} clarifying questions.
|
|
360143
|
+
|
|
360144
|
+
CRITICAL INSTRUCTIONS — YOU MUST FOLLOW THESE EXACTLY:
|
|
360145
|
+
1. Ask EVERY SINGLE question below to the user using AskUserQuestionTool — Multiple questions per call are allowed.
|
|
360146
|
+
2. Do NOT skip, or summarize any questions. Each question must be asked.
|
|
360147
|
+
3. There are exactly ${questions.length} questions. You must make exactly ${questions.length} AskUserQuestionTool calls.
|
|
360148
|
+
4. After collecting ALL ${questions.length} answers, call council_tribunal again with the "clarifications" field.
|
|
359995
360149
|
|
|
359996
|
-
CLARIFYING QUESTIONS:
|
|
359997
|
-
${questionsList}
|
|
360150
|
+
CLARIFYING QUESTIONS:
|
|
360151
|
+
${questionsList}
|
|
359998
360152
|
|
|
359999
|
-
AFTER asking all questions, call council_tribunal again with:
|
|
360000
|
-
- Same "prompt"
|
|
360001
|
-
- "clarifications": { "question text": "user answer", ... }
|
|
360002
|
-
- Same "pack" and other settings`,
|
|
360153
|
+
AFTER asking all ${questions.length} questions, call council_tribunal again with:
|
|
360154
|
+
- Same "prompt"
|
|
360155
|
+
- "clarifications": { "question text": "user answer", ... } with all ${questions.length} question/answer pairs
|
|
360156
|
+
- Same "pack" and other settings`,
|
|
360003
360157
|
tool_use_id: toolUseID
|
|
360004
360158
|
};
|
|
360005
360159
|
}
|
|
@@ -378044,7 +378198,7 @@ function getAnthropicEnvMetadata() {
|
|
|
378044
378198
|
function getBuildAgeMinutes() {
|
|
378045
378199
|
if (false)
|
|
378046
378200
|
;
|
|
378047
|
-
const buildTime = new Date("2026-05-
|
|
378201
|
+
const buildTime = new Date("2026-05-22T13:26:39.918Z").getTime();
|
|
378048
378202
|
if (isNaN(buildTime))
|
|
378049
378203
|
return;
|
|
378050
378204
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -405527,7 +405681,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
405527
405681
|
const client2 = new Client({
|
|
405528
405682
|
name: "claude-code",
|
|
405529
405683
|
title: "ZeroCLI",
|
|
405530
|
-
version: "1.0.
|
|
405684
|
+
version: "1.0.4",
|
|
405531
405685
|
description: "Anthropic's agentic coding tool",
|
|
405532
405686
|
websiteUrl: PRODUCT_URL
|
|
405533
405687
|
}, {
|
|
@@ -405879,7 +406033,7 @@ var init_client7 = __esm(() => {
|
|
|
405879
406033
|
const client2 = new Client({
|
|
405880
406034
|
name: "claude-code",
|
|
405881
406035
|
title: "ZeroCLI",
|
|
405882
|
-
version: "1.0.
|
|
406036
|
+
version: "1.0.4",
|
|
405883
406037
|
description: "Anthropic's agentic coding tool",
|
|
405884
406038
|
websiteUrl: PRODUCT_URL
|
|
405885
406039
|
}, {
|
|
@@ -416614,7 +416768,7 @@ function Feedback({
|
|
|
416614
416768
|
platform: env2.platform,
|
|
416615
416769
|
gitRepo: envInfo.isGit,
|
|
416616
416770
|
terminal: env2.terminal,
|
|
416617
|
-
version: "1.0.
|
|
416771
|
+
version: "1.0.4",
|
|
416618
416772
|
transcript: normalizeMessagesForAPI(messages),
|
|
416619
416773
|
errors: sanitizedErrors,
|
|
416620
416774
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -416807,7 +416961,7 @@ function Feedback({
|
|
|
416807
416961
|
", ",
|
|
416808
416962
|
env2.terminal,
|
|
416809
416963
|
", v",
|
|
416810
|
-
"1.0.
|
|
416964
|
+
"1.0.4"
|
|
416811
416965
|
]
|
|
416812
416966
|
})
|
|
416813
416967
|
]
|
|
@@ -416915,7 +417069,7 @@ ${sanitizedDescription}
|
|
|
416915
417069
|
` + `**Environment Info**
|
|
416916
417070
|
` + `- Platform: ${env2.platform}
|
|
416917
417071
|
` + `- Terminal: ${env2.terminal}
|
|
416918
|
-
` + `- Version: ${"1.0.
|
|
417072
|
+
` + `- Version: ${"1.0.4"}
|
|
416919
417073
|
` + feedbackIdLine + `
|
|
416920
417074
|
**Errors**
|
|
416921
417075
|
\`\`\`json
|
|
@@ -420068,7 +420222,7 @@ function buildPrimarySection() {
|
|
|
420068
420222
|
});
|
|
420069
420223
|
return [{
|
|
420070
420224
|
label: "Version",
|
|
420071
|
-
value: "1.0.
|
|
420225
|
+
value: "1.0.4"
|
|
420072
420226
|
}, {
|
|
420073
420227
|
label: "Session name",
|
|
420074
420228
|
value: nameValue
|
|
@@ -424838,7 +424992,7 @@ function Config({
|
|
|
424838
424992
|
}
|
|
424839
424993
|
})
|
|
424840
424994
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime183.jsx(ChannelDowngradeDialog, {
|
|
424841
|
-
currentVersion: "1.0.
|
|
424995
|
+
currentVersion: "1.0.4",
|
|
424842
424996
|
onChoice: (choice) => {
|
|
424843
424997
|
setShowSubmenu(null);
|
|
424844
424998
|
setTabsHidden(false);
|
|
@@ -424850,7 +425004,7 @@ function Config({
|
|
|
424850
425004
|
autoUpdatesChannel: "stable"
|
|
424851
425005
|
};
|
|
424852
425006
|
if (choice === "stay") {
|
|
424853
|
-
newSettings.minimumVersion = "1.0.
|
|
425007
|
+
newSettings.minimumVersion = "1.0.4";
|
|
424854
425008
|
}
|
|
424855
425009
|
updateSettingsForSource("userSettings", newSettings);
|
|
424856
425010
|
setSettingsData((prev_27) => ({
|
|
@@ -426558,6 +426712,49 @@ var init_config7 = __esm(() => {
|
|
|
426558
426712
|
config_default = config2;
|
|
426559
426713
|
});
|
|
426560
426714
|
|
|
426715
|
+
// src/commands/council/council.ts
|
|
426716
|
+
var command3, council_default;
|
|
426717
|
+
var init_council = __esm(() => {
|
|
426718
|
+
init_i18n();
|
|
426719
|
+
command3 = {
|
|
426720
|
+
type: "prompt",
|
|
426721
|
+
name: "council",
|
|
426722
|
+
aliases: ["conselho", "tribunal"],
|
|
426723
|
+
description: t("cmd_council"),
|
|
426724
|
+
progressMessage: "convening the Council Tribunal",
|
|
426725
|
+
contentLength: 0,
|
|
426726
|
+
source: "builtin",
|
|
426727
|
+
async getPromptForCommand(args) {
|
|
426728
|
+
const userPrompt = args.trim();
|
|
426729
|
+
if (!userPrompt) {
|
|
426730
|
+
return [
|
|
426731
|
+
{
|
|
426732
|
+
type: "text",
|
|
426733
|
+
text: `The user wants to invoke the Council Tribunal (Tribunal do Conselho). They haven't specified a topic yet. Use the council_tribunal tool — call it with a prompt asking what they'd like the council to deliberate on. Start by asking the user what question or dilemma they'd like the Council to analyze.`
|
|
426734
|
+
}
|
|
426735
|
+
];
|
|
426736
|
+
}
|
|
426737
|
+
return [
|
|
426738
|
+
{
|
|
426739
|
+
type: "text",
|
|
426740
|
+
text: `The user has invoked the Council Tribunal (Tribunal do Conselho) with this topic: "${userPrompt}"
|
|
426741
|
+
|
|
426742
|
+
Use the council_tribunal tool immediately with this prompt. Follow the two-phase workflow:
|
|
426743
|
+
1. First call council_tribunal with just the prompt to get clarifying questions
|
|
426744
|
+
2. Ask each clarifying question to the user via AskUserQuestionTool
|
|
426745
|
+
3. Then call council_tribunal again with the clarifications to start the debate`
|
|
426746
|
+
}
|
|
426747
|
+
];
|
|
426748
|
+
}
|
|
426749
|
+
};
|
|
426750
|
+
council_default = command3;
|
|
426751
|
+
});
|
|
426752
|
+
|
|
426753
|
+
// src/commands/council/index.ts
|
|
426754
|
+
var init_council2 = __esm(() => {
|
|
426755
|
+
init_council();
|
|
426756
|
+
});
|
|
426757
|
+
|
|
426561
426758
|
// src/utils/contextSuggestions.ts
|
|
426562
426759
|
function generateContextSuggestions(data) {
|
|
426563
426760
|
const suggestions = [];
|
|
@@ -431791,7 +431988,7 @@ function UpdateScreen({ onDone }) {
|
|
|
431791
431988
|
setState({ type: "dev-build" });
|
|
431792
431989
|
return;
|
|
431793
431990
|
}
|
|
431794
|
-
const currentVersion = "1.0.
|
|
431991
|
+
const currentVersion = "1.0.4";
|
|
431795
431992
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
431796
431993
|
const latestVersion = await getLatestVersion(channel2);
|
|
431797
431994
|
if (!latestVersion) {
|
|
@@ -432779,8 +432976,8 @@ import {
|
|
|
432779
432976
|
spawnSync as spawnSync3
|
|
432780
432977
|
} from "child_process";
|
|
432781
432978
|
import { basename as basename38 } from "path";
|
|
432782
|
-
function isCommandAvailable3(
|
|
432783
|
-
return !!whichSync(
|
|
432979
|
+
function isCommandAvailable3(command4) {
|
|
432980
|
+
return !!whichSync(command4);
|
|
432784
432981
|
}
|
|
432785
432982
|
function classifyGuiEditor(editor) {
|
|
432786
432983
|
const base2 = basename38(editor.split(" ")[0] ?? "");
|
|
@@ -432879,7 +433076,7 @@ var init_editor = __esm(() => {
|
|
|
432879
433076
|
return "start /wait notepad";
|
|
432880
433077
|
}
|
|
432881
433078
|
const editors = ["code", "vi", "nano"];
|
|
432882
|
-
return editors.find((
|
|
433079
|
+
return editors.find((command4) => isCommandAvailable3(command4));
|
|
432883
433080
|
});
|
|
432884
433081
|
});
|
|
432885
433082
|
|
|
@@ -433902,7 +434099,7 @@ function HelpV2(t0) {
|
|
|
433902
434099
|
let t6;
|
|
433903
434100
|
if ($2[31] !== tabs) {
|
|
433904
434101
|
t6 = /* @__PURE__ */ jsx_runtime213.jsx(Tabs, {
|
|
433905
|
-
title: `ZeroCLI v${"1.0.
|
|
434102
|
+
title: `ZeroCLI v${"1.0.4"}`,
|
|
433906
434103
|
color: "professionalBlue",
|
|
433907
434104
|
defaultTab: "general",
|
|
433908
434105
|
children: tabs
|
|
@@ -435160,12 +435357,12 @@ When building the list, work through these checks and include only what applies:
|
|
|
435160
435357
|
- If you found gaps in Phase 7 (missing GitHub CLI, missing linting) and the user said no: list them here with a one-line reason why each helps.
|
|
435161
435358
|
- If tests are missing or sparse: suggest setting up a test framework so Zero can verify its own changes.
|
|
435162
435359
|
- To help you create skills and optimize existing skills using evals, ZeroCLI has an official skill-creator plugin you can install. Install it with \`/plugin install skill-creator@claude-plugins-official\`, then run \`/skill-creator <skill-name>\` to create new skills or refine any existing skill. (Always include this one.)
|
|
435163
|
-
- Browse official plugins with \`/plugin\` — these bundle skills, agents, hooks, and MCP servers that you may find helpful. You can also create your own custom plugins to share them with others. (Always include this one.)`,
|
|
435360
|
+
- Browse official plugins with \`/plugin\` — these bundle skills, agents, hooks, and MCP servers that you may find helpful. You can also create your own custom plugins to share them with others. (Always include this one.)`, command4, init_default3;
|
|
435164
435361
|
var init_init = __esm(() => {
|
|
435165
435362
|
init_projectOnboardingState();
|
|
435166
435363
|
init_initMode();
|
|
435167
435364
|
init_i18n();
|
|
435168
|
-
|
|
435365
|
+
command4 = {
|
|
435169
435366
|
type: "prompt",
|
|
435170
435367
|
name: "init",
|
|
435171
435368
|
get description() {
|
|
@@ -435184,14 +435381,14 @@ var init_init = __esm(() => {
|
|
|
435184
435381
|
];
|
|
435185
435382
|
}
|
|
435186
435383
|
};
|
|
435187
|
-
init_default3 =
|
|
435384
|
+
init_default3 = command4;
|
|
435188
435385
|
});
|
|
435189
435386
|
|
|
435190
435387
|
// src/commands/init-verifiers.ts
|
|
435191
|
-
var
|
|
435388
|
+
var command5, init_verifiers_default;
|
|
435192
435389
|
var init_init_verifiers = __esm(() => {
|
|
435193
435390
|
init_i18n();
|
|
435194
|
-
|
|
435391
|
+
command5 = {
|
|
435195
435392
|
type: "prompt",
|
|
435196
435393
|
name: "init-verifiers",
|
|
435197
435394
|
description: t("cmd_init_verifiers"),
|
|
@@ -435448,7 +435645,7 @@ After writing the skill file(s), inform the user:
|
|
|
435448
435645
|
];
|
|
435449
435646
|
}
|
|
435450
435647
|
};
|
|
435451
|
-
init_verifiers_default =
|
|
435648
|
+
init_verifiers_default = command5;
|
|
435452
435649
|
});
|
|
435453
435650
|
|
|
435454
435651
|
// src/keybindings/template.ts
|
|
@@ -451753,8 +451950,8 @@ function parsePluginArgs(args) {
|
|
|
451753
451950
|
return { type: "menu" };
|
|
451754
451951
|
}
|
|
451755
451952
|
const parts = args.trim().split(/\s+/);
|
|
451756
|
-
const
|
|
451757
|
-
switch (
|
|
451953
|
+
const command6 = parts[0]?.toLowerCase();
|
|
451954
|
+
switch (command6) {
|
|
451758
451955
|
case "help":
|
|
451759
451956
|
case "--help":
|
|
451760
451957
|
case "-h":
|
|
@@ -458746,7 +458943,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
458746
458943
|
return [];
|
|
458747
458944
|
}
|
|
458748
458945
|
}
|
|
458749
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.0.
|
|
458946
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.0.4") {
|
|
458750
458947
|
if (process.env.USER_TYPE === "ant") {
|
|
458751
458948
|
const changelog = MACRO.VERSION_CHANGELOG;
|
|
458752
458949
|
if (changelog) {
|
|
@@ -465817,11 +466014,11 @@ function checkCrossProjectResume(log, showAllProjects, worktreePaths) {
|
|
|
465817
466014
|
}
|
|
465818
466015
|
if (process.env.USER_TYPE !== "ant") {
|
|
465819
466016
|
const sessionId2 = getSessionIdFromLog(log);
|
|
465820
|
-
const
|
|
466017
|
+
const command7 = `cd ${quote([log.projectPath])} && claude --resume ${sessionId2}`;
|
|
465821
466018
|
return {
|
|
465822
466019
|
isCrossProject: true,
|
|
465823
466020
|
isSameRepoWorktree: false,
|
|
465824
|
-
command:
|
|
466021
|
+
command: command7,
|
|
465825
466022
|
projectPath: log.projectPath
|
|
465826
466023
|
};
|
|
465827
466024
|
}
|
|
@@ -465834,11 +466031,11 @@ function checkCrossProjectResume(log, showAllProjects, worktreePaths) {
|
|
|
465834
466031
|
};
|
|
465835
466032
|
}
|
|
465836
466033
|
const sessionId = getSessionIdFromLog(log);
|
|
465837
|
-
const
|
|
466034
|
+
const command6 = `cd ${quote([log.projectPath])} && claude --resume ${sessionId}`;
|
|
465838
466035
|
return {
|
|
465839
466036
|
isCrossProject: true,
|
|
465840
466037
|
isSameRepoWorktree: false,
|
|
465841
|
-
command:
|
|
466038
|
+
command: command6,
|
|
465842
466039
|
projectPath: log.projectPath
|
|
465843
466040
|
};
|
|
465844
466041
|
}
|
|
@@ -466278,7 +466475,7 @@ ${reasons}`
|
|
|
466278
466475
|
}
|
|
466279
466476
|
};
|
|
466280
466477
|
let session;
|
|
466281
|
-
let
|
|
466478
|
+
let command6;
|
|
466282
466479
|
let target;
|
|
466283
466480
|
if (isPrNumber) {
|
|
466284
466481
|
const repo = await detectCurrentRepositoryWithHost();
|
|
@@ -466298,7 +466495,7 @@ ${reasons}`
|
|
|
466298
466495
|
...commonEnvVars
|
|
466299
466496
|
}
|
|
466300
466497
|
});
|
|
466301
|
-
|
|
466498
|
+
command6 = `/ultrareview ${prNumber}`;
|
|
466302
466499
|
target = `${repo.owner}/${repo.name}#${prNumber}`;
|
|
466303
466500
|
} else {
|
|
466304
466501
|
const baseBranch = await getDefaultBranch() || "main";
|
|
@@ -466343,7 +466540,7 @@ ${reasons}`
|
|
|
466343
466540
|
}
|
|
466344
466541
|
];
|
|
466345
466542
|
}
|
|
466346
|
-
|
|
466543
|
+
command6 = "/ultrareview";
|
|
466347
466544
|
target = baseBranch;
|
|
466348
466545
|
}
|
|
466349
466546
|
if (!session) {
|
|
@@ -466353,7 +466550,7 @@ ${reasons}`
|
|
|
466353
466550
|
registerRemoteAgentTask({
|
|
466354
466551
|
remoteTaskType: "ultrareview",
|
|
466355
466552
|
session,
|
|
466356
|
-
command:
|
|
466553
|
+
command: command6,
|
|
466357
466554
|
context: context5,
|
|
466358
466555
|
isRemoteReview: true
|
|
466359
466556
|
});
|
|
@@ -473082,17 +473279,17 @@ var init_vim = __esm(() => {
|
|
|
473082
473279
|
});
|
|
473083
473280
|
|
|
473084
473281
|
// src/commands/vim/index.ts
|
|
473085
|
-
var
|
|
473282
|
+
var command6, vim_default;
|
|
473086
473283
|
var init_vim2 = __esm(() => {
|
|
473087
473284
|
init_i18n();
|
|
473088
|
-
|
|
473285
|
+
command6 = {
|
|
473089
473286
|
name: "vim",
|
|
473090
473287
|
description: t("cmd_vim"),
|
|
473091
473288
|
supportsNonInteractive: false,
|
|
473092
473289
|
type: "local",
|
|
473093
473290
|
load: () => Promise.resolve().then(() => (init_vim(), exports_vim))
|
|
473094
473291
|
};
|
|
473095
|
-
vim_default =
|
|
473292
|
+
vim_default = command6;
|
|
473096
473293
|
});
|
|
473097
473294
|
|
|
473098
473295
|
// src/commands/thinkback/thinkback.tsx
|
|
@@ -487395,10 +487592,10 @@ var init_agents2 = __esm(() => {
|
|
|
487395
487592
|
});
|
|
487396
487593
|
|
|
487397
487594
|
// src/commands/auto-fix.ts
|
|
487398
|
-
var
|
|
487595
|
+
var command7, auto_fix_default;
|
|
487399
487596
|
var init_auto_fix = __esm(() => {
|
|
487400
487597
|
init_i18n();
|
|
487401
|
-
|
|
487598
|
+
command7 = {
|
|
487402
487599
|
name: "auto-fix",
|
|
487403
487600
|
description: t("cmd_auto_fix"),
|
|
487404
487601
|
isEnabled: () => true,
|
|
@@ -487430,7 +487627,7 @@ var init_auto_fix = __esm(() => {
|
|
|
487430
487627
|
];
|
|
487431
487628
|
}
|
|
487432
487629
|
};
|
|
487433
|
-
auto_fix_default =
|
|
487630
|
+
auto_fix_default = command7;
|
|
487434
487631
|
});
|
|
487435
487632
|
|
|
487436
487633
|
// src/commands/plugin/plugin.tsx
|
|
@@ -487784,7 +487981,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
487784
487981
|
smapsRollup,
|
|
487785
487982
|
platform: process.platform,
|
|
487786
487983
|
nodeVersion: process.version,
|
|
487787
|
-
ccVersion: "1.0.
|
|
487984
|
+
ccVersion: "1.0.4"
|
|
487788
487985
|
};
|
|
487789
487986
|
}
|
|
487790
487987
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -488371,7 +488568,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
488371
488568
|
var call60 = async () => {
|
|
488372
488569
|
return {
|
|
488373
488570
|
type: "text",
|
|
488374
|
-
value: `${"1.0.
|
|
488571
|
+
value: `${"1.0.4"} (built ${"2026-05-22T13:26:39.918Z"})`
|
|
488375
488572
|
};
|
|
488376
488573
|
}, version2, version_default;
|
|
488377
488574
|
var init_version = __esm(() => {
|
|
@@ -490097,11 +490294,11 @@ var init_sandbox_toggle = __esm(() => {
|
|
|
490097
490294
|
});
|
|
490098
490295
|
|
|
490099
490296
|
// src/commands/sandbox-toggle/index.ts
|
|
490100
|
-
var
|
|
490297
|
+
var command8, sandbox_toggle_default;
|
|
490101
490298
|
var init_sandbox_toggle2 = __esm(() => {
|
|
490102
490299
|
init_figures();
|
|
490103
490300
|
init_sandbox_adapter();
|
|
490104
|
-
|
|
490301
|
+
command8 = {
|
|
490105
490302
|
name: "sandbox",
|
|
490106
490303
|
get description() {
|
|
490107
490304
|
const currentlyEnabled = SandboxManager2.isSandboxingEnabled();
|
|
@@ -490133,7 +490330,7 @@ var init_sandbox_toggle2 = __esm(() => {
|
|
|
490133
490330
|
type: "local-jsx",
|
|
490134
490331
|
load: () => Promise.resolve().then(() => (init_sandbox_toggle(), exports_sandbox_toggle))
|
|
490135
490332
|
};
|
|
490136
|
-
sandbox_toggle_default =
|
|
490333
|
+
sandbox_toggle_default = command8;
|
|
490137
490334
|
});
|
|
490138
490335
|
|
|
490139
490336
|
// src/utils/claudeInChrome/setupPortable.ts
|
|
@@ -490339,18 +490536,18 @@ function registerWindowsNativeHosts(manifestPath) {
|
|
|
490339
490536
|
});
|
|
490340
490537
|
}
|
|
490341
490538
|
}
|
|
490342
|
-
async function createWrapperScript(
|
|
490539
|
+
async function createWrapperScript(command9) {
|
|
490343
490540
|
const platform5 = getPlatform();
|
|
490344
490541
|
const chromeDir = join127(getZeroConfigHomeDir(), "chrome");
|
|
490345
490542
|
const wrapperPath = platform5 === "windows" ? join127(chromeDir, "chrome-native-host.bat") : join127(chromeDir, "chrome-native-host");
|
|
490346
490543
|
const scriptContent = platform5 === "windows" ? `@echo off
|
|
490347
490544
|
REM Chrome native host wrapper script
|
|
490348
490545
|
REM Generated by ZeroCLI - do not edit manually
|
|
490349
|
-
${
|
|
490546
|
+
${command9}
|
|
490350
490547
|
` : `#!/bin/sh
|
|
490351
490548
|
# Chrome native host wrapper script
|
|
490352
490549
|
# Generated by ZeroCLI - do not edit manually
|
|
490353
|
-
exec ${
|
|
490550
|
+
exec ${command9}
|
|
490354
490551
|
`;
|
|
490355
490552
|
const existingContent = await readFile46(wrapperPath, "utf-8").catch(() => null);
|
|
490356
490553
|
if (existingContent === scriptContent) {
|
|
@@ -490801,11 +490998,11 @@ var init_chrome = __esm(() => {
|
|
|
490801
490998
|
});
|
|
490802
490999
|
|
|
490803
491000
|
// src/commands/chrome/index.ts
|
|
490804
|
-
var
|
|
491001
|
+
var command9, chrome_default;
|
|
490805
491002
|
var init_chrome2 = __esm(() => {
|
|
490806
491003
|
init_state();
|
|
490807
491004
|
init_i18n();
|
|
490808
|
-
|
|
491005
|
+
command9 = {
|
|
490809
491006
|
name: "chrome",
|
|
490810
491007
|
description: t("cmd_chrome"),
|
|
490811
491008
|
availability: [],
|
|
@@ -490813,7 +491010,7 @@ var init_chrome2 = __esm(() => {
|
|
|
490813
491010
|
type: "local-jsx",
|
|
490814
491011
|
load: () => Promise.resolve().then(() => (init_chrome(), exports_chrome))
|
|
490815
491012
|
};
|
|
490816
|
-
chrome_default =
|
|
491013
|
+
chrome_default = command9;
|
|
490817
491014
|
});
|
|
490818
491015
|
|
|
490819
491016
|
// src/commands/stickers/stickers.ts
|
|
@@ -491121,7 +491318,7 @@ function registerBundledSkill(definition) {
|
|
|
491121
491318
|
return prependBaseDir(blocks, extractedDir);
|
|
491122
491319
|
};
|
|
491123
491320
|
}
|
|
491124
|
-
const
|
|
491321
|
+
const command10 = {
|
|
491125
491322
|
type: "prompt",
|
|
491126
491323
|
name: definition.name,
|
|
491127
491324
|
description: definition.description,
|
|
@@ -491145,7 +491342,7 @@ function registerBundledSkill(definition) {
|
|
|
491145
491342
|
progressMessage: "running",
|
|
491146
491343
|
getPromptForCommand
|
|
491147
491344
|
};
|
|
491148
|
-
bundledSkills.push(
|
|
491345
|
+
bundledSkills.push(command10);
|
|
491149
491346
|
}
|
|
491150
491347
|
function getBundledSkills() {
|
|
491151
491348
|
return [...bundledSkills];
|
|
@@ -497167,10 +497364,10 @@ function extractToolStats(log) {
|
|
|
497167
497364
|
`) + 1;
|
|
497168
497365
|
}
|
|
497169
497366
|
}
|
|
497170
|
-
const
|
|
497171
|
-
if (
|
|
497367
|
+
const command10 = input.command || "";
|
|
497368
|
+
if (command10.includes("git commit"))
|
|
497172
497369
|
gitCommits++;
|
|
497173
|
-
if (
|
|
497370
|
+
if (command10.includes("git push"))
|
|
497174
497371
|
gitPushes++;
|
|
497175
497372
|
}
|
|
497176
497373
|
}
|
|
@@ -498528,7 +498725,7 @@ function generateHtmlReport(data, insights) {
|
|
|
498528
498725
|
function buildExportData(data, insights, facets) {
|
|
498529
498726
|
let version3;
|
|
498530
498727
|
try {
|
|
498531
|
-
version3 = "1.0.
|
|
498728
|
+
version3 = "1.0.4";
|
|
498532
498729
|
} catch {
|
|
498533
498730
|
version3 = "unknown";
|
|
498534
498731
|
}
|
|
@@ -499234,14 +499431,14 @@ function hasCommand(commandName, commands) {
|
|
|
499234
499431
|
return findCommand(commandName, commands) !== undefined;
|
|
499235
499432
|
}
|
|
499236
499433
|
function getCommand(commandName, commands) {
|
|
499237
|
-
const
|
|
499238
|
-
if (!
|
|
499434
|
+
const command10 = findCommand(commandName, commands);
|
|
499435
|
+
if (!command10) {
|
|
499239
499436
|
throw ReferenceError(`Command ${commandName} not found. Available commands: ${commands.map((_) => {
|
|
499240
499437
|
const name = getCommandName(_);
|
|
499241
499438
|
return _.aliases ? `${name} (aliases: ${_.aliases.join(", ")})` : name;
|
|
499242
499439
|
}).sort((a2, b) => a2.localeCompare(b)).join(", ")}`);
|
|
499243
499440
|
}
|
|
499244
|
-
return
|
|
499441
|
+
return command10;
|
|
499245
499442
|
}
|
|
499246
499443
|
function formatDescriptionWithSource(cmd) {
|
|
499247
499444
|
if (cmd.type !== "prompt") {
|
|
@@ -499282,6 +499479,7 @@ var init_commands2 = __esm(() => {
|
|
|
499282
499479
|
init_commit_push_pr();
|
|
499283
499480
|
init_compact3();
|
|
499284
499481
|
init_config7();
|
|
499482
|
+
init_council2();
|
|
499285
499483
|
init_context4();
|
|
499286
499484
|
init_cost2();
|
|
499287
499485
|
init_diff4();
|
|
@@ -499438,6 +499636,7 @@ var init_commands2 = __esm(() => {
|
|
|
499438
499636
|
color_default,
|
|
499439
499637
|
compact_default,
|
|
499440
499638
|
config_default,
|
|
499639
|
+
council_default,
|
|
499441
499640
|
copy_default,
|
|
499442
499641
|
desktop_default,
|
|
499443
499642
|
context4,
|
|
@@ -502724,7 +502923,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
502724
502923
|
init_slowOperations();
|
|
502725
502924
|
init_uuid();
|
|
502726
502925
|
try {
|
|
502727
|
-
VERSION7 = "1.0.
|
|
502926
|
+
VERSION7 = "1.0.4";
|
|
502728
502927
|
} catch {
|
|
502729
502928
|
VERSION7 = "unknown";
|
|
502730
502929
|
}
|
|
@@ -504045,7 +504244,7 @@ var init_filesystem = __esm(() => {
|
|
|
504045
504244
|
});
|
|
504046
504245
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
504047
504246
|
const nonce = randomBytes17(16).toString("hex");
|
|
504048
|
-
return join137(getZeroTempDir(), "bundled-skills", "1.0.
|
|
504247
|
+
return join137(getZeroTempDir(), "bundled-skills", "1.0.4", nonce);
|
|
504049
504248
|
});
|
|
504050
504249
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
504051
504250
|
});
|
|
@@ -506617,7 +506816,7 @@ function executeInBackground({
|
|
|
506617
506816
|
asyncResponse,
|
|
506618
506817
|
hookEvent,
|
|
506619
506818
|
hookName,
|
|
506620
|
-
command:
|
|
506819
|
+
command: command10,
|
|
506621
506820
|
asyncRewake,
|
|
506622
506821
|
pluginId
|
|
506623
506822
|
}) {
|
|
@@ -506655,7 +506854,7 @@ function executeInBackground({
|
|
|
506655
506854
|
asyncResponse,
|
|
506656
506855
|
hookEvent,
|
|
506657
506856
|
hookName,
|
|
506658
|
-
command:
|
|
506857
|
+
command: command10,
|
|
506659
506858
|
shellCommand,
|
|
506660
506859
|
pluginId
|
|
506661
506860
|
});
|
|
@@ -506772,7 +506971,7 @@ function parseHttpHookOutput(body) {
|
|
|
506772
506971
|
}
|
|
506773
506972
|
function processHookJSONOutput({
|
|
506774
506973
|
json: json2,
|
|
506775
|
-
command:
|
|
506974
|
+
command: command10,
|
|
506776
506975
|
hookName,
|
|
506777
506976
|
toolUseID,
|
|
506778
506977
|
hookEvent,
|
|
@@ -506799,7 +506998,7 @@ function processHookJSONOutput({
|
|
|
506799
506998
|
result.permissionBehavior = "deny";
|
|
506800
506999
|
result.blockingError = {
|
|
506801
507000
|
blockingError: json2.reason || "Blocked by hook",
|
|
506802
|
-
command:
|
|
507001
|
+
command: command10
|
|
506803
507002
|
};
|
|
506804
507003
|
break;
|
|
506805
507004
|
default:
|
|
@@ -506818,7 +507017,7 @@ function processHookJSONOutput({
|
|
|
506818
507017
|
result.permissionBehavior = "deny";
|
|
506819
507018
|
result.blockingError = {
|
|
506820
507019
|
blockingError: json2.reason || "Blocked by hook",
|
|
506821
|
-
command:
|
|
507020
|
+
command: command10
|
|
506822
507021
|
};
|
|
506823
507022
|
break;
|
|
506824
507023
|
case "ask":
|
|
@@ -506846,7 +507045,7 @@ function processHookJSONOutput({
|
|
|
506846
507045
|
result.permissionBehavior = "deny";
|
|
506847
507046
|
result.blockingError = {
|
|
506848
507047
|
blockingError: json2.hookSpecificOutput.permissionDecisionReason || json2.reason || "Blocked by hook",
|
|
506849
|
-
command:
|
|
507048
|
+
command: command10
|
|
506850
507049
|
};
|
|
506851
507050
|
break;
|
|
506852
507051
|
case "ask":
|
|
@@ -506906,7 +507105,7 @@ function processHookJSONOutput({
|
|
|
506906
507105
|
if (json2.hookSpecificOutput.action === "decline") {
|
|
506907
507106
|
result.blockingError = {
|
|
506908
507107
|
blockingError: json2.reason || "Elicitation denied by hook",
|
|
506909
|
-
command:
|
|
507108
|
+
command: command10
|
|
506910
507109
|
};
|
|
506911
507110
|
}
|
|
506912
507111
|
}
|
|
@@ -506920,7 +507119,7 @@ function processHookJSONOutput({
|
|
|
506920
507119
|
if (json2.hookSpecificOutput.action === "decline") {
|
|
506921
507120
|
result.blockingError = {
|
|
506922
507121
|
blockingError: json2.reason || "Elicitation result blocked by hook",
|
|
506923
|
-
command:
|
|
507122
|
+
command: command10
|
|
506924
507123
|
};
|
|
506925
507124
|
}
|
|
506926
507125
|
}
|
|
@@ -506944,7 +507143,7 @@ function processHookJSONOutput({
|
|
|
506944
507143
|
stdout,
|
|
506945
507144
|
stderr,
|
|
506946
507145
|
exitCode,
|
|
506947
|
-
command:
|
|
507146
|
+
command: command10,
|
|
506948
507147
|
durationMs
|
|
506949
507148
|
})
|
|
506950
507149
|
};
|
|
@@ -506959,29 +507158,29 @@ async function execCommandHook(hook, hookEvent, hookName, jsonInput, signal, hoo
|
|
|
506959
507158
|
const isPowerShell = shellType === "powershell";
|
|
506960
507159
|
const toHookPath = isWindows2 && !isPowerShell ? (p) => windowsPathToPosixPath(p) : (p) => p;
|
|
506961
507160
|
const projectDir = getProjectRoot();
|
|
506962
|
-
let
|
|
507161
|
+
let command10 = hook.command;
|
|
506963
507162
|
let pluginOpts;
|
|
506964
507163
|
if (pluginRoot) {
|
|
506965
507164
|
if (!await pathExists(pluginRoot)) {
|
|
506966
507165
|
throw new Error(`Plugin directory does not exist: ${pluginRoot}` + (pluginId ? ` (${pluginId} — run /plugin to reinstall)` : ""));
|
|
506967
507166
|
}
|
|
506968
507167
|
const rootPath = toHookPath(pluginRoot);
|
|
506969
|
-
|
|
507168
|
+
command10 = command10.replace(/\$\{CLAUDE_PLUGIN_ROOT\}/g, () => rootPath);
|
|
506970
507169
|
if (pluginId) {
|
|
506971
507170
|
const dataPath = toHookPath(getPluginDataDir(pluginId));
|
|
506972
|
-
|
|
507171
|
+
command10 = command10.replace(/\$\{CLAUDE_PLUGIN_DATA\}/g, () => dataPath);
|
|
506973
507172
|
}
|
|
506974
507173
|
if (pluginId) {
|
|
506975
507174
|
pluginOpts = loadPluginOptions(pluginId);
|
|
506976
|
-
|
|
507175
|
+
command10 = substituteUserConfigVariables(command10, pluginOpts);
|
|
506977
507176
|
}
|
|
506978
507177
|
}
|
|
506979
|
-
if (isWindows2 && !isPowerShell &&
|
|
506980
|
-
if (!
|
|
506981
|
-
|
|
507178
|
+
if (isWindows2 && !isPowerShell && command10.trim().match(/\.sh(\s|$|")/)) {
|
|
507179
|
+
if (!command10.trim().startsWith("bash ")) {
|
|
507180
|
+
command10 = `bash ${command10}`;
|
|
506982
507181
|
}
|
|
506983
507182
|
}
|
|
506984
|
-
const finalCommand = !isPowerShell && process.env.CLAUDE_CODE_SHELL_PREFIX ? formatShellPrefixCommand(process.env.CLAUDE_CODE_SHELL_PREFIX,
|
|
507183
|
+
const finalCommand = !isPowerShell && process.env.CLAUDE_CODE_SHELL_PREFIX ? formatShellPrefixCommand(process.env.CLAUDE_CODE_SHELL_PREFIX, command10) : command10;
|
|
506985
507184
|
const hookTimeoutMs = hook.timeout ? hook.timeout * 1000 : TOOL_HOOK_EXECUTION_TIMEOUT_MS;
|
|
506986
507185
|
const envVars = {
|
|
506987
507186
|
...subprocessEnv(),
|
|
@@ -511392,8 +511591,8 @@ var require_help = __commonJS((exports) => {
|
|
|
511392
511591
|
return argument.name();
|
|
511393
511592
|
}
|
|
511394
511593
|
longestSubcommandTermLength(cmd, helper) {
|
|
511395
|
-
return helper.visibleCommands(cmd).reduce((max2,
|
|
511396
|
-
return Math.max(max2, helper.subcommandTerm(
|
|
511594
|
+
return helper.visibleCommands(cmd).reduce((max2, command10) => {
|
|
511595
|
+
return Math.max(max2, helper.subcommandTerm(command10).length);
|
|
511397
511596
|
}, 0);
|
|
511398
511597
|
}
|
|
511399
511598
|
longestOptionTermLength(cmd, helper) {
|
|
@@ -511857,8 +512056,8 @@ var require_command = __commonJS((exports) => {
|
|
|
511857
512056
|
}
|
|
511858
512057
|
_getCommandAndAncestors() {
|
|
511859
512058
|
const result = [];
|
|
511860
|
-
for (let
|
|
511861
|
-
result.push(
|
|
512059
|
+
for (let command10 = this;command10; command10 = command10.parent) {
|
|
512060
|
+
result.push(command10);
|
|
511862
512061
|
}
|
|
511863
512062
|
return result;
|
|
511864
512063
|
}
|
|
@@ -512068,17 +512267,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512068
512267
|
}
|
|
512069
512268
|
this.options.push(option);
|
|
512070
512269
|
}
|
|
512071
|
-
_registerCommand(
|
|
512270
|
+
_registerCommand(command10) {
|
|
512072
512271
|
const knownBy = (cmd) => {
|
|
512073
512272
|
return [cmd.name()].concat(cmd.aliases());
|
|
512074
512273
|
};
|
|
512075
|
-
const alreadyUsed = knownBy(
|
|
512274
|
+
const alreadyUsed = knownBy(command10).find((name) => this._findCommand(name));
|
|
512076
512275
|
if (alreadyUsed) {
|
|
512077
512276
|
const existingCmd = knownBy(this._findCommand(alreadyUsed)).join("|");
|
|
512078
|
-
const newCmd = knownBy(
|
|
512277
|
+
const newCmd = knownBy(command10).join("|");
|
|
512079
512278
|
throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);
|
|
512080
512279
|
}
|
|
512081
|
-
this.commands.push(
|
|
512280
|
+
this.commands.push(command10);
|
|
512082
512281
|
}
|
|
512083
512282
|
addOption(option) {
|
|
512084
512283
|
this._registerOption(option);
|
|
@@ -512770,12 +512969,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512770
512969
|
let suggestion = "";
|
|
512771
512970
|
if (flag.startsWith("--") && this._showSuggestionAfterError) {
|
|
512772
512971
|
let candidateFlags = [];
|
|
512773
|
-
let
|
|
512972
|
+
let command10 = this;
|
|
512774
512973
|
do {
|
|
512775
|
-
const moreFlags =
|
|
512974
|
+
const moreFlags = command10.createHelp().visibleOptions(command10).filter((option) => option.long).map((option) => option.long);
|
|
512776
512975
|
candidateFlags = candidateFlags.concat(moreFlags);
|
|
512777
|
-
|
|
512778
|
-
} while (
|
|
512976
|
+
command10 = command10.parent;
|
|
512977
|
+
} while (command10 && !command10._enablePositionalOptions);
|
|
512779
512978
|
suggestion = suggestSimilar(flag, candidateFlags);
|
|
512780
512979
|
}
|
|
512781
512980
|
const message = `error: unknown option '${flag}'${suggestion}`;
|
|
@@ -512795,10 +512994,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512795
512994
|
let suggestion = "";
|
|
512796
512995
|
if (this._showSuggestionAfterError) {
|
|
512797
512996
|
const candidateNames = [];
|
|
512798
|
-
this.createHelp().visibleCommands(this).forEach((
|
|
512799
|
-
candidateNames.push(
|
|
512800
|
-
if (
|
|
512801
|
-
candidateNames.push(
|
|
512997
|
+
this.createHelp().visibleCommands(this).forEach((command10) => {
|
|
512998
|
+
candidateNames.push(command10.name());
|
|
512999
|
+
if (command10.alias())
|
|
513000
|
+
candidateNames.push(command10.alias());
|
|
512802
513001
|
});
|
|
512803
513002
|
suggestion = suggestSimilar(unknownName, candidateNames);
|
|
512804
513003
|
}
|
|
@@ -512839,18 +513038,18 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512839
513038
|
alias(alias) {
|
|
512840
513039
|
if (alias === undefined)
|
|
512841
513040
|
return this._aliases[0];
|
|
512842
|
-
let
|
|
513041
|
+
let command10 = this;
|
|
512843
513042
|
if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {
|
|
512844
|
-
|
|
513043
|
+
command10 = this.commands[this.commands.length - 1];
|
|
512845
513044
|
}
|
|
512846
|
-
if (alias ===
|
|
513045
|
+
if (alias === command10._name)
|
|
512847
513046
|
throw new Error("Command alias can't be the same as its name");
|
|
512848
513047
|
const matchingCommand = this.parent?._findCommand(alias);
|
|
512849
513048
|
if (matchingCommand) {
|
|
512850
513049
|
const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join("|");
|
|
512851
513050
|
throw new Error(`cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`);
|
|
512852
513051
|
}
|
|
512853
|
-
|
|
513052
|
+
command10._aliases.push(alias);
|
|
512854
513053
|
return this;
|
|
512855
513054
|
}
|
|
512856
513055
|
aliases(aliases) {
|
|
@@ -512914,7 +513113,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512914
513113
|
contextOptions = undefined;
|
|
512915
513114
|
}
|
|
512916
513115
|
const context5 = this._getHelpContext(contextOptions);
|
|
512917
|
-
this._getCommandAndAncestors().reverse().forEach((
|
|
513116
|
+
this._getCommandAndAncestors().reverse().forEach((command10) => command10.emit("beforeAllHelp", context5));
|
|
512918
513117
|
this.emit("beforeHelp", context5);
|
|
512919
513118
|
let helpInformation = this.helpInformation(context5);
|
|
512920
513119
|
if (deprecatedCallback) {
|
|
@@ -512928,7 +513127,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512928
513127
|
this.emit(this._getHelpOption().long);
|
|
512929
513128
|
}
|
|
512930
513129
|
this.emit("afterHelp", context5);
|
|
512931
|
-
this._getCommandAndAncestors().forEach((
|
|
513130
|
+
this._getCommandAndAncestors().forEach((command10) => command10.emit("afterAllHelp", context5));
|
|
512932
513131
|
}
|
|
512933
513132
|
helpOption(flags, description) {
|
|
512934
513133
|
if (typeof flags === "boolean") {
|
|
@@ -515065,7 +515264,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
515065
515264
|
slash_commands: inputs.commands.filter((c6) => c6.userInvocable !== false).map((c6) => c6.name),
|
|
515066
515265
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
515067
515266
|
betas: getSdkBetas(),
|
|
515068
|
-
claude_code_version: "1.0.
|
|
515267
|
+
claude_code_version: "1.0.4",
|
|
515069
515268
|
output_style: outputStyle2,
|
|
515070
515269
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
515071
515270
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -518889,9 +519088,9 @@ var init_AskUserQuestionPermissionRequest = __esm(() => {
|
|
|
518889
519088
|
});
|
|
518890
519089
|
|
|
518891
519090
|
// src/tools/BashTool/destructiveCommandWarning.ts
|
|
518892
|
-
function getDestructiveCommandWarning(
|
|
519091
|
+
function getDestructiveCommandWarning(command10) {
|
|
518893
519092
|
for (const { pattern, warning } of DESTRUCTIVE_PATTERNS) {
|
|
518894
|
-
if (pattern.test(
|
|
519093
|
+
if (pattern.test(command10)) {
|
|
518895
519094
|
return warning;
|
|
518896
519095
|
}
|
|
518897
519096
|
}
|
|
@@ -519002,9 +519201,9 @@ function findFirstSubcommand(args, spec) {
|
|
|
519002
519201
|
}
|
|
519003
519202
|
return;
|
|
519004
519203
|
}
|
|
519005
|
-
async function buildPrefix(
|
|
519006
|
-
const maxDepth = await calculateDepth(
|
|
519007
|
-
const parts = [
|
|
519204
|
+
async function buildPrefix(command10, args, spec) {
|
|
519205
|
+
const maxDepth = await calculateDepth(command10, args, spec);
|
|
519206
|
+
const parts = [command10];
|
|
519008
519207
|
const hasSubcommands = !!spec?.subcommands?.length;
|
|
519009
519208
|
let foundSubcommand = false;
|
|
519010
519209
|
for (let i3 = 0;i3 < args.length; i3++) {
|
|
@@ -519012,7 +519211,7 @@ async function buildPrefix(command9, args, spec) {
|
|
|
519012
519211
|
if (!arg || parts.length >= maxDepth)
|
|
519013
519212
|
break;
|
|
519014
519213
|
if (arg.startsWith("-")) {
|
|
519015
|
-
if (arg === "-c" && ["python", "python3"].includes(
|
|
519214
|
+
if (arg === "-c" && ["python", "python3"].includes(command10.toLowerCase()))
|
|
519016
519215
|
break;
|
|
519017
519216
|
if (spec?.options) {
|
|
519018
519217
|
const option = spec.options.find((opt) => Array.isArray(opt.name) ? opt.name.includes(arg) : opt.name === arg);
|
|
@@ -519037,9 +519236,9 @@ async function buildPrefix(command9, args, spec) {
|
|
|
519037
519236
|
}
|
|
519038
519237
|
return parts.join(" ");
|
|
519039
519238
|
}
|
|
519040
|
-
async function calculateDepth(
|
|
519239
|
+
async function calculateDepth(command10, args, spec) {
|
|
519041
519240
|
const firstSubcommand = findFirstSubcommand(args, spec);
|
|
519042
|
-
const commandLower =
|
|
519241
|
+
const commandLower = command10.toLowerCase();
|
|
519043
519242
|
const key = firstSubcommand ? `${commandLower} ${firstSubcommand.toLowerCase()}` : commandLower;
|
|
519044
519243
|
if (DEPTH_RULES[key])
|
|
519045
519244
|
return DEPTH_RULES[key];
|
|
@@ -519354,15 +519553,15 @@ var init_specs = __esm(() => {
|
|
|
519354
519553
|
});
|
|
519355
519554
|
|
|
519356
519555
|
// src/utils/bash/registry.ts
|
|
519357
|
-
async function loadFigSpec(
|
|
519358
|
-
if (!
|
|
519556
|
+
async function loadFigSpec(command10) {
|
|
519557
|
+
if (!command10 || command10.includes("/") || command10.includes("\\"))
|
|
519359
519558
|
return null;
|
|
519360
|
-
if (
|
|
519559
|
+
if (command10.includes(".."))
|
|
519361
519560
|
return null;
|
|
519362
|
-
if (
|
|
519561
|
+
if (command10.startsWith("-") && command10 !== "-")
|
|
519363
519562
|
return null;
|
|
519364
519563
|
try {
|
|
519365
|
-
const module = await import(`@withfig/autocomplete/build/${
|
|
519564
|
+
const module = await import(`@withfig/autocomplete/build/${command10}.js`);
|
|
519366
519565
|
return module.default || module;
|
|
519367
519566
|
} catch {
|
|
519368
519567
|
return null;
|
|
@@ -519372,10 +519571,10 @@ var getCommandSpec;
|
|
|
519372
519571
|
var init_registry2 = __esm(() => {
|
|
519373
519572
|
init_memoize2();
|
|
519374
519573
|
init_specs();
|
|
519375
|
-
getCommandSpec = memoizeWithLRU(async (
|
|
519376
|
-
const spec = specs_default.find((s) => s.name ===
|
|
519574
|
+
getCommandSpec = memoizeWithLRU(async (command10) => {
|
|
519575
|
+
const spec = specs_default.find((s) => s.name === command10) || await loadFigSpec(command10) || null;
|
|
519377
519576
|
return spec;
|
|
519378
|
-
}, (
|
|
519577
|
+
}, (command10) => command10);
|
|
519379
519578
|
});
|
|
519380
519579
|
|
|
519381
519580
|
// src/utils/bash/prefix.ts
|
|
@@ -519384,10 +519583,10 @@ function isKnownSubcommand2(arg, spec) {
|
|
|
519384
519583
|
return false;
|
|
519385
519584
|
return spec.subcommands.some((sub) => Array.isArray(sub.name) ? sub.name.includes(arg) : sub.name === arg);
|
|
519386
519585
|
}
|
|
519387
|
-
async function getCommandPrefixStatic(
|
|
519586
|
+
async function getCommandPrefixStatic(command10, recursionDepth = 0, wrapperCount = 0) {
|
|
519388
519587
|
if (wrapperCount > 2 || recursionDepth > 10)
|
|
519389
519588
|
return null;
|
|
519390
|
-
const parsed = await parseCommand2(
|
|
519589
|
+
const parsed = await parseCommand2(command10);
|
|
519391
519590
|
if (!parsed)
|
|
519392
519591
|
return null;
|
|
519393
519592
|
if (!parsed.commandNode) {
|
|
@@ -519410,12 +519609,12 @@ async function getCommandPrefixStatic(command9, recursionDepth = 0, wrapperCount
|
|
|
519410
519609
|
const envPrefix = envVars.length ? `${envVars.join(" ")} ` : "";
|
|
519411
519610
|
return { commandPrefix: prefix ? envPrefix + prefix : null };
|
|
519412
519611
|
}
|
|
519413
|
-
async function handleWrapper(
|
|
519414
|
-
const spec = await getCommandSpec(
|
|
519612
|
+
async function handleWrapper(command10, args, recursionDepth, wrapperCount) {
|
|
519613
|
+
const spec = await getCommandSpec(command10);
|
|
519415
519614
|
if (spec?.args) {
|
|
519416
519615
|
const commandArgIndex = toArray5(spec.args).findIndex((arg) => arg?.isCommand);
|
|
519417
519616
|
if (commandArgIndex !== -1) {
|
|
519418
|
-
const parts = [
|
|
519617
|
+
const parts = [command10];
|
|
519419
519618
|
for (let i3 = 0;i3 < args.length && i3 <= commandArgIndex; i3++) {
|
|
519420
519619
|
if (i3 === commandArgIndex) {
|
|
519421
519620
|
const result2 = await getCommandPrefixStatic(args.slice(i3).join(" "), recursionDepth + 1, wrapperCount + 1);
|
|
@@ -519432,14 +519631,14 @@ async function handleWrapper(command9, args, recursionDepth, wrapperCount) {
|
|
|
519432
519631
|
}
|
|
519433
519632
|
const wrapped = args.find((arg) => !arg.startsWith("-") && !NUMERIC.test(arg) && !ENV_VAR.test(arg));
|
|
519434
519633
|
if (!wrapped)
|
|
519435
|
-
return
|
|
519634
|
+
return command10;
|
|
519436
519635
|
const result = await getCommandPrefixStatic(args.slice(args.indexOf(wrapped)).join(" "), recursionDepth + 1, wrapperCount + 1);
|
|
519437
|
-
return !result?.commandPrefix ? null : `${
|
|
519636
|
+
return !result?.commandPrefix ? null : `${command10} ${result.commandPrefix}`;
|
|
519438
519637
|
}
|
|
519439
|
-
async function getCompoundCommandPrefixesStatic(
|
|
519440
|
-
const subcommands = splitCommand_DEPRECATED(
|
|
519638
|
+
async function getCompoundCommandPrefixesStatic(command10, excludeSubcommand) {
|
|
519639
|
+
const subcommands = splitCommand_DEPRECATED(command10);
|
|
519441
519640
|
if (subcommands.length <= 1) {
|
|
519442
|
-
const result = await getCommandPrefixStatic(
|
|
519641
|
+
const result = await getCommandPrefixStatic(command10);
|
|
519443
519642
|
return result?.commandPrefix ? [result.commandPrefix] : [];
|
|
519444
519643
|
}
|
|
519445
519644
|
const prefixes = [];
|
|
@@ -522503,8 +522702,8 @@ function generateShellSuggestionsLabel(suggestions, shellToolName, commandTransf
|
|
|
522503
522702
|
const shellCommands = [...new Set(shellRules.flatMap((rule) => {
|
|
522504
522703
|
if (!rule.ruleContent)
|
|
522505
522704
|
return [];
|
|
522506
|
-
const
|
|
522507
|
-
return commandTransform ? commandTransform(
|
|
522705
|
+
const command10 = permissionRuleExtractPrefix2(rule.ruleContent) ?? rule.ruleContent;
|
|
522706
|
+
return commandTransform ? commandTransform(command10) : command10;
|
|
522508
522707
|
}))];
|
|
522509
522708
|
const hasDirectories = directories.length > 0;
|
|
522510
522709
|
const hasReadPaths = readPaths.length > 0;
|
|
@@ -522619,12 +522818,12 @@ var init_shellPermissionHelpers = __esm(() => {
|
|
|
522619
522818
|
});
|
|
522620
522819
|
|
|
522621
522820
|
// src/components/permissions/BashPermissionRequest/bashToolUseOptions.tsx
|
|
522622
|
-
function stripBashRedirections(
|
|
522821
|
+
function stripBashRedirections(command10) {
|
|
522623
522822
|
const {
|
|
522624
522823
|
commandWithoutRedirections,
|
|
522625
522824
|
redirections
|
|
522626
|
-
} = extractOutputRedirections(
|
|
522627
|
-
return redirections.length > 0 ? commandWithoutRedirections :
|
|
522825
|
+
} = extractOutputRedirections(command10);
|
|
522826
|
+
return redirections.length > 0 ? commandWithoutRedirections : command10;
|
|
522628
522827
|
}
|
|
522629
522828
|
function bashToolUseOptions({
|
|
522630
522829
|
suggestions = [],
|
|
@@ -522717,21 +522916,21 @@ function BashPermissionRequest(props) {
|
|
|
522717
522916
|
verbose,
|
|
522718
522917
|
workerBadge
|
|
522719
522918
|
} = props;
|
|
522720
|
-
let
|
|
522919
|
+
let command10;
|
|
522721
522920
|
let description;
|
|
522722
522921
|
let t0;
|
|
522723
522922
|
if ($2[0] !== toolUseConfirm.input) {
|
|
522724
522923
|
({
|
|
522725
|
-
command:
|
|
522924
|
+
command: command10,
|
|
522726
522925
|
description
|
|
522727
522926
|
} = BashTool.inputSchema.parse(toolUseConfirm.input));
|
|
522728
|
-
t0 = parseSedEditCommand(
|
|
522927
|
+
t0 = parseSedEditCommand(command10);
|
|
522729
522928
|
$2[0] = toolUseConfirm.input;
|
|
522730
|
-
$2[1] =
|
|
522929
|
+
$2[1] = command10;
|
|
522731
522930
|
$2[2] = description;
|
|
522732
522931
|
$2[3] = t0;
|
|
522733
522932
|
} else {
|
|
522734
|
-
|
|
522933
|
+
command10 = $2[1];
|
|
522735
522934
|
description = $2[2];
|
|
522736
522935
|
t0 = $2[3];
|
|
522737
522936
|
}
|
|
@@ -522762,7 +522961,7 @@ function BashPermissionRequest(props) {
|
|
|
522762
522961
|
return t12;
|
|
522763
522962
|
}
|
|
522764
522963
|
let t1;
|
|
522765
|
-
if ($2[12] !==
|
|
522964
|
+
if ($2[12] !== command10 || $2[13] !== description || $2[14] !== onDone || $2[15] !== onReject || $2[16] !== toolUseConfirm || $2[17] !== toolUseContext || $2[18] !== verbose || $2[19] !== workerBadge) {
|
|
522766
522965
|
t1 = /* @__PURE__ */ jsx_runtime385.jsx(BashPermissionRequestInner, {
|
|
522767
522966
|
toolUseConfirm,
|
|
522768
522967
|
toolUseContext,
|
|
@@ -522770,10 +522969,10 @@ function BashPermissionRequest(props) {
|
|
|
522770
522969
|
onReject,
|
|
522771
522970
|
verbose,
|
|
522772
522971
|
workerBadge,
|
|
522773
|
-
command:
|
|
522972
|
+
command: command10,
|
|
522774
522973
|
description
|
|
522775
522974
|
});
|
|
522776
|
-
$2[12] =
|
|
522975
|
+
$2[12] = command10;
|
|
522777
522976
|
$2[13] = description;
|
|
522778
522977
|
$2[14] = onDone;
|
|
522779
522978
|
$2[15] = onReject;
|
|
@@ -522794,7 +522993,7 @@ function BashPermissionRequestInner({
|
|
|
522794
522993
|
onReject,
|
|
522795
522994
|
verbose: _verbose,
|
|
522796
522995
|
workerBadge,
|
|
522797
|
-
command:
|
|
522996
|
+
command: command10,
|
|
522798
522997
|
description
|
|
522799
522998
|
}) {
|
|
522800
522999
|
const [theme2] = useTheme();
|
|
@@ -522831,27 +523030,27 @@ function BashPermissionRequestInner({
|
|
|
522831
523030
|
if (!isClassifierPermissionsEnabled())
|
|
522832
523031
|
return;
|
|
522833
523032
|
const abortController = new AbortController;
|
|
522834
|
-
generateGenericDescription(
|
|
523033
|
+
generateGenericDescription(command10, description, abortController.signal).then((generic) => {
|
|
522835
523034
|
if (generic && !abortController.signal.aborted) {
|
|
522836
523035
|
setClassifierDescription(generic);
|
|
522837
523036
|
setInitialClassifierDescriptionEmpty(false);
|
|
522838
523037
|
}
|
|
522839
523038
|
}).catch(() => {});
|
|
522840
523039
|
return () => abortController.abort();
|
|
522841
|
-
}, [
|
|
523040
|
+
}, [command10, description]);
|
|
522842
523041
|
const isCompound = toolUseConfirm.permissionResult.decisionReason?.type === "subcommandResults";
|
|
522843
523042
|
const [editablePrefix, setEditablePrefix] = import_react214.useState(() => {
|
|
522844
523043
|
if (isCompound) {
|
|
522845
523044
|
const backendBashRules = extractRules("suggestions" in toolUseConfirm.permissionResult ? toolUseConfirm.permissionResult.suggestions : undefined).filter((r) => r.toolName === BashTool.name && r.ruleContent);
|
|
522846
523045
|
return backendBashRules.length === 1 ? backendBashRules[0].ruleContent : undefined;
|
|
522847
523046
|
}
|
|
522848
|
-
const two = getSimpleCommandPrefix(
|
|
523047
|
+
const two = getSimpleCommandPrefix(command10);
|
|
522849
523048
|
if (two)
|
|
522850
523049
|
return `${two}:*`;
|
|
522851
|
-
const one = getFirstWordPrefix(
|
|
523050
|
+
const one = getFirstWordPrefix(command10);
|
|
522852
523051
|
if (one)
|
|
522853
523052
|
return `${one}:*`;
|
|
522854
|
-
return
|
|
523053
|
+
return command10;
|
|
522855
523054
|
});
|
|
522856
523055
|
const hasUserEditedPrefix = import_react214.useRef(false);
|
|
522857
523056
|
const onEditablePrefixChange = import_react214.useCallback((value) => {
|
|
@@ -522862,7 +523061,7 @@ function BashPermissionRequestInner({
|
|
|
522862
523061
|
if (isCompound)
|
|
522863
523062
|
return;
|
|
522864
523063
|
let cancelled = false;
|
|
522865
|
-
getCompoundCommandPrefixesStatic(
|
|
523064
|
+
getCompoundCommandPrefixesStatic(command10, (subcmd) => BashTool.isReadOnly({
|
|
522866
523065
|
command: subcmd
|
|
522867
523066
|
})).then((prefixes) => {
|
|
522868
523067
|
if (cancelled || hasUserEditedPrefix.current)
|
|
@@ -522874,14 +523073,14 @@ function BashPermissionRequestInner({
|
|
|
522874
523073
|
return () => {
|
|
522875
523074
|
cancelled = true;
|
|
522876
523075
|
};
|
|
522877
|
-
}, [
|
|
523076
|
+
}, [command10, isCompound]);
|
|
522878
523077
|
const [classifierWasChecking] = import_react214.useState(false);
|
|
522879
523078
|
const {
|
|
522880
523079
|
destructiveWarning: destructiveWarning_0,
|
|
522881
523080
|
sandboxingEnabled: sandboxingEnabled_0,
|
|
522882
523081
|
isSandboxed: isSandboxed_0
|
|
522883
523082
|
} = import_react214.useMemo(() => {
|
|
522884
|
-
const destructiveWarning = getFeatureValue_CACHED_MAY_BE_STALE("tengu_destructive_command_warning", false) ? getDestructiveCommandWarning(
|
|
523083
|
+
const destructiveWarning = getFeatureValue_CACHED_MAY_BE_STALE("tengu_destructive_command_warning", false) ? getDestructiveCommandWarning(command10) : null;
|
|
522885
523084
|
const sandboxingEnabled = SandboxManager2.isSandboxingEnabled();
|
|
522886
523085
|
const isSandboxed = sandboxingEnabled && shouldUseSandbox(toolUseConfirm.input);
|
|
522887
523086
|
return {
|
|
@@ -522889,7 +523088,7 @@ function BashPermissionRequestInner({
|
|
|
522889
523088
|
sandboxingEnabled,
|
|
522890
523089
|
isSandboxed
|
|
522891
523090
|
};
|
|
522892
|
-
}, [
|
|
523091
|
+
}, [command10, toolUseConfirm.input]);
|
|
522893
523092
|
const unaryEvent = import_react214.useMemo(() => ({
|
|
522894
523093
|
completion_type: "tool_use_single",
|
|
522895
523094
|
language_name: "none"
|
|
@@ -523007,7 +523206,7 @@ function BashPermissionRequestInner({
|
|
|
523007
523206
|
/* @__PURE__ */ jsx_runtime385.jsx(ThemedText, {
|
|
523008
523207
|
dimColor: explainerState.visible,
|
|
523009
523208
|
children: BashTool.renderToolUseMessage({
|
|
523010
|
-
command:
|
|
523209
|
+
command: command10,
|
|
523011
523210
|
description
|
|
523012
523211
|
}, {
|
|
523013
523212
|
theme: theme2,
|
|
@@ -525979,9 +526178,9 @@ var init_NotebookEditPermissionRequest = __esm(() => {
|
|
|
525979
526178
|
});
|
|
525980
526179
|
|
|
525981
526180
|
// src/tools/PowerShellTool/destructiveCommandWarning.ts
|
|
525982
|
-
function getDestructiveCommandWarning2(
|
|
526181
|
+
function getDestructiveCommandWarning2(command10) {
|
|
525983
526182
|
for (const { pattern, warning } of DESTRUCTIVE_PATTERNS2) {
|
|
525984
|
-
if (pattern.test(
|
|
526183
|
+
if (pattern.test(command10)) {
|
|
525985
526184
|
return warning;
|
|
525986
526185
|
}
|
|
525987
526186
|
}
|
|
@@ -526110,8 +526309,8 @@ async function extractPrefixFromElement(cmd) {
|
|
|
526110
526309
|
}
|
|
526111
526310
|
return prefix;
|
|
526112
526311
|
}
|
|
526113
|
-
async function getCompoundCommandPrefixesStatic2(
|
|
526114
|
-
const parsed = await parsePowerShellCommandCached(
|
|
526312
|
+
async function getCompoundCommandPrefixesStatic2(command10, excludeSubcommand) {
|
|
526313
|
+
const parsed = await parsePowerShellCommandCached(command10);
|
|
526115
526314
|
if (!parsed.valid) {
|
|
526116
526315
|
return [];
|
|
526117
526316
|
}
|
|
@@ -526268,7 +526467,7 @@ function PowerShellPermissionRequest(props) {
|
|
|
526268
526467
|
workerBadge
|
|
526269
526468
|
} = props;
|
|
526270
526469
|
const {
|
|
526271
|
-
command:
|
|
526470
|
+
command: command10,
|
|
526272
526471
|
description
|
|
526273
526472
|
} = PowerShellTool.inputSchema.parse(toolUseConfirm.input);
|
|
526274
526473
|
const [theme2] = useTheme();
|
|
@@ -526297,14 +526496,14 @@ function PowerShellPermissionRequest(props) {
|
|
|
526297
526496
|
onReject,
|
|
526298
526497
|
explainerVisible: explainerState.visible
|
|
526299
526498
|
});
|
|
526300
|
-
const destructiveWarning = getFeatureValue_CACHED_MAY_BE_STALE("tengu_destructive_command_warning", false) ? getDestructiveCommandWarning2(
|
|
526499
|
+
const destructiveWarning = getFeatureValue_CACHED_MAY_BE_STALE("tengu_destructive_command_warning", false) ? getDestructiveCommandWarning2(command10) : null;
|
|
526301
526500
|
const [showPermissionDebug, setShowPermissionDebug] = import_react218.useState(false);
|
|
526302
|
-
const [editablePrefix, setEditablePrefix] = import_react218.useState(
|
|
526303
|
-
`) ? undefined :
|
|
526501
|
+
const [editablePrefix, setEditablePrefix] = import_react218.useState(command10.includes(`
|
|
526502
|
+
`) ? undefined : command10);
|
|
526304
526503
|
const hasUserEditedPrefix = import_react218.useRef(false);
|
|
526305
526504
|
import_react218.useEffect(() => {
|
|
526306
526505
|
let cancelled = false;
|
|
526307
|
-
getCompoundCommandPrefixesStatic2(
|
|
526506
|
+
getCompoundCommandPrefixesStatic2(command10, (element) => isAllowlistedCommand(element, element.text)).then((prefixes) => {
|
|
526308
526507
|
if (cancelled || hasUserEditedPrefix.current)
|
|
526309
526508
|
return;
|
|
526310
526509
|
if (prefixes.length > 0) {
|
|
@@ -526314,7 +526513,7 @@ function PowerShellPermissionRequest(props) {
|
|
|
526314
526513
|
return () => {
|
|
526315
526514
|
cancelled = true;
|
|
526316
526515
|
};
|
|
526317
|
-
}, [
|
|
526516
|
+
}, [command10]);
|
|
526318
526517
|
const onEditablePrefixChange = import_react218.useCallback((value) => {
|
|
526319
526518
|
hasUserEditedPrefix.current = true;
|
|
526320
526519
|
setEditablePrefix(value);
|
|
@@ -526419,7 +526618,7 @@ function PowerShellPermissionRequest(props) {
|
|
|
526419
526618
|
/* @__PURE__ */ jsx_runtime396.jsx(ThemedText, {
|
|
526420
526619
|
dimColor: explainerState.visible,
|
|
526421
526620
|
children: PowerShellTool.renderToolUseMessage({
|
|
526422
|
-
command:
|
|
526621
|
+
command: command10,
|
|
526423
526622
|
description
|
|
526424
526623
|
}, {
|
|
526425
526624
|
theme: theme2,
|
|
@@ -527267,7 +527466,7 @@ function MonitorPermissionRequest({
|
|
|
527267
527466
|
onReject,
|
|
527268
527467
|
workerBadge
|
|
527269
527468
|
}) {
|
|
527270
|
-
const { command:
|
|
527469
|
+
const { command: command10, description } = toolUseConfirm.input;
|
|
527271
527470
|
usePermissionRequestLogging(toolUseConfirm, {
|
|
527272
527471
|
completion_type: "tool_use_single",
|
|
527273
527472
|
language_name: "none"
|
|
@@ -527298,7 +527497,7 @@ function MonitorPermissionRequest({
|
|
|
527298
527497
|
platform: env2.platform
|
|
527299
527498
|
}
|
|
527300
527499
|
});
|
|
527301
|
-
const cmdForRule =
|
|
527500
|
+
const cmdForRule = command10?.trim() || "";
|
|
527302
527501
|
const prefix = cmdForRule.split(/\s+/).slice(0, 2).join(" ");
|
|
527303
527502
|
toolUseConfirm.onAllow(toolUseConfirm.input, prefix ? [
|
|
527304
527503
|
{
|
|
@@ -527393,7 +527592,7 @@ function MonitorPermissionRequest({
|
|
|
527393
527592
|
/* @__PURE__ */ jsx_runtime399.jsxs(ThemedText, {
|
|
527394
527593
|
children: [
|
|
527395
527594
|
"Monitor(",
|
|
527396
|
-
|
|
527595
|
+
command10 ?? "",
|
|
527397
527596
|
")"
|
|
527398
527597
|
]
|
|
527399
527598
|
}),
|
|
@@ -530380,7 +530579,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
530380
530579
|
function getSemverPart(version3) {
|
|
530381
530580
|
return `${import_semver12.major(version3, { loose: true })}.${import_semver12.minor(version3, { loose: true })}.${import_semver12.patch(version3, { loose: true })}`;
|
|
530382
530581
|
}
|
|
530383
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.0.
|
|
530582
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.0.4") {
|
|
530384
530583
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react226.useState(() => getSemverPart(initialVersion));
|
|
530385
530584
|
if (!updatedVersion) {
|
|
530386
530585
|
return null;
|
|
@@ -530423,7 +530622,7 @@ function AutoUpdater({
|
|
|
530423
530622
|
return;
|
|
530424
530623
|
}
|
|
530425
530624
|
if (false) {}
|
|
530426
|
-
const currentVersion = "1.0.
|
|
530625
|
+
const currentVersion = "1.0.4";
|
|
530427
530626
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
530428
530627
|
let latestVersion = await getLatestVersion(channel2);
|
|
530429
530628
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -530644,12 +530843,12 @@ function NativeAutoUpdater({
|
|
|
530644
530843
|
logEvent("tengu_native_auto_updater_start", {});
|
|
530645
530844
|
try {
|
|
530646
530845
|
const maxVersion = await getMaxVersion();
|
|
530647
|
-
if (maxVersion && gt("1.0.
|
|
530846
|
+
if (maxVersion && gt("1.0.4", maxVersion)) {
|
|
530648
530847
|
const msg = await getMaxVersionMessage();
|
|
530649
530848
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
530650
530849
|
}
|
|
530651
530850
|
const result = await installLatest(channel2);
|
|
530652
|
-
const currentVersion = "1.0.
|
|
530851
|
+
const currentVersion = "1.0.4";
|
|
530653
530852
|
const latencyMs = Date.now() - startTime2;
|
|
530654
530853
|
if (result.lockFailed) {
|
|
530655
530854
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -530791,17 +530990,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
530791
530990
|
const maxVersion = await getMaxVersion();
|
|
530792
530991
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
530793
530992
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
530794
|
-
if (gte("1.0.
|
|
530795
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.0.
|
|
530993
|
+
if (gte("1.0.4", maxVersion)) {
|
|
530994
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.0.4"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
530796
530995
|
setUpdateAvailable(false);
|
|
530797
530996
|
return;
|
|
530798
530997
|
}
|
|
530799
530998
|
latest = maxVersion;
|
|
530800
530999
|
}
|
|
530801
|
-
const hasUpdate = latest && !gte("1.0.
|
|
531000
|
+
const hasUpdate = latest && !gte("1.0.4", latest) && !shouldSkipVersion(latest);
|
|
530802
531001
|
setUpdateAvailable(!!hasUpdate);
|
|
530803
531002
|
if (hasUpdate) {
|
|
530804
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.0.
|
|
531003
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.0.4"} -> ${latest}`);
|
|
530805
531004
|
}
|
|
530806
531005
|
};
|
|
530807
531006
|
$2[0] = t1;
|
|
@@ -530835,7 +531034,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
530835
531034
|
wrap: "truncate",
|
|
530836
531035
|
children: [
|
|
530837
531036
|
"currentVersion: ",
|
|
530838
|
-
"1.0.
|
|
531037
|
+
"1.0.4"
|
|
530839
531038
|
]
|
|
530840
531039
|
});
|
|
530841
531040
|
$2[3] = verbose;
|
|
@@ -532356,15 +532555,15 @@ function getZshCompletionCommand(prefix, completionType) {
|
|
|
532356
532555
|
}
|
|
532357
532556
|
}
|
|
532358
532557
|
async function getCompletionsForShell(shellType, prefix, completionType, abortSignal) {
|
|
532359
|
-
let
|
|
532558
|
+
let command10;
|
|
532360
532559
|
if (shellType === "bash") {
|
|
532361
|
-
|
|
532560
|
+
command10 = getBashCompletionCommand(prefix, completionType);
|
|
532362
532561
|
} else if (shellType === "zsh") {
|
|
532363
|
-
|
|
532562
|
+
command10 = getZshCompletionCommand(prefix, completionType);
|
|
532364
532563
|
} else {
|
|
532365
532564
|
return [];
|
|
532366
532565
|
}
|
|
532367
|
-
const shellCommand = await exec3(
|
|
532566
|
+
const shellCommand = await exec3(command10, abortSignal, "bash", {
|
|
532368
532567
|
timeout: SHELL_COMPLETION_TIMEOUT_MS
|
|
532369
532568
|
});
|
|
532370
532569
|
const result = await shellCommand.result;
|
|
@@ -533789,8 +533988,8 @@ function hasCommandArgs(input) {
|
|
|
533789
533988
|
return false;
|
|
533790
533989
|
return true;
|
|
533791
533990
|
}
|
|
533792
|
-
function formatCommand(
|
|
533793
|
-
return `/${
|
|
533991
|
+
function formatCommand(command10) {
|
|
533992
|
+
return `/${command10} `;
|
|
533794
533993
|
}
|
|
533795
533994
|
function getCommandId2(cmd) {
|
|
533796
533995
|
const commandName = getCommandName(cmd);
|
|
@@ -534015,10 +534214,10 @@ async function getShellHistoryCommands() {
|
|
|
534015
534214
|
try {
|
|
534016
534215
|
for await (const entry of getHistory()) {
|
|
534017
534216
|
if (entry.display && entry.display.startsWith("!")) {
|
|
534018
|
-
const
|
|
534019
|
-
if (
|
|
534020
|
-
seen.add(
|
|
534021
|
-
commands.push(
|
|
534217
|
+
const command10 = entry.display.slice(1).trim();
|
|
534218
|
+
if (command10 && !seen.has(command10)) {
|
|
534219
|
+
seen.add(command10);
|
|
534220
|
+
commands.push(command10);
|
|
534022
534221
|
}
|
|
534023
534222
|
}
|
|
534024
534223
|
if (commands.length >= 50) {
|
|
@@ -534032,15 +534231,15 @@ async function getShellHistoryCommands() {
|
|
|
534032
534231
|
shellHistoryCacheTimestamp = now2;
|
|
534033
534232
|
return commands;
|
|
534034
534233
|
}
|
|
534035
|
-
function prependToShellHistoryCache(
|
|
534234
|
+
function prependToShellHistoryCache(command10) {
|
|
534036
534235
|
if (!shellHistoryCache) {
|
|
534037
534236
|
return;
|
|
534038
534237
|
}
|
|
534039
|
-
const idx = shellHistoryCache.indexOf(
|
|
534238
|
+
const idx = shellHistoryCache.indexOf(command10);
|
|
534040
534239
|
if (idx !== -1) {
|
|
534041
534240
|
shellHistoryCache.splice(idx, 1);
|
|
534042
534241
|
}
|
|
534043
|
-
shellHistoryCache.unshift(
|
|
534242
|
+
shellHistoryCache.unshift(command10);
|
|
534044
534243
|
}
|
|
534045
534244
|
async function getShellHistoryCompletion(input) {
|
|
534046
534245
|
if (!input || input.length < 2) {
|
|
@@ -534051,11 +534250,11 @@ async function getShellHistoryCompletion(input) {
|
|
|
534051
534250
|
return null;
|
|
534052
534251
|
}
|
|
534053
534252
|
const commands = await getShellHistoryCommands();
|
|
534054
|
-
for (const
|
|
534055
|
-
if (
|
|
534253
|
+
for (const command10 of commands) {
|
|
534254
|
+
if (command10.startsWith(input) && command10 !== input) {
|
|
534056
534255
|
return {
|
|
534057
|
-
fullCommand:
|
|
534058
|
-
suffix:
|
|
534256
|
+
fullCommand: command10,
|
|
534257
|
+
suffix: command10.slice(input.length)
|
|
534059
534258
|
};
|
|
534060
534259
|
}
|
|
534061
534260
|
}
|
|
@@ -539891,7 +540090,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
539891
540090
|
project_dir: getOriginalCwd(),
|
|
539892
540091
|
added_dirs: addedDirs
|
|
539893
540092
|
},
|
|
539894
|
-
version: "1.0.
|
|
540093
|
+
version: "1.0.4",
|
|
539895
540094
|
output_style: {
|
|
539896
540095
|
name: outputStyleName
|
|
539897
540096
|
},
|
|
@@ -555695,12 +555894,12 @@ var init_useLspInitializationNotification = __esm(() => {
|
|
|
555695
555894
|
});
|
|
555696
555895
|
|
|
555697
555896
|
// src/utils/binaryCheck.ts
|
|
555698
|
-
async function isBinaryInstalled(
|
|
555699
|
-
if (!
|
|
555897
|
+
async function isBinaryInstalled(command10) {
|
|
555898
|
+
if (!command10 || !command10.trim()) {
|
|
555700
555899
|
logForDebugging("[binaryCheck] Empty command provided, returning false");
|
|
555701
555900
|
return false;
|
|
555702
555901
|
}
|
|
555703
|
-
const trimmedCommand =
|
|
555902
|
+
const trimmedCommand = command10.trim();
|
|
555704
555903
|
const cached3 = binaryCache.get(trimmedCommand);
|
|
555705
555904
|
if (cached3 !== undefined) {
|
|
555706
555905
|
logForDebugging(`[binaryCheck] Cache hit for '${trimmedCommand}': ${cached3}`);
|
|
@@ -555753,13 +555952,13 @@ function isRecord4(value) {
|
|
|
555753
555952
|
}
|
|
555754
555953
|
function extractFromServerConfigRecord(serverConfigs) {
|
|
555755
555954
|
const extensions = new Set;
|
|
555756
|
-
let
|
|
555955
|
+
let command10 = null;
|
|
555757
555956
|
for (const [_serverName, config3] of Object.entries(serverConfigs)) {
|
|
555758
555957
|
if (!isRecord4(config3)) {
|
|
555759
555958
|
continue;
|
|
555760
555959
|
}
|
|
555761
|
-
if (!
|
|
555762
|
-
|
|
555960
|
+
if (!command10 && typeof config3.command === "string") {
|
|
555961
|
+
command10 = config3.command;
|
|
555763
555962
|
}
|
|
555764
555963
|
const extMapping = config3.extensionToLanguage;
|
|
555765
555964
|
if (isRecord4(extMapping)) {
|
|
@@ -555768,10 +555967,10 @@ function extractFromServerConfigRecord(serverConfigs) {
|
|
|
555768
555967
|
}
|
|
555769
555968
|
}
|
|
555770
555969
|
}
|
|
555771
|
-
if (!
|
|
555970
|
+
if (!command10 || extensions.size === 0) {
|
|
555772
555971
|
return null;
|
|
555773
555972
|
}
|
|
555774
|
-
return { extensions, command:
|
|
555973
|
+
return { extensions, command: command10 };
|
|
555775
555974
|
}
|
|
555776
555975
|
async function getLspPluginsFromMarketplaces() {
|
|
555777
555976
|
const result = new Map;
|
|
@@ -558128,8 +558327,8 @@ function isSessionContainerCompatible(messages) {
|
|
|
558128
558327
|
}
|
|
558129
558328
|
if (toolName === BASH_TOOL_NAME) {
|
|
558130
558329
|
const input = block2.input;
|
|
558131
|
-
const
|
|
558132
|
-
if (EXTERNAL_COMMAND_PATTERNS.some((p) => p.test(
|
|
558330
|
+
const command10 = input?.command || "";
|
|
558331
|
+
if (EXTERNAL_COMMAND_PATTERNS.some((p) => p.test(command10))) {
|
|
558133
558332
|
return false;
|
|
558134
558333
|
}
|
|
558135
558334
|
}
|
|
@@ -561639,22 +561838,22 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
561639
561838
|
helpers.clearBuffer();
|
|
561640
561839
|
}, [setAppState, setInputValue, getToolUseContext, canUseTool, mainLoopModel, addNotification]);
|
|
561641
561840
|
const handleAutoRunIssue = import_react318.useCallback(() => {
|
|
561642
|
-
const
|
|
561841
|
+
const command10 = autoRunIssueReason ? getAutoRunCommand(autoRunIssueReason) : "/issue";
|
|
561643
561842
|
setAutoRunIssueReason(null);
|
|
561644
|
-
onSubmit(
|
|
561843
|
+
onSubmit(command10, {
|
|
561645
561844
|
setCursorOffset: () => {},
|
|
561646
561845
|
clearBuffer: () => {},
|
|
561647
561846
|
resetHistory: () => {}
|
|
561648
561847
|
}).catch((err2) => {
|
|
561649
|
-
logForDebugging(`Auto-run ${
|
|
561848
|
+
logForDebugging(`Auto-run ${command10} failed: ${errorMessage(err2)}`);
|
|
561650
561849
|
});
|
|
561651
561850
|
}, [onSubmit, autoRunIssueReason]);
|
|
561652
561851
|
const handleCancelAutoRunIssue = import_react318.useCallback(() => {
|
|
561653
561852
|
setAutoRunIssueReason(null);
|
|
561654
561853
|
}, []);
|
|
561655
561854
|
const handleSurveyRequestFeedback = import_react318.useCallback(() => {
|
|
561656
|
-
const
|
|
561657
|
-
onSubmit(
|
|
561855
|
+
const command10 = "/feedback";
|
|
561856
|
+
onSubmit(command10, {
|
|
561658
561857
|
setCursorOffset: () => {},
|
|
561659
561858
|
clearBuffer: () => {},
|
|
561660
561859
|
resetHistory: () => {}
|
|
@@ -564394,7 +564593,7 @@ function WelcomeV2() {
|
|
|
564394
564593
|
dimColor: true,
|
|
564395
564594
|
children: [
|
|
564396
564595
|
"v",
|
|
564397
|
-
"1.0.
|
|
564596
|
+
"1.0.4",
|
|
564398
564597
|
" "
|
|
564399
564598
|
]
|
|
564400
564599
|
})
|
|
@@ -564628,7 +564827,7 @@ function WelcomeV2() {
|
|
|
564628
564827
|
dimColor: true,
|
|
564629
564828
|
children: [
|
|
564630
564829
|
"v",
|
|
564631
|
-
"1.0.
|
|
564830
|
+
"1.0.4",
|
|
564632
564831
|
" "
|
|
564633
564832
|
]
|
|
564634
564833
|
})
|
|
@@ -564875,7 +565074,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
564875
565074
|
dimColor: true,
|
|
564876
565075
|
children: [
|
|
564877
565076
|
"v",
|
|
564878
|
-
"1.0.
|
|
565077
|
+
"1.0.4",
|
|
564879
565078
|
" "
|
|
564880
565079
|
]
|
|
564881
565080
|
});
|
|
@@ -565148,7 +565347,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
565148
565347
|
dimColor: true,
|
|
565149
565348
|
children: [
|
|
565150
565349
|
"v",
|
|
565151
|
-
"1.0.
|
|
565350
|
+
"1.0.4",
|
|
565152
565351
|
" "
|
|
565153
565352
|
]
|
|
565154
565353
|
});
|
|
@@ -566326,8 +566525,8 @@ function _temp444(command_0) {
|
|
|
566326
566525
|
function _temp359(tool_0) {
|
|
566327
566526
|
return tool_0 === BASH_TOOL_NAME || tool_0.startsWith(BASH_TOOL_NAME + "(");
|
|
566328
566527
|
}
|
|
566329
|
-
function _temp295(
|
|
566330
|
-
return
|
|
566528
|
+
function _temp295(command10) {
|
|
566529
|
+
return command10.type === "prompt" && command10.loadedFrom === "commands_DEPRECATED" && (command10.source === "projectSettings" || command10.source === "localSettings") && command10.allowedTools?.some(_temp296);
|
|
566331
566530
|
}
|
|
566332
566531
|
function _temp296(tool) {
|
|
566333
566532
|
return tool === BASH_TOOL_NAME || tool.startsWith(BASH_TOOL_NAME + "(");
|
|
@@ -566660,7 +566859,7 @@ function completeOnboarding() {
|
|
|
566660
566859
|
saveGlobalConfig((current) => ({
|
|
566661
566860
|
...current,
|
|
566662
566861
|
hasCompletedOnboarding: true,
|
|
566663
|
-
lastOnboardingVersion: "1.0.
|
|
566862
|
+
lastOnboardingVersion: "1.0.4"
|
|
566664
566863
|
}));
|
|
566665
566864
|
}
|
|
566666
566865
|
function showDialog(root2, renderer) {
|
|
@@ -568186,7 +568385,7 @@ function _temp302() {
|
|
|
568186
568385
|
function CrossProjectMessage(t0) {
|
|
568187
568386
|
const $2 = import_react_compiler_runtime368.c(8);
|
|
568188
568387
|
const {
|
|
568189
|
-
command:
|
|
568388
|
+
command: command10
|
|
568190
568389
|
} = t0;
|
|
568191
568390
|
let t1 = [];
|
|
568192
568391
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -568215,7 +568414,7 @@ function CrossProjectMessage(t0) {
|
|
|
568215
568414
|
t3 = $2[2];
|
|
568216
568415
|
}
|
|
568217
568416
|
let t4;
|
|
568218
|
-
if ($2[3] !==
|
|
568417
|
+
if ($2[3] !== command10) {
|
|
568219
568418
|
t4 = /* @__PURE__ */ jsx_runtime488.jsxs(ThemedBox_default, {
|
|
568220
568419
|
flexDirection: "column",
|
|
568221
568420
|
children: [
|
|
@@ -568223,12 +568422,12 @@ function CrossProjectMessage(t0) {
|
|
|
568223
568422
|
/* @__PURE__ */ jsx_runtime488.jsxs(ThemedText, {
|
|
568224
568423
|
children: [
|
|
568225
568424
|
" ",
|
|
568226
|
-
|
|
568425
|
+
command10
|
|
568227
568426
|
]
|
|
568228
568427
|
})
|
|
568229
568428
|
]
|
|
568230
568429
|
});
|
|
568231
|
-
$2[3] =
|
|
568430
|
+
$2[3] = command10;
|
|
568232
568431
|
$2[4] = t4;
|
|
568233
568432
|
} else {
|
|
568234
568433
|
t4 = $2[4];
|
|
@@ -568356,9 +568555,9 @@ var init_dialogLaunchers = __esm(() => {
|
|
|
568356
568555
|
function initBuiltinPlugins() {}
|
|
568357
568556
|
|
|
568358
568557
|
// src/services/plugins/pluginCliCommands.ts
|
|
568359
|
-
function handlePluginCommandError(error42,
|
|
568558
|
+
function handlePluginCommandError(error42, command10, plugin2) {
|
|
568360
568559
|
logError2(error42);
|
|
568361
|
-
const operation = plugin2 ? `${
|
|
568560
|
+
const operation = plugin2 ? `${command10} plugin "${plugin2}"` : command10 === "disable-all" ? "disable all plugins" : `${command10} plugins`;
|
|
568362
568561
|
console.error(`${figures_default.cross} Failed to ${operation}: ${errorMessage(error42)}`);
|
|
568363
568562
|
const telemetryFields = plugin2 ? (() => {
|
|
568364
568563
|
const { name, marketplace } = parsePluginIdentifier(plugin2);
|
|
@@ -568371,7 +568570,7 @@ function handlePluginCommandError(error42, command9, plugin2) {
|
|
|
568371
568570
|
};
|
|
568372
568571
|
})() : {};
|
|
568373
568572
|
logEvent("tengu_plugin_command_failed", {
|
|
568374
|
-
command:
|
|
568573
|
+
command: command10,
|
|
568375
568574
|
error_category: classifyPluginCommandError(error42),
|
|
568376
568575
|
...telemetryFields
|
|
568377
568576
|
});
|
|
@@ -570911,7 +571110,7 @@ function appendToLog(path24, message) {
|
|
|
570911
571110
|
cwd: getFsImplementation().cwd(),
|
|
570912
571111
|
userType: process.env.USER_TYPE,
|
|
570913
571112
|
sessionId: getSessionId(),
|
|
570914
|
-
version: "1.0.
|
|
571113
|
+
version: "1.0.4"
|
|
570915
571114
|
};
|
|
570916
571115
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
570917
571116
|
}
|
|
@@ -571517,7 +571716,7 @@ async function startMCPServer(cwd2, debug, verbose) {
|
|
|
571517
571716
|
setCwd(cwd2);
|
|
571518
571717
|
const server = new Server({
|
|
571519
571718
|
name: "claude/tengu",
|
|
571520
|
-
version: "1.0.
|
|
571719
|
+
version: "1.0.4"
|
|
571521
571720
|
}, {
|
|
571522
571721
|
capabilities: {
|
|
571523
571722
|
tools: {}
|
|
@@ -576156,8 +576355,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
576156
576355
|
}
|
|
576157
576356
|
async function checkEnvLessBridgeMinVersion() {
|
|
576158
576357
|
const cfg = await getEnvLessBridgeConfig();
|
|
576159
|
-
if (cfg.min_version && lt("1.0.
|
|
576160
|
-
return `Your version of ZeroCLI (${"1.0.
|
|
576358
|
+
if (cfg.min_version && lt("1.0.4", cfg.min_version)) {
|
|
576359
|
+
return `Your version of ZeroCLI (${"1.0.4"}) is too old for Remote Control.
|
|
576161
576360
|
Version ${cfg.min_version} or higher is required. Run \`zero update\` to update.`;
|
|
576162
576361
|
}
|
|
576163
576362
|
return null;
|
|
@@ -576632,7 +576831,7 @@ async function initBridgeCore(params) {
|
|
|
576632
576831
|
const rawApi = createBridgeApiClient({
|
|
576633
576832
|
baseUrl,
|
|
576634
576833
|
getAccessToken,
|
|
576635
|
-
runnerVersion: "1.0.
|
|
576834
|
+
runnerVersion: "1.0.4",
|
|
576636
576835
|
onDebug: logForDebugging,
|
|
576637
576836
|
onAuth401,
|
|
576638
576837
|
getTrustedDeviceToken
|
|
@@ -579253,30 +579452,30 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
579253
579452
|
}
|
|
579254
579453
|
const isMainThread = (cmd) => cmd.agentId === undefined;
|
|
579255
579454
|
try {
|
|
579256
|
-
let
|
|
579455
|
+
let command10;
|
|
579257
579456
|
let waitingForAgents = false;
|
|
579258
579457
|
const drainCommandQueue = async () => {
|
|
579259
|
-
while (
|
|
579260
|
-
if (
|
|
579458
|
+
while (command10 = dequeue(isMainThread)) {
|
|
579459
|
+
if (command10.mode !== "prompt" && command10.mode !== "orphaned-permission" && command10.mode !== "task-notification") {
|
|
579261
579460
|
throw new Error("only prompt commands are supported in streaming mode");
|
|
579262
579461
|
}
|
|
579263
|
-
const batch = [
|
|
579264
|
-
if (
|
|
579265
|
-
while (canBatchWith(
|
|
579462
|
+
const batch = [command10];
|
|
579463
|
+
if (command10.mode === "prompt") {
|
|
579464
|
+
while (canBatchWith(command10, peek2(isMainThread))) {
|
|
579266
579465
|
batch.push(dequeue(isMainThread));
|
|
579267
579466
|
}
|
|
579268
579467
|
if (batch.length > 1) {
|
|
579269
|
-
|
|
579270
|
-
...
|
|
579468
|
+
command10 = {
|
|
579469
|
+
...command10,
|
|
579271
579470
|
value: joinPromptValues(batch.map((c6) => c6.value)),
|
|
579272
|
-
uuid: batch.findLast((c6) => c6.uuid)?.uuid ??
|
|
579471
|
+
uuid: batch.findLast((c6) => c6.uuid)?.uuid ?? command10.uuid
|
|
579273
579472
|
};
|
|
579274
579473
|
}
|
|
579275
579474
|
}
|
|
579276
579475
|
const batchUuids = batch.map((c6) => c6.uuid).filter((u2) => u2 !== undefined);
|
|
579277
579476
|
if (options2.replayUserMessages && batch.length > 1) {
|
|
579278
579477
|
for (const c6 of batch) {
|
|
579279
|
-
if (c6.uuid && c6.uuid !==
|
|
579478
|
+
if (c6.uuid && c6.uuid !== command10.uuid) {
|
|
579280
579479
|
output.enqueue({
|
|
579281
579480
|
type: "user",
|
|
579282
579481
|
message: { role: "user", content: c6.value },
|
|
@@ -579302,8 +579501,8 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
579302
579501
|
for (const uuid3 of batchUuids) {
|
|
579303
579502
|
notifyCommandLifecycle(uuid3, "started");
|
|
579304
579503
|
}
|
|
579305
|
-
if (
|
|
579306
|
-
const notificationText = typeof
|
|
579504
|
+
if (command10.mode === "task-notification") {
|
|
579505
|
+
const notificationText = typeof command10.value === "string" ? command10.value : "";
|
|
579307
579506
|
const taskIdMatch = notificationText.match(/<task-id>([^<]+)<\/task-id>/);
|
|
579308
579507
|
const toolUseIdMatch = notificationText.match(/<tool-use-id>([^<]+)<\/tool-use-id>/);
|
|
579309
579508
|
const outputFileMatch = notificationText.match(/<output-file>([^<]+)<\/output-file>/);
|
|
@@ -579336,8 +579535,8 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
579336
579535
|
});
|
|
579337
579536
|
}
|
|
579338
579537
|
}
|
|
579339
|
-
const input =
|
|
579340
|
-
if (structuredIO instanceof RemoteIO &&
|
|
579538
|
+
const input = command10.value;
|
|
579539
|
+
if (structuredIO instanceof RemoteIO && command10.mode === "prompt") {
|
|
579341
579540
|
logEvent("tengu_bridge_message_received", {
|
|
579342
579541
|
is_repl: false
|
|
579343
579542
|
});
|
|
@@ -579347,7 +579546,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
579347
579546
|
suggestionState.pendingSuggestion = null;
|
|
579348
579547
|
suggestionState.pendingLastEmittedEntry = null;
|
|
579349
579548
|
if (suggestionState.lastEmitted) {
|
|
579350
|
-
if (
|
|
579549
|
+
if (command10.mode === "prompt") {
|
|
579351
579550
|
const inputText = typeof input === "string" ? input : input.find((b) => b.type === "text")?.text;
|
|
579352
579551
|
if (typeof inputText === "string") {
|
|
579353
579552
|
logSuggestionOutcome(suggestionState.lastEmitted.text, inputText, suggestionState.lastEmitted.emittedAt, suggestionState.lastEmitted.promptId, suggestionState.lastEmitted.generationRequestId);
|
|
@@ -579359,7 +579558,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
579359
579558
|
const turnStartTime = undefined;
|
|
579360
579559
|
headlessProfilerCheckpoint("before_ask");
|
|
579361
579560
|
startQueryProfile();
|
|
579362
|
-
const cmd =
|
|
579561
|
+
const cmd = command10;
|
|
579363
579562
|
await runWithWorkload(cmd.workload ?? options2.workload, async () => {
|
|
579364
579563
|
for await (const message of ask({
|
|
579365
579564
|
commands: uniqBy_default([...currentCommands, ...appState.mcp.commands], "name"),
|
|
@@ -582920,7 +583119,7 @@ __export(exports_update2, {
|
|
|
582920
583119
|
});
|
|
582921
583120
|
async function update2() {
|
|
582922
583121
|
logEvent("tengu_update_check", {});
|
|
582923
|
-
writeToStdout(`Current version: ${"1.0.
|
|
583122
|
+
writeToStdout(`Current version: ${"1.0.4"}
|
|
582924
583123
|
`);
|
|
582925
583124
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
582926
583125
|
writeToStdout(`Checking for updates to ${channel2} version...
|
|
@@ -582995,8 +583194,8 @@ async function update2() {
|
|
|
582995
583194
|
writeToStdout(`Zero is managed by Homebrew.
|
|
582996
583195
|
`);
|
|
582997
583196
|
const latest = await getLatestVersion(channel2);
|
|
582998
|
-
if (latest && !gte("1.0.
|
|
582999
|
-
writeToStdout(`Update available: ${"1.0.
|
|
583197
|
+
if (latest && !gte("1.0.4", latest)) {
|
|
583198
|
+
writeToStdout(`Update available: ${"1.0.4"} → ${latest}
|
|
583000
583199
|
`);
|
|
583001
583200
|
writeToStdout(`
|
|
583002
583201
|
`);
|
|
@@ -583012,8 +583211,8 @@ async function update2() {
|
|
|
583012
583211
|
writeToStdout(`Zero is managed by winget.
|
|
583013
583212
|
`);
|
|
583014
583213
|
const latest = await getLatestVersion(channel2);
|
|
583015
|
-
if (latest && !gte("1.0.
|
|
583016
|
-
writeToStdout(`Update available: ${"1.0.
|
|
583214
|
+
if (latest && !gte("1.0.4", latest)) {
|
|
583215
|
+
writeToStdout(`Update available: ${"1.0.4"} → ${latest}
|
|
583017
583216
|
`);
|
|
583018
583217
|
writeToStdout(`
|
|
583019
583218
|
`);
|
|
@@ -583029,8 +583228,8 @@ async function update2() {
|
|
|
583029
583228
|
writeToStdout(`Zero is managed by apk.
|
|
583030
583229
|
`);
|
|
583031
583230
|
const latest = await getLatestVersion(channel2);
|
|
583032
|
-
if (latest && !gte("1.0.
|
|
583033
|
-
writeToStdout(`Update available: ${"1.0.
|
|
583231
|
+
if (latest && !gte("1.0.4", latest)) {
|
|
583232
|
+
writeToStdout(`Update available: ${"1.0.4"} → ${latest}
|
|
583034
583233
|
`);
|
|
583035
583234
|
writeToStdout(`
|
|
583036
583235
|
`);
|
|
@@ -583095,11 +583294,11 @@ async function update2() {
|
|
|
583095
583294
|
`);
|
|
583096
583295
|
await gracefulShutdown(1);
|
|
583097
583296
|
}
|
|
583098
|
-
if (result.latestVersion === "1.0.
|
|
583099
|
-
writeToStdout(source_default.green(`Zero CLI is up to date (${"1.0.
|
|
583297
|
+
if (result.latestVersion === "1.0.4") {
|
|
583298
|
+
writeToStdout(source_default.green(`Zero CLI is up to date (${"1.0.4"})`) + `
|
|
583100
583299
|
`);
|
|
583101
583300
|
} else {
|
|
583102
|
-
writeToStdout(source_default.green(`Successfully updated from ${"1.0.
|
|
583301
|
+
writeToStdout(source_default.green(`Successfully updated from ${"1.0.4"} to version ${result.latestVersion}`) + `
|
|
583103
583302
|
`);
|
|
583104
583303
|
await regenerateCompletionCache();
|
|
583105
583304
|
}
|
|
@@ -583159,12 +583358,12 @@ async function update2() {
|
|
|
583159
583358
|
`);
|
|
583160
583359
|
await gracefulShutdown(1);
|
|
583161
583360
|
}
|
|
583162
|
-
if (latestVersion === "1.0.
|
|
583163
|
-
writeToStdout(source_default.green(`Zero CLI is up to date (${"1.0.
|
|
583361
|
+
if (latestVersion === "1.0.4") {
|
|
583362
|
+
writeToStdout(source_default.green(`Zero CLI is up to date (${"1.0.4"})`) + `
|
|
583164
583363
|
`);
|
|
583165
583364
|
await gracefulShutdown(0);
|
|
583166
583365
|
}
|
|
583167
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"1.0.
|
|
583366
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"1.0.4"})
|
|
583168
583367
|
`);
|
|
583169
583368
|
writeToStdout(`Installing update...
|
|
583170
583369
|
`);
|
|
@@ -583209,7 +583408,7 @@ async function update2() {
|
|
|
583209
583408
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
583210
583409
|
switch (status2) {
|
|
583211
583410
|
case "success":
|
|
583212
|
-
writeToStdout(source_default.green(`Successfully updated from ${"1.0.
|
|
583411
|
+
writeToStdout(source_default.green(`Successfully updated from ${"1.0.4"} to version ${latestVersion}`) + `
|
|
583213
583412
|
`);
|
|
583214
583413
|
await regenerateCompletionCache();
|
|
583215
583414
|
break;
|
|
@@ -584510,7 +584709,7 @@ ${customInstructions}` : customInstructions;
|
|
|
584510
584709
|
}
|
|
584511
584710
|
}
|
|
584512
584711
|
logForDiagnosticsNoPII("info", "started", {
|
|
584513
|
-
version: "1.0.
|
|
584712
|
+
version: "1.0.4",
|
|
584514
584713
|
is_native_binary: isInBundledMode()
|
|
584515
584714
|
});
|
|
584516
584715
|
registerCleanup(async () => {
|
|
@@ -584594,7 +584793,7 @@ ${customInstructions}` : customInstructions;
|
|
|
584594
584793
|
`);
|
|
584595
584794
|
process.exit(1);
|
|
584596
584795
|
}
|
|
584597
|
-
const commandsHeadless = disableSlashCommands ? [] : commands.filter((
|
|
584796
|
+
const commandsHeadless = disableSlashCommands ? [] : commands.filter((command10) => command10.type === "prompt" && !command10.disableNonInteractive || command10.type === "local" && command10.supportsNonInteractive);
|
|
584598
584797
|
const defaultState = getDefaultAppState();
|
|
584599
584798
|
const headlessInitialState = {
|
|
584600
584799
|
...defaultState,
|
|
@@ -585393,7 +585592,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
585393
585592
|
pendingHookMessages
|
|
585394
585593
|
}, renderAndRun);
|
|
585395
585594
|
}
|
|
585396
|
-
}).version("1.0.
|
|
585595
|
+
}).version("1.0.4", "-v, --version", "Output the version number");
|
|
585397
585596
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
585398
585597
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
585399
585598
|
if (canUserConfigureAdvisor()) {
|
|
@@ -586059,7 +586258,7 @@ if (false) {}
|
|
|
586059
586258
|
async function main2() {
|
|
586060
586259
|
const args = process.argv.slice(2);
|
|
586061
586260
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
586062
|
-
console.log(`${"1.0.
|
|
586261
|
+
console.log(`${"1.0.4"} (ZeroCLI)`);
|
|
586063
586262
|
return;
|
|
586064
586263
|
}
|
|
586065
586264
|
if (args.includes("--provider")) {
|
|
@@ -586201,4 +586400,4 @@ async function main2() {
|
|
|
586201
586400
|
}
|
|
586202
586401
|
main2();
|
|
586203
586402
|
|
|
586204
|
-
//# debugId=
|
|
586403
|
+
//# debugId=ADEB6771501F764564756E2164756E21
|