Plugin API 2.0.0. Every plugin backend now runs in its own process. See "The plugin process" and "Moving from API 1" in PLUGIN-GUIDE.md.
Added
- Manifest
sandboxblock:schedules,events,registry,memoryMbandalwaysOn ctx.db.batch()runs writes in one transactionctx.schedule.everytakes anid- Capability
network:socketsfor plugins that open their own listeners and connections CAPABILITY_PROCESS_GRANTS,modulesGrantedBy,SANDBOX_GATED_MODULESandSANDBOX_BLOCKED_MODULESin/capabilitiesisLegacyPluginApiandLEGACY_PLUGIN_API_VERSIONin/manifestcreateMockCtx({ sandbox: true })applies the rules of a plugin process in tests, withsandboxContext,SandboxRuleErrorandassertCrossabletermix-plugin validatewarns about Node modules a plugin process can't use
Changed
services.get,services.providers,registry.consume,registry.revoke,secrets.withdraw,hosts.sessionActive,ssh.poolKey,ssh.classifyKeyboardInteractive,ssh.requiresSecret,ssh.supportsBackground,auth.listSecondFactors,desktop.availableanddesktop.local.availablereturn Promisesctx.events.onandctx.registry.provideneed the topic or key listed in the manifestsandboxblock- The fake ctx answers those reads with Promises too