4 Commits

Author SHA1 Message Date
Chris Zhang
226c83d31a feat(plugins): 插件单一模型字段与后台隐藏任务 (#6073)
* feat(plugins): single plugin model field and hidden background tasks

Merge the per-ability "Cindy abilities" pickers and the separate task
settings card on the plugin detail page into one "Model & tasks" card
with a single model field. The field defaults to the system auxiliary
model for quick answers (new tasks keep following the originating task)
and, once set explicitly, drives both quick answers and the tasks the
plugin creates. Legacy per-ability quick-answer catalog pins are migrated
once into the plugin task config; media/embedding overrides are dropped
in favour of the system defaults. The stray model tooltip over the row
label is fixed by giving the label its own column.

Add plugin background tasks: plugins declaring `agent.hiddenTasks`
(with `agent.tasks`) can create tasks with `hidden: true` and toggle
them with `tasks.setHidden`. Hidden tasks get `sessions.hidden_at`
(migration 0126) and are excluded from the task list, search, unfinished
hints, notifications and the Agent Island on Desktop and phone; the
plugin detail page lists them under "Background Tasks" where the user
can open them or show them in the task list, and uninstalling reveals
them first.

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Lizi <jiali@magiclizi.com>

* fix(plugins): pin explicit provider, reveal all hidden tasks on uninstall, filter stale list responses

Review follow-ups for #6073:
- Quick answers never switch to another provider's same-named model when
  the user pinned a provider; only a route on that provider is accepted.
- Uninstall reveals every background task in batches instead of only the
  first display page, and fails loudly if a reveal does not take effect.
- The renderer remembers hidden task ids so an in-flight task-list
  response (or a local prepend) cannot re-add a task hidden moments ago.

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Lizi <jiali@magiclizi.com>

---------

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Lizi <jiali@magiclizi.com>
Co-authored-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-15 19:44:08 +08:00
fmfsaisai
648d26721b feat(ghost): 插件花名册 system 段注入与渐进式发现链 (#2123)
* feat(ghost): align roster summary limit with manifest

Use the plugin-protocol 300-character summary limit for Desktop validation and cindy-tools roster truncation. Include the author-provided recall hint in live ghost_list results, preferring whenToUse over description.

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* feat(ghost): add precise ghost_info discovery tool (#2031)

Add the fixed read-only ghost_info tool for targeted plugin detail lookup while keeping ghost_list as the live full inventory.

Depends on feat/roster-desc-max-align for the recall field and shared visibleChipGhosts filtering.

Visibility behavior changes:
- missing or uninstalled targets now take precedence over stale workdir-disable preferences and return GHOST_NOT_FOUND
- account-unavailable targets now use the explicit #907 not-signed-in message
- workdir-disabled plus asleep targets consistently return GHOST_DISABLED_IN_WORKDIR in ghost_call and setup waiter revalidation
- initial, setup, grant, pre-dispatch, post-context, and coordinator waiter checks now share one visibility classifier

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* docs(ghost): align handbook wording with manifest constant

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* docs(ghost): define progressive discovery author contract

Document whenToUse as the scenario-only model discovery field and align the author flow with roster to ghost_info to ghost_call.

Require category-scoped RULES in list_tools(category) details and schema-plus-rules recovery for invalid call_tool arguments.

Depends on feat/ghost-info for the precise discovery step.

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* fix(ghost): guide missing ghost_info targets

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* feat(ghost): inject roster into harness system prompts

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* test(ghost): cover roster prompt harness injection

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* fix(ghost): harden roster prompt serialization

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* fix(ghost): wire Pi roster prompt dependency

Declare and forward the existing roster prompt callback so Pi receives the same system-prompt injection as the other harnesses. This closes the pre-existing 73ba2ae03 type/runtime wiring omission.

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* fix(ghost): escape roster block delimiters

Escape angle brackets in serialized roster records so author-controlled values cannot forge the fixed ghost-roster boundaries. JSON semantics remain unchanged after parsing.

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* test(ghost): cover Pi roster prompt assembly

Exercise buildPiAgent's explicit dependency wiring and verify the forwarded roster callback contributes to the composed Pi system prompt.

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* fix(ghost): fail closed remote roster injection

Remote Claude drops the in-process cindy MCP server and remote Codex only receives an HTTP allowlist that excludes the fixed ghost server. Keep both harnesses from injecting a roster when the session workingDir is remote and local workdir visibility preferences cannot be trusted.

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* test(ghost): strengthen roster injection coverage

Lock the sixteen-entry cache budget, pin U+2028/U+2029 folding, and exercise the desktop Pi host through a real PiAgent startSession while mocking only the RPC process and external host dependencies.

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* docs(ghost): document progressive discovery design

Add the authoritative design doc for the ghost progressive discovery chain (roster injection, ghost_info routing, runtime visibility gates) and index it from AGENTS.md.

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

* fix(ghost): type ghost_info INTERNAL fallback in wire result

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

---------

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
2026-08-08 07:25:22 +08:00
Dash
647dd11be0 fix(plugins): 完全访问下自动批准文件交接 (#1417)
* fix(plugins): 完全访问下自动批准文件交接

Signed-off-by: Dash <dashhuang@gmail.com>

* fix(plugins): 兼容旧工具交接并清理失败落盘

Signed-off-by: Dash <dashhuang@gmail.com>

* fix(plugins): 复核保存写入后的路径身份

Signed-off-by: Dash <dashhuang@gmail.com>

---------

Signed-off-by: Dash <dashhuang@gmail.com>
2026-08-03 14:28:50 +08:00
nanaco
40f22f9f55 feat(plugins): 增加对话内通用 Setup Runtime (#329)
* feat(plugins): add conversational setup runtime

Signed-off-by: nana <823073145@qq.com>

* fix(plugins): harden setup authorization flows

Signed-off-by: nana <823073145@qq.com>

* fix(plugins): close setup runtime review gaps

Signed-off-by: nana <823073145@qq.com>

* fix(desktop): close plugin setup transport gaps

Signed-off-by: nana <823073145@qq.com>

* fix(plugins): persist inline node secrets

Signed-off-by: nana <823073145@qq.com>

* fix(plugins): harden setup state reconciliation

Signed-off-by: nana <823073145@qq.com>

* fix(plugins): strip setup diagnostics from remotes

Signed-off-by: nana <823073145@qq.com>

* fix(plugins): harden setup action routing

Signed-off-by: nana <823073145@qq.com>

* docs(plugins): clarify setup readiness contract

Signed-off-by: nana <823073145@qq.com>

* fix(plugins): close setup lifecycle gaps

Signed-off-by: nana <823073145@qq.com>

* fix(plugins): harden setup interaction races

Signed-off-by: nana <823073145@qq.com>

---------

Signed-off-by: nana <823073145@qq.com>
Co-authored-by: nana <823073145@qq.com>
2026-07-25 15:36:38 +08:00