diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9464e47..de9b0f1 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -24,3 +24,9 @@ jobs: cache: npm - run: npm ci - run: npm test + - run: npm run plugin:inspect:runtime + - uses: actions/upload-artifact@v4 + if: always() + with: + name: plugin-inspector-reports + path: reports/plugin-inspector-* diff --git a/.gitignore b/.gitignore index 0e2bbc4..7331571 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules/ +reports/plugin-inspector-* npm-debug.log* *.tgz .DS_Store diff --git a/package-lock.json b/package-lock.json index abd0219..755fc60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,9 @@ "dependencies": { "openclaw": "2026.4.24" }, + "devDependencies": { + "@openclaw/plugin-inspector": "0.1.2" + }, "engines": { "node": ">=22" } @@ -2090,6 +2093,19 @@ ], "license": "MIT" }, + "node_modules/@openclaw/plugin-inspector": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@openclaw/plugin-inspector/-/plugin-inspector-0.1.2.tgz", + "integrity": "sha512-Jqloa0wBlZmhoal1PYdbizNtJyM4LCtNgWYV3jDeelPP38hHWl536XQCLP4oVjzktI+j8M49Vb6JiaU8dZoeaA==", + "dev": true, + "license": "MIT", + "bin": { + "plugin-inspector": "src/cli.js" + }, + "engines": { + "node": ">=22" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", diff --git a/package.json b/package.json index 791f277..a775cf3 100644 --- a/package.json +++ b/package.json @@ -32,13 +32,18 @@ } }, "scripts": { - "check": "npm run sync:surface -- --check && node scripts/check-sdk-surface.mjs", + "check": "npm run sync:surface -- --check && node scripts/check-sdk-surface.mjs && npm run plugin:inspect", + "plugin:inspect": "plugin-inspector check --config plugin-inspector.config.json --no-openclaw", + "plugin:inspect:runtime": "PLUGIN_INSPECTOR_EXECUTE_ISOLATED=1 plugin-inspector check --config plugin-inspector.config.json --no-openclaw --runtime --mock-sdk", "sync:surface": "node scripts/sync-surface.mjs", "test": "npm run check" }, "dependencies": { "openclaw": "2026.4.24" }, + "devDependencies": { + "@openclaw/plugin-inspector": "0.1.2" + }, "engines": { "node": ">=22" } diff --git a/plugin-inspector.config.json b/plugin-inspector.config.json new file mode 100644 index 0000000..92a9cf8 --- /dev/null +++ b/plugin-inspector.config.json @@ -0,0 +1,41 @@ +{ + "version": 1, + "plugin": { + "id": "openclaw-kitchen-sink", + "priority": "high", + "seams": [ + "dynamic-tool", + "llm-observer", + "gateway-service", + "provider-capability", + "manifest-contract", + "sdk-surface" + ], + "sourceRoot": "src", + "expect": { + "hooks": [ + "before_prompt_build", + "before_tool_call", + "llm_input", + "llm_output", + "agent_end", + "gateway_start", + "gateway_stop" + ], + "registrations": [ + "registerTool", + "registerChannel", + "registerService", + "registerHttpRoute", + "registerSpeechProvider" + ], + "manifestContracts": [ + "tools", + "speechProviders" + ] + } + }, + "capture": { + "mockSdk": true + } +}