Compare commits

...

3 Commits

Author SHA1 Message Date
nav
3b59e34eb5 feat: add protocol types and config schemas 2026-04-08 20:03:59 +00:00
nav
609563c73e chore: update yonexus submodule pointers 2026-04-08 19:33:39 +00:00
nav
8e99285633 feat: scaffold yonexus server and client plugins 2026-04-08 19:32:46 +00:00
4 changed files with 47 additions and 15 deletions

View File

@@ -56,6 +56,9 @@
## Phase 1 — 协议落地与共享契约
### YNX-0101 固化 builtin 协议信封与类型枚举
**状态**
- [x] 已完成2026-04-08
**目标**
-`PROTOCOL.md` 里的 builtin envelope 转成共享 TypeScript 类型
@@ -72,6 +75,11 @@
- Server / Client 都能直接复用类型
- 所有 builtin 消息都可被类型系统约束
**已完成内容**
- 已在 `Yonexus.Protocol/src/types.ts` 落地 `BuiltinEnvelope`、builtin `type` 联合类型、各类 payload 接口与 `BuiltinPayloadMap`
- 已增加 `Yonexus.Protocol/src/index.ts` 作为导出入口
- 已同步更新 `Yonexus.Protocol/README.md`,让共享类型入口不再停留在 planned 状态
---
### YNX-0102 实现协议编解码工具
@@ -124,15 +132,18 @@
## Phase 2 — Server 插件脚手架
### YNX-0201 创建 Yonexus.Server 最小插件骨架
**状态**
- [x] 已完成2026-04-08
**目标**
- 让 Server 插件可被 OpenClaw 加载
**子任务**
- 创建插件目录结构
- 创建 `package.json`
- 创建 `openclaw.plugin.json`
- 创建入口文件 `index.ts`
- 添加基础构建配置
**已完成内容**
- 已补齐 `plugin/``servers/``skills/``scripts/` 目录骨架
- 创建 `package.json``tsconfig.json`
- 已写入 `plugin/openclaw.plugin.json`
- 已补齐 wiring-only `plugin/index.ts`
- 已补齐最小 `scripts/install.mjs`
**验收标准**
- 插件能被识别
@@ -141,6 +152,9 @@
---
### YNX-0202 定义 Yonexus.Server 配置 schema
**状态**
- [x] 已完成2026-04-08
**目标**
- 让 Server 配置在启动前就能被校验
@@ -156,6 +170,12 @@
- 缺字段和非法字段会 fail fast
- 错误信息足够定位问题
**已完成内容**
- 已新增 `Yonexus.Server/plugin/core/config.ts`
- 已实现 `validateYonexusServerConfig()``YonexusServerConfigError`
- 已覆盖 `followerIdentifiers``notifyBotToken``adminUserId``listenPort``listenHost``publicWsUrl` 的基础约束与默认值处理
- 已从 `plugin/index.ts` 导出配置类型与校验入口,方便后续 lifecycle wiring 复用
---
### YNX-0203 实现 Server 生命周期 wiring
@@ -178,15 +198,18 @@
## Phase 3 — Client 插件脚手架
### YNX-0301 创建 Yonexus.Client 最小插件骨架
**状态**
- [x] 已完成2026-04-08
**目标**
- 让 Client 插件可被 OpenClaw 加载
**子任务**
- 创建插件目录结构
- 创建 `package.json`
- 创建 `openclaw.plugin.json`
- 创建入口文件 `index.ts`
- 添加基础构建配置
**已完成内容**
- 已补齐 `plugin/``servers/``skills/``scripts/` 目录骨架
- 创建 `package.json``tsconfig.json`
- 已写入 `plugin/openclaw.plugin.json`
- 已补齐 wiring-only `plugin/index.ts`
- 已补齐最小 `scripts/install.mjs`
**验收标准**
- 插件能被识别并加载
@@ -194,6 +217,9 @@
---
### YNX-0302 定义 Yonexus.Client 配置 schema
**状态**
- [x] 已完成2026-04-08
**目标**
- 保证 Client 配置可启动前校验
@@ -207,6 +233,12 @@
**验收标准**
- 配置错误可在启动时直接发现
**已完成内容**
- 已新增 `Yonexus.Client/plugin/core/config.ts`
- 已实现 `validateYonexusClientConfig()``YonexusClientConfigError`
- 已覆盖 `mainHost``identifier``notifyBotToken``adminUserId` 的必填校验,并限定 `mainHost``ws://` / `wss://`
- 已从 `plugin/index.ts` 导出配置类型与校验入口,方便后续 lifecycle wiring 直接接入
---
### YNX-0303 实现 Client 生命周期 wiring