Repository navigation
@composio/slim@0.23.0
Minor Changes
-
55ed9e2: Update the owned API client to
@composio/client@2.0.0-rc.11.A session tool can now ask for user input, such as an approval, instead of running: the API answers the call with
result_type: "input_required".session.execute(),session.proxyExecute(), provider-wrapped session tools, and theexecute/proxyExecutehelpers passed to custom tools throw the newComposioToolInputRequiredErrorin that case. A local custom tool whose body makes such a call lets the error through instead of returning it as a failed result. The error carries the questions oninputRequestsand the opaquerequest_stateonrequestState.requestStateis continuation state, so it is a non-enumerable property: read it aserror.requestState, andconsole.error(error),util.inspect(error)andJSON.stringify(error)leave it out. Nothing was executed and the call is not retried. The SDK does not submit answers yet.Every session tool that ran reports
result_typeascompletedorfailed, and a failed execution can carry anullor emptyerror.session.execute()and the custom toolexecutehelper return it as the newresultType, which is always present; read it rather thanerrorto tell a failure from a success. Provider-wrapped session tools, provider tool calls bound to a session, and the mergedCOMPOSIO_MULTI_EXECUTE_TOOLresult setsuccessfulfrom it alone, so a failure without error text is no longer reported as successful.erroris returned as the API sent it. A session execute answer withoutresult_type, or with a value this SDK does not know, throwsValidationErrorinstead of being read as a success or a failure.A
COMPOSIO_MULTI_EXECUTE_TOOLbatch that mixes local custom tools with remote tools now throwsComposioToolInputRequiredErrorwhen the remote half needs user input, as an all-remote batch already did. It used to report the input request as a failure message on each remote tool, withoutinputRequestsorrequestState. Local tools in that batch have already run by then, and their results are discarded by the throw.Breaking changes:
ToolRouterSessionConfig(session.config, the result ofsession.update()) andToolRouterSessionConfigHistoryConfig(session.listConfigHistory()) are now the client's own config types.instantis always present (falseor the policy object) instead of optional.- In those config types,
toolkitsand eachtoolsentry can be a{ require_approval }-only object, so a check forenabledordisabledno longer covers every case.tagscan carryrequire_approval, and the config can carryproxy_execute. - The session config is returned as the API sent it. The SDK no longer validates
instantat runtime or removes apremium_usagekey. ToolRouterSessionExecuteResponserequiresresultType. A customToolCallSessionpassed to a provider must return it fromexecute(), becausesuccessfulis no longer derived fromerror.- Removed the unused
ToolRouterInstantResponseSchemaandToolRouterInstantResponseexports. UseToolRouterSessionConfig['instant']for the Instant policy the API returns.
Patch Changes
- 67e80e3: Update the owned API client to
@composio/client@2.0.0-rc.9. - a7b4943: Send product identity, product version, language, and runtime version with API requests. Identify installed core and slim packages separately while preserving existing telemetry headers.
- Updated dependencies [077ceb3]
- Updated dependencies [d9f6291]
- @composio/json-schema-to-zod@0.3.4