feat: add managed provider plugin infrastructure
Summary
Add managed npm provider plugins under AGENT_DEVICE_HOME:
agent-device plugins add @vendor/provider@^1agent-device plugins listagent-device plugins update @vendor/provider
Install immutable npm directories before atomically activating user config; check metadata and compatibility before loading factory code. Removal leaves active daemon sessions alone until restart. Existing providers remain bundled; Doublespeed and TestMu are the first external adapter targets.
Keep the experimental agent-device/plugins SDK to the factory context (env, options, createError). Provider implementation contracts remain private to core, with their source declarations linked in the author guide. Removing the transitive runtime exports cuts added declarations from 99.6 kB to 0.4 kB. A packed declaration-size guard prevents recurrence.
36 files; 1,000 gross changed lines. Implementation precedes the final enforcement commit.
Validation
Tested commit: 986b32b54190637d16d32a25ae652f0d0ce61007.
pnpm check:affected --run: all runnable checks passed, including 518 related files / 4,565 tests and package gates.- Installed-package smoke, real npm/daemon add-update-remove smoke, and an isolated strict plugin-context consumer without Node types passed. Restoring the old declarations fails the new size guard.
- Independent Claude review supported the reduction; its return-contract documentation finding is addressed.
- Exact-head CI Size: +8.1 kB unpacked / +3.0 kB download, down from +108.6 / +26.9 kB. Typecheck & Package, Integration Tests and Coverage passed; one platform smoke check is running. No live provider integration is claimed.