thincoder 0.12.70 → 0.12.71
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
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [Unreleased]
|
|
2
|
+
|
|
3
|
+
> 0.12.70 → 0.12.71(连续号——发布时定号)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **台账变体键首启提示(#935)**:盘符大小写变体旧库检测 + `migrate` 指引一行。
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **核依赖升级**:`@thincoder/core` `^0.10.3` → `^0.10.4`(消化账务 ∥ 评审闸 ∥ 工程写闸等随核生效)。
|
|
12
|
+
- **消化账务(#930)**:未结可见 ∥ 重试升级(TUI 面随核同源)。
|
|
13
|
+
- **bash 执行器身份(#922)**:注入执行器行(TUI 提示随实跑 shell)。
|
|
14
|
+
|
|
1
15
|
## [0.12.70] — 2026-10-04
|
|
2
16
|
|
|
3
17
|
> 0.12.69 → 0.12.70(连续号——发布时定号)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thincoder",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.71",
|
|
4
4
|
"description": "Thin coding agent - zero third-party dependencies, no build step, Node.js native. Sharp code, zero bloat.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"node": ">=24"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@thincoder/core": "^0.10.
|
|
23
|
+
"@thincoder/core": "^0.10.4"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"bin/",
|
package/src/acp/bridge.mjs
CHANGED
|
@@ -167,6 +167,10 @@ export function buildAcpCallbacks({ sessionId, agent, notify, request, log = ()
|
|
|
167
167
|
* 读全部涉及文件缓冲(同文件去重——一次读)→ 逐条 computeEditEntry(EDIT_ABORT_PREFIX——批量
|
|
168
168
|
* 原子前缀;同文件条目按数组序串行累积——第二条基于第一条结果)→ 全部通过 → 逐文件写回
|
|
169
169
|
* 一次(判失败 → 零写;写失败 → 同本地 edit-batch 既有原子语义)。 */
|
|
170
|
+
/** ACP batch-edit 通道——与 EDIT.md:#796 汇总行体系**无关**。
|
|
171
|
+
* 桥面 `outcomes.map(...).join("\\n")` 自持逐条文字行,不经 `applyEditBatch`/`diffLines`/offload;
|
|
172
|
+
* 距 64K offload 阈值远 + 不含 diff 结构 ⇒ 不在 offload 盲区范围。**判定:非 #796 射程(#908)**。
|
|
173
|
+
*/
|
|
170
174
|
const editBatch = async (args) => {
|
|
171
175
|
const edits = args.edits
|
|
172
176
|
assertEditsContainer(edits)
|
|
@@ -167,6 +167,13 @@ export async function tuiCommand(ctx) {
|
|
|
167
167
|
)
|
|
168
168
|
}
|
|
169
169
|
const { startTUI } = await import("./tui.mjs")
|
|
170
|
+
// F-LX3(批 2026-10-05-ledger-variant-db-notice · 台账 #935 · LEDGER.md §12.2):变体键库首跑检测提示——
|
|
171
|
+
// 动态 import(新档静态链入 node:sqlite——W8 契约②)+ import ∥ 调用整段 try(静默降级:失败 ⇒ 不传 opts)
|
|
172
|
+
let ledgerVariantNotice
|
|
173
|
+
try {
|
|
174
|
+
const { ledgerVariantNotice: detect } = await import("@thincoder/core/ledger-variant-notice.mjs")
|
|
175
|
+
ledgerVariantNotice = detect({ cwd: agent.cwd, locale: agent.config?.locale }) ?? undefined
|
|
176
|
+
} catch { /* 静默降级——绝不阻塞启动 */ }
|
|
170
177
|
try {
|
|
171
178
|
await startTUI(agent, {
|
|
172
179
|
projectDir: config.memory.projectDir ? (isAbsolute(config.memory.projectDir) ? config.memory.projectDir : join(process.cwd(), config.memory.projectDir)) : null,
|
|
@@ -175,6 +182,8 @@ export async function tuiCommand(ctx) {
|
|
|
175
182
|
restored: data ? sessionDescriptor(agent, data) : data,
|
|
176
183
|
// R25(F-R25c):TUI 启动显示一行"上次运行异常终止"提示(showStartup 渲染——无匹配不传)
|
|
177
184
|
crashNotice: recentCrashHint() ?? undefined,
|
|
185
|
+
// F-LX3(同上):变体键库首跑提示行(showStartup 渲染——无命中不传)
|
|
186
|
+
ledgerVariantNotice,
|
|
178
187
|
})
|
|
179
188
|
} catch (error) {
|
|
180
189
|
console.error(`[error] ${error.message}`)
|
|
@@ -8,13 +8,30 @@
|
|
|
8
8
|
*
|
|
9
9
|
* 2026-09-17 消端差:提示词面(persona / discipline / common)注入锚全消——导航注记删
|
|
10
10
|
* (正文自足)、端特有段通用化并入核内正文、文档地图路径统一写死 `docs/README.md`。
|
|
11
|
-
* 剩 = 工具面 2 锚(bash-terminal-face / question-ui-face
|
|
11
|
+
* 剩 = 工具面 2 锚(bash-terminal-face / question-ui-face)。
|
|
12
|
+
*
|
|
13
|
+
* bash-executor-face 批(台账 #922):`bash-terminal-face` 激活 = 运行时执行器身份声明行
|
|
14
|
+
* (核心单源 `resolveShellIdentity`——spawn 同链探测 + memo 按配置值键控)。
|
|
15
|
+
* 求值形态 = **import 期求值**(端装配层求值路径——核心缝 `applyPromptInjections` 为纯字符串
|
|
16
|
+
* 替换、不支持函数值键:函数值会被 String.replace 字符串化)。求值时机 = 注册前、任何装配前;
|
|
17
|
+
* **描述面值随进程启动固定**——进程内改 `shell` 配置不刷新本行(重启生效);hint 门
|
|
18
|
+
* (核 `tools/bash.mjs` 逐执行调用同一单源)按配置值 memo 键控重探。
|
|
19
|
+
* 偏差登记 = 批次档 §5(设计终值「值函数 / 重装配期求值」于纯字符串缝不可达——取端装配层前置求值)。
|
|
20
|
+
* 机制权威 = `docs/core/design/BASH-EXECUTOR-FACE.md` §2 值面 + §3.2。
|
|
12
21
|
*/
|
|
13
22
|
|
|
14
|
-
|
|
23
|
+
import { resolveShellIdentity, executorLine } from "@thincoder/core/shell-identity.mjs"
|
|
24
|
+
import { loadConfig } from "@thincoder/core/config.mjs"
|
|
25
|
+
|
|
26
|
+
// 配置读容错(先例 = `bin/thincoder.mjs:54` 同式「配置缺失/损坏 ⇒ 各向默认」):读取失败不阻断进程,
|
|
27
|
+
// 读失败 ⇒ null ⇒ 默认链(fail-open——探测面不猜)。
|
|
28
|
+
function configShell() {
|
|
29
|
+
try { return loadConfig()?.shell ?? null } catch { return null }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// CLI 无 terminal 参数(工具面 review 再统一)⇒ 执行器声明行单值。
|
|
15
33
|
export const CLI_PROMPT_INJECTIONS = {
|
|
16
|
-
|
|
17
|
-
"bash-terminal-face": "",
|
|
34
|
+
"bash-terminal-face": executorLine(resolveShellIdentity(configShell())),
|
|
18
35
|
// question 工具可用性行(核内正文该行已移出正文、锚原位替换——本端填回 CLI 措辞)
|
|
19
36
|
"question-ui-face": "- Availability: this tool needs an interactive UI — in contexts without one (headless runs) it returns an error instead of asking; subagent children (depth>0) never get it (excluded from their tool tables); put the question in your reply text instead.",
|
|
20
37
|
}
|
|
@@ -33,9 +33,11 @@ export function digestCapRecord(turns) {
|
|
|
33
33
|
return { kind: "digest", status: "cap", mode: "stop", turns }
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/** digest 收尾记录(终态行同点):`ok` ∥ `ms`(行文案 `seconds` 由同一 `ms`
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
/** digest 收尾记录(终态行同点):`ok` ∥ `ms`(行文案 `seconds` 由同一 `ms` 派生——同值单算式);
|
|
37
|
+
* `unsettled` = 本轮未销账条数(消化账务批 · 2026-10-05 · 台账 #930 —— 残余行判据 ∥ 重建同调;
|
|
38
|
+
* 零未销账 ⇒ 键缺席——零噪音,与帧面「> 0 才携」同判)。 */
|
|
39
|
+
export function digestEndRecord({ ok, ms, unsettled = 0 }) {
|
|
40
|
+
return { kind: "digest", status: "end", ok, ms, ...(Number.isFinite(unsettled) && unsettled > 0 ? { unsettled } : {}) }
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
/** subagent 归档快照记录(冻结载体行插入同点):meta = 冻结时点块头事实(含 `pool`/`queued?`——§6.26)
|
|
@@ -114,7 +116,13 @@ export function digestTraceLines(rec, startN = null) {
|
|
|
114
116
|
if (rec.status === "end") {
|
|
115
117
|
if (!Number.isFinite(startN) || startN <= 0 || !Number.isFinite(rec.ms)) return []
|
|
116
118
|
const seconds = (rec.ms / 1000).toFixed(1) // 与记录 `ms` 同值单算式
|
|
117
|
-
|
|
119
|
+
const lines = [{ text: t(rec.ok === false ? "digest.aborted" : "digest.done", { n: startN, seconds }), color: C.dim }]
|
|
120
|
+
// 未销账残余行(消化账务批 · 2026-10-05 · 台账 #930 · §6.31.6):终态行之后再落一行 dim
|
|
121
|
+
// (核字典 `digest.residue` 单源——端侧零自持字面);零未销账 ⇒ 零行(零噪音)。
|
|
122
|
+
// 随终态行同门(重建面 `startN` 不可得 ⇒ 零行——fail-closed)。
|
|
123
|
+
const unsettled = Number.isFinite(rec.unsettled) && rec.unsettled > 0 ? rec.unsettled : 0
|
|
124
|
+
if (unsettled > 0) lines.push({ text: t("digest.residue", { n: unsettled }), color: C.dim })
|
|
125
|
+
return lines
|
|
118
126
|
}
|
|
119
127
|
return []
|
|
120
128
|
}
|
package/src/tui/startup.mjs
CHANGED
|
@@ -244,6 +244,8 @@ export function showStartup(ctx) {
|
|
|
244
244
|
// R25(F-R25c):上次运行异常终止提示——bin 入口扫描 crash-reports(24h 窗)经
|
|
245
245
|
// startTUI opts.crashNotice 传入——无匹配为 undefined → 不提示(负例)
|
|
246
246
|
if (opts.crashNotice) pushLine(opts.crashNotice, C.warn)
|
|
247
|
+
// F-LX3(批 2026-10-05-ledger-variant-db-notice · 台账 #935 · LEDGER.md §12.2):变体键库首跑提示(恰一行;无命中不传)
|
|
248
|
+
if (opts.ledgerVariantNotice) pushLine(opts.ledgerVariantNotice, C.warn)
|
|
247
249
|
|
|
248
250
|
// Recover previous session: rebuild from history (lazy — display snapshot is
|
|
249
251
|
// deprecated; it drifted out of sync with history on VS Code writes).
|
|
@@ -28,6 +28,8 @@ import { upstreamAskLabelVars } from "@thincoder/core/agent-tools/parent-channel
|
|
|
28
28
|
import { poolLive, startSuspension } from "@thincoder/core/agent/suspension.mjs"
|
|
29
29
|
// #726 写点①:痕行 ∥ 起跑·收尾记录同点双动作(记录形/文案 = lifecycle-records 单一实现)
|
|
30
30
|
import { pushRecord } from "@thincoder/core/context.mjs"
|
|
31
|
+
// 消化账务批 · 2026-10-05 · 台账 #930(§6.31.6):残余行判据单源(核件 `unsettledCount`)
|
|
32
|
+
import { unsettledCount } from "@thincoder/core/agent/digest-account.mjs"
|
|
31
33
|
import { digestEndRecord, digestStartRecord, digestTraceLines, recordCarrier } from "./lifecycle-records.mjs"
|
|
32
34
|
|
|
33
35
|
export { poolLive }
|
|
@@ -90,7 +92,9 @@ function backgroundStatusText(agent) {
|
|
|
90
92
|
* 起跑行 ∥ 计数行 ∥ cap 行 ∥ 终态行:不改 ∥ 不删 ∥ 不退场(零清理机器;退场机随拆);② 起跑窗
|
|
91
93
|
* (沿 #754 裁 A)——起跑行族落盘后 ⇒ 起跑快照(起跑刻 pending 单容器)逐条冻结入流,落位 = 本族之后;
|
|
92
94
|
* ③ 终态行 = **到达序追加于当刻流末**(`pushLine`——零就地换文 ∥ 不动原起跑行)。
|
|
93
|
-
* 导出面 = 批内件直驱(生产唯一调用 = 本档 `driveTurn`)。
|
|
95
|
+
* 导出面 = 批内件直驱(生产唯一调用 = 本档 `driveTurn`)。
|
|
96
|
+
* **消化账务批(2026-10-05 · 台账 #930 · §6.31.6)**:收尾 `unsettled` 随记录(非上行轮——与桌面 ∥
|
|
97
|
+
* VSC 同判据;判据单源 = 核 `unsettledCount`)⇒ 终态行之后再落残余行(`digest.residue`——lifecycle-records 单实现)。 */
|
|
94
98
|
export async function digestTurn(ctx, upstream = false) {
|
|
95
99
|
const { agent, state, pushLine } = ctx
|
|
96
100
|
const manual = !agent.autoApprove
|
|
@@ -111,7 +115,10 @@ export async function digestTurn(ctx, upstream = false) {
|
|
|
111
115
|
const outcome = await runAgentTurn(digestCtx, "", { autoTurn: true, upstreamTurn: upstream, skipSession: true })
|
|
112
116
|
const ms = Date.now() - d0
|
|
113
117
|
logEvent("digest:end", { pendingN: pendingFamilyCount(agent), ms, ...(upstream ? { upstream: true } : {}) })
|
|
114
|
-
|
|
118
|
+
// 消化账务批(§6.31.6):非上行轮且 > 0 才携 `unsettled`(残余行载荷——与桌面 ∥ VSC 同判据;
|
|
119
|
+
// 消化轮 = `autoTurn ∧ ¬upstreamTurn`,§6.31.2)
|
|
120
|
+
const unsettled = upstream ? 0 : unsettledCount(agent)
|
|
121
|
+
const endRec = digestEndRecord({ ok: outcome === "ok", ms, unsettled })
|
|
115
122
|
// ③ 终态行 = 到达序追加于当刻流末(自然形——零就地换文 ∥ 不动原起跑行)
|
|
116
123
|
for (const l of digestTraceLines(endRec, pend0)) pushLine(l.text, l.color)
|
|
117
124
|
pushRecord(carrier, endRec) // 收尾记录(与终态行同点)
|