Highlights
- Custom (string-id) tools now type-check.
register_tool()'d tools carry a plain-string id, and the runtime always accepted them -- but the public annotations named only the built-in enum, forcing casts under pyright/basedpyright.BrainSpec.toolsis nowtuple[ToolId | str, ...]andToolSpec.idisToolId | str(the MCP pool's typing was widened to match), so declaring a custom spec and selecting it from a brain type-checks cleanly. - Custom tools can be enabled via config.
AgentConfig.enabled_tools(andsetup_tools/warmup_tools'enabled_tool_names) now accepts a registered custom tool's id alongside the built-inToolNames, so consumers no longer need a customBrainSpecjust to turn a registered tool on. A name that is neither a configurableToolNamenor a registered tool id raises a clearValueError. - Fixed a latent crash on string ids. Error and log paths that did
spec.id.value(the MCP "not in the pool" setup error, warmup logging/failure messages, pool shutdown logging) would raiseAttributeErroron a string id and mask the real error; ids are now formatted enum/str-agnostically viastr(spec.id).
No behavior change for built-in tools: ToolId is a StrEnum, so enum and string ids already interoperate as dict keys and in comparisons. No breaking changes.
Install
pip install 'openlily @ git+https://github.com/getlark/openlily.git@v0.10.0#subdirectory=server'