// @bun
import {
  computeNextCronRun,
  init_cron,
  parseCronExpression
} from "./chunk-093ej2sf.js";
import {
  AGENT_TOOL_NAME,
  TASK_OUTPUT_TOOL_NAME,
  TASK_STOP_TOOL_NAME,
  getFeatureValue_CACHED_MAY_BE_STALE,
  getFeatureValue_CACHED_WITH_REFRESH,
  getMainLoopModel,
  init_constants1 as init_constants,
  init_constants2,
  init_growthbook,
  init_model,
  init_prompt
} from "./chunk-7rrkrej7.js";
import {
  init_json,
  safeParseJSON
} from "./chunk-6r0bxrh6.js";
import {
  init_lazySchema,
  lazySchema
} from "./chunk-bgan4cpf.js";
import {
  getPlatform,
  init_platform
} from "./chunk-ch4pgvwq.js";
import {
  require_ajv
} from "./chunk-hjmatcgt.js";
import {
  init_v4
} from "./chunk-6mdh70q0.js";
import {
  exports_external
} from "./chunk-ch92ycde.js";
import {
  TICK_TAG,
  init_log,
  init_xml,
  logError
} from "./chunk-8wsj9fff.js";
import {
  TelemetrySafeError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
  getFsImplementation,
  init_debug,
  init_errors,
  init_fsOperations,
  init_slowOperations,
  isFsInaccessible,
  jsonStringify,
  logForDebugging
} from "./chunk-byd20vdq.js";
import {
  addSessionCronTask,
  getProjectRoot,
  getSessionCronTasks,
  init_state,
  removeSessionCronTasks
} from "./chunk-3j8w0rq8.js";
import {
  init_envUtils,
  isEnvDefinedFalsy,
  isEnvTruthy
} from "./chunk-6k1rsk85.js";
import {
  init_memoize,
  memoize_default
} from "./chunk-nxzx0ey9.js";
import {
  __esm,
  __export,
  __toESM
} from "./chunk-hhsxm2yr.js";

// packages/builtin-tools/src/tools/ExitPlanModeTool/constants.ts
var EXIT_PLAN_MODE_TOOL_NAME = "ExitPlanMode", EXIT_PLAN_MODE_V2_TOOL_NAME = "ExitPlanMode";
var init_constants3 = () => {};

// packages/builtin-tools/src/tools/EnterPlanModeTool/constants.ts
var ENTER_PLAN_MODE_TOOL_NAME = "EnterPlanMode";
var init_constants4 = () => {};

// packages/builtin-tools/src/tools/AskUserQuestionTool/prompt.ts
var ASK_USER_QUESTION_TOOL_NAME = "AskUserQuestion", ASK_USER_QUESTION_TOOL_CHIP_WIDTH = 12, DESCRIPTION = "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;
var init_prompt2 = __esm(() => {
  init_constants3();
  PREVIEW_FEATURE_PROMPT = {
    markdown: `
Preview feature:
Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
- ASCII mockups of UI layouts or components
- Code snippets showing different implementations
- Diagram variations
- Configuration examples

Preview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
`,
    html: `
Preview feature:
Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
- HTML mockups of UI layouts or components
- Formatted code snippets showing different implementations
- Visual comparisons or diagrams

Preview content must be a self-contained HTML fragment (no <html>/<body> wrapper, no <script> or <style> tags \u2014 use inline style attributes instead). Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
`
  };
  ASK_USER_QUESTION_TOOL_PROMPT = `Use this tool when you need to ask the user questions during execution. This allows you to:
1. Gather user preferences or requirements
2. Clarify ambiguous instructions
3. Get decisions on implementation choices as you work
4. Offer choices to the user about what direction to take.

Usage notes:
- Users will always be able to select "Other" to provide custom text input
- Use multiSelect: true to allow multiple answers to be selected for a question
- If you recommend a specific option, make that the first option in the list and add "(Recommended)" at the end of the label

Plan mode note: In plan mode, use this tool to clarify requirements or choose between approaches BEFORE finalizing your plan. Do NOT use this tool to ask "Is my plan ready?" or "Should I proceed?" - use ${EXIT_PLAN_MODE_TOOL_NAME} for plan approval. IMPORTANT: Do not reference "the plan" in your questions (e.g., "Do you have feedback about the plan?", "Does the plan look good?") because the user cannot see the plan in the UI until you call ${EXIT_PLAN_MODE_TOOL_NAME}. If you need plan approval, use ${EXIT_PLAN_MODE_TOOL_NAME} instead.
`;
});

// src/utils/pdfUtils.ts
function parsePDFPageRange(pages) {
  const trimmed = pages.trim();
  if (!trimmed) {
    return null;
  }
  if (trimmed.endsWith("-")) {
    const first2 = parseInt(trimmed.slice(0, -1), 10);
    if (isNaN(first2) || first2 < 1) {
      return null;
    }
    return { firstPage: first2, lastPage: Infinity };
  }
  const dashIndex = trimmed.indexOf("-");
  if (dashIndex === -1) {
    const page = parseInt(trimmed, 10);
    if (isNaN(page) || page < 1) {
      return null;
    }
    return { firstPage: page, lastPage: page };
  }
  const first = parseInt(trimmed.slice(0, dashIndex), 10);
  const last = parseInt(trimmed.slice(dashIndex + 1), 10);
  if (isNaN(first) || isNaN(last) || first < 1 || last < 1 || last < first) {
    return null;
  }
  return { firstPage: first, lastPage: last };
}
function isPDFSupported() {
  return !getMainLoopModel().toLowerCase().includes("claude-3-haiku");
}
function isPDFExtension(ext) {
  const normalized = ext.startsWith(".") ? ext.slice(1) : ext;
  return DOCUMENT_EXTENSIONS.has(normalized.toLowerCase());
}
var DOCUMENT_EXTENSIONS;
var init_pdfUtils = __esm(() => {
  init_model();
  DOCUMENT_EXTENSIONS = new Set(["pdf"]);
});

// packages/builtin-tools/src/tools/BashTool/toolName.ts
var BASH_TOOL_NAME = "Bash";
var init_toolName = () => {};

