@ai-setting/roy-agent-core 1.7.65 → 1.7.67
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/env/agent/agent-component.d.ts +56 -3
- package/dist/env/agent/agent-component.js +2 -2
- package/dist/env/agent/index.js +2 -2
- package/dist/env/agent/types.d.ts +28 -0
- package/dist/env/environment.d.ts +13 -0
- package/dist/env/event-source/command-card-action.d.ts +105 -0
- package/dist/env/event-source/command-cards.d.ts +72 -0
- package/dist/env/event-source/command-registry.d.ts +181 -0
- package/dist/env/event-source/command-types.d.ts +8 -0
- package/dist/env/event-source/event-source-handlers.d.ts +66 -0
- package/dist/env/event-source/event-source-handlers.js +7 -4
- package/dist/env/event-source/fallback-model-command.d.ts +80 -0
- package/dist/env/event-source/index.d.ts +7 -0
- package/dist/env/event-source/index.js +48 -7
- package/dist/env/event-source/timer-handler.d.ts +93 -1
- package/dist/env/index.js +15 -14
- package/dist/env/llm/index.js +1 -1
- package/dist/env/prompt/index.js +3 -2
- package/dist/env/prompt/prompts-index.d.ts +3 -8
- package/dist/env/task/delegate/delegate-tool.d.ts +58 -2
- package/dist/env/task/delegate/delegate-tool.js +5 -2
- package/dist/env/task/delegate/index.js +3 -2
- package/dist/env/task/index.js +9 -8
- package/dist/env/task/mcp/index.js +3 -2
- package/dist/env/task/plugins/__e2e__/laya-completion-e2e.d.ts +16 -0
- package/dist/env/task/plugins/index.js +4 -3
- package/dist/env/task/plugins/laya-completion-plugin.d.ts +133 -0
- package/dist/env/task/plugins/laya-port.d.ts +23 -0
- package/dist/env/task/storage/index.js +2 -2
- package/dist/env/task/storage/migrations/003_add_process_description.d.ts +1 -1
- package/dist/env/task/storage/migrations/log-migration.d.ts +49 -3
- package/dist/env/task/task-component.d.ts +43 -0
- package/dist/env/task/tools/completion-copy.d.ts +27 -0
- package/dist/env/task/tools/index.js +2 -1
- package/dist/env/task/tools/operation/create-tool.d.ts +1 -1
- package/dist/env/task/tools/operation/index.js +1 -1
- package/dist/env/task/tools/operation/operation-types.d.ts +10 -8
- package/dist/env/task/types.d.ts +3 -3
- package/dist/env/tool/built-in/index.js +2 -2
- package/dist/env/tool/built-in/query-background-process-tool.d.ts +10 -0
- package/dist/env/tool/index.js +3 -3
- package/dist/env/tool/types.d.ts +6 -0
- package/dist/index.js +60 -19
- package/dist/shared/@ai-setting/{roy-agent-core-rjzdj0xb.js → roy-agent-core-02j24hrg.js} +2 -0
- package/dist/shared/@ai-setting/{roy-agent-core-hmdcz3g9.js → roy-agent-core-1k83dq3a.js} +16 -6
- package/dist/shared/@ai-setting/{roy-agent-core-e42v9bcq.js → roy-agent-core-1kxf910n.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-amkqnyzy.js → roy-agent-core-58804s3j.js} +10 -0
- package/dist/shared/@ai-setting/roy-agent-core-6m4bw8jy.js +6 -0
- package/dist/shared/@ai-setting/roy-agent-core-8zas6w5q.js +1083 -0
- package/dist/shared/@ai-setting/{roy-agent-core-9bs6xrav.js → roy-agent-core-abqhkbn3.js} +6 -3
- package/dist/shared/@ai-setting/{roy-agent-core-f6c0nadn.js → roy-agent-core-b7jbqfsy.js} +25 -11
- package/dist/shared/@ai-setting/{roy-agent-core-hjejpcg5.js → roy-agent-core-dnjm17sa.js} +51 -9
- package/dist/shared/@ai-setting/{roy-agent-core-t0ktaevq.js → roy-agent-core-h5vmff8w.js} +60 -4
- package/dist/shared/@ai-setting/{roy-agent-core-xhrrgfdy.js → roy-agent-core-hfr6bzts.js} +168 -52
- package/dist/shared/@ai-setting/{roy-agent-core-18am1h07.js → roy-agent-core-k4ps1hxp.js} +1085 -46
- package/dist/shared/@ai-setting/{roy-agent-core-jz8dsypm.js → roy-agent-core-kpg25s2q.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-6masakz4.js → roy-agent-core-ma35jyd9.js} +19 -8
- package/dist/shared/@ai-setting/{roy-agent-core-gxzxq1sf.js → roy-agent-core-ntq0gz7q.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-rn57psp0.js → roy-agent-core-p5cz9m8v.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-w07ymg29.js → roy-agent-core-wksgtqf9.js} +1 -1
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-6z412atw.js +0 -654
- /package/dist/shared/@ai-setting/{roy-agent-core-5enxfga2.js → roy-agent-core-b4x6x4k2.js} +0 -0
- /package/dist/shared/@ai-setting/{roy-agent-core-es467wsz.js → roy-agent-core-dt104qa1.js} +0 -0
|
@@ -174,6 +174,15 @@ export interface AgentComponentOptions {
|
|
|
174
174
|
envPrefix?: string;
|
|
175
175
|
/** 直接传入的配置对象(可选,优先级最高) */
|
|
176
176
|
config?: Partial<AgentComponentConfig>;
|
|
177
|
+
/**
|
|
178
|
+
* Task #4794 — onStop() 时是否跳过 abort 所有运行中的 agent run。
|
|
179
|
+
*
|
|
180
|
+
* CLI `act` 一次性命令收尾时传 true:后台子 agent 是有意留下
|
|
181
|
+
* 继续跑的,onStop 无条件 abort 会中断其 LLM 调用(finishReason=aborted)。
|
|
182
|
+
* 子 agent 的存活由 TaskComponent.stop 的 waitForRunningTasks 保证。
|
|
183
|
+
* REPL / ESC cascade 等用户主动退出场景保持默认 false(abort 全部)。
|
|
184
|
+
*/
|
|
185
|
+
skipAbortRunningTasksOnStop?: boolean;
|
|
177
186
|
}
|
|
178
187
|
/**
|
|
179
188
|
* 按 agent 的 `allowedAgentTypes` 工具级可见性过滤工具列表。
|
|
@@ -246,6 +255,11 @@ export declare class AgentComponent extends BaseComponent {
|
|
|
246
255
|
private fallbackState;
|
|
247
256
|
/** ConfigComponent 用于配置管理 */
|
|
248
257
|
private configComponent?;
|
|
258
|
+
/**
|
|
259
|
+
* Task #4794 — onStop() 时是否跳过 abort 运行中的 agent run
|
|
260
|
+
* (act 一次性命令收尾 = true;用户主动退出 = false 默认)。
|
|
261
|
+
*/
|
|
262
|
+
private skipAbortRunningTasksOnStop;
|
|
249
263
|
/** 配置变更 watcher 清理函数 */
|
|
250
264
|
private configWatcher?;
|
|
251
265
|
/** Session 消息转换器 */
|
|
@@ -492,6 +506,21 @@ export declare class AgentComponent extends BaseComponent {
|
|
|
492
506
|
* 不阻塞 run。
|
|
493
507
|
*/
|
|
494
508
|
private _loadOrCreateCacheSnapshot;
|
|
509
|
+
/**
|
|
510
|
+
* 【Task #4813】B1 mtime 失效检测:快照是否因 memory 文件变化而过期
|
|
511
|
+
*
|
|
512
|
+
* 返回 null = 快照仍有效(可复用);返回字符串 = 过期原因(用于日志)。
|
|
513
|
+
*
|
|
514
|
+
* 兼容迁移:旧快照(Task #4813 之前持久化)无 memoryStat 字段 → 视为过期。
|
|
515
|
+
*/
|
|
516
|
+
private _isMemorySnapshotStale;
|
|
517
|
+
/**
|
|
518
|
+
* 【Task #4813】采集各 memory 文件的 mtime(按 MemoryComponent 配置的
|
|
519
|
+
* memoryPaths × memoryFile),供快照失效检测使用。
|
|
520
|
+
*
|
|
521
|
+
* 文件不存在 → 记为 0(删除后重拍语义);memory component 缺失 → 全 0。
|
|
522
|
+
*/
|
|
523
|
+
private _collectMemoryStat;
|
|
495
524
|
/**
|
|
496
525
|
* 【Task #2744】无 sessionId 时的 {{memory}} fallback 替换
|
|
497
526
|
*
|
|
@@ -545,13 +574,37 @@ export declare class AgentComponent extends BaseComponent {
|
|
|
545
574
|
*/
|
|
546
575
|
private invokeLLM;
|
|
547
576
|
/**
|
|
548
|
-
* Task #
|
|
577
|
+
* Task #4724 — 解析最终的兜底模型**有序列表**。
|
|
549
578
|
*
|
|
550
|
-
*
|
|
579
|
+
* 优先级(高 → 低):
|
|
580
|
+
* 1. 显式传入的**数组**(`AgentContext.fallbackModels`,来自 CLI `--fallback-model a,b,c`)
|
|
581
|
+
* 2. 显式传入的**单值**(`AgentContext.fallbackModel`,来自 CLI `--fallback-model xxx`)
|
|
582
|
+
* 3. 配置 `llm.fallbackModels`(**有序数组**,与 Task #4722 对齐)
|
|
583
|
+
* 4. 配置 `llm.fallbackModel`(旧单值,向后兼容)
|
|
584
|
+
*
|
|
585
|
+
* 显式传入(1/2)**完全覆盖**配置(3/4)—— CLI 覆盖 config。
|
|
551
586
|
* 若结果只有 modelId(无 `provider/` 前缀)且配置了 `llm.fallbackProvider`,
|
|
552
587
|
* 则补成 `providerId/modelId`(与 `--model` 同语义)。
|
|
588
|
+
*
|
|
589
|
+
* ★ Task #4722:`llm.fallbackModels` 是**有序数组**(顺序 = 优先级),
|
|
590
|
+
* 由 `roy-agent fallback-model add/remove/reorder` 与飞书卡片
|
|
591
|
+
* `##command##: fallback-model ...` 维护。
|
|
592
|
+
* ★ Task #4724 把语义从「只消费首项」扩展为**整链消费**:
|
|
593
|
+
* 数组第 2..N 项现在**真正参与降级**(主模型失败 → 依次尝试),
|
|
594
|
+
* 所以卡片上调整顺序**会**改变运行时行为。
|
|
595
|
+
*
|
|
596
|
+
* @param explicitList 显式列表(CLI / AgentContext.fallbackModels)
|
|
597
|
+
* @param explicitSingle 显式单值(CLI / AgentContext.fallbackModel)
|
|
598
|
+
*/
|
|
599
|
+
private resolveFallbackModels;
|
|
600
|
+
/**
|
|
601
|
+
* ★ Task #4724 review MINOR-4 — 兜底模型列表去重。
|
|
602
|
+
*
|
|
603
|
+
* `--fallback-model a/M1,a/M1` 会真的调两次 M1 —— 白白多一次请求 + 一次
|
|
604
|
+
* 失败等待。按**归一化后的字符串**去重,并保持首次出现的顺序
|
|
605
|
+
* (顺序 = 优先级,不能被去重打乱)。
|
|
553
606
|
*/
|
|
554
|
-
private
|
|
607
|
+
private static dedupeModels;
|
|
555
608
|
/**
|
|
556
609
|
* review P2-3 — 判断两个 model 标识是否"同一个模型"。
|
|
557
610
|
*
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
filterToolsByAgent,
|
|
8
8
|
parseToolList,
|
|
9
9
|
toLLMMessage
|
|
10
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
11
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
} from "../../shared/@ai-setting/roy-agent-core-hfr6bzts.js";
|
|
11
|
+
import"../../shared/@ai-setting/roy-agent-core-dt104qa1.js";
|
|
12
12
|
import"../../shared/@ai-setting/roy-agent-core-jvv2h3d6.js";
|
|
13
13
|
import"../../shared/@ai-setting/roy-agent-core-07fvy74y.js";
|
|
14
14
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
package/dist/env/agent/index.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
AgentComponent,
|
|
6
6
|
AgentComponentConfigSchema
|
|
7
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
8
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
7
|
+
} from "../../shared/@ai-setting/roy-agent-core-hfr6bzts.js";
|
|
8
|
+
import"../../shared/@ai-setting/roy-agent-core-dt104qa1.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-jvv2h3d6.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-07fvy74y.js";
|
|
11
11
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
@@ -51,6 +51,18 @@ export interface AgentContext {
|
|
|
51
51
|
* 认证失败(401/403)、请求错误(400)、主动取消、上下文超限 **不** 触发降级。
|
|
52
52
|
*/
|
|
53
53
|
fallbackModel?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Task #4724 — 兜底模型**有序列表**(`providerId/modelId`)。
|
|
56
|
+
*
|
|
57
|
+
* 主模型调用失败(404 / 429 / 配额耗尽 / 5xx / 超时 / 重试耗尽)时,按数组
|
|
58
|
+
* 顺序逐个尝试兜底模型,全部失败才抛原始错误。优先级:
|
|
59
|
+
* CLI `--fallback-model`(数组)> `AgentContext.fallbackModels`
|
|
60
|
+
* > CLI `--fallback-model`(单值)/ `AgentContext.fallbackModel`
|
|
61
|
+
* > 配置 `llm.fallbackModels`(数组)> 配置 `llm.fallbackModel`(旧单值)
|
|
62
|
+
*
|
|
63
|
+
* 认证失败(401/403)、请求错误(400)、主动取消、上下文超限 **不** 触发降级。
|
|
64
|
+
*/
|
|
65
|
+
fallbackModels?: string[];
|
|
54
66
|
/** 允许的工具列表(上下文级别,会覆盖 agent 配置) */
|
|
55
67
|
allowedTools?: string[];
|
|
56
68
|
/** 拒绝的工具列表(上下文级别,会覆盖 agent 配置) */
|
|
@@ -231,6 +243,8 @@ export interface HookContext {
|
|
|
231
243
|
systemPrompt: string;
|
|
232
244
|
additionInfo: string;
|
|
233
245
|
snapshotAt: number;
|
|
246
|
+
/** 【Task #4813】B1 mtime 失效检测:首拍时各 memory 文件的 mtime(ms) */
|
|
247
|
+
memoryStat?: MemorySnapshotStat;
|
|
234
248
|
};
|
|
235
249
|
/** 执行上下文(可直接修改属性) */
|
|
236
250
|
context: AgentContext;
|
|
@@ -299,6 +313,20 @@ export interface Plugin {
|
|
|
299
313
|
* Agent 类型
|
|
300
314
|
*/
|
|
301
315
|
export type AgentType = "primary" | "sub" | "summary";
|
|
316
|
+
/**
|
|
317
|
+
* 【Task #4813】cacheSnapshot 记忆失效检测(B1 mtime 方案):
|
|
318
|
+
* 首拍时各 memory 文件的 mtime 快照。
|
|
319
|
+
*
|
|
320
|
+
* - globalMtime: global memory.md 的 mtime(ms);文件不存在记 0
|
|
321
|
+
* - projectMtime: project memory.md 的 mtime(ms);文件不存在记 0
|
|
322
|
+
*
|
|
323
|
+
* 复用快照前比对当前 mtime,不一致 → 快照过期 → 重拍。
|
|
324
|
+
* 旧快照无此字段 → 视为过期(一次性迁移重拍)。
|
|
325
|
+
*/
|
|
326
|
+
export interface MemorySnapshotStat {
|
|
327
|
+
globalMtime: number;
|
|
328
|
+
projectMtime: number;
|
|
329
|
+
}
|
|
302
330
|
/**
|
|
303
331
|
* Agent 状态
|
|
304
332
|
*/
|
|
@@ -177,6 +177,19 @@ export declare class BaseEnvironment extends BaseComponent implements Environmen
|
|
|
177
177
|
protected startComponents(): Promise<void>;
|
|
178
178
|
/**
|
|
179
179
|
* 停止所有组件
|
|
180
|
+
*
|
|
181
|
+
* Task #4794 根因 #4 — LIFO 逆序停止。
|
|
182
|
+
*
|
|
183
|
+
* 注册顺序是 config→session→llm→tool→agent→…→task,
|
|
184
|
+
* 旧实现按 Map 迭代顺序 FIFO 停止 → task 最后停。
|
|
185
|
+
* 当 task 组件在 stop() 里等待后台子 agent 完成
|
|
186
|
+
* (BackgroundTaskManager.dispose waitForRunningTasks)时,
|
|
187
|
+
* 子 agent 下一次 LLM 调用会因 LLMComponent 已停而抛
|
|
188
|
+
* "LLMComponent is not running" → 任务 failed → 等待中断
|
|
189
|
+
* → 进程退出杀死同进程子 agent(e2e 取证 23:22:56.803)。
|
|
190
|
+
*
|
|
191
|
+
* LIFO:task(最后注册)最先停止,等待期间 llm/tool/agent
|
|
192
|
+
* 仍存活;config/session(最先注册)最后停止。
|
|
180
193
|
*/
|
|
181
194
|
protected stopComponents(): Promise<void>;
|
|
182
195
|
/**
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Task #4722 收口 — command 卡片的按钮回调处理
|
|
3
|
+
*
|
|
4
|
+
* 用户在飞书卡片上点「↑ / ↓ / 新增」按钮 → 飞书推 `card.action.trigger`
|
|
5
|
+
* → es handler 分流到本模块 → **回到 command 子系统**执行 →
|
|
6
|
+
* 用返回的新卡片 patch 原卡片(飞书 token,30min 有效、最多 2 次)。
|
|
7
|
+
*
|
|
8
|
+
* ## 为什么单独一个模块(不塞进 lark-card-action-handler.ts)
|
|
9
|
+
*
|
|
10
|
+
* `lark-card-action-handler.ts` 是 **task 卡片**的处理器,动作语义是
|
|
11
|
+
* 建群/解散群(依赖 taskId + task component)。command 卡片的动作语义是
|
|
12
|
+
* 改 fallback 列表(依赖 config.jsonc 路径),两者数据源完全不同。
|
|
13
|
+
* 混在一起会让 task 侧被迫依赖 command 侧,反之亦然 —— 违背
|
|
14
|
+
* 「command 功能不耦合 es 逻辑」的原则。
|
|
15
|
+
*
|
|
16
|
+
* 本模块是**纯函数 + 端口注入**:
|
|
17
|
+
* - 不依赖 es、不依赖 lark-cli、不直接读配置
|
|
18
|
+
* - 由调用方(es handler)提供「执行 command」和「patch 卡片」两个端口
|
|
19
|
+
*
|
|
20
|
+
* ## 动作映射
|
|
21
|
+
*
|
|
22
|
+
* | 卡片动作 | 触发方式 | 执行的 command |
|
|
23
|
+
* |---|---|---|
|
|
24
|
+
* | `fbmodel_up` | button behaviors[].value.action | `fallback-model reorder <i> <i-1>` |
|
|
25
|
+
* | `fbmodel_down` | button behaviors[].value.action | `fallback-model reorder <i> <i+1>` |
|
|
26
|
+
* | `fbmodel_add` | form 提交(action_name) | `fallback-model add <form_value>` |
|
|
27
|
+
*/
|
|
28
|
+
import type { CommandResult } from "./command-registry";
|
|
29
|
+
/** 卡片回调事件里 command 侧关心的字段 */
|
|
30
|
+
export interface CommandCardActionEvent {
|
|
31
|
+
/** 按钮 callback 的 value(JSON 解析后) */
|
|
32
|
+
actionValue?: Record<string, unknown>;
|
|
33
|
+
/** form 提交的字段值(按组件 name 映射) */
|
|
34
|
+
formValue?: Record<string, unknown>;
|
|
35
|
+
/** 组件的 name(form 内按钮用它标识动作) */
|
|
36
|
+
actionName?: string;
|
|
37
|
+
/** 卡片所在 chat_id */
|
|
38
|
+
chatId?: string;
|
|
39
|
+
/** 被点的卡片 message_id */
|
|
40
|
+
messageId?: string;
|
|
41
|
+
/** 飞书 token(30min 有效,最多 2 次) */
|
|
42
|
+
token?: string;
|
|
43
|
+
/** lark-cli profile */
|
|
44
|
+
profile?: string;
|
|
45
|
+
}
|
|
46
|
+
/** 端口(由调用方注入,保持本模块纯函数) */
|
|
47
|
+
export interface CommandCardActionPorts {
|
|
48
|
+
/**
|
|
49
|
+
* 执行一条 command(返回结构化结果)。
|
|
50
|
+
* 由 es handler 注入 → 内部走 command 注册表。
|
|
51
|
+
*/
|
|
52
|
+
executeCommand: (subcommand: string, args: string[], extra?: {
|
|
53
|
+
configPath?: string;
|
|
54
|
+
}) => Promise<CommandResult>;
|
|
55
|
+
/** command 用的配置文件路径 */
|
|
56
|
+
configPath?: string;
|
|
57
|
+
/**
|
|
58
|
+
* 用飞书 token patch 卡片(把新卡片刷到原卡片上)。
|
|
59
|
+
* 不注入时只回文本,不 patch。
|
|
60
|
+
*/
|
|
61
|
+
patchCard?: (token: string, card: unknown, profile?: string) => Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
/** 处理结果 */
|
|
64
|
+
export interface CommandCardActionResult {
|
|
65
|
+
ok: boolean;
|
|
66
|
+
/** 实际执行的 command(描述) */
|
|
67
|
+
executed?: string;
|
|
68
|
+
/** 要 patch 的新卡片(无则不 patch) */
|
|
69
|
+
card?: unknown;
|
|
70
|
+
/**
|
|
71
|
+
* 卡片刷新失败的原因(业务动作成功但卡片没刷新)。
|
|
72
|
+
* ★ Task #4722 round3(MINOR m1):飞书 token 30min/2 次,用尽后必然发生;
|
|
73
|
+
* 上层据此给用户回执,避免卡片静默停在旧状态。
|
|
74
|
+
*/
|
|
75
|
+
patchError?: string;
|
|
76
|
+
/** 错误说明 */
|
|
77
|
+
error?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* 判断一个卡片回调是不是 **command 卡片**的回调。
|
|
81
|
+
*
|
|
82
|
+
* 判定依据(任一命中即可):
|
|
83
|
+
* - `action_value.action` 以 `fbmodel` 开头(button behaviors 回调)
|
|
84
|
+
* - `action_name` 以 `fbmodel` 开头(form 提交回调)
|
|
85
|
+
*/
|
|
86
|
+
export declare function isCommandCardAction(event: {
|
|
87
|
+
actionValue?: unknown;
|
|
88
|
+
actionName?: string;
|
|
89
|
+
}): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* 把卡片回调翻译成 command 调用。
|
|
92
|
+
*
|
|
93
|
+
* @returns command 名 + 参数;无法识别时返回 null
|
|
94
|
+
*/
|
|
95
|
+
export declare function translateCardActionToCommand(event: CommandCardActionEvent): {
|
|
96
|
+
subcommand: string;
|
|
97
|
+
args: string[];
|
|
98
|
+
} | null;
|
|
99
|
+
/**
|
|
100
|
+
* 处理 command 卡片的按钮回调。
|
|
101
|
+
*
|
|
102
|
+
* 流程:翻译成 command → 交给 command 子系统执行 → 拿到新卡片 →
|
|
103
|
+
* 用 token patch 原卡片(让用户看到最新列表)。
|
|
104
|
+
*/
|
|
105
|
+
export declare function handleCommandCardAction(event: CommandCardActionEvent, ports: CommandCardActionPorts): Promise<CommandCardActionResult>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Task #4722 — command 结果 → 飞书卡片渲染
|
|
3
|
+
*
|
|
4
|
+
* es 前端(lark-cli)用这些函数把 CommandResult 渲染成
|
|
5
|
+
* 飞书 interactive 卡片。卡片 JSON 直接透传给
|
|
6
|
+
* `lark-cli im +messages-reply --msg-type interactive --content`。
|
|
7
|
+
*
|
|
8
|
+
* ## 卡片版本:Card 2.0
|
|
9
|
+
*
|
|
10
|
+
* 按 lark-cli 官方卡片工作流(`lark-im/references/card/lark-im-card-create.md`),
|
|
11
|
+
* Card 2.0 必须:
|
|
12
|
+
* - 顶层 `"schema": "2.0"`(否则按 1.0 渲染)
|
|
13
|
+
* - 内容放在 `body.elements`(不是 1.0 的顶层 `elements`)
|
|
14
|
+
* - 交互组件用 `behaviors`(2.0 废弃了 1.0 的顶层 `action` 模块)
|
|
15
|
+
*
|
|
16
|
+
* ## 交互控件(用户需求:卡片中可有可编辑的 list)
|
|
17
|
+
*
|
|
18
|
+
* | 控件 | 行为 | 用途 |
|
|
19
|
+
* |---|---|---|
|
|
20
|
+
* | `button` × N | `behaviors:[{type:"callback"}]` | 每项的上移 / 下移(调优先级) |
|
|
21
|
+
* | `form` + `input` + `button` | `form_action_type:"submit"` | 新增一个 fallback model |
|
|
22
|
+
*
|
|
23
|
+
* 按钮 callback 的 value 用 `action:"fbmodel*"` 命名空间,与 task 卡片的
|
|
24
|
+
* `create_group` / `disband_group` 区分开 —— 回调路由据此分流。
|
|
25
|
+
*
|
|
26
|
+
* ## 降级路径
|
|
27
|
+
*
|
|
28
|
+
* 若飞书后台未开启 `card.action.trigger` 回调(consumer 能 ready 但收不到
|
|
29
|
+
* 事件),卡片上的按钮不会生效。因此卡片**同时**保留文本指令引导,
|
|
30
|
+
* 用户也可以直接敲 `##command##: fallback-model ...` 完成同样的操作。
|
|
31
|
+
*/
|
|
32
|
+
import type { LarkCard } from "./command-types";
|
|
33
|
+
/** 飞书 interactive 卡片 JSON(lark-cli 透传) */
|
|
34
|
+
export type { LarkCard };
|
|
35
|
+
/**
|
|
36
|
+
* command 卡片里按钮 callback 的 action 命名空间。
|
|
37
|
+
*
|
|
38
|
+
* 与 task 卡片的 `create_group` / `disband_group` 区分开,
|
|
39
|
+
* 回调路由按前缀 `fbmodel` 分流到 command 子系统。
|
|
40
|
+
*/
|
|
41
|
+
export declare const FALLBACK_MODEL_ACTION_NS = "fbmodel";
|
|
42
|
+
/** 卡片 action 常量(回调路由与前端共用) */
|
|
43
|
+
export declare const FALLBACK_MODEL_ACTIONS: {
|
|
44
|
+
/** 新增(form 提交) */
|
|
45
|
+
readonly add: "fbmodel_add";
|
|
46
|
+
/** 上移一项 */
|
|
47
|
+
readonly up: "fbmodel_up";
|
|
48
|
+
/** 下移一项 */
|
|
49
|
+
readonly down: "fbmodel_down";
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* 判断一个卡片是不是 fallback-model 卡片。
|
|
53
|
+
*
|
|
54
|
+
* 用于回调路由:卡片被 patch 后再点按钮,仍能识别出是 command 卡片。
|
|
55
|
+
*
|
|
56
|
+
* ★ Task #4722 round2(交叉验证 MINOR-8):**只按 header 标题判定**。
|
|
57
|
+
* Card 2.0 的顶层字段是固定的(schema / config / header / body),
|
|
58
|
+
* 自定义顶层 key(如 `command: "fbmodel"`)有被飞书校验拒绝的风险 →
|
|
59
|
+
* 不再使用。
|
|
60
|
+
*/
|
|
61
|
+
export declare function isFallbackModelCard(card: unknown): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* 渲染纯文本卡片(标题 + markdown 正文)
|
|
64
|
+
*/
|
|
65
|
+
export declare function renderTextCard(title: string, content: string): LarkCard;
|
|
66
|
+
/**
|
|
67
|
+
* 渲染 fallback-model list 卡片(Card 2.0,可交互)。
|
|
68
|
+
*
|
|
69
|
+
* @param list fallback 模型列表(有序 = 优先级,index 0 最高)
|
|
70
|
+
* @param primaryModel 主模型(展示对照,可缺省)
|
|
71
|
+
*/
|
|
72
|
+
export declare function renderFallbackModelCard(list: string[], primaryModel?: string): LarkCard;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Task #4722 — command 子系统(`##command##:` 前缀分流)
|
|
3
|
+
*
|
|
4
|
+
* ## 用户需求
|
|
5
|
+
*
|
|
6
|
+
* 在飞书输入 `##command##: list model` → 不走 agent 处理链路,
|
|
7
|
+
* 直接执行 command 并用卡片消息回显。command 子系统是**纯核心层
|
|
8
|
+
* 能力**,不耦合任何 es 逻辑;es 只是它的一个交互前端。
|
|
9
|
+
*
|
|
10
|
+
* ## 架构
|
|
11
|
+
*
|
|
12
|
+
* ┌──────────┐ ##command##: xxx ┌──────────────────┐
|
|
13
|
+
* │ es 前端 │ ──────────────────→ │ CommandRegistry │
|
|
14
|
+
* │ (lark) │ ←────────────────── │ (本文件) │
|
|
15
|
+
* └──────────┘ CommandResult └──────────────────┘
|
|
16
|
+
* │ (text/card) │
|
|
17
|
+
* │ 普通消息 → 走 agent │ 注册
|
|
18
|
+
* ↓ ↓
|
|
19
|
+
* eventHandler(evt) 各 command 实现
|
|
20
|
+
* (fallback-model 等)
|
|
21
|
+
*
|
|
22
|
+
* ## 前缀语法
|
|
23
|
+
*
|
|
24
|
+
* ##command##: <subcommand> [args...]
|
|
25
|
+
*
|
|
26
|
+
* - 前缀 token 精确匹配 `##command##:`,但**大小写不敏感**
|
|
27
|
+
* (`##COMMAND##:` / `##Command##:` 同样识别;`##` 包裹 + 尾随冒号
|
|
28
|
+
* 已足够特异,不会与正文强调词混淆)
|
|
29
|
+
* - 允许前导空白;`##command##:` 与命令之间可有任意空白
|
|
30
|
+
* - 容忍开头的 @-提及(`<at user_id="ou_x"></at>` / `@_user_1`)——
|
|
31
|
+
* 群里 @bot 的典型形态
|
|
32
|
+
* - 全角冒号 `:` 不识别(用户手滑时按普通消息走 agent,agent 会引导)
|
|
33
|
+
*/
|
|
34
|
+
/** 命令前缀(token 本身精确,但**匹配时大小写不敏感**) */
|
|
35
|
+
export declare const COMMAND_PREFIX = "##command##:";
|
|
36
|
+
/**
|
|
37
|
+
* 剥离消息开头的 @-提及标记。
|
|
38
|
+
*
|
|
39
|
+
* ★ Task #4722 round2(交叉验证 MINOR-3):飞书群里 @bot 时,消息正文形如
|
|
40
|
+
* `<at user_id="ou_bot"></at> ##command##: list model`
|
|
41
|
+
* 或旧式 `@_user_1 ##command##: list model`。
|
|
42
|
+
* 这些前缀会让 `##command##:` 不在开头 → 命令被静默丢给 agent 链路。
|
|
43
|
+
*
|
|
44
|
+
* 支持的形态:
|
|
45
|
+
* - `<at user_id="ou_x"></at>` / `<at user_id="ou_x">名字</at>` / `<at user_id="ou_x"/>`
|
|
46
|
+
* - `@_user_1` / `@_all`
|
|
47
|
+
*
|
|
48
|
+
* 只剥离**开头连续**的提及标记(正文中间的提及不动)。
|
|
49
|
+
*/
|
|
50
|
+
export declare function stripLeadingMentions(text: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* 判断消息是否是 command 消息(以 `##command##:` 开头,允许前导空白)。
|
|
53
|
+
*
|
|
54
|
+
* **大小写不敏感**:`##command##:` / `##COMMAND##:` / `##Command##:` 都识别。
|
|
55
|
+
* (用户需求要「前缀识别鲁棒性」;大小写变体不会与正文强调词混淆,
|
|
56
|
+
* 因为 `##` 包裹 + 尾随冒号已经足够特异。)
|
|
57
|
+
*
|
|
58
|
+
* **容忍 @-提及前缀**:`<at user_id="ou_bot"></at> ##command##: ...` 也识别。
|
|
59
|
+
*/
|
|
60
|
+
export declare function isCommandMessage(text: string): boolean;
|
|
61
|
+
/** 一条命令的调用(解析结果) */
|
|
62
|
+
export interface CommandInvocation {
|
|
63
|
+
/** 子命令名,如 "list" / "fallback-model";空命令为 "" */
|
|
64
|
+
subcommand: string;
|
|
65
|
+
/** 参数列表 */
|
|
66
|
+
args: string[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 从消息中提取命令调用。
|
|
70
|
+
*
|
|
71
|
+
* 非命令消息返回 null;`##command##:` 后为空时 subcommand 为 ""。
|
|
72
|
+
*/
|
|
73
|
+
export declare function extractCommandInvocation(text: string): CommandInvocation | null;
|
|
74
|
+
/** command 执行上下文 */
|
|
75
|
+
export interface CommandContext {
|
|
76
|
+
/** 子命令参数 */
|
|
77
|
+
args: string[];
|
|
78
|
+
/**
|
|
79
|
+
* 配置文件路径(读写 ~/.roy-agent/config.jsonc 之类)。
|
|
80
|
+
* 测试注入临时路径;生产由 es 前端传入。
|
|
81
|
+
*/
|
|
82
|
+
configPath?: string;
|
|
83
|
+
/** 原始消息文本 */
|
|
84
|
+
rawText: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 结构化输出:**双形态**(text 必填 + card 可选)。
|
|
88
|
+
*
|
|
89
|
+
* 为什么要双形态而不是互斥联合(`{kind:"text"} | {kind:"card"}`):
|
|
90
|
+
* command 子系统是**多前端共享**的(es 飞书卡片前端 + CLI 文本前端),
|
|
91
|
+
* 互斥联合会导致每个前端只能看到一种形态,CLI 侧被迫把业务逻辑
|
|
92
|
+
* 复制一遍(违背「可复用已有 command 逻辑」的原始需求)。
|
|
93
|
+
*
|
|
94
|
+
* - `text`:**恒为字符串**。任何前端都能渲染(CLI 直接打印,
|
|
95
|
+
* 飞书侧也可退化成 markdown 文本)。
|
|
96
|
+
* - `card`:**可选**。es 前端优先用它发 interactive 卡片;
|
|
97
|
+
* 没有 card 时前端自动降级到 text。
|
|
98
|
+
*
|
|
99
|
+
* 兼容:旧的 `{kind:"text", text}` / `{kind:"card", card}` 仍然可构造
|
|
100
|
+
* (kind 字段保留为可选标记),但新代码应只用 text + card 两个字段。
|
|
101
|
+
*/
|
|
102
|
+
export interface CommandOutput {
|
|
103
|
+
/** 纯文本形态(恒存在) */
|
|
104
|
+
text: string;
|
|
105
|
+
/** 飞书 interactive 卡片形态(可选) */
|
|
106
|
+
card?: Record<string, unknown>;
|
|
107
|
+
/**
|
|
108
|
+
* 形态标记(可选,保留向后兼容)。
|
|
109
|
+
* - "card":card 字段可用
|
|
110
|
+
* - "text":仅 text 可用
|
|
111
|
+
*/
|
|
112
|
+
kind?: "text" | "card";
|
|
113
|
+
}
|
|
114
|
+
/** 兼容旧名:纯文本输出 */
|
|
115
|
+
export interface CommandTextOutput extends CommandOutput {
|
|
116
|
+
kind?: "text";
|
|
117
|
+
}
|
|
118
|
+
/** 兼容旧名:卡片输出 */
|
|
119
|
+
export interface CommandCardOutput extends CommandOutput {
|
|
120
|
+
kind?: "card";
|
|
121
|
+
card: Record<string, unknown>;
|
|
122
|
+
}
|
|
123
|
+
/** command 执行结果 */
|
|
124
|
+
export interface CommandResult {
|
|
125
|
+
ok: boolean;
|
|
126
|
+
/** 成功时的结构化输出 */
|
|
127
|
+
output?: CommandOutput;
|
|
128
|
+
/** 失败时的错误说明(面向用户,可含用法提示) */
|
|
129
|
+
error?: string;
|
|
130
|
+
}
|
|
131
|
+
/** 单个 command 的定义 */
|
|
132
|
+
export interface CommandDefinition {
|
|
133
|
+
/** 命令名(如 "fallback-model" / "list") */
|
|
134
|
+
name: string;
|
|
135
|
+
description: string;
|
|
136
|
+
/** 用法说明(出错时展示给用户) */
|
|
137
|
+
usage: string;
|
|
138
|
+
execute(ctx: CommandContext): Promise<CommandResult>;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Command 注册表。
|
|
142
|
+
*
|
|
143
|
+
* 类似 event-source-handlers.ts 的 builtInHandlers 模式:
|
|
144
|
+
* 各 command 自注册,es 前端只管分发与渲染。
|
|
145
|
+
*/
|
|
146
|
+
export declare class CommandRegistry {
|
|
147
|
+
private commands;
|
|
148
|
+
/** 注册 command;重名抛错(防止静默覆盖) */
|
|
149
|
+
register(def: CommandDefinition): void;
|
|
150
|
+
has(name: string): boolean;
|
|
151
|
+
list(): CommandDefinition[];
|
|
152
|
+
/**
|
|
153
|
+
* 分发执行。
|
|
154
|
+
*
|
|
155
|
+
* - 未知命令 / 空命令 → ok=false + 可用命令列表
|
|
156
|
+
* - execute 抛异常 → ok=false + error(不向上抛,es 前端可安全渲染)
|
|
157
|
+
*/
|
|
158
|
+
dispatch(subcommand: string, args: string[], extra?: Partial<CommandContext>): Promise<CommandResult>;
|
|
159
|
+
/** 帮助文本(列出所有命令) */
|
|
160
|
+
private renderHelp;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* 全局 command 注册表(懒初始化,内建命令在此注册)。
|
|
164
|
+
*
|
|
165
|
+
* 未来扩展:新增 command 只需在此追加,es 前端零改动。
|
|
166
|
+
*/
|
|
167
|
+
export declare function getGlobalCommandRegistry(): CommandRegistry;
|
|
168
|
+
/**
|
|
169
|
+
* es 前端入口:处理一条消息。
|
|
170
|
+
*
|
|
171
|
+
* - 命令消息 → 执行并返回 CommandResult(es 前端负责渲染 text/card)
|
|
172
|
+
* - 普通消息 → 返回 null(es 前端继续走 agent 链路)
|
|
173
|
+
*
|
|
174
|
+
* @param text 消息文本
|
|
175
|
+
* @param opts.configPath 配置文件路径(传给 command ctx)
|
|
176
|
+
* @param opts.registry 测试注入用注册表;缺省用全局注册表
|
|
177
|
+
*/
|
|
178
|
+
export declare function handleCommandMessage(text: string, opts?: {
|
|
179
|
+
configPath?: string;
|
|
180
|
+
registry?: CommandRegistry;
|
|
181
|
+
}): Promise<CommandResult | null>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Task #4722 — command 子系统的共享类型
|
|
3
|
+
*
|
|
4
|
+
* 单独成文件,避免 `command-cards.ts` ↔ `command-registry.ts` 互相 import
|
|
5
|
+
* 形成循环依赖(卡片渲染要读 command 的输出类型,command 要用卡片渲染)。
|
|
6
|
+
*/
|
|
7
|
+
/** 飞书 interactive 卡片 JSON(lark-cli 透传) */
|
|
8
|
+
export type LarkCard = Record<string, unknown>;
|
|
@@ -442,6 +442,59 @@ export declare class LarkCliInstance implements EventSourceInstance {
|
|
|
442
442
|
* 详见 reports/2026-10-19-lark-cli-multi-event-consume-research.md
|
|
443
443
|
*/
|
|
444
444
|
private handleCardActionEvent;
|
|
445
|
+
/**
|
|
446
|
+
* ★ Task #4722:处理 `##command##:` 命令消息(**不走 Agent 链路**)
|
|
447
|
+
*
|
|
448
|
+
* 流程:
|
|
449
|
+
* 1. 交给 command 子系统分发(command-registry.ts)
|
|
450
|
+
* 2. 结果是 card → 用 `lark-cli im +messages-reply --msg-type interactive` 发卡片
|
|
451
|
+
* 3. 结果是 text → 用 `--markdown` 发文本
|
|
452
|
+
* 4. 失败 → 发错误回执(不静默)
|
|
453
|
+
*
|
|
454
|
+
* 与 card.action.trigger 的共同点:**确定性动作,不需要 LLM 参与**。
|
|
455
|
+
* 差异:card.action.trigger 是「飞书推的卡片点击」,这里是「用户敲的命令」。
|
|
456
|
+
*/
|
|
457
|
+
/**
|
|
458
|
+
* ★ Task #4722 收口:判断一个 card.action.trigger 事件是不是 **command 卡片**回调。
|
|
459
|
+
*
|
|
460
|
+
* command 卡片用 `fbmodel_*` 动作命名空间(见 command-cards.ts),
|
|
461
|
+
* 与 task 卡片的 `create_group` / `disband_group` 区分开。
|
|
462
|
+
*/
|
|
463
|
+
private isCommandCardActionEvent;
|
|
464
|
+
/**
|
|
465
|
+
* ★ Task #4722 收口:处理 command 卡片按钮回调(改 fallback 列表)。
|
|
466
|
+
*
|
|
467
|
+
* 流程:
|
|
468
|
+
* 1. 翻译成 command 调用(reorder / add)
|
|
469
|
+
* 2. 交给 command 子系统执行
|
|
470
|
+
* 3. 用飞书 token(30min / 2 次)patch 原卡片 → 用户看到最新列表
|
|
471
|
+
*
|
|
472
|
+
* 失败 → 回一条文本消息告诉用户(不静默)。
|
|
473
|
+
*/
|
|
474
|
+
private handleCommandCardActionEvent;
|
|
475
|
+
private handleCommandMessage;
|
|
476
|
+
/**
|
|
477
|
+
* 解析 command 用的配置文件路径。
|
|
478
|
+
*
|
|
479
|
+
* 优先 event-source 配置里的 `options.configPath`(测试可注入临时路径),
|
|
480
|
+
* 否则用默认 `~/.roy-agent/config.jsonc`。
|
|
481
|
+
*/
|
|
482
|
+
private resolveCommandConfigPath;
|
|
483
|
+
/**
|
|
484
|
+
* 发送飞书 interactive 卡片。
|
|
485
|
+
*
|
|
486
|
+
* 用 `lark-cli im +messages-reply --msg-type interactive --content '<json>'`。
|
|
487
|
+
* 优先 reply 原消息(带 messageId),否则发到 chatId。
|
|
488
|
+
*/
|
|
489
|
+
private sendLarkCard;
|
|
490
|
+
/** 发送飞书 markdown 文本 */
|
|
491
|
+
private sendLarkText;
|
|
492
|
+
/**
|
|
493
|
+
* 统一的 lark-cli 发消息调用。
|
|
494
|
+
*
|
|
495
|
+
* 身份固定 `bot`(Task #4557:非 bot 会被 event consume 回灌)。
|
|
496
|
+
*/
|
|
497
|
+
private spawnLarkCli;
|
|
445
498
|
/**
|
|
446
499
|
* 用飞书 token 直接 patch 卡片(30min 有效,最多 2 次)
|
|
447
500
|
*
|
|
@@ -479,6 +532,19 @@ export declare class LarkCliInstance implements EventSourceInstance {
|
|
|
479
532
|
* @param headline 事件标题句(未送达时要求 agent 自己讲清这个事实)
|
|
480
533
|
*/
|
|
481
534
|
export declare function renderRuleNoticeSection(ruleNotice: RuleNoticeInfo | undefined, headline: string): string;
|
|
535
|
+
/**
|
|
536
|
+
* 提取消息文本(仅纯文本消息)。
|
|
537
|
+
*
|
|
538
|
+
* ★ Task #4722:`##command##:` 分流需要拿到**用户实际输入的文本**。
|
|
539
|
+
* lark-cli 的 content 形态有多种:
|
|
540
|
+
* - 简化格式:顶层 `content: "{\"text\":\"...\"}"`(字符串 JSON)
|
|
541
|
+
* - 简化格式:顶层 `content: { "text": "..." }`(对象)
|
|
542
|
+
* - 嵌套格式:`event.message.content`
|
|
543
|
+
*
|
|
544
|
+
* 富文本消息(content 是 `[{tag:"md",text:...}]` 数组)不做 command 处理
|
|
545
|
+
* —— 数组形式不是用户输入的纯指令,交给 agent 正常处理更安全。
|
|
546
|
+
*/
|
|
547
|
+
export declare function extractCommandText(rawEvent: unknown): string | undefined;
|
|
482
548
|
/**
|
|
483
549
|
* LarkCli Handler
|
|
484
550
|
*/
|
|
@@ -4,25 +4,27 @@ import {
|
|
|
4
4
|
bountyIMHandler,
|
|
5
5
|
buildLarkRecommendedAction,
|
|
6
6
|
builtInHandlers,
|
|
7
|
+
extractCommandText,
|
|
7
8
|
extractMetadata,
|
|
8
9
|
getBuiltInHandler,
|
|
9
10
|
larkCliHandler,
|
|
10
11
|
patchCardByLarkCli,
|
|
11
12
|
renderRuleNoticeSection,
|
|
12
13
|
timerHandler
|
|
13
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
14
|
+
} from "../../shared/@ai-setting/roy-agent-core-k4ps1hxp.js";
|
|
14
15
|
import"../../shared/@ai-setting/roy-agent-core-bxkjk7zx.js";
|
|
15
16
|
import"../../shared/@ai-setting/roy-agent-core-add1zqsh.js";
|
|
16
17
|
import {
|
|
17
18
|
cliCommandHandler
|
|
18
19
|
} from "../../shared/@ai-setting/roy-agent-core-v0hf14bj.js";
|
|
19
20
|
import"../../shared/@ai-setting/roy-agent-core-tm1mxttk.js";
|
|
20
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
21
|
+
import"../../shared/@ai-setting/roy-agent-core-b7jbqfsy.js";
|
|
21
22
|
import"../../shared/@ai-setting/roy-agent-core-na18zwj0.js";
|
|
22
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
23
|
+
import"../../shared/@ai-setting/roy-agent-core-abqhkbn3.js";
|
|
23
24
|
import"../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
24
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
25
|
+
import"../../shared/@ai-setting/roy-agent-core-ma35jyd9.js";
|
|
25
26
|
import"../../shared/@ai-setting/roy-agent-core-tr3ep81v.js";
|
|
27
|
+
import"../../shared/@ai-setting/roy-agent-core-6m4bw8jy.js";
|
|
26
28
|
import"../../shared/@ai-setting/roy-agent-core-0ys85x46.js";
|
|
27
29
|
import"../../shared/@ai-setting/roy-agent-core-zk2jg0v7.js";
|
|
28
30
|
import"../../shared/@ai-setting/roy-agent-core-c2gbt68e.js";
|
|
@@ -51,6 +53,7 @@ export {
|
|
|
51
53
|
larkCliHandler,
|
|
52
54
|
getBuiltInHandler,
|
|
53
55
|
extractMetadata,
|
|
56
|
+
extractCommandText,
|
|
54
57
|
cliCommandHandler,
|
|
55
58
|
builtInHandlers,
|
|
56
59
|
buildLarkRecommendedAction,
|