@margay/ccl-core 1.3.5-rc.8 → 1.3.6-alpha.1

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 (3) hide show
  1. package/README.md +14 -7
  2. package/dist/cli.js +1500 -687
  3. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -116,12 +116,12 @@ var __callDispose = (stack, error, hasError) => {
116
116
  var require_package = __commonJS((exports, module) => {
117
117
  module.exports = {
118
118
  name: "@margay/ccl-core",
119
- version: "1.3.5-rc.8",
119
+ version: "1.3.6-alpha.1",
120
120
  description: "Core runtime extracted from Claude Code (ccl) for Margay integration",
121
121
  license: "SEE LICENSE IN README.md",
122
122
  type: "module",
123
123
  bin: {
124
- margay: "./dist/cli.js"
124
+ margay: "dist/cli.js"
125
125
  },
126
126
  files: [
127
127
  "dist",
@@ -103307,11 +103307,138 @@ function startupEnvMatchesGeneratedRcBlock() {
103307
103307
  const rcEnv = readShellRcGatewayEnvSync();
103308
103308
  return rcEnv?.url === startupGatewayEnv.url && rcEnv?.key === startupGatewayEnv.key;
103309
103309
  }
103310
+ function normalizeGatewayUrl(url2) {
103311
+ return url2.trim().replace(/\/+$/, "");
103312
+ }
103313
+ function isObject2(value) {
103314
+ return typeof value === "object" && value !== null && !Array.isArray(value);
103315
+ }
103316
+ function isBase64UrlSegment(segment) {
103317
+ if (!segment)
103318
+ return false;
103319
+ const alphabet2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
103320
+ for (const character of segment) {
103321
+ if (!alphabet2.includes(character))
103322
+ return false;
103323
+ }
103324
+ return true;
103325
+ }
103326
+ function isStructurallyValidGatewayJwt(value) {
103327
+ const segments = value.split(".");
103328
+ if (segments.length !== 3 || !segments.every(isBase64UrlSegment))
103329
+ return false;
103330
+ try {
103331
+ const header = JSON.parse(Buffer.from(segments[0], "base64url").toString("utf8"));
103332
+ const payload = JSON.parse(Buffer.from(segments[1], "base64url").toString("utf8"));
103333
+ return isObject2(header) && isObject2(payload);
103334
+ } catch {
103335
+ return false;
103336
+ }
103337
+ }
103338
+ function admitGatewayConfig(value) {
103339
+ if (!isObject2(value)) {
103340
+ return { config: null, rejection: "invalid_config", hasCredential: false };
103341
+ }
103342
+ const url2 = typeof value.url === "string" ? normalizeGatewayUrl(value.url) : "";
103343
+ const key = typeof value.key === "string" ? value.key : "";
103344
+ if (!url2 || !key) {
103345
+ return {
103346
+ config: null,
103347
+ rejection: "invalid_config",
103348
+ url: url2 || undefined,
103349
+ hasCredential: Boolean(key)
103350
+ };
103351
+ }
103352
+ const hasAnyMetadata = value.schema_version !== undefined || value.credential_type !== undefined || value.issuer !== undefined;
103353
+ if (!hasAnyMetadata) {
103354
+ if (!isStructurallyValidGatewayJwt(key)) {
103355
+ return {
103356
+ config: null,
103357
+ rejection: "untyped_opaque_credential",
103358
+ url: url2,
103359
+ hasCredential: true
103360
+ };
103361
+ }
103362
+ return {
103363
+ config: {
103364
+ schema_version: 2,
103365
+ url: url2,
103366
+ key,
103367
+ credential_type: "margay_jwt",
103368
+ issuer: url2
103369
+ },
103370
+ url: url2,
103371
+ hasCredential: true
103372
+ };
103373
+ }
103374
+ if (value.schema_version !== 2 || value.credential_type !== "margay_jwt" && value.credential_type !== "verified_gateway_credential" || typeof value.issuer !== "string") {
103375
+ return {
103376
+ config: null,
103377
+ rejection: "invalid_credential_type",
103378
+ url: url2,
103379
+ hasCredential: true
103380
+ };
103381
+ }
103382
+ const issuer = normalizeGatewayUrl(value.issuer);
103383
+ if (issuer !== url2) {
103384
+ return { config: null, rejection: "issuer_mismatch", url: url2, hasCredential: true };
103385
+ }
103386
+ if (value.credential_type === "margay_jwt" && !isStructurallyValidGatewayJwt(key)) {
103387
+ return {
103388
+ config: null,
103389
+ rejection: "invalid_gateway_jwt",
103390
+ url: url2,
103391
+ hasCredential: true
103392
+ };
103393
+ }
103394
+ return {
103395
+ config: {
103396
+ schema_version: 2,
103397
+ url: url2,
103398
+ key,
103399
+ credential_type: value.credential_type,
103400
+ issuer
103401
+ },
103402
+ url: url2,
103403
+ hasCredential: true
103404
+ };
103405
+ }
103406
+ function inspectGatewayEnv(env5 = process.env) {
103407
+ const url2 = env5.CCL_GATEWAY_URL;
103408
+ const key = env5.CCL_GATEWAY_KEY;
103409
+ if (!url2 && !key) {
103410
+ return { config: null, rejection: "missing_config", hasCredential: false };
103411
+ }
103412
+ const credentialType = env5.CCL_GATEWAY_CREDENTIAL_TYPE;
103413
+ const issuer = env5.CCL_GATEWAY_ISSUER;
103414
+ const hasMetadata = credentialType !== undefined || issuer !== undefined;
103415
+ return admitGatewayConfig({
103416
+ url: url2,
103417
+ key,
103418
+ ...hasMetadata ? {
103419
+ schema_version: 2,
103420
+ credential_type: credentialType,
103421
+ issuer
103422
+ } : {}
103423
+ });
103424
+ }
103425
+ function setGatewayEnv(config) {
103426
+ process.env.CCL_GATEWAY_URL = config.url;
103427
+ process.env.CCL_GATEWAY_KEY = config.key;
103428
+ process.env.CCL_GATEWAY_CREDENTIAL_TYPE = config.credential_type;
103429
+ process.env.CCL_GATEWAY_ISSUER = config.issuer;
103430
+ }
103431
+ function clearGatewayEnv() {
103432
+ delete process.env.CCL_GATEWAY_URL;
103433
+ delete process.env.CCL_GATEWAY_KEY;
103434
+ delete process.env.CCL_GATEWAY_CREDENTIAL_TYPE;
103435
+ delete process.env.CCL_GATEWAY_ISSUER;
103436
+ }
103310
103437
  function hasExplicitGatewayEnvOverride() {
103311
103438
  if (gatewayTestEnvOverrideMode) {
103312
- return Boolean(process.env.CCL_GATEWAY_URL && process.env.CCL_GATEWAY_KEY);
103439
+ return inspectGatewayEnv().config !== null;
103313
103440
  }
103314
- return explicitGatewayEnvOverride && process.env.CCL_GATEWAY_URL === startupGatewayEnv.url && process.env.CCL_GATEWAY_KEY === startupGatewayEnv.key;
103441
+ return explicitGatewayEnvOverride && process.env.CCL_GATEWAY_URL === startupGatewayEnv.url && process.env.CCL_GATEWAY_KEY === startupGatewayEnv.key && process.env.CCL_GATEWAY_CREDENTIAL_TYPE === startupGatewayEnv.credentialType && process.env.CCL_GATEWAY_ISSUER === startupGatewayEnv.issuer;
103315
103442
  }
103316
103443
  function getLoadedGatewayConfig() {
103317
103444
  if (loadedGatewayConfigDir !== getClaudeConfigHomeDir())
@@ -103319,16 +103446,20 @@ function getLoadedGatewayConfig() {
103319
103446
  return loadedGatewayConfig;
103320
103447
  }
103321
103448
  function readGatewayJson(configDir) {
103449
+ return inspectGatewayJson(configDir).config;
103450
+ }
103451
+ function inspectGatewayJson(configDir) {
103322
103452
  const dir = configDir ?? getClaudeConfigHomeDir();
103323
103453
  try {
103324
103454
  const raw = readFileSync5(join22(dir, "gateway.json"), "utf-8");
103325
- const parsed = JSON.parse(raw);
103326
- if (typeof parsed?.url === "string" && typeof parsed?.key === "string") {
103327
- return { url: parsed.url, key: parsed.key };
103328
- }
103329
- return null;
103330
- } catch {
103331
- return null;
103455
+ return admitGatewayConfig(JSON.parse(raw));
103456
+ } catch (error) {
103457
+ const code = isObject2(error) && typeof error.code === "string" ? error.code : undefined;
103458
+ return {
103459
+ config: null,
103460
+ rejection: code === "ENOENT" ? "missing_config" : "invalid_config",
103461
+ hasCredential: false
103462
+ };
103332
103463
  }
103333
103464
  }
103334
103465
  function writeGatewayJson(config, configDir) {
@@ -103351,30 +103482,40 @@ function loadGatewayConfigFromFile(configDir) {
103351
103482
  const envUrl = process.env.CCL_GATEWAY_URL;
103352
103483
  const envKey = process.env.CCL_GATEWAY_KEY;
103353
103484
  const hasCompleteEnv = hasCompleteGatewayEnv(envUrl, envKey);
103485
+ const admittedEnv = inspectGatewayEnv().config;
103354
103486
  const generatedRcEnv = startupEnvMatchesGeneratedRcBlock();
103355
103487
  const config = readGatewayJson(configDir);
103356
- if (hasCompleteEnv && hasExplicitGatewayEnvOverride())
103488
+ if (hasCompleteEnv && admittedEnv && hasExplicitGatewayEnvOverride())
103357
103489
  return;
103358
103490
  if (generatedRcEnv) {
103359
103491
  removeShellRcSync();
103360
103492
  explicitGatewayEnvOverride = false;
103361
103493
  }
103362
- if (!config)
103494
+ if (!config) {
103495
+ if (hasCompleteEnv && !admittedEnv)
103496
+ clearGatewayEnv();
103363
103497
  return;
103364
- process.env.CCL_GATEWAY_URL = config.url;
103365
- process.env.CCL_GATEWAY_KEY = config.key;
103498
+ }
103499
+ setGatewayEnv(config);
103366
103500
  loadedGatewayConfig = config;
103367
103501
  loadedGatewayConfigDir = configDir ?? getClaudeConfigHomeDir();
103368
103502
  }
103369
- var DEFAULT_GATEWAY_URL = "https://gateway.margay-ai.com", startupGatewayEnv, explicitGatewayEnvOverride, loadedGatewayConfig = null, loadedGatewayConfigDir = null, gatewayTestEnvOverrideMode = false;
103503
+ var DEFAULT_GATEWAY_URL = "https://gateway.margay-ai.com", startupGatewayEnv, explicitGatewayEnvOverride = false, loadedGatewayConfig = null, loadedGatewayConfigDir = null, gatewayTestEnvOverrideMode = false;
103370
103504
  var init_gatewayConfig = __esm(() => {
103371
103505
  init_envUtils();
103372
103506
  init_shellRcSync();
103373
103507
  startupGatewayEnv = {
103374
103508
  url: process.env.CCL_GATEWAY_URL,
103375
- key: process.env.CCL_GATEWAY_KEY
103376
- };
103377
- explicitGatewayEnvOverride = hasCompleteGatewayEnv(startupGatewayEnv.url, startupGatewayEnv.key) && !startupEnvMatchesGeneratedRcBlock();
103509
+ key: process.env.CCL_GATEWAY_KEY,
103510
+ credentialType: process.env.CCL_GATEWAY_CREDENTIAL_TYPE,
103511
+ issuer: process.env.CCL_GATEWAY_ISSUER
103512
+ };
103513
+ explicitGatewayEnvOverride = inspectGatewayEnv({
103514
+ CCL_GATEWAY_URL: startupGatewayEnv.url,
103515
+ CCL_GATEWAY_KEY: startupGatewayEnv.key,
103516
+ CCL_GATEWAY_CREDENTIAL_TYPE: startupGatewayEnv.credentialType,
103517
+ CCL_GATEWAY_ISSUER: startupGatewayEnv.issuer
103518
+ }).config !== null && !startupEnvMatchesGeneratedRcBlock();
103378
103519
  loadGatewayConfigFromFile();
103379
103520
  });
103380
103521
 
@@ -122992,11 +123133,11 @@ var require_verify_stream = __commonJS((exports, module) => {
122992
123133
  var toString3 = require_tostring();
122993
123134
  var util3 = __require("util");
122994
123135
  var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;
122995
- function isObject2(thing) {
123136
+ function isObject3(thing) {
122996
123137
  return Object.prototype.toString.call(thing) === "[object Object]";
122997
123138
  }
122998
123139
  function safeJsonParse(thing) {
122999
- if (isObject2(thing))
123140
+ if (isObject3(thing))
123000
123141
  return thing;
123001
123142
  try {
123002
123143
  return JSON.parse(thing);
@@ -125407,13 +125548,13 @@ var require_lodash = __commonJS((exports, module) => {
125407
125548
  return isObjectLike(value) && isArrayLike(value);
125408
125549
  }
125409
125550
  function isFunction5(value) {
125410
- var tag = isObject2(value) ? objectToString.call(value) : "";
125551
+ var tag = isObject3(value) ? objectToString.call(value) : "";
125411
125552
  return tag == funcTag || tag == genTag;
125412
125553
  }
125413
125554
  function isLength(value) {
125414
125555
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
125415
125556
  }
125416
- function isObject2(value) {
125557
+ function isObject3(value) {
125417
125558
  var type = typeof value;
125418
125559
  return !!value && (type == "object" || type == "function");
125419
125560
  }
@@ -125448,9 +125589,9 @@ var require_lodash = __commonJS((exports, module) => {
125448
125589
  if (isSymbol(value)) {
125449
125590
  return NAN;
125450
125591
  }
125451
- if (isObject2(value)) {
125592
+ if (isObject3(value)) {
125452
125593
  var other = typeof value.valueOf == "function" ? value.valueOf() : value;
125453
- value = isObject2(other) ? other + "" : other;
125594
+ value = isObject3(other) ? other + "" : other;
125454
125595
  }
125455
125596
  if (typeof value != "string") {
125456
125597
  return value === 0 ? value : +value;
@@ -125498,7 +125639,7 @@ var require_lodash3 = __commonJS((exports, module) => {
125498
125639
  function isInteger(value) {
125499
125640
  return typeof value == "number" && value == toInteger(value);
125500
125641
  }
125501
- function isObject2(value) {
125642
+ function isObject3(value) {
125502
125643
  var type = typeof value;
125503
125644
  return !!value && (type == "object" || type == "function");
125504
125645
  }
@@ -125530,9 +125671,9 @@ var require_lodash3 = __commonJS((exports, module) => {
125530
125671
  if (isSymbol(value)) {
125531
125672
  return NAN;
125532
125673
  }
125533
- if (isObject2(value)) {
125674
+ if (isObject3(value)) {
125534
125675
  var other = typeof value.valueOf == "function" ? value.valueOf() : value;
125535
- value = isObject2(other) ? other + "" : other;
125676
+ value = isObject3(other) ? other + "" : other;
125536
125677
  }
125537
125678
  if (typeof value != "string") {
125538
125679
  return value === 0 ? value : +value;
@@ -125647,7 +125788,7 @@ var require_lodash7 = __commonJS((exports, module) => {
125647
125788
  function once(func) {
125648
125789
  return before(2, func);
125649
125790
  }
125650
- function isObject2(value) {
125791
+ function isObject3(value) {
125651
125792
  var type = typeof value;
125652
125793
  return !!value && (type == "object" || type == "function");
125653
125794
  }
@@ -125679,9 +125820,9 @@ var require_lodash7 = __commonJS((exports, module) => {
125679
125820
  if (isSymbol(value)) {
125680
125821
  return NAN;
125681
125822
  }
125682
- if (isObject2(value)) {
125823
+ if (isObject3(value)) {
125683
125824
  var other = typeof value.valueOf == "function" ? value.valueOf() : value;
125684
- value = isObject2(other) ? other + "" : other;
125825
+ value = isObject3(other) ? other + "" : other;
125685
125826
  }
125686
125827
  if (typeof value != "string") {
125687
125828
  return value === 0 ? value : +value;
@@ -147638,11 +147779,11 @@ var require_ponyfill_es2018 = __commonJS((exports, module) => {
147638
147779
  throw new TypeError(`${context2} is not a function.`);
147639
147780
  }
147640
147781
  }
147641
- function isObject3(x3) {
147782
+ function isObject4(x3) {
147642
147783
  return typeof x3 === "object" && x3 !== null || typeof x3 === "function";
147643
147784
  }
147644
147785
  function assertObject(x3, context2) {
147645
- if (!isObject3(x3)) {
147786
+ if (!isObject4(x3)) {
147646
147787
  throw new TypeError(`${context2} is not an object.`);
147647
147788
  }
147648
147789
  }
@@ -162289,7 +162430,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
162289
162430
  if (isApiKeyHelperFromProjectOrLocalSettings()) {
162290
162431
  const hasTrust = checkHasTrustDialogAccepted();
162291
162432
  if (!hasTrust && !isNonInteractiveSession) {
162292
- const error5 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.FEEDBACK_CHANNEL}.`);
162433
+ const error5 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.FEEDBACK_CHANNEL}.`);
162293
162434
  logAntError("apiKeyHelper invoked before trust check", error5);
162294
162435
  logEvent("tengu_apiKeyHelper_missing_trust11", {});
162295
162436
  return null;
@@ -162333,7 +162474,7 @@ async function runAwsAuthRefresh() {
162333
162474
  if (isAwsAuthRefreshFromProjectSettings()) {
162334
162475
  const hasTrust = checkHasTrustDialogAccepted();
162335
162476
  if (!hasTrust && !getIsNonInteractiveSession()) {
162336
- const error5 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.FEEDBACK_CHANNEL}.`);
162477
+ const error5 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.FEEDBACK_CHANNEL}.`);
162337
162478
  logAntError("awsAuthRefresh invoked before trust check", error5);
162338
162479
  logEvent("tengu_awsAuthRefresh_missing_trust", {});
162339
162480
  return false;
@@ -162393,7 +162534,7 @@ async function getAwsCredsFromCredentialExport() {
162393
162534
  if (isAwsCredentialExportFromProjectSettings()) {
162394
162535
  const hasTrust = checkHasTrustDialogAccepted();
162395
162536
  if (!hasTrust && !getIsNonInteractiveSession()) {
162396
- const error5 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.FEEDBACK_CHANNEL}.`);
162537
+ const error5 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.FEEDBACK_CHANNEL}.`);
162397
162538
  logAntError("awsCredentialExport invoked before trust check", error5);
162398
162539
  logEvent("tengu_awsCredentialExport_missing_trust", {});
162399
162540
  return null;
@@ -162478,7 +162619,7 @@ async function runGcpAuthRefresh() {
162478
162619
  if (isGcpAuthRefreshFromProjectSettings()) {
162479
162620
  const hasTrust = checkHasTrustDialogAccepted();
162480
162621
  if (!hasTrust && !getIsNonInteractiveSession()) {
162481
- const error5 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.FEEDBACK_CHANNEL}.`);
162622
+ const error5 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.FEEDBACK_CHANNEL}.`);
162482
162623
  logAntError("gcpAuthRefresh invoked before trust check", error5);
162483
162624
  logEvent("tengu_gcpAuthRefresh_missing_trust", {});
162484
162625
  return false;
@@ -163188,7 +163329,7 @@ var init_auth2 = __esm(() => {
163188
163329
 
163189
163330
  // utils/userAgent.ts
163190
163331
  function getClaudeCodeUserAgent() {
163191
- return `claude-code/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION}`;
163332
+ return `claude-code/${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION}`;
163192
163333
  }
163193
163334
 
163194
163335
  // utils/workloadContext.ts
@@ -163210,7 +163351,7 @@ function getUserAgent() {
163210
163351
  const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
163211
163352
  const workload = getWorkload();
163212
163353
  const workloadSuffix = workload ? `, workload/${workload}` : "";
163213
- return `claude-cli/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
163354
+ return `claude-cli/${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
163214
163355
  }
163215
163356
  function getMCPUserAgent() {
163216
163357
  const parts = [];
@@ -163224,7 +163365,7 @@ function getMCPUserAgent() {
163224
163365
  parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
163225
163366
  }
163226
163367
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
163227
- return `claude-code/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION}${suffix}`;
163368
+ return `claude-code/${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION}${suffix}`;
163228
163369
  }
163229
163370
  function getWebFetchUserAgent() {
163230
163371
  return `Claude-User (${getClaudeCodeUserAgent()}; +https://support.anthropic.com/)`;
@@ -163362,7 +163503,7 @@ var init_user = __esm(() => {
163362
163503
  deviceId,
163363
163504
  sessionId: getSessionId(),
163364
163505
  email: getEmail(),
163365
- appVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
163506
+ appVersion: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
163366
163507
  platform: getHostPlatformForAnalytics(),
163367
163508
  organizationUuid,
163368
163509
  accountUuid,
@@ -167290,15 +167431,15 @@ var require_merge = __commonJS((exports) => {
167290
167431
  for (let i3 = 0, j2 = two.length;i3 < j2; i3++) {
167291
167432
  result.push(takeValue(two[i3]));
167292
167433
  }
167293
- } else if (isObject3(two)) {
167434
+ } else if (isObject4(two)) {
167294
167435
  const keys = Object.keys(two);
167295
167436
  for (let i3 = 0, j2 = keys.length;i3 < j2; i3++) {
167296
167437
  const key = keys[i3];
167297
167438
  result[key] = takeValue(two[key]);
167298
167439
  }
167299
167440
  }
167300
- } else if (isObject3(one)) {
167301
- if (isObject3(two)) {
167441
+ } else if (isObject4(one)) {
167442
+ if (isObject4(two)) {
167302
167443
  if (!shouldMerge(one, two)) {
167303
167444
  return two;
167304
167445
  }
@@ -167319,7 +167460,7 @@ var require_merge = __commonJS((exports) => {
167319
167460
  if (wasObjectReferenced(one, key, objects) || wasObjectReferenced(two, key, objects)) {
167320
167461
  delete result[key];
167321
167462
  } else {
167322
- if (isObject3(obj1) && isObject3(obj2)) {
167463
+ if (isObject4(obj1) && isObject4(obj2)) {
167323
167464
  const arr1 = objects.get(obj1) || [];
167324
167465
  const arr2 = objects.get(obj2) || [];
167325
167466
  arr1.push({ obj: one, key });
@@ -167353,7 +167494,7 @@ var require_merge = __commonJS((exports) => {
167353
167494
  function isFunction5(value) {
167354
167495
  return typeof value === "function";
167355
167496
  }
167356
- function isObject3(value) {
167497
+ function isObject4(value) {
167357
167498
  return !isPrimitive(value) && !isArray6(value) && !isFunction5(value) && typeof value === "object";
167358
167499
  }
167359
167500
  function isPrimitive(value) {
@@ -171059,7 +171200,7 @@ var init_metadata = __esm(() => {
171059
171200
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
171060
171201
  WHITESPACE_REGEX = /\s+/;
171061
171202
  getVersionBase = memoize20(() => {
171062
- const match = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
171203
+ const match = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
171063
171204
  return match ? match[0] : undefined;
171064
171205
  });
171065
171206
  buildEnvContext = memoize20(async () => {
@@ -171099,9 +171240,9 @@ var init_metadata = __esm(() => {
171099
171240
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
171100
171241
  isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
171101
171242
  isClaudeAiAuth: isClaudeAISubscriber(),
171102
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
171243
+ version: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
171103
171244
  versionBase: getVersionBase(),
171104
- buildTime: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.BUILD_TIME,
171245
+ buildTime: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.BUILD_TIME,
171105
171246
  deploymentEnvironment: env4.detectDeploymentEnvironment(),
171106
171247
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
171107
171248
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -171768,7 +171909,7 @@ function initialize1PEventLogging() {
171768
171909
  const platform2 = getPlatform();
171769
171910
  const attributes = {
171770
171911
  [import_semantic_conventions.ATTR_SERVICE_NAME]: "claude-code",
171771
- [import_semantic_conventions.ATTR_SERVICE_VERSION]: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
171912
+ [import_semantic_conventions.ATTR_SERVICE_VERSION]: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
171772
171913
  };
171773
171914
  if (platform2 === "wsl") {
171774
171915
  const wslVersion = getWslVersion();
@@ -171795,7 +171936,7 @@ function initialize1PEventLogging() {
171795
171936
  })
171796
171937
  ]
171797
171938
  });
171798
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION);
171939
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION);
171799
171940
  }
171800
171941
  async function reinitialize1PEventLoggingIfConfigChanged() {
171801
171942
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -197851,7 +197992,7 @@ var require_lodash8 = __commonJS((exports, module) => {
197851
197992
  throw new TypeError(FUNC_ERROR_TEXT);
197852
197993
  }
197853
197994
  wait = toNumber(wait) || 0;
197854
- if (isObject3(options)) {
197995
+ if (isObject4(options)) {
197855
197996
  leading = !!options.leading;
197856
197997
  maxing = "maxWait" in options;
197857
197998
  maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
@@ -197925,7 +198066,7 @@ var require_lodash8 = __commonJS((exports, module) => {
197925
198066
  debounced.flush = flush;
197926
198067
  return debounced;
197927
198068
  }
197928
- function isObject3(value) {
198069
+ function isObject4(value) {
197929
198070
  var type = typeof value;
197930
198071
  return !!value && (type == "object" || type == "function");
197931
198072
  }
@@ -197942,9 +198083,9 @@ var require_lodash8 = __commonJS((exports, module) => {
197942
198083
  if (isSymbol(value)) {
197943
198084
  return NAN;
197944
198085
  }
197945
- if (isObject3(value)) {
198086
+ if (isObject4(value)) {
197946
198087
  var other = typeof value.valueOf == "function" ? value.valueOf() : value;
197947
- value = isObject3(other) ? other + "" : other;
198088
+ value = isObject4(other) ? other + "" : other;
197948
198089
  }
197949
198090
  if (typeof value != "string") {
197950
198091
  return value === 0 ? value : +value;
@@ -200715,7 +200856,7 @@ function getAttributionHeader(fingerprint) {
200715
200856
  if (!isAttributionHeaderEnabled()) {
200716
200857
  return "";
200717
200858
  }
200718
- const version4 = `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION}.${fingerprint}`;
200859
+ const version4 = `${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION}.${fingerprint}`;
200719
200860
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
200720
200861
  const cch = "";
200721
200862
  const workload = getWorkload();
@@ -203628,7 +203769,7 @@ var require_picomatch = __commonJS((exports, module) => {
203628
203769
  var parse4 = require_parse7();
203629
203770
  var utils = require_utils10();
203630
203771
  var constants2 = require_constants11();
203631
- var isObject3 = (val) => val && typeof val === "object" && !Array.isArray(val);
203772
+ var isObject4 = (val) => val && typeof val === "object" && !Array.isArray(val);
203632
203773
  var picomatch = (glob, options, returnState = false) => {
203633
203774
  if (Array.isArray(glob)) {
203634
203775
  const fns = glob.map((input) => picomatch(input, options, returnState));
@@ -203642,7 +203783,7 @@ var require_picomatch = __commonJS((exports, module) => {
203642
203783
  };
203643
203784
  return arrayMatcher;
203644
203785
  }
203645
- const isState = isObject3(glob) && glob.tokens && glob.input;
203786
+ const isState = isObject4(glob) && glob.tokens && glob.input;
203646
203787
  if (glob === "" || typeof glob !== "string" && !isState) {
203647
203788
  throw new TypeError("Expected pattern to be a non-empty string");
203648
203789
  }
@@ -232936,7 +233077,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
232936
233077
  }
232937
233078
  function getFeedbackGuideline() {
232938
233079
  if (isUsing3PServices()) {
232939
- return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.ISSUES_EXPLAINER}`;
233080
+ return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.ISSUES_EXPLAINER}`;
232940
233081
  }
232941
233082
  return "- When you cannot find an answer or the feature doesn't exist, direct the user to use /feedback to report a feature request or bug";
232942
233083
  }
@@ -233729,6 +233870,524 @@ Use the literal string \`VERDICT: \` followed by exactly one of \`PASS\`, \`FAIL
233729
233870
  };
233730
233871
  });
233731
233872
 
233873
+ // services/api/gatewayTransport.ts
233874
+ function getCclGatewayUA(model) {
233875
+ return model ? `ccl/${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} (${model})` : `ccl/${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION}`;
233876
+ }
233877
+ function normalizeGatewayRequestId(value) {
233878
+ if (typeof value !== "string" || value.length === 0 || value.length > 128) {
233879
+ return;
233880
+ }
233881
+ for (const character of value) {
233882
+ const code = character.charCodeAt(0);
233883
+ const allowed = code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || character === "-" || character === "_" || character === "." || character === ":";
233884
+ if (!allowed)
233885
+ return;
233886
+ }
233887
+ return value;
233888
+ }
233889
+ function boundedToken(value, max2 = 256) {
233890
+ if (typeof value !== "string" || value.length === 0 || value.length > max2)
233891
+ return;
233892
+ for (const character of value) {
233893
+ const code = character.charCodeAt(0);
233894
+ const allowed = code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || character === "-" || character === "_" || character === "." || character === ":" || character === "/";
233895
+ if (!allowed)
233896
+ return;
233897
+ }
233898
+ return value;
233899
+ }
233900
+ function lowerHexSha256(value) {
233901
+ if (typeof value !== "string" || value.length !== 64)
233902
+ return;
233903
+ for (const character of value) {
233904
+ const code = character.charCodeAt(0);
233905
+ if (!(code >= 48 && code <= 57 || code >= 97 && code <= 102))
233906
+ return;
233907
+ }
233908
+ return value;
233909
+ }
233910
+ async function readBoundedGatewayJson(response) {
233911
+ if (!response.body)
233912
+ return;
233913
+ let reader;
233914
+ try {
233915
+ reader = response.body.getReader();
233916
+ const decoder = new TextDecoder("utf-8", { fatal: true });
233917
+ let byteLength = 0;
233918
+ let responseText = "";
233919
+ while (true) {
233920
+ const { done, value } = await reader.read();
233921
+ if (done)
233922
+ break;
233923
+ byteLength += value.byteLength;
233924
+ if (byteLength > MODEL_PROVIDER_UNAVAILABLE_MAX_BYTES)
233925
+ return;
233926
+ responseText += decoder.decode(value, { stream: true });
233927
+ }
233928
+ responseText += decoder.decode();
233929
+ const parsed = JSON.parse(responseText);
233930
+ return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : undefined;
233931
+ } catch {
233932
+ return;
233933
+ } finally {
233934
+ if (reader) {
233935
+ try {
233936
+ await reader.cancel();
233937
+ } catch {}
233938
+ try {
233939
+ reader.releaseLock();
233940
+ } catch {}
233941
+ }
233942
+ }
233943
+ }
233944
+ async function parseGatewayCapabilityPoolExhausted(response) {
233945
+ if (response.status !== 503)
233946
+ return;
233947
+ const record3 = await readBoundedGatewayJson(response);
233948
+ const error5 = record3?.error;
233949
+ if (typeof error5 !== "object" || error5 === null || Array.isArray(error5))
233950
+ return;
233951
+ const fields = error5;
233952
+ if (fields.type !== "api_error" || fields.code !== "capability_pool_exhausted")
233953
+ return;
233954
+ const role = boundedToken(fields.requested_role, 64);
233955
+ const resolutionId = lowerHexSha256(fields.resolution_id);
233956
+ const finalFailureClass = boundedToken(fields.final_failure_class, 128);
233957
+ const eligible2 = fields.eligible_candidates;
233958
+ const attemptable = fields.attemptable_candidates;
233959
+ const rawAttempts = fields.attempts;
233960
+ if (!role || !resolutionId || !finalFailureClass || !Array.isArray(eligible2) || eligible2.length > CAPABILITY_ERROR_MAX_CANDIDATES || !Array.isArray(attemptable) || attemptable.length > CAPABILITY_ERROR_MAX_CANDIDATES || !Array.isArray(rawAttempts) || rawAttempts.length > CAPABILITY_ERROR_MAX_ATTEMPTS || eligible2.some((value) => !boundedToken(value)) || attemptable.some((value) => !boundedToken(value)))
233961
+ return;
233962
+ const attempts = [];
233963
+ for (const rawAttempt of rawAttempts) {
233964
+ if (typeof rawAttempt !== "object" || rawAttempt === null || Array.isArray(rawAttempt))
233965
+ return;
233966
+ const value = rawAttempt;
233967
+ const model = boundedToken(value.model);
233968
+ const deployment = value.deployment === undefined ? undefined : boundedToken(value.deployment);
233969
+ const failureClass = boundedToken(value.failure_class, 128);
233970
+ if (!model || !failureClass || value.deployment !== undefined && !deployment)
233971
+ return;
233972
+ attempts.push({ model, ...deployment ? { deployment } : {}, failureClass });
233973
+ }
233974
+ return new GatewayCapabilityPoolExhaustedError({
233975
+ role,
233976
+ resolutionId,
233977
+ requestId: normalizeGatewayRequestId(response.headers.get("x-margay-request-id")) ?? normalizeGatewayRequestId(record3?.request_id),
233978
+ finalFailureClass,
233979
+ attempts
233980
+ });
233981
+ }
233982
+ function parseGatewayInvalidCapabilityContext(status, responseText) {
233983
+ if (status !== 400 || Buffer.byteLength(responseText, "utf8") > MODEL_PROVIDER_UNAVAILABLE_MAX_BYTES)
233984
+ return;
233985
+ try {
233986
+ const parsed = JSON.parse(responseText);
233987
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
233988
+ return;
233989
+ const error5 = parsed.error;
233990
+ if (typeof error5 !== "object" || error5 === null || Array.isArray(error5))
233991
+ return;
233992
+ return error5.type === "invalid_capability_context" ? new GatewayInvalidCapabilityContextError : undefined;
233993
+ } catch {
233994
+ return;
233995
+ }
233996
+ }
233997
+ async function parseGatewayModelProviderUnavailable(response) {
233998
+ if (response.status !== 503 || !response.body)
233999
+ return;
234000
+ let reader;
234001
+ try {
234002
+ reader = response.body.getReader();
234003
+ const decoder = new TextDecoder("utf-8", { fatal: true });
234004
+ let byteLength = 0;
234005
+ let responseText = "";
234006
+ while (true) {
234007
+ const { done, value } = await reader.read();
234008
+ if (done)
234009
+ break;
234010
+ byteLength += value.byteLength;
234011
+ if (byteLength > MODEL_PROVIDER_UNAVAILABLE_MAX_BYTES)
234012
+ return;
234013
+ responseText += decoder.decode(value, { stream: true });
234014
+ }
234015
+ responseText += decoder.decode();
234016
+ const parsed = JSON.parse(responseText);
234017
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
234018
+ return;
234019
+ }
234020
+ const record3 = parsed;
234021
+ const error5 = record3.error;
234022
+ if (typeof error5 !== "object" || error5 === null || Array.isArray(error5)) {
234023
+ return;
234024
+ }
234025
+ const fields = error5;
234026
+ if (fields.type !== "api_error" || fields.code !== "model_provider_unavailable") {
234027
+ return;
234028
+ }
234029
+ const headerRequestId = normalizeGatewayRequestId(response.headers.get("x-margay-request-id"));
234030
+ const bodyRequestId = normalizeGatewayRequestId(record3.request_id);
234031
+ return new GatewayModelProviderUnavailableError(headerRequestId ?? bodyRequestId);
234032
+ } catch {
234033
+ return;
234034
+ } finally {
234035
+ if (reader) {
234036
+ try {
234037
+ await reader.cancel();
234038
+ } catch {}
234039
+ try {
234040
+ reader.releaseLock();
234041
+ } catch {}
234042
+ }
234043
+ }
234044
+ }
234045
+ function parseGatewayContextCapabilityUnavailable(status, responseText) {
234046
+ if (status !== 422)
234047
+ return;
234048
+ let parsed;
234049
+ try {
234050
+ parsed = JSON.parse(responseText);
234051
+ } catch {
234052
+ return;
234053
+ }
234054
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
234055
+ return;
234056
+ }
234057
+ const error5 = parsed.error;
234058
+ if (typeof error5 !== "object" || error5 === null || Array.isArray(error5)) {
234059
+ return;
234060
+ }
234061
+ const fields = error5;
234062
+ if (fields.type !== "context_capability_unavailable" || !Number.isSafeInteger(fields.required_context_tokens) || fields.required_context_tokens <= 0) {
234063
+ return;
234064
+ }
234065
+ return new GatewayContextCapabilityUnavailableError(fields.required_context_tokens);
234066
+ }
234067
+ function parseGatewayAlternateDeploymentUnavailable(status, responseText) {
234068
+ if (status !== 409)
234069
+ return;
234070
+ let parsed;
234071
+ try {
234072
+ parsed = JSON.parse(responseText);
234073
+ } catch {
234074
+ return;
234075
+ }
234076
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
234077
+ return;
234078
+ }
234079
+ const error5 = parsed.error;
234080
+ if (typeof error5 !== "object" || error5 === null || Array.isArray(error5)) {
234081
+ return;
234082
+ }
234083
+ if (error5.type !== "alternate_deployment_unavailable") {
234084
+ return;
234085
+ }
234086
+ return new GatewayAlternateDeploymentUnavailableError;
234087
+ }
234088
+ function normalizeGatewayAvoidDeployment(value) {
234089
+ const trimmed = value?.trim();
234090
+ if (!trimmed || trimmed.length > 128)
234091
+ return;
234092
+ for (const character of trimmed) {
234093
+ const code = character.charCodeAt(0);
234094
+ const allowed = code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || character === "-" || character === "_" || character === "." || character === ":";
234095
+ if (!allowed)
234096
+ return;
234097
+ }
234098
+ return trimmed;
234099
+ }
234100
+ async function createGatewayStream(options) {
234101
+ const {
234102
+ url: url3,
234103
+ key,
234104
+ body,
234105
+ signal,
234106
+ tags,
234107
+ minimumContextTokens,
234108
+ avoidDeployment,
234109
+ capabilityContext
234110
+ } = options;
234111
+ const normalizedAvoidDeployment = normalizeGatewayAvoidDeployment(avoidDeployment);
234112
+ let lastError;
234113
+ for (let attempt = 0;attempt <= GATEWAY_MAX_RETRIES; attempt++) {
234114
+ if (signal?.aborted)
234115
+ throw new APIUserAbortError;
234116
+ if (attempt > 0) {
234117
+ await new Promise((r3) => setTimeout(r3, GATEWAY_RETRY_DELAYS[attempt - 1]));
234118
+ }
234119
+ try {
234120
+ const response = await fetch(url3, {
234121
+ method: "POST",
234122
+ headers: {
234123
+ "Content-Type": "application/json",
234124
+ Authorization: `Bearer ${key}`,
234125
+ "User-Agent": getCclGatewayUA(body.model),
234126
+ ...tags ? { "x-litellm-tags": tags } : {},
234127
+ ...Number.isSafeInteger(minimumContextTokens) && (minimumContextTokens ?? 0) > 0 ? {
234128
+ "X-Margay-Min-Context-Tokens": String(minimumContextTokens)
234129
+ } : {},
234130
+ ...normalizedAvoidDeployment ? {
234131
+ "X-Margay-Avoid-Deployment": normalizedAvoidDeployment
234132
+ } : {},
234133
+ ...capabilityContext ? { "X-Margay-Capability-Context": capabilityContext } : {}
234134
+ },
234135
+ body: JSON.stringify({ ...body, stream: true }),
234136
+ signal
234137
+ });
234138
+ if (response.status === 503) {
234139
+ const capabilityPoolError = await parseGatewayCapabilityPoolExhausted(response.clone());
234140
+ if (capabilityPoolError)
234141
+ throw capabilityPoolError;
234142
+ const providerUnavailableError = await parseGatewayModelProviderUnavailable(response);
234143
+ if (providerUnavailableError)
234144
+ throw providerUnavailableError;
234145
+ }
234146
+ if (response.status === 429 || response.status >= 500) {
234147
+ await response.body?.cancel().catch(() => {});
234148
+ lastError = response.status >= 500 ? new GatewayUpstreamUnavailableError(response.status) : new Error(`Gateway ${response.status}`);
234149
+ continue;
234150
+ }
234151
+ if (!response.ok) {
234152
+ const errorText = await response.text().catch(() => "");
234153
+ const invalidCapabilityContext = parseGatewayInvalidCapabilityContext(response.status, errorText);
234154
+ if (invalidCapabilityContext)
234155
+ throw invalidCapabilityContext;
234156
+ const alternateUnavailableError = parseGatewayAlternateDeploymentUnavailable(response.status, errorText);
234157
+ if (alternateUnavailableError)
234158
+ throw alternateUnavailableError;
234159
+ const contextCapabilityError = parseGatewayContextCapabilityUnavailable(response.status, errorText);
234160
+ if (contextCapabilityError)
234161
+ throw contextCapabilityError;
234162
+ throw new GatewayNonRetryableError(`Gateway ${response.status}: ${errorText}`);
234163
+ }
234164
+ return {
234165
+ stream: new GatewayStream(response, signal),
234166
+ response
234167
+ };
234168
+ } catch (e3) {
234169
+ if (signal?.aborted)
234170
+ throw new APIUserAbortError;
234171
+ if (e3 instanceof GatewayNonRetryableError)
234172
+ throw e3;
234173
+ lastError = e3;
234174
+ if (attempt === GATEWAY_MAX_RETRIES)
234175
+ throw lastError;
234176
+ }
234177
+ }
234178
+ throw lastError;
234179
+ }
234180
+ var GATEWAY_MAX_RETRIES = 2, GATEWAY_RETRY_DELAYS, MODEL_PROVIDER_UNAVAILABLE_MAX_BYTES, MODEL_PROVIDER_UNAVAILABLE_MESSAGE = "The requested model is currently unavailable from all configured providers. Please retry later.", CAPABILITY_POOL_EXHAUSTED_MESSAGE = "All eligible models for this capability are temporarily unavailable.", CAPABILITY_ERROR_MAX_ATTEMPTS = 64, CAPABILITY_ERROR_MAX_CANDIDATES = 16, GatewayNonRetryableError, GatewayModelProviderUnavailableError, GatewayCapabilityPoolExhaustedError, GatewayInvalidCapabilityContextError, GatewayContextCapabilityUnavailableError, GatewayAlternateDeploymentUnavailableError, GatewayUpstreamUnavailableError, GatewayStreamProtocolError, GatewayStream;
234181
+ var init_gatewayTransport = __esm(() => {
234182
+ init_sdk();
234183
+ GATEWAY_RETRY_DELAYS = [1000, 3000];
234184
+ MODEL_PROVIDER_UNAVAILABLE_MAX_BYTES = 16 * 1024;
234185
+ GatewayNonRetryableError = class GatewayNonRetryableError extends Error {
234186
+ constructor(message) {
234187
+ super(message);
234188
+ this.name = "GatewayNonRetryableError";
234189
+ }
234190
+ };
234191
+ GatewayModelProviderUnavailableError = class GatewayModelProviderUnavailableError extends GatewayNonRetryableError {
234192
+ code = "model_provider_unavailable";
234193
+ status = 503;
234194
+ requestId;
234195
+ constructor(requestId) {
234196
+ super(MODEL_PROVIDER_UNAVAILABLE_MESSAGE);
234197
+ this.name = "GatewayModelProviderUnavailableError";
234198
+ this.requestId = requestId;
234199
+ }
234200
+ };
234201
+ GatewayCapabilityPoolExhaustedError = class GatewayCapabilityPoolExhaustedError extends GatewayNonRetryableError {
234202
+ code = "capability_pool_exhausted";
234203
+ status = 503;
234204
+ role;
234205
+ resolutionId;
234206
+ requestId;
234207
+ finalFailureClass;
234208
+ attempts;
234209
+ constructor(details) {
234210
+ super(CAPABILITY_POOL_EXHAUSTED_MESSAGE);
234211
+ this.name = "GatewayCapabilityPoolExhaustedError";
234212
+ this.role = details.role;
234213
+ this.resolutionId = details.resolutionId;
234214
+ this.requestId = details.requestId;
234215
+ this.finalFailureClass = details.finalFailureClass;
234216
+ this.attempts = details.attempts.map((attempt) => ({ ...attempt }));
234217
+ }
234218
+ };
234219
+ GatewayInvalidCapabilityContextError = class GatewayInvalidCapabilityContextError extends GatewayNonRetryableError {
234220
+ code = "invalid_capability_context";
234221
+ status = 400;
234222
+ constructor() {
234223
+ super("Gateway rejected stale or invalid capability routing context");
234224
+ this.name = "GatewayInvalidCapabilityContextError";
234225
+ }
234226
+ };
234227
+ GatewayContextCapabilityUnavailableError = class GatewayContextCapabilityUnavailableError extends GatewayNonRetryableError {
234228
+ code = "context_capability_unavailable";
234229
+ requiredContextTokens;
234230
+ constructor(requiredContextTokens) {
234231
+ super("Gateway has no configured deployment with sufficient context capacity");
234232
+ this.name = "GatewayContextCapabilityUnavailableError";
234233
+ this.requiredContextTokens = requiredContextTokens;
234234
+ }
234235
+ };
234236
+ GatewayAlternateDeploymentUnavailableError = class GatewayAlternateDeploymentUnavailableError extends GatewayNonRetryableError {
234237
+ code = "alternate_deployment_unavailable";
234238
+ constructor() {
234239
+ super("Gateway has no alternate deployment for this model");
234240
+ this.name = "GatewayAlternateDeploymentUnavailableError";
234241
+ }
234242
+ };
234243
+ GatewayUpstreamUnavailableError = class GatewayUpstreamUnavailableError extends Error {
234244
+ code = "gateway_upstream_unavailable";
234245
+ status;
234246
+ constructor(status) {
234247
+ super(`Gateway upstream unavailable (HTTP ${status})`);
234248
+ this.name = "GatewayUpstreamUnavailableError";
234249
+ this.status = status;
234250
+ }
234251
+ };
234252
+ GatewayStreamProtocolError = class GatewayStreamProtocolError extends Error {
234253
+ code;
234254
+ lastEventType;
234255
+ partialUsage;
234256
+ constructor(code, message, details = {}) {
234257
+ super(message);
234258
+ this.name = "GatewayStreamProtocolError";
234259
+ this.code = code;
234260
+ this.lastEventType = details.lastEventType;
234261
+ this.partialUsage = details.partialUsage ?? {};
234262
+ }
234263
+ };
234264
+ GatewayStream = class GatewayStream {
234265
+ response;
234266
+ controller;
234267
+ constructor(response, abortSignal) {
234268
+ this.response = response;
234269
+ this.controller = new AbortController;
234270
+ if (abortSignal) {
234271
+ abortSignal.addEventListener("abort", () => this.controller.abort(), { once: true });
234272
+ }
234273
+ }
234274
+ async* [Symbol.asyncIterator]() {
234275
+ const reader = this.response.body.getReader();
234276
+ const decoder = new TextDecoder;
234277
+ let buffer = "";
234278
+ let yieldedAny = false;
234279
+ let rawSnippet = "";
234280
+ let terminalComplete = false;
234281
+ let lastEventType;
234282
+ const partialUsage = {};
234283
+ const protocolError = (code, message) => new GatewayStreamProtocolError(code, message, {
234284
+ lastEventType,
234285
+ partialUsage: { ...partialUsage }
234286
+ });
234287
+ const parseLine = (line) => {
234288
+ const trimmed = line.replace(/\r$/, "");
234289
+ if (!trimmed.startsWith("data:"))
234290
+ return null;
234291
+ const data = trimmed.slice(5).trim();
234292
+ if (!data)
234293
+ return null;
234294
+ if (data === "[DONE]")
234295
+ return "done";
234296
+ let event;
234297
+ try {
234298
+ event = JSON.parse(data);
234299
+ } catch {
234300
+ return null;
234301
+ }
234302
+ const typed = event;
234303
+ const type = typed.type;
234304
+ if (type === "ping") {
234305
+ yieldedAny = true;
234306
+ return null;
234307
+ }
234308
+ yieldedAny = true;
234309
+ if (type)
234310
+ lastEventType = type;
234311
+ const usage = type === "message_start" ? typed.message?.usage : typed.usage;
234312
+ if (usage) {
234313
+ for (const key of ["input_tokens", "output_tokens", "cache_read_input_tokens", "cache_creation_input_tokens"]) {
234314
+ if (typeof usage[key] === "number")
234315
+ partialUsage[key] = usage[key];
234316
+ }
234317
+ }
234318
+ if (type === "error") {
234319
+ const incomplete = typed.margay?.code === "incomplete_upstream_stream";
234320
+ throw protocolError(incomplete ? "incomplete_stream" : "upstream_stream_error", incomplete ? "Gateway upstream stream ended before message_stop" : "Gateway emitted a stream error event");
234321
+ }
234322
+ if (type === "message_stop")
234323
+ terminalComplete = true;
234324
+ return event;
234325
+ };
234326
+ const onAbort = () => {
234327
+ process.stderr.write(`[ccl-trace] {"target":"gateway-stream-abort","action":"cancel-pending-read"}
234328
+ `);
234329
+ reader.cancel().catch(() => {});
234330
+ };
234331
+ if (this.controller.signal.aborted)
234332
+ onAbort();
234333
+ else
234334
+ this.controller.signal.addEventListener("abort", onAbort, { once: true });
234335
+ try {
234336
+ while (true) {
234337
+ if (this.controller.signal.aborted) {
234338
+ return;
234339
+ }
234340
+ const { done, value } = await reader.read();
234341
+ if (done) {
234342
+ if (this.controller.signal.aborted)
234343
+ return;
234344
+ break;
234345
+ }
234346
+ const chunk = decoder.decode(value, { stream: true });
234347
+ if (rawSnippet.length < 500)
234348
+ rawSnippet += chunk.slice(0, 500 - rawSnippet.length);
234349
+ buffer += chunk;
234350
+ const lines = buffer.split(`
234351
+ `);
234352
+ buffer = lines.pop() ?? "";
234353
+ for (const line of lines) {
234354
+ const parsed = parseLine(line);
234355
+ if (parsed === "done") {
234356
+ if (!terminalComplete)
234357
+ throw protocolError("incomplete_stream", "Gateway stream sent [DONE] before message_stop");
234358
+ return;
234359
+ }
234360
+ if (parsed)
234361
+ yield parsed;
234362
+ }
234363
+ }
234364
+ buffer += decoder.decode();
234365
+ if (buffer.trim()) {
234366
+ const parsed = parseLine(buffer);
234367
+ if (parsed === "done") {
234368
+ if (!terminalComplete)
234369
+ throw protocolError("incomplete_stream", "Gateway stream sent [DONE] before message_stop");
234370
+ } else if (parsed) {
234371
+ yield parsed;
234372
+ }
234373
+ }
234374
+ if (!yieldedAny) {
234375
+ const ct2 = this.response.headers.get("content-type") ?? "unknown";
234376
+ throw new Error(`Gateway stream returned no SSE events (status=${this.response.status}, content-type=${ct2}, body=${rawSnippet.slice(0, 200)})`);
234377
+ }
234378
+ if (!terminalComplete) {
234379
+ throw protocolError("incomplete_stream", "Gateway stream ended before message_stop");
234380
+ }
234381
+ } finally {
234382
+ this.controller.signal.removeEventListener("abort", onAbort);
234383
+ try {
234384
+ await reader.cancel();
234385
+ } catch {}
234386
+ }
234387
+ }
234388
+ };
234389
+ });
234390
+
233732
234391
  // services/visual/visualSpecialist.ts
233733
234392
  function assertVisualImagePaths(agentType, imagePaths) {
233734
234393
  if (agentType !== "visual-ui-analysis") {
@@ -233750,24 +234409,35 @@ async function runVisualSpecialist(input, deps) {
233750
234409
  const images = [];
233751
234410
  for (const path11 of imagePaths)
233752
234411
  images.push(await deps.loadImage(path11));
233753
- const selection = await deps.resolve({
234412
+ const request = {
233754
234413
  role: "visual.experimental",
233755
234414
  mode: input.mode ?? "quality",
233756
234415
  requirements: { vision: true }
233757
- });
233758
- if (!selection) {
233759
- throw new Error("Specialist capability unavailable: visual.experimental");
234416
+ };
234417
+ for (let attempt = 0;attempt < 2; attempt += 1) {
234418
+ const selection = await deps.resolve(request);
234419
+ if (!selection) {
234420
+ throw new Error("Specialist capability unavailable: visual.experimental");
234421
+ }
234422
+ try {
234423
+ return await deps.infer({
234424
+ model: selection.resolved_model,
234425
+ ...selection.canonical_model ? { canonicalModel: selection.canonical_model } : {},
234426
+ clientProtocol: selection.client_protocol,
234427
+ ...selection.capability_context ? { capabilityContext: selection.capability_context } : {},
234428
+ systemPrompt: VISUAL_SPECIALIST_SYSTEM_PROMPT,
234429
+ prompt: input.prompt,
234430
+ images,
234431
+ maxOutputTokens: 2048,
234432
+ signal: input.signal ?? new AbortController().signal
234433
+ });
234434
+ } catch (error5) {
234435
+ if (!(error5 instanceof GatewayInvalidCapabilityContextError) || attempt > 0) {
234436
+ throw error5;
234437
+ }
234438
+ }
233760
234439
  }
233761
- return deps.infer({
233762
- model: selection.resolved_model,
233763
- ...selection.canonical_model ? { canonicalModel: selection.canonical_model } : {},
233764
- clientProtocol: selection.client_protocol,
233765
- systemPrompt: VISUAL_SPECIALIST_SYSTEM_PROMPT,
233766
- prompt: input.prompt,
233767
- images,
233768
- maxOutputTokens: 2048,
233769
- signal: input.signal ?? new AbortController().signal
233770
- });
234440
+ throw new Error("Specialist capability unavailable: visual.experimental");
233771
234441
  }
233772
234442
  var VISUAL_SPECIALIST_SYSTEM_PROMPT = `You are CCL's bounded visual analysis specialist.
233773
234443
 
@@ -233775,13 +234445,17 @@ Analyze only the supplied image bytes and the user's stated visual question.
233775
234445
  Report grounded observations first, then relevant differences, then clearly
233776
234446
  separated inferences and uncertainty. Do not claim to inspect source code, call
233777
234447
  tools, plan edits, or gather additional evidence. Return one concise conclusion.`;
234448
+ var init_visualSpecialist = __esm(() => {
234449
+ init_gatewayTransport();
234450
+ });
233778
234451
 
233779
234452
  // tools/AgentTool/built-in/visualUiAnalysisAgent.ts
233780
234453
  var VISUAL_UI_ANALYSIS_AGENT;
233781
234454
  var init_visualUiAnalysisAgent = __esm(() => {
234455
+ init_visualSpecialist();
233782
234456
  VISUAL_UI_ANALYSIS_AGENT = {
233783
234457
  agentType: "visual-ui-analysis",
233784
- whenToUse: "Use when a conclusion materially depends on pixels, layout, spacing, color, typography, screenshots, or visual comparison that the current main model cannot ground itself. Supply accessible image paths and wait for its grounded observations before claiming a visual result.",
234458
+ whenToUse: "Use when a conclusion materially depends on pixels, layout, spacing, color, typography, screenshots, or visual comparison that the current main model cannot ground itself. The same Agent call must include image_paths with every accessible image to inspect; never invoke this specialist without image_paths. Wait for its grounded observations before claiming a visual result.",
233785
234459
  tools: [],
233786
234460
  disallowedTools: [],
233787
234461
  source: "built-in",
@@ -238994,7 +239668,7 @@ function getAssistantMessageFromError(error5, model, options) {
238994
239668
  if (process.env.USER_TYPE === "ant") {
238995
239669
  const baseMessage = `API Error: 400 ${error5.message}
238996
239670
 
238997
- Run /share and post the JSON file to ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.FEEDBACK_CHANNEL}.`;
239671
+ Run /share and post the JSON file to ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.FEEDBACK_CHANNEL}.`;
238998
239672
  const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
238999
239673
  return createAssistantAPIErrorMessage({
239000
239674
  content: baseMessage + rewindInstruction,
@@ -239030,7 +239704,7 @@ Run /share and post the JSON file to ${{ USER_TYPE: "external", VERSION: "1.3.5-
239030
239704
  if (process.env.USER_TYPE === "ant" && !process.env.ANTHROPIC_MODEL && error5 instanceof Error && error5.message.toLowerCase().includes("invalid model name")) {
239031
239705
  const orgId = getOauthAccountInfo()?.organizationUuid;
239032
239706
  const baseMsg = `[ANT-ONLY] Your org isn't gated into the \`${model}\` model. Either run \`ccl\` with \`ANTHROPIC_MODEL=${getDefaultMainLoopModelSetting()}\``;
239033
- const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.FEEDBACK_CHANNEL} for help getting access.` : `${baseMsg} or reach out in ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.FEEDBACK_CHANNEL} for help getting access.`;
239707
+ const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.FEEDBACK_CHANNEL} for help getting access.` : `${baseMsg} or reach out in ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.FEEDBACK_CHANNEL} for help getting access.`;
239034
239708
  return createAssistantAPIErrorMessage({
239035
239709
  content: msg,
239036
239710
  error: "invalid_request"
@@ -330990,7 +331664,7 @@ function getTelemetryAttributes() {
330990
331664
  attributes["session.id"] = sessionId;
330991
331665
  }
330992
331666
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
330993
- attributes["app.version"] = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION;
331667
+ attributes["app.version"] = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION;
330994
331668
  }
330995
331669
  const oauthAccount = getOauthAccountInfo();
330996
331670
  if (oauthAccount) {
@@ -346999,13 +347673,26 @@ var init_agent = __esm(() => {
346999
347673
  var exports_capabilityResolver = {};
347000
347674
  __export(exports_capabilityResolver, {
347001
347675
  specialistResolutionRequest: () => specialistResolutionRequest,
347676
+ runCapabilityInvocation: () => runCapabilityInvocation,
347002
347677
  roleForAgentPool: () => roleForAgentPool,
347003
347678
  reusablePinnedCapability: () => reusablePinnedCapability,
347004
347679
  resolveTrajectoryStart: () => resolveTrajectoryStart,
347005
347680
  resolveSpecialistCapability: () => resolveSpecialistCapability,
347006
347681
  resolveCapabilityModel: () => resolveCapabilityModel,
347007
- resetCapabilityResolverForTests: () => resetCapabilityResolverForTests
347682
+ resetCapabilityResolverForTests: () => resetCapabilityResolverForTests,
347683
+ capabilityInvocationFromResolution: () => capabilityInvocationFromResolution,
347684
+ CapabilityResolutionUnavailableError: () => CapabilityResolutionUnavailableError
347008
347685
  });
347686
+ function clonePinnedRequest(request) {
347687
+ return {
347688
+ mode: request.mode,
347689
+ role: request.role,
347690
+ ...request.requirements ? { requirements: { ...request.requirements } } : {},
347691
+ ...request.excluded_models ? { excluded_models: [...request.excluded_models] } : {},
347692
+ ...request.parent_model ? { parent_model: request.parent_model } : {},
347693
+ ...request.require_heterogeneous !== undefined ? { require_heterogeneous: request.require_heterogeneous } : {}
347694
+ };
347695
+ }
347009
347696
  function resetCapabilityResolverForTests() {
347010
347697
  resolverUnavailable = false;
347011
347698
  }
@@ -347029,6 +347716,16 @@ function normalizeResolution(value, request) {
347029
347716
  return null;
347030
347717
  if (v6.canonical_model !== undefined && (typeof v6.canonical_model !== "string" || v6.canonical_model !== selected.canonical_model))
347031
347718
  return null;
347719
+ const hasResolutionId = v6.resolution_id !== undefined;
347720
+ const hasCapabilityContext = v6.capability_context !== undefined;
347721
+ if (hasResolutionId !== hasCapabilityContext)
347722
+ return null;
347723
+ if (hasResolutionId) {
347724
+ if (!isLowerHexSha256(v6.resolution_id))
347725
+ return null;
347726
+ if (!isBoundedBase64Url(v6.capability_context))
347727
+ return null;
347728
+ }
347032
347729
  return {
347033
347730
  requested_role: request.role,
347034
347731
  mode: request.mode,
@@ -347038,9 +347735,36 @@ function normalizeResolution(value, request) {
347038
347735
  ...selected.canonical_model ? { canonical_model: selected.canonical_model } : {},
347039
347736
  client_protocol: selected.client_protocol,
347040
347737
  catalog_version: v6.catalog_version,
347041
- reason: "first_eligible_in_order"
347738
+ reason: "first_eligible_in_order",
347739
+ ...hasResolutionId ? {
347740
+ resolution_id: v6.resolution_id,
347741
+ capability_context: v6.capability_context
347742
+ } : {}
347042
347743
  };
347043
347744
  }
347745
+ function isLowerHexSha256(value) {
347746
+ if (typeof value !== "string" || value.length !== 64)
347747
+ return false;
347748
+ for (const character of value) {
347749
+ const code = character.charCodeAt(0);
347750
+ if (!(code >= 48 && code <= 57 || code >= 97 && code <= 102))
347751
+ return false;
347752
+ }
347753
+ return true;
347754
+ }
347755
+ function isBoundedBase64Url(value) {
347756
+ if (typeof value !== "string" || value.length === 0)
347757
+ return false;
347758
+ if (Buffer.byteLength(value, "utf8") > 8192)
347759
+ return false;
347760
+ for (const character of value) {
347761
+ const code = character.charCodeAt(0);
347762
+ const allowed = code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || character === "-" || character === "_";
347763
+ if (!allowed)
347764
+ return false;
347765
+ }
347766
+ return true;
347767
+ }
347044
347768
  function normalizeCandidates(raw, eligibleModels) {
347045
347769
  if (!Array.isArray(raw) || raw.length !== eligibleModels.length)
347046
347770
  return [];
@@ -347120,6 +347844,35 @@ async function resolveCapabilityModel(request, deps = {}) {
347120
347844
  return null;
347121
347845
  }
347122
347846
  }
347847
+ function capabilityInvocationFromResolution(request, resolution) {
347848
+ return {
347849
+ request,
347850
+ resolution,
347851
+ model: resolution.resolved_model,
347852
+ clientProtocol: resolution.client_protocol,
347853
+ ...resolution.resolution_id ? { resolutionId: resolution.resolution_id } : {},
347854
+ ...resolution.capability_context ? { capabilityContext: resolution.capability_context } : {}
347855
+ };
347856
+ }
347857
+ async function runCapabilityInvocation({
347858
+ request,
347859
+ resolve: resolve18 = resolveCapabilityModel,
347860
+ invoke: invoke2
347861
+ }) {
347862
+ for (let attempt = 0;attempt < 2; attempt += 1) {
347863
+ const resolution = await resolve18(request);
347864
+ if (!resolution)
347865
+ throw new CapabilityResolutionUnavailableError(request.role);
347866
+ try {
347867
+ return await invoke2(capabilityInvocationFromResolution(request, resolution));
347868
+ } catch (error5) {
347869
+ if (!(error5 instanceof GatewayInvalidCapabilityContextError) || attempt > 0) {
347870
+ throw error5;
347871
+ }
347872
+ }
347873
+ }
347874
+ throw new CapabilityResolutionUnavailableError(request.role);
347875
+ }
347123
347876
  function roleForAgentPool(poolModel) {
347124
347877
  if (!poolModel)
347125
347878
  return null;
@@ -347160,25 +347913,56 @@ function roleForAgentPool(poolModel) {
347160
347913
  function reusablePinnedCapability(session) {
347161
347914
  if (session?.strategy !== "capability" || !session.routedModel)
347162
347915
  return null;
347163
- return { model: session.routedModel, catalogVersion: session.capabilityVersion };
347916
+ return {
347917
+ model: session.routedModel,
347918
+ catalogVersion: session.capabilityVersion,
347919
+ ...session.capabilityContext ? { capabilityContext: session.capabilityContext } : {},
347920
+ ...session.capabilityResolutionId ? { resolutionId: session.capabilityResolutionId } : {},
347921
+ ...session.capabilityRequest ? { request: clonePinnedRequest(session.capabilityRequest) } : {}
347922
+ };
347164
347923
  }
347165
347924
  async function resolveTrajectoryStart(requestedModel, mode, session, deps = {}) {
347166
347925
  if (requestedModel !== "auto" && requestedModel !== "smart") {
347167
347926
  return { model: requestedModel, source: "explicit" };
347168
347927
  }
347169
347928
  const pinned = reusablePinnedCapability(session);
347170
- if (pinned)
347171
- return { model: pinned.model, source: "pinned-capability" };
347172
- const resolution = await resolveCapabilityModel({
347929
+ if (pinned) {
347930
+ return {
347931
+ model: pinned.model,
347932
+ source: "pinned-capability",
347933
+ ...pinned.request ? { request: pinned.request } : {},
347934
+ ...pinned.capabilityContext ? { capabilityContext: pinned.capabilityContext } : {},
347935
+ ...pinned.resolutionId ? { resolutionId: pinned.resolutionId } : {}
347936
+ };
347937
+ }
347938
+ const request = {
347173
347939
  role: "main",
347174
347940
  mode,
347175
347941
  requirements: { tool_use: true }
347176
- }, deps);
347177
- return resolution ? { model: resolution.resolved_model, source: "gateway-capability", resolution } : { model: requestedModel, source: "legacy" };
347942
+ };
347943
+ const resolution = await resolveCapabilityModel(request, deps);
347944
+ return resolution ? {
347945
+ model: resolution.resolved_model,
347946
+ source: "gateway-capability",
347947
+ resolution,
347948
+ request,
347949
+ ...resolution.capability_context ? { capabilityContext: resolution.capability_context } : {},
347950
+ ...resolution.resolution_id ? { resolutionId: resolution.resolution_id } : {}
347951
+ } : { model: requestedModel, source: "legacy" };
347178
347952
  }
347179
- var resolverUnavailable = false;
347953
+ var resolverUnavailable = false, CapabilityResolutionUnavailableError;
347180
347954
  var init_capabilityResolver = __esm(() => {
347181
347955
  init_providers();
347956
+ init_gatewayTransport();
347957
+ CapabilityResolutionUnavailableError = class CapabilityResolutionUnavailableError extends Error {
347958
+ role;
347959
+ code = "capability_resolution_unavailable";
347960
+ constructor(role) {
347961
+ super(`No eligible model was resolved for capability role=${role}`);
347962
+ this.role = role;
347963
+ this.name = "CapabilityResolutionUnavailableError";
347964
+ }
347965
+ };
347182
347966
  });
347183
347967
 
347184
347968
  // utils/telemetry/perfettoTracing.ts
@@ -347808,6 +348592,75 @@ var init_uuid = __esm(() => {
347808
348592
  uuidRegex2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
347809
348593
  });
347810
348594
 
348595
+ // services/api/capabilityPoolRecovery.ts
348596
+ function capabilityPoolFailureDispositionFromError(error5, fallbackRole = "main") {
348597
+ if (!(error5 instanceof GatewayCapabilityPoolExhaustedError))
348598
+ return;
348599
+ const gatewayRole = CAPABILITY_ROLES.has(error5.role) ? error5.role : fallbackRole;
348600
+ return capabilityPoolFailureDisposition(gatewayRole, error5);
348601
+ }
348602
+ function capabilityPoolFailureDisposition(role, error5) {
348603
+ if (!(error5 instanceof GatewayCapabilityPoolExhaustedError))
348604
+ return;
348605
+ if (role === "main" || role === "compactor") {
348606
+ return {
348607
+ kind: "blocking_resumable",
348608
+ role,
348609
+ parentMustContinue: false,
348610
+ preserveState: true,
348611
+ message: `No eligible ${role} model is currently reachable. The session remains resumable; retry after a provider recovers.`
348612
+ };
348613
+ }
348614
+ if (!AUXILIARY_ROLES.has(role))
348615
+ return;
348616
+ return {
348617
+ kind: "auxiliary_unavailable",
348618
+ role,
348619
+ parentMustContinue: true,
348620
+ preserveState: true,
348621
+ message: `The ${role} helper is temporarily unavailable after its configured model pool was exhausted. Continue the parent task using existing evidence; do not repeat this helper call in the same turn.`
348622
+ };
348623
+ }
348624
+ var AUXILIARY_ROLES, CAPABILITY_ROLES;
348625
+ var init_capabilityPoolRecovery = __esm(() => {
348626
+ init_gatewayTransport();
348627
+ AUXILIARY_ROLES = new Set([
348628
+ "execution",
348629
+ "analysis",
348630
+ "planning",
348631
+ "debug",
348632
+ "bounded-worker",
348633
+ "advisor",
348634
+ "critic",
348635
+ "visual.experimental"
348636
+ ]);
348637
+ CAPABILITY_ROLES = new Set([
348638
+ "main",
348639
+ ...AUXILIARY_ROLES,
348640
+ "compactor"
348641
+ ]);
348642
+ });
348643
+
348644
+ // services/api/auxiliaryAgentRecovery.ts
348645
+ function buildAuxiliaryUnavailableResult(role, error5, args) {
348646
+ if (!role)
348647
+ return;
348648
+ const disposition = capabilityPoolFailureDisposition(role, error5);
348649
+ if (disposition?.kind !== "auxiliary_unavailable")
348650
+ return;
348651
+ return {
348652
+ agentId: args.agentId,
348653
+ agentType: args.agentType,
348654
+ content: [{ type: "text", text: disposition.message }],
348655
+ totalToolUseCount: 0,
348656
+ totalDurationMs: Date.now() - args.startTime,
348657
+ totalTokens: 0
348658
+ };
348659
+ }
348660
+ var init_auxiliaryAgentRecovery = __esm(() => {
348661
+ init_capabilityPoolRecovery();
348662
+ });
348663
+
347811
348664
  // utils/fingerprint.ts
347812
348665
  import { createHash as createHash9 } from "crypto";
347813
348666
  function extractFirstMessageText(messages) {
@@ -347836,7 +348689,7 @@ function computeFingerprint(messageText, version4) {
347836
348689
  }
347837
348690
  function computeFingerprintFromMessages(messages) {
347838
348691
  const firstMessageText = extractFirstMessageText(messages);
347839
- return computeFingerprint(firstMessageText, { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION);
348692
+ return computeFingerprint(firstMessageText, { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION);
347840
348693
  }
347841
348694
  var FINGERPRINT_SALT = "59cf53e54c78";
347842
348695
  var init_fingerprint = () => {};
@@ -347885,7 +348738,7 @@ async function sideQuery(opts) {
347885
348738
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
347886
348739
  }
347887
348740
  const messageText = extractFirstUserMessageText(messages);
347888
- const fingerprint = computeFingerprint(messageText, { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION);
348741
+ const fingerprint = computeFingerprint(messageText, { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION);
347889
348742
  const attributionHeader = getAttributionHeader(fingerprint);
347890
348743
  const systemBlocks = [
347891
348744
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -348981,6 +349834,29 @@ function resolveAgentTools(agentDefinition, availableTools, isAsync = false, isM
348981
349834
  allowedAgentTypes
348982
349835
  };
348983
349836
  }
349837
+ function recoverAuxiliaryAgentFailure(role, error5, agentId, metadata) {
349838
+ if (!role)
349839
+ return;
349840
+ const base = buildAuxiliaryUnavailableResult(role, error5, {
349841
+ agentId,
349842
+ agentType: metadata.agentType,
349843
+ startTime: metadata.startTime
349844
+ });
349845
+ if (!base)
349846
+ return;
349847
+ return {
349848
+ ...base,
349849
+ usage: {
349850
+ input_tokens: 0,
349851
+ output_tokens: 0,
349852
+ cache_creation_input_tokens: null,
349853
+ cache_read_input_tokens: null,
349854
+ server_tool_use: null,
349855
+ service_tier: null,
349856
+ cache_creation: null
349857
+ }
349858
+ };
349859
+ }
348984
349860
  function countToolUses(messages) {
348985
349861
  let count2 = 0;
348986
349862
  for (const m4 of messages) {
@@ -349142,7 +350018,8 @@ async function runAsyncAgentLifecycle({
349142
350018
  rootSetAppState,
349143
350019
  agentIdForCleanup,
349144
350020
  enableSummarization,
349145
- getWorktreeResult
350021
+ getWorktreeResult,
350022
+ capabilityRole
349146
350023
  }) {
349147
350024
  let stopSummarization;
349148
350025
  const agentMessages = [];
@@ -349235,6 +350112,27 @@ ${finalMessage}`;
349235
350112
  });
349236
350113
  return;
349237
350114
  }
350115
+ const unavailableResult = recoverAuxiliaryAgentFailure(capabilityRole, error5, taskId, metadata);
350116
+ if (unavailableResult) {
350117
+ completeAgentTask(unavailableResult, rootSetAppState);
350118
+ const worktreeResult2 = await getWorktreeResult();
350119
+ enqueueAgentNotification({
350120
+ taskId,
350121
+ description,
350122
+ status: "completed",
350123
+ setAppState: rootSetAppState,
350124
+ finalMessage: extractTextContent(unavailableResult.content, `
350125
+ `),
350126
+ usage: {
350127
+ totalTokens: 0,
350128
+ toolUses: 0,
350129
+ durationMs: unavailableResult.totalDurationMs
350130
+ },
350131
+ toolUseId: toolUseContext.toolUseId,
350132
+ ...worktreeResult2
350133
+ });
350134
+ return;
350135
+ }
349238
350136
  const msg = errorMessage(error5);
349239
350137
  failAgentTask(taskId, msg, rootSetAppState);
349240
350138
  const worktreeResult = await getWorktreeResult();
@@ -349259,6 +350157,7 @@ var init_agentToolUtils = __esm(() => {
349259
350157
  init_agentSummary();
349260
350158
  init_analytics();
349261
350159
  init_dumpPrompts();
350160
+ init_auxiliaryAgentRecovery();
349262
350161
  init_Tool();
349263
350162
  init_LocalAgentTask();
349264
350163
  init_ids();
@@ -363519,7 +364418,7 @@ var require_minimal = __commonJS((exports) => {
363519
364418
  util3.isString = function isString2(value) {
363520
364419
  return typeof value === "string" || value instanceof String;
363521
364420
  };
363522
- util3.isObject = function isObject3(value) {
364421
+ util3.isObject = function isObject4(value) {
363523
364422
  return value && typeof value === "object";
363524
364423
  };
363525
364424
  util3.isset = util3.isSet = function isSet5(obj, prop) {
@@ -396031,7 +396930,7 @@ async function initializeBetaTracing(resource) {
396031
396930
  });
396032
396931
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
396033
396932
  setLoggerProvider(loggerProvider);
396034
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION);
396933
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION);
396035
396934
  setEventLogger(eventLogger);
396036
396935
  process.on("beforeExit", async () => {
396037
396936
  await loggerProvider?.forceFlush();
@@ -396071,7 +396970,7 @@ async function initializeTelemetry() {
396071
396970
  const platform3 = getPlatform();
396072
396971
  const baseAttributes = {
396073
396972
  [import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
396074
- [import_semantic_conventions2.ATTR_SERVICE_VERSION]: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
396973
+ [import_semantic_conventions2.ATTR_SERVICE_VERSION]: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
396075
396974
  };
396076
396975
  if (platform3 === "wsl") {
396077
396976
  const wslVersion = getWslVersion();
@@ -396116,7 +397015,7 @@ async function initializeTelemetry() {
396116
397015
  } catch {}
396117
397016
  };
396118
397017
  registerCleanup(shutdownTelemetry2);
396119
- return meterProvider2.getMeter("com.anthropic.claude_code", { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION);
397018
+ return meterProvider2.getMeter("com.anthropic.claude_code", { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION);
396120
397019
  }
396121
397020
  const meterProvider = new import_sdk_metrics2.MeterProvider({
396122
397021
  resource,
@@ -396136,7 +397035,7 @@ async function initializeTelemetry() {
396136
397035
  });
396137
397036
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
396138
397037
  setLoggerProvider(loggerProvider);
396139
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION);
397038
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION);
396140
397039
  setEventLogger(eventLogger);
396141
397040
  logForDebugging("[3P telemetry] Event logger set successfully");
396142
397041
  process.on("beforeExit", async () => {
@@ -396198,7 +397097,7 @@ Current timeout: ${timeoutMs}ms
396198
397097
  }
396199
397098
  };
396200
397099
  registerCleanup(shutdownTelemetry);
396201
- return meterProvider.getMeter("com.anthropic.claude_code", { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION);
397100
+ return meterProvider.getMeter("com.anthropic.claude_code", { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION);
396202
397101
  }
396203
397102
  async function flushTelemetry() {
396204
397103
  const meterProvider = getMeterProvider();
@@ -396789,7 +397688,7 @@ async function installOrUpdateClaudePackage(channel2, specificVersion) {
396789
397688
  return "install_failed";
396790
397689
  }
396791
397690
  const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
396792
- const result = await execFileNoThrowWithCwd("npm", ["install", `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL}@${versionSpec}`], { cwd: getLocalInstallDir(), maxBuffer: 1e6 });
397691
+ const result = await execFileNoThrowWithCwd("npm", ["install", `${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL}@${versionSpec}`], { cwd: getLocalInstallDir(), maxBuffer: 1e6 });
396793
397692
  if (result.code !== 0) {
396794
397693
  const error5 = new Error(`Failed to install Claude CLI package: ${result.stderr}`);
396795
397694
  logError(error5);
@@ -396932,14 +397831,14 @@ import { access as access2, writeFile as writeFile12 } from "fs/promises";
396932
397831
  import { homedir as homedir18 } from "os";
396933
397832
  import { join as join61 } from "path";
396934
397833
  async function assertMinVersion() {
396935
- if (process.env.SKIP_VERSION_CHECK === "1" || { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION.startsWith("0.0.0-dev") || !process.env.ANTHROPIC_VERSION_CHECK) {
397834
+ if (process.env.SKIP_VERSION_CHECK === "1" || { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION.startsWith("0.0.0-dev") || !process.env.ANTHROPIC_VERSION_CHECK) {
396936
397835
  return;
396937
397836
  }
396938
397837
  try {
396939
397838
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
396940
- if (versionConfig.minVersion && lt2({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION, versionConfig.minVersion)) {
397839
+ if (versionConfig.minVersion && lt2({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION, versionConfig.minVersion)) {
396941
397840
  console.error(`
396942
- It looks like your version of CCL (${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION}) needs an update.
397841
+ It looks like your version of CCL (${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION}) needs an update.
396943
397842
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
396944
397843
 
396945
397844
  To update, please run:
@@ -397099,7 +397998,7 @@ async function checkGlobalInstallPermissions() {
397099
397998
  }
397100
397999
  async function getLatestVersion(channel2) {
397101
398000
  const npmTag = channel2 === "stable" ? "stable" : "latest";
397102
- const result = await execFileNoThrowWithCwd("npm", ["view", `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
398001
+ const result = await execFileNoThrowWithCwd("npm", ["view", `${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
397103
398002
  if (result.code !== 0) {
397104
398003
  logForDebugging(`npm view failed with code ${result.code}`);
397105
398004
  if (result.stderr) {
@@ -397115,7 +398014,7 @@ async function getLatestVersion(channel2) {
397115
398014
  return result.stdout.trim();
397116
398015
  }
397117
398016
  async function getNpmDistTags() {
397118
- const result = await execFileNoThrowWithCwd("npm", ["view", { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL, "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
398017
+ const result = await execFileNoThrowWithCwd("npm", ["view", { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL, "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
397119
398018
  if (result.code !== 0) {
397120
398019
  logForDebugging(`npm view dist-tags failed with code ${result.code}`);
397121
398020
  return { latest: null, stable: null };
@@ -397155,7 +398054,7 @@ async function installGlobalPackage(specificVersion) {
397155
398054
  logError(new AutoUpdaterError("Another process is currently installing an update"));
397156
398055
  logEvent("tengu_auto_updater_lock_contention", {
397157
398056
  pid: process.pid,
397158
- currentVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
398057
+ currentVersion: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
397159
398058
  });
397160
398059
  return "in_progress";
397161
398060
  }
@@ -397164,7 +398063,7 @@ async function installGlobalPackage(specificVersion) {
397164
398063
  if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
397165
398064
  logError(new Error("Windows NPM detected in WSL environment"));
397166
398065
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
397167
- currentVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
398066
+ currentVersion: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
397168
398067
  });
397169
398068
  console.error(`
397170
398069
  Error: Windows NPM detected in WSL
@@ -397183,7 +398082,7 @@ To fix this issue:
397183
398082
  if (!hasPermissions) {
397184
398083
  return "no_permissions";
397185
398084
  }
397186
- const packageSpec = specificVersion ? `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL}@${specificVersion}` : { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL;
398085
+ const packageSpec = specificVersion ? `${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL}@${specificVersion}` : { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL;
397187
398086
  const packageManager = env4.isRunningWithBun() ? "bun" : "npm";
397188
398087
  const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
397189
398088
  if (installResult.code !== 0) {
@@ -397512,8 +398411,8 @@ async function detectMultipleInstallations() {
397512
398411
  installations.push({ type: "npm-local", path: localPath });
397513
398412
  }
397514
398413
  const packagesToCheck = ["@anthropic-ai/claude-code"];
397515
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
397516
- packagesToCheck.push({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL);
398414
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
398415
+ packagesToCheck.push({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL);
397517
398416
  }
397518
398417
  const npmResult = await execFileNoThrow("npm", [
397519
398418
  "-g",
@@ -397696,7 +398595,7 @@ function detectLinuxGlobPatternWarnings() {
397696
398595
  }
397697
398596
  async function getDoctorDiagnostic() {
397698
398597
  const installationType = await getCurrentInstallationType();
397699
- const version4 = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION ? { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION : "unknown";
398598
+ const version4 = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION ? { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION : "unknown";
397700
398599
  const installationPath = await getInstallationPath();
397701
398600
  const invokedBinary = getInvokedBinary();
397702
398601
  const multipleInstallations = await detectMultipleInstallations();
@@ -397708,8 +398607,8 @@ async function getDoctorDiagnostic() {
397708
398607
  for (const install of npmInstalls) {
397709
398608
  if (install.type === "npm-global") {
397710
398609
  let uninstallCmd = "npm -g uninstall @anthropic-ai/claude-code";
397711
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
397712
- uninstallCmd += ` && npm -g uninstall ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL}`;
398610
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
398611
+ uninstallCmd += ` && npm -g uninstall ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL}`;
397713
398612
  }
397714
398613
  warnings.push({
397715
398614
  issue: `Leftover npm global installation at ${install.path}`,
@@ -399035,7 +399934,7 @@ function getInstallationEnv() {
399035
399934
  return;
399036
399935
  }
399037
399936
  function getClaudeCodeVersion() {
399038
- return { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION;
399937
+ return { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION;
399039
399938
  }
399040
399939
  async function getInstalledVSCodeExtensionVersion(command) {
399041
399940
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -399592,7 +400491,7 @@ async function getLatestVersionFromArtifactory(tag = "latest") {
399592
400491
  const startTime2 = Date.now();
399593
400492
  const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
399594
400493
  "view",
399595
- `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.NATIVE_PACKAGE_URL}@${tag}`,
400494
+ `${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.NATIVE_PACKAGE_URL}@${tag}`,
399596
400495
  "version",
399597
400496
  "--prefer-online",
399598
400497
  "--registry",
@@ -399616,7 +400515,7 @@ async function getLatestVersionFromArtifactory(tag = "latest") {
399616
400515
  latency_ms: latencyMs,
399617
400516
  source_npm: true
399618
400517
  });
399619
- logForDebugging(`npm view ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.NATIVE_PACKAGE_URL}@${tag} version: ${stdout}`);
400518
+ logForDebugging(`npm view ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.NATIVE_PACKAGE_URL}@${tag} version: ${stdout}`);
399620
400519
  const latestVersion = stdout.trim();
399621
400520
  return latestVersion;
399622
400521
  }
@@ -399672,7 +400571,7 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
399672
400571
  const fs11 = getFsImplementation();
399673
400572
  await fs11.rm(stagingPath, { recursive: true, force: true });
399674
400573
  const platform4 = getPlatform2();
399675
- const platformPackageName = `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.NATIVE_PACKAGE_URL}-${platform4}`;
400574
+ const platformPackageName = `${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.NATIVE_PACKAGE_URL}-${platform4}`;
399676
400575
  logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version4}`);
399677
400576
  const {
399678
400577
  stdout: integrityOutput,
@@ -399701,7 +400600,7 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
399701
400600
  name: "claude-native-installer",
399702
400601
  version: "0.0.1",
399703
400602
  dependencies: {
399704
- [{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.NATIVE_PACKAGE_URL]: version4
400603
+ [{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.NATIVE_PACKAGE_URL]: version4
399705
400604
  }
399706
400605
  };
399707
400606
  const packageLock = {
@@ -399714,10 +400613,10 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
399714
400613
  name: "claude-native-installer",
399715
400614
  version: "0.0.1",
399716
400615
  dependencies: {
399717
- [{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.NATIVE_PACKAGE_URL]: version4
400616
+ [{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.NATIVE_PACKAGE_URL]: version4
399718
400617
  }
399719
400618
  },
399720
- [`node_modules/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.NATIVE_PACKAGE_URL}`]: {
400619
+ [`node_modules/${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.NATIVE_PACKAGE_URL}`]: {
399721
400620
  version: version4,
399722
400621
  optionalDependencies: {
399723
400622
  [platformPackageName]: version4
@@ -399739,7 +400638,7 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
399739
400638
  if (result.code !== 0) {
399740
400639
  throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
399741
400640
  }
399742
- logForDebugging(`Successfully downloaded and verified ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.NATIVE_PACKAGE_URL}@${version4}`);
400641
+ logForDebugging(`Successfully downloaded and verified ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.NATIVE_PACKAGE_URL}@${version4}`);
399743
400642
  }
399744
400643
  function getStallTimeoutMs() {
399745
400644
  return Number(process.env.CLAUDE_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
@@ -400402,8 +401301,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
400402
401301
  const maxVersion = await getMaxVersion();
400403
401302
  if (maxVersion && gt2(version4, maxVersion)) {
400404
401303
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version4} to ${maxVersion}`);
400405
- if (gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION, maxVersion)) {
400406
- logForDebugging(`Native installer: current version ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
401304
+ if (gte({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION, maxVersion)) {
401305
+ logForDebugging(`Native installer: current version ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
400407
401306
  logEvent("tengu_native_update_skipped_max_version", {
400408
401307
  latency_ms: Date.now() - startTime2,
400409
401308
  max_version: maxVersion,
@@ -400414,7 +401313,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
400414
401313
  version4 = maxVersion;
400415
401314
  }
400416
401315
  }
400417
- if (!forceReinstall && version4 === { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION && await versionIsAvailable(version4) && await isPossibleClaudeBinary(executablePath)) {
401316
+ if (!forceReinstall && version4 === { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION && await versionIsAvailable(version4) && await isPossibleClaudeBinary(executablePath)) {
400418
401317
  logForDebugging(`Found ${version4} at ${executablePath}, skipping install`);
400419
401318
  logEvent("tengu_native_update_complete", {
400420
401319
  latency_ms: Date.now() - startTime2,
@@ -401156,8 +402055,8 @@ async function cleanupNpmInstallations() {
401156
402055
  } else if (codePackageResult.error) {
401157
402056
  errors.push(codePackageResult.error);
401158
402057
  }
401159
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
401160
- const macroPackageResult = await attemptNpmUninstall({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL);
402058
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
402059
+ const macroPackageResult = await attemptNpmUninstall({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL);
401161
402060
  if (macroPackageResult.success) {
401162
402061
  removed++;
401163
402062
  if (macroPackageResult.warning) {
@@ -401226,7 +402125,7 @@ var init_allErrors = __esm(() => {
401226
402125
 
401227
402126
  // utils/status.tsx
401228
402127
  function buildSandboxProperties() {
401229
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE !== "ant") {
402128
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE !== "ant") {
401230
402129
  return [];
401231
402130
  }
401232
402131
  const isSandboxed = SandboxManager2.isSandboxingEnabled();
@@ -406207,7 +407106,7 @@ var require_parse11 = __commonJS((exports) => {
406207
407106
  // node_modules/xmlbuilder/lib/Utility.js
406208
407107
  var require_Utility = __commonJS((exports, module) => {
406209
407108
  (function() {
406210
- var assign2, getValue, isArray6, isEmpty, isFunction5, isObject3, isPlainObject5, hasProp = {}.hasOwnProperty;
407109
+ var assign2, getValue, isArray6, isEmpty, isFunction5, isObject4, isPlainObject5, hasProp = {}.hasOwnProperty;
406211
407110
  assign2 = function(target, ...sources) {
406212
407111
  var i4, key, len, source;
406213
407112
  if (isFunction5(Object.assign)) {
@@ -406229,7 +407128,7 @@ var require_Utility = __commonJS((exports, module) => {
406229
407128
  isFunction5 = function(val) {
406230
407129
  return !!val && Object.prototype.toString.call(val) === "[object Function]";
406231
407130
  };
406232
- isObject3 = function(val) {
407131
+ isObject4 = function(val) {
406233
407132
  var ref;
406234
407133
  return !!val && ((ref = typeof val) === "function" || ref === "object");
406235
407134
  };
@@ -406255,7 +407154,7 @@ var require_Utility = __commonJS((exports, module) => {
406255
407154
  };
406256
407155
  isPlainObject5 = function(val) {
406257
407156
  var ctor, proto2;
406258
- return isObject3(val) && (proto2 = Object.getPrototypeOf(val)) && (ctor = proto2.constructor) && typeof ctor === "function" && ctor instanceof ctor && Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object);
407157
+ return isObject4(val) && (proto2 = Object.getPrototypeOf(val)) && (ctor = proto2.constructor) && typeof ctor === "function" && ctor instanceof ctor && Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object);
406259
407158
  };
406260
407159
  getValue = function(obj) {
406261
407160
  if (isFunction5(obj.valueOf)) {
@@ -406266,7 +407165,7 @@ var require_Utility = __commonJS((exports, module) => {
406266
407165
  };
406267
407166
  exports.assign = assign2;
406268
407167
  exports.isFunction = isFunction5;
406269
- exports.isObject = isObject3;
407168
+ exports.isObject = isObject4;
406270
407169
  exports.isArray = isArray6;
406271
407170
  exports.isEmpty = isEmpty;
406272
407171
  exports.isPlainObject = isPlainObject5;
@@ -406574,8 +407473,8 @@ var require_XMLNamedNodeMap = __commonJS((exports, module) => {
406574
407473
  // node_modules/xmlbuilder/lib/XMLElement.js
406575
407474
  var require_XMLElement = __commonJS((exports, module) => {
406576
407475
  (function() {
406577
- var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction5, isObject3, hasProp = {}.hasOwnProperty;
406578
- ({ isObject: isObject3, isFunction: isFunction5, getValue } = require_Utility());
407476
+ var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction5, isObject4, hasProp = {}.hasOwnProperty;
407477
+ ({ isObject: isObject4, isFunction: isFunction5, getValue } = require_Utility());
406579
407478
  XMLNode = require_XMLNode();
406580
407479
  NodeType = require_NodeType();
406581
407480
  XMLAttribute = require_XMLAttribute();
@@ -406640,7 +407539,7 @@ var require_XMLElement = __commonJS((exports, module) => {
406640
407539
  if (name2 != null) {
406641
407540
  name2 = getValue(name2);
406642
407541
  }
406643
- if (isObject3(name2)) {
407542
+ if (isObject4(name2)) {
406644
407543
  for (attName in name2) {
406645
407544
  if (!hasProp.call(name2, attName))
406646
407545
  continue;
@@ -406950,14 +407849,14 @@ var require_XMLComment = __commonJS((exports, module) => {
406950
407849
  // node_modules/xmlbuilder/lib/XMLDeclaration.js
406951
407850
  var require_XMLDeclaration = __commonJS((exports, module) => {
406952
407851
  (function() {
406953
- var NodeType, XMLDeclaration, XMLNode, isObject3;
406954
- ({ isObject: isObject3 } = require_Utility());
407852
+ var NodeType, XMLDeclaration, XMLNode, isObject4;
407853
+ ({ isObject: isObject4 } = require_Utility());
406955
407854
  XMLNode = require_XMLNode();
406956
407855
  NodeType = require_NodeType();
406957
407856
  module.exports = XMLDeclaration = class XMLDeclaration2 extends XMLNode {
406958
407857
  constructor(parent, version4, encoding, standalone) {
406959
407858
  super(parent);
406960
- if (isObject3(version4)) {
407859
+ if (isObject4(version4)) {
406961
407860
  ({ version: version4, encoding, standalone } = version4);
406962
407861
  }
406963
407862
  if (!version4) {
@@ -407028,8 +407927,8 @@ var require_XMLDTDAttList = __commonJS((exports, module) => {
407028
407927
  // node_modules/xmlbuilder/lib/XMLDTDEntity.js
407029
407928
  var require_XMLDTDEntity = __commonJS((exports, module) => {
407030
407929
  (function() {
407031
- var NodeType, XMLDTDEntity, XMLNode, isObject3;
407032
- ({ isObject: isObject3 } = require_Utility());
407930
+ var NodeType, XMLDTDEntity, XMLNode, isObject4;
407931
+ ({ isObject: isObject4 } = require_Utility());
407033
407932
  XMLNode = require_XMLNode();
407034
407933
  NodeType = require_NodeType();
407035
407934
  module.exports = XMLDTDEntity = function() {
@@ -407046,7 +407945,7 @@ var require_XMLDTDEntity = __commonJS((exports, module) => {
407046
407945
  this.pe = !!pe3;
407047
407946
  this.name = this.stringify.name(name2);
407048
407947
  this.type = NodeType.EntityDeclaration;
407049
- if (!isObject3(value)) {
407948
+ if (!isObject4(value)) {
407050
407949
  this.value = this.stringify.dtdEntityValue(value);
407051
407950
  this.internal = true;
407052
407951
  } else {
@@ -407187,8 +408086,8 @@ var require_XMLDTDNotation = __commonJS((exports, module) => {
407187
408086
  // node_modules/xmlbuilder/lib/XMLDocType.js
407188
408087
  var require_XMLDocType = __commonJS((exports, module) => {
407189
408088
  (function() {
407190
- var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject3;
407191
- ({ isObject: isObject3 } = require_Utility());
408089
+ var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject4;
408090
+ ({ isObject: isObject4 } = require_Utility());
407192
408091
  XMLNode = require_XMLNode();
407193
408092
  NodeType = require_NodeType();
407194
408093
  XMLDTDAttList = require_XMLDTDAttList();
@@ -407214,7 +408113,7 @@ var require_XMLDocType = __commonJS((exports, module) => {
407214
408113
  }
407215
408114
  }
407216
408115
  this.documentObject = parent;
407217
- if (isObject3(pubID)) {
408116
+ if (isObject4(pubID)) {
407218
408117
  ({ pubID, sysID } = pubID);
407219
408118
  }
407220
408119
  if (sysID == null) {
@@ -407529,8 +408428,8 @@ var require_DocumentPosition = __commonJS((exports, module) => {
407529
408428
  // node_modules/xmlbuilder/lib/XMLNode.js
407530
408429
  var require_XMLNode = __commonJS((exports, module) => {
407531
408430
  (function() {
407532
- var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction5, isObject3, hasProp = {}.hasOwnProperty, splice = [].splice;
407533
- ({ isObject: isObject3, isFunction: isFunction5, isEmpty, getValue } = require_Utility());
408431
+ var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction5, isObject4, hasProp = {}.hasOwnProperty, splice = [].splice;
408432
+ ({ isObject: isObject4, isFunction: isFunction5, isEmpty, getValue } = require_Utility());
407534
408433
  XMLElement = null;
407535
408434
  XMLCData = null;
407536
408435
  XMLComment = null;
@@ -407597,7 +408496,7 @@ var require_XMLNode = __commonJS((exports, module) => {
407597
408496
  attributes = {};
407598
408497
  }
407599
408498
  attributes = getValue(attributes);
407600
- if (!isObject3(attributes)) {
408499
+ if (!isObject4(attributes)) {
407601
408500
  [text, attributes] = [attributes, text];
407602
408501
  }
407603
408502
  if (name2 != null) {
@@ -407610,7 +408509,7 @@ var require_XMLNode = __commonJS((exports, module) => {
407610
408509
  }
407611
408510
  } else if (isFunction5(name2)) {
407612
408511
  lastChild = this.element(name2.apply());
407613
- } else if (isObject3(name2)) {
408512
+ } else if (isObject4(name2)) {
407614
408513
  for (key in name2) {
407615
408514
  if (!hasProp.call(name2, key))
407616
408515
  continue;
@@ -407622,7 +408521,7 @@ var require_XMLNode = __commonJS((exports, module) => {
407622
408521
  lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);
407623
408522
  } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {
407624
408523
  lastChild = this.dummy();
407625
- } else if (isObject3(val) && isEmpty(val)) {
408524
+ } else if (isObject4(val) && isEmpty(val)) {
407626
408525
  lastChild = this.element(key);
407627
408526
  } else if (!this.options.keepNullNodes && val == null) {
407628
408527
  lastChild = this.dummy();
@@ -407633,7 +408532,7 @@ var require_XMLNode = __commonJS((exports, module) => {
407633
408532
  childNode[key] = item;
407634
408533
  lastChild = this.element(childNode);
407635
408534
  }
407636
- } else if (isObject3(val)) {
408535
+ } else if (isObject4(val)) {
407637
408536
  if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {
407638
408537
  lastChild = this.element(val);
407639
408538
  } else {
@@ -407719,7 +408618,7 @@ var require_XMLNode = __commonJS((exports, module) => {
407719
408618
  }
407720
408619
  attributes || (attributes = {});
407721
408620
  attributes = getValue(attributes);
407722
- if (!isObject3(attributes)) {
408621
+ if (!isObject4(attributes)) {
407723
408622
  [text, attributes] = [attributes, text];
407724
408623
  }
407725
408624
  child = new XMLElement(this, name2, attributes);
@@ -407731,7 +408630,7 @@ var require_XMLNode = __commonJS((exports, module) => {
407731
408630
  }
407732
408631
  text(value) {
407733
408632
  var child;
407734
- if (isObject3(value)) {
408633
+ if (isObject4(value)) {
407735
408634
  this.element(value);
407736
408635
  }
407737
408636
  child = new XMLText(this, value);
@@ -407790,7 +408689,7 @@ var require_XMLNode = __commonJS((exports, module) => {
407790
408689
  insTarget = target[j3];
407791
408690
  this.instruction(insTarget);
407792
408691
  }
407793
- } else if (isObject3(target)) {
408692
+ } else if (isObject4(target)) {
407794
408693
  for (insTarget in target) {
407795
408694
  if (!hasProp.call(target, insTarget))
407796
408695
  continue;
@@ -409119,8 +410018,8 @@ var require_XMLDocument = __commonJS((exports, module) => {
409119
410018
  // node_modules/xmlbuilder/lib/XMLDocumentCB.js
409120
410019
  var require_XMLDocumentCB = __commonJS((exports, module) => {
409121
410020
  (function() {
409122
- var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction5, isObject3, isPlainObject5, hasProp = {}.hasOwnProperty;
409123
- ({ isObject: isObject3, isFunction: isFunction5, isPlainObject: isPlainObject5, getValue } = require_Utility());
410021
+ var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction5, isObject4, isPlainObject5, hasProp = {}.hasOwnProperty;
410022
+ ({ isObject: isObject4, isFunction: isFunction5, isPlainObject: isPlainObject5, getValue } = require_Utility());
409124
410023
  NodeType = require_NodeType();
409125
410024
  XMLDocument = require_XMLDocument();
409126
410025
  XMLElement = require_XMLElement();
@@ -409226,7 +410125,7 @@ var require_XMLDocumentCB = __commonJS((exports, module) => {
409226
410125
  attributes = {};
409227
410126
  }
409228
410127
  attributes = getValue(attributes);
409229
- if (!isObject3(attributes)) {
410128
+ if (!isObject4(attributes)) {
409230
410129
  [text, attributes] = [attributes, text];
409231
410130
  }
409232
410131
  this.currentNode = new XMLElement(this, name2, attributes);
@@ -409243,7 +410142,7 @@ var require_XMLDocumentCB = __commonJS((exports, module) => {
409243
410142
  if (this.currentNode && this.currentNode.type === NodeType.DocType) {
409244
410143
  this.dtdElement(...arguments);
409245
410144
  } else {
409246
- if (Array.isArray(name2) || isObject3(name2) || isFunction5(name2)) {
410145
+ if (Array.isArray(name2) || isObject4(name2) || isFunction5(name2)) {
409247
410146
  oldValidationFlag = this.options.noValidation;
409248
410147
  this.options.noValidation = true;
409249
410148
  root = new XMLDocument(this.options).element("TEMP_ROOT");
@@ -409271,7 +410170,7 @@ var require_XMLDocumentCB = __commonJS((exports, module) => {
409271
410170
  if (name2 != null) {
409272
410171
  name2 = getValue(name2);
409273
410172
  }
409274
- if (isObject3(name2)) {
410173
+ if (isObject4(name2)) {
409275
410174
  for (attName in name2) {
409276
410175
  if (!hasProp.call(name2, attName))
409277
410176
  continue;
@@ -409332,7 +410231,7 @@ var require_XMLDocumentCB = __commonJS((exports, module) => {
409332
410231
  insTarget = target[i4];
409333
410232
  this.instruction(insTarget);
409334
410233
  }
409335
- } else if (isObject3(target)) {
410234
+ } else if (isObject4(target)) {
409336
410235
  for (insTarget in target) {
409337
410236
  if (!hasProp.call(target, insTarget))
409338
410237
  continue;
@@ -418541,7 +419440,7 @@ function SpinnerWithVerbInner({
418541
419440
  const messageColor = overrideColor ?? defaultColor;
418542
419441
  const shimmerColor = overrideShimmerColor ?? defaultShimmerColor;
418543
419442
  let ttftText = null;
418544
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && apiMetricsRef?.current && apiMetricsRef.current.length > 0) {
419443
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && apiMetricsRef?.current && apiMetricsRef.current.length > 0) {
418545
419444
  ttftText = computeTtftText(apiMetricsRef.current);
418546
419445
  }
418547
419446
  if (leaderIsIdle && hasRunningTeammates && !foregroundedTeammate) {
@@ -429565,7 +430464,7 @@ function getSearchOrReadInfo(progressMessage, tools, toolUseByID) {
429565
430464
  return null;
429566
430465
  }
429567
430466
  function processProgressMessages(messages, tools, isAgentRunning) {
429568
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE !== "ant") {
430467
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE !== "ant") {
429569
430468
  return messages.filter((m4) => hasProgressMessage(m4.data) && m4.data.message.type !== "user").map((m4) => ({
429570
430469
  type: "original",
429571
430470
  message: m4
@@ -429902,7 +430801,7 @@ function renderToolResultMessage(data, progressMessagesForMessage, {
429902
430801
  return /* @__PURE__ */ jsx_runtime109.jsxs(ThemedBox_default, {
429903
430802
  flexDirection: "column",
429904
430803
  children: [
429905
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime109.jsx(MessageResponse, {
430804
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime109.jsx(MessageResponse, {
429906
430805
  children: /* @__PURE__ */ jsx_runtime109.jsxs(ThemedText, {
429907
430806
  color: "warning",
429908
430807
  children: [
@@ -430152,7 +431051,7 @@ function renderToolUseRejectedMessage(_input, {
430152
431051
  const agentId = firstData && hasProgressMessage(firstData) ? firstData.agentId : undefined;
430153
431052
  return /* @__PURE__ */ jsx_runtime109.jsxs(jsx_runtime109.Fragment, {
430154
431053
  children: [
430155
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && agentId && /* @__PURE__ */ jsx_runtime109.jsx(MessageResponse, {
431054
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && agentId && /* @__PURE__ */ jsx_runtime109.jsx(MessageResponse, {
430156
431055
  children: /* @__PURE__ */ jsx_runtime109.jsxs(ThemedText, {
430157
431056
  color: "warning",
430158
431057
  children: [
@@ -430835,7 +431734,7 @@ async function executeForkedSlashCommand(command, args, context2, precedingInput
430835
431734
  }
430836
431735
  let resultText = extractResultText(agentMessages, "Command completed");
430837
431736
  logForDebugging(`Forked slash command /${command.name} completed with agent ${agentId}`);
430838
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
431737
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
430839
431738
  resultText = `[ANT-ONLY] API calls: ${getDisplayPath(getDumpPromptsPath(agentId))}
430840
431739
  ${resultText}`;
430841
431740
  }
@@ -430978,7 +431877,7 @@ async function processSlashCommand(inputString, precedingInputBlocks, imageConte
430978
431877
  logEvent("tengu_input_command", {
430979
431878
  ...eventData2,
430980
431879
  invocation_trigger: "user-slash",
430981
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && {
431880
+ ...{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && {
430982
431881
  skill_name: commandName,
430983
431882
  ...returnedCommand.type === "prompt" && {
430984
431883
  skill_source: returnedCommand.source
@@ -431039,7 +431938,7 @@ async function processSlashCommand(inputString, precedingInputBlocks, imageConte
431039
431938
  logEvent("tengu_input_command", {
431040
431939
  ...eventData,
431041
431940
  invocation_trigger: "user-slash",
431042
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && {
431941
+ ...{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && {
431043
431942
  skill_name: commandName,
431044
431943
  ...returnedCommand.type === "prompt" && {
431045
431944
  skill_source: returnedCommand.source
@@ -431501,12 +432400,13 @@ async function* runAgent({
431501
432400
  throw new Error(`Specialist capability unavailable: ${agentDefinition.agentType} requires role=${specialistCapability.role}; no eligible model was resolved, so no child model call was made.`);
431502
432401
  }
431503
432402
  const capabilityRole = roleForAgentPool(model ?? agentDefinition.model);
431504
- const capabilityResolution = specialistCapability?.kind === "resolved" ? specialistCapability.resolution : capabilityRole ? await resolveCapabilityModel({
432403
+ const capabilityRequest = capabilityRole ? {
431505
432404
  role: capabilityRole,
431506
432405
  mode: routingMode,
431507
432406
  parent_model: toolUseContext.options.mainLoopModel,
431508
432407
  require_heterogeneous: capabilityRole === "advisor" || capabilityRole === "critic"
431509
- }) : null;
432408
+ } : undefined;
432409
+ const capabilityResolution = specialistCapability?.kind === "resolved" ? specialistCapability.resolution : capabilityRole ? await resolveCapabilityModel(capabilityRequest) : null;
431510
432410
  const resolvedAgentModel = capabilityResolution?.resolved_model ?? getAgentModel(agentDefinition.model, toolUseContext.options.mainLoopModel, model, permissionMode, toolUseContext.options.routingTable);
431511
432411
  if (capabilityResolution) {
431512
432412
  logForDebugging(`[CapabilityRoute] role=${capabilityResolution.requested_role} mode=${capabilityResolution.mode} resolved=${capabilityResolution.resolved_model} catalog=${capabilityResolution.catalog_version}`);
@@ -431646,6 +432546,9 @@ async function* runAgent({
431646
432546
  debug: toolUseContext.options.debug,
431647
432547
  verbose: toolUseContext.options.verbose,
431648
432548
  mainLoopModel: resolvedAgentModel,
432549
+ ...capabilityResolution?.capability_context ? { capabilityContext: capabilityResolution.capability_context } : {},
432550
+ ...capabilityResolution?.resolution_id ? { capabilityResolutionId: capabilityResolution.resolution_id } : {},
432551
+ ...capabilityRequest ? { capabilityRequest } : {},
431649
432552
  thinkingConfig: useExactTools ? toolUseContext.options.thinkingConfig : { type: "disabled" },
431650
432553
  mcpClients: mergedMcpClients,
431651
432554
  mcpResources: toolUseContext.options.mcpResources,
@@ -476253,7 +477156,7 @@ function truncateCommand(command) {
476253
477156
  function renderToolResultMessage11(output, _progressMessagesForMessage, {
476254
477157
  verbose
476255
477158
  }) {
476256
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
477159
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
476257
477160
  return null;
476258
477161
  }
476259
477162
  const rawCommand = output.command ?? "";
@@ -477956,7 +478859,7 @@ var init_TaskOutputTool = __esm(() => {
477956
478859
  return this.isReadOnly?.(_input) ?? false;
477957
478860
  },
477958
478861
  isEnabled() {
477959
- return { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE !== "ant";
478862
+ return { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE !== "ant";
477960
478863
  },
477961
478864
  isReadOnly(_input) {
477962
478865
  return true;
@@ -489678,9 +490581,10 @@ function qualityModeStandingInstruction() {
489678
490581
  QUALITY_AUTO_CRITIC_MARKER,
489679
490582
  "你处于质量优先模式。由你基于当前任务语义、已有证据和执行阶段判断是否需要独立复核;不要用关键词规则,也不要为简单明确的任务增加额外调用。",
489680
490583
  '- 决策尚未收敛、现有证据相互冲突、适当 specialist/search 未找到目标,或证据充分表明应向用户澄清时:调用 Agent(subagent_type="Advisor")。Advisor 只分析给定证据,返回建议、理由和必要的澄清点,不获取新证据。',
489681
- '- 已形成重要草稿、代码或结论,需要对目标和证据检查缺陷时:调用 Agent(subagent_type="Critic")。Critic 只审查给定产物,返回具体缺陷、理由和是否需要修改,不获取新证据。',
489682
- '- 结论实质依赖图片像素、布局或视觉对比,而当前主模型无法自行可靠识别时:先调用 Agent(subagent_type="visual-ui-analysis") 并等待其基于图片的观察结论;不得把代码猜测冒充视觉证据。必要时再把视觉观察与产出交给 Critic 顺序复核。',
490584
+ '- 已形成重要草稿、代码或结论,需要对目标和证据检查缺陷时:调用 Agent(subagent_type="Critic")。如果用户已经给出待审材料、目标和证据,或明确要求只依据当前证据,就把它视为封闭证据包:不要再搜索或调用 Explore,直接调用 Agent(subagent_type="Critic")。Critic 只审查给定产物,返回具体缺陷、理由和是否需要修改,不获取新证据。',
490585
+ '- 结论实质依赖图片像素、布局或视觉对比,而当前主模型无法自行可靠识别时:先调用 Agent(subagent_type="visual-ui-analysis"),并在同一次调用的 image_paths 中传入所有待分析图片路径;不得先发出缺少 image_paths 的视觉调用。等待其基于图片的观察结论,不得把代码、文件名或普通搜索猜测冒充视觉证据。必要时再把视觉观察与产出交给 Critic 顺序复核。',
489683
490586
  "- Advisor 负责行动前建议,Critic 负责产出后审查;二者使用相同的异构模型选择机制,但提示词与结果职责不同。",
490587
+ "- 收到 specialist 结果后,若结果已回答当前问题,直接形成面向用户的结论;不要重复调用同一 specialist 或增加与结论无关的检查。",
489684
490588
  "- 如果当前证据足以直接完成简单任务,不调用二者。若证据不足且继续搜索无合理依据,优先向用户提出具体澄清,而不是盲目继续。"
489685
490589
  ].join(`
489686
490590
  `);
@@ -494451,306 +495355,6 @@ var init_prompt21 = __esm(() => {
494451
495355
  init_forkSubagent();
494452
495356
  });
494453
495357
 
494454
- // services/api/gatewayTransport.ts
494455
- function getCclGatewayUA(model) {
494456
- return model ? `ccl/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} (${model})` : `ccl/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION}`;
494457
- }
494458
- function parseGatewayContextCapabilityUnavailable(status, responseText) {
494459
- if (status !== 422)
494460
- return;
494461
- let parsed;
494462
- try {
494463
- parsed = JSON.parse(responseText);
494464
- } catch {
494465
- return;
494466
- }
494467
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
494468
- return;
494469
- }
494470
- const error5 = parsed.error;
494471
- if (typeof error5 !== "object" || error5 === null || Array.isArray(error5)) {
494472
- return;
494473
- }
494474
- const fields = error5;
494475
- if (fields.type !== "context_capability_unavailable" || !Number.isSafeInteger(fields.required_context_tokens) || fields.required_context_tokens <= 0) {
494476
- return;
494477
- }
494478
- return new GatewayContextCapabilityUnavailableError(fields.required_context_tokens);
494479
- }
494480
- function parseGatewayAlternateDeploymentUnavailable(status, responseText) {
494481
- if (status !== 409)
494482
- return;
494483
- let parsed;
494484
- try {
494485
- parsed = JSON.parse(responseText);
494486
- } catch {
494487
- return;
494488
- }
494489
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
494490
- return;
494491
- }
494492
- const error5 = parsed.error;
494493
- if (typeof error5 !== "object" || error5 === null || Array.isArray(error5)) {
494494
- return;
494495
- }
494496
- if (error5.type !== "alternate_deployment_unavailable") {
494497
- return;
494498
- }
494499
- return new GatewayAlternateDeploymentUnavailableError;
494500
- }
494501
- function normalizeGatewayAvoidDeployment(value) {
494502
- const trimmed = value?.trim();
494503
- if (!trimmed || trimmed.length > 128)
494504
- return;
494505
- for (const character of trimmed) {
494506
- const code = character.charCodeAt(0);
494507
- const allowed = code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || character === "-" || character === "_" || character === "." || character === ":";
494508
- if (!allowed)
494509
- return;
494510
- }
494511
- return trimmed;
494512
- }
494513
- async function createGatewayStream(options) {
494514
- const {
494515
- url: url3,
494516
- key,
494517
- body,
494518
- signal,
494519
- tags,
494520
- minimumContextTokens,
494521
- avoidDeployment
494522
- } = options;
494523
- const normalizedAvoidDeployment = normalizeGatewayAvoidDeployment(avoidDeployment);
494524
- let lastError;
494525
- for (let attempt = 0;attempt <= GATEWAY_MAX_RETRIES; attempt++) {
494526
- if (signal?.aborted)
494527
- throw new APIUserAbortError;
494528
- if (attempt > 0) {
494529
- await new Promise((r3) => setTimeout(r3, GATEWAY_RETRY_DELAYS[attempt - 1]));
494530
- }
494531
- try {
494532
- const response = await fetch(url3, {
494533
- method: "POST",
494534
- headers: {
494535
- "Content-Type": "application/json",
494536
- Authorization: `Bearer ${key}`,
494537
- "User-Agent": getCclGatewayUA(body.model),
494538
- ...tags ? { "x-litellm-tags": tags } : {},
494539
- ...Number.isSafeInteger(minimumContextTokens) && (minimumContextTokens ?? 0) > 0 ? {
494540
- "X-Margay-Min-Context-Tokens": String(minimumContextTokens)
494541
- } : {},
494542
- ...normalizedAvoidDeployment ? {
494543
- "X-Margay-Avoid-Deployment": normalizedAvoidDeployment
494544
- } : {}
494545
- },
494546
- body: JSON.stringify({ ...body, stream: true }),
494547
- signal
494548
- });
494549
- if (response.status === 429 || response.status >= 500) {
494550
- await response.body?.cancel().catch(() => {});
494551
- lastError = response.status >= 500 ? new GatewayUpstreamUnavailableError(response.status) : new Error(`Gateway ${response.status}`);
494552
- continue;
494553
- }
494554
- if (!response.ok) {
494555
- const errorText = await response.text().catch(() => "");
494556
- const alternateUnavailableError = parseGatewayAlternateDeploymentUnavailable(response.status, errorText);
494557
- if (alternateUnavailableError)
494558
- throw alternateUnavailableError;
494559
- const contextCapabilityError = parseGatewayContextCapabilityUnavailable(response.status, errorText);
494560
- if (contextCapabilityError)
494561
- throw contextCapabilityError;
494562
- throw new GatewayNonRetryableError(`Gateway ${response.status}: ${errorText}`);
494563
- }
494564
- return {
494565
- stream: new GatewayStream(response, signal),
494566
- response
494567
- };
494568
- } catch (e3) {
494569
- if (signal?.aborted)
494570
- throw new APIUserAbortError;
494571
- if (e3 instanceof GatewayNonRetryableError)
494572
- throw e3;
494573
- lastError = e3;
494574
- if (attempt === GATEWAY_MAX_RETRIES)
494575
- throw lastError;
494576
- }
494577
- }
494578
- throw lastError;
494579
- }
494580
- var GATEWAY_MAX_RETRIES = 2, GATEWAY_RETRY_DELAYS, GatewayNonRetryableError, GatewayContextCapabilityUnavailableError, GatewayAlternateDeploymentUnavailableError, GatewayUpstreamUnavailableError, GatewayStreamProtocolError, GatewayStream;
494581
- var init_gatewayTransport = __esm(() => {
494582
- init_sdk();
494583
- GATEWAY_RETRY_DELAYS = [1000, 3000];
494584
- GatewayNonRetryableError = class GatewayNonRetryableError extends Error {
494585
- constructor(message) {
494586
- super(message);
494587
- this.name = "GatewayNonRetryableError";
494588
- }
494589
- };
494590
- GatewayContextCapabilityUnavailableError = class GatewayContextCapabilityUnavailableError extends GatewayNonRetryableError {
494591
- code = "context_capability_unavailable";
494592
- requiredContextTokens;
494593
- constructor(requiredContextTokens) {
494594
- super("Gateway has no configured deployment with sufficient context capacity");
494595
- this.name = "GatewayContextCapabilityUnavailableError";
494596
- this.requiredContextTokens = requiredContextTokens;
494597
- }
494598
- };
494599
- GatewayAlternateDeploymentUnavailableError = class GatewayAlternateDeploymentUnavailableError extends GatewayNonRetryableError {
494600
- code = "alternate_deployment_unavailable";
494601
- constructor() {
494602
- super("Gateway has no alternate deployment for this model");
494603
- this.name = "GatewayAlternateDeploymentUnavailableError";
494604
- }
494605
- };
494606
- GatewayUpstreamUnavailableError = class GatewayUpstreamUnavailableError extends Error {
494607
- code = "gateway_upstream_unavailable";
494608
- status;
494609
- constructor(status) {
494610
- super(`Gateway upstream unavailable (HTTP ${status})`);
494611
- this.name = "GatewayUpstreamUnavailableError";
494612
- this.status = status;
494613
- }
494614
- };
494615
- GatewayStreamProtocolError = class GatewayStreamProtocolError extends Error {
494616
- code;
494617
- lastEventType;
494618
- partialUsage;
494619
- constructor(code, message, details = {}) {
494620
- super(message);
494621
- this.name = "GatewayStreamProtocolError";
494622
- this.code = code;
494623
- this.lastEventType = details.lastEventType;
494624
- this.partialUsage = details.partialUsage ?? {};
494625
- }
494626
- };
494627
- GatewayStream = class GatewayStream {
494628
- response;
494629
- controller;
494630
- constructor(response, abortSignal) {
494631
- this.response = response;
494632
- this.controller = new AbortController;
494633
- if (abortSignal) {
494634
- abortSignal.addEventListener("abort", () => this.controller.abort(), { once: true });
494635
- }
494636
- }
494637
- async* [Symbol.asyncIterator]() {
494638
- const reader = this.response.body.getReader();
494639
- const decoder = new TextDecoder;
494640
- let buffer = "";
494641
- let yieldedAny = false;
494642
- let rawSnippet = "";
494643
- let terminalComplete = false;
494644
- let lastEventType;
494645
- const partialUsage = {};
494646
- const protocolError = (code, message) => new GatewayStreamProtocolError(code, message, {
494647
- lastEventType,
494648
- partialUsage: { ...partialUsage }
494649
- });
494650
- const parseLine = (line) => {
494651
- const trimmed = line.replace(/\r$/, "");
494652
- if (!trimmed.startsWith("data:"))
494653
- return null;
494654
- const data = trimmed.slice(5).trim();
494655
- if (!data)
494656
- return null;
494657
- if (data === "[DONE]")
494658
- return "done";
494659
- let event;
494660
- try {
494661
- event = JSON.parse(data);
494662
- } catch {
494663
- return null;
494664
- }
494665
- const typed = event;
494666
- const type = typed.type;
494667
- if (type === "ping") {
494668
- yieldedAny = true;
494669
- return null;
494670
- }
494671
- yieldedAny = true;
494672
- if (type)
494673
- lastEventType = type;
494674
- const usage = type === "message_start" ? typed.message?.usage : typed.usage;
494675
- if (usage) {
494676
- for (const key of ["input_tokens", "output_tokens", "cache_read_input_tokens", "cache_creation_input_tokens"]) {
494677
- if (typeof usage[key] === "number")
494678
- partialUsage[key] = usage[key];
494679
- }
494680
- }
494681
- if (type === "error") {
494682
- const incomplete = typed.margay?.code === "incomplete_upstream_stream";
494683
- throw protocolError(incomplete ? "incomplete_stream" : "upstream_stream_error", incomplete ? "Gateway upstream stream ended before message_stop" : "Gateway emitted a stream error event");
494684
- }
494685
- if (type === "message_stop")
494686
- terminalComplete = true;
494687
- return event;
494688
- };
494689
- const onAbort = () => {
494690
- process.stderr.write(`[ccl-trace] {"target":"gateway-stream-abort","action":"cancel-pending-read"}
494691
- `);
494692
- reader.cancel().catch(() => {});
494693
- };
494694
- if (this.controller.signal.aborted)
494695
- onAbort();
494696
- else
494697
- this.controller.signal.addEventListener("abort", onAbort, { once: true });
494698
- try {
494699
- while (true) {
494700
- if (this.controller.signal.aborted) {
494701
- return;
494702
- }
494703
- const { done, value } = await reader.read();
494704
- if (done) {
494705
- if (this.controller.signal.aborted)
494706
- return;
494707
- break;
494708
- }
494709
- const chunk = decoder.decode(value, { stream: true });
494710
- if (rawSnippet.length < 500)
494711
- rawSnippet += chunk.slice(0, 500 - rawSnippet.length);
494712
- buffer += chunk;
494713
- const lines = buffer.split(`
494714
- `);
494715
- buffer = lines.pop() ?? "";
494716
- for (const line of lines) {
494717
- const parsed = parseLine(line);
494718
- if (parsed === "done") {
494719
- if (!terminalComplete)
494720
- throw protocolError("incomplete_stream", "Gateway stream sent [DONE] before message_stop");
494721
- return;
494722
- }
494723
- if (parsed)
494724
- yield parsed;
494725
- }
494726
- }
494727
- buffer += decoder.decode();
494728
- if (buffer.trim()) {
494729
- const parsed = parseLine(buffer);
494730
- if (parsed === "done") {
494731
- if (!terminalComplete)
494732
- throw protocolError("incomplete_stream", "Gateway stream sent [DONE] before message_stop");
494733
- } else if (parsed) {
494734
- yield parsed;
494735
- }
494736
- }
494737
- if (!yieldedAny) {
494738
- const ct2 = this.response.headers.get("content-type") ?? "unknown";
494739
- throw new Error(`Gateway stream returned no SSE events (status=${this.response.status}, content-type=${ct2}, body=${rawSnippet.slice(0, 200)})`);
494740
- }
494741
- if (!terminalComplete) {
494742
- throw protocolError("incomplete_stream", "Gateway stream ended before message_stop");
494743
- }
494744
- } finally {
494745
- this.controller.signal.removeEventListener("abort", onAbort);
494746
- try {
494747
- await reader.cancel();
494748
- } catch {}
494749
- }
494750
- }
494751
- };
494752
- });
494753
-
494754
495358
  // services/api/boundedInferenceTransport.ts
494755
495359
  async function runBoundedInference(request) {
494756
495360
  const fetchFn = request.fetchFn ?? fetch;
@@ -494762,13 +495366,22 @@ async function runBoundedInference(request) {
494762
495366
  headers: {
494763
495367
  "Content-Type": "application/json",
494764
495368
  Authorization: `Bearer ${request.gateway.key}`,
494765
- ...request.minimumContextTokens !== undefined ? { "X-Margay-Min-Context-Tokens": String(request.minimumContextTokens) } : {}
495369
+ ...request.minimumContextTokens !== undefined ? { "X-Margay-Min-Context-Tokens": String(request.minimumContextTokens) } : {},
495370
+ ...request.capabilityContext ? { "X-Margay-Capability-Context": request.capabilityContext } : {}
494766
495371
  },
494767
495372
  body: JSON.stringify(request.clientProtocol === "anthropic_messages" ? anthropicBody(request) : openAIBody(request)),
494768
495373
  signal: request.signal
494769
495374
  });
494770
495375
  if (!response.ok) {
495376
+ if (response.status === 503) {
495377
+ const poolError = await parseGatewayCapabilityPoolExhausted(response.clone());
495378
+ if (poolError)
495379
+ throw poolError;
495380
+ }
494771
495381
  const body = await response.text().catch(() => "(no body)");
495382
+ const invalidContext = parseGatewayInvalidCapabilityContext(response.status, body);
495383
+ if (invalidContext)
495384
+ throw invalidContext;
494772
495385
  const contextError = parseGatewayContextCapabilityUnavailable(response.status, body);
494773
495386
  if (contextError)
494774
495387
  throw contextError;
@@ -495065,6 +495678,7 @@ var init_runVisualSpecialist = __esm(() => {
495065
495678
  init_capabilityResolver();
495066
495679
  init_boundedInferenceTransport();
495067
495680
  init_intentClassifier();
495681
+ init_visualSpecialist();
495068
495682
  init_FileReadTool();
495069
495683
  });
495070
495684
 
@@ -495131,6 +495745,7 @@ var init_AgentTool = __esm(() => {
495131
495745
  init_spawnMultiAgent();
495132
495746
  init_agentColorManager();
495133
495747
  init_agentToolUtils();
495748
+ init_capabilityResolver();
495134
495749
  init_generalPurposeAgent();
495135
495750
  init_constants2();
495136
495751
  init_externalAgents();
@@ -495139,6 +495754,7 @@ var init_AgentTool = __esm(() => {
495139
495754
  init_prompt21();
495140
495755
  init_runAgent();
495141
495756
  init_runVisualSpecialist();
495757
+ init_visualSpecialist();
495142
495758
  init_UI();
495143
495759
  jsx_runtime149 = __toESM(require_jsx_runtime(), 1);
495144
495760
  proactiveModule2 = feature("PROACTIVE") || feature("KAIROS") ? __toCommonJS(exports_proactive) : null;
@@ -495146,8 +495762,8 @@ var init_AgentTool = __esm(() => {
495146
495762
  baseInputSchema = lazySchema(() => z76.object({
495147
495763
  description: z76.string().describe("A short (3-5 word) description of the task"),
495148
495764
  prompt: z76.string().describe("The task for the agent to perform"),
495149
- subagent_type: z76.string().optional().describe("The type of specialized agent to use for this task"),
495150
- image_paths: z76.array(z76.string().trim().min(1)).min(1).max(20).optional().describe("Image paths for visual-ui-analysis only. The images are validated and preloaded before one bounded zero-tool model request."),
495765
+ subagent_type: z76.string().optional().describe("The type of specialized agent to use for this task. When set to visual-ui-analysis, image_paths is required in the same Agent call."),
495766
+ image_paths: z76.array(z76.string().trim().min(1)).min(1).max(20).optional().describe("Required when subagent_type is visual-ui-analysis: include every image path to inspect in this same Agent call. Do not use for other agent types. The images are validated and preloaded before one bounded zero-tool model request."),
495151
495767
  model: z76.string().trim().min(1).optional().describe("Optional concrete model override or capability role. Use the exact role values 'pool:execution', 'pool:analysis', 'pool:planning', 'pool:debug', 'pool:bounded-worker', 'pool:advisor', 'pool:critic', 'pool:visual', or 'pool:compactor' to let CCL resolve a model from the selected quality/cost pool; these values are valid and must be passed verbatim. Advisor gives evidence-only action advice before a decision; Critic reviews an existing draft/result. A concrete model name ('deepseek-v4-pro', 'k3', …) bypasses pool resolution. If omitted, uses the agent definition's model or inherits from the parent."),
495152
495768
  run_in_background: z76.boolean().optional().describe("Set to true to run this agent in the background. You will be notified when it completes.")
495153
495769
  }));
@@ -495158,7 +495774,7 @@ var init_AgentTool = __esm(() => {
495158
495774
  mode: permissionModeSchema().optional().describe('Permission mode for spawned teammate (e.g., "plan" to require plan approval).')
495159
495775
  });
495160
495776
  return baseInputSchema().merge(multiAgentInputSchema).extend({
495161
- isolation: ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? z76.enum(["worktree", "remote"]) : z76.enum(["worktree"])).optional().describe({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? 'Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo. "remote" launches the agent in a remote CCR environment (always runs in background).' : 'Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.'),
495777
+ isolation: ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? z76.enum(["worktree", "remote"]) : z76.enum(["worktree"])).optional().describe({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? 'Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo. "remote" launches the agent in a remote CCR environment (always runs in background).' : 'Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.'),
495162
495778
  cwd: z76.string().optional().describe('Absolute path to run the agent in. Overrides the working directory for all filesystem and shell operations within this agent. Mutually exclusive with isolation: "worktree".')
495163
495779
  });
495164
495780
  });
@@ -495423,7 +496039,7 @@ var init_AgentTool = __esm(() => {
495423
496039
  is_fork: isForkPath
495424
496040
  });
495425
496041
  const effectiveIsolation = isolation ?? selectedAgent.isolation;
495426
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && effectiveIsolation === "remote") {
496042
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && effectiveIsolation === "remote") {
495427
496043
  const eligibility = await checkRemoteAgentEligibility();
495428
496044
  if (!eligibility.eligible) {
495429
496045
  const reasons = eligibility.errors.map(formatPreconditionError).join(`
@@ -495498,7 +496114,7 @@ ${reasons}`);
495498
496114
  });
495499
496115
  if (selectedAgent.memory) {
495500
496116
  logEvent("tengu_agent_memory_loaded", {
495501
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && {
496117
+ ...{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && {
495502
496118
  agent_type: selectedAgent.agentType
495503
496119
  },
495504
496120
  scope: selectedAgent.memory,
@@ -495521,6 +496137,7 @@ ${reasons}`);
495521
496137
  agentType: selectedAgent.agentType,
495522
496138
  isAsync: (run_in_background === true || selectedAgent.background === true) && !isBackgroundTasksDisabled2
495523
496139
  };
496140
+ const capabilityRole = roleForAgentPool(model ?? selectedAgent.model) ?? undefined;
495524
496141
  const isCoordinator = feature("COORDINATOR_MODE") ? isEnvTruthy(process.env.CLAUDE_CODE_COORDINATOR_MODE) : false;
495525
496142
  const forceAsync = isForkSubagentEnabled();
495526
496143
  const assistantForceAsync = feature("KAIROS") ? appState.kairosEnabled : false;
@@ -495651,7 +496268,8 @@ ${reasons}`);
495651
496268
  rootSetAppState,
495652
496269
  agentIdForCleanup: asyncAgentId,
495653
496270
  enableSummarization: isCoordinator || isForkSubagentEnabled() || getSdkAgentProgressSummariesEnabled(),
495654
- getWorktreeResult: cleanupWorktreeIfNeeded
496271
+ getWorktreeResult: cleanupWorktreeIfNeeded,
496272
+ capabilityRole
495655
496273
  })));
495656
496274
  const canReadOutputFile = toolUseContext.options.tools.some((t3) => toolMatchesName(t3, FILE_READ_TOOL_NAME) || toolMatchesName(t3, BASH_TOOL_NAME));
495657
496275
  return {
@@ -495854,6 +496472,23 @@ ${finalMessage}`;
495854
496472
  });
495855
496473
  return;
495856
496474
  }
496475
+ const unavailableResult = recoverAuxiliaryAgentFailure(capabilityRole, error5, backgroundedTaskId, metadata);
496476
+ if (unavailableResult) {
496477
+ completeAgentTask(unavailableResult, rootSetAppState);
496478
+ const worktreeResult3 = await cleanupWorktreeIfNeeded();
496479
+ enqueueAgentNotification({
496480
+ taskId: backgroundedTaskId,
496481
+ description,
496482
+ status: "completed",
496483
+ setAppState: rootSetAppState,
496484
+ finalMessage: extractTextContent(unavailableResult.content, `
496485
+ `),
496486
+ usage: { totalTokens: 0, toolUses: 0, durationMs: unavailableResult.totalDurationMs },
496487
+ toolUseId: toolUseContext.toolUseId,
496488
+ ...worktreeResult3
496489
+ });
496490
+ return;
496491
+ }
495857
496492
  const errMsg = errorMessage(error5);
495858
496493
  failAgentTask(backgroundedTaskId, errMsg, rootSetAppState);
495859
496494
  const worktreeResult2 = await cleanupWorktreeIfNeeded();
@@ -496005,6 +496640,17 @@ ${finalMessage}`;
496005
496640
  throw new AbortError;
496006
496641
  }
496007
496642
  if (syncAgentError) {
496643
+ const unavailableResult = recoverAuxiliaryAgentFailure(capabilityRole, syncAgentError, syncAgentId, metadata);
496644
+ if (unavailableResult) {
496645
+ return {
496646
+ data: {
496647
+ status: "completed",
496648
+ prompt,
496649
+ ...unavailableResult,
496650
+ ...worktreeResult
496651
+ }
496652
+ };
496653
+ }
496008
496654
  const hasAssistantMessages = agentMessages.some((msg) => msg.type === "assistant");
496009
496655
  if (!hasAssistantMessages) {
496010
496656
  throw syncAgentError;
@@ -496059,7 +496705,7 @@ ${finalMessage}`;
496059
496705
  },
496060
496706
  async checkPermissions(input, context2) {
496061
496707
  const appState = context2.getAppState();
496062
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && appState.toolPermissionContext.mode === "auto") {
496708
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && appState.toolPermissionContext.mode === "auto") {
496063
496709
  return {
496064
496710
  behavior: "passthrough",
496065
496711
  message: "Agent tool requires permission to spawn sub-agents."
@@ -506057,6 +506703,9 @@ async function* queryLoop(params, consumedCommandUuids) {
506057
506703
  const start = await resolveTrajectoryStart2(state.toolUseContext.options.mainLoopModel, getRoutingPriority2(), state.toolUseContext.getAppState().routingSession);
506058
506704
  if (start.source !== "legacy") {
506059
506705
  state.toolUseContext.options.mainLoopModel = start.model;
506706
+ state.toolUseContext.options.capabilityContext = start.capabilityContext;
506707
+ state.toolUseContext.options.capabilityResolutionId = start.resolutionId;
506708
+ state.toolUseContext.options.capabilityRequest = start.request;
506060
506709
  lastRoutedModel = start.model;
506061
506710
  logForDebugging(`[CapabilityRoute] role=main mode=${start.resolution?.mode ?? getRoutingPriority2()} resolved=${start.model} catalog=${start.resolution?.catalog_version ?? "pinned"}`);
506062
506711
  if (start.resolution) {
@@ -506068,7 +506717,10 @@ async function* queryLoop(params, consumedCommandUuids) {
506068
506717
  lastClassifiedIntent: null,
506069
506718
  routingTable: undefined,
506070
506719
  strategy: "capability",
506071
- capabilityVersion: start.resolution.catalog_version
506720
+ capabilityVersion: start.resolution.catalog_version,
506721
+ capabilityContext: start.capabilityContext,
506722
+ capabilityResolutionId: start.resolutionId,
506723
+ capabilityRequest: start.request
506072
506724
  }
506073
506725
  }));
506074
506726
  }
@@ -506369,6 +507021,7 @@ async function* queryLoop(params, consumedCommandUuids) {
506369
507021
  let incompleteStreamRetryCount = 0;
506370
507022
  let clientToolProtocolRecoveryState = initialClientToolProtocolRecoveryState();
506371
507023
  let avoidGatewayDeployment;
507024
+ let capabilityContextRefreshCount = 0;
506372
507025
  let lastClientToolProtocolError;
506373
507026
  let endpointOverrides = {};
506374
507027
  let currentEndpointName = toolUseContext.getAppState().currentEndpoint;
@@ -506417,6 +507070,7 @@ async function* queryLoop(params, consumedCommandUuids) {
506417
507070
  queryTracking,
506418
507071
  effortValue: appState.effortValue,
506419
507072
  advisorModel: appState.advisorModel,
507073
+ capabilityContext: toolUseContext.options.capabilityContext,
506420
507074
  ...avoidGatewayDeployment && { avoidGatewayDeployment },
506421
507075
  skipCacheWrite,
506422
507076
  agentId: toolUseContext.agentId,
@@ -506550,6 +507204,30 @@ async function* queryLoop(params, consumedCommandUuids) {
506550
507204
  }
506551
507205
  }
506552
507206
  } catch (innerError) {
507207
+ if (innerError instanceof GatewayInvalidCapabilityContextError && capabilityContextRefreshCount === 0 && assistantMessages.length === 0 && toolUseBlocks.length === 0 && toolUseContext.options.capabilityRequest) {
507208
+ capabilityContextRefreshCount += 1;
507209
+ const { resolveCapabilityModel: resolveCapabilityModel2 } = await Promise.resolve().then(() => (init_capabilityResolver(), exports_capabilityResolver));
507210
+ const refreshed2 = await resolveCapabilityModel2(toolUseContext.options.capabilityRequest);
507211
+ if (refreshed2?.capability_context) {
507212
+ currentModel = refreshed2.resolved_model;
507213
+ toolUseContext.options.mainLoopModel = refreshed2.resolved_model;
507214
+ toolUseContext.options.capabilityContext = refreshed2.capability_context;
507215
+ toolUseContext.options.capabilityResolutionId = refreshed2.resolution_id;
507216
+ state.toolUseContext.setAppState((s3) => ({
507217
+ ...s3,
507218
+ routingSession: s3.routingSession ? {
507219
+ ...s3.routingSession,
507220
+ routedModel: refreshed2.resolved_model,
507221
+ capabilityVersion: refreshed2.catalog_version,
507222
+ capabilityContext: refreshed2.capability_context,
507223
+ capabilityResolutionId: refreshed2.resolution_id,
507224
+ capabilityRequest: toolUseContext.options.capabilityRequest
507225
+ } : s3.routingSession
507226
+ }));
507227
+ attemptWithFallback = true;
507228
+ continue;
507229
+ }
507230
+ }
506553
507231
  if (innerError instanceof ClientToolProtocolTurnError) {
506554
507232
  lastClientToolProtocolError = innerError;
506555
507233
  const toolStates = streamingToolExecutor?.getSafeStateSnapshot() ?? [];
@@ -506792,6 +507470,21 @@ async function* queryLoop(params, consumedCommandUuids) {
506792
507470
  queryChainId: queryChainIdForAnalytics,
506793
507471
  queryDepth: queryTracking.depth
506794
507472
  });
507473
+ if (error5 instanceof GatewayCapabilityPoolExhaustedError) {
507474
+ const disposition = capabilityPoolFailureDispositionFromError(error5, toolUseContext.options.capabilityRequest?.role ?? "main");
507475
+ if (disposition?.kind === "auxiliary_unavailable") {
507476
+ streamingToolExecutor?.dispose();
507477
+ throw error5;
507478
+ }
507479
+ yield createAssistantAPIErrorMessage({
507480
+ content: disposition?.message ?? "No eligible main model is currently reachable.",
507481
+ apiError: "gateway_capability_pool_exhausted",
507482
+ error: "server_error",
507483
+ errorDetails: error5.code
507484
+ });
507485
+ streamingToolExecutor?.dispose();
507486
+ return { reason: "model_error", error: error5 };
507487
+ }
506795
507488
  if (error5 instanceof ImageSizeError || error5 instanceof ImageResizeError) {
506796
507489
  yield createAssistantAPIErrorMessage({
506797
507490
  content: error5.message
@@ -507372,6 +508065,7 @@ var init_query3 = __esm(() => {
507372
508065
  init_incompleteStreamRecovery();
507373
508066
  init_clientToolTurnBuffer();
507374
508067
  init_gatewayTransport();
508068
+ init_capabilityPoolRecovery();
507375
508069
  init_classifierFallback();
507376
508070
  init_classifierFallback();
507377
508071
  contextCollapse = feature("CONTEXT_COLLAPSE") ? __toCommonJS(exports_contextCollapse) : null;
@@ -507453,9 +508147,9 @@ function getAnthropicEnvMetadata() {
507453
508147
  };
507454
508148
  }
507455
508149
  function getBuildAgeMinutes() {
507456
- if (!{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.BUILD_TIME)
508150
+ if (!{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.BUILD_TIME)
507457
508151
  return;
507458
- const buildTime = new Date({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.BUILD_TIME).getTime();
508152
+ const buildTime = new Date({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.BUILD_TIME).getTime();
507459
508153
  if (isNaN(buildTime))
507460
508154
  return;
507461
508155
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -508221,18 +508915,30 @@ async function stream3PCompactDirect(options) {
508221
508915
  "User-Agent": getUserAgent(),
508222
508916
  ...Number.isSafeInteger(options.minimumContextTokens) && (options.minimumContextTokens ?? 0) > 0 ? {
508223
508917
  "X-Margay-Min-Context-Tokens": String(options.minimumContextTokens)
508224
- } : {}
508918
+ } : {},
508919
+ ...options.capabilityContext ? { "X-Margay-Capability-Context": options.capabilityContext } : {}
508225
508920
  },
508226
508921
  body: JSON.stringify(body),
508227
508922
  signal,
508228
508923
  ...fetchOptions
508229
508924
  });
508230
508925
  if (!response.ok) {
508926
+ if (response.status === 503) {
508927
+ const poolError = await parseGatewayCapabilityPoolExhausted(response.clone());
508928
+ if (poolError)
508929
+ throw poolError;
508930
+ const providerUnavailableError = await parseGatewayModelProviderUnavailable(response.clone());
508931
+ if (providerUnavailableError)
508932
+ throw providerUnavailableError;
508933
+ }
508231
508934
  const errorText = await response.text().catch(() => "(no body)");
508232
508935
  logForDebugging(`[3P-compact-direct] HTTP ${response.status}: ${errorText}`, { level: "error" });
508233
508936
  const contextCapabilityError = parseGatewayContextCapabilityUnavailable(response.status, errorText);
508234
508937
  if (contextCapabilityError)
508235
508938
  throw contextCapabilityError;
508939
+ const invalidCapabilityContext = parseGatewayInvalidCapabilityContext(response.status, errorText);
508940
+ if (invalidCapabilityContext)
508941
+ throw invalidCapabilityContext;
508236
508942
  if (response.status >= 500) {
508237
508943
  throw new GatewayUpstreamUnavailableError(response.status);
508238
508944
  }
@@ -508428,6 +509134,7 @@ async function streamOpenAICompactDirect(options) {
508428
509134
  conversation,
508429
509135
  maxOutputTokens: options.maxOutputTokens,
508430
509136
  ...options.minimumContextTokens !== undefined ? { minimumContextTokens: options.minimumContextTokens } : {},
509137
+ ...options.capabilityContext ? { capabilityContext: options.capabilityContext } : {},
508431
509138
  signal: options.signal
508432
509139
  });
508433
509140
  options.setStreamMode?.("responding");
@@ -508474,6 +509181,18 @@ async function resolveGatewayCompactorRouteCandidates({
508474
509181
  });
508475
509182
  if (!resolution)
508476
509183
  return DEFAULT_GATEWAY_COMPACTOR_ROUTES.map((candidate) => ({ ...candidate }));
509184
+ if (resolution.capability_context && resolution.resolution_id) {
509185
+ const selected = resolution.eligible_candidates.find((candidate) => candidate.model === resolution.resolved_model);
509186
+ if (!selected)
509187
+ return [];
509188
+ return [{
509189
+ model: selected.model,
509190
+ ...selected.canonical_model ? { canonicalModel: selected.canonical_model } : {},
509191
+ clientProtocol: selected.client_protocol,
509192
+ resolutionId: resolution.resolution_id,
509193
+ capabilityContext: resolution.capability_context
509194
+ }];
509195
+ }
508477
509196
  const eligible2 = new Map(resolution.eligible_candidates.map((candidate) => [candidate.model, candidate]));
508478
509197
  const candidates = DEFAULT_GATEWAY_COMPACTOR_CANDIDATES.flatMap((model) => {
508479
509198
  const candidate = eligible2.get(model);
@@ -509800,9 +510519,12 @@ async function streamCompactSummary({
509800
510519
  }
509801
510520
  }
509802
510521
  const retryEnabled = getFeatureValue_CACHED_MAY_BE_STALE("tengu_compact_streaming_retry", false);
509803
- const maxAttempts = gatewayCompactorCandidates?.length ?? Math.max(retryEnabled ? MAX_COMPACT_STREAMING_RETRIES : 1, 2);
510522
+ const gatewayContextRefreshAllowed = Boolean(gatewayCompactorCandidates?.[0]?.capabilityContext);
510523
+ let maxAttempts = gatewayCompactorCandidates ? gatewayCompactorCandidates.length + (gatewayContextRefreshAllowed ? 1 : 0) : Math.max(retryEnabled ? MAX_COMPACT_STREAMING_RETRIES : 1, 2);
510524
+ let gatewayCandidateIndex = 0;
510525
+ let gatewayContextRefreshCount = 0;
509804
510526
  for (let attempt = 1;attempt <= maxAttempts; attempt++) {
509805
- const activeCompactCandidate = gatewayCompactorCandidates ? candidateForCompactorAttempt(gatewayCompactorCandidates, attempt - 1) : undefined;
510527
+ const activeCompactCandidate = gatewayCompactorCandidates ? candidateForCompactorAttempt(gatewayCompactorCandidates, gatewayCandidateIndex) : undefined;
509806
510528
  const activeCompactModel = activeCompactCandidate?.model ?? compactModel;
509807
510529
  if (!activeCompactModel)
509808
510530
  break;
@@ -509840,16 +510562,27 @@ async function streamCompactSummary({
509840
510562
  systemPrompt: compactSystemPrompt,
509841
510563
  maxOutputTokens: Math.min(COMPACT_MAX_OUTPUT_TOKENS, getMaxOutputTokensForModel(activeCompactModel)),
509842
510564
  minimumContextTokens: preCompactTokenCount,
510565
+ capabilityContext: activeCompactCandidate?.capabilityContext,
509843
510566
  signal: context2.abortController.signal,
509844
510567
  setStreamMode: context2.setStreamMode,
509845
510568
  setResponseLength: context2.setResponseLength
509846
510569
  });
509847
510570
  } catch (error5) {
509848
- if (gatewayCompactorCandidates && shouldAdvanceGatewayCompactorCandidate(error5, attempt - 1, gatewayCompactorCandidates.length)) {
510571
+ if (error5 instanceof GatewayInvalidCapabilityContextError && gatewayContextRefreshCount === 0 && gatewayContextRefreshAllowed) {
510572
+ gatewayContextRefreshCount += 1;
510573
+ gatewayCompactorCandidates = await resolveGatewayCompactorRouteCandidates({
510574
+ minimumContextTokens: preCompactTokenCount
510575
+ });
510576
+ maxAttempts = Math.max(maxAttempts, attempt + gatewayCompactorCandidates.length);
510577
+ gatewayCandidateIndex = 0;
510578
+ continue;
510579
+ }
510580
+ if (gatewayCompactorCandidates && shouldAdvanceGatewayCompactorCandidate(error5, gatewayCandidateIndex, gatewayCompactorCandidates.length)) {
509849
510581
  logEvent("tengu_compact_candidate_fallback", {
509850
510582
  reason: compactorCandidateFallbackReason(error5),
509851
510583
  attempt
509852
510584
  });
510585
+ gatewayCandidateIndex += 1;
509853
510586
  continue;
509854
510587
  }
509855
510588
  throw error5;
@@ -510161,6 +510894,7 @@ var init_compact = __esm(() => {
510161
510894
  init_promptCacheBreakDetection();
510162
510895
  init_withRetry();
510163
510896
  init_incompleteStreamAdvisor();
510897
+ init_gatewayTransport();
510164
510898
  init_incompleteStreamRecovery();
510165
510899
  init_thirdPartyCompactTransport();
510166
510900
  init_compactorCandidates();
@@ -521173,7 +521907,7 @@ __export(exports_messages4, {
521173
521907
  AUTO_REJECT_MESSAGE: () => AUTO_REJECT_MESSAGE
521174
521908
  });
521175
521909
  import { randomUUID as randomUUID31 } from "crypto";
521176
- import isObject3 from "lodash-es/isObject.js";
521910
+ import isObject4 from "lodash-es/isObject.js";
521177
521911
  import last2 from "lodash-es/last.js";
521178
521912
  function getTeammateMailbox() {
521179
521913
  return init_teammateMailbox(), __toCommonJS(exports_teammateMailbox);
@@ -522563,7 +523297,7 @@ function normalizeContentFromAPIWithStatus(contentBlocks, tools, agentId) {
522563
523297
  const content = contentBlocks.map((contentBlock) => {
522564
523298
  switch (contentBlock.type) {
522565
523299
  case "tool_use": {
522566
- if (typeof contentBlock.input !== "string" && !isObject3(contentBlock.input)) {
523300
+ if (typeof contentBlock.input !== "string" && !isObject4(contentBlock.input)) {
522567
523301
  throw new Error("Tool use input must be a string or object");
522568
523302
  }
522569
523303
  let normalizedInput;
@@ -530333,7 +531067,7 @@ async function getMcpHeadersFromHelper(serverName, config) {
530333
531067
  if ("scope" in config && isMcpServerFromProjectOrLocalSettings(config) && !getIsNonInteractiveSession()) {
530334
531068
  const hasTrust = checkHasTrustDialogAccepted();
530335
531069
  if (!hasTrust) {
530336
- const error5 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.FEEDBACK_CHANNEL}.`);
531070
+ const error5 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.FEEDBACK_CHANNEL}.`);
530337
531071
  logAntError("MCP headersHelper invoked before trust check", error5);
530338
531072
  logEvent("tengu_mcp_headersHelper_missing_trust", {});
530339
531073
  return null;
@@ -531864,7 +532598,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
531864
532598
  const client4 = new Client({
531865
532599
  name: "claude-code",
531866
532600
  title: "CCL",
531867
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION ?? "unknown",
532601
+ version: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION ?? "unknown",
531868
532602
  description: "Anthropic's agentic coding tool",
531869
532603
  websiteUrl: PRODUCT_URL
531870
532604
  }, {
@@ -532215,7 +532949,7 @@ var init_client9 = __esm(() => {
532215
532949
  const client4 = new Client({
532216
532950
  name: "claude-code",
532217
532951
  title: "CCL",
532218
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION ?? "unknown",
532952
+ version: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION ?? "unknown",
532219
532953
  description: "Anthropic's agentic coding tool",
532220
532954
  websiteUrl: PRODUCT_URL
532221
532955
  }, {
@@ -533337,7 +534071,7 @@ function detectPlaceholder(url3, key) {
533337
534071
  if (key) {
533338
534072
  const k3 = key.toLowerCase();
533339
534073
  if (PLACEHOLDER_KEYS.has(k3))
533340
- reasons.push(`key "${key}" is a known placeholder value`);
534074
+ reasons.push("credential is a known placeholder value");
533341
534075
  else if (key.length < 8)
533342
534076
  reasons.push(`key is suspiciously short (${key.length} chars)`);
533343
534077
  }
@@ -533355,20 +534089,32 @@ function detectGatewayEnvShadow(envUrl, envKey, fileUrl, fileKey) {
533355
534089
  shadowed: true,
533356
534090
  envUrl,
533357
534091
  fileUrl,
533358
- hint: `shell env CCL_GATEWAY_URL=${envUrl ?? "(unset)"} overrides ~/.ccl/gateway.json=${fileUrl ?? "(none)"} ` + `(env-var-wins). If the env value is stale, run: unset CCL_GATEWAY_URL CCL_GATEWAY_KEY ` + `(and remove any CCL_GATEWAY_* export from your ~/.zshrc / ~/.bashrc), or run /gateway login to refresh.`
534092
+ hint: `shell env CCL_GATEWAY_URL=${envUrl ?? "(unset)"} overrides ~/.ccl/gateway.json=${fileUrl ?? "(none)"} ` + `(env-var-wins). If the env value is stale, run: unset CCL_GATEWAY_URL CCL_GATEWAY_KEY CCL_GATEWAY_CREDENTIAL_TYPE CCL_GATEWAY_ISSUER ` + `(and remove any CCL_GATEWAY_* export from your ~/.zshrc / ~/.bashrc), or run /gateway login to refresh.`
533359
534093
  };
533360
534094
  }
533361
534095
  function gatewayDoctorReport(input) {
533362
534096
  const findings = [];
533363
534097
  const effectiveUrl = input.envUrl ?? input.fileUrl;
533364
534098
  const effectiveKey = input.envKey ?? input.fileKey;
534099
+ const quarantinedSources = [
534100
+ input.envCredentialRejection ? `environment (${input.envCredentialRejection})` : null,
534101
+ input.fileCredentialRejection ? `gateway.json (${input.fileCredentialRejection})` : null
534102
+ ].filter((value) => value !== null);
534103
+ if (quarantinedSources.length > 0) {
534104
+ findings.push({
534105
+ level: "error",
534106
+ title: "Gateway credential quarantined",
534107
+ detail: `CCL refused an unverified or issuer-mismatched credential from ${quarantinedSources.join(" and ")} before making a Gateway request. ` + "No credential value was displayed or forwarded.",
534108
+ fix: "/gateway login URL GATEWAY_CREDENTIAL or /gateway register URL INVITE_CODE"
534109
+ });
534110
+ }
533365
534111
  const shadow = detectGatewayEnvShadow(input.envUrl, input.envKey, input.fileUrl, input.fileKey);
533366
534112
  if (shadow.shadowed) {
533367
534113
  findings.push({
533368
534114
  level: "warn",
533369
534115
  title: "Shell env overrides gateway.json",
533370
534116
  detail: shadow.hint,
533371
- fix: "unset CCL_GATEWAY_URL CCL_GATEWAY_KEY"
534117
+ fix: "unset CCL_GATEWAY_URL CCL_GATEWAY_KEY CCL_GATEWAY_CREDENTIAL_TYPE CCL_GATEWAY_ISSUER"
533372
534118
  });
533373
534119
  }
533374
534120
  const ph = detectPlaceholder(effectiveUrl, effectiveKey);
@@ -533377,7 +534123,7 @@ function gatewayDoctorReport(input) {
533377
534123
  level: "error",
533378
534124
  title: "Gateway config looks like a placeholder",
533379
534125
  detail: ph.reasons.join("; ") + ` (effective url=${effectiveUrl ?? "(none)"})`,
533380
- fix: "/gateway login <url> <key> or /gateway register <url> <invite>"
534126
+ fix: "/gateway login URL GATEWAY_CREDENTIAL or /gateway register URL INVITE_CODE"
533381
534127
  });
533382
534128
  }
533383
534129
  if (!effectiveUrl || !effectiveKey) {
@@ -533385,7 +534131,7 @@ function gatewayDoctorReport(input) {
533385
534131
  level: "error",
533386
534132
  title: "No gateway configured",
533387
534133
  detail: "Neither shell env nor ~/.ccl/gateway.json provides both a URL and a key.",
533388
- fix: "/gateway register <url> <invite> (or /gateway login <url> <key>)"
534134
+ fix: "/gateway register URL INVITE_CODE (or /gateway login URL GATEWAY_CREDENTIAL)"
533389
534135
  });
533390
534136
  }
533391
534137
  if (input.anthropicApiKey && input.hasOauthToken) {
@@ -533452,30 +534198,34 @@ async function fetchGatewayAccount(url3, key) {
533452
534198
  }
533453
534199
  async function gatewayLogin(url3, key, options) {
533454
534200
  const normalizedUrl = url3.replace(/\/+$/, "");
533455
- let account;
533456
- if (!options?.skipValidation) {
533457
- const resp = await fetch(`${normalizedUrl}/auth/me`, {
533458
- method: "GET",
533459
- headers: { Authorization: `Bearer ${key}` },
533460
- signal: AbortSignal.timeout(1e4)
533461
- });
533462
- if (!resp.ok) {
533463
- const body = await resp.json().catch(() => ({}));
533464
- throw new Error(`Gateway authentication failed (${resp.status}): ${body.error || "Unknown error"}`);
533465
- }
533466
- account = await resp.json().catch(() => {
533467
- return;
533468
- });
534201
+ const resp = await fetch(`${normalizedUrl}/auth/me`, {
534202
+ method: "GET",
534203
+ headers: { Authorization: `Bearer ${key}` },
534204
+ signal: AbortSignal.timeout(1e4)
534205
+ });
534206
+ if (!resp.ok) {
534207
+ throw new Error(`Gateway authentication failed (${resp.status}). Check the Gateway URL and credential, then retry /gateway login.`);
533469
534208
  }
533470
- writeGatewayJson({ url: normalizedUrl, key }, options?.configDir);
533471
- process.env.CCL_GATEWAY_URL = normalizedUrl;
533472
- process.env.CCL_GATEWAY_KEY = key;
534209
+ const account = await resp.json().catch(() => {
534210
+ return;
534211
+ });
534212
+ const config = createAdmittedGatewayConfig(normalizedUrl, key, "verified_gateway_credential");
534213
+ writeGatewayJson(config, options?.configDir);
534214
+ setGatewayEnv(config);
533473
534215
  return account;
533474
534216
  }
534217
+ function createAdmittedGatewayConfig(url3, key, credentialType) {
534218
+ return {
534219
+ schema_version: 2,
534220
+ url: url3,
534221
+ key,
534222
+ credential_type: credentialType,
534223
+ issuer: url3
534224
+ };
534225
+ }
533475
534226
  function gatewayLogout(configDir) {
533476
534227
  removeGatewayJson(configDir);
533477
- delete process.env.CCL_GATEWAY_URL;
533478
- delete process.env.CCL_GATEWAY_KEY;
534228
+ clearGatewayEnv();
533479
534229
  removeShellRcSync();
533480
534230
  }
533481
534231
  function gatewayStatus(configDir) {
@@ -533544,13 +534294,21 @@ async function gatewayRegister(url3, inviteCode, params = {}, configDir) {
533544
534294
  throw new Error(`Registration failed (${resp.status}): ${respBody.error || "Unknown error"}`);
533545
534295
  }
533546
534296
  const result = await resp.json();
533547
- const key = result.token ?? result.api_key;
533548
- if (!key) {
533549
- throw new Error("Registration succeeded but no credential (token/api_key) was returned. Contact the gateway admin.");
534297
+ const key = result.token;
534298
+ if (!key || !isStructurallyValidGatewayJwt(key)) {
534299
+ throw new Error("Registration succeeded but no structurally valid Gateway JWT token was returned. Contact the gateway admin.");
533550
534300
  }
533551
- writeGatewayJson({ url: normalizedUrl, key }, configDir);
533552
- process.env.CCL_GATEWAY_URL = normalizedUrl;
533553
- process.env.CCL_GATEWAY_KEY = key;
534301
+ const authResp = await fetch(`${normalizedUrl}/auth/me`, {
534302
+ method: "GET",
534303
+ headers: { Authorization: `Bearer ${key}` },
534304
+ signal: AbortSignal.timeout(1e4)
534305
+ });
534306
+ if (!authResp.ok) {
534307
+ throw new Error(`Gateway registration credential validation failed (${authResp.status}). Retry registration or contact the gateway admin.`);
534308
+ }
534309
+ const config = createAdmittedGatewayConfig(normalizedUrl, key, "margay_jwt");
534310
+ writeGatewayJson(config, configDir);
534311
+ setGatewayEnv(config);
533554
534312
  return { ...result, key };
533555
534313
  }
533556
534314
  var init_gateway_helpers = __esm(() => {
@@ -534741,6 +535499,7 @@ ${deferredToolList}
534741
535499
  signal: gwSignal,
534742
535500
  tags: traceTags(gwSpan.trace_id, gwSpan.span_id),
534743
535501
  avoidDeployment: options.avoidGatewayDeployment,
535502
+ capabilityContext: options.capabilityContext,
534744
535503
  minimumContextTokens: tokenCountWithEstimation(messagesForAPI) + (typeof gatewayBody.max_tokens === "number" ? gatewayBody.max_tokens : 0)
534745
535504
  });
534746
535505
  clearTimeout(gwTimeout);
@@ -534752,8 +535511,16 @@ ${deferredToolList}
534752
535511
  if (gwErr instanceof GatewayAlternateDeploymentUnavailableError) {
534753
535512
  throw gwErr;
534754
535513
  }
535514
+ if (gwErr instanceof GatewayInvalidCapabilityContextError) {
535515
+ markOk2(gatewayForChannel.url);
535516
+ throw gwErr;
535517
+ }
534755
535518
  const reason = gwErr?.message ?? "unknown error";
534756
- routeGatewayError(gwErr, signal, gatewayForChannel.url, reason, { markFailure: markFailure2, markDown: markDown2 });
535519
+ routeGatewayError(gwErr, signal, gatewayForChannel.url, reason, {
535520
+ markOk: markOk2,
535521
+ markFailure: markFailure2,
535522
+ markDown: markDown2
535523
+ });
534757
535524
  if (isAbortError5(gwErr, signal))
534758
535525
  throw gwErr;
534759
535526
  const statusMatch = gwErr?.message?.match(/Gateway\s+(\d{3})/);
@@ -535348,6 +536115,19 @@ ${deferredToolList}
535348
536115
  if (errorFromRetry instanceof ClientToolProtocolTurnError) {
535349
536116
  throw errorFromRetry;
535350
536117
  }
536118
+ const retryOriginal = errorFromRetry instanceof CannotRetryError ? errorFromRetry.originalError : undefined;
536119
+ if (errorFromRetry instanceof GatewayInvalidCapabilityContextError) {
536120
+ throw errorFromRetry;
536121
+ }
536122
+ if (retryOriginal instanceof GatewayInvalidCapabilityContextError) {
536123
+ throw retryOriginal;
536124
+ }
536125
+ if (errorFromRetry instanceof GatewayCapabilityPoolExhaustedError) {
536126
+ throw errorFromRetry;
536127
+ }
536128
+ if (retryOriginal instanceof GatewayCapabilityPoolExhaustedError) {
536129
+ throw retryOriginal;
536130
+ }
535351
536131
  const alternateDeploymentError = errorFromRetry instanceof GatewayAlternateDeploymentUnavailableError ? errorFromRetry : errorFromRetry instanceof CannotRetryError && errorFromRetry.originalError instanceof GatewayAlternateDeploymentUnavailableError ? errorFromRetry.originalError : undefined;
535352
536132
  if (alternateDeploymentError)
535353
536133
  throw alternateDeploymentError;
@@ -535884,6 +536664,14 @@ function isAbortError5(err2, signal) {
535884
536664
  return false;
535885
536665
  }
535886
536666
  function routeGatewayError(err2, signal, url3, reason, api) {
536667
+ if (err2 instanceof GatewayModelProviderUnavailableError) {
536668
+ api.markOk?.(url3);
536669
+ throw err2;
536670
+ }
536671
+ if (err2 instanceof GatewayCapabilityPoolExhaustedError) {
536672
+ api.markOk?.(url3);
536673
+ throw err2;
536674
+ }
535887
536675
  if (isAbortError5(err2, signal)) {
535888
536676
  api.markFailure(url3, reason);
535889
536677
  return { kind: "abort" };
@@ -539393,7 +540181,7 @@ async function setupTerminal(theme) {
539393
540181
  return current;
539394
540182
  });
539395
540183
  maybeMarkProjectOnboardingComplete();
539396
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
540184
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
539397
540185
  result += await setupShellCompletion(theme);
539398
540186
  }
539399
540187
  return result;
@@ -543407,7 +544195,8 @@ function findBtwTriggerPositions(text) {
543407
544195
  }
543408
544196
  async function runSideQuestion({
543409
544197
  question,
543410
- cacheSafeParams
544198
+ cacheSafeParams,
544199
+ abortController
543411
544200
  }) {
543412
544201
  const wrappedQuestion = `<system-reminder>This is a side question from the user. You must answer this question directly in a single response.
543413
544202
 
@@ -543438,6 +544227,7 @@ ${question}`;
543438
544227
  querySource: "side_question",
543439
544228
  forkLabel: "side_question",
543440
544229
  maxTurns: 1,
544230
+ overrides: abortController ? { abortController } : undefined,
543441
544231
  skipCacheWrite: true
543442
544232
  });
543443
544233
  return {
@@ -543535,7 +544325,8 @@ function BtwSideQuestion(t0) {
543535
544325
  const cacheSafeParams = await buildCacheSafeParams(context2);
543536
544326
  const result = await runSideQuestion({
543537
544327
  question,
543538
- cacheSafeParams
544328
+ cacheSafeParams,
544329
+ abortController
543539
544330
  });
543540
544331
  if (!abortController.signal.aborted) {
543541
544332
  if (result.response) {
@@ -543883,7 +544674,7 @@ function Feedback({
543883
544674
  platform: env4.platform,
543884
544675
  gitRepo: envInfo.isGit,
543885
544676
  terminal: env4.terminal,
543886
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
544677
+ version: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
543887
544678
  transcript: normalizeMessagesForAPI(messages),
543888
544679
  errors: sanitizedErrors,
543889
544680
  lastApiRequest: getLastAPIRequest(),
@@ -544075,7 +544866,7 @@ function Feedback({
544075
544866
  ", ",
544076
544867
  env4.terminal,
544077
544868
  ", v",
544078
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
544869
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
544079
544870
  ]
544080
544871
  })
544081
544872
  ]
@@ -544181,7 +544972,7 @@ ${sanitizedDescription}
544181
544972
  ` + `**Environment Info**
544182
544973
  ` + `- Platform: ${env4.platform}
544183
544974
  ` + `- Terminal: ${env4.terminal}
544184
- ` + `- Version: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION || "unknown"}
544975
+ ` + `- Version: ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION || "unknown"}
544185
544976
  ` + `- Feedback ID: ${feedbackId}
544186
544977
  ` + `
544187
544978
  **Errors**
@@ -544373,7 +545164,7 @@ var init_Feedback = __esm(() => {
544373
545164
  init_TextInput();
544374
545165
  import_react95 = __toESM(require_react(), 1);
544375
545166
  jsx_runtime168 = __toESM(require_jsx_runtime(), 1);
544376
- GITHUB_ISSUES_REPO_URL = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? "https://github.com/anthropics/claude-cli-internal/issues" : "https://github.com/anthropics/claude-code/issues";
545167
+ GITHUB_ISSUES_REPO_URL = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? "https://github.com/anthropics/claude-cli-internal/issues" : "https://github.com/anthropics/claude-code/issues";
544377
545168
  });
544378
545169
 
544379
545170
  // commands/feedback/feedback.tsx
@@ -547376,7 +548167,7 @@ function buildPrimarySection() {
547376
548167
  });
547377
548168
  return [{
547378
548169
  label: "Version",
547379
- value: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
548170
+ value: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
547380
548171
  }, {
547381
548172
  label: "Session name",
547382
548173
  value: nameValue
@@ -550016,7 +550807,7 @@ function Config({
550016
550807
  });
550017
550808
  }
550018
550809
  }] : [],
550019
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? [{
550810
+ ...{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? [{
550020
550811
  id: "speculationEnabled",
550021
550812
  label: "Speculative execution",
550022
550813
  value: globalConfig.speculationEnabled ?? true,
@@ -551297,7 +552088,7 @@ function Config({
551297
552088
  }
551298
552089
  })
551299
552090
  }) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime183.jsx(ChannelDowngradeDialog, {
551300
- currentVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
552091
+ currentVersion: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
551301
552092
  onChoice: (choice) => {
551302
552093
  setShowSubmenu(null);
551303
552094
  setTabsHidden(false);
@@ -551309,7 +552100,7 @@ function Config({
551309
552100
  autoUpdatesChannel: "stable"
551310
552101
  };
551311
552102
  if (choice === "stay") {
551312
- newSettings.minimumVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION;
552103
+ newSettings.minimumVersion = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION;
551313
552104
  }
551314
552105
  updateSettingsForSource("userSettings", newSettings);
551315
552106
  setSettingsData((prev_27) => ({
@@ -559383,7 +560174,7 @@ function HelpV2(t0) {
559383
560174
  let t6;
559384
560175
  if ($3[31] !== tabs) {
559385
560176
  t6 = /* @__PURE__ */ jsx_runtime210.jsx(Tabs, {
559386
- title: `CCL v${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION}`,
560177
+ title: `CCL v${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION}`,
559387
560178
  color: "professionalBlue",
559388
560179
  defaultTab: "general",
559389
560180
  children: tabs
@@ -579054,7 +579845,7 @@ async function call28(onDone, _context, args) {
579054
579845
  });
579055
579846
  }
579056
579847
  }
579057
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
579848
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
579058
579849
  return /* @__PURE__ */ jsx_runtime249.jsx(PluginSettings, {
579059
579850
  onComplete: onDone,
579060
579851
  args: ["manage"],
@@ -583901,9 +584692,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
583901
584692
  return [];
583902
584693
  }
583903
584694
  }
583904
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION) {
584695
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION) {
583905
584696
  if (process.env.USER_TYPE === "ant") {
583906
- const changelog = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION_CHANGELOG;
584697
+ const changelog = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION_CHANGELOG;
583907
584698
  if (changelog) {
583908
584699
  const commits = changelog.trim().split(`
583909
584700
  `).filter(Boolean);
@@ -583928,9 +584719,9 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = { USER_TYP
583928
584719
  releaseNotes
583929
584720
  };
583930
584721
  }
583931
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION) {
584722
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION) {
583932
584723
  if (process.env.USER_TYPE === "ant") {
583933
- const changelog = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION_CHANGELOG;
584724
+ const changelog = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION_CHANGELOG;
583934
584725
  if (changelog) {
583935
584726
  const commits = changelog.trim().split(`
583936
584727
  `).filter(Boolean);
@@ -585112,7 +585903,7 @@ function getRecentActivitySync() {
585112
585903
  return cachedActivity;
585113
585904
  }
585114
585905
  function getLogoDisplayData() {
585115
- const version4 = process.env.DEMO_VERSION ?? { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION;
585906
+ const version4 = process.env.DEMO_VERSION ?? { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION;
585116
585907
  const serverUrl = getDirectConnectServerUrl();
585117
585908
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
585118
585909
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -585144,7 +585935,7 @@ function formatModelAndBilling(modelName, billingType, availableWidth) {
585144
585935
  }
585145
585936
  function getRecentReleaseNotesSync(maxItems) {
585146
585937
  if (process.env.USER_TYPE === "ant") {
585147
- const changelog2 = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION_CHANGELOG;
585938
+ const changelog2 = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION_CHANGELOG;
585148
585939
  if (changelog2) {
585149
585940
  const commits = changelog2.trim().split(`
585150
585941
  `).filter(Boolean);
@@ -585890,7 +586681,7 @@ function createRecentActivityFeed(activities) {
585890
586681
  }
585891
586682
  function createWhatsNewFeed(releaseNotes2) {
585892
586683
  const lines = releaseNotes2.map((note) => {
585893
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
586684
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
585894
586685
  const match = note.match(/^(\d+\s+\w+\s+ago)\s+(.+)$/);
585895
586686
  if (match) {
585896
586687
  return {
@@ -585903,9 +586694,9 @@ function createWhatsNewFeed(releaseNotes2) {
585903
586694
  text: note
585904
586695
  };
585905
586696
  });
585906
- const emptyMessage = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? "Unable to fetch latest claude-cli-internal commits" : "Check the CCL changelog for updates";
586697
+ const emptyMessage = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? "Unable to fetch latest claude-cli-internal commits" : "Check the CCL changelog for updates";
585907
586698
  return {
585908
- title: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? "What's new [ANT-ONLY: Latest CC commits]" : "What's new",
586699
+ title: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? "What's new [ANT-ONLY: Latest CC commits]" : "What's new",
585909
586700
  lines,
585910
586701
  footer: lines.length > 0 ? "/release-notes for more" : undefined,
585911
586702
  emptyMessage
@@ -586700,7 +587491,7 @@ function LogoV2() {
586700
587491
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
586701
587492
  t22 = () => {
586702
587493
  const currentConfig = getGlobalConfig();
586703
- if (currentConfig.lastReleaseNotesSeen === { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION) {
587494
+ if (currentConfig.lastReleaseNotesSeen === { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION) {
586704
587495
  return;
586705
587496
  }
586706
587497
  saveGlobalConfig(_temp329);
@@ -587376,12 +588167,12 @@ function LogoV2() {
587376
588167
  return t41;
587377
588168
  }
587378
588169
  function _temp329(current) {
587379
- if (current.lastReleaseNotesSeen === { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION) {
588170
+ if (current.lastReleaseNotesSeen === { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION) {
587380
588171
  return current;
587381
588172
  }
587382
588173
  return {
587383
588174
  ...current,
587384
- lastReleaseNotesSeen: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
588175
+ lastReleaseNotesSeen: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
587385
588176
  };
587386
588177
  }
587387
588178
  function _temp246(s_0) {
@@ -595282,13 +596073,13 @@ var init_ultraplan = __esm(() => {
595282
596073
  ULTRAPLAN_TIMEOUT_MS = 30 * 60 * 1000;
595283
596074
  _rawPrompt = require_prompt();
595284
596075
  DEFAULT_INSTRUCTIONS = (typeof _rawPrompt === "string" ? _rawPrompt : _rawPrompt.default).trimEnd();
595285
- ULTRAPLAN_INSTRUCTIONS = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && process.env.ULTRAPLAN_PROMPT_FILE ? readFileSync19(process.env.ULTRAPLAN_PROMPT_FILE, "utf8").trimEnd() : DEFAULT_INSTRUCTIONS;
596076
+ ULTRAPLAN_INSTRUCTIONS = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && process.env.ULTRAPLAN_PROMPT_FILE ? readFileSync19(process.env.ULTRAPLAN_PROMPT_FILE, "utf8").trimEnd() : DEFAULT_INSTRUCTIONS;
595286
596077
  ultraplan_default = {
595287
596078
  type: "local-jsx",
595288
596079
  name: "ultraplan",
595289
596080
  description: `~10–30 min · CCL on the web drafts an advanced plan you can edit and approve. See ${CCR_TERMS_URL2}`,
595290
596081
  argumentHint: "<prompt>",
595291
- isEnabled: () => ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }).USER_TYPE === "ant",
596082
+ isEnabled: () => ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }).USER_TYPE === "ant",
595292
596083
  load: () => Promise.resolve({
595293
596084
  call: call37
595294
596085
  })
@@ -595399,7 +596190,7 @@ function shouldHideTasksFooter(tasks, showSpinnerTree) {
595399
596190
  return false;
595400
596191
  let hasVisibleTask = false;
595401
596192
  for (const t3 of Object.values(tasks)) {
595402
- if (!isBackgroundTask(t3) || { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && isPanelAgentTask(t3)) {
596193
+ if (!isBackgroundTask(t3) || { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && isPanelAgentTask(t3)) {
595403
596194
  continue;
595404
596195
  }
595405
596196
  hasVisibleTask = true;
@@ -601485,8 +602276,8 @@ async function getEnvLessBridgeConfig() {
601485
602276
  }
601486
602277
  async function checkEnvLessBridgeMinVersion() {
601487
602278
  const cfg = await getEnvLessBridgeConfig();
601488
- if (cfg.min_version && lt2({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION, cfg.min_version)) {
601489
- return `Your version of CCL (${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION}) is too old for Remote Control.
602279
+ if (cfg.min_version && lt2({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION, cfg.min_version)) {
602280
+ return `Your version of CCL (${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION}) is too old for Remote Control.
601490
602281
  Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
601491
602282
  }
601492
602283
  return null;
@@ -603861,10 +604652,10 @@ import { execa as execa14 } from "execa";
603861
604652
  import { readFile as readFile51 } from "fs/promises";
603862
604653
  import { join as join139 } from "path";
603863
604654
  function getMarketplaceName() {
603864
- return { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_NAME : OFFICIAL_MARKETPLACE_NAME;
604655
+ return { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_NAME : OFFICIAL_MARKETPLACE_NAME;
603865
604656
  }
603866
604657
  function getMarketplaceRepo() {
603867
- return { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_REPO : OFFICIAL_MARKETPLACE_REPO;
604658
+ return { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_REPO : OFFICIAL_MARKETPLACE_REPO;
603868
604659
  }
603869
604660
  function getPluginId() {
603870
604661
  return `thinkback@${getMarketplaceName()}`;
@@ -611617,7 +612408,7 @@ function getToolBuckets() {
611617
612408
  },
611618
612409
  EXECUTION: {
611619
612410
  name: "Execution tools",
611620
- toolNames: new Set([BashTool.name, { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? TungstenTool.name : undefined].filter((n2) => n2 !== undefined))
612411
+ toolNames: new Set([BashTool.name, { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? TungstenTool.name : undefined].filter((n2) => n2 !== undefined))
611621
612412
  },
611622
612413
  MCP: {
611623
612414
  name: "MCP tools",
@@ -617267,7 +618058,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
617267
618058
  smapsRollup,
617268
618059
  platform: process.platform,
617269
618060
  nodeVersion: process.version,
617270
- ccVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
618061
+ ccVersion: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
617271
618062
  };
617272
618063
  }
617273
618064
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -617854,7 +618645,7 @@ var init_bridge_kick = __esm(() => {
617854
618645
  var call61 = async () => {
617855
618646
  return {
617856
618647
  type: "text",
617857
- value: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.BUILD_TIME ? `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} (built ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.BUILD_TIME})` : { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
618648
+ value: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.BUILD_TIME ? `${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} (built ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.BUILD_TIME})` : { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
617858
618649
  };
617859
618650
  }, version4, version_default;
617860
618651
  var init_version = __esm(() => {
@@ -621275,12 +622066,9 @@ var call69 = async (onDone, _context, args) => {
621275
622066
  return null;
621276
622067
  }
621277
622068
  if (subcommand === "doctor") {
621278
- let file = null;
621279
- try {
621280
- file = readGatewayJson();
621281
- } catch {
621282
- file = null;
621283
- }
622069
+ const fileInspection = inspectGatewayJson();
622070
+ const envInspection = inspectGatewayEnv();
622071
+ const file = fileInspection.config;
621284
622072
  const status2 = gatewayStatus();
621285
622073
  const explicitEnv = status2.source === "env";
621286
622074
  const { findings } = gatewayDoctorReport({
@@ -621289,7 +622077,9 @@ var call69 = async (onDone, _context, args) => {
621289
622077
  fileUrl: file?.url,
621290
622078
  fileKey: file?.key,
621291
622079
  anthropicApiKey: process.env.ANTHROPIC_API_KEY,
621292
- hasOauthToken: !!(process.env.CLAUDE_CODE_OAUTH_TOKEN || process.env.ANTHROPIC_AUTH_TOKEN)
622080
+ hasOauthToken: !!(process.env.CLAUDE_CODE_OAUTH_TOKEN || process.env.ANTHROPIC_AUTH_TOKEN),
622081
+ envCredentialRejection: envInspection.rejection === "missing_config" ? undefined : envInspection.rejection,
622082
+ fileCredentialRejection: fileInspection.rejection === "missing_config" ? undefined : fileInspection.rejection
621293
622083
  });
621294
622084
  const effUrl = status2.url;
621295
622085
  const effKey = status2.key;
@@ -624918,7 +625708,7 @@ function OverviewTab({
624918
625708
  })
624919
625709
  ]
624920
625710
  }),
624921
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && stats.totalSpeculationTimeSavedMs > 0 && /* @__PURE__ */ jsx_runtime367.jsx(ThemedBox_default, {
625711
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && stats.totalSpeculationTimeSavedMs > 0 && /* @__PURE__ */ jsx_runtime367.jsx(ThemedBox_default, {
624922
625712
  flexDirection: "row",
624923
625713
  gap: 4,
624924
625714
  children: /* @__PURE__ */ jsx_runtime367.jsx(ThemedBox_default, {
@@ -625592,7 +626382,7 @@ function renderOverviewToAnsi(stats) {
625592
626382
  const activeDaysVal = `${stats.activeDays}/${stats.totalDays}`;
625593
626383
  const peakHourVal = stats.peakActivityHour !== null ? `${stats.peakActivityHour}:00-${stats.peakActivityHour + 1}:00` : "N/A";
625594
626384
  lines.push(row("Active days", activeDaysVal, "Peak hour", peakHourVal));
625595
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && stats.totalSpeculationTimeSavedMs > 0) {
626385
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && stats.totalSpeculationTimeSavedMs > 0) {
625596
626386
  const label = "Speculation saved:".padEnd(COL1_LABEL_WIDTH);
625597
626387
  lines.push(label + h3(formatDuration(stats.totalSpeculationTimeSavedMs)));
625598
626388
  }
@@ -627376,7 +628166,7 @@ function generateHtmlReport(data, insights) {
627376
628166
  </html>`;
627377
628167
  }
627378
628168
  function buildExportData(data, insights, facets, remoteStats) {
627379
- const version5 = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION;
628169
+ const version5 = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION;
627380
628170
  const remote_hosts_collected = remoteStats?.hosts.filter((h3) => h3.sessionCount > 0).map((h3) => h3.name);
627381
628171
  const facets_summary = {
627382
628172
  total: facets.size,
@@ -631641,7 +632431,7 @@ var init_sessionStorage = __esm(() => {
631641
632431
  init_settings2();
631642
632432
  init_slowOperations();
631643
632433
  init_uuid();
631644
- VERSION7 = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION;
632434
+ VERSION7 = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION;
631645
632435
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
631646
632436
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
631647
632437
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -632859,7 +633649,7 @@ var init_filesystem = __esm(() => {
632859
633649
  });
632860
633650
  getBundledSkillsRoot = memoize64(function getBundledSkillsRoot2() {
632861
633651
  const nonce = randomBytes19(16).toString("hex");
632862
- return join155(getClaudeTempDir(), "bundled-skills", { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION, nonce);
633652
+ return join155(getClaudeTempDir(), "bundled-skills", { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION, nonce);
632863
633653
  });
632864
633654
  getResolvedWorkingDirPaths = memoize64(getPathsForPermissionCheck);
632865
633655
  });
@@ -638174,7 +638964,7 @@ function getSimpleDoingTasksSection() {
638174
638964
  ];
638175
638965
  const userHelpSubitems = [
638176
638966
  `/help: Get help with using CCL`,
638177
- `To give feedback, users should ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.ISSUES_EXPLAINER}`
638967
+ `To give feedback, users should ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.ISSUES_EXPLAINER}`
638178
638968
  ];
638179
638969
  const items = [
638180
638970
  `The user will primarily request you to perform software engineering tasks. These may include solving bugs, adding new functionality, refactoring code, explaining code, and more. When given an unclear or generic instruction, consider it in the context of these software engineering tasks and the current working directory. For example, if the user asks you to change "methodName" to snake case, do not reply with just "method_name", instead find the method in the code and modify the code.`,
@@ -639488,7 +640278,7 @@ function createBridgeLogger(options) {
639488
640278
  connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
639489
640279
  regenerateQr(connectUrl);
639490
640280
  if (verbose) {
639491
- write(source_default.dim(`Remote Control`) + ` v${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION}
640281
+ write(source_default.dim(`Remote Control`) + ` v${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION}
639492
640282
  `);
639493
640283
  }
639494
640284
  if (verbose) {
@@ -640461,7 +641251,7 @@ function appendToLog(path21, message) {
640461
641251
  cwd: getFsImplementation().cwd(),
640462
641252
  userType: process.env.USER_TYPE,
640463
641253
  sessionId: getSessionId(),
640464
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
641254
+ version: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
640465
641255
  };
640466
641256
  getLogWriter(path21).write(messageWithTimestamp);
640467
641257
  }
@@ -641731,7 +642521,7 @@ Spawn mode for this project:
641731
642521
  const api = createBridgeApiClient({
641732
642522
  baseUrl,
641733
642523
  getAccessToken: getBridgeAccessToken2,
641734
- runnerVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
642524
+ runnerVersion: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
641735
642525
  onDebug: logForDebugging,
641736
642526
  onAuth401: handleOAuth401Error2,
641737
642527
  getTrustedDeviceToken
@@ -641969,7 +642759,7 @@ async function runBridgeHeadless(opts, signal) {
641969
642759
  const api = createBridgeApiClient({
641970
642760
  baseUrl,
641971
642761
  getAccessToken: opts.getAccessToken,
641972
- runnerVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
642762
+ runnerVersion: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
641973
642763
  onDebug: log2,
641974
642764
  onAuth401: opts.onAuth401,
641975
642765
  getTrustedDeviceToken
@@ -646410,7 +647200,7 @@ function buildSystemInitMessage(inputs) {
646410
647200
  slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
646411
647201
  apiKeySource: getAnthropicApiKeyWithSource().source,
646412
647202
  betas: getSdkBetas(),
646413
- claude_code_version: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
647203
+ claude_code_version: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
646414
647204
  output_style: outputStyle2,
646415
647205
  agents: inputs.agents.map((agent) => agent.agentType),
646416
647206
  skills: inputs.skills.filter((s3) => s3.userInvocable !== false).map((skill) => skill.name),
@@ -648704,7 +649494,7 @@ async function initBridgeCore(params) {
648704
649494
  const rawApi = createBridgeApiClient({
648705
649495
  baseUrl,
648706
649496
  getAccessToken,
648707
- runnerVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
649497
+ runnerVersion: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
648708
649498
  onDebug: logForDebugging,
648709
649499
  onAuth401,
648710
649500
  getTrustedDeviceToken
@@ -651386,7 +652176,7 @@ function MessageSelector({
651386
652176
  ...summarizeInputProps,
651387
652177
  onChange: setSummarizeFromFeedback
651388
652178
  });
651389
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
652179
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
651390
652180
  baseOptions.push({
651391
652181
  value: "summarize_up_to",
651392
652182
  label: "Summarize up to here",
@@ -658884,7 +659674,7 @@ function bashToolUseOptions({
658884
659674
  }
658885
659675
  }
658886
659676
  const editablePrefixShown = options.some((o2) => o2.value === "yes-prefix-edited");
658887
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && !editablePrefixShown && isClassifierPermissionsEnabled() && onClassifierDescriptionChange && !initialClassifierDescriptionEmpty && !descriptionAlreadyExists(classifierDescription ?? "", existingAllowDescriptions) && decisionReason?.type !== "classifier") {
659677
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && !editablePrefixShown && isClassifierPermissionsEnabled() && onClassifierDescriptionChange && !initialClassifierDescriptionEmpty && !descriptionAlreadyExists(classifierDescription ?? "", existingAllowDescriptions) && decisionReason?.type !== "classifier") {
658888
659678
  options.push({
658889
659679
  type: "input",
658890
659680
  label: "Yes, and don’t ask again for",
@@ -666491,7 +667281,7 @@ var init_CompanionSprite = __esm(() => {
666491
667281
 
666492
667282
  // buddy/useBuddyNotification.tsx
666493
667283
  function isBuddyTeaserWindow() {
666494
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant")
667284
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant")
666495
667285
  return true;
666496
667286
  const d2 = new Date;
666497
667287
  return d2.getFullYear() === 2026 && d2.getMonth() === 3 && d2.getDate() <= 7;
@@ -666627,7 +667417,7 @@ var init_useVoiceEnabled = __esm(() => {
666627
667417
  function getSemverPart(version5) {
666628
667418
  return `${import_semver14.major(version5, { loose: true })}.${import_semver14.minor(version5, { loose: true })}.${import_semver14.patch(version5, { loose: true })}`;
666629
667419
  }
666630
- function useUpdateNotification(updatedVersion, initialVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION) {
667420
+ function useUpdateNotification(updatedVersion, initialVersion = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION) {
666631
667421
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react232.useState(() => getSemverPart(initialVersion));
666632
667422
  if (!updatedVersion) {
666633
667423
  return null;
@@ -666667,7 +667457,7 @@ function AutoUpdater({
666667
667457
  return;
666668
667458
  }
666669
667459
  if (false) {}
666670
- const currentVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION;
667460
+ const currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION;
666671
667461
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
666672
667462
  let latestVersion = await getLatestVersion(channel2);
666673
667463
  const isDisabled = isAutoUpdaterDisabled();
@@ -666803,7 +667593,7 @@ function AutoUpdater({
666803
667593
  " ",
666804
667594
  /* @__PURE__ */ jsx_runtime413.jsx(ThemedText, {
666805
667595
  bold: true,
666806
- children: hasLocalInstall ? `cd ~/.ccl/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL}` : `npm i -g ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL}`
667596
+ children: hasLocalInstall ? `cd ~/.ccl/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL}` : `npm i -g ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL}`
666807
667597
  })
666808
667598
  ]
666809
667599
  })
@@ -666880,12 +667670,12 @@ function NativeAutoUpdater({
666880
667670
  logEvent("tengu_native_auto_updater_start", {});
666881
667671
  try {
666882
667672
  const maxVersion = await getMaxVersion();
666883
- if (maxVersion && gt2({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION, maxVersion)) {
667673
+ if (maxVersion && gt2({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION, maxVersion)) {
666884
667674
  const msg = await getMaxVersionMessage();
666885
667675
  setMaxVersionIssue(msg ?? "affects your version");
666886
667676
  }
666887
667677
  const result = await installLatest(channel2);
666888
- const currentVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION;
667678
+ const currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION;
666889
667679
  const latencyMs = Date.now() - startTime2;
666890
667680
  if (result.lockFailed) {
666891
667681
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -666981,7 +667771,7 @@ function NativeAutoUpdater({
666981
667771
  })
666982
667772
  ]
666983
667773
  }),
666984
- maxVersionIssue && { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime414.jsxs(ThemedText, {
667774
+ maxVersionIssue && { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime414.jsxs(ThemedText, {
666985
667775
  color: "warning",
666986
667776
  children: [
666987
667777
  "⚠ Known issue: ",
@@ -667035,17 +667825,17 @@ function PackageManagerAutoUpdater(t0) {
667035
667825
  const maxVersion = await getMaxVersion();
667036
667826
  if (maxVersion && latest && gt2(latest, maxVersion)) {
667037
667827
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
667038
- if (gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION, maxVersion)) {
667039
- logForDebugging(`PackageManagerAutoUpdater: current version ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
667828
+ if (gte({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION, maxVersion)) {
667829
+ logForDebugging(`PackageManagerAutoUpdater: current version ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
667040
667830
  setUpdateAvailable(false);
667041
667831
  return;
667042
667832
  }
667043
667833
  latest = maxVersion;
667044
667834
  }
667045
- const hasUpdate = latest && !gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION, latest) && !shouldSkipVersion(latest);
667835
+ const hasUpdate = latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION, latest) && !shouldSkipVersion(latest);
667046
667836
  setUpdateAvailable(!!hasUpdate);
667047
667837
  if (hasUpdate) {
667048
- logForDebugging(`PackageManagerAutoUpdater: Update available ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} -> ${latest}`);
667838
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} -> ${latest}`);
667049
667839
  }
667050
667840
  };
667051
667841
  $3[0] = t1;
@@ -667079,7 +667869,7 @@ function PackageManagerAutoUpdater(t0) {
667079
667869
  wrap: "truncate",
667080
667870
  children: [
667081
667871
  "currentVersion: ",
667082
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
667872
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
667083
667873
  ]
667084
667874
  });
667085
667875
  $3[3] = verbose;
@@ -667330,7 +668120,7 @@ var init_useMemoryUsage = __esm(() => {
667330
668120
 
667331
668121
  // components/MemoryUsageIndicator.tsx
667332
668122
  function MemoryUsageIndicator() {
667333
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE !== "ant") {
668123
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE !== "ant") {
667334
668124
  return null;
667335
668125
  }
667336
668126
  const memoryUsage = useMemoryUsage();
@@ -668916,11 +669706,11 @@ function isNumber2(value) {
668916
669706
  function isBoolean2(value) {
668917
669707
  return value === true || value === false || isObjectLike(value) && getTag(value) == "[object Boolean]";
668918
669708
  }
668919
- function isObject4(value) {
669709
+ function isObject5(value) {
668920
669710
  return typeof value === "object";
668921
669711
  }
668922
669712
  function isObjectLike(value) {
668923
- return isObject4(value) && value !== null;
669713
+ return isObject5(value) && value !== null;
668924
669714
  }
668925
669715
  function isDefined3(value) {
668926
669716
  return value !== undefined && value !== null;
@@ -670508,7 +671298,7 @@ class TokenSearch {
670508
671298
  return searchResult;
670509
671299
  }
670510
671300
  }
670511
- var INCORRECT_INDEX_TYPE = "Incorrect 'index' type", LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) => `Invalid value for key ${key}`, PATTERN_LENGTH_TOO_LARGE = (max2) => `Pattern length exceeds max of ${max2}.`, MISSING_KEY_PROPERTY = (name2) => `Missing ${name2} property in key`, INVALID_KEY_WEIGHT_VALUE = (key) => `Property 'weight' in key '${key}' must be a positive integer`, hasOwn5, MatchOptions, BasicOptions, FuzzyOptions, AdvancedOptions, Config2, SPACE2, MAX_BITS = 32, NON_DECOMPOSABLE_MAP, NON_DECOMPOSABLE_RE, stripDiacritics, ExactMatch, InverseExactMatch, PrefixExactMatch, InversePrefixExactMatch, SuffixExactMatch, InverseSuffixExactMatch, FuzzyMatch, IncludeMatch, searchers, searchersLen, ESCAPED_PIPE = "\x00", OR_TOKEN = "|", MultiMatchSet, registeredSearchers, LogicalOperator, KeyType, isExpression = (query2) => !!(query2[LogicalOperator.AND] || query2[LogicalOperator.OR]), isPath = (query2) => !!query2[KeyType.PATH], isLeaf = (query2) => !isArray6(query2) && isObject4(query2) && !isExpression(query2), convertToExplicit = (query2) => ({
671301
+ var INCORRECT_INDEX_TYPE = "Incorrect 'index' type", LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) => `Invalid value for key ${key}`, PATTERN_LENGTH_TOO_LARGE = (max2) => `Pattern length exceeds max of ${max2}.`, MISSING_KEY_PROPERTY = (name2) => `Missing ${name2} property in key`, INVALID_KEY_WEIGHT_VALUE = (key) => `Property 'weight' in key '${key}' must be a positive integer`, hasOwn5, MatchOptions, BasicOptions, FuzzyOptions, AdvancedOptions, Config2, SPACE2, MAX_BITS = 32, NON_DECOMPOSABLE_MAP, NON_DECOMPOSABLE_RE, stripDiacritics, ExactMatch, InverseExactMatch, PrefixExactMatch, InversePrefixExactMatch, SuffixExactMatch, InverseSuffixExactMatch, FuzzyMatch, IncludeMatch, searchers, searchersLen, ESCAPED_PIPE = "\x00", OR_TOKEN = "|", MultiMatchSet, registeredSearchers, LogicalOperator, KeyType, isExpression = (query2) => !!(query2[LogicalOperator.AND] || query2[LogicalOperator.OR]), isPath = (query2) => !!query2[KeyType.PATH], isLeaf = (query2) => !isArray6(query2) && isObject5(query2) && !isExpression(query2), convertToExplicit = (query2) => ({
670512
671302
  [LogicalOperator.AND]: Object.keys(query2).map((key) => ({
670513
671303
  [key]: query2[key]
670514
671304
  }))
@@ -677024,7 +677814,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
677024
677814
  project_dir: getOriginalCwd(),
677025
677815
  added_dirs: addedDirs
677026
677816
  },
677027
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
677817
+ version: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
677028
677818
  output_style: {
677029
677819
  name: outputStyleName
677030
677820
  },
@@ -678381,7 +679171,7 @@ function ModeIndicator({
678381
679171
  const expandedView = useAppState((s_3) => s_3.expandedView);
678382
679172
  const showSpinnerTree = expandedView === "teammates";
678383
679173
  const prStatus = usePrStatus(isLoading, isPrStatusEnabled());
678384
- const hasTmuxSession = useAppState((s_4) => ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }).USER_TYPE === "ant" && s_4.tungstenActiveSession !== undefined);
679174
+ const hasTmuxSession = useAppState((s_4) => ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }).USER_TYPE === "ant" && s_4.tungstenActiveSession !== undefined);
678385
679175
  const nextTickAt = import_react259.useSyncExternalStore(proactiveModule6?.subscribeToProactiveChanges ?? NO_OP_SUBSCRIBE, proactiveModule6?.getNextTickAt ?? NULL, NULL);
678386
679176
  const voiceEnabled = runtimeVoiceFeature() ? useVoiceEnabled() : false;
678387
679177
  const voiceState = runtimeVoiceFeature() ? useVoiceState((s_5) => s_5.voiceState) : "idle";
@@ -678390,7 +679180,7 @@ function ModeIndicator({
678390
679180
  const selGetState = useSelection().getState;
678391
679181
  const hasNextTick = nextTickAt !== null;
678392
679182
  const isCoordinator = feature("COORDINATOR_MODE") ? coordinatorModule?.isCoordinatorMode() === true : false;
678393
- const runningTaskCount = import_react259.useMemo(() => count(Object.values(tasks2), (t3) => isBackgroundTask(t3) && !({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && isPanelAgentTask(t3))), [tasks2]);
679183
+ const runningTaskCount = import_react259.useMemo(() => count(Object.values(tasks2), (t3) => isBackgroundTask(t3) && !({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && isPanelAgentTask(t3))), [tasks2]);
678394
679184
  const tasksV2 = useTasksV2();
678395
679185
  const hasTaskItems = tasksV2 !== undefined && tasksV2.length > 0;
678396
679186
  const escShortcut = useShortcutDisplay("chat:cancel", "Chat", "esc").toLowerCase();
@@ -678468,7 +679258,7 @@ function ModeIndicator({
678468
679258
  ]
678469
679259
  })
678470
679260
  }, "remote")] : [],
678471
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && hasTmuxSession ? [/* @__PURE__ */ jsx_runtime440.jsx(TungstenPill, {
679261
+ ...{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && hasTmuxSession ? [/* @__PURE__ */ jsx_runtime440.jsx(TungstenPill, {
678472
679262
  selected: tmuxSelected
678473
679263
  }, "tmux")] : [],
678474
679264
  ...isAgentSwarmsEnabled() && hasTeams ? [/* @__PURE__ */ jsx_runtime440.jsx(TeamStatus, {
@@ -678519,7 +679309,7 @@ function ModeIndicator({
678519
679309
  ]
678520
679310
  });
678521
679311
  }
678522
- const hasCoordinatorTasks = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && getVisibleAgentTasks(tasks2).length > 0;
679312
+ const hasCoordinatorTasks = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && getVisibleAgentTasks(tasks2).length > 0;
678523
679313
  const tasksPart = hasBackgroundTasks && !hasTeammatePills && !shouldHideTasksFooter(tasks2, showSpinnerTree) ? /* @__PURE__ */ jsx_runtime440.jsx(BackgroundTaskStatus, {
678524
679314
  tasksSelected,
678525
679315
  isViewingTeammate,
@@ -678827,7 +679617,7 @@ function PromptInputFooter({
678827
679617
  isInputWrapped,
678828
679618
  isNarrow
678829
679619
  }),
678830
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && isUndercover() && /* @__PURE__ */ jsx_runtime441.jsx(ThemedText, {
679620
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && isUndercover() && /* @__PURE__ */ jsx_runtime441.jsx(ThemedText, {
678831
679621
  dimColor: true,
678832
679622
  children: "undercover"
678833
679623
  }),
@@ -678838,7 +679628,7 @@ function PromptInputFooter({
678838
679628
  })
678839
679629
  ]
678840
679630
  }),
678841
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime441.jsx(CoordinatorTaskPanel, {})
679631
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime441.jsx(CoordinatorTaskPanel, {})
678842
679632
  ]
678843
679633
  });
678844
679634
  }
@@ -679599,8 +680389,8 @@ function PromptInput({
679599
680389
  const replBridgeExplicit = useAppState((s3) => s3.replBridgeExplicit);
679600
680390
  const replBridgeReconnecting = useAppState((s3) => s3.replBridgeReconnecting);
679601
680391
  const bridgeFooterVisible = replBridgeConnected && (replBridgeExplicit || replBridgeReconnecting);
679602
- const hasTungstenSession = useAppState((s3) => ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }).USER_TYPE === "ant" && s3.tungstenActiveSession !== undefined);
679603
- const tmuxFooterVisible = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && hasTungstenSession;
680392
+ const hasTungstenSession = useAppState((s3) => ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }).USER_TYPE === "ant" && s3.tungstenActiveSession !== undefined);
680393
+ const tmuxFooterVisible = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && hasTungstenSession;
679604
680394
  const bagelFooterVisible = useAppState((s3) => false);
679605
680395
  const teamContext = useAppState((s3) => s3.teamContext);
679606
680396
  const queuedCommands = useCommandQueue();
@@ -679666,7 +680456,7 @@ function PromptInput({
679666
680456
  };
679667
680457
  }), [setAppState]);
679668
680458
  const coordinatorTaskCount = useCoordinatorTaskCount();
679669
- const hasBgTaskPill = import_react265.useMemo(() => Object.values(tasks2).some((t3) => isBackgroundTask(t3) && !({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && isPanelAgentTask(t3))), [tasks2]);
680459
+ const hasBgTaskPill = import_react265.useMemo(() => Object.values(tasks2).some((t3) => isBackgroundTask(t3) && !({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && isPanelAgentTask(t3))), [tasks2]);
679670
680460
  const minCoordinatorIndex = hasBgTaskPill ? -1 : 0;
679671
680461
  import_react265.useEffect(() => {
679672
680462
  if (coordinatorTaskIndex >= coordinatorTaskCount) {
@@ -679719,7 +680509,7 @@ function PromptInput({
679719
680509
  }];
679720
680510
  }, [teamContext]);
679721
680511
  const runningTaskCount = import_react265.useMemo(() => count(Object.values(tasks2), (t3) => t3.status === "running"), [tasks2]);
679722
- const tasksFooterVisible = (runningTaskCount > 0 || { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && coordinatorTaskCount > 0) && !shouldHideTasksFooter(tasks2, showSpinnerTree);
680512
+ const tasksFooterVisible = (runningTaskCount > 0 || { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && coordinatorTaskCount > 0) && !shouldHideTasksFooter(tasks2, showSpinnerTree);
679723
680513
  const teamsFooterVisible = cachedTeams.length > 0;
679724
680514
  const footerItems = import_react265.useMemo(() => [tasksFooterVisible && "tasks", tmuxFooterVisible && "tmux", bagelFooterVisible && "bagel", teamsFooterVisible && "teams", bridgeFooterVisible && "bridge", companionFooterVisible && "companion"].filter(Boolean), [tasksFooterVisible, tmuxFooterVisible, bagelFooterVisible, teamsFooterVisible, bridgeFooterVisible, companionFooterVisible]);
679725
680515
  const rawFooterSelection = useAppState((s3) => s3.footerSelection);
@@ -680725,14 +681515,14 @@ function PromptInput({
680725
681515
  });
680726
681516
  useKeybindings({
680727
681517
  "footer:up": () => {
680728
- if (tasksSelected && { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && coordinatorTaskCount > 0 && coordinatorTaskIndex > minCoordinatorIndex) {
681518
+ if (tasksSelected && { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && coordinatorTaskCount > 0 && coordinatorTaskIndex > minCoordinatorIndex) {
680729
681519
  setCoordinatorTaskIndex((prev) => prev - 1);
680730
681520
  return;
680731
681521
  }
680732
681522
  navigateFooter(-1, true);
680733
681523
  },
680734
681524
  "footer:down": () => {
680735
- if (tasksSelected && { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && coordinatorTaskCount > 0) {
681525
+ if (tasksSelected && { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && coordinatorTaskCount > 0) {
680736
681526
  if (coordinatorTaskIndex < coordinatorTaskCount - 1) {
680737
681527
  setCoordinatorTaskIndex((prev) => prev + 1);
680738
681528
  }
@@ -680794,7 +681584,7 @@ function PromptInput({
680794
681584
  }
680795
681585
  break;
680796
681586
  case "tmux":
680797
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
681587
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
680798
681588
  setAppState((prev) => prev.tungstenPanelAutoHidden ? {
680799
681589
  ...prev,
680800
681590
  tungstenPanelAutoHidden: false
@@ -698754,7 +699544,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
698754
699544
  } catch {}
698755
699545
  const data = {
698756
699546
  trigger,
698757
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
699547
+ version: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
698758
699548
  platform: process.platform,
698759
699549
  transcript,
698760
699550
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -699190,7 +699980,7 @@ function useMemorySurvey(messages, isLoading, hasActivePrompt = false, {
699190
699980
  });
699191
699981
  }, []);
699192
699982
  const shouldShowTranscriptPrompt = import_react299.useCallback((selected_0) => {
699193
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE !== "ant") {
699983
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE !== "ant") {
699194
699984
  return false;
699195
699985
  }
699196
699986
  if (selected_0 !== "bad" && selected_0 !== "good") {
@@ -705406,7 +706196,7 @@ function AutoRunIssueNotification(t0) {
705406
706196
  return t6;
705407
706197
  }
705408
706198
  function shouldAutoRunIssue(reason) {
705409
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE !== "ant") {
706199
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE !== "ant") {
705410
706200
  return false;
705411
706201
  }
705412
706202
  switch (reason) {
@@ -705419,7 +706209,7 @@ function shouldAutoRunIssue(reason) {
705419
706209
  }
705420
706210
  }
705421
706211
  function getAutoRunCommand(reason) {
705422
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && reason === "feedback_survey_good") {
706212
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && reason === "feedback_survey_good") {
705423
706213
  return "/good-claude";
705424
706214
  }
705425
706215
  return "/issue";
@@ -705560,7 +706350,7 @@ var init_useIssueFlagBanner = __esm(() => {
705560
706350
 
705561
706351
  // components/DevBar.tsx
705562
706352
  function shouldShowDevBar() {
705563
- return { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant";
706353
+ return { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant";
705564
706354
  }
705565
706355
  function DevBar() {
705566
706356
  const $3 = import_compiler_runtime368.c(5);
@@ -707425,7 +708215,7 @@ function REPL({
707425
708215
  }) {
707426
708216
  const isRemoteSession = !!remoteSessionConfig;
707427
708217
  const titleDisabled = import_react324.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE), []);
707428
- const moreRightEnabled = import_react324.useMemo(() => ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }).USER_TYPE === "ant" && isEnvTruthy(process.env.CLAUDE_MORERIGHT), []);
708218
+ const moreRightEnabled = import_react324.useMemo(() => ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }).USER_TYPE === "ant" && isEnvTruthy(process.env.CLAUDE_MORERIGHT), []);
707429
708219
  const disableVirtualScroll = import_react324.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL), []);
707430
708220
  const disableMessageActions = runtimeFeature11("MESSAGE_ACTIONS") ? import_react324.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_MESSAGE_ACTIONS), []) : false;
707431
708221
  import_react324.useEffect(() => {
@@ -707513,7 +708303,7 @@ function REPL({
707513
708303
  const [ideInstallationStatus, setIDEInstallationStatus] = import_react324.useState(null);
707514
708304
  const [showIdeOnboarding, setShowIdeOnboarding] = import_react324.useState(false);
707515
708305
  const [showModelSwitchCallout, setShowModelSwitchCallout] = import_react324.useState(() => {
707516
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
708306
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
707517
708307
  return shouldShowAntModelSwitch();
707518
708308
  }
707519
708309
  return false;
@@ -707675,7 +708465,7 @@ function REPL({
707675
708465
  }, []);
707676
708466
  const [showUndercoverCallout, setShowUndercoverCallout] = import_react324.useState(false);
707677
708467
  import_react324.useEffect(() => {
707678
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
708468
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
707679
708469
  (async () => {
707680
708470
  const {
707681
708471
  isInternalModelRepo: isInternalModelRepo2
@@ -708292,9 +709082,9 @@ function REPL({
708292
709082
  return "ultraplan-launch";
708293
709083
  if (allowDialogsWithAnimation && showIdeOnboarding)
708294
709084
  return "ide-onboarding";
708295
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && allowDialogsWithAnimation && showModelSwitchCallout)
709085
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && allowDialogsWithAnimation && showModelSwitchCallout)
708296
709086
  return "model-switch";
708297
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && allowDialogsWithAnimation && showUndercoverCallout)
709087
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && allowDialogsWithAnimation && showUndercoverCallout)
708298
709088
  return "undercover-callout";
708299
709089
  if (allowDialogsWithAnimation && showEffortCallout)
708300
709090
  return "effort-callout";
@@ -708635,7 +709425,7 @@ Error: sandbox required but unavailable: ${reason}
708635
709425
  dynamicSkillDirTriggers: new Set,
708636
709426
  discoveredSkillNames: discoveredSkillNamesRef.current,
708637
709427
  setResponseLength,
708638
- pushApiMetricsEntry: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? (ttftMs) => {
709428
+ pushApiMetricsEntry: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? (ttftMs) => {
708639
709429
  const now = Date.now();
708640
709430
  const baseline = responseLengthRef.current;
708641
709431
  apiMetricsRef2.current.push({
@@ -708906,7 +709696,7 @@ Error: sandbox required but unavailable: ${reason}
708906
709696
  }));
708907
709697
  }
708908
709698
  queryCheckpoint("query_end");
708909
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && apiMetricsRef2.current.length > 0) {
709699
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && apiMetricsRef2.current.length > 0) {
708910
709700
  const entries = apiMetricsRef2.current;
708911
709701
  const ttfts = entries.map((e3) => e3.ttftMs);
708912
709702
  const otpsValues = entries.map((e3) => {
@@ -708992,7 +709782,7 @@ Error: sandbox required but unavailable: ${reason}
708992
709782
  resetLoadingState();
708993
709783
  await mrOnTurnComplete(messagesRef.current, abortController2.signal.aborted);
708994
709784
  sendBridgeResultRef.current();
708995
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && !abortController2.signal.aborted) {
709785
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && !abortController2.signal.aborted) {
708996
709786
  setAppState((prev) => {
708997
709787
  if (prev.tungstenActiveSession === undefined)
708998
709788
  return prev;
@@ -709073,7 +709863,7 @@ Error: sandbox required but unavailable: ${reason}
709073
709863
  setPlanSlug(getSessionId(), oldPlanSlug);
709074
709864
  }
709075
709865
  }
709076
- const shouldStorePlanForVerification = initialMsg.message.planContent && { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && isEnvTruthy(undefined);
709866
+ const shouldStorePlanForVerification = initialMsg.message.planContent && { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && isEnvTruthy(undefined);
709077
709867
  setAppState((prev) => {
709078
709868
  let updatedToolPermissionContext = initialMsg.mode ? applyPermissionUpdates(prev.toolPermissionContext, buildPermissionUpdates(initialMsg.mode, initialMsg.allowedPrompts)) : prev.toolPermissionContext;
709079
709869
  if (feature("TRANSCRIPT_CLASSIFIER") && initialMsg.mode === "auto") {
@@ -709472,7 +710262,7 @@ Error: sandbox required but unavailable: ${reason}
709472
710262
  setAutoRunIssueReason(null);
709473
710263
  }, []);
709474
710264
  const handleSurveyRequestFeedback = import_react324.useCallback(() => {
709475
- const command9 = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? "/issue" : "/feedback";
710265
+ const command9 = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? "/issue" : "/feedback";
709476
710266
  onSubmit(command9, {
709477
710267
  setCursorOffset: () => {},
709478
710268
  clearBuffer: () => {},
@@ -709841,7 +710631,7 @@ ${fileList}`);
709841
710631
  assistantMode: scheduledTasksAssistantMode,
709842
710632
  setMessages
709843
710633
  });
709844
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
710634
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
709845
710635
  useTaskListWatcher({
709846
710636
  taskListId,
709847
710637
  isLoading,
@@ -709919,7 +710709,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
709919
710709
  return total === 1 ? `${customMessage}…` : `${customMessage}… ${completedCount}/${total}`;
709920
710710
  }
709921
710711
  const hookType = currentHooks[0]?.data.hookEvent === "SubagentStop" ? "subagent stop" : "stop";
709922
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
710712
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
709923
710713
  const cmd = currentHooks[completedCount]?.data.command;
709924
710714
  const label = cmd ? ` '${truncateToWidth(cmd, 40)}'` : "";
709925
710715
  return total === 1 ? `running ${hookType} hook${label}` : `running ${hookType} hook${label}… ${completedCount}/${total}`;
@@ -710301,7 +711091,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
710301
711091
  width: "100%",
710302
711092
  children: toolJSX.jsx
710303
711093
  }),
710304
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime475.jsx(TungstenLiveMonitor, {}),
711094
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime475.jsx(TungstenLiveMonitor, {}),
710305
711095
  feature("WEB_BROWSER_TOOL") ? WebBrowserPanelModule && /* @__PURE__ */ jsx_runtime475.jsx(WebBrowserPanelModule.WebBrowserPanel, {}) : null,
710306
711096
  /* @__PURE__ */ jsx_runtime475.jsx(ThemedBox_default, {
710307
711097
  flexGrow: 1
@@ -710560,7 +711350,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
710560
711350
  onDone: () => setShowIdeOnboarding(false),
710561
711351
  installationStatus: ideInstallationStatus
710562
711352
  }),
710563
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && focusedInputDialog === "model-switch" && AntModelSwitchCallout26 && /* @__PURE__ */ jsx_runtime475.jsx(AntModelSwitchCallout26, {
711353
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && focusedInputDialog === "model-switch" && AntModelSwitchCallout26 && /* @__PURE__ */ jsx_runtime475.jsx(AntModelSwitchCallout26, {
710564
711354
  onDone: (selection, modelAlias) => {
710565
711355
  setShowModelSwitchCallout(false);
710566
711356
  if (selection === "switch" && modelAlias) {
@@ -710572,7 +711362,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
710572
711362
  }
710573
711363
  }
710574
711364
  }),
710575
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && focusedInputDialog === "undercover-callout" && UndercoverAutoCallout26 && /* @__PURE__ */ jsx_runtime475.jsx(UndercoverAutoCallout26, {
711365
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && focusedInputDialog === "undercover-callout" && UndercoverAutoCallout26 && /* @__PURE__ */ jsx_runtime475.jsx(UndercoverAutoCallout26, {
710576
711366
  onDone: () => setShowUndercoverCallout(false)
710577
711367
  }),
710578
711368
  focusedInputDialog === "effort-callout" && /* @__PURE__ */ jsx_runtime475.jsx(EffortCallout, {
@@ -710706,7 +711496,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
710706
711496
  inputValue,
710707
711497
  setInputValue
710708
711498
  }),
710709
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && skillImprovementSurvey.suggestion && /* @__PURE__ */ jsx_runtime475.jsx(SkillImprovementSurvey, {
711499
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && skillImprovementSurvey.suggestion && /* @__PURE__ */ jsx_runtime475.jsx(SkillImprovementSurvey, {
710710
711500
  isOpen: skillImprovementSurvey.isOpen,
710711
711501
  skillName: skillImprovementSurvey.suggestion.skillName,
710712
711502
  updates: skillImprovementSurvey.suggestion.updates,
@@ -710841,7 +711631,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
710841
711631
  setMessageSelectorPreselect(undefined);
710842
711632
  }
710843
711633
  }),
710844
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime475.jsx(DevBar, {})
711634
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime475.jsx(DevBar, {})
710845
711635
  ]
710846
711636
  }),
710847
711637
  feature("BUDDY") && !(companionNarrow && isFullscreenEnvEnabled()) && companionVisible ? /* @__PURE__ */ jsx_runtime475.jsx(CompanionSprite, {}) : null
@@ -711075,17 +711865,17 @@ var init_REPL = __esm(() => {
711075
711865
  resetAnchor: () => {}
711076
711866
  });
711077
711867
  VoiceKeybindingHandler27 = runtimeVoiceFeature() ? (init_useVoiceIntegration(), __toCommonJS(exports_useVoiceIntegration)).VoiceKeybindingHandler : () => null;
711078
- useFrustrationDetection27 = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? __toCommonJS(exports_useFrustrationDetection).useFrustrationDetection : () => ({
711868
+ useFrustrationDetection27 = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? __toCommonJS(exports_useFrustrationDetection).useFrustrationDetection : () => ({
711079
711869
  state: "closed",
711080
711870
  handleTranscriptSelect: () => {}
711081
711871
  });
711082
- useAntOrgWarningNotification27 = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? __toCommonJS(exports_useAntOrgWarningNotification).useAntOrgWarningNotification : () => {};
711872
+ useAntOrgWarningNotification27 = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? __toCommonJS(exports_useAntOrgWarningNotification).useAntOrgWarningNotification : () => {};
711083
711873
  getCoordinatorUserContext27 = feature("COORDINATOR_MODE") ? (init_coordinatorMode(), __toCommonJS(exports_coordinatorMode)).getCoordinatorUserContext : () => ({});
711084
711874
  proactiveModule8 = feature("PROACTIVE") || feature("KAIROS") ? __toCommonJS(exports_proactive) : null;
711085
711875
  useProactive26 = feature("PROACTIVE") || feature("KAIROS") ? (init_useProactive(), __toCommonJS(exports_useProactive)).useProactive : null;
711086
- AntModelSwitchCallout26 = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? (init_AntModelSwitchCallout(), __toCommonJS(exports_AntModelSwitchCallout)).AntModelSwitchCallout : null;
711087
- shouldShowAntModelSwitch = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? (init_AntModelSwitchCallout(), __toCommonJS(exports_AntModelSwitchCallout)).shouldShowModelSwitchCallout : () => false;
711088
- UndercoverAutoCallout26 = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? (init_UndercoverAutoCallout(), __toCommonJS(exports_UndercoverAutoCallout)).UndercoverAutoCallout : null;
711876
+ AntModelSwitchCallout26 = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? (init_AntModelSwitchCallout(), __toCommonJS(exports_AntModelSwitchCallout)).AntModelSwitchCallout : null;
711877
+ shouldShowAntModelSwitch = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? (init_AntModelSwitchCallout(), __toCommonJS(exports_AntModelSwitchCallout)).shouldShowModelSwitchCallout : () => false;
711878
+ UndercoverAutoCallout26 = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? (init_UndercoverAutoCallout(), __toCommonJS(exports_UndercoverAutoCallout)).UndercoverAutoCallout : null;
711089
711879
  WebBrowserPanelModule = feature("WEB_BROWSER_TOOL") ? __toCommonJS(exports_WebBrowserPanel) : null;
711090
711880
  EMPTY_MCP_CLIENTS2 = [];
711091
711881
  HISTORY_STUB = {
@@ -714087,7 +714877,7 @@ function WelcomeV2() {
714087
714877
  dimColor: true,
714088
714878
  children: [
714089
714879
  "v",
714090
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
714880
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
714091
714881
  " "
714092
714882
  ]
714093
714883
  })
@@ -714286,7 +715076,7 @@ function WelcomeV2() {
714286
715076
  dimColor: true,
714287
715077
  children: [
714288
715078
  "v",
714289
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
715079
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
714290
715080
  " "
714291
715081
  ]
714292
715082
  })
@@ -714512,7 +715302,7 @@ function AppleTerminalWelcomeV2(t0) {
714512
715302
  dimColor: true,
714513
715303
  children: [
714514
715304
  "v",
714515
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
715305
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
714516
715306
  " "
714517
715307
  ]
714518
715308
  });
@@ -714730,7 +715520,7 @@ function AppleTerminalWelcomeV2(t0) {
714730
715520
  dimColor: true,
714731
715521
  children: [
714732
715522
  "v",
714733
- { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
715523
+ { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
714734
715524
  " "
714735
715525
  ]
714736
715526
  });
@@ -716397,7 +717187,7 @@ function completeOnboarding() {
716397
717187
  saveGlobalConfig((current) => ({
716398
717188
  ...current,
716399
717189
  hasCompletedOnboarding: true,
716400
- lastOnboardingVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
717190
+ lastOnboardingVersion: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
716401
717191
  }));
716402
717192
  }
716403
717193
  function showDialog(root, renderer) {
@@ -720380,11 +721170,11 @@ ${args}`;
720380
721170
  }
720381
721171
  function registerLoopSkill() {
720382
721172
  registerBundledSkill({
720383
- name: "loop",
721173
+ name: "loop-scheduler",
720384
721174
  description: "Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo, defaults to 10m)",
720385
721175
  whenToUse: 'When the user wants to set up a recurring task, poll for status, or run something repeatedly on an interval (e.g. "check the deploy every 5 minutes", "keep running /babysit-prs"). Do NOT invoke for one-off tasks.',
720386
721176
  argumentHint: "[interval] <prompt>",
720387
- userInvocable: true,
721177
+ userInvocable: false,
720388
721178
  isEnabled: isKairosCronEnabled,
720389
721179
  async getPromptForCommand(args) {
720390
721180
  const trimmed = args.trim();
@@ -724748,6 +725538,24 @@ var init_streamJsonStdoutGuard = __esm(() => {
724748
725538
  });
724749
725539
 
724750
725540
  // utils/queryContext.ts
725541
+ function assembleHeadlessSystemPrompt({
725542
+ customPrompt,
725543
+ defaultSystemPrompt,
725544
+ memoryMechanicsPrompt,
725545
+ appendSystemPrompt,
725546
+ currentUserPrompt,
725547
+ routingPriority
725548
+ }) {
725549
+ const promptText = typeof currentUserPrompt === "string" ? currentUserPrompt : Array.isArray(currentUserPrompt) ? currentUserPrompt.filter((block) => typeof block === "object" && block !== null && block.type === "text" && typeof block.text === "string").map((block) => block.text).join(`
725550
+ `) : "";
725551
+ const specialistGuidance = autoCriticSystemPromptAddition(routingPriority, promptText);
725552
+ return asSystemPrompt([
725553
+ ...customPrompt !== undefined ? [customPrompt] : defaultSystemPrompt,
725554
+ ...memoryMechanicsPrompt ? [memoryMechanicsPrompt] : [],
725555
+ ...specialistGuidance ? [specialistGuidance] : [],
725556
+ ...appendSystemPrompt ? [appendSystemPrompt] : []
725557
+ ]);
725558
+ }
724751
725559
  async function fetchSystemPromptParts({
724752
725560
  tools,
724753
725561
  mainLoopModel,
@@ -724828,6 +725636,7 @@ var init_queryContext = __esm(() => {
724828
725636
  init_context2();
724829
725637
  init_abortController();
724830
725638
  init_model();
725639
+ init_autoCriticOrchestration();
724831
725640
  init_thinking();
724832
725641
  });
724833
725642
 
@@ -724918,11 +725727,14 @@ class QueryEngine {
724918
725727
  ...getCoordinatorUserContext32(mcpClients, isScratchpadEnabled() ? getScratchpadDir() : undefined)
724919
725728
  };
724920
725729
  const memoryMechanicsPrompt = customPrompt !== undefined && hasAutoMemPathOverride() ? await loadMemoryPrompt() : null;
724921
- const systemPrompt = asSystemPrompt([
724922
- ...customPrompt !== undefined ? [customPrompt] : defaultSystemPrompt,
724923
- ...memoryMechanicsPrompt ? [memoryMechanicsPrompt] : [],
724924
- ...appendSystemPrompt ? [appendSystemPrompt] : []
724925
- ]);
725730
+ const systemPrompt = assembleHeadlessSystemPrompt({
725731
+ customPrompt,
725732
+ defaultSystemPrompt,
725733
+ memoryMechanicsPrompt,
725734
+ appendSystemPrompt,
725735
+ currentUserPrompt: prompt,
725736
+ routingPriority: getRoutingPriority()
725737
+ });
724926
725738
  const hasStructuredOutputTool = tools.some((t3) => toolMatchesName(t3, SYNTHETIC_OUTPUT_TOOL_NAME));
724927
725739
  if (jsonSchema && hasStructuredOutputTool) {
724928
725740
  registerStructuredOutputEnforcement(setAppState, getSessionId());
@@ -725611,6 +726423,7 @@ var init_QueryEngine = __esm(() => {
725611
726423
  init_pluginLoader();
725612
726424
  init_processUserInput();
725613
726425
  init_queryContext();
726426
+ init_intentClassifier();
725614
726427
  init_Shell();
725615
726428
  init_sessionStorage();
725616
726429
  init_thinking();
@@ -730082,7 +730895,7 @@ async function startMCPServer(cwd3, debug5, verbose) {
730082
730895
  setCwd(cwd3);
730083
730896
  const server = new Server({
730084
730897
  name: "claude/tengu",
730085
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION
730898
+ version: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION
730086
730899
  }, {
730087
730900
  capabilities: {
730088
730901
  tools: {}
@@ -731887,7 +732700,7 @@ __export(exports_update, {
731887
732700
  });
731888
732701
  async function update() {
731889
732702
  logEvent("tengu_update_check", {});
731890
- writeToStdout(`Current version: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION}
732703
+ writeToStdout(`Current version: ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION}
731891
732704
  `);
731892
732705
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
731893
732706
  writeToStdout(`Checking for updates to ${channel2} version...
@@ -731962,8 +732775,8 @@ async function update() {
731962
732775
  writeToStdout(`CCL is managed by Homebrew.
731963
732776
  `);
731964
732777
  const latest = await getLatestVersion(channel2);
731965
- if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION, latest)) {
731966
- writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} → ${latest}
732778
+ if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION, latest)) {
732779
+ writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} → ${latest}
731967
732780
  `);
731968
732781
  writeToStdout(`
731969
732782
  `);
@@ -731979,8 +732792,8 @@ async function update() {
731979
732792
  writeToStdout(`CCL is managed by winget.
731980
732793
  `);
731981
732794
  const latest = await getLatestVersion(channel2);
731982
- if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION, latest)) {
731983
- writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} → ${latest}
732795
+ if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION, latest)) {
732796
+ writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} → ${latest}
731984
732797
  `);
731985
732798
  writeToStdout(`
731986
732799
  `);
@@ -731996,8 +732809,8 @@ async function update() {
731996
732809
  writeToStdout(`CCL is managed by apk.
731997
732810
  `);
731998
732811
  const latest = await getLatestVersion(channel2);
731999
- if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION, latest)) {
732000
- writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} → ${latest}
732812
+ if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION, latest)) {
732813
+ writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} → ${latest}
732001
732814
  `);
732002
732815
  writeToStdout(`
732003
732816
  `);
@@ -732062,11 +732875,11 @@ async function update() {
732062
732875
  `);
732063
732876
  await gracefulShutdown(1);
732064
732877
  }
732065
- if (result.latestVersion === { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION) {
732066
- writeToStdout(source_default.green(`CCL is up to date (${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION})`) + `
732878
+ if (result.latestVersion === { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION) {
732879
+ writeToStdout(source_default.green(`CCL is up to date (${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION})`) + `
732067
732880
  `);
732068
732881
  } else {
732069
- writeToStdout(source_default.green(`Successfully updated from ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} to version ${result.latestVersion}`) + `
732882
+ writeToStdout(source_default.green(`Successfully updated from ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} to version ${result.latestVersion}`) + `
732070
732883
  `);
732071
732884
  await regenerateCompletionCache();
732072
732885
  }
@@ -732085,9 +732898,9 @@ async function update() {
732085
732898
  await removeInstalledSymlink();
732086
732899
  }
732087
732900
  logForDebugging("update: Checking npm registry for latest version");
732088
- logForDebugging(`update: Package URL: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL}`);
732901
+ logForDebugging(`update: Package URL: ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL}`);
732089
732902
  const npmTag = channel2 === "stable" ? "stable" : "latest";
732090
- const npmCommand = `npm view ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL}@${npmTag} version`;
732903
+ const npmCommand = `npm view ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL}@${npmTag} version`;
732091
732904
  logForDebugging(`update: Running: ${npmCommand}`);
732092
732905
  const latestVersion = await getLatestVersion(channel2);
732093
732906
  logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
@@ -732107,7 +732920,7 @@ async function update() {
732107
732920
  `);
732108
732921
  process.stderr.write(` • Corporate proxy/firewall blocking npm
732109
732922
  `);
732110
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL && !{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL.startsWith("@anthropic")) {
732923
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL && !{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL.startsWith("@anthropic")) {
732111
732924
  process.stderr.write(` • Internal/development build not published to npm
732112
732925
  `);
732113
732926
  }
@@ -732119,19 +732932,19 @@ async function update() {
732119
732932
  `);
732120
732933
  process.stderr.write(` • Run with --debug flag for more details
732121
732934
  `);
732122
- const packageName = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL || (process.env.USER_TYPE === "ant" ? "@anthropic-ai/claude-cli" : "@anthropic-ai/claude-code");
732935
+ const packageName = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL || (process.env.USER_TYPE === "ant" ? "@anthropic-ai/claude-cli" : "@anthropic-ai/claude-code");
732123
732936
  process.stderr.write(` • Manually check: npm view ${packageName} version
732124
732937
  `);
732125
732938
  process.stderr.write(` • Check if you need to login: npm whoami
732126
732939
  `);
732127
732940
  await gracefulShutdown(1);
732128
732941
  }
732129
- if (latestVersion === { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION) {
732130
- writeToStdout(source_default.green(`CCL is up to date (${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION})`) + `
732942
+ if (latestVersion === { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION) {
732943
+ writeToStdout(source_default.green(`CCL is up to date (${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION})`) + `
732131
732944
  `);
732132
732945
  await gracefulShutdown(0);
732133
732946
  }
732134
- writeToStdout(`New version available: ${latestVersion} (current: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION})
732947
+ writeToStdout(`New version available: ${latestVersion} (current: ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION})
732135
732948
  `);
732136
732949
  writeToStdout(`Installing update...
732137
732950
  `);
@@ -732176,7 +732989,7 @@ async function update() {
732176
732989
  logForDebugging(`update: Installation status: ${status2}`);
732177
732990
  switch (status2) {
732178
732991
  case "success":
732179
- writeToStdout(source_default.green(`Successfully updated from ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} to version ${latestVersion}`) + `
732992
+ writeToStdout(source_default.green(`Successfully updated from ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} to version ${latestVersion}`) + `
732180
732993
  `);
732181
732994
  await regenerateCompletionCache();
732182
732995
  break;
@@ -732186,7 +732999,7 @@ async function update() {
732186
732999
  if (useLocalUpdate) {
732187
733000
  process.stderr.write(`Try manually updating with:
732188
733001
  `);
732189
- process.stderr.write(` cd ~/.claude/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL}
733002
+ process.stderr.write(` cd ~/.claude/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL}
732190
733003
  `);
732191
733004
  } else {
732192
733005
  process.stderr.write(`Try running with sudo or fix npm permissions
@@ -732202,7 +733015,7 @@ async function update() {
732202
733015
  if (useLocalUpdate) {
732203
733016
  process.stderr.write(`Try manually updating with:
732204
733017
  `);
732205
- process.stderr.write(` cd ~/.claude/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.PACKAGE_URL}
733018
+ process.stderr.write(` cd ~/.claude/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.PACKAGE_URL}
732206
733019
  `);
732207
733020
  } else {
732208
733021
  process.stderr.write(`Or consider using native installation with: margay install
@@ -732389,7 +733202,7 @@ function runMigrations() {
732389
733202
  if (feature("TRANSCRIPT_CLASSIFIER")) {
732390
733203
  resetAutoModeOptInForDefaultOffer();
732391
733204
  }
732392
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
733205
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
732393
733206
  migrateFennecToOpus();
732394
733207
  }
732395
733208
  saveGlobalConfig((prev) => prev.migrationVersion === CURRENT_MIGRATION_VERSION ? prev : {
@@ -732436,7 +733249,7 @@ function startDeferredPrefetches() {
732436
733249
  if (!isBareMode()) {
732437
733250
  skillChangeDetector.initialize();
732438
733251
  }
732439
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
733252
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
732440
733253
  Promise.resolve().then(() => exports_eventLoopStallDetector).then((m4) => m4.startEventLoopStallDetector());
732441
733254
  }
732442
733255
  }
@@ -732932,9 +733745,9 @@ async function run() {
732932
733745
  const initOnly = options.initOnly ?? false;
732933
733746
  const maintenance = options.maintenance ?? false;
732934
733747
  const disableSlashCommands = options.disableSlashCommands || false;
732935
- const tasksOption = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && options.tasks;
733748
+ const tasksOption = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && options.tasks;
732936
733749
  const taskListId = tasksOption ? typeof tasksOption === "string" ? tasksOption : DEFAULT_TASKS_MODE_TASK_LIST_ID : undefined;
732937
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && taskListId) {
733750
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && taskListId) {
732938
733751
  process.env.CLAUDE_CODE_TASK_LIST_ID = taskListId;
732939
733752
  }
732940
733753
  const worktreeOption = isWorktreeModeEnabled() ? options.worktree : undefined;
@@ -733220,7 +734033,7 @@ ${formattedErrors}
733220
734033
  }
733221
734034
  const chromeOpts = options;
733222
734035
  setChromeFlagOverride(chromeOpts.chrome);
733223
- const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" || isClaudeAISubscriber());
734036
+ const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" || isClaudeAISubscriber());
733224
734037
  const autoEnableClaudeInChrome = !enableClaudeInChrome && shouldAutoEnableClaudeInChrome();
733225
734038
  if (enableClaudeInChrome) {
733226
734039
  const platform6 = getPlatform();
@@ -733393,7 +734206,7 @@ ${hint}` : hint;
733393
734206
  dangerousPermissions,
733394
734207
  overlyBroadBashPermissions
733395
734208
  } = initResult;
733396
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && overlyBroadBashPermissions.length > 0) {
734209
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && overlyBroadBashPermissions.length > 0) {
733397
734210
  for (const permission of overlyBroadBashPermissions) {
733398
734211
  logForDebugging(`Ignoring overly broad shell permission ${permission.ruleDisplay} from ${permission.sourceDisplay}`);
733399
734212
  }
@@ -733525,7 +734338,7 @@ ${hint}` : hint;
733525
734338
  cacheSessionTitle(sessionNameArg);
733526
734339
  }
733527
734340
  const explicitModel = options.model || process.env.ANTHROPIC_MODEL;
733528
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && explicitModel && explicitModel !== "default" && !hasGrowthBookEnvOverride("tengu_ant_model_override") && getGlobalConfig().cachedGrowthBookFeatures?.["tengu_ant_model_override"] == null) {
734341
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && explicitModel && explicitModel !== "default" && !hasGrowthBookEnvOverride("tengu_ant_model_override") && getGlobalConfig().cachedGrowthBookFeatures?.["tengu_ant_model_override"] == null) {
733529
734342
  await initializeGrowthBook();
733530
734343
  }
733531
734344
  const userSpecifiedModel = options.model === "default" ? getDefaultMainLoopModel() : options.model;
@@ -733646,7 +734459,7 @@ ${inputPrompt}` : mainThreadAgentDefinition.initialPrompt;
733646
734459
  }
733647
734460
  if (customAgent.memory) {
733648
734461
  logEvent("tengu_agent_memory_loaded", {
733649
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" && {
734462
+ ...{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" && {
733650
734463
  agent_type: customAgent.agentType
733651
734464
  },
733652
734465
  scope: customAgent.memory,
@@ -733702,7 +734515,7 @@ ${assistantAddendum}` : assistantAddendum;
733702
734515
  const ctx = getRenderContext(false);
733703
734516
  getFpsMetrics = ctx.getFpsMetrics;
733704
734517
  stats2 = ctx.stats;
733705
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
734518
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
733706
734519
  installAsciicastRecorder();
733707
734520
  }
733708
734521
  const {
@@ -733890,7 +734703,7 @@ ${inputPrompt}` : mergePrompt;
733890
734703
  }
733891
734704
  }
733892
734705
  logForDiagnosticsNoPII("info", "started", {
733893
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
734706
+ version: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
733894
734707
  is_native_binary: isInBundledMode()
733895
734708
  });
733896
734709
  registerCleanup(async () => {
@@ -734123,7 +734936,7 @@ ${inputPrompt}` : mergePrompt;
734123
734936
  if (!isBareMode()) {
734124
734937
  startDeferredPrefetches();
734125
734938
  Promise.resolve().then(() => (init_backgroundHousekeeping(), exports_backgroundHousekeeping)).then((m4) => m4.startBackgroundHousekeeping());
734126
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
734939
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
734127
734940
  Promise.resolve().then(() => exports_sdkHeapDumpMonitor).then((m4) => m4.startSdkMemoryMonitor());
734128
734941
  }
734129
734942
  }
@@ -734336,7 +735149,7 @@ ${inputPrompt}` : mergePrompt;
734336
735149
  logStartupTelemetry();
734337
735150
  logSessionTelemetry();
734338
735151
  });
734339
- const sessionUploaderPromise = { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? Promise.resolve().then(() => exports_sessionDataUploader) : null;
735152
+ const sessionUploaderPromise = { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? Promise.resolve().then(() => exports_sessionDataUploader) : null;
734340
735153
  const uploaderReady = sessionUploaderPromise ? sessionUploaderPromise.then((mod4) => mod4.createSessionTurnUploader()).catch(() => null) : null;
734341
735154
  const sessionConfig = {
734342
735155
  debug: debug5 || debugToStderr,
@@ -734480,7 +735293,7 @@ Session: ${directConnectConfig.sessionId}`, "info");
734480
735293
  sshSession = await createSSHSession2({
734481
735294
  host: _pendingSSH.host,
734482
735295
  cwd: _pendingSSH.cwd,
734483
- localVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION,
735296
+ localVersion: { USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION,
734484
735297
  permissionMode: _pendingSSH.permissionMode,
734485
735298
  dangerouslySkipPermissions: _pendingSSH.dangerouslySkipPermissions,
734486
735299
  extraCliArgs: _pendingSSH.extraCliArgs
@@ -734782,7 +735595,7 @@ Usage: margay --remote "your task description"`, () => gracefulShutdown(1));
734782
735595
  }
734783
735596
  }
734784
735597
  }
734785
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
735598
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
734786
735599
  if (options.resume && typeof options.resume === "string" && !maybeSessionId) {
734787
735600
  const {
734788
735601
  parseCcshareId: parseCcshareId2,
@@ -734985,13 +735798,13 @@ Usage: margay --remote "your task description"`, () => gracefulShutdown(1));
734985
735798
  pendingHookMessages
734986
735799
  }, renderAndRun);
734987
735800
  }
734988
- }).version(`${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} (CCL)`, "-v, --version", "Output the version number");
735801
+ }).version(`${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} (CCL)`, "-v, --version", "Output the version number");
734989
735802
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
734990
735803
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
734991
735804
  if (canUserConfigureAdvisor()) {
734992
735805
  program2.addOption(new Option("--advisor <model>", "Enable the server-side advisor tool with the specified model (alias or full ID).").hideHelp());
734993
735806
  }
734994
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
735807
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
734995
735808
  program2.addOption(new Option("--delegate-permissions", "[ANT-ONLY] Alias for --permission-mode auto.").implies({
734996
735809
  permissionMode: "auto"
734997
735810
  }));
@@ -735395,7 +736208,7 @@ Omit sessionId to discover and pick from available sessions.
735395
736208
  } = await Promise.resolve().then(() => (init_update(), exports_update));
735396
736209
  await update2();
735397
736210
  });
735398
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
736211
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
735399
736212
  program2.command("up").description('[ANT-ONLY] Initialize or upgrade the local dev environment using the "# claude up" section of the nearest CCL.md').action(async () => {
735400
736213
  const {
735401
736214
  up: up2
@@ -735403,7 +736216,7 @@ Omit sessionId to discover and pick from available sessions.
735403
736216
  await up2();
735404
736217
  });
735405
736218
  }
735406
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
736219
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
735407
736220
  program2.command("rollback [target]").description(`[ANT-ONLY] Roll back to a previous release
735408
736221
 
735409
736222
  Examples:
@@ -735422,7 +736235,7 @@ Examples:
735422
736235
  } = await Promise.resolve().then(() => (init_util(), exports_util));
735423
736236
  await installHandler2(target, options);
735424
736237
  });
735425
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
736238
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
735426
736239
  const validateLogId = (value) => {
735427
736240
  const maybeSessionId = validateUuid2(value);
735428
736241
  if (maybeSessionId)
@@ -735452,7 +736265,7 @@ Examples:
735452
736265
  } = await Promise.resolve().then(() => exports_ant);
735453
736266
  await exportHandler2(source, outputFile);
735454
736267
  });
735455
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant") {
736268
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant") {
735456
736269
  const taskCmd = program2.command("task").description("[ANT-ONLY] Manage task list tasks");
735457
736270
  taskCmd.command("create <subject>").description("Create a new task").option("-d, --description <text>", "Task description").option("-l, --list <id>", 'Task list ID (defaults to "tasklist")').action(async (subject, opts) => {
735458
736271
  const {
@@ -735562,7 +736375,7 @@ async function logTenguInit({
735562
736375
  assistantActivationPath
735563
736376
  },
735564
736377
  autoUpdatesChannel: getInitialSettings().autoUpdatesChannel ?? "latest",
735565
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE === "ant" ? (() => {
736378
+ ...{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE === "ant" ? (() => {
735566
736379
  const cwd5 = getCwd();
735567
736380
  const gitRoot = findGitRoot(cwd5);
735568
736381
  const rp = gitRoot ? relative39(gitRoot, cwd5) || "." : undefined;
@@ -735785,7 +736598,7 @@ var init_main2 = __esm(() => {
735785
736598
  kairosGate = feature("KAIROS") ? __toCommonJS(exports_gate) : null;
735786
736599
  autoModeStateModule7 = feature("TRANSCRIPT_CLASSIFIER") ? __toCommonJS(exports_autoModeState) : null;
735787
736600
  profileCheckpoint("main_tsx_imports_loaded");
735788
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.USER_TYPE !== "ant" && isBeingDebugged()) {
736601
+ if ({ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.USER_TYPE !== "ant" && isBeingDebugged()) {
735789
736602
  process.exit(1);
735790
736603
  }
735791
736604
  _pendingConnect = feature("DIRECT_CONNECT") ? {
@@ -735892,7 +736705,7 @@ if (feature("ABLATION_BASELINE") && process.env.CLAUDE_CODE_ABLATION_BASELINE) {
735892
736705
  async function main2() {
735893
736706
  const args = process.argv.slice(2);
735894
736707
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
735895
- console.log(`${{ USER_TYPE: "external", VERSION: "1.3.5-rc.8", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-02T05:11:29.580Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.8" }.VERSION} (Margay)`);
736708
+ console.log(`${{ USER_TYPE: "external", VERSION: "1.3.6-alpha.1", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-04T14:28:58.432Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-alpha.1" }.VERSION} (Margay)`);
735896
736709
  return;
735897
736710
  }
735898
736711
  const {