| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
refactor(log): extract cjlog as independent async logging package - New package cjlog (libs/cjlog/): async queue + background flush, designed after g3log. Business threads enqueue (non-blocking), spawned coroutine drains queue and batch-writes files. - Dual-file routing: error.log (ERROR/FATAL only, focused diagnosis) + cjh.log (all levels, full context). ERROR/FATAL written to both. - Configurable level via CJH_LOG_LEVEL (default WARN). FATAL > ERROR > WARN > INFO > DEBUG. - cjutil: removed logger.cj (Log moved to cjlog). - cjllm/cjpm.toml: added cjlog dependency. - All callers updated: import cjlog.*, use cjlog.Log. - Package independence principle: cjlog has zero business deps, reusable and contributable to Cangjie ecosystem. Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
docs: add per-engine key rotation to web_search design Borrowed from ModSearch: give Tavily/Exa multiple comma-separated keys. On 401/429/quota exhaustion, rotate to the next key before the engine chain falls back. Two-layer degradation: 1. In-engine key rotation: single key fails -> next key (same engine) 2. Engine chain fallback: all keys exhausted -> next engine -> DDG Changes: - Add KeyRotator class (csv parse, current(), rotate(), isExhausted()) - TavilyProvider now uses KeyRotator instead of single apiKey - Router comment clarifies provider-internal key rotation - Config: tavily_api_key -> tavily_api_keys (csv), same for exa - Env vars: TAVILY_API_KEYS / EXA_API_KEYS (csv) - Backward compat note for single-key migration Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
feat(web): Step 1 HTTP server skeleton + Step 2 WS scaffolding Step 1 (HTTP server, verified working): - CjhConfig: webEnabled/webPort/webBindAddr/webAuthToken/webMaxRequestSize fields + loadSettings parses 'web' section - src/web/server.cj: WebServer + WebDistributor<:HttpRequestDistributor + WebHandler (UnifiedHandler pattern) - src/web/static_assets.cj: frontend HTML/CSS/JS embedded as Cangjie string constants (#"""...""# multiline raw strings) - src/main.cj: 'cjh web [--port N] [--bind ADDR] [--token T]' subcommand + runWeb() constructs provider/registry/ToolRegistry - Verified: GET / returns index.html, GET /api/health returns JSON, GET /assets/app.js + styles.css serve correctly Step 2 (WebSocket scaffolding, blocked on /ws 404): - src/web/protocol.cj: WsMsgType enum + ChatRequest/DeltaEvent/ ToolStartEvent/ToolResultEvent/DoneEvent/ErrorEvent/TasksUpdateEvent - src/web/ws_handler.cj: WsHandler<:HttpRequestHandler with WebSocket.upgradeFromServer + messageLoop + Agent callback→WS push - src/web/session_mgr.cj: WebSessionManager (WS connection→Agent instance mapping, createSession/resumeSession/destroySession) - Frontend appJs in static_assets.cj already has WebSocket connection management (connectWebSocket/sendMessage/handleServerMessage) Blocker: /ws endpoint returns 404. WebDistributor.distribute never called by stdx.net.http framework (eprintln debug logs never appear). Tried override/public/both register overloads, compared against wv-sdk StaticDistributor (identical pattern). Cannot resolve without working Cangjie WebSocket example or alternative dispatch approach. Design doc: docs/Web支持实现方案.md (516 lines, Steps 1-5 + security model + future extensions) Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
feat(tui): starfrost theme system + /theme switch command Theme architecture (runtime switchable, no hardcoded colors): - New Theme singleton (libs/cjterm/src/theme.cj): Palette class holds all theme colors as var fields, apply(name) writes back Ansi.THEME_* static vars, 2 inbuilt themes (starfrost|classic) - Ansi.THEME_* changed from static let to static var, initial value = starfrost starfrost-qing palette - CjhConfig.theme field reads from settings.json 'theme' key, saveTheme() persists via read-modify-write - 4 entry points call Theme.apply(cjhCfg.theme) at startup - /theme [name] slash command: switch + list + persist to settings.json, added to SLASH_COMMANDS and /help Starfrost palette (default, HarmonyOS ecosystem brand color): - THEME_ACCENT 73 (starfrost-qing, low-saturation matte cyan-green) - THEME_OK 108 (low-sat sage green), THEME_ERR 167 (warm red) - THEME_WARN/HIGHLIGHT 179 (light amber gold) - THEME_MUTED 245 (neutral gray), THEME_INFO 103 (pale gray-blue) - COLOR_TEXT 254 (off-white), COLOR_BG 235 (deep charcoal gray) Classic palette (backward compat, old high-saturation bright cyan): - THEME_ACCENT 51, THEME_OK 82, THEME_ERR 196, THEME_WARN 226 All hardcoded COLOR_* (COLOR_GRAY/COLOR_CYAN/COLOR_YELLOW/etc) across 9 files replaced with THEME_* constants for theme switchability. StatusBar border uses THEME_WARN (amber gold). Design doc: docs/cjh-TUI主题设计方案.md (full palette rationale, WCAG accessibility, cross-terminal consistency, HarmonyOS brand alignment). Real LLM end-to-end test passed. Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
docs: document the built-in Cangjie knowledge layer - README / README.en: add a "Built-in Cangjie Knowledge Layer" section covering the runtime corpus, the offline cangjie_ref retrieval tool, the human-triggered refresh chain, and usage of both cjh ref ... and the TUI /ref panel - feature list: add the cangjie_ref tool row, refresh the header version, add the v1.4.0 / v1.5.0 version-history rows, update gate counts Co-Authored-By: AtomCode (deepseek-v4-flash-vision-exp) <noreply@atomgit.com> | 20 天前 | |
docs(readme): refresh project self-description to v1.3.27 The Chinese README was stamped at v1.3.15/v1.3.26 and the English one at v1.3.13, and several hard numbers had drifted. - README.md: version-history row for v1.3.27; test counts 325 -> 379 and PTY 15 scenarios (49 assertions) -> 61; feature-checklist pointer stamped "up to v1.3.27" and built-in tools 13+ -> 14 (the 14th being WebFetch); thinking bullet rewritten for the anchor-weaving semantics, the two-space indent and the incremental-folding numbers; roadmap: V3 trust chain Step 3 moves from In Progress to Completed (cjh trust/untrust/ trust-list ships in v1.3.14) - README.en.md: brought to parity - engineering-quality and testing rows, a thinking bullet that was missing entirely, test-domain tables now mention thinking weaving and token k formatting, and version-history rows for v1.3.14 .. v1.3.27 added (the table stopped at v1.3.13) - AGENTS.md: gate counts 238+ -> 379+, PTY 14 -> 61 scenarios, plus the reminder that library-package tests need cd libs/<lib> && cjpm test - docs/cjh项目介绍.md: 238 unit tests + 36 PTY -> 379 (+93 cjterm) + 61 - docs/进度记录.md: overview line now states the current version (v1.3.27) before the accumulated v1.3.26 baseline Docs only - no code touched, so no gate run; last full gate (after the v1.3.27 code changes) was 379/379 + cjterm 93/93 + PTY 61/61 + build + --mock. Co-Authored-By: AtomCode (deepseek-v4-flash-vision-exp) <noreply@atomgit.com> | 20 天前 | |
feat(tui): input queue (plan B) + Tasks panel + TodoWriteTool - Input queue plan B: Agent execution time input box still editable, submit enqueue + hint 'queued, will be sent after current task', auto dequeue next on completion - Tasks panel data layer: TodoItem/TodoStatus + Agent task management methods + onTodosChanged callback - Tasks panel UI: TasksPanel component (libs/cjterm/src/taskspanel.cj), Claude Code style rendering - TodoWriteTool: LLM tool to manage task list (add/doing/done/update/ clear/list), high cohesion low coupling - callback injection to avoid cjh.tools <-> cjh.agent circular dependency - /task command: manual task list operation (add/done/doing/clear/list) - UI copy: 'Agent made by Cangjie' -> 'Harness made by Cangjie' - Design doc: add code organization principle (high cohesion low coupling, six software design principles, one-way dependency + callback injection to resolve circular deps) - Progress record: add milestone #41 Real LLM end-to-end test passed (DeepSeek via taotoken, deepseek-v4-flash): LLM successfully called todo_write tool - add x3 + doing x1 + list x1. Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
docs: add unit-test principle and track two new docs - 方案与架构设计-v2.md: add '单元测试' as principle #8 (every feature gets sufficient unit tests to guarantee quality) - Track two new reference docs: pi agent的核心卖点.md, 仓颉资源地址.md Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
test(tools): harden glob/edit/task/ast_grep edge cases + docs - glob: normalizePath handles ./ prefix and trailing /; makeRelative handles absolute fi.path; truncation hint when >200 matches - edit: buildNoMatchError diagnostic (exact match vs whitespace vs not-found); atomic write via tmp file + mv; better error messages - task: validate subagent_type (explore/worker); reject empty description/prompt - ast_grep: validate lang against supported list; clearer fallback message with install hint - docs/tools-guide.md: full usage guide for all 4 ported tools - README.md: update tool table with glob/edit/task/ast_grep Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
docs: add web_search + web_fetch tool design document Design two powerful built-in tools to enhance cjh's web capabilities: web_search (information retrieval - 'I don't know where to find'): - SearchProvider interface + multi-backend router with Auto fallback - TavilyProvider (main, 1000 req/month free, no card) - ExaProvider (semantic search, 0+0/month free) - SearXNGProvider (self-hosted zero-cost, aggregates 70+ backends) - DDGProvider (zero-key bottom fallback, always enabled) - snippet truncated to 500 chars, default 5 results (max 10) web_fetch (information acquisition - 'I know where, help me read'): - Three-tier degradation chain: 1. Cangjie stdx.net.http GET (~50% sites) 2. exec curl with browser headers (~70% sites) 3. Firecrawl API (~96% sites, keyless 1000 credits/month) - SSRF protection: protocol whitelist + IP segment interception + redirect re-validation (block 169.254.169.254 cloud metadata) - HTML cleaning → Markdown (h1-h6/p/ul/ol/pre/code/a/table) - Truncate to ~32KB (~8K token), hard download limit 5MB Both tools align with two hard metrics: - Token efficiency: snippet truncation, HTML cleaning, session-level fetch/search budget to prevent prompt injection burning tokens - Execution speed: three-tier degradation chain lifts fetch success rate from ~50% to ~96% Also include reference materials (docs/web_search资料.md) researched from omp, AtomCode, ModSearch, Firecrawl, Tavily, Exa, DDG. Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
docs: reword ecosystem contribution doc header and summary table 导语与总览表头改用中性的"贡献类别"表述,去掉原框架性措辞, 仅保留可复用贡献的客观分类,文档其余内容不变。 Co-Authored-By: AtomCode (qwen3.8-27b) <noreply@atomgit.com> | 26 天前 | |
docs: Cangjie language pitfall notes (practitioner edition) Distill 28 rounds of development + 300+ unit tests of real, fixed bugs into a standalone reference: string/UTF-8 (byte semantics, boundary slicing, append(Byte), mojibake), syntax (lambda capture, no default/named args, overflow checks), exception & concurrency (spawn silent death, naked Mutex.lock leak -> stop path, socket connect no timeout, busy-loop pseudo-sleep, zombie reaping), stdlib API (Directory.walk, fs non-idempotency, conditional compilation, test framework quirks), toolchain (static-link test crash, no cjpm add, per-lib tests), plus a cross-cutting troubleshooting playbook and a 26-item quick-reference checklist. Co-Authored-By: AtomCode (qwen3.8-27b) <noreply@atomgit.com> | 26 天前 | |
docs: add unit-test principle and track two new docs - 方案与架构设计-v2.md: add '单元测试' as principle #8 (every feature gets sufficient unit tests to guarantee quality) - Track two new reference docs: pi agent的核心卖点.md, 仓颉资源地址.md Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
docs: sync P2/P2b progress + round-27 record + v1.3.13 release notes - 优化提速方案: P2 OutputView line cache -> done (f4f4422), status P0-P2b all done, P3 next; border now theme-filled per theme (244 fallback only) - 进度记录: round-27 entry (P2 lineCache + P2b visual polish + themed borders + v1.3.13 dist); P0 find-enumeration backfill note; next = P3 connection pool - 踩坑记录: §3.19 theme field wired-but-unfilled + full-line bg card rules (no mid-card reset, padBg cols-1, sync assertions on intentional style change) - README: v1.3.13 + v1.3.12 history rows Co-Authored-By: AtomCode (qwen3.8-27b) <noreply@atomgit.com> | 26 天前 | |
feat: P1-3 持久 bash 会话(BashSession,跨命令保留 cwd/env) BashTool 默认走持久 bash 会话:单进程跨命令保留 cwd/env, 多步构建/测试不再反复重设环境(对齐 omp brush shell)。 实现(异步线程 + 超时 kill,绕开 std.io 阻塞读无超时): - 读线程阻塞读 stdout 管道直到完成标记,结果写共享状态(Mutex) - 主线程轮询完成标志,超时用真实时间(DateTime 差值—— sleep 在负载高时实际远超 50ms,逻辑计数会严重滞后,实测 1s 超时 拖到 10s)→ terminate(force) 杀会话,读线程随 EOF 自然结束 - 命令 exit N 直接退出会话进程 → EOF 路径 wait(timeout) 取退出码 - 大括号 { cmd; } 当前 shell 执行(括号会建子 shell 丢 cd/export); 2>&1 合并 stderr;stdInPipe.write 后必须 flush(否则 bash 收不到命令) - Mutex 串行化(V2d 并发下 bash 逐个执行) 测试:BashSessionTest 6 用例(cwd/env 持久、输出+退出码、exit 3、 超时杀会话重建、多步流程、BashTool 会话路径);既有 BashToolTest 改非会话路径(保持 stderr 分离语义)。总 228 全绿。 | 1 个月前 | |
feat(web): v1.3.0 Web support Step 1-5 + CangjieSkills project skill Step 1: HTTP server skeleton - WebServer: ServerBuilder chain (addr/port/distributor/maxRequestBodySize) - WebDistributor <: HttpRequestDistributor (distribute + 2 register overloads) - WebHandler <: HttpRequestHandler (static assets + /api/health + 404) - Static assets embedded (indexHtml/appJs/stylesCss), 6 themes + responsive Step 2: WebSocket streaming chat - WsHandler: WebSocket.upgradeFromServer(ctx) HTTP->WS upgrade - Message protocol (ChatRequest/ChatDelta/ChatDone/ChatError JSON frames) - SessionStore: persist ~/.cjh/sessions/s<timestamp>.jsonl - Frontend appJs WebSocket connection management Step 3: REST API - RestApi <: HttpRequestHandler: /api/health, /api/sessions, /api/models, /api/tasks - Unknown route -> 404 JSON Step 4: Frontend Markdown rendering + code block copy button - CDN: marked.js (Markdown) + DOMPurify (XSS) + highlight.js (code highlight) - renderMarkdown(text): marked + DOMPurify, offline fallback to escapeHtml - enhanceCodeBlocks(container): inject copy button into <pre><code> - Copy button CSS: absolute top-right, hover opacity 1 Step 5 (optional): auth_token middleware + startup security audit log - Auth.check(ctx, config): validate Authorization: Bearer <token>, 401 on fail - WebSocket fallback: extract token from ?token= query param - SecurityAudit.logStartup(config): print bind addr + access scope + auth status - TLS skipped: ServerBuilder.tlsConfig API unconfirmed (#9 optional) CangjieSkills project-level skill installation - git clone atomgit.com/Cangjie-SIG/CangjieSkills -> build.py -> knowledge.sqlite3 (8.9MB) - Installed to .atomcode/skills/cangjie-coding/ (atomcode auto-loads on cjh project entry) - Does not pollute main repo (.atomcode/ already in .gitignore) - Verified: search_docs.py --query 'HttpRequestDistributor' / 'ServerBuilder' returns API contracts Version bump v1.2.3 -> v1.3.0 (major feature, increment middle digit per cjh version rule) - cjpm.toml version - libs/cjterm/src/logo.cj Logo.VERSION + title bar comments (2 places) - health.put version in server.cj + rest_api.cj - docs/进度记录.md + docs/cjh功能清单.md + docs/大文件写入截断问题解决方案.md Known issues (next session): - /ws endpoint returns 404: WebDistributor.distribute IS called (proven by / returning 200 with my HTML), but routes.get('/ws') returns None. Tried HashMap routing, direct match routing, pointing /ws at WebHandler instead of WsHandler - all 404. Needs comparison against wv-sdk StaticDistributor runtime behavior. Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
docs: README 中英双语刷新 + 交接/功能清单/截断方案等陈旧修正 - README:工具数 7→14、架构入口 entries.cj、bash 截断 8000→2000、compaction 双阈值 - 新增测试与质量章节(182 单测分布 + CI 门禁 + 10+ 潜伏 bug 实证) - 新增实测基准章节(prompt 42.9K→9.4K、48轮→15轮、压缩机制三次迭代) - README.en 补齐工具表/修中英混排/运行命令 bin/main→bin/cjh - 实现方案与交接:状态 v1.3.1、测试策略、代码地图全量刷新、下一步更新 - cjh功能清单/工具结果截断方案/踩坑记录:bash 8000→2000、main→cjh - 进度记录:第十二轮(效率+测试+bug)+ 第十三轮(文档+build.cj) | 1 个月前 | |
docs: sync gap analysis + v2 roadmap + progress overview Update all three planning docs to reflect actual code state as of 2026-08-25: - 对标pi差距分析.md: 18-row capability matrix, mark Compaction/ AGENTS.md/tree-session/--mode json/Ollama/Skills/Steer as done - 方案与架构设计-v2.md: roadmap table gains a Status column; add 2026-08-25 verification note with milestones and next steps - 进度记录.md: add top-level overview block (version, V1-V4 status, next steps, tech debt) Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
feat(tools): P0-P2 tool execution efficiency improvements P0: Hashline hash-anchor editing (src/tools/hashline.cj) - New HashlineEditTool: model uses content hash prefix (@@{hash}) to identify target lines, no need to retype entire content. - File changed → hash mismatch → patch rejected (no wrong edits). - FNV-1a 32-bit hash (no external dependency), low 16 bits → 4 hex. - patch format: @@{hash} anchor + +content insert + -old +new replace. - Efficiency (omp benchmark): edit success 6.7%→68.3% (10×), output Token reduced 61%. P1: read_file structured summary (src/tools/builtin.cj ReadTool) - Large files (>200 lines) return structured summary (function/class names + important comments) instead of full dump. - offset + limit params for on-demand line range expansion. - Symbol extraction: isSymbolDefinition() matches Cangjie/general keywords; isImportantComment() matches TODO/FIXME/HACK/NOTE. - Efficiency (omp benchmark): saves half context Token. P2: grep directory tree search + gitignore (src/tools/builtin.cj GrepTool) - path supports file or directory (Directory.walk recursive). - gitignore awareness: skips .git/node_modules/target/dist/build. - context param: N lines around matches (default 0). - GrepWalkState class: encapsulates walk closure mutable state. - Text file filtering: isTextFile() by extension (50+ types). - Efficiency: search coverage 10× (single file → directory tree). Verification: cjpm build 0 errors, 9 pre-existing warnings. All three tools registered to 4 ToolRegistry instances. Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
docs: README 中英双语刷新 + 交接/功能清单/截断方案等陈旧修正 - README:工具数 7→14、架构入口 entries.cj、bash 截断 8000→2000、compaction 双阈值 - 新增测试与质量章节(182 单测分布 + CI 门禁 + 10+ 潜伏 bug 实证) - 新增实测基准章节(prompt 42.9K→9.4K、48轮→15轮、压缩机制三次迭代) - README.en 补齐工具表/修中英混排/运行命令 bin/main→bin/cjh - 实现方案与交接:状态 v1.3.1、测试策略、代码地图全量刷新、下一步更新 - cjh功能清单/工具结果截断方案/踩坑记录:bash 8000→2000、main→cjh - 进度记录:第十二轮(效率+测试+bug)+ 第十三轮(文档+build.cj) | 1 个月前 | |
docs: record the fd 1 decoupling and the fd-level WARN harness Add §3.43 and round 52: channel-level isolation instead of per-path patching, the harness evidence triple (accept > 0 / fd 1 -> /dev/null / no WARN), the positive-control requirement, and the new pitfalls (a pipe read blocks unless the write end is closed, Option has no getOrThrow in 1.0.5, and a unit test must not redirect the process-wide fd 1). Co-Authored-By: AtomCode (deepseek-v4-flash-vision-exp) <noreply@atomgit.com> | 4 天前 | |
feat(trust): V3 Step 3 trust management CLI + third-party plugin examples (v1.3.14) - trust.cj: trusted-publishers list pure functions (parse/read/write/ add/remove/match, idempotent add/remove) - plugin.cj: trust enforcement after SM2 verify in PluginManager — empty list = open mode (default, back-compat); non-empty = strict mode: signed plugin must match publisher or pubkey, unsigned plugins rejected too - main.cj: cjh trust/untrust/trust-list commands (exit 0/1/2) - tools_setup/entries: loadPlugins takes configDir, injects trust list - example/plugins: git-status (tool) + tool-result-banner (hook) third-party style examples, load/execute/hook contract tests - tests: +10 cases (7 trust incl. end-to-end enforcement with real SM2-signed plugins, 3 example plugins); 335 unit tests green + --mock E2E + CLI manual check - docs: plugin signing guide Step 2/3 marked implemented + trust list semantics; progress log round-28; CHANGELOG v1.3.14; version bump (cjpm.toml + logo.cj) Co-Authored-By: AtomCode (qwen3.8-27b) <noreply@atomgit.com> | 26 天前 | |
feat(plugins): V2b plugin system Step 1 + Step 2 Implement plugin system with plugin.json metadata, shell-based tool execution, and on_tool_result event hooks. Step 1 (plugin.json + tool loading): - config.cj: CjhConfig gains pluginsDir, enabledPlugins; ensureDirs creates pluginsDir; loadSettings reads enabled_plugins - plugin.cj (new): PluginTool executes shell scripts via executeWithOutput, passes args as CJH_TOOL_ARGS env var; PluginManager scans pluginsDir/*/plugin.json, parses tools/hooks, registers PluginTool to ToolRegistry, path traversal protection - main.cj: loadPlugins() called in runCli/runJson/runTui Step 2 (event hooks): - loop.cj: Agent gains pluginManager field + setPluginManager(); fireToolResultHook() triggers on_tool_result before result回填; both serial and parallel execution paths covered - plugin.cj: PluginManager.fireHook() executes hook script with CJH_HOOK_DATA env var, returns rewritten content Example plugins (example/): - echo-test: minimal tool plugin, echoes message param - log-pruner: on_tool_result hook, truncates > 1000 chars to head 500 + tail 500 + elision marker Design doc: docs/插件系统实现方案.md MCP protocol support planned as Step 3 extension point. Verified: - echo-test: LLM calls echo tool, gets '[echo plugin] message: ...' - 2 rounds · 1 tools · 4.06s · 4.855K tokens · 96% cached Co-Authored-By: AtomCode (GLM-5.2) <noreply@atomgit.com> | 1 个月前 | |
docs: 根目录 方案.md 归档为 docs/方案与架构设计-v1.md 2026-08-21 立项方案稿(P0 实施中状态),演进版 v2 已覆盖 (docs/方案与架构设计-v2.md,含实施状态/里程碑)。归档保留 项目立项原始记录,根目录清理。 | 1 个月前 | |
docs: 跨平台终端层设计方案 + README/设计文档跨平台卖点 新增 docs/跨平台终端层设计方案.md(待评审): - 现状盘点:cjterm/term.cj 的 termios/ioctl/select 等 POSIX 依赖面, 输出侧 ANSI/VT 本就跨平台,Linux 依赖集中在输入侧 - TerminalBackend 接口抽象(Term 对外 API 不变,TUI 上层零改动) - Windows 实现:VT 输出(复用现有渲染)+ Win32 Console API 输入 (ReadConsoleInput 映射统一 KeyEvent) - 条件编译:@When + cjc --cfg os=windows,编译期选后端零运行时开销 - C 嵌入方式 A:@C 声明 kernel32 API(与 termios FFI 同模式,零新 工具链,单二进制卖点不变);方式 B 独立 .c 备选 - 三阶段实施 P0 抽象重构/P1 Windows 后端/P2 打磨,238 单测为基线 README(中英)+ 方案-v2:多后端编译行扩展终端层平台抽象,Why 表 加跨平台原生行(标注规划中),路线图加 V1.4 跨平台终端层里程碑 | 1 个月前 | |
refactor: 拆 cjllm/cjcfg 独立库 + 模块规划 - cjllm:LLM 客户端库(消息模型+OpenAI 协议+SSE+工具调用+mock) - cjcfg:配置系统库(settings/auth/会话持久化+env 覆盖) provider 工厂移到主项目(业务装配不属于通用库) - 主项目依赖三库(cjterm/cjllm/cjcfg),src/model+llm+config 移除 - 三库拆分后 mock/TUI/会话全回归通过 - docs/模块规划.md:拆分原则、候选库、操作清单 | 1 个月前 | |
docs: README 中英双语刷新 + 交接/功能清单/截断方案等陈旧修正 - README:工具数 7→14、架构入口 entries.cj、bash 截断 8000→2000、compaction 双阈值 - 新增测试与质量章节(182 单测分布 + CI 门禁 + 10+ 潜伏 bug 实证) - 新增实测基准章节(prompt 42.9K→9.4K、48轮→15轮、压缩机制三次迭代) - README.en 补齐工具表/修中英混排/运行命令 bin/main→bin/cjh - 实现方案与交接:状态 v1.3.1、测试策略、代码地图全量刷新、下一步更新 - cjh功能清单/工具结果截断方案/踩坑记录:bash 8000→2000、main→cjh - 进度记录:第十二轮(效率+测试+bug)+ 第十三轮(文档+build.cj) | 1 个月前 | |
feat(ref): add TUI /ref panel and align only .md when refreshing same-named skills TUI panel (src/slash_command.cj): - /ref [status|verify|rebuild|search <词>|update] delegates to cjh.tools.refCliMain, so the panel and the CLI share one implementation instead of growing a second search/verify path - update is the only network path and is gated: without --yes it prints the plan (corpus dir, repo, branch, flow, how to confirm) and returns without touching disk; --source is treated as an offline source and is not gated - parsing/gating lives in pure functions (refPanelSub/Strip/NeedsConfirm/OptionOf/ConfirmText) covered by unit tests; /help and tab completion list /ref cjh ref search <words>: new subcommand that runs the existing CangjieRefTool once (offline) ref update on same-named skills: replace "delete the whole skill dir, then copy source .md" with "align .md only" - stale .md files are removed so the md set mirrors the source, non-.md assets (shipped tooling / knowledge bases) are kept, and skill dirs absent from the source are left untouched. Found on the live corpus: the old behaviour wiped cangjie-coding's doc_search scripts (23 files) and knowledge.sqlite3 (8.9 MB) while ref verify still reported success, because the manifest only covers .md. refApplyStaging now returns RefApplyStats and update reports "同名技能: 覆盖 N 个(清理旧 md M 个,保留非 md K 个)". Tests: repro first (testRefUpdateKeepsNonMdAssetsOfSameNamedSkill failed before the fix), plus testRefUpdateLeavesUnrelatedSkillsUntouched; 5 pure-function cases for the panel and a PTY scenario [16] that exercises the confirm gate without ever running git clone. Verified: ./scripts/test.sh 441/441 green; cjpm build + --mock e2e pass; tui_pty_test.py 67/0; real network run on the live corpus (dry-run -> update -> verify -> --restore) leaves 38 files / 9.0 MB (13 md + 25 non-md) intact. Co-Authored-By: AtomCode (deepseek-v4-flash-vision-exp) <noreply@atomgit.com> | 20 天前 | |
docs: 跨平台终端层设计方案 + README/设计文档跨平台卖点 新增 docs/跨平台终端层设计方案.md(待评审): - 现状盘点:cjterm/term.cj 的 termios/ioctl/select 等 POSIX 依赖面, 输出侧 ANSI/VT 本就跨平台,Linux 依赖集中在输入侧 - TerminalBackend 接口抽象(Term 对外 API 不变,TUI 上层零改动) - Windows 实现:VT 输出(复用现有渲染)+ Win32 Console API 输入 (ReadConsoleInput 映射统一 KeyEvent) - 条件编译:@When + cjc --cfg os=windows,编译期选后端零运行时开销 - C 嵌入方式 A:@C 声明 kernel32 API(与 termios FFI 同模式,零新 工具链,单二进制卖点不变);方式 B 独立 .c 备选 - 三阶段实施 P0 抽象重构/P1 Windows 后端/P2 打磨,238 单测为基线 README(中英)+ 方案-v2:多后端编译行扩展终端层平台抽象,Why 表 加跨平台原生行(标注规划中),路线图加 V1.4 跨平台终端层里程碑 | 1 个月前 | |
docs: record the fd 1 decoupling and the fd-level WARN harness Add §3.43 and round 52: channel-level isolation instead of per-path patching, the harness evidence triple (accept > 0 / fd 1 -> /dev/null / no WARN), the positive-control requirement, and the new pitfalls (a pipe read blocks unless the write end is closed, Option has no getOrThrow in 1.0.5, and a unit test must not redirect the process-wide fd 1). Co-Authored-By: AtomCode (deepseek-v4-flash-vision-exp) <noreply@atomgit.com> | 4 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 20 天前 | ||
| 20 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 26 天前 | ||
| 26 天前 | ||
| 1 个月前 | ||
| 26 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 4 天前 | ||
| 26 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 20 天前 | ||
| 1 个月前 | ||
| 4 天前 |