Commit Graph

1088 Commits

Author SHA1 Message Date
DoSun
f21aa406db fix: resolve serve command hanging in Node.js runtime
- Add Bun.serve polyfill using Node.js http.createServer to bridge Hono fetch handler
- Add Bun.semver polyfill delegating to npm semver package
- Add Bun.version and Bun.env stubs
- Fix childSpawn.ts to only pass -d/--feature flags for .ts/.tsx source files
- Make serve() async to correctly resolve port when --port 0 (random allocation)
2026-05-15 10:31:59 +08:00
github-actions[bot]
34903c97e8 chore(release): bump version to 4.0.23 2026-05-14 13:40:24 +00:00
linkai0924
19a6ed1c1d
Merge pull request #97 from y574444354/fix/compile-issue-0514-2
ci(publish-npm): pin bun version, add vite build, and ignore scripts
2026-05-14 21:39:28 +08:00
林凯90331
1e10473fb7 ci(publish-npm): pin bun version, add vite build, and ignore scripts on publish
Pin bun to 1.3.11 for reproducible builds. Add explicit vite build step before publishing. Add --ignore-scripts to npm publish for security.

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

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 21:37:15 +08:00
github-actions[bot]
49808bb967 chore(release): bump version to 4.0.22 2026-05-14 12:54:58 +00:00
linkai0924
4703b608a8
Merge pull request #96 from y574444354/fix/compile-issue-0514
fix(utils): replace using syntax with withDisposable for node v20 compatibility
2026-05-14 20:51:55 +08: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
DoSun
0fb2ea4af5 fix: 修正 listBuiltinSkills 导入名称
Co-Authored-By: Auto <noreply@anthropic.com>
2026-05-14 20:05:48 +08:00
DoSun
f5d6814a01 feat: 恢复 cloud 子命令注册
从 feat/server-refactor 分支还原 cloud 命令的 CLI 注册逻辑,
动态导入 cloudHandler 并透传所有参数给 cs-cloud 二进制。

Co-Authored-By: Auto <noreply@anthropic.com>
2026-05-14 19:59:02 +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
DoSun
62de2ddc20
Merge pull request #95 from y574444354/feat/server-refactor
Feat/server refactor
2026-05-14 19:14:34 +08:00
linkai0924
1c22fe8d2a
Merge pull request #94 from y574444354/feat/server-refactor-90331-2
feat(favorite): optimize list caching and expand MCP type support
2026-05-14 19:09:36 +08:00
林凯90331
fd36738e9e feat(favorite): optimize list caching and expand MCP type support
Add 30s in-memory cache for favorite item list to reduce API calls

Expand supported MCP server types beyond local/remote to stdio/sse/ws/sdk and more

Change single MCP server conversion to use stdio type with separate command/args/env fields

Reduce page size from 100 to 20 for faster initial load

Switch parallel remote fetching to sequential to avoid rate limiting

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

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 18:56:44 +08:00
linkai0924
8b4d990489
Merge pull request #93 from y574444354/feat/workflow
ci(publish-npm): add debug output and fault tolerance to version bump…
2026-05-14 18:38:42 +08:00
林凯90331
6a55dcb38e ci(publish-npm): add debug output and fault tolerance to version bump step
Add git status and git diff for debugging visibility during release.

Change git add to -A and append || true to commit/push to prevent workflow failures when there are no changes or push issues.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 18:36:52 +08:00
linkai0924
a41232d294
Merge pull request #92 from y574444354/feat/workflow
fix(ci): recreate tag if it points to old commit
2026-05-14 18:18:08 +08:00
林凯90331
ca59e79568 fix(ci): recreate tag if it points to old commit
Add verification output after syncing package.json and defines.ts

so the logs clearly show whether the version bump succeeded.

Also replace 'Create tag if missing' with 'Create or recreate tag'

that deletes and recreates the tag when it points to a stale commit,

preventing checkout of outdated code from previous failed runs.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 18:12:31 +08:00
github-actions[bot]
04aa2dc662 chore(release): bump version to 4.0.20 2026-05-14 09:37:36 +00:00
linkai0924
390540dd78
Merge pull request #90 from y574444354/feat/workflow
fix(ci): correct boolean condition for workflow dispatch inputs
2026-05-14 17:33:53 +08:00
林凯90331
59269f381d fix(ci): correct boolean condition for workflow dispatch inputs
GitHub Actions workflow_dispatch boolean inputs are strings in

