makecindy / makecindy/cindy

Replace per-session card-click association with a persistent background permission switch

Open
#1,388 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

**提交人**: Yop
**客户端版本**: 0.1.26

---

## 使用场景

Cindy 插件可以声明 `agent.background: true`,用于在后台自动让 Agent 开始新一轮工作。这个能力本应支持定时任务、事件驱动维护、异步收尾、知识沉淀等无人值守工作流。

当前 Host 即使已经在安装确认框中披露并由用户接受了 `agent.background`,仍要求插件先在每个目标对话中通过一次“用户真实点击插件卡片”建立关联。新对话没有这次点击,后台请求就会被拒绝。

## 诉求

建议采用类似 Codex 的后台权限开关:

- 用户在设置中显式开启某个插件的后台执行权限;
- 开关状态持久保存,而不是每个新对话重新点击卡片;
- 可选择授权范围,例如当前项目或所有项目;
- 用户可以随时关闭、查看和撤销授权。

当前设计存在这些问题:

1. 卡片点击是一次偶然的 UI 操作,不是清晰的后台权限配置;
2. 每个新对话都要重新点击,无法形成稳定的无人值守流程;
3. 应用重启或临时关联丢失后,自动化会退化为必须人工介入;
4. 安装时已经单独披露后台权限,但用户同意后仍不能直接使用,权限语义容易误导;
5. 插件无法可靠实现计划完成后的异步处理、定时维护和知识沉淀等长期自动化。

这把“后台自动化”变成了“用户先手动点一下之后的临时自动化”,违背了插件实现个性化自动流程的目的。

## 建议方案

- 保留卡片点击的一次性 token,作为没有后台授权时的最低权限路径;
- 对 `agent.background` 提供 Codex 风格的持久权限开关;
- 授权按插件与范围记录,例如:
- 当前项目/工作目录;
- 所有项目;
- 新 Session 自动继承与其项目匹配的授权,无需重新点击卡片;
- 插件升级并扩大权限时重新确认;停用或卸载时清除授权;
- 保留频率限制、并发限制、审计记录、暂停开关和明确的触发来源;
- 后台请求仍必须绑定被授权的项目或 Session,不能访问未授权工作区;
- 插件详情页应明确展示授权状态及最近的后台触发记录。

目标不是取消安全审核或让插件绕过 Agent 权限,而是把授权从不稳定的“每对话卡片点击”改成用户主动配置、持久、可撤销且可审计的后台权限。
---
**版本区域**: CN
**OS**: win32 x64 (10.0.26200)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by tracing the existing card-click token and agent.background permission checks, then locate the settings and persistence paths. Done should include explicit, scoped, revocable authorization inherited by matching sessions while retaining limits, auditing, pause controls, and upgrade or uninstall handling described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authorization, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.