// packages/builtin-tools/src/tools/FileReadTool/prompt.ts
function renderPromptTemplate(lineFormat, maxSizeInstruction, offsetInstruction) {
  return `Reads a file from the local filesystem. You can access any file directly by using this tool.
Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.

Usage:
- The file_path parameter must be an absolute path, not a relative path
- By default, it reads up to ${MAX_LINES_TO_READ} lines starting from the beginning of the file${maxSizeInstruction}
${offsetInstruction}
${lineFormat}
- This tool allows Chris Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Chris Code is a multimodal LLM.${isPDFSupported() ? `
- This tool can read PDF files (.pdf). For large PDFs (more than 10 pages), you MUST provide the pages parameter to read specific page ranges (e.g., pages: "1-5"). Reading a large PDF without the pages parameter will fail. Maximum 20 pages per request.` : ""}
- This tool can read Jupyter notebooks (.ipynb files) and returns all cells with their outputs, combining code, text, and visualizations.
- This tool can only read files, not directories. To read a directory, use an ls command via the ${BASH_TOOL_NAME} tool.
- You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.
- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.`;
}
var FILE_READ_TOOL_NAME = "Read", FILE_UNCHANGED_STUB = "File unchanged since last read. The content from the earlier Read tool_result in this conversation is still current \u2014 refer to that instead of re-reading.", MAX_LINES_TO_READ = 2000, DESCRIPTION2 = "Read a file from the local filesystem.", LINE_FORMAT_INSTRUCTION = "- Results are returned using cat -n format, with line numbers starting at 1", OFFSET_INSTRUCTION_DEFAULT = "- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters", OFFSET_INSTRUCTION_TARGETED = "- When you already know which part of the file you need, only read that part. This can be important for larger files.";
var init_prompt3 = __esm(() => {
  init_pdfUtils();
  init_toolName();
});

// src/constants/common.ts
function getLocalISODate() {
  if (process.env.CLAUDE_CODE_OVERRIDE_DATE) {
    return process.env.CLAUDE_CODE_OVERRIDE_DATE;
  }
  const now = new Date;
  const year = now.getFullYear();
  const month = String(now.getMonth() + 1).padStart(2, "0");
  const day = String(now.getDate()).padStart(2, "0");
  return `${year}-${month}-${day}`;
}
function getLocalMonthYear() {
  const date = process.env.CLAUDE_CODE_OVERRIDE_DATE ? new Date(process.env.CLAUDE_CODE_OVERRIDE_DATE) : new Date;
  return date.toLocaleString("en-US", { month: "long", year: "numeric" });
}
var getSessionStartDate;
var init_common = __esm(() => {
  init_memoize();
  getSessionStartDate = memoize_default(getLocalISODate);
});

// packages/builtin-tools/src/tools/WebSearchTool/prompt.ts
function getWebSearchPrompt() {
  const currentMonthYear = getLocalMonthYear();
  return `
- Allows Claude to search the web and use the results to inform responses
- Provides up-to-date information for current events and recent data
- Returns search result information formatted as search result blocks, including links as markdown hyperlinks
- Use this tool for accessing information beyond Claude's knowledge cutoff
- Searches are performed automatically within a single API call

CRITICAL REQUIREMENT - You MUST follow this:
  - After answering the user's question, you MUST include a "Sources:" section at the end of your response
  - In the Sources section, list all relevant URLs from the search results as markdown hyperlinks: [Title](URL)
  - This is MANDATORY - never skip including sources in your response
  - Example format:

    [Your answer here]

    Sources:
    - [Source Title 1](https://example.com/1)
    - [Source Title 2](https://example.com/2)

Usage notes:
  - Domain filtering is supported to include or block specific websites
  - Web search is only available in the US

IMPORTANT - Use the correct year in search queries:
  - The current month is ${currentMonthYear}. You MUST use this year when searching for recent information, documentation, or current events.
  - Example: If the user asks for "latest React docs", search for "React documentation" with the current year, NOT last year
`;
}
var WEB_SEARCH_TOOL_NAME = "WebSearch";
var init_prompt4 = __esm(() => {
  init_common();
});

// packages/builtin-tools/src/tools/TodoWriteTool/constants.ts
var TODO_WRITE_TOOL_NAME = "TodoWrite";
var init_constants5 = () => {};

// packages/builtin-tools/src/tools/GrepTool/prompt.ts
function getDescription() {
  return `A powerful search tool built on ripgrep

  Usage:
  - ALWAYS use ${GREP_TOOL_NAME} for search tasks. NEVER invoke \`grep\` or \`rg\` as a ${BASH_TOOL_NAME} command. The ${GREP_TOOL_NAME} tool has been optimized for correct permissions and access.
  - Supports full regex syntax (e.g., "log.*Error", "function\\s+\\w+")
  - Filter files with glob parameter (e.g., "*.js", "**/*.tsx") or type parameter (e.g., "js", "py", "rust")
  - Output modes: "content" shows matching lines, "files_with_matches" shows only file paths (default), "count" shows match counts
  - Use ${AGENT_TOOL_NAME} tool for open-ended searches requiring multiple rounds
  - Pattern syntax: Uses ripgrep (not grep) - literal braces need escaping (use \`interface\\{\\}\` to find \`interface{}\` in Go code)
  - Multiline matching: By default patterns match within single lines only. For cross-line patterns like \`struct \\{[\\s\\S]*?field\`, use \`multiline: true\`
`;
}
var GREP_TOOL_NAME = "Grep";
var init_prompt5 = __esm(() => {
  init_constants();
  init_toolName();
});

