-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using typescript-sdk on restricted javascript execution environments we get the following error:
This is because restricted javascript environments, like cloudflare workers or deno deploy do not accept eval, or new Function constructions. Since ajv.compile requires these dinamic evaluations, this error is logged to the console.
To Reproduce
Steps to reproduce the behavior:
- Run the server on restricted JS envs like cloudflare workers (wrangler to test it locally)
- Add tools and try to connect to the server. You'll see this error popup
Expected behavior
No error log to be logged to the console if these primitives are not available.
Additional context
Places that should be, somehow, guarded
typescript-sdk/src/server/index.ts
Line 358 in bf81793
const validate = ajv.compile(params.requestedSchema); |
typescript-sdk/src/client/index.ts
Line 487 in bf81793
const validator = this._ajv.compile(tool.outputSchema); |
vibegui
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working