Commit Graph

1211 Commits

Author SHA1 Message Date
github-actions[bot]
f2585ae08b chore(release): bump version to 4.0.24 2026-05-15 02:40:29 +00:00
DoSun
22c5c7a1bb
Merge pull request #103 from y574444354/fix/serve
Fix/serve
2026-05-15 10:38:57 +08:00
linkai0924
5eea9bac64
Merge pull request #102 from y574444354/feat/binary-archive
fix(workflow): use raw tag name for release and drop v prefix from ar…
2026-05-15 10:36:15 +08:00
林凯90331
5758b7dcef fix(workflow): use raw tag name for release and drop v prefix from artifact
Release now uses the exact tag name (e.g., v4.0.23 or 4.0.23) instead of reconstructing it.

Artifact filenames no longer include a v prefix (e.g., csc-4.0.23-linux-x64.tar.gz).

Existing releases will have new artifacts appended instead of recreated.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-15 10:34:19 +08:00
DoSun
9f5502b4b6 fix: prevent SSE event cross-workspace leakage
- Register session cwd before publishing created event (was async void,
  causing cwd to be undefined during event dispatch)
- Fix EventBus cwd filter: skip events when sessionCwd is undefined
  instead of allowing them through unfiltered

Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
2026-05-15 10:34:06 +08: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
DoSun
e93a60264c fix: resolve session status and cross-workspace leakage issues
- Fix GET /session/status returning empty object due to missing await
  (c.json() was serializing Promise instead of resolved value)
- Add getEffectiveBusyStatus() to prioritize actual prompting state
- Supplement status responses with persisted sessions from loadedIndex
- Add strict cwd filtering to GET /session list to prevent
  sessions from appearing across multiple workspaces
- Add busy_status field to GET /session/:id response

This closes the issue where /conversations/status returns {} even
though /conversations shows running sessions, and prevents the same
session from appearing in multiple workspace requests.

Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
2026-05-15 10:34:05 +08:00
DoSun
ad7bc194b2
Merge pull request #101 from y574444354/fix/some-task
fix: resolve serve command hanging in Node.js runtime
2026-05-15 10:33:36 +08:00
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
linkai0924
96913f7ead
Merge pull request #100 from y574444354/feat/binary-archive
fix(workflow): correct download-artifact action SHA
2026-05-15 10:29:17 +08:00
林凯90331
a7bc970ece fix(workflow): correct download-artifact action SHA
Use the proper commit SHA for actions/download-artifact@v4.

The previous SHA belonged to actions/upload-artifact, causing resolution failure.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-15 10:25:04 +08:00
linkai0924
f328d69963
Merge pull request #99 from y574444354/feat/binary-archive
ci: add publish binary workflow
2026-05-15 10:20:32 +08:00
linkai0924
c207681816
Merge pull request #98 from y574444354/fix/centos-input
fix(ink): handle enter key on centos
2026-05-15 10:19:59 +08:00
林凯90331
beb268eca0 fix(ink): handle enter key on centos
Some terminals on CentOS emit 'enter' instead of 'return' for the Enter key.

Treat both names as the Return key to ensure consistent input behavior across platforms.

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

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-15 10:17:22 +08:00
林凯90331
332469c4e9 ci: add publish binary workflow
Add workflow_dispatch workflow for building and publishing cross-platform binaries.

Supports selecting branch/tag and target platform (all or specific).

Windows artifacts are zipped, Linux/macOS are tar.gz.

When triggered by a tag, artifacts are attached to the GitHub Release.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-15 10:08:27 +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
IronRookieCoder
7512672684
Merge branch 'y574444354:main' into main 2026-05-14 19:11:06 +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
IronRookieCoder
b528d378db feat(config): add showMemoryPid setting to toggle footer memory/PID display
## 实现要点
新增全局配置项 showMemoryPid,允许用户通过 /config 面板关闭底部状态栏的内存值和 PID 显示(默认开启,行为不变)。

## 变更要点
- src/utils/config.ts:新增 showMemoryPid?: boolean 类型声明 + GLOBAL_CONFIG_KEYS 注册
- src/components/PromptInput/PromptInputFooterLeftSide.tsx:新增 isMemoryPidEnabled() 函数,RSS/PID 渲染受配置控制
- src/components/Settings/Config.tsx:/config UI 面板注册配置项,含 logEvent 埋点
- packages/builtin-tools/src/tools/ConfigTool/supportedSettings.ts:SUPPORTED_SETTINGS 注册
2026-05-14 17:41:13 +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
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
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