@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
package/dist/env/task/index.js
CHANGED
|
@@ -5,25 +5,21 @@ import {
|
|
|
5
5
|
TaskPriorityEnum,
|
|
6
6
|
TaskStatusEnum,
|
|
7
7
|
TaskTypeEnum
|
|
8
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../../shared/@ai-setting/roy-agent-core-fan8g0z1.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-2akfd64z.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-jm136jzh.js";
|
|
11
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
import"../../shared/@ai-setting/roy-agent-core-0sbmdz8d.js";
|
|
12
12
|
import"../../shared/@ai-setting/roy-agent-core-fttgm52a.js";
|
|
13
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
13
|
+
import"../../shared/@ai-setting/roy-agent-core-vpcxv1ty.js";
|
|
14
14
|
import {
|
|
15
15
|
TaskEntityEventTypes
|
|
16
16
|
} from "../../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
17
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
17
|
+
import"../../shared/@ai-setting/roy-agent-core-qwd2dq5q.js";
|
|
18
18
|
import"../../shared/@ai-setting/roy-agent-core-p5cz9m8v.js";
|
|
19
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
20
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
21
|
-
import {
|
|
22
|
-
SQLiteTaskStore,
|
|
23
|
-
getDefaultTaskDbPath
|
|
24
|
-
} from "../../shared/@ai-setting/roy-agent-core-ezvpreqz.js";
|
|
19
|
+
import"../../shared/@ai-setting/roy-agent-core-4t3yskp8.js";
|
|
20
|
+
import"../../shared/@ai-setting/roy-agent-core-y7fqtzk2.js";
|
|
25
21
|
import"../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
26
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
22
|
+
import"../../shared/@ai-setting/roy-agent-core-d6zdbgtc.js";
|
|
27
23
|
import"../../shared/@ai-setting/roy-agent-core-m46fe3x4.js";
|
|
28
24
|
import {
|
|
29
25
|
TASK_ARCHIVED_STATUS_WORD,
|
|
@@ -31,16 +27,20 @@ import {
|
|
|
31
27
|
TASK_COMPLETED_STATUS_WORD,
|
|
32
28
|
TASK_DELIVERABLE_RECORDED
|
|
33
29
|
} from "../../shared/@ai-setting/roy-agent-core-4rtg69cn.js";
|
|
34
|
-
import
|
|
30
|
+
import {
|
|
31
|
+
SQLiteTaskStore,
|
|
32
|
+
getDefaultTaskDbPath
|
|
33
|
+
} from "../../shared/@ai-setting/roy-agent-core-6k8mb7zx.js";
|
|
34
|
+
import"../../shared/@ai-setting/roy-agent-core-v1n0106v.js";
|
|
35
35
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
36
36
|
import"../../shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
37
37
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
38
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
39
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
40
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
41
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
42
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
43
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
38
|
+
import"../../shared/@ai-setting/roy-agent-core-m39v7qpx.js";
|
|
39
|
+
import"../../shared/@ai-setting/roy-agent-core-smf94h73.js";
|
|
40
|
+
import"../../shared/@ai-setting/roy-agent-core-yet36q5k.js";
|
|
41
|
+
import"../../shared/@ai-setting/roy-agent-core-tkpp1ba0.js";
|
|
42
|
+
import"../../shared/@ai-setting/roy-agent-core-p31ftgq9.js";
|
|
43
|
+
import"../../shared/@ai-setting/roy-agent-core-5s2t8z00.js";
|
|
44
44
|
import"../../shared/@ai-setting/roy-agent-core-7f7t9wwp.js";
|
|
45
45
|
import"../../shared/@ai-setting/roy-agent-core-85xyctnb.js";
|
|
46
46
|
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
searchTasksTool,
|
|
8
8
|
treeTasksTool,
|
|
9
9
|
updateTaskTool
|
|
10
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
} from "../../../shared/@ai-setting/roy-agent-core-qwd2dq5q.js";
|
|
11
11
|
import {
|
|
12
12
|
createOperationTool,
|
|
13
13
|
listOperationsTool
|
|
14
14
|
} from "../../../shared/@ai-setting/roy-agent-core-p5cz9m8v.js";
|
|
15
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
15
|
+
import"../../../shared/@ai-setting/roy-agent-core-d6zdbgtc.js";
|
|
16
16
|
import"../../../shared/@ai-setting/roy-agent-core-m46fe3x4.js";
|
|
17
17
|
import"../../../shared/@ai-setting/roy-agent-core-4rtg69cn.js";
|
|
18
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
19
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
18
|
+
import"../../../shared/@ai-setting/roy-agent-core-p31ftgq9.js";
|
|
19
|
+
import"../../../shared/@ai-setting/roy-agent-core-5s2t8z00.js";
|
|
20
20
|
import"../../../shared/@ai-setting/roy-agent-core-7f7t9wwp.js";
|
|
21
21
|
import"../../../shared/@ai-setting/roy-agent-core-85xyctnb.js";
|
|
22
22
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Task #5360(用户澄清 2026-11-11 22:37)——
|
|
3
|
+
* 卡片实体:**sub-session 永远是主键**,task 是可选的**附加增强信息**
|
|
4
|
+
*
|
|
5
|
+
* ## 用户澄清原文(覆盖了此前「task-or-session 二选一」的理解)
|
|
6
|
+
*
|
|
7
|
+
* > 「**不是**「task 或 sub-session」二选一,而是**以 sub-session 为基底**:
|
|
8
|
+
* > 1. 卡片主键 = sub-session(不是 task)
|
|
9
|
+
* > 2. 有些 sub-session 内部创建了 task,有些没有 —— 都是正常的
|
|
10
|
+
* > 3. 如果该 sub-session 创建了 task → 把 task 信息同步进卡片
|
|
11
|
+
* > (taskId、title、状态、进度、操作记录等原有信息一个不少)
|
|
12
|
+
* > 4. **无论有无 task,sub-session 相关的刷新逻辑始终存在**:
|
|
13
|
+
* > 刷新看消息数 + 最近 msg(截断);
|
|
14
|
+
* > **超时、完成等生命周期事件也体现在卡片上**(这是 subsession 层的)」
|
|
15
|
+
*
|
|
16
|
+
* ## 语义对比(这是本模块存在的全部理由)
|
|
17
|
+
*
|
|
18
|
+
* ```
|
|
19
|
+
* ❌ 旧(错):type CardSubject = { kind:"task"; taskId } | { kind:"session"; sessionId }
|
|
20
|
+
* → 主键二选一;task 卡和 session 卡是两张不同的卡
|
|
21
|
+
* ✅ 新(对):type CardSubject = {
|
|
22
|
+
* sessionId: string; // ← 永远是主键,不可缺
|
|
23
|
+
* taskId?: number; // ← 可选增强,有就多显示
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* 关键推论(写代码时最容易搞错的地方):
|
|
28
|
+
*
|
|
29
|
+
* 1. **刷新永远读 session store**。有 task 时也读 session —— 因为
|
|
30
|
+
* 「消息数 + 最近 msg」是**会话**的属性,不是 task 的属性。
|
|
31
|
+
* 旧实现走 `taskId → bgTask → subSessionId → session`,绕了一圈才拿到
|
|
32
|
+
* 同一个 session;现在主键就是 sessionId,直达。
|
|
33
|
+
* 2. **生命周期(超时/完成/停止)是 session 层的事实**。旧设计里终态来自
|
|
34
|
+
* `task.status`(没 task 就永远 non-terminal)—— 这正是本次要修的语义错误。
|
|
35
|
+
* 现在终态来自 **跑这个 session 的后台任务**(`BackgroundTask.status`),
|
|
36
|
+
* 与「该 session 有没有建 task」无关。
|
|
37
|
+
* 3. **有 task 只是"多一块信息"**,不改变卡片身份、不改变刷新行为。
|
|
38
|
+
*
|
|
39
|
+
* ## 序列化格式
|
|
40
|
+
*
|
|
41
|
+
* 持久层主键是字符串,格式:
|
|
42
|
+
*
|
|
43
|
+
* ```
|
|
44
|
+
* session:<sessionId> ← 无关联 task
|
|
45
|
+
* session:<sessionId>#task:<taskId> ← 有关联 task(附加段)
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* - 主键段**永远是 session**;`#task:` 段是纯附加值,缺了不影响解析
|
|
49
|
+
* - 用 `#` 分隔而不是再嵌 `:`,避免 session id 里含 `:` 时歧义
|
|
50
|
+
* (session id 可能含 `-` / `_`,理论上也可能含别的;`#` 最少见)
|
|
51
|
+
* - 旧数据(只有 `task_id INTEGER`)迁移时**无法**反推 sessionId ⇒ 标记为
|
|
52
|
+
* `legacy-task:<n>`,仅用于读旧卡(新卡不再产生这种形态)
|
|
53
|
+
*/
|
|
54
|
+
/**
|
|
55
|
+
* 卡片实体:**session 为主 + task 可选**。
|
|
56
|
+
*
|
|
57
|
+
* ⚠️ `sessionId` 必填 —— 这是本次澄清的核心,不要为了兼容旧代码把它变可选。
|
|
58
|
+
*/
|
|
59
|
+
export interface CardSubject {
|
|
60
|
+
/** ★ 主键:跑这次执行的 sub-session */
|
|
61
|
+
sessionId: string;
|
|
62
|
+
/** 附加增强:该 session 内创建的 roy 任务(可能没有) */
|
|
63
|
+
taskId?: number;
|
|
64
|
+
}
|
|
65
|
+
/** 持久层主键 */
|
|
66
|
+
export type CardKey = string;
|
|
67
|
+
/**
|
|
68
|
+
* 造卡片主键。**sessionId 必填**,taskId 可选(附加值)。
|
|
69
|
+
*
|
|
70
|
+
* @throws sessionId 为空(空主键会撞脏数据,宁可早失败)
|
|
71
|
+
*/
|
|
72
|
+
export declare function cardKeyOf(subject: CardSubject): CardKey;
|
|
73
|
+
/** 便捷:只给 sessionId(无 task) */
|
|
74
|
+
export declare function sessionCardKey(sessionId: string): CardKey;
|
|
75
|
+
/** 便捷:sessionId + taskId */
|
|
76
|
+
export declare function sessionTaskCardKey(sessionId: string, taskId: number): CardKey;
|
|
77
|
+
/** 旧卡(迁移期只读):`legacy-task:<n>` */
|
|
78
|
+
export declare function legacyTaskCardKey(taskId: number): CardKey;
|
|
79
|
+
/**
|
|
80
|
+
* 解析主键。
|
|
81
|
+
*
|
|
82
|
+
* 失败(非字符串 / 空 / 缺 `session:` 前缀 / sessionId 为空)一律
|
|
83
|
+
* `undefined` —— 调用方降级,**绝不抛、绝不猜**。
|
|
84
|
+
*
|
|
85
|
+
* 注意:`legacy-task:<n>` **不**解析成 CardSubject(它没有 sessionId,
|
|
86
|
+
* 无法参与刷新);需要区分旧卡时用 `isLegacyTaskCardKey`。
|
|
87
|
+
*/
|
|
88
|
+
export declare function parseCardKey(key: unknown): CardSubject | undefined;
|
|
89
|
+
/** 是否是迁移期的旧卡主键(只有 task、没有 session) */
|
|
90
|
+
export declare function isLegacyTaskCardKey(key: unknown): boolean;
|
|
91
|
+
/** 判定版 */
|
|
92
|
+
export declare function isCardKey(v: unknown): v is CardKey;
|
|
93
|
+
/**
|
|
94
|
+
* 从按钮 `value` 里挑出卡片实体。
|
|
95
|
+
*
|
|
96
|
+
* ## 与旧实现的关键差异
|
|
97
|
+
*
|
|
98
|
+
* 旧实现「taskId 优先,没有 taskId 才用 sessionId」—— 那会让**有 task 的
|
|
99
|
+
* session 卡**被当成 task 卡刷新(走 task→bgTask→session 绕路,且丢掉
|
|
100
|
+
* session 层的生命周期)。现在:**sessionId 是主键,taskId 只是附加值**,
|
|
101
|
+
* 所以 sessionId 必须存在,taskId 有就带上。
|
|
102
|
+
*
|
|
103
|
+
* @returns 无 sessionId ⇒ `undefined`(连主键都没有,无法刷新)
|
|
104
|
+
*/
|
|
105
|
+
export declare function pickCardSubject(value: {
|
|
106
|
+
sessionId?: unknown;
|
|
107
|
+
taskId?: unknown;
|
|
108
|
+
}): CardSubject | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* 主标签:`会话 <sessionId 截断>`。
|
|
111
|
+
*
|
|
112
|
+
* session 是卡片身份,所以标签以它为主;task 信息在卡片正文里单独展示
|
|
113
|
+
* (见 `buildSessionCard` 的「任务信息」面板)。
|
|
114
|
+
*/
|
|
115
|
+
export declare function cardSubjectLabel(subject: CardSubject): string;
|
|
116
|
+
/** 是否有关联 task(决定卡片是否渲染「任务信息」面板) */
|
|
117
|
+
export declare function hasTask(subject: CardSubject): boolean;
|
|
@@ -10,6 +10,8 @@ export { TASK_COMPLETION_HINT_ANCHOR, TASK_COMPLETE_ITEM_BY_ITEM, TASK_COMPLETE_
|
|
|
10
10
|
export type { DecisionPort, DecisionRequest, DecisionAnswer, DecisionResponse, } from "./decision-port";
|
|
11
11
|
export { WORKFLOW_EXTRACTOR_PROMPT, formatExtractorInput, formatExtractorInputFromDescription, parseExtractorOutput, } from "./workflow-extractor-agent";
|
|
12
12
|
export { LarkCliTaskNotifyHook, createLarkCliTaskNotifyHook, type TaskNotifyConfig, NotifyType, } from "./lark-cli-task-notify-plugin";
|
|
13
|
+
export { WecomTaskNotifyHook, createWecomTaskNotifyHook, extractWecomFields, buildWecomTaskCard, WecomNotifyType, type WecomTaskNotifyConfig, type WecomMilestone, } from "./wecom-task-notify-plugin";
|
|
14
|
+
export { createWecomCardStateStore, createMemoryWecomCardStore, MemoryWecomCardStateStore, SqliteWecomCardStateStore, getDefaultWecomCardDbPath, type WecomCardState, type WecomCardStateStore, } from "./wecom-card-state-store";
|
|
13
15
|
export { PerTaskGroupChatPlugin, createPerTaskGroupChatPlugin, type PerTaskGroupConfig, } from "./per-task-group-chat-plugin";
|
|
14
16
|
export { LarkCardPatchNotifier, type LarkCardPatchNotifierOptions, buildTaskCard, buildWorkflowCard, renderProgressBar, renderMilestones, renderProcessSteps, renderTaskInfoLines, renderContextAsLines, renderWorkflowInfoLines, formatTimestampForDisplay, formatDateTimeForDisplay, formatDurationMs, sanitizeInlineText, humanizeValue, resolveTaskTitleForDisplay, buildChatAppLink, DEFAULT_APP_LINK_BASE, type CardStatus, type WorkflowCardStatus, type Milestone, type ProcessStep, type TaskMeta, type WorkflowMeta, type CardPayload, type StartTaskOptions, type UpdateTaskOptions, type FinishTaskOptions, type StartTaskResult, type StartWorkflowOptions, type UpdateWorkflowOptions, type FinishWorkflowOptions, } from "./lark-card-patch-notifier";
|
|
15
17
|
export { createLarkCardStateStore, getDefaultLarkCardDbPath, MemoryLarkCardStateStore, SqliteLarkCardStateStore, type LarkCardState, type LarkCardRecordStatus, type LarkCardStateStore, } from "./lark-card-state-store";
|
|
@@ -4,32 +4,39 @@ import {
|
|
|
4
4
|
LarkCliTaskNotifyHook,
|
|
5
5
|
LayaCompletionPlugin,
|
|
6
6
|
LayaDecisionPlugin,
|
|
7
|
-
|
|
7
|
+
MemoryWecomCardStateStore,
|
|
8
8
|
NotifyType,
|
|
9
9
|
PerTaskGroupChatPlugin,
|
|
10
|
-
|
|
10
|
+
SqliteWecomCardStateStore,
|
|
11
11
|
TaskTagPlugin,
|
|
12
12
|
WORKFLOW_EXTRACTOR_PROMPT,
|
|
13
|
+
WecomNotifyType,
|
|
14
|
+
WecomTaskNotifyHook,
|
|
13
15
|
buildCompletionHint,
|
|
14
16
|
buildCompletionQuestion,
|
|
17
|
+
buildWecomTaskCard,
|
|
15
18
|
createAutoTaskPlugin,
|
|
16
|
-
createLarkCardStateStore,
|
|
17
19
|
createLarkCliTaskNotifyHook,
|
|
18
20
|
createLayaCompletionPlugin,
|
|
19
21
|
createLayaDecisionPlugin,
|
|
22
|
+
createMemoryWecomCardStore,
|
|
20
23
|
createPerTaskGroupChatPlugin,
|
|
24
|
+
createWecomCardStateStore,
|
|
25
|
+
createWecomTaskNotifyHook,
|
|
26
|
+
extractWecomFields,
|
|
21
27
|
formatExtractorInput,
|
|
22
28
|
formatExtractorInputFromDescription,
|
|
23
|
-
|
|
29
|
+
getDefaultWecomCardDbPath,
|
|
24
30
|
parseExtractorOutput,
|
|
25
31
|
registerLayaCompletionTaskHook,
|
|
26
32
|
renderCompletionState
|
|
27
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
28
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
29
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
30
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
33
|
+
} from "../../../shared/@ai-setting/roy-agent-core-ra66sf50.js";
|
|
34
|
+
import"../../../shared/@ai-setting/roy-agent-core-h1e1fm9b.js";
|
|
35
|
+
import"../../../shared/@ai-setting/roy-agent-core-c4ec7k0p.js";
|
|
36
|
+
import"../../../shared/@ai-setting/roy-agent-core-4t3yskp8.js";
|
|
37
|
+
import"../../../shared/@ai-setting/roy-agent-core-y7fqtzk2.js";
|
|
31
38
|
import"../../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
32
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
39
|
+
import"../../../shared/@ai-setting/roy-agent-core-d6zdbgtc.js";
|
|
33
40
|
import"../../../shared/@ai-setting/roy-agent-core-m46fe3x4.js";
|
|
34
41
|
import {
|
|
35
42
|
TASK_COMPLETE_ACCEPTANCE,
|
|
@@ -40,12 +47,16 @@ import {
|
|
|
40
47
|
import {
|
|
41
48
|
DEFAULT_APP_LINK_BASE,
|
|
42
49
|
LarkCardPatchNotifier,
|
|
50
|
+
MemoryLarkCardStateStore,
|
|
51
|
+
SqliteLarkCardStateStore,
|
|
43
52
|
buildChatAppLink,
|
|
44
53
|
buildTaskCard,
|
|
45
54
|
buildWorkflowCard,
|
|
55
|
+
createLarkCardStateStore,
|
|
46
56
|
formatDateTimeForDisplay,
|
|
47
57
|
formatDurationMs,
|
|
48
58
|
formatTimestampForDisplay,
|
|
59
|
+
getDefaultLarkCardDbPath,
|
|
49
60
|
humanizeValue,
|
|
50
61
|
renderContextAsLines,
|
|
51
62
|
renderMilestones,
|
|
@@ -55,9 +66,11 @@ import {
|
|
|
55
66
|
renderWorkflowInfoLines,
|
|
56
67
|
resolveTaskTitleForDisplay,
|
|
57
68
|
sanitizeInlineText
|
|
58
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
59
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
60
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
69
|
+
} from "../../../shared/@ai-setting/roy-agent-core-shb1qsyg.js";
|
|
70
|
+
import"../../../shared/@ai-setting/roy-agent-core-418zc9ha.js";
|
|
71
|
+
import"../../../shared/@ai-setting/roy-agent-core-6k8mb7zx.js";
|
|
72
|
+
import"../../../shared/@ai-setting/roy-agent-core-rm7seqwb.js";
|
|
73
|
+
import"../../../shared/@ai-setting/roy-agent-core-e08bvpaq.js";
|
|
61
74
|
import"../../../shared/@ai-setting/roy-agent-core-er070zjq.js";
|
|
62
75
|
import {
|
|
63
76
|
TASK_OP_WATERMARK_AUDIT_INTERVAL,
|
|
@@ -65,12 +78,12 @@ import {
|
|
|
65
78
|
TASK_OP_WATERMARK_MESSAGE_LIMIT,
|
|
66
79
|
TaskOpWatermarkPlugin,
|
|
67
80
|
createTaskOpWatermarkPlugin
|
|
68
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
81
|
+
} from "../../../shared/@ai-setting/roy-agent-core-7yh5wps0.js";
|
|
69
82
|
import"../../../shared/@ai-setting/roy-agent-core-mkc3zshb.js";
|
|
70
83
|
import"../../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
71
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
72
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
73
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
84
|
+
import"../../../shared/@ai-setting/roy-agent-core-tkpp1ba0.js";
|
|
85
|
+
import"../../../shared/@ai-setting/roy-agent-core-p31ftgq9.js";
|
|
86
|
+
import"../../../shared/@ai-setting/roy-agent-core-5s2t8z00.js";
|
|
74
87
|
import"../../../shared/@ai-setting/roy-agent-core-7f7t9wwp.js";
|
|
75
88
|
import"../../../shared/@ai-setting/roy-agent-core-85xyctnb.js";
|
|
76
89
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -87,24 +100,32 @@ export {
|
|
|
87
100
|
registerLayaCompletionTaskHook,
|
|
88
101
|
parseExtractorOutput,
|
|
89
102
|
humanizeValue,
|
|
103
|
+
getDefaultWecomCardDbPath,
|
|
90
104
|
getDefaultLarkCardDbPath,
|
|
91
105
|
formatTimestampForDisplay,
|
|
92
106
|
formatExtractorInputFromDescription,
|
|
93
107
|
formatExtractorInput,
|
|
94
108
|
formatDurationMs,
|
|
95
109
|
formatDateTimeForDisplay,
|
|
110
|
+
extractWecomFields,
|
|
111
|
+
createWecomTaskNotifyHook,
|
|
112
|
+
createWecomCardStateStore,
|
|
96
113
|
createTaskOpWatermarkPlugin,
|
|
97
114
|
createPerTaskGroupChatPlugin,
|
|
115
|
+
createMemoryWecomCardStore,
|
|
98
116
|
createLayaDecisionPlugin,
|
|
99
117
|
createLayaCompletionPlugin,
|
|
100
118
|
createLarkCliTaskNotifyHook,
|
|
101
119
|
createLarkCardStateStore,
|
|
102
120
|
createAutoTaskPlugin,
|
|
103
121
|
buildWorkflowCard,
|
|
122
|
+
buildWecomTaskCard,
|
|
104
123
|
buildTaskCard,
|
|
105
124
|
buildCompletionQuestion,
|
|
106
125
|
buildCompletionHint,
|
|
107
126
|
buildChatAppLink,
|
|
127
|
+
WecomTaskNotifyHook,
|
|
128
|
+
WecomNotifyType,
|
|
108
129
|
WORKFLOW_EXTRACTOR_PROMPT,
|
|
109
130
|
TaskTagPlugin,
|
|
110
131
|
TaskOpWatermarkPlugin,
|
|
@@ -115,9 +136,11 @@ export {
|
|
|
115
136
|
TASK_COMPLETE_VERIFY_DUTY,
|
|
116
137
|
TASK_COMPLETE_ITEM_BY_ITEM,
|
|
117
138
|
TASK_COMPLETE_ACCEPTANCE,
|
|
139
|
+
SqliteWecomCardStateStore,
|
|
118
140
|
SqliteLarkCardStateStore,
|
|
119
141
|
PerTaskGroupChatPlugin,
|
|
120
142
|
NotifyType,
|
|
143
|
+
MemoryWecomCardStateStore,
|
|
121
144
|
MemoryLarkCardStateStore,
|
|
122
145
|
LayaDecisionPlugin,
|
|
123
146
|
LayaCompletionPlugin,
|