Commit Graph

231 Commits

Author SHA1 Message Date
geroge
cb6108610d
Merge pull request #24 from Askhz/fix/model-login-sync
feat(logo): show "Not logged in" state and provider display name in logo
2026-04-11 11:45:44 +08:00
yhf
8cb9343adf
Merge branch 'y574444354:main' into main 2026-04-11 09:21:34 +08:00
Askhz
6fb91d2c28 feat(logo): show "Not logged in" state and provider display name in logo
Add isNotLoggedIn() utility to detect unauthenticated state and display
"Not logged in" message in both LogoV2 and CondensedLogo components.
Replace billing type with provider display name (e.g. "OpenAI", "AWS
Bedrock") when logged in. Subscribe to authVersion to re-render on
login/logout. Add third-party provider model options for OpenAI, Gemini,
Grok, Bedrock, Vertex, and Foundry. Disable biome formatter.
2026-04-11 01:41:55 +08:00
y574444354
e577962516 品牌名称微调 2026-04-10 23:13:43 +08:00
y574444354
6f233a6586 feat(costrict): add depthGuard agent and refine strictPlan/strictSpec workflow
- Add depthGuard agent for depth-limiting sub-agent orchestration
- Update strictPlan/strictSpec agents with improved task handling
- Refresh builtin skill registry
- Update builtInAgents with depthGuard integration
- Add nested-agent design docs and user guide
- Update README_EN with project documentation
2026-04-10 21:42:53 +08:00
yhangf
8258d9be59 fix(agents): normalize tool name references in built-in agent prompts 2026-04-10 17:26:05 +08:00
yhangf
0fef4c250f refactor(AgentTool): disable strict spec agent 2026-04-10 16:59:30 +08:00
xixingde
058a772cb8 Merge branch 'main' of https://github.com/xixingde/csc 2026-04-10 15:59:40 +08:00
xixingde
557b873a79 feat(agents): add isMainThread flag to agent definition for full tool access 2026-04-10 15:54:42 +08:00
geroge
c4238f5125
Merge pull request #19 from Askhz/feat/costrict-sidequery
feat(sideQuery): add OpenAI and CoStrict provider support
2026-04-10 15:54:39 +08:00
Askhz
c65bbeaeba feat(sideQuery): add OpenAI and CoStrict provider support
- Route sideQuery to appropriate provider based on config
- Add sideQueryCoStrict() for CoStrict API integration
- Add sideQueryOpenAI() for OpenAI API integration
- Both implementations return BetaMessage format for compatibility
2026-04-10 15:44:54 +08:00
geroge
989bd7f2a7
Merge pull request #17 from Askhz/feat/disable-nonessential-traffic
feat(cli): disable nonessential traffic and remote settings by default
2026-04-10 15:42:00 +08:00
y574444354
8ea29466ee refactor: replace "Claude's" with "CoStrict's" in user-facing copy
Replace all "Claude's" references with "CoStrict's" across 34 source files
including commands, components, services, tools, and utilities.
2026-04-10 15:35:08 +08:00
Askhz
49ec57a226 feat(cli): disable nonessential traffic and remote settings by default 2026-04-10 14:50:27 +08:00
y574444354
2f3038c0ef Merge pull request #16 from yhangf/main\n\nrefactor skills structure\n\n* docs: update contributors\n* refactor(skills): move projectWiki and tdd skills from bundled to src/costrict/skill\n* docs: update contributors 2026-04-10 14:24:24 +08:00
xixingde
47b2db23df feat(strictPlan): add allowedTools configuration to restrict available tools 2026-04-10 12:24:43 +08:00
xixingde
082345b8aa refactor(costrict): replace SpecPlan agent with StrictPlan skill 2026-04-10 12:17:56 +08:00
y574444354
90908ba929 merge upstream/main: 同步上游更新并解决冲突
冲突解决策略:
- CLAUDE.md: 保留版本号 4.0.1 和品牌化(csc/claude-code-best),
  采纳上游的 CI 信息、Ink 框架位置提醒、Type Safety Guidelines
- configs.ts: 保留 costrict provider,同时采纳上游新增的 grok provider
- ConsoleOAuthFlow.tsx: 保留简洁的 orgResult.message 写法
- contributors.svg: 使用上游版本
2026-04-10 10:57:02 +08:00
xixingde
46ba58e46e refactor(strictPlan): update system prompt to clarify role and correct tool references 2026-04-10 10:29:56 +08:00
yhangf
b3207747c4 refactor(skills): move projectWiki and tdd skills from bundled to src/costrict/skill 2026-04-10 10:09:48 +08:00
xixingde
2f115cfd0b refactor(agents): reorganize strictPlan agent workflow and remove constraints 2026-04-10 10:00:09 +08:00
geroge
1f68cd74e3
Merge pull request #14 from Askhz/refactor/first-login
refactor: remove OAuth/preflight from onboarding and fix model picker reload after CoStrict login
2026-04-10 09:48:50 +08:00
yhangf
0d1754614a refactor(agents): 改回2层架构,StrictSpec 直接调 SubCoding
- StrictSpec 精简为~60行,stage 4 直接调 SubCoding(绕过 SpecPlan 中间层)
- 移除 SpecPlan 注册(3层嵌套对外部用户不可用,ALL_AGENT_DISALLOWED_TOOLS 限制)
- SubCoding 自带探索/实施能力,无需上层准备 proposal/task.md
- 支持 teammates 并行调用 SubCoding,自动降级串行

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 09:32:21 +08:00
yhangf
7ee0b3a6a2 refactor(agents): 清理 StrictSpec 架构,删除 PlanManager
- StrictSpec 精简为纯4阶段分发器(~40行),只负责编排,不含实施细节
- SpecPlan 成为唯一实施协调逻辑来源(探索→提案→验证→实施→收尾)
- 删除 planManager.ts 文件
- builtInAgents.ts 去除重复注册、移除 PLAN_MANAGER_AGENT

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 09:23:19 +08:00
yhangf
bb1e88ea82 Merge branch 'main' of https://github.com/yhangf/csc 2026-04-10 08:56:09 +08:00
claude-code-best
637531f81f fix(types): simplify bridge transport message type
Replace StdoutMessageWithSession conditional type with simpler
TransportMessage intersection type. The conditional type was
over-engineered for what is just StdoutMessage & { session_id? }.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 23:55:54 +08:00
claude-code-best
34bbc1d403 fix(types): replace all as any with proper type assertions
Eliminate unsafe `as any` casts across 21 non-test source files,
replacing them with specific type annotations:

- Bridge transport: use StdoutMessage type for write/writeBatch calls
- print.ts: type msg.request as Record<string, unknown> for unknown
  SDK control subtypes; use StdoutMessage for output.enqueue()
- API providers (openai/grok/gemini): import ChatCompletion types,
  type streams as AsyncIterable<ChatCompletionChunk>, type request
  bodies as ChatCompletionCreateParamsStreaming
- Computer use executor: use Partial<ResolvePrepareCaptureResult>
  for cross-platform screenshot result
- Components: replace Ink color string casts with proper typing
- Win32 bridge: type stdin as Writable after null check

All 2453 tests pass with 0 failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 23:51:33 +08:00
claude-code-best
a14d3dc8f0 fix(types): clean type fixes across 92 files
Apply proper TypeScript type corrections without any unsafe casts:
- Fix unknown/never/{} types from decompilation
- Correct function signatures and parameter types
- Add missing type declarations and interfaces
- Fix Ink component prop types
- Update API client/provider type annotations

Test files with mock data casts are included as-is (acceptable pattern).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 23:45:56 +08:00
claude-code-best
01cf45f4ac fix: 修复 permission 面板 2026-04-09 22:03:54 +08:00
HitMargin
e6affc7053
1. 修复 src/commands/fork/index.ts — 将空 stub 改为有效的 Command 定义 2. 新增 src/commands/fork/fork.tsx — 完整实现 /fork 命令,复用了 AgentTool 的 fork 子 agent 逻辑 (#221)
* 1. 修复 src/commands/fork/index.ts — 将空 stub 改为有效的 Command 定义
  2. 新增 src/commands/fork/fork.tsx — 完整实现 /fork 命令,复用了 AgentTool 的 fork 子 agent 逻辑

* Update src/commands/fork/fork.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix

---------

Co-authored-by: HitMargin <hitmargin@qq.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-04-09 21:53:07 +08:00
Alan
bb07836231
fix: support CRLF SSE frame parsing (#223) 2026-04-09 21:52:28 +08:00
Askhz
a33063fbad refactor: remove OAuth/preflight from onboarding and fix model picker reload after CoStrict login
- Remove preflight and OAuth steps from onboarding flow
- Clear both modelType and model settings on logout
- Reload ModelPicker via key after successful CoStrict login instead of closing it
- Pre-fetch and cache CoStrict models silently after login
2026-04-09 21:10:32 +08:00
yhangf
51b88ecb24 refactor(agents): 改为2层架构,StrictSpec 直接调度所有叶子 agent
- StrictSpec 吸收 SpecPlan 的全部实施协调逻辑
- 完整流程:Requirement→DesignAgent→TaskPlan→QuickExplore/TaskCheck/SubCoding
- 移除 SpecPlan 注册(不再是链路中间层)
- 调用深度:StrictSpec → leaf agents(2层)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 21:00:52 +08:00
yhangf
1f768d682a refactor(agents): 3层架构重构 StrictSpec 工作流
- SpecPlan 合并 PlanManager/SpecPlan/PlanApply 为统一 Layer 2 协调者
- StrictSpec Stage 4 直接调用 SpecPlan,移除中间层 PlanManager
- SpecPlan 支持 SubCoding 串行(模式A)和 teammates 并行(模式B),自动降级
- builtInAgents.ts 移除 PLAN_MANAGER_AGENT 注册(不再是 StrictSpec 链路必需)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 20:52:41 +08:00
claude-code-best
8c619a215c build: 修复构建报错 2026-04-09 20:47:13 +08:00
xixingde
57d0e1feac refactor(agents): consolidate PlanApply functionality into StrictPlan agent
- Remove separate PlanApply agent and integrate task distribution logic directly into StrictPlan agent
- Move PlanApply and TDD agents to backup directory
- Update StrictPlan system prompt to reflect dual role as PlanAgent and CodingAgent
- Update builtInAgents registry to remove PlanApply and update TDD import path
2026-04-09 20:46:18 +08:00
xixingde
12601d3faf Merge branch 'main' of https://github.com/xixingde/csc 2026-04-09 20:45:06 +08:00
yhangf
fe8ad9df69 feat: migrate strictSpec workflow agents into csc built-in agent registry
Register 6 previously-unregistered costrict agents as first-class built-in
agents: StrictSpec (4-stage orchestrator), Requirement, DesignAgent, TaskPlan,
PlanManager, and SpecPlan.

Adapt system prompts in strictSpec.ts, planManager.ts, specPlan.ts to use the
csc Agent tool (subagent_type parameter) instead of the legacy costrict-specific
`task` tool. Also fix a broken relative import in taskPlan.ts.

Agent call chain for StrictSpec workflow:
  StrictSpec → Requirement / DesignAgent / TaskPlan / PlanManager
  PlanManager → SpecPlan
  SpecPlan → QuickExplore / TaskCheck / PlanApply
  PlanApply → SubCoding

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 20:44:50 +08:00
y574444354
caa020365d Merge upstream/main: 同步上游更新并解决冲突 2026-04-09 19:15:29 +08:00
y574444354
51ff947604 feat(costrict): 集成 CoStrict 登录流程和模型选择到 /model 命令 2026-04-09 19:02:03 +08:00
xixingde
3363059608 fix(agents): enable Claude markdown output across all built-in agents 2026-04-09 18:22:14 +08:00
bonerush
562e9daadd
fix: Handle undefined command names in getCommandName function (#217)
* fix: reorder tool and user messages for OpenAI API compatibility (#168)
Fixes #168
OpenAI requires that an assistant message with tool_calls be immediately
followed by tool messages. Previously, convertInternalUserMessage
output user content before tool results, causing 400 errors.
Now tool messages are pushed first.

* fix: 修复OpenAI兼容层中deferred tools处理问题

  提交描述:
  修复了在使用OpenAI兼容API时TaskCreate工具调用失败的问题。

  问题:
  - 当使用OpenAI兼容API模型时,调用TaskCreate工具出现"InputValidationError: The required
  parameter `subject` is missing"错误
  - OpenAI兼容层没有正确处理deferred tools的过滤逻辑,导致工具schema没有被正确发送给模型

  修复:
  1. 在OpenAI兼容层中添加了与Anthropic API路径一致的deferred tools处理逻辑
  2. 导入必要的工具搜索相关函数: isToolSearchEnabled, extractDiscoveredToolNames,
  isDeferredTool等
  3. 实现工具过滤逻辑:
     - 检查工具搜索是否启用
     - 构建deferred tools集合
     - 过滤工具列表: 只包含非deferred工具或已发现的deferred工具
     - 为deferred tools设置deferLoading标志
  4. 修正了extractDiscoveredToolNames函数的导入路径错误

  影响:
  - 解决了TaskCreate工具调用时的参数验证错误
  - 确保OpenAI兼容层与Anthropic API路径在处理deferred tools时行为一致
  - 支持工具搜索功能在OpenAI兼容模式下正常工作

  修改的文件:
  - src/services/api/openai/index.ts - 主要修复文件

  测试建议:
  1. 使用OpenAI兼容API模型时,TaskCreate工具应该可以正常调用
  2. 如果工具搜索功能启用,可能需要先使用ToolSearchTool来发现TaskCreate工具
  3. 验证工具调用时不再出现"InputValidationError"错误

  这个修复确保了当使用OpenAI兼容API(如Ollama、DeepSeek、vLLM等)时,deferred
  tools(如TaskCreate)能够被正确处理,解决了工具调用失败的问题。

* fix: 更新未发送工具架构提示,提供OpenAI兼容模型的使用步骤

* fix: Handle undefined command names in getCommandName function

- Modified getCommandName in src/types/command.ts to return empty string instead of undefined when cmd.name is undefined
- Added null checks in src/hooks/useTypeahead.tsx to safely handle command names
- Prevents "undefined is not an object" error when FEATURE_BUDDY=1 and FEATURE_FORK_SUBAGENT=1 are enabled

The error occurred because getCommandName(cmd) could return undefined when cmd.name was undefined, causing .length access to fail.
2026-04-09 17:53:43 +08:00
geroge
73c2121ee4
Merge pull request #11 from Askhz/refactor/change-config-path
refactor(provider): migrate credentials storage
2026-04-09 17:47:38 +08:00
claude-code-best
2da6514095
feat: 支持自托管的 remote-control-server (#214)
* feat: 支持自托管的 remote-control-server (#214)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-04-09 17:40:50 +08:00
Askhz
1cedb89db8 refactor(provider): migrate credentials storage from ~/.costrict to ~/.claude directory 2026-04-09 17:26:44 +08:00
geroge
260a8140e3
Merge pull request #10 from y574444354/feat/rebrand-claude-code-to-costrict
rebrand: 将 Claude Code 品牌改为 CoStrict
2026-04-09 17:23:27 +08:00
y574444354
1c3e495c03 rebrand: 将 Claude Code 品牌改为 CoStrict 2026-04-09 17:14:39 +08:00
xixingde
6962816be7 feat(agents): add TDD agent and integrate into strict plan workflow 2026-04-09 17:12:36 +08:00
xixingde
d5daf372a0 feat(AgentTool): add new built-in agents to registry 2026-04-09 16:57:14 +08:00
geroge
2d9996ab77
Merge pull request #8 from Askhz/feature/security-review
Add security review skill with code audit and bundling support
2026-04-09 16:45:57 +08:00