@cnwenf/occ 2.1.300 → 2.1.302
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +483 -198
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
globalThis.MACRO={"VERSION":"2.1.
|
|
2
|
+
globalThis.MACRO={"VERSION":"2.1.302","BINARY_NAME":"occ","BUILD_TIME":"2026-08-15T18:40:50.843Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
|
|
3
3
|
// @bun
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -53615,12 +53615,13 @@ __export(exports_git, {
|
|
|
53615
53615
|
getChangedFiles: () => getChangedFiles,
|
|
53616
53616
|
getBranch: () => getBranch,
|
|
53617
53617
|
findRemoteBase: () => findRemoteBase,
|
|
53618
|
+
findGitRootUncached: () => findGitRootUncached,
|
|
53618
53619
|
findGitRoot: () => findGitRoot,
|
|
53619
53620
|
findCanonicalGitRoot: () => findCanonicalGitRoot,
|
|
53620
53621
|
dirIsInGitRepo: () => dirIsInGitRepo
|
|
53621
53622
|
});
|
|
53622
53623
|
import { createHash } from "crypto";
|
|
53623
|
-
import { readFileSync as readFileSync5, realpathSync as realpathSync3, statSync as statSync4 } from "fs";
|
|
53624
|
+
import { lstatSync as lstatSync2, readFileSync as readFileSync5, realpathSync as realpathSync3, statSync as statSync4 } from "fs";
|
|
53624
53625
|
import { open as open2, readFile as readFile5, realpath as realpath3, stat as stat4 } from "fs/promises";
|
|
53625
53626
|
import { basename as basename3, dirname as dirname8, join as join14, resolve as resolve6, sep as sep3 } from "path";
|
|
53626
53627
|
function createFindGitRoot() {
|
|
@@ -53631,6 +53632,35 @@ function createFindGitRoot() {
|
|
|
53631
53632
|
wrapper.cache = findGitRootImpl.cache;
|
|
53632
53633
|
return wrapper;
|
|
53633
53634
|
}
|
|
53635
|
+
function findGitRootUncached(startPath) {
|
|
53636
|
+
let current = resolve6(startPath);
|
|
53637
|
+
const root2 = current.substring(0, current.indexOf(sep3) + 1) || sep3;
|
|
53638
|
+
while (current !== root2) {
|
|
53639
|
+
if (isGitRootForTrust(current)) {
|
|
53640
|
+
return current.normalize("NFC");
|
|
53641
|
+
}
|
|
53642
|
+
const parent = dirname8(current);
|
|
53643
|
+
if (parent === current) {
|
|
53644
|
+
break;
|
|
53645
|
+
}
|
|
53646
|
+
current = parent;
|
|
53647
|
+
}
|
|
53648
|
+
if (isGitRootForTrust(root2)) {
|
|
53649
|
+
return root2.normalize("NFC");
|
|
53650
|
+
}
|
|
53651
|
+
return null;
|
|
53652
|
+
}
|
|
53653
|
+
function isGitRootForTrust(dir) {
|
|
53654
|
+
try {
|
|
53655
|
+
const s = lstatSync2(join14(dir, ".git"));
|
|
53656
|
+
if (s.isSymbolicLink()) {
|
|
53657
|
+
return false;
|
|
53658
|
+
}
|
|
53659
|
+
return s.isDirectory() || s.isFile();
|
|
53660
|
+
} catch {
|
|
53661
|
+
return false;
|
|
53662
|
+
}
|
|
53663
|
+
}
|
|
53634
53664
|
function createFindCanonicalGitRoot() {
|
|
53635
53665
|
function wrapper(startPath) {
|
|
53636
53666
|
const root2 = findGitRoot(startPath);
|
|
@@ -152932,31 +152962,44 @@ function computeTrustDialogAccepted() {
|
|
|
152932
152962
|
if (projectConfig?.hasTrustDialogAccepted) {
|
|
152933
152963
|
return true;
|
|
152934
152964
|
}
|
|
152935
|
-
|
|
152965
|
+
const resolvedCwd = resolve9(getCwd());
|
|
152966
|
+
const repoRoot = findGitRootUncached(resolvedCwd);
|
|
152967
|
+
const boundary = repoRoot !== null ? normalizePathForConfigKey(resolve9(repoRoot)) : null;
|
|
152968
|
+
return walkAncestorsForTrust(config4, resolvedCwd, boundary);
|
|
152969
|
+
}
|
|
152970
|
+
function walkAncestorsForTrust(config4, startPath, boundary) {
|
|
152971
|
+
let currentPath = normalizePathForConfigKey(startPath);
|
|
152936
152972
|
while (true) {
|
|
152937
|
-
|
|
152938
|
-
|
|
152973
|
+
if (!(boundary === null || currentPath === boundary || currentPath.startsWith(boundary.endsWith("/") ? boundary : `${boundary}/`))) {
|
|
152974
|
+
return false;
|
|
152975
|
+
}
|
|
152976
|
+
if (config4.projects?.[currentPath]?.hasTrustDialogAccepted) {
|
|
152939
152977
|
return true;
|
|
152940
152978
|
}
|
|
152979
|
+
if (currentPath === boundary) {
|
|
152980
|
+
return false;
|
|
152981
|
+
}
|
|
152941
152982
|
const parentPath = normalizePathForConfigKey(resolve9(currentPath, ".."));
|
|
152942
152983
|
if (parentPath === currentPath) {
|
|
152943
|
-
|
|
152984
|
+
return false;
|
|
152944
152985
|
}
|
|
152945
152986
|
currentPath = parentPath;
|
|
152946
152987
|
}
|
|
152947
|
-
return false;
|
|
152948
152988
|
}
|
|
152949
|
-
function isPathTrusted(dir) {
|
|
152989
|
+
function isPathTrusted(dir, opts = {}) {
|
|
152950
152990
|
const config4 = getGlobalConfig();
|
|
152951
|
-
|
|
152952
|
-
|
|
152953
|
-
|
|
152954
|
-
|
|
152955
|
-
|
|
152956
|
-
|
|
152957
|
-
|
|
152958
|
-
currentPath = parentPath;
|
|
152991
|
+
if (opts.advisoryNoFsProbe) {
|
|
152992
|
+
return walkAncestorsForTrust(config4, resolve9(dir), null);
|
|
152993
|
+
}
|
|
152994
|
+
const canonicalRoot = findCanonicalGitRoot(dir);
|
|
152995
|
+
const persistKey = normalizePathForConfigKey(canonicalRoot !== null ? resolve9(canonicalRoot) : resolve9(dir));
|
|
152996
|
+
if (config4.projects?.[persistKey]?.hasTrustDialogAccepted === true) {
|
|
152997
|
+
return true;
|
|
152959
152998
|
}
|
|
152999
|
+
const resolved = resolve9(dir);
|
|
153000
|
+
const repoRoot = findGitRootUncached(resolved);
|
|
153001
|
+
const boundary = repoRoot !== null ? normalizePathForConfigKey(resolve9(repoRoot)) : null;
|
|
153002
|
+
return walkAncestorsForTrust(config4, resolved, boundary);
|
|
152960
153003
|
}
|
|
152961
153004
|
function isProjectConfigKey(key) {
|
|
152962
153005
|
return PROJECT_CONFIG_KEYS.includes(key);
|
|
@@ -201210,6 +201253,70 @@ var init_dist8 = __esm(() => {
|
|
|
201210
201253
|
init_platform4();
|
|
201211
201254
|
});
|
|
201212
201255
|
|
|
201256
|
+
// src/utils/oauthLoginExpiry.ts
|
|
201257
|
+
function computeOAuthLoginExpiry(tokens, context4, now2 = Date.now()) {
|
|
201258
|
+
if (!context4.providerIsFirstParty || !context4.isClaudeAISubscriber) {
|
|
201259
|
+
return null;
|
|
201260
|
+
}
|
|
201261
|
+
if (!tokens || typeof tokens.refreshTokenExpiresAt !== "number") {
|
|
201262
|
+
return null;
|
|
201263
|
+
}
|
|
201264
|
+
const refreshTokenExpiresAt = tokens.refreshTokenExpiresAt;
|
|
201265
|
+
if (typeof tokens.expiresAt === "number" && tokens.expiresAt > refreshTokenExpiresAt + LOGIN_EXPIRY_WARN_WINDOW_MS) {
|
|
201266
|
+
return null;
|
|
201267
|
+
}
|
|
201268
|
+
const remaining = refreshTokenExpiresAt - now2;
|
|
201269
|
+
if (remaining > LOGIN_EXPIRY_WARN_WINDOW_MS || remaining <= 0) {
|
|
201270
|
+
return null;
|
|
201271
|
+
}
|
|
201272
|
+
return { daysLeft: Math.ceil(remaining / MS_PER_DAY) };
|
|
201273
|
+
}
|
|
201274
|
+
function getOAuthLoginExpiryInfo() {
|
|
201275
|
+
return computeOAuthLoginExpiry(getClaudeAIOAuthTokens(), {
|
|
201276
|
+
providerIsFirstParty: getAPIProvider() === "firstParty",
|
|
201277
|
+
isClaudeAISubscriber: isClaudeAISubscriber()
|
|
201278
|
+
});
|
|
201279
|
+
}
|
|
201280
|
+
function pluralize2(count3, noun) {
|
|
201281
|
+
return count3 === 1 ? noun : `${noun}s`;
|
|
201282
|
+
}
|
|
201283
|
+
var MS_PER_DAY = 86400000, LOGIN_EXPIRY_WARN_WINDOW_MS;
|
|
201284
|
+
var init_oauthLoginExpiry = __esm(() => {
|
|
201285
|
+
init_providers();
|
|
201286
|
+
init_auth6();
|
|
201287
|
+
LOGIN_EXPIRY_WARN_WINDOW_MS = 3 * MS_PER_DAY;
|
|
201288
|
+
});
|
|
201289
|
+
|
|
201290
|
+
// src/tools/WebFetchTool/cacheTtl.ts
|
|
201291
|
+
function getWebFetchCacheTtlMs() {
|
|
201292
|
+
return cachedWebFetchCacheTtlMs ??= (() => {
|
|
201293
|
+
const raw = process.env.CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS;
|
|
201294
|
+
if (raw === undefined) {
|
|
201295
|
+
return DEFAULT_WEBFETCH_CACHE_TTL_MS;
|
|
201296
|
+
}
|
|
201297
|
+
if (!/^[+-]?\d+$/.test(raw.trim())) {
|
|
201298
|
+
return DEFAULT_WEBFETCH_CACHE_TTL_MS;
|
|
201299
|
+
}
|
|
201300
|
+
const parsed = parseEnvInt(raw);
|
|
201301
|
+
if (parsed === undefined || !Number.isFinite(parsed)) {
|
|
201302
|
+
return DEFAULT_WEBFETCH_CACHE_TTL_MS;
|
|
201303
|
+
}
|
|
201304
|
+
if (parsed < 1) {
|
|
201305
|
+
return DEFAULT_WEBFETCH_CACHE_TTL_MS;
|
|
201306
|
+
}
|
|
201307
|
+
return parsed;
|
|
201308
|
+
})();
|
|
201309
|
+
}
|
|
201310
|
+
function getWebFetchCacheTtlDescription() {
|
|
201311
|
+
const minutes = Math.max(1, Math.round(getWebFetchCacheTtlMs() / 60000));
|
|
201312
|
+
return `${minutes} ${pluralize2(minutes, "minute")}`;
|
|
201313
|
+
}
|
|
201314
|
+
var DEFAULT_WEBFETCH_CACHE_TTL_MS = 900000, cachedWebFetchCacheTtlMs;
|
|
201315
|
+
var init_cacheTtl = __esm(() => {
|
|
201316
|
+
init_envValidation();
|
|
201317
|
+
init_oauthLoginExpiry();
|
|
201318
|
+
});
|
|
201319
|
+
|
|
201213
201320
|
// src/tools/WebFetchTool/prompt.ts
|
|
201214
201321
|
function makeSecondaryModelPrompt(markdownContent, prompt, isPreapprovedDomain) {
|
|
201215
201322
|
const guidelines = isPreapprovedDomain ? `Provide a concise response based on the content above. Include relevant details, code examples, and documentation excerpts as needed.` : `Provide a concise response based only on the content above. In your response:
|
|
@@ -201228,7 +201335,10 @@ ${prompt}
|
|
|
201228
201335
|
${guidelines}
|
|
201229
201336
|
`;
|
|
201230
201337
|
}
|
|
201231
|
-
var WEB_FETCH_TOOL_NAME = "WebFetch", DESCRIPTION5
|
|
201338
|
+
var WEB_FETCH_TOOL_NAME = "WebFetch", DESCRIPTION5;
|
|
201339
|
+
var init_prompt6 = __esm(() => {
|
|
201340
|
+
init_cacheTtl();
|
|
201341
|
+
DESCRIPTION5 = `
|
|
201232
201342
|
- Fetches content from a specified URL and processes it using an AI model
|
|
201233
201343
|
- Takes a URL and a prompt as input
|
|
201234
201344
|
- Fetches the URL content, converts HTML to markdown
|
|
@@ -201243,10 +201353,11 @@ Usage notes:
|
|
|
201243
201353
|
- The prompt should describe what information you want to extract from the page
|
|
201244
201354
|
- This tool is read-only and does not modify any files
|
|
201245
201355
|
- Results may be summarized if the content is very large
|
|
201246
|
-
- Includes a self-cleaning
|
|
201356
|
+
- Includes a self-cleaning cache (entries expire after ${getWebFetchCacheTtlDescription()}) for faster responses when repeatedly accessing the same URL
|
|
201247
201357
|
- When a URL redirects to a different host, the tool will inform you and provide the redirect URL in a special format. You should then make a new WebFetch request with the redirect URL to fetch the content.
|
|
201248
201358
|
- For GitHub URLs, prefer using the gh CLI via Bash instead (e.g., gh pr view, gh issue view, gh api).
|
|
201249
201359
|
`;
|
|
201360
|
+
});
|
|
201250
201361
|
|
|
201251
201362
|
// src/utils/sandbox/sandbox-adapter.ts
|
|
201252
201363
|
var exports_sandbox_adapter = {};
|
|
@@ -201262,7 +201373,7 @@ __export(exports_sandbox_adapter, {
|
|
|
201262
201373
|
SandboxRuntimeConfigSchema: () => SandboxRuntimeConfigSchema,
|
|
201263
201374
|
SandboxManager: () => SandboxManager2
|
|
201264
201375
|
});
|
|
201265
|
-
import { lstatSync as
|
|
201376
|
+
import { lstatSync as lstatSync4, readdirSync as readdirSync4, realpathSync as realpathSync6, rmSync as rmSync4, statSync as statSync8 } from "fs";
|
|
201266
201377
|
import { readFile as readFile15 } from "fs/promises";
|
|
201267
201378
|
import { join as join39, resolve as resolve17, sep as sep9 } from "path";
|
|
201268
201379
|
function permissionRuleValueFromString2(ruleString) {
|
|
@@ -201425,7 +201536,7 @@ function convertToSandboxRuntimeConfig(settings) {
|
|
|
201425
201536
|
}
|
|
201426
201537
|
}
|
|
201427
201538
|
const { rgPath, rgArgs, argv0 } = ripgrepCommand();
|
|
201428
|
-
const ripgrepConfig =
|
|
201539
|
+
const ripgrepConfig = ["policySettings", "flagSettings", "userSettings"].map((source) => getSettingsForSource(source)?.sandbox?.ripgrep).find((config5) => config5 !== undefined) ?? {
|
|
201429
201540
|
command: rgPath,
|
|
201430
201541
|
args: rgArgs,
|
|
201431
201542
|
argv0
|
|
@@ -201465,7 +201576,7 @@ function reconcileClaudeSymlinks(dirs) {
|
|
|
201465
201576
|
for (const name3 of entries) {
|
|
201466
201577
|
const entryPath = join39(claudeDir, name3);
|
|
201467
201578
|
try {
|
|
201468
|
-
if (!
|
|
201579
|
+
if (!lstatSync4(entryPath).isSymbolicLink()) {
|
|
201469
201580
|
continue;
|
|
201470
201581
|
}
|
|
201471
201582
|
} catch {
|
|
@@ -201749,6 +201860,7 @@ var init_sandbox_adapter = __esm(() => {
|
|
|
201749
201860
|
init_managedPath();
|
|
201750
201861
|
init_settings2();
|
|
201751
201862
|
init_prompt3();
|
|
201863
|
+
init_prompt6();
|
|
201752
201864
|
init_errors();
|
|
201753
201865
|
init_filesystem();
|
|
201754
201866
|
init_ripgrep();
|
|
@@ -231295,7 +231407,7 @@ IMPORTANT - Use the correct year in search queries:
|
|
|
231295
231407
|
`;
|
|
231296
231408
|
}
|
|
231297
231409
|
var WEB_SEARCH_TOOL_NAME = "WebSearch";
|
|
231298
|
-
var
|
|
231410
|
+
var init_prompt7 = __esm(() => {
|
|
231299
231411
|
init_common2();
|
|
231300
231412
|
});
|
|
231301
231413
|
|
|
@@ -231371,6 +231483,7 @@ var init_claudeCodeGuideAgent = __esm(() => {
|
|
|
231371
231483
|
init_prompt3();
|
|
231372
231484
|
init_prompt2();
|
|
231373
231485
|
init_prompt6();
|
|
231486
|
+
init_prompt7();
|
|
231374
231487
|
init_auth6();
|
|
231375
231488
|
init_embeddedTools();
|
|
231376
231489
|
init_settings2();
|
|
@@ -231781,6 +231894,7 @@ var init_statuslineSetup = __esm(() => {
|
|
|
231781
231894
|
var VERIFICATION_SYSTEM_PROMPT, VERIFICATION_WHEN_TO_USE = "Use this agent to verify that implementation work is correct before reporting completion. Invoke after non-trivial tasks (3+ file edits, backend/API changes, infrastructure changes). Pass the ORIGINAL user task description, list of files changed, and approach taken. The agent runs builds, tests, linters, and checks to produce a PASS/FAIL/PARTIAL verdict with evidence.", VERIFICATION_AGENT;
|
|
231782
231895
|
var init_verificationAgent = __esm(() => {
|
|
231783
231896
|
init_prompt4();
|
|
231897
|
+
init_prompt6();
|
|
231784
231898
|
init_constants3();
|
|
231785
231899
|
VERIFICATION_SYSTEM_PROMPT = `You are a verification specialist. Your job is not to confirm the implementation works \u2014 it's to try to break it.
|
|
231786
231900
|
|
|
@@ -232461,14 +232575,14 @@ __export(exports_prompt2, {
|
|
|
232461
232575
|
SEND_USER_FILE_TOOL_NAME: () => SEND_USER_FILE_TOOL_NAME
|
|
232462
232576
|
});
|
|
232463
232577
|
var SEND_USER_FILE_TOOL_NAME = "";
|
|
232464
|
-
var
|
|
232578
|
+
var init_prompt8 = () => {};
|
|
232465
232579
|
|
|
232466
232580
|
// src/tools/EnterPlanModeTool/constants.ts
|
|
232467
232581
|
var ENTER_PLAN_MODE_TOOL_NAME = "EnterPlanMode", PLAN_MODE_AUTO_BASH_HANDLING_ENABLED = true;
|
|
232468
232582
|
|
|
232469
232583
|
// src/tools/AskUserQuestionTool/prompt.ts
|
|
232470
232584
|
var ASK_USER_QUESTION_TOOL_NAME = "AskUserQuestion", ASK_USER_QUESTION_TOOL_CHIP_WIDTH = 12, DESCRIPTION6 = "Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices.", PREVIEW_FEATURE_PROMPT, ASK_USER_QUESTION_TOOL_PROMPT;
|
|
232471
|
-
var
|
|
232585
|
+
var init_prompt9 = __esm(() => {
|
|
232472
232586
|
PREVIEW_FEATURE_PROMPT = {
|
|
232473
232587
|
markdown: `
|
|
232474
232588
|
Preview feature:
|
|
@@ -239621,7 +239735,7 @@ function buildCronListPrompt(durableEnabled) {
|
|
|
239621
239735
|
return durableEnabled ? `List all cron jobs scheduled via ${CRON_CREATE_TOOL_NAME}, both durable (.claude/scheduled_tasks.json) and session-only.` : `List all cron jobs scheduled via ${CRON_CREATE_TOOL_NAME} in this session.`;
|
|
239622
239736
|
}
|
|
239623
239737
|
var KAIROS_CRON_REFRESH_MS, DEFAULT_MAX_AGE_DAYS, CRON_CREATE_TOOL_NAME = "CronCreate", CRON_DELETE_TOOL_NAME = "CronDelete", CRON_LIST_TOOL_NAME = "CronList", CRON_DELETE_DESCRIPTION = "Cancel a scheduled cron job by ID", CRON_LIST_DESCRIPTION = "List scheduled cron jobs";
|
|
239624
|
-
var
|
|
239738
|
+
var init_prompt10 = __esm(() => {
|
|
239625
239739
|
init_featureFlags();
|
|
239626
239740
|
init_growthbook();
|
|
239627
239741
|
init_cronTasks();
|
|
@@ -239635,15 +239749,16 @@ var ALL_AGENT_DISALLOWED_TOOLS, CUSTOM_AGENT_DISALLOWED_TOOLS, ASYNC_AGENT_ALLOW
|
|
|
239635
239749
|
var init_tools = __esm(() => {
|
|
239636
239750
|
init_featureFlags();
|
|
239637
239751
|
init_constants3();
|
|
239638
|
-
|
|
239752
|
+
init_prompt9();
|
|
239639
239753
|
init_prompt3();
|
|
239640
|
-
|
|
239754
|
+
init_prompt7();
|
|
239641
239755
|
init_prompt2();
|
|
239756
|
+
init_prompt6();
|
|
239642
239757
|
init_shellToolUtils();
|
|
239643
239758
|
init_prompt4();
|
|
239644
|
-
|
|
239759
|
+
init_prompt11();
|
|
239645
239760
|
init_SyntheticOutputTool();
|
|
239646
|
-
|
|
239761
|
+
init_prompt10();
|
|
239647
239762
|
ALL_AGENT_DISALLOWED_TOOLS = new Set([
|
|
239648
239763
|
TASK_OUTPUT_TOOL_NAME,
|
|
239649
239764
|
EXIT_PLAN_MODE_V2_TOOL_NAME,
|
|
@@ -240198,13 +240313,13 @@ Query forms:
|
|
|
240198
240313
|
- "select:Read,Edit,Grep" \u2014 fetch these exact tools by name
|
|
240199
240314
|
- "notebook jupyter" \u2014 keyword search, up to max_results best matches
|
|
240200
240315
|
- "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;
|
|
240201
|
-
var
|
|
240316
|
+
var init_prompt11 = __esm(() => {
|
|
240202
240317
|
init_featureFlags();
|
|
240203
240318
|
init_state();
|
|
240204
240319
|
init_growthbook();
|
|
240205
240320
|
init_constants3();
|
|
240206
240321
|
BRIEF_TOOL_NAME3 = feature("KAIROS") || feature("KAIROS_BRIEF") ? (init_prompt(), __toCommonJS(exports_prompt)).BRIEF_TOOL_NAME : null;
|
|
240207
|
-
SEND_USER_FILE_TOOL_NAME2 = feature("KAIROS") ? (
|
|
240322
|
+
SEND_USER_FILE_TOOL_NAME2 = feature("KAIROS") ? (init_prompt8(), __toCommonJS(exports_prompt2)).SEND_USER_FILE_TOOL_NAME : null;
|
|
240208
240323
|
});
|
|
240209
240324
|
|
|
240210
240325
|
// node_modules/.bun/diff@8.0.4/node_modules/diff/libesm/diff/base.js
|
|
@@ -241656,6 +241771,7 @@ var init_microCompact = __esm(() => {
|
|
|
241656
241771
|
init_prompt4();
|
|
241657
241772
|
init_prompt2();
|
|
241658
241773
|
init_prompt6();
|
|
241774
|
+
init_prompt7();
|
|
241659
241775
|
init_debug();
|
|
241660
241776
|
init_model();
|
|
241661
241777
|
init_shellToolUtils();
|
|
@@ -260248,7 +260364,7 @@ var init_ToolSearchTool = __esm(() => {
|
|
|
260248
260364
|
init_debug();
|
|
260249
260365
|
init_stringUtils();
|
|
260250
260366
|
init_toolSearch();
|
|
260251
|
-
|
|
260367
|
+
init_prompt11();
|
|
260252
260368
|
inputSchema3 = lazySchema(() => exports_external.object({
|
|
260253
260369
|
query: exports_external.string().describe('Query to find deferred tools. Use "select:<tool_name>" for direct selection, or keywords to search.'),
|
|
260254
260370
|
max_results: exports_external.number().optional().default(5).describe("Maximum number of results to return (default: 5)")
|
|
@@ -264204,7 +264320,7 @@ Usage notes:
|
|
|
264204
264320
|
|
|
264205
264321
|
${forkEnabled ? forkExamples : currentExamples}`;
|
|
264206
264322
|
}
|
|
264207
|
-
var
|
|
264323
|
+
var init_prompt12 = __esm(() => {
|
|
264208
264324
|
init_growthbook();
|
|
264209
264325
|
init_auth6();
|
|
264210
264326
|
init_embeddedTools();
|
|
@@ -266441,7 +266557,7 @@ var init_fableCredits = __esm(() => {
|
|
|
266441
266557
|
|
|
266442
266558
|
// src/tools/SleepTool/prompt.ts
|
|
266443
266559
|
var SLEEP_TOOL_NAME = "Sleep", SLEEP_TOOL_PROMPT;
|
|
266444
|
-
var
|
|
266560
|
+
var init_prompt13 = __esm(() => {
|
|
266445
266561
|
init_xml();
|
|
266446
266562
|
SLEEP_TOOL_PROMPT = `Wait for a specified duration. The user can interrupt the sleep at any time.
|
|
266447
266563
|
|
|
@@ -372210,7 +372326,9 @@ function ruleIdToLabel(ruleId) {
|
|
|
372210
372326
|
digitalocean: "DigitalOcean",
|
|
372211
372327
|
huggingface: "HuggingFace",
|
|
372212
372328
|
hashicorp: "HashiCorp",
|
|
372213
|
-
sendgrid: "SendGrid"
|
|
372329
|
+
sendgrid: "SendGrid",
|
|
372330
|
+
ci: "CI",
|
|
372331
|
+
scim: "SCIM"
|
|
372214
372332
|
};
|
|
372215
372333
|
return ruleId.split("-").map((part) => specialCase[part] ?? capitalize(part)).join(" ");
|
|
372216
372334
|
}
|
|
@@ -372241,7 +372359,7 @@ function redactSecrets(content) {
|
|
|
372241
372359
|
}
|
|
372242
372360
|
return content;
|
|
372243
372361
|
}
|
|
372244
|
-
var ANT_KEY_PFX, SECRET_RULES, compiledRules = null, redactRules = null;
|
|
372362
|
+
var ANT_KEY_PFX, GITLAB_TOKEN_BODY = "[\\w=-]{20,}(?:\\.[0-9a-z]{9})?", SECRET_RULES, compiledRules = null, redactRules = null;
|
|
372245
372363
|
var init_secretScanner = __esm(() => {
|
|
372246
372364
|
init_stringUtils();
|
|
372247
372365
|
ANT_KEY_PFX = ["sk", "ant", "api"].join("-");
|
|
@@ -372304,11 +372422,47 @@ var init_secretScanner = __esm(() => {
|
|
|
372304
372422
|
},
|
|
372305
372423
|
{
|
|
372306
372424
|
id: "gitlab-pat",
|
|
372307
|
-
source:
|
|
372425
|
+
source: `glpat-${GITLAB_TOKEN_BODY}`
|
|
372308
372426
|
},
|
|
372309
372427
|
{
|
|
372310
372428
|
id: "gitlab-deploy-token",
|
|
372311
|
-
source:
|
|
372429
|
+
source: `gldt-${GITLAB_TOKEN_BODY}`
|
|
372430
|
+
},
|
|
372431
|
+
{
|
|
372432
|
+
id: "gitlab-runner-authentication-token",
|
|
372433
|
+
source: `glrt-${GITLAB_TOKEN_BODY}`
|
|
372434
|
+
},
|
|
372435
|
+
{
|
|
372436
|
+
id: "gitlab-oauth-app-secret",
|
|
372437
|
+
source: `gloas-${GITLAB_TOKEN_BODY}`
|
|
372438
|
+
},
|
|
372439
|
+
{
|
|
372440
|
+
id: "gitlab-pipeline-trigger-token",
|
|
372441
|
+
source: `glptt-${GITLAB_TOKEN_BODY}`
|
|
372442
|
+
},
|
|
372443
|
+
{
|
|
372444
|
+
id: "gitlab-kubernetes-agent-token",
|
|
372445
|
+
source: `glagent-${GITLAB_TOKEN_BODY}`
|
|
372446
|
+
},
|
|
372447
|
+
{
|
|
372448
|
+
id: "gitlab-incoming-mail-token",
|
|
372449
|
+
source: `glimt-${GITLAB_TOKEN_BODY}`
|
|
372450
|
+
},
|
|
372451
|
+
{
|
|
372452
|
+
id: "gitlab-scim-oauth-token",
|
|
372453
|
+
source: `glsoat-${GITLAB_TOKEN_BODY}`
|
|
372454
|
+
},
|
|
372455
|
+
{
|
|
372456
|
+
id: "gitlab-ci-build-token",
|
|
372457
|
+
source: `glcbt-${GITLAB_TOKEN_BODY}`
|
|
372458
|
+
},
|
|
372459
|
+
{
|
|
372460
|
+
id: "gitlab-feed-token",
|
|
372461
|
+
source: `glft-${GITLAB_TOKEN_BODY}`
|
|
372462
|
+
},
|
|
372463
|
+
{
|
|
372464
|
+
id: "gitlab-feature-flag-client-token",
|
|
372465
|
+
source: `glffct-${GITLAB_TOKEN_BODY}`
|
|
372312
372466
|
},
|
|
372313
372467
|
{
|
|
372314
372468
|
id: "slack-bot-token",
|
|
@@ -376135,6 +376289,46 @@ function getMaxBashTimeoutMs(env6 = process.env) {
|
|
|
376135
376289
|
}
|
|
376136
376290
|
var DEFAULT_TIMEOUT_MS = 120000, MAX_TIMEOUT_MS = 600000;
|
|
376137
376291
|
|
|
376292
|
+
// src/utils/todoToolsAvailability.ts
|
|
376293
|
+
function isModelAtOrAboveRestrictedThreshold(modelId, restricted) {
|
|
376294
|
+
const match = /^claude-([a-z]+)-(\d+(?:-\d+)*)$/.exec(modelId);
|
|
376295
|
+
const family = match?.[1];
|
|
376296
|
+
const version5 = match?.[2];
|
|
376297
|
+
if (!family || !version5) {
|
|
376298
|
+
return false;
|
|
376299
|
+
}
|
|
376300
|
+
const threshold = restricted.find(([f4]) => f4 === family)?.[1];
|
|
376301
|
+
if (!threshold) {
|
|
376302
|
+
return false;
|
|
376303
|
+
}
|
|
376304
|
+
const segments = version5.split("-").map(Number);
|
|
376305
|
+
for (let i6 = 0;i6 < Math.max(segments.length, threshold.length); i6++) {
|
|
376306
|
+
const diff2 = (segments[i6] ?? 0) - (threshold[i6] ?? 0);
|
|
376307
|
+
if (diff2 !== 0) {
|
|
376308
|
+
return diff2 > 0;
|
|
376309
|
+
}
|
|
376310
|
+
}
|
|
376311
|
+
return true;
|
|
376312
|
+
}
|
|
376313
|
+
function areTodoToolsAvailable() {
|
|
376314
|
+
const model = getMainLoopModel();
|
|
376315
|
+
if (!isModelAtOrAboveRestrictedThreshold(model, TODO_TOOL_RESTRICTED_MODELS)) {
|
|
376316
|
+
return true;
|
|
376317
|
+
}
|
|
376318
|
+
return isEnvTruthy(process.env.CLAUDE_CODE_ENABLE_TODO_TOOLS);
|
|
376319
|
+
}
|
|
376320
|
+
var TODO_TOOL_RESTRICTED_MODELS;
|
|
376321
|
+
var init_todoToolsAvailability = __esm(() => {
|
|
376322
|
+
init_envUtils();
|
|
376323
|
+
init_model();
|
|
376324
|
+
TODO_TOOL_RESTRICTED_MODELS = [
|
|
376325
|
+
["opus", [4, 8]],
|
|
376326
|
+
["sonnet", [5]],
|
|
376327
|
+
["fable", [5]],
|
|
376328
|
+
["mythos", [5]]
|
|
376329
|
+
];
|
|
376330
|
+
});
|
|
376331
|
+
|
|
376138
376332
|
// src/utils/todo/types.ts
|
|
376139
376333
|
var TodoStatusSchema, TodoItemSchema, TodoListSchema;
|
|
376140
376334
|
var init_types12 = __esm(() => {
|
|
@@ -376150,7 +376344,7 @@ var init_types12 = __esm(() => {
|
|
|
376150
376344
|
|
|
376151
376345
|
// src/tools/TodoWriteTool/prompt.ts
|
|
376152
376346
|
var PROMPT2, DESCRIPTION7 = "Update the todo list for the current session. To be used proactively and often to track progress and pending tasks. Make sure that at least one task is in_progress at all times. Always provide both content (imperative) and activeForm (present continuous) for each task.";
|
|
376153
|
-
var
|
|
376347
|
+
var init_prompt14 = __esm(() => {
|
|
376154
376348
|
PROMPT2 = `Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
|
|
376155
376349
|
It also helps the user understand the progress of the task and overall progress of their requests.
|
|
376156
376350
|
|
|
@@ -376341,9 +376535,10 @@ var init_TodoWriteTool = __esm(() => {
|
|
|
376341
376535
|
init_growthbook();
|
|
376342
376536
|
init_Tool();
|
|
376343
376537
|
init_tasks();
|
|
376538
|
+
init_todoToolsAvailability();
|
|
376344
376539
|
init_types12();
|
|
376345
376540
|
init_constants3();
|
|
376346
|
-
|
|
376541
|
+
init_prompt14();
|
|
376347
376542
|
inputSchema8 = lazySchema(() => exports_external.strictObject({
|
|
376348
376543
|
todos: TodoListSchema().describe("The updated todo list")
|
|
376349
376544
|
}));
|
|
@@ -376374,7 +376569,7 @@ var init_TodoWriteTool = __esm(() => {
|
|
|
376374
376569
|
},
|
|
376375
376570
|
shouldDefer: true,
|
|
376376
376571
|
isEnabled() {
|
|
376377
|
-
return !isTodoV2Enabled();
|
|
376572
|
+
return !isTodoV2Enabled() && areTodoToolsAvailable();
|
|
376378
376573
|
},
|
|
376379
376574
|
toAutoClassifierInput(input) {
|
|
376380
376575
|
return `${input.todos.length} items`;
|
|
@@ -376715,7 +376910,7 @@ function getSimplePrompt() {
|
|
|
376715
376910
|
].join(`
|
|
376716
376911
|
`);
|
|
376717
376912
|
}
|
|
376718
|
-
var
|
|
376913
|
+
var init_prompt15 = __esm(() => {
|
|
376719
376914
|
init_featureFlags();
|
|
376720
376915
|
init_prompts4();
|
|
376721
376916
|
init_attribution();
|
|
@@ -382842,7 +383037,7 @@ var init_BashTool = __esm(() => {
|
|
|
382842
383037
|
init_gitOperationTracking();
|
|
382843
383038
|
init_bashPermissions();
|
|
382844
383039
|
init_commandSemantics();
|
|
382845
|
-
|
|
383040
|
+
init_prompt15();
|
|
382846
383041
|
init_readOnlyValidation();
|
|
382847
383042
|
init_sedEditParser();
|
|
382848
383043
|
init_shouldUseSandbox();
|
|
@@ -389422,6 +389617,71 @@ function computeFingerprintFromMessages(messages) {
|
|
|
389422
389617
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
389423
389618
|
var init_fingerprint = () => {};
|
|
389424
389619
|
|
|
389620
|
+
// src/utils/model/unrecognizedModelSignal.ts
|
|
389621
|
+
function isModelRecognized(model) {
|
|
389622
|
+
return KNOWN_CANONICAL_MODELS.has(getCanonicalName(model)) || KNOWN_FULL_MODEL_IDS.has(model.toLowerCase());
|
|
389623
|
+
}
|
|
389624
|
+
function signalUnrecognizedModel(model, querySource) {
|
|
389625
|
+
try {
|
|
389626
|
+
if (model.includes("application-inference-profile")) {
|
|
389627
|
+
return;
|
|
389628
|
+
}
|
|
389629
|
+
const normalized = normalizeModelStringForAPI(model);
|
|
389630
|
+
const claimKey = `unrecognized-model-signal:${normalized}`;
|
|
389631
|
+
if (claimedSignals.has(claimKey)) {
|
|
389632
|
+
return;
|
|
389633
|
+
}
|
|
389634
|
+
claimedSignals.add(claimKey);
|
|
389635
|
+
if (isModelRecognized(model) || isModelRecognized(normalized)) {
|
|
389636
|
+
return;
|
|
389637
|
+
}
|
|
389638
|
+
logEvent2("tengu_api_unrecognized_model", {
|
|
389639
|
+
model,
|
|
389640
|
+
querySource
|
|
389641
|
+
});
|
|
389642
|
+
const line = `${UNRECOGNIZED_MODEL_TAG} ${JSON.stringify({ model, query_source: querySource })}`.replace(CONTROL_CHARS_PATTERN, "");
|
|
389643
|
+
if (getIsNonInteractiveSession() && process.env.CLAUDE_CODE_SESSION_KIND !== "bg") {
|
|
389644
|
+
process.stderr.write(`${line}
|
|
389645
|
+
`);
|
|
389646
|
+
} else {
|
|
389647
|
+
logForDebugging(line, { level: "warn" });
|
|
389648
|
+
}
|
|
389649
|
+
} catch {}
|
|
389650
|
+
}
|
|
389651
|
+
var UNRECOGNIZED_MODEL_TAG = "[claude-code:unrecognized_model]", CONTROL_CHARS_PATTERN, claimedSignals, KNOWN_CANONICAL_MODELS, KNOWN_FULL_MODEL_IDS;
|
|
389652
|
+
var init_unrecognizedModelSignal = __esm(() => {
|
|
389653
|
+
init_state();
|
|
389654
|
+
init_analytics();
|
|
389655
|
+
init_debug();
|
|
389656
|
+
init_model();
|
|
389657
|
+
CONTROL_CHARS_PATTERN = /[\x00-\x08\x0e-\x1f\x7f-\x9f]/g;
|
|
389658
|
+
claimedSignals = new Set;
|
|
389659
|
+
KNOWN_CANONICAL_MODELS = new Set([
|
|
389660
|
+
"claude-opus-5",
|
|
389661
|
+
"claude-opus-4-8",
|
|
389662
|
+
"claude-opus-4-7",
|
|
389663
|
+
"claude-opus-4-6",
|
|
389664
|
+
"claude-opus-4-5",
|
|
389665
|
+
"claude-opus-4-1",
|
|
389666
|
+
"claude-opus-4",
|
|
389667
|
+
"claude-sonnet-5",
|
|
389668
|
+
"claude-sonnet-4-6",
|
|
389669
|
+
"claude-sonnet-4-5",
|
|
389670
|
+
"claude-sonnet-4",
|
|
389671
|
+
"claude-haiku-4-5",
|
|
389672
|
+
"claude-fable-5",
|
|
389673
|
+
"claude-3-7-sonnet",
|
|
389674
|
+
"claude-3-5-sonnet",
|
|
389675
|
+
"claude-3-5-haiku",
|
|
389676
|
+
"claude-3-opus",
|
|
389677
|
+
"claude-3-sonnet",
|
|
389678
|
+
"claude-3-haiku"
|
|
389679
|
+
]);
|
|
389680
|
+
KNOWN_FULL_MODEL_IDS = new Set([
|
|
389681
|
+
"claude-mythos-preview"
|
|
389682
|
+
]);
|
|
389683
|
+
});
|
|
389684
|
+
|
|
389425
389685
|
// src/utils/sideQuery.ts
|
|
389426
389686
|
function extractFirstUserMessageText(messages) {
|
|
389427
389687
|
const firstUserMessage = messages.find((m5) => m5.role === "user");
|
|
@@ -389449,6 +389709,7 @@ async function sideQuery(opts) {
|
|
|
389449
389709
|
thinking,
|
|
389450
389710
|
stop_sequences
|
|
389451
389711
|
} = opts;
|
|
389712
|
+
signalUnrecognizedModel(model, opts.querySource);
|
|
389452
389713
|
const client8 = await getAnthropicClient({
|
|
389453
389714
|
maxRetries,
|
|
389454
389715
|
model,
|
|
@@ -389528,6 +389789,7 @@ var init_sideQuery = __esm(() => {
|
|
|
389528
389789
|
init_betas2();
|
|
389529
389790
|
init_fingerprint();
|
|
389530
389791
|
init_model();
|
|
389792
|
+
init_unrecognizedModelSignal();
|
|
389531
389793
|
});
|
|
389532
389794
|
|
|
389533
389795
|
// src/utils/permissions/expandWithDefaults.ts
|
|
@@ -449184,7 +449446,7 @@ Usage:${getPreReadInstruction2()}
|
|
|
449184
449446
|
- The edit will FAIL if \`old_string\` is not unique in the file. Either provide a larger string with more surrounding context to make it unique or use \`replace_all\` to change every instance of \`old_string\`.${minimalUniquenessHint}
|
|
449185
449447
|
- Use \`replace_all\` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.`;
|
|
449186
449448
|
}
|
|
449187
|
-
var
|
|
449449
|
+
var init_prompt16 = __esm(() => {
|
|
449188
449450
|
init_file();
|
|
449189
449451
|
init_prompt3();
|
|
449190
449452
|
});
|
|
@@ -449244,7 +449506,7 @@ var init_FileEditTool = __esm(() => {
|
|
|
449244
449506
|
init_fileStateGuard();
|
|
449245
449507
|
init_shellRuleMatching();
|
|
449246
449508
|
init_validateEditTool();
|
|
449247
|
-
|
|
449509
|
+
init_prompt16();
|
|
449248
449510
|
init_types10();
|
|
449249
449511
|
init_UI2();
|
|
449250
449512
|
init_utils8();
|
|
@@ -450348,7 +450610,7 @@ __export(exports_prompt5, {
|
|
|
450348
450610
|
SNIP_TOOL_NAME: () => SNIP_TOOL_NAME
|
|
450349
450611
|
});
|
|
450350
450612
|
var SNIP_TOOL_NAME = "";
|
|
450351
|
-
var
|
|
450613
|
+
var init_prompt17 = () => {};
|
|
450352
450614
|
|
|
450353
450615
|
// src/utils/collapseReadSearch.ts
|
|
450354
450616
|
function getFirstContentItem(content) {
|
|
@@ -450940,12 +451202,12 @@ var init_collapseReadSearch = __esm(() => {
|
|
|
450940
451202
|
init_constants9();
|
|
450941
451203
|
init_primitiveTools();
|
|
450942
451204
|
init_gitOperationTracking();
|
|
450943
|
-
|
|
451205
|
+
init_prompt11();
|
|
450944
451206
|
init_file();
|
|
450945
451207
|
init_fullscreen();
|
|
450946
451208
|
init_memoryFileDetection();
|
|
450947
451209
|
teamMemOps = feature("TEAMMEM") ? (init_teamMemoryOps(), __toCommonJS(exports_teamMemoryOps)) : null;
|
|
450948
|
-
SNIP_TOOL_NAME2 = feature("HISTORY_SNIP") ? (
|
|
451210
|
+
SNIP_TOOL_NAME2 = feature("HISTORY_SNIP") ? (init_prompt17(), __toCommonJS(exports_prompt5)).SNIP_TOOL_NAME : null;
|
|
450949
451211
|
});
|
|
450950
451212
|
|
|
450951
451213
|
// src/components/TaskListV2.tsx
|
|
@@ -474545,7 +474807,7 @@ var init_conversationRecovery = __esm(() => {
|
|
|
474545
474807
|
init_sessionStorage();
|
|
474546
474808
|
BRIEF_TOOL_NAME4 = feature("KAIROS") || feature("KAIROS_BRIEF") ? (init_prompt(), __toCommonJS(exports_prompt)).BRIEF_TOOL_NAME : null;
|
|
474547
474809
|
LEGACY_BRIEF_TOOL_NAME2 = feature("KAIROS") || feature("KAIROS_BRIEF") ? (init_prompt(), __toCommonJS(exports_prompt)).LEGACY_BRIEF_TOOL_NAME : null;
|
|
474548
|
-
SEND_USER_FILE_TOOL_NAME3 = feature("KAIROS") ? (
|
|
474810
|
+
SEND_USER_FILE_TOOL_NAME3 = feature("KAIROS") ? (init_prompt8(), __toCommonJS(exports_prompt2)).SEND_USER_FILE_TOOL_NAME : null;
|
|
474549
474811
|
});
|
|
474550
474812
|
|
|
474551
474813
|
// src/services/api/filesApi.ts
|
|
@@ -477743,7 +478005,7 @@ var init_AgentTool = __esm(() => {
|
|
|
477743
478005
|
init_constants3();
|
|
477744
478006
|
init_forkSubagent();
|
|
477745
478007
|
init_loadAgentsDir();
|
|
477746
|
-
|
|
478008
|
+
init_prompt12();
|
|
477747
478009
|
init_runAgent();
|
|
477748
478010
|
init_UI8();
|
|
477749
478011
|
jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -479108,7 +479370,7 @@ var init_SkillTool = __esm(() => {
|
|
|
479108
479370
|
init_skillUsageTracking();
|
|
479109
479371
|
init_uuid();
|
|
479110
479372
|
init_runAgent();
|
|
479111
|
-
|
|
479373
|
+
init_prompt27();
|
|
479112
479374
|
init_skillAttribution();
|
|
479113
479375
|
init_loadSkillsDir();
|
|
479114
479376
|
init_UI9();
|
|
@@ -496719,7 +496981,7 @@ async function applyPromptToMarkdown(prompt, markdownContent, signal, isNonInter
|
|
|
496719
496981
|
}
|
|
496720
496982
|
return "No response from model";
|
|
496721
496983
|
}
|
|
496722
|
-
var DomainBlockedError, DomainCheckFailedError, EgressBlockedError,
|
|
496984
|
+
var DomainBlockedError, DomainCheckFailedError, EgressBlockedError, MAX_CACHE_SIZE_BYTES, URL_CACHE, DOMAIN_CHECK_CACHE, turndownServicePromise, MAX_URL_LENGTH = 2000, MAX_HTTP_CONTENT_LENGTH = 10485760, FETCH_TIMEOUT_MS3 = 60000, DOMAIN_CHECK_TIMEOUT_MS = 1e4, MAX_REDIRECTS = 10, MAX_MARKDOWN_LENGTH = 1e5;
|
|
496723
496985
|
var init_utils12 = __esm(() => {
|
|
496724
496986
|
init_axios2();
|
|
496725
496987
|
init_index_min();
|
|
@@ -496730,7 +496992,9 @@ var init_utils12 = __esm(() => {
|
|
|
496730
496992
|
init_log3();
|
|
496731
496993
|
init_mcpOutputStorage();
|
|
496732
496994
|
init_settings2();
|
|
496995
|
+
init_cacheTtl();
|
|
496733
496996
|
init_preapproved();
|
|
496997
|
+
init_prompt6();
|
|
496734
496998
|
DomainBlockedError = class DomainBlockedError extends Error {
|
|
496735
496999
|
constructor(domain2) {
|
|
496736
497000
|
super(`Claude Code is unable to fetch from ${domain2}`);
|
|
@@ -496755,11 +497019,10 @@ var init_utils12 = __esm(() => {
|
|
|
496755
497019
|
this.name = "EgressBlockedError";
|
|
496756
497020
|
}
|
|
496757
497021
|
};
|
|
496758
|
-
CACHE_TTL_MS3 = 15 * 60 * 1000;
|
|
496759
497022
|
MAX_CACHE_SIZE_BYTES = 50 * 1024 * 1024;
|
|
496760
497023
|
URL_CACHE = new L({
|
|
496761
497024
|
maxSize: MAX_CACHE_SIZE_BYTES,
|
|
496762
|
-
ttl:
|
|
497025
|
+
ttl: getWebFetchCacheTtlMs()
|
|
496763
497026
|
});
|
|
496764
497027
|
DOMAIN_CHECK_CACHE = new L({
|
|
496765
497028
|
max: 128,
|
|
@@ -496798,6 +497061,7 @@ var init_WebFetchTool = __esm(() => {
|
|
|
496798
497061
|
init_format();
|
|
496799
497062
|
init_permissions2();
|
|
496800
497063
|
init_preapproved();
|
|
497064
|
+
init_prompt6();
|
|
496801
497065
|
init_UI10();
|
|
496802
497066
|
init_utils12();
|
|
496803
497067
|
inputSchema14 = lazySchema(() => exports_external.strictObject({
|
|
@@ -497082,7 +497346,7 @@ var init_CronCreateTool = __esm(() => {
|
|
|
497082
497346
|
init_cronTasks();
|
|
497083
497347
|
init_semanticBoolean();
|
|
497084
497348
|
init_teammateContext();
|
|
497085
|
-
|
|
497349
|
+
init_prompt10();
|
|
497086
497350
|
init_UI11();
|
|
497087
497351
|
inputSchema15 = lazySchema(() => exports_external.strictObject({
|
|
497088
497352
|
cron: exports_external.string().describe('Standard 5-field cron expression in local time: "M H DoM Mon DoW" (e.g. "*/5 * * * *" = every 5 minutes, "30 14 28 2 *" = Feb 28 at 2:30pm local once).'),
|
|
@@ -497187,7 +497451,7 @@ var init_CronDeleteTool = __esm(() => {
|
|
|
497187
497451
|
init_Tool();
|
|
497188
497452
|
init_cronTasks();
|
|
497189
497453
|
init_teammateContext();
|
|
497190
|
-
|
|
497454
|
+
init_prompt10();
|
|
497191
497455
|
init_UI11();
|
|
497192
497456
|
inputSchema16 = lazySchema(() => exports_external.strictObject({
|
|
497193
497457
|
id: exports_external.string().describe("Job ID returned by CronCreate.")
|
|
@@ -497266,7 +497530,7 @@ var init_CronListTool = __esm(() => {
|
|
|
497266
497530
|
init_cronTasks();
|
|
497267
497531
|
init_format();
|
|
497268
497532
|
init_teammateContext();
|
|
497269
|
-
|
|
497533
|
+
init_prompt10();
|
|
497270
497534
|
init_UI11();
|
|
497271
497535
|
inputSchema17 = lazySchema(() => exports_external.strictObject({}));
|
|
497272
497536
|
outputSchema16 = lazySchema(() => exports_external.object({
|
|
@@ -559543,18 +559807,18 @@ function parseFolderPath(folderPath) {
|
|
|
559543
559807
|
}
|
|
559544
559808
|
return { platform: platform5, buildId };
|
|
559545
559809
|
}
|
|
559546
|
-
var
|
|
559810
|
+
var import_debug176, debugCache;
|
|
559547
559811
|
var init_Cache = __esm(() => {
|
|
559548
559812
|
init_browser_data();
|
|
559549
559813
|
init_detectPlatform();
|
|
559550
|
-
|
|
559551
|
-
debugCache =
|
|
559814
|
+
import_debug176 = __toESM(require_src(), 1);
|
|
559815
|
+
debugCache = import_debug176.default("puppeteer:browsers:cache");
|
|
559552
559816
|
});
|
|
559553
559817
|
|
|
559554
559818
|
// node_modules/.bun/@puppeteer+browsers@2.13.2/node_modules/@puppeteer/browsers/lib/esm/debug.js
|
|
559555
|
-
var
|
|
559819
|
+
var import_debug177;
|
|
559556
559820
|
var init_debug3 = __esm(() => {
|
|
559557
|
-
|
|
559821
|
+
import_debug177 = __toESM(require_src(), 1);
|
|
559558
559822
|
});
|
|
559559
559823
|
|
|
559560
559824
|
// node_modules/.bun/@puppeteer+browsers@2.13.2/node_modules/@puppeteer/browsers/lib/esm/launch.js
|
|
@@ -559873,7 +560137,7 @@ var init_launch = __esm(() => {
|
|
|
559873
560137
|
init_Cache();
|
|
559874
560138
|
init_debug3();
|
|
559875
560139
|
init_detectPlatform();
|
|
559876
|
-
debugLaunch =
|
|
560140
|
+
debugLaunch = import_debug177.default("puppeteer:browsers:launcher");
|
|
559877
560141
|
CDP_WEBSOCKET_ENDPOINT_REGEX = /^DevTools listening on (ws:\/\/.*)$/;
|
|
559878
560142
|
WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX = /^WebDriver BiDi listening on (ws:\/\/.*)$/;
|
|
559879
560143
|
processListeners = new Map;
|
|
@@ -564957,10 +565221,10 @@ async function installDMG(dmgPath, folderPath) {
|
|
|
564957
565221
|
spawnSync4("hdiutil", ["detach", mountPath, "-quiet"]);
|
|
564958
565222
|
}
|
|
564959
565223
|
}
|
|
564960
|
-
var
|
|
565224
|
+
var import_debug179, debugFileUtil, internalConstantsForTesting;
|
|
564961
565225
|
var init_fileUtil = __esm(() => {
|
|
564962
|
-
|
|
564963
|
-
debugFileUtil =
|
|
565226
|
+
import_debug179 = __toESM(require_src(), 1);
|
|
565227
|
+
debugFileUtil = import_debug179.default("puppeteer:browsers:fileUtil");
|
|
564964
565228
|
internalConstantsForTesting = {
|
|
564965
565229
|
xz: "xz",
|
|
564966
565230
|
bzip2: "bzip2"
|
|
@@ -565253,7 +565517,7 @@ var init_install = __esm(() => {
|
|
|
565253
565517
|
init_fileUtil();
|
|
565254
565518
|
init_httpUtil();
|
|
565255
565519
|
import_progress = __toESM(require_node_progress(), 1);
|
|
565256
|
-
debugInstall =
|
|
565520
|
+
debugInstall = import_debug177.default("puppeteer:browsers:install");
|
|
565257
565521
|
times = new Map;
|
|
565258
565522
|
});
|
|
565259
565523
|
|
|
@@ -571528,7 +571792,7 @@ import fs22 from "fs";
|
|
|
571528
571792
|
import os16 from "os";
|
|
571529
571793
|
import { dirname as dirname45 } from "path";
|
|
571530
571794
|
import { PassThrough as PassThrough4 } from "stream";
|
|
571531
|
-
var
|
|
571795
|
+
var import_debug181, __runInitializers23 = function(thisArg, initializers, value) {
|
|
571532
571796
|
var useValue = arguments.length > 2;
|
|
571533
571797
|
for (var i6 = 0;i6 < initializers.length; i6++) {
|
|
571534
571798
|
value = useValue ? initializers[i6].call(thisArg, value) : initializers[i6].call(thisArg);
|
|
@@ -571588,8 +571852,8 @@ var init_ScreenRecorder = __esm(() => {
|
|
|
571588
571852
|
init_util6();
|
|
571589
571853
|
init_decorators();
|
|
571590
571854
|
init_disposable();
|
|
571591
|
-
|
|
571592
|
-
debugFfmpeg =
|
|
571855
|
+
import_debug181 = __toESM(require_src(), 1);
|
|
571856
|
+
debugFfmpeg = import_debug181.default("puppeteer:ffmpeg");
|
|
571593
571857
|
ScreenRecorder = (() => {
|
|
571594
571858
|
let _classSuper = PassThrough4;
|
|
571595
571859
|
let _instanceExtraInitializers = [];
|
|
@@ -572019,7 +572283,7 @@ var WEB_BROWSER_NAVIGATE_TOOL_NAME = "navigate", WEB_BROWSER_GET_PAGE_TEXT_TOOL_
|
|
|
572019
572283
|
- browser_batch cannot be nested (a batch action whose name is browser_batch is rejected).
|
|
572020
572284
|
- Prefer browser_batch to execute multiple actions in one call \u2014 it is significantly faster. Batch your next sequence of clicks, types, navigations, and screenshots together.
|
|
572021
572285
|
- Read-only iff every sub-action is read-only. A batch containing navigate (state-mutating) is NOT auto-allowed in plan mode; a batch of only get_page_text/screenshot IS auto-allowed.`;
|
|
572022
|
-
var
|
|
572286
|
+
var init_prompt18 = __esm(() => {
|
|
572023
572287
|
READONLY_SUBACTIONS = new Set([
|
|
572024
572288
|
"get_page_text",
|
|
572025
572289
|
"screenshot"
|
|
@@ -572067,7 +572331,7 @@ var init_WebBrowserTool = __esm(() => {
|
|
|
572067
572331
|
init_preapproved();
|
|
572068
572332
|
init_actions();
|
|
572069
572333
|
init_browser2();
|
|
572070
|
-
|
|
572334
|
+
init_prompt18();
|
|
572071
572335
|
navigateInputSchema = exports_external.strictObject({
|
|
572072
572336
|
url: exports_external.string().describe('The URL to navigate to, or "forward"/"back" to traverse browser history. Bare hostnames are upgraded to https://.'),
|
|
572073
572337
|
tabId: exports_external.number().optional().describe("Ignored in OCC (single shared page).")
|
|
@@ -574407,7 +574671,7 @@ var init_WebSearchTool = __esm(() => {
|
|
|
574407
574671
|
init_messages3();
|
|
574408
574672
|
init_model();
|
|
574409
574673
|
init_slowOperations();
|
|
574410
|
-
|
|
574674
|
+
init_prompt7();
|
|
574411
574675
|
init_UI14();
|
|
574412
574676
|
inputSchema21 = lazySchema(() => exports_external.strictObject({
|
|
574413
574677
|
query: exports_external.string().min(2).describe("The search query to use"),
|
|
@@ -574694,7 +574958,7 @@ var init_inProcessTeammateHelpers = __esm(() => {
|
|
|
574694
574958
|
|
|
574695
574959
|
// src/tools/ExitPlanModeTool/prompt.ts
|
|
574696
574960
|
var ASK_USER_QUESTION_TOOL_NAME2 = "AskUserQuestion", EXIT_PLAN_MODE_V2_TOOL_PROMPT;
|
|
574697
|
-
var
|
|
574961
|
+
var init_prompt19 = __esm(() => {
|
|
574698
574962
|
EXIT_PLAN_MODE_V2_TOOL_PROMPT = `Use this tool when you are in plan mode and have finished writing your plan to the plan file and are ready for user approval.
|
|
574699
574963
|
|
|
574700
574964
|
## How This Tool Works
|
|
@@ -574934,7 +575198,7 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
574934
575198
|
init_teammate();
|
|
574935
575199
|
init_teammateMailbox();
|
|
574936
575200
|
init_constants3();
|
|
574937
|
-
|
|
575201
|
+
init_prompt19();
|
|
574938
575202
|
init_UI15();
|
|
574939
575203
|
autoModeStateModule = feature("TRANSCRIPT_CLASSIFIER") ? __toCommonJS(exports_autoModeState) : null;
|
|
574940
575204
|
permissionSetupModule = feature("TRANSCRIPT_CLASSIFIER") ? (init_permissionSetup(), __toCommonJS(exports_permissionSetup)) : null;
|
|
@@ -575367,7 +575631,7 @@ var init_AskUserQuestionTool = __esm(() => {
|
|
|
575367
575631
|
init_v4();
|
|
575368
575632
|
init_ink2();
|
|
575369
575633
|
init_Tool();
|
|
575370
|
-
|
|
575634
|
+
init_prompt9();
|
|
575371
575635
|
import_compiler_runtime117 = __toESM(require_compiler_runtime(), 1);
|
|
575372
575636
|
jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
|
|
575373
575637
|
questionOptionSchema = lazySchema(() => exports_external.object({
|
|
@@ -578423,9 +578687,9 @@ function getEnterPlanModeToolPrompt() {
|
|
|
578423
578687
|
return process.env.USER_TYPE === "ant" ? getEnterPlanModeToolPromptAnt() : getEnterPlanModeToolPromptExternal();
|
|
578424
578688
|
}
|
|
578425
578689
|
var WHAT_HAPPENS_SECTION;
|
|
578426
|
-
var
|
|
578690
|
+
var init_prompt20 = __esm(() => {
|
|
578427
578691
|
init_planModeV2();
|
|
578428
|
-
|
|
578692
|
+
init_prompt9();
|
|
578429
578693
|
WHAT_HAPPENS_SECTION = `## What Happens in Plan Mode
|
|
578430
578694
|
|
|
578431
578695
|
In plan mode, you'll:
|
|
@@ -578503,7 +578767,7 @@ var init_EnterPlanModeTool = __esm(() => {
|
|
|
578503
578767
|
init_PermissionUpdate();
|
|
578504
578768
|
init_permissionSetup();
|
|
578505
578769
|
init_planModeV2();
|
|
578506
|
-
|
|
578770
|
+
init_prompt20();
|
|
578507
578771
|
init_UI20();
|
|
578508
578772
|
inputSchema29 = lazySchema(() => exports_external.strictObject({}));
|
|
578509
578773
|
outputSchema26 = lazySchema(() => exports_external.object({
|
|
@@ -580169,7 +580433,7 @@ ${lines2.join(`
|
|
|
580169
580433
|
}
|
|
580170
580434
|
}
|
|
580171
580435
|
var DESCRIPTION13 = "Get or set Claude Code configuration settings.";
|
|
580172
|
-
var
|
|
580436
|
+
var init_prompt21 = __esm(() => {
|
|
580173
580437
|
init_featureFlags();
|
|
580174
580438
|
init_modelOptions();
|
|
580175
580439
|
init_voiceModeEnabled();
|
|
@@ -580992,7 +581256,7 @@ var init_ConfigTool = __esm(() => {
|
|
|
580992
581256
|
init_log3();
|
|
580993
581257
|
init_settings2();
|
|
580994
581258
|
init_slowOperations();
|
|
580995
|
-
|
|
581259
|
+
init_prompt21();
|
|
580996
581260
|
init_supportedSettings();
|
|
580997
581261
|
init_UI23();
|
|
580998
581262
|
inputSchema32 = lazySchema(() => exports_external.strictObject({
|
|
@@ -581358,7 +581622,7 @@ ${teammateTips}- Check TaskList first to avoid creating duplicate tasks
|
|
|
581358
581622
|
`;
|
|
581359
581623
|
}
|
|
581360
581624
|
var DESCRIPTION14 = "Create a new task in the task list";
|
|
581361
|
-
var
|
|
581625
|
+
var init_prompt22 = __esm(() => {
|
|
581362
581626
|
init_agentSwarmsEnabled();
|
|
581363
581627
|
});
|
|
581364
581628
|
|
|
@@ -581477,8 +581741,9 @@ var init_TaskCreateTool = __esm(() => {
|
|
|
581477
581741
|
init_Tool();
|
|
581478
581742
|
init_hooks5();
|
|
581479
581743
|
init_tasks();
|
|
581744
|
+
init_todoToolsAvailability();
|
|
581480
581745
|
init_teammate();
|
|
581481
|
-
|
|
581746
|
+
init_prompt22();
|
|
581482
581747
|
inputSchema33 = lazySchema(() => exports_external.strictObject({
|
|
581483
581748
|
subject: exports_external.string().describe("A brief title for the task"),
|
|
581484
581749
|
description: exports_external.string().describe("What needs to be done"),
|
|
@@ -581530,7 +581795,7 @@ var init_TaskCreateTool = __esm(() => {
|
|
|
581530
581795
|
},
|
|
581531
581796
|
shouldDefer: true,
|
|
581532
581797
|
isEnabled() {
|
|
581533
|
-
return isTodoV2Enabled();
|
|
581798
|
+
return isTodoV2Enabled() && areTodoToolsAvailable();
|
|
581534
581799
|
},
|
|
581535
581800
|
isConcurrencySafe() {
|
|
581536
581801
|
return true;
|
|
@@ -581625,6 +581890,7 @@ var init_TaskGetTool = __esm(() => {
|
|
|
581625
581890
|
init_v4();
|
|
581626
581891
|
init_Tool();
|
|
581627
581892
|
init_tasks();
|
|
581893
|
+
init_todoToolsAvailability();
|
|
581628
581894
|
inputSchema34 = lazySchema(() => exports_external.strictObject({
|
|
581629
581895
|
taskId: exports_external.string().describe("The ID of the task to retrieve")
|
|
581630
581896
|
}));
|
|
@@ -581659,7 +581925,7 @@ var init_TaskGetTool = __esm(() => {
|
|
|
581659
581925
|
},
|
|
581660
581926
|
shouldDefer: true,
|
|
581661
581927
|
isEnabled() {
|
|
581662
|
-
return isTodoV2Enabled();
|
|
581928
|
+
return isTodoV2Enabled() && areTodoToolsAvailable();
|
|
581663
581929
|
},
|
|
581664
581930
|
isConcurrencySafe() {
|
|
581665
581931
|
return true;
|
|
@@ -581813,6 +582079,7 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
581813
582079
|
init_agentSwarmsEnabled();
|
|
581814
582080
|
init_hooks5();
|
|
581815
582081
|
init_tasks();
|
|
582082
|
+
init_todoToolsAvailability();
|
|
581816
582083
|
init_teammate();
|
|
581817
582084
|
init_teammateMailbox();
|
|
581818
582085
|
init_constants3();
|
|
@@ -581862,7 +582129,7 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
581862
582129
|
},
|
|
581863
582130
|
shouldDefer: true,
|
|
581864
582131
|
isEnabled() {
|
|
581865
|
-
return isTodoV2Enabled();
|
|
582132
|
+
return isTodoV2Enabled() && areTodoToolsAvailable();
|
|
581866
582133
|
},
|
|
581867
582134
|
isConcurrencySafe() {
|
|
581868
582135
|
return true;
|
|
@@ -582112,7 +582379,7 @@ Use TaskGet with a specific task ID to view full details including description a
|
|
|
582112
582379
|
${teammateWorkflow}`;
|
|
582113
582380
|
}
|
|
582114
582381
|
var DESCRIPTION17 = "List all tasks in the task list";
|
|
582115
|
-
var
|
|
582382
|
+
var init_prompt23 = __esm(() => {
|
|
582116
582383
|
init_agentSwarmsEnabled();
|
|
582117
582384
|
});
|
|
582118
582385
|
|
|
@@ -582122,7 +582389,8 @@ var init_TaskListTool = __esm(() => {
|
|
|
582122
582389
|
init_v4();
|
|
582123
582390
|
init_Tool();
|
|
582124
582391
|
init_tasks();
|
|
582125
|
-
|
|
582392
|
+
init_todoToolsAvailability();
|
|
582393
|
+
init_prompt23();
|
|
582126
582394
|
inputSchema36 = lazySchema(() => exports_external.strictObject({}));
|
|
582127
582395
|
outputSchema33 = lazySchema(() => exports_external.object({
|
|
582128
582396
|
tasks: exports_external.array(exports_external.object({
|
|
@@ -582154,7 +582422,7 @@ var init_TaskListTool = __esm(() => {
|
|
|
582154
582422
|
},
|
|
582155
582423
|
shouldDefer: true,
|
|
582156
582424
|
isEnabled() {
|
|
582157
|
-
return isTodoV2Enabled();
|
|
582425
|
+
return isTodoV2Enabled() && areTodoToolsAvailable();
|
|
582158
582426
|
},
|
|
582159
582427
|
isConcurrencySafe() {
|
|
582160
582428
|
return true;
|
|
@@ -583071,7 +583339,7 @@ Approving shutdown terminates your process. Rejecting plan sends the teammate ba
|
|
|
583071
583339
|
`.trim();
|
|
583072
583340
|
}
|
|
583073
583341
|
var DESCRIPTION21 = "Send a message to another agent";
|
|
583074
|
-
var
|
|
583342
|
+
var init_prompt24 = __esm(() => {
|
|
583075
583343
|
init_featureFlags();
|
|
583076
583344
|
});
|
|
583077
583345
|
|
|
@@ -583409,7 +583677,7 @@ var init_SendMessageTool = __esm(() => {
|
|
|
583409
583677
|
init_teammate();
|
|
583410
583678
|
init_teammateMailbox();
|
|
583411
583679
|
init_resumeAgent();
|
|
583412
|
-
|
|
583680
|
+
init_prompt24();
|
|
583413
583681
|
init_UI25();
|
|
583414
583682
|
StructuredMessage = lazySchema(() => exports_external.discriminatedUnion("type", [
|
|
583415
583683
|
exports_external.object({
|
|
@@ -591196,7 +591464,7 @@ ${sleepGuidance ? sleepGuidance + `
|
|
|
591196
591464
|
- Before running destructive operations (e.g., git reset --hard, git push --force, git checkout --), consider whether there is a safer alternative that achieves the same goal. Only use destructive operations when they are truly the best approach.
|
|
591197
591465
|
- Never skip hooks (--no-verify) or bypass signing (--no-gpg-sign, -c commit.gpgsign=false) unless the user has explicitly asked for it. If a hook fails, investigate and fix the underlying issue.`;
|
|
591198
591466
|
}
|
|
591199
|
-
var
|
|
591467
|
+
var init_prompt25 = __esm(() => {
|
|
591200
591468
|
init_envUtils();
|
|
591201
591469
|
init_outputLimits();
|
|
591202
591470
|
init_powershellDetection();
|
|
@@ -591727,7 +591995,7 @@ var init_PowerShellTool = __esm(() => {
|
|
|
591727
591995
|
init_gitOperationTracking();
|
|
591728
591996
|
init_commandSemantics2();
|
|
591729
591997
|
init_powershellPermissions();
|
|
591730
|
-
|
|
591998
|
+
init_prompt25();
|
|
591731
591999
|
init_readOnlyValidation2();
|
|
591732
592000
|
init_UI26();
|
|
591733
592001
|
jsx_runtime158 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -594017,7 +594285,7 @@ var init_toolExecution = __esm(() => {
|
|
|
594017
594285
|
init_prompt3();
|
|
594018
594286
|
init_prompt4();
|
|
594019
594287
|
init_gitOperationTracking();
|
|
594020
|
-
|
|
594288
|
+
init_prompt11();
|
|
594021
594289
|
init_tools2();
|
|
594022
594290
|
init_attachments2();
|
|
594023
594291
|
init_debug();
|
|
@@ -597996,7 +598264,7 @@ var init_query2 = __esm(() => {
|
|
|
597996
598264
|
init_tokens();
|
|
597997
598265
|
init_context();
|
|
597998
598266
|
init_growthbook();
|
|
597999
|
-
|
|
598267
|
+
init_prompt13();
|
|
598000
598268
|
init_postSamplingHooks();
|
|
598001
598269
|
init_hooks5();
|
|
598002
598270
|
init_dumpPrompts();
|
|
@@ -603037,7 +603305,7 @@ var init_attachments2 = __esm(() => {
|
|
|
603037
603305
|
init_commands5();
|
|
603038
603306
|
init_uniqBy();
|
|
603039
603307
|
init_state();
|
|
603040
|
-
|
|
603308
|
+
init_prompt27();
|
|
603041
603309
|
init_context();
|
|
603042
603310
|
init_prompt3();
|
|
603043
603311
|
init_limits();
|
|
@@ -603047,7 +603315,7 @@ var init_attachments2 = __esm(() => {
|
|
|
603047
603315
|
init_file();
|
|
603048
603316
|
init_loadAgentsDir();
|
|
603049
603317
|
init_constants3();
|
|
603050
|
-
|
|
603318
|
+
init_prompt12();
|
|
603051
603319
|
init_permissions2();
|
|
603052
603320
|
init_auth6();
|
|
603053
603321
|
init_mcpStringUtils();
|
|
@@ -603463,7 +603731,7 @@ var proactiveModule3, NO_TOOLS_PREAMBLE = `CRITICAL: Respond with TEXT ONLY. Do
|
|
|
603463
603731
|
- Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.
|
|
603464
603732
|
- Note any security-relevant instructions or constraints the user stated (e.g., sensitive files or data to avoid, operations that must not be performed, credential or secret handling rules). These MUST be preserved verbatim in the summary so they continue to apply after compaction.
|
|
603465
603733
|
2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.`, BASE_COMPACT_PROMPT, PARTIAL_COMPACT_PROMPT, PARTIAL_COMPACT_UP_TO_PROMPT, NO_TOOLS_TRAILER;
|
|
603466
|
-
var
|
|
603734
|
+
var init_prompt26 = __esm(() => {
|
|
603467
603735
|
init_featureFlags();
|
|
603468
603736
|
proactiveModule3 = feature("PROACTIVE") || feature("KAIROS") ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
|
|
603469
603737
|
BASE_COMPACT_PROMPT = `Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions.
|
|
@@ -604581,7 +604849,7 @@ var init_compact = __esm(() => {
|
|
|
604581
604849
|
init_withRetry();
|
|
604582
604850
|
init_internalLogging();
|
|
604583
604851
|
init_tokenEstimation();
|
|
604584
|
-
|
|
604852
|
+
init_prompt26();
|
|
604585
604853
|
sessionTranscriptModule2 = feature("KAIROS") ? (init_sessionTranscript(), __toCommonJS(exports_sessionTranscript)) : null;
|
|
604586
604854
|
});
|
|
604587
604855
|
|
|
@@ -605137,7 +605405,7 @@ var init_sessionMemoryCompact = __esm(() => {
|
|
|
605137
605405
|
init_sessionMemoryUtils();
|
|
605138
605406
|
init_compact();
|
|
605139
605407
|
init_microCompact();
|
|
605140
|
-
|
|
605408
|
+
init_prompt26();
|
|
605141
605409
|
DEFAULT_SM_COMPACT_CONFIG = {
|
|
605142
605410
|
minTokens: 1e4,
|
|
605143
605411
|
minTextBlockMessages: 5,
|
|
@@ -605426,7 +605694,7 @@ async function countBuiltInToolTokens(tools, getToolPermissionContext, agentInfo
|
|
|
605426
605694
|
};
|
|
605427
605695
|
}
|
|
605428
605696
|
const { isToolSearchEnabled: isToolSearchEnabled2 } = await Promise.resolve().then(() => (init_toolSearch(), exports_toolSearch));
|
|
605429
|
-
const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (
|
|
605697
|
+
const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (init_prompt11(), exports_prompt4));
|
|
605430
605698
|
const isDeferred = await isToolSearchEnabled2(model ?? "", tools, getToolPermissionContext, agentInfo?.activeAgents ?? [], "analyzeBuiltIn");
|
|
605431
605699
|
const alwaysLoadedTools = builtInTools.filter((t4) => !isDeferredTool2(t4));
|
|
605432
605700
|
const deferredBuiltinTools = builtInTools.filter((t4) => isDeferredTool2(t4));
|
|
@@ -605561,7 +605829,7 @@ async function countMcpToolTokens(tools, getToolPermissionContext, agentInfo, mo
|
|
|
605561
605829
|
const estimateTotal = estimates.reduce((s4, e4) => s4 + e4, 0) || 1;
|
|
605562
605830
|
const mcpToolTokensByTool = estimates.map((e4) => Math.round(e4 / estimateTotal * totalTokens));
|
|
605563
605831
|
const { isToolSearchEnabled: isToolSearchEnabled2 } = await Promise.resolve().then(() => (init_toolSearch(), exports_toolSearch));
|
|
605564
|
-
const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (
|
|
605832
|
+
const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (init_prompt11(), exports_prompt4));
|
|
605565
605833
|
const isDeferred = await isToolSearchEnabled2(model, tools, getToolPermissionContext, agentInfo?.activeAgents ?? [], "analyzeMcp");
|
|
605566
605834
|
const loadedMcpToolNames = new Set;
|
|
605567
605835
|
if (isDeferred && messages) {
|
|
@@ -605997,7 +606265,7 @@ var init_analyzeContext = __esm(() => {
|
|
|
605997
606265
|
init_tokenEstimation();
|
|
605998
606266
|
init_loadSkillsDir();
|
|
605999
606267
|
init_Tool();
|
|
606000
|
-
|
|
606268
|
+
init_prompt27();
|
|
606001
606269
|
init_api4();
|
|
606002
606270
|
init_claudemd();
|
|
606003
606271
|
init_context();
|
|
@@ -606317,7 +606585,7 @@ var init_toolSearch = __esm(() => {
|
|
|
606317
606585
|
init_growthbook();
|
|
606318
606586
|
init_analytics();
|
|
606319
606587
|
init_Tool();
|
|
606320
|
-
|
|
606588
|
+
init_prompt11();
|
|
606321
606589
|
init_analyzeContext();
|
|
606322
606590
|
init_betas2();
|
|
606323
606591
|
init_context();
|
|
@@ -606890,40 +607158,56 @@ function substituteArguments(content, args, appendIfNoPlaceholder = true, argume
|
|
|
606890
607158
|
if (args === undefined || args === null) {
|
|
606891
607159
|
return content;
|
|
606892
607160
|
}
|
|
607161
|
+
let work = content.replaceAll(SHIELDED_DOLLAR, SENTINEL_REPLACEMENT).replaceAll(VALUE_BOUNDARY, SENTINEL_REPLACEMENT);
|
|
607162
|
+
const insertValue = (value) => {
|
|
607163
|
+
const sanitized = (value ?? "").replaceAll(SHIELDED_DOLLAR, SENTINEL_REPLACEMENT).replaceAll(VALUE_BOUNDARY, SENTINEL_REPLACEMENT);
|
|
607164
|
+
return VALUE_BOUNDARY + sanitized.replaceAll("$", SHIELDED_DOLLAR) + VALUE_BOUNDARY;
|
|
607165
|
+
};
|
|
606893
607166
|
const parsedArgs = parseArguments2(args);
|
|
606894
|
-
const
|
|
606895
|
-
|
|
606896
|
-
|
|
606897
|
-
|
|
606898
|
-
|
|
606899
|
-
|
|
606900
|
-
|
|
606901
|
-
|
|
607167
|
+
const namedArgs = argumentNames.map((name3, index2) => ({ name: name3, index: index2 })).filter((entry) => Boolean(entry.name)).sort((left2, right2) => right2.name.length - left2.name.length);
|
|
607168
|
+
const markerAlternation = [
|
|
607169
|
+
"\\d",
|
|
607170
|
+
"ARGUMENTS",
|
|
607171
|
+
...namedArgs.map(({ name: name3 }) => `${escapeRegExp(name3)}(?![\\[\\w])`)
|
|
607172
|
+
].join("|");
|
|
607173
|
+
work = work.replace(new RegExp(`(?<!\\\\)\\\\\\$(?=${markerAlternation})`, "g"), SHIELDED_DOLLAR);
|
|
607174
|
+
let didSubstitute = false;
|
|
607175
|
+
for (const { name: name3, index: index2 } of namedArgs) {
|
|
607176
|
+
work = work.replace(new RegExp(`\\$${escapeRegExp(name3)}(?![\\[\\w])`, "g"), () => {
|
|
607177
|
+
didSubstitute = true;
|
|
607178
|
+
return insertValue(parsedArgs[index2]);
|
|
607179
|
+
});
|
|
606902
607180
|
}
|
|
606903
607181
|
work = work.replace(/\$ARGUMENTS\[(\d+)\]/g, (match, indexStr) => {
|
|
606904
607182
|
const index2 = parseInt(indexStr, 10);
|
|
606905
607183
|
if (parsedArgs[index2] === undefined) {
|
|
606906
|
-
return
|
|
607184
|
+
return SHIELDED_DOLLAR + match.slice(1);
|
|
606907
607185
|
}
|
|
606908
|
-
|
|
607186
|
+
didSubstitute = true;
|
|
607187
|
+
return insertValue(parsedArgs[index2]);
|
|
606909
607188
|
});
|
|
606910
607189
|
work = work.replace(/\$(\d+)(?!\w)/g, (match, indexStr) => {
|
|
606911
607190
|
const index2 = parseInt(indexStr, 10);
|
|
606912
607191
|
if (parsedArgs[index2] === undefined) {
|
|
606913
607192
|
return match;
|
|
606914
607193
|
}
|
|
606915
|
-
|
|
607194
|
+
didSubstitute = true;
|
|
607195
|
+
return insertValue(parsedArgs[index2]);
|
|
606916
607196
|
});
|
|
606917
|
-
work = work.replaceAll("$ARGUMENTS",
|
|
606918
|
-
|
|
607197
|
+
work = work.replaceAll("$ARGUMENTS", () => {
|
|
607198
|
+
didSubstitute = true;
|
|
607199
|
+
return insertValue(args);
|
|
607200
|
+
});
|
|
607201
|
+
if (!didSubstitute && appendIfNoPlaceholder && args) {
|
|
606919
607202
|
work = work + `
|
|
606920
|
-
|
|
606921
|
-
ARGUMENTS: ${args}`;
|
|
607203
|
+
ARGUMENTS: ${insertValue(args)}`;
|
|
606922
607204
|
}
|
|
606923
|
-
return work.replaceAll(
|
|
607205
|
+
return work.replaceAll(SHIELDED_DOLLAR, "$").replaceAll(VALUE_BOUNDARY, "");
|
|
606924
607206
|
}
|
|
607207
|
+
var SHIELDED_DOLLAR = "\uFFFF", VALUE_BOUNDARY = "\uFFFE", SENTINEL_REPLACEMENT = "\uFFFD";
|
|
606925
607208
|
var init_argumentSubstitution = __esm(() => {
|
|
606926
607209
|
init_shellQuote();
|
|
607210
|
+
init_stringUtils();
|
|
606927
607211
|
});
|
|
606928
607212
|
|
|
606929
607213
|
// src/utils/promptShellExecution.ts
|
|
@@ -607839,7 +608123,7 @@ async function getSkillInfo(cwd2) {
|
|
|
607839
608123
|
}
|
|
607840
608124
|
}
|
|
607841
608125
|
var SKILL_BUDGET_CONTEXT_PERCENT = 0.01, CHARS_PER_TOKEN2 = 4, DEFAULT_CONTEXT_CHARS = 200000, DEFAULT_CHAR_BUDGET, MAX_LISTING_DESC_CHARS = 1536, MIN_DESC_LENGTH = 20, getPrompt3;
|
|
607842
|
-
var
|
|
608126
|
+
var init_prompt27 = __esm(() => {
|
|
607843
608127
|
init_lodash();
|
|
607844
608128
|
init_commands5();
|
|
607845
608129
|
init_loadSkillsDir();
|
|
@@ -608694,7 +608978,7 @@ var init_cacheUtils = __esm(() => {
|
|
|
608694
608978
|
init_commands5();
|
|
608695
608979
|
init_outputStyles();
|
|
608696
608980
|
init_loadAgentsDir();
|
|
608697
|
-
|
|
608981
|
+
init_prompt27();
|
|
608698
608982
|
init_attachments2();
|
|
608699
608983
|
init_debug();
|
|
608700
608984
|
init_errors();
|
|
@@ -616441,7 +616725,7 @@ var init_messages3 = __esm(() => {
|
|
|
616441
616725
|
init_planAgent();
|
|
616442
616726
|
init_builtInAgents();
|
|
616443
616727
|
init_constants3();
|
|
616444
|
-
|
|
616728
|
+
init_prompt9();
|
|
616445
616729
|
init_BashTool();
|
|
616446
616730
|
init_ExitPlanModeV2Tool();
|
|
616447
616731
|
init_FileEditTool();
|
|
@@ -630654,6 +630938,7 @@ var init_apiMicrocompact = __esm(() => {
|
|
|
630654
630938
|
init_prompt4();
|
|
630655
630939
|
init_prompt2();
|
|
630656
630940
|
init_prompt6();
|
|
630941
|
+
init_prompt7();
|
|
630657
630942
|
init_shellToolUtils();
|
|
630658
630943
|
init_envValidation();
|
|
630659
630944
|
init_envUtils();
|
|
@@ -631155,6 +631440,7 @@ async function* queryModel(messages, systemPrompt, thinkingConfig, tools, signal
|
|
|
631155
631440
|
}
|
|
631156
631441
|
const previousRequestId = getPreviousRequestIdFromMessages(messages);
|
|
631157
631442
|
const resolvedModel = getAPIProvider() === "bedrock" && options.model.includes("application-inference-profile") ? await getInferenceProfileBackingModel(options.model) ?? options.model : options.model;
|
|
631443
|
+
signalUnrecognizedModel(options.model, options.querySource);
|
|
631158
631444
|
queryCheckpoint("query_tool_schema_build_start");
|
|
631159
631445
|
const isAgenticQuery = options.querySource.startsWith("repl_main_thread") || options.querySource.startsWith("agent:") || options.querySource === "sdk" || options.querySource === "hook_agent" || options.querySource === "verification_agent";
|
|
631160
631446
|
const betas = getMergedBetas(options.model, { isAgenticQuery });
|
|
@@ -631378,10 +631664,10 @@ ${deferredToolList}
|
|
|
631378
631664
|
let start = Date.now();
|
|
631379
631665
|
let attemptNumber = 0;
|
|
631380
631666
|
const attemptStartTimes = [];
|
|
631381
|
-
let stream6
|
|
631382
|
-
let streamRequestId
|
|
631383
|
-
let clientRequestId
|
|
631384
|
-
let streamResponse
|
|
631667
|
+
let stream6;
|
|
631668
|
+
let streamRequestId;
|
|
631669
|
+
let clientRequestId;
|
|
631670
|
+
let streamResponse;
|
|
631385
631671
|
function releaseStreamResources() {
|
|
631386
631672
|
cleanupStream(stream6);
|
|
631387
631673
|
stream6 = undefined;
|
|
@@ -631416,7 +631702,7 @@ ${deferredToolList}
|
|
|
631416
631702
|
}
|
|
631417
631703
|
const maxOutputTokens2 = retryContext?.maxTokensOverride || options.maxOutputTokensOverride || getMaxOutputTokensForModel(options.model);
|
|
631418
631704
|
const hasThinking = thinkingConfig.type !== "disabled" && !isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_THINKING);
|
|
631419
|
-
let thinking
|
|
631705
|
+
let thinking;
|
|
631420
631706
|
if (hasThinking && modelSupportsThinking(options.model)) {
|
|
631421
631707
|
if (!isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING) && modelSupportsAdaptiveThinking(options.model)) {
|
|
631422
631708
|
thinking = {
|
|
@@ -631508,7 +631794,7 @@ ${deferredToolList}
|
|
|
631508
631794
|
}
|
|
631509
631795
|
const newMessages = [];
|
|
631510
631796
|
let ttftMs = 0;
|
|
631511
|
-
let partialMessage
|
|
631797
|
+
let partialMessage;
|
|
631512
631798
|
const contentBlocks = [];
|
|
631513
631799
|
let usage2 = EMPTY_USAGE;
|
|
631514
631800
|
let costUSD = 0;
|
|
@@ -631516,8 +631802,8 @@ ${deferredToolList}
|
|
|
631516
631802
|
let didFallBackToNonStreaming = false;
|
|
631517
631803
|
let fallbackMessage;
|
|
631518
631804
|
let maxOutputTokens = 0;
|
|
631519
|
-
let responseHeaders
|
|
631520
|
-
let research
|
|
631805
|
+
let responseHeaders;
|
|
631806
|
+
let research;
|
|
631521
631807
|
let isFastModeRequest = isFastMode;
|
|
631522
631808
|
let isAdvisorInProgress = false;
|
|
631523
631809
|
try {
|
|
@@ -632565,11 +632851,12 @@ var init_claude = __esm(() => {
|
|
|
632565
632851
|
init_toolSearch();
|
|
632566
632852
|
init_apiLimits();
|
|
632567
632853
|
init_betas();
|
|
632568
|
-
|
|
632854
|
+
init_prompt11();
|
|
632569
632855
|
init_envValidation();
|
|
632570
632856
|
init_json();
|
|
632571
632857
|
init_bedrock();
|
|
632572
632858
|
init_model();
|
|
632859
|
+
init_unrecognizedModelSignal();
|
|
632573
632860
|
init_sessionActivity();
|
|
632574
632861
|
init_slowOperations();
|
|
632575
632862
|
init_sessionTracing();
|
|
@@ -633548,7 +633835,7 @@ __export(exports_prompt7, {
|
|
|
633548
633835
|
TERMINAL_CAPTURE_TOOL_NAME: () => TERMINAL_CAPTURE_TOOL_NAME
|
|
633549
633836
|
});
|
|
633550
633837
|
var TERMINAL_CAPTURE_TOOL_NAME = "";
|
|
633551
|
-
var
|
|
633838
|
+
var init_prompt28 = () => {};
|
|
633552
633839
|
|
|
633553
633840
|
// src/tools/VerifyPlanExecutionTool/constants.ts
|
|
633554
633841
|
var exports_constants2 = {};
|
|
@@ -633601,13 +633888,13 @@ function isAutoModeAllowlistedTool(toolName) {
|
|
|
633601
633888
|
var TERMINAL_CAPTURE_TOOL_NAME2, OVERFLOW_TEST_TOOL_NAME2, VERIFY_PLAN_EXECUTION_TOOL_NAME2, WORKFLOW_TOOL_NAME2, SAFE_YOLO_ALLOWLISTED_TOOLS;
|
|
633602
633889
|
var init_classifierDecision = __esm(() => {
|
|
633603
633890
|
init_featureFlags();
|
|
633604
|
-
|
|
633891
|
+
init_prompt9();
|
|
633605
633892
|
init_prompt3();
|
|
633606
633893
|
init_prompt2();
|
|
633607
|
-
|
|
633608
|
-
|
|
633894
|
+
init_prompt13();
|
|
633895
|
+
init_prompt11();
|
|
633609
633896
|
init_yoloClassifier();
|
|
633610
|
-
TERMINAL_CAPTURE_TOOL_NAME2 = feature("TERMINAL_PANEL") ? (
|
|
633897
|
+
TERMINAL_CAPTURE_TOOL_NAME2 = feature("TERMINAL_PANEL") ? (init_prompt28(), __toCommonJS(exports_prompt7)).TERMINAL_CAPTURE_TOOL_NAME : null;
|
|
633611
633898
|
OVERFLOW_TEST_TOOL_NAME2 = feature("OVERFLOW_TEST_TOOL") ? (init_OverflowTestTool(), __toCommonJS(exports_OverflowTestTool)).OVERFLOW_TEST_TOOL_NAME : null;
|
|
633612
633899
|
VERIFY_PLAN_EXECUTION_TOOL_NAME2 = process.env.USER_TYPE === "ant" ? (init_constants11(), __toCommonJS(exports_constants2)).VERIFY_PLAN_EXECUTION_TOOL_NAME : null;
|
|
633613
633900
|
WORKFLOW_TOOL_NAME2 = feature("WORKFLOW_SCRIPTS") ? __toCommonJS(exports_constants).WORKFLOW_TOOL_NAME : null;
|
|
@@ -644314,7 +644601,7 @@ function clearSessionCaches(preservedAgentIds = new Set) {
|
|
|
644314
644601
|
Promise.resolve().then(() => (init_utils12(), exports_utils2)).then(({ clearWebFetchCache: clearWebFetchCache2 }) => clearWebFetchCache2());
|
|
644315
644602
|
Promise.resolve().then(() => (init_ToolSearchTool(), exports_ToolSearchTool)).then(({ clearToolSearchDescriptionCache: clearToolSearchDescriptionCache2 }) => clearToolSearchDescriptionCache2());
|
|
644316
644603
|
Promise.resolve().then(() => (init_loadAgentsDir(), exports_loadAgentsDir)).then(({ clearAgentDefinitionsCache: clearAgentDefinitionsCache2 }) => clearAgentDefinitionsCache2());
|
|
644317
|
-
Promise.resolve().then(() => (
|
|
644604
|
+
Promise.resolve().then(() => (init_prompt27(), exports_prompt6)).then(({ clearPromptCache: clearPromptCache2 }) => clearPromptCache2());
|
|
644318
644605
|
}
|
|
644319
644606
|
var init_caches = __esm(() => {
|
|
644320
644607
|
init_featureFlags();
|
|
@@ -652210,6 +652497,7 @@ var LARGE_TOOL_RESULT_PERCENT = 15, LARGE_TOOL_RESULT_TOKENS = 1e4, READ_BLOAT_P
|
|
|
652210
652497
|
var init_contextSuggestions = __esm(() => {
|
|
652211
652498
|
init_prompt3();
|
|
652212
652499
|
init_prompt2();
|
|
652500
|
+
init_prompt6();
|
|
652213
652501
|
init_file();
|
|
652214
652502
|
init_format();
|
|
652215
652503
|
});
|
|
@@ -653473,7 +653761,7 @@ var init_context_noninteractive = __esm(() => {
|
|
|
653473
653761
|
init_commands5();
|
|
653474
653762
|
init_microCompact();
|
|
653475
653763
|
init_tokenEstimation();
|
|
653476
|
-
|
|
653764
|
+
init_prompt27();
|
|
653477
653765
|
init_analyzeContext();
|
|
653478
653766
|
init_cwd2();
|
|
653479
653767
|
init_format();
|
|
@@ -669235,7 +669523,7 @@ async function loadInstallCountsCache() {
|
|
|
669235
669523
|
return null;
|
|
669236
669524
|
}
|
|
669237
669525
|
const now2 = Date.now();
|
|
669238
|
-
if (now2 - fetchedAt >
|
|
669526
|
+
if (now2 - fetchedAt > CACHE_TTL_MS3) {
|
|
669239
669527
|
logForDebugging("Install counts cache is stale (>24h old)");
|
|
669240
669528
|
return null;
|
|
669241
669529
|
}
|
|
@@ -669332,7 +669620,7 @@ function formatInstallCount(count4) {
|
|
|
669332
669620
|
const formatted = m5.toFixed(1);
|
|
669333
669621
|
return formatted.endsWith(".0") ? `${formatted.slice(0, -2)}M` : `${formatted}M`;
|
|
669334
669622
|
}
|
|
669335
|
-
var INSTALL_COUNTS_CACHE_VERSION = 1, INSTALL_COUNTS_CACHE_FILENAME = "install-counts-cache.json", INSTALL_COUNTS_URL = "https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json",
|
|
669623
|
+
var INSTALL_COUNTS_CACHE_VERSION = 1, INSTALL_COUNTS_CACHE_FILENAME = "install-counts-cache.json", INSTALL_COUNTS_URL = "https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json", CACHE_TTL_MS3;
|
|
669336
669624
|
var init_installCounts = __esm(() => {
|
|
669337
669625
|
init_axios2();
|
|
669338
669626
|
init_debug();
|
|
@@ -669342,7 +669630,7 @@ var init_installCounts = __esm(() => {
|
|
|
669342
669630
|
init_slowOperations();
|
|
669343
669631
|
init_fetchTelemetry();
|
|
669344
669632
|
init_pluginDirectories();
|
|
669345
|
-
|
|
669633
|
+
CACHE_TTL_MS3 = 24 * 60 * 60 * 1000;
|
|
669346
669634
|
});
|
|
669347
669635
|
|
|
669348
669636
|
// src/commands/plugin/PluginOptionsDialog.tsx
|
|
@@ -690753,7 +691041,7 @@ var init_Messages = __esm(() => {
|
|
|
690753
691041
|
});
|
|
690754
691042
|
proactiveModule4 = feature("PROACTIVE") || feature("KAIROS") ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
|
|
690755
691043
|
BRIEF_TOOL_NAME6 = feature("KAIROS") || feature("KAIROS_BRIEF") ? (init_prompt(), __toCommonJS(exports_prompt)).BRIEF_TOOL_NAME : null;
|
|
690756
|
-
SEND_USER_FILE_TOOL_NAME4 = feature("KAIROS") ? (
|
|
691044
|
+
SEND_USER_FILE_TOOL_NAME4 = feature("KAIROS") ? (init_prompt8(), __toCommonJS(exports_prompt2)).SEND_USER_FILE_TOOL_NAME : null;
|
|
690757
691045
|
Messages4 = React89.memo(MessagesImpl, (prev, next2) => {
|
|
690758
691046
|
const keys3 = Object.keys(prev);
|
|
690759
691047
|
for (const key4 of keys3) {
|
|
@@ -699111,7 +699399,7 @@ var init_RemoteSessionDetailDialog = __esm(() => {
|
|
|
699111
699399
|
init_ink2();
|
|
699112
699400
|
init_RemoteAgentTask();
|
|
699113
699401
|
init_constants3();
|
|
699114
|
-
|
|
699402
|
+
init_prompt9();
|
|
699115
699403
|
init_browser();
|
|
699116
699404
|
init_errors();
|
|
699117
699405
|
init_format();
|
|
@@ -731612,7 +731900,7 @@ var init_prompts4 = __esm(() => {
|
|
|
731612
731900
|
init_betas2();
|
|
731613
731901
|
init_forkSubagent();
|
|
731614
731902
|
init_systemPromptSections();
|
|
731615
|
-
|
|
731903
|
+
init_prompt13();
|
|
731616
731904
|
init_xml();
|
|
731617
731905
|
init_debug();
|
|
731618
731906
|
init_memdir();
|
|
@@ -760347,40 +760635,6 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
760347
760635
|
import_react225 = __toESM(require_react(), 1);
|
|
760348
760636
|
});
|
|
760349
760637
|
|
|
760350
|
-
// src/utils/oauthLoginExpiry.ts
|
|
760351
|
-
function computeOAuthLoginExpiry(tokens, context8, now2 = Date.now()) {
|
|
760352
|
-
if (!context8.providerIsFirstParty || !context8.isClaudeAISubscriber) {
|
|
760353
|
-
return null;
|
|
760354
|
-
}
|
|
760355
|
-
if (!tokens || typeof tokens.refreshTokenExpiresAt !== "number") {
|
|
760356
|
-
return null;
|
|
760357
|
-
}
|
|
760358
|
-
const refreshTokenExpiresAt = tokens.refreshTokenExpiresAt;
|
|
760359
|
-
if (typeof tokens.expiresAt === "number" && tokens.expiresAt > refreshTokenExpiresAt + LOGIN_EXPIRY_WARN_WINDOW_MS) {
|
|
760360
|
-
return null;
|
|
760361
|
-
}
|
|
760362
|
-
const remaining = refreshTokenExpiresAt - now2;
|
|
760363
|
-
if (remaining > LOGIN_EXPIRY_WARN_WINDOW_MS || remaining <= 0) {
|
|
760364
|
-
return null;
|
|
760365
|
-
}
|
|
760366
|
-
return { daysLeft: Math.ceil(remaining / MS_PER_DAY) };
|
|
760367
|
-
}
|
|
760368
|
-
function getOAuthLoginExpiryInfo() {
|
|
760369
|
-
return computeOAuthLoginExpiry(getClaudeAIOAuthTokens(), {
|
|
760370
|
-
providerIsFirstParty: getAPIProvider() === "firstParty",
|
|
760371
|
-
isClaudeAISubscriber: isClaudeAISubscriber()
|
|
760372
|
-
});
|
|
760373
|
-
}
|
|
760374
|
-
function pluralize2(count4, noun) {
|
|
760375
|
-
return count4 === 1 ? noun : `${noun}s`;
|
|
760376
|
-
}
|
|
760377
|
-
var MS_PER_DAY = 86400000, LOGIN_EXPIRY_WARN_WINDOW_MS;
|
|
760378
|
-
var init_oauthLoginExpiry = __esm(() => {
|
|
760379
|
-
init_providers();
|
|
760380
|
-
init_auth6();
|
|
760381
|
-
LOGIN_EXPIRY_WARN_WINDOW_MS = 3 * MS_PER_DAY;
|
|
760382
|
-
});
|
|
760383
|
-
|
|
760384
760638
|
// src/components/PromptInput/OAuthExpiryNotice.tsx
|
|
760385
760639
|
function OAuthExpiryNotice() {
|
|
760386
760640
|
const { addNotification } = useNotifications();
|
|
@@ -764331,7 +764585,7 @@ var init_commandSuggestions = __esm(() => {
|
|
|
764331
764585
|
// src/utils/suggestions/shellHistoryCompletion.ts
|
|
764332
764586
|
async function getShellHistoryCommands() {
|
|
764333
764587
|
const now2 = Date.now();
|
|
764334
|
-
if (shellHistoryCache && now2 - shellHistoryCacheTimestamp <
|
|
764588
|
+
if (shellHistoryCache && now2 - shellHistoryCacheTimestamp < CACHE_TTL_MS4) {
|
|
764335
764589
|
return shellHistoryCache;
|
|
764336
764590
|
}
|
|
764337
764591
|
const commands7 = [];
|
|
@@ -764392,7 +764646,7 @@ function getShellHistoryCompletionSync(input2) {
|
|
|
764392
764646
|
async function warmShellHistoryCache() {
|
|
764393
764647
|
await getShellHistoryCommands();
|
|
764394
764648
|
}
|
|
764395
|
-
var shellHistoryCache = null, shellHistoryCacheTimestamp = 0,
|
|
764649
|
+
var shellHistoryCache = null, shellHistoryCacheTimestamp = 0, CACHE_TTL_MS4 = 60000;
|
|
764396
764650
|
var init_shellHistoryCompletion = __esm(() => {
|
|
764397
764651
|
init_history();
|
|
764398
764652
|
init_debug();
|
|
@@ -793677,7 +793931,7 @@ var init_tipRegistry = __esm(() => {
|
|
|
793677
793931
|
init_color();
|
|
793678
793932
|
init_OverageCreditUpsell();
|
|
793679
793933
|
init_shortcutFormat();
|
|
793680
|
-
|
|
793934
|
+
init_prompt10();
|
|
793681
793935
|
init_auth6();
|
|
793682
793936
|
init_concurrentSessions();
|
|
793683
793937
|
init_config4();
|
|
@@ -794649,6 +794903,28 @@ var init_previewNeutralizer = __esm(() => {
|
|
|
794649
794903
|
LOOKALIKE_SINGLE_QUOTES_RE = /[\u2018\u2019\u201A\u201B]/g;
|
|
794650
794904
|
});
|
|
794651
794905
|
|
|
794906
|
+
// src/utils/permissionPromptNotify.ts
|
|
794907
|
+
function getToolDisplayName(toolName) {
|
|
794908
|
+
return (toolName.split("__").pop() || toolName).replace(/_/g, " ").replace(/\b\w/g, (char) => char.toUpperCase());
|
|
794909
|
+
}
|
|
794910
|
+
function schedulePermissionPromptNotifyHook(toolDisplayName, delayMs = PERMISSION_PROMPT_NOTIFY_DELAY_MS) {
|
|
794911
|
+
if (process.env.CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS) {
|
|
794912
|
+
return () => {};
|
|
794913
|
+
}
|
|
794914
|
+
const timer2 = setTimeout((displayName) => {
|
|
794915
|
+
executeNotificationHooks({
|
|
794916
|
+
message: `Claude needs your permission to use ${displayName}`,
|
|
794917
|
+
notificationType: "permission_prompt"
|
|
794918
|
+
}).catch(() => {});
|
|
794919
|
+
}, delayMs, toolDisplayName);
|
|
794920
|
+
timer2.unref();
|
|
794921
|
+
return () => clearTimeout(timer2);
|
|
794922
|
+
}
|
|
794923
|
+
var PERMISSION_PROMPT_NOTIFY_DELAY_MS = 6000;
|
|
794924
|
+
var init_permissionPromptNotify = __esm(() => {
|
|
794925
|
+
init_hooks5();
|
|
794926
|
+
});
|
|
794927
|
+
|
|
794652
794928
|
// src/cli/ndjsonSafeStringify.ts
|
|
794653
794929
|
function escapeJsLineTerminators(json2) {
|
|
794654
794930
|
return json2.replace(JS_LINE_TERMINATORS, (c9) => c9 === "\u2028" ? "\\u2028" : "\\u2029");
|
|
@@ -794989,6 +795265,7 @@ class StructuredIO {
|
|
|
794989
795265
|
const requestId = randomUUID62();
|
|
794990
795266
|
const neutralizedRequestInput = neutralizePreviewInput(input2);
|
|
794991
795267
|
onPermissionPrompt?.(buildRequiresActionDetails(tool, neutralizedRequestInput, toolUseID, requestId));
|
|
795268
|
+
const cancelPermissionPromptNotify = schedulePermissionPromptNotifyHook(getToolDisplayName(tool.name));
|
|
794992
795269
|
const sdkPromise = this.sendRequest({
|
|
794993
795270
|
subtype: "can_use_tool",
|
|
794994
795271
|
tool_name: tool.name,
|
|
@@ -794999,6 +795276,7 @@ class StructuredIO {
|
|
|
794999
795276
|
tool_use_id: toolUseID,
|
|
795000
795277
|
agent_id: toolUseContext.agentId
|
|
795001
795278
|
}, outputSchema41(), hookAbortController.signal, requestId).then((result) => ({ source: "sdk", result }));
|
|
795279
|
+
sdkPromise.then(cancelPermissionPromptNotify, cancelPermissionPromptNotify);
|
|
795002
795280
|
const winner = await Promise.race([hookPromise, sdkPromise]);
|
|
795003
795281
|
if (winner.source === "hook") {
|
|
795004
795282
|
if (winner.decision) {
|
|
@@ -795063,14 +795341,19 @@ class StructuredIO {
|
|
|
795063
795341
|
createSandboxAskCallback() {
|
|
795064
795342
|
return async (hostPattern) => {
|
|
795065
795343
|
try {
|
|
795066
|
-
const
|
|
795067
|
-
|
|
795068
|
-
|
|
795069
|
-
|
|
795070
|
-
|
|
795071
|
-
|
|
795072
|
-
|
|
795073
|
-
|
|
795344
|
+
const cancelPermissionPromptNotify = schedulePermissionPromptNotifyHook(getToolDisplayName(SANDBOX_NETWORK_ACCESS_TOOL_NAME));
|
|
795345
|
+
try {
|
|
795346
|
+
const result = await this.sendRequest({
|
|
795347
|
+
subtype: "can_use_tool",
|
|
795348
|
+
tool_name: SANDBOX_NETWORK_ACCESS_TOOL_NAME,
|
|
795349
|
+
input: { host: hostPattern.host },
|
|
795350
|
+
tool_use_id: randomUUID62(),
|
|
795351
|
+
description: `Allow network connection to ${hostPattern.host}?`
|
|
795352
|
+
}, outputSchema41());
|
|
795353
|
+
return result.behavior === "allow";
|
|
795354
|
+
} finally {
|
|
795355
|
+
cancelPermissionPromptNotify();
|
|
795356
|
+
}
|
|
795074
795357
|
} catch {
|
|
795075
795358
|
return false;
|
|
795076
795359
|
}
|
|
@@ -795149,6 +795432,7 @@ var init_structuredIO = __esm(() => {
|
|
|
795149
795432
|
init_slowOperations();
|
|
795150
795433
|
init_v4();
|
|
795151
795434
|
init_hooks5();
|
|
795435
|
+
init_permissionPromptNotify();
|
|
795152
795436
|
init_PermissionUpdate();
|
|
795153
795437
|
init_sessionState();
|
|
795154
795438
|
init_slowOperations();
|
|
@@ -800847,7 +801131,7 @@ var init_useScheduledTasks = __esm(() => {
|
|
|
800847
801131
|
init_AppState();
|
|
800848
801132
|
init_Task();
|
|
800849
801133
|
init_InProcessTeammateTask();
|
|
800850
|
-
|
|
801134
|
+
init_prompt10();
|
|
800851
801135
|
init_cronJitterConfig();
|
|
800852
801136
|
init_cronScheduler();
|
|
800853
801137
|
init_cronTasks();
|
|
@@ -804596,7 +804880,8 @@ var init_REPL = __esm(() => {
|
|
|
804596
804880
|
init_ExitPlanModePermissionRequest();
|
|
804597
804881
|
init_permissionSetup();
|
|
804598
804882
|
init_filesystem();
|
|
804599
|
-
|
|
804883
|
+
init_prompt6();
|
|
804884
|
+
init_prompt13();
|
|
804600
804885
|
init_bashPermissions();
|
|
804601
804886
|
init_config4();
|
|
804602
804887
|
init_billing();
|
|
@@ -810279,7 +810564,7 @@ Examples:
|
|
|
810279
810564
|
/batch add type annotations to all untyped function parameters`;
|
|
810280
810565
|
var init_batch = __esm(() => {
|
|
810281
810566
|
init_constants3();
|
|
810282
|
-
|
|
810567
|
+
init_prompt9();
|
|
810283
810568
|
init_git();
|
|
810284
810569
|
init_bundledSkills();
|
|
810285
810570
|
WORKER_INSTRUCTIONS = `After you finish implementing the change:
|
|
@@ -812630,7 +812915,7 @@ function registerLoopSkill() {
|
|
|
812630
812915
|
}
|
|
812631
812916
|
var DEFAULT_INTERVAL = "10m", USAGE_MESSAGE;
|
|
812632
812917
|
var init_loop = __esm(() => {
|
|
812633
|
-
|
|
812918
|
+
init_prompt10();
|
|
812634
812919
|
init_bundledSkills();
|
|
812635
812920
|
USAGE_MESSAGE = `Usage: /loop [interval] <prompt>
|
|
812636
812921
|
|
|
@@ -812996,7 +813281,7 @@ var BASE58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", BASE_
|
|
|
812996
813281
|
var init_scheduleRemoteAgents = __esm(() => {
|
|
812997
813282
|
init_growthbook();
|
|
812998
813283
|
init_policyLimits();
|
|
812999
|
-
|
|
813284
|
+
init_prompt9();
|
|
813000
813285
|
init_auth6();
|
|
813001
813286
|
init_preconditions();
|
|
813002
813287
|
init_debug();
|
|
@@ -813609,7 +813894,7 @@ async function logSkillsLoaded(cwd2, contextWindowTokens) {
|
|
|
813609
813894
|
var init_skillLoadedEvent = __esm(() => {
|
|
813610
813895
|
init_commands5();
|
|
813611
813896
|
init_analytics();
|
|
813612
|
-
|
|
813897
|
+
init_prompt27();
|
|
813613
813898
|
});
|
|
813614
813899
|
|
|
813615
813900
|
// src/cli/exit.ts
|
|
@@ -815740,7 +816025,7 @@ var init_streamlinedTransform = __esm(() => {
|
|
|
815740
816025
|
init_prompt3();
|
|
815741
816026
|
init_prompt4();
|
|
815742
816027
|
init_prompt2();
|
|
815743
|
-
|
|
816028
|
+
init_prompt7();
|
|
815744
816029
|
init_messages3();
|
|
815745
816030
|
init_shellToolUtils();
|
|
815746
816031
|
init_stringUtils();
|
|
@@ -820298,7 +820583,7 @@ var init_print = __esm(() => {
|
|
|
820298
820583
|
proactiveModule9 = feature("PROACTIVE") || feature("KAIROS") ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
|
|
820299
820584
|
cronSchedulerModule = feature("AGENT_TRIGGERS") ? (init_cronScheduler(), __toCommonJS(exports_cronScheduler)) : null;
|
|
820300
820585
|
cronJitterConfigModule = feature("AGENT_TRIGGERS") ? (init_cronJitterConfig(), __toCommonJS(exports_cronJitterConfig)) : null;
|
|
820301
|
-
cronGate = feature("AGENT_TRIGGERS") ? (
|
|
820586
|
+
cronGate = feature("AGENT_TRIGGERS") ? (init_prompt10(), __toCommonJS(exports_prompt3)) : null;
|
|
820302
820587
|
extractMemoriesModule3 = feature("EXTRACT_MEMORIES") ? (init_extractMemories(), __toCommonJS(exports_extractMemories)) : null;
|
|
820303
820588
|
receivedMessageUuids = new Set;
|
|
820304
820589
|
receivedMessageUuidsOrder = [];
|