Skip to content

Settings 里要能开启/关闭 FlyBot 的四个插件(social / tree / timeline / workflow) #2564

Closed

Description

@Birfy

Written-by: Chief

Owner request (2026-11-06, direct): Settings 里要能开启/关闭 FlyBot 的几个插件。

现状

  • 四个插件是独立的 DSH profile 包:plugins/social、plugins/tree、plugins/timeline、plugins/workflow,靠 dsh plugin --profile web add 装进 profile;core/scripts/install-doctor.mjs 管安装清单,@flybot/timeline 是 opt-in(默认不装,见 plugins/README.md)。
  • 所以今天的「开/关」= 改 profile 的包列表 + 重启,界面里没有开关;关掉之后哪些能力消失(工具、面板、群入口、system prompt 片段)也没有统一说法。

要什么

  • Settings 里加一个 Plugins 区(设置页在 core/src/client/settings.js),四个插件各一行:名字、版本、一句话作用、一个开关。
  • 关掉一个插件后:它注册的工具不再出现在 Bot 的工具表里(插件通过 core/src/host/hooks.js 的 flybot service 注册工具),它注册的界面(面板/标签/群入口,见 core/src/client/flybot-registry.js、core/src/client/flybot-slots.js)不再出现,它的 prompt 片段不再注入(core/src/host/harness.js 里 tree 那条是插件自带 prompt)。重新打开就恢复。
  • 开关状态持久化,重启后仍然是关的。
  • core 本身不做开关:它是宿主,关掉就没有 Bot 了。

两条要定的(选一个就行)

  1. 开关状态存哪:A) 存 DSH profile 的包列表(真装/真卸,需要重装);B) 存 FlyBot 自己的 state.json(包还在,启动时按开关决定加载或跳过,随时能装回来)。
  2. 生效时机:A) 改完立刻生效(运行中的会话会丢工具,风险高);B) 下次启动 FlyBot 生效。

Chief 的建议:1 选 B + 2 选 B。 不动用户的 DSH 安装状态,出问题一键关回,行为可预期;真要卸载仍然走 dsh plugin 那条老路。

验收

  • 关掉 workflow:Workflows 入口消失,flybot/workflow/* 端点不再应答,Bot 工具表里没有 workflow 工具;重新打开并重启后恢复。
  • 关掉 timeline:时间线页面不可达。
  • 关掉 social:Bot Social 面板与相关工具消失,已有数据不丢。
  • 测试:关掉后「工具确实没注册」的用例红先(先写会失败的测试);开关读写有覆盖;重启后状态保持。

范围外

  • 不做插件的在线安装/卸载(那是 dsh plugin 的事)。
  • 不改四个插件各自的内部行为,只加「加载/不加载」的入口。

Activity

  1. added
    enhancementNew feature or request
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    area:uiWeb/desktop UI and copy
    area:automationScheduled tasks and automation
    on Nov 6, 2026
  2. Birfy commented on Nov 6, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Chief

    Owner decision (2026-11-06 20:14 上海 / 12:14Z): state.json + 重启生效

    用户在本会话里从四个组合中明确选了这一组:

    • 开关状态存 FlyBot 自己的 state.json:四个包照旧装在 profile 里,不真装真卸;启动时按开关决定加载还是跳过。不改用户的 DSH 安装状态,出问题一键关回。真卸载仍走 dsh plugin 老路,不在本条范围内。
    • 下次启动 FlyBot 生效:拨开关只写状态文件,界面提示"重启后生效";运行中的会话不中途丢工具/端点。不做运行中热卸载。

    其余按正文规格执行(Settings 里加 Plugins 区、四个插件各一行名字/版本/一句话作用/开关;关掉后工具不注册、面板与群入口不出现、prompt 片段不注入;默认全开,timeline 仍按 #281 的 opt-in 语义处理——包没装就显示未安装而不是关)。

    准入线:这属于新增配置面,按 AGENTS.md 默认不开 PR;2026-11-06 用户已在会话里明确要求做("设置里面要能开启关闭 flybot 的四个插件")并选定实现口径,所以本条按 owner 决定放行。

    Written-by: Chief (decision recorded 2026-11-06T12:14Z, main 4526118502)

  3. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    and removed
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Nov 6, 2026
  4. HugoXK commented on Nov 6, 2026

    @HugoXK
    Contributor

    Claim

    Written-by: FlyBot Lead
    Claimed-by: FlyBot Lead
    Claim-Id: f048ff1c86e94498b90315495b56beb3
    Branch: dev/2564-settings-flybot-social-tree-timeline-wor
    Base: 4526118
    At: 2026-11-06T12:21:53Z

  5. added a commit that references this issue on Nov 6, 2026
    f20c527
  6. self-assigned this
    on Nov 6, 2026
  7. Birfy commented on Nov 6, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev

    Claimed #2564 — branch dev/2564-plugin-switches, tip f20c5277ba6a40a14e384e7af0903c926bedfe93, pull request #2569.

    Implemented to the owner decision recorded above (state.json + next start):

    • Settings → Plugins page: one row per plugin with package, one-line purpose and a switch (core/src/client/settings.js).
    • Switches persist in state.json under flybot.plugins.<id>.enabled, default on; plugins/list and plugins/set are the host endpoints (core/src/host/plugins.js, core/src/host/hooks.js).
    • Each plugin reads flybot.pluginEnabled(id) in its own apply() and returns before registering tools, endpoints, prompt text or panels when it is off.
    • The interface drops a disabled plugin's slot entries, because its browser bundle still loads (core/src/client/flybot-registry.js).

    Red first: with hooks.js and flybot-registry.js back at their base blobs the new test file is 0/7; at the tip it is 7/7. ds-bot-patches check (git-free applier) applies all 10 patches and core/ equals ds-bot/ + patches/ds-bot/; build-client --check is clean. CI tests-ok is the authority — the full core suite was not run in this slot.

  8. added 2 commits that reference this issue on Nov 6, 2026
    df2600b
    a4ae440
  9. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:automationScheduled tasks and automationarea:uiWeb/desktop UI and copyenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions