Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 12:15 UTC
fix(typesafe): preserve prototype-named caller arguments
shams haroon committed
Sep 17, 2026 at 20:29 UTC
bfc654ac66a9d968fc14f4da4dcd426f2c29ab71
2 files changed
+6
-5
ts/packages/providers/typesafe/src/index.ts
+5
-4
@@ -148,10 +148,11 @@ export class TypesafeProvider extends BaseNonAgenticProvider<
148
this.assertToolCallExecutionOptions(executionTarget, options, modifiers);
149
150
// Caller arguments win over Jev-bound values. Absent or undefined values are missing.
151
- const callArguments = { ...parsed.data.arguments };
152
- for (const [name, value] of Object.entries(input?.arguments ?? {})) {
153
- if (value !== undefined) callArguments[name] = value;
154
- }
151
+ // Define caller keys as data properties so `__proto__` stays an argument.
152
+ const callerArguments = Object.fromEntries(
153
+ Object.entries(input?.arguments ?? {}).filter(([, value]) => value !== undefined)
154
+ );
155
+ const callArguments = { ...parsed.data.arguments, ...callerArguments };
156
const missing = (parsed.data.kind === 'partial' ? parsed.data.missing : []).filter(
157
path => !Object.hasOwn(callArguments, path[0]) || callArguments[path[0]] === undefined
158
);
ts/packages/providers/typesafe/test/execute.test.ts
+1
-1
@@ -103,7 +103,7 @@ describe('execute', () => {
103
);
104
});
105
106
- it.each(['toString', 'constructor'])(
106
+ it.each(['toString', 'constructor', '__proto__'])(
107
'requires an explicitly supplied value for the argument %s',
108
async name => {
109
const decision: TypesafePartialDecision = { ...partial, missing: [[name]] };