lark-remote 0.1.6 → 0.1.7

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.
Files changed (188) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/README.en.md +9 -1
  3. package/README.md +14 -2
  4. package/dist/bridge/approval-coordinator.d.ts +57 -34
  5. package/dist/bridge/approval-coordinator.js +191 -40
  6. package/dist/bridge/inbound-media.d.ts +62 -0
  7. package/dist/bridge/inbound-media.js +282 -0
  8. package/dist/bridge/index.d.ts +78 -7
  9. package/dist/bridge/index.js +202 -79
  10. package/dist/bridge/queue-manager.d.ts +2 -1
  11. package/dist/bridge/queue-manager.js +1 -0
  12. package/dist/card/approval-render.js +152 -36
  13. package/dist/card/bash-card-session.d.ts +2 -24
  14. package/dist/card/bash-card-session.js +6 -73
  15. package/dist/card/bash-renderer.js +2 -3
  16. package/dist/card/card-budget.js +29 -75
  17. package/dist/card/card-session.d.ts +48 -0
  18. package/dist/card/card-session.js +86 -0
  19. package/dist/card/card-shared.d.ts +1 -12
  20. package/dist/card/card-shared.js +1 -26
  21. package/dist/card/run-card-session.d.ts +2 -55
  22. package/dist/card/run-card-session.js +6 -104
  23. package/dist/card/run-renderer.js +99 -232
  24. package/dist/card/run-state.d.ts +13 -0
  25. package/dist/card/run-state.js +25 -16
  26. package/dist/card/text-truncate.d.ts +13 -12
  27. package/dist/card/text-truncate.js +13 -63
  28. package/dist/common/fs.d.ts +8 -0
  29. package/dist/common/fs.js +17 -0
  30. package/dist/common/guards.d.ts +0 -20
  31. package/dist/common/guards.js +0 -43
  32. package/dist/common/sleep.d.ts +2 -0
  33. package/dist/common/sleep.js +5 -0
  34. package/dist/common/truncate.d.ts +39 -0
  35. package/dist/common/truncate.js +92 -0
  36. package/dist/config/codex-config.d.ts +1 -1
  37. package/dist/config/codex-config.js +1 -1
  38. package/dist/config/index.d.ts +88 -23
  39. package/dist/config/index.js +105 -34
  40. package/dist/connector/index.d.ts +69 -2
  41. package/dist/connector/index.js +107 -1
  42. package/dist/index.js +123 -105
  43. package/dist/instance-lock.js +4 -12
  44. package/dist/order/alias-resolve.d.ts +13 -0
  45. package/dist/order/alias-resolve.js +22 -0
  46. package/dist/order/alias-store.d.ts +38 -0
  47. package/dist/order/alias-store.js +106 -0
  48. package/dist/persistence/atomic-write.d.ts +8 -2
  49. package/dist/persistence/atomic-write.js +23 -7
  50. package/dist/restart.js +2 -1
  51. package/dist/router/card-helpers.d.ts +63 -0
  52. package/dist/router/card-helpers.js +146 -0
  53. package/dist/router/config/claude.js +25 -1
  54. package/dist/router/config/codex.js +29 -50
  55. package/dist/router/config/common/model-patch.d.ts +22 -0
  56. package/dist/router/config/common/model-patch.js +26 -0
  57. package/dist/router/config/common/render.js +5 -4
  58. package/dist/router/config/index.d.ts +12 -0
  59. package/dist/router/config/index.js +25 -1
  60. package/dist/router/config/kimi.d.ts +4 -1
  61. package/dist/router/config/kimi.js +27 -0
  62. package/dist/router/config/opencode.js +18 -5
  63. package/dist/router/config/pi.js +4 -5
  64. package/dist/router/config/types.d.ts +11 -2
  65. package/dist/router/index.d.ts +56 -21
  66. package/dist/router/index.js +373 -548
  67. package/dist/router/utils.d.ts +2 -0
  68. package/dist/router/utils.js +4 -0
  69. package/dist/runner/agent-choices-common.d.ts +16 -0
  70. package/dist/runner/agent-choices-common.js +31 -0
  71. package/dist/runner/claude/runner.d.ts +47 -10
  72. package/dist/runner/claude/runner.js +117 -46
  73. package/dist/runner/claude/session.d.ts +166 -0
  74. package/dist/runner/claude/session.js +749 -0
  75. package/dist/runner/codex/app-server/protocol-types.d.ts +31 -39
  76. package/dist/runner/codex/app-server/protocol-types.js +1 -12
  77. package/dist/runner/codex/app-server/runner.d.ts +42 -59
  78. package/dist/runner/codex/app-server/runner.js +160 -337
  79. package/dist/runner/codex/app-server/translator.d.ts +1 -21
  80. package/dist/runner/codex/app-server/translator.js +0 -18
  81. package/dist/runner/codex/index.d.ts +0 -2
  82. package/dist/runner/codex/index.js +0 -2
  83. package/dist/runner/common/acp/protocol-helpers.d.ts +14 -0
  84. package/dist/runner/common/acp/protocol-helpers.js +21 -0
  85. package/dist/runner/common/acp/protocol-types.d.ts +238 -0
  86. package/dist/runner/common/acp/protocol-types.js +75 -0
  87. package/dist/runner/common/connection-based-runner.d.ts +111 -0
  88. package/dist/runner/common/connection-based-runner.js +261 -0
  89. package/dist/runner/{codex/app-server → common/jsonrpc}/client.d.ts +14 -7
  90. package/dist/runner/{codex/app-server → common/jsonrpc}/client.js +27 -18
  91. package/dist/runner/common/jsonrpc/connection-manager.d.ts +125 -0
  92. package/dist/runner/{codex/app-server → common/jsonrpc}/connection-manager.js +63 -28
  93. package/dist/runner/{codex/app-server → common/jsonrpc}/transport.d.ts +5 -4
  94. package/dist/runner/{codex/app-server → common/jsonrpc}/transport.js +18 -19
  95. package/dist/runner/common/jsonrpc/types.d.ts +32 -0
  96. package/dist/runner/common/jsonrpc/types.js +9 -0
  97. package/dist/runner/common/process-stopper.d.ts +2 -1
  98. package/dist/runner/common/process-stopper.js +1 -0
  99. package/dist/runner/common/runner-utils.d.ts +6 -13
  100. package/dist/runner/common/runner-utils.js +6 -47
  101. package/dist/runner/common/spawning-runner.d.ts +24 -70
  102. package/dist/runner/common/spawning-runner.js +98 -152
  103. package/dist/runner/index.d.ts +4 -4
  104. package/dist/runner/index.js +4 -4
  105. package/dist/runner/kimi/acp/runner.d.ts +106 -0
  106. package/dist/runner/kimi/acp/runner.js +448 -0
  107. package/dist/runner/kimi/acp/translator.d.ts +124 -0
  108. package/dist/runner/kimi/acp/translator.js +336 -0
  109. package/dist/runner/kimi/index.d.ts +1 -1
  110. package/dist/runner/kimi/index.js +1 -1
  111. package/dist/runner/opencode/acp/index.d.ts +1 -0
  112. package/dist/runner/opencode/acp/index.js +2 -0
  113. package/dist/runner/opencode/acp/runner.d.ts +121 -0
  114. package/dist/runner/opencode/acp/runner.js +429 -0
  115. package/dist/runner/opencode/acp/translator.d.ts +119 -0
  116. package/dist/runner/opencode/acp/translator.js +345 -0
  117. package/dist/runner/opencode/index.d.ts +1 -1
  118. package/dist/runner/opencode/index.js +1 -1
  119. package/dist/runner/pi/index.d.ts +1 -1
  120. package/dist/runner/pi/index.js +1 -1
  121. package/dist/runner/pi/rpc/client.d.ts +52 -0
  122. package/dist/runner/pi/rpc/client.js +114 -0
  123. package/dist/runner/pi/rpc/index.d.ts +4 -0
  124. package/dist/runner/pi/rpc/index.js +4 -0
  125. package/dist/runner/pi/rpc/protocol-types.d.ts +127 -0
  126. package/dist/runner/pi/rpc/protocol-types.js +21 -0
  127. package/dist/runner/pi/rpc/runner.d.ts +80 -0
  128. package/dist/runner/pi/rpc/runner.js +199 -0
  129. package/dist/runner/pi/rpc/translator.d.ts +55 -0
  130. package/dist/runner/pi/rpc/translator.js +258 -0
  131. package/dist/runner/registry.d.ts +7 -8
  132. package/dist/runner/registry.js +3 -4
  133. package/dist/runner/resolve-agent-choices.js +18 -59
  134. package/dist/runner/sync-agent-choices.js +16 -67
  135. package/dist/runner/types.d.ts +43 -13
  136. package/dist/session/claude/session-index.js +2 -3
  137. package/dist/session/claude/session-reader.js +3 -6
  138. package/dist/session/claude/sessions.js +6 -13
  139. package/dist/session/codex/rollout-reader.d.ts +2 -2
  140. package/dist/session/codex/rollout-reader.js +14 -17
  141. package/dist/session/codex/sessions.d.ts +1 -1
  142. package/dist/session/codex/sessions.js +2 -2
  143. package/dist/session/common/content-blocks.d.ts +7 -0
  144. package/dist/session/common/content-blocks.js +13 -9
  145. package/dist/session/common/jsonl.d.ts +8 -25
  146. package/dist/session/common/jsonl.js +126 -261
  147. package/dist/session/common/pagination.d.ts +28 -0
  148. package/dist/session/common/pagination.js +33 -0
  149. package/dist/session/kimi/sessions.d.ts +34 -1
  150. package/dist/session/kimi/sessions.js +208 -98
  151. package/dist/session/opencode/sessions.d.ts +17 -3
  152. package/dist/session/opencode/sessions.js +29 -29
  153. package/dist/session/pi/sessions.d.ts +5 -1
  154. package/dist/session/pi/sessions.js +12 -16
  155. package/dist/session/session-store.d.ts +11 -1
  156. package/dist/session/session-store.js +75 -178
  157. package/dist/update/index.d.ts +2 -2
  158. package/dist/update/index.js +2 -2
  159. package/dist/update/install.d.ts +20 -2
  160. package/dist/update/install.js +51 -7
  161. package/package.json +1 -1
  162. package/dist/runner/codex/app-server/connection-manager.d.ts +0 -56
  163. package/dist/runner/codex/argv.d.ts +0 -33
  164. package/dist/runner/codex/argv.js +0 -40
  165. package/dist/runner/codex/factory.d.ts +0 -29
  166. package/dist/runner/codex/factory.js +0 -39
  167. package/dist/runner/codex/jsonl.d.ts +0 -37
  168. package/dist/runner/codex/jsonl.js +0 -221
  169. package/dist/runner/codex/runner.d.ts +0 -66
  170. package/dist/runner/codex/runner.js +0 -129
  171. package/dist/runner/common/exec-translator.d.ts +0 -73
  172. package/dist/runner/common/exec-translator.js +0 -105
  173. package/dist/runner/kimi/jsonl.d.ts +0 -28
  174. package/dist/runner/kimi/jsonl.js +0 -143
  175. package/dist/runner/kimi/runner.d.ts +0 -49
  176. package/dist/runner/kimi/runner.js +0 -105
  177. package/dist/runner/opencode/argv.d.ts +0 -32
  178. package/dist/runner/opencode/argv.js +0 -35
  179. package/dist/runner/opencode/jsonl.d.ts +0 -68
  180. package/dist/runner/opencode/jsonl.js +0 -295
  181. package/dist/runner/opencode/runner.d.ts +0 -61
  182. package/dist/runner/opencode/runner.js +0 -93
  183. package/dist/runner/pi/jsonl.d.ts +0 -128
  184. package/dist/runner/pi/jsonl.js +0 -249
  185. package/dist/runner/pi/runner.d.ts +0 -36
  186. package/dist/runner/pi/runner.js +0 -76
  187. package/dist/session/common/catch-up.d.ts +0 -12
  188. package/dist/session/common/catch-up.js +0 -31
