@ampcode/plugin 0.0.0-20260903001817-g400a7f3 → 0.0.0-20260905001706-g303364c
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 +13 -7
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -647,6 +647,7 @@ declare module '@ampcode/plugin' {
|
|
|
647
647
|
| 'deepseek'
|
|
648
648
|
| 'fireworks-ai'
|
|
649
649
|
| 'google-vertex'
|
|
650
|
+
| 'meta'
|
|
650
651
|
| 'minimax'
|
|
651
652
|
| 'openai'
|
|
652
653
|
| 'xai'
|
|
@@ -1916,22 +1917,27 @@ declare module '@ampcode/plugin' {
|
|
|
1916
1917
|
|
|
1917
1918
|
/**
|
|
1918
1919
|
* A custom tool declared in an agent directory's `tools/<name>.ts` file, the argument to
|
|
1919
|
-
* {@link defineTool}. The tool's name is the filename. The `description` and
|
|
1920
|
-
* fields must be static literals
|
|
1921
|
-
*
|
|
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.
|
|
1922
1923
|
*/
|
|
1923
1924
|
export interface AgentToolConfig {
|
|
1924
1925
|
/** Description shown to the LLM explaining what the tool does */
|
|
1925
1926
|
description?: string
|
|
1926
1927
|
|
|
1927
1928
|
/**
|
|
1928
|
-
* Where the tool executes. `
|
|
1929
|
-
* repository checkout
|
|
1930
|
-
*
|
|
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.
|
|
1931
1933
|
*/
|
|
1932
1934
|
execution?: 'server' | 'executor'
|
|
1933
1935
|
|
|
1934
|
-
/**
|
|
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
|
+
*/
|
|
1935
1941
|
inputSchema: PluginToolDefinition['inputSchema']
|
|
1936
1942
|
|
|
1937
1943
|
/** Execute the tool with the given input and return a result */
|