mocode-ai 1.9.9 → 1.10.1
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/dist/agent/index.js +13 -3
- package/dist/agent/mentioned-files.js +71 -0
- package/dist/agent/model-turn.js +83 -16
- package/dist/agent/progress-guard.js +67 -0
- package/dist/agent/run-coordinator.js +151 -23
- package/dist/agent/short-path-completion.js +109 -0
- package/dist/agent/spawn.js +46 -0
- package/dist/agent/stages/history-manager.js +1 -0
- package/dist/agent/tool-helpers.js +2 -2
- package/dist/agent/tool-turn.js +49 -4
- package/dist/agent/work-discipline.js +9 -9
- package/dist/changeset/unified-diff.js +59 -0
- package/dist/config/index.js +13 -10
- package/dist/context/relevance.js +2 -1
- package/dist/context/usage-snapshot.js +50 -0
- package/dist/headless.js +3 -1
- package/dist/host/commit-message.js +41 -0
- package/dist/host/protocol.js +205 -10
- package/dist/host/stdio.js +1096 -63
- package/dist/i18n/index.js +26 -10
- package/dist/llm/index.js +28 -3
- package/dist/llm/message-shape.js +45 -0
- package/dist/llm/providers/anthropic.js +2 -0
- package/dist/llm/reasoning.js +17 -0
- package/dist/memory/adoption.js +159 -27
- package/dist/memory/anchor-relocate.js +227 -0
- package/dist/memory/consolidate-skips.js +196 -0
- package/dist/memory/health.js +88 -6
- package/dist/memory/index.js +2 -1
- package/dist/memory/reflect.js +36 -4
- package/dist/memory/store.js +30 -0
- package/dist/models/reasoning-cap.js +19 -2
- package/dist/orchestrator/lane-executor.js +7 -1
- package/dist/orchestrator/repl.js +30 -49
- package/dist/prompt/system-prompt.js +30 -0
- package/dist/repl/commands/appearance.js +1 -2
- package/dist/repl/commands/compact.js +4 -0
- package/dist/repl/commands/diff.js +5 -46
- package/dist/repl/commands/memory.js +77 -4
- package/dist/repl/commands/model-actions.js +4 -3
- package/dist/repl/commands/model.js +2 -3
- package/dist/repl/message-format.js +7 -6
- package/dist/repl/running-input.js +27 -65
- package/dist/repl/runtime.js +129 -89
- package/dist/repl/status-bar.js +4 -38
- package/dist/rollback/store.js +36 -23
- package/dist/runtime/browser-diagnostics.js +77 -0
- package/dist/runtime/browser-manager.js +150 -22
- package/dist/runtime/runtime.js +1 -1
- package/dist/session/compact.js +44 -4
- package/dist/session/retention.js +4 -0
- package/dist/session/short-path-metrics.js +185 -0
- package/dist/session/store.js +78 -3
- package/dist/session/terminal-transcript.js +101 -0
- package/dist/tools/builtins/ask-human.js +2 -2
- package/dist/tools/builtins/browser.js +4 -1
- package/dist/tools/builtins/edit-file.js +28 -5
- package/dist/tools/builtins/grep.js +85 -35
- package/dist/tools/builtins/memory-save.js +1 -1
- package/dist/tools/builtins/memory-update.js +1 -1
- package/dist/tools/builtins/plan-update.js +4 -2
- package/dist/tools/builtins/read-file.js +95 -44
- package/dist/tools/builtins/run-command.js +57 -9
- package/dist/tools/builtins/task.js +4 -0
- package/dist/tools/constants.js +8 -0
- package/dist/tools/ripgrep-client.js +31 -11
- package/dist/tools/tool-runtime.js +29 -8
- package/dist/ui/layout-internal/content-write.js +7 -3
- package/dist/ui/layout-internal/core.js +1 -1
- package/dist/ui/layout-internal/state.js +0 -6
- package/dist/ui/layout-internal/statusbar.js +0 -30
- package/dist/ui/output-sink.js +24 -0
- package/dist/ui/spinner.js +3 -1
- package/package.json +4 -2
|
@@ -92,6 +92,7 @@ export function runRipgrep(params, signal) {
|
|
|
92
92
|
let buffer = '';
|
|
93
93
|
const byPath = new Map();
|
|
94
94
|
let scanned = 0;
|
|
95
|
+
let completeMatches = 0;
|
|
95
96
|
const finish = (result) => {
|
|
96
97
|
if (settled)
|
|
97
98
|
return;
|
|
@@ -103,6 +104,11 @@ export function runRipgrep(params, signal) {
|
|
|
103
104
|
killTree(child);
|
|
104
105
|
finish({ status: 'aborted' });
|
|
105
106
|
};
|
|
107
|
+
const stopCollecting = () => {
|
|
108
|
+
truncated = true;
|
|
109
|
+
buffer = '';
|
|
110
|
+
killTree(child);
|
|
111
|
+
};
|
|
106
112
|
const handleLine = (line) => {
|
|
107
113
|
let evt;
|
|
108
114
|
try {
|
|
@@ -114,22 +120,36 @@ export function runRipgrep(params, signal) {
|
|
|
114
120
|
const data = evt.data;
|
|
115
121
|
if (!data)
|
|
116
122
|
return;
|
|
123
|
+
if (evt.type === 'summary') {
|
|
124
|
+
// end 事件只来自命中文件;零命中时由 summary 区分「搜过」和「没有文件可搜」。
|
|
125
|
+
const searches = data.stats?.searches;
|
|
126
|
+
if (typeof searches === 'number')
|
|
127
|
+
scanned = searches;
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const pathText = data.path?.text;
|
|
131
|
+
if (typeof pathText !== 'string')
|
|
132
|
+
return;
|
|
117
133
|
if (evt.type === 'end') {
|
|
118
134
|
scanned++;
|
|
135
|
+
completeMatches += byPath.get(normalizePath(pathText))?.matches.length ?? 0;
|
|
119
136
|
return;
|
|
120
137
|
}
|
|
121
138
|
if (evt.type !== 'match' && evt.type !== 'context')
|
|
122
139
|
return;
|
|
123
|
-
const pathText = data.path?.text;
|
|
124
140
|
const lineNo = data.line_number;
|
|
125
141
|
const linesText = data.lines?.text;
|
|
126
|
-
if (typeof
|
|
142
|
+
if (typeof lineNo !== 'number' || typeof linesText !== 'string')
|
|
127
143
|
return;
|
|
128
144
|
const path = normalizePath(pathText);
|
|
129
|
-
if (!isInsideRoot(path))
|
|
130
|
-
return; // 后置兜底:仅留牢内
|
|
131
145
|
let bucket = byPath.get(path);
|
|
132
146
|
if (!bucket) {
|
|
147
|
+
if (!isInsideRoot(path))
|
|
148
|
+
return;
|
|
149
|
+
if (params.maxMatches !== undefined && completeMatches >= params.maxMatches) {
|
|
150
|
+
stopCollecting();
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
133
153
|
bucket = { path, matches: [], contexts: [] };
|
|
134
154
|
byPath.set(path, bucket);
|
|
135
155
|
}
|
|
@@ -139,16 +159,16 @@ export function runRipgrep(params, signal) {
|
|
|
139
159
|
else
|
|
140
160
|
bucket.contexts.push(event);
|
|
141
161
|
};
|
|
162
|
+
child.stdout.setEncoding('utf8');
|
|
142
163
|
child.stdout.on('data', (chunk) => {
|
|
143
|
-
if (settled)
|
|
164
|
+
if (settled || truncated)
|
|
144
165
|
return;
|
|
145
|
-
collected += chunk
|
|
146
|
-
if (collected > MAX_JSON_BYTES
|
|
147
|
-
|
|
148
|
-
killTree(child); // 输出已超预算,没必要继续
|
|
166
|
+
collected += Buffer.byteLength(chunk);
|
|
167
|
+
if (collected > MAX_JSON_BYTES) {
|
|
168
|
+
stopCollecting();
|
|
149
169
|
return;
|
|
150
170
|
}
|
|
151
|
-
buffer += chunk
|
|
171
|
+
buffer += chunk;
|
|
152
172
|
let idx;
|
|
153
173
|
while ((idx = buffer.indexOf('\n')) >= 0) {
|
|
154
174
|
const line = buffer.slice(0, idx);
|
|
@@ -186,7 +206,7 @@ export function runRipgrep(params, signal) {
|
|
|
186
206
|
finish({ status: 'no-match', scanned, truncated });
|
|
187
207
|
return;
|
|
188
208
|
}
|
|
189
|
-
finish({ status: 'ok', files: [...byPath.values()], scanned, truncated });
|
|
209
|
+
finish({ status: 'ok', files: [...byPath.values()], scanned, truncated: truncated || code !== 0 });
|
|
190
210
|
});
|
|
191
211
|
if (signal) {
|
|
192
212
|
if (signal.aborted)
|
|
@@ -330,11 +330,25 @@ export class ToolRuntime {
|
|
|
330
330
|
async executeToolOnce(tool, args, signal, opts) {
|
|
331
331
|
const startedAt = Date.now();
|
|
332
332
|
const capabilities = this.getToolCapabilities(tool);
|
|
333
|
+
const commandStartedAt = tool.name === 'run_command' ? performance.now() : undefined;
|
|
334
|
+
const commandTiming = commandStartedAt === undefined ? undefined : { totalMs: 0 };
|
|
335
|
+
const captureWorkspace = async (phase, capture) => {
|
|
336
|
+
if (!commandTiming)
|
|
337
|
+
return capture();
|
|
338
|
+
const captureStartedAt = performance.now();
|
|
339
|
+
try {
|
|
340
|
+
return await capture();
|
|
341
|
+
}
|
|
342
|
+
finally {
|
|
343
|
+
commandTiming[phase] = performance.now() - captureStartedAt;
|
|
344
|
+
}
|
|
345
|
+
};
|
|
333
346
|
let mutationVersionBefore;
|
|
334
347
|
let capturedPath;
|
|
348
|
+
let outcome;
|
|
335
349
|
try {
|
|
336
350
|
const requests = this.dependencies.resolveResourceLockRequests(capabilities, args);
|
|
337
|
-
|
|
351
|
+
outcome = await this.dependencies.resourceLockManager.withLocks(requests, signal, async () => {
|
|
338
352
|
opts?.onLockAcquired?.(args);
|
|
339
353
|
const mutationBefore = this.dependencies.getCurrentTurnMutationState();
|
|
340
354
|
mutationVersionBefore = mutationBefore.version;
|
|
@@ -346,7 +360,7 @@ export class ToolRuntime {
|
|
|
346
360
|
: null;
|
|
347
361
|
capturedPath = pathCapture?.path;
|
|
348
362
|
const workspaceCapture = capabilities.effect === 'process' || capabilities.effect === 'unknown'
|
|
349
|
-
? await this.dependencies.beginWorkspaceMutation()
|
|
363
|
+
? await captureWorkspace('workspaceBeforeMs', () => this.dependencies.beginWorkspaceMutation())
|
|
350
364
|
: null;
|
|
351
365
|
let raw;
|
|
352
366
|
try {
|
|
@@ -358,12 +372,15 @@ export class ToolRuntime {
|
|
|
358
372
|
delegation: opts?.delegation,
|
|
359
373
|
readDedup: opts?.readDedup,
|
|
360
374
|
});
|
|
375
|
+
if (commandTiming && isStructuredOutcome(raw))
|
|
376
|
+
commandTiming.commandMs = raw.durationMs;
|
|
361
377
|
}
|
|
362
378
|
finally {
|
|
363
379
|
if (pathCapture)
|
|
364
380
|
this.dependencies.endPathMutation(pathCapture, tool.name);
|
|
365
|
-
if (workspaceCapture)
|
|
366
|
-
await this.dependencies.endWorkspaceMutation(workspaceCapture, tool.name);
|
|
381
|
+
if (workspaceCapture) {
|
|
382
|
+
await captureWorkspace('workspaceAfterMs', () => this.dependencies.endWorkspaceMutation(workspaceCapture, tool.name));
|
|
383
|
+
}
|
|
367
384
|
}
|
|
368
385
|
const mutationAfter = this.dependencies.getCurrentTurnMutationState();
|
|
369
386
|
const changedFiles = mutationAfter.version !== mutationBefore.version
|
|
@@ -385,10 +402,14 @@ export class ToolRuntime {
|
|
|
385
402
|
? mutationAfter.changedFiles.filter((item) => item.path === capturedPath).map((item) => item.path)
|
|
386
403
|
: mutationAfter.changedFiles.map((item) => item.path)
|
|
387
404
|
: [];
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
405
|
+
outcome =
|
|
406
|
+
signal?.aborted || (error instanceof Error && error.name === 'AbortError')
|
|
407
|
+
? terminalOutcome('aborted', 'ABORTED', t('command.interrupted'), startedAt, changedFiles)
|
|
408
|
+
: executionErrorOutcome(tool.name, error, startedAt, changedFiles);
|
|
392
409
|
}
|
|
410
|
+
if (!commandTiming || commandStartedAt === undefined)
|
|
411
|
+
return outcome;
|
|
412
|
+
commandTiming.totalMs = performance.now() - commandStartedAt;
|
|
413
|
+
return { ...outcome, commandTiming };
|
|
393
414
|
}
|
|
394
415
|
}
|
|
@@ -7,6 +7,7 @@ import * as content from '../content.js';
|
|
|
7
7
|
import { reset as resetBatches, shiftBatchesAfter, shiftBatchesForReflow } from '../batch.js';
|
|
8
8
|
import { renderMarkdownWithMeta } from '../markdown.js';
|
|
9
9
|
import { state } from './state.js';
|
|
10
|
+
import { isStdoutMuted } from '../output-sink.js';
|
|
10
11
|
import { esc, cup, getGeo, setRegion, runningCaretPos } from './screen.js';
|
|
11
12
|
import { viewportAbsStart, repaintViewport } from './scroll.js';
|
|
12
13
|
// ── 流式 markdown 渲染节流(2026-10-05)──
|
|
@@ -57,7 +58,8 @@ export function shouldRenderMdSegment(elapsedNow, pendingChars) {
|
|
|
57
58
|
*/
|
|
58
59
|
export function contentWrite(s) {
|
|
59
60
|
if (!state.active || !ui.isTTY) {
|
|
60
|
-
|
|
61
|
+
if (!isStdoutMuted())
|
|
62
|
+
stdout.write(s);
|
|
61
63
|
return;
|
|
62
64
|
}
|
|
63
65
|
if (state.mdActive)
|
|
@@ -373,7 +375,8 @@ export function flushMdSegment() {
|
|
|
373
375
|
*/
|
|
374
376
|
export function contentWriteMd(s) {
|
|
375
377
|
if (!state.active || !ui.isTTY) {
|
|
376
|
-
|
|
378
|
+
if (!isStdoutMuted())
|
|
379
|
+
stdout.write(s);
|
|
377
380
|
return;
|
|
378
381
|
}
|
|
379
382
|
if (!state.mdActive)
|
|
@@ -403,7 +406,8 @@ export function contentWriteMd(s) {
|
|
|
403
406
|
*/
|
|
404
407
|
export function contentWriteMdOnce(s) {
|
|
405
408
|
if (!state.active || !ui.isTTY) {
|
|
406
|
-
|
|
409
|
+
if (!isStdoutMuted())
|
|
410
|
+
stdout.write(s);
|
|
407
411
|
return;
|
|
408
412
|
}
|
|
409
413
|
if (state.mdActive)
|
|
@@ -30,7 +30,7 @@ import { paintInput, repaint } from './input-paint.js';
|
|
|
30
30
|
import { WHEEL_LINES, screenRowToAbsLine, repaintViewport, scrollBy, scrollWheel, resetScroll, lockScrollToBottom, } from './scroll.js';
|
|
31
31
|
import { contentWrite, contentInsertAfter, contentDeleteFrom, contentReplaceLine, reflowContentForResize, flushMdSegment, } from './content-write.js';
|
|
32
32
|
export { isTuiActive, getGeo, getEffectiveContentBottom, setRegion, contentMode, isStreamingPaused } from './screen.js';
|
|
33
|
-
export { drawStatusBar, setStatus, stopTurnTimer, startTurnTimerIfRunning, paintLiveAtCursor, clearLiveAtCursor, setLiveUsage,
|
|
33
|
+
export { drawStatusBar, setStatus, stopTurnTimer, startTurnTimerIfRunning, paintLiveAtCursor, clearLiveAtCursor, setLiveUsage, setStatusBase, setPendingAttachChips, togglePlanExpanded, togglePlanDetail, } from './statusbar.js';
|
|
34
34
|
export { paintInput, paintRunningInput, repaint } from './input-paint.js';
|
|
35
35
|
export { isScrolled, repaintViewport, repaintContentLine, scrollBy, scrollWheel, resetScroll, setMenuReserve, lockScrollToBottom, unlockScroll, isScrollLocked, } from './scroll.js';
|
|
36
36
|
export { contentWrite, writeBanner, rewriteBanner, bannerHeight, contentWriteMd, contentWriteMdOnce, clearContent, rewindContent, writeWelcomeBlock, dismissWelcomeBlock, contentInsertAfter, contentDeleteFrom, totalRows, isLastContentRowBlank, normalizeMutationBoundary, normalizeInputBoundary, contentReplaceLine, notifyContentReset, } from './content-write.js';
|
|
@@ -69,12 +69,6 @@ export const state = {
|
|
|
69
69
|
* composeModelLine 在 RUNNING 态把它画成 chip 放 context 进度条左侧;
|
|
70
70
|
* 不主动触发重画——RUNNING 态 turnTimer 80ms 心跳重画自然取最新值。 */
|
|
71
71
|
liveUsage: undefined,
|
|
72
|
-
/** 运行态已排队消息:队首(第一条/下一条待自动发送)纯文本预览,无=undefined。 */
|
|
73
|
-
queuedText: undefined,
|
|
74
|
-
/** 队首排队消息入队时的模式,用于在 chip 上标注 Plan/Auto。 */
|
|
75
|
-
queuedMode: undefined,
|
|
76
|
-
/** 排队剩余条数(>=1);1 = 单条不显示计数,>1 在 chip 上显示「×N」。 */
|
|
77
|
-
queuedCount: 1,
|
|
78
72
|
statusText: '',
|
|
79
73
|
spinnerFrame: undefined,
|
|
80
74
|
turnStart: null, // RUNNING 态起点(Date.now());INPUT 态为 null。composeStatus 据此拼走时。
|
|
@@ -64,12 +64,6 @@ export function composeSpinnerLine(status, cols) {
|
|
|
64
64
|
lead = `${ui.accent}●${ui.reset} ${ui.dim}${status.status}${ui.reset}`;
|
|
65
65
|
leadW = 1 + 1 + displayWidth(status.status);
|
|
66
66
|
}
|
|
67
|
-
// 排队下一跳:紧跟「● 状态(+走时)」右侧显示,运行中持续可见,当前任务结束即自动发送。
|
|
68
|
-
const queued = queuedChip();
|
|
69
|
-
if (queued) {
|
|
70
|
-
lead += ` ${queued.str}`;
|
|
71
|
-
leadW += 2 + queued.w;
|
|
72
|
-
}
|
|
73
67
|
// ── 右段:仅滚动回看时显历史指示 ──
|
|
74
68
|
let tail = '';
|
|
75
69
|
let tailW = 0;
|
|
@@ -577,30 +571,6 @@ export function clearLiveAtCursor() {
|
|
|
577
571
|
export function setLiveUsage(u) {
|
|
578
572
|
state.liveUsage = u;
|
|
579
573
|
}
|
|
580
|
-
/**
|
|
581
|
-
* 设置/清除运行态已排队消息 chip(显示在 `● 状态` 右侧)。
|
|
582
|
-
* text = 队首(第一条/下一条待自动发送)预览,多条排队时保持展示第一条不变;
|
|
583
|
-
* count = 排队总条数(>1 显示「×N」)。立即重画一次保证入队瞬间可见;之后 80ms 心跳会自然带上。
|
|
584
|
-
*/
|
|
585
|
-
export function setQueuedTurn(text, mode, count = 1) {
|
|
586
|
-
state.queuedText = text;
|
|
587
|
-
state.queuedMode = mode;
|
|
588
|
-
state.queuedCount = count;
|
|
589
|
-
drawStatusBar();
|
|
590
|
-
}
|
|
591
|
-
/** 排队 chip:▸ 排队[ ×N] · <第一条首行…>(Plan)。只拼左段,宽度另计(不含 ANSI)。 */
|
|
592
|
-
function queuedChip() {
|
|
593
|
-
const raw = state.queuedText;
|
|
594
|
-
if (!raw)
|
|
595
|
-
return null;
|
|
596
|
-
const firstLine = raw.split('\n')[0] ?? '';
|
|
597
|
-
const preview = truncateDisplay(firstLine.trim(), 32);
|
|
598
|
-
const modeTag = state.queuedMode === 'plan' ? t('status.queuePlanTag') : '';
|
|
599
|
-
const label = state.queuedCount > 1 ? t('status.queuedCount', { count: state.queuedCount }) : t('status.queued');
|
|
600
|
-
const plain = `${label} ${preview}${modeTag}`;
|
|
601
|
-
const str = `${ui.yellow}▸ ${plain}${ui.reset}`;
|
|
602
|
-
return { str, w: 2 + displayWidth(plain) };
|
|
603
|
-
}
|
|
604
574
|
/** 更新状态行基线(模型 / context / cwd / 模式标识 / 活跃 plan chip / 本轮 token chip)。repl 在轮次边界与切模式时调。 */
|
|
605
575
|
export function setStatusBase(b) {
|
|
606
576
|
state.base = b;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 非 TTY 输出闸门。
|
|
3
|
+
*
|
|
4
|
+
* `layout.contentWrite` / `Spinner` 在「布局没激活」时的兜底是直接 `stdout.write`——
|
|
5
|
+
* 这是 REPL 在管道 / 重定向下仍能看到正文的保证。但 stdio host(work-app 的 agent 子进程)
|
|
6
|
+
* 的 stdout 是 NDJSON 协议通道,裸文本进去就是**协议污染**:客户端 JSON.parse 失败 →
|
|
7
|
+
* 当成 diagnostic → 用户什么都看不到(压缩行、图片卡片行、压缩 spinner 全在这里丢掉)。
|
|
8
|
+
*
|
|
9
|
+
* 所以 host 启动时把闸门关掉:兜底写被丢弃,真正的用户可见反馈改由 NDJSON 事件承载
|
|
10
|
+
* (`context_compacted` / `image_relief` …)。REPL / headless 从不调 mute,行为零变化。
|
|
11
|
+
*/
|
|
12
|
+
let muted = false;
|
|
13
|
+
/** 关闭「非 TTY 直接写 stdout」的兜底。仅 stdio host 调用。 */
|
|
14
|
+
export function muteStdoutOutput() {
|
|
15
|
+
muted = true;
|
|
16
|
+
}
|
|
17
|
+
/** 兜底写是否已被关闭(宿主需要自己承担输出时返回 true)。 */
|
|
18
|
+
export function isStdoutMuted() {
|
|
19
|
+
return muted;
|
|
20
|
+
}
|
|
21
|
+
/** 测试用:复位闸门。 */
|
|
22
|
+
export function resetStdoutOutput() {
|
|
23
|
+
muted = false;
|
|
24
|
+
}
|
package/dist/ui/spinner.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { stdout } from 'node:process';
|
|
2
2
|
import { ui } from './theme.js';
|
|
3
|
+
import { isStdoutMuted } from './output-sink.js';
|
|
3
4
|
const FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
4
5
|
/**
|
|
5
6
|
* 当前活跃 spinner:`start()` 的 TTY 路径登记,`stop()` 不清——供 `pauseCurrent()` 在介入面板
|
|
@@ -29,7 +30,8 @@ export class Spinner {
|
|
|
29
30
|
this.stop();
|
|
30
31
|
this.msg = msg;
|
|
31
32
|
if (!ui.isTTY) {
|
|
32
|
-
|
|
33
|
+
if (!isStdoutMuted())
|
|
34
|
+
stdout.write(`${ui.dim}${msg}…${ui.reset}\n`);
|
|
33
35
|
return;
|
|
34
36
|
}
|
|
35
37
|
activeSpinner = this; // TTY 路径:登记为当前可暂停 spinner(介入面板进入前 pauseCurrent 停转)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mocode-ai",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"description": "终端编码 agent:LLM + tool-call 循环 + 流式输出(含思考)+ 27 个工具,接任意 OpenAI 兼容后端。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -37,9 +37,11 @@
|
|
|
37
37
|
"lint:fix": "eslint . --fix",
|
|
38
38
|
"format": "prettier --write .",
|
|
39
39
|
"format:check": "prettier --check .",
|
|
40
|
-
"eval:smoke": "tsx evals/smoke.ts && tsx evals/coding/smoke.ts && tsx evals/quality-metrics.ts && tsx evals/work-discipline.ts",
|
|
40
|
+
"eval:smoke": "tsx evals/smoke.ts && tsx evals/coding/smoke.ts && tsx evals/short-path/smoke.ts && tsx evals/quality-metrics.ts && tsx evals/work-discipline.ts",
|
|
41
41
|
"eval:coding": "tsx evals/coding/runner.ts",
|
|
42
42
|
"eval:coding:list": "tsx evals/coding/runner.ts --list",
|
|
43
|
+
"eval:short": "tsx evals/short-path/runner.ts",
|
|
44
|
+
"eval:short:list": "tsx evals/short-path/runner.ts --list",
|
|
43
45
|
"eval:memory-handoff": "tsx evals/memory-compact-handoff.ts",
|
|
44
46
|
"eval:memory-retrieval": "tsx evals/memory-retrieval.ts",
|
|
45
47
|
"eval:memory-retrieval:live": "tsx evals/memory-retrieval.ts --live",
|