localclawd 1.1.20 → 1.1.21

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +868 -1620
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -9919,10 +9919,14 @@ __export(exports_claude_for_chrome_mcp, {
9919
9919
  resourceFromAttributes: () => resourceFromAttributes,
9920
9920
  plot: () => plot,
9921
9921
  getSyntaxTheme: () => getSyntaxTheme,
9922
+ getSentinelCategory: () => getSentinelCategory,
9922
9923
  getMcpConfigForManifest: () => getMcpConfigForManifest,
9923
9924
  default: () => claude_for_chrome_mcp_default,
9925
+ createComputerUseMcpServer: () => createComputerUseMcpServer,
9924
9926
  createClaudeForChromeMcpServer: () => createClaudeForChromeMcpServer,
9925
9927
  context: () => context,
9928
+ buildComputerUseTools: () => buildComputerUseTools,
9929
+ bindSessionContext: () => bindSessionContext,
9926
9930
  __stub: () => __stub,
9927
9931
  SpanStatusCode: () => SpanStatusCode,
9928
9932
  SimpleSpanProcessor: () => SimpleSpanProcessor,
@@ -9946,8 +9950,10 @@ __export(exports_claude_for_chrome_mcp, {
9946
9950
  InstrumentType: () => InstrumentType,
9947
9951
  ExportResultCode: () => ExportResultCode,
9948
9952
  DataPointType: () => DataPointType,
9953
+ DEFAULT_GRANT_FLAGS: () => DEFAULT_GRANT_FLAGS,
9949
9954
  ColorFile: () => ColorFile,
9950
9955
  ColorDiff: () => ColorDiff,
9956
+ CLI_CU_CAPABILITIES: () => CLI_CU_CAPABILITIES,
9951
9957
  BatchSpanProcessor: () => BatchSpanProcessor,
9952
9958
  BatchLogRecordProcessor: () => BatchLogRecordProcessor,
9953
9959
  BasicTracerProvider: () => BasicTracerProvider,
@@ -9957,7 +9963,7 @@ __export(exports_claude_for_chrome_mcp, {
9957
9963
  ATTR_SERVICE_NAME: () => ATTR_SERVICE_NAME
9958
9964
  });
9959
9965
  var noop3 = () => null, noopClass = class {
9960
- }, handler, stub, claude_for_chrome_mcp_default, __stub = true, SandboxViolationStore = null, SandboxManager, SandboxRuntimeConfigSchema, BROWSER_TOOLS, getMcpConfigForManifest, ColorDiff = null, ColorFile = null, getSyntaxTheme, plot, createClaudeForChromeMcpServer, ExportResultCode, resourceFromAttributes, Resource, SimpleSpanProcessor, BatchSpanProcessor, NodeTracerProvider, BasicTracerProvider, OTLPTraceExporter, OTLPLogExporter, OTLPMetricExporter, PrometheusExporter, LoggerProvider, SimpleLogRecordProcessor, BatchLogRecordProcessor, MeterProvider, PeriodicExportingMetricReader, trace, context, SpanStatusCode, ATTR_SERVICE_NAME = "service.name", ATTR_SERVICE_VERSION = "service.version", SEMRESATTRS_SERVICE_NAME = "service.name", SEMRESATTRS_SERVICE_VERSION = "service.version", AggregationTemporality, DataPointType, InstrumentType, PushMetricExporter, SeverityNumber;
9966
+ }, handler, stub, claude_for_chrome_mcp_default, __stub = true, SandboxViolationStore = null, SandboxManager, SandboxRuntimeConfigSchema, BROWSER_TOOLS, CLI_CU_CAPABILITIES, getMcpConfigForManifest, ColorDiff = null, ColorFile = null, getSyntaxTheme, plot, createClaudeForChromeMcpServer, buildComputerUseTools = () => [], createComputerUseMcpServer, bindSessionContext, DEFAULT_GRANT_FLAGS, getSentinelCategory, ExportResultCode, resourceFromAttributes, Resource, SimpleSpanProcessor, BatchSpanProcessor, NodeTracerProvider, BasicTracerProvider, OTLPTraceExporter, OTLPLogExporter, OTLPMetricExporter, PrometheusExporter, LoggerProvider, SimpleLogRecordProcessor, BatchLogRecordProcessor, MeterProvider, PeriodicExportingMetricReader, trace, context, SpanStatusCode, ATTR_SERVICE_NAME = "service.name", ATTR_SERVICE_VERSION = "service.version", SEMRESATTRS_SERVICE_NAME = "service.name", SEMRESATTRS_SERVICE_VERSION = "service.version", AggregationTemporality, DataPointType, InstrumentType, PushMetricExporter, SeverityNumber;
9961
9967
  var init_claude_for_chrome_mcp = __esm(() => {
9962
9968
  handler = {
9963
9969
  get(_, prop) {
@@ -9979,10 +9985,15 @@ var init_claude_for_chrome_mcp = __esm(() => {
9979
9985
  SandboxManager = new Proxy({}, { get: () => noop3 });
9980
9986
  SandboxRuntimeConfigSchema = { parse: () => ({}) };
9981
9987
  BROWSER_TOOLS = [];
9988
+ CLI_CU_CAPABILITIES = { screenshotFiltering: "native", platform: "darwin" };
9982
9989
  getMcpConfigForManifest = noop3;
9983
9990
  getSyntaxTheme = noop3;
9984
9991
  plot = noop3;
9985
9992
  createClaudeForChromeMcpServer = noop3;
9993
+ createComputerUseMcpServer = noop3;
9994
+ bindSessionContext = noop3;
9995
+ DEFAULT_GRANT_FLAGS = {};
9996
+ getSentinelCategory = noop3;
9986
9997
  ExportResultCode = { SUCCESS: 0, FAILED: 1 };
9987
9998
  resourceFromAttributes = noop3;
9988
9999
  Resource = noopClass;
@@ -89228,7 +89239,7 @@ var init_isEqual = __esm(() => {
89228
89239
 
89229
89240
  // src/utils/userAgent.ts
89230
89241
  function getClaudeCodeUserAgent() {
89231
- return `claude-code/${"1.1.20"}`;
89242
+ return `claude-code/${"1.1.21"}`;
89232
89243
  }
89233
89244
 
89234
89245
  // src/utils/workloadContext.ts
@@ -89250,7 +89261,7 @@ function getUserAgent() {
89250
89261
  const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
89251
89262
  const workload = getWorkload();
89252
89263
  const workloadSuffix = workload ? `, workload/${workload}` : "";
89253
- return `claude-cli/${"1.1.20"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
89264
+ return `claude-cli/${"1.1.21"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
89254
89265
  }
89255
89266
  function getMCPUserAgent() {
89256
89267
  const parts = [];
@@ -89264,7 +89275,7 @@ function getMCPUserAgent() {
89264
89275
  parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
89265
89276
  }
89266
89277
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
89267
- return `claude-code/${"1.1.20"}${suffix}`;
89278
+ return `claude-code/${"1.1.21"}${suffix}`;
89268
89279
  }
89269
89280
  function getWebFetchUserAgent() {
89270
89281
  return `Claude-User (${getClaudeCodeUserAgent()}; +https://support.anthropic.com/)`;
@@ -99173,7 +99184,7 @@ function getAttributionHeader(fingerprint) {
99173
99184
  if (!isAttributionHeaderEnabled()) {
99174
99185
  return "";
99175
99186
  }
99176
- const version = `${"1.1.20"}.${fingerprint}`;
99187
+ const version = `${"1.1.21"}.${fingerprint}`;
99177
99188
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
99178
99189
  const cch = "";
99179
99190
  const workload = getWorkload();
@@ -132720,7 +132731,7 @@ var init_metadata = __esm(() => {
132720
132731
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
132721
132732
  WHITESPACE_REGEX = /\s+/;
132722
132733
  getVersionBase = memoize_default(() => {
132723
- const match = "1.1.20".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
132734
+ const match = "1.1.21".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
132724
132735
  return match ? match[0] : undefined;
132725
132736
  });
132726
132737
  buildEnvContext = memoize_default(async () => {
@@ -132760,9 +132771,9 @@ var init_metadata = __esm(() => {
132760
132771
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
132761
132772
  isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
132762
132773
  isClaudeAiAuth: isClaudeAISubscriber(),
132763
- version: "1.1.20",
132774
+ version: "1.1.21",
132764
132775
  versionBase: getVersionBase(),
132765
- buildTime: "2026-04-09T17:12:16.788Z",
132776
+ buildTime: "2026-04-09T18:54:03.234Z",
132766
132777
  deploymentEnvironment: env4.detectDeploymentEnvironment(),
132767
132778
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
132768
132779
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -143725,10 +143736,14 @@ __export(exports_mcpb, {
143725
143736
  resourceFromAttributes: () => resourceFromAttributes2,
143726
143737
  plot: () => plot2,
143727
143738
  getSyntaxTheme: () => getSyntaxTheme2,
143739
+ getSentinelCategory: () => getSentinelCategory2,
143728
143740
  getMcpConfigForManifest: () => getMcpConfigForManifest2,
143729
143741
  default: () => mcpb_default,
143742
+ createComputerUseMcpServer: () => createComputerUseMcpServer2,
143730
143743
  createClaudeForChromeMcpServer: () => createClaudeForChromeMcpServer2,
143731
143744
  context: () => context2,
143745
+ buildComputerUseTools: () => buildComputerUseTools2,
143746
+ bindSessionContext: () => bindSessionContext2,
143732
143747
  __stub: () => __stub2,
143733
143748
  SpanStatusCode: () => SpanStatusCode2,
143734
143749
  SimpleSpanProcessor: () => SimpleSpanProcessor2,
@@ -143752,8 +143767,10 @@ __export(exports_mcpb, {
143752
143767
  InstrumentType: () => InstrumentType2,
143753
143768
  ExportResultCode: () => ExportResultCode2,
143754
143769
  DataPointType: () => DataPointType2,
143770
+ DEFAULT_GRANT_FLAGS: () => DEFAULT_GRANT_FLAGS2,
143755
143771
  ColorFile: () => ColorFile2,
143756
143772
  ColorDiff: () => ColorDiff2,
143773
+ CLI_CU_CAPABILITIES: () => CLI_CU_CAPABILITIES2,
143757
143774
  BatchSpanProcessor: () => BatchSpanProcessor2,
143758
143775
  BatchLogRecordProcessor: () => BatchLogRecordProcessor2,
143759
143776
  BasicTracerProvider: () => BasicTracerProvider2,
@@ -143763,7 +143780,7 @@ __export(exports_mcpb, {
143763
143780
  ATTR_SERVICE_NAME: () => ATTR_SERVICE_NAME2
143764
143781
  });
143765
143782
  var noop11 = () => null, noopClass2 = class {
143766
- }, handler5, stub5, mcpb_default, __stub2 = true, SandboxViolationStore3 = null, SandboxManager6, SandboxRuntimeConfigSchema3, BROWSER_TOOLS2, getMcpConfigForManifest2, ColorDiff2 = null, ColorFile2 = null, getSyntaxTheme2, plot2, createClaudeForChromeMcpServer2, ExportResultCode2, resourceFromAttributes2, Resource2, SimpleSpanProcessor2, BatchSpanProcessor2, NodeTracerProvider2, BasicTracerProvider2, OTLPTraceExporter2, OTLPLogExporter2, OTLPMetricExporter2, PrometheusExporter2, LoggerProvider2, SimpleLogRecordProcessor2, BatchLogRecordProcessor2, MeterProvider2, PeriodicExportingMetricReader2, trace2, context2, SpanStatusCode2, ATTR_SERVICE_NAME2 = "service.name", ATTR_SERVICE_VERSION2 = "service.version", SEMRESATTRS_SERVICE_NAME2 = "service.name", SEMRESATTRS_SERVICE_VERSION2 = "service.version", AggregationTemporality2, DataPointType2, InstrumentType2, PushMetricExporter2, SeverityNumber2;
143783
+ }, handler5, stub5, mcpb_default, __stub2 = true, SandboxViolationStore3 = null, SandboxManager6, SandboxRuntimeConfigSchema3, BROWSER_TOOLS2, CLI_CU_CAPABILITIES2, getMcpConfigForManifest2, ColorDiff2 = null, ColorFile2 = null, getSyntaxTheme2, plot2, createClaudeForChromeMcpServer2, buildComputerUseTools2 = () => [], createComputerUseMcpServer2, bindSessionContext2, DEFAULT_GRANT_FLAGS2, getSentinelCategory2, ExportResultCode2, resourceFromAttributes2, Resource2, SimpleSpanProcessor2, BatchSpanProcessor2, NodeTracerProvider2, BasicTracerProvider2, OTLPTraceExporter2, OTLPLogExporter2, OTLPMetricExporter2, PrometheusExporter2, LoggerProvider2, SimpleLogRecordProcessor2, BatchLogRecordProcessor2, MeterProvider2, PeriodicExportingMetricReader2, trace2, context2, SpanStatusCode2, ATTR_SERVICE_NAME2 = "service.name", ATTR_SERVICE_VERSION2 = "service.version", SEMRESATTRS_SERVICE_NAME2 = "service.name", SEMRESATTRS_SERVICE_VERSION2 = "service.version", AggregationTemporality2, DataPointType2, InstrumentType2, PushMetricExporter2, SeverityNumber2;
143767
143784
  var init_mcpb = __esm(() => {
143768
143785
  handler5 = {
143769
143786
  get(_, prop) {
@@ -143785,10 +143802,15 @@ var init_mcpb = __esm(() => {
143785
143802
  SandboxManager6 = new Proxy({}, { get: () => noop11 });
143786
143803
  SandboxRuntimeConfigSchema3 = { parse: () => ({}) };
143787
143804
  BROWSER_TOOLS2 = [];
143805
+ CLI_CU_CAPABILITIES2 = { screenshotFiltering: "native", platform: "darwin" };
143788
143806
  getMcpConfigForManifest2 = noop11;
143789
143807
  getSyntaxTheme2 = noop11;
143790
143808
  plot2 = noop11;
143791
143809
  createClaudeForChromeMcpServer2 = noop11;
143810
+ createComputerUseMcpServer2 = noop11;
143811
+ bindSessionContext2 = noop11;
143812
+ DEFAULT_GRANT_FLAGS2 = {};
143813
+ getSentinelCategory2 = noop11;
143792
143814
  ExportResultCode2 = { SUCCESS: 0, FAILED: 1 };
143793
143815
  resourceFromAttributes2 = noop11;
143794
143816
  Resource2 = noopClass2;
@@ -147682,7 +147704,7 @@ You are STRICTLY PROHIBITED from:
147682
147704
 
147683
147705
  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.
147684
147706
 
147685
- Check your ACTUAL available tools rather than assuming from this prompt. You may have browser automation (mcp__claude-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.
147707
+ Check your ACTUAL available tools rather than assuming from this prompt. You may have browser automation (mcp__claude-in-chrome__*, mcp__playwright__*, WebBrowser, web_screenshot), ${WEB_FETCH_TOOL_NAME}, or other MCP tools depending on the session — do not skip capabilities you didn't think to check for.
147686
147708
 
147687
147709
  === WHAT YOU RECEIVE ===
147688
147710
  You will receive: the original task description, files changed, approach taken, and optionally a plan file path.
@@ -147690,7 +147712,7 @@ You will receive: the original task description, files changed, approach taken,
147690
147712
  === VERIFICATION STRATEGY ===
147691
147713
  Adapt your strategy based on what was changed:
147692
147714
 
147693
- **Frontend changes**: Start dev server → check your tools for browser automation (mcp__claude-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
147715
+ **Frontend changes**: Start dev server → check your tools for browser automation (mcp__claude-in-chrome__*, mcp__playwright__*, WebBrowser, web_screenshot) and USE them to navigate, screenshot, click, inspect console, or capture rendered output — 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
147694
147716
  **Backend/API changes**: Start server → curl/fetch endpoints → verify response shapes against expected values (not just status codes) → test error handling → check edge cases
147695
147717
  **CLI/script changes**: Run with representative inputs → verify stdout/stderr/exit codes → test edge inputs (empty, malformed, boundary) → verify --help / usage output is accurate
147696
147718
  **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
@@ -147719,7 +147741,7 @@ You will feel the urge to skip checks. These are the exact excuses you reach for
147719
147741
  - "The implementer's tests already pass" — the implementer is an LLM. Verify independently.
147720
147742
  - "This is probably fine" — probably is not verified. Run it.
147721
147743
  - "Let me start the server and check the code" — no. Start the server and hit the endpoint.
147722
- - "I don't have a browser" — did you actually check for mcp__claude-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.
147744
+ - "I don't have a browser" — did you actually check for mcp__claude-in-chrome__* / mcp__playwright__* / WebBrowser / web_screenshot? If present, use them. If a tool fails, troubleshoot (server running? selector right?). The fallback exists so you don't invent your own "can't do this" story.
147723
147745
  - "This would take too long" — not your call.
147724
147746
  If you catch yourself writing an explanation instead of a command, stop. Run the command.
147725
147747
 
@@ -154704,10 +154726,14 @@ __export(exports_image_processor_napi, {
154704
154726
  resourceFromAttributes: () => resourceFromAttributes3,
154705
154727
  plot: () => plot3,
154706
154728
  getSyntaxTheme: () => getSyntaxTheme3,
154729
+ getSentinelCategory: () => getSentinelCategory3,
154707
154730
  getMcpConfigForManifest: () => getMcpConfigForManifest3,
154708
154731
  default: () => image_processor_napi_default,
154732
+ createComputerUseMcpServer: () => createComputerUseMcpServer3,
154709
154733
  createClaudeForChromeMcpServer: () => createClaudeForChromeMcpServer3,
154710
154734
  context: () => context3,
154735
+ buildComputerUseTools: () => buildComputerUseTools3,
154736
+ bindSessionContext: () => bindSessionContext3,
154711
154737
  __stub: () => __stub3,
154712
154738
  SpanStatusCode: () => SpanStatusCode3,
154713
154739
  SimpleSpanProcessor: () => SimpleSpanProcessor3,
@@ -154731,8 +154757,10 @@ __export(exports_image_processor_napi, {
154731
154757
  InstrumentType: () => InstrumentType3,
154732
154758
  ExportResultCode: () => ExportResultCode3,
154733
154759
  DataPointType: () => DataPointType3,
154760
+ DEFAULT_GRANT_FLAGS: () => DEFAULT_GRANT_FLAGS3,
154734
154761
  ColorFile: () => ColorFile3,
154735
154762
  ColorDiff: () => ColorDiff3,
154763
+ CLI_CU_CAPABILITIES: () => CLI_CU_CAPABILITIES3,
154736
154764
  BatchSpanProcessor: () => BatchSpanProcessor3,
154737
154765
  BatchLogRecordProcessor: () => BatchLogRecordProcessor3,
154738
154766
  BasicTracerProvider: () => BasicTracerProvider3,
@@ -154742,7 +154770,7 @@ __export(exports_image_processor_napi, {
154742
154770
  ATTR_SERVICE_NAME: () => ATTR_SERVICE_NAME3
154743
154771
  });
154744
154772
  var noop12 = () => null, noopClass3 = class {
154745
- }, handler6, stub6, image_processor_napi_default, __stub3 = true, SandboxViolationStore4 = null, SandboxManager7, SandboxRuntimeConfigSchema4, BROWSER_TOOLS3, getMcpConfigForManifest3, ColorDiff3 = null, ColorFile3 = null, getSyntaxTheme3, plot3, createClaudeForChromeMcpServer3, ExportResultCode3, resourceFromAttributes3, Resource3, SimpleSpanProcessor3, BatchSpanProcessor3, NodeTracerProvider3, BasicTracerProvider3, OTLPTraceExporter3, OTLPLogExporter3, OTLPMetricExporter3, PrometheusExporter3, LoggerProvider3, SimpleLogRecordProcessor3, BatchLogRecordProcessor3, MeterProvider3, PeriodicExportingMetricReader3, trace3, context3, SpanStatusCode3, ATTR_SERVICE_NAME3 = "service.name", ATTR_SERVICE_VERSION3 = "service.version", SEMRESATTRS_SERVICE_NAME3 = "service.name", SEMRESATTRS_SERVICE_VERSION3 = "service.version", AggregationTemporality3, DataPointType3, InstrumentType3, PushMetricExporter3, SeverityNumber3;
154773
+ }, handler6, stub6, image_processor_napi_default, __stub3 = true, SandboxViolationStore4 = null, SandboxManager7, SandboxRuntimeConfigSchema4, BROWSER_TOOLS3, CLI_CU_CAPABILITIES3, getMcpConfigForManifest3, ColorDiff3 = null, ColorFile3 = null, getSyntaxTheme3, plot3, createClaudeForChromeMcpServer3, buildComputerUseTools3 = () => [], createComputerUseMcpServer3, bindSessionContext3, DEFAULT_GRANT_FLAGS3, getSentinelCategory3, ExportResultCode3, resourceFromAttributes3, Resource3, SimpleSpanProcessor3, BatchSpanProcessor3, NodeTracerProvider3, BasicTracerProvider3, OTLPTraceExporter3, OTLPLogExporter3, OTLPMetricExporter3, PrometheusExporter3, LoggerProvider3, SimpleLogRecordProcessor3, BatchLogRecordProcessor3, MeterProvider3, PeriodicExportingMetricReader3, trace3, context3, SpanStatusCode3, ATTR_SERVICE_NAME3 = "service.name", ATTR_SERVICE_VERSION3 = "service.version", SEMRESATTRS_SERVICE_NAME3 = "service.name", SEMRESATTRS_SERVICE_VERSION3 = "service.version", AggregationTemporality3, DataPointType3, InstrumentType3, PushMetricExporter3, SeverityNumber3;
154746
154774
  var init_image_processor_napi = __esm(() => {
154747
154775
  handler6 = {
154748
154776
  get(_2, prop) {
@@ -154764,10 +154792,15 @@ var init_image_processor_napi = __esm(() => {
154764
154792
  SandboxManager7 = new Proxy({}, { get: () => noop12 });
154765
154793
  SandboxRuntimeConfigSchema4 = { parse: () => ({}) };
154766
154794
  BROWSER_TOOLS3 = [];
154795
+ CLI_CU_CAPABILITIES3 = { screenshotFiltering: "native", platform: "darwin" };
154767
154796
  getMcpConfigForManifest3 = noop12;
154768
154797
  getSyntaxTheme3 = noop12;
154769
154798
  plot3 = noop12;
154770
154799
  createClaudeForChromeMcpServer3 = noop12;
154800
+ createComputerUseMcpServer3 = noop12;
154801
+ bindSessionContext3 = noop12;
154802
+ DEFAULT_GRANT_FLAGS3 = {};
154803
+ getSentinelCategory3 = noop12;
154771
154804
  ExportResultCode3 = { SUCCESS: 0, FAILED: 1 };
154772
154805
  resourceFromAttributes3 = noop12;
154773
154806
  Resource3 = noopClass3;
@@ -154801,10 +154834,14 @@ __export(exports_sharp, {
154801
154834
  resourceFromAttributes: () => resourceFromAttributes4,
154802
154835
  plot: () => plot4,
154803
154836
  getSyntaxTheme: () => getSyntaxTheme4,
154837
+ getSentinelCategory: () => getSentinelCategory4,
154804
154838
  getMcpConfigForManifest: () => getMcpConfigForManifest4,
154805
154839
  default: () => sharp_default,
154840
+ createComputerUseMcpServer: () => createComputerUseMcpServer4,
154806
154841
  createClaudeForChromeMcpServer: () => createClaudeForChromeMcpServer4,
154807
154842
  context: () => context4,
154843
+ buildComputerUseTools: () => buildComputerUseTools4,
154844
+ bindSessionContext: () => bindSessionContext4,
154808
154845
  __stub: () => __stub4,
154809
154846
  SpanStatusCode: () => SpanStatusCode4,
154810
154847
  SimpleSpanProcessor: () => SimpleSpanProcessor4,
@@ -154828,8 +154865,10 @@ __export(exports_sharp, {
154828
154865
  InstrumentType: () => InstrumentType4,
154829
154866
  ExportResultCode: () => ExportResultCode4,
154830
154867
  DataPointType: () => DataPointType4,
154868
+ DEFAULT_GRANT_FLAGS: () => DEFAULT_GRANT_FLAGS4,
154831
154869
  ColorFile: () => ColorFile4,
154832
154870
  ColorDiff: () => ColorDiff4,
154871
+ CLI_CU_CAPABILITIES: () => CLI_CU_CAPABILITIES4,
154833
154872
  BatchSpanProcessor: () => BatchSpanProcessor4,
154834
154873
  BatchLogRecordProcessor: () => BatchLogRecordProcessor4,
154835
154874
  BasicTracerProvider: () => BasicTracerProvider4,
@@ -154839,7 +154878,7 @@ __export(exports_sharp, {
154839
154878
  ATTR_SERVICE_NAME: () => ATTR_SERVICE_NAME4
154840
154879
  });
154841
154880
  var noop13 = () => null, noopClass4 = class {
154842
- }, handler7, stub7, sharp_default, __stub4 = true, SandboxViolationStore5 = null, SandboxManager8, SandboxRuntimeConfigSchema5, BROWSER_TOOLS4, getMcpConfigForManifest4, ColorDiff4 = null, ColorFile4 = null, getSyntaxTheme4, plot4, createClaudeForChromeMcpServer4, ExportResultCode4, resourceFromAttributes4, Resource4, SimpleSpanProcessor4, BatchSpanProcessor4, NodeTracerProvider4, BasicTracerProvider4, OTLPTraceExporter4, OTLPLogExporter4, OTLPMetricExporter4, PrometheusExporter4, LoggerProvider4, SimpleLogRecordProcessor4, BatchLogRecordProcessor4, MeterProvider4, PeriodicExportingMetricReader4, trace4, context4, SpanStatusCode4, ATTR_SERVICE_NAME4 = "service.name", ATTR_SERVICE_VERSION4 = "service.version", SEMRESATTRS_SERVICE_NAME4 = "service.name", SEMRESATTRS_SERVICE_VERSION4 = "service.version", AggregationTemporality4, DataPointType4, InstrumentType4, PushMetricExporter4, SeverityNumber4;
154881
+ }, handler7, stub7, sharp_default, __stub4 = true, SandboxViolationStore5 = null, SandboxManager8, SandboxRuntimeConfigSchema5, BROWSER_TOOLS4, CLI_CU_CAPABILITIES4, getMcpConfigForManifest4, ColorDiff4 = null, ColorFile4 = null, getSyntaxTheme4, plot4, createClaudeForChromeMcpServer4, buildComputerUseTools4 = () => [], createComputerUseMcpServer4, bindSessionContext4, DEFAULT_GRANT_FLAGS4, getSentinelCategory4, ExportResultCode4, resourceFromAttributes4, Resource4, SimpleSpanProcessor4, BatchSpanProcessor4, NodeTracerProvider4, BasicTracerProvider4, OTLPTraceExporter4, OTLPLogExporter4, OTLPMetricExporter4, PrometheusExporter4, LoggerProvider4, SimpleLogRecordProcessor4, BatchLogRecordProcessor4, MeterProvider4, PeriodicExportingMetricReader4, trace4, context4, SpanStatusCode4, ATTR_SERVICE_NAME4 = "service.name", ATTR_SERVICE_VERSION4 = "service.version", SEMRESATTRS_SERVICE_NAME4 = "service.name", SEMRESATTRS_SERVICE_VERSION4 = "service.version", AggregationTemporality4, DataPointType4, InstrumentType4, PushMetricExporter4, SeverityNumber4;
154843
154882
  var init_sharp = __esm(() => {
154844
154883
  handler7 = {
154845
154884
  get(_2, prop) {
@@ -154861,10 +154900,15 @@ var init_sharp = __esm(() => {
154861
154900
  SandboxManager8 = new Proxy({}, { get: () => noop13 });
154862
154901
  SandboxRuntimeConfigSchema5 = { parse: () => ({}) };
154863
154902
  BROWSER_TOOLS4 = [];
154903
+ CLI_CU_CAPABILITIES4 = { screenshotFiltering: "native", platform: "darwin" };
154864
154904
  getMcpConfigForManifest4 = noop13;
154865
154905
  getSyntaxTheme4 = noop13;
154866
154906
  plot4 = noop13;
154867
154907
  createClaudeForChromeMcpServer4 = noop13;
154908
+ createComputerUseMcpServer4 = noop13;
154909
+ bindSessionContext4 = noop13;
154910
+ DEFAULT_GRANT_FLAGS4 = {};
154911
+ getSentinelCategory4 = noop13;
154868
154912
  ExportResultCode4 = { SUCCESS: 0, FAILED: 1 };
154869
154913
  resourceFromAttributes4 = noop13;
154870
154914
  Resource4 = noopClass4;
@@ -197349,7 +197393,7 @@ function getTelemetryAttributes() {
197349
197393
  attributes["session.id"] = sessionId;
197350
197394
  }
197351
197395
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
197352
- attributes["app.version"] = "1.1.20";
197396
+ attributes["app.version"] = "1.1.21";
197353
197397
  }
197354
197398
  const oauthAccount = getOauthAccountInfo();
197355
197399
  if (oauthAccount) {
@@ -229410,7 +229454,7 @@ function getInstallationEnv() {
229410
229454
  return;
229411
229455
  }
229412
229456
  function getClaudeCodeVersion() {
229413
- return "1.1.20";
229457
+ return "1.1.21";
229414
229458
  }
229415
229459
  async function getInstalledVSCodeExtensionVersion(command) {
229416
229460
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -235012,7 +235056,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
235012
235056
  const client4 = new Client({
235013
235057
  name: "localclawd",
235014
235058
  title: "localclawd",
235015
- version: "1.1.20",
235059
+ version: "1.1.21",
235016
235060
  description: "local-first AI coding tool",
235017
235061
  websiteUrl: PRODUCT_URL
235018
235062
  }, {
@@ -235365,7 +235409,7 @@ var init_client9 = __esm(() => {
235365
235409
  const client4 = new Client({
235366
235410
  name: "localclawd",
235367
235411
  title: "localclawd",
235368
- version: "1.1.20",
235412
+ version: "1.1.21",
235369
235413
  description: "local-first AI coding tool",
235370
235414
  websiteUrl: PRODUCT_URL
235371
235415
  }, {
@@ -258557,7 +258601,7 @@ var init_user = __esm(() => {
258557
258601
  deviceId,
258558
258602
  sessionId: getSessionId(),
258559
258603
  email: getEmail(),
258560
- appVersion: "1.1.20",
258604
+ appVersion: "1.1.21",
258561
258605
  platform: getHostPlatformForAnalytics(),
258562
258606
  organizationUuid,
258563
258607
  accountUuid,
@@ -259881,7 +259925,7 @@ async function initializeBetaTracing(resource) {
259881
259925
  });
259882
259926
  logs.setGlobalLoggerProvider(loggerProvider);
259883
259927
  setLoggerProvider(loggerProvider);
259884
- const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.1.20");
259928
+ const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.1.21");
259885
259929
  setEventLogger(eventLogger);
259886
259930
  process.on("beforeExit", async () => {
259887
259931
  await loggerProvider?.forceFlush();
@@ -259921,7 +259965,7 @@ async function initializeTelemetry() {
259921
259965
  const platform3 = getPlatform();
259922
259966
  const baseAttributes = {
259923
259967
  [ATTR_SERVICE_NAME5]: "claude-code",
259924
- [ATTR_SERVICE_VERSION5]: "1.1.20"
259968
+ [ATTR_SERVICE_VERSION5]: "1.1.21"
259925
259969
  };
259926
259970
  if (platform3 === "wsl") {
259927
259971
  const wslVersion = getWslVersion();
@@ -259966,7 +260010,7 @@ async function initializeTelemetry() {
259966
260010
  } catch {}
259967
260011
  };
259968
260012
  registerCleanup(shutdownTelemetry2);
259969
- return meterProvider2.getMeter("com.anthropic.claude_code", "1.1.20");
260013
+ return meterProvider2.getMeter("com.anthropic.claude_code", "1.1.21");
259970
260014
  }
259971
260015
  const meterProvider = new MeterProvider5({
259972
260016
  resource,
@@ -259986,7 +260030,7 @@ async function initializeTelemetry() {
259986
260030
  });
259987
260031
  logs.setGlobalLoggerProvider(loggerProvider);
259988
260032
  setLoggerProvider(loggerProvider);
259989
- const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.1.20");
260033
+ const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "1.1.21");
259990
260034
  setEventLogger(eventLogger);
259991
260035
  logForDebugging("[3P telemetry] Event logger set successfully");
259992
260036
  process.on("beforeExit", async () => {
@@ -260048,7 +260092,7 @@ Current timeout: ${timeoutMs}ms
260048
260092
  }
260049
260093
  };
260050
260094
  registerCleanup(shutdownTelemetry);
260051
- return meterProvider.getMeter("com.anthropic.claude_code", "1.1.20");
260095
+ return meterProvider.getMeter("com.anthropic.claude_code", "1.1.21");
260052
260096
  }
260053
260097
  async function flushTelemetry() {
260054
260098
  const meterProvider = getMeterProvider();
@@ -261271,7 +261315,7 @@ function detectLinuxGlobPatternWarnings() {
261271
261315
  }
261272
261316
  async function getDoctorDiagnostic() {
261273
261317
  const installationType = await getCurrentInstallationType();
261274
- const version = typeof MACRO !== "undefined" ? "1.1.20" : "unknown";
261318
+ const version = typeof MACRO !== "undefined" ? "1.1.21" : "unknown";
261275
261319
  const installationPath = await getInstallationPath();
261276
261320
  const invokedBinary = getInvokedBinary();
261277
261321
  const multipleInstallations = await detectMultipleInstallations();
@@ -262212,8 +262256,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
262212
262256
  const maxVersion = await getMaxVersion();
262213
262257
  if (maxVersion && gt(version, maxVersion)) {
262214
262258
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version} to ${maxVersion}`);
262215
- if (gte("1.1.20", maxVersion)) {
262216
- logForDebugging(`Native installer: current version ${"1.1.20"} is already at or above maxVersion ${maxVersion}, skipping update`);
262259
+ if (gte("1.1.21", maxVersion)) {
262260
+ logForDebugging(`Native installer: current version ${"1.1.21"} is already at or above maxVersion ${maxVersion}, skipping update`);
262217
262261
  logEvent("tengu_native_update_skipped_max_version", {
262218
262262
  latency_ms: Date.now() - startTime,
262219
262263
  max_version: maxVersion,
@@ -262224,7 +262268,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
262224
262268
  version = maxVersion;
262225
262269
  }
262226
262270
  }
262227
- if (!forceReinstall && version === "1.1.20" && await versionIsAvailable(version) && await isPossibleLocalClawdBinary(executablePath)) {
262271
+ if (!forceReinstall && version === "1.1.21" && await versionIsAvailable(version) && await isPossibleLocalClawdBinary(executablePath)) {
262228
262272
  logForDebugging(`Found ${version} at ${executablePath}, skipping install`);
262229
262273
  logEvent("tengu_native_update_complete", {
262230
262274
  latency_ms: Date.now() - startTime,
@@ -263647,10 +263691,14 @@ __export(exports_plist, {
263647
263691
  resourceFromAttributes: () => resourceFromAttributes6,
263648
263692
  plot: () => plot5,
263649
263693
  getSyntaxTheme: () => getSyntaxTheme5,
263694
+ getSentinelCategory: () => getSentinelCategory5,
263650
263695
  getMcpConfigForManifest: () => getMcpConfigForManifest5,
263651
263696
  default: () => plist_default,
263697
+ createComputerUseMcpServer: () => createComputerUseMcpServer5,
263652
263698
  createClaudeForChromeMcpServer: () => createClaudeForChromeMcpServer5,
263653
263699
  context: () => context5,
263700
+ buildComputerUseTools: () => buildComputerUseTools5,
263701
+ bindSessionContext: () => bindSessionContext5,
263654
263702
  __stub: () => __stub5,
263655
263703
  SpanStatusCode: () => SpanStatusCode5,
263656
263704
  SimpleSpanProcessor: () => SimpleSpanProcessor5,
@@ -263674,8 +263722,10 @@ __export(exports_plist, {
263674
263722
  InstrumentType: () => InstrumentType5,
263675
263723
  ExportResultCode: () => ExportResultCode6,
263676
263724
  DataPointType: () => DataPointType5,
263725
+ DEFAULT_GRANT_FLAGS: () => DEFAULT_GRANT_FLAGS5,
263677
263726
  ColorFile: () => ColorFile5,
263678
263727
  ColorDiff: () => ColorDiff5,
263728
+ CLI_CU_CAPABILITIES: () => CLI_CU_CAPABILITIES5,
263679
263729
  BatchSpanProcessor: () => BatchSpanProcessor6,
263680
263730
  BatchLogRecordProcessor: () => BatchLogRecordProcessor6,
263681
263731
  BasicTracerProvider: () => BasicTracerProvider6,
@@ -263685,7 +263735,7 @@ __export(exports_plist, {
263685
263735
  ATTR_SERVICE_NAME: () => ATTR_SERVICE_NAME6
263686
263736
  });
263687
263737
  var noop15 = () => null, noopClass5 = class {
263688
- }, handler8, stub8, plist_default, __stub5 = true, SandboxViolationStore6 = null, SandboxManager9, SandboxRuntimeConfigSchema6, BROWSER_TOOLS5, getMcpConfigForManifest5, ColorDiff5 = null, ColorFile5 = null, getSyntaxTheme5, plot5, createClaudeForChromeMcpServer5, ExportResultCode6, resourceFromAttributes6, Resource5, SimpleSpanProcessor5, BatchSpanProcessor6, NodeTracerProvider5, BasicTracerProvider6, OTLPTraceExporter5, OTLPLogExporter5, OTLPMetricExporter5, PrometheusExporter5, LoggerProvider6, SimpleLogRecordProcessor5, BatchLogRecordProcessor6, MeterProvider6, PeriodicExportingMetricReader6, trace7, context5, SpanStatusCode5, ATTR_SERVICE_NAME6 = "service.name", ATTR_SERVICE_VERSION6 = "service.version", SEMRESATTRS_SERVICE_NAME5 = "service.name", SEMRESATTRS_SERVICE_VERSION5 = "service.version", AggregationTemporality6, DataPointType5, InstrumentType5, PushMetricExporter5, SeverityNumber5;
263738
+ }, handler8, stub8, plist_default, __stub5 = true, SandboxViolationStore6 = null, SandboxManager9, SandboxRuntimeConfigSchema6, BROWSER_TOOLS5, CLI_CU_CAPABILITIES5, getMcpConfigForManifest5, ColorDiff5 = null, ColorFile5 = null, getSyntaxTheme5, plot5, createClaudeForChromeMcpServer5, buildComputerUseTools5 = () => [], createComputerUseMcpServer5, bindSessionContext5, DEFAULT_GRANT_FLAGS5, getSentinelCategory5, ExportResultCode6, resourceFromAttributes6, Resource5, SimpleSpanProcessor5, BatchSpanProcessor6, NodeTracerProvider5, BasicTracerProvider6, OTLPTraceExporter5, OTLPLogExporter5, OTLPMetricExporter5, PrometheusExporter5, LoggerProvider6, SimpleLogRecordProcessor5, BatchLogRecordProcessor6, MeterProvider6, PeriodicExportingMetricReader6, trace7, context5, SpanStatusCode5, ATTR_SERVICE_NAME6 = "service.name", ATTR_SERVICE_VERSION6 = "service.version", SEMRESATTRS_SERVICE_NAME5 = "service.name", SEMRESATTRS_SERVICE_VERSION5 = "service.version", AggregationTemporality6, DataPointType5, InstrumentType5, PushMetricExporter5, SeverityNumber5;
263689
263739
  var init_plist = __esm(() => {
263690
263740
  handler8 = {
263691
263741
  get(_2, prop) {
@@ -263707,10 +263757,15 @@ var init_plist = __esm(() => {
263707
263757
  SandboxManager9 = new Proxy({}, { get: () => noop15 });
263708
263758
  SandboxRuntimeConfigSchema6 = { parse: () => ({}) };
263709
263759
  BROWSER_TOOLS5 = [];
263760
+ CLI_CU_CAPABILITIES5 = { screenshotFiltering: "native", platform: "darwin" };
263710
263761
  getMcpConfigForManifest5 = noop15;
263711
263762
  getSyntaxTheme5 = noop15;
263712
263763
  plot5 = noop15;
263713
263764
  createClaudeForChromeMcpServer5 = noop15;
263765
+ createComputerUseMcpServer5 = noop15;
263766
+ bindSessionContext5 = noop15;
263767
+ DEFAULT_GRANT_FLAGS5 = {};
263768
+ getSentinelCategory5 = noop15;
263714
263769
  ExportResultCode6 = { SUCCESS: 0, FAILED: 1 };
263715
263770
  resourceFromAttributes6 = noop15;
263716
263771
  Resource5 = noopClass5;
@@ -318234,9 +318289,6 @@ import {
318234
318289
  import { existsSync as existsSync5, mkdirSync as mkdirSync5, readFileSync as readFileSync9, writeFileSync as writeFileSync3 } from "fs";
318235
318290
  import { homedir as homedir23 } from "os";
318236
318291
  import { join as join79 } from "path";
318237
- function isSecretStorePersistent() {
318238
- return _persistent;
318239
- }
318240
318292
  function initSecretStore() {
318241
318293
  const key = process.env.LOCALCLAWD_SECRET_KEY;
318242
318294
  if (!key) {
@@ -318255,60 +318307,17 @@ function initSecretStore() {
318255
318307
  }
318256
318308
  _loaded = true;
318257
318309
  }
318258
- function setSecret(name, value) {
318259
- ensureLoaded();
318260
- _secrets.set(name, value);
318261
- maybePersist();
318262
- }
318263
318310
  function getSecret(name) {
318264
318311
  ensureLoaded();
318265
318312
  return _secrets.get(name);
318266
318313
  }
318267
- function deleteSecret(name) {
318268
- ensureLoaded();
318269
- const existed = _secrets.has(name);
318270
- _secrets.delete(name);
318271
- if (existed)
318272
- maybePersist();
318273
- return existed;
318274
- }
318275
- function listSecretNames() {
318276
- ensureLoaded();
318277
- return [..._secrets.keys()].sort();
318278
- }
318279
318314
  function ensureLoaded() {
318280
318315
  if (!_loaded)
318281
318316
  initSecretStore();
318282
318317
  }
318283
- function maybePersist() {
318284
- const key = process.env.LOCALCLAWD_SECRET_KEY;
318285
- if (!_persistent || !key)
318286
- return;
318287
- try {
318288
- saveToDisk(key);
318289
- } catch (e) {
318290
- logForDebugging(`[secrets] Failed to persist secrets: ${e}`, { level: "warn" });
318291
- }
318292
- }
318293
318318
  function deriveKey(passphrase, salt) {
318294
318319
  return pbkdf2Sync(passphrase, salt, PBKDF2_ITERATIONS, 32, "sha256");
318295
318320
  }
318296
- function saveToDisk(passphrase) {
318297
- const plaintext = JSON.stringify(Object.fromEntries(_secrets));
318298
- const salt = randomBytes10(32);
318299
- const iv = randomBytes10(12);
318300
- const key = deriveKey(passphrase, salt);
318301
- const cipher = createCipheriv("aes-256-gcm", key, iv);
318302
- const ciphertext = Buffer.concat([
318303
- cipher.update(plaintext, "utf8"),
318304
- cipher.final()
318305
- ]);
318306
- const authTag = cipher.getAuthTag();
318307
- const header = Buffer.from([VERSION5]);
318308
- const file = Buffer.concat([MAGIC, header, salt, iv, authTag, ciphertext]);
318309
- mkdirSync5(SECRETS_DIR, { recursive: true });
318310
- writeFileSync3(SECRETS_FILE, file, { mode: 384 });
318311
- }
318312
318321
  function loadFromDisk(passphrase) {
318313
318322
  if (!existsSync5(SECRETS_FILE))
318314
318323
  return new Map;
@@ -318344,802 +318353,13 @@ var init_secretStore = __esm(() => {
318344
318353
  _secrets = new Map;
318345
318354
  });
318346
318355
 
318347
- // src/tools/SecretsTool/SecretsTool.ts
318348
- import { z as z60 } from "zod/v4";
318349
- var SecretSetTool, SecretGetTool, SecretDeleteTool, SecretListTool;
318350
- var init_SecretsTool = __esm(() => {
318351
- init_Tool();
318352
- init_secretStore();
318353
- SecretSetTool = buildTool({
318354
- name: "secret_set",
318355
- description: `Store a named secret securely. The value is encrypted with AES-256-GCM and ${process.env.LOCALCLAWD_SECRET_KEY ? "persisted to disk (LOCALCLAWD_SECRET_KEY is set)." : "kept in memory only this session (set LOCALCLAWD_SECRET_KEY to persist)."} Use this for API keys, passwords, wallet private keys, etc. The value is NEVER stored as plaintext.`,
318356
- async prompt() {
318357
- return "Store a named secret securely (encrypted). Use for API keys, passwords, private keys, etc.";
318358
- },
318359
- inputSchema: z60.object({
318360
- name: z60.string().describe('Name for the secret (e.g. "openai_api_key", "wallet_private_key"). Use snake_case.'),
318361
- value: z60.string().describe("The secret value to store. Will be encrypted immediately.")
318362
- }),
318363
- isReadOnly: () => false,
318364
- async call({ name, value }) {
318365
- const cleanName = name.trim().toLowerCase().replace(/\s+/g, "_");
318366
- if (!cleanName) {
318367
- return { type: "text", text: "Error: secret name cannot be empty." };
318368
- }
318369
- setSecret(cleanName, value);
318370
- const persistent = isSecretStorePersistent();
318371
- return {
318372
- type: "text",
318373
- text: persistent ? `Secret "${cleanName}" stored (encrypted, persisted to disk).` : `Secret "${cleanName}" stored in memory (session-only — set LOCALCLAWD_SECRET_KEY to persist across restarts).`
318374
- };
318375
- },
318376
- renderToolUseMessage: (input) => `Store secret: ${input.name} (${input.value.length} chars)`,
318377
- renderToolResultMessage: (result) => result.text
318378
- });
318379
- SecretGetTool = buildTool({
318380
- name: "secret_get",
318381
- description: "Retrieve a stored secret by name. Returns the decrypted value. Only call this when you actually need to use the value.",
318382
- async prompt() {
318383
- return "Retrieve a stored secret by name. Returns the decrypted value.";
318384
- },
318385
- inputSchema: z60.object({
318386
- name: z60.string().describe("The secret name to retrieve.")
318387
- }),
318388
- isReadOnly: () => true,
318389
- async call({ name }) {
318390
- const value = getSecret(name.trim().toLowerCase());
318391
- if (value === undefined) {
318392
- const names = listSecretNames();
318393
- const hint = names.length > 0 ? ` Available secrets: ${names.join(", ")}` : " No secrets stored yet.";
318394
- return { type: "text", text: `Secret "${name}" not found.${hint}` };
318395
- }
318396
- return { type: "text", text: value };
318397
- },
318398
- renderToolUseMessage: (input) => `Get secret: ${input.name}`,
318399
- renderToolResultMessage: (result) => result.text.length > 60 ? `${result.text.slice(0, 30)}…[${result.text.length} chars]` : result.text
318400
- });
318401
- SecretDeleteTool = buildTool({
318402
- name: "secret_delete",
318403
- description: "Delete a stored secret permanently.",
318404
- async prompt() {
318405
- return "Delete a stored secret permanently.";
318406
- },
318407
- inputSchema: z60.object({
318408
- name: z60.string().describe("The secret name to delete.")
318409
- }),
318410
- isReadOnly: () => false,
318411
- isDestructive: () => true,
318412
- async call({ name }) {
318413
- const deleted = deleteSecret(name.trim().toLowerCase());
318414
- return {
318415
- type: "text",
318416
- text: deleted ? `Secret "${name}" deleted.` : `Secret "${name}" not found.`
318417
- };
318418
- },
318419
- renderToolUseMessage: (input) => `Delete secret: ${input.name}`,
318420
- renderToolResultMessage: (result) => result.text
318421
- });
318422
- SecretListTool = buildTool({
318423
- name: "secret_list",
318424
- description: "List all stored secret names. Values are never shown in the list.",
318425
- async prompt() {
318426
- return "List all stored secret names. Values are never shown in the list.";
318427
- },
318428
- inputSchema: z60.object({}),
318429
- isReadOnly: () => true,
318430
- async call() {
318431
- const names = listSecretNames();
318432
- const persistent = isSecretStorePersistent();
318433
- const header = persistent ? "Secrets (encrypted, persisted):" : "Secrets (session-only):";
318434
- if (names.length === 0) {
318435
- return { type: "text", text: `${header}
318436
- (none)` };
318437
- }
318438
- return {
318439
- type: "text",
318440
- text: `${header}
318441
- ${names.map((n) => ` • ${n}`).join(`
318442
- `)}`
318443
- };
318444
- },
318445
- renderToolUseMessage: () => "List secrets",
318446
- renderToolResultMessage: (result) => result.text
318447
- });
318448
- });
318449
-
318450
- // src/tools/CryptoTool/ethereum.ts
318451
- import { createECDH, createPrivateKey, sign as cryptoSign } from "crypto";
318452
- function keccak256(data) {
318453
- const state = new BigUint64Array(25);
318454
- const rateBytes = 136;
318455
- const input = Buffer.concat([data, Buffer.alloc(0)]);
318456
- const padded = Buffer.alloc(Math.ceil((input.length + 1) / rateBytes) * rateBytes);
318457
- input.copy(padded);
318458
- padded[input.length] = 1;
318459
- padded[padded.length - 1] |= 128;
318460
- for (let i2 = 0;i2 < padded.length; i2 += rateBytes) {
318461
- for (let j2 = 0;j2 < rateBytes / 8; j2++) {
318462
- state[j2] ^= padded.readBigUInt64LE(i2 + j2 * 8);
318463
- }
318464
- keccakF(state);
318465
- }
318466
- const out = Buffer.alloc(32);
318467
- for (let i2 = 0;i2 < 4; i2++) {
318468
- out.writeBigUInt64LE(state[i2], i2 * 8);
318469
- }
318470
- return out;
318471
- }
318472
- function rot64(n, r) {
318473
- r = r & 63;
318474
- return (n << BigInt(r) | n >> BigInt(64 - r)) & 0xFFFFFFFFFFFFFFFFn;
318475
- }
318476
- function keccakF(state) {
318477
- for (let round2 = 0;round2 < 24; round2++) {
318478
- const c5 = new BigUint64Array(5);
318479
- for (let x4 = 0;x4 < 5; x4++)
318480
- c5[x4] = state[x4] ^ state[x4 + 5] ^ state[x4 + 10] ^ state[x4 + 15] ^ state[x4 + 20];
318481
- const d = new BigUint64Array(5);
318482
- for (let x4 = 0;x4 < 5; x4++)
318483
- d[x4] = c5[(x4 + 4) % 5] ^ rot64(c5[(x4 + 1) % 5], 1);
318484
- for (let i2 = 0;i2 < 25; i2++)
318485
- state[i2] ^= d[i2 % 5];
318486
- const b3 = new BigUint64Array(25);
318487
- b3[0] = state[0];
318488
- for (let i2 = 1;i2 < 25; i2++)
318489
- b3[PIXY[i2 - 1]] = rot64(state[i2], ROTATIONS[i2 - 1]);
318490
- for (let x4 = 0;x4 < 5; x4++)
318491
- for (let y3 = 0;y3 < 5; y3++) {
318492
- const i2 = x4 + y3 * 5;
318493
- state[i2] = b3[i2] ^ ~b3[(x4 + 1) % 5 + y3 * 5] & b3[(x4 + 2) % 5 + y3 * 5];
318494
- }
318495
- state[0] ^= RC[round2];
318496
- }
318497
- }
318498
- function rawPrivKeyToKeyObject(privKey) {
318499
- const oidSecp256k1 = Buffer.from("06052b8104000a", "hex");
318500
- const oidContext = Buffer.from([160, oidSecp256k1.length, ...oidSecp256k1]);
318501
- const version = Buffer.from([2, 1, 1]);
318502
- const privKeyOctet = Buffer.concat([Buffer.from([4, 32]), privKey]);
318503
- const seqContent = Buffer.concat([version, privKeyOctet, oidContext]);
318504
- const der = Buffer.concat([Buffer.from([48, seqContent.length]), seqContent]);
318505
- return createPrivateKey({ key: der, format: "der", type: "sec1" });
318506
- }
318507
- function privateKeyToAddress(privKey) {
318508
- const ecdh = createECDH("secp256k1");
318509
- ecdh.setPrivateKey(privKey);
318510
- const pubKey = ecdh.getPublicKey();
318511
- const pubKeyNoPrefix = pubKey.slice(1);
318512
- const hash = keccak256(pubKeyNoPrefix);
318513
- const address = "0x" + hash.slice(12).toString("hex");
318514
- return toChecksumAddress(address);
318515
- }
318516
- function toChecksumAddress(address) {
318517
- const addr = address.toLowerCase().replace("0x", "");
318518
- const hash = keccak256(Buffer.from(addr, "ascii")).toString("hex");
318519
- let result = "0x";
318520
- for (let i2 = 0;i2 < 40; i2++) {
318521
- result += parseInt(hash[i2], 16) >= 8 ? addr[i2].toUpperCase() : addr[i2];
318522
- }
318523
- return result;
318524
- }
318525
- function ecSign(hash, privKey) {
318526
- const keyObj = rawPrivKeyToKeyObject(privKey);
318527
- const sig = cryptoSign(null, hash, {
318528
- key: keyObj,
318529
- dsaEncoding: "ieee-p1363"
318530
- });
318531
- const r = sig.slice(0, 32);
318532
- const s = sig.slice(32, 64);
318533
- const ecdh = createECDH("secp256k1");
318534
- ecdh.setPrivateKey(privKey);
318535
- const expectedPub = ecdh.getPublicKey("hex");
318536
- const v2 = recoverBit(hash, r, s, expectedPub);
318537
- return { r, s, v: v2 };
318538
- }
318539
- function recoverBit(hash, r, s, expectedPubHex) {
318540
- const p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2Fn;
318541
- const n = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141n;
318542
- const Gx = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798n;
318543
- const Gy = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8n;
318544
- const rBig = bufToBig(r);
318545
- const sBig = bufToBig(s);
318546
- const eBig = bufToBig(hash);
318547
- for (let recid = 0;recid < 4; recid++) {
318548
- try {
318549
- const x4 = rBig + BigInt(Math.floor(recid / 2)) * n;
318550
- if (x4 >= p)
318551
- continue;
318552
- const y22 = (modpow(x4, 3n, p) + 7n) % p;
318553
- let y3 = modpow(y22, (p + 1n) / 4n, p);
318554
- if ((y3 & 1n) !== BigInt(recid & 1))
318555
- y3 = p - y3;
318556
- const R2 = { x: x4, y: y3 };
318557
- const rInv = modInverse(rBig, n);
318558
- const sR = pointMul(R2, sBig, p);
318559
- const eG = pointMul({ x: Gx, y: Gy }, (n - eBig) % n, p);
318560
- const pub = pointAdd(sR, eG, p);
318561
- if (!pub)
318562
- continue;
318563
- const ecdh = createECDH("secp256k1");
318564
- const pubHex = "04" + bigToHex(pub.x).padStart(64, "0") + bigToHex(pub.y).padStart(64, "0");
318565
- if (pubHex === expectedPubHex)
318566
- return recid & 1;
318567
- } catch {
318568
- continue;
318569
- }
318570
- }
318571
- return 0;
318572
- }
318573
- function modpow(base, exp, mod) {
318574
- let result = 1n;
318575
- base = base % mod;
318576
- while (exp > 0n) {
318577
- if (exp & 1n)
318578
- result = result * base % mod;
318579
- exp >>= 1n;
318580
- base = base * base % mod;
318581
- }
318582
- return result;
318583
- }
318584
- function modInverse(a, m2) {
318585
- return modpow(a, m2 - 2n, m2);
318586
- }
318587
- function pointAdd(P2, Q2, p) {
318588
- if (P2.x === Q2.x && P2.y === Q2.y)
318589
- return pointDouble(P2, p);
318590
- const dx = ((Q2.x - P2.x) % p + p) % p;
318591
- const dy = ((Q2.y - P2.y) % p + p) % p;
318592
- const m2 = dy * modInverse(dx, p) % p;
318593
- const x4 = ((m2 * m2 - P2.x - Q2.x) % p + p) % p;
318594
- const y3 = ((m2 * (P2.x - x4) - P2.y) % p + p) % p;
318595
- return { x: x4, y: y3 };
318596
- }
318597
- function pointDouble(P2, p) {
318598
- const m2 = 3n * P2.x * P2.x * modInverse(2n * P2.y, p) % p;
318599
- const x4 = ((m2 * m2 - 2n * P2.x) % p + p) % p;
318600
- const y3 = ((m2 * (P2.x - x4) - P2.y) % p + p) % p;
318601
- return { x: x4, y: y3 };
318602
- }
318603
- function pointMul(P2, k2, p) {
318604
- let R2 = null;
318605
- let Q2 = P2;
318606
- while (k2 > 0n) {
318607
- if (k2 & 1n)
318608
- R2 = R2 ? pointAdd(R2, Q2, p) : Q2;
318609
- Q2 = pointDouble(Q2, p);
318610
- k2 >>= 1n;
318611
- }
318612
- return R2;
318613
- }
318614
- function bufToBig(b3) {
318615
- return BigInt("0x" + b3.toString("hex"));
318616
- }
318617
- function bigToHex(n) {
318618
- return n.toString(16);
318619
- }
318620
- function rlpEncode(input) {
318621
- if (Buffer.isBuffer(input)) {
318622
- if (input.length === 1 && input[0] < 128)
318623
- return input;
318624
- const lenBuf2 = encodeLength(input.length, 128);
318625
- return Buffer.concat([lenBuf2, input]);
318626
- }
318627
- const encoded = input.map(rlpEncode);
318628
- const joined = Buffer.concat(encoded);
318629
- const lenBuf = encodeLength(joined.length, 192);
318630
- return Buffer.concat([lenBuf, joined]);
318631
- }
318632
- function encodeLength(len, offset) {
318633
- if (len < 56)
318634
- return Buffer.from([offset + len]);
318635
- const lenOfLen = Math.ceil(Math.log2(len + 1) / 8);
318636
- const buf = Buffer.alloc(lenOfLen);
318637
- let l = len;
318638
- for (let i2 = lenOfLen - 1;i2 >= 0; i2--) {
318639
- buf[i2] = l & 255;
318640
- l >>= 8;
318641
- }
318642
- return Buffer.concat([Buffer.from([offset + 55 + lenOfLen]), buf]);
318643
- }
318644
- function bigintToBuffer(n) {
318645
- if (n === 0n)
318646
- return Buffer.alloc(0);
318647
- const hex = n.toString(16).padStart(n.toString(16).length + n.toString(16).length % 2, "0");
318648
- return Buffer.from(hex, "hex");
318649
- }
318650
- async function rpc(endpoint, method, params) {
318651
- const res = await fetch(endpoint, {
318652
- method: "POST",
318653
- headers: { "Content-Type": "application/json" },
318654
- body: JSON.stringify({ jsonrpc: "2.0", method, params, id: 1 }),
318655
- signal: AbortSignal.timeout(15000)
318656
- });
318657
- const json = await res.json();
318658
- if (json.error)
318659
- throw new Error(`RPC error: ${json.error.message}`);
318660
- return json.result;
318661
- }
318662
- function getRpcEndpoint() {
318663
- return getSecret("eth_rpc_endpoint") ?? "https://cloudflare-eth.com";
318664
- }
318665
- function weiToEth(wei) {
318666
- const eth = Number(wei) / 1000000000000000000;
318667
- return eth.toFixed(6);
318668
- }
318669
- function ethToWei(eth) {
318670
- const [int, dec = ""] = eth.split(".");
318671
- const decPadded = dec.slice(0, 18).padEnd(18, "0");
318672
- return BigInt(int) * 10n ** 18n + BigInt(decPadded);
318673
- }
318674
- async function getBalance(address) {
318675
- const endpoint = getRpcEndpoint();
318676
- const result = await rpc(endpoint, "eth_getBalance", [address, "latest"]);
318677
- return BigInt(result);
318678
- }
318679
- async function getChainId() {
318680
- const endpoint = getRpcEndpoint();
318681
- const result = await rpc(endpoint, "eth_chainId", []);
318682
- return BigInt(result);
318683
- }
318684
- async function getNonce(address) {
318685
- const endpoint = getRpcEndpoint();
318686
- const result = await rpc(endpoint, "eth_getTransactionCount", [address, "latest"]);
318687
- return BigInt(result);
318688
- }
318689
- async function getGasPrice() {
318690
- const endpoint = getRpcEndpoint();
318691
- const result = await rpc(endpoint, "eth_gasPrice", []);
318692
- return BigInt(result);
318693
- }
318694
- async function sendRawTransaction(rawTx) {
318695
- const endpoint = getRpcEndpoint();
318696
- const result = await rpc(endpoint, "eth_sendRawTransaction", ["0x" + rawTx.toString("hex")]);
318697
- return result;
318698
- }
318699
- async function estimateGas(from, to, value) {
318700
- const endpoint = getRpcEndpoint();
318701
- const result = await rpc(endpoint, "eth_estimateGas", [{
318702
- from,
318703
- to,
318704
- value: "0x" + value.toString(16)
318705
- }]);
318706
- return BigInt(result);
318707
- }
318708
- async function sendEth(privateKeyHex, toAddress, ethAmount, chainId) {
318709
- const privKey = Buffer.from(privateKeyHex.replace("0x", ""), "hex");
318710
- const fromAddress = privateKeyToAddress(privKey);
318711
- const value = ethToWei(ethAmount);
318712
- const nonce = await getNonce(fromAddress);
318713
- const gasPrice = await getGasPrice();
318714
- const gasLimit = await estimateGas(fromAddress, toAddress, value);
318715
- const signingData = rlpEncode([
318716
- bigintToBuffer(nonce),
318717
- bigintToBuffer(gasPrice),
318718
- bigintToBuffer(gasLimit),
318719
- Buffer.from(toAddress.replace("0x", ""), "hex"),
318720
- bigintToBuffer(value),
318721
- Buffer.alloc(0),
318722
- bigintToBuffer(chainId),
318723
- Buffer.alloc(0),
318724
- Buffer.alloc(0)
318725
- ]);
318726
- const hash = keccak256(signingData);
318727
- const { r, s, v: recid } = ecSign(hash, privKey);
318728
- const v2 = chainId * 2n + 35n + BigInt(recid);
318729
- const signedTx = rlpEncode([
318730
- bigintToBuffer(nonce),
318731
- bigintToBuffer(gasPrice),
318732
- bigintToBuffer(gasLimit),
318733
- Buffer.from(toAddress.replace("0x", ""), "hex"),
318734
- bigintToBuffer(value),
318735
- Buffer.alloc(0),
318736
- bigintToBuffer(v2),
318737
- r,
318738
- s
318739
- ]);
318740
- return sendRawTransaction(signedTx);
318741
- }
318742
- var RC, ROTATIONS, PIXY;
318743
- var init_ethereum = __esm(() => {
318744
- init_secretStore();
318745
- RC = [
318746
- 0x0000000000000001n,
318747
- 0x0000000000008082n,
318748
- 0x800000000000808An,
318749
- 0x8000000080008000n,
318750
- 0x000000000000808Bn,
318751
- 0x0000000080000001n,
318752
- 0x8000000080008081n,
318753
- 0x8000000000008009n,
318754
- 0x000000000000008An,
318755
- 0x0000000000000088n,
318756
- 0x0000000080008009n,
318757
- 0x000000008000000An,
318758
- 0x000000008000808Bn,
318759
- 0x800000000000008Bn,
318760
- 0x8000000000008089n,
318761
- 0x8000000000008003n,
318762
- 0x8000000000008002n,
318763
- 0x8000000000000080n,
318764
- 0x000000000000800An,
318765
- 0x800000008000000An,
318766
- 0x8000000080008081n,
318767
- 0x8000000000008080n,
318768
- 0x0000000080000001n,
318769
- 0x8000000080008008n
318770
- ];
318771
- ROTATIONS = [
318772
- 1,
318773
- 62,
318774
- 28,
318775
- 27,
318776
- 36,
318777
- 44,
318778
- 6,
318779
- 55,
318780
- 20,
318781
- 3,
318782
- 10,
318783
- 43,
318784
- 25,
318785
- 39,
318786
- 41,
318787
- 45,
318788
- 15,
318789
- 21,
318790
- 8,
318791
- 18,
318792
- 2,
318793
- 61,
318794
- 56,
318795
- 14
318796
- ];
318797
- PIXY = [
318798
- 10,
318799
- 7,
318800
- 11,
318801
- 17,
318802
- 18,
318803
- 3,
318804
- 5,
318805
- 16,
318806
- 8,
318807
- 21,
318808
- 24,
318809
- 4,
318810
- 15,
318811
- 23,
318812
- 19,
318813
- 13,
318814
- 12,
318815
- 2,
318816
- 20,
318817
- 14,
318818
- 22,
318819
- 9,
318820
- 6,
318821
- 1,
318822
- 0
318823
- ];
318824
- });
318825
-
318826
- // src/tools/CryptoTool/CryptoTool.ts
318827
- import { z as z61 } from "zod/v4";
318828
- var getPrivKey = () => {
318829
- const raw = getSecret("eth_private_key");
318830
- if (!raw) {
318831
- return { error: 'No private key found. Use secret_set to store "eth_private_key" first.' };
318832
- }
318833
- return { key: raw.replace("0x", "") };
318834
- }, EthAddressTool, EthBalanceTool, EthSendTool;
318835
- var init_CryptoTool = __esm(() => {
318836
- init_Tool();
318837
- init_secretStore();
318838
- init_ethereum();
318839
- EthAddressTool = buildTool({
318840
- name: "eth_address",
318841
- description: 'Derive the Ethereum address from the stored private key (secret "eth_private_key"). ' + "Use this to find out what address to receive ETH at.",
318842
- async prompt() {
318843
- return "Derive the Ethereum address from the stored private key.";
318844
- },
318845
- inputSchema: z61.object({}),
318846
- isReadOnly: () => true,
318847
- async call() {
318848
- const res = getPrivKey();
318849
- if (res.error)
318850
- return { type: "text", text: res.error };
318851
- try {
318852
- const address = privateKeyToAddress(Buffer.from(res.key, "hex"));
318853
- return { type: "text", text: `Ethereum address: ${address}` };
318854
- } catch (e) {
318855
- return { type: "text", text: `Error deriving address: ${e}` };
318856
- }
318857
- },
318858
- renderToolUseMessage: () => "Get Ethereum address",
318859
- renderToolResultMessage: (r) => r.text
318860
- });
318861
- EthBalanceTool = buildTool({
318862
- name: "eth_balance",
318863
- description: "Get the ETH balance of any Ethereum address. " + "If no address is provided, uses the address derived from stored private key.",
318864
- async prompt() {
318865
- return "Get the ETH balance of any Ethereum address.";
318866
- },
318867
- inputSchema: z61.object({
318868
- address: z61.string().optional().describe('Ethereum address (0x...). Defaults to the address from stored "eth_private_key".')
318869
- }),
318870
- isReadOnly: () => true,
318871
- async call({ address }) {
318872
- let targetAddress = address;
318873
- if (!targetAddress) {
318874
- const res = getPrivKey();
318875
- if (res.error)
318876
- return { type: "text", text: res.error };
318877
- targetAddress = privateKeyToAddress(Buffer.from(res.key, "hex"));
318878
- }
318879
- try {
318880
- const wei = await getBalance(targetAddress);
318881
- const eth = weiToEth(wei);
318882
- return {
318883
- type: "text",
318884
- text: `Balance of ${targetAddress}: ${eth} ETH (${wei} wei)`
318885
- };
318886
- } catch (e) {
318887
- return { type: "text", text: `Error fetching balance: ${e}` };
318888
- }
318889
- },
318890
- renderToolUseMessage: (input) => `Get balance: ${input.address ?? "(own address)"}`,
318891
- renderToolResultMessage: (r) => r.text
318892
- });
318893
- EthSendTool = buildTool({
318894
- name: "eth_send",
318895
- description: 'Sign and broadcast an ETH transfer using the stored private key ("eth_private_key"). ' + "Returns the transaction hash. The RPC endpoint defaults to Cloudflare Ethereum " + 'but can be overridden by storing "eth_rpc_endpoint" as a secret.',
318896
- async prompt() {
318897
- return "Sign and broadcast an ETH transfer using the stored private key.";
318898
- },
318899
- inputSchema: z61.object({
318900
- to: z61.string().describe("Recipient Ethereum address (0x...)"),
318901
- amount_eth: z61.string().describe('Amount of ETH to send as a decimal string, e.g. "0.01"'),
318902
- chain_id: z61.number().optional().describe("Chain ID. Defaults to the network reported by the RPC endpoint. " + "1 = Ethereum mainnet, 11155111 = Sepolia.")
318903
- }),
318904
- isReadOnly: () => false,
318905
- isDestructive: () => true,
318906
- async call({ to, amount_eth, chain_id }) {
318907
- const res = getPrivKey();
318908
- if (res.error)
318909
- return { type: "text", text: res.error };
318910
- try {
318911
- const chainId = chain_id ? BigInt(chain_id) : await getChainId();
318912
- const txHash = await sendEth(res.key, to, amount_eth, chainId);
318913
- return {
318914
- type: "text",
318915
- text: `Transaction submitted!
318916
- Hash: ${txHash}
318917
- Amount: ${amount_eth} ETH → ${to}`
318918
- };
318919
- } catch (e) {
318920
- return { type: "text", text: `Error sending ETH: ${e}` };
318921
- }
318922
- },
318923
- renderToolUseMessage: (input) => `Send ${input.amount_eth} ETH → ${input.to.slice(0, 10)}…`,
318924
- renderToolResultMessage: (r) => r.text
318925
- });
318926
- });
318927
-
318928
- // src/tools/LocalWebSearchTool/LocalWebSearchTool.ts
318929
- import { z as z62 } from "zod/v4";
318930
- async function braveSearch(query2, apiKey, count2 = 8) {
318931
- const url3 = `https://api.search.brave.com/res/v1/web/search?q=${encodeURIComponent(query2)}&count=${count2}&text_decorations=false`;
318932
- const res = await fetch(url3, {
318933
- headers: {
318934
- Accept: "application/json",
318935
- "Accept-Encoding": "gzip",
318936
- "X-Subscription-Token": apiKey
318937
- },
318938
- signal: AbortSignal.timeout(12000)
318939
- });
318940
- if (!res.ok)
318941
- throw new Error(`Brave Search API error: ${res.status}`);
318942
- const data = await res.json();
318943
- return (data.web?.results ?? []).map((r) => ({
318944
- title: r.title ?? "",
318945
- url: r.url ?? "",
318946
- snippet: r.description ?? ""
318947
- }));
318948
- }
318949
- async function searxngSearch(query2, baseUrl, count2 = 8) {
318950
- const url3 = `${baseUrl.replace(/\/$/, "")}/search?q=${encodeURIComponent(query2)}&format=json&pageno=1`;
318951
- const res = await fetch(url3, {
318952
- headers: { Accept: "application/json" },
318953
- signal: AbortSignal.timeout(12000)
318954
- });
318955
- if (!res.ok)
318956
- throw new Error(`SearXNG error: ${res.status}`);
318957
- const data = await res.json();
318958
- return (data.results ?? []).slice(0, count2).map((r) => ({
318959
- title: r.title ?? "",
318960
- url: r.url ?? "",
318961
- snippet: r.content ?? ""
318962
- }));
318963
- }
318964
- async function duckduckgoSearch(query2, count2 = 8) {
318965
- const body = `q=${encodeURIComponent(query2)}&kl=en-us&kp=-2`;
318966
- const res = await fetch("https://lite.duckduckgo.com/lite/", {
318967
- method: "POST",
318968
- headers: {
318969
- "Content-Type": "application/x-www-form-urlencoded",
318970
- "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
318971
- Accept: "text/html,application/xhtml+xml"
318972
- },
318973
- body,
318974
- signal: AbortSignal.timeout(12000)
318975
- });
318976
- if (!res.ok)
318977
- throw new Error(`DuckDuckGo error: ${res.status}`);
318978
- const html = await res.text();
318979
- return parseDuckDuckGoLite(html, count2);
318980
- }
318981
- function parseDuckDuckGoLite(html, maxResults) {
318982
- const hits = [];
318983
- const linkRe = /<a[^>]+class="result-link"[^>]*href="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;
318984
- const snippetRe = /<td[^>]+class="result-snippet"[^>]*>([\s\S]*?)<\/td>/gi;
318985
- const links = [];
318986
- const snippets = [];
318987
- let lm;
318988
- while ((lm = linkRe.exec(html)) !== null && links.length < maxResults * 2) {
318989
- const url3 = lm[1].trim();
318990
- const title = lm[2].replace(/<[^>]+>/g, "").trim();
318991
- if (url3 && title && !url3.startsWith("//duckduckgo")) {
318992
- links.push([url3, title]);
318993
- }
318994
- }
318995
- let sm;
318996
- while ((sm = snippetRe.exec(html)) !== null) {
318997
- snippets.push(sm[1].replace(/<[^>]+>/g, "").trim());
318998
- }
318999
- for (let i2 = 0;i2 < Math.min(links.length, maxResults); i2++) {
319000
- hits.push({
319001
- url: links[i2][0],
319002
- title: links[i2][1],
319003
- snippet: snippets[i2] ?? ""
319004
- });
319005
- }
319006
- if (hits.length === 0) {
319007
- const hrefRe = /href="(https?:\/\/[^"]+)"[^>]*>([^<]{5,80})</gi;
319008
- let hm;
319009
- while ((hm = hrefRe.exec(html)) !== null && hits.length < maxResults) {
319010
- const url3 = hm[1];
319011
- const title = hm[2].trim();
319012
- if (!url3.includes("duckduckgo.com")) {
319013
- hits.push({ url: url3, title, snippet: "" });
319014
- }
319015
- }
319016
- }
319017
- return hits;
319018
- }
319019
- async function performSearch(query2, allowedDomains, blockedDomains) {
319020
- let results = [];
319021
- const errors = [];
319022
- const braveKey = getSecret("brave_api_key") ?? getSecret("BRAVE_API_KEY");
319023
- if (braveKey) {
319024
- try {
319025
- results = await braveSearch(query2, braveKey);
319026
- } catch (e) {
319027
- errors.push(`Brave: ${e}`);
319028
- }
319029
- }
319030
- if (results.length === 0) {
319031
- const searxUrl = getSecret("searxng_url") ?? process.env.SEARXNG_URL;
319032
- if (searxUrl) {
319033
- try {
319034
- results = await searxngSearch(query2, searxUrl);
319035
- } catch (e) {
319036
- errors.push(`SearXNG: ${e}`);
319037
- }
319038
- }
319039
- }
319040
- if (results.length === 0) {
319041
- try {
319042
- results = await duckduckgoSearch(query2);
319043
- } catch (e) {
319044
- errors.push(`DuckDuckGo: ${e}`);
319045
- }
319046
- }
319047
- if (results.length === 0 && errors.length > 0) {
319048
- throw new Error(`All search providers failed:
319049
- ${errors.join(`
319050
- `)}`);
319051
- }
319052
- if (allowedDomains?.length) {
319053
- const allowed = allowedDomains.map((d) => d.toLowerCase());
319054
- results = results.filter((r) => {
319055
- try {
319056
- return allowed.some((d) => new URL(r.url).hostname.includes(d));
319057
- } catch {
319058
- return false;
319059
- }
319060
- });
319061
- }
319062
- if (blockedDomains?.length) {
319063
- const blocked = blockedDomains.map((d) => d.toLowerCase());
319064
- results = results.filter((r) => {
319065
- try {
319066
- return !blocked.some((d) => new URL(r.url).hostname.includes(d));
319067
- } catch {
319068
- return true;
319069
- }
319070
- });
319071
- }
319072
- return results;
319073
- }
319074
- var LOCAL_WEB_SEARCH_TOOL_NAME = "web_search", LocalWebSearchTool;
319075
- var init_LocalWebSearchTool = __esm(() => {
319076
- init_Tool();
319077
- init_providers();
319078
- init_secretStore();
319079
- LocalWebSearchTool = buildTool({
319080
- name: LOCAL_WEB_SEARCH_TOOL_NAME,
319081
- description: `Search the web for current information, news, documentation, and research.
319082
- Returns titles, URLs, and snippets from top search results.
319083
-
319084
- Providers (in priority):
319085
- 1. Brave Search API — store "brave_api_key" via secret_set for best results
319086
- 2. SearXNG — store "searxng_url" via secret_set for self-hosted search
319087
- 3. DuckDuckGo — always available, no setup required
319088
-
319089
- After answering with search results, always include a Sources section with markdown links.`,
319090
- async prompt() {
319091
- return "Search the web for current information, news, documentation, and research. Returns titles, URLs, and snippets from top results.";
319092
- },
319093
- inputSchema: z62.object({
319094
- query: z62.string().min(2).describe("The search query"),
319095
- allowed_domains: z62.array(z62.string()).optional().describe('Only include results from these domains (e.g. ["github.com"])'),
319096
- blocked_domains: z62.array(z62.string()).optional().describe("Exclude results from these domains")
319097
- }),
319098
- isReadOnly: () => true,
319099
- isEnabled() {
319100
- return getAPIProvider() === "local";
319101
- },
319102
- async call({ query: query2, allowed_domains, blocked_domains }) {
319103
- const start = Date.now();
319104
- let results;
319105
- try {
319106
- results = await performSearch(query2, allowed_domains, blocked_domains);
319107
- } catch (e) {
319108
- return { type: "text", text: `Search failed: ${e}` };
319109
- }
319110
- if (results.length === 0) {
319111
- return { type: "text", text: `No results found for: ${query2}` };
319112
- }
319113
- const dur = ((Date.now() - start) / 1000).toFixed(1);
319114
- const lines = [
319115
- `Search results for: **${query2}** (${results.length} results, ${dur}s)
319116
- `,
319117
- ...results.map((r, i2) => `${i2 + 1}. **[${r.title}](${r.url})**
319118
- ${r.snippet || "(no snippet)"}`),
319119
- `
319120
- **Sources:**
319121
- ${results.map((r) => `- [${r.title}](${r.url})`).join(`
319122
- `)}`
319123
- ];
319124
- return { type: "text", text: lines.join(`
319125
- `) };
319126
- },
319127
- renderToolUseMessage: (input) => `Search: ${input.query}`,
319128
- renderToolResultMessage: (result) => {
319129
- const lines = result.text.split(`
319130
- `).filter(Boolean);
319131
- return lines[0] ?? result.text;
319132
- }
319133
- });
319134
- });
319135
-
319136
318356
  // src/tools/WebScreenshotTool/WebScreenshotTool.ts
319137
318357
  import { execFile as execFile5 } from "child_process";
319138
318358
  import { mkdtempSync, readFileSync as readFileSync10, rmSync as rmSync3 } from "fs";
319139
318359
  import { tmpdir as tmpdir6 } from "os";
319140
318360
  import { join as join80 } from "path";
319141
318361
  import { promisify as promisify2 } from "util";
319142
- import { z as z63 } from "zod/v4";
318362
+ import { z as z60 } from "zod/v4";
319143
318363
  async function findChrome() {
319144
318364
  for (const bin of CHROME_BINARIES) {
319145
318365
  try {
@@ -319228,7 +318448,7 @@ Returns:
319228
318448
 
319229
318449
  Setup for screenshots:
319230
318450
  • Install Chromium/Chrome and add to PATH, OR
319231
- Store a screenshot API URL: secret_set screenshot_api_url https://yourapiurl.com
318451
+ Set SCREENSHOT_API_URL to a screenshot endpoint if Chrome is unavailable
319232
318452
 
319233
318453
  Use this tool to:
319234
318454
  • Visually inspect webpage layouts
@@ -319237,15 +318457,15 @@ Use this tool to:
319237
318457
  async prompt() {
319238
318458
  return "Capture a webpage as a screenshot image for visual analysis, or fetch its text content if no browser is available.";
319239
318459
  },
319240
- inputSchema: z63.object({
319241
- url: z63.string().describe("The URL to screenshot or fetch"),
319242
- width: z63.number().optional().default(1280).describe("Viewport width in pixels"),
319243
- height: z63.number().optional().default(800).describe("Viewport height in pixels"),
319244
- text_fallback: z63.boolean().optional().default(true).describe("If true (default), return page text when screenshot unavailable")
318460
+ inputSchema: z60.object({
318461
+ url: z60.string().describe("The URL to screenshot or fetch"),
318462
+ width: z60.number().optional().default(1280).describe("Viewport width in pixels"),
318463
+ height: z60.number().optional().default(800).describe("Viewport height in pixels"),
318464
+ text_fallback: z60.boolean().optional().default(true).describe("If true (default), return page text when screenshot unavailable")
319245
318465
  }),
319246
318466
  isReadOnly: () => true,
319247
318467
  async call({ url: url3, width = 1280, height = 800, text_fallback = true }) {
319248
- const apiUrl = getSecret("screenshot_api_url") ?? getSecret("SCREENSHOT_API_URL");
318468
+ const apiUrl = process.env.SCREENSHOT_API_URL ?? getSecret("screenshot_api_url") ?? getSecret("SCREENSHOT_API_URL");
319249
318469
  if (apiUrl) {
319250
318470
  const buf2 = await screenshotViaApi(url3, apiUrl);
319251
318471
  if (buf2) {
@@ -319273,12 +318493,12 @@ URL: ${url3}
319273
318493
  ${text}
319274
318494
 
319275
318495
  ---
319276
- To enable screenshots: install Chromium and add to PATH, or set "screenshot_api_url" via secret_set.`
318496
+ To enable screenshots: install Chromium and add to PATH, or set SCREENSHOT_API_URL.`
319277
318497
  };
319278
318498
  }
319279
318499
  return {
319280
318500
  type: "text",
319281
- text: `Screenshot failed. Install Chromium/Chrome in PATH or set "screenshot_api_url" via secret_set.`
318501
+ text: `Screenshot failed. Install Chromium/Chrome in PATH or set SCREENSHOT_API_URL.`
319282
318502
  };
319283
318503
  },
319284
318504
  renderToolUseMessage: (input) => `Screenshot: ${input.url}`,
@@ -319382,7 +318602,7 @@ var init_UI20 = __esm(() => {
319382
318602
  });
319383
318603
 
319384
318604
  // src/tools/EnterWorktreeTool/EnterWorktreeTool.ts
319385
- import { z as z64 } from "zod/v4";
318605
+ import { z as z61 } from "zod/v4";
319386
318606
  var inputSchema27, outputSchema22, EnterWorktreeTool;
319387
318607
  var init_EnterWorktreeTool = __esm(() => {
319388
318608
  init_state();
@@ -319396,8 +318616,8 @@ var init_EnterWorktreeTool = __esm(() => {
319396
318616
  init_sessionStorage();
319397
318617
  init_worktree();
319398
318618
  init_UI20();
319399
- inputSchema27 = lazySchema(() => z64.strictObject({
319400
- name: z64.string().superRefine((s, ctx) => {
318619
+ inputSchema27 = lazySchema(() => z61.strictObject({
318620
+ name: z61.string().superRefine((s, ctx) => {
319401
318621
  try {
319402
318622
  validateWorktreeSlug(s);
319403
318623
  } catch (e) {
@@ -319405,10 +318625,10 @@ var init_EnterWorktreeTool = __esm(() => {
319405
318625
  }
319406
318626
  }).optional().describe('Optional name for the worktree. Each "/"-separated segment may contain only letters, digits, dots, underscores, and dashes; max 64 chars total. A random name is generated if not provided.')
319407
318627
  }));
319408
- outputSchema22 = lazySchema(() => z64.object({
319409
- worktreePath: z64.string(),
319410
- worktreeBranch: z64.string().optional(),
319411
- message: z64.string()
318628
+ outputSchema22 = lazySchema(() => z61.object({
318629
+ worktreePath: z61.string(),
318630
+ worktreeBranch: z61.string().optional(),
318631
+ message: z61.string()
319412
318632
  }));
319413
318633
  EnterWorktreeTool = buildTool({
319414
318634
  name: ENTER_WORKTREE_TOOL_NAME,
@@ -319551,7 +318771,7 @@ var init_UI21 = __esm(() => {
319551
318771
  });
319552
318772
 
319553
318773
  // src/tools/ExitWorktreeTool/ExitWorktreeTool.ts
319554
- import { z as z65 } from "zod/v4";
318774
+ import { z as z62 } from "zod/v4";
319555
318775
  async function countWorktreeChanges(worktreePath, originalHeadCommit) {
319556
318776
  const status = await execFileNoThrow("git", [
319557
318777
  "-C",
@@ -319605,19 +318825,19 @@ var init_ExitWorktreeTool = __esm(() => {
319605
318825
  init_sessionStorage();
319606
318826
  init_worktree();
319607
318827
  init_UI21();
319608
- inputSchema28 = lazySchema(() => z65.strictObject({
319609
- action: z65.enum(["keep", "remove"]).describe('"keep" leaves the worktree and branch on disk; "remove" deletes both.'),
319610
- discard_changes: z65.boolean().optional().describe('Required true when action is "remove" and the worktree has uncommitted files or unmerged commits. The tool will refuse and list them otherwise.')
318828
+ inputSchema28 = lazySchema(() => z62.strictObject({
318829
+ action: z62.enum(["keep", "remove"]).describe('"keep" leaves the worktree and branch on disk; "remove" deletes both.'),
318830
+ discard_changes: z62.boolean().optional().describe('Required true when action is "remove" and the worktree has uncommitted files or unmerged commits. The tool will refuse and list them otherwise.')
319611
318831
  }));
319612
- outputSchema23 = lazySchema(() => z65.object({
319613
- action: z65.enum(["keep", "remove"]),
319614
- originalCwd: z65.string(),
319615
- worktreePath: z65.string(),
319616
- worktreeBranch: z65.string().optional(),
319617
- tmuxSessionName: z65.string().optional(),
319618
- discardedFiles: z65.number().optional(),
319619
- discardedCommits: z65.number().optional(),
319620
- message: z65.string()
318832
+ outputSchema23 = lazySchema(() => z62.object({
318833
+ action: z62.enum(["keep", "remove"]),
318834
+ originalCwd: z62.string(),
318835
+ worktreePath: z62.string(),
318836
+ worktreeBranch: z62.string().optional(),
318837
+ tmuxSessionName: z62.string().optional(),
318838
+ discardedFiles: z62.number().optional(),
318839
+ discardedCommits: z62.number().optional(),
318840
+ message: z62.string()
319621
318841
  }));
319622
318842
  ExitWorktreeTool = buildTool({
319623
318843
  name: EXIT_WORKTREE_TOOL_NAME,
@@ -320561,7 +319781,7 @@ var init_UI22 = __esm(() => {
320561
319781
  });
320562
319782
 
320563
319783
  // src/tools/ConfigTool/ConfigTool.ts
320564
- import { z as z66 } from "zod/v4";
319784
+ import { z as z63 } from "zod/v4";
320565
319785
  function getValue2(source, path10) {
320566
319786
  if (source === "global") {
320567
319787
  const config = getGlobalConfig();
@@ -320602,18 +319822,18 @@ var init_ConfigTool = __esm(() => {
320602
319822
  init_prompt17();
320603
319823
  init_supportedSettings();
320604
319824
  init_UI22();
320605
- inputSchema29 = lazySchema(() => z66.strictObject({
320606
- setting: z66.string().describe('The setting key (e.g., "theme", "model", "permissions.defaultMode")'),
320607
- value: z66.union([z66.string(), z66.boolean(), z66.number()]).optional().describe("The new value. Omit to get current value.")
319825
+ inputSchema29 = lazySchema(() => z63.strictObject({
319826
+ setting: z63.string().describe('The setting key (e.g., "theme", "model", "permissions.defaultMode")'),
319827
+ value: z63.union([z63.string(), z63.boolean(), z63.number()]).optional().describe("The new value. Omit to get current value.")
320608
319828
  }));
320609
- outputSchema24 = lazySchema(() => z66.object({
320610
- success: z66.boolean(),
320611
- operation: z66.enum(["get", "set"]).optional(),
320612
- setting: z66.string().optional(),
320613
- value: z66.unknown().optional(),
320614
- previousValue: z66.unknown().optional(),
320615
- newValue: z66.unknown().optional(),
320616
- error: z66.string().optional()
319829
+ outputSchema24 = lazySchema(() => z63.object({
319830
+ success: z63.boolean(),
319831
+ operation: z63.enum(["get", "set"]).optional(),
319832
+ setting: z63.string().optional(),
319833
+ value: z63.unknown().optional(),
319834
+ previousValue: z63.unknown().optional(),
319835
+ newValue: z63.unknown().optional(),
319836
+ error: z63.string().optional()
320617
319837
  }));
320618
319838
  ConfigTool = buildTool({
320619
319839
  name: CONFIG_TOOL_NAME,
@@ -320901,7 +320121,7 @@ var init_prompt18 = __esm(() => {
320901
320121
  });
320902
320122
 
320903
320123
  // src/tools/TaskCreateTool/TaskCreateTool.ts
320904
- import { z as z67 } from "zod/v4";
320124
+ import { z as z64 } from "zod/v4";
320905
320125
  var inputSchema30, outputSchema25, TaskCreateTool;
320906
320126
  var init_TaskCreateTool = __esm(() => {
320907
320127
  init_Tool();
@@ -320909,16 +320129,16 @@ var init_TaskCreateTool = __esm(() => {
320909
320129
  init_tasks();
320910
320130
  init_teammate();
320911
320131
  init_prompt18();
320912
- inputSchema30 = lazySchema(() => z67.strictObject({
320913
- subject: z67.string().describe("A brief title for the task"),
320914
- description: z67.string().describe("What needs to be done"),
320915
- activeForm: z67.string().optional().describe('Present continuous form shown in spinner when in_progress (e.g., "Running tests")'),
320916
- metadata: z67.record(z67.string(), z67.unknown()).optional().describe("Arbitrary metadata to attach to the task")
320132
+ inputSchema30 = lazySchema(() => z64.strictObject({
320133
+ subject: z64.string().describe("A brief title for the task"),
320134
+ description: z64.string().describe("What needs to be done"),
320135
+ activeForm: z64.string().optional().describe('Present continuous form shown in spinner when in_progress (e.g., "Running tests")'),
320136
+ metadata: z64.record(z64.string(), z64.unknown()).optional().describe("Arbitrary metadata to attach to the task")
320917
320137
  }));
320918
- outputSchema25 = lazySchema(() => z67.object({
320919
- task: z67.object({
320920
- id: z67.string(),
320921
- subject: z67.string()
320138
+ outputSchema25 = lazySchema(() => z64.object({
320139
+ task: z64.object({
320140
+ id: z64.string(),
320141
+ subject: z64.string()
320922
320142
  })
320923
320143
  }));
320924
320144
  TaskCreateTool = buildTool({
@@ -321026,22 +320246,22 @@ Returns full task details:
321026
320246
  `;
321027
320247
 
321028
320248
  // src/tools/TaskGetTool/TaskGetTool.ts
321029
- import { z as z68 } from "zod/v4";
320249
+ import { z as z65 } from "zod/v4";
321030
320250
  var inputSchema31, outputSchema26, TaskGetTool;
321031
320251
  var init_TaskGetTool = __esm(() => {
321032
320252
  init_Tool();
321033
320253
  init_tasks();
321034
- inputSchema31 = lazySchema(() => z68.strictObject({
321035
- taskId: z68.string().describe("The ID of the task to retrieve")
320254
+ inputSchema31 = lazySchema(() => z65.strictObject({
320255
+ taskId: z65.string().describe("The ID of the task to retrieve")
321036
320256
  }));
321037
- outputSchema26 = lazySchema(() => z68.object({
321038
- task: z68.object({
321039
- id: z68.string(),
321040
- subject: z68.string(),
321041
- description: z68.string(),
320257
+ outputSchema26 = lazySchema(() => z65.object({
320258
+ task: z65.object({
320259
+ id: z65.string(),
320260
+ subject: z65.string(),
320261
+ description: z65.string(),
321042
320262
  status: TaskStatusSchema2(),
321043
- blocks: z68.array(z68.string()),
321044
- blockedBy: z68.array(z68.string())
320263
+ blocks: z65.array(z65.string()),
320264
+ blockedBy: z65.array(z65.string())
321045
320265
  }).nullable()
321046
320266
  }));
321047
320267
  TaskGetTool = buildTool({
@@ -321210,7 +320430,7 @@ Set up task dependencies:
321210
320430
  `;
321211
320431
 
321212
320432
  // src/tools/TaskUpdateTool/TaskUpdateTool.ts
321213
- import { z as z69 } from "zod/v4";
320433
+ import { z as z66 } from "zod/v4";
321214
320434
  var inputSchema32, outputSchema27, TaskUpdateTool;
321215
320435
  var init_TaskUpdateTool = __esm(() => {
321216
320436
  init_Tool();
@@ -321221,29 +320441,29 @@ var init_TaskUpdateTool = __esm(() => {
321221
320441
  init_teammateMailbox();
321222
320442
  init_constants3();
321223
320443
  inputSchema32 = lazySchema(() => {
321224
- const TaskUpdateStatusSchema = TaskStatusSchema2().or(z69.literal("deleted"));
321225
- return z69.strictObject({
321226
- taskId: z69.string().describe("The ID of the task to update"),
321227
- subject: z69.string().optional().describe("New subject for the task"),
321228
- description: z69.string().optional().describe("New description for the task"),
321229
- activeForm: z69.string().optional().describe('Present continuous form shown in spinner when in_progress (e.g., "Running tests")'),
320444
+ const TaskUpdateStatusSchema = TaskStatusSchema2().or(z66.literal("deleted"));
320445
+ return z66.strictObject({
320446
+ taskId: z66.string().describe("The ID of the task to update"),
320447
+ subject: z66.string().optional().describe("New subject for the task"),
320448
+ description: z66.string().optional().describe("New description for the task"),
320449
+ activeForm: z66.string().optional().describe('Present continuous form shown in spinner when in_progress (e.g., "Running tests")'),
321230
320450
  status: TaskUpdateStatusSchema.optional().describe("New status for the task"),
321231
- addBlocks: z69.array(z69.string()).optional().describe("Task IDs that this task blocks"),
321232
- addBlockedBy: z69.array(z69.string()).optional().describe("Task IDs that block this task"),
321233
- owner: z69.string().optional().describe("New owner for the task"),
321234
- metadata: z69.record(z69.string(), z69.unknown()).optional().describe("Metadata keys to merge into the task. Set a key to null to delete it.")
321235
- });
321236
- });
321237
- outputSchema27 = lazySchema(() => z69.object({
321238
- success: z69.boolean(),
321239
- taskId: z69.string(),
321240
- updatedFields: z69.array(z69.string()),
321241
- error: z69.string().optional(),
321242
- statusChange: z69.object({
321243
- from: z69.string(),
321244
- to: z69.string()
320451
+ addBlocks: z66.array(z66.string()).optional().describe("Task IDs that this task blocks"),
320452
+ addBlockedBy: z66.array(z66.string()).optional().describe("Task IDs that block this task"),
320453
+ owner: z66.string().optional().describe("New owner for the task"),
320454
+ metadata: z66.record(z66.string(), z66.unknown()).optional().describe("Metadata keys to merge into the task. Set a key to null to delete it.")
320455
+ });
320456
+ });
320457
+ outputSchema27 = lazySchema(() => z66.object({
320458
+ success: z66.boolean(),
320459
+ taskId: z66.string(),
320460
+ updatedFields: z66.array(z66.string()),
320461
+ error: z66.string().optional(),
320462
+ statusChange: z66.object({
320463
+ from: z66.string(),
320464
+ to: z66.string()
321245
320465
  }).optional(),
321246
- verificationNudgeNeeded: z69.boolean().optional()
320466
+ verificationNudgeNeeded: z66.boolean().optional()
321247
320467
  }));
321248
320468
  TaskUpdateTool = buildTool({
321249
320469
  name: TASK_UPDATE_TOOL_NAME,
@@ -321515,20 +320735,20 @@ var init_prompt19 = __esm(() => {
321515
320735
  });
321516
320736
 
321517
320737
  // src/tools/TaskListTool/TaskListTool.ts
321518
- import { z as z70 } from "zod/v4";
320738
+ import { z as z67 } from "zod/v4";
321519
320739
  var inputSchema33, outputSchema28, TaskListTool;
321520
320740
  var init_TaskListTool = __esm(() => {
321521
320741
  init_Tool();
321522
320742
  init_tasks();
321523
320743
  init_prompt19();
321524
- inputSchema33 = lazySchema(() => z70.strictObject({}));
321525
- outputSchema28 = lazySchema(() => z70.object({
321526
- tasks: z70.array(z70.object({
321527
- id: z70.string(),
321528
- subject: z70.string(),
320744
+ inputSchema33 = lazySchema(() => z67.strictObject({}));
320745
+ outputSchema28 = lazySchema(() => z67.object({
320746
+ tasks: z67.array(z67.object({
320747
+ id: z67.string(),
320748
+ subject: z67.string(),
321529
320749
  status: TaskStatusSchema2(),
321530
- owner: z70.string().optional(),
321531
- blockedBy: z70.array(z70.string())
320750
+ owner: z67.string().optional(),
320751
+ blockedBy: z67.array(z67.string())
321532
320752
  }))
321533
320753
  }));
321534
320754
  TaskListTool = buildTool({
@@ -321760,7 +320980,7 @@ var exports_TeamCreateTool = {};
321760
320980
  __export(exports_TeamCreateTool, {
321761
320981
  TeamCreateTool: () => TeamCreateTool
321762
320982
  });
321763
- import { z as z71 } from "zod/v4";
320983
+ import { z as z68 } from "zod/v4";
321764
320984
  function generateUniqueTeamName(providedName) {
321765
320985
  if (!readTeamFile(providedName)) {
321766
320986
  return providedName;
@@ -321780,10 +321000,10 @@ var init_TeamCreateTool = __esm(() => {
321780
321000
  init_teammateLayoutManager();
321781
321001
  init_tasks();
321782
321002
  init_words();
321783
- inputSchema34 = lazySchema(() => z71.strictObject({
321784
- team_name: z71.string().describe("Name for the new team to create."),
321785
- description: z71.string().optional().describe("Team description/purpose."),
321786
- agent_type: z71.string().optional().describe('Type/role of the team lead (e.g., "researcher", "test-runner"). ' + "Used for team file and inter-agent coordination.")
321003
+ inputSchema34 = lazySchema(() => z68.strictObject({
321004
+ team_name: z68.string().describe("Name for the new team to create."),
321005
+ description: z68.string().optional().describe("Team description/purpose."),
321006
+ agent_type: z68.string().optional().describe('Type/role of the team lead (e.g., "researcher", "test-runner"). ' + "Used for team file and inter-agent coordination.")
321787
321007
  }));
321788
321008
  TeamCreateTool = buildTool({
321789
321009
  name: TEAM_CREATE_TOOL_NAME,
@@ -321945,7 +321165,7 @@ var exports_TeamDeleteTool = {};
321945
321165
  __export(exports_TeamDeleteTool, {
321946
321166
  TeamDeleteTool: () => TeamDeleteTool
321947
321167
  });
321948
- import { z as z72 } from "zod/v4";
321168
+ import { z as z69 } from "zod/v4";
321949
321169
  var inputSchema35, TeamDeleteTool;
321950
321170
  var init_TeamDeleteTool = __esm(() => {
321951
321171
  init_Tool();
@@ -321955,7 +321175,7 @@ var init_TeamDeleteTool = __esm(() => {
321955
321175
  init_teammateLayoutManager();
321956
321176
  init_tasks();
321957
321177
  init_UI23();
321958
- inputSchema35 = lazySchema(() => z72.strictObject({}));
321178
+ inputSchema35 = lazySchema(() => z69.strictObject({}));
321959
321179
  TeamDeleteTool = buildTool({
321960
321180
  name: TEAM_DELETE_TOOL_NAME,
321961
321181
  searchHint: "disband a swarm team and clean up",
@@ -322771,7 +321991,7 @@ var exports_SendMessageTool = {};
322771
321991
  __export(exports_SendMessageTool, {
322772
321992
  SendMessageTool: () => SendMessageTool
322773
321993
  });
322774
- import { z as z73 } from "zod/v4";
321994
+ import { z as z70 } from "zod/v4";
322775
321995
  function findTeammateColor(appState, name) {
322776
321996
  const teammates = appState.teamContext?.teammates;
322777
321997
  if (!teammates)
@@ -323057,29 +322277,29 @@ var init_SendMessageTool = __esm(() => {
323057
322277
  init_teammateMailbox();
323058
322278
  init_resumeAgent();
323059
322279
  init_UI24();
323060
- StructuredMessage = lazySchema(() => z73.discriminatedUnion("type", [
323061
- z73.object({
323062
- type: z73.literal("shutdown_request"),
323063
- reason: z73.string().optional()
322280
+ StructuredMessage = lazySchema(() => z70.discriminatedUnion("type", [
322281
+ z70.object({
322282
+ type: z70.literal("shutdown_request"),
322283
+ reason: z70.string().optional()
323064
322284
  }),
323065
- z73.object({
323066
- type: z73.literal("shutdown_response"),
323067
- request_id: z73.string(),
322285
+ z70.object({
322286
+ type: z70.literal("shutdown_response"),
322287
+ request_id: z70.string(),
323068
322288
  approve: semanticBoolean(),
323069
- reason: z73.string().optional()
322289
+ reason: z70.string().optional()
323070
322290
  }),
323071
- z73.object({
323072
- type: z73.literal("plan_approval_response"),
323073
- request_id: z73.string(),
322291
+ z70.object({
322292
+ type: z70.literal("plan_approval_response"),
322293
+ request_id: z70.string(),
323074
322294
  approve: semanticBoolean(),
323075
- feedback: z73.string().optional()
322295
+ feedback: z70.string().optional()
323076
322296
  })
323077
322297
  ]));
323078
- inputSchema36 = lazySchema(() => z73.object({
323079
- to: z73.string().describe('Recipient: teammate name, or "*" for broadcast to all teammates'),
323080
- summary: z73.string().optional().describe("A 5-10 word summary shown as a preview in the UI (required when message is a string)"),
323081
- message: z73.union([
323082
- z73.string().describe("Plain text message content"),
322298
+ inputSchema36 = lazySchema(() => z70.object({
322299
+ to: z70.string().describe('Recipient: teammate name, or "*" for broadcast to all teammates'),
322300
+ summary: z70.string().optional().describe("A 5-10 word summary shown as a preview in the UI (required when message is a string)"),
322301
+ message: z70.union([
322302
+ z70.string().describe("Plain text message content"),
323083
322303
  StructuredMessage()
323084
322304
  ])
323085
322305
  }));
@@ -323384,14 +322604,6 @@ function getAllBaseTools() {
323384
322604
  ListMcpResourcesTool,
323385
322605
  ReadMcpResourceTool,
323386
322606
  ...isToolSearchEnabledOptimistic() ? [ToolSearchTool] : [],
323387
- SecretSetTool,
323388
- SecretGetTool,
323389
- SecretDeleteTool,
323390
- SecretListTool,
323391
- EthAddressTool,
323392
- EthBalanceTool,
323393
- EthSendTool,
323394
- LocalWebSearchTool,
323395
322607
  WebScreenshotTool
323396
322608
  ];
323397
322609
  }
@@ -323460,9 +322672,6 @@ var init_tools2 = __esm(() => {
323460
322672
  init_ReadMcpResourceTool();
323461
322673
  init_ToolSearchTool();
323462
322674
  init_EnterPlanModeTool();
323463
- init_SecretsTool();
323464
- init_CryptoTool();
323465
- init_LocalWebSearchTool();
323466
322675
  init_WebScreenshotTool();
323467
322676
  init_EnterWorktreeTool();
323468
322677
  init_ExitWorktreeTool();
@@ -324836,7 +324045,7 @@ var init_prompt20 = __esm(() => {
324836
324045
  });
324837
324046
 
324838
324047
  // src/tools/AgentTool/AgentTool.tsx
324839
- import { z as z74 } from "zod/v4";
324048
+ import { z as z71 } from "zod/v4";
324840
324049
  function getAutoBackgroundMs() {
324841
324050
  if (isEnvTruthy(process.env.CLAUDE_AUTO_BACKGROUND_TASKS) || getFeatureValue_CACHED_MAY_BE_STALE("tengu_auto_background_agents", false)) {
324842
324051
  return 120000;
@@ -324895,22 +324104,22 @@ var init_AgentTool = __esm(() => {
324895
324104
  init_UI4();
324896
324105
  jsx_dev_runtime149 = __toESM(require_jsx_dev_runtime(), 1);
324897
324106
  isBackgroundTasksDisabled2 = isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_BACKGROUND_TASKS);
324898
- baseInputSchema = lazySchema(() => z74.object({
324899
- description: z74.string().describe("A short (3-5 word) description of the task"),
324900
- prompt: z74.string().describe("The task for the agent to perform"),
324901
- subagent_type: z74.string().optional().describe("The type of specialized agent to use for this task"),
324902
- model: z74.enum(["sonnet", "opus", "haiku"]).optional().describe("Optional model override for this agent. Takes precedence over the agent definition's model frontmatter. If omitted, uses the agent definition's model, or inherits from the parent."),
324903
- run_in_background: z74.boolean().optional().describe("Set to true to run this agent in the background. You will be notified when it completes.")
324107
+ baseInputSchema = lazySchema(() => z71.object({
324108
+ description: z71.string().describe("A short (3-5 word) description of the task"),
324109
+ prompt: z71.string().describe("The task for the agent to perform"),
324110
+ subagent_type: z71.string().optional().describe("The type of specialized agent to use for this task"),
324111
+ model: z71.enum(["sonnet", "opus", "haiku"]).optional().describe("Optional model override for this agent. Takes precedence over the agent definition's model frontmatter. If omitted, uses the agent definition's model, or inherits from the parent."),
324112
+ run_in_background: z71.boolean().optional().describe("Set to true to run this agent in the background. You will be notified when it completes.")
324904
324113
  }));
324905
324114
  fullInputSchema2 = lazySchema(() => {
324906
- const multiAgentInputSchema = z74.object({
324907
- name: z74.string().optional().describe("Name for the spawned agent. Makes it addressable via SendMessage({to: name}) while running."),
324908
- team_name: z74.string().optional().describe("Team name for spawning. Uses current team context if omitted."),
324115
+ const multiAgentInputSchema = z71.object({
324116
+ name: z71.string().optional().describe("Name for the spawned agent. Makes it addressable via SendMessage({to: name}) while running."),
324117
+ team_name: z71.string().optional().describe("Team name for spawning. Uses current team context if omitted."),
324909
324118
  mode: permissionModeSchema().optional().describe('Permission mode for spawned teammate (e.g., "plan" to require plan approval).')
324910
324119
  });
324911
324120
  return baseInputSchema().merge(multiAgentInputSchema).extend({
324912
- isolation: z74.enum(["worktree"]).optional().describe('Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.'),
324913
- cwd: z74.string().optional().describe('Absolute path to run the agent in. Overrides the working directory for all filesystem and shell operations within this agent. Mutually exclusive with isolation: "worktree".')
324121
+ isolation: z71.enum(["worktree"]).optional().describe('Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.'),
324122
+ cwd: z71.string().optional().describe('Absolute path to run the agent in. Overrides the working directory for all filesystem and shell operations within this agent. Mutually exclusive with isolation: "worktree".')
324914
324123
  });
324915
324124
  });
324916
324125
  inputSchema7 = lazySchema(() => {
@@ -324923,18 +324132,18 @@ var init_AgentTool = __esm(() => {
324923
324132
  });
324924
324133
  outputSchema29 = lazySchema(() => {
324925
324134
  const syncOutputSchema = agentToolResultSchema().extend({
324926
- status: z74.literal("completed"),
324927
- prompt: z74.string()
324135
+ status: z71.literal("completed"),
324136
+ prompt: z71.string()
324928
324137
  });
324929
- const asyncOutputSchema = z74.object({
324930
- status: z74.literal("async_launched"),
324931
- agentId: z74.string().describe("The ID of the async agent"),
324932
- description: z74.string().describe("The description of the task"),
324933
- prompt: z74.string().describe("The prompt for the agent"),
324934
- outputFile: z74.string().describe("Path to the output file for checking agent progress"),
324935
- canReadOutputFile: z74.boolean().optional().describe("Whether the calling agent has Read/Bash tools to check progress")
324138
+ const asyncOutputSchema = z71.object({
324139
+ status: z71.literal("async_launched"),
324140
+ agentId: z71.string().describe("The ID of the async agent"),
324141
+ description: z71.string().describe("The description of the task"),
324142
+ prompt: z71.string().describe("The prompt for the agent"),
324143
+ outputFile: z71.string().describe("Path to the output file for checking agent progress"),
324144
+ canReadOutputFile: z71.boolean().optional().describe("Whether the calling agent has Read/Bash tools to check progress")
324936
324145
  });
324937
- return z74.union([syncOutputSchema, asyncOutputSchema]);
324146
+ return z71.union([syncOutputSchema, asyncOutputSchema]);
324938
324147
  });
324939
324148
  AgentTool = buildTool({
324940
324149
  async prompt({
@@ -328118,7 +327327,7 @@ var init_prompt21 = __esm(() => {
328118
327327
 
328119
327328
  // src/tools/BashTool/BashTool.tsx
328120
327329
  import { copyFile as copyFile6, stat as fsStat2, truncate as fsTruncate2, link as link4 } from "fs/promises";
328121
- import { z as z75 } from "zod/v4";
327330
+ import { z as z72 } from "zod/v4";
328122
327331
  function isSearchOrReadBashCommand(command) {
328123
327332
  let partsWithOperators;
328124
327333
  try {
@@ -328588,10 +327797,10 @@ var init_BashTool = __esm(() => {
328588
327797
  "sleep"
328589
327798
  ];
328590
327799
  isBackgroundTasksDisabled3 = isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_BACKGROUND_TASKS);
328591
- fullInputSchema3 = lazySchema(() => z75.strictObject({
328592
- command: z75.string().describe("The command to execute"),
328593
- timeout: semanticNumber(z75.number().optional()).describe(`Optional timeout in milliseconds (max ${getMaxTimeoutMs2()})`),
328594
- description: z75.string().optional().describe(`Clear, concise description of what this command does in active voice. Never use words like "complex" or "risk" in the description - just describe what it does.
327800
+ fullInputSchema3 = lazySchema(() => z72.strictObject({
327801
+ command: z72.string().describe("The command to execute"),
327802
+ timeout: semanticNumber(z72.number().optional()).describe(`Optional timeout in milliseconds (max ${getMaxTimeoutMs2()})`),
327803
+ description: z72.string().optional().describe(`Clear, concise description of what this command does in active voice. Never use words like "complex" or "risk" in the description - just describe what it does.
328595
327804
 
328596
327805
  For simple commands (git, npm, standard CLI tools), keep it brief (5-10 words):
328597
327806
  - ls → "List files in current directory"
@@ -328602,11 +327811,11 @@ For commands that are harder to parse at a glance (piped commands, obscure flags
328602
327811
  - find . -name "*.tmp" -exec rm {} \\; → "Find and delete all .tmp files recursively"
328603
327812
  - git reset --hard origin/main → "Discard all local changes and match remote main"
328604
327813
  - curl -s url | jq '.data[]' → "Fetch JSON from URL and extract data array elements"`),
328605
- run_in_background: semanticBoolean(z75.boolean().optional()).describe(`Set to true to run this command in the background. Use Read to read the output later.`),
328606
- dangerouslyDisableSandbox: semanticBoolean(z75.boolean().optional()).describe("Set this to true to dangerously override sandbox mode and run commands without sandboxing."),
328607
- _simulatedSedEdit: z75.object({
328608
- filePath: z75.string(),
328609
- newContent: z75.string()
327814
+ run_in_background: semanticBoolean(z72.boolean().optional()).describe(`Set to true to run this command in the background. Use Read to read the output later.`),
327815
+ dangerouslyDisableSandbox: semanticBoolean(z72.boolean().optional()).describe("Set this to true to dangerously override sandbox mode and run commands without sandboxing."),
327816
+ _simulatedSedEdit: z72.object({
327817
+ filePath: z72.string(),
327818
+ newContent: z72.string()
328610
327819
  }).optional().describe("Internal: pre-computed sed edit result from preview")
328611
327820
  }));
328612
327821
  inputSchema37 = lazySchema(() => isBackgroundTasksDisabled3 ? fullInputSchema3().omit({
@@ -328616,21 +327825,21 @@ For commands that are harder to parse at a glance (piped commands, obscure flags
328616
327825
  _simulatedSedEdit: true
328617
327826
  }));
328618
327827
  COMMON_BACKGROUND_COMMANDS2 = ["npm", "yarn", "pnpm", "node", "python", "python3", "go", "cargo", "make", "docker", "terraform", "webpack", "vite", "jest", "pytest", "curl", "wget", "build", "test", "serve", "watch", "dev"];
328619
- outputSchema30 = lazySchema(() => z75.object({
328620
- stdout: z75.string().describe("The standard output of the command"),
328621
- stderr: z75.string().describe("The standard error output of the command"),
328622
- rawOutputPath: z75.string().optional().describe("Path to raw output file for large MCP tool outputs"),
328623
- interrupted: z75.boolean().describe("Whether the command was interrupted"),
328624
- isImage: z75.boolean().optional().describe("Flag to indicate if stdout contains image data"),
328625
- backgroundTaskId: z75.string().optional().describe("ID of the background task if command is running in background"),
328626
- backgroundedByUser: z75.boolean().optional().describe("True if the user manually backgrounded the command with Ctrl+B"),
328627
- assistantAutoBackgrounded: z75.boolean().optional().describe("True if assistant-mode auto-backgrounded a long-running blocking command"),
328628
- dangerouslyDisableSandbox: z75.boolean().optional().describe("Flag to indicate if sandbox mode was overridden"),
328629
- returnCodeInterpretation: z75.string().optional().describe("Semantic interpretation for non-error exit codes with special meaning"),
328630
- noOutputExpected: z75.boolean().optional().describe("Whether the command is expected to produce no output on success"),
328631
- structuredContent: z75.array(z75.any()).optional().describe("Structured content blocks"),
328632
- persistedOutputPath: z75.string().optional().describe("Path to the persisted full output in tool-results dir (set when output is too large for inline)"),
328633
- persistedOutputSize: z75.number().optional().describe("Total size of the output in bytes (set when output is too large for inline)")
327828
+ outputSchema30 = lazySchema(() => z72.object({
327829
+ stdout: z72.string().describe("The standard output of the command"),
327830
+ stderr: z72.string().describe("The standard error output of the command"),
327831
+ rawOutputPath: z72.string().optional().describe("Path to raw output file for large MCP tool outputs"),
327832
+ interrupted: z72.boolean().describe("Whether the command was interrupted"),
327833
+ isImage: z72.boolean().optional().describe("Flag to indicate if stdout contains image data"),
327834
+ backgroundTaskId: z72.string().optional().describe("ID of the background task if command is running in background"),
327835
+ backgroundedByUser: z72.boolean().optional().describe("True if the user manually backgrounded the command with Ctrl+B"),
327836
+ assistantAutoBackgrounded: z72.boolean().optional().describe("True if assistant-mode auto-backgrounded a long-running blocking command"),
327837
+ dangerouslyDisableSandbox: z72.boolean().optional().describe("Flag to indicate if sandbox mode was overridden"),
327838
+ returnCodeInterpretation: z72.string().optional().describe("Semantic interpretation for non-error exit codes with special meaning"),
327839
+ noOutputExpected: z72.boolean().optional().describe("Whether the command is expected to produce no output on success"),
327840
+ structuredContent: z72.array(z72.any()).optional().describe("Structured content blocks"),
327841
+ persistedOutputPath: z72.string().optional().describe("Path to the persisted full output in tool-results dir (set when output is too large for inline)"),
327842
+ persistedOutputSize: z72.number().optional().describe("Total size of the output in bytes (set when output is too large for inline)")
328634
327843
  }));
328635
327844
  BashTool = buildTool({
328636
327845
  name: BASH_TOOL_NAME,
@@ -334474,7 +333683,7 @@ function getAnthropicEnvMetadata() {
334474
333683
  function getBuildAgeMinutes() {
334475
333684
  if (false)
334476
333685
  ;
334477
- const buildTime = new Date("2026-04-09T17:12:16.788Z").getTime();
333686
+ const buildTime = new Date("2026-04-09T18:54:03.234Z").getTime();
334478
333687
  if (isNaN(buildTime))
334479
333688
  return;
334480
333689
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -339102,7 +338311,7 @@ var init_UI25 = __esm(() => {
339102
338311
  import { readdir as readdir15, readFile as readFileAsync } from "fs/promises";
339103
338312
  import * as path10 from "path";
339104
338313
  import { posix as posix7, win32 as win323 } from "path";
339105
- import { z as z76 } from "zod/v4";
338314
+ import { z as z73 } from "zod/v4";
339106
338315
  function isBlockedDevicePath(filePath) {
339107
338316
  if (BLOCKED_DEVICE_PATHS.has(filePath))
339108
338317
  return true;
@@ -339493,72 +338702,72 @@ var init_FileReadTool = __esm(() => {
339493
338702
  }
339494
338703
  };
339495
338704
  IMAGE_EXTENSIONS = new Set(["png", "jpg", "jpeg", "gif", "webp"]);
339496
- inputSchema38 = lazySchema(() => z76.strictObject({
339497
- file_path: z76.string().describe("The absolute path to the file to read"),
339498
- offset: semanticNumber(z76.number().int().nonnegative().optional()).describe("The line number to start reading from. Only provide if the file is too large to read at once"),
339499
- limit: semanticNumber(z76.number().int().positive().optional()).describe("The number of lines to read. Only provide if the file is too large to read at once."),
339500
- pages: z76.string().optional().describe(`Page range for PDF files (e.g., "1-5", "3", "10-20"). Only applicable to PDF files. Maximum ${PDF_MAX_PAGES_PER_READ} pages per request.`)
338705
+ inputSchema38 = lazySchema(() => z73.strictObject({
338706
+ file_path: z73.string().describe("The absolute path to the file to read"),
338707
+ offset: semanticNumber(z73.number().int().nonnegative().optional()).describe("The line number to start reading from. Only provide if the file is too large to read at once"),
338708
+ limit: semanticNumber(z73.number().int().positive().optional()).describe("The number of lines to read. Only provide if the file is too large to read at once."),
338709
+ pages: z73.string().optional().describe(`Page range for PDF files (e.g., "1-5", "3", "10-20"). Only applicable to PDF files. Maximum ${PDF_MAX_PAGES_PER_READ} pages per request.`)
339501
338710
  }));
339502
338711
  outputSchema31 = lazySchema(() => {
339503
- const imageMediaTypes = z76.enum([
338712
+ const imageMediaTypes = z73.enum([
339504
338713
  "image/jpeg",
339505
338714
  "image/png",
339506
338715
  "image/gif",
339507
338716
  "image/webp"
339508
338717
  ]);
339509
- return z76.discriminatedUnion("type", [
339510
- z76.object({
339511
- type: z76.literal("text"),
339512
- file: z76.object({
339513
- filePath: z76.string().describe("The path to the file that was read"),
339514
- content: z76.string().describe("The content of the file"),
339515
- numLines: z76.number().describe("Number of lines in the returned content"),
339516
- startLine: z76.number().describe("The starting line number"),
339517
- totalLines: z76.number().describe("Total number of lines in the file")
338718
+ return z73.discriminatedUnion("type", [
338719
+ z73.object({
338720
+ type: z73.literal("text"),
338721
+ file: z73.object({
338722
+ filePath: z73.string().describe("The path to the file that was read"),
338723
+ content: z73.string().describe("The content of the file"),
338724
+ numLines: z73.number().describe("Number of lines in the returned content"),
338725
+ startLine: z73.number().describe("The starting line number"),
338726
+ totalLines: z73.number().describe("Total number of lines in the file")
339518
338727
  })
339519
338728
  }),
339520
- z76.object({
339521
- type: z76.literal("image"),
339522
- file: z76.object({
339523
- base64: z76.string().describe("Base64-encoded image data"),
338729
+ z73.object({
338730
+ type: z73.literal("image"),
338731
+ file: z73.object({
338732
+ base64: z73.string().describe("Base64-encoded image data"),
339524
338733
  type: imageMediaTypes.describe("The MIME type of the image"),
339525
- originalSize: z76.number().describe("Original file size in bytes"),
339526
- dimensions: z76.object({
339527
- originalWidth: z76.number().optional().describe("Original image width in pixels"),
339528
- originalHeight: z76.number().optional().describe("Original image height in pixels"),
339529
- displayWidth: z76.number().optional().describe("Displayed image width in pixels (after resizing)"),
339530
- displayHeight: z76.number().optional().describe("Displayed image height in pixels (after resizing)")
338734
+ originalSize: z73.number().describe("Original file size in bytes"),
338735
+ dimensions: z73.object({
338736
+ originalWidth: z73.number().optional().describe("Original image width in pixels"),
338737
+ originalHeight: z73.number().optional().describe("Original image height in pixels"),
338738
+ displayWidth: z73.number().optional().describe("Displayed image width in pixels (after resizing)"),
338739
+ displayHeight: z73.number().optional().describe("Displayed image height in pixels (after resizing)")
339531
338740
  }).optional().describe("Image dimension info for coordinate mapping")
339532
338741
  })
339533
338742
  }),
339534
- z76.object({
339535
- type: z76.literal("notebook"),
339536
- file: z76.object({
339537
- filePath: z76.string().describe("The path to the notebook file"),
339538
- cells: z76.array(z76.any()).describe("Array of notebook cells")
338743
+ z73.object({
338744
+ type: z73.literal("notebook"),
338745
+ file: z73.object({
338746
+ filePath: z73.string().describe("The path to the notebook file"),
338747
+ cells: z73.array(z73.any()).describe("Array of notebook cells")
339539
338748
  })
339540
338749
  }),
339541
- z76.object({
339542
- type: z76.literal("pdf"),
339543
- file: z76.object({
339544
- filePath: z76.string().describe("The path to the PDF file"),
339545
- base64: z76.string().describe("Base64-encoded PDF data"),
339546
- originalSize: z76.number().describe("Original file size in bytes")
338750
+ z73.object({
338751
+ type: z73.literal("pdf"),
338752
+ file: z73.object({
338753
+ filePath: z73.string().describe("The path to the PDF file"),
338754
+ base64: z73.string().describe("Base64-encoded PDF data"),
338755
+ originalSize: z73.number().describe("Original file size in bytes")
339547
338756
  })
339548
338757
  }),
339549
- z76.object({
339550
- type: z76.literal("parts"),
339551
- file: z76.object({
339552
- filePath: z76.string().describe("The path to the PDF file"),
339553
- originalSize: z76.number().describe("Original file size in bytes"),
339554
- count: z76.number().describe("Number of pages extracted"),
339555
- outputDir: z76.string().describe("Directory containing extracted page images")
338758
+ z73.object({
338759
+ type: z73.literal("parts"),
338760
+ file: z73.object({
338761
+ filePath: z73.string().describe("The path to the PDF file"),
338762
+ originalSize: z73.number().describe("Original file size in bytes"),
338763
+ count: z73.number().describe("Number of pages extracted"),
338764
+ outputDir: z73.string().describe("Directory containing extracted page images")
339556
338765
  })
339557
338766
  }),
339558
- z76.object({
339559
- type: z76.literal("file_unchanged"),
339560
- file: z76.object({
339561
- filePath: z76.string().describe("The path to the file")
338767
+ z73.object({
338768
+ type: z73.literal("file_unchanged"),
338769
+ file: z73.object({
338770
+ filePath: z73.string().describe("The path to the file")
339562
338771
  })
339563
338772
  })
339564
338773
  ]);
@@ -355716,10 +354925,14 @@ __export(exports_modifiers_napi, {
355716
354925
  resourceFromAttributes: () => resourceFromAttributes7,
355717
354926
  plot: () => plot6,
355718
354927
  getSyntaxTheme: () => getSyntaxTheme8,
354928
+ getSentinelCategory: () => getSentinelCategory6,
355719
354929
  getMcpConfigForManifest: () => getMcpConfigForManifest6,
355720
354930
  default: () => modifiers_napi_default,
354931
+ createComputerUseMcpServer: () => createComputerUseMcpServer6,
355721
354932
  createClaudeForChromeMcpServer: () => createClaudeForChromeMcpServer6,
355722
354933
  context: () => context6,
354934
+ buildComputerUseTools: () => buildComputerUseTools6,
354935
+ bindSessionContext: () => bindSessionContext6,
355723
354936
  __stub: () => __stub6,
355724
354937
  SpanStatusCode: () => SpanStatusCode6,
355725
354938
  SimpleSpanProcessor: () => SimpleSpanProcessor6,
@@ -355743,8 +354956,10 @@ __export(exports_modifiers_napi, {
355743
354956
  InstrumentType: () => InstrumentType6,
355744
354957
  ExportResultCode: () => ExportResultCode7,
355745
354958
  DataPointType: () => DataPointType6,
354959
+ DEFAULT_GRANT_FLAGS: () => DEFAULT_GRANT_FLAGS6,
355746
354960
  ColorFile: () => ColorFile7,
355747
354961
  ColorDiff: () => ColorDiff7,
354962
+ CLI_CU_CAPABILITIES: () => CLI_CU_CAPABILITIES6,
355748
354963
  BatchSpanProcessor: () => BatchSpanProcessor7,
355749
354964
  BatchLogRecordProcessor: () => BatchLogRecordProcessor7,
355750
354965
  BasicTracerProvider: () => BasicTracerProvider7,
@@ -355754,7 +354969,7 @@ __export(exports_modifiers_napi, {
355754
354969
  ATTR_SERVICE_NAME: () => ATTR_SERVICE_NAME7
355755
354970
  });
355756
354971
  var noop17 = () => null, noopClass6 = class {
355757
- }, handler10, stub10, modifiers_napi_default, __stub6 = true, SandboxViolationStore7 = null, SandboxManager11, SandboxRuntimeConfigSchema7, BROWSER_TOOLS6, getMcpConfigForManifest6, ColorDiff7 = null, ColorFile7 = null, getSyntaxTheme8, plot6, createClaudeForChromeMcpServer6, ExportResultCode7, resourceFromAttributes7, Resource6, SimpleSpanProcessor6, BatchSpanProcessor7, NodeTracerProvider6, BasicTracerProvider7, OTLPTraceExporter6, OTLPLogExporter6, OTLPMetricExporter6, PrometheusExporter6, LoggerProvider7, SimpleLogRecordProcessor6, BatchLogRecordProcessor7, MeterProvider7, PeriodicExportingMetricReader7, trace8, context6, SpanStatusCode6, ATTR_SERVICE_NAME7 = "service.name", ATTR_SERVICE_VERSION7 = "service.version", SEMRESATTRS_SERVICE_NAME6 = "service.name", SEMRESATTRS_SERVICE_VERSION6 = "service.version", AggregationTemporality7, DataPointType6, InstrumentType6, PushMetricExporter6, SeverityNumber6;
354972
+ }, handler10, stub10, modifiers_napi_default, __stub6 = true, SandboxViolationStore7 = null, SandboxManager11, SandboxRuntimeConfigSchema7, BROWSER_TOOLS6, CLI_CU_CAPABILITIES6, getMcpConfigForManifest6, ColorDiff7 = null, ColorFile7 = null, getSyntaxTheme8, plot6, createClaudeForChromeMcpServer6, buildComputerUseTools6 = () => [], createComputerUseMcpServer6, bindSessionContext6, DEFAULT_GRANT_FLAGS6, getSentinelCategory6, ExportResultCode7, resourceFromAttributes7, Resource6, SimpleSpanProcessor6, BatchSpanProcessor7, NodeTracerProvider6, BasicTracerProvider7, OTLPTraceExporter6, OTLPLogExporter6, OTLPMetricExporter6, PrometheusExporter6, LoggerProvider7, SimpleLogRecordProcessor6, BatchLogRecordProcessor7, MeterProvider7, PeriodicExportingMetricReader7, trace8, context6, SpanStatusCode6, ATTR_SERVICE_NAME7 = "service.name", ATTR_SERVICE_VERSION7 = "service.version", SEMRESATTRS_SERVICE_NAME6 = "service.name", SEMRESATTRS_SERVICE_VERSION6 = "service.version", AggregationTemporality7, DataPointType6, InstrumentType6, PushMetricExporter6, SeverityNumber6;
355758
354973
  var init_modifiers_napi = __esm(() => {
355759
354974
  handler10 = {
355760
354975
  get(_2, prop) {
@@ -355776,10 +354991,15 @@ var init_modifiers_napi = __esm(() => {
355776
354991
  SandboxManager11 = new Proxy({}, { get: () => noop17 });
355777
354992
  SandboxRuntimeConfigSchema7 = { parse: () => ({}) };
355778
354993
  BROWSER_TOOLS6 = [];
354994
+ CLI_CU_CAPABILITIES6 = { screenshotFiltering: "native", platform: "darwin" };
355779
354995
  getMcpConfigForManifest6 = noop17;
355780
354996
  getSyntaxTheme8 = noop17;
355781
354997
  plot6 = noop17;
355782
354998
  createClaudeForChromeMcpServer6 = noop17;
354999
+ createComputerUseMcpServer6 = noop17;
355000
+ bindSessionContext6 = noop17;
355001
+ DEFAULT_GRANT_FLAGS6 = {};
355002
+ getSentinelCategory6 = noop17;
355783
355003
  ExportResultCode7 = { SUCCESS: 0, FAILED: 1 };
355784
355004
  resourceFromAttributes7 = noop17;
355785
355005
  Resource6 = noopClass6;
@@ -358540,7 +357760,7 @@ function Feedback({
358540
357760
  platform: env4.platform,
358541
357761
  gitRepo: envInfo.isGit,
358542
357762
  terminal: env4.terminal,
358543
- version: "1.1.20",
357763
+ version: "1.1.21",
358544
357764
  transcript: normalizeMessagesForAPI(messages),
358545
357765
  errors: sanitizedErrors,
358546
357766
  lastApiRequest: getLastAPIRequest(),
@@ -358732,7 +357952,7 @@ function Feedback({
358732
357952
  ", ",
358733
357953
  env4.terminal,
358734
357954
  ", v",
358735
- "1.1.20"
357955
+ "1.1.21"
358736
357956
  ]
358737
357957
  }, undefined, true, undefined, this)
358738
357958
  ]
@@ -358838,7 +358058,7 @@ ${sanitizedDescription}
358838
358058
  ` + `**Environment Info**
358839
358059
  ` + `- Platform: ${env4.platform}
358840
358060
  ` + `- Terminal: ${env4.terminal}
358841
- ` + `- Version: ${"1.1.20"}
358061
+ ` + `- Version: ${"1.1.21"}
358842
358062
  ` + `- Feedback ID: ${feedbackId}
358843
358063
  ` + `
358844
358064
  **Errors**
@@ -361951,7 +361171,7 @@ function buildPrimarySection() {
361951
361171
  }, undefined, false, undefined, this);
361952
361172
  return [{
361953
361173
  label: "Version",
361954
- value: "1.1.20"
361174
+ value: "1.1.21"
361955
361175
  }, {
361956
361176
  label: "Session name",
361957
361177
  value: nameValue
@@ -366569,7 +365789,7 @@ function Config({
366569
365789
  }
366570
365790
  }, undefined, false, undefined, this)
366571
365791
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
366572
- currentVersion: "1.1.20",
365792
+ currentVersion: "1.1.21",
366573
365793
  onChoice: (choice) => {
366574
365794
  setShowSubmenu(null);
366575
365795
  setTabsHidden(false);
@@ -366581,7 +365801,7 @@ function Config({
366581
365801
  autoUpdatesChannel: "stable"
366582
365802
  };
366583
365803
  if (choice === "stay") {
366584
- newSettings.minimumVersion = "1.1.20";
365804
+ newSettings.minimumVersion = "1.1.21";
366585
365805
  }
366586
365806
  updateSettingsForSource("userSettings", newSettings);
366587
365807
  setSettingsData((prev_27) => ({
@@ -376314,7 +375534,7 @@ function HelpV2(t0) {
376314
375534
  let t6;
376315
375535
  if ($2[31] !== tabs) {
376316
375536
  t6 = /* @__PURE__ */ jsx_dev_runtime214.jsxDEV(Tabs, {
376317
- title: `localclawd v${"1.1.20"}`,
375537
+ title: `localclawd v${"1.1.21"}`,
376318
375538
  color: "professionalBlue",
376319
375539
  defaultTab: "general",
376320
375540
  children: tabs
@@ -382210,7 +381430,7 @@ var init_omit = __esm(() => {
382210
381430
  });
382211
381431
 
382212
381432
  // src/services/mcp/channelAllowlist.ts
382213
- import { z as z77 } from "zod/v4";
381433
+ import { z as z74 } from "zod/v4";
382214
381434
  function getChannelAllowlist() {
382215
381435
  const raw = getFeatureValue_CACHED_MAY_BE_STALE("tengu_harbor_ledger", []);
382216
381436
  const parsed = ChannelAllowlistSchema().safeParse(raw);
@@ -382222,14 +381442,14 @@ function isChannelsEnabled() {
382222
381442
  var ChannelAllowlistSchema;
382223
381443
  var init_channelAllowlist = __esm(() => {
382224
381444
  init_pluginIdentifier();
382225
- ChannelAllowlistSchema = lazySchema(() => z77.array(z77.object({
382226
- marketplace: z77.string(),
382227
- plugin: z77.string()
381445
+ ChannelAllowlistSchema = lazySchema(() => z74.array(z74.object({
381446
+ marketplace: z74.string(),
381447
+ plugin: z74.string()
382228
381448
  })));
382229
381449
  });
382230
381450
 
382231
381451
  // src/services/mcp/channelNotification.ts
382232
- import { z as z78 } from "zod/v4";
381452
+ import { z as z75 } from "zod/v4";
382233
381453
  function wrapChannelMessage(serverName, content, meta) {
382234
381454
  const attrs = Object.entries(meta ?? {}).filter(([k2]) => SAFE_META_KEY.test(k2)).map(([k2, v2]) => ` ${k2}="${escapeXmlAttr(v2)}"`).join("");
382235
381455
  return `<${CHANNEL_TAG} source="${escapeXmlAttr(serverName)}"${attrs}>
@@ -382324,18 +381544,18 @@ var init_channelNotification = __esm(() => {
382324
381544
  init_pluginIdentifier();
382325
381545
  init_settings2();
382326
381546
  init_channelAllowlist();
382327
- ChannelMessageNotificationSchema = lazySchema(() => z78.object({
382328
- method: z78.literal("notifications/claude/channel"),
382329
- params: z78.object({
382330
- content: z78.string(),
382331
- meta: z78.record(z78.string(), z78.string()).optional()
381547
+ ChannelMessageNotificationSchema = lazySchema(() => z75.object({
381548
+ method: z75.literal("notifications/claude/channel"),
381549
+ params: z75.object({
381550
+ content: z75.string(),
381551
+ meta: z75.record(z75.string(), z75.string()).optional()
382332
381552
  })
382333
381553
  }));
382334
- ChannelPermissionNotificationSchema = lazySchema(() => z78.object({
382335
- method: z78.literal(CHANNEL_PERMISSION_METHOD),
382336
- params: z78.object({
382337
- request_id: z78.string(),
382338
- behavior: z78.enum(["allow", "deny"])
381554
+ ChannelPermissionNotificationSchema = lazySchema(() => z75.object({
381555
+ method: z75.literal(CHANNEL_PERMISSION_METHOD),
381556
+ params: z75.object({
381557
+ request_id: z75.string(),
381558
+ behavior: z75.enum(["allow", "deny"])
382339
381559
  })
382340
381560
  }));
382341
381561
  SAFE_META_KEY = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
@@ -393555,7 +392775,7 @@ function parsePluginArgs(args) {
393555
392775
  // src/utils/plugins/validatePlugin.ts
393556
392776
  import { readdir as readdir23, readFile as readFile39, stat as stat39 } from "fs/promises";
393557
392777
  import * as path14 from "path";
393558
- import { z as z79 } from "zod/v4";
392778
+ import { z as z76 } from "zod/v4";
393559
392779
  function detectManifestType(filePath) {
393560
392780
  const fileName = path14.basename(filePath);
393561
392781
  const dirName = path14.basename(path14.dirname(filePath));
@@ -393771,7 +392991,7 @@ async function validateMarketplaceManifest(filePath) {
393771
392991
  }
393772
392992
  }
393773
392993
  const strictMarketplaceSchema = PluginMarketplaceSchema().extend({
393774
- plugins: z79.array(PluginMarketplaceEntrySchema().strict())
392994
+ plugins: z76.array(PluginMarketplaceEntrySchema().strict())
393775
392995
  }).strict();
393776
392996
  const result = strictMarketplaceSchema.safeParse(parsed);
393777
392997
  if (!result.success) {
@@ -400472,7 +399692,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
400472
399692
  return [];
400473
399693
  }
400474
399694
  }
400475
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.1.20") {
399695
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.1.21") {
400476
399696
  if (process.env.USER_TYPE === "ant") {
400477
399697
  const changelog = MACRO.VERSION_CHANGELOG;
400478
399698
  if (changelog) {
@@ -400499,7 +399719,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.1.20")
400499
399719
  releaseNotes
400500
399720
  };
400501
399721
  }
400502
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.1.20") {
399722
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.1.21") {
400503
399723
  if (process.env.USER_TYPE === "ant") {
400504
399724
  const changelog = MACRO.VERSION_CHANGELOG;
400505
399725
  if (changelog) {
@@ -400605,7 +399825,7 @@ var init_bridgeConfig = __esm(() => {
400605
399825
  });
400606
399826
 
400607
399827
  // src/utils/sessionTitle.ts
400608
- import { z as z80 } from "zod/v4";
399828
+ import { z as z77 } from "zod/v4";
400609
399829
  function extractConversationText(messages) {
400610
399830
  const parts = [];
400611
399831
  for (const msg of messages) {
@@ -400690,7 +399910,7 @@ var init_sessionTitle = __esm(() => {
400690
399910
  init_debug();
400691
399911
  init_json();
400692
399912
  init_messages3();
400693
- titleSchema = lazySchema(() => z80.object({ title: z80.string() }));
399913
+ titleSchema = lazySchema(() => z77.object({ title: z77.string() }));
400694
399914
  });
400695
399915
 
400696
399916
  // src/commands/rename/generateSessionName.ts
@@ -401666,7 +400886,7 @@ function getRecentActivitySync() {
401666
400886
  return cachedActivity;
401667
400887
  }
401668
400888
  function getLogoDisplayData() {
401669
- const version = process.env.DEMO_VERSION ?? "1.1.20";
400889
+ const version = process.env.DEMO_VERSION ?? "1.1.21";
401670
400890
  const serverUrl = getDirectConnectServerUrl();
401671
400891
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
401672
400892
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -402940,7 +402160,7 @@ function LogoV2() {
402940
402160
  if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
402941
402161
  t2 = () => {
402942
402162
  const currentConfig = getGlobalConfig();
402943
- if (currentConfig.lastReleaseNotesSeen === "1.1.20") {
402163
+ if (currentConfig.lastReleaseNotesSeen === "1.1.21") {
402944
402164
  return;
402945
402165
  }
402946
402166
  saveGlobalConfig(_temp327);
@@ -403616,12 +402836,12 @@ function LogoV2() {
403616
402836
  return t41;
403617
402837
  }
403618
402838
  function _temp327(current) {
403619
- if (current.lastReleaseNotesSeen === "1.1.20") {
402839
+ if (current.lastReleaseNotesSeen === "1.1.21") {
403620
402840
  return current;
403621
402841
  }
403622
402842
  return {
403623
402843
  ...current,
403624
- lastReleaseNotesSeen: "1.1.20"
402844
+ lastReleaseNotesSeen: "1.1.21"
403625
402845
  };
403626
402846
  }
403627
402847
  function _temp245(s_0) {
@@ -429520,17 +428740,17 @@ var init_plugin2 = __esm(() => {
429520
428740
  });
429521
428741
 
429522
428742
  // src/services/settingsSync/types.ts
429523
- import { z as z81 } from "zod/v4";
428743
+ import { z as z78 } from "zod/v4";
429524
428744
  var UserSyncContentSchema, UserSyncDataSchema;
429525
428745
  var init_types12 = __esm(() => {
429526
- UserSyncContentSchema = lazySchema(() => z81.object({
429527
- entries: z81.record(z81.string(), z81.string())
428746
+ UserSyncContentSchema = lazySchema(() => z78.object({
428747
+ entries: z78.record(z78.string(), z78.string())
429528
428748
  }));
429529
- UserSyncDataSchema = lazySchema(() => z81.object({
429530
- userId: z81.string(),
429531
- version: z81.number(),
429532
- lastModified: z81.string(),
429533
- checksum: z81.string(),
428749
+ UserSyncDataSchema = lazySchema(() => z78.object({
428750
+ userId: z78.string(),
428751
+ version: z78.number(),
428752
+ lastModified: z78.string(),
428753
+ checksum: z78.string(),
429534
428754
  content: UserSyncContentSchema()
429535
428755
  }));
429536
428756
  });
@@ -429823,7 +429043,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
429823
429043
  smapsRollup,
429824
429044
  platform: process.platform,
429825
429045
  nodeVersion: process.version,
429826
- ccVersion: "1.1.20"
429046
+ ccVersion: "1.1.21"
429827
429047
  };
429828
429048
  }
429829
429049
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -430408,7 +429628,7 @@ var init_bridge_kick = __esm(() => {
430408
429628
  var call64 = async () => {
430409
429629
  return {
430410
429630
  type: "text",
430411
- value: `${"1.1.20"} (built ${"2026-04-09T17:12:16.788Z"})`
429631
+ value: `${"1.1.21"} (built ${"2026-04-09T18:54:03.234Z"})`
430412
429632
  };
430413
429633
  }, version, version_default;
430414
429634
  var init_version = __esm(() => {
@@ -431736,6 +430956,20 @@ import { chmod as chmod10, mkdir as mkdir33, readFile as readFile44, writeFile a
431736
430956
  import { homedir as homedir30 } from "os";
431737
430957
  import { join as join120 } from "path";
431738
430958
  import { fileURLToPath as fileURLToPath4 } from "url";
430959
+ function getBrowserTools() {
430960
+ try {
430961
+ const mod = (init_claude_for_chrome_mcp(), __toCommonJS(exports_claude_for_chrome_mcp));
430962
+ return Array.isArray(mod.BROWSER_TOOLS) ? mod.BROWSER_TOOLS : [];
430963
+ } catch {
430964
+ return [];
430965
+ }
430966
+ }
430967
+ function isClaudeInChromeSupported() {
430968
+ return getBrowserTools().length > 0;
430969
+ }
430970
+ function getClaudeInChromeAllowedTools() {
430971
+ return getBrowserTools().map((tool) => `mcp__claude-in-chrome__${tool.name}`);
430972
+ }
431739
430973
  function shouldEnableClaudeInChrome(chromeFlag) {
431740
430974
  if (getIsNonInteractiveSession() && chromeFlag !== true) {
431741
430975
  return false;
@@ -431767,7 +431001,10 @@ function shouldAutoEnableClaudeInChrome() {
431767
431001
  }
431768
431002
  function setupClaudeInChrome() {
431769
431003
  const isNativeBuild = isInBundledMode();
431770
- const allowedTools = BROWSER_TOOLS.map((tool) => `mcp__claude-in-chrome__${tool.name}`);
431004
+ const allowedTools = getClaudeInChromeAllowedTools();
431005
+ if (allowedTools.length === 0) {
431006
+ throw new Error("Claude in Chrome is unavailable in this build because browser automation support is not installed.");
431007
+ }
431771
431008
  const env6 = {};
431772
431009
  if (getSessionBypassPermissionsMode()) {
431773
431010
  env6.CLAUDE_CHROME_PERMISSION_MODE = "skip_all_permission_checks";
@@ -431942,7 +431179,6 @@ async function isChromeExtensionInstalled() {
431942
431179
  }
431943
431180
  var CHROME_EXTENSION_RECONNECT_URL = "https://clau.de/chrome/reconnect", NATIVE_HOST_IDENTIFIER = "com.anthropic.claude_code_browser_extension", NATIVE_HOST_MANIFEST_NAME, shouldAutoEnable = undefined;
431944
431181
  var init_setup3 = __esm(() => {
431945
- init_claude_for_chrome_mcp();
431946
431182
  init_state();
431947
431183
  init_config();
431948
431184
  init_debug();
@@ -439346,7 +438582,7 @@ function generateHtmlReport(data, insights) {
439346
438582
  </html>`;
439347
438583
  }
439348
438584
  function buildExportData(data, insights, facets, remoteStats) {
439349
- const version2 = typeof MACRO !== "undefined" ? "1.1.20" : "unknown";
438585
+ const version2 = typeof MACRO !== "undefined" ? "1.1.21" : "unknown";
439350
438586
  const remote_hosts_collected = remoteStats?.hosts.filter((h) => h.sessionCount > 0).map((h) => h.name);
439351
438587
  const facets_summary = {
439352
438588
  total: facets.size,
@@ -443513,7 +442749,7 @@ var init_sessionStorage = __esm(() => {
443513
442749
  init_settings2();
443514
442750
  init_slowOperations();
443515
442751
  init_uuid();
443516
- VERSION6 = typeof MACRO !== "undefined" ? "1.1.20" : "unknown";
442752
+ VERSION6 = typeof MACRO !== "undefined" ? "1.1.21" : "unknown";
443517
442753
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
443518
442754
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
443519
442755
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -444715,7 +443951,7 @@ var init_filesystem = __esm(() => {
444715
443951
  });
444716
443952
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
444717
443953
  const nonce = randomBytes19(16).toString("hex");
444718
- return join130(getClaudeTempDir(), "bundled-skills", "1.1.20", nonce);
443954
+ return join130(getClaudeTempDir(), "bundled-skills", "1.1.21", nonce);
444719
443955
  });
444720
443956
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
444721
443957
  });
@@ -445265,7 +444501,7 @@ var init_ShellCommand = __esm(() => {
445265
444501
  });
445266
444502
 
445267
444503
  // src/types/hooks.ts
445268
- import { z as z82 } from "zod/v4";
444504
+ import { z as z79 } from "zod/v4";
445269
444505
  function isSyncHookJSONOutput(json) {
445270
444506
  return !(("async" in json) && json.async === true);
445271
444507
  }
@@ -445277,110 +444513,110 @@ var init_hooks4 = __esm(() => {
445277
444513
  init_agentSdkTypes();
445278
444514
  init_PermissionRule();
445279
444515
  init_PermissionUpdateSchema();
445280
- promptRequestSchema = lazySchema(() => z82.object({
445281
- prompt: z82.string(),
445282
- message: z82.string(),
445283
- options: z82.array(z82.object({
445284
- key: z82.string(),
445285
- label: z82.string(),
445286
- description: z82.string().optional()
444516
+ promptRequestSchema = lazySchema(() => z79.object({
444517
+ prompt: z79.string(),
444518
+ message: z79.string(),
444519
+ options: z79.array(z79.object({
444520
+ key: z79.string(),
444521
+ label: z79.string(),
444522
+ description: z79.string().optional()
445287
444523
  }))
445288
444524
  }));
445289
- syncHookResponseSchema = lazySchema(() => z82.object({
445290
- continue: z82.boolean().describe("Whether Claude should continue after hook (default: true)").optional(),
445291
- suppressOutput: z82.boolean().describe("Hide stdout from transcript (default: false)").optional(),
445292
- stopReason: z82.string().describe("Message shown when continue is false").optional(),
445293
- decision: z82.enum(["approve", "block"]).optional(),
445294
- reason: z82.string().describe("Explanation for the decision").optional(),
445295
- systemMessage: z82.string().describe("Warning message shown to the user").optional(),
445296
- hookSpecificOutput: z82.union([
445297
- z82.object({
445298
- hookEventName: z82.literal("PreToolUse"),
444525
+ syncHookResponseSchema = lazySchema(() => z79.object({
444526
+ continue: z79.boolean().describe("Whether Claude should continue after hook (default: true)").optional(),
444527
+ suppressOutput: z79.boolean().describe("Hide stdout from transcript (default: false)").optional(),
444528
+ stopReason: z79.string().describe("Message shown when continue is false").optional(),
444529
+ decision: z79.enum(["approve", "block"]).optional(),
444530
+ reason: z79.string().describe("Explanation for the decision").optional(),
444531
+ systemMessage: z79.string().describe("Warning message shown to the user").optional(),
444532
+ hookSpecificOutput: z79.union([
444533
+ z79.object({
444534
+ hookEventName: z79.literal("PreToolUse"),
445299
444535
  permissionDecision: permissionBehaviorSchema().optional(),
445300
- permissionDecisionReason: z82.string().optional(),
445301
- updatedInput: z82.record(z82.string(), z82.unknown()).optional(),
445302
- additionalContext: z82.string().optional()
444536
+ permissionDecisionReason: z79.string().optional(),
444537
+ updatedInput: z79.record(z79.string(), z79.unknown()).optional(),
444538
+ additionalContext: z79.string().optional()
445303
444539
  }),
445304
- z82.object({
445305
- hookEventName: z82.literal("UserPromptSubmit"),
445306
- additionalContext: z82.string().optional()
444540
+ z79.object({
444541
+ hookEventName: z79.literal("UserPromptSubmit"),
444542
+ additionalContext: z79.string().optional()
445307
444543
  }),
445308
- z82.object({
445309
- hookEventName: z82.literal("SessionStart"),
445310
- additionalContext: z82.string().optional(),
445311
- initialUserMessage: z82.string().optional(),
445312
- watchPaths: z82.array(z82.string()).describe("Absolute paths to watch for FileChanged hooks").optional()
444544
+ z79.object({
444545
+ hookEventName: z79.literal("SessionStart"),
444546
+ additionalContext: z79.string().optional(),
444547
+ initialUserMessage: z79.string().optional(),
444548
+ watchPaths: z79.array(z79.string()).describe("Absolute paths to watch for FileChanged hooks").optional()
445313
444549
  }),
445314
- z82.object({
445315
- hookEventName: z82.literal("Setup"),
445316
- additionalContext: z82.string().optional()
444550
+ z79.object({
444551
+ hookEventName: z79.literal("Setup"),
444552
+ additionalContext: z79.string().optional()
445317
444553
  }),
445318
- z82.object({
445319
- hookEventName: z82.literal("SubagentStart"),
445320
- additionalContext: z82.string().optional()
444554
+ z79.object({
444555
+ hookEventName: z79.literal("SubagentStart"),
444556
+ additionalContext: z79.string().optional()
445321
444557
  }),
445322
- z82.object({
445323
- hookEventName: z82.literal("PostToolUse"),
445324
- additionalContext: z82.string().optional(),
445325
- updatedMCPToolOutput: z82.unknown().describe("Updates the output for MCP tools").optional()
444558
+ z79.object({
444559
+ hookEventName: z79.literal("PostToolUse"),
444560
+ additionalContext: z79.string().optional(),
444561
+ updatedMCPToolOutput: z79.unknown().describe("Updates the output for MCP tools").optional()
445326
444562
  }),
445327
- z82.object({
445328
- hookEventName: z82.literal("PostToolUseFailure"),
445329
- additionalContext: z82.string().optional()
444563
+ z79.object({
444564
+ hookEventName: z79.literal("PostToolUseFailure"),
444565
+ additionalContext: z79.string().optional()
445330
444566
  }),
445331
- z82.object({
445332
- hookEventName: z82.literal("PermissionDenied"),
445333
- retry: z82.boolean().optional()
444567
+ z79.object({
444568
+ hookEventName: z79.literal("PermissionDenied"),
444569
+ retry: z79.boolean().optional()
445334
444570
  }),
445335
- z82.object({
445336
- hookEventName: z82.literal("Notification"),
445337
- additionalContext: z82.string().optional()
444571
+ z79.object({
444572
+ hookEventName: z79.literal("Notification"),
444573
+ additionalContext: z79.string().optional()
445338
444574
  }),
445339
- z82.object({
445340
- hookEventName: z82.literal("PermissionRequest"),
445341
- decision: z82.union([
445342
- z82.object({
445343
- behavior: z82.literal("allow"),
445344
- updatedInput: z82.record(z82.string(), z82.unknown()).optional(),
445345
- updatedPermissions: z82.array(permissionUpdateSchema()).optional()
444575
+ z79.object({
444576
+ hookEventName: z79.literal("PermissionRequest"),
444577
+ decision: z79.union([
444578
+ z79.object({
444579
+ behavior: z79.literal("allow"),
444580
+ updatedInput: z79.record(z79.string(), z79.unknown()).optional(),
444581
+ updatedPermissions: z79.array(permissionUpdateSchema()).optional()
445346
444582
  }),
445347
- z82.object({
445348
- behavior: z82.literal("deny"),
445349
- message: z82.string().optional(),
445350
- interrupt: z82.boolean().optional()
444583
+ z79.object({
444584
+ behavior: z79.literal("deny"),
444585
+ message: z79.string().optional(),
444586
+ interrupt: z79.boolean().optional()
445351
444587
  })
445352
444588
  ])
445353
444589
  }),
445354
- z82.object({
445355
- hookEventName: z82.literal("Elicitation"),
445356
- action: z82.enum(["accept", "decline", "cancel"]).optional(),
445357
- content: z82.record(z82.string(), z82.unknown()).optional()
444590
+ z79.object({
444591
+ hookEventName: z79.literal("Elicitation"),
444592
+ action: z79.enum(["accept", "decline", "cancel"]).optional(),
444593
+ content: z79.record(z79.string(), z79.unknown()).optional()
445358
444594
  }),
445359
- z82.object({
445360
- hookEventName: z82.literal("ElicitationResult"),
445361
- action: z82.enum(["accept", "decline", "cancel"]).optional(),
445362
- content: z82.record(z82.string(), z82.unknown()).optional()
444595
+ z79.object({
444596
+ hookEventName: z79.literal("ElicitationResult"),
444597
+ action: z79.enum(["accept", "decline", "cancel"]).optional(),
444598
+ content: z79.record(z79.string(), z79.unknown()).optional()
445363
444599
  }),
445364
- z82.object({
445365
- hookEventName: z82.literal("CwdChanged"),
445366
- watchPaths: z82.array(z82.string()).describe("Absolute paths to watch for FileChanged hooks").optional()
444600
+ z79.object({
444601
+ hookEventName: z79.literal("CwdChanged"),
444602
+ watchPaths: z79.array(z79.string()).describe("Absolute paths to watch for FileChanged hooks").optional()
445367
444603
  }),
445368
- z82.object({
445369
- hookEventName: z82.literal("FileChanged"),
445370
- watchPaths: z82.array(z82.string()).describe("Absolute paths to watch for FileChanged hooks").optional()
444604
+ z79.object({
444605
+ hookEventName: z79.literal("FileChanged"),
444606
+ watchPaths: z79.array(z79.string()).describe("Absolute paths to watch for FileChanged hooks").optional()
445371
444607
  }),
445372
- z82.object({
445373
- hookEventName: z82.literal("WorktreeCreate"),
445374
- worktreePath: z82.string()
444608
+ z79.object({
444609
+ hookEventName: z79.literal("WorktreeCreate"),
444610
+ worktreePath: z79.string()
445375
444611
  })
445376
444612
  ]).optional()
445377
444613
  }));
445378
444614
  hookJSONOutputSchema = lazySchema(() => {
445379
- const asyncHookResponseSchema = z82.object({
445380
- async: z82.literal(true),
445381
- asyncTimeout: z82.number().optional()
444615
+ const asyncHookResponseSchema = z79.object({
444616
+ async: z79.literal(true),
444617
+ asyncTimeout: z79.number().optional()
445382
444618
  });
445383
- return z82.union([asyncHookResponseSchema, syncHookResponseSchema()]);
444619
+ return z79.union([asyncHookResponseSchema, syncHookResponseSchema()]);
445384
444620
  });
445385
444621
  });
445386
444622
 
@@ -445417,7 +444653,7 @@ var init_combinedAbortSignal = __esm(() => {
445417
444653
  });
445418
444654
 
445419
444655
  // src/utils/hooks/hookHelpers.ts
445420
- import { z as z83 } from "zod/v4";
444656
+ import { z as z80 } from "zod/v4";
445421
444657
  function addArgumentsToPrompt(prompt, jsonInput) {
445422
444658
  return substituteArguments(prompt, jsonInput);
445423
444659
  }
@@ -445454,9 +444690,9 @@ var init_hookHelpers = __esm(() => {
445454
444690
  init_argumentSubstitution();
445455
444691
  init_messages3();
445456
444692
  init_sessionHooks();
445457
- hookResponseSchema = lazySchema(() => z83.object({
445458
- ok: z83.boolean().describe("Whether the condition was met"),
445459
- reason: z83.string().describe("Reason, if the condition was not met").optional()
444693
+ hookResponseSchema = lazySchema(() => z80.object({
444694
+ ok: z80.boolean().describe("Whether the condition was met"),
444695
+ reason: z80.string().describe("Reason, if the condition was not met").optional()
445460
444696
  }));
445461
444697
  });
445462
444698
 
@@ -450714,7 +449950,7 @@ function computeFingerprint(messageText, version2) {
450714
449950
  }
450715
449951
  function computeFingerprintFromMessages(messages) {
450716
449952
  const firstMessageText = extractFirstMessageText(messages);
450717
- return computeFingerprint(firstMessageText, "1.1.20");
449953
+ return computeFingerprint(firstMessageText, "1.1.21");
450718
449954
  }
450719
449955
  var FINGERPRINT_SALT = "59cf53e54c78";
450720
449956
  var init_fingerprint = () => {};
@@ -452569,7 +451805,7 @@ async function sideQuery(opts) {
452569
451805
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
452570
451806
  }
452571
451807
  const messageText = extractFirstUserMessageText(messages);
452572
- const fingerprint = computeFingerprint(messageText, "1.1.20");
451808
+ const fingerprint = computeFingerprint(messageText, "1.1.21");
452573
451809
  const attributionHeader = getAttributionHeader(fingerprint);
452574
451810
  const systemBlocks = [
452575
451811
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -452844,7 +452080,7 @@ import {
452844
452080
  import { createServer as createServer5 } from "net";
452845
452081
  import { homedir as homedir32, platform as platform4 } from "os";
452846
452082
  import { join as join133 } from "path";
452847
- import { z as z84 } from "zod";
452083
+ import { z as z81 } from "zod";
452848
452084
  function log2(message, ...args) {
452849
452085
  if (LOG_FILE) {
452850
452086
  const timestamp = new Date().toISOString();
@@ -453182,8 +452418,8 @@ var init_chromeNativeHost = __esm(() => {
453182
452418
  init_common2();
453183
452419
  MAX_MESSAGE_SIZE = 1024 * 1024;
453184
452420
  LOG_FILE = process.env.USER_TYPE === "ant" ? join133(homedir32(), ".claude", "debug", "chrome-native-host.txt") : undefined;
453185
- messageSchema = lazySchema(() => z84.object({
453186
- type: z84.string()
452421
+ messageSchema = lazySchema(() => z81.object({
452422
+ type: z81.string()
453187
452423
  }).passthrough());
453188
452424
  });
453189
452425
 
@@ -457367,7 +456603,7 @@ function buildSystemInitMessage(inputs) {
457367
456603
  slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
457368
456604
  apiKeySource: getAnthropicApiKeyWithSource().source,
457369
456605
  betas: getSdkBetas(),
457370
- claude_code_version: "1.1.20",
456606
+ claude_code_version: "1.1.21",
457371
456607
  output_style: outputStyle2,
457372
456608
  agents: inputs.agents.map((agent) => agent.agentType),
457373
456609
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -458481,7 +457717,7 @@ var init_MessageSelector = __esm(() => {
458481
457717
  });
458482
457718
 
458483
457719
  // src/hooks/useIdeLogging.ts
458484
- import { z as z85 } from "zod/v4";
457720
+ import { z as z82 } from "zod/v4";
458485
457721
  function useIdeLogging(mcpClients) {
458486
457722
  import_react201.useEffect(() => {
458487
457723
  if (!mcpClients.length) {
@@ -458500,11 +457736,11 @@ var import_react201, LogEventSchema;
458500
457736
  var init_useIdeLogging = __esm(() => {
458501
457737
  init_ide();
458502
457738
  import_react201 = __toESM(require_react(), 1);
458503
- LogEventSchema = lazySchema(() => z85.object({
458504
- method: z85.literal("log_event"),
458505
- params: z85.object({
458506
- eventName: z85.string(),
458507
- eventData: z85.object({}).passthrough()
457739
+ LogEventSchema = lazySchema(() => z82.object({
457740
+ method: z82.literal("log_event"),
457741
+ params: z82.object({
457742
+ eventName: z82.string(),
457743
+ eventData: z82.object({}).passthrough()
458508
457744
  })
458509
457745
  }));
458510
457746
  });
@@ -462657,7 +461893,7 @@ var init_PermissionDecisionDebugInfo = __esm(() => {
462657
461893
  });
462658
461894
 
462659
461895
  // src/utils/permissions/permissionExplainer.ts
462660
- import { z as z86 } from "zod/v4";
461896
+ import { z as z83 } from "zod/v4";
462661
461897
  function formatToolInput(input) {
462662
461898
  if (typeof input === "string") {
462663
461899
  return input;
@@ -462809,11 +462045,11 @@ var init_permissionExplainer = __esm(() => {
462809
462045
  required: ["explanation", "reasoning", "risk", "riskLevel"]
462810
462046
  }
462811
462047
  };
462812
- RiskAssessmentSchema = lazySchema(() => z86.object({
462813
- riskLevel: z86.enum(["LOW", "MEDIUM", "HIGH"]),
462814
- explanation: z86.string(),
462815
- reasoning: z86.string(),
462816
- risk: z86.string()
462048
+ RiskAssessmentSchema = lazySchema(() => z83.object({
462049
+ riskLevel: z83.enum(["LOW", "MEDIUM", "HIGH"]),
462050
+ explanation: z83.string(),
462051
+ reasoning: z83.string(),
462052
+ risk: z83.string()
462817
462053
  }));
462818
462054
  });
462819
462055
 
@@ -469713,7 +468949,7 @@ var init_dateTimeParser = __esm(() => {
469713
468949
  });
469714
468950
 
469715
468951
  // src/utils/mcp/elicitationValidation.ts
469716
- import { z as z87 } from "zod/v4";
468952
+ import { z as z84 } from "zod/v4";
469717
468953
  function isMultiSelectEnumSchema(schema) {
469718
468954
  return schema.type === "array" && "items" in schema && typeof schema.items === "object" && schema.items !== null && (("enum" in schema.items) || ("anyOf" in schema.items));
469719
468955
  }
@@ -469765,12 +469001,12 @@ function getZodSchema(schema) {
469765
469001
  if (isEnumSchema(schema)) {
469766
469002
  const [first, ...rest] = getEnumValues(schema);
469767
469003
  if (!first) {
469768
- return z87.never();
469004
+ return z84.never();
469769
469005
  }
469770
- return z87.enum([first, ...rest]);
469006
+ return z84.enum([first, ...rest]);
469771
469007
  }
469772
469008
  if (schema.type === "string") {
469773
- let stringSchema = z87.string();
469009
+ let stringSchema = z84.string();
469774
469010
  if (schema.minLength !== undefined) {
469775
469011
  stringSchema = stringSchema.min(schema.minLength, {
469776
469012
  message: `Must be at least ${schema.minLength} ${plural(schema.minLength, "character")}`
@@ -469811,7 +469047,7 @@ function getZodSchema(schema) {
469811
469047
  const isInteger = schema.type === "integer";
469812
469048
  const formatNum = (n2) => Number.isInteger(n2) && !isInteger ? `${n2}.0` : String(n2);
469813
469049
  const rangeMsg = schema.minimum !== undefined && schema.maximum !== undefined ? `Must be ${typeLabel} between ${formatNum(schema.minimum)} and ${formatNum(schema.maximum)}` : schema.minimum !== undefined ? `Must be ${typeLabel} >= ${formatNum(schema.minimum)}` : schema.maximum !== undefined ? `Must be ${typeLabel} <= ${formatNum(schema.maximum)}` : `Must be ${typeLabel}`;
469814
- let numberSchema = z87.coerce.number({
469050
+ let numberSchema = z84.coerce.number({
469815
469051
  error: rangeMsg
469816
469052
  });
469817
469053
  if (schema.type === "integer") {
@@ -469830,7 +469066,7 @@ function getZodSchema(schema) {
469830
469066
  return numberSchema;
469831
469067
  }
469832
469068
  if (schema.type === "boolean") {
469833
- return z87.coerce.boolean();
469069
+ return z84.coerce.boolean();
469834
469070
  }
469835
469071
  throw new Error(`Unsupported schema: ${jsonStringify(schema)}`);
469836
469072
  }
@@ -471319,7 +470555,7 @@ var init_useCommandQueue = __esm(() => {
471319
470555
  });
471320
470556
 
471321
470557
  // src/hooks/useIdeAtMentioned.ts
471322
- import { z as z88 } from "zod/v4";
470558
+ import { z as z85 } from "zod/v4";
471323
470559
  function useIdeAtMentioned(mcpClients, onAtMentioned) {
471324
470560
  const ideClientRef = import_react223.useRef(undefined);
471325
470561
  import_react223.useEffect(() => {
@@ -471353,12 +470589,12 @@ var init_useIdeAtMentioned = __esm(() => {
471353
470589
  init_log2();
471354
470590
  init_ide();
471355
470591
  import_react223 = __toESM(require_react(), 1);
471356
- AtMentionedSchema = lazySchema(() => z88.object({
471357
- method: z88.literal(NOTIFICATION_METHOD),
471358
- params: z88.object({
471359
- filePath: z88.string(),
471360
- lineStart: z88.number().optional(),
471361
- lineEnd: z88.number().optional()
470592
+ AtMentionedSchema = lazySchema(() => z85.object({
470593
+ method: z85.literal(NOTIFICATION_METHOD),
470594
+ params: z85.object({
470595
+ filePath: z85.string(),
470596
+ lineStart: z85.number().optional(),
470597
+ lineEnd: z85.number().optional()
471362
470598
  })
471363
470599
  }));
471364
470600
  });
@@ -471946,7 +471182,7 @@ var init_useVoiceEnabled = __esm(() => {
471946
471182
  function getSemverPart(version2) {
471947
471183
  return `${import_semver12.major(version2, { loose: true })}.${import_semver12.minor(version2, { loose: true })}.${import_semver12.patch(version2, { loose: true })}`;
471948
471184
  }
471949
- function useUpdateNotification(updatedVersion, initialVersion = "1.1.20") {
471185
+ function useUpdateNotification(updatedVersion, initialVersion = "1.1.21") {
471950
471186
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react228.useState(() => getSemverPart(initialVersion));
471951
471187
  if (!updatedVersion) {
471952
471188
  return null;
@@ -471986,7 +471222,7 @@ function AutoUpdater({
471986
471222
  return;
471987
471223
  }
471988
471224
  if (false) {}
471989
- const currentVersion = "1.1.20";
471225
+ const currentVersion = "1.1.21";
471990
471226
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
471991
471227
  let latestVersion = await getLatestVersion(channel);
471992
471228
  const isDisabled = isAutoUpdaterDisabled();
@@ -472197,12 +471433,12 @@ function NativeAutoUpdater({
472197
471433
  logEvent("tengu_native_auto_updater_start", {});
472198
471434
  try {
472199
471435
  const maxVersion = await getMaxVersion();
472200
- if (maxVersion && gt("1.1.20", maxVersion)) {
471436
+ if (maxVersion && gt("1.1.21", maxVersion)) {
472201
471437
  const msg = await getMaxVersionMessage();
472202
471438
  setMaxVersionIssue(msg ?? "affects your version");
472203
471439
  }
472204
471440
  const result = await installLatest(channel);
472205
- const currentVersion = "1.1.20";
471441
+ const currentVersion = "1.1.21";
472206
471442
  const latencyMs = Date.now() - startTime;
472207
471443
  if (result.lockFailed) {
472208
471444
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -472337,17 +471573,17 @@ function PackageManagerAutoUpdater(t0) {
472337
471573
  const maxVersion = await getMaxVersion();
472338
471574
  if (maxVersion && latest && gt(latest, maxVersion)) {
472339
471575
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
472340
- if (gte("1.1.20", maxVersion)) {
472341
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.1.20"} is already at or above maxVersion ${maxVersion}, skipping update`);
471576
+ if (gte("1.1.21", maxVersion)) {
471577
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.1.21"} is already at or above maxVersion ${maxVersion}, skipping update`);
472342
471578
  setUpdateAvailable(false);
472343
471579
  return;
472344
471580
  }
472345
471581
  latest = maxVersion;
472346
471582
  }
472347
- const hasUpdate = latest && !gte("1.1.20", latest) && !shouldSkipVersion(latest);
471583
+ const hasUpdate = latest && !gte("1.1.21", latest) && !shouldSkipVersion(latest);
472348
471584
  setUpdateAvailable(!!hasUpdate);
472349
471585
  if (hasUpdate) {
472350
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.1.20"} -> ${latest}`);
471586
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.1.21"} -> ${latest}`);
472351
471587
  }
472352
471588
  };
472353
471589
  $2[0] = t1;
@@ -472381,7 +471617,7 @@ function PackageManagerAutoUpdater(t0) {
472381
471617
  wrap: "truncate",
472382
471618
  children: [
472383
471619
  "currentVersion: ",
472384
- "1.1.20"
471620
+ "1.1.21"
472385
471621
  ]
472386
471622
  }, undefined, true, undefined, this);
472387
471623
  $2[3] = verbose;
@@ -475659,7 +474895,7 @@ var init_shellHistoryCompletion = __esm(() => {
475659
474895
  });
475660
474896
 
475661
474897
  // src/utils/suggestions/slackChannelSuggestions.ts
475662
- import { z as z89 } from "zod";
474898
+ import { z as z86 } from "zod";
475663
474899
  function findSlackClient(clients) {
475664
474900
  return clients.find((c5) => c5.type === "connected" && c5.name.includes("slack"));
475665
474901
  }
@@ -475788,7 +475024,7 @@ var init_slackChannelSuggestions = __esm(() => {
475788
475024
  knownChannels = new Set;
475789
475025
  knownChannelsChanged = createSignal();
475790
475026
  subscribeKnownChannels = knownChannelsChanged.subscribe;
475791
- resultsEnvelopeSchema = lazySchema(() => z89.object({ results: z89.string() }));
475027
+ resultsEnvelopeSchema = lazySchema(() => z86.object({ results: z86.string() }));
475792
475028
  });
475793
475029
 
475794
475030
  // src/hooks/unifiedSuggestions.ts
@@ -479939,7 +479175,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
479939
479175
  project_dir: getOriginalCwd(),
479940
479176
  added_dirs: addedDirs
479941
479177
  },
479942
- version: "1.1.20",
479178
+ version: "1.1.21",
479943
479179
  output_style: {
479944
479180
  name: outputStyleName
479945
479181
  },
@@ -486180,10 +485416,14 @@ __export(exports_cacache, {
486180
485416
  resourceFromAttributes: () => resourceFromAttributes8,
486181
485417
  plot: () => plot8,
486182
485418
  getSyntaxTheme: () => getSyntaxTheme9,
485419
+ getSentinelCategory: () => getSentinelCategory7,
486183
485420
  getMcpConfigForManifest: () => getMcpConfigForManifest7,
486184
485421
  default: () => cacache_default,
485422
+ createComputerUseMcpServer: () => createComputerUseMcpServer7,
486185
485423
  createClaudeForChromeMcpServer: () => createClaudeForChromeMcpServer7,
486186
485424
  context: () => context8,
485425
+ buildComputerUseTools: () => buildComputerUseTools7,
485426
+ bindSessionContext: () => bindSessionContext7,
486187
485427
  __stub: () => __stub7,
486188
485428
  SpanStatusCode: () => SpanStatusCode7,
486189
485429
  SimpleSpanProcessor: () => SimpleSpanProcessor7,
@@ -486207,8 +485447,10 @@ __export(exports_cacache, {
486207
485447
  InstrumentType: () => InstrumentType7,
486208
485448
  ExportResultCode: () => ExportResultCode8,
486209
485449
  DataPointType: () => DataPointType7,
485450
+ DEFAULT_GRANT_FLAGS: () => DEFAULT_GRANT_FLAGS7,
486210
485451
  ColorFile: () => ColorFile8,
486211
485452
  ColorDiff: () => ColorDiff8,
485453
+ CLI_CU_CAPABILITIES: () => CLI_CU_CAPABILITIES7,
486212
485454
  BatchSpanProcessor: () => BatchSpanProcessor8,
486213
485455
  BatchLogRecordProcessor: () => BatchLogRecordProcessor8,
486214
485456
  BasicTracerProvider: () => BasicTracerProvider8,
@@ -486218,7 +485460,7 @@ __export(exports_cacache, {
486218
485460
  ATTR_SERVICE_NAME: () => ATTR_SERVICE_NAME8
486219
485461
  });
486220
485462
  var noop19 = () => null, noopClass7 = class {
486221
- }, handler12, stub13, cacache_default, __stub7 = true, SandboxViolationStore8 = null, SandboxManager13, SandboxRuntimeConfigSchema8, BROWSER_TOOLS7, getMcpConfigForManifest7, ColorDiff8 = null, ColorFile8 = null, getSyntaxTheme9, plot8, createClaudeForChromeMcpServer7, ExportResultCode8, resourceFromAttributes8, Resource7, SimpleSpanProcessor7, BatchSpanProcessor8, NodeTracerProvider7, BasicTracerProvider8, OTLPTraceExporter7, OTLPLogExporter7, OTLPMetricExporter7, PrometheusExporter7, LoggerProvider8, SimpleLogRecordProcessor7, BatchLogRecordProcessor8, MeterProvider8, PeriodicExportingMetricReader8, trace9, context8, SpanStatusCode7, ATTR_SERVICE_NAME8 = "service.name", ATTR_SERVICE_VERSION8 = "service.version", SEMRESATTRS_SERVICE_NAME7 = "service.name", SEMRESATTRS_SERVICE_VERSION7 = "service.version", AggregationTemporality8, DataPointType7, InstrumentType7, PushMetricExporter7, SeverityNumber7;
485463
+ }, handler12, stub13, cacache_default, __stub7 = true, SandboxViolationStore8 = null, SandboxManager13, SandboxRuntimeConfigSchema8, BROWSER_TOOLS7, CLI_CU_CAPABILITIES7, getMcpConfigForManifest7, ColorDiff8 = null, ColorFile8 = null, getSyntaxTheme9, plot8, createClaudeForChromeMcpServer7, buildComputerUseTools7 = () => [], createComputerUseMcpServer7, bindSessionContext7, DEFAULT_GRANT_FLAGS7, getSentinelCategory7, ExportResultCode8, resourceFromAttributes8, Resource7, SimpleSpanProcessor7, BatchSpanProcessor8, NodeTracerProvider7, BasicTracerProvider8, OTLPTraceExporter7, OTLPLogExporter7, OTLPMetricExporter7, PrometheusExporter7, LoggerProvider8, SimpleLogRecordProcessor7, BatchLogRecordProcessor8, MeterProvider8, PeriodicExportingMetricReader8, trace9, context8, SpanStatusCode7, ATTR_SERVICE_NAME8 = "service.name", ATTR_SERVICE_VERSION8 = "service.version", SEMRESATTRS_SERVICE_NAME7 = "service.name", SEMRESATTRS_SERVICE_VERSION7 = "service.version", AggregationTemporality8, DataPointType7, InstrumentType7, PushMetricExporter7, SeverityNumber7;
486222
485464
  var init_cacache = __esm(() => {
486223
485465
  handler12 = {
486224
485466
  get(_2, prop) {
@@ -486240,10 +485482,15 @@ var init_cacache = __esm(() => {
486240
485482
  SandboxManager13 = new Proxy({}, { get: () => noop19 });
486241
485483
  SandboxRuntimeConfigSchema8 = { parse: () => ({}) };
486242
485484
  BROWSER_TOOLS7 = [];
485485
+ CLI_CU_CAPABILITIES7 = { screenshotFiltering: "native", platform: "darwin" };
486243
485486
  getMcpConfigForManifest7 = noop19;
486244
485487
  getSyntaxTheme9 = noop19;
486245
485488
  plot8 = noop19;
486246
485489
  createClaudeForChromeMcpServer7 = noop19;
485490
+ createComputerUseMcpServer7 = noop19;
485491
+ bindSessionContext7 = noop19;
485492
+ DEFAULT_GRANT_FLAGS7 = {};
485493
+ getSentinelCategory7 = noop19;
486247
485494
  ExportResultCode8 = { SUCCESS: 0, FAILED: 1 };
486248
485495
  resourceFromAttributes8 = noop19;
486249
485496
  Resource7 = noopClass7;
@@ -489765,7 +489012,7 @@ var init_TeammateViewHeader = __esm(() => {
489765
489012
  });
489766
489013
 
489767
489014
  // src/hooks/useIdeSelection.ts
489768
- import { z as z90 } from "zod/v4";
489015
+ import { z as z87 } from "zod/v4";
489769
489016
  function useIdeSelection(mcpClients, onSelect) {
489770
489017
  const handlersRegistered = import_react284.useRef(false);
489771
489018
  const currentIDERef = import_react284.useRef(null);
@@ -489827,21 +489074,21 @@ var init_useIdeSelection = __esm(() => {
489827
489074
  init_log2();
489828
489075
  init_ide();
489829
489076
  import_react284 = __toESM(require_react(), 1);
489830
- SelectionChangedSchema = lazySchema(() => z90.object({
489831
- method: z90.literal("selection_changed"),
489832
- params: z90.object({
489833
- selection: z90.object({
489834
- start: z90.object({
489835
- line: z90.number(),
489836
- character: z90.number()
489077
+ SelectionChangedSchema = lazySchema(() => z87.object({
489078
+ method: z87.literal("selection_changed"),
489079
+ params: z87.object({
489080
+ selection: z87.object({
489081
+ start: z87.object({
489082
+ line: z87.number(),
489083
+ character: z87.number()
489837
489084
  }),
489838
- end: z90.object({
489839
- line: z90.number(),
489840
- character: z90.number()
489085
+ end: z87.object({
489086
+ line: z87.number(),
489087
+ character: z87.number()
489841
489088
  })
489842
489089
  }).nullable().optional(),
489843
- text: z90.string().optional(),
489844
- filePath: z90.string().optional()
489090
+ text: z87.string().optional(),
489091
+ filePath: z87.string().optional()
489845
489092
  })
489846
489093
  }));
489847
489094
  });
@@ -491499,7 +490746,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
491499
490746
  } catch {}
491500
490747
  const data = {
491501
490748
  trigger,
491502
- version: "1.1.20",
490749
+ version: "1.1.21",
491503
490750
  platform: process.platform,
491504
490751
  transcript,
491505
490752
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -493088,7 +492335,7 @@ var init_useOfficialMarketplaceNotification = __esm(() => {
493088
492335
  });
493089
492336
 
493090
492337
  // src/hooks/usePromptsFromClaudeInChrome.tsx
493091
- import { z as z91 } from "zod/v4";
492338
+ import { z as z88 } from "zod/v4";
493092
492339
  function usePromptsFromClaudeInChrome(mcpClients, toolPermissionMode) {
493093
492340
  const $2 = c3(6);
493094
492341
  import_react299.useRef(undefined);
@@ -493134,16 +492381,16 @@ var init_usePromptsFromClaudeInChrome = __esm(() => {
493134
492381
  init_client9();
493135
492382
  init_common2();
493136
492383
  import_react299 = __toESM(require_react(), 1);
493137
- ClaudeInChromePromptNotificationSchema = lazySchema(() => z91.object({
493138
- method: z91.literal("notifications/message"),
493139
- params: z91.object({
493140
- prompt: z91.string(),
493141
- image: z91.object({
493142
- type: z91.literal("base64"),
493143
- media_type: z91.enum(["image/jpeg", "image/png", "image/gif", "image/webp"]),
493144
- data: z91.string()
492384
+ ClaudeInChromePromptNotificationSchema = lazySchema(() => z88.object({
492385
+ method: z88.literal("notifications/message"),
492386
+ params: z88.object({
492387
+ prompt: z88.string(),
492388
+ image: z88.object({
492389
+ type: z88.literal("base64"),
492390
+ media_type: z88.enum(["image/jpeg", "image/png", "image/gif", "image/webp"]),
492391
+ data: z88.string()
493145
492392
  }).optional(),
493146
- tabId: z91.number().optional()
492393
+ tabId: z88.number().optional()
493147
492394
  })
493148
492395
  }));
493149
492396
  });
@@ -494009,266 +493256,266 @@ var init_bypassPermissionsKillswitch = __esm(() => {
494009
493256
  });
494010
493257
 
494011
493258
  // src/entrypoints/sdk/controlSchemas.ts
494012
- import { z as z92 } from "zod/v4";
493259
+ import { z as z89 } from "zod/v4";
494013
493260
  var JSONRPCMessagePlaceholder, SDKHookCallbackMatcherSchema, SDKControlInitializeRequestSchema, SDKControlInitializeResponseSchema, SDKControlInterruptRequestSchema, SDKControlPermissionRequestSchema, SDKControlSetPermissionModeRequestSchema, SDKControlSetModelRequestSchema, SDKControlSetMaxThinkingTokensRequestSchema, SDKControlMcpStatusRequestSchema, SDKControlMcpStatusResponseSchema, SDKControlGetContextUsageRequestSchema, ContextCategorySchema, ContextGridSquareSchema, SDKControlGetContextUsageResponseSchema, SDKControlRewindFilesRequestSchema, SDKControlRewindFilesResponseSchema, SDKControlCancelAsyncMessageRequestSchema, SDKControlCancelAsyncMessageResponseSchema, SDKControlSeedReadStateRequestSchema, SDKHookCallbackRequestSchema, SDKControlMcpMessageRequestSchema, SDKControlMcpSetServersRequestSchema, SDKControlMcpSetServersResponseSchema, SDKControlReloadPluginsRequestSchema, SDKControlReloadPluginsResponseSchema, SDKControlMcpReconnectRequestSchema, SDKControlMcpToggleRequestSchema, SDKControlStopTaskRequestSchema, SDKControlApplyFlagSettingsRequestSchema, SDKControlGetSettingsRequestSchema, SDKControlGetSettingsResponseSchema, SDKControlElicitationRequestSchema, SDKControlElicitationResponseSchema, SDKControlRequestInnerSchema, SDKControlRequestSchema, ControlResponseSchema, ControlErrorResponseSchema, SDKControlResponseSchema, SDKControlCancelRequestSchema, SDKKeepAliveMessageSchema, SDKUpdateEnvironmentVariablesMessageSchema, StdoutMessageSchema, StdinMessageSchema;
494014
493261
  var init_controlSchemas = __esm(() => {
494015
493262
  init_coreSchemas();
494016
- JSONRPCMessagePlaceholder = lazySchema(() => z92.unknown());
494017
- SDKHookCallbackMatcherSchema = lazySchema(() => z92.object({
494018
- matcher: z92.string().optional(),
494019
- hookCallbackIds: z92.array(z92.string()),
494020
- timeout: z92.number().optional()
493263
+ JSONRPCMessagePlaceholder = lazySchema(() => z89.unknown());
493264
+ SDKHookCallbackMatcherSchema = lazySchema(() => z89.object({
493265
+ matcher: z89.string().optional(),
493266
+ hookCallbackIds: z89.array(z89.string()),
493267
+ timeout: z89.number().optional()
494021
493268
  }).describe("Configuration for matching and routing hook callbacks."));
494022
- SDKControlInitializeRequestSchema = lazySchema(() => z92.object({
494023
- subtype: z92.literal("initialize"),
494024
- hooks: z92.record(HookEventSchema(), z92.array(SDKHookCallbackMatcherSchema())).optional(),
494025
- sdkMcpServers: z92.array(z92.string()).optional(),
494026
- jsonSchema: z92.record(z92.string(), z92.unknown()).optional(),
494027
- systemPrompt: z92.string().optional(),
494028
- appendSystemPrompt: z92.string().optional(),
494029
- agents: z92.record(z92.string(), AgentDefinitionSchema()).optional(),
494030
- promptSuggestions: z92.boolean().optional(),
494031
- agentProgressSummaries: z92.boolean().optional()
493269
+ SDKControlInitializeRequestSchema = lazySchema(() => z89.object({
493270
+ subtype: z89.literal("initialize"),
493271
+ hooks: z89.record(HookEventSchema(), z89.array(SDKHookCallbackMatcherSchema())).optional(),
493272
+ sdkMcpServers: z89.array(z89.string()).optional(),
493273
+ jsonSchema: z89.record(z89.string(), z89.unknown()).optional(),
493274
+ systemPrompt: z89.string().optional(),
493275
+ appendSystemPrompt: z89.string().optional(),
493276
+ agents: z89.record(z89.string(), AgentDefinitionSchema()).optional(),
493277
+ promptSuggestions: z89.boolean().optional(),
493278
+ agentProgressSummaries: z89.boolean().optional()
494032
493279
  }).describe("Initializes the SDK session with hooks, MCP servers, and agent configuration."));
494033
- SDKControlInitializeResponseSchema = lazySchema(() => z92.object({
494034
- commands: z92.array(SlashCommandSchema()),
494035
- agents: z92.array(AgentInfoSchema()),
494036
- output_style: z92.string(),
494037
- available_output_styles: z92.array(z92.string()),
494038
- models: z92.array(ModelInfoSchema()),
493280
+ SDKControlInitializeResponseSchema = lazySchema(() => z89.object({
493281
+ commands: z89.array(SlashCommandSchema()),
493282
+ agents: z89.array(AgentInfoSchema()),
493283
+ output_style: z89.string(),
493284
+ available_output_styles: z89.array(z89.string()),
493285
+ models: z89.array(ModelInfoSchema()),
494039
493286
  account: AccountInfoSchema(),
494040
- pid: z92.number().optional().describe("@internal CLI process PID for tmux socket isolation"),
493287
+ pid: z89.number().optional().describe("@internal CLI process PID for tmux socket isolation"),
494041
493288
  fast_mode_state: FastModeStateSchema().optional()
494042
493289
  }).describe("Response from session initialization with available commands, models, and account info."));
494043
- SDKControlInterruptRequestSchema = lazySchema(() => z92.object({
494044
- subtype: z92.literal("interrupt")
493290
+ SDKControlInterruptRequestSchema = lazySchema(() => z89.object({
493291
+ subtype: z89.literal("interrupt")
494045
493292
  }).describe("Interrupts the currently running conversation turn."));
494046
- SDKControlPermissionRequestSchema = lazySchema(() => z92.object({
494047
- subtype: z92.literal("can_use_tool"),
494048
- tool_name: z92.string(),
494049
- input: z92.record(z92.string(), z92.unknown()),
494050
- permission_suggestions: z92.array(PermissionUpdateSchema()).optional(),
494051
- blocked_path: z92.string().optional(),
494052
- decision_reason: z92.string().optional(),
494053
- title: z92.string().optional(),
494054
- display_name: z92.string().optional(),
494055
- tool_use_id: z92.string(),
494056
- agent_id: z92.string().optional(),
494057
- description: z92.string().optional()
493293
+ SDKControlPermissionRequestSchema = lazySchema(() => z89.object({
493294
+ subtype: z89.literal("can_use_tool"),
493295
+ tool_name: z89.string(),
493296
+ input: z89.record(z89.string(), z89.unknown()),
493297
+ permission_suggestions: z89.array(PermissionUpdateSchema()).optional(),
493298
+ blocked_path: z89.string().optional(),
493299
+ decision_reason: z89.string().optional(),
493300
+ title: z89.string().optional(),
493301
+ display_name: z89.string().optional(),
493302
+ tool_use_id: z89.string(),
493303
+ agent_id: z89.string().optional(),
493304
+ description: z89.string().optional()
494058
493305
  }).describe("Requests permission to use a tool with the given input."));
494059
- SDKControlSetPermissionModeRequestSchema = lazySchema(() => z92.object({
494060
- subtype: z92.literal("set_permission_mode"),
493306
+ SDKControlSetPermissionModeRequestSchema = lazySchema(() => z89.object({
493307
+ subtype: z89.literal("set_permission_mode"),
494061
493308
  mode: PermissionModeSchema(),
494062
- ultraplan: z92.boolean().optional().describe("@internal CCR ultraplan session marker.")
493309
+ ultraplan: z89.boolean().optional().describe("@internal CCR ultraplan session marker.")
494063
493310
  }).describe("Sets the permission mode for tool execution handling."));
494064
- SDKControlSetModelRequestSchema = lazySchema(() => z92.object({
494065
- subtype: z92.literal("set_model"),
494066
- model: z92.string().optional()
493311
+ SDKControlSetModelRequestSchema = lazySchema(() => z89.object({
493312
+ subtype: z89.literal("set_model"),
493313
+ model: z89.string().optional()
494067
493314
  }).describe("Sets the model to use for subsequent conversation turns."));
494068
- SDKControlSetMaxThinkingTokensRequestSchema = lazySchema(() => z92.object({
494069
- subtype: z92.literal("set_max_thinking_tokens"),
494070
- max_thinking_tokens: z92.number().nullable()
493315
+ SDKControlSetMaxThinkingTokensRequestSchema = lazySchema(() => z89.object({
493316
+ subtype: z89.literal("set_max_thinking_tokens"),
493317
+ max_thinking_tokens: z89.number().nullable()
494071
493318
  }).describe("Sets the maximum number of thinking tokens for extended thinking."));
494072
- SDKControlMcpStatusRequestSchema = lazySchema(() => z92.object({
494073
- subtype: z92.literal("mcp_status")
493319
+ SDKControlMcpStatusRequestSchema = lazySchema(() => z89.object({
493320
+ subtype: z89.literal("mcp_status")
494074
493321
  }).describe("Requests the current status of all MCP server connections."));
494075
- SDKControlMcpStatusResponseSchema = lazySchema(() => z92.object({
494076
- mcpServers: z92.array(McpServerStatusSchema())
493322
+ SDKControlMcpStatusResponseSchema = lazySchema(() => z89.object({
493323
+ mcpServers: z89.array(McpServerStatusSchema())
494077
493324
  }).describe("Response containing the current status of all MCP server connections."));
494078
- SDKControlGetContextUsageRequestSchema = lazySchema(() => z92.object({
494079
- subtype: z92.literal("get_context_usage")
493325
+ SDKControlGetContextUsageRequestSchema = lazySchema(() => z89.object({
493326
+ subtype: z89.literal("get_context_usage")
494080
493327
  }).describe("Requests a breakdown of current context window usage by category."));
494081
- ContextCategorySchema = lazySchema(() => z92.object({
494082
- name: z92.string(),
494083
- tokens: z92.number(),
494084
- color: z92.string(),
494085
- isDeferred: z92.boolean().optional()
493328
+ ContextCategorySchema = lazySchema(() => z89.object({
493329
+ name: z89.string(),
493330
+ tokens: z89.number(),
493331
+ color: z89.string(),
493332
+ isDeferred: z89.boolean().optional()
494086
493333
  }));
494087
- ContextGridSquareSchema = lazySchema(() => z92.object({
494088
- color: z92.string(),
494089
- isFilled: z92.boolean(),
494090
- categoryName: z92.string(),
494091
- tokens: z92.number(),
494092
- percentage: z92.number(),
494093
- squareFullness: z92.number()
493334
+ ContextGridSquareSchema = lazySchema(() => z89.object({
493335
+ color: z89.string(),
493336
+ isFilled: z89.boolean(),
493337
+ categoryName: z89.string(),
493338
+ tokens: z89.number(),
493339
+ percentage: z89.number(),
493340
+ squareFullness: z89.number()
494094
493341
  }));
494095
- SDKControlGetContextUsageResponseSchema = lazySchema(() => z92.object({
494096
- categories: z92.array(ContextCategorySchema()),
494097
- totalTokens: z92.number(),
494098
- maxTokens: z92.number(),
494099
- rawMaxTokens: z92.number(),
494100
- percentage: z92.number(),
494101
- gridRows: z92.array(z92.array(ContextGridSquareSchema())),
494102
- model: z92.string(),
494103
- memoryFiles: z92.array(z92.object({
494104
- path: z92.string(),
494105
- type: z92.string(),
494106
- tokens: z92.number()
493342
+ SDKControlGetContextUsageResponseSchema = lazySchema(() => z89.object({
493343
+ categories: z89.array(ContextCategorySchema()),
493344
+ totalTokens: z89.number(),
493345
+ maxTokens: z89.number(),
493346
+ rawMaxTokens: z89.number(),
493347
+ percentage: z89.number(),
493348
+ gridRows: z89.array(z89.array(ContextGridSquareSchema())),
493349
+ model: z89.string(),
493350
+ memoryFiles: z89.array(z89.object({
493351
+ path: z89.string(),
493352
+ type: z89.string(),
493353
+ tokens: z89.number()
494107
493354
  })),
494108
- mcpTools: z92.array(z92.object({
494109
- name: z92.string(),
494110
- serverName: z92.string(),
494111
- tokens: z92.number(),
494112
- isLoaded: z92.boolean().optional()
493355
+ mcpTools: z89.array(z89.object({
493356
+ name: z89.string(),
493357
+ serverName: z89.string(),
493358
+ tokens: z89.number(),
493359
+ isLoaded: z89.boolean().optional()
494113
493360
  })),
494114
- deferredBuiltinTools: z92.array(z92.object({
494115
- name: z92.string(),
494116
- tokens: z92.number(),
494117
- isLoaded: z92.boolean()
493361
+ deferredBuiltinTools: z89.array(z89.object({
493362
+ name: z89.string(),
493363
+ tokens: z89.number(),
493364
+ isLoaded: z89.boolean()
494118
493365
  })).optional(),
494119
- systemTools: z92.array(z92.object({ name: z92.string(), tokens: z92.number() })).optional(),
494120
- systemPromptSections: z92.array(z92.object({ name: z92.string(), tokens: z92.number() })).optional(),
494121
- agents: z92.array(z92.object({
494122
- agentType: z92.string(),
494123
- source: z92.string(),
494124
- tokens: z92.number()
493366
+ systemTools: z89.array(z89.object({ name: z89.string(), tokens: z89.number() })).optional(),
493367
+ systemPromptSections: z89.array(z89.object({ name: z89.string(), tokens: z89.number() })).optional(),
493368
+ agents: z89.array(z89.object({
493369
+ agentType: z89.string(),
493370
+ source: z89.string(),
493371
+ tokens: z89.number()
494125
493372
  })),
494126
- slashCommands: z92.object({
494127
- totalCommands: z92.number(),
494128
- includedCommands: z92.number(),
494129
- tokens: z92.number()
493373
+ slashCommands: z89.object({
493374
+ totalCommands: z89.number(),
493375
+ includedCommands: z89.number(),
493376
+ tokens: z89.number()
494130
493377
  }).optional(),
494131
- skills: z92.object({
494132
- totalSkills: z92.number(),
494133
- includedSkills: z92.number(),
494134
- tokens: z92.number(),
494135
- skillFrontmatter: z92.array(z92.object({
494136
- name: z92.string(),
494137
- source: z92.string(),
494138
- tokens: z92.number()
493378
+ skills: z89.object({
493379
+ totalSkills: z89.number(),
493380
+ includedSkills: z89.number(),
493381
+ tokens: z89.number(),
493382
+ skillFrontmatter: z89.array(z89.object({
493383
+ name: z89.string(),
493384
+ source: z89.string(),
493385
+ tokens: z89.number()
494139
493386
  }))
494140
493387
  }).optional(),
494141
- autoCompactThreshold: z92.number().optional(),
494142
- isAutoCompactEnabled: z92.boolean(),
494143
- messageBreakdown: z92.object({
494144
- toolCallTokens: z92.number(),
494145
- toolResultTokens: z92.number(),
494146
- attachmentTokens: z92.number(),
494147
- assistantMessageTokens: z92.number(),
494148
- userMessageTokens: z92.number(),
494149
- toolCallsByType: z92.array(z92.object({
494150
- name: z92.string(),
494151
- callTokens: z92.number(),
494152
- resultTokens: z92.number()
493388
+ autoCompactThreshold: z89.number().optional(),
493389
+ isAutoCompactEnabled: z89.boolean(),
493390
+ messageBreakdown: z89.object({
493391
+ toolCallTokens: z89.number(),
493392
+ toolResultTokens: z89.number(),
493393
+ attachmentTokens: z89.number(),
493394
+ assistantMessageTokens: z89.number(),
493395
+ userMessageTokens: z89.number(),
493396
+ toolCallsByType: z89.array(z89.object({
493397
+ name: z89.string(),
493398
+ callTokens: z89.number(),
493399
+ resultTokens: z89.number()
494153
493400
  })),
494154
- attachmentsByType: z92.array(z92.object({ name: z92.string(), tokens: z92.number() }))
493401
+ attachmentsByType: z89.array(z89.object({ name: z89.string(), tokens: z89.number() }))
494155
493402
  }).optional(),
494156
- apiUsage: z92.object({
494157
- input_tokens: z92.number(),
494158
- output_tokens: z92.number(),
494159
- cache_creation_input_tokens: z92.number(),
494160
- cache_read_input_tokens: z92.number()
493403
+ apiUsage: z89.object({
493404
+ input_tokens: z89.number(),
493405
+ output_tokens: z89.number(),
493406
+ cache_creation_input_tokens: z89.number(),
493407
+ cache_read_input_tokens: z89.number()
494161
493408
  }).nullable()
494162
493409
  }).describe("Breakdown of current context window usage by category (system prompt, tools, messages, etc.)."));
494163
- SDKControlRewindFilesRequestSchema = lazySchema(() => z92.object({
494164
- subtype: z92.literal("rewind_files"),
494165
- user_message_id: z92.string(),
494166
- dry_run: z92.boolean().optional()
493410
+ SDKControlRewindFilesRequestSchema = lazySchema(() => z89.object({
493411
+ subtype: z89.literal("rewind_files"),
493412
+ user_message_id: z89.string(),
493413
+ dry_run: z89.boolean().optional()
494167
493414
  }).describe("Rewinds file changes made since a specific user message."));
494168
- SDKControlRewindFilesResponseSchema = lazySchema(() => z92.object({
494169
- canRewind: z92.boolean(),
494170
- error: z92.string().optional(),
494171
- filesChanged: z92.array(z92.string()).optional(),
494172
- insertions: z92.number().optional(),
494173
- deletions: z92.number().optional()
493415
+ SDKControlRewindFilesResponseSchema = lazySchema(() => z89.object({
493416
+ canRewind: z89.boolean(),
493417
+ error: z89.string().optional(),
493418
+ filesChanged: z89.array(z89.string()).optional(),
493419
+ insertions: z89.number().optional(),
493420
+ deletions: z89.number().optional()
494174
493421
  }).describe("Result of a rewindFiles operation."));
494175
- SDKControlCancelAsyncMessageRequestSchema = lazySchema(() => z92.object({
494176
- subtype: z92.literal("cancel_async_message"),
494177
- message_uuid: z92.string()
493422
+ SDKControlCancelAsyncMessageRequestSchema = lazySchema(() => z89.object({
493423
+ subtype: z89.literal("cancel_async_message"),
493424
+ message_uuid: z89.string()
494178
493425
  }).describe("Drops a pending async user message from the command queue by uuid. No-op if already dequeued for execution."));
494179
- SDKControlCancelAsyncMessageResponseSchema = lazySchema(() => z92.object({
494180
- cancelled: z92.boolean()
493426
+ SDKControlCancelAsyncMessageResponseSchema = lazySchema(() => z89.object({
493427
+ cancelled: z89.boolean()
494181
493428
  }).describe("Result of a cancel_async_message operation. cancelled=false means the message was not in the queue (already dequeued or never enqueued)."));
494182
- SDKControlSeedReadStateRequestSchema = lazySchema(() => z92.object({
494183
- subtype: z92.literal("seed_read_state"),
494184
- path: z92.string(),
494185
- mtime: z92.number()
493429
+ SDKControlSeedReadStateRequestSchema = lazySchema(() => z89.object({
493430
+ subtype: z89.literal("seed_read_state"),
493431
+ path: z89.string(),
493432
+ mtime: z89.number()
494186
493433
  }).describe("Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path."));
494187
- SDKHookCallbackRequestSchema = lazySchema(() => z92.object({
494188
- subtype: z92.literal("hook_callback"),
494189
- callback_id: z92.string(),
493434
+ SDKHookCallbackRequestSchema = lazySchema(() => z89.object({
493435
+ subtype: z89.literal("hook_callback"),
493436
+ callback_id: z89.string(),
494190
493437
  input: HookInputSchema(),
494191
- tool_use_id: z92.string().optional()
493438
+ tool_use_id: z89.string().optional()
494192
493439
  }).describe("Delivers a hook callback with its input data."));
494193
- SDKControlMcpMessageRequestSchema = lazySchema(() => z92.object({
494194
- subtype: z92.literal("mcp_message"),
494195
- server_name: z92.string(),
493440
+ SDKControlMcpMessageRequestSchema = lazySchema(() => z89.object({
493441
+ subtype: z89.literal("mcp_message"),
493442
+ server_name: z89.string(),
494196
493443
  message: JSONRPCMessagePlaceholder()
494197
493444
  }).describe("Sends a JSON-RPC message to a specific MCP server."));
494198
- SDKControlMcpSetServersRequestSchema = lazySchema(() => z92.object({
494199
- subtype: z92.literal("mcp_set_servers"),
494200
- servers: z92.record(z92.string(), McpServerConfigForProcessTransportSchema())
493445
+ SDKControlMcpSetServersRequestSchema = lazySchema(() => z89.object({
493446
+ subtype: z89.literal("mcp_set_servers"),
493447
+ servers: z89.record(z89.string(), McpServerConfigForProcessTransportSchema())
494201
493448
  }).describe("Replaces the set of dynamically managed MCP servers."));
494202
- SDKControlMcpSetServersResponseSchema = lazySchema(() => z92.object({
494203
- added: z92.array(z92.string()),
494204
- removed: z92.array(z92.string()),
494205
- errors: z92.record(z92.string(), z92.string())
493449
+ SDKControlMcpSetServersResponseSchema = lazySchema(() => z89.object({
493450
+ added: z89.array(z89.string()),
493451
+ removed: z89.array(z89.string()),
493452
+ errors: z89.record(z89.string(), z89.string())
494206
493453
  }).describe("Result of replacing the set of dynamically managed MCP servers."));
494207
- SDKControlReloadPluginsRequestSchema = lazySchema(() => z92.object({
494208
- subtype: z92.literal("reload_plugins")
493454
+ SDKControlReloadPluginsRequestSchema = lazySchema(() => z89.object({
493455
+ subtype: z89.literal("reload_plugins")
494209
493456
  }).describe("Reloads plugins from disk and returns the refreshed session components."));
494210
- SDKControlReloadPluginsResponseSchema = lazySchema(() => z92.object({
494211
- commands: z92.array(SlashCommandSchema()),
494212
- agents: z92.array(AgentInfoSchema()),
494213
- plugins: z92.array(z92.object({
494214
- name: z92.string(),
494215
- path: z92.string(),
494216
- source: z92.string().optional()
493457
+ SDKControlReloadPluginsResponseSchema = lazySchema(() => z89.object({
493458
+ commands: z89.array(SlashCommandSchema()),
493459
+ agents: z89.array(AgentInfoSchema()),
493460
+ plugins: z89.array(z89.object({
493461
+ name: z89.string(),
493462
+ path: z89.string(),
493463
+ source: z89.string().optional()
494217
493464
  })),
494218
- mcpServers: z92.array(McpServerStatusSchema()),
494219
- error_count: z92.number()
493465
+ mcpServers: z89.array(McpServerStatusSchema()),
493466
+ error_count: z89.number()
494220
493467
  }).describe("Refreshed commands, agents, plugins, and MCP server status after reload."));
494221
- SDKControlMcpReconnectRequestSchema = lazySchema(() => z92.object({
494222
- subtype: z92.literal("mcp_reconnect"),
494223
- serverName: z92.string()
493468
+ SDKControlMcpReconnectRequestSchema = lazySchema(() => z89.object({
493469
+ subtype: z89.literal("mcp_reconnect"),
493470
+ serverName: z89.string()
494224
493471
  }).describe("Reconnects a disconnected or failed MCP server."));
494225
- SDKControlMcpToggleRequestSchema = lazySchema(() => z92.object({
494226
- subtype: z92.literal("mcp_toggle"),
494227
- serverName: z92.string(),
494228
- enabled: z92.boolean()
493472
+ SDKControlMcpToggleRequestSchema = lazySchema(() => z89.object({
493473
+ subtype: z89.literal("mcp_toggle"),
493474
+ serverName: z89.string(),
493475
+ enabled: z89.boolean()
494229
493476
  }).describe("Enables or disables an MCP server."));
494230
- SDKControlStopTaskRequestSchema = lazySchema(() => z92.object({
494231
- subtype: z92.literal("stop_task"),
494232
- task_id: z92.string()
493477
+ SDKControlStopTaskRequestSchema = lazySchema(() => z89.object({
493478
+ subtype: z89.literal("stop_task"),
493479
+ task_id: z89.string()
494233
493480
  }).describe("Stops a running task."));
494234
- SDKControlApplyFlagSettingsRequestSchema = lazySchema(() => z92.object({
494235
- subtype: z92.literal("apply_flag_settings"),
494236
- settings: z92.record(z92.string(), z92.unknown())
493481
+ SDKControlApplyFlagSettingsRequestSchema = lazySchema(() => z89.object({
493482
+ subtype: z89.literal("apply_flag_settings"),
493483
+ settings: z89.record(z89.string(), z89.unknown())
494237
493484
  }).describe("Merges the provided settings into the flag settings layer, updating the active configuration."));
494238
- SDKControlGetSettingsRequestSchema = lazySchema(() => z92.object({
494239
- subtype: z92.literal("get_settings")
493485
+ SDKControlGetSettingsRequestSchema = lazySchema(() => z89.object({
493486
+ subtype: z89.literal("get_settings")
494240
493487
  }).describe("Returns the effective merged settings and the raw per-source settings."));
494241
- SDKControlGetSettingsResponseSchema = lazySchema(() => z92.object({
494242
- effective: z92.record(z92.string(), z92.unknown()),
494243
- sources: z92.array(z92.object({
494244
- source: z92.enum([
493488
+ SDKControlGetSettingsResponseSchema = lazySchema(() => z89.object({
493489
+ effective: z89.record(z89.string(), z89.unknown()),
493490
+ sources: z89.array(z89.object({
493491
+ source: z89.enum([
494245
493492
  "userSettings",
494246
493493
  "projectSettings",
494247
493494
  "localSettings",
494248
493495
  "flagSettings",
494249
493496
  "policySettings"
494250
493497
  ]),
494251
- settings: z92.record(z92.string(), z92.unknown())
493498
+ settings: z89.record(z89.string(), z89.unknown())
494252
493499
  })).describe("Ordered low-to-high priority — later entries override earlier ones."),
494253
- applied: z92.object({
494254
- model: z92.string(),
494255
- effort: z92.enum(["low", "medium", "high", "max"]).nullable()
493500
+ applied: z89.object({
493501
+ model: z89.string(),
493502
+ effort: z89.enum(["low", "medium", "high", "max"]).nullable()
494256
493503
  }).optional().describe("Runtime-resolved values after env overrides, session state, and model-specific defaults are applied. Unlike `effective` (disk merge), these reflect what will actually be sent to the API.")
494257
493504
  }).describe("Effective merged settings plus raw per-source settings in merge order."));
494258
- SDKControlElicitationRequestSchema = lazySchema(() => z92.object({
494259
- subtype: z92.literal("elicitation"),
494260
- mcp_server_name: z92.string(),
494261
- message: z92.string(),
494262
- mode: z92.enum(["form", "url"]).optional(),
494263
- url: z92.string().optional(),
494264
- elicitation_id: z92.string().optional(),
494265
- requested_schema: z92.record(z92.string(), z92.unknown()).optional()
493505
+ SDKControlElicitationRequestSchema = lazySchema(() => z89.object({
493506
+ subtype: z89.literal("elicitation"),
493507
+ mcp_server_name: z89.string(),
493508
+ message: z89.string(),
493509
+ mode: z89.enum(["form", "url"]).optional(),
493510
+ url: z89.string().optional(),
493511
+ elicitation_id: z89.string().optional(),
493512
+ requested_schema: z89.record(z89.string(), z89.unknown()).optional()
494266
493513
  }).describe("Requests the SDK consumer to handle an MCP elicitation (user input request)."));
494267
- SDKControlElicitationResponseSchema = lazySchema(() => z92.object({
494268
- action: z92.enum(["accept", "decline", "cancel"]),
494269
- content: z92.record(z92.string(), z92.unknown()).optional()
493514
+ SDKControlElicitationResponseSchema = lazySchema(() => z89.object({
493515
+ action: z89.enum(["accept", "decline", "cancel"]),
493516
+ content: z89.record(z89.string(), z89.unknown()).optional()
494270
493517
  }).describe("Response from the SDK consumer for an elicitation request."));
494271
- SDKControlRequestInnerSchema = lazySchema(() => z92.union([
493518
+ SDKControlRequestInnerSchema = lazySchema(() => z89.union([
494272
493519
  SDKControlInterruptRequestSchema(),
494273
493520
  SDKControlPermissionRequestSchema(),
494274
493521
  SDKControlInitializeRequestSchema(),
@@ -494291,38 +493538,38 @@ var init_controlSchemas = __esm(() => {
494291
493538
  SDKControlGetSettingsRequestSchema(),
494292
493539
  SDKControlElicitationRequestSchema()
494293
493540
  ]));
494294
- SDKControlRequestSchema = lazySchema(() => z92.object({
494295
- type: z92.literal("control_request"),
494296
- request_id: z92.string(),
493541
+ SDKControlRequestSchema = lazySchema(() => z89.object({
493542
+ type: z89.literal("control_request"),
493543
+ request_id: z89.string(),
494297
493544
  request: SDKControlRequestInnerSchema()
494298
493545
  }));
494299
- ControlResponseSchema = lazySchema(() => z92.object({
494300
- subtype: z92.literal("success"),
494301
- request_id: z92.string(),
494302
- response: z92.record(z92.string(), z92.unknown()).optional()
493546
+ ControlResponseSchema = lazySchema(() => z89.object({
493547
+ subtype: z89.literal("success"),
493548
+ request_id: z89.string(),
493549
+ response: z89.record(z89.string(), z89.unknown()).optional()
494303
493550
  }));
494304
- ControlErrorResponseSchema = lazySchema(() => z92.object({
494305
- subtype: z92.literal("error"),
494306
- request_id: z92.string(),
494307
- error: z92.string(),
494308
- pending_permission_requests: z92.array(z92.lazy(() => SDKControlRequestSchema())).optional()
493551
+ ControlErrorResponseSchema = lazySchema(() => z89.object({
493552
+ subtype: z89.literal("error"),
493553
+ request_id: z89.string(),
493554
+ error: z89.string(),
493555
+ pending_permission_requests: z89.array(z89.lazy(() => SDKControlRequestSchema())).optional()
494309
493556
  }));
494310
- SDKControlResponseSchema = lazySchema(() => z92.object({
494311
- type: z92.literal("control_response"),
494312
- response: z92.union([ControlResponseSchema(), ControlErrorResponseSchema()])
493557
+ SDKControlResponseSchema = lazySchema(() => z89.object({
493558
+ type: z89.literal("control_response"),
493559
+ response: z89.union([ControlResponseSchema(), ControlErrorResponseSchema()])
494313
493560
  }));
494314
- SDKControlCancelRequestSchema = lazySchema(() => z92.object({
494315
- type: z92.literal("control_cancel_request"),
494316
- request_id: z92.string()
493561
+ SDKControlCancelRequestSchema = lazySchema(() => z89.object({
493562
+ type: z89.literal("control_cancel_request"),
493563
+ request_id: z89.string()
494317
493564
  }).describe("Cancels a currently open control request."));
494318
- SDKKeepAliveMessageSchema = lazySchema(() => z92.object({
494319
- type: z92.literal("keep_alive")
493565
+ SDKKeepAliveMessageSchema = lazySchema(() => z89.object({
493566
+ type: z89.literal("keep_alive")
494320
493567
  }).describe("Keep-alive message to maintain WebSocket connection."));
494321
- SDKUpdateEnvironmentVariablesMessageSchema = lazySchema(() => z92.object({
494322
- type: z92.literal("update_environment_variables"),
494323
- variables: z92.record(z92.string(), z92.string())
493568
+ SDKUpdateEnvironmentVariablesMessageSchema = lazySchema(() => z89.object({
493569
+ type: z89.literal("update_environment_variables"),
493570
+ variables: z89.record(z89.string(), z89.string())
494324
493571
  }).describe("Updates environment variables at runtime."));
494325
- StdoutMessageSchema = lazySchema(() => z92.union([
493572
+ StdoutMessageSchema = lazySchema(() => z89.union([
494326
493573
  SDKMessageSchema(),
494327
493574
  SDKStreamlinedTextMessageSchema(),
494328
493575
  SDKStreamlinedToolUseSummaryMessageSchema(),
@@ -494332,7 +493579,7 @@ var init_controlSchemas = __esm(() => {
494332
493579
  SDKControlCancelRequestSchema(),
494333
493580
  SDKKeepAliveMessageSchema()
494334
493581
  ]));
494335
- StdinMessageSchema = lazySchema(() => z92.union([
493582
+ StdinMessageSchema = lazySchema(() => z89.union([
494336
493583
  SDKUserMessageSchema(),
494337
493584
  SDKControlRequestSchema(),
494338
493585
  SDKControlResponseSchema(),
@@ -494342,7 +493589,7 @@ var init_controlSchemas = __esm(() => {
494342
493589
  });
494343
493590
 
494344
493591
  // src/utils/permissions/PermissionPromptToolResultSchema.ts
494345
- import z93 from "zod/v4";
493592
+ import z90 from "zod/v4";
494346
493593
  function permissionPromptToolResultToPermissionDecision(result, tool, input, toolUseContext) {
494347
493594
  const decisionReason = {
494348
493595
  type: "permissionPromptTool",
@@ -494378,30 +493625,30 @@ var init_PermissionPromptToolResultSchema = __esm(() => {
494378
493625
  init_debug();
494379
493626
  init_PermissionUpdate();
494380
493627
  init_PermissionUpdateSchema();
494381
- inputSchema39 = lazySchema(() => z93.object({
494382
- tool_name: z93.string().describe("The name of the tool requesting permission"),
494383
- input: z93.record(z93.string(), z93.unknown()).describe("The input for the tool"),
494384
- tool_use_id: z93.string().optional().describe("The unique tool use request ID")
493628
+ inputSchema39 = lazySchema(() => z90.object({
493629
+ tool_name: z90.string().describe("The name of the tool requesting permission"),
493630
+ input: z90.record(z90.string(), z90.unknown()).describe("The input for the tool"),
493631
+ tool_use_id: z90.string().optional().describe("The unique tool use request ID")
494385
493632
  }));
494386
- decisionClassificationField = lazySchema(() => z93.enum(["user_temporary", "user_permanent", "user_reject"]).optional().catch(undefined));
494387
- PermissionAllowResultSchema = lazySchema(() => z93.object({
494388
- behavior: z93.literal("allow"),
494389
- updatedInput: z93.record(z93.string(), z93.unknown()),
494390
- updatedPermissions: z93.array(permissionUpdateSchema()).optional().catch((ctx2) => {
493633
+ decisionClassificationField = lazySchema(() => z90.enum(["user_temporary", "user_permanent", "user_reject"]).optional().catch(undefined));
493634
+ PermissionAllowResultSchema = lazySchema(() => z90.object({
493635
+ behavior: z90.literal("allow"),
493636
+ updatedInput: z90.record(z90.string(), z90.unknown()),
493637
+ updatedPermissions: z90.array(permissionUpdateSchema()).optional().catch((ctx2) => {
494391
493638
  logForDebugging(`Malformed updatedPermissions from SDK host ignored: ${ctx2.error.issues[0]?.message ?? "unknown"}`, { level: "warn" });
494392
493639
  return;
494393
493640
  }),
494394
- toolUseID: z93.string().optional(),
493641
+ toolUseID: z90.string().optional(),
494395
493642
  decisionClassification: decisionClassificationField()
494396
493643
  }));
494397
- PermissionDenyResultSchema = lazySchema(() => z93.object({
494398
- behavior: z93.literal("deny"),
494399
- message: z93.string(),
494400
- interrupt: z93.boolean().optional(),
494401
- toolUseID: z93.string().optional(),
493644
+ PermissionDenyResultSchema = lazySchema(() => z90.object({
493645
+ behavior: z90.literal("deny"),
493646
+ message: z90.string(),
493647
+ interrupt: z90.boolean().optional(),
493648
+ toolUseID: z90.string().optional(),
494402
493649
  decisionClassification: decisionClassificationField()
494403
493650
  }));
494404
- outputSchema32 = lazySchema(() => z93.union([PermissionAllowResultSchema(), PermissionDenyResultSchema()]));
493651
+ outputSchema32 = lazySchema(() => z90.union([PermissionAllowResultSchema(), PermissionDenyResultSchema()]));
494405
493652
  });
494406
493653
 
494407
493654
  // src/cli/ndjsonSafeStringify.ts
@@ -494419,7 +493666,7 @@ var init_ndjsonSafeStringify = __esm(() => {
494419
493666
 
494420
493667
  // src/cli/structuredIO.ts
494421
493668
  import { randomUUID as randomUUID45 } from "crypto";
494422
- import { z as z94 } from "zod/v4";
493669
+ import { z as z91 } from "zod/v4";
494423
493670
  function serializeDecisionReason(reason) {
494424
493671
  if (!reason) {
494425
493672
  return;
@@ -494827,8 +494074,8 @@ class StructuredIO {
494827
494074
  subtype: "mcp_message",
494828
494075
  server_name: serverName,
494829
494076
  message
494830
- }, z94.object({
494831
- mcp_response: z94.any()
494077
+ }, z91.object({
494078
+ mcp_response: z91.any()
494832
494079
  }));
494833
494080
  return response.mcp_response;
494834
494081
  }
@@ -502361,7 +501608,7 @@ var init_replLauncher = __esm(() => {
502361
501608
  });
502362
501609
 
502363
501610
  // src/services/api/bootstrap.ts
502364
- import { z as z95 } from "zod";
501611
+ import { z as z92 } from "zod";
502365
501612
  async function fetchBootstrapAPI() {
502366
501613
  if (isEssentialTrafficOnly()) {
502367
501614
  logForDebugging("[Bootstrap] Skipped: Nonessential traffic disabled");
@@ -502448,12 +501695,12 @@ var init_bootstrap = __esm(() => {
502448
501695
  init_http2();
502449
501696
  init_log2();
502450
501697
  init_providers();
502451
- bootstrapResponseSchema = lazySchema(() => z95.object({
502452
- client_data: z95.record(z95.unknown()).nullish(),
502453
- additional_model_options: z95.array(z95.object({
502454
- model: z95.string(),
502455
- name: z95.string(),
502456
- description: z95.string()
501698
+ bootstrapResponseSchema = lazySchema(() => z92.object({
501699
+ client_data: z92.record(z92.unknown()).nullish(),
501700
+ additional_model_options: z92.array(z92.object({
501701
+ model: z92.string(),
501702
+ name: z92.string(),
501703
+ description: z92.string()
502457
501704
  }).transform(({ model, name, description }) => ({
502458
501705
  value: model,
502459
501706
  label: name,
@@ -505291,11 +504538,14 @@ var init_batch = __esm(() => {
505291
504538
 
505292
504539
  // src/skills/bundled/claudeInChrome.ts
505293
504540
  function registerClaudeInChromeSkill() {
504541
+ if (!isClaudeInChromeSupported()) {
504542
+ return;
504543
+ }
505294
504544
  registerBundledSkill({
505295
504545
  name: "claude-in-chrome",
505296
504546
  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).",
505297
504547
  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__claude-in-chrome__* tools.",
505298
- allowedTools: CLAUDE_IN_CHROME_MCP_TOOLS,
504548
+ allowedTools: getClaudeInChromeAllowedTools(),
505299
504549
  userInvocable: true,
505300
504550
  isEnabled: () => shouldAutoEnableClaudeInChrome(),
505301
504551
  async getPromptForCommand(args) {
@@ -505311,16 +504561,14 @@ ${args}`;
505311
504561
  }
505312
504562
  });
505313
504563
  }
505314
- var CLAUDE_IN_CHROME_MCP_TOOLS, SKILL_ACTIVATION_MESSAGE = `
504564
+ var SKILL_ACTIVATION_MESSAGE = `
505315
504565
  Now that this skill is invoked, you have access to Chrome browser automation tools. You can now use the mcp__claude-in-chrome__* tools to interact with web pages.
505316
504566
 
505317
504567
  IMPORTANT: Start by calling mcp__claude-in-chrome__tabs_context_mcp to get information about the user's current browser tabs.
505318
504568
  `;
505319
504569
  var init_claudeInChrome = __esm(() => {
505320
- init_claude_for_chrome_mcp();
505321
504570
  init_setup3();
505322
504571
  init_bundledSkills();
505323
- CLAUDE_IN_CHROME_MCP_TOOLS = BROWSER_TOOLS.map((tool) => `mcp__claude-in-chrome__${tool.name}`);
505324
504572
  });
505325
504573
 
505326
504574
  // src/skills/bundled/debug.ts
@@ -505417,7 +504665,7 @@ var init_debug2 = __esm(() => {
505417
504665
  });
505418
504666
 
505419
504667
  // src/keybindings/schema.ts
505420
- import { z as z96 } from "zod/v4";
504668
+ import { z as z93 } from "zod/v4";
505421
504669
  var KEYBINDING_CONTEXTS, KEYBINDING_CONTEXT_DESCRIPTIONS, KEYBINDING_ACTIONS, KeybindingBlockSchema, KeybindingsSchema;
505422
504670
  var init_schema = __esm(() => {
505423
504671
  KEYBINDING_CONTEXTS = [
@@ -505548,18 +504796,18 @@ var init_schema = __esm(() => {
505548
504796
  "settings:close",
505549
504797
  "voice:pushToTalk"
505550
504798
  ];
505551
- KeybindingBlockSchema = lazySchema(() => z96.object({
505552
- context: z96.enum(KEYBINDING_CONTEXTS).describe("UI context where these bindings apply. Global bindings work everywhere."),
505553
- bindings: z96.record(z96.string().describe('Keystroke pattern (e.g., "ctrl+k", "shift+tab")'), z96.union([
505554
- z96.enum(KEYBINDING_ACTIONS),
505555
- z96.string().regex(/^command:[a-zA-Z0-9:\-_]+$/).describe('Command binding (e.g., "command:help", "command:compact"). Executes the slash command as if typed.'),
505556
- z96.null().describe("Set to null to unbind a default shortcut")
504799
+ KeybindingBlockSchema = lazySchema(() => z93.object({
504800
+ context: z93.enum(KEYBINDING_CONTEXTS).describe("UI context where these bindings apply. Global bindings work everywhere."),
504801
+ bindings: z93.record(z93.string().describe('Keystroke pattern (e.g., "ctrl+k", "shift+tab")'), z93.union([
504802
+ z93.enum(KEYBINDING_ACTIONS),
504803
+ z93.string().regex(/^command:[a-zA-Z0-9:\-_]+$/).describe('Command binding (e.g., "command:help", "command:compact"). Executes the slash command as if typed.'),
504804
+ z93.null().describe("Set to null to unbind a default shortcut")
505557
504805
  ]).describe("Action to trigger, command to invoke, or null to unbind")).describe("Map of keystroke patterns to actions")
505558
504806
  }).describe("A block of keybindings for a specific context"));
505559
- KeybindingsSchema = lazySchema(() => z96.object({
505560
- $schema: z96.string().optional().describe("JSON Schema URL for editor validation"),
505561
- $docs: z96.string().optional().describe("Documentation URL"),
505562
- bindings: z96.array(KeybindingBlockSchema()).describe("Array of keybinding blocks by context")
504807
+ KeybindingsSchema = lazySchema(() => z93.object({
504808
+ $schema: z93.string().optional().describe("JSON Schema URL for editor validation"),
504809
+ $docs: z93.string().optional().describe("Documentation URL"),
504810
+ bindings: z93.array(KeybindingBlockSchema()).describe("Array of keybinding blocks by context")
505563
504811
  }).describe("Claude Code keybindings configuration. Customize keyboard shortcuts by context."));
505564
504812
  });
505565
504813
 
@@ -507086,7 +506334,7 @@ function initBundledSkills() {
507086
506334
  if (false) {}
507087
506335
  if (false) {}
507088
506336
  if (false) {}
507089
- if (shouldAutoEnableClaudeInChrome()) {
506337
+ if (isClaudeInChromeSupported() && shouldAutoEnableClaudeInChrome()) {
507090
506338
  registerClaudeInChromeSkill();
507091
506339
  }
507092
506340
  if (false) {}
@@ -507846,13 +507094,13 @@ var init_resetProToOpusDefault = __esm(() => {
507846
507094
  });
507847
507095
 
507848
507096
  // src/server/types.ts
507849
- import { z as z97 } from "zod/v4";
507097
+ import { z as z94 } from "zod/v4";
507850
507098
  var connectResponseSchema;
507851
507099
  var init_types14 = __esm(() => {
507852
- connectResponseSchema = lazySchema(() => z97.object({
507853
- session_id: z97.string(),
507854
- ws_url: z97.string(),
507855
- work_dir: z97.string().optional()
507100
+ connectResponseSchema = lazySchema(() => z94.object({
507101
+ session_id: z94.string(),
507102
+ ws_url: z94.string(),
507103
+ work_dir: z94.string().optional()
507856
507104
  }));
507857
507105
  });
507858
507106
 
@@ -507913,7 +507161,7 @@ function appendToLog(path17, message) {
507913
507161
  cwd: getFsImplementation().cwd(),
507914
507162
  userType: process.env.USER_TYPE,
507915
507163
  sessionId: getSessionId(),
507916
- version: "1.1.20"
507164
+ version: "1.1.21"
507917
507165
  };
507918
507166
  getLogWriter(path17).write(messageWithTimestamp);
507919
507167
  }
@@ -508515,7 +507763,7 @@ var init_pollConfigDefaults = __esm(() => {
508515
507763
  });
508516
507764
 
508517
507765
  // src/bridge/pollConfig.ts
508518
- import { z as z98 } from "zod/v4";
507766
+ import { z as z95 } from "zod/v4";
508519
507767
  function getPollIntervalConfig() {
508520
507768
  const raw = getFeatureValue_CACHED_WITH_REFRESH("tengu_bridge_poll_interval_config", DEFAULT_POLL_CONFIG, 5 * 60 * 1000);
508521
507769
  const parsed = pollIntervalConfigSchema().safeParse(raw);
@@ -508527,15 +507775,15 @@ var init_pollConfig = __esm(() => {
508527
507775
  zeroOrAtLeast100 = {
508528
507776
  message: "must be 0 (disabled) or ≥100ms"
508529
507777
  };
508530
- pollIntervalConfigSchema = lazySchema(() => z98.object({
508531
- poll_interval_ms_not_at_capacity: z98.number().int().min(100),
508532
- poll_interval_ms_at_capacity: z98.number().int().refine((v2) => v2 === 0 || v2 >= 100, zeroOrAtLeast100),
508533
- non_exclusive_heartbeat_interval_ms: z98.number().int().min(0).default(0),
508534
- multisession_poll_interval_ms_not_at_capacity: z98.number().int().min(100).default(DEFAULT_POLL_CONFIG.multisession_poll_interval_ms_not_at_capacity),
508535
- multisession_poll_interval_ms_partial_capacity: z98.number().int().min(100).default(DEFAULT_POLL_CONFIG.multisession_poll_interval_ms_partial_capacity),
508536
- multisession_poll_interval_ms_at_capacity: z98.number().int().refine((v2) => v2 === 0 || v2 >= 100, zeroOrAtLeast100).default(DEFAULT_POLL_CONFIG.multisession_poll_interval_ms_at_capacity),
508537
- reclaim_older_than_ms: z98.number().int().min(1).default(5000),
508538
- session_keepalive_interval_v2_ms: z98.number().int().min(0).default(120000)
507778
+ pollIntervalConfigSchema = lazySchema(() => z95.object({
507779
+ poll_interval_ms_not_at_capacity: z95.number().int().min(100),
507780
+ poll_interval_ms_at_capacity: z95.number().int().refine((v2) => v2 === 0 || v2 >= 100, zeroOrAtLeast100),
507781
+ non_exclusive_heartbeat_interval_ms: z95.number().int().min(0).default(0),
507782
+ multisession_poll_interval_ms_not_at_capacity: z95.number().int().min(100).default(DEFAULT_POLL_CONFIG.multisession_poll_interval_ms_not_at_capacity),
507783
+ multisession_poll_interval_ms_partial_capacity: z95.number().int().min(100).default(DEFAULT_POLL_CONFIG.multisession_poll_interval_ms_partial_capacity),
507784
+ multisession_poll_interval_ms_at_capacity: z95.number().int().refine((v2) => v2 === 0 || v2 >= 100, zeroOrAtLeast100).default(DEFAULT_POLL_CONFIG.multisession_poll_interval_ms_at_capacity),
507785
+ reclaim_older_than_ms: z95.number().int().min(1).default(5000),
507786
+ session_keepalive_interval_v2_ms: z95.number().int().min(0).default(120000)
508539
507787
  }).refine((cfg) => cfg.non_exclusive_heartbeat_interval_ms > 0 || cfg.poll_interval_ms_at_capacity > 0, {
508540
507788
  message: "at-capacity liveness requires non_exclusive_heartbeat_interval_ms > 0 or poll_interval_ms_at_capacity > 0"
508541
507789
  }).refine((cfg) => cfg.non_exclusive_heartbeat_interval_ms > 0 || cfg.multisession_poll_interval_ms_at_capacity > 0, {
@@ -511608,7 +510856,7 @@ var init_idleTimeout = __esm(() => {
511608
510856
  import { randomUUID as randomUUID49 } from "crypto";
511609
510857
  import { mkdir as mkdir42, writeFile as writeFile44 } from "fs/promises";
511610
510858
  import { basename as basename55, join as join144 } from "path";
511611
- import { z as z99 } from "zod/v4";
510859
+ import { z as z96 } from "zod/v4";
511612
510860
  function debug3(msg) {
511613
510861
  logForDebugging(`[bridge:inbound-attach] ${msg}`);
511614
510862
  }
@@ -511706,11 +510954,11 @@ var init_inboundAttachments = __esm(() => {
511706
510954
  init_debug();
511707
510955
  init_envUtils();
511708
510956
  init_bridgeConfig();
511709
- attachmentSchema = lazySchema(() => z99.object({
511710
- file_uuid: z99.string(),
511711
- file_name: z99.string()
510957
+ attachmentSchema = lazySchema(() => z96.object({
510958
+ file_uuid: z96.string(),
510959
+ file_name: z96.string()
511712
510960
  }));
511713
- attachmentsArraySchema = lazySchema(() => z99.array(attachmentSchema()));
510961
+ attachmentsArraySchema = lazySchema(() => z96.array(attachmentSchema()));
511714
510962
  });
511715
510963
 
511716
510964
  // src/utils/sessionUrl.ts
@@ -511905,7 +511153,7 @@ var init_headlessPluginInstall = __esm(() => {
511905
511153
  });
511906
511154
 
511907
511155
  // src/bridge/envLessBridgeConfig.ts
511908
- import { z as z100 } from "zod/v4";
511156
+ import { z as z97 } from "zod/v4";
511909
511157
  async function getEnvLessBridgeConfig() {
511910
511158
  const raw = await getFeatureValue_DEPRECATED("tengu_bridge_repl_v2_config", DEFAULT_ENV_LESS_BRIDGE_CONFIG);
511911
511159
  const parsed = envLessBridgeConfigSchema().safeParse(raw);
@@ -511913,8 +511161,8 @@ async function getEnvLessBridgeConfig() {
511913
511161
  }
511914
511162
  async function checkEnvLessBridgeMinVersion() {
511915
511163
  const cfg = await getEnvLessBridgeConfig();
511916
- if (cfg.min_version && lt("1.1.20", cfg.min_version)) {
511917
- return `Your version of localclawd (${"1.1.20"}) is too old for Remote Control.
511164
+ if (cfg.min_version && lt("1.1.21", cfg.min_version)) {
511165
+ return `Your version of localclawd (${"1.1.21"}) is too old for Remote Control.
511918
511166
  Version ${cfg.min_version} or higher is required. Run \`localclawd update\` to update.`;
511919
511167
  }
511920
511168
  return null;
@@ -511937,19 +511185,19 @@ var init_envLessBridgeConfig = __esm(() => {
511937
511185
  min_version: "0.0.0",
511938
511186
  should_show_app_upgrade_message: false
511939
511187
  };
511940
- envLessBridgeConfigSchema = lazySchema(() => z100.object({
511941
- init_retry_max_attempts: z100.number().int().min(1).max(10).default(3),
511942
- init_retry_base_delay_ms: z100.number().int().min(100).default(500),
511943
- init_retry_jitter_fraction: z100.number().min(0).max(1).default(0.25),
511944
- init_retry_max_delay_ms: z100.number().int().min(500).default(4000),
511945
- http_timeout_ms: z100.number().int().min(2000).default(1e4),
511946
- uuid_dedup_buffer_size: z100.number().int().min(100).max(50000).default(2000),
511947
- heartbeat_interval_ms: z100.number().int().min(5000).max(30000).default(20000),
511948
- heartbeat_jitter_fraction: z100.number().min(0).max(0.5).default(0.1),
511949
- token_refresh_buffer_ms: z100.number().int().min(30000).max(1800000).default(300000),
511950
- teardown_archive_timeout_ms: z100.number().int().min(500).max(2000).default(1500),
511951
- connect_timeout_ms: z100.number().int().min(5000).max(60000).default(15000),
511952
- min_version: z100.string().refine((v2) => {
511188
+ envLessBridgeConfigSchema = lazySchema(() => z97.object({
511189
+ init_retry_max_attempts: z97.number().int().min(1).max(10).default(3),
511190
+ init_retry_base_delay_ms: z97.number().int().min(100).default(500),
511191
+ init_retry_jitter_fraction: z97.number().min(0).max(1).default(0.25),
511192
+ init_retry_max_delay_ms: z97.number().int().min(500).default(4000),
511193
+ http_timeout_ms: z97.number().int().min(2000).default(1e4),
511194
+ uuid_dedup_buffer_size: z97.number().int().min(100).max(50000).default(2000),
511195
+ heartbeat_interval_ms: z97.number().int().min(5000).max(30000).default(20000),
511196
+ heartbeat_jitter_fraction: z97.number().min(0).max(0.5).default(0.1),
511197
+ token_refresh_buffer_ms: z97.number().int().min(30000).max(1800000).default(300000),
511198
+ teardown_archive_timeout_ms: z97.number().int().min(500).max(2000).default(1500),
511199
+ connect_timeout_ms: z97.number().int().min(5000).max(60000).default(15000),
511200
+ min_version: z97.string().refine((v2) => {
511953
511201
  try {
511954
511202
  lt(v2, "0.0.0");
511955
511203
  return true;
@@ -511957,7 +511205,7 @@ var init_envLessBridgeConfig = __esm(() => {
511957
511205
  return false;
511958
511206
  }
511959
511207
  }).default("0.0.0"),
511960
- should_show_app_upgrade_message: z100.boolean().default(false)
511208
+ should_show_app_upgrade_message: z97.boolean().default(false)
511961
511209
  }));
511962
511210
  });
511963
511211
 
@@ -512241,7 +511489,7 @@ __export(exports_bridgePointer, {
512241
511489
  });
512242
511490
  import { mkdir as mkdir43, readFile as readFile51, stat as stat49, unlink as unlink24, writeFile as writeFile45 } from "fs/promises";
512243
511491
  import { dirname as dirname60, join as join146 } from "path";
512244
- import { z as z101 } from "zod/v4";
511492
+ import { z as z98 } from "zod/v4";
512245
511493
  function getBridgePointerPath(dir) {
512246
511494
  return join146(getProjectsDir(), sanitizePath2(dir), "bridge-pointer.json");
512247
511495
  }
@@ -512336,10 +511584,10 @@ var init_bridgePointer = __esm(() => {
512336
511584
  init_sessionStoragePortable();
512337
511585
  init_slowOperations();
512338
511586
  BRIDGE_POINTER_TTL_MS = 4 * 60 * 60 * 1000;
512339
- BridgePointerSchema = lazySchema(() => z101.object({
512340
- sessionId: z101.string(),
512341
- environmentId: z101.string(),
512342
- source: z101.enum(["standalone", "repl"])
511587
+ BridgePointerSchema = lazySchema(() => z98.object({
511588
+ sessionId: z98.string(),
511589
+ environmentId: z98.string(),
511590
+ source: z98.enum(["standalone", "repl"])
512343
511591
  }));
512344
511592
  });
512345
511593
 
@@ -512386,7 +511634,7 @@ async function initBridgeCore(params) {
512386
511634
  const rawApi = createBridgeApiClient({
512387
511635
  baseUrl,
512388
511636
  getAccessToken,
512389
- runnerVersion: "1.1.20",
511637
+ runnerVersion: "1.1.21",
512390
511638
  onDebug: logForDebugging,
512391
511639
  onAuth401,
512392
511640
  getTrustedDeviceToken
@@ -518042,7 +517290,7 @@ async function startMCPServer(cwd3, debug4, verbose) {
518042
517290
  setCwd(cwd3);
518043
517291
  const server = new Server({
518044
517292
  name: "claude/tengu",
518045
- version: "1.1.20"
517293
+ version: "1.1.21"
518046
517294
  }, {
518047
517295
  capabilities: {
518048
517296
  tools: {}
@@ -519123,7 +518371,7 @@ function WelcomeV2() {
519123
518371
  dimColor: true,
519124
518372
  children: [
519125
518373
  "v",
519126
- "1.1.20"
518374
+ "1.1.21"
519127
518375
  ]
519128
518376
  }, undefined, true, undefined, this)
519129
518377
  ]
@@ -519692,7 +518940,7 @@ __export(exports_update, {
519692
518940
  });
519693
518941
  async function update() {
519694
518942
  logEvent("tengu_update_check", {});
519695
- writeToStdout(`Current version: ${"1.1.20"}
518943
+ writeToStdout(`Current version: ${"1.1.21"}
519696
518944
  `);
519697
518945
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
519698
518946
  writeToStdout(`Checking for updates to ${channel} version...
@@ -519767,8 +519015,8 @@ async function update() {
519767
519015
  writeToStdout(`localclawd is managed by Homebrew.
519768
519016
  `);
519769
519017
  const latest = await getLatestVersion(channel);
519770
- if (latest && !gte("1.1.20", latest)) {
519771
- writeToStdout(`Update available: ${"1.1.20"} → ${latest}
519018
+ if (latest && !gte("1.1.21", latest)) {
519019
+ writeToStdout(`Update available: ${"1.1.21"} → ${latest}
519772
519020
  `);
519773
519021
  writeToStdout(`
519774
519022
  `);
@@ -519784,8 +519032,8 @@ async function update() {
519784
519032
  writeToStdout(`localclawd is managed by winget.
519785
519033
  `);
519786
519034
  const latest = await getLatestVersion(channel);
519787
- if (latest && !gte("1.1.20", latest)) {
519788
- writeToStdout(`Update available: ${"1.1.20"} → ${latest}
519035
+ if (latest && !gte("1.1.21", latest)) {
519036
+ writeToStdout(`Update available: ${"1.1.21"} → ${latest}
519789
519037
  `);
519790
519038
  writeToStdout(`
519791
519039
  `);
@@ -519799,8 +519047,8 @@ async function update() {
519799
519047
  writeToStdout(`localclawd is managed by apk.
519800
519048
  `);
519801
519049
  const latest = await getLatestVersion(channel);
519802
- if (latest && !gte("1.1.20", latest)) {
519803
- writeToStdout(`Update available: ${"1.1.20"} → ${latest}
519050
+ if (latest && !gte("1.1.21", latest)) {
519051
+ writeToStdout(`Update available: ${"1.1.21"} → ${latest}
519804
519052
  `);
519805
519053
  writeToStdout(`
519806
519054
  `);
@@ -519865,11 +519113,11 @@ async function update() {
519865
519113
  `);
519866
519114
  await gracefulShutdown(1);
519867
519115
  }
519868
- if (result.latestVersion === "1.1.20") {
519869
- writeToStdout(source_default.green(`localclawd is up to date (${"1.1.20"})`) + `
519116
+ if (result.latestVersion === "1.1.21") {
519117
+ writeToStdout(source_default.green(`localclawd is up to date (${"1.1.21"})`) + `
519870
519118
  `);
519871
519119
  } else {
519872
- writeToStdout(source_default.green(`Successfully updated from ${"1.1.20"} to version ${result.latestVersion}`) + `
519120
+ writeToStdout(source_default.green(`Successfully updated from ${"1.1.21"} to version ${result.latestVersion}`) + `
519873
519121
  `);
519874
519122
  await regenerateCompletionCache();
519875
519123
  }
@@ -519929,12 +519177,12 @@ async function update() {
519929
519177
  `);
519930
519178
  await gracefulShutdown(1);
519931
519179
  }
519932
- if (latestVersion === "1.1.20") {
519933
- writeToStdout(source_default.green(`localclawd is up to date (${"1.1.20"})`) + `
519180
+ if (latestVersion === "1.1.21") {
519181
+ writeToStdout(source_default.green(`localclawd is up to date (${"1.1.21"})`) + `
519934
519182
  `);
519935
519183
  await gracefulShutdown(0);
519936
519184
  }
519937
- writeToStdout(`New version available: ${latestVersion} (current: ${"1.1.20"})
519185
+ writeToStdout(`New version available: ${latestVersion} (current: ${"1.1.21"})
519938
519186
  `);
519939
519187
  writeToStdout(`Installing update...
519940
519188
  `);
@@ -519979,7 +519227,7 @@ async function update() {
519979
519227
  logForDebugging(`update: Installation status: ${status2}`);
519980
519228
  switch (status2) {
519981
519229
  case "success":
519982
- writeToStdout(source_default.green(`Successfully updated from ${"1.1.20"} to version ${latestVersion}`) + `
519230
+ writeToStdout(source_default.green(`Successfully updated from ${"1.1.21"} to version ${latestVersion}`) + `
519983
519231
  `);
519984
519232
  await regenerateCompletionCache();
519985
519233
  break;
@@ -521273,7 +520521,7 @@ Run with --debug for more details.
521273
520521
  }
521274
520522
  }
521275
520523
  logForDiagnosticsNoPII("info", "started", {
521276
- version: "1.1.20",
520524
+ version: "1.1.21",
521277
520525
  is_native_binary: isInBundledMode()
521278
520526
  });
521279
520527
  registerCleanup(async () => {
@@ -522057,7 +521305,7 @@ Usage: localclawd --remote "your task description"`, () => gracefulShutdown(1));
522057
521305
  pendingHookMessages
522058
521306
  }, renderAndRun);
522059
521307
  }
522060
- }).version("1.1.20 (localclawd)", "-v, --version", "Output the version number");
521308
+ }).version("1.1.21 (localclawd)", "-v, --version", "Output the version number");
522061
521309
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
522062
521310
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
522063
521311
  if (canUserConfigureAdvisor()) {
@@ -522565,7 +521813,7 @@ if (false) {}
522565
521813
  async function main2() {
522566
521814
  const args = process.argv.slice(2);
522567
521815
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
522568
- console.log(`${"1.1.20"} (localclawd)`);
521816
+ console.log(`${"1.1.21"} (localclawd)`);
522569
521817
  return;
522570
521818
  }
522571
521819
  const {
@@ -522662,4 +521910,4 @@ localclawd crashed: ${msg}
522662
521910
  process.exit(1);
522663
521911
  });
522664
521912
 
522665
- //# debugId=D91C9A544979AAFC64756E2164756E21
521913
+ //# debugId=FCA3604487D1F0CA64756E2164756E21