@koishi-ce/plugin-insight
v1.1.4
Published
Show plugin dependency graph for Koishi
Downloads
905
Maintainers
Readme
@koishi-ce/plugin-insight
简体中文 | English
插件依赖图插件,移植自上游 koishijs/webui 的 plugins/insight。它把 cordis 运行时的拓扑结构——插件的 fork 关系与服务注入关系——推送给前端,以力导向图直观呈现整个应用的依赖网络。
功能与页面
- 「依赖图」页面:路由
/graph(order 550),用力导向图渲染当前运行时:- 实线边表示插件调用 / fork 关系;
- 虚线边表示服务注入(必需依赖)关系。
- 节点属性:
weight:取该 scope 的 disposables 数量,影响节点视觉权重;isGroup/isRoot:分组节点与根应用(App)标记;services:该节点上下文中注册的服务名列表。
- 完全可复用、部分可复用与不可复用三类插件按不同的连线形态区分展示。
配置项
本插件无需配置。
用法
需要先启用 console(@koishi-ce/plugin-console)。安装:
bun add @koishi-ce/plugin-insight也可以在控制台的插件市场中直接安装。随后在配置文件中启用:
plugins:
insight: {}备注
- 提供
insight数据服务(nodes + edges);监听internal/fork、internal/runtime、internal/service、internal/status内部事件,防抖后整体刷新图数据。 - 无指令、无数据表。
许可证
AGPL-3.0。版权归 Shigma 及 Koishijs 贡献者(上游)与 Koishi-CE 贡献者,见 NOTICE。上游仓库:koishijs/webui 的 plugins/insight。
English
Plugin dependency graph plugin, ported from plugins/insight of the upstream koishijs/webui repository. It pushes the cordis runtime topology — plugin fork relations and service injections — to the frontend, rendered as a force-directed graph.
Features and Pages
- "Dependency Graph" page: route
/graph(order 550), a force-directed graph of the current runtime:- Solid edges: plugin call / fork relations.
- Dashed edges: service injection (required dependencies).
- Node attributes:
weight(number of disposables, affecting visual weight),isGroup/isRootflags, andservices(service names registered in that scope). - Fully reusable, partially reusable, and non-reusable plugins are drawn with distinct edge patterns.
Configuration
None.
Usage
Requires console (@koishi-ce/plugin-console) to be enabled first.
bun add @koishi-ce/plugin-insightThe plugin can also be installed from the console plugin market, then enabled in the config file:
plugins:
insight: {}Notes
- Provides the
insightdata service (nodes + edges); refreshes (debounced) oninternal/fork,internal/runtime,internal/service, andinternal/statusevents. No commands, no tables.
License
AGPL-3.0. Copyright belongs to Shigma and Koishijs contributors (upstream) and Koishi-CE contributors; see NOTICE. Upstream: koishijs/webui, plugins/insight.
