zidane 7.1.4 → 7.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/{acp-DbYGzaVK.js → acp-BxRfclPQ.js} +3 -3
- package/dist/{acp-DbYGzaVK.js.map → acp-BxRfclPQ.js.map} +1 -1
- package/dist/acp-cli.js +4 -4
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-BlGt76qk.js → agent-CJbmpTmA.js} +94 -106
- package/dist/agent-CJbmpTmA.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-DPPs3wjJ.js → anthropic-BQdAnY-w.js} +2 -2
- package/dist/{anthropic-DPPs3wjJ.js.map → anthropic-BQdAnY-w.js.map} +1 -1
- package/dist/{approvals-CnFq-_Gu.js → approvals-DMxUgyVd.js} +162 -56
- package/dist/approvals-DMxUgyVd.js.map +1 -0
- package/dist/{auth-CNetxyJH.js → auth-DvMdkpGD.js} +4 -4
- package/dist/{auth-CNetxyJH.js.map → auth-DvMdkpGD.js.map} +1 -1
- package/dist/chat/pure.d.ts +4 -4
- package/dist/chat/pure.js +2 -2
- package/dist/chat.d.ts +6 -6
- package/dist/chat.js +5 -5
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/daemon-cli.js +2 -1
- package/dist/daemon-cli.js.map +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/{fetch-url-ma-5_p0p.js → fetch-url-DX75gpL0.js} +3 -2
- package/dist/fetch-url-DX75gpL0.js.map +1 -0
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/{index-DtF2yPaI.d.ts → index-BMOl2Bog.d.ts} +20 -11
- package/dist/index-BMOl2Bog.d.ts.map +1 -0
- package/dist/{index-BIJKozYj.d.ts → index-DCYh6lOp.d.ts} +71 -5
- package/dist/index-DCYh6lOp.d.ts.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +6 -5
- package/dist/{ipc-DZffY7UT.js → ipc-BZcE9wnT.js} +2 -2
- package/dist/{ipc-DZffY7UT.js.map → ipc-BZcE9wnT.js.map} +1 -1
- package/dist/ipc.d.ts +28 -6
- package/dist/ipc.d.ts.map +1 -1
- package/dist/ipc.js +4 -4
- package/dist/mcp.d.ts +1 -1
- package/dist/{oauth-B6F43fti.js → oauth-DxHO17JE.js} +10 -8
- package/dist/{oauth-B6F43fti.js.map → oauth-DxHO17JE.js.map} +1 -1
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/prompts-Pqc3JdW_.d.ts +116 -0
- package/dist/prompts-Pqc3JdW_.d.ts.map +1 -0
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/{providers-DP9kwXYo.js → providers-BVhnFyiY.js} +2 -2
- package/dist/{providers-DP9kwXYo.js.map → providers-BVhnFyiY.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +3 -3
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/{server-Cdrcncg-.js → shell-path-BBH8xrmU.js} +95 -9
- package/dist/shell-path-BBH8xrmU.js.map +1 -0
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-Baj_BroN.d.ts → tool-formatters-BDm0tjgy.d.ts} +2 -2
- package/dist/{tool-formatters-Baj_BroN.d.ts.map → tool-formatters-BDm0tjgy.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/fetch-url.d.ts.map +1 -1
- package/dist/tools/fetch-url.js +1 -1
- package/dist/tools/prompts.d.ts +2 -0
- package/dist/tools/prompts.js +164 -0
- package/dist/tools/prompts.js.map +1 -0
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools/web-search.d.ts.map +1 -1
- package/dist/tools/web-search.js +3 -3
- package/dist/tools/web-search.js.map +1 -1
- package/dist/tools.d.ts +3 -2
- package/dist/tools.js +3 -2
- package/dist/{transcript-anchors-DfnBVZX0.d.ts → transcript-anchors-DjcEsOYq.d.ts} +2 -2
- package/dist/{transcript-anchors-DfnBVZX0.d.ts.map → transcript-anchors-DjcEsOYq.d.ts.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.js +43 -25
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-BHeYIvSY.js → turn-operations-JynC5ODZ.js} +30 -2
- package/dist/{turn-operations-BHeYIvSY.js.map → turn-operations-JynC5ODZ.js.map} +1 -1
- package/dist/{turn-operations-Cl3RNQ2O.d.ts → turn-operations-Rqk3E0Ue.d.ts} +34 -4
- package/dist/{turn-operations-Cl3RNQ2O.d.ts.map → turn-operations-Rqk3E0Ue.d.ts.map} +1 -1
- package/dist/types.d.ts +3 -2
- package/docs/ARCHITECTURE.md +14 -2
- package/docs/SKILL.md +31 -1
- package/package.json +6 -1
- package/dist/agent-BlGt76qk.js.map +0 -1
- package/dist/approvals-CnFq-_Gu.js.map +0 -1
- package/dist/fetch-url-ma-5_p0p.js.map +0 -1
- package/dist/index-BIJKozYj.d.ts.map +0 -1
- package/dist/index-DtF2yPaI.d.ts.map +0 -1
- package/dist/server-Cdrcncg-.js.map +0 -1
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
//#region src/tools/prompts.ts
|
|
2
|
+
/**
|
|
3
|
+
* Every native tool's LLM-facing description, in one place.
|
|
4
|
+
*
|
|
5
|
+
* This module is the source of truth: each tool file imports its
|
|
6
|
+
* `spec.description` from here rather than inlining it. It has no runtime
|
|
7
|
+
* dependencies (pure strings and tiny template functions) so hosts can import
|
|
8
|
+
* it from a config file — `zidane/tools/prompts` — read the defaults, and feed
|
|
9
|
+
* adjusted text into `AgentOptions.toolDescriptions`:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { toolPrompts } from 'zidane/tools/prompts'
|
|
13
|
+
*
|
|
14
|
+
* createAgent({
|
|
15
|
+
* toolDescriptions: {
|
|
16
|
+
* read_file: toolPrompts.read_file.replace('Claude Code', 'the editor'),
|
|
17
|
+
* shell: cur => cur.replace(toolPrompts.shell.core, myShellIntro),
|
|
18
|
+
* },
|
|
19
|
+
* })
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* Scope is the top-level `spec.description` — the surface `toolDescriptions`
|
|
23
|
+
* overrides. Parameter descriptions live with their schemas in the tool files.
|
|
24
|
+
*
|
|
25
|
+
* Static tools are plain strings. Tools whose description depends on runtime
|
|
26
|
+
* configuration expose named fragments the factory joins conditionally; the
|
|
27
|
+
* fragments are the exact bytes the model receives, so `String#replace`
|
|
28
|
+
* against them is a precise edit.
|
|
29
|
+
*/
|
|
30
|
+
const toolPrompts = {
|
|
31
|
+
read_file: "Read a file by path. Text files return lines [offset..offset+limit). Default offset=1, limit=2000. Each line is prefixed with its 1-indexed line number followed by a tab (e.g. `42\\tconst foo = bar`); the prefix is metadata, not part of the file. Mirrors Claude Code's `cat -n`-style compact output for token efficiency. A trailing footer explains how to read the rest when truncated. Images (png/jpg/gif/webp) and PDFs return structured attachments for capable models; other binary files return a short marker rather than mojibake.",
|
|
32
|
+
write_file: "Write `content` to `path`, creating any missing parent directories. Overwrites existing files in full; prefer `edit` / `multi_edit` for surgical changes when you only want to alter part of a file. Returns one of: `Created <path> (N bytes)` (file did not exist), `Updated <path> (N bytes)` (content differed), or `No change needed: <path> already at target state (N bytes)`, so the model can detect no-ops without a separate `read_file`.",
|
|
33
|
+
edit: "Replace exact `old_string` with `new_string` in a file. Fails if `old_string` is not unique unless `replace_all: true`. Prefer over `write_file` for surgical changes: preserves the rest of the file. Tolerates `read_file` line-number prefixes (`<N>\\t…`, `<N>|…`, or `<N>→…`) in `old_string` / `new_string`; they are stripped before matching/writing, so you can paste a numbered chunk verbatim.",
|
|
34
|
+
multi_edit: "Apply a sequential list of edits to a file. Each edit operates on the result of the previous APPLIED edit. Prefer this over multiple `edit` calls when several non-overlapping changes are needed in the same file. Edits run best-effort: a per-step failure (`old_string` not found, ambiguous match without `replace_all`, identical strings) is reported in the result but does NOT block the remaining steps. The file is written iff at least one step applied. The result lists per-hunk outcomes (`applied` / `failed`) so the model can re-issue just the failures without resending the whole batch. Each step tolerates `read_file` line-number prefixes (`<N>\\t…`, `<N>|…`, or `<N>→…`) in `old_string` / `new_string`.",
|
|
35
|
+
glob: "Match files by glob pattern (supports **, *, ?). Relative to the execution context cwd; patterns may reach outside the workspace (e.g. \"../shared/**/*.ts\"). By default each row is `<path>\\t<size-bytes>\\t<mtime-iso>`; set `metadata: false` for a plain newline-separated list of paths. Always sorted.",
|
|
36
|
+
grep: "Search file contents by regex. Returns matching paths (default), match content, or per-file counts. Backed by ripgrep when available, with a portable shell-listing + regex fallback when `rg` is absent.",
|
|
37
|
+
list_files: "List the immediate entries (files and subdirectories) at literal directory `path`. Returns a newline-separated list; subdirectories carry a trailing `/`; or `(empty directory)` when the directory exists but is empty. Non-recursive: use `glob` for pattern matching across nested directories.",
|
|
38
|
+
fetch_url: "Fetch a public URL and return its body as plain text. HTML is reduced to text (scripts, styles, tags stripped; entities decoded). If a `web_search` tool is also available, use it first when you do not already know the exact URL. Only http(s) URLs are accepted; loopback, link-local, private, and cloud-metadata addresses are refused. Output is capped (default 200 KiB).",
|
|
39
|
+
shell_kill: [
|
|
40
|
+
"Terminate a running background task started by `shell({ run_in_background: true })`.",
|
|
41
|
+
"Sends SIGTERM to the whole process group so the shell wrapper AND its child commands die together.",
|
|
42
|
+
"Returns the final exit info (status, exit code, output path) or a \"no such task\" message when the id is unknown / already cleaned up.",
|
|
43
|
+
"Idempotent: calling on a task that has already terminated returns the cached exit info without re-killing."
|
|
44
|
+
].join("\n"),
|
|
45
|
+
wait_task: [
|
|
46
|
+
"Wait for a background task started by `shell({ run_in_background: true })` to exit, then return its final status.",
|
|
47
|
+
"Returns immediately when the task has already terminated. On timeout the task keeps running and you can wait again, keep working, or `shell_kill` it.",
|
|
48
|
+
"Prefer ending your turn and receiving the `<task-notification>` when you have other useful work or nothing depends on the result; use wait_task only when the next step genuinely needs the task's outcome."
|
|
49
|
+
].join("\n"),
|
|
50
|
+
record_artifact: [
|
|
51
|
+
"Record a deliverable this session produced so the user can find it later in the artifacts panel. An artifact is an OUTPUT the user would want a link to — not a step of the work.",
|
|
52
|
+
"Worth recording: a pull request or merge request URL, a deployment / preview URL, an issue or ticket you filed, a release or tag, a generated report / export / dataset the user asked for, a build output they will pick up.",
|
|
53
|
+
"Not worth recording: source files you edited or created as part of implementing a change, scratch files, logs, intermediate results, anything already implied by the diff.",
|
|
54
|
+
"Pull requests from `gh pr create`, `git commit` commits and newly created branches are detected automatically — record those only when the automatic path could not see them (e.g. a PR opened from a background shell task).",
|
|
55
|
+
"Idempotent per (kind, uri): recording the same artifact again refreshes its label/meta."
|
|
56
|
+
].join("\n"),
|
|
57
|
+
read_chat_turns: [
|
|
58
|
+
"Read selected turns from a previous chat explicitly referenced by the user with `#<chat>` in the current prompt.",
|
|
59
|
+
"Use this when the user asks to continue from, compare with, or inspect a referenced chat.",
|
|
60
|
+
"The tool refuses chats that were not referenced in the current user prompt."
|
|
61
|
+
].join(" "),
|
|
62
|
+
model_search: [
|
|
63
|
+
"List the models available for spawned subagents, with per-Mtok pricing and context windows.",
|
|
64
|
+
"Use it to cost-tier delegation: find a cheap, fast model for mechanical or high-volume work before calling `spawn` with its id in the `model` field.",
|
|
65
|
+
"Pass `query` to filter by substring across model id, name, and provider; omit it to list everything."
|
|
66
|
+
].join("\n"),
|
|
67
|
+
skills_use: "Activate or deactivate a specialized skill. Call with `mode: \"activate\"` (default) to load a skill's full instructions when a task matches its catalog description. Call with `mode: \"deactivate\"` to release a skill whose allowed-tools restrictions are now in the way, e.g. when the skill's work is done or the active skill is blocking unrelated tool calls. After activating, follow the returned instructions; use skills_read to load referenced files and skills_run_script to execute bundled scripts.",
|
|
68
|
+
skills_read: "Read a bundled resource file from an active skill. The skill must have been activated via skills_use first. Path is relative to the skill's directory (e.g. \"references/REFERENCE.md\", \"assets/template.txt\").",
|
|
69
|
+
skills_run_script: "Execute a script bundled with an active skill (from its scripts/ directory). The skill must have been activated via skills_use first. Returns stdout, stderr, and the exit code. Honors the script's shebang.",
|
|
70
|
+
/** Default for `createInteractionTool` when the host passes no `description`. */
|
|
71
|
+
interaction: "Request structured input from the user or external system.",
|
|
72
|
+
/**
|
|
73
|
+
* `shell` is assembled per run by `createShellTool`: `core` always; the
|
|
74
|
+
* `preferDedicated` block only for sibling tools actually registered
|
|
75
|
+
* (`swapHints` filtered by canonical name, tool names alias-resolved);
|
|
76
|
+
* `background` only when `run_in_background` is available.
|
|
77
|
+
*/
|
|
78
|
+
shell: {
|
|
79
|
+
core: [
|
|
80
|
+
"Execute a shell command from the workspace root (the `Cwd` in your environment) and return its combined stdout/stderr. Every call starts there; `cd` never persists between calls. Use relative paths (`cd src/app && bun test`, `ls docs`), not absolute ones.",
|
|
81
|
+
"Output is tail-priority truncated at 32 KiB by default; errors and exit-code summaries live in the tail.",
|
|
82
|
+
"By default each call appends a `(exit N, Nms)` footer and surfaces non-empty stderr in a separate section even on success; set `metadata: false` to return only stdout. Set maxOutputBytes=0 to disable truncation.",
|
|
83
|
+
"Pass a short `description` (5-10 words) explaining the intent of the command; it surfaces in the user-facing transcript so the human can follow your reasoning at a glance. Skip it only for trivial reads where the command speaks for itself."
|
|
84
|
+
].join("\n"),
|
|
85
|
+
preferDedicated: "When a dedicated tool fits, prefer it over shell:",
|
|
86
|
+
/** One `- <label>: use \`<tool>\` (not <instead>)` line per registered sibling. */
|
|
87
|
+
swapHints: [
|
|
88
|
+
{
|
|
89
|
+
canonical: "read_file",
|
|
90
|
+
label: "Read files",
|
|
91
|
+
instead: "cat/head/tail"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
canonical: "glob",
|
|
95
|
+
label: "File search",
|
|
96
|
+
instead: "find/ls"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
canonical: "grep",
|
|
100
|
+
label: "Content search",
|
|
101
|
+
instead: "grep/rg"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
canonical: "list_files",
|
|
105
|
+
label: "Directory listings",
|
|
106
|
+
instead: "ls"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
canonical: "edit",
|
|
110
|
+
label: "Edit files",
|
|
111
|
+
instead: "sed/awk"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
canonical: "write_file",
|
|
115
|
+
label: "Write files",
|
|
116
|
+
instead: "echo>/heredoc"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
reminder: "Re-running `ls`/`cat` on the same path is not useful: the prior result is still current unless you wrote to that path since.",
|
|
120
|
+
background: [
|
|
121
|
+
"Long-running commands (`npm run dev`, `python train.py`, anything that would otherwise block your turn for minutes) → `run_in_background: true`. The call returns immediately with `{ task_id, output_path, pid }`; stdout + stderr stream to the log file at `output_path`.",
|
|
122
|
+
"After spawning a background task: end your current turn (do NOT keep iterating). A `<task-notification>` arrives on the agent's NEXT user-turn with the final status. Polling the log file in a loop wastes tokens and blocks your turn: the notification IS the wake-up. If you NEED to check progress immediately (rare), call `read_file({ path: output_path, ... })` exactly once and decide. To terminate, use `shell_kill({ task_id })`. If, and only if, your very next step depends on the task's outcome, block on it with `wait_task({ task_id })` instead of polling.",
|
|
123
|
+
"When called from inside a `spawn`'d subagent: you have NO next user-turn; your `agent.run` ends as soon as you finish responding. Start the background task, return a brief summary including the `task_id`, and end your turn. Ownership of the task is transferred to the parent agent when your run finishes; the parent will see the notification on ITS next user-turn."
|
|
124
|
+
].join("\n\n")
|
|
125
|
+
},
|
|
126
|
+
/**
|
|
127
|
+
* `spawn`: `core` always; `modelTiering` when a model catalog is wired;
|
|
128
|
+
* `resume` when the tool persists child turns (`persist: true`).
|
|
129
|
+
*/
|
|
130
|
+
spawn: {
|
|
131
|
+
core: "Spawn a sub-agent for a self-contained task that benefits from isolation (separate context window, separate retries): for example, a deep research dive or a long codegen pass on a specific file. The sub-agent inherits your tool set (including `spawn` itself, depth-capped) and your system prompt unless overridden, runs independently, and returns its final response. Do NOT spawn for sequential steps you could do yourself.",
|
|
132
|
+
modelTiering: " Children can run on a DIFFERENT model via the `model` field: cost-tier your delegation: mechanical, parallelizable, or high-volume search work belongs on cheaper/faster models, while synthesis and judgment stay on your own model.",
|
|
133
|
+
resume: " A stopped or failed sub-agent can be CONTINUED instead of restarted: pass `resume` with its child label (e.g. \"child-2\") and put the continuation instruction in `task`; the child picks up with its prior conversation intact."
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* `tool_search`: `core` + one closing sentence — `callableVia(dispatcher)`
|
|
137
|
+
* in dispatch mode (`call_tool`), `callable` otherwise.
|
|
138
|
+
*/
|
|
139
|
+
tool_search: {
|
|
140
|
+
core: [
|
|
141
|
+
"Discover and load schemas for additional tools listed in <searchable_tools>.",
|
|
142
|
+
"Tools listed there are advertised by name + description only; their input",
|
|
143
|
+
"schemas are not loaded into context until you surface them through this tool.",
|
|
144
|
+
"Pass `query` for a substring search, `names` to load specific tools, or `server`",
|
|
145
|
+
"to load every tool from one MCP server."
|
|
146
|
+
].join(" "),
|
|
147
|
+
callable: "Returned tools become callable for the rest of this run.",
|
|
148
|
+
callableVia: (dispatcher) => `Returned tools become callable through \`${dispatcher}\` (name + arguments) for the rest of this run.`
|
|
149
|
+
},
|
|
150
|
+
/** `call_tool` names the discovery tool (`tool_search` or the host's wire name). */
|
|
151
|
+
call_tool: (discovery) => `Invoke a tool listed in <searchable_tools>. Load its schema with \`${discovery}\` first (the result shows the exact \`name\` and input schema), then call it here with \`name\` set to that tool name and \`arguments\` set to an object matching its schema. Arguments are validated against the tool's own schema; a validation error names the offending field.`,
|
|
152
|
+
/**
|
|
153
|
+
* `web_search`: `core` + `recency(monthYear)`, resolved on each spec read so
|
|
154
|
+
* the hint tracks the current month.
|
|
155
|
+
*/
|
|
156
|
+
web_search: {
|
|
157
|
+
core: "Search the public web and return ranked title / URL / snippet results. Use this to look up documentation, error messages, library versions, or recent events. If a `fetch_url` tool is also available, follow up with it to read a specific page in full.",
|
|
158
|
+
recency: (monthYear) => `IMPORTANT: the current month is ${monthYear}. When searching for recent information, docs, or current events, use the current year in the query, not a year from your training cutoff (e.g. search "React docs" with this year, not an older one).`
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
//#endregion
|
|
162
|
+
export { toolPrompts };
|
|
163
|
+
|
|
164
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","names":[],"sources":["../../src/tools/prompts.ts"],"sourcesContent":["/**\n * Every native tool's LLM-facing description, in one place.\n *\n * This module is the source of truth: each tool file imports its\n * `spec.description` from here rather than inlining it. It has no runtime\n * dependencies (pure strings and tiny template functions) so hosts can import\n * it from a config file — `zidane/tools/prompts` — read the defaults, and feed\n * adjusted text into `AgentOptions.toolDescriptions`:\n *\n * ```ts\n * import { toolPrompts } from 'zidane/tools/prompts'\n *\n * createAgent({\n * toolDescriptions: {\n * read_file: toolPrompts.read_file.replace('Claude Code', 'the editor'),\n * shell: cur => cur.replace(toolPrompts.shell.core, myShellIntro),\n * },\n * })\n * ```\n *\n * Scope is the top-level `spec.description` — the surface `toolDescriptions`\n * overrides. Parameter descriptions live with their schemas in the tool files.\n *\n * Static tools are plain strings. Tools whose description depends on runtime\n * configuration expose named fragments the factory joins conditionally; the\n * fragments are the exact bytes the model receives, so `String#replace`\n * against them is a precise edit.\n */\n\nexport const toolPrompts = {\n read_file: 'Read a file by path. Text files return lines [offset..offset+limit). Default offset=1, limit=2000. Each line is prefixed with its 1-indexed line number followed by a tab (e.g. `42\\\\tconst foo = bar`); the prefix is metadata, not part of the file. Mirrors Claude Code\\'s `cat -n`-style compact output for token efficiency. A trailing footer explains how to read the rest when truncated. Images (png/jpg/gif/webp) and PDFs return structured attachments for capable models; other binary files return a short marker rather than mojibake.',\n\n write_file: 'Write `content` to `path`, creating any missing parent directories. Overwrites existing files in full; prefer `edit` / `multi_edit` for surgical changes when you only want to alter part of a file. Returns one of: `Created <path> (N bytes)` (file did not exist), `Updated <path> (N bytes)` (content differed), or `No change needed: <path> already at target state (N bytes)`, so the model can detect no-ops without a separate `read_file`.',\n\n edit: 'Replace exact `old_string` with `new_string` in a file. Fails if `old_string` is not unique unless `replace_all: true`. Prefer over `write_file` for surgical changes: preserves the rest of the file. Tolerates `read_file` line-number prefixes (`<N>\\\\t…`, `<N>|…`, or `<N>→…`) in `old_string` / `new_string`; they are stripped before matching/writing, so you can paste a numbered chunk verbatim.',\n\n multi_edit: 'Apply a sequential list of edits to a file. Each edit operates on the result of the previous APPLIED edit. Prefer this over multiple `edit` calls when several non-overlapping changes are needed in the same file. Edits run best-effort: a per-step failure (`old_string` not found, ambiguous match without `replace_all`, identical strings) is reported in the result but does NOT block the remaining steps. The file is written iff at least one step applied. The result lists per-hunk outcomes (`applied` / `failed`) so the model can re-issue just the failures without resending the whole batch. Each step tolerates `read_file` line-number prefixes (`<N>\\\\t…`, `<N>|…`, or `<N>→…`) in `old_string` / `new_string`.',\n\n glob: 'Match files by glob pattern (supports **, *, ?). Relative to the execution context cwd; patterns may reach outside the workspace (e.g. \"../shared/**/*.ts\"). By default each row is `<path>\\\\t<size-bytes>\\\\t<mtime-iso>`; set `metadata: false` for a plain newline-separated list of paths. Always sorted.',\n\n grep: 'Search file contents by regex. Returns matching paths (default), match content, or per-file counts. Backed by ripgrep when available, with a portable shell-listing + regex fallback when `rg` is absent.',\n\n list_files: 'List the immediate entries (files and subdirectories) at literal directory `path`. Returns a newline-separated list; subdirectories carry a trailing `/`; or `(empty directory)` when the directory exists but is empty. Non-recursive: use `glob` for pattern matching across nested directories.',\n\n fetch_url: 'Fetch a public URL and return its body as plain text. HTML is reduced to text (scripts, styles, tags stripped; entities decoded). If a `web_search` tool is also available, use it first when you do not already know the exact URL. Only http(s) URLs are accepted; loopback, link-local, private, and cloud-metadata addresses are refused. Output is capped (default 200 KiB).',\n\n shell_kill: [\n 'Terminate a running background task started by `shell({ run_in_background: true })`.',\n 'Sends SIGTERM to the whole process group so the shell wrapper AND its child commands die together.',\n 'Returns the final exit info (status, exit code, output path) or a \"no such task\" message when the id is unknown / already cleaned up.',\n 'Idempotent: calling on a task that has already terminated returns the cached exit info without re-killing.',\n ].join('\\n'),\n\n wait_task: [\n 'Wait for a background task started by `shell({ run_in_background: true })` to exit, then return its final status.',\n 'Returns immediately when the task has already terminated. On timeout the task keeps running and you can wait again, keep working, or `shell_kill` it.',\n 'Prefer ending your turn and receiving the `<task-notification>` when you have other useful work or nothing depends on the result; use wait_task only when the next step genuinely needs the task\\'s outcome.',\n ].join('\\n'),\n\n record_artifact: [\n 'Record a deliverable this session produced so the user can find it later in the artifacts panel. An artifact is an OUTPUT the user would want a link to — not a step of the work.',\n 'Worth recording: a pull request or merge request URL, a deployment / preview URL, an issue or ticket you filed, a release or tag, a generated report / export / dataset the user asked for, a build output they will pick up.',\n 'Not worth recording: source files you edited or created as part of implementing a change, scratch files, logs, intermediate results, anything already implied by the diff.',\n 'Pull requests from `gh pr create`, `git commit` commits and newly created branches are detected automatically — record those only when the automatic path could not see them (e.g. a PR opened from a background shell task).',\n 'Idempotent per (kind, uri): recording the same artifact again refreshes its label/meta.',\n ].join('\\n'),\n\n read_chat_turns: [\n 'Read selected turns from a previous chat explicitly referenced by the user with `#<chat>` in the current prompt.',\n 'Use this when the user asks to continue from, compare with, or inspect a referenced chat.',\n 'The tool refuses chats that were not referenced in the current user prompt.',\n ].join(' '),\n\n model_search: [\n 'List the models available for spawned subagents, with per-Mtok pricing and context windows.',\n 'Use it to cost-tier delegation: find a cheap, fast model for mechanical or high-volume work before calling `spawn` with its id in the `model` field.',\n 'Pass `query` to filter by substring across model id, name, and provider; omit it to list everything.',\n ].join('\\n'),\n\n skills_use: 'Activate or deactivate a specialized skill. '\n + 'Call with `mode: \"activate\"` (default) to load a skill\\'s full instructions when a task matches its catalog description. '\n + 'Call with `mode: \"deactivate\"` to release a skill whose allowed-tools restrictions are now in the way, e.g. when the skill\\'s work is done or the active skill is blocking unrelated tool calls. '\n + 'After activating, follow the returned instructions; use skills_read to load referenced files and skills_run_script to execute bundled scripts.',\n\n skills_read: 'Read a bundled resource file from an active skill. '\n + 'The skill must have been activated via skills_use first. '\n + 'Path is relative to the skill\\'s directory (e.g. \"references/REFERENCE.md\", \"assets/template.txt\").',\n\n skills_run_script: 'Execute a script bundled with an active skill (from its scripts/ directory). '\n + 'The skill must have been activated via skills_use first. '\n + 'Returns stdout, stderr, and the exit code. Honors the script\\'s shebang.',\n\n /** Default for `createInteractionTool` when the host passes no `description`. */\n interaction: 'Request structured input from the user or external system.',\n\n /**\n * `shell` is assembled per run by `createShellTool`: `core` always; the\n * `preferDedicated` block only for sibling tools actually registered\n * (`swapHints` filtered by canonical name, tool names alias-resolved);\n * `background` only when `run_in_background` is available.\n */\n shell: {\n core: [\n 'Execute a shell command from the workspace root (the `Cwd` in your environment) and return its combined stdout/stderr. Every call starts there; `cd` never persists between calls. Use relative paths (`cd src/app && bun test`, `ls docs`), not absolute ones.',\n 'Output is tail-priority truncated at 32 KiB by default; errors and exit-code summaries live in the tail.',\n 'By default each call appends a `(exit N, Nms)` footer and surfaces non-empty stderr in a separate section even on success; set `metadata: false` to return only stdout. Set maxOutputBytes=0 to disable truncation.',\n 'Pass a short `description` (5-10 words) explaining the intent of the command; it surfaces in the user-facing transcript so the human can follow your reasoning at a glance. Skip it only for trivial reads where the command speaks for itself.',\n ].join('\\n'),\n preferDedicated: 'When a dedicated tool fits, prefer it over shell:',\n /** One `- <label>: use \\`<tool>\\` (not <instead>)` line per registered sibling. */\n swapHints: [\n { canonical: 'read_file', label: 'Read files', instead: 'cat/head/tail' },\n { canonical: 'glob', label: 'File search', instead: 'find/ls' },\n { canonical: 'grep', label: 'Content search', instead: 'grep/rg' },\n { canonical: 'list_files', label: 'Directory listings', instead: 'ls' },\n { canonical: 'edit', label: 'Edit files', instead: 'sed/awk' },\n { canonical: 'write_file', label: 'Write files', instead: 'echo>/heredoc' },\n ],\n reminder: 'Re-running `ls`/`cat` on the same path is not useful: the prior result is still current unless you wrote to that path since.',\n background: [\n 'Long-running commands (`npm run dev`, `python train.py`, anything that would otherwise block your turn for minutes) → `run_in_background: true`. The call returns immediately with `{ task_id, output_path, pid }`; stdout + stderr stream to the log file at `output_path`.',\n 'After spawning a background task: end your current turn (do NOT keep iterating). A `<task-notification>` arrives on the agent\\'s NEXT user-turn with the final status. Polling the log file in a loop wastes tokens and blocks your turn: the notification IS the wake-up. If you NEED to check progress immediately (rare), call `read_file({ path: output_path, ... })` exactly once and decide. To terminate, use `shell_kill({ task_id })`. If, and only if, your very next step depends on the task\\'s outcome, block on it with `wait_task({ task_id })` instead of polling.',\n 'When called from inside a `spawn`\\'d subagent: you have NO next user-turn; your `agent.run` ends as soon as you finish responding. Start the background task, return a brief summary including the `task_id`, and end your turn. Ownership of the task is transferred to the parent agent when your run finishes; the parent will see the notification on ITS next user-turn.',\n ].join('\\n\\n'),\n },\n\n /**\n * `spawn`: `core` always; `modelTiering` when a model catalog is wired;\n * `resume` when the tool persists child turns (`persist: true`).\n */\n spawn: {\n core: 'Spawn a sub-agent for a self-contained task that benefits from isolation (separate context window, separate retries): for example, a deep research dive or a long codegen pass on a specific file. The sub-agent inherits your tool set (including `spawn` itself, depth-capped) and your system prompt unless overridden, runs independently, and returns its final response. Do NOT spawn for sequential steps you could do yourself.',\n modelTiering: ' Children can run on a DIFFERENT model via the `model` field: cost-tier your delegation: mechanical, parallelizable, or high-volume search work belongs on cheaper/faster models, while synthesis and judgment stay on your own model.',\n resume: ' A stopped or failed sub-agent can be CONTINUED instead of restarted: pass `resume` with its child label (e.g. \"child-2\") and put the continuation instruction in `task`; the child picks up with its prior conversation intact.',\n },\n\n /**\n * `tool_search`: `core` + one closing sentence — `callableVia(dispatcher)`\n * in dispatch mode (`call_tool`), `callable` otherwise.\n */\n tool_search: {\n core: [\n 'Discover and load schemas for additional tools listed in <searchable_tools>.',\n 'Tools listed there are advertised by name + description only; their input',\n 'schemas are not loaded into context until you surface them through this tool.',\n 'Pass `query` for a substring search, `names` to load specific tools, or `server`',\n 'to load every tool from one MCP server.',\n ].join(' '),\n callable: 'Returned tools become callable for the rest of this run.',\n callableVia: (dispatcher: string): string =>\n `Returned tools become callable through \\`${dispatcher}\\` (name + arguments) for the rest of this run.`,\n },\n\n /** `call_tool` names the discovery tool (`tool_search` or the host's wire name). */\n call_tool: (discovery: string): string =>\n `Invoke a tool listed in <searchable_tools>. Load its schema with \\`${discovery}\\` first `\n + '(the result shows the exact `name` and input schema), then call it here with `name` '\n + 'set to that tool name and `arguments` set to an object matching its schema. '\n + 'Arguments are validated against the tool\\'s own schema; a validation error names '\n + 'the offending field.',\n\n /**\n * `web_search`: `core` + `recency(monthYear)`, resolved on each spec read so\n * the hint tracks the current month.\n */\n web_search: {\n core: 'Search the public web and return ranked title / URL / snippet results. '\n + 'Use this to look up documentation, error messages, library versions, or recent events. '\n + 'If a `fetch_url` tool is also available, follow up with it to read a specific page in full.',\n recency: (monthYear: string): string =>\n `IMPORTANT: the current month is ${monthYear}. When searching for recent `\n + 'information, docs, or current events, use the current year in the query, not a year '\n + 'from your training cutoff (e.g. search \"React docs\" with this year, not an older one).',\n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Y,cACV,sEAAsE,UAAU;;;;;CAUlF,YAAY;EACV,MAAM;EAGN,UAAU,cACR,mCAAmC,UAAU;CAGjD;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-search.d.ts","names":[],"sources":["../../src/tools/web-search.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"web-search.d.ts","names":[],"sources":["../../src/tools/web-search.ts"],"mappings":";;;cAqNa,SAAA,EAAW,OAmDvB"}
|
package/dist/tools/web-search.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { u as errorMessage } from "../errors-DKiMrOKq.js";
|
|
2
|
-
import {
|
|
2
|
+
import { toolPrompts } from "./prompts.js";
|
|
3
|
+
import { c as stripHtmlInline, o as isHostAllowed } from "../fetch-url-DX75gpL0.js";
|
|
3
4
|
//#region src/tools/web-search.ts
|
|
4
5
|
/**
|
|
5
6
|
* Web search tool with a runtime-resolved backend.
|
|
@@ -159,8 +160,7 @@ const webSearch = {
|
|
|
159
160
|
spec: {
|
|
160
161
|
name: "web_search",
|
|
161
162
|
get description() {
|
|
162
|
-
return
|
|
163
|
-
IMPORTANT: the current month is ${currentMonthYear()}. When searching for recent information, docs, or current events, use the current year in the query, not a year from your training cutoff (e.g. search "React docs" with this year, not an older one).`;
|
|
163
|
+
return `${toolPrompts.web_search.core}\n${toolPrompts.web_search.recency(currentMonthYear())}`;
|
|
164
164
|
},
|
|
165
165
|
inputSchema: {
|
|
166
166
|
type: "object",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-search.js","names":[],"sources":["../../src/tools/web-search.ts"],"sourcesContent":["import type { ToolContext, ToolDef } from './types'\nimport { errorMessage } from '../errors'\nimport { stripHtmlInline } from './_html'\nimport { isHostAllowed } from './fetch-url'\n\n/**\n * Web search tool with a runtime-resolved backend.\n *\n * Backend selection is keyless-fallback: the first backend whose env var\n * is set wins, otherwise we fall through to DuckDuckGo's HTML endpoint\n * (no key required, no auth, rate-limited and brittle to layout changes).\n *\n * 1. TAVILY_API_KEY → https://api.tavily.com/search\n * 2. BRAVE_SEARCH_API_KEY → https://api.search.brave.com/res/v1/web/search\n * 3. (fallback) → https://html.duckduckgo.com/html/\n *\n * Selection happens per call (not at module init) so a key added\n * mid-session via the chat layer's auth flow is picked up on the very next\n * search without restarting the agent. The 5 ms env-var read is negligible\n * compared to the network round-trip.\n *\n * Anthropic providers can take over this tool server-side via the\n * `nativeWebSearch` capability — when set, the provider's `formatTools`\n * drops this `ToolDef` from the function-tools list and emits the\n * server-tool block instead, so this `execute` body is never invoked.\n */\n\nconst DEFAULT_MAX_RESULTS = 5\nconst HARD_MAX_RESULTS = 20\nconst HTTP_TIMEOUT_MS = 15_000\nconst ERROR_BODY_MAX = 256\n/**\n * Cap on the DuckDuckGo HTML we run the scrape regex over. `blockRe` chains\n * lazy `[\\s\\S]*?` spans, which degrade badly (ReDoS-ish slow path) on\n * multi-MB documents; a real DDG results page is well under 512K, so\n * anything past the cap is not results markup we'd want anyway.\n */\nconst DDG_HTML_MAX_CHARS = 512 * 1024\n\n/**\n * Current \"Month YYYY\" for the search description's recency hint. A model with\n * an older training cutoff otherwise queries with a stale year (`React docs\n * 2023`) and misses everything newer. Resolved per read (the `description`\n * getter below) so a long-lived process picks up a month rollover; the value\n * is stable within a session, so it doesn't thrash the provider prompt cache.\n */\nfunction currentMonthYear(): string {\n return new Date().toLocaleDateString('en-US', { month: 'long', year: 'numeric' })\n}\n\ninterface SearchResult {\n title: string\n url: string\n snippet: string\n}\n\ntype Backend = 'tavily' | 'brave' | 'duckduckgo'\n\n/** Egress host each backend talks to — gated against `fetchUrlAllowHosts`. */\nconst BACKEND_HOST: Record<Backend, string> = {\n tavily: 'api.tavily.com',\n brave: 'api.search.brave.com',\n duckduckgo: 'html.duckduckgo.com',\n}\n\nfunction pickBackend(): Backend {\n if (process.env.TAVILY_API_KEY)\n return 'tavily'\n if (process.env.BRAVE_SEARCH_API_KEY)\n return 'brave'\n return 'duckduckgo'\n}\n\nasync function fetchWithTimeout(url: string, init: RequestInit, signal: AbortSignal): Promise<Response> {\n const ctrl = new AbortController()\n const onAbort = (): void => ctrl.abort()\n signal.addEventListener('abort', onAbort, { once: true })\n const timer = setTimeout(() => ctrl.abort(), HTTP_TIMEOUT_MS)\n try {\n return await fetch(url, { ...init, signal: ctrl.signal })\n }\n finally {\n clearTimeout(timer)\n signal.removeEventListener('abort', onAbort)\n }\n}\n\n/**\n * Truncate untrusted HTTP error bodies before embedding them in our own\n * error string. Without this, a backend that returns an HTML 500 page\n * leaks a kilobyte of unstructured chrome straight into the model's\n * context window — which is both noisy and a small prompt-injection\n * surface.\n */\nasync function readErrorBody(res: Response): Promise<string> {\n const body = await res.text().catch(() => '')\n if (body.length <= ERROR_BODY_MAX)\n return body\n return `${body.slice(0, ERROR_BODY_MAX)}… (truncated, ${body.length} bytes total)`\n}\n\nasync function searchTavily(query: string, max: number, signal: AbortSignal): Promise<SearchResult[]> {\n const res = await fetchWithTimeout('https://api.tavily.com/search', {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({\n api_key: process.env.TAVILY_API_KEY,\n query,\n max_results: max,\n search_depth: 'basic',\n }),\n }, signal)\n if (!res.ok)\n throw new Error(`Tavily HTTP ${res.status}: ${await readErrorBody(res)}`)\n const json = await res.json() as { results?: Array<{ title?: string, url?: string, content?: string }> }\n return (json.results ?? []).map(r => ({\n title: r.title ?? '',\n url: r.url ?? '',\n snippet: r.content ?? '',\n }))\n}\n\nasync function searchBrave(query: string, max: number, signal: AbortSignal): Promise<SearchResult[]> {\n const url = `https://api.search.brave.com/res/v1/web/search?q=${encodeURIComponent(query)}&count=${max}`\n const res = await fetchWithTimeout(url, {\n headers: {\n 'accept': 'application/json',\n 'x-subscription-token': process.env.BRAVE_SEARCH_API_KEY!,\n },\n }, signal)\n if (!res.ok)\n throw new Error(`Brave HTTP ${res.status}: ${await readErrorBody(res)}`)\n const json = await res.json() as { web?: { results?: Array<{ title?: string, url?: string, description?: string }> } }\n return (json.web?.results ?? []).map(r => ({\n title: r.title ?? '',\n url: r.url ?? '',\n snippet: r.description ?? '',\n }))\n}\n\n// DDG's HTML endpoint redirects through /l/?uddg=<encoded> — unwrap it so the\n// model sees the destination URL directly.\nfunction unwrapDdgRedirect(href: string): string {\n try {\n const u = new URL(href, 'https://duckduckgo.com')\n if (u.pathname === '/l/' || u.pathname === '/l') {\n const target = u.searchParams.get('uddg')\n if (target)\n return decodeURIComponent(target)\n }\n return u.toString()\n }\n catch {\n return href\n }\n}\n\nasync function searchDuckDuckGo(query: string, max: number, signal: AbortSignal): Promise<SearchResult[]> {\n const url = `https://html.duckduckgo.com/html/?q=${encodeURIComponent(query)}`\n const res = await fetchWithTimeout(url, {\n headers: {\n // DDG returns an empty results page to unbranded UAs.\n 'user-agent': 'Mozilla/5.0 (compatible; zidane/1.0)',\n 'accept': 'text/html',\n },\n }, signal)\n if (!res.ok)\n throw new Error(`DuckDuckGo HTTP ${res.status}: ${await readErrorBody(res)}`)\n const html = (await res.text()).slice(0, DDG_HTML_MAX_CHARS)\n // Each result block has anchor `result__a` (title+url) and `result__snippet`.\n // Brittle by design — DDG ships layout changes occasionally and the scrape\n // silently returns zero hits when its anchors move. The keyed-key\n // backends (Tavily / Brave) are the supported happy path; this fallback\n // exists only so the tool is usable with no setup. If `results` is empty,\n // the formatter surfaces a \"(no results from duckduckgo)\" line.\n const results: SearchResult[] = []\n const blockRe = /<a[^>]+class=\"[^\"]*result__a[^\"]*\"[^>]+href=\"([^\"]+)\"[^>]*>([\\s\\S]*?)<\\/a>[\\s\\S]*?<a[^>]+class=\"[^\"]*result__snippet[^\"]*\"[^>]*>([\\s\\S]*?)<\\/a>/g\n\n let m = blockRe.exec(html)\n\n while (m !== null) {\n results.push({\n url: unwrapDdgRedirect(m[1]!),\n title: stripHtmlInline(m[2]!),\n snippet: stripHtmlInline(m[3]!),\n })\n if (results.length >= max)\n break\n\n m = blockRe.exec(html)\n }\n return results\n}\n\nfunction formatResults(results: SearchResult[], backend: Backend): string {\n if (results.length === 0) {\n // The keyless DuckDuckGo scrape returns zero hits both for genuinely\n // empty queries AND when DDG ships a layout change that moves the anchors\n // this regex keys off. Distinguish it from the keyed backends with an\n // actionable hint so a confused model (or user reading the transcript)\n // knows the fix is a real search key, not a better query.\n if (backend === 'duckduckgo') {\n return '(no results from the keyless DuckDuckGo fallback: it is rate-limited and '\n + 'brittle to layout changes. Set TAVILY_API_KEY or BRAVE_SEARCH_API_KEY for reliable search.)'\n }\n return `(no results from ${backend})`\n }\n const header = `# Web search results (${backend}, ${results.length} ${results.length === 1 ? 'hit' : 'hits'})\\n`\n const body = results.map((r, i) => `${i + 1}. ${r.title}\\n ${r.url}\\n ${r.snippet}`).join('\\n\\n')\n return `${header}\\n${body}`\n}\n\nexport const webSearch: ToolDef = {\n isConcurrencySafe: true,\n spec: {\n name: 'web_search',\n // Getter, not a constant, so the recency hint reflects the current month\n // each time the spec is formatted for the provider (see `currentMonthYear`).\n get description(): string {\n return 'Search the public web and return ranked title / URL / snippet results. '\n + 'Use this to look up documentation, error messages, library versions, or recent events. '\n + 'If a `fetch_url` tool is also available, follow up with it to read a specific page in full.\\n'\n + `IMPORTANT: the current month is ${currentMonthYear()}. When searching for recent `\n + 'information, docs, or current events, use the current year in the query, not a year '\n + 'from your training cutoff (e.g. search \"React docs\" with this year, not an older one).'\n },\n inputSchema: {\n type: 'object',\n properties: {\n query: {\n type: 'string',\n description: 'Search query. Plain natural-language or keyword form; quoting and site: operators are passed through verbatim.',\n },\n max_results: {\n type: 'number',\n description: `Maximum number of results to return. Default: ${DEFAULT_MAX_RESULTS}. Capped at ${HARD_MAX_RESULTS}.`,\n },\n },\n required: ['query'],\n },\n },\n async execute({ query, max_results }, ctx: ToolContext) {\n const q = typeof query === 'string' ? query.trim() : ''\n if (!q)\n return 'web_search error: `query` is required'\n const max = Math.min(\n typeof max_results === 'number' && max_results > 0 ? Math.floor(max_results) : DEFAULT_MAX_RESULTS,\n HARD_MAX_RESULTS,\n )\n const backend = pickBackend()\n // Honor the egress allowlist (when configured): refuse a backend whose\n // host isn't approved rather than silently making the request.\n const allowHosts = ctx.behavior?.fetchUrlAllowHosts\n if (!isHostAllowed(BACKEND_HOST[backend], allowHosts)) {\n return `web_search error: the ${backend} backend (${BACKEND_HOST[backend]}) is not in the configured egress allowlist`\n }\n try {\n const results = backend === 'tavily'\n ? await searchTavily(q, max, ctx.signal)\n : backend === 'brave'\n ? await searchBrave(q, max, ctx.signal)\n : await searchDuckDuckGo(q, max, ctx.signal)\n return formatResults(results, backend)\n }\n catch (err) {\n return `web_search error (${backend}): ${errorMessage(err)}`\n }\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,sBAAsB;AAC5B,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AACxB,MAAM,iBAAiB;;;;;;;AAOvB,MAAM,qBAAqB,MAAM;;;;;;;;AASjC,SAAS,mBAA2B;CAClC,wBAAO,IAAI,KAAK,EAAA,CAAE,mBAAmB,SAAS;EAAE,OAAO;EAAQ,MAAM;CAAU,CAAC;AAClF;;AAWA,MAAM,eAAwC;CAC5C,QAAQ;CACR,OAAO;CACP,YAAY;AACd;AAEA,SAAS,cAAuB;CAC9B,IAAI,QAAQ,IAAI,gBACd,OAAO;CACT,IAAI,QAAQ,IAAI,sBACd,OAAO;CACT,OAAO;AACT;AAEA,eAAe,iBAAiB,KAAa,MAAmB,QAAwC;CACtG,MAAM,OAAO,IAAI,gBAAgB;CACjC,MAAM,gBAAsB,KAAK,MAAM;CACvC,OAAO,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK,CAAC;CACxD,MAAM,QAAQ,iBAAiB,KAAK,MAAM,GAAG,eAAe;CAC5D,IAAI;EACF,OAAO,MAAM,MAAM,KAAK;GAAE,GAAG;GAAM,QAAQ,KAAK;EAAO,CAAC;CAC1D,UACQ;EACN,aAAa,KAAK;EAClB,OAAO,oBAAoB,SAAS,OAAO;C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CAChC,mBAAmB;CACnB,MAAM;EACJ,MAAM;EAGN,IAAI,cAAsB;GACxB,OAAO;kCAGgC,iBAAiB,EAAE;EAG5D;EACA,aAAa;GACX,MAAM;GACN,YAAY;IACV,OAAO;KACL,MAAM;KACN,aAAa;IACf;IACA,aAAa;KACX,MAAM;KACN,aAAa,iDAAiD,oBAAoB,cAAc,iBAAiB;IACnH;GACF;GACA,UAAU,CAAC,OAAO;EACpB;CACF;CACA,MAAM,QAAQ,EAAE,OAAO,eAAe,KAAkB;EACtD,MAAM,IAAI,OAAO,UAAU,WAAW,MAAM,KAAK,IAAI;EACrD,IAAI,CAAC,GACH,OAAO;EACT,MAAM,MAAM,KAAK,IACf,OAAO,gBAAgB,YAAY,cAAc,IAAI,KAAK,MAAM,WAAW,IAAI,qBAC/E,gBACF;EACA,MAAM,UAAU,YAAY;EAG5B,MAAM,aAAa,IAAI,UAAU;EACjC,IAAI,CAAC,cAAc,aAAa,UAAU,UAAU,GAClD,OAAO,yBAAyB,QAAQ,YAAY,aAAa,SAAS;EAE5E,IAAI;GAMF,OAAO,cALS,YAAY,WACxB,MAAM,aAAa,GAAG,KAAK,IAAI,MAAM,IACrC,YAAY,UACV,MAAM,YAAY,GAAG,KAAK,IAAI,MAAM,IACpC,MAAM,iBAAiB,GAAG,KAAK,IAAI,MAAM,GACjB,OAAO;EACvC,SACO,KAAK;GACV,OAAO,qBAAqB,QAAQ,KAAK,aAAa,GAAG;EAC3D;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"web-search.js","names":[],"sources":["../../src/tools/web-search.ts"],"sourcesContent":["import type { ToolContext, ToolDef } from './types'\nimport { errorMessage } from '../errors'\nimport { stripHtmlInline } from './_html'\nimport { isHostAllowed } from './fetch-url'\nimport { toolPrompts } from './prompts'\n\n/**\n * Web search tool with a runtime-resolved backend.\n *\n * Backend selection is keyless-fallback: the first backend whose env var\n * is set wins, otherwise we fall through to DuckDuckGo's HTML endpoint\n * (no key required, no auth, rate-limited and brittle to layout changes).\n *\n * 1. TAVILY_API_KEY → https://api.tavily.com/search\n * 2. BRAVE_SEARCH_API_KEY → https://api.search.brave.com/res/v1/web/search\n * 3. (fallback) → https://html.duckduckgo.com/html/\n *\n * Selection happens per call (not at module init) so a key added\n * mid-session via the chat layer's auth flow is picked up on the very next\n * search without restarting the agent. The 5 ms env-var read is negligible\n * compared to the network round-trip.\n *\n * Anthropic providers can take over this tool server-side via the\n * `nativeWebSearch` capability — when set, the provider's `formatTools`\n * drops this `ToolDef` from the function-tools list and emits the\n * server-tool block instead, so this `execute` body is never invoked.\n */\n\nconst DEFAULT_MAX_RESULTS = 5\nconst HARD_MAX_RESULTS = 20\nconst HTTP_TIMEOUT_MS = 15_000\nconst ERROR_BODY_MAX = 256\n/**\n * Cap on the DuckDuckGo HTML we run the scrape regex over. `blockRe` chains\n * lazy `[\\s\\S]*?` spans, which degrade badly (ReDoS-ish slow path) on\n * multi-MB documents; a real DDG results page is well under 512K, so\n * anything past the cap is not results markup we'd want anyway.\n */\nconst DDG_HTML_MAX_CHARS = 512 * 1024\n\n/**\n * Current \"Month YYYY\" for the search description's recency hint. A model with\n * an older training cutoff otherwise queries with a stale year (`React docs\n * 2023`) and misses everything newer. Resolved per read (the `description`\n * getter below) so a long-lived process picks up a month rollover; the value\n * is stable within a session, so it doesn't thrash the provider prompt cache.\n */\nfunction currentMonthYear(): string {\n return new Date().toLocaleDateString('en-US', { month: 'long', year: 'numeric' })\n}\n\ninterface SearchResult {\n title: string\n url: string\n snippet: string\n}\n\ntype Backend = 'tavily' | 'brave' | 'duckduckgo'\n\n/** Egress host each backend talks to — gated against `fetchUrlAllowHosts`. */\nconst BACKEND_HOST: Record<Backend, string> = {\n tavily: 'api.tavily.com',\n brave: 'api.search.brave.com',\n duckduckgo: 'html.duckduckgo.com',\n}\n\nfunction pickBackend(): Backend {\n if (process.env.TAVILY_API_KEY)\n return 'tavily'\n if (process.env.BRAVE_SEARCH_API_KEY)\n return 'brave'\n return 'duckduckgo'\n}\n\nasync function fetchWithTimeout(url: string, init: RequestInit, signal: AbortSignal): Promise<Response> {\n const ctrl = new AbortController()\n const onAbort = (): void => ctrl.abort()\n signal.addEventListener('abort', onAbort, { once: true })\n const timer = setTimeout(() => ctrl.abort(), HTTP_TIMEOUT_MS)\n try {\n return await fetch(url, { ...init, signal: ctrl.signal })\n }\n finally {\n clearTimeout(timer)\n signal.removeEventListener('abort', onAbort)\n }\n}\n\n/**\n * Truncate untrusted HTTP error bodies before embedding them in our own\n * error string. Without this, a backend that returns an HTML 500 page\n * leaks a kilobyte of unstructured chrome straight into the model's\n * context window — which is both noisy and a small prompt-injection\n * surface.\n */\nasync function readErrorBody(res: Response): Promise<string> {\n const body = await res.text().catch(() => '')\n if (body.length <= ERROR_BODY_MAX)\n return body\n return `${body.slice(0, ERROR_BODY_MAX)}… (truncated, ${body.length} bytes total)`\n}\n\nasync function searchTavily(query: string, max: number, signal: AbortSignal): Promise<SearchResult[]> {\n const res = await fetchWithTimeout('https://api.tavily.com/search', {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({\n api_key: process.env.TAVILY_API_KEY,\n query,\n max_results: max,\n search_depth: 'basic',\n }),\n }, signal)\n if (!res.ok)\n throw new Error(`Tavily HTTP ${res.status}: ${await readErrorBody(res)}`)\n const json = await res.json() as { results?: Array<{ title?: string, url?: string, content?: string }> }\n return (json.results ?? []).map(r => ({\n title: r.title ?? '',\n url: r.url ?? '',\n snippet: r.content ?? '',\n }))\n}\n\nasync function searchBrave(query: string, max: number, signal: AbortSignal): Promise<SearchResult[]> {\n const url = `https://api.search.brave.com/res/v1/web/search?q=${encodeURIComponent(query)}&count=${max}`\n const res = await fetchWithTimeout(url, {\n headers: {\n 'accept': 'application/json',\n 'x-subscription-token': process.env.BRAVE_SEARCH_API_KEY!,\n },\n }, signal)\n if (!res.ok)\n throw new Error(`Brave HTTP ${res.status}: ${await readErrorBody(res)}`)\n const json = await res.json() as { web?: { results?: Array<{ title?: string, url?: string, description?: string }> } }\n return (json.web?.results ?? []).map(r => ({\n title: r.title ?? '',\n url: r.url ?? '',\n snippet: r.description ?? '',\n }))\n}\n\n// DDG's HTML endpoint redirects through /l/?uddg=<encoded> — unwrap it so the\n// model sees the destination URL directly.\nfunction unwrapDdgRedirect(href: string): string {\n try {\n const u = new URL(href, 'https://duckduckgo.com')\n if (u.pathname === '/l/' || u.pathname === '/l') {\n const target = u.searchParams.get('uddg')\n if (target)\n return decodeURIComponent(target)\n }\n return u.toString()\n }\n catch {\n return href\n }\n}\n\nasync function searchDuckDuckGo(query: string, max: number, signal: AbortSignal): Promise<SearchResult[]> {\n const url = `https://html.duckduckgo.com/html/?q=${encodeURIComponent(query)}`\n const res = await fetchWithTimeout(url, {\n headers: {\n // DDG returns an empty results page to unbranded UAs.\n 'user-agent': 'Mozilla/5.0 (compatible; zidane/1.0)',\n 'accept': 'text/html',\n },\n }, signal)\n if (!res.ok)\n throw new Error(`DuckDuckGo HTTP ${res.status}: ${await readErrorBody(res)}`)\n const html = (await res.text()).slice(0, DDG_HTML_MAX_CHARS)\n // Each result block has anchor `result__a` (title+url) and `result__snippet`.\n // Brittle by design — DDG ships layout changes occasionally and the scrape\n // silently returns zero hits when its anchors move. The keyed-key\n // backends (Tavily / Brave) are the supported happy path; this fallback\n // exists only so the tool is usable with no setup. If `results` is empty,\n // the formatter surfaces a \"(no results from duckduckgo)\" line.\n const results: SearchResult[] = []\n const blockRe = /<a[^>]+class=\"[^\"]*result__a[^\"]*\"[^>]+href=\"([^\"]+)\"[^>]*>([\\s\\S]*?)<\\/a>[\\s\\S]*?<a[^>]+class=\"[^\"]*result__snippet[^\"]*\"[^>]*>([\\s\\S]*?)<\\/a>/g\n\n let m = blockRe.exec(html)\n\n while (m !== null) {\n results.push({\n url: unwrapDdgRedirect(m[1]!),\n title: stripHtmlInline(m[2]!),\n snippet: stripHtmlInline(m[3]!),\n })\n if (results.length >= max)\n break\n\n m = blockRe.exec(html)\n }\n return results\n}\n\nfunction formatResults(results: SearchResult[], backend: Backend): string {\n if (results.length === 0) {\n // The keyless DuckDuckGo scrape returns zero hits both for genuinely\n // empty queries AND when DDG ships a layout change that moves the anchors\n // this regex keys off. Distinguish it from the keyed backends with an\n // actionable hint so a confused model (or user reading the transcript)\n // knows the fix is a real search key, not a better query.\n if (backend === 'duckduckgo') {\n return '(no results from the keyless DuckDuckGo fallback: it is rate-limited and '\n + 'brittle to layout changes. Set TAVILY_API_KEY or BRAVE_SEARCH_API_KEY for reliable search.)'\n }\n return `(no results from ${backend})`\n }\n const header = `# Web search results (${backend}, ${results.length} ${results.length === 1 ? 'hit' : 'hits'})\\n`\n const body = results.map((r, i) => `${i + 1}. ${r.title}\\n ${r.url}\\n ${r.snippet}`).join('\\n\\n')\n return `${header}\\n${body}`\n}\n\nexport const webSearch: ToolDef = {\n isConcurrencySafe: true,\n spec: {\n name: 'web_search',\n // Getter, not a constant, so the recency hint reflects the current month\n // each time the spec is formatted for the provider (see `currentMonthYear`).\n get description(): string {\n return `${toolPrompts.web_search.core}\\n${toolPrompts.web_search.recency(currentMonthYear())}`\n },\n inputSchema: {\n type: 'object',\n properties: {\n query: {\n type: 'string',\n description: 'Search query. Plain natural-language or keyword form; quoting and site: operators are passed through verbatim.',\n },\n max_results: {\n type: 'number',\n description: `Maximum number of results to return. Default: ${DEFAULT_MAX_RESULTS}. Capped at ${HARD_MAX_RESULTS}.`,\n },\n },\n required: ['query'],\n },\n },\n async execute({ query, max_results }, ctx: ToolContext) {\n const q = typeof query === 'string' ? query.trim() : ''\n if (!q)\n return 'web_search error: `query` is required'\n const max = Math.min(\n typeof max_results === 'number' && max_results > 0 ? Math.floor(max_results) : DEFAULT_MAX_RESULTS,\n HARD_MAX_RESULTS,\n )\n const backend = pickBackend()\n // Honor the egress allowlist (when configured): refuse a backend whose\n // host isn't approved rather than silently making the request.\n const allowHosts = ctx.behavior?.fetchUrlAllowHosts\n if (!isHostAllowed(BACKEND_HOST[backend], allowHosts)) {\n return `web_search error: the ${backend} backend (${BACKEND_HOST[backend]}) is not in the configured egress allowlist`\n }\n try {\n const results = backend === 'tavily'\n ? await searchTavily(q, max, ctx.signal)\n : backend === 'brave'\n ? await searchBrave(q, max, ctx.signal)\n : await searchDuckDuckGo(q, max, ctx.signal)\n return formatResults(results, backend)\n }\n catch (err) {\n return `web_search error (${backend}): ${errorMessage(err)}`\n }\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,sBAAsB;AAC5B,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AACxB,MAAM,iBAAiB;;;;;;;AAOvB,MAAM,qBAAqB,MAAM;;;;;;;;AASjC,SAAS,mBAA2B;CAClC,wBAAO,IAAI,KAAK,EAAA,CAAE,mBAAmB,SAAS;EAAE,OAAO;EAAQ,MAAM;CAAU,CAAC;AAClF;;AAWA,MAAM,eAAwC;CAC5C,QAAQ;CACR,OAAO;CACP,YAAY;AACd;AAEA,SAAS,cAAuB;CAC9B,IAAI,QAAQ,IAAI,gBACd,OAAO;CACT,IAAI,QAAQ,IAAI,sBACd,OAAO;CACT,OAAO;AACT;AAEA,eAAe,iBAAiB,KAAa,MAAmB,QAAwC;CACtG,MAAM,OAAO,IAAI,gBAAgB;CACjC,MAAM,gBAAsB,KAAK,MAAM;CACvC,OAAO,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK,CAAC;CACxD,MAAM,QAAQ,iBAAiB,KAAK,MAAM,GAAG,eAAe;CAC5D,IAAI;EACF,OAAO,MAAM,MAAM,KAAK;GAAE,GAAG;GAAM,QAAQ,KAAK;EAAO,CAAC;CAC1D,UACQ;EACN,aAAa,KAAK;EAClB,OAAO,oBAAoB,SAAS,OAAO;CAC7C;AACF;;;;;;;;AASA,eAAe,cAAc,KAAgC;CAC3D,MAAM,OAAO,MAAM,IAAI,KAAK,CAAC,CAAC,YAAY,EAAE;CAC5C,IAAI,KAAK,UAAU,gBACjB,OAAO;CACT,OAAO,GAAG,KAAK,MAAM,GAAG,cAAc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;KACL,MAAM;KACN,aAAa;IACf;IACA,aAAa;KACX,MAAM;KACN,aAAa,iDAAiD,oBAAoB,cAAc,iBAAiB;IACnH;GACF;GACA,UAAU,CAAC,OAAO;EACpB;CACF;CACA,MAAM,QAAQ,EAAE,OAAO,eAAe,KAAkB;EACtD,MAAM,IAAI,OAAO,UAAU,WAAW,MAAM,KAAK,IAAI;EACrD,IAAI,CAAC,GACH,OAAO;EACT,MAAM,MAAM,KAAK,IACf,OAAO,gBAAgB,YAAY,cAAc,IAAI,KAAK,MAAM,WAAW,IAAI,qBAC/E,gBACF;EACA,MAAM,UAAU,YAAY;EAG5B,MAAM,aAAa,IAAI,UAAU;EACjC,IAAI,CAAC,cAAc,aAAa,UAAU,UAAU,GAClD,OAAO,yBAAyB,QAAQ,YAAY,aAAa,SAAS;EAE5E,IAAI;GAMF,OAAO,cALS,YAAY,WACxB,MAAM,aAAa,GAAG,KAAK,IAAI,MAAM,IACrC,YAAY,UACV,MAAM,YAAY,GAAG,KAAK,IAAI,MAAM,IACpC,MAAM,iBAAiB,GAAG,KAAK,IAAI,MAAM,GACjB,OAAO;EACvC,SACO,KAAK;GACV,OAAO,qBAAqB,QAAQ,KAAK,aAAa,GAAG;EAC3D;CACF;AACF"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { A_ as
|
|
2
|
-
|
|
1
|
+
import { A_ as ToolDescriptionTarget, Ar as createSkillsReadTool, B_ as readStateKey, Br as InteractionToolOptions, Cc as createModelSearchTool, Cr as ToolSearchToolOptions, D_ as ToolContext, Dr as SkillsRunScriptToolOptions, Er as createSkillsUseTool, F_ as ReadStateMap, Fr as RECORD_ARTIFACT_TOOL, Hr as grep, I_ as getReadState, Ir as recordArtifact, L_ as hashContent, Lr as readFile, M_ as ToolMap, Mr as CreateShellToolOptions, N_ as HydrateReadStateOptions, Nr as createShellTool, O_ as ToolDef, Or as createSkillsRunScriptTool, P_ as ReadStateEntry, Pr as shell, R_ as hydrateReadStateFromSession, Rr as multiEdit, Sc as SpawnModelEntry, Sr as LazyToolEntry, Tc as matchModelEntries, Tr as SkillsUseToolOptions, Ur as glob, V_ as resolveReadStateMap, Vr as createInteractionTool, Wr as edit, _c as SubagentDef, _r as waitTask, bc as createSpawnTool, br as TailTruncateOptions, dc as ExtensionSubagentDef, fc as SpawnTaskInput, gc as SpawnToolState, gr as WAIT_TASK_TIMED_OUT_PREFIX, hc as SpawnToolOptions, hr as writeFile, j_ as ToolDescriptions, jr as shellKill, k_ as ToolDescriptionOverride, kr as SkillsReadToolOptions, mc as SpawnTool, pc as SpawnTaskOutcome, uc as ChildAgent, vc as SubagentOverride, vr as ValidationResult, wc as formatModelLine, wr as createToolSearchTool, xc as isSpawnTool, xr as tailTruncate, yc as SubagentRegistry, yr as validateToolArgs, z_ as hydrateReadStateFromSessionAsync, zr as listFiles } from "./index-DCYh6lOp.js";
|
|
2
|
+
import { n as toolPrompts, t as ToolPrompts } from "./prompts-Pqc3JdW_.js";
|
|
3
|
+
export { type ChildAgent, type CreateShellToolOptions, type ExtensionSubagentDef, type HydrateReadStateOptions, type InteractionToolOptions, type LazyToolEntry, RECORD_ARTIFACT_TOOL, type ReadStateEntry, type ReadStateMap, type SkillsReadToolOptions, type SkillsRunScriptToolOptions, type SkillsUseToolOptions, type SpawnModelEntry, type SpawnTaskInput, type SpawnTaskOutcome, type SpawnTool, type SpawnToolOptions, type SpawnToolState, type SubagentDef, type SubagentOverride, type SubagentRegistry, type TailTruncateOptions, type ToolContext, type ToolDef, type ToolDescriptionOverride, type ToolDescriptionTarget, type ToolDescriptions, type ToolMap, type ToolPrompts, type ToolSearchToolOptions, type ValidationResult, WAIT_TASK_TIMED_OUT_PREFIX, createInteractionTool, createModelSearchTool, createShellTool, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolSearchTool, edit, formatModelLine, getReadState, glob, grep, hashContent, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, isSpawnTool, listFiles, matchModelEntries, multiEdit, readFile, readStateKey, recordArtifact, resolveReadStateMap, shell, shellKill, tailTruncate, toolPrompts, validateToolArgs, waitTask, writeFile };
|
package/dist/tools.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { Bt as multiEdit, Dt as createToolSearchTool, Et as waitTask, Ft as createShellTool, Gt as createInteractionTool, Ht as formatModelLine, It as shell, Jt as edit, Kt as grep, Lt as tailTruncate, Mt as createSkillsRunScriptTool, Nt as createSkillsReadTool, Ot as createSpawnTool, Pt as shellKill, Qt as recordArtifact, Rt as readFile, Tt as WAIT_TASK_TIMED_OUT_PREFIX, Ut as matchModelEntries, Vt as createModelSearchTool, Wt as listFiles, Yt as validateToolArgs, Zt as RECORD_ARTIFACT_TOOL, ar as hydrateReadStateFromSessionAsync, ir as hydrateReadStateFromSession, jt as createSkillsUseTool, kt as isSpawnTool, nr as getReadState, or as readStateKey, qt as glob, rr as hashContent, sr as resolveReadStateMap, wt as writeFile } from "./agent-
|
|
2
|
-
|
|
1
|
+
import { Bt as multiEdit, Dt as createToolSearchTool, Et as waitTask, Ft as createShellTool, Gt as createInteractionTool, Ht as formatModelLine, It as shell, Jt as edit, Kt as grep, Lt as tailTruncate, Mt as createSkillsRunScriptTool, Nt as createSkillsReadTool, Ot as createSpawnTool, Pt as shellKill, Qt as recordArtifact, Rt as readFile, Tt as WAIT_TASK_TIMED_OUT_PREFIX, Ut as matchModelEntries, Vt as createModelSearchTool, Wt as listFiles, Yt as validateToolArgs, Zt as RECORD_ARTIFACT_TOOL, ar as hydrateReadStateFromSessionAsync, ir as hydrateReadStateFromSession, jt as createSkillsUseTool, kt as isSpawnTool, nr as getReadState, or as readStateKey, qt as glob, rr as hashContent, sr as resolveReadStateMap, wt as writeFile } from "./agent-CJbmpTmA.js";
|
|
2
|
+
import { toolPrompts } from "./tools/prompts.js";
|
|
3
|
+
export { RECORD_ARTIFACT_TOOL, WAIT_TASK_TIMED_OUT_PREFIX, createInteractionTool, createModelSearchTool, createShellTool, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolSearchTool, edit, formatModelLine, getReadState, glob, grep, hashContent, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, isSpawnTool, listFiles, matchModelEntries, multiEdit, readFile, readStateKey, recordArtifact, resolveReadStateMap, shell, shellKill, tailTruncate, toolPrompts, validateToolArgs, waitTask, writeFile };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $s as StoredExtensionConfigItem, Ju as SessionMeta, Ko as ExtensionRegistry, Ku as Picked, Lc as LoadedPlugin, Md as ModelChainEntry, Rl as StorageMode, Vs as ExtensionConfigCategory, Vu as EditOutcome, Xd as ProviderKey, Xu as StreamEvent,
|
|
1
|
+
import { $s as StoredExtensionConfigItem, Ju as SessionMeta, Ko as ExtensionRegistry, Ku as Picked, Lc as LoadedPlugin, Md as ModelChainEntry, Q_ as SkillConfig, Rl as StorageMode, Vs as ExtensionConfigCategory, Vu as EditOutcome, Xd as ProviderKey, Xu as StreamEvent, Yd as ProviderAuth, Yu as Settings, Zg as SessionContentBlock, cv as SessionRun, ef as ModelInfo, jg as McpServerConfig, jp as AgentRegistry, l_ as ThinkingLevel, lv as SessionStore, m_ as ToolResultContent, nf as ProviderDescriptor, ov as SessionData, t as Preset, t_ as SessionTurn, vc as SubagentOverride, yc as SubagentRegistry } from "./index-DCYh6lOp.js";
|
|
2
2
|
//#region src/chat/hints.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Single hint entry — `<key> <label>`, optionally followed by an inline
|
|
@@ -1751,4 +1751,4 @@ declare function computeTurnAnchors(items: readonly TranscriptItem[]): {
|
|
|
1751
1751
|
};
|
|
1752
1752
|
//#endregion
|
|
1753
1753
|
export { ModelUsageSummary as $, ProviderCredential as A, groupBindings as At, removeStoredCredential as B, Hint as Bt, discoverProjectMcps as C, KeyBindingDef as Ct, OAuthCredential as D, ResolvedExtensionKeybinding as Dt, CredentialsFile as E, ParsedBinding as Et, readCredentials as F, readKeybindings as Ft, writeCredentials as G, setPreferredCredential as H, hintsLength as Ht, readProviderCredential as I, readKeybindingsRaw as It, ProviderRegistry as J, AutoUpdateConfig as K, readProviderCredentialPair as L, resolveExtensionKeybindings as Lt, StoredCredential as M, matchesBinding as Mt, applyApiKeyEnv as N, mergeKeybindings as Nt, PreferCredentialResult as O, ensureKeybindingsFile as Ot, credentialsPath as P, parseBindingSpec as Pt, resolveStoragePaths as Q, readProviderCredentials as R, stripJsonComments as Rt, defaultMcpsConfigPaths as S, KeyAction as St, ApiKeyCredential as T, KeyBindings as Tt, setProviderCredential as U, truncateTrailing as Ut, setCredentialLabel as V, clipHintsToWidth as Vt, storedCredentialsOf as W, ResolvedPaths as X, ResolvedConfig as Y, resolveConfig as Z, DiscoveredMcp as _, usageByModel as _t, SessionExportTarget as a, eventsFromTurns as at, buildMcpServers as b, KEYBINDING_DEF_BY_ACTION as bt, writeSessionExport as c, loadState as ct, useEnabledToggleSet as d, stripSpawnTokensLine as dt, StateStoreApi as et, DiscoveredPlugin as f, sumRunCosts as ft, projectUserPaths as g, updateToolEventOutcomes as gt, ProjectUserPath as h, toolResultText as ht, SessionExportFormat as i, deriveSessionTitle as it, SetProviderCredentialOptions as j, keybindingsPath as jt, PreferredCredentialTarget as k, formatBindingForDisplay as kt, EnabledAllowlistKey as l, marginTopFor as lt, discoverProjectPlugins as m, toolCallPreview as mt, computeTurnAnchors as n, compactSummaryEvent as nt, renderSession as o, lastContextSizeFromTurns as ot, buildPluginContributions as p, titleFromTurns as pt, ChatOptions as q, SessionExportAnchor as r, createStateStore as rt, resolveSessionExportTarget as s, listSessionMeta as st, TranscriptItem as t, TuiState as tt, EnabledToggleSet as u, saveState as ut, DiscoveryError as v, DEFAULT_KEYBINDINGS as vt, parseMcpsFile as w, KeyBindingSection as wt, dedupMcpServersByName as x, KEYBINDING_KEY_COL_WIDTH as xt, DiscoveryResult as y, KEYBINDING_DEFS as yt, removeProviderCredential as z, EMPTY_HINTS as zt };
|
|
1754
|
-
//# sourceMappingURL=transcript-anchors-
|
|
1754
|
+
//# sourceMappingURL=transcript-anchors-DjcEsOYq.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript-anchors-DfnBVZX0.d.ts","names":[],"sources":["../src/chat/hints.ts","../src/start/shared-options.ts","../src/chat/keybindings.ts","../src/chat/store.ts","../src/chat/config.ts","../src/chat/credentials.ts","../src/chat/mcps-discovery.ts","../src/chat/project-user-paths.ts","../src/chat/plugins-discovery.ts","../src/chat/enabled-toggle-set.ts","../src/chat/session-export.ts","../src/chat/transcript-anchors.ts"],"mappings":";;;;;;AAuBA;;;;;;UAAiB,IAAA;EACf,GAAA;EACA,KAAA;EAYE;EAVF,QAAA;EAmBE;EAjBF,UAAA;EAqBE;;AAAU;AAcd;;;EA5BE,KAAA;IACE,GAAA;IACA,KAAA;IAmDuB;;;AAAuB;AAqBlD;;;IAhEI,OAAA,WAgEmC;IA9DnC,QAAA,WA2E4B;IAzE5B,UAAA;EAAA;AAAA;;;;;AAyEmF;;;;ACnHvF;;iBDwDgB,gBAAA,CAAiB,IAAA,UAAc,GAAW;;ACxDuF;AACjJ;;;;iBDgFgB,WAAA,CAAY,KAAsB,WAAN,IAAI;AC9EhD;;;;AAAkD;AAClD;;;AADA,cDmGa,WAAA,WAAsB,IAAI;AClGc;AAErD;;;;AAA+D;AAC/D;;;;AAAqD;AAHA,iBD+GrC,gBAAA,CAAiB,KAAA,WAAgB,IAAA,IAAQ,MAAA,oBAA0B,IAAI;;;cCnH1E,kBAAA;AAAA,KACD,iBAAA,UAA2B,kBAAkB;AAAA,cAE5C,gBAAA;AAAA,KACD,eAAA,UAAyB,gBAAgB;AAAA,cAExC,gBAAA;AAAA,KACD,eAAA,UAAyB,gBAAgB;AAAA,UAEpC,iBAAA;EACf,MAAA;EACA,MAAA;EACA,KAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,YAAA,GAAe,MAAA;EACf,MAAA;EACA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A1D,KU7BY,mBAAA;;UAGK,mBAAA;EVmD2B;EUjD1C,GAAA;EVsEW;EUpEX,QAAA;;EAEA,MAAA,EAAQ,mBAAmB;AAAA;AV+E7B;AAAA,UU3EU,cAAA;;EAER,GAAA;EVyE+C;EUvE/C,IAAA;EVuEuD;;;AAA8B;EUlErF,MAAA;AAAA;;ATjDF;;;;AAAiJ;AACjJ;;;;AAAyD;AAEzD;;iBSgEgB,0BAAA,CAA2B,IAAA;EACzC,SAAA;EACA,MAAA,EAAQ,mBAAA;AAAA,IACN,cAAA,GAAiB,mBAAA;;;;ATlEgC;AAErD;;;;AAA+D;AAC/D;;;;AAAqD;AAErD;iBSyFgB,aAAA,CAAc,OAAA,EAAS,WAAA,EAAa,MAAA,EAAQ,mBAAmB;;;;;;;iBAYzD,kBAAA,CACpB,IAAA;EAAQ,OAAA,EAAS,WAAA;EAAa,MAAA,EAAQ,mBAAA;AAAA,IAAwB,cAAA,GAC7D,OAAA,CAAQ,mBAAA;;;;;;AVjGX;;;;;;;;;;;KWQY,cAAA;EACJ,IAAA;EAAe,KAAA,EAAO,WAAA;EAAa,QAAA,GAAW,WAAA;AAAA;EAC9C,IAAA;EAAmB,MAAA,EAAQ,WAAA;EAAe,QAAA,GAAW,WAAA;AAAA;EACrD,IAAA;EAAoB,GAAA;EAAa,MAAA,EAAQ,WAAA;EAAe,QAAA,GAAW,WAAA;AAAA;AXuDzB;AAqBlD;;;;AAAuC;AAavC;;;;;;;;;AAAuF;;;AAlCrC,iBWnClC,kBAAA,CAAmB,KAAA,WAAgB,cAAA;EACjD,QAAA,EAAU,WAAW;EACrB,GAAA;EACA,UAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"transcript-anchors-DjcEsOYq.d.ts","names":[],"sources":["../src/chat/hints.ts","../src/start/shared-options.ts","../src/chat/keybindings.ts","../src/chat/store.ts","../src/chat/config.ts","../src/chat/credentials.ts","../src/chat/mcps-discovery.ts","../src/chat/project-user-paths.ts","../src/chat/plugins-discovery.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AAAA,IACN,cAAA,GAAiB,mBAAA;;;;ATlEgC;AAErD;;;;AAA+D;AAC/D;;;;AAAqD;AAErD;iBSyFgB,aAAA,CAAc,OAAA,EAAS,WAAA,EAAa,MAAA,EAAQ,mBAAmB;;;;;;;iBAYzD,kBAAA,CACpB,IAAA;EAAQ,OAAA,EAAS,WAAA;EAAa,MAAA,EAAQ,mBAAA;AAAA,IAAwB,cAAA,GAC7D,OAAA,CAAQ,mBAAA;;;;;;AVjGX;;;;;;;;;;;KWQY,cAAA;EACJ,IAAA;EAAe,KAAA,EAAO,WAAA;EAAa,QAAA,GAAW,WAAA;AAAA;EAC9C,IAAA;EAAmB,MAAA,EAAQ,WAAA;EAAe,QAAA,GAAW,WAAA;AAAA;EACrD,IAAA;EAAoB,GAAA;EAAa,MAAA,EAAQ,WAAA;EAAe,QAAA,GAAW,WAAA;AAAA;AXuDzB;AAqBlD;;;;AAAuC;AAavC;;;;;;;;;AAAuF;;;AAlCrC,iBWnClC,kBAAA,CAAmB,KAAA,WAAgB,cAAA;EACjD,QAAA,EAAU,WAAW;EACrB,GAAA;EACA,UAAA;AAAA"}
|
package/dist/tui.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $s as StoredExtensionConfigItem, Af as InteractionRequest, Ag as JsonValue, Jl as ThemeColors, Ju as SessionMeta, Ko as ExtensionRegistry, Md as ModelChainEntry, Ng as McpToolSchema, Rf as PlanRequest, Rp as accentColor, Vp as ContextSegment, Vs as ExtensionConfigCategory, Xd as ProviderKey, Xu as StreamEvent,
|
|
2
|
-
import { Bt as Hint, Ht as hintsLength, Tt as KeyBindings, Ut as truncateTrailing, Vt as clipHintsToWidth, Y as ResolvedConfig, _ as DiscoveredMcp, f as DiscoveredPlugin, i as SessionExportFormat, k as PreferredCredentialTarget, l as EnabledAllowlistKey, lt as marginTopFor, n as computeTurnAnchors, q as ChatOptions, t as TranscriptItem, v as DiscoveryError } from "./transcript-anchors-
|
|
3
|
-
import { H as ApprovalRequest, T as SessionHistoryMatch, V as ApprovalDecision, X as DaemonHealth, a as formatToolCall, bt as turnSelectionOwnership, c as splitPromptSegments, dt as isEditErrorResult, ft as isTurnHighlighted, h as MarkdownSegment, i as displayNameFor, l as CatalogEntry, mt as isVisible, n as ToolDisplayMeta, o as PromptSegment, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, v as splitMarkdownCodeBlocks, vt as selectableTurnIds } from "./tool-formatters-
|
|
1
|
+
import { $s as StoredExtensionConfigItem, Af as InteractionRequest, Ag as JsonValue, Jl as ThemeColors, Ju as SessionMeta, Ko as ExtensionRegistry, Md as ModelChainEntry, Ng as McpToolSchema, Q_ as SkillConfig, Rf as PlanRequest, Rp as accentColor, Vp as ContextSegment, Vs as ExtensionConfigCategory, Xd as ProviderKey, Xu as StreamEvent, Yd as ProviderAuth, Yu as Settings, du as CompletionProvider, ef as ModelInfo, eu as InlineAutocompleteProvider, fs as LoadedExtension, fu as CompletionReference, is as ExtensionToolRendererEntry, jf as InteractionResponse, jg as McpServerConfig, jo as ExtensionDefinition, jp as AgentRegistry, ko as ExtensionCustomRenderer, l_ as ThinkingLevel, ou as CompletionState, ov as SessionData, ps as LoadedPluginRecord, ql as Theme, t_ as SessionTurn, tf as ModelOption, vp as RingBufferSink } from "./index-DCYh6lOp.js";
|
|
2
|
+
import { Bt as Hint, Ht as hintsLength, Tt as KeyBindings, Ut as truncateTrailing, Vt as clipHintsToWidth, Y as ResolvedConfig, _ as DiscoveredMcp, f as DiscoveredPlugin, i as SessionExportFormat, k as PreferredCredentialTarget, l as EnabledAllowlistKey, lt as marginTopFor, n as computeTurnAnchors, q as ChatOptions, t as TranscriptItem, v as DiscoveryError } from "./transcript-anchors-DjcEsOYq.js";
|
|
3
|
+
import { H as ApprovalRequest, T as SessionHistoryMatch, V as ApprovalDecision, X as DaemonHealth, a as formatToolCall, bt as turnSelectionOwnership, c as splitPromptSegments, dt as isEditErrorResult, ft as isTurnHighlighted, h as MarkdownSegment, i as displayNameFor, l as CatalogEntry, mt as isVisible, n as ToolDisplayMeta, o as PromptSegment, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, v as splitMarkdownCodeBlocks, vt as selectableTurnIds } from "./tool-formatters-BDm0tjgy.js";
|
|
4
4
|
import { Buffer } from "node:buffer";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
import { RGBA, SyntaxStyle } from "@opentui/core";
|