localclawd 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +492 -742
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -89253,7 +89253,7 @@ var init_isEqual = __esm(() => {
|
|
|
89253
89253
|
|
|
89254
89254
|
// src/utils/userAgent.ts
|
|
89255
89255
|
function getClaudeCodeUserAgent() {
|
|
89256
|
-
return `claude-code/${"1.1.
|
|
89256
|
+
return `claude-code/${"1.1.9"}`;
|
|
89257
89257
|
}
|
|
89258
89258
|
|
|
89259
89259
|
// src/utils/workloadContext.ts
|
|
@@ -89275,7 +89275,7 @@ function getUserAgent() {
|
|
|
89275
89275
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
89276
89276
|
const workload = getWorkload();
|
|
89277
89277
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
89278
|
-
return `claude-cli/${"1.1.
|
|
89278
|
+
return `claude-cli/${"1.1.9"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
89279
89279
|
}
|
|
89280
89280
|
function getMCPUserAgent() {
|
|
89281
89281
|
const parts = [];
|
|
@@ -89289,7 +89289,7 @@ function getMCPUserAgent() {
|
|
|
89289
89289
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
89290
89290
|
}
|
|
89291
89291
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
89292
|
-
return `claude-code/${"1.1.
|
|
89292
|
+
return `claude-code/${"1.1.9"}${suffix}`;
|
|
89293
89293
|
}
|
|
89294
89294
|
function getWebFetchUserAgent() {
|
|
89295
89295
|
return `Claude-User (${getClaudeCodeUserAgent()}; +https://support.anthropic.com/)`;
|
|
@@ -99198,7 +99198,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
99198
99198
|
if (!isAttributionHeaderEnabled()) {
|
|
99199
99199
|
return "";
|
|
99200
99200
|
}
|
|
99201
|
-
const version = `${"1.1.
|
|
99201
|
+
const version = `${"1.1.9"}.${fingerprint}`;
|
|
99202
99202
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
99203
99203
|
const cch = "";
|
|
99204
99204
|
const workload = getWorkload();
|
|
@@ -132745,7 +132745,7 @@ var init_metadata = __esm(() => {
|
|
|
132745
132745
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
132746
132746
|
WHITESPACE_REGEX = /\s+/;
|
|
132747
132747
|
getVersionBase = memoize_default(() => {
|
|
132748
|
-
const match = "1.1.
|
|
132748
|
+
const match = "1.1.9".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
132749
132749
|
return match ? match[0] : undefined;
|
|
132750
132750
|
});
|
|
132751
132751
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -132785,9 +132785,9 @@ var init_metadata = __esm(() => {
|
|
|
132785
132785
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
132786
132786
|
isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
|
|
132787
132787
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
132788
|
-
version: "1.1.
|
|
132788
|
+
version: "1.1.9",
|
|
132789
132789
|
versionBase: getVersionBase(),
|
|
132790
|
-
buildTime: "2026-04-
|
|
132790
|
+
buildTime: "2026-04-07T13:39:54.752Z",
|
|
132791
132791
|
deploymentEnvironment: env4.detectDeploymentEnvironment(),
|
|
132792
132792
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
132793
132793
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -197374,7 +197374,7 @@ function getTelemetryAttributes() {
|
|
|
197374
197374
|
attributes["session.id"] = sessionId;
|
|
197375
197375
|
}
|
|
197376
197376
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
197377
|
-
attributes["app.version"] = "1.1.
|
|
197377
|
+
attributes["app.version"] = "1.1.9";
|
|
197378
197378
|
}
|
|
197379
197379
|
const oauthAccount = getOauthAccountInfo();
|
|
197380
197380
|
if (oauthAccount) {
|
|
@@ -229435,7 +229435,7 @@ function getInstallationEnv() {
|
|
|
229435
229435
|
return;
|
|
229436
229436
|
}
|
|
229437
229437
|
function getClaudeCodeVersion() {
|
|
229438
|
-
return "1.1.
|
|
229438
|
+
return "1.1.9";
|
|
229439
229439
|
}
|
|
229440
229440
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
229441
229441
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -235037,7 +235037,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
235037
235037
|
const client4 = new Client({
|
|
235038
235038
|
name: "claude-code",
|
|
235039
235039
|
title: "Claude Code",
|
|
235040
|
-
version: "1.1.
|
|
235040
|
+
version: "1.1.9",
|
|
235041
235041
|
description: "Anthropic's agentic coding tool",
|
|
235042
235042
|
websiteUrl: PRODUCT_URL
|
|
235043
235043
|
}, {
|
|
@@ -235390,7 +235390,7 @@ var init_client9 = __esm(() => {
|
|
|
235390
235390
|
const client4 = new Client({
|
|
235391
235391
|
name: "claude-code",
|
|
235392
235392
|
title: "Claude Code",
|
|
235393
|
-
version: "1.1.
|
|
235393
|
+
version: "1.1.9",
|
|
235394
235394
|
description: "Anthropic's agentic coding tool",
|
|
235395
235395
|
websiteUrl: PRODUCT_URL
|
|
235396
235396
|
}, {
|
|
@@ -258581,7 +258581,7 @@ var init_user = __esm(() => {
|
|
|
258581
258581
|
deviceId,
|
|
258582
258582
|
sessionId: getSessionId(),
|
|
258583
258583
|
email: getEmail(),
|
|
258584
|
-
appVersion: "1.1.
|
|
258584
|
+
appVersion: "1.1.9",
|
|
258585
258585
|
platform: getHostPlatformForAnalytics(),
|
|
258586
258586
|
organizationUuid,
|
|
258587
258587
|
accountUuid,
|
|
@@ -259905,7 +259905,7 @@ async function initializeBetaTracing(resource) {
|
|
|
259905
259905
|
});
|
|
259906
259906
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
259907
259907
|
setLoggerProvider(loggerProvider);
|
|
259908
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.1.
|
|
259908
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.1.9");
|
|
259909
259909
|
setEventLogger(eventLogger);
|
|
259910
259910
|
process.on("beforeExit", async () => {
|
|
259911
259911
|
await loggerProvider?.forceFlush();
|
|
@@ -259945,7 +259945,7 @@ async function initializeTelemetry() {
|
|
|
259945
259945
|
const platform3 = getPlatform();
|
|
259946
259946
|
const baseAttributes = {
|
|
259947
259947
|
[ATTR_SERVICE_NAME5]: "claude-code",
|
|
259948
|
-
[ATTR_SERVICE_VERSION5]: "1.1.
|
|
259948
|
+
[ATTR_SERVICE_VERSION5]: "1.1.9"
|
|
259949
259949
|
};
|
|
259950
259950
|
if (platform3 === "wsl") {
|
|
259951
259951
|
const wslVersion = getWslVersion();
|
|
@@ -259990,7 +259990,7 @@ async function initializeTelemetry() {
|
|
|
259990
259990
|
} catch {}
|
|
259991
259991
|
};
|
|
259992
259992
|
registerCleanup(shutdownTelemetry2);
|
|
259993
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", "1.1.
|
|
259993
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", "1.1.9");
|
|
259994
259994
|
}
|
|
259995
259995
|
const meterProvider = new MeterProvider5({
|
|
259996
259996
|
resource,
|
|
@@ -260010,7 +260010,7 @@ async function initializeTelemetry() {
|
|
|
260010
260010
|
});
|
|
260011
260011
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
260012
260012
|
setLoggerProvider(loggerProvider);
|
|
260013
|
-
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.1.
|
|
260013
|
+
const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.1.9");
|
|
260014
260014
|
setEventLogger(eventLogger);
|
|
260015
260015
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
260016
260016
|
process.on("beforeExit", async () => {
|
|
@@ -260072,7 +260072,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
260072
260072
|
}
|
|
260073
260073
|
};
|
|
260074
260074
|
registerCleanup(shutdownTelemetry);
|
|
260075
|
-
return meterProvider.getMeter("com.anthropic.claude_code", "1.1.
|
|
260075
|
+
return meterProvider.getMeter("com.anthropic.claude_code", "1.1.9");
|
|
260076
260076
|
}
|
|
260077
260077
|
async function flushTelemetry() {
|
|
260078
260078
|
const meterProvider = getMeterProvider();
|
|
@@ -261295,7 +261295,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
261295
261295
|
}
|
|
261296
261296
|
async function getDoctorDiagnostic() {
|
|
261297
261297
|
const installationType = await getCurrentInstallationType();
|
|
261298
|
-
const version = typeof MACRO !== "undefined" ? "1.1.
|
|
261298
|
+
const version = typeof MACRO !== "undefined" ? "1.1.9" : "unknown";
|
|
261299
261299
|
const installationPath = await getInstallationPath();
|
|
261300
261300
|
const invokedBinary = getInvokedBinary();
|
|
261301
261301
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -262236,8 +262236,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
262236
262236
|
const maxVersion = await getMaxVersion();
|
|
262237
262237
|
if (maxVersion && gt(version, maxVersion)) {
|
|
262238
262238
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version} to ${maxVersion}`);
|
|
262239
|
-
if (gte("1.1.
|
|
262240
|
-
logForDebugging(`Native installer: current version ${"1.1.
|
|
262239
|
+
if (gte("1.1.9", maxVersion)) {
|
|
262240
|
+
logForDebugging(`Native installer: current version ${"1.1.9"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
262241
262241
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
262242
262242
|
latency_ms: Date.now() - startTime,
|
|
262243
262243
|
max_version: maxVersion,
|
|
@@ -262248,7 +262248,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
262248
262248
|
version = maxVersion;
|
|
262249
262249
|
}
|
|
262250
262250
|
}
|
|
262251
|
-
if (!forceReinstall && version === "1.1.
|
|
262251
|
+
if (!forceReinstall && version === "1.1.9" && await versionIsAvailable(version) && await isPossibleLocalClawdBinary(executablePath)) {
|
|
262252
262252
|
logForDebugging(`Found ${version} at ${executablePath}, skipping install`);
|
|
262253
262253
|
logEvent("tengu_native_update_complete", {
|
|
262254
262254
|
latency_ms: Date.now() - startTime,
|
|
@@ -334468,7 +334468,7 @@ function getAnthropicEnvMetadata() {
|
|
|
334468
334468
|
function getBuildAgeMinutes() {
|
|
334469
334469
|
if (false)
|
|
334470
334470
|
;
|
|
334471
|
-
const buildTime = new Date("2026-04-
|
|
334471
|
+
const buildTime = new Date("2026-04-07T13:39:54.752Z").getTime();
|
|
334472
334472
|
if (isNaN(buildTime))
|
|
334473
334473
|
return;
|
|
334474
334474
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -358534,7 +358534,7 @@ function Feedback({
|
|
|
358534
358534
|
platform: env4.platform,
|
|
358535
358535
|
gitRepo: envInfo.isGit,
|
|
358536
358536
|
terminal: env4.terminal,
|
|
358537
|
-
version: "1.1.
|
|
358537
|
+
version: "1.1.9",
|
|
358538
358538
|
transcript: normalizeMessagesForAPI(messages),
|
|
358539
358539
|
errors: sanitizedErrors,
|
|
358540
358540
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -358726,7 +358726,7 @@ function Feedback({
|
|
|
358726
358726
|
", ",
|
|
358727
358727
|
env4.terminal,
|
|
358728
358728
|
", v",
|
|
358729
|
-
"1.1.
|
|
358729
|
+
"1.1.9"
|
|
358730
358730
|
]
|
|
358731
358731
|
}, undefined, true, undefined, this)
|
|
358732
358732
|
]
|
|
@@ -358832,7 +358832,7 @@ ${sanitizedDescription}
|
|
|
358832
358832
|
` + `**Environment Info**
|
|
358833
358833
|
` + `- Platform: ${env4.platform}
|
|
358834
358834
|
` + `- Terminal: ${env4.terminal}
|
|
358835
|
-
` + `- Version: ${"1.1.
|
|
358835
|
+
` + `- Version: ${"1.1.9"}
|
|
358836
358836
|
` + `- Feedback ID: ${feedbackId}
|
|
358837
358837
|
` + `
|
|
358838
358838
|
**Errors**
|
|
@@ -361945,7 +361945,7 @@ function buildPrimarySection() {
|
|
|
361945
361945
|
}, undefined, false, undefined, this);
|
|
361946
361946
|
return [{
|
|
361947
361947
|
label: "Version",
|
|
361948
|
-
value: "1.1.
|
|
361948
|
+
value: "1.1.9"
|
|
361949
361949
|
}, {
|
|
361950
361950
|
label: "Session name",
|
|
361951
361951
|
value: nameValue
|
|
@@ -363516,31 +363516,51 @@ function SimpleMenu({ items, isActive, onSelect, onCancel }) {
|
|
|
363516
363516
|
const VISIBLE = Math.min(7, items.length);
|
|
363517
363517
|
const [focusIdx, setFocusIdx] = import_react100.useState(0);
|
|
363518
363518
|
const [fromIdx, setFromIdx] = import_react100.useState(0);
|
|
363519
|
-
|
|
363519
|
+
const stateRef = import_react100.useRef({ focusIdx: 0, fromIdx: 0, items, done: false });
|
|
363520
|
+
stateRef.current.items = items;
|
|
363521
|
+
import_react100.useEffect(() => {
|
|
363520
363522
|
if (!isActive)
|
|
363521
363523
|
return;
|
|
363522
|
-
|
|
363523
|
-
|
|
363524
|
-
|
|
363525
|
-
|
|
363526
|
-
|
|
363527
|
-
|
|
363528
|
-
|
|
363529
|
-
|
|
363530
|
-
|
|
363531
|
-
const next = Math.
|
|
363532
|
-
|
|
363533
|
-
|
|
363534
|
-
|
|
363535
|
-
|
|
363536
|
-
|
|
363537
|
-
|
|
363538
|
-
|
|
363539
|
-
|
|
363540
|
-
|
|
363541
|
-
|
|
363542
|
-
|
|
363543
|
-
|
|
363524
|
+
stateRef.current.done = false;
|
|
363525
|
+
if (!process.stdin.readableFlowing) {
|
|
363526
|
+
process.stdin.resume();
|
|
363527
|
+
}
|
|
363528
|
+
const onData = (chunk) => {
|
|
363529
|
+
const str2 = typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
363530
|
+
const s = stateRef.current;
|
|
363531
|
+
const visible2 = Math.min(VISIBLE, s.items.length);
|
|
363532
|
+
if (str2 === "\x1B[A" || str2 === "\x1BOA" || str2 === "k") {
|
|
363533
|
+
const next = Math.max(0, s.focusIdx - 1);
|
|
363534
|
+
const nextFrom = next < s.fromIdx ? next : s.fromIdx;
|
|
363535
|
+
stateRef.current.focusIdx = next;
|
|
363536
|
+
stateRef.current.fromIdx = nextFrom;
|
|
363537
|
+
setFocusIdx(next);
|
|
363538
|
+
setFromIdx(nextFrom);
|
|
363539
|
+
} else if (str2 === "\x1B[B" || str2 === "\x1BOB" || str2 === "j") {
|
|
363540
|
+
const next = Math.min(s.items.length - 1, s.focusIdx + 1);
|
|
363541
|
+
const nextFrom = next >= s.fromIdx + visible2 ? next - visible2 + 1 : s.fromIdx;
|
|
363542
|
+
stateRef.current.focusIdx = next;
|
|
363543
|
+
stateRef.current.fromIdx = nextFrom;
|
|
363544
|
+
setFocusIdx(next);
|
|
363545
|
+
setFromIdx(nextFrom);
|
|
363546
|
+
} else if (str2 === "\r" || str2 === `
|
|
363547
|
+
` || str2 === `\r
|
|
363548
|
+
`) {
|
|
363549
|
+
if (s.done)
|
|
363550
|
+
return;
|
|
363551
|
+
stateRef.current.done = true;
|
|
363552
|
+
const item = s.items[s.focusIdx];
|
|
363553
|
+
if (item)
|
|
363554
|
+
onSelect(item.value);
|
|
363555
|
+
} else if (str2 === "\x1B" || str2 === "\x1B\x1B") {
|
|
363556
|
+
onCancel?.();
|
|
363557
|
+
}
|
|
363558
|
+
};
|
|
363559
|
+
process.stdin.on("data", onData);
|
|
363560
|
+
return () => {
|
|
363561
|
+
process.stdin.off("data", onData);
|
|
363562
|
+
};
|
|
363563
|
+
}, [isActive, onSelect, onCancel]);
|
|
363544
363564
|
const visible = items.slice(fromIdx, fromIdx + VISIBLE);
|
|
363545
363565
|
const showScrollUp = fromIdx > 0;
|
|
363546
363566
|
const showScrollDown = fromIdx + VISIBLE < items.length;
|
|
@@ -363631,25 +363651,45 @@ function LocalBackendSetup({
|
|
|
363631
363651
|
const nextValue = step === "baseUrl" ? baseUrl : step === "model" ? model : apiKey;
|
|
363632
363652
|
setCursorOffset(nextValue.length);
|
|
363633
363653
|
}, [step, baseUrl, model, apiKey]);
|
|
363634
|
-
|
|
363635
|
-
|
|
363636
|
-
|
|
363637
|
-
|
|
363638
|
-
|
|
363639
|
-
|
|
363640
|
-
|
|
363641
|
-
|
|
363642
|
-
if (key.escape) {
|
|
363643
|
-
modelScanAbortRef.current?.abort();
|
|
363644
|
-
goBack();
|
|
363645
|
-
} else if (key.return) {
|
|
363646
|
-
modelScanAbortRef.current?.abort();
|
|
363647
|
-
setScanError("Model scan skipped. Enter the model name manually.");
|
|
363648
|
-
setAvailableModels([]);
|
|
363649
|
-
setStep("model");
|
|
363650
|
-
}
|
|
363654
|
+
const scanStepActive = step === "networkScan" || step === "scanningModels";
|
|
363655
|
+
const scanStepRef = import_react100.useRef(step);
|
|
363656
|
+
scanStepRef.current = step;
|
|
363657
|
+
import_react100.useEffect(() => {
|
|
363658
|
+
if (!scanStepActive)
|
|
363659
|
+
return;
|
|
363660
|
+
if (!process.stdin.readableFlowing) {
|
|
363661
|
+
process.stdin.resume();
|
|
363651
363662
|
}
|
|
363652
|
-
|
|
363663
|
+
const onData = (chunk) => {
|
|
363664
|
+
const str2 = typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
363665
|
+
const current = scanStepRef.current;
|
|
363666
|
+
if (current === "networkScan") {
|
|
363667
|
+
if (str2 === "\x1B" || str2 === "\x1B\x1B" || str2 === "\r" || str2 === `
|
|
363668
|
+
` || str2 === `\r
|
|
363669
|
+
`) {
|
|
363670
|
+
networkAbortRef.current?.abort();
|
|
363671
|
+
setDiscoveredEndpoints(discoveredSnapshotRef.current);
|
|
363672
|
+
setStep("selectEndpoint");
|
|
363673
|
+
}
|
|
363674
|
+
} else if (current === "scanningModels") {
|
|
363675
|
+
if (str2 === "\x1B" || str2 === "\x1B\x1B") {
|
|
363676
|
+
modelScanAbortRef.current?.abort();
|
|
363677
|
+
goBack();
|
|
363678
|
+
} else if (str2 === "\r" || str2 === `
|
|
363679
|
+
` || str2 === `\r
|
|
363680
|
+
`) {
|
|
363681
|
+
modelScanAbortRef.current?.abort();
|
|
363682
|
+
setScanError("Model scan skipped. Enter the model name manually.");
|
|
363683
|
+
setAvailableModels([]);
|
|
363684
|
+
setStep("model");
|
|
363685
|
+
}
|
|
363686
|
+
}
|
|
363687
|
+
};
|
|
363688
|
+
process.stdin.on("data", onData);
|
|
363689
|
+
return () => {
|
|
363690
|
+
process.stdin.off("data", onData);
|
|
363691
|
+
};
|
|
363692
|
+
}, [scanStepActive]);
|
|
363653
363693
|
function goBack() {
|
|
363654
363694
|
setError(null);
|
|
363655
363695
|
switch (step) {
|
|
@@ -366555,7 +366595,7 @@ function Config({
|
|
|
366555
366595
|
}
|
|
366556
366596
|
}, undefined, false, undefined, this)
|
|
366557
366597
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
|
|
366558
|
-
currentVersion: "1.1.
|
|
366598
|
+
currentVersion: "1.1.9",
|
|
366559
366599
|
onChoice: (choice) => {
|
|
366560
366600
|
setShowSubmenu(null);
|
|
366561
366601
|
setTabsHidden(false);
|
|
@@ -366567,7 +366607,7 @@ function Config({
|
|
|
366567
366607
|
autoUpdatesChannel: "stable"
|
|
366568
366608
|
};
|
|
366569
366609
|
if (choice === "stay") {
|
|
366570
|
-
newSettings.minimumVersion = "1.1.
|
|
366610
|
+
newSettings.minimumVersion = "1.1.9";
|
|
366571
366611
|
}
|
|
366572
366612
|
updateSettingsForSource("userSettings", newSettings);
|
|
366573
366613
|
setSettingsData((prev_27) => ({
|
|
@@ -376299,7 +376339,7 @@ function HelpV2(t0) {
|
|
|
376299
376339
|
let t6;
|
|
376300
376340
|
if ($2[31] !== tabs) {
|
|
376301
376341
|
t6 = /* @__PURE__ */ jsx_dev_runtime214.jsxDEV(Tabs, {
|
|
376302
|
-
title: `localclawd v${"1.1.
|
|
376342
|
+
title: `localclawd v${"1.1.9"}`,
|
|
376303
376343
|
color: "professionalBlue",
|
|
376304
376344
|
defaultTab: "general",
|
|
376305
376345
|
children: tabs
|
|
@@ -400457,7 +400497,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
400457
400497
|
return [];
|
|
400458
400498
|
}
|
|
400459
400499
|
}
|
|
400460
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.1.
|
|
400500
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.1.9") {
|
|
400461
400501
|
if (process.env.USER_TYPE === "ant") {
|
|
400462
400502
|
const changelog = MACRO.VERSION_CHANGELOG;
|
|
400463
400503
|
if (changelog) {
|
|
@@ -400484,7 +400524,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.1.8") {
|
|
|
400484
400524
|
releaseNotes
|
|
400485
400525
|
};
|
|
400486
400526
|
}
|
|
400487
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.1.
|
|
400527
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.1.9") {
|
|
400488
400528
|
if (process.env.USER_TYPE === "ant") {
|
|
400489
400529
|
const changelog = MACRO.VERSION_CHANGELOG;
|
|
400490
400530
|
if (changelog) {
|
|
@@ -401651,7 +401691,7 @@ function getRecentActivitySync() {
|
|
|
401651
401691
|
return cachedActivity;
|
|
401652
401692
|
}
|
|
401653
401693
|
function getLogoDisplayData() {
|
|
401654
|
-
const version = process.env.DEMO_VERSION ?? "1.1.
|
|
401694
|
+
const version = process.env.DEMO_VERSION ?? "1.1.9";
|
|
401655
401695
|
const serverUrl = getDirectConnectServerUrl();
|
|
401656
401696
|
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
401657
401697
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -402925,7 +402965,7 @@ function LogoV2() {
|
|
|
402925
402965
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
402926
402966
|
t2 = () => {
|
|
402927
402967
|
const currentConfig = getGlobalConfig();
|
|
402928
|
-
if (currentConfig.lastReleaseNotesSeen === "1.1.
|
|
402968
|
+
if (currentConfig.lastReleaseNotesSeen === "1.1.9") {
|
|
402929
402969
|
return;
|
|
402930
402970
|
}
|
|
402931
402971
|
saveGlobalConfig(_temp327);
|
|
@@ -403601,12 +403641,12 @@ function LogoV2() {
|
|
|
403601
403641
|
return t41;
|
|
403602
403642
|
}
|
|
403603
403643
|
function _temp327(current) {
|
|
403604
|
-
if (current.lastReleaseNotesSeen === "1.1.
|
|
403644
|
+
if (current.lastReleaseNotesSeen === "1.1.9") {
|
|
403605
403645
|
return current;
|
|
403606
403646
|
}
|
|
403607
403647
|
return {
|
|
403608
403648
|
...current,
|
|
403609
|
-
lastReleaseNotesSeen: "1.1.
|
|
403649
|
+
lastReleaseNotesSeen: "1.1.9"
|
|
403610
403650
|
};
|
|
403611
403651
|
}
|
|
403612
403652
|
function _temp245(s_0) {
|
|
@@ -429808,7 +429848,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
429808
429848
|
smapsRollup,
|
|
429809
429849
|
platform: process.platform,
|
|
429810
429850
|
nodeVersion: process.version,
|
|
429811
|
-
ccVersion: "1.1.
|
|
429851
|
+
ccVersion: "1.1.9"
|
|
429812
429852
|
};
|
|
429813
429853
|
}
|
|
429814
429854
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -430393,7 +430433,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
430393
430433
|
var call64 = async () => {
|
|
430394
430434
|
return {
|
|
430395
430435
|
type: "text",
|
|
430396
|
-
value: `${"1.1.
|
|
430436
|
+
value: `${"1.1.9"} (built ${"2026-04-07T13:39:54.752Z"})`
|
|
430397
430437
|
};
|
|
430398
430438
|
}, version, version_default;
|
|
430399
430439
|
var init_version = __esm(() => {
|
|
@@ -439329,7 +439369,7 @@ function generateHtmlReport(data, insights) {
|
|
|
439329
439369
|
</html>`;
|
|
439330
439370
|
}
|
|
439331
439371
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
439332
|
-
const version2 = typeof MACRO !== "undefined" ? "1.1.
|
|
439372
|
+
const version2 = typeof MACRO !== "undefined" ? "1.1.9" : "unknown";
|
|
439333
439373
|
const remote_hosts_collected = remoteStats?.hosts.filter((h) => h.sessionCount > 0).map((h) => h.name);
|
|
439334
439374
|
const facets_summary = {
|
|
439335
439375
|
total: facets.size,
|
|
@@ -443496,7 +443536,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
443496
443536
|
init_settings2();
|
|
443497
443537
|
init_slowOperations();
|
|
443498
443538
|
init_uuid();
|
|
443499
|
-
VERSION6 = typeof MACRO !== "undefined" ? "1.1.
|
|
443539
|
+
VERSION6 = typeof MACRO !== "undefined" ? "1.1.9" : "unknown";
|
|
443500
443540
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
443501
443541
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
443502
443542
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -444698,7 +444738,7 @@ var init_filesystem = __esm(() => {
|
|
|
444698
444738
|
});
|
|
444699
444739
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
444700
444740
|
const nonce = randomBytes19(16).toString("hex");
|
|
444701
|
-
return join130(getClaudeTempDir(), "bundled-skills", "1.1.
|
|
444741
|
+
return join130(getClaudeTempDir(), "bundled-skills", "1.1.9", nonce);
|
|
444702
444742
|
});
|
|
444703
444743
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
444704
444744
|
});
|
|
@@ -450697,7 +450737,7 @@ function computeFingerprint(messageText, version2) {
|
|
|
450697
450737
|
}
|
|
450698
450738
|
function computeFingerprintFromMessages(messages) {
|
|
450699
450739
|
const firstMessageText = extractFirstMessageText(messages);
|
|
450700
|
-
return computeFingerprint(firstMessageText, "1.1.
|
|
450740
|
+
return computeFingerprint(firstMessageText, "1.1.9");
|
|
450701
450741
|
}
|
|
450702
450742
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
450703
450743
|
var init_fingerprint = () => {};
|
|
@@ -452552,7 +452592,7 @@ async function sideQuery(opts) {
|
|
|
452552
452592
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
452553
452593
|
}
|
|
452554
452594
|
const messageText = extractFirstUserMessageText(messages);
|
|
452555
|
-
const fingerprint = computeFingerprint(messageText, "1.1.
|
|
452595
|
+
const fingerprint = computeFingerprint(messageText, "1.1.9");
|
|
452556
452596
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
452557
452597
|
const systemBlocks = [
|
|
452558
452598
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -457350,7 +457390,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
457350
457390
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
457351
457391
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
457352
457392
|
betas: getSdkBetas(),
|
|
457353
|
-
claude_code_version: "1.1.
|
|
457393
|
+
claude_code_version: "1.1.9",
|
|
457354
457394
|
output_style: outputStyle2,
|
|
457355
457395
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
457356
457396
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -471929,7 +471969,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
471929
471969
|
function getSemverPart(version2) {
|
|
471930
471970
|
return `${import_semver12.major(version2, { loose: true })}.${import_semver12.minor(version2, { loose: true })}.${import_semver12.patch(version2, { loose: true })}`;
|
|
471931
471971
|
}
|
|
471932
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.1.
|
|
471972
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.1.9") {
|
|
471933
471973
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react228.useState(() => getSemverPart(initialVersion));
|
|
471934
471974
|
if (!updatedVersion) {
|
|
471935
471975
|
return null;
|
|
@@ -471969,7 +472009,7 @@ function AutoUpdater({
|
|
|
471969
472009
|
return;
|
|
471970
472010
|
}
|
|
471971
472011
|
if (false) {}
|
|
471972
|
-
const currentVersion = "1.1.
|
|
472012
|
+
const currentVersion = "1.1.9";
|
|
471973
472013
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
471974
472014
|
let latestVersion = await getLatestVersion(channel);
|
|
471975
472015
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -472180,12 +472220,12 @@ function NativeAutoUpdater({
|
|
|
472180
472220
|
logEvent("tengu_native_auto_updater_start", {});
|
|
472181
472221
|
try {
|
|
472182
472222
|
const maxVersion = await getMaxVersion();
|
|
472183
|
-
if (maxVersion && gt("1.1.
|
|
472223
|
+
if (maxVersion && gt("1.1.9", maxVersion)) {
|
|
472184
472224
|
const msg = await getMaxVersionMessage();
|
|
472185
472225
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
472186
472226
|
}
|
|
472187
472227
|
const result = await installLatest(channel);
|
|
472188
|
-
const currentVersion = "1.1.
|
|
472228
|
+
const currentVersion = "1.1.9";
|
|
472189
472229
|
const latencyMs = Date.now() - startTime;
|
|
472190
472230
|
if (result.lockFailed) {
|
|
472191
472231
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -472320,17 +472360,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
472320
472360
|
const maxVersion = await getMaxVersion();
|
|
472321
472361
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
472322
472362
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
472323
|
-
if (gte("1.1.
|
|
472324
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.1.
|
|
472363
|
+
if (gte("1.1.9", maxVersion)) {
|
|
472364
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.1.9"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
472325
472365
|
setUpdateAvailable(false);
|
|
472326
472366
|
return;
|
|
472327
472367
|
}
|
|
472328
472368
|
latest = maxVersion;
|
|
472329
472369
|
}
|
|
472330
|
-
const hasUpdate = latest && !gte("1.1.
|
|
472370
|
+
const hasUpdate = latest && !gte("1.1.9", latest) && !shouldSkipVersion(latest);
|
|
472331
472371
|
setUpdateAvailable(!!hasUpdate);
|
|
472332
472372
|
if (hasUpdate) {
|
|
472333
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.1.
|
|
472373
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.1.9"} -> ${latest}`);
|
|
472334
472374
|
}
|
|
472335
472375
|
};
|
|
472336
472376
|
$2[0] = t1;
|
|
@@ -472364,7 +472404,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
472364
472404
|
wrap: "truncate",
|
|
472365
472405
|
children: [
|
|
472366
472406
|
"currentVersion: ",
|
|
472367
|
-
"1.1.
|
|
472407
|
+
"1.1.9"
|
|
472368
472408
|
]
|
|
472369
472409
|
}, undefined, true, undefined, this);
|
|
472370
472410
|
$2[3] = verbose;
|
|
@@ -479922,7 +479962,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
479922
479962
|
project_dir: getOriginalCwd(),
|
|
479923
479963
|
added_dirs: addedDirs
|
|
479924
479964
|
},
|
|
479925
|
-
version: "1.1.
|
|
479965
|
+
version: "1.1.9",
|
|
479926
479966
|
output_style: {
|
|
479927
479967
|
name: outputStyleName
|
|
479928
479968
|
},
|
|
@@ -491482,7 +491522,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
491482
491522
|
} catch {}
|
|
491483
491523
|
const data = {
|
|
491484
491524
|
trigger,
|
|
491485
|
-
version: "1.1.
|
|
491525
|
+
version: "1.1.9",
|
|
491486
491526
|
platform: process.platform,
|
|
491487
491527
|
transcript,
|
|
491488
491528
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -503071,7 +503111,7 @@ function WelcomeV2() {
|
|
|
503071
503111
|
dimColor: true,
|
|
503072
503112
|
children: [
|
|
503073
503113
|
"v",
|
|
503074
|
-
"1.1.
|
|
503114
|
+
"1.1.9"
|
|
503075
503115
|
]
|
|
503076
503116
|
}, undefined, true, undefined, this)
|
|
503077
503117
|
]
|
|
@@ -503106,15 +503146,38 @@ function StartPage({ currentConfig, onDone }) {
|
|
|
503106
503146
|
const hasSavedConfig = hasSavedBackendConfig(currentConfig);
|
|
503107
503147
|
const options = hasSavedConfig ? CONTINUE_OPTIONS : SETUP_OPTIONS;
|
|
503108
503148
|
const [focusIdx, setFocusIdx] = import_react321.useState(0);
|
|
503109
|
-
|
|
503110
|
-
|
|
503111
|
-
|
|
503112
|
-
|
|
503113
|
-
|
|
503114
|
-
} else if (key.return) {
|
|
503115
|
-
onDone(options[focusIdx].value);
|
|
503149
|
+
const stateRef = import_react321.useRef({ focusIdx: 0, done: false, options });
|
|
503150
|
+
stateRef.current.options = options;
|
|
503151
|
+
import_react321.useEffect(() => {
|
|
503152
|
+
if (!process.stdin.readableFlowing) {
|
|
503153
|
+
process.stdin.resume();
|
|
503116
503154
|
}
|
|
503117
|
-
|
|
503155
|
+
const onData = (chunk2) => {
|
|
503156
|
+
const str2 = typeof chunk2 === "string" ? chunk2 : chunk2.toString("utf8");
|
|
503157
|
+
if (str2 === "\x1B[A" || str2 === "\x1BOA") {
|
|
503158
|
+
const next = (stateRef.current.focusIdx - 1 + stateRef.current.options.length) % stateRef.current.options.length;
|
|
503159
|
+
stateRef.current.focusIdx = next;
|
|
503160
|
+
setFocusIdx(next);
|
|
503161
|
+
} else if (str2 === "\x1B[B" || str2 === "\x1BOB") {
|
|
503162
|
+
const next = (stateRef.current.focusIdx + 1) % stateRef.current.options.length;
|
|
503163
|
+
stateRef.current.focusIdx = next;
|
|
503164
|
+
setFocusIdx(next);
|
|
503165
|
+
} else if (str2 === "\r" || str2 === `
|
|
503166
|
+
` || str2 === `\r
|
|
503167
|
+
`) {
|
|
503168
|
+
if (stateRef.current.done)
|
|
503169
|
+
return;
|
|
503170
|
+
stateRef.current.done = true;
|
|
503171
|
+
const chosen = stateRef.current.options[stateRef.current.focusIdx];
|
|
503172
|
+
if (chosen)
|
|
503173
|
+
onDone(chosen.value);
|
|
503174
|
+
}
|
|
503175
|
+
};
|
|
503176
|
+
process.stdin.on("data", onData);
|
|
503177
|
+
return () => {
|
|
503178
|
+
process.stdin.off("data", onData);
|
|
503179
|
+
};
|
|
503180
|
+
}, [onDone]);
|
|
503118
503181
|
return /* @__PURE__ */ jsx_dev_runtime483.jsxDEV(ThemedBox_default, {
|
|
503119
503182
|
flexDirection: "column",
|
|
503120
503183
|
gap: 1,
|
|
@@ -503389,27 +503452,125 @@ var exports_Onboarding = {};
|
|
|
503389
503452
|
__export(exports_Onboarding, {
|
|
503390
503453
|
Onboarding: () => Onboarding
|
|
503391
503454
|
});
|
|
503455
|
+
function SimpleMenu2({ items, onSelect, onCancel }) {
|
|
503456
|
+
const VISIBLE = Math.min(7, items.length);
|
|
503457
|
+
const [focusIdx, setFocusIdx] = import_react324.useState(0);
|
|
503458
|
+
const [fromIdx, setFromIdx] = import_react324.useState(0);
|
|
503459
|
+
const stateRef = import_react324.useRef({ focusIdx: 0, fromIdx: 0, items, done: false });
|
|
503460
|
+
stateRef.current.items = items;
|
|
503461
|
+
import_react324.useEffect(() => {
|
|
503462
|
+
if (!process.stdin.readableFlowing)
|
|
503463
|
+
process.stdin.resume();
|
|
503464
|
+
const onData = (chunk2) => {
|
|
503465
|
+
const str2 = typeof chunk2 === "string" ? chunk2 : chunk2.toString("utf8");
|
|
503466
|
+
const s = stateRef.current;
|
|
503467
|
+
const vis = Math.min(VISIBLE, s.items.length);
|
|
503468
|
+
if (str2 === "\x1B[A" || str2 === "\x1BOA") {
|
|
503469
|
+
const next = Math.max(0, s.focusIdx - 1);
|
|
503470
|
+
const nextFrom = next < s.fromIdx ? next : s.fromIdx;
|
|
503471
|
+
stateRef.current.focusIdx = next;
|
|
503472
|
+
stateRef.current.fromIdx = nextFrom;
|
|
503473
|
+
setFocusIdx(next);
|
|
503474
|
+
setFromIdx(nextFrom);
|
|
503475
|
+
} else if (str2 === "\x1B[B" || str2 === "\x1BOB") {
|
|
503476
|
+
const next = Math.min(s.items.length - 1, s.focusIdx + 1);
|
|
503477
|
+
const nextFrom = next >= s.fromIdx + vis ? next - vis + 1 : s.fromIdx;
|
|
503478
|
+
stateRef.current.focusIdx = next;
|
|
503479
|
+
stateRef.current.fromIdx = nextFrom;
|
|
503480
|
+
setFocusIdx(next);
|
|
503481
|
+
setFromIdx(nextFrom);
|
|
503482
|
+
} else if (str2 === "\r" || str2 === `
|
|
503483
|
+
` || str2 === `\r
|
|
503484
|
+
`) {
|
|
503485
|
+
if (s.done)
|
|
503486
|
+
return;
|
|
503487
|
+
stateRef.current.done = true;
|
|
503488
|
+
const item = s.items[s.focusIdx];
|
|
503489
|
+
if (item)
|
|
503490
|
+
onSelect(item.value);
|
|
503491
|
+
} else if (str2 === "\x1B" || str2 === "\x1B\x1B") {
|
|
503492
|
+
onCancel?.();
|
|
503493
|
+
}
|
|
503494
|
+
};
|
|
503495
|
+
process.stdin.on("data", onData);
|
|
503496
|
+
return () => {
|
|
503497
|
+
process.stdin.off("data", onData);
|
|
503498
|
+
};
|
|
503499
|
+
}, [onSelect, onCancel]);
|
|
503500
|
+
const visible = items.slice(fromIdx, fromIdx + VISIBLE);
|
|
503501
|
+
return /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedBox_default, {
|
|
503502
|
+
flexDirection: "column",
|
|
503503
|
+
children: [
|
|
503504
|
+
fromIdx > 0 && /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503505
|
+
dimColor: true,
|
|
503506
|
+
children: " ↑ more"
|
|
503507
|
+
}, undefined, false, undefined, this),
|
|
503508
|
+
visible.map((item, i2) => {
|
|
503509
|
+
const absIdx = fromIdx + i2;
|
|
503510
|
+
const focused = absIdx === focusIdx;
|
|
503511
|
+
return /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedBox_default, {
|
|
503512
|
+
gap: 1,
|
|
503513
|
+
children: [
|
|
503514
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503515
|
+
color: "#6366f1",
|
|
503516
|
+
children: focused ? "▶" : " "
|
|
503517
|
+
}, undefined, false, undefined, this),
|
|
503518
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503519
|
+
bold: focused,
|
|
503520
|
+
color: focused ? "#818cf8" : undefined,
|
|
503521
|
+
children: item.label
|
|
503522
|
+
}, undefined, false, undefined, this)
|
|
503523
|
+
]
|
|
503524
|
+
}, String(item.value), true, undefined, this);
|
|
503525
|
+
}),
|
|
503526
|
+
fromIdx + VISIBLE < items.length && /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503527
|
+
dimColor: true,
|
|
503528
|
+
children: " ↓ more"
|
|
503529
|
+
}, undefined, false, undefined, this)
|
|
503530
|
+
]
|
|
503531
|
+
}, undefined, true, undefined, this);
|
|
503532
|
+
}
|
|
503533
|
+
function PressEnterToContinue2({ onContinue }) {
|
|
503534
|
+
const doneRef = import_react324.useRef(false);
|
|
503535
|
+
import_react324.useEffect(() => {
|
|
503536
|
+
if (!process.stdin.readableFlowing)
|
|
503537
|
+
process.stdin.resume();
|
|
503538
|
+
const onData = (chunk2) => {
|
|
503539
|
+
const str2 = typeof chunk2 === "string" ? chunk2 : chunk2.toString("utf8");
|
|
503540
|
+
if ((str2 === "\r" || str2 === `
|
|
503541
|
+
` || str2 === `\r
|
|
503542
|
+
`) && !doneRef.current) {
|
|
503543
|
+
doneRef.current = true;
|
|
503544
|
+
onContinue();
|
|
503545
|
+
}
|
|
503546
|
+
};
|
|
503547
|
+
process.stdin.on("data", onData);
|
|
503548
|
+
return () => {
|
|
503549
|
+
process.stdin.off("data", onData);
|
|
503550
|
+
};
|
|
503551
|
+
}, [onContinue]);
|
|
503552
|
+
return /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503553
|
+
color: "permission",
|
|
503554
|
+
children: [
|
|
503555
|
+
"Press ",
|
|
503556
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503557
|
+
bold: true,
|
|
503558
|
+
children: "Enter"
|
|
503559
|
+
}, undefined, false, undefined, this),
|
|
503560
|
+
" to continue…"
|
|
503561
|
+
]
|
|
503562
|
+
}, undefined, true, undefined, this);
|
|
503563
|
+
}
|
|
503392
503564
|
function Onboarding({ onDone, showWelcome = true }) {
|
|
503393
503565
|
const [currentStepIndex, setCurrentStepIndex] = import_react324.useState(0);
|
|
503394
503566
|
const [theme2, setTheme] = useTheme();
|
|
503395
|
-
const exitState = useExitOnCtrlCDWithKeybindings();
|
|
503396
|
-
import_react324.useEffect(() => {
|
|
503397
|
-
logEvent("tengu_began_setup", {
|
|
503398
|
-
oauthEnabled: false
|
|
503399
|
-
});
|
|
503400
|
-
}, []);
|
|
503401
503567
|
const goToNextStep = import_react324.useCallback(() => {
|
|
503402
|
-
setCurrentStepIndex((
|
|
503403
|
-
if (
|
|
503568
|
+
setCurrentStepIndex((current) => {
|
|
503569
|
+
if (current >= steps.length - 1) {
|
|
503404
503570
|
onDone();
|
|
503405
|
-
return
|
|
503571
|
+
return current;
|
|
503406
503572
|
}
|
|
503407
|
-
|
|
503408
|
-
logEvent("tengu_onboarding_step", {
|
|
503409
|
-
oauthEnabled: false,
|
|
503410
|
-
stepId: steps[nextIndex]?.id
|
|
503411
|
-
});
|
|
503412
|
-
return nextIndex;
|
|
503573
|
+
return current + 1;
|
|
503413
503574
|
});
|
|
503414
503575
|
}, [onDone]);
|
|
503415
503576
|
const handleThemeSelection = import_react324.useCallback((newTheme) => {
|
|
@@ -503431,18 +503592,42 @@ function Onboarding({ onDone, showWelcome = true }) {
|
|
|
503431
503592
|
}
|
|
503432
503593
|
goToNextStep();
|
|
503433
503594
|
}, [goToNextStep]);
|
|
503595
|
+
const themeItems = THEME_SETTINGS.map((s) => ({
|
|
503596
|
+
label: s === "auto" ? "Auto (follow system)" : s,
|
|
503597
|
+
value: s
|
|
503598
|
+
}));
|
|
503599
|
+
const compactItems = [
|
|
503600
|
+
{
|
|
503601
|
+
label: `${formatCompactContextWindowOption(undefined)} (recommended)`,
|
|
503602
|
+
value: "default"
|
|
503603
|
+
},
|
|
503604
|
+
...COMPACT_CONTEXT_WINDOW_CHOICES.map((tokens) => ({
|
|
503605
|
+
label: formatCompactContextWindowOption(tokens),
|
|
503606
|
+
value: String(tokens)
|
|
503607
|
+
}))
|
|
503608
|
+
];
|
|
503434
503609
|
const steps = import_react324.useMemo(() => {
|
|
503435
503610
|
const config2 = getGlobalConfig();
|
|
503436
503611
|
const themeStep = /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedBox_default, {
|
|
503437
|
-
|
|
503438
|
-
|
|
503439
|
-
|
|
503440
|
-
|
|
503441
|
-
|
|
503442
|
-
|
|
503443
|
-
|
|
503444
|
-
|
|
503445
|
-
|
|
503612
|
+
flexDirection: "column",
|
|
503613
|
+
gap: 1,
|
|
503614
|
+
paddingLeft: 1,
|
|
503615
|
+
children: [
|
|
503616
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503617
|
+
bold: true,
|
|
503618
|
+
children: "Choose a theme"
|
|
503619
|
+
}, undefined, false, undefined, this),
|
|
503620
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(SimpleMenu2, {
|
|
503621
|
+
items: themeItems,
|
|
503622
|
+
onSelect: handleThemeSelection,
|
|
503623
|
+
onCancel: goToNextStep
|
|
503624
|
+
}, undefined, false, undefined, this),
|
|
503625
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503626
|
+
dimColor: true,
|
|
503627
|
+
children: "Change later with /theme"
|
|
503628
|
+
}, undefined, false, undefined, this)
|
|
503629
|
+
]
|
|
503630
|
+
}, undefined, true, undefined, this);
|
|
503446
503631
|
const compactContextStep = /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedBox_default, {
|
|
503447
503632
|
flexDirection: "column",
|
|
503448
503633
|
gap: 1,
|
|
@@ -503456,32 +503641,20 @@ function Onboarding({ onDone, showWelcome = true }) {
|
|
|
503456
503641
|
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503457
503642
|
dimColor: true,
|
|
503458
503643
|
wrap: "wrap",
|
|
503459
|
-
children: "localclawd can compact earlier than the model's full advertised window.
|
|
503644
|
+
children: "localclawd can compact earlier than the model's full advertised window. Useful for local models that degrade before hitting their limit."
|
|
503460
503645
|
}, undefined, false, undefined, this),
|
|
503461
|
-
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(
|
|
503462
|
-
|
|
503463
|
-
|
|
503464
|
-
label: `${formatCompactContextWindowOption(undefined)} (recommended)`,
|
|
503465
|
-
value: "default"
|
|
503466
|
-
},
|
|
503467
|
-
...COMPACT_CONTEXT_WINDOW_CHOICES.map((tokens) => ({
|
|
503468
|
-
label: formatCompactContextWindowOption(tokens),
|
|
503469
|
-
value: String(tokens)
|
|
503470
|
-
}))
|
|
503471
|
-
],
|
|
503472
|
-
onChange: (value) => {
|
|
503646
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(SimpleMenu2, {
|
|
503647
|
+
items: compactItems,
|
|
503648
|
+
onSelect: (value) => {
|
|
503473
503649
|
const compactContextWindowTokens = value === "default" ? undefined : parseInt(value, 10);
|
|
503474
|
-
saveGlobalConfig((current) => ({
|
|
503475
|
-
...current,
|
|
503476
|
-
compactContextWindowTokens
|
|
503477
|
-
}));
|
|
503650
|
+
saveGlobalConfig((current) => ({ ...current, compactContextWindowTokens }));
|
|
503478
503651
|
goToNextStep();
|
|
503479
503652
|
},
|
|
503480
503653
|
onCancel: goToNextStep
|
|
503481
503654
|
}, undefined, false, undefined, this),
|
|
503482
503655
|
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503483
503656
|
dimColor: true,
|
|
503484
|
-
children: "Change
|
|
503657
|
+
children: "Change later in /config under Compact context window."
|
|
503485
503658
|
}, undefined, false, undefined, this)
|
|
503486
503659
|
]
|
|
503487
503660
|
}, undefined, true, undefined, this);
|
|
@@ -503495,7 +503668,7 @@ function Onboarding({ onDone, showWelcome = true }) {
|
|
|
503495
503668
|
onComplete: handleLocalBackendSetup,
|
|
503496
503669
|
onCancel: goToNextStep,
|
|
503497
503670
|
title: "Choose your local backend",
|
|
503498
|
-
description: "Set the OpenAI-compatible endpoint and model localclawd should use
|
|
503671
|
+
description: "Set the OpenAI-compatible endpoint and model localclawd should use. You can point it at vLLM, Ollama, or any compatible host.",
|
|
503499
503672
|
showSaveGloballyOption: true
|
|
503500
503673
|
}, undefined, false, undefined, this);
|
|
503501
503674
|
const securityStep = /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedBox_default, {
|
|
@@ -503521,46 +503694,37 @@ function Onboarding({ onDone, showWelcome = true }) {
|
|
|
503521
503694
|
dimColor: true,
|
|
503522
503695
|
wrap: "wrap",
|
|
503523
503696
|
children: [
|
|
503524
|
-
"
|
|
503525
|
-
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(Newline, {}, undefined, false, undefined, this),
|
|
503526
|
-
"running code.",
|
|
503697
|
+
"Always review responses, especially when running code.",
|
|
503527
503698
|
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(Newline, {}, undefined, false, undefined, this)
|
|
503528
503699
|
]
|
|
503529
503700
|
}, undefined, true, undefined, this)
|
|
503530
503701
|
]
|
|
503531
503702
|
}, undefined, true, undefined, this),
|
|
503532
503703
|
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(OrderedList.Item, {
|
|
503533
|
-
children:
|
|
503534
|
-
|
|
503535
|
-
|
|
503536
|
-
|
|
503537
|
-
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503538
|
-
dimColor: true,
|
|
503539
|
-
wrap: "wrap",
|
|
503540
|
-
children: [
|
|
503541
|
-
"For more details see:",
|
|
503542
|
-
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(Newline, {}, undefined, false, undefined, this),
|
|
503543
|
-
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(Link, {
|
|
503544
|
-
url: "https://github.com/chromebookwiz/localclawd"
|
|
503545
|
-
}, undefined, false, undefined, this)
|
|
503546
|
-
]
|
|
503547
|
-
}, undefined, true, undefined, this)
|
|
503548
|
-
]
|
|
503549
|
-
}, undefined, true, undefined, this)
|
|
503704
|
+
children: /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503705
|
+
children: "Due to prompt injection risks, only use it with code you trust"
|
|
503706
|
+
}, undefined, false, undefined, this)
|
|
503707
|
+
}, undefined, false, undefined, this)
|
|
503550
503708
|
]
|
|
503551
503709
|
}, undefined, true, undefined, this)
|
|
503552
503710
|
}, undefined, false, undefined, this),
|
|
503553
|
-
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(
|
|
503711
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(PressEnterToContinue2, {
|
|
503712
|
+
onContinue: goToNextStep
|
|
503713
|
+
}, undefined, false, undefined, this)
|
|
503554
503714
|
]
|
|
503555
503715
|
}, undefined, true, undefined, this);
|
|
503556
|
-
const
|
|
503716
|
+
const result = [
|
|
503557
503717
|
{ id: "theme", component: themeStep },
|
|
503558
503718
|
{ id: "compact-context", component: compactContextStep },
|
|
503559
503719
|
{ id: "local-backend", component: localBackendStep },
|
|
503560
503720
|
{ id: "security", component: securityStep }
|
|
503561
503721
|
];
|
|
503562
503722
|
if (shouldOfferTerminalSetup()) {
|
|
503563
|
-
|
|
503723
|
+
const terminalItems = [
|
|
503724
|
+
{ label: "Yes, use recommended settings", value: "install" },
|
|
503725
|
+
{ label: "No, maybe later with /terminal-setup", value: "no" }
|
|
503726
|
+
];
|
|
503727
|
+
result.push({
|
|
503564
503728
|
id: "terminal-setup",
|
|
503565
503729
|
component: /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedBox_default, {
|
|
503566
503730
|
flexDirection: "column",
|
|
@@ -503578,25 +503742,16 @@ function Onboarding({ onDone, showWelcome = true }) {
|
|
|
503578
503742
|
children: [
|
|
503579
503743
|
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503580
503744
|
children: [
|
|
503581
|
-
"For the optimal coding experience, enable
|
|
503745
|
+
"For the optimal coding experience, enable recommended settings",
|
|
503582
503746
|
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(Newline, {}, undefined, false, undefined, this),
|
|
503583
503747
|
"for your terminal:",
|
|
503584
503748
|
" ",
|
|
503585
503749
|
env4.terminal === "Apple_Terminal" ? "Option+Enter for newlines and visual bell" : "Shift+Enter for newlines"
|
|
503586
503750
|
]
|
|
503587
503751
|
}, undefined, true, undefined, this),
|
|
503588
|
-
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(
|
|
503589
|
-
|
|
503590
|
-
|
|
503591
|
-
label: "Yes, use recommended settings",
|
|
503592
|
-
value: "install"
|
|
503593
|
-
},
|
|
503594
|
-
{
|
|
503595
|
-
label: "No, maybe later with /terminal-setup",
|
|
503596
|
-
value: "no"
|
|
503597
|
-
}
|
|
503598
|
-
],
|
|
503599
|
-
onChange: (value) => {
|
|
503752
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(SimpleMenu2, {
|
|
503753
|
+
items: terminalItems,
|
|
503754
|
+
onSelect: (value) => {
|
|
503600
503755
|
if (value === "install") {
|
|
503601
503756
|
setupTerminal(theme2).catch(() => {}).finally(goToNextStep);
|
|
503602
503757
|
} else {
|
|
@@ -503604,18 +503759,6 @@ function Onboarding({ onDone, showWelcome = true }) {
|
|
|
503604
503759
|
}
|
|
503605
503760
|
},
|
|
503606
503761
|
onCancel: goToNextStep
|
|
503607
|
-
}, undefined, false, undefined, this),
|
|
503608
|
-
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503609
|
-
dimColor: true,
|
|
503610
|
-
children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(jsx_dev_runtime486.Fragment, {
|
|
503611
|
-
children: [
|
|
503612
|
-
"Press ",
|
|
503613
|
-
exitState.keyName,
|
|
503614
|
-
" again to exit"
|
|
503615
|
-
]
|
|
503616
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(jsx_dev_runtime486.Fragment, {
|
|
503617
|
-
children: "Enter to confirm · Esc to skip"
|
|
503618
|
-
}, undefined, false, undefined, this)
|
|
503619
503762
|
}, undefined, false, undefined, this)
|
|
503620
503763
|
]
|
|
503621
503764
|
}, undefined, true, undefined, this)
|
|
@@ -503623,31 +503766,9 @@ function Onboarding({ onDone, showWelcome = true }) {
|
|
|
503623
503766
|
}, undefined, true, undefined, this)
|
|
503624
503767
|
});
|
|
503625
503768
|
}
|
|
503626
|
-
return
|
|
503627
|
-
}, [
|
|
503769
|
+
return result;
|
|
503770
|
+
}, [goToNextStep, handleLocalBackendSetup, handleThemeSelection, theme2]);
|
|
503628
503771
|
const currentStep = steps[currentStepIndex];
|
|
503629
|
-
const handleSecurityContinue = import_react324.useCallback(() => {
|
|
503630
|
-
if (currentStepIndex === steps.length - 1) {
|
|
503631
|
-
onDone();
|
|
503632
|
-
} else {
|
|
503633
|
-
goToNextStep();
|
|
503634
|
-
}
|
|
503635
|
-
}, [currentStepIndex, goToNextStep, onDone, steps.length]);
|
|
503636
|
-
const handleTerminalSetupSkip = import_react324.useCallback(() => {
|
|
503637
|
-
goToNextStep();
|
|
503638
|
-
}, [goToNextStep]);
|
|
503639
|
-
useKeybindings({
|
|
503640
|
-
"confirm:yes": handleSecurityContinue
|
|
503641
|
-
}, {
|
|
503642
|
-
context: "Confirmation",
|
|
503643
|
-
isActive: currentStep?.id === "security"
|
|
503644
|
-
});
|
|
503645
|
-
useKeybindings({
|
|
503646
|
-
"confirm:no": handleTerminalSetupSkip
|
|
503647
|
-
}, {
|
|
503648
|
-
context: "Confirmation",
|
|
503649
|
-
isActive: currentStep?.id === "terminal-setup"
|
|
503650
|
-
});
|
|
503651
503772
|
return /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedBox_default, {
|
|
503652
503773
|
flexDirection: "column",
|
|
503653
503774
|
children: [
|
|
@@ -503655,534 +503776,163 @@ function Onboarding({ onDone, showWelcome = true }) {
|
|
|
503655
503776
|
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedBox_default, {
|
|
503656
503777
|
flexDirection: "column",
|
|
503657
503778
|
marginTop: 1,
|
|
503658
|
-
children:
|
|
503659
|
-
|
|
503660
|
-
exitState.pending ? /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedBox_default, {
|
|
503661
|
-
padding: 1,
|
|
503662
|
-
children: /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503663
|
-
dimColor: true,
|
|
503664
|
-
children: [
|
|
503665
|
-
"Press ",
|
|
503666
|
-
exitState.keyName,
|
|
503667
|
-
" again to exit"
|
|
503668
|
-
]
|
|
503669
|
-
}, undefined, true, undefined, this)
|
|
503670
|
-
}, undefined, false, undefined, this) : null
|
|
503671
|
-
]
|
|
503672
|
-
}, undefined, true, undefined, this)
|
|
503779
|
+
children: currentStep?.component
|
|
503780
|
+
}, undefined, false, undefined, this)
|
|
503673
503781
|
]
|
|
503674
503782
|
}, undefined, true, undefined, this);
|
|
503675
503783
|
}
|
|
503676
503784
|
var import_react324, jsx_dev_runtime486;
|
|
503677
503785
|
var init_Onboarding = __esm(() => {
|
|
503678
503786
|
init_terminalSetup();
|
|
503679
|
-
init_useExitOnCtrlCDWithKeybindings();
|
|
503680
503787
|
init_ink2();
|
|
503681
|
-
init_useKeybinding();
|
|
503682
503788
|
init_config();
|
|
503683
503789
|
init_context();
|
|
503684
503790
|
init_env();
|
|
503685
503791
|
init_providers();
|
|
503686
|
-
|
|
503792
|
+
init_theme();
|
|
503687
503793
|
init_LocalBackendSetup();
|
|
503688
503794
|
init_WelcomeV2();
|
|
503689
|
-
init_PressEnterToContinue();
|
|
503690
|
-
init_ThemePicker();
|
|
503691
503795
|
init_OrderedList();
|
|
503692
503796
|
import_react324 = __toESM(require_react(), 1);
|
|
503693
503797
|
jsx_dev_runtime486 = __toESM(require_jsx_dev_runtime(), 1);
|
|
503694
503798
|
});
|
|
503695
503799
|
|
|
503696
|
-
// src/components/TrustDialog/utils.ts
|
|
503697
|
-
function hasHooks(settings) {
|
|
503698
|
-
if (settings === null || settings.disableAllHooks) {
|
|
503699
|
-
return false;
|
|
503700
|
-
}
|
|
503701
|
-
if (settings.statusLine) {
|
|
503702
|
-
return true;
|
|
503703
|
-
}
|
|
503704
|
-
if (settings.fileSuggestion) {
|
|
503705
|
-
return true;
|
|
503706
|
-
}
|
|
503707
|
-
if (!settings.hooks) {
|
|
503708
|
-
return false;
|
|
503709
|
-
}
|
|
503710
|
-
for (const hookConfig of Object.values(settings.hooks)) {
|
|
503711
|
-
if (hookConfig.length > 0) {
|
|
503712
|
-
return true;
|
|
503713
|
-
}
|
|
503714
|
-
}
|
|
503715
|
-
return false;
|
|
503716
|
-
}
|
|
503717
|
-
function getHooksSources() {
|
|
503718
|
-
const sources = [];
|
|
503719
|
-
const projectSettings = getSettingsForSource("projectSettings");
|
|
503720
|
-
if (hasHooks(projectSettings)) {
|
|
503721
|
-
sources.push(".claude/settings.json");
|
|
503722
|
-
}
|
|
503723
|
-
const localSettings = getSettingsForSource("localSettings");
|
|
503724
|
-
if (hasHooks(localSettings)) {
|
|
503725
|
-
sources.push(".claude/settings.local.json");
|
|
503726
|
-
}
|
|
503727
|
-
return sources;
|
|
503728
|
-
}
|
|
503729
|
-
function hasBashPermission(rules) {
|
|
503730
|
-
return rules.some((rule) => rule.ruleBehavior === "allow" && (rule.ruleValue.toolName === BASH_TOOL_NAME || rule.ruleValue.toolName.startsWith(BASH_TOOL_NAME + "(")));
|
|
503731
|
-
}
|
|
503732
|
-
function getBashPermissionSources() {
|
|
503733
|
-
const sources = [];
|
|
503734
|
-
const projectRules = getPermissionRulesForSource("projectSettings");
|
|
503735
|
-
if (hasBashPermission(projectRules)) {
|
|
503736
|
-
sources.push(".claude/settings.json");
|
|
503737
|
-
}
|
|
503738
|
-
const localRules = getPermissionRulesForSource("localSettings");
|
|
503739
|
-
if (hasBashPermission(localRules)) {
|
|
503740
|
-
sources.push(".claude/settings.local.json");
|
|
503741
|
-
}
|
|
503742
|
-
return sources;
|
|
503743
|
-
}
|
|
503744
|
-
function hasOtelHeadersHelper(settings) {
|
|
503745
|
-
return !!settings?.otelHeadersHelper;
|
|
503746
|
-
}
|
|
503747
|
-
function getOtelHeadersHelperSources() {
|
|
503748
|
-
const sources = [];
|
|
503749
|
-
const projectSettings = getSettingsForSource("projectSettings");
|
|
503750
|
-
if (hasOtelHeadersHelper(projectSettings)) {
|
|
503751
|
-
sources.push(".claude/settings.json");
|
|
503752
|
-
}
|
|
503753
|
-
const localSettings = getSettingsForSource("localSettings");
|
|
503754
|
-
if (hasOtelHeadersHelper(localSettings)) {
|
|
503755
|
-
sources.push(".claude/settings.local.json");
|
|
503756
|
-
}
|
|
503757
|
-
return sources;
|
|
503758
|
-
}
|
|
503759
|
-
function hasApiKeyHelper(settings) {
|
|
503760
|
-
return !!settings?.apiKeyHelper;
|
|
503761
|
-
}
|
|
503762
|
-
function getApiKeyHelperSources() {
|
|
503763
|
-
const sources = [];
|
|
503764
|
-
const projectSettings = getSettingsForSource("projectSettings");
|
|
503765
|
-
if (hasApiKeyHelper(projectSettings)) {
|
|
503766
|
-
sources.push(".claude/settings.json");
|
|
503767
|
-
}
|
|
503768
|
-
const localSettings = getSettingsForSource("localSettings");
|
|
503769
|
-
if (hasApiKeyHelper(localSettings)) {
|
|
503770
|
-
sources.push(".claude/settings.local.json");
|
|
503771
|
-
}
|
|
503772
|
-
return sources;
|
|
503773
|
-
}
|
|
503774
|
-
function hasAwsCommands(settings) {
|
|
503775
|
-
return !!(settings?.awsAuthRefresh || settings?.awsCredentialExport);
|
|
503776
|
-
}
|
|
503777
|
-
function getAwsCommandsSources() {
|
|
503778
|
-
const sources = [];
|
|
503779
|
-
const projectSettings = getSettingsForSource("projectSettings");
|
|
503780
|
-
if (hasAwsCommands(projectSettings)) {
|
|
503781
|
-
sources.push(".claude/settings.json");
|
|
503782
|
-
}
|
|
503783
|
-
const localSettings = getSettingsForSource("localSettings");
|
|
503784
|
-
if (hasAwsCommands(localSettings)) {
|
|
503785
|
-
sources.push(".claude/settings.local.json");
|
|
503786
|
-
}
|
|
503787
|
-
return sources;
|
|
503788
|
-
}
|
|
503789
|
-
function hasGcpCommands(settings) {
|
|
503790
|
-
return !!settings?.gcpAuthRefresh;
|
|
503791
|
-
}
|
|
503792
|
-
function getGcpCommandsSources() {
|
|
503793
|
-
const sources = [];
|
|
503794
|
-
const projectSettings = getSettingsForSource("projectSettings");
|
|
503795
|
-
if (hasGcpCommands(projectSettings)) {
|
|
503796
|
-
sources.push(".claude/settings.json");
|
|
503797
|
-
}
|
|
503798
|
-
const localSettings = getSettingsForSource("localSettings");
|
|
503799
|
-
if (hasGcpCommands(localSettings)) {
|
|
503800
|
-
sources.push(".claude/settings.local.json");
|
|
503801
|
-
}
|
|
503802
|
-
return sources;
|
|
503803
|
-
}
|
|
503804
|
-
function hasDangerousEnvVars(settings) {
|
|
503805
|
-
if (!settings?.env) {
|
|
503806
|
-
return false;
|
|
503807
|
-
}
|
|
503808
|
-
return Object.keys(settings.env).some((key) => !SAFE_ENV_VARS2.has(key.toUpperCase()));
|
|
503809
|
-
}
|
|
503810
|
-
function getDangerousEnvVarsSources() {
|
|
503811
|
-
const sources = [];
|
|
503812
|
-
const projectSettings = getSettingsForSource("projectSettings");
|
|
503813
|
-
if (hasDangerousEnvVars(projectSettings)) {
|
|
503814
|
-
sources.push(".claude/settings.json");
|
|
503815
|
-
}
|
|
503816
|
-
const localSettings = getSettingsForSource("localSettings");
|
|
503817
|
-
if (hasDangerousEnvVars(localSettings)) {
|
|
503818
|
-
sources.push(".claude/settings.local.json");
|
|
503819
|
-
}
|
|
503820
|
-
return sources;
|
|
503821
|
-
}
|
|
503822
|
-
var init_utils14 = __esm(() => {
|
|
503823
|
-
init_settings2();
|
|
503824
|
-
init_managedEnvConstants();
|
|
503825
|
-
init_permissionsLoader();
|
|
503826
|
-
});
|
|
503827
|
-
|
|
503828
503800
|
// src/components/TrustDialog/TrustDialog.tsx
|
|
503829
503801
|
var exports_TrustDialog = {};
|
|
503830
503802
|
__export(exports_TrustDialog, {
|
|
503831
503803
|
TrustDialog: () => TrustDialog
|
|
503832
503804
|
});
|
|
503833
503805
|
import { homedir as homedir36 } from "os";
|
|
503834
|
-
function
|
|
503835
|
-
|
|
503836
|
-
|
|
503837
|
-
|
|
503838
|
-
|
|
503839
|
-
|
|
503840
|
-
|
|
503841
|
-
|
|
503842
|
-
|
|
503843
|
-
|
|
503844
|
-
|
|
503845
|
-
|
|
503846
|
-
|
|
503847
|
-
const {
|
|
503848
|
-
servers: projectServers
|
|
503849
|
-
} = t1;
|
|
503850
|
-
let t2;
|
|
503851
|
-
if ($2[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
503852
|
-
t2 = Object.keys(projectServers);
|
|
503853
|
-
$2[1] = t2;
|
|
503854
|
-
} else {
|
|
503855
|
-
t2 = $2[1];
|
|
503856
|
-
}
|
|
503857
|
-
const hasMcpServers = t2.length > 0;
|
|
503858
|
-
let t3;
|
|
503859
|
-
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
503860
|
-
t3 = getHooksSources();
|
|
503861
|
-
$2[2] = t3;
|
|
503862
|
-
} else {
|
|
503863
|
-
t3 = $2[2];
|
|
503864
|
-
}
|
|
503865
|
-
const hooksSettingSources = t3;
|
|
503866
|
-
const hasHooks2 = hooksSettingSources.length > 0;
|
|
503867
|
-
let t4;
|
|
503868
|
-
if ($2[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
503869
|
-
t4 = getBashPermissionSources();
|
|
503870
|
-
$2[3] = t4;
|
|
503871
|
-
} else {
|
|
503872
|
-
t4 = $2[3];
|
|
503873
|
-
}
|
|
503874
|
-
const bashSettingSources = t4;
|
|
503875
|
-
let t5;
|
|
503876
|
-
if ($2[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
503877
|
-
t5 = getApiKeyHelperSources();
|
|
503878
|
-
$2[4] = t5;
|
|
503879
|
-
} else {
|
|
503880
|
-
t5 = $2[4];
|
|
503881
|
-
}
|
|
503882
|
-
const apiKeyHelperSources = t5;
|
|
503883
|
-
const hasApiKeyHelper2 = apiKeyHelperSources.length > 0;
|
|
503884
|
-
let t6;
|
|
503885
|
-
if ($2[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
503886
|
-
t6 = getAwsCommandsSources();
|
|
503887
|
-
$2[5] = t6;
|
|
503888
|
-
} else {
|
|
503889
|
-
t6 = $2[5];
|
|
503890
|
-
}
|
|
503891
|
-
const awsCommandsSources = t6;
|
|
503892
|
-
const hasAwsCommands2 = awsCommandsSources.length > 0;
|
|
503893
|
-
let t7;
|
|
503894
|
-
if ($2[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
503895
|
-
t7 = getGcpCommandsSources();
|
|
503896
|
-
$2[6] = t7;
|
|
503897
|
-
} else {
|
|
503898
|
-
t7 = $2[6];
|
|
503899
|
-
}
|
|
503900
|
-
const gcpCommandsSources = t7;
|
|
503901
|
-
const hasGcpCommands2 = gcpCommandsSources.length > 0;
|
|
503902
|
-
let t8;
|
|
503903
|
-
if ($2[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
503904
|
-
t8 = getOtelHeadersHelperSources();
|
|
503905
|
-
$2[7] = t8;
|
|
503906
|
-
} else {
|
|
503907
|
-
t8 = $2[7];
|
|
503908
|
-
}
|
|
503909
|
-
const otelHeadersHelperSources = t8;
|
|
503910
|
-
const hasOtelHeadersHelper2 = otelHeadersHelperSources.length > 0;
|
|
503911
|
-
let t9;
|
|
503912
|
-
if ($2[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
503913
|
-
t9 = getDangerousEnvVarsSources();
|
|
503914
|
-
$2[8] = t9;
|
|
503915
|
-
} else {
|
|
503916
|
-
t9 = $2[8];
|
|
503917
|
-
}
|
|
503918
|
-
const dangerousEnvVarsSources = t9;
|
|
503919
|
-
const hasDangerousEnvVars2 = dangerousEnvVarsSources.length > 0;
|
|
503920
|
-
let t10;
|
|
503921
|
-
if ($2[9] !== commands2) {
|
|
503922
|
-
t10 = commands2?.some(_temp2101) ?? false;
|
|
503923
|
-
$2[9] = commands2;
|
|
503924
|
-
$2[10] = t10;
|
|
503925
|
-
} else {
|
|
503926
|
-
t10 = $2[10];
|
|
503927
|
-
}
|
|
503928
|
-
const hasSlashCommandBash = t10;
|
|
503929
|
-
let t11;
|
|
503930
|
-
if ($2[11] !== commands2) {
|
|
503931
|
-
t11 = commands2?.some(_temp442) ?? false;
|
|
503932
|
-
$2[11] = commands2;
|
|
503933
|
-
$2[12] = t11;
|
|
503934
|
-
} else {
|
|
503935
|
-
t11 = $2[12];
|
|
503806
|
+
function acceptTrust(onDone) {
|
|
503807
|
+
try {
|
|
503808
|
+
const isHomeDir = homedir36() === getCwd();
|
|
503809
|
+
if (isHomeDir) {
|
|
503810
|
+
setSessionTrustAccepted(true);
|
|
503811
|
+
} else {
|
|
503812
|
+
try {
|
|
503813
|
+
saveCurrentProjectConfig((current) => ({ ...current, hasTrustDialogAccepted: true }));
|
|
503814
|
+
} catch {}
|
|
503815
|
+
setSessionTrustAccepted(true);
|
|
503816
|
+
}
|
|
503817
|
+
} finally {
|
|
503818
|
+
onDone();
|
|
503936
503819
|
}
|
|
503937
|
-
|
|
503938
|
-
|
|
503820
|
+
}
|
|
503821
|
+
function TrustDialog({ onDone }) {
|
|
503939
503822
|
const hasTrustDialogAccepted = checkHasTrustDialogAccepted();
|
|
503940
|
-
|
|
503941
|
-
|
|
503942
|
-
|
|
503943
|
-
|
|
503944
|
-
|
|
503945
|
-
|
|
503946
|
-
|
|
503947
|
-
|
|
503948
|
-
|
|
503949
|
-
|
|
503950
|
-
|
|
503951
|
-
|
|
503952
|
-
|
|
503953
|
-
|
|
503954
|
-
|
|
503955
|
-
|
|
503956
|
-
|
|
503957
|
-
|
|
503958
|
-
|
|
503959
|
-
|
|
503960
|
-
|
|
503961
|
-
|
|
503962
|
-
|
|
503963
|
-
|
|
503964
|
-
|
|
503965
|
-
|
|
503966
|
-
|
|
503967
|
-
|
|
503968
|
-
|
|
503969
|
-
|
|
503970
|
-
|
|
503971
|
-
|
|
503972
|
-
|
|
503973
|
-
try {
|
|
503974
|
-
const isHomeDir_0 = homedir36() === getCwd();
|
|
503975
|
-
try {
|
|
503976
|
-
logEvent("tengu_trust_dialog_accept", {
|
|
503977
|
-
isHomeDir: isHomeDir_0,
|
|
503978
|
-
hasMcpServers,
|
|
503979
|
-
hasHooks: hasHooks2,
|
|
503980
|
-
hasBashExecution: hasAnyBashExecution,
|
|
503981
|
-
hasApiKeyHelper: hasApiKeyHelper2,
|
|
503982
|
-
hasAwsCommands: hasAwsCommands2,
|
|
503983
|
-
hasGcpCommands: hasGcpCommands2,
|
|
503984
|
-
hasOtelHeadersHelper: hasOtelHeadersHelper2,
|
|
503985
|
-
hasDangerousEnvVars: hasDangerousEnvVars2
|
|
503986
|
-
});
|
|
503987
|
-
} catch {}
|
|
503988
|
-
if (isHomeDir_0) {
|
|
503989
|
-
setSessionTrustAccepted(true);
|
|
503823
|
+
const [focusIdx, setFocusIdx] = import_react325.useState(0);
|
|
503824
|
+
const stateRef = import_react325.useRef({ focusIdx: 0, done: false });
|
|
503825
|
+
import_react325.useEffect(() => {
|
|
503826
|
+
if (hasTrustDialogAccepted) {
|
|
503827
|
+
setSessionTrustAccepted(true);
|
|
503828
|
+
onDone();
|
|
503829
|
+
}
|
|
503830
|
+
}, []);
|
|
503831
|
+
import_react325.useEffect(() => {
|
|
503832
|
+
if (hasTrustDialogAccepted)
|
|
503833
|
+
return;
|
|
503834
|
+
if (!process.stdin.readableFlowing) {
|
|
503835
|
+
process.stdin.resume();
|
|
503836
|
+
}
|
|
503837
|
+
const onData = (chunk2) => {
|
|
503838
|
+
const str2 = typeof chunk2 === "string" ? chunk2 : chunk2.toString("utf8");
|
|
503839
|
+
if (str2 === "\x1B[A" || str2 === "\x1BOA") {
|
|
503840
|
+
const next = (stateRef.current.focusIdx - 1 + OPTIONS.length) % OPTIONS.length;
|
|
503841
|
+
stateRef.current.focusIdx = next;
|
|
503842
|
+
setFocusIdx(next);
|
|
503843
|
+
} else if (str2 === "\x1B[B" || str2 === "\x1BOB") {
|
|
503844
|
+
const next = (stateRef.current.focusIdx + 1) % OPTIONS.length;
|
|
503845
|
+
stateRef.current.focusIdx = next;
|
|
503846
|
+
setFocusIdx(next);
|
|
503847
|
+
} else if (str2 === "\r" || str2 === `
|
|
503848
|
+
` || str2 === `\r
|
|
503849
|
+
`) {
|
|
503850
|
+
if (stateRef.current.done)
|
|
503851
|
+
return;
|
|
503852
|
+
stateRef.current.done = true;
|
|
503853
|
+
const chosen = OPTIONS[stateRef.current.focusIdx];
|
|
503854
|
+
if (chosen?.value === "exit") {
|
|
503855
|
+
gracefulShutdownSync(1);
|
|
503990
503856
|
} else {
|
|
503991
|
-
|
|
503992
|
-
saveCurrentProjectConfig(_temp530);
|
|
503993
|
-
} catch {}
|
|
503994
|
-
setSessionTrustAccepted(true);
|
|
503857
|
+
acceptTrust(onDone);
|
|
503995
503858
|
}
|
|
503996
|
-
}
|
|
503997
|
-
|
|
503859
|
+
} else if (str2 === "\x1B" || str2 === "\x1B\x1B") {
|
|
503860
|
+
gracefulShutdownSync(0);
|
|
503861
|
+
} else if (str2 === "\x03") {
|
|
503862
|
+
gracefulShutdownSync(1);
|
|
503998
503863
|
}
|
|
503999
503864
|
};
|
|
504000
|
-
|
|
504001
|
-
|
|
504002
|
-
|
|
504003
|
-
} else {
|
|
504004
|
-
t14 = $2[18];
|
|
504005
|
-
}
|
|
504006
|
-
const onChange = t14;
|
|
504007
|
-
const exitState = useExitOnCtrlCDWithKeybindings(_temp624);
|
|
504008
|
-
let t15;
|
|
504009
|
-
if ($2[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
504010
|
-
t15 = {
|
|
504011
|
-
context: "Confirmation"
|
|
503865
|
+
process.stdin.on("data", onData);
|
|
503866
|
+
return () => {
|
|
503867
|
+
process.stdin.off("data", onData);
|
|
504012
503868
|
};
|
|
504013
|
-
|
|
504014
|
-
|
|
504015
|
-
t15 = $2[19];
|
|
504016
|
-
}
|
|
504017
|
-
useKeybinding("confirm:no", _temp721, t15);
|
|
504018
|
-
use_input_default((_input, key) => {
|
|
504019
|
-
if (key.return) {
|
|
504020
|
-
onChange("enable_all");
|
|
504021
|
-
} else if (key.escape) {
|
|
504022
|
-
gracefulShutdownSync(0);
|
|
504023
|
-
}
|
|
504024
|
-
}, { isActive: !hasTrustDialogAccepted });
|
|
504025
|
-
if (hasTrustDialogAccepted) {
|
|
504026
|
-
setTimeout(onDone);
|
|
503869
|
+
}, [hasTrustDialogAccepted, onDone]);
|
|
503870
|
+
if (hasTrustDialogAccepted)
|
|
504027
503871
|
return null;
|
|
504028
|
-
|
|
504029
|
-
|
|
504030
|
-
|
|
504031
|
-
|
|
504032
|
-
|
|
504033
|
-
|
|
504034
|
-
|
|
504035
|
-
|
|
504036
|
-
|
|
504037
|
-
t17 = /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedText, {
|
|
504038
|
-
children: [
|
|
504039
|
-
"Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source project, or work from your team). If not, take a moment to review what",
|
|
504040
|
-
"'",
|
|
504041
|
-
"s in this folder first."
|
|
504042
|
-
]
|
|
504043
|
-
}, undefined, true, undefined, this);
|
|
504044
|
-
t18 = /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedText, {
|
|
503872
|
+
const cwd2 = getFsImplementation().cwd();
|
|
503873
|
+
return /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(PermissionDialog, {
|
|
503874
|
+
color: "warning",
|
|
503875
|
+
titleColor: "warning",
|
|
503876
|
+
title: "Accessing workspace:",
|
|
503877
|
+
children: /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedBox_default, {
|
|
503878
|
+
flexDirection: "column",
|
|
503879
|
+
gap: 1,
|
|
503880
|
+
paddingTop: 1,
|
|
504045
503881
|
children: [
|
|
504046
|
-
|
|
504047
|
-
|
|
504048
|
-
|
|
503882
|
+
/* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedText, {
|
|
503883
|
+
bold: true,
|
|
503884
|
+
children: cwd2
|
|
503885
|
+
}, undefined, false, undefined, this),
|
|
503886
|
+
/* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedText, {
|
|
503887
|
+
children: [
|
|
503888
|
+
"Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source project, or work from your team.) If not, take a moment to review what",
|
|
503889
|
+
"'",
|
|
503890
|
+
"s in this folder first."
|
|
503891
|
+
]
|
|
503892
|
+
}, undefined, true, undefined, this),
|
|
503893
|
+
/* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedText, {
|
|
503894
|
+
children: "localClawd'll be able to read, edit, and execute files here."
|
|
503895
|
+
}, undefined, false, undefined, this),
|
|
503896
|
+
/* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedBox_default, {
|
|
503897
|
+
flexDirection: "column",
|
|
503898
|
+
children: OPTIONS.map((opt, i2) => /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedBox_default, {
|
|
503899
|
+
gap: 1,
|
|
503900
|
+
children: [
|
|
503901
|
+
/* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedText, {
|
|
503902
|
+
color: "yellow",
|
|
503903
|
+
children: i2 === focusIdx ? "▶" : " "
|
|
503904
|
+
}, undefined, false, undefined, this),
|
|
503905
|
+
/* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedText, {
|
|
503906
|
+
bold: i2 === focusIdx,
|
|
503907
|
+
color: i2 === focusIdx ? "white" : undefined,
|
|
503908
|
+
children: opt.label
|
|
503909
|
+
}, undefined, false, undefined, this)
|
|
503910
|
+
]
|
|
503911
|
+
}, opt.value, true, undefined, this))
|
|
503912
|
+
}, undefined, false, undefined, this),
|
|
503913
|
+
/* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedText, {
|
|
503914
|
+
dimColor: true,
|
|
503915
|
+
children: "↑↓ navigate · Enter confirm · Esc cancel"
|
|
503916
|
+
}, undefined, false, undefined, this)
|
|
504049
503917
|
]
|
|
504050
|
-
}, undefined, true, undefined, this)
|
|
504051
|
-
|
|
504052
|
-
$2[21] = t17;
|
|
504053
|
-
$2[22] = t18;
|
|
504054
|
-
} else {
|
|
504055
|
-
t16 = $2[20];
|
|
504056
|
-
t17 = $2[21];
|
|
504057
|
-
t18 = $2[22];
|
|
504058
|
-
}
|
|
504059
|
-
let t19;
|
|
504060
|
-
if ($2[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
504061
|
-
t19 = /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedText, {
|
|
504062
|
-
dimColor: true,
|
|
504063
|
-
children: /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(Link, {
|
|
504064
|
-
url: "https://code.claude.com/docs/en/security",
|
|
504065
|
-
children: "Security guide"
|
|
504066
|
-
}, undefined, false, undefined, this)
|
|
504067
|
-
}, undefined, false, undefined, this);
|
|
504068
|
-
$2[23] = t19;
|
|
504069
|
-
} else {
|
|
504070
|
-
t19 = $2[23];
|
|
504071
|
-
}
|
|
504072
|
-
let t20;
|
|
504073
|
-
if ($2[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
504074
|
-
t20 = [{
|
|
504075
|
-
label: "Yes, I trust this folder",
|
|
504076
|
-
value: "enable_all"
|
|
504077
|
-
}, {
|
|
504078
|
-
label: "No, exit",
|
|
504079
|
-
value: "exit"
|
|
504080
|
-
}];
|
|
504081
|
-
$2[24] = t20;
|
|
504082
|
-
} else {
|
|
504083
|
-
t20 = $2[24];
|
|
504084
|
-
}
|
|
504085
|
-
let t21;
|
|
504086
|
-
if ($2[25] !== onChange) {
|
|
504087
|
-
t21 = /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(Select, {
|
|
504088
|
-
options: t20,
|
|
504089
|
-
onChange: (value_0) => onChange(value_0),
|
|
504090
|
-
onCancel: () => onChange("exit")
|
|
504091
|
-
}, undefined, false, undefined, this);
|
|
504092
|
-
$2[25] = onChange;
|
|
504093
|
-
$2[26] = t21;
|
|
504094
|
-
} else {
|
|
504095
|
-
t21 = $2[26];
|
|
504096
|
-
}
|
|
504097
|
-
let t22;
|
|
504098
|
-
if ($2[27] !== exitState.keyName || $2[28] !== exitState.pending) {
|
|
504099
|
-
t22 = /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedText, {
|
|
504100
|
-
dimColor: true,
|
|
504101
|
-
children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(jsx_dev_runtime487.Fragment, {
|
|
504102
|
-
children: [
|
|
504103
|
-
"Press ",
|
|
504104
|
-
exitState.keyName,
|
|
504105
|
-
" again to exit"
|
|
504106
|
-
]
|
|
504107
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(jsx_dev_runtime487.Fragment, {
|
|
504108
|
-
children: "Enter to confirm · Esc to cancel"
|
|
504109
|
-
}, undefined, false, undefined, this)
|
|
504110
|
-
}, undefined, false, undefined, this);
|
|
504111
|
-
$2[27] = exitState.keyName;
|
|
504112
|
-
$2[28] = exitState.pending;
|
|
504113
|
-
$2[29] = t22;
|
|
504114
|
-
} else {
|
|
504115
|
-
t22 = $2[29];
|
|
504116
|
-
}
|
|
504117
|
-
let t23;
|
|
504118
|
-
if ($2[30] !== t21 || $2[31] !== t22) {
|
|
504119
|
-
t23 = /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(PermissionDialog, {
|
|
504120
|
-
color: "warning",
|
|
504121
|
-
titleColor: "warning",
|
|
504122
|
-
title: "Accessing workspace:",
|
|
504123
|
-
children: /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(ThemedBox_default, {
|
|
504124
|
-
flexDirection: "column",
|
|
504125
|
-
gap: 1,
|
|
504126
|
-
paddingTop: 1,
|
|
504127
|
-
children: [
|
|
504128
|
-
t16,
|
|
504129
|
-
t17,
|
|
504130
|
-
t18,
|
|
504131
|
-
t19,
|
|
504132
|
-
t21,
|
|
504133
|
-
t22
|
|
504134
|
-
]
|
|
504135
|
-
}, undefined, true, undefined, this)
|
|
504136
|
-
}, undefined, false, undefined, this);
|
|
504137
|
-
$2[30] = t21;
|
|
504138
|
-
$2[31] = t22;
|
|
504139
|
-
$2[32] = t23;
|
|
504140
|
-
} else {
|
|
504141
|
-
t23 = $2[32];
|
|
504142
|
-
}
|
|
504143
|
-
return t23;
|
|
504144
|
-
}
|
|
504145
|
-
function _temp721() {
|
|
504146
|
-
gracefulShutdownSync(0);
|
|
504147
|
-
}
|
|
504148
|
-
function _temp624() {
|
|
504149
|
-
return gracefulShutdownSync(1);
|
|
504150
|
-
}
|
|
504151
|
-
function _temp530(current) {
|
|
504152
|
-
return {
|
|
504153
|
-
...current,
|
|
504154
|
-
hasTrustDialogAccepted: true
|
|
504155
|
-
};
|
|
504156
|
-
}
|
|
504157
|
-
function _temp442(command_0) {
|
|
504158
|
-
return command_0.type === "prompt" && (command_0.loadedFrom === "skills" || command_0.loadedFrom === "plugin") && (command_0.source === "projectSettings" || command_0.source === "localSettings" || command_0.source === "plugin") && command_0.allowedTools?.some(_temp356);
|
|
504159
|
-
}
|
|
504160
|
-
function _temp356(tool_0) {
|
|
504161
|
-
return tool_0 === BASH_TOOL_NAME || tool_0.startsWith(BASH_TOOL_NAME + "(");
|
|
504162
|
-
}
|
|
504163
|
-
function _temp2101(command8) {
|
|
504164
|
-
return command8.type === "prompt" && command8.loadedFrom === "commands_DEPRECATED" && (command8.source === "projectSettings" || command8.source === "localSettings") && command8.allowedTools?.some(_temp303);
|
|
504165
|
-
}
|
|
504166
|
-
function _temp303(tool) {
|
|
504167
|
-
return tool === BASH_TOOL_NAME || tool.startsWith(BASH_TOOL_NAME + "(");
|
|
503918
|
+
}, undefined, true, undefined, this)
|
|
503919
|
+
}, undefined, false, undefined, this);
|
|
504168
503920
|
}
|
|
504169
|
-
var import_react325, jsx_dev_runtime487;
|
|
503921
|
+
var import_react325, jsx_dev_runtime487, OPTIONS;
|
|
504170
503922
|
var init_TrustDialog = __esm(() => {
|
|
504171
503923
|
init_ink2();
|
|
504172
503924
|
init_state();
|
|
504173
|
-
init_useExitOnCtrlCDWithKeybindings();
|
|
504174
|
-
init_ink2();
|
|
504175
|
-
init_useKeybinding();
|
|
504176
|
-
init_config2();
|
|
504177
503925
|
init_config();
|
|
504178
503926
|
init_cwd();
|
|
504179
503927
|
init_fsOperations();
|
|
504180
503928
|
init_gracefulShutdown();
|
|
504181
|
-
init_CustomSelect();
|
|
504182
503929
|
init_PermissionDialog();
|
|
504183
|
-
init_utils14();
|
|
504184
503930
|
import_react325 = __toESM(require_react(), 1);
|
|
504185
503931
|
jsx_dev_runtime487 = __toESM(require_jsx_dev_runtime(), 1);
|
|
503932
|
+
OPTIONS = [
|
|
503933
|
+
{ label: "Yes, I trust this folder", value: "enable_all" },
|
|
503934
|
+
{ label: "No, exit", value: "exit" }
|
|
503935
|
+
];
|
|
504186
503936
|
});
|
|
504187
503937
|
|
|
504188
503938
|
// src/components/BypassPermissionsModeDialog.tsx
|
|
@@ -504202,7 +503952,7 @@ function BypassPermissionsModeDialog(t0) {
|
|
|
504202
503952
|
} else {
|
|
504203
503953
|
t1 = $2[0];
|
|
504204
503954
|
}
|
|
504205
|
-
import_react326.default.useEffect(
|
|
503955
|
+
import_react326.default.useEffect(_temp303, t1);
|
|
504206
503956
|
let t2;
|
|
504207
503957
|
if ($2[1] !== onAccept) {
|
|
504208
503958
|
t2 = function onChange2(value) {
|
|
@@ -504227,7 +503977,7 @@ function BypassPermissionsModeDialog(t0) {
|
|
|
504227
503977
|
t2 = $2[2];
|
|
504228
503978
|
}
|
|
504229
503979
|
const onChange = t2;
|
|
504230
|
-
const handleEscape =
|
|
503980
|
+
const handleEscape = _temp2101;
|
|
504231
503981
|
let t3;
|
|
504232
503982
|
if ($2[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
504233
503983
|
t3 = /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
@@ -504287,10 +504037,10 @@ function BypassPermissionsModeDialog(t0) {
|
|
|
504287
504037
|
}
|
|
504288
504038
|
return t5;
|
|
504289
504039
|
}
|
|
504290
|
-
function
|
|
504040
|
+
function _temp2101() {
|
|
504291
504041
|
gracefulShutdownSync(0);
|
|
504292
504042
|
}
|
|
504293
|
-
function
|
|
504043
|
+
function _temp303() {
|
|
504294
504044
|
logEvent("tengu_bypass_permissions_mode_dialog_shown", {});
|
|
504295
504045
|
}
|
|
504296
504046
|
var import_react326, jsx_dev_runtime488;
|
|
@@ -504321,7 +504071,7 @@ function ClaudeInChromeOnboarding(t0) {
|
|
|
504321
504071
|
t1 = () => {
|
|
504322
504072
|
logEvent("tengu_claude_in_chrome_onboarding_shown", {});
|
|
504323
504073
|
isChromeExtensionInstalled().then(setIsExtensionInstalled);
|
|
504324
|
-
saveGlobalConfig(
|
|
504074
|
+
saveGlobalConfig(_temp304);
|
|
504325
504075
|
};
|
|
504326
504076
|
t2 = [];
|
|
504327
504077
|
$2[0] = t1;
|
|
@@ -504470,7 +504220,7 @@ function ClaudeInChromeOnboarding(t0) {
|
|
|
504470
504220
|
}
|
|
504471
504221
|
return t11;
|
|
504472
504222
|
}
|
|
504473
|
-
function
|
|
504223
|
+
function _temp304(current) {
|
|
504474
504224
|
return {
|
|
504475
504225
|
...current,
|
|
504476
504226
|
hasCompletedClaudeInChromeOnboarding: true
|
|
@@ -504492,7 +504242,7 @@ function completeOnboarding() {
|
|
|
504492
504242
|
saveGlobalConfig((current) => ({
|
|
504493
504243
|
...current,
|
|
504494
504244
|
hasCompletedOnboarding: true,
|
|
504495
|
-
lastOnboardingVersion: "1.1.
|
|
504245
|
+
lastOnboardingVersion: "1.1.9"
|
|
504496
504246
|
}));
|
|
504497
504247
|
}
|
|
504498
504248
|
function showDialog(root3, renderer) {
|
|
@@ -505580,7 +505330,7 @@ function TeleportRepoMismatchDialog(t0) {
|
|
|
505580
505330
|
} else {
|
|
505581
505331
|
t32 = $2[7];
|
|
505582
505332
|
}
|
|
505583
|
-
t2 = [...availablePaths.map(
|
|
505333
|
+
t2 = [...availablePaths.map(_temp305), t32];
|
|
505584
505334
|
$2[5] = availablePaths;
|
|
505585
505335
|
$2[6] = t2;
|
|
505586
505336
|
} else {
|
|
@@ -505666,7 +505416,7 @@ function TeleportRepoMismatchDialog(t0) {
|
|
|
505666
505416
|
}
|
|
505667
505417
|
return t4;
|
|
505668
505418
|
}
|
|
505669
|
-
function
|
|
505419
|
+
function _temp305(path17) {
|
|
505670
505420
|
return {
|
|
505671
505421
|
label: /* @__PURE__ */ jsx_dev_runtime494.jsxDEV(ThemedText, {
|
|
505672
505422
|
children: [
|
|
@@ -505961,7 +505711,7 @@ function NoConversationsMessage() {
|
|
|
505961
505711
|
} else {
|
|
505962
505712
|
t0 = $2[0];
|
|
505963
505713
|
}
|
|
505964
|
-
useKeybinding("app:interrupt",
|
|
505714
|
+
useKeybinding("app:interrupt", _temp306, t0);
|
|
505965
505715
|
let t1;
|
|
505966
505716
|
if ($2[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
505967
505717
|
t1 = /* @__PURE__ */ jsx_dev_runtime495.jsxDEV(ThemedBox_default, {
|
|
@@ -505982,7 +505732,7 @@ function NoConversationsMessage() {
|
|
|
505982
505732
|
}
|
|
505983
505733
|
return t1;
|
|
505984
505734
|
}
|
|
505985
|
-
function
|
|
505735
|
+
function _temp306() {
|
|
505986
505736
|
process.exit(1);
|
|
505987
505737
|
}
|
|
505988
505738
|
function CrossProjectMessage(t0) {
|
|
@@ -505997,7 +505747,7 @@ function CrossProjectMessage(t0) {
|
|
|
505997
505747
|
} else {
|
|
505998
505748
|
t1 = $2[0];
|
|
505999
505749
|
}
|
|
506000
|
-
import_react332.default.useEffect(
|
|
505750
|
+
import_react332.default.useEffect(_temp356, t1);
|
|
506001
505751
|
let t2;
|
|
506002
505752
|
if ($2[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
506003
505753
|
t2 = /* @__PURE__ */ jsx_dev_runtime495.jsxDEV(ThemedText, {
|
|
@@ -506063,11 +505813,11 @@ function CrossProjectMessage(t0) {
|
|
|
506063
505813
|
}
|
|
506064
505814
|
return t6;
|
|
506065
505815
|
}
|
|
506066
|
-
function
|
|
506067
|
-
const timeout2 = setTimeout(
|
|
505816
|
+
function _temp356() {
|
|
505817
|
+
const timeout2 = setTimeout(_temp2102, 100);
|
|
506068
505818
|
return () => clearTimeout(timeout2);
|
|
506069
505819
|
}
|
|
506070
|
-
function
|
|
505820
|
+
function _temp2102() {
|
|
506071
505821
|
process.exit(0);
|
|
506072
505822
|
}
|
|
506073
505823
|
var import_react332, jsx_dev_runtime495;
|
|
@@ -509051,7 +508801,7 @@ function appendToLog(path17, message) {
|
|
|
509051
508801
|
cwd: getFsImplementation().cwd(),
|
|
509052
508802
|
userType: process.env.USER_TYPE,
|
|
509053
508803
|
sessionId: getSessionId(),
|
|
509054
|
-
version: "1.1.
|
|
508804
|
+
version: "1.1.9"
|
|
509055
508805
|
};
|
|
509056
508806
|
getLogWriter(path17).write(messageWithTimestamp);
|
|
509057
508807
|
}
|
|
@@ -513051,8 +512801,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
513051
512801
|
}
|
|
513052
512802
|
async function checkEnvLessBridgeMinVersion() {
|
|
513053
512803
|
const cfg = await getEnvLessBridgeConfig();
|
|
513054
|
-
if (cfg.min_version && lt("1.1.
|
|
513055
|
-
return `Your version of localclawd (${"1.1.
|
|
512804
|
+
if (cfg.min_version && lt("1.1.9", cfg.min_version)) {
|
|
512805
|
+
return `Your version of localclawd (${"1.1.9"}) is too old for Remote Control.
|
|
513056
512806
|
Version ${cfg.min_version} or higher is required. Run \`localclawd update\` to update.`;
|
|
513057
512807
|
}
|
|
513058
512808
|
return null;
|
|
@@ -513524,7 +513274,7 @@ async function initBridgeCore(params) {
|
|
|
513524
513274
|
const rawApi = createBridgeApiClient({
|
|
513525
513275
|
baseUrl,
|
|
513526
513276
|
getAccessToken,
|
|
513527
|
-
runnerVersion: "1.1.
|
|
513277
|
+
runnerVersion: "1.1.9",
|
|
513528
513278
|
onDebug: logForDebugging,
|
|
513529
513279
|
onAuth401,
|
|
513530
513280
|
getTrustedDeviceToken
|
|
@@ -519180,7 +518930,7 @@ async function startMCPServer(cwd3, debug4, verbose) {
|
|
|
519180
518930
|
setCwd(cwd3);
|
|
519181
518931
|
const server = new Server({
|
|
519182
518932
|
name: "claude/tengu",
|
|
519183
|
-
version: "1.1.
|
|
518933
|
+
version: "1.1.9"
|
|
519184
518934
|
}, {
|
|
519185
518935
|
capabilities: {
|
|
519186
518936
|
tools: {}
|
|
@@ -520283,7 +520033,7 @@ function SetupNotes(t0) {
|
|
|
520283
520033
|
}
|
|
520284
520034
|
let t2;
|
|
520285
520035
|
if ($2[1] !== messages) {
|
|
520286
|
-
t2 = messages.map(
|
|
520036
|
+
t2 = messages.map(_temp307);
|
|
520287
520037
|
$2[1] = messages;
|
|
520288
520038
|
$2[2] = t2;
|
|
520289
520039
|
} else {
|
|
@@ -520307,7 +520057,7 @@ function SetupNotes(t0) {
|
|
|
520307
520057
|
}
|
|
520308
520058
|
return t3;
|
|
520309
520059
|
}
|
|
520310
|
-
function
|
|
520060
|
+
function _temp307(message, index) {
|
|
520311
520061
|
return /* @__PURE__ */ jsx_dev_runtime500.jsxDEV(ThemedBox_default, {
|
|
520312
520062
|
marginLeft: 2,
|
|
520313
520063
|
children: /* @__PURE__ */ jsx_dev_runtime500.jsxDEV(ThemedText, {
|
|
@@ -520785,7 +520535,7 @@ __export(exports_update, {
|
|
|
520785
520535
|
});
|
|
520786
520536
|
async function update() {
|
|
520787
520537
|
logEvent("tengu_update_check", {});
|
|
520788
|
-
writeToStdout(`Current version: ${"1.1.
|
|
520538
|
+
writeToStdout(`Current version: ${"1.1.9"}
|
|
520789
520539
|
`);
|
|
520790
520540
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
520791
520541
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -520860,8 +520610,8 @@ async function update() {
|
|
|
520860
520610
|
writeToStdout(`localclawd is managed by Homebrew.
|
|
520861
520611
|
`);
|
|
520862
520612
|
const latest = await getLatestVersion(channel);
|
|
520863
|
-
if (latest && !gte("1.1.
|
|
520864
|
-
writeToStdout(`Update available: ${"1.1.
|
|
520613
|
+
if (latest && !gte("1.1.9", latest)) {
|
|
520614
|
+
writeToStdout(`Update available: ${"1.1.9"} → ${latest}
|
|
520865
520615
|
`);
|
|
520866
520616
|
writeToStdout(`
|
|
520867
520617
|
`);
|
|
@@ -520877,8 +520627,8 @@ async function update() {
|
|
|
520877
520627
|
writeToStdout(`localclawd is managed by winget.
|
|
520878
520628
|
`);
|
|
520879
520629
|
const latest = await getLatestVersion(channel);
|
|
520880
|
-
if (latest && !gte("1.1.
|
|
520881
|
-
writeToStdout(`Update available: ${"1.1.
|
|
520630
|
+
if (latest && !gte("1.1.9", latest)) {
|
|
520631
|
+
writeToStdout(`Update available: ${"1.1.9"} → ${latest}
|
|
520882
520632
|
`);
|
|
520883
520633
|
writeToStdout(`
|
|
520884
520634
|
`);
|
|
@@ -520892,8 +520642,8 @@ async function update() {
|
|
|
520892
520642
|
writeToStdout(`localclawd is managed by apk.
|
|
520893
520643
|
`);
|
|
520894
520644
|
const latest = await getLatestVersion(channel);
|
|
520895
|
-
if (latest && !gte("1.1.
|
|
520896
|
-
writeToStdout(`Update available: ${"1.1.
|
|
520645
|
+
if (latest && !gte("1.1.9", latest)) {
|
|
520646
|
+
writeToStdout(`Update available: ${"1.1.9"} → ${latest}
|
|
520897
520647
|
`);
|
|
520898
520648
|
writeToStdout(`
|
|
520899
520649
|
`);
|
|
@@ -520958,11 +520708,11 @@ async function update() {
|
|
|
520958
520708
|
`);
|
|
520959
520709
|
await gracefulShutdown(1);
|
|
520960
520710
|
}
|
|
520961
|
-
if (result.latestVersion === "1.1.
|
|
520962
|
-
writeToStdout(source_default.green(`localclawd is up to date (${"1.1.
|
|
520711
|
+
if (result.latestVersion === "1.1.9") {
|
|
520712
|
+
writeToStdout(source_default.green(`localclawd is up to date (${"1.1.9"})`) + `
|
|
520963
520713
|
`);
|
|
520964
520714
|
} else {
|
|
520965
|
-
writeToStdout(source_default.green(`Successfully updated from ${"1.1.
|
|
520715
|
+
writeToStdout(source_default.green(`Successfully updated from ${"1.1.9"} to version ${result.latestVersion}`) + `
|
|
520966
520716
|
`);
|
|
520967
520717
|
await regenerateCompletionCache();
|
|
520968
520718
|
}
|
|
@@ -521022,12 +520772,12 @@ async function update() {
|
|
|
521022
520772
|
`);
|
|
521023
520773
|
await gracefulShutdown(1);
|
|
521024
520774
|
}
|
|
521025
|
-
if (latestVersion === "1.1.
|
|
521026
|
-
writeToStdout(source_default.green(`localclawd is up to date (${"1.1.
|
|
520775
|
+
if (latestVersion === "1.1.9") {
|
|
520776
|
+
writeToStdout(source_default.green(`localclawd is up to date (${"1.1.9"})`) + `
|
|
521027
520777
|
`);
|
|
521028
520778
|
await gracefulShutdown(0);
|
|
521029
520779
|
}
|
|
521030
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"1.1.
|
|
520780
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"1.1.9"})
|
|
521031
520781
|
`);
|
|
521032
520782
|
writeToStdout(`Installing update...
|
|
521033
520783
|
`);
|
|
@@ -521072,7 +520822,7 @@ async function update() {
|
|
|
521072
520822
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
521073
520823
|
switch (status2) {
|
|
521074
520824
|
case "success":
|
|
521075
|
-
writeToStdout(source_default.green(`Successfully updated from ${"1.1.
|
|
520825
|
+
writeToStdout(source_default.green(`Successfully updated from ${"1.1.9"} to version ${latestVersion}`) + `
|
|
521076
520826
|
`);
|
|
521077
520827
|
await regenerateCompletionCache();
|
|
521078
520828
|
break;
|
|
@@ -522337,7 +522087,7 @@ ${customInstructions}` : customInstructions;
|
|
|
522337
522087
|
}
|
|
522338
522088
|
}
|
|
522339
522089
|
logForDiagnosticsNoPII("info", "started", {
|
|
522340
|
-
version: "1.1.
|
|
522090
|
+
version: "1.1.9",
|
|
522341
522091
|
is_native_binary: isInBundledMode()
|
|
522342
522092
|
});
|
|
522343
522093
|
registerCleanup(async () => {
|
|
@@ -523121,7 +522871,7 @@ Usage: localclawd --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
523121
522871
|
pendingHookMessages
|
|
523122
522872
|
}, renderAndRun);
|
|
523123
522873
|
}
|
|
523124
|
-
}).version("1.1.
|
|
522874
|
+
}).version("1.1.9 (localClawd)", "-v, --version", "Output the version number");
|
|
523125
522875
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
523126
522876
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
523127
522877
|
if (canUserConfigureAdvisor()) {
|
|
@@ -523629,7 +523379,7 @@ if (false) {}
|
|
|
523629
523379
|
async function main2() {
|
|
523630
523380
|
const args = process.argv.slice(2);
|
|
523631
523381
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
523632
|
-
console.log(`${"1.1.
|
|
523382
|
+
console.log(`${"1.1.9"} (localclawd)`);
|
|
523633
523383
|
return;
|
|
523634
523384
|
}
|
|
523635
523385
|
const {
|
|
@@ -523713,4 +523463,4 @@ async function main2() {
|
|
|
523713
523463
|
}
|
|
523714
523464
|
main2();
|
|
523715
523465
|
|
|
523716
|
-
//# debugId=
|
|
523466
|
+
//# debugId=E10CFCD17A6A5D2D64756E2164756E21
|