@margay/ccl-core 1.3.6-alpha.2 → 1.3.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/cli.js +1080 -635
- 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.6-
|
|
119
|
+
version: "1.3.6-beta.0",
|
|
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",
|
|
@@ -162503,7 +162503,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
|
|
|
162503
162503
|
if (isApiKeyHelperFromProjectOrLocalSettings()) {
|
|
162504
162504
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
162505
162505
|
if (!hasTrust && !isNonInteractiveSession) {
|
|
162506
|
-
const error5 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
162506
|
+
const error5 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.FEEDBACK_CHANNEL}.`);
|
|
162507
162507
|
logAntError("apiKeyHelper invoked before trust check", error5);
|
|
162508
162508
|
logEvent("tengu_apiKeyHelper_missing_trust11", {});
|
|
162509
162509
|
return null;
|
|
@@ -162547,7 +162547,7 @@ async function runAwsAuthRefresh() {
|
|
|
162547
162547
|
if (isAwsAuthRefreshFromProjectSettings()) {
|
|
162548
162548
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
162549
162549
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
162550
|
-
const error5 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
162550
|
+
const error5 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.FEEDBACK_CHANNEL}.`);
|
|
162551
162551
|
logAntError("awsAuthRefresh invoked before trust check", error5);
|
|
162552
162552
|
logEvent("tengu_awsAuthRefresh_missing_trust", {});
|
|
162553
162553
|
return false;
|
|
@@ -162607,7 +162607,7 @@ async function getAwsCredsFromCredentialExport() {
|
|
|
162607
162607
|
if (isAwsCredentialExportFromProjectSettings()) {
|
|
162608
162608
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
162609
162609
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
162610
|
-
const error5 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
162610
|
+
const error5 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.FEEDBACK_CHANNEL}.`);
|
|
162611
162611
|
logAntError("awsCredentialExport invoked before trust check", error5);
|
|
162612
162612
|
logEvent("tengu_awsCredentialExport_missing_trust", {});
|
|
162613
162613
|
return null;
|
|
@@ -162692,7 +162692,7 @@ async function runGcpAuthRefresh() {
|
|
|
162692
162692
|
if (isGcpAuthRefreshFromProjectSettings()) {
|
|
162693
162693
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
162694
162694
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
162695
|
-
const error5 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
162695
|
+
const error5 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.FEEDBACK_CHANNEL}.`);
|
|
162696
162696
|
logAntError("gcpAuthRefresh invoked before trust check", error5);
|
|
162697
162697
|
logEvent("tengu_gcpAuthRefresh_missing_trust", {});
|
|
162698
162698
|
return false;
|
|
@@ -163402,7 +163402,7 @@ var init_auth2 = __esm(() => {
|
|
|
163402
163402
|
|
|
163403
163403
|
// utils/userAgent.ts
|
|
163404
163404
|
function getClaudeCodeUserAgent() {
|
|
163405
|
-
return `claude-code/${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
163405
|
+
return `claude-code/${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION}`;
|
|
163406
163406
|
}
|
|
163407
163407
|
|
|
163408
163408
|
// utils/workloadContext.ts
|
|
@@ -163424,7 +163424,7 @@ function getUserAgent() {
|
|
|
163424
163424
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
163425
163425
|
const workload = getWorkload();
|
|
163426
163426
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
163427
|
-
return `claude-cli/${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
163427
|
+
return `claude-cli/${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
163428
163428
|
}
|
|
163429
163429
|
function getMCPUserAgent() {
|
|
163430
163430
|
const parts = [];
|
|
@@ -163438,7 +163438,7 @@ function getMCPUserAgent() {
|
|
|
163438
163438
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
163439
163439
|
}
|
|
163440
163440
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
163441
|
-
return `claude-code/${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
163441
|
+
return `claude-code/${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION}${suffix}`;
|
|
163442
163442
|
}
|
|
163443
163443
|
function getWebFetchUserAgent() {
|
|
163444
163444
|
return `Claude-User (${getClaudeCodeUserAgent()}; +https://support.anthropic.com/)`;
|
|
@@ -163576,7 +163576,7 @@ var init_user = __esm(() => {
|
|
|
163576
163576
|
deviceId,
|
|
163577
163577
|
sessionId: getSessionId(),
|
|
163578
163578
|
email: getEmail(),
|
|
163579
|
-
appVersion: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
163579
|
+
appVersion: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
163580
163580
|
platform: getHostPlatformForAnalytics(),
|
|
163581
163581
|
organizationUuid,
|
|
163582
163582
|
accountUuid,
|
|
@@ -171273,7 +171273,7 @@ var init_metadata = __esm(() => {
|
|
|
171273
171273
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
171274
171274
|
WHITESPACE_REGEX = /\s+/;
|
|
171275
171275
|
getVersionBase = memoize20(() => {
|
|
171276
|
-
const match = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
171276
|
+
const match = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
171277
171277
|
return match ? match[0] : undefined;
|
|
171278
171278
|
});
|
|
171279
171279
|
buildEnvContext = memoize20(async () => {
|
|
@@ -171313,9 +171313,9 @@ var init_metadata = __esm(() => {
|
|
|
171313
171313
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
171314
171314
|
isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
|
|
171315
171315
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
171316
|
-
version: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
171316
|
+
version: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
171317
171317
|
versionBase: getVersionBase(),
|
|
171318
|
-
buildTime: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
171318
|
+
buildTime: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.BUILD_TIME,
|
|
171319
171319
|
deploymentEnvironment: env4.detectDeploymentEnvironment(),
|
|
171320
171320
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
171321
171321
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -171982,7 +171982,7 @@ function initialize1PEventLogging() {
|
|
|
171982
171982
|
const platform2 = getPlatform();
|
|
171983
171983
|
const attributes = {
|
|
171984
171984
|
[import_semantic_conventions.ATTR_SERVICE_NAME]: "claude-code",
|
|
171985
|
-
[import_semantic_conventions.ATTR_SERVICE_VERSION]: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
171985
|
+
[import_semantic_conventions.ATTR_SERVICE_VERSION]: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
171986
171986
|
};
|
|
171987
171987
|
if (platform2 === "wsl") {
|
|
171988
171988
|
const wslVersion = getWslVersion();
|
|
@@ -172009,7 +172009,7 @@ function initialize1PEventLogging() {
|
|
|
172009
172009
|
})
|
|
172010
172010
|
]
|
|
172011
172011
|
});
|
|
172012
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.6-
|
|
172012
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION);
|
|
172013
172013
|
}
|
|
172014
172014
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
172015
172015
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -172611,6 +172611,7 @@ var init_growthbook = __esm(() => {
|
|
|
172611
172611
|
});
|
|
172612
172612
|
BOOLEAN_GROWTHBOOK_GATES_KEPT_OFF = new Set([
|
|
172613
172613
|
"tengu_cobalt_raccoon",
|
|
172614
|
+
"tengu_paper_halyard",
|
|
172614
172615
|
"tengu_amber_quartz_disabled",
|
|
172615
172616
|
"tengu_disable_bypass_permissions_mode",
|
|
172616
172617
|
"tengu_miraculo_the_bard",
|
|
@@ -200887,14 +200888,14 @@ function decideChannel(input) {
|
|
|
200887
200888
|
const isNonClaudeModel = !!(input.model && !input.model.startsWith("claude-") && input.model !== "claude");
|
|
200888
200889
|
const isClaudeModel = !!(input.model?.startsWith("claude") || input.model === "claude");
|
|
200889
200890
|
const hasLocalAuth = input.isSubscriber || input.hasLocalClaudeDirectAuth;
|
|
200890
|
-
const isClaudeViaGateway = !!(isClaudeModel &&
|
|
200891
|
+
const isClaudeViaGateway = !!(isClaudeModel && (input.hasCapabilityContext || !hasLocalAuth) && input.hasGatewayConfig);
|
|
200891
200892
|
const gateway = !!(input.hasGatewayConfig && input.gatewayHasKey && (isNonClaudeModel || isClaudeViaGateway));
|
|
200892
200893
|
if (gateway) {
|
|
200893
200894
|
return {
|
|
200894
200895
|
channel: "gateway",
|
|
200895
200896
|
isNonClaudeModel,
|
|
200896
200897
|
isClaudeViaGateway,
|
|
200897
|
-
reason: isNonClaudeModel ? "non-Claude model → gateway" : "Claude model without local auth → gateway (gateway holds Anthropic key)"
|
|
200898
|
+
reason: input.hasCapabilityContext ? "Gateway capability binding → gateway" : isNonClaudeModel ? "non-Claude model → gateway" : "Claude model without local auth → gateway (gateway holds Anthropic key)"
|
|
200898
200899
|
};
|
|
200899
200900
|
}
|
|
200900
200901
|
return {
|
|
@@ -200929,7 +200930,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
200929
200930
|
if (!isAttributionHeaderEnabled()) {
|
|
200930
200931
|
return "";
|
|
200931
200932
|
}
|
|
200932
|
-
const version4 = `${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
200933
|
+
const version4 = `${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION}.${fingerprint}`;
|
|
200933
200934
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
200934
200935
|
const cch = "";
|
|
200935
200936
|
const workload = getWorkload();
|
|
@@ -211561,18 +211562,12 @@ async function getMemoryFilesForNestedDirectory(dir, targetPath, processedPaths)
|
|
|
211561
211562
|
if (isSettingSourceEnabled("projectSettings")) {
|
|
211562
211563
|
const cclPath = join32(dir, "CCL.md");
|
|
211563
211564
|
result.push(...await processMemoryFile(cclPath, "Project", processedPaths, false));
|
|
211564
|
-
const projectPath = join32(dir, "CLAUDE.md");
|
|
211565
|
-
result.push(...await processMemoryFile(projectPath, "Project", processedPaths, false));
|
|
211566
211565
|
const dotCclCclPath = join32(dir, PROJECT_CONFIG_DIR, "CCL.md");
|
|
211567
211566
|
result.push(...await processMemoryFile(dotCclCclPath, "Project", processedPaths, false));
|
|
211568
|
-
const dotClaudePath = join32(dir, PROJECT_CONFIG_DIR, "CLAUDE.md");
|
|
211569
|
-
result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, false));
|
|
211570
211567
|
}
|
|
211571
211568
|
if (isSettingSourceEnabled("localSettings")) {
|
|
211572
211569
|
const cclLocalPath = join32(dir, "CCL.local.md");
|
|
211573
211570
|
result.push(...await processMemoryFile(cclLocalPath, "Local", processedPaths, false));
|
|
211574
|
-
const localPath = join32(dir, "CLAUDE.local.md");
|
|
211575
|
-
result.push(...await processMemoryFile(localPath, "Local", processedPaths, false));
|
|
211576
211571
|
}
|
|
211577
211572
|
const rulesDir = join32(dir, PROJECT_CONFIG_DIR, "rules");
|
|
211578
211573
|
const unconditionalProcessedPaths = new Set(processedPaths);
|
|
@@ -211583,16 +211578,7 @@ async function getMemoryFilesForNestedDirectory(dir, targetPath, processedPaths)
|
|
|
211583
211578
|
includeExternal: false,
|
|
211584
211579
|
conditionalRule: false
|
|
211585
211580
|
}));
|
|
211586
|
-
const oldRulesDir = join32(dir, ".claude", "rules");
|
|
211587
|
-
result.push(...await processMdRules({
|
|
211588
|
-
rulesDir: oldRulesDir,
|
|
211589
|
-
type: "Project",
|
|
211590
|
-
processedPaths: unconditionalProcessedPaths,
|
|
211591
|
-
includeExternal: false,
|
|
211592
|
-
conditionalRule: false
|
|
211593
|
-
}));
|
|
211594
211581
|
result.push(...await processConditionedMdRules(targetPath, rulesDir, "Project", processedPaths, false));
|
|
211595
|
-
result.push(...await processConditionedMdRules(targetPath, oldRulesDir, "Project", processedPaths, false));
|
|
211596
211582
|
for (const path10 of unconditionalProcessedPaths) {
|
|
211597
211583
|
processedPaths.add(path10);
|
|
211598
211584
|
}
|
|
@@ -211602,8 +211588,6 @@ async function getConditionalRulesForCwdLevelDirectory(dir, targetPath, processe
|
|
|
211602
211588
|
const result = [];
|
|
211603
211589
|
const rulesDir = join32(dir, PROJECT_CONFIG_DIR, "rules");
|
|
211604
211590
|
result.push(...await processConditionedMdRules(targetPath, rulesDir, "Project", processedPaths, false));
|
|
211605
|
-
const oldRulesDir = join32(dir, ".claude", "rules");
|
|
211606
|
-
result.push(...await processConditionedMdRules(targetPath, oldRulesDir, "Project", processedPaths, false));
|
|
211607
211591
|
return result;
|
|
211608
211592
|
}
|
|
211609
211593
|
async function processConditionedMdRules(targetPath, rulesDir, type, processedPaths, includeExternal) {
|
|
@@ -211650,15 +211634,9 @@ function isMemoryFilePath(filePath) {
|
|
|
211650
211634
|
if (name2 === "CCL.md" || name2 === "CCL.local.md") {
|
|
211651
211635
|
return true;
|
|
211652
211636
|
}
|
|
211653
|
-
if (name2 === "CLAUDE.md" || name2 === "CLAUDE.local.md") {
|
|
211654
|
-
return true;
|
|
211655
|
-
}
|
|
211656
211637
|
if (name2.endsWith(".md") && filePath.includes(`${sep6}.ccl${sep6}rules${sep6}`)) {
|
|
211657
211638
|
return true;
|
|
211658
211639
|
}
|
|
211659
|
-
if (name2.endsWith(".md") && filePath.includes(`${sep6}.claude${sep6}rules${sep6}`)) {
|
|
211660
|
-
return true;
|
|
211661
|
-
}
|
|
211662
211640
|
return false;
|
|
211663
211641
|
}
|
|
211664
211642
|
function getAllMemoryFilePaths(files, readFileState) {
|
|
@@ -211880,12 +211858,8 @@ var init_claudemd = __esm(() => {
|
|
|
211880
211858
|
if (isSettingSourceEnabled("projectSettings") && !skipProject) {
|
|
211881
211859
|
const cclPath = join32(dir, "CCL.md");
|
|
211882
211860
|
result.push(...await processMemoryFile(cclPath, "Project", processedPaths, includeExternal));
|
|
211883
|
-
const projectPath = join32(dir, "CLAUDE.md");
|
|
211884
|
-
result.push(...await processMemoryFile(projectPath, "Project", processedPaths, includeExternal));
|
|
211885
211861
|
const dotCclCclPath = join32(dir, PROJECT_CONFIG_DIR, "CCL.md");
|
|
211886
211862
|
result.push(...await processMemoryFile(dotCclCclPath, "Project", processedPaths, includeExternal));
|
|
211887
|
-
const dotClaudePath = join32(dir, PROJECT_CONFIG_DIR, "CLAUDE.md");
|
|
211888
|
-
result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, includeExternal));
|
|
211889
211863
|
const rulesDir = join32(dir, PROJECT_CONFIG_DIR, "rules");
|
|
211890
211864
|
result.push(...await processMdRules({
|
|
211891
211865
|
rulesDir,
|
|
@@ -211894,20 +211868,10 @@ var init_claudemd = __esm(() => {
|
|
|
211894
211868
|
includeExternal,
|
|
211895
211869
|
conditionalRule: false
|
|
211896
211870
|
}));
|
|
211897
|
-
const oldRulesDir = join32(dir, ".claude", "rules");
|
|
211898
|
-
result.push(...await processMdRules({
|
|
211899
|
-
rulesDir: oldRulesDir,
|
|
211900
|
-
type: "Project",
|
|
211901
|
-
processedPaths,
|
|
211902
|
-
includeExternal,
|
|
211903
|
-
conditionalRule: false
|
|
211904
|
-
}));
|
|
211905
211871
|
}
|
|
211906
211872
|
if (isSettingSourceEnabled("localSettings")) {
|
|
211907
211873
|
const cclLocalPath = join32(dir, "CCL.local.md");
|
|
211908
211874
|
result.push(...await processMemoryFile(cclLocalPath, "Local", processedPaths, includeExternal));
|
|
211909
|
-
const localPath = join32(dir, "CLAUDE.local.md");
|
|
211910
|
-
result.push(...await processMemoryFile(localPath, "Local", processedPaths, includeExternal));
|
|
211911
211875
|
}
|
|
211912
211876
|
}
|
|
211913
211877
|
if (isEnvTruthy(process.env.CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD)) {
|
|
@@ -211915,12 +211879,8 @@ var init_claudemd = __esm(() => {
|
|
|
211915
211879
|
for (const dir of additionalDirs) {
|
|
211916
211880
|
const cclPath = join32(dir, "CCL.md");
|
|
211917
211881
|
result.push(...await processMemoryFile(cclPath, "Project", processedPaths, includeExternal));
|
|
211918
|
-
const projectPath = join32(dir, "CLAUDE.md");
|
|
211919
|
-
result.push(...await processMemoryFile(projectPath, "Project", processedPaths, includeExternal));
|
|
211920
211882
|
const dotCclCclPath = join32(dir, PROJECT_CONFIG_DIR, "CCL.md");
|
|
211921
211883
|
result.push(...await processMemoryFile(dotCclCclPath, "Project", processedPaths, includeExternal));
|
|
211922
|
-
const dotClaudePath = join32(dir, PROJECT_CONFIG_DIR, "CLAUDE.md");
|
|
211923
|
-
result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, includeExternal));
|
|
211924
211884
|
const rulesDir = join32(dir, PROJECT_CONFIG_DIR, "rules");
|
|
211925
211885
|
result.push(...await processMdRules({
|
|
211926
211886
|
rulesDir,
|
|
@@ -211929,14 +211889,6 @@ var init_claudemd = __esm(() => {
|
|
|
211929
211889
|
includeExternal,
|
|
211930
211890
|
conditionalRule: false
|
|
211931
211891
|
}));
|
|
211932
|
-
const oldRulesDir = join32(dir, ".claude", "rules");
|
|
211933
|
-
result.push(...await processMdRules({
|
|
211934
|
-
rulesDir: oldRulesDir,
|
|
211935
|
-
type: "Project",
|
|
211936
|
-
processedPaths,
|
|
211937
|
-
includeExternal,
|
|
211938
|
-
conditionalRule: false
|
|
211939
|
-
}));
|
|
211940
211892
|
}
|
|
211941
211893
|
}
|
|
211942
211894
|
if (isAutoMemoryEnabled()) {
|
|
@@ -233150,7 +233102,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
|
|
|
233150
233102
|
}
|
|
233151
233103
|
function getFeedbackGuideline() {
|
|
233152
233104
|
if (isUsing3PServices()) {
|
|
233153
|
-
return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
233105
|
+
return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.ISSUES_EXPLAINER}`;
|
|
233154
233106
|
}
|
|
233155
233107
|
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";
|
|
233156
233108
|
}
|
|
@@ -233945,7 +233897,7 @@ Use the literal string \`VERDICT: \` followed by exactly one of \`PASS\`, \`FAIL
|
|
|
233945
233897
|
|
|
233946
233898
|
// services/api/gatewayTransport.ts
|
|
233947
233899
|
function getCclGatewayUA(model) {
|
|
233948
|
-
return model ? `ccl/${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
233900
|
+
return model ? `ccl/${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} (${model})` : `ccl/${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION}`;
|
|
233949
233901
|
}
|
|
233950
233902
|
function normalizeGatewayRequestId(value) {
|
|
233951
233903
|
if (typeof value !== "string" || value.length === 0 || value.length > 128) {
|
|
@@ -234470,6 +234422,160 @@ var init_gatewayTransport = __esm(() => {
|
|
|
234470
234422
|
};
|
|
234471
234423
|
});
|
|
234472
234424
|
|
|
234425
|
+
// services/api/boundedOperation.ts
|
|
234426
|
+
function boundedOperationPolicy(totalMs) {
|
|
234427
|
+
return {
|
|
234428
|
+
deadlineAtMs: Date.now() + totalMs,
|
|
234429
|
+
firstEventTimeoutMs: 300000,
|
|
234430
|
+
idleDataTimeoutMs: 300000,
|
|
234431
|
+
waitingIntervalMs: 30000
|
|
234432
|
+
};
|
|
234433
|
+
}
|
|
234434
|
+
|
|
234435
|
+
class BoundedOperation {
|
|
234436
|
+
caller;
|
|
234437
|
+
policy;
|
|
234438
|
+
onActivity;
|
|
234439
|
+
controller = new AbortController;
|
|
234440
|
+
signal = this.controller.signal;
|
|
234441
|
+
startedAt = Date.now();
|
|
234442
|
+
dataAt;
|
|
234443
|
+
timer;
|
|
234444
|
+
waiting;
|
|
234445
|
+
disposed = false;
|
|
234446
|
+
onAbort = () => this.controller.abort(new DOMException("Operation cancelled", "AbortError"));
|
|
234447
|
+
constructor(caller, policy, onActivity) {
|
|
234448
|
+
this.caller = caller;
|
|
234449
|
+
this.policy = policy;
|
|
234450
|
+
this.onActivity = onActivity;
|
|
234451
|
+
if (caller.aborted)
|
|
234452
|
+
this.onAbort();
|
|
234453
|
+
else
|
|
234454
|
+
caller.addEventListener("abort", this.onAbort, { once: true });
|
|
234455
|
+
this.arm();
|
|
234456
|
+
if (!this.signal.aborted && onActivity) {
|
|
234457
|
+
this.waiting = setInterval(() => {
|
|
234458
|
+
if (!this.disposed && !this.signal.aborted)
|
|
234459
|
+
onActivity({ kind: "waiting", elapsedMs: Date.now() - this.startedAt });
|
|
234460
|
+
}, policy.waitingIntervalMs);
|
|
234461
|
+
}
|
|
234462
|
+
}
|
|
234463
|
+
check() {
|
|
234464
|
+
if (this.caller.aborted)
|
|
234465
|
+
throw new DOMException("Operation cancelled", "AbortError");
|
|
234466
|
+
if (Date.now() >= this.policy.deadlineAtMs)
|
|
234467
|
+
this.controller.abort(new BoundedOperationTimeoutError("total"));
|
|
234468
|
+
const dataDeadline = this.dataAt === undefined ? this.startedAt + this.policy.firstEventTimeoutMs : this.dataAt + this.policy.idleDataTimeoutMs;
|
|
234469
|
+
if (!this.signal.aborted && Date.now() >= dataDeadline) {
|
|
234470
|
+
this.controller.abort(new BoundedOperationTimeoutError(this.dataAt === undefined ? "first_event" : "idle_data"));
|
|
234471
|
+
}
|
|
234472
|
+
if (this.signal.aborted)
|
|
234473
|
+
throw this.signal.reason;
|
|
234474
|
+
}
|
|
234475
|
+
data() {
|
|
234476
|
+
if (this.disposed)
|
|
234477
|
+
return;
|
|
234478
|
+
this.check();
|
|
234479
|
+
this.dataAt = Date.now();
|
|
234480
|
+
this.arm();
|
|
234481
|
+
this.onActivity?.({ kind: "data", elapsedMs: Date.now() - this.startedAt });
|
|
234482
|
+
}
|
|
234483
|
+
arm() {
|
|
234484
|
+
if (this.timer)
|
|
234485
|
+
clearTimeout(this.timer);
|
|
234486
|
+
if (this.disposed || this.signal.aborted)
|
|
234487
|
+
return;
|
|
234488
|
+
const idleAt = this.dataAt === undefined ? this.startedAt + this.policy.firstEventTimeoutMs : this.dataAt + this.policy.idleDataTimeoutMs;
|
|
234489
|
+
const total = this.policy.deadlineAtMs <= idleAt;
|
|
234490
|
+
const remaining = Math.min(this.policy.deadlineAtMs, idleAt) - Date.now();
|
|
234491
|
+
const expire = () => this.controller.abort(new BoundedOperationTimeoutError(total ? "total" : this.dataAt === undefined ? "first_event" : "idle_data"));
|
|
234492
|
+
if (remaining <= 0)
|
|
234493
|
+
expire();
|
|
234494
|
+
else
|
|
234495
|
+
this.timer = setTimeout(expire, remaining);
|
|
234496
|
+
}
|
|
234497
|
+
async wait(start) {
|
|
234498
|
+
this.check();
|
|
234499
|
+
let abort;
|
|
234500
|
+
const interrupted = new Promise((_3, reject) => {
|
|
234501
|
+
abort = () => reject(this.caller.aborted ? new DOMException("Operation cancelled", "AbortError") : this.signal.reason);
|
|
234502
|
+
this.signal.addEventListener("abort", abort, { once: true });
|
|
234503
|
+
});
|
|
234504
|
+
try {
|
|
234505
|
+
const value = await Promise.race([start(), interrupted]);
|
|
234506
|
+
this.check();
|
|
234507
|
+
return value;
|
|
234508
|
+
} finally {
|
|
234509
|
+
this.signal.removeEventListener("abort", abort);
|
|
234510
|
+
}
|
|
234511
|
+
}
|
|
234512
|
+
dispose() {
|
|
234513
|
+
this.disposed = true;
|
|
234514
|
+
clearTimeout(this.timer);
|
|
234515
|
+
clearInterval(this.waiting);
|
|
234516
|
+
this.caller.removeEventListener("abort", this.onAbort);
|
|
234517
|
+
}
|
|
234518
|
+
}
|
|
234519
|
+
function cancelReader(reader) {
|
|
234520
|
+
try {
|
|
234521
|
+
reader.cancel().catch(() => {});
|
|
234522
|
+
} catch {}
|
|
234523
|
+
}
|
|
234524
|
+
async function boundedResponseText(response, operation) {
|
|
234525
|
+
if (!response.body)
|
|
234526
|
+
return "";
|
|
234527
|
+
const reader = response.body.getReader();
|
|
234528
|
+
const decoder = new TextDecoder;
|
|
234529
|
+
let text = "";
|
|
234530
|
+
try {
|
|
234531
|
+
for (;; ) {
|
|
234532
|
+
const { done, value } = await operation.wait(() => reader.read());
|
|
234533
|
+
if (done)
|
|
234534
|
+
return text + decoder.decode();
|
|
234535
|
+
text += decoder.decode(value, { stream: true });
|
|
234536
|
+
}
|
|
234537
|
+
} finally {
|
|
234538
|
+
cancelReader(reader);
|
|
234539
|
+
reader.releaseLock();
|
|
234540
|
+
}
|
|
234541
|
+
}
|
|
234542
|
+
function isAnthropicData(event) {
|
|
234543
|
+
if (!event || typeof event !== "object")
|
|
234544
|
+
return false;
|
|
234545
|
+
switch (event.type) {
|
|
234546
|
+
case "message_start":
|
|
234547
|
+
return event.message?.role === "assistant" || typeof event.message?.model === "string";
|
|
234548
|
+
case "content_block_start":
|
|
234549
|
+
return ["text", "thinking", "redacted_thinking"].includes(event.content_block?.type);
|
|
234550
|
+
case "content_block_delta":
|
|
234551
|
+
return event.delta?.type === "text_delta" && typeof event.delta.text === "string" && event.delta.text.length > 0 || event.delta?.type === "thinking_delta" && typeof event.delta.thinking === "string" && event.delta.thinking.length > 0 || event.delta?.type === "signature_delta" && typeof event.delta.signature === "string" && event.delta.signature.length > 0;
|
|
234552
|
+
case "content_block_stop":
|
|
234553
|
+
return Number.isInteger(event.index) && event.index >= 0;
|
|
234554
|
+
case "message_delta":
|
|
234555
|
+
return typeof event.delta?.stop_reason === "string" || isUsage(event.usage);
|
|
234556
|
+
default:
|
|
234557
|
+
return false;
|
|
234558
|
+
}
|
|
234559
|
+
}
|
|
234560
|
+
function isUsage(value) {
|
|
234561
|
+
return value && typeof value === "object" && ["input_tokens", "output_tokens", "prompt_tokens", "completion_tokens"].some((key) => typeof value[key] === "number" && Number.isFinite(value[key]) && value[key] >= 0);
|
|
234562
|
+
}
|
|
234563
|
+
function isOpenAIData(event) {
|
|
234564
|
+
return isUsage(event?.usage) || Array.isArray(event?.choices) && event.choices.some((choice) => typeof choice?.finish_reason === "string" || ["content", "reasoning", "reasoning_content"].some((key) => typeof choice?.delta?.[key] === "string" && choice.delta[key].length > 0));
|
|
234565
|
+
}
|
|
234566
|
+
var BoundedOperationTimeoutError;
|
|
234567
|
+
var init_boundedOperation = __esm(() => {
|
|
234568
|
+
BoundedOperationTimeoutError = class BoundedOperationTimeoutError extends Error {
|
|
234569
|
+
phase;
|
|
234570
|
+
code = "bounded_operation_timeout";
|
|
234571
|
+
constructor(phase) {
|
|
234572
|
+
super(`Bounded operation timed out (${phase}); no complete result was accepted. Continue with other available evidence or report what remains unavailable.`);
|
|
234573
|
+
this.phase = phase;
|
|
234574
|
+
this.name = "BoundedOperationTimeoutError";
|
|
234575
|
+
}
|
|
234576
|
+
};
|
|
234577
|
+
});
|
|
234578
|
+
|
|
234473
234579
|
// services/visual/visualSpecialist.ts
|
|
234474
234580
|
function assertVisualImagePaths(agentType, imagePaths) {
|
|
234475
234581
|
if (agentType !== "visual-ui-analysis") {
|
|
@@ -234491,35 +234597,46 @@ async function runVisualSpecialist(input, deps) {
|
|
|
234491
234597
|
const images = [];
|
|
234492
234598
|
for (const path11 of imagePaths)
|
|
234493
234599
|
images.push(await deps.loadImage(path11));
|
|
234494
|
-
const
|
|
234495
|
-
|
|
234496
|
-
|
|
234497
|
-
|
|
234498
|
-
|
|
234499
|
-
|
|
234500
|
-
|
|
234501
|
-
|
|
234502
|
-
|
|
234503
|
-
|
|
234504
|
-
|
|
234505
|
-
|
|
234506
|
-
|
|
234507
|
-
|
|
234508
|
-
|
|
234509
|
-
|
|
234510
|
-
|
|
234511
|
-
|
|
234512
|
-
|
|
234513
|
-
|
|
234514
|
-
|
|
234515
|
-
|
|
234516
|
-
|
|
234517
|
-
|
|
234518
|
-
|
|
234600
|
+
const operation = boundedOperationPolicy(900000);
|
|
234601
|
+
const lifetime = new BoundedOperation(input.signal ?? new AbortController().signal, operation, input.onActivity);
|
|
234602
|
+
try {
|
|
234603
|
+
const request = {
|
|
234604
|
+
role: "visual.experimental",
|
|
234605
|
+
mode: input.mode ?? "quality",
|
|
234606
|
+
requirements: { vision: true }
|
|
234607
|
+
};
|
|
234608
|
+
for (let attempt = 0;attempt < 2; attempt += 1) {
|
|
234609
|
+
const selection = await lifetime.wait(() => deps.resolve(request));
|
|
234610
|
+
if (!selection) {
|
|
234611
|
+
throw new Error("Specialist capability unavailable: visual.experimental");
|
|
234612
|
+
}
|
|
234613
|
+
try {
|
|
234614
|
+
return await lifetime.wait(() => deps.infer({
|
|
234615
|
+
model: selection.resolved_model,
|
|
234616
|
+
...selection.canonical_model ? { canonicalModel: selection.canonical_model } : {},
|
|
234617
|
+
clientProtocol: selection.client_protocol,
|
|
234618
|
+
...selection.capability_context ? { capabilityContext: selection.capability_context } : {},
|
|
234619
|
+
systemPrompt: VISUAL_SPECIALIST_SYSTEM_PROMPT,
|
|
234620
|
+
prompt: input.prompt,
|
|
234621
|
+
images,
|
|
234622
|
+
maxOutputTokens: 2048,
|
|
234623
|
+
signal: lifetime.signal,
|
|
234624
|
+
operation,
|
|
234625
|
+
onActivity: (event) => {
|
|
234626
|
+
if (event.kind === "data")
|
|
234627
|
+
lifetime.data();
|
|
234628
|
+
}
|
|
234629
|
+
}));
|
|
234630
|
+
} catch (error5) {
|
|
234631
|
+
if (!(error5 instanceof GatewayInvalidCapabilityContextError) || attempt > 0) {
|
|
234632
|
+
throw error5;
|
|
234633
|
+
}
|
|
234519
234634
|
}
|
|
234520
234635
|
}
|
|
234636
|
+
throw new Error("Specialist capability unavailable: visual.experimental");
|
|
234637
|
+
} finally {
|
|
234638
|
+
lifetime.dispose();
|
|
234521
234639
|
}
|
|
234522
|
-
throw new Error("Specialist capability unavailable: visual.experimental");
|
|
234523
234640
|
}
|
|
234524
234641
|
var VISUAL_SPECIALIST_SYSTEM_PROMPT = `You are CCL's bounded visual analysis specialist.
|
|
234525
234642
|
|
|
@@ -234529,6 +234646,7 @@ separated inferences and uncertainty. Do not claim to inspect source code, call
|
|
|
234529
234646
|
tools, plan edits, or gather additional evidence. Return one concise conclusion.`;
|
|
234530
234647
|
var init_visualSpecialist = __esm(() => {
|
|
234531
234648
|
init_gatewayTransport();
|
|
234649
|
+
init_boundedOperation();
|
|
234532
234650
|
});
|
|
234533
234651
|
|
|
234534
234652
|
// tools/AgentTool/built-in/visualUiAnalysisAgent.ts
|
|
@@ -237628,12 +237746,50 @@ function clearUserTimings() {
|
|
|
237628
237746
|
}
|
|
237629
237747
|
|
|
237630
237748
|
// services/SessionMemory/sessionMemoryUtils.ts
|
|
237631
|
-
|
|
237632
|
-
return lastSummarizedMessageId;
|
|
237633
|
-
}
|
|
237749
|
+
import { createHash as createHash6 } from "node:crypto";
|
|
237634
237750
|
function setLastSummarizedMessageId(messageId) {
|
|
237751
|
+
coverageGeneration++;
|
|
237752
|
+
resetVersion++;
|
|
237753
|
+
coverage = undefined;
|
|
237635
237754
|
lastSummarizedMessageId = messageId;
|
|
237636
237755
|
}
|
|
237756
|
+
function getSessionMemoryResetVersion() {
|
|
237757
|
+
return resetVersion;
|
|
237758
|
+
}
|
|
237759
|
+
function beginSessionMemoryExtraction() {
|
|
237760
|
+
coverage = undefined;
|
|
237761
|
+
lastSummarizedMessageId = undefined;
|
|
237762
|
+
return ++coverageGeneration;
|
|
237763
|
+
}
|
|
237764
|
+
function commitSessionMemoryCoverage(generation, messageId, memoryPath, content, tokenCount) {
|
|
237765
|
+
if (generation !== coverageGeneration || memoryPath !== getSessionMemoryPath()) {
|
|
237766
|
+
return false;
|
|
237767
|
+
}
|
|
237768
|
+
coverage = Object.freeze({
|
|
237769
|
+
messageId,
|
|
237770
|
+
memoryPath,
|
|
237771
|
+
generation,
|
|
237772
|
+
contentHash: createHash6("sha256").update(content).digest("hex")
|
|
237773
|
+
});
|
|
237774
|
+
lastSummarizedMessageId = messageId;
|
|
237775
|
+
recordExtractionTokenCount(tokenCount);
|
|
237776
|
+
return true;
|
|
237777
|
+
}
|
|
237778
|
+
async function getVerifiedSessionMemory() {
|
|
237779
|
+
const captured = coverage;
|
|
237780
|
+
if (!captured || captured.memoryPath !== getSessionMemoryPath())
|
|
237781
|
+
return null;
|
|
237782
|
+
try {
|
|
237783
|
+
const content = await getFsImplementation().readFile(captured.memoryPath, { encoding: "utf-8" });
|
|
237784
|
+
if (coverage !== captured || coverageGeneration !== captured.generation || captured.memoryPath !== getSessionMemoryPath() || createHash6("sha256").update(content).digest("hex") !== captured.contentHash) {
|
|
237785
|
+
return null;
|
|
237786
|
+
}
|
|
237787
|
+
return { content, messageId: captured.messageId };
|
|
237788
|
+
} catch {
|
|
237789
|
+
logEvent("tengu_session_memory_coverage_unavailable", { read_failed: true });
|
|
237790
|
+
return null;
|
|
237791
|
+
}
|
|
237792
|
+
}
|
|
237637
237793
|
function markExtractionStarted() {
|
|
237638
237794
|
extractionStartedAt = Date.now();
|
|
237639
237795
|
}
|
|
@@ -237698,7 +237854,7 @@ function hasMetUpdateThreshold(currentTokenCount) {
|
|
|
237698
237854
|
function getToolCallsBetweenUpdates() {
|
|
237699
237855
|
return sessionMemoryConfig.toolCallsBetweenUpdates;
|
|
237700
237856
|
}
|
|
237701
|
-
var EXTRACTION_WAIT_TIMEOUT_MS = 15000, EXTRACTION_STALE_THRESHOLD_MS = 60000, DEFAULT_SESSION_MEMORY_CONFIG, sessionMemoryConfig, lastSummarizedMessageId, extractionStartedAt, tokensAtLastExtraction = 0, sessionMemoryInitialized = false;
|
|
237857
|
+
var EXTRACTION_WAIT_TIMEOUT_MS = 15000, EXTRACTION_STALE_THRESHOLD_MS = 60000, DEFAULT_SESSION_MEMORY_CONFIG, sessionMemoryConfig, lastSummarizedMessageId, coverage, coverageGeneration = 0, resetVersion = 0, extractionStartedAt, tokensAtLastExtraction = 0, sessionMemoryInitialized = false;
|
|
237702
237858
|
var init_sessionMemoryUtils = __esm(() => {
|
|
237703
237859
|
init_errors();
|
|
237704
237860
|
init_fsOperations();
|
|
@@ -239750,7 +239906,7 @@ function getAssistantMessageFromError(error5, model, options) {
|
|
|
239750
239906
|
if (process.env.USER_TYPE === "ant") {
|
|
239751
239907
|
const baseMessage = `API Error: 400 ${error5.message}
|
|
239752
239908
|
|
|
239753
|
-
Run /share and post the JSON file to ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
239909
|
+
Run /share and post the JSON file to ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.FEEDBACK_CHANNEL}.`;
|
|
239754
239910
|
const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
|
|
239755
239911
|
return createAssistantAPIErrorMessage({
|
|
239756
239912
|
content: baseMessage + rewindInstruction,
|
|
@@ -239786,7 +239942,7 @@ Run /share and post the JSON file to ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
|
239786
239942
|
if (process.env.USER_TYPE === "ant" && !process.env.ANTHROPIC_MODEL && error5 instanceof Error && error5.message.toLowerCase().includes("invalid model name")) {
|
|
239787
239943
|
const orgId = getOauthAccountInfo()?.organizationUuid;
|
|
239788
239944
|
const baseMsg = `[ANT-ONLY] Your org isn't gated into the \`${model}\` model. Either run \`ccl\` with \`ANTHROPIC_MODEL=${getDefaultMainLoopModelSetting()}\``;
|
|
239789
|
-
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
239945
|
+
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.FEEDBACK_CHANNEL} for help getting access.` : `${baseMsg} or reach out in ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.FEEDBACK_CHANNEL} for help getting access.`;
|
|
239790
239946
|
return createAssistantAPIErrorMessage({
|
|
239791
239947
|
content: msg,
|
|
239792
239948
|
error: "invalid_request"
|
|
@@ -241095,11 +241251,11 @@ var init_postSamplingHooks = __esm(() => {
|
|
|
241095
241251
|
});
|
|
241096
241252
|
|
|
241097
241253
|
// services/api/dumpPrompts.ts
|
|
241098
|
-
import { createHash as
|
|
241254
|
+
import { createHash as createHash7 } from "crypto";
|
|
241099
241255
|
import { promises as fs10 } from "fs";
|
|
241100
241256
|
import { dirname as dirname23, join as join47 } from "path";
|
|
241101
241257
|
function hashString3(str) {
|
|
241102
|
-
return
|
|
241258
|
+
return createHash7("sha256").update(str).digest("hex");
|
|
241103
241259
|
}
|
|
241104
241260
|
function clearDumpState(agentIdOrSessionId) {
|
|
241105
241261
|
dumpState.delete(agentIdOrSessionId);
|
|
@@ -241272,6 +241428,14 @@ var DEFAULT_MAX_LISTENERS = 50;
|
|
|
241272
241428
|
var init_abortController = () => {};
|
|
241273
241429
|
|
|
241274
241430
|
// utils/stuckQueryWatchdog.ts
|
|
241431
|
+
function bindQueryOwnedProgress(guard, signal, consume) {
|
|
241432
|
+
const generation = guard.generation;
|
|
241433
|
+
return (event) => {
|
|
241434
|
+
if (signal.aborted || !guard.isActive || guard.generation !== generation)
|
|
241435
|
+
return;
|
|
241436
|
+
consume(event);
|
|
241437
|
+
};
|
|
241438
|
+
}
|
|
241275
241439
|
function hasLiveForegroundInteraction(queue) {
|
|
241276
241440
|
return queue.some((request) => !request.workerBadge && !request.toolUseContext.agentId && request.toolUseContext.abortController?.signal.aborted === false);
|
|
241277
241441
|
}
|
|
@@ -331799,7 +331963,7 @@ function getTelemetryAttributes() {
|
|
|
331799
331963
|
attributes["session.id"] = sessionId;
|
|
331800
331964
|
}
|
|
331801
331965
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
331802
|
-
attributes["app.version"] = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
331966
|
+
attributes["app.version"] = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION;
|
|
331803
331967
|
}
|
|
331804
331968
|
const oauthAccount = getOauthAccountInfo();
|
|
331805
331969
|
if (oauthAccount) {
|
|
@@ -338640,7 +338804,7 @@ __export(exports_commitAttribution, {
|
|
|
338640
338804
|
buildSurfaceKey: () => buildSurfaceKey,
|
|
338641
338805
|
attributionRestoreStateFromLog: () => attributionRestoreStateFromLog
|
|
338642
338806
|
});
|
|
338643
|
-
import { createHash as
|
|
338807
|
+
import { createHash as createHash8, randomUUID as randomUUID10 } from "crypto";
|
|
338644
338808
|
import { stat as stat18 } from "fs/promises";
|
|
338645
338809
|
import { isAbsolute as isAbsolute9, join as join48, relative as relative6, sep as sep10 } from "path";
|
|
338646
338810
|
function getAttributionRepoRoot() {
|
|
@@ -338693,7 +338857,7 @@ function buildSurfaceKey(surface, model) {
|
|
|
338693
338857
|
return `${surface}/${getCanonicalName(model)}`;
|
|
338694
338858
|
}
|
|
338695
338859
|
function computeContentHash(content) {
|
|
338696
|
-
return
|
|
338860
|
+
return createHash8("sha256").update(content).digest("hex");
|
|
338697
338861
|
}
|
|
338698
338862
|
function normalizeFilePath(filePath) {
|
|
338699
338863
|
const fs11 = getFsImplementation();
|
|
@@ -346034,7 +346198,7 @@ var init_claudeai = __esm(() => {
|
|
|
346034
346198
|
});
|
|
346035
346199
|
|
|
346036
346200
|
// services/mcp/utils.ts
|
|
346037
|
-
import { createHash as
|
|
346201
|
+
import { createHash as createHash9 } from "crypto";
|
|
346038
346202
|
import { join as join52 } from "path";
|
|
346039
346203
|
function filterToolsByServer(tools, serverName) {
|
|
346040
346204
|
const prefix = `mcp__${normalizeNameForMCP(serverName)}__`;
|
|
@@ -346074,7 +346238,7 @@ function hashMcpConfig(config) {
|
|
|
346074
346238
|
}
|
|
346075
346239
|
return v6;
|
|
346076
346240
|
});
|
|
346077
|
-
return
|
|
346241
|
+
return createHash9("sha256").update(stable).digest("hex").slice(0, 16);
|
|
346078
346242
|
}
|
|
346079
346243
|
function excludeStalePluginClients(mcp, configs) {
|
|
346080
346244
|
const stale = mcp.clients.filter((c5) => {
|
|
@@ -348797,7 +348961,7 @@ var init_auxiliaryAgentRecovery = __esm(() => {
|
|
|
348797
348961
|
});
|
|
348798
348962
|
|
|
348799
348963
|
// utils/fingerprint.ts
|
|
348800
|
-
import { createHash as
|
|
348964
|
+
import { createHash as createHash10 } from "crypto";
|
|
348801
348965
|
function extractFirstMessageText(messages) {
|
|
348802
348966
|
const firstUserMessage = messages.find((msg) => msg.type === "user");
|
|
348803
348967
|
if (!firstUserMessage) {
|
|
@@ -348819,12 +348983,12 @@ function computeFingerprint(messageText, version4) {
|
|
|
348819
348983
|
const indices = [4, 7, 20];
|
|
348820
348984
|
const chars = indices.map((i4) => messageText[i4] || "0").join("");
|
|
348821
348985
|
const fingerprintInput = `${FINGERPRINT_SALT}${chars}${version4}`;
|
|
348822
|
-
const hash =
|
|
348986
|
+
const hash = createHash10("sha256").update(fingerprintInput).digest("hex");
|
|
348823
348987
|
return hash.slice(0, 3);
|
|
348824
348988
|
}
|
|
348825
348989
|
function computeFingerprintFromMessages(messages) {
|
|
348826
348990
|
const firstMessageText = extractFirstMessageText(messages);
|
|
348827
|
-
return computeFingerprint(firstMessageText, { USER_TYPE: "external", VERSION: "1.3.6-
|
|
348991
|
+
return computeFingerprint(firstMessageText, { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION);
|
|
348828
348992
|
}
|
|
348829
348993
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
348830
348994
|
var init_fingerprint = () => {};
|
|
@@ -348873,7 +349037,7 @@ async function sideQuery(opts) {
|
|
|
348873
349037
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
348874
349038
|
}
|
|
348875
349039
|
const messageText = extractFirstUserMessageText(messages);
|
|
348876
|
-
const fingerprint = computeFingerprint(messageText, { USER_TYPE: "external", VERSION: "1.3.6-
|
|
349040
|
+
const fingerprint = computeFingerprint(messageText, { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION);
|
|
348877
349041
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
348878
349042
|
const systemBlocks = [
|
|
348879
349043
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -352467,7 +352631,7 @@ function getResumeCommand(resumeArg) {
|
|
|
352467
352631
|
var CLI_COMMAND_NAME = "margay";
|
|
352468
352632
|
|
|
352469
352633
|
// services/analytics/datadog.ts
|
|
352470
|
-
import { createHash as
|
|
352634
|
+
import { createHash as createHash11 } from "crypto";
|
|
352471
352635
|
import memoize40 from "lodash-es/memoize.js";
|
|
352472
352636
|
function camelToSnakeCase(str) {
|
|
352473
352637
|
return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
|
|
@@ -352676,7 +352840,7 @@ var init_datadog = __esm(() => {
|
|
|
352676
352840
|
});
|
|
352677
352841
|
getUserBucket = memoize40(() => {
|
|
352678
352842
|
const userId = getOrCreateUserID();
|
|
352679
|
-
const hash =
|
|
352843
|
+
const hash = createHash11("sha256").update(userId).digest("hex");
|
|
352680
352844
|
return parseInt(hash.slice(0, 8), 16) % NUM_USER_BUCKETS;
|
|
352681
352845
|
});
|
|
352682
352846
|
});
|
|
@@ -353159,7 +353323,7 @@ __export(exports_policyLimits, {
|
|
|
353159
353323
|
clearPolicyLimitsCache: () => clearPolicyLimitsCache,
|
|
353160
353324
|
_resetPolicyLimitsForTesting: () => _resetPolicyLimitsForTesting
|
|
353161
353325
|
});
|
|
353162
|
-
import { createHash as
|
|
353326
|
+
import { createHash as createHash12 } from "crypto";
|
|
353163
353327
|
import { readFileSync as fsReadFileSync } from "fs";
|
|
353164
353328
|
import { unlink as unlink5, writeFile as writeFile10 } from "fs/promises";
|
|
353165
353329
|
import { join as join56 } from "path";
|
|
@@ -353211,7 +353375,7 @@ function sortKeysDeep(obj) {
|
|
|
353211
353375
|
function computeChecksum(restrictions) {
|
|
353212
353376
|
const sorted = sortKeysDeep(restrictions);
|
|
353213
353377
|
const normalized = jsonStringify(sorted);
|
|
353214
|
-
const hash =
|
|
353378
|
+
const hash = createHash12("sha256").update(normalized).digest("hex");
|
|
353215
353379
|
return `sha256:${hash}`;
|
|
353216
353380
|
}
|
|
353217
353381
|
function isPolicyLimitsEligible() {
|
|
@@ -357743,7 +357907,7 @@ var init_types6 = __esm(() => {
|
|
|
357743
357907
|
});
|
|
357744
357908
|
|
|
357745
357909
|
// services/remoteManagedSettings/index.ts
|
|
357746
|
-
import { createHash as
|
|
357910
|
+
import { createHash as createHash13 } from "crypto";
|
|
357747
357911
|
import { open as open8, unlink as unlink6 } from "fs/promises";
|
|
357748
357912
|
function initializeRemoteManagedSettingsLoadingPromise() {
|
|
357749
357913
|
if (loadingCompletePromise2) {
|
|
@@ -357781,7 +357945,7 @@ function sortKeysDeep2(obj) {
|
|
|
357781
357945
|
function computeChecksumFromSettings(settings) {
|
|
357782
357946
|
const sorted = sortKeysDeep2(settings);
|
|
357783
357947
|
const normalized = jsonStringify(sorted);
|
|
357784
|
-
const hash =
|
|
357948
|
+
const hash = createHash13("sha256").update(normalized).digest("hex");
|
|
357785
357949
|
return `sha256:${hash}`;
|
|
357786
357950
|
}
|
|
357787
357951
|
function isEligibleForRemoteManagedSettings() {
|
|
@@ -362543,7 +362707,7 @@ var require_src19 = __commonJS((exports) => {
|
|
|
362543
362707
|
});
|
|
362544
362708
|
|
|
362545
362709
|
// utils/telemetry/betaSessionTracing.ts
|
|
362546
|
-
import { createHash as
|
|
362710
|
+
import { createHash as createHash14 } from "crypto";
|
|
362547
362711
|
function clearBetaTracingState() {
|
|
362548
362712
|
seenHashes.clear();
|
|
362549
362713
|
lastReportedMessageHash.clear();
|
|
@@ -362570,7 +362734,7 @@ function truncateContent(content, maxSize = MAX_CONTENT_SIZE) {
|
|
|
362570
362734
|
};
|
|
362571
362735
|
}
|
|
362572
362736
|
function shortHash(content) {
|
|
362573
|
-
return
|
|
362737
|
+
return createHash14("sha256").update(content).digest("hex").slice(0, 12);
|
|
362574
362738
|
}
|
|
362575
362739
|
function hashSystemPrompt(systemPrompt) {
|
|
362576
362740
|
return `sp_${shortHash(systemPrompt)}`;
|
|
@@ -397065,7 +397229,7 @@ async function initializeBetaTracing(resource) {
|
|
|
397065
397229
|
});
|
|
397066
397230
|
import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
397067
397231
|
setLoggerProvider(loggerProvider);
|
|
397068
|
-
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.6-
|
|
397232
|
+
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION);
|
|
397069
397233
|
setEventLogger(eventLogger);
|
|
397070
397234
|
process.on("beforeExit", async () => {
|
|
397071
397235
|
await loggerProvider?.forceFlush();
|
|
@@ -397105,7 +397269,7 @@ async function initializeTelemetry() {
|
|
|
397105
397269
|
const platform3 = getPlatform();
|
|
397106
397270
|
const baseAttributes = {
|
|
397107
397271
|
[import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
|
|
397108
|
-
[import_semantic_conventions2.ATTR_SERVICE_VERSION]: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
397272
|
+
[import_semantic_conventions2.ATTR_SERVICE_VERSION]: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
397109
397273
|
};
|
|
397110
397274
|
if (platform3 === "wsl") {
|
|
397111
397275
|
const wslVersion = getWslVersion();
|
|
@@ -397150,7 +397314,7 @@ async function initializeTelemetry() {
|
|
|
397150
397314
|
} catch {}
|
|
397151
397315
|
};
|
|
397152
397316
|
registerCleanup(shutdownTelemetry2);
|
|
397153
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", { USER_TYPE: "external", VERSION: "1.3.6-
|
|
397317
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION);
|
|
397154
397318
|
}
|
|
397155
397319
|
const meterProvider = new import_sdk_metrics2.MeterProvider({
|
|
397156
397320
|
resource,
|
|
@@ -397170,7 +397334,7 @@ async function initializeTelemetry() {
|
|
|
397170
397334
|
});
|
|
397171
397335
|
import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
397172
397336
|
setLoggerProvider(loggerProvider);
|
|
397173
|
-
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.6-
|
|
397337
|
+
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION);
|
|
397174
397338
|
setEventLogger(eventLogger);
|
|
397175
397339
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
397176
397340
|
process.on("beforeExit", async () => {
|
|
@@ -397232,7 +397396,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
397232
397396
|
}
|
|
397233
397397
|
};
|
|
397234
397398
|
registerCleanup(shutdownTelemetry);
|
|
397235
|
-
return meterProvider.getMeter("com.anthropic.claude_code", { USER_TYPE: "external", VERSION: "1.3.6-
|
|
397399
|
+
return meterProvider.getMeter("com.anthropic.claude_code", { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION);
|
|
397236
397400
|
}
|
|
397237
397401
|
async function flushTelemetry() {
|
|
397238
397402
|
const meterProvider = getMeterProvider();
|
|
@@ -397659,7 +397823,7 @@ var init_auth_code_listener = __esm(() => {
|
|
|
397659
397823
|
});
|
|
397660
397824
|
|
|
397661
397825
|
// services/oauth/crypto.ts
|
|
397662
|
-
import { createHash as
|
|
397826
|
+
import { createHash as createHash15, randomBytes as randomBytes5 } from "crypto";
|
|
397663
397827
|
function base64URLEncode(buffer) {
|
|
397664
397828
|
return buffer.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
397665
397829
|
}
|
|
@@ -397667,7 +397831,7 @@ function generateCodeVerifier() {
|
|
|
397667
397831
|
return base64URLEncode(randomBytes5(32));
|
|
397668
397832
|
}
|
|
397669
397833
|
function generateCodeChallenge(verifier) {
|
|
397670
|
-
const hash =
|
|
397834
|
+
const hash = createHash15("sha256");
|
|
397671
397835
|
hash.update(verifier);
|
|
397672
397836
|
return base64URLEncode(hash.digest());
|
|
397673
397837
|
}
|
|
@@ -397823,7 +397987,7 @@ async function installOrUpdateClaudePackage(channel2, specificVersion) {
|
|
|
397823
397987
|
return "install_failed";
|
|
397824
397988
|
}
|
|
397825
397989
|
const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
|
|
397826
|
-
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
397990
|
+
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL}@${versionSpec}`], { cwd: getLocalInstallDir(), maxBuffer: 1e6 });
|
|
397827
397991
|
if (result.code !== 0) {
|
|
397828
397992
|
const error5 = new Error(`Failed to install Claude CLI package: ${result.stderr}`);
|
|
397829
397993
|
logError(error5);
|
|
@@ -397966,14 +398130,14 @@ import { access as access2, writeFile as writeFile12 } from "fs/promises";
|
|
|
397966
398130
|
import { homedir as homedir18 } from "os";
|
|
397967
398131
|
import { join as join61 } from "path";
|
|
397968
398132
|
async function assertMinVersion() {
|
|
397969
|
-
if (process.env.SKIP_VERSION_CHECK === "1" || { USER_TYPE: "external", VERSION: "1.3.6-
|
|
398133
|
+
if (process.env.SKIP_VERSION_CHECK === "1" || { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION.startsWith("0.0.0-dev") || !process.env.ANTHROPIC_VERSION_CHECK) {
|
|
397970
398134
|
return;
|
|
397971
398135
|
}
|
|
397972
398136
|
try {
|
|
397973
398137
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
397974
|
-
if (versionConfig.minVersion && lt2({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
398138
|
+
if (versionConfig.minVersion && lt2({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION, versionConfig.minVersion)) {
|
|
397975
398139
|
console.error(`
|
|
397976
|
-
It looks like your version of CCL (${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
398140
|
+
It looks like your version of CCL (${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION}) needs an update.
|
|
397977
398141
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
397978
398142
|
|
|
397979
398143
|
To update, please run:
|
|
@@ -398133,7 +398297,7 @@ async function checkGlobalInstallPermissions() {
|
|
|
398133
398297
|
}
|
|
398134
398298
|
async function getLatestVersion(channel2) {
|
|
398135
398299
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
398136
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
398300
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
|
|
398137
398301
|
if (result.code !== 0) {
|
|
398138
398302
|
logForDebugging(`npm view failed with code ${result.code}`);
|
|
398139
398303
|
if (result.stderr) {
|
|
@@ -398149,7 +398313,7 @@ async function getLatestVersion(channel2) {
|
|
|
398149
398313
|
return result.stdout.trim();
|
|
398150
398314
|
}
|
|
398151
398315
|
async function getNpmDistTags() {
|
|
398152
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", { USER_TYPE: "external", VERSION: "1.3.6-
|
|
398316
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL, "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
|
|
398153
398317
|
if (result.code !== 0) {
|
|
398154
398318
|
logForDebugging(`npm view dist-tags failed with code ${result.code}`);
|
|
398155
398319
|
return { latest: null, stable: null };
|
|
@@ -398189,7 +398353,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
398189
398353
|
logError(new AutoUpdaterError("Another process is currently installing an update"));
|
|
398190
398354
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
398191
398355
|
pid: process.pid,
|
|
398192
|
-
currentVersion: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
398356
|
+
currentVersion: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
398193
398357
|
});
|
|
398194
398358
|
return "in_progress";
|
|
398195
398359
|
}
|
|
@@ -398198,7 +398362,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
398198
398362
|
if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
|
|
398199
398363
|
logError(new Error("Windows NPM detected in WSL environment"));
|
|
398200
398364
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
398201
|
-
currentVersion: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
398365
|
+
currentVersion: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
398202
398366
|
});
|
|
398203
398367
|
console.error(`
|
|
398204
398368
|
Error: Windows NPM detected in WSL
|
|
@@ -398217,7 +398381,7 @@ To fix this issue:
|
|
|
398217
398381
|
if (!hasPermissions) {
|
|
398218
398382
|
return "no_permissions";
|
|
398219
398383
|
}
|
|
398220
|
-
const packageSpec = specificVersion ? `${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
398384
|
+
const packageSpec = specificVersion ? `${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL}@${specificVersion}` : { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL;
|
|
398221
398385
|
const packageManager = env4.isRunningWithBun() ? "bun" : "npm";
|
|
398222
398386
|
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
|
|
398223
398387
|
if (installResult.code !== 0) {
|
|
@@ -398546,8 +398710,8 @@ async function detectMultipleInstallations() {
|
|
|
398546
398710
|
installations.push({ type: "npm-local", path: localPath });
|
|
398547
398711
|
}
|
|
398548
398712
|
const packagesToCheck = ["@anthropic-ai/claude-code"];
|
|
398549
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
398550
|
-
packagesToCheck.push({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
398713
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
|
|
398714
|
+
packagesToCheck.push({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL);
|
|
398551
398715
|
}
|
|
398552
398716
|
const npmResult = await execFileNoThrow("npm", [
|
|
398553
398717
|
"-g",
|
|
@@ -398730,7 +398894,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
398730
398894
|
}
|
|
398731
398895
|
async function getDoctorDiagnostic() {
|
|
398732
398896
|
const installationType = await getCurrentInstallationType();
|
|
398733
|
-
const version4 = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
398897
|
+
const version4 = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION ? { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION : "unknown";
|
|
398734
398898
|
const installationPath = await getInstallationPath();
|
|
398735
398899
|
const invokedBinary = getInvokedBinary();
|
|
398736
398900
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -398742,8 +398906,8 @@ async function getDoctorDiagnostic() {
|
|
|
398742
398906
|
for (const install of npmInstalls) {
|
|
398743
398907
|
if (install.type === "npm-global") {
|
|
398744
398908
|
let uninstallCmd = "npm -g uninstall @anthropic-ai/claude-code";
|
|
398745
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
398746
|
-
uninstallCmd += ` && npm -g uninstall ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
398909
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
|
|
398910
|
+
uninstallCmd += ` && npm -g uninstall ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL}`;
|
|
398747
398911
|
}
|
|
398748
398912
|
warnings.push({
|
|
398749
398913
|
issue: `Leftover npm global installation at ${install.path}`,
|
|
@@ -400069,7 +400233,7 @@ function getInstallationEnv() {
|
|
|
400069
400233
|
return;
|
|
400070
400234
|
}
|
|
400071
400235
|
function getClaudeCodeVersion() {
|
|
400072
|
-
return { USER_TYPE: "external", VERSION: "1.3.6-
|
|
400236
|
+
return { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION;
|
|
400073
400237
|
}
|
|
400074
400238
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
400075
400239
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -400619,14 +400783,14 @@ function getUserBinDir(options) {
|
|
|
400619
400783
|
var init_xdg = () => {};
|
|
400620
400784
|
|
|
400621
400785
|
// utils/nativeInstaller/download.ts
|
|
400622
|
-
import { createHash as
|
|
400786
|
+
import { createHash as createHash16 } from "crypto";
|
|
400623
400787
|
import { chmod as chmod4, writeFile as writeFile13 } from "fs/promises";
|
|
400624
400788
|
import { join as join66 } from "path";
|
|
400625
400789
|
async function getLatestVersionFromArtifactory(tag = "latest") {
|
|
400626
400790
|
const startTime2 = Date.now();
|
|
400627
400791
|
const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
|
|
400628
400792
|
"view",
|
|
400629
|
-
`${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
400793
|
+
`${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.NATIVE_PACKAGE_URL}@${tag}`,
|
|
400630
400794
|
"version",
|
|
400631
400795
|
"--prefer-online",
|
|
400632
400796
|
"--registry",
|
|
@@ -400650,7 +400814,7 @@ async function getLatestVersionFromArtifactory(tag = "latest") {
|
|
|
400650
400814
|
latency_ms: latencyMs,
|
|
400651
400815
|
source_npm: true
|
|
400652
400816
|
});
|
|
400653
|
-
logForDebugging(`npm view ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
400817
|
+
logForDebugging(`npm view ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.NATIVE_PACKAGE_URL}@${tag} version: ${stdout}`);
|
|
400654
400818
|
const latestVersion = stdout.trim();
|
|
400655
400819
|
return latestVersion;
|
|
400656
400820
|
}
|
|
@@ -400706,7 +400870,7 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
|
|
|
400706
400870
|
const fs11 = getFsImplementation();
|
|
400707
400871
|
await fs11.rm(stagingPath, { recursive: true, force: true });
|
|
400708
400872
|
const platform4 = getPlatform2();
|
|
400709
|
-
const platformPackageName = `${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
400873
|
+
const platformPackageName = `${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.NATIVE_PACKAGE_URL}-${platform4}`;
|
|
400710
400874
|
logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version4}`);
|
|
400711
400875
|
const {
|
|
400712
400876
|
stdout: integrityOutput,
|
|
@@ -400735,7 +400899,7 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
|
|
|
400735
400899
|
name: "claude-native-installer",
|
|
400736
400900
|
version: "0.0.1",
|
|
400737
400901
|
dependencies: {
|
|
400738
|
-
[{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
400902
|
+
[{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.NATIVE_PACKAGE_URL]: version4
|
|
400739
400903
|
}
|
|
400740
400904
|
};
|
|
400741
400905
|
const packageLock = {
|
|
@@ -400748,10 +400912,10 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
|
|
|
400748
400912
|
name: "claude-native-installer",
|
|
400749
400913
|
version: "0.0.1",
|
|
400750
400914
|
dependencies: {
|
|
400751
|
-
[{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
400915
|
+
[{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.NATIVE_PACKAGE_URL]: version4
|
|
400752
400916
|
}
|
|
400753
400917
|
},
|
|
400754
|
-
[`node_modules/${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
400918
|
+
[`node_modules/${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.NATIVE_PACKAGE_URL}`]: {
|
|
400755
400919
|
version: version4,
|
|
400756
400920
|
optionalDependencies: {
|
|
400757
400921
|
[platformPackageName]: version4
|
|
@@ -400773,7 +400937,7 @@ async function downloadVersionFromArtifactory(version4, stagingPath) {
|
|
|
400773
400937
|
if (result.code !== 0) {
|
|
400774
400938
|
throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
|
|
400775
400939
|
}
|
|
400776
|
-
logForDebugging(`Successfully downloaded and verified ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
400940
|
+
logForDebugging(`Successfully downloaded and verified ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.NATIVE_PACKAGE_URL}@${version4}`);
|
|
400777
400941
|
}
|
|
400778
400942
|
function getStallTimeoutMs() {
|
|
400779
400943
|
return Number(process.env.CLAUDE_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
|
|
@@ -400805,7 +400969,7 @@ async function downloadAndVerifyBinary(binaryUrl, expectedChecksum, binaryPath,
|
|
|
400805
400969
|
...requestConfig
|
|
400806
400970
|
});
|
|
400807
400971
|
clearStallTimer();
|
|
400808
|
-
const hash =
|
|
400972
|
+
const hash = createHash16("sha256");
|
|
400809
400973
|
hash.update(response.data);
|
|
400810
400974
|
const actualChecksum = hash.digest("hex");
|
|
400811
400975
|
if (actualChecksum !== expectedChecksum) {
|
|
@@ -401436,8 +401600,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
401436
401600
|
const maxVersion = await getMaxVersion();
|
|
401437
401601
|
if (maxVersion && gt2(version4, maxVersion)) {
|
|
401438
401602
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version4} to ${maxVersion}`);
|
|
401439
|
-
if (gte({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
401440
|
-
logForDebugging(`Native installer: current version ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
401603
|
+
if (gte({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION, maxVersion)) {
|
|
401604
|
+
logForDebugging(`Native installer: current version ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
401441
401605
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
401442
401606
|
latency_ms: Date.now() - startTime2,
|
|
401443
401607
|
max_version: maxVersion,
|
|
@@ -401448,7 +401612,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
401448
401612
|
version4 = maxVersion;
|
|
401449
401613
|
}
|
|
401450
401614
|
}
|
|
401451
|
-
if (!forceReinstall && version4 === { USER_TYPE: "external", VERSION: "1.3.6-
|
|
401615
|
+
if (!forceReinstall && version4 === { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION && await versionIsAvailable(version4) && await isPossibleClaudeBinary(executablePath)) {
|
|
401452
401616
|
logForDebugging(`Found ${version4} at ${executablePath}, skipping install`);
|
|
401453
401617
|
logEvent("tengu_native_update_complete", {
|
|
401454
401618
|
latency_ms: Date.now() - startTime2,
|
|
@@ -402190,8 +402354,8 @@ async function cleanupNpmInstallations() {
|
|
|
402190
402354
|
} else if (codePackageResult.error) {
|
|
402191
402355
|
errors.push(codePackageResult.error);
|
|
402192
402356
|
}
|
|
402193
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
402194
|
-
const macroPackageResult = await attemptNpmUninstall({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
402357
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL && { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL !== "@anthropic-ai/claude-code") {
|
|
402358
|
+
const macroPackageResult = await attemptNpmUninstall({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL);
|
|
402195
402359
|
if (macroPackageResult.success) {
|
|
402196
402360
|
removed++;
|
|
402197
402361
|
if (macroPackageResult.warning) {
|
|
@@ -402260,7 +402424,7 @@ var init_allErrors = __esm(() => {
|
|
|
402260
402424
|
|
|
402261
402425
|
// utils/status.tsx
|
|
402262
402426
|
function buildSandboxProperties() {
|
|
402263
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
402427
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE !== "ant") {
|
|
402264
402428
|
return [];
|
|
402265
402429
|
}
|
|
402266
402430
|
const isSandboxed = SandboxManager2.isSandboxingEnabled();
|
|
@@ -419600,7 +419764,7 @@ function SpinnerWithVerbInner({
|
|
|
419600
419764
|
const messageColor = overrideColor ?? defaultColor;
|
|
419601
419765
|
const shimmerColor = overrideShimmerColor ?? defaultShimmerColor;
|
|
419602
419766
|
let ttftText = null;
|
|
419603
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
419767
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && apiMetricsRef?.current && apiMetricsRef.current.length > 0) {
|
|
419604
419768
|
ttftText = computeTtftText(apiMetricsRef.current);
|
|
419605
419769
|
}
|
|
419606
419770
|
if (leaderIsIdle && hasRunningTeammates && !foregroundedTeammate) {
|
|
@@ -430624,7 +430788,7 @@ function getSearchOrReadInfo(progressMessage, tools, toolUseByID) {
|
|
|
430624
430788
|
return null;
|
|
430625
430789
|
}
|
|
430626
430790
|
function processProgressMessages(messages, tools, isAgentRunning) {
|
|
430627
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
430791
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE !== "ant") {
|
|
430628
430792
|
return messages.filter((m4) => hasProgressMessage(m4.data) && m4.data.message.type !== "user").map((m4) => ({
|
|
430629
430793
|
type: "original",
|
|
430630
430794
|
message: m4
|
|
@@ -430961,7 +431125,7 @@ function renderToolResultMessage(data, progressMessagesForMessage, {
|
|
|
430961
431125
|
return /* @__PURE__ */ jsx_runtime109.jsxs(ThemedBox_default, {
|
|
430962
431126
|
flexDirection: "column",
|
|
430963
431127
|
children: [
|
|
430964
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
431128
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime109.jsx(MessageResponse, {
|
|
430965
431129
|
children: /* @__PURE__ */ jsx_runtime109.jsxs(ThemedText, {
|
|
430966
431130
|
color: "warning",
|
|
430967
431131
|
children: [
|
|
@@ -431062,6 +431226,22 @@ function renderToolUseProgressMessage2(progressMessages, {
|
|
|
431062
431226
|
})
|
|
431063
431227
|
});
|
|
431064
431228
|
}
|
|
431229
|
+
const latestProgress = progressMessages.at(-1)?.data;
|
|
431230
|
+
if (latestProgress?.type === "agent_progress" && latestProgress.boundedStatus) {
|
|
431231
|
+
const status = latestProgress.boundedStatus;
|
|
431232
|
+
return /* @__PURE__ */ jsx_runtime109.jsx(MessageResponse, {
|
|
431233
|
+
height: 1,
|
|
431234
|
+
children: /* @__PURE__ */ jsx_runtime109.jsxs(ThemedText, {
|
|
431235
|
+
dimColor: true,
|
|
431236
|
+
children: [
|
|
431237
|
+
status.kind === "waiting" ? "Waiting for visual analysis" : "Receiving visual analysis",
|
|
431238
|
+
" · ",
|
|
431239
|
+
Math.floor(status.elapsedMs / 1000),
|
|
431240
|
+
"s"
|
|
431241
|
+
]
|
|
431242
|
+
})
|
|
431243
|
+
});
|
|
431244
|
+
}
|
|
431065
431245
|
const toolToolRenderLinesEstimate = (inProgressToolCallCount ?? 1) * ESTIMATED_LINES_PER_TOOL + TERMINAL_BUFFER_LINES;
|
|
431066
431246
|
const shouldUseCondensedMode = !isTranscriptMode && terminalSize && terminalSize.rows && terminalSize.rows < toolToolRenderLinesEstimate;
|
|
431067
431247
|
const getProgressStats = () => {
|
|
@@ -431211,7 +431391,7 @@ function renderToolUseRejectedMessage(_input, {
|
|
|
431211
431391
|
const agentId = firstData && hasProgressMessage(firstData) ? firstData.agentId : undefined;
|
|
431212
431392
|
return /* @__PURE__ */ jsx_runtime109.jsxs(jsx_runtime109.Fragment, {
|
|
431213
431393
|
children: [
|
|
431214
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
431394
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && agentId && /* @__PURE__ */ jsx_runtime109.jsx(MessageResponse, {
|
|
431215
431395
|
children: /* @__PURE__ */ jsx_runtime109.jsxs(ThemedText, {
|
|
431216
431396
|
color: "warning",
|
|
431217
431397
|
children: [
|
|
@@ -431691,11 +431871,11 @@ var init_skillUsageTracking = __esm(() => {
|
|
|
431691
431871
|
});
|
|
431692
431872
|
|
|
431693
431873
|
// utils/telemetry/pluginTelemetry.ts
|
|
431694
|
-
import { createHash as
|
|
431874
|
+
import { createHash as createHash17 } from "crypto";
|
|
431695
431875
|
import { sep as sep12 } from "path";
|
|
431696
431876
|
function hashPluginId(name2, marketplace) {
|
|
431697
431877
|
const key = marketplace ? `${name2}@${marketplace.toLowerCase()}` : name2;
|
|
431698
|
-
return
|
|
431878
|
+
return createHash17("sha256").update(key + PLUGIN_ID_HASH_SALT).digest("hex").slice(0, 16);
|
|
431699
431879
|
}
|
|
431700
431880
|
function getTelemetryPluginScope(name2, marketplace, managedNames) {
|
|
431701
431881
|
if (marketplace === BUILTIN_MARKETPLACE_NAME2)
|
|
@@ -431894,7 +432074,7 @@ async function executeForkedSlashCommand(command, args, context2, precedingInput
|
|
|
431894
432074
|
}
|
|
431895
432075
|
let resultText = extractResultText(agentMessages, "Command completed");
|
|
431896
432076
|
logForDebugging(`Forked slash command /${command.name} completed with agent ${agentId}`);
|
|
431897
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
432077
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
431898
432078
|
resultText = `[ANT-ONLY] API calls: ${getDisplayPath(getDumpPromptsPath(agentId))}
|
|
431899
432079
|
${resultText}`;
|
|
431900
432080
|
}
|
|
@@ -432037,7 +432217,7 @@ async function processSlashCommand(inputString, precedingInputBlocks, imageConte
|
|
|
432037
432217
|
logEvent("tengu_input_command", {
|
|
432038
432218
|
...eventData2,
|
|
432039
432219
|
invocation_trigger: "user-slash",
|
|
432040
|
-
...{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
432220
|
+
...{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && {
|
|
432041
432221
|
skill_name: commandName,
|
|
432042
432222
|
...returnedCommand.type === "prompt" && {
|
|
432043
432223
|
skill_source: returnedCommand.source
|
|
@@ -432098,7 +432278,7 @@ async function processSlashCommand(inputString, precedingInputBlocks, imageConte
|
|
|
432098
432278
|
logEvent("tengu_input_command", {
|
|
432099
432279
|
...eventData,
|
|
432100
432280
|
invocation_trigger: "user-slash",
|
|
432101
|
-
...{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
432281
|
+
...{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && {
|
|
432102
432282
|
skill_name: commandName,
|
|
432103
432283
|
...returnedCommand.type === "prompt" && {
|
|
432104
432284
|
skill_source: returnedCommand.source
|
|
@@ -432559,7 +432739,7 @@ async function* runAgent({
|
|
|
432559
432739
|
if (specialistCapability?.kind === "unavailable") {
|
|
432560
432740
|
throw new Error(`Specialist capability unavailable: ${agentDefinition.agentType} requires role=${specialistCapability.role}; no eligible model was resolved, so no child model call was made.`);
|
|
432561
432741
|
}
|
|
432562
|
-
const capabilityRole = roleForAgentPool(model ?? agentDefinition.model);
|
|
432742
|
+
const capabilityRole = !specialistCapability && process.env.CLAUDE_CODE_SUBAGENT_MODEL ? null : roleForAgentPool(model ?? agentDefinition.model);
|
|
432563
432743
|
const capabilityRequest = capabilityRole ? {
|
|
432564
432744
|
role: capabilityRole,
|
|
432565
432745
|
mode: routingMode,
|
|
@@ -434273,7 +434453,7 @@ var init_sessionIngress = __esm(() => {
|
|
|
434273
434453
|
});
|
|
434274
434454
|
|
|
434275
434455
|
// utils/fileHistory.ts
|
|
434276
|
-
import { createHash as
|
|
434456
|
+
import { createHash as createHash18 } from "crypto";
|
|
434277
434457
|
import { diffLines } from "diff";
|
|
434278
434458
|
import {
|
|
434279
434459
|
chmod as chmod6,
|
|
@@ -434698,7 +434878,7 @@ async function computeDiffStatsForFile(originalFile, backupFileName) {
|
|
|
434698
434878
|
};
|
|
434699
434879
|
}
|
|
434700
434880
|
function getBackupFileName(filePath, version4) {
|
|
434701
|
-
const fileNameHash =
|
|
434881
|
+
const fileNameHash = createHash18("sha256").update(filePath).digest("hex").slice(0, 16);
|
|
434702
434882
|
return `${fileNameHash}@v${version4}`;
|
|
434703
434883
|
}
|
|
434704
434884
|
function resolveBackupPath(backupFileName, sessionId) {
|
|
@@ -437236,11 +437416,11 @@ var init_filesApi = __esm(() => {
|
|
|
437236
437416
|
});
|
|
437237
437417
|
|
|
437238
437418
|
// utils/tempfile.ts
|
|
437239
|
-
import { createHash as
|
|
437419
|
+
import { createHash as createHash19, randomUUID as randomUUID18 } from "crypto";
|
|
437240
437420
|
import { tmpdir as tmpdir4 } from "os";
|
|
437241
437421
|
import { join as join80 } from "path";
|
|
437242
437422
|
function generateTempFilePath(prefix = "claude-prompt", extension = ".md", options) {
|
|
437243
|
-
const id = options?.contentHash ?
|
|
437423
|
+
const id = options?.contentHash ? createHash19("sha256").update(options.contentHash).digest("hex").slice(0, 16) : randomUUID18();
|
|
437244
437424
|
return join80(tmpdir4(), `${prefix}-${id}${extension}`);
|
|
437245
437425
|
}
|
|
437246
437426
|
var init_tempfile = () => {};
|
|
@@ -454054,12 +454234,12 @@ var init_diff2 = __esm(() => {
|
|
|
454054
454234
|
});
|
|
454055
454235
|
|
|
454056
454236
|
// utils/fileOperationAnalytics.ts
|
|
454057
|
-
import { createHash as
|
|
454237
|
+
import { createHash as createHash20 } from "crypto";
|
|
454058
454238
|
function hashFilePath(filePath) {
|
|
454059
|
-
return
|
|
454239
|
+
return createHash20("sha256").update(filePath).digest("hex").slice(0, 16);
|
|
454060
454240
|
}
|
|
454061
454241
|
function hashFileContent(content) {
|
|
454062
|
-
return
|
|
454242
|
+
return createHash20("sha256").update(content).digest("hex");
|
|
454063
454243
|
}
|
|
454064
454244
|
function logFileOperation(params) {
|
|
454065
454245
|
const metadata = {
|
|
@@ -477316,7 +477496,7 @@ function truncateCommand(command) {
|
|
|
477316
477496
|
function renderToolResultMessage11(output, _progressMessagesForMessage, {
|
|
477317
477497
|
verbose
|
|
477318
477498
|
}) {
|
|
477319
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
477499
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
477320
477500
|
return null;
|
|
477321
477501
|
}
|
|
477322
477502
|
const rawCommand = output.command ?? "";
|
|
@@ -478985,7 +479165,7 @@ var init_TaskOutputTool = __esm(() => {
|
|
|
478985
479165
|
return this.isReadOnly?.(_input) ?? false;
|
|
478986
479166
|
},
|
|
478987
479167
|
isEnabled() {
|
|
478988
|
-
return { USER_TYPE: "external", VERSION: "1.3.6-
|
|
479168
|
+
return { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE !== "ant";
|
|
478989
479169
|
},
|
|
478990
479170
|
isReadOnly(_input) {
|
|
478991
479171
|
return true;
|
|
@@ -485701,7 +485881,7 @@ var require_websocket2 = __commonJS((exports, module) => {
|
|
|
485701
485881
|
var http4 = __require("http");
|
|
485702
485882
|
var net3 = __require("net");
|
|
485703
485883
|
var tls2 = __require("tls");
|
|
485704
|
-
var { randomBytes: randomBytes8, createHash:
|
|
485884
|
+
var { randomBytes: randomBytes8, createHash: createHash21 } = __require("crypto");
|
|
485705
485885
|
var { Duplex, Readable: Readable4 } = __require("stream");
|
|
485706
485886
|
var { URL: URL3 } = __require("url");
|
|
485707
485887
|
var PerMessageDeflate = require_permessage_deflate2();
|
|
@@ -486240,7 +486420,7 @@ var require_websocket2 = __commonJS((exports, module) => {
|
|
|
486240
486420
|
abortHandshake(websocket, socket, "Invalid Upgrade header");
|
|
486241
486421
|
return;
|
|
486242
486422
|
}
|
|
486243
|
-
const digest =
|
|
486423
|
+
const digest = createHash21("sha1").update(key + GUID).digest("base64");
|
|
486244
486424
|
if (res.headers["sec-websocket-accept"] !== digest) {
|
|
486245
486425
|
abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
|
|
486246
486426
|
return;
|
|
@@ -486613,7 +486793,7 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
486613
486793
|
var EventEmitter4 = __require("events");
|
|
486614
486794
|
var http4 = __require("http");
|
|
486615
486795
|
var { Duplex } = __require("stream");
|
|
486616
|
-
var { createHash:
|
|
486796
|
+
var { createHash: createHash21 } = __require("crypto");
|
|
486617
486797
|
var extension = require_extension();
|
|
486618
486798
|
var PerMessageDeflate = require_permessage_deflate2();
|
|
486619
486799
|
var subprotocol = require_subprotocol();
|
|
@@ -486826,7 +487006,7 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
486826
487006
|
}
|
|
486827
487007
|
if (this._state > RUNNING)
|
|
486828
487008
|
return abortHandshake(socket, 503);
|
|
486829
|
-
const digest =
|
|
487009
|
+
const digest = createHash21("sha1").update(key + GUID).digest("base64");
|
|
486830
487010
|
const headers = [
|
|
486831
487011
|
"HTTP/1.1 101 Switching Protocols",
|
|
486832
487012
|
"Upgrade: websocket",
|
|
@@ -492298,7 +492478,7 @@ __export(exports_engine, {
|
|
|
492298
492478
|
WorkflowSuspended: () => WorkflowSuspended,
|
|
492299
492479
|
RetryConfigError: () => RetryConfigError
|
|
492300
492480
|
});
|
|
492301
|
-
import { createHash as
|
|
492481
|
+
import { createHash as createHash21, randomUUID as randomUUID22 } from "node:crypto";
|
|
492302
492482
|
import { execFile as execFile10 } from "node:child_process";
|
|
492303
492483
|
import { existsSync as existsSync8, mkdirSync as mkdirSync11, writeFileSync as writeFileSync8, appendFileSync as appendFileSync4 } from "node:fs";
|
|
492304
492484
|
import { join as join95 } from "node:path";
|
|
@@ -492438,7 +492618,7 @@ async function runWorkflow(input) {
|
|
|
492438
492618
|
scriptPath = input.scriptPath;
|
|
492439
492619
|
} else if (input.script !== undefined) {
|
|
492440
492620
|
scriptBody = input.script;
|
|
492441
|
-
const sha =
|
|
492621
|
+
const sha = createHash21("sha256").update(scriptBody).digest("hex").slice(0, 12);
|
|
492442
492622
|
scriptPath = join95(workflowsDir, "scripts", `${sha}.js`);
|
|
492443
492623
|
if (!existsSync8(scriptPath)) {
|
|
492444
492624
|
writeFileSync8(scriptPath, scriptBody, "utf8");
|
|
@@ -492824,7 +493004,7 @@ async function runWorkflow(input) {
|
|
|
492824
493004
|
return await withRetry2("tool", () => Promise.resolve(dispatch(name2, toolInput)), opts?.retry);
|
|
492825
493005
|
}
|
|
492826
493006
|
const phaseName = phaseStack[phaseStack.length - 1] ?? "";
|
|
492827
|
-
const key =
|
|
493007
|
+
const key = createHash21("sha256").update(`${runId}:${phaseName}:${JSON.stringify(toolInput)}`).digest("hex");
|
|
492828
493008
|
if (!state.idempotency_cache)
|
|
492829
493009
|
state.idempotency_cache = {};
|
|
492830
493010
|
if (Object.prototype.hasOwnProperty.call(state.idempotency_cache, key)) {
|
|
@@ -495521,11 +495701,19 @@ var init_prompt21 = __esm(() => {
|
|
|
495521
495701
|
|
|
495522
495702
|
// services/api/boundedInferenceTransport.ts
|
|
495523
495703
|
async function runBoundedInference(request) {
|
|
495704
|
+
const operation = new BoundedOperation(request.signal, request.operation ?? boundedOperationPolicy(900000), request.onActivity);
|
|
495705
|
+
try {
|
|
495706
|
+
return await runBoundedRequest(request, operation);
|
|
495707
|
+
} finally {
|
|
495708
|
+
operation.dispose();
|
|
495709
|
+
}
|
|
495710
|
+
}
|
|
495711
|
+
async function runBoundedRequest(request, operation) {
|
|
495524
495712
|
const fetchFn = request.fetchFn ?? fetch;
|
|
495525
495713
|
const path16 = request.clientProtocol === "anthropic_messages" ? "/messages" : "/chat/completions";
|
|
495526
495714
|
const base = request.gateway.url.replace(/\/+$/, "");
|
|
495527
495715
|
const url3 = base.endsWith("/v1") ? `${base}${path16}` : `${base}/v1${path16}`;
|
|
495528
|
-
const response = await fetchFn(url3, {
|
|
495716
|
+
const response = await operation.wait(() => fetchFn(url3, {
|
|
495529
495717
|
method: "POST",
|
|
495530
495718
|
headers: {
|
|
495531
495719
|
"Content-Type": "application/json",
|
|
@@ -495534,15 +495722,19 @@ async function runBoundedInference(request) {
|
|
|
495534
495722
|
...request.capabilityContext ? { "X-Margay-Capability-Context": request.capabilityContext } : {}
|
|
495535
495723
|
},
|
|
495536
495724
|
body: JSON.stringify(request.clientProtocol === "anthropic_messages" ? anthropicBody(request) : openAIBody(request)),
|
|
495537
|
-
signal:
|
|
495538
|
-
})
|
|
495725
|
+
signal: operation.signal
|
|
495726
|
+
}).then((response2) => {
|
|
495727
|
+
if (operation.signal.aborted)
|
|
495728
|
+
response2.body?.cancel().catch(() => {});
|
|
495729
|
+
return response2;
|
|
495730
|
+
}));
|
|
495539
495731
|
if (!response.ok) {
|
|
495732
|
+
const body = await boundedResponseText(response, operation);
|
|
495540
495733
|
if (response.status === 503) {
|
|
495541
|
-
const poolError = await parseGatewayCapabilityPoolExhausted(response.
|
|
495734
|
+
const poolError = await parseGatewayCapabilityPoolExhausted(new Response(body, { status: response.status, headers: response.headers }));
|
|
495542
495735
|
if (poolError)
|
|
495543
495736
|
throw poolError;
|
|
495544
495737
|
}
|
|
495545
|
-
const body = await response.text().catch(() => "(no body)");
|
|
495546
495738
|
const invalidContext = parseGatewayInvalidCapabilityContext(response.status, body);
|
|
495547
495739
|
if (invalidContext)
|
|
495548
495740
|
throw invalidContext;
|
|
@@ -495558,7 +495750,7 @@ async function runBoundedInference(request) {
|
|
|
495558
495750
|
throw new BoundedInferenceProtocolError("incomplete_stream", "Bounded inference response has no stream body");
|
|
495559
495751
|
}
|
|
495560
495752
|
observeGatewayContextResponse(request.model, response.headers);
|
|
495561
|
-
const parsed = request.clientProtocol === "anthropic_messages" ? await parseAnthropicStream(response.body) : await parseOpenAIStream(response.body);
|
|
495753
|
+
const parsed = request.clientProtocol === "anthropic_messages" ? await parseAnthropicStream(response.body, operation) : await parseOpenAIStream(response.body, operation);
|
|
495562
495754
|
if (!parsed.text) {
|
|
495563
495755
|
throw new BoundedInferenceProtocolError("empty_response", "Bounded inference returned no text");
|
|
495564
495756
|
}
|
|
@@ -495629,7 +495821,7 @@ function openAITextContent(content) {
|
|
|
495629
495821
|
}).join(`
|
|
495630
495822
|
`);
|
|
495631
495823
|
}
|
|
495632
|
-
async function parseAnthropicStream(body) {
|
|
495824
|
+
async function parseAnthropicStream(body, operation) {
|
|
495633
495825
|
const state = {
|
|
495634
495826
|
text: [],
|
|
495635
495827
|
model: undefined,
|
|
@@ -495642,12 +495834,15 @@ async function parseAnthropicStream(body) {
|
|
|
495642
495834
|
if (data === "[DONE]")
|
|
495643
495835
|
return;
|
|
495644
495836
|
const event = parseEvent(data);
|
|
495837
|
+
if (isAnthropicData(event))
|
|
495838
|
+
operation.data();
|
|
495645
495839
|
if (event.type === "message_start") {
|
|
495646
495840
|
state.model = stringOrUndefined(event.message?.model);
|
|
495647
495841
|
readAnthropicUsage(state.usage, event.message?.usage);
|
|
495648
495842
|
} else if (event.type === "content_block_start") {
|
|
495649
|
-
if (event.content_block?.type === "tool_use")
|
|
495650
|
-
|
|
495843
|
+
if (event.content_block?.type === "tool_use") {
|
|
495844
|
+
throw new BoundedInferenceProtocolError("tool_call_returned", "Bounded Anthropic response returned tool_use");
|
|
495845
|
+
}
|
|
495651
495846
|
if (event.content_block?.type === "text" && typeof event.content_block.text === "string") {
|
|
495652
495847
|
state.text.push(event.content_block.text);
|
|
495653
495848
|
}
|
|
@@ -495660,8 +495855,9 @@ async function parseAnthropicStream(body) {
|
|
|
495660
495855
|
readAnthropicUsage(state.usage, event.usage);
|
|
495661
495856
|
} else if (event.type === "message_stop") {
|
|
495662
495857
|
state.terminal = true;
|
|
495858
|
+
return true;
|
|
495663
495859
|
}
|
|
495664
|
-
});
|
|
495860
|
+
}, operation);
|
|
495665
495861
|
if (state.toolCall) {
|
|
495666
495862
|
throw new BoundedInferenceProtocolError("tool_call_returned", "Bounded Anthropic response returned tool_use");
|
|
495667
495863
|
}
|
|
@@ -495675,7 +495871,7 @@ async function parseAnthropicStream(body) {
|
|
|
495675
495871
|
usage: state.usage
|
|
495676
495872
|
};
|
|
495677
495873
|
}
|
|
495678
|
-
async function parseOpenAIStream(body) {
|
|
495874
|
+
async function parseOpenAIStream(body, operation) {
|
|
495679
495875
|
const state = {
|
|
495680
495876
|
text: [],
|
|
495681
495877
|
model: undefined,
|
|
@@ -495687,9 +495883,11 @@ async function parseOpenAIStream(body) {
|
|
|
495687
495883
|
await forEachSseData(body, (data) => {
|
|
495688
495884
|
if (data === "[DONE]") {
|
|
495689
495885
|
state.done = true;
|
|
495690
|
-
return;
|
|
495886
|
+
return true;
|
|
495691
495887
|
}
|
|
495692
495888
|
const event = parseEvent(data);
|
|
495889
|
+
if (isOpenAIData(event))
|
|
495890
|
+
operation.data();
|
|
495693
495891
|
state.model = stringOrUndefined(event.model) ?? state.model;
|
|
495694
495892
|
if (event.usage && typeof event.usage === "object") {
|
|
495695
495893
|
state.usage.inputTokens = numberOrZero(event.usage.prompt_tokens);
|
|
@@ -495699,14 +495897,14 @@ async function parseOpenAIStream(body) {
|
|
|
495699
495897
|
const choices = Array.isArray(event.choices) ? event.choices : [];
|
|
495700
495898
|
for (const choice of choices) {
|
|
495701
495899
|
if (Array.isArray(choice?.delta?.tool_calls) && choice.delta.tool_calls.length > 0) {
|
|
495702
|
-
|
|
495900
|
+
throw new BoundedInferenceProtocolError("tool_call_returned", "Bounded OpenAI response returned tool_calls");
|
|
495703
495901
|
}
|
|
495704
495902
|
if (typeof choice?.delta?.content === "string")
|
|
495705
495903
|
state.text.push(choice.delta.content);
|
|
495706
495904
|
if (typeof choice?.finish_reason === "string")
|
|
495707
495905
|
state.stopReason = choice.finish_reason;
|
|
495708
495906
|
}
|
|
495709
|
-
});
|
|
495907
|
+
}, operation);
|
|
495710
495908
|
if (state.toolCall) {
|
|
495711
495909
|
throw new BoundedInferenceProtocolError("tool_call_returned", "Bounded OpenAI response returned tool_calls");
|
|
495712
495910
|
}
|
|
@@ -495720,37 +495918,32 @@ async function parseOpenAIStream(body) {
|
|
|
495720
495918
|
usage: state.usage
|
|
495721
495919
|
};
|
|
495722
495920
|
}
|
|
495723
|
-
async function forEachSseData(body, visit2) {
|
|
495921
|
+
async function forEachSseData(body, visit2, operation) {
|
|
495724
495922
|
const reader = body.getReader();
|
|
495725
495923
|
const decoder = new TextDecoder;
|
|
495726
495924
|
let buffer = "";
|
|
495925
|
+
const line = (value) => {
|
|
495926
|
+
operation.check();
|
|
495927
|
+
return value.startsWith("data:") && visit2(value.slice(5).trim()) === true;
|
|
495928
|
+
};
|
|
495727
495929
|
try {
|
|
495728
|
-
|
|
495729
|
-
const { done, value } = await reader.read();
|
|
495930
|
+
for (;; ) {
|
|
495931
|
+
const { done, value } = await operation.wait(() => reader.read());
|
|
495730
495932
|
if (done)
|
|
495731
495933
|
break;
|
|
495732
495934
|
buffer += decoder.decode(value, { stream: true });
|
|
495733
|
-
const
|
|
495734
|
-
|
|
495935
|
+
const lines = buffer.split(`
|
|
495735
495936
|
`);
|
|
495736
|
-
buffer =
|
|
495737
|
-
for (const
|
|
495738
|
-
|
|
495739
|
-
|
|
495740
|
-
if (line.startsWith("data:"))
|
|
495741
|
-
visit2(line.slice(5).trim());
|
|
495742
|
-
}
|
|
495743
|
-
}
|
|
495937
|
+
buffer = lines.pop() ?? "";
|
|
495938
|
+
for (const value2 of lines)
|
|
495939
|
+
if (line(value2.replace(/\r$/, "")))
|
|
495940
|
+
return;
|
|
495744
495941
|
}
|
|
495745
495942
|
buffer += decoder.decode();
|
|
495746
|
-
if (buffer.trim())
|
|
495747
|
-
|
|
495748
|
-
`)) {
|
|
495749
|
-
if (line.startsWith("data:"))
|
|
495750
|
-
visit2(line.slice(5).trim());
|
|
495751
|
-
}
|
|
495752
|
-
}
|
|
495943
|
+
if (buffer.trim())
|
|
495944
|
+
line(buffer.trim());
|
|
495753
495945
|
} finally {
|
|
495946
|
+
cancelReader(reader);
|
|
495754
495947
|
reader.releaseLock();
|
|
495755
495948
|
}
|
|
495756
495949
|
}
|
|
@@ -495791,6 +495984,7 @@ function stringOrUndefined(value) {
|
|
|
495791
495984
|
}
|
|
495792
495985
|
var BoundedInferenceProtocolError;
|
|
495793
495986
|
var init_boundedInferenceTransport = __esm(() => {
|
|
495987
|
+
init_boundedOperation();
|
|
495794
495988
|
init_dynamicContextWindow();
|
|
495795
495989
|
init_gatewayTransport();
|
|
495796
495990
|
BoundedInferenceProtocolError = class BoundedInferenceProtocolError extends Error {
|
|
@@ -495938,7 +496132,7 @@ var init_AgentTool = __esm(() => {
|
|
|
495938
496132
|
mode: permissionModeSchema().optional().describe('Permission mode for spawned teammate (e.g., "plan" to require plan approval).')
|
|
495939
496133
|
});
|
|
495940
496134
|
return baseInputSchema().merge(multiAgentInputSchema).extend({
|
|
495941
|
-
isolation: ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
496135
|
+
isolation: ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? z77.enum(["worktree", "remote"]) : z77.enum(["worktree"])).optional().describe({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.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.'),
|
|
495942
496136
|
cwd: z77.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".')
|
|
495943
496137
|
});
|
|
495944
496138
|
});
|
|
@@ -496058,16 +496252,29 @@ var init_AgentTool = __esm(() => {
|
|
|
496058
496252
|
if (run_in_background || name2 || team_name || isolation || cwd2) {
|
|
496059
496253
|
throw new Error("visual-ui-analysis is a synchronous one-shot specialist and cannot be backgrounded, named, teamed, or isolated");
|
|
496060
496254
|
}
|
|
496255
|
+
const visualAgentId = createAgentId();
|
|
496061
496256
|
const result = await runVisualSpecialistForAgentTool({
|
|
496062
496257
|
prompt,
|
|
496063
496258
|
imagePaths: image_paths,
|
|
496064
496259
|
mode: visualRoutingMode(),
|
|
496065
|
-
signal: toolUseContext.abortController.signal
|
|
496260
|
+
signal: toolUseContext.abortController.signal,
|
|
496261
|
+
onActivity: (event) => {
|
|
496262
|
+
if (toolUseContext.abortController.signal.aborted)
|
|
496263
|
+
return;
|
|
496264
|
+
onProgress?.({
|
|
496265
|
+
toolUseID: `agent_${assistantMessage.message.id}`,
|
|
496266
|
+
data: {
|
|
496267
|
+
type: "agent_progress",
|
|
496268
|
+
agentId: visualAgentId,
|
|
496269
|
+
boundedStatus: event
|
|
496270
|
+
}
|
|
496271
|
+
});
|
|
496272
|
+
}
|
|
496066
496273
|
}, toolUseContext, canUseTool, assistantMessage);
|
|
496067
496274
|
const completed = {
|
|
496068
496275
|
status: "completed",
|
|
496069
496276
|
prompt,
|
|
496070
|
-
agentId:
|
|
496277
|
+
agentId: visualAgentId,
|
|
496071
496278
|
agentType: subagent_type,
|
|
496072
496279
|
content: [{ type: "text", text: result.text }],
|
|
496073
496280
|
totalToolUseCount: 0,
|
|
@@ -496203,7 +496410,7 @@ var init_AgentTool = __esm(() => {
|
|
|
496203
496410
|
is_fork: isForkPath
|
|
496204
496411
|
});
|
|
496205
496412
|
const effectiveIsolation = isolation ?? selectedAgent.isolation;
|
|
496206
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
496413
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && effectiveIsolation === "remote") {
|
|
496207
496414
|
const eligibility = await checkRemoteAgentEligibility();
|
|
496208
496415
|
if (!eligibility.eligible) {
|
|
496209
496416
|
const reasons = eligibility.errors.map(formatPreconditionError).join(`
|
|
@@ -496278,7 +496485,7 @@ ${reasons}`);
|
|
|
496278
496485
|
});
|
|
496279
496486
|
if (selectedAgent.memory) {
|
|
496280
496487
|
logEvent("tengu_agent_memory_loaded", {
|
|
496281
|
-
...{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
496488
|
+
...{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && {
|
|
496282
496489
|
agent_type: selectedAgent.agentType
|
|
496283
496490
|
},
|
|
496284
496491
|
scope: selectedAgent.memory,
|
|
@@ -496869,7 +497076,7 @@ ${finalMessage}`;
|
|
|
496869
497076
|
},
|
|
496870
497077
|
async checkPermissions(input, context2) {
|
|
496871
497078
|
const appState = context2.getAppState();
|
|
496872
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
497079
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && appState.toolPermissionContext.mode === "auto") {
|
|
496873
497080
|
return {
|
|
496874
497081
|
behavior: "passthrough",
|
|
496875
497082
|
message: "Agent tool requires permission to spawn sub-agents."
|
|
@@ -506277,6 +506484,7 @@ var init_taskErrorRecovery = __esm(() => {
|
|
|
506277
506484
|
function initialClientToolProtocolRecoveryState() {
|
|
506278
506485
|
return {
|
|
506279
506486
|
sameModelRetryUsed: false,
|
|
506487
|
+
currentRouteRetryUsed: false,
|
|
506280
506488
|
heterogeneousFallbackUsed: false
|
|
506281
506489
|
};
|
|
506282
506490
|
}
|
|
@@ -506285,7 +506493,8 @@ function decideClientToolProtocolRecovery({
|
|
|
506285
506493
|
state,
|
|
506286
506494
|
currentModel,
|
|
506287
506495
|
fallbackModel,
|
|
506288
|
-
toolStates
|
|
506496
|
+
toolStates,
|
|
506497
|
+
alternateDeploymentUnavailable = false
|
|
506289
506498
|
}) {
|
|
506290
506499
|
if (toolStates.length > 0 && toolStates.every((tool) => tool.status === "executing" || tool.status === "completed" || tool.status === "yielded")) {
|
|
506291
506500
|
return { action: "reconcile" };
|
|
@@ -506293,8 +506502,10 @@ function decideClientToolProtocolRecovery({
|
|
|
506293
506502
|
if (error5.toolExecuted || toolStates.length > 0) {
|
|
506294
506503
|
return { action: "fail_side_effect_observed" };
|
|
506295
506504
|
}
|
|
506505
|
+
if (state.heterogeneousFallbackUsed)
|
|
506506
|
+
return { action: "fail_exhausted" };
|
|
506296
506507
|
const servedDeployment = error5.servedDeployment?.trim();
|
|
506297
|
-
if (!state.sameModelRetryUsed && servedDeployment) {
|
|
506508
|
+
if (!alternateDeploymentUnavailable && !state.sameModelRetryUsed && servedDeployment) {
|
|
506298
506509
|
return {
|
|
506299
506510
|
action: "retry_same_model",
|
|
506300
506511
|
avoidDeployment: servedDeployment,
|
|
@@ -506304,6 +506515,12 @@ function decideClientToolProtocolRecovery({
|
|
|
506304
506515
|
}
|
|
506305
506516
|
};
|
|
506306
506517
|
}
|
|
506518
|
+
if (!state.currentRouteRetryUsed && (alternateDeploymentUnavailable || !state.sameModelRetryUsed && !servedDeployment)) {
|
|
506519
|
+
return {
|
|
506520
|
+
action: "retry_current_route",
|
|
506521
|
+
nextState: { ...state, sameModelRetryUsed: true, currentRouteRetryUsed: true }
|
|
506522
|
+
};
|
|
506523
|
+
}
|
|
506307
506524
|
const heterogeneousModel = fallbackModel?.trim();
|
|
506308
506525
|
if (!state.heterogeneousFallbackUsed && heterogeneousModel && heterogeneousModel !== currentModel) {
|
|
506309
506526
|
return {
|
|
@@ -507282,6 +507499,30 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
507282
507499
|
let avoidGatewayDeployment;
|
|
507283
507500
|
let capabilityContextRefreshCount = 0;
|
|
507284
507501
|
let lastClientToolProtocolError;
|
|
507502
|
+
let originalClientToolProtocolError;
|
|
507503
|
+
let clientToolProtocolAttempt = 0;
|
|
507504
|
+
let clientToolProtocolRetries = 0;
|
|
507505
|
+
const logProtocolRecovery = (decision, rejected, toolStates, recoveryErrorCode) => {
|
|
507506
|
+
const original = originalClientToolProtocolError ?? rejected;
|
|
507507
|
+
const safe = (value) => value == null ? null : sanitizeErrorText(value).slice(0, 256);
|
|
507508
|
+
logForDebugging(`[ClientToolProtocolRecovery] ${JSON.stringify({
|
|
507509
|
+
source: safe(querySource),
|
|
507510
|
+
original_code: original.code,
|
|
507511
|
+
rejection_code: rejected.code,
|
|
507512
|
+
recovery_error_code: safe(recoveryErrorCode),
|
|
507513
|
+
stop_reason: safe(original.observedStopReason),
|
|
507514
|
+
client_tool_count: original.clientToolCount,
|
|
507515
|
+
tool_executed: rejected.toolExecuted || toolStates.length > 0,
|
|
507516
|
+
tool_states: toolStates.map((tool) => tool.status),
|
|
507517
|
+
request_id: safe(original.requestId),
|
|
507518
|
+
upstream_request_id: safe(original.upstreamRequestId),
|
|
507519
|
+
served_model: safe(original.servedModel),
|
|
507520
|
+
served_deployment: safe(original.servedDeployment),
|
|
507521
|
+
action: decision.action,
|
|
507522
|
+
attempt: ++clientToolProtocolAttempt,
|
|
507523
|
+
capability_context_present: !!toolUseContext.options.capabilityContext
|
|
507524
|
+
})}`);
|
|
507525
|
+
};
|
|
507285
507526
|
let endpointOverrides = {};
|
|
507286
507527
|
let currentEndpointName = toolUseContext.getAppState().currentEndpoint;
|
|
507287
507528
|
if (currentEndpointName) {
|
|
@@ -507522,6 +507763,7 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
507522
507763
|
}
|
|
507523
507764
|
if (innerError instanceof ClientToolProtocolTurnError) {
|
|
507524
507765
|
lastClientToolProtocolError = innerError;
|
|
507766
|
+
originalClientToolProtocolError ??= innerError;
|
|
507525
507767
|
const toolStates = streamingToolExecutor?.getSafeStateSnapshot() ?? [];
|
|
507526
507768
|
const decision = decideClientToolProtocolRecovery({
|
|
507527
507769
|
error: innerError,
|
|
@@ -507530,18 +507772,19 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
507530
507772
|
fallbackModel,
|
|
507531
507773
|
toolStates
|
|
507532
507774
|
});
|
|
507775
|
+
logProtocolRecovery(decision, innerError, toolStates);
|
|
507533
507776
|
logEvent("tengu_client_tool_protocol_recovery", {
|
|
507534
507777
|
action: decision.action,
|
|
507535
507778
|
code: innerError.code,
|
|
507536
507779
|
stop_reason: innerError.observedStopReason ?? "missing",
|
|
507537
507780
|
client_tool_count: innerError.clientToolCount,
|
|
507538
|
-
tool_executed:
|
|
507781
|
+
tool_executed: innerError.toolExecuted || toolStates.length > 0,
|
|
507539
507782
|
request_id: innerError.requestId ?? "unknown",
|
|
507540
507783
|
upstream_request_id: innerError.upstreamRequestId ?? "unknown",
|
|
507541
507784
|
served_model: innerError.servedModel ?? "unknown",
|
|
507542
507785
|
served_deployment: innerError.servedDeployment ?? "unknown"
|
|
507543
507786
|
});
|
|
507544
|
-
if (decision.action === "retry_same_model" || decision.action === "retry_heterogeneous") {
|
|
507787
|
+
if (decision.action === "retry_same_model" || decision.action === "retry_current_route" || decision.action === "retry_heterogeneous") {
|
|
507545
507788
|
const tombstones = resetIncompleteStreamAttempt({
|
|
507546
507789
|
assistantMessages,
|
|
507547
507790
|
toolResults,
|
|
@@ -507553,8 +507796,11 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
507553
507796
|
needsFollowUp = false;
|
|
507554
507797
|
streamingToolExecutor = useStreamingToolExecution ? new StreamingToolExecutor(toolUseContext.options.tools, canUseTool, toolUseContext) : null;
|
|
507555
507798
|
clientToolProtocolRecoveryState = decision.nextState;
|
|
507799
|
+
clientToolProtocolRetries++;
|
|
507556
507800
|
if (decision.action === "retry_same_model") {
|
|
507557
507801
|
avoidGatewayDeployment = decision.avoidDeployment;
|
|
507802
|
+
} else if (decision.action === "retry_current_route") {
|
|
507803
|
+
avoidGatewayDeployment = undefined;
|
|
507558
507804
|
} else {
|
|
507559
507805
|
avoidGatewayDeployment = undefined;
|
|
507560
507806
|
currentModel = decision.model;
|
|
@@ -507574,7 +507820,7 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
507574
507820
|
errorDetails: innerError.code,
|
|
507575
507821
|
recovery: {
|
|
507576
507822
|
status: sideEffectObserved ? "needs_user" : "blocked_external",
|
|
507577
|
-
attempts:
|
|
507823
|
+
attempts: clientToolProtocolRetries,
|
|
507578
507824
|
reason: sideEffectObserved ? "Automatic replay is unsafe or the recovery allowance is exhausted. Inspect the preserved tool outcome before authorizing a new operation." : "Configured protocol recovery attempts are exhausted. Resume when a compatible model or deployment is available."
|
|
507579
507825
|
}
|
|
507580
507826
|
});
|
|
@@ -507582,13 +507828,16 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
507582
507828
|
return { reason: "model_error", error: innerError };
|
|
507583
507829
|
}
|
|
507584
507830
|
if (innerError instanceof GatewayAlternateDeploymentUnavailableError && lastClientToolProtocolError) {
|
|
507831
|
+
const toolStates = streamingToolExecutor?.getSafeStateSnapshot() ?? [];
|
|
507585
507832
|
const decision = decideClientToolProtocolRecovery({
|
|
507586
507833
|
error: lastClientToolProtocolError,
|
|
507587
507834
|
state: clientToolProtocolRecoveryState,
|
|
507588
507835
|
currentModel,
|
|
507589
507836
|
fallbackModel,
|
|
507590
|
-
toolStates
|
|
507837
|
+
toolStates,
|
|
507838
|
+
alternateDeploymentUnavailable: true
|
|
507591
507839
|
});
|
|
507840
|
+
logProtocolRecovery(decision, lastClientToolProtocolError, toolStates, innerError.code);
|
|
507592
507841
|
logEvent("tengu_client_tool_protocol_recovery", {
|
|
507593
507842
|
action: decision.action,
|
|
507594
507843
|
code: innerError.code,
|
|
@@ -507600,7 +507849,7 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
507600
507849
|
served_model: lastClientToolProtocolError.servedModel ?? "unknown",
|
|
507601
507850
|
served_deployment: lastClientToolProtocolError.servedDeployment ?? "unknown"
|
|
507602
507851
|
});
|
|
507603
|
-
if (decision.action === "retry_heterogeneous") {
|
|
507852
|
+
if (decision.action === "retry_current_route" || decision.action === "retry_heterogeneous") {
|
|
507604
507853
|
const tombstones = resetIncompleteStreamAttempt({
|
|
507605
507854
|
assistantMessages,
|
|
507606
507855
|
toolResults,
|
|
@@ -507612,23 +507861,26 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
507612
507861
|
needsFollowUp = false;
|
|
507613
507862
|
streamingToolExecutor = useStreamingToolExecution ? new StreamingToolExecutor(toolUseContext.options.tools, canUseTool, toolUseContext) : null;
|
|
507614
507863
|
clientToolProtocolRecoveryState = decision.nextState;
|
|
507864
|
+
clientToolProtocolRetries++;
|
|
507615
507865
|
avoidGatewayDeployment = undefined;
|
|
507616
|
-
|
|
507617
|
-
|
|
507618
|
-
|
|
507619
|
-
|
|
507866
|
+
if (decision.action === "retry_heterogeneous") {
|
|
507867
|
+
currentModel = decision.model;
|
|
507868
|
+
toolUseContext.options.mainLoopModel = decision.model;
|
|
507869
|
+
if (process.env.USER_TYPE === "ant") {
|
|
507870
|
+
messagesForQuery = stripSignatureBlocks(messagesForQuery);
|
|
507871
|
+
}
|
|
507620
507872
|
}
|
|
507621
507873
|
attemptWithFallback = true;
|
|
507622
507874
|
continue;
|
|
507623
507875
|
}
|
|
507624
507876
|
yield createAssistantAPIErrorMessage({
|
|
507625
|
-
content: "The model returned an inconsistent client-tool turn and
|
|
507877
|
+
content: "The model returned an inconsistent client-tool turn and the available protocol recovery attempts were exhausted. No tool from those responses was executed. Retry with another model or provider to continue.",
|
|
507626
507878
|
apiError: "tool_use_protocol_error",
|
|
507627
507879
|
error: "server_error",
|
|
507628
|
-
errorDetails:
|
|
507880
|
+
errorDetails: originalClientToolProtocolError?.code ?? lastClientToolProtocolError.code,
|
|
507629
507881
|
recovery: {
|
|
507630
507882
|
status: "blocked_external",
|
|
507631
|
-
attempts:
|
|
507883
|
+
attempts: clientToolProtocolRetries,
|
|
507632
507884
|
reason: "No configured alternate deployment or eligible fallback is available. Resume when a compatible route recovers."
|
|
507633
507885
|
}
|
|
507634
507886
|
});
|
|
@@ -508461,9 +508713,9 @@ function getAnthropicEnvMetadata() {
|
|
|
508461
508713
|
};
|
|
508462
508714
|
}
|
|
508463
508715
|
function getBuildAgeMinutes() {
|
|
508464
|
-
if (!{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
508716
|
+
if (!{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.BUILD_TIME)
|
|
508465
508717
|
return;
|
|
508466
|
-
const buildTime = new Date({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
508718
|
+
const buildTime = new Date({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.BUILD_TIME).getTime();
|
|
508467
508719
|
if (isNaN(buildTime))
|
|
508468
508720
|
return;
|
|
508469
508721
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -509206,7 +509458,15 @@ async function stream3PCompactDirect(options) {
|
|
|
509206
509458
|
if (options.clientProtocol === "openai_chat_completions") {
|
|
509207
509459
|
return streamOpenAICompactDirect(options);
|
|
509208
509460
|
}
|
|
509209
|
-
const
|
|
509461
|
+
const operation = new BoundedOperation(options.signal, options.operation ?? boundedOperationPolicy(1800000), options.onActivity);
|
|
509462
|
+
try {
|
|
509463
|
+
return await streamAnthropicCompactDirect(options, operation);
|
|
509464
|
+
} finally {
|
|
509465
|
+
operation.dispose();
|
|
509466
|
+
}
|
|
509467
|
+
}
|
|
509468
|
+
async function streamAnthropicCompactDirect(options, operation) {
|
|
509469
|
+
const { credentials, model, messages, systemPrompt, maxOutputTokens } = options;
|
|
509210
509470
|
const apiMessages = messages.map((m4) => ({
|
|
509211
509471
|
role: m4.message?.role ?? (m4.type === "user" ? "user" : "assistant"),
|
|
509212
509472
|
content: m4.message?.content
|
|
@@ -509221,7 +509481,7 @@ async function stream3PCompactDirect(options) {
|
|
|
509221
509481
|
const url3 = `${credentials.baseUrl.replace(/\/+$/, "")}/v1/messages`;
|
|
509222
509482
|
logForDebugging(`[3P-compact-direct] POST ${url3} model=${model} max_tokens=${maxOutputTokens}`);
|
|
509223
509483
|
const fetchOptions = getProxyFetchOptions({ forAnthropicAPI: false });
|
|
509224
|
-
const response = await fetch(url3, {
|
|
509484
|
+
const response = await operation.wait(() => fetch(url3, {
|
|
509225
509485
|
method: "POST",
|
|
509226
509486
|
headers: {
|
|
509227
509487
|
"Content-Type": "application/json",
|
|
@@ -509233,19 +509493,23 @@ async function stream3PCompactDirect(options) {
|
|
|
509233
509493
|
...options.capabilityContext ? { "X-Margay-Capability-Context": options.capabilityContext } : {}
|
|
509234
509494
|
},
|
|
509235
509495
|
body: JSON.stringify(body),
|
|
509236
|
-
|
|
509237
|
-
|
|
509238
|
-
})
|
|
509496
|
+
...fetchOptions,
|
|
509497
|
+
signal: operation.signal
|
|
509498
|
+
}).then((response2) => {
|
|
509499
|
+
if (operation.signal.aborted)
|
|
509500
|
+
response2.body?.cancel().catch(() => {});
|
|
509501
|
+
return response2;
|
|
509502
|
+
}));
|
|
509239
509503
|
if (!response.ok) {
|
|
509504
|
+
const errorText = await boundedResponseText(response, operation);
|
|
509240
509505
|
if (response.status === 503) {
|
|
509241
|
-
const poolError = await parseGatewayCapabilityPoolExhausted(response.
|
|
509506
|
+
const poolError = await parseGatewayCapabilityPoolExhausted(new Response(errorText, { status: response.status, headers: response.headers }));
|
|
509242
509507
|
if (poolError)
|
|
509243
509508
|
throw poolError;
|
|
509244
|
-
const providerUnavailableError = await parseGatewayModelProviderUnavailable(response.
|
|
509509
|
+
const providerUnavailableError = await parseGatewayModelProviderUnavailable(new Response(errorText, { status: response.status, headers: response.headers }));
|
|
509245
509510
|
if (providerUnavailableError)
|
|
509246
509511
|
throw providerUnavailableError;
|
|
509247
509512
|
}
|
|
509248
|
-
const errorText = await response.text().catch(() => "(no body)");
|
|
509249
509513
|
logForDebugging(`[3P-compact-direct] HTTP ${response.status}: ${errorText}`, { level: "error" });
|
|
509250
509514
|
const contextCapabilityError = parseGatewayContextCapabilityUnavailable(response.status, errorText);
|
|
509251
509515
|
if (contextCapabilityError)
|
|
@@ -509281,96 +509545,101 @@ async function stream3PCompactDirect(options) {
|
|
|
509281
509545
|
const decoder = new TextDecoder;
|
|
509282
509546
|
let buffer = "";
|
|
509283
509547
|
try {
|
|
509284
|
-
|
|
509285
|
-
|
|
509286
|
-
|
|
509287
|
-
|
|
509288
|
-
|
|
509289
|
-
|
|
509548
|
+
streamLoop:
|
|
509549
|
+
while (true) {
|
|
509550
|
+
const { done, value } = await operation.wait(() => reader.read());
|
|
509551
|
+
if (done)
|
|
509552
|
+
break;
|
|
509553
|
+
buffer += decoder.decode(value, { stream: true });
|
|
509554
|
+
const lines = buffer.split(`
|
|
509290
509555
|
`);
|
|
509291
|
-
|
|
509292
|
-
|
|
509293
|
-
|
|
509294
|
-
|
|
509295
|
-
|
|
509296
|
-
|
|
509297
|
-
|
|
509298
|
-
|
|
509299
|
-
|
|
509300
|
-
|
|
509301
|
-
|
|
509302
|
-
|
|
509303
|
-
}
|
|
509304
|
-
if (typeof event.type === "string")
|
|
509305
|
-
lastEventType = event.type;
|
|
509306
|
-
switch (event.type) {
|
|
509307
|
-
case "message_start": {
|
|
509308
|
-
responseModel = event.message?.model;
|
|
509309
|
-
if (event.message?.usage) {
|
|
509310
|
-
inputTokens = event.message.usage.input_tokens ?? 0;
|
|
509311
|
-
cacheReadInputTokens = event.message.usage.cache_read_input_tokens ?? 0;
|
|
509312
|
-
cacheCreationInputTokens = event.message.usage.cache_creation_input_tokens ?? 0;
|
|
509313
|
-
}
|
|
509314
|
-
break;
|
|
509556
|
+
buffer = lines.pop() ?? "";
|
|
509557
|
+
for (const line of lines) {
|
|
509558
|
+
if (!line.startsWith("data:"))
|
|
509559
|
+
continue;
|
|
509560
|
+
const data = line.slice(5).trim();
|
|
509561
|
+
if (data === "[DONE]")
|
|
509562
|
+
continue;
|
|
509563
|
+
let event;
|
|
509564
|
+
try {
|
|
509565
|
+
event = JSON.parse(data);
|
|
509566
|
+
} catch {
|
|
509567
|
+
continue;
|
|
509315
509568
|
}
|
|
509316
|
-
|
|
509317
|
-
|
|
509318
|
-
|
|
509319
|
-
|
|
509320
|
-
|
|
509569
|
+
operation.check();
|
|
509570
|
+
if (isAnthropicData(event))
|
|
509571
|
+
operation.data();
|
|
509572
|
+
if (typeof event.type === "string")
|
|
509573
|
+
lastEventType = event.type;
|
|
509574
|
+
switch (event.type) {
|
|
509575
|
+
case "message_start": {
|
|
509576
|
+
responseModel = event.message?.model;
|
|
509577
|
+
if (event.message?.usage) {
|
|
509578
|
+
inputTokens = event.message.usage.input_tokens ?? 0;
|
|
509579
|
+
cacheReadInputTokens = event.message.usage.cache_read_input_tokens ?? 0;
|
|
509580
|
+
cacheCreationInputTokens = event.message.usage.cache_creation_input_tokens ?? 0;
|
|
509581
|
+
}
|
|
509582
|
+
break;
|
|
509321
509583
|
}
|
|
509322
|
-
|
|
509323
|
-
|
|
509324
|
-
|
|
509325
|
-
|
|
509326
|
-
|
|
509327
|
-
hasStartedStreaming = true;
|
|
509328
|
-
options.setStreamMode?.("responding");
|
|
509584
|
+
case "content_block_start": {
|
|
509585
|
+
openContentBlocks++;
|
|
509586
|
+
currentBlockType = event.content_block?.type ?? null;
|
|
509587
|
+
if (event.content_block?.type === "redacted_thinking") {
|
|
509588
|
+
contentBlocks.push(event.content_block);
|
|
509329
509589
|
}
|
|
509330
|
-
|
|
509331
|
-
const len = event.delta.text.length;
|
|
509332
|
-
options.setResponseLength?.((l2) => l2 + len);
|
|
509590
|
+
break;
|
|
509333
509591
|
}
|
|
509334
|
-
|
|
509335
|
-
|
|
509336
|
-
|
|
509337
|
-
|
|
509338
|
-
|
|
509339
|
-
|
|
509340
|
-
|
|
509341
|
-
|
|
509592
|
+
case "content_block_delta": {
|
|
509593
|
+
if (event.delta?.type === "text_delta" && event.delta.text) {
|
|
509594
|
+
if (!hasStartedStreaming) {
|
|
509595
|
+
hasStartedStreaming = true;
|
|
509596
|
+
options.setStreamMode?.("responding");
|
|
509597
|
+
}
|
|
509598
|
+
textParts.push(event.delta.text);
|
|
509599
|
+
const len = event.delta.text.length;
|
|
509600
|
+
options.setResponseLength?.((l2) => l2 + len);
|
|
509601
|
+
}
|
|
509602
|
+
break;
|
|
509342
509603
|
}
|
|
509343
|
-
|
|
509344
|
-
|
|
509345
|
-
|
|
509346
|
-
|
|
509347
|
-
|
|
509348
|
-
|
|
509349
|
-
|
|
509350
|
-
openContentBlocks = Math.max(0, openContentBlocks - 1);
|
|
509351
|
-
closedContentBlocks++;
|
|
509352
|
-
currentBlockType = null;
|
|
509353
|
-
break;
|
|
509354
|
-
}
|
|
509355
|
-
case "error": {
|
|
509356
|
-
if (event.margay?.code === "incomplete_upstream_stream") {
|
|
509357
|
-
upstreamIncomplete = true;
|
|
509604
|
+
case "message_delta": {
|
|
509605
|
+
stopReason = event.delta?.stop_reason ?? null;
|
|
509606
|
+
if (event.usage) {
|
|
509607
|
+
outputTokens = event.usage.output_tokens ?? outputTokens;
|
|
509608
|
+
cacheReadInputTokens = event.usage.cache_read_input_tokens ?? cacheReadInputTokens;
|
|
509609
|
+
cacheCreationInputTokens = event.usage.cache_creation_input_tokens ?? cacheCreationInputTokens;
|
|
509610
|
+
}
|
|
509358
509611
|
break;
|
|
509359
509612
|
}
|
|
509360
|
-
|
|
509361
|
-
|
|
509362
|
-
|
|
509363
|
-
|
|
509364
|
-
|
|
509365
|
-
|
|
509366
|
-
|
|
509613
|
+
case "message_stop": {
|
|
509614
|
+
terminalComplete = true;
|
|
509615
|
+
break streamLoop;
|
|
509616
|
+
}
|
|
509617
|
+
case "content_block_stop": {
|
|
509618
|
+
openContentBlocks = Math.max(0, openContentBlocks - 1);
|
|
509619
|
+
closedContentBlocks++;
|
|
509620
|
+
currentBlockType = null;
|
|
509621
|
+
break;
|
|
509622
|
+
}
|
|
509623
|
+
case "error": {
|
|
509624
|
+
if (event.margay?.code === "incomplete_upstream_stream") {
|
|
509625
|
+
upstreamIncomplete = true;
|
|
509626
|
+
break;
|
|
509367
509627
|
}
|
|
509368
|
-
|
|
509628
|
+
throw new GatewayStreamProtocolError("upstream_stream_error", "3P compact: gateway stream error", {
|
|
509629
|
+
lastEventType,
|
|
509630
|
+
partialUsage: {
|
|
509631
|
+
input_tokens: inputTokens,
|
|
509632
|
+
output_tokens: outputTokens,
|
|
509633
|
+
cache_read_input_tokens: cacheReadInputTokens,
|
|
509634
|
+
cache_creation_input_tokens: cacheCreationInputTokens
|
|
509635
|
+
}
|
|
509636
|
+
});
|
|
509637
|
+
}
|
|
509369
509638
|
}
|
|
509370
509639
|
}
|
|
509371
509640
|
}
|
|
509372
|
-
}
|
|
509373
509641
|
} finally {
|
|
509642
|
+
cancelReader(reader);
|
|
509374
509643
|
reader.releaseLock();
|
|
509375
509644
|
}
|
|
509376
509645
|
if (!terminalComplete) {
|
|
@@ -509449,7 +509718,9 @@ async function streamOpenAICompactDirect(options) {
|
|
|
509449
509718
|
maxOutputTokens: options.maxOutputTokens,
|
|
509450
509719
|
...options.minimumContextTokens !== undefined ? { minimumContextTokens: options.minimumContextTokens } : {},
|
|
509451
509720
|
...options.capabilityContext ? { capabilityContext: options.capabilityContext } : {},
|
|
509452
|
-
signal: options.signal
|
|
509721
|
+
signal: options.signal,
|
|
509722
|
+
operation: options.operation ?? boundedOperationPolicy(1800000),
|
|
509723
|
+
onActivity: options.onActivity
|
|
509453
509724
|
});
|
|
509454
509725
|
options.setStreamMode?.("responding");
|
|
509455
509726
|
options.setResponseLength?.(() => result.text.length);
|
|
@@ -509473,6 +509744,7 @@ async function streamOpenAICompactDirect(options) {
|
|
|
509473
509744
|
};
|
|
509474
509745
|
}
|
|
509475
509746
|
var init_thirdPartyCompactTransport = __esm(() => {
|
|
509747
|
+
init_boundedOperation();
|
|
509476
509748
|
init_auth2();
|
|
509477
509749
|
init_auth2();
|
|
509478
509750
|
init_debug();
|
|
@@ -510086,33 +510358,32 @@ function stripToolBlocksFromMessages(messages) {
|
|
|
510086
510358
|
const content = msg.message.content;
|
|
510087
510359
|
if (!Array.isArray(content))
|
|
510088
510360
|
return msg;
|
|
510089
|
-
|
|
510090
|
-
|
|
510091
|
-
|
|
510092
|
-
|
|
510093
|
-
if (msg.type === "assistant") {
|
|
510361
|
+
let changed = false;
|
|
510362
|
+
const projected = content.map((block) => {
|
|
510363
|
+
if (block.type === "tool_use") {
|
|
510364
|
+
changed = true;
|
|
510094
510365
|
return {
|
|
510095
|
-
|
|
510096
|
-
|
|
510097
|
-
|
|
510098
|
-
content: [
|
|
510099
|
-
{ type: "text", text: "(tool interaction omitted)" }
|
|
510100
|
-
]
|
|
510101
|
-
}
|
|
510366
|
+
type: "text",
|
|
510367
|
+
text: `[Tool use: ${block.name}; id: ${block.id}]
|
|
510368
|
+
Input: ${JSON.stringify(block.input)}`
|
|
510102
510369
|
};
|
|
510103
510370
|
}
|
|
510104
|
-
|
|
510105
|
-
|
|
510106
|
-
|
|
510107
|
-
|
|
510108
|
-
|
|
510109
|
-
|
|
510110
|
-
]
|
|
510111
|
-
|
|
510112
|
-
|
|
510113
|
-
|
|
510114
|
-
|
|
510115
|
-
|
|
510371
|
+
if (block.type === "tool_result") {
|
|
510372
|
+
changed = true;
|
|
510373
|
+
const result = typeof block.content === "string" ? block.content : (block.content ?? []).map((part) => part.type === "text" ? part.text : `[${part.type} omitted]`).join(`
|
|
510374
|
+
`);
|
|
510375
|
+
return {
|
|
510376
|
+
type: "text",
|
|
510377
|
+
text: `[Tool result: ${block.tool_use_id}; status: ${block.is_error ? "error" : "success"}]
|
|
510378
|
+
${result}`
|
|
510379
|
+
};
|
|
510380
|
+
}
|
|
510381
|
+
return block;
|
|
510382
|
+
});
|
|
510383
|
+
if (!changed)
|
|
510384
|
+
return msg;
|
|
510385
|
+
return { ...msg, message: { ...msg.message, content: projected } };
|
|
510386
|
+
});
|
|
510116
510387
|
}
|
|
510117
510388
|
function isExtractedSummaryUsable(text) {
|
|
510118
510389
|
const summaryMatch = text.match(/<summary>([\s\S]{200,})<\/summary>/i);
|
|
@@ -510291,8 +510562,10 @@ async function compactConversation(messages, context2, cacheSafeParams, suppress
|
|
|
510291
510562
|
let summaryResponse;
|
|
510292
510563
|
let summary;
|
|
510293
510564
|
let ptlAttempts = 0;
|
|
510565
|
+
const operation = boundedOperationPolicy(1800000);
|
|
510294
510566
|
for (;; ) {
|
|
510295
510567
|
summaryResponse = await streamCompactSummary({
|
|
510568
|
+
operation,
|
|
510296
510569
|
messages: messagesToSummarize,
|
|
510297
510570
|
summaryRequest,
|
|
510298
510571
|
appState,
|
|
@@ -510542,8 +510815,10 @@ User context: ${userFeedback}`;
|
|
|
510542
510815
|
let summaryResponse;
|
|
510543
510816
|
let summary;
|
|
510544
510817
|
let ptlAttempts = 0;
|
|
510818
|
+
const operation = boundedOperationPolicy(1800000);
|
|
510545
510819
|
for (;; ) {
|
|
510546
510820
|
summaryResponse = await streamCompactSummary({
|
|
510821
|
+
operation,
|
|
510547
510822
|
messages: apiMessages,
|
|
510548
510823
|
summaryRequest,
|
|
510549
510824
|
appState: context2.getAppState(),
|
|
@@ -510736,14 +511011,31 @@ function createCompactCanUseTool() {
|
|
|
510736
511011
|
}
|
|
510737
511012
|
});
|
|
510738
511013
|
}
|
|
510739
|
-
async function streamCompactSummary({
|
|
511014
|
+
async function streamCompactSummary(args) {
|
|
511015
|
+
const provider = getCompactProviderConfig();
|
|
511016
|
+
const { getGatewayConfig: getGatewayConfig2 } = await Promise.resolve().then(() => (init_providers(), exports_providers));
|
|
511017
|
+
if (provider?.isFirstParty || !provider && !getGatewayConfig2() && isFirstPartyAnthropicBaseUrl()) {
|
|
511018
|
+
return streamCompactSummaryInternal(args);
|
|
511019
|
+
}
|
|
511020
|
+
const lifetime = new BoundedOperation(args.context.abortController.signal, args.operation, (event) => args.context.onCompactProgress?.({ type: "compact_activity", ...event }));
|
|
511021
|
+
try {
|
|
511022
|
+
return await lifetime.wait(() => streamCompactSummaryInternal({
|
|
511023
|
+
...args,
|
|
511024
|
+
context: { ...args.context, abortController: lifetime.controller }
|
|
511025
|
+
}, lifetime));
|
|
511026
|
+
} finally {
|
|
511027
|
+
lifetime.dispose();
|
|
511028
|
+
}
|
|
511029
|
+
}
|
|
511030
|
+
async function streamCompactSummaryInternal({
|
|
510740
511031
|
messages,
|
|
510741
511032
|
summaryRequest,
|
|
510742
511033
|
appState,
|
|
510743
511034
|
context: context2,
|
|
510744
511035
|
preCompactTokenCount,
|
|
510745
|
-
cacheSafeParams
|
|
510746
|
-
|
|
511036
|
+
cacheSafeParams,
|
|
511037
|
+
operation
|
|
511038
|
+
}, lifetime) {
|
|
510747
511039
|
const compactProvider = getCompactProviderConfig();
|
|
510748
511040
|
let compactModel = compactProvider?.model ?? context2.options.mainLoopModel;
|
|
510749
511041
|
let compactApiKey = compactProvider?.apiKey;
|
|
@@ -510838,6 +511130,7 @@ async function streamCompactSummary({
|
|
|
510838
511130
|
let gatewayCandidateIndex = 0;
|
|
510839
511131
|
let gatewayContextRefreshCount = 0;
|
|
510840
511132
|
for (let attempt = 1;attempt <= maxAttempts; attempt++) {
|
|
511133
|
+
lifetime?.check();
|
|
510841
511134
|
const activeCompactCandidate = gatewayCompactorCandidates ? candidateForCompactorAttempt(gatewayCompactorCandidates, gatewayCandidateIndex) : undefined;
|
|
510842
511135
|
const activeCompactModel = activeCompactCandidate?.model ?? compactModel;
|
|
510843
511136
|
if (!activeCompactModel)
|
|
@@ -510868,7 +511161,13 @@ async function streamCompactSummary({
|
|
|
510868
511161
|
const creds = await resolve3PCompactCredentials(compactApiKey, compactBaseUrl, context2.options.isNonInteractiveSession);
|
|
510869
511162
|
let compactResponse;
|
|
510870
511163
|
try {
|
|
511164
|
+
lifetime?.check();
|
|
510871
511165
|
compactResponse = await stream3PCompactDirect({
|
|
511166
|
+
operation,
|
|
511167
|
+
onActivity: (event) => {
|
|
511168
|
+
if (event.kind === "data")
|
|
511169
|
+
lifetime?.data();
|
|
511170
|
+
},
|
|
510872
511171
|
credentials: creds,
|
|
510873
511172
|
model: activeCompactModel,
|
|
510874
511173
|
clientProtocol: activeCompactCandidate?.clientProtocol ?? compactProvider?.clientProtocol ?? "anthropic_messages",
|
|
@@ -510976,6 +511275,7 @@ async function streamCompactSummary({
|
|
|
510976
511275
|
const streamIter = streamingGen[Symbol.asyncIterator]();
|
|
510977
511276
|
let next = await streamIter.next();
|
|
510978
511277
|
while (!next.done) {
|
|
511278
|
+
lifetime?.check();
|
|
510979
511279
|
const event = next.value;
|
|
510980
511280
|
if (!hasStartedStreaming && event.type === "stream_event" && event.event.type === "content_block_start" && event.event.content_block.type === "text") {
|
|
510981
511281
|
hasStartedStreaming = true;
|
|
@@ -511174,6 +511474,7 @@ var sessionTranscriptModule, POST_COMPACT_MAX_FILES_TO_RESTORE = 5, POST_COMPACT
|
|
|
511174
511474
|
|
|
511175
511475
|
[... skill content truncated for compaction; use Read on the skill path if you need the full text]`;
|
|
511176
511476
|
var init_compact = __esm(() => {
|
|
511477
|
+
init_boundedOperation();
|
|
511177
511478
|
init_sdk();
|
|
511178
511479
|
init_state();
|
|
511179
511480
|
init_state();
|
|
@@ -511661,9 +511962,9 @@ function shouldUseSessionMemoryCompaction() {
|
|
|
511661
511962
|
}
|
|
511662
511963
|
return shouldUse;
|
|
511663
511964
|
}
|
|
511664
|
-
function createCompactionResultFromSessionMemory(messages, sessionMemory, messagesToKeep, hookResults, transcriptPath, agentId) {
|
|
511965
|
+
function createCompactionResultFromSessionMemory(messages, sessionMemory, messagesToKeep, hookResults, transcriptPath, agentId, trigger = "auto") {
|
|
511665
511966
|
const preCompactTokenCount = tokenCountFromLastAPIResponse(messages);
|
|
511666
|
-
const boundaryMarker = createCompactBoundaryMessage(
|
|
511967
|
+
const boundaryMarker = createCompactBoundaryMessage(trigger, preCompactTokenCount ?? 0, messages[messages.length - 1]?.uuid);
|
|
511667
511968
|
const preCompactDiscovered = extractDiscoveredToolNames(messages);
|
|
511668
511969
|
if (preCompactDiscovered.size > 0) {
|
|
511669
511970
|
boundaryMarker.compactMetadata.preCompactDiscoveredTools = [
|
|
@@ -511698,18 +511999,18 @@ Some session memory sections were truncated for length. The full session memory
|
|
|
511698
511999
|
truePostCompactTokenCount: estimateMessageTokens(summaryMessages)
|
|
511699
512000
|
};
|
|
511700
512001
|
}
|
|
511701
|
-
async function trySessionMemoryCompaction(messages, agentId, autoCompactThreshold) {
|
|
512002
|
+
async function trySessionMemoryCompaction(messages, agentId, autoCompactThreshold, trigger = "auto") {
|
|
511702
512003
|
if (!shouldUseSessionMemoryCompaction()) {
|
|
511703
512004
|
return null;
|
|
511704
512005
|
}
|
|
511705
512006
|
await initSessionMemoryCompactConfig();
|
|
511706
512007
|
await waitForSessionMemoryExtraction();
|
|
511707
|
-
const
|
|
511708
|
-
|
|
511709
|
-
|
|
511710
|
-
logEvent("tengu_sm_compact_no_session_memory", {});
|
|
512008
|
+
const verifiedMemory = await getVerifiedSessionMemory();
|
|
512009
|
+
if (!verifiedMemory) {
|
|
512010
|
+
logEvent("tengu_sm_compact_unknown_coverage", {});
|
|
511711
512011
|
return null;
|
|
511712
512012
|
}
|
|
512013
|
+
const { messageId: lastSummarizedMessageId2, content: sessionMemory } = verifiedMemory;
|
|
511713
512014
|
if (await isSessionMemoryEmpty(sessionMemory)) {
|
|
511714
512015
|
logEvent("tengu_sm_compact_empty_template", {});
|
|
511715
512016
|
return null;
|
|
@@ -511723,8 +512024,8 @@ async function trySessionMemoryCompaction(messages, agentId, autoCompactThreshol
|
|
|
511723
512024
|
return null;
|
|
511724
512025
|
}
|
|
511725
512026
|
} else {
|
|
511726
|
-
|
|
511727
|
-
|
|
512027
|
+
logEvent("tengu_sm_compact_unknown_coverage", {});
|
|
512028
|
+
return null;
|
|
511728
512029
|
}
|
|
511729
512030
|
const startIndex = calculateMessagesToKeepIndex(messages, lastSummarizedIndex);
|
|
511730
512031
|
const messagesToKeep = messages.slice(startIndex).filter((m4) => !isCompactBoundaryMessage(m4));
|
|
@@ -511732,7 +512033,7 @@ async function trySessionMemoryCompaction(messages, agentId, autoCompactThreshol
|
|
|
511732
512033
|
model: getMainLoopModel()
|
|
511733
512034
|
});
|
|
511734
512035
|
const transcriptPath = getTranscriptPath();
|
|
511735
|
-
const compactionResult = createCompactionResultFromSessionMemory(messages, sessionMemory, messagesToKeep, hookResults, transcriptPath, agentId);
|
|
512036
|
+
const compactionResult = createCompactionResultFromSessionMemory(messages, sessionMemory, messagesToKeep, hookResults, transcriptPath, agentId, trigger);
|
|
511736
512037
|
const postCompactMessages = buildPostCompactMessages(compactionResult);
|
|
511737
512038
|
const postCompactTokenCount = roughTokenCountEstimationForMessages(postCompactMessages);
|
|
511738
512039
|
if (autoCompactThreshold !== undefined && postCompactTokenCount >= autoCompactThreshold) {
|
|
@@ -513005,7 +513306,7 @@ var init_toolSearch = __esm(() => {
|
|
|
513005
513306
|
});
|
|
513006
513307
|
|
|
513007
513308
|
// services/vcr.ts
|
|
513008
|
-
import { createHash as
|
|
513309
|
+
import { createHash as createHash22, randomUUID as randomUUID28 } from "crypto";
|
|
513009
513310
|
import { mkdir as mkdir27, readFile as readFile36, writeFile as writeFile28 } from "fs/promises";
|
|
513010
513311
|
import isPlainObject5 from "lodash-es/isPlainObject.js";
|
|
513011
513312
|
import mapValues2 from "lodash-es/mapValues.js";
|
|
@@ -513021,7 +513322,7 @@ async function withFixture(input, fixtureName, f4) {
|
|
|
513021
513322
|
if (!shouldUseVCR()) {
|
|
513022
513323
|
return await f4();
|
|
513023
513324
|
}
|
|
513024
|
-
const hash =
|
|
513325
|
+
const hash = createHash22("sha1").update(jsonStringify(input)).digest("hex").slice(0, 12);
|
|
513025
513326
|
const filename = join101(process.env.CLAUDE_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${fixtureName}-${hash}.json`);
|
|
513026
513327
|
try {
|
|
513027
513328
|
const cached4 = jsonParse(await readFile36(filename, { encoding: "utf8" }));
|
|
@@ -513056,7 +513357,7 @@ async function withVCR(messages, f4) {
|
|
|
513056
513357
|
return true;
|
|
513057
513358
|
}));
|
|
513058
513359
|
const dehydratedInput = mapMessages(messagesForAPI.map((_3) => _3.message.content), dehydrateValue);
|
|
513059
|
-
const filename = join101(process.env.CLAUDE_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${dehydratedInput.map((_3) =>
|
|
513360
|
+
const filename = join101(process.env.CLAUDE_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${dehydratedInput.map((_3) => createHash22("sha1").update(jsonStringify(_3)).digest("hex").slice(0, 6)).join("-")}.json`);
|
|
513060
513361
|
try {
|
|
513061
513362
|
const cached4 = jsonParse(await readFile36(filename, { encoding: "utf8" }));
|
|
513062
513363
|
cached4.output.forEach(addCachedCostToTotalSessionCost);
|
|
@@ -515153,7 +515454,7 @@ async function selectRelevantMemories(query2, memories, signal, recentTools) {
|
|
|
515153
515454
|
Recently used tools: ${recentTools.join(", ")}` : "";
|
|
515154
515455
|
try {
|
|
515155
515456
|
const result = await sideQuery({
|
|
515156
|
-
model:
|
|
515457
|
+
model: getSmallFastModel(),
|
|
515157
515458
|
system: SELECT_MEMORIES_SYSTEM_PROMPT,
|
|
515158
515459
|
skipSystemPromptPrefix: true,
|
|
515159
515460
|
messages: [
|
|
@@ -519974,7 +520275,7 @@ var init_managedPlugins = __esm(() => {
|
|
|
519974
520275
|
});
|
|
519975
520276
|
|
|
519976
520277
|
// utils/plugins/pluginVersioning.ts
|
|
519977
|
-
import { createHash as
|
|
520278
|
+
import { createHash as createHash23 } from "crypto";
|
|
519978
520279
|
async function calculatePluginVersion(pluginId, source, manifest, installPath, providedVersion, gitCommitSha) {
|
|
519979
520280
|
if (manifest?.version) {
|
|
519980
520281
|
logForDebugging(`Using manifest version for ${pluginId}: ${manifest.version}`);
|
|
@@ -519988,7 +520289,7 @@ async function calculatePluginVersion(pluginId, source, manifest, installPath, p
|
|
|
519988
520289
|
const shortSha = gitCommitSha.substring(0, 12);
|
|
519989
520290
|
if (typeof source === "object" && source.source === "git-subdir") {
|
|
519990
520291
|
const normPath = source.path.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+$/, "");
|
|
519991
|
-
const pathHash =
|
|
520292
|
+
const pathHash = createHash23("sha256").update(normPath).digest("hex").substring(0, 8);
|
|
519992
520293
|
const v6 = `${shortSha}-${pathHash}`;
|
|
519993
520294
|
logForDebugging(`Using git-subdir SHA+path version for ${pluginId}: ${v6} (path=${normPath})`);
|
|
519994
520295
|
return v6;
|
|
@@ -528972,7 +529273,7 @@ var init_xaaIdpLogin = __esm(() => {
|
|
|
528972
529273
|
});
|
|
528973
529274
|
|
|
528974
529275
|
// services/mcp/auth.ts
|
|
528975
|
-
import { createHash as
|
|
529276
|
+
import { createHash as createHash24, randomBytes as randomBytes12, randomUUID as randomUUID32 } from "crypto";
|
|
528976
529277
|
import { mkdir as mkdir30 } from "fs/promises";
|
|
528977
529278
|
import { createServer as createServer4 } from "http";
|
|
528978
529279
|
import { join as join112 } from "path";
|
|
@@ -529086,7 +529387,7 @@ function getServerKey(serverName, serverConfig) {
|
|
|
529086
529387
|
url: serverConfig.url,
|
|
529087
529388
|
headers: serverConfig.headers || {}
|
|
529088
529389
|
});
|
|
529089
|
-
const hash =
|
|
529390
|
+
const hash = createHash24("sha256").update(configJson).digest("hex").substring(0, 16);
|
|
529090
529391
|
return `${serverName}|${hash}`;
|
|
529091
529392
|
}
|
|
529092
529393
|
function hasMcpDiscoveryButNoToken(serverName, serverConfig) {
|
|
@@ -531382,7 +531683,7 @@ async function getMcpHeadersFromHelper(serverName, config) {
|
|
|
531382
531683
|
if ("scope" in config && isMcpServerFromProjectOrLocalSettings(config) && !getIsNonInteractiveSession()) {
|
|
531383
531684
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
531384
531685
|
if (!hasTrust) {
|
|
531385
|
-
const error5 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
531686
|
+
const error5 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.FEEDBACK_CHANNEL}.`);
|
|
531386
531687
|
logAntError("MCP headersHelper invoked before trust check", error5);
|
|
531387
531688
|
logEvent("tengu_mcp_headersHelper_missing_trust", {});
|
|
531388
531689
|
return null;
|
|
@@ -532907,7 +533208,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
532907
533208
|
const client4 = new Client({
|
|
532908
533209
|
name: "claude-code",
|
|
532909
533210
|
title: "CCL",
|
|
532910
|
-
version: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
533211
|
+
version: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION ?? "unknown",
|
|
532911
533212
|
description: "Anthropic's agentic coding tool",
|
|
532912
533213
|
websiteUrl: PRODUCT_URL
|
|
532913
533214
|
}, {
|
|
@@ -533258,7 +533559,7 @@ var init_client9 = __esm(() => {
|
|
|
533258
533559
|
const client4 = new Client({
|
|
533259
533560
|
name: "claude-code",
|
|
533260
533561
|
title: "CCL",
|
|
533261
|
-
version: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
533562
|
+
version: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION ?? "unknown",
|
|
533262
533563
|
description: "Anthropic's agentic coding tool",
|
|
533263
533564
|
websiteUrl: PRODUCT_URL
|
|
533264
533565
|
}, {
|
|
@@ -533892,7 +534193,7 @@ var init_client9 = __esm(() => {
|
|
|
533892
534193
|
});
|
|
533893
534194
|
|
|
533894
534195
|
// utils/api.ts
|
|
533895
|
-
import { createHash as
|
|
534196
|
+
import { createHash as createHash25 } from "crypto";
|
|
533896
534197
|
function filterSwarmFieldsFromSchema(toolName, schema) {
|
|
533897
534198
|
const fieldsToRemove = SWARM_FIELDS_BY_TOOL[toolName];
|
|
533898
534199
|
if (!fieldsToRemove || fieldsToRemove.length === 0) {
|
|
@@ -534002,7 +534303,7 @@ function logAPIPrefix(systemPrompt) {
|
|
|
534002
534303
|
logEvent("tengu_sysprompt_block", {
|
|
534003
534304
|
snippet: firstSystemPrompt?.slice(0, 20),
|
|
534004
534305
|
length: firstSystemPrompt?.length ?? 0,
|
|
534005
|
-
hash: firstSystemPrompt ?
|
|
534306
|
+
hash: firstSystemPrompt ? createHash25("sha256").update(firstSystemPrompt).digest("hex") : ""
|
|
534006
534307
|
});
|
|
534007
534308
|
}
|
|
534008
534309
|
function splitSysPromptPrefix(systemPrompt, options) {
|
|
@@ -535745,7 +536046,8 @@ ${deferredToolList}
|
|
|
535745
536046
|
hasGatewayConfig: !!gatewayForChannel,
|
|
535746
536047
|
gatewayHasKey: !!gatewayForChannel?.key,
|
|
535747
536048
|
isSubscriber: isClaudeAISubscriber(),
|
|
535748
|
-
hasLocalClaudeDirectAuth
|
|
536049
|
+
hasLocalClaudeDirectAuth,
|
|
536050
|
+
hasCapabilityContext: !!options.capabilityContext
|
|
535749
536051
|
});
|
|
535750
536052
|
const { isNonClaudeModel, isClaudeViaGateway } = channelDecision;
|
|
535751
536053
|
isGatewayChannel = channelDecision.channel === "gateway";
|
|
@@ -540136,7 +540438,7 @@ import { join as join114 } from "path";
|
|
|
540136
540438
|
function getSteps() {
|
|
540137
540439
|
const cwd2 = getCwd();
|
|
540138
540440
|
const fs13 = getFsImplementation();
|
|
540139
|
-
const hasMemoryFile = fs13.existsSync(join114(cwd2, "CCL.md")) || fs13.existsSync(join114(cwd2, PROJECT_CONFIG_DIR, "CCL.md"))
|
|
540441
|
+
const hasMemoryFile = fs13.existsSync(join114(cwd2, "CCL.md")) || fs13.existsSync(join114(cwd2, PROJECT_CONFIG_DIR, "CCL.md"));
|
|
540140
540442
|
const isWorkspaceDirEmpty = isDirEmpty(cwd2);
|
|
540141
540443
|
return [
|
|
540142
540444
|
{
|
|
@@ -540497,7 +540799,7 @@ async function setupTerminal(theme) {
|
|
|
540497
540799
|
return current;
|
|
540498
540800
|
});
|
|
540499
540801
|
maybeMarkProjectOnboardingComplete();
|
|
540500
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
540802
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
540501
540803
|
result += await setupShellCompletion(theme);
|
|
540502
540804
|
}
|
|
540503
540805
|
return result;
|
|
@@ -540859,14 +541161,14 @@ var init_terminalSetup = __esm(() => {
|
|
|
540859
541161
|
});
|
|
540860
541162
|
|
|
540861
541163
|
// utils/pasteStore.ts
|
|
540862
|
-
import { createHash as
|
|
541164
|
+
import { createHash as createHash26 } from "crypto";
|
|
540863
541165
|
import { mkdir as mkdir34, readdir as readdir25, readFile as readFile44, stat as stat38, unlink as unlink18, writeFile as writeFile36 } from "fs/promises";
|
|
540864
541166
|
import { join as join118 } from "path";
|
|
540865
541167
|
function getPasteStoreDir() {
|
|
540866
541168
|
return join118(getClaudeConfigHomeDir(), PASTE_STORE_DIR);
|
|
540867
541169
|
}
|
|
540868
541170
|
function hashPastedText(content) {
|
|
540869
|
-
return
|
|
541171
|
+
return createHash26("sha256").update(content).digest("hex").slice(0, 16);
|
|
540870
541172
|
}
|
|
540871
541173
|
function getPastePath(hash) {
|
|
540872
541174
|
return join118(getPasteStoreDir(), `${hash}.txt`);
|
|
@@ -544990,7 +545292,7 @@ function Feedback({
|
|
|
544990
545292
|
platform: env4.platform,
|
|
544991
545293
|
gitRepo: envInfo.isGit,
|
|
544992
545294
|
terminal: env4.terminal,
|
|
544993
|
-
version: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
545295
|
+
version: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
544994
545296
|
transcript: normalizeMessagesForAPI(messages),
|
|
544995
545297
|
errors: sanitizedErrors,
|
|
544996
545298
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -545182,7 +545484,7 @@ function Feedback({
|
|
|
545182
545484
|
", ",
|
|
545183
545485
|
env4.terminal,
|
|
545184
545486
|
", v",
|
|
545185
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
545487
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
545186
545488
|
]
|
|
545187
545489
|
})
|
|
545188
545490
|
]
|
|
@@ -545288,7 +545590,7 @@ ${sanitizedDescription}
|
|
|
545288
545590
|
` + `**Environment Info**
|
|
545289
545591
|
` + `- Platform: ${env4.platform}
|
|
545290
545592
|
` + `- Terminal: ${env4.terminal}
|
|
545291
|
-
` + `- Version: ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
545593
|
+
` + `- Version: ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION || "unknown"}
|
|
545292
545594
|
` + `- Feedback ID: ${feedbackId}
|
|
545293
545595
|
` + `
|
|
545294
545596
|
**Errors**
|
|
@@ -545480,7 +545782,7 @@ var init_Feedback = __esm(() => {
|
|
|
545480
545782
|
init_TextInput();
|
|
545481
545783
|
import_react95 = __toESM(require_react(), 1);
|
|
545482
545784
|
jsx_runtime168 = __toESM(require_jsx_runtime(), 1);
|
|
545483
|
-
GITHUB_ISSUES_REPO_URL = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
545785
|
+
GITHUB_ISSUES_REPO_URL = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? "https://github.com/anthropics/claude-cli-internal/issues" : "https://github.com/anthropics/claude-code/issues";
|
|
545484
545786
|
});
|
|
545485
545787
|
|
|
545486
545788
|
// commands/feedback/feedback.tsx
|
|
@@ -546372,7 +546674,7 @@ function getMagicDocsAgent() {
|
|
|
546372
546674
|
agentType: "magic-docs",
|
|
546373
546675
|
whenToUse: "Update Magic Docs",
|
|
546374
546676
|
tools: [FILE_EDIT_TOOL_NAME],
|
|
546375
|
-
model:
|
|
546677
|
+
model: getDefaultSubagentModel(),
|
|
546376
546678
|
source: "built-in",
|
|
546377
546679
|
baseDir: "built-in",
|
|
546378
546680
|
getSystemPrompt: () => ""
|
|
@@ -546457,6 +546759,7 @@ var init_magicDocs = __esm(() => {
|
|
|
546457
546759
|
init_fileStateCache();
|
|
546458
546760
|
init_postSamplingHooks();
|
|
546459
546761
|
init_messages7();
|
|
546762
|
+
init_agent();
|
|
546460
546763
|
init_prompts3();
|
|
546461
546764
|
MAGIC_DOC_HEADER_PATTERN = /^#\s*MAGIC\s+DOC:\s*(.+)$/im;
|
|
546462
546765
|
ITALICS_PATTERN = /^[_*](.+?)[_*]\s*$/m;
|
|
@@ -548053,7 +548356,7 @@ var call14 = async (args, context2) => {
|
|
|
548053
548356
|
const customInstructions = args.trim();
|
|
548054
548357
|
try {
|
|
548055
548358
|
if (!customInstructions) {
|
|
548056
|
-
const sessionMemoryResult = await trySessionMemoryCompaction(messages, context2.agentId);
|
|
548359
|
+
const sessionMemoryResult = await trySessionMemoryCompaction(messages, context2.agentId, undefined, "manual");
|
|
548057
548360
|
if (sessionMemoryResult) {
|
|
548058
548361
|
getUserContext.cache.clear?.();
|
|
548059
548362
|
runPostCompactCleanup();
|
|
@@ -548065,7 +548368,7 @@ var call14 = async (args, context2) => {
|
|
|
548065
548368
|
return {
|
|
548066
548369
|
type: "compact",
|
|
548067
548370
|
compactionResult: sessionMemoryResult,
|
|
548068
|
-
displayText: buildDisplayText(context2)
|
|
548371
|
+
displayText: buildDisplayText(context2, "Reused session memory with a known coverage boundary; retained subsequent messages. No new model summary was generated.")
|
|
548069
548372
|
};
|
|
548070
548373
|
}
|
|
548071
548374
|
}
|
|
@@ -548483,7 +548786,7 @@ function buildPrimarySection() {
|
|
|
548483
548786
|
});
|
|
548484
548787
|
return [{
|
|
548485
548788
|
label: "Version",
|
|
548486
|
-
value: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
548789
|
+
value: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
548487
548790
|
}, {
|
|
548488
548791
|
label: "Session name",
|
|
548489
548792
|
value: nameValue
|
|
@@ -551123,7 +551426,7 @@ function Config({
|
|
|
551123
551426
|
});
|
|
551124
551427
|
}
|
|
551125
551428
|
}] : [],
|
|
551126
|
-
...{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
551429
|
+
...{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? [{
|
|
551127
551430
|
id: "speculationEnabled",
|
|
551128
551431
|
label: "Speculative execution",
|
|
551129
551432
|
value: globalConfig.speculationEnabled ?? true,
|
|
@@ -552404,7 +552707,7 @@ function Config({
|
|
|
552404
552707
|
}
|
|
552405
552708
|
})
|
|
552406
552709
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime183.jsx(ChannelDowngradeDialog, {
|
|
552407
|
-
currentVersion: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
552710
|
+
currentVersion: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
552408
552711
|
onChoice: (choice) => {
|
|
552409
552712
|
setShowSubmenu(null);
|
|
552410
552713
|
setTabsHidden(false);
|
|
@@ -552416,7 +552719,7 @@ function Config({
|
|
|
552416
552719
|
autoUpdatesChannel: "stable"
|
|
552417
552720
|
};
|
|
552418
552721
|
if (choice === "stay") {
|
|
552419
|
-
newSettings.minimumVersion = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
552722
|
+
newSettings.minimumVersion = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION;
|
|
552420
552723
|
}
|
|
552421
552724
|
updateSettingsForSource("userSettings", newSettings);
|
|
552422
552725
|
setSettingsData((prev_27) => ({
|
|
@@ -560490,7 +560793,7 @@ function HelpV2(t0) {
|
|
|
560490
560793
|
let t6;
|
|
560491
560794
|
if ($3[31] !== tabs) {
|
|
560492
560795
|
t6 = /* @__PURE__ */ jsx_runtime210.jsx(Tabs, {
|
|
560493
|
-
title: `CCL v${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
560796
|
+
title: `CCL v${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION}`,
|
|
560494
560797
|
color: "professionalBlue",
|
|
560495
560798
|
defaultTab: "general",
|
|
560496
560799
|
children: tabs
|
|
@@ -580161,7 +580464,7 @@ async function call28(onDone, _context, args) {
|
|
|
580161
580464
|
});
|
|
580162
580465
|
}
|
|
580163
580466
|
}
|
|
580164
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
580467
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
580165
580468
|
return /* @__PURE__ */ jsx_runtime249.jsx(PluginSettings, {
|
|
580166
580469
|
onComplete: onDone,
|
|
580167
580470
|
args: ["manage"],
|
|
@@ -585008,9 +585311,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
585008
585311
|
return [];
|
|
585009
585312
|
}
|
|
585010
585313
|
}
|
|
585011
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
585314
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION) {
|
|
585012
585315
|
if (process.env.USER_TYPE === "ant") {
|
|
585013
|
-
const changelog = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
585316
|
+
const changelog = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION_CHANGELOG;
|
|
585014
585317
|
if (changelog) {
|
|
585015
585318
|
const commits = changelog.trim().split(`
|
|
585016
585319
|
`).filter(Boolean);
|
|
@@ -585035,9 +585338,9 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = { USER_TYP
|
|
|
585035
585338
|
releaseNotes
|
|
585036
585339
|
};
|
|
585037
585340
|
}
|
|
585038
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
585341
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION) {
|
|
585039
585342
|
if (process.env.USER_TYPE === "ant") {
|
|
585040
|
-
const changelog = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
585343
|
+
const changelog = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION_CHANGELOG;
|
|
585041
585344
|
if (changelog) {
|
|
585042
585345
|
const commits = changelog.trim().split(`
|
|
585043
585346
|
`).filter(Boolean);
|
|
@@ -586219,7 +586522,7 @@ function getRecentActivitySync() {
|
|
|
586219
586522
|
return cachedActivity;
|
|
586220
586523
|
}
|
|
586221
586524
|
function getLogoDisplayData() {
|
|
586222
|
-
const version4 = process.env.DEMO_VERSION ?? { USER_TYPE: "external", VERSION: "1.3.6-
|
|
586525
|
+
const version4 = process.env.DEMO_VERSION ?? { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION;
|
|
586223
586526
|
const serverUrl = getDirectConnectServerUrl();
|
|
586224
586527
|
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
586225
586528
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -586251,7 +586554,7 @@ function formatModelAndBilling(modelName, billingType, availableWidth) {
|
|
|
586251
586554
|
}
|
|
586252
586555
|
function getRecentReleaseNotesSync(maxItems) {
|
|
586253
586556
|
if (process.env.USER_TYPE === "ant") {
|
|
586254
|
-
const changelog2 = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
586557
|
+
const changelog2 = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION_CHANGELOG;
|
|
586255
586558
|
if (changelog2) {
|
|
586256
586559
|
const commits = changelog2.trim().split(`
|
|
586257
586560
|
`).filter(Boolean);
|
|
@@ -586997,7 +587300,7 @@ function createRecentActivityFeed(activities) {
|
|
|
586997
587300
|
}
|
|
586998
587301
|
function createWhatsNewFeed(releaseNotes2) {
|
|
586999
587302
|
const lines = releaseNotes2.map((note) => {
|
|
587000
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
587303
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
587001
587304
|
const match = note.match(/^(\d+\s+\w+\s+ago)\s+(.+)$/);
|
|
587002
587305
|
if (match) {
|
|
587003
587306
|
return {
|
|
@@ -587010,9 +587313,9 @@ function createWhatsNewFeed(releaseNotes2) {
|
|
|
587010
587313
|
text: note
|
|
587011
587314
|
};
|
|
587012
587315
|
});
|
|
587013
|
-
const emptyMessage = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
587316
|
+
const emptyMessage = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? "Unable to fetch latest claude-cli-internal commits" : "Check the CCL changelog for updates";
|
|
587014
587317
|
return {
|
|
587015
|
-
title: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
587318
|
+
title: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? "What's new [ANT-ONLY: Latest CC commits]" : "What's new",
|
|
587016
587319
|
lines,
|
|
587017
587320
|
footer: lines.length > 0 ? "/release-notes for more" : undefined,
|
|
587018
587321
|
emptyMessage
|
|
@@ -587807,7 +588110,7 @@ function LogoV2() {
|
|
|
587807
588110
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
587808
588111
|
t22 = () => {
|
|
587809
588112
|
const currentConfig = getGlobalConfig();
|
|
587810
|
-
if (currentConfig.lastReleaseNotesSeen === { USER_TYPE: "external", VERSION: "1.3.6-
|
|
588113
|
+
if (currentConfig.lastReleaseNotesSeen === { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION) {
|
|
587811
588114
|
return;
|
|
587812
588115
|
}
|
|
587813
588116
|
saveGlobalConfig(_temp329);
|
|
@@ -588483,12 +588786,12 @@ function LogoV2() {
|
|
|
588483
588786
|
return t41;
|
|
588484
588787
|
}
|
|
588485
588788
|
function _temp329(current) {
|
|
588486
|
-
if (current.lastReleaseNotesSeen === { USER_TYPE: "external", VERSION: "1.3.6-
|
|
588789
|
+
if (current.lastReleaseNotesSeen === { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION) {
|
|
588487
588790
|
return current;
|
|
588488
588791
|
}
|
|
588489
588792
|
return {
|
|
588490
588793
|
...current,
|
|
588491
|
-
lastReleaseNotesSeen: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
588794
|
+
lastReleaseNotesSeen: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
588492
588795
|
};
|
|
588493
588796
|
}
|
|
588494
588797
|
function _temp246(s_0) {
|
|
@@ -589513,22 +589816,22 @@ function useVirtualScroll(scrollRef, itemKeys, columns) {
|
|
|
589513
589816
|
}
|
|
589514
589817
|
const needed2 = viewportH + 2 * OVERSCAN_ROWS;
|
|
589515
589818
|
const maxEnd = Math.min(n2, start + MAX_MOUNTED_ITEMS);
|
|
589516
|
-
let
|
|
589819
|
+
let coverage3 = 0;
|
|
589517
589820
|
end = start;
|
|
589518
|
-
while (end < maxEnd && (
|
|
589519
|
-
|
|
589821
|
+
while (end < maxEnd && (coverage3 < needed2 || offsets[end] < effHi + viewportH + OVERSCAN_ROWS)) {
|
|
589822
|
+
coverage3 += heightCache.current.get(itemKeys[end]) ?? PESSIMISTIC_HEIGHT;
|
|
589520
589823
|
end++;
|
|
589521
589824
|
}
|
|
589522
589825
|
}
|
|
589523
589826
|
const needed = viewportH + 2 * OVERSCAN_ROWS;
|
|
589524
589827
|
const minStart = Math.max(0, end - MAX_MOUNTED_ITEMS);
|
|
589525
|
-
let
|
|
589828
|
+
let coverage2 = 0;
|
|
589526
589829
|
for (let i4 = start;i4 < end; i4++) {
|
|
589527
|
-
|
|
589830
|
+
coverage2 += heightCache.current.get(itemKeys[i4]) ?? PESSIMISTIC_HEIGHT;
|
|
589528
589831
|
}
|
|
589529
|
-
while (start > minStart &&
|
|
589832
|
+
while (start > minStart && coverage2 < needed) {
|
|
589530
589833
|
start--;
|
|
589531
|
-
|
|
589834
|
+
coverage2 += heightCache.current.get(itemKeys[start]) ?? PESSIMISTIC_HEIGHT;
|
|
589532
589835
|
}
|
|
589533
589836
|
const prev = prevRangeRef.current;
|
|
589534
589837
|
const scrollVelocity = Math.abs(scrollTop - lastScrollTopRef.current) + Math.abs(pendingDelta);
|
|
@@ -596389,13 +596692,13 @@ var init_ultraplan = __esm(() => {
|
|
|
596389
596692
|
ULTRAPLAN_TIMEOUT_MS = 30 * 60 * 1000;
|
|
596390
596693
|
_rawPrompt = require_prompt();
|
|
596391
596694
|
DEFAULT_INSTRUCTIONS = (typeof _rawPrompt === "string" ? _rawPrompt : _rawPrompt.default).trimEnd();
|
|
596392
|
-
ULTRAPLAN_INSTRUCTIONS = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
596695
|
+
ULTRAPLAN_INSTRUCTIONS = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && process.env.ULTRAPLAN_PROMPT_FILE ? readFileSync19(process.env.ULTRAPLAN_PROMPT_FILE, "utf8").trimEnd() : DEFAULT_INSTRUCTIONS;
|
|
596393
596696
|
ultraplan_default = {
|
|
596394
596697
|
type: "local-jsx",
|
|
596395
596698
|
name: "ultraplan",
|
|
596396
596699
|
description: `~10–30 min · CCL on the web drafts an advanced plan you can edit and approve. See ${CCR_TERMS_URL2}`,
|
|
596397
596700
|
argumentHint: "<prompt>",
|
|
596398
|
-
isEnabled: () => ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
596701
|
+
isEnabled: () => ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }).USER_TYPE === "ant",
|
|
596399
596702
|
load: () => Promise.resolve({
|
|
596400
596703
|
call: call37
|
|
596401
596704
|
})
|
|
@@ -596506,7 +596809,7 @@ function shouldHideTasksFooter(tasks, showSpinnerTree) {
|
|
|
596506
596809
|
return false;
|
|
596507
596810
|
let hasVisibleTask = false;
|
|
596508
596811
|
for (const t3 of Object.values(tasks)) {
|
|
596509
|
-
if (!isBackgroundTask(t3) || { USER_TYPE: "external", VERSION: "1.3.6-
|
|
596812
|
+
if (!isBackgroundTask(t3) || { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && isPanelAgentTask(t3)) {
|
|
596510
596813
|
continue;
|
|
596511
596814
|
}
|
|
596512
596815
|
hasVisibleTask = true;
|
|
@@ -602592,8 +602895,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
602592
602895
|
}
|
|
602593
602896
|
async function checkEnvLessBridgeMinVersion() {
|
|
602594
602897
|
const cfg = await getEnvLessBridgeConfig();
|
|
602595
|
-
if (cfg.min_version && lt2({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
602596
|
-
return `Your version of CCL (${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
602898
|
+
if (cfg.min_version && lt2({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION, cfg.min_version)) {
|
|
602899
|
+
return `Your version of CCL (${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION}) is too old for Remote Control.
|
|
602597
602900
|
Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
|
|
602598
602901
|
}
|
|
602599
602902
|
return null;
|
|
@@ -604968,10 +605271,10 @@ import { execa as execa14 } from "execa";
|
|
|
604968
605271
|
import { readFile as readFile51 } from "fs/promises";
|
|
604969
605272
|
import { join as join139 } from "path";
|
|
604970
605273
|
function getMarketplaceName() {
|
|
604971
|
-
return { USER_TYPE: "external", VERSION: "1.3.6-
|
|
605274
|
+
return { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_NAME : OFFICIAL_MARKETPLACE_NAME;
|
|
604972
605275
|
}
|
|
604973
605276
|
function getMarketplaceRepo() {
|
|
604974
|
-
return { USER_TYPE: "external", VERSION: "1.3.6-
|
|
605277
|
+
return { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_REPO : OFFICIAL_MARKETPLACE_REPO;
|
|
604975
605278
|
}
|
|
604976
605279
|
function getPluginId() {
|
|
604977
605280
|
return `thinkback@${getMarketplaceName()}`;
|
|
@@ -612724,7 +613027,7 @@ function getToolBuckets() {
|
|
|
612724
613027
|
},
|
|
612725
613028
|
EXECUTION: {
|
|
612726
613029
|
name: "Execution tools",
|
|
612727
|
-
toolNames: new Set([BashTool.name, { USER_TYPE: "external", VERSION: "1.3.6-
|
|
613030
|
+
toolNames: new Set([BashTool.name, { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? TungstenTool.name : undefined].filter((n2) => n2 !== undefined))
|
|
612728
613031
|
},
|
|
612729
613032
|
MCP: {
|
|
612730
613033
|
name: "MCP tools",
|
|
@@ -618374,7 +618677,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
618374
618677
|
smapsRollup,
|
|
618375
618678
|
platform: process.platform,
|
|
618376
618679
|
nodeVersion: process.version,
|
|
618377
|
-
ccVersion: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
618680
|
+
ccVersion: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
618378
618681
|
};
|
|
618379
618682
|
}
|
|
618380
618683
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -618961,7 +619264,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
618961
619264
|
var call61 = async () => {
|
|
618962
619265
|
return {
|
|
618963
619266
|
type: "text",
|
|
618964
|
-
value: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
619267
|
+
value: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.BUILD_TIME ? `${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} (built ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.BUILD_TIME})` : { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
618965
619268
|
};
|
|
618966
619269
|
}, version4, version_default;
|
|
618967
619270
|
var init_version = __esm(() => {
|
|
@@ -626024,7 +626327,7 @@ function OverviewTab({
|
|
|
626024
626327
|
})
|
|
626025
626328
|
]
|
|
626026
626329
|
}),
|
|
626027
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
626330
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && stats.totalSpeculationTimeSavedMs > 0 && /* @__PURE__ */ jsx_runtime367.jsx(ThemedBox_default, {
|
|
626028
626331
|
flexDirection: "row",
|
|
626029
626332
|
gap: 4,
|
|
626030
626333
|
children: /* @__PURE__ */ jsx_runtime367.jsx(ThemedBox_default, {
|
|
@@ -626698,7 +627001,7 @@ function renderOverviewToAnsi(stats) {
|
|
|
626698
627001
|
const activeDaysVal = `${stats.activeDays}/${stats.totalDays}`;
|
|
626699
627002
|
const peakHourVal = stats.peakActivityHour !== null ? `${stats.peakActivityHour}:00-${stats.peakActivityHour + 1}:00` : "N/A";
|
|
626700
627003
|
lines.push(row("Active days", activeDaysVal, "Peak hour", peakHourVal));
|
|
626701
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
627004
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && stats.totalSpeculationTimeSavedMs > 0) {
|
|
626702
627005
|
const label = "Speculation saved:".padEnd(COL1_LABEL_WIDTH);
|
|
626703
627006
|
lines.push(label + h3(formatDuration(stats.totalSpeculationTimeSavedMs)));
|
|
626704
627007
|
}
|
|
@@ -627029,11 +627332,50 @@ import {
|
|
|
627029
627332
|
} from "fs/promises";
|
|
627030
627333
|
import { tmpdir as tmpdir11 } from "os";
|
|
627031
627334
|
import { extname as extname14, join as join151 } from "path";
|
|
627032
|
-
function
|
|
627033
|
-
|
|
627034
|
-
|
|
627035
|
-
|
|
627036
|
-
|
|
627335
|
+
async function queryInsights(userPrompt, maxOutputTokens) {
|
|
627336
|
+
const start = await resolveTrajectoryStart(getMainLoopModel(), getRoutingPriority(), undefined);
|
|
627337
|
+
const signal = new AbortController().signal;
|
|
627338
|
+
const invoke2 = async (model2, capabilityContext) => {
|
|
627339
|
+
const result = await queryWithModel({
|
|
627340
|
+
systemPrompt: asSystemPrompt([]),
|
|
627341
|
+
userPrompt,
|
|
627342
|
+
signal,
|
|
627343
|
+
options: {
|
|
627344
|
+
model: model2,
|
|
627345
|
+
capabilityContext,
|
|
627346
|
+
querySource: "insights",
|
|
627347
|
+
agents: [],
|
|
627348
|
+
isNonInteractiveSession: true,
|
|
627349
|
+
hasAppendSystemPrompt: false,
|
|
627350
|
+
mcpTools: [],
|
|
627351
|
+
maxOutputTokensOverride: maxOutputTokens
|
|
627352
|
+
}
|
|
627353
|
+
});
|
|
627354
|
+
if (result.isApiErrorMessage) {
|
|
627355
|
+
throw new Error("Insights analysis returned an API error");
|
|
627356
|
+
}
|
|
627357
|
+
return result;
|
|
627358
|
+
};
|
|
627359
|
+
if (start.resolution && start.request) {
|
|
627360
|
+
let initialResolution = start.resolution;
|
|
627361
|
+
return runCapabilityInvocation({
|
|
627362
|
+
request: start.request,
|
|
627363
|
+
resolve: async (request) => {
|
|
627364
|
+
if (initialResolution) {
|
|
627365
|
+
const resolution = initialResolution;
|
|
627366
|
+
initialResolution = undefined;
|
|
627367
|
+
return resolution;
|
|
627368
|
+
}
|
|
627369
|
+
return resolveCapabilityModel(request);
|
|
627370
|
+
},
|
|
627371
|
+
invoke: (binding) => invoke2(binding.model, binding.capabilityContext)
|
|
627372
|
+
});
|
|
627373
|
+
}
|
|
627374
|
+
const model = start.source === "legacy" ? getDefaultMainLoopModel() : start.model;
|
|
627375
|
+
if (model === "auto" || model === "smart") {
|
|
627376
|
+
throw new Error("Insights analysis requires a resolved main model");
|
|
627377
|
+
}
|
|
627378
|
+
return invoke2(model);
|
|
627037
627379
|
}
|
|
627038
627380
|
function getDataDir() {
|
|
627039
627381
|
return join151(getClaudeConfigHomeDir(), "usage-data");
|
|
@@ -627339,20 +627681,7 @@ function formatTranscriptForFacets(log) {
|
|
|
627339
627681
|
}
|
|
627340
627682
|
async function summarizeTranscriptChunk(chunk2) {
|
|
627341
627683
|
try {
|
|
627342
|
-
const result = await
|
|
627343
|
-
systemPrompt: asSystemPrompt([]),
|
|
627344
|
-
userPrompt: SUMMARIZE_CHUNK_PROMPT + chunk2,
|
|
627345
|
-
signal: new AbortController().signal,
|
|
627346
|
-
options: {
|
|
627347
|
-
model: getAnalysisModel(),
|
|
627348
|
-
querySource: "insights",
|
|
627349
|
-
agents: [],
|
|
627350
|
-
isNonInteractiveSession: true,
|
|
627351
|
-
hasAppendSystemPrompt: false,
|
|
627352
|
-
mcpTools: [],
|
|
627353
|
-
maxOutputTokensOverride: 500
|
|
627354
|
-
}
|
|
627355
|
-
});
|
|
627684
|
+
const result = await queryInsights(SUMMARIZE_CHUNK_PROMPT + chunk2, 500);
|
|
627356
627685
|
const text = extractTextContent(result.message.content);
|
|
627357
627686
|
return text || chunk2.slice(0, 2000);
|
|
627358
627687
|
} catch {
|
|
@@ -627449,20 +627778,7 @@ RESPOND WITH ONLY A VALID JSON OBJECT matching this schema:
|
|
|
627449
627778
|
"primary_success": "none|fast_accurate_search|correct_code_edits|good_explanations|proactive_help|multi_file_changes|good_debugging",
|
|
627450
627779
|
"brief_summary": "One sentence: what user wanted and whether they got it"
|
|
627451
627780
|
}`;
|
|
627452
|
-
const result = await
|
|
627453
|
-
systemPrompt: asSystemPrompt([]),
|
|
627454
|
-
userPrompt: jsonPrompt,
|
|
627455
|
-
signal: new AbortController().signal,
|
|
627456
|
-
options: {
|
|
627457
|
-
model: getAnalysisModel(),
|
|
627458
|
-
querySource: "insights",
|
|
627459
|
-
agents: [],
|
|
627460
|
-
isNonInteractiveSession: true,
|
|
627461
|
-
hasAppendSystemPrompt: false,
|
|
627462
|
-
mcpTools: [],
|
|
627463
|
-
maxOutputTokensOverride: 4096
|
|
627464
|
-
}
|
|
627465
|
-
});
|
|
627781
|
+
const result = await queryInsights(jsonPrompt, 4096);
|
|
627466
627782
|
const text = extractTextContent(result.message.content);
|
|
627467
627783
|
const jsonMatch = text.match(/\{[\s\S]*\}/);
|
|
627468
627784
|
if (!jsonMatch)
|
|
@@ -627665,23 +627981,10 @@ function aggregateData(sessions, facets) {
|
|
|
627665
627981
|
}
|
|
627666
627982
|
async function generateSectionInsight(section, dataContext) {
|
|
627667
627983
|
try {
|
|
627668
|
-
const result = await
|
|
627669
|
-
systemPrompt: asSystemPrompt([]),
|
|
627670
|
-
userPrompt: section.prompt + `
|
|
627984
|
+
const result = await queryInsights(section.prompt + `
|
|
627671
627985
|
|
|
627672
627986
|
DATA:
|
|
627673
|
-
` + dataContext,
|
|
627674
|
-
signal: new AbortController().signal,
|
|
627675
|
-
options: {
|
|
627676
|
-
model: getInsightsModel(),
|
|
627677
|
-
querySource: "insights",
|
|
627678
|
-
agents: [],
|
|
627679
|
-
isNonInteractiveSession: true,
|
|
627680
|
-
hasAppendSystemPrompt: false,
|
|
627681
|
-
mcpTools: [],
|
|
627682
|
-
maxOutputTokensOverride: section.maxTokens
|
|
627683
|
-
}
|
|
627684
|
-
});
|
|
627987
|
+
` + dataContext, section.maxTokens);
|
|
627685
627988
|
const text = extractTextContent(result.message.content);
|
|
627686
627989
|
if (text) {
|
|
627687
627990
|
const jsonMatch = text.match(/\{[\s\S]*\}/);
|
|
@@ -628482,7 +628785,7 @@ function generateHtmlReport(data, insights) {
|
|
|
628482
628785
|
</html>`;
|
|
628483
628786
|
}
|
|
628484
628787
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
628485
|
-
const version5 = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
628788
|
+
const version5 = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION;
|
|
628486
628789
|
const remote_hosts_collected = remoteStats?.hosts.filter((h3) => h3.sessionCount > 0).map((h3) => h3.name);
|
|
628487
628790
|
const facets_summary = {
|
|
628488
628791
|
total: facets.size,
|
|
@@ -628757,6 +629060,8 @@ TRANSCRIPT CHUNK:
|
|
|
628757
629060
|
`, INSIGHT_SECTIONS, SATISFACTION_ORDER, OUTCOME_ORDER, usageReport, insights_default;
|
|
628758
629061
|
var init_insights = __esm(() => {
|
|
628759
629062
|
init_claude();
|
|
629063
|
+
init_capabilityResolver();
|
|
629064
|
+
init_intentClassifier();
|
|
628760
629065
|
init_constants2();
|
|
628761
629066
|
init_envUtils();
|
|
628762
629067
|
init_errors();
|
|
@@ -632747,7 +633052,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
632747
633052
|
init_settings2();
|
|
632748
633053
|
init_slowOperations();
|
|
632749
633054
|
init_uuid();
|
|
632750
|
-
VERSION7 = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
633055
|
+
VERSION7 = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION;
|
|
632751
633056
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
632752
633057
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
632753
633058
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -633965,7 +634270,7 @@ var init_filesystem = __esm(() => {
|
|
|
633965
634270
|
});
|
|
633966
634271
|
getBundledSkillsRoot = memoize64(function getBundledSkillsRoot2() {
|
|
633967
634272
|
const nonce = randomBytes19(16).toString("hex");
|
|
633968
|
-
return join155(getClaudeTempDir(), "bundled-skills", { USER_TYPE: "external", VERSION: "1.3.6-
|
|
634273
|
+
return join155(getClaudeTempDir(), "bundled-skills", { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION, nonce);
|
|
633969
634274
|
});
|
|
633970
634275
|
getResolvedWorkingDirPaths = memoize64(getPathsForPermissionCheck);
|
|
633971
634276
|
});
|
|
@@ -639280,7 +639585,7 @@ function getSimpleDoingTasksSection() {
|
|
|
639280
639585
|
];
|
|
639281
639586
|
const userHelpSubitems = [
|
|
639282
639587
|
`/help: Get help with using CCL`,
|
|
639283
|
-
`To give feedback, users should ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
639588
|
+
`To give feedback, users should ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.ISSUES_EXPLAINER}`
|
|
639284
639589
|
];
|
|
639285
639590
|
const items = [
|
|
639286
639591
|
`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.`,
|
|
@@ -640594,7 +640899,7 @@ function createBridgeLogger(options) {
|
|
|
640594
640899
|
connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
|
|
640595
640900
|
regenerateQr(connectUrl);
|
|
640596
640901
|
if (verbose) {
|
|
640597
|
-
write(source_default.dim(`Remote Control`) + ` v${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
640902
|
+
write(source_default.dim(`Remote Control`) + ` v${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION}
|
|
640598
640903
|
`);
|
|
640599
640904
|
}
|
|
640600
640905
|
if (verbose) {
|
|
@@ -641567,7 +641872,7 @@ function appendToLog(path21, message) {
|
|
|
641567
641872
|
cwd: getFsImplementation().cwd(),
|
|
641568
641873
|
userType: process.env.USER_TYPE,
|
|
641569
641874
|
sessionId: getSessionId(),
|
|
641570
|
-
version: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
641875
|
+
version: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
641571
641876
|
};
|
|
641572
641877
|
getLogWriter(path21).write(messageWithTimestamp);
|
|
641573
641878
|
}
|
|
@@ -642837,7 +643142,7 @@ Spawn mode for this project:
|
|
|
642837
643142
|
const api = createBridgeApiClient({
|
|
642838
643143
|
baseUrl,
|
|
642839
643144
|
getAccessToken: getBridgeAccessToken2,
|
|
642840
|
-
runnerVersion: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
643145
|
+
runnerVersion: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
642841
643146
|
onDebug: logForDebugging,
|
|
642842
643147
|
onAuth401: handleOAuth401Error2,
|
|
642843
643148
|
getTrustedDeviceToken
|
|
@@ -643075,7 +643380,7 @@ async function runBridgeHeadless(opts, signal) {
|
|
|
643075
643380
|
const api = createBridgeApiClient({
|
|
643076
643381
|
baseUrl,
|
|
643077
643382
|
getAccessToken: opts.getAccessToken,
|
|
643078
|
-
runnerVersion: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
643383
|
+
runnerVersion: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
643079
643384
|
onDebug: log2,
|
|
643080
643385
|
onAuth401: opts.onAuth401,
|
|
643081
643386
|
getTrustedDeviceToken
|
|
@@ -647516,7 +647821,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
647516
647821
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
647517
647822
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
647518
647823
|
betas: getSdkBetas(),
|
|
647519
|
-
claude_code_version: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
647824
|
+
claude_code_version: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
647520
647825
|
output_style: outputStyle2,
|
|
647521
647826
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
647522
647827
|
skills: inputs.skills.filter((s3) => s3.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -649810,7 +650115,7 @@ async function initBridgeCore(params) {
|
|
|
649810
650115
|
const rawApi = createBridgeApiClient({
|
|
649811
650116
|
baseUrl,
|
|
649812
650117
|
getAccessToken,
|
|
649813
|
-
runnerVersion: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
650118
|
+
runnerVersion: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
649814
650119
|
onDebug: logForDebugging,
|
|
649815
650120
|
onAuth401,
|
|
649816
650121
|
getTrustedDeviceToken
|
|
@@ -652492,7 +652797,7 @@ function MessageSelector({
|
|
|
652492
652797
|
...summarizeInputProps,
|
|
652493
652798
|
onChange: setSummarizeFromFeedback
|
|
652494
652799
|
});
|
|
652495
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
652800
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
652496
652801
|
baseOptions.push({
|
|
652497
652802
|
value: "summarize_up_to",
|
|
652498
652803
|
label: "Summarize up to here",
|
|
@@ -660027,7 +660332,7 @@ function bashToolUseOptions({
|
|
|
660027
660332
|
}
|
|
660028
660333
|
}
|
|
660029
660334
|
const editablePrefixShown = options.some((o2) => o2.value === "yes-prefix-edited");
|
|
660030
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
660335
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && !editablePrefixShown && isClassifierPermissionsEnabled() && onClassifierDescriptionChange && !initialClassifierDescriptionEmpty && !descriptionAlreadyExists(classifierDescription ?? "", existingAllowDescriptions) && decisionReason?.type !== "classifier") {
|
|
660031
660336
|
options.push({
|
|
660032
660337
|
type: "input",
|
|
660033
660338
|
label: "Yes, and don’t ask again for",
|
|
@@ -667634,7 +667939,7 @@ var init_CompanionSprite = __esm(() => {
|
|
|
667634
667939
|
|
|
667635
667940
|
// buddy/useBuddyNotification.tsx
|
|
667636
667941
|
function isBuddyTeaserWindow() {
|
|
667637
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
667942
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant")
|
|
667638
667943
|
return true;
|
|
667639
667944
|
const d2 = new Date;
|
|
667640
667945
|
return d2.getFullYear() === 2026 && d2.getMonth() === 3 && d2.getDate() <= 7;
|
|
@@ -667770,7 +668075,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
667770
668075
|
function getSemverPart(version5) {
|
|
667771
668076
|
return `${import_semver14.major(version5, { loose: true })}.${import_semver14.minor(version5, { loose: true })}.${import_semver14.patch(version5, { loose: true })}`;
|
|
667772
668077
|
}
|
|
667773
|
-
function useUpdateNotification(updatedVersion, initialVersion = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
668078
|
+
function useUpdateNotification(updatedVersion, initialVersion = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION) {
|
|
667774
668079
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react232.useState(() => getSemverPart(initialVersion));
|
|
667775
668080
|
if (!updatedVersion) {
|
|
667776
668081
|
return null;
|
|
@@ -667810,7 +668115,7 @@ function AutoUpdater({
|
|
|
667810
668115
|
return;
|
|
667811
668116
|
}
|
|
667812
668117
|
if (false) {}
|
|
667813
|
-
const currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
668118
|
+
const currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION;
|
|
667814
668119
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
667815
668120
|
let latestVersion = await getLatestVersion(channel2);
|
|
667816
668121
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -667946,7 +668251,7 @@ function AutoUpdater({
|
|
|
667946
668251
|
" ",
|
|
667947
668252
|
/* @__PURE__ */ jsx_runtime413.jsx(ThemedText, {
|
|
667948
668253
|
bold: true,
|
|
667949
|
-
children: hasLocalInstall ? `cd ~/.ccl/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
668254
|
+
children: hasLocalInstall ? `cd ~/.ccl/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL}` : `npm i -g ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL}`
|
|
667950
668255
|
})
|
|
667951
668256
|
]
|
|
667952
668257
|
})
|
|
@@ -668023,12 +668328,12 @@ function NativeAutoUpdater({
|
|
|
668023
668328
|
logEvent("tengu_native_auto_updater_start", {});
|
|
668024
668329
|
try {
|
|
668025
668330
|
const maxVersion = await getMaxVersion();
|
|
668026
|
-
if (maxVersion && gt2({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
668331
|
+
if (maxVersion && gt2({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION, maxVersion)) {
|
|
668027
668332
|
const msg = await getMaxVersionMessage();
|
|
668028
668333
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
668029
668334
|
}
|
|
668030
668335
|
const result = await installLatest(channel2);
|
|
668031
|
-
const currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
668336
|
+
const currentVersion = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION;
|
|
668032
668337
|
const latencyMs = Date.now() - startTime2;
|
|
668033
668338
|
if (result.lockFailed) {
|
|
668034
668339
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -668124,7 +668429,7 @@ function NativeAutoUpdater({
|
|
|
668124
668429
|
})
|
|
668125
668430
|
]
|
|
668126
668431
|
}),
|
|
668127
|
-
maxVersionIssue && { USER_TYPE: "external", VERSION: "1.3.6-
|
|
668432
|
+
maxVersionIssue && { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime414.jsxs(ThemedText, {
|
|
668128
668433
|
color: "warning",
|
|
668129
668434
|
children: [
|
|
668130
668435
|
"⚠ Known issue: ",
|
|
@@ -668178,17 +668483,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
668178
668483
|
const maxVersion = await getMaxVersion();
|
|
668179
668484
|
if (maxVersion && latest && gt2(latest, maxVersion)) {
|
|
668180
668485
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
668181
|
-
if (gte({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
668182
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
668486
|
+
if (gte({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION, maxVersion)) {
|
|
668487
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
668183
668488
|
setUpdateAvailable(false);
|
|
668184
668489
|
return;
|
|
668185
668490
|
}
|
|
668186
668491
|
latest = maxVersion;
|
|
668187
668492
|
}
|
|
668188
|
-
const hasUpdate = latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
668493
|
+
const hasUpdate = latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION, latest) && !shouldSkipVersion(latest);
|
|
668189
668494
|
setUpdateAvailable(!!hasUpdate);
|
|
668190
668495
|
if (hasUpdate) {
|
|
668191
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
668496
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} -> ${latest}`);
|
|
668192
668497
|
}
|
|
668193
668498
|
};
|
|
668194
668499
|
$3[0] = t1;
|
|
@@ -668222,7 +668527,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
668222
668527
|
wrap: "truncate",
|
|
668223
668528
|
children: [
|
|
668224
668529
|
"currentVersion: ",
|
|
668225
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
668530
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
668226
668531
|
]
|
|
668227
668532
|
});
|
|
668228
668533
|
$3[3] = verbose;
|
|
@@ -668473,7 +668778,7 @@ var init_useMemoryUsage = __esm(() => {
|
|
|
668473
668778
|
|
|
668474
668779
|
// components/MemoryUsageIndicator.tsx
|
|
668475
668780
|
function MemoryUsageIndicator() {
|
|
668476
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
668781
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE !== "ant") {
|
|
668477
668782
|
return null;
|
|
668478
668783
|
}
|
|
668479
668784
|
const memoryUsage = useMemoryUsage();
|
|
@@ -678167,7 +678472,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
678167
678472
|
project_dir: getOriginalCwd(),
|
|
678168
678473
|
added_dirs: addedDirs
|
|
678169
678474
|
},
|
|
678170
|
-
version: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
678475
|
+
version: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
678171
678476
|
output_style: {
|
|
678172
678477
|
name: outputStyleName
|
|
678173
678478
|
},
|
|
@@ -679524,7 +679829,7 @@ function ModeIndicator({
|
|
|
679524
679829
|
const expandedView = useAppState((s_3) => s_3.expandedView);
|
|
679525
679830
|
const showSpinnerTree = expandedView === "teammates";
|
|
679526
679831
|
const prStatus = usePrStatus(isLoading, isPrStatusEnabled());
|
|
679527
|
-
const hasTmuxSession = useAppState((s_4) => ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
679832
|
+
const hasTmuxSession = useAppState((s_4) => ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }).USER_TYPE === "ant" && s_4.tungstenActiveSession !== undefined);
|
|
679528
679833
|
const nextTickAt = import_react259.useSyncExternalStore(proactiveModule6?.subscribeToProactiveChanges ?? NO_OP_SUBSCRIBE, proactiveModule6?.getNextTickAt ?? NULL, NULL);
|
|
679529
679834
|
const voiceEnabled = runtimeVoiceFeature() ? useVoiceEnabled() : false;
|
|
679530
679835
|
const voiceState = runtimeVoiceFeature() ? useVoiceState((s_5) => s_5.voiceState) : "idle";
|
|
@@ -679533,7 +679838,7 @@ function ModeIndicator({
|
|
|
679533
679838
|
const selGetState = useSelection().getState;
|
|
679534
679839
|
const hasNextTick = nextTickAt !== null;
|
|
679535
679840
|
const isCoordinator = feature("COORDINATOR_MODE") ? coordinatorModule?.isCoordinatorMode() === true : false;
|
|
679536
|
-
const runningTaskCount = import_react259.useMemo(() => count(Object.values(tasks2), (t3) => isBackgroundTask(t3) && !({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
679841
|
+
const runningTaskCount = import_react259.useMemo(() => count(Object.values(tasks2), (t3) => isBackgroundTask(t3) && !({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && isPanelAgentTask(t3))), [tasks2]);
|
|
679537
679842
|
const tasksV2 = useTasksV2();
|
|
679538
679843
|
const hasTaskItems = tasksV2 !== undefined && tasksV2.length > 0;
|
|
679539
679844
|
const escShortcut = useShortcutDisplay("chat:cancel", "Chat", "esc").toLowerCase();
|
|
@@ -679611,7 +679916,7 @@ function ModeIndicator({
|
|
|
679611
679916
|
]
|
|
679612
679917
|
})
|
|
679613
679918
|
}, "remote")] : [],
|
|
679614
|
-
...{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
679919
|
+
...{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && hasTmuxSession ? [/* @__PURE__ */ jsx_runtime440.jsx(TungstenPill, {
|
|
679615
679920
|
selected: tmuxSelected
|
|
679616
679921
|
}, "tmux")] : [],
|
|
679617
679922
|
...isAgentSwarmsEnabled() && hasTeams ? [/* @__PURE__ */ jsx_runtime440.jsx(TeamStatus, {
|
|
@@ -679662,7 +679967,7 @@ function ModeIndicator({
|
|
|
679662
679967
|
]
|
|
679663
679968
|
});
|
|
679664
679969
|
}
|
|
679665
|
-
const hasCoordinatorTasks = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
679970
|
+
const hasCoordinatorTasks = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && getVisibleAgentTasks(tasks2).length > 0;
|
|
679666
679971
|
const tasksPart = hasBackgroundTasks && !hasTeammatePills && !shouldHideTasksFooter(tasks2, showSpinnerTree) ? /* @__PURE__ */ jsx_runtime440.jsx(BackgroundTaskStatus, {
|
|
679667
679972
|
tasksSelected,
|
|
679668
679973
|
isViewingTeammate,
|
|
@@ -679970,7 +680275,7 @@ function PromptInputFooter({
|
|
|
679970
680275
|
isInputWrapped,
|
|
679971
680276
|
isNarrow
|
|
679972
680277
|
}),
|
|
679973
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
680278
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && isUndercover() && /* @__PURE__ */ jsx_runtime441.jsx(ThemedText, {
|
|
679974
680279
|
dimColor: true,
|
|
679975
680280
|
children: "undercover"
|
|
679976
680281
|
}),
|
|
@@ -679981,7 +680286,7 @@ function PromptInputFooter({
|
|
|
679981
680286
|
})
|
|
679982
680287
|
]
|
|
679983
680288
|
}),
|
|
679984
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
680289
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime441.jsx(CoordinatorTaskPanel, {})
|
|
679985
680290
|
]
|
|
679986
680291
|
});
|
|
679987
680292
|
}
|
|
@@ -680742,8 +681047,8 @@ function PromptInput({
|
|
|
680742
681047
|
const replBridgeExplicit = useAppState((s3) => s3.replBridgeExplicit);
|
|
680743
681048
|
const replBridgeReconnecting = useAppState((s3) => s3.replBridgeReconnecting);
|
|
680744
681049
|
const bridgeFooterVisible = replBridgeConnected && (replBridgeExplicit || replBridgeReconnecting);
|
|
680745
|
-
const hasTungstenSession = useAppState((s3) => ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
680746
|
-
const tmuxFooterVisible = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
681050
|
+
const hasTungstenSession = useAppState((s3) => ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }).USER_TYPE === "ant" && s3.tungstenActiveSession !== undefined);
|
|
681051
|
+
const tmuxFooterVisible = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && hasTungstenSession;
|
|
680747
681052
|
const bagelFooterVisible = useAppState((s3) => false);
|
|
680748
681053
|
const teamContext = useAppState((s3) => s3.teamContext);
|
|
680749
681054
|
const queuedCommands = useCommandQueue();
|
|
@@ -680809,7 +681114,7 @@ function PromptInput({
|
|
|
680809
681114
|
};
|
|
680810
681115
|
}), [setAppState]);
|
|
680811
681116
|
const coordinatorTaskCount = useCoordinatorTaskCount();
|
|
680812
|
-
const hasBgTaskPill = import_react265.useMemo(() => Object.values(tasks2).some((t3) => isBackgroundTask(t3) && !({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
681117
|
+
const hasBgTaskPill = import_react265.useMemo(() => Object.values(tasks2).some((t3) => isBackgroundTask(t3) && !({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && isPanelAgentTask(t3))), [tasks2]);
|
|
680813
681118
|
const minCoordinatorIndex = hasBgTaskPill ? -1 : 0;
|
|
680814
681119
|
import_react265.useEffect(() => {
|
|
680815
681120
|
if (coordinatorTaskIndex >= coordinatorTaskCount) {
|
|
@@ -680862,7 +681167,7 @@ function PromptInput({
|
|
|
680862
681167
|
}];
|
|
680863
681168
|
}, [teamContext]);
|
|
680864
681169
|
const runningTaskCount = import_react265.useMemo(() => count(Object.values(tasks2), (t3) => t3.status === "running"), [tasks2]);
|
|
680865
|
-
const tasksFooterVisible = (runningTaskCount > 0 || { USER_TYPE: "external", VERSION: "1.3.6-
|
|
681170
|
+
const tasksFooterVisible = (runningTaskCount > 0 || { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && coordinatorTaskCount > 0) && !shouldHideTasksFooter(tasks2, showSpinnerTree);
|
|
680866
681171
|
const teamsFooterVisible = cachedTeams.length > 0;
|
|
680867
681172
|
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]);
|
|
680868
681173
|
const rawFooterSelection = useAppState((s3) => s3.footerSelection);
|
|
@@ -681868,14 +682173,14 @@ function PromptInput({
|
|
|
681868
682173
|
});
|
|
681869
682174
|
useKeybindings({
|
|
681870
682175
|
"footer:up": () => {
|
|
681871
|
-
if (tasksSelected && { USER_TYPE: "external", VERSION: "1.3.6-
|
|
682176
|
+
if (tasksSelected && { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && coordinatorTaskCount > 0 && coordinatorTaskIndex > minCoordinatorIndex) {
|
|
681872
682177
|
setCoordinatorTaskIndex((prev) => prev - 1);
|
|
681873
682178
|
return;
|
|
681874
682179
|
}
|
|
681875
682180
|
navigateFooter(-1, true);
|
|
681876
682181
|
},
|
|
681877
682182
|
"footer:down": () => {
|
|
681878
|
-
if (tasksSelected && { USER_TYPE: "external", VERSION: "1.3.6-
|
|
682183
|
+
if (tasksSelected && { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && coordinatorTaskCount > 0) {
|
|
681879
682184
|
if (coordinatorTaskIndex < coordinatorTaskCount - 1) {
|
|
681880
682185
|
setCoordinatorTaskIndex((prev) => prev + 1);
|
|
681881
682186
|
}
|
|
@@ -681937,7 +682242,7 @@ function PromptInput({
|
|
|
681937
682242
|
}
|
|
681938
682243
|
break;
|
|
681939
682244
|
case "tmux":
|
|
681940
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
682245
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
681941
682246
|
setAppState((prev) => prev.tungstenPanelAutoHidden ? {
|
|
681942
682247
|
...prev,
|
|
681943
682248
|
tungstenPanelAutoHidden: false
|
|
@@ -699978,7 +700283,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
699978
700283
|
} catch {}
|
|
699979
700284
|
const data = {
|
|
699980
700285
|
trigger,
|
|
699981
|
-
version: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
700286
|
+
version: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
699982
700287
|
platform: process.platform,
|
|
699983
700288
|
transcript,
|
|
699984
700289
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -700414,7 +700719,7 @@ function useMemorySurvey(messages, isLoading, hasActivePrompt = false, {
|
|
|
700414
700719
|
});
|
|
700415
700720
|
}, []);
|
|
700416
700721
|
const shouldShowTranscriptPrompt = import_react299.useCallback((selected_0) => {
|
|
700417
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
700722
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE !== "ant") {
|
|
700418
700723
|
return false;
|
|
700419
700724
|
}
|
|
700420
700725
|
if (selected_0 !== "bad" && selected_0 !== "good") {
|
|
@@ -706652,7 +706957,7 @@ function AutoRunIssueNotification(t0) {
|
|
|
706652
706957
|
return t6;
|
|
706653
706958
|
}
|
|
706654
706959
|
function shouldAutoRunIssue(reason) {
|
|
706655
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
706960
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE !== "ant") {
|
|
706656
706961
|
return false;
|
|
706657
706962
|
}
|
|
706658
706963
|
switch (reason) {
|
|
@@ -706665,7 +706970,7 @@ function shouldAutoRunIssue(reason) {
|
|
|
706665
706970
|
}
|
|
706666
706971
|
}
|
|
706667
706972
|
function getAutoRunCommand(reason) {
|
|
706668
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
706973
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && reason === "feedback_survey_good") {
|
|
706669
706974
|
return "/good-claude";
|
|
706670
706975
|
}
|
|
706671
706976
|
return "/issue";
|
|
@@ -706806,7 +707111,7 @@ var init_useIssueFlagBanner = __esm(() => {
|
|
|
706806
707111
|
|
|
706807
707112
|
// components/DevBar.tsx
|
|
706808
707113
|
function shouldShowDevBar() {
|
|
706809
|
-
return { USER_TYPE: "external", VERSION: "1.3.6-
|
|
707114
|
+
return { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant";
|
|
706810
707115
|
}
|
|
706811
707116
|
function DevBar() {
|
|
706812
707117
|
const $3 = import_compiler_runtime368.c(5);
|
|
@@ -708671,7 +708976,7 @@ function REPL({
|
|
|
708671
708976
|
}) {
|
|
708672
708977
|
const isRemoteSession = !!remoteSessionConfig;
|
|
708673
708978
|
const titleDisabled = import_react324.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE), []);
|
|
708674
|
-
const moreRightEnabled = import_react324.useMemo(() => ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
708979
|
+
const moreRightEnabled = import_react324.useMemo(() => ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }).USER_TYPE === "ant" && isEnvTruthy(process.env.CLAUDE_MORERIGHT), []);
|
|
708675
708980
|
const disableVirtualScroll = import_react324.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL), []);
|
|
708676
708981
|
const disableMessageActions = runtimeFeature11("MESSAGE_ACTIONS") ? import_react324.useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_MESSAGE_ACTIONS), []) : false;
|
|
708677
708982
|
import_react324.useEffect(() => {
|
|
@@ -708759,7 +709064,7 @@ function REPL({
|
|
|
708759
709064
|
const [ideInstallationStatus, setIDEInstallationStatus] = import_react324.useState(null);
|
|
708760
709065
|
const [showIdeOnboarding, setShowIdeOnboarding] = import_react324.useState(false);
|
|
708761
709066
|
const [showModelSwitchCallout, setShowModelSwitchCallout] = import_react324.useState(() => {
|
|
708762
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
709067
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
708763
709068
|
return shouldShowAntModelSwitch();
|
|
708764
709069
|
}
|
|
708765
709070
|
return false;
|
|
@@ -708921,7 +709226,7 @@ function REPL({
|
|
|
708921
709226
|
}, []);
|
|
708922
709227
|
const [showUndercoverCallout, setShowUndercoverCallout] = import_react324.useState(false);
|
|
708923
709228
|
import_react324.useEffect(() => {
|
|
708924
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
709229
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
708925
709230
|
(async () => {
|
|
708926
709231
|
const {
|
|
708927
709232
|
isInternalModelRepo: isInternalModelRepo2
|
|
@@ -709543,9 +709848,9 @@ function REPL({
|
|
|
709543
709848
|
return "ultraplan-launch";
|
|
709544
709849
|
if (allowDialogsWithAnimation && showIdeOnboarding)
|
|
709545
709850
|
return "ide-onboarding";
|
|
709546
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
709851
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && allowDialogsWithAnimation && showModelSwitchCallout)
|
|
709547
709852
|
return "model-switch";
|
|
709548
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
709853
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && allowDialogsWithAnimation && showUndercoverCallout)
|
|
709549
709854
|
return "undercover-callout";
|
|
709550
709855
|
if (allowDialogsWithAnimation && showEffortCallout)
|
|
709551
709856
|
return "effort-callout";
|
|
@@ -709886,7 +710191,7 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
709886
710191
|
dynamicSkillDirTriggers: new Set,
|
|
709887
710192
|
discoveredSkillNames: discoveredSkillNamesRef.current,
|
|
709888
710193
|
setResponseLength,
|
|
709889
|
-
pushApiMetricsEntry: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
710194
|
+
pushApiMetricsEntry: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? (ttftMs) => {
|
|
709890
710195
|
const now = Date.now();
|
|
709891
710196
|
const baseline = responseLengthRef.current;
|
|
709892
710197
|
apiMetricsRef2.current.push({
|
|
@@ -709898,8 +710203,12 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
709898
710203
|
});
|
|
709899
710204
|
} : undefined,
|
|
709900
710205
|
setStreamMode,
|
|
709901
|
-
onCompactProgress: (event) => {
|
|
710206
|
+
onCompactProgress: bindQueryOwnedProgress(queryGuard, abortController2.signal, (event) => {
|
|
709902
710207
|
switch (event.type) {
|
|
710208
|
+
case "compact_activity":
|
|
710209
|
+
lastQueryActivityAtRef.current = Date.now();
|
|
710210
|
+
setSpinnerMessage(event.kind === "waiting" ? "Waiting for compaction" : "Receiving compaction summary");
|
|
710211
|
+
break;
|
|
709903
710212
|
case "hooks_start":
|
|
709904
710213
|
setSpinnerColor("claudeBlue_FOR_SYSTEM_SPINNER");
|
|
709905
710214
|
setSpinnerShimmerColor("claudeBlueShimmer_FOR_SYSTEM_SPINNER");
|
|
@@ -709914,7 +710223,7 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
709914
710223
|
setSpinnerShimmerColor(null);
|
|
709915
710224
|
break;
|
|
709916
710225
|
}
|
|
709917
|
-
},
|
|
710226
|
+
}),
|
|
709918
710227
|
setInProgressToolUseIDs,
|
|
709919
710228
|
setHasInterruptibleToolInProgress: (v6) => {
|
|
709920
710229
|
hasInterruptibleToolInProgressRef.current = v6;
|
|
@@ -710158,7 +710467,7 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
710158
710467
|
}));
|
|
710159
710468
|
}
|
|
710160
710469
|
queryCheckpoint("query_end");
|
|
710161
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
710470
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && apiMetricsRef2.current.length > 0) {
|
|
710162
710471
|
const entries = apiMetricsRef2.current;
|
|
710163
710472
|
const ttfts = entries.map((e3) => e3.ttftMs);
|
|
710164
710473
|
const otpsValues = entries.map((e3) => {
|
|
@@ -710244,7 +710553,7 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
710244
710553
|
resetLoadingState();
|
|
710245
710554
|
await mrOnTurnComplete(messagesRef.current, abortController2.signal.aborted);
|
|
710246
710555
|
sendBridgeResultRef.current();
|
|
710247
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
710556
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && !abortController2.signal.aborted) {
|
|
710248
710557
|
setAppState((prev) => {
|
|
710249
710558
|
if (prev.tungstenActiveSession === undefined)
|
|
710250
710559
|
return prev;
|
|
@@ -710325,7 +710634,7 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
710325
710634
|
setPlanSlug(getSessionId(), oldPlanSlug);
|
|
710326
710635
|
}
|
|
710327
710636
|
}
|
|
710328
|
-
const shouldStorePlanForVerification = initialMsg.message.planContent && { USER_TYPE: "external", VERSION: "1.3.6-
|
|
710637
|
+
const shouldStorePlanForVerification = initialMsg.message.planContent && { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && isEnvTruthy(undefined);
|
|
710329
710638
|
setAppState((prev) => {
|
|
710330
710639
|
let updatedToolPermissionContext = initialMsg.mode ? applyPermissionUpdates(prev.toolPermissionContext, buildPermissionUpdates(initialMsg.mode, initialMsg.allowedPrompts)) : prev.toolPermissionContext;
|
|
710331
710640
|
if (feature("TRANSCRIPT_CLASSIFIER") && initialMsg.mode === "auto") {
|
|
@@ -710724,7 +711033,7 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
710724
711033
|
setAutoRunIssueReason(null);
|
|
710725
711034
|
}, []);
|
|
710726
711035
|
const handleSurveyRequestFeedback = import_react324.useCallback(() => {
|
|
710727
|
-
const command9 = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
711036
|
+
const command9 = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? "/issue" : "/feedback";
|
|
710728
711037
|
onSubmit(command9, {
|
|
710729
711038
|
setCursorOffset: () => {},
|
|
710730
711039
|
clearBuffer: () => {},
|
|
@@ -711093,7 +711402,7 @@ ${fileList}`);
|
|
|
711093
711402
|
assistantMode: scheduledTasksAssistantMode,
|
|
711094
711403
|
setMessages
|
|
711095
711404
|
});
|
|
711096
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
711405
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
711097
711406
|
useTaskListWatcher({
|
|
711098
711407
|
taskListId,
|
|
711099
711408
|
isLoading,
|
|
@@ -711171,7 +711480,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
|
|
|
711171
711480
|
return total === 1 ? `${customMessage}…` : `${customMessage}… ${completedCount}/${total}`;
|
|
711172
711481
|
}
|
|
711173
711482
|
const hookType = currentHooks[0]?.data.hookEvent === "SubagentStop" ? "subagent stop" : "stop";
|
|
711174
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
711483
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
711175
711484
|
const cmd = currentHooks[completedCount]?.data.command;
|
|
711176
711485
|
const label = cmd ? ` '${truncateToWidth(cmd, 40)}'` : "";
|
|
711177
711486
|
return total === 1 ? `running ${hookType} hook${label}` : `running ${hookType} hook${label}… ${completedCount}/${total}`;
|
|
@@ -711553,7 +711862,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
|
|
|
711553
711862
|
width: "100%",
|
|
711554
711863
|
children: toolJSX.jsx
|
|
711555
711864
|
}),
|
|
711556
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
711865
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime475.jsx(TungstenLiveMonitor, {}),
|
|
711557
711866
|
feature("WEB_BROWSER_TOOL") ? WebBrowserPanelModule && /* @__PURE__ */ jsx_runtime475.jsx(WebBrowserPanelModule.WebBrowserPanel, {}) : null,
|
|
711558
711867
|
/* @__PURE__ */ jsx_runtime475.jsx(ThemedBox_default, {
|
|
711559
711868
|
flexGrow: 1
|
|
@@ -711812,7 +712121,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
|
|
|
711812
712121
|
onDone: () => setShowIdeOnboarding(false),
|
|
711813
712122
|
installationStatus: ideInstallationStatus
|
|
711814
712123
|
}),
|
|
711815
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
712124
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && focusedInputDialog === "model-switch" && AntModelSwitchCallout26 && /* @__PURE__ */ jsx_runtime475.jsx(AntModelSwitchCallout26, {
|
|
711816
712125
|
onDone: (selection, modelAlias) => {
|
|
711817
712126
|
setShowModelSwitchCallout(false);
|
|
711818
712127
|
if (selection === "switch" && modelAlias) {
|
|
@@ -711824,7 +712133,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
|
|
|
711824
712133
|
}
|
|
711825
712134
|
}
|
|
711826
712135
|
}),
|
|
711827
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
712136
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && focusedInputDialog === "undercover-callout" && UndercoverAutoCallout26 && /* @__PURE__ */ jsx_runtime475.jsx(UndercoverAutoCallout26, {
|
|
711828
712137
|
onDone: () => setShowUndercoverCallout(false)
|
|
711829
712138
|
}),
|
|
711830
712139
|
focusedInputDialog === "effort-callout" && /* @__PURE__ */ jsx_runtime475.jsx(EffortCallout, {
|
|
@@ -711958,7 +712267,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
|
|
|
711958
712267
|
inputValue,
|
|
711959
712268
|
setInputValue
|
|
711960
712269
|
}),
|
|
711961
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
712270
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && skillImprovementSurvey.suggestion && /* @__PURE__ */ jsx_runtime475.jsx(SkillImprovementSurvey, {
|
|
711962
712271
|
isOpen: skillImprovementSurvey.isOpen,
|
|
711963
712272
|
skillName: skillImprovementSurvey.suggestion.skillName,
|
|
711964
712273
|
updates: skillImprovementSurvey.suggestion.updates,
|
|
@@ -712093,7 +712402,7 @@ Note: ctrl + z now suspends CCL, ctrl + _ undoes input.
|
|
|
712093
712402
|
setMessageSelectorPreselect(undefined);
|
|
712094
712403
|
}
|
|
712095
712404
|
}),
|
|
712096
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
712405
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && /* @__PURE__ */ jsx_runtime475.jsx(DevBar, {})
|
|
712097
712406
|
]
|
|
712098
712407
|
}),
|
|
712099
712408
|
feature("BUDDY") && !(companionNarrow && isFullscreenEnvEnabled()) && companionVisible ? /* @__PURE__ */ jsx_runtime475.jsx(CompanionSprite, {}) : null
|
|
@@ -712327,17 +712636,17 @@ var init_REPL = __esm(() => {
|
|
|
712327
712636
|
resetAnchor: () => {}
|
|
712328
712637
|
});
|
|
712329
712638
|
VoiceKeybindingHandler27 = runtimeVoiceFeature() ? (init_useVoiceIntegration(), __toCommonJS(exports_useVoiceIntegration)).VoiceKeybindingHandler : () => null;
|
|
712330
|
-
useFrustrationDetection27 = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
712639
|
+
useFrustrationDetection27 = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? __toCommonJS(exports_useFrustrationDetection).useFrustrationDetection : () => ({
|
|
712331
712640
|
state: "closed",
|
|
712332
712641
|
handleTranscriptSelect: () => {}
|
|
712333
712642
|
});
|
|
712334
|
-
useAntOrgWarningNotification27 = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
712643
|
+
useAntOrgWarningNotification27 = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? __toCommonJS(exports_useAntOrgWarningNotification).useAntOrgWarningNotification : () => {};
|
|
712335
712644
|
getCoordinatorUserContext27 = feature("COORDINATOR_MODE") ? (init_coordinatorMode(), __toCommonJS(exports_coordinatorMode)).getCoordinatorUserContext : () => ({});
|
|
712336
712645
|
proactiveModule8 = feature("PROACTIVE") || feature("KAIROS") ? __toCommonJS(exports_proactive) : null;
|
|
712337
712646
|
useProactive26 = feature("PROACTIVE") || feature("KAIROS") ? (init_useProactive(), __toCommonJS(exports_useProactive)).useProactive : null;
|
|
712338
|
-
AntModelSwitchCallout26 = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
712339
|
-
shouldShowAntModelSwitch = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
712340
|
-
UndercoverAutoCallout26 = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
712647
|
+
AntModelSwitchCallout26 = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? (init_AntModelSwitchCallout(), __toCommonJS(exports_AntModelSwitchCallout)).AntModelSwitchCallout : null;
|
|
712648
|
+
shouldShowAntModelSwitch = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? (init_AntModelSwitchCallout(), __toCommonJS(exports_AntModelSwitchCallout)).shouldShowModelSwitchCallout : () => false;
|
|
712649
|
+
UndercoverAutoCallout26 = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? (init_UndercoverAutoCallout(), __toCommonJS(exports_UndercoverAutoCallout)).UndercoverAutoCallout : null;
|
|
712341
712650
|
WebBrowserPanelModule = feature("WEB_BROWSER_TOOL") ? __toCommonJS(exports_WebBrowserPanel) : null;
|
|
712342
712651
|
EMPTY_MCP_CLIENTS2 = [];
|
|
712343
712652
|
HISTORY_STUB = {
|
|
@@ -715339,7 +715648,7 @@ function WelcomeV2() {
|
|
|
715339
715648
|
dimColor: true,
|
|
715340
715649
|
children: [
|
|
715341
715650
|
"v",
|
|
715342
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
715651
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
715343
715652
|
" "
|
|
715344
715653
|
]
|
|
715345
715654
|
})
|
|
@@ -715538,7 +715847,7 @@ function WelcomeV2() {
|
|
|
715538
715847
|
dimColor: true,
|
|
715539
715848
|
children: [
|
|
715540
715849
|
"v",
|
|
715541
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
715850
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
715542
715851
|
" "
|
|
715543
715852
|
]
|
|
715544
715853
|
})
|
|
@@ -715764,7 +716073,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
715764
716073
|
dimColor: true,
|
|
715765
716074
|
children: [
|
|
715766
716075
|
"v",
|
|
715767
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
716076
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
715768
716077
|
" "
|
|
715769
716078
|
]
|
|
715770
716079
|
});
|
|
@@ -715982,7 +716291,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
715982
716291
|
dimColor: true,
|
|
715983
716292
|
children: [
|
|
715984
716293
|
"v",
|
|
715985
|
-
{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
716294
|
+
{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
715986
716295
|
" "
|
|
715987
716296
|
]
|
|
715988
716297
|
});
|
|
@@ -717649,7 +717958,7 @@ function completeOnboarding() {
|
|
|
717649
717958
|
saveGlobalConfig((current) => ({
|
|
717650
717959
|
...current,
|
|
717651
717960
|
hasCompletedOnboarding: true,
|
|
717652
|
-
lastOnboardingVersion: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
717961
|
+
lastOnboardingVersion: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
717653
717962
|
}));
|
|
717654
717963
|
}
|
|
717655
717964
|
function showDialog(root, renderer) {
|
|
@@ -723893,6 +724202,77 @@ var init_setup2 = __esm(() => {
|
|
|
723893
724202
|
init_gates();
|
|
723894
724203
|
});
|
|
723895
724204
|
|
|
724205
|
+
// services/SessionMemory/sessionMemoryExtractionOutcome.ts
|
|
724206
|
+
function validateSessionMemoryExtraction(messages, memoryPath) {
|
|
724207
|
+
const output = messages;
|
|
724208
|
+
const removed = new Set;
|
|
724209
|
+
for (const item of output) {
|
|
724210
|
+
if (item.type === "tombstone" && item.message.uuid) {
|
|
724211
|
+
removed.add(item.message.uuid);
|
|
724212
|
+
}
|
|
724213
|
+
}
|
|
724214
|
+
const uses = new Map;
|
|
724215
|
+
let pending2 = 0;
|
|
724216
|
+
let successfulEdits = 0;
|
|
724217
|
+
let finalAssistant;
|
|
724218
|
+
for (const item of output) {
|
|
724219
|
+
if (item.type === "tombstone")
|
|
724220
|
+
continue;
|
|
724221
|
+
if (item.type === "assistant") {
|
|
724222
|
+
if (item.uuid && removed.has(item.uuid))
|
|
724223
|
+
continue;
|
|
724224
|
+
if (item.isApiErrorMessage || item.transportIntegrity === "incomplete")
|
|
724225
|
+
return false;
|
|
724226
|
+
finalAssistant = item;
|
|
724227
|
+
for (const block of item.message.content) {
|
|
724228
|
+
if (block.type !== "tool_use")
|
|
724229
|
+
continue;
|
|
724230
|
+
if (block.name !== FILE_EDIT_TOOL_NAME || !block.id || uses.has(block.id) || typeof block.input !== "object" || block.input === null || !("file_path" in block.input) || block.input.file_path !== memoryPath)
|
|
724231
|
+
return false;
|
|
724232
|
+
uses.set(block.id, { assistantUuid: item.uuid, resolved: false });
|
|
724233
|
+
pending2++;
|
|
724234
|
+
}
|
|
724235
|
+
continue;
|
|
724236
|
+
}
|
|
724237
|
+
if (item.type === "user" || item.type === "tool_result") {
|
|
724238
|
+
finalAssistant = undefined;
|
|
724239
|
+
const content = item.message.content;
|
|
724240
|
+
if (!Array.isArray(content) || content.length === 0)
|
|
724241
|
+
return false;
|
|
724242
|
+
if (item.type === "user" && item.nonFatalToolError)
|
|
724243
|
+
return false;
|
|
724244
|
+
for (const block of content) {
|
|
724245
|
+
if (block.type !== "tool_result" || block.is_error)
|
|
724246
|
+
return false;
|
|
724247
|
+
const use18 = uses.get(block.tool_use_id);
|
|
724248
|
+
if (!use18 || use18.resolved)
|
|
724249
|
+
return false;
|
|
724250
|
+
if (item.type === "user" && item.sourceToolAssistantUUID !== undefined && item.sourceToolAssistantUUID !== use18.assistantUuid)
|
|
724251
|
+
return false;
|
|
724252
|
+
use18.resolved = true;
|
|
724253
|
+
pending2--;
|
|
724254
|
+
successfulEdits++;
|
|
724255
|
+
}
|
|
724256
|
+
continue;
|
|
724257
|
+
}
|
|
724258
|
+
if (item.type === "system") {
|
|
724259
|
+
if ("level" in item && item.level === "error" || item.subtype === "api_error" || "preventContinuation" in item && item.preventContinuation || "preventedContinuation" in item && item.preventedContinuation)
|
|
724260
|
+
return false;
|
|
724261
|
+
continue;
|
|
724262
|
+
}
|
|
724263
|
+
if (item.type === "attachment") {
|
|
724264
|
+
if (item.attachment.type === "hook_blocking_error" || item.attachment.type === "hook_non_blocking_error")
|
|
724265
|
+
return false;
|
|
724266
|
+
continue;
|
|
724267
|
+
}
|
|
724268
|
+
if (item.type === "progress" || item.type === "tool_use_summary")
|
|
724269
|
+
continue;
|
|
724270
|
+
return false;
|
|
724271
|
+
}
|
|
724272
|
+
return successfulEdits > 0 && pending2 === 0 && finalAssistant?.message.stop_reason === "end_turn";
|
|
724273
|
+
}
|
|
724274
|
+
var init_sessionMemoryExtractionOutcome = () => {};
|
|
724275
|
+
|
|
723896
724276
|
// services/SessionMemory/sessionMemory.ts
|
|
723897
724277
|
import { writeFile as writeFile57 } from "fs/promises";
|
|
723898
724278
|
import memoize67 from "lodash-es/memoize.js";
|
|
@@ -723935,10 +724315,6 @@ function shouldExtractMemory(messages) {
|
|
|
723935
724315
|
const hasToolCallsInLastTurn = hasToolCallsInLastAssistantTurn(messages);
|
|
723936
724316
|
const shouldExtract = hasMetTokenThreshold && hasMetToolCallThreshold || hasMetTokenThreshold && !hasToolCallsInLastTurn;
|
|
723937
724317
|
if (shouldExtract) {
|
|
723938
|
-
const lastMessage = messages[messages.length - 1];
|
|
723939
|
-
if (lastMessage?.uuid) {
|
|
723940
|
-
lastMemoryMessageUuid = lastMessage.uuid;
|
|
723941
|
-
}
|
|
723942
724318
|
return true;
|
|
723943
724319
|
}
|
|
723944
724320
|
return false;
|
|
@@ -723977,6 +724353,31 @@ async function setupSessionMemoryFile(toolUseContext) {
|
|
|
723977
724353
|
});
|
|
723978
724354
|
return { memoryPath, currentMemory };
|
|
723979
724355
|
}
|
|
724356
|
+
function captureExtractionRequest(messages, toolUseContext, hookContext) {
|
|
724357
|
+
const snapshot2 = [...messages];
|
|
724358
|
+
return {
|
|
724359
|
+
messages: snapshot2,
|
|
724360
|
+
tokenCount: tokenCountWithEstimation(snapshot2),
|
|
724361
|
+
messageId: hasToolCallsInLastAssistantTurn(snapshot2) ? undefined : snapshot2[snapshot2.length - 1]?.uuid,
|
|
724362
|
+
memoryPath: getSessionMemoryPath(),
|
|
724363
|
+
resetVersion: getSessionMemoryResetVersion(),
|
|
724364
|
+
toolUseContext,
|
|
724365
|
+
hookContext: hookContext ? { ...hookContext, messages: snapshot2 } : undefined
|
|
724366
|
+
};
|
|
724367
|
+
}
|
|
724368
|
+
async function extractSessionMemory(context3) {
|
|
724369
|
+
if (context3.querySource !== "repl_main_thread")
|
|
724370
|
+
return;
|
|
724371
|
+
if (!isSessionMemoryGateEnabled()) {
|
|
724372
|
+
if (process.env.USER_TYPE === "ant" && !hasLoggedGateFailure) {
|
|
724373
|
+
hasLoggedGateFailure = true;
|
|
724374
|
+
logEvent("tengu_session_memory_gate_disabled", {});
|
|
724375
|
+
}
|
|
724376
|
+
return;
|
|
724377
|
+
}
|
|
724378
|
+
initSessionMemoryConfigIfNeeded();
|
|
724379
|
+
await runSessionMemoryExtraction(captureExtractionRequest(context3.messages, context3.toolUseContext, context3));
|
|
724380
|
+
}
|
|
723980
724381
|
function initSessionMemory() {
|
|
723981
724382
|
if (getIsRemoteMode())
|
|
723982
724383
|
return;
|
|
@@ -724009,15 +724410,7 @@ function createMemoryFileCanUseTool(memoryPath) {
|
|
|
724009
724410
|
};
|
|
724010
724411
|
};
|
|
724011
724412
|
}
|
|
724012
|
-
|
|
724013
|
-
if (!hasToolCallsInLastAssistantTurn(messages)) {
|
|
724014
|
-
const lastMessage = messages[messages.length - 1];
|
|
724015
|
-
if (lastMessage?.uuid) {
|
|
724016
|
-
setLastSummarizedMessageId(lastMessage.uuid);
|
|
724017
|
-
}
|
|
724018
|
-
}
|
|
724019
|
-
}
|
|
724020
|
-
var lastMemoryMessageUuid, initSessionMemoryConfigIfNeeded, hasLoggedGateFailure = false, extractSessionMemory;
|
|
724413
|
+
var lastMemoryMessageUuid, initSessionMemoryConfigIfNeeded, hasLoggedGateFailure = false, runSessionMemoryExtraction;
|
|
724021
724414
|
var init_sessionMemory = __esm(() => {
|
|
724022
724415
|
init_state();
|
|
724023
724416
|
init_prompts4();
|
|
@@ -724033,6 +724426,7 @@ var init_sessionMemory = __esm(() => {
|
|
|
724033
724426
|
init_autoCompact();
|
|
724034
724427
|
init_prompts2();
|
|
724035
724428
|
init_sessionMemoryUtils();
|
|
724429
|
+
init_sessionMemoryExtractionOutcome();
|
|
724036
724430
|
init_errors();
|
|
724037
724431
|
init_growthbook();
|
|
724038
724432
|
initSessionMemoryConfigIfNeeded = memoize67(() => {
|
|
@@ -724044,56 +724438,107 @@ var init_sessionMemory = __esm(() => {
|
|
|
724044
724438
|
};
|
|
724045
724439
|
setSessionMemoryConfig(config2);
|
|
724046
724440
|
});
|
|
724047
|
-
|
|
724048
|
-
const { messages, toolUseContext,
|
|
724049
|
-
|
|
724050
|
-
|
|
724051
|
-
|
|
724052
|
-
if (!isSessionMemoryGateEnabled()) {
|
|
724053
|
-
if (process.env.USER_TYPE === "ant" && !hasLoggedGateFailure) {
|
|
724054
|
-
hasLoggedGateFailure = true;
|
|
724055
|
-
logEvent("tengu_session_memory_gate_disabled", {});
|
|
724056
|
-
}
|
|
724057
|
-
return;
|
|
724441
|
+
runSessionMemoryExtraction = sequential(async (request) => {
|
|
724442
|
+
const { messages, toolUseContext, hookContext } = request;
|
|
724443
|
+
const parentSignal = toolUseContext.abortController.signal;
|
|
724444
|
+
if (parentSignal.aborted || request.resetVersion !== getSessionMemoryResetVersion() || request.memoryPath !== getSessionMemoryPath()) {
|
|
724445
|
+
return { success: false, error: "Session memory extraction canceled or superseded" };
|
|
724058
724446
|
}
|
|
724059
|
-
|
|
724060
|
-
|
|
724061
|
-
return;
|
|
724447
|
+
if (hookContext && !shouldExtractMemory(messages)) {
|
|
724448
|
+
return { success: false, error: "Session memory extraction not needed" };
|
|
724062
724449
|
}
|
|
724450
|
+
const generation = beginSessionMemoryExtraction();
|
|
724063
724451
|
markExtractionStarted();
|
|
724064
724452
|
const sessionMemoryAbortController = new AbortController;
|
|
724453
|
+
const onParentAbort = () => sessionMemoryAbortController.abort(parentSignal.reason);
|
|
724454
|
+
parentSignal.addEventListener("abort", onParentAbort, { once: true });
|
|
724065
724455
|
const sessionMemoryTimeoutId = setTimeout(() => sessionMemoryAbortController.abort("session_memory timeout 120s"), 120000);
|
|
724456
|
+
const rejectOutcome = (reason) => {
|
|
724457
|
+
logEvent("tengu_session_memory_extraction_rejected", {
|
|
724458
|
+
manual: !hookContext,
|
|
724459
|
+
aborted: reason === "aborted",
|
|
724460
|
+
invalid_outcome: reason === "invalid_outcome",
|
|
724461
|
+
unchanged_notes: reason === "unchanged_notes",
|
|
724462
|
+
superseded: reason === "superseded"
|
|
724463
|
+
});
|
|
724464
|
+
return { success: false, error: "Session memory extraction did not establish verified coverage" };
|
|
724465
|
+
};
|
|
724066
724466
|
try {
|
|
724067
|
-
const setupContext = createSubagentContext(toolUseContext
|
|
724467
|
+
const setupContext = createSubagentContext(toolUseContext, {
|
|
724468
|
+
abortController: sessionMemoryAbortController
|
|
724469
|
+
});
|
|
724068
724470
|
const { memoryPath, currentMemory } = await setupSessionMemoryFile(setupContext);
|
|
724069
724471
|
const userPrompt = await buildSessionMemoryUpdatePrompt(currentMemory, memoryPath);
|
|
724070
|
-
|
|
724472
|
+
let cacheSafeParams;
|
|
724473
|
+
if (hookContext) {
|
|
724474
|
+
cacheSafeParams = createCacheSafeParams({ ...hookContext, toolUseContext: setupContext });
|
|
724475
|
+
} else {
|
|
724476
|
+
const { tools, mainLoopModel } = toolUseContext.options;
|
|
724477
|
+
const [rawSystemPrompt, userContext, systemContext] = await Promise.all([
|
|
724478
|
+
getSystemPrompt(tools, mainLoopModel),
|
|
724479
|
+
getUserContext(),
|
|
724480
|
+
getSystemContext()
|
|
724481
|
+
]);
|
|
724482
|
+
cacheSafeParams = {
|
|
724483
|
+
systemPrompt: asSystemPrompt(rawSystemPrompt),
|
|
724484
|
+
userContext,
|
|
724485
|
+
systemContext,
|
|
724486
|
+
toolUseContext: setupContext,
|
|
724487
|
+
forkContextMessages: messages
|
|
724488
|
+
};
|
|
724489
|
+
}
|
|
724490
|
+
if (sessionMemoryAbortController.signal.aborted)
|
|
724491
|
+
return rejectOutcome("aborted");
|
|
724492
|
+
if (memoryPath !== request.memoryPath || request.resetVersion !== getSessionMemoryResetVersion()) {
|
|
724493
|
+
return rejectOutcome("superseded");
|
|
724494
|
+
}
|
|
724495
|
+
const result = await runForkedAgent({
|
|
724071
724496
|
promptMessages: [createUserMessage({ content: userPrompt })],
|
|
724072
|
-
cacheSafeParams
|
|
724497
|
+
cacheSafeParams,
|
|
724073
724498
|
canUseTool: createMemoryFileCanUseTool(memoryPath),
|
|
724074
724499
|
querySource: "session_memory",
|
|
724075
|
-
forkLabel: "session_memory",
|
|
724500
|
+
forkLabel: hookContext ? "session_memory" : "session_memory_manual",
|
|
724076
724501
|
overrides: {
|
|
724077
724502
|
readFileState: setupContext.readFileState,
|
|
724078
724503
|
abortController: sessionMemoryAbortController
|
|
724079
724504
|
}
|
|
724080
724505
|
});
|
|
724081
|
-
|
|
724082
|
-
|
|
724083
|
-
|
|
724084
|
-
|
|
724085
|
-
|
|
724086
|
-
|
|
724087
|
-
|
|
724088
|
-
|
|
724089
|
-
|
|
724090
|
-
|
|
724091
|
-
|
|
724092
|
-
|
|
724093
|
-
|
|
724094
|
-
|
|
724506
|
+
if (sessionMemoryAbortController.signal.aborted || parentSignal.aborted) {
|
|
724507
|
+
return rejectOutcome("aborted");
|
|
724508
|
+
}
|
|
724509
|
+
if (!validateSessionMemoryExtraction(result.messages, memoryPath)) {
|
|
724510
|
+
return rejectOutcome("invalid_outcome");
|
|
724511
|
+
}
|
|
724512
|
+
const content = await getFsImplementation().readFile(memoryPath, { encoding: "utf-8" });
|
|
724513
|
+
if (sessionMemoryAbortController.signal.aborted || parentSignal.aborted)
|
|
724514
|
+
return rejectOutcome("aborted");
|
|
724515
|
+
if (!content || content === currentMemory)
|
|
724516
|
+
return rejectOutcome("unchanged_notes");
|
|
724517
|
+
if (!request.messageId || !commitSessionMemoryCoverage(generation, request.messageId, memoryPath, content, request.tokenCount))
|
|
724518
|
+
return rejectOutcome("superseded");
|
|
724519
|
+
lastMemoryMessageUuid = request.messageId;
|
|
724520
|
+
if (hookContext) {
|
|
724521
|
+
const lastMessage = messages[messages.length - 1];
|
|
724522
|
+
const usage = lastMessage ? getTokenUsage(lastMessage) : undefined;
|
|
724523
|
+
const config2 = getSessionMemoryConfig();
|
|
724524
|
+
logEvent("tengu_session_memory_extraction", {
|
|
724525
|
+
input_tokens: usage?.input_tokens,
|
|
724526
|
+
output_tokens: usage?.output_tokens,
|
|
724527
|
+
cache_read_input_tokens: usage?.cache_read_input_tokens ?? undefined,
|
|
724528
|
+
cache_creation_input_tokens: usage?.cache_creation_input_tokens ?? undefined,
|
|
724529
|
+
config_min_message_tokens_to_init: config2.minimumMessageTokensToInit,
|
|
724530
|
+
config_min_tokens_between_update: config2.minimumTokensBetweenUpdate,
|
|
724531
|
+
config_tool_calls_between_updates: config2.toolCallsBetweenUpdates
|
|
724532
|
+
});
|
|
724533
|
+
} else {
|
|
724534
|
+
logEvent("tengu_session_memory_manual_extraction", {});
|
|
724535
|
+
}
|
|
724536
|
+
return { success: true, memoryPath };
|
|
724537
|
+
} catch (error5) {
|
|
724538
|
+
return { success: false, error: errorMessage(error5) };
|
|
724095
724539
|
} finally {
|
|
724096
724540
|
clearTimeout(sessionMemoryTimeoutId);
|
|
724541
|
+
parentSignal.removeEventListener("abort", onParentAbort);
|
|
724097
724542
|
markExtractionCompleted();
|
|
724098
724543
|
}
|
|
724099
724544
|
});
|
|
@@ -724508,7 +724953,7 @@ var init_types15 = __esm(() => {
|
|
|
724508
724953
|
});
|
|
724509
724954
|
|
|
724510
724955
|
// services/teamMemorySync/index.ts
|
|
724511
|
-
import { createHash as
|
|
724956
|
+
import { createHash as createHash27 } from "crypto";
|
|
724512
724957
|
import { mkdir as mkdir55, readdir as readdir36, readFile as readFile63, stat as stat54, writeFile as writeFile58 } from "fs/promises";
|
|
724513
724958
|
import { join as join180, relative as relative37, sep as sep39 } from "path";
|
|
724514
724959
|
function createSyncState() {
|
|
@@ -724519,7 +724964,7 @@ function createSyncState() {
|
|
|
724519
724964
|
};
|
|
724520
724965
|
}
|
|
724521
724966
|
function hashContent2(content) {
|
|
724522
|
-
return "sha256:" +
|
|
724967
|
+
return "sha256:" + createHash27("sha256").update(content, "utf8").digest("hex");
|
|
724523
724968
|
}
|
|
724524
724969
|
function isErrnoException(e3) {
|
|
724525
724970
|
return e3 instanceof Error && "code" in e3 && typeof e3.code === "string";
|
|
@@ -731367,7 +731812,7 @@ async function startMCPServer(cwd3, debug5, verbose) {
|
|
|
731367
731812
|
setCwd(cwd3);
|
|
731368
731813
|
const server = new Server({
|
|
731369
731814
|
name: "claude/tengu",
|
|
731370
|
-
version: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
731815
|
+
version: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION
|
|
731371
731816
|
}, {
|
|
731372
731817
|
capabilities: {
|
|
731373
731818
|
tools: {}
|
|
@@ -733172,7 +733617,7 @@ __export(exports_update, {
|
|
|
733172
733617
|
});
|
|
733173
733618
|
async function update() {
|
|
733174
733619
|
logEvent("tengu_update_check", {});
|
|
733175
|
-
writeToStdout(`Current version: ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733620
|
+
writeToStdout(`Current version: ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION}
|
|
733176
733621
|
`);
|
|
733177
733622
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
733178
733623
|
writeToStdout(`Checking for updates to ${channel2} version...
|
|
@@ -733247,8 +733692,8 @@ async function update() {
|
|
|
733247
733692
|
writeToStdout(`CCL is managed by Homebrew.
|
|
733248
733693
|
`);
|
|
733249
733694
|
const latest = await getLatestVersion(channel2);
|
|
733250
|
-
if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733251
|
-
writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733695
|
+
if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION, latest)) {
|
|
733696
|
+
writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} → ${latest}
|
|
733252
733697
|
`);
|
|
733253
733698
|
writeToStdout(`
|
|
733254
733699
|
`);
|
|
@@ -733264,8 +733709,8 @@ async function update() {
|
|
|
733264
733709
|
writeToStdout(`CCL is managed by winget.
|
|
733265
733710
|
`);
|
|
733266
733711
|
const latest = await getLatestVersion(channel2);
|
|
733267
|
-
if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733268
|
-
writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733712
|
+
if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION, latest)) {
|
|
733713
|
+
writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} → ${latest}
|
|
733269
733714
|
`);
|
|
733270
733715
|
writeToStdout(`
|
|
733271
733716
|
`);
|
|
@@ -733281,8 +733726,8 @@ async function update() {
|
|
|
733281
733726
|
writeToStdout(`CCL is managed by apk.
|
|
733282
733727
|
`);
|
|
733283
733728
|
const latest = await getLatestVersion(channel2);
|
|
733284
|
-
if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733285
|
-
writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733729
|
+
if (latest && !gte({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION, latest)) {
|
|
733730
|
+
writeToStdout(`Update available: ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} → ${latest}
|
|
733286
733731
|
`);
|
|
733287
733732
|
writeToStdout(`
|
|
733288
733733
|
`);
|
|
@@ -733347,11 +733792,11 @@ async function update() {
|
|
|
733347
733792
|
`);
|
|
733348
733793
|
await gracefulShutdown(1);
|
|
733349
733794
|
}
|
|
733350
|
-
if (result.latestVersion === { USER_TYPE: "external", VERSION: "1.3.6-
|
|
733351
|
-
writeToStdout(source_default.green(`CCL is up to date (${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733795
|
+
if (result.latestVersion === { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION) {
|
|
733796
|
+
writeToStdout(source_default.green(`CCL is up to date (${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION})`) + `
|
|
733352
733797
|
`);
|
|
733353
733798
|
} else {
|
|
733354
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733799
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} to version ${result.latestVersion}`) + `
|
|
733355
733800
|
`);
|
|
733356
733801
|
await regenerateCompletionCache();
|
|
733357
733802
|
}
|
|
@@ -733370,9 +733815,9 @@ async function update() {
|
|
|
733370
733815
|
await removeInstalledSymlink();
|
|
733371
733816
|
}
|
|
733372
733817
|
logForDebugging("update: Checking npm registry for latest version");
|
|
733373
|
-
logForDebugging(`update: Package URL: ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733818
|
+
logForDebugging(`update: Package URL: ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL}`);
|
|
733374
733819
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
733375
|
-
const npmCommand = `npm view ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733820
|
+
const npmCommand = `npm view ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL}@${npmTag} version`;
|
|
733376
733821
|
logForDebugging(`update: Running: ${npmCommand}`);
|
|
733377
733822
|
const latestVersion = await getLatestVersion(channel2);
|
|
733378
733823
|
logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
|
|
@@ -733392,7 +733837,7 @@ async function update() {
|
|
|
733392
733837
|
`);
|
|
733393
733838
|
process.stderr.write(` • Corporate proxy/firewall blocking npm
|
|
733394
733839
|
`);
|
|
733395
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733840
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL && !{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL.startsWith("@anthropic")) {
|
|
733396
733841
|
process.stderr.write(` • Internal/development build not published to npm
|
|
733397
733842
|
`);
|
|
733398
733843
|
}
|
|
@@ -733404,19 +733849,19 @@ async function update() {
|
|
|
733404
733849
|
`);
|
|
733405
733850
|
process.stderr.write(` • Run with --debug flag for more details
|
|
733406
733851
|
`);
|
|
733407
|
-
const packageName = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
733852
|
+
const packageName = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL || (process.env.USER_TYPE === "ant" ? "@anthropic-ai/claude-cli" : "@anthropic-ai/claude-code");
|
|
733408
733853
|
process.stderr.write(` • Manually check: npm view ${packageName} version
|
|
733409
733854
|
`);
|
|
733410
733855
|
process.stderr.write(` • Check if you need to login: npm whoami
|
|
733411
733856
|
`);
|
|
733412
733857
|
await gracefulShutdown(1);
|
|
733413
733858
|
}
|
|
733414
|
-
if (latestVersion === { USER_TYPE: "external", VERSION: "1.3.6-
|
|
733415
|
-
writeToStdout(source_default.green(`CCL is up to date (${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733859
|
+
if (latestVersion === { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION) {
|
|
733860
|
+
writeToStdout(source_default.green(`CCL is up to date (${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION})`) + `
|
|
733416
733861
|
`);
|
|
733417
733862
|
await gracefulShutdown(0);
|
|
733418
733863
|
}
|
|
733419
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733864
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION})
|
|
733420
733865
|
`);
|
|
733421
733866
|
writeToStdout(`Installing update...
|
|
733422
733867
|
`);
|
|
@@ -733461,7 +733906,7 @@ async function update() {
|
|
|
733461
733906
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
733462
733907
|
switch (status2) {
|
|
733463
733908
|
case "success":
|
|
733464
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733909
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} to version ${latestVersion}`) + `
|
|
733465
733910
|
`);
|
|
733466
733911
|
await regenerateCompletionCache();
|
|
733467
733912
|
break;
|
|
@@ -733471,7 +733916,7 @@ async function update() {
|
|
|
733471
733916
|
if (useLocalUpdate) {
|
|
733472
733917
|
process.stderr.write(`Try manually updating with:
|
|
733473
733918
|
`);
|
|
733474
|
-
process.stderr.write(` cd ~/.claude/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733919
|
+
process.stderr.write(` cd ~/.claude/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL}
|
|
733475
733920
|
`);
|
|
733476
733921
|
} else {
|
|
733477
733922
|
process.stderr.write(`Try running with sudo or fix npm permissions
|
|
@@ -733487,7 +733932,7 @@ async function update() {
|
|
|
733487
733932
|
if (useLocalUpdate) {
|
|
733488
733933
|
process.stderr.write(`Try manually updating with:
|
|
733489
733934
|
`);
|
|
733490
|
-
process.stderr.write(` cd ~/.claude/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
733935
|
+
process.stderr.write(` cd ~/.claude/local && npm update ${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.PACKAGE_URL}
|
|
733491
733936
|
`);
|
|
733492
733937
|
} else {
|
|
733493
733938
|
process.stderr.write(`Or consider using native installation with: margay install
|
|
@@ -733674,7 +734119,7 @@ function runMigrations() {
|
|
|
733674
734119
|
if (feature("TRANSCRIPT_CLASSIFIER")) {
|
|
733675
734120
|
resetAutoModeOptInForDefaultOffer();
|
|
733676
734121
|
}
|
|
733677
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
734122
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
733678
734123
|
migrateFennecToOpus();
|
|
733679
734124
|
}
|
|
733680
734125
|
saveGlobalConfig((prev) => prev.migrationVersion === CURRENT_MIGRATION_VERSION ? prev : {
|
|
@@ -733721,7 +734166,7 @@ function startDeferredPrefetches() {
|
|
|
733721
734166
|
if (!isBareMode()) {
|
|
733722
734167
|
skillChangeDetector.initialize();
|
|
733723
734168
|
}
|
|
733724
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
734169
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
733725
734170
|
Promise.resolve().then(() => exports_eventLoopStallDetector).then((m4) => m4.startEventLoopStallDetector());
|
|
733726
734171
|
}
|
|
733727
734172
|
}
|
|
@@ -734217,9 +734662,9 @@ async function run() {
|
|
|
734217
734662
|
const initOnly = options.initOnly ?? false;
|
|
734218
734663
|
const maintenance = options.maintenance ?? false;
|
|
734219
734664
|
const disableSlashCommands = options.disableSlashCommands || false;
|
|
734220
|
-
const tasksOption = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
734665
|
+
const tasksOption = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && options.tasks;
|
|
734221
734666
|
const taskListId = tasksOption ? typeof tasksOption === "string" ? tasksOption : DEFAULT_TASKS_MODE_TASK_LIST_ID : undefined;
|
|
734222
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
734667
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && taskListId) {
|
|
734223
734668
|
process.env.CLAUDE_CODE_TASK_LIST_ID = taskListId;
|
|
734224
734669
|
}
|
|
734225
734670
|
const worktreeOption = isWorktreeModeEnabled() ? options.worktree : undefined;
|
|
@@ -734505,7 +734950,7 @@ ${formattedErrors}
|
|
|
734505
734950
|
}
|
|
734506
734951
|
const chromeOpts = options;
|
|
734507
734952
|
setChromeFlagOverride(chromeOpts.chrome);
|
|
734508
|
-
const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
734953
|
+
const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" || isClaudeAISubscriber());
|
|
734509
734954
|
const autoEnableClaudeInChrome = !enableClaudeInChrome && shouldAutoEnableClaudeInChrome();
|
|
734510
734955
|
if (enableClaudeInChrome) {
|
|
734511
734956
|
const platform6 = getPlatform();
|
|
@@ -734678,7 +735123,7 @@ ${hint}` : hint;
|
|
|
734678
735123
|
dangerousPermissions,
|
|
734679
735124
|
overlyBroadBashPermissions
|
|
734680
735125
|
} = initResult;
|
|
734681
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
735126
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && overlyBroadBashPermissions.length > 0) {
|
|
734682
735127
|
for (const permission of overlyBroadBashPermissions) {
|
|
734683
735128
|
logForDebugging(`Ignoring overly broad shell permission ${permission.ruleDisplay} from ${permission.sourceDisplay}`);
|
|
734684
735129
|
}
|
|
@@ -734810,7 +735255,7 @@ ${hint}` : hint;
|
|
|
734810
735255
|
cacheSessionTitle(sessionNameArg);
|
|
734811
735256
|
}
|
|
734812
735257
|
const explicitModel = options.model || process.env.ANTHROPIC_MODEL;
|
|
734813
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
735258
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && explicitModel && explicitModel !== "default" && !hasGrowthBookEnvOverride("tengu_ant_model_override") && getGlobalConfig().cachedGrowthBookFeatures?.["tengu_ant_model_override"] == null) {
|
|
734814
735259
|
await initializeGrowthBook();
|
|
734815
735260
|
}
|
|
734816
735261
|
const userSpecifiedModel = options.model === "default" ? getDefaultMainLoopModel() : options.model;
|
|
@@ -734931,7 +735376,7 @@ ${inputPrompt}` : mainThreadAgentDefinition.initialPrompt;
|
|
|
734931
735376
|
}
|
|
734932
735377
|
if (customAgent.memory) {
|
|
734933
735378
|
logEvent("tengu_agent_memory_loaded", {
|
|
734934
|
-
...{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
735379
|
+
...{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" && {
|
|
734935
735380
|
agent_type: customAgent.agentType
|
|
734936
735381
|
},
|
|
734937
735382
|
scope: customAgent.memory,
|
|
@@ -734987,7 +735432,7 @@ ${assistantAddendum}` : assistantAddendum;
|
|
|
734987
735432
|
const ctx = getRenderContext(false);
|
|
734988
735433
|
getFpsMetrics = ctx.getFpsMetrics;
|
|
734989
735434
|
stats2 = ctx.stats;
|
|
734990
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
735435
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
734991
735436
|
installAsciicastRecorder();
|
|
734992
735437
|
}
|
|
734993
735438
|
const {
|
|
@@ -735175,7 +735620,7 @@ ${inputPrompt}` : mergePrompt;
|
|
|
735175
735620
|
}
|
|
735176
735621
|
}
|
|
735177
735622
|
logForDiagnosticsNoPII("info", "started", {
|
|
735178
|
-
version: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
735623
|
+
version: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
735179
735624
|
is_native_binary: isInBundledMode()
|
|
735180
735625
|
});
|
|
735181
735626
|
registerCleanup(async () => {
|
|
@@ -735408,7 +735853,7 @@ ${inputPrompt}` : mergePrompt;
|
|
|
735408
735853
|
if (!isBareMode()) {
|
|
735409
735854
|
startDeferredPrefetches();
|
|
735410
735855
|
Promise.resolve().then(() => (init_backgroundHousekeeping(), exports_backgroundHousekeeping)).then((m4) => m4.startBackgroundHousekeeping());
|
|
735411
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
735856
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
735412
735857
|
Promise.resolve().then(() => exports_sdkHeapDumpMonitor).then((m4) => m4.startSdkMemoryMonitor());
|
|
735413
735858
|
}
|
|
735414
735859
|
}
|
|
@@ -735621,7 +736066,7 @@ ${inputPrompt}` : mergePrompt;
|
|
|
735621
736066
|
logStartupTelemetry();
|
|
735622
736067
|
logSessionTelemetry();
|
|
735623
736068
|
});
|
|
735624
|
-
const sessionUploaderPromise = { USER_TYPE: "external", VERSION: "1.3.6-
|
|
736069
|
+
const sessionUploaderPromise = { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? Promise.resolve().then(() => exports_sessionDataUploader) : null;
|
|
735625
736070
|
const uploaderReady = sessionUploaderPromise ? sessionUploaderPromise.then((mod4) => mod4.createSessionTurnUploader()).catch(() => null) : null;
|
|
735626
736071
|
const sessionConfig = {
|
|
735627
736072
|
debug: debug5 || debugToStderr,
|
|
@@ -735765,7 +736210,7 @@ Session: ${directConnectConfig.sessionId}`, "info");
|
|
|
735765
736210
|
sshSession = await createSSHSession2({
|
|
735766
736211
|
host: _pendingSSH.host,
|
|
735767
736212
|
cwd: _pendingSSH.cwd,
|
|
735768
|
-
localVersion: { USER_TYPE: "external", VERSION: "1.3.6-
|
|
736213
|
+
localVersion: { USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION,
|
|
735769
736214
|
permissionMode: _pendingSSH.permissionMode,
|
|
735770
736215
|
dangerouslySkipPermissions: _pendingSSH.dangerouslySkipPermissions,
|
|
735771
736216
|
extraCliArgs: _pendingSSH.extraCliArgs
|
|
@@ -736067,7 +736512,7 @@ Usage: margay --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
736067
736512
|
}
|
|
736068
736513
|
}
|
|
736069
736514
|
}
|
|
736070
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
736515
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
736071
736516
|
if (options.resume && typeof options.resume === "string" && !maybeSessionId) {
|
|
736072
736517
|
const {
|
|
736073
736518
|
parseCcshareId: parseCcshareId2,
|
|
@@ -736270,13 +736715,13 @@ Usage: margay --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
736270
736715
|
pendingHookMessages
|
|
736271
736716
|
}, renderAndRun);
|
|
736272
736717
|
}
|
|
736273
|
-
}).version(`${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
736718
|
+
}).version(`${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} (CCL)`, "-v, --version", "Output the version number");
|
|
736274
736719
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
736275
736720
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
736276
736721
|
if (canUserConfigureAdvisor()) {
|
|
736277
736722
|
program2.addOption(new Option("--advisor <model>", "Enable the server-side advisor tool with the specified model (alias or full ID).").hideHelp());
|
|
736278
736723
|
}
|
|
736279
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
736724
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
736280
736725
|
program2.addOption(new Option("--delegate-permissions", "[ANT-ONLY] Alias for --permission-mode auto.").implies({
|
|
736281
736726
|
permissionMode: "auto"
|
|
736282
736727
|
}));
|
|
@@ -736680,7 +737125,7 @@ Omit sessionId to discover and pick from available sessions.
|
|
|
736680
737125
|
} = await Promise.resolve().then(() => (init_update(), exports_update));
|
|
736681
737126
|
await update2();
|
|
736682
737127
|
});
|
|
736683
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
737128
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
736684
737129
|
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 () => {
|
|
736685
737130
|
const {
|
|
736686
737131
|
up: up2
|
|
@@ -736688,7 +737133,7 @@ Omit sessionId to discover and pick from available sessions.
|
|
|
736688
737133
|
await up2();
|
|
736689
737134
|
});
|
|
736690
737135
|
}
|
|
736691
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
737136
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
736692
737137
|
program2.command("rollback [target]").description(`[ANT-ONLY] Roll back to a previous release
|
|
736693
737138
|
|
|
736694
737139
|
Examples:
|
|
@@ -736707,7 +737152,7 @@ Examples:
|
|
|
736707
737152
|
} = await Promise.resolve().then(() => (init_util(), exports_util));
|
|
736708
737153
|
await installHandler2(target, options);
|
|
736709
737154
|
});
|
|
736710
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
737155
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
736711
737156
|
const validateLogId = (value) => {
|
|
736712
737157
|
const maybeSessionId = validateUuid2(value);
|
|
736713
737158
|
if (maybeSessionId)
|
|
@@ -736737,7 +737182,7 @@ Examples:
|
|
|
736737
737182
|
} = await Promise.resolve().then(() => exports_ant);
|
|
736738
737183
|
await exportHandler2(source, outputFile);
|
|
736739
737184
|
});
|
|
736740
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
737185
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant") {
|
|
736741
737186
|
const taskCmd = program2.command("task").description("[ANT-ONLY] Manage task list tasks");
|
|
736742
737187
|
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) => {
|
|
736743
737188
|
const {
|
|
@@ -736847,7 +737292,7 @@ async function logTenguInit({
|
|
|
736847
737292
|
assistantActivationPath
|
|
736848
737293
|
},
|
|
736849
737294
|
autoUpdatesChannel: getInitialSettings().autoUpdatesChannel ?? "latest",
|
|
736850
|
-
...{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
737295
|
+
...{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE === "ant" ? (() => {
|
|
736851
737296
|
const cwd5 = getCwd();
|
|
736852
737297
|
const gitRoot = findGitRoot(cwd5);
|
|
736853
737298
|
const rp = gitRoot ? relative39(gitRoot, cwd5) || "." : undefined;
|
|
@@ -737070,7 +737515,7 @@ var init_main2 = __esm(() => {
|
|
|
737070
737515
|
kairosGate = feature("KAIROS") ? __toCommonJS(exports_gate) : null;
|
|
737071
737516
|
autoModeStateModule7 = feature("TRANSCRIPT_CLASSIFIER") ? __toCommonJS(exports_autoModeState) : null;
|
|
737072
737517
|
profileCheckpoint("main_tsx_imports_loaded");
|
|
737073
|
-
if ({ USER_TYPE: "external", VERSION: "1.3.6-
|
|
737518
|
+
if ({ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.USER_TYPE !== "ant" && isBeingDebugged()) {
|
|
737074
737519
|
process.exit(1);
|
|
737075
737520
|
}
|
|
737076
737521
|
_pendingConnect = feature("DIRECT_CONNECT") ? {
|
|
@@ -737177,7 +737622,7 @@ if (feature("ABLATION_BASELINE") && process.env.CLAUDE_CODE_ABLATION_BASELINE) {
|
|
|
737177
737622
|
async function main2() {
|
|
737178
737623
|
const args = process.argv.slice(2);
|
|
737179
737624
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
737180
|
-
console.log(`${{ USER_TYPE: "external", VERSION: "1.3.6-
|
|
737625
|
+
console.log(`${{ USER_TYPE: "external", VERSION: "1.3.6-beta.0", PACKAGE_URL: "@margay/ccl-core", BUILD_TIMESTAMP: "2026-09-12T07:38:30.001Z", ISSUES_EXPLAINER: "", VERSION_CHANGELOG: "", NATIVE_PACKAGE_URL: "", CLAUDE_VERSION: "1.3.6-beta.0" }.VERSION} (Margay)`);
|
|
737181
737626
|
return;
|
|
737182
737627
|
}
|
|
737183
737628
|
const {
|