lark-remote 0.5.12 → 0.5.13
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 +13 -2
- package/README.en.md +1 -14
- package/README.md +1 -14
- package/dist/bridge/approval-coordinator.d.ts +1 -0
- package/dist/bridge/approval-coordinator.js +12 -24
- package/dist/bridge/index.d.ts +7 -0
- package/dist/bridge/index.js +77 -227
- package/dist/bridge/run-approval.d.ts +15 -0
- package/dist/bridge/run-approval.js +41 -0
- package/dist/bridge/run-usage.d.ts +46 -0
- package/dist/bridge/run-usage.js +96 -0
- package/dist/bridge/session-writeback.d.ts +18 -0
- package/dist/bridge/session-writeback.js +36 -0
- package/dist/card/bash-card-session.js +2 -5
- package/dist/card/card-session.d.ts +2 -0
- package/dist/card/card-session.js +20 -22
- package/dist/card/card-shared.d.ts +4 -4
- package/dist/card/card-shared.js +3 -9
- package/dist/card/collapsible.js +3 -2
- package/dist/card/final-answer-overflow.d.ts +7 -0
- package/dist/card/final-answer-overflow.js +46 -0
- package/dist/card/run-card-session.js +2 -7
- package/dist/card/run-renderer.d.ts +14 -0
- package/dist/card/run-renderer.js +119 -1
- package/dist/card/run-state.d.ts +12 -1
- package/dist/card/run-state.js +73 -34
- package/dist/config/codex-config.js +4 -4
- package/dist/config/index.d.ts +4 -2
- package/dist/config/index.js +6 -4
- package/dist/inbound/turn-assembler.js +6 -0
- package/dist/index.js +15 -409
- package/dist/message-handlers.d.ts +26 -0
- package/dist/message-handlers.js +275 -0
- package/dist/router/card-action-payload.d.ts +1 -1
- package/dist/router/card-action-payload.js +1 -1
- package/dist/router/commands/ls.d.ts +9 -0
- package/dist/router/commands/ls.js +243 -0
- package/dist/router/commands/order.d.ts +12 -0
- package/dist/router/commands/order.js +178 -0
- package/dist/router/commands/resume.d.ts +47 -0
- package/dist/router/commands/resume.js +246 -0
- package/dist/router/commands/ws.d.ts +15 -0
- package/dist/router/commands/ws.js +189 -0
- package/dist/router/config/claude.js +3 -3
- package/dist/router/config/codex.js +2 -6
- package/dist/router/config/common/turn-idle.d.ts +2 -0
- package/dist/router/config/common/turn-idle.js +9 -0
- package/dist/router/config/kimi.js +2 -6
- package/dist/router/config/opencode.js +2 -6
- package/dist/router/index.d.ts +14 -22
- package/dist/router/index.js +70 -1152
- package/dist/router/paging.d.ts +13 -0
- package/dist/router/paging.js +20 -0
- package/dist/router/path-validation.d.ts +27 -0
- package/dist/router/path-validation.js +45 -0
- package/dist/runner/claude/runner.d.ts +3 -4
- package/dist/runner/claude/runner.js +4 -5
- package/dist/runner/claude/session.js +1 -1
- package/dist/runner/codex/app-server/translator.d.ts +2 -0
- package/dist/runner/codex/app-server/translator.js +65 -9
- package/dist/runner/common/acp/base-translator.d.ts +3 -8
- package/dist/runner/common/acp/base-translator.js +16 -7
- package/dist/runner/common/spawning-runner.js +10 -4
- package/dist/runner/common/turn-started.d.ts +2 -0
- package/dist/runner/common/turn-started.js +10 -0
- package/dist/runner/dsh/auth.js +2 -3
- package/dist/runner/dsh/client.d.ts +1 -6
- package/dist/runner/dsh/client.js +11 -165
- package/dist/runner/dsh/daemon.d.ts +0 -2
- package/dist/runner/dsh/daemon.js +1 -6
- package/dist/runner/dsh/errors.d.ts +5 -0
- package/dist/runner/dsh/errors.js +11 -0
- package/dist/runner/dsh/exit-cancel.d.ts +0 -2
- package/dist/runner/dsh/exit-cancel.js +1 -1
- package/dist/runner/dsh/home.d.ts +2 -0
- package/dist/runner/dsh/home.js +8 -0
- package/dist/runner/dsh/inflight.d.ts +0 -2
- package/dist/runner/dsh/inflight.js +1 -1
- package/dist/runner/dsh/mux-stream.d.ts +26 -0
- package/dist/runner/dsh/mux-stream.js +157 -0
- package/dist/runner/dsh/translator.d.ts +0 -10
- package/dist/runner/dsh/translator.js +1 -1
- package/dist/runner/index.d.ts +1 -1
- package/dist/runner/kimi/acp/translator.js +1 -12
- package/dist/runner/opencode/acp/translator.js +1 -12
- package/dist/runner/pi/rpc/translator.d.ts +2 -8
- package/dist/runner/pi/rpc/translator.js +2 -7
- package/dist/runner/registry.d.ts +0 -19
- package/dist/runner/registry.js +0 -32
- package/dist/runner/types.d.ts +17 -1
- package/dist/session/claude/session-index.js +4 -2
- package/dist/session/kimi/sessions.js +2 -2
- package/dist/session/opencode/sessions.js +2 -1
- package/dist/session/pi/sessions.js +3 -2
- package/package.json +1 -1
|
@@ -81,9 +81,9 @@ export class ClaudeConfigBuilder {
|
|
|
81
81
|
currentValue: currentEffort,
|
|
82
82
|
});
|
|
83
83
|
// 权限模式(取值见 CLAUDE_PERMISSION_MODES:除自造的 default 外都是 CLI 的
|
|
84
|
-
// --permission-mode 枚举;
|
|
85
|
-
//
|
|
86
|
-
const currentPermissionMode = displayConfig.claude?.permissionMode ?? '
|
|
84
|
+
// --permission-mode 枚举;auto 为 schema 默认,低风险自动放行、高风险走审批,
|
|
85
|
+
// bypassPermissions 仍可在下拉中显式选择)
|
|
86
|
+
const currentPermissionMode = displayConfig.claude?.permissionMode ?? 'auto';
|
|
87
87
|
// manual 不在下拉里:旧配置按 default 显示,避免打开卡片时该项空选
|
|
88
88
|
const displayedPermissionMode = currentPermissionMode === 'manual' ? 'default' : currentPermissionMode;
|
|
89
89
|
fields.push({
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { loadCodexConfig, getReasoningEffortOptions, getDefaultReasoningEffort, } from '../../config/codex-config.js';
|
|
5
5
|
import { DEFAULT_TURN_IDLE_TIMEOUT_MINUTES } from '../../config/index.js';
|
|
6
6
|
import { pickMiddleValue, resetModelPatch } from './common/model-patch.js';
|
|
7
|
+
import { turnIdleTimeoutField } from './common/turn-idle.js';
|
|
7
8
|
export class CodexConfigBuilder {
|
|
8
9
|
buildFields(displayConfig) {
|
|
9
10
|
const fields = [];
|
|
@@ -66,12 +67,7 @@ export class CodexConfigBuilder {
|
|
|
66
67
|
});
|
|
67
68
|
const currentTurnIdleTimeoutMinutes = displayConfig.agents?.codex?.appServer?.turnIdleTimeoutMinutes ??
|
|
68
69
|
DEFAULT_TURN_IDLE_TIMEOUT_MINUTES;
|
|
69
|
-
fields.push(
|
|
70
|
-
key: 'agents.codex.appServer.turnIdleTimeoutMinutes',
|
|
71
|
-
label: 'Turn 空闲超时(分钟, 0关闭)',
|
|
72
|
-
type: 'input',
|
|
73
|
-
currentValue: String(currentTurnIdleTimeoutMinutes),
|
|
74
|
-
});
|
|
70
|
+
fields.push(turnIdleTimeoutField('agents.codex.appServer.turnIdleTimeoutMinutes', currentTurnIdleTimeoutMinutes));
|
|
75
71
|
return fields;
|
|
76
72
|
}
|
|
77
73
|
handleFieldChange(key, value, config) {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { loadKimiConfig, KIMI_THINKING_EFFORTS, FALLBACK_EFFORTS, } from '../../config/kimi-config.js';
|
|
8
8
|
import { DEFAULT_TURN_IDLE_TIMEOUT_MINUTES } from '../../config/index.js';
|
|
9
9
|
import { pickMiddleValue } from './common/model-patch.js';
|
|
10
|
+
import { turnIdleTimeoutField } from './common/turn-idle.js';
|
|
10
11
|
const PERMISSION_MODE_OPTIONS = [
|
|
11
12
|
// kimi 0.40.0(2026-09-02)起官方语义:manual=始终询问 / yolo=必要时询问 / auto=完全自动
|
|
12
13
|
{ text: 'manual(始终询问)', value: 'manual' },
|
|
@@ -48,12 +49,7 @@ export class KimiConfigBuilder {
|
|
|
48
49
|
currentValue: currentPermissionMode,
|
|
49
50
|
});
|
|
50
51
|
const currentTurnIdleTimeoutMinutes = displayConfig.agents?.kimi?.acp?.turnIdleTimeoutMinutes ?? DEFAULT_TURN_IDLE_TIMEOUT_MINUTES;
|
|
51
|
-
fields.push(
|
|
52
|
-
key: 'agents.kimi.acp.turnIdleTimeoutMinutes',
|
|
53
|
-
label: 'Turn 空闲超时(分钟, 0关闭)',
|
|
54
|
-
type: 'input',
|
|
55
|
-
currentValue: String(currentTurnIdleTimeoutMinutes),
|
|
56
|
-
});
|
|
52
|
+
fields.push(turnIdleTimeoutField('agents.kimi.acp.turnIdleTimeoutMinutes', currentTurnIdleTimeoutMinutes));
|
|
57
53
|
return fields;
|
|
58
54
|
}
|
|
59
55
|
handleFieldChange(key, value, config) {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { loadOpencodeConfig } from '../../config/opencode-config.js';
|
|
5
5
|
import { DEFAULT_TURN_IDLE_TIMEOUT_MINUTES } from '../../config/index.js';
|
|
6
6
|
import { resetModelPatch } from './common/model-patch.js';
|
|
7
|
+
import { turnIdleTimeoutField } from './common/turn-idle.js';
|
|
7
8
|
const MODE_OPTIONS = [
|
|
8
9
|
{ text: 'build(默认,按 opencode 权限配置)', value: 'build' },
|
|
9
10
|
{ text: 'plan(规划模式)', value: 'plan' },
|
|
@@ -52,12 +53,7 @@ export class OpencodeConfigBuilder {
|
|
|
52
53
|
// binary/requestTimeoutMs/idleTtlMs 为 YAML-only 工程参数)
|
|
53
54
|
const currentTurnIdleTimeoutMinutes = displayConfig.agents?.opencode?.acp?.turnIdleTimeoutMinutes ??
|
|
54
55
|
DEFAULT_TURN_IDLE_TIMEOUT_MINUTES;
|
|
55
|
-
fields.push(
|
|
56
|
-
key: 'agents.opencode.acp.turnIdleTimeoutMinutes',
|
|
57
|
-
label: 'Turn 空闲超时(分钟, 0关闭)',
|
|
58
|
-
type: 'input',
|
|
59
|
-
currentValue: String(currentTurnIdleTimeoutMinutes),
|
|
60
|
-
});
|
|
56
|
+
fields.push(turnIdleTimeoutField('agents.opencode.acp.turnIdleTimeoutMinutes', currentTurnIdleTimeoutMinutes));
|
|
61
57
|
return fields;
|
|
62
58
|
}
|
|
63
59
|
handleFieldChange(key, value, config) {
|
package/dist/router/index.d.ts
CHANGED
|
@@ -4,6 +4,18 @@ 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
|
+
/** /resume 列表页内全量预取(readSessionContent)的行数上限;其余行用轻量 summary 兜底。 */
|
|
8
|
+
/**
|
|
9
|
+
* Reader summary 占位符(trim 后匹配)。各 reader 在"无 user 消息"时返回的
|
|
10
|
+
* 兜底文案不同(claude/pi `(无摘要)`、codex `(no user message)`、kimi
|
|
11
|
+
* `New Session`、空串),都不是真实输入,不得渲染成行标题。
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* 列表卡单行预览:压平空白、去掉反引号,再按字符截断。
|
|
15
|
+
*
|
|
16
|
+
* 为什么去反引号:agent 的输出里 `code` 很常见,截断点落在一对反引号中间时
|
|
17
|
+
* 后半张卡片的 markdown 会被当成代码块渲染(lark_md 不闭合就不回退)。
|
|
18
|
+
*/
|
|
7
19
|
/**
|
|
8
20
|
* Card-action commands that must run with enqueue({ immediate: true }).
|
|
9
21
|
* These bypass the serial queue and execute immediately.
|
|
@@ -606,7 +618,6 @@ export declare class CommandRouter {
|
|
|
606
618
|
* - new-session: when requested (always shown on resume cards).
|
|
607
619
|
*/
|
|
608
620
|
private buildResumeActionButtons;
|
|
609
|
-
private static readonly LS_PAGE_SIZE;
|
|
610
621
|
/**
|
|
611
622
|
* `/ls` 实现(public:测试直接调用,替代 as unknown as)。
|
|
612
623
|
*
|
|
@@ -626,20 +637,6 @@ export declare class CommandRouter {
|
|
|
626
637
|
* 必须给绝对路径)。成功时文件本身即回复,返回 null(不额外发文本)。
|
|
627
638
|
*/
|
|
628
639
|
cmdDownload(args: string[], ctx: CommandContext): Promise<CommandResult | null>;
|
|
629
|
-
/**
|
|
630
|
-
* 单文件 ls 结果卡:路径 / 大小 / 修改时间 + 「下载」+「上级」。
|
|
631
|
-
*
|
|
632
|
-
* `/ls <file>` 命中普通文件时使用——用户可能想下载该文件或确认它是否存在,
|
|
633
|
-
* 此前直接回 `ls: xxx: Not a directory` 把文件路径当成错误处理。
|
|
634
|
-
*/
|
|
635
|
-
private buildFileCard;
|
|
636
|
-
/**
|
|
637
|
-
* `/ws` 实现(public:测试直接调用,替代 as unknown as,与 cmdLs 同款)。
|
|
638
|
-
*
|
|
639
|
-
* @param offset list 分支的分页起点(条目数)
|
|
640
|
-
* @param q list 分支的关键词筛选:name 或完整 path 命中即保留,大小写
|
|
641
|
-
* 不敏感。省略/空 = 无筛选。
|
|
642
|
-
*/
|
|
643
640
|
cmdWs(args: string[], ctx: CommandContext, offset?: number, q?: string): CommandResult;
|
|
644
641
|
/**
|
|
645
642
|
* DSH /resume preset 一致性校验:返回 mismatch 详情,或 undefined(一致/不可判定)。
|
|
@@ -667,13 +664,8 @@ export declare class CommandRouter {
|
|
|
667
664
|
private prefetchConfigCardCatalogs;
|
|
668
665
|
/** Build an interactive config card with CardKit 2.0 tabs + batch save */
|
|
669
666
|
buildConfigCard(): CommandResult;
|
|
670
|
-
/** /order 实现(public
|
|
671
|
-
cmdOrder(args: string[],
|
|
672
|
-
/** /order alias add:按 orderId 或列表序号(1 基)解析目标指令并绑定别名。 */
|
|
673
|
-
private cmdOrderAliasAdd;
|
|
674
|
-
/** /order alias rm:按 orderId 或列表序号(1 基)移除指令的别名。 */
|
|
675
|
-
private cmdOrderAliasRemove;
|
|
676
|
-
/** 将 `/order alias add|rm` 的目标解析为 order:优先 orderId 精确匹配,回退列表序号(1 基)。 */
|
|
667
|
+
/** /order 实现(public:测试直接调用)。 */
|
|
668
|
+
cmdOrder(args: string[], ctx: CommandContext, offset?: number): CommandResult;
|
|
677
669
|
private resolveOrderTarget;
|
|
678
670
|
}
|
|
679
671
|
export {};
|