@duheso/zerocli 0.8.5 → 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/README.md +1 -1
- package/chrome-extension/background.js +98 -2
- package/chrome-extension/manifest.json +2 -1
- package/dist/cli.mjs +126 -108
- 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();
|
|
@@ -189715,7 +189715,7 @@ You are STRICTLY PROHIBITED from:
|
|
|
189715
189715
|
|
|
189716
189716
|
You MAY write ephemeral test scripts to a temp directory (/tmp or $TMPDIR) via ${BASH_TOOL_NAME} redirection when inline commands aren't sufficient — e.g., a multi-step race harness or a Playwright test. Clean up after yourself.
|
|
189717
189717
|
|
|
189718
|
-
Check your ACTUAL available tools rather than assuming from this prompt. You may have browser automation (
|
|
189718
|
+
Check your ACTUAL available tools rather than assuming from this prompt. You may have browser automation (mcp__zero-in-chrome__*, mcp__playwright__*), ${WEB_FETCH_TOOL_NAME}, or other MCP tools depending on the session — do not skip capabilities you didn't think to check for.
|
|
189719
189719
|
|
|
189720
189720
|
=== WHAT YOU RECEIVE ===
|
|
189721
189721
|
You will receive: the original task description, files changed, approach taken, and optionally a plan file path.
|
|
@@ -189723,7 +189723,7 @@ You will receive: the original task description, files changed, approach taken,
|
|
|
189723
189723
|
=== VERIFICATION STRATEGY ===
|
|
189724
189724
|
Adapt your strategy based on what was changed:
|
|
189725
189725
|
|
|
189726
|
-
**Frontend changes**: Start dev server → check your tools for browser automation (
|
|
189726
|
+
**Frontend changes**: Start dev server → check your tools for browser automation (mcp__zero-in-chrome__*, mcp__playwright__*) and USE them to navigate, screenshot, click, and read console — do NOT say "needs a real browser" without attempting → curl a sample of page subresources (image-optimizer URLs like /_next/image, same-origin API routes, static assets) since HTML can serve 200 while everything it references fails → run frontend tests
|
|
189727
189727
|
**Backend/API changes**: Start server → curl/fetch endpoints → verify response shapes against expected values (not just status codes) → test error handling → check edge cases
|
|
189728
189728
|
**CLI/script changes**: Run with representative inputs → verify stdout/stderr/exit codes → test edge inputs (empty, malformed, boundary) → verify --help / usage output is accurate
|
|
189729
189729
|
**Infrastructure/config changes**: Validate syntax → dry-run where possible (terraform plan, kubectl apply --dry-run=server, docker build, nginx -t) → check env vars / secrets are actually referenced, not just defined
|
|
@@ -189752,7 +189752,7 @@ You will feel the urge to skip checks. These are the exact excuses you reach for
|
|
|
189752
189752
|
- "The implementer's tests already pass" — the implementer is an LLM. Verify independently.
|
|
189753
189753
|
- "This is probably fine" — probably is not verified. Run it.
|
|
189754
189754
|
- "Let me start the server and check the code" — no. Start the server and hit the endpoint.
|
|
189755
|
-
- "I don't have a browser" — did you actually check for
|
|
189755
|
+
- "I don't have a browser" — did you actually check for mcp__zero-in-chrome__* / mcp__playwright__*? If present, use them. If an MCP tool fails, troubleshoot (server running? selector right?). The fallback exists so you don't invent your own "can't do this" story.
|
|
189756
189756
|
- "This would take too long" — not your call.
|
|
189757
189757
|
If you catch yourself writing an explanation instead of a command, stop. Run the command.
|
|
189758
189758
|
|
|
@@ -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) {
|
|
@@ -258954,7 +258954,7 @@ function getUsername2() {
|
|
|
258954
258954
|
return process.env.USER || process.env.USERNAME || "default";
|
|
258955
258955
|
}
|
|
258956
258956
|
}
|
|
258957
|
-
var CLAUDE_IN_CHROME_MCP_SERVER_NAME = "
|
|
258957
|
+
var CLAUDE_IN_CHROME_MCP_SERVER_NAME = "zero-in-chrome", CHROMIUM_BROWSERS, BROWSER_DETECTION_ORDER, MAX_TRACKED_TABS = 200, trackedTabIds;
|
|
258958
258958
|
var init_common2 = __esm(() => {
|
|
258959
258959
|
init_debug();
|
|
258960
258960
|
init_errors();
|
|
@@ -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);
|
|
@@ -385656,11 +385656,11 @@ function getChromeSystemPrompt() {
|
|
|
385656
385656
|
}
|
|
385657
385657
|
var BASE_CHROME_PROMPT = `# Zero in Chrome browser automation
|
|
385658
385658
|
|
|
385659
|
-
You have access to browser automation tools (
|
|
385659
|
+
You have access to browser automation tools (mcp__zero-in-chrome__*) for interacting with web pages in Chrome. Follow these guidelines for effective browser automation.
|
|
385660
385660
|
|
|
385661
385661
|
## GIF recording
|
|
385662
385662
|
|
|
385663
|
-
When performing multi-step browser interactions that the user may want to review or share, use
|
|
385663
|
+
When performing multi-step browser interactions that the user may want to review or share, use mcp__zero-in-chrome__gif_creator to record them.
|
|
385664
385664
|
|
|
385665
385665
|
You must ALWAYS:
|
|
385666
385666
|
* Capture extra frames before and after taking actions to ensure smooth playback
|
|
@@ -385668,14 +385668,14 @@ You must ALWAYS:
|
|
|
385668
385668
|
|
|
385669
385669
|
## Console log debugging
|
|
385670
385670
|
|
|
385671
|
-
You can use
|
|
385671
|
+
You can use mcp__zero-in-chrome__read_console_messages to read console output. Console output may be verbose. If you are looking for specific log entries, use the 'pattern' parameter with a regex-compatible pattern. This filters results efficiently and avoids overwhelming output. For example, use pattern: "[MyApp]" to filter for application-specific logs rather than reading all console output.
|
|
385672
385672
|
|
|
385673
385673
|
## Alerts and dialogs
|
|
385674
385674
|
|
|
385675
|
-
IMPORTANT: Do not trigger JavaScript alerts, confirms, prompts, or browser modal dialogs through your actions. These browser dialogs block all further browser events and will prevent the extension from receiving any subsequent commands. Instead, when possible, use console.log for debugging and then use the
|
|
385675
|
+
IMPORTANT: Do not trigger JavaScript alerts, confirms, prompts, or browser modal dialogs through your actions. These browser dialogs block all further browser events and will prevent the extension from receiving any subsequent commands. Instead, when possible, use console.log for debugging and then use the mcp__zero-in-chrome__read_console_messages tool to read those log messages. If a page has dialog-triggering elements:
|
|
385676
385676
|
1. Avoid clicking buttons or links that may trigger alerts (e.g., "Delete" buttons with confirmation dialogs)
|
|
385677
385677
|
2. If you must interact with such elements, warn the user first that this may interrupt the session
|
|
385678
|
-
3. Use
|
|
385678
|
+
3. Use mcp__zero-in-chrome__javascript_tool to check for and dismiss any existing dialogs before proceeding
|
|
385679
385679
|
|
|
385680
385680
|
If you accidentally trigger a dialog and lose responsiveness, inform the user they need to manually dismiss it in the browser.
|
|
385681
385681
|
|
|
@@ -385693,21 +385693,21 @@ Explain what you attempted, what went wrong, and ask how the user would like to
|
|
|
385693
385693
|
|
|
385694
385694
|
## Tab context and session startup
|
|
385695
385695
|
|
|
385696
|
-
IMPORTANT: At the start of each browser automation session, call
|
|
385696
|
+
IMPORTANT: At the start of each browser automation session, call mcp__zero-in-chrome__tabs_context_mcp first to get information about the user's current browser tabs. Use this context to understand what the user might want to work with before creating new tabs.
|
|
385697
385697
|
|
|
385698
385698
|
Never reuse tab IDs from a previous/other session. Follow these guidelines:
|
|
385699
385699
|
1. Only reuse an existing tab if the user explicitly asks to work with it
|
|
385700
|
-
2. Otherwise, create a new tab with
|
|
385700
|
+
2. Otherwise, create a new tab with mcp__zero-in-chrome__tabs_create_mcp
|
|
385701
385701
|
3. If a tool returns an error indicating the tab doesn't exist or is invalid, call tabs_context_mcp to get fresh tab IDs
|
|
385702
385702
|
4. When a tab is closed by the user or a navigation error occurs, call tabs_context_mcp to see what tabs are available`, CHROME_TOOL_SEARCH_INSTRUCTIONS = `**IMPORTANT: Before using any chrome browser tools, you MUST first load them using ToolSearch.**
|
|
385703
385703
|
|
|
385704
|
-
Chrome browser tools are MCP tools that require loading before use. Before calling any
|
|
385705
|
-
1. Use ToolSearch with \`select:
|
|
385704
|
+
Chrome browser tools are MCP tools that require loading before use. Before calling any mcp__zero-in-chrome__* tool:
|
|
385705
|
+
1. Use ToolSearch with \`select:mcp__zero-in-chrome__<tool_name>\` to load the specific tool
|
|
385706
385706
|
2. Then call the tool
|
|
385707
385707
|
|
|
385708
385708
|
For example, to get tab context:
|
|
385709
|
-
1. First: ToolSearch with query "select:
|
|
385710
|
-
2. Then: Call
|
|
385709
|
+
1. First: ToolSearch with query "select:mcp__zero-in-chrome__tabs_context_mcp"
|
|
385710
|
+
2. Then: Call mcp__zero-in-chrome__tabs_context_mcp`, CLAUDE_IN_CHROME_SKILL_HINT = `**Browser Automation**: Chrome browser tools are available via the "zero-in-chrome" skill. CRITICAL: Before using any mcp__zero-in-chrome__* tools, invoke the skill by calling the Skill tool with skill: "zero-in-chrome". The skill provides browser automation instructions and enables the tools.`;
|
|
385711
385711
|
|
|
385712
385712
|
// src/utils/hooks/hookEvents.ts
|
|
385713
385713
|
function registerHookEventHandler(handler5) {
|
|
@@ -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(() => {
|
|
@@ -492123,7 +492140,7 @@ function shouldAutoEnableZeroInChrome() {
|
|
|
492123
492140
|
}
|
|
492124
492141
|
function setupZeroInChrome() {
|
|
492125
492142
|
const isNativeBuild = isInBundledMode();
|
|
492126
|
-
const allowedTools = ZEROCLI_BROWSER_TOOLS.map((toolName) => `
|
|
492143
|
+
const allowedTools = ZEROCLI_BROWSER_TOOLS.map((toolName) => `mcp__zero-in-chrome__${toolName}`);
|
|
492127
492144
|
const env4 = {};
|
|
492128
492145
|
if (getSessionBypassPermissionsMode()) {
|
|
492129
492146
|
env4.CLAUDE_CHROME_PERMISSION_MODE = "skip_all_permission_checks";
|
|
@@ -492137,7 +492154,7 @@ function setupZeroInChrome() {
|
|
|
492137
492154
|
[CLAUDE_IN_CHROME_MCP_SERVER_NAME]: {
|
|
492138
492155
|
type: "stdio",
|
|
492139
492156
|
command: process.execPath,
|
|
492140
|
-
args: ["--
|
|
492157
|
+
args: ["--zero-in-chrome-mcp"],
|
|
492141
492158
|
scope: "dynamic",
|
|
492142
492159
|
...hasEnv && { env: env4 }
|
|
492143
492160
|
}
|
|
@@ -492152,7 +492169,7 @@ function setupZeroInChrome() {
|
|
|
492152
492169
|
[CLAUDE_IN_CHROME_MCP_SERVER_NAME]: {
|
|
492153
492170
|
type: "stdio",
|
|
492154
492171
|
command: process.execPath,
|
|
492155
|
-
args: [cliPath, "--
|
|
492172
|
+
args: [cliPath, "--zero-in-chrome-mcp"],
|
|
492156
492173
|
scope: "dynamic",
|
|
492157
492174
|
...hasEnv && { env: env4 }
|
|
492158
492175
|
}
|
|
@@ -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) {
|
|
@@ -570392,7 +570410,7 @@ Call the \`${ENTER_PLAN_MODE_TOOL_NAME}\` tool now to enter plan mode, then:
|
|
|
570392
570410
|
Scale the count to the actual work: few files → closer to ${MIN_AGENTS}; hundreds of files → closer to ${MAX_AGENTS}. Prefer per-directory or per-module slicing over arbitrary file lists.
|
|
570393
570411
|
|
|
570394
570412
|
3. **Determine the e2e test recipe.** Figure out how a worker can verify its change actually works end-to-end — not just that unit tests pass. Look for:
|
|
570395
|
-
- A \`
|
|
570413
|
+
- A \`zero-in-chrome\` skill or browser-automation tool (for UI changes: click through the affected flow, screenshot the result)
|
|
570396
570414
|
- A \`tmux\` or CLI-verifier skill (for CLI changes: launch the app interactively, exercise the changed behavior)
|
|
570397
570415
|
- A dev-server + curl pattern (for API changes: start the server, hit the affected endpoints)
|
|
570398
570416
|
- An existing e2e/integration test suite the worker can run
|
|
@@ -570484,9 +570502,9 @@ var init_batch = __esm(() => {
|
|
|
570484
570502
|
// src/skills/bundled/claudeInChrome.ts
|
|
570485
570503
|
function registerZeroInChromeSkill() {
|
|
570486
570504
|
registerBundledSkill({
|
|
570487
|
-
name: "
|
|
570505
|
+
name: "zero-in-chrome",
|
|
570488
570506
|
description: "Automates your Chrome browser to interact with web pages - clicking elements, filling forms, capturing screenshots, reading console logs, and navigating sites. Opens pages in new tabs within your existing Chrome session. Requires site-level permissions before executing (configured in the extension).",
|
|
570489
|
-
whenToUse: "When the user wants to interact with web pages, automate browser tasks, capture screenshots, read console logs, or perform any browser-based actions. Always invoke BEFORE attempting to use any
|
|
570507
|
+
whenToUse: "When the user wants to interact with web pages, automate browser tasks, capture screenshots, read console logs, or perform any browser-based actions. Always invoke BEFORE attempting to use any mcp__zero-in-chrome__* tools.",
|
|
570490
570508
|
allowedTools: CLAUDE_IN_CHROME_MCP_TOOLS,
|
|
570491
570509
|
userInvocable: true,
|
|
570492
570510
|
isEnabled: () => shouldAutoEnableZeroInChrome(),
|
|
@@ -570504,15 +570522,15 @@ ${args}`;
|
|
|
570504
570522
|
});
|
|
570505
570523
|
}
|
|
570506
570524
|
var CLAUDE_IN_CHROME_MCP_TOOLS, SKILL_ACTIVATION_MESSAGE = `
|
|
570507
|
-
Now that this skill is invoked, you have access to Chrome browser automation tools. You can now use the
|
|
570525
|
+
Now that this skill is invoked, you have access to Chrome browser automation tools. You can now use the mcp__zero-in-chrome__* tools to interact with web pages.
|
|
570508
570526
|
|
|
570509
|
-
IMPORTANT: Start by calling
|
|
570527
|
+
IMPORTANT: Start by calling mcp__zero-in-chrome__tabs_context_mcp to get information about the user's current browser tabs.
|
|
570510
570528
|
`;
|
|
570511
570529
|
var init_claudeInChrome = __esm(() => {
|
|
570512
570530
|
init_zeroCLIMcpServer();
|
|
570513
570531
|
init_setup2();
|
|
570514
570532
|
init_bundledSkills();
|
|
570515
|
-
CLAUDE_IN_CHROME_MCP_TOOLS = ZEROCLI_BROWSER_TOOLS.map((toolName) => `
|
|
570533
|
+
CLAUDE_IN_CHROME_MCP_TOOLS = ZEROCLI_BROWSER_TOOLS.map((toolName) => `mcp__zero-in-chrome__${toolName}`);
|
|
570516
570534
|
});
|
|
570517
570535
|
|
|
570518
570536
|
// src/skills/bundled/debug.ts
|
|
@@ -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")) {
|
|
@@ -587975,7 +587993,7 @@ async function main2() {
|
|
|
587975
587993
|
`));
|
|
587976
587994
|
return;
|
|
587977
587995
|
}
|
|
587978
|
-
if (process.argv[2] === "--
|
|
587996
|
+
if (process.argv[2] === "--zero-in-chrome-mcp") {
|
|
587979
587997
|
profileCheckpoint2("cli_claude_in_chrome_mcp_path");
|
|
587980
587998
|
const {
|
|
587981
587999
|
runZeroInChromeMcpServer: runZeroInChromeMcpServer2
|
|
@@ -588053,4 +588071,4 @@ async function main2() {
|
|
|
588053
588071
|
}
|
|
588054
588072
|
main2();
|
|
588055
588073
|
|
|
588056
|
-
//# debugId=
|
|
588074
|
+
//# debugId=A389794BEC666F3E64756E2164756E21
|