Skip to content

feat: add ccb launcher startup config for copilot, codebuddy, qwen#139

Open
LeoLin990405 wants to merge 5 commits intobfly123:mainfrom
LeoLin990405:fix/provider-startup-config
Open

feat: add ccb launcher startup config for copilot, codebuddy, qwen#139
LeoLin990405 wants to merge 5 commits intobfly123:mainfrom
LeoLin990405:fix/provider-startup-config

Conversation

@LeoLin990405
Copy link
Copy Markdown
Contributor

Summary / 概述

Copilot (#122), CodeBuddy (#123), Qwen (#124) 的 daemon adapters、CLI 脚本和 ask dispatcher 已合并,但 ccb 主启动器缺少启动配置。本 PR 补全所有缺失部分。

The daemon adapters, protocol modules, CLI scripts, and ask dispatcher for Copilot/CodeBuddy/Qwen were already merged, but the ccb launcher was missing startup integration. This PR adds all missing pieces.

Changes

Area What was missing
_ALLOWED_PROVIDERS copilot, codebuddy, qwen not whitelisted
Provider validation CCB_CALLER not set for new providers
Unified askd loop New providers not in daemon startup loop
Spec mapping HASK/BASK/QASK_CLIENT_SPEC not in dict
Pane creation No tmux/wezterm dispatch for new providers
Warmup/ping hping/bping/qping not routed
Start cmd No build methods for new providers
Session writing No session file creation
Claude env No env overrides for inter-provider comm
Help text ccb --help didn't list new providers
Legacy migration Session files not in migration list

New generic methods

Instead of duplicating the established pattern 3x, adds:

  • _start_generic_tmux() — reusable tmux pane creation
  • _build_generic_start_cmd() — env-overridable CLI command
  • _write_generic_session() — session file + registry

Test plan

  • All 268 tests pass (no regressions)
  • ccb --help shows all 8 providers
  • Import verification: HASK/BASK/QASK_CLIENT_SPEC load correctly

Ref #122, #123, #124
Follow-up to #59

The daemon adapters, protocol modules, CLI scripts (hask/bask/qask), and
ask dispatcher were already merged but the ccb launcher was missing:
- _ALLOWED_PROVIDERS whitelist
- Provider validation (CCB_CALLER)
- Unified askd daemon startup loop
- Daemon spec mapping
- Tmux/WezTerm pane creation dispatch
- Warmup/ping routing
- Start command generation
- Session file writing
- Claude env overrides for inter-provider communication
- Help text listing
- Legacy session migration

Adds generic _start_generic_tmux(), _build_generic_start_cmd(), and
_write_generic_session() methods to avoid duplicating the established
pattern for each new pane-log provider.

All 268 tests pass.

Closes bfly123#59 (follow-up)
Ref bfly123#122
@WenYuLuo
Copy link
Copy Markdown

image 应该还缺少足够的配置

_parse_providers() and _parse_providers_with_cmd() had their own
hardcoded allowed sets that were not updated, causing `ccb copilot`
to fail with "invalid provider(s)" even though the help text listed
the new providers.

Reported by @WenYuLuo in bfly123#139.
@LeoLin990405
Copy link
Copy Markdown
Contributor Author

@WenYuLuo 感谢发现!🙏

确实还有遗漏 —— ccb 主脚本中有两个 CLI 解析函数 (_parse_providers()_parse_providers_with_cmd()) 各自有独立的硬编码 allowed 集合,没有包含新 providers。

已在 14e69d9 中修复,现在 ccb copilot codexccb -a copilot codex 应该可以正常工作了。

修改:

  • _parse_providers(): allowed set 添加 copilot, codebuddy, qwen
  • _parse_providers_with_cmd(): allowed set 添加 copilot, codebuddy, qwen
  • 错误提示文本同步更新

268 tests 仍然全部通过。

Update every hardcoded provider list to include copilot, codebuddy,
and qwen (and droid where missing):

- lib/ccb_start_config.py: DEFAULT_PROVIDERS
- lib/pane_registry.py: legacy migration loops (2 locations)
- lib/web/routes/providers.py: KNOWN_PROVIDERS
- lib/memory/transfer.py: SUPPORTED_PROVIDERS, SUPPORTED_SOURCES,
  SOURCE_SESSION_FILES, DEFAULT_SOURCE_ORDER
- lib/mail/config.py: SUPPORTED_PROVIDERS
- lib/mail_tui/wizard.py: default_map (mail wizard choices)
- mcp/ccb-delegation/server.py: PROVIDERS dict, ALIAS_TOOLS,
  TOOL_DEFS loop
- bin/ccb-mounted: PROVIDERS

Audited with two independent reviewers (grep-based + lifecycle trace)
across three rounds to ensure zero omissions.

All 268 tests pass.
@LeoLin990405
Copy link
Copy Markdown
Contributor Author

@WenYuLuo 已全面修复 ✅

除了之前修复的 CLI parser,又发现并修复了 12 处 其他文件中遗漏的 provider 白名单:

文件 修复内容
lib/ccb_start_config.py DEFAULT_PROVIDERS 加了 copilot/codebuddy/qwen
lib/pane_registry.py (2处) Legacy migration loop 加了新 providers
lib/web/routes/providers.py KNOWN_PROVIDERS
lib/memory/transfer.py (3处) SUPPORTED_PROVIDERS + SOURCES + SESSION_FILES + SOURCE_ORDER
lib/mail/config.py SUPPORTED_PROVIDERS
lib/mail_tui/wizard.py Mail wizard 选项 1-8
mcp/ccb-delegation/server.py (3处) PROVIDERS dict + ALIAS_TOOLS (24条) + TOOL_DEFS loop
bin/ccb-mounted PROVIDERS

经过 3 轮独立 reviewer 审查 + grep 全仓库扫描,确认无遗漏。

268 tests 全部通过:

test results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants