Commit Graph

164 Commits

Author SHA1 Message Date
github-actions[bot]
1463f5c272 chore(release): bump version to 4.1.4 2026-05-21 06:28:24 +00:00
github-actions[bot]
321be8a128 chore(release): bump version to 4.1.3 2026-05-19 04:00:30 +00:00
github-actions[bot]
a76c92ea2d chore(release): bump version to 4.1.2 2026-05-18 11:17:21 +00:00
Askhz
2ae463a8fe refactor: dev.ts 和 build.ts 统一从 defines.ts 导入 feature flags
之前三个文件各自维护独立的 feature 列表,导致合并时容易漏掉变更
(如 CONTEXT_COLLAPSE 在 defines.ts 已禁用但 build.ts 仍启用)。

现在 dev.ts 和 build.ts 都从 defines.ts 导入 DEFAULT_BUILD_FEATURES,
与上游保持一致的单一定义源模式。

Co-Authored-By: CoStrict-DeepSeek-V4-Pro <deepseek-ai@claude-code-best.win>
2026-05-18 17:28:16 +08:00
Askhz
9062511428 fix: 禁用 CONTEXT_COLLAPSE 修复自动压缩不触发的问题
CONTEXT_COLLAPSE 是空壳 stub,启用后会在 shouldAutoCompact() 中抑制
autocompact,但自身的 collapse 能力并未实现,导致上下文超限后不会触发
自动压缩,一直涨到 API 返回 413 硬报错。

上游已在 0290fe32 修复,CSC 在合并 upstream/main v2.4.2 时漏掉了这个
变更。此次修复与上游一致:注释掉 defines.ts 和 dev.ts 中的
CONTEXT_COLLAPSE feature flag。

Co-Authored-By: CoStrict-DeepSeek-V4-Pro <deepseek-ai@claude-code-best.win>
2026-05-18 16:11:19 +08:00
github-actions[bot]
9cdff19cb7 chore(release): bump version to 4.1.1 2026-05-16 03:32:18 +00:00
github-actions[bot]
7f9d8ba78a chore(release): bump version to 4.1.0 2026-05-15 09:03:10 +00:00
geroge
ba9c2e1538
Merge pull request #89 from IronRookieCoder/fix/issue-46-47
fix(windows): prevent terminal startup failures
2026-05-15 14:33:28 +08:00
github-actions[bot]
de83394e8a chore(release): bump version to 4.0.26 2026-05-15 03:47:01 +00:00
github-actions[bot]
90f27f36d6 chore(release): bump version to 4.0.25 2026-05-15 03:18:45 +00:00
github-actions[bot]
f2585ae08b chore(release): bump version to 4.0.24 2026-05-15 02:40:29 +00:00
DoSun
196ff5ba21 feat: add task notification mode and skip review builtin option
- Add TASK_NOTIFICATION_TAG to distinguish task notifications from regular prompts
- Add SKIP_REVIEW_BUILTIN=1 env var to skip review builtin generation
  during dev/build for faster startup

Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
2026-05-15 10:34:05 +08:00
github-actions[bot]
34903c97e8 chore(release): bump version to 4.0.23 2026-05-14 13:40:24 +00:00
github-actions[bot]
49808bb967 chore(release): bump version to 4.0.22 2026-05-14 12:54:58 +00:00
林凯90331
f7a405f703 fix(utils): replace using syntax with withDisposable for node v20 compatibility
Node.js v20 does not support the  syntax. Replace all  patterns with a new  helper that wraps the operation in try/finally and explicitly calls Symbol.dispose.

Also rename listBuiltinSkillNames to listBuiltinSkills in generate-review-builtin.ts.

