@ampcode/plugin 0.0.0-20260904001652-g2bd7889 → 0.0.0-20260906001924-ga3e743b
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/index.d.ts +12 -7
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1917,22 +1917,27 @@ declare module '@ampcode/plugin' {
|
|
|
1917
1917
|
|
|
1918
1918
|
/**
|
|
1919
1919
|
* A custom tool declared in an agent directory's `tools/<name>.ts` file, the argument to
|
|
1920
|
-
* {@link defineTool}. The tool's name is the filename. The `description` and
|
|
1921
|
-
* fields must be static literals
|
|
1922
|
-
*
|
|
1920
|
+
* {@link defineTool}. The tool's name is the filename. The `description`, `execution`, and
|
|
1921
|
+
* `inputSchema` fields must be static literals written directly in the file; only `execute`
|
|
1922
|
+
* is real code, and it runs where `execution` places it.
|
|
1923
1923
|
*/
|
|
1924
1924
|
export interface AgentToolConfig {
|
|
1925
1925
|
/** Description shown to the LLM explaining what the tool does */
|
|
1926
1926
|
description?: string
|
|
1927
1927
|
|
|
1928
1928
|
/**
|
|
1929
|
-
* Where the tool executes. `
|
|
1930
|
-
* repository checkout
|
|
1931
|
-
*
|
|
1929
|
+
* Where the tool executes. `executor` tools (the default) are dispatched to the attached
|
|
1930
|
+
* executor at the repository checkout. `server` tools run this file in a small detached
|
|
1931
|
+
* sandbox with no repository checkout, kept warm per thread. On `serverOnly` agents the
|
|
1932
|
+
* default is `server` and `executor` is a validation error.
|
|
1932
1933
|
*/
|
|
1933
1934
|
execution?: 'server' | 'executor'
|
|
1934
1935
|
|
|
1935
|
-
/**
|
|
1936
|
+
/**
|
|
1937
|
+
* JSON Schema for the tool's input parameters. Must be a JSON literal written directly
|
|
1938
|
+
* in the `defineTool` call (it is statically extracted, never evaluated) and must
|
|
1939
|
+
* describe an object (`type: 'object'`).
|
|
1940
|
+
*/
|
|
1936
1941
|
inputSchema: PluginToolDefinition['inputSchema']
|
|
1937
1942
|
|
|
1938
1943
|
/** Execute the tool with the given input and return a result */
|