@@ -2,6 +2,11 @@
2
2
  * OpenCode config builder — builds fields and handles field changes for OpenCode agent.
3
3
  */
4
4
  import { loadOpencodeConfig } from '../../config/opencode-config.js';
5
+ import { resetModelPatch } from './common/model-patch.js';
6
+ const MODE_OPTIONS = [
7
+ { text: 'build(默认,逐项审批)', value: 'build' },
8
+ { text: 'plan(规划模式)', value: 'plan' },
9
+ ];
5
10
  export class OpencodeConfigBuilder {
6
11
  buildFields(displayConfig) {
7
12
  const fields = [];
@@ -23,6 +28,16 @@ export class OpencodeConfigBuilder {
23
28
  type: 'select',
24
29
  options: modelOptions,
25
30
  });
31
+ // §P5: mode select(build/plan,默认 build)——opencode 无运行期审批档位,
32
+ // mode 即审批粒度档位(build 逐项审批 / plan 规划模式)。
33
+ const currentMode = displayConfig.agents?.opencode?.mode ?? 'build';
34
+ fields.push({
35
+ key: 'agents.opencode.mode',
36
+ label: '会话模式',
37
+ type: 'select',
38
+ options: MODE_OPTIONS,
39
+ currentValue: currentMode,
40
+ });
26
41
  return fields;
27
42
  }
