@peroxider/dsh-python-bridge
v0.0.3
Published
Generic Cordis plugin that registers Python bridge services, tools, and listeners from the runtime manifest.
Readme
@peroxider/dsh-python-bridge
这个 manifest 驱动的 Cordis 插件无需生成 TypeScript 包即可加载带装饰器的 Python 模块。配置 module、类 service 所需的 className、pythonPath 和使用 Python 参数名的 initArgs;插件会注册 worker manifest 返回的第一个 service、全部工具和全部监听器。pythonPath 条目排在继承的 PYTHONPATH 之前。
零构建的动态集成使用本包;TypeScript 消费者需要静态 ctx.<service> 签名或逐字段 schemastery 配置时,使用 @peroxider/dsh-python-bridge-codegen。两条路径共用相同的 worker runtime 和线协议行为。
模型体验
只有 Python 模块声明的工具通过 ctx.tools 进入模型;service 方法和监听器本身不增加提示词。
已知限制与延期工作
service 类型是动态的,一个模块只注册第一个声明的 service,并且基于类的模块必须显式配置 className。
