@ai-setting/roy-agent-core 1.7.77 → 1.7.88
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/config/config-protection.d.ts +89 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +23 -7
- package/dist/env/agent/agent-component.d.ts +43 -22
- package/dist/env/agent/agent-component.js +13 -12
- package/dist/env/agent/index.js +13 -12
- package/dist/env/agent/types.d.ts +46 -12
- package/dist/env/commands/index.js +7 -7
- package/dist/env/context/index.js +3 -3
- package/dist/env/debug/index.js +7 -7
- package/dist/env/error-reply.d.ts +6 -0
- package/dist/env/error-reply.js +1 -1
- package/dist/env/event-source/bounty-im-handler.d.ts +8 -0
- package/dist/env/event-source/es-command.d.ts +39 -0
- package/dist/env/event-source/es-plugins.d.ts +68 -0
- package/dist/env/event-source/event-source-component.d.ts +15 -0
- package/dist/env/event-source/event-source-handlers.d.ts +84 -0
- package/dist/env/event-source/event-source-handlers.js +40 -23
- package/dist/env/event-source/event-store.js +2 -2
- package/dist/env/event-source/index.d.ts +5 -1
- package/dist/env/event-source/index.js +75 -23
- package/dist/env/event-source/timer-handler.d.ts +98 -0
- package/dist/env/event-source/types.d.ts +154 -2
- package/dist/env/event-source/wecom-card-action-handler.d.ts +373 -0
- package/dist/env/event-source/wecom-card-builder.d.ts +426 -0
- package/dist/env/event-source/wecom-cli-handler.d.ts +291 -0
- package/dist/env/event-source/wecom-cli-sender.d.ts +88 -0
- package/dist/env/event-source/wecom-media.d.ts +130 -0
- package/dist/env/event-source/wecom-respond-registry.d.ts +151 -0
- package/dist/env/event-source/wecom-respond-registry.js +33 -0
- package/dist/env/event-source/wecom-session-card-sender.d.ts +135 -0
- package/dist/env/event-source/wecom-session-card-sender.js +153 -0
- package/dist/env/event-source/wecom-ws-bridge.d.ts +213 -0
- package/dist/env/hook/index.js +5 -5
- package/dist/env/index.js +51 -45
- package/dist/env/llm/index.js +9 -8
- package/dist/env/log-trace/index.js +7 -7
- package/dist/env/log-trace/trace-filters.d.ts +6 -1
- package/dist/env/mcp/index.js +7 -7
- package/dist/env/memory/index.js +7 -7
- package/dist/env/plugin/index.js +7 -7
- package/dist/env/prompt/index.js +8 -8
- package/dist/env/prompt/prompts-index.d.ts +1 -1
- package/dist/env/session/group-session-link.d.ts +99 -0
- package/dist/env/session/index.js +11 -10
- package/dist/env/session/session-component.d.ts +89 -0
- package/dist/env/session/storage/index.js +5 -4
- package/dist/env/session/types.d.ts +10 -0
- package/dist/env/skill/index.js +7 -7
- package/dist/env/task/delegate/delegate-channel-hint.d.ts +39 -0
- package/dist/env/task/delegate/delegate-tool.d.ts +132 -7
- package/dist/env/task/delegate/delegate-tool.js +13 -9
- package/dist/env/task/delegate/index.js +8 -8
- package/dist/env/task/index.js +18 -18
- package/dist/env/task/mcp/index.js +4 -4
- package/dist/env/task/plugins/card-subject.d.ts +117 -0
- package/dist/env/task/plugins/index.d.ts +2 -0
- package/dist/env/task/plugins/index.js +39 -16
- package/dist/env/task/plugins/lark-card-action-handler.d.ts +261 -6
- package/dist/env/task/plugins/lark-card-patch-notifier.d.ts +542 -2
- package/dist/env/task/plugins/lark-card-patch-notifier.js +12 -2
- package/dist/env/task/plugins/lark-card-state-store.d.ts +60 -0
- package/dist/env/task/plugins/lark-cli-task-notify-plugin.d.ts +61 -0
- package/dist/env/task/plugins/sub-session-activity.d.ts +415 -0
- package/dist/env/task/plugins/wecom-card-state-store.d.ts +121 -0
- package/dist/env/task/plugins/wecom-session-card-store.d.ts +134 -0
- package/dist/env/task/plugins/wecom-session-card-store.js +23 -0
- package/dist/env/task/plugins/wecom-task-notify-plugin.d.ts +264 -0
- package/dist/env/task/storage/index.js +3 -3
- package/dist/env/task/tools/index.js +4 -4
- package/dist/env/tool/built-in/index.d.ts +2 -0
- package/dist/env/tool/built-in/index.js +9 -2
- package/dist/env/tool/index.js +14 -9
- package/dist/env/tool/types.d.ts +25 -0
- package/dist/env/tool/validator.d.ts +8 -0
- package/dist/env/workflow/engine/index.js +12 -12
- package/dist/env/workflow/hooks/index.js +7 -7
- package/dist/env/workflow/index.js +24 -23
- package/dist/env/workflow/nodes/index.js +2 -2
- package/dist/env/workflow/plugins/index.js +10 -8
- package/dist/env/workflow/service/index.js +2 -2
- package/dist/env/workflow/storage/index.js +3 -3
- package/dist/env/workflow/tools/index.js +16 -15
- package/dist/env/workflow/utils/index.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +118 -62
- package/dist/shared/@ai-setting/{roy-agent-core-dc9zq75z.js → roy-agent-core-0crmsc12.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-aa2j7bk9.js → roy-agent-core-0sbmdz8d.js} +171 -36
- package/dist/shared/@ai-setting/{roy-agent-core-87942bw4.js → roy-agent-core-1mhyh4c5.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-v6vr6za7.js → roy-agent-core-1vv4fx15.js} +4 -4
- package/dist/shared/@ai-setting/roy-agent-core-2stt4rp5.js +134 -0
- package/dist/shared/@ai-setting/{roy-agent-core-nwbfepba.js → roy-agent-core-3e040tc5.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-418zc9ha.js +288 -0
- package/dist/shared/@ai-setting/{roy-agent-core-r5wt1h3c.js → roy-agent-core-4fkxy2gv.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-na18zwj0.js → roy-agent-core-4t3yskp8.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-5pr4zp88.js → roy-agent-core-5kzhaap1.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qq96p0tj.js → roy-agent-core-5s2t8z00.js} +22 -1
- package/dist/shared/@ai-setting/{roy-agent-core-6rh8k6ba.js → roy-agent-core-6gj1hc5z.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-ezvpreqz.js → roy-agent-core-6k8mb7zx.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-g8htfwxj.js → roy-agent-core-7f10p7m2.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-7kvpc0w5.js +177 -0
- package/dist/shared/@ai-setting/{roy-agent-core-h21gngxf.js → roy-agent-core-7yh5wps0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-efkjyh69.js → roy-agent-core-9710zwwz.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-6cy43nss.js → roy-agent-core-9c565frx.js} +49 -9
- package/dist/shared/@ai-setting/{roy-agent-core-fghc2m8z.js → roy-agent-core-aa8kv18f.js} +34 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ew6qb5yx.js → roy-agent-core-an35dzbf.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-mww0mnd9.js → roy-agent-core-azyz78ky.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-264qexac.js → roy-agent-core-b7h39vrc.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-dqxec05w.js → roy-agent-core-bjtc9d35.js} +2 -2
- package/dist/shared/@ai-setting/roy-agent-core-c4ec7k0p.js +426 -0
- package/dist/shared/@ai-setting/{roy-agent-core-ddyk1rc0.js → roy-agent-core-cre2y2ct.js} +160 -4
- package/dist/shared/@ai-setting/{roy-agent-core-tr3ep81v.js → roy-agent-core-d6zdbgtc.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-0qyrk5k0.js → roy-agent-core-ds6qzmf8.js} +14 -5
- package/dist/shared/@ai-setting/{roy-agent-core-cgtq6427.js → roy-agent-core-e08bvpaq.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-12n08pg5.js → roy-agent-core-e69qxdyy.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-rhtdspx6.js → roy-agent-core-fan8g0z1.js} +10 -10
- package/dist/shared/@ai-setting/{roy-agent-core-xcp8vwax.js → roy-agent-core-fepm835e.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-6j02sbee.js → roy-agent-core-fhg03v43.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-99nwgj84.js → roy-agent-core-fzw9xzm1.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-dvtg4sn0.js → roy-agent-core-g8yr733d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-3gpygqcx.js → roy-agent-core-gr5h1dyr.js} +2753 -358
- package/dist/shared/@ai-setting/roy-agent-core-h1e1fm9b.js +380 -0
- package/dist/shared/@ai-setting/{roy-agent-core-c2gbt68e.js → roy-agent-core-h83zdsrq.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-8ez6mccb.js → roy-agent-core-k3gcvybs.js} +5 -1
- package/dist/shared/@ai-setting/{roy-agent-core-pgvcf91v.js → roy-agent-core-m39v7qpx.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-tm1mxttk.js → roy-agent-core-mf5p38yf.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-83bewqx8.js → roy-agent-core-mvh0td7p.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-v85n42ve.js → roy-agent-core-mx855td4.js} +17 -38
- package/dist/shared/@ai-setting/{roy-agent-core-v87njmq7.js → roy-agent-core-n197medr.js} +13 -13
- package/dist/shared/@ai-setting/{roy-agent-core-cmprygrp.js → roy-agent-core-nqkfkpf4.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-7cbpmk4q.js → roy-agent-core-p31ftgq9.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vffccgf6.js → roy-agent-core-qwd2dq5q.js} +10 -3
- package/dist/shared/@ai-setting/{roy-agent-core-rsn44n9y.js → roy-agent-core-ra66sf50.js} +2526 -942
- package/dist/shared/@ai-setting/{roy-agent-core-1v4g0d4x.js → roy-agent-core-rm7seqwb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-w0qjeq2v.js → roy-agent-core-shb1qsyg.js} +1041 -18
- package/dist/shared/@ai-setting/{roy-agent-core-ax9e9szb.js → roy-agent-core-smf94h73.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-acj8ag08.js → roy-agent-core-tjnabyvq.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qqaak24r.js → roy-agent-core-tkpp1ba0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9vhq7fvv.js → roy-agent-core-tpm1dd1g.js} +34 -88
- package/dist/shared/@ai-setting/{roy-agent-core-ed233k5z.js → roy-agent-core-v1n0106v.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zxz5fkwj.js → roy-agent-core-v6yshv0z.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-mcy5apay.js → roy-agent-core-vf9sp6s3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-q813vafd.js → roy-agent-core-vpcxv1ty.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bxkjk7zx.js → roy-agent-core-vx8zc847.js} +4 -1
- package/dist/shared/@ai-setting/{roy-agent-core-xvt7kf7p.js → roy-agent-core-w9ryeg2p.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-es203w7p.js → roy-agent-core-wqs6yypq.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-hd3n57zs.js → roy-agent-core-wr1qexzq.js} +5 -5
- package/dist/shared/@ai-setting/roy-agent-core-wxrkcb17.js +56 -0
- package/dist/shared/@ai-setting/{roy-agent-core-0snm5hc5.js → roy-agent-core-y6shd91r.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9vxh6f8h.js → roy-agent-core-y7fqtzk2.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-cpcd24n2.js → roy-agent-core-yet36q5k.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-3fh1f7s7.js → roy-agent-core-yfpnkc4z.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-0v27y99n.js → roy-agent-core-yh68z1bg.js} +65 -4
- package/package.json +18 -1
- /package/dist/shared/@ai-setting/{roy-agent-core-b4x6x4k2.js → roy-agent-core-m1fgtnrc.js} +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Task #5193 — EventSource 插件加载共享模块
|
|
3
|
+
*
|
|
4
|
+
* ## 为什么抽出来
|
|
5
|
+
*
|
|
6
|
+
* 插件机制(BUILT_IN_PLUGIN_FACTORIES / getPluginHookPoints /
|
|
7
|
+
* registerPluginHooks)原来**只存在于 LarkCliInstance**(私有方法)。
|
|
8
|
+
* WecomCliInstance 要加载 WecomTaskNotifyPlugin 就得复用同一套逻辑,
|
|
9
|
+
* 但两者是独立的 class —— 直接复制会 drift(Task #4946「声明 ≠ 实现」
|
|
10
|
+
* 的教训:handleRule.plugins 配在 wecom 源上是 dead config)。
|
|
11
|
+
*
|
|
12
|
+
* 本模块把「按名字实例化 + 注册 hook 点」抽成**纯函数**,
|
|
13
|
+
* LarkCliInstance 与 WecomCliInstance 都可以调(lark 侧后续可迁移,
|
|
14
|
+
* 本次不动 lark 行为)。
|
|
15
|
+
*
|
|
16
|
+
* ## Hook 注册语义(与 LarkCliInstance.registerPluginHooks 一致)
|
|
17
|
+
*
|
|
18
|
+
* - Hook 模式(有 execute 无 hookPoint)→ 按 getPluginHookPoints
|
|
19
|
+
* 白名单(5 个 task hook 点)逐点注册
|
|
20
|
+
* - 显式 hookPoint → 单点注册
|
|
21
|
+
* - BasePlugin 模式(有 init)→ 调 init(registerHook 回调注册)
|
|
22
|
+
* - pluginEnabled 检查 key = `${sourceId}:${pluginName}`
|
|
23
|
+
*/
|
|
24
|
+
/** 插件工厂配置(工厂收到的最小面) */
|
|
25
|
+
export interface PluginFactoryConfig {
|
|
26
|
+
sourceId: string;
|
|
27
|
+
pluginName: string;
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 内置插件工厂注册表。
|
|
32
|
+
*
|
|
33
|
+
* ⚠️ 与 event-source-handlers.ts 的 BUILT_IN_PLUGIN_FACTORIES **同源**:
|
|
34
|
+
* 该表在 handlers 里定义(静态 import 让 bundler 内联),本模块
|
|
35
|
+
* 通过注入函数引用避免循环依赖 —— 调用方(handlers / wecom handler)
|
|
36
|
+
* 传入自己的工厂表。
|
|
37
|
+
*/
|
|
38
|
+
export type PluginFactory = (cfg: PluginFactoryConfig) => any;
|
|
39
|
+
/**
|
|
40
|
+
* 内置插件工厂注册表(单一真相源,Task #5193 迁入)。
|
|
41
|
+
*
|
|
42
|
+
* ⚠️ 原 BUILT_IN_PLUGIN_FACTORIES 在 event-source-handlers.ts,
|
|
43
|
+
* 迁到本模块让 wecom-cli-handler 也能复用(避免循环依赖)。
|
|
44
|
+
* handlers 侧改为引用本表,行为零变化。
|
|
45
|
+
*/
|
|
46
|
+
export declare const BUILT_IN_PLUGIN_FACTORIES: Record<string, PluginFactory>;
|
|
47
|
+
/** wecom 侧工厂表(当前与全局同源;将来可裁剪 lark 专属插件) */
|
|
48
|
+
export declare function getWecomPluginFactories(): Record<string, PluginFactory>;
|
|
49
|
+
/**
|
|
50
|
+
* 获取插件的 hook 点列表(与 LarkCliInstance.getPluginHookPoints 同语义)
|
|
51
|
+
*/
|
|
52
|
+
export declare function getPluginHookPointsShared(plugin: any): string[];
|
|
53
|
+
/**
|
|
54
|
+
* 把插件实例的 hooks 注册到 globalHookManager。
|
|
55
|
+
*
|
|
56
|
+
* @returns 注册的 hook 点列表(诊断用)
|
|
57
|
+
*/
|
|
58
|
+
export declare function registerPluginHooksShared(plugin: any, pluginName: string, sourceId: string): string[];
|
|
59
|
+
/**
|
|
60
|
+
* 按名字实例化内置插件(工厂表由调用方注入)。
|
|
61
|
+
*
|
|
62
|
+
* @returns 插件实例;未知名字 / 实例化失败 → null
|
|
63
|
+
*/
|
|
64
|
+
export declare function importPluginShared(name: string, factories: Record<string, PluginFactory>, pluginConfig?: Record<string, unknown>): any | null;
|
|
65
|
+
/**
|
|
66
|
+
* 注销插件注册的所有 hooks(stop 时调用)
|
|
67
|
+
*/
|
|
68
|
+
export declare function unregisterPluginHooksShared(pluginName: string, hookPoints: string[]): void;
|
|
@@ -64,6 +64,21 @@ export declare class EventSourceComponent extends BaseComponent implements Event
|
|
|
64
64
|
private buffers;
|
|
65
65
|
private configPath;
|
|
66
66
|
private persistenceEnabled;
|
|
67
|
+
constructor();
|
|
68
|
+
/**
|
|
69
|
+
* 测试环境守卫(Task #5181,2026-11-07/11-08 事故防再发)
|
|
70
|
+
*
|
|
71
|
+
* 事故:测试中实例化 EventSourceComponent 并触发 saveConfig(),
|
|
72
|
+
* 覆盖了生产 ~/.roy-agent/event-sources.json(10 个真实事件源配置差点丢失)。
|
|
73
|
+
*
|
|
74
|
+
* 规则:
|
|
75
|
+
* - 测试环境(NODE_ENV=test 或存在 BUN_TEST_WORKER_ID)⇒ persistence=false
|
|
76
|
+
* (只内存不落盘,绝不触碰真实 $HOME/.roy-agent/)
|
|
77
|
+
* - 显式 opt-out:ROY_AGENT_ES_PERSISTENCE=1 可在测试中强制开启持久化
|
|
78
|
+
* (用于守卫自身可测 / 隔离 HOME 的持久化测试)
|
|
79
|
+
*/
|
|
80
|
+
static isTestEnvironment(): boolean;
|
|
81
|
+
private applyTestEnvironmentGuard;
|
|
67
82
|
/** ConfigComponent 用于配置管理 */
|
|
68
83
|
private configComponent?;
|
|
69
84
|
/** 配置热更新 watcher 清理函数 */
|
|
@@ -9,6 +9,20 @@ import type { EventSourceConfig, EventSourceHandler, EventSourceInstance, EventS
|
|
|
9
9
|
import { timerHandler } from "./timer-handler";
|
|
10
10
|
import { bountyIMHandler } from "./bounty-im-handler";
|
|
11
11
|
import { bountyCliHandler } from "./bounty-cli-handler";
|
|
12
|
+
/**
|
|
13
|
+
* ★ Task #5473:从原始 event 提取 agent 回复必需的精简字段。
|
|
14
|
+
*
|
|
15
|
+
* 保留:chat_id / message_id / sender_id / chat_type / content / mentions
|
|
16
|
+
* 删除:createTime / updateTime / type / event_id / timestamp / id /
|
|
17
|
+
* message_type / sender_type(及其他所有冗余栏位)
|
|
18
|
+
*
|
|
19
|
+
* 支持两种格式:
|
|
20
|
+
* - 简化格式(lark-cli consume):顶层 chat_id / message_id / sender_id
|
|
21
|
+
* - 嵌套格式(webhook):event.message.* / event.sender.sender_id.*
|
|
22
|
+
*
|
|
23
|
+
* 纯函数:不修改 rawEvent 本身(payload.rawEvent 仍持有完整原始 event)。
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildSlimRawData(rawEvent: unknown): Record<string, unknown>;
|
|
12
26
|
/**
|
|
13
27
|
* 构建 Lark `im.message.receive_v1` 事件推荐动作 prompt (Task #2185 / #4137 / #4242)
|
|
14
28
|
*
|
|
@@ -55,7 +69,52 @@ export declare function buildLarkRecommendedAction(opts: {
|
|
|
55
69
|
appId?: string;
|
|
56
70
|
chatId?: string;
|
|
57
71
|
messageId?: string;
|
|
72
|
+
senderId?: string;
|
|
58
73
|
}): RecommendedAction;
|
|
74
|
+
/**
|
|
75
|
+
* 渠道静态规则章节标题(system prompt 与 lean 卡片互相指认的锚点)
|
|
76
|
+
*/
|
|
77
|
+
export declare const LARK_CHANNEL_PROMPT_SECTION_TITLE = "\u2B50 \u98DE\u4E66\u56DE\u590D\u89C4\u8303\uFF08system prompt \u6CE8\u5165\u7248\uFF09";
|
|
78
|
+
/**
|
|
79
|
+
* ★ Task #5212(DS review MINOR-3):飞书 prompt 长度**防御性上限**(单一来源)。
|
|
80
|
+
*
|
|
81
|
+
* 两个出口共用同一预算:
|
|
82
|
+
* - lean 渠道 system prompt(buildLarkChannelSystemPrompt)
|
|
83
|
+
* - legacy recommendedAction.action(buildLarkRecommendedAction)
|
|
84
|
+
*
|
|
85
|
+
* ⚠️ 这是**防御性上限**,不是编辑预算:正常小幅扩写仍有余量,
|
|
86
|
+
* 但「各加一节」式回归会立刻超。改动相关章节前先量长度,
|
|
87
|
+
* 改完必须跑 lark-channel-system-prompt.test.ts (G) 组守护测试。
|
|
88
|
+
* (历史:旧 action 模板 ~4486 → profile=tongzhuli 时 4745 → #5164 追加
|
|
89
|
+
* 文档交付规范段后 4991 → #5212 追加引用上下文段后 5287 →
|
|
90
|
+
* #5472 关键 1 追加群聊 @ sender 可跑示例后 5808,预算 5300→5900。)
|
|
91
|
+
*/
|
|
92
|
+
export declare const LARK_PROMPT_LENGTH_BUDGET = 5900;
|
|
93
|
+
/**
|
|
94
|
+
* 构建飞书渠道级 system prompt(ES-M1 lean 模式核心)。
|
|
95
|
+
*
|
|
96
|
+
* 内容 = 渠道静态规则(关键 0/1/2/3 + 禁止 + 成功判定,与旧
|
|
97
|
+
* recommendedAction 长模板字节级同源)+ profile 渠道约定(开头 2-3 行)。
|
|
98
|
+
*
|
|
99
|
+
* **禁止读事件**:入参只有 profile(渠道配置);同一渠道多次调用
|
|
100
|
+
* 逐字节一致,这是 LLM prompt cache 前缀稳定的根基。
|
|
101
|
+
*
|
|
102
|
+
* 静态规则中的定位占位(replyTo.messageId / replyTo.chatId)语义不变:
|
|
103
|
+
* system prompt 里写明「具体值取自 recommendedAction.replyTo」。
|
|
104
|
+
*/
|
|
105
|
+
export declare function buildLarkChannelSystemPrompt(opts: {
|
|
106
|
+
profile?: string;
|
|
107
|
+
}): string;
|
|
108
|
+
/**
|
|
109
|
+
* 解析 lark-cli 渠道的 systemPrompt(单点构造,只读 config)。
|
|
110
|
+
*
|
|
111
|
+
* - lean(默认):config.systemPrompt(用户配置,若有)+ 渠道静态 prompt;
|
|
112
|
+
* - legacy(per-source 可回退):返回 config.systemPrompt 原值
|
|
113
|
+
* (未设置则 undefined,与旧版行为一致)。
|
|
114
|
+
*
|
|
115
|
+
* 同一 config 多次调用逐字节一致(测试守护)。
|
|
116
|
+
*/
|
|
117
|
+
export declare function resolveLarkChannelSystemPrompt(config: EventSourceConfig): string | undefined;
|
|
59
118
|
/**
|
|
60
119
|
* 提取事件元信息
|
|
61
120
|
*
|
|
@@ -156,6 +215,30 @@ export declare class LarkCliInstance implements EventSourceInstance {
|
|
|
156
215
|
private recentEventIds;
|
|
157
216
|
private readonly DEDUP_WINDOW_MS;
|
|
158
217
|
private readonly DEDUP_MAX_SIZE;
|
|
218
|
+
/**
|
|
219
|
+
* ★ ES-M1(Task #5144):渠道 system prompt 的**实例级缓存**。
|
|
220
|
+
*
|
|
221
|
+
* resolveLarkChannelSystemPrompt(config) 只读 config(渠道配置),
|
|
222
|
+
* 输出对同一渠道是恒定的 —— 缓存到实例字段后:
|
|
223
|
+
* 1. 每条事件不再重复构造(字符串拼接成本省掉);
|
|
224
|
+
* 2. 更重要的是**杜绝字节漂移**:构造函数禁止读 event/rawEvent,
|
|
225
|
+
* 缓存值天然跨事件逐字节一致 → LLM prompt cache 前缀稳定
|
|
226
|
+
* (方案 §4.1 的"单点构造"规则)。
|
|
227
|
+
* legacy 模式下该字段是 config.systemPrompt(可能 undefined),
|
|
228
|
+
* 同样缓存一次。
|
|
229
|
+
*/
|
|
230
|
+
private cachedChannelSystemPrompt?;
|
|
231
|
+
private channelSystemPromptResolved;
|
|
232
|
+
/**
|
|
233
|
+
* 获取本渠道的 systemPrompt(ES-M1,Task #5144)。
|
|
234
|
+
*
|
|
235
|
+
* lean 模式(默认):config.systemPrompt(用户配置,若有)+ 渠道静态 prompt;
|
|
236
|
+
* legacy 模式:config.systemPrompt 原值(未设置则 undefined)。
|
|
237
|
+
*
|
|
238
|
+
* 结果缓存在实例字段(构造一次),供 handleEvent 注入
|
|
239
|
+
* metadata.systemPrompt → query-executor → AgentComponent 追加。
|
|
240
|
+
*/
|
|
241
|
+
getChannelSystemPrompt(): string | undefined;
|
|
159
242
|
/**
|
|
160
243
|
* Environment 引用(由 EventSourceComponent.startSource 调用 setEnvironment 注入)
|
|
161
244
|
*
|
|
@@ -571,6 +654,7 @@ export { timerHandler };
|
|
|
571
654
|
export { bountyIMHandler };
|
|
572
655
|
export { bountyCliHandler };
|
|
573
656
|
export { cliCommandHandler } from "./cli-command-handler";
|
|
657
|
+
export { wecomCliHandler } from "./wecom-cli-handler";
|
|
574
658
|
/**
|
|
575
659
|
* 根据类型获取内置 Handler
|
|
576
660
|
*/
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
LARK_CHANNEL_PROMPT_SECTION_TITLE,
|
|
3
|
+
LARK_PROMPT_LENGTH_BUDGET,
|
|
2
4
|
LarkCliInstance,
|
|
3
5
|
bountyCliHandler,
|
|
4
6
|
bountyIMHandler,
|
|
7
|
+
buildLarkChannelSystemPrompt,
|
|
5
8
|
buildLarkRecommendedAction,
|
|
9
|
+
buildSlimRawData,
|
|
6
10
|
builtInHandlers,
|
|
7
11
|
extractCommandText,
|
|
8
12
|
extractMetadata,
|
|
@@ -10,45 +14,54 @@ import {
|
|
|
10
14
|
larkCliHandler,
|
|
11
15
|
patchCardByLarkCli,
|
|
12
16
|
renderRuleNoticeSection,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
resolveLarkChannelSystemPrompt,
|
|
18
|
+
timerHandler,
|
|
19
|
+
wecomCliHandler
|
|
20
|
+
} from "../../shared/@ai-setting/roy-agent-core-gr5h1dyr.js";
|
|
21
|
+
import"../../shared/@ai-setting/roy-agent-core-vx8zc847.js";
|
|
16
22
|
import {
|
|
17
23
|
cliCommandHandler
|
|
18
24
|
} from "../../shared/@ai-setting/roy-agent-core-v0hf14bj.js";
|
|
19
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
20
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
21
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
22
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
23
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
25
|
+
import"../../shared/@ai-setting/roy-agent-core-7kvpc0w5.js";
|
|
26
|
+
import"../../shared/@ai-setting/roy-agent-core-mf5p38yf.js";
|
|
27
|
+
import"../../shared/@ai-setting/roy-agent-core-2stt4rp5.js";
|
|
28
|
+
import"../../shared/@ai-setting/roy-agent-core-ra66sf50.js";
|
|
29
|
+
import"../../shared/@ai-setting/roy-agent-core-h1e1fm9b.js";
|
|
30
|
+
import"../../shared/@ai-setting/roy-agent-core-c4ec7k0p.js";
|
|
31
|
+
import"../../shared/@ai-setting/roy-agent-core-4t3yskp8.js";
|
|
32
|
+
import"../../shared/@ai-setting/roy-agent-core-y7fqtzk2.js";
|
|
24
33
|
import"../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
25
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
34
|
+
import"../../shared/@ai-setting/roy-agent-core-d6zdbgtc.js";
|
|
26
35
|
import"../../shared/@ai-setting/roy-agent-core-m46fe3x4.js";
|
|
27
36
|
import"../../shared/@ai-setting/roy-agent-core-4rtg69cn.js";
|
|
28
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
29
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
30
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
31
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
32
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
33
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
37
|
+
import"../../shared/@ai-setting/roy-agent-core-wr1qexzq.js";
|
|
38
|
+
import"../../shared/@ai-setting/roy-agent-core-shb1qsyg.js";
|
|
39
|
+
import"../../shared/@ai-setting/roy-agent-core-418zc9ha.js";
|
|
40
|
+
import"../../shared/@ai-setting/roy-agent-core-6k8mb7zx.js";
|
|
41
|
+
import"../../shared/@ai-setting/roy-agent-core-9c565frx.js";
|
|
42
|
+
import"../../shared/@ai-setting/roy-agent-core-h83zdsrq.js";
|
|
43
|
+
import"../../shared/@ai-setting/roy-agent-core-rm7seqwb.js";
|
|
44
|
+
import"../../shared/@ai-setting/roy-agent-core-e08bvpaq.js";
|
|
34
45
|
import"../../shared/@ai-setting/roy-agent-core-er070zjq.js";
|
|
35
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
46
|
+
import"../../shared/@ai-setting/roy-agent-core-7yh5wps0.js";
|
|
36
47
|
import"../../shared/@ai-setting/roy-agent-core-ntn32q7j.js";
|
|
37
48
|
import"../../shared/@ai-setting/roy-agent-core-mkc3zshb.js";
|
|
38
49
|
import"../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
39
50
|
import"../../shared/@ai-setting/roy-agent-core-m880qz3y.js";
|
|
40
51
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
41
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
42
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
43
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
44
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
45
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
46
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
52
|
+
import"../../shared/@ai-setting/roy-agent-core-m39v7qpx.js";
|
|
53
|
+
import"../../shared/@ai-setting/roy-agent-core-smf94h73.js";
|
|
54
|
+
import"../../shared/@ai-setting/roy-agent-core-yet36q5k.js";
|
|
55
|
+
import"../../shared/@ai-setting/roy-agent-core-tkpp1ba0.js";
|
|
56
|
+
import"../../shared/@ai-setting/roy-agent-core-p31ftgq9.js";
|
|
57
|
+
import"../../shared/@ai-setting/roy-agent-core-5s2t8z00.js";
|
|
47
58
|
import"../../shared/@ai-setting/roy-agent-core-7f7t9wwp.js";
|
|
48
59
|
import"../../shared/@ai-setting/roy-agent-core-85xyctnb.js";
|
|
49
60
|
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
50
61
|
export {
|
|
62
|
+
wecomCliHandler,
|
|
51
63
|
timerHandler,
|
|
64
|
+
resolveLarkChannelSystemPrompt,
|
|
52
65
|
renderRuleNoticeSection,
|
|
53
66
|
patchCardByLarkCli,
|
|
54
67
|
larkCliHandler,
|
|
@@ -57,8 +70,12 @@ export {
|
|
|
57
70
|
extractCommandText,
|
|
58
71
|
cliCommandHandler,
|
|
59
72
|
builtInHandlers,
|
|
73
|
+
buildSlimRawData,
|
|
60
74
|
buildLarkRecommendedAction,
|
|
75
|
+
buildLarkChannelSystemPrompt,
|
|
61
76
|
bountyIMHandler,
|
|
62
77
|
bountyCliHandler,
|
|
63
|
-
LarkCliInstance
|
|
78
|
+
LarkCliInstance,
|
|
79
|
+
LARK_PROMPT_LENGTH_BUDGET,
|
|
80
|
+
LARK_CHANNEL_PROMPT_SECTION_TITLE
|
|
64
81
|
};
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
getSharedEventStore,
|
|
5
5
|
resetSharedEventStore,
|
|
6
6
|
setSharedEventStore
|
|
7
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
8
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
7
|
+
} from "../../shared/@ai-setting/roy-agent-core-4t3yskp8.js";
|
|
8
|
+
import"../../shared/@ai-setting/roy-agent-core-5s2t8z00.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-7f7t9wwp.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-85xyctnb.js";
|
|
11
11
|
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -9,6 +9,7 @@ export { BUILT_IN_EVENT_SOURCE_TYPES, BUILT_IN_EVENT_SOURCE_TYPE_LIST } from "./
|
|
|
9
9
|
export { isBuiltInEventSourceType, isValidEventSourceType, getDefaultConfigForType, validateEventSourceConfig, } from "./types";
|
|
10
10
|
export { EventSourceComponent } from "./event-source-component";
|
|
11
11
|
export { COMMAND_PREFIX, isCommandMessage, extractCommandInvocation, CommandRegistry, getGlobalCommandRegistry, handleCommandMessage, } from "./command-registry";
|
|
12
|
+
export { esCommand, resolveEsFilePath } from "./es-command";
|
|
12
13
|
export type { CommandInvocation, CommandContext, CommandOutput, CommandTextOutput, CommandCardOutput, CommandResult, CommandDefinition, } from "./command-registry";
|
|
13
14
|
export { renderTextCard, renderFallbackModelCard, isFallbackModelCard, FALLBACK_MODEL_ACTIONS, FALLBACK_MODEL_ACTION_NS, } from "./command-cards";
|
|
14
15
|
export type { LarkCard } from "./command-types";
|
|
@@ -17,7 +18,10 @@ export type { CommandCardActionEvent, CommandCardActionPorts, CommandCardActionR
|
|
|
17
18
|
export { fallbackModelCommand, listCommand, readFallbackModelList, readRawFallbackModelArray, writeFallbackModelList, DEFAULT_CONFIG_PATH, } from "./fallback-model-command";
|
|
18
19
|
export { EventStoreImpl, setSharedEventStore, getSharedEventStore, resetSharedEventStore, } from "./event-store";
|
|
19
20
|
export type { EventStore, TriggerEventInput, TriggerEventMetadata, PersistedEvent, EventStoreOptions, } from "./event-store";
|
|
20
|
-
export { larkCliHandler, timerHandler, bountyIMHandler, cliCommandHandler, builtInHandlers, getBuiltInHandler, extractMetadata, } from "./event-source-handlers";
|
|
21
|
+
export { larkCliHandler, timerHandler, bountyIMHandler, cliCommandHandler, wecomCliHandler, builtInHandlers, getBuiltInHandler, extractMetadata, buildLarkRecommendedAction, buildLarkChannelSystemPrompt, resolveLarkChannelSystemPrompt, LARK_CHANNEL_PROMPT_SECTION_TITLE, LARK_PROMPT_LENGTH_BUDGET, } from "./event-source-handlers";
|
|
22
|
+
export { WECOM_CLI_ES_TYPE, WECOM_CHAT_ID_PREFIX, WECOM_WS_DEFAULT_URL, wecomCliHandler as wecomCliHandlerDirect, buildWecomReplyChannel, buildWecomNotifyPrompt, buildWecomChannelSystemPrompt, WECOM_CHANNEL_PROMPT_SECTION_TITLE, parseWecomFrame, readWecomCredentialsFile, resolveWecomCredentials, WECOM_CREDENTIALS_DEFAULT_PATH, resolveWecomBinary, probeCommandBinary, readWecomCliConfig, } from "./wecom-cli-handler";
|
|
23
|
+
export type { WecomReplyChannelInput, WecomNotifyPromptInput, WecomChannelSystemPromptInput, WecomCredentials, ParsedWecomFrame, } from "./wecom-cli-handler";
|
|
24
|
+
export { sanitizeWecomFrame } from "./wecom-ws-bridge";
|
|
21
25
|
export { CLI_COMMAND_ES_TYPE, CLI_SESSION_CHAT_ID_PREFIX, buildCliReplyChannel, parseCliSessionChatId, } from "./cli-command-handler";
|
|
22
26
|
export type { CliReplyChannel, CliNoticeSink } from "./cli-command-handler";
|
|
23
27
|
export { TimerInstance } from "./timer-handler";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
1
|
+
import"../../shared/@ai-setting/roy-agent-core-m1fgtnrc.js";
|
|
2
2
|
import {
|
|
3
3
|
EventSourceComponent
|
|
4
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "../../shared/@ai-setting/roy-agent-core-yh68z1bg.js";
|
|
5
5
|
import {
|
|
6
6
|
BountyIMInstance,
|
|
7
7
|
COMMAND_PREFIX,
|
|
@@ -9,10 +9,23 @@ import {
|
|
|
9
9
|
DEFAULT_CONFIG_PATH,
|
|
10
10
|
FALLBACK_MODEL_ACTIONS,
|
|
11
11
|
FALLBACK_MODEL_ACTION_NS,
|
|
12
|
+
LARK_CHANNEL_PROMPT_SECTION_TITLE,
|
|
13
|
+
LARK_PROMPT_LENGTH_BUDGET,
|
|
12
14
|
TimerInstance,
|
|
15
|
+
WECOM_CHANNEL_PROMPT_SECTION_TITLE,
|
|
16
|
+
WECOM_CHAT_ID_PREFIX,
|
|
17
|
+
WECOM_CLI_ES_TYPE,
|
|
18
|
+
WECOM_CREDENTIALS_DEFAULT_PATH,
|
|
19
|
+
WECOM_WS_DEFAULT_URL,
|
|
13
20
|
bountyIMHandler,
|
|
14
21
|
buildDefaultBountyIMSystemPrompt,
|
|
22
|
+
buildLarkChannelSystemPrompt,
|
|
23
|
+
buildLarkRecommendedAction,
|
|
24
|
+
buildWecomChannelSystemPrompt,
|
|
25
|
+
buildWecomNotifyPrompt,
|
|
26
|
+
buildWecomReplyChannel,
|
|
15
27
|
builtInHandlers,
|
|
28
|
+
esCommand,
|
|
16
29
|
extractCommandInvocation,
|
|
17
30
|
extractMetadata,
|
|
18
31
|
fallbackModelCommand,
|
|
@@ -25,15 +38,25 @@ import {
|
|
|
25
38
|
isFallbackModelCard,
|
|
26
39
|
larkCliHandler,
|
|
27
40
|
listCommand,
|
|
41
|
+
parseWecomFrame,
|
|
42
|
+
probeCommandBinary,
|
|
28
43
|
readFallbackModelList,
|
|
29
44
|
readRawFallbackModelArray,
|
|
45
|
+
readWecomCliConfig,
|
|
46
|
+
readWecomCredentialsFile,
|
|
30
47
|
renderFallbackModelCard,
|
|
31
48
|
renderTextCard,
|
|
32
49
|
resolveBountyIMSystemPrompt,
|
|
50
|
+
resolveEsFilePath,
|
|
51
|
+
resolveLarkChannelSystemPrompt,
|
|
52
|
+
resolveWecomBinary,
|
|
53
|
+
resolveWecomCredentials,
|
|
54
|
+
sanitizeWecomFrame,
|
|
33
55
|
timerHandler,
|
|
34
56
|
translateCardActionToCommand,
|
|
57
|
+
wecomCliHandler,
|
|
35
58
|
writeFallbackModelList
|
|
36
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
59
|
+
} from "../../shared/@ai-setting/roy-agent-core-gr5h1dyr.js";
|
|
37
60
|
import {
|
|
38
61
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
39
62
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -42,7 +65,7 @@ import {
|
|
|
42
65
|
isBuiltInEventSourceType,
|
|
43
66
|
isValidEventSourceType,
|
|
44
67
|
validateEventSourceConfig
|
|
45
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
68
|
+
} from "../../shared/@ai-setting/roy-agent-core-vx8zc847.js";
|
|
46
69
|
import {
|
|
47
70
|
CLI_COMMAND_ES_TYPE,
|
|
48
71
|
CLI_SESSION_CHAT_ID_PREFIX,
|
|
@@ -50,54 +73,70 @@ import {
|
|
|
50
73
|
cliCommandHandler,
|
|
51
74
|
parseCliSessionChatId
|
|
52
75
|
} from "../../shared/@ai-setting/roy-agent-core-v0hf14bj.js";
|
|
53
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
54
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
76
|
+
import"../../shared/@ai-setting/roy-agent-core-7kvpc0w5.js";
|
|
77
|
+
import"../../shared/@ai-setting/roy-agent-core-mf5p38yf.js";
|
|
78
|
+
import"../../shared/@ai-setting/roy-agent-core-2stt4rp5.js";
|
|
79
|
+
import"../../shared/@ai-setting/roy-agent-core-ra66sf50.js";
|
|
80
|
+
import"../../shared/@ai-setting/roy-agent-core-h1e1fm9b.js";
|
|
81
|
+
import"../../shared/@ai-setting/roy-agent-core-c4ec7k0p.js";
|
|
55
82
|
import {
|
|
56
83
|
EventStoreImpl,
|
|
57
84
|
getSharedEventStore,
|
|
58
85
|
resetSharedEventStore,
|
|
59
86
|
setSharedEventStore
|
|
60
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
61
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
62
|
-
import"../../shared/@ai-setting/roy-agent-core-ezvpreqz.js";
|
|
87
|
+
} from "../../shared/@ai-setting/roy-agent-core-4t3yskp8.js";
|
|
88
|
+
import"../../shared/@ai-setting/roy-agent-core-y7fqtzk2.js";
|
|
63
89
|
import"../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
64
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
90
|
+
import"../../shared/@ai-setting/roy-agent-core-d6zdbgtc.js";
|
|
65
91
|
import"../../shared/@ai-setting/roy-agent-core-m46fe3x4.js";
|
|
66
92
|
import"../../shared/@ai-setting/roy-agent-core-4rtg69cn.js";
|
|
67
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
68
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
69
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
70
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
71
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
72
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
93
|
+
import"../../shared/@ai-setting/roy-agent-core-wr1qexzq.js";
|
|
94
|
+
import"../../shared/@ai-setting/roy-agent-core-shb1qsyg.js";
|
|
95
|
+
import"../../shared/@ai-setting/roy-agent-core-418zc9ha.js";
|
|
96
|
+
import"../../shared/@ai-setting/roy-agent-core-6k8mb7zx.js";
|
|
97
|
+
import"../../shared/@ai-setting/roy-agent-core-9c565frx.js";
|
|
98
|
+
import"../../shared/@ai-setting/roy-agent-core-h83zdsrq.js";
|
|
99
|
+
import"../../shared/@ai-setting/roy-agent-core-rm7seqwb.js";
|
|
100
|
+
import"../../shared/@ai-setting/roy-agent-core-e08bvpaq.js";
|
|
73
101
|
import"../../shared/@ai-setting/roy-agent-core-er070zjq.js";
|
|
74
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
102
|
+
import"../../shared/@ai-setting/roy-agent-core-7yh5wps0.js";
|
|
75
103
|
import"../../shared/@ai-setting/roy-agent-core-ntn32q7j.js";
|
|
76
104
|
import"../../shared/@ai-setting/roy-agent-core-mkc3zshb.js";
|
|
77
105
|
import"../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
78
106
|
import"../../shared/@ai-setting/roy-agent-core-m880qz3y.js";
|
|
79
107
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
80
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
81
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
82
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
83
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
84
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
85
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
108
|
+
import"../../shared/@ai-setting/roy-agent-core-m39v7qpx.js";
|
|
109
|
+
import"../../shared/@ai-setting/roy-agent-core-smf94h73.js";
|
|
110
|
+
import"../../shared/@ai-setting/roy-agent-core-yet36q5k.js";
|
|
111
|
+
import"../../shared/@ai-setting/roy-agent-core-tkpp1ba0.js";
|
|
112
|
+
import"../../shared/@ai-setting/roy-agent-core-p31ftgq9.js";
|
|
113
|
+
import"../../shared/@ai-setting/roy-agent-core-5s2t8z00.js";
|
|
86
114
|
import"../../shared/@ai-setting/roy-agent-core-7f7t9wwp.js";
|
|
87
115
|
import"../../shared/@ai-setting/roy-agent-core-85xyctnb.js";
|
|
88
116
|
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
89
117
|
export {
|
|
90
118
|
writeFallbackModelList,
|
|
119
|
+
wecomCliHandler as wecomCliHandlerDirect,
|
|
120
|
+
wecomCliHandler,
|
|
91
121
|
validateEventSourceConfig,
|
|
92
122
|
translateCardActionToCommand,
|
|
93
123
|
timerHandler,
|
|
94
124
|
setSharedEventStore,
|
|
125
|
+
sanitizeWecomFrame,
|
|
126
|
+
resolveWecomCredentials,
|
|
127
|
+
resolveWecomBinary,
|
|
128
|
+
resolveLarkChannelSystemPrompt,
|
|
129
|
+
resolveEsFilePath,
|
|
95
130
|
resolveBountyIMSystemPrompt,
|
|
96
131
|
resetSharedEventStore,
|
|
97
132
|
renderTextCard,
|
|
98
133
|
renderFallbackModelCard,
|
|
134
|
+
readWecomCredentialsFile,
|
|
135
|
+
readWecomCliConfig,
|
|
99
136
|
readRawFallbackModelArray,
|
|
100
137
|
readFallbackModelList,
|
|
138
|
+
probeCommandBinary,
|
|
139
|
+
parseWecomFrame,
|
|
101
140
|
parseCliSessionChatId,
|
|
102
141
|
listCommand,
|
|
103
142
|
larkCliHandler,
|
|
@@ -115,12 +154,25 @@ export {
|
|
|
115
154
|
fallbackModelCommand,
|
|
116
155
|
extractMetadata,
|
|
117
156
|
extractCommandInvocation,
|
|
157
|
+
esCommand,
|
|
118
158
|
cliCommandHandler,
|
|
119
159
|
builtInHandlers,
|
|
160
|
+
buildWecomReplyChannel,
|
|
161
|
+
buildWecomNotifyPrompt,
|
|
162
|
+
buildWecomChannelSystemPrompt,
|
|
163
|
+
buildLarkRecommendedAction,
|
|
164
|
+
buildLarkChannelSystemPrompt,
|
|
120
165
|
buildDefaultBountyIMSystemPrompt,
|
|
121
166
|
buildCliReplyChannel,
|
|
122
167
|
bountyIMHandler,
|
|
168
|
+
WECOM_WS_DEFAULT_URL,
|
|
169
|
+
WECOM_CREDENTIALS_DEFAULT_PATH,
|
|
170
|
+
WECOM_CLI_ES_TYPE,
|
|
171
|
+
WECOM_CHAT_ID_PREFIX,
|
|
172
|
+
WECOM_CHANNEL_PROMPT_SECTION_TITLE,
|
|
123
173
|
TimerInstance,
|
|
174
|
+
LARK_PROMPT_LENGTH_BUDGET,
|
|
175
|
+
LARK_CHANNEL_PROMPT_SECTION_TITLE,
|
|
124
176
|
FALLBACK_MODEL_ACTION_NS,
|
|
125
177
|
FALLBACK_MODEL_ACTIONS,
|
|
126
178
|
EventStoreImpl,
|