@ai-setting/roy-agent-core 1.7.66 → 1.7.68
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 +29 -0
- package/dist/env/agent/agent-component.js +1 -1
- package/dist/env/agent/index.js +1 -1
- package/dist/env/agent/types.d.ts +16 -0
- package/dist/env/environment.d.ts +13 -0
- package/dist/env/event-source/event-source-handlers.js +6 -5
- package/dist/env/event-source/index.js +7 -6
- package/dist/env/event-source/timer-handler.d.ts +93 -1
- package/dist/env/index.js +12 -11
- package/dist/env/prompt/index.js +3 -2
- package/dist/env/prompt/prompts-index.d.ts +2 -7
- package/dist/env/task/delegate/delegate-tool.d.ts +21 -1
- package/dist/env/task/delegate/delegate-tool.js +3 -2
- package/dist/env/task/delegate/index.js +3 -2
- package/dist/env/task/index.js +5 -4
- package/dist/env/task/mcp/index.js +2 -1
- 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/lark-card-patch-notifier.d.ts +77 -0
- package/dist/env/task/plugins/lark-card-patch-notifier.js +7 -1
- 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/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/workflow/plugins/index.js +2 -2
- package/dist/index.js +13 -12
- package/dist/shared/@ai-setting/{roy-agent-core-8nksrtnf.js → roy-agent-core-19na22cc.js} +203 -18
- package/dist/shared/@ai-setting/{roy-agent-core-nr2m4xw1.js → roy-agent-core-1k83dq3a.js} +13 -3
- package/dist/shared/@ai-setting/roy-agent-core-43r4bxey.js +1083 -0
- package/dist/shared/@ai-setting/roy-agent-core-6m4bw8jy.js +6 -0
- package/dist/shared/@ai-setting/{roy-agent-core-0ys85x46.js → roy-agent-core-8bjj3d1b.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-2wxbx36p.js → roy-agent-core-dnjm17sa.js} +21 -2
- 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-j1kksatb.js → roy-agent-core-hfr6bzts.js} +67 -10
- package/dist/shared/@ai-setting/{roy-agent-core-v8bz7d8x.js → roy-agent-core-keyb45z3.js} +26 -11
- package/dist/shared/@ai-setting/{roy-agent-core-vs5gxgwh.js → roy-agent-core-ma35jyd9.js} +14 -3
- package/dist/shared/@ai-setting/{roy-agent-core-zk2jg0v7.js → roy-agent-core-tadj19vp.js} +106 -22
- package/dist/shared/@ai-setting/{roy-agent-core-cvm1xgmg.js → roy-agent-core-wksgtqf9.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-4882qsjx.js → roy-agent-core-x0ddc2cr.js} +1 -1
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-8mjnb7xc.js +0 -654
|
@@ -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
|
*
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
filterToolsByAgent,
|
|
8
8
|
parseToolList,
|
|
9
9
|
toLLMMessage
|
|
10
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
} from "../../shared/@ai-setting/roy-agent-core-hfr6bzts.js";
|
|
11
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";
|
package/dist/env/agent/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
AgentComponent,
|
|
6
6
|
AgentComponentConfigSchema
|
|
7
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
7
|
+
} from "../../shared/@ai-setting/roy-agent-core-hfr6bzts.js";
|
|
8
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";
|
|
@@ -243,6 +243,8 @@ export interface HookContext {
|
|
|
243
243
|
systemPrompt: string;
|
|
244
244
|
additionInfo: string;
|
|
245
245
|
snapshotAt: number;
|
|
246
|
+
/** 【Task #4813】B1 mtime 失效检测:首拍时各 memory 文件的 mtime(ms) */
|
|
247
|
+
memoryStat?: MemorySnapshotStat;
|
|
246
248
|
};
|
|
247
249
|
/** 执行上下文(可直接修改属性) */
|
|
248
250
|
context: AgentContext;
|
|
@@ -311,6 +313,20 @@ export interface Plugin {
|
|
|
311
313
|
* Agent 类型
|
|
312
314
|
*/
|
|
313
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
|
+
}
|
|
314
330
|
/**
|
|
315
331
|
* Agent 状态
|
|
316
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
|
/**
|
|
@@ -11,21 +11,22 @@ import {
|
|
|
11
11
|
patchCardByLarkCli,
|
|
12
12
|
renderRuleNoticeSection,
|
|
13
13
|
timerHandler
|
|
14
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
14
|
+
} from "../../shared/@ai-setting/roy-agent-core-19na22cc.js";
|
|
15
15
|
import"../../shared/@ai-setting/roy-agent-core-bxkjk7zx.js";
|
|
16
16
|
import"../../shared/@ai-setting/roy-agent-core-add1zqsh.js";
|
|
17
17
|
import {
|
|
18
18
|
cliCommandHandler
|
|
19
19
|
} from "../../shared/@ai-setting/roy-agent-core-v0hf14bj.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-tm1mxttk.js";
|
|
21
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
21
|
+
import"../../shared/@ai-setting/roy-agent-core-keyb45z3.js";
|
|
22
22
|
import"../../shared/@ai-setting/roy-agent-core-na18zwj0.js";
|
|
23
23
|
import"../../shared/@ai-setting/roy-agent-core-abqhkbn3.js";
|
|
24
24
|
import"../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
25
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
25
|
+
import"../../shared/@ai-setting/roy-agent-core-ma35jyd9.js";
|
|
26
26
|
import"../../shared/@ai-setting/roy-agent-core-tr3ep81v.js";
|
|
27
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
28
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
27
|
+
import"../../shared/@ai-setting/roy-agent-core-6m4bw8jy.js";
|
|
28
|
+
import"../../shared/@ai-setting/roy-agent-core-8bjj3d1b.js";
|
|
29
|
+
import"../../shared/@ai-setting/roy-agent-core-tadj19vp.js";
|
|
29
30
|
import"../../shared/@ai-setting/roy-agent-core-c2gbt68e.js";
|
|
30
31
|
import"../../shared/@ai-setting/roy-agent-core-yr1mryb8.js";
|
|
31
32
|
import"../../shared/@ai-setting/roy-agent-core-mds8tqd0.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import"../../shared/@ai-setting/roy-agent-core-b4x6x4k2.js";
|
|
2
2
|
import {
|
|
3
3
|
EventSourceComponent
|
|
4
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "../../shared/@ai-setting/roy-agent-core-x0ddc2cr.js";
|
|
5
5
|
import {
|
|
6
6
|
BountyIMInstance,
|
|
7
7
|
COMMAND_PREFIX,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
timerHandler,
|
|
34
34
|
translateCardActionToCommand,
|
|
35
35
|
writeFallbackModelList
|
|
36
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
36
|
+
} from "../../shared/@ai-setting/roy-agent-core-19na22cc.js";
|
|
37
37
|
import {
|
|
38
38
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
39
39
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
parseCliSessionChatId
|
|
53
53
|
} from "../../shared/@ai-setting/roy-agent-core-v0hf14bj.js";
|
|
54
54
|
import"../../shared/@ai-setting/roy-agent-core-tm1mxttk.js";
|
|
55
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
55
|
+
import"../../shared/@ai-setting/roy-agent-core-keyb45z3.js";
|
|
56
56
|
import {
|
|
57
57
|
EventStoreImpl,
|
|
58
58
|
getSharedEventStore,
|
|
@@ -61,10 +61,11 @@ import {
|
|
|
61
61
|
} from "../../shared/@ai-setting/roy-agent-core-na18zwj0.js";
|
|
62
62
|
import"../../shared/@ai-setting/roy-agent-core-abqhkbn3.js";
|
|
63
63
|
import"../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
64
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
64
|
+
import"../../shared/@ai-setting/roy-agent-core-ma35jyd9.js";
|
|
65
65
|
import"../../shared/@ai-setting/roy-agent-core-tr3ep81v.js";
|
|
66
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
67
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
66
|
+
import"../../shared/@ai-setting/roy-agent-core-6m4bw8jy.js";
|
|
67
|
+
import"../../shared/@ai-setting/roy-agent-core-8bjj3d1b.js";
|
|
68
|
+
import"../../shared/@ai-setting/roy-agent-core-tadj19vp.js";
|
|
68
69
|
import"../../shared/@ai-setting/roy-agent-core-c2gbt68e.js";
|
|
69
70
|
import"../../shared/@ai-setting/roy-agent-core-yr1mryb8.js";
|
|
70
71
|
import"../../shared/@ai-setting/roy-agent-core-mds8tqd0.js";
|
|
@@ -29,6 +29,53 @@ export type GetRunningTasksFn = () => BackgroundTask[];
|
|
|
29
29
|
* 用于注入 BackgroundTaskManager 的 options key
|
|
30
30
|
*/
|
|
31
31
|
export declare const TIMER_OPTIONS_KEY_GET_MANAGER = "getBackgroundTaskManager";
|
|
32
|
+
/** schedule 模式下的低频 tick 间隔(30 秒) */
|
|
33
|
+
export declare const SCHEDULE_TICK_INTERVAL_MS: number;
|
|
34
|
+
/** options key:多时刻配置 */
|
|
35
|
+
export declare const TIMER_OPTIONS_KEY_SCHEDULE = "schedule";
|
|
36
|
+
/** options key:显式指定事件路由到的 session(独立 session) */
|
|
37
|
+
export declare const TIMER_OPTIONS_KEY_SESSION_ID = "sessionId";
|
|
38
|
+
/** options key:schedule 模式下是否在有运行中后台任务时跳过 */
|
|
39
|
+
export declare const TIMER_OPTIONS_KEY_SKIP_WHEN_RUNNING = "skipWhenRunning";
|
|
40
|
+
/**
|
|
41
|
+
* 单条 schedule 项
|
|
42
|
+
*
|
|
43
|
+
* - time: `HH:MM`(24 小时制,本地时区)
|
|
44
|
+
* - prompt: 该时刻触发时注入的 prompt
|
|
45
|
+
* - label: 可选标签(写入 event metadata.scheduleLabel,便于下游识别)
|
|
46
|
+
* - sessionId: 可选,覆盖实例级 session(该时刻走独立 session)
|
|
47
|
+
*/
|
|
48
|
+
export interface TimerScheduleEntry {
|
|
49
|
+
time: string;
|
|
50
|
+
prompt: string;
|
|
51
|
+
label?: string;
|
|
52
|
+
sessionId?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 校验 `HH:MM` 格式
|
|
56
|
+
*
|
|
57
|
+
* @returns 合法返回 true;非法返回 false
|
|
58
|
+
*/
|
|
59
|
+
export declare function isValidScheduleTime(time: unknown): time is string;
|
|
60
|
+
/**
|
|
61
|
+
* 解析 options.schedule 为合法的 schedule 项数组
|
|
62
|
+
*
|
|
63
|
+
* 非法项被静默丢弃(validateConfig 负责报错),返回的数组只含合法项。
|
|
64
|
+
*
|
|
65
|
+
* @param raw 原始值(通常是 config.options.schedule)
|
|
66
|
+
* @returns 合法 schedule 项数组;不是数组时返回空数组
|
|
67
|
+
*/
|
|
68
|
+
export declare function parseSchedule(raw: unknown): TimerScheduleEntry[];
|
|
69
|
+
/**
|
|
70
|
+
* 校验 schedule 配置,返回错误列表(空数组 = 合法)
|
|
71
|
+
*
|
|
72
|
+
* 规则:
|
|
73
|
+
* 1. schedule 必须是数组且非空
|
|
74
|
+
* 2. 每项 time 必须是 `HH:MM`
|
|
75
|
+
* 3. 每项 prompt 必须是非空字符串
|
|
76
|
+
* 4. schedule 与 interval 互斥
|
|
77
|
+
*/
|
|
78
|
+
export declare function validateScheduleConfig(config: EventSourceConfig): string[];
|
|
32
79
|
/**
|
|
33
80
|
* Timer EventSourceInstance 实现
|
|
34
81
|
*
|
|
@@ -41,6 +88,20 @@ export declare class TimerInstance implements EventSourceInstance {
|
|
|
41
88
|
private readonly sessionId;
|
|
42
89
|
private readonly getRunningTasks;
|
|
43
90
|
private readonly customPrompt?;
|
|
91
|
+
/** schedule 模式:合法 schedule 项 */
|
|
92
|
+
private readonly schedule;
|
|
93
|
+
/** 是否处于 schedule 模式(配置了 schedule 键即为 true,即使全项非法) */
|
|
94
|
+
private readonly scheduleMode;
|
|
95
|
+
/** 非法 schedule 的告警是否已打印(只打一次,避免刷屏) */
|
|
96
|
+
private invalidScheduleWarned;
|
|
97
|
+
/** schedule 模式下实例级默认 session(跨重启稳定) */
|
|
98
|
+
private readonly scheduleSessionId;
|
|
99
|
+
/** schedule 模式下是否在有运行中后台任务时跳过 */
|
|
100
|
+
private readonly skipWhenRunning;
|
|
101
|
+
/** 已触发标记:`YYYY-MM-DD#HH:MM` → true(当日去重) */
|
|
102
|
+
private readonly firedKeys;
|
|
103
|
+
/** 可注入时钟(测试用) */
|
|
104
|
+
private readonly now;
|
|
44
105
|
private status;
|
|
45
106
|
private timerId?;
|
|
46
107
|
private eventHandler?;
|
|
@@ -48,8 +109,11 @@ export declare class TimerInstance implements EventSourceInstance {
|
|
|
48
109
|
* @param config 事件源配置
|
|
49
110
|
* @param getRunningTasks 可选的回调,用于获取当前所有后台任务。
|
|
50
111
|
* 测试时可直接传入;生产环境通过 config.options.getBackgroundTaskManager 注入。
|
|
112
|
+
* @param now 可选的时钟注入(返回 epoch ms),测试用。
|
|
51
113
|
*/
|
|
52
|
-
constructor(config: EventSourceConfig, getRunningTasks?: GetRunningTasksFn);
|
|
114
|
+
constructor(config: EventSourceConfig, getRunningTasks?: GetRunningTasksFn, now?: () => number);
|
|
115
|
+
/** 当前是否为 schedule 模式 */
|
|
116
|
+
private get isScheduleMode();
|
|
53
117
|
start(): Promise<void>;
|
|
54
118
|
stop(): Promise<void>;
|
|
55
119
|
getStatus(): EventSourceStatus;
|
|
@@ -61,10 +125,38 @@ export declare class TimerInstance implements EventSourceInstance {
|
|
|
61
125
|
* Rule-based 检查:有 status === "running" 的后台任务时跳过本次触发
|
|
62
126
|
*/
|
|
63
127
|
private tick;
|
|
128
|
+
/**
|
|
129
|
+
* ★ Task #4815:schedule 模式 tick
|
|
130
|
+
*
|
|
131
|
+
* 逻辑:
|
|
132
|
+
* 1. 取当前本地时刻(HH:MM)与日期(YYYY-MM-DD)
|
|
133
|
+
* 2. 找出与当前时刻匹配的 schedule 项
|
|
134
|
+
* 3. 若该 `日期#时刻` 今日已触发 → 跳过(当日去重)
|
|
135
|
+
* 4. schedule 模式默认**不**做 rule-based 跳过;
|
|
136
|
+
* 仅当 options.skipWhenRunning=true 时才检查后台任务
|
|
137
|
+
* 5. 命中 → 标记已触发 + 构建事件(prompt 取当次命中项)
|
|
138
|
+
*/
|
|
139
|
+
private tickSchedule;
|
|
140
|
+
/**
|
|
141
|
+
* 清理过期的去重标记(只保留当天的)
|
|
142
|
+
*
|
|
143
|
+
* 防止长期运行时 Set 无限增长(每天新增若干 key)。
|
|
144
|
+
* 实现:只保留 `currentDateKey` 当天的标记。
|
|
145
|
+
* 说明:跨天时昨天的 key 失去意义(dateKey 不同即不同 key),删掉是安全的。
|
|
146
|
+
*/
|
|
147
|
+
private pruneFiredKeys;
|
|
64
148
|
/**
|
|
65
149
|
* 构建 SelfReminder 事件
|
|
66
150
|
*
|
|
67
151
|
* 结构参考 LarkCliInstance.handleEvent() 输出的 EventSourceEvent
|
|
152
|
+
*
|
|
153
|
+
* ★ Task #4815:schedule 模式下
|
|
154
|
+
* - message 取命中 schedule 项的 prompt
|
|
155
|
+
* - metadata 注入 `trigger_session_id`(EventHandler 用它把事件路由到
|
|
156
|
+
* 独立 session,而不是主会话)
|
|
157
|
+
* - metadata 注入 `scheduleLabel`(可选,便于下游识别是哪个时刻)
|
|
158
|
+
*
|
|
159
|
+
* @param entry 命中的 schedule 项;interval 模式不传
|
|
68
160
|
*/
|
|
69
161
|
private buildSelfReminderEvent;
|
|
70
162
|
}
|
package/dist/env/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseEnvironment
|
|
3
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../shared/@ai-setting/roy-agent-core-43r4bxey.js";
|
|
4
4
|
import {
|
|
5
5
|
TaskComponent
|
|
6
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../shared/@ai-setting/roy-agent-core-1k83dq3a.js";
|
|
7
7
|
import"../shared/@ai-setting/roy-agent-core-58804s3j.js";
|
|
8
8
|
import"../shared/@ai-setting/roy-agent-core-jm136jzh.js";
|
|
9
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
9
|
+
import"../shared/@ai-setting/roy-agent-core-dnjm17sa.js";
|
|
10
10
|
import"../shared/@ai-setting/roy-agent-core-fttgm52a.js";
|
|
11
11
|
import"../shared/@ai-setting/roy-agent-core-ntq0gz7q.js";
|
|
12
12
|
import"../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
13
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
13
|
+
import"../shared/@ai-setting/roy-agent-core-h5vmff8w.js";
|
|
14
14
|
import"../shared/@ai-setting/roy-agent-core-p5cz9m8v.js";
|
|
15
15
|
import {
|
|
16
16
|
EventSourceComponent
|
|
17
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
17
|
+
} from "../shared/@ai-setting/roy-agent-core-x0ddc2cr.js";
|
|
18
18
|
import {
|
|
19
19
|
builtInHandlers,
|
|
20
20
|
larkCliHandler
|
|
21
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
21
|
+
} from "../shared/@ai-setting/roy-agent-core-19na22cc.js";
|
|
22
22
|
import {
|
|
23
23
|
EventSourceInitHooks,
|
|
24
24
|
getDefaultConfigForType,
|
|
@@ -29,14 +29,15 @@ import {
|
|
|
29
29
|
import"../shared/@ai-setting/roy-agent-core-add1zqsh.js";
|
|
30
30
|
import"../shared/@ai-setting/roy-agent-core-v0hf14bj.js";
|
|
31
31
|
import"../shared/@ai-setting/roy-agent-core-tm1mxttk.js";
|
|
32
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
32
|
+
import"../shared/@ai-setting/roy-agent-core-keyb45z3.js";
|
|
33
33
|
import"../shared/@ai-setting/roy-agent-core-na18zwj0.js";
|
|
34
34
|
import"../shared/@ai-setting/roy-agent-core-abqhkbn3.js";
|
|
35
35
|
import"../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
36
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
36
|
+
import"../shared/@ai-setting/roy-agent-core-ma35jyd9.js";
|
|
37
37
|
import"../shared/@ai-setting/roy-agent-core-tr3ep81v.js";
|
|
38
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
39
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
38
|
+
import"../shared/@ai-setting/roy-agent-core-6m4bw8jy.js";
|
|
39
|
+
import"../shared/@ai-setting/roy-agent-core-8bjj3d1b.js";
|
|
40
|
+
import"../shared/@ai-setting/roy-agent-core-tadj19vp.js";
|
|
40
41
|
import {
|
|
41
42
|
WorkflowComponent
|
|
42
43
|
} from "../shared/@ai-setting/roy-agent-core-37tj4y6a.js";
|
|
@@ -67,7 +68,7 @@ import"../shared/@ai-setting/roy-agent-core-jagkferh.js";
|
|
|
67
68
|
import {
|
|
68
69
|
AgentComponent,
|
|
69
70
|
AgentComponentConfigSchema
|
|
70
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
71
|
+
} from "../shared/@ai-setting/roy-agent-core-hfr6bzts.js";
|
|
71
72
|
import"../shared/@ai-setting/roy-agent-core-dt104qa1.js";
|
|
72
73
|
import"../shared/@ai-setting/roy-agent-core-jvv2h3d6.js";
|
|
73
74
|
import"../shared/@ai-setting/roy-agent-core-07fvy74y.js";
|
package/dist/env/prompt/index.js
CHANGED
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
PromptConfigSchema,
|
|
4
4
|
PromptPathSchema,
|
|
5
5
|
PromptRenderer
|
|
6
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
7
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../shared/@ai-setting/roy-agent-core-wksgtqf9.js";
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-ma35jyd9.js";
|
|
8
|
+
import"../../shared/@ai-setting/roy-agent-core-6m4bw8jy.js";
|
|
8
9
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
9
10
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
10
11
|
import"../../shared/@ai-setting/roy-agent-core-pgvcf91v.js";
|