@quilltap/plugin-types 1.7.0 → 1.8.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.8.1] - 2026-01-14
9
+
10
+ ### Changed
11
+
12
+ - **Breaking**: `getMultipleToolDefinitions` now accepts a `config` parameter
13
+ - Old signature: `getMultipleToolDefinitions?: () => UniversalTool[]`
14
+ - New signature: `getMultipleToolDefinitions?: (config: Record<string, unknown>) => UniversalTool[]`
15
+ - This allows multi-tool plugins to discover tools dynamically based on user configuration
16
+ - Required for plugins like MCP that need configuration to connect to external servers
17
+
18
+ ## [1.8.0] - 2026-01-13
19
+
20
+ ### Added
21
+
22
+ - Multi-tool plugin support for `ToolPlugin` interface:
23
+ - `getMultipleToolDefinitions?: () => UniversalTool[]` - Allows plugins to provide multiple tools dynamically
24
+ - `executeByName?: (toolName, input, context) => Promise<ToolExecutionResult>` - Execute a specific tool by name (required for multi-tool plugins)
25
+ - `onConfigurationChange?: (config) => Promise<void>` - Callback when user configuration changes
26
+ - These additions enable plugins like the MCP connector to discover and expose multiple tools from external servers
27
+
8
28
  ## [1.7.0] - 2026-01-09
9
29
 
10
30
  ### Added
package/dist/index.d.mts CHANGED
@@ -175,6 +175,41 @@ interface ToolPlugin {
175
175
  renderIcon?: (props: {
176
176
  className?: string;
177
177
  }) => React.ReactNode;
178
+ /**
179
+ * Get multiple tool definitions (optional)
180
+ *
181
+ * For plugins that provide multiple tools dynamically (e.g., MCP connector).
182
+ * When implemented, the registry will call this at request time (not startup)
183
+ * to get the current list of tools based on configuration.
184
+ *
185
+ * This allows plugins to discover tools dynamically based on user config
186
+ * (e.g., MCP servers to connect to).
187
+ *
188
+ * @param config User configuration for this plugin
189
+ * @returns Array of tool definitions in universal format
190
+ */
191
+ getMultipleToolDefinitions?: (config: Record<string, unknown>) => UniversalTool[];
192
+ /**
193
+ * Execute a specific tool by name (optional)
194
+ *
195
+ * Required when getMultipleToolDefinitions is implemented.
196
+ * The registry routes execution to this method based on the tool name.
197
+ *
198
+ * @param toolName The name of the tool to execute (as returned by getMultipleToolDefinitions)
199
+ * @param input The input arguments from the LLM
200
+ * @param context Execution context with user/chat info and config
201
+ * @returns Promise resolving to the execution result
202
+ */
203
+ executeByName?: (toolName: string, input: Record<string, unknown>, context: ToolExecutionContext) => Promise<ToolExecutionResult>;
204
+ /**
205
+ * Called when configuration changes (optional)
206
+ *
207
+ * Allows plugins to refresh their state when user configuration changes.
208
+ * For multi-tool plugins, this may trigger re-discovery of available tools.
209
+ *
210
+ * @param config The updated user configuration
211
+ */
212
+ onConfigurationChange?: (config: Record<string, unknown>) => Promise<void>;
178
213
  }
179
214
  /**
180
215
  * Standard export type for tool plugins
package/dist/index.d.ts CHANGED
@@ -175,6 +175,41 @@ interface ToolPlugin {
175
175
  renderIcon?: (props: {
176
176
  className?: string;
177
177
  }) => React.ReactNode;
178
+ /**
179
+ * Get multiple tool definitions (optional)
180
+ *
181
+ * For plugins that provide multiple tools dynamically (e.g., MCP connector).
182
+ * When implemented, the registry will call this at request time (not startup)
183
+ * to get the current list of tools based on configuration.
184
+ *
185
+ * This allows plugins to discover tools dynamically based on user config
186
+ * (e.g., MCP servers to connect to).
187
+ *
188
+ * @param config User configuration for this plugin
189
+ * @returns Array of tool definitions in universal format
190
+ */
191
+ getMultipleToolDefinitions?: (config: Record<string, unknown>) => UniversalTool[];
192
+ /**
193
+ * Execute a specific tool by name (optional)
194
+ *
195
+ * Required when getMultipleToolDefinitions is implemented.
196
+ * The registry routes execution to this method based on the tool name.
197
+ *
198
+ * @param toolName The name of the tool to execute (as returned by getMultipleToolDefinitions)
199
+ * @param input The input arguments from the LLM
200
+ * @param context Execution context with user/chat info and config
201
+ * @returns Promise resolving to the execution result
202
+ */
203
+ executeByName?: (toolName: string, input: Record<string, unknown>, context: ToolExecutionContext) => Promise<ToolExecutionResult>;
204
+ /**
205
+ * Called when configuration changes (optional)
206
+ *
207
+ * Allows plugins to refresh their state when user configuration changes.
208
+ * For multi-tool plugins, this may trigger re-discovery of available tools.
209
+ *
210
+ * @param config The updated user configuration
211
+ */
212
+ onConfigurationChange?: (config: Record<string, unknown>) => Promise<void>;
178
213
  }
179
214
  /**
180
215
  * Standard export type for tool plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quilltap/plugin-types",
3
- "version": "1.7.0",
3
+ "version": "1.8.1",
4
4
  "description": "Type definitions for Quilltap plugin development",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",