Signed-off-by: 林凯90331 <90331@sangfor.com>

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 20:48:37 +08:00
github-actions[bot]
876dc94ed5 chore(release): bump version to 4.0.21 2026-05-14 11:25:31 +00:00
DoSun
f100568b46
Merge pull request #85 from y574444354/fix/serve-command-real-impl
fix: 替换假 server 命令为真实 serve 实现
2026-05-14 19:14:53 +08:00
github-actions[bot]
04aa2dc662 chore(release): bump version to 4.0.20 2026-05-14 09:37:36 +00:00
IronRookieCoder
223b694965 fix(windows): prevent terminal startup failures
## Bug 详情
- issues.md #46:Windows MSYS2/UCRT64 下执行 csc,欢迎信息输出后在 stdin raw mode/终端输入初始化阶段崩溃,出现 native std::bad_weak_ptr 和后续 Bun mutex corrupt。
- issues.md #47:cmd.exe 可启动,但 PowerShell 运行 csc 会走 npm 生成的 csc.ps1;截图显示 node.exe 报错 "Input must be provided either through stdin or as a prompt argument when using --print",说明裸 csc 被误判成 print/non-interactive 模式。

## 根因
- MSYS2/Cygwin/mintty 等 Windows 终端对 Node/Bun stdin raw mode 和终端扩展控制序列兼容性不稳定,启动早期强行 setRawMode/查询终端能力会触发崩溃风险。
- npm 的 PowerShell shim 解析优先级高于 csc.cmd,且可能让 stdout TTY 状态不可用;原 main.tsx 只要 stdout 非 TTY 就自动进入 non-interactive/--print 路径,最终在没有 prompt/stdin 时触发 #47 的报错。

## 修复方案
- 为 Ink stdin raw mode 增加 Windows 风险终端检测,在 MSYS2/Cygwin/mintty 或显式禁用开关下跳过 raw mode,使用 cooked input fallback。
- early input 捕获在启动早期复用同类风险判断,避免 REPL 渲染前就触发 raw mode 崩溃。
- postinstall 在 Windows 上清理属于本包的 csc.ps1,让 PowerShell 回落到与 cmd.exe 一致的 csc.cmd 启动路径。
- 新增 non-interactive 判定工具,保留显式 -p/--print、--init-only、--sdk-url 的 headless 行为,但要求 stdin/stdout 都不是交互 TTY 才自动进入 non-interactive,避免 PowerShell shim 下裸 csc 被误判。

## 变更要点
- 新增 packages/@ant/ink/src/core/raw-mode-support.ts 及单元测试,覆盖普通 Windows shell、MSYS2/Cygwin/mintty 和禁用开关
- 调整 Ink App raw mode 生命周期,只在真正启用 raw mode 后写入/清理 bracketed paste、focus reporting、extended key 等终端控制序列
- 调整 component unmount/exit 清理逻辑,按 rawModeEnabledCount/rawModeActive 关闭实际启用的输入监听和 raw mode
- 调整 src/utils/earlyInput.ts,避免不安全 Windows 终端在启动阶段启用 stdin raw mode
- 调整 scripts/postinstall.cjs,立即和延迟清理 npm 生成的 csc.ps1 shim
- 调整 src/main.tsx 使用 shouldUseNonInteractiveSession,并新增对应测试覆盖 PowerShell shim 场景

## 自测
- bun test packages/@ant/ink/src/core/__tests__/raw-mode-support.test.ts src/utils/__tests__/earlyInput.test.ts src/utils/__tests__/nonInteractiveSession.test.ts
- node --check scripts/postinstall.cjs
- bun run src/entrypoints/cli.tsx --version
- bun run lint
- git diff --check