expressions ('true'/'false'). Non-empty strings are always truthy,

so !inputs.dry_run always evaluated to false. Use explicit string

comparison to fix version sync and publish step gating.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 17:25:05 +08:00
linkai0924
e8349395ed
Merge pull request #88 from y574444354/feat/workflow
ci: add manual npm publish workflow with dry-run and auto version sync
2026-05-14 17:18:38 +08:00
林凯90331
5890d776dd ci(publish-npm): add ssh setup and review builtin generation
Add SSH agent setup before build so generate-review-builtin.ts

can clone the private costrict-review repo. Also run the

generator explicitly with continue-on-error to ensure the

bundled review skills file exists before Bun.build.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 17:13:30 +08:00
DoSun
481e6fc3c9 Merge remote-tracking branch 'origin/feat/server-refactor' into fix/serve-command-real-impl 2026-05-14 17:07:50 +08:00
林凯90331
86c68723a4 ci(publish-npm): drop v prefix from tags and skip tests
Use the exact input version for git tags without adding a v prefix.

Also comment out typecheck and test steps to speed up the publish flow.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 17:07:16 +08:00
DoSun
025a4c8b34
Merge pull request #87 from Askhz/fix/serve-feature-flag-crash
fix: 编译后二进制 serve 子进程 crash 报 unknown option --feature
2026-05-14 17:05:29 +08:00
Askhz
4b7922d59b fix: 更新凭证路径注释为 ~/.costrict/share/auth.json
Co-Authored-By: CoStrict-DeepSeek-V4-Pro <deepseek-ai@claude-code-best.win>
2026-05-14 17:03:12 +08:00
Askhz
195c23dbb2 fix: 编译后二进制 serve 子进程 crash 报 unknown option --feature
getScriptArgsForChild() 无法正确识别编译后的二进制:argv[1] 仍为原始入口
路径(如 src/entrypoints/cli.tsx),被误判为脚本模式,导致 saveChildSpawnPrefix()
生成 --feature Bun 专有参数传给子进程,子进程不识别直接 crash。

修复:在所有判断之前增加 execPath basename 检查,非 bun/node 的可执行文件
直接视为编译二进制,返回空数组。

Co-Authored-By: CoStrict-DeepSeek-V4-Pro <deepseek-ai@claude-code-best.win>
2026-05-14 17:00:43 +08:00
林凯90331
a23ebc0303 ci(publish-npm): restrict to manual trigger and auto-sync version
Remove push tag trigger so the workflow only runs on manual dispatch.

Add steps to automatically sync package.json and scripts/defines.ts

version before publishing, create the git tag, and skip typecheck.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 16:57:09 +08:00
林凯90331
de53813db3 ci(publish-npm): auto-create missing tag on manual dispatch
When triggering the publish workflow manually with a version that does

not yet have a corresponding git tag, automatically create and push

the v-prefixed tag on the current HEAD instead of failing.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 16:37:35 +08:00
林凯90331
5de3460884 ci(publish-npm): add dry-run support and normalize version input
Add optional dry-run flag to workflow dispatch for validating publishes

without uploading to the registry.

Support version inputs with or without the v prefix by resolving

the correct git ref automatically. Skip changelog generation and

GitHub release creation when running in dry-run mode.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 16:33:03 +08:00
xixingde
5a306c3ea7 feat(auth): update OAuth flow message to reference Costrict branding 2026-05-14 16:28:24 +08:00
xixingde
25ea4a0cf3 feat(auth): add remote API control config to gate third-party providers 2026-05-14 16:03:04 +08:00
DoSun
b11826c21c fix: 替换 main 分支的假 server 命令为真实 serve 实现
- 移除 DangerousBackend、lockfile、createServerLogger 等不存在的 import
- 使用 EventBus + SessionManager + startServer 真实实现
- 添加 serve 子命令作为 server 的别名
- 默认 host 改为 127.0.0.1,idle-timeout 改为 1800000ms
- 启动 probe session 并正确处理 SIGINT/SIGTERM 关闭
2026-05-14 15:36:27 +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
DoSun
fd509086f3 fix: serve 模式下权限事件被 shouldAvoidPermissionPrompts 吞没导致直接拒绝
- 当 --permission-prompt-tool 指定时不设置 shouldAvoidPermissionPrompts,允许 can_use_tool 控制消息正常发出
- serve 默认权限模式从 acceptEdits 改为 default,确保权限检查链路完整
2026-05-14 15:04:17 +08:00
geroge
a1dca02b55
Merge pull request #81 from y574444354/fix/raw-dump
feat(rawDump): add raw dump reporting module with local mode and deduplication
2026-05-14 11:34:01 +08:00
林凯90331
dc82486456 feat(rawDump): enable raw dump by default
Change isEnabled() logic so raw dump is on by default unless
explicitly disabled via CSC_DISABLE_RAW_DUMP=1 or
COSTRICT_DISABLE_RAW_DUMP=1.

Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 11:22:38 +08:00
林凯90331
12caa6706b perf(rawDump): reduce CPU usage and fix worker spawn reliability
Add session messages and repo info caching to avoid repeated JSONL
parsing and git subprocess spawning across tasks.

