Commit Graph

1111 Commits

Author SHA1 Message Date
kingboung
08ad8a55da refactor: strict review variants load skill via Skill tool
Remove embedded files, use Skill tool to load review/security-review
skill instead, matching the same mechanism as /review.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:38:56 +08:00
kingboung
909e001100 feat: register /strict:review and /strict:security-review via registerBundledSkill
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:31:24 +08:00
kingboung
5b4d0c2ac1 fix: use process.cwd() for generate-review-builtin cwd on Windows
URL pathname returns /E:/... on Windows which spawnSync can't resolve.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:20:27 +08:00
kingboung
c374cab5ed fix: remove registerBundledSkill for strict review variants
All review commands now exclusively use extract-to-disk + skill scanner,
no registerBundledSkill duplication.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:16:09 +08:00
geroge
00887762a2
Merge pull request #68 from IronRookieCoder/feat/proxy-ca-improvements
feat: 添加代理和 CA 证书功能改进及测试
2026-05-12 17:15:25 +08:00
geroge
fbae6383fd
Merge pull request #69 from y574444354/test-pattern-with-root
test: add unit tests for patternWithRoot with Windows path improvements
2026-05-12 17:14:59 +08:00
geroge
021ce31f31
Merge pull request #67 from y574444354/fix/tab-protection-measured-text
fix: protect tabs from wrap-ansi expansion in MeasuredText
2026-05-12 17:11:00 +08:00
unknown_
24e62eb6f3 test: add unit tests for patternWithRoot with Windows path improvements 2026-05-12 17:07:46 +08:00
kingboung
ca5114dfcf fix: remove duplicate review skill registration
Remove registerBundledSkill for /review and /security-review since
extract-to-disk + skill scanner already registers them. Only register
/strict:review and /strict:security-review via bundled skill.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:03:38 +08:00
kingboung
09bbfb77e1 fix: allow model to invoke Skill tool for review commands
Set disableModelInvocation to false so the model can use the Skill tool
to load review/security-review skills as instructed by locale templates.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:01:12 +08:00
DoSun
d29801aad2 fix(server): resolve rebase conflicts and align tests with new architecture 2026-05-12 16:56:56 +08:00
kingboung
7565ad59a4 refactor: use inline mode for all review commands
Remove context:'fork' from strict variants, all four commands now
execute inline in the main session.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:55:48 +08:00
kingboung
7425b59826 feat: register /review and /security-review via registerBundledSkill
Replace indirect Skill-tool-based routing with direct bundled skill
registration using SKILL_FILES, matching /strict:review approach.

- reviewSkills.ts registers all four commands (review, security-review,
  strict:review, strict:security-review) with embedded files
- Remove review command from commands.ts (now bundled skill)
- Simplify review.ts to only export ultrareview
- Update mcp.ts to get review command from bundled skills

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:52:43 +08:00
DoSun
edb72b447b fix(server): return latest N messages instead of first N in messages endpoint 2026-05-12 16:50:09 +08:00
DoSun
86fac2bd75 feat(server): support deleting non-resident sessions with disk cleanup 2026-05-12 16:50:09 +08:00
IronRookieCoder
c473fef8d8 refactor: 将 undici 移至运行时依赖
undici 仍被代理和 mTLS 逻辑按需 require,因此需要保留为运行时依赖。
2026-05-12 16:49:28 +08:00
DoSun
1a440af30b feat: 对齐 OpenCode 即时推送架构,session status 事件绕过队列直接推送
- sessionState.ts: 单 listener → Set 多订阅者,新增 registerSdkEventConsumer 绕过 SDK 事件队列
- sdkEventQueue.ts: SessionStateChangedEvent 从队列系统移除
- print.ts: runHeadlessStreaming 注册直接消费者,事件即时 output.enqueue()
- query.ts: queryLoop 每轮迭代发送 running 心跳
- server/routes/session.ts: prompt_async 立即 emit busy(不等子进程 init),历史会话先解析 body 再恢复
- server/sessionHandle.ts: prompt() 检测已 busy 时跳过重复 emit
- server/eventBus.ts: 添加 SSE publish 耗时日志
- server/server.ts: 传递 eventBus 给 sessionRoutes
- 新增 16 个 sessionState 多订阅者 + SDK consumer 测试
2026-05-12 16:49:26 +08:00
DoSun
5890d16b3a feat(server): emit session.updated on title generation with fallback 2026-05-12 16:49:05 +08:00
DoSun
58b4b5e354 fix(server): include created_at in session.created SSE event
The session.created event only had session_id and status, causing
downstream adapters to produce empty time objects and new sessions
landing in the 'older' group.
2026-05-12 16:49:05 +08:00
DoSun
922bcf7660 fix(server): accept client messageID to enable optimistic message dedup 2026-05-12 16:48:59 +08:00
kingboung
d96f74a3fc chore: update bun.lock
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:39:37 +08:00
kingboung
6c909321ed feat: register /strict:review and /strict:security-review commands
Add strictReview.ts to register strict review variants as bundled skills
with context:'fork' (sub-agent mode), using SKILL_FILES and CommandLocale.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:38:24 +08:00
林凯90331
6e8d54da6c feat(server): support reading subagent transcripts
Add fallback in readSessionMessages() to locate subagent transcript files under <project>/<session>/subagents/agent-<id>.jsonl when the sessionId is actually an agentId. Extract entryToSessionMessage and readMessagesFromLines helpers for reuse between main and subagent transcripts.

