Commit Graph

118 Commits

Author SHA1 Message Date
Rohit
376b03f8ea fix(plugins): reject incompatible package plugin API installs (#87477)
* fix(plugins): enforce package plugin API compatibility

* fix(plugins): preserve plugin API prerelease floors

* fix(plugins): gate persisted plugin api compatibility

* fix(plugins): skip incompatible package discovery

* fix(plugins): check api compatibility before package shape

* fix(plugins): gate bundle package api compatibility

* docs(plugins): clarify plugin API release sync

* test(agents): keep dynamic live model unit test runtime-free

* fix(plugins): normalize correction plugin api floors

* test(agents): align dynamic normalizer expectation

* fix(plugins): reject malformed plugin api metadata

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-28 20:25:30 +01:00
Peter Steinberger
aab5410bd5 test: speed up slow test suite (#87611)
* test: speed up slow test suite

* test: preserve fake timer cleanup hooks

* test: avoid timeout readiness race

* test: satisfy reply test types

* test: restore runner and image coverage

* test: restore final media runner path

* test: make cli auth status fixture deterministic

* test: repair runtime alias fixtures
2026-05-28 13:20:19 +01:00
Peter Steinberger
75fc0bce0f test: speed up plugin install suites 2026-05-27 00:46:44 +01:00
Vincent Koc
793e300cc5 fix(plugins): support linked source checkouts on Windows 2026-05-25 03:36:06 +02:00
Peter Steinberger
868315aef0 test: fix install readdir mock typing 2026-05-17 14:12:55 +01:00
Peter Steinberger
e43a2efcdb test: harden wsl2 fixtures 2026-05-17 13:45:21 +01:00
Vincent Koc
c277138959 test(plugins): share archive fixture packing 2026-05-17 01:35:39 +08:00
Vincent Koc
e650f8930d fix(test): avoid scanning plugin archive entries 2026-05-16 14:35:24 +08:00
Vincent Koc
d2e0a8231f fix(plugins): reject malformed package entries 2026-05-16 03:44:33 +08:00
Peter Steinberger
cf571c1b58 fix(plugins): scope install scanner to runtime graph 2026-05-13 21:22:37 +01:00
Peter Steinberger
439e396262 fix(plugins): allow benign LanceDB runtime shims 2026-05-13 20:24:46 +01:00
Pavan Kumar Gondhi
39bcd1e088 fix(plugins): scan installed dependency runtime code [AI] (#81066)
* fix: scan installed plugin dependency code

* addressing review-skill

* addressing review-skill

* addressing codex review

* addressing codex review

* addressing codex review

* addressing codex review

* addressing codex review

* addressing codex review

* addressing codex review

* addressing codex review

* addressing ci

* addressing ci

* docs: add changelog entry for PR merge
2026-05-13 10:26:24 +05:30
Peter Steinberger
cf1987bbe9 test: dedupe plugin install mock reads 2026-05-12 22:48:58 +01:00
Shakker
9456cc850a test: signal plugin warning text 2026-05-12 21:48:49 +01:00
Pavan Kumar Gondhi
a5dce367ce fix: scan plugin runtime entries during install [AI] (#80998)
* fix: scan plugin runtime entries during install

* addressing review-skill

* addressing claude review

* docs: add changelog entry for PR merge
2026-05-12 20:28:40 +05:30
Alex Naidis
a290cd633f fix(doctor): repair managed plugin peer links
Repair managed npm plugin OpenClaw peer links across doctor, install, and update flows.

- relink `peerDependencies.openclaw` packages under managed npm roots during doctor repair
- make read-only doctor preview broken peer links with a `doctor --fix` hint
- reject target plugin installs when their own peer link cannot be repaired, without blocking unrelated installs for stale sibling packages
- preserve update warning behavior for unrepairable package-local `node_modules`

Verification:
- `pnpm test src/plugins/plugin-peer-link.test.ts src/plugins/install.test.ts src/plugins/install.npm-spec.test.ts src/plugins/update.test.ts src/commands/doctor-plugin-registry.test.ts src/commands/doctor/repair-sequencing.test.ts -- --reporter=verbose`
- `pnpm exec oxfmt --check --threads=1 ...`
- `git diff --check`
- Crabbox/Testbox `tbx_01krde1jx199rnpm2rv1rdcj76`: focused tests + `pnpm check:changed`, exit 0
- Real CLI proof in PR body: read-only `openclaw doctor` warning plus `openclaw doctor --fix` symlink repair

Thanks @TheCrazyLex.
2026-05-12 07:49:08 +01:00
Peter Steinberger
433634066c test: guard plugin install mock calls 2026-05-12 06:57:58 +01:00
Peter Steinberger
fdb65c035e test: clear plugin install broad matchers 2026-05-10 15:01:23 +01:00
Shakker
0fef42ddcc test: tighten plugin extension array assertions 2026-05-09 05:58:17 +01:00
Peter Steinberger
a44021ce17 test: tighten plugin contract assertions 2026-05-08 14:33:24 +01:00
Shakker
a40ef6691e test: assert plugin install scanner warnings 2026-05-08 10:41:53 +01:00
Peter Steinberger
9ef37d1907 test: tighten assertions and harness coverage 2026-05-08 05:28:12 +01:00
hcl
d193d15f17 fix(plugins): explain source-only package diagnostics (#77835) (#77842) 2026-05-05 17:43:13 -07:00
Vincent Koc
54300e5270 fix(plugins): quiet official npm install scan warnings 2026-05-04 02:40:55 -07:00
Vincent Koc
a9282f3571 fix(plugins): reject blank runtime entries 2026-05-04 01:41:20 -07:00
Peter Steinberger
59c523c6b5 fix: reject source-only plugin package installs 2026-05-03 16:48:46 +01:00
Peter Steinberger
23ac9ccfd5 test: add codex npm plugin Docker live proof 2026-05-02 20:08:48 +01:00
Peter Steinberger
5ac0ff1812 fix: install ClawHub package dependencies 2026-05-02 06:57:04 +01:00
Peter Steinberger
355680f1f2 fix: trust official ClawHub archive installs 2026-05-02 06:07:22 +01:00
Peter Steinberger
87f43ca88c fix: trust official source-linked ClawHub plugins 2026-05-02 05:16:10 +01:00
Peter Steinberger
23fd8a90f9 refactor: simplify plugin module loading 2026-05-02 01:41:09 +01:00
Peter Steinberger
d2ae2a3fb0 fix(plugins): require declared runtime setup entries 2026-05-01 22:36:18 +01:00
Peter Steinberger
257a3c068d refactor: simplify plugin dependency loading 2026-05-01 21:56:40 +01:00
Peter Steinberger
ed8f50f240 refactor: simplify plugin dependency handling
Simplify plugin installation and runtime loading around package-manager-owned dependencies, with Jiti reserved for local/TS fallback paths.

Also scans npm plugin install roots so hoisted transitive dependencies are covered by dependency denylist and node_modules symlink checks.
2026-05-01 21:32:22 +01:00
Vincent Koc
412434a450 test(plugins): extend external install contract coverage 2026-04-29 02:48:58 -07:00
Peter Steinberger
d69eeeb2a8 fix: skip test-only plugin install scan findings 2026-04-27 15:00:55 +01:00
Peter Steinberger
c3b3da41fe fix: allow trusted openclaw peer symlinks 2026-04-27 14:40:02 +01:00
Peter Steinberger
f337c9019c refactor: share plugin package entry resolution 2026-04-26 11:11:58 +01:00
Peter Steinberger
f33a812c07 fix: validate plugin package extension entries 2026-04-26 11:01:10 +01:00
Peter Steinberger
ee2ab9a644 fix(plugins): install optional plugin dependencies 2026-04-26 07:00:16 +01:00
Shakker
f5f4477bae fix: reject manifestless plugin archives 2026-04-26 04:16:33 +01:00
Peter Steinberger
e93b3f60fa fix: harden openclaw peer dependency installs (#70462) 2026-04-23 20:28:02 +01:00
Anish Kataria
44820f859e fix(plugin-sdk): scan dependency tree before materialising openclaw symlink
The dependency-tree security scan rejects node_modules symlinks whose
targets resolve outside the install root. Our trusted host-to-plugin
symlink violates that rule by design, so running the scan AFTER
linkOpenClawPeerDependencies would fail every install with
SECURITY_SCAN_FAILED.

Reorder afterInstall so the scan runs first (walking only the plugin's
own staged source, catching any pre-existing malicious openclaw-named
symlink a source might smuggle in), then the trusted link is
materialised on the now-safe tree.

Also use braces on guard clauses in the new unit tests to satisfy the
oxlint no-unreachable-single-statement-if rule.
2026-04-23 20:28:02 +01:00
Anish Kataria
56dd249a07 test(plugin-sdk): add unit tests for linkOpenClawPeerDependencies
Tests three cases via installPluginFromDir:
- symlink created when peerDependencies declares openclaw
- no symlink when peer list is empty
- idempotent re-install replaces existing symlink
- warns and skips when host root cannot be resolved

Also removes the single-element Set in favour of a direct name
comparison (peerName === "openclaw"), and adds Closes #54428 to
address the same root cause in the weixin connector.

Closes #54428
2026-04-23 20:28:02 +01:00
Vincent Koc
bb4498cef7 test(plugins): align unreadable manifest traversal failure code 2026-04-15 12:10:24 +01:00
Mason Huang
edfa074e0f Tests: align pnpm test expectations with main (#67001)
Merged via squash.

Prepared head SHA: 29c8068053
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Reviewed-by: @hxy91819
2026-04-15 18:31:23 +08:00
Gustavo Madeira Santana
82a2db71e8 refactor(qa): split Matrix QA into optional plugin (#66723)
Merged via squash.

Prepared head SHA: 27241bd089
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-14 16:28:57 -04:00
Peter Steinberger
c9067b6520 fix: preserve scoped plugin symlink installs 2026-04-10 21:22:16 +01:00
Peter Steinberger
a6edccad3d test: align plugin install denylist expectations 2026-04-10 19:42:38 +01:00
Peter Steinberger
56468cdb06 fix: align plugin install denylist scan tests 2026-04-10 18:57:52 +01:00