Open
Conversation
Author
|
Of course open to any feedback |
Member
|
Tracking with TYSDK-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds client-side tool support for
DedalusRunner, enabling tools that require user interaction or browser APIs to be handled on the client rather than executed by the runner.Key Changes
New types and exports
Toolis now a union type:ToolFunction | ToolDefinitionToolFunction- plain callable function (always server-side, original tool definition)ToolDefinition- structured tool with explicit schema, optionalexecute. Closely mirrors the Dedalus API tools schema (name,description,parameters,strict), with an addedexecutefunction for server-side executionToolHandler- interface for tool registration and executionToolParametersSchema- JSON Schema type for parametersClient-side tool execution pattern
executefunction are server-side tools (executed by the runner)executefunction are client-side tools (forwarded to the client via stream)Zod schema support
zodToJsonSchema()utility used by bothToolDefinitionand the existingzodResponseFormathelperDocumentation
DedalusRunnersection to README covering basic usage, tool definitions, client-side tools, streaming,RunResultproperties, and configuration optionsUsage Example
Testing
tools.test.ts)runner-client-tools.test.ts)Note
Adds client-side tool handling to DedalusRunner, introduces ToolDefinition/ToolFunction typing with Zod/JSON Schema support, updates execution flow, and documents usage with comprehensive tests.
toolHandler.schemas/toolNames; fixes MCP/local tool name checks.ToolDefinition,ToolFunction,ToolParametersSchema, andToolHandler;Toolis now a union.createToolHandler()registers tools, exposesschemas,toolNames,isClientTool(), and guardedexec().toSchemaFromDefinition()to convertToolDefinition(JSON Schema or Zod) to API schema.utils/zodwithisZodSchema()andzodToJsonSchema()used across helpers.toSchemaFromDefinitionfrom public indexes.zodResponseFormat()andzodFunction()to use shared Zod utils and simplify JSON Schema conversion.DedalusRunnersection with usage, tool definitions, client-side tools, streaming,RunResult, and config.Written by Cursor Bugbot for commit f5cd48c. This will update automatically on new commits. Configure here.