@costrict/csc 4.2.35-beta → 4.2.36

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.js +537 -258
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -31759,8 +31759,8 @@ function getClientVersion() {
31759
31759
  if (cached)
31760
31760
  return cached;
31761
31761
  try {
31762
- if ("4.2.35-beta") {
31763
- cached = "4.2.35-beta";
31762
+ if ("4.2.36") {
31763
+ cached = "4.2.36";
31764
31764
  return cached;
31765
31765
  }
31766
31766
  } catch {}
@@ -224369,7 +224369,7 @@ async function fetchCoStrictModels(baseUrl, accessToken) {
224369
224369
  headers: {
224370
224370
  Authorization: `Bearer ${accessToken}`,
224371
224371
  Accept: "application/json",
224372
- "User-Agent": `csc/${"4.2.35-beta"}`
224372
+ "User-Agent": `csc/${"4.2.36"}`
224373
224373
  },
224374
224374
  signal: controller.signal
224375
224375
  });
@@ -226409,7 +226409,7 @@ var init_auth7 = __esm(() => {
226409
226409
 
226410
226410
  // src/utils/userAgent.ts
226411
226411
  function getClaudeCodeUserAgent() {
226412
- return `costrict/${"4.2.35-beta"}`;
226412
+ return `costrict/${"4.2.36"}`;
226413
226413
  }
226414
226414
 
226415
226415
  // src/utils/workloadContext.ts
@@ -226431,7 +226431,7 @@ function getUserAgent() {
226431
226431
  const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
226432
226432
  const workload = getWorkload();
226433
226433
  const workloadSuffix = workload ? `, workload/${workload}` : "";
226434
- return `csc/${"4.2.35-beta"}`;
226434
+ return `csc/${"4.2.36"}`;
226435
226435
  }
226436
226436
  function getMCPUserAgent() {
226437
226437
  const parts = [];
@@ -226445,7 +226445,7 @@ function getMCPUserAgent() {
226445
226445
  parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
226446
226446
  }
226447
226447
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
226448
- return `csc/${"4.2.35-beta"}${suffix}`;
226448
+ return `csc/${"4.2.36"}${suffix}`;
226449
226449
  }
226450
226450
  function getWebFetchUserAgent() {
226451
226451
  return `Claude-User (${getClaudeCodeUserAgent()}; +https://support.anthropic.com/)`;
@@ -226565,7 +226565,7 @@ var init_user = __esm(() => {
226565
226565
  deviceId,
226566
226566
  sessionId: getSessionId(),
226567
226567
  email: getEmail(),
226568
- appVersion: "4.2.35-beta",
226568
+ appVersion: "4.2.36",
226569
226569
  platform: getHostPlatformForAnalytics(),
226570
226570
  organizationUuid,
226571
226571
  accountUuid,
@@ -237613,7 +237613,7 @@ var init_metadata = __esm(() => {
237613
237613
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
237614
237614
  WHITESPACE_REGEX = /\s+/;
237615
237615
  getVersionBase = memoize_default(() => {
237616
- const match = "4.2.35-beta".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
237616
+ const match = "4.2.36".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
237617
237617
  return match ? match[0] : undefined;
237618
237618
  });
237619
237619
  buildEnvContext = memoize_default(async () => {
@@ -237653,9 +237653,9 @@ var init_metadata = __esm(() => {
237653
237653
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
237654
237654
  isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
237655
237655
  isClaudeAiAuth: isClaudeAISubscriber(),
237656
- version: "4.2.35-beta",
237656
+ version: "4.2.36",
237657
237657
  versionBase: getVersionBase(),
237658
- buildTime: "2026-09-04T04:53:07.130Z",
237658
+ buildTime: "2026-09-07T00:23:46.056Z",
237659
237659
  deploymentEnvironment: env4.detectDeploymentEnvironment(),
237660
237660
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
237661
237661
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -238326,7 +238326,7 @@ function initialize1PEventLogging() {
238326
238326
  const platform3 = getPlatform();
238327
238327
  const attributes = {
238328
238328
  [import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
238329
- [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "4.2.35-beta"
238329
+ [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "4.2.36"
238330
238330
  };
238331
238331
  if (platform3 === "wsl") {
238332
238332
  const wslVersion = getWslVersion();
@@ -238353,7 +238353,7 @@ function initialize1PEventLogging() {
238353
238353
  })
238354
238354
  ]
238355
238355
  });
238356
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", "4.2.35-beta");
238356
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", "4.2.36");
238357
238357
  }
238358
238358
  async function reinitialize1PEventLoggingIfConfigChanged() {
238359
238359
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -306327,6 +306327,36 @@ async function* adaptOpenAIStreamToAnthropic(stream7, model) {
306327
306327
  const openBlockIndices = new Set;
306328
306328
  let pendingFinishReason = null;
306329
306329
  let pendingHasToolCalls = false;
306330
+ const ARGS_BATCH_SIZE = 32;
306331
+ const ARGS_FLUSH_INTERVAL_MS = 100;
306332
+ let lastArgsFlushAt = performance.now();
306333
+ let pendingArgFrags = [];
306334
+ const flushArgFrags = function* () {
306335
+ if (pendingArgFrags.length === 0)
306336
+ return;
306337
+ if (pendingArgFrags.length >= ARGS_BATCH_SIZE) {
306338
+ const merged = new Map;
306339
+ for (const { contentIndex, frag } of pendingArgFrags) {
306340
+ merged.set(contentIndex, (merged.get(contentIndex) ?? "") + frag);
306341
+ }
306342
+ for (const [contentIndex, joined] of merged) {
306343
+ yield {
306344
+ type: "content_block_delta",
306345
+ index: contentIndex,
306346
+ delta: { type: "input_json_delta", partial_json: joined }
306347
+ };
306348
+ }
306349
+ } else {
306350
+ for (const { contentIndex, frag } of pendingArgFrags) {
306351
+ yield {
306352
+ type: "content_block_delta",
306353
+ index: contentIndex,
306354
+ delta: { type: "input_json_delta", partial_json: frag }
306355
+ };
306356
+ }
306357
+ }
306358
+ pendingArgFrags = [];
306359
+ };
306330
306360
  for await (const chunk of stream7) {
306331
306361
  const choice = chunk.choices?.[0];
306332
306362
  const delta = choice?.delta;
@@ -306436,6 +306466,7 @@ async function* adaptOpenAIStreamToAnthropic(stream7, model) {
306436
306466
  const existingBlock = toolBlocks.get(tcIndex);
306437
306467
  const hasNewToolIdentity = existingBlock && (tc.id && existingBlock.idFromProvider && tc.id !== existingBlock.id || tc.function?.name && existingBlock.name && tc.function.name !== existingBlock.name);
306438
306468
  if (hasNewToolIdentity) {
306469
+ yield* flushArgFrags();
306439
306470
  if (openBlockIndices.has(existingBlock.contentIndex)) {
306440
306471
  yield {
306441
306472
  type: "content_block_stop",
@@ -306496,18 +306527,17 @@ async function* adaptOpenAIStreamToAnthropic(stream7, model) {
306496
306527
  }
306497
306528
  if (!deltaFragment)
306498
306529
  continue;
306499
- yield {
306500
- type: "content_block_delta",
306501
- index: block2.contentIndex,
306502
- delta: {
306503
- type: "input_json_delta",
306504
- partial_json: deltaFragment
306505
- }
306506
- };
306530
+ pendingArgFrags.push({ contentIndex: block2.contentIndex, frag: deltaFragment });
306531
+ if (pendingArgFrags.length >= ARGS_BATCH_SIZE || performance.now() - lastArgsFlushAt >= ARGS_FLUSH_INTERVAL_MS) {
306532
+ yield* flushArgFrags();
306533
+ lastArgsFlushAt = performance.now();
306534
+ await new Promise((resolve24) => setImmediate(resolve24));
306535
+ }
306507
306536
  }
306508
306537
  }
306509
306538
  }
306510
306539
  if (choice?.finish_reason) {
306540
+ yield* flushArgFrags();
306511
306541
  if (thinkingBlockOpen) {
306512
306542
  yield {
306513
306543
  type: "content_block_stop",
@@ -306537,6 +306567,7 @@ async function* adaptOpenAIStreamToAnthropic(stream7, model) {
306537
306567
  pendingHasToolCalls = toolBlocks.size > 0;
306538
306568
  }
306539
306569
  }
306570
+ yield* flushArgFrags();
306540
306571
  for (const idx of openBlockIndices) {
306541
306572
  yield {
306542
306573
  type: "content_block_stop",
@@ -354126,7 +354157,7 @@ function getTelemetryAttributes() {
354126
354157
  attributes["session.id"] = sessionId;
354127
354158
  }
354128
354159
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
354129
- attributes["app.version"] = "4.2.35-beta";
354160
+ attributes["app.version"] = "4.2.36";
354130
354161
  }
354131
354162
  const oauthAccount = getOauthAccountInfo();
354132
354163
  if (oauthAccount) {
@@ -469252,7 +469283,7 @@ function getInstallationEnv() {
469252
469283
  return;
469253
469284
  }
469254
469285
  function getClaudeCodeVersion() {
469255
- return "4.2.35-beta";
469286
+ return "4.2.36";
469256
469287
  }
469257
469288
  async function getInstalledVSCodeExtensionVersion(command4) {
469258
469289
  const { stdout } = await execFileNoThrow(command4, ["--list-extensions", "--show-versions"], {
@@ -470156,6 +470187,83 @@ var init_elicitationHandler = __esm(() => {
470156
470187
  init_analytics();
470157
470188
  });
470158
470189
 
470190
+ // src/server/ideCapability.ts
470191
+ var IDE_MCP_SERVER = "costrict-jetbrains", IDE_MCP_TOOLS, transport, IdeCapabilitySchema = () => exports_external.object({
470192
+ generation: exports_external.string().uuid(),
470193
+ transport,
470194
+ tools: exports_external.array(exports_external.string()).refine((values4) => new Set(values4).size === values4.length, "duplicate IDE MCP tool").refine((values4) => values4.length <= IDE_MCP_TOOLS.size && values4.every((v2) => IDE_MCP_TOOLS.has(v2)), "invalid IDE MCP tool"),
470195
+ approval: exports_external.object({
470196
+ build_project: exports_external.literal("control_plane"),
470197
+ execute_run_configuration: exports_external.literal("jetbrains_ask")
470198
+ })
470199
+ });
470200
+ var init_ideCapability = __esm(() => {
470201
+ init_v4();
470202
+ IDE_MCP_TOOLS = new Set([
470203
+ "analyze_calls",
470204
+ "get_file_problems",
470205
+ "lint_files",
470206
+ "get_project_dependencies",
470207
+ "get_project_modules",
470208
+ "get_symbol_info",
470209
+ "search_file",
470210
+ "search_regex",
470211
+ "search_symbol",
470212
+ "search_text",
470213
+ "read_file",
470214
+ "list_directory_tree",
470215
+ "get_all_open_file_paths",
470216
+ "open_file_in_editor",
470217
+ "build_project",
470218
+ "get_run_configurations",
470219
+ "execute_run_configuration"
470220
+ ]);
470221
+ transport = exports_external.object({
470222
+ type: exports_external.literal("streamable_http"),
470223
+ url: exports_external.string().refine((value) => {
470224
+ try {
470225
+ const parsed = new URL(value);
470226
+ return parsed.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(parsed.hostname) && parsed.pathname === "/stream" && !parsed.username && !parsed.password && !parsed.search && !parsed.hash;
470227
+ } catch {
470228
+ return false;
470229
+ }
470230
+ }, "transport must be loopback http /stream"),
470231
+ headers: exports_external.record(exports_external.string().min(1), exports_external.string().min(1))
470232
+ });
470233
+ });
470234
+
470235
+ // src/services/mcp/idePolicy.ts
470236
+ function getIdeMcpPolicy() {
470237
+ return { generation, tools: new Set(allowed) };
470238
+ }
470239
+ function setIdeMcpPolicy(value, tools) {
470240
+ generation = value;
470241
+ allowed = new Set(tools);
470242
+ }
470243
+ function clearIdeMcpPolicy(value) {
470244
+ if (value !== generation)
470245
+ return false;
470246
+ generation = "";
470247
+ allowed = new Set;
470248
+ return true;
470249
+ }
470250
+ function filterIdeMcpTools(server, tools) {
470251
+ return server === IDE_MCP_SERVER ? tools.filter((tool) => !!tool.mcpInfo?.toolName && allowed.has(tool.mcpInfo.toolName)) : tools;
470252
+ }
470253
+ function ideMcpPermission(server, tool) {
470254
+ if (server !== IDE_MCP_SERVER || !IDE_MCP_TOOLS.has(tool) || !allowed.has(tool))
470255
+ return;
470256
+ return tool === "build_project" ? "control_plane" : "allow";
470257
+ }
470258
+ function mcpCallRetries(server) {
470259
+ return server === IDE_MCP_SERVER ? 0 : 1;
470260
+ }
470261
+ var generation = "", allowed;
470262
+ var init_idePolicy = __esm(() => {
470263
+ init_ideCapability();
470264
+ allowed = new Set;
470265
+ });
470266
+
470159
470267
  // node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/core.js
470160
470268
  function $constructor3(name3, initializer5, params) {
470161
470269
  function init2(inst, def) {
@@ -484506,15 +484614,15 @@ async function handleOpenApplication(adapter2, args, overrides) {
484506
484614
  const app = requireString(args, "app");
484507
484615
  if (app instanceof Error)
484508
484616
  return errorResult(app.message, "bad_args");
484509
- const allowed = new Set(overrides.allowedApps.map((g8) => g8.bundleId));
484617
+ const allowed2 = new Set(overrides.allowedApps.map((g8) => g8.bundleId));
484510
484618
  let targetBundleId;
484511
- if (looksLikeBundleId(app) && allowed.has(app)) {
484619
+ if (looksLikeBundleId(app) && allowed2.has(app)) {
484512
484620
  targetBundleId = app;
484513
484621
  } else {
484514
484622
  const match = overrides.allowedApps.find((g8) => g8.displayName.toLowerCase() === app.toLowerCase());
484515
484623
  targetBundleId = match?.bundleId;
484516
484624
  }
484517
- if (!targetBundleId || !allowed.has(targetBundleId)) {
484625
+ if (!targetBundleId || !allowed2.has(targetBundleId)) {
484518
484626
  return errorResult(`"${app}" is not granted for this session. Call request_access first.`, "app_not_granted");
484519
484627
  }
484520
484628
  await adapter2.executor.openApp(targetBundleId);
@@ -495321,7 +495429,7 @@ function createCliExecutor(opts) {
495321
495429
  const { getMouseAnimationEnabled, getHideBeforeActionEnabled } = opts;
495322
495430
  const terminalBundleId = getTerminalBundleId();
495323
495431
  const surrogateHost = terminalBundleId ?? CLI_HOST_BUNDLE_ID;
495324
- const withoutTerminal = (allowed) => terminalBundleId === null ? [...allowed] : allowed.filter((id) => id !== terminalBundleId);
495432
+ const withoutTerminal = (allowed2) => terminalBundleId === null ? [...allowed2] : allowed2.filter((id) => id !== terminalBundleId);
495325
495433
  logForDebugging(terminalBundleId ? `[computer-use] terminal ${terminalBundleId} \u2192 surrogate host (hide-exempt, activate-skip, screenshot-excluded)` : "[computer-use] terminal not detected; falling back to sentinel host");
495326
495434
  return {
495327
495435
  capabilities: {
@@ -496787,19 +496895,19 @@ class BridgeClient {
496787
496895
  actionData: message2.action_data
496788
496896
  };
496789
496897
  try {
496790
- const allowed = await pending2.onPermissionRequest(request2);
496791
- this.sendPermissionResponse(requestId2, allowed);
496898
+ const allowed2 = await pending2.onPermissionRequest(request2);
496899
+ this.sendPermissionResponse(requestId2, allowed2);
496792
496900
  } catch (error98) {
496793
496901
  logger30.error(`[${serverName}] Error handling permission request:`, error98);
496794
496902
  this.sendPermissionResponse(requestId2, false);
496795
496903
  }
496796
496904
  }
496797
- sendPermissionResponse(requestId2, allowed) {
496905
+ sendPermissionResponse(requestId2, allowed2) {
496798
496906
  if (this.ws?.readyState === WebSocket2.OPEN) {
496799
496907
  const message2 = {
496800
496908
  type: "permission_response",
496801
496909
  request_id: requestId2,
496802
- allowed
496910
+ allowed: allowed2
496803
496911
  };
496804
496912
  if (this.selectedDeviceId) {
496805
496913
  message2.target_device_id = this.selectedDeviceId;
@@ -508556,8 +508664,8 @@ var require_otlp_export_delegate = __commonJS((exports) => {
508556
508664
  _responseHandler;
508557
508665
  _promiseQueue;
508558
508666
  _timeout;
508559
- constructor(transport, serializer, responseHandler, promiseQueue, timeout2) {
508560
- this._transport = transport;
508667
+ constructor(transport2, serializer, responseHandler, promiseQueue, timeout2) {
508668
+ this._transport = transport2;
508561
508669
  this._serializer = serializer;
508562
508670
  this._responseHandler = responseHandler;
508563
508671
  this._promiseQueue = promiseQueue;
@@ -508639,9 +508747,9 @@ var require_otlp_network_export_delegate = __commonJS((exports) => {
508639
508747
  exports.createOtlpNetworkExportDelegate = undefined;
508640
508748
  var bounded_queue_export_promise_handler_1 = require_bounded_queue_export_promise_handler();
508641
508749
  var otlp_export_delegate_1 = require_otlp_export_delegate();
508642
- function createOtlpNetworkExportDelegate(options, serializer, transport) {
508750
+ function createOtlpNetworkExportDelegate(options, serializer, transport2) {
508643
508751
  return (0, otlp_export_delegate_1.createOtlpExportDelegate)({
508644
- transport,
508752
+ transport: transport2,
508645
508753
  serializer,
508646
508754
  promiseHandler: (0, bounded_queue_export_promise_handler_1.createBoundedQueueExportPromiseHandler)(options)
508647
508755
  }, { timeout: options.timeoutMillis });
@@ -521682,8 +521790,8 @@ var require_retrying_transport = __commonJS((exports) => {
521682
521790
 
521683
521791
  class RetryingTransport {
521684
521792
  _transport;
521685
- constructor(transport) {
521686
- this._transport = transport;
521793
+ constructor(transport2) {
521794
+ this._transport = transport2;
521687
521795
  }
521688
521796
  retry(data, timeoutMillis, inMillis) {
521689
521797
  return new Promise((resolve31, reject2) => {
@@ -522892,7 +523000,7 @@ function initLangfuse() {
522892
523000
  flushInterval: parseInt(process.env.LANGFUSE_FLUSH_INTERVAL ?? "10", 10),
522893
523001
  mask: maskFn,
522894
523002
  environment: process.env.LANGFUSE_TRACING_ENVIRONMENT ?? "development",
522895
- release: "4.2.35-beta",
523003
+ release: "4.2.36",
522896
523004
  exportMode: process.env.LANGFUSE_EXPORT_MODE ?? "batched",
522897
523005
  timeout: parseInt(process.env.LANGFUSE_TIMEOUT ?? "5", 10)
522898
523006
  });
@@ -523451,7 +523559,7 @@ function computeFingerprint(messageText2, version11) {
523451
523559
  }
523452
523560
  function computeFingerprintFromMessages(messages) {
523453
523561
  const firstMessageText = extractFirstMessageText(messages);
523454
- return computeFingerprint(firstMessageText, "4.2.35-beta");
523562
+ return computeFingerprint(firstMessageText, "4.2.36");
523455
523563
  }
523456
523564
  var FINGERPRINT_SALT = "59cf53e54c78";
523457
523565
  var init_fingerprint = () => {};
@@ -524003,7 +524111,7 @@ async function sideQuery(opts) {
524003
524111
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
524004
524112
  }
524005
524113
  const messageText2 = extractFirstUserMessageText(messages);
524006
- const fingerprint = computeFingerprint(messageText2, "4.2.35-beta");
524114
+ const fingerprint = computeFingerprint(messageText2, "4.2.36");
524007
524115
  const attributionHeader = getAttributionHeader(fingerprint);
524008
524116
  const systemBlocks = [
524009
524117
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -524279,7 +524387,7 @@ async function runClaudeInChromeMcpServer() {
524279
524387
  initializeAnalyticsSink();
524280
524388
  const context7 = createChromeContext();
524281
524389
  const server = createClaudeForChromeMcpServer(context7);
524282
- const transport = new StdioServerTransport;
524390
+ const transport2 = new StdioServerTransport;
524283
524391
  let exiting = false;
524284
524392
  const shutdownAndExit = async () => {
524285
524393
  if (exiting) {
@@ -524293,7 +524401,7 @@ async function runClaudeInChromeMcpServer() {
524293
524401
  process.stdin.on("end", () => void shutdownAndExit());
524294
524402
  process.stdin.on("error", () => void shutdownAndExit());
524295
524403
  logForDebugging("[Chrome MCP] Starting MCP server");
524296
- await server.connect(transport);
524404
+ await server.connect(transport2);
524297
524405
  logForDebugging("[Chrome MCP] MCP server started");
524298
524406
  }
524299
524407
 
@@ -524531,7 +524639,7 @@ async function runComputerUseMcpServer() {
524531
524639
  enableConfigs();
524532
524640
  initializeAnalyticsSink();
524533
524641
  const server = await createComputerUseMcpServerForCli();
524534
- const transport = new StdioServerTransport;
524642
+ const transport2 = new StdioServerTransport;
524535
524643
  let exiting = false;
524536
524644
  const shutdownAndExit = async () => {
524537
524645
  if (exiting)
@@ -524543,7 +524651,7 @@ async function runComputerUseMcpServer() {
524543
524651
  process.stdin.on("end", () => void shutdownAndExit());
524544
524652
  process.stdin.on("error", () => void shutdownAndExit());
524545
524653
  logForDebugging("[Computer Use MCP] Starting MCP server");
524546
- await server.connect(transport);
524654
+ await server.connect(transport2);
524547
524655
  logForDebugging("[Computer Use MCP] MCP server started");
524548
524656
  }
524549
524657
  var APP_ENUM_TIMEOUT_MS = 1000;
@@ -525426,18 +525534,18 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
525426
525534
  const clients = [];
525427
525535
  const tools = [];
525428
525536
  const results = await Promise.allSettled(Object.entries(sdkMcpConfigs).map(async ([name3, config10]) => {
525429
- const transport = new SdkControlClientTransport(name3, sendMcpMessage);
525537
+ const transport2 = new SdkControlClientTransport(name3, sendMcpMessage);
525430
525538
  const client10 = new Client({
525431
525539
  name: "claude-code",
525432
525540
  title: "CoStrict",
525433
- version: "4.2.35-beta",
525541
+ version: "4.2.36",
525434
525542
  description: "CoStrict agentic coding tool",
525435
525543
  websiteUrl: PRODUCT_URL
525436
525544
  }, {
525437
525545
  capabilities: {}
525438
525546
  });
525439
525547
  try {
525440
- await client10.connect(transport);
525548
+ await client10.connect(transport2);
525441
525549
  const capabilities = client10.getServerCapabilities();
525442
525550
  const connectedClient = {
525443
525551
  type: "connected",
@@ -525524,6 +525632,7 @@ var init_client17 = __esm(() => {
525524
525632
  init_mcpStringUtils();
525525
525633
  init_normalization();
525526
525634
  init_utils13();
525635
+ init_idePolicy();
525527
525636
  init_src4();
525528
525637
  init_src4();
525529
525638
  init_auth10();
@@ -525573,7 +525682,7 @@ var init_client17 = __esm(() => {
525573
525682
  const connectStartTime = Date.now();
525574
525683
  let inProcessServer;
525575
525684
  try {
525576
- let transport;
525685
+ let transport2;
525577
525686
  const sessionIngressToken = getSessionIngressAuthToken();
525578
525687
  if (serverRef.type === "sse") {
525579
525688
  const authProvider = new ClaudeAuthProvider(name3, serverRef);
@@ -525609,7 +525718,7 @@ var init_client17 = __esm(() => {
525609
525718
  });
525610
525719
  }
525611
525720
  };
525612
- transport = new SSEClientTransport(new URL(serverRef.url), transportOptions);
525721
+ transport2 = new SSEClientTransport(new URL(serverRef.url), transportOptions);
525613
525722
  logMCPDebug(name3, `SSE transport initialized, awaiting connection`);
525614
525723
  } else if (serverRef.type === "sse-ide") {
525615
525724
  logMCPDebug(name3, `Setting up SSE-IDE transport to ${serverRef.url}`);
@@ -525628,7 +525737,7 @@ var init_client17 = __esm(() => {
525628
525737
  }
525629
525738
  }
525630
525739
  } : {};
525631
- transport = new SSEClientTransport(new URL(serverRef.url), Object.keys(transportOptions).length > 0 ? transportOptions : undefined);
525740
+ transport2 = new SSEClientTransport(new URL(serverRef.url), Object.keys(transportOptions).length > 0 ? transportOptions : undefined);
525632
525741
  } else if (serverRef.type === "ws-ide") {
525633
525742
  const tlsOptions = getWebSocketTLSOptions();
525634
525743
  const wsHeaders = {
@@ -525652,7 +525761,7 @@ var init_client17 = __esm(() => {
525652
525761
  ...tlsOptions || {}
525653
525762
  });
525654
525763
  }
525655
- transport = new WebSocketTransport(wsClient);
525764
+ transport2 = new WebSocketTransport(wsClient);
525656
525765
  } else if (serverRef.type === "ws") {
525657
525766
  logMCPDebug(name3, `Initializing WebSocket transport to ${serverRef.url}`);
525658
525767
  const combinedHeaders = await getMcpServerHeaders(name3, serverRef);
@@ -525685,7 +525794,7 @@ var init_client17 = __esm(() => {
525685
525794
  ...tlsOptions || {}
525686
525795
  });
525687
525796
  }
525688
- transport = new WebSocketTransport(wsClient);
525797
+ transport2 = new WebSocketTransport(wsClient);
525689
525798
  } else if (serverRef.type === "http") {
525690
525799
  logMCPDebug(name3, `Initializing HTTP transport to ${serverRef.url}`);
525691
525800
  logMCPDebug(name3, `Node version: ${process.version}, Platform: ${process.platform}`);
@@ -525722,7 +525831,7 @@ var init_client17 = __esm(() => {
525722
525831
  hasAuthProvider: !!authProvider,
525723
525832
  timeoutMs: MCP_REQUEST_TIMEOUT_MS
525724
525833
  })}`);
525725
- transport = new StreamableHTTPClientTransport(new URL(serverRef.url), transportOptions);
525834
+ transport2 = new StreamableHTTPClientTransport(new URL(serverRef.url), transportOptions);
525726
525835
  logMCPDebug(name3, `HTTP transport created successfully`);
525727
525836
  } else if (serverRef.type === "sdk") {
525728
525837
  throw new Error("SDK servers should be handled in print.ts");
@@ -525747,7 +525856,7 @@ var init_client17 = __esm(() => {
525747
525856
  }
525748
525857
  }
525749
525858
  };
525750
- transport = new StreamableHTTPClientTransport(new URL(proxyUrl), transportOptions);
525859
+ transport2 = new StreamableHTTPClientTransport(new URL(proxyUrl), transportOptions);
525751
525860
  logMCPDebug(name3, `costrict.ai proxy transport created successfully`);
525752
525861
  } else if ((serverRef.type === "stdio" || !serverRef.type) && isClaudeInChromeMCPServer(name3)) {
525753
525862
  const { createChromeContext: createChromeContext2 } = await Promise.resolve().then(() => (init_mcpServer3(), exports_mcpServer));
@@ -525757,7 +525866,7 @@ var init_client17 = __esm(() => {
525757
525866
  inProcessServer = createClaudeForChromeMcpServer2(context7);
525758
525867
  const [clientTransport, serverTransport] = createLinkedTransportPair3();
525759
525868
  await inProcessServer.connect(serverTransport);
525760
- transport = clientTransport;
525869
+ transport2 = clientTransport;
525761
525870
  logMCPDebug(name3, `In-process Chrome MCP server started`);
525762
525871
  } else if ((serverRef.type === "stdio" || !serverRef.type) && isComputerUseMCPServer2(name3)) {
525763
525872
  const { createComputerUseMcpServerForCli: createComputerUseMcpServerForCli2 } = await Promise.resolve().then(() => (init_mcpServer4(), exports_mcpServer2));
@@ -525765,13 +525874,13 @@ var init_client17 = __esm(() => {
525765
525874
  inProcessServer = await createComputerUseMcpServerForCli2();
525766
525875
  const [clientTransport, serverTransport] = createLinkedTransportPair3();
525767
525876
  await inProcessServer.connect(serverTransport);
525768
- transport = clientTransport;
525877
+ transport2 = clientTransport;
525769
525878
  logMCPDebug(name3, `In-process Computer Use MCP server started`);
525770
525879
  } else if (serverRef.type === "stdio" || !serverRef.type) {
525771
525880
  const stdioRef = serverRef;
525772
525881
  const finalCommand = process.env.CLAUDE_CODE_SHELL_PREFIX || stdioRef.command;
525773
525882
  const finalArgs = process.env.CLAUDE_CODE_SHELL_PREFIX ? [[stdioRef.command, ...stdioRef.args].join(" ")] : stdioRef.args;
525774
- transport = new StdioClientTransport({
525883
+ transport2 = new StdioClientTransport({
525775
525884
  command: finalCommand,
525776
525885
  args: finalArgs,
525777
525886
  env: {
@@ -525786,7 +525895,7 @@ var init_client17 = __esm(() => {
525786
525895
  let stderrHandler;
525787
525896
  let stderrOutput = "";
525788
525897
  if (serverRef.type === "stdio" || !serverRef.type) {
525789
- const stdioTransport = transport;
525898
+ const stdioTransport = transport2;
525790
525899
  if (stdioTransport.stderr) {
525791
525900
  stderrHandler = (data) => {
525792
525901
  if (stderrOutput.length < 67108864) {
@@ -525801,7 +525910,7 @@ var init_client17 = __esm(() => {
525801
525910
  const client10 = new Client({
525802
525911
  name: "claude-code",
525803
525912
  title: "CoStrict",
525804
- version: "4.2.35-beta",
525913
+ version: "4.2.36",
525805
525914
  description: "CoStrict agentic coding tool",
525806
525915
  websiteUrl: PRODUCT_URL
525807
525916
  }, {
@@ -525836,7 +525945,7 @@ var init_client17 = __esm(() => {
525836
525945
  logMCPDebug(name3, `Failed to parse URL: ${urlError}`);
525837
525946
  }
525838
525947
  }
525839
- const connectPromise = client10.connect(transport);
525948
+ const connectPromise = client10.connect(transport2);
525840
525949
  const timeoutPromise = new Promise((_2, reject2) => {
525841
525950
  const timeoutId = setTimeout(() => {
525842
525951
  const elapsed = Date.now() - connectStartTime;
@@ -525844,7 +525953,7 @@ var init_client17 = __esm(() => {
525844
525953
  if (inProcessServer) {
525845
525954
  inProcessServer.close().catch(() => {});
525846
525955
  }
525847
- transport.close().catch(() => {});
525956
+ transport2.close().catch(() => {});
525848
525957
  reject2(new TelemetrySafeError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS(`MCP server "${name3}" connection timed out after ${getConnectionTimeoutMs()}ms`, "MCP connection timeout"));
525849
525958
  }, getConnectionTimeoutMs());
525850
525959
  connectPromise.then(() => {
@@ -525896,7 +526005,7 @@ var init_client17 = __esm(() => {
525896
526005
  if (inProcessServer) {
525897
526006
  inProcessServer.close().catch(() => {});
525898
526007
  }
525899
- transport.close().catch(() => {});
526008
+ transport2.close().catch(() => {});
525900
526009
  if (stderrOutput) {
525901
526010
  logMCPError(name3, `Server stderr: ${stderrOutput}`);
525902
526011
  }
@@ -526038,12 +526147,12 @@ var init_client17 = __esm(() => {
526038
526147
  return;
526039
526148
  }
526040
526149
  if (stderrHandler && (serverRef.type === "stdio" || !serverRef.type)) {
526041
- const stdioTransport = transport;
526150
+ const stdioTransport = transport2;
526042
526151
  stdioTransport.stderr?.off("data", stderrHandler);
526043
526152
  }
526044
526153
  if (serverRef.type === "stdio") {
526045
526154
  try {
526046
- const stdioTransport = transport;
526155
+ const stdioTransport = transport2;
526047
526156
  const childPid = stdioTransport.pid;
526048
526157
  if (childPid) {
526049
526158
  logMCPDebug(name3, "Sending SIGINT to MCP server process");
@@ -526206,7 +526315,7 @@ var init_client17 = __esm(() => {
526206
526315
  const result = await client10.client.request({ method: "tools/list" }, ListToolsResultSchema);
526207
526316
  const toolsToProcess = recursivelySanitizeUnicode(result.tools);
526208
526317
  const skipPrefix = client10.config.type === "sdk" && isEnvTruthy(process.env.CLAUDE_AGENT_SDK_MCP_NO_PREFIX);
526209
- return toolsToProcess.map((tool) => {
526318
+ const converted = toolsToProcess.map((tool) => {
526210
526319
  const fullyQualifiedName = buildMcpToolName(client10.name, tool.name);
526211
526320
  return {
526212
526321
  ...MCPTool,
@@ -526228,6 +526337,9 @@ var init_client17 = __esm(() => {
526228
526337
  isReadOnly() {
526229
526338
  return tool.annotations?.readOnlyHint ?? false;
526230
526339
  },
526340
+ requiresUserInteraction() {
526341
+ return ideMcpPermission(client10.name, tool.name) === "control_plane";
526342
+ },
526231
526343
  toAutoClassifierInput(input4) {
526232
526344
  return mcpToolInputToAutoClassifierInput(input4, tool.name);
526233
526345
  },
@@ -526242,6 +526354,9 @@ var init_client17 = __esm(() => {
526242
526354
  },
526243
526355
  inputJSONSchema: tool.inputSchema,
526244
526356
  async checkPermissions() {
526357
+ const policy = ideMcpPermission(client10.name, tool.name);
526358
+ if (policy === "allow")
526359
+ return { behavior: "allow" };
526245
526360
  return {
526246
526361
  behavior: "passthrough",
526247
526362
  message: t("errors.mcp.requiresPermission"),
@@ -526275,7 +526390,7 @@ var init_client17 = __esm(() => {
526275
526390
  });
526276
526391
  }
526277
526392
  const startTime2 = Date.now();
526278
- const MAX_SESSION_RETRIES = 1;
526393
+ const retries = mcpCallRetries(client10.name);
526279
526394
  for (let attempt = 0;; attempt++) {
526280
526395
  try {
526281
526396
  const connectedClient = await ensureConnectedClient(client10);
@@ -526321,7 +526436,7 @@ var init_client17 = __esm(() => {
526321
526436
  }
526322
526437
  };
526323
526438
  } catch (error98) {
526324
- if (error98 instanceof McpSessionExpiredError2 && attempt < MAX_SESSION_RETRIES) {
526439
+ if (error98 instanceof McpSessionExpiredError2 && attempt < retries) {
526325
526440
  logMCPDebug(client10.name, `Retrying tool '${tool.name}' after session recovery`);
526326
526441
  continue;
526327
526442
  }
@@ -526357,7 +526472,8 @@ var init_client17 = __esm(() => {
526357
526472
  ...isClaudeInChromeMCPServer(client10.name) && (client10.config.type === "stdio" || !client10.config.type) ? claudeInChromeToolRendering().getClaudeInChromeMCPToolOverrides(tool.name) : {},
526358
526473
  ...(client10.config.type === "stdio" || !client10.config.type) && isComputerUseMCPServer2(client10.name) ? computerUseWrapper().getComputerUseMCPToolOverrides(tool.name) : {}
526359
526474
  };
526360
- }).filter(isIncludedMcpTool);
526475
+ });
526476
+ return filterIdeMcpTools(client10.name, converted).filter(isIncludedMcpTool);
526361
526477
  } catch (error98) {
526362
526478
  logMCPError(client10.name, `Failed to fetch tools: ${errorMessage(error98)}`);
526363
526479
  return [];
@@ -606625,13 +606741,13 @@ class Client2 {
606625
606741
  return this._transport;
606626
606742
  }
606627
606743
  async flush(timeout2) {
606628
- const transport = this._transport;
606744
+ const transport2 = this._transport;
606629
606745
  this.emit("flush");
606630
- if (!transport) {
606746
+ if (!transport2) {
606631
606747
  return true;
606632
606748
  }
606633
606749
  const clientFinished = await this._isClientDoneProcessing(timeout2);
606634
- const transportFlushed = await transport.flush(timeout2);
606750
+ const transportFlushed = await transport2.flush(timeout2);
606635
606751
  return clientFinished && transportFlushed;
606636
606752
  }
606637
606753
  async close(timeout2) {
@@ -608035,13 +608151,13 @@ function getOutgoingRequestSpanData(request2) {
608035
608151
  }
608036
608152
  function setIncomingResponseSpanData(response3, span) {
608037
608153
  const { statusCode, statusMessage, httpVersion, socket } = response3;
608038
- const transport = httpVersion?.toUpperCase() !== "QUIC" ? "ip_tcp" : "ip_udp";
608154
+ const transport2 = httpVersion?.toUpperCase() !== "QUIC" ? "ip_tcp" : "ip_udp";
608039
608155
  span.setAttributes({
608040
608156
  "http.response.status_code": statusCode,
608041
608157
  "network.protocol.version": httpVersion,
608042
608158
  "http.flavor": httpVersion,
608043
- "network.transport": transport,
608044
- "net.transport": transport,
608159
+ "network.transport": transport2,
608160
+ "net.transport": transport2,
608045
608161
  "http.status_text": statusMessage?.toUpperCase(),
608046
608162
  "http.status_code": statusCode,
608047
608163
  ...getResponseContentLengthAttributes(response3),
@@ -624696,7 +624812,7 @@ function initSentry() {
624696
624812
  }
624697
624813
  init3({
624698
624814
  dsn,
624699
- release: typeof MACRO !== "undefined" ? "4.2.35-beta" : undefined,
624815
+ release: typeof MACRO !== "undefined" ? "4.2.36" : undefined,
624700
624816
  environment: typeof BUILD_ENV !== "undefined" ? BUILD_ENV : "production",
624701
624817
  maxBreadcrumbs: 20,
624702
624818
  sampleRate: 1,
@@ -642586,13 +642702,13 @@ var require_subchannel = __commonJS((exports) => {
642586
642702
  const adjustedKeepaliveTime = Math.min(this.keepaliveTime, KEEPALIVE_MAX_TIME_MS);
642587
642703
  options = Object.assign(Object.assign({}, options), { "grpc.keepalive_time_ms": adjustedKeepaliveTime });
642588
642704
  }
642589
- this.connector.connect(this.subchannelAddress, this.secureConnector, options).then((transport) => {
642705
+ this.connector.connect(this.subchannelAddress, this.secureConnector, options).then((transport2) => {
642590
642706
  if (this.transitionToState([connectivity_state_1.ConnectivityState.CONNECTING], connectivity_state_1.ConnectivityState.READY)) {
642591
- this.transport = transport;
642707
+ this.transport = transport2;
642592
642708
  if (this.channelzEnabled) {
642593
- this.childrenTracker.refChild(transport.getChannelzRef());
642709
+ this.childrenTracker.refChild(transport2.getChannelzRef());
642594
642710
  }
642595
- transport.addDisconnectListener((tooManyPings) => {
642711
+ transport2.addDisconnectListener((tooManyPings) => {
642596
642712
  this.transitionToState([connectivity_state_1.ConnectivityState.READY], connectivity_state_1.ConnectivityState.IDLE);
642597
642713
  if (tooManyPings && this.keepaliveTime > 0) {
642598
642714
  this.keepaliveTime *= 2;
@@ -642600,7 +642716,7 @@ var require_subchannel = __commonJS((exports) => {
642600
642716
  }
642601
642717
  });
642602
642718
  } else {
642603
- transport.shutdown();
642719
+ transport2.shutdown();
642604
642720
  }
642605
642721
  }, (error100) => {
642606
642722
  this.transitionToState([connectivity_state_1.ConnectivityState.CONNECTING], connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, `${error100}`);
@@ -643400,12 +643516,12 @@ var require_subchannel_call = __commonJS((exports) => {
643400
643516
  }
643401
643517
 
643402
643518
  class Http2SubchannelCall {
643403
- constructor(http2Stream, callEventTracker, listener2, transport, callId) {
643519
+ constructor(http2Stream, callEventTracker, listener2, transport2, callId) {
643404
643520
  var _a18;
643405
643521
  this.http2Stream = http2Stream;
643406
643522
  this.callEventTracker = callEventTracker;
643407
643523
  this.listener = listener2;
643408
- this.transport = transport;
643524
+ this.transport = transport2;
643409
643525
  this.callId = callId;
643410
643526
  this.isReadFilterPending = false;
643411
643527
  this.isPushPending = false;
@@ -643417,7 +643533,7 @@ var require_subchannel_call = __commonJS((exports) => {
643417
643533
  this.internalError = null;
643418
643534
  this.serverEndedCall = false;
643419
643535
  this.connectionDropped = false;
643420
- const maxReceiveMessageLength = (_a18 = transport.getOptions()["grpc.max_receive_message_length"]) !== null && _a18 !== undefined ? _a18 : constants_1.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;
643536
+ const maxReceiveMessageLength = (_a18 = transport2.getOptions()["grpc.max_receive_message_length"]) !== null && _a18 !== undefined ? _a18 : constants_1.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;
643421
643537
  this.decoder = new stream_decoder_1.StreamDecoder(maxReceiveMessageLength);
643422
643538
  http2Stream.on("response", (headers, flags) => {
643423
643539
  let headersString = "";
@@ -652345,7 +652461,7 @@ async function initializeBetaTracing(resource) {
652345
652461
  });
652346
652462
  logs.setGlobalLoggerProvider(loggerProvider);
652347
652463
  setLoggerProvider(loggerProvider);
652348
- const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.35-beta");
652464
+ const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.36");
652349
652465
  setEventLogger(eventLogger);
652350
652466
  process.on("beforeExit", async () => {
652351
652467
  await loggerProvider?.forceFlush();
@@ -652385,7 +652501,7 @@ async function initializeTelemetry() {
652385
652501
  const platform10 = getPlatform();
652386
652502
  const baseAttributes = {
652387
652503
  [import_semantic_conventions29.ATTR_SERVICE_NAME]: "claude-code",
652388
- [import_semantic_conventions29.ATTR_SERVICE_VERSION]: "4.2.35-beta"
652504
+ [import_semantic_conventions29.ATTR_SERVICE_VERSION]: "4.2.36"
652389
652505
  };
652390
652506
  if (platform10 === "wsl") {
652391
652507
  const wslVersion = getWslVersion();
@@ -652430,7 +652546,7 @@ async function initializeTelemetry() {
652430
652546
  } catch {}
652431
652547
  };
652432
652548
  registerCleanup(shutdownTelemetry2);
652433
- return meterProvider2.getMeter("com.anthropic.claude_code", "4.2.35-beta");
652549
+ return meterProvider2.getMeter("com.anthropic.claude_code", "4.2.36");
652434
652550
  }
652435
652551
  const meterProvider = new import_sdk_metrics2.MeterProvider({
652436
652552
  resource,
@@ -652450,7 +652566,7 @@ async function initializeTelemetry() {
652450
652566
  });
652451
652567
  logs.setGlobalLoggerProvider(loggerProvider);
652452
652568
  setLoggerProvider(loggerProvider);
652453
- const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.35-beta");
652569
+ const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.36");
652454
652570
  setEventLogger(eventLogger);
652455
652571
  logForDebugging("[3P telemetry] Event logger set successfully");
652456
652572
  process.on("beforeExit", async () => {
@@ -652512,7 +652628,7 @@ Current timeout: ${timeoutMs}ms
652512
652628
  }
652513
652629
  };
652514
652630
  registerCleanup(shutdownTelemetry);
652515
- return meterProvider.getMeter("com.anthropic.claude_code", "4.2.35-beta");
652631
+ return meterProvider.getMeter("com.anthropic.claude_code", "4.2.36");
652516
652632
  }
652517
652633
  async function flushTelemetry() {
652518
652634
  const meterProvider = getMeterProvider();
@@ -653482,7 +653598,7 @@ async function installGlobalPackage(specificVersion) {
653482
653598
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
653483
653599
  logEvent("tengu_auto_updater_lock_contention", {
653484
653600
  pid: process.pid,
653485
- currentVersion: "4.2.35-beta"
653601
+ currentVersion: "4.2.36"
653486
653602
  });
653487
653603
  return { status: "in_progress" };
653488
653604
  }
@@ -653491,7 +653607,7 @@ async function installGlobalPackage(specificVersion) {
653491
653607
  if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
653492
653608
  logError2(new Error("Windows NPM detected in WSL environment"));
653493
653609
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
653494
- currentVersion: "4.2.35-beta"
653610
+ currentVersion: "4.2.36"
653495
653611
  });
653496
653612
  return {
653497
653613
  status: "install_failed",
@@ -654037,7 +654153,7 @@ function detectLinuxGlobPatternWarnings() {
654037
654153
  }
654038
654154
  async function getDoctorDiagnostic() {
654039
654155
  const installationType = await getCurrentInstallationType();
654040
- const version11 = typeof MACRO !== "undefined" ? "4.2.35-beta" : "unknown";
654156
+ const version11 = typeof MACRO !== "undefined" ? "4.2.36" : "unknown";
654041
654157
  const installationPath = await getInstallationPath();
654042
654158
  const invokedBinary = getInvokedBinary();
654043
654159
  const multipleInstallations = await detectMultipleInstallations();
@@ -654979,8 +655095,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
654979
655095
  const maxVersion = await getMaxVersion();
654980
655096
  if (maxVersion && gt(version11, maxVersion)) {
654981
655097
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version11} to ${maxVersion}`);
654982
- if (gte2("4.2.35-beta", maxVersion)) {
654983
- logForDebugging(`Native installer: current version ${"4.2.35-beta"} is already at or above maxVersion ${maxVersion}, skipping update`);
655098
+ if (gte2("4.2.36", maxVersion)) {
655099
+ logForDebugging(`Native installer: current version ${"4.2.36"} is already at or above maxVersion ${maxVersion}, skipping update`);
654984
655100
  logEvent("tengu_native_update_skipped_max_version", {
654985
655101
  latency_ms: Date.now() - startTime2,
654986
655102
  max_version: maxVersion,
@@ -654991,7 +655107,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
654991
655107
  version11 = maxVersion;
654992
655108
  }
654993
655109
  }
654994
- if (!forceReinstall && version11 === "4.2.35-beta" && await versionIsAvailable(version11) && await isPossibleClaudeBinary(executablePath)) {
655110
+ if (!forceReinstall && version11 === "4.2.36" && await versionIsAvailable(version11) && await isPossibleClaudeBinary(executablePath)) {
654995
655111
  logForDebugging(`Found ${version11} at ${executablePath}, skipping install`);
654996
655112
  logEvent("tengu_native_update_complete", {
654997
655113
  latency_ms: Date.now() - startTime2,
@@ -723451,6 +723567,7 @@ var init_ExecuteTool = __esm(() => {
723451
723567
  init_Tool();
723452
723568
  init_messages9();
723453
723569
  init_prompt5();
723570
+ init_ideCapability();
723454
723571
  DENIED_PROXY_TARGETS = new Set([ASK_USER_QUESTION_TOOL_NAME]);
723455
723572
  inputSchema27 = lazySchema(() => exports_external.object({
723456
723573
  tool_name: exports_external.string().describe('The exact name of the target tool to execute (e.g., "CronCreate", "mcp__server__action")'),
@@ -723579,7 +723696,7 @@ ${exports_external.prettifyError(parsed.error)}`
723579
723696
  }
723580
723697
  };
723581
723698
  },
723582
- async checkPermissions(input4) {
723699
+ async checkPermissions(input4, context40) {
723583
723700
  if (input4 && DENIED_PROXY_TARGETS.has(input4.tool_name)) {
723584
723701
  return {
723585
723702
  behavior: "deny",
@@ -723590,6 +723707,18 @@ ${exports_external.prettifyError(parsed.error)}`
723590
723707
  }
723591
723708
  };
723592
723709
  }
723710
+ const tools = context40.options.tools ?? [];
723711
+ const target = findToolByName(tools, input4.tool_name);
723712
+ if (target?.mcpInfo?.serverName === IDE_MCP_SERVER && target.checkPermissions) {
723713
+ const result = await target.checkPermissions(input4.params, context40);
723714
+ if ((result.behavior === "allow" || result.behavior === "ask") && result.updatedInput) {
723715
+ return {
723716
+ ...result,
723717
+ updatedInput: input4
723718
+ };
723719
+ }
723720
+ return result;
723721
+ }
723593
723722
  return {
723594
723723
  behavior: "passthrough",
723595
723724
  message: "ExecuteExtraTool delegates permission to the target tool."
@@ -733551,6 +733680,43 @@ function isSkillLearningEnabled() {
733551
733680
  return false;
733552
733681
  }
733553
733682
 
733683
+ // src/services/tools/legacyToolUse.ts
733684
+ function parse25(value) {
733685
+ try {
733686
+ return JSON.parse(value);
733687
+ } catch {
733688
+ return value;
733689
+ }
733690
+ }
733691
+ function repairToolUse(block2, tools) {
733692
+ const names = tools.flatMap((tool) => [tool.name, ...tool.aliases ?? []]);
733693
+ const name3 = names.sort((a8, b9) => b9.length - a8.length).find((value) => block2.name.startsWith(`${value} `));
733694
+ if (!name3)
733695
+ return block2;
733696
+ const suffix = block2.name.slice(name3.length + 1);
733697
+ const pattern = /\s*([A-Za-z_][\w.-]*)<\/arg_key><arg_value>([\s\S]*?)<\/arg_value>/gy;
733698
+ const input4 = {};
733699
+ let matched = false;
733700
+ let end = 0;
733701
+ let match;
733702
+ while ((match = pattern.exec(suffix)) !== null) {
733703
+ matched = true;
733704
+ end = pattern.lastIndex;
733705
+ input4[match[1]] = parse25(match[2]);
733706
+ }
733707
+ if (!matched || end !== suffix.length) {
733708
+ return block2;
733709
+ }
733710
+ const original = typeof block2.input === "object" && block2.input !== null && !Array.isArray(block2.input) ? block2.input : {};
733711
+ const source = block2;
733712
+ const { invalidToolCallError: _invalidToolCallError, ...clean } = source;
733713
+ return {
733714
+ ...clean,
733715
+ name: name3,
733716
+ input: { ...original, ...input4 }
733717
+ };
733718
+ }
733719
+
733554
733720
  // src/services/skillLearning/observationStore.ts
733555
733721
  import { mkdir as mkdir35, readFile as readFile48, rename as rename5, stat as stat33, writeFile as writeFile37 } from "fs/promises";
733556
733722
  import { dirname as dirname62, join as join136 } from "path";
@@ -736388,10 +736554,11 @@ function getMcpServerBaseUrlFromToolName(toolName, mcpClients) {
736388
736554
  return getLoggingSafeMcpBaseUrl(serverConnection.config);
736389
736555
  }
736390
736556
  async function* runToolUse(toolUse, assistantMessage, canUseTool, toolUseContext) {
736391
- const toolName = toolUse.name;
736392
- const invalidToolCallError = getInvalidToolCallError(toolUse);
736557
+ const block2 = repairToolUse(toolUse, toolUseContext.options.tools);
736558
+ const toolName = block2.name;
736559
+ const invalidToolCallError = getInvalidToolCallError(block2);
736393
736560
  if (invalidToolCallError) {
736394
- logForDebugging(`Invalid tool call ${toolName}: ${toolUse.id}`);
736561
+ logForDebugging(`Invalid tool call ${toolName}: ${block2.id}`);
736395
736562
  yield {
736396
736563
  message: createUserMessage({
736397
736564
  content: [
@@ -736399,7 +736566,7 @@ async function* runToolUse(toolUse, assistantMessage, canUseTool, toolUseContext
736399
736566
  type: "tool_result",
736400
736567
  content: `<tool_use_error>${invalidToolCallError}</tool_use_error>`,
736401
736568
  is_error: true,
736402
- tool_use_id: toolUse.id
736569
+ tool_use_id: block2.id
736403
736570
  }
736404
736571
  ],
736405
736572
  toolUseResult: invalidToolCallError,
@@ -736421,11 +736588,11 @@ async function* runToolUse(toolUse, assistantMessage, canUseTool, toolUseContext
736421
736588
  const mcpServerBaseUrl = getMcpServerBaseUrlFromToolName(toolName, toolUseContext.options.mcpClients);
736422
736589
  if (!tool) {
736423
736590
  const sanitizedToolName = sanitizeToolNameForAnalytics(toolName);
736424
- logForDebugging(`Unknown tool ${toolName}: ${toolUse.id}`);
736591
+ logForDebugging(`Unknown tool ${toolName}: ${block2.id}`);
736425
736592
  logEvent("tengu_tool_use_error", {
736426
736593
  error: `No such tool available: ${sanitizedToolName}`,
736427
736594
  toolName: sanitizedToolName,
736428
- toolUseID: toolUse.id,
736595
+ toolUseID: block2.id,
736429
736596
  isMcp: toolName.startsWith("mcp__"),
736430
736597
  queryChainId: toolUseContext.queryTracking?.chainId,
736431
736598
  queryDepth: toolUseContext.queryTracking?.depth,
@@ -736447,7 +736614,7 @@ async function* runToolUse(toolUse, assistantMessage, canUseTool, toolUseContext
736447
736614
  type: "tool_result",
736448
736615
  content: `<tool_use_error>Error: No such tool available: ${toolName}</tool_use_error>`,
736449
736616
  is_error: true,
736450
- tool_use_id: toolUse.id
736617
+ tool_use_id: block2.id
736451
736618
  }
736452
736619
  ],
736453
736620
  toolUseResult: `Error: No such tool available: ${toolName}`,
@@ -736456,12 +736623,12 @@ async function* runToolUse(toolUse, assistantMessage, canUseTool, toolUseContext
736456
736623
  };
736457
736624
  return;
736458
736625
  }
736459
- const toolInput = toolUse.input;
736626
+ const toolInput = block2.input;
736460
736627
  try {
736461
736628
  if (toolUseContext.abortController.signal.aborted) {
736462
736629
  logEvent("tengu_tool_use_cancelled", {
736463
736630
  toolName: sanitizeToolNameForAnalytics(tool.name),
736464
- toolUseID: toolUse.id,
736631
+ toolUseID: block2.id,
736465
736632
  isMcp: tool.isMcp ?? false,
736466
736633
  queryChainId: toolUseContext.queryTracking?.chainId,
736467
736634
  queryDepth: toolUseContext.queryTracking?.depth,
@@ -736476,7 +736643,7 @@ async function* runToolUse(toolUse, assistantMessage, canUseTool, toolUseContext
736476
736643
  },
736477
736644
  ...mcpToolDetailsForAnalytics(tool.name, mcpServerType, mcpServerBaseUrl)
736478
736645
  });
736479
- const content = createToolResultStopMessage(toolUse.id);
736646
+ const content = createToolResultStopMessage(block2.id);
736480
736647
  content.content = withMemoryCorrectionHint(CANCEL_MESSAGE);
736481
736648
  yield {
736482
736649
  message: createUserMessage({
@@ -736487,7 +736654,7 @@ async function* runToolUse(toolUse, assistantMessage, canUseTool, toolUseContext
736487
736654
  };
736488
736655
  return;
736489
736656
  }
736490
- for await (const update of streamedCheckPermissionsAndCallTool(tool, toolUse.id, toolInput, toolUseContext, canUseTool, assistantMessage, messageId, requestId2, mcpServerType, mcpServerBaseUrl)) {
736657
+ for await (const update of streamedCheckPermissionsAndCallTool(tool, block2.id, toolInput, toolUseContext, canUseTool, assistantMessage, messageId, requestId2, mcpServerType, mcpServerBaseUrl)) {
736491
736658
  yield update;
736492
736659
  }
736493
736660
  } catch (error100) {
@@ -736502,7 +736669,7 @@ async function* runToolUse(toolUse, assistantMessage, canUseTool, toolUseContext
736502
736669
  type: "tool_result",
736503
736670
  content: `<tool_use_error>${detailedError}</tool_use_error>`,
736504
736671
  is_error: true,
736505
- tool_use_id: toolUse.id
736672
+ tool_use_id: block2.id
736506
736673
  }
736507
736674
  ],
736508
736675
  toolUseResult: detailedError,
@@ -737327,6 +737494,7 @@ class StreamingToolExecutor {
737327
737494
  }
737328
737495
  }
737329
737496
  addTool(block2, assistantMessage) {
737497
+ const repaired = repairToolUse(block2, this.toolDefinitions);
737330
737498
  if (this.tools.length === 0 && this.turnSpan === null) {
737331
737499
  this.turnSpan = createToolBatchSpan(this.toolUseContext.langfuseTrace ?? null, { toolNames: [block2.name], batchIndex: 0 });
737332
737500
  if (this.turnSpan) {
@@ -737336,12 +737504,12 @@ class StreamingToolExecutor {
737336
737504
  };
737337
737505
  }
737338
737506
  }
737339
- const toolDefinition = findToolByName(this.toolDefinitions, block2.name);
737340
- const invalidToolCallError = getInvalidToolCallError(block2);
737507
+ const toolDefinition = findToolByName(this.toolDefinitions, repaired.name);
737508
+ const invalidToolCallError = getInvalidToolCallError(repaired);
737341
737509
  if (invalidToolCallError) {
737342
737510
  this.tools.push({
737343
- id: block2.id,
737344
- block: block2,
737511
+ id: repaired.id,
737512
+ block: repaired,
737345
737513
  assistantMessage,
737346
737514
  status: "completed",
737347
737515
  isConcurrencySafe: true,
@@ -737353,7 +737521,7 @@ class StreamingToolExecutor {
737353
737521
  type: "tool_result",
737354
737522
  content: `<tool_use_error>${invalidToolCallError}</tool_use_error>`,
737355
737523
  is_error: true,
737356
- tool_use_id: block2.id
737524
+ tool_use_id: repaired.id
737357
737525
  }
737358
737526
  ],
737359
737527
  toolUseResult: invalidToolCallError,
@@ -737365,8 +737533,8 @@ class StreamingToolExecutor {
737365
737533
  }
737366
737534
  if (!toolDefinition) {
737367
737535
  this.tools.push({
737368
- id: block2.id,
737369
- block: block2,
737536
+ id: repaired.id,
737537
+ block: repaired,
737370
737538
  assistantMessage,
737371
737539
  status: "completed",
737372
737540
  isConcurrencySafe: true,
@@ -737376,19 +737544,19 @@ class StreamingToolExecutor {
737376
737544
  content: [
737377
737545
  {
737378
737546
  type: "tool_result",
737379
- content: `<tool_use_error>Error: No such tool available: ${block2.name}</tool_use_error>`,
737547
+ content: `<tool_use_error>Error: No such tool available: ${repaired.name}</tool_use_error>`,
737380
737548
  is_error: true,
737381
- tool_use_id: block2.id
737549
+ tool_use_id: repaired.id
737382
737550
  }
737383
737551
  ],
737384
- toolUseResult: `Error: No such tool available: ${block2.name}`,
737552
+ toolUseResult: `Error: No such tool available: ${repaired.name}`,
737385
737553
  sourceToolAssistantUUID: assistantMessage.uuid
737386
737554
  })
737387
737555
  ]
737388
737556
  });
737389
737557
  return;
737390
737558
  }
737391
- const parsedInput = toolDefinition.inputSchema.safeParse(block2.input);
737559
+ const parsedInput = toolDefinition.inputSchema.safeParse(repaired.input);
737392
737560
  const isConcurrencySafe = parsedInput?.success ? (() => {
737393
737561
  try {
737394
737562
  return Boolean(toolDefinition.isConcurrencySafe(parsedInput.data));
@@ -737397,8 +737565,8 @@ class StreamingToolExecutor {
737397
737565
  }
737398
737566
  })() : false;
737399
737567
  this.tools.push({
737400
- id: block2.id,
737401
- block: block2,
737568
+ id: repaired.id,
737569
+ block: repaired,
737402
737570
  assistantMessage,
737403
737571
  status: "queued",
737404
737572
  isConcurrencySafe,
@@ -749235,11 +749403,11 @@ function extractTag(html2, tagName) {
749235
749403
  return null;
749236
749404
  }
749237
749405
  const escapedTag = escapeRegExp(tagName);
749238
- const pattern = new RegExp(`<${escapedTag}(?:\\s+[^>]*)?>` + "([\\s\\S]*?)" + `<\\/${escapedTag}>`, "gi");
749406
+ const pattern = new RegExp(`<${escapedTag}(?:\\s[^>]*)?>` + "([\\s\\S]*?)" + `<\\/${escapedTag}>`, "gi");
749239
749407
  let match;
749240
749408
  let depth = 0;
749241
749409
  let lastIndex = 0;
749242
- const openingTag = new RegExp(`<${escapedTag}(?:\\s+[^>]*?)?>`, "gi");
749410
+ const openingTag = new RegExp(`<${escapedTag}(?:\\s[^>]*?)?>`, "gi");
749243
749411
  const closingTag = new RegExp(`<\\/${escapedTag}>`, "gi");
749244
749412
  while ((match = pattern.exec(html2)) !== null) {
749245
749413
  const content = match[1];
@@ -755043,7 +755211,7 @@ var init_findRelevantMemories = __esm(() => {
755043
755211
 
755044
755212
  // src/utils/attachments.ts
755045
755213
  import { readdir as readdir25, stat as stat39 } from "fs/promises";
755046
- import { dirname as dirname68, parse as parse25, relative as relative34, resolve as resolve52 } from "path";
755214
+ import { dirname as dirname68, parse as parse26, relative as relative34, resolve as resolve52 } from "path";
755047
755215
  import { randomUUID as randomUUID43 } from "crypto";
755048
755216
  async function getAttachments(input4, toolUseContext, ideSelection, queuedCommands, messages, querySource, options) {
755049
755217
  if (isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_ATTACHMENTS) || isEnvTruthy(process.env.CLAUDE_CODE_SIMPLE)) {
@@ -755510,7 +755678,7 @@ function getDirectoriesToProcess(targetPath, originalCwd) {
755510
755678
  const targetDir = dirname68(resolve52(targetPath));
755511
755679
  const nestedDirs = [];
755512
755680
  let currentDir = targetDir;
755513
- while (currentDir !== originalCwd && currentDir !== parse25(currentDir).root) {
755681
+ while (currentDir !== originalCwd && currentDir !== parse26(currentDir).root) {
755514
755682
  if (currentDir.startsWith(originalCwd)) {
755515
755683
  nestedDirs.push(currentDir);
755516
755684
  }
@@ -755519,7 +755687,7 @@ function getDirectoriesToProcess(targetPath, originalCwd) {
755519
755687
  nestedDirs.reverse();
755520
755688
  const cwdLevelDirs = [];
755521
755689
  currentDir = originalCwd;
755522
- while (currentDir !== parse25(currentDir).root) {
755690
+ while (currentDir !== parse26(currentDir).root) {
755523
755691
  cwdLevelDirs.push(currentDir);
755524
755692
  currentDir = dirname68(currentDir);
755525
755693
  }
@@ -756166,7 +756334,7 @@ async function* getAttachmentMessages(input4, toolUseContext, ideSelection, queu
756166
756334
  }
756167
756335
  }
756168
756336
  async function tryGetPDFReference(filename) {
756169
- const ext = parse25(filename).ext.toLowerCase();
756337
+ const ext = parse26(filename).ext.toLowerCase();
756170
756338
  if (!isPDFExtension(ext)) {
756171
756339
  return null;
756172
756340
  }
@@ -756200,7 +756368,7 @@ async function generateFileAttachment(filename, toolUseContext, successEventName
756200
756368
  return null;
756201
756369
  }
756202
756370
  if (mode === "at-mention" && !isFileWithinReadSizeLimit(filename, getDefaultFileReadingLimits().maxSizeBytes)) {
756203
- const ext = parse25(filename).ext.toLowerCase();
756371
+ const ext = parse26(filename).ext.toLowerCase();
756204
756372
  if (!isPDFExtension(ext)) {
756205
756373
  try {
756206
756374
  const stats3 = await getFsImplementation().stat(filename);
@@ -757894,14 +758062,14 @@ function isSourceAllowedByPolicy(source) {
757894
758062
  if (allowlist === null) {
757895
758063
  return true;
757896
758064
  }
757897
- return allowlist.some((allowed) => {
757898
- if (allowed.source === "hostPattern") {
757899
- return doesSourceMatchHostPattern(source, allowed);
758065
+ return allowlist.some((allowed2) => {
758066
+ if (allowed2.source === "hostPattern") {
758067
+ return doesSourceMatchHostPattern(source, allowed2);
757900
758068
  }
757901
- if (allowed.source === "pathPattern") {
757902
- return doesSourceMatchPathPattern(source, allowed);
758069
+ if (allowed2.source === "pathPattern") {
758070
+ return doesSourceMatchPathPattern(source, allowed2);
757903
758071
  }
757904
- return areSourcesEqual(source, allowed);
758072
+ return areSourcesEqual(source, allowed2);
757905
758073
  });
757906
758074
  }
757907
758075
  function formatSourceForDisplay(source) {
@@ -762849,13 +763017,13 @@ async function toolToAPISchema(tool, options) {
762849
763017
  schema3.cache_control = options.cacheControl;
762850
763018
  }
762851
763019
  if (isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)) {
762852
- const allowed = new Set([
763020
+ const allowed2 = new Set([
762853
763021
  "name",
762854
763022
  "description",
762855
763023
  "input_schema",
762856
763024
  "cache_control"
762857
763025
  ]);
762858
- const stripped = Object.keys(schema3).filter((k9) => !allowed.has(k9));
763026
+ const stripped = Object.keys(schema3).filter((k9) => !allowed2.has(k9));
762859
763027
  if (stripped.length > 0) {
762860
763028
  logStripOnce(stripped);
762861
763029
  return {
@@ -763744,7 +763912,7 @@ function getAnthropicEnvMetadata() {
763744
763912
  function getBuildAgeMinutes() {
763745
763913
  if (false)
763746
763914
  ;
763747
- const buildTime = new Date("2026-09-04T04:53:07.130Z").getTime();
763915
+ const buildTime = new Date("2026-09-07T00:23:46.056Z").getTime();
763748
763916
  if (isNaN(buildTime))
763749
763917
  return;
763750
763918
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -766540,8 +766708,8 @@ var require_dist10 = __commonJS((exports) => {
766540
766708
  };
766541
766709
  return parseAny();
766542
766710
  };
766543
- var parse26 = parseJSON2;
766544
- exports.parse = parse26;
766711
+ var parse27 = parseJSON2;
766712
+ exports.parse = parse27;
766545
766713
  });
766546
766714
 
766547
766715
  // src/costrict/provider/index.ts
@@ -767058,10 +767226,12 @@ async function* consumeCoStrictStream(adaptedStream, costrictModel, tools, optio
767058
767226
  const state3 = toolCallStates.get(idx);
767059
767227
  if (state3) {
767060
767228
  state3.rawInput += fragment;
767061
- const partialInput = tryParsePartialToolInput(state3.rawInput);
767062
- if (partialInput) {
767063
- state3.partialInput = partialInput;
767064
- delta.parsed_tool_input = partialInput;
767229
+ if (state3.rawInput.length <= PARTIAL_INPUT_PARSE_MAX_CHARS) {
767230
+ const partialInput = tryParsePartialToolInput(state3.rawInput);
767231
+ if (partialInput) {
767232
+ state3.partialInput = partialInput;
767233
+ delta.parsed_tool_input = partialInput;
767234
+ }
767065
767235
  }
767066
767236
  }
767067
767237
  } else if (delta.type === "thinking_delta") {
@@ -767405,7 +767575,7 @@ async function* queryModelCoStrict(messages, systemPrompt2, tools, signal, optio
767405
767575
  });
767406
767576
  }
767407
767577
  }
767408
- var import_partial_json, MAX_STREAM_RECONNECT_ATTEMPTS2 = 3, MAX_PREFILL_ROUNDS = 4, MAX_STITCHED_CHARS = 2000000;
767578
+ var import_partial_json, MAX_STREAM_RECONNECT_ATTEMPTS2 = 3, MAX_PREFILL_ROUNDS = 4, MAX_STITCHED_CHARS = 2000000, PARTIAL_INPUT_PARSE_MAX_CHARS = 8192;
767409
767579
  var init_provider3 = __esm(() => {
767410
767580
  init_openai();
767411
767581
  init_sdk();
@@ -778240,7 +778410,7 @@ function Feedback({
778240
778410
  platform: env4.platform,
778241
778411
  gitRepo: envInfo.isGit,
778242
778412
  terminal: env4.terminal,
778243
- version: "4.2.35-beta",
778413
+ version: "4.2.36",
778244
778414
  transcript: normalizeMessagesForAPI(messages),
778245
778415
  errors: sanitizedErrors,
778246
778416
  lastApiRequest: getLastAPIRequest(),
@@ -778423,7 +778593,7 @@ function Feedback({
778423
778593
  ", ",
778424
778594
  env4.terminal,
778425
778595
  ", v",
778426
- "4.2.35-beta"
778596
+ "4.2.36"
778427
778597
  ]
778428
778598
  })
778429
778599
  ]
@@ -778520,7 +778690,7 @@ ${sanitizedDescription}
778520
778690
  ` + `**Environment Info**
778521
778691
  ` + `- Platform: ${env4.platform}
778522
778692
  ` + `- Terminal: ${env4.terminal}
778523
- ` + `- Version: ${"4.2.35-beta"}
778693
+ ` + `- Version: ${"4.2.36"}
778524
778694
  ` + `- Feedback ID: ${feedbackId}
778525
778695
  ` + `
778526
778696
  **Errors**
@@ -779170,12 +779340,12 @@ async function getFilesUsingGit(abortSignal, respectGitignore) {
779170
779340
  "--others",
779171
779341
  "--exclude-standard"
779172
779342
  ] : ["-c", "core.quotepath=false", "ls-files", "--others"];
779173
- const generation = cacheGeneration;
779343
+ const generation2 = cacheGeneration;
779174
779344
  untrackedFetchPromise = execFileNoThrowWithCwd(gitExe(), untrackedArgs, {
779175
779345
  timeout: 1e4,
779176
779346
  cwd: repoRoot2
779177
779347
  }).then(async (untrackedResult) => {
779178
- if (generation !== cacheGeneration) {
779348
+ if (generation2 !== cacheGeneration) {
779179
779349
  return;
779180
779350
  }
779181
779351
  if (untrackedResult.code === 0) {
@@ -779345,11 +779515,11 @@ function startBackgroundCacheRefresh() {
779345
779515
  return;
779346
779516
  }
779347
779517
  }
779348
- const generation = cacheGeneration;
779518
+ const generation2 = cacheGeneration;
779349
779519
  const refreshStart = Date.now();
779350
779520
  getFileIndex();
779351
779521
  fileListRefreshPromise = getPathsForSuggestions().then((result) => {
779352
- if (generation !== cacheGeneration) {
779522
+ if (generation2 !== cacheGeneration) {
779353
779523
  return result;
779354
779524
  }
779355
779525
  fileListRefreshPromise = null;
@@ -779361,7 +779531,7 @@ function startBackgroundCacheRefresh() {
779361
779531
  }).catch((error100) => {
779362
779532
  logForDebugging(`[FileIndex] Cache refresh failed: ${errorMessage(error100)}`);
779363
779533
  logError2(error100);
779364
- if (generation === cacheGeneration) {
779534
+ if (generation2 === cacheGeneration) {
779365
779535
  fileListRefreshPromise = null;
779366
779536
  }
779367
779537
  return getFileIndex();
@@ -780759,7 +780929,7 @@ function buildPrimarySection() {
780759
780929
  children: t("settings.status.renameHint")
780760
780930
  });
780761
780931
  return [
780762
- { label: t("settings.status.version"), value: "4.2.35-beta" },
780932
+ { label: t("settings.status.version"), value: "4.2.36" },
780763
780933
  { label: t("settings.status.sessionName"), value: nameValue },
780764
780934
  { label: t("settings.status.sessionId"), value: sessionId },
780765
780935
  { label: t("settings.status.cwd"), value: getCwd() },
@@ -783637,7 +783807,7 @@ function Config({
783637
783807
  }
783638
783808
  })
783639
783809
  }) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime192.jsx(ChannelDowngradeDialog, {
783640
- currentVersion: "4.2.35-beta",
783810
+ currentVersion: "4.2.36",
783641
783811
  onChoice: (choice) => {
783642
783812
  setShowSubmenu(null);
783643
783813
  setTabsHidden(false);
@@ -783649,7 +783819,7 @@ function Config({
783649
783819
  autoUpdatesChannel: "stable"
783650
783820
  };
783651
783821
  if (choice === "stay") {
783652
- newSettings.minimumVersion = "4.2.35-beta";
783822
+ newSettings.minimumVersion = "4.2.36";
783653
783823
  }
783654
783824
  updateSettingsForSource("userSettings", newSettings);
783655
783825
  setSettingsData((prev) => ({
@@ -789118,7 +789288,7 @@ function HelpV2({ onClose, commands: commands11 }) {
789118
789288
  color: "professionalBlue",
789119
789289
  children: [
789120
789290
  /* @__PURE__ */ jsx_runtime219.jsx(Tabs, {
789121
- title: process.env.USER_TYPE === "sf" ? "/help" : `CoStrict v${"4.2.35-beta"}`,
789291
+ title: process.env.USER_TYPE === "sf" ? "/help" : `CoStrict v${"4.2.36"}`,
789122
789292
  color: "professionalBlue",
789123
789293
  defaultTab: "general",
789124
789294
  children: tabs
@@ -811833,7 +812003,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
811833
812003
  return [];
811834
812004
  }
811835
812005
  }
811836
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "4.2.35-beta") {
812006
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "4.2.36") {
811837
812007
  if (process.env.USER_TYPE === "sf") {
811838
812008
  const changelog = "";
811839
812009
  if (changelog) {
@@ -811860,7 +812030,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "4.2.35-be
811860
812030
  releaseNotes
811861
812031
  };
811862
812032
  }
811863
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "4.2.35-beta") {
812033
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "4.2.36") {
811864
812034
  if (process.env.USER_TYPE === "sf") {
811865
812035
  const changelog = "";
811866
812036
  if (changelog) {
@@ -812533,7 +812703,7 @@ function createSearcher(pattern, options) {
812533
812703
  }
812534
812704
  return new BitapSearch(pattern, options);
812535
812705
  }
812536
- function parse26(query5, options, { auto = true } = {}) {
812706
+ function parse27(query5, options, { auto = true } = {}) {
812537
812707
  const next2 = (query6) => {
812538
812708
  if (isString3(query6)) {
812539
812709
  const obj = {
@@ -813413,7 +813583,7 @@ var INCORRECT_INDEX_TYPE = "Incorrect 'index' type", INVALID_DOC_INDEX = "Invali
813413
813583
  return results;
813414
813584
  }
813415
813585
  _searchLogical(query5) {
813416
- const expression = parse26(query5, this.options);
813586
+ const expression = parse27(query5, this.options);
813417
813587
  const evaluate = (node2, item, idx) => {
813418
813588
  if (!("children" in node2)) {
813419
813589
  const { keyId, searcher } = node2;
@@ -813810,7 +813980,7 @@ var init_fuse = __esm(() => {
813810
813980
  ...options
813811
813981
  }).searchIn(text2);
813812
813982
  };
813813
- Fuse.parseQuery = parse26;
813983
+ Fuse.parseQuery = parse27;
813814
813984
  register2(ExtendedSearch);
813815
813985
  register2(TokenSearch);
813816
813986
  Fuse.use = function(...plugins) {
@@ -814373,7 +814543,7 @@ function isNotLoggedIn() {
814373
814543
  return true;
814374
814544
  }
814375
814545
  function getLogoDisplayData() {
814376
- const version11 = process.env.DEMO_VERSION ?? "4.2.35-beta";
814546
+ const version11 = process.env.DEMO_VERSION ?? "4.2.36";
814377
814547
  const serverUrl = getDirectConnectServerUrl();
814378
814548
  const displayPath2 = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
814379
814549
  const cwd2 = serverUrl ? `${displayPath2} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath2;
@@ -814951,7 +815121,7 @@ var init_MatrixMessageLine = __esm(() => {
814951
815121
  // src/components/matrix-tactical/MatrixWelcome.tsx
814952
815122
  import { basename as basename48 } from "path";
814953
815123
  function MatrixWelcome({
814954
- version: version11 = "4.2.35-beta",
815124
+ version: version11 = "4.2.36",
814955
815125
  projectName,
814956
815126
  cwd: cwd2,
814957
815127
  modelDisplayName,
@@ -815586,13 +815756,13 @@ function LogoV2() {
815586
815756
  const { hasReleaseNotes } = checkForReleaseNotesSync(config13.lastReleaseNotesSeen);
815587
815757
  import_react167.useEffect(() => {
815588
815758
  const currentConfig = getGlobalConfig();
815589
- if (currentConfig.lastReleaseNotesSeen === "4.2.35-beta") {
815759
+ if (currentConfig.lastReleaseNotesSeen === "4.2.36") {
815590
815760
  return;
815591
815761
  }
815592
815762
  saveGlobalConfig((current2) => {
815593
- if (current2.lastReleaseNotesSeen === "4.2.35-beta")
815763
+ if (current2.lastReleaseNotesSeen === "4.2.36")
815594
815764
  return current2;
815595
- return { ...current2, lastReleaseNotesSeen: "4.2.35-beta" };
815765
+ return { ...current2, lastReleaseNotesSeen: "4.2.36" };
815596
815766
  });
815597
815767
  if (showOnboarding) {
815598
815768
  incrementProjectOnboardingSeenCount();
@@ -824314,10 +824484,10 @@ var require_packer_sync = __commonJS((exports, module) => {
824314
824484
 
824315
824485
  // node_modules/.bun/pngjs@5.0.0/node_modules/pngjs/lib/png-sync.js
824316
824486
  var require_png_sync = __commonJS((exports) => {
824317
- var parse27 = require_parser_sync();
824487
+ var parse28 = require_parser_sync();
824318
824488
  var pack2 = require_packer_sync();
824319
824489
  exports.read = function(buffer2, options) {
824320
- return parse27(buffer2, options || {});
824490
+ return parse28(buffer2, options || {});
824321
824491
  };
824322
824492
  exports.write = function(png2, options) {
824323
824493
  return pack2(png2, options);
@@ -839157,7 +839327,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
839157
839327
  smapsRollup,
839158
839328
  platform: process.platform,
839159
839329
  nodeVersion: process.version,
839160
- ccVersion: "4.2.35-beta"
839330
+ ccVersion: "4.2.36"
839161
839331
  };
839162
839332
  }
839163
839333
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -839273,7 +839443,7 @@ var init_mock_limits = __esm(() => {
839273
839443
  var call56 = async () => {
839274
839444
  return {
839275
839445
  type: "text",
839276
- value: `${"4.2.35-beta"} (built ${"2026-09-04T04:53:07.130Z"})`
839446
+ value: `${"4.2.36"} (built ${"2026-09-07T00:23:46.056Z"})`
839277
839447
  };
839278
839448
  }, version11, version_default;
839279
839449
  var init_version2 = __esm(() => {
@@ -855848,7 +856018,7 @@ __export(exports_createWorkflowCommand, {
855848
856018
  getWorkflowCommands: () => getWorkflowCommands
855849
856019
  });
855850
856020
  import { readdir as readdir43 } from "fs/promises";
855851
- import { join as join211, parse as parse27 } from "path";
856021
+ import { join as join211, parse as parse28 } from "path";
855852
856022
  async function getWorkflowCommands(cwd2) {
855853
856023
  const workflowDir = join211(cwd2, WORKFLOW_DIR_NAME);
855854
856024
  let files3;
@@ -855858,11 +856028,11 @@ async function getWorkflowCommands(cwd2) {
855858
856028
  return [];
855859
856029
  }
855860
856030
  const workflowFiles = files3.filter((f7) => {
855861
- const ext = parse27(f7).ext.toLowerCase();
856031
+ const ext = parse28(f7).ext.toLowerCase();
855862
856032
  return WORKFLOW_FILE_EXTENSIONS.includes(ext);
855863
856033
  });
855864
856034
  return workflowFiles.map((file3) => {
855865
- const name3 = parse27(file3).name;
856035
+ const name3 = parse28(file3).name;
855866
856036
  return {
855867
856037
  type: "prompt",
855868
856038
  name: name3,
@@ -859153,7 +859323,7 @@ function generateHtmlReport(data, insights) {
859153
859323
  </html>`;
859154
859324
  }
859155
859325
  function buildExportData(data, insights, facets, remoteStats) {
859156
- const version12 = typeof MACRO !== "undefined" ? "4.2.35-beta" : "unknown";
859326
+ const version12 = typeof MACRO !== "undefined" ? "4.2.36" : "unknown";
859157
859327
  const remote_hosts_collected = remoteStats?.hosts.filter((h8) => h8.sessionCount > 0).map((h8) => h8.name);
859158
859328
  const facets_summary = {
859159
859329
  total: facets.size,
@@ -863645,7 +863815,7 @@ var init_sessionStorage = __esm(() => {
863645
863815
  init_settings2();
863646
863816
  init_slowOperations();
863647
863817
  init_uuid();
863648
- VERSION11 = typeof MACRO !== "undefined" ? "4.2.35-beta" : "unknown";
863818
+ VERSION11 = typeof MACRO !== "undefined" ? "4.2.36" : "unknown";
863649
863819
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
863650
863820
  SKIP_FIRST_PROMPT_PATTERN2 = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
863651
863821
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -864986,7 +865156,7 @@ var init_filesystem = __esm(() => {
864986
865156
  });
864987
865157
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
864988
865158
  const nonce = randomBytes24(16).toString("hex");
864989
- return join219(getCostrictTempDir(), "bundled-skills", "4.2.35-beta", nonce);
865159
+ return join219(getCostrictTempDir(), "bundled-skills", "4.2.36", nonce);
864990
865160
  });
864991
865161
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
864992
865162
  });
@@ -876484,7 +876654,7 @@ function buildSystemInitMessage(inputs) {
876484
876654
  slash_commands: inputs.commands.filter((c10) => c10.userInvocable !== false).map((c10) => c10.name),
876485
876655
  apiKeySource: getAnthropicApiKeyWithSource().source,
876486
876656
  betas: getSdkBetas(),
876487
- claude_code_version: "4.2.35-beta",
876657
+ claude_code_version: "4.2.36",
876488
876658
  output_style: outputStyle2,
876489
876659
  agents: inputs.agents.map((agent) => agent.agentType),
876490
876660
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -878361,10 +878531,10 @@ function toolInfoFromToolUse(toolUse, _supportsTerminalOutput = false, cwd2) {
878361
878531
  case "WebSearch": {
878362
878532
  const query5 = input5?.query ?? "Web search";
878363
878533
  let label = `"${query5}"`;
878364
- const allowed = input5?.allowed_domains;
878534
+ const allowed2 = input5?.allowed_domains;
878365
878535
  const blocked = input5?.blocked_domains;
878366
- if (allowed && allowed.length > 0)
878367
- label += ` (allowed: ${allowed.join(", ")})`;
878536
+ if (allowed2 && allowed2.length > 0)
878537
+ label += ` (allowed: ${allowed2.join(", ")})`;
878368
878538
  if (blocked && blocked.length > 0)
878369
878539
  label += ` (blocked: ${blocked.join(", ")})`;
878370
878540
  return {
@@ -880028,7 +880198,7 @@ function appendToLog(path61, message2) {
880028
880198
  cwd: getFsImplementation().cwd(),
880029
880199
  userType: process.env.USER_TYPE,
880030
880200
  sessionId: getSessionId(),
880031
- version: "4.2.35-beta"
880201
+ version: "4.2.36"
880032
880202
  };
880033
880203
  getLogWriter(path61).write(messageWithTimestamp);
880034
880204
  }
@@ -884247,8 +884417,8 @@ class QueryGuard {
884247
884417
  this._notify();
884248
884418
  return this._generation;
884249
884419
  }
884250
- end(generation) {
884251
- if (this._generation !== generation)
884420
+ end(generation2) {
884421
+ if (this._generation !== generation2)
884252
884422
  return false;
884253
884423
  if (this._status !== "running")
884254
884424
  return false;
@@ -901089,7 +901259,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
901089
901259
  project_dir: getOriginalCwd(),
901090
901260
  added_dirs: addedDirs
901091
901261
  },
901092
- version: "4.2.35-beta",
901262
+ version: "4.2.36",
901093
901263
  output_style: {
901094
901264
  name: outputStyleName
901095
901265
  },
@@ -907876,7 +908046,7 @@ var require_lib16 = __commonJS((exports, module) => {
907876
908046
  this.hashes = this.algorithms.map(crypto8.createHash);
907877
908047
  }
907878
908048
  #getOptions() {
907879
- this.sri = this.opts?.integrity ? parse28(this.opts?.integrity, this.opts) : null;
908049
+ this.sri = this.opts?.integrity ? parse29(this.opts?.integrity, this.opts) : null;
907880
908050
  this.expectedSize = this.opts?.size;
907881
908051
  if (!this.sri) {
907882
908052
  this.algorithm = null;
@@ -907917,7 +908087,7 @@ var require_lib16 = __commonJS((exports, module) => {
907917
908087
  if (!this.goodSri) {
907918
908088
  this.#getOptions();
907919
908089
  }
907920
- const newSri = parse28(this.hashes.map((h8, i10) => {
908090
+ const newSri = parse29(this.hashes.map((h8, i10) => {
907921
908091
  return `${this.algorithms[i10]}-${h8.digest("base64")}${this.optString}`;
907922
908092
  }).join(" "), this.opts);
907923
908093
  const match = this.goodSri && newSri.match(this.sri, this.opts);
@@ -907985,7 +908155,7 @@ var require_lib16 = __commonJS((exports, module) => {
907985
908155
  return this.toString();
907986
908156
  }
907987
908157
  match(integrity, opts) {
907988
- const other = parse28(integrity, opts);
908158
+ const other = parse29(integrity, opts);
907989
908159
  if (!other) {
907990
908160
  return false;
907991
908161
  }
@@ -908064,13 +908234,13 @@ var require_lib16 = __commonJS((exports, module) => {
908064
908234
  }
908065
908235
  concat(integrity, opts) {
908066
908236
  const other = typeof integrity === "string" ? integrity : stringify5(integrity, opts);
908067
- return parse28(`${this.toString(opts)} ${other}`, opts);
908237
+ return parse29(`${this.toString(opts)} ${other}`, opts);
908068
908238
  }
908069
908239
  hexDigest() {
908070
- return parse28(this, { single: true }).hexDigest();
908240
+ return parse29(this, { single: true }).hexDigest();
908071
908241
  }
908072
908242
  merge(integrity, opts) {
908073
- const other = parse28(integrity, opts);
908243
+ const other = parse29(integrity, opts);
908074
908244
  for (const algo in other) {
908075
908245
  if (this[algo]) {
908076
908246
  if (!this[algo].find((hash4) => other[algo].find((otherhash) => hash4.digest === otherhash.digest))) {
@@ -908082,7 +908252,7 @@ var require_lib16 = __commonJS((exports, module) => {
908082
908252
  }
908083
908253
  }
908084
908254
  match(integrity, opts) {
908085
- const other = parse28(integrity, opts);
908255
+ const other = parse29(integrity, opts);
908086
908256
  if (!other) {
908087
908257
  return false;
908088
908258
  }
@@ -908101,8 +908271,8 @@ var require_lib16 = __commonJS((exports, module) => {
908101
908271
  return null;
908102
908272
  }
908103
908273
  }
908104
- exports.parse = parse28;
908105
- function parse28(sri, opts) {
908274
+ exports.parse = parse29;
908275
+ function parse29(sri, opts) {
908106
908276
  if (!sri) {
908107
908277
  return null;
908108
908278
  }
@@ -908138,7 +908308,7 @@ var require_lib16 = __commonJS((exports, module) => {
908138
908308
  if (obj.algorithm && obj.digest) {
908139
908309
  return Hash7.prototype.toString.call(obj, opts);
908140
908310
  } else if (typeof obj === "string") {
908141
- return stringify5(parse28(obj, opts), opts);
908311
+ return stringify5(parse29(obj, opts), opts);
908142
908312
  } else {
908143
908313
  return Integrity.prototype.toString.call(obj, opts);
908144
908314
  }
@@ -908146,7 +908316,7 @@ var require_lib16 = __commonJS((exports, module) => {
908146
908316
  exports.fromHex = fromHex4;
908147
908317
  function fromHex4(hexDigest, algorithm, opts) {
908148
908318
  const optString = getOptString(opts?.options);
908149
- return parse28(`${algorithm}-${Buffer.from(hexDigest, "hex").toString("base64")}${optString}`, opts);
908319
+ return parse29(`${algorithm}-${Buffer.from(hexDigest, "hex").toString("base64")}${optString}`, opts);
908150
908320
  }
908151
908321
  exports.fromData = fromData;
908152
908322
  function fromData(data, opts) {
@@ -908182,7 +908352,7 @@ var require_lib16 = __commonJS((exports, module) => {
908182
908352
  }
908183
908353
  exports.checkData = checkData;
908184
908354
  function checkData(data, sri, opts) {
908185
- sri = parse28(sri, opts);
908355
+ sri = parse29(sri, opts);
908186
908356
  if (!sri || !Object.keys(sri).length) {
908187
908357
  if (opts?.error) {
908188
908358
  throw Object.assign(new Error("No valid integrity hashes to check against"), {
@@ -908194,7 +908364,7 @@ var require_lib16 = __commonJS((exports, module) => {
908194
908364
  }
908195
908365
  const algorithm = sri.pickAlgorithm(opts);
908196
908366
  const digest = crypto8.createHash(algorithm).update(data).digest("base64");
908197
- const newSri = parse28({ algorithm, digest });
908367
+ const newSri = parse29({ algorithm, digest });
908198
908368
  const match = newSri.match(sri, opts);
908199
908369
  opts = opts || {};
908200
908370
  if (match || !opts.error) {
@@ -908222,7 +908392,7 @@ var require_lib16 = __commonJS((exports, module) => {
908222
908392
  function checkStream(stream8, sri, opts) {
908223
908393
  opts = opts || Object.create(null);
908224
908394
  opts.integrity = sri;
908225
- sri = parse28(sri, opts);
908395
+ sri = parse29(sri, opts);
908226
908396
  if (!sri || !Object.keys(sri).length) {
908227
908397
  return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"), {
908228
908398
  code: "EINTEGRITY"
@@ -908458,7 +908628,7 @@ var require_polyfill = __commonJS((exports, module) => {
908458
908628
  dirname: dirname96,
908459
908629
  isAbsolute: isAbsolute42,
908460
908630
  join: join237,
908461
- parse: parse28,
908631
+ parse: parse29,
908462
908632
  resolve: resolve72,
908463
908633
  sep: sep46,
908464
908634
  toNamespacedPath
@@ -908563,7 +908733,7 @@ var require_polyfill = __commonJS((exports, module) => {
908563
908733
  async function checkParentPaths(src, srcStat, dest) {
908564
908734
  const srcParent = resolve72(dirname96(src));
908565
908735
  const destParent = resolve72(dirname96(dest));
908566
- if (destParent === srcParent || destParent === parse28(destParent).root) {
908736
+ if (destParent === srcParent || destParent === parse29(destParent).root) {
908567
908737
  return;
908568
908738
  }
908569
908739
  let destStat;
@@ -919705,7 +919875,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
919705
919875
  } catch {}
919706
919876
  const data = {
919707
919877
  trigger,
919708
- version: "4.2.35-beta",
919878
+ version: "4.2.36",
919709
919879
  platform: process.platform,
919710
919880
  transcript,
919711
919881
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -920960,7 +921130,7 @@ function getReleaseType(current2, latest) {
920960
921130
  return "patch";
920961
921131
  }
920962
921132
  async function checkNewAutoUpdate(callbacks) {
920963
- const currentVersion = "4.2.35-beta";
921133
+ const currentVersion = "4.2.36";
920964
921134
  logForDebugging(`[newAutoUpdater] checking, current: ${currentVersion}`);
920965
921135
  if (isNewAutoUpdaterDisabled()) {
920966
921136
  return { action: "skip", currentVersion, latestVersion: null };
@@ -924009,9 +924179,9 @@ function parseManifest(page) {
924009
924179
  throw new SnapshotInvalid(`unsupported contract version ${contractVersion}, expected ${SNAPSHOT_CONTRACT_VERSION}`);
924010
924180
  }
924011
924181
  const snapshotId = requireNonEmptyString(page, "snapshotId", "snapshot");
924012
- const generation = requireInteger(page, "generation", "snapshot");
924013
- if (generation < 1) {
924014
- throw new SnapshotInvalid(`generation ${generation} must be >= 1`);
924182
+ const generation2 = requireInteger(page, "generation", "snapshot");
924183
+ if (generation2 < 1) {
924184
+ throw new SnapshotInvalid(`generation ${generation2} must be >= 1`);
924015
924185
  }
924016
924186
  const generatedAt = requireString2(page, "generatedAt", "snapshot");
924017
924187
  const pageCount = requireInteger(page, "pageCount", "snapshot");
@@ -924033,7 +924203,7 @@ function parseManifest(page) {
924033
924203
  return {
924034
924204
  contractVersion,
924035
924205
  snapshotId,
924036
- generation,
924206
+ generation: generation2,
924037
924207
  generatedAt,
924038
924208
  pageCount,
924039
924209
  itemCount,
@@ -924277,15 +924447,15 @@ function parseConsumerMarker(value) {
924277
924447
  if (typeof value !== "object" || value === null)
924278
924448
  return;
924279
924449
  const record5 = value;
924280
- const generation = record5.generation;
924450
+ const generation2 = record5.generation;
924281
924451
  const snapshotId = record5.snapshotId;
924282
- if (typeof generation !== "number" || !Number.isSafeInteger(generation)) {
924452
+ if (typeof generation2 !== "number" || !Number.isSafeInteger(generation2)) {
924283
924453
  return;
924284
924454
  }
924285
924455
  if (typeof snapshotId !== "string" || snapshotId.length === 0)
924286
924456
  return;
924287
924457
  return {
924288
- generation,
924458
+ generation: generation2,
924289
924459
  snapshotId,
924290
924460
  appliedAt: typeof record5.appliedAt === "string" ? record5.appliedAt : "",
924291
924461
  everApplied: record5.everApplied === true
@@ -933217,7 +933387,7 @@ function WelcomeV2() {
933217
933387
  dimColor: true,
933218
933388
  children: [
933219
933389
  "v",
933220
- "4.2.35-beta",
933390
+ "4.2.36",
933221
933391
  " "
933222
933392
  ]
933223
933393
  })
@@ -933283,7 +933453,7 @@ function WelcomeV2() {
933283
933453
  dimColor: true,
933284
933454
  children: [
933285
933455
  "v",
933286
- "4.2.35-beta",
933456
+ "4.2.36",
933287
933457
  " "
933288
933458
  ]
933289
933459
  })
@@ -933385,7 +933555,7 @@ function AppleTerminalWelcomeV2({ theme: theme2, welcomeMessage }) {
933385
933555
  dimColor: true,
933386
933556
  children: [
933387
933557
  "v",
933388
- "4.2.35-beta",
933558
+ "4.2.36",
933389
933559
  " "
933390
933560
  ]
933391
933561
  })
@@ -933451,7 +933621,7 @@ function AppleTerminalWelcomeV2({ theme: theme2, welcomeMessage }) {
933451
933621
  dimColor: true,
933452
933622
  children: [
933453
933623
  "v",
933454
- "4.2.35-beta",
933624
+ "4.2.36",
933455
933625
  " "
933456
933626
  ]
933457
933627
  })
@@ -934391,7 +934561,7 @@ function completeOnboarding() {
934391
934561
  saveGlobalConfig((current2) => ({
934392
934562
  ...current2,
934393
934563
  hasCompletedOnboarding: true,
934394
- lastOnboardingVersion: "4.2.35-beta"
934564
+ lastOnboardingVersion: "4.2.36"
934395
934565
  }));
934396
934566
  }
934397
934567
  function showDialog(root9, renderer) {
@@ -939852,7 +940022,7 @@ function registerMcpAddCommand(mcp2) {
939852
940022
  }
939853
940023
  try {
939854
940024
  const scope = ensureConfigScope(options.scope);
939855
- const transport = ensureTransport(options.transport);
940025
+ const transport2 = ensureTransport(options.transport);
939856
940026
  if (options.xaa && !isXaaEnabled()) {
939857
940027
  cliError(t("mcp.addErrorXaa"));
939858
940028
  }
@@ -939873,14 +940043,14 @@ function registerMcpAddCommand(mcp2) {
939873
940043
  const transportExplicit = options.transport !== undefined;
939874
940044
  const looksLikeUrl = actualCommand.startsWith("http://") || actualCommand.startsWith("https://") || actualCommand.startsWith("localhost") || actualCommand.endsWith("/sse") || actualCommand.endsWith("/mcp");
939875
940045
  logEvent("tengu_mcp_add", {
939876
- type: transport,
940046
+ type: transport2,
939877
940047
  scope,
939878
940048
  source: "command",
939879
- transport,
940049
+ transport: transport2,
939880
940050
  transportExplicit,
939881
940051
  looksLikeUrl
939882
940052
  });
939883
- if (transport === "sse") {
940053
+ if (transport2 === "sse") {
939884
940054
  if (!actualCommand) {
939885
940055
  cliError(t("mcp.addErrorSseUrlRequired"));
939886
940056
  }
@@ -939908,7 +940078,7 @@ function registerMcpAddCommand(mcp2) {
939908
940078
  process.stdout.write(t("mcp.addLabelHeaders", { json: jsonStringify(headers, null, 2) }) + `
939909
940079
  `);
939910
940080
  }
939911
- } else if (transport === "http") {
940081
+ } else if (transport2 === "http") {
939912
940082
  if (!actualCommand) {
939913
940083
  cliError(t("mcp.addErrorHttpUrlRequired"));
939914
940084
  }
@@ -941958,7 +942128,7 @@ function peekTable(key6, table, meta6, type) {
941958
942128
  }
941959
942129
  return [k9, t2, state4.c];
941960
942130
  }
941961
- function parse28(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
942131
+ function parse29(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
941962
942132
  let res = {};
941963
942133
  let meta6 = {};
941964
942134
  let tbl = res;
@@ -942139,7 +942309,7 @@ async function validateSyntax(absPath, deps = prodDeps2) {
942139
942309
  }
942140
942310
  if (ext === ".toml") {
942141
942311
  try {
942142
- parse28(readFileSync47(absPath, "utf8"));
942312
+ parse29(readFileSync47(absPath, "utf8"));
942143
942313
  } catch (error100) {
942144
942314
  const { line, column } = error100;
942145
942315
  const position3 = typeof line === "number" && typeof column === "number" ? `line ${line}, col ${column}: ` : "";
@@ -943740,10 +943910,11 @@ var startSdkMemoryMonitor = () => {};
943740
943910
  var init_sdkHeapDumpMonitor = () => {};
943741
943911
 
943742
943912
  // src/entrypoints/sdk/controlSchemas.ts
943743
- var JSONRPCMessagePlaceholder, SDKHookCallbackMatcherSchema, SDKControlInitializeRequestSchema, SDKControlInitializeResponseSchema, SDKControlInterruptRequestSchema, SDKControlPermissionRequestSchema, SDKControlSetPermissionModeRequestSchema, SDKControlSetModelRequestSchema, SDKControlSetAgentRequestSchema, 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;
943913
+ var JSONRPCMessagePlaceholder, SDKHookCallbackMatcherSchema, SDKControlInitializeRequestSchema, SDKControlInitializeResponseSchema, SDKControlInterruptRequestSchema, SDKControlPermissionRequestSchema, SDKControlSetPermissionModeRequestSchema, SDKControlSetModelRequestSchema, SDKControlSetAgentRequestSchema, SDKControlSetMaxThinkingTokensRequestSchema, SDKControlMcpStatusRequestSchema, SDKControlMcpStatusResponseSchema, SDKControlGetContextUsageRequestSchema, ContextCategorySchema, ContextGridSquareSchema, SDKControlGetContextUsageResponseSchema, SDKControlRewindFilesRequestSchema, SDKControlRewindFilesResponseSchema, SDKControlCancelAsyncMessageRequestSchema, SDKControlCancelAsyncMessageResponseSchema, SDKControlSeedReadStateRequestSchema, SDKHookCallbackRequestSchema, SDKControlMcpMessageRequestSchema, SDKControlMcpSetServersRequestSchema, SDKControlIdeMcpSetRequestSchema, SDKControlIdeMcpClearRequestSchema, SDKControlMcpSetServersResponseSchema, SDKControlReloadPluginsRequestSchema, SDKControlReloadPluginsResponseSchema, SDKControlMcpReconnectRequestSchema, SDKControlMcpToggleRequestSchema, SDKControlStopTaskRequestSchema, SDKControlApplyFlagSettingsRequestSchema, SDKControlGetSettingsRequestSchema, SDKControlGetSettingsResponseSchema, SDKControlElicitationRequestSchema, SDKControlElicitationResponseSchema, SDKControlRequestInnerSchema, SDKControlRequestSchema, ControlResponseSchema, ControlErrorResponseSchema, SDKControlResponseSchema, SDKControlCancelRequestSchema, SDKKeepAliveMessageSchema, SDKUpdateEnvironmentVariablesMessageSchema, StdoutMessageSchema, StdinMessageSchema;
943744
943914
  var init_controlSchemas = __esm(() => {
943745
943915
  init_v4();
943746
943916
  init_coreSchemas();
943917
+ init_ideCapability();
943747
943918
  JSONRPCMessagePlaceholder = lazySchema(() => exports_external.unknown());
943748
943919
  SDKHookCallbackMatcherSchema = lazySchema(() => exports_external.object({
943749
943920
  matcher: exports_external.string().optional(),
@@ -943934,6 +944105,8 @@ var init_controlSchemas = __esm(() => {
943934
944105
  subtype: exports_external.literal("mcp_set_servers"),
943935
944106
  servers: exports_external.record(exports_external.string(), McpServerConfigForProcessTransportSchema())
943936
944107
  }).describe("Replaces the set of dynamically managed MCP servers."));
944108
+ SDKControlIdeMcpSetRequestSchema = lazySchema(() => exports_external.object({ subtype: exports_external.literal("ide_mcp_set"), capability: IdeCapabilitySchema() }));
944109
+ SDKControlIdeMcpClearRequestSchema = lazySchema(() => exports_external.object({ subtype: exports_external.literal("ide_mcp_clear"), generation: exports_external.string().uuid() }));
943937
944110
  SDKControlMcpSetServersResponseSchema = lazySchema(() => exports_external.object({
943938
944111
  added: exports_external.array(exports_external.string()),
943939
944112
  removed: exports_external.array(exports_external.string()),
@@ -944019,6 +944192,8 @@ var init_controlSchemas = __esm(() => {
944019
944192
  SDKControlCancelAsyncMessageRequestSchema(),
944020
944193
  SDKControlSeedReadStateRequestSchema(),
944021
944194
  SDKControlMcpSetServersRequestSchema(),
944195
+ SDKControlIdeMcpSetRequestSchema(),
944196
+ SDKControlIdeMcpClearRequestSchema(),
944022
944197
  SDKControlReloadPluginsRequestSchema(),
944023
944198
  SDKControlMcpReconnectRequestSchema(),
944024
944199
  SDKControlMcpToggleRequestSchema(),
@@ -944988,7 +945163,7 @@ class CCRClient {
944988
945163
  deliveryUploader;
944989
945164
  onEpochMismatch;
944990
945165
  getAuthHeaders;
944991
- constructor(transport, sessionUrl, opts) {
945166
+ constructor(transport2, sessionUrl, opts) {
944992
945167
  this.onEpochMismatch = opts?.onEpochMismatch ?? (() => {
944993
945168
  process.exit(1);
944994
945169
  });
@@ -945054,7 +945229,7 @@ class CCRClient {
945054
945229
  maxDelayMs: 30000,
945055
945230
  jitterMs: 500
945056
945231
  });
945057
- transport.setOnEvent((event) => {
945232
+ transport2.setOnEvent((event) => {
945058
945233
  this.reportDelivery(event.event_id, "received");
945059
945234
  });
945060
945235
  }
@@ -947187,10 +947362,11 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands11, tools, initi
947187
947362
  tools: [],
947188
947363
  configs: {}
947189
947364
  };
947365
+ let ideMcpState = { tools: [] };
947190
947366
  let warnedInvalidInitJsonSchema = false;
947191
947367
  const buildAllTools = (appState) => {
947192
947368
  const assembledTools = assembleToolPool(appState.toolPermissionContext, appState.mcp.tools);
947193
- let allTools = uniqBy_default(mergeAndFilterTools([...tools, ...sdkTools, ...dynamicMcpState.tools], assembledTools, appState.toolPermissionContext.mode), "name");
947369
+ let allTools = uniqBy_default(mergeAndFilterTools([...tools, ...sdkTools, ...dynamicMcpState.tools, ...ideMcpState.tools], assembledTools, appState.toolPermissionContext.mode), "name");
947194
947370
  if (options.permissionPromptToolName) {
947195
947371
  allTools = allTools.filter((tool) => !toolMatchesName(tool, options.permissionPromptToolName));
947196
947372
  }
@@ -948202,6 +948378,38 @@ ${m4.text}
948202
948378
  if (sdkServersChanged) {
948203
948379
  updateSdkMcp();
948204
948380
  }
948381
+ } else if (msg.request.subtype === "ide_mcp_set") {
948382
+ const capability = msg.request.capability;
948383
+ const policy = getIdeMcpPolicy();
948384
+ setIdeMcpPolicy(capability.generation, new Set(capability.tools));
948385
+ const config13 = { type: "http", url: capability.transport.url, headers: capability.transport.headers, scope: "dynamic" };
948386
+ const staged = await prefetchAllMcpResources({ [IDE_MCP_SERVER]: config13 });
948387
+ const client10 = staged.clients.find((value) => value.name === IDE_MCP_SERVER && value.type === "connected");
948388
+ if (!client10) {
948389
+ setIdeMcpPolicy(policy.generation, policy.tools);
948390
+ sendControlResponseSuccess(msg, { generation: capability.generation, accepted: false, tools: [], errors: ["connection_failed"] });
948391
+ } else {
948392
+ const previous = ideMcpState;
948393
+ const accepted = staged.tools.map((tool) => tool.mcpInfo?.toolName).filter((name3) => !!name3);
948394
+ ideMcpState = { generation: capability.generation, config: config13, client: client10, tools: staged.tools };
948395
+ sendControlResponseSuccess(msg, { generation: capability.generation, accepted: true, tools: accepted, errors: [] });
948396
+ if (previous.client?.type === "connected")
948397
+ await previous.client.cleanup();
948398
+ if (previous.config)
948399
+ await clearServerCache(IDE_MCP_SERVER, previous.config);
948400
+ }
948401
+ } else if (msg.request.subtype === "ide_mcp_clear") {
948402
+ const generation2 = msg.request.generation;
948403
+ const cleared = ideMcpState.generation === generation2 && clearIdeMcpPolicy(generation2);
948404
+ if (cleared) {
948405
+ const previous = ideMcpState;
948406
+ ideMcpState = { tools: [] };
948407
+ if (previous.client?.type === "connected")
948408
+ await previous.client.cleanup();
948409
+ if (previous.config)
948410
+ await clearServerCache(IDE_MCP_SERVER, previous.config);
948411
+ }
948412
+ sendControlResponseSuccess(msg, { generation: generation2, cleared });
948205
948413
  } else if (msg.request.subtype === "reload_plugins") {
948206
948414
  try {
948207
948415
  if (false) {}
@@ -949677,6 +949885,8 @@ var init_print = __esm(() => {
949677
949885
  init_hooks5();
949678
949886
  init_types16();
949679
949887
  init_mcpStringUtils();
949888
+ init_idePolicy();
949889
+ init_ideCapability();
949680
949890
  init_utils13();
949681
949891
  init_vscodeSdkMcp();
949682
949892
  init_config5();
@@ -950818,7 +951028,7 @@ async function startMCPServer(cwd3, debug5, verbose) {
950818
951028
  setCwd(cwd3);
950819
951029
  const server2 = new Server({
950820
951030
  name: "claude/tengu",
950821
- version: "4.2.35-beta"
951031
+ version: "4.2.36"
950822
951032
  }, {
950823
951033
  capabilities: {
950824
951034
  tools: {}
@@ -950915,8 +951125,8 @@ async function startMCPServer(cwd3, debug5, verbose) {
950915
951125
  }
950916
951126
  });
950917
951127
  async function runServer() {
950918
- const transport = new StdioServerTransport;
950919
- await server2.connect(transport);
951128
+ const transport2 = new StdioServerTransport;
951129
+ await server2.connect(transport2);
950920
951130
  }
950921
951131
  return await runServer();
950922
951132
  }
@@ -953103,7 +953313,7 @@ function createHealthRoutes(sessionManager) {
953103
953313
  const uptime2 = process.uptime() * 1000;
953104
953314
  return c10.json({
953105
953315
  status: "ok",
953106
- version: "4.2.35-beta",
953316
+ version: "4.2.36",
953107
953317
  uptime_ms: Math.round(uptime2),
953108
953318
  active_sessions: sessionManager.getActiveCount()
953109
953319
  });
@@ -953375,7 +953585,7 @@ function getMacroDefines() {
953375
953585
  commit = execSync3("git rev-parse --short HEAD", { encoding: "utf-8", cwd: __dirname }).trim();
953376
953586
  } catch {}
953377
953587
  return {
953378
- "MACRO.VERSION": JSON.stringify("4.2.35-beta"),
953588
+ "MACRO.VERSION": JSON.stringify("4.2.36"),
953379
953589
  "MACRO.BUILD_TIME": JSON.stringify(new Date().toISOString()),
953380
953590
  "MACRO.COMMIT": JSON.stringify(commit),
953381
953591
  "MACRO.FEEDBACK_CHANNEL": JSON.stringify(""),
@@ -954323,6 +954533,7 @@ function createSessionRoutes(sessionManager, eventBus) {
954323
954533
  resumeSessionAt: body.resume_session_at,
954324
954534
  hooks: body.hooks,
954325
954535
  env: env9,
954536
+ client: c10.req.header("x-csc-session-client"),
954326
954537
  execPath: process.execPath,
954327
954538
  scriptArgs: getScriptArgsForChild()
954328
954539
  });
@@ -954349,6 +954560,7 @@ function createSessionRoutes(sessionManager, eventBus) {
954349
954560
  const limit2 = parseInt(url5.searchParams.get("limit") ?? "50", 10);
954350
954561
  const offset = parseInt(url5.searchParams.get("offset") ?? "0", 10);
954351
954562
  const headerDir = c10.req.header("x-csc-directory");
954563
+ const client10 = c10.req.header("x-csc-session-client");
954352
954564
  const dir = (headerDir ? decodeURIComponent(headerDir) : undefined) ?? url5.searchParams.get("dir") ?? undefined;
954353
954565
  const canonicalDir = dir ? await canonicalizePath(dir).catch(() => dir) : undefined;
954354
954566
  let historySessions = [];
@@ -954356,7 +954568,10 @@ function createSessionRoutes(sessionManager, eventBus) {
954356
954568
  historySessions = await listSessionsImpl({ dir, limit: limit2 + offset });
954357
954569
  } catch {}
954358
954570
  const handleMap = new Map(sessionManager.getAllSessions().map((h8) => [h8.sessionId, h8]));
954359
- const merged = historySessions.map((s) => {
954571
+ const entries = sessionManager.getIndexEntries();
954572
+ const indexMap = new Map(entries.map((entry) => [entry.sessionId, entry]));
954573
+ const owned = (id) => !client10 || handleMap.get(id)?.client === client10 || indexMap.get(id)?.client === client10;
954574
+ const merged = historySessions.filter((s) => owned(s.sessionId)).map((s) => {
954360
954575
  const handle = handleMap.get(s.sessionId);
954361
954576
  const info2 = handle?.getInfo();
954362
954577
  return {
@@ -954388,6 +954603,8 @@ function createSessionRoutes(sessionManager, eventBus) {
954388
954603
  for (const handle of sessionManager.getAllSessions()) {
954389
954604
  if (!handle.prompted)
954390
954605
  continue;
954606
+ if (!owned(handle.sessionId))
954607
+ continue;
954391
954608
  if (!historyIds.has(handle.sessionId)) {
954392
954609
  if (canonicalDir) {
954393
954610
  const handleCwd = await canonicalizePath(handle.cwd).catch(() => handle.cwd);
@@ -954404,9 +954621,11 @@ function createSessionRoutes(sessionManager, eventBus) {
954404
954621
  historyIds.add(handle.sessionId);
954405
954622
  }
954406
954623
  }
954407
- for (const entry of sessionManager.getIndexEntries()) {
954624
+ for (const entry of entries) {
954408
954625
  if (historyIds.has(entry.sessionId))
954409
954626
  continue;
954627
+ if (!owned(entry.sessionId))
954628
+ continue;
954410
954629
  if (canonicalDir) {
954411
954630
  const entryCwd = await canonicalizePath(entry.cwd).catch(() => entry.cwd);
954412
954631
  if (entryCwd !== canonicalDir)
@@ -954605,7 +954824,9 @@ function createSessionRoutes(sessionManager, eventBus) {
954605
954824
  if (!transcriptPath) {
954606
954825
  for (const projectsDir of getAllProjectsDirs()) {
954607
954826
  try {
954608
- const dirents = await readdir55(projectsDir, { withFileTypes: true });
954827
+ const dirents = await readdir55(projectsDir, {
954828
+ withFileTypes: true
954829
+ });
954609
954830
  for (const dirent of dirents) {
954610
954831
  if (!dirent.isDirectory())
954611
954832
  continue;
@@ -957673,6 +957894,38 @@ var init_config13 = __esm(() => {
957673
957894
  DEFAULT_OUTPUT_STYLE_OPTIONS = ["default", "Explanatory", "Learning"];
957674
957895
  });
957675
957896
 
957897
+ // src/server/routes/ideCapability.ts
957898
+ function createIdeCapabilityRoutes(manager3) {
957899
+ return new Hono2().put("/session/:sessionID/capabilities/ide", async (c10) => {
957900
+ const handle = manager3.getSession(c10.req.param("sessionID"));
957901
+ if (!handle)
957902
+ return c10.json({ error: "Session not found" }, 404);
957903
+ const parsed = IdeCapabilitySchema().safeParse(await c10.req.json().catch(() => null));
957904
+ if (!parsed.success)
957905
+ return c10.json({ error: parsed.error.message }, 400);
957906
+ try {
957907
+ return c10.json(await handle.setIdeCapability(parsed.data));
957908
+ } catch (error100) {
957909
+ return c10.json({ error: error100 instanceof Error ? error100.message : String(error100) }, 502);
957910
+ }
957911
+ }).delete("/session/:sessionID/capabilities/ide", async (c10) => {
957912
+ const generation2 = c10.req.query("generation");
957913
+ if (!generation2)
957914
+ return c10.json({ error: "generation is required" }, 400);
957915
+ if (!manager3.getSession(c10.req.param("sessionID")))
957916
+ return c10.json({ generation: generation2, cleared: false });
957917
+ try {
957918
+ return c10.json(await manager3.getSession(c10.req.param("sessionID")).clearIdeCapability(generation2));
957919
+ } catch (error100) {
957920
+ return c10.json({ error: error100 instanceof Error ? error100.message : String(error100) }, 502);
957921
+ }
957922
+ });
957923
+ }
957924
+ var init_ideCapability2 = __esm(() => {
957925
+ init_dist17();
957926
+ init_ideCapability();
957927
+ });
957928
+
957676
957929
  // src/server/server.ts
957677
957930
  var exports_server = {};
957678
957931
  __export(exports_server, {
@@ -957706,6 +957959,7 @@ function startServer(config13, sessionManager, eventBus) {
957706
957959
  app.route("/", createFindRoutes());
957707
957960
  app.route("/", createFavoriteRoutes());
957708
957961
  app.route("/", createConfigRoutes({ initDataProvider: sessionManager }));
957962
+ app.route("/", createIdeCapabilityRoutes(sessionManager));
957709
957963
  const server2 = Bun.serve({
957710
957964
  hostname: config13.host,
957711
957965
  port: config13.port,
@@ -957730,6 +957984,7 @@ var init_server5 = __esm(() => {
957730
957984
  init_find();
957731
957985
  init_favorite2();
957732
957986
  init_config13();
957987
+ init_ideCapability2();
957733
957988
  });
957734
957989
 
957735
957990
  // src/server/eventBus.ts
@@ -958104,6 +958359,7 @@ var init_sessionHandle = __esm(() => {
958104
958359
  return this._sessionId;
958105
958360
  }
958106
958361
  cwd;
958362
+ client;
958107
958363
  _silent;
958108
958364
  _prompted = false;
958109
958365
  _spawnCwd;
@@ -958270,6 +958526,7 @@ var init_sessionHandle = __esm(() => {
958270
958526
  this.opts = opts;
958271
958527
  this._sessionId = opts.sessionId;
958272
958528
  this.cwd = opts.cwd;
958529
+ this.client = opts.client;
958273
958530
  this._silent = opts.silent ?? false;
958274
958531
  this.eventBus = opts.eventBus;
958275
958532
  this._model = opts.model;
@@ -958719,6 +958976,25 @@ ${stderrTail}` : baseMessage;
958719
958976
  const response3 = await this.sendControlRequest({ subtype: "mcp_status" });
958720
958977
  return response3.mcpServers ?? [];
958721
958978
  }
958979
+ async setIdeCapability(input5) {
958980
+ const response3 = await this.sendControlRequest({
958981
+ subtype: "ide_mcp_set",
958982
+ capability: input5
958983
+ });
958984
+ return {
958985
+ generation: input5.generation,
958986
+ accepted: response3.accepted === true,
958987
+ tools: Array.isArray(response3.tools) ? response3.tools : [],
958988
+ errors: Array.isArray(response3.errors) ? response3.errors : []
958989
+ };
958990
+ }
958991
+ async clearIdeCapability(generation2) {
958992
+ const response3 = await this.sendControlRequest({
958993
+ subtype: "ide_mcp_clear",
958994
+ generation: generation2
958995
+ });
958996
+ return { generation: generation2, cleared: response3.cleared === true };
958997
+ }
958722
958998
  async prompt(content, opts) {
958723
958999
  if (this._status === "stopped") {
958724
959000
  throw new Error(`Session ${this.sessionId} is stopped`);
@@ -959158,7 +959434,8 @@ class SessionManager {
959158
959434
  permissionMode: info2.permission_mode,
959159
959435
  createdAt: info2.created_at,
959160
959436
  lastActiveAt: info2.last_active_at,
959161
- customTitle: handle.title
959437
+ customTitle: handle.title,
959438
+ client: handle.client
959162
959439
  };
959163
959440
  }
959164
959441
  reapHandle(handle) {
@@ -959350,6 +959627,7 @@ class SessionManager {
959350
959627
  }
959351
959628
  const realSessionId = warm.sessionId;
959352
959629
  warm.claimFromWarmPool();
959630
+ warm.client = opts.client;
959353
959631
  this.sessions.set(realSessionId, warm);
959354
959632
  this.eventBus.registerSessionCwd(realSessionId, canonicalCwd);
959355
959633
  this.eventBus.publishSessionEvent(realSessionId, "created", {
@@ -959380,6 +959658,7 @@ class SessionManager {
959380
959658
  scriptArgs: opts.scriptArgs,
959381
959659
  silent: opts.silent,
959382
959660
  customTitle: this.loadedIndex.get(sessionId2)?.customTitle,
959661
+ client: opts.client ?? this.loadedIndex.get(sessionId2)?.client,
959383
959662
  onInit: (data) => {
959384
959663
  this._cachedInitData = data;
959385
959664
  this._resolveInitDataReady?.();
@@ -960444,7 +960723,7 @@ __export(exports_update, {
960444
960723
  });
960445
960724
  async function update() {
960446
960725
  logEvent("tengu_update_check", {});
960447
- writeToStdout(`${t("cli.update.currentVersion", "Current version")}: ${"4.2.35-beta"}
960726
+ writeToStdout(`${t("cli.update.currentVersion", "Current version")}: ${"4.2.36"}
960448
960727
  `);
960449
960728
  const channel5 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
960450
960729
  writeToStdout(`${t("cli.update.checkingUpdates", { channel: channel5 }, "Checking for updates to {channel} version...")}
@@ -960519,8 +960798,8 @@ async function update() {
960519
960798
  writeToStdout(`${t("cli.update.managedByHomebrew", "CoStrict is managed by Homebrew.")}
960520
960799
  `);
960521
960800
  const latest = await getLatestVersion(channel5);
960522
- if (latest && !gte2("4.2.35-beta", latest)) {
960523
- writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.35-beta", latest }, "Update available: {current} \u2192 {latest}")}
960801
+ if (latest && !gte2("4.2.36", latest)) {
960802
+ writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.36", latest }, "Update available: {current} \u2192 {latest}")}
960524
960803
  `);
960525
960804
  writeToStdout(`
960526
960805
  `);
@@ -960536,8 +960815,8 @@ async function update() {
960536
960815
  writeToStdout(`${t("cli.update.managedByWinget", "CoStrict is managed by winget.")}
960537
960816
  `);
960538
960817
  const latest = await getLatestVersion(channel5);
960539
- if (latest && !gte2("4.2.35-beta", latest)) {
960540
- writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.35-beta", latest }, "Update available: {current} \u2192 {latest}")}
960818
+ if (latest && !gte2("4.2.36", latest)) {
960819
+ writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.36", latest }, "Update available: {current} \u2192 {latest}")}
960541
960820
  `);
960542
960821
  writeToStdout(`
960543
960822
  `);
@@ -960553,8 +960832,8 @@ async function update() {
960553
960832
  writeToStdout(`${t("cli.update.managedByApk", "CoStrict is managed by apk.")}
960554
960833
  `);
960555
960834
  const latest = await getLatestVersion(channel5);
960556
- if (latest && !gte2("4.2.35-beta", latest)) {
960557
- writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.35-beta", latest }, "Update available: {current} \u2192 {latest}")}
960835
+ if (latest && !gte2("4.2.36", latest)) {
960836
+ writeToStdout(`${t("cli.update.updateAvailable", { current: "4.2.36", latest }, "Update available: {current} \u2192 {latest}")}
960558
960837
  `);
960559
960838
  writeToStdout(`
960560
960839
  `);
@@ -960619,11 +960898,11 @@ async function update() {
960619
960898
  `);
960620
960899
  await gracefulShutdown(1);
960621
960900
  }
960622
- if (result2.latestVersion === "4.2.35-beta") {
960623
- writeToStdout(source_default.green(t("cli.update.upToDateVersion", { version: "4.2.35-beta" }, "CoStrict is up to date ({version})")) + `
960901
+ if (result2.latestVersion === "4.2.36") {
960902
+ writeToStdout(source_default.green(t("cli.update.upToDateVersion", { version: "4.2.36" }, "CoStrict is up to date ({version})")) + `
960624
960903
  `);
960625
960904
  } else {
960626
- writeToStdout(source_default.green(t("cli.update.successfullyUpdated", { from: "4.2.35-beta", to: String(result2.latestVersion) }, "Successfully updated from {from} to version {to}")) + `
960905
+ writeToStdout(source_default.green(t("cli.update.successfullyUpdated", { from: "4.2.36", to: String(result2.latestVersion) }, "Successfully updated from {from} to version {to}")) + `
960627
960906
  `);
960628
960907
  regenerateCompletionCache();
960629
960908
  }
@@ -960683,12 +960962,12 @@ async function update() {
960683
960962
  `);
960684
960963
  await gracefulShutdown(1);
960685
960964
  }
960686
- if (latestVersion === "4.2.35-beta") {
960687
- writeToStdout(source_default.green(t("cli.update.upToDateVersion", { version: "4.2.35-beta" }, "CoStrict is up to date ({version})")) + `
960965
+ if (latestVersion === "4.2.36") {
960966
+ writeToStdout(source_default.green(t("cli.update.upToDateVersion", { version: "4.2.36" }, "CoStrict is up to date ({version})")) + `
960688
960967
  `);
960689
960968
  await gracefulShutdown(0);
960690
960969
  }
960691
- writeToStdout(`${t("cli.update.newVersionAvailable", { latest: String(latestVersion), current: "4.2.35-beta" }, "New version available: {latest} (current: {current})")}
960970
+ writeToStdout(`${t("cli.update.newVersionAvailable", { latest: String(latestVersion), current: "4.2.36" }, "New version available: {latest} (current: {current})")}
960692
960971
  `);
960693
960972
  writeToStdout(`${t("cli.update.installing", "Installing update...")}
960694
960973
  `);
@@ -960733,7 +961012,7 @@ async function update() {
960733
961012
  logForDebugging(`update: Installation status: ${result.status}`);
960734
961013
  switch (result.status) {
960735
961014
  case "success":
960736
- writeToStdout(source_default.green(t("cli.update.successfullyUpdated", { from: "4.2.35-beta", to: String(latestVersion) }, "Successfully updated from {from} to version {to}")) + `
961015
+ writeToStdout(source_default.green(t("cli.update.successfullyUpdated", { from: "4.2.36", to: String(latestVersion) }, "Successfully updated from {from} to version {to}")) + `
960737
961016
  `);
960738
961017
  regenerateCompletionCache();
960739
961018
  break;
@@ -962028,9 +962307,9 @@ async function run5() {
962028
962307
  return Number.isFinite(n3) ? n3 : undefined;
962029
962308
  }).hideHelp()).addOption(new Option("--from-pr [value]", cliDesc("cli.option.fromPr", "Resume a session linked to a PR by PR number/URL, or open interactive picker with optional search term")).argParser((value) => value || true).hideHelp()).addOption(new Option("--no-session-persistence", cliDesc("cli.option.noSessionPersistence", "Disable session persistence - sessions will not be saved to disk and cannot be resumed (only works with --print)")).hideHelp()).addOption(new Option("--resume-session-at <message id>", cliDesc("cli.option.resumeSessionAt", "When resuming, only messages up to and including the assistant message with <message.id> (use with --resume in print mode)")).argParser(String).hideHelp()).addOption(new Option("--rewind-files <user-message-id>", cliDesc("cli.option.rewindFiles", "Restore files to state at the specified user message and exit (requires --resume)")).hideHelp()).option("--model <model>", cliDesc("cli.option.model", `Model for the current session. Provide a model's full name (e.g. 'GLM-5.1').`)).addOption(new Option("--effort <level>", cliDesc("cli.option.effortArg", "Effort level for the current session (low, medium, high, max)")).argParser((rawValue) => {
962030
962309
  const value = rawValue.toLowerCase();
962031
- const allowed = ["low", "medium", "high", "max"];
962032
- if (!allowed.includes(value)) {
962033
- throw new InvalidArgumentError(`It must be one of: ${allowed.join(", ")}`);
962310
+ const allowed2 = ["low", "medium", "high", "max"];
962311
+ if (!allowed2.includes(value)) {
962312
+ throw new InvalidArgumentError(`It must be one of: ${allowed2.join(", ")}`);
962034
962313
  }
962035
962314
  return value;
962036
962315
  }).hideHelp()).option("--agent <agent>", cliDesc("cli.option.agent", `Agent for the current session. Overrides the 'agent' setting.`)).addOption(new Option("--betas <betas...>", cliDesc("cli.option.betas", "Beta headers to include in API requests (API key users only)")).hideHelp()).addOption(new Option("--fallback-model <model>", cliDesc("cli.option.fallbackModel", "Enable automatic fallback to specified model when default model is overloaded (only works with --print)")).hideHelp()).addOption(new Option("--workload <tag>", cliDesc("cli.option.workload", "Workload tag for billing-header attribution (cc_workload). Process-scoped; set by SDK daemon callers that spawn subprocesses for cron work. (only works with --print)")).hideHelp()).option("--settings <file-or-json>", cliDesc("cli.option.settings", "Path to a settings JSON file or a JSON string to load additional settings from")).option("--add-dir <directories...>", cliDesc("cli.option.addDir", "Additional directories to allow tool access to")).addOption(new Option("--ide", cliDesc("cli.option.ide", "Automatically connect to IDE on startup if exactly one valid IDE is available")).argParser(() => true).hideHelp()).addOption(new Option("--strict-mcp-config", cliDesc("cli.option.strictMcpConfig", "Only use MCP servers from --mcp-config, ignoring all other MCP configurations")).argParser(() => true).hideHelp()).addOption(new Option("--session-id <uuid>", cliDesc("cli.option.sessionIdArg", "Use a specific session ID for the conversation (must be a valid UUID)")).hideHelp()).addOption(new Option("-n, --name <name>", cliDesc("cli.option.name", "Set a display name for this session (shown in /resume and terminal title)")).hideHelp()).addOption(new Option("--agents <json>", cliDesc("cli.option.agents", `JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}')`)).hideHelp()).addOption(new Option("--setting-sources <sources>", cliDesc("cli.option.settingSources", "Comma-separated list of setting sources to load (user, project, local).")).hideHelp()).addOption(new Option("--plugin-dir <path>", cliDesc("cli.option.pluginDir", "Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B)")).argParser((val, prev) => [...prev, val]).default([]).hideHelp()).addOption(new Option("-H, --header <header>", cliDesc("cli.option.header", 'Add a custom HTTP header to model API requests, format "Name: Value" (repeatable: -H "X-API-Key: sk-..." -H "X-Task-Id: task-..."). Also configurable via the COSTRICT_CUSTOM_HEADERS env var')).argParser((val, prev) => [...prev, val]).default([])).addOption(new Option("--disable-slash-commands", cliDesc("cli.option.disableSlashCommands", "Disable all skills")).argParser(() => true).hideHelp()).addOption(new Option("--chrome", cliDesc("cli.option.chrome", "Enable Chrome MCP integration")).hideHelp()).addOption(new Option("--no-chrome", cliDesc("cli.option.noChrome", "Disable Chrome MCP integration")).hideHelp()).addOption(new Option("--file <specs...>", cliDesc("cli.option.file", "File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png)")).hideHelp()).action(async (prompt, options) => {
@@ -962380,13 +962659,13 @@ ${addendum}` : addendum;
962380
962659
  ...config13,
962381
962660
  scope: "dynamic"
962382
962661
  }));
962383
- const { allowed, blocked } = filterMcpServersByPolicy(scopedConfigs);
962662
+ const { allowed: allowed2, blocked } = filterMcpServersByPolicy(scopedConfigs);
962384
962663
  if (blocked.length > 0) {
962385
962664
  process.stderr.write(cliDesc("errors.cli.mcpBlockedByPolicy", `Warning: MCP ${plural(blocked.length, "server")} blocked by enterprise policy: ${blocked.join(", ")}
962386
962665
  `).replace("{serverOrServers}", plural(blocked.length, "server")).replace("{servers}", blocked.join(", ")));
962387
962666
  }
962388
- dynamicMcpConfig = { ...dynamicMcpConfig, ...allowed };
962389
- const dynamicServerNames = Object.keys(allowed);
962667
+ dynamicMcpConfig = { ...dynamicMcpConfig, ...allowed2 };
962668
+ const dynamicServerNames = Object.keys(allowed2);
962390
962669
  logForDebugging(`[MCP] Loaded ${dynamicServerNames.length} dynamic server(s) from --mcp-config: ${dynamicServerNames.length > 0 ? dynamicServerNames.join(", ") : "(none)"}`, { level: "info" });
962391
962670
  }
962392
962671
  } else {
@@ -962952,7 +963231,7 @@ ${assistantAddendum}` : assistantAddendum;
962952
963231
  }
962953
963232
  }
962954
963233
  logForDiagnosticsNoPII("info", "started", {
962955
- version: "4.2.35-beta",
963234
+ version: "4.2.36",
962956
963235
  is_native_binary: isInBundledMode()
962957
963236
  });
962958
963237
  registerCleanup(async () => {
@@ -963443,7 +963722,7 @@ Session: ${directConnectConfig.sessionId}`, "info");
963443
963722
  sshSession = await createSSHSession2({
963444
963723
  host: _pendingSSH.host,
963445
963724
  cwd: _pendingSSH.cwd,
963446
- localVersion: "4.2.35-beta",
963725
+ localVersion: "4.2.36",
963447
963726
  permissionMode: _pendingSSH.permissionMode,
963448
963727
  dangerouslySkipPermissions: _pendingSSH.dangerouslySkipPermissions,
963449
963728
  extraCliArgs: _pendingSSH.extraCliArgs,
@@ -963912,7 +964191,7 @@ Usage: csc --remote "your task description"`, () => gracefulShutdown(1));
963912
964191
  pendingHookMessages
963913
964192
  }, renderAndRun);
963914
964193
  }
963915
- }).version("4.2.35-beta (CoStrict)", "-v, --version", cliDesc("cli.option.version", "Output the version number"));
964194
+ }).version("4.2.36 (CoStrict)", "-v, --version", cliDesc("cli.option.version", "Output the version number"));
963916
964195
  program2.addOption(new Option("-w, --worktree [name]", cliDesc("cli.option.worktree", "Create a new git worktree for this session (optionally specify a name)")).hideHelp());
963917
964196
  program2.addOption(new Option("--tmux", cliDesc("cli.option.tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.")).hideHelp());
963918
964197
  if (canUserConfigureAdvisor()) {
@@ -964681,10 +964960,10 @@ function getCouncilArgs(args) {
964681
964960
  async function main2() {
964682
964961
  const args = process.argv.slice(2);
964683
964962
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
964684
- const d7 = new Date("2026-09-04T04:53:07.130Z");
964963
+ const d7 = new Date("2026-09-07T00:23:46.056Z");
964685
964964
  const p2 = (n3) => String(n3).padStart(2, "0");
964686
964965
  const buildTime = `${d7.getFullYear()}/${p2(d7.getMonth() + 1)}/${p2(d7.getDate())} ${p2(d7.getHours())}:${p2(d7.getMinutes())}:${p2(d7.getSeconds())}`;
964687
- console.log(`${"4.2.35-beta"} (commit: ${"f243e5706"}, built: ${buildTime})`);
964966
+ console.log(`${"4.2.36"} (commit: ${"224bdf6c8"}, built: ${buildTime})`);
964688
964967
  return;
964689
964968
  }
964690
964969
  if (true) {
@@ -964865,5 +965144,5 @@ async function main2() {
964865
965144
  }
964866
965145
  main2();
964867
965146
 
964868
- //# debugId=6FB12E947DA5D84364756E2164756E21
965147
+ //# debugId=2269F0D79FA1004A64756E2164756E21
964869
965148