@cnwenf/occ 2.1.301 → 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.
Files changed (2) hide show
  1. package/dist/cli.js +380 -209
  2. 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.301","BINARY_NAME":"occ","BUILD_TIME":"2026-08-14T18:51:25.355Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
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;
@@ -201253,6 +201253,70 @@ var init_dist8 = __esm(() => {
201253
201253
  init_platform4();
201254
201254
  });
201255
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
+
201256
201320
  // src/tools/WebFetchTool/prompt.ts
201257
201321
  function makeSecondaryModelPrompt(markdownContent, prompt, isPreapprovedDomain) {
201258
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:
@@ -201271,7 +201335,10 @@ ${prompt}
201271
201335
  ${guidelines}
201272
201336
  `;
201273
201337
  }
201274
- 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 = `
201275
201342
  - Fetches content from a specified URL and processes it using an AI model
201276
201343
  - Takes a URL and a prompt as input
201277
201344
  - Fetches the URL content, converts HTML to markdown
@@ -201286,10 +201353,11 @@ Usage notes:
201286
201353
  - The prompt should describe what information you want to extract from the page
201287
201354
  - This tool is read-only and does not modify any files
201288
201355
  - Results may be summarized if the content is very large
201289
- - Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
201356
+ - Includes a self-cleaning cache (entries expire after ${getWebFetchCacheTtlDescription()}) for faster responses when repeatedly accessing the same URL
201290
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.
201291
201358
  - For GitHub URLs, prefer using the gh CLI via Bash instead (e.g., gh pr view, gh issue view, gh api).
201292
201359
  `;
201360
+ });
201293
201361
 
201294
201362
  // src/utils/sandbox/sandbox-adapter.ts
201295
201363
  var exports_sandbox_adapter = {};
@@ -201792,6 +201860,7 @@ var init_sandbox_adapter = __esm(() => {
201792
201860
  init_managedPath();
201793
201861
  init_settings2();
201794
201862
  init_prompt3();
201863
+ init_prompt6();
201795
201864
  init_errors();
201796
201865
  init_filesystem();
201797
201866
  init_ripgrep();
@@ -231338,7 +231407,7 @@ IMPORTANT - Use the correct year in search queries:
231338
231407
  `;
231339
231408
  }
231340
231409
  var WEB_SEARCH_TOOL_NAME = "WebSearch";
