Skip to content

refactor(external-plugin): 收敛公开仓库为 Java/Node SPI - #19

Draft
zhou-hao wants to merge 2 commits into
masterfrom
codex/external-plugin-sdk
Draft

refactor(external-plugin): 收敛公开仓库为 Java/Node SPI#19
zhou-hao wants to merge 2 commits into
masterfrom
codex/external-plugin-sdk

Conversation

@zhou-hao

@zhou-hao zhou-hao commented Aug 12, 2026

Copy link
Copy Markdown
Member

目的

  • 将公开 jetlinks-plugin 收敛为插件开发者可依赖的 Java/Node SPI。
  • 将协议、进程/容器运行时、RSocket 和平台 host bridge 从公开 SDK 边界移除。

核心变动

  • 保留 plugin-core Java PluginDriver / Plugin / PluginContext 契约。
  • 新增 plugin-nodejs,提供 Node.js 24+ 的 transport-neutral SPI、生命周期、monitor、scheduler、host service 和 standalone/device/collector capability profile。
  • 删除公开 plugin-protocolplugin-external、旧 plugin-sdk-node runtime 实现及 wire 文档;平台 runtime 在 cloud 仓库维护。

设计与测试目标

  • 设计稿:cloud modules/jetlinks-components/docs/plans/2026-08-05-external-plugin-container-management.md
  • 用户确认:已确认;当前为 Draft,等待平台 runtime PR 联调。
  • 测试目标:Node SPI contract tests 覆盖 capability 导出和公开 surface;Java plugin-core 回归通过。
  • 注释 / 公共契约:已补 Node SPI 类型注释和 README 边界说明;平台运行时实现不再属于本 PR。
  • 数据权限:不适用。
  • 数据库兼容与性能:不适用。
  • 链路追踪:不适用;仅定义 transport-neutral context/monitor 契约。
  • MBean 运维可观测性:不适用;生命周期监督由 cloud runtime 负责。

测试结果

  • 命令:mvn -pl plugin-core -am test
  • 单元测试:1 passed, 0 failed, 0 skipped。
  • 命令:npm testplugin-nodejs
  • Node contract tests:2 passed, 0 failed, 0 skipped;TypeScript strict/noEmit 检查通过。
  • 集成测试:不适用;本 PR 不包含协议、进程、容器或外部服务实现。
  • 覆盖率:未单独生成;SPI 为类型/契约包,使用 contract tests 和编译检查作为替代证据。

文档同步情况

  • 已同步:仓库 README、plugin-nodejs/README.md
  • 已删除不再属于公开边界的 wire 文档。

风险与说明

  • 影响范围:公开 artifact 发生不兼容收敛;当前版本尚未发布,不保留旧实现兼容别名。
  • 未覆盖场景:真实 Java/Node 跨语言通信、Docker、设备和数采垂直闭环由 cloud runtime PR #1560 及后续集成测试覆盖。
  • 已知限制:plugin-nodejs 只定义 SPI,不提供运行时启动器;这是平台内部边界约束。

@zhou-hao
zhou-hao marked this pull request as draft August 12, 2026 09:11
@zhou-hao zhou-hao changed the title feat(external-plugin): 新增跨语言协议与Java及Node SDK refactor(external-plugin): 收敛公开仓库为 Java/Node SPI Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant