@duheso/zerocli 0.8.6 → 0.8.7
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/chrome-extension/background.js +98 -2
- package/chrome-extension/manifest.json +2 -1
- package/dist/cli.mjs +101 -83
- package/package.json +1 -1
|
@@ -14,13 +14,35 @@ let networkRequests = new Map(); // tabId -> [requests]
|
|
|
14
14
|
let captureStreams = new Map(); // tabId -> MediaRecorder
|
|
15
15
|
let gifFrames = new Map(); // requestId -> [frames]
|
|
16
16
|
|
|
17
|
-
// ───
|
|
17
|
+
// ─── Debug Stats ──────────────────────────────────────────────────────────────
|
|
18
|
+
|
|
19
|
+
const debugStats = {
|
|
20
|
+
connectAttempts: 0,
|
|
21
|
+
connectSuccesses: 0,
|
|
22
|
+
disconnects: 0,
|
|
23
|
+
toolsDispatched: 0,
|
|
24
|
+
toolErrors: 0,
|
|
25
|
+
lastError: null,
|
|
26
|
+
lastErrorTime: null,
|
|
27
|
+
lastToolCall: null,
|
|
28
|
+
lastToolCallTime: null,
|
|
29
|
+
workerStartTime: Date.now(),
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
function dbg(msg, ...args) {
|
|
33
|
+
const ts = new Date().toISOString();
|
|
34
|
+
console.log(`[ZeroCLI ${ts}] ${msg}`, ...args);
|
|
35
|
+
}
|
|
18
36
|
|
|
19
37
|
function connectNativeHost() {
|
|
38
|
+
debugStats.connectAttempts++;
|
|
39
|
+
dbg(`Connecting to native host (attempt #${debugStats.connectAttempts})...`);
|
|
20
40
|
try {
|
|
21
41
|
nativePort = chrome.runtime.connectNative(NATIVE_HOST_NAME);
|
|
22
42
|
isConnected = true;
|
|
43
|
+
debugStats.connectSuccesses++;
|
|
23
44
|
updateIcon(true);
|
|
45
|
+
dbg('Native host connected successfully.');
|
|
24
46
|
|
|
25
47
|
nativePort.onMessage.addListener((message) => {
|
|
26
48
|
handleNativeMessage(message);
|
|
@@ -29,14 +51,19 @@ function connectNativeHost() {
|
|
|
29
51
|
nativePort.onDisconnect.addListener(() => {
|
|
30
52
|
// Read lastError to mark it as "checked" and suppress DevTools warning
|
|
31
53
|
const err = chrome.runtime.lastError;
|
|
54
|
+
const errMsg = err?.message ?? 'unknown reason';
|
|
32
55
|
const hostNotFound = err && (
|
|
33
56
|
err.message?.includes('not found') ||
|
|
34
57
|
err.message?.includes('Cannot find native messaging host') ||
|
|
35
58
|
err.message?.includes('Specified native messaging host not found')
|
|
36
59
|
);
|
|
60
|
+
debugStats.disconnects++;
|
|
61
|
+
debugStats.lastError = errMsg;
|
|
62
|
+
debugStats.lastErrorTime = Date.now();
|
|
37
63
|
isConnected = false;
|
|
38
64
|
nativePort = null;
|
|
39
65
|
updateIcon(false);
|
|
66
|
+
dbg(`Native host disconnected (total disconnects: ${debugStats.disconnects}): ${errMsg}`);
|
|
40
67
|
// Reject all pending requests
|
|
41
68
|
for (const [id, pending] of pendingRequests) {
|
|
42
69
|
clearTimeout(pending.timeoutId);
|
|
@@ -59,6 +86,8 @@ function connectNativeHost() {
|
|
|
59
86
|
} catch (err) {
|
|
60
87
|
isConnected = false;
|
|
61
88
|
updateIcon(false);
|
|
89
|
+
debugStats.lastError = err?.message ?? String(err);
|
|
90
|
+
debugStats.lastErrorTime = Date.now();
|
|
62
91
|
console.warn('[ZeroCLI] connectNativeHost error:', err?.message);
|
|
63
92
|
setTimeout(connectNativeHost, 30000);
|
|
64
93
|
}
|
|
@@ -79,7 +108,7 @@ async function handleNativeMessage(message) {
|
|
|
79
108
|
|
|
80
109
|
switch (message.type) {
|
|
81
110
|
case 'pong':
|
|
82
|
-
|
|
111
|
+
dbg('Received pong from native host — connection healthy.');
|
|
83
112
|
break;
|
|
84
113
|
|
|
85
114
|
case 'status_response':
|
|
@@ -88,14 +117,23 @@ async function handleNativeMessage(message) {
|
|
|
88
117
|
|
|
89
118
|
case 'tool_request': {
|
|
90
119
|
const { method, params, id: requestId } = message;
|
|
120
|
+
debugStats.toolsDispatched++;
|
|
121
|
+
debugStats.lastToolCall = method;
|
|
122
|
+
debugStats.lastToolCallTime = Date.now();
|
|
123
|
+
dbg(`Tool request #${debugStats.toolsDispatched}: ${method} (id=${requestId})`);
|
|
91
124
|
try {
|
|
92
125
|
const result = await dispatchTool(method, params || {});
|
|
126
|
+
dbg(`Tool success: ${method}`);
|
|
93
127
|
sendToNative({
|
|
94
128
|
type: 'tool_response',
|
|
95
129
|
id: requestId,
|
|
96
130
|
result,
|
|
97
131
|
});
|
|
98
132
|
} catch (err) {
|
|
133
|
+
debugStats.toolErrors++;
|
|
134
|
+
debugStats.lastError = `${method}: ${err.message}`;
|
|
135
|
+
debugStats.lastErrorTime = Date.now();
|
|
136
|
+
console.error(`[ZeroCLI] Tool error: ${method}:`, err.message);
|
|
99
137
|
sendToNative({
|
|
100
138
|
type: 'tool_response',
|
|
101
139
|
id: requestId,
|
|
@@ -106,10 +144,12 @@ async function handleNativeMessage(message) {
|
|
|
106
144
|
}
|
|
107
145
|
|
|
108
146
|
case 'mcp_connected':
|
|
147
|
+
dbg('MCP client connected.');
|
|
109
148
|
updateIcon(true);
|
|
110
149
|
break;
|
|
111
150
|
|
|
112
151
|
case 'mcp_disconnected':
|
|
152
|
+
dbg('MCP client disconnected.');
|
|
113
153
|
updateIcon(false);
|
|
114
154
|
break;
|
|
115
155
|
|
|
@@ -156,6 +196,8 @@ async function dispatchTool(method, params) {
|
|
|
156
196
|
return toolShortcutsList(params);
|
|
157
197
|
case 'shortcuts_execute':
|
|
158
198
|
return toolShortcutsExecute(params);
|
|
199
|
+
case 'debug_info':
|
|
200
|
+
return toolDebugInfo(params);
|
|
159
201
|
default:
|
|
160
202
|
throw new Error(`Unknown tool: ${method}`);
|
|
161
203
|
}
|
|
@@ -467,6 +509,35 @@ async function toolShortcutsExecute(params) {
|
|
|
467
509
|
return result;
|
|
468
510
|
}
|
|
469
511
|
|
|
512
|
+
async function toolDebugInfo(_params) {
|
|
513
|
+
const uptimeMs = Date.now() - debugStats.workerStartTime;
|
|
514
|
+
const tabs = await chrome.tabs.query({}).catch(() => []);
|
|
515
|
+
return {
|
|
516
|
+
version: VERSION,
|
|
517
|
+
isConnected,
|
|
518
|
+
nativePortAlive: nativePort !== null,
|
|
519
|
+
uptime_ms: uptimeMs,
|
|
520
|
+
uptime_human: `${Math.floor(uptimeMs / 60000)}m ${Math.floor((uptimeMs % 60000) / 1000)}s`,
|
|
521
|
+
stats: {
|
|
522
|
+
connectAttempts: debugStats.connectAttempts,
|
|
523
|
+
connectSuccesses: debugStats.connectSuccesses,
|
|
524
|
+
disconnects: debugStats.disconnects,
|
|
525
|
+
toolsDispatched: debugStats.toolsDispatched,
|
|
526
|
+
toolErrors: debugStats.toolErrors,
|
|
527
|
+
},
|
|
528
|
+
lastError: debugStats.lastError,
|
|
529
|
+
lastErrorAgo: debugStats.lastErrorTime
|
|
530
|
+
? `${Math.round((Date.now() - debugStats.lastErrorTime) / 1000)}s ago`
|
|
531
|
+
: null,
|
|
532
|
+
lastToolCall: debugStats.lastToolCall,
|
|
533
|
+
lastToolCallAgo: debugStats.lastToolCallTime
|
|
534
|
+
? `${Math.round((Date.now() - debugStats.lastToolCallTime) / 1000)}s ago`
|
|
535
|
+
: null,
|
|
536
|
+
openTabs: tabs.length,
|
|
537
|
+
debuggerAttachedTabs: debuggerAttachedTabs.size,
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
|
|
470
541
|
// ─── Helper Functions ────────────────────────────────────────────────────────
|
|
471
542
|
|
|
472
543
|
async function getActiveTabId() {
|
|
@@ -908,21 +979,46 @@ chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
|
|
|
908
979
|
isConnected,
|
|
909
980
|
nativePortAlive: nativePort !== null,
|
|
910
981
|
version: VERSION,
|
|
982
|
+
stats: { ...debugStats },
|
|
911
983
|
});
|
|
912
984
|
}
|
|
913
985
|
// Return false: we handled synchronously.
|
|
914
986
|
return false;
|
|
915
987
|
});
|
|
916
988
|
|
|
989
|
+
// ─── Service Worker Keep-Alive (MV3) ─────────────────────────────────────────
|
|
990
|
+
//
|
|
991
|
+
// Chrome MV3 service workers are killed after ~30s of inactivity. We use the
|
|
992
|
+
// alarms API to wake the worker every 20 seconds, keeping the native messaging
|
|
993
|
+
// connection alive. Without this, the native host process exits, the Unix socket
|
|
994
|
+
// disappears, and all tool calls fail with "Browser extension is not connected".
|
|
995
|
+
|
|
996
|
+
chrome.alarms.create('zerocli-keepalive', { periodInMinutes: 0.33 }); // ~20 seconds
|
|
997
|
+
|
|
998
|
+
chrome.alarms.onAlarm.addListener((alarm) => {
|
|
999
|
+
if (alarm.name === 'zerocli-keepalive') {
|
|
1000
|
+
if (!isConnected) {
|
|
1001
|
+
dbg('Keep-alive alarm: not connected, attempting reconnect...');
|
|
1002
|
+
connectNativeHost();
|
|
1003
|
+
} else {
|
|
1004
|
+
// Send a lightweight ping to verify the connection is still healthy
|
|
1005
|
+
sendToNative({ type: 'ping' });
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
});
|
|
1009
|
+
|
|
917
1010
|
// ─── Init ────────────────────────────────────────────────────────────────────
|
|
918
1011
|
|
|
919
1012
|
chrome.runtime.onInstalled.addListener(() => {
|
|
920
1013
|
updateIcon(false);
|
|
1014
|
+
dbg('Extension installed/updated.');
|
|
921
1015
|
});
|
|
922
1016
|
|
|
923
1017
|
chrome.runtime.onStartup.addListener(() => {
|
|
1018
|
+
dbg('Browser startup — connecting native host.');
|
|
924
1019
|
connectNativeHost();
|
|
925
1020
|
});
|
|
926
1021
|
|
|
927
1022
|
// Connect when extension loads
|
|
1023
|
+
dbg('Service worker started.');
|
|
928
1024
|
connectNativeHost();
|
package/dist/cli.mjs
CHANGED
|
@@ -119193,7 +119193,7 @@ function buildProviderInfoLines() {
|
|
|
119193
119193
|
const sLen = ` ● ${sL} ${sReady}`.length;
|
|
119194
119194
|
out.push(boxRow(sRow, W2, sLen));
|
|
119195
119195
|
out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
|
|
119196
|
-
out.push(` ${DIM}${rgb(...DIMCOL)}zero ${RESET}${rgb(...ACCENT)}v${"0.8.
|
|
119196
|
+
out.push(` ${DIM}${rgb(...DIMCOL)}zero ${RESET}${rgb(...ACCENT)}v${"0.8.7"}${RESET}`);
|
|
119197
119197
|
return out;
|
|
119198
119198
|
}
|
|
119199
119199
|
function printStartupScreen() {}
|
|
@@ -151704,7 +151704,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
151704
151704
|
if (!isAttributionHeaderEnabled()) {
|
|
151705
151705
|
return "";
|
|
151706
151706
|
}
|
|
151707
|
-
const version2 = `${"0.8.
|
|
151707
|
+
const version2 = `${"0.8.7"}.${fingerprint}`;
|
|
151708
151708
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
151709
151709
|
const cch = "";
|
|
151710
151710
|
const workload = getWorkload();
|
|
@@ -194680,7 +194680,7 @@ var init_imageValidation = __esm(() => {
|
|
|
194680
194680
|
|
|
194681
194681
|
// src/utils/userAgent.ts
|
|
194682
194682
|
function getZeroCodeUserAgent() {
|
|
194683
|
-
return `claude-code/${"0.8.
|
|
194683
|
+
return `claude-code/${"0.8.7"}`;
|
|
194684
194684
|
}
|
|
194685
194685
|
|
|
194686
194686
|
// src/utils/http.ts
|
|
@@ -194689,7 +194689,7 @@ function getUserAgent() {
|
|
|
194689
194689
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
194690
194690
|
const workload = getWorkload();
|
|
194691
194691
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
194692
|
-
return `claude-cli/${"0.8.
|
|
194692
|
+
return `claude-cli/${"0.8.7"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
194693
194693
|
}
|
|
194694
194694
|
function getMCPUserAgent() {
|
|
194695
194695
|
const parts = [];
|
|
@@ -194703,7 +194703,7 @@ function getMCPUserAgent() {
|
|
|
194703
194703
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
194704
194704
|
}
|
|
194705
194705
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
194706
|
-
return `claude-code/${"0.8.
|
|
194706
|
+
return `claude-code/${"0.8.7"}${suffix}`;
|
|
194707
194707
|
}
|
|
194708
194708
|
function getWebFetchUserAgent() {
|
|
194709
194709
|
const supportUrl = getAPIProvider() === "firstParty" ? "https://support.anthropic.com/" : "https://github.com/Duheso/ZeroCLI";
|
|
@@ -249132,7 +249132,7 @@ function getTelemetryAttributes() {
|
|
|
249132
249132
|
attributes["session.id"] = sessionId;
|
|
249133
249133
|
}
|
|
249134
249134
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
249135
|
-
attributes["app.version"] = "0.8.
|
|
249135
|
+
attributes["app.version"] = "0.8.7";
|
|
249136
249136
|
}
|
|
249137
249137
|
const oauthAccount = getOauthAccountInfo();
|
|
249138
249138
|
if (oauthAccount) {
|
|
@@ -261371,7 +261371,7 @@ function computeFingerprint(messageText, version2) {
|
|
|
261371
261371
|
}
|
|
261372
261372
|
function computeFingerprintFromMessages(messages) {
|
|
261373
261373
|
const firstMessageText = extractFirstMessageText(messages);
|
|
261374
|
-
return computeFingerprint(firstMessageText, "0.8.
|
|
261374
|
+
return computeFingerprint(firstMessageText, "0.8.7");
|
|
261375
261375
|
}
|
|
261376
261376
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
261377
261377
|
var init_fingerprint = () => {};
|
|
@@ -261413,7 +261413,7 @@ async function sideQuery(opts) {
|
|
|
261413
261413
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
261414
261414
|
}
|
|
261415
261415
|
const messageText = extractFirstUserMessageText(messages);
|
|
261416
|
-
const fingerprint = computeFingerprint(messageText, "0.8.
|
|
261416
|
+
const fingerprint = computeFingerprint(messageText, "0.8.7");
|
|
261417
261417
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
261418
261418
|
const systemBlocks = [
|
|
261419
261419
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -270315,7 +270315,7 @@ var init_user = __esm(() => {
|
|
|
270315
270315
|
deviceId,
|
|
270316
270316
|
sessionId: getSessionId(),
|
|
270317
270317
|
email: getEmail(),
|
|
270318
|
-
appVersion: "0.8.
|
|
270318
|
+
appVersion: "0.8.7",
|
|
270319
270319
|
platform: getHostPlatformForAnalytics(),
|
|
270320
270320
|
organizationUuid,
|
|
270321
270321
|
accountUuid,
|
|
@@ -270709,7 +270709,7 @@ async function initializeBetaTracing(resource) {
|
|
|
270709
270709
|
});
|
|
270710
270710
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
270711
270711
|
setLoggerProvider(loggerProvider);
|
|
270712
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "0.8.
|
|
270712
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "0.8.7");
|
|
270713
270713
|
setEventLogger(eventLogger);
|
|
270714
270714
|
process.on("beforeExit", async () => {
|
|
270715
270715
|
await loggerProvider?.forceFlush();
|
|
@@ -270749,7 +270749,7 @@ async function initializeTelemetry() {
|
|
|
270749
270749
|
const platform3 = getPlatform();
|
|
270750
270750
|
const baseAttributes = {
|
|
270751
270751
|
[ATTR_SERVICE_NAME3]: "claude-code",
|
|
270752
|
-
[ATTR_SERVICE_VERSION3]: "0.8.
|
|
270752
|
+
[ATTR_SERVICE_VERSION3]: "0.8.7"
|
|
270753
270753
|
};
|
|
270754
270754
|
if (platform3 === "wsl") {
|
|
270755
270755
|
const wslVersion = getWslVersion();
|
|
@@ -270794,7 +270794,7 @@ async function initializeTelemetry() {
|
|
|
270794
270794
|
} catch {}
|
|
270795
270795
|
};
|
|
270796
270796
|
registerCleanup(shutdownTelemetry2);
|
|
270797
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", "0.8.
|
|
270797
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", "0.8.7");
|
|
270798
270798
|
}
|
|
270799
270799
|
const meterProvider = new MeterProvider3({
|
|
270800
270800
|
resource,
|
|
@@ -270814,7 +270814,7 @@ async function initializeTelemetry() {
|
|
|
270814
270814
|
});
|
|
270815
270815
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
270816
270816
|
setLoggerProvider(loggerProvider);
|
|
270817
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "0.8.
|
|
270817
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "0.8.7");
|
|
270818
270818
|
setEventLogger(eventLogger);
|
|
270819
270819
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
270820
270820
|
process.on("beforeExit", async () => {
|
|
@@ -270876,7 +270876,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
270876
270876
|
}
|
|
270877
270877
|
};
|
|
270878
270878
|
registerCleanup(shutdownTelemetry);
|
|
270879
|
-
return meterProvider.getMeter("com.anthropic.claude_code", "0.8.
|
|
270879
|
+
return meterProvider.getMeter("com.anthropic.claude_code", "0.8.7");
|
|
270880
270880
|
}
|
|
270881
270881
|
async function flushTelemetry() {
|
|
270882
270882
|
const meterProvider = getMeterProvider();
|
|
@@ -272168,7 +272168,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
272168
272168
|
}
|
|
272169
272169
|
async function getDoctorDiagnostic() {
|
|
272170
272170
|
const installationType = await getCurrentInstallationType();
|
|
272171
|
-
const version2 = typeof MACRO !== "undefined" ? "0.8.
|
|
272171
|
+
const version2 = typeof MACRO !== "undefined" ? "0.8.7" : "unknown";
|
|
272172
272172
|
const installationPath = await getInstallationPath();
|
|
272173
272173
|
const invokedBinary = getInvokedBinary();
|
|
272174
272174
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -273653,7 +273653,7 @@ function getInstallationEnv() {
|
|
|
273653
273653
|
return;
|
|
273654
273654
|
}
|
|
273655
273655
|
function getZeroCodeVersion() {
|
|
273656
|
-
return "0.8.
|
|
273656
|
+
return "0.8.7";
|
|
273657
273657
|
}
|
|
273658
273658
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
273659
273659
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -275020,8 +275020,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
275020
275020
|
const maxVersion = await getMaxVersion();
|
|
275021
275021
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
275022
275022
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
275023
|
-
if (gte("0.8.
|
|
275024
|
-
logForDebugging(`Native installer: current version ${"0.8.
|
|
275023
|
+
if (gte("0.8.7", maxVersion)) {
|
|
275024
|
+
logForDebugging(`Native installer: current version ${"0.8.7"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
275025
275025
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
275026
275026
|
latency_ms: Date.now() - startTime,
|
|
275027
275027
|
max_version: maxVersion,
|
|
@@ -275032,7 +275032,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
275032
275032
|
version2 = maxVersion;
|
|
275033
275033
|
}
|
|
275034
275034
|
}
|
|
275035
|
-
if (!forceReinstall && version2 === "0.8.
|
|
275035
|
+
if (!forceReinstall && version2 === "0.8.7" && await versionIsAvailable(version2) && await isPossibleZeroBinary(executablePath)) {
|
|
275036
275036
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
275037
275037
|
logEvent("tengu_native_update_complete", {
|
|
275038
275038
|
latency_ms: Date.now() - startTime,
|
|
@@ -380238,7 +380238,7 @@ function getAnthropicEnvMetadata() {
|
|
|
380238
380238
|
function getBuildAgeMinutes() {
|
|
380239
380239
|
if (false)
|
|
380240
380240
|
;
|
|
380241
|
-
const buildTime = new Date("2026-05-
|
|
380241
|
+
const buildTime = new Date("2026-05-05T16:52:03.312Z").getTime();
|
|
380242
380242
|
if (isNaN(buildTime))
|
|
380243
380243
|
return;
|
|
380244
380244
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -406426,13 +406426,23 @@ __export(exports_zeroCLIMcpServer, {
|
|
|
406426
406426
|
});
|
|
406427
406427
|
import { createConnection as createConnection2 } from "net";
|
|
406428
406428
|
async function sendToolRequest(method, params) {
|
|
406429
|
-
const
|
|
406430
|
-
for (
|
|
406431
|
-
|
|
406432
|
-
|
|
406433
|
-
|
|
406434
|
-
}
|
|
406435
|
-
|
|
406429
|
+
const retryDelaysMs = [0, 800, 2000, 4000];
|
|
406430
|
+
for (let attempt = 0;attempt < retryDelaysMs.length; attempt++) {
|
|
406431
|
+
if (retryDelaysMs[attempt] > 0) {
|
|
406432
|
+
logForDebugging(`[ZeroCLI Chrome] Retrying ${method} in ${retryDelaysMs[attempt]}ms (attempt ${attempt + 1}/${retryDelaysMs.length})...`, { level: "info" });
|
|
406433
|
+
await new Promise((resolve37) => setTimeout(resolve37, retryDelaysMs[attempt]));
|
|
406434
|
+
}
|
|
406435
|
+
const socketPaths = getAllSocketPaths();
|
|
406436
|
+
for (const socketPath2 of socketPaths) {
|
|
406437
|
+
try {
|
|
406438
|
+
const result = await sendViaSocket(socketPath2, method, params);
|
|
406439
|
+
if (attempt > 0) {
|
|
406440
|
+
logForDebugging(`[ZeroCLI Chrome] ${method} succeeded on attempt ${attempt + 1} via ${socketPath2}`, { level: "info" });
|
|
406441
|
+
}
|
|
406442
|
+
return result;
|
|
406443
|
+
} catch (err2) {
|
|
406444
|
+
logForDebugging(`[ZeroCLI Chrome] Socket ${socketPath2} failed (attempt ${attempt + 1}): ${err2}`, { level: "debug" });
|
|
406445
|
+
}
|
|
406436
406446
|
}
|
|
406437
406447
|
}
|
|
406438
406448
|
throw new Error("Browser extension is not connected. " + "Ensure the ZeroCLI Browser Extension is installed in Chrome " + "(chrome-extension/ directory, developer mode) and ZeroCLI is running with `zero --chrome`.");
|
|
@@ -406708,6 +406718,12 @@ function createZeroCLIChromeMcpServer() {
|
|
|
406708
406718
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|
|
406709
406719
|
};
|
|
406710
406720
|
});
|
|
406721
|
+
server.tool("debug_info", 'Get diagnostic information about the browser extension connection: uptime, connect/disconnect counts, last error, last tool call, and open tabs. Use this to diagnose intermittent "not connected" failures.', {}, async () => {
|
|
406722
|
+
const result = await callTool("debug_info", {});
|
|
406723
|
+
return {
|
|
406724
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|
|
406725
|
+
};
|
|
406726
|
+
});
|
|
406711
406727
|
return server;
|
|
406712
406728
|
}
|
|
406713
406729
|
async function runZeroCLIChromeMcpServer() {
|
|
@@ -406750,7 +406766,8 @@ var init_zeroCLIMcpServer = __esm(() => {
|
|
|
406750
406766
|
"upload_image",
|
|
406751
406767
|
"update_plan",
|
|
406752
406768
|
"shortcuts_list",
|
|
406753
|
-
"shortcuts_execute"
|
|
406769
|
+
"shortcuts_execute",
|
|
406770
|
+
"debug_info"
|
|
406754
406771
|
];
|
|
406755
406772
|
MAX_MESSAGE_SIZE = 1024 * 1024;
|
|
406756
406773
|
});
|
|
@@ -407655,7 +407672,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
407655
407672
|
const client2 = new Client({
|
|
407656
407673
|
name: "claude-code",
|
|
407657
407674
|
title: "ZeroCLI",
|
|
407658
|
-
version: "0.8.
|
|
407675
|
+
version: "0.8.7",
|
|
407659
407676
|
description: "Anthropic's agentic coding tool",
|
|
407660
407677
|
websiteUrl: PRODUCT_URL
|
|
407661
407678
|
}, {
|
|
@@ -408007,7 +408024,7 @@ var init_client7 = __esm(() => {
|
|
|
408007
408024
|
const client2 = new Client({
|
|
408008
408025
|
name: "claude-code",
|
|
408009
408026
|
title: "ZeroCLI",
|
|
408010
|
-
version: "0.8.
|
|
408027
|
+
version: "0.8.7",
|
|
408011
408028
|
description: "Anthropic's agentic coding tool",
|
|
408012
408029
|
websiteUrl: PRODUCT_URL
|
|
408013
408030
|
}, {
|
|
@@ -418670,7 +418687,7 @@ function Feedback({
|
|
|
418670
418687
|
platform: env2.platform,
|
|
418671
418688
|
gitRepo: envInfo.isGit,
|
|
418672
418689
|
terminal: env2.terminal,
|
|
418673
|
-
version: "0.8.
|
|
418690
|
+
version: "0.8.7",
|
|
418674
418691
|
transcript: normalizeMessagesForAPI(messages),
|
|
418675
418692
|
errors: sanitizedErrors,
|
|
418676
418693
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -418863,7 +418880,7 @@ function Feedback({
|
|
|
418863
418880
|
", ",
|
|
418864
418881
|
env2.terminal,
|
|
418865
418882
|
", v",
|
|
418866
|
-
"0.8.
|
|
418883
|
+
"0.8.7"
|
|
418867
418884
|
]
|
|
418868
418885
|
}, undefined, true, undefined, this)
|
|
418869
418886
|
]
|
|
@@ -418971,7 +418988,7 @@ ${sanitizedDescription}
|
|
|
418971
418988
|
` + `**Environment Info**
|
|
418972
418989
|
` + `- Platform: ${env2.platform}
|
|
418973
418990
|
` + `- Terminal: ${env2.terminal}
|
|
418974
|
-
` + `- Version: ${"0.8.
|
|
418991
|
+
` + `- Version: ${"0.8.7"}
|
|
418975
418992
|
` + feedbackIdLine + `
|
|
418976
418993
|
**Errors**
|
|
418977
418994
|
\`\`\`json
|
|
@@ -422126,7 +422143,7 @@ function buildPrimarySection() {
|
|
|
422126
422143
|
}, undefined, false, undefined, this);
|
|
422127
422144
|
return [{
|
|
422128
422145
|
label: "Version",
|
|
422129
|
-
value: "0.8.
|
|
422146
|
+
value: "0.8.7"
|
|
422130
422147
|
}, {
|
|
422131
422148
|
label: "Session name",
|
|
422132
422149
|
value: nameValue
|
|
@@ -426896,7 +426913,7 @@ function Config({
|
|
|
426896
426913
|
}
|
|
426897
426914
|
}, undefined, false, undefined, this)
|
|
426898
426915
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime181.jsxDEV(ChannelDowngradeDialog, {
|
|
426899
|
-
currentVersion: "0.8.
|
|
426916
|
+
currentVersion: "0.8.7",
|
|
426900
426917
|
onChoice: (choice) => {
|
|
426901
426918
|
setShowSubmenu(null);
|
|
426902
426919
|
setTabsHidden(false);
|
|
@@ -426908,7 +426925,7 @@ function Config({
|
|
|
426908
426925
|
autoUpdatesChannel: "stable"
|
|
426909
426926
|
};
|
|
426910
426927
|
if (choice === "stay") {
|
|
426911
|
-
newSettings.minimumVersion = "0.8.
|
|
426928
|
+
newSettings.minimumVersion = "0.8.7";
|
|
426912
426929
|
}
|
|
426913
426930
|
updateSettingsForSource("userSettings", newSettings);
|
|
426914
426931
|
setSettingsData((prev_27) => ({
|
|
@@ -435804,7 +435821,7 @@ function HelpV2(t0) {
|
|
|
435804
435821
|
let t6;
|
|
435805
435822
|
if ($2[31] !== tabs) {
|
|
435806
435823
|
t6 = /* @__PURE__ */ jsx_dev_runtime210.jsxDEV(Tabs, {
|
|
435807
|
-
title: `ZeroCLI v${"0.8.
|
|
435824
|
+
title: `ZeroCLI v${"0.8.7"}`,
|
|
435808
435825
|
color: "professionalBlue",
|
|
435809
435826
|
defaultTab: "general",
|
|
435810
435827
|
children: tabs
|
|
@@ -460648,7 +460665,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
460648
460665
|
return [];
|
|
460649
460666
|
}
|
|
460650
460667
|
}
|
|
460651
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.8.
|
|
460668
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.8.7") {
|
|
460652
460669
|
if (process.env.USER_TYPE === "ant") {
|
|
460653
460670
|
const changelog = MACRO.VERSION_CHANGELOG;
|
|
460654
460671
|
if (changelog) {
|
|
@@ -489686,7 +489703,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
489686
489703
|
smapsRollup,
|
|
489687
489704
|
platform: process.platform,
|
|
489688
489705
|
nodeVersion: process.version,
|
|
489689
|
-
ccVersion: "0.8.
|
|
489706
|
+
ccVersion: "0.8.7"
|
|
489690
489707
|
};
|
|
489691
489708
|
}
|
|
489692
489709
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -490273,7 +490290,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
490273
490290
|
var call59 = async () => {
|
|
490274
490291
|
return {
|
|
490275
490292
|
type: "text",
|
|
490276
|
-
value: `${"0.8.
|
|
490293
|
+
value: `${"0.8.7"} (built ${"2026-05-05T16:52:03.312Z"})`
|
|
490277
490294
|
};
|
|
490278
490295
|
}, version2, version_default;
|
|
490279
490296
|
var init_version = __esm(() => {
|
|
@@ -500428,7 +500445,7 @@ function generateHtmlReport(data, insights) {
|
|
|
500428
500445
|
</html>`;
|
|
500429
500446
|
}
|
|
500430
500447
|
function buildExportData(data, insights, facets) {
|
|
500431
|
-
const version3 = typeof MACRO !== "undefined" ? "0.8.
|
|
500448
|
+
const version3 = typeof MACRO !== "undefined" ? "0.8.7" : "unknown";
|
|
500432
500449
|
const facets_summary = {
|
|
500433
500450
|
total: facets.size,
|
|
500434
500451
|
goal_categories: {},
|
|
@@ -504618,7 +504635,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
504618
504635
|
init_settings2();
|
|
504619
504636
|
init_slowOperations();
|
|
504620
504637
|
init_uuid();
|
|
504621
|
-
VERSION7 = typeof MACRO !== "undefined" ? "0.8.
|
|
504638
|
+
VERSION7 = typeof MACRO !== "undefined" ? "0.8.7" : "unknown";
|
|
504622
504639
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
504623
504640
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
504624
504641
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -505928,7 +505945,7 @@ var init_filesystem = __esm(() => {
|
|
|
505928
505945
|
});
|
|
505929
505946
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
505930
505947
|
const nonce = randomBytes17(16).toString("hex");
|
|
505931
|
-
return join136(getZeroTempDir(), "bundled-skills", "0.8.
|
|
505948
|
+
return join136(getZeroTempDir(), "bundled-skills", "0.8.7", nonce);
|
|
505932
505949
|
});
|
|
505933
505950
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
505934
505951
|
});
|
|
@@ -512990,7 +513007,8 @@ class ChromeNativeHost {
|
|
|
512990
513007
|
sendChromeMessage(jsonStringify({
|
|
512991
513008
|
type: "tool_request",
|
|
512992
513009
|
method: request.method,
|
|
512993
|
-
params: request.params
|
|
513010
|
+
params: request.params,
|
|
513011
|
+
id: request.id
|
|
512994
513012
|
}));
|
|
512995
513013
|
} catch (e2) {
|
|
512996
513014
|
log(`Failed to parse tool request from MCP client ${clientId}:`, e2);
|
|
@@ -516947,7 +516965,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
516947
516965
|
slash_commands: inputs.commands.filter((c6) => c6.userInvocable !== false).map((c6) => c6.name),
|
|
516948
516966
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
516949
516967
|
betas: getSdkBetas(),
|
|
516950
|
-
claude_code_version: "0.8.
|
|
516968
|
+
claude_code_version: "0.8.7",
|
|
516951
516969
|
output_style: outputStyle2,
|
|
516952
516970
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
516953
516971
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -532262,7 +532280,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
532262
532280
|
function getSemverPart(version3) {
|
|
532263
532281
|
return `${import_semver10.major(version3, { loose: true })}.${import_semver10.minor(version3, { loose: true })}.${import_semver10.patch(version3, { loose: true })}`;
|
|
532264
532282
|
}
|
|
532265
|
-
function useUpdateNotification(updatedVersion, initialVersion = "0.8.
|
|
532283
|
+
function useUpdateNotification(updatedVersion, initialVersion = "0.8.7") {
|
|
532266
532284
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react225.useState(() => getSemverPart(initialVersion));
|
|
532267
532285
|
if (!updatedVersion) {
|
|
532268
532286
|
return null;
|
|
@@ -532302,7 +532320,7 @@ function AutoUpdater({
|
|
|
532302
532320
|
return;
|
|
532303
532321
|
}
|
|
532304
532322
|
if (false) {}
|
|
532305
|
-
const currentVersion = "0.8.
|
|
532323
|
+
const currentVersion = "0.8.7";
|
|
532306
532324
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
532307
532325
|
let latestVersion = await getLatestVersion(channel);
|
|
532308
532326
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -532516,12 +532534,12 @@ function NativeAutoUpdater({
|
|
|
532516
532534
|
logEvent("tengu_native_auto_updater_start", {});
|
|
532517
532535
|
try {
|
|
532518
532536
|
const maxVersion = await getMaxVersion();
|
|
532519
|
-
if (maxVersion && gt("0.8.
|
|
532537
|
+
if (maxVersion && gt("0.8.7", maxVersion)) {
|
|
532520
532538
|
const msg = await getMaxVersionMessage();
|
|
532521
532539
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
532522
532540
|
}
|
|
532523
532541
|
const result = await installLatest(channel);
|
|
532524
|
-
const currentVersion = "0.8.
|
|
532542
|
+
const currentVersion = "0.8.7";
|
|
532525
532543
|
const latencyMs = Date.now() - startTime;
|
|
532526
532544
|
if (result.lockFailed) {
|
|
532527
532545
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -532655,17 +532673,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
532655
532673
|
const maxVersion = await getMaxVersion();
|
|
532656
532674
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
532657
532675
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
532658
|
-
if (gte("0.8.
|
|
532659
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"0.8.
|
|
532676
|
+
if (gte("0.8.7", maxVersion)) {
|
|
532677
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"0.8.7"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
532660
532678
|
setUpdateAvailable(false);
|
|
532661
532679
|
return;
|
|
532662
532680
|
}
|
|
532663
532681
|
latest = maxVersion;
|
|
532664
532682
|
}
|
|
532665
|
-
const hasUpdate = latest && !gte("0.8.
|
|
532683
|
+
const hasUpdate = latest && !gte("0.8.7", latest) && !shouldSkipVersion(latest);
|
|
532666
532684
|
setUpdateAvailable(!!hasUpdate);
|
|
532667
532685
|
if (hasUpdate) {
|
|
532668
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.8.
|
|
532686
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.8.7"} -> ${latest}`);
|
|
532669
532687
|
}
|
|
532670
532688
|
};
|
|
532671
532689
|
$2[0] = t1;
|
|
@@ -532699,7 +532717,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
532699
532717
|
wrap: "truncate",
|
|
532700
532718
|
children: [
|
|
532701
532719
|
"currentVersion: ",
|
|
532702
|
-
"0.8.
|
|
532720
|
+
"0.8.7"
|
|
532703
532721
|
]
|
|
532704
532722
|
}, undefined, true, undefined, this);
|
|
532705
532723
|
$2[3] = verbose;
|
|
@@ -541729,7 +541747,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
541729
541747
|
project_dir: getOriginalCwd(),
|
|
541730
541748
|
added_dirs: addedDirs
|
|
541731
541749
|
},
|
|
541732
|
-
version: "0.8.
|
|
541750
|
+
version: "0.8.7",
|
|
541733
541751
|
output_style: {
|
|
541734
541752
|
name: outputStyleName
|
|
541735
541753
|
},
|
|
@@ -566248,7 +566266,7 @@ function WelcomeV2() {
|
|
|
566248
566266
|
dimColor: true,
|
|
566249
566267
|
children: [
|
|
566250
566268
|
"v",
|
|
566251
|
-
"0.8.
|
|
566269
|
+
"0.8.7",
|
|
566252
566270
|
" "
|
|
566253
566271
|
]
|
|
566254
566272
|
}, undefined, true, undefined, this)
|
|
@@ -566482,7 +566500,7 @@ function WelcomeV2() {
|
|
|
566482
566500
|
dimColor: true,
|
|
566483
566501
|
children: [
|
|
566484
566502
|
"v",
|
|
566485
|
-
"0.8.
|
|
566503
|
+
"0.8.7",
|
|
566486
566504
|
" "
|
|
566487
566505
|
]
|
|
566488
566506
|
}, undefined, true, undefined, this)
|
|
@@ -566729,7 +566747,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
566729
566747
|
dimColor: true,
|
|
566730
566748
|
children: [
|
|
566731
566749
|
"v",
|
|
566732
|
-
"0.8.
|
|
566750
|
+
"0.8.7",
|
|
566733
566751
|
" "
|
|
566734
566752
|
]
|
|
566735
566753
|
}, undefined, true, undefined, this);
|
|
@@ -567002,7 +567020,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
567002
567020
|
dimColor: true,
|
|
567003
567021
|
children: [
|
|
567004
567022
|
"v",
|
|
567005
|
-
"0.8.
|
|
567023
|
+
"0.8.7",
|
|
567006
567024
|
" "
|
|
567007
567025
|
]
|
|
567008
567026
|
}, undefined, true, undefined, this);
|
|
@@ -568514,7 +568532,7 @@ function completeOnboarding() {
|
|
|
568514
568532
|
saveGlobalConfig((current) => ({
|
|
568515
568533
|
...current,
|
|
568516
568534
|
hasCompletedOnboarding: true,
|
|
568517
|
-
lastOnboardingVersion: "0.8.
|
|
568535
|
+
lastOnboardingVersion: "0.8.7"
|
|
568518
568536
|
}));
|
|
568519
568537
|
}
|
|
568520
568538
|
function showDialog(root2, renderer) {
|
|
@@ -572765,7 +572783,7 @@ function appendToLog(path24, message) {
|
|
|
572765
572783
|
cwd: getFsImplementation().cwd(),
|
|
572766
572784
|
userType: process.env.USER_TYPE,
|
|
572767
572785
|
sessionId: getSessionId(),
|
|
572768
|
-
version: "0.8.
|
|
572786
|
+
version: "0.8.7"
|
|
572769
572787
|
};
|
|
572770
572788
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
572771
572789
|
}
|
|
@@ -573371,7 +573389,7 @@ async function startMCPServer(cwd2, debug, verbose) {
|
|
|
573371
573389
|
setCwd(cwd2);
|
|
573372
573390
|
const server = new Server({
|
|
573373
573391
|
name: "claude/tengu",
|
|
573374
|
-
version: "0.8.
|
|
573392
|
+
version: "0.8.7"
|
|
573375
573393
|
}, {
|
|
573376
573394
|
capabilities: {
|
|
573377
573395
|
tools: {}
|
|
@@ -578010,8 +578028,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
578010
578028
|
}
|
|
578011
578029
|
async function checkEnvLessBridgeMinVersion() {
|
|
578012
578030
|
const cfg = await getEnvLessBridgeConfig();
|
|
578013
|
-
if (cfg.min_version && lt("0.8.
|
|
578014
|
-
return `Your version of ZeroCLI (${"0.8.
|
|
578031
|
+
if (cfg.min_version && lt("0.8.7", cfg.min_version)) {
|
|
578032
|
+
return `Your version of ZeroCLI (${"0.8.7"}) is too old for Remote Control.
|
|
578015
578033
|
Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
|
|
578016
578034
|
}
|
|
578017
578035
|
return null;
|
|
@@ -578486,7 +578504,7 @@ async function initBridgeCore(params) {
|
|
|
578486
578504
|
const rawApi = createBridgeApiClient({
|
|
578487
578505
|
baseUrl,
|
|
578488
578506
|
getAccessToken,
|
|
578489
|
-
runnerVersion: "0.8.
|
|
578507
|
+
runnerVersion: "0.8.7",
|
|
578490
578508
|
onDebug: logForDebugging,
|
|
578491
578509
|
onAuth401,
|
|
578492
578510
|
getTrustedDeviceToken
|
|
@@ -584774,7 +584792,7 @@ __export(exports_update, {
|
|
|
584774
584792
|
});
|
|
584775
584793
|
async function update() {
|
|
584776
584794
|
logEvent("tengu_update_check", {});
|
|
584777
|
-
writeToStdout(`Current version: ${"0.8.
|
|
584795
|
+
writeToStdout(`Current version: ${"0.8.7"}
|
|
584778
584796
|
`);
|
|
584779
584797
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
584780
584798
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -584849,8 +584867,8 @@ async function update() {
|
|
|
584849
584867
|
writeToStdout(`Zero is managed by Homebrew.
|
|
584850
584868
|
`);
|
|
584851
584869
|
const latest = await getLatestVersion(channel);
|
|
584852
|
-
if (latest && !gte("0.8.
|
|
584853
|
-
writeToStdout(`Update available: ${"0.8.
|
|
584870
|
+
if (latest && !gte("0.8.7", latest)) {
|
|
584871
|
+
writeToStdout(`Update available: ${"0.8.7"} → ${latest}
|
|
584854
584872
|
`);
|
|
584855
584873
|
writeToStdout(`
|
|
584856
584874
|
`);
|
|
@@ -584866,8 +584884,8 @@ async function update() {
|
|
|
584866
584884
|
writeToStdout(`Zero is managed by winget.
|
|
584867
584885
|
`);
|
|
584868
584886
|
const latest = await getLatestVersion(channel);
|
|
584869
|
-
if (latest && !gte("0.8.
|
|
584870
|
-
writeToStdout(`Update available: ${"0.8.
|
|
584887
|
+
if (latest && !gte("0.8.7", latest)) {
|
|
584888
|
+
writeToStdout(`Update available: ${"0.8.7"} → ${latest}
|
|
584871
584889
|
`);
|
|
584872
584890
|
writeToStdout(`
|
|
584873
584891
|
`);
|
|
@@ -584883,8 +584901,8 @@ async function update() {
|
|
|
584883
584901
|
writeToStdout(`Zero is managed by apk.
|
|
584884
584902
|
`);
|
|
584885
584903
|
const latest = await getLatestVersion(channel);
|
|
584886
|
-
if (latest && !gte("0.8.
|
|
584887
|
-
writeToStdout(`Update available: ${"0.8.
|
|
584904
|
+
if (latest && !gte("0.8.7", latest)) {
|
|
584905
|
+
writeToStdout(`Update available: ${"0.8.7"} → ${latest}
|
|
584888
584906
|
`);
|
|
584889
584907
|
writeToStdout(`
|
|
584890
584908
|
`);
|
|
@@ -584949,11 +584967,11 @@ async function update() {
|
|
|
584949
584967
|
`);
|
|
584950
584968
|
await gracefulShutdown(1);
|
|
584951
584969
|
}
|
|
584952
|
-
if (result.latestVersion === "0.8.
|
|
584953
|
-
writeToStdout(source_default.green(`Zero CLI is up to date (${"0.8.
|
|
584970
|
+
if (result.latestVersion === "0.8.7") {
|
|
584971
|
+
writeToStdout(source_default.green(`Zero CLI is up to date (${"0.8.7"})`) + `
|
|
584954
584972
|
`);
|
|
584955
584973
|
} else {
|
|
584956
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.8.
|
|
584974
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.8.7"} to version ${result.latestVersion}`) + `
|
|
584957
584975
|
`);
|
|
584958
584976
|
await regenerateCompletionCache();
|
|
584959
584977
|
}
|
|
@@ -585013,12 +585031,12 @@ async function update() {
|
|
|
585013
585031
|
`);
|
|
585014
585032
|
await gracefulShutdown(1);
|
|
585015
585033
|
}
|
|
585016
|
-
if (latestVersion === "0.8.
|
|
585017
|
-
writeToStdout(source_default.green(`Zero CLI is up to date (${"0.8.
|
|
585034
|
+
if (latestVersion === "0.8.7") {
|
|
585035
|
+
writeToStdout(source_default.green(`Zero CLI is up to date (${"0.8.7"})`) + `
|
|
585018
585036
|
`);
|
|
585019
585037
|
await gracefulShutdown(0);
|
|
585020
585038
|
}
|
|
585021
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"0.8.
|
|
585039
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"0.8.7"})
|
|
585022
585040
|
`);
|
|
585023
585041
|
writeToStdout(`Installing update...
|
|
585024
585042
|
`);
|
|
@@ -585063,7 +585081,7 @@ async function update() {
|
|
|
585063
585081
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
585064
585082
|
switch (status2) {
|
|
585065
585083
|
case "success":
|
|
585066
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.8.
|
|
585084
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.8.7"} to version ${latestVersion}`) + `
|
|
585067
585085
|
`);
|
|
585068
585086
|
await regenerateCompletionCache();
|
|
585069
585087
|
break;
|
|
@@ -586363,7 +586381,7 @@ ${customInstructions}` : customInstructions;
|
|
|
586363
586381
|
}
|
|
586364
586382
|
}
|
|
586365
586383
|
logForDiagnosticsNoPII("info", "started", {
|
|
586366
|
-
version: "0.8.
|
|
586384
|
+
version: "0.8.7",
|
|
586367
586385
|
is_native_binary: isInBundledMode()
|
|
586368
586386
|
});
|
|
586369
586387
|
registerCleanup(async () => {
|
|
@@ -587246,7 +587264,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
587246
587264
|
pendingHookMessages
|
|
587247
587265
|
}, renderAndRun);
|
|
587248
587266
|
}
|
|
587249
|
-
}).version("0.8.
|
|
587267
|
+
}).version("0.8.7", "-v, --version", "Output the version number");
|
|
587250
587268
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
587251
587269
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
587252
587270
|
if (canUserConfigureAdvisor()) {
|
|
@@ -587911,7 +587929,7 @@ if (false) {}
|
|
|
587911
587929
|
async function main2() {
|
|
587912
587930
|
const args = process.argv.slice(2);
|
|
587913
587931
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
587914
|
-
console.log(`${"0.8.
|
|
587932
|
+
console.log(`${"0.8.7"} (ZeroCLI)`);
|
|
587915
587933
|
return;
|
|
587916
587934
|
}
|
|
587917
587935
|
if (args.includes("--provider")) {
|
|
@@ -588053,4 +588071,4 @@ async function main2() {
|
|
|
588053
588071
|
}
|
|
588054
588072
|
main2();
|
|
588055
588073
|
|
|
588056
|
-
//# debugId=
|
|
588074
|
+
//# debugId=A389794BEC666F3E64756E2164756E21
|