feat: add GitHub Copilot CLI as new provider#122
Merged
bfly123 merged 2 commits intobfly123:mainfrom Mar 10, 2026
Merged
Conversation
Add `gh copilot` support as a new CCB provider with prefix `hask`, following the existing Droid provider pattern. Uses pane-log based communication since Copilot has no structured JSONL session logs. New files: - lib/haskd_session.py - session management - lib/haskd_protocol.py - CCB protocol helpers - lib/copilot_comm.py - pane-log reader and communicator - lib/askd/adapters/copilot.py - unified daemon adapter - bin/hask, bin/hpend, bin/hping - CLI scripts Modified: providers.py, askd, ask, install.sh, adapters/__init__.py, provider_stub.py Closes bfly123#118
- Remove unused import (safe_write_session) and attribute (marker_prefix) - Add emoji prefixes to error/success messages for consistency with Droid - Fix type: ignore by using assert for type narrowing - Isolate copilot stub session path to avoid data pollution with Droid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 概要
Adds GitHub Copilot CLI (
gh copilot) as a new CCB provider, addressing #118.为 CCB 添加 GitHub Copilot CLI (
gh copilot) 作为新的 AI 提供者,解决 #118。Naming Convention / 命名约定
copilothaskHASKD_SPEC/HASK_CLIENT_SPECbin/hask,bin/hpend,bin/hping.copilot-session.ccb/project dirNew Files (7) / 新增文件
lib/haskd_session.py— Session management (simplified from Droid, no JSONL binding)lib/haskd_protocol.py— CCB protocol helpers (wrap_copilot_prompt,extract_reply_for_req)lib/copilot_comm.py— Pane-log reader and communicator (ANSI stripping, marker detection)lib/askd/adapters/copilot.py— Unified daemon adapter (CopilotAdapter)bin/hask— Send message to Copilot (sync CLI)bin/hpend— View latest Copilot replybin/hping— Test Copilot connectivityModified Files (6) / 修改文件
lib/providers.py— AddedHASKD_SPECandHASK_CLIENT_SPEClib/askd/adapters/__init__.py— ExportCopilotAdapterbin/askd— Register copilot adapterbin/ask— Add copilot to provider dispatch tablesinstall.sh— Add new scripts toSCRIPTS_TO_LINKtest/stubs/provider_stub.py— Add copilot stubDesign Decisions / 设计决策
gh copilothas no JSONL session logs; reads from tmux pipe-pane log with ANSI strippingCCB_REQ_ID/CCB_DONEmarkersTest Plan / 测试计划
python3 -c "compile(open(f).read(), f, 'exec')")from askd.adapters.copilot import CopilotAdapterbin/askdrecognizescopilotin provider listinstall.shincludes new scriptsgh copilot(requires active Copilot subscription)Closes #118