@duheso/zerocli 1.0.2 → 1.0.5
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 +687 -333
- 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.5"}${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.5"}.${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.5"}`;
|
|
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.5"} (${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.5"}${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.5";
|
|
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.5");
|
|
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.5");
|
|
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.5",
|
|
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.5");
|
|
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.5"
|
|
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.5");
|
|
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.5");
|
|
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.5");
|
|
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.5", 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.5"}) 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.5"
|
|
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.5"
|
|
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.5";
|
|
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.5";
|
|
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.5", maxVersion)) {
|
|
271138
|
+
logForDebugging(`Native installer: current version ${"1.0.5"} 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.5" && 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,9 +359258,9 @@ 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
|
-
7. If you believe the council is reaching consensus, say
|
|
359263
|
+
7. IMPORTANT: If you believe the council is reaching consensus or your position hasn't materially changed, explicitly say "I believe we are reaching consensus". Note that reaching a consensus will bring the debate to an end at the final of the 3rd round. If you still strongly dissent on key points, make that equally clear with "I disagree" or "Discordo". If you choose to dissent, you may clearly state your disagreement at any moment and invoke up to 2 extra rounds to continue the discussion.`;
|
|
359262
359264
|
}
|
|
359263
359265
|
async function queryAdvisor(member, userPrompt, signal) {
|
|
359264
359266
|
const model = getDefaultMainLoopModel();
|
|
@@ -359291,8 +359293,68 @@ function parseOpinion(member, rawText, roundNumber, allMembers) {
|
|
|
359291
359293
|
if (!sentence.toLowerCase().includes(nameLower))
|
|
359292
359294
|
continue;
|
|
359293
359295
|
const s = sentence.toLowerCase();
|
|
359294
|
-
const agreeSignals = [
|
|
359295
|
-
|
|
359296
|
+
const agreeSignals = [
|
|
359297
|
+
"concordo",
|
|
359298
|
+
"agree",
|
|
359299
|
+
"correto",
|
|
359300
|
+
"correct",
|
|
359301
|
+
"right",
|
|
359302
|
+
"acerto",
|
|
359303
|
+
"apoio",
|
|
359304
|
+
"support",
|
|
359305
|
+
"align",
|
|
359306
|
+
"bem colocado",
|
|
359307
|
+
"well said",
|
|
359308
|
+
"share",
|
|
359309
|
+
"compartilho",
|
|
359310
|
+
"endorse",
|
|
359311
|
+
"válido",
|
|
359312
|
+
"valid",
|
|
359313
|
+
"exactly",
|
|
359314
|
+
"exatamente",
|
|
359315
|
+
"precisely",
|
|
359316
|
+
"precisamente",
|
|
359317
|
+
"echo",
|
|
359318
|
+
"second",
|
|
359319
|
+
"builds on",
|
|
359320
|
+
"complement",
|
|
359321
|
+
"complementa",
|
|
359322
|
+
"reinforce",
|
|
359323
|
+
"reforça"
|
|
359324
|
+
];
|
|
359325
|
+
const disagreeSignals = [
|
|
359326
|
+
"discordo",
|
|
359327
|
+
"disagree",
|
|
359328
|
+
"erro",
|
|
359329
|
+
"wrong",
|
|
359330
|
+
"equivocado",
|
|
359331
|
+
"misguided",
|
|
359332
|
+
"contesto",
|
|
359333
|
+
"challenge",
|
|
359334
|
+
"object",
|
|
359335
|
+
"however",
|
|
359336
|
+
"entretanto",
|
|
359337
|
+
"porém",
|
|
359338
|
+
"but",
|
|
359339
|
+
"mas",
|
|
359340
|
+
"overlooks",
|
|
359341
|
+
"ignora",
|
|
359342
|
+
"neglects",
|
|
359343
|
+
"simplistic",
|
|
359344
|
+
"simplista",
|
|
359345
|
+
"insufficient",
|
|
359346
|
+
"insuficiente",
|
|
359347
|
+
"naive",
|
|
359348
|
+
"ingênuo",
|
|
359349
|
+
"counter",
|
|
359350
|
+
"contraponto",
|
|
359351
|
+
"flawed",
|
|
359352
|
+
"falho",
|
|
359353
|
+
"risky",
|
|
359354
|
+
"arriscado",
|
|
359355
|
+
"dangerous",
|
|
359356
|
+
"perigoso"
|
|
359357
|
+
];
|
|
359296
359358
|
if (agreeSignals.some((sig) => s.includes(sig))) {
|
|
359297
359359
|
agreements.push({ memberId: other2.id, reason: sentence.trim() });
|
|
359298
359360
|
}
|
|
@@ -359316,6 +359378,7 @@ function hasConverged(rounds) {
|
|
|
359316
359378
|
if (rounds.length < MIN_DEBATE_ROUNDS)
|
|
359317
359379
|
return false;
|
|
359318
359380
|
const lastRound = rounds[rounds.length - 1];
|
|
359381
|
+
const prevRound = rounds.length >= 2 ? rounds[rounds.length - 2] : null;
|
|
359319
359382
|
let totalAgreements = 0;
|
|
359320
359383
|
let totalDisagreements = 0;
|
|
359321
359384
|
for (const opinion of lastRound.opinions) {
|
|
@@ -359326,41 +359389,96 @@ function hasConverged(rounds) {
|
|
|
359326
359389
|
return true;
|
|
359327
359390
|
if (totalAgreements > 0 && totalAgreements >= totalDisagreements * 3)
|
|
359328
359391
|
return true;
|
|
359329
|
-
const consensusSignals = [
|
|
359392
|
+
const consensusSignals = [
|
|
359393
|
+
"consensus",
|
|
359394
|
+
"consenso",
|
|
359395
|
+
"we agree",
|
|
359396
|
+
"concordamos",
|
|
359397
|
+
"aligned",
|
|
359398
|
+
"alinhados",
|
|
359399
|
+
"common ground",
|
|
359400
|
+
"ponto em comum",
|
|
359401
|
+
"convergence",
|
|
359402
|
+
"convergência",
|
|
359403
|
+
"shared view",
|
|
359404
|
+
"visão compartilhada",
|
|
359405
|
+
"in agreement",
|
|
359406
|
+
"em acordo",
|
|
359407
|
+
"concur",
|
|
359408
|
+
"all agree",
|
|
359409
|
+
"todos concordam",
|
|
359410
|
+
"unânime",
|
|
359411
|
+
"unanimous",
|
|
359412
|
+
"shared conclusion",
|
|
359413
|
+
"conclusão compartilhada"
|
|
359414
|
+
];
|
|
359330
359415
|
const consensusMentions = lastRound.opinions.filter((op) => consensusSignals.some((sig) => op.opinion.toLowerCase().includes(sig))).length;
|
|
359331
|
-
|
|
359416
|
+
if (consensusMentions >= 3)
|
|
359417
|
+
return true;
|
|
359418
|
+
if (prevRound) {
|
|
359419
|
+
let stablePositions = 0;
|
|
359420
|
+
for (const opinion of lastRound.opinions) {
|
|
359421
|
+
const prevOpinion = prevRound.opinions.find((o2) => o2.memberId === opinion.memberId);
|
|
359422
|
+
if (!prevOpinion)
|
|
359423
|
+
continue;
|
|
359424
|
+
const hadDisagreements = prevOpinion.disagreements.length;
|
|
359425
|
+
const hasDisagreements = opinion.disagreements.length;
|
|
359426
|
+
if (hasDisagreements <= hadDisagreements) {
|
|
359427
|
+
stablePositions++;
|
|
359428
|
+
}
|
|
359429
|
+
}
|
|
359430
|
+
if (stablePositions >= 4)
|
|
359431
|
+
return true;
|
|
359432
|
+
}
|
|
359433
|
+
return false;
|
|
359332
359434
|
}
|
|
359333
359435
|
async function runDebate(clarifiedPrompt, pack, config2, signal, onRoundComplete) {
|
|
359334
359436
|
const rounds = [];
|
|
359335
359437
|
const minRounds = Math.max(MIN_DEBATE_ROUNDS, config2.minRounds);
|
|
359336
359438
|
const maxRounds = Math.min(MAX_DEBATE_ROUNDS, config2.maxRounds);
|
|
359337
359439
|
let convergedAtRound = null;
|
|
359338
|
-
|
|
359339
|
-
|
|
359340
|
-
|
|
359341
|
-
|
|
359342
|
-
|
|
359343
|
-
|
|
359344
|
-
|
|
359440
|
+
let extraRoundsInvoked = false;
|
|
359441
|
+
for (let roundNum = 1;roundNum <= minRounds; roundNum++) {
|
|
359442
|
+
const round2 = await executeRound(roundNum, clarifiedPrompt, pack, rounds, maxRounds, signal);
|
|
359443
|
+
rounds.push(round2);
|
|
359444
|
+
onRoundComplete?.(round2, false);
|
|
359445
|
+
}
|
|
359446
|
+
if (hasConverged(rounds)) {
|
|
359447
|
+
convergedAtRound = minRounds;
|
|
359448
|
+
return { rounds, convergedAtRound, extraRoundsInvoked: false };
|
|
359449
|
+
}
|
|
359450
|
+
if (minRounds < maxRounds) {
|
|
359451
|
+
extraRoundsInvoked = true;
|
|
359452
|
+
for (let roundNum = minRounds + 1;roundNum <= maxRounds; roundNum++) {
|
|
359453
|
+
const round2 = await executeRound(roundNum, clarifiedPrompt, pack, rounds, maxRounds, signal);
|
|
359454
|
+
rounds.push(round2);
|
|
359455
|
+
onRoundComplete?.(round2, true);
|
|
359456
|
+
if (hasConverged(rounds)) {
|
|
359457
|
+
convergedAtRound = roundNum;
|
|
359458
|
+
break;
|
|
359345
359459
|
}
|
|
359460
|
+
}
|
|
359461
|
+
}
|
|
359462
|
+
return { rounds, convergedAtRound, extraRoundsInvoked };
|
|
359463
|
+
}
|
|
359464
|
+
async function executeRound(roundNum, clarifiedPrompt, pack, previousRounds, maxRounds, signal) {
|
|
359465
|
+
const memberPrompts = pack.members.map((member) => {
|
|
359466
|
+
if (roundNum === 1) {
|
|
359346
359467
|
return {
|
|
359347
359468
|
member,
|
|
359348
|
-
prompt:
|
|
359469
|
+
prompt: buildRoundOnePrompt(member, clarifiedPrompt, pack.members)
|
|
359349
359470
|
};
|
|
359350
|
-
});
|
|
359351
|
-
const opinions = await Promise.all(memberPrompts.map(async ({ member, prompt }) => {
|
|
359352
|
-
const rawText = await queryAdvisor(member, prompt, signal);
|
|
359353
|
-
return parseOpinion(member, rawText, roundNum, pack.members);
|
|
359354
|
-
}));
|
|
359355
|
-
const round2 = { roundNumber: roundNum, opinions };
|
|
359356
|
-
rounds.push(round2);
|
|
359357
|
-
onRoundComplete?.(round2);
|
|
359358
|
-
if (roundNum >= minRounds && hasConverged(rounds)) {
|
|
359359
|
-
convergedAtRound = roundNum;
|
|
359360
|
-
break;
|
|
359361
359471
|
}
|
|
359362
|
-
|
|
359363
|
-
|
|
359472
|
+
return {
|
|
359473
|
+
member,
|
|
359474
|
+
prompt: buildSubsequentRoundPrompt(member, clarifiedPrompt, pack.members, previousRounds, roundNum, maxRounds)
|
|
359475
|
+
};
|
|
359476
|
+
});
|
|
359477
|
+
const opinions = await Promise.all(memberPrompts.map(async ({ member, prompt }) => {
|
|
359478
|
+
const rawText = await queryAdvisor(member, prompt, signal);
|
|
359479
|
+
return parseOpinion(member, rawText, roundNum, pack.members);
|
|
359480
|
+
}));
|
|
359481
|
+
return { roundNumber: roundNum, opinions };
|
|
359364
359482
|
}
|
|
359365
359483
|
var init_councilDebate = __esm(() => {
|
|
359366
359484
|
init_claude();
|
|
@@ -359510,7 +359628,7 @@ async function generateClarifyingQuestions(userPrompt, signal) {
|
|
|
359510
359628
|
|
|
359511
359629
|
"${userPrompt}"
|
|
359512
359630
|
|
|
359513
|
-
Generate
|
|
359631
|
+
Analyze how much detail the user already provided. Generate between 3 and 13 clarifying questions — fewer if the user was very detailed, more if the prompt is vague or complex. The number must reflect the actual need, never a fixed default.`,
|
|
359514
359632
|
signal,
|
|
359515
359633
|
options: {
|
|
359516
359634
|
model,
|
|
@@ -359536,7 +359654,7 @@ Generate 2-10 clarifying questions to fully understand their situation.`,
|
|
|
359536
359654
|
"What outcome would you consider ideal?"
|
|
359537
359655
|
];
|
|
359538
359656
|
}
|
|
359539
|
-
return questions.slice(0,
|
|
359657
|
+
return questions.slice(0, 13);
|
|
359540
359658
|
}
|
|
359541
359659
|
function buildEnrichedPrompt(originalPrompt, clarifications) {
|
|
359542
359660
|
const clarificationText = Object.entries(clarifications).map(([question, answer]) => `Q: ${question}
|
|
@@ -359571,11 +359689,19 @@ async function runCouncilTribunal(input) {
|
|
|
359571
359689
|
}
|
|
359572
359690
|
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
359691
|
|
|
359574
|
-
|
|
359575
|
-
|
|
359576
|
-
|
|
359577
|
-
|
|
359692
|
+
CRITICAL — DYNAMIC QUESTION COUNT:
|
|
359693
|
+
Analyze the user's prompt carefully and generate the RIGHT number of clarifying questions (minimum 3, maximum 13):
|
|
359694
|
+
- If the user gave VERY LITTLE detail (vague, short, or abstract prompt) → generate 8-13 questions to fill in all gaps.
|
|
359695
|
+
- If the user gave MODERATE detail → generate 5-7 questions focusing on what's still unclear.
|
|
359696
|
+
- If the user gave EXTENSIVE detail (long, specific, with context) → generate 3-5 questions targeting only remaining blind spots.
|
|
359578
359697
|
|
|
359698
|
+
The number of questions MUST reflect the complexity and completeness of what the user already shared. DO NOT default to any fixed number.
|
|
359699
|
+
|
|
359700
|
+
The questions should be:
|
|
359701
|
+
1. Highly relevant — they should reveal the context, constraints, priorities, or desired outcomes.
|
|
359702
|
+
2. Specific — avoid generic questions. Adapt them to the user's actual request.
|
|
359703
|
+
3. Actionable — the answers should substantially alter the Board's recommendation.
|
|
359704
|
+
4. Non-redundant — each question must cover a DIFFERENT aspect of the problem.
|
|
359579
359705
|
NOTHING should remain abstract or ambiguous. The Council needs complete context to deliberate effectively.
|
|
359580
359706
|
|
|
359581
359707
|
Detect the language of the user's prompt and write your questions in the SAME language.
|
|
@@ -359585,7 +359711,7 @@ Return ONLY the questions, one per line, prefixed with a number:
|
|
|
359585
359711
|
1. [question]
|
|
359586
359712
|
2. [question]
|
|
359587
359713
|
3. [question]
|
|
359588
|
-
|
|
359714
|
+
...continue as needed (3-13 questions based on complexity)`;
|
|
359589
359715
|
var init_councilOrchestrator = __esm(() => {
|
|
359590
359716
|
init_claude();
|
|
359591
359717
|
init_messages3();
|
|
@@ -359635,7 +359761,7 @@ function DebateRoundView({ round: round2, totalRounds }) {
|
|
|
359635
359761
|
bold: true,
|
|
359636
359762
|
color: "ansi:yellow",
|
|
359637
359763
|
children: [
|
|
359638
|
-
"⚖️ TRIBUNAL DO CONSELHO — Rodada ",
|
|
359764
|
+
"⚖️ TRIBUNAL DO CONSELHO — Convoca a Rodada ",
|
|
359639
359765
|
round2.roundNumber,
|
|
359640
359766
|
"/",
|
|
359641
359767
|
totalRounds
|
|
@@ -359834,6 +359960,118 @@ function renderClarificationPhase(questions) {
|
|
|
359834
359960
|
]
|
|
359835
359961
|
});
|
|
359836
359962
|
}
|
|
359963
|
+
function ProgressRoundView({ round: round2 }) {
|
|
359964
|
+
return /* @__PURE__ */ jsx_runtime140.jsxs(ThemedBox_default, {
|
|
359965
|
+
flexDirection: "column",
|
|
359966
|
+
marginBottom: 1,
|
|
359967
|
+
children: [
|
|
359968
|
+
/* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
359969
|
+
marginBottom: 1,
|
|
359970
|
+
children: /* @__PURE__ */ jsx_runtime140.jsxs(ThemedText, {
|
|
359971
|
+
bold: true,
|
|
359972
|
+
color: "ansi:yellow",
|
|
359973
|
+
children: [
|
|
359974
|
+
"⚖️ TRIBUNAL DO CONSELHO — Convoca a Rodada ",
|
|
359975
|
+
round2.roundNumber
|
|
359976
|
+
]
|
|
359977
|
+
})
|
|
359978
|
+
}),
|
|
359979
|
+
/* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
359980
|
+
flexDirection: "column",
|
|
359981
|
+
marginLeft: 1,
|
|
359982
|
+
children: round2.opinions.map((op, i3) => /* @__PURE__ */ jsx_runtime140.jsxs(ThemedBox_default, {
|
|
359983
|
+
flexDirection: "column",
|
|
359984
|
+
marginBottom: 1,
|
|
359985
|
+
children: [
|
|
359986
|
+
/* @__PURE__ */ jsx_runtime140.jsxs(ThemedText, {
|
|
359987
|
+
bold: true,
|
|
359988
|
+
children: [
|
|
359989
|
+
op.icon,
|
|
359990
|
+
" ",
|
|
359991
|
+
op.memberName,
|
|
359992
|
+
" (",
|
|
359993
|
+
op.role,
|
|
359994
|
+
"):"
|
|
359995
|
+
]
|
|
359996
|
+
}),
|
|
359997
|
+
/* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
359998
|
+
marginLeft: 2,
|
|
359999
|
+
children: /* @__PURE__ */ jsx_runtime140.jsx(ThemedText, {
|
|
360000
|
+
wrap: "wrap",
|
|
360001
|
+
children: op.opinion
|
|
360002
|
+
})
|
|
360003
|
+
})
|
|
360004
|
+
]
|
|
360005
|
+
}, i3))
|
|
360006
|
+
})
|
|
360007
|
+
]
|
|
360008
|
+
});
|
|
360009
|
+
}
|
|
360010
|
+
function renderCouncilProgress(progressMessages) {
|
|
360011
|
+
const councilMessages = progressMessages.filter((msg) => msg.data?.type === "council_progress");
|
|
360012
|
+
const lastProgress = councilMessages.at(-1);
|
|
360013
|
+
if (!lastProgress?.data) {
|
|
360014
|
+
return /* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
360015
|
+
children: /* @__PURE__ */ jsx_runtime140.jsx(ThemedText, {
|
|
360016
|
+
dimColor: true,
|
|
360017
|
+
children: "⚖️ Preparando o Tribunal do Conselho..."
|
|
360018
|
+
})
|
|
360019
|
+
});
|
|
360020
|
+
}
|
|
360021
|
+
const data = lastProgress.data;
|
|
360022
|
+
return /* @__PURE__ */ jsx_runtime140.jsxs(ThemedBox_default, {
|
|
360023
|
+
flexDirection: "column",
|
|
360024
|
+
children: [
|
|
360025
|
+
data.completedRounds.map((round2) => /* @__PURE__ */ jsx_runtime140.jsx(ProgressRoundView, {
|
|
360026
|
+
round: round2
|
|
360027
|
+
}, round2.roundNumber)),
|
|
360028
|
+
data.phase === "clarifying" && /* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
360029
|
+
children: /* @__PURE__ */ jsx_runtime140.jsx(ThemedText, {
|
|
360030
|
+
dimColor: true,
|
|
360031
|
+
children: "\uD83D\uDCE8 O Mensageiro está esclarecendo a questão..."
|
|
360032
|
+
})
|
|
360033
|
+
}),
|
|
360034
|
+
data.phase === "extra_rounds" && /* @__PURE__ */ jsx_runtime140.jsxs(ThemedBox_default, {
|
|
360035
|
+
flexDirection: "column",
|
|
360036
|
+
marginTop: 1,
|
|
360037
|
+
children: [
|
|
360038
|
+
/* @__PURE__ */ jsx_runtime140.jsx(ThemedText, {
|
|
360039
|
+
bold: true,
|
|
360040
|
+
color: "ansi:red",
|
|
360041
|
+
children: "⚠️ DIVERGÊNCIA NO CONSELHO — Rodadas extras invocadas!"
|
|
360042
|
+
}),
|
|
360043
|
+
/* @__PURE__ */ jsx_runtime140.jsxs(ThemedText, {
|
|
360044
|
+
color: "ansi:yellow",
|
|
360045
|
+
children: [
|
|
360046
|
+
"\uD83D\uDD25 O Tribunal detectou divergências significativas após ",
|
|
360047
|
+
data.currentRound ? data.currentRound - 1 : 3,
|
|
360048
|
+
" rodadas. Invocando 2 rodadas extras finais para buscar consenso..."
|
|
360049
|
+
]
|
|
360050
|
+
})
|
|
360051
|
+
]
|
|
360052
|
+
}),
|
|
360053
|
+
data.phase === "debating" && data.currentRound && data.maxRounds && /* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
360054
|
+
children: /* @__PURE__ */ jsx_runtime140.jsxs(ThemedText, {
|
|
360055
|
+
dimColor: true,
|
|
360056
|
+
children: [
|
|
360057
|
+
"⚔️ O Conselho está debatendo — Rodada ",
|
|
360058
|
+
data.currentRound,
|
|
360059
|
+
"/",
|
|
360060
|
+
data.maxRounds,
|
|
360061
|
+
data.extraRoundsInvoked ? " (Extra)" : "",
|
|
360062
|
+
"..."
|
|
360063
|
+
]
|
|
360064
|
+
})
|
|
360065
|
+
}),
|
|
360066
|
+
data.phase === "synthesizing" && /* @__PURE__ */ jsx_runtime140.jsx(ThemedBox_default, {
|
|
360067
|
+
children: /* @__PURE__ */ jsx_runtime140.jsx(ThemedText, {
|
|
360068
|
+
dimColor: true,
|
|
360069
|
+
children: "\uD83D\uDCDC O Sintetizador está consolidando o veredito..."
|
|
360070
|
+
})
|
|
360071
|
+
})
|
|
360072
|
+
]
|
|
360073
|
+
});
|
|
360074
|
+
}
|
|
359837
360075
|
var jsx_runtime140;
|
|
359838
360076
|
var init_UI15 = __esm(() => {
|
|
359839
360077
|
init_ink2();
|
|
@@ -359874,7 +360112,7 @@ var init_CouncilTool = __esm(() => {
|
|
|
359874
360112
|
CouncilTool = buildTool({
|
|
359875
360113
|
name: COUNCIL_TOOL_NAME,
|
|
359876
360114
|
searchHint: "tribunal do conselho agent advisor multi-perspective debate council panel advisors",
|
|
359877
|
-
maxResultSizeChars:
|
|
360115
|
+
maxResultSizeChars: 150000,
|
|
359878
360116
|
async description() {
|
|
359879
360117
|
return DESCRIPTION9;
|
|
359880
360118
|
},
|
|
@@ -359915,8 +360153,8 @@ var init_CouncilTool = __esm(() => {
|
|
|
359915
360153
|
renderToolUseMessage(input) {
|
|
359916
360154
|
return renderCouncilToolUse(input);
|
|
359917
360155
|
},
|
|
359918
|
-
renderToolUseProgressMessage() {
|
|
359919
|
-
return
|
|
360156
|
+
renderToolUseProgressMessage(progressMessagesForMessage) {
|
|
360157
|
+
return renderCouncilProgress(progressMessagesForMessage);
|
|
359920
360158
|
},
|
|
359921
360159
|
renderToolResultMessage(output) {
|
|
359922
360160
|
if (output.error) {
|
|
@@ -359938,11 +360176,25 @@ var init_CouncilTool = __esm(() => {
|
|
|
359938
360176
|
renderToolUseErrorMessage() {
|
|
359939
360177
|
return null;
|
|
359940
360178
|
},
|
|
359941
|
-
async call(input, context4) {
|
|
360179
|
+
async call(input, context4, _canUseTool, _parentMessage, onProgress) {
|
|
359942
360180
|
const abortController = new AbortController;
|
|
359943
360181
|
const { signal } = abortController;
|
|
360182
|
+
let progressCounter = 0;
|
|
360183
|
+
const emitProgress = (data) => {
|
|
360184
|
+
if (onProgress) {
|
|
360185
|
+
onProgress({
|
|
360186
|
+
toolUseID: `council-progress-${progressCounter++}`,
|
|
360187
|
+
data
|
|
360188
|
+
});
|
|
360189
|
+
}
|
|
360190
|
+
};
|
|
359944
360191
|
try {
|
|
359945
360192
|
if (!input.clarifications) {
|
|
360193
|
+
emitProgress({
|
|
360194
|
+
type: "council_progress",
|
|
360195
|
+
phase: "clarifying",
|
|
360196
|
+
completedRounds: []
|
|
360197
|
+
});
|
|
359946
360198
|
const questions = await generateClarifyingQuestions(input.prompt, signal);
|
|
359947
360199
|
return {
|
|
359948
360200
|
data: {
|
|
@@ -359952,13 +360204,64 @@ var init_CouncilTool = __esm(() => {
|
|
|
359952
360204
|
};
|
|
359953
360205
|
}
|
|
359954
360206
|
const enrichedPrompt = buildEnrichedPrompt(input.prompt, input.clarifications);
|
|
360207
|
+
const maxRounds = input.max_rounds ?? MAX_DEBATE_ROUNDS;
|
|
360208
|
+
const minRounds = input.min_rounds ?? MIN_DEBATE_ROUNDS;
|
|
360209
|
+
const completedRoundSnapshots = [];
|
|
360210
|
+
emitProgress({
|
|
360211
|
+
type: "council_progress",
|
|
360212
|
+
phase: "debating",
|
|
360213
|
+
currentRound: 1,
|
|
360214
|
+
maxRounds: minRounds,
|
|
360215
|
+
completedRounds: []
|
|
360216
|
+
});
|
|
359955
360217
|
const result = await runCouncilTribunal({
|
|
359956
360218
|
enrichedPrompt,
|
|
359957
360219
|
packId: input.pack ?? "default",
|
|
359958
|
-
minRounds
|
|
359959
|
-
maxRounds
|
|
360220
|
+
minRounds,
|
|
360221
|
+
maxRounds,
|
|
359960
360222
|
customPersonas: input.custom_personas,
|
|
359961
|
-
signal
|
|
360223
|
+
signal,
|
|
360224
|
+
onRoundComplete: (round2, extraRoundsInvoked) => {
|
|
360225
|
+
completedRoundSnapshots.push({
|
|
360226
|
+
roundNumber: round2.roundNumber,
|
|
360227
|
+
opinions: round2.opinions.map((op) => ({
|
|
360228
|
+
icon: op.icon,
|
|
360229
|
+
memberName: op.memberName,
|
|
360230
|
+
role: op.role,
|
|
360231
|
+
opinion: op.opinion
|
|
360232
|
+
}))
|
|
360233
|
+
});
|
|
360234
|
+
if (extraRoundsInvoked && round2.roundNumber === minRounds + 1) {
|
|
360235
|
+
emitProgress({
|
|
360236
|
+
type: "council_progress",
|
|
360237
|
+
phase: "extra_rounds",
|
|
360238
|
+
currentRound: round2.roundNumber,
|
|
360239
|
+
maxRounds,
|
|
360240
|
+
extraRoundsInvoked: true,
|
|
360241
|
+
completedRounds: [...completedRoundSnapshots]
|
|
360242
|
+
});
|
|
360243
|
+
return;
|
|
360244
|
+
}
|
|
360245
|
+
const displayMax = extraRoundsInvoked ? maxRounds : minRounds;
|
|
360246
|
+
const nextRound = round2.roundNumber + 1;
|
|
360247
|
+
if (nextRound <= displayMax) {
|
|
360248
|
+
emitProgress({
|
|
360249
|
+
type: "council_progress",
|
|
360250
|
+
phase: "debating",
|
|
360251
|
+
currentRound: nextRound,
|
|
360252
|
+
maxRounds: displayMax,
|
|
360253
|
+
extraRoundsInvoked: !!extraRoundsInvoked,
|
|
360254
|
+
completedRounds: [...completedRoundSnapshots]
|
|
360255
|
+
});
|
|
360256
|
+
}
|
|
360257
|
+
}
|
|
360258
|
+
});
|
|
360259
|
+
emitProgress({
|
|
360260
|
+
type: "council_progress",
|
|
360261
|
+
phase: "synthesizing",
|
|
360262
|
+
maxRounds: result.totalRounds,
|
|
360263
|
+
extraRoundsInvoked: result.rounds.length > minRounds,
|
|
360264
|
+
completedRounds: completedRoundSnapshots
|
|
359962
360265
|
});
|
|
359963
360266
|
return {
|
|
359964
360267
|
data: {
|
|
@@ -359991,15 +360294,21 @@ var init_CouncilTool = __esm(() => {
|
|
|
359991
360294
|
`);
|
|
359992
360295
|
return {
|
|
359993
360296
|
type: "tool_result",
|
|
359994
|
-
content: `The Council Tribunal's Messenger has prepared
|
|
360297
|
+
content: `The Council Tribunal's Messenger has prepared ${questions.length} clarifying questions.
|
|
360298
|
+
|
|
360299
|
+
CRITICAL INSTRUCTIONS — YOU MUST FOLLOW THESE EXACTLY:
|
|
360300
|
+
1. Ask EVERY SINGLE question below to the user using AskUserQuestionTool — Multiple questions per call are allowed.
|
|
360301
|
+
2. Do NOT skip, or summarize any questions. Each question must be asked.
|
|
360302
|
+
3. There are exactly ${questions.length} questions. You must make exactly ${questions.length} AskUserQuestionTool calls.
|
|
360303
|
+
4. After collecting ALL ${questions.length} answers, call council_tribunal again with the "clarifications" field.
|
|
359995
360304
|
|
|
359996
|
-
CLARIFYING QUESTIONS:
|
|
359997
|
-
${questionsList}
|
|
360305
|
+
CLARIFYING QUESTIONS:
|
|
360306
|
+
${questionsList}
|
|
359998
360307
|
|
|
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`,
|
|
360308
|
+
AFTER asking all ${questions.length} questions, call council_tribunal again with:
|
|
360309
|
+
- Same "prompt"
|
|
360310
|
+
- "clarifications": { "question text": "user answer", ... } with all ${questions.length} question/answer pairs
|
|
360311
|
+
- Same "pack" and other settings`,
|
|
360003
360312
|
tool_use_id: toolUseID
|
|
360004
360313
|
};
|
|
360005
360314
|
}
|
|
@@ -378044,7 +378353,7 @@ function getAnthropicEnvMetadata() {
|
|
|
378044
378353
|
function getBuildAgeMinutes() {
|
|
378045
378354
|
if (false)
|
|
378046
378355
|
;
|
|
378047
|
-
const buildTime = new Date("2026-05-
|
|
378356
|
+
const buildTime = new Date("2026-05-22T14:30:48.592Z").getTime();
|
|
378048
378357
|
if (isNaN(buildTime))
|
|
378049
378358
|
return;
|
|
378050
378359
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -405527,7 +405836,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
405527
405836
|
const client2 = new Client({
|
|
405528
405837
|
name: "claude-code",
|
|
405529
405838
|
title: "ZeroCLI",
|
|
405530
|
-
version: "1.0.
|
|
405839
|
+
version: "1.0.5",
|
|
405531
405840
|
description: "Anthropic's agentic coding tool",
|
|
405532
405841
|
websiteUrl: PRODUCT_URL
|
|
405533
405842
|
}, {
|
|
@@ -405879,7 +406188,7 @@ var init_client7 = __esm(() => {
|
|
|
405879
406188
|
const client2 = new Client({
|
|
405880
406189
|
name: "claude-code",
|
|
405881
406190
|
title: "ZeroCLI",
|
|
405882
|
-
version: "1.0.
|
|
406191
|
+
version: "1.0.5",
|
|
405883
406192
|
description: "Anthropic's agentic coding tool",
|
|
405884
406193
|
websiteUrl: PRODUCT_URL
|
|
405885
406194
|
}, {
|
|
@@ -416614,7 +416923,7 @@ function Feedback({
|
|
|
416614
416923
|
platform: env2.platform,
|
|
416615
416924
|
gitRepo: envInfo.isGit,
|
|
416616
416925
|
terminal: env2.terminal,
|
|
416617
|
-
version: "1.0.
|
|
416926
|
+
version: "1.0.5",
|
|
416618
416927
|
transcript: normalizeMessagesForAPI(messages),
|
|
416619
416928
|
errors: sanitizedErrors,
|
|
416620
416929
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -416807,7 +417116,7 @@ function Feedback({
|
|
|
416807
417116
|
", ",
|
|
416808
417117
|
env2.terminal,
|
|
416809
417118
|
", v",
|
|
416810
|
-
"1.0.
|
|
417119
|
+
"1.0.5"
|
|
416811
417120
|
]
|
|
416812
417121
|
})
|
|
416813
417122
|
]
|
|
@@ -416915,7 +417224,7 @@ ${sanitizedDescription}
|
|
|
416915
417224
|
` + `**Environment Info**
|
|
416916
417225
|
` + `- Platform: ${env2.platform}
|
|
416917
417226
|
` + `- Terminal: ${env2.terminal}
|
|
416918
|
-
` + `- Version: ${"1.0.
|
|
417227
|
+
` + `- Version: ${"1.0.5"}
|
|
416919
417228
|
` + feedbackIdLine + `
|
|
416920
417229
|
**Errors**
|
|
416921
417230
|
\`\`\`json
|
|
@@ -420068,7 +420377,7 @@ function buildPrimarySection() {
|
|
|
420068
420377
|
});
|
|
420069
420378
|
return [{
|
|
420070
420379
|
label: "Version",
|
|
420071
|
-
value: "1.0.
|
|
420380
|
+
value: "1.0.5"
|
|
420072
420381
|
}, {
|
|
420073
420382
|
label: "Session name",
|
|
420074
420383
|
value: nameValue
|
|
@@ -424838,7 +425147,7 @@ function Config({
|
|
|
424838
425147
|
}
|
|
424839
425148
|
})
|
|
424840
425149
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime183.jsx(ChannelDowngradeDialog, {
|
|
424841
|
-
currentVersion: "1.0.
|
|
425150
|
+
currentVersion: "1.0.5",
|
|
424842
425151
|
onChoice: (choice) => {
|
|
424843
425152
|
setShowSubmenu(null);
|
|
424844
425153
|
setTabsHidden(false);
|
|
@@ -424850,7 +425159,7 @@ function Config({
|
|
|
424850
425159
|
autoUpdatesChannel: "stable"
|
|
424851
425160
|
};
|
|
424852
425161
|
if (choice === "stay") {
|
|
424853
|
-
newSettings.minimumVersion = "1.0.
|
|
425162
|
+
newSettings.minimumVersion = "1.0.5";
|
|
424854
425163
|
}
|
|
424855
425164
|
updateSettingsForSource("userSettings", newSettings);
|
|
424856
425165
|
setSettingsData((prev_27) => ({
|
|
@@ -426558,6 +426867,49 @@ var init_config7 = __esm(() => {
|
|
|
426558
426867
|
config_default = config2;
|
|
426559
426868
|
});
|
|
426560
426869
|
|
|
426870
|
+
// src/commands/council/council.ts
|
|
426871
|
+
var command3, council_default;
|
|
426872
|
+
var init_council = __esm(() => {
|
|
426873
|
+
init_i18n();
|
|
426874
|
+
command3 = {
|
|
426875
|
+
type: "prompt",
|
|
426876
|
+
name: "council",
|
|
426877
|
+
aliases: ["conselho", "tribunal"],
|
|
426878
|
+
description: t("cmd_council"),
|
|
426879
|
+
progressMessage: "convening the Council Tribunal",
|
|
426880
|
+
contentLength: 0,
|
|
426881
|
+
source: "builtin",
|
|
426882
|
+
async getPromptForCommand(args) {
|
|
426883
|
+
const userPrompt = args.trim();
|
|
426884
|
+
if (!userPrompt) {
|
|
426885
|
+
return [
|
|
426886
|
+
{
|
|
426887
|
+
type: "text",
|
|
426888
|
+
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.`
|
|
426889
|
+
}
|
|
426890
|
+
];
|
|
426891
|
+
}
|
|
426892
|
+
return [
|
|
426893
|
+
{
|
|
426894
|
+
type: "text",
|
|
426895
|
+
text: `The user has invoked the Council Tribunal (Tribunal do Conselho) with this topic: "${userPrompt}"
|
|
426896
|
+
|
|
426897
|
+
Use the council_tribunal tool immediately with this prompt. Follow the two-phase workflow:
|
|
426898
|
+
1. First call council_tribunal with just the prompt to get clarifying questions
|
|
426899
|
+
2. Ask each clarifying question to the user via AskUserQuestionTool
|
|
426900
|
+
3. Then call council_tribunal again with the clarifications to start the debate`
|
|
426901
|
+
}
|
|
426902
|
+
];
|
|
426903
|
+
}
|
|
426904
|
+
};
|
|
426905
|
+
council_default = command3;
|
|
426906
|
+
});
|
|
426907
|
+
|
|
426908
|
+
// src/commands/council/index.ts
|
|
426909
|
+
var init_council2 = __esm(() => {
|
|
426910
|
+
init_council();
|
|
426911
|
+
});
|
|
426912
|
+
|
|
426561
426913
|
// src/utils/contextSuggestions.ts
|
|
426562
426914
|
function generateContextSuggestions(data) {
|
|
426563
426915
|
const suggestions = [];
|
|
@@ -431791,7 +432143,7 @@ function UpdateScreen({ onDone }) {
|
|
|
431791
432143
|
setState({ type: "dev-build" });
|
|
431792
432144
|
return;
|
|
431793
432145
|
}
|
|
431794
|
-
const currentVersion = "1.0.
|
|
432146
|
+
const currentVersion = "1.0.5";
|
|
431795
432147
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
431796
432148
|
const latestVersion = await getLatestVersion(channel2);
|
|
431797
432149
|
if (!latestVersion) {
|
|
@@ -432779,8 +433131,8 @@ import {
|
|
|
432779
433131
|
spawnSync as spawnSync3
|
|
432780
433132
|
} from "child_process";
|
|
432781
433133
|
import { basename as basename38 } from "path";
|
|
432782
|
-
function isCommandAvailable3(
|
|
432783
|
-
return !!whichSync(
|
|
433134
|
+
function isCommandAvailable3(command4) {
|
|
433135
|
+
return !!whichSync(command4);
|
|
432784
433136
|
}
|
|
432785
433137
|
function classifyGuiEditor(editor) {
|
|
432786
433138
|
const base2 = basename38(editor.split(" ")[0] ?? "");
|
|
@@ -432879,7 +433231,7 @@ var init_editor = __esm(() => {
|
|
|
432879
433231
|
return "start /wait notepad";
|
|
432880
433232
|
}
|
|
432881
433233
|
const editors = ["code", "vi", "nano"];
|
|
432882
|
-
return editors.find((
|
|
433234
|
+
return editors.find((command4) => isCommandAvailable3(command4));
|
|
432883
433235
|
});
|
|
432884
433236
|
});
|
|
432885
433237
|
|
|
@@ -433902,7 +434254,7 @@ function HelpV2(t0) {
|
|
|
433902
434254
|
let t6;
|
|
433903
434255
|
if ($2[31] !== tabs) {
|
|
433904
434256
|
t6 = /* @__PURE__ */ jsx_runtime213.jsx(Tabs, {
|
|
433905
|
-
title: `ZeroCLI v${"1.0.
|
|
434257
|
+
title: `ZeroCLI v${"1.0.5"}`,
|
|
433906
434258
|
color: "professionalBlue",
|
|
433907
434259
|
defaultTab: "general",
|
|
433908
434260
|
children: tabs
|
|
@@ -435160,12 +435512,12 @@ When building the list, work through these checks and include only what applies:
|
|
|
435160
435512
|
- 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
435513
|
- If tests are missing or sparse: suggest setting up a test framework so Zero can verify its own changes.
|
|
435162
435514
|
- 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.)`,
|
|
435515
|
+
- 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
435516
|
var init_init = __esm(() => {
|
|
435165
435517
|
init_projectOnboardingState();
|
|
435166
435518
|
init_initMode();
|
|
435167
435519
|
init_i18n();
|
|
435168
|
-
|
|
435520
|
+
command4 = {
|
|
435169
435521
|
type: "prompt",
|
|
435170
435522
|
name: "init",
|
|
435171
435523
|
get description() {
|
|
@@ -435184,14 +435536,14 @@ var init_init = __esm(() => {
|
|
|
435184
435536
|
];
|
|
435185
435537
|
}
|
|
435186
435538
|
};
|
|
435187
|
-
init_default3 =
|
|
435539
|
+
init_default3 = command4;
|
|
435188
435540
|
});
|
|
435189
435541
|
|
|
435190
435542
|
// src/commands/init-verifiers.ts
|
|
435191
|
-
var
|
|
435543
|
+
var command5, init_verifiers_default;
|
|
435192
435544
|
var init_init_verifiers = __esm(() => {
|
|
435193
435545
|
init_i18n();
|
|
435194
|
-
|
|
435546
|
+
command5 = {
|
|
435195
435547
|
type: "prompt",
|
|
435196
435548
|
name: "init-verifiers",
|
|
435197
435549
|
description: t("cmd_init_verifiers"),
|
|
@@ -435448,7 +435800,7 @@ After writing the skill file(s), inform the user:
|
|
|
435448
435800
|
];
|
|
435449
435801
|
}
|
|
435450
435802
|
};
|
|
435451
|
-
init_verifiers_default =
|
|
435803
|
+
init_verifiers_default = command5;
|
|
435452
435804
|
});
|
|
435453
435805
|
|
|
435454
435806
|
// src/keybindings/template.ts
|
|
@@ -451753,8 +452105,8 @@ function parsePluginArgs(args) {
|
|
|
451753
452105
|
return { type: "menu" };
|
|
451754
452106
|
}
|
|
451755
452107
|
const parts = args.trim().split(/\s+/);
|
|
451756
|
-
const
|
|
451757
|
-
switch (
|
|
452108
|
+
const command6 = parts[0]?.toLowerCase();
|
|
452109
|
+
switch (command6) {
|
|
451758
452110
|
case "help":
|
|
451759
452111
|
case "--help":
|
|
451760
452112
|
case "-h":
|
|
@@ -458746,7 +459098,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
458746
459098
|
return [];
|
|
458747
459099
|
}
|
|
458748
459100
|
}
|
|
458749
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.0.
|
|
459101
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.0.5") {
|
|
458750
459102
|
if (process.env.USER_TYPE === "ant") {
|
|
458751
459103
|
const changelog = MACRO.VERSION_CHANGELOG;
|
|
458752
459104
|
if (changelog) {
|
|
@@ -465817,11 +466169,11 @@ function checkCrossProjectResume(log, showAllProjects, worktreePaths) {
|
|
|
465817
466169
|
}
|
|
465818
466170
|
if (process.env.USER_TYPE !== "ant") {
|
|
465819
466171
|
const sessionId2 = getSessionIdFromLog(log);
|
|
465820
|
-
const
|
|
466172
|
+
const command7 = `cd ${quote([log.projectPath])} && claude --resume ${sessionId2}`;
|
|
465821
466173
|
return {
|
|
465822
466174
|
isCrossProject: true,
|
|
465823
466175
|
isSameRepoWorktree: false,
|
|
465824
|
-
command:
|
|
466176
|
+
command: command7,
|
|
465825
466177
|
projectPath: log.projectPath
|
|
465826
466178
|
};
|
|
465827
466179
|
}
|
|
@@ -465834,11 +466186,11 @@ function checkCrossProjectResume(log, showAllProjects, worktreePaths) {
|
|
|
465834
466186
|
};
|
|
465835
466187
|
}
|
|
465836
466188
|
const sessionId = getSessionIdFromLog(log);
|
|
465837
|
-
const
|
|
466189
|
+
const command6 = `cd ${quote([log.projectPath])} && claude --resume ${sessionId}`;
|
|
465838
466190
|
return {
|
|
465839
466191
|
isCrossProject: true,
|
|
465840
466192
|
isSameRepoWorktree: false,
|
|
465841
|
-
command:
|
|
466193
|
+
command: command6,
|
|
465842
466194
|
projectPath: log.projectPath
|
|
465843
466195
|
};
|
|
465844
466196
|
}
|
|
@@ -466278,7 +466630,7 @@ ${reasons}`
|
|
|
466278
466630
|
}
|
|
466279
466631
|
};
|
|
466280
466632
|
let session;
|
|
466281
|
-
let
|
|
466633
|
+
let command6;
|
|
466282
466634
|
let target;
|
|
466283
466635
|
if (isPrNumber) {
|
|
466284
466636
|
const repo = await detectCurrentRepositoryWithHost();
|
|
@@ -466298,7 +466650,7 @@ ${reasons}`
|
|
|
466298
466650
|
...commonEnvVars
|
|
466299
466651
|
}
|
|
466300
466652
|
});
|
|
466301
|
-
|
|
466653
|
+
command6 = `/ultrareview ${prNumber}`;
|
|
466302
466654
|
target = `${repo.owner}/${repo.name}#${prNumber}`;
|
|
466303
466655
|
} else {
|
|
466304
466656
|
const baseBranch = await getDefaultBranch() || "main";
|
|
@@ -466343,7 +466695,7 @@ ${reasons}`
|
|
|
466343
466695
|
}
|
|
466344
466696
|
];
|
|
466345
466697
|
}
|
|
466346
|
-
|
|
466698
|
+
command6 = "/ultrareview";
|
|
466347
466699
|
target = baseBranch;
|
|
466348
466700
|
}
|
|
466349
466701
|
if (!session) {
|
|
@@ -466353,7 +466705,7 @@ ${reasons}`
|
|
|
466353
466705
|
registerRemoteAgentTask({
|
|
466354
466706
|
remoteTaskType: "ultrareview",
|
|
466355
466707
|
session,
|
|
466356
|
-
command:
|
|
466708
|
+
command: command6,
|
|
466357
466709
|
context: context5,
|
|
466358
466710
|
isRemoteReview: true
|
|
466359
466711
|
});
|
|
@@ -473082,17 +473434,17 @@ var init_vim = __esm(() => {
|
|
|
473082
473434
|
});
|
|
473083
473435
|
|
|
473084
473436
|
// src/commands/vim/index.ts
|
|
473085
|
-
var
|
|
473437
|
+
var command6, vim_default;
|
|
473086
473438
|
var init_vim2 = __esm(() => {
|
|
473087
473439
|
init_i18n();
|
|
473088
|
-
|
|
473440
|
+
command6 = {
|
|
473089
473441
|
name: "vim",
|
|
473090
473442
|
description: t("cmd_vim"),
|
|
473091
473443
|
supportsNonInteractive: false,
|
|
473092
473444
|
type: "local",
|
|
473093
473445
|
load: () => Promise.resolve().then(() => (init_vim(), exports_vim))
|
|
473094
473446
|
};
|
|
473095
|
-
vim_default =
|
|
473447
|
+
vim_default = command6;
|
|
473096
473448
|
});
|
|
473097
473449
|
|
|
473098
473450
|
// src/commands/thinkback/thinkback.tsx
|
|
@@ -487395,10 +487747,10 @@ var init_agents2 = __esm(() => {
|
|
|
487395
487747
|
});
|
|
487396
487748
|
|
|
487397
487749
|
// src/commands/auto-fix.ts
|
|
487398
|
-
var
|
|
487750
|
+
var command7, auto_fix_default;
|
|
487399
487751
|
var init_auto_fix = __esm(() => {
|
|
487400
487752
|
init_i18n();
|
|
487401
|
-
|
|
487753
|
+
command7 = {
|
|
487402
487754
|
name: "auto-fix",
|
|
487403
487755
|
description: t("cmd_auto_fix"),
|
|
487404
487756
|
isEnabled: () => true,
|
|
@@ -487430,7 +487782,7 @@ var init_auto_fix = __esm(() => {
|
|
|
487430
487782
|
];
|
|
487431
487783
|
}
|
|
487432
487784
|
};
|
|
487433
|
-
auto_fix_default =
|
|
487785
|
+
auto_fix_default = command7;
|
|
487434
487786
|
});
|
|
487435
487787
|
|
|
487436
487788
|
// src/commands/plugin/plugin.tsx
|
|
@@ -487784,7 +488136,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
487784
488136
|
smapsRollup,
|
|
487785
488137
|
platform: process.platform,
|
|
487786
488138
|
nodeVersion: process.version,
|
|
487787
|
-
ccVersion: "1.0.
|
|
488139
|
+
ccVersion: "1.0.5"
|
|
487788
488140
|
};
|
|
487789
488141
|
}
|
|
487790
488142
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -488371,7 +488723,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
488371
488723
|
var call60 = async () => {
|
|
488372
488724
|
return {
|
|
488373
488725
|
type: "text",
|
|
488374
|
-
value: `${"1.0.
|
|
488726
|
+
value: `${"1.0.5"} (built ${"2026-05-22T14:30:48.592Z"})`
|
|
488375
488727
|
};
|
|
488376
488728
|
}, version2, version_default;
|
|
488377
488729
|
var init_version = __esm(() => {
|
|
@@ -490097,11 +490449,11 @@ var init_sandbox_toggle = __esm(() => {
|
|
|
490097
490449
|
});
|
|
490098
490450
|
|
|
490099
490451
|
// src/commands/sandbox-toggle/index.ts
|
|
490100
|
-
var
|
|
490452
|
+
var command8, sandbox_toggle_default;
|
|
490101
490453
|
var init_sandbox_toggle2 = __esm(() => {
|
|
490102
490454
|
init_figures();
|
|
490103
490455
|
init_sandbox_adapter();
|
|
490104
|
-
|
|
490456
|
+
command8 = {
|
|
490105
490457
|
name: "sandbox",
|
|
490106
490458
|
get description() {
|
|
490107
490459
|
const currentlyEnabled = SandboxManager2.isSandboxingEnabled();
|
|
@@ -490133,7 +490485,7 @@ var init_sandbox_toggle2 = __esm(() => {
|
|
|
490133
490485
|
type: "local-jsx",
|
|
490134
490486
|
load: () => Promise.resolve().then(() => (init_sandbox_toggle(), exports_sandbox_toggle))
|
|
490135
490487
|
};
|
|
490136
|
-
sandbox_toggle_default =
|
|
490488
|
+
sandbox_toggle_default = command8;
|
|
490137
490489
|
});
|
|
490138
490490
|
|
|
490139
490491
|
// src/utils/claudeInChrome/setupPortable.ts
|
|
@@ -490339,18 +490691,18 @@ function registerWindowsNativeHosts(manifestPath) {
|
|
|
490339
490691
|
});
|
|
490340
490692
|
}
|
|
490341
490693
|
}
|
|
490342
|
-
async function createWrapperScript(
|
|
490694
|
+
async function createWrapperScript(command9) {
|
|
490343
490695
|
const platform5 = getPlatform();
|
|
490344
490696
|
const chromeDir = join127(getZeroConfigHomeDir(), "chrome");
|
|
490345
490697
|
const wrapperPath = platform5 === "windows" ? join127(chromeDir, "chrome-native-host.bat") : join127(chromeDir, "chrome-native-host");
|
|
490346
490698
|
const scriptContent = platform5 === "windows" ? `@echo off
|
|
490347
490699
|
REM Chrome native host wrapper script
|
|
490348
490700
|
REM Generated by ZeroCLI - do not edit manually
|
|
490349
|
-
${
|
|
490701
|
+
${command9}
|
|
490350
490702
|
` : `#!/bin/sh
|
|
490351
490703
|
# Chrome native host wrapper script
|
|
490352
490704
|
# Generated by ZeroCLI - do not edit manually
|
|
490353
|
-
exec ${
|
|
490705
|
+
exec ${command9}
|
|
490354
490706
|
`;
|
|
490355
490707
|
const existingContent = await readFile46(wrapperPath, "utf-8").catch(() => null);
|
|
490356
490708
|
if (existingContent === scriptContent) {
|
|
@@ -490801,11 +491153,11 @@ var init_chrome = __esm(() => {
|
|
|
490801
491153
|
});
|
|
490802
491154
|
|
|
490803
491155
|
// src/commands/chrome/index.ts
|
|
490804
|
-
var
|
|
491156
|
+
var command9, chrome_default;
|
|
490805
491157
|
var init_chrome2 = __esm(() => {
|
|
490806
491158
|
init_state();
|
|
490807
491159
|
init_i18n();
|
|
490808
|
-
|
|
491160
|
+
command9 = {
|
|
490809
491161
|
name: "chrome",
|
|
490810
491162
|
description: t("cmd_chrome"),
|
|
490811
491163
|
availability: [],
|
|
@@ -490813,7 +491165,7 @@ var init_chrome2 = __esm(() => {
|
|
|
490813
491165
|
type: "local-jsx",
|
|
490814
491166
|
load: () => Promise.resolve().then(() => (init_chrome(), exports_chrome))
|
|
490815
491167
|
};
|
|
490816
|
-
chrome_default =
|
|
491168
|
+
chrome_default = command9;
|
|
490817
491169
|
});
|
|
490818
491170
|
|
|
490819
491171
|
// src/commands/stickers/stickers.ts
|
|
@@ -491121,7 +491473,7 @@ function registerBundledSkill(definition) {
|
|
|
491121
491473
|
return prependBaseDir(blocks, extractedDir);
|
|
491122
491474
|
};
|
|
491123
491475
|
}
|
|
491124
|
-
const
|
|
491476
|
+
const command10 = {
|
|
491125
491477
|
type: "prompt",
|
|
491126
491478
|
name: definition.name,
|
|
491127
491479
|
description: definition.description,
|
|
@@ -491145,7 +491497,7 @@ function registerBundledSkill(definition) {
|
|
|
491145
491497
|
progressMessage: "running",
|
|
491146
491498
|
getPromptForCommand
|
|
491147
491499
|
};
|
|
491148
|
-
bundledSkills.push(
|
|
491500
|
+
bundledSkills.push(command10);
|
|
491149
491501
|
}
|
|
491150
491502
|
function getBundledSkills() {
|
|
491151
491503
|
return [...bundledSkills];
|
|
@@ -497167,10 +497519,10 @@ function extractToolStats(log) {
|
|
|
497167
497519
|
`) + 1;
|
|
497168
497520
|
}
|
|
497169
497521
|
}
|
|
497170
|
-
const
|
|
497171
|
-
if (
|
|
497522
|
+
const command10 = input.command || "";
|
|
497523
|
+
if (command10.includes("git commit"))
|
|
497172
497524
|
gitCommits++;
|
|
497173
|
-
if (
|
|
497525
|
+
if (command10.includes("git push"))
|
|
497174
497526
|
gitPushes++;
|
|
497175
497527
|
}
|
|
497176
497528
|
}
|
|
@@ -498528,7 +498880,7 @@ function generateHtmlReport(data, insights) {
|
|
|
498528
498880
|
function buildExportData(data, insights, facets) {
|
|
498529
498881
|
let version3;
|
|
498530
498882
|
try {
|
|
498531
|
-
version3 = "1.0.
|
|
498883
|
+
version3 = "1.0.5";
|
|
498532
498884
|
} catch {
|
|
498533
498885
|
version3 = "unknown";
|
|
498534
498886
|
}
|
|
@@ -499234,14 +499586,14 @@ function hasCommand(commandName, commands) {
|
|
|
499234
499586
|
return findCommand(commandName, commands) !== undefined;
|
|
499235
499587
|
}
|
|
499236
499588
|
function getCommand(commandName, commands) {
|
|
499237
|
-
const
|
|
499238
|
-
if (!
|
|
499589
|
+
const command10 = findCommand(commandName, commands);
|
|
499590
|
+
if (!command10) {
|
|
499239
499591
|
throw ReferenceError(`Command ${commandName} not found. Available commands: ${commands.map((_) => {
|
|
499240
499592
|
const name = getCommandName(_);
|
|
499241
499593
|
return _.aliases ? `${name} (aliases: ${_.aliases.join(", ")})` : name;
|
|
499242
499594
|
}).sort((a2, b) => a2.localeCompare(b)).join(", ")}`);
|
|
499243
499595
|
}
|
|
499244
|
-
return
|
|
499596
|
+
return command10;
|
|
499245
499597
|
}
|
|
499246
499598
|
function formatDescriptionWithSource(cmd) {
|
|
499247
499599
|
if (cmd.type !== "prompt") {
|
|
@@ -499282,6 +499634,7 @@ var init_commands2 = __esm(() => {
|
|
|
499282
499634
|
init_commit_push_pr();
|
|
499283
499635
|
init_compact3();
|
|
499284
499636
|
init_config7();
|
|
499637
|
+
init_council2();
|
|
499285
499638
|
init_context4();
|
|
499286
499639
|
init_cost2();
|
|
499287
499640
|
init_diff4();
|
|
@@ -499438,6 +499791,7 @@ var init_commands2 = __esm(() => {
|
|
|
499438
499791
|
color_default,
|
|
499439
499792
|
compact_default,
|
|
499440
499793
|
config_default,
|
|
499794
|
+
council_default,
|
|
499441
499795
|
copy_default,
|
|
499442
499796
|
desktop_default,
|
|
499443
499797
|
context4,
|
|
@@ -502724,7 +503078,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
502724
503078
|
init_slowOperations();
|
|
502725
503079
|
init_uuid();
|
|
502726
503080
|
try {
|
|
502727
|
-
VERSION7 = "1.0.
|
|
503081
|
+
VERSION7 = "1.0.5";
|
|
502728
503082
|
} catch {
|
|
502729
503083
|
VERSION7 = "unknown";
|
|
502730
503084
|
}
|
|
@@ -504045,7 +504399,7 @@ var init_filesystem = __esm(() => {
|
|
|
504045
504399
|
});
|
|
504046
504400
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
504047
504401
|
const nonce = randomBytes17(16).toString("hex");
|
|
504048
|
-
return join137(getZeroTempDir(), "bundled-skills", "1.0.
|
|
504402
|
+
return join137(getZeroTempDir(), "bundled-skills", "1.0.5", nonce);
|
|
504049
504403
|
});
|
|
504050
504404
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
504051
504405
|
});
|
|
@@ -506617,7 +506971,7 @@ function executeInBackground({
|
|
|
506617
506971
|
asyncResponse,
|
|
506618
506972
|
hookEvent,
|
|
506619
506973
|
hookName,
|
|
506620
|
-
command:
|
|
506974
|
+
command: command10,
|
|
506621
506975
|
asyncRewake,
|
|
506622
506976
|
pluginId
|
|
506623
506977
|
}) {
|
|
@@ -506655,7 +507009,7 @@ function executeInBackground({
|
|
|
506655
507009
|
asyncResponse,
|
|
506656
507010
|
hookEvent,
|
|
506657
507011
|
hookName,
|
|
506658
|
-
command:
|
|
507012
|
+
command: command10,
|
|
506659
507013
|
shellCommand,
|
|
506660
507014
|
pluginId
|
|
506661
507015
|
});
|
|
@@ -506772,7 +507126,7 @@ function parseHttpHookOutput(body) {
|
|
|
506772
507126
|
}
|
|
506773
507127
|
function processHookJSONOutput({
|
|
506774
507128
|
json: json2,
|
|
506775
|
-
command:
|
|
507129
|
+
command: command10,
|
|
506776
507130
|
hookName,
|
|
506777
507131
|
toolUseID,
|
|
506778
507132
|
hookEvent,
|
|
@@ -506799,7 +507153,7 @@ function processHookJSONOutput({
|
|
|
506799
507153
|
result.permissionBehavior = "deny";
|
|
506800
507154
|
result.blockingError = {
|
|
506801
507155
|
blockingError: json2.reason || "Blocked by hook",
|
|
506802
|
-
command:
|
|
507156
|
+
command: command10
|
|
506803
507157
|
};
|
|
506804
507158
|
break;
|
|
506805
507159
|
default:
|
|
@@ -506818,7 +507172,7 @@ function processHookJSONOutput({
|
|
|
506818
507172
|
result.permissionBehavior = "deny";
|
|
506819
507173
|
result.blockingError = {
|
|
506820
507174
|
blockingError: json2.reason || "Blocked by hook",
|
|
506821
|
-
command:
|
|
507175
|
+
command: command10
|
|
506822
507176
|
};
|
|
506823
507177
|
break;
|
|
506824
507178
|
case "ask":
|
|
@@ -506846,7 +507200,7 @@ function processHookJSONOutput({
|
|
|
506846
507200
|
result.permissionBehavior = "deny";
|
|
506847
507201
|
result.blockingError = {
|
|
506848
507202
|
blockingError: json2.hookSpecificOutput.permissionDecisionReason || json2.reason || "Blocked by hook",
|
|
506849
|
-
command:
|
|
507203
|
+
command: command10
|
|
506850
507204
|
};
|
|
506851
507205
|
break;
|
|
506852
507206
|
case "ask":
|
|
@@ -506906,7 +507260,7 @@ function processHookJSONOutput({
|
|
|
506906
507260
|
if (json2.hookSpecificOutput.action === "decline") {
|
|
506907
507261
|
result.blockingError = {
|
|
506908
507262
|
blockingError: json2.reason || "Elicitation denied by hook",
|
|
506909
|
-
command:
|
|
507263
|
+
command: command10
|
|
506910
507264
|
};
|
|
506911
507265
|
}
|
|
506912
507266
|
}
|
|
@@ -506920,7 +507274,7 @@ function processHookJSONOutput({
|
|
|
506920
507274
|
if (json2.hookSpecificOutput.action === "decline") {
|
|
506921
507275
|
result.blockingError = {
|
|
506922
507276
|
blockingError: json2.reason || "Elicitation result blocked by hook",
|
|
506923
|
-
command:
|
|
507277
|
+
command: command10
|
|
506924
507278
|
};
|
|
506925
507279
|
}
|
|
506926
507280
|
}
|
|
@@ -506944,7 +507298,7 @@ function processHookJSONOutput({
|
|
|
506944
507298
|
stdout,
|
|
506945
507299
|
stderr,
|
|
506946
507300
|
exitCode,
|
|
506947
|
-
command:
|
|
507301
|
+
command: command10,
|
|
506948
507302
|
durationMs
|
|
506949
507303
|
})
|
|
506950
507304
|
};
|
|
@@ -506959,29 +507313,29 @@ async function execCommandHook(hook, hookEvent, hookName, jsonInput, signal, hoo
|
|
|
506959
507313
|
const isPowerShell = shellType === "powershell";
|
|
506960
507314
|
const toHookPath = isWindows2 && !isPowerShell ? (p) => windowsPathToPosixPath(p) : (p) => p;
|
|
506961
507315
|
const projectDir = getProjectRoot();
|
|
506962
|
-
let
|
|
507316
|
+
let command10 = hook.command;
|
|
506963
507317
|
let pluginOpts;
|
|
506964
507318
|
if (pluginRoot) {
|
|
506965
507319
|
if (!await pathExists(pluginRoot)) {
|
|
506966
507320
|
throw new Error(`Plugin directory does not exist: ${pluginRoot}` + (pluginId ? ` (${pluginId} — run /plugin to reinstall)` : ""));
|
|
506967
507321
|
}
|
|
506968
507322
|
const rootPath = toHookPath(pluginRoot);
|
|
506969
|
-
|
|
507323
|
+
command10 = command10.replace(/\$\{CLAUDE_PLUGIN_ROOT\}/g, () => rootPath);
|
|
506970
507324
|
if (pluginId) {
|
|
506971
507325
|
const dataPath = toHookPath(getPluginDataDir(pluginId));
|
|
506972
|
-
|
|
507326
|
+
command10 = command10.replace(/\$\{CLAUDE_PLUGIN_DATA\}/g, () => dataPath);
|
|
506973
507327
|
}
|
|
506974
507328
|
if (pluginId) {
|
|
506975
507329
|
pluginOpts = loadPluginOptions(pluginId);
|
|
506976
|
-
|
|
507330
|
+
command10 = substituteUserConfigVariables(command10, pluginOpts);
|
|
506977
507331
|
}
|
|
506978
507332
|
}
|
|
506979
|
-
if (isWindows2 && !isPowerShell &&
|
|
506980
|
-
if (!
|
|
506981
|
-
|
|
507333
|
+
if (isWindows2 && !isPowerShell && command10.trim().match(/\.sh(\s|$|")/)) {
|
|
507334
|
+
if (!command10.trim().startsWith("bash ")) {
|
|
507335
|
+
command10 = `bash ${command10}`;
|
|
506982
507336
|
}
|
|
506983
507337
|
}
|
|
506984
|
-
const finalCommand = !isPowerShell && process.env.CLAUDE_CODE_SHELL_PREFIX ? formatShellPrefixCommand(process.env.CLAUDE_CODE_SHELL_PREFIX,
|
|
507338
|
+
const finalCommand = !isPowerShell && process.env.CLAUDE_CODE_SHELL_PREFIX ? formatShellPrefixCommand(process.env.CLAUDE_CODE_SHELL_PREFIX, command10) : command10;
|
|
506985
507339
|
const hookTimeoutMs = hook.timeout ? hook.timeout * 1000 : TOOL_HOOK_EXECUTION_TIMEOUT_MS;
|
|
506986
507340
|
const envVars = {
|
|
506987
507341
|
...subprocessEnv(),
|
|
@@ -511392,8 +511746,8 @@ var require_help = __commonJS((exports) => {
|
|
|
511392
511746
|
return argument.name();
|
|
511393
511747
|
}
|
|
511394
511748
|
longestSubcommandTermLength(cmd, helper) {
|
|
511395
|
-
return helper.visibleCommands(cmd).reduce((max2,
|
|
511396
|
-
return Math.max(max2, helper.subcommandTerm(
|
|
511749
|
+
return helper.visibleCommands(cmd).reduce((max2, command10) => {
|
|
511750
|
+
return Math.max(max2, helper.subcommandTerm(command10).length);
|
|
511397
511751
|
}, 0);
|
|
511398
511752
|
}
|
|
511399
511753
|
longestOptionTermLength(cmd, helper) {
|
|
@@ -511857,8 +512211,8 @@ var require_command = __commonJS((exports) => {
|
|
|
511857
512211
|
}
|
|
511858
512212
|
_getCommandAndAncestors() {
|
|
511859
512213
|
const result = [];
|
|
511860
|
-
for (let
|
|
511861
|
-
result.push(
|
|
512214
|
+
for (let command10 = this;command10; command10 = command10.parent) {
|
|
512215
|
+
result.push(command10);
|
|
511862
512216
|
}
|
|
511863
512217
|
return result;
|
|
511864
512218
|
}
|
|
@@ -512068,17 +512422,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512068
512422
|
}
|
|
512069
512423
|
this.options.push(option);
|
|
512070
512424
|
}
|
|
512071
|
-
_registerCommand(
|
|
512425
|
+
_registerCommand(command10) {
|
|
512072
512426
|
const knownBy = (cmd) => {
|
|
512073
512427
|
return [cmd.name()].concat(cmd.aliases());
|
|
512074
512428
|
};
|
|
512075
|
-
const alreadyUsed = knownBy(
|
|
512429
|
+
const alreadyUsed = knownBy(command10).find((name) => this._findCommand(name));
|
|
512076
512430
|
if (alreadyUsed) {
|
|
512077
512431
|
const existingCmd = knownBy(this._findCommand(alreadyUsed)).join("|");
|
|
512078
|
-
const newCmd = knownBy(
|
|
512432
|
+
const newCmd = knownBy(command10).join("|");
|
|
512079
512433
|
throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);
|
|
512080
512434
|
}
|
|
512081
|
-
this.commands.push(
|
|
512435
|
+
this.commands.push(command10);
|
|
512082
512436
|
}
|
|
512083
512437
|
addOption(option) {
|
|
512084
512438
|
this._registerOption(option);
|
|
@@ -512770,12 +513124,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512770
513124
|
let suggestion = "";
|
|
512771
513125
|
if (flag.startsWith("--") && this._showSuggestionAfterError) {
|
|
512772
513126
|
let candidateFlags = [];
|
|
512773
|
-
let
|
|
513127
|
+
let command10 = this;
|
|
512774
513128
|
do {
|
|
512775
|
-
const moreFlags =
|
|
513129
|
+
const moreFlags = command10.createHelp().visibleOptions(command10).filter((option) => option.long).map((option) => option.long);
|
|
512776
513130
|
candidateFlags = candidateFlags.concat(moreFlags);
|
|
512777
|
-
|
|
512778
|
-
} while (
|
|
513131
|
+
command10 = command10.parent;
|
|
513132
|
+
} while (command10 && !command10._enablePositionalOptions);
|
|
512779
513133
|
suggestion = suggestSimilar(flag, candidateFlags);
|
|
512780
513134
|
}
|
|
512781
513135
|
const message = `error: unknown option '${flag}'${suggestion}`;
|
|
@@ -512795,10 +513149,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512795
513149
|
let suggestion = "";
|
|
512796
513150
|
if (this._showSuggestionAfterError) {
|
|
512797
513151
|
const candidateNames = [];
|
|
512798
|
-
this.createHelp().visibleCommands(this).forEach((
|
|
512799
|
-
candidateNames.push(
|
|
512800
|
-
if (
|
|
512801
|
-
candidateNames.push(
|
|
513152
|
+
this.createHelp().visibleCommands(this).forEach((command10) => {
|
|
513153
|
+
candidateNames.push(command10.name());
|
|
513154
|
+
if (command10.alias())
|
|
513155
|
+
candidateNames.push(command10.alias());
|
|
512802
513156
|
});
|
|
512803
513157
|
suggestion = suggestSimilar(unknownName, candidateNames);
|
|
512804
513158
|
}
|
|
@@ -512839,18 +513193,18 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512839
513193
|
alias(alias) {
|
|
512840
513194
|
if (alias === undefined)
|
|
512841
513195
|
return this._aliases[0];
|
|
512842
|
-
let
|
|
513196
|
+
let command10 = this;
|
|
512843
513197
|
if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {
|
|
512844
|
-
|
|
513198
|
+
command10 = this.commands[this.commands.length - 1];
|
|
512845
513199
|
}
|
|
512846
|
-
if (alias ===
|
|
513200
|
+
if (alias === command10._name)
|
|
512847
513201
|
throw new Error("Command alias can't be the same as its name");
|
|
512848
513202
|
const matchingCommand = this.parent?._findCommand(alias);
|
|
512849
513203
|
if (matchingCommand) {
|
|
512850
513204
|
const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join("|");
|
|
512851
513205
|
throw new Error(`cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`);
|
|
512852
513206
|
}
|
|
512853
|
-
|
|
513207
|
+
command10._aliases.push(alias);
|
|
512854
513208
|
return this;
|
|
512855
513209
|
}
|
|
512856
513210
|
aliases(aliases) {
|
|
@@ -512914,7 +513268,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512914
513268
|
contextOptions = undefined;
|
|
512915
513269
|
}
|
|
512916
513270
|
const context5 = this._getHelpContext(contextOptions);
|
|
512917
|
-
this._getCommandAndAncestors().reverse().forEach((
|
|
513271
|
+
this._getCommandAndAncestors().reverse().forEach((command10) => command10.emit("beforeAllHelp", context5));
|
|
512918
513272
|
this.emit("beforeHelp", context5);
|
|
512919
513273
|
let helpInformation = this.helpInformation(context5);
|
|
512920
513274
|
if (deprecatedCallback) {
|
|
@@ -512928,7 +513282,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
512928
513282
|
this.emit(this._getHelpOption().long);
|
|
512929
513283
|
}
|
|
512930
513284
|
this.emit("afterHelp", context5);
|
|
512931
|
-
this._getCommandAndAncestors().forEach((
|
|
513285
|
+
this._getCommandAndAncestors().forEach((command10) => command10.emit("afterAllHelp", context5));
|
|
512932
513286
|
}
|
|
512933
513287
|
helpOption(flags, description) {
|
|
512934
513288
|
if (typeof flags === "boolean") {
|
|
@@ -515065,7 +515419,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
515065
515419
|
slash_commands: inputs.commands.filter((c6) => c6.userInvocable !== false).map((c6) => c6.name),
|
|
515066
515420
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
515067
515421
|
betas: getSdkBetas(),
|
|
515068
|
-
claude_code_version: "1.0.
|
|
515422
|
+
claude_code_version: "1.0.5",
|
|
515069
515423
|
output_style: outputStyle2,
|
|
515070
515424
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
515071
515425
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -518889,9 +519243,9 @@ var init_AskUserQuestionPermissionRequest = __esm(() => {
|
|
|
518889
519243
|
});
|
|
518890
519244
|
|
|
518891
519245
|
// src/tools/BashTool/destructiveCommandWarning.ts
|
|
518892
|
-
function getDestructiveCommandWarning(
|
|
519246
|
+
function getDestructiveCommandWarning(command10) {
|
|
518893
519247
|
for (const { pattern, warning } of DESTRUCTIVE_PATTERNS) {
|
|
518894
|
-
if (pattern.test(
|
|
519248
|
+
if (pattern.test(command10)) {
|
|
518895
519249
|
return warning;
|
|
518896
519250
|
}
|
|
518897
519251
|
}
|
|
@@ -519002,9 +519356,9 @@ function findFirstSubcommand(args, spec) {
|
|
|
519002
519356
|
}
|
|
519003
519357
|
return;
|
|
519004
519358
|
}
|
|
519005
|
-
async function buildPrefix(
|
|
519006
|
-
const maxDepth = await calculateDepth(
|
|
519007
|
-
const parts = [
|
|
519359
|
+
async function buildPrefix(command10, args, spec) {
|
|
519360
|
+
const maxDepth = await calculateDepth(command10, args, spec);
|
|
519361
|
+
const parts = [command10];
|
|
519008
519362
|
const hasSubcommands = !!spec?.subcommands?.length;
|
|
519009
519363
|
let foundSubcommand = false;
|
|
519010
519364
|
for (let i3 = 0;i3 < args.length; i3++) {
|
|
@@ -519012,7 +519366,7 @@ async function buildPrefix(command9, args, spec) {
|
|
|
519012
519366
|
if (!arg || parts.length >= maxDepth)
|
|
519013
519367
|
break;
|
|
519014
519368
|
if (arg.startsWith("-")) {
|
|
519015
|
-
if (arg === "-c" && ["python", "python3"].includes(
|
|
519369
|
+
if (arg === "-c" && ["python", "python3"].includes(command10.toLowerCase()))
|
|
519016
519370
|
break;
|
|
519017
519371
|
if (spec?.options) {
|
|
519018
519372
|
const option = spec.options.find((opt) => Array.isArray(opt.name) ? opt.name.includes(arg) : opt.name === arg);
|
|
@@ -519037,9 +519391,9 @@ async function buildPrefix(command9, args, spec) {
|
|
|
519037
519391
|
}
|
|
519038
519392
|
return parts.join(" ");
|
|
519039
519393
|
}
|
|
519040
|
-
async function calculateDepth(
|
|
519394
|
+
async function calculateDepth(command10, args, spec) {
|
|
519041
519395
|
const firstSubcommand = findFirstSubcommand(args, spec);
|
|
519042
|
-
const commandLower =
|
|
519396
|
+
const commandLower = command10.toLowerCase();
|
|
519043
519397
|
const key = firstSubcommand ? `${commandLower} ${firstSubcommand.toLowerCase()}` : commandLower;
|
|
519044
519398
|
if (DEPTH_RULES[key])
|
|
519045
519399
|
return DEPTH_RULES[key];
|
|
@@ -519354,15 +519708,15 @@ var init_specs = __esm(() => {
|
|
|
519354
519708
|
});
|
|
519355
519709
|
|
|
519356
519710
|
// src/utils/bash/registry.ts
|
|
519357
|
-
async function loadFigSpec(
|
|
519358
|
-
if (!
|
|
519711
|
+
async function loadFigSpec(command10) {
|
|
519712
|
+
if (!command10 || command10.includes("/") || command10.includes("\\"))
|
|
519359
519713
|
return null;
|
|
519360
|
-
if (
|
|
519714
|
+
if (command10.includes(".."))
|
|
519361
519715
|
return null;
|
|
519362
|
-
if (
|
|
519716
|
+
if (command10.startsWith("-") && command10 !== "-")
|
|
519363
519717
|
return null;
|
|
519364
519718
|
try {
|
|
519365
|
-
const module = await import(`@withfig/autocomplete/build/${
|
|
519719
|
+
const module = await import(`@withfig/autocomplete/build/${command10}.js`);
|
|
519366
519720
|
return module.default || module;
|
|
519367
519721
|
} catch {
|
|
519368
519722
|
return null;
|
|
@@ -519372,10 +519726,10 @@ var getCommandSpec;
|
|
|
519372
519726
|
var init_registry2 = __esm(() => {
|
|
519373
519727
|
init_memoize2();
|
|
519374
519728
|
init_specs();
|
|
519375
|
-
getCommandSpec = memoizeWithLRU(async (
|
|
519376
|
-
const spec = specs_default.find((s) => s.name ===
|
|
519729
|
+
getCommandSpec = memoizeWithLRU(async (command10) => {
|
|
519730
|
+
const spec = specs_default.find((s) => s.name === command10) || await loadFigSpec(command10) || null;
|
|
519377
519731
|
return spec;
|
|
519378
|
-
}, (
|
|
519732
|
+
}, (command10) => command10);
|
|
519379
519733
|
});
|
|
519380
519734
|
|
|
519381
519735
|
// src/utils/bash/prefix.ts
|
|
@@ -519384,10 +519738,10 @@ function isKnownSubcommand2(arg, spec) {
|
|
|
519384
519738
|
return false;
|
|
519385
519739
|
return spec.subcommands.some((sub) => Array.isArray(sub.name) ? sub.name.includes(arg) : sub.name === arg);
|
|
519386
519740
|
}
|
|
519387
|
-
async function getCommandPrefixStatic(
|
|
519741
|
+
async function getCommandPrefixStatic(command10, recursionDepth = 0, wrapperCount = 0) {
|
|
519388
519742
|
if (wrapperCount > 2 || recursionDepth > 10)
|
|
519389
519743
|
return null;
|
|
519390
|
-
const parsed = await parseCommand2(
|
|
519744
|
+
const parsed = await parseCommand2(command10);
|
|
519391
519745
|
if (!parsed)
|
|
519392
519746
|
return null;
|
|
519393
519747
|
if (!parsed.commandNode) {
|
|
@@ -519410,12 +519764,12 @@ async function getCommandPrefixStatic(command9, recursionDepth = 0, wrapperCount
|
|
|
519410
519764
|
const envPrefix = envVars.length ? `${envVars.join(" ")} ` : "";
|
|
519411
519765
|
return { commandPrefix: prefix ? envPrefix + prefix : null };
|
|
519412
519766
|
}
|
|
519413
|
-
async function handleWrapper(
|
|
519414
|
-
const spec = await getCommandSpec(
|
|
519767
|
+
async function handleWrapper(command10, args, recursionDepth, wrapperCount) {
|
|
519768
|
+
const spec = await getCommandSpec(command10);
|
|
519415
519769
|
if (spec?.args) {
|
|
519416
519770
|
const commandArgIndex = toArray5(spec.args).findIndex((arg) => arg?.isCommand);
|
|
519417
519771
|
if (commandArgIndex !== -1) {
|
|
519418
|
-
const parts = [
|
|
519772
|
+
const parts = [command10];
|
|
519419
519773
|
for (let i3 = 0;i3 < args.length && i3 <= commandArgIndex; i3++) {
|
|
519420
519774
|
if (i3 === commandArgIndex) {
|
|
519421
519775
|
const result2 = await getCommandPrefixStatic(args.slice(i3).join(" "), recursionDepth + 1, wrapperCount + 1);
|
|
@@ -519432,14 +519786,14 @@ async function handleWrapper(command9, args, recursionDepth, wrapperCount) {
|
|
|
519432
519786
|
}
|
|
519433
519787
|
const wrapped = args.find((arg) => !arg.startsWith("-") && !NUMERIC.test(arg) && !ENV_VAR.test(arg));
|
|
519434
519788
|
if (!wrapped)
|
|
519435
|
-
return
|
|
519789
|
+
return command10;
|
|
519436
519790
|
const result = await getCommandPrefixStatic(args.slice(args.indexOf(wrapped)).join(" "), recursionDepth + 1, wrapperCount + 1);
|
|
519437
|
-
return !result?.commandPrefix ? null : `${
|
|
519791
|
+
return !result?.commandPrefix ? null : `${command10} ${result.commandPrefix}`;
|
|
519438
519792
|
}
|
|
519439
|
-
async function getCompoundCommandPrefixesStatic(
|
|
519440
|
-
const subcommands = splitCommand_DEPRECATED(
|
|
519793
|
+
async function getCompoundCommandPrefixesStatic(command10, excludeSubcommand) {
|
|
519794
|
+
const subcommands = splitCommand_DEPRECATED(command10);
|
|
519441
519795
|
if (subcommands.length <= 1) {
|
|
519442
|
-
const result = await getCommandPrefixStatic(
|
|
519796
|
+
const result = await getCommandPrefixStatic(command10);
|
|
519443
519797
|
return result?.commandPrefix ? [result.commandPrefix] : [];
|
|
519444
519798
|
}
|
|
519445
519799
|
const prefixes = [];
|
|
@@ -522503,8 +522857,8 @@ function generateShellSuggestionsLabel(suggestions, shellToolName, commandTransf
|
|
|
522503
522857
|
const shellCommands = [...new Set(shellRules.flatMap((rule) => {
|
|
522504
522858
|
if (!rule.ruleContent)
|
|
522505
522859
|
return [];
|
|
522506
|
-
const
|
|
522507
|
-
return commandTransform ? commandTransform(
|
|
522860
|
+
const command10 = permissionRuleExtractPrefix2(rule.ruleContent) ?? rule.ruleContent;
|
|
522861
|
+
return commandTransform ? commandTransform(command10) : command10;
|
|
522508
522862
|
}))];
|
|
522509
522863
|
const hasDirectories = directories.length > 0;
|
|
522510
522864
|
const hasReadPaths = readPaths.length > 0;
|
|
@@ -522619,12 +522973,12 @@ var init_shellPermissionHelpers = __esm(() => {
|
|
|
522619
522973
|
});
|
|
522620
522974
|
|
|
522621
522975
|
// src/components/permissions/BashPermissionRequest/bashToolUseOptions.tsx
|
|
522622
|
-
function stripBashRedirections(
|
|
522976
|
+
function stripBashRedirections(command10) {
|
|
522623
522977
|
const {
|
|
522624
522978
|
commandWithoutRedirections,
|
|
522625
522979
|
redirections
|
|
522626
|
-
} = extractOutputRedirections(
|
|
522627
|
-
return redirections.length > 0 ? commandWithoutRedirections :
|
|
522980
|
+
} = extractOutputRedirections(command10);
|
|
522981
|
+
return redirections.length > 0 ? commandWithoutRedirections : command10;
|
|
522628
522982
|
}
|
|
522629
522983
|
function bashToolUseOptions({
|
|
522630
522984
|
suggestions = [],
|
|
@@ -522717,21 +523071,21 @@ function BashPermissionRequest(props) {
|
|
|
522717
523071
|
verbose,
|
|
522718
523072
|
workerBadge
|
|
522719
523073
|
} = props;
|
|
522720
|
-
let
|
|
523074
|
+
let command10;
|
|
522721
523075
|
let description;
|
|
522722
523076
|
let t0;
|
|
522723
523077
|
if ($2[0] !== toolUseConfirm.input) {
|
|
522724
523078
|
({
|
|
522725
|
-
command:
|
|
523079
|
+
command: command10,
|
|
522726
523080
|
description
|
|
522727
523081
|
} = BashTool.inputSchema.parse(toolUseConfirm.input));
|
|
522728
|
-
t0 = parseSedEditCommand(
|
|
523082
|
+
t0 = parseSedEditCommand(command10);
|
|
522729
523083
|
$2[0] = toolUseConfirm.input;
|
|
522730
|
-
$2[1] =
|
|
523084
|
+
$2[1] = command10;
|
|
522731
523085
|
$2[2] = description;
|
|
522732
523086
|
$2[3] = t0;
|
|
522733
523087
|
} else {
|
|
522734
|
-
|
|
523088
|
+
command10 = $2[1];
|
|
522735
523089
|
description = $2[2];
|
|
522736
523090
|
t0 = $2[3];
|
|
522737
523091
|
}
|
|
@@ -522762,7 +523116,7 @@ function BashPermissionRequest(props) {
|
|
|
522762
523116
|
return t12;
|
|
522763
523117
|
}
|
|
522764
523118
|
let t1;
|
|
522765
|
-
if ($2[12] !==
|
|
523119
|
+
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
523120
|
t1 = /* @__PURE__ */ jsx_runtime385.jsx(BashPermissionRequestInner, {
|
|
522767
523121
|
toolUseConfirm,
|
|
522768
523122
|
toolUseContext,
|
|
@@ -522770,10 +523124,10 @@ function BashPermissionRequest(props) {
|
|
|
522770
523124
|
onReject,
|
|
522771
523125
|
verbose,
|
|
522772
523126
|
workerBadge,
|
|
522773
|
-
command:
|
|
523127
|
+
command: command10,
|
|
522774
523128
|
description
|
|
522775
523129
|
});
|
|
522776
|
-
$2[12] =
|
|
523130
|
+
$2[12] = command10;
|
|
522777
523131
|
$2[13] = description;
|
|
522778
523132
|
$2[14] = onDone;
|
|
522779
523133
|
$2[15] = onReject;
|
|
@@ -522794,7 +523148,7 @@ function BashPermissionRequestInner({
|
|
|
522794
523148
|
onReject,
|
|
522795
523149
|
verbose: _verbose,
|
|
522796
523150
|
workerBadge,
|
|
522797
|
-
command:
|
|
523151
|
+
command: command10,
|
|
522798
523152
|
description
|
|
522799
523153
|
}) {
|
|
522800
523154
|
const [theme2] = useTheme();
|
|
@@ -522831,27 +523185,27 @@ function BashPermissionRequestInner({
|
|
|
522831
523185
|
if (!isClassifierPermissionsEnabled())
|
|
522832
523186
|
return;
|
|
522833
523187
|
const abortController = new AbortController;
|
|
522834
|
-
generateGenericDescription(
|
|
523188
|
+
generateGenericDescription(command10, description, abortController.signal).then((generic) => {
|
|
522835
523189
|
if (generic && !abortController.signal.aborted) {
|
|
522836
523190
|
setClassifierDescription(generic);
|
|
522837
523191
|
setInitialClassifierDescriptionEmpty(false);
|
|
522838
523192
|
}
|
|
522839
523193
|
}).catch(() => {});
|
|
522840
523194
|
return () => abortController.abort();
|
|
522841
|
-
}, [
|
|
523195
|
+
}, [command10, description]);
|
|
522842
523196
|
const isCompound = toolUseConfirm.permissionResult.decisionReason?.type === "subcommandResults";
|
|
522843
523197
|
const [editablePrefix, setEditablePrefix] = import_react214.useState(() => {
|
|
522844
523198
|
if (isCompound) {
|
|
522845
523199
|
const backendBashRules = extractRules("suggestions" in toolUseConfirm.permissionResult ? toolUseConfirm.permissionResult.suggestions : undefined).filter((r) => r.toolName === BashTool.name && r.ruleContent);
|
|
522846
523200
|
return backendBashRules.length === 1 ? backendBashRules[0].ruleContent : undefined;
|
|
522847
523201
|
}
|
|
522848
|
-
const two = getSimpleCommandPrefix(
|
|
523202
|
+
const two = getSimpleCommandPrefix(command10);
|
|
522849
523203
|
if (two)
|
|
522850
523204
|
return `${two}:*`;
|
|
522851
|
-
const one = getFirstWordPrefix(
|
|
523205
|
+
const one = getFirstWordPrefix(command10);
|
|
522852
523206
|
if (one)
|
|
522853
523207
|
return `${one}:*`;
|
|
522854
|
-
return
|
|
523208
|
+
return command10;
|
|
522855
523209
|
});
|
|
522856
523210
|
const hasUserEditedPrefix = import_react214.useRef(false);
|
|
522857
523211
|
const onEditablePrefixChange = import_react214.useCallback((value) => {
|
|
@@ -522862,7 +523216,7 @@ function BashPermissionRequestInner({
|
|
|
522862
523216
|
if (isCompound)
|
|
522863
523217
|
return;
|
|
522864
523218
|
let cancelled = false;
|
|
522865
|
-
getCompoundCommandPrefixesStatic(
|
|
523219
|
+
getCompoundCommandPrefixesStatic(command10, (subcmd) => BashTool.isReadOnly({
|
|
522866
523220
|
command: subcmd
|
|
522867
523221
|
})).then((prefixes) => {
|
|
522868
523222
|
if (cancelled || hasUserEditedPrefix.current)
|
|
@@ -522874,14 +523228,14 @@ function BashPermissionRequestInner({
|
|
|
522874
523228
|
return () => {
|
|
522875
523229
|
cancelled = true;
|
|
522876
523230
|
};
|
|
522877
|
-
}, [
|
|
523231
|
+
}, [command10, isCompound]);
|
|
522878
523232
|
const [classifierWasChecking] = import_react214.useState(false);
|
|
522879
523233
|
const {
|
|
522880
523234
|
destructiveWarning: destructiveWarning_0,
|
|
522881
523235
|
sandboxingEnabled: sandboxingEnabled_0,
|
|
522882
523236
|
isSandboxed: isSandboxed_0
|
|
522883
523237
|
} = import_react214.useMemo(() => {
|
|
522884
|
-
const destructiveWarning = getFeatureValue_CACHED_MAY_BE_STALE("tengu_destructive_command_warning", false) ? getDestructiveCommandWarning(
|
|
523238
|
+
const destructiveWarning = getFeatureValue_CACHED_MAY_BE_STALE("tengu_destructive_command_warning", false) ? getDestructiveCommandWarning(command10) : null;
|
|
522885
523239
|
const sandboxingEnabled = SandboxManager2.isSandboxingEnabled();
|
|
522886
523240
|
const isSandboxed = sandboxingEnabled && shouldUseSandbox(toolUseConfirm.input);
|
|
522887
523241
|
return {
|
|
@@ -522889,7 +523243,7 @@ function BashPermissionRequestInner({
|
|
|
522889
523243
|
sandboxingEnabled,
|
|
522890
523244
|
isSandboxed
|
|
522891
523245
|
};
|
|
522892
|
-
}, [
|
|
523246
|
+
}, [command10, toolUseConfirm.input]);
|
|
522893
523247
|
const unaryEvent = import_react214.useMemo(() => ({
|
|
522894
523248
|
completion_type: "tool_use_single",
|
|
522895
523249
|
language_name: "none"
|
|
@@ -523007,7 +523361,7 @@ function BashPermissionRequestInner({
|
|
|
523007
523361
|
/* @__PURE__ */ jsx_runtime385.jsx(ThemedText, {
|
|
523008
523362
|
dimColor: explainerState.visible,
|
|
523009
523363
|
children: BashTool.renderToolUseMessage({
|
|
523010
|
-
command:
|
|
523364
|
+
command: command10,
|
|
523011
523365
|
description
|
|
523012
523366
|
}, {
|
|
523013
523367
|
theme: theme2,
|
|
@@ -525979,9 +526333,9 @@ var init_NotebookEditPermissionRequest = __esm(() => {
|
|
|
525979
526333
|
});
|
|
525980
526334
|
|
|
525981
526335
|
// src/tools/PowerShellTool/destructiveCommandWarning.ts
|
|
525982
|
-
function getDestructiveCommandWarning2(
|
|
526336
|
+
function getDestructiveCommandWarning2(command10) {
|
|
525983
526337
|
for (const { pattern, warning } of DESTRUCTIVE_PATTERNS2) {
|
|
525984
|
-
if (pattern.test(
|
|
526338
|
+
if (pattern.test(command10)) {
|
|
525985
526339
|
return warning;
|
|
525986
526340
|
}
|
|
525987
526341
|
}
|
|
@@ -526110,8 +526464,8 @@ async function extractPrefixFromElement(cmd) {
|
|
|
526110
526464
|
}
|
|
526111
526465
|
return prefix;
|
|
526112
526466
|
}
|
|
526113
|
-
async function getCompoundCommandPrefixesStatic2(
|
|
526114
|
-
const parsed = await parsePowerShellCommandCached(
|
|
526467
|
+
async function getCompoundCommandPrefixesStatic2(command10, excludeSubcommand) {
|
|
526468
|
+
const parsed = await parsePowerShellCommandCached(command10);
|
|
526115
526469
|
if (!parsed.valid) {
|
|
526116
526470
|
return [];
|
|
526117
526471
|
}
|
|
@@ -526268,7 +526622,7 @@ function PowerShellPermissionRequest(props) {
|
|
|
526268
526622
|
workerBadge
|
|
526269
526623
|
} = props;
|
|
526270
526624
|
const {
|
|
526271
|
-
command:
|
|
526625
|
+
command: command10,
|
|
526272
526626
|
description
|
|
526273
526627
|
} = PowerShellTool.inputSchema.parse(toolUseConfirm.input);
|
|
526274
526628
|
const [theme2] = useTheme();
|
|
@@ -526297,14 +526651,14 @@ function PowerShellPermissionRequest(props) {
|
|
|
526297
526651
|
onReject,
|
|
526298
526652
|
explainerVisible: explainerState.visible
|
|
526299
526653
|
});
|
|
526300
|
-
const destructiveWarning = getFeatureValue_CACHED_MAY_BE_STALE("tengu_destructive_command_warning", false) ? getDestructiveCommandWarning2(
|
|
526654
|
+
const destructiveWarning = getFeatureValue_CACHED_MAY_BE_STALE("tengu_destructive_command_warning", false) ? getDestructiveCommandWarning2(command10) : null;
|
|
526301
526655
|
const [showPermissionDebug, setShowPermissionDebug] = import_react218.useState(false);
|
|
526302
|
-
const [editablePrefix, setEditablePrefix] = import_react218.useState(
|
|
526303
|
-
`) ? undefined :
|
|
526656
|
+
const [editablePrefix, setEditablePrefix] = import_react218.useState(command10.includes(`
|
|
526657
|
+
`) ? undefined : command10);
|
|
526304
526658
|
const hasUserEditedPrefix = import_react218.useRef(false);
|
|
526305
526659
|
import_react218.useEffect(() => {
|
|
526306
526660
|
let cancelled = false;
|
|
526307
|
-
getCompoundCommandPrefixesStatic2(
|
|
526661
|
+
getCompoundCommandPrefixesStatic2(command10, (element) => isAllowlistedCommand(element, element.text)).then((prefixes) => {
|
|
526308
526662
|
if (cancelled || hasUserEditedPrefix.current)
|
|
526309
526663
|
return;
|
|
526310
526664
|
if (prefixes.length > 0) {
|
|
@@ -526314,7 +526668,7 @@ function PowerShellPermissionRequest(props) {
|
|
|
526314
526668
|
return () => {
|
|
526315
526669
|
cancelled = true;
|
|
526316
526670
|
};
|
|
526317
|
-
}, [
|
|
526671
|
+
}, [command10]);
|
|
526318
526672
|
const onEditablePrefixChange = import_react218.useCallback((value) => {
|
|
526319
526673
|
hasUserEditedPrefix.current = true;
|
|
526320
526674
|
setEditablePrefix(value);
|
|
@@ -526419,7 +526773,7 @@ function PowerShellPermissionRequest(props) {
|
|
|
526419
526773
|
/* @__PURE__ */ jsx_runtime396.jsx(ThemedText, {
|
|
526420
526774
|
dimColor: explainerState.visible,
|
|
526421
526775
|
children: PowerShellTool.renderToolUseMessage({
|
|
526422
|
-
command:
|
|
526776
|
+
command: command10,
|
|
526423
526777
|
description
|
|
526424
526778
|
}, {
|
|
526425
526779
|
theme: theme2,
|
|
@@ -527267,7 +527621,7 @@ function MonitorPermissionRequest({
|
|
|
527267
527621
|
onReject,
|
|
527268
527622
|
workerBadge
|
|
527269
527623
|
}) {
|
|
527270
|
-
const { command:
|
|
527624
|
+
const { command: command10, description } = toolUseConfirm.input;
|
|
527271
527625
|
usePermissionRequestLogging(toolUseConfirm, {
|
|
527272
527626
|
completion_type: "tool_use_single",
|
|
527273
527627
|
language_name: "none"
|
|
@@ -527298,7 +527652,7 @@ function MonitorPermissionRequest({
|
|
|
527298
527652
|
platform: env2.platform
|
|
527299
527653
|
}
|
|
527300
527654
|
});
|
|
527301
|
-
const cmdForRule =
|
|
527655
|
+
const cmdForRule = command10?.trim() || "";
|
|
527302
527656
|
const prefix = cmdForRule.split(/\s+/).slice(0, 2).join(" ");
|
|
527303
527657
|
toolUseConfirm.onAllow(toolUseConfirm.input, prefix ? [
|
|
527304
527658
|
{
|
|
@@ -527393,7 +527747,7 @@ function MonitorPermissionRequest({
|
|
|
527393
527747
|
/* @__PURE__ */ jsx_runtime399.jsxs(ThemedText, {
|
|
527394
527748
|
children: [
|
|
527395
527749
|
"Monitor(",
|
|
527396
|
-
|
|
527750
|
+
command10 ?? "",
|
|
527397
527751
|
")"
|
|
527398
527752
|
]
|
|
527399
527753
|
}),
|
|
@@ -530380,7 +530734,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
530380
530734
|
function getSemverPart(version3) {
|
|
530381
530735
|
return `${import_semver12.major(version3, { loose: true })}.${import_semver12.minor(version3, { loose: true })}.${import_semver12.patch(version3, { loose: true })}`;
|
|
530382
530736
|
}
|
|
530383
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.0.
|
|
530737
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.0.5") {
|
|
530384
530738
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react226.useState(() => getSemverPart(initialVersion));
|
|
530385
530739
|
if (!updatedVersion) {
|
|
530386
530740
|
return null;
|
|
@@ -530423,7 +530777,7 @@ function AutoUpdater({
|
|
|
530423
530777
|
return;
|
|
530424
530778
|
}
|
|
530425
530779
|
if (false) {}
|
|
530426
|
-
const currentVersion = "1.0.
|
|
530780
|
+
const currentVersion = "1.0.5";
|
|
530427
530781
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
530428
530782
|
let latestVersion = await getLatestVersion(channel2);
|
|
530429
530783
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -530644,12 +530998,12 @@ function NativeAutoUpdater({
|
|
|
530644
530998
|
logEvent("tengu_native_auto_updater_start", {});
|
|
530645
530999
|
try {
|
|
530646
531000
|
const maxVersion = await getMaxVersion();
|
|
530647
|
-
if (maxVersion && gt("1.0.
|
|
531001
|
+
if (maxVersion && gt("1.0.5", maxVersion)) {
|
|
530648
531002
|
const msg = await getMaxVersionMessage();
|
|
530649
531003
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
530650
531004
|
}
|
|
530651
531005
|
const result = await installLatest(channel2);
|
|
530652
|
-
const currentVersion = "1.0.
|
|
531006
|
+
const currentVersion = "1.0.5";
|
|
530653
531007
|
const latencyMs = Date.now() - startTime2;
|
|
530654
531008
|
if (result.lockFailed) {
|
|
530655
531009
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -530791,17 +531145,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
530791
531145
|
const maxVersion = await getMaxVersion();
|
|
530792
531146
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
530793
531147
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
530794
|
-
if (gte("1.0.
|
|
530795
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.0.
|
|
531148
|
+
if (gte("1.0.5", maxVersion)) {
|
|
531149
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.0.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
530796
531150
|
setUpdateAvailable(false);
|
|
530797
531151
|
return;
|
|
530798
531152
|
}
|
|
530799
531153
|
latest = maxVersion;
|
|
530800
531154
|
}
|
|
530801
|
-
const hasUpdate = latest && !gte("1.0.
|
|
531155
|
+
const hasUpdate = latest && !gte("1.0.5", latest) && !shouldSkipVersion(latest);
|
|
530802
531156
|
setUpdateAvailable(!!hasUpdate);
|
|
530803
531157
|
if (hasUpdate) {
|
|
530804
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.0.
|
|
531158
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.0.5"} -> ${latest}`);
|
|
530805
531159
|
}
|
|
530806
531160
|
};
|
|
530807
531161
|
$2[0] = t1;
|
|
@@ -530835,7 +531189,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
530835
531189
|
wrap: "truncate",
|
|
530836
531190
|
children: [
|
|
530837
531191
|
"currentVersion: ",
|
|
530838
|
-
"1.0.
|
|
531192
|
+
"1.0.5"
|
|
530839
531193
|
]
|
|
530840
531194
|
});
|
|
530841
531195
|
$2[3] = verbose;
|
|
@@ -532356,15 +532710,15 @@ function getZshCompletionCommand(prefix, completionType) {
|
|
|
532356
532710
|
}
|
|
532357
532711
|
}
|
|
532358
532712
|
async function getCompletionsForShell(shellType, prefix, completionType, abortSignal) {
|
|
532359
|
-
let
|
|
532713
|
+
let command10;
|
|
532360
532714
|
if (shellType === "bash") {
|
|
532361
|
-
|
|
532715
|
+
command10 = getBashCompletionCommand(prefix, completionType);
|
|
532362
532716
|
} else if (shellType === "zsh") {
|
|
532363
|
-
|
|
532717
|
+
command10 = getZshCompletionCommand(prefix, completionType);
|
|
532364
532718
|
} else {
|
|
532365
532719
|
return [];
|
|
532366
532720
|
}
|
|
532367
|
-
const shellCommand = await exec3(
|
|
532721
|
+
const shellCommand = await exec3(command10, abortSignal, "bash", {
|
|
532368
532722
|
timeout: SHELL_COMPLETION_TIMEOUT_MS
|
|
532369
532723
|
});
|
|
532370
532724
|
const result = await shellCommand.result;
|
|
@@ -533789,8 +534143,8 @@ function hasCommandArgs(input) {
|
|
|
533789
534143
|
return false;
|
|
533790
534144
|
return true;
|
|
533791
534145
|
}
|
|
533792
|
-
function formatCommand(
|
|
533793
|
-
return `/${
|
|
534146
|
+
function formatCommand(command10) {
|
|
534147
|
+
return `/${command10} `;
|
|
533794
534148
|
}
|
|
533795
534149
|
function getCommandId2(cmd) {
|
|
533796
534150
|
const commandName = getCommandName(cmd);
|
|
@@ -534015,10 +534369,10 @@ async function getShellHistoryCommands() {
|
|
|
534015
534369
|
try {
|
|
534016
534370
|
for await (const entry of getHistory()) {
|
|
534017
534371
|
if (entry.display && entry.display.startsWith("!")) {
|
|
534018
|
-
const
|
|
534019
|
-
if (
|
|
534020
|
-
seen.add(
|
|
534021
|
-
commands.push(
|
|
534372
|
+
const command10 = entry.display.slice(1).trim();
|
|
534373
|
+
if (command10 && !seen.has(command10)) {
|
|
534374
|
+
seen.add(command10);
|
|
534375
|
+
commands.push(command10);
|
|
534022
534376
|
}
|
|
534023
534377
|
}
|
|
534024
534378
|
if (commands.length >= 50) {
|
|
@@ -534032,15 +534386,15 @@ async function getShellHistoryCommands() {
|
|
|
534032
534386
|
shellHistoryCacheTimestamp = now2;
|
|
534033
534387
|
return commands;
|
|
534034
534388
|
}
|
|
534035
|
-
function prependToShellHistoryCache(
|
|
534389
|
+
function prependToShellHistoryCache(command10) {
|
|
534036
534390
|
if (!shellHistoryCache) {
|
|
534037
534391
|
return;
|
|
534038
534392
|
}
|
|
534039
|
-
const idx = shellHistoryCache.indexOf(
|
|
534393
|
+
const idx = shellHistoryCache.indexOf(command10);
|
|
534040
534394
|
if (idx !== -1) {
|
|
534041
534395
|
shellHistoryCache.splice(idx, 1);
|
|
534042
534396
|
}
|
|
534043
|
-
shellHistoryCache.unshift(
|
|
534397
|
+
shellHistoryCache.unshift(command10);
|
|
534044
534398
|
}
|
|
534045
534399
|
async function getShellHistoryCompletion(input) {
|
|
534046
534400
|
if (!input || input.length < 2) {
|
|
@@ -534051,11 +534405,11 @@ async function getShellHistoryCompletion(input) {
|
|
|
534051
534405
|
return null;
|
|
534052
534406
|
}
|
|
534053
534407
|
const commands = await getShellHistoryCommands();
|
|
534054
|
-
for (const
|
|
534055
|
-
if (
|
|
534408
|
+
for (const command10 of commands) {
|
|
534409
|
+
if (command10.startsWith(input) && command10 !== input) {
|
|
534056
534410
|
return {
|
|
534057
|
-
fullCommand:
|
|
534058
|
-
suffix:
|
|
534411
|
+
fullCommand: command10,
|
|
534412
|
+
suffix: command10.slice(input.length)
|
|
534059
534413
|
};
|
|
534060
534414
|
}
|
|
534061
534415
|
}
|
|
@@ -539891,7 +540245,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
539891
540245
|
project_dir: getOriginalCwd(),
|
|
539892
540246
|
added_dirs: addedDirs
|
|
539893
540247
|
},
|
|
539894
|
-
version: "1.0.
|
|
540248
|
+
version: "1.0.5",
|
|
539895
540249
|
output_style: {
|
|
539896
540250
|
name: outputStyleName
|
|
539897
540251
|
},
|
|
@@ -555695,12 +556049,12 @@ var init_useLspInitializationNotification = __esm(() => {
|
|
|
555695
556049
|
});
|
|
555696
556050
|
|
|
555697
556051
|
// src/utils/binaryCheck.ts
|
|
555698
|
-
async function isBinaryInstalled(
|
|
555699
|
-
if (!
|
|
556052
|
+
async function isBinaryInstalled(command10) {
|
|
556053
|
+
if (!command10 || !command10.trim()) {
|
|
555700
556054
|
logForDebugging("[binaryCheck] Empty command provided, returning false");
|
|
555701
556055
|
return false;
|
|
555702
556056
|
}
|
|
555703
|
-
const trimmedCommand =
|
|
556057
|
+
const trimmedCommand = command10.trim();
|
|
555704
556058
|
const cached3 = binaryCache.get(trimmedCommand);
|
|
555705
556059
|
if (cached3 !== undefined) {
|
|
555706
556060
|
logForDebugging(`[binaryCheck] Cache hit for '${trimmedCommand}': ${cached3}`);
|
|
@@ -555753,13 +556107,13 @@ function isRecord4(value) {
|
|
|
555753
556107
|
}
|
|
555754
556108
|
function extractFromServerConfigRecord(serverConfigs) {
|
|
555755
556109
|
const extensions = new Set;
|
|
555756
|
-
let
|
|
556110
|
+
let command10 = null;
|
|
555757
556111
|
for (const [_serverName, config3] of Object.entries(serverConfigs)) {
|
|
555758
556112
|
if (!isRecord4(config3)) {
|
|
555759
556113
|
continue;
|
|
555760
556114
|
}
|
|
555761
|
-
if (!
|
|
555762
|
-
|
|
556115
|
+
if (!command10 && typeof config3.command === "string") {
|
|
556116
|
+
command10 = config3.command;
|
|
555763
556117
|
}
|
|
555764
556118
|
const extMapping = config3.extensionToLanguage;
|
|
555765
556119
|
if (isRecord4(extMapping)) {
|
|
@@ -555768,10 +556122,10 @@ function extractFromServerConfigRecord(serverConfigs) {
|
|
|
555768
556122
|
}
|
|
555769
556123
|
}
|
|
555770
556124
|
}
|
|
555771
|
-
if (!
|
|
556125
|
+
if (!command10 || extensions.size === 0) {
|
|
555772
556126
|
return null;
|
|
555773
556127
|
}
|
|
555774
|
-
return { extensions, command:
|
|
556128
|
+
return { extensions, command: command10 };
|
|
555775
556129
|
}
|
|
555776
556130
|
async function getLspPluginsFromMarketplaces() {
|
|
555777
556131
|
const result = new Map;
|
|
@@ -558128,8 +558482,8 @@ function isSessionContainerCompatible(messages) {
|
|
|
558128
558482
|
}
|
|
558129
558483
|
if (toolName === BASH_TOOL_NAME) {
|
|
558130
558484
|
const input = block2.input;
|
|
558131
|
-
const
|
|
558132
|
-
if (EXTERNAL_COMMAND_PATTERNS.some((p) => p.test(
|
|
558485
|
+
const command10 = input?.command || "";
|
|
558486
|
+
if (EXTERNAL_COMMAND_PATTERNS.some((p) => p.test(command10))) {
|
|
558133
558487
|
return false;
|
|
558134
558488
|
}
|
|
558135
558489
|
}
|
|
@@ -561639,22 +561993,22 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
561639
561993
|
helpers.clearBuffer();
|
|
561640
561994
|
}, [setAppState, setInputValue, getToolUseContext, canUseTool, mainLoopModel, addNotification]);
|
|
561641
561995
|
const handleAutoRunIssue = import_react318.useCallback(() => {
|
|
561642
|
-
const
|
|
561996
|
+
const command10 = autoRunIssueReason ? getAutoRunCommand(autoRunIssueReason) : "/issue";
|
|
561643
561997
|
setAutoRunIssueReason(null);
|
|
561644
|
-
onSubmit(
|
|
561998
|
+
onSubmit(command10, {
|
|
561645
561999
|
setCursorOffset: () => {},
|
|
561646
562000
|
clearBuffer: () => {},
|
|
561647
562001
|
resetHistory: () => {}
|
|
561648
562002
|
}).catch((err2) => {
|
|
561649
|
-
logForDebugging(`Auto-run ${
|
|
562003
|
+
logForDebugging(`Auto-run ${command10} failed: ${errorMessage(err2)}`);
|
|
561650
562004
|
});
|
|
561651
562005
|
}, [onSubmit, autoRunIssueReason]);
|
|
561652
562006
|
const handleCancelAutoRunIssue = import_react318.useCallback(() => {
|
|
561653
562007
|
setAutoRunIssueReason(null);
|
|
561654
562008
|
}, []);
|
|
561655
562009
|
const handleSurveyRequestFeedback = import_react318.useCallback(() => {
|
|
561656
|
-
const
|
|
561657
|
-
onSubmit(
|
|
562010
|
+
const command10 = "/feedback";
|
|
562011
|
+
onSubmit(command10, {
|
|
561658
562012
|
setCursorOffset: () => {},
|
|
561659
562013
|
clearBuffer: () => {},
|
|
561660
562014
|
resetHistory: () => {}
|
|
@@ -564394,7 +564748,7 @@ function WelcomeV2() {
|
|
|
564394
564748
|
dimColor: true,
|
|
564395
564749
|
children: [
|
|
564396
564750
|
"v",
|
|
564397
|
-
"1.0.
|
|
564751
|
+
"1.0.5",
|
|
564398
564752
|
" "
|
|
564399
564753
|
]
|
|
564400
564754
|
})
|
|
@@ -564628,7 +564982,7 @@ function WelcomeV2() {
|
|
|
564628
564982
|
dimColor: true,
|
|
564629
564983
|
children: [
|
|
564630
564984
|
"v",
|
|
564631
|
-
"1.0.
|
|
564985
|
+
"1.0.5",
|
|
564632
564986
|
" "
|
|
564633
564987
|
]
|
|
564634
564988
|
})
|
|
@@ -564875,7 +565229,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
564875
565229
|
dimColor: true,
|
|
564876
565230
|
children: [
|
|
564877
565231
|
"v",
|
|
564878
|
-
"1.0.
|
|
565232
|
+
"1.0.5",
|
|
564879
565233
|
" "
|
|
564880
565234
|
]
|
|
564881
565235
|
});
|
|
@@ -565148,7 +565502,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
565148
565502
|
dimColor: true,
|
|
565149
565503
|
children: [
|
|
565150
565504
|
"v",
|
|
565151
|
-
"1.0.
|
|
565505
|
+
"1.0.5",
|
|
565152
565506
|
" "
|
|
565153
565507
|
]
|
|
565154
565508
|
});
|
|
@@ -566326,8 +566680,8 @@ function _temp444(command_0) {
|
|
|
566326
566680
|
function _temp359(tool_0) {
|
|
566327
566681
|
return tool_0 === BASH_TOOL_NAME || tool_0.startsWith(BASH_TOOL_NAME + "(");
|
|
566328
566682
|
}
|
|
566329
|
-
function _temp295(
|
|
566330
|
-
return
|
|
566683
|
+
function _temp295(command10) {
|
|
566684
|
+
return command10.type === "prompt" && command10.loadedFrom === "commands_DEPRECATED" && (command10.source === "projectSettings" || command10.source === "localSettings") && command10.allowedTools?.some(_temp296);
|
|
566331
566685
|
}
|
|
566332
566686
|
function _temp296(tool) {
|
|
566333
566687
|
return tool === BASH_TOOL_NAME || tool.startsWith(BASH_TOOL_NAME + "(");
|
|
@@ -566660,7 +567014,7 @@ function completeOnboarding() {
|
|
|
566660
567014
|
saveGlobalConfig((current) => ({
|
|
566661
567015
|
...current,
|
|
566662
567016
|
hasCompletedOnboarding: true,
|
|
566663
|
-
lastOnboardingVersion: "1.0.
|
|
567017
|
+
lastOnboardingVersion: "1.0.5"
|
|
566664
567018
|
}));
|
|
566665
567019
|
}
|
|
566666
567020
|
function showDialog(root2, renderer) {
|
|
@@ -568186,7 +568540,7 @@ function _temp302() {
|
|
|
568186
568540
|
function CrossProjectMessage(t0) {
|
|
568187
568541
|
const $2 = import_react_compiler_runtime368.c(8);
|
|
568188
568542
|
const {
|
|
568189
|
-
command:
|
|
568543
|
+
command: command10
|
|
568190
568544
|
} = t0;
|
|
568191
568545
|
let t1 = [];
|
|
568192
568546
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -568215,7 +568569,7 @@ function CrossProjectMessage(t0) {
|
|
|
568215
568569
|
t3 = $2[2];
|
|
568216
568570
|
}
|
|
568217
568571
|
let t4;
|
|
568218
|
-
if ($2[3] !==
|
|
568572
|
+
if ($2[3] !== command10) {
|
|
568219
568573
|
t4 = /* @__PURE__ */ jsx_runtime488.jsxs(ThemedBox_default, {
|
|
568220
568574
|
flexDirection: "column",
|
|
568221
568575
|
children: [
|
|
@@ -568223,12 +568577,12 @@ function CrossProjectMessage(t0) {
|
|
|
568223
568577
|
/* @__PURE__ */ jsx_runtime488.jsxs(ThemedText, {
|
|
568224
568578
|
children: [
|
|
568225
568579
|
" ",
|
|
568226
|
-
|
|
568580
|
+
command10
|
|
568227
568581
|
]
|
|
568228
568582
|
})
|
|
568229
568583
|
]
|
|
568230
568584
|
});
|
|
568231
|
-
$2[3] =
|
|
568585
|
+
$2[3] = command10;
|
|
568232
568586
|
$2[4] = t4;
|
|
568233
568587
|
} else {
|
|
568234
568588
|
t4 = $2[4];
|
|
@@ -568356,9 +568710,9 @@ var init_dialogLaunchers = __esm(() => {
|
|
|
568356
568710
|
function initBuiltinPlugins() {}
|
|
568357
568711
|
|
|
568358
568712
|
// src/services/plugins/pluginCliCommands.ts
|
|
568359
|
-
function handlePluginCommandError(error42,
|
|
568713
|
+
function handlePluginCommandError(error42, command10, plugin2) {
|
|
568360
568714
|
logError2(error42);
|
|
568361
|
-
const operation = plugin2 ? `${
|
|
568715
|
+
const operation = plugin2 ? `${command10} plugin "${plugin2}"` : command10 === "disable-all" ? "disable all plugins" : `${command10} plugins`;
|
|
568362
568716
|
console.error(`${figures_default.cross} Failed to ${operation}: ${errorMessage(error42)}`);
|
|
568363
568717
|
const telemetryFields = plugin2 ? (() => {
|
|
568364
568718
|
const { name, marketplace } = parsePluginIdentifier(plugin2);
|
|
@@ -568371,7 +568725,7 @@ function handlePluginCommandError(error42, command9, plugin2) {
|
|
|
568371
568725
|
};
|
|
568372
568726
|
})() : {};
|
|
568373
568727
|
logEvent("tengu_plugin_command_failed", {
|
|
568374
|
-
command:
|
|
568728
|
+
command: command10,
|
|
568375
568729
|
error_category: classifyPluginCommandError(error42),
|
|
568376
568730
|
...telemetryFields
|
|
568377
568731
|
});
|
|
@@ -570911,7 +571265,7 @@ function appendToLog(path24, message) {
|
|
|
570911
571265
|
cwd: getFsImplementation().cwd(),
|
|
570912
571266
|
userType: process.env.USER_TYPE,
|
|
570913
571267
|
sessionId: getSessionId(),
|
|
570914
|
-
version: "1.0.
|
|
571268
|
+
version: "1.0.5"
|
|
570915
571269
|
};
|
|
570916
571270
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
570917
571271
|
}
|
|
@@ -571517,7 +571871,7 @@ async function startMCPServer(cwd2, debug, verbose) {
|
|
|
571517
571871
|
setCwd(cwd2);
|
|
571518
571872
|
const server = new Server({
|
|
571519
571873
|
name: "claude/tengu",
|
|
571520
|
-
version: "1.0.
|
|
571874
|
+
version: "1.0.5"
|
|
571521
571875
|
}, {
|
|
571522
571876
|
capabilities: {
|
|
571523
571877
|
tools: {}
|
|
@@ -576156,8 +576510,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
576156
576510
|
}
|
|
576157
576511
|
async function checkEnvLessBridgeMinVersion() {
|
|
576158
576512
|
const cfg = await getEnvLessBridgeConfig();
|
|
576159
|
-
if (cfg.min_version && lt("1.0.
|
|
576160
|
-
return `Your version of ZeroCLI (${"1.0.
|
|
576513
|
+
if (cfg.min_version && lt("1.0.5", cfg.min_version)) {
|
|
576514
|
+
return `Your version of ZeroCLI (${"1.0.5"}) is too old for Remote Control.
|
|
576161
576515
|
Version ${cfg.min_version} or higher is required. Run \`zero update\` to update.`;
|
|
576162
576516
|
}
|
|
576163
576517
|
return null;
|
|
@@ -576632,7 +576986,7 @@ async function initBridgeCore(params) {
|
|
|
576632
576986
|
const rawApi = createBridgeApiClient({
|
|
576633
576987
|
baseUrl,
|
|
576634
576988
|
getAccessToken,
|
|
576635
|
-
runnerVersion: "1.0.
|
|
576989
|
+
runnerVersion: "1.0.5",
|
|
576636
576990
|
onDebug: logForDebugging,
|
|
576637
576991
|
onAuth401,
|
|
576638
576992
|
getTrustedDeviceToken
|
|
@@ -579253,30 +579607,30 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
579253
579607
|
}
|
|
579254
579608
|
const isMainThread = (cmd) => cmd.agentId === undefined;
|
|
579255
579609
|
try {
|
|
579256
|
-
let
|
|
579610
|
+
let command10;
|
|
579257
579611
|
let waitingForAgents = false;
|
|
579258
579612
|
const drainCommandQueue = async () => {
|
|
579259
|
-
while (
|
|
579260
|
-
if (
|
|
579613
|
+
while (command10 = dequeue(isMainThread)) {
|
|
579614
|
+
if (command10.mode !== "prompt" && command10.mode !== "orphaned-permission" && command10.mode !== "task-notification") {
|
|
579261
579615
|
throw new Error("only prompt commands are supported in streaming mode");
|
|
579262
579616
|
}
|
|
579263
|
-
const batch = [
|
|
579264
|
-
if (
|
|
579265
|
-
while (canBatchWith(
|
|
579617
|
+
const batch = [command10];
|
|
579618
|
+
if (command10.mode === "prompt") {
|
|
579619
|
+
while (canBatchWith(command10, peek2(isMainThread))) {
|
|
579266
579620
|
batch.push(dequeue(isMainThread));
|
|
579267
579621
|
}
|
|
579268
579622
|
if (batch.length > 1) {
|
|
579269
|
-
|
|
579270
|
-
...
|
|
579623
|
+
command10 = {
|
|
579624
|
+
...command10,
|
|
579271
579625
|
value: joinPromptValues(batch.map((c6) => c6.value)),
|
|
579272
|
-
uuid: batch.findLast((c6) => c6.uuid)?.uuid ??
|
|
579626
|
+
uuid: batch.findLast((c6) => c6.uuid)?.uuid ?? command10.uuid
|
|
579273
579627
|
};
|
|
579274
579628
|
}
|
|
579275
579629
|
}
|
|
579276
579630
|
const batchUuids = batch.map((c6) => c6.uuid).filter((u2) => u2 !== undefined);
|
|
579277
579631
|
if (options2.replayUserMessages && batch.length > 1) {
|
|
579278
579632
|
for (const c6 of batch) {
|
|
579279
|
-
if (c6.uuid && c6.uuid !==
|
|
579633
|
+
if (c6.uuid && c6.uuid !== command10.uuid) {
|
|
579280
579634
|
output.enqueue({
|
|
579281
579635
|
type: "user",
|
|
579282
579636
|
message: { role: "user", content: c6.value },
|
|
@@ -579302,8 +579656,8 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
579302
579656
|
for (const uuid3 of batchUuids) {
|
|
579303
579657
|
notifyCommandLifecycle(uuid3, "started");
|
|
579304
579658
|
}
|
|
579305
|
-
if (
|
|
579306
|
-
const notificationText = typeof
|
|
579659
|
+
if (command10.mode === "task-notification") {
|
|
579660
|
+
const notificationText = typeof command10.value === "string" ? command10.value : "";
|
|
579307
579661
|
const taskIdMatch = notificationText.match(/<task-id>([^<]+)<\/task-id>/);
|
|
579308
579662
|
const toolUseIdMatch = notificationText.match(/<tool-use-id>([^<]+)<\/tool-use-id>/);
|
|
579309
579663
|
const outputFileMatch = notificationText.match(/<output-file>([^<]+)<\/output-file>/);
|
|
@@ -579336,8 +579690,8 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
579336
579690
|
});
|
|
579337
579691
|
}
|
|
579338
579692
|
}
|
|
579339
|
-
const input =
|
|
579340
|
-
if (structuredIO instanceof RemoteIO &&
|
|
579693
|
+
const input = command10.value;
|
|
579694
|
+
if (structuredIO instanceof RemoteIO && command10.mode === "prompt") {
|
|
579341
579695
|
logEvent("tengu_bridge_message_received", {
|
|
579342
579696
|
is_repl: false
|
|
579343
579697
|
});
|
|
@@ -579347,7 +579701,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
579347
579701
|
suggestionState.pendingSuggestion = null;
|
|
579348
579702
|
suggestionState.pendingLastEmittedEntry = null;
|
|
579349
579703
|
if (suggestionState.lastEmitted) {
|
|
579350
|
-
if (
|
|
579704
|
+
if (command10.mode === "prompt") {
|
|
579351
579705
|
const inputText = typeof input === "string" ? input : input.find((b) => b.type === "text")?.text;
|
|
579352
579706
|
if (typeof inputText === "string") {
|
|
579353
579707
|
logSuggestionOutcome(suggestionState.lastEmitted.text, inputText, suggestionState.lastEmitted.emittedAt, suggestionState.lastEmitted.promptId, suggestionState.lastEmitted.generationRequestId);
|
|
@@ -579359,7 +579713,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
579359
579713
|
const turnStartTime = undefined;
|
|
579360
579714
|
headlessProfilerCheckpoint("before_ask");
|
|
579361
579715
|
startQueryProfile();
|
|
579362
|
-
const cmd =
|
|
579716
|
+
const cmd = command10;
|
|
579363
579717
|
await runWithWorkload(cmd.workload ?? options2.workload, async () => {
|
|
579364
579718
|
for await (const message of ask({
|
|
579365
579719
|
commands: uniqBy_default([...currentCommands, ...appState.mcp.commands], "name"),
|
|
@@ -582920,7 +583274,7 @@ __export(exports_update2, {
|
|
|
582920
583274
|
});
|
|
582921
583275
|
async function update2() {
|
|
582922
583276
|
logEvent("tengu_update_check", {});
|
|
582923
|
-
writeToStdout(`Current version: ${"1.0.
|
|
583277
|
+
writeToStdout(`Current version: ${"1.0.5"}
|
|
582924
583278
|
`);
|
|
582925
583279
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
582926
583280
|
writeToStdout(`Checking for updates to ${channel2} version...
|
|
@@ -582995,8 +583349,8 @@ async function update2() {
|
|
|
582995
583349
|
writeToStdout(`Zero is managed by Homebrew.
|
|
582996
583350
|
`);
|
|
582997
583351
|
const latest = await getLatestVersion(channel2);
|
|
582998
|
-
if (latest && !gte("1.0.
|
|
582999
|
-
writeToStdout(`Update available: ${"1.0.
|
|
583352
|
+
if (latest && !gte("1.0.5", latest)) {
|
|
583353
|
+
writeToStdout(`Update available: ${"1.0.5"} → ${latest}
|
|
583000
583354
|
`);
|
|
583001
583355
|
writeToStdout(`
|
|
583002
583356
|
`);
|
|
@@ -583012,8 +583366,8 @@ async function update2() {
|
|
|
583012
583366
|
writeToStdout(`Zero is managed by winget.
|
|
583013
583367
|
`);
|
|
583014
583368
|
const latest = await getLatestVersion(channel2);
|
|
583015
|
-
if (latest && !gte("1.0.
|
|
583016
|
-
writeToStdout(`Update available: ${"1.0.
|
|
583369
|
+
if (latest && !gte("1.0.5", latest)) {
|
|
583370
|
+
writeToStdout(`Update available: ${"1.0.5"} → ${latest}
|
|
583017
583371
|
`);
|
|
583018
583372
|
writeToStdout(`
|
|
583019
583373
|
`);
|
|
@@ -583029,8 +583383,8 @@ async function update2() {
|
|
|
583029
583383
|
writeToStdout(`Zero is managed by apk.
|
|
583030
583384
|
`);
|
|
583031
583385
|
const latest = await getLatestVersion(channel2);
|
|
583032
|
-
if (latest && !gte("1.0.
|
|
583033
|
-
writeToStdout(`Update available: ${"1.0.
|
|
583386
|
+
if (latest && !gte("1.0.5", latest)) {
|
|
583387
|
+
writeToStdout(`Update available: ${"1.0.5"} → ${latest}
|
|
583034
583388
|
`);
|
|
583035
583389
|
writeToStdout(`
|
|
583036
583390
|
`);
|
|
@@ -583095,11 +583449,11 @@ async function update2() {
|
|
|
583095
583449
|
`);
|
|
583096
583450
|
await gracefulShutdown(1);
|
|
583097
583451
|
}
|
|
583098
|
-
if (result.latestVersion === "1.0.
|
|
583099
|
-
writeToStdout(source_default.green(`Zero CLI is up to date (${"1.0.
|
|
583452
|
+
if (result.latestVersion === "1.0.5") {
|
|
583453
|
+
writeToStdout(source_default.green(`Zero CLI is up to date (${"1.0.5"})`) + `
|
|
583100
583454
|
`);
|
|
583101
583455
|
} else {
|
|
583102
|
-
writeToStdout(source_default.green(`Successfully updated from ${"1.0.
|
|
583456
|
+
writeToStdout(source_default.green(`Successfully updated from ${"1.0.5"} to version ${result.latestVersion}`) + `
|
|
583103
583457
|
`);
|
|
583104
583458
|
await regenerateCompletionCache();
|
|
583105
583459
|
}
|
|
@@ -583159,12 +583513,12 @@ async function update2() {
|
|
|
583159
583513
|
`);
|
|
583160
583514
|
await gracefulShutdown(1);
|
|
583161
583515
|
}
|
|
583162
|
-
if (latestVersion === "1.0.
|
|
583163
|
-
writeToStdout(source_default.green(`Zero CLI is up to date (${"1.0.
|
|
583516
|
+
if (latestVersion === "1.0.5") {
|
|
583517
|
+
writeToStdout(source_default.green(`Zero CLI is up to date (${"1.0.5"})`) + `
|
|
583164
583518
|
`);
|
|
583165
583519
|
await gracefulShutdown(0);
|
|
583166
583520
|
}
|
|
583167
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"1.0.
|
|
583521
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"1.0.5"})
|
|
583168
583522
|
`);
|
|
583169
583523
|
writeToStdout(`Installing update...
|
|
583170
583524
|
`);
|
|
@@ -583209,7 +583563,7 @@ async function update2() {
|
|
|
583209
583563
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
583210
583564
|
switch (status2) {
|
|
583211
583565
|
case "success":
|
|
583212
|
-
writeToStdout(source_default.green(`Successfully updated from ${"1.0.
|
|
583566
|
+
writeToStdout(source_default.green(`Successfully updated from ${"1.0.5"} to version ${latestVersion}`) + `
|
|
583213
583567
|
`);
|
|
583214
583568
|
await regenerateCompletionCache();
|
|
583215
583569
|
break;
|
|
@@ -584510,7 +584864,7 @@ ${customInstructions}` : customInstructions;
|
|
|
584510
584864
|
}
|
|
584511
584865
|
}
|
|
584512
584866
|
logForDiagnosticsNoPII("info", "started", {
|
|
584513
|
-
version: "1.0.
|
|
584867
|
+
version: "1.0.5",
|
|
584514
584868
|
is_native_binary: isInBundledMode()
|
|
584515
584869
|
});
|
|
584516
584870
|
registerCleanup(async () => {
|
|
@@ -584594,7 +584948,7 @@ ${customInstructions}` : customInstructions;
|
|
|
584594
584948
|
`);
|
|
584595
584949
|
process.exit(1);
|
|
584596
584950
|
}
|
|
584597
|
-
const commandsHeadless = disableSlashCommands ? [] : commands.filter((
|
|
584951
|
+
const commandsHeadless = disableSlashCommands ? [] : commands.filter((command10) => command10.type === "prompt" && !command10.disableNonInteractive || command10.type === "local" && command10.supportsNonInteractive);
|
|
584598
584952
|
const defaultState = getDefaultAppState();
|
|
584599
584953
|
const headlessInitialState = {
|
|
584600
584954
|
...defaultState,
|
|
@@ -585393,7 +585747,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
585393
585747
|
pendingHookMessages
|
|
585394
585748
|
}, renderAndRun);
|
|
585395
585749
|
}
|
|
585396
|
-
}).version("1.0.
|
|
585750
|
+
}).version("1.0.5", "-v, --version", "Output the version number");
|
|
585397
585751
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
585398
585752
|
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
585753
|
if (canUserConfigureAdvisor()) {
|
|
@@ -586059,7 +586413,7 @@ if (false) {}
|
|
|
586059
586413
|
async function main2() {
|
|
586060
586414
|
const args = process.argv.slice(2);
|
|
586061
586415
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
586062
|
-
console.log(`${"1.0.
|
|
586416
|
+
console.log(`${"1.0.5"} (ZeroCLI)`);
|
|
586063
586417
|
return;
|
|
586064
586418
|
}
|
|
586065
586419
|
if (args.includes("--provider")) {
|
|
@@ -586201,4 +586555,4 @@ async function main2() {
|
|
|
586201
586555
|
}
|
|
586202
586556
|
main2();
|
|
586203
586557
|
|
|
586204
|
-
//# debugId=
|
|
586558
|
+
//# debugId=CADD2DC0575D635264756E2164756E21
|