- Move src/ → plugin/ with subdirectories: - plugin/core/ (business logic, models, store, permissions, utils, memory) - plugin/tools/ (query, resources) - plugin/commands/ (placeholder for slash commands) - plugin/hooks/ (placeholder for lifecycle hooks) - plugin/index.ts (wiring layer only, no business logic) - Add install.mjs with --install, --uninstall, --openclaw-profile-path - Add skills/ and docs/ root directories - Move planning docs (PLAN.md, FEAT.md, AGENT_TASKS.md) to docs/ - Remove old scripts/install.sh - Update tsconfig rootDir: src → plugin - Update README.md and README.zh.md with new layout - Bump version to 0.2.0 - All tests pass
1.7 KiB
1.7 KiB
Yonexus — AGENT_TASKS
目标:将插件拆解为可执行任务(按阶段/优先级)。
Phase 0 — 基础准备(P0)
- 明确插件运行环境/依赖(OpenClaw 版本、Node 版本)
- 定义最终配置文件格式(schema + permissions + registrars)
- 统一 ID 规则(org/dept/team/agent)
Phase 1 — MVP 核心(P0)
数据与存储
- 设计数据模型(Org/Dept/Team/Agent/Identity/Supervisor)
- 实现 in-memory store + JSON 持久化
- 定义 CRUD API
权限系统
- 实现权限角色(Org Admin / Dept Admin / Team Lead / Agent)
- 实现权限校验函数 authorize(action, actor, scope)
- 实现 registrars 白名单(禁止自注册)
工具/API
- create_department
- create_team
- register_agent
- assign_identity
- set_supervisor
- whoami
- query_agents
Query DSL
- filters/op 解析(eq / contains / regex)
- schema queryable 字段约束
- pagination(limit/offset)
Scope Memory
- scope_memory.put(scopeId, text, metadata)
- scope_memory.search(scopeId, query, limit)
- 兼容 memory-lancedb-pro
Phase 2 — v1 增强(P1)
- 模糊/正则性能优化(索引/缓存)
- 管理命令与校验(重命名/删除/迁移)
- 完善错误码与审计日志
- 增加导入/导出工具
Phase 3 — 体验与文档(P1)
- README(安装/配置/示例)
- 示例数据集与演示脚本
- 安装脚本完善(build + copy 到 dist/yonexus)
Risk & Notes
- 结构数据不进 memory_store(只做 scope 共享记忆)
- queryable 字段必须严格按 schema 控制
- supervisor 关系不隐含权限