@openclaw/plugin-inspector 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 0.3.1 - 2026-04-28
6
+
7
+ ### Added
8
+
9
+ - Add grouped root facades: `pluginRoot`, `fixtureSuites`, `staticInspection`, `reports`, `contracts`, `ci`, `runtime`, and `synthetic`.
10
+ - Expose contract capture, contract coverage, CI rollup, runtime profile, ref/profile diff, import-loop, and synthetic probe helpers from the root package API.
11
+ - Add a release follow-through guard that fails when Crabpot scripts regress to the legacy `advanced.js` bundle.
12
+ - Add a package-contents release guard for npm tarball entrypoints, examples, and README assets.
13
+
14
+ ### Changed
15
+
16
+ - Move Crabpot integration scripts to the root public API while keeping Crabpot as the fixture corpus and report consumer.
17
+ - Keep generic artifact writing out of the root API; Crabpot-owned runner scripts write their own JSON outputs.
18
+ - Ship the README banner asset in the npm package so the published README does not reference a missing local image.
19
+ - Document the grouped root import path for embedding harnesses without turning the README into a full API dump.
20
+
3
21
  ## 0.3.0 - 2026-04-27
4
22
 
5
23
  ### Added
package/README.md CHANGED
@@ -18,6 +18,14 @@ npx @openclaw/plugin-inspector
18
18
  That runs `check`, writes report artifacts to `reports/`, and exits non-zero
19
19
  when compatibility breakages are found.
20
20
 
21
+ Package-manager equivalents:
22
+
23
+ ```bash
24
+ pnpm dlx @openclaw/plugin-inspector
25
+ yarn dlx @openclaw/plugin-inspector
26
+ bunx @openclaw/plugin-inspector
27
+ ```
28
+
21
29
  Add a local config and GitHub Actions workflow:
22
30
 
23
31
  ```bash
@@ -36,6 +44,18 @@ npm install --save-dev @openclaw/plugin-inspector
36
44
  npx plugin-inspector check
37
45
  ```
38
46
 
47
+ With a local dev dependency, prefer package scripts so CI and local checks use
48
+ the same command:
49
+
50
+ ```json
51
+ {
52
+ "scripts": {
53
+ "plugin:check": "plugin-inspector inspect --no-openclaw",
54
+ "plugin:ci": "plugin-inspector ci --no-openclaw --runtime --mock-sdk --allow-execute"
55
+ }
56
+ }
57
+ ```
58
+
39
59
  ## Commands
40
60
 
41
61
  ```bash
@@ -236,6 +256,26 @@ plugin-inspector report --config crabpot.config.json --out reports
236
256
  Use fixture suites when one repo wants to inspect many plugins. Use plugin-root
237
257
  `check` for normal plugin CI.
238
258
 
259
+ ## Library Use
260
+
261
+ Most plugin repos should use the CLI. Harnesses can import grouped root helpers
262
+ when they need to embed the inspector:
263
+
264
+ ```js
265
+ import { pluginRoot, fixtureSuites, contracts, ci } from "@openclaw/plugin-inspector";
266
+
267
+ const { report } = await pluginRoot.runCheck({
268
+ pluginRoot: process.cwd(),
269
+ openclawPath: false,
270
+ });
271
+ const capture = contracts.buildCapture({ report });
272
+ const summary = await ci.buildSummary({ reports: { compatibility: report } });
273
+ ```
274
+
275
+ The root package groups stable workflows as `pluginRoot`, `fixtureSuites`,
276
+ `staticInspection`, `reports`, `contracts`, `ci`, `runtime`, and `synthetic`.
277
+ Named exports remain available for existing automation.
278
+
239
279
  ## Mocking Model
240
280
 
241
281
  Default inspection is static, offline, and credential-free. Runtime capture is
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/plugin-inspector",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": false,
5
5
  "description": "Offline compatibility inspector for OpenClaw plugins.",
6
6
  "type": "module",
@@ -43,14 +43,19 @@
43
43
  "files": [
44
44
  "src",
45
45
  "examples",
46
+ "docs/plugin-inspector-banner.jpg",
46
47
  "README.md",
47
48
  "CHANGELOG.md",
48
49
  "LICENSE"
49
50
  ],
50
51
  "scripts": {
51
- "check": "npm test && npm pack --dry-run",
52
+ "check": "npm test && npm run release:contents",
52
53
  "release:crabpot": "node scripts/check-crabpot-followthrough.mjs",
54
+ "release:contents": "node scripts/check-package-contents.mjs",
55
+ "release:plan": "node scripts/release-plan.mjs",
56
+ "release:readiness": "npm run release:local && npm run release:crabpot",
53
57
  "release:local": "npm run check",
58
+ "release:notes": "node scripts/release-notes.mjs --unreleased",
54
59
  "test": "node --test test/*.test.js"
55
60
  },
56
61
  "keywords": [
package/src/api.js CHANGED
@@ -8,6 +8,24 @@ import { renderTextSummary, writeCompatibilityReport } from "./report.js";
8
8
  import { writeCiOutputArtifacts } from "./ci-outputs.js";
9
9
  import { buildRuntimeCaptureReport, writeRuntimeCaptureReport } from "./runtime-capture-report.js";
10
10
  import { inspectCompatibilityFixtureSet, inspectFixtureSet } from "./inspector.js";
11
+ import {
12
+ buildColdImportReadiness,
13
+ renderColdImportReadinessMarkdown,
14
+ validateColdImportReadiness,
15
+ writeColdImportReadiness,
16
+ } from "./cold-import-readiness.js";
17
+ import {
18
+ buildWorkspacePlan,
19
+ renderWorkspacePlanMarkdown,
20
+ validateWorkspacePlan,
21
+ writeWorkspacePlan,
22
+ } from "./workspace-plan.js";
23
+ import {
24
+ buildPlatformProbes,
25
+ renderPlatformProbesMarkdown,
26
+ validatePlatformProbes,
27
+ writePlatformProbes,
28
+ } from "./platform-probes.js";
11
29
 
12
30
  export async function loadPluginConfig(options = {}) {
13
31
  if (options.config) {
@@ -87,6 +105,98 @@ export async function runFixtureSetReport(options = {}) {
87
105
  return { report, paths };
88
106
  }
89
107
 
108
+ export async function buildFixtureSetColdImportReadiness(options = {}) {
109
+ const config = options.report ? null : await loadFixtureSetConfig(options);
110
+ const report =
111
+ options.report ??
112
+ (await inspectCompatibilityFixtureSet(config, {
113
+ generatedAt: options.generatedAt,
114
+ openclawPath: options.openclawPath,
115
+ targetOpenClaw: options.targetOpenClaw,
116
+ }));
117
+
118
+ return buildColdImportReadiness({
119
+ ...options,
120
+ report,
121
+ rootDir: options.rootDir ?? config?.rootDir ?? options.cwd,
122
+ });
123
+ }
124
+
125
+ export function renderFixtureSetColdImportReadinessMarkdown(readiness, options = {}) {
126
+ return renderColdImportReadinessMarkdown(readiness, options);
127
+ }
128
+
129
+ export async function writeFixtureSetColdImportReadiness(readiness, options = {}) {
130
+ return writeColdImportReadiness(readiness, options);
131
+ }
132
+
133
+ export async function runFixtureSetColdImportReadiness(options = {}) {
134
+ const readiness = await buildFixtureSetColdImportReadiness(options);
135
+ const paths = options.write === false ? null : await writeFixtureSetColdImportReadiness(readiness, options);
136
+ return { readiness, paths };
137
+ }
138
+
139
+ export async function buildFixtureSetWorkspacePlan(options = {}) {
140
+ const config = options.report ? null : await loadFixtureSetConfig(options);
141
+ const report =
142
+ options.report ??
143
+ (await inspectCompatibilityFixtureSet(config, {
144
+ generatedAt: options.generatedAt,
145
+ openclawPath: options.openclawPath,
146
+ targetOpenClaw: options.targetOpenClaw,
147
+ }));
148
+ const rootDir = options.rootDir ?? config?.rootDir ?? options.cwd;
149
+ const readiness = options.readiness ?? buildColdImportReadiness({ ...options, report, rootDir });
150
+
151
+ return buildWorkspacePlan({
152
+ ...options,
153
+ report,
154
+ readiness,
155
+ rootDir,
156
+ });
157
+ }
158
+
159
+ export function renderFixtureSetWorkspacePlanMarkdown(plan, options = {}) {
160
+ return renderWorkspacePlanMarkdown(plan, options);
161
+ }
162
+
163
+ export function validateFixtureSetWorkspacePlan(plan, options = {}) {
164
+ return validateWorkspacePlan(plan, options);
165
+ }
166
+
167
+ export async function writeFixtureSetWorkspacePlan(plan, options = {}) {
168
+ return writeWorkspacePlan(plan, options);
169
+ }
170
+
171
+ export async function runFixtureSetWorkspacePlan(options = {}) {
172
+ const plan = await buildFixtureSetWorkspacePlan(options);
173
+ const paths = options.write === false ? null : await writeFixtureSetWorkspacePlan(plan, options);
174
+ return { plan, paths };
175
+ }
176
+
177
+ export async function buildFixtureSetPlatformProbes(options = {}) {
178
+ const plan = options.plan ?? (await buildFixtureSetWorkspacePlan(options));
179
+ return buildPlatformProbes({ ...options, plan });
180
+ }
181
+
182
+ export function renderFixtureSetPlatformProbesMarkdown(report, options = {}) {
183
+ return renderPlatformProbesMarkdown(report, options);
184
+ }
185
+
186
+ export function validateFixtureSetPlatformProbes(report, options = {}) {
187
+ return validatePlatformProbes(report, options);
188
+ }
189
+
190
+ export async function writeFixtureSetPlatformProbes(report, options = {}) {
191
+ return writePlatformProbes(report, options);
192
+ }
193
+
194
+ export async function runFixtureSetPlatformProbes(options = {}) {
195
+ const report = await buildFixtureSetPlatformProbes(options);
196
+ const paths = options.write === false ? null : await writeFixtureSetPlatformProbes(report, options);
197
+ return { report, paths };
198
+ }
199
+
90
200
  export async function runPluginCheck(options = {}) {
91
201
  const outDir = options.outDir ?? "reports";
92
202
  const config = await loadPluginConfig(options);
@@ -131,7 +241,7 @@ export async function setupPluginInspector(options = {}) {
131
241
  return writePluginInspectorInit(options);
132
242
  }
133
243
 
134
- export { createCaptureApi, renderTextSummary, writeCiOutputArtifacts };
244
+ export { createCaptureApi, renderTextSummary, validateColdImportReadiness, writeCiOutputArtifacts };
135
245
 
136
246
  function executionAllowed(options) {
137
247
  return options.allowExecution === true || process.env.PLUGIN_INSPECTOR_EXECUTE_ISOLATED === "1";
package/src/index.js CHANGED
@@ -1,17 +1,239 @@
1
+ import * as pluginApi from "./api.js";
2
+ import * as ciPolicyApi from "./ci-policy.js";
3
+ import * as ciSummaryApi from "./ci-summary.js";
4
+ import * as configApi from "./config.js";
5
+ import * as contractCaptureApi from "./contract-capture.js";
6
+ import * as contractCoverageApi from "./contract-coverage.js";
7
+ import * as executionResultsApi from "./execution-results.js";
8
+ import * as importLoopProfileApi from "./import-loop-profile.js";
9
+ import * as inspectorApi from "./inspector.js";
10
+ import * as issuesApi from "./issues.js";
11
+ import * as openClawTargetApi from "./openclaw-target.js";
12
+ import * as profileDiffApi from "./profile-diff.js";
13
+ import * as refDiffApi from "./ref-diff.js";
14
+ import * as reportApi from "./report.js";
15
+ import * as runtimeProfileApi from "./runtime-profile.js";
16
+ import * as syntheticProbeSuiteApi from "./synthetic-probe-suite.js";
17
+ import * as syntheticProbesApi from "./synthetic-probes.js";
18
+
19
+ export const pluginRoot = Object.freeze({
20
+ loadConfig: pluginApi.loadPluginConfig,
21
+ inspect: pluginApi.inspectPluginRoot,
22
+ runCheck: pluginApi.runPluginCheck,
23
+ captureEntrypoint: pluginApi.capturePluginEntrypoint,
24
+ setup: pluginApi.setupPluginInspector,
25
+ });
26
+
27
+ export const fixtureSuites = Object.freeze({
28
+ loadConfig: configApi.loadInspectorConfig,
29
+ inspect: pluginApi.inspectCompatibilityFixtureSetConfig,
30
+ inspectStatic: pluginApi.inspectFixtureSetConfig,
31
+ runReport: pluginApi.runFixtureSetReport,
32
+ writeReports: pluginApi.writeFixtureSetReports,
33
+ renderReport: pluginApi.renderFixtureSetMarkdownReport,
34
+ renderIssues: pluginApi.renderFixtureSetIssuesReport,
35
+ buildColdImportReadiness: pluginApi.buildFixtureSetColdImportReadiness,
36
+ runColdImportReadiness: pluginApi.runFixtureSetColdImportReadiness,
37
+ writeColdImportReadiness: pluginApi.writeFixtureSetColdImportReadiness,
38
+ buildWorkspacePlan: pluginApi.buildFixtureSetWorkspacePlan,
39
+ runWorkspacePlan: pluginApi.runFixtureSetWorkspacePlan,
40
+ writeWorkspacePlan: pluginApi.writeFixtureSetWorkspacePlan,
41
+ buildPlatformProbes: pluginApi.buildFixtureSetPlatformProbes,
42
+ runPlatformProbes: pluginApi.runFixtureSetPlatformProbes,
43
+ writePlatformProbes: pluginApi.writeFixtureSetPlatformProbes,
44
+ });
45
+
46
+ export const staticInspection = Object.freeze({
47
+ loadConfig: configApi.loadInspectorConfig,
48
+ inspectSourceText: inspectorApi.inspectSourceText,
49
+ inspectPlugin: inspectorApi.inspectPlugin,
50
+ inspectFixtureSet: inspectorApi.inspectFixtureSet,
51
+ });
52
+
53
+ export const reports = Object.freeze({
54
+ renderMarkdown: reportApi.renderMarkdownReport,
55
+ renderTextSummary: pluginApi.renderTextSummary,
56
+ write: reportApi.writeReport,
57
+ issueId: issuesApi.issueId,
58
+ classifyIssueFinding: issuesApi.classifyIssueFinding,
59
+ knownIssueCodes: issuesApi.knownIssueCodes,
60
+ openClawTargetPathCandidates: openClawTargetApi.openClawTargetPathCandidates,
61
+ });
62
+
63
+ export const contracts = Object.freeze({
64
+ buildCapture: contractCaptureApi.buildContractCapture,
65
+ writeCapture: contractCaptureApi.writeContractCapture,
66
+ renderCapture: contractCaptureApi.renderContractCaptureMarkdown,
67
+ validateCapture: contractCaptureApi.validateContractCapture,
68
+ validateCoverage: contractCoverageApi.validateContractCoverage,
69
+ defaults: Object.freeze({
70
+ registrationAssertions: contractCaptureApi.defaultRegistrationAssertions,
71
+ registrationArguments: contractCaptureApi.defaultRegistrationArguments,
72
+ hookAssertions: contractCaptureApi.defaultHookAssertions,
73
+ hookEvents: contractCaptureApi.defaultHookEvents,
74
+ hookContexts: contractCaptureApi.defaultHookContexts,
75
+ }),
76
+ });
77
+
78
+ export const ci = Object.freeze({
79
+ buildSummary: ciSummaryApi.buildCiSummary,
80
+ writeSummary: ciSummaryApi.writeCiSummary,
81
+ renderSummary: ciSummaryApi.renderCiSummaryMarkdown,
82
+ readReports: ciSummaryApi.readCiReports,
83
+ deriveStatus: ciSummaryApi.deriveCiStatus,
84
+ buildPolicyReport: ciPolicyApi.buildCiPolicyReport,
85
+ writePolicyReport: ciPolicyApi.writeCiPolicyReport,
86
+ renderPolicyReport: ciPolicyApi.renderCiPolicyMarkdown,
87
+ validatePolicy: ciPolicyApi.validateCiPolicy,
88
+ validatePolicyReport: ciPolicyApi.validateCiPolicyReport,
89
+ buildExecutionResults: executionResultsApi.buildExecutionResultsReport,
90
+ writeExecutionResults: executionResultsApi.writeExecutionResultsReport,
91
+ renderExecutionResults: executionResultsApi.renderExecutionResultsMarkdown,
92
+ writeOutputs: pluginApi.writeCiOutputArtifacts,
93
+ });
94
+
95
+ export const runtime = Object.freeze({
96
+ buildProfile: runtimeProfileApi.buildRuntimeProfile,
97
+ writeProfile: runtimeProfileApi.writeRuntimeProfile,
98
+ renderProfile: runtimeProfileApi.renderRuntimeProfileMarkdown,
99
+ validateProfile: runtimeProfileApi.validateRuntimeProfile,
100
+ buildProfileDiff: profileDiffApi.buildProfileDiff,
101
+ writeProfileDiff: profileDiffApi.writeProfileDiff,
102
+ renderProfileDiff: profileDiffApi.renderProfileDiffMarkdown,
103
+ validateProfileDiff: profileDiffApi.validateProfileDiff,
104
+ buildRefDiff: refDiffApi.buildRefDiff,
105
+ writeRefDiff: refDiffApi.writeRefDiff,
106
+ renderRefDiff: refDiffApi.renderRefDiffMarkdown,
107
+ validateRefDiff: refDiffApi.validateRefDiff,
108
+ buildImportLoopProfile: importLoopProfileApi.buildImportLoopProfile,
109
+ writeImportLoopProfile: importLoopProfileApi.writeImportLoopProfile,
110
+ renderImportLoopProfile: importLoopProfileApi.renderImportLoopProfileMarkdown,
111
+ validateImportLoopProfile: importLoopProfileApi.validateImportLoopProfile,
112
+ });
113
+
114
+ export const synthetic = Object.freeze({
115
+ buildPlan: syntheticProbesApi.buildSyntheticProbePlan,
116
+ buildPlanFromReport: syntheticProbeSuiteApi.buildSyntheticProbePlanFromReport,
117
+ writePlan: syntheticProbesApi.writeSyntheticProbePlan,
118
+ renderPlan: syntheticProbesApi.renderSyntheticProbeMarkdown,
119
+ validatePlan: syntheticProbesApi.validateSyntheticProbePlan,
120
+ runCaptured: syntheticProbesApi.runCapturedSyntheticProbes,
121
+ registrationExecutionProfiles: syntheticProbesApi.syntheticRegistrationExecutionProfiles,
122
+ defaultHookEvents: syntheticProbesApi.defaultSyntheticHookEvents,
123
+ defaultHookContexts: syntheticProbesApi.defaultSyntheticHookContexts,
124
+ defaultRegistrationArguments: syntheticProbesApi.defaultSyntheticRegistrationArguments,
125
+ });
126
+
1
127
  export {
2
128
  capturePluginEntrypoint,
129
+ buildFixtureSetColdImportReadiness,
130
+ buildFixtureSetPlatformProbes,
131
+ buildFixtureSetWorkspacePlan,
3
132
  createCaptureApi,
4
133
  inspectCompatibilityFixtureSetConfig,
5
134
  inspectFixtureSetConfig,
6
135
  inspectPluginRoot,
7
136
  loadPluginConfig,
137
+ renderFixtureSetColdImportReadinessMarkdown,
8
138
  renderFixtureSetIssuesReport,
9
139
  renderFixtureSetMarkdownReport,
140
+ renderFixtureSetPlatformProbesMarkdown,
141
+ renderFixtureSetWorkspacePlanMarkdown,
10
142
  renderTextSummary,
143
+ runFixtureSetColdImportReadiness,
144
+ runFixtureSetPlatformProbes,
11
145
  runFixtureSetReport,
146
+ runFixtureSetWorkspacePlan,
12
147
  runPluginCheck,
13
148
  setupPluginInspector,
149
+ validateColdImportReadiness,
150
+ validateFixtureSetPlatformProbes,
151
+ validateFixtureSetWorkspacePlan,
14
152
  writeCiOutputArtifacts,
153
+ writeFixtureSetColdImportReadiness,
154
+ writeFixtureSetPlatformProbes,
15
155
  writeFixtureSetReports,
156
+ writeFixtureSetWorkspacePlan,
16
157
  writePluginReports,
17
158
  } from "./api.js";
159
+ export {
160
+ buildContractCapture,
161
+ defaultHookAssertions,
162
+ defaultHookContexts,
163
+ defaultHookEvents,
164
+ defaultRegistrationArguments,
165
+ defaultRegistrationAssertions,
166
+ renderContractCaptureMarkdown,
167
+ validateContractCapture,
168
+ writeContractCapture,
169
+ } from "./contract-capture.js";
170
+ export { validateContractCoverage } from "./contract-coverage.js";
171
+ export {
172
+ buildCiPolicyReport,
173
+ defaultCiPolicyReportOptions,
174
+ renderCiPolicyMarkdown,
175
+ validateCiPolicy,
176
+ validateCiPolicyReport,
177
+ writeCiPolicyReport,
178
+ } from "./ci-policy.js";
179
+ export {
180
+ buildCiSummary,
181
+ defaultCiReportPaths,
182
+ deriveCiStatus,
183
+ readCiReports,
184
+ renderCiSummaryMarkdown,
185
+ writeCiSummary,
186
+ } from "./ci-summary.js";
187
+ export { loadInspectorConfig } from "./config.js";
188
+ export {
189
+ buildExecutionResultsReport,
190
+ defaultExecutionResultsOptions,
191
+ renderExecutionResultsMarkdown,
192
+ writeExecutionResultsReport,
193
+ } from "./execution-results.js";
194
+ export {
195
+ buildImportLoopProfile,
196
+ defaultImportLoopProfileOptions,
197
+ renderImportLoopProfileMarkdown,
198
+ validateImportLoopProfile,
199
+ writeImportLoopProfile,
200
+ } from "./import-loop-profile.js";
201
+ export { classifyIssueFinding, issueId, knownIssueCodes } from "./issues.js";
202
+ export { inspectFixtureSet, inspectPlugin, inspectSourceText } from "./inspector.js";
203
+ export { openClawTargetPathCandidates } from "./openclaw-target.js";
204
+ export {
205
+ buildProfileDiff,
206
+ defaultProfileDiffOptions,
207
+ renderProfileDiffMarkdown,
208
+ validateProfileDiff,
209
+ writeProfileDiff,
210
+ } from "./profile-diff.js";
211
+ export {
212
+ buildRefDiff,
213
+ defaultRefDiffDimensions,
214
+ defaultRefDiffOptions,
215
+ renderRefDiffMarkdown,
216
+ validateRefDiff,
217
+ writeRefDiff,
218
+ } from "./ref-diff.js";
219
+ export { renderMarkdownReport, writeReport } from "./report.js";
220
+ export {
221
+ buildRuntimeProfile,
222
+ defaultRuntimeProfileCommands,
223
+ defaultRuntimeProfileOptions,
224
+ renderRuntimeProfileMarkdown,
225
+ validateRuntimeProfile,
226
+ writeRuntimeProfile,
227
+ } from "./runtime-profile.js";
228
+ export { buildSyntheticProbePlanFromReport } from "./synthetic-probe-suite.js";
229
+ export {
230
+ buildSyntheticProbePlan,
231
+ defaultSyntheticHookContexts,
232
+ defaultSyntheticHookEvents,
233
+ defaultSyntheticRegistrationArguments,
234
+ renderSyntheticProbeMarkdown,
235
+ runCapturedSyntheticProbes,
236
+ syntheticRegistrationExecutionProfiles,
237
+ validateSyntheticProbePlan,
238
+ writeSyntheticProbePlan,
239
+ } from "./synthetic-probes.js";