@ai-setting/roy-agent-core 1.7.85 → 1.7.89
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/index.js +7 -7
- package/dist/env/agent/agent-component.d.ts +1 -1
- package/dist/env/agent/agent-component.js +13 -12
- package/dist/env/agent/index.js +13 -12
- package/dist/env/agent/types.d.ts +14 -0
- 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.js +1 -1
- package/dist/env/event-source/event-source-handlers.d.ts +18 -2
- package/dist/env/event-source/event-source-handlers.js +26 -21
- package/dist/env/event-source/event-store.js +2 -2
- package/dist/env/event-source/index.js +25 -22
- package/dist/env/event-source/timer-handler.d.ts +98 -0
- package/dist/env/event-source/types.d.ts +53 -1
- package/dist/env/event-source/wecom-card-action-handler.d.ts +235 -3
- package/dist/env/event-source/wecom-card-builder.d.ts +207 -1
- package/dist/env/event-source/wecom-cli-handler.d.ts +25 -0
- package/dist/{shared/@ai-setting/roy-agent-core-vyr6svt6.js → env/event-source/wecom-respond-registry.js} +8 -6
- 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/hook/index.js +5 -5
- package/dist/env/index.js +50 -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/backend/index.d.ts +3 -0
- package/dist/env/task/backend/index.js +151 -3
- package/dist/env/task/backend/remote-task-port.d.ts +85 -0
- package/dist/env/task/backend/types.d.ts +5 -0
- package/dist/env/task/delegate/delegate-channel-hint.d.ts +39 -0
- package/dist/env/task/delegate/delegate-tool.d.ts +71 -6
- package/dist/env/task/delegate/delegate-tool.js +11 -9
- package/dist/env/task/delegate/index.js +8 -8
- package/dist/env/task/index.d.ts +1 -1
- package/dist/env/task/index.js +34 -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.js +19 -17
- package/dist/env/task/plugins/lark-card-action-handler.d.ts +261 -6
- package/dist/env/task/plugins/lark-card-patch-notifier.d.ts +501 -0
- 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 +45 -0
- package/dist/env/task/plugins/sub-session-activity.d.ts +415 -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 +40 -0
- package/dist/env/task/storage/index.d.ts +1 -0
- package/dist/env/task/storage/index.js +24 -4
- package/dist/env/task/storage/migrations/006_add_task_owner.d.ts +24 -0
- package/dist/env/task/storage/remote-task-store.d.ts +186 -0
- package/dist/env/task/task-component.d.ts +7 -0
- package/dist/env/task/tools/index.js +4 -4
- package/dist/env/task/tools/task-types.d.ts +7 -0
- package/dist/env/task/types.d.ts +17 -0
- package/dist/env/tool/built-in/index.js +6 -4
- package/dist/env/tool/index.js +14 -10
- 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 +71 -60
- package/dist/shared/@ai-setting/{roy-agent-core-q813vafd.js → roy-agent-core-05z35shp.js} +1 -1
- 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-7dd0s3xb.js → roy-agent-core-0n1wwndq.js} +1027 -14
- package/dist/shared/@ai-setting/{roy-agent-core-cha0jc7n.js → roy-agent-core-0sbmdz8d.js} +137 -16
- 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-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-qk9hd89p.js → roy-agent-core-49qcpqwg.js} +54 -19
- package/dist/shared/@ai-setting/{roy-agent-core-xf6z96qy.js → roy-agent-core-4b38m749.js} +818 -346
- 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-d1n4jbza.js → roy-agent-core-5dhvfgaw.js} +5 -5
- 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-g8htfwxj.js → roy-agent-core-7f10p7m2.js} +1 -1
- 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-rykf7c04.js → roy-agent-core-9c565frx.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vffccgf6.js → roy-agent-core-9cen1jvg.js} +18 -7
- 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-age3qseb.js +177 -0
- package/dist/shared/@ai-setting/{roy-agent-core-7bpj859q.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-p6ks90tb.js → roy-agent-core-dvec4nn2.js} +6 -6
- 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-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-dvtg4sn0.js → roy-agent-core-g8yr733d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-m3vjepzz.js → roy-agent-core-h1e1fm9b.js} +38 -202
- 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-tk98f92b.js → roy-agent-core-k3gcvybs.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-b31v3qpv.js → roy-agent-core-k3h8t4q1.js} +992 -212
- 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-ezvpreqz.js → roy-agent-core-m66ysky0.js} +54 -6
- package/dist/shared/@ai-setting/{roy-agent-core-begm7ytz.js → roy-agent-core-m7d1t3db.js} +3 -3
- 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-ze5cqpf2.js → roy-agent-core-mx855td4.js} +17 -38
- package/dist/shared/@ai-setting/{roy-agent-core-0dh8npnz.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-1v4g0d4x.js → roy-agent-core-rm7seqwb.js} +1 -1
- 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-dkrvmjsh.js → roy-agent-core-tpm1dd1g.js} +23 -15
- 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-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-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-zhwcje5a.js +352 -0
- package/package.json +9 -1
|
@@ -9,7 +9,10 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
BackgroundTaskManager,
|
|
11
11
|
createDelegateTool
|
|
12
|
-
} from "./roy-agent-core-
|
|
12
|
+
} from "./roy-agent-core-0sbmdz8d.js";
|
|
13
|
+
import {
|
|
14
|
+
RemoteTaskStore
|
|
15
|
+
} from "./roy-agent-core-zhwcje5a.js";
|
|
13
16
|
import {
|
|
14
17
|
TaskEntityEventTypes
|
|
15
18
|
} from "./roy-agent-core-8gxth0eh.js";
|
|
@@ -26,7 +29,7 @@ import {
|
|
|
26
29
|
searchTasksTool,
|
|
27
30
|
treeTasksTool,
|
|
28
31
|
updateTaskTool
|
|
29
|
-
} from "./roy-agent-core-
|
|
32
|
+
} from "./roy-agent-core-9cen1jvg.js";
|
|
30
33
|
import {
|
|
31
34
|
createOperationTool,
|
|
32
35
|
deleteOperationTool,
|
|
@@ -34,10 +37,6 @@ import {
|
|
|
34
37
|
listOperationsTool,
|
|
35
38
|
updateOperationTool
|
|
36
39
|
} from "./roy-agent-core-p5cz9m8v.js";
|
|
37
|
-
import {
|
|
38
|
-
SQLiteTaskStore,
|
|
39
|
-
getDefaultTaskDbPath
|
|
40
|
-
} from "./roy-agent-core-ezvpreqz.js";
|
|
41
40
|
import {
|
|
42
41
|
TaskHookPoints
|
|
43
42
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
@@ -51,24 +50,28 @@ import {
|
|
|
51
50
|
TASK_TO_VALIDATE_STATUS_WORD,
|
|
52
51
|
TERMINAL_NON_ACCEPTABLE_STATUSES
|
|
53
52
|
} from "./roy-agent-core-4rtg69cn.js";
|
|
53
|
+
import {
|
|
54
|
+
SQLiteTaskStore,
|
|
55
|
+
getDefaultTaskDbPath
|
|
56
|
+
} from "./roy-agent-core-m66ysky0.js";
|
|
54
57
|
import {
|
|
55
58
|
envKeyToConfigKey
|
|
56
59
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
57
60
|
import {
|
|
58
61
|
BaseComponent
|
|
59
|
-
} from "./roy-agent-core-
|
|
62
|
+
} from "./roy-agent-core-m39v7qpx.js";
|
|
60
63
|
import {
|
|
61
64
|
globalHookManager,
|
|
62
65
|
init_global_hook_manager
|
|
63
|
-
} from "./roy-agent-core-
|
|
66
|
+
} from "./roy-agent-core-yet36q5k.js";
|
|
64
67
|
import {
|
|
65
68
|
getEnvContextOrEmpty,
|
|
66
69
|
init_env_context
|
|
67
|
-
} from "./roy-agent-core-
|
|
70
|
+
} from "./roy-agent-core-p31ftgq9.js";
|
|
68
71
|
import {
|
|
69
72
|
TracedAs,
|
|
70
73
|
init_decorator
|
|
71
|
-
} from "./roy-agent-core-
|
|
74
|
+
} from "./roy-agent-core-5s2t8z00.js";
|
|
72
75
|
import {
|
|
73
76
|
createLogger,
|
|
74
77
|
init_logger
|
|
@@ -83,7 +86,9 @@ init_logger();
|
|
|
83
86
|
// src/env/task/task-config-registration.ts
|
|
84
87
|
var TASK_DEFAULTS = {
|
|
85
88
|
"task.storage.type": "sqlite",
|
|
86
|
-
"task.storage.dbPath": undefined
|
|
89
|
+
"task.storage.dbPath": undefined,
|
|
90
|
+
"task.storage.endpoint": undefined,
|
|
91
|
+
"task.storage.authToken": undefined
|
|
87
92
|
};
|
|
88
93
|
var TASK_CONFIG_REGISTRATION = {
|
|
89
94
|
name: "task",
|
|
@@ -92,7 +97,9 @@ var TASK_CONFIG_REGISTRATION = {
|
|
|
92
97
|
],
|
|
93
98
|
keys: [
|
|
94
99
|
{ key: "task.storage.type", sources: ["env", "file"] },
|
|
95
|
-
{ key: "task.storage.dbPath", sources: ["env", "file"] }
|
|
100
|
+
{ key: "task.storage.dbPath", sources: ["env", "file"] },
|
|
101
|
+
{ key: "task.storage.endpoint", sources: ["env", "file"] },
|
|
102
|
+
{ key: "task.storage.authToken", sources: ["env", "file"] }
|
|
96
103
|
]
|
|
97
104
|
};
|
|
98
105
|
|
|
@@ -305,14 +312,40 @@ class TaskComponent extends BaseComponent {
|
|
|
305
312
|
return;
|
|
306
313
|
const storageType = configComponent.get("task.storage.type") ?? "sqlite";
|
|
307
314
|
const dbPath = configComponent.get("task.storage.dbPath");
|
|
308
|
-
|
|
309
|
-
|
|
315
|
+
const previous = this.store;
|
|
316
|
+
const nextStore = this.buildStore(storageType, dbPath);
|
|
317
|
+
if (previous) {
|
|
318
|
+
try {
|
|
319
|
+
previous.close();
|
|
320
|
+
} catch (e) {
|
|
321
|
+
logger2.warn(`[TaskComponent] Failed to close previous store: ${e instanceof Error ? e.message : String(e)}`);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
this.store = nextStore;
|
|
325
|
+
this.tagService = new DefaultTagService(this.store);
|
|
326
|
+
if (storageType === "remote") {
|
|
327
|
+
const endpoint = configComponent.get("task.storage.endpoint");
|
|
328
|
+
logger2.info(`[TaskComponent] Using remote task-service: ${endpoint}` + `${configComponent.get("task.storage.authToken") ? " (with bearer token)" : " (no auth token)"}`);
|
|
329
|
+
} else if (storageType === "sqlite") {
|
|
310
330
|
logger2.info(`[TaskComponent] Using SQLite storage: ${dbPath || "default path"}`);
|
|
311
|
-
} else {
|
|
312
|
-
this.store = new SQLiteTaskStore;
|
|
313
|
-
logger2.info("[TaskComponent] Using SQLite storage (default)");
|
|
314
331
|
}
|
|
315
332
|
}
|
|
333
|
+
buildStore(storageType, dbPath) {
|
|
334
|
+
const configComponent = this.configComponent;
|
|
335
|
+
if (storageType === "remote") {
|
|
336
|
+
const endpoint = configComponent?.get("task.storage.endpoint");
|
|
337
|
+
const authToken = configComponent?.get("task.storage.authToken");
|
|
338
|
+
if (!endpoint) {
|
|
339
|
+
throw new Error("[TaskComponent] task.storage.type=remote requires task.storage.endpoint " + "(e.g. http://127.0.0.1:7820). Set task.storage.endpoint and task.storage.authToken " + "to match the running roy-task-service. No local fallback is performed by design.");
|
|
340
|
+
}
|
|
341
|
+
return new RemoteTaskStore({ endpoint, authToken });
|
|
342
|
+
}
|
|
343
|
+
if (storageType === "sqlite") {
|
|
344
|
+
return new SQLiteTaskStore(dbPath);
|
|
345
|
+
}
|
|
346
|
+
logger2.warn(`[TaskComponent] Unknown task.storage.type="${String(storageType)}", ` + `falling back to default SQLite storage. Supported: "sqlite" | "remote".`);
|
|
347
|
+
return new SQLiteTaskStore;
|
|
348
|
+
}
|
|
316
349
|
flattenConfig(obj, prefix = "task") {
|
|
317
350
|
const result = {};
|
|
318
351
|
for (const [key, value] of Object.entries(obj)) {
|
|
@@ -338,8 +371,10 @@ class TaskComponent extends BaseComponent {
|
|
|
338
371
|
oldValue: event.oldValue,
|
|
339
372
|
newValue: event.newValue
|
|
340
373
|
});
|
|
341
|
-
if (event.key === "task.storage.type" || event.key === "task.storage.dbPath") {
|
|
342
|
-
this.initStore()
|
|
374
|
+
if (event.key === "task.storage.type" || event.key === "task.storage.dbPath" || event.key === "task.storage.endpoint" || event.key === "task.storage.authToken") {
|
|
375
|
+
Promise.resolve(this.initStore()).catch((e) => {
|
|
376
|
+
logger2.error(`[TaskComponent] Failed to re-init store after ${event.key} change: ` + `${e instanceof Error ? e.message : String(e)} (keeping previous store)`);
|
|
377
|
+
});
|
|
343
378
|
}
|
|
344
379
|
}
|
|
345
380
|
configWatcher;
|