@rayss-dev/openclaude 0.31.2-by-rayss → 0.33.1-by-rayss
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 +9 -0
- package/dist/acp.mjs +3890 -3282
- package/dist/cli.mjs +162 -154
- package/dist/sdk.mjs +641 -347
- package/package.json +1 -1
package/dist/sdk.mjs
CHANGED
|
@@ -10131,7 +10131,7 @@ var init_version = __esm(() => {
|
|
|
10131
10131
|
import_semver = __toESM(require_semver2(), 1);
|
|
10132
10132
|
fallbackBuildVersion = (() => {
|
|
10133
10133
|
try {
|
|
10134
|
-
return "0.
|
|
10134
|
+
return "0.33.1-by-rayss";
|
|
10135
10135
|
} catch {
|
|
10136
10136
|
return "0.0.0";
|
|
10137
10137
|
}
|
|
@@ -69154,6 +69154,10 @@ function inferRemoteModelOpenAIShimConfig(modelApiName, catalogEntry3) {
|
|
|
69154
69154
|
removeBodyFields: ["store"]
|
|
69155
69155
|
};
|
|
69156
69156
|
}
|
|
69157
|
+
const hasAnthropicModel = segments.some((s) => /^(?:[a-z]{2,4}\.)?(?:claude|anthropic)|^(?:sonnet|opus|haiku)-\d/.test(s));
|
|
69158
|
+
if (hasAnthropicModel) {
|
|
69159
|
+
return { removeBodyFields: ["store"] };
|
|
69160
|
+
}
|
|
69157
69161
|
const hasGlm = segments.some((s) => /^glm-\d/.test(s));
|
|
69158
69162
|
const isFireworks = segments.some((s) => s === "fireworks");
|
|
69159
69163
|
if (hasGlm && !isFireworks && !catalogEntry3) {
|
|
@@ -70361,7 +70365,7 @@ function getAttributionHeader(fingerprint, policy) {
|
|
|
70361
70365
|
if (!policy.generate) {
|
|
70362
70366
|
return "";
|
|
70363
70367
|
}
|
|
70364
|
-
const version2 = `${"0.
|
|
70368
|
+
const version2 = `${"0.33.1-by-rayss"}.${fingerprint}`;
|
|
70365
70369
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
70366
70370
|
const cch = "";
|
|
70367
70371
|
const workload = getWorkload();
|
|
@@ -103997,7 +104001,7 @@ var init_metadata = __esm(() => {
|
|
|
103997
104001
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
103998
104002
|
WHITESPACE_REGEX = /\s+/;
|
|
103999
104003
|
getVersionBase = memoize_default(() => {
|
|
104000
|
-
const match = "0.
|
|
104004
|
+
const match = "0.33.1-by-rayss".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
104001
104005
|
return match ? match[0] : undefined;
|
|
104002
104006
|
});
|
|
104003
104007
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -104037,9 +104041,9 @@ var init_metadata = __esm(() => {
|
|
|
104037
104041
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
104038
104042
|
isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
|
|
104039
104043
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
104040
|
-
version: "0.
|
|
104044
|
+
version: "0.33.1-by-rayss",
|
|
104041
104045
|
versionBase: getVersionBase(),
|
|
104042
|
-
buildTime: "2026-10-
|
|
104046
|
+
buildTime: "2026-10-17T12:42:18.156Z",
|
|
104043
104047
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
104044
104048
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
104045
104049
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -111629,16 +111633,6 @@ function normalizeReasoningLevels(levels) {
|
|
|
111629
111633
|
const normalized = (levels ?? DEFAULT_REASONING_LEVELS).filter(isSupportedEffortLevel);
|
|
111630
111634
|
return normalized.length > 0 ? normalized : [...DEFAULT_REASONING_LEVELS];
|
|
111631
111635
|
}
|
|
111632
|
-
function normalizeMetadataReasoningLevels(wireFormat, levels) {
|
|
111633
|
-
const normalized = normalizeReasoningLevels(levels);
|
|
111634
|
-
if (wireFormat === "deepseek_compatible") {
|
|
111635
|
-
return normalized.filter((level) => DEEPSEEK_METADATA_COMPAT_LEVELS.includes(level));
|
|
111636
|
-
}
|
|
111637
|
-
if (wireFormat === "zai_compatible") {
|
|
111638
|
-
return normalized.filter((level) => ZAI_METADATA_COMPAT_LEVELS.includes(level));
|
|
111639
|
-
}
|
|
111640
|
-
return normalized;
|
|
111641
|
-
}
|
|
111642
111636
|
function normalizeReasoningDefaultLevel(level, levels) {
|
|
111643
111637
|
if (!level || !isSupportedEffortLevel(level)) {
|
|
111644
111638
|
return;
|
|
@@ -111678,14 +111672,6 @@ function normalizeReasoningThinkingType(value) {
|
|
|
111678
111672
|
}
|
|
111679
111673
|
return;
|
|
111680
111674
|
}
|
|
111681
|
-
function normalizeDeepSeekReasoningEffort(effort) {
|
|
111682
|
-
return effort === "xhigh" || effort === "max" ? "max" : "high";
|
|
111683
|
-
}
|
|
111684
|
-
function normalizeZaiReasoningEffort(effort, supportsLowEffort = false) {
|
|
111685
|
-
if (supportsLowEffort && effort === "low")
|
|
111686
|
-
return "low";
|
|
111687
|
-
return effort === "xhigh" || effort === "max" ? "max" : "high";
|
|
111688
|
-
}
|
|
111689
111675
|
function resolveCompatibilityWireFormat(model, thinkingRequestFormat, routeIdOverride, useRuntimeFallback = true, processEnv = process.env) {
|
|
111690
111676
|
if (thinkingRequestFormat === "deepseek-compatible") {
|
|
111691
111677
|
return "deepseek_compatible";
|
|
@@ -111793,7 +111779,7 @@ function resolveMetadataReasoningControl(model, context) {
|
|
|
111793
111779
|
};
|
|
111794
111780
|
}
|
|
111795
111781
|
const wireFormat = reasoning.wireFormat;
|
|
111796
|
-
const levels = reasoning.mode === "levels" ?
|
|
111782
|
+
const levels = reasoning.mode === "levels" ? normalizeReasoningLevels(reasoning.levels) : [];
|
|
111797
111783
|
const controllable = Boolean(capabilities?.supportsReasoning !== false && metadataWireFormatSupportsEffort(wireFormat) && reasoning.mode === "levels" && levels.length > 0);
|
|
111798
111784
|
return {
|
|
111799
111785
|
supportsReasoning: capabilities?.supportsReasoning ?? true,
|
|
@@ -111949,7 +111935,7 @@ function resolveOpenAIShimReasoningRequestPlan(options) {
|
|
|
111949
111935
|
if (wireFormat === "deepseek_compatible") {
|
|
111950
111936
|
const thinkingType = requestedThinkingType ?? defaultThinkingType;
|
|
111951
111937
|
const shouldEnableThinking = thinkingType !== "disabled" && (thinkingType === "enabled" || options.requestedEffort !== undefined);
|
|
111952
|
-
const reasoningEffort = shouldEnableThinking && options.requestedEffort ?
|
|
111938
|
+
const reasoningEffort = shouldEnableThinking && options.requestedEffort ? options.requestedEffort : undefined;
|
|
111953
111939
|
return {
|
|
111954
111940
|
thinkingType: shouldEnableThinking ? "enabled" : requestedThinkingType === "disabled" ? "disabled" : undefined,
|
|
111955
111941
|
reasoningEffort,
|
|
@@ -111961,7 +111947,7 @@ function resolveOpenAIShimReasoningRequestPlan(options) {
|
|
|
111961
111947
|
const thinkingType = requestedThinkingType ?? defaultThinkingType;
|
|
111962
111948
|
if (thinkingType === "disabled") {
|
|
111963
111949
|
const supportsLowEffort = metadataWireFormat === "zai_compatible" && options.reasoningControl?.levels.includes("low") === true && options.reasoningControl.disableFormat !== "thinking_type_disabled";
|
|
111964
|
-
const translatedEffort = supportsLowEffort && options.requestedEffort ?
|
|
111950
|
+
const translatedEffort = supportsLowEffort && options.requestedEffort ? options.requestedEffort : "low";
|
|
111965
111951
|
return {
|
|
111966
111952
|
thinkingType: supportsLowEffort ? "enabled" : "disabled",
|
|
111967
111953
|
reasoningEffort: supportsLowEffort ? translatedEffort : undefined,
|
|
@@ -111971,7 +111957,7 @@ function resolveOpenAIShimReasoningRequestPlan(options) {
|
|
|
111971
111957
|
}
|
|
111972
111958
|
const shouldEnableThinking = thinkingType === "enabled" || options.requestedEffort !== undefined;
|
|
111973
111959
|
const metadataZaiSupportsReasoningEffort = metadataWireFormat === "zai_compatible" && (options.reasoningControl?.levels.length ?? 0) > 0;
|
|
111974
|
-
const reasoningEffort = options.requestedEffort && (metadataZaiSupportsReasoningEffort || metadataWireFormat !== "zai_compatible" && supportsZaiReasoningEffort(options.model)) ?
|
|
111960
|
+
const reasoningEffort = options.requestedEffort && (metadataZaiSupportsReasoningEffort || metadataWireFormat !== "zai_compatible" && supportsZaiReasoningEffort(options.model)) ? options.requestedEffort : undefined;
|
|
111975
111961
|
return {
|
|
111976
111962
|
thinkingType: shouldEnableThinking ? "enabled" : undefined,
|
|
111977
111963
|
reasoningEffort,
|
|
@@ -112177,7 +112163,7 @@ function getLegacyDefaultEffortForModel(model, context) {
|
|
|
112177
112163
|
}
|
|
112178
112164
|
return;
|
|
112179
112165
|
}
|
|
112180
|
-
var EFFORT_LEVELS, DEFAULT_REASONING_LEVELS, OPENAI_SHIM_COMPAT_LEVELS,
|
|
112166
|
+
var EFFORT_LEVELS, DEFAULT_REASONING_LEVELS, OPENAI_SHIM_COMPAT_LEVELS, GLOBAL_EFFORT_LEVELS, OPUS_DEFAULT_EFFORT_CONFIG_DEFAULT;
|
|
112181
112167
|
var init_effort = __esm(() => {
|
|
112182
112168
|
init_thinking();
|
|
112183
112169
|
init_settings2();
|
|
@@ -112201,8 +112187,6 @@ var init_effort = __esm(() => {
|
|
|
112201
112187
|
];
|
|
112202
112188
|
DEFAULT_REASONING_LEVELS = ["low", "medium", "high"];
|
|
112203
112189
|
OPENAI_SHIM_COMPAT_LEVELS = ["low", "medium", "high", "xhigh"];
|
|
112204
|
-
DEEPSEEK_METADATA_COMPAT_LEVELS = ["high", "xhigh"];
|
|
112205
|
-
ZAI_METADATA_COMPAT_LEVELS = ["low", "medium", "high", "xhigh"];
|
|
112206
112190
|
GLOBAL_EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max", "ultracode"];
|
|
112207
112191
|
OPUS_DEFAULT_EFFORT_CONFIG_DEFAULT = {
|
|
112208
112192
|
enabled: true,
|
|
@@ -112213,11 +112197,11 @@ var init_effort = __esm(() => {
|
|
|
112213
112197
|
|
|
112214
112198
|
// src/utils/userAgent.ts
|
|
112215
112199
|
function getClaudeCodeUserAgent() {
|
|
112216
|
-
return `claude-code/${"0.
|
|
112200
|
+
return `claude-code/${"0.33.1-by-rayss"}`;
|
|
112217
112201
|
}
|
|
112218
112202
|
function getOpenClaudeUserAgent() {
|
|
112219
112203
|
try {
|
|
112220
|
-
return `openclaude/${"0.
|
|
112204
|
+
return `openclaude/${"0.33.1-by-rayss"}`;
|
|
112221
112205
|
} catch {
|
|
112222
112206
|
return "openclaude/0.0.0";
|
|
112223
112207
|
}
|
|
@@ -112229,7 +112213,7 @@ function getUserAgent() {
|
|
|
112229
112213
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
112230
112214
|
const workload = getWorkload();
|
|
112231
112215
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
112232
|
-
return `claude-cli/${"0.
|
|
112216
|
+
return `claude-cli/${"0.33.1-by-rayss"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
112233
112217
|
}
|
|
112234
112218
|
function getMCPUserAgent() {
|
|
112235
112219
|
const parts = [];
|
|
@@ -112243,7 +112227,7 @@ function getMCPUserAgent() {
|
|
|
112243
112227
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
112244
112228
|
}
|
|
112245
112229
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
112246
|
-
return `claude-code/${"0.
|
|
112230
|
+
return `claude-code/${"0.33.1-by-rayss"}${suffix}`;
|
|
112247
112231
|
}
|
|
112248
112232
|
function getWebFetchUserAgent() {
|
|
112249
112233
|
const supportUrl = isFirstPartyAnthropicProvider() ? "https://support.anthropic.com/" : "https://github.com/rayss868/openclaude";
|
|
@@ -125264,287 +125248,293 @@ var init_session = __esm(() => {
|
|
|
125264
125248
|
session_default = noop63;
|
|
125265
125249
|
});
|
|
125266
125250
|
|
|
125251
|
+
// sdk-missing-stub:./commands/sessions/index.js
|
|
125252
|
+
var noop64 = () => null, sessions_default;
|
|
125253
|
+
var init_sessions = __esm(() => {
|
|
125254
|
+
sessions_default = noop64;
|
|
125255
|
+
});
|
|
125256
|
+
|
|
125267
125257
|
// sdk-missing-stub:./commands/set-context-window/index.js
|
|
125268
|
-
var
|
|
125258
|
+
var noop65 = () => null, set_context_window_default;
|
|
125269
125259
|
var init_set_context_window = __esm(() => {
|
|
125270
|
-
set_context_window_default =
|
|
125260
|
+
set_context_window_default = noop65;
|
|
125271
125261
|
});
|
|
125272
125262
|
|
|
125273
125263
|
// sdk-missing-stub:./commands/share/index.js
|
|
125274
|
-
var
|
|
125264
|
+
var noop66 = () => null, share_default;
|
|
125275
125265
|
var init_share = __esm(() => {
|
|
125276
|
-
share_default =
|
|
125266
|
+
share_default = noop66;
|
|
125277
125267
|
});
|
|
125278
125268
|
|
|
125279
125269
|
// sdk-missing-stub:./commands/skills/index.js
|
|
125280
|
-
var
|
|
125270
|
+
var noop67 = () => null, skills_default;
|
|
125281
125271
|
var init_skills = __esm(() => {
|
|
125282
|
-
skills_default =
|
|
125272
|
+
skills_default = noop67;
|
|
125283
125273
|
});
|
|
125284
125274
|
|
|
125285
125275
|
// sdk-missing-stub:./commands/status/index.js
|
|
125286
|
-
var
|
|
125276
|
+
var noop68 = () => null, status_default;
|
|
125287
125277
|
var init_status = __esm(() => {
|
|
125288
|
-
status_default =
|
|
125278
|
+
status_default = noop68;
|
|
125289
125279
|
});
|
|
125290
125280
|
|
|
125291
125281
|
// sdk-missing-stub:./commands/tasks/index.js
|
|
125292
|
-
var
|
|
125282
|
+
var noop69 = () => null, tasks_default;
|
|
125293
125283
|
var init_tasks = __esm(() => {
|
|
125294
|
-
tasks_default =
|
|
125284
|
+
tasks_default = noop69;
|
|
125295
125285
|
});
|
|
125296
125286
|
|
|
125297
125287
|
// sdk-missing-stub:./commands/teleport/index.js
|
|
125298
|
-
var
|
|
125288
|
+
var noop70 = () => null, teleport_default;
|
|
125299
125289
|
var init_teleport = __esm(() => {
|
|
125300
|
-
teleport_default =
|
|
125290
|
+
teleport_default = noop70;
|
|
125301
125291
|
});
|
|
125302
125292
|
|
|
125303
125293
|
// sdk-missing-stub:./commands/security-review.js
|
|
125304
|
-
var
|
|
125294
|
+
var noop71 = () => null, security_review_default;
|
|
125305
125295
|
var init_security_review = __esm(() => {
|
|
125306
|
-
security_review_default =
|
|
125296
|
+
security_review_default = noop71;
|
|
125307
125297
|
});
|
|
125308
125298
|
|
|
125309
125299
|
// sdk-missing-stub:./commands/bughunter/index.js
|
|
125310
|
-
var
|
|
125300
|
+
var noop72 = () => null, bughunter_default;
|
|
125311
125301
|
var init_bughunter = __esm(() => {
|
|
125312
|
-
bughunter_default =
|
|
125302
|
+
bughunter_default = noop72;
|
|
125313
125303
|
});
|
|
125314
125304
|
|
|
125315
125305
|
// sdk-missing-stub:./commands/bughunter-security/index.js
|
|
125316
|
-
var
|
|
125306
|
+
var noop73 = () => null, bughunter_security_default;
|
|
125317
125307
|
var init_bughunter_security = __esm(() => {
|
|
125318
|
-
bughunter_security_default =
|
|
125308
|
+
bughunter_security_default = noop73;
|
|
125319
125309
|
});
|
|
125320
125310
|
|
|
125321
125311
|
// sdk-missing-stub:./commands/bughunter-perf/index.js
|
|
125322
|
-
var
|
|
125312
|
+
var noop74 = () => null, bughunter_perf_default;
|
|
125323
125313
|
var init_bughunter_perf = __esm(() => {
|
|
125324
|
-
bughunter_perf_default =
|
|
125314
|
+
bughunter_perf_default = noop74;
|
|
125325
125315
|
});
|
|
125326
125316
|
|
|
125327
125317
|
// sdk-missing-stub:./commands/terminalSetup/index.js
|
|
125328
|
-
var
|
|
125318
|
+
var noop75 = () => null, terminalSetup_default;
|
|
125329
125319
|
var init_terminalSetup = __esm(() => {
|
|
125330
|
-
terminalSetup_default =
|
|
125320
|
+
terminalSetup_default = noop75;
|
|
125331
125321
|
});
|
|
125332
125322
|
|
|
125333
125323
|
// sdk-missing-stub:./commands/usage/index.js
|
|
125334
|
-
var
|
|
125324
|
+
var noop76 = () => null, usage_default;
|
|
125335
125325
|
var init_usage = __esm(() => {
|
|
125336
|
-
usage_default =
|
|
125326
|
+
usage_default = noop76;
|
|
125337
125327
|
});
|
|
125338
125328
|
|
|
125339
125329
|
// sdk-missing-stub:./commands/theme/index.js
|
|
125340
|
-
var
|
|
125330
|
+
var noop77 = () => null, theme_default;
|
|
125341
125331
|
var init_theme = __esm(() => {
|
|
125342
|
-
theme_default =
|
|
125332
|
+
theme_default = noop77;
|
|
125343
125333
|
});
|
|
125344
125334
|
|
|
125345
125335
|
// sdk-missing-stub:./commands/logo/index.js
|
|
125346
|
-
var
|
|
125336
|
+
var noop78 = () => null, logo_default;
|
|
125347
125337
|
var init_logo = __esm(() => {
|
|
125348
|
-
logo_default =
|
|
125338
|
+
logo_default = noop78;
|
|
125349
125339
|
});
|
|
125350
125340
|
|
|
125351
125341
|
// sdk-missing-stub:./commands/vim/index.js
|
|
125352
|
-
var
|
|
125342
|
+
var noop79 = () => null, vim_default;
|
|
125353
125343
|
var init_vim = __esm(() => {
|
|
125354
|
-
vim_default =
|
|
125344
|
+
vim_default = noop79;
|
|
125355
125345
|
});
|
|
125356
125346
|
|
|
125357
125347
|
// sdk-missing-stub:./commands/thinkback/index.js
|
|
125358
|
-
var
|
|
125348
|
+
var noop80 = () => null, thinkback_default;
|
|
125359
125349
|
var init_thinkback = __esm(() => {
|
|
125360
|
-
thinkback_default =
|
|
125350
|
+
thinkback_default = noop80;
|
|
125361
125351
|
});
|
|
125362
125352
|
|
|
125363
125353
|
// sdk-missing-stub:./commands/thinkback-play/index.js
|
|
125364
|
-
var
|
|
125354
|
+
var noop81 = () => null, thinkback_play_default;
|
|
125365
125355
|
var init_thinkback_play = __esm(() => {
|
|
125366
|
-
thinkback_play_default =
|
|
125356
|
+
thinkback_play_default = noop81;
|
|
125367
125357
|
});
|
|
125368
125358
|
|
|
125369
125359
|
// sdk-missing-stub:./commands/permissions/index.js
|
|
125370
|
-
var
|
|
125360
|
+
var noop82 = () => null, permissions_default;
|
|
125371
125361
|
var init_permissions2 = __esm(() => {
|
|
125372
|
-
permissions_default =
|
|
125362
|
+
permissions_default = noop82;
|
|
125373
125363
|
});
|
|
125374
125364
|
|
|
125375
125365
|
// sdk-missing-stub:./commands/plan/index.js
|
|
125376
|
-
var
|
|
125366
|
+
var noop83 = () => null, plan_default;
|
|
125377
125367
|
var init_plan = __esm(() => {
|
|
125378
|
-
plan_default =
|
|
125368
|
+
plan_default = noop83;
|
|
125379
125369
|
});
|
|
125380
125370
|
|
|
125381
125371
|
// sdk-missing-stub:./commands/fast/index.js
|
|
125382
|
-
var
|
|
125372
|
+
var noop84 = () => null, fast_default;
|
|
125383
125373
|
var init_fast = __esm(() => {
|
|
125384
|
-
fast_default =
|
|
125374
|
+
fast_default = noop84;
|
|
125385
125375
|
});
|
|
125386
125376
|
|
|
125387
125377
|
// sdk-missing-stub:./commands/passes/index.js
|
|
125388
|
-
var
|
|
125378
|
+
var noop85 = () => null, passes_default;
|
|
125389
125379
|
var init_passes = __esm(() => {
|
|
125390
|
-
passes_default =
|
|
125380
|
+
passes_default = noop85;
|
|
125391
125381
|
});
|
|
125392
125382
|
|
|
125393
125383
|
// sdk-missing-stub:./commands/privacy-settings/index.js
|
|
125394
|
-
var
|
|
125384
|
+
var noop86 = () => null, privacy_settings_default;
|
|
125395
125385
|
var init_privacy_settings = __esm(() => {
|
|
125396
|
-
privacy_settings_default =
|
|
125386
|
+
privacy_settings_default = noop86;
|
|
125397
125387
|
});
|
|
125398
125388
|
|
|
125399
125389
|
// sdk-missing-stub:./commands/provider/index.js
|
|
125400
|
-
var
|
|
125390
|
+
var noop87 = () => null, provider_default;
|
|
125401
125391
|
var init_provider = __esm(() => {
|
|
125402
|
-
provider_default =
|
|
125392
|
+
provider_default = noop87;
|
|
125403
125393
|
});
|
|
125404
125394
|
|
|
125405
125395
|
// sdk-missing-stub:./commands/hooks/index.js
|
|
125406
|
-
var
|
|
125396
|
+
var noop88 = () => null, hooks_default;
|
|
125407
125397
|
var init_hooks2 = __esm(() => {
|
|
125408
|
-
hooks_default =
|
|
125398
|
+
hooks_default = noop88;
|
|
125409
125399
|
});
|
|
125410
125400
|
|
|
125411
125401
|
// sdk-missing-stub:./commands/files/index.js
|
|
125412
|
-
var
|
|
125402
|
+
var noop89 = () => null, files_default;
|
|
125413
125403
|
var init_files2 = __esm(() => {
|
|
125414
|
-
files_default =
|
|
125404
|
+
files_default = noop89;
|
|
125415
125405
|
});
|
|
125416
125406
|
|
|
125417
125407
|
// sdk-missing-stub:./commands/branch/index.js
|
|
125418
|
-
var
|
|
125408
|
+
var noop90 = () => null, branch_default;
|
|
125419
125409
|
var init_branch = __esm(() => {
|
|
125420
|
-
branch_default =
|
|
125410
|
+
branch_default = noop90;
|
|
125421
125411
|
});
|
|
125422
125412
|
|
|
125423
125413
|
// sdk-missing-stub:./commands/agents/index.js
|
|
125424
|
-
var
|
|
125414
|
+
var noop91 = () => null, agents_default;
|
|
125425
125415
|
var init_agents = __esm(() => {
|
|
125426
|
-
agents_default =
|
|
125416
|
+
agents_default = noop91;
|
|
125427
125417
|
});
|
|
125428
125418
|
|
|
125429
125419
|
// sdk-missing-stub:./commands/auto-fix.js
|
|
125430
|
-
var
|
|
125420
|
+
var noop92 = () => null, auto_fix_default;
|
|
125431
125421
|
var init_auto_fix = __esm(() => {
|
|
125432
|
-
auto_fix_default =
|
|
125422
|
+
auto_fix_default = noop92;
|
|
125433
125423
|
});
|
|
125434
125424
|
|
|
125435
125425
|
// sdk-missing-stub:./commands/plugin/index.js
|
|
125436
|
-
var
|
|
125426
|
+
var noop93 = () => null, plugin_default;
|
|
125437
125427
|
var init_plugin = __esm(() => {
|
|
125438
|
-
plugin_default =
|
|
125428
|
+
plugin_default = noop93;
|
|
125439
125429
|
});
|
|
125440
125430
|
|
|
125441
125431
|
// sdk-missing-stub:./commands/reload-plugins/index.js
|
|
125442
|
-
var
|
|
125432
|
+
var noop94 = () => null, reload_plugins_default;
|
|
125443
125433
|
var init_reload_plugins = __esm(() => {
|
|
125444
|
-
reload_plugins_default =
|
|
125434
|
+
reload_plugins_default = noop94;
|
|
125445
125435
|
});
|
|
125446
125436
|
|
|
125447
125437
|
// sdk-missing-stub:./commands/rewind/index.js
|
|
125448
|
-
var
|
|
125438
|
+
var noop95 = () => null, rewind_default;
|
|
125449
125439
|
var init_rewind = __esm(() => {
|
|
125450
|
-
rewind_default =
|
|
125440
|
+
rewind_default = noop95;
|
|
125451
125441
|
});
|
|
125452
125442
|
|
|
125453
125443
|
// sdk-missing-stub:./commands/heapdump/index.js
|
|
125454
|
-
var
|
|
125444
|
+
var noop96 = () => null, heapdump_default;
|
|
125455
125445
|
var init_heapdump = __esm(() => {
|
|
125456
|
-
heapdump_default =
|
|
125446
|
+
heapdump_default = noop96;
|
|
125457
125447
|
});
|
|
125458
125448
|
|
|
125459
125449
|
// sdk-missing-stub:./commands/mock-limits/index.js
|
|
125460
|
-
var
|
|
125450
|
+
var noop97 = () => null, mock_limits_default;
|
|
125461
125451
|
var init_mock_limits = __esm(() => {
|
|
125462
|
-
mock_limits_default =
|
|
125452
|
+
mock_limits_default = noop97;
|
|
125463
125453
|
});
|
|
125464
125454
|
|
|
125465
125455
|
// sdk-missing-stub:./commands/bridge-kick.js
|
|
125466
|
-
var
|
|
125456
|
+
var noop98 = () => null, bridge_kick_default;
|
|
125467
125457
|
var init_bridge_kick = __esm(() => {
|
|
125468
|
-
bridge_kick_default =
|
|
125458
|
+
bridge_kick_default = noop98;
|
|
125469
125459
|
});
|
|
125470
125460
|
|
|
125471
125461
|
// sdk-missing-stub:./commands/version.js
|
|
125472
|
-
var
|
|
125462
|
+
var noop99 = () => null, version_default;
|
|
125473
125463
|
var init_version2 = __esm(() => {
|
|
125474
|
-
version_default =
|
|
125464
|
+
version_default = noop99;
|
|
125475
125465
|
});
|
|
125476
125466
|
|
|
125477
125467
|
// sdk-missing-stub:./commands/update/index.js
|
|
125478
|
-
var
|
|
125468
|
+
var noop100 = () => null, update_default;
|
|
125479
125469
|
var init_update = __esm(() => {
|
|
125480
|
-
update_default =
|
|
125470
|
+
update_default = noop100;
|
|
125481
125471
|
});
|
|
125482
125472
|
|
|
125483
125473
|
// sdk-missing-stub:./commands/wiki/index.js
|
|
125484
|
-
var
|
|
125474
|
+
var noop101 = () => null, wiki_default;
|
|
125485
125475
|
var init_wiki = __esm(() => {
|
|
125486
|
-
wiki_default =
|
|
125476
|
+
wiki_default = noop101;
|
|
125487
125477
|
});
|
|
125488
125478
|
|
|
125489
125479
|
// sdk-missing-stub:./commands/summary/index.js
|
|
125490
|
-
var
|
|
125480
|
+
var noop102 = () => null, summary_default;
|
|
125491
125481
|
var init_summary = __esm(() => {
|
|
125492
|
-
summary_default =
|
|
125482
|
+
summary_default = noop102;
|
|
125493
125483
|
});
|
|
125494
125484
|
|
|
125495
125485
|
// sdk-missing-stub:./commands/reset-limits/index.js
|
|
125496
|
-
var
|
|
125486
|
+
var noop103 = () => null, resetLimits, resetLimitsNonInteractive;
|
|
125497
125487
|
var init_reset_limits = __esm(() => {
|
|
125498
|
-
resetLimits =
|
|
125499
|
-
resetLimitsNonInteractive =
|
|
125488
|
+
resetLimits = noop103;
|
|
125489
|
+
resetLimitsNonInteractive = noop103;
|
|
125500
125490
|
});
|
|
125501
125491
|
|
|
125502
125492
|
// sdk-missing-stub:./commands/ant-trace/index.js
|
|
125503
|
-
var
|
|
125493
|
+
var noop104 = () => null, ant_trace_default;
|
|
125504
125494
|
var init_ant_trace = __esm(() => {
|
|
125505
|
-
ant_trace_default =
|
|
125495
|
+
ant_trace_default = noop104;
|
|
125506
125496
|
});
|
|
125507
125497
|
|
|
125508
125498
|
// sdk-missing-stub:./commands/perf-issue/index.js
|
|
125509
|
-
var
|
|
125499
|
+
var noop105 = () => null, perf_issue_default;
|
|
125510
125500
|
var init_perf_issue = __esm(() => {
|
|
125511
|
-
perf_issue_default =
|
|
125501
|
+
perf_issue_default = noop105;
|
|
125512
125502
|
});
|
|
125513
125503
|
|
|
125514
125504
|
// sdk-missing-stub:./commands/sandbox-toggle/index.js
|
|
125515
|
-
var
|
|
125505
|
+
var noop106 = () => null, sandbox_toggle_default;
|
|
125516
125506
|
var init_sandbox_toggle = __esm(() => {
|
|
125517
|
-
sandbox_toggle_default =
|
|
125507
|
+
sandbox_toggle_default = noop106;
|
|
125518
125508
|
});
|
|
125519
125509
|
|
|
125520
125510
|
// sdk-missing-stub:./commands/chrome/index.js
|
|
125521
|
-
var
|
|
125511
|
+
var noop107 = () => null, chrome_default;
|
|
125522
125512
|
var init_chrome = __esm(() => {
|
|
125523
|
-
chrome_default =
|
|
125513
|
+
chrome_default = noop107;
|
|
125524
125514
|
});
|
|
125525
125515
|
|
|
125526
125516
|
// sdk-missing-stub:./commands/stickers/index.js
|
|
125527
|
-
var
|
|
125517
|
+
var noop108 = () => null, stickers_default;
|
|
125528
125518
|
var init_stickers = __esm(() => {
|
|
125529
|
-
stickers_default =
|
|
125519
|
+
stickers_default = noop108;
|
|
125530
125520
|
});
|
|
125531
125521
|
|
|
125532
125522
|
// sdk-missing-stub:./commands/advisor.js
|
|
125533
|
-
var
|
|
125523
|
+
var noop109 = () => null, advisor_default;
|
|
125534
125524
|
var init_advisor = __esm(() => {
|
|
125535
|
-
advisor_default =
|
|
125525
|
+
advisor_default = noop109;
|
|
125536
125526
|
});
|
|
125537
125527
|
|
|
125538
125528
|
// sdk-missing-stub:./commands/ads.js
|
|
125539
|
-
var
|
|
125529
|
+
var noop110 = () => null, ads_default;
|
|
125540
125530
|
var init_ads = __esm(() => {
|
|
125541
|
-
ads_default =
|
|
125531
|
+
ads_default = noop110;
|
|
125542
125532
|
});
|
|
125543
125533
|
|
|
125544
125534
|
// sdk-missing-stub:./commands/smartroute/index.js
|
|
125545
|
-
var
|
|
125535
|
+
var noop111 = () => null, smartroute_default;
|
|
125546
125536
|
var init_smartroute = __esm(() => {
|
|
125547
|
-
smartroute_default =
|
|
125537
|
+
smartroute_default = noop111;
|
|
125548
125538
|
});
|
|
125549
125539
|
|
|
125550
125540
|
// node_modules/shell-quote/quote.js
|
|
@@ -126659,8 +126649,10 @@ function validateRetryAttemptsEnvVar(envVarName, value) {
|
|
|
126659
126649
|
if (!value) {
|
|
126660
126650
|
return DEFAULT_MAX_RETRIES;
|
|
126661
126651
|
}
|
|
126662
|
-
const
|
|
126663
|
-
|
|
126652
|
+
const normalized = value.trim();
|
|
126653
|
+
const isDecimalInteger = /^\d+$/.test(normalized);
|
|
126654
|
+
const parsed = isDecimalInteger ? Number(normalized) : Number.NaN;
|
|
126655
|
+
if (!Number.isFinite(parsed)) {
|
|
126664
126656
|
logForDebugging(`${envVarName} Invalid value "${value}" (using default: ${DEFAULT_MAX_RETRIES})`);
|
|
126665
126657
|
return DEFAULT_MAX_RETRIES;
|
|
126666
126658
|
}
|
|
@@ -128146,10 +128138,10 @@ var init__arrayIncludesWith = __esm(() => {
|
|
|
128146
128138
|
});
|
|
128147
128139
|
|
|
128148
128140
|
// node_modules/lodash-es/noop.js
|
|
128149
|
-
function
|
|
128141
|
+
function noop112() {}
|
|
128150
128142
|
var noop_default;
|
|
128151
128143
|
var init_noop = __esm(() => {
|
|
128152
|
-
noop_default =
|
|
128144
|
+
noop_default = noop112;
|
|
128153
128145
|
});
|
|
128154
128146
|
|
|
128155
128147
|
// node_modules/lodash-es/_createSet.js
|
|
@@ -130507,15 +130499,15 @@ var init_fileChangedWatcher = __esm(() => {
|
|
|
130507
130499
|
});
|
|
130508
130500
|
|
|
130509
130501
|
// sdk-missing-stub:@anthropic-ai/sandbox-runtime
|
|
130510
|
-
var
|
|
130502
|
+
var noop113 = () => null, SandboxManager, SandboxRuntimeConfigSchema, SandboxViolationStore = null;
|
|
130511
130503
|
var init_sandbox_runtime = __esm(() => {
|
|
130512
130504
|
SandboxManager = class {
|
|
130513
130505
|
static isSupportedPlatform = () => false;
|
|
130514
|
-
static create =
|
|
130506
|
+
static create = noop113;
|
|
130515
130507
|
static Version = "";
|
|
130516
130508
|
static annotateStderrWithSandboxFailures = (_command, stderr) => stderr;
|
|
130517
130509
|
};
|
|
130518
|
-
SandboxRuntimeConfigSchema = { parse:
|
|
130510
|
+
SandboxRuntimeConfigSchema = { parse: noop113 };
|
|
130519
130511
|
});
|
|
130520
130512
|
|
|
130521
130513
|
// node_modules/lodash-es/lodash.js
|
|
@@ -134588,28 +134580,68 @@ var init_limits = __esm(() => {
|
|
|
134588
134580
|
});
|
|
134589
134581
|
});
|
|
134590
134582
|
|
|
134583
|
+
// src/tools/FileReadTool/readDedup.ts
|
|
134584
|
+
function isFullRead(state2) {
|
|
134585
|
+
return (state2.offset === 1 || state2.offset === 0) && state2.limit === undefined;
|
|
134586
|
+
}
|
|
134587
|
+
function countLines(content) {
|
|
134588
|
+
if (content === "")
|
|
134589
|
+
return 0;
|
|
134590
|
+
const lines = content.split(`
|
|
134591
|
+
`).length;
|
|
134592
|
+
return content.endsWith(`
|
|
134593
|
+
`) ? lines - 1 : lines;
|
|
134594
|
+
}
|
|
134595
|
+
function isCoveredByFullRead(state2, offset, limit) {
|
|
134596
|
+
if (!isFullRead(state2))
|
|
134597
|
+
return false;
|
|
134598
|
+
if (limit !== undefined && limit <= 0)
|
|
134599
|
+
return false;
|
|
134600
|
+
const startLine = offset === 0 ? 1 : offset;
|
|
134601
|
+
return startLine >= 1 && startLine <= countLines(state2.content);
|
|
134602
|
+
}
|
|
134603
|
+
async function checkReadDedup(state2, offset, limit, deps) {
|
|
134604
|
+
if (!state2 || state2.isPartialView || state2.offset === undefined) {
|
|
134605
|
+
return { kind: "miss" };
|
|
134606
|
+
}
|
|
134607
|
+
const exactRange = state2.offset === offset && state2.limit === limit;
|
|
134608
|
+
if (!exactRange && !isCoveredByFullRead(state2, offset, limit)) {
|
|
134609
|
+
return { kind: "miss" };
|
|
134610
|
+
}
|
|
134611
|
+
try {
|
|
134612
|
+
const mtimeMs = await deps.getModificationTime();
|
|
134613
|
+
if (mtimeMs === state2.timestamp)
|
|
134614
|
+
return { kind: "unchanged" };
|
|
134615
|
+
const current = await deps.readRange(state2.offset, state2.limit);
|
|
134616
|
+
if (current.content === state2.content) {
|
|
134617
|
+
return { kind: "touched", timestamp: Math.floor(current.mtimeMs) };
|
|
134618
|
+
}
|
|
134619
|
+
} catch {}
|
|
134620
|
+
return { kind: "miss" };
|
|
134621
|
+
}
|
|
134622
|
+
|
|
134591
134623
|
// sdk-missing-stub:./UI.js
|
|
134592
|
-
var
|
|
134624
|
+
var noop114 = () => null, renderToolResultMessage, renderGroupedAgentToolUse, renderToolUseErrorMessage, renderToolUseMessage, renderToolUseProgressMessage, renderToolUseRejectedMessage, renderToolUseTag, userFacingName, userFacingNameBackgroundColor, BackgroundHint, renderToolUseQueuedMessage, getToolUseSummary, isResultTruncated, renderCreateResultMessage, renderCreateToolUseMessage, renderDeleteResultMessage, renderDeleteToolUseMessage, renderListResultMessage, renderListToolUseMessage;
|
|
134593
134625
|
var init_UI = __esm(() => {
|
|
134594
|
-
renderToolResultMessage =
|
|
134595
|
-
renderGroupedAgentToolUse =
|
|
134596
|
-
renderToolUseErrorMessage =
|
|
134597
|
-
renderToolUseMessage =
|
|
134598
|
-
renderToolUseProgressMessage =
|
|
134599
|
-
renderToolUseRejectedMessage =
|
|
134600
|
-
renderToolUseTag =
|
|
134601
|
-
userFacingName =
|
|
134602
|
-
userFacingNameBackgroundColor =
|
|
134603
|
-
BackgroundHint =
|
|
134604
|
-
renderToolUseQueuedMessage =
|
|
134605
|
-
getToolUseSummary =
|
|
134606
|
-
isResultTruncated =
|
|
134607
|
-
renderCreateResultMessage =
|
|
134608
|
-
renderCreateToolUseMessage =
|
|
134609
|
-
renderDeleteResultMessage =
|
|
134610
|
-
renderDeleteToolUseMessage =
|
|
134611
|
-
renderListResultMessage =
|
|
134612
|
-
renderListToolUseMessage =
|
|
134626
|
+
renderToolResultMessage = noop114;
|
|
134627
|
+
renderGroupedAgentToolUse = noop114;
|
|
134628
|
+
renderToolUseErrorMessage = noop114;
|
|
134629
|
+
renderToolUseMessage = noop114;
|
|
134630
|
+
renderToolUseProgressMessage = noop114;
|
|
134631
|
+
renderToolUseRejectedMessage = noop114;
|
|
134632
|
+
renderToolUseTag = noop114;
|
|
134633
|
+
userFacingName = noop114;
|
|
134634
|
+
userFacingNameBackgroundColor = noop114;
|
|
134635
|
+
BackgroundHint = noop114;
|
|
134636
|
+
renderToolUseQueuedMessage = noop114;
|
|
134637
|
+
getToolUseSummary = noop114;
|
|
134638
|
+
isResultTruncated = noop114;
|
|
134639
|
+
renderCreateResultMessage = noop114;
|
|
134640
|
+
renderCreateToolUseMessage = noop114;
|
|
134641
|
+
renderDeleteResultMessage = noop114;
|
|
134642
|
+
renderDeleteToolUseMessage = noop114;
|
|
134643
|
+
renderListResultMessage = noop114;
|
|
134644
|
+
renderListToolUseMessage = noop114;
|
|
134613
134645
|
});
|
|
134614
134646
|
|
|
134615
134647
|
// src/tools/FileReadTool/FileReadTool.ts
|
|
@@ -135258,25 +135290,27 @@ var init_FileReadTool = __esm(() => {
|
|
|
135258
135290
|
const fullFilePath = expandPath(file_path);
|
|
135259
135291
|
const dedupKillswitch = getFeatureValue_CACHED_MAY_BE_STALE("tengu_read_dedup_killswitch", false);
|
|
135260
135292
|
const existingState = dedupKillswitch ? undefined : readFileState.get(fullFilePath);
|
|
135261
|
-
|
|
135262
|
-
|
|
135263
|
-
|
|
135264
|
-
|
|
135265
|
-
|
|
135266
|
-
|
|
135267
|
-
|
|
135268
|
-
|
|
135269
|
-
|
|
135270
|
-
|
|
135271
|
-
return {
|
|
135272
|
-
data: {
|
|
135273
|
-
type: "file_unchanged",
|
|
135274
|
-
file: { filePath: file_path }
|
|
135275
|
-
}
|
|
135276
|
-
};
|
|
135277
|
-
}
|
|
135278
|
-
} catch {}
|
|
135293
|
+
const dedup = await checkReadDedup(existingState, offset, limit, {
|
|
135294
|
+
getModificationTime: () => getFileModificationTimeAsync(fullFilePath),
|
|
135295
|
+
readRange: (rangeOffset, rangeLimit) => readFileInRange(fullFilePath, rangeOffset === 0 ? 0 : rangeOffset - 1, rangeLimit, rangeLimit === undefined ? maxSizeBytes : undefined, context2.abortController.signal)
|
|
135296
|
+
});
|
|
135297
|
+
if (dedup.kind !== "miss" && existingState) {
|
|
135298
|
+
if (dedup.kind === "touched") {
|
|
135299
|
+
readFileState.set(fullFilePath, {
|
|
135300
|
+
...existingState,
|
|
135301
|
+
timestamp: dedup.timestamp
|
|
135302
|
+
});
|
|
135279
135303
|
}
|
|
135304
|
+
const analyticsExt = getFileExtensionForAnalytics(fullFilePath);
|
|
135305
|
+
logEvent("tengu_file_read_dedup", {
|
|
135306
|
+
...analyticsExt !== undefined && { ext: analyticsExt }
|
|
135307
|
+
});
|
|
135308
|
+
return {
|
|
135309
|
+
data: {
|
|
135310
|
+
type: "file_unchanged",
|
|
135311
|
+
file: { filePath: file_path }
|
|
135312
|
+
}
|
|
135313
|
+
};
|
|
135280
135314
|
}
|
|
135281
135315
|
const cwd2 = getCwd();
|
|
135282
135316
|
if (!isEnvTruthy(process.env.CLAUDE_CODE_SIMPLE)) {
|
|
@@ -144795,6 +144829,7 @@ var init_en2 = __esm(() => {
|
|
|
144795
144829
|
"commands.rename.description": "Rename the current conversation",
|
|
144796
144830
|
"commands.request-size.description": "Show estimated request context load and top contributors",
|
|
144797
144831
|
"commands.resume.description": "Resume a previous conversation",
|
|
144832
|
+
"commands.sessions.description": "List saved conversations to resume or delete them",
|
|
144798
144833
|
"commands.review.description": "Review a pull request",
|
|
144799
144834
|
"commands.rewind.description": "Restore the code and/or conversation to a previous point",
|
|
144800
144835
|
"commands.security-review.description": "Complete a security review of the pending changes on the current branch",
|
|
@@ -144870,6 +144905,7 @@ var init_vi2 = __esm(() => {
|
|
|
144870
144905
|
"commands.rename.description": "Đổi tên cuộc hội thoại hiện tại",
|
|
144871
144906
|
"commands.request-size.description": "Hiện tải ngữ cảnh ước tính và các thành phần chính",
|
|
144872
144907
|
"commands.resume.description": "Tiếp tục cuộc hội thoại trước",
|
|
144908
|
+
"commands.sessions.description": "Liệt kê các cuộc hội thoại đã lưu để tiếp tục hoặc xóa",
|
|
144873
144909
|
"commands.review.description": "Đánh giá pull request",
|
|
144874
144910
|
"commands.rewind.description": "Khôi phục mã và/hoặc cuộc hội thoại về điểm trước",
|
|
144875
144911
|
"commands.security-review.description": "Hoàn thành đánh giá bảo mật cho các thay đổi đang chờ trên nhánh hiện tại",
|
|
@@ -144948,6 +144984,7 @@ var init_commandDescriptions = __esm(() => {
|
|
|
144948
144984
|
rename: "commands.rename.description",
|
|
144949
144985
|
"request-size": "commands.request-size.description",
|
|
144950
144986
|
resume: "commands.resume.description",
|
|
144987
|
+
sessions: "commands.sessions.description",
|
|
144951
144988
|
review: "commands.review.description",
|
|
144952
144989
|
rewind: "commands.rewind.description",
|
|
144953
144990
|
"security-review": "commands.security-review.description",
|
|
@@ -153972,9 +154009,9 @@ __export(exports_toolRendering, {
|
|
|
153972
154009
|
default: () => toolRendering_default,
|
|
153973
154010
|
__stub: () => __stub2
|
|
153974
154011
|
});
|
|
153975
|
-
var
|
|
154012
|
+
var noop115 = () => null, toolRendering_default, __stub2 = true;
|
|
153976
154013
|
var init_toolRendering = __esm(() => {
|
|
153977
|
-
toolRendering_default =
|
|
154014
|
+
toolRendering_default = noop115;
|
|
153978
154015
|
});
|
|
153979
154016
|
|
|
153980
154017
|
// node_modules/ws/lib/constants.js
|
|
@@ -156897,14 +156934,14 @@ __export(exports_claude_for_chrome_mcp, {
|
|
|
156897
156934
|
ClaudeForChromeContext: () => ClaudeForChromeContext,
|
|
156898
156935
|
BROWSER_TOOLS: () => BROWSER_TOOLS
|
|
156899
156936
|
});
|
|
156900
|
-
var
|
|
156937
|
+
var noop116 = () => null, claude_for_chrome_mcp_default, __stub3 = true, BROWSER_TOOLS, ClaudeForChromeContext, createClaudeForChromeMcpServer, Logger, PermissionMode;
|
|
156901
156938
|
var init_claude_for_chrome_mcp = __esm(() => {
|
|
156902
|
-
claude_for_chrome_mcp_default =
|
|
156903
|
-
BROWSER_TOOLS =
|
|
156904
|
-
ClaudeForChromeContext =
|
|
156905
|
-
createClaudeForChromeMcpServer =
|
|
156906
|
-
Logger =
|
|
156907
|
-
PermissionMode =
|
|
156939
|
+
claude_for_chrome_mcp_default = noop116;
|
|
156940
|
+
BROWSER_TOOLS = noop116;
|
|
156941
|
+
ClaudeForChromeContext = noop116;
|
|
156942
|
+
createClaudeForChromeMcpServer = noop116;
|
|
156943
|
+
Logger = noop116;
|
|
156944
|
+
PermissionMode = noop116;
|
|
156908
156945
|
});
|
|
156909
156946
|
|
|
156910
156947
|
// src/services/analytics/sink.ts
|
|
@@ -156938,7 +156975,7 @@ function computeFingerprint(messageText2, version2) {
|
|
|
156938
156975
|
}
|
|
156939
156976
|
function computeFingerprintFromMessages(messages) {
|
|
156940
156977
|
const firstMessageText = extractFirstMessageText(messages);
|
|
156941
|
-
return computeFingerprint(firstMessageText, "0.
|
|
156978
|
+
return computeFingerprint(firstMessageText, "0.33.1-by-rayss");
|
|
156942
156979
|
}
|
|
156943
156980
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
156944
156981
|
var init_fingerprint = () => {};
|
|
@@ -157400,6 +157437,57 @@ async function createNodeWsClient(url3, options) {
|
|
|
157400
157437
|
function getConnectionTimeoutMs() {
|
|
157401
157438
|
return parseInt(process.env.MCP_TIMEOUT || "", 10) || 30000;
|
|
157402
157439
|
}
|
|
157440
|
+
function wrapResponseBodyWithCleanup2(response, cleanup, signal) {
|
|
157441
|
+
if (!response.body) {
|
|
157442
|
+
cleanup();
|
|
157443
|
+
return response;
|
|
157444
|
+
}
|
|
157445
|
+
const reader = response.body.getReader();
|
|
157446
|
+
let isCleanedUp = false;
|
|
157447
|
+
const finish = () => {
|
|
157448
|
+
if (isCleanedUp)
|
|
157449
|
+
return;
|
|
157450
|
+
isCleanedUp = true;
|
|
157451
|
+
signal?.removeEventListener("abort", cancelReader);
|
|
157452
|
+
cleanup();
|
|
157453
|
+
};
|
|
157454
|
+
const cancelReader = () => {
|
|
157455
|
+
reader.cancel(signal?.reason).catch(() => {});
|
|
157456
|
+
finish();
|
|
157457
|
+
};
|
|
157458
|
+
signal?.addEventListener("abort", cancelReader, { once: true });
|
|
157459
|
+
if (signal?.aborted) {
|
|
157460
|
+
cancelReader();
|
|
157461
|
+
}
|
|
157462
|
+
const body = new ReadableStream({
|
|
157463
|
+
async pull(controller) {
|
|
157464
|
+
try {
|
|
157465
|
+
const { done, value } = await reader.read();
|
|
157466
|
+
if (done) {
|
|
157467
|
+
controller.close();
|
|
157468
|
+
finish();
|
|
157469
|
+
} else {
|
|
157470
|
+
controller.enqueue(value);
|
|
157471
|
+
}
|
|
157472
|
+
} catch (error40) {
|
|
157473
|
+
controller.error(error40);
|
|
157474
|
+
finish();
|
|
157475
|
+
}
|
|
157476
|
+
},
|
|
157477
|
+
async cancel(reason) {
|
|
157478
|
+
try {
|
|
157479
|
+
await reader.cancel(reason);
|
|
157480
|
+
} finally {
|
|
157481
|
+
finish();
|
|
157482
|
+
}
|
|
157483
|
+
}
|
|
157484
|
+
});
|
|
157485
|
+
return new Response(body, {
|
|
157486
|
+
status: response.status,
|
|
157487
|
+
statusText: response.statusText,
|
|
157488
|
+
headers: response.headers
|
|
157489
|
+
});
|
|
157490
|
+
}
|
|
157403
157491
|
function wrapFetchWithTimeout(baseFetch) {
|
|
157404
157492
|
return async (url3, init) => {
|
|
157405
157493
|
const method = (init?.method ?? "GET").toUpperCase();
|
|
@@ -157429,14 +157517,64 @@ function wrapFetchWithTimeout(baseFetch) {
|
|
|
157429
157517
|
headers,
|
|
157430
157518
|
signal: controller.signal
|
|
157431
157519
|
});
|
|
157432
|
-
|
|
157433
|
-
return response;
|
|
157520
|
+
clearTimeout(timer);
|
|
157521
|
+
return wrapResponseBodyWithCleanup2(response, cleanup, controller.signal);
|
|
157434
157522
|
} catch (error40) {
|
|
157435
157523
|
cleanup();
|
|
157436
157524
|
throw error40;
|
|
157437
157525
|
}
|
|
157438
157526
|
};
|
|
157439
157527
|
}
|
|
157528
|
+
function wrapFetchWithRequestCancellation(baseFetch, activeRequests) {
|
|
157529
|
+
return async (url3, init) => {
|
|
157530
|
+
let requestId;
|
|
157531
|
+
if ((init?.method ?? "GET").toUpperCase() === "POST" && typeof init?.body === "string") {
|
|
157532
|
+
try {
|
|
157533
|
+
const request = JSON.parse(init.body);
|
|
157534
|
+
if (request !== null && typeof request === "object" && "id" in request && (typeof request.id === "string" || typeof request.id === "number")) {
|
|
157535
|
+
requestId = request.id;
|
|
157536
|
+
}
|
|
157537
|
+
} catch {}
|
|
157538
|
+
}
|
|
157539
|
+
if (requestId === undefined) {
|
|
157540
|
+
return baseFetch(url3, init);
|
|
157541
|
+
}
|
|
157542
|
+
const requestController = createAbortController();
|
|
157543
|
+
activeRequests.set(requestId, requestController);
|
|
157544
|
+
const { signal, cleanup } = createCombinedAbortSignal(init?.signal ?? undefined, {
|
|
157545
|
+
signalB: requestController.signal,
|
|
157546
|
+
trace: {
|
|
157547
|
+
subsystem: "mcp_http_request",
|
|
157548
|
+
controllerRole: "mcp_http_request"
|
|
157549
|
+
}
|
|
157550
|
+
});
|
|
157551
|
+
const finish = () => {
|
|
157552
|
+
cleanup();
|
|
157553
|
+
if (activeRequests.get(requestId) === requestController) {
|
|
157554
|
+
activeRequests.delete(requestId);
|
|
157555
|
+
}
|
|
157556
|
+
};
|
|
157557
|
+
try {
|
|
157558
|
+
const response = await baseFetch(url3, { ...init, signal });
|
|
157559
|
+
return wrapResponseBodyWithCleanup2(response, finish, signal);
|
|
157560
|
+
} catch (error40) {
|
|
157561
|
+
finish();
|
|
157562
|
+
throw error40;
|
|
157563
|
+
}
|
|
157564
|
+
};
|
|
157565
|
+
}
|
|
157566
|
+
function attachMcpRequestCancellationHandler(transport, activeRequests) {
|
|
157567
|
+
const send = transport.send.bind(transport);
|
|
157568
|
+
transport.send = async (message, options) => {
|
|
157569
|
+
if ("method" in message && message.method === "notifications/cancelled" && "params" in message && message.params !== undefined && typeof message.params === "object" && "requestId" in message.params) {
|
|
157570
|
+
const requestId = message.params.requestId;
|
|
157571
|
+
if (typeof requestId === "string" || typeof requestId === "number") {
|
|
157572
|
+
activeRequests.get(requestId)?.abort(new DOMException("MCP request cancelled.", "AbortError"));
|
|
157573
|
+
}
|
|
157574
|
+
}
|
|
157575
|
+
return send(message, options);
|
|
157576
|
+
};
|
|
157577
|
+
}
|
|
157440
157578
|
function buildMcpSseEventSourceHeaders(initHeaders) {
|
|
157441
157579
|
const headers = new Headers(initHeaders);
|
|
157442
157580
|
if (!headers.has("User-Agent")) {
|
|
@@ -157742,7 +157880,7 @@ async function callMCPToolWithUrlElicitationRetry({
|
|
|
157742
157880
|
const MAX_URL_ELICITATION_RETRIES = 3;
|
|
157743
157881
|
for (let attempt = 0;; attempt++) {
|
|
157744
157882
|
if (signal.aborted) {
|
|
157745
|
-
throw new
|
|
157883
|
+
throw new AbortError("Tool call aborted during URL elicitation");
|
|
157746
157884
|
}
|
|
157747
157885
|
try {
|
|
157748
157886
|
return await callToolFn({
|
|
@@ -157867,11 +158005,20 @@ async function callMCPTool({
|
|
|
157867
158005
|
logMCPDebug(name2, `Tool '${tool3}' still running (${duration4} elapsed)`);
|
|
157868
158006
|
}, 30000, toolStartTime, name, tool2);
|
|
157869
158007
|
const timeoutMs = getMcpToolTimeoutMs();
|
|
158008
|
+
const timeoutController = createAbortController();
|
|
158009
|
+
const {
|
|
158010
|
+
signal: requestSignal,
|
|
158011
|
+
cleanup: cleanupRequestSignal
|
|
158012
|
+
} = createCombinedAbortSignal(signal, {
|
|
158013
|
+
signalB: timeoutController.signal,
|
|
158014
|
+
trace: { subsystem: "mcp_tool_call", controllerRole: "mcp_tool_call" }
|
|
158015
|
+
});
|
|
157870
158016
|
let timeoutId;
|
|
157871
158017
|
const timeoutPromise = new Promise((_, reject) => {
|
|
157872
|
-
timeoutId = setTimeout((
|
|
157873
|
-
|
|
157874
|
-
|
|
158018
|
+
timeoutId = setTimeout(() => {
|
|
158019
|
+
timeoutController.abort(new DOMException("The operation timed out.", "TimeoutError"));
|
|
158020
|
+
reject(new TelemetrySafeError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS(`MCP server "${name}" tool "${tool2}" timed out after ${Math.floor(timeoutMs / 1000)}s`, "MCP tool timeout"));
|
|
158021
|
+
}, timeoutMs);
|
|
157875
158022
|
});
|
|
157876
158023
|
const result = await Promise.race([
|
|
157877
158024
|
client.callTool({
|
|
@@ -157879,7 +158026,7 @@ async function callMCPTool({
|
|
|
157879
158026
|
arguments: args,
|
|
157880
158027
|
_meta: meta
|
|
157881
158028
|
}, CallToolResultSchema, {
|
|
157882
|
-
signal,
|
|
158029
|
+
signal: requestSignal,
|
|
157883
158030
|
timeout: timeoutMs,
|
|
157884
158031
|
onprogress: onProgress ? (sdkProgress) => {
|
|
157885
158032
|
onProgress({
|
|
@@ -157898,6 +158045,7 @@ async function callMCPTool({
|
|
|
157898
158045
|
if (timeoutId) {
|
|
157899
158046
|
clearTimeout(timeoutId);
|
|
157900
158047
|
}
|
|
158048
|
+
cleanupRequestSignal();
|
|
157901
158049
|
});
|
|
157902
158050
|
if ("isError" in result && result.isError) {
|
|
157903
158051
|
let errorDetails = "Unknown error";
|
|
@@ -158011,6 +158159,7 @@ var init_client2 = __esm(() => {
|
|
|
158011
158159
|
init_McpAuthTool();
|
|
158012
158160
|
init_ReadMcpResourceTool();
|
|
158013
158161
|
init_abortController();
|
|
158162
|
+
init_combinedAbortSignal();
|
|
158014
158163
|
init_errors();
|
|
158015
158164
|
init_auth();
|
|
158016
158165
|
init_cleanupRegistry();
|
|
@@ -158215,13 +158364,14 @@ var init_client2 = __esm(() => {
|
|
|
158215
158364
|
const allowUnauthorizedRefresh = !hasExplicitAuthorization;
|
|
158216
158365
|
const proxyOptions = getProxyFetchOptions();
|
|
158217
158366
|
logMCPDebug(name, `Proxy options: ${proxyOptions.dispatcher ? "custom dispatcher" : "default"}`);
|
|
158367
|
+
const activeHttpRequests = new Map;
|
|
158218
158368
|
const transportOptions = {
|
|
158219
158369
|
authProvider,
|
|
158220
|
-
fetch: wrapFetchWithTimeout(wrapFetchWithStepUpDetection(createFetchWithInit(), authProvider, {
|
|
158370
|
+
fetch: wrapFetchWithRequestCancellation(wrapFetchWithTimeout(wrapFetchWithStepUpDetection(createFetchWithInit(), authProvider, {
|
|
158221
158371
|
allowUnauthorizedRefresh,
|
|
158222
158372
|
resourceUrl: serverRef.url,
|
|
158223
158373
|
providerOwnsAuthorization: allowUnauthorizedRefresh
|
|
158224
|
-
})),
|
|
158374
|
+
})), activeHttpRequests),
|
|
158225
158375
|
requestInit: {
|
|
158226
158376
|
...proxyOptions,
|
|
158227
158377
|
headers: {
|
|
@@ -158241,6 +158391,7 @@ var init_client2 = __esm(() => {
|
|
|
158241
158391
|
timeoutMs: MCP_REQUEST_TIMEOUT_MS
|
|
158242
158392
|
})}`);
|
|
158243
158393
|
transport = new StreamableHTTPClientTransport(new URL(serverRef.url), transportOptions);
|
|
158394
|
+
attachMcpRequestCancellationHandler(transport, activeHttpRequests);
|
|
158244
158395
|
logMCPDebug(name, `HTTP transport created successfully`);
|
|
158245
158396
|
} else if (serverRef.type === "sdk") {
|
|
158246
158397
|
throw new Error("SDK servers should be handled in print.ts");
|
|
@@ -158255,8 +158406,9 @@ var init_client2 = __esm(() => {
|
|
|
158255
158406
|
logMCPDebug(name, `Using claude.ai proxy at ${proxyUrl}`);
|
|
158256
158407
|
const fetchWithAuth = createClaudeAiProxyFetch(globalThis.fetch);
|
|
158257
158408
|
const proxyOptions = getProxyFetchOptions();
|
|
158409
|
+
const activeProxyRequests = new Map;
|
|
158258
158410
|
const transportOptions = {
|
|
158259
|
-
fetch: wrapFetchWithTimeout(fetchWithAuth),
|
|
158411
|
+
fetch: wrapFetchWithRequestCancellation(wrapFetchWithTimeout(fetchWithAuth), activeProxyRequests),
|
|
158260
158412
|
requestInit: {
|
|
158261
158413
|
...proxyOptions,
|
|
158262
158414
|
headers: {
|
|
@@ -158266,6 +158418,7 @@ var init_client2 = __esm(() => {
|
|
|
158266
158418
|
}
|
|
158267
158419
|
};
|
|
158268
158420
|
transport = new StreamableHTTPClientTransport(new URL(proxyUrl), transportOptions);
|
|
158421
|
+
attachMcpRequestCancellationHandler(transport, activeProxyRequests);
|
|
158269
158422
|
logMCPDebug(name, `claude.ai proxy transport created successfully`);
|
|
158270
158423
|
} else if ((serverRef.type === "stdio" || !serverRef.type) && isClaudeInChromeMCPServer(name)) {
|
|
158271
158424
|
const { createChromeContext: createChromeContext2 } = await Promise.resolve().then(() => (init_mcpServer(), exports_mcpServer));
|
|
@@ -158305,7 +158458,7 @@ var init_client2 = __esm(() => {
|
|
|
158305
158458
|
const client = new Client({
|
|
158306
158459
|
name: "claude-code",
|
|
158307
158460
|
title: "OpenClaude",
|
|
158308
|
-
version: "0.
|
|
158461
|
+
version: "0.33.1-by-rayss",
|
|
158309
158462
|
description: "OpenClaude — coding-agent CLI for any LLM provider",
|
|
158310
158463
|
websiteUrl: PRODUCT_URL
|
|
158311
158464
|
}, {
|
|
@@ -164037,9 +164190,9 @@ var init_claudemd = __esm(() => {
|
|
|
164037
164190
|
});
|
|
164038
164191
|
|
|
164039
164192
|
// sdk-missing-stub:../state/selectors.js
|
|
164040
|
-
var
|
|
164193
|
+
var noop117 = () => null, getViewedTeammateTask;
|
|
164041
164194
|
var init_selectors = __esm(() => {
|
|
164042
|
-
getViewedTeammateTask =
|
|
164195
|
+
getViewedTeammateTask = noop117;
|
|
164043
164196
|
});
|
|
164044
164197
|
|
|
164045
164198
|
// src/services/diagnosticTracking.ts
|
|
@@ -165352,9 +165505,9 @@ __export(exports_repoMap, {
|
|
|
165352
165505
|
default: () => repoMap_default,
|
|
165353
165506
|
__stub: () => __stub4
|
|
165354
165507
|
});
|
|
165355
|
-
var
|
|
165508
|
+
var noop118 = () => null, repoMap_default, __stub4 = true;
|
|
165356
165509
|
var init_repoMap = __esm(() => {
|
|
165357
|
-
repoMap_default =
|
|
165510
|
+
repoMap_default = noop118;
|
|
165358
165511
|
});
|
|
165359
165512
|
|
|
165360
165513
|
// src/utils/nativeInstaller/pidLock.ts
|
|
@@ -167969,22 +168122,22 @@ function canDescendantShowPermissionPrompts({
|
|
|
167969
168122
|
}
|
|
167970
168123
|
|
|
167971
168124
|
// sdk-missing-stub:react-compiler-runtime
|
|
167972
|
-
var
|
|
168125
|
+
var noop119 = () => null, c6;
|
|
167973
168126
|
var init_react_compiler_runtime = __esm(() => {
|
|
167974
|
-
c6 =
|
|
168127
|
+
c6 = noop119;
|
|
167975
168128
|
});
|
|
167976
168129
|
|
|
167977
168130
|
// sdk-missing-stub:src/components/ConfigurableShortcutHint.js
|
|
167978
|
-
var
|
|
168131
|
+
var noop120 = () => null, ConfigurableShortcutHint;
|
|
167979
168132
|
var init_ConfigurableShortcutHint = __esm(() => {
|
|
167980
|
-
ConfigurableShortcutHint =
|
|
168133
|
+
ConfigurableShortcutHint = noop120;
|
|
167981
168134
|
});
|
|
167982
168135
|
|
|
167983
168136
|
// sdk-missing-stub:src/components/CtrlOToExpand.js
|
|
167984
|
-
var
|
|
168137
|
+
var noop121 = () => null, CtrlOToExpand, SubAgentProvider;
|
|
167985
168138
|
var init_CtrlOToExpand2 = __esm(() => {
|
|
167986
|
-
CtrlOToExpand =
|
|
167987
|
-
SubAgentProvider =
|
|
168139
|
+
CtrlOToExpand = noop121;
|
|
168140
|
+
SubAgentProvider = noop121;
|
|
167988
168141
|
});
|
|
167989
168142
|
|
|
167990
168143
|
// sdk-missing-stub:src/components/design-system/Byline.js
|
|
@@ -167997,43 +168150,43 @@ var init_KeyboardShortcutHint = () => {};
|
|
|
167997
168150
|
var init_AgentProgressLine = () => {};
|
|
167998
168151
|
|
|
167999
168152
|
// sdk-missing-stub:../../components/FallbackToolUseErrorMessage.js
|
|
168000
|
-
var
|
|
168153
|
+
var noop122 = () => null, FallbackToolUseErrorMessage;
|
|
168001
168154
|
var init_FallbackToolUseErrorMessage = __esm(() => {
|
|
168002
|
-
FallbackToolUseErrorMessage =
|
|
168155
|
+
FallbackToolUseErrorMessage = noop122;
|
|
168003
168156
|
});
|
|
168004
168157
|
|
|
168005
168158
|
// sdk-missing-stub:../../components/FallbackToolUseRejectedMessage.js
|
|
168006
|
-
var
|
|
168159
|
+
var noop123 = () => null, FallbackToolUseRejectedMessage;
|
|
168007
168160
|
var init_FallbackToolUseRejectedMessage = __esm(() => {
|
|
168008
|
-
FallbackToolUseRejectedMessage =
|
|
168161
|
+
FallbackToolUseRejectedMessage = noop123;
|
|
168009
168162
|
});
|
|
168010
168163
|
|
|
168011
168164
|
// sdk-missing-stub:../../components/Markdown.js
|
|
168012
|
-
var
|
|
168165
|
+
var noop124 = () => null, Markdown;
|
|
168013
168166
|
var init_Markdown = __esm(() => {
|
|
168014
|
-
Markdown =
|
|
168167
|
+
Markdown = noop124;
|
|
168015
168168
|
});
|
|
168016
168169
|
|
|
168017
168170
|
// sdk-missing-stub:../../components/Message.js
|
|
168018
|
-
var
|
|
168171
|
+
var noop125 = () => null, Message;
|
|
168019
168172
|
var init_Message = __esm(() => {
|
|
168020
|
-
Message =
|
|
168173
|
+
Message = noop125;
|
|
168021
168174
|
});
|
|
168022
168175
|
|
|
168023
168176
|
// sdk-missing-stub:../../components/MessageResponse.js
|
|
168024
|
-
var
|
|
168177
|
+
var noop126 = () => null, MessageResponse;
|
|
168025
168178
|
var init_MessageResponse = __esm(() => {
|
|
168026
|
-
MessageResponse =
|
|
168179
|
+
MessageResponse = noop126;
|
|
168027
168180
|
});
|
|
168028
168181
|
|
|
168029
168182
|
// sdk-missing-stub:../../components/ToolUseLoader.js
|
|
168030
168183
|
var init_ToolUseLoader = () => {};
|
|
168031
168184
|
|
|
168032
168185
|
// sdk-missing-stub:../../ink.js
|
|
168033
|
-
var
|
|
168186
|
+
var noop127 = () => null, Box, Text;
|
|
168034
168187
|
var init_ink = __esm(() => {
|
|
168035
|
-
Box =
|
|
168036
|
-
Text =
|
|
168188
|
+
Box = noop127;
|
|
168189
|
+
Text = noop127;
|
|
168037
168190
|
});
|
|
168038
168191
|
|
|
168039
168192
|
// sdk-jsx-stub:react/jsx-dev-runtime
|
|
@@ -173630,8 +173783,8 @@ var init_FileEditTool = __esm(() => {
|
|
|
173630
173783
|
if (readTimestamp) {
|
|
173631
173784
|
const lastWriteTime = getFileModificationTime(fullFilePath);
|
|
173632
173785
|
if (lastWriteTime > readTimestamp.timestamp) {
|
|
173633
|
-
const
|
|
173634
|
-
if (
|
|
173786
|
+
const isFullRead2 = readTimestamp.offset === undefined && readTimestamp.limit === undefined;
|
|
173787
|
+
if (isFullRead2 && fileContent === readTimestamp.content) {} else {
|
|
173635
173788
|
return {
|
|
173636
173789
|
result: false,
|
|
173637
173790
|
behavior: "ask",
|
|
@@ -173733,8 +173886,8 @@ String: ${old_string}`,
|
|
|
173733
173886
|
const lastWriteTime = getFileModificationTime(absoluteFilePath);
|
|
173734
173887
|
const lastRead = readFileState.get(absoluteFilePath);
|
|
173735
173888
|
if (!lastRead || lastWriteTime > lastRead.timestamp) {
|
|
173736
|
-
const
|
|
173737
|
-
const contentUnchanged =
|
|
173889
|
+
const isFullRead2 = lastRead && lastRead.offset === undefined && lastRead.limit === undefined;
|
|
173890
|
+
const contentUnchanged = isFullRead2 && originalFileContents === lastRead.content;
|
|
173738
173891
|
if (!contentUnchanged) {
|
|
173739
173892
|
throw new Error(FILE_UNEXPECTEDLY_MODIFIED_ERROR);
|
|
173740
173893
|
}
|
|
@@ -174289,8 +174442,8 @@ var init_FileWriteTool = __esm(() => {
|
|
|
174289
174442
|
const lastWriteTime = getFileModificationTime(fullFilePath);
|
|
174290
174443
|
const lastRead = readFileState.get(fullFilePath);
|
|
174291
174444
|
if (!lastRead || lastWriteTime > lastRead.timestamp) {
|
|
174292
|
-
const
|
|
174293
|
-
if (!
|
|
174445
|
+
const isFullRead2 = lastRead && lastRead.offset === undefined && lastRead.limit === undefined;
|
|
174446
|
+
if (!isFullRead2 || meta.content !== lastRead.content) {
|
|
174294
174447
|
throw new Error(FILE_UNEXPECTEDLY_MODIFIED_ERROR);
|
|
174295
174448
|
}
|
|
174296
174449
|
}
|
|
@@ -194157,9 +194310,9 @@ var init_BriefTool = __esm(() => {
|
|
|
194157
194310
|
});
|
|
194158
194311
|
|
|
194159
194312
|
// sdk-missing-stub:../../keybindings/useShortcutDisplay.js
|
|
194160
|
-
var
|
|
194313
|
+
var noop128 = () => null, useShortcutDisplay;
|
|
194161
194314
|
var init_useShortcutDisplay = __esm(() => {
|
|
194162
|
-
useShortcutDisplay =
|
|
194315
|
+
useShortcutDisplay = noop128;
|
|
194163
194316
|
});
|
|
194164
194317
|
|
|
194165
194318
|
// src/utils/task/outputFormatting.ts
|
|
@@ -194187,10 +194340,10 @@ var init_outputFormatting = __esm(() => {
|
|
|
194187
194340
|
});
|
|
194188
194341
|
|
|
194189
194342
|
// sdk-missing-stub:../AgentTool/UI.js
|
|
194190
|
-
var
|
|
194343
|
+
var noop129 = () => null, AgentPromptDisplay2, AgentResponseDisplay;
|
|
194191
194344
|
var init_UI3 = __esm(() => {
|
|
194192
|
-
AgentPromptDisplay2 =
|
|
194193
|
-
AgentResponseDisplay =
|
|
194345
|
+
AgentPromptDisplay2 = noop129;
|
|
194346
|
+
AgentResponseDisplay = noop129;
|
|
194194
194347
|
});
|
|
194195
194348
|
|
|
194196
194349
|
// src/utils/sandbox/sandbox-ui-utils.ts
|
|
@@ -194199,27 +194352,27 @@ function removeSandboxViolationTags(text) {
|
|
|
194199
194352
|
}
|
|
194200
194353
|
|
|
194201
194354
|
// sdk-missing-stub:../../components/design-system/FullWidthRow.js
|
|
194202
|
-
var
|
|
194355
|
+
var noop130 = () => null, FullWidthRow_default;
|
|
194203
194356
|
var init_FullWidthRow = __esm(() => {
|
|
194204
|
-
FullWidthRow_default =
|
|
194357
|
+
FullWidthRow_default = noop130;
|
|
194205
194358
|
});
|
|
194206
194359
|
|
|
194207
194360
|
// sdk-missing-stub:../../components/design-system/KeyboardShortcutHint.js
|
|
194208
|
-
var
|
|
194361
|
+
var noop131 = () => null, KeyboardShortcutHint2;
|
|
194209
194362
|
var init_KeyboardShortcutHint2 = __esm(() => {
|
|
194210
|
-
KeyboardShortcutHint2 =
|
|
194363
|
+
KeyboardShortcutHint2 = noop131;
|
|
194211
194364
|
});
|
|
194212
194365
|
|
|
194213
194366
|
// sdk-missing-stub:../../components/shell/OutputLine.js
|
|
194214
|
-
var
|
|
194367
|
+
var noop132 = () => null, OutputLine;
|
|
194215
194368
|
var init_OutputLine = __esm(() => {
|
|
194216
|
-
OutputLine =
|
|
194369
|
+
OutputLine = noop132;
|
|
194217
194370
|
});
|
|
194218
194371
|
|
|
194219
194372
|
// sdk-missing-stub:../../components/shell/ShellTimeDisplay.js
|
|
194220
|
-
var
|
|
194373
|
+
var noop133 = () => null, ShellTimeDisplay;
|
|
194221
194374
|
var init_ShellTimeDisplay = __esm(() => {
|
|
194222
|
-
ShellTimeDisplay =
|
|
194375
|
+
ShellTimeDisplay = noop133;
|
|
194223
194376
|
});
|
|
194224
194377
|
|
|
194225
194378
|
// src/tools/BashTool/BashToolResultMessage.tsx
|
|
@@ -207144,9 +207297,9 @@ ${filenames.join(`
|
|
|
207144
207297
|
});
|
|
207145
207298
|
|
|
207146
207299
|
// sdk-missing-stub:../../context/repoMap/index.js
|
|
207147
|
-
var
|
|
207300
|
+
var noop134 = () => null, buildRepoMap;
|
|
207148
207301
|
var init_repoMap2 = __esm(() => {
|
|
207149
|
-
buildRepoMap =
|
|
207302
|
+
buildRepoMap = noop134;
|
|
207150
207303
|
});
|
|
207151
207304
|
|
|
207152
207305
|
// src/tools/RepoMapTool/prompt.ts
|
|
@@ -207301,9 +207454,9 @@ ${output.rendered}`
|
|
|
207301
207454
|
});
|
|
207302
207455
|
|
|
207303
207456
|
// sdk-missing-stub:src/components/MessageResponse.js
|
|
207304
|
-
var
|
|
207457
|
+
var noop135 = () => null, MessageResponse2;
|
|
207305
207458
|
var init_MessageResponse2 = __esm(() => {
|
|
207306
|
-
MessageResponse2 =
|
|
207459
|
+
MessageResponse2 = noop135;
|
|
207307
207460
|
});
|
|
207308
207461
|
|
|
207309
207462
|
// src/tools/AskUserQuestionTool/AskUserQuestionTool.tsx
|
|
@@ -219575,9 +219728,11 @@ function getMaxActiveMessagesHardCap(env4 = process.env) {
|
|
|
219575
219728
|
const parsed = parseMaxActiveMessagesLimit(trimmed);
|
|
219576
219729
|
return parsed > 0 ? parsed : DEFAULT_MAX_ACTIVE_MESSAGES_HARD_CAP;
|
|
219577
219730
|
}
|
|
219578
|
-
function resolveMaxActiveMessagesLimit(configSetting, envSetting) {
|
|
219579
|
-
|
|
219580
|
-
|
|
219731
|
+
function resolveMaxActiveMessagesLimit(configSetting, envSetting, hardCap = getMaxActiveMessagesHardCap()) {
|
|
219732
|
+
if (configSetting === "off") {
|
|
219733
|
+
return parseMaxActiveMessagesLimit(envSetting);
|
|
219734
|
+
}
|
|
219735
|
+
const configuredLimit = configSetting !== undefined ? parseMaxActiveMessagesLimit(configSetting) : parseMaxActiveMessagesLimit(envSetting);
|
|
219581
219736
|
if (configuredLimit > 0 && hardCap > 0) {
|
|
219582
219737
|
return Math.min(configuredLimit, hardCap);
|
|
219583
219738
|
}
|
|
@@ -224196,7 +224351,7 @@ function getPrompt12() {
|
|
|
224196
224351
|
## When to Use This Tool
|
|
224197
224352
|
|
|
224198
224353
|
- When the user asks what another active session is actually working on
|
|
224199
|
-
- To
|
|
224354
|
+
- To follow a peer's live progress: which files it is editing, what commands it runs, and their results
|
|
224200
224355
|
- Before coordinating on shared files, to understand the peer's current intent
|
|
224201
224356
|
|
|
224202
224357
|
## Privacy
|
|
@@ -224206,13 +224361,19 @@ This reads the peer's transcript JSONL from this machine's OpenClaude config hom
|
|
|
224206
224361
|
## Input
|
|
224207
224362
|
|
|
224208
224363
|
- **session_id** (optional): a peer session id from HallPeers. When omitted, reads every peer in this workspace.
|
|
224209
|
-
- **limit** (optional): how many recent
|
|
224364
|
+
- **limit** (optional): how many recent activity events per peer to return (1-100, default 50).
|
|
224210
224365
|
|
|
224211
224366
|
## Output
|
|
224212
224367
|
|
|
224213
|
-
For each peer: the session id, agent name, whether its transcript was found, and a list of recent
|
|
224368
|
+
For each peer: the session id, agent name, whether its transcript was found, and a list of recent events in order. Each event has a role:
|
|
224369
|
+
|
|
224370
|
+
- **user** / **assistant**: conversation text.
|
|
224371
|
+
- **tool_use** (shown as \`[→] ToolName: key-argument\`): a tool the peer invoked, e.g. \`[→] Bash: bun test ./src/hall/\`.
|
|
224372
|
+
- **tool_result** (shown as \`[←] ToolName: result-summary\`): that tool's outcome.
|
|
224373
|
+
|
|
224374
|
+
Because tool calls and results are included, this reflects the peer's live progress within a long turn, not just its opening messages.`;
|
|
224214
224375
|
}
|
|
224215
|
-
var DESCRIPTION20 = "Read a peer session's recent
|
|
224376
|
+
var DESCRIPTION20 = "Read a peer session's recent activity (messages, tool calls, results) from its local transcript (Agent Hall)";
|
|
224216
224377
|
|
|
224217
224378
|
// src/tools/HallPeerActivityTool/transcript.ts
|
|
224218
224379
|
import { open as open9, readdir as readdir14, stat as stat22 } from "fs/promises";
|
|
@@ -224268,30 +224429,57 @@ function textOfContent2(content) {
|
|
|
224268
224429
|
return parts.join(`
|
|
224269
224430
|
`);
|
|
224270
224431
|
}
|
|
224271
|
-
function
|
|
224272
|
-
if (!
|
|
224273
|
-
return
|
|
224274
|
-
|
|
224275
|
-
|
|
224276
|
-
|
|
224277
|
-
|
|
224278
|
-
if (
|
|
224279
|
-
return
|
|
224280
|
-
|
|
224281
|
-
|
|
224282
|
-
|
|
224283
|
-
const
|
|
224284
|
-
|
|
224432
|
+
function summarizeToolInput2(input) {
|
|
224433
|
+
if (!input || typeof input !== "object")
|
|
224434
|
+
return "";
|
|
224435
|
+
const i3 = input;
|
|
224436
|
+
const candidate = i3.command ?? i3.file_path ?? i3.path ?? i3.pattern ?? i3.query ?? i3.url ?? i3.description;
|
|
224437
|
+
if (typeof candidate === "string")
|
|
224438
|
+
return clip(candidate, MAX_TOOL_CHARS);
|
|
224439
|
+
if (Array.isArray(i3.file_paths))
|
|
224440
|
+
return clip(i3.file_paths.join(", "), MAX_TOOL_CHARS);
|
|
224441
|
+
return clip(JSON.stringify(i3), MAX_TOOL_CHARS);
|
|
224442
|
+
}
|
|
224443
|
+
function summarizeToolResult(content) {
|
|
224444
|
+
const text = textOfContent2(content);
|
|
224445
|
+
return text ? clip(text, MAX_TOOL_CHARS) : "";
|
|
224446
|
+
}
|
|
224447
|
+
function parseRecords(tail) {
|
|
224448
|
+
const records = [];
|
|
224449
|
+
for (const rawLine of tail.split(`
|
|
224450
|
+
`)) {
|
|
224285
224451
|
const line = rawLine.trim();
|
|
224286
224452
|
if (!line)
|
|
224287
224453
|
continue;
|
|
224288
|
-
let rec;
|
|
224289
224454
|
try {
|
|
224290
|
-
rec = JSON.parse(line);
|
|
224291
|
-
|
|
224455
|
+
const rec = JSON.parse(line);
|
|
224456
|
+
records.push({ type: String(rec.type ?? ""), rec });
|
|
224457
|
+
} catch {}
|
|
224458
|
+
}
|
|
224459
|
+
return records;
|
|
224460
|
+
}
|
|
224461
|
+
function collectToolNames(records) {
|
|
224462
|
+
const names = new Map;
|
|
224463
|
+
for (const { type, rec } of records) {
|
|
224464
|
+
if (type !== "assistant")
|
|
224292
224465
|
continue;
|
|
224466
|
+
const message = rec.message;
|
|
224467
|
+
if (!message || !Array.isArray(message.content))
|
|
224468
|
+
continue;
|
|
224469
|
+
for (const block2 of message.content) {
|
|
224470
|
+
if (!block2 || typeof block2 !== "object")
|
|
224471
|
+
continue;
|
|
224472
|
+
const b = block2;
|
|
224473
|
+
if (b.type === "tool_use" && typeof b.id === "string") {
|
|
224474
|
+
names.set(b.id, typeof b.name === "string" ? b.name : "tool");
|
|
224475
|
+
}
|
|
224293
224476
|
}
|
|
224294
|
-
|
|
224477
|
+
}
|
|
224478
|
+
return names;
|
|
224479
|
+
}
|
|
224480
|
+
function buildMessages(records, toolNames) {
|
|
224481
|
+
const messages = [];
|
|
224482
|
+
for (const { type, rec } of records) {
|
|
224295
224483
|
if (type !== "user" && type !== "assistant")
|
|
224296
224484
|
continue;
|
|
224297
224485
|
if (rec.isMeta === true)
|
|
@@ -224300,16 +224488,51 @@ async function readPeerMessages(sessionId, limit) {
|
|
|
224300
224488
|
if (!message)
|
|
224301
224489
|
continue;
|
|
224302
224490
|
const content = message.content;
|
|
224303
|
-
if (
|
|
224491
|
+
if (Array.isArray(content)) {
|
|
224492
|
+
for (const block2 of content) {
|
|
224493
|
+
if (!block2 || typeof block2 !== "object")
|
|
224494
|
+
continue;
|
|
224495
|
+
const b = block2;
|
|
224496
|
+
if (b.type === "text" && typeof b.text === "string") {
|
|
224497
|
+
const body2 = clip(b.text);
|
|
224498
|
+
if (body2)
|
|
224499
|
+
messages.push({ role: type, text: body2 });
|
|
224500
|
+
} else if (type === "assistant" && b.type === "tool_use") {
|
|
224501
|
+
const name = typeof b.name === "string" ? b.name : "tool";
|
|
224502
|
+
const arg = summarizeToolInput2(b.input);
|
|
224503
|
+
messages.push({
|
|
224504
|
+
role: "tool_use",
|
|
224505
|
+
text: arg ? `${name}: ${arg}` : name
|
|
224506
|
+
});
|
|
224507
|
+
} else if (type === "user" && b.type === "tool_result") {
|
|
224508
|
+
const summary = summarizeToolResult(b.content);
|
|
224509
|
+
if (!summary)
|
|
224510
|
+
continue;
|
|
224511
|
+
const id = typeof b.tool_use_id === "string" ? b.tool_use_id : "";
|
|
224512
|
+
const name = toolNames.get(id) ?? "tool";
|
|
224513
|
+
messages.push({ role: "tool_result", text: `${name}: ${summary}` });
|
|
224514
|
+
}
|
|
224515
|
+
}
|
|
224304
224516
|
continue;
|
|
224517
|
+
}
|
|
224305
224518
|
const body = textOfContent2(content);
|
|
224306
|
-
if (
|
|
224307
|
-
|
|
224308
|
-
|
|
224519
|
+
if (body.trim()) {
|
|
224520
|
+
messages.push({ role: type, text: clip(body) });
|
|
224521
|
+
}
|
|
224309
224522
|
}
|
|
224523
|
+
return messages;
|
|
224524
|
+
}
|
|
224525
|
+
async function readPeerMessages(sessionId, limit) {
|
|
224526
|
+
const path13 = await findTranscriptPath(sessionId);
|
|
224527
|
+
if (!path13)
|
|
224528
|
+
return { found: false, messages: [] };
|
|
224529
|
+
const tail = await readTail(path13, TAIL_BYTES);
|
|
224530
|
+
const records = parseRecords(tail);
|
|
224531
|
+
const toolNames = collectToolNames(records);
|
|
224532
|
+
const messages = buildMessages(records, toolNames);
|
|
224310
224533
|
return { found: true, messages: messages.slice(-limit) };
|
|
224311
224534
|
}
|
|
224312
|
-
var TAIL_BYTES, MAX_MSG_CHARS = 400;
|
|
224535
|
+
var TAIL_BYTES, MAX_MSG_CHARS = 400, MAX_TOOL_CHARS = 160;
|
|
224313
224536
|
var init_transcript = __esm(() => {
|
|
224314
224537
|
init_envUtils();
|
|
224315
224538
|
TAIL_BYTES = 512 * 1024;
|
|
@@ -224328,7 +224551,7 @@ var init_HallPeerActivityTool = __esm(() => {
|
|
|
224328
224551
|
init_transcript();
|
|
224329
224552
|
inputSchema45 = lazySchema(() => exports_external.strictObject({
|
|
224330
224553
|
session_id: exports_external.string().optional().describe("Target a specific peer session id; omit to read all workspace peers"),
|
|
224331
|
-
limit: exports_external.number().int().min(1).max(
|
|
224554
|
+
limit: exports_external.number().int().min(1).max(100).optional().describe("Recent activity events per peer (default 50, max 100)")
|
|
224332
224555
|
}));
|
|
224333
224556
|
outputSchema35 = lazySchema(() => exports_external.object({
|
|
224334
224557
|
connected: exports_external.boolean(),
|
|
@@ -224379,7 +224602,7 @@ var init_HallPeerActivityTool = __esm(() => {
|
|
|
224379
224602
|
if (!client2 || !client2.isConnected) {
|
|
224380
224603
|
return { data: { connected: false, peers: [] } };
|
|
224381
224604
|
}
|
|
224382
|
-
const limit = input.limit ??
|
|
224605
|
+
const limit = input.limit ?? 50;
|
|
224383
224606
|
let targets;
|
|
224384
224607
|
if (input.session_id) {
|
|
224385
224608
|
targets = [{ session_id: input.session_id, agent_name: input.session_id }];
|
|
@@ -224428,7 +224651,13 @@ Transcript not found on this machine.`;
|
|
|
224428
224651
|
return `${header}
|
|
224429
224652
|
No recent messages.`;
|
|
224430
224653
|
}
|
|
224431
|
-
const lines = peer.messages.map((m) =>
|
|
224654
|
+
const lines = peer.messages.map((m) => {
|
|
224655
|
+
if (m.role === "tool_use")
|
|
224656
|
+
return ` [→] ${m.text}`;
|
|
224657
|
+
if (m.role === "tool_result")
|
|
224658
|
+
return ` [←] ${m.text}`;
|
|
224659
|
+
return `[${m.role}] ${m.text}`;
|
|
224660
|
+
});
|
|
224432
224661
|
return `${header}
|
|
224433
224662
|
${lines.join(`
|
|
224434
224663
|
`)}`;
|
|
@@ -224677,9 +224906,9 @@ __export(exports_PowerShellTool, {
|
|
|
224677
224906
|
default: () => PowerShellTool_default,
|
|
224678
224907
|
__stub: () => __stub5
|
|
224679
224908
|
});
|
|
224680
|
-
var
|
|
224909
|
+
var noop136 = () => null, PowerShellTool_default, __stub5 = true;
|
|
224681
224910
|
var init_PowerShellTool = __esm(() => {
|
|
224682
|
-
PowerShellTool_default =
|
|
224911
|
+
PowerShellTool_default = noop136;
|
|
224683
224912
|
});
|
|
224684
224913
|
|
|
224685
224914
|
// src/tools.ts
|
|
@@ -224918,9 +225147,9 @@ var init_copilotOptimization = __esm(() => {
|
|
|
224918
225147
|
});
|
|
224919
225148
|
|
|
224920
225149
|
// sdk-missing-stub:../BashTool/UI.js
|
|
224921
|
-
var
|
|
225150
|
+
var noop137 = () => null, BackgroundHint2;
|
|
224922
225151
|
var init_UI4 = __esm(() => {
|
|
224923
|
-
BackgroundHint2 =
|
|
225152
|
+
BackgroundHint2 = noop137;
|
|
224924
225153
|
});
|
|
224925
225154
|
|
|
224926
225155
|
// src/utils/swarm/teammateModel.ts
|
|
@@ -224938,9 +225167,9 @@ __export(exports_It2SetupPrompt, {
|
|
|
224938
225167
|
default: () => It2SetupPrompt_default,
|
|
224939
225168
|
__stub: () => __stub6
|
|
224940
225169
|
});
|
|
224941
|
-
var
|
|
225170
|
+
var noop138 = () => null, It2SetupPrompt_default, __stub6 = true;
|
|
224942
225171
|
var init_It2SetupPrompt = __esm(() => {
|
|
224943
|
-
It2SetupPrompt_default =
|
|
225172
|
+
It2SetupPrompt_default = noop138;
|
|
224944
225173
|
});
|
|
224945
225174
|
|
|
224946
225175
|
// src/tools/shared/spawnMultiAgent.ts
|
|
@@ -235042,9 +235271,9 @@ var init_providerFallback = __esm(() => {
|
|
|
235042
235271
|
});
|
|
235043
235272
|
|
|
235044
235273
|
// sdk-missing-stub:../keybindings/shortcutFormat.js
|
|
235045
|
-
var
|
|
235274
|
+
var noop139 = () => null, getShortcutDisplay;
|
|
235046
235275
|
var init_shortcutFormat = __esm(() => {
|
|
235047
|
-
getShortcutDisplay =
|
|
235276
|
+
getShortcutDisplay = noop139;
|
|
235048
235277
|
});
|
|
235049
235278
|
|
|
235050
235279
|
// src/services/autoDream/config.ts
|
|
@@ -238216,7 +238445,7 @@ function getAnthropicEnvMetadata() {
|
|
|
238216
238445
|
function getBuildAgeMinutes() {
|
|
238217
238446
|
if (false)
|
|
238218
238447
|
;
|
|
238219
|
-
const buildTime = new Date("2026-10-
|
|
238448
|
+
const buildTime = new Date("2026-10-17T12:42:18.156Z").getTime();
|
|
238220
238449
|
if (isNaN(buildTime))
|
|
238221
238450
|
return;
|
|
238222
238451
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -240622,9 +240851,9 @@ var init_hintRecommendation = __esm(() => {
|
|
|
240622
240851
|
});
|
|
240623
240852
|
|
|
240624
240853
|
// sdk-missing-stub:../FileEditTool/UI.js
|
|
240625
|
-
var
|
|
240854
|
+
var noop140 = () => null, userFacingName2;
|
|
240626
240855
|
var init_UI5 = __esm(() => {
|
|
240627
|
-
userFacingName2 =
|
|
240856
|
+
userFacingName2 = noop140;
|
|
240628
240857
|
});
|
|
240629
240858
|
|
|
240630
240859
|
// src/tools/BashTool/commandSemantics.ts
|
|
@@ -244007,9 +244236,9 @@ __export(exports_PowerShellTool2, {
|
|
|
244007
244236
|
default: () => PowerShellTool_default2,
|
|
244008
244237
|
__stub: () => __stub7
|
|
244009
244238
|
});
|
|
244010
|
-
var
|
|
244239
|
+
var noop141 = () => null, PowerShellTool_default2, __stub7 = true;
|
|
244011
244240
|
var init_PowerShellTool2 = __esm(() => {
|
|
244012
|
-
PowerShellTool_default2 =
|
|
244241
|
+
PowerShellTool_default2 = noop141;
|
|
244013
244242
|
});
|
|
244014
244243
|
|
|
244015
244244
|
// src/utils/promptShellExecution.ts
|
|
@@ -244776,94 +245005,94 @@ var init_bundledSkills = __esm(() => {
|
|
|
244776
245005
|
});
|
|
244777
245006
|
|
|
244778
245007
|
// sdk-missing-stub:./commands/env/index.js
|
|
244779
|
-
var
|
|
245008
|
+
var noop142 = () => null, env_default;
|
|
244780
245009
|
var init_env2 = __esm(() => {
|
|
244781
|
-
env_default =
|
|
245010
|
+
env_default = noop142;
|
|
244782
245011
|
});
|
|
244783
245012
|
|
|
244784
245013
|
// sdk-missing-stub:./commands/exit/index.js
|
|
244785
|
-
var
|
|
245014
|
+
var noop143 = () => null, exit_default;
|
|
244786
245015
|
var init_exit = __esm(() => {
|
|
244787
|
-
exit_default =
|
|
245016
|
+
exit_default = noop143;
|
|
244788
245017
|
});
|
|
244789
245018
|
|
|
244790
245019
|
// sdk-missing-stub:./commands/export/index.js
|
|
244791
|
-
var
|
|
245020
|
+
var noop144 = () => null, export_default;
|
|
244792
245021
|
var init_export = __esm(() => {
|
|
244793
|
-
export_default =
|
|
245022
|
+
export_default = noop144;
|
|
244794
245023
|
});
|
|
244795
245024
|
|
|
244796
245025
|
// sdk-missing-stub:./commands/model/index.js
|
|
244797
|
-
var
|
|
245026
|
+
var noop145 = () => null, model_default;
|
|
244798
245027
|
var init_model2 = __esm(() => {
|
|
244799
|
-
model_default =
|
|
245028
|
+
model_default = noop145;
|
|
244800
245029
|
});
|
|
244801
245030
|
|
|
244802
245031
|
// sdk-missing-stub:./commands/tag/index.js
|
|
244803
|
-
var
|
|
245032
|
+
var noop146 = () => null, tag_default;
|
|
244804
245033
|
var init_tag = __esm(() => {
|
|
244805
|
-
tag_default =
|
|
245034
|
+
tag_default = noop146;
|
|
244806
245035
|
});
|
|
244807
245036
|
|
|
244808
245037
|
// sdk-missing-stub:./commands/output-style/index.js
|
|
244809
|
-
var
|
|
245038
|
+
var noop147 = () => null, output_style_default;
|
|
244810
245039
|
var init_output_style = __esm(() => {
|
|
244811
|
-
output_style_default =
|
|
245040
|
+
output_style_default = noop147;
|
|
244812
245041
|
});
|
|
244813
245042
|
|
|
244814
245043
|
// sdk-missing-stub:./commands/remote-env/index.js
|
|
244815
|
-
var
|
|
245044
|
+
var noop148 = () => null, remote_env_default;
|
|
244816
245045
|
var init_remote_env = __esm(() => {
|
|
244817
|
-
remote_env_default =
|
|
245046
|
+
remote_env_default = noop148;
|
|
244818
245047
|
});
|
|
244819
245048
|
|
|
244820
245049
|
// sdk-missing-stub:./commands/upgrade/index.js
|
|
244821
|
-
var
|
|
245050
|
+
var noop149 = () => null, upgrade_default;
|
|
244822
245051
|
var init_upgrade = __esm(() => {
|
|
244823
|
-
upgrade_default =
|
|
245052
|
+
upgrade_default = noop149;
|
|
244824
245053
|
});
|
|
244825
245054
|
|
|
244826
245055
|
// sdk-missing-stub:./commands/extra-usage/index.js
|
|
244827
|
-
var
|
|
245056
|
+
var noop150 = () => null, extraUsage, extraUsageNonInteractive;
|
|
244828
245057
|
var init_extra_usage = __esm(() => {
|
|
244829
|
-
extraUsage =
|
|
244830
|
-
extraUsageNonInteractive =
|
|
245058
|
+
extraUsage = noop150;
|
|
245059
|
+
extraUsageNonInteractive = noop150;
|
|
244831
245060
|
});
|
|
244832
245061
|
|
|
244833
245062
|
// sdk-missing-stub:./commands/rate-limit-options/index.js
|
|
244834
|
-
var
|
|
245063
|
+
var noop151 = () => null, rate_limit_options_default;
|
|
244835
245064
|
var init_rate_limit_options = __esm(() => {
|
|
244836
|
-
rate_limit_options_default =
|
|
245065
|
+
rate_limit_options_default = noop151;
|
|
244837
245066
|
});
|
|
244838
245067
|
|
|
244839
245068
|
// sdk-missing-stub:./commands/statusline.js
|
|
244840
|
-
var
|
|
245069
|
+
var noop152 = () => null, statusline_default;
|
|
244841
245070
|
var init_statusline = __esm(() => {
|
|
244842
|
-
statusline_default =
|
|
245071
|
+
statusline_default = noop152;
|
|
244843
245072
|
});
|
|
244844
245073
|
|
|
244845
245074
|
// sdk-missing-stub:./commands/effort/index.js
|
|
244846
|
-
var
|
|
245075
|
+
var noop153 = () => null, effort_default;
|
|
244847
245076
|
var init_effort2 = __esm(() => {
|
|
244848
|
-
effort_default =
|
|
245077
|
+
effort_default = noop153;
|
|
244849
245078
|
});
|
|
244850
245079
|
|
|
244851
245080
|
// sdk-missing-stub:./commands/stats/index.js
|
|
244852
|
-
var
|
|
245081
|
+
var noop154 = () => null, stats_default;
|
|
244853
245082
|
var init_stats = __esm(() => {
|
|
244854
|
-
stats_default =
|
|
245083
|
+
stats_default = noop154;
|
|
244855
245084
|
});
|
|
244856
245085
|
|
|
244857
245086
|
// sdk-missing-stub:./commands/oauth-refresh/index.js
|
|
244858
|
-
var
|
|
245087
|
+
var noop155 = () => null, oauth_refresh_default;
|
|
244859
245088
|
var init_oauth_refresh = __esm(() => {
|
|
244860
|
-
oauth_refresh_default =
|
|
245089
|
+
oauth_refresh_default = noop155;
|
|
244861
245090
|
});
|
|
244862
245091
|
|
|
244863
245092
|
// sdk-missing-stub:./commands/debug-tool-call/index.js
|
|
244864
|
-
var
|
|
245093
|
+
var noop156 = () => null, debug_tool_call_default;
|
|
244865
245094
|
var init_debug_tool_call = __esm(() => {
|
|
244866
|
-
debug_tool_call_default =
|
|
245095
|
+
debug_tool_call_default = noop156;
|
|
244867
245096
|
});
|
|
244868
245097
|
|
|
244869
245098
|
// src/types/command.ts
|
|
@@ -244886,9 +245115,9 @@ __export(exports_agents_platform, {
|
|
|
244886
245115
|
default: () => agents_platform_default,
|
|
244887
245116
|
__stub: () => __stub8
|
|
244888
245117
|
});
|
|
244889
|
-
var
|
|
245118
|
+
var noop157 = () => null, agents_platform_default, __stub8 = true;
|
|
244890
245119
|
var init_agents_platform = __esm(() => {
|
|
244891
|
-
agents_platform_default =
|
|
245120
|
+
agents_platform_default = noop157;
|
|
244892
245121
|
});
|
|
244893
245122
|
|
|
244894
245123
|
// sdk-missing-stub:./commands/hall/index.js
|
|
@@ -244897,9 +245126,9 @@ __export(exports_hall, {
|
|
|
244897
245126
|
default: () => hall_default,
|
|
244898
245127
|
__stub: () => __stub9
|
|
244899
245128
|
});
|
|
244900
|
-
var
|
|
245129
|
+
var noop158 = () => null, hall_default, __stub9 = true;
|
|
244901
245130
|
var init_hall = __esm(() => {
|
|
244902
|
-
hall_default =
|
|
245131
|
+
hall_default = noop158;
|
|
244903
245132
|
});
|
|
244904
245133
|
|
|
244905
245134
|
// sdk-missing-stub:./commands/buddy/index.js
|
|
@@ -244908,9 +245137,9 @@ __export(exports_buddy, {
|
|
|
244908
245137
|
default: () => buddy_default,
|
|
244909
245138
|
__stub: () => __stub10
|
|
244910
245139
|
});
|
|
244911
|
-
var
|
|
245140
|
+
var noop159 = () => null, buddy_default, __stub10 = true;
|
|
244912
245141
|
var init_buddy = __esm(() => {
|
|
244913
|
-
buddy_default =
|
|
245142
|
+
buddy_default = noop159;
|
|
244914
245143
|
});
|
|
244915
245144
|
|
|
244916
245145
|
// sdk-missing-stub:./commands/insights.js
|
|
@@ -244919,9 +245148,9 @@ __export(exports_insights, {
|
|
|
244919
245148
|
default: () => insights_default,
|
|
244920
245149
|
__stub: () => __stub11
|
|
244921
245150
|
});
|
|
244922
|
-
var
|
|
245151
|
+
var noop160 = () => null, insights_default, __stub11 = true;
|
|
244923
245152
|
var init_insights = __esm(() => {
|
|
244924
|
-
insights_default =
|
|
245153
|
+
insights_default = noop160;
|
|
244925
245154
|
});
|
|
244926
245155
|
|
|
244927
245156
|
// src/commands.ts
|
|
@@ -245161,6 +245390,7 @@ var init_commands = __esm(() => {
|
|
|
245161
245390
|
init_resume();
|
|
245162
245391
|
init_review();
|
|
245163
245392
|
init_session();
|
|
245393
|
+
init_sessions();
|
|
245164
245394
|
init_set_context_window();
|
|
245165
245395
|
init_share();
|
|
245166
245396
|
init_skills();
|
|
@@ -245345,6 +245575,7 @@ var init_commands = __esm(() => {
|
|
|
245345
245575
|
requestSizeNonInteractive,
|
|
245346
245576
|
resume_default,
|
|
245347
245577
|
session_default,
|
|
245578
|
+
sessions_default,
|
|
245348
245579
|
set_context_window_default,
|
|
245349
245580
|
skills_default,
|
|
245350
245581
|
stats_default,
|
|
@@ -246719,6 +246950,7 @@ function messageTokenCountFromLastAPIResponse(messages) {
|
|
|
246719
246950
|
return 0;
|
|
246720
246951
|
}
|
|
246721
246952
|
function getCurrentUsage(messages) {
|
|
246953
|
+
messages = getMessagesAfterCompactBoundary(messages);
|
|
246722
246954
|
for (let i3 = messages.length - 1;i3 >= 0; i3--) {
|
|
246723
246955
|
const message = messages[i3];
|
|
246724
246956
|
const usage = message ? getTokenUsage(message) : undefined;
|
|
@@ -247498,8 +247730,11 @@ __export(exports_autoCompact, {
|
|
|
247498
247730
|
function getEffectiveContextWindowSize(model, runtimeLimits) {
|
|
247499
247731
|
const reservedTokensForSummary = Math.min(runtimeLimits?.maxOutputTokens ?? getMaxOutputTokensForModel(model), MAX_OUTPUT_TOKENS_FOR_SUMMARY);
|
|
247500
247732
|
let contextWindow = getContextWindowForModel(model, getSdkBetas(), runtimeLimits);
|
|
247733
|
+
const internalContextWindowOverride = process.env.USER_TYPE === "ant" ? parseInt(process.env.CLAUDE_CODE_MAX_CONTEXT_TOKENS ?? "", 10) : NaN;
|
|
247734
|
+
const internalOverrideTakesPrecedence = Number.isFinite(internalContextWindowOverride) && internalContextWindowOverride > 0;
|
|
247735
|
+
const hasSessionOverride = getSessionContextWindowOverride(model) !== undefined && !internalOverrideTakesPrecedence;
|
|
247501
247736
|
const autoCompactWindow = process.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW;
|
|
247502
|
-
if (autoCompactWindow) {
|
|
247737
|
+
if (autoCompactWindow && !hasSessionOverride) {
|
|
247503
247738
|
const parsed = parseInt(autoCompactWindow, 10);
|
|
247504
247739
|
if (!isNaN(parsed) && parsed > 0) {
|
|
247505
247740
|
contextWindow = Math.min(contextWindow, parsed);
|
|
@@ -249781,7 +250016,7 @@ async function* openaiStreamToAnthropic(response, model, signal, isOllama, reque
|
|
|
249781
250016
|
}
|
|
249782
250017
|
}
|
|
249783
250018
|
}
|
|
249784
|
-
if (!hasEmittedFinalUsage && chunkUsage &&
|
|
250019
|
+
if (!hasEmittedFinalUsage && chunkUsage && lastStopReason !== null) {
|
|
249785
250020
|
throwIfStreamAborted2(signal);
|
|
249786
250021
|
yield {
|
|
249787
250022
|
type: "message_delta",
|
|
@@ -257561,10 +257796,10 @@ var init_dangerousModePromptRuntime = __esm(() => {
|
|
|
257561
257796
|
});
|
|
257562
257797
|
|
|
257563
257798
|
// sdk-missing-stub:../../commands/add-dir/validation.js
|
|
257564
|
-
var
|
|
257799
|
+
var noop161 = () => null, addDirHelpMessage, validateDirectoryForWorkspace;
|
|
257565
257800
|
var init_validation3 = __esm(() => {
|
|
257566
|
-
addDirHelpMessage =
|
|
257567
|
-
validateDirectoryForWorkspace =
|
|
257801
|
+
addDirHelpMessage = noop161;
|
|
257802
|
+
validateDirectoryForWorkspace = noop161;
|
|
257568
257803
|
});
|
|
257569
257804
|
|
|
257570
257805
|
// src/utils/permissions/dangerousPatterns.ts
|
|
@@ -263329,6 +263564,7 @@ __export(exports_sessionStorage, {
|
|
|
263329
263564
|
saveAgentSetting: () => saveAgentSetting,
|
|
263330
263565
|
saveAgentName: () => saveAgentName,
|
|
263331
263566
|
saveAgentColor: () => saveAgentColor,
|
|
263567
|
+
restoreSessionWrites: () => restoreSessionWrites,
|
|
263332
263568
|
restoreSessionMetadata: () => restoreSessionMetadata,
|
|
263333
263569
|
resetTranscriptRewriteHooksForTesting: () => resetTranscriptRewriteHooksForTesting,
|
|
263334
263570
|
resetSessionFilePointer: () => resetSessionFilePointer,
|
|
@@ -263388,6 +263624,7 @@ __export(exports_sessionStorage, {
|
|
|
263388
263624
|
getCurrentSessionAgentColor: () => getCurrentSessionAgentColor,
|
|
263389
263625
|
getAgentTranscriptPath: () => getAgentTranscriptPath,
|
|
263390
263626
|
getAgentTranscript: () => getAgentTranscript,
|
|
263627
|
+
forgetDeletedSession: () => forgetDeletedSession,
|
|
263391
263628
|
flushSessionStorage: () => flushSessionStorage,
|
|
263392
263629
|
findUnresolvedToolUse: () => findUnresolvedToolUse,
|
|
263393
263630
|
fetchLogs: () => fetchLogs,
|
|
@@ -263417,7 +263654,7 @@ import {
|
|
|
263417
263654
|
unlink as unlink10,
|
|
263418
263655
|
writeFile as writeFile23
|
|
263419
263656
|
} from "fs/promises";
|
|
263420
|
-
import { basename as basename26, dirname as dirname47, join as join92 } from "path";
|
|
263657
|
+
import { basename as basename26, dirname as dirname47, join as join92, resolve as resolvePath2 } from "path";
|
|
263421
263658
|
function getBuiltInCommandNames() {
|
|
263422
263659
|
if (builtInCommandNamesCache)
|
|
263423
263660
|
return builtInCommandNamesCache;
|
|
@@ -263618,6 +263855,16 @@ function isTranscriptMessage(entry) {
|
|
|
263618
263855
|
function isChainParticipant(m) {
|
|
263619
263856
|
return m.type !== "progress";
|
|
263620
263857
|
}
|
|
263858
|
+
function startsConversation(message) {
|
|
263859
|
+
if (message.type === "assistant") {
|
|
263860
|
+
return message.message.model !== SYNTHETIC_MODEL;
|
|
263861
|
+
}
|
|
263862
|
+
if (message.type !== "user" || message.isMeta)
|
|
263863
|
+
return false;
|
|
263864
|
+
const content = message.message.content;
|
|
263865
|
+
const blocks = typeof content === "string" ? [{ type: "text", text: content }] : content;
|
|
263866
|
+
return blocks.some((block2) => block2.type !== "text" || !LOCAL_COMMAND_TAGS.some((tag2) => block2.text.trimStart().startsWith(`<${tag2}>`)));
|
|
263867
|
+
}
|
|
263621
263868
|
function isLegacyProgressEntry(entry) {
|
|
263622
263869
|
return typeof entry === "object" && entry !== null && "type" in entry && entry.type === "progress" && "uuid" in entry && typeof entry.uuid === "string";
|
|
263623
263870
|
}
|
|
@@ -263809,6 +264056,7 @@ class Project {
|
|
|
263809
264056
|
currentSessionBranch;
|
|
263810
264057
|
sessionFile = null;
|
|
263811
264058
|
pendingEntries = [];
|
|
264059
|
+
pendingEntriesSessionId = null;
|
|
263812
264060
|
remoteIngressUrl = null;
|
|
263813
264061
|
internalEventWriter = null;
|
|
263814
264062
|
internalEventReader = null;
|
|
@@ -263910,6 +264158,8 @@ class Project {
|
|
|
263910
264158
|
this.scheduleDrain();
|
|
263911
264159
|
}
|
|
263912
264160
|
async appendDirectlyToFile(filePath, data) {
|
|
264161
|
+
if (this.isDeletedSessionFile(filePath))
|
|
264162
|
+
return;
|
|
263913
264163
|
transcriptRewriteHooksForTesting.beforeFileAppend?.(filePath);
|
|
263914
264164
|
await mkdir25(dirname47(filePath), { recursive: true, mode: 448 });
|
|
263915
264165
|
await withTranscriptFileLock(filePath, async (signal) => {
|
|
@@ -263961,6 +264211,8 @@ class Project {
|
|
|
263961
264211
|
const earlierDirectAppends = this.pendingDirectAppends.get(filePath);
|
|
263962
264212
|
if (earlierDirectAppends)
|
|
263963
264213
|
await Promise.all(earlierDirectAppends);
|
|
264214
|
+
if (this.isDeletedSessionFile(filePath))
|
|
264215
|
+
return;
|
|
263964
264216
|
await withTranscriptFileLock(filePath, (signal) => rewrite(signal));
|
|
263965
264217
|
transcriptRewriteHooksForTesting.beforeBarrierRelease?.(filePath);
|
|
263966
264218
|
}
|
|
@@ -264076,6 +264328,13 @@ class Project {
|
|
|
264076
264328
|
resetSessionFile() {
|
|
264077
264329
|
this.sessionFile = null;
|
|
264078
264330
|
this.pendingEntries = [];
|
|
264331
|
+
this.pendingEntriesSessionId = null;
|
|
264332
|
+
}
|
|
264333
|
+
dropForeignPendingEntries(sessionId) {
|
|
264334
|
+
if (this.pendingEntriesSessionId !== null && this.pendingEntriesSessionId !== sessionId) {
|
|
264335
|
+
this.pendingEntries = [];
|
|
264336
|
+
this.pendingEntriesSessionId = null;
|
|
264337
|
+
}
|
|
264079
264338
|
}
|
|
264080
264339
|
reAppendSessionMetadata(skipTitleRefresh = false) {
|
|
264081
264340
|
if (!this.sessionFile)
|
|
@@ -264262,11 +264521,13 @@ class Project {
|
|
|
264262
264521
|
async materializeSessionFile() {
|
|
264263
264522
|
if (this.shouldSkipPersistence())
|
|
264264
264523
|
return;
|
|
264524
|
+
this.dropForeignPendingEntries(getSessionId());
|
|
264265
264525
|
this.ensureCurrentSessionFile();
|
|
264266
264526
|
this.reAppendSessionMetadata();
|
|
264267
264527
|
if (this.pendingEntries.length > 0) {
|
|
264268
264528
|
const buffered = this.pendingEntries;
|
|
264269
264529
|
this.pendingEntries = [];
|
|
264530
|
+
this.pendingEntriesSessionId = null;
|
|
264270
264531
|
for (const entry of buffered) {
|
|
264271
264532
|
await this.appendEntry(entry);
|
|
264272
264533
|
}
|
|
@@ -264275,7 +264536,7 @@ class Project {
|
|
|
264275
264536
|
async insertMessageChain(messages, isSidechain = false, agentId, startingParentUuid, teamInfo) {
|
|
264276
264537
|
return this.trackWrite(async () => {
|
|
264277
264538
|
let parentUuid = startingParentUuid ?? null;
|
|
264278
|
-
if (this.sessionFile === null && messages.some(
|
|
264539
|
+
if (this.sessionFile === null && messages.some(startsConversation)) {
|
|
264279
264540
|
await this.materializeSessionFile();
|
|
264280
264541
|
}
|
|
264281
264542
|
let gitBranch;
|
|
@@ -264401,6 +264662,8 @@ class Project {
|
|
|
264401
264662
|
let sessionFile;
|
|
264402
264663
|
if (isCurrentSession) {
|
|
264403
264664
|
if (this.sessionFile === null) {
|
|
264665
|
+
this.dropForeignPendingEntries(currentSessionId);
|
|
264666
|
+
this.pendingEntriesSessionId = currentSessionId;
|
|
264404
264667
|
this.pendingEntries.push(entry);
|
|
264405
264668
|
return;
|
|
264406
264669
|
}
|
|
@@ -264486,6 +264749,23 @@ class Project {
|
|
|
264486
264749
|
return this.sessionFile;
|
|
264487
264750
|
}
|
|
264488
264751
|
existingSessionFiles = new Map;
|
|
264752
|
+
deletedSessionFiles = new Set;
|
|
264753
|
+
isDeletedSessionFile(filePath) {
|
|
264754
|
+
return this.deletedSessionFiles.size > 0 && this.deletedSessionFiles.has(resolvePath2(filePath));
|
|
264755
|
+
}
|
|
264756
|
+
async forgetDeletedSession(sessionId, transcriptPath) {
|
|
264757
|
+
this.deletedSessionFiles.add(resolvePath2(transcriptPath));
|
|
264758
|
+
this.existingSessionFiles.delete(sessionId);
|
|
264759
|
+
if (this.sessionFile && this.isDeletedSessionFile(this.sessionFile)) {
|
|
264760
|
+
this.resetSessionFile();
|
|
264761
|
+
}
|
|
264762
|
+
await this.flush();
|
|
264763
|
+
const inFlight = [...this.pendingDirectAppends].filter(([path13]) => this.isDeletedSessionFile(path13)).flatMap(([, appends]) => [...appends]);
|
|
264764
|
+
await Promise.allSettled(inFlight);
|
|
264765
|
+
}
|
|
264766
|
+
restoreSessionWrites(transcriptPath) {
|
|
264767
|
+
this.deletedSessionFiles.delete(resolvePath2(transcriptPath));
|
|
264768
|
+
}
|
|
264489
264769
|
async getExistingSessionFile(sessionId) {
|
|
264490
264770
|
const cached3 = this.existingSessionFiles.get(sessionId);
|
|
264491
264771
|
if (cached3)
|
|
@@ -264600,6 +264880,12 @@ async function recordSpeculationAccept(entry) {
|
|
|
264600
264880
|
async function recordGoalState(goal, sessionId = getSessionId()) {
|
|
264601
264881
|
await getProject().insertGoalState(goal, sessionId);
|
|
264602
264882
|
}
|
|
264883
|
+
async function forgetDeletedSession(sessionId, transcriptPath) {
|
|
264884
|
+
await getProject().forgetDeletedSession(sessionId, transcriptPath);
|
|
264885
|
+
}
|
|
264886
|
+
function restoreSessionWrites(transcriptPath) {
|
|
264887
|
+
getProject().restoreSessionWrites(transcriptPath);
|
|
264888
|
+
}
|
|
264603
264889
|
async function resetSessionFilePointer() {
|
|
264604
264890
|
getProject().resetSessionFile();
|
|
264605
264891
|
}
|
|
@@ -265459,6 +265745,8 @@ async function fetchLogs(limit) {
|
|
|
265459
265745
|
}
|
|
265460
265746
|
function appendEntryToFile(fullPath, entry) {
|
|
265461
265747
|
const fs2 = getFsImplementation();
|
|
265748
|
+
if (project?.isDeletedSessionFile(fullPath))
|
|
265749
|
+
return;
|
|
265462
265750
|
const line = jsonStringify(entry) + `
|
|
265463
265751
|
`;
|
|
265464
265752
|
if (project?._deferSynchronousAppend(fullPath, line))
|
|
@@ -267126,7 +267414,7 @@ async function enrichLogs(allLogs, startIndex, count4, options2) {
|
|
|
267126
267414
|
}
|
|
267127
267415
|
return { logs: result, nextIndex: i3 };
|
|
267128
267416
|
}
|
|
267129
|
-
var VERSION3, builtInCommandNamesCache, MAX_TOMBSTONE_REWRITE_BYTES, TRANSCRIPT_COPY_CHUNK_BYTES, transcriptRewriteHooksForTesting, SKIP_FIRST_PROMPT_PATTERN2, EPHEMERAL_PROGRESS_TYPES, MAX_TRANSCRIPT_READ_BYTES, agentTranscriptSubdirs, getProjectDir2, project = null, cleanupRegistered2 = false, REMOTE_FLUSH_INTERVAL_MS = 10, PERSISTED_OUTPUT_TAG2, TOOL_USE_RESULT_KEY, SEARCH_HEAD_BYTES, SEARCH_TAIL_BYTES, SEARCH_MID_WINDOW_BYTES, SEARCH_MAX_MID_WINDOWS = 12, SEARCH_MAX_TOTAL_READ_BYTES, SEARCH_MAX_CHAR_COUNT = 80000, METADATA_TYPE_MARKERS, METADATA_MARKER_BUFS, METADATA_PREFIX_BOUND = 25, getSessionMessages2, INITIAL_ENRICH_COUNT = 50, SESSION_BRANCH_ENTRY_PREFIX = '{"type":"session-branch"', SESSION_BRANCH_ENTRY_PREFIX_SPACED = '{"type": "session-branch"';
|
|
267417
|
+
var VERSION3, builtInCommandNamesCache, MAX_TOMBSTONE_REWRITE_BYTES, TRANSCRIPT_COPY_CHUNK_BYTES, transcriptRewriteHooksForTesting, SKIP_FIRST_PROMPT_PATTERN2, LOCAL_COMMAND_TAGS, EPHEMERAL_PROGRESS_TYPES, MAX_TRANSCRIPT_READ_BYTES, agentTranscriptSubdirs, getProjectDir2, project = null, cleanupRegistered2 = false, REMOTE_FLUSH_INTERVAL_MS = 10, PERSISTED_OUTPUT_TAG2, TOOL_USE_RESULT_KEY, SEARCH_HEAD_BYTES, SEARCH_TAIL_BYTES, SEARCH_MID_WINDOW_BYTES, SEARCH_MAX_MID_WINDOWS = 12, SEARCH_MAX_TOTAL_READ_BYTES, SEARCH_MAX_CHAR_COUNT = 80000, METADATA_TYPE_MARKERS, METADATA_MARKER_BUFS, METADATA_PREFIX_BOUND = 25, getSessionMessages2, INITIAL_ENRICH_COUNT = 50, SESSION_BRANCH_ENTRY_PREFIX = '{"type":"session-branch"', SESSION_BRANCH_ENTRY_PREFIX_SPACED = '{"type": "session-branch"';
|
|
267130
267418
|
var init_sessionStorage = __esm(() => {
|
|
267131
267419
|
init_memoize();
|
|
267132
267420
|
init_state();
|
|
@@ -267156,11 +267444,17 @@ var init_sessionStorage = __esm(() => {
|
|
|
267156
267444
|
init_slowOperations();
|
|
267157
267445
|
init_transcriptFileLock();
|
|
267158
267446
|
init_uuid();
|
|
267159
|
-
VERSION3 = typeof MACRO !== "undefined" ? "0.
|
|
267447
|
+
VERSION3 = typeof MACRO !== "undefined" ? "0.33.1-by-rayss" : "unknown";
|
|
267160
267448
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
267161
267449
|
TRANSCRIPT_COPY_CHUNK_BYTES = 64 * 1024;
|
|
267162
267450
|
transcriptRewriteHooksForTesting = {};
|
|
267163
267451
|
SKIP_FIRST_PROMPT_PATTERN2 = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
267452
|
+
LOCAL_COMMAND_TAGS = [
|
|
267453
|
+
COMMAND_NAME_TAG,
|
|
267454
|
+
LOCAL_COMMAND_STDOUT_TAG,
|
|
267455
|
+
LOCAL_COMMAND_STDERR_TAG,
|
|
267456
|
+
LOCAL_COMMAND_CAVEAT_TAG
|
|
267457
|
+
];
|
|
267164
267458
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
267165
267459
|
"bash_progress",
|
|
267166
267460
|
"powershell_progress",
|
|
@@ -268627,7 +268921,7 @@ var init_filesystem = __esm(() => {
|
|
|
268627
268921
|
});
|
|
268628
268922
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
268629
268923
|
const nonce = randomBytes10(16).toString("hex");
|
|
268630
|
-
return join94(getClaudeTempDir(), "bundled-skills", "0.
|
|
268924
|
+
return join94(getClaudeTempDir(), "bundled-skills", "0.33.1-by-rayss", nonce);
|
|
268631
268925
|
});
|
|
268632
268926
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
268633
268927
|
});
|
|
@@ -269381,7 +269675,7 @@ function getWindowsBashHookCommand(command) {
|
|
|
269381
269675
|
}
|
|
269382
269676
|
if (/^\s*\(\s*\)/.test(rest.trimStart().slice(word.length)))
|
|
269383
269677
|
return command;
|
|
269384
|
-
return /\.sh["']
|
|
269678
|
+
return /\.sh["']?$/i.test(word) ? `${command.slice(0, offset)}bash ${rest}` : command;
|
|
269385
269679
|
}
|
|
269386
269680
|
}
|
|
269387
269681
|
|
|
@@ -277802,9 +278096,9 @@ var init_processTextPrompt = __esm(() => {
|
|
|
277802
278096
|
});
|
|
277803
278097
|
|
|
277804
278098
|
// sdk-missing-stub:src/components/BashModeProgress.js
|
|
277805
|
-
var
|
|
278099
|
+
var noop162 = () => null, BashModeProgress;
|
|
277806
278100
|
var init_BashModeProgress = __esm(() => {
|
|
277807
|
-
BashModeProgress =
|
|
278101
|
+
BashModeProgress = noop162;
|
|
277808
278102
|
});
|
|
277809
278103
|
|
|
277810
278104
|
// src/utils/shell/resolveDefaultShell.ts
|
|
@@ -283166,7 +283460,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
283166
283460
|
slash_commands: inputs.commands.filter((c7) => c7.userInvocable !== false).map((c7) => c7.name),
|
|
283167
283461
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
283168
283462
|
betas: getSdkBetas(),
|
|
283169
|
-
claude_code_version: "0.
|
|
283463
|
+
claude_code_version: "0.33.1-by-rayss",
|
|
283170
283464
|
output_style: outputStyle,
|
|
283171
283465
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
283172
283466
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -285593,9 +285887,9 @@ __export(exports_InvalidConfigDialog, {
|
|
|
285593
285887
|
default: () => InvalidConfigDialog_default,
|
|
285594
285888
|
__stub: () => __stub12
|
|
285595
285889
|
});
|
|
285596
|
-
var
|
|
285890
|
+
var noop163 = () => null, InvalidConfigDialog_default, __stub12 = true;
|
|
285597
285891
|
var init_InvalidConfigDialog = __esm(() => {
|
|
285598
|
-
InvalidConfigDialog_default =
|
|
285892
|
+
InvalidConfigDialog_default = noop163;
|
|
285599
285893
|
});
|
|
285600
285894
|
|
|
285601
285895
|
// src/entrypoints/init.ts
|
|
@@ -286090,7 +286384,7 @@ async function forkSession(sessionId, options2) {
|
|
|
286090
286384
|
}
|
|
286091
286385
|
return { sessionId: forkSessionId };
|
|
286092
286386
|
}
|
|
286093
|
-
var
|
|
286387
|
+
var init_sessions2 = __esm(() => {
|
|
286094
286388
|
init_listSessionsImpl();
|
|
286095
286389
|
init_sessionStoragePortable();
|
|
286096
286390
|
init_json();
|
|
@@ -286781,7 +287075,7 @@ var init_query2 = __esm(() => {
|
|
|
286781
287075
|
init_fileHistory();
|
|
286782
287076
|
init_shared2();
|
|
286783
287077
|
init_permissions4();
|
|
286784
|
-
|
|
287078
|
+
init_sessions2();
|
|
286785
287079
|
init_agentDefinitions();
|
|
286786
287080
|
QueryImpl = class QueryImpl {
|
|
286787
287081
|
_engine = null;
|
|
@@ -287755,7 +288049,7 @@ var init_sdk2 = __esm(() => {
|
|
|
287755
288049
|
init_QueryEngine();
|
|
287756
288050
|
init_tools2();
|
|
287757
288051
|
init_init2();
|
|
287758
|
-
|
|
288052
|
+
init_sessions2();
|
|
287759
288053
|
init_query2();
|
|
287760
288054
|
init_v2();
|
|
287761
288055
|
init_errors();
|
|
@@ -287790,4 +288084,4 @@ export {
|
|
|
287790
288084
|
AbortError
|
|
287791
288085
|
};
|
|
287792
288086
|
|
|
287793
|
-
//# debugId=
|
|
288087
|
+
//# debugId=D013021EC2F70EA264756E2164756E21
|