@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.
Files changed (2) hide show
  1. package/index.d.ts +13 -7
  2. 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 `execution`
1920
- * fields must be static literals; `inputSchema` and `execute` are real code that is not
1921
- * statically parsed and runs where `execution` places it.
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. `server` tools run where the agent runs (its sandbox, no
1929
- * repository checkout needed); `executor` tools are dispatched to the attached executor
1930
- * at the repository checkout. Defaults to `server`.
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
- /** JSON Schema for the tool's input parameters */
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 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260903001817-g400a7f3",
3
+ "version": "0.0.0-20260905001706-g303364c",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/docs/plugin-api",
6
6
  "author": {