thincoder 0.12.63 → 0.12.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/README.md +132 -79
- package/bin/thincoder.mjs +38 -12
- package/package.json +3 -3
- package/src/acp/handlers-session.mjs +42 -1
- package/src/acp/handlers-slots.mjs +1 -1
- package/src/cli/make-agent.mjs +17 -16
- package/src/tui/agent-turn.mjs +5 -2
- package/src/tui/cmd-advisor.mjs +1 -1
- package/src/tui/cmd-eng.mjs +12 -1
- package/src/tui/cmd-mcp-form.mjs +11 -5
- package/src/tui/cmd-new.mjs +1 -1
- package/src/tui/cmd-plan.mjs +9 -0
- package/src/tui/conversation-writer.mjs +62 -0
- package/src/tui/index.mjs +43 -297
- package/src/tui/input-face.mjs +187 -0
- package/src/tui/key-handler-busy.mjs +42 -0
- package/src/tui/key-handler-ctrlc.mjs +118 -0
- package/src/tui/key-handler-edit.mjs +115 -0
- package/src/tui/key-handler-modals.mjs +87 -0
- package/src/tui/key-handler-scroll.mjs +110 -0
- package/src/tui/key-handler.mjs +32 -382
- package/src/tui/ledger-surface.mjs +14 -67
- package/src/tui/render-frame.mjs +13 -4
- package/src/tui/subagent-freeze.mjs +3 -3
- package/src/tui/suspension-drive.mjs +35 -24
- package/src/tui/tui-lifecycle.mjs +9 -0
- package/src/tui/tui-state.mjs +65 -0
- package/src/tui/turn-face.mjs +64 -0
- package/src/tui/wrapped-spawn.mjs +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
## [0.12.65] — 2026-09-22
|
|
2
|
+
|
|
3
|
+
> 0.12.64 → 0.12.65(连续号——发布时定号)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`session index` 命令**(`--status` 读数 / `--rebuild` 全量重扫)+ 启动后懒建索引;`read_history` 走索引——超大会话可答 + `path:"all"` 跨会话检索。
|
|
8
|
+
- **忙时排队提交**:主会话忙时 Enter 不再被吞——入单槽 + `[sending queued message]` 回执 + 回合边界送达;**挂起会话内**同样受理;Ctrl+I 保持打断式通道。
|
|
9
|
+
- **退出即释放会话认领**:Ctrl+C / 正常退出释放本进程认领——重启恢复直达原槽。
|
|
10
|
+
- **`session gc` 进度 / 预估行**(显式面长跑可见)。
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **MCP 表单脱敏**:headers/env 值位改 `••••(masked)`(键名保留)——与设置工具同谓词单源。
|
|
15
|
+
- **槽绑定优先写**:`/eng` · `/advisor` 写面改 `agent._slot ?? activeSlot(cwd)`(不写他槽)。
|
|
16
|
+
- **i18n 单源**:auto-turn 上限行改读核键(`digest.capAuto` / `digest.capStop`)。
|
|
17
|
+
- **`git diff` / `log` 传 path 未命中 ⇒ 加注**(不再显示成假洁净)。
|
|
18
|
+
- **结构收正(内部)**:`key-handler` 拆五族档(498 → 124 + 5 档)· `index.mjs` 拆四新档(`startTUI` 417 → 149)· README 折行。
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **TUI 退出钩子 TypeError**(`ledgerSurface.dispose` 打在 Promise 上)——每次退出抛错,已修(`node test-startup.mjs` 转绿)。
|
|
23
|
+
- 表单 `[object Object]` 渲染瑕疙 · plan 未知 action 报错串断言补全 · 压缩第三去向用例补全。
|
|
24
|
+
|
|
25
|
+
## [0.12.64] — 2026-09-21
|
|
26
|
+
|
|
27
|
+
> 0.12.63 → 0.12.64(连续号——发布时定号)
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **PROJECT-MANIFEST 模型(按用点解析)**:owning-ancestor 归属 + 五级梯发现;整档缺失非致命(启动降级 + 建档流提示)。
|
|
32
|
+
- **批档生命周期工具** `batch`(create / append / status / close)· **台账执行人列**(F-LX1)· **信号行两档标签**(digest/ask)+ 起始行 · **会话认领释放**(F-CR1/CR2,拒绝零写入)。
|
|
33
|
+
- **启动非阻塞**:会话 GC 异步化 + 陈旧清扫 + traces 清理;**启动加载行**(包裹父进程 + TUI 首帧,含修复轮收正)。
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- **工程模式排除 `plan` 角色**(FR31)。
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- 批别名残留(断言 / 提示词文档引用 / 错误串)· VSC 子代理块标题对齐(CLI 标题段补全)· README 依赖声明口径收正(零三方运行时依赖)。
|
|
42
|
+
|
|
1
43
|
## [0.12.63] — 2026-09-21
|
|
2
44
|
|
|
3
45
|
> 0.12.62 → 0.12.63(连续号——发布时定号;本版随核首发联动)
|
package/README.md
CHANGED
|
@@ -2,31 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
**Sharp Code, Zero Bloat.**
|
|
4
4
|
|
|
5
|
-
**A "thin" AI coding agent: pure `.mjs`, no build step, zero
|
|
5
|
+
**A "thin" AI coding agent: pure `.mjs`, no build step, zero third-party dependencies, native Node.js.**
|
|
6
6
|
|
|
7
7
|
The "Thin" in ThinCoder doesn't mean "feature-poor" — it means **sharp thinking, straight to the point** — like a blade.
|
|
8
8
|
While every AI agent races to be "all-powerful", ThinCoder plays the opposite card: **restraint, precision, no filler**.
|
|
9
9
|
Its persona is a geek engineer of few words who cuts to the bone: give it a complex requirement, get back a clean implementation.
|
|
10
10
|
|
|
11
|
-
Design philosophy (the entire meaning of the name): if the Node standard library can do it, no dependency is allowed. The project's `node_modules`
|
|
11
|
+
Design philosophy (the entire meaning of the name): if the Node standard library can do it, no third-party dependency is allowed. The project's `node_modules` contains no third-party packages — only the first-party `@thincoder/core` shared core (a local link in development,
|
|
12
|
+
resolved from the npm registry for releases).
|
|
12
13
|
|
|
13
14
|
## Features
|
|
14
15
|
|
|
15
16
|
- **Fix-verify loop**: file changes without `verify` get pushed back — syntax check + tests must pass before the agent can claim completion (auto-repair up to 3 rounds)
|
|
16
17
|
- **Checkpoint system**: auto-snapshot before every user task, `list`/`create`/`rewind` tools for the model, single-file restore — rewinding itself is reversible (pre-rewind state auto-saved)
|
|
17
|
-
- **Codebase understanding** ⭐0.5.0: `repo_outline` (dependency outline, auto-injected at startup), `code_search` (source FTS5 + vectors + JSDoc extraction), `doc_search` (docs chunked by ## headings) — background indexing, auto-incremental updates on file writes, three tools
|
|
18
|
-
|
|
18
|
+
- **Codebase understanding** ⭐0.5.0: `repo_outline` (dependency outline, auto-injected at startup), `code_search` (source FTS5 + vectors + JSDoc extraction), `doc_search` (docs chunked by ## headings) — background indexing, auto-incremental updates on file writes, three tools
|
|
19
|
+
guided by "structure → intent → details"
|
|
20
|
+
- **Model adaptation** ⭐: top-tier only, latest only. Built-in flagship models from twenty-one providers — DeepSeek / Kimi / Kimi For Coding / GLM / GLM Coding Plan (智谱 Coding) / Qwen / Qwen Token Plan / MiMo (小米) / MiMo Token Plan (小米套餐) / MiniMax / OpenAI / Claude / Gemini /
|
|
21
|
+
Grok / Mistral / Volcengine Ark (豆包) / Hunyuan (腾讯混元) / Tencent TokenHub (腾讯混元网关) / SiliconFlow (硅基流动) / OpenRouter / Groq. No legacy model compatibility. Auto-matched context windows, truncation-resume protocols (prefix/partial), thinking-mode APIs (thinking.type /
|
|
22
|
+
reasoning_effort), reasoning_content echo strategies (reasoningEcho), output limits, temperature range clamping — all deeply adapted.
|
|
19
23
|
- **Toolset**: `read` / `write` / `edit` / `bash` / `glob` (supports `**`) / `grep` / `websearch` / `ls` / `fetch` + `read_image` (image/video paste) + three retrieval tools + MCP — all zero-dependency, file tools confined to the working directory
|
|
20
24
|
- **Memory system**: three layers (personal/project/team), FTS5 + vector RRF hybrid retrieval, git-friendly markdown format
|
|
21
25
|
- **Two-phase tool scheduling**: permission prompts serialized, read-only tools parallelized, side-effect tools serialized
|
|
22
26
|
- **Session persistence** ⭐0.5.0: unlimited archive slots, `/session` to switch anytime, tool results visible after restore. Process-level isolation — multiple instances in the same directory each get their own session slot
|
|
23
|
-
- **Concurrent subagents**: five roles — `explore`/`plan`/`coder`/`eng-coder`/`eng-designer` — dispatched in parallel, streaming output visible, reports land in the conversation; per-subagent model override (`subagent` tool `model` arg or `agent.subagentModel` config — e.g.
|
|
24
|
-
|
|
27
|
+
- **Concurrent subagents**: five roles — `explore`/`plan`/`coder`/`eng-coder`/`eng-designer` — dispatched in parallel, streaming output visible, reports land in the conversation; per-subagent model override (`subagent` tool `model` arg or `agent.subagentModel` config — e.g.
|
|
28
|
+
discuss with `glm-5.2`, let `deepseek-v4-flash` implement)
|
|
29
|
+
- **Multi-model consultation 会诊 + 飞刀 (escalate)** ⭐0.12.30: `consult_start`/`consult_stop` run several configured models in parallel as independent read-only consultants (each with its own TUI activity card, `main_history` access to the failure trail); when every model settles,
|
|
30
|
+
the full verdict digest is delivered automatically (R17 — consult_check retired). `escalate` flies in a stronger model for a single expert implementation run with full write access (default-async since R17 — the post-op report arrives automatically with its mutations merged).
|
|
31
|
+
Candidate pool = `agent.consultModels` ([{ provider, model, effort? }], up to 5); budgets via `agent.consultTurns` / `agent.consultTimeoutMs`
|
|
25
32
|
- **Plan Mode**: read-only exploration + design, implement after user approval
|
|
26
33
|
- **AUTO mode**: `/auto` full authorization, no confirmations on long tasks
|
|
27
34
|
- **Task tracking**: `task` tool breaks down multi-step work, status bar ✓n/m live progress, auto-filters completed items
|
|
28
35
|
- **Goal/Verify/Skills**: long-goal tracking, completion verification, reusable skills
|
|
29
|
-
- **Streaming TUI**: bare ANSI, permission preview right above the input box, write/edit auto-shows diffs, paste shortcut hint in the input box corner for multimodal models (Win: Alt+V / Mac/Linux: Ctrl+V). Two-level model picker (providers → models), search/filter support,
|
|
36
|
+
- **Streaming TUI**: bare ANSI, permission preview right above the input box, write/edit auto-shows diffs, paste shortcut hint in the input box corner for multimodal models (Win: Alt+V / Mac/Linux: Ctrl+V). Two-level model picker (providers → models), search/filter support,
|
|
37
|
+
Shift+Enter for multiline input
|
|
30
38
|
|
|
31
39
|
## Memory: What One Learns, the Whole Team Knows
|
|
32
40
|
|
|
@@ -69,7 +77,8 @@ npm install -g thincoder
|
|
|
69
77
|
thincoder
|
|
70
78
|
```
|
|
71
79
|
|
|
72
|
-
First launch walks you through a setup wizard: arrow keys to pick a provider (built-in presets or a custom endpoint) → enter API key → optionally enter an embedding key (SiliconFlow, enables vector memory search, skippable) → arrow keys to pick a model — no hand-editing config
|
|
80
|
+
First launch walks you through a setup wizard: arrow keys to pick a provider (built-in presets or a custom endpoint) → enter API key → optionally enter an embedding key (SiliconFlow, enables vector memory search, skippable) → arrow keys to pick a model — no hand-editing config
|
|
81
|
+
files. Adjust anytime with `/model` (add/remove providers, set keys, custom endpoints) or `/config embedkey`. `chat`/`distill` also offer in-place interactive setup when no key is configured in a terminal (in pipes/CI they exit with an error and instructions).
|
|
73
82
|
|
|
74
83
|
You can also hand-write `~/.thincoder/config.json` (see "Configuration" below), then:
|
|
75
84
|
|
|
@@ -95,11 +104,16 @@ thincoder upgrade
|
|
|
95
104
|
|
|
96
105
|
Running from source: replace `thincoder` above with `node bin/thincoder.mjs`.
|
|
97
106
|
|
|
98
|
-
Slash commands in the TUI: `/help`, `/model` (two-level picker: first select provider, then model; also add/remove providers, set keys, custom endpoints; `/model <provider>:<name>` switches directly), `/submodel` (subagent models per type — picker over global +
|
|
107
|
+
Slash commands in the TUI: `/help`, `/model` (two-level picker: first select provider, then model; also add/remove providers, set keys, custom endpoints; `/model <provider>:<name>` switches directly), `/submodel` (subagent models per type — picker over global +
|
|
108
|
+
explore/plan/coder/eng-coder/eng-designer slots, or `/submodel <type> <provider:model>` directly), `/shell` (platform-aware picker of available shells — e.g. `/shell` → pick Git Bash/pwsh, or `/shell "C:\Program Files\Git\bin\bash.exe"`, `/shell reset`; fixes win11 cmd
|
|
109
|
+
encoding/command issues), `/think` (thinking mode toggle and reasoning effort), `/config` (view config; no-argument form opens the interactive menu — e.g. default model, embedding key, proxy; `/config embedkey` sets the embedding key directly), `/session` (list/switch archived
|
|
110
|
+
sessions), `/reindex` (rebuild the index), `/extract` (extract knowledge from the current session), `/restore` (restore checkpoint), `/clear`, `/exit`. High-frequency commands support abbreviations: `/h` `/x` `/m` `/p` `/t` `/c` `/n`. Typing `/` shows live matching hints in the
|
|
111
|
+
status bar. Model picker supports search/filter — type to narrow down results.
|
|
99
112
|
|
|
100
113
|
Configuration comes exclusively from `~/.thincoder/config.json` — no environment-variable configuration is supported.
|
|
101
114
|
|
|
102
|
-
> **Kimi note**: Kimi has **two separate platforms with non-interchangeable API keys** — Moonshot (`https://api.moonshot.cn/v1`, keys `sk-...`, platform.moonshot.cn) and **Kimi For Coding** (`https://api.kimi.com/coding/v1`, keys `sk-kimi-...`, platform.kimi.com, model ID `k3`).
|
|
115
|
+
> **Kimi note**: Kimi has **two separate platforms with non-interchangeable API keys** — Moonshot (`https://api.moonshot.cn/v1`, keys `sk-...`, platform.moonshot.cn) and **Kimi For Coding** (`https://api.kimi.com/coding/v1`, keys `sk-kimi-...`, platform.kimi.com, model ID `k3`).
|
|
116
|
+
> Use the `kimi` preset for Moonshot and `kimi-code` for Kimi For Coding — putting one platform's key on the other's endpoint fails with 401 (a hint is appended when the key/baseURL look mismatched).
|
|
103
117
|
|
|
104
118
|
## Configuration
|
|
105
119
|
|
|
@@ -166,43 +180,25 @@ Configuration comes exclusively from `~/.thincoder/config.json` — no environme
|
|
|
166
180
|
## Architecture
|
|
167
181
|
|
|
168
182
|
```
|
|
169
|
-
bin/thincoder.mjs command entry (tui / chat / memory / sync / distill)
|
|
183
|
+
bin/thincoder.mjs command entry (tui / chat / memory / sync / distill / reindex / completion / upgrade / acp / session gc)
|
|
184
|
+
bin/thincoder.cjs CommonJS shim → bin/thincoder.mjs
|
|
170
185
|
src/
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
context.mjs rough token estimation + history compaction + task re-injection
|
|
185
|
-
memory/ three-layer memory — schema.mjs (DDL/constants), core.mjs (CRUD + retrieval),
|
|
186
|
-
code-index.mjs + code-sync.mjs (code_chunks), docs.mjs (doc_chunks)
|
|
187
|
-
memory.mjs re-export shim → src/memory/*
|
|
188
|
-
session.mjs session persistence (unlimited archive slots, isolated by project cwd, process-level isolation via sessionId + slotSessions)
|
|
189
|
-
skills.mjs skill discovery/loading (.thincoder/skills/*.md)
|
|
190
|
-
markdown.mjs entry format (frontmatter parse/serialize)
|
|
191
|
-
git/ checkpoint.mjs (git patch snapshots / rewind), gitmem.mjs (Team layer git sync)
|
|
192
|
-
distill.mjs session knowledge extraction (candidates + human confirmation)
|
|
193
|
-
config.mjs config loading
|
|
194
|
-
tui/ bare-ANSI terminal UI — index.mjs (startTUI), render.mjs (drawing primitives),
|
|
195
|
-
render-frame.mjs (frame layout), render-conversation.mjs (conversation panel),
|
|
196
|
-
markdown.mjs (lightweight inline markdown → ANSI), mouse.mjs (SGR clicks),
|
|
197
|
-
clipboard.mjs (paste/copy), ansi.mjs
|
|
198
|
-
tui.mjs re-export shim → src/tui/index.mjs
|
|
199
|
-
tui-render.mjs re-export shim → src/tui/render.mjs
|
|
200
|
-
prompts/ prompt texts — slot-based (PROMPT-SYSTEM): persona-engineering / persona-normal /
|
|
201
|
-
persona-{eng-coder,explore,coder,plan,eng-designer} + common + discipline-engineering / discipline-normal
|
|
202
|
-
+ special modules (consult-base / advisor-design / advisor-round{1,2,3});
|
|
203
|
-
assembly = assemblePrompt (prompt-overlays.mjs): persona → common → discipline → [4] AGENTS+skills
|
|
186
|
+
acp/ Agent Client Protocol bridge — bridge, client caps, session/slot handlers, login, transport
|
|
187
|
+
acp.mjs thincoder acp entry → src/acp/
|
|
188
|
+
cli/ top-level command implementations — setup-wizard, memory-command, distill-command,
|
|
189
|
+
make-agent (assembly), permission
|
|
190
|
+
completions.mjs shell completion scripts (thincoder completion <shell>)
|
|
191
|
+
crash-reports.mjs crash capture and forensics — fatal records, stderr capture, heap snapshots
|
|
192
|
+
distill.mjs session knowledge extraction (candidates + human confirmation)
|
|
193
|
+
heap-watch.mjs heap telemetry / watchdog
|
|
194
|
+
prompt-injections.mjs prompt-anchor values for this end — tool face (bash / question)
|
|
195
|
+
tui/ bare-ANSI terminal UI — index.mjs (startTUI), frame/conversation rendering,
|
|
196
|
+
key handling, mouse/clipboard, the cmd-* command family, subagent panels
|
|
197
|
+
tui.mjs re-export shim → src/tui/index.mjs
|
|
198
|
+
upgrade.mjs version check and self-upgrade
|
|
204
199
|
test/ node:test offline unit tests (npm test)
|
|
205
|
-
scripts/
|
|
200
|
+
scripts/ repo-side scripts — release check, doc-impact, syntax/endpoint probes,
|
|
201
|
+
real-environment verification (compaction, team sync)
|
|
206
202
|
```
|
|
207
203
|
|
|
208
204
|
Key design decisions:
|
|
@@ -222,7 +218,7 @@ node scripts/verify-compress.mjs # real-API verification of context compaction
|
|
|
222
218
|
node scripts/verify-team.mjs # team memory A->git->B full-chain verification (local git, offline)
|
|
223
219
|
```
|
|
224
220
|
|
|
225
|
-
Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (including devDependencies).
|
|
221
|
+
Code conventions: pure `.mjs`, no semicolons, no third-party npm dependencies allowed (including devDependencies) — the first-party `@thincoder/core` shared core is the only npm dependency.
|
|
226
222
|
|
|
227
223
|
## Roadmap
|
|
228
224
|
|
|
@@ -230,9 +226,32 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
230
226
|
|
|
231
227
|
## Changelog
|
|
232
228
|
|
|
229
|
+
### 0.12.65 (2026-09)
|
|
230
|
+
- **Session index** — `thincoder session index [--status|--rebuild]`. `read_history` now answers over-limit sessions and searches across sessions (`path:"all"`), backed by a derived, rebuildable `node:sqlite` index; the session files remain the only source of truth.
|
|
231
|
+
- **Queue submissions while busy** — Enter during a running turn is no longer swallowed: it lands in a single slot with a visible `[sending queued message]` receipt and runs at the turn boundary. The same now applies inside suspended sessions. Ctrl+I stays the interrupt-style channel.
|
|
232
|
+
- **Release claims on exit** — a clean exit frees this process's session claims, so restarts resume directly instead of relying on process probing.
|
|
233
|
+
- **Safer, clearer surfaces** — MCP form headers/env values are masked; `/eng` and `/advisor` write to the bound slot; `git diff`/`log` note an unmatched pathspec instead of looking clean; `session gc` prints progress and estimates.
|
|
234
|
+
- **Fixes** — the TUI exit no longer throws (`ledgerSurface.dispose`); oversized modules split (`key-handler` 498→124 + 5 family modules; `index.mjs` 499→228, `startTUI` 417→149).
|
|
235
|
+
|
|
236
|
+
### 0.12.64 (2026-09)
|
|
237
|
+
- **PROJECT-MANIFEST model** — per-use project resolution (owning-ancestor discovery + a five-step ladder); a missing manifest is no longer fatal (degrade at startup + a clear prompt to build one).
|
|
238
|
+
- **Batch record lifecycle tool** (`batch`: create / append / status / close), **ledger executor column**, **two-tier signal lines** (digest/ask) with the start line, and **session claim release** (rejections write nothing).
|
|
239
|
+
- **Non-blocking startup** — async session GC, stale sweep, traces cleanup; the CLI start line shares the wrapped-parent + TUI first-paint path.
|
|
240
|
+
- **Engineering mode**: the `plan` role is excluded from the engineering tool set (FR31).
|
|
241
|
+
- **Fixes** — batch-alias residue across assertions, prompt doc-refs and error strings; subagent block-title parity; README dependency claims corrected to zero third-party runtime deps.
|
|
242
|
+
|
|
243
|
+
### 0.12.63 (2026-09)
|
|
244
|
+
- **Core dependency live** — now depends on `@thincoder/core@^0.9.1` (the shared-mechanism core's first npm release); installed packages resolve the core from the registry instead of shipping duplicated copies.
|
|
245
|
+
- **Fix: smoke probe always skipped** — `isBailianHost` was imported from the wrong module behind a silent catch, so the pre-release real-endpoint smoke test never actually ran. Fixed; smoke now performs the real three-call thinking-mapping check.
|
|
246
|
+
|
|
247
|
+
### 0.12.62 (2026-09)
|
|
248
|
+
- Last release in the pre-core shape (self-contained copies); 0.12.63 onward resolves the core from `@thincoder/core`.
|
|
249
|
+
|
|
233
250
|
### 0.12.11 (2026-08)
|
|
234
|
-
- **Subagent model per type** — `subagent` tool `model` arg, `config.agent.subagentModels` (per explore/plan/coder/eng-coder) and `config.agent.subagentModel` (global fallback); priority: tool arg > type > global > parent provider. `/submodel` TUI command: picker over 5 slots
|
|
235
|
-
|
|
251
|
+
- **Subagent model per type** — `subagent` tool `model` arg, `config.agent.subagentModels` (per explore/plan/coder/eng-coder) and `config.agent.subagentModel` (global fallback); priority: tool arg > type > global > parent provider. `/submodel` TUI command: picker over 5 slots
|
|
252
|
+
(global + 4 roles) with provider→model selection, or direct args (`/submodel coder deepseek:deepseek-v4-flash`).
|
|
253
|
+
- **Configurable bash shell** — `config.shell` or `/shell` TUI command: platform-aware picker (Windows: pwsh/Git Bash/WSL bash; POSIX: bash/zsh/fish — availability-detected, custom path supported). Windows default cmd now forces UTF-8 per command (`chcp 65001`) — fixes garbled
|
|
254
|
+
Chinese output on win11.
|
|
236
255
|
- **Markdown table alignment fix** — `stringWidth` strips ANSI (zero display width) and rendered table rows are padded back to the computed width; inline markers (`` `code` ``, `**bold**`) no longer shift the borders.
|
|
237
256
|
- **sliceByWidth keeps ANSI sequences whole** — never slices mid-escape-sequence.
|
|
238
257
|
|
|
@@ -240,44 +259,57 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
240
259
|
- **Code-quality pass (advisor subsystem):**
|
|
241
260
|
- **Drop 11 unused exports** — internal-use symbols no longer leak through the module API (advisor table headers/constants, plan reminders, token-UUID helper, shrinkOversized).
|
|
242
261
|
- **Advisor tool-timeout timer is now cleared** when the tool wins the race (no dangling timers); static import replaces a dynamic import on the hot path.
|
|
243
|
-
- **Advisor re-review no longer trusts git output** — the follow-up path previously injected a `git diff HEAD` snapshot: once fixes were committed the diff was empty and the model read "no changes" as "no fixes", misreporting fixed items as unfixed. The follow-up now injects
|
|
262
|
+
- **Advisor re-review no longer trusts git output** — the follow-up path previously injected a `git diff HEAD` snapshot: once fixes were committed the diff was empty and the model read "no changes" as "no fixes", misreporting fixed items as unfixed. The follow-up now injects
|
|
263
|
+
**no git information at all** — verification is `read`-only, evidence must quote this round's read output (line numbers from the stale prior table are not evidence), and dead snapshot-dedup fields were removed.
|
|
244
264
|
|
|
245
265
|
### 0.12.9 (2026-08)
|
|
246
266
|
- **Prompt-system quality pass (both CLI and VS Code extension, byte-identical sync):**
|
|
247
267
|
- **Advisor-after-code rule moved from system.md to discipline.md** — engineering mode no longer receives the conflicting "call advisor after changing code" instruction (its review-timing rules say do not call unprompted). Standard mode behavior unchanged.
|
|
248
|
-
- **engineering.md delivery-review semantics unified** — the mandatory-flow step and the state table now both say: eng-coder self-reviews inside the subagent; the architect verifies against acceptance criteria and re-reviews only when asked or when the delivery looks wrong.
|
|
268
|
+
- **engineering.md delivery-review semantics unified** — the mandatory-flow step and the state table now both say: eng-coder self-reviews inside the subagent; the architect verifies against acceptance criteria and re-reviews only when asked or when the delivery looks wrong.
|
|
269
|
+
(Previously the step forced a parent-side advisor code review that the hard rules contradicted.)
|
|
249
270
|
- **checkpoint description aligned with actual auto-snapshot triggers** (task-list deletion + context compaction; manual checkpoint for the rest).
|
|
250
271
|
- **advisor round budget wording fixed** — prompts advertise a 30-round budget; the mechanical hard cap is 100 rounds (loop guard). Both layers are now named explicitly.
|
|
251
272
|
|
|
252
273
|
### 0.12.8 (2026-08)
|
|
253
|
-
- **Fix: pending-task pushback fires at most once** — the completion guard that reminds the model to update pending tasks before finishing could loop forever when a pending item could not be resolved. Now each task-list state earns exactly one reminder; if the model insists on
|
|
274
|
+
- **Fix: pending-task pushback fires at most once** — the completion guard that reminds the model to update pending tasks before finishing could loop forever when a pending item could not be resolved. Now each task-list state earns exactly one reminder; if the model insists on
|
|
275
|
+
finishing anyway, it is allowed to (updating the list via the task tool resets the budget). VS Code extension synced.
|
|
254
276
|
|
|
255
277
|
### 0.12.7 (2026-08)
|
|
256
|
-
- **Fix: long replies and thinking are never folded** — the long-message folding feature (0.12.6) collapsed main output and reasoning behind a click when they exceeded 12 lines, hurting readability. Folding now applies to secondary dim-colored content (tool summaries/status)
|
|
278
|
+
- **Fix: long replies and thinking are never folded** — the long-message folding feature (0.12.6) collapsed main output and reasoning behind a click when they exceeded 12 lines, hurting readability. Folding now applies to secondary dim-colored content (tool summaries/status)
|
|
279
|
+
only; expanded blocks are exempt from the consecutive-dim folding so nothing folds twice.
|
|
257
280
|
- **Fix: wide tables misaligned in narrow terminals** — a many-column table that still exceeded the terminal width after column shrinking (e.g. 8 columns at 40 cols) wrapped at the terminal and misaligned. Table rows are now clipped with an ellipsis instead of ever exceeding the width.
|
|
258
281
|
|
|
259
282
|
### 0.12.6 (2026-08)
|
|
260
|
-
- **Checkpoint v2 — full-file-copy snapshots** — snapshots now store complete copies of changed files (tracked + untracked) instead of a git diff patch: rollback works even after commits happened post-snapshot. New `versions` checkpoint action lists a file's historical copies
|
|
261
|
-
|
|
283
|
+
- **Checkpoint v2 — full-file-copy snapshots** — snapshots now store complete copies of changed files (tracked + untracked) instead of a git diff patch: rollback works even after commits happened post-snapshot. New `versions` checkpoint action lists a file's historical copies
|
|
284
|
+
across snapshots (time / size / content hash) and restores a specific version. **Full rollback is disabled** (as dangerous as a working-tree reset — silently discards post-snapshot work); oversized files (>5MB) are skipped with an explicit notice; files created after a snapshot
|
|
285
|
+
are never deleted by a restore.
|
|
286
|
+
- **Git destructive-command protection** — `checkout --` / `restore` / `reset --hard` / `clean -f` (including bypass variants like `checkout HEAD -- .`) auto-snapshot every uncommitted file **before** running, then execute without blocking — a model rollback can no longer destroy
|
|
287
|
+
uncommitted work. Snapshot triggers slimmed to: destructive-git guard, pre-restore, manual.
|
|
262
288
|
- **Fix: bash no longer hangs on background processes** — `start /b`, `&`, `nohup` children that hold the output pipe no longer stall the tool until timeout (resolves after a short grace with a notice).
|
|
263
|
-
- **Mouse support** (SGR-protocol terminals) — click a picker option to select it, click a folded-block hint to expand it, click a message line for an action menu (copy to clipboard / load into the input box). **Long messages (>12 wrapped lines) auto-fold** to first/hint/last
|
|
289
|
+
- **Mouse support** (SGR-protocol terminals) — click a picker option to select it, click a folded-block hint to expand it, click a message line for an action menu (copy to clipboard / load into the input box). **Long messages (>12 wrapped lines) auto-fold** to first/hint/last
|
|
290
|
+
with click-to-expand — folding now has real objects in everyday sessions.
|
|
264
291
|
- **Fix: legacy session hash migration** — the 12→40 char hash migration now tries every historical algorithm (CLI 12-char, VS Code 16-char, both drive-letter cases): Windows sessions from older versions are found and migrated on next startup instead of being stranded.
|
|
265
292
|
|
|
266
293
|
### 0.12.5 (2026-08)
|
|
267
294
|
- **Fix: inline code styling** — markdown code spans now render with underline instead of reverse video (less harsh on the eyes)
|
|
268
295
|
|
|
269
296
|
### 0.12.4 (2026-08)
|
|
270
|
-
- **Context compaction unified spec** — CLI/VS Code now share one compaction semantics (`docs/design/CONTEXT-COMPACTION.md`): window-adaptive tail size (`max(10, ctx/100K×30)`, ≤40% of history), measured prompt-token baseline preferred, pure-estimation path includes system+tools
|
|
271
|
-
-
|
|
297
|
+
- **Context compaction unified spec** — CLI/VS Code now share one compaction semantics (`docs/design/CONTEXT-COMPACTION.md`): window-adaptive tail size (`max(10, ctx/100K×30)`, ≤40% of history), measured prompt-token baseline preferred, pure-estimation path includes system+tools
|
|
298
|
+
overhead, head/tail tool-call pairing protection on both sides, 3-tier fallback (LLM summary → deterministic truncation after 3 failures → per-message shrink), compaction summaries are silent to the frontend (no streaming into the conversation), task re-injection deduplicated.
|
|
299
|
+
Unknown model names now warn once instead of silently degrading to the 128K default
|
|
300
|
+
- **Kimi For Coding support** — new `kimi-code` preset (`api.kimi.com/coding/v1`, model `k3`, platform.kimi.com, `sk-kimi-` keys — NOT interchangeable with Moonshot); `MODEL_SPECS` gains the `k3` alias (1M context / multimodal / partialMode / reasoningEcho); 401 errors hint at
|
|
301
|
+
the two-platform key mismatch; README documents the split
|
|
272
302
|
- **Ctrl+C double-confirm** — idle-state first Ctrl+C only warns (3s window), second press exits; picker-cancel and in-flight abort semantics unchanged
|
|
273
303
|
- **Empty-response auto-retry** — a transient empty LLM response (reasoning exhausted / truncated output) injects a retry reminder instead of aborting the whole turn; after 2 consecutive empties the original error surfaces (with the `/think` lowering hint)
|
|
274
|
-
- **Lightweight inline markdown display** — model replies render `**bold**`, `` `code` `` (reverse video), `~~strike~~`, and `# headings` (marker-stripped + bold) via ANSI instead of showing literal markers; code spans are not re-interpreted; streaming-safe on unclosed markers;
|
|
304
|
+
- **Lightweight inline markdown display** — model replies render `**bold**`, `` `code` `` (reverse video), `~~strike~~`, and `# headings` (marker-stripped + bold) via ANSI instead of showing literal markers; code spans are not re-interpreted; streaming-safe on unclosed markers;
|
|
305
|
+
copied text comes out clean
|
|
275
306
|
|
|
276
307
|
### 0.12.3 (2026-08)
|
|
277
308
|
- **Fix: user-level skills loading** — skills in `~/.thincoder/skills/` are now properly discovered and loaded alongside project-level skills. Project-level skills with the same name take priority. Both `skill list` and `skill load` support both directories.
|
|
278
309
|
|
|
279
310
|
### 0.12.2 (2026-08)
|
|
280
|
-
- **Session isolation for multiple processes** — each process gets a unique session ID (`pid-timestamp-random`), manifest tracks slot ownership via `slotSessions` mapping. Concurrent sessions in the same directory automatically get separate slots. Dead process slots are
|
|
311
|
+
- **Session isolation for multiple processes** — each process gets a unique session ID (`pid-timestamp-random`), manifest tracks slot ownership via `slotSessions` mapping. Concurrent sessions in the same directory automatically get separate slots. Dead process slots are
|
|
312
|
+
intelligently reclaimed via `isProcessAlive()` check
|
|
281
313
|
- **Two-level model picker** — `/model` now shows providers first, then models for selected provider. Reduces visual clutter when many providers are configured. Direct switching still works: `/model qwen:qwen-max`
|
|
282
314
|
- **Picker improvements** — auto-scroll keeps selected item visible, "type to filter" hint shown, search/filter support added
|
|
283
315
|
- **Shift+Enter multiline input** — TUI now supports Shift+Enter for multiline input (regular Enter still submits)
|
|
@@ -290,7 +322,8 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
290
322
|
- **Fix: `/exit` screen artifacts** — `/exit` now uses synchronous `process.exit(0)` instead of the deferred cleanup callback, preventing the post-handler `render()` from redrawing the TUI over the cleaned terminal. Ctrl+C and `/exit` now produce identical clean exits.
|
|
291
323
|
|
|
292
324
|
### 0.12.0 (2026-07)
|
|
293
|
-
- **Interactive slash command UX** — `/advisor`, `/think`, `/config`, `/mcp` now use persistent menu loops with live state feedback. Toggle, change settings, and see results without re-entering the command. Cursor position is remembered across menu cycles. `/plan` and `/auto` now
|
|
325
|
+
- **Interactive slash command UX** — `/advisor`, `/think`, `/config`, `/mcp` now use persistent menu loops with live state feedback. Toggle, change settings, and see results without re-entering the command. Cursor position is remembered across menu cycles. `/plan` and `/auto` now
|
|
326
|
+
show immediate local feedback (`❯ Plan: ON/OFF`).
|
|
294
327
|
- **User-level AGENTS.md** — `~/.thincoder/AGENTS.md` is now loaded alongside the project-level `AGENTS.md`. User-level preferences (language, style, format) apply across all projects; project-level rules take priority.
|
|
295
328
|
- **Skill subdirectory format** — `.thincoder/skills/` now supports the standard `skill-name/SKILL.md` subdirectory convention (Claude Code / Cursor compatible). Flat `.md` files remain fully backward-compatible. Subdirectories take priority when both formats exist with the same name.
|
|
296
329
|
- **MCP stdio `env` field** — `env` key in MCP stdio server config is now merged into the child process environment. Enables MCP servers requiring custom environment variables (e.g. `deveco-mcp`).
|
|
@@ -298,9 +331,12 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
298
331
|
- **Cleaner conversations** — Removed redundant `[System reminder: ...]` injections from `/advisor`, `/plan`, `/auto`, and `/think` toggles. All feedback is now local TUI output, not conversation noise.
|
|
299
332
|
|
|
300
333
|
### 0.10.0 (2026-07)
|
|
301
|
-
- **LSP tool** — `lsp` tool provides code intelligence via Language Server Protocol: go-to-definition, find-references, hover info, document symbols, diagnostics. Zero-dependency JSON-RPC 2.0 over stdio client. Lazy-starts language servers on first call. Configurable via
|
|
302
|
-
|
|
303
|
-
- **
|
|
334
|
+
- **LSP tool** — `lsp` tool provides code intelligence via Language Server Protocol: go-to-definition, find-references, hover info, document symbols, diagnostics. Zero-dependency JSON-RPC 2.0 over stdio client. Lazy-starts language servers on first call. Configurable via
|
|
335
|
+
`lsp.servers` in config.json (defaults: `typescript-language-server` for JS/TS, `pyright-langserver` for Python).
|
|
336
|
+
- **Smart context: compaction checkpoint** — `compressIfNeeded` now auto-creates a git checkpoint before compaction. A checkpoint reference is injected after compaction so the model can reconstruct context from git diff + recent messages + task progress. Prevents information loss
|
|
337
|
+
during long sessions.
|
|
338
|
+
- **CodeMode: sandboxed JS execution** — `execute` tool backed by `vm.Script.runInNewContext`. Compose multiple file operations (read/write/glob/grep/log) into a single script, reducing API round-trips and keeping intermediate results out of context. Sandbox strips all Node APIs,
|
|
339
|
+
limits output to 50KB, enforces 30s timeout, and blocks private IPs in fetch. Script size capped at 50KB.
|
|
304
340
|
|
|
305
341
|
### 0.9.0 (2026-07)
|
|
306
342
|
- **Checkpoint v2** — snapshot-before-destructive with full workspace copies, per-file restore (`cat` preview), auto-recover on failed apply, and escape-hatch hints when git checks fail
|
|
@@ -314,7 +350,8 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
314
350
|
- **Roadmap**: LSP tool, intelligent context management (checkpoint-based reconstruction), and CodeMode sandboxed JS are planned for 0.10.0.
|
|
315
351
|
|
|
316
352
|
### 0.8.13 (2026-07)
|
|
317
|
-
- **TUI: incremental rendering** — panel-level cache (`panelCache`) with sync-update bracketing (`DECSET 2026`). Only redraws changed panels, eliminating flicker. `saveCursor`/`restoreCursor` for efficient cursor positioning. Panel order reorganized:
|
|
353
|
+
- **TUI: incremental rendering** — panel-level cache (`panelCache`) with sync-update bracketing (`DECSET 2026`). Only redraws changed panels, eliminating flicker. `saveCursor`/`restoreCursor` for efficient cursor positioning. Panel order reorganized:
|
|
354
|
+
`header → conversation → subagent → output → todo → picker → permission → queue → input → status`.
|
|
318
355
|
- **Ctrl+I inject resume** — Ctrl+I (or Tab during processing) now properly interrupts, injects the message, and *resumes* the agent loop. Controller is recreated after abort. Added active signal check in SSE read loop for faster abort on Windows.
|
|
319
356
|
- **Processing hints** — Input box shows "Ctrl+U clear" hint during processing. Tab during processing treated as Ctrl+I. Slash commands re-render the frame.
|
|
320
357
|
- **Compression visibility** — `compressIfNeeded` now forwards `onToken`/`onReasoning` callbacks, making compression activity visible in the TUI.
|
|
@@ -330,7 +367,8 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
330
367
|
- **ClearScreen on exit** — terminal restored with `clearScreen` ANSI on TUI cleanup.
|
|
331
368
|
|
|
332
369
|
### 0.8.12 (2026-07)
|
|
333
|
-
- **Indexing: git-repo-only** — `codeSync` and `docSync` now only index inside git worktrees (via `git ls-files`), respecting `.gitignore`. Non-git directories get empty indexes. Prevents 2.9GB memory.db from accidentally indexing entire user profiles (AppData, browser
|
|
370
|
+
- **Indexing: git-repo-only** — `codeSync` and `docSync` now only index inside git worktrees (via `git ls-files`), respecting `.gitignore`. Non-git directories get empty indexes. Prevents 2.9GB memory.db from accidentally indexing entire user profiles (AppData, browser
|
|
371
|
+
extensions, Office add-ins, Program Files)
|
|
334
372
|
- **Indexing: file-size caps** — code files >1MB and doc files >512KB are skipped during bulk indexing (minified bundles, test fixtures, generated code)
|
|
335
373
|
- **Compaction: earlier trigger** — `COMPACT_RATIO` lowered from 0.8 to 0.6 (with 40K floor), so injected context (directory tree, git context, outline, memory/doc search results) doesn't starve the model for headroom before compaction fires
|
|
336
374
|
- **Bugfix: event-loop blocking** — `buildOutline`/`buildSummary` in `repomap.mjs` now awaited (was sync calling async), `setup.mjs` outline injection fixed, `codeSync` walk uses `readFile` instead of `readFileSync`
|
|
@@ -342,11 +380,14 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
342
380
|
- **Feat**: `checklist` tool — persistent project task tracking in `.thincoder/checklist.md`. Add/mark/list items, auto-archive done items to `checklist-done.md`. Injected at session start (pending + in_progress only)
|
|
343
381
|
- **Feat**: updated prompts — four-step workflow (requirements→design→development→testing), three-step debugging strategy (logs→docs→binary search), working checklist discipline
|
|
344
382
|
- **Feat**: methodology docs — `docs/design/METHODOLOGY.md` rebuilt, `PHILOSOPHY.md` expanded with worldview #6 (official docs over guessing)
|
|
345
|
-
- **Bugfix**: vision guard — `read_image` now refuses non-vision models before reading the file, the agent loop injects a system reminder instead of image parts for text-only models, and `stripImagesForTextModel` sanitizes image parts at send time (history untouched, restored
|
|
383
|
+
- **Bugfix**: vision guard — `read_image` now refuses non-vision models before reading the file, the agent loop injects a system reminder instead of image parts for text-only models, and `stripImagesForTextModel` sanitizes image parts at send time (history untouched, restored
|
|
384
|
+
when switching back to a vision model). Previously a single image in history made text-only APIs (e.g. DeepSeek) reject EVERY subsequent request with 400, bricking the conversation
|
|
346
385
|
- **Improvement**: silent `catch {}` blocks now log to stderr (checkpoint file copies, MCP notify/close, session incremental save, clipboard paste, provider picker, team-memory rebase abort, tool dispatch) — failures are visible for debugging instead of disappearing
|
|
347
386
|
|
|
348
387
|
### 0.8.10 (2026-07)
|
|
349
|
-
- **Bugfix**: pasted text now lands in the active TUI text target — the API key prompt when adding a provider via `/model` (and any free-text `askQuestion`) now accepts paste correctly. Previously, bracketed-paste injection in the terminal was always written to the main input
|
|
388
|
+
- **Bugfix**: pasted text now lands in the active TUI text target — the API key prompt when adding a provider via `/model` (and any free-text `askQuestion`) now accepts paste correctly. Previously, bracketed-paste injection in the terminal was always written to the main input
|
|
389
|
+
box, so pasting into a question prompt appeared as "nothing happened" and orphaned the text into the input box after the question closed. Both bracketed-paste (Windows Terminal / most modern terminals) and Ctrl+V-as-key-event (legacy conhost) now route through a single
|
|
390
|
+
`insertPastedText` helper that targets the question answer, options-list (ignored), or main input box as appropriate
|
|
350
391
|
|
|
351
392
|
### 0.8.9 (2026-07)
|
|
352
393
|
- **Bugfix**: `wizardProviderItems` was defined inside `createWizard()` but not included in the return statement, causing key-handler to crash with `TypeError` during provider selection on first launch (/ new config)
|
|
@@ -363,16 +404,20 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
363
404
|
- **Code review fixes**: output friendliness, readability, English-only strings, TUI polish
|
|
364
405
|
|
|
365
406
|
### 0.8.0 (2026-07)
|
|
366
|
-
- **TUI rendering overhaul**: layout engine (`layout.mjs`) — panels are positioned declaratively by priority instead of hand-pinned arithmetic; `renderFrame` is now a pure function (no state mutation); cursor position derived from layout coordinates. Status bar slash-command
|
|
367
|
-
|
|
407
|
+
- **TUI rendering overhaul**: layout engine (`layout.mjs`) — panels are positioned declaratively by priority instead of hand-pinned arithmetic; `renderFrame` is now a pure function (no state mutation); cursor position derived from layout coordinates. Status bar slash-command
|
|
408
|
+
hints moved from if-else chain to lookup table. Three Chinese UI strings fixed to English
|
|
409
|
+
- **Subagent panel redesigned**: per-instance tracking (`role#id/` prefix) — parallel subagents of the same role no longer overwrite each other. Shows current tool name + args, or streaming text last line (what it's writing right now), instead of truncated 200-char token
|
|
410
|
+
fragments. `onToolCall` relayed from subagent to parent TUI. Only the earliest running subagent is marked done on completion (not all)
|
|
368
411
|
- **Tool file split**: `system.mjs` (337 lines) split into `bash.mjs` / `glob.mjs` / `grep.mjs` / `ls.mjs`; `repomap.mjs` (306 lines) split into `repomap.mjs` (public API) + `repomap-parse.mjs` (dependency graph parsing)
|
|
369
412
|
- **Export position normalization**: 8 files rearranged — exports at top, implementation helpers below, for top-down readability
|
|
370
|
-
- **Provider management UX**: Add Provider excludes already-added presets from the list; Esc in sub-pickers (Add/Remove/Key) returns to model picker instead of exiting; config operations no longer leave traces in the conversation flow (picker refresh is the feedback); `❯ You:`
|
|
413
|
+
- **Provider management UX**: Add Provider excludes already-added presets from the list; Esc in sub-pickers (Add/Remove/Key) returns to model picker instead of exiting; config operations no longer leave traces in the conversation flow (picker refresh is the feedback); `❯ You:`
|
|
414
|
+
label restored for user messages
|
|
371
415
|
- **distill-cmd import fix**: resolved export name mismatch that crashed TUI startup
|
|
372
416
|
|
|
373
417
|
### 0.7.8 (2026-07)
|
|
374
418
|
- **Provider config flow streamlined**: adding a provider now immediately prompts for API key (no more "go back to /provider → Set Key"). Switching to a keyless provider via `/model` also prompts for key inline. Empty input gives clear "skipped" feedback
|
|
375
|
-
- **bash tool: file writing forbidden**: models must use write/edit/insert_after/apply_patch instead of `echo`/`sed`/`printf > file`. Fixes GBK encoding corruption on Chinese Windows (cmd.exe writes redirected files in ANSI code page, not UTF-8). `PYTHONIOENCODING=utf-8` set for
|
|
419
|
+
- **bash tool: file writing forbidden**: models must use write/edit/insert_after/apply_patch instead of `echo`/`sed`/`printf > file`. Fixes GBK encoding corruption on Chinese Windows (cmd.exe writes redirected files in ANSI code page, not UTF-8). `PYTHONIOENCODING=utf-8` set for
|
|
420
|
+
Python subprocesses on Windows
|
|
376
421
|
|
|
377
422
|
### 0.7.7 (2026-07)
|
|
378
423
|
- **Code review fixes (4 critical bugs)**:
|
|
@@ -380,7 +425,8 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
380
425
|
- `gitSync` skipped deleted files → stale chunks remained in index forever; `--diff-filter` now includes `D`, and `ENOENT` is distinguished from other errors (failed files don't advance the anchor)
|
|
381
426
|
- Completion guard was a one-shot latch → after firing once, further mutations could finish unverified; now re-armed with a pushback counter (max 2 pushes, 3rd passes through)
|
|
382
427
|
- Verify-failure exhaustion returned raw model text without honesty framing → now injects a system reminder forcing the model to state what's still failing, what was tried, and that the work is unfinished
|
|
383
|
-
- **Input queue during processing**: messages typed while the agent is processing are queued and auto-executed when processing ends. Queue preview shown as a single line above the input box (no collision with subagent panel). `Ctrl+D` deletes the last queued item. `/cancel` and
|
|
428
|
+
- **Input queue during processing**: messages typed while the agent is processing are queued and auto-executed when processing ends. Queue preview shown as a single line above the input box (no collision with subagent panel). `Ctrl+D` deletes the last queued item. `/cancel` and
|
|
429
|
+
`/exit` bypass the queue
|
|
384
430
|
|
|
385
431
|
### 0.7.6 (2026-07)
|
|
386
432
|
- **SYSTEM_PROMPT split into core + discipline**: core rules (shared by all agents) separated from coding/testing/debugging discipline (main agent + coder), so explore/plan subagents no longer burn attention on irrelevant coding clauses — single source of truth, one rule changed in one file
|
|
@@ -393,13 +439,16 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
393
439
|
- **Testing discipline refined**: full-test trigger changed from "touched core infrastructure files" to "changed core infrastructure behavior" — adding a helper to memory.mjs no longer triggers the full suite
|
|
394
440
|
|
|
395
441
|
### 0.7.5 (2026-07)
|
|
396
|
-
- **Compound prompt instructions split**: 8 compound sentences across SYSTEM_PROMPT / main-overlay / coder-overlay split into independent bullets (one attention node per instruction), improving instruction-following on DeepSeek/GLM/Qwen — fallback clauses like "add tests after
|
|
442
|
+
- **Compound prompt instructions split**: 8 compound sentences across SYSTEM_PROMPT / main-overlay / coder-overlay split into independent bullets (one attention node per instruction), improving instruction-following on DeepSeek/GLM/Qwen — fallback clauses like "add tests after
|
|
443
|
+
changing code" no longer get skipped
|
|
397
444
|
- **Testing discipline strengthened**: SYSTEM_PROMPT Testing discipline gained an independent hard rule (changing behavior/adding code requires tests); main-overlay self-review checklist gained "do existing tests cover the change"; coder-overlay final checklist gained a test item
|
|
398
445
|
- **Plan mode workflow**: main-overlay's plan mode instruction split from one compound sentence into a 3-step numbered flow
|
|
399
446
|
|
|
400
447
|
### 0.7.4 (2026-07)
|
|
401
|
-
- **verify tiered self-check**: default quick mode (syntax-check changed files + git diff + self-review checklist, milliseconds); `full=true` also runs the full npm test suite — no more waiting ten-plus seconds per line changed; quick satisfies the completion guard, use full when
|
|
402
|
-
|
|
448
|
+
- **verify tiered self-check**: default quick mode (syntax-check changed files + git diff + self-review checklist, milliseconds); `full=true` also runs the full npm test suite — no more waiting ten-plus seconds per line changed; quick satisfies the completion guard, use full when
|
|
449
|
+
wrapping up or touching core infrastructure
|
|
450
|
+
- **Prompt discipline strengthened**: SYSTEM_PROMPT gained Testing discipline (when to run which tier) and Debugging strategy (diagnose before treating, one change at a time); coder/plan/main overlays gained self-review checklists (simplest solution, match project patterns, don't
|
|
451
|
+
touch unrelated files)
|
|
403
452
|
- **Fix**: quick mode marked verification passed even when syntax checks failed, gutting the completion guard
|
|
404
453
|
|
|
405
454
|
### 0.7.3 (2026-07)
|
|
@@ -407,18 +456,22 @@ Code conventions: pure `.mjs`, no semicolons, no npm dependencies allowed (inclu
|
|
|
407
456
|
- **TUI paste hint**: with a multimodal model, the input box corner shows the OS-appropriate paste shortcut; hidden for text-only models
|
|
408
457
|
|
|
409
458
|
### 0.7.2 (2026-07)
|
|
410
|
-
- **TPM/RPM proactive rate gate**: with `tpm`/`rpm` budgets configured on a provider, requests are booked against a local sliding window (60s, input+output) before sending — over budget means sleeping until the window frees up instead of gambling on 429s; covers the main loop /
|
|
459
|
+
- **TPM/RPM proactive rate gate**: with `tpm`/`rpm` budgets configured on a provider, requests are booked against a local sliding window (60s, input+output) before sending — over budget means sleeping until the window frees up instead of gambling on 429s; covers the main loop /
|
|
460
|
+
compaction summaries / subagents / truncation resume. Status bar shows `TPM throttle wait ~Ns`; the gate is off for unconfigured providers
|
|
411
461
|
- **429-specific backoff**: respects the `Retry-After` header, otherwise backs off 15s/30s/60s (60s window — sub-second backoff is pointless); quota/balance errors (`exceeded_current_quota_error`) are distinguished from rate limits and no longer retried uselessly
|
|
412
462
|
- **Dependency injection as compact summary**: `buildSummary` (directory-level dependencies + hub files + entry points, naturally ~1-2k chars) replaces the full-outline injection; detailed import/export available on demand via `repo_outline`
|
|
413
463
|
- **TUI menus**: `/model` `/config` `/provider` `/think` `/mcp` `/goal` `/session` `/restore` unified into picker menus
|
|
414
464
|
- **Session robustness**: corrupted files or disk errors during archive/switch no longer crash — silently abandoned
|
|
415
465
|
|
|
416
466
|
### 0.7.1 (2026-07)
|
|
417
|
-
- **Context explosion fix (urgent)**: the startup dependency-outline injection is no longer unbounded — a multi-repo parent directory (thousands of indexed files) produced a 1.4M-char ≈ 350K-token outline, re-injected every turn, blowing up context within a few turns and tripping
|
|
418
|
-
|
|
467
|
+
- **Context explosion fix (urgent)**: the startup dependency-outline injection is no longer unbounded — a multi-repo parent directory (thousands of indexed files) produced a 1.4M-char ≈ 350K-token outline, re-injected every turn, blowing up context within a few turns and tripping
|
|
468
|
+
TPM limits. Now truncated to 6000 chars (with a pointer to `repo_outline` for focused queries) and injected only once per session
|
|
469
|
+
- **Compaction escape hatch**: when history was too short (≤13 messages) to slice a middle section, compaction never happened — one giant message (huge paste/oversized injection) could deadlock. Now a deterministic slimming path: oversized user/tool bodies are truncated to stubs,
|
|
470
|
+
reasoning_content and tool_calls pairing untouched
|
|
419
471
|
- **docSync ReferenceError fix**: undeclared `failed`/`errors` made every doc index sync throw (two tests red)
|
|
420
472
|
- **apply_patch tool**: unified-diff multi-file atomic patching (any failed hunk → nothing written), permission preview shows the diff directly
|
|
421
|
-
- **checkpoint tool**: `list`/`create`/`rewind` snapshot abilities exposed to the model (previously only wired to TUI auto-snapshots + /rewind, so the model couldn't save itself); the bash destructive-git guard upgraded to per-segment detection (chained forms like
|
|
473
|
+
- **checkpoint tool**: `list`/`create`/`rewind` snapshot abilities exposed to the model (previously only wired to TUI auto-snapshots + /rewind, so the model couldn't save itself); the bash destructive-git guard upgraded to per-segment detection (chained forms like
|
|
474
|
+
`&&`/`;`/`|`/command substitution no longer slip through)
|
|
422
475
|
- **bash process-tree kill**: timeout/interrupt kills the whole tree (POSIX process groups / Windows taskkill /T) — no orphaned grandchildren
|
|
423
476
|
- **Subagent display contract**: only content/thinking tokens relay to the TUI scrolling area; internal tool calls no longer flood the screen
|
|
424
477
|
- **Path safety**: `resolveInCwd` prevents symlink escapes (realpath double-check); edit rejects empty old_string; single-file incremental indexing skips hidden directories and node_modules
|
package/bin/thincoder.mjs
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* thincoder upgrade Update to the latest version from npm
|
|
9
9
|
* thincoder completion <sh> Shell completion: bash / zsh / fish
|
|
10
10
|
* thincoder session gc Session dir GC: --dry-run report / --confirm delete cold projects (SESSION.md §6.12)
|
|
11
|
+
* thincoder session index Derived session index: --status report / --rebuild (SESSION.md §6.19)
|
|
11
12
|
* thincoder acp Agent Client Protocol server (stdio, for Zed/JetBrains/Paseo)
|
|
12
13
|
* thincoder -v Print version
|
|
13
14
|
* thincoder --help Print help
|
|
@@ -17,7 +18,8 @@ import { readFileSync } from "node:fs"
|
|
|
17
18
|
import { isAbsolute, join } from "node:path"
|
|
18
19
|
import { runAgent } from "@thincoder/core/agent.mjs"
|
|
19
20
|
import { loadConfig, configPath } from "@thincoder/core/config.mjs"
|
|
20
|
-
import {
|
|
21
|
+
import { tracesRoot } from "@thincoder/core/traces/trace-store.mjs"
|
|
22
|
+
import { scheduleTraceCleanup } from "@thincoder/core/traces/trace-cleanup.mjs"
|
|
21
23
|
import { createMemory, syncDir } from "@thincoder/core/memory.mjs"
|
|
22
24
|
// 批 1 CORE-DEFECT-FIXES B3:onWait 相位值域 + 文案单源(消费面禁各自枚举——PROVIDER.md §6.20)
|
|
23
25
|
import { waitStatusText } from "@thincoder/core/provider/wait-status.mjs"
|
|
@@ -32,9 +34,8 @@ import { spawnTuiWrapped } from "../src/tui/wrapped-spawn.mjs"
|
|
|
32
34
|
import { configurePromptInjections } from "@thincoder/core/prompt-files.mjs"
|
|
33
35
|
import { CLI_PROMPT_INJECTIONS } from "../src/prompt-injections.mjs"
|
|
34
36
|
|
|
35
|
-
// U2(CORE-UNIFICATION §2.6.3 专项补⑦ / §2.13.8(六)):CLI
|
|
36
|
-
//
|
|
37
|
-
// ⇒ 入口面用例(test/integration/cli-prompt-entry.test.mjs)显式覆盖本调用路径。
|
|
37
|
+
// U2(CORE-UNIFICATION §2.6.3 专项补⑦ / §2.13.8(六)):CLI 端锚取值表——**进程入口、任何装配之前**注册一次(调用期应用 ⇒ 无导入序要求)。
|
|
38
|
+
// 漏配 = 锚字面静默进模型 ⇒ 入口面用例(test/integration/cli-prompt-entry.test.mjs)显式覆盖本调用路径。
|
|
38
39
|
configurePromptInjections(CLI_PROMPT_INJECTIONS)
|
|
39
40
|
|
|
40
41
|
const [command, ...args] = process.argv.slice(2)
|
|
@@ -116,7 +117,11 @@ Usage:
|
|
|
116
117
|
Extract knowledge candidates from a session
|
|
117
118
|
transcript file; confirm each before saving
|
|
118
119
|
thincoder session gc --dry-run | --confirm <hash|--all>
|
|
119
|
-
Session dir GC: report/
|
|
120
|
+
Session dir GC: report/recycle cold & stale project data into a 7-day recycle bin
|
|
121
|
+
(cold = manifest idle >90d; stale = no live owner + unreachable/empty cwd + 7-day window)
|
|
122
|
+
thincoder session index [--status | --rebuild]
|
|
123
|
+
Derived session index (disposable, rebuilt on demand): --status reports sessions /
|
|
124
|
+
messages / tool calls + coverage + size; --rebuild reindexes every session file
|
|
120
125
|
thincoder upgrade Update to the latest version from npm
|
|
121
126
|
thincoder completion <sh> Generate shell completion script (bash / zsh / fish)
|
|
122
127
|
thincoder -v, --version Print version
|
|
@@ -134,12 +139,25 @@ function exitSoon(code) {
|
|
|
134
139
|
setTimeout(() => process.exit(code), 100)
|
|
135
140
|
}
|
|
136
141
|
|
|
137
|
-
// D-TR9(2026-09-05):启动轨迹清理——删除超过 traces.retentionHours(默认 24h
|
|
138
|
-
//
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
// D-TR9(2026-09-05):启动轨迹清理——删除超过 traces.retentionHours(默认 24h)的轨迹文件
|
|
143
|
+
// (fire-and-forget——不阻塞启动——失败静默——与轨迹写盘同纪律)。
|
|
144
|
+
// D-TR13(2026-09-21 · STARTUP-LATENCY 批 · TRACES.md §6.4):触发面 = **会话型命令白名单**
|
|
145
|
+
// (`tui` 含无参默认路径 `command === undefined` / `chat` / `acp`);白名单外命令(`--version` /
|
|
146
|
+
// `--help` / `completion` / `memory` / `sync` / `reindex` / `distill` / `upgrade` / `session`)
|
|
147
|
+
// 零启动清理。**启动清理 = 启动窗外延迟拍**——核侧 `scheduleTraceCleanup`(`TRACE_CLEANUP_DELAY_MS` = 3s,自调度点起;失败静默 / 不 unref 保后台排空)。
|
|
148
|
+
if (command === undefined || command === "tui" || command === "chat" || command === "acp") {
|
|
149
|
+
try {
|
|
150
|
+
const startupCfg = loadConfig()
|
|
151
|
+
scheduleTraceCleanup({ dir: tracesRoot(), retentionHours: startupCfg.traces?.retentionHours ?? 24 })
|
|
152
|
+
} catch { /* 配置缺失/损坏 → 跳过清理(零风险) */ }
|
|
153
|
+
// SESSION.md §6.19 D-SE45 触发点②(2026-09-22 会话索引批):派生索引启动窗外延迟拍
|
|
154
|
+
// (核侧 `scheduleSessionIndexPass`——3s 起 / 单趟 ≤2s 且 ≤40 会话 / 每进程一次;与轨迹清理
|
|
155
|
+
// 同址簇、同纪律:失败静默、不 unref)。索引 = 派生品(零权威)——主存零险。
|
|
156
|
+
try {
|
|
157
|
+
const { scheduleSessionIndexPass } = await import("@thincoder/core/session-index-pass.mjs")
|
|
158
|
+
scheduleSessionIndexPass()
|
|
159
|
+
} catch { /* 拍挂点失败静默——不阻断启动 */ }
|
|
160
|
+
}
|
|
143
161
|
|
|
144
162
|
switch (command) {
|
|
145
163
|
case "chat": {
|
|
@@ -414,7 +432,15 @@ switch (command) {
|
|
|
414
432
|
}
|
|
415
433
|
|
|
416
434
|
case "session": {
|
|
417
|
-
// SESSION.md §6.12:会话目录 GC
|
|
435
|
+
// SESSION.md §6.12 / §6.17:会话目录 GC 显式面(冷 cwd 90 天面 + 三合取存量组全量面)——
|
|
436
|
+
// 双端同面(2026-09-21 端差注销:VS Code 端命令 `thincoder.sessionGc` 走同一核数据面)。
|
|
437
|
+
// SESSION.md §6.19 D-SE46(2026-09-22 会话索引批):`session index` = 派生索引库显式面
|
|
438
|
+
// (--status 读数 / --rebuild 全量重扫)——同一 `session` 分发族(壳侧分发,实现在核)。
|
|
439
|
+
if (args[0] === "index") {
|
|
440
|
+
const { runSessionIndex } = await import("@thincoder/core/session-index-cmd.mjs")
|
|
441
|
+
process.exitCode = await runSessionIndex(args)
|
|
442
|
+
break
|
|
443
|
+
}
|
|
418
444
|
const { runSessionGc } = await import("@thincoder/core/session-gc.mjs")
|
|
419
445
|
process.exitCode = await runSessionGc(args)
|
|
420
446
|
break
|