feat: sync latest workspace changes

This commit is contained in:
coso
2026-04-19 18:50:13 +08:00
parent 3715b6e304
commit 9f31ba4cd7
301 changed files with 14618 additions and 14009 deletions
@@ -1,8 +1,10 @@
# Lime 服务型技能:端优先执行、云配置同步 PRD
> 状态:提案
> 更新时间:2026-03-24
> 状态:current supporting cross-repo plan
> 更新时间:2026-04-19
> 当前主规划:`docs/roadmap/limenextv2/README.md`
> 目标:吸收 Ribbi 式服务型技能入口的产品方法,但保持 Lime 的端优先执行与低云成本架构
> 作用域:本文只保留服务型技能在 `lime` / `limecore` 之间的产品对象、目录分层与执行边界,不替代 `docs/aiprompts/command-runtime.md`、`docs/aiprompts/limecore-collaboration-entry.md` 与 `limecore/docs/api/lime-client-integration.md`
## 1. 文档依据
@@ -10,25 +12,46 @@
`lime` 侧主要事实源:
- `src/components/agent/chat/index.tsx`
- `src/components/agent/chat/components/EmptyState.tsx`
- `src-tauri/src/skills/README.md`
- `src-tauri/src/services/automation_service/mod.rs`
- `src-tauri/src/services/execution_tracker_service.rs`
- `src/lib/api/serviceSkills.ts`
- `src/lib/serviceSkillCatalogBootstrap.ts`
- `src/hooks/useOemCloudAccess.ts`
- `src/components/agent/chat/workspace/serviceSkillSceneLaunch.ts`
- `src/components/agent/chat/workspace/useWorkspaceSendActions.ts`
- `docs/aiprompts/command-runtime.md`
`limecore` 侧主要事实源:
- `docs/api/lime-client-integration.md`
- `docs/aiprompts/lime-limecore-collaboration.md`
- `services/control-plane-svc/internal/model/client_bootstrap.go`
- `services/control-plane-svc/internal/controller/public_client.go`
- `services/scene-orchestrator-svc/README.md`
- `services/control-plane-svc/internal/model/commercial.go`
关键环境事实:
1. `lime` 已有任务入口、技能执行链、自动化调度链、执行追踪链。
2. `limecore` 已有 `control-plane-svc / gateway-svc / scene-orchestrator-svc`,并已有客户端 bootstrap 聚合接口。
3. `bootstrap.serviceCatalog` 现有语义偏商业服务目录,不适合直接承载新的服务型技能目录。
4. `scene-orchestrator-svc` 已定位为 Scene 运行时服务,但不应在本方案中演进为默认主执行流。
2. `limecore` 已有 `control-plane-svc / gateway-svc / scene-orchestrator-svc`,并已提供 `client/bootstrap`、`client/skills`、`client/service-skills`。
3. `client/bootstrap` 当前已同时返回 `skillCatalog` 与 `serviceSkillCatalog`:
- `skillCatalog.entries` 是统一命令发现协议
- `serviceSkillCatalog` 是完整服务型技能目录
- `serviceCatalog` 仍保持商业服务目录语义,不应混用
4. `lime` 当前已消费在线目录并保留 seeded / fallback 韧性兜底,不再只依赖客户端静态常量。
5. `scene-orchestrator-svc` 已定位为 Scene 运行时服务,但不应在本方案中演进为普通任务的默认主执行流。
## 1.1 当前吸收结果(2026-04-19)
这份 PRD 的核心判断已经被 current 主链部分吸收:
1. `limecore` 负责在线目录事实源:
- `bootstrap.skillCatalog`
- `bootstrap.serviceSkillCatalog`
- `GET /api/v1/public/tenants/:tenantId/client/skills`
- `GET /api/v1/public/tenants/:tenantId/client/service-skills`
2. `lime` 负责本地 catalog 同步、seeded fallback、补参启动与执行路由。
3. `skillCatalog.entries` 负责统一 `@ / / skill` 发现协议;`serviceSkillCatalog` 继续保留完整服务型技能目录,不与 `serviceCatalog` 混用。
因此,本文今天更适合作为跨仓产品边界说明,而不是单独的待落地提案。
## 2. 背景与问题
@@ -117,17 +140,22 @@ Ribbi 这类产品最值得借鉴的,不是“49 个技能入口”或“看
## 5.2 ServiceSkillCatalog
新的客户端目录字段命名为:
当前客户端目录已经分成两层:
`serviceSkillCatalog`
1. `skillCatalog`
- 聚合后的技能中心目录
- `entries` 负责统一命令发现协议
2. `serviceSkillCatalog`
- 完整服务型技能目录
- 适合技能发布、诊断、细粒度刷新与运行时绑定解析
而不是复用现有 `bootstrap.serviceCatalog`。
`serviceSkillCatalog` 仍然不应复用 `serviceCatalog`。
原因:
- 现有 `serviceCatalog` 在 `limecore` 中偏商业服务目录与计费目录
- 新目录是客户端任务入口目录,语义不同
- 强行复用会让商业服务和服务型技能混成一层
- `serviceCatalog` 在 `limecore` 中仍偏商业服务目录与计费目录
- `skillCatalog` 与 `serviceSkillCatalog` 分别承担“统一发现”和“完整目录”两种不同职责
- 强行混用会让商业服务、通用技能与服务型技能重新打成一团
建议结构:
@@ -249,10 +277,11 @@ flowchart TB
### `limecore control-plane-svc` 负责
- `serviceSkillCatalog` 下发
- `bootstrap.skillCatalog` 与 `bootstrap.serviceSkillCatalog` 聚合
- `client/skills` 与 `client/service-skills` 下发
- OEM/租户级目录配置
- 开关、排序、默认参数、版本
- 客户端 bootstrap 聚合
- 客户端 bootstrap 聚合与目录事实源发布
### `limecore scene-orchestrator-svc` 负责
@@ -280,7 +309,7 @@ sequenceDiagram
User->>Lime: 启动客户端
Lime->>CP: GET /client/bootstrap
alt 拉取成功
CP-->>Lime: bootstrap + serviceSkillCatalog
CP-->>Lime: bootstrap(skillCatalog + serviceSkillCatalog)
Lime->>Cache: 写入目录缓存(version, syncedAt, items)
Lime-->>User: 首页展示云目录服务项
else 拉取失败
@@ -493,7 +522,7 @@ flowchart LR
### Phase 1:目录与即时执行
- `limecore` 下发 `serviceSkillCatalog`
- `limecore` 下发 `skillCatalog.entries` 与 `serviceSkillCatalog`
- `lime` 接收并缓存云目录
- 首页展示服务型技能卡片
- 跑通 `instant + client_default`
@@ -514,7 +543,7 @@ flowchart LR
满足以下条件视为本 PRD 成立:
1. 客户端可从 bootstrap 读取独立的 `serviceSkillCatalog`。
1. 客户端可从 `bootstrap.skillCatalog + bootstrap.serviceSkillCatalog` 读取统一发现目录与完整服务型技能目录。
2. 云目录可本地缓存,离线时可回退展示。
3. 首页可直接启动服务型技能,而不是先选模型和能力开关。
4. 参数采集由 `slotSchema` 驱动,而不是纯 prompt 注入。
@@ -528,7 +557,7 @@ flowchart LR
1. 客户端职责膨胀风险
- 如果目录、参数采集、执行、任务中心同时无边界扩张,客户端仍会变重
2. 术语冲突风险
- `serviceCatalog / sceneCatalog / serviceSkillCatalog` 若不统一,会让实现和产品都混乱
- `serviceCatalog / skillCatalog / serviceSkillCatalog / sceneCatalog` 若不统一,会让实现和产品都混乱
3. 本地调度可靠性风险
- `scheduled / managed` 留在本地会受到应用在线状态影响
4. 云执行漂移风险