Share state across all tasks in a single batch to minimize file lock
contention and JSON parse overhead.

Convert queue operations from sync to async to prevent event loop
blocking in the main process.

Restore inline batch worker fallback when external spawn fails,
and increase worker interval from 30s to 2min to reduce CPU impact.

Add 5s debounce per session+messageID to prevent duplicate enqueues.

Improve binary mode spawn reliability by falling back to node runtime
when bun is not available.

Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 11:07:02 +08:00
林凯90331
e24ed3b63d feat(rawDump): add raw dump reporting module with local mode and deduplication
Implement the raw dump data reporting module for uploading conversation,
summary, and commit data to the CoStrict endpoint.

Key features:
- Local dump mode for debugging without network
- PID-based file locking to prevent state corruption with multiple csc instances
- 5-minute deduplication window for summary uploads
- Auto-detect sender (user/agent) and conditional user_input
- Repository fields (repo_addr, repo_branch, work_dir) in conversation
- Anonymous interface fallback when auth fails
- Filter commits to current user and limit fetch range
- Skip empty intermediate conversation turns
- Fix worker spawning for build and binary modes
- Remove git diff HEAD fallback to avoid unrelated working tree changes

Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-13 23:49:20 +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
geroge
d3d0dd25d2
Merge pull request #80 from IronRookieCoder/fix/issues-31-32
fix: 修复任务列表数字ID乱序和内存轮询导致滚动跳动
2026-05-13 19:37:25 +08:00
geroge
d8a19f1473
Merge pull request #79 from IronRookieCoder/personal-ironrookiecoder-fix-issue-42-43
fix: merge sub-agent readFileState to prevent cross-agent write confl…
2026-05-13 19:37:09 +08:00
geroge
e570eee02a
Merge pull request #78 from IronRookieCoder/fix/issue-28-costrict-provider
fix: 修复 CoStrict provider 提前停止与 token override 问题
2026-05-13 19:36:34 +08:00
geroge
3cf17ad756
Merge pull request #74 from IronRookieCoder/fix/sdd-design-invalid-tool-params
Fix/sdd design invalid tool params
2026-05-13 19:33:47 +08:00
DoSun
7c2d9654f4 fix: pre-commit hook 改用 bunx 替代 npx 避免 npm arborist 兼容问题 2026-05-13 17:56:18 +08:00
DoSun
8505fce51a feat: 会话满时 LRU 驱逐空闲会话,cloud 命令透传参数 2026-05-13 17:56:18 +08:00
DoSun
40a243a94e
Merge pull request #77 from Askhz/fix/commands-dedup-and-filter
fix: 修复 /agents/commands 接口 duplicate command name 和返回多余 TUI 命令
2026-05-13 16:57:08 +08:00
IronRookieCoder
5ee2d6dcc3 fix: 修复任务列表数字ID乱序和内存轮询导致滚动跳动
两个修复:

1. 任务列表数字ID乱序(#32):新增 compareTaskIds 比较函数,纯数字ID按
   数值大小排序(1, 2, 3, 10 而非 1, 10, 2, 3),非纯数字回退到
   localeCompare 自然排序。listTasks 和 taskStateMessage 两处排序入口
   均已修复。

2. 终端 RSS 内存轮询引发滚动跳动(#31):useRssDisplay hook 新增 isLoading
   参数,仅在加载中启用定时轮询,闲时仅渲染一次内存占用值,避免 Ink 重渲染
   干扰用户滚动查看结果。

附:TaskCreateTool.isConcurrencySafe 改为 false,防止并发任务创建的文件
IO 竞态。

Co-Authored-By: CoStrict-DeepSeek-V4-Pro <deepseek-ai@claude-code-best.win>
2026-05-13 16:44:13 +08:00