为插件 Node worker 开放 Goal mode 与 Progress 的受支持 API
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: Yop
**客户端版本**: 0.1.21
---
## 使用场景
开发 Cindy 插件时,插件的 Node worker 需要能够控制 Goal mode 和 Progress,以便根据插件内部任务或外部工作流的状态同步 Cindy 的执行体验。
例如,Node worker 执行或包装外部 CLI/工作流后,可依据返回状态创建或恢复 Goal、暂停等待中的 Goal、完成终态 Goal,并同步对应的 Progress。
目前这些能力无法由 Node worker 通过稳定、公开的插件 API 调用,插件只能依赖间接流程或无法完成状态同步。
## 诉求
为插件 Node worker 提供受支持、稳定的 Goal mode 与 Progress API,使其能在插件工作流中控制两项能力。
期望覆盖完整生命周期:
- Goal:创建、恢复、暂停、完成。
- Progress:创建、更新、完成。
## 建议方案
提供明确的 Node worker 可调用 API,并定义:
- 所需的会话/工作区上下文与权限边界;
- 生命周期操作的幂等语义与错误返回;
- Goal 与 Progress 状态的查询和更新方式;
- 与 Cindy 原生会话、自动续跑和插件卸载/重启的协作行为。
这样插件可以将自身工作流的真实状态安全地投影到 Cindy,而无需依赖未公开实现或手动干预。
---
**版本区域**: CN
**OS**: win32 x64 (10.0.26200)
**界面语言**: zh-CN
Contributor guide
Research direction
The issue names no files, tests, or existing entry points. Start by locating the Node worker plugin API and the implementations of Goal mode and Progress, then review how session and workspace context are handled. Done means a documented, supported lifecycle API covering the listed Goal and Progress operations, with defined permissions, idempotency, errors, queries, and restart behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api, backend, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100