Skip to content

Commit 4d2c17f

Browse files
committed
fix(plugins): show package install metadata when inspecting child entries
1 parent 3f1c84c commit 4d2c17f

4 files changed

Lines changed: 269 additions & 142 deletions

File tree

‎docs/cli/plugins.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ openclaw plugins inspect --all
489489

490490
Inspect shows identity, load status, source, manifest capabilities, policy flags, diagnostics, install metadata, bundle capabilities, and any detected MCP or LSP server support without importing plugin runtime by default. JSON output includes the plugin manifest contracts, such as `contracts.agentToolResultMiddleware` and `contracts.trustedToolPolicies`, so operators can audit trusted-surface declarations before enabling or restarting a plugin. Add `--runtime` to load the plugin module and include registered hooks, tools, commands, services, gateway methods, and HTTP routes. Runtime inspection reports missing plugin dependencies directly; installs and repairs stay in `openclaw plugins install`, `openclaw plugins update`, and `openclaw doctor --fix`.
491491

492+
For multi-entry packages, inspecting any child shows the shared package install metadata. `inspect --all --json` includes that same record for each child. If package ownership is missing or ambiguous, inspection omits install metadata rather than attributing an unrelated install record.
493+
492494
Plugin-owned CLI commands are usually installed as root `openclaw` command groups, but plugins may also register nested commands under a core parent such as `openclaw nodes`. After `inspect --runtime` shows a command under `cliCommands`, run it at the listed path; for example a plugin that registers `demo-git` can be verified with `openclaw demo-git ping`.
493495

494496
Each plugin is classified by what it actually registers at runtime:

‎src/cli/plugins-cli-test-helpers.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export const loadPluginManifestRegistryMock: UnknownMock = vi.fn();
142142
export const buildPluginSnapshotReportMock: UnknownMock = vi.fn();
143143
export const buildPluginRegistrySnapshotReportMock: UnknownMock = vi.fn();
144144
export const buildPluginInspectReportMock: UnknownMock = vi.fn();
145-
const buildAllPluginInspectReports: UnknownMock = vi.fn();
145+
export const buildAllPluginInspectReportsMock: UnknownMock = vi.fn();
146146
export const buildPluginDiagnosticsReportMock: UnknownMock = vi.fn();
147147
export const buildPluginCompatibilityNoticesMock: UnknownMock = vi.fn();
148148
export const inspectPluginRegistryMock: AsyncUnknownMock = vi.fn();
@@ -495,7 +495,7 @@ vi.mock("../plugins/status.js", () => ({
495495
Parameters<(typeof import("../plugins/status.js"))["buildAllPluginInspectReports"]>,
496496
ReturnType<(typeof import("../plugins/status.js"))["buildAllPluginInspectReports"]>
497497
>(
498-
buildAllPluginInspectReports,
498+
buildAllPluginInspectReportsMock,
499499
...args,
500500
)) as (typeof import("../plugins/status.js"))["buildAllPluginInspectReports"],
501501
buildPluginDiagnosticsReport: ((
@@ -894,6 +894,7 @@ export function resetPluginsCliTestState() {
894894
buildPluginSnapshotReportMock.mockReset();
895895
buildPluginRegistrySnapshotReportMock.mockReset();
896896
buildPluginInspectReportMock.mockReset();
897+
buildAllPluginInspectReportsMock.mockReset();
897898
buildPluginDiagnosticsReportMock.mockReset();
898899
buildPluginCompatibilityNoticesMock.mockReset();
899900
inspectPluginRegistryMock.mockReset();

0 commit comments

Comments
 (0)