Plugin ecosystem Round 2 baseline (v0.3.13)
This baseline moves sharelife from a feature plugin to a platform-oriented plugin.
MVP boundary
The minimum viable platform includes:
plugin.manifest.v2.jsoncontractastr-agent.yamlcomposable pipeline contract- Capability gateway for network/file/command/provider/MCP permissions
create-astrbot-pluginscaffolding- Hot-reload dev workflow
- Market governance flow (risk labels, compatibility checks, install confirmation, audit logs)
Implementation status (M1-M5)
M1done: schemas + examples + CI validator (scripts/validate_protocol_examples.py)M2done: capability gateway (sharelife/application/services_capability_gateway.py) with deny-by-default for undeclared high-risk capabilitiesM3done: DX commands (scripts/create-astrbot-plugin,scripts/sharelife-hot-reload) + SDK contracts (sharelife/sdk/contracts.py)M4done: pipeline orchestrator (sharelife/application/services_pipeline.py) with A->B chaining andretry/skip/abortM5done: governance metadata (capability_summary,compatibility_matrix,review_evidence) + private featured-curation gate
Post-M5 extension:
M6done: plugin install execution closure (plan -> confirm -> execute) is implemented with default-off execution, command-prefix allowlist, timeout guard, execution evidence persistence, and optionalrequire_success_before_apply
Architecture (text)
text
Plugin Lifecycle -> Capability Gateway -> Runtime Adapters
| | |
v v v
Event Bus <-> Pipeline Orchestrator <-> Risk/Audit Engine
| | |
+---------- WebUI/CLI + Registry + Package StorageCore components
- Lifecycle manager
- Capability gateway
- Manifest/schema validator
- Pipeline orchestrator
- Risk/audit engine
- Registry service
- DX toolchain
Main data flows
- Publish: validate -> package -> scan -> label -> catalog
- Install: browse -> compatibility check -> permission confirm -> install -> audit
- Runtime: trigger -> capability check -> plugin call -> audit
- Profile/extension pack: export -> import -> dry-run -> apply/rollback
Tech stack
- Python 3.12 + FastAPI + Pydantic
- Existing
application/domain/interfaces/infrastructureservice split - WebUI + VitePress + GitHub Actions + GitHub Pages + GitHub Releases
Build order
- Freeze protocol schemas
- Implement capability gateway
- Deliver scaffold + hot reload DX
- Implement composable pipeline contract
- Add governance/evidence visibility in market
Edge cases to cover
- Missing permission declarations
- Version incompatibility (
astrbot_version/plugin_compat) - Hot-reload state pollution
- Mid-pipeline partial failure
- High-risk plugin install without admin confirmation
v2 direction
- Stronger sandbox tiers
- Plugin resource budgets and rate limits
- Scenario/risk/compatibility market recommendations
- Plugin-level tracing and failure analytics
- Unified Astr UI Kit
- Deep-link one-click install from web market to local AstrBot