// packages/builtin-tools/src/tools/WebFetchTool/prompt.ts
function makeSecondaryModelPrompt(markdownContent, prompt, isPreapprovedDomain) {
  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:
 - Enforce a strict 125-character maximum for quotes from any source document. Open Source Software is ok as long as we respect the license.
 - Use quotation marks for exact language from articles; any language outside of the quotation should never be word-for-word the same.
 - You are not a lawyer and never comment on the legality of your own prompts and responses.
 - Never produce or reproduce exact song lyrics.`;
  return `
Web page content:
---
${markdownContent}
---

${prompt}

${guidelines}
`;
}
var WEB_FETCH_TOOL_NAME = "WebFetch", DESCRIPTION3 = `
- Fetches content from a specified URL and processes it using an AI model
- Takes a URL and a prompt as input
- Fetches the URL content, converts HTML to markdown
- Processes the content with the prompt using a small, fast model
- Returns the model's response about the content
- Use this tool when you need to retrieve and analyze web content

Usage notes:
  - IMPORTANT: If an MCP-provided web fetch tool is available, prefer using that tool instead of this one, as it may have fewer restrictions.
  - The URL must be a fully-formed valid URL
  - HTTP URLs will be automatically upgraded to HTTPS
  - The prompt should describe what information you want to extract from the page
  - This tool is read-only and does not modify any files
  - Results may be summarized if the content is very large
  - Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
  - 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.
  - For GitHub URLs, prefer using the gh CLI via Bash instead (e.g., gh pr view, gh issue view, gh api).
`;
var init_prompt6 = () => {};

// packages/builtin-tools/src/tools/GlobTool/prompt.ts
var GLOB_TOOL_NAME = "Glob", DESCRIPTION4 = `- Fast file pattern matching tool that works with any codebase size
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
- Returns matching file paths sorted by modification time
- Use this tool when you need to find files by name patterns
- When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead`;
var init_prompt7 = () => {};

// packages/builtin-tools/src/tools/PowerShellTool/toolName.ts
var POWERSHELL_TOOL_NAME = "PowerShell";
var init_toolName2 = () => {};

// src/utils/shell/shellToolUtils.ts
function isPowerShellToolEnabled() {
  if (getPlatform() !== "windows")
    return false;
  return process.env.USER_TYPE === "ant" ? !isEnvDefinedFalsy(process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL) : isEnvTruthy(process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL);
}
var SHELL_TOOL_NAMES;
var init_shellToolUtils = __esm(() => {
  init_toolName();
  init_toolName2();
  init_envUtils();
  init_platform();
  SHELL_TOOL_NAMES = [BASH_TOOL_NAME, POWERSHELL_TOOL_NAME];
});

// packages/builtin-tools/src/tools/FileEditTool/constants.ts
var FILE_EDIT_TOOL_NAME = "Edit", CLAUDE_FOLDER_PERMISSION_PATTERN = "/.claude/**", GLOBAL_CLAUDE_FOLDER_PERMISSION_PATTERN = "~/.claude/**", FILE_UNEXPECTEDLY_MODIFIED_ERROR = "File has been unexpectedly modified. Read it again before attempting to write it.";
var init_constants6 = () => {};

// packages/builtin-tools/src/tools/FileWriteTool/prompt.ts
function getPreReadInstruction() {
  return `
- If this is an existing file, you MUST use the ${FILE_READ_TOOL_NAME} tool first to read the file's contents. This tool will fail if you did not read the file first.`;
}
function getWriteToolDescription() {
  return `Writes a file to the local filesystem.

Usage:
- This tool will overwrite the existing file if there is one at the provided path.${getPreReadInstruction()}
- Prefer the Edit tool for modifying existing files \u2014 it only sends the diff. Only use this tool to create new files or for complete rewrites.
- NEVER create documentation files (*.md) or README files unless explicitly requested by the User.
- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.`;
}
var FILE_WRITE_TOOL_NAME = "Write";
var init_prompt8 = __esm(() => {
  init_prompt3();
});

// packages/builtin-tools/src/tools/NotebookEditTool/constants.ts
var NOTEBOOK_EDIT_TOOL_NAME = "NotebookEdit";
var init_constants7 = () => {};

// packages/builtin-tools/src/tools/SkillTool/constants.ts
var SKILL_TOOL_NAME = "Skill";
var init_constants8 = () => {};

// packages/builtin-tools/src/tools/SendMessageTool/constants.ts
var SEND_MESSAGE_TOOL_NAME = "SendMessage";
var init_constants9 = () => {};

// packages/builtin-tools/src/tools/TaskCreateTool/constants.ts
var TASK_CREATE_TOOL_NAME = "TaskCreate";
var init_constants10 = () => {};

// packages/builtin-tools/src/tools/TaskGetTool/constants.ts
var TASK_GET_TOOL_NAME = "TaskGet";
var init_constants11 = () => {};

// packages/builtin-tools/src/tools/TaskListTool/constants.ts
var TASK_LIST_TOOL_NAME = "TaskList";
var init_constants12 = () => {};

// packages/builtin-tools/src/tools/TaskUpdateTool/constants.ts
var TASK_UPDATE_TOOL_NAME = "TaskUpdate";
var init_constants13 = () => {};

// packages/builtin-tools/src/tools/SearchExtraToolsTool/constants.ts
var SEARCH_EXTRA_TOOLS_TOOL_NAME = "SearchExtraTools";
var init_constants14 = () => {};

// src/Tool.ts
function filterToolProgressMessages(progressMessagesForMessage) {
  return progressMessagesForMessage.filter((msg) => msg.data?.type !== "hook_progress");
}
function toolMatchesName(tool, name) {
  return tool.name === name || (tool.aliases?.includes(name) ?? false);
}
function findToolByName(tools, name) {
  return tools.find((t) => toolMatchesName(t, name));
}
function buildTool(def) {
  return {
    ...TOOL_DEFAULTS,
    userFacingName: () => def.name,
    ...def
  };
}
var getEmptyToolPermissionContext = () => ({
  mode: "default",
  additionalWorkingDirectories: new Map,
  alwaysAllowRules: {},
  alwaysDenyRules: {},
  alwaysAskRules: {},
  isBypassPermissionsModeAvailable: true
}), TOOL_DEFAULTS;
var init_Tool = __esm(() => {
  TOOL_DEFAULTS = {
    isEnabled: () => true,
    isConcurrencySafe: (_input) => false,
    isReadOnly: (_input) => false,
    isDestructive: (_input) => false,
    checkPermissions: (input, _ctx) => Promise.resolve({ behavior: "allow", updatedInput: input }),
    toAutoClassifierInput: (_input) => "",
    userFacingName: (_input) => ""
  };
});

// packages/builtin-tools/src/tools/SyntheticOutputTool/SyntheticOutputTool.ts
function isSyntheticOutputToolEnabled(opts) {
  return opts.isNonInteractiveSession;
}
function createSyntheticOutputTool(jsonSchema) {
  const cached = toolCache.get(jsonSchema);
  if (cached)
    return cached;
  const result = buildSyntheticOutputTool(jsonSchema);
  toolCache.set(jsonSchema, result);
  return result;
}
function buildSyntheticOutputTool(jsonSchema) {
  try {
    const ajv = new import_ajv.Ajv({ allErrors: true });
    const isValidSchema = ajv.validateSchema(jsonSchema);
    if (!isValidSchema) {
      return { error: ajv.errorsText(ajv.errors) };
    }
    const validateSchema = ajv.compile(jsonSchema);
    return {
      tool: {
        ...SyntheticOutputTool,
        inputJSONSchema: jsonSchema,
        async call(input) {
          const isValid = validateSchema(input);
          if (!isValid) {
            const errors = validateSchema.errors?.map((e) => `${e.instancePath || "root"}: ${e.message}`).join(", ");
            throw new TelemetrySafeError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS(`Output does not match required schema: ${errors}`, `StructuredOutput schema mismatch: ${(errors ?? "").slice(0, 150)}`);
          }
          return {
            data: "Structured output provided successfully",
            structured_output: input
          };
        }
      }
    };
  } catch (e) {
    return { error: e instanceof Error ? e.message : String(e) };
  }
}
var import_ajv, inputSchema, outputSchema, SYNTHETIC_OUTPUT_TOOL_NAME = "StructuredOutput", SyntheticOutputTool, toolCache;
var init_SyntheticOutputTool = __esm(() => {
  init_v4();
  init_Tool();
  init_errors();
  init_lazySchema();
  init_slowOperations();
  import_ajv = __toESM(require_ajv(), 1);
  inputSchema = lazySchema(() => exports_external.object({}).passthrough());
  outputSchema = lazySchema(() => exports_external.string().describe("Structured output tool result"));
  SyntheticOutputTool = buildTool({
    isMcp: false,
    isEnabled() {
      return true;
    },
    isConcurrencySafe() {
      return true;
    },
    isReadOnly() {
      return true;
    },
    isOpenWorld() {
      return false;
    },
    name: SYNTHETIC_OUTPUT_TOOL_NAME,
    searchHint: "return the final response as structured JSON",
    maxResultSizeChars: 1e5,
    async description() {
      return "Return structured output in the requested format";
    },
    async prompt() {
      return `Use this tool to return your final response in the requested structured format. You MUST call this tool exactly once at the end of your response to provide the structured output.`;
    },
    get inputSchema() {
      return inputSchema();
    },
    get outputSchema() {
      return outputSchema();
    },
    async call(input) {
      return {
        data: "Structured output provided successfully",
        structured_output: input
      };
    },
    async checkPermissions(input) {
      return {
        behavior: "allow",
        updatedInput: input
      };
    },
    renderToolUseMessage(input) {
      const keys = Object.keys(input);
      if (keys.length === 0)
        return null;
      if (keys.length <= 3) {
        return keys.map((k) => `${k}: ${jsonStringify(input[k])}`).join(", ");
      }
      return `${keys.length} fields: ${keys.slice(0, 3).join(", ")}\u2026`;
    },
    renderToolUseRejectedMessage() {
      return "Structured output rejected";
    },
    renderToolUseErrorMessage() {
      return "Structured output error";
    },
    renderToolUseProgressMessage() {
      return null;
    },
    renderToolResultMessage(output) {
      return output;
    },
    mapToolResultToToolResultBlockParam(content, toolUseID) {
      return {
        tool_use_id: toolUseID,
        type: "tool_result",
        content
      };
    }
  });
  toolCache = new WeakMap;
});

// packages/builtin-tools/src/tools/SleepTool/prompt.ts
var SLEEP_TOOL_NAME = "Sleep", DESCRIPTION5 = "Wait for a specified duration", SLEEP_TOOL_PROMPT;
var init_prompt9 = __esm(() => {
  init_xml();
  SLEEP_TOOL_PROMPT = `Wait for a specified duration. The user can interrupt the sleep at any time.

Use this when the user tells you to sleep or rest, when you have nothing to do, or when you're waiting for something.

You may receive <${TICK_TAG}> prompts \u2014 these are periodic check-ins. Look for useful work to do before sleeping.

You can call this concurrently with other tools \u2014 it won't interfere with them.

Prefer this over \`Bash(sleep ...)\` \u2014 it doesn't hold a shell process.

Each wake-up costs an API call, but the prompt cache expires after 5 minutes of inactivity \u2014 balance accordingly.`;
});

// packages/builtin-tools/src/tools/LSPTool/prompt.ts
var LSP_TOOL_NAME = "LSP", DESCRIPTION6 = `Interact with Language Server Protocol (LSP) servers to get code intelligence features.

Supported operations:
- goToDefinition: Find where a symbol is defined
- findReferences: Find all references to a symbol
- hover: Get hover information (documentation, type info) for a symbol
- documentSymbol: Get all symbols (functions, classes, variables) in a document
- workspaceSymbol: Search for symbols across the entire workspace
- goToImplementation: Find implementations of an interface or abstract method
- prepareCallHierarchy: Get call hierarchy item at a position (functions/methods)
- incomingCalls: Find all functions/methods that call the function at a position
- outgoingCalls: Find all functions/methods called by the function at a position

All operations require:
- filePath: The file to operate on
- line: The line number (1-based, as shown in editors)
- character: The character offset (1-based, as shown in editors)

Note: LSP servers must be configured for the file type. If no server is available, an error will be returned.`;
var init_prompt10 = () => {};

// packages/builtin-tools/src/tools/VerifyPlanExecutionTool/constants.ts
var exports_constants = {};
__export(exports_constants, {
  VERIFY_PLAN_EXECUTION_TOOL_NAME: () => VERIFY_PLAN_EXECUTION_TOOL_NAME
});
var VERIFY_PLAN_EXECUTION_TOOL_NAME = "VerifyPlanExecution";
var init_constants15 = () => {};

// packages/builtin-tools/src/tools/ExecuteTool/constants.ts
var EXECUTE_TOOL_NAME = "ExecuteExtraTool";
var init_constants16 = () => {};

// packages/builtin-tools/src/tools/EnterWorktreeTool/constants.ts
var ENTER_WORKTREE_TOOL_NAME = "EnterWorktree";
var init_constants17 = () => {};

// packages/builtin-tools/src/tools/ExitWorktreeTool/constants.ts
var EXIT_WORKTREE_TOOL_NAME = "ExitWorktree";
var init_constants18 = () => {};

// packages/builtin-tools/src/tools/WorkflowTool/constants.ts
var exports_constants2 = {};
__export(exports_constants2, {
  WORKFLOW_TOOL_NAME: () => WORKFLOW_TOOL_NAME,
  WORKFLOW_FILE_EXTENSIONS: () => WORKFLOW_FILE_EXTENSIONS,
  WORKFLOW_DIR_NAME: () => WORKFLOW_DIR_NAME
});
var WORKFLOW_TOOL_NAME = "workflow", WORKFLOW_DIR_NAME = ".claude/workflows", WORKFLOW_FILE_EXTENSIONS;
var init_constants19 = __esm(() => {
  WORKFLOW_FILE_EXTENSIONS = [".yml", ".yaml", ".md"];
});

// src/utils/cronTasks.ts
import { randomUUID } from "crypto";
import { readFileSync } from "fs";
import { mkdir, writeFile } from "fs/promises";
import { join } from "path";
function getCronFilePath(dir) {
  return join(dir ?? getProjectRoot(), CRON_FILE_REL);
}
async function readCronTasks(dir) {
  const fs = getFsImplementation();
  let raw;
  try {
    raw = await fs.readFile(getCronFilePath(dir), { encoding: "utf-8" });
  } catch (e) {
    if (isFsInaccessible(e))
      return [];
    logError(e);
    return [];
  }
  const parsed = safeParseJSON(raw, false);
  if (!parsed || typeof parsed !== "object")
    return [];
  const file = parsed;
  if (!Array.isArray(file.tasks))
    return [];
  const out = [];
  for (const t of file.tasks) {
    if (!t || typeof t.id !== "string" || typeof t.cron !== "string" || typeof t.prompt !== "string" || typeof t.createdAt !== "number") {
      logForDebugging(`[ScheduledTasks] skipping malformed task: ${jsonStringify(t)}`);
      continue;
    }
    if (!parseCronExpression(t.cron)) {
      logForDebugging(`[ScheduledTasks] skipping task ${t.id} with invalid cron '${t.cron}'`);
      continue;
    }
    out.push({
      id: t.id,
      cron: t.cron,
      prompt: t.prompt,
      createdAt: t.createdAt,
      ...typeof t.lastFiredAt === "number" ? { lastFiredAt: t.lastFiredAt } : {},
      ...t.recurring ? { recurring: true } : {},
      ...t.permanent ? { permanent: true } : {}
    });
  }
  return out;
}
function hasCronTasksSync(dir) {
  let raw;
  try {
    raw = readFileSync(getCronFilePath(dir), "utf-8");
  } catch {
    return false;
  }
  const parsed = safeParseJSON(raw, false);
  if (!parsed || typeof parsed !== "object")
    return false;
  const tasks = parsed.tasks;
  return Array.isArray(tasks) && tasks.length > 0;
}
async function writeCronTasks(tasks, dir) {
  const root = dir ?? getProjectRoot();
  await mkdir(join(root, ".claude"), { recursive: true });
  const body = {
    tasks: tasks.map(({ durable: _durable, ...rest }) => rest)
  };
  await writeFile(getCronFilePath(root), jsonStringify(body, null, 2) + `
`, "utf-8");
}
async function addCronTask(cron, prompt, recurring, durable, agentId) {
  const id = randomUUID().slice(0, 8);
  const task = {
    id,
    cron,
    prompt,
    createdAt: Date.now(),
    ...recurring ? { recurring: true } : {}
  };
  if (!durable) {
    addSessionCronTask({ ...task, ...agentId ? { agentId } : {} });
    return id;
  }
  const tasks = await readCronTasks();
  tasks.push(task);
  await writeCronTasks(tasks);
  return id;
}
async function removeCronTasks(ids, dir) {
  if (ids.length === 0)
    return;
  if (dir === undefined && removeSessionCronTasks(ids) === ids.length) {
    return;
  }
  const idSet = new Set(ids);
  const tasks = await readCronTasks(dir);
  const remaining = tasks.filter((t) => !idSet.has(t.id));
  if (remaining.length === tasks.length)
    return;
  await writeCronTasks(remaining, dir);
}
async function markCronTasksFired(ids, firedAt, dir) {
  if (ids.length === 0)
    return;
  const idSet = new Set(ids);
  const tasks = await readCronTasks(dir);
  let changed = false;
  for (const t of tasks) {
    if (idSet.has(t.id)) {
      t.lastFiredAt = firedAt;
      changed = true;
    }
  }
  if (!changed)
    return;
  await writeCronTasks(tasks, dir);
}
async function listAllCronTasks(dir) {
  const fileTasks = await readCronTasks(dir);
  if (dir !== undefined)
    return fileTasks;
  const sessionTasks = getSessionCronTasks().map((t) => ({
    ...t,
    durable: false
  }));
  return [...fileTasks, ...sessionTasks];
}
function nextCronRunMs(cron, fromMs) {
  const fields = parseCronExpression(cron);
  if (!fields)
    return null;
  const next = computeNextCronRun(fields, new Date(fromMs));
  return next ? next.getTime() : null;
}
function jitterFrac(taskId) {
  const frac = parseInt(taskId.slice(0, 8), 16) / 4294967296;
  return Number.isFinite(frac) ? frac : 0;
}
function jitteredNextCronRunMs(cron, fromMs, taskId, cfg = DEFAULT_CRON_JITTER_CONFIG) {
  const t1 = nextCronRunMs(cron, fromMs);
  if (t1 === null)
    return null;
  const t2 = nextCronRunMs(cron, t1);
  if (t2 === null)
    return t1;
  const jitter = Math.min(jitterFrac(taskId) * cfg.recurringFrac * (t2 - t1), cfg.recurringCapMs);
  return t1 + jitter;
}
function oneShotJitteredNextCronRunMs(cron, fromMs, taskId, cfg = DEFAULT_CRON_JITTER_CONFIG) {
  const t1 = nextCronRunMs(cron, fromMs);
  if (t1 === null)
    return null;
  if (new Date(t1).getMinutes() % cfg.oneShotMinuteMod !== 0)
    return t1;
  const lead = cfg.oneShotFloorMs + jitterFrac(taskId) * (cfg.oneShotMaxMs - cfg.oneShotFloorMs);
  return Math.max(t1 - lead, fromMs);
}
function findMissedTasks(tasks, nowMs) {
  return tasks.filter((t) => {
    const next = nextCronRunMs(t.cron, t.createdAt);
    return next !== null && next < nowMs;
  });
}
var CRON_FILE_REL, DEFAULT_CRON_JITTER_CONFIG;
var init_cronTasks = __esm(() => {
  init_state();
  init_cron();
  init_debug();
  init_errors();
  init_fsOperations();
  init_json();
  init_log();
  init_slowOperations();
  CRON_FILE_REL = join(".claude", "scheduled_tasks.json");
  DEFAULT_CRON_JITTER_CONFIG = {
    recurringFrac: 0.1,
    recurringCapMs: 15 * 60 * 1000,
    oneShotMaxMs: 90 * 1000,
    oneShotFloorMs: 0,
    oneShotMinuteMod: 30,
    recurringMaxAgeMs: 7 * 24 * 60 * 60 * 1000
  };
});

