claude-code-best
da0b4bce24
chore: 移除废弃的 ctx_viz 类型声明
...
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:44 +08:00
claude-code-best
52956804ff
feat: 注册所有新命令到命令系统和工具注册表
...
- commands.ts: 注册所有新命令(memory-stores、vault、schedule 等),
移除 require() 动态加载,统一为 ESM import
- tools.ts: 注册 LocalMemoryRecallTool、VaultHttpFetchTool
- 补充命令测试(bridge-kick、commit、commit-push-pr、init-verifiers)
- 补充工具测试(AgentTool、RemoteTrigger、SkillTool、WebFetch、WebSearch)
- 集成测试:autonomy-lifecycle-user-flow 更新
- 探测脚本和功能文档
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:39 +08:00
claude-code-best
3f3d9d9638
feat: 添加 Provider Registry、StatusLine、Cache Stats 和其他增强
...
- providerRegistry: OpenAI 兼容 provider 切换(Cerebras/Groq/DeepSeek/Qwen)
- StatusLine: 增强状态栏(缓存命中率、TTL 倒计时、自定义 shell 命令)
- cacheStats: 缓存命中率和 token 签名追踪
- ultrareviewPreflight: 代码审查预检服务
- SkillsMenu/filterSkills: 技能菜单过滤增强
- MagicDocs/langfuse prompts: 提示词更新
- claude.ts: API 客户端更新
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:35 +08:00
claude-code-best
444e46a0b4
feat: 添加工具类命令(teleport、recap、break-cache、env、tui 等)
...
- /teleport: 从 claude.ai 恢复会话
- /recap: 生成会话摘要
- /break-cache: 提示缓存管理(once/always/off/status)
- /env: 环境信息展示(含密钥脱敏)
- /tui: 无闪烁 TUI 模式管理
- /onboarding: 引导流程
- /perf-issue: 性能问题诊断
- /debug-tool-call: 工具调用调试
- /usage: 用量统计(合并 /cost 和 /stats 别名)
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:31 +08:00
claude-code-best
4e4dd83f08
feat: 添加 GitHub 集成命令(issue、share、autofix-pr)
...
- /issue: 通过 gh CLI 创建 GitHub issue,支持标签/指派
- /share: 会话日志分享到 GitHub Gist,支持密钥脱敏
- /autofix-pr: 自动修复 CI 失败的 PR,进度追踪
- launchCommand: 共享命令启动器
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:23 +08:00
claude-code-best
fc43aa9e7a
feat: 添加本地 Memory/Vault 管理命令
...
- /local-memory: 本地记忆管理(store/entry CRUD、搜索、归档)
- /local-vault: 本地密钥保险库管理(加解密、keychain 集成)
- permissionValidation: vault 权限校验增强
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:20 +08:00
claude-code-best
8874fedb41
feat: 添加云端管理命令(memory-stores、vault、schedule、skill-store、agents-platform)
...
- /memory-stores: 远程记忆存储管理
- /vault: 密钥保险库管理
- /schedule: 云端定时触发器管理(cron)
- /skill-store: 技能商店浏览和安装
- /agents-platform: 远程 agent 调度管理
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:17 +08:00
claude-code-best
2d1ff66d9b
feat: 添加登录认证增强(workspace key、host guard、auth status)
...
- hostGuard: workspace API key 仅限 api.anthropic.com,OAuth 限定 subscription plane
- saveWorkspaceKey: sk-ant-api03- 前缀校验,安全写入缓存
- AuthPlaneSummary/WorkspaceKeyInput: 登录 UI 组件
- getAuthStatus: 认证状态查询
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:15 +08:00
claude-code-best
3114a82b89
feat: 添加 LocalMemoryRecallTool 和 VaultHttpFetchTool
...
- LocalMemoryRecallTool: 跨会话本地笔记召回,权限门控,大小限制
- VaultHttpFetchTool: 使用 vault 密钥的认证 HTTP 请求,ACL 规则
- agentToolFilter: 子 agent 工具继承过滤层
- ALL_AGENT_DISALLOWED_TOOLS 白名单更新
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:12 +08:00
claude-code-best
87f5107024
feat: 添加 Session Memory 多存储支持
...
Markdown 文件存储的本地记忆系统,支持多 store 管理、
entry 增删改查和归档,存储于 ~/.claude/local-memory/。
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:09 +08:00
claude-code-best
bd054573a5
feat: 添加 Local Vault 加密存储服务
...
AES-256-GCM 加密 vault,支持 OS keychain 和加密文件回退,
scrypt KDF 密钥派生,64KB secret 上限。
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:07 +08:00
claude-code-best
e6c14687f9
chore: 添加 CI 配置、codecov 和测试 mock 基础设施
...
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 23:04:04 +08:00
claude-code-best
907b8d1443
fix: 添加 React Error Boundary 防止生产环境渲染崩溃
...
增强 SentryErrorBoundary 组件,捕获渲染错误时输出诊断信息
(错误消息 + component stack)到 stderr 和终端,而非静默返回
null。在 replLauncher 根节点和 Messages 组件层级包裹 Error
Boundary,防止 Ink 内部的 Error Boundary 直接终止进程。
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 22:02:04 +08:00
林凯90331
59d3460554
Merge remote-tracking branch 'origin/feat/server-refactor' into feat/cloud-question
2026-05-09 18:18:55 +08:00
DoSun
7e04ca159b
Merge pull request #52 from Askhz/feat/serve-session-create
...
Feat/serve session create
2026-05-09 18:00:21 +08:00
Askhz
550dbb5532
feat: serve 模式支持 resume 历史会话继续对话
...
- prompt/prompt_async 接口找不到内存 session 时自动从磁盘历史恢复
- 从 transcript 读取历史 session 的原始 cwd,保证子进程在正确目录启动
- resume 时不传 --session-id 避免与 --resume 冲突(csc 限制)
- sessionManager.createSession 支持传入指定 sessionId,resume 时复用历史 id
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 17:54:25 +08:00
林凯90331
0b36424820
feat(server/question): adapt question API to opencode-compatible format
...
Refactor csc serve question endpoints to match opencode/app-ai-native
expected data models and request/response shapes:
- GET /question now returns QuestionRequest[] (direct array) instead of
{ questions: [...] }
- POST /question/:id/reply accepts { answers: string[][] } mapping to
selected option labels per question
- POST /question/:id/reject no longer requires a request body
- Support dual question sources:
- MCP Elicitation (converted to opencode format with enum→options)
- AskUserQuestionTool permissions exposed as questions
- Add conversion helpers: convertAskUserQuestionToOpencode,
convertElicitationToOpencode, buildElicitationContent
- Reply to AskUserQuestionTool via replyPermission('allow') with
constructed updatedInput.answers map
Also includes serve-mode infrastructure improvements:
- Session routes auto-create sessions on demand via getOrCreateSession
- Set CSC_SERVE_MODE env var in child process spawn
- Skip push-suggestion stream waiting in serve mode
Add comprehensive unit tests for question route opencode conversion.
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-09 17:52:43 +08:00
claude-code-best
90f861a7e1
docs: 更新 CLAUDE.md — 同步 workspace 包数量、feature flags、工具目录等变更
...
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 17:50:55 +08:00
claude-code-best
d7361457ec
fix: 提升 CLAUDE.md 指令权重 — 独立 project-instructions + deferred tools 位置调整
...
- prependUserContext: 将 claudeMd 从通用 <system-reminder> 提取为独立的
<project-instructions> 用户消息,不带免责声明,置于消息列表最前面
- queryModel: deferred tools 消息从 prepend 改为 append,避免抢占
project-instructions 的最高权重位置;标签规范化为 <system-reminder>
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 17:50:15 +08:00
Askhz
f34325f60a
feat: 修复 serve 模式新建会话及消息读取问题
...
- tsconfig.json 加 baseUrl 修复 dev 模式子进程 src/* 路径别名解析
- waitReady/initReject 修复:子进程退出时正确 reject,避免永久 pending
- POST /session 等待子进程 ready 后再返回,避免立即发 prompt 崩溃
- transcriptReader pathCache 不缓存 null,文件未写入时下次可重新查找
- session/status 用 prompting 判断 busy/idle,prompt 结束后正确变为 idle
- /agent 接口补充默认 build 模式
- message.ts 使用 spawnCwd 定位 transcript 文件
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 17:35:05 +08:00
linkai0924
61b1b595bf
Merge pull request #51 from y574444354/fix/compile-code-reivew
...
fix: code-review compile issue
2026-05-09 17:33:16 +08:00
林凯90331
2fa9f1616f
fix: code-review compile issue
2026-05-09 17:32:33 +08:00
claude-code-best
eafbb82ad5
Merge pull request #442 from claude-code-best/feature/tool_search
...
feat: 支持 SearchExtraTools 能力以替代 Tool Search
2026-05-09 17:23:03 +08:00
claude-code-best
5602a1ed37
Merge pull request #438 from q1352013520/feature/codex-subscription
...
feat: /login支持codex订阅登录
2026-05-09 17:16:12 +08:00
claude-code-best
4c6560e451
refactor: 精简系统提示词 — 合并沟通风格段落、精简 memory/工具描述、截断 gitStatus
...
- 合并 getOutputEfficiencySection + getSimpleToneAndStyleSection 为精简的 Communication style
- 精简 auto memory 指令:删除 4 种类型的详细说明和示例,仅保留核心 description
- 精简 Agent 工具:删除 forkExamples 和 currentExamples 大段示例
- 精简 Bash 工具:合并 sleep 相关指导
- 精简 EnterPlanMode/ExitPlanMode:删除详细 GOOD/BAD 示例
- gitStatus MAX_STATUS_CHARS 从 2000 降到 1000
- 同步更新 prompt engineering audit 测试断言
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 17:14:41 +08:00
claude-code-best
012c216a37
fix: 修复 prefetch 测试 — turn-zero 推荐已禁用,测试期望值同步更新
...
getTurnZeroSearchExtraToolsPrefetch 在 commit 2cf18c4c 中被禁用(始终返回 null),
但测试仍期望匹配时返回非 null attachment。更新三个用例全部期望 null。
2026-05-09 17:02:40 +08:00
claude-code-best
d27c6ccb47
docs: 添加 ToolSearch 设计指南 + 禁用 turn-zero 工具推荐弹窗
...
- 新增 docs/design/tool-search-design-guide.md,涵盖架构、搜索算法、执行管道、演进历史
- 禁用 getTurnZeroSearchExtraToolsPrefetch,消除用户输入时的频繁弹窗
- inter-turn 发现机制保持不变
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 16:45:56 +08:00
claude-code-best
33b3358924
refactor: 统一 Tool Search 目录重命名与 prompt 强化
...
- 重命名 toolSearch/ → searchExtraTools/,ToolSearchTool → SearchExtraToolsTool
- 强化 ExecuteExtraTool prompt:明确强调必须通过 ExecuteExtraTool 调用 deferred tools
- 优化 system prompt 工具优先级引导:core tools 直接调用,deferred tools 必须用 ExecuteExtraTool
- available-deferred-tools 标签追加 ExecuteExtraTool 使用说明
- tool_discovery attachment 消息强化 ExecuteExtraTool 调用指引
- 禁用 turn-zero 用户输入工具推荐(频繁弹窗)
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-09 16:45:05 +08:00
DoSun
265ff7d864
fix: 中断对话时添加 is_interrupted 标记并优化 abort 响应速度
...
- QueryEngine: result 消息新增 is_interrupted 字段,标识用户中断
- sessionHandle: abort() 不再等待子进程退出,改为等待 result 事件(2s 超时兜底)
2026-05-09 16:37:03 +08:00
Bill
dd942049f8
fix: 修复CI格式检查失败
2026-05-09 16:21:07 +08:00
yhangf
3ec07bd2ec
Merge branches 'feature/spec-pro' and 'main' of https://github.com/y574444354/csc into feature/spec-pro
2026-05-09 16:10:01 +08:00
claude-code-best
8565b65d92
feat: 将 Agents/Teams 工具纳入 Tool Search 按需发现
...
将 TeamCreate、TeamDelete、SendMessage 从 CORE_TOOLS 移除,
使其成为 deferred 工具,通过 ToolSearch 按需发现以减少 context token。
swarm 模式下 SendMessage 保持 always loaded,TeamCreate/TeamDelete
在 swarm 未启用时调用返回启用提示。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 15:45:20 +08:00
claude-code-best
f6f2ad3220
fix: 修复缓存命中率警告消息不显示 — 改用 system 类型消息绕过 isMeta 过滤
2026-05-09 15:22:34 +08:00
yhangf
396e4cdbe3
feat(agents): propagate allowedAgentTypes from agent tool resolution to query engine
2026-05-09 15:15:10 +08:00
claude-code-best
a77d8316c9
fix: 修复 Tool Search 缓存失效 — deferred 工具不再动态注入 tools 数组
...
移除 deferred 工具的 "discover then include" 逻辑,让 tools 数组在整个会话中
保持稳定(只有 core tools + ToolSearch + ExecuteExtraTool),避免每次发现新
工具时 tools JSON 变化导致 prompt cache 失效。
同时强化工具优先级引导:core tools 优先直接调用,ToolSearch/ExecuteExtraTool
仅作为发现和调用 deferred 工具的最后手段。当模型搜索已加载的 core tool 时,
ToolSearch 返回明确的拒绝提示。
Co-Authored-By: glm-5.1[1m] <zai-org@claude-code-best.win>
2026-05-09 14:56:22 +08:00
claude-code-best
f04889504e
refactor: 统一自建 Tool Search — 移除 tool_reference/defer_loading 依赖,全 provider 通用
...
- 重命名 ExecuteTool → ExecuteExtraTool,作为一等工具始终可用
- ToolSearchTool 输出改为纯文本(区分 core/deferred),移除 tool_reference blocks
- 移除 modelSupportsToolReference() 及相关 GrowthBook 配置
- 移除 API 侧 defer_loading 字段和 tool search beta header 注入
- 简化 system prompt(工具使用指南从 ~120 行压缩到 ~10 行)
- extractDiscoveredToolNames 支持文本格式解析(向后兼容旧 session 的 tool_reference)
- 更新 promptEngineeringAudit 测试以匹配简化后的 prompt 结构
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 14:19:31 +08:00
yhangf
1efba6b17a
feat(cli): resolve agent tools based on main thread agent definition in headless streaming
2026-05-09 14:18:10 +08:00
DoSun
6274c0e2be
fix: 过滤子进程内部合成消息(model switch breadcrumb)不转发给前端
2026-05-09 11:43:10 +08:00
DoSun
0393ce927d
feat: GET /permission 响应格式对齐前端 PermissionRequest 类型
...
- 工具名 PascalCase 映射为小写 permission key(匹配 i18n)
- 从 tool input 提取 patterns(file_path/command 等)
- 补齐 sessionID/id/tool/callID/metadata/always 字段
2026-05-09 11:18:46 +08:00
DoSun
9c3441331c
feat: serve 模式默认启用权限问询(acceptEdits)并修复回复链路
...
- 默认权限模式从 undefined 改为 acceptEdits(工作目录内读写自动放行)
- 始终传递 --permission-prompt-tool stdio 给子进程
- 修复 updatedInput 为 undefined 导致子进程 Zod 解析失败
- always 回复附带 updatedPermissions + decisionClassification
- 新增 permission_replied/question_replied SSE 事件通知 UI 撤销弹窗
- hook_callback 控制请求自动回复防止子进程阻塞
- PendingPermission 保存 permission_suggestions 供 always 回复使用
2026-05-09 11:10:13 +08:00
DoSun
e37e9d3ad5
feat: enable stream_event forwarding for serve mode streaming
...
QueryEngine previously guarded stream_event yields behind includePartialMessages,
which was undefined in serve mode. Remove the guard so stream_event messages
always flow to the child process stdout. Add stream_event handling in
sessionHandle.routeMessage to emit via EventBus for downstream consumers.
2026-05-09 10:04:19 +08:00
DoSun
862a16c295
Merge pull request #50 from Askhz/feat/server-add-session
...
feat: serve 模式 session 列表按工作目录过滤
2026-05-09 10:01:45 +08:00
Askhz
aca6133318
feat: serve 模式 session 列表按工作目录过滤
...
从请求头 x-csc-directory 读取工作目录(cs-cloud 通过此头传递),
GET /session 和 GET /session/status 只返回该目录下的历史会话
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 09:59:26 +08:00
claude-code-best
fe480d35a4
feat: Remote Control 条件工具注入 — PushNotification/SendUserFile/Brief 仅 bridge 启用时可用
...
- PushNotificationTool、SendUserFileTool 添加 isEnabled() 使用 isBridgeEnabled()
- BriefTool 的 isEnabled() 从 isBriefEnabled() 改为 isBridgeEnabled()
- ExecuteTool 添加 isEnabled() 兜底检查,不可用时返回友好错误
- useReplBridge bridge 首次连接时插入 system 消息通知模型新工具可用
- 移除 toolSearch 中 firstParty base URL 白名单检测,默认启用 tool search
Co-Authored-By: glm-5.1[1m] <zai-org@claude-code-best.win>
2026-05-09 09:45:52 +08:00
claude-code-best
42f0d35b5d
feat: 实现 Tool Search 基础设施层(CORE_TOOLS 白名单 + TF-IDF 索引 + ExecuteTool + 搜索增强)
...
- 新增 CORE_TOOLS 白名单常量(31 个核心工具),重构 isDeferredTool 为白名单制判定
- 新建 TF-IDF 工具索引模块(toolIndex.ts),复用 localSearch.ts 算法函数
- 新建 ExecuteTool 跨 API provider 统一工具执行入口
- 增强 ToolSearchTool:TF-IDF 搜索路径、discover: 模式、并行搜索合并、文本模式回退
- 新增 27 个单元测试,precheck 零错误通过(4108 tests pass)
Co-Authored-By: glm-5.1[1m] <zai-org@claude-code-best.win>
2026-05-08 22:29:15 +08:00
Bill
a6d257e4f6
feat: /login支持codex订阅登录
2026-05-08 20:35:34 +08:00
claude-code-best
0f4e414731
Merge pull request #435 from bonerush/fix/conditional-hooks-ctrlo-error
...
fix: 修复条件式 hook 调用导致的 "Rendered fewer hooks than expected" 错误
2026-05-08 19:21:30 +08:00
DoSun
5c3f1e16db
fix: read workspace from x-csc-directory header in session creation
2026-05-08 19:02:09 +08:00
DoSun
02161dd2a6
fix: pass dynamic provider_id from initData instead of hardcoding
...
- Add _providerId field to SessionHandle, extracted from initData.account.apiProvider
- Include provider_id in user message emit, assistant message fallback, and session.ready
- Revert getProviderId normalization (keep raw value from subprocess)
2026-05-08 18:59:00 +08:00
DoSun
e258f58fd7
fix: normalize provider ID to anthropic (was firstParty causing model validation mismatch)
...
The subprocess returns apiProvider='firstParty' for direct Anthropic access,
but the adapter hardcodes providerID='anthropic' in SSE events. This mismatch
causes the frontend's isModelValid check to fail, clearing the model selector.
2026-05-08 18:42:51 +08:00