π File detail
tools/SleepTool/prompt.ts
π§© .tsπ 18 linesπΎ 774 bytesπ text
β Back to All Filesπ― Use case
This module implements the βSleepToolβ tool (Sleep) β something the model can call at runtime alongside other agent tools. On the API surface it exposes SLEEP_TOOL_NAME, DESCRIPTION, and SLEEP_TOOL_PROMPT β mainly types, interfaces, or factory objects. It composes internal code from constants (relative imports).
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
import { TICK_TAG } from '../../constants/xml.js' export const SLEEP_TOOL_NAME = 'Sleep' export const DESCRIPTION = 'Wait for a specified duration'
π€ Exports (heuristic)
SLEEP_TOOL_NAMEDESCRIPTIONSLEEP_TOOL_PROMPT
π₯οΈ Source preview
import { TICK_TAG } from '../../constants/xml.js'
export const SLEEP_TOOL_NAME = 'Sleep'
export const DESCRIPTION = 'Wait for a specified duration'
export const 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 β these are periodic check-ins. Look for useful work to do before sleeping.
You can call this concurrently with other tools β it won't interfere with them.
Prefer this over \`Bash(sleep ...)\` β it doesn't hold a shell process.
Each wake-up costs an API call, but the prompt cache expires after 5 minutes of inactivity β balance accordingly.`