// packages/builtin-tools/src/tools/ScheduleCronTool/prompt.ts
var exports_prompt = {};
__export(exports_prompt, {
  isKairosCronEnabled: () => isKairosCronEnabled,
  isDurableCronEnabled: () => isDurableCronEnabled,
  buildCronListPrompt: () => buildCronListPrompt,
  buildCronDeletePrompt: () => buildCronDeletePrompt,
  buildCronCreatePrompt: () => buildCronCreatePrompt,
  buildCronCreateDescription: () => buildCronCreateDescription,
  DEFAULT_MAX_AGE_DAYS: () => DEFAULT_MAX_AGE_DAYS,
  CRON_LIST_TOOL_NAME: () => CRON_LIST_TOOL_NAME,
  CRON_LIST_DESCRIPTION: () => CRON_LIST_DESCRIPTION,
  CRON_DELETE_TOOL_NAME: () => CRON_DELETE_TOOL_NAME,
  CRON_DELETE_DESCRIPTION: () => CRON_DELETE_DESCRIPTION,
  CRON_CREATE_TOOL_NAME: () => CRON_CREATE_TOOL_NAME
});
function isKairosCronEnabled() {
  return !isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_CRON);
}
function isDurableCronEnabled() {
  return getFeatureValue_CACHED_WITH_REFRESH("tengu_kairos_cron_durable", true, KAIROS_CRON_REFRESH_MS);
}
function buildCronCreateDescription(durableEnabled) {
  return durableEnabled ? "Schedule a prompt to run at a future time \u2014 either recurring on a cron schedule, or once at a specific time. Pass durable: true to persist to .claude/scheduled_tasks.json; otherwise session-only." : "Schedule a prompt to run at a future time within this Claude session \u2014 either recurring on a cron schedule, or once at a specific time.";
}
function buildCronCreatePrompt(durableEnabled) {
  const durabilitySection = durableEnabled ? `## Durability

By default (durable: false) the job lives only in this Claude session \u2014 nothing is written to disk, and the job is gone when Claude exits. Pass durable: true to write to .claude/scheduled_tasks.json so the job survives restarts. Only use durable: true when the user explicitly asks for the task to persist ("keep doing this every day", "set this up permanently"). Most "remind me in 5 minutes" / "check back in an hour" requests should stay session-only.` : `## Session-only

Jobs live only in this Claude session \u2014 nothing is written to disk, and the job is gone when Claude exits.`;
  const durableRuntimeNote = durableEnabled ? "Durable jobs persist to .claude/scheduled_tasks.json and survive session restarts \u2014 on next launch they resume automatically. One-shot durable tasks that were missed while the REPL was closed are surfaced for catch-up. Session-only jobs die with the process. " : "";
  return `Schedule a prompt to be enqueued at a future time. Use for both recurring schedules and one-shot reminders.

Uses standard 5-field cron in the user's local timezone: minute hour day-of-month month day-of-week. "0 9 * * *" means 9am local \u2014 no timezone conversion needed.

## One-shot tasks (recurring: false)

For "remind me at X" or "at <time>, do Y" requests \u2014 fire once then auto-delete.
Pin minute/hour/day-of-month/month to specific values:
  "remind me at 2:30pm today to check the deploy" \u2192 cron: "30 14 <today_dom> <today_month> *", recurring: false
  "tomorrow morning, run the smoke test" \u2192 cron: "57 8 <tomorrow_dom> <tomorrow_month> *", recurring: false

## Recurring jobs (recurring: true, the default)

For "every N minutes" / "every hour" / "weekdays at 9am" requests:
  "*/5 * * * *" (every 5 min), "0 * * * *" (hourly), "0 9 * * 1-5" (weekdays at 9am local)

## Avoid the :00 and :30 minute marks when the task allows it

Every user who asks for "9am" gets \`0 9\`, and every user who asks for "hourly" gets \`0 *\` \u2014 which means requests from across the planet land on the API at the same instant. When the user's request is approximate, pick a minute that is NOT 0 or 30:
  "every morning around 9" \u2192 "57 8 * * *" or "3 9 * * *" (not "0 9 * * *")
  "hourly" \u2192 "7 * * * *" (not "0 * * * *")
  "in an hour or so, remind me to..." \u2192 pick whatever minute you land on, don't round

Only use minute 0 or 30 when the user names that exact time and clearly means it ("at 9:00 sharp", "at half past", coordinating with a meeting). When in doubt, nudge a few minutes early or late \u2014 the user will not notice, and the fleet will.

${durabilitySection}

## Runtime behavior

Jobs only fire while the REPL is idle (not mid-query). ${durableRuntimeNote}The scheduler adds a small deterministic jitter on top of whatever you pick: recurring tasks fire up to 10% of their period late (max 15 min); one-shot tasks landing on :00 or :30 fire up to 90 s early. Picking an off-minute is still the bigger lever.

Recurring tasks auto-expire after ${DEFAULT_MAX_AGE_DAYS} days \u2014 they fire one final time, then are deleted. This bounds session lifetime. Tell the user about the ${DEFAULT_MAX_AGE_DAYS}-day limit when scheduling recurring jobs.

Returns a job ID you can pass to ${CRON_DELETE_TOOL_NAME}.`;
}
function buildCronDeletePrompt(durableEnabled) {
  return durableEnabled ? `Cancel a cron job previously scheduled with ${CRON_CREATE_TOOL_NAME}. Removes it from .claude/scheduled_tasks.json (durable jobs) or the in-memory session store (session-only jobs).` : `Cancel a cron job previously scheduled with ${CRON_CREATE_TOOL_NAME}. Removes it from the in-memory session store.`;
}
function buildCronListPrompt(durableEnabled) {
  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.`;
}
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";
var init_prompt11 = __esm(() => {
  init_growthbook();
  init_cronTasks();
  init_envUtils();
  KAIROS_CRON_REFRESH_MS = 5 * 60 * 1000;
  DEFAULT_MAX_AGE_DAYS = DEFAULT_CRON_JITTER_CONFIG.recurringMaxAgeMs / (24 * 60 * 60 * 1000);
});

// packages/builtin-tools/src/tools/LocalMemoryRecallTool/constants.ts
var LOCAL_MEMORY_RECALL_TOOL_NAME = "LocalMemoryRecall", PER_TURN_FETCH_BUDGET_BYTES, PREVIEW_CAP_BYTES, FETCH_CAP_BYTES, LIST_STORES_CAP_BYTES, LIST_ENTRIES_CAP_BYTES;
var init_constants20 = __esm(() => {
  PER_TURN_FETCH_BUDGET_BYTES = 100 * 1024;
  PREVIEW_CAP_BYTES = 2 * 1024;
  FETCH_CAP_BYTES = 50 * 1024;
  LIST_STORES_CAP_BYTES = 4 * 1024;
  LIST_ENTRIES_CAP_BYTES = 8 * 1024;
});

// packages/builtin-tools/src/tools/VaultHttpFetchTool/constants.ts
var VAULT_HTTP_FETCH_TOOL_NAME = "VaultHttpFetch", RESPONSE_BODY_CAP_BYTES = 1048576, REQUEST_TIMEOUT_MS = 30000;
var init_constants21 = () => {};

// src/constants/tools.ts
var ALL_AGENT_DISALLOWED_TOOLS, CUSTOM_AGENT_DISALLOWED_TOOLS, ASYNC_AGENT_ALLOWED_TOOLS, IN_PROCESS_TEAMMATE_ALLOWED_TOOLS, COORDINATOR_MODE_ALLOWED_TOOLS, CORE_TOOLS;
var init_tools = __esm(() => {
  init_constants2();
  init_constants3();
  init_constants4();
  init_constants();
  init_prompt2();
  init_prompt();
  init_prompt3();
  init_prompt4();
  init_constants5();
  init_prompt5();
  init_prompt6();
  init_prompt7();
  init_shellToolUtils();
  init_constants6();
  init_prompt8();
  init_constants7();
  init_constants8();
  init_constants9();
  init_constants10();
  init_constants11();
  init_constants12();
  init_constants13();
  init_constants14();
  init_SyntheticOutputTool();
  init_prompt9();
  init_prompt10();
  init_constants15();
  init_constants16();
  init_constants17();
  init_constants18();
  init_constants19();
  init_prompt11();
  init_constants20();
  init_constants21();
  ALL_AGENT_DISALLOWED_TOOLS = new Set([
    TASK_OUTPUT_TOOL_NAME,
    EXIT_PLAN_MODE_V2_TOOL_NAME,
    ENTER_PLAN_MODE_TOOL_NAME,
    ...process.env.USER_TYPE === "ant" ? [] : [AGENT_TOOL_NAME],
    ASK_USER_QUESTION_TOOL_NAME,
    TASK_STOP_TOOL_NAME,
    ...[WORKFLOW_TOOL_NAME],
    LOCAL_MEMORY_RECALL_TOOL_NAME,
    VAULT_HTTP_FETCH_TOOL_NAME
  ]);
  CUSTOM_AGENT_DISALLOWED_TOOLS = new Set([
    ...ALL_AGENT_DISALLOWED_TOOLS
  ]);
  ASYNC_AGENT_ALLOWED_TOOLS = new Set([
    FILE_READ_TOOL_NAME,
    WEB_SEARCH_TOOL_NAME,
    TODO_WRITE_TOOL_NAME,
    GREP_TOOL_NAME,
    WEB_FETCH_TOOL_NAME,
    GLOB_TOOL_NAME,
    ...SHELL_TOOL_NAMES,
    FILE_EDIT_TOOL_NAME,
    FILE_WRITE_TOOL_NAME,
    NOTEBOOK_EDIT_TOOL_NAME,
    SKILL_TOOL_NAME,
    SYNTHETIC_OUTPUT_TOOL_NAME,
    SEARCH_EXTRA_TOOLS_TOOL_NAME,
    EXECUTE_TOOL_NAME,
    ENTER_WORKTREE_TOOL_NAME,
    EXIT_WORKTREE_TOOL_NAME
  ]);
  IN_PROCESS_TEAMMATE_ALLOWED_TOOLS = new Set([
    TASK_CREATE_TOOL_NAME,
    TASK_GET_TOOL_NAME,
    TASK_LIST_TOOL_NAME,
    TASK_UPDATE_TOOL_NAME,
    SEND_MESSAGE_TOOL_NAME,
    CRON_CREATE_TOOL_NAME,
    CRON_DELETE_TOOL_NAME,
    CRON_LIST_TOOL_NAME
  ]);
  COORDINATOR_MODE_ALLOWED_TOOLS = new Set([
    AGENT_TOOL_NAME,
    TASK_STOP_TOOL_NAME,
    SEND_MESSAGE_TOOL_NAME,
    SYNTHETIC_OUTPUT_TOOL_NAME
  ]);
  CORE_TOOLS = new Set([
    ...SHELL_TOOL_NAMES,
    FILE_READ_TOOL_NAME,
    FILE_EDIT_TOOL_NAME,
    FILE_WRITE_TOOL_NAME,
    GLOB_TOOL_NAME,
    GREP_TOOL_NAME,
    NOTEBOOK_EDIT_TOOL_NAME,
    AGENT_TOOL_NAME,
    ASK_USER_QUESTION_TOOL_NAME,
    TASK_OUTPUT_TOOL_NAME,
    TASK_STOP_TOOL_NAME,
    TASK_CREATE_TOOL_NAME,
    TASK_GET_TOOL_NAME,
    TASK_LIST_TOOL_NAME,
    TASK_UPDATE_TOOL_NAME,
    TODO_WRITE_TOOL_NAME,
    ENTER_PLAN_MODE_TOOL_NAME,
    EXIT_PLAN_MODE_V2_TOOL_NAME,
    VERIFY_PLAN_EXECUTION_TOOL_NAME,
    WEB_FETCH_TOOL_NAME,
    WEB_SEARCH_TOOL_NAME,
    LSP_TOOL_NAME,
    SKILL_TOOL_NAME,
    SLEEP_TOOL_NAME,
    SEARCH_EXTRA_TOOLS_TOOL_NAME,
    EXECUTE_TOOL_NAME,
    SYNTHETIC_OUTPUT_TOOL_NAME
  ]);
});

// packages/builtin-tools/src/tools/SearchExtraToolsTool/prompt.ts
function getToolLocationHint() {
  const deltaEnabled = process.env.USER_TYPE === "ant" || getFeatureValue_CACHED_MAY_BE_STALE("tengu_glacier_2xr", false);
  return deltaEnabled ? "Deferred tools appear by name in <system-reminder> messages." : "Deferred tools appear by name in <available-deferred-tools> messages.";
}
function isDeferredTool(tool) {
  if (tool.alwaysLoad === true)
    return false;
  if (CORE_TOOLS.has(tool.name))
    return false;
  return true;
}
function formatDeferredToolLine(tool) {
  return tool.name;
}
function getPrompt() {
  return PROMPT_HEAD + getToolLocationHint() + PROMPT_TAIL;
}
var PROMPT_HEAD = `Search for deferred tools by name or keyword. LOW PRIORITY \u2014 only use this tool when no core tool can accomplish the task. Core tools (Read, Edit, Write, Bash, Glob, Grep, Agent, WebFetch, WebSearch, Skill) are always available and should be used directly. This tool is for discovering additional capabilities like MCP tools, cron scheduling, worktree management, agent teams (TeamCreate, TeamDelete, SendMessage), etc.

`, PROMPT_TAIL = ` Returns matching tool names.

## Two-step workflow (MUST follow exactly)

Deferred tools CANNOT be called directly. You MUST use this two-step pattern:

Step 1 \u2014 Search: Call this tool (SearchExtraTools) to discover the target tool.
  Input: {"query": "select:CronCreate"}
  Response: "Found 1 deferred tool(s): CronCreate. Use ExecuteExtraTool with {"tool_name": "<name>", "params": {...}} to invoke."

Step 2 \u2014 Execute: Call ExecuteExtraTool to run the discovered tool.
  Input: {"tool_name": "CronCreate", "params": {"schedule": "*/5 * * * *", "prompt": "check the deploy"}}
  Response: the actual tool result.

## Example: user asks "schedule a cron to check deploy every 5 minutes"

1. SearchExtraTools({"query": "select:CronCreate"})
   \u2192 Response: Found deferred tool CronCreate
2. ExecuteExtraTool({"tool_name": "CronCreate", "params": {"schedule": "*/5 * * * *", "prompt": "check the deploy"}})
   \u2192 Response: Cron job created successfully

If you don't know the exact tool name, use keyword search first:
1. SearchExtraTools({"query": "cron schedule"})
   \u2192 Response: Found deferred tool(s): CronCreate
2. ExecuteExtraTool({"tool_name": "CronCreate", "params": {...}})

## Query forms
- "select:CronCreate" \u2014 exact tool name (fastest, preferred when you know the name from <available-deferred-tools>)
- "select:CronCreate,CronList" \u2014 comma-separated multi-select
- "discover:schedule cron job" \u2014 returns tool name + description + schema without loading. Use to understand a tool before calling it.
- "notebook jupyter" \u2014 keyword search, up to max_results best matches
- "+slack send" \u2014 require "slack" in the name, rank by remaining terms

## Failure policy
If ExecuteExtraTool fails, do NOT re-search for the same tool \u2014 it will loop. Stop and tell the user what failed.`;
var init_prompt12 = __esm(() => {
  init_growthbook();
  init_tools();
  init_constants14();
});

export { getEmptyToolPermissionContext, filterToolProgressMessages, toolMatchesName, findToolByName, buildTool, init_Tool, BASH_TOOL_NAME, init_toolName, GREP_TOOL_NAME, getDescription, init_prompt5 as init_prompt, FILE_EDIT_TOOL_NAME, CLAUDE_FOLDER_PERMISSION_PATTERN, GLOBAL_CLAUDE_FOLDER_PERMISSION_PATTERN, FILE_UNEXPECTEDLY_MODIFIED_ERROR, init_constants6 as init_constants, parsePDFPageRange, isPDFSupported, isPDFExtension, init_pdfUtils, FILE_READ_TOOL_NAME, FILE_UNCHANGED_STUB, MAX_LINES_TO_READ, DESCRIPTION2 as DESCRIPTION, LINE_FORMAT_INSTRUCTION, OFFSET_INSTRUCTION_DEFAULT, OFFSET_INSTRUCTION_TARGETED, renderPromptTemplate, init_prompt3 as init_prompt1, FILE_WRITE_TOOL_NAME, getWriteToolDescription, init_prompt8 as init_prompt2, GLOB_TOOL_NAME, DESCRIPTION4 as DESCRIPTION1, init_prompt7 as init_prompt3, NOTEBOOK_EDIT_TOOL_NAME, init_constants7 as init_constants1, WEB_FETCH_TOOL_NAME, DESCRIPTION3 as DESCRIPTION2, makeSecondaryModelPrompt, init_prompt6 as init_prompt4, SEND_MESSAGE_TOOL_NAME, init_constants9 as init_constants2, getLocalISODate, getSessionStartDate, init_common, WEB_SEARCH_TOOL_NAME, getWebSearchPrompt, init_prompt4 as init_prompt5, EXIT_PLAN_MODE_TOOL_NAME, EXIT_PLAN_MODE_V2_TOOL_NAME, init_constants3, ENTER_PLAN_MODE_TOOL_NAME, init_constants4, ASK_USER_QUESTION_TOOL_NAME, ASK_USER_QUESTION_TOOL_CHIP_WIDTH, DESCRIPTION as DESCRIPTION3, PREVIEW_FEATURE_PROMPT, ASK_USER_QUESTION_TOOL_PROMPT, init_prompt2 as init_prompt6, TODO_WRITE_TOOL_NAME, init_constants5, POWERSHELL_TOOL_NAME, init_toolName2 as init_toolName1, SHELL_TOOL_NAMES, isPowerShellToolEnabled, init_shellToolUtils, SKILL_TOOL_NAME, init_constants8 as init_constants6, TASK_CREATE_TOOL_NAME, init_constants10 as init_constants7, TASK_GET_TOOL_NAME, init_constants11 as init_constants8, TASK_LIST_TOOL_NAME, init_constants12 as init_constants9, TASK_UPDATE_TOOL_NAME, init_constants13 as init_constants10, SEARCH_EXTRA_TOOLS_TOOL_NAME, SYNTHETIC_OUTPUT_TOOL_NAME, isSyntheticOutputToolEnabled, SyntheticOutputTool, createSyntheticOutputTool, init_SyntheticOutputTool, SLEEP_TOOL_NAME, DESCRIPTION5 as DESCRIPTION4, SLEEP_TOOL_PROMPT, init_prompt9 as init_prompt7, LSP_TOOL_NAME, DESCRIPTION6 as DESCRIPTION5, init_prompt10 as init_prompt8, VERIFY_PLAN_EXECUTION_TOOL_NAME, exports_constants, init_constants15 as init_constants11, EXECUTE_TOOL_NAME, init_constants16 as init_constants12, ENTER_WORKTREE_TOOL_NAME, init_constants17 as init_constants13, EXIT_WORKTREE_TOOL_NAME, init_constants18 as init_constants14, WORKFLOW_TOOL_NAME, WORKFLOW_DIR_NAME, WORKFLOW_FILE_EXTENSIONS, exports_constants2 as exports_constants1, init_constants19 as init_constants15, getCronFilePath, readCronTasks, hasCronTasksSync, addCronTask, removeCronTasks, markCronTasksFired, listAllCronTasks, nextCronRunMs, DEFAULT_CRON_JITTER_CONFIG, jitteredNextCronRunMs, oneShotJitteredNextCronRunMs, findMissedTasks, init_cronTasks, DEFAULT_MAX_AGE_DAYS, isKairosCronEnabled, isDurableCronEnabled, CRON_CREATE_TOOL_NAME, CRON_DELETE_TOOL_NAME, CRON_LIST_TOOL_NAME, buildCronCreateDescription, buildCronCreatePrompt, CRON_DELETE_DESCRIPTION, buildCronDeletePrompt, CRON_LIST_DESCRIPTION, buildCronListPrompt, exports_prompt, init_prompt11 as init_prompt9, LOCAL_MEMORY_RECALL_TOOL_NAME, PER_TURN_FETCH_BUDGET_BYTES, PREVIEW_CAP_BYTES, FETCH_CAP_BYTES, LIST_STORES_CAP_BYTES, LIST_ENTRIES_CAP_BYTES, init_constants20 as init_constants16, VAULT_HTTP_FETCH_TOOL_NAME, RESPONSE_BODY_CAP_BYTES, REQUEST_TIMEOUT_MS, init_constants21 as init_constants17, ALL_AGENT_DISALLOWED_TOOLS, CUSTOM_AGENT_DISALLOWED_TOOLS, ASYNC_AGENT_ALLOWED_TOOLS, IN_PROCESS_TEAMMATE_ALLOWED_TOOLS, COORDINATOR_MODE_ALLOWED_TOOLS, init_tools, isDeferredTool, formatDeferredToolLine, getPrompt, init_prompt12 as init_prompt10 };

//# debugId=BA6386DC598BD6A664756E2164756E21
//# sourceMappingURL=chunk-ssw61jfd.js.map
