开始使用 Aventa 扩展平台
面向熟悉 PHP 或 Xiuno 的开发者,建立正确的 Aventa 包结构和开发流程。
# 开发者概览
Aventa Core owns the forum product runtime. Minimal Module Kernel owns the extension runtime. Packages declare their own edges and receive scoped services; they do not become a framework inside the framework.
# 快速开始
- 下载完整示例包。
- 重命名目录、package id、version、entrypoint、namespace 和 owned namespace。
- 按 Manifest Reference 删除不需要的声明。
- 只在收到
RuntimeContext的 handler 中执行产品工作。 - 按 检查表测试成功、拒绝、生命周期和确定性 replay。
plugins/example-greeting/
├── manifest.json
├── migrations.php
├── src/
│ ├── GreetingService.php
│ └── GreetingRegistrar.php
├── templates/
└── assets/# 第一个插件
final class GreetingRegistrar implements PluginRegistrar
{
public function register(RegistrationContext $context): void
{
$context->onEvent('example.greeting.render.v1', 'render',
static function (RuntimeContext $runtime, mixed $payload): string {
$runtime->logger->info('greeting.rendered');
return 'Hello ' . (string) ($payload['name'] ?? 'Aventa');
}
);
}
}
The event must also be declared by the host and listed by the package manifest. Registration is declaration-only; runtime I/O belongs inside the handler.
# 目录结构
Keep the manifest at package root, implementation in src/, declared templates and assets in their own directories, and migrations in a deterministic file. Do not add files that are neither declared nor used.
# 当前平台状态
Core operational Kernel operational Theme runtime operational Operator management operational
FORMALLY_CERTIFIED is reserved and unused. Normal development advances from DEVELOPMENT_PACKAGE to ENGINEERING_VALIDATED.