lark-remote 0.4.4 → 0.4.5
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 +10 -0
- package/dist/binder.d.ts +11 -10
- package/dist/binder.js +17 -16
- package/dist/bridge/inbound-media.d.ts +1 -27
- package/dist/bridge/inbound-media.js +13 -14
- package/dist/bridge/index.d.ts +49 -49
- package/dist/bridge/index.js +99 -92
- package/dist/bridge/queue-manager.d.ts +33 -26
- package/dist/bridge/queue-manager.js +117 -117
- package/dist/card/bash-renderer.js +4 -4
- package/dist/card/card-shared.d.ts +1 -1
- package/dist/card/card-shared.js +2 -2
- package/dist/card/run-renderer.js +8 -8
- package/dist/cli.js +5 -6
- package/dist/clone.d.ts +1 -6
- package/dist/clone.js +4 -4
- package/dist/common/clamp.d.ts +2 -0
- package/dist/common/clamp.js +5 -0
- package/dist/common/fs.d.ts +4 -3
- package/dist/common/fs.js +5 -4
- package/dist/config/dir.d.ts +4 -5
- package/dist/config/dir.js +7 -8
- package/dist/config/wizard.js +2 -2
- package/dist/connector/index.d.ts +0 -2
- package/dist/connector/index.js +5 -5
- package/dist/inbound/receipt.d.ts +1 -3
- package/dist/inbound/receipt.js +2 -2
- package/dist/inbound/turn-assembler.d.ts +1 -3
- package/dist/inbound/turn-assembler.js +2 -2
- package/dist/index.js +30 -22
- package/dist/instance-lock.js +4 -4
- package/dist/persistence/atomic-write.js +3 -3
- package/dist/platform/agent-stopper.d.ts +1 -1
- package/dist/platform/terminator-posix.js +5 -5
- package/dist/platform/terminator-win32.js +1 -1
- package/dist/router/card-helpers.d.ts +1 -3
- package/dist/router/card-helpers.js +2 -2
- package/dist/router/config/codex.js +1 -1
- package/dist/router/config/common/model-patch.d.ts +1 -2
- package/dist/router/config/common/model-patch.js +1 -2
- package/dist/router/config/opencode.js +1 -1
- package/dist/router/config/pi.js +1 -1
- package/dist/router/index.d.ts +22 -22
- package/dist/router/index.js +71 -52
- package/dist/router/order-exec-dispatch.d.ts +3 -10
- package/dist/router/order-exec-dispatch.js +3 -3
- package/dist/router/{utils.d.ts → usage-format.d.ts} +2 -4
- package/dist/router/{utils.js → usage-format.js} +3 -8
- package/dist/runner/claude/runner.d.ts +1 -1
- package/dist/runner/claude/runner.js +1 -2
- package/dist/runner/claude/session.d.ts +2 -4
- package/dist/runner/claude/session.js +7 -9
- package/dist/runner/common/acp/{protocol-helpers.d.ts → acp-approval.d.ts} +2 -8
- package/dist/runner/common/acp/{protocol-helpers.js → acp-approval.js} +4 -3
- package/dist/runner/common/acp/base-acp-runner.d.ts +1 -1
- package/dist/runner/common/acp/base-acp-runner.js +1 -1
- package/dist/runner/common/connection-based-runner.d.ts +4 -4
- package/dist/runner/common/connection-based-runner.js +3 -3
- package/dist/runner/common/jsonrpc/connection-manager.d.ts +12 -12
- package/dist/runner/common/jsonrpc/connection-manager.js +36 -36
- package/dist/runner/common/{usage.d.ts → result-usage.d.ts} +1 -1
- package/dist/runner/common/{usage.js → result-usage.js} +2 -2
- package/dist/runner/common/spawning-runner.d.ts +2 -2
- package/dist/runner/common/spawning-runner.js +8 -8
- package/dist/runner/common/{runner-utils.d.ts → synthetic-events.d.ts} +4 -4
- package/dist/runner/common/{runner-utils.js → synthetic-events.js} +5 -5
- package/dist/runner/dsh/client.d.ts +1 -1
- package/dist/runner/dsh/client.js +1 -1
- package/dist/runner/dsh/runner.js +1 -1
- package/dist/runner/kimi/acp/runner.d.ts +1 -1
- package/dist/runner/kimi/acp/runner.js +1 -1
- package/dist/runner/kimi/acp/translator.js +1 -1
- package/dist/runner/opencode/acp/runner.d.ts +2 -2
- package/dist/runner/opencode/acp/runner.js +1 -1
- package/dist/runner/opencode/acp/translator.js +1 -1
- package/dist/runner/pi/rpc/runner.d.ts +1 -1
- package/dist/runner/pi/rpc/translator.d.ts +0 -1
- package/dist/runner/pi/rpc/translator.js +0 -2
- package/dist/runner/registry.d.ts +3 -3
- package/dist/runner/registry.js +3 -3
- package/dist/session/claude/session-index.d.ts +1 -1
- package/dist/session/claude/session-index.js +1 -1
- package/dist/session/claude/session-reader.d.ts +1 -1
- package/dist/session/claude/session-reader.js +1 -1
- package/dist/session/codex/rollout-reader.js +2 -2
- package/dist/session/dsh/sessions.d.ts +1 -1
- package/dist/session/dsh/sessions.js +1 -1
- package/dist/session/kimi/sessions.d.ts +0 -4
- package/dist/session/kimi/sessions.js +2 -8
- package/dist/session/opencode/sessions.js +3 -3
- package/dist/session/registry.d.ts +1 -1
- package/dist/session/registry.js +1 -1
- package/dist/session/session-store.d.ts +2 -3
- package/dist/session/session-store.js +2 -4
- package/dist/update/index.d.ts +1 -1
- package/dist/update/index.js +1 -1
- package/dist/update/version-check.d.ts +5 -3
- package/dist/update/version-check.js +10 -8
- package/dist/workspace/index.d.ts +4 -4
- package/dist/workspace/index.js +5 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import {
|
|
3
|
+
import { bestEffortUnlink, withBusyRetry } from '../common/fs.js';
|
|
4
4
|
import { getLogger } from '../logger/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Atomically write content (string or binary Buffer) to a file via tmp + rename.
|
|
@@ -63,7 +63,7 @@ export function atomicWrite(filePath, content, encoding = 'utf-8') {
|
|
|
63
63
|
// errors we must not leak the tmp file — except when the scene is
|
|
64
64
|
// deliberately preserved after busy-retry exhaustion.
|
|
65
65
|
if (!preserveTmpScene) {
|
|
66
|
-
|
|
66
|
+
bestEffortUnlink(tmpPath);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -86,7 +86,7 @@ export function atomicMoveFile(srcPath, destPath) {
|
|
|
86
86
|
catch (err) {
|
|
87
87
|
if (err.code === 'EXDEV') {
|
|
88
88
|
fs.copyFileSync(srcPath, destPath);
|
|
89
|
-
|
|
89
|
+
bestEffortUnlink(srcPath);
|
|
90
90
|
}
|
|
91
91
|
else {
|
|
92
92
|
throw err;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* 不会来的退出事件。
|
|
8
8
|
*
|
|
9
9
|
* **键 = agent + pid,不是 agent 单维**。两条理由:
|
|
10
|
-
* 1. 同一 agent 可以同时有多个存活子进程(每个
|
|
10
|
+
* 1. 同一 agent 可以同时有多个存活子进程(每个 cwd 一条长驻连接,外加
|
|
11
11
|
* claude 的进程代际更替)。按 agent 单键索引时后注册的连接会**覆盖**前一个
|
|
12
12
|
* 的通道,Terminator 便拿着 A 工作区的通道去停 B 工作区的进程;
|
|
13
13
|
* 2. Terminator 手上只有 `proc`,只有 pid 能把「这条通道」与「正要停的那个
|
|
@@ -41,17 +41,17 @@ async function stopPosix(proc, opts, log) {
|
|
|
41
41
|
}
|
|
42
42
|
// 负 PID = 整个进程组:shell 包装层与孙进程一并带走
|
|
43
43
|
const pgid = -pid;
|
|
44
|
-
log('debug', `[
|
|
44
|
+
log('debug', `[terminator] sending SIGTERM to pgid=${pgid} immediate=${opts.immediate}`);
|
|
45
45
|
const termErr = signalGroup(pgid, 'SIGTERM');
|
|
46
46
|
if (termErr) {
|
|
47
|
-
log('warn', `[
|
|
47
|
+
log('warn', `[terminator] ${termErr}`);
|
|
48
48
|
return { requested: false, via: 'cooperative', error: termErr };
|
|
49
49
|
}
|
|
50
50
|
if (opts.immediate) {
|
|
51
51
|
// 不等待:SIGKILL 紧随其后;进程已死时 kill 抛 ESRCH,忽略即可
|
|
52
52
|
const killErr = signalGroup(pgid, 'SIGKILL');
|
|
53
53
|
if (killErr) {
|
|
54
|
-
log('warn', `[
|
|
54
|
+
log('warn', `[terminator] ${killErr}`);
|
|
55
55
|
return { requested: false, via: 'taskkill', error: killErr };
|
|
56
56
|
}
|
|
57
57
|
return { requested: true, via: 'taskkill' };
|
|
@@ -71,10 +71,10 @@ async function stopPosix(proc, opts, log) {
|
|
|
71
71
|
if (graceTimer)
|
|
72
72
|
clearTimeout(graceTimer);
|
|
73
73
|
if (!exited) {
|
|
74
|
-
log('info', `[
|
|
74
|
+
log('info', `[terminator] process group ${pgid} did not exit within grace period, sending SIGKILL`);
|
|
75
75
|
const killErr = signalGroup(pgid, 'SIGKILL');
|
|
76
76
|
if (killErr) {
|
|
77
|
-
log('warn', `[
|
|
77
|
+
log('warn', `[terminator] ${killErr}`);
|
|
78
78
|
return { requested: false, via: 'taskkill', error: killErr };
|
|
79
79
|
}
|
|
80
80
|
return { requested: true, via: 'taskkill' };
|
|
@@ -74,7 +74,7 @@ export function createWin32Terminator(deps) {
|
|
|
74
74
|
return { requested: true, via: 'taskkill' };
|
|
75
75
|
}
|
|
76
76
|
const agent = deps.agent;
|
|
77
|
-
// 按 agent + pid 查:同一 agent 可能有多条长驻连接(每
|
|
77
|
+
// 按 agent + pid 查:同一 agent 可能有多条长驻连接(每 cwd 一条),
|
|
78
78
|
// 只有 pid 能把通道归属钉到手上这个 proc 上。
|
|
79
79
|
const stopper = agent === undefined ? undefined : stoppers.get(agent, proc.pid);
|
|
80
80
|
if (!stopper) {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { markdownDiv } from '../card/collapsible.js';
|
|
10
10
|
import type { AgentSessionContentEvent } from '../runner/index.js';
|
|
11
|
-
import { formatUsageStats } from './
|
|
11
|
+
import { formatUsageStats } from './usage-format.js';
|
|
12
12
|
type SessionUsageLike = Parameters<typeof formatUsageStats>[0];
|
|
13
13
|
/**
|
|
14
14
|
* Build a collapsible panel for a single session content event.
|
|
@@ -28,8 +28,6 @@ type SessionUsageLike = Parameters<typeof formatUsageStats>[0];
|
|
|
28
28
|
*/
|
|
29
29
|
export declare function sessionEventPanel(ev: AgentSessionContentEvent, index: number, totalEvents: number, tailExpandedCount?: number, agentKind?: string): object;
|
|
30
30
|
export { markdownDiv };
|
|
31
|
-
/** 分页卡「跳转页码」输入框的组件 name(仅用于结构断言与可读性)。 */
|
|
32
|
-
export declare const PAGE_JUMP_INPUT_NAME = "pageInput";
|
|
33
31
|
/** 页码输入非法时的统一提示文案(/ls /ws /resume /active /order 共用)。 */
|
|
34
32
|
export declare const PAGE_JUMP_INVALID_HINT = "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u9875\u7801\uFF08\u6B63\u6574\u6570\uFF09";
|
|
35
33
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { agentDisplayName } from '../card/card-shared.js';
|
|
10
10
|
import { collapsibleMarkdownPanel, markdownDiv } from '../card/collapsible.js';
|
|
11
11
|
import { formatTimestamp } from '../card/time.js';
|
|
12
|
-
import { formatUsageStats } from './
|
|
12
|
+
import { formatUsageStats } from './usage-format.js';
|
|
13
13
|
/**
|
|
14
14
|
* Build a collapsible panel for a single session content event.
|
|
15
15
|
*
|
|
@@ -64,7 +64,7 @@ function eventLabel(ev, agentKind) {
|
|
|
64
64
|
}
|
|
65
65
|
export { markdownDiv };
|
|
66
66
|
/** 分页卡「跳转页码」输入框的组件 name(仅用于结构断言与可读性)。 */
|
|
67
|
-
|
|
67
|
+
const PAGE_JUMP_INPUT_NAME = 'pageInput';
|
|
68
68
|
/** 页码输入非法时的统一提示文案(/ls /ws /resume /active /order 共用)。 */
|
|
69
69
|
export const PAGE_JUMP_INVALID_HINT = '请输入有效的页码(正整数)';
|
|
70
70
|
/**
|
|
@@ -81,7 +81,7 @@ export class CodexConfigBuilder {
|
|
|
81
81
|
if (key === 'agents.codex.modelProvider' && typeof value === 'string') {
|
|
82
82
|
const codexCfg = loadCodexConfig();
|
|
83
83
|
const currentModel = config.agents?.codex?.model;
|
|
84
|
-
const modelPatch = resetModelPatch(
|
|
84
|
+
const modelPatch = resetModelPatch('agents.codex.model', currentModel, codexCfg.modelOptions(value));
|
|
85
85
|
if (modelPatch) {
|
|
86
86
|
patches.push(modelPatch);
|
|
87
87
|
const replacedModel = modelPatch.value;
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
* model is not offered by the new provider (and the new provider has models),
|
|
11
11
|
* patch the model to the provider's first option.
|
|
12
12
|
*
|
|
13
|
-
* @param providerKey The field key that changed, e.g. 'agents.codex.modelProvider'.
|
|
14
13
|
* @param modelKey The model field to reset, e.g. 'agents.codex.model'.
|
|
15
14
|
* @param currentModel The currently-configured model value (may be undefined).
|
|
16
15
|
* @param newModelOptions Models offered by the newly-selected provider.
|
|
17
16
|
* @returns A `{ key, value }` patch, or null when no reset is needed.
|
|
18
17
|
*/
|
|
19
|
-
export declare function resetModelPatch(
|
|
18
|
+
export declare function resetModelPatch(modelKey: string, currentModel: string | undefined, newModelOptions: string[]): {
|
|
20
19
|
key: string;
|
|
21
20
|
value: unknown;
|
|
22
21
|
} | null;
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
* model is not offered by the new provider (and the new provider has models),
|
|
11
11
|
* patch the model to the provider's first option.
|
|
12
12
|
*
|
|
13
|
-
* @param providerKey The field key that changed, e.g. 'agents.codex.modelProvider'.
|
|
14
13
|
* @param modelKey The model field to reset, e.g. 'agents.codex.model'.
|
|
15
14
|
* @param currentModel The currently-configured model value (may be undefined).
|
|
16
15
|
* @param newModelOptions Models offered by the newly-selected provider.
|
|
17
16
|
* @returns A `{ key, value }` patch, or null when no reset is needed.
|
|
18
17
|
*/
|
|
19
|
-
export function resetModelPatch(
|
|
18
|
+
export function resetModelPatch(modelKey, currentModel, newModelOptions) {
|
|
20
19
|
const currentModelIsValid = newModelOptions.some((m) => m === currentModel);
|
|
21
20
|
if (!currentModelIsValid && newModelOptions.length > 0) {
|
|
22
21
|
return { key: modelKey, value: newModelOptions[0] };
|
|
@@ -58,7 +58,7 @@ export class OpencodeConfigBuilder {
|
|
|
58
58
|
if (key === 'agents.opencode.providerID' && typeof value === 'string') {
|
|
59
59
|
const opencodeCfg = loadOpencodeConfig();
|
|
60
60
|
const currentModel = config.agents?.opencode?.modelID;
|
|
61
|
-
const modelPatch = resetModelPatch(
|
|
61
|
+
const modelPatch = resetModelPatch('agents.opencode.modelID', currentModel, opencodeCfg.modelOptions(value));
|
|
62
62
|
if (modelPatch)
|
|
63
63
|
patches.push(modelPatch);
|
|
64
64
|
}
|
package/dist/router/config/pi.js
CHANGED
|
@@ -39,7 +39,7 @@ export class PiConfigBuilder {
|
|
|
39
39
|
// provider 变更时,重置 model 为新 provider 的首个模型
|
|
40
40
|
if (key === 'agents.pi.provider' && typeof value === 'string') {
|
|
41
41
|
const currentModel = config.agents?.pi?.model;
|
|
42
|
-
const modelPatch = resetModelPatch(
|
|
42
|
+
const modelPatch = resetModelPatch('agents.pi.model', currentModel, getPiModelOptions(value));
|
|
43
43
|
if (modelPatch)
|
|
44
44
|
patches.push(modelPatch);
|
|
45
45
|
}
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import type { SessionStore, SessionReaderRegistry } from '../session/index.js';
|
|
2
2
|
import type { AppConfig } from '../config/index.js';
|
|
3
|
-
import type { Bridge } from '../bridge/index.js';
|
|
3
|
+
import type { Bridge, CommandContext, CommandResult } from '../bridge/index.js';
|
|
4
4
|
import type { AgentBinding } from '../bridge/queue-manager.js';
|
|
5
5
|
import type { CloneSession } from '../clone.js';
|
|
6
6
|
import { type VersionCheckResult, type InstallResult } from '../update/index.js';
|
|
7
|
-
interface CommandContext {
|
|
8
|
-
userId: string;
|
|
9
|
-
chatId: string;
|
|
10
|
-
messageId: string;
|
|
11
|
-
/** 本轮(装配窗口)全部入站 messageId,`messageId` 是最后一条。见 BridgeContext 同名字段(§B8)。 */
|
|
12
|
-
turnMessageIds?: string[];
|
|
13
|
-
}
|
|
14
|
-
interface CommandResult {
|
|
15
|
-
text?: string;
|
|
16
|
-
markdown?: string;
|
|
17
|
-
card?: object;
|
|
18
|
-
}
|
|
19
7
|
/**
|
|
20
8
|
* Card-action commands that must run with enqueue({ immediate: true }).
|
|
21
9
|
* These bypass the serial queue and execute immediately.
|
|
@@ -31,7 +19,7 @@ interface CommandResult {
|
|
|
31
19
|
* stop — interrupt current run
|
|
32
20
|
* ls.file — send file only
|
|
33
21
|
* ws.page — paginate /ws list only
|
|
34
|
-
* ws.remove — delete
|
|
22
|
+
* ws.remove — delete cwd alias only
|
|
35
23
|
* resume.use — set sessionId + agent for correct reader routing
|
|
36
24
|
* help.* — read-only help commands
|
|
37
25
|
* order.delete — delete order only
|
|
@@ -46,8 +34,8 @@ export interface CardActionPayload {
|
|
|
46
34
|
name?: string;
|
|
47
35
|
runId?: string;
|
|
48
36
|
sessionId?: string;
|
|
37
|
+
/** 目标工作目录(queue.* 卡片动作定位队列;stop 等卡片回传执行目录)。 */
|
|
49
38
|
cwd?: string;
|
|
50
|
-
workspace?: string;
|
|
51
39
|
messageId?: string;
|
|
52
40
|
userId?: string;
|
|
53
41
|
chatId?: string;
|
|
@@ -56,7 +44,7 @@ export interface CardActionPayload {
|
|
|
56
44
|
offset?: number;
|
|
57
45
|
/**
|
|
58
46
|
* `/ls` 浏览起点(本次 `/ls <dir>` 指定的目录;省略时 = cwd)。
|
|
59
|
-
*
|
|
47
|
+
* 卡片上的「返回」按钮回到这里,而不是回到会话工作目录。
|
|
60
48
|
*/
|
|
61
49
|
root?: string;
|
|
62
50
|
/** /resume 列表的 agent 类型。 */
|
|
@@ -114,6 +102,18 @@ export declare const APPROVAL_ACTION_CMDS: readonly string[];
|
|
|
114
102
|
* index.ts 控制层直返清单的唯一来源(勿在别处复制名单)。
|
|
115
103
|
*/
|
|
116
104
|
export declare const DIRECT_RETURN_CMDS: ReadonlySet<string>;
|
|
105
|
+
/**
|
|
106
|
+
* 会话 / cwd / agent 变更类卡片动作(单源)。这些动作会改写 sessionStore 的
|
|
107
|
+
* sessionId / cwd / defaultAgent,必须与入站装配器的 700ms 静默窗口定序:
|
|
108
|
+
* 控制层(index.ts)在执行它们之前先 flush 该 user/chat 的装配窗口,保证窗口内
|
|
109
|
+
* 先到的文本消息在本动作之前 commit(绑定动作前的旧状态)。否则窗口内消息会
|
|
110
|
+
* 漂移到动作之后的新状态(2026-10-07 事故:输入「重新构建」后立即点「新会话」,
|
|
111
|
+
* 消息落到新会话)。
|
|
112
|
+
*
|
|
113
|
+
* 文本命令(/new、/cd、/resume、/config)已由 index.ts 命令分支先 flush,
|
|
114
|
+
* 不在此列——只有卡片动作绕过了该分支。
|
|
115
|
+
*/
|
|
116
|
+
export declare const SESSION_MUTATING_ACTION_CMDS: ReadonlySet<string>;
|
|
117
117
|
export declare class CommandRouter {
|
|
118
118
|
/** Valid agent kinds — single source of truth for resume.use / resume.page / cmdResume. */
|
|
119
119
|
static readonly VALID_AGENTS: readonly ["claude", "codex", "opencode", "pi", "kimi", "dsh"];
|
|
@@ -205,7 +205,7 @@ export declare class CommandRouter {
|
|
|
205
205
|
cachePath?: string;
|
|
206
206
|
bypassCache?: boolean;
|
|
207
207
|
}) => Promise<VersionCheckResult>;
|
|
208
|
-
|
|
208
|
+
compareVersions?: (current: string, latest: string) => -1 | 0 | 1 | null;
|
|
209
209
|
runInstallLatest?: () => Promise<InstallResult>;
|
|
210
210
|
};
|
|
211
211
|
});
|
|
@@ -222,7 +222,7 @@ export declare class CommandRouter {
|
|
|
222
222
|
/**
|
|
223
223
|
* Route a message: if it starts with /, handle as command; if it starts with !, execute as bash; otherwise forward to Claude.
|
|
224
224
|
*
|
|
225
|
-
* 命令识别前置条件(2026-09-15 P0
|
|
225
|
+
* 命令识别前置条件(2026-09-15 P0 修复,`inbound-unified-input-design.md` §5.6):
|
|
226
226
|
* 裸前缀判定会被结构占位符命中 —— SDK 把富文本里的图片渲染成 ``,
|
|
227
227
|
* 首字符恰好是 `!`,整段用户消息被当 shell 命令执行(`executeBash "[image](img_v3_…"`)。
|
|
228
228
|
* 因此命令前缀只在「调用方声明纯文本 + 剥离占位符后非空且无占位符 + 首字符是 / 或 !」
|
|
@@ -249,7 +249,7 @@ export declare class CommandRouter {
|
|
|
249
249
|
* Routes to the appropriate bridge method based on value.cmd.
|
|
250
250
|
* Returns a toast response for immediate user feedback.
|
|
251
251
|
*/
|
|
252
|
-
/** queue.* 卡片动作通用守卫:
|
|
252
|
+
/** queue.* 卡片动作通用守卫:cwd/messageId 缺失时回复错误并返回 null。 */
|
|
253
253
|
private queuePayloadOrReply;
|
|
254
254
|
/** 答案类操作的统一失败反馈:重复投递(同一 nonce 第二次点击)是已生效的
|
|
255
255
|
* 中性事件,报 error 会误导(首次点击实际已成功)。 */
|
|
@@ -410,7 +410,7 @@ export declare class CommandRouter {
|
|
|
410
410
|
*/
|
|
411
411
|
private handleOrderTextInput;
|
|
412
412
|
/**
|
|
413
|
-
* Handle ws.use card action: switch to the
|
|
413
|
+
* Handle ws.use card action: switch to the cwd, then refresh the /ws
|
|
414
414
|
* list card in place so "recent" sort order is immediately visible.
|
|
415
415
|
*
|
|
416
416
|
* Unlike the command-line `/ws use` (which returns text), the card action
|
|
@@ -419,7 +419,7 @@ export declare class CommandRouter {
|
|
|
419
419
|
*/
|
|
420
420
|
private handleWsUse;
|
|
421
421
|
/**
|
|
422
|
-
* Handle ws.remove: remove the
|
|
422
|
+
* Handle ws.remove: remove the cwd alias and refresh the /ws list card
|
|
423
423
|
* in place (mirrors handleOrderDelete). Without this the stale alias would
|
|
424
424
|
* remain visible on the card the user just clicked.
|
|
425
425
|
*/
|
|
@@ -556,7 +556,7 @@ export declare class CommandRouter {
|
|
|
556
556
|
* @param offset 分页起点(条目数)
|
|
557
557
|
* @param rootDir 浏览起点:卡片「返回」按钮回到这里。省略时默认 = 本次列出的
|
|
558
558
|
* 目录(`/ls <dir>` 的起点即该目录),因此「返回」不会把用户
|
|
559
|
-
* 丢回
|
|
559
|
+
* 丢回 工作目录(用户明确反馈过)。
|
|
560
560
|
* @param q 关键词筛选:只匹配**当前层**条目名(不递归),大小写不敏感。
|
|
561
561
|
* 省略/空 = 无筛选。
|
|
562
562
|
*/
|