## 已知限制
- bun run typecheck 仍失败,错误来自仓库既有缺失声明/缺失模块和无关类型问题,不来自本次改动。
2026-05-14 17:07:51 +08:00
DoSun
cbc948b044 Merge branch 'feat/server-refactor'
# Conflicts:
#	build.ts
#	src/main.tsx
#	src/services/rawDump/worker.ts
2026-05-14 15:21:25 +08:00
y574444354
60856a29bc chore: bump version to 4.0.17 2026-05-13 20:17:39 +08:00
geroge
42107f7d2f
Merge pull request #64 from y574444354/feat/migrate-review-agents
【Review】feat: 将 review skill 迁移到 extract-to-disk 架构
2026-05-13 19:38:26 +08:00
kingboung
ed513c6292 merge: sync main into feat/migrate-review-agents
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 16:08:01 +08:00
DoSun
c2eb6bff90 fix: 清理 main 分支的 stub .js 文件,恢复有 .ts 源文件的命令模块 2026-05-13 10:36:04 +08:00
DoSun
3bfc695cb4 chore: 清理临时 rebase 脚本 2026-05-13 10:29:34 +08:00
DoSun
3abca0c053 merge: 合并 origin/main 到 feat/server-refactor,解决冲突并保留 server 完整实现 2026-05-13 10:27:14 +08:00
IronRookieCoder
b58fd8f782 fix: 修复子代理参数兼容问题 2026-05-12 21:24:12 +08:00
kingboung
6ea0297ecb chore: switch review skill download branch to main
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 20:51:25 +08:00
kingboung
dbaf0374fc fix: clean target directory before extracting review skills
Regenerate builtin.ts template to rm stale files from previous
version/locale before writing new ones, preventing file residue
when switching languages or upgrading skill versions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:42:27 +08:00
kingboung
33bdcb9b74 fix: restore verified commit 89c9e87c files after main merge
Restore files to match the verified commit state:
- generate-review-builtin.ts: skill-only generation, SSH clone, optimize/agent-prompts branch
- extension.ts: listBuiltinSkillNames, getClaudeConfigHomeDir approach
- lang.ts: re-extract review skills on language switch
- locales: use Skill tool prompt format

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 15:41:21 +08:00
kingboung
4c56bbe268 fix: remove agent-based review code reintroduced from main merge
Revert PR #43 agent-based code that was brought in during the main merge:
- Remove generateBuiltinAgents and all agent-related logic from generate script
- Delete src/costrict/review/agent/ directory
- Delete src/commands/security-review.ts (handled by bundled skill)
- Restore PR #64 extension.ts with getClaudeConfigHomeDir approach
- Remove REVIEW_AGENTS from builtInAgents.ts
- Keep review command (needed for MCP entry), but use CommandLocale instead of agent

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 15:32:07 +08:00
y574444354
79548c324e chore: bump version to 4.0.16 and clean up source maps in build output
- 版本号 4.0.15 → 4.0.16 (package.json + MACRO.VERSION)
- build.ts: 新增 Step 6,构建完成后清理 .map 文件(约 64MB)
  解决 npm mirror 80MB 包体积限制的同步失败问题
2026-05-12 15:22:34 +08:00
kingboung
a645f34ee5 fix: resolve merge conflicts with main, keep branch review architecture
- Remove duplicate extractBundledSkill from generated builtin.ts template
- Keep extract-to-disk extension.ts (branch version)
- Keep SSH clone URL for generate-review-builtin
- Revert .gitignore, package.json, locales to branch versions

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 15:16:17 +08:00
y574444354
73f8641033 chore: bump version to 4.0.15 and update CHANGELOG
- 版本号 4.0.14 → 4.0.15
- 更新 CHANGELOG.md 添加 4.0.14 变更记录
- markdownConfigLoader: ripgrep 失败时降级到原生文件搜索
2026-05-12 15:10:39 +08:00
kingboung
8599340c68 Merge remote-tracking branch 'origin/main' into feat/migrate-review-agents
Conflicts resolved in favor of our branch for review-related files.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 15:08:13 +08:00
kingboung
89c9e87c58 chore: switch review skill download branch to optimize/agent-prompts
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 14:57:04 +08:00
kingboung
3780b517c5 chore: switch review skill download branch to main
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 14:44:55 +08:00
y574444354
666d2ba2eb Merge branch 'main' into merge 2026-05-12 12:25:05 +08:00
y574444354
b1a6a22e5d fix: 使用 HTTPS + gh token 替代 SSH 克隆 review 仓库
将 generate-review-builtin.ts 的 CLONE_URL 从 SSH (git@github.com:)
改为 HTTPS,并通过 gh auth token 或环境变量获取认证令牌,
解决 SSH key 未配置时无法克隆私有仓库的问题。
2026-05-12 12:23:50 +08:00
y574444354
8b6bdd44d8 Revert "Merge pull request #60 from y574444354/feat/migrate-review-agents"
This reverts commit 62398b2dcc, reversing
changes made to ba39b17a7e.
2026-05-12 12:11:37 +08:00
y574444354
d59d1f590a chore: 合并社区 upstream/main 代码至 v2.4.2
合并 claude-code-best/claude-code 社区最新代码,包含:
- 配置文件更新:precheck/lint-staged/overrides 等
- 新 feature flags:EXPERIMENTAL_SEARCH_EXTRA_TOOLS、AUTOFIX_PR
- 工具系统架构更新:Tool Search、ACP 协议支持
- 文档更新:CLAUDE.md 同步架构变更
- 依赖更新:SDK 版本升级、lint-staged 加入

冲突处理策略:以 costrict 版本为主,选择性合并上游功能改进
2026-05-12 11:55:04 +08:00
kingboung
c3e19d7d2a refactor: migrate review skills from registerBundledSkill to extract-to-disk
Replace registerBundledSkill() with runtime extract-to-disk + standard
skill scanner discovery, aligning with upstream opencode PR #360 approach.

- Add extractBundledSkill() to generate script output
- Create extension.ts for runtime skill extraction to ~/.claude/skills/
- Remove reviewSkills.ts (registerBundledSkill registration)
- Update bundled/index.ts to call Extension.initializeBuiltinSkills()
- Add build:builtin-review script to package.json

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 11:49:38 +08:00
geroge
62398b2dcc
Merge pull request #60 from y574444354/feat/migrate-review-agents
feat: migrate review system to bundled skill files mechanism
2026-05-12 10:11:29 +08:00
kingboung
c431001a4a Merge remote-tracking branch 'origin/main' into feat/migrate-review-agents 2026-05-11 20:54:55 +08:00
kingboung
62efcef508 refactor: consolidate review skill registration and fix command conflicts
- Merge strict:review/strict:security-review into reviewSkills.ts (single
  file registers all four commands: /review, /security-review,
  /strict:review, /strict:security-review)
- Remove conflicting prompt commands from src/commands/ (review.ts,
  security-review.ts) so bundled skills take precedence
- Remove REVIEW_AGENTS import from builtInAgents.ts and mcp.ts
- Remove agent generation logic from generate-review-builtin.ts
- Configure allowedTools and model: 'inherit' per claudecode spec
- Switch test branch to optimize/agent-prompts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 20:52:18 +08:00
claude-code-best
89d2c80d78 chore: 2.4.2 2026-05-11 20:37:53 +08:00
林凯90331
e8dca4d3bd feat(cli): add git commit hash and build time to --version output
Include commit short hash and formatted build timestamp in the

version string, matching the output format of cs --version.

Signed-off-by: 林凯90331 <90331@sangfor.com>

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-11 20:27:22 +08:00
kingboung
a5235ab03c Merge remote-tracking branch 'origin/main' into feat/migrate-review-agents 2026-05-11 20:21:16 +08:00
kingboung
e3ba147dbe refactor: migrate review system to bundled skill files mechanism
Replace custom extension.ts initialization and agent-based routing with
csc's built-in registerBundledSkill({ files }) mechanism. Review and
security-review skills are now registered with embedded files that
get lazily extracted to disk on first invocation. Locale is resolved
at startup via getResolvedLanguage().

- Remove agent generation from generate-review-builtin.ts (skill-only)
- Remove extension.ts, REVIEW_AGENTS registration, strict:* skills
- Add reviewSkills.ts with registerReviewSkills() for unified registration
- Adapt to new costrict-review index.json format (skills-only, new paths)
- Remove src/costrict/command/locales/ (no longer needed)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 20:19:05 +08:00
claude-code-best
d587372fb5 fix: 进一步脱敏 probe-subscription-endpoints 日志中的 orgUUID
将 orgUUID 截断长度从 8 字符缩减到 4 字符,消除 CodeQL
js/clear-text-logging 对 oauthAccount 敏感数据的告警。

Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-05-10 13:14:22 +08:00