28
43
  handleFieldChange(key, value, config) {
@@ -31,12 +46,10 @@ export class OpencodeConfigBuilder {
31
46
  // provider 变更时,重置 model 为新 provider 的首个模型
32
47
  if (key === 'agents.opencode.providerID' && typeof value === 'string') {
33
48
  const opencodeCfg = loadOpencodeConfig();
34
- const newModelOptions = opencodeCfg.modelOptions(value);
35
49
  const currentModel = config.agents?.opencode?.modelID;
36
- const currentModelIsValid = newModelOptions.some((m) => m === currentModel);
37
- if (!currentModelIsValid && newModelOptions.length > 0) {
38
- patches.push({ key: 'agents.opencode.modelID', value: newModelOptions[0] });
39
- }
50
+ const modelPatch = resetModelPatch(key, 'agents.opencode.modelID', currentModel, opencodeCfg.modelOptions(value));
51
+ if (modelPatch)
52
+ patches.push(modelPatch);
40
53
  }
41
54
  return patches;
42
55
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { loadPiConfig, getPiModelOptions } from '../../config/pi-config.js';
5
5
  import { PI_THINKING_LEVELS } from '../../config/index.js';
6
+ import { resetModelPatch } from './common/model-patch.js';
6
7
  export class PiConfigBuilder {
7
8
  buildFields(displayConfig) {
8
9
  const fields = [];
@@ -37,12 +38,10 @@ export class PiConfigBuilder {
37
38
  patches.push({ key, value });
38
39
  // provider 变更时,重置 model 为新 provider 的首个模型
39
40
  if (key === 'agents.pi.provider' && typeof value === 'string') {
40
- const newModelOptions = getPiModelOptions(value);
41
41
  const currentModel = config.agents?.pi?.model;
42
- const currentModelIsValid = newModelOptions.some((m) => m === currentModel);
43
- if (!currentModelIsValid && newModelOptions.length > 0) {
44
- patches.push({ key: 'agents.pi.model', value: newModelOptions[0] });
45
- }
42
+ const modelPatch = resetModelPatch(key, 'agents.pi.model', currentModel, getPiModelOptions(value));
43
+ if (modelPatch)
44
+ patches.push(modelPatch);
46
45
  }
47
46
  return patches;
48
47
  }
@@ -5,13 +5,22 @@
5
5
  * The router delegates to `getConfigBuilder(agent)` instead of a giant switch-case.
6
6
  */
7
7
  import type { AppConfig } from '../../config/index.js';
8
+ /** A select option with separate display text and config value. */
9
+ export interface SelectOption {
10
+ /** Display text shown in the dropdown (may include annotations). */
11
+ text: string;
12
+ /** Config value written to config.yaml (must match schema enum values). */
13
+ value: string;
14
+ }
8
15
  /** A single field descriptor in the /config card. */
9
16
  export interface ConfigField {
10
17
  key: string;
11
18
  label: string;
12
19
  type: 'boolean' | 'select' | 'input' | 'note';
13
- /** For select type: the list of options shown in the dropdown. */
14
- options?: readonly string[];
20
+ /** For select type: the list of options shown in the dropdown.
21
+ * Accepts plain strings (text=value) or {text, value} objects for
22
+ * display-value separation (e.g. 'manual(逐项审批)' → value 'manual'). */
23
+ options?: readonly (string | SelectOption)[];
15
24
  /** Override the currentValue shown in the card (takes priority over getConfigValue). */
16
25
  currentValue?: string | boolean;
17
26
  }
@@ -64,14 +64,14 @@ export interface CardActionPayload {
64
64
  requestId?: number | string;
65
65
  /** Decision for approval.respond (e.g. 'accept', 'decline', 'cancel'). */
66
66
  decision?: string;
67
- /** Scope for acceptForSession: 'turn' | 'session'. */
68
- scope?: 'turn' | 'session';
69
67
  /** Unique nonce to prevent duplicate processing. */
70
68
  nonce?: string;
71
69
  /** Permission item ID for approval.toggle. */
72
70
  permId?: string;
73
71
  /** Desired selection state for approval.toggle (card renders !current). */
74
72
  selected?: boolean;
73
+ /** Claude AskUserQuestion 问题索引(approval.answer / approval.answerSubmit)。 */
74
+ questionIndex?: number;
75
75
  }
76
76
  /**
77
77
  * Response a cardAction handler may return to give the clicking user native
@@ -91,11 +91,15 @@ export declare class CommandRouter {
91
91
  /** Valid agent kinds — single source of truth for resume.use / resume.page / cmdResume. */
92
92
  static readonly VALID_AGENTS: readonly ["claude", "codex", "opencode", "pi", "kimi"];
93
93
  private sessionStore;
94
- private bridge;
95
- private config;
96
- private configPath;
94
+ /** 飞书桥接实例(public:测试直接访问断言,替代 as unknown as)。 */
95
+ bridge: Bridge;
96
+ /** 当前配置(public:测试直接读取断言,替代 as unknown as)。 */
97
+ config: AppConfig;
98
+ /** 配置文件的绝对路径(public:/config 保存链路与测试共用)。 */
99
+ configPath: string;
97
100
  private workspaceStore;
98
101
  private orderStore;
102
+ private aliasStore;
99
103
  private exitHandler;
100
104
  private pendingExit;
101
105
  /**
@@ -110,7 +114,8 @@ export declare class CommandRouter {
110
114
  private updateCachePath?;
111
115
  /** Injected update functions (for testability; defaults to real implementation). */
112
116
  private updateFns;
113
- private pendingConfig;
117
+ /** /config 卡片编辑暂存区(public:测试直接读取断言,替代 as unknown as)。 */
118
+ pendingConfig: AppConfig | null;
114
119
  /**
115
120
  * Monotonic counter minting unique internal keys for order.exec enqueue
116
121
  * actions. One order card can be clicked many times, so the Feishu card
@@ -131,7 +136,8 @@ export declare class CommandRouter {
131
136
  * it uses `listRegisteredAgents()` from `router/config/index.ts` (the
132
137
  * config-builder registry), which mirrors the agents with a config card.
133
138
  */
134
- private sessionReaderRegistry;
139
+ /** Session reader 注册中心(public:测试注入/读取,替代 as unknown as)。 */
140
+ sessionReaderRegistry: SessionReaderRegistry;
135
141
  /**
136
142
  * 串行化 config.* 卡片回调(2026-07-04)。
137
143
  * CardKit 2.0 input/button 回调经 `enqueueImmediate` 分发,**不进串行队列**,
@@ -148,6 +154,8 @@ export declare class CommandRouter {
148
154
  configPath: string;
149
155
  workspacePath?: string;
150
156
  ordersPath?: string;
157
+ /** 别名存储路径(<configDir>/aliases.json)。 */
158
+ aliasesPath?: string;
151
159
  exitHandler?: () => void;
152
160
  /** Spawn the detached replacement bridge process and return its pid (throws on failure). */
153
161
  restartSpawner?: () => number;
@@ -180,6 +188,11 @@ export declare class CommandRouter {
180
188
  cwdOverride?: string;
181
189
  binding?: AgentBinding;
182
190
  }): Promise<CommandResult | null>;
191
+ /**
192
+ * 一次别名展开:bridge 收到用户消息后、命令分发前调用。
193
+ * 仅 `$name` 开头的消息可能被展开;未知别名 / 非 `$` 消息原样返回。
194
+ */
195
+ expandAliasMessage(message: string): string;
183
196
  /**
184
197
  * Handle a CardKit card button click (§6.2).
185
198
  * Validates payload and dispatches to the corresponding command.
@@ -310,7 +323,7 @@ export declare class CommandRouter {
310
323
  */
311
324
  private cardLsFile;
312
325
  /** 确保 pendingConfig 已初始化(从当前 config 克隆) */
313
- private ensurePendingConfig;
326
+ ensurePendingConfig(): void;
314
327
  /**
315
328
  * 串行化 config.* 卡片回调(2026-07-04 修复 toggle 卡死 bug)。
316
329
  *
@@ -324,11 +337,14 @@ export declare class CommandRouter {
324
337
  */
325
338
  private enqueueConfigAction;
326
339
  /** 实际的 config.* 分发逻辑(在串行队列内执行) */
327
- private dispatchConfigAction;
340
+ /** config.* 卡片动作分发(public:测试直接调用,替代 as unknown as)。 */
341
+ dispatchConfigAction(value: CardActionPayload, ctx: CommandContext): Promise<CardActionResponse | void>;
328
342
  /** 设置嵌套属性值(仅修改内存对象,不写盘) */
329
- private setNestedValue;
343
+ /** 在 pendingConfig 上按 dot-separated key 设置嵌套值(config 卡片编辑用)。 */
344
+ setNestedValue(target: AppConfig, key: string, value: unknown): void;
330
345
  /** 对比原始 config 与 pendingConfig,返回变化的 key→string 映射 */
331
- private diffConfig;
346
+ /** config diff(public:测试直接调用,替代 as unknown as)。 */
347
+ diffConfig(original: AppConfig, pending: AppConfig): Record<string, string | undefined>;
332
348
  /** 递归收集差异 */
333
349
  private collectDiff;
334
350
  /**
@@ -350,7 +366,8 @@ export declare class CommandRouter {
350
366
  private propagateConfigSave;
351
367
  private executeCommand;
352
368
  cmdHelp(): CommandResult;
353
- private cmdStatus;
369
+ /** /status 实现(public:测试直接调用,替代 as any)。 */
370
+ cmdStatus(ctx: CommandContext): CommandResult;
354
371
  private cmdPs;
355
372
  private cmdStop;
356
373
  private cmdExit;
@@ -384,14 +401,27 @@ export declare class CommandRouter {
384
401
  private buildConfigSwitchCard;
385
402
  /**
386
403
  * Whether a session of the given agent kind can be compacted from a resume
387
- * card. Compact (thread/compact/start) is only implemented by the codex
388
- * app-server runner (`runCompact`), so the button is gated on
389
- * `serviceMode === 'app-server'` — exec mode spawns a fresh CLI per message
390
- * and has no persistent session to compact.
404
+ * card. Design doc §6.2-2: duck-typing — check if the runner has `runCompact`
405
+ * (codex app-server, kimi acp), instead of hardcoding agentKind === 'codex'.
391
406
  */
392
407
  private canCompactSession;
408
+ /**
409
+ * Assemble the action buttons for a resume / session-history card.
410
+ * Shared by buildAutoResumeCard, buildConfigSwitchCard, and cmdResume so the
411
+ * button set (stop / compact / new-session) follows one contract instead of
412
+ * drifting per call site.
413
+ *
414
+ * - stop: only when the session has an in-memory active run (isActive), bound
415
+ * to the real activeRun.runId so bridge.interruptCurrentRun can match.
416
+ * - compact: only when a compact-capable runner applies and the session is
417
+ * not running (a live run would occupy the runner, so compaction would
418
+ * fail). The caller passes `compact` only when canCompactSession holds.
419
+ * - new-session: when requested (always shown on resume cards).
420
+ */
421
+ private buildResumeActionButtons;
393
422
  private static readonly LS_PAGE_SIZE;
394
- private cmdLs;
423
+ /** /ls 实现(public:测试直接调用,替代 as unknown as)。 */
424
+ cmdLs(args: string[], ctx: CommandContext, offset?: number): CommandResult;
395
425
  private cmdWs;
396
426
  /**
397
427
  * L3: degraded card when a session's export is non-empty but unparseable
@@ -400,7 +430,11 @@ export declare class CommandRouter {
400
430
  * misleading "未找到". Reuses the same card-builder helpers (markdownDiv) as
401
431
  * the normal resume card; enforceCardBudget still applies at send time.
402
432
  */
403
- private cmdResume;
433
+ /**
434
+ * /resume 核心实现(public:handleResumePage / handle / resume.use 共用,
435
+ * 也是测试的直接 seam,避免测试用 @ts-expect-error 摸私有方法)。
436
+ */
437
+ cmdResume(args: string[], ctx: CommandContext, offset?: number): CommandResult;
404
438
  private cmdActive;
405
439
  /**
406
440
  * Build CardKit 2.0 /active card from bridge memory (not file system).
@@ -411,7 +445,8 @@ export declare class CommandRouter {
411
445
  private cmdReconnect;
412
446
  private cmdConfig;
413
447
  /** Build an interactive config card with CardKit 2.0 tabs + batch save */
414
- private buildConfigCard;
415
- private cmdOrder;
448
+ buildConfigCard(): CommandResult;
449
+ /** /order 实现(public:测试直接调用,替代 as unknown as)。 */
450
+ cmdOrder(args: string[], _ctx: CommandContext, offset?: number): CommandResult;
416
451
  }
417
- export { formatUsageStats } from './utils.js';
452
+ export {};