231341
- var init_prompt6 = __esm(() => {
231410
+ var init_prompt7 = __esm(() => {
231342
231411
  init_common2();
231343
231412
  });
231344
231413
 
@@ -231414,6 +231483,7 @@ var init_claudeCodeGuideAgent = __esm(() => {
231414
231483
  init_prompt3();
231415
231484
  init_prompt2();
231416
231485
  init_prompt6();
231486
+ init_prompt7();
231417
231487
  init_auth6();
231418
231488
  init_embeddedTools();
231419
231489
  init_settings2();
@@ -231824,6 +231894,7 @@ var init_statuslineSetup = __esm(() => {
231824
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;
231825
231895
  var init_verificationAgent = __esm(() => {
231826
231896
  init_prompt4();
231897
+ init_prompt6();
231827
231898
  init_constants3();
231828
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.
231829
231900
 
@@ -232504,14 +232575,14 @@ __export(exports_prompt2, {
232504
232575
  SEND_USER_FILE_TOOL_NAME: () => SEND_USER_FILE_TOOL_NAME
232505
232576
  });
232506
232577
  var SEND_USER_FILE_TOOL_NAME = "";
232507
- var init_prompt7 = () => {};
232578
+ var init_prompt8 = () => {};
232508
232579
 
232509
232580
  // src/tools/EnterPlanModeTool/constants.ts
232510
232581
  var ENTER_PLAN_MODE_TOOL_NAME = "EnterPlanMode", PLAN_MODE_AUTO_BASH_HANDLING_ENABLED = true;
232511
232582
 
232512
232583
  // src/tools/AskUserQuestionTool/prompt.ts
232513
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;
232514
- var init_prompt8 = __esm(() => {
232585
+ var init_prompt9 = __esm(() => {
232515
232586
  PREVIEW_FEATURE_PROMPT = {
232516
232587
  markdown: `
232517
232588
  Preview feature:
@@ -239664,7 +239735,7 @@ function buildCronListPrompt(durableEnabled) {
239664
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.`;
239665
239736
  }
239666
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";
239667
- var init_prompt9 = __esm(() => {
239738
+ var init_prompt10 = __esm(() => {
239668
239739
  init_featureFlags();
239669
239740
  init_growthbook();
239670
239741
  init_cronTasks();
@@ -239678,15 +239749,16 @@ var ALL_AGENT_DISALLOWED_TOOLS, CUSTOM_AGENT_DISALLOWED_TOOLS, ASYNC_AGENT_ALLOW
239678
239749
  var init_tools = __esm(() => {
239679
239750
  init_featureFlags();
239680
239751
  init_constants3();
239681
- init_prompt8();
239752
+ init_prompt9();
239682
239753
  init_prompt3();
239683
- init_prompt6();
239754
+ init_prompt7();
239684
239755
  init_prompt2();
239756
+ init_prompt6();
239685
239757
  init_shellToolUtils();
239686
239758
  init_prompt4();
239687
- init_prompt10();
239759
+ init_prompt11();
239688
239760
  init_SyntheticOutputTool();
239689
- init_prompt9();
239761
+ init_prompt10();
239690
239762
  ALL_AGENT_DISALLOWED_TOOLS = new Set([
239691
239763
  TASK_OUTPUT_TOOL_NAME,
239692
239764
  EXIT_PLAN_MODE_V2_TOOL_NAME,
@@ -240241,13 +240313,13 @@ Query forms:
240241
240313
  - "select:Read,Edit,Grep" \u2014 fetch these exact tools by name
240242
240314
  - "notebook jupyter" \u2014 keyword search, up to max_results best matches
240243
240315
  - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;
240244
- var init_prompt10 = __esm(() => {
240316
+ var init_prompt11 = __esm(() => {
240245
240317
  init_featureFlags();
240246
240318
  init_state();
240247
240319
  init_growthbook();
240248
240320
  init_constants3();
240249
240321
  BRIEF_TOOL_NAME3 = feature("KAIROS") || feature("KAIROS_BRIEF") ? (init_prompt(), __toCommonJS(exports_prompt)).BRIEF_TOOL_NAME : null;
240250
- SEND_USER_FILE_TOOL_NAME2 = feature("KAIROS") ? (init_prompt7(), __toCommonJS(exports_prompt2)).SEND_USER_FILE_TOOL_NAME : null;
240322
+ SEND_USER_FILE_TOOL_NAME2 = feature("KAIROS") ? (init_prompt8(), __toCommonJS(exports_prompt2)).SEND_USER_FILE_TOOL_NAME : null;
240251
240323
  });
240252
240324
 
240253
240325
  // node_modules/.bun/diff@8.0.4/node_modules/diff/libesm/diff/base.js
@@ -241699,6 +241771,7 @@ var init_microCompact = __esm(() => {
241699
241771
  init_prompt4();
241700
241772
  init_prompt2();
241701
241773
  init_prompt6();
241774
+ init_prompt7();
241702
241775
  init_debug();
241703
241776
  init_model();
241704
241777
  init_shellToolUtils();
@@ -260291,7 +260364,7 @@ var init_ToolSearchTool = __esm(() => {
260291
260364
  init_debug();
260292
260365
  init_stringUtils();
260293
260366
  init_toolSearch();
260294
- init_prompt10();
260367
+ init_prompt11();
260295
260368
  inputSchema3 = lazySchema(() => exports_external.object({
260296
260369
  query: exports_external.string().describe('Query to find deferred tools. Use "select:<tool_name>" for direct selection, or keywords to search.'),
260297
260370
  max_results: exports_external.number().optional().default(5).describe("Maximum number of results to return (default: 5)")
@@ -264247,7 +264320,7 @@ Usage notes:
264247
264320
 
264248
264321
  ${forkEnabled ? forkExamples : currentExamples}`;
264249
264322
  }
264250
- var init_prompt11 = __esm(() => {
264323
+ var init_prompt12 = __esm(() => {
264251
264324
  init_growthbook();
264252
264325
  init_auth6();
264253
264326
  init_embeddedTools();
@@ -266484,7 +266557,7 @@ var init_fableCredits = __esm(() => {
266484
266557
 
266485
266558
  // src/tools/SleepTool/prompt.ts
266486
266559
  var SLEEP_TOOL_NAME = "Sleep", SLEEP_TOOL_PROMPT;
266487
- var init_prompt12 = __esm(() => {
266560
+ var init_prompt13 = __esm(() => {
266488
266561
  init_xml();
266489
266562
  SLEEP_TOOL_PROMPT = `Wait for a specified duration. The user can interrupt the sleep at any time.
266490
266563
 
@@ -376216,6 +376289,46 @@ function getMaxBashTimeoutMs(env6 = process.env) {
376216
376289
  }
376217
376290
  var DEFAULT_TIMEOUT_MS = 120000, MAX_TIMEOUT_MS = 600000;
376218
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
+
376219
376332
  // src/utils/todo/types.ts
376220
376333
  var TodoStatusSchema, TodoItemSchema, TodoListSchema;
376221
376334
  var init_types12 = __esm(() => {
@@ -376231,7 +376344,7 @@ var init_types12 = __esm(() => {
376231
376344
 
376232
376345
  // src/tools/TodoWriteTool/prompt.ts
376233
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.";
376234
- var init_prompt13 = __esm(() => {
376347
+ var init_prompt14 = __esm(() => {
376235
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.
376236
376349
  It also helps the user understand the progress of the task and overall progress of their requests.
376237
376350
 
@@ -376422,9 +376535,10 @@ var init_TodoWriteTool = __esm(() => {
376422
376535
  init_growthbook();
376423
376536
  init_Tool();
376424
376537
  init_tasks();
376538
+ init_todoToolsAvailability();
376425
376539
  init_types12();
376426
376540
  init_constants3();
376427
- init_prompt13();
376541
+ init_prompt14();
376428
376542
  inputSchema8 = lazySchema(() => exports_external.strictObject({
376429
376543
  todos: TodoListSchema().describe("The updated todo list")
376430
376544
  }));
@@ -376455,7 +376569,7 @@ var init_TodoWriteTool = __esm(() => {
376455
376569
  },
376456
376570
  shouldDefer: true,
376457
376571
  isEnabled() {
376458
- return !isTodoV2Enabled();
376572
+ return !isTodoV2Enabled() && areTodoToolsAvailable();
376459
376573
  },
376460
376574
  toAutoClassifierInput(input) {
376461
376575
  return `${input.todos.length} items`;
@@ -376796,7 +376910,7 @@ function getSimplePrompt() {
376796
376910
  ].join(`
376797
376911
  `);
376798
376912
  }
376799
- var init_prompt14 = __esm(() => {
376913
+ var init_prompt15 = __esm(() => {
376800
376914
  init_featureFlags();
376801
376915
  init_prompts4();
376802
376916
  init_attribution();
@@ -379668,33 +379782,6 @@ function validateOutputRedirections(redirections, cwd2, toolPermissionContext, c
379668
379782
  message: "No unsafe redirections found"
379669
379783
  };
379670
379784
  }
379671
- function validateInputRedirections(astRedirects, cwd2, toolPermissionContext) {
379672
- for (const r4 of astRedirects) {
379673
- if (r4.op !== "<" || r4.target === "/dev/null") {
379674
- continue;
379675
- }
379676
- const { allowed, resolvedPath, decisionReason } = validatePath(r4.target, cwd2, toolPermissionContext, "read");
379677
- if (allowed) {
379678
- continue;
379679
- }
379680
- const message = decisionReason?.type === "other" || decisionReason?.type === "safetyCheck" ? decisionReason.reason : decisionReason?.type === "rule" ? `Input redirection from '${resolvedPath}' was blocked by a deny rule.` : `Input redirection from '${resolvedPath}' was blocked. For security, Claude Code may only read files in the allowed working directories for this session.`;
379681
- if (decisionReason?.type === "rule") {
379682
- return { behavior: "deny", message, decisionReason };
379683
- }
379684
- const suggestion = decisionReason === undefined ? createReadRuleSuggestion(getDirectoryForPath(resolvedPath), "session") : undefined;
379685
- return {
379686
- behavior: "ask",
379687
- message,
379688
- blockedPath: resolvedPath,
379689
- decisionReason,
379690
- ...suggestion !== undefined && { suggestions: [suggestion] }
379691
- };
379692
- }
379693
- return {
379694
- behavior: "passthrough",
379695
- message: "No unsafe input redirections found"
379696
- };
379697
- }
379698
379785
  function checkPathConstraints(input, cwd2, toolPermissionContext, compoundCommandHasCd, astRedirects, astCommands) {
379699
379786
  if (!astCommands && />>\s*>\s*\(|>\s*>\s*\(|<\s*\(/.test(input.command)) {
379700
379787
  return {
@@ -379721,12 +379808,6 @@ function checkPathConstraints(input, cwd2, toolPermissionContext, compoundComman
379721
379808
  if (redirectionResult.behavior !== "passthrough") {
379722
379809
  return redirectionResult;
379723
379810
  }
379724
- if (astRedirects) {
379725
- const inputRedirectResult = validateInputRedirections(astRedirects, cwd2, toolPermissionContext);
379726
- if (inputRedirectResult.behavior !== "passthrough") {
379727
- return inputRedirectResult;
379728
- }
379729
- }
379730
379811
  if (astCommands) {
379731
379812
  for (const cmd of astCommands) {
379732
379813
  const result = validateSinglePathCommandArgv(cmd, cwd2, toolPermissionContext, compoundCommandHasCd);
@@ -382956,7 +383037,7 @@ var init_BashTool = __esm(() => {
382956
383037
  init_gitOperationTracking();
382957
383038
  init_bashPermissions();
382958
383039
  init_commandSemantics();
382959
- init_prompt14();
383040
+ init_prompt15();
382960
383041
  init_readOnlyValidation();
382961
383042
  init_sedEditParser();
382962
383043
  init_shouldUseSandbox();
@@ -389536,6 +389617,71 @@ function computeFingerprintFromMessages(messages) {
389536
389617
  var FINGERPRINT_SALT = "59cf53e54c78";
389537
389618
  var init_fingerprint = () => {};
389538
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
+
389539
389685
  // src/utils/sideQuery.ts
389540
389686
  function extractFirstUserMessageText(messages) {
389541
389687
  const firstUserMessage = messages.find((m5) => m5.role === "user");
@@ -389563,6 +389709,7 @@ async function sideQuery(opts) {
389563
389709
  thinking,
389564
389710
  stop_sequences
389565
389711
  } = opts;
389712
+ signalUnrecognizedModel(model, opts.querySource);
389566
389713
  const client8 = await getAnthropicClient({
389567
389714
  maxRetries,
389568
389715
  model,
@@ -389642,6 +389789,7 @@ var init_sideQuery = __esm(() => {
389642
389789
  init_betas2();
389643
389790
  init_fingerprint();
389644
389791
  init_model();
389792
+ init_unrecognizedModelSignal();
389645
389793
  });
389646
389794
 
389647
389795
  // src/utils/permissions/expandWithDefaults.ts
@@ -449298,7 +449446,7 @@ Usage:${getPreReadInstruction2()}
449298
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}
449299
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.`;
449300
449448
  }
449301
- var init_prompt15 = __esm(() => {
449449
+ var init_prompt16 = __esm(() => {
449302
449450
  init_file();
449303
449451
  init_prompt3();
449304
449452
  });
@@ -449358,7 +449506,7 @@ var init_FileEditTool = __esm(() => {
449358
449506
  init_fileStateGuard();
449359
449507
  init_shellRuleMatching();
449360
449508
  init_validateEditTool();
449361
- init_prompt15();
449509
+ init_prompt16();
449362
449510
  init_types10();
449363
449511
  init_UI2();
449364
449512
  init_utils8();
@@ -450462,7 +450610,7 @@ __export(exports_prompt5, {
450462
450610
  SNIP_TOOL_NAME: () => SNIP_TOOL_NAME
450463
450611
  });
450464
450612
  var SNIP_TOOL_NAME = "";
450465
- var init_prompt16 = () => {};
450613
+ var init_prompt17 = () => {};
450466
450614
 
450467
450615
  // src/utils/collapseReadSearch.ts
450468
450616
  function getFirstContentItem(content) {
@@ -451054,12 +451202,12 @@ var init_collapseReadSearch = __esm(() => {
451054
451202
  init_constants9();
451055
451203
  init_primitiveTools();
451056
451204
  init_gitOperationTracking();
451057
- init_prompt10();
451205
+ init_prompt11();
451058
451206
  init_file();
451059
451207
  init_fullscreen();
451060
451208
  init_memoryFileDetection();
451061
451209
  teamMemOps = feature("TEAMMEM") ? (init_teamMemoryOps(), __toCommonJS(exports_teamMemoryOps)) : null;
451062
- SNIP_TOOL_NAME2 = feature("HISTORY_SNIP") ? (init_prompt16(), __toCommonJS(exports_prompt5)).SNIP_TOOL_NAME : null;
451210
+ SNIP_TOOL_NAME2 = feature("HISTORY_SNIP") ? (init_prompt17(), __toCommonJS(exports_prompt5)).SNIP_TOOL_NAME : null;
451063
451211
  });
451064
451212
 
451065
451213
  // src/components/TaskListV2.tsx
@@ -474659,7 +474807,7 @@ var init_conversationRecovery = __esm(() => {
474659
474807
  init_sessionStorage();
474660
474808
  BRIEF_TOOL_NAME4 = feature("KAIROS") || feature("KAIROS_BRIEF") ? (init_prompt(), __toCommonJS(exports_prompt)).BRIEF_TOOL_NAME : null;
474661
474809
  LEGACY_BRIEF_TOOL_NAME2 = feature("KAIROS") || feature("KAIROS_BRIEF") ? (init_prompt(), __toCommonJS(exports_prompt)).LEGACY_BRIEF_TOOL_NAME : null;
474662
- SEND_USER_FILE_TOOL_NAME3 = feature("KAIROS") ? (init_prompt7(), __toCommonJS(exports_prompt2)).SEND_USER_FILE_TOOL_NAME : null;
474810
+ SEND_USER_FILE_TOOL_NAME3 = feature("KAIROS") ? (init_prompt8(), __toCommonJS(exports_prompt2)).SEND_USER_FILE_TOOL_NAME : null;
474663
474811
  });
474664
474812
 
474665
474813
  // src/services/api/filesApi.ts
@@ -477857,7 +478005,7 @@ var init_AgentTool = __esm(() => {
477857
478005
  init_constants3();
477858
478006
  init_forkSubagent();
477859
478007
  init_loadAgentsDir();
477860
- init_prompt11();
478008
+ init_prompt12();
477861
478009
  init_runAgent();
477862
478010
  init_UI8();
477863
478011
  jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
@@ -479222,7 +479370,7 @@ var init_SkillTool = __esm(() => {
479222
479370
  init_skillUsageTracking();
479223
479371
  init_uuid();
479224
479372
  init_runAgent();
479225
- init_prompt26();
479373
+ init_prompt27();
479226
479374
  init_skillAttribution();
479227
479375
  init_loadSkillsDir();
479228
479376
  init_UI9();
@@ -496833,7 +496981,7 @@ async function applyPromptToMarkdown(prompt, markdownContent, signal, isNonInter
496833
496981
  }
496834
496982
  return "No response from model";
496835
496983
  }
496836
- var DomainBlockedError, DomainCheckFailedError, EgressBlockedError, CACHE_TTL_MS3, 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;
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;
496837
496985
  var init_utils12 = __esm(() => {
496838
496986
  init_axios2();
496839
496987
  init_index_min();
@@ -496844,7 +496992,9 @@ var init_utils12 = __esm(() => {
496844
496992
  init_log3();
496845
496993
  init_mcpOutputStorage();
496846
496994
  init_settings2();
496995
+ init_cacheTtl();
496847
496996
  init_preapproved();
496997
+ init_prompt6();
496848
496998
  DomainBlockedError = class DomainBlockedError extends Error {
496849
496999
  constructor(domain2) {
496850
497000
  super(`Claude Code is unable to fetch from ${domain2}`);
@@ -496869,11 +497019,10 @@ var init_utils12 = __esm(() => {
496869
497019
  this.name = "EgressBlockedError";
496870
497020
  }
496871
497021
  };
496872
- CACHE_TTL_MS3 = 15 * 60 * 1000;
496873
497022
  MAX_CACHE_SIZE_BYTES = 50 * 1024 * 1024;
496874
497023
  URL_CACHE = new L({
496875
497024
  maxSize: MAX_CACHE_SIZE_BYTES,
496876
- ttl: CACHE_TTL_MS3
497025
+ ttl: getWebFetchCacheTtlMs()
496877
497026
  });
496878
497027
  DOMAIN_CHECK_CACHE = new L({
496879
497028
  max: 128,
@@ -496912,6 +497061,7 @@ var init_WebFetchTool = __esm(() => {
496912
497061
  init_format();
496913
497062
  init_permissions2();
496914
497063
  init_preapproved();
497064
+ init_prompt6();
496915
497065
  init_UI10();
496916
497066
  init_utils12();
496917
497067
  inputSchema14 = lazySchema(() => exports_external.strictObject({
@@ -497196,7 +497346,7 @@ var init_CronCreateTool = __esm(() => {
497196
497346
  init_cronTasks();
497197
497347
  init_semanticBoolean();
497198
497348
  init_teammateContext();
497199
- init_prompt9();
497349
+ init_prompt10();
497200
497350
  init_UI11();
497201
497351
  inputSchema15 = lazySchema(() => exports_external.strictObject({
497202
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).'),
@@ -497301,7 +497451,7 @@ var init_CronDeleteTool = __esm(() => {
497301
497451
  init_Tool();
497302
497452
  init_cronTasks();
497303
497453
  init_teammateContext();
497304
- init_prompt9();
497454
+ init_prompt10();
497305
497455
  init_UI11();
497306
497456
  inputSchema16 = lazySchema(() => exports_external.strictObject({
497307
497457
  id: exports_external.string().describe("Job ID returned by CronCreate.")
@@ -497380,7 +497530,7 @@ var init_CronListTool = __esm(() => {
497380
497530
  init_cronTasks();
497381
497531
  init_format();
497382
497532
  init_teammateContext();
497383
- init_prompt9();
497533
+ init_prompt10();
497384
497534
  init_UI11();
497385
497535
  inputSchema17 = lazySchema(() => exports_external.strictObject({}));
497386
497536
  outputSchema16 = lazySchema(() => exports_external.object({
@@ -559657,18 +559807,18 @@ function parseFolderPath(folderPath) {
559657
559807
  }
559658
559808
  return { platform: platform5, buildId };
559659
559809
  }
559660
- var import_debug175, debugCache;
559810
+ var import_debug176, debugCache;
559661
559811
  var init_Cache = __esm(() => {
559662
559812
  init_browser_data();
559663
559813
  init_detectPlatform();
559664
- import_debug175 = __toESM(require_src(), 1);
559665
- debugCache = import_debug175.default("puppeteer:browsers:cache");
559814
+ import_debug176 = __toESM(require_src(), 1);
559815
+ debugCache = import_debug176.default("puppeteer:browsers:cache");
559666
559816
  });
559667
559817
 
559668
559818
  // node_modules/.bun/@puppeteer+browsers@2.13.2/node_modules/@puppeteer/browsers/lib/esm/debug.js
559669
- var import_debug176;
559819
+ var import_debug177;
559670
559820
  var init_debug3 = __esm(() => {
559671
- import_debug176 = __toESM(require_src(), 1);
559821
+ import_debug177 = __toESM(require_src(), 1);
559672
559822
  });
559673
559823
 
559674
559824
  // node_modules/.bun/@puppeteer+browsers@2.13.2/node_modules/@puppeteer/browsers/lib/esm/launch.js
@@ -559987,7 +560137,7 @@ var init_launch = __esm(() => {
559987
560137
  init_Cache();
559988
560138
  init_debug3();
559989
560139
  init_detectPlatform();
559990
- debugLaunch = import_debug176.default("puppeteer:browsers:launcher");
560140
+ debugLaunch = import_debug177.default("puppeteer:browsers:launcher");
559991
560141
  CDP_WEBSOCKET_ENDPOINT_REGEX = /^DevTools listening on (ws:\/\/.*)$/;
559992
560142
  WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX = /^WebDriver BiDi listening on (ws:\/\/.*)$/;
559993
560143
  processListeners = new Map;
@@ -565071,10 +565221,10 @@ async function installDMG(dmgPath, folderPath) {
565071
565221
  spawnSync4("hdiutil", ["detach", mountPath, "-quiet"]);
565072
565222
  }
565073
565223
  }
565074
- var import_debug178, debugFileUtil, internalConstantsForTesting;
565224
+ var import_debug179, debugFileUtil, internalConstantsForTesting;
565075
565225
  var init_fileUtil = __esm(() => {
565076
- import_debug178 = __toESM(require_src(), 1);
565077
- debugFileUtil = import_debug178.default("puppeteer:browsers:fileUtil");
565226
+ import_debug179 = __toESM(require_src(), 1);
565227
+ debugFileUtil = import_debug179.default("puppeteer:browsers:fileUtil");
565078
565228
  internalConstantsForTesting = {
565079
565229
  xz: "xz",
565080
565230
  bzip2: "bzip2"
@@ -565367,7 +565517,7 @@ var init_install = __esm(() => {
565367
565517
  init_fileUtil();
565368
565518
  init_httpUtil();
565369
565519
  import_progress = __toESM(require_node_progress(), 1);
565370
- debugInstall = import_debug176.default("puppeteer:browsers:install");
565520
+ debugInstall = import_debug177.default("puppeteer:browsers:install");
565371
565521
  times = new Map;
565372
565522
  });
565373
565523
 
@@ -571642,7 +571792,7 @@ import fs22 from "fs";
571642
571792
  import os16 from "os";
571643
571793
  import { dirname as dirname45 } from "path";
571644
571794
  import { PassThrough as PassThrough4 } from "stream";
571645
- var import_debug180, __runInitializers23 = function(thisArg, initializers, value) {
571795
+ var import_debug181, __runInitializers23 = function(thisArg, initializers, value) {
571646
571796
  var useValue = arguments.length > 2;
571647
571797
  for (var i6 = 0;i6 < initializers.length; i6++) {
571648
571798
  value = useValue ? initializers[i6].call(thisArg, value) : initializers[i6].call(thisArg);
@@ -571702,8 +571852,8 @@ var init_ScreenRecorder = __esm(() => {
571702
571852
  init_util6();
571703
571853
  init_decorators();
571704
571854
  init_disposable();
571705
- import_debug180 = __toESM(require_src(), 1);
571706
- debugFfmpeg = import_debug180.default("puppeteer:ffmpeg");
571855
+ import_debug181 = __toESM(require_src(), 1);
571856
+ debugFfmpeg = import_debug181.default("puppeteer:ffmpeg");
571707
571857
  ScreenRecorder = (() => {
571708
571858
  let _classSuper = PassThrough4;
571709
571859
  let _instanceExtraInitializers = [];
@@ -572133,7 +572283,7 @@ var WEB_BROWSER_NAVIGATE_TOOL_NAME = "navigate", WEB_BROWSER_GET_PAGE_TEXT_TOOL_
572133
572283
  - browser_batch cannot be nested (a batch action whose name is browser_batch is rejected).
572134
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.
572135
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.`;
572136
- var init_prompt17 = __esm(() => {
572286
+ var init_prompt18 = __esm(() => {
572137
572287
  READONLY_SUBACTIONS = new Set([
572138
572288
  "get_page_text",
572139
572289
  "screenshot"
@@ -572181,7 +572331,7 @@ var init_WebBrowserTool = __esm(() => {
572181
572331
  init_preapproved();
572182
572332
  init_actions();
572183
572333
  init_browser2();
572184
- init_prompt17();
572334
+ init_prompt18();
572185
572335
  navigateInputSchema = exports_external.strictObject({
572186
572336
  url: exports_external.string().describe('The URL to navigate to, or "forward"/"back" to traverse browser history. Bare hostnames are upgraded to https://.'),
572187
572337
  tabId: exports_external.number().optional().describe("Ignored in OCC (single shared page).")
@@ -574521,7 +574671,7 @@ var init_WebSearchTool = __esm(() => {
574521
574671
  init_messages3();
574522
574672
  init_model();
574523
574673
  init_slowOperations();
574524
- init_prompt6();
574674
+ init_prompt7();
574525
574675
  init_UI14();
574526
574676
  inputSchema21 = lazySchema(() => exports_external.strictObject({
574527
574677
  query: exports_external.string().min(2).describe("The search query to use"),
@@ -574808,7 +574958,7 @@ var init_inProcessTeammateHelpers = __esm(() => {
574808
574958
 
574809
574959
  // src/tools/ExitPlanModeTool/prompt.ts
574810
574960
  var ASK_USER_QUESTION_TOOL_NAME2 = "AskUserQuestion", EXIT_PLAN_MODE_V2_TOOL_PROMPT;
574811
- var init_prompt18 = __esm(() => {
574961
+ var init_prompt19 = __esm(() => {
574812
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.
574813
574963
 
574814
574964
  ## How This Tool Works
@@ -575048,7 +575198,7 @@ var init_ExitPlanModeV2Tool = __esm(() => {
575048
575198
  init_teammate();
575049
575199
  init_teammateMailbox();
575050
575200
  init_constants3();
575051
- init_prompt18();
575201
+ init_prompt19();
575052
575202
  init_UI15();
575053
575203
  autoModeStateModule = feature("TRANSCRIPT_CLASSIFIER") ? __toCommonJS(exports_autoModeState) : null;
575054
575204
  permissionSetupModule = feature("TRANSCRIPT_CLASSIFIER") ? (init_permissionSetup(), __toCommonJS(exports_permissionSetup)) : null;
@@ -575481,7 +575631,7 @@ var init_AskUserQuestionTool = __esm(() => {
575481
575631
  init_v4();
575482
575632
  init_ink2();
575483
575633
  init_Tool();
575484
- init_prompt8();
575634
+ init_prompt9();
575485
575635
  import_compiler_runtime117 = __toESM(require_compiler_runtime(), 1);
575486
575636
  jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
575487
575637
  questionOptionSchema = lazySchema(() => exports_external.object({
@@ -578537,9 +578687,9 @@ function getEnterPlanModeToolPrompt() {
578537
578687
  return process.env.USER_TYPE === "ant" ? getEnterPlanModeToolPromptAnt() : getEnterPlanModeToolPromptExternal();
578538
578688
  }
578539
578689
  var WHAT_HAPPENS_SECTION;
578540
- var init_prompt19 = __esm(() => {
578690
+ var init_prompt20 = __esm(() => {
578541
578691
  init_planModeV2();
578542
- init_prompt8();
578692
+ init_prompt9();
578543
578693
  WHAT_HAPPENS_SECTION = `## What Happens in Plan Mode
578544
578694
 
578545
578695
  In plan mode, you'll:
@@ -578617,7 +578767,7 @@ var init_EnterPlanModeTool = __esm(() => {
578617
578767
  init_PermissionUpdate();
578618
578768
  init_permissionSetup();
578619
578769
  init_planModeV2();
578620
- init_prompt19();
578770
+ init_prompt20();
578621
578771
  init_UI20();
578622
578772
  inputSchema29 = lazySchema(() => exports_external.strictObject({}));
578623
578773
  outputSchema26 = lazySchema(() => exports_external.object({
@@ -580283,7 +580433,7 @@ ${lines2.join(`
580283
580433
  }
580284
580434
  }
580285
580435
  var DESCRIPTION13 = "Get or set Claude Code configuration settings.";
580286
- var init_prompt20 = __esm(() => {
580436
+ var init_prompt21 = __esm(() => {
580287
580437
  init_featureFlags();
580288
580438
  init_modelOptions();
580289
580439
  init_voiceModeEnabled();
@@ -581106,7 +581256,7 @@ var init_ConfigTool = __esm(() => {
581106
581256
  init_log3();
581107
581257
  init_settings2();
581108
581258
  init_slowOperations();
581109
- init_prompt20();
581259
+ init_prompt21();
581110
581260
  init_supportedSettings();
581111
581261
  init_UI23();
581112
581262
  inputSchema32 = lazySchema(() => exports_external.strictObject({
@@ -581472,7 +581622,7 @@ ${teammateTips}- Check TaskList first to avoid creating duplicate tasks
581472
581622
  `;
581473
581623
  }
581474
581624
  var DESCRIPTION14 = "Create a new task in the task list";
581475
- var init_prompt21 = __esm(() => {
581625
+ var init_prompt22 = __esm(() => {
581476
581626
  init_agentSwarmsEnabled();
581477
581627
  });
581478
581628
 
@@ -581591,8 +581741,9 @@ var init_TaskCreateTool = __esm(() => {
581591
581741
  init_Tool();
581592
581742
  init_hooks5();
581593
581743
  init_tasks();
581744
+ init_todoToolsAvailability();
581594
581745
  init_teammate();
581595
- init_prompt21();
581746
+ init_prompt22();
581596
581747
  inputSchema33 = lazySchema(() => exports_external.strictObject({
581597
581748
  subject: exports_external.string().describe("A brief title for the task"),
581598
581749
  description: exports_external.string().describe("What needs to be done"),
@@ -581644,7 +581795,7 @@ var init_TaskCreateTool = __esm(() => {
581644
581795
  },
581645
581796
  shouldDefer: true,
581646
581797
  isEnabled() {
581647
- return isTodoV2Enabled();
581798
+ return isTodoV2Enabled() && areTodoToolsAvailable();
581648
581799
  },
581649
581800
  isConcurrencySafe() {
581650
581801
  return true;
@@ -581739,6 +581890,7 @@ var init_TaskGetTool = __esm(() => {
581739
581890
  init_v4();
581740
581891
  init_Tool();
581741
581892
  init_tasks();
581893
+ init_todoToolsAvailability();
581742
581894
  inputSchema34 = lazySchema(() => exports_external.strictObject({
581743
581895
  taskId: exports_external.string().describe("The ID of the task to retrieve")
581744
581896
  }));
@@ -581773,7 +581925,7 @@ var init_TaskGetTool = __esm(() => {
581773
581925
  },
581774
581926
  shouldDefer: true,
581775
581927
  isEnabled() {
581776
- return isTodoV2Enabled();
581928
+ return isTodoV2Enabled() && areTodoToolsAvailable();
581777
581929
  },
581778
581930
  isConcurrencySafe() {
581779
581931
  return true;
@@ -581927,6 +582079,7 @@ var init_TaskUpdateTool = __esm(() => {
581927
582079
  init_agentSwarmsEnabled();
581928
582080
  init_hooks5();
581929
582081
  init_tasks();
582082
+ init_todoToolsAvailability();
581930
582083
  init_teammate();
581931
582084
  init_teammateMailbox();
581932
582085
  init_constants3();
@@ -581976,7 +582129,7 @@ var init_TaskUpdateTool = __esm(() => {
581976
582129
  },
581977
582130
  shouldDefer: true,
581978
582131
  isEnabled() {
581979
- return isTodoV2Enabled();
582132
+ return isTodoV2Enabled() && areTodoToolsAvailable();
581980
582133
  },
581981
582134
  isConcurrencySafe() {
581982
582135
  return true;
@@ -582226,7 +582379,7 @@ Use TaskGet with a specific task ID to view full details including description a
582226
582379
  ${teammateWorkflow}`;
582227
582380
  }
582228
582381
  var DESCRIPTION17 = "List all tasks in the task list";
582229
- var init_prompt22 = __esm(() => {
582382
+ var init_prompt23 = __esm(() => {
582230
582383
  init_agentSwarmsEnabled();
582231
582384
  });
582232
582385
 
@@ -582236,7 +582389,8 @@ var init_TaskListTool = __esm(() => {
582236
582389
  init_v4();
582237
582390
  init_Tool();
582238
582391
  init_tasks();
582239
- init_prompt22();
582392
+ init_todoToolsAvailability();
582393
+ init_prompt23();
582240
582394
  inputSchema36 = lazySchema(() => exports_external.strictObject({}));
582241
582395
  outputSchema33 = lazySchema(() => exports_external.object({
582242
582396
  tasks: exports_external.array(exports_external.object({
@@ -582268,7 +582422,7 @@ var init_TaskListTool = __esm(() => {
582268
582422
  },
582269
582423
  shouldDefer: true,
582270
582424
  isEnabled() {
582271
- return isTodoV2Enabled();
582425
+ return isTodoV2Enabled() && areTodoToolsAvailable();
582272
582426
  },
582273
582427
  isConcurrencySafe() {
582274
582428
  return true;
@@ -583185,7 +583339,7 @@ Approving shutdown terminates your process. Rejecting plan sends the teammate ba
583185
583339
  `.trim();
583186
583340
  }
583187
583341
  var DESCRIPTION21 = "Send a message to another agent";
583188
- var init_prompt23 = __esm(() => {
583342
+ var init_prompt24 = __esm(() => {
583189
583343
  init_featureFlags();
583190
583344
  });
583191
583345
 
@@ -583523,7 +583677,7 @@ var init_SendMessageTool = __esm(() => {
583523
583677
  init_teammate();
583524
583678
  init_teammateMailbox();
583525
583679
  init_resumeAgent();
583526
- init_prompt23();
583680
+ init_prompt24();
583527
583681
  init_UI25();
583528
583682
  StructuredMessage = lazySchema(() => exports_external.discriminatedUnion("type", [
583529
583683
  exports_external.object({
@@ -591310,7 +591464,7 @@ ${sleepGuidance ? sleepGuidance + `
591310
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.
591311
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.`;
591312
591466
  }
591313
- var init_prompt24 = __esm(() => {
591467
+ var init_prompt25 = __esm(() => {
591314
591468
  init_envUtils();
591315
591469
  init_outputLimits();
591316
591470
  init_powershellDetection();
@@ -591841,7 +591995,7 @@ var init_PowerShellTool = __esm(() => {
591841
591995
  init_gitOperationTracking();
591842
591996
  init_commandSemantics2();
591843
591997
  init_powershellPermissions();
591844
- init_prompt24();
591998
+ init_prompt25();
591845
591999
  init_readOnlyValidation2();
591846
592000
  init_UI26();
591847
592001
  jsx_runtime158 = __toESM(require_jsx_runtime(), 1);
@@ -594131,7 +594285,7 @@ var init_toolExecution = __esm(() => {
594131
594285
  init_prompt3();
594132
594286
  init_prompt4();
594133
594287
  init_gitOperationTracking();
594134
- init_prompt10();
594288
+ init_prompt11();
594135
594289
  init_tools2();
594136
594290
  init_attachments2();
594137
594291
  init_debug();
@@ -598110,7 +598264,7 @@ var init_query2 = __esm(() => {
598110
598264
  init_tokens();
598111
598265
  init_context();
598112
598266
  init_growthbook();
598113
- init_prompt12();
598267
+ init_prompt13();
598114
598268
  init_postSamplingHooks();
598115
598269
  init_hooks5();
598116
598270
  init_dumpPrompts();
@@ -603151,7 +603305,7 @@ var init_attachments2 = __esm(() => {
603151
603305
  init_commands5();
603152
603306
  init_uniqBy();
603153
603307
  init_state();
603154
- init_prompt26();
603308
+ init_prompt27();
603155
603309
  init_context();
603156
603310
  init_prompt3();
603157
603311
  init_limits();
@@ -603161,7 +603315,7 @@ var init_attachments2 = __esm(() => {
603161
603315
  init_file();
603162
603316
  init_loadAgentsDir();
603163
603317
  init_constants3();
603164
- init_prompt11();
603318
+ init_prompt12();
603165
603319
  init_permissions2();
603166
603320
  init_auth6();
603167
603321
  init_mcpStringUtils();
@@ -603577,7 +603731,7 @@ var proactiveModule3, NO_TOOLS_PREAMBLE = `CRITICAL: Respond with TEXT ONLY. Do
603577
603731
  - Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.
603578
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.
603579
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;
603580
- var init_prompt25 = __esm(() => {
603734
+ var init_prompt26 = __esm(() => {
603581
603735
  init_featureFlags();
603582
603736
  proactiveModule3 = feature("PROACTIVE") || feature("KAIROS") ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
603583
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.
@@ -604695,7 +604849,7 @@ var init_compact = __esm(() => {
604695
604849
  init_withRetry();
604696
604850
  init_internalLogging();
604697
604851
  init_tokenEstimation();
604698
- init_prompt25();
604852
+ init_prompt26();
604699
604853
  sessionTranscriptModule2 = feature("KAIROS") ? (init_sessionTranscript(), __toCommonJS(exports_sessionTranscript)) : null;
604700
604854
  });
604701
604855
 
@@ -605251,7 +605405,7 @@ var init_sessionMemoryCompact = __esm(() => {
605251
605405
  init_sessionMemoryUtils();
605252
605406
  init_compact();
605253
605407
  init_microCompact();
605254
- init_prompt25();
605408
+ init_prompt26();
605255
605409
  DEFAULT_SM_COMPACT_CONFIG = {
605256
605410
  minTokens: 1e4,
605257
605411
  minTextBlockMessages: 5,
@@ -605540,7 +605694,7 @@ async function countBuiltInToolTokens(tools, getToolPermissionContext, agentInfo
605540
605694
  };
605541
605695
  }
605542
605696
  const { isToolSearchEnabled: isToolSearchEnabled2 } = await Promise.resolve().then(() => (init_toolSearch(), exports_toolSearch));
605543
- const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (init_prompt10(), exports_prompt4));
605697
+ const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (init_prompt11(), exports_prompt4));
605544
605698
  const isDeferred = await isToolSearchEnabled2(model ?? "", tools, getToolPermissionContext, agentInfo?.activeAgents ?? [], "analyzeBuiltIn");
605545
605699
  const alwaysLoadedTools = builtInTools.filter((t4) => !isDeferredTool2(t4));
605546
605700
  const deferredBuiltinTools = builtInTools.filter((t4) => isDeferredTool2(t4));
@@ -605675,7 +605829,7 @@ async function countMcpToolTokens(tools, getToolPermissionContext, agentInfo, mo
605675
605829
  const estimateTotal = estimates.reduce((s4, e4) => s4 + e4, 0) || 1;
605676
605830
  const mcpToolTokensByTool = estimates.map((e4) => Math.round(e4 / estimateTotal * totalTokens));
605677
605831
  const { isToolSearchEnabled: isToolSearchEnabled2 } = await Promise.resolve().then(() => (init_toolSearch(), exports_toolSearch));
605678
- const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (init_prompt10(), exports_prompt4));
605832
+ const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (init_prompt11(), exports_prompt4));
605679
605833
  const isDeferred = await isToolSearchEnabled2(model, tools, getToolPermissionContext, agentInfo?.activeAgents ?? [], "analyzeMcp");
605680
605834
  const loadedMcpToolNames = new Set;
605681
605835
  if (isDeferred && messages) {
@@ -606111,7 +606265,7 @@ var init_analyzeContext = __esm(() => {
606111
606265
  init_tokenEstimation();
606112
606266
  init_loadSkillsDir();
606113
606267
  init_Tool();
606114
- init_prompt26();
606268
+ init_prompt27();
606115
606269
  init_api4();
606116
606270
  init_claudemd();
606117
606271
  init_context();
@@ -606431,7 +606585,7 @@ var init_toolSearch = __esm(() => {
606431
606585
  init_growthbook();
606432
606586
  init_analytics();
606433
606587
  init_Tool();
606434
- init_prompt10();
606588
+ init_prompt11();
606435
606589
  init_analyzeContext();
606436
606590
  init_betas2();
606437
606591
  init_context();
@@ -607004,40 +607158,56 @@ function substituteArguments(content, args, appendIfNoPlaceholder = true, argume
607004
607158
  if (args === undefined || args === null) {
607005
607159
  return content;
607006
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
+ };
607007
607166
  const parsedArgs = parseArguments2(args);
607008
- const ESCAPED_DOLLAR = "\x00ESCAPED_DOLLAR\x00";
607009
- let work = content.replace(/\\\$/g, ESCAPED_DOLLAR);
607010
- const beforeSubst = work;
607011
- for (let i6 = 0;i6 < argumentNames.length; i6++) {
607012
- const name3 = argumentNames[i6];
607013
- if (!name3)
607014
- continue;
607015
- work = work.replace(new RegExp(`\\$${name3}(?![\\[\\w])`, "g"), parsedArgs[i6] ?? "");
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
+ });
607016
607180
  }
607017
607181
  work = work.replace(/\$ARGUMENTS\[(\d+)\]/g, (match, indexStr) => {
607018
607182
  const index2 = parseInt(indexStr, 10);
607019
607183
  if (parsedArgs[index2] === undefined) {
607020
- return `${ESCAPED_DOLLAR}${match.slice(1)}`;
607184
+ return SHIELDED_DOLLAR + match.slice(1);
607021
607185
  }
607022
- return parsedArgs[index2];
607186
+ didSubstitute = true;
607187
+ return insertValue(parsedArgs[index2]);
607023
607188
  });
607024
607189
  work = work.replace(/\$(\d+)(?!\w)/g, (match, indexStr) => {
607025
607190
  const index2 = parseInt(indexStr, 10);
607026
607191
  if (parsedArgs[index2] === undefined) {
607027
607192
  return match;
607028
607193
  }
607029
- return parsedArgs[index2];
607194
+ didSubstitute = true;
607195
+ return insertValue(parsedArgs[index2]);
607196
+ });
607197
+ work = work.replaceAll("$ARGUMENTS", () => {
607198
+ didSubstitute = true;
607199
+ return insertValue(args);
607030
607200
  });
607031
- work = work.replaceAll("$ARGUMENTS", args);
607032
- if (work === beforeSubst && appendIfNoPlaceholder && args) {
607201
+ if (!didSubstitute && appendIfNoPlaceholder && args) {
607033
607202
  work = work + `
607034
-
607035
- ARGUMENTS: ${args}`;
607203
+ ARGUMENTS: ${insertValue(args)}`;
607036
607204
  }
607037
- return work.replaceAll(ESCAPED_DOLLAR, "$");
607205
+ return work.replaceAll(SHIELDED_DOLLAR, "$").replaceAll(VALUE_BOUNDARY, "");
607038
607206
  }
607207
+ var SHIELDED_DOLLAR = "\uFFFF", VALUE_BOUNDARY = "\uFFFE", SENTINEL_REPLACEMENT = "\uFFFD";
607039
607208
  var init_argumentSubstitution = __esm(() => {
607040
607209
  init_shellQuote();
607210
+ init_stringUtils();
607041
607211
  });
607042
607212
 
607043
607213
  // src/utils/promptShellExecution.ts
@@ -607953,7 +608123,7 @@ async function getSkillInfo(cwd2) {
607953
608123
  }
607954
608124
  }
607955
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;
607956
- var init_prompt26 = __esm(() => {
608126
+ var init_prompt27 = __esm(() => {
607957
608127
  init_lodash();
607958
608128
  init_commands5();
607959
608129
  init_loadSkillsDir();
@@ -608808,7 +608978,7 @@ var init_cacheUtils = __esm(() => {
608808
608978
  init_commands5();
608809
608979
  init_outputStyles();
608810
608980
  init_loadAgentsDir();
608811
- init_prompt26();
608981
+ init_prompt27();
608812
608982
  init_attachments2();
608813
608983
  init_debug();
608814
608984
  init_errors();
@@ -616555,7 +616725,7 @@ var init_messages3 = __esm(() => {
616555
616725
  init_planAgent();
616556
616726
  init_builtInAgents();
616557
616727
  init_constants3();
616558
- init_prompt8();
616728
+ init_prompt9();
616559
616729
  init_BashTool();
616560
616730
  init_ExitPlanModeV2Tool();
616561
616731
  init_FileEditTool();
@@ -630768,6 +630938,7 @@ var init_apiMicrocompact = __esm(() => {
630768
630938
  init_prompt4();
630769
630939
  init_prompt2();
630770
630940
  init_prompt6();
630941
+ init_prompt7();
630771
630942
  init_shellToolUtils();
630772
630943
  init_envValidation();
630773
630944
  init_envUtils();
@@ -631269,6 +631440,7 @@ async function* queryModel(messages, systemPrompt, thinkingConfig, tools, signal
631269
631440
  }
631270
631441
  const previousRequestId = getPreviousRequestIdFromMessages(messages);
631271
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);
631272
631444
  queryCheckpoint("query_tool_schema_build_start");
631273
631445
  const isAgenticQuery = options.querySource.startsWith("repl_main_thread") || options.querySource.startsWith("agent:") || options.querySource === "sdk" || options.querySource === "hook_agent" || options.querySource === "verification_agent";
631274
631446
  const betas = getMergedBetas(options.model, { isAgenticQuery });
@@ -631492,10 +631664,10 @@ ${deferredToolList}
631492
631664
  let start = Date.now();
631493
631665
  let attemptNumber = 0;
631494
631666
  const attemptStartTimes = [];
631495
- let stream6 = undefined;
631496
- let streamRequestId = undefined;
631497
- let clientRequestId = undefined;
631498
- let streamResponse = undefined;
631667
+ let stream6;
631668
+ let streamRequestId;
631669
+ let clientRequestId;
631670
+ let streamResponse;
631499
631671
  function releaseStreamResources() {
631500
631672
  cleanupStream(stream6);
631501
631673
  stream6 = undefined;
@@ -631530,7 +631702,7 @@ ${deferredToolList}
631530
631702
  }
631531
631703
  const maxOutputTokens2 = retryContext?.maxTokensOverride || options.maxOutputTokensOverride || getMaxOutputTokensForModel(options.model);
631532
631704
  const hasThinking = thinkingConfig.type !== "disabled" && !isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_THINKING);
631533
- let thinking = undefined;
631705
+ let thinking;
631534
631706
  if (hasThinking && modelSupportsThinking(options.model)) {
631535
631707
  if (!isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING) && modelSupportsAdaptiveThinking(options.model)) {
631536
631708
  thinking = {
@@ -631622,7 +631794,7 @@ ${deferredToolList}
631622
631794
  }
631623
631795
  const newMessages = [];
631624
631796
  let ttftMs = 0;
631625
- let partialMessage = undefined;
631797
+ let partialMessage;
631626
631798
  const contentBlocks = [];
631627
631799
  let usage2 = EMPTY_USAGE;
631628
631800
  let costUSD = 0;
@@ -631630,8 +631802,8 @@ ${deferredToolList}
631630
631802
  let didFallBackToNonStreaming = false;
631631
631803
  let fallbackMessage;
631632
631804
  let maxOutputTokens = 0;
631633
- let responseHeaders = undefined;
631634
- let research = undefined;
631805
+ let responseHeaders;
631806
+ let research;
631635
631807
  let isFastModeRequest = isFastMode;
631636
631808
  let isAdvisorInProgress = false;
631637
631809
  try {
@@ -632679,11 +632851,12 @@ var init_claude = __esm(() => {
632679
632851
  init_toolSearch();
632680
632852
  init_apiLimits();
632681
632853
  init_betas();
632682
- init_prompt10();
632854
+ init_prompt11();
632683
632855
  init_envValidation();
632684
632856
  init_json();
632685
632857
  init_bedrock();
632686
632858
  init_model();
632859
+ init_unrecognizedModelSignal();
632687
632860
  init_sessionActivity();
632688
632861
  init_slowOperations();
632689
632862
  init_sessionTracing();
@@ -633662,7 +633835,7 @@ __export(exports_prompt7, {
633662
633835
  TERMINAL_CAPTURE_TOOL_NAME: () => TERMINAL_CAPTURE_TOOL_NAME
633663
633836
  });
633664
633837
  var TERMINAL_CAPTURE_TOOL_NAME = "";
633665
- var init_prompt27 = () => {};
633838
+ var init_prompt28 = () => {};
633666
633839
 
633667
633840
  // src/tools/VerifyPlanExecutionTool/constants.ts
633668
633841
  var exports_constants2 = {};
@@ -633715,13 +633888,13 @@ function isAutoModeAllowlistedTool(toolName) {
633715
633888
  var TERMINAL_CAPTURE_TOOL_NAME2, OVERFLOW_TEST_TOOL_NAME2, VERIFY_PLAN_EXECUTION_TOOL_NAME2, WORKFLOW_TOOL_NAME2, SAFE_YOLO_ALLOWLISTED_TOOLS;
633716
633889
  var init_classifierDecision = __esm(() => {
633717
633890
  init_featureFlags();
633718
- init_prompt8();
633891
+ init_prompt9();
633719
633892
  init_prompt3();
633720
633893
  init_prompt2();
633721
- init_prompt12();
633722
- init_prompt10();
633894
+ init_prompt13();
633895
+ init_prompt11();
633723
633896
  init_yoloClassifier();
633724
- TERMINAL_CAPTURE_TOOL_NAME2 = feature("TERMINAL_PANEL") ? (init_prompt27(), __toCommonJS(exports_prompt7)).TERMINAL_CAPTURE_TOOL_NAME : null;
633897
+ TERMINAL_CAPTURE_TOOL_NAME2 = feature("TERMINAL_PANEL") ? (init_prompt28(), __toCommonJS(exports_prompt7)).TERMINAL_CAPTURE_TOOL_NAME : null;
633725
633898
  OVERFLOW_TEST_TOOL_NAME2 = feature("OVERFLOW_TEST_TOOL") ? (init_OverflowTestTool(), __toCommonJS(exports_OverflowTestTool)).OVERFLOW_TEST_TOOL_NAME : null;
633726
633899
  VERIFY_PLAN_EXECUTION_TOOL_NAME2 = process.env.USER_TYPE === "ant" ? (init_constants11(), __toCommonJS(exports_constants2)).VERIFY_PLAN_EXECUTION_TOOL_NAME : null;
633727
633900
  WORKFLOW_TOOL_NAME2 = feature("WORKFLOW_SCRIPTS") ? __toCommonJS(exports_constants).WORKFLOW_TOOL_NAME : null;
@@ -644428,7 +644601,7 @@ function clearSessionCaches(preservedAgentIds = new Set) {
644428
644601
  Promise.resolve().then(() => (init_utils12(), exports_utils2)).then(({ clearWebFetchCache: clearWebFetchCache2 }) => clearWebFetchCache2());
644429
644602
  Promise.resolve().then(() => (init_ToolSearchTool(), exports_ToolSearchTool)).then(({ clearToolSearchDescriptionCache: clearToolSearchDescriptionCache2 }) => clearToolSearchDescriptionCache2());
644430
644603
  Promise.resolve().then(() => (init_loadAgentsDir(), exports_loadAgentsDir)).then(({ clearAgentDefinitionsCache: clearAgentDefinitionsCache2 }) => clearAgentDefinitionsCache2());
644431
- Promise.resolve().then(() => (init_prompt26(), exports_prompt6)).then(({ clearPromptCache: clearPromptCache2 }) => clearPromptCache2());
644604
+ Promise.resolve().then(() => (init_prompt27(), exports_prompt6)).then(({ clearPromptCache: clearPromptCache2 }) => clearPromptCache2());
644432
644605
  }
644433
644606
  var init_caches = __esm(() => {
644434
644607
  init_featureFlags();
@@ -652324,6 +652497,7 @@ var LARGE_TOOL_RESULT_PERCENT = 15, LARGE_TOOL_RESULT_TOKENS = 1e4, READ_BLOAT_P
652324
652497
  var init_contextSuggestions = __esm(() => {
652325
652498
  init_prompt3();
652326
652499
  init_prompt2();
652500
+ init_prompt6();
652327
652501
  init_file();
652328
652502
  init_format();
652329
652503
  });
@@ -653587,7 +653761,7 @@ var init_context_noninteractive = __esm(() => {
653587
653761
  init_commands5();
653588
653762
  init_microCompact();
653589
653763
  init_tokenEstimation();
653590
- init_prompt26();
653764
+ init_prompt27();
653591
653765
  init_analyzeContext();
653592
653766
  init_cwd2();
653593
653767
  init_format();
@@ -669349,7 +669523,7 @@ async function loadInstallCountsCache() {
669349
669523
  return null;
669350
669524
  }
669351
669525
  const now2 = Date.now();
669352
- if (now2 - fetchedAt > CACHE_TTL_MS4) {
669526
+ if (now2 - fetchedAt > CACHE_TTL_MS3) {
669353
669527
  logForDebugging("Install counts cache is stale (>24h old)");
669354
669528
  return null;
669355
669529
  }
@@ -669446,7 +669620,7 @@ function formatInstallCount(count4) {
669446
669620
  const formatted = m5.toFixed(1);
669447
669621
  return formatted.endsWith(".0") ? `${formatted.slice(0, -2)}M` : `${formatted}M`;
669448
669622
  }
669449
- 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_MS4;
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;
669450
669624
  var init_installCounts = __esm(() => {
669451
669625
  init_axios2();
669452
669626
  init_debug();
@@ -669456,7 +669630,7 @@ var init_installCounts = __esm(() => {
669456
669630
  init_slowOperations();
669457
669631
  init_fetchTelemetry();
669458
669632
  init_pluginDirectories();
669459
- CACHE_TTL_MS4 = 24 * 60 * 60 * 1000;
669633
+ CACHE_TTL_MS3 = 24 * 60 * 60 * 1000;
669460
669634
  });
669461
669635
 
669462
669636
  // src/commands/plugin/PluginOptionsDialog.tsx
@@ -690867,7 +691041,7 @@ var init_Messages = __esm(() => {
690867
691041
  });
690868
691042
  proactiveModule4 = feature("PROACTIVE") || feature("KAIROS") ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
690869
691043
  BRIEF_TOOL_NAME6 = feature("KAIROS") || feature("KAIROS_BRIEF") ? (init_prompt(), __toCommonJS(exports_prompt)).BRIEF_TOOL_NAME : null;
690870
- SEND_USER_FILE_TOOL_NAME4 = feature("KAIROS") ? (init_prompt7(), __toCommonJS(exports_prompt2)).SEND_USER_FILE_TOOL_NAME : null;
691044
+ SEND_USER_FILE_TOOL_NAME4 = feature("KAIROS") ? (init_prompt8(), __toCommonJS(exports_prompt2)).SEND_USER_FILE_TOOL_NAME : null;
690871
691045
  Messages4 = React89.memo(MessagesImpl, (prev, next2) => {
690872
691046
  const keys3 = Object.keys(prev);
690873
691047
  for (const key4 of keys3) {
@@ -699225,7 +699399,7 @@ var init_RemoteSessionDetailDialog = __esm(() => {
699225
699399
  init_ink2();
699226
699400
  init_RemoteAgentTask();
699227
699401
  init_constants3();
699228
- init_prompt8();
699402
+ init_prompt9();
699229
699403
  init_browser();
699230
699404
  init_errors();
699231
699405
  init_format();
@@ -731726,7 +731900,7 @@ var init_prompts4 = __esm(() => {
731726
731900
  init_betas2();
731727
731901
  init_forkSubagent();
731728
731902
  init_systemPromptSections();
731729
- init_prompt12();
731903
+ init_prompt13();
731730
731904
  init_xml();
731731
731905
  init_debug();
731732
731906
  init_memdir();
@@ -760461,40 +760635,6 @@ var init_useVoiceEnabled = __esm(() => {
760461
760635
  import_react225 = __toESM(require_react(), 1);
760462
760636
  });
760463
760637
 
760464
- // src/utils/oauthLoginExpiry.ts
760465
- function computeOAuthLoginExpiry(tokens, context8, now2 = Date.now()) {
760466
- if (!context8.providerIsFirstParty || !context8.isClaudeAISubscriber) {
760467
- return null;
760468
- }
760469
- if (!tokens || typeof tokens.refreshTokenExpiresAt !== "number") {
760470
- return null;
760471
- }
760472
- const refreshTokenExpiresAt = tokens.refreshTokenExpiresAt;
760473
- if (typeof tokens.expiresAt === "number" && tokens.expiresAt > refreshTokenExpiresAt + LOGIN_EXPIRY_WARN_WINDOW_MS) {
760474
- return null;
760475
- }
760476
- const remaining = refreshTokenExpiresAt - now2;
760477
- if (remaining > LOGIN_EXPIRY_WARN_WINDOW_MS || remaining <= 0) {
760478
- return null;
760479
- }
760480
- return { daysLeft: Math.ceil(remaining / MS_PER_DAY) };
760481
- }
760482
- function getOAuthLoginExpiryInfo() {
760483
- return computeOAuthLoginExpiry(getClaudeAIOAuthTokens(), {
760484
- providerIsFirstParty: getAPIProvider() === "firstParty",
760485
- isClaudeAISubscriber: isClaudeAISubscriber()
760486
- });
760487
- }
760488
- function pluralize2(count4, noun) {
760489
- return count4 === 1 ? noun : `${noun}s`;
760490
- }
760491
- var MS_PER_DAY = 86400000, LOGIN_EXPIRY_WARN_WINDOW_MS;
760492
- var init_oauthLoginExpiry = __esm(() => {
760493
- init_providers();
760494
- init_auth6();
760495
- LOGIN_EXPIRY_WARN_WINDOW_MS = 3 * MS_PER_DAY;
760496
- });
760497
-
760498
760638
  // src/components/PromptInput/OAuthExpiryNotice.tsx
760499
760639
  function OAuthExpiryNotice() {
760500
760640
  const { addNotification } = useNotifications();
@@ -764445,7 +764585,7 @@ var init_commandSuggestions = __esm(() => {
764445
764585
  // src/utils/suggestions/shellHistoryCompletion.ts
764446
764586
  async function getShellHistoryCommands() {
764447
764587
  const now2 = Date.now();
764448
- if (shellHistoryCache && now2 - shellHistoryCacheTimestamp < CACHE_TTL_MS5) {
764588
+ if (shellHistoryCache && now2 - shellHistoryCacheTimestamp < CACHE_TTL_MS4) {
764449
764589
  return shellHistoryCache;
764450
764590
  }
764451
764591
  const commands7 = [];
@@ -764506,7 +764646,7 @@ function getShellHistoryCompletionSync(input2) {
764506
764646
  async function warmShellHistoryCache() {
764507
764647
  await getShellHistoryCommands();
764508
764648
  }
764509
- var shellHistoryCache = null, shellHistoryCacheTimestamp = 0, CACHE_TTL_MS5 = 60000;
764649
+ var shellHistoryCache = null, shellHistoryCacheTimestamp = 0, CACHE_TTL_MS4 = 60000;
764510
764650
  var init_shellHistoryCompletion = __esm(() => {
764511
764651
  init_history();
764512
764652
  init_debug();
@@ -793791,7 +793931,7 @@ var init_tipRegistry = __esm(() => {
793791
793931
  init_color();
793792
793932
  init_OverageCreditUpsell();
793793
793933
  init_shortcutFormat();
793794
- init_prompt9();
793934
+ init_prompt10();
793795
793935
  init_auth6();
793796
793936
  init_concurrentSessions();
793797
793937
  init_config4();
@@ -794763,6 +794903,28 @@ var init_previewNeutralizer = __esm(() => {
794763
794903
  LOOKALIKE_SINGLE_QUOTES_RE = /[\u2018\u2019\u201A\u201B]/g;
794764
794904
  });
794765
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
+
794766
794928
  // src/cli/ndjsonSafeStringify.ts
794767
794929
  function escapeJsLineTerminators(json2) {
794768
794930
  return json2.replace(JS_LINE_TERMINATORS, (c9) => c9 === "\u2028" ? "\\u2028" : "\\u2029");
@@ -795103,6 +795265,7 @@ class StructuredIO {
795103
795265
  const requestId = randomUUID62();
795104
795266
  const neutralizedRequestInput = neutralizePreviewInput(input2);
795105
795267
  onPermissionPrompt?.(buildRequiresActionDetails(tool, neutralizedRequestInput, toolUseID, requestId));
795268
+ const cancelPermissionPromptNotify = schedulePermissionPromptNotifyHook(getToolDisplayName(tool.name));
795106
795269
  const sdkPromise = this.sendRequest({
795107
795270
  subtype: "can_use_tool",
795108
795271
  tool_name: tool.name,
@@ -795113,6 +795276,7 @@ class StructuredIO {
795113
795276
  tool_use_id: toolUseID,
795114
795277
  agent_id: toolUseContext.agentId
795115
795278
  }, outputSchema41(), hookAbortController.signal, requestId).then((result) => ({ source: "sdk", result }));
795279
+ sdkPromise.then(cancelPermissionPromptNotify, cancelPermissionPromptNotify);
795116
795280
  const winner = await Promise.race([hookPromise, sdkPromise]);
795117
795281
  if (winner.source === "hook") {
795118
795282
  if (winner.decision) {
@@ -795177,14 +795341,19 @@ class StructuredIO {
795177
795341
  createSandboxAskCallback() {
795178
795342
  return async (hostPattern) => {
795179
795343
  try {
795180
- const result = await this.sendRequest({
795181
- subtype: "can_use_tool",
795182
- tool_name: SANDBOX_NETWORK_ACCESS_TOOL_NAME,
795183
- input: { host: hostPattern.host },
795184
- tool_use_id: randomUUID62(),
795185
- description: `Allow network connection to ${hostPattern.host}?`
795186
- }, outputSchema41());
795187
- return result.behavior === "allow";
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
+ }
795188
795357
  } catch {
795189
795358
  return false;
795190
795359
  }
@@ -795263,6 +795432,7 @@ var init_structuredIO = __esm(() => {
795263
795432
  init_slowOperations();
795264
795433
  init_v4();
795265
795434
  init_hooks5();
795435
+ init_permissionPromptNotify();
795266
795436
  init_PermissionUpdate();
795267
795437
  init_sessionState();
795268
795438
  init_slowOperations();
@@ -800961,7 +801131,7 @@ var init_useScheduledTasks = __esm(() => {
800961
801131
  init_AppState();
800962
801132
  init_Task();
800963
801133
  init_InProcessTeammateTask();
800964
- init_prompt9();
801134
+ init_prompt10();
800965
801135
  init_cronJitterConfig();
800966
801136
  init_cronScheduler();
800967
801137
  init_cronTasks();
@@ -804710,7 +804880,8 @@ var init_REPL = __esm(() => {
804710
804880
  init_ExitPlanModePermissionRequest();
804711
804881
  init_permissionSetup();
804712
804882
  init_filesystem();
804713
- init_prompt12();
804883
+ init_prompt6();
804884
+ init_prompt13();
804714
804885
  init_bashPermissions();
804715
804886
  init_config4();
804716
804887
  init_billing();
@@ -810393,7 +810564,7 @@ Examples:
810393
810564
  /batch add type annotations to all untyped function parameters`;
810394
810565
  var init_batch = __esm(() => {
810395
810566
  init_constants3();
810396
- init_prompt8();
810567
+ init_prompt9();
810397
810568
  init_git();
810398
810569
  init_bundledSkills();
810399
810570
  WORKER_INSTRUCTIONS = `After you finish implementing the change:
@@ -812744,7 +812915,7 @@ function registerLoopSkill() {
812744
812915
  }
812745
812916
  var DEFAULT_INTERVAL = "10m", USAGE_MESSAGE;
812746
812917
  var init_loop = __esm(() => {
812747
- init_prompt9();
812918
+ init_prompt10();
812748
812919
  init_bundledSkills();
812749
812920
  USAGE_MESSAGE = `Usage: /loop [interval] <prompt>
812750
812921
 
@@ -813110,7 +813281,7 @@ var BASE58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", BASE_
813110
813281
  var init_scheduleRemoteAgents = __esm(() => {
813111
813282
  init_growthbook();
813112
813283
  init_policyLimits();
813113
- init_prompt8();
813284
+ init_prompt9();
813114
813285
  init_auth6();
813115
813286
  init_preconditions();
813116
813287
  init_debug();
@@ -813723,7 +813894,7 @@ async function logSkillsLoaded(cwd2, contextWindowTokens) {
813723
813894
  var init_skillLoadedEvent = __esm(() => {
813724
813895
  init_commands5();
813725
813896
  init_analytics();
813726
- init_prompt26();
813897
+ init_prompt27();
813727
813898
  });
813728
813899
 
813729
813900
  // src/cli/exit.ts
@@ -815854,7 +816025,7 @@ var init_streamlinedTransform = __esm(() => {
815854
816025
  init_prompt3();
815855
816026
  init_prompt4();
815856
816027
  init_prompt2();
815857
- init_prompt6();
816028
+ init_prompt7();
815858
816029
  init_messages3();
815859
816030
  init_shellToolUtils();
815860
816031
  init_stringUtils();
@@ -820412,7 +820583,7 @@ var init_print = __esm(() => {
820412
820583
  proactiveModule9 = feature("PROACTIVE") || feature("KAIROS") ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
820413
820584
  cronSchedulerModule = feature("AGENT_TRIGGERS") ? (init_cronScheduler(), __toCommonJS(exports_cronScheduler)) : null;
820414
820585
  cronJitterConfigModule = feature("AGENT_TRIGGERS") ? (init_cronJitterConfig(), __toCommonJS(exports_cronJitterConfig)) : null;
820415
- cronGate = feature("AGENT_TRIGGERS") ? (init_prompt9(), __toCommonJS(exports_prompt3)) : null;
820586
+ cronGate = feature("AGENT_TRIGGERS") ? (init_prompt10(), __toCommonJS(exports_prompt3)) : null;
820416
820587
  extractMemoriesModule3 = feature("EXTRACT_MEMORIES") ? (init_extractMemories(), __toCommonJS(exports_extractMemories)) : null;
820417
820588
  receivedMessageUuids = new Set;
820418
820589
  receivedMessageUuidsOrder = [];