json-schema-to-zod-example@0.1.11
Patch Changes
- Updated dependencies [c2bbfa8]
- @composio/core@0.27.0
Folge Composio, um die Release Notes in deinen Feed zu holen.
c2bbfa8: Add session hooks. A hook can block a tool call before it runs, or block its result before the agent sees it.
create() and update() accept hooks. On update(), hooks replaces the whole list and null removes every hook. hooks cannot be combined with experimental.sessionConfigId.
const session = await composio.create('user_123', {
hooks: [
{
type: 'before_execute',
id: 'no_external_email',
name: 'No external email',
appliesTo: { toolkits: ['gmail'] },
handler: {
type: 'condition_check',
condition: 'Sending email to anyone outside example.org',
action: 'block',
},
},
],
});
A blocked call comes back from session.execute() and session.executeMeta() with resultType: 'blocked', empty data, the hook's message in error, and blockReason. Provider integrations hand it to the agent as a failed call with that message. Every result also carries hookResults when a hook applied.
session.proxyExecute() and ctx.proxyExecute() now return resultType: 'completed' or resultType: 'blocked'. A blocked request has no HTTP response, so TypeScript code that reads status has to check resultType first.
c2bbfa8: Add session hooks. A hook can block a tool call before it runs, or block its result before the agent sees it.
create() and update() accept hooks. On update(), hooks replaces the whole list and null removes every hook. hooks cannot be combined with experimental.sessionConfigId.
const session = await composio.create('user_123', {
hooks: [
{
type: 'before_execute',
id: 'no_external_email',
name: 'No external email',
appliesTo: { toolkits: ['gmail'] },
handler: {
type: 'condition_check',
condition: 'Sending email to anyone outside example.org',
action: 'block',
},
},
],
});
A blocked call comes back from session.execute() and session.executeMeta() with resultType: 'blocked', empty data, the hook's message in error, and blockReason. Provider integrations hand it to the agent as a failed call with that message. Every result also carries hookResults when a hook applied.
session.proxyExecute() and ctx.proxyExecute() now return resultType: 'completed' or resultType: 'blocked'. A blocked request has no HTTP response, so TypeScript code that reads status has to check resultType first.
@mastra/mcp peer dependency. The provider never imported it, but package managers that install peers automatically pulled in about 234 extra packages.experimental.tool by @jkomyno in https://github.com/ComposioHQ/composio/pull/5061next to released 0.29.1 and add release notes by @jkomyno in https://github.com/ComposioHQ/composio/pull/5062