@costrict/csc 4.2.1 → 4.2.2-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -28107,6 +28107,9 @@ var init_App = __esm(() => {
28107
28107
  if (this.props.stdout.isTTY && !isEnvTruthy3(process.env.CLAUDE_CODE_ACCESSIBILITY)) {
28108
28108
  this.props.stdout.write(HIDE_CURSOR);
28109
28109
  }
28110
+ if (SUPPORTS_SUSPEND) {
28111
+ process.on("SIGTSTP", this.handleSuspend);
28112
+ }
28110
28113
  }
28111
28114
  componentWillUnmount() {
28112
28115
  if (this.props.stdout.isTTY) {
@@ -28127,6 +28130,9 @@ var init_App = __esm(() => {
28127
28130
  this.props.stdin.unref();
28128
28131
  } catch {}
28129
28132
  }
28133
+ if (SUPPORTS_SUSPEND) {
28134
+ process.removeListener("SIGTSTP", this.handleSuspend);
28135
+ }
28130
28136
  }
28131
28137
  componentDidCatch(error2) {
28132
28138
  this.handleExit(error2);
@@ -28266,9 +28272,20 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
28266
28272
  return;
28267
28273
  }
28268
28274
  const rawModeCountBeforeSuspend = this.rawModeEnabledCount;
28269
- while (this.rawModeEnabledCount > 0) {
28270
- this.handleSetRawMode(false);
28275
+ if (this.rawModeEnabledCount > 0) {
28276
+ const { stdin } = this.props;
28277
+ if (this.rawModeActive) {
28278
+ this.props.stdout.write(DISABLE_MODIFY_OTHER_KEYS);
28279
+ this.props.stdout.write(DISABLE_KITTY_KEYBOARD);
28280
+ this.props.stdout.write(DFE);
28281
+ this.props.stdout.write(DBP);
28282
+ stdin.setRawMode(false);
28283
+ this.rawModeActive = false;
28284
+ }
28285
+ stdin.removeListener("readable", this.handleReadable);
28286
+ stdin.unref();
28271
28287
  }
28288
+ this.rawModeEnabledCount = 0;
28272
28289
  if (this.props.stdout.isTTY) {
28273
28290
  this.props.stdout.write(SHOW_CURSOR + DFE + DISABLE_MOUSE_TRACKING);
28274
28291
  }
@@ -82960,8 +82977,8 @@ var init_credentials = __esm(() => {
82960
82977
  import { createRequire } from "module";
82961
82978
  function getVersion() {
82962
82979
  try {
82963
- if (typeof MACRO !== "undefined" && "4.2.1")
82964
- return "4.2.1";
82980
+ if (typeof MACRO !== "undefined" && "4.2.2-beta")
82981
+ return "4.2.2-beta";
82965
82982
  } catch {}
82966
82983
  try {
82967
82984
  const require2 = createRequire(import.meta.url);
@@ -220004,7 +220021,7 @@ async function fetchCoStrictModels(baseUrl, accessToken) {
220004
220021
  headers: {
220005
220022
  Authorization: `Bearer ${accessToken}`,
220006
220023
  Accept: "application/json",
220007
- "User-Agent": `csc/${"4.2.1"}`
220024
+ "User-Agent": `csc/${"4.2.2-beta"}`
220008
220025
  },
220009
220026
  signal: controller.signal
220010
220027
  });
@@ -223590,7 +223607,7 @@ var init_auth7 = __esm(() => {
223590
223607
 
223591
223608
  // src/utils/userAgent.ts
223592
223609
  function getClaudeCodeUserAgent() {
223593
- return `costrict/${"4.2.1"}`;
223610
+ return `costrict/${"4.2.2-beta"}`;
223594
223611
  }
223595
223612
 
223596
223613
  // src/utils/workloadContext.ts
@@ -223612,7 +223629,7 @@ function getUserAgent() {
223612
223629
  const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
223613
223630
  const workload = getWorkload();
223614
223631
  const workloadSuffix = workload ? `, workload/${workload}` : "";
223615
- return `csc/${"4.2.1"}`;
223632
+ return `csc/${"4.2.2-beta"}`;
223616
223633
  }
223617
223634
  function getMCPUserAgent() {
223618
223635
  const parts = [];
@@ -223626,7 +223643,7 @@ function getMCPUserAgent() {
223626
223643
  parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
223627
223644
  }
223628
223645
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
223629
- return `csc/${"4.2.1"}${suffix}`;
223646
+ return `csc/${"4.2.2-beta"}${suffix}`;
223630
223647
  }
223631
223648
  function getWebFetchUserAgent() {
223632
223649
  return `Claude-User (${getClaudeCodeUserAgent()}; +https://support.anthropic.com/)`;
@@ -223746,7 +223763,7 @@ var init_user = __esm(() => {
223746
223763
  deviceId,
223747
223764
  sessionId: getSessionId(),
223748
223765
  email: getEmail(),
223749
- appVersion: "4.2.1",
223766
+ appVersion: "4.2.2-beta",
223750
223767
  platform: getHostPlatformForAnalytics(),
223751
223768
  organizationUuid,
223752
223769
  accountUuid,
@@ -233246,7 +233263,7 @@ var init_metadata = __esm(() => {
233246
233263
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
233247
233264
  WHITESPACE_REGEX = /\s+/;
233248
233265
  getVersionBase = memoize_default(() => {
233249
- const match = "4.2.1".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
233266
+ const match = "4.2.2-beta".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
233250
233267
  return match ? match[0] : undefined;
233251
233268
  });
233252
233269
  buildEnvContext = memoize_default(async () => {
@@ -233286,9 +233303,9 @@ var init_metadata = __esm(() => {
233286
233303
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
233287
233304
  isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
233288
233305
  isClaudeAiAuth: isClaudeAISubscriber(),
233289
- version: "4.2.1",
233306
+ version: "4.2.2-beta",
233290
233307
  versionBase: getVersionBase(),
233291
- buildTime: "2026-06-10T08:45:07.701Z",
233308
+ buildTime: "2026-06-12T06:58:59.329Z",
233292
233309
  deploymentEnvironment: env4.detectDeploymentEnvironment(),
233293
233310
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
233294
233311
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -233959,7 +233976,7 @@ function initialize1PEventLogging() {
233959
233976
  const platform4 = getPlatform();
233960
233977
  const attributes = {
233961
233978
  [import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
233962
- [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "4.2.1"
233979
+ [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "4.2.2-beta"
233963
233980
  };
233964
233981
  if (platform4 === "wsl") {
233965
233982
  const wslVersion = getWslVersion();
@@ -233986,7 +234003,7 @@ function initialize1PEventLogging() {
233986
234003
  })
233987
234004
  ]
233988
234005
  });
233989
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", "4.2.1");
234006
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", "4.2.2-beta");
233990
234007
  }
233991
234008
  async function reinitialize1PEventLoggingIfConfigChanged() {
233992
234009
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -401075,7 +401092,7 @@ function getTelemetryAttributes() {
401075
401092
  attributes["session.id"] = sessionId;
401076
401093
  }
401077
401094
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
401078
- attributes["app.version"] = "4.2.1";
401095
+ attributes["app.version"] = "4.2.2-beta";
401079
401096
  }
401080
401097
  const oauthAccount = getOauthAccountInfo();
401081
401098
  if (oauthAccount) {
@@ -434608,7 +434625,7 @@ function initLangfuse() {
434608
434625
  flushInterval: parseInt(process.env.LANGFUSE_FLUSH_INTERVAL ?? "10", 10),
434609
434626
  mask: maskFn,
434610
434627
  environment: process.env.LANGFUSE_TRACING_ENVIRONMENT ?? "development",
434611
- release: "4.2.1",
434628
+ release: "4.2.2-beta",
434612
434629
  exportMode: process.env.LANGFUSE_EXPORT_MODE ?? "batched",
434613
434630
  timeout: parseInt(process.env.LANGFUSE_TIMEOUT ?? "5", 10)
434614
434631
  });
@@ -466500,7 +466517,7 @@ function initSentry() {
466500
466517
  }
466501
466518
  init3({
466502
466519
  dsn,
466503
- release: typeof MACRO !== "undefined" ? "4.2.1" : undefined,
466520
+ release: typeof MACRO !== "undefined" ? "4.2.2-beta" : undefined,
466504
466521
  environment: typeof BUILD_ENV !== "undefined" ? BUILD_ENV : "production",
466505
466522
  maxBreadcrumbs: 20,
466506
466523
  sampleRate: 1,
@@ -494385,7 +494402,7 @@ async function initializeBetaTracing(resource) {
494385
494402
  });
494386
494403
  logs.setGlobalLoggerProvider(loggerProvider);
494387
494404
  setLoggerProvider(loggerProvider);
494388
- const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.1");
494405
+ const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.2-beta");
494389
494406
  setEventLogger(eventLogger);
494390
494407
  process.on("beforeExit", async () => {
494391
494408
  await loggerProvider?.forceFlush();
@@ -494425,7 +494442,7 @@ async function initializeTelemetry() {
494425
494442
  const platform5 = getPlatform();
494426
494443
  const baseAttributes = {
494427
494444
  [import_semantic_conventions29.ATTR_SERVICE_NAME]: "claude-code",
494428
- [import_semantic_conventions29.ATTR_SERVICE_VERSION]: "4.2.1"
494445
+ [import_semantic_conventions29.ATTR_SERVICE_VERSION]: "4.2.2-beta"
494429
494446
  };
494430
494447
  if (platform5 === "wsl") {
494431
494448
  const wslVersion = getWslVersion();
@@ -494470,7 +494487,7 @@ async function initializeTelemetry() {
494470
494487
  } catch {}
494471
494488
  };
494472
494489
  registerCleanup(shutdownTelemetry2);
494473
- return meterProvider2.getMeter("com.anthropic.claude_code", "4.2.1");
494490
+ return meterProvider2.getMeter("com.anthropic.claude_code", "4.2.2-beta");
494474
494491
  }
494475
494492
  const meterProvider = new import_sdk_metrics2.MeterProvider({
494476
494493
  resource,
@@ -494490,7 +494507,7 @@ async function initializeTelemetry() {
494490
494507
  });
494491
494508
  logs.setGlobalLoggerProvider(loggerProvider);
494492
494509
  setLoggerProvider(loggerProvider);
494493
- const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.1");
494510
+ const eventLogger = logs.getLogger("com.anthropic.claude_code.events", "4.2.2-beta");
494494
494511
  setEventLogger(eventLogger);
494495
494512
  logForDebugging("[3P telemetry] Event logger set successfully");
494496
494513
  process.on("beforeExit", async () => {
@@ -494552,7 +494569,7 @@ Current timeout: ${timeoutMs}ms
494552
494569
  }
494553
494570
  };
494554
494571
  registerCleanup(shutdownTelemetry);
494555
- return meterProvider.getMeter("com.anthropic.claude_code", "4.2.1");
494572
+ return meterProvider.getMeter("com.anthropic.claude_code", "4.2.2-beta");
494556
494573
  }
494557
494574
  async function flushTelemetry() {
494558
494575
  const meterProvider = getMeterProvider();
@@ -495609,7 +495626,7 @@ async function installGlobalPackage(specificVersion) {
495609
495626
  logError3(new AutoUpdaterError("Another process is currently installing an update"));
495610
495627
  logEvent("tengu_auto_updater_lock_contention", {
495611
495628
  pid: process.pid,
495612
- currentVersion: "4.2.1"
495629
+ currentVersion: "4.2.2-beta"
495613
495630
  });
495614
495631
  return { status: "in_progress" };
495615
495632
  }
@@ -495618,7 +495635,7 @@ async function installGlobalPackage(specificVersion) {
495618
495635
  if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
495619
495636
  logError3(new Error("Windows NPM detected in WSL environment"));
495620
495637
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
495621
- currentVersion: "4.2.1"
495638
+ currentVersion: "4.2.2-beta"
495622
495639
  });
495623
495640
  return {
495624
495641
  status: "install_failed",
@@ -496164,7 +496181,7 @@ function detectLinuxGlobPatternWarnings() {
496164
496181
  }
496165
496182
  async function getDoctorDiagnostic() {
496166
496183
  const installationType = await getCurrentInstallationType();
496167
- const version7 = typeof MACRO !== "undefined" ? "4.2.1" : "unknown";
496184
+ const version7 = typeof MACRO !== "undefined" ? "4.2.2-beta" : "unknown";
496168
496185
  const installationPath = await getInstallationPath();
496169
496186
  const invokedBinary = getInvokedBinary();
496170
496187
  const multipleInstallations = await detectMultipleInstallations();
@@ -534262,7 +534279,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
534262
534279
  const client10 = new Client3({
534263
534280
  name: "claude-code",
534264
534281
  title: "CoStrict",
534265
- version: "4.2.1",
534282
+ version: "4.2.2-beta",
534266
534283
  description: "CoStrict agentic coding tool",
534267
534284
  websiteUrl: PRODUCT_URL
534268
534285
  }, {
@@ -534632,7 +534649,7 @@ var init_client17 = __esm(() => {
534632
534649
  const client10 = new Client3({
534633
534650
  name: "claude-code",
534634
534651
  title: "CoStrict",
534635
- version: "4.2.1",
534652
+ version: "4.2.2-beta",
534636
534653
  description: "CoStrict agentic coding tool",
534637
534654
  websiteUrl: PRODUCT_URL
534638
534655
  }, {
@@ -536000,7 +536017,7 @@ function getInstallationEnv() {
536000
536017
  return;
536001
536018
  }
536002
536019
  function getClaudeCodeVersion() {
536003
- return "4.2.1";
536020
+ return "4.2.2-beta";
536004
536021
  }
536005
536022
  async function getInstalledVSCodeExtensionVersion(command4) {
536006
536023
  const { stdout } = await execFileNoThrow2(command4, ["--list-extensions", "--show-versions"], {
@@ -537364,8 +537381,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
537364
537381
  const maxVersion = await getMaxVersion();
537365
537382
  if (maxVersion && gt(version8, maxVersion)) {
537366
537383
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version8} to ${maxVersion}`);
537367
- if (gte2("4.2.1", maxVersion)) {
537368
- logForDebugging(`Native installer: current version ${"4.2.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
537384
+ if (gte2("4.2.2-beta", maxVersion)) {
537385
+ logForDebugging(`Native installer: current version ${"4.2.2-beta"} is already at or above maxVersion ${maxVersion}, skipping update`);
537369
537386
  logEvent("tengu_native_update_skipped_max_version", {
537370
537387
  latency_ms: Date.now() - startTime2,
537371
537388
  max_version: maxVersion,
@@ -537376,7 +537393,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
537376
537393
  version8 = maxVersion;
537377
537394
  }
537378
537395
  }
537379
- if (!forceReinstall && version8 === "4.2.1" && await versionIsAvailable(version8) && await isPossibleClaudeBinary(executablePath)) {
537396
+ if (!forceReinstall && version8 === "4.2.2-beta" && await versionIsAvailable(version8) && await isPossibleClaudeBinary(executablePath)) {
537380
537397
  logForDebugging(`Found ${version8} at ${executablePath}, skipping install`);
537381
537398
  logEvent("tengu_native_update_complete", {
537382
537399
  latency_ms: Date.now() - startTime2,
@@ -643952,9 +643969,21 @@ var init_timerWorker = __esm(() => {
643952
643969
  });
643953
643970
 
643954
643971
  // src/services/rawDump/batchWorker.ts
643972
+ function isParentAlive() {
643973
+ if (!IS_WORKER_PROCESS)
643974
+ return true;
643975
+ try {
643976
+ process.kill(PARENT_PID, 0);
643977
+ return true;
643978
+ } catch {
643979
+ return false;
643980
+ }
643981
+ }
643955
643982
  function startBatchWorker() {
643956
643983
  log11.info("batch worker started");
643957
- loadAllState().catch((err3) => {
643984
+ loadAllState().then(() => {
643985
+ stateLoaded = true;
643986
+ }).catch((err3) => {
643958
643987
  log11.error("failed to load state", {
643959
643988
  error: err3 instanceof Error ? err3.message : String(err3)
643960
643989
  });
@@ -643976,8 +644005,38 @@ function startBatchWorker() {
643976
644005
  }
643977
644006
  });
643978
644007
  startTimerWorker();
644008
+ startParentWatchdog();
643979
644009
  }
643980
- var log11, PARENT_PID, IS_WORKER_PROCESS, scriptPath3;
644010
+ function startParentWatchdog() {
644011
+ if (!IS_WORKER_PROCESS)
644012
+ return;
644013
+ const intervalMs = 5000;
644014
+ const maxParentGoneAliveMs = 60000;
644015
+ let parentGoneAt = null;
644016
+ setInterval(() => {
644017
+ if (isParentAlive()) {
644018
+ parentGoneAt = null;
644019
+ return;
644020
+ }
644021
+ if (parentGoneAt === null) {
644022
+ parentGoneAt = Date.now();
644023
+ }
644024
+ const goneMs = Date.now() - parentGoneAt;
644025
+ const canExitSafely = stateLoaded && state_task.incomplete === 0;
644026
+ const graceExpired = goneMs >= maxParentGoneAliveMs;
644027
+ if (canExitSafely || graceExpired) {
644028
+ log11.info("parent process gone, exiting batch worker", {
644029
+ parentPid: PARENT_PID,
644030
+ workerPid: process.pid,
644031
+ reason: canExitSafely ? "no incomplete tasks" : "grace period expired",
644032
+ goneMs,
644033
+ incompleteTasks: state_task.incomplete
644034
+ });
644035
+ process.exit(0);
644036
+ }
644037
+ }, intervalMs);
644038
+ }
644039
+ var log11, PARENT_PID, IS_WORKER_PROCESS, stateLoaded = false, scriptPath3;
643981
644040
  var init_batchWorker = __esm(() => {
643982
644041
  init_state4();
643983
644042
  init_worker();
@@ -646819,7 +646878,14 @@ function truncateHeadForPTLRetry(messages, ptlResponse) {
646819
646878
  return sliced;
646820
646879
  }
646821
646880
  function buildPostCompactMessages(result) {
646822
- return [result.boundaryMarker].concat(result.summaryMessages, stripToolUseResults(result.messagesToKeep), result.attachments, result.hookResults);
646881
+ const boundaryMarker = result.boundaryMarker.type === "system" && result.boundaryMarker.subtype === "compact_boundary" && typeof result.truePostCompactTokenCount === "number" ? {
646882
+ ...result.boundaryMarker,
646883
+ compactMetadata: {
646884
+ ...result.boundaryMarker.compactMetadata,
646885
+ postCompactTokens: result.truePostCompactTokenCount
646886
+ }
646887
+ } : result.boundaryMarker;
646888
+ return [boundaryMarker].concat(result.summaryMessages, stripToolUseResults(result.messagesToKeep), result.attachments, result.hookResults);
646823
646889
  }
646824
646890
  function stripToolUseResults(messages) {
646825
646891
  if (!messages)
@@ -671030,7 +671096,7 @@ function Feedback({
671030
671096
  platform: env4.platform,
671031
671097
  gitRepo: envInfo.isGit,
671032
671098
  terminal: env4.terminal,
671033
- version: "4.2.1",
671099
+ version: "4.2.2-beta",
671034
671100
  transcript: normalizeMessagesForAPI(messages),
671035
671101
  errors: sanitizedErrors,
671036
671102
  lastApiRequest: getLastAPIRequest(),
@@ -671215,7 +671281,7 @@ function Feedback({
671215
671281
  ", ",
671216
671282
  env4.terminal,
671217
671283
  ", v",
671218
- "4.2.1"
671284
+ "4.2.2-beta"
671219
671285
  ]
671220
671286
  })
671221
671287
  ]
@@ -671321,7 +671387,7 @@ ${sanitizedDescription}
671321
671387
  ` + `**Environment Info**
671322
671388
  ` + `- Platform: ${env4.platform}
671323
671389
  ` + `- Terminal: ${env4.terminal}
671324
- ` + `- Version: ${"4.2.1"}
671390
+ ` + `- Version: ${"4.2.2-beta"}
671325
671391
  ` + `- Feedback ID: ${feedbackId}
671326
671392
  ` + `
671327
671393
  **Errors**
@@ -673522,7 +673588,7 @@ function buildPrimarySection() {
673522
673588
  children: "/rename to add a name"
673523
673589
  });
673524
673590
  return [
673525
- { label: "Version", value: "4.2.1" },
673591
+ { label: "Version", value: "4.2.2-beta" },
673526
673592
  { label: "Session name", value: nameValue },
673527
673593
  { label: "Session ID", value: sessionId },
673528
673594
  { label: "cwd", value: getCwd() },
@@ -676326,7 +676392,7 @@ function Config({
676326
676392
  }
676327
676393
  })
676328
676394
  }) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime191.jsx(ChannelDowngradeDialog, {
676329
- currentVersion: "4.2.1",
676395
+ currentVersion: "4.2.2-beta",
676330
676396
  onChoice: (choice) => {
676331
676397
  setShowSubmenu(null);
676332
676398
  setTabsHidden(false);
@@ -676338,7 +676404,7 @@ function Config({
676338
676404
  autoUpdatesChannel: "stable"
676339
676405
  };
676340
676406
  if (choice === "stay") {
676341
- newSettings.minimumVersion = "4.2.1";
676407
+ newSettings.minimumVersion = "4.2.2-beta";
676342
676408
  }
676343
676409
  updateSettingsForSource("userSettings", newSettings);
676344
676410
  setSettingsData((prev) => ({
@@ -681788,7 +681854,7 @@ function HelpV2({ onClose, commands: commands11 }) {
681788
681854
  color: "professionalBlue",
681789
681855
  children: [
681790
681856
  /* @__PURE__ */ jsx_runtime218.jsx(Tabs, {
681791
- title: process.env.USER_TYPE === "sf" ? "/help" : `CoStrict v${"4.2.1"}`,
681857
+ title: process.env.USER_TYPE === "sf" ? "/help" : `CoStrict v${"4.2.2-beta"}`,
681792
681858
  color: "professionalBlue",
681793
681859
  defaultTab: "general",
681794
681860
  children: tabs
@@ -773368,7 +773434,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
773368
773434
  return [];
773369
773435
  }
773370
773436
  }
773371
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "4.2.1") {
773437
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "4.2.2-beta") {
773372
773438
  if (process.env.USER_TYPE === "sf") {
773373
773439
  const changelog = "";
773374
773440
  if (changelog) {
@@ -773395,7 +773461,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "4.2.1") {
773395
773461
  releaseNotes
773396
773462
  };
773397
773463
  }
773398
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "4.2.1") {
773464
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "4.2.2-beta") {
773399
773465
  if (process.env.USER_TYPE === "sf") {
773400
773466
  const changelog = "";
773401
773467
  if (changelog) {
@@ -775904,7 +775970,7 @@ function isNotLoggedIn() {
775904
775970
  return true;
775905
775971
  }
775906
775972
  function getLogoDisplayData() {
775907
- const version8 = process.env.DEMO_VERSION ?? "4.2.1";
775973
+ const version8 = process.env.DEMO_VERSION ?? "4.2.2-beta";
775908
775974
  const serverUrl = getDirectConnectServerUrl();
775909
775975
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
775910
775976
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -776427,7 +776493,7 @@ var cachedSystemTheme2;
776427
776493
  // src/components/matrix-tactical/MatrixWelcome.tsx
776428
776494
  import { basename as basename47 } from "path";
776429
776495
  function MatrixWelcome({
776430
- version: version8 = "4.2.1",
776496
+ version: version8 = "4.2.2-beta",
776431
776497
  projectName,
776432
776498
  cwd: cwd2,
776433
776499
  modelDisplayName,
@@ -777060,13 +777126,13 @@ function LogoV2() {
777060
777126
  const { hasReleaseNotes } = checkForReleaseNotesSync(config12.lastReleaseNotesSeen);
777061
777127
  import_react166.useEffect(() => {
777062
777128
  const currentConfig = getGlobalConfig();
777063
- if (currentConfig.lastReleaseNotesSeen === "4.2.1") {
777129
+ if (currentConfig.lastReleaseNotesSeen === "4.2.2-beta") {
777064
777130
  return;
777065
777131
  }
777066
777132
  saveGlobalConfig((current2) => {
777067
- if (current2.lastReleaseNotesSeen === "4.2.1")
777133
+ if (current2.lastReleaseNotesSeen === "4.2.2-beta")
777068
777134
  return current2;
777069
- return { ...current2, lastReleaseNotesSeen: "4.2.1" };
777135
+ return { ...current2, lastReleaseNotesSeen: "4.2.2-beta" };
777070
777136
  });
777071
777137
  if (showOnboarding) {
777072
777138
  incrementProjectOnboardingSeenCount();
@@ -788916,6 +788982,9 @@ function toSDKCompactMetadata(meta4) {
788916
788982
  return {
788917
788983
  trigger: meta4.trigger,
788918
788984
  pre_tokens: meta4.preTokens,
788985
+ ...typeof meta4.postCompactTokens === "number" && {
788986
+ post_compact_tokens: meta4.postCompactTokens
788987
+ },
788919
788988
  ...seg && {
788920
788989
  preserved_segment: {
788921
788990
  head_uuid: seg.headUuid,
@@ -788931,6 +789000,9 @@ function fromSDKCompactMetadata(meta4) {
788931
789000
  return {
788932
789001
  trigger: m4.trigger,
788933
789002
  preTokens: m4.pre_tokens,
789003
+ ...typeof m4.post_compact_tokens === "number" && {
789004
+ postCompactTokens: m4.post_compact_tokens
789005
+ },
788934
789006
  ...seg && {
788935
789007
  preservedSegment: {
788936
789008
  headUuid: seg.head_uuid,
@@ -798631,7 +798703,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
798631
798703
  smapsRollup,
798632
798704
  platform: process.platform,
798633
798705
  nodeVersion: process.version,
798634
- ccVersion: "4.2.1"
798706
+ ccVersion: "4.2.2-beta"
798635
798707
  };
798636
798708
  }
798637
798709
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -798746,7 +798818,7 @@ var init_mock_limits = __esm(() => {
798746
798818
  var call53 = async () => {
798747
798819
  return {
798748
798820
  type: "text",
798749
- value: `${"4.2.1"} (built ${"2026-06-10T08:45:07.701Z"})`
798821
+ value: `${"4.2.2-beta"} (built ${"2026-06-12T06:58:59.329Z"})`
798750
798822
  };
798751
798823
  }, version8, version_default;
798752
798824
  var init_version2 = __esm(() => {
@@ -805084,8 +805156,8 @@ var init_tag2 = __esm(() => {
805084
805156
  import { createRequire as createRequire5 } from "module";
805085
805157
  function getVersion2() {
805086
805158
  try {
805087
- if (typeof MACRO !== "undefined" && "4.2.1")
805088
- return "4.2.1";
805159
+ if (typeof MACRO !== "undefined" && "4.2.2-beta")
805160
+ return "4.2.2-beta";
805089
805161
  } catch {}
805090
805162
  try {
805091
805163
  const require4 = createRequire5(import.meta.url);
@@ -805367,11 +805439,14 @@ var init_skillChangeDetector = __esm(() => {
805367
805439
  var exports_favorite = {};
805368
805440
  __export(exports_favorite, {
805369
805441
  viewFavoriteItem: () => viewFavoriteItem,
805442
+ updateFavoriteItem: () => updateFavoriteItem,
805370
805443
  unloadFavoriteItem: () => unloadFavoriteItem,
805371
805444
  loadFavoriteItem: () => loadFavoriteItem,
805372
805445
  listFavoriteItems: () => listFavoriteItems,
805446
+ hasUpdate: () => hasUpdate,
805373
805447
  getHubSyncMode: () => getHubSyncMode,
805374
805448
  findOrphanedFavoriteItems: () => findOrphanedFavoriteItems,
805449
+ batchUpdateFavoriteItems: () => batchUpdateFavoriteItems,
805375
805450
  batchUnloadFavoriteItems: () => batchUnloadFavoriteItems,
805376
805451
  autoEnableCloudFavorites: () => autoEnableCloudFavorites
805377
805452
  });
@@ -805915,10 +805990,20 @@ async function listFavoriteItems(type) {
805915
805990
  continue;
805916
805991
  seen.add(item.slug);
805917
805992
  const local = state3.items[item.slug];
805993
+ let localVersion;
805994
+ if (local?.localPath) {
805995
+ try {
805996
+ const itemJsonText = await readFile71(path43.join(local.localPath, "item.json"), "utf-8");
805997
+ const itemJson = JSON.parse(itemJsonText);
805998
+ localVersion = typeof itemJson.version === "string" ? itemJson.version : undefined;
805999
+ } catch {}
806000
+ }
805918
806001
  result.push({
805919
806002
  ...item,
805920
806003
  status: deriveStatus(local, activeSkillSlugs, activeAgentNames, activeCommandNames, activeMcpNames),
805921
- localPath: local?.localPath
806004
+ localPath: local?.localPath,
806005
+ localVersion,
806006
+ hasUpdate: hasUpdate(item, localVersion)
805922
806007
  });
805923
806008
  }
805924
806009
  if (result.length === 0) {
@@ -805993,6 +806078,23 @@ async function autoEnableCloudFavorites() {
805993
806078
  await Promise.allSettled(toEnable.map((item) => loadFavoriteItem(item.slug)));
805994
806079
  } catch {}
805995
806080
  }
806081
+ function hasUpdate(item, localVersion) {
806082
+ if (!item.version || !localVersion)
806083
+ return false;
806084
+ return item.version !== localVersion;
806085
+ }
806086
+ async function updateFavoriteItem(slugOrId) {
806087
+ const remote = await getRemoteItem(slugOrId);
806088
+ const installed = await ensureInstalled(slugOrId);
806089
+ const backupDir = path43.join(installed.localPath, ".backup", new Date().toISOString().replace(/[:.]/g, "-"));
806090
+ await copyDir2(installed.localPath, backupDir);
806091
+ await persistInstalledItem(remote);
806092
+ if (installed.lifecycle === "active") {
806093
+ await addItemToConfig(remote, installed.localPath);
806094
+ }
806095
+ _listFavoriteItemsCache = null;
806096
+ return remote;
806097
+ }
805996
806098
  function getHubSyncMode() {
805997
806099
  const mode = process.env.COSTRICT_HUB_SYNC_MODE;
805998
806100
  if (mode === "auto")
@@ -806045,6 +806147,22 @@ async function batchUnloadFavoriteItems(slugs) {
806045
806147
  }
806046
806148
  return { unloaded, errors: errors12 };
806047
806149
  }
806150
+ async function batchUpdateFavoriteItems(slugs) {
806151
+ const updated = [];
806152
+ const errors12 = [];
806153
+ for (const slug of slugs) {
806154
+ try {
806155
+ await updateFavoriteItem(slug);
806156
+ updated.push(slug);
806157
+ } catch (error98) {
806158
+ errors12.push({
806159
+ slug,
806160
+ message: error98 instanceof Error ? error98.message : String(error98)
806161
+ });
806162
+ }
806163
+ }
806164
+ return { updated, errors: errors12 };
806165
+ }
806048
806166
  var FAVORITE_PAGE_SIZE = 20, FAVORITE_MAX_PAGES = 20, FAVORITE_LIST_CACHE_TTL_MS = 30000, _listFavoriteItemsCache = null, STORE_TYPE_MAP, LOCAL_TO_STORE_TYPE, FETCH_TIMEOUT_MS6 = 15000, SUPPORTED_MCP_TYPES;
806049
806167
  var init_favorite = __esm(() => {
806050
806168
  init_fetch2();
@@ -806136,6 +806254,15 @@ function TabContent({
806136
806254
  " \xB7 \u5206\u503C:",
806137
806255
  formatScore(item.score)
806138
806256
  ]
806257
+ }),
806258
+ item.hasUpdate && /* @__PURE__ */ jsx_runtime358.jsxs(ThemedText, {
806259
+ color: "yellow",
806260
+ children: [
806261
+ " \u2191 ",
806262
+ item.localVersion ?? "?",
806263
+ " \u2192 ",
806264
+ item.version ?? "?"
806265
+ ]
806139
806266
  })
806140
806267
  ]
806141
806268
  }),
@@ -806283,6 +806410,26 @@ function CloudEnabledMenu({
806283
806410
  }
806284
806411
  onDone("Cancelled", { display: "system" });
806285
806412
  }, { context: "Confirmation" });
806413
+ useKeybinding("hub:update-all", async () => {
806414
+ if (phase !== "ready")
806415
+ return;
806416
+ const updateSlugs = (items ?? []).filter((item) => item.hasUpdate).map((item) => item.slug);
806417
+ if (updateSlugs.length === 0)
806418
+ return;
806419
+ setPhase("syncing");
806420
+ setSyncMessage(`Updating ${updateSlugs.length} items...`);
806421
+ const { updated, errors: errors12 } = await batchUpdateFavoriteItems(updateSlugs);
806422
+ try {
806423
+ const refreshed2 = await listFavoriteItems();
806424
+ setItems(refreshed2);
806425
+ } catch {}
806426
+ if (errors12.length > 0) {
806427
+ setSyncMessage(`Updated ${updated.length}, failed ${errors12.length}`);
806428
+ } else {
806429
+ setSyncMessage("");
806430
+ }
806431
+ setPhase("ready");
806432
+ }, { context: "Hub" });
806286
806433
  import_react215.useEffect(() => {
806287
806434
  let cancelled = false;
806288
806435
  async function loadAndSync() {
@@ -806455,7 +806602,7 @@ function CloudEnabledMenu({
806455
806602
  children: [
806456
806603
  /* @__PURE__ */ jsx_runtime358.jsx(Spinner2, {}),
806457
806604
  /* @__PURE__ */ jsx_runtime358.jsx(ThemedText, {
806458
- children: phase === "checking" ? "Checking for sync changes..." : "Syncing local favorites..."
806605
+ children: syncMessage || (phase === "checking" ? "Checking for sync changes..." : "Syncing local favorites...")
806459
806606
  })
806460
806607
  ]
806461
806608
  })
@@ -806479,6 +806626,23 @@ function CloudEnabledMenu({
806479
806626
  children: syncMessage
806480
806627
  })
806481
806628
  }),
806629
+ (items ?? []).some((item) => item.hasUpdate) && /* @__PURE__ */ jsx_runtime358.jsx(ThemedBox_default, {
806630
+ marginLeft: 1,
806631
+ marginBottom: 1,
806632
+ children: /* @__PURE__ */ jsx_runtime358.jsxs(ThemedText, {
806633
+ dimColor: true,
806634
+ children: [
806635
+ (items ?? []).filter((item) => item.hasUpdate).length,
806636
+ " \u9879\u6709\u66F4\u65B0\uFF0C\u6309",
806637
+ " ",
806638
+ /* @__PURE__ */ jsx_runtime358.jsx(ThemedText, {
806639
+ bold: true,
806640
+ children: "U"
806641
+ }),
806642
+ " \u66F4\u65B0\u5168\u90E8"
806643
+ ]
806644
+ })
806645
+ }),
806482
806646
  /* @__PURE__ */ jsx_runtime358.jsx(ThemedBox_default, {
806483
806647
  marginLeft: 1,
806484
806648
  marginBottom: 1,
@@ -815275,7 +815439,7 @@ function generateHtmlReport(data, insights) {
815275
815439
  </html>`;
815276
815440
  }
815277
815441
  function buildExportData(data, insights, facets, remoteStats) {
815278
- const version9 = typeof MACRO !== "undefined" ? "4.2.1" : "unknown";
815442
+ const version9 = typeof MACRO !== "undefined" ? "4.2.2-beta" : "unknown";
815279
815443
  const remote_hosts_collected = remoteStats?.hosts.filter((h8) => h8.sessionCount > 0).map((h8) => h8.name);
815280
815444
  const facets_summary = {
815281
815445
  total: facets.size,
@@ -816636,6 +816800,17 @@ function getTranscriptPathForSession(sessionId) {
816636
816800
  if (sessionId === getSessionId()) {
816637
816801
  return getTranscriptPath();
816638
816802
  }
816803
+ const cwd2 = getOriginalCwd();
816804
+ const allProjectsDirs = getAllProjectsDirs();
816805
+ for (const projectsDir of allProjectsDirs) {
816806
+ const dir = join194(projectsDir, sanitizePath2(cwd2));
816807
+ const file3 = join194(dir, `${sessionId}.jsonl`);
816808
+ try {
816809
+ const fs31 = getFsImplementation();
816810
+ fs31.statSync(file3);
816811
+ return file3;
816812
+ } catch {}
816813
+ }
816639
816814
  const projectDir = getProjectDir3(getOriginalCwd());
816640
816815
  return join194(projectDir, `${sessionId}.jsonl`);
816641
816816
  }
@@ -816728,15 +816903,18 @@ async function listRemoteAgentMetadata() {
816728
816903
  return results;
816729
816904
  }
816730
816905
  function sessionIdExists(sessionId) {
816731
- const projectDir = getProjectDir3(getOriginalCwd());
816732
- const sessionFile = join194(projectDir, `${sessionId}.jsonl`);
816906
+ const cwd2 = getOriginalCwd();
816733
816907
  const fs31 = getFsImplementation();
816734
- try {
816735
- fs31.statSync(sessionFile);
816736
- return true;
816737
- } catch {
816738
- return false;
816908
+ const allProjectsDirs = getAllProjectsDirs();
816909
+ for (const projectsDir of allProjectsDirs) {
816910
+ const projectDir = join194(projectsDir, sanitizePath2(cwd2));
816911
+ const sessionFile = join194(projectDir, `${sessionId}.jsonl`);
816912
+ try {
816913
+ fs31.statSync(sessionFile);
816914
+ return true;
816915
+ } catch {}
816739
816916
  }
816917
+ return false;
816740
816918
  }
816741
816919
  function getNodeEnv() {
816742
816920
  return "production";
@@ -818002,8 +818180,13 @@ async function trackSessionBranchingAnalytics(logs2) {
818002
818180
  });
818003
818181
  }
818004
818182
  async function fetchLogs(limit) {
818005
- const projectDir = getProjectDir3(getOriginalCwd());
818006
- const logs2 = await getSessionFilesLite(projectDir, limit, getOriginalCwd());
818183
+ const cwd2 = getOriginalCwd();
818184
+ const allProjectsDirs = getAllProjectsDirs();
818185
+ const allLogs = [];
818186
+ for (const projectsDir of allProjectsDirs) {
818187
+ allLogs.push(...await getSessionFilesLite(join194(projectsDir, sanitizePath2(cwd2)), limit, cwd2));
818188
+ }
818189
+ const logs2 = deduplicateLogsBySessionId(allLogs);
818007
818190
  await trackSessionBranchingAnalytics(logs2);
818008
818191
  return logs2;
818009
818192
  }
@@ -818707,7 +818890,23 @@ async function loadTranscriptFile(filePath, opts) {
818707
818890
  };
818708
818891
  }
818709
818892
  async function loadSessionFile(sessionId) {
818710
- const sessionFile = join194(getSessionProjectDir() ?? getProjectDir3(getOriginalCwd()), `${sessionId}.jsonl`);
818893
+ const sessionProjectDir = getSessionProjectDir();
818894
+ if (sessionProjectDir) {
818895
+ const file3 = join194(sessionProjectDir, `${sessionId}.jsonl`);
818896
+ try {
818897
+ return loadTranscriptFile(file3);
818898
+ } catch {}
818899
+ }
818900
+ const cwd2 = getOriginalCwd();
818901
+ const allProjectsDirs = getAllProjectsDirs();
818902
+ for (const projectsDir of allProjectsDirs) {
818903
+ const projectDir = join194(projectsDir, sanitizePath2(cwd2));
818904
+ const file3 = join194(projectDir, `${sessionId}.jsonl`);
818905
+ try {
818906
+ return loadTranscriptFile(file3);
818907
+ } catch {}
818908
+ }
818909
+ const sessionFile = join194(getProjectDir3(getOriginalCwd()), `${sessionId}.jsonl`);
818711
818910
  return loadTranscriptFile(sessionFile);
818712
818911
  }
818713
818912
  function clearSessionMessagesCache() {
@@ -818851,8 +819050,12 @@ async function loadSameRepoMessageLogsProgressive(worktreePaths, limit, initialE
818851
819050
  async function getStatOnlyLogsForWorktrees(worktreePaths, limit) {
818852
819051
  if (worktreePaths.length <= 1) {
818853
819052
  const cwd2 = getOriginalCwd();
818854
- const projectDir = getProjectDir3(cwd2);
818855
- return getSessionFilesLite(projectDir, undefined, cwd2);
819053
+ const allProjectsDirs2 = getAllProjectsDirs();
819054
+ const allLogs2 = [];
819055
+ for (const projectsDir of allProjectsDirs2) {
819056
+ allLogs2.push(...await getSessionFilesLite(join194(projectsDir, sanitizePath2(cwd2)), undefined, cwd2));
819057
+ }
819058
+ return deduplicateLogsBySessionId(allLogs2);
818856
819059
  }
818857
819060
  const caseInsensitive = process.platform === "win32";
818858
819061
  const indexed = worktreePaths.map((wt) => {
@@ -818891,8 +819094,13 @@ async function getStatOnlyLogsForWorktrees(worktreePaths, limit) {
818891
819094
  }
818892
819095
  }
818893
819096
  if (!anyDirReadable) {
818894
- const projectDir = getProjectDir3(getOriginalCwd());
818895
- return getSessionFilesLite(projectDir, limit, getOriginalCwd());
819097
+ const cwd2 = getOriginalCwd();
819098
+ const allProjectsDirs2 = getAllProjectsDirs();
819099
+ const allLogs2 = [];
819100
+ for (const projectsDir of allProjectsDirs2) {
819101
+ allLogs2.push(...await getSessionFilesLite(join194(projectsDir, sanitizePath2(cwd2)), limit, cwd2));
819102
+ }
819103
+ return deduplicateLogsBySessionId(allLogs2);
818896
819104
  }
818897
819105
  return deduplicateLogsBySessionId(allLogs);
818898
819106
  }
@@ -819470,7 +819678,7 @@ var init_sessionStorage = __esm(() => {
819470
819678
  init_settings2();
819471
819679
  init_slowOperations();
819472
819680
  init_uuid();
819473
- VERSION10 = typeof MACRO !== "undefined" ? "4.2.1" : "unknown";
819681
+ VERSION10 = typeof MACRO !== "undefined" ? "4.2.2-beta" : "unknown";
819474
819682
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
819475
819683
  SKIP_FIRST_PROMPT_PATTERN2 = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
819476
819684
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -820778,7 +820986,7 @@ var init_filesystem = __esm(() => {
820778
820986
  });
820779
820987
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
820780
820988
  const nonce = randomBytes24(16).toString("hex");
820781
- return join197(getCostrictTempDir(), "bundled-skills", "4.2.1", nonce);
820989
+ return join197(getCostrictTempDir(), "bundled-skills", "4.2.2-beta", nonce);
820782
820990
  });
820783
820991
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
820784
820992
  });
@@ -826975,7 +827183,7 @@ function computeFingerprint(messageText, version9) {
826975
827183
  }
826976
827184
  function computeFingerprintFromMessages(messages) {
826977
827185
  const firstMessageText = extractFirstMessageText(messages);
826978
- return computeFingerprint(firstMessageText, "4.2.1");
827186
+ return computeFingerprint(firstMessageText, "4.2.2-beta");
826979
827187
  }
826980
827188
  var FINGERPRINT_SALT = "59cf53e54c78";
826981
827189
  var init_fingerprint = () => {};
@@ -827385,7 +827593,7 @@ function getAnthropicEnvMetadata() {
827385
827593
  function getBuildAgeMinutes() {
827386
827594
  if (false)
827387
827595
  ;
827388
- const buildTime = new Date("2026-06-10T08:45:07.701Z").getTime();
827596
+ const buildTime = new Date("2026-06-12T06:58:59.329Z").getTime();
827389
827597
  if (isNaN(buildTime))
827390
827598
  return;
827391
827599
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -840174,7 +840382,7 @@ async function sideQuery(opts) {
840174
840382
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
840175
840383
  }
840176
840384
  const messageText = extractFirstUserMessageText(messages);
840177
- const fingerprint = computeFingerprint(messageText, "4.2.1");
840385
+ const fingerprint = computeFingerprint(messageText, "4.2.2-beta");
840178
840386
  const attributionHeader = getAttributionHeader(fingerprint);
840179
840387
  const systemBlocks = [
840180
840388
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -843549,7 +843757,7 @@ function buildSystemInitMessage(inputs) {
843549
843757
  slash_commands: inputs.commands.filter((c10) => c10.userInvocable !== false).map((c10) => c10.name),
843550
843758
  apiKeySource: getAnthropicApiKeyWithSource().source,
843551
843759
  betas: getSdkBetas(),
843552
- claude_code_version: "4.2.1",
843760
+ claude_code_version: "4.2.2-beta",
843553
843761
  output_style: outputStyle2,
843554
843762
  agents: inputs.agents.map((agent) => agent.agentType),
843555
843763
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -848404,7 +848612,7 @@ function appendToLog(path47, message2) {
848404
848612
  cwd: getFsImplementation().cwd(),
848405
848613
  userType: process.env.USER_TYPE,
848406
848614
  sessionId: getSessionId(),
848407
- version: "4.2.1"
848615
+ version: "4.2.2-beta"
848408
848616
  };
848409
848617
  getLogWriter(path47).write(messageWithTimestamp);
848410
848618
  }
@@ -868934,7 +869142,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
868934
869142
  project_dir: getOriginalCwd(),
868935
869143
  added_dirs: addedDirs
868936
869144
  },
868937
- version: "4.2.1",
869145
+ version: "4.2.2-beta",
868938
869146
  output_style: {
868939
869147
  name: outputStyleName
868940
869148
  },
@@ -887397,7 +887605,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
887397
887605
  } catch {}
887398
887606
  const data = {
887399
887607
  trigger,
887400
- version: "4.2.1",
887608
+ version: "4.2.2-beta",
887401
887609
  platform: process.platform,
887402
887610
  transcript,
887403
887611
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -888639,7 +888847,7 @@ function getReleaseType(current2, latest) {
888639
888847
  return "patch";
888640
888848
  }
888641
888849
  async function checkNewAutoUpdate(callbacks) {
888642
- const currentVersion = "4.2.1";
888850
+ const currentVersion = "4.2.2-beta";
888643
888851
  logForDebugging(`[newAutoUpdater] checking, current: ${currentVersion}`);
888644
888852
  if (isNewAutoUpdaterDisabled()) {
888645
888853
  return { action: "skip", currentVersion, latestVersion: null };
@@ -899484,7 +899692,7 @@ function WelcomeV2() {
899484
899692
  dimColor: true,
899485
899693
  children: [
899486
899694
  "v",
899487
- "4.2.1",
899695
+ "4.2.2-beta",
899488
899696
  " "
899489
899697
  ]
899490
899698
  })
@@ -899550,7 +899758,7 @@ function WelcomeV2() {
899550
899758
  dimColor: true,
899551
899759
  children: [
899552
899760
  "v",
899553
- "4.2.1",
899761
+ "4.2.2-beta",
899554
899762
  " "
899555
899763
  ]
899556
899764
  })
@@ -899652,7 +899860,7 @@ function AppleTerminalWelcomeV2({ theme: theme2, welcomeMessage }) {
899652
899860
  dimColor: true,
899653
899861
  children: [
899654
899862
  "v",
899655
- "4.2.1",
899863
+ "4.2.2-beta",
899656
899864
  " "
899657
899865
  ]
899658
899866
  })
@@ -899718,7 +899926,7 @@ function AppleTerminalWelcomeV2({ theme: theme2, welcomeMessage }) {
899718
899926
  dimColor: true,
899719
899927
  children: [
899720
899928
  "v",
899721
- "4.2.1",
899929
+ "4.2.2-beta",
899722
899930
  " "
899723
899931
  ]
899724
899932
  })
@@ -900668,7 +900876,7 @@ function completeOnboarding() {
900668
900876
  saveGlobalConfig((current2) => ({
900669
900877
  ...current2,
900670
900878
  hasCompletedOnboarding: true,
900671
- lastOnboardingVersion: "4.2.1"
900879
+ lastOnboardingVersion: "4.2.2-beta"
900672
900880
  }));
900673
900881
  }
900674
900882
  function showDialog(root9, renderer) {
@@ -902019,7 +902227,7 @@ function registerWeixinBuiltinPlugin() {
902019
902227
  registerBuiltinPlugin({
902020
902228
  name: "weixin",
902021
902229
  description: "WeChat channel integration. Enables inbound WeChat messages via channels and provides reply/send_typing MCP tools. Configure with `ccb weixin login` and enable for a session with `--channels plugin:weixin@builtin`.",
902022
- version: "4.2.1",
902230
+ version: "4.2.2-beta",
902023
902231
  defaultEnabled: true,
902024
902232
  mcpServers: {
902025
902233
  weixin: {
@@ -910421,6 +910629,13 @@ Error: sandbox required but unavailable: ${sandboxUnavailableReason}
910421
910629
  const messages = [];
910422
910630
  let lastMessage;
910423
910631
  const transformToStreamlined = null;
910632
+ Promise.allSettled([
910633
+ getUserContext(),
910634
+ getSystemContext(),
910635
+ getSkillToolCommands(cwd2())
910636
+ ]).then(() => {
910637
+ headlessProfilerCheckpoint("context_prewarm_done");
910638
+ });
910424
910639
  headlessProfilerCheckpoint("before_runHeadlessStreaming");
910425
910640
  for await (const message2 of runHeadlessStreaming(structuredIO, appState.mcp.clients, [...commands11, ...appState.mcp.commands], filteredTools, initialMessages, canUseTool, sdkMcpConfigs, getAppState, setAppState, agents2, options, turnInterruptionState)) {
910426
910641
  if (transformToStreamlined) {
@@ -913222,6 +913437,7 @@ var init_print = __esm(() => {
913222
913437
  init_slowOperations();
913223
913438
  init_skillChangeDetector();
913224
913439
  init_commands6();
913440
+ init_context2();
913225
913441
  init_envUtils();
913226
913442
  init_headlessPluginInstall();
913227
913443
  init_refresh();
@@ -914328,7 +914544,7 @@ async function startMCPServer(cwd3, debug5, verbose) {
914328
914544
  setCwd(cwd3);
914329
914545
  const server2 = new Server({
914330
914546
  name: "claude/tengu",
914331
- version: "4.2.1"
914547
+ version: "4.2.2-beta"
914332
914548
  }, {
914333
914549
  capabilities: {
914334
914550
  tools: {}
@@ -916612,7 +916828,7 @@ function createHealthRoutes(sessionManager) {
916612
916828
  const uptime2 = process.uptime() * 1000;
916613
916829
  return c10.json({
916614
916830
  status: "ok",
916615
- version: "4.2.1",
916831
+ version: "4.2.2-beta",
916616
916832
  uptime_ms: Math.round(uptime2),
916617
916833
  active_sessions: sessionManager.getActiveCount()
916618
916834
  });
@@ -916875,7 +917091,7 @@ function getMacroDefines() {
916875
917091
  commit = execSync3("git rev-parse --short HEAD", { encoding: "utf-8", cwd: __dirname }).trim();
916876
917092
  } catch {}
916877
917093
  return {
916878
- "MACRO.VERSION": JSON.stringify("4.2.1"),
917094
+ "MACRO.VERSION": JSON.stringify("4.2.2-beta"),
916879
917095
  "MACRO.BUILD_TIME": JSON.stringify(new Date().toISOString()),
916880
917096
  "MACRO.COMMIT": JSON.stringify(commit),
916881
917097
  "MACRO.FEEDBACK_CHANNEL": JSON.stringify(""),
@@ -917939,20 +918155,26 @@ function contentToParts(content, role) {
917939
918155
  return parts;
917940
918156
  }
917941
918157
  function decomposeMessageToParts(msg) {
917942
- if (msg.parts && msg.parts.length > 0)
917943
- return msg;
917944
- const content = msg.content;
917945
- const role = msg.role;
917946
- if (!content || !role)
917947
- return msg;
917948
- if (role === "assistant" || role === "user") {
917949
- const parts = contentToParts(content, role);
917950
- const filtered = msg.error ? parts.filter((p2) => p2.type !== "text") : parts;
917951
- if (filtered.length > 0) {
917952
- return { ...msg, parts: filtered };
917953
- }
918158
+ const parts = msg.parts ? [...msg.parts] : contentToParts(msg.content, msg.role);
918159
+ const filtered = msg.error ? parts.filter((p2) => p2.type !== "text") : parts;
918160
+ if (msg.role === "assistant" && msg.usage && !filtered.some((part) => part.type === "step-finish")) {
918161
+ filtered.push({
918162
+ type: "step-finish",
918163
+ id: crypto.randomUUID(),
918164
+ reason: "stop",
918165
+ cost: 0,
918166
+ tokens: {
918167
+ input: msg.usage.input_tokens ?? 0,
918168
+ output: msg.usage.output_tokens ?? 0,
918169
+ reasoning: 0,
918170
+ cache: {
918171
+ read: msg.usage.cache_read_input_tokens ?? 0,
918172
+ write: msg.usage.cache_creation_input_tokens ?? 0
918173
+ }
918174
+ }
918175
+ });
917954
918176
  }
917955
- return msg;
918177
+ return filtered.length > 0 ? { ...msg, parts: filtered } : msg;
917956
918178
  }
917957
918179
  async function readAgentMeta(metaPath) {
917958
918180
  try {
@@ -918031,7 +918253,9 @@ function entryToSessionMessage(entry, includeSystem) {
918031
918253
  content: error99 ? [] : content,
918032
918254
  timestamp: timestamp2,
918033
918255
  parent_uuid: entry.parentUuid ?? null,
918034
- usage: entry.usage,
918256
+ model: entry.message?.model,
918257
+ provider_id: typeof entry.provider_id === "string" ? entry.provider_id : undefined,
918258
+ usage: entry.message?.usage ?? entry.usage,
918035
918259
  error: error99
918036
918260
  };
918037
918261
  }
@@ -918178,17 +918402,19 @@ async function readSessionMessages(opts) {
918178
918402
  let boundaryEntry = null;
918179
918403
  for (let i10 = lines2.length - 1;i10 >= 0; i10--) {
918180
918404
  const entry = parseEntry(lines2[i10]);
918181
- if (entry?.type === "system" && entry?.subtype === "compact_boundary" && !entry?.compactMetadata?.preservedSegment) {
918405
+ if (entry?.type === "system" && entry?.subtype === "compact_boundary") {
918182
918406
  lastCompactBoundaryIndex = i10;
918183
918407
  boundaryEntry = entry;
918184
918408
  break;
918185
918409
  }
918186
918410
  }
918187
- const startLine = lastCompactBoundaryIndex >= 0 ? lastCompactBoundaryIndex + 1 : 0;
918411
+ const preservesMessages = !!boundaryEntry?.compactMetadata?.preservedSegment;
918412
+ const startLine = lastCompactBoundaryIndex >= 0 && !preservesMessages ? lastCompactBoundaryIndex + 1 : 0;
918188
918413
  mainMessages = readMessagesFromLines(lines2.slice(startLine), includeSystem);
918189
918414
  if (lastCompactBoundaryIndex >= 0 && boundaryEntry) {
918190
918415
  const boundaryUuid = boundaryEntry.uuid ?? crypto.randomUUID();
918191
918416
  const isAuto = boundaryEntry.subtype === "microcompact_boundary" || boundaryEntry.compactMetadata?.trigger === "auto";
918417
+ const postCompactTokens = typeof boundaryEntry.compactMetadata?.postCompactTokens === "number" ? boundaryEntry.compactMetadata.postCompactTokens : undefined;
918192
918418
  const compactionUserMsg = {
918193
918419
  uuid: boundaryUuid,
918194
918420
  type: "user",
@@ -918203,12 +918429,8 @@ async function readSessionMessages(opts) {
918203
918429
  const summaryIndices = [];
918204
918430
  for (let i10 = 0;i10 < mainMessages.length; i10++) {
918205
918431
  const m4 = mainMessages[i10];
918206
- if (m4.type !== "user" || m4.role !== "user")
918207
- break;
918208
- if (m4.parent_uuid === boundaryUuid) {
918432
+ if (m4.type === "user" && m4.role === "user" && m4.parent_uuid === boundaryUuid) {
918209
918433
  summaryIndices.push(i10);
918210
- } else {
918211
- break;
918212
918434
  }
918213
918435
  }
918214
918436
  const summaryMessages = [];
@@ -918222,6 +918444,7 @@ async function readSessionMessages(opts) {
918222
918444
  content: summaryText,
918223
918445
  timestamp: summaryMsg.timestamp,
918224
918446
  parent_uuid: boundaryUuid,
918447
+ context_tokens: postCompactTokens,
918225
918448
  parts: [
918226
918449
  { type: "step-start", id: crypto.randomUUID() },
918227
918450
  { type: "text", id: crypto.randomUUID(), text: summaryText },
@@ -918833,8 +919056,19 @@ function processStreamEvent(sessionID, event) {
918833
919056
  info: {
918834
919057
  id: state4.messageID,
918835
919058
  role: "assistant",
919059
+ sessionID,
918836
919060
  modelID: state4.modelID,
918837
- time: { completed: Date.now() }
919061
+ tokens: {
919062
+ input: state4.usage.inputTokens,
919063
+ output: state4.usage.outputTokens,
919064
+ reasoning: 0,
919065
+ cache: {
919066
+ read: state4.usage.cacheReadTokens,
919067
+ write: state4.usage.cacheWriteTokens
919068
+ }
919069
+ },
919070
+ time: { completed: Date.now() },
919071
+ finish: state4.stopReason || "stop"
918838
919072
  }
918839
919073
  }
918840
919074
  });
@@ -919297,6 +919531,7 @@ function emitCompactSummaryMessage(msg, ctx) {
919297
919531
  role: "assistant",
919298
919532
  summary: true,
919299
919533
  mode: "compaction",
919534
+ ...typeof compactState.postCompactTokens === "number" ? { contextTokens: compactState.postCompactTokens } : {},
919300
919535
  time: { created: now3 },
919301
919536
  parentID: compactState.userMessageID
919302
919537
  }
@@ -919344,6 +919579,7 @@ function emitCompactSummaryMessage(msg, ctx) {
919344
919579
  role: "assistant",
919345
919580
  summary: true,
919346
919581
  mode: "compaction",
919582
+ ...typeof compactState.postCompactTokens === "number" ? { contextTokens: compactState.postCompactTokens } : {},
919347
919583
  time: { created: now3, completed: now3 },
919348
919584
  parentID: compactState.userMessageID,
919349
919585
  finish: "stop"
@@ -919938,7 +920174,9 @@ function emitSessionError(msg, ctx) {
919938
920174
  });
919939
920175
  }
919940
920176
  function emitCompactionEvent(msg, ctx) {
919941
- const isAuto = msg.subtype === "microcompact_boundary" || msg.compact_metadata?.trigger === "auto";
920177
+ const compactMetadata = msg.compact_metadata;
920178
+ const isAuto = msg.subtype === "microcompact_boundary" || compactMetadata?.trigger === "auto";
920179
+ const postCompactTokens = typeof compactMetadata?.post_compact_tokens === "number" ? compactMetadata.post_compact_tokens : typeof compactMetadata?.postCompactTokens === "number" ? compactMetadata.postCompactTokens : undefined;
919942
920180
  const userMessageID = randomUUID82();
919943
920181
  const compactionPartID = msg.uuid ?? randomUUID82();
919944
920182
  ctx.emitOpencodeEvent("message.updated", {
@@ -919961,7 +920199,7 @@ function emitCompactionEvent(msg, ctx) {
919961
920199
  },
919962
920200
  time: Date.now()
919963
920201
  });
919964
- ctx.setCompactState({ userMessageID, isAuto });
920202
+ ctx.setCompactState({ userMessageID, isAuto, postCompactTokens });
919965
920203
  }
919966
920204
  function emitHookSummary(msg, ctx) {
919967
920205
  ctx.emitOpencodeEvent("session.hook_summary", {
@@ -920705,9 +920943,6 @@ var init_sessionHandle = __esm(() => {
920705
920943
  get silent() {
920706
920944
  return this._silent;
920707
920945
  }
920708
- get systemPrompt() {
920709
- return this.opts.systemPrompt;
920710
- }
920711
920946
  get spawnCwd() {
920712
920947
  return this._spawnCwd ?? this.cwd;
920713
920948
  }
@@ -920746,31 +920981,6 @@ var init_sessionHandle = __esm(() => {
920746
920981
  this._permissionMode = opts.permissionMode ?? "default";
920747
920982
  this.verbose = opts.verbose ?? false;
920748
920983
  }
920749
- claim(newSessionId) {
920750
- if (this._prompting) {
920751
- throw new Error(`Cannot claim session ${this._sessionId}: session is currently processing a prompt`);
920752
- }
920753
- this._sessionId = newSessionId;
920754
- this._silent = false;
920755
- this._title = undefined;
920756
- this._costUsd = 0;
920757
- this._inputTokens = 0;
920758
- this._outputTokens = 0;
920759
- this._lastMessageUuid = null;
920760
- this._firstPromptContent = undefined;
920761
- this._titleGenerationAttempted = false;
920762
- this._messageBuffer = [];
920763
- this._tombstonedUuids = new Set;
920764
- this._activeSubagents = new Map;
920765
- this._subagentIndex = new Map;
920766
- this._compactState = undefined;
920767
- this._prompting = false;
920768
- this.pendingPermissions = new Map;
920769
- this.pendingQuestions = new Map;
920770
- this.createdAt = Date.now();
920771
- this.lastActiveAt = Date.now();
920772
- this._busyStatus = { type: "idle" };
920773
- }
920774
920984
  onMessage(listener2) {
920775
920985
  this.listeners.add(listener2);
920776
920986
  return () => {
@@ -921531,19 +921741,20 @@ class SessionManager {
921531
921741
  if (!existsSync42(cwd4) || !statSync14(cwd4).isDirectory()) {
921532
921742
  throw new Error(`Working directory does not exist: ${cwd4}`);
921533
921743
  }
921534
- if (this._warmPool.length > 0 && !opts.resumeSessionId && !opts.silent && this._warmPool[0].systemPrompt === opts.systemPrompt) {
921744
+ if (this._warmPool.length > 0 && !opts.resumeSessionId && !opts.silent && !opts.sessionId) {
921535
921745
  const warm = this._warmPool.pop();
921536
- warm.claim(sessionId2);
921746
+ const realSessionId = warm.sessionId;
921747
+ warm._silent = false;
921537
921748
  const canonical = await canonicalizePath(cwd4).catch(() => cwd4);
921538
- this.eventBus.unregisterSessionCwd(warm.sessionId);
921539
- this.eventBus.registerSessionCwd(sessionId2, canonical);
921540
- this.sessions.set(sessionId2, warm);
921541
- this.eventBus.publishSessionEvent(sessionId2, "created", {
921749
+ this.sessions.set(realSessionId, warm);
921750
+ this.eventBus.registerSessionCwd(realSessionId, canonical);
921751
+ this.eventBus.publishSessionEvent(realSessionId, "created", {
921542
921752
  status: "running",
921543
921753
  created_at: Date.now()
921544
921754
  });
921545
921755
  this.scheduleIndexSave();
921546
921756
  this.refillWarmPool(opts);
921757
+ logForDebugging(`[warm-pool] claimed session ${realSessionId} from pool`);
921547
921758
  return warm;
921548
921759
  }
921549
921760
  const handle = new SessionHandle({
@@ -921616,12 +921827,15 @@ class SessionManager {
921616
921827
  this._warmPool.push(probe);
921617
921828
  this.sessions.delete(probe.sessionId);
921618
921829
  this.eventBus.unregisterSessionCwd(probe.sessionId);
921830
+ } catch (err3) {} finally {
921831
+ if (this._probeHandle && !this._warmPool.includes(this._probeHandle)) {
921832
+ this._probeHandle.forceKill();
921833
+ this.sessions.delete(this._probeHandle.sessionId);
921834
+ this.eventBus.unregisterSessionCwd(this._probeHandle.sessionId);
921835
+ }
921619
921836
  this._probeHandle = null;
921620
- } catch (err3) {
921621
- this._probeHandle?.forceKill();
921622
- this._probeHandle = null;
921837
+ this._resolveInitDataReady?.();
921623
921838
  }
921624
- this._resolveInitDataReady?.();
921625
921839
  })();
921626
921840
  }
921627
921841
  killProbe() {
@@ -921631,28 +921845,31 @@ class SessionManager {
921631
921845
  }
921632
921846
  this._resolveInitDataReady?.();
921633
921847
  }
921634
- async refillWarmPool(opts) {
921848
+ refillWarmPool(opts) {
921635
921849
  if (this._refilling)
921636
921850
  return;
921637
921851
  if (this._warmPool.length >= SessionManager.POOL_TARGET_SIZE)
921638
921852
  return;
921639
921853
  this._refilling = true;
921640
- try {
921641
- const handle = await this.createSession({
921642
- cwd: opts.cwd,
921643
- execPath: opts.execPath,
921644
- scriptArgs: opts.scriptArgs,
921645
- silent: true
921646
- });
921647
- await handle.start();
921648
- this.sessions.delete(handle.sessionId);
921649
- this.eventBus.unregisterSessionCwd(handle.sessionId);
921650
- this._warmPool.push(handle);
921651
- } catch (err3) {
921652
- logError3(err3);
921653
- } finally {
921654
- this._refilling = false;
921655
- }
921854
+ (async () => {
921855
+ try {
921856
+ const handle = await this.createSession({
921857
+ cwd: opts.cwd,
921858
+ execPath: opts.execPath,
921859
+ scriptArgs: opts.scriptArgs,
921860
+ silent: true
921861
+ });
921862
+ await handle.start();
921863
+ this._warmPool.push(handle);
921864
+ this.sessions.delete(handle.sessionId);
921865
+ this.eventBus.unregisterSessionCwd(handle.sessionId);
921866
+ logForDebugging(`[warm-pool] refilled: ${handle.sessionId}`);
921867
+ } catch (err3) {
921868
+ logError3(err3);
921869
+ } finally {
921870
+ this._refilling = false;
921871
+ }
921872
+ })();
921656
921873
  }
921657
921874
  deleteSession(id) {
921658
921875
  const handle = this.sessions.get(id);
@@ -921780,6 +921997,7 @@ var INDEX_FILE = "server-sessions.json";
921780
921997
  var init_sessionManager = __esm(() => {
921781
921998
  init_envUtils();
921782
921999
  init_log3();
922000
+ init_debug();
921783
922001
  init_sessionHandle();
921784
922002
  init_sessionStoragePortable();
921785
922003
  init_listSessionsImpl();
@@ -922519,7 +922737,7 @@ __export(exports_update, {
922519
922737
  });
922520
922738
  async function update() {
922521
922739
  logEvent("tengu_update_check", {});
922522
- writeToStdout(`Current version: ${"4.2.1"}
922740
+ writeToStdout(`Current version: ${"4.2.2-beta"}
922523
922741
  `);
922524
922742
  const channel5 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
922525
922743
  writeToStdout(`Checking for updates to ${channel5} version...
@@ -922594,8 +922812,8 @@ async function update() {
922594
922812
  writeToStdout(`CoStrict is managed by Homebrew.
922595
922813
  `);
922596
922814
  const latest = await getLatestVersion(channel5);
922597
- if (latest && !gte2("4.2.1", latest)) {
922598
- writeToStdout(`Update available: ${"4.2.1"} \u2192 ${latest}
922815
+ if (latest && !gte2("4.2.2-beta", latest)) {
922816
+ writeToStdout(`Update available: ${"4.2.2-beta"} \u2192 ${latest}
922599
922817
  `);
922600
922818
  writeToStdout(`
922601
922819
  `);
@@ -922611,8 +922829,8 @@ async function update() {
922611
922829
  writeToStdout(`CoStrict is managed by winget.
922612
922830
  `);
922613
922831
  const latest = await getLatestVersion(channel5);
922614
- if (latest && !gte2("4.2.1", latest)) {
922615
- writeToStdout(`Update available: ${"4.2.1"} \u2192 ${latest}
922832
+ if (latest && !gte2("4.2.2-beta", latest)) {
922833
+ writeToStdout(`Update available: ${"4.2.2-beta"} \u2192 ${latest}
922616
922834
  `);
922617
922835
  writeToStdout(`
922618
922836
  `);
@@ -922628,8 +922846,8 @@ async function update() {
922628
922846
  writeToStdout(`CoStrict is managed by apk.
922629
922847
  `);
922630
922848
  const latest = await getLatestVersion(channel5);
922631
- if (latest && !gte2("4.2.1", latest)) {
922632
- writeToStdout(`Update available: ${"4.2.1"} \u2192 ${latest}
922849
+ if (latest && !gte2("4.2.2-beta", latest)) {
922850
+ writeToStdout(`Update available: ${"4.2.2-beta"} \u2192 ${latest}
922633
922851
  `);
922634
922852
  writeToStdout(`
922635
922853
  `);
@@ -922694,11 +922912,11 @@ async function update() {
922694
922912
  `);
922695
922913
  await gracefulShutdown(1);
922696
922914
  }
922697
- if (result2.latestVersion === "4.2.1") {
922698
- writeToStdout(source_default.green(`CoStrict is up to date (${"4.2.1"})`) + `
922915
+ if (result2.latestVersion === "4.2.2-beta") {
922916
+ writeToStdout(source_default.green(`CoStrict is up to date (${"4.2.2-beta"})`) + `
922699
922917
  `);
922700
922918
  } else {
922701
- writeToStdout(source_default.green(`Successfully updated from ${"4.2.1"} to version ${result2.latestVersion}`) + `
922919
+ writeToStdout(source_default.green(`Successfully updated from ${"4.2.2-beta"} to version ${result2.latestVersion}`) + `
922702
922920
  `);
922703
922921
  regenerateCompletionCache();
922704
922922
  }
@@ -922758,12 +922976,12 @@ async function update() {
922758
922976
  `);
922759
922977
  await gracefulShutdown(1);
922760
922978
  }
922761
- if (latestVersion === "4.2.1") {
922762
- writeToStdout(source_default.green(`CoStrict is up to date (${"4.2.1"})`) + `
922979
+ if (latestVersion === "4.2.2-beta") {
922980
+ writeToStdout(source_default.green(`CoStrict is up to date (${"4.2.2-beta"})`) + `
922763
922981
  `);
922764
922982
  await gracefulShutdown(0);
922765
922983
  }
922766
- writeToStdout(`New version available: ${latestVersion} (current: ${"4.2.1"})
922984
+ writeToStdout(`New version available: ${latestVersion} (current: ${"4.2.2-beta"})
922767
922985
  `);
922768
922986
  writeToStdout(`Installing update...
922769
922987
  `);
@@ -922808,7 +923026,7 @@ async function update() {
922808
923026
  logForDebugging(`update: Installation status: ${result.status}`);
922809
923027
  switch (result.status) {
922810
923028
  case "success":
922811
- writeToStdout(source_default.green(`Successfully updated from ${"4.2.1"} to version ${latestVersion}`) + `
923029
+ writeToStdout(source_default.green(`Successfully updated from ${"4.2.2-beta"} to version ${latestVersion}`) + `
922812
923030
  `);
922813
923031
  regenerateCompletionCache();
922814
923032
  break;
@@ -925020,7 +925238,7 @@ ${assistantAddendum}` : assistantAddendum;
925020
925238
  }
925021
925239
  }
925022
925240
  logForDiagnosticsNoPII("info", "started", {
925023
- version: "4.2.1",
925241
+ version: "4.2.2-beta",
925024
925242
  is_native_binary: isInBundledMode()
925025
925243
  });
925026
925244
  registerCleanup(async () => {
@@ -925499,7 +925717,7 @@ Session: ${directConnectConfig.sessionId}`, "info");
925499
925717
  sshSession = await createSSHSession2({
925500
925718
  host: _pendingSSH.host,
925501
925719
  cwd: _pendingSSH.cwd,
925502
- localVersion: "4.2.1",
925720
+ localVersion: "4.2.2-beta",
925503
925721
  permissionMode: _pendingSSH.permissionMode,
925504
925722
  dangerouslySkipPermissions: _pendingSSH.dangerouslySkipPermissions,
925505
925723
  extraCliArgs: _pendingSSH.extraCliArgs,
@@ -925971,7 +926189,7 @@ Usage: csc --remote "your task description"`, () => gracefulShutdown(1));
925971
926189
  pendingHookMessages
925972
926190
  }, renderAndRun);
925973
926191
  }
925974
- }).version("4.2.1 (CoStrict)", "-v, --version", "Output the version number");
926192
+ }).version("4.2.2-beta (CoStrict)", "-v, --version", "Output the version number");
925975
926193
  program2.addOption(new Option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)").hideHelp());
925976
926194
  program2.addOption(new Option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.").hideHelp());
925977
926195
  if (canUserConfigureAdvisor()) {
@@ -926685,10 +926903,10 @@ if (process.env.CLAUDE_CODE_REMOTE === "true") {
926685
926903
  async function main2() {
926686
926904
  const args = process.argv.slice(2);
926687
926905
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
926688
- const d7 = new Date("2026-06-10T08:45:07.701Z");
926906
+ const d7 = new Date("2026-06-12T06:58:59.329Z");
926689
926907
  const p2 = (n4) => String(n4).padStart(2, "0");
926690
926908
  const buildTime = `${d7.getFullYear()}/${p2(d7.getMonth() + 1)}/${p2(d7.getDate())} ${p2(d7.getHours())}:${p2(d7.getMinutes())}:${p2(d7.getSeconds())}`;
926691
- console.log(`${"4.2.1"} (commit: ${"90f60008e"}, built: ${buildTime})`);
926909
+ console.log(`${"4.2.2-beta"} (commit: ${"c78c46f61"}, built: ${buildTime})`);
926692
926910
  return;
926693
926911
  }
926694
926912
  const { profileCheckpoint: profileCheckpoint2 } = await Promise.resolve().then(() => (init_startupProfiler(), exports_startupProfiler));
@@ -926728,7 +926946,7 @@ async function main2() {
926728
926946
  registerPermissionHandler(server2, handler) {
926729
926947
  server2.setNotificationHandler(ChannelPermissionRequestNotificationSchema2(), async (notification) => handler(notification.params));
926730
926948
  }
926731
- }, "4.2.1");
926949
+ }, "4.2.2-beta");
926732
926950
  return;
926733
926951
  }
926734
926952
  if (args[0] === "--daemon-worker" || args[0]?.startsWith("--daemon-worker=")) {
@@ -926826,5 +927044,5 @@ async function main2() {
926826
927044
  }
926827
927045
  main2();
926828
927046
 
926829
- //# debugId=457F3A47B8736F2464756E2164756E21
927047
+ //# debugId=E35650921522D37D64756E2164756E21
926830
927048
  //# sourceMappingURL=cli.js.map