Also route 'system' messages through the 'message' event in sessionMessageRouter so subscribers can observe them.

Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-12 16:30:45 +08:00
IronRookieCoder
b39887b2d3 feat: 添加代理和 CA 证书功能改进及测试
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:24:02 +08:00
kingboung
5ecc8277b8 fix: restore package.json, bun.lock and .gitignore from verified commit
Restore to match commit 89c9e87c:
- Add back build:builtin-review script
- Remove undici from devDependencies
- Restore prepare script to .githooks
- Revert .gitignore upstream additions

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:15:26 +08:00
unknown_
ade163561b fix: protect tabs from wrap-ansi expansion in MeasuredText 2026-05-12 16:05:08 +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
18c87ff058 chore: remove duplicate undici dependency
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 14:55:25 +08:00
kingboung
58518f4b9b feat: re-extract review skills on language switch
When /lang is used to switch language, immediately re-extract review
skills for the new locale and refresh skill caches so changes take
effect without restart.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 14:52:39 +08:00
DoSun
d18a2af37d
Merge pull request #65 from Askhz/fix/server-agent-switch
fix(server): 支持按 prompt 动态切换 agent
2026-05-12 14:50:52 +08:00
kingboung
194baf5324 chore: remove docs/superpowers directory
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 14:48:15 +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
costrict
b6c353977d fix(server): 支持按 prompt 动态切换 agent
- sessionHandle 添加 --agent spawn 参数和 setAgent() 控制请求
- prompt/prompt_async 路由提取 body.agent 并调用 setAgent
- print.ts 添加 set_agent 控制请求处理
- controlSchemas 添加 SDKControlSetAgentRequestSchema

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 14:42:42 +08:00
y574444354
cb38087940 merge: 合并 merge 分支(社区 upstream v2.4.2 同步及大量功能增强)
包含:
- 社区 upstream 代码同步至 v2.4.2
- 内存优化与泄漏修复
- Tool Search 基础设施
- Agent/Team 功能增强
- Remote Control 条件工具注入
- 大量测试修复与性能优化
2026-05-12 14:07:32 +08:00
y574444354
d3100178e3 fix: 修复 betas 导入名称不匹配
TOOL_SEARCH_BETA_HEADER_* → SEARCH_EXTRA_TOOLS_BETA_HEADER_*
与 src/constants/betas.ts 的导出名称保持一致
2026-05-12 12:34:38 +08:00
y574444354
c2f831c4bf chore: remove npm auth token from .npmrc 2026-05-12 12:27:11 +08:00
y574444354
666d2ba2eb Merge branch 'main' into merge 2026-05-12 12:25:05 +08:00
y574444354
7b2b5871ed 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
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
4fce66348c 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
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
37f53440f3 Merge remote-tracking branch 'origin/main' into feat/migrate-review-agents 2026-05-12 11:49:50 +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