@margay/ccl-core 1.3.5-rc.7 → 1.3.5-rc.8

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 -0
  2. package/dist/cli.js +1249 -590
  3. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -116,7 +116,7 @@ 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.7",
119
+ version: "1.3.5-rc.8",
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",
@@ -35814,7 +35814,8 @@ var init_constants2 = __esm(() => {
35814
35814
  "code-reviewer",
35815
35815
  "test-runner",
35816
35816
  "Advisor",
35817
- "Critic"
35817
+ "Critic",
35818
+ "visual-ui-analysis"
35818
35819
  ]);
35819
35820
  });
35820
35821
 
@@ -162288,7 +162289,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
162288
162289
  if (isApiKeyHelperFromProjectOrLocalSettings()) {
162289
162290
  const hasTrust = checkHasTrustDialogAccepted();
162290
162291
  if (!hasTrust && !isNonInteractiveSession) {
162291
- 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.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.FEEDBACK_CHANNEL}.`);
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}.`);
162292
162293
  logAntError("apiKeyHelper invoked before trust check", error5);
162293
162294
  logEvent("tengu_apiKeyHelper_missing_trust11", {});
162294
162295
  return null;
@@ -162332,7 +162333,7 @@ async function runAwsAuthRefresh() {
162332
162333
  if (isAwsAuthRefreshFromProjectSettings()) {
162333
162334
  const hasTrust = checkHasTrustDialogAccepted();
162334
162335
  if (!hasTrust && !getIsNonInteractiveSession()) {
162335
- 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.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.FEEDBACK_CHANNEL}.`);
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}.`);
162336
162337
  logAntError("awsAuthRefresh invoked before trust check", error5);
162337
162338
  logEvent("tengu_awsAuthRefresh_missing_trust", {});
162338
162339
  return false;
@@ -162392,7 +162393,7 @@ async function getAwsCredsFromCredentialExport() {
162392
162393
  if (isAwsCredentialExportFromProjectSettings()) {
162393
162394
  const hasTrust = checkHasTrustDialogAccepted();
162394
162395
  if (!hasTrust && !getIsNonInteractiveSession()) {
162395
- 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.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.FEEDBACK_CHANNEL}.`);
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}.`);
162396
162397
  logAntError("awsCredentialExport invoked before trust check", error5);
162397
162398
  logEvent("tengu_awsCredentialExport_missing_trust", {});
162398
162399
  return null;
@@ -162477,7 +162478,7 @@ async function runGcpAuthRefresh() {
162477
162478
  if (isGcpAuthRefreshFromProjectSettings()) {
162478
162479
  const hasTrust = checkHasTrustDialogAccepted();
162479
162480
  if (!hasTrust && !getIsNonInteractiveSession()) {
162480
- 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.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.FEEDBACK_CHANNEL}.`);
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}.`);
162481
162482
  logAntError("gcpAuthRefresh invoked before trust check", error5);
162482
162483
  logEvent("tengu_gcpAuthRefresh_missing_trust", {});
162483
162484
  return false;
@@ -163187,7 +163188,7 @@ var init_auth2 = __esm(() => {
163187
163188
 
163188
163189
  // utils/userAgent.ts
163189
163190
  function getClaudeCodeUserAgent() {
163190
- return `claude-code/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION}`;
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}`;
163191
163192
  }
163192
163193
 
163193
163194
  // utils/workloadContext.ts
@@ -163209,7 +163210,7 @@ function getUserAgent() {
163209
163210
  const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
163210
163211
  const workload = getWorkload();
163211
163212
  const workloadSuffix = workload ? `, workload/${workload}` : "";
163212
- return `claude-cli/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
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})`;
163213
163214
  }
163214
163215
  function getMCPUserAgent() {
163215
163216
  const parts = [];
@@ -163223,7 +163224,7 @@ function getMCPUserAgent() {
163223
163224
  parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
163224
163225
  }
163225
163226
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
163226
- return `claude-code/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION}${suffix}`;
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}`;
163227
163228
  }
163228
163229
  function getWebFetchUserAgent() {
163229
163230
  return `Claude-User (${getClaudeCodeUserAgent()}; +https://support.anthropic.com/)`;
@@ -163361,7 +163362,7 @@ var init_user = __esm(() => {
163361
163362
  deviceId,
163362
163363
  sessionId: getSessionId(),
163363
163364
  email: getEmail(),
163364
- appVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
163365
163366
  platform: getHostPlatformForAnalytics(),
163366
163367
  organizationUuid,
163367
163368
  accountUuid,
@@ -171058,7 +171059,7 @@ var init_metadata = __esm(() => {
171058
171059
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
171059
171060
  WHITESPACE_REGEX = /\s+/;
171060
171061
  getVersionBase = memoize20(() => {
171061
- const match = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
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]+)?/);
171062
171063
  return match ? match[0] : undefined;
171063
171064
  });
171064
171065
  buildEnvContext = memoize20(async () => {
@@ -171098,9 +171099,9 @@ var init_metadata = __esm(() => {
171098
171099
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
171099
171100
  isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
171100
171101
  isClaudeAiAuth: isClaudeAISubscriber(),
171101
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
171102
171103
  versionBase: getVersionBase(),
171103
- buildTime: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.BUILD_TIME,
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,
171104
171105
  deploymentEnvironment: env4.detectDeploymentEnvironment(),
171105
171106
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
171106
171107
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -171767,7 +171768,7 @@ function initialize1PEventLogging() {
171767
171768
  const platform2 = getPlatform();
171768
171769
  const attributes = {
171769
171770
  [import_semantic_conventions.ATTR_SERVICE_NAME]: "claude-code",
171770
- [import_semantic_conventions.ATTR_SERVICE_VERSION]: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
171771
171772
  };
171772
171773
  if (platform2 === "wsl") {
171773
171774
  const wslVersion = getWslVersion();
@@ -171794,7 +171795,7 @@ function initialize1PEventLogging() {
171794
171795
  })
171795
171796
  ]
171796
171797
  });
171797
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION);
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);
171798
171799
  }
171799
171800
  async function reinitialize1PEventLoggingIfConfigChanged() {
171800
171801
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -200714,7 +200715,7 @@ function getAttributionHeader(fingerprint) {
200714
200715
  if (!isAttributionHeaderEnabled()) {
200715
200716
  return "";
200716
200717
  }
200717
- const version4 = `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION}.${fingerprint}`;
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}`;
200718
200719
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
200719
200720
  const cch = "";
200720
200721
  const workload = getWorkload();
@@ -232935,7 +232936,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
232935
232936
  }
232936
232937
  function getFeedbackGuideline() {
232937
232938
  if (isUsing3PServices()) {
232938
- 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.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.ISSUES_EXPLAINER}`;
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}`;
232939
232940
  }
232940
232941
  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";
232941
232942
  }
@@ -233728,43 +233729,67 @@ Use the literal string \`VERDICT: \` followed by exactly one of \`PASS\`, \`FAIL
233728
233729
  };
233729
233730
  });
233730
233731
 
233731
- // tools/AgentTool/built-in/visualUiAnalysisAgent.ts
233732
- var VISUAL_UI_ANALYSIS_PROMPT = `You are CCL's read-only visual and UI analysis specialist.
233733
-
233734
- Inspect every supplied image path with Read before drawing a visual conclusion.
233735
- You may use Grep and Glob only to locate source leads explicitly connected to
233736
- the observed UI. You cannot edit files, run shell commands, or spawn agents.
233737
-
233738
- Report:
233739
- 1. grounded observations visible in the image bytes;
233740
- 2. differences relevant to the stated reference or goal;
233741
- 3. inference kept separate from observation;
233742
- 4. uncertainty and any source-file leads worth checking next.
233732
+ // services/visual/visualSpecialist.ts
233733
+ function assertVisualImagePaths(agentType, imagePaths) {
233734
+ if (agentType !== "visual-ui-analysis") {
233735
+ if (imagePaths !== undefined) {
233736
+ throw new Error("image_paths is only supported by visual-ui-analysis");
233737
+ }
233738
+ return [];
233739
+ }
233740
+ if (!Array.isArray(imagePaths) || imagePaths.length === 0) {
233741
+ throw new Error("visual-ui-analysis requires a non-empty image_paths list");
233742
+ }
233743
+ if (imagePaths.length > 20 || imagePaths.some((path11) => typeof path11 !== "string" || !path11.trim())) {
233744
+ throw new Error("visual-ui-analysis image_paths must contain 1-20 non-empty paths");
233745
+ }
233746
+ return imagePaths.map((path11) => path11.trim());
233747
+ }
233748
+ async function runVisualSpecialist(input, deps) {
233749
+ const imagePaths = assertVisualImagePaths("visual-ui-analysis", input.imagePaths);
233750
+ const images = [];
233751
+ for (const path11 of imagePaths)
233752
+ images.push(await deps.loadImage(path11));
233753
+ const selection = await deps.resolve({
233754
+ role: "visual.experimental",
233755
+ mode: input.mode ?? "quality",
233756
+ requirements: { vision: true }
233757
+ });
233758
+ if (!selection) {
233759
+ throw new Error("Specialist capability unavailable: visual.experimental");
233760
+ }
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
+ });
233771
+ }
233772
+ var VISUAL_SPECIALIST_SYSTEM_PROMPT = `You are CCL's bounded visual analysis specialist.
233773
+
233774
+ Analyze only the supplied image bytes and the user's stated visual question.
233775
+ Report grounded observations first, then relevant differences, then clearly
233776
+ separated inferences and uncertainty. Do not claim to inspect source code, call
233777
+ tools, plan edits, or gather additional evidence. Return one concise conclusion.`;
233743
233778
 
233744
- If image bytes are missing, unreadable, or unsupported, state that limitation
233745
- and do not pretend to have seen the image.`, VISUAL_UI_ANALYSIS_AGENT;
233779
+ // tools/AgentTool/built-in/visualUiAnalysisAgent.ts
233780
+ var VISUAL_UI_ANALYSIS_AGENT;
233746
233781
  var init_visualUiAnalysisAgent = __esm(() => {
233747
- init_prompt2();
233748
- init_prompt3();
233749
- init_prompt();
233750
- init_constants2();
233751
233782
  VISUAL_UI_ANALYSIS_AGENT = {
233752
233783
  agentType: "visual-ui-analysis",
233753
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.",
233754
- tools: [FILE_READ_TOOL_NAME, GREP_TOOL_NAME, GLOB_TOOL_NAME],
233755
- disallowedTools: [
233756
- AGENT_TOOL_NAME,
233757
- FILE_EDIT_TOOL_NAME,
233758
- FILE_WRITE_TOOL_NAME,
233759
- NOTEBOOK_EDIT_TOOL_NAME,
233760
- BASH_TOOL_NAME
233761
- ],
233785
+ tools: [],
233786
+ disallowedTools: [],
233762
233787
  source: "built-in",
233763
233788
  baseDir: "built-in",
233764
233789
  model: "pool:visual",
233765
- maxTurns: 8,
233790
+ maxTurns: 1,
233766
233791
  omitClaudeMd: true,
233767
- getSystemPrompt: () => VISUAL_UI_ANALYSIS_PROMPT
233792
+ getSystemPrompt: () => VISUAL_SPECIALIST_SYSTEM_PROMPT
233768
233793
  };
233769
233794
  });
233770
233795
 
@@ -238969,7 +238994,7 @@ function getAssistantMessageFromError(error5, model, options) {
238969
238994
  if (process.env.USER_TYPE === "ant") {
238970
238995
  const baseMessage = `API Error: 400 ${error5.message}
238971
238996
 
238972
- Run /share and post the JSON file to ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.FEEDBACK_CHANNEL}.`;
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}.`;
238973
238998
  const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
238974
238999
  return createAssistantAPIErrorMessage({
238975
239000
  content: baseMessage + rewindInstruction,
@@ -239005,7 +239030,7 @@ Run /share and post the JSON file to ${{ USER_TYPE: "external", VERSION: "1.3.5-
239005
239030
  if (process.env.USER_TYPE === "ant" && !process.env.ANTHROPIC_MODEL && error5 instanceof Error && error5.message.toLowerCase().includes("invalid model name")) {
239006
239031
  const orgId = getOauthAccountInfo()?.organizationUuid;
239007
239032
  const baseMsg = `[ANT-ONLY] Your org isn't gated into the \`${model}\` model. Either run \`ccl\` with \`ANTHROPIC_MODEL=${getDefaultMainLoopModelSetting()}\``;
239008
- const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.FEEDBACK_CHANNEL} for help getting access.` : `${baseMsg} or reach out in ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.FEEDBACK_CHANNEL} for help getting access.`;
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.`;
239009
239034
  return createAssistantAPIErrorMessage({
239010
239035
  content: msg,
239011
239036
  error: "invalid_request"
@@ -330965,7 +330990,7 @@ function getTelemetryAttributes() {
330965
330990
  attributes["session.id"] = sessionId;
330966
330991
  }
330967
330992
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
330968
- attributes["app.version"] = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.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;
330969
330994
  }
330970
330995
  const oauthAccount = getOauthAccountInfo();
330971
330996
  if (oauthAccount) {
@@ -346984,11 +347009,58 @@ __export(exports_capabilityResolver, {
346984
347009
  function resetCapabilityResolverForTests() {
346985
347010
  resolverUnavailable = false;
346986
347011
  }
346987
- function validResolution(value, request) {
347012
+ function normalizeResolution(value, request) {
346988
347013
  if (typeof value !== "object" || value === null)
346989
- return false;
347014
+ return null;
346990
347015
  const v6 = value;
346991
- return v6.requested_role === request.role && v6.mode === request.mode && typeof v6.resolved_model === "string" && Array.isArray(v6.eligible_models) && v6.eligible_models.every((item) => typeof item === "string") && v6.eligible_models[0] === v6.resolved_model && typeof v6.catalog_version === "string" && v6.reason === "first_eligible_in_order";
347016
+ const validLegacy = v6.requested_role === request.role && v6.mode === request.mode && typeof v6.resolved_model === "string" && Array.isArray(v6.eligible_models) && v6.eligible_models.every((item) => typeof item === "string") && v6.eligible_models[0] === v6.resolved_model && typeof v6.catalog_version === "string" && v6.reason === "first_eligible_in_order";
347017
+ if (!validLegacy)
347018
+ return null;
347019
+ const eligibleModels = v6.eligible_models;
347020
+ const rawCandidates = v6.eligible_candidates;
347021
+ const candidates = rawCandidates === undefined ? eligibleModels.map((model) => ({
347022
+ model,
347023
+ client_protocol: "anthropic_messages"
347024
+ })) : normalizeCandidates(rawCandidates, eligibleModels);
347025
+ if (candidates.length !== eligibleModels.length)
347026
+ return null;
347027
+ const selected = candidates[0];
347028
+ if (v6.client_protocol !== undefined && v6.client_protocol !== selected.client_protocol)
347029
+ return null;
347030
+ if (v6.canonical_model !== undefined && (typeof v6.canonical_model !== "string" || v6.canonical_model !== selected.canonical_model))
347031
+ return null;
347032
+ return {
347033
+ requested_role: request.role,
347034
+ mode: request.mode,
347035
+ resolved_model: v6.resolved_model,
347036
+ eligible_models: eligibleModels,
347037
+ eligible_candidates: candidates,
347038
+ ...selected.canonical_model ? { canonical_model: selected.canonical_model } : {},
347039
+ client_protocol: selected.client_protocol,
347040
+ catalog_version: v6.catalog_version,
347041
+ reason: "first_eligible_in_order"
347042
+ };
347043
+ }
347044
+ function normalizeCandidates(raw, eligibleModels) {
347045
+ if (!Array.isArray(raw) || raw.length !== eligibleModels.length)
347046
+ return [];
347047
+ const candidates = [];
347048
+ for (let index = 0;index < raw.length; index++) {
347049
+ const value = raw[index];
347050
+ if (typeof value !== "object" || value === null)
347051
+ return [];
347052
+ const candidate = value;
347053
+ const protocol = candidate.client_protocol;
347054
+ if (candidate.model !== eligibleModels[index] || protocol !== "anthropic_messages" && protocol !== "openai_chat_completions" || candidate.canonical_model !== undefined && typeof candidate.canonical_model !== "string") {
347055
+ return [];
347056
+ }
347057
+ candidates.push({
347058
+ model: candidate.model,
347059
+ ...typeof candidate.canonical_model === "string" ? { canonical_model: candidate.canonical_model } : {},
347060
+ client_protocol: protocol
347061
+ });
347062
+ }
347063
+ return candidates;
346992
347064
  }
346993
347065
  function specialistResolutionRequest(agentType, mode, parentModel, requestedModel) {
346994
347066
  if (agentType === "Advisor" || agentType === "Critic") {
@@ -347043,7 +347115,7 @@ async function resolveCapabilityModel(request, deps = {}) {
347043
347115
  if (!response.ok)
347044
347116
  return null;
347045
347117
  const value = await response.json();
347046
- return validResolution(value, request) ? value : null;
347118
+ return normalizeResolution(value, request);
347047
347119
  } catch {
347048
347120
  return null;
347049
347121
  }
@@ -347764,7 +347836,7 @@ function computeFingerprint(messageText, version4) {
347764
347836
  }
347765
347837
  function computeFingerprintFromMessages(messages) {
347766
347838
  const firstMessageText = extractFirstMessageText(messages);
347767
- return computeFingerprint(firstMessageText, { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION);
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);
347768
347840
  }
347769
347841
  var FINGERPRINT_SALT = "59cf53e54c78";
347770
347842
  var init_fingerprint = () => {};
@@ -347813,7 +347885,7 @@ async function sideQuery(opts) {
347813
347885
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
347814
347886
  }
347815
347887
  const messageText = extractFirstUserMessageText(messages);
347816
- const fingerprint = computeFingerprint(messageText, { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION);
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);
347817
347889
  const attributionHeader = getAttributionHeader(fingerprint);
347818
347890
  const systemBlocks = [
347819
347891
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -395959,7 +396031,7 @@ async function initializeBetaTracing(resource) {
395959
396031
  });
395960
396032
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
395961
396033
  setLoggerProvider(loggerProvider);
395962
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION);
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);
395963
396035
  setEventLogger(eventLogger);
395964
396036
  process.on("beforeExit", async () => {
395965
396037
  await loggerProvider?.forceFlush();
@@ -395999,7 +396071,7 @@ async function initializeTelemetry() {
395999
396071
  const platform3 = getPlatform();
396000
396072
  const baseAttributes = {
396001
396073
  [import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
396002
- [import_semantic_conventions2.ATTR_SERVICE_VERSION]: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
396003
396075
  };
396004
396076
  if (platform3 === "wsl") {
396005
396077
  const wslVersion = getWslVersion();
@@ -396044,7 +396116,7 @@ async function initializeTelemetry() {
396044
396116
  } catch {}
396045
396117
  };
396046
396118
  registerCleanup(shutdownTelemetry2);
396047
- return meterProvider2.getMeter("com.anthropic.claude_code", { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION);
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);
396048
396120
  }
396049
396121
  const meterProvider = new import_sdk_metrics2.MeterProvider({
396050
396122
  resource,
@@ -396064,7 +396136,7 @@ async function initializeTelemetry() {
396064
396136
  });
396065
396137
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
396066
396138
  setLoggerProvider(loggerProvider);
396067
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION);
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);
396068
396140
  setEventLogger(eventLogger);
396069
396141
  logForDebugging("[3P telemetry] Event logger set successfully");
396070
396142
  process.on("beforeExit", async () => {
@@ -396126,7 +396198,7 @@ Current timeout: ${timeoutMs}ms
396126
396198
  }
396127
396199
  };
396128
396200
  registerCleanup(shutdownTelemetry);
396129
- return meterProvider.getMeter("com.anthropic.claude_code", { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION);
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);
396130
396202
  }
396131
396203
  async function flushTelemetry() {
396132
396204
  const meterProvider = getMeterProvider();
@@ -396717,7 +396789,7 @@ async function installOrUpdateClaudePackage(channel2, specificVersion) {
396717
396789
  return "install_failed";
396718
396790
  }
396719
396791
  const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
396720
- const result = await execFileNoThrowWithCwd("npm", ["install", `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL}@${versionSpec}`], { cwd: getLocalInstallDir(), maxBuffer: 1e6 });
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 });
396721
396793
  if (result.code !== 0) {
396722
396794
  const error5 = new Error(`Failed to install Claude CLI package: ${result.stderr}`);
396723
396795
  logError(error5);
@@ -396860,14 +396932,14 @@ import { access as access2, writeFile as writeFile12 } from "fs/promises";
396860
396932
  import { homedir as homedir18 } from "os";
396861
396933
  import { join as join61 } from "path";
396862
396934
  async function assertMinVersion() {
396863
- if (process.env.SKIP_VERSION_CHECK === "1" || { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION.startsWith("0.0.0-dev") || !process.env.ANTHROPIC_VERSION_CHECK) {
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) {
396864
396936
  return;
396865
396937
  }
396866
396938
  try {
396867
396939
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
396868
- if (versionConfig.minVersion && lt2({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION, versionConfig.minVersion)) {
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)) {
396869
396941
  console.error(`
396870
- It looks like your version of CCL (${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION}) needs an update.
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.
396871
396943
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
396872
396944
 
396873
396945
  To update, please run:
@@ -397027,7 +397099,7 @@ async function checkGlobalInstallPermissions() {
397027
397099
  }
397028
397100
  async function getLatestVersion(channel2) {
397029
397101
  const npmTag = channel2 === "stable" ? "stable" : "latest";
397030
- const result = await execFileNoThrowWithCwd("npm", ["view", `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
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() });
397031
397103
  if (result.code !== 0) {
397032
397104
  logForDebugging(`npm view failed with code ${result.code}`);
397033
397105
  if (result.stderr) {
@@ -397043,7 +397115,7 @@ async function getLatestVersion(channel2) {
397043
397115
  return result.stdout.trim();
397044
397116
  }
397045
397117
  async function getNpmDistTags() {
397046
- const result = await execFileNoThrowWithCwd("npm", ["view", { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL, "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
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() });
397047
397119
  if (result.code !== 0) {
397048
397120
  logForDebugging(`npm view dist-tags failed with code ${result.code}`);
397049
397121
  return { latest: null, stable: null };
@@ -397083,7 +397155,7 @@ async function installGlobalPackage(specificVersion) {
397083
397155
  logError(new AutoUpdaterError("Another process is currently installing an update"));
397084
397156
  logEvent("tengu_auto_updater_lock_contention", {
397085
397157
  pid: process.pid,
397086
- currentVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
397087
397159
  });
397088
397160
  return "in_progress";
397089
397161
  }
@@ -397092,7 +397164,7 @@ async function installGlobalPackage(specificVersion) {
397092
397164
  if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
397093
397165
  logError(new Error("Windows NPM detected in WSL environment"));
397094
397166
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
397095
- currentVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
397096
397168
  });
397097
397169
  console.error(`
397098
397170
  Error: Windows NPM detected in WSL
@@ -397111,7 +397183,7 @@ To fix this issue:
397111
397183
  if (!hasPermissions) {
397112
397184
  return "no_permissions";
397113
397185
  }
397114
- const packageSpec = specificVersion ? `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL}@${specificVersion}` : { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL;
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;
397115
397187
  const packageManager = env4.isRunningWithBun() ? "bun" : "npm";
397116
397188
  const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
397117
397189
  if (installResult.code !== 0) {
@@ -397440,8 +397512,8 @@ async function detectMultipleInstallations() {
397440
397512
  installations.push({ type: "npm-local", path: localPath });
397441
397513
  }
397442
397514
  const packagesToCheck = ["@anthropic-ai/claude-code"];
397443
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
397444
- packagesToCheck.push({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL);
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);
397445
397517
  }
397446
397518
  const npmResult = await execFileNoThrow("npm", [
397447
397519
  "-g",
@@ -397624,7 +397696,7 @@ function detectLinuxGlobPatternWarnings() {
397624
397696
  }
397625
397697
  async function getDoctorDiagnostic() {
397626
397698
  const installationType = await getCurrentInstallationType();
397627
- const version4 = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION ? { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION : "unknown";
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";
397628
397700
  const installationPath = await getInstallationPath();
397629
397701
  const invokedBinary = getInvokedBinary();
397630
397702
  const multipleInstallations = await detectMultipleInstallations();
@@ -397636,8 +397708,8 @@ async function getDoctorDiagnostic() {
397636
397708
  for (const install of npmInstalls) {
397637
397709
  if (install.type === "npm-global") {
397638
397710
  let uninstallCmd = "npm -g uninstall @anthropic-ai/claude-code";
397639
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
397640
- uninstallCmd += ` && npm -g uninstall ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL}`;
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}`;
397641
397713
  }
397642
397714
  warnings.push({
397643
397715
  issue: `Leftover npm global installation at ${install.path}`,
@@ -398963,7 +399035,7 @@ function getInstallationEnv() {
398963
399035
  return;
398964
399036
  }
398965
399037
  function getClaudeCodeVersion() {
398966
- return { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION;
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;
398967
399039
  }
398968
399040
  async function getInstalledVSCodeExtensionVersion(command) {
398969
399041
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -399520,7 +399592,7 @@ async function getLatestVersionFromArtifactory(tag = "latest") {
399520
399592
  const startTime2 = Date.now();
399521
399593
  const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
399522
399594
  "view",
399523
- `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.NATIVE_PACKAGE_URL}@${tag}`,
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}`,
399524
399596
  "version",
399525
399597
  "--prefer-online",
399526
399598
  "--registry",
@@ -399544,7 +399616,7 @@ async function getLatestVersionFromArtifactory(tag = "latest") {
399544
399616
  latency_ms: latencyMs,
399545
399617
  source_npm: true
399546
399618
  });
399547
- logForDebugging(`npm view ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.NATIVE_PACKAGE_URL}@${tag} version: ${stdout}`);
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}`);
399548
399620
  const latestVersion = stdout.trim();
399549
399621
  return latestVersion;
399550
399622
  }
@@ -399600,7 +399672,7 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
399600
399672
  const fs11 = getFsImplementation();
399601
399673
  await fs11.rm(stagingPath, { recursive: true, force: true });
399602
399674
  const platform4 = getPlatform2();
399603
- const platformPackageName = `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.NATIVE_PACKAGE_URL}-${platform4}`;
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}`;
399604
399676
  logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version4}`);
399605
399677
  const {
399606
399678
  stdout: integrityOutput,
@@ -399629,7 +399701,7 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
399629
399701
  name: "claude-native-installer",
399630
399702
  version: "0.0.1",
399631
399703
  dependencies: {
399632
- [{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.NATIVE_PACKAGE_URL]: version4
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
399633
399705
  }
399634
399706
  };
399635
399707
  const packageLock = {
@@ -399642,10 +399714,10 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
399642
399714
  name: "claude-native-installer",
399643
399715
  version: "0.0.1",
399644
399716
  dependencies: {
399645
- [{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.NATIVE_PACKAGE_URL]: version4
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
399646
399718
  }
399647
399719
  },
399648
- [`node_modules/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.NATIVE_PACKAGE_URL}`]: {
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}`]: {
399649
399721
  version: version4,
399650
399722
  optionalDependencies: {
399651
399723
  [platformPackageName]: version4
@@ -399667,7 +399739,7 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
399667
399739
  if (result.code !== 0) {
399668
399740
  throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
399669
399741
  }
399670
- logForDebugging(`Successfully downloaded and verified ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.NATIVE_PACKAGE_URL}@${version4}`);
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}`);
399671
399743
  }
399672
399744
  function getStallTimeoutMs() {
399673
399745
  return Number(process.env.CLAUDE_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
@@ -400330,8 +400402,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
400330
400402
  const maxVersion = await getMaxVersion();
400331
400403
  if (maxVersion && gt2(version4, maxVersion)) {
400332
400404
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version4} to ${maxVersion}`);
400333
- if (gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION, maxVersion)) {
400334
- logForDebugging(`Native installer: current version ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
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`);
400335
400407
  logEvent("tengu_native_update_skipped_max_version", {
400336
400408
  latency_ms: Date.now() - startTime2,
400337
400409
  max_version: maxVersion,
@@ -400342,7 +400414,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
400342
400414
  version4 = maxVersion;
400343
400415
  }
400344
400416
  }
400345
- if (!forceReinstall && version4 === { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION && await versionIsAvailable(version4) && await isPossibleClaudeBinary(executablePath)) {
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)) {
400346
400418
  logForDebugging(`Found ${version4} at ${executablePath}, skipping install`);
400347
400419
  logEvent("tengu_native_update_complete", {
400348
400420
  latency_ms: Date.now() - startTime2,
@@ -401084,8 +401156,8 @@ async function cleanupNpmInstallations() {
401084
401156
  } else if (codePackageResult.error) {
401085
401157
  errors.push(codePackageResult.error);
401086
401158
  }
401087
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
401088
- const macroPackageResult = await attemptNpmUninstall({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL);
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);
401089
401161
  if (macroPackageResult.success) {
401090
401162
  removed++;
401091
401163
  if (macroPackageResult.warning) {
@@ -401154,7 +401226,7 @@ var init_allErrors = __esm(() => {
401154
401226
 
401155
401227
  // utils/status.tsx
401156
401228
  function buildSandboxProperties() {
401157
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE !== "ant") {
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") {
401158
401230
  return [];
401159
401231
  }
401160
401232
  const isSandboxed = SandboxManager2.isSandboxingEnabled();
@@ -418469,7 +418541,7 @@ function SpinnerWithVerbInner({
418469
418541
  const messageColor = overrideColor ?? defaultColor;
418470
418542
  const shimmerColor = overrideShimmerColor ?? defaultShimmerColor;
418471
418543
  let ttftText = null;
418472
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && apiMetricsRef?.current && apiMetricsRef.current.length > 0) {
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) {
418473
418545
  ttftText = computeTtftText(apiMetricsRef.current);
418474
418546
  }
418475
418547
  if (leaderIsIdle && hasRunningTeammates && !foregroundedTeammate) {
@@ -429493,7 +429565,7 @@ function getSearchOrReadInfo(progressMessage, tools, toolUseByID) {
429493
429565
  return null;
429494
429566
  }
429495
429567
  function processProgressMessages(messages, tools, isAgentRunning) {
429496
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE !== "ant") {
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") {
429497
429569
  return messages.filter((m4) => hasProgressMessage(m4.data) && m4.data.message.type !== "user").map((m4) => ({
429498
429570
  type: "original",
429499
429571
  message: m4
@@ -429830,7 +429902,7 @@ function renderToolResultMessage(data, progressMessagesForMessage, {
429830
429902
  return /* @__PURE__ */ jsx_runtime109.jsxs(ThemedBox_default, {
429831
429903
  flexDirection: "column",
429832
429904
  children: [
429833
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime109.jsx(MessageResponse, {
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, {
429834
429906
  children: /* @__PURE__ */ jsx_runtime109.jsxs(ThemedText, {
429835
429907
  color: "warning",
429836
429908
  children: [
@@ -430080,7 +430152,7 @@ function renderToolUseRejectedMessage(_input, {
430080
430152
  const agentId = firstData && hasProgressMessage(firstData) ? firstData.agentId : undefined;
430081
430153
  return /* @__PURE__ */ jsx_runtime109.jsxs(jsx_runtime109.Fragment, {
430082
430154
  children: [
430083
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && agentId && /* @__PURE__ */ jsx_runtime109.jsx(MessageResponse, {
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, {
430084
430156
  children: /* @__PURE__ */ jsx_runtime109.jsxs(ThemedText, {
430085
430157
  color: "warning",
430086
430158
  children: [
@@ -430763,7 +430835,7 @@ async function executeForkedSlashCommand(command, args, context2, precedingInput
430763
430835
  }
430764
430836
  let resultText = extractResultText(agentMessages, "Command completed");
430765
430837
  logForDebugging(`Forked slash command /${command.name} completed with agent ${agentId}`);
430766
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
430767
430839
  resultText = `[ANT-ONLY] API calls: ${getDisplayPath(getDumpPromptsPath(agentId))}
430768
430840
  ${resultText}`;
430769
430841
  }
@@ -430906,7 +430978,7 @@ async function processSlashCommand(inputString, precedingInputBlocks, imageConte
430906
430978
  logEvent("tengu_input_command", {
430907
430979
  ...eventData2,
430908
430980
  invocation_trigger: "user-slash",
430909
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && {
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" && {
430910
430982
  skill_name: commandName,
430911
430983
  ...returnedCommand.type === "prompt" && {
430912
430984
  skill_source: returnedCommand.source
@@ -430967,7 +431039,7 @@ async function processSlashCommand(inputString, precedingInputBlocks, imageConte
430967
431039
  logEvent("tengu_input_command", {
430968
431040
  ...eventData,
430969
431041
  invocation_trigger: "user-slash",
430970
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && {
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" && {
430971
431043
  skill_name: commandName,
430972
431044
  ...returnedCommand.type === "prompt" && {
430973
431045
  skill_source: returnedCommand.source
@@ -476181,7 +476253,7 @@ function truncateCommand(command) {
476181
476253
  function renderToolResultMessage11(output, _progressMessagesForMessage, {
476182
476254
  verbose
476183
476255
  }) {
476184
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
476185
476257
  return null;
476186
476258
  }
476187
476259
  const rawCommand = output.command ?? "";
@@ -477884,7 +477956,7 @@ var init_TaskOutputTool = __esm(() => {
477884
477956
  return this.isReadOnly?.(_input) ?? false;
477885
477957
  },
477886
477958
  isEnabled() {
477887
- return { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE !== "ant";
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";
477888
477960
  },
477889
477961
  isReadOnly(_input) {
477890
477962
  return true;
@@ -479150,6 +479222,33 @@ var init_TungstenTool = __esm(() => {
479150
479222
  });
479151
479223
  });
479152
479224
 
479225
+ // services/tools/interactionCompletion.ts
479226
+ function validateToolInteractionCompletion(tool, input) {
479227
+ const validator = tool.validateInteractionCompletion;
479228
+ return validator?.(input) ?? { result: true };
479229
+ }
479230
+ function interactionIncompleteDecision(result) {
479231
+ return {
479232
+ behavior: "deny",
479233
+ message: result.message,
479234
+ decisionReason: {
479235
+ type: "other",
479236
+ reason: "interactionIncomplete"
479237
+ }
479238
+ };
479239
+ }
479240
+ var INTERACTION_INCOMPLETE_MESSAGE = "No user answer was received. Do not treat this as a user choice. Continue only with explicit reversible assumptions, or explain the precise blocker if safe progress is impossible.", InteractionIncompleteError;
479241
+ var init_interactionCompletion = __esm(() => {
479242
+ InteractionIncompleteError = class InteractionIncompleteError extends Error {
479243
+ outcome;
479244
+ constructor(message = INTERACTION_INCOMPLETE_MESSAGE, outcome = "interaction_unavailable") {
479245
+ super(message);
479246
+ this.name = "InteractionIncompleteError";
479247
+ this.outcome = outcome;
479248
+ }
479249
+ };
479250
+ });
479251
+
479153
479252
  // tools/AskUserQuestionTool/AskUserQuestionTool.tsx
479154
479253
  import { z as z53 } from "zod/v4";
479155
479254
  function AskUserQuestionResultMessage(t0) {
@@ -479170,7 +479269,7 @@ function AskUserQuestionResultMessage(t0) {
479170
479269
  ]
479171
479270
  }),
479172
479271
  /* @__PURE__ */ jsx_runtime137.jsx(ThemedText, {
479173
- children: "User answered Claude's questions:"
479272
+ children: "User answered the questions:"
479174
479273
  })
479175
479274
  ]
479176
479275
  });
@@ -479234,6 +479333,7 @@ var init_AskUserQuestionTool = __esm(() => {
479234
479333
  init_PermissionMode();
479235
479334
  init_ink2();
479236
479335
  init_Tool();
479336
+ init_interactionCompletion();
479237
479337
  init_prompt8();
479238
479338
  import_compiler_runtime116 = __toESM(require_compiler_runtime(), 1);
479239
479339
  jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
@@ -479329,6 +479429,29 @@ var init_AskUserQuestionTool = __esm(() => {
479329
479429
  requiresUserInteraction() {
479330
479430
  return true;
479331
479431
  },
479432
+ validateInteractionCompletion(input) {
479433
+ const questions = Array.isArray(input.questions) ? input.questions : [];
479434
+ const expectedKeys = questions.flatMap((question) => typeof question?.question === "string" && question.question.length > 0 ? [question.question] : []);
479435
+ const answers = input.answers;
479436
+ if (expectedKeys.length === 0 || expectedKeys.length !== questions.length || !answers || typeof answers !== "object" || Array.isArray(answers)) {
479437
+ return {
479438
+ result: false,
479439
+ outcome: "interaction_unavailable",
479440
+ message: INTERACTION_INCOMPLETE_MESSAGE
479441
+ };
479442
+ }
479443
+ const actualKeys = Object.keys(answers);
479444
+ if (actualKeys.length !== expectedKeys.length || expectedKeys.some((key) => !Object.prototype.hasOwnProperty.call(answers, key)) || actualKeys.some((key) => !expectedKeys.includes(key)) || expectedKeys.some((key) => typeof answers[key] !== "string" || answers[key].trim().length === 0)) {
479445
+ return {
479446
+ result: false,
479447
+ outcome: "interaction_unavailable",
479448
+ message: INTERACTION_INCOMPLETE_MESSAGE
479449
+ };
479450
+ }
479451
+ return {
479452
+ result: true
479453
+ };
479454
+ },
479332
479455
  async validateInput({
479333
479456
  questions
479334
479457
  }) {
@@ -479396,13 +479519,22 @@ var init_AskUserQuestionTool = __esm(() => {
479396
479519
  },
479397
479520
  async call({
479398
479521
  questions,
479399
- answers = {},
479522
+ answers,
479400
479523
  annotations
479401
479524
  }, _context) {
479525
+ const completion = AskUserQuestionTool.validateInteractionCompletion?.({
479526
+ questions,
479527
+ answers,
479528
+ annotations
479529
+ });
479530
+ if (completion && !completion.result) {
479531
+ throw new InteractionIncompleteError(completion.message, completion.outcome);
479532
+ }
479533
+ const completedAnswers = answers;
479402
479534
  return {
479403
479535
  data: {
479404
479536
  questions,
479405
- answers,
479537
+ answers: completedAnswers,
479406
479538
  ...annotations && {
479407
479539
  annotations
479408
479540
  }
@@ -494319,6 +494451,623 @@ var init_prompt21 = __esm(() => {
494319
494451
  init_forkSubagent();
494320
494452
  });
494321
494453
 
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
+ // services/api/boundedInferenceTransport.ts
494755
+ async function runBoundedInference(request) {
494756
+ const fetchFn = request.fetchFn ?? fetch;
494757
+ const path16 = request.clientProtocol === "anthropic_messages" ? "/messages" : "/chat/completions";
494758
+ const base = request.gateway.url.replace(/\/+$/, "");
494759
+ const url3 = base.endsWith("/v1") ? `${base}${path16}` : `${base}/v1${path16}`;
494760
+ const response = await fetchFn(url3, {
494761
+ method: "POST",
494762
+ headers: {
494763
+ "Content-Type": "application/json",
494764
+ Authorization: `Bearer ${request.gateway.key}`,
494765
+ ...request.minimumContextTokens !== undefined ? { "X-Margay-Min-Context-Tokens": String(request.minimumContextTokens) } : {}
494766
+ },
494767
+ body: JSON.stringify(request.clientProtocol === "anthropic_messages" ? anthropicBody(request) : openAIBody(request)),
494768
+ signal: request.signal
494769
+ });
494770
+ if (!response.ok) {
494771
+ const body = await response.text().catch(() => "(no body)");
494772
+ const contextError = parseGatewayContextCapabilityUnavailable(response.status, body);
494773
+ if (contextError)
494774
+ throw contextError;
494775
+ if (response.status >= 500) {
494776
+ throw new GatewayUpstreamUnavailableError(response.status);
494777
+ }
494778
+ throw new Error(`Bounded inference failed: HTTP ${response.status} — ${body.slice(0, 200)}`);
494779
+ }
494780
+ if (!response.body) {
494781
+ throw new BoundedInferenceProtocolError("incomplete_stream", "Bounded inference response has no stream body");
494782
+ }
494783
+ observeGatewayContextResponse(request.model, response.headers);
494784
+ const parsed = request.clientProtocol === "anthropic_messages" ? await parseAnthropicStream(response.body) : await parseOpenAIStream(response.body);
494785
+ if (!parsed.text) {
494786
+ throw new BoundedInferenceProtocolError("empty_response", "Bounded inference returned no text");
494787
+ }
494788
+ return {
494789
+ text: parsed.text,
494790
+ requestedModel: response.headers.get("x-margay-requested-model") ?? request.model,
494791
+ resolvedModel: response.headers.get("x-margay-resolved-model") ?? request.model,
494792
+ servedModel: response.headers.get("x-margay-served-model") ?? parsed.model ?? request.model,
494793
+ ...request.canonicalModel ? { canonicalModel: request.canonicalModel } : {},
494794
+ clientProtocol: request.clientProtocol,
494795
+ terminalComplete: true,
494796
+ stopReason: parsed.stopReason,
494797
+ usage: parsed.usage
494798
+ };
494799
+ }
494800
+ function anthropicBody(request) {
494801
+ const content = [
494802
+ ...(request.images ?? []).map((image) => ({
494803
+ type: "image",
494804
+ source: { type: "base64", media_type: image.mediaType, data: image.base64 }
494805
+ })),
494806
+ { type: "text", text: request.prompt }
494807
+ ];
494808
+ const messages = request.conversation ?? [{ role: "user", content }];
494809
+ return {
494810
+ model: request.model,
494811
+ system: [{ type: "text", text: request.systemPrompt }],
494812
+ messages,
494813
+ max_tokens: request.maxOutputTokens,
494814
+ stream: true
494815
+ };
494816
+ }
494817
+ function openAIBody(request) {
494818
+ const content = [
494819
+ ...(request.images ?? []).map((image) => ({
494820
+ type: "image_url",
494821
+ image_url: { url: `data:${image.mediaType};base64,${image.base64}` }
494822
+ })),
494823
+ { type: "text", text: request.prompt }
494824
+ ];
494825
+ const messages = request.conversation ? request.conversation.map((message) => ({
494826
+ role: message.role,
494827
+ content: openAITextContent(message.content)
494828
+ })) : [{ role: "user", content }];
494829
+ return {
494830
+ model: request.model,
494831
+ messages: [
494832
+ { role: "system", content: request.systemPrompt },
494833
+ ...messages
494834
+ ],
494835
+ max_tokens: request.maxOutputTokens,
494836
+ stream: true,
494837
+ stream_options: { include_usage: true }
494838
+ };
494839
+ }
494840
+ function openAITextContent(content) {
494841
+ if (typeof content === "string")
494842
+ return content;
494843
+ if (!Array.isArray(content))
494844
+ return JSON.stringify(content);
494845
+ return content.map((block) => {
494846
+ if (typeof block === "object" && block !== null) {
494847
+ const value = block;
494848
+ if (value.type === "text" && typeof value.text === "string")
494849
+ return value.text;
494850
+ }
494851
+ return JSON.stringify(block);
494852
+ }).join(`
494853
+ `);
494854
+ }
494855
+ async function parseAnthropicStream(body) {
494856
+ const state = {
494857
+ text: [],
494858
+ model: undefined,
494859
+ stopReason: "",
494860
+ terminal: false,
494861
+ toolCall: false,
494862
+ usage: emptyUsage()
494863
+ };
494864
+ await forEachSseData(body, (data) => {
494865
+ if (data === "[DONE]")
494866
+ return;
494867
+ const event = parseEvent(data);
494868
+ if (event.type === "message_start") {
494869
+ state.model = stringOrUndefined(event.message?.model);
494870
+ readAnthropicUsage(state.usage, event.message?.usage);
494871
+ } else if (event.type === "content_block_start") {
494872
+ if (event.content_block?.type === "tool_use")
494873
+ state.toolCall = true;
494874
+ if (event.content_block?.type === "text" && typeof event.content_block.text === "string") {
494875
+ state.text.push(event.content_block.text);
494876
+ }
494877
+ } else if (event.type === "content_block_delta") {
494878
+ if (event.delta?.type === "text_delta" && typeof event.delta.text === "string") {
494879
+ state.text.push(event.delta.text);
494880
+ }
494881
+ } else if (event.type === "message_delta") {
494882
+ state.stopReason = stringOrUndefined(event.delta?.stop_reason) ?? state.stopReason;
494883
+ readAnthropicUsage(state.usage, event.usage);
494884
+ } else if (event.type === "message_stop") {
494885
+ state.terminal = true;
494886
+ }
494887
+ });
494888
+ if (state.toolCall) {
494889
+ throw new BoundedInferenceProtocolError("tool_call_returned", "Bounded Anthropic response returned tool_use");
494890
+ }
494891
+ if (!state.terminal) {
494892
+ throw new BoundedInferenceProtocolError("incomplete_stream", "Bounded Anthropic stream ended before message_stop");
494893
+ }
494894
+ return {
494895
+ text: state.text.join(""),
494896
+ ...state.model ? { model: state.model } : {},
494897
+ stopReason: state.stopReason || "end_turn",
494898
+ usage: state.usage
494899
+ };
494900
+ }
494901
+ async function parseOpenAIStream(body) {
494902
+ const state = {
494903
+ text: [],
494904
+ model: undefined,
494905
+ stopReason: "",
494906
+ done: false,
494907
+ toolCall: false,
494908
+ usage: emptyUsage()
494909
+ };
494910
+ await forEachSseData(body, (data) => {
494911
+ if (data === "[DONE]") {
494912
+ state.done = true;
494913
+ return;
494914
+ }
494915
+ const event = parseEvent(data);
494916
+ state.model = stringOrUndefined(event.model) ?? state.model;
494917
+ if (event.usage && typeof event.usage === "object") {
494918
+ state.usage.inputTokens = numberOrZero(event.usage.prompt_tokens);
494919
+ state.usage.outputTokens = numberOrZero(event.usage.completion_tokens);
494920
+ state.usage.cacheReadInputTokens = numberOrZero(event.usage.prompt_tokens_details?.cached_tokens);
494921
+ }
494922
+ const choices = Array.isArray(event.choices) ? event.choices : [];
494923
+ for (const choice of choices) {
494924
+ if (Array.isArray(choice?.delta?.tool_calls) && choice.delta.tool_calls.length > 0) {
494925
+ state.toolCall = true;
494926
+ }
494927
+ if (typeof choice?.delta?.content === "string")
494928
+ state.text.push(choice.delta.content);
494929
+ if (typeof choice?.finish_reason === "string")
494930
+ state.stopReason = choice.finish_reason;
494931
+ }
494932
+ });
494933
+ if (state.toolCall) {
494934
+ throw new BoundedInferenceProtocolError("tool_call_returned", "Bounded OpenAI response returned tool_calls");
494935
+ }
494936
+ if (!state.done || !state.stopReason) {
494937
+ throw new BoundedInferenceProtocolError("incomplete_stream", "Bounded OpenAI stream ended before finish_reason and [DONE]");
494938
+ }
494939
+ return {
494940
+ text: state.text.join(""),
494941
+ ...state.model ? { model: state.model } : {},
494942
+ stopReason: state.stopReason,
494943
+ usage: state.usage
494944
+ };
494945
+ }
494946
+ async function forEachSseData(body, visit2) {
494947
+ const reader = body.getReader();
494948
+ const decoder = new TextDecoder;
494949
+ let buffer = "";
494950
+ try {
494951
+ while (true) {
494952
+ const { done, value } = await reader.read();
494953
+ if (done)
494954
+ break;
494955
+ buffer += decoder.decode(value, { stream: true });
494956
+ const frames = buffer.split(`
494957
+
494958
+ `);
494959
+ buffer = frames.pop() ?? "";
494960
+ for (const frame of frames) {
494961
+ for (const line of frame.split(`
494962
+ `)) {
494963
+ if (line.startsWith("data:"))
494964
+ visit2(line.slice(5).trim());
494965
+ }
494966
+ }
494967
+ }
494968
+ buffer += decoder.decode();
494969
+ if (buffer.trim()) {
494970
+ for (const line of buffer.split(`
494971
+ `)) {
494972
+ if (line.startsWith("data:"))
494973
+ visit2(line.slice(5).trim());
494974
+ }
494975
+ }
494976
+ } finally {
494977
+ reader.releaseLock();
494978
+ }
494979
+ }
494980
+ function parseEvent(data) {
494981
+ try {
494982
+ return JSON.parse(data);
494983
+ } catch {
494984
+ throw new BoundedInferenceProtocolError("malformed_event", "Bounded inference stream contained malformed JSON");
494985
+ }
494986
+ }
494987
+ function emptyUsage() {
494988
+ return {
494989
+ inputTokens: 0,
494990
+ outputTokens: 0,
494991
+ cacheReadInputTokens: 0,
494992
+ cacheCreationInputTokens: 0
494993
+ };
494994
+ }
494995
+ function readAnthropicUsage(usage, raw) {
494996
+ if (!raw || typeof raw !== "object")
494997
+ return;
494998
+ if (raw.input_tokens !== undefined)
494999
+ usage.inputTokens = numberOrZero(raw.input_tokens);
495000
+ if (raw.output_tokens !== undefined)
495001
+ usage.outputTokens = numberOrZero(raw.output_tokens);
495002
+ if (raw.cache_read_input_tokens !== undefined) {
495003
+ usage.cacheReadInputTokens = numberOrZero(raw.cache_read_input_tokens);
495004
+ }
495005
+ if (raw.cache_creation_input_tokens !== undefined) {
495006
+ usage.cacheCreationInputTokens = numberOrZero(raw.cache_creation_input_tokens);
495007
+ }
495008
+ }
495009
+ function numberOrZero(value) {
495010
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : 0;
495011
+ }
495012
+ function stringOrUndefined(value) {
495013
+ return typeof value === "string" && value.length > 0 ? value : undefined;
495014
+ }
495015
+ var BoundedInferenceProtocolError;
495016
+ var init_boundedInferenceTransport = __esm(() => {
495017
+ init_dynamicContextWindow();
495018
+ init_gatewayTransport();
495019
+ BoundedInferenceProtocolError = class BoundedInferenceProtocolError extends Error {
495020
+ code;
495021
+ constructor(code, message) {
495022
+ super(message);
495023
+ this.code = code;
495024
+ this.name = "BoundedInferenceProtocolError";
495025
+ }
495026
+ };
495027
+ });
495028
+
495029
+ // tools/AgentTool/runVisualSpecialist.ts
495030
+ async function runVisualSpecialistForAgentTool(input, context2, canUseTool, assistantMessage) {
495031
+ let imageIndex = 0;
495032
+ return runVisualSpecialist(input, {
495033
+ loadImage: async (path16) => {
495034
+ const fileInput = { file_path: path16 };
495035
+ const validation = await FileReadTool.validateInput(fileInput, context2);
495036
+ if (!validation.result)
495037
+ throw new Error(validation.message);
495038
+ const decision = await canUseTool(FileReadTool, fileInput, context2, assistantMessage, `visual_image_${imageIndex++}`);
495039
+ if (decision.behavior !== "allow") {
495040
+ throw new Error(`Read permission denied for visual image: ${path16}`);
495041
+ }
495042
+ const loaded = await FileReadTool.call(decision.updatedInput, context2, canUseTool, assistantMessage);
495043
+ if (loaded.data.type !== "image") {
495044
+ throw new Error(`visual-ui-analysis supports image files only: ${path16}`);
495045
+ }
495046
+ return {
495047
+ mediaType: loaded.data.file.type,
495048
+ base64: loaded.data.file.base64
495049
+ };
495050
+ },
495051
+ resolve: (request) => resolveCapabilityModel(request),
495052
+ infer: async (request) => {
495053
+ const gateway = getGatewayConfig();
495054
+ if (!gateway)
495055
+ throw new Error("Gateway is required for visual-ui-analysis");
495056
+ return runBoundedInference({ ...request, gateway });
495057
+ }
495058
+ });
495059
+ }
495060
+ function visualRoutingMode() {
495061
+ return getRoutingPriority();
495062
+ }
495063
+ var init_runVisualSpecialist = __esm(() => {
495064
+ init_providers();
495065
+ init_capabilityResolver();
495066
+ init_boundedInferenceTransport();
495067
+ init_intentClassifier();
495068
+ init_FileReadTool();
495069
+ });
495070
+
494322
495071
  // tools/AgentTool/AgentTool.tsx
494323
495072
  var exports_AgentTool = {};
494324
495073
  __export(exports_AgentTool, {
@@ -494389,6 +495138,7 @@ var init_AgentTool = __esm(() => {
494389
495138
  init_loadAgentsDir();
494390
495139
  init_prompt21();
494391
495140
  init_runAgent();
495141
+ init_runVisualSpecialist();
494392
495142
  init_UI();
494393
495143
  jsx_runtime149 = __toESM(require_jsx_runtime(), 1);
494394
495144
  proactiveModule2 = feature("PROACTIVE") || feature("KAIROS") ? __toCommonJS(exports_proactive) : null;
@@ -494397,6 +495147,7 @@ var init_AgentTool = __esm(() => {
494397
495147
  description: z76.string().describe("A short (3-5 word) description of the task"),
494398
495148
  prompt: z76.string().describe("The task for the agent to perform"),
494399
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."),
494400
495151
  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."),
494401
495152
  run_in_background: z76.boolean().optional().describe("Set to true to run this agent in the background. You will be notified when it completes.")
494402
495153
  }));
@@ -494407,7 +495158,7 @@ var init_AgentTool = __esm(() => {
494407
495158
  mode: permissionModeSchema().optional().describe('Permission mode for spawned teammate (e.g., "plan" to require plan approval).')
494408
495159
  });
494409
495160
  return baseInputSchema().merge(multiAgentInputSchema).extend({
494410
- isolation: ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? z76.enum(["worktree", "remote"]) : z76.enum(["worktree"])).optional().describe({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.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.'),
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.'),
494411
495162
  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".')
494412
495163
  });
494413
495164
  });
@@ -494473,6 +495224,7 @@ var init_AgentTool = __esm(() => {
494473
495224
  async call({
494474
495225
  prompt,
494475
495226
  subagent_type,
495227
+ image_paths,
494476
495228
  description,
494477
495229
  model: modelParam,
494478
495230
  allowedTools: preAuthorizedTools,
@@ -494488,6 +495240,7 @@ var init_AgentTool = __esm(() => {
494488
495240
  }, toolUseContext, canUseTool, assistantMessage, onProgress) {
494489
495241
  const startTime2 = Date.now();
494490
495242
  const model = isCoordinatorMode() ? undefined : modelParam;
495243
+ assertVisualImagePaths(subagent_type ?? "", image_paths);
494491
495244
  if (subagent_type && isExternalAgentKind(subagent_type)) {
494492
495245
  const result = await runExternalAgent({
494493
495246
  kind: subagent_type,
@@ -494521,6 +495274,37 @@ var init_AgentTool = __esm(() => {
494521
495274
  };
494522
495275
  return { data: completed };
494523
495276
  }
495277
+ if (subagent_type === "visual-ui-analysis") {
495278
+ if (run_in_background || name2 || team_name || isolation || cwd2) {
495279
+ throw new Error("visual-ui-analysis is a synchronous one-shot specialist and cannot be backgrounded, named, teamed, or isolated");
495280
+ }
495281
+ const result = await runVisualSpecialistForAgentTool({
495282
+ prompt,
495283
+ imagePaths: image_paths,
495284
+ mode: visualRoutingMode(),
495285
+ signal: toolUseContext.abortController.signal
495286
+ }, toolUseContext, canUseTool, assistantMessage);
495287
+ const completed = {
495288
+ status: "completed",
495289
+ prompt,
495290
+ agentId: createAgentId(),
495291
+ agentType: subagent_type,
495292
+ content: [{ type: "text", text: result.text }],
495293
+ totalToolUseCount: 0,
495294
+ totalDurationMs: Date.now() - startTime2,
495295
+ totalTokens: result.usage.inputTokens + result.usage.outputTokens,
495296
+ usage: {
495297
+ input_tokens: result.usage.inputTokens,
495298
+ output_tokens: result.usage.outputTokens,
495299
+ cache_creation_input_tokens: result.usage.cacheCreationInputTokens,
495300
+ cache_read_input_tokens: result.usage.cacheReadInputTokens,
495301
+ server_tool_use: null,
495302
+ service_tier: null,
495303
+ cache_creation: null
495304
+ }
495305
+ };
495306
+ return { data: completed };
495307
+ }
494524
495308
  const appState = toolUseContext.getAppState();
494525
495309
  const permissionMode = appState.toolPermissionContext.mode;
494526
495310
  const rootSetAppState = toolUseContext.setAppStateForTasks ?? toolUseContext.setAppState;
@@ -494639,7 +495423,7 @@ var init_AgentTool = __esm(() => {
494639
495423
  is_fork: isForkPath
494640
495424
  });
494641
495425
  const effectiveIsolation = isolation ?? selectedAgent.isolation;
494642
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && effectiveIsolation === "remote") {
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") {
494643
495427
  const eligibility = await checkRemoteAgentEligibility();
494644
495428
  if (!eligibility.eligible) {
494645
495429
  const reasons = eligibility.errors.map(formatPreconditionError).join(`
@@ -494714,7 +495498,7 @@ ${reasons}`);
494714
495498
  });
494715
495499
  if (selectedAgent.memory) {
494716
495500
  logEvent("tengu_agent_memory_loaded", {
494717
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && {
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" && {
494718
495502
  agent_type: selectedAgent.agentType
494719
495503
  },
494720
495504
  scope: selectedAgent.memory,
@@ -495275,7 +496059,7 @@ ${finalMessage}`;
495275
496059
  },
495276
496060
  async checkPermissions(input, context2) {
495277
496061
  const appState = context2.getAppState();
495278
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && appState.toolPermissionContext.mode === "auto") {
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") {
495279
496063
  return {
495280
496064
  behavior: "passthrough",
495281
496065
  message: "Agent tool requires permission to spawn sub-agents."
@@ -500529,7 +501313,7 @@ async function resolveHookPermissionDecision(hookPermissionResult, tool, input,
500529
501313
  const requireCanUseTool = toolUseContext.requireCanUseTool;
500530
501314
  if (hookPermissionResult?.behavior === "allow") {
500531
501315
  const hookInput = hookPermissionResult.updatedInput ?? input;
500532
- const interactionSatisfied = requiresInteraction && hookPermissionResult.updatedInput !== undefined;
501316
+ const interactionSatisfied = requiresInteraction && hookPermissionResult.updatedInput !== undefined && validateToolInteractionCompletion(tool, hookInput).result;
500533
501317
  if (requiresInteraction && !interactionSatisfied || requireCanUseTool) {
500534
501318
  logForDebugging(`Hook approved tool use for ${tool.name}, but canUseTool is required`);
500535
501319
  return {
@@ -500721,6 +501505,7 @@ var init_toolHooks = __esm(() => {
500721
501505
  init_log();
500722
501506
  init_permissions2();
500723
501507
  init_toolErrors();
501508
+ init_interactionCompletion();
500724
501509
  init_utils4();
500725
501510
  });
500726
501511
 
@@ -501275,6 +502060,29 @@ async function checkPermissionsAndCallTool(tool, toolUseID, input, toolUseContex
501275
502060
  if (permissionDecision.updatedInput !== undefined) {
501276
502061
  processedInput = permissionDecision.updatedInput;
501277
502062
  }
502063
+ const interactionCompletion = validateToolInteractionCompletion(tool, processedInput);
502064
+ if (!interactionCompletion.result) {
502065
+ logForDebugging(`${tool.name} interaction incomplete; tool execution skipped`);
502066
+ const decisionInfo2 = toolUseContext.toolDecisions?.get(toolUseID);
502067
+ endToolBlockedOnUserSpan("reject", decisionInfo2?.source || "unknown");
502068
+ endToolSpan();
502069
+ resultingMessages.push({
502070
+ message: createUserMessage({
502071
+ content: [
502072
+ {
502073
+ type: "tool_result",
502074
+ content: interactionCompletion.message,
502075
+ is_error: true,
502076
+ tool_use_id: toolUseID
502077
+ }
502078
+ ],
502079
+ toolUseResult: `Interaction incomplete: ${interactionCompletion.message}`,
502080
+ nonFatalToolError: true,
502081
+ sourceToolAssistantUUID: assistantMessage.uuid
502082
+ })
502083
+ });
502084
+ return resultingMessages;
502085
+ }
501278
502086
  const telemetryToolInput = extractToolInputForTelemetry(processedInput);
501279
502087
  let toolParameters = {};
501280
502088
  if (isToolDetailsLoggingEnabled()) {
@@ -501672,6 +502480,7 @@ var init_toolExecution = __esm(() => {
501672
502480
  init_toolSearch();
501673
502481
  init_client9();
501674
502482
  init_mcpStringUtils();
502483
+ init_interactionCompletion();
501675
502484
  init_utils4();
501676
502485
  init_toolHooks();
501677
502486
  });
@@ -504564,306 +505373,6 @@ var init_clientToolTurnBuffer = __esm(() => {
504564
505373
  };
504565
505374
  });
504566
505375
 
504567
- // services/api/gatewayTransport.ts
504568
- function getCclGatewayUA(model) {
504569
- return model ? `ccl/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} (${model})` : `ccl/${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION}`;
504570
- }
504571
- function parseGatewayContextCapabilityUnavailable(status, responseText) {
504572
- if (status !== 422)
504573
- return;
504574
- let parsed;
504575
- try {
504576
- parsed = JSON.parse(responseText);
504577
- } catch {
504578
- return;
504579
- }
504580
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
504581
- return;
504582
- }
504583
- const error5 = parsed.error;
504584
- if (typeof error5 !== "object" || error5 === null || Array.isArray(error5)) {
504585
- return;
504586
- }
504587
- const fields = error5;
504588
- if (fields.type !== "context_capability_unavailable" || !Number.isSafeInteger(fields.required_context_tokens) || fields.required_context_tokens <= 0) {
504589
- return;
504590
- }
504591
- return new GatewayContextCapabilityUnavailableError(fields.required_context_tokens);
504592
- }
504593
- function parseGatewayAlternateDeploymentUnavailable(status, responseText) {
504594
- if (status !== 409)
504595
- return;
504596
- let parsed;
504597
- try {
504598
- parsed = JSON.parse(responseText);
504599
- } catch {
504600
- return;
504601
- }
504602
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
504603
- return;
504604
- }
504605
- const error5 = parsed.error;
504606
- if (typeof error5 !== "object" || error5 === null || Array.isArray(error5)) {
504607
- return;
504608
- }
504609
- if (error5.type !== "alternate_deployment_unavailable") {
504610
- return;
504611
- }
504612
- return new GatewayAlternateDeploymentUnavailableError;
504613
- }
504614
- function normalizeGatewayAvoidDeployment(value) {
504615
- const trimmed = value?.trim();
504616
- if (!trimmed || trimmed.length > 128)
504617
- return;
504618
- for (const character of trimmed) {
504619
- const code = character.charCodeAt(0);
504620
- const allowed = code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || character === "-" || character === "_" || character === "." || character === ":";
504621
- if (!allowed)
504622
- return;
504623
- }
504624
- return trimmed;
504625
- }
504626
- async function createGatewayStream(options) {
504627
- const {
504628
- url: url3,
504629
- key,
504630
- body,
504631
- signal,
504632
- tags,
504633
- minimumContextTokens,
504634
- avoidDeployment
504635
- } = options;
504636
- const normalizedAvoidDeployment = normalizeGatewayAvoidDeployment(avoidDeployment);
504637
- let lastError;
504638
- for (let attempt = 0;attempt <= GATEWAY_MAX_RETRIES; attempt++) {
504639
- if (signal?.aborted)
504640
- throw new APIUserAbortError;
504641
- if (attempt > 0) {
504642
- await new Promise((r3) => setTimeout(r3, GATEWAY_RETRY_DELAYS[attempt - 1]));
504643
- }
504644
- try {
504645
- const response = await fetch(url3, {
504646
- method: "POST",
504647
- headers: {
504648
- "Content-Type": "application/json",
504649
- Authorization: `Bearer ${key}`,
504650
- "User-Agent": getCclGatewayUA(body.model),
504651
- ...tags ? { "x-litellm-tags": tags } : {},
504652
- ...Number.isSafeInteger(minimumContextTokens) && (minimumContextTokens ?? 0) > 0 ? {
504653
- "X-Margay-Min-Context-Tokens": String(minimumContextTokens)
504654
- } : {},
504655
- ...normalizedAvoidDeployment ? {
504656
- "X-Margay-Avoid-Deployment": normalizedAvoidDeployment
504657
- } : {}
504658
- },
504659
- body: JSON.stringify({ ...body, stream: true }),
504660
- signal
504661
- });
504662
- if (response.status === 429 || response.status >= 500) {
504663
- await response.body?.cancel().catch(() => {});
504664
- lastError = response.status >= 500 ? new GatewayUpstreamUnavailableError(response.status) : new Error(`Gateway ${response.status}`);
504665
- continue;
504666
- }
504667
- if (!response.ok) {
504668
- const errorText = await response.text().catch(() => "");
504669
- const alternateUnavailableError = parseGatewayAlternateDeploymentUnavailable(response.status, errorText);
504670
- if (alternateUnavailableError)
504671
- throw alternateUnavailableError;
504672
- const contextCapabilityError = parseGatewayContextCapabilityUnavailable(response.status, errorText);
504673
- if (contextCapabilityError)
504674
- throw contextCapabilityError;
504675
- throw new GatewayNonRetryableError(`Gateway ${response.status}: ${errorText}`);
504676
- }
504677
- return {
504678
- stream: new GatewayStream(response, signal),
504679
- response
504680
- };
504681
- } catch (e3) {
504682
- if (signal?.aborted)
504683
- throw new APIUserAbortError;
504684
- if (e3 instanceof GatewayNonRetryableError)
504685
- throw e3;
504686
- lastError = e3;
504687
- if (attempt === GATEWAY_MAX_RETRIES)
504688
- throw lastError;
504689
- }
504690
- }
504691
- throw lastError;
504692
- }
504693
- var GATEWAY_MAX_RETRIES = 2, GATEWAY_RETRY_DELAYS, GatewayNonRetryableError, GatewayContextCapabilityUnavailableError, GatewayAlternateDeploymentUnavailableError, GatewayUpstreamUnavailableError, GatewayStreamProtocolError, GatewayStream;
504694
- var init_gatewayTransport = __esm(() => {
504695
- init_sdk();
504696
- GATEWAY_RETRY_DELAYS = [1000, 3000];
504697
- GatewayNonRetryableError = class GatewayNonRetryableError extends Error {
504698
- constructor(message) {
504699
- super(message);
504700
- this.name = "GatewayNonRetryableError";
504701
- }
504702
- };
504703
- GatewayContextCapabilityUnavailableError = class GatewayContextCapabilityUnavailableError extends GatewayNonRetryableError {
504704
- code = "context_capability_unavailable";
504705
- requiredContextTokens;
504706
- constructor(requiredContextTokens) {
504707
- super("Gateway has no configured deployment with sufficient context capacity");
504708
- this.name = "GatewayContextCapabilityUnavailableError";
504709
- this.requiredContextTokens = requiredContextTokens;
504710
- }
504711
- };
504712
- GatewayAlternateDeploymentUnavailableError = class GatewayAlternateDeploymentUnavailableError extends GatewayNonRetryableError {
504713
- code = "alternate_deployment_unavailable";
504714
- constructor() {
504715
- super("Gateway has no alternate deployment for this model");
504716
- this.name = "GatewayAlternateDeploymentUnavailableError";
504717
- }
504718
- };
504719
- GatewayUpstreamUnavailableError = class GatewayUpstreamUnavailableError extends Error {
504720
- code = "gateway_upstream_unavailable";
504721
- status;
504722
- constructor(status) {
504723
- super(`Gateway upstream unavailable (HTTP ${status})`);
504724
- this.name = "GatewayUpstreamUnavailableError";
504725
- this.status = status;
504726
- }
504727
- };
504728
- GatewayStreamProtocolError = class GatewayStreamProtocolError extends Error {
504729
- code;
504730
- lastEventType;
504731
- partialUsage;
504732
- constructor(code, message, details = {}) {
504733
- super(message);
504734
- this.name = "GatewayStreamProtocolError";
504735
- this.code = code;
504736
- this.lastEventType = details.lastEventType;
504737
- this.partialUsage = details.partialUsage ?? {};
504738
- }
504739
- };
504740
- GatewayStream = class GatewayStream {
504741
- response;
504742
- controller;
504743
- constructor(response, abortSignal) {
504744
- this.response = response;
504745
- this.controller = new AbortController;
504746
- if (abortSignal) {
504747
- abortSignal.addEventListener("abort", () => this.controller.abort(), { once: true });
504748
- }
504749
- }
504750
- async* [Symbol.asyncIterator]() {
504751
- const reader = this.response.body.getReader();
504752
- const decoder = new TextDecoder;
504753
- let buffer = "";
504754
- let yieldedAny = false;
504755
- let rawSnippet = "";
504756
- let terminalComplete = false;
504757
- let lastEventType;
504758
- const partialUsage = {};
504759
- const protocolError = (code, message) => new GatewayStreamProtocolError(code, message, {
504760
- lastEventType,
504761
- partialUsage: { ...partialUsage }
504762
- });
504763
- const parseLine = (line) => {
504764
- const trimmed = line.replace(/\r$/, "");
504765
- if (!trimmed.startsWith("data:"))
504766
- return null;
504767
- const data = trimmed.slice(5).trim();
504768
- if (!data)
504769
- return null;
504770
- if (data === "[DONE]")
504771
- return "done";
504772
- let event;
504773
- try {
504774
- event = JSON.parse(data);
504775
- } catch {
504776
- return null;
504777
- }
504778
- const typed = event;
504779
- const type = typed.type;
504780
- if (type === "ping") {
504781
- yieldedAny = true;
504782
- return null;
504783
- }
504784
- yieldedAny = true;
504785
- if (type)
504786
- lastEventType = type;
504787
- const usage = type === "message_start" ? typed.message?.usage : typed.usage;
504788
- if (usage) {
504789
- for (const key of ["input_tokens", "output_tokens", "cache_read_input_tokens", "cache_creation_input_tokens"]) {
504790
- if (typeof usage[key] === "number")
504791
- partialUsage[key] = usage[key];
504792
- }
504793
- }
504794
- if (type === "error") {
504795
- const incomplete = typed.margay?.code === "incomplete_upstream_stream";
504796
- throw protocolError(incomplete ? "incomplete_stream" : "upstream_stream_error", incomplete ? "Gateway upstream stream ended before message_stop" : "Gateway emitted a stream error event");
504797
- }
504798
- if (type === "message_stop")
504799
- terminalComplete = true;
504800
- return event;
504801
- };
504802
- const onAbort = () => {
504803
- process.stderr.write(`[ccl-trace] {"target":"gateway-stream-abort","action":"cancel-pending-read"}
504804
- `);
504805
- reader.cancel().catch(() => {});
504806
- };
504807
- if (this.controller.signal.aborted)
504808
- onAbort();
504809
- else
504810
- this.controller.signal.addEventListener("abort", onAbort, { once: true });
504811
- try {
504812
- while (true) {
504813
- if (this.controller.signal.aborted) {
504814
- return;
504815
- }
504816
- const { done, value } = await reader.read();
504817
- if (done) {
504818
- if (this.controller.signal.aborted)
504819
- return;
504820
- break;
504821
- }
504822
- const chunk = decoder.decode(value, { stream: true });
504823
- if (rawSnippet.length < 500)
504824
- rawSnippet += chunk.slice(0, 500 - rawSnippet.length);
504825
- buffer += chunk;
504826
- const lines = buffer.split(`
504827
- `);
504828
- buffer = lines.pop() ?? "";
504829
- for (const line of lines) {
504830
- const parsed = parseLine(line);
504831
- if (parsed === "done") {
504832
- if (!terminalComplete)
504833
- throw protocolError("incomplete_stream", "Gateway stream sent [DONE] before message_stop");
504834
- return;
504835
- }
504836
- if (parsed)
504837
- yield parsed;
504838
- }
504839
- }
504840
- buffer += decoder.decode();
504841
- if (buffer.trim()) {
504842
- const parsed = parseLine(buffer);
504843
- if (parsed === "done") {
504844
- if (!terminalComplete)
504845
- throw protocolError("incomplete_stream", "Gateway stream sent [DONE] before message_stop");
504846
- } else if (parsed) {
504847
- yield parsed;
504848
- }
504849
- }
504850
- if (!yieldedAny) {
504851
- const ct2 = this.response.headers.get("content-type") ?? "unknown";
504852
- throw new Error(`Gateway stream returned no SSE events (status=${this.response.status}, content-type=${ct2}, body=${rawSnippet.slice(0, 200)})`);
504853
- }
504854
- if (!terminalComplete) {
504855
- throw protocolError("incomplete_stream", "Gateway stream ended before message_stop");
504856
- }
504857
- } finally {
504858
- this.controller.signal.removeEventListener("abort", onAbort);
504859
- try {
504860
- await reader.cancel();
504861
- } catch {}
504862
- }
504863
- }
504864
- };
504865
- });
504866
-
504867
505376
  // services/api/clientToolProtocolRecovery.ts
504868
505377
  function initialClientToolProtocolRecoveryState() {
504869
505378
  return {
@@ -506944,9 +507453,9 @@ function getAnthropicEnvMetadata() {
506944
507453
  };
506945
507454
  }
506946
507455
  function getBuildAgeMinutes() {
506947
- if (!{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.BUILD_TIME)
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)
506948
507457
  return;
506949
- const buildTime = new Date({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.BUILD_TIME).getTime();
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();
506950
507459
  if (isNaN(buildTime))
506951
507460
  return;
506952
507461
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -507686,6 +508195,9 @@ async function resolve3PCompactCredentials(compactApiKey, compactBaseUrl, isNonI
507686
508195
  return { apiKey: key, baseUrl };
507687
508196
  }
507688
508197
  async function stream3PCompactDirect(options) {
508198
+ if (options.clientProtocol === "openai_chat_completions") {
508199
+ return streamOpenAICompactDirect(options);
508200
+ }
507689
508201
  const { credentials, model, messages, systemPrompt, maxOutputTokens, signal } = options;
507690
508202
  const apiMessages = messages.map((m4) => ({
507691
508203
  role: m4.message?.role ?? (m4.type === "user" ? "user" : "assistant"),
@@ -507899,6 +508411,46 @@ async function stream3PCompactDirect(options) {
507899
508411
  };
507900
508412
  return assistantMessage;
507901
508413
  }
508414
+ async function streamOpenAICompactDirect(options) {
508415
+ const conversation = options.messages.map((message) => ({
508416
+ role: message.message?.role ?? (message.type === "user" ? "user" : "assistant"),
508417
+ content: message.message?.content
508418
+ }));
508419
+ const result = await runBoundedInference({
508420
+ gateway: {
508421
+ url: options.credentials.baseUrl,
508422
+ key: options.credentials.apiKey
508423
+ },
508424
+ model: options.model,
508425
+ clientProtocol: "openai_chat_completions",
508426
+ systemPrompt: options.systemPrompt,
508427
+ prompt: "",
508428
+ conversation,
508429
+ maxOutputTokens: options.maxOutputTokens,
508430
+ ...options.minimumContextTokens !== undefined ? { minimumContextTokens: options.minimumContextTokens } : {},
508431
+ signal: options.signal
508432
+ });
508433
+ options.setStreamMode?.("responding");
508434
+ options.setResponseLength?.(() => result.text.length);
508435
+ return {
508436
+ type: "assistant",
508437
+ message: {
508438
+ role: "assistant",
508439
+ model: result.servedModel,
508440
+ stop_reason: result.stopReason,
508441
+ content: [{ type: "text", text: result.text }],
508442
+ usage: {
508443
+ input_tokens: result.usage.inputTokens,
508444
+ output_tokens: result.usage.outputTokens,
508445
+ cache_read_input_tokens: result.usage.cacheReadInputTokens,
508446
+ cache_creation_input_tokens: result.usage.cacheCreationInputTokens
508447
+ }
508448
+ },
508449
+ uuid: randomUUID27(),
508450
+ timestamp: new Date().toISOString(),
508451
+ transportIntegrity: "complete"
508452
+ };
508453
+ }
507902
508454
  var init_thirdPartyCompactTransport = __esm(() => {
507903
508455
  init_auth2();
507904
508456
  init_auth2();
@@ -507907,10 +508459,11 @@ var init_thirdPartyCompactTransport = __esm(() => {
507907
508459
  init_proxy();
507908
508460
  init_dynamicContextWindow();
507909
508461
  init_gatewayTransport();
508462
+ init_boundedInferenceTransport();
507910
508463
  });
507911
508464
 
507912
508465
  // services/compact/compactorCandidates.ts
507913
- async function resolveGatewayCompactorCandidates({
508466
+ async function resolveGatewayCompactorRouteCandidates({
507914
508467
  minimumContextTokens,
507915
508468
  resolve: resolve30 = resolveCapabilityModel
507916
508469
  }) {
@@ -507920,10 +508473,17 @@ async function resolveGatewayCompactorCandidates({
507920
508473
  requirements: { min_context_tokens: minimumContextTokens }
507921
508474
  });
507922
508475
  if (!resolution)
507923
- return [...DEFAULT_GATEWAY_COMPACTOR_CANDIDATES];
507924
- const eligible2 = new Set(resolution.eligible_models);
507925
- const candidates = DEFAULT_GATEWAY_COMPACTOR_CANDIDATES.filter((model) => eligible2.has(model));
507926
- return candidates.length > 0 ? candidates : [...DEFAULT_GATEWAY_COMPACTOR_CANDIDATES];
508476
+ return DEFAULT_GATEWAY_COMPACTOR_ROUTES.map((candidate) => ({ ...candidate }));
508477
+ const eligible2 = new Map(resolution.eligible_candidates.map((candidate) => [candidate.model, candidate]));
508478
+ const candidates = DEFAULT_GATEWAY_COMPACTOR_CANDIDATES.flatMap((model) => {
508479
+ const candidate = eligible2.get(model);
508480
+ return candidate ? [{
508481
+ model,
508482
+ ...candidate.canonical_model ? { canonicalModel: candidate.canonical_model } : {},
508483
+ clientProtocol: candidate.client_protocol
508484
+ }] : [];
508485
+ });
508486
+ return candidates.length > 0 ? candidates : DEFAULT_GATEWAY_COMPACTOR_ROUTES.map((candidate) => ({ ...candidate }));
507927
508487
  }
507928
508488
  function candidateForCompactorAttempt(candidates, zeroBasedAttempt) {
507929
508489
  if (!Number.isSafeInteger(zeroBasedAttempt) || zeroBasedAttempt < 0) {
@@ -507944,16 +508504,24 @@ function compactorCandidateFallbackReason(error5) {
507944
508504
  if (error5 instanceof GatewayStreamProtocolError && error5.code === "incomplete_stream") {
507945
508505
  return "incomplete_stream";
507946
508506
  }
508507
+ if (error5 instanceof BoundedInferenceProtocolError && error5.code === "incomplete_stream") {
508508
+ return "incomplete_stream";
508509
+ }
507947
508510
  return;
507948
508511
  }
507949
- var DEFAULT_GATEWAY_COMPACTOR_CANDIDATES;
508512
+ var DEFAULT_GATEWAY_COMPACTOR_CANDIDATES, DEFAULT_GATEWAY_COMPACTOR_ROUTES;
507950
508513
  var init_compactorCandidates = __esm(() => {
507951
508514
  init_capabilityResolver();
507952
508515
  init_gatewayTransport();
508516
+ init_boundedInferenceTransport();
507953
508517
  DEFAULT_GATEWAY_COMPACTOR_CANDIDATES = [
507954
508518
  "deepseek-v4-flash",
507955
508519
  "deepseek-v4-pro"
507956
508520
  ];
508521
+ DEFAULT_GATEWAY_COMPACTOR_ROUTES = DEFAULT_GATEWAY_COMPACTOR_CANDIDATES.map((model) => ({
508522
+ model,
508523
+ clientProtocol: "anthropic_messages"
508524
+ }));
507957
508525
  });
507958
508526
 
507959
508527
  // services/internalLogging.ts
@@ -508017,11 +508585,21 @@ function getCompactProviderConfig() {
508017
508585
  const apiKey = process.env.CCL_COMPACT_API_KEY;
508018
508586
  const baseUrl = process.env.CCL_COMPACT_BASE_URL;
508019
508587
  const model = process.env.CCL_COMPACT_MODEL;
508020
- if (!apiKey && !baseUrl && !model) {
508588
+ const protocol = process.env.CCL_COMPACT_PROTOCOL;
508589
+ if (!apiKey && !baseUrl && !model && !protocol) {
508021
508590
  return null;
508022
508591
  }
508592
+ if (protocol !== undefined && protocol !== "anthropic_messages" && protocol !== "openai_chat_completions") {
508593
+ throw new Error("CCL_COMPACT_PROTOCOL must be anthropic_messages or openai_chat_completions");
508594
+ }
508023
508595
  const isFirstParty = isAnthropicFirstPartyHost(baseUrl ?? process.env.ANTHROPIC_BASE_URL);
508024
- return { apiKey, baseUrl, model, isFirstParty };
508596
+ return {
508597
+ apiKey,
508598
+ baseUrl,
508599
+ model,
508600
+ clientProtocol: protocol ?? "anthropic_messages",
508601
+ isFirstParty
508602
+ };
508025
508603
  }
508026
508604
  var init_compactProvider = __esm(() => {
508027
508605
  init_providers();
@@ -509143,10 +509721,10 @@ async function streamCompactSummary({
509143
509721
  const { getGatewayConfig: getGatewayConfig2 } = await Promise.resolve().then(() => (init_providers(), exports_providers));
509144
509722
  const gateway = getGatewayConfig2();
509145
509723
  if (gateway) {
509146
- gatewayCompactorCandidates = await resolveGatewayCompactorCandidates({
509724
+ gatewayCompactorCandidates = await resolveGatewayCompactorRouteCandidates({
509147
509725
  minimumContextTokens: preCompactTokenCount
509148
509726
  });
509149
- compactModel = gatewayCompactorCandidates[0] ?? "deepseek-v4-flash";
509727
+ compactModel = gatewayCompactorCandidates[0]?.model ?? "deepseek-v4-flash";
509150
509728
  compactBaseUrl = gateway.url;
509151
509729
  compactApiKey = gateway.key;
509152
509730
  compactIsFirstParty = false;
@@ -509224,7 +509802,8 @@ async function streamCompactSummary({
509224
509802
  const retryEnabled = getFeatureValue_CACHED_MAY_BE_STALE("tengu_compact_streaming_retry", false);
509225
509803
  const maxAttempts = gatewayCompactorCandidates?.length ?? Math.max(retryEnabled ? MAX_COMPACT_STREAMING_RETRIES : 1, 2);
509226
509804
  for (let attempt = 1;attempt <= maxAttempts; attempt++) {
509227
- const activeCompactModel = gatewayCompactorCandidates ? candidateForCompactorAttempt(gatewayCompactorCandidates, attempt - 1) : compactModel;
509805
+ const activeCompactCandidate = gatewayCompactorCandidates ? candidateForCompactorAttempt(gatewayCompactorCandidates, attempt - 1) : undefined;
509806
+ const activeCompactModel = activeCompactCandidate?.model ?? compactModel;
509228
509807
  if (!activeCompactModel)
509229
509808
  break;
509230
509809
  let hasStartedStreaming = false;
@@ -509256,6 +509835,7 @@ async function streamCompactSummary({
509256
509835
  compactResponse = await stream3PCompactDirect({
509257
509836
  credentials: creds,
509258
509837
  model: activeCompactModel,
509838
+ clientProtocol: activeCompactCandidate?.clientProtocol ?? compactProvider?.clientProtocol ?? "anthropic_messages",
509259
509839
  messages: normalizedMessages,
509260
509840
  systemPrompt: compactSystemPrompt,
509261
509841
  maxOutputTokens: Math.min(COMPACT_MAX_OUTPUT_TOKENS, getMaxOutputTokensForModel(activeCompactModel)),
@@ -529753,7 +530333,7 @@ async function getMcpHeadersFromHelper(serverName, config) {
529753
530333
  if ("scope" in config && isMcpServerFromProjectOrLocalSettings(config) && !getIsNonInteractiveSession()) {
529754
530334
  const hasTrust = checkHasTrustDialogAccepted();
529755
530335
  if (!hasTrust) {
529756
- 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.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.FEEDBACK_CHANNEL}.`);
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}.`);
529757
530337
  logAntError("MCP headersHelper invoked before trust check", error5);
529758
530338
  logEvent("tengu_mcp_headersHelper_missing_trust", {});
529759
530339
  return null;
@@ -531284,7 +531864,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
531284
531864
  const client4 = new Client({
531285
531865
  name: "claude-code",
531286
531866
  title: "CCL",
531287
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION ?? "unknown",
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",
531288
531868
  description: "Anthropic's agentic coding tool",
531289
531869
  websiteUrl: PRODUCT_URL
531290
531870
  }, {
@@ -531635,7 +532215,7 @@ var init_client9 = __esm(() => {
531635
532215
  const client4 = new Client({
531636
532216
  name: "claude-code",
531637
532217
  title: "CCL",
531638
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION ?? "unknown",
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",
531639
532219
  description: "Anthropic's agentic coding tool",
531640
532220
  websiteUrl: PRODUCT_URL
531641
532221
  }, {
@@ -536728,7 +537308,7 @@ async function hasPermissionsToUseToolInner(tool, input, context2) {
536728
537308
  if (toolPermissionResult?.behavior === "deny") {
536729
537309
  return toolPermissionResult;
536730
537310
  }
536731
- if (!shouldBypassPermissions && tool.requiresUserInteraction?.() && toolPermissionResult?.behavior === "ask") {
537311
+ if (tool.validateInteractionCompletion !== undefined && toolPermissionResult?.behavior === "ask") {
536732
537312
  return toolPermissionResult;
536733
537313
  }
536734
537314
  if (!shouldBypassPermissions && toolPermissionResult?.behavior === "ask" && toolPermissionResult.decisionReason?.type === "rule" && toolPermissionResult.decisionReason.rule.ruleBehavior === "ask") {
@@ -538813,7 +539393,7 @@ async function setupTerminal(theme) {
538813
539393
  return current;
538814
539394
  });
538815
539395
  maybeMarkProjectOnboardingComplete();
538816
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
538817
539397
  result += await setupShellCompletion(theme);
538818
539398
  }
538819
539399
  return result;
@@ -543303,7 +543883,7 @@ function Feedback({
543303
543883
  platform: env4.platform,
543304
543884
  gitRepo: envInfo.isGit,
543305
543885
  terminal: env4.terminal,
543306
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
543307
543887
  transcript: normalizeMessagesForAPI(messages),
543308
543888
  errors: sanitizedErrors,
543309
543889
  lastApiRequest: getLastAPIRequest(),
@@ -543495,7 +544075,7 @@ function Feedback({
543495
544075
  ", ",
543496
544076
  env4.terminal,
543497
544077
  ", v",
543498
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
543499
544079
  ]
543500
544080
  })
543501
544081
  ]
@@ -543601,7 +544181,7 @@ ${sanitizedDescription}
543601
544181
  ` + `**Environment Info**
543602
544182
  ` + `- Platform: ${env4.platform}
543603
544183
  ` + `- Terminal: ${env4.terminal}
543604
- ` + `- Version: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION || "unknown"}
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"}
543605
544185
  ` + `- Feedback ID: ${feedbackId}
543606
544186
  ` + `
543607
544187
  **Errors**
@@ -543793,7 +544373,7 @@ var init_Feedback = __esm(() => {
543793
544373
  init_TextInput();
543794
544374
  import_react95 = __toESM(require_react(), 1);
543795
544375
  jsx_runtime168 = __toESM(require_jsx_runtime(), 1);
543796
- GITHUB_ISSUES_REPO_URL = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? "https://github.com/anthropics/claude-cli-internal/issues" : "https://github.com/anthropics/claude-code/issues";
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";
543797
544377
  });
543798
544378
 
543799
544379
  // commands/feedback/feedback.tsx
@@ -546796,7 +547376,7 @@ function buildPrimarySection() {
546796
547376
  });
546797
547377
  return [{
546798
547378
  label: "Version",
546799
- value: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.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
546800
547380
  }, {
546801
547381
  label: "Session name",
546802
547382
  value: nameValue
@@ -549436,7 +550016,7 @@ function Config({
549436
550016
  });
549437
550017
  }
549438
550018
  }] : [],
549439
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? [{
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" ? [{
549440
550020
  id: "speculationEnabled",
549441
550021
  label: "Speculative execution",
549442
550022
  value: globalConfig.speculationEnabled ?? true,
@@ -550717,7 +551297,7 @@ function Config({
550717
551297
  }
550718
551298
  })
550719
551299
  }) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime183.jsx(ChannelDowngradeDialog, {
550720
- currentVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
550721
551301
  onChoice: (choice) => {
550722
551302
  setShowSubmenu(null);
550723
551303
  setTabsHidden(false);
@@ -550729,7 +551309,7 @@ function Config({
550729
551309
  autoUpdatesChannel: "stable"
550730
551310
  };
550731
551311
  if (choice === "stay") {
550732
- newSettings.minimumVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION;
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;
550733
551313
  }
550734
551314
  updateSettingsForSource("userSettings", newSettings);
550735
551315
  setSettingsData((prev_27) => ({
@@ -558803,7 +559383,7 @@ function HelpV2(t0) {
558803
559383
  let t6;
558804
559384
  if ($3[31] !== tabs) {
558805
559385
  t6 = /* @__PURE__ */ jsx_runtime210.jsx(Tabs, {
558806
- title: `CCL v${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION}`,
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}`,
558807
559387
  color: "professionalBlue",
558808
559388
  defaultTab: "general",
558809
559389
  children: tabs
@@ -578474,7 +579054,7 @@ async function call28(onDone, _context, args) {
578474
579054
  });
578475
579055
  }
578476
579056
  }
578477
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
578478
579058
  return /* @__PURE__ */ jsx_runtime249.jsx(PluginSettings, {
578479
579059
  onComplete: onDone,
578480
579060
  args: ["manage"],
@@ -583321,9 +583901,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
583321
583901
  return [];
583322
583902
  }
583323
583903
  }
583324
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION) {
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) {
583325
583905
  if (process.env.USER_TYPE === "ant") {
583326
- const changelog = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION_CHANGELOG;
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;
583327
583907
  if (changelog) {
583328
583908
  const commits = changelog.trim().split(`
583329
583909
  `).filter(Boolean);
@@ -583348,9 +583928,9 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = { USER_TYP
583348
583928
  releaseNotes
583349
583929
  };
583350
583930
  }
583351
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION) {
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) {
583352
583932
  if (process.env.USER_TYPE === "ant") {
583353
- const changelog = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION_CHANGELOG;
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;
583354
583934
  if (changelog) {
583355
583935
  const commits = changelog.trim().split(`
583356
583936
  `).filter(Boolean);
@@ -584532,7 +585112,7 @@ function getRecentActivitySync() {
584532
585112
  return cachedActivity;
584533
585113
  }
584534
585114
  function getLogoDisplayData() {
584535
- const version4 = process.env.DEMO_VERSION ?? { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION;
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;
584536
585116
  const serverUrl = getDirectConnectServerUrl();
584537
585117
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
584538
585118
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -584564,7 +585144,7 @@ function formatModelAndBilling(modelName, billingType, availableWidth) {
584564
585144
  }
584565
585145
  function getRecentReleaseNotesSync(maxItems) {
584566
585146
  if (process.env.USER_TYPE === "ant") {
584567
- const changelog2 = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION_CHANGELOG;
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;
584568
585148
  if (changelog2) {
584569
585149
  const commits = changelog2.trim().split(`
584570
585150
  `).filter(Boolean);
@@ -585310,7 +585890,7 @@ function createRecentActivityFeed(activities) {
585310
585890
  }
585311
585891
  function createWhatsNewFeed(releaseNotes2) {
585312
585892
  const lines = releaseNotes2.map((note) => {
585313
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
585314
585894
  const match = note.match(/^(\d+\s+\w+\s+ago)\s+(.+)$/);
585315
585895
  if (match) {
585316
585896
  return {
@@ -585323,9 +585903,9 @@ function createWhatsNewFeed(releaseNotes2) {
585323
585903
  text: note
585324
585904
  };
585325
585905
  });
585326
- const emptyMessage = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? "Unable to fetch latest claude-cli-internal commits" : "Check the CCL changelog for updates";
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";
585327
585907
  return {
585328
- title: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? "What's new [ANT-ONLY: Latest CC commits]" : "What's new",
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",
585329
585909
  lines,
585330
585910
  footer: lines.length > 0 ? "/release-notes for more" : undefined,
585331
585911
  emptyMessage
@@ -586120,7 +586700,7 @@ function LogoV2() {
586120
586700
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
586121
586701
  t22 = () => {
586122
586702
  const currentConfig = getGlobalConfig();
586123
- if (currentConfig.lastReleaseNotesSeen === { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION) {
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) {
586124
586704
  return;
586125
586705
  }
586126
586706
  saveGlobalConfig(_temp329);
@@ -586796,12 +587376,12 @@ function LogoV2() {
586796
587376
  return t41;
586797
587377
  }
586798
587378
  function _temp329(current) {
586799
- if (current.lastReleaseNotesSeen === { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION) {
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) {
586800
587380
  return current;
586801
587381
  }
586802
587382
  return {
586803
587383
  ...current,
586804
- lastReleaseNotesSeen: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
586805
587385
  };
586806
587386
  }
586807
587387
  function _temp246(s_0) {
@@ -594702,13 +595282,13 @@ var init_ultraplan = __esm(() => {
594702
595282
  ULTRAPLAN_TIMEOUT_MS = 30 * 60 * 1000;
594703
595283
  _rawPrompt = require_prompt();
594704
595284
  DEFAULT_INSTRUCTIONS = (typeof _rawPrompt === "string" ? _rawPrompt : _rawPrompt.default).trimEnd();
594705
- ULTRAPLAN_INSTRUCTIONS = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && process.env.ULTRAPLAN_PROMPT_FILE ? readFileSync19(process.env.ULTRAPLAN_PROMPT_FILE, "utf8").trimEnd() : DEFAULT_INSTRUCTIONS;
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;
594706
595286
  ultraplan_default = {
594707
595287
  type: "local-jsx",
594708
595288
  name: "ultraplan",
594709
595289
  description: `~10–30 min · CCL on the web drafts an advanced plan you can edit and approve. See ${CCR_TERMS_URL2}`,
594710
595290
  argumentHint: "<prompt>",
594711
- isEnabled: () => ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }).USER_TYPE === "ant",
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",
594712
595292
  load: () => Promise.resolve({
594713
595293
  call: call37
594714
595294
  })
@@ -594819,7 +595399,7 @@ function shouldHideTasksFooter(tasks, showSpinnerTree) {
594819
595399
  return false;
594820
595400
  let hasVisibleTask = false;
594821
595401
  for (const t3 of Object.values(tasks)) {
594822
- if (!isBackgroundTask(t3) || { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && isPanelAgentTask(t3)) {
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)) {
594823
595403
  continue;
594824
595404
  }
594825
595405
  hasVisibleTask = true;
@@ -600905,8 +601485,8 @@ async function getEnvLessBridgeConfig() {
600905
601485
  }
600906
601486
  async function checkEnvLessBridgeMinVersion() {
600907
601487
  const cfg = await getEnvLessBridgeConfig();
600908
- if (cfg.min_version && lt2({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION, cfg.min_version)) {
600909
- return `Your version of CCL (${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION}) is too old for Remote Control.
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.
600910
601490
  Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
600911
601491
  }
600912
601492
  return null;
@@ -603281,10 +603861,10 @@ import { execa as execa14 } from "execa";
603281
603861
  import { readFile as readFile51 } from "fs/promises";
603282
603862
  import { join as join139 } from "path";
603283
603863
  function getMarketplaceName() {
603284
- return { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_NAME : OFFICIAL_MARKETPLACE_NAME;
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;
603285
603865
  }
603286
603866
  function getMarketplaceRepo() {
603287
- return { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_REPO : OFFICIAL_MARKETPLACE_REPO;
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;
603288
603868
  }
603289
603869
  function getPluginId() {
603290
603870
  return `thinkback@${getMarketplaceName()}`;
@@ -611037,7 +611617,7 @@ function getToolBuckets() {
611037
611617
  },
611038
611618
  EXECUTION: {
611039
611619
  name: "Execution tools",
611040
- toolNames: new Set([BashTool.name, { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? TungstenTool.name : undefined].filter((n2) => n2 !== undefined))
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))
611041
611621
  },
611042
611622
  MCP: {
611043
611623
  name: "MCP tools",
@@ -616687,7 +617267,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
616687
617267
  smapsRollup,
616688
617268
  platform: process.platform,
616689
617269
  nodeVersion: process.version,
616690
- ccVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.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
616691
617271
  };
616692
617272
  }
616693
617273
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -617274,7 +617854,7 @@ var init_bridge_kick = __esm(() => {
617274
617854
  var call61 = async () => {
617275
617855
  return {
617276
617856
  type: "text",
617277
- value: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.BUILD_TIME ? `${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} (built ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.BUILD_TIME})` : { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
617278
617858
  };
617279
617859
  }, version4, version_default;
617280
617860
  var init_version = __esm(() => {
@@ -624338,7 +624918,7 @@ function OverviewTab({
624338
624918
  })
624339
624919
  ]
624340
624920
  }),
624341
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && stats.totalSpeculationTimeSavedMs > 0 && /* @__PURE__ */ jsx_runtime367.jsx(ThemedBox_default, {
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, {
624342
624922
  flexDirection: "row",
624343
624923
  gap: 4,
624344
624924
  children: /* @__PURE__ */ jsx_runtime367.jsx(ThemedBox_default, {
@@ -625012,7 +625592,7 @@ function renderOverviewToAnsi(stats) {
625012
625592
  const activeDaysVal = `${stats.activeDays}/${stats.totalDays}`;
625013
625593
  const peakHourVal = stats.peakActivityHour !== null ? `${stats.peakActivityHour}:00-${stats.peakActivityHour + 1}:00` : "N/A";
625014
625594
  lines.push(row("Active days", activeDaysVal, "Peak hour", peakHourVal));
625015
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && stats.totalSpeculationTimeSavedMs > 0) {
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) {
625016
625596
  const label = "Speculation saved:".padEnd(COL1_LABEL_WIDTH);
625017
625597
  lines.push(label + h3(formatDuration(stats.totalSpeculationTimeSavedMs)));
625018
625598
  }
@@ -626796,7 +627376,7 @@ function generateHtmlReport(data, insights) {
626796
627376
  </html>`;
626797
627377
  }
626798
627378
  function buildExportData(data, insights, facets, remoteStats) {
626799
- const version5 = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION;
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;
626800
627380
  const remote_hosts_collected = remoteStats?.hosts.filter((h3) => h3.sessionCount > 0).map((h3) => h3.name);
626801
627381
  const facets_summary = {
626802
627382
  total: facets.size,
@@ -631061,7 +631641,7 @@ var init_sessionStorage = __esm(() => {
631061
631641
  init_settings2();
631062
631642
  init_slowOperations();
631063
631643
  init_uuid();
631064
- VERSION7 = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION;
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;
631065
631645
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
631066
631646
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
631067
631647
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -632279,7 +632859,7 @@ var init_filesystem = __esm(() => {
632279
632859
  });
632280
632860
  getBundledSkillsRoot = memoize64(function getBundledSkillsRoot2() {
632281
632861
  const nonce = randomBytes19(16).toString("hex");
632282
- return join155(getClaudeTempDir(), "bundled-skills", { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION, nonce);
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);
632283
632863
  });
632284
632864
  getResolvedWorkingDirPaths = memoize64(getPathsForPermissionCheck);
632285
632865
  });
@@ -637594,7 +638174,7 @@ function getSimpleDoingTasksSection() {
637594
638174
  ];
637595
638175
  const userHelpSubitems = [
637596
638176
  `/help: Get help with using CCL`,
637597
- `To give feedback, users should ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.ISSUES_EXPLAINER}`
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}`
637598
638178
  ];
637599
638179
  const items = [
637600
638180
  `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.`,
@@ -638908,7 +639488,7 @@ function createBridgeLogger(options) {
638908
639488
  connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
638909
639489
  regenerateQr(connectUrl);
638910
639490
  if (verbose) {
638911
- write(source_default.dim(`Remote Control`) + ` v${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION}
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}
638912
639492
  `);
638913
639493
  }
638914
639494
  if (verbose) {
@@ -639881,7 +640461,7 @@ function appendToLog(path21, message) {
639881
640461
  cwd: getFsImplementation().cwd(),
639882
640462
  userType: process.env.USER_TYPE,
639883
640463
  sessionId: getSessionId(),
639884
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
639885
640465
  };
639886
640466
  getLogWriter(path21).write(messageWithTimestamp);
639887
640467
  }
@@ -641151,7 +641731,7 @@ Spawn mode for this project:
641151
641731
  const api = createBridgeApiClient({
641152
641732
  baseUrl,
641153
641733
  getAccessToken: getBridgeAccessToken2,
641154
- runnerVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
641155
641735
  onDebug: logForDebugging,
641156
641736
  onAuth401: handleOAuth401Error2,
641157
641737
  getTrustedDeviceToken
@@ -641389,7 +641969,7 @@ async function runBridgeHeadless(opts, signal) {
641389
641969
  const api = createBridgeApiClient({
641390
641970
  baseUrl,
641391
641971
  getAccessToken: opts.getAccessToken,
641392
- runnerVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
641393
641973
  onDebug: log2,
641394
641974
  onAuth401: opts.onAuth401,
641395
641975
  getTrustedDeviceToken
@@ -645749,6 +646329,15 @@ var init_useLogMessages = __esm(() => {
645749
646329
  });
645750
646330
 
645751
646331
  // bridge/bridgePermissionCallbacks.ts
646332
+ function dispatchBridgePermissionResponse(pending2, requestId, response) {
646333
+ const handler = pending2.get(requestId);
646334
+ if (!handler)
646335
+ return false;
646336
+ const consumed = handler(response) !== false;
646337
+ if (consumed)
646338
+ pending2.delete(requestId);
646339
+ return consumed;
646340
+ }
645752
646341
  function isBridgePermissionResponse(value) {
645753
646342
  if (!value || typeof value !== "object")
645754
646343
  return false;
@@ -645821,7 +646410,7 @@ function buildSystemInitMessage(inputs) {
645821
646410
  slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
645822
646411
  apiKeySource: getAnthropicApiKeyWithSource().source,
645823
646412
  betas: getSdkBetas(),
645824
- claude_code_version: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
645825
646414
  output_style: outputStyle2,
645826
646415
  agents: inputs.agents.map((agent) => agent.agentType),
645827
646416
  skills: inputs.skills.filter((s3) => s3.userInvocable !== false).map((skill) => skill.name),
@@ -648115,7 +648704,7 @@ async function initBridgeCore(params) {
648115
648704
  const rawApi = createBridgeApiClient({
648116
648705
  baseUrl,
648117
648706
  getAccessToken,
648118
- runnerVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
648119
648708
  onDebug: logForDebugging,
648120
648709
  onAuth401,
648121
648710
  getTrustedDeviceToken
@@ -650329,10 +650918,9 @@ function useReplBridge(messages, setMessages, abortControllerRef, commands, main
650329
650918
  logForDebugging(`[bridge:repl] No handler for control_response request_id=${requestId}`);
650330
650919
  return;
650331
650920
  }
650332
- pendingPermissionHandlers.delete(requestId);
650333
650921
  const inner = msg_0.response;
650334
650922
  if (inner.subtype === "success" && inner.response && isBridgePermissionResponse(inner.response)) {
650335
- handler(inner.response);
650923
+ dispatchBridgePermissionResponse(pendingPermissionHandlers, requestId, inner.response);
650336
650924
  }
650337
650925
  };
650338
650926
  if (teardownPromiseRef.current) {
@@ -650798,7 +651386,7 @@ function MessageSelector({
650798
651386
  ...summarizeInputProps,
650799
651387
  onChange: setSummarizeFromFeedback
650800
651388
  });
650801
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
650802
651390
  baseOptions.push({
650803
651391
  value: "summarize_up_to",
650804
651392
  label: "Summarize up to here",
@@ -654024,7 +654612,7 @@ function AskUserQuestionPermissionRequestBody(t0) {
654024
654612
  const isInSubmitView = currentQuestionIndex === (questions?.length || 0);
654025
654613
  let t11;
654026
654614
  if ($3[22] !== answers || $3[23] !== questions) {
654027
- t11 = questions?.every((q_0) => q_0?.question && !!answers[q_0.question]) ?? false;
654615
+ t11 = questions?.every((q_0) => q_0?.question && typeof answers[q_0.question] === "string" && answers[q_0.question].trim().length > 0) ?? false;
654028
654616
  $3[22] = answers;
654029
654617
  $3[23] = questions;
654030
654618
  $3[24] = t11;
@@ -654176,11 +654764,15 @@ ${questionsWithAnswers_0}`;
654176
654764
  }
654177
654765
  const updatedInput = {
654178
654766
  ...toolUseConfirm.input,
654767
+ questions,
654179
654768
  answers: answersToSubmit,
654180
654769
  ...Object.keys(annotations).length > 0 && {
654181
654770
  annotations
654182
654771
  }
654183
654772
  };
654773
+ const completion = AskUserQuestionTool.validateInteractionCompletion?.(updatedInput);
654774
+ if (completion && !completion.result)
654775
+ return;
654184
654776
  const contentBlocks = await convertImagesToBlocks(allImageAttachments);
654185
654777
  onDone();
654186
654778
  toolUseConfirm.onAllow(updatedInput, [], undefined, contentBlocks && contentBlocks.length > 0 ? contentBlocks : undefined);
@@ -658292,7 +658884,7 @@ function bashToolUseOptions({
658292
658884
  }
658293
658885
  }
658294
658886
  const editablePrefixShown = options.some((o2) => o2.value === "yes-prefix-edited");
658295
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && !editablePrefixShown && isClassifierPermissionsEnabled() && onClassifierDescriptionChange && !initialClassifierDescriptionEmpty && !descriptionAlreadyExists(classifierDescription ?? "", existingAllowDescriptions) && decisionReason?.type !== "classifier") {
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") {
658296
658888
  options.push({
658297
658889
  type: "input",
658298
658890
  label: "Yes, and don’t ask again for",
@@ -665899,7 +666491,7 @@ var init_CompanionSprite = __esm(() => {
665899
666491
 
665900
666492
  // buddy/useBuddyNotification.tsx
665901
666493
  function isBuddyTeaserWindow() {
665902
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant")
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")
665903
666495
  return true;
665904
666496
  const d2 = new Date;
665905
666497
  return d2.getFullYear() === 2026 && d2.getMonth() === 3 && d2.getDate() <= 7;
@@ -666035,7 +666627,7 @@ var init_useVoiceEnabled = __esm(() => {
666035
666627
  function getSemverPart(version5) {
666036
666628
  return `${import_semver14.major(version5, { loose: true })}.${import_semver14.minor(version5, { loose: true })}.${import_semver14.patch(version5, { loose: true })}`;
666037
666629
  }
666038
- function useUpdateNotification(updatedVersion, initialVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION) {
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) {
666039
666631
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react232.useState(() => getSemverPart(initialVersion));
666040
666632
  if (!updatedVersion) {
666041
666633
  return null;
@@ -666075,7 +666667,7 @@ function AutoUpdater({
666075
666667
  return;
666076
666668
  }
666077
666669
  if (false) {}
666078
- const currentVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION;
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;
666079
666671
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
666080
666672
  let latestVersion = await getLatestVersion(channel2);
666081
666673
  const isDisabled = isAutoUpdaterDisabled();
@@ -666211,7 +666803,7 @@ function AutoUpdater({
666211
666803
  " ",
666212
666804
  /* @__PURE__ */ jsx_runtime413.jsx(ThemedText, {
666213
666805
  bold: true,
666214
- children: hasLocalInstall ? `cd ~/.ccl/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL}` : `npm i -g ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL}`
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}`
666215
666807
  })
666216
666808
  ]
666217
666809
  })
@@ -666288,12 +666880,12 @@ function NativeAutoUpdater({
666288
666880
  logEvent("tengu_native_auto_updater_start", {});
666289
666881
  try {
666290
666882
  const maxVersion = await getMaxVersion();
666291
- if (maxVersion && gt2({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION, maxVersion)) {
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)) {
666292
666884
  const msg = await getMaxVersionMessage();
666293
666885
  setMaxVersionIssue(msg ?? "affects your version");
666294
666886
  }
666295
666887
  const result = await installLatest(channel2);
666296
- const currentVersion = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION;
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;
666297
666889
  const latencyMs = Date.now() - startTime2;
666298
666890
  if (result.lockFailed) {
666299
666891
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -666389,7 +666981,7 @@ function NativeAutoUpdater({
666389
666981
  })
666390
666982
  ]
666391
666983
  }),
666392
- maxVersionIssue && { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime414.jsxs(ThemedText, {
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, {
666393
666985
  color: "warning",
666394
666986
  children: [
666395
666987
  "⚠ Known issue: ",
@@ -666443,17 +667035,17 @@ function PackageManagerAutoUpdater(t0) {
666443
667035
  const maxVersion = await getMaxVersion();
666444
667036
  if (maxVersion && latest && gt2(latest, maxVersion)) {
666445
667037
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
666446
- if (gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION, maxVersion)) {
666447
- logForDebugging(`PackageManagerAutoUpdater: current version ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
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`);
666448
667040
  setUpdateAvailable(false);
666449
667041
  return;
666450
667042
  }
666451
667043
  latest = maxVersion;
666452
667044
  }
666453
- const hasUpdate = latest && !gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION, latest) && !shouldSkipVersion(latest);
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);
666454
667046
  setUpdateAvailable(!!hasUpdate);
666455
667047
  if (hasUpdate) {
666456
- logForDebugging(`PackageManagerAutoUpdater: Update available ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} -> ${latest}`);
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}`);
666457
667049
  }
666458
667050
  };
666459
667051
  $3[0] = t1;
@@ -666487,7 +667079,7 @@ function PackageManagerAutoUpdater(t0) {
666487
667079
  wrap: "truncate",
666488
667080
  children: [
666489
667081
  "currentVersion: ",
666490
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
666491
667083
  ]
666492
667084
  });
666493
667085
  $3[3] = verbose;
@@ -666738,7 +667330,7 @@ var init_useMemoryUsage = __esm(() => {
666738
667330
 
666739
667331
  // components/MemoryUsageIndicator.tsx
666740
667332
  function MemoryUsageIndicator() {
666741
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE !== "ant") {
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") {
666742
667334
  return null;
666743
667335
  }
666744
667336
  const memoryUsage = useMemoryUsage();
@@ -676432,7 +677024,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
676432
677024
  project_dir: getOriginalCwd(),
676433
677025
  added_dirs: addedDirs
676434
677026
  },
676435
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
676436
677028
  output_style: {
676437
677029
  name: outputStyleName
676438
677030
  },
@@ -677789,7 +678381,7 @@ function ModeIndicator({
677789
678381
  const expandedView = useAppState((s_3) => s_3.expandedView);
677790
678382
  const showSpinnerTree = expandedView === "teammates";
677791
678383
  const prStatus = usePrStatus(isLoading, isPrStatusEnabled());
677792
- const hasTmuxSession = useAppState((s_4) => ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }).USER_TYPE === "ant" && s_4.tungstenActiveSession !== undefined);
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);
677793
678385
  const nextTickAt = import_react259.useSyncExternalStore(proactiveModule6?.subscribeToProactiveChanges ?? NO_OP_SUBSCRIBE, proactiveModule6?.getNextTickAt ?? NULL, NULL);
677794
678386
  const voiceEnabled = runtimeVoiceFeature() ? useVoiceEnabled() : false;
677795
678387
  const voiceState = runtimeVoiceFeature() ? useVoiceState((s_5) => s_5.voiceState) : "idle";
@@ -677798,7 +678390,7 @@ function ModeIndicator({
677798
678390
  const selGetState = useSelection().getState;
677799
678391
  const hasNextTick = nextTickAt !== null;
677800
678392
  const isCoordinator = feature("COORDINATOR_MODE") ? coordinatorModule?.isCoordinatorMode() === true : false;
677801
- const runningTaskCount = import_react259.useMemo(() => count(Object.values(tasks2), (t3) => isBackgroundTask(t3) && !({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && isPanelAgentTask(t3))), [tasks2]);
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]);
677802
678394
  const tasksV2 = useTasksV2();
677803
678395
  const hasTaskItems = tasksV2 !== undefined && tasksV2.length > 0;
677804
678396
  const escShortcut = useShortcutDisplay("chat:cancel", "Chat", "esc").toLowerCase();
@@ -677876,7 +678468,7 @@ function ModeIndicator({
677876
678468
  ]
677877
678469
  })
677878
678470
  }, "remote")] : [],
677879
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && hasTmuxSession ? [/* @__PURE__ */ jsx_runtime440.jsx(TungstenPill, {
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, {
677880
678472
  selected: tmuxSelected
677881
678473
  }, "tmux")] : [],
677882
678474
  ...isAgentSwarmsEnabled() && hasTeams ? [/* @__PURE__ */ jsx_runtime440.jsx(TeamStatus, {
@@ -677927,7 +678519,7 @@ function ModeIndicator({
677927
678519
  ]
677928
678520
  });
677929
678521
  }
677930
- const hasCoordinatorTasks = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && getVisibleAgentTasks(tasks2).length > 0;
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;
677931
678523
  const tasksPart = hasBackgroundTasks && !hasTeammatePills && !shouldHideTasksFooter(tasks2, showSpinnerTree) ? /* @__PURE__ */ jsx_runtime440.jsx(BackgroundTaskStatus, {
677932
678524
  tasksSelected,
677933
678525
  isViewingTeammate,
@@ -678235,7 +678827,7 @@ function PromptInputFooter({
678235
678827
  isInputWrapped,
678236
678828
  isNarrow
678237
678829
  }),
678238
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && isUndercover() && /* @__PURE__ */ jsx_runtime441.jsx(ThemedText, {
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, {
678239
678831
  dimColor: true,
678240
678832
  children: "undercover"
678241
678833
  }),
@@ -678246,7 +678838,7 @@ function PromptInputFooter({
678246
678838
  })
678247
678839
  ]
678248
678840
  }),
678249
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime441.jsx(CoordinatorTaskPanel, {})
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, {})
678250
678842
  ]
678251
678843
  });
678252
678844
  }
@@ -679007,8 +679599,8 @@ function PromptInput({
679007
679599
  const replBridgeExplicit = useAppState((s3) => s3.replBridgeExplicit);
679008
679600
  const replBridgeReconnecting = useAppState((s3) => s3.replBridgeReconnecting);
679009
679601
  const bridgeFooterVisible = replBridgeConnected && (replBridgeExplicit || replBridgeReconnecting);
679010
- const hasTungstenSession = useAppState((s3) => ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }).USER_TYPE === "ant" && s3.tungstenActiveSession !== undefined);
679011
- const tmuxFooterVisible = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && hasTungstenSession;
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;
679012
679604
  const bagelFooterVisible = useAppState((s3) => false);
679013
679605
  const teamContext = useAppState((s3) => s3.teamContext);
679014
679606
  const queuedCommands = useCommandQueue();
@@ -679074,7 +679666,7 @@ function PromptInput({
679074
679666
  };
679075
679667
  }), [setAppState]);
679076
679668
  const coordinatorTaskCount = useCoordinatorTaskCount();
679077
- const hasBgTaskPill = import_react265.useMemo(() => Object.values(tasks2).some((t3) => isBackgroundTask(t3) && !({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && isPanelAgentTask(t3))), [tasks2]);
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]);
679078
679670
  const minCoordinatorIndex = hasBgTaskPill ? -1 : 0;
679079
679671
  import_react265.useEffect(() => {
679080
679672
  if (coordinatorTaskIndex >= coordinatorTaskCount) {
@@ -679127,7 +679719,7 @@ function PromptInput({
679127
679719
  }];
679128
679720
  }, [teamContext]);
679129
679721
  const runningTaskCount = import_react265.useMemo(() => count(Object.values(tasks2), (t3) => t3.status === "running"), [tasks2]);
679130
- const tasksFooterVisible = (runningTaskCount > 0 || { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && coordinatorTaskCount > 0) && !shouldHideTasksFooter(tasks2, showSpinnerTree);
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);
679131
679723
  const teamsFooterVisible = cachedTeams.length > 0;
679132
679724
  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]);
679133
679725
  const rawFooterSelection = useAppState((s3) => s3.footerSelection);
@@ -680133,14 +680725,14 @@ function PromptInput({
680133
680725
  });
680134
680726
  useKeybindings({
680135
680727
  "footer:up": () => {
680136
- if (tasksSelected && { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && coordinatorTaskCount > 0 && coordinatorTaskIndex > minCoordinatorIndex) {
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) {
680137
680729
  setCoordinatorTaskIndex((prev) => prev - 1);
680138
680730
  return;
680139
680731
  }
680140
680732
  navigateFooter(-1, true);
680141
680733
  },
680142
680734
  "footer:down": () => {
680143
- if (tasksSelected && { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && coordinatorTaskCount > 0) {
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) {
680144
680736
  if (coordinatorTaskIndex < coordinatorTaskCount - 1) {
680145
680737
  setCoordinatorTaskIndex((prev) => prev + 1);
680146
680738
  }
@@ -680202,7 +680794,7 @@ function PromptInput({
680202
680794
  }
680203
680795
  break;
680204
680796
  case "tmux":
680205
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
680206
680798
  setAppState((prev) => prev.tungstenPanelAutoHidden ? {
680207
680799
  ...prev,
680208
680800
  tungstenPanelAutoHidden: false
@@ -693565,6 +694157,9 @@ function createPermissionContext(tool, input, toolUseContext, assistantMessage,
693565
694157
  const decision = hookResult.permissionRequestResult;
693566
694158
  if (decision.behavior === "allow") {
693567
694159
  const finalInput = decision.updatedInput ?? updatedInput ?? input;
694160
+ if (!validateToolInteractionCompletion(tool, finalInput).result) {
694161
+ return null;
694162
+ }
693568
694163
  return await this.handleHookAllow(finalInput, decision.updatedPermissions ?? [], permissionPromptStartTimeMs);
693569
694164
  } else if (decision.behavior === "deny") {
693570
694165
  this.logDecision({ decision: "reject", source: { type: "hook" } }, { permissionPromptStartTimeMs });
@@ -693653,6 +694248,7 @@ var init_PermissionContext = __esm(() => {
693653
694248
  init_bashPermissions();
693654
694249
  init_classifierApprovals();
693655
694250
  init_debug();
694251
+ init_interactionCompletion();
693656
694252
  init_hooks5();
693657
694253
  init_messages7();
693658
694254
  init_PermissionUpdate();
@@ -693731,6 +694327,9 @@ function handleInteractivePermission(params, resolve41) {
693731
694327
  resolveOnce(ctx.cancelAndAbort(undefined, true));
693732
694328
  },
693733
694329
  async onAllow(updatedInput, permissionUpdates, feedback2, contentBlocks) {
694330
+ if (!validateToolInteractionCompletion(ctx.tool, updatedInput).result) {
694331
+ return;
694332
+ }
693734
694333
  if (!claim())
693735
694334
  return;
693736
694335
  if (bridgeCallbacks && bridgeRequestId) {
@@ -693766,6 +694365,10 @@ function handleInteractivePermission(params, resolve41) {
693766
694365
  return;
693767
694366
  const freshResult = await hasPermissionsToUseTool(ctx.tool, ctx.input, ctx.toolUseContext, ctx.assistantMessage, ctx.toolUseID);
693768
694367
  if (freshResult.behavior === "allow") {
694368
+ const freshInput = freshResult.updatedInput ?? ctx.input;
694369
+ if (!validateToolInteractionCompletion(ctx.tool, freshInput).result) {
694370
+ return;
694371
+ }
693769
694372
  if (!claim())
693770
694373
  return;
693771
694374
  if (bridgeCallbacks && bridgeRequestId) {
@@ -693774,7 +694377,7 @@ function handleInteractivePermission(params, resolve41) {
693774
694377
  channelUnsubscribe?.();
693775
694378
  ctx.removeFromQueue();
693776
694379
  ctx.logDecision({ decision: "accept", source: "config" });
693777
- resolveOnce(ctx.buildAllow(freshResult.updatedInput ?? ctx.input));
694380
+ resolveOnce(ctx.buildAllow(freshInput));
693778
694381
  }
693779
694382
  }
693780
694383
  });
@@ -693782,8 +694385,12 @@ function handleInteractivePermission(params, resolve41) {
693782
694385
  bridgeCallbacks.sendRequest(bridgeRequestId, ctx.tool.name, displayInput, ctx.toolUseID, description, result.suggestions, result.blockedPath);
693783
694386
  const signal = ctx.toolUseContext.abortController.signal;
693784
694387
  const unsubscribe = bridgeCallbacks.onResponse(bridgeRequestId, (response) => {
694388
+ const responseInput = response.updatedInput ?? displayInput;
694389
+ if (response.behavior === "allow" && !validateToolInteractionCompletion(ctx.tool, responseInput).result) {
694390
+ return false;
694391
+ }
693785
694392
  if (!claim())
693786
- return;
694393
+ return true;
693787
694394
  signal.removeEventListener("abort", unsubscribe);
693788
694395
  clearClassifierChecking(ctx.toolUseID);
693789
694396
  clearClassifierIndicator();
@@ -693800,7 +694407,7 @@ function handleInteractivePermission(params, resolve41) {
693800
694407
  permanent: !!response.updatedPermissions?.length
693801
694408
  }
693802
694409
  }, { permissionPromptStartTimeMs });
693803
- resolveOnce(ctx.buildAllow(response.updatedInput ?? displayInput));
694410
+ resolveOnce(ctx.buildAllow(responseInput));
693804
694411
  } else {
693805
694412
  ctx.logDecision({
693806
694413
  decision: "reject",
@@ -693811,6 +694418,7 @@ function handleInteractivePermission(params, resolve41) {
693811
694418
  }, { permissionPromptStartTimeMs });
693812
694419
  resolveOnce(ctx.cancelAndAbort(response.message));
693813
694420
  }
694421
+ return true;
693814
694422
  });
693815
694423
  signal.addEventListener("abort", unsubscribe, { once: true });
693816
694424
  }
@@ -693875,8 +694483,9 @@ function handleInteractivePermission(params, resolve41) {
693875
694483
  return;
693876
694484
  const currentAppState = ctx.toolUseContext.getAppState();
693877
694485
  const hookDecision = await ctx.runHooks(currentAppState.toolPermissionContext.mode, result.suggestions, result.updatedInput, permissionPromptStartTimeMs);
693878
- if (!hookDecision || !claim())
694486
+ if (!hookDecision || hookDecision.behavior === "allow" && !validateToolInteractionCompletion(ctx.tool, hookDecision.updatedInput ?? displayInput).result || !claim()) {
693879
694487
  return;
694488
+ }
693880
694489
  if (bridgeCallbacks && bridgeRequestId) {
693881
694490
  bridgeCallbacks.cancelRequest(bridgeRequestId);
693882
694491
  }
@@ -693955,6 +694564,7 @@ var init_interactiveHandler = __esm(() => {
693955
694564
  init_bashPermissions();
693956
694565
  init_classifierApprovals();
693957
694566
  init_errors();
694567
+ init_interactionCompletion();
693958
694568
  init_permissions2();
693959
694569
  init_PermissionContext();
693960
694570
  });
@@ -695874,6 +696484,34 @@ var init_useIdeSelection = __esm(() => {
695874
696484
  }));
695875
696485
  });
695876
696486
 
696487
+ // services/tools/interactionPolicy.ts
696488
+ function parseInteractionMode(value) {
696489
+ if (value === undefined)
696490
+ return "local";
696491
+ if (INTERACTION_MODES.some((mode) => mode === value)) {
696492
+ return value;
696493
+ }
696494
+ throw new Error(`Invalid interaction mode: ${String(value)}. Expected local, remote, or unattended.`);
696495
+ }
696496
+ function filterToolsForInteractionMode(tools, mode) {
696497
+ if (mode !== "unattended")
696498
+ return [...tools];
696499
+ return tools.filter((tool) => tool.validateInteractionCompletion === undefined);
696500
+ }
696501
+ function appendInteractionGuidance(existing, mode) {
696502
+ if (mode !== "unattended")
696503
+ return existing;
696504
+ if (existing?.includes(UNATTENDED_INTERACTION_GUIDANCE))
696505
+ return existing;
696506
+ return existing ? `${existing}
696507
+
696508
+ ${UNATTENDED_INTERACTION_GUIDANCE}` : UNATTENDED_INTERACTION_GUIDANCE;
696509
+ }
696510
+ var INTERACTION_MODES, UNATTENDED_INTERACTION_GUIDANCE = "This session is unattended. Do not ask the user an interactive question. Continue with safe, reversible assumptions when possible. If required information or authority is unavailable, explain the precise blocker and the user action needed; do not fabricate an answer or silently stop.";
696511
+ var init_interactionPolicy = __esm(() => {
696512
+ INTERACTION_MODES = ["local", "remote", "unattended"];
696513
+ });
696514
+
695877
696515
  // utils/asciicast.ts
695878
696516
  var exports_asciicast = {};
695879
696517
  __export(exports_asciicast, {
@@ -698116,7 +698754,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
698116
698754
  } catch {}
698117
698755
  const data = {
698118
698756
  trigger,
698119
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
698120
698758
  platform: process.platform,
698121
698759
  transcript,
698122
698760
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -698552,7 +699190,7 @@ function useMemorySurvey(messages, isLoading, hasActivePrompt = false, {
698552
699190
  });
698553
699191
  }, []);
698554
699192
  const shouldShowTranscriptPrompt = import_react299.useCallback((selected_0) => {
698555
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE !== "ant") {
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") {
698556
699194
  return false;
698557
699195
  }
698558
699196
  if (selected_0 !== "bad" && selected_0 !== "good") {
@@ -701082,6 +701720,14 @@ function permissionPromptToolResultToPermissionDecision(result, tool, input, too
701082
701720
  toolResult: result
701083
701721
  };
701084
701722
  if (result.behavior === "allow") {
701723
+ const updatedInput = Object.keys(result.updatedInput).length > 0 ? result.updatedInput : input;
701724
+ const completion = validateToolInteractionCompletion(tool, updatedInput);
701725
+ if (!completion.result) {
701726
+ return {
701727
+ ...interactionIncompleteDecision(completion),
701728
+ toolUseID: result.toolUseID
701729
+ };
701730
+ }
701085
701731
  const updatedPermissions = result.updatedPermissions;
701086
701732
  if (updatedPermissions) {
701087
701733
  toolUseContext.setAppState((prev) => ({
@@ -701090,7 +701736,6 @@ function permissionPromptToolResultToPermissionDecision(result, tool, input, too
701090
701736
  }));
701091
701737
  persistPermissionUpdates(updatedPermissions);
701092
701738
  }
701093
- const updatedInput = Object.keys(result.updatedInput).length > 0 ? result.updatedInput : input;
701094
701739
  return {
701095
701740
  ...result,
701096
701741
  updatedInput,
@@ -701110,6 +701755,7 @@ var init_PermissionPromptToolResultSchema = __esm(() => {
701110
701755
  init_debug();
701111
701756
  init_PermissionUpdate();
701112
701757
  init_PermissionUpdateSchema();
701758
+ init_interactionCompletion();
701113
701759
  inputSchema49 = lazySchema(() => z108.object({
701114
701760
  tool_name: z108.string().describe("The name of the tool requesting permission"),
701115
701761
  input: z108.record(z108.string(), z108.unknown()).describe("The input for the tool"),
@@ -701480,7 +702126,7 @@ class StructuredIO {
701480
702126
  const onParentAbort = () => hookAbortController.abort();
701481
702127
  parentSignal.addEventListener("abort", onParentAbort, { once: true });
701482
702128
  try {
701483
- const hookPromise = executePermissionRequestHooksForSDK(tool.name, toolUseID, input, toolUseContext, permissionSuggestions).then((decision) => ({ source: "hook", decision }));
702129
+ const hookPromise = executePermissionRequestHooksForSDK(tool, toolUseID, input, toolUseContext, permissionSuggestions).then((decision) => ({ source: "hook", decision }));
701484
702130
  const requestId = randomUUID62();
701485
702131
  onPermissionPrompt?.(buildRequiresActionDetails(tool, input, toolUseID, requestId));
701486
702132
  const sdkPromise = this.sendRequest({
@@ -701585,15 +702231,19 @@ function exitWithMessage(message) {
701585
702231
  console.error(message);
701586
702232
  process.exit(1);
701587
702233
  }
701588
- async function executePermissionRequestHooksForSDK(toolName, toolUseID, input, toolUseContext, suggestions) {
702234
+ async function executePermissionRequestHooksForSDK(tool, toolUseID, input, toolUseContext, suggestions) {
701589
702235
  const appState = toolUseContext.getAppState();
701590
702236
  const permissionMode = appState.toolPermissionContext.mode;
701591
- const hookGenerator = executePermissionRequestHooks(toolName, toolUseID, input, toolUseContext, permissionMode, suggestions, toolUseContext.abortController.signal);
702237
+ const hookGenerator = executePermissionRequestHooks(tool.name, toolUseID, input, toolUseContext, permissionMode, suggestions, toolUseContext.abortController.signal);
701592
702238
  for await (const hookResult of hookGenerator) {
701593
702239
  if (hookResult.permissionRequestResult && (hookResult.permissionRequestResult.behavior === "allow" || hookResult.permissionRequestResult.behavior === "deny")) {
701594
702240
  const decision = hookResult.permissionRequestResult;
701595
702241
  if (decision.behavior === "allow") {
701596
702242
  const finalInput = decision.updatedInput || input;
702243
+ const completion = validateToolInteractionCompletion(tool, finalInput);
702244
+ if (!completion.result) {
702245
+ return interactionIncompleteDecision(completion);
702246
+ }
701597
702247
  const permissionUpdates = decision.updatedPermissions ?? [];
701598
702248
  if (permissionUpdates.length > 0) {
701599
702249
  persistPermissionUpdates(permissionUpdates);
@@ -701637,6 +702287,7 @@ var init_structuredIO = __esm(() => {
701637
702287
  init_errors();
701638
702288
  init_PermissionPromptToolResultSchema();
701639
702289
  init_permissions2();
702290
+ init_interactionCompletion();
701640
702291
  init_slowOperations();
701641
702292
  init_hooks5();
701642
702293
  init_PermissionUpdate();
@@ -704755,7 +705406,7 @@ function AutoRunIssueNotification(t0) {
704755
705406
  return t6;
704756
705407
  }
704757
705408
  function shouldAutoRunIssue(reason) {
704758
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE !== "ant") {
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") {
704759
705410
  return false;
704760
705411
  }
704761
705412
  switch (reason) {
@@ -704768,7 +705419,7 @@ function shouldAutoRunIssue(reason) {
704768
705419
  }
704769
705420
  }
704770
705421
  function getAutoRunCommand(reason) {
704771
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && reason === "feedback_survey_good") {
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") {
704772
705423
  return "/good-claude";
704773
705424
  }
704774
705425
  return "/issue";
@@ -704909,7 +705560,7 @@ var init_useIssueFlagBanner = __esm(() => {
704909
705560
 
704910
705561
  // components/DevBar.tsx
704911
705562
  function shouldShowDevBar() {
704912
- return { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant";
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";
704913
705564
  }
704914
705565
  function DevBar() {
704915
705566
  const $3 = import_compiler_runtime368.c(5);
@@ -706760,6 +707411,7 @@ function REPL({
706760
707411
  strictMcpConfig = false,
706761
707412
  systemPrompt: customSystemPrompt,
706762
707413
  appendSystemPrompt,
707414
+ interactionMode = "local",
706763
707415
  onBeforeQuery,
706764
707416
  onTurnComplete,
706765
707417
  disabled = false,
@@ -706773,7 +707425,7 @@ function REPL({
706773
707425
  }) {
706774
707426
  const isRemoteSession = !!remoteSessionConfig;
706775
707427
  const titleDisabled = import_react324.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE), []);
706776
- const moreRightEnabled = import_react324.useMemo(() => ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }).USER_TYPE === "ant" && isEnvTruthy(process.env.CLAUDE_MORERIGHT), []);
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), []);
706777
707429
  const disableVirtualScroll = import_react324.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL), []);
706778
707430
  const disableMessageActions = runtimeFeature11("MESSAGE_ACTIONS") ? import_react324.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_MESSAGE_ACTIONS), []) : false;
706779
707431
  import_react324.useEffect(() => {
@@ -706836,7 +707488,7 @@ function REPL({
706836
707488
  useSkillsChange(isRemoteSession ? undefined : getProjectRoot(), setLocalCommands);
706837
707489
  const proactiveActive = React157.useSyncExternalStore(proactiveModule8?.subscribeToProactiveChanges ?? PROACTIVE_NO_OP_SUBSCRIBE, proactiveModule8?.isProactiveActive ?? PROACTIVE_FALSE);
706838
707490
  const isBriefOnly = useAppState((s3) => s3.isBriefOnly);
706839
- const localTools = import_react324.useMemo(() => getTools(toolPermissionContext), [toolPermissionContext, proactiveActive, isBriefOnly]);
707491
+ const localTools = import_react324.useMemo(() => filterToolsForInteractionMode(getTools(toolPermissionContext), interactionMode), [toolPermissionContext, proactiveActive, isBriefOnly, interactionMode]);
706840
707492
  useKickOffCheckAndDisableBypassPermissionsIfNeeded();
706841
707493
  useKickOffCheckAndDisableAutoModeIfNeeded();
706842
707494
  const [dynamicMcpConfig, setDynamicMcpConfig] = import_react324.useState(initialDynamicMcpConfig);
@@ -706861,7 +707513,7 @@ function REPL({
706861
707513
  const [ideInstallationStatus, setIDEInstallationStatus] = import_react324.useState(null);
706862
707514
  const [showIdeOnboarding, setShowIdeOnboarding] = import_react324.useState(false);
706863
707515
  const [showModelSwitchCallout, setShowModelSwitchCallout] = import_react324.useState(() => {
706864
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
706865
707517
  return shouldShowAntModelSwitch();
706866
707518
  }
706867
707519
  return false;
@@ -707023,7 +707675,7 @@ function REPL({
707023
707675
  }, []);
707024
707676
  const [showUndercoverCallout, setShowUndercoverCallout] = import_react324.useState(false);
707025
707677
  import_react324.useEffect(() => {
707026
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
707027
707679
  (async () => {
707028
707680
  const {
707029
707681
  isInternalModelRepo: isInternalModelRepo2
@@ -707640,9 +708292,9 @@ function REPL({
707640
708292
  return "ultraplan-launch";
707641
708293
  if (allowDialogsWithAnimation && showIdeOnboarding)
707642
708294
  return "ide-onboarding";
707643
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && allowDialogsWithAnimation && showModelSwitchCallout)
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)
707644
708296
  return "model-switch";
707645
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && allowDialogsWithAnimation && showUndercoverCallout)
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)
707646
708298
  return "undercover-callout";
707647
708299
  if (allowDialogsWithAnimation && showEffortCallout)
707648
708300
  return "effort-callout";
@@ -707907,7 +708559,7 @@ Error: sandbox required but unavailable: ${reason}
707907
708559
  const computeTools = () => {
707908
708560
  const state2 = store.getState();
707909
708561
  const assembled = assembleToolPool(state2.toolPermissionContext, state2.mcp.tools);
707910
- const merged = mergeAndFilterTools(combinedInitialTools, assembled, state2.toolPermissionContext.mode);
708562
+ const merged = filterToolsForInteractionMode(mergeAndFilterTools(combinedInitialTools, assembled, state2.toolPermissionContext.mode), interactionMode);
707911
708563
  if (!mainThreadAgentDefinition)
707912
708564
  return merged;
707913
708565
  return resolveAgentTools(mainThreadAgentDefinition, merged, false, true).resolvedTools;
@@ -707983,7 +708635,7 @@ Error: sandbox required but unavailable: ${reason}
707983
708635
  dynamicSkillDirTriggers: new Set,
707984
708636
  discoveredSkillNames: discoveredSkillNamesRef.current,
707985
708637
  setResponseLength,
707986
- pushApiMetricsEntry: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? (ttftMs) => {
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) => {
707987
708639
  const now = Date.now();
707988
708640
  const baseline = responseLengthRef.current;
707989
708641
  apiMetricsRef2.current.push({
@@ -708023,7 +708675,7 @@ Error: sandbox required but unavailable: ${reason}
708023
708675
  byteBudgetReplayState: byteBudgetReplayStateRef.current,
708024
708676
  persistContentReplacements: true
708025
708677
  };
708026
- }, [commands, combinedInitialTools, mainThreadAgentDefinition, debug5, initialMcpClients, ideInstallationStatus, dynamicMcpConfig, theme2, allowedAgentTypes, store, setAppState, reverify, addNotification, setMessages, onChangeDynamicMcpConfig, resume3, requestPrompt, disabled, customSystemPrompt, appendSystemPrompt, setConversationId]);
708678
+ }, [commands, combinedInitialTools, mainThreadAgentDefinition, debug5, initialMcpClients, ideInstallationStatus, dynamicMcpConfig, theme2, allowedAgentTypes, store, setAppState, reverify, addNotification, setMessages, onChangeDynamicMcpConfig, resume3, requestPrompt, disabled, customSystemPrompt, appendSystemPrompt, interactionMode, setConversationId]);
708027
708679
  const handleBackgroundQuery = import_react324.useCallback(() => {
708028
708680
  abortController?.abort("background");
708029
708681
  const removedNotifications = removeByFilter((cmd) => cmd.mode === "task-notification");
@@ -708254,7 +708906,7 @@ Error: sandbox required but unavailable: ${reason}
708254
708906
  }));
708255
708907
  }
708256
708908
  queryCheckpoint("query_end");
708257
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && apiMetricsRef2.current.length > 0) {
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) {
708258
708910
  const entries = apiMetricsRef2.current;
708259
708911
  const ttfts = entries.map((e3) => e3.ttftMs);
708260
708912
  const otpsValues = entries.map((e3) => {
@@ -708340,7 +708992,7 @@ Error: sandbox required but unavailable: ${reason}
708340
708992
  resetLoadingState();
708341
708993
  await mrOnTurnComplete(messagesRef.current, abortController2.signal.aborted);
708342
708994
  sendBridgeResultRef.current();
708343
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && !abortController2.signal.aborted) {
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) {
708344
708996
  setAppState((prev) => {
708345
708997
  if (prev.tungstenActiveSession === undefined)
708346
708998
  return prev;
@@ -708421,7 +709073,7 @@ Error: sandbox required but unavailable: ${reason}
708421
709073
  setPlanSlug(getSessionId(), oldPlanSlug);
708422
709074
  }
708423
709075
  }
708424
- const shouldStorePlanForVerification = initialMsg.message.planContent && { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && isEnvTruthy(undefined);
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);
708425
709077
  setAppState((prev) => {
708426
709078
  let updatedToolPermissionContext = initialMsg.mode ? applyPermissionUpdates(prev.toolPermissionContext, buildPermissionUpdates(initialMsg.mode, initialMsg.allowedPrompts)) : prev.toolPermissionContext;
708427
709079
  if (feature("TRANSCRIPT_CLASSIFIER") && initialMsg.mode === "auto") {
@@ -708820,7 +709472,7 @@ Error: sandbox required but unavailable: ${reason}
708820
709472
  setAutoRunIssueReason(null);
708821
709473
  }, []);
708822
709474
  const handleSurveyRequestFeedback = import_react324.useCallback(() => {
708823
- const command9 = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? "/issue" : "/feedback";
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";
708824
709476
  onSubmit(command9, {
708825
709477
  setCursorOffset: () => {},
708826
709478
  clearBuffer: () => {},
@@ -709189,7 +709841,7 @@ ${fileList}`);
709189
709841
  assistantMode: scheduledTasksAssistantMode,
709190
709842
  setMessages
709191
709843
  });
709192
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
709193
709845
  useTaskListWatcher({
709194
709846
  taskListId,
709195
709847
  isLoading,
@@ -709267,7 +709919,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
709267
709919
  return total === 1 ? `${customMessage}…` : `${customMessage}… ${completedCount}/${total}`;
709268
709920
  }
709269
709921
  const hookType = currentHooks[0]?.data.hookEvent === "SubagentStop" ? "subagent stop" : "stop";
709270
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
709271
709923
  const cmd = currentHooks[completedCount]?.data.command;
709272
709924
  const label = cmd ? ` '${truncateToWidth(cmd, 40)}'` : "";
709273
709925
  return total === 1 ? `running ${hookType} hook${label}` : `running ${hookType} hook${label}… ${completedCount}/${total}`;
@@ -709649,7 +710301,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
709649
710301
  width: "100%",
709650
710302
  children: toolJSX.jsx
709651
710303
  }),
709652
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime475.jsx(TungstenLiveMonitor, {}),
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, {}),
709653
710305
  feature("WEB_BROWSER_TOOL") ? WebBrowserPanelModule && /* @__PURE__ */ jsx_runtime475.jsx(WebBrowserPanelModule.WebBrowserPanel, {}) : null,
709654
710306
  /* @__PURE__ */ jsx_runtime475.jsx(ThemedBox_default, {
709655
710307
  flexGrow: 1
@@ -709908,7 +710560,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
709908
710560
  onDone: () => setShowIdeOnboarding(false),
709909
710561
  installationStatus: ideInstallationStatus
709910
710562
  }),
709911
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && focusedInputDialog === "model-switch" && AntModelSwitchCallout26 && /* @__PURE__ */ jsx_runtime475.jsx(AntModelSwitchCallout26, {
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, {
709912
710564
  onDone: (selection, modelAlias) => {
709913
710565
  setShowModelSwitchCallout(false);
709914
710566
  if (selection === "switch" && modelAlias) {
@@ -709920,7 +710572,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
709920
710572
  }
709921
710573
  }
709922
710574
  }),
709923
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && focusedInputDialog === "undercover-callout" && UndercoverAutoCallout26 && /* @__PURE__ */ jsx_runtime475.jsx(UndercoverAutoCallout26, {
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, {
709924
710576
  onDone: () => setShowUndercoverCallout(false)
709925
710577
  }),
709926
710578
  focusedInputDialog === "effort-callout" && /* @__PURE__ */ jsx_runtime475.jsx(EffortCallout, {
@@ -710054,7 +710706,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
710054
710706
  inputValue,
710055
710707
  setInputValue
710056
710708
  }),
710057
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && skillImprovementSurvey.suggestion && /* @__PURE__ */ jsx_runtime475.jsx(SkillImprovementSurvey, {
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, {
710058
710710
  isOpen: skillImprovementSurvey.isOpen,
710059
710711
  skillName: skillImprovementSurvey.suggestion.skillName,
710060
710712
  updates: skillImprovementSurvey.suggestion.updates,
@@ -710189,7 +710841,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
710189
710841
  setMessageSelectorPreselect(undefined);
710190
710842
  }
710191
710843
  }),
710192
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime475.jsx(DevBar, {})
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, {})
710193
710845
  ]
710194
710846
  }),
710195
710847
  feature("BUDDY") && !(companionNarrow && isFullscreenEnvEnabled()) && companionVisible ? /* @__PURE__ */ jsx_runtime475.jsx(CompanionSprite, {}) : null
@@ -710320,6 +710972,7 @@ var init_REPL = __esm(() => {
710320
710972
  init_hooks5();
710321
710973
  init_useIdeSelection();
710322
710974
  init_tools2();
710975
+ init_interactionPolicy();
710323
710976
  init_agentToolUtils();
710324
710977
  init_resumeAgent();
710325
710978
  init_useMainLoopModel();
@@ -710422,17 +711075,17 @@ var init_REPL = __esm(() => {
710422
711075
  resetAnchor: () => {}
710423
711076
  });
710424
711077
  VoiceKeybindingHandler27 = runtimeVoiceFeature() ? (init_useVoiceIntegration(), __toCommonJS(exports_useVoiceIntegration)).VoiceKeybindingHandler : () => null;
710425
- useFrustrationDetection27 = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? __toCommonJS(exports_useFrustrationDetection).useFrustrationDetection : () => ({
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 : () => ({
710426
711079
  state: "closed",
710427
711080
  handleTranscriptSelect: () => {}
710428
711081
  });
710429
- useAntOrgWarningNotification27 = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? __toCommonJS(exports_useAntOrgWarningNotification).useAntOrgWarningNotification : () => {};
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 : () => {};
710430
711083
  getCoordinatorUserContext27 = feature("COORDINATOR_MODE") ? (init_coordinatorMode(), __toCommonJS(exports_coordinatorMode)).getCoordinatorUserContext : () => ({});
710431
711084
  proactiveModule8 = feature("PROACTIVE") || feature("KAIROS") ? __toCommonJS(exports_proactive) : null;
710432
711085
  useProactive26 = feature("PROACTIVE") || feature("KAIROS") ? (init_useProactive(), __toCommonJS(exports_useProactive)).useProactive : null;
710433
- AntModelSwitchCallout26 = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? (init_AntModelSwitchCallout(), __toCommonJS(exports_AntModelSwitchCallout)).AntModelSwitchCallout : null;
710434
- shouldShowAntModelSwitch = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? (init_AntModelSwitchCallout(), __toCommonJS(exports_AntModelSwitchCallout)).shouldShowModelSwitchCallout : () => false;
710435
- UndercoverAutoCallout26 = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? (init_UndercoverAutoCallout(), __toCommonJS(exports_UndercoverAutoCallout)).UndercoverAutoCallout : 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;
710436
711089
  WebBrowserPanelModule = feature("WEB_BROWSER_TOOL") ? __toCommonJS(exports_WebBrowserPanel) : null;
710437
711090
  EMPTY_MCP_CLIENTS2 = [];
710438
711091
  HISTORY_STUB = {
@@ -713434,7 +714087,7 @@ function WelcomeV2() {
713434
714087
  dimColor: true,
713435
714088
  children: [
713436
714089
  "v",
713437
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
713438
714091
  " "
713439
714092
  ]
713440
714093
  })
@@ -713633,7 +714286,7 @@ function WelcomeV2() {
713633
714286
  dimColor: true,
713634
714287
  children: [
713635
714288
  "v",
713636
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
713637
714290
  " "
713638
714291
  ]
713639
714292
  })
@@ -713859,7 +714512,7 @@ function AppleTerminalWelcomeV2(t0) {
713859
714512
  dimColor: true,
713860
714513
  children: [
713861
714514
  "v",
713862
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
713863
714516
  " "
713864
714517
  ]
713865
714518
  });
@@ -714077,7 +714730,7 @@ function AppleTerminalWelcomeV2(t0) {
714077
714730
  dimColor: true,
714078
714731
  children: [
714079
714732
  "v",
714080
- { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
714081
714734
  " "
714082
714735
  ]
714083
714736
  });
@@ -715744,7 +716397,7 @@ function completeOnboarding() {
715744
716397
  saveGlobalConfig((current) => ({
715745
716398
  ...current,
715746
716399
  hasCompletedOnboarding: true,
715747
- lastOnboardingVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
715748
716401
  }));
715749
716402
  }
715750
716403
  function showDialog(root, renderer) {
@@ -725966,7 +726619,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
725966
726619
  allTools = [...allTools, syntheticOutputResult.tool];
725967
726620
  }
725968
726621
  }
725969
- return allTools;
726622
+ return filterToolsForInteractionMode(allTools, options.interactionMode);
725970
726623
  };
725971
726624
  let bridgeHandle = null;
725972
726625
  let bridgeLastForwardedIndex = 0;
@@ -728403,6 +729056,7 @@ var init_print = __esm(() => {
728403
729056
  init_uuid();
728404
729057
  init_generators();
728405
729058
  init_QueryEngine();
729059
+ init_interactionPolicy();
728406
729060
  init_fileStateCache();
728407
729061
  init_path();
728408
729062
  init_queryHelpers();
@@ -729428,7 +730082,7 @@ async function startMCPServer(cwd3, debug5, verbose) {
729428
730082
  setCwd(cwd3);
729429
730083
  const server = new Server({
729430
730084
  name: "claude/tengu",
729431
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION
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
729432
730086
  }, {
729433
730087
  capabilities: {
729434
730088
  tools: {}
@@ -731233,7 +731887,7 @@ __export(exports_update, {
731233
731887
  });
731234
731888
  async function update() {
731235
731889
  logEvent("tengu_update_check", {});
731236
- writeToStdout(`Current version: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION}
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}
731237
731891
  `);
731238
731892
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
731239
731893
  writeToStdout(`Checking for updates to ${channel2} version...
@@ -731308,8 +731962,8 @@ async function update() {
731308
731962
  writeToStdout(`CCL is managed by Homebrew.
731309
731963
  `);
731310
731964
  const latest = await getLatestVersion(channel2);
731311
- if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION, latest)) {
731312
- writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} → ${latest}
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}
731313
731967
  `);
731314
731968
  writeToStdout(`
731315
731969
  `);
@@ -731325,8 +731979,8 @@ async function update() {
731325
731979
  writeToStdout(`CCL is managed by winget.
731326
731980
  `);
731327
731981
  const latest = await getLatestVersion(channel2);
731328
- if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION, latest)) {
731329
- writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} → ${latest}
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}
731330
731984
  `);
731331
731985
  writeToStdout(`
731332
731986
  `);
@@ -731342,8 +731996,8 @@ async function update() {
731342
731996
  writeToStdout(`CCL is managed by apk.
731343
731997
  `);
731344
731998
  const latest = await getLatestVersion(channel2);
731345
- if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION, latest)) {
731346
- writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} → ${latest}
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}
731347
732001
  `);
731348
732002
  writeToStdout(`
731349
732003
  `);
@@ -731408,11 +732062,11 @@ async function update() {
731408
732062
  `);
731409
732063
  await gracefulShutdown(1);
731410
732064
  }
731411
- if (result.latestVersion === { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION) {
731412
- writeToStdout(source_default.green(`CCL is up to date (${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION})`) + `
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})`) + `
731413
732067
  `);
731414
732068
  } else {
731415
- writeToStdout(source_default.green(`Successfully updated from ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} to version ${result.latestVersion}`) + `
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}`) + `
731416
732070
  `);
731417
732071
  await regenerateCompletionCache();
731418
732072
  }
@@ -731431,9 +732085,9 @@ async function update() {
731431
732085
  await removeInstalledSymlink();
731432
732086
  }
731433
732087
  logForDebugging("update: Checking npm registry for latest version");
731434
- logForDebugging(`update: Package URL: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL}`);
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}`);
731435
732089
  const npmTag = channel2 === "stable" ? "stable" : "latest";
731436
- const npmCommand = `npm view ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL}@${npmTag} version`;
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`;
731437
732091
  logForDebugging(`update: Running: ${npmCommand}`);
731438
732092
  const latestVersion = await getLatestVersion(channel2);
731439
732093
  logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
@@ -731453,7 +732107,7 @@ async function update() {
731453
732107
  `);
731454
732108
  process.stderr.write(` • Corporate proxy/firewall blocking npm
731455
732109
  `);
731456
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL && !{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL.startsWith("@anthropic")) {
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")) {
731457
732111
  process.stderr.write(` • Internal/development build not published to npm
731458
732112
  `);
731459
732113
  }
@@ -731465,19 +732119,19 @@ async function update() {
731465
732119
  `);
731466
732120
  process.stderr.write(` • Run with --debug flag for more details
731467
732121
  `);
731468
- const packageName = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL || (process.env.USER_TYPE === "ant" ? "@anthropic-ai/claude-cli" : "@anthropic-ai/claude-code");
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");
731469
732123
  process.stderr.write(` • Manually check: npm view ${packageName} version
731470
732124
  `);
731471
732125
  process.stderr.write(` • Check if you need to login: npm whoami
731472
732126
  `);
731473
732127
  await gracefulShutdown(1);
731474
732128
  }
731475
- if (latestVersion === { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION) {
731476
- writeToStdout(source_default.green(`CCL is up to date (${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION})`) + `
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})`) + `
731477
732131
  `);
731478
732132
  await gracefulShutdown(0);
731479
732133
  }
731480
- writeToStdout(`New version available: ${latestVersion} (current: ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION})
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})
731481
732135
  `);
731482
732136
  writeToStdout(`Installing update...
731483
732137
  `);
@@ -731522,7 +732176,7 @@ async function update() {
731522
732176
  logForDebugging(`update: Installation status: ${status2}`);
731523
732177
  switch (status2) {
731524
732178
  case "success":
731525
- writeToStdout(source_default.green(`Successfully updated from ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} to version ${latestVersion}`) + `
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}`) + `
731526
732180
  `);
731527
732181
  await regenerateCompletionCache();
731528
732182
  break;
@@ -731532,7 +732186,7 @@ async function update() {
731532
732186
  if (useLocalUpdate) {
731533
732187
  process.stderr.write(`Try manually updating with:
731534
732188
  `);
731535
- process.stderr.write(` cd ~/.claude/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL}
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}
731536
732190
  `);
731537
732191
  } else {
731538
732192
  process.stderr.write(`Try running with sudo or fix npm permissions
@@ -731548,7 +732202,7 @@ async function update() {
731548
732202
  if (useLocalUpdate) {
731549
732203
  process.stderr.write(`Try manually updating with:
731550
732204
  `);
731551
- process.stderr.write(` cd ~/.claude/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.PACKAGE_URL}
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}
731552
732206
  `);
731553
732207
  } else {
731554
732208
  process.stderr.write(`Or consider using native installation with: margay install
@@ -731735,7 +732389,7 @@ function runMigrations() {
731735
732389
  if (feature("TRANSCRIPT_CLASSIFIER")) {
731736
732390
  resetAutoModeOptInForDefaultOffer();
731737
732391
  }
731738
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
731739
732393
  migrateFennecToOpus();
731740
732394
  }
731741
732395
  saveGlobalConfig((prev) => prev.migrationVersion === CURRENT_MIGRATION_VERSION ? prev : {
@@ -731782,7 +732436,7 @@ function startDeferredPrefetches() {
731782
732436
  if (!isBareMode()) {
731783
732437
  skillChangeDetector.initialize();
731784
732438
  }
731785
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
731786
732440
  Promise.resolve().then(() => exports_eventLoopStallDetector).then((m4) => m4.startEventLoopStallDetector());
731787
732441
  }
731788
732442
  }
@@ -732146,7 +732800,7 @@ async function run() {
732146
732800
  }
732147
732801
  profileCheckpoint("preAction_after_settings_sync");
732148
732802
  });
732149
- program2.name("margay").description(`Margay - starts an interactive session by default, use -p/--print for non-interactive output`).argument("[prompt]", "Your prompt", String).helpOption("-h, --help", "Display help for command").option("-d, --debug [filter]", 'Enable debug mode with optional category filtering (e.g., "api,hooks" or "!1p,!file")', (_value) => {
732803
+ program2.name("margay").description(`Margay - starts an interactive session by default, use -p/--print for non-interactive output`).argument("[prompt]", "Your prompt", String).helpOption("-h, --help", "Display help for command").addOption(new Option("--interaction-mode <mode>", "User interaction policy for this session").choices([...INTERACTION_MODES]).default("local")).option("-d, --debug [filter]", 'Enable debug mode with optional category filtering (e.g., "api,hooks" or "!1p,!file")', (_value) => {
732150
732804
  return true;
732151
732805
  }).addOption(new Option("--debug-to-stderr", "Enable debug mode (to stderr)").argParser(Boolean).hideHelp()).option("--debug-file <path>", "Write debug logs to a specific file path (implicitly enables debug mode)", () => true).option("--verbose", "Override verbose mode setting from config", () => true).option("-p, --print", "Print response and exit (useful for pipes). Note: The workspace trust dialog is skipped when CCL is run with the -p mode. Only use this flag in directories you trust.", () => true).option("--bare", "Minimal mode: skip hooks, LSP, plugin sync, attribution, auto-memory, background prefetches, keychain reads, and CCL.md auto-discovery. Sets CLAUDE_CODE_SIMPLE=1. Anthropic auth is strictly ANTHROPIC_API_KEY or apiKeyHelper via --settings (OAuth and keychain are never read). 3P providers (Bedrock/Vertex/Foundry) use their own credentials. Skills still resolve via /skill-name. Explicitly provide context via: --system-prompt[-file], --append-system-prompt[-file], --add-dir (CCL.md dirs), --mcp-config, --settings, --agents, --plugin-dir.", () => true).addOption(new Option("--init", "Run Setup hooks with init trigger, then continue").hideHelp()).addOption(new Option("--init-only", "Run Setup and SessionStart:startup hooks, then exit").hideHelp()).addOption(new Option("--maintenance", "Run Setup hooks with maintenance trigger, then continue").hideHelp()).addOption(new Option("--output-format <format>", 'Output format (only works with --print): "text" (default), "json" (single result), or "stream-json" (realtime streaming)').choices(["text", "json", "stream-json"])).addOption(new Option("--json-schema <schema>", 'JSON Schema for structured output validation. Example: {"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}').argParser(String)).option("--include-hook-events", "Include all hook lifecycle events in the output stream (only works with --output-format=stream-json)", () => true).option("--include-partial-messages", "Include partial message chunks as they arrive (only works with --print and --output-format=stream-json)", () => true).addOption(new Option("--input-format <format>", 'Input format (only works with --print): "text" (default), or "stream-json" (realtime streaming input)').choices(["text", "stream-json"])).option("--mcp-debug", "[DEPRECATED. Use --debug instead] Enable MCP debug mode (shows MCP server errors)", () => true).option("--dangerously-skip-permissions", "Bypass all permission checks. Recommended only for sandboxes with no internet access.", () => true).option("--allow-dangerously-skip-permissions", "Enable bypassing all permission checks as an option, without it being enabled by default. Recommended only for sandboxes with no internet access.", () => true).addOption(new Option("--thinking <mode>", "Thinking mode: enabled (equivalent to adaptive), disabled").choices(["enabled", "adaptive", "disabled"]).hideHelp()).addOption(new Option("--max-thinking-tokens <tokens>", "[DEPRECATED. Use --thinking instead for newer models] Maximum number of thinking tokens (only works with --print)").argParser(Number).hideHelp()).addOption(new Option("--max-turns <turns>", "Maximum number of agentic turns in non-interactive mode (only works with --print). Default 70; use 0 for unlimited. Also settable via CCL_PRINT_MAX_TURNS env.").argParser(Number)).addOption(new Option("--max-budget-usd <amount>", "Maximum dollar amount to spend on API calls (only works with --print)").argParser((value) => {
732152
732806
  const amount = Number(value);
@@ -732278,9 +732932,9 @@ async function run() {
732278
732932
  const initOnly = options.initOnly ?? false;
732279
732933
  const maintenance = options.maintenance ?? false;
732280
732934
  const disableSlashCommands = options.disableSlashCommands || false;
732281
- const tasksOption = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && options.tasks;
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;
732282
732936
  const taskListId = tasksOption ? typeof tasksOption === "string" ? tasksOption : DEFAULT_TASKS_MODE_TASK_LIST_ID : undefined;
732283
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && taskListId) {
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) {
732284
732938
  process.env.CLAUDE_CODE_TASK_LIST_ID = taskListId;
732285
732939
  }
732286
732940
  const worktreeOption = isWorktreeModeEnabled() ? options.worktree : undefined;
@@ -732402,6 +733056,7 @@ ${getTmuxInstallInstructions2()}
732402
733056
  fileDownloadPromise = downloadSessionFiles(files2, config2);
732403
733057
  }
732404
733058
  }
733059
+ const interactionMode = parseInteractionMode(options.interactionMode);
732405
733060
  const isNonInteractiveSession = getIsNonInteractiveSession();
732406
733061
  if (fallbackModel && options.model && fallbackModel === options.model) {
732407
733062
  process.stderr.write(source_default.red(`Error: Fallback model cannot be the same as the main model. Please specify a different model for --fallback-model.
@@ -732565,7 +733220,7 @@ ${formattedErrors}
732565
733220
  }
732566
733221
  const chromeOpts = options;
732567
733222
  setChromeFlagOverride(chromeOpts.chrome);
732568
- const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" || isClaudeAISubscriber());
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());
732569
733224
  const autoEnableClaudeInChrome = !enableClaudeInChrome && shouldAutoEnableClaudeInChrome();
732570
733225
  if (enableClaudeInChrome) {
732571
733226
  const platform6 = getPlatform();
@@ -732738,7 +733393,7 @@ ${hint}` : hint;
732738
733393
  dangerousPermissions,
732739
733394
  overlyBroadBashPermissions
732740
733395
  } = initResult;
732741
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && overlyBroadBashPermissions.length > 0) {
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) {
732742
733397
  for (const permission of overlyBroadBashPermissions) {
732743
733398
  logForDebugging(`Ignoring overly broad shell permission ${permission.ruleDisplay} from ${permission.sourceDisplay}`);
732744
733399
  }
@@ -732805,12 +733460,12 @@ ${hint}` : hint;
732805
733460
  let inputPrompt = await getInputPrompt(effectivePrompt, inputFormat ?? "text");
732806
733461
  profileCheckpoint("action_after_input_prompt");
732807
733462
  maybeActivateProactive(options);
732808
- let tools = getTools(toolPermissionContext);
733463
+ let tools = filterToolsForInteractionMode(getTools(toolPermissionContext), interactionMode);
732809
733464
  if (feature("COORDINATOR_MODE") && isEnvTruthy(process.env.CLAUDE_CODE_COORDINATOR_MODE)) {
732810
733465
  const {
732811
733466
  applyCoordinatorToolFilter: applyCoordinatorToolFilter2
732812
733467
  } = await Promise.resolve().then(() => (init_toolPool(), exports_toolPool));
732813
- tools = applyCoordinatorToolFilter2(tools);
733468
+ tools = [...applyCoordinatorToolFilter2(tools)];
732814
733469
  }
732815
733470
  profileCheckpoint("action_tools_loaded");
732816
733471
  let jsonSchema;
@@ -732870,7 +733525,7 @@ ${hint}` : hint;
732870
733525
  cacheSessionTitle(sessionNameArg);
732871
733526
  }
732872
733527
  const explicitModel = options.model || process.env.ANTHROPIC_MODEL;
732873
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && explicitModel && explicitModel !== "default" && !hasGrowthBookEnvOverride("tengu_ant_model_override") && getGlobalConfig().cachedGrowthBookFeatures?.["tengu_ant_model_override"] == null) {
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) {
732874
733529
  await initializeGrowthBook();
732875
733530
  }
732876
733531
  const userSpecifiedModel = options.model === "default" ? getDefaultMainLoopModel() : options.model;
@@ -732991,7 +733646,7 @@ ${inputPrompt}` : mainThreadAgentDefinition.initialPrompt;
732991
733646
  }
732992
733647
  if (customAgent.memory) {
732993
733648
  logEvent("tengu_agent_memory_loaded", {
732994
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" && {
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" && {
732995
733650
  agent_type: customAgent.agentType
732996
733651
  },
732997
733652
  scope: customAgent.memory,
@@ -733039,6 +733694,7 @@ ${proactivePrompt}` : proactivePrompt;
733039
733694
 
733040
733695
  ${assistantAddendum}` : assistantAddendum;
733041
733696
  }
733697
+ appendSystemPrompt = appendInteractionGuidance(appendSystemPrompt, interactionMode);
733042
733698
  let root;
733043
733699
  let getFpsMetrics;
733044
733700
  let stats2;
@@ -733046,7 +733702,7 @@ ${assistantAddendum}` : assistantAddendum;
733046
733702
  const ctx = getRenderContext(false);
733047
733703
  getFpsMetrics = ctx.getFpsMetrics;
733048
733704
  stats2 = ctx.stats;
733049
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
733050
733706
  installAsciicastRecorder();
733051
733707
  }
733052
733708
  const {
@@ -733234,7 +733890,7 @@ ${inputPrompt}` : mergePrompt;
733234
733890
  }
733235
733891
  }
733236
733892
  logForDiagnosticsNoPII("info", "started", {
733237
- version: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
733238
733894
  is_native_binary: isInBundledMode()
733239
733895
  });
733240
733896
  registerCleanup(async () => {
@@ -733467,7 +734123,7 @@ ${inputPrompt}` : mergePrompt;
733467
734123
  if (!isBareMode()) {
733468
734124
  startDeferredPrefetches();
733469
734125
  Promise.resolve().then(() => (init_backgroundHousekeeping(), exports_backgroundHousekeeping)).then((m4) => m4.startBackgroundHousekeeping());
733470
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
733471
734127
  Promise.resolve().then(() => exports_sdkHeapDumpMonitor).then((m4) => m4.startSdkMemoryMonitor());
733472
734128
  }
733473
734129
  }
@@ -733506,7 +734162,8 @@ ${inputPrompt}` : mergePrompt;
733506
734162
  agent: agentCli,
733507
734163
  workload: options.workload,
733508
734164
  setupTrigger: setupTrigger ?? undefined,
733509
- sessionStartHooksPromise
734165
+ sessionStartHooksPromise,
734166
+ interactionMode
733510
734167
  });
733511
734168
  return;
733512
734169
  }
@@ -733679,7 +734336,7 @@ ${inputPrompt}` : mergePrompt;
733679
734336
  logStartupTelemetry();
733680
734337
  logSessionTelemetry();
733681
734338
  });
733682
- const sessionUploaderPromise = { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? Promise.resolve().then(() => exports_sessionDataUploader) : null;
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;
733683
734340
  const uploaderReady = sessionUploaderPromise ? sessionUploaderPromise.then((mod4) => mod4.createSessionTurnUploader()).catch(() => null) : null;
733684
734341
  const sessionConfig = {
733685
734342
  debug: debug5 || debugToStderr,
@@ -733693,6 +734350,7 @@ ${inputPrompt}` : mergePrompt;
733693
734350
  strictMcpConfig,
733694
734351
  systemPrompt,
733695
734352
  appendSystemPrompt,
734353
+ interactionMode,
733696
734354
  taskListId,
733697
734355
  thinkingConfig,
733698
734356
  ...uploaderReady && {
@@ -733822,7 +734480,7 @@ Session: ${directConnectConfig.sessionId}`, "info");
733822
734480
  sshSession = await createSSHSession2({
733823
734481
  host: _pendingSSH.host,
733824
734482
  cwd: _pendingSSH.cwd,
733825
- localVersion: { USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION,
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,
733826
734484
  permissionMode: _pendingSSH.permissionMode,
733827
734485
  dangerouslySkipPermissions: _pendingSSH.dangerouslySkipPermissions,
733828
734486
  extraCliArgs: _pendingSSH.extraCliArgs
@@ -734124,7 +734782,7 @@ Usage: margay --remote "your task description"`, () => gracefulShutdown(1));
734124
734782
  }
734125
734783
  }
734126
734784
  }
734127
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
734128
734786
  if (options.resume && typeof options.resume === "string" && !maybeSessionId) {
734129
734787
  const {
734130
734788
  parseCcshareId: parseCcshareId2,
@@ -734327,13 +734985,13 @@ Usage: margay --remote "your task description"`, () => gracefulShutdown(1));
734327
734985
  pendingHookMessages
734328
734986
  }, renderAndRun);
734329
734987
  }
734330
- }).version(`${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} (CCL)`, "-v, --version", "Output the version number");
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");
734331
734989
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
734332
734990
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
734333
734991
  if (canUserConfigureAdvisor()) {
734334
734992
  program2.addOption(new Option("--advisor <model>", "Enable the server-side advisor tool with the specified model (alias or full ID).").hideHelp());
734335
734993
  }
734336
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
734337
734995
  program2.addOption(new Option("--delegate-permissions", "[ANT-ONLY] Alias for --permission-mode auto.").implies({
734338
734996
  permissionMode: "auto"
734339
734997
  }));
@@ -734737,7 +735395,7 @@ Omit sessionId to discover and pick from available sessions.
734737
735395
  } = await Promise.resolve().then(() => (init_update(), exports_update));
734738
735396
  await update2();
734739
735397
  });
734740
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
734741
735399
  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 () => {
734742
735400
  const {
734743
735401
  up: up2
@@ -734745,7 +735403,7 @@ Omit sessionId to discover and pick from available sessions.
734745
735403
  await up2();
734746
735404
  });
734747
735405
  }
734748
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
734749
735407
  program2.command("rollback [target]").description(`[ANT-ONLY] Roll back to a previous release
734750
735408
 
734751
735409
  Examples:
@@ -734764,7 +735422,7 @@ Examples:
734764
735422
  } = await Promise.resolve().then(() => (init_util(), exports_util));
734765
735423
  await installHandler2(target, options);
734766
735424
  });
734767
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
734768
735426
  const validateLogId = (value) => {
734769
735427
  const maybeSessionId = validateUuid2(value);
734770
735428
  if (maybeSessionId)
@@ -734794,7 +735452,7 @@ Examples:
734794
735452
  } = await Promise.resolve().then(() => exports_ant);
734795
735453
  await exportHandler2(source, outputFile);
734796
735454
  });
734797
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant") {
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") {
734798
735456
  const taskCmd = program2.command("task").description("[ANT-ONLY] Manage task list tasks");
734799
735457
  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) => {
734800
735458
  const {
@@ -734904,7 +735562,7 @@ async function logTenguInit({
734904
735562
  assistantActivationPath
734905
735563
  },
734906
735564
  autoUpdatesChannel: getInitialSettings().autoUpdatesChannel ?? "latest",
734907
- ...{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE === "ant" ? (() => {
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" ? (() => {
734908
735566
  const cwd5 = getCwd();
734909
735567
  const gitRoot = findGitRoot(cwd5);
734910
735568
  const rp = gitRoot ? relative39(gitRoot, cwd5) || "." : undefined;
@@ -734991,6 +735649,7 @@ var init_main2 = __esm(() => {
734991
735649
  init_workflow_run();
734992
735650
  init_cwdGlobal();
734993
735651
  init_tools2();
735652
+ init_interactionPolicy();
734994
735653
  init_advisor();
734995
735654
  init_agentSwarmsEnabled();
734996
735655
  init_asciicast();
@@ -735126,7 +735785,7 @@ var init_main2 = __esm(() => {
735126
735785
  kairosGate = feature("KAIROS") ? __toCommonJS(exports_gate) : null;
735127
735786
  autoModeStateModule7 = feature("TRANSCRIPT_CLASSIFIER") ? __toCommonJS(exports_autoModeState) : null;
735128
735787
  profileCheckpoint("main_tsx_imports_loaded");
735129
- if ({ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.USER_TYPE !== "ant" && isBeingDebugged()) {
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()) {
735130
735789
  process.exit(1);
735131
735790
  }
735132
735791
  _pendingConnect = feature("DIRECT_CONNECT") ? {
@@ -735233,7 +735892,7 @@ if (feature("ABLATION_BASELINE") && process.env.CLAUDE_CODE_ABLATION_BASELINE) {
735233
735892
  async function main2() {
735234
735893
  const args = process.argv.slice(2);
735235
735894
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
735236
- console.log(`${{ USER_TYPE: "external", VERSION: "1.3.5-rc.7", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-08-31T01:56:22.474Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.5-rc.7" }.VERSION} (Margay)`);
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)`);
735237
735896
  return;
735238
735897
  }
735239
735898
  const {