Minor Changes
- 461c6c3: Add experimental
premiumUsagesupport when creating and updating Tool Router Sessions. - 0833c1b: Expose
hostedAccount.allowedToolSlugsonsession.search()toolkit connection statuses for toolkits served by a Composio hosted account. - de5e3f6: Add experimental support for saved Session configs.
composio.sessionConfigs.list()andcomposio.sessionConfigs.get()read the project's savedsc_…configs, andexperimental.sessionConfigIdoncomposio.sessions.create()starts a session from one. CombiningsessionConfigIdwith inline access fields now fails before any request: on create withtoolkits,tools,tags,experimental.customToolsorexperimental.customToolkits, and onsession.update()withtoolkits,toolsortags(includingnull). TypeScript reports the mix at compile time and the SDK throwsValidationErrorat runtime; other invalid inputs keep throwingZodError.session.experimental.sourceSessionConfigexposes the last config applied to the session aftercreate(),sessions.use()andupdate(). A 409 whileupdate()applies a config now says that the session or the config changed and to re-fetch and retry, instead of reporting a stale version.
Patch Changes
-
3721d04: Validate the server-supplied mount path before
RemoteFile.save()turns it into a filename. AmountRelativePathof"",".","sub/.","foo/.."or".."made the default save path equal the download directory or its parent, which surfaced as an unhandledEISDIRfromwriteFileSyncafter the directory had already been created. These now throw aValidationErrornaming the offending mount path, before anymkdiror write. An explicitpathpassed by the caller is unaffected.The new
safeBasenamehelper applies the filename safety checks used by the Python SDK: both/and\count as separators, and NUL or control characters, Windows-reserved characters and device names, trailing spaces or dots, invalid Unicode and names over 128 UTF-8 bytes are rejected.RemoteFile.filenamenow also splits on both separators, so a Windows-style mount path reduces to the same display name on every platform.Drive-relative paths such as
C:report.txtreduce toreport.txt. Whitespace stripping follows Python rules, preserving U+FEFF. Both SDKs also reject trailing dots exposed by stripping Unicode whitespace. -
5ec0bdf: Validate the default destination in
RemoteFile.save()before downloading content. Invalid mount paths now raiseValidationErrorwithout a network request, even when the download would fail. -
de5e3f6: Remove experimental annotations from the top-level Session config read methods. Applying a config and reading its source metadata remain under
experimental. -
5d07582:
session.update()no longer sendsexpected_config_versionby default. Since 0.20.0 it sent the session's last observedconfigVersionon every call, and the API rejects that field with a 400 (Unrecognized key(s) in object: 'expected_config_version'), so every defaultupdate()failed. The default is now last writer wins. PassexpectedConfigVersion(for examplesession.configVersion) to make an update conditional where the API supports it;expectedConfigVersion: falseis the same as omitting it.