@ai-setting/roy-agent-core 1.7.46 → 1.7.48
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 +4 -4
- package/dist/env/agent/index.js +7 -7
- package/dist/env/commands/index.js +4 -4
- package/dist/env/debug/index.js +4 -4
- package/dist/env/event-source/index.js +8 -7
- package/dist/env/hook/index.js +2 -2
- package/dist/env/index.js +24 -23
- package/dist/env/llm/index.js +5 -5
- package/dist/env/log-trace/index.js +4 -4
- package/dist/env/mcp/index.js +4 -4
- package/dist/env/memory/index.js +4 -4
- package/dist/env/plugin/index.js +8 -6
- package/dist/env/prompt/index.js +4 -4
- package/dist/env/session/index.js +7 -7
- package/dist/env/session/storage/index.js +3 -3
- package/dist/env/skill/index.js +4 -4
- package/dist/env/task/delegate/index.js +2 -2
- package/dist/env/task/index.js +6 -6
- package/dist/env/task/plugins/index.js +2 -2
- package/dist/env/task/storage/index.js +1 -1
- package/dist/env/tool/index.js +4 -4
- package/dist/env/workflow/engine/index.js +3 -3
- package/dist/env/workflow/index.js +11 -11
- package/dist/env/workflow/tools/index.js +8 -8
- package/dist/index.js +31 -30
- package/dist/shared/@ai-setting/{roy-agent-core-cysnmvcy.js → roy-agent-core-0r90298w.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qfktfbrr.js → roy-agent-core-1rm32m5t.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-2f2nqx7g.js → roy-agent-core-3b2ceffs.js} +153 -60
- package/dist/shared/@ai-setting/{roy-agent-core-a236mps6.js → roy-agent-core-3j4by8rj.js} +35 -2
- package/dist/shared/@ai-setting/{roy-agent-core-wybj8emq.js → roy-agent-core-4m02hnqf.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jawzpf5k.js → roy-agent-core-4nnv0dze.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-cw89yj9d.js → roy-agent-core-54wzmvnb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jjw7xcxv.js → roy-agent-core-55hkeft7.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-rmn29nrh.js → roy-agent-core-64f22h1g.js} +1 -11
- package/dist/shared/@ai-setting/{roy-agent-core-12d4qzmw.js → roy-agent-core-7p5zf8ay.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-qhw8jp6j.js → roy-agent-core-83mk8wrn.js} +2 -2
- package/dist/shared/@ai-setting/roy-agent-core-ajtsk20z.js +2396 -0
- package/dist/shared/@ai-setting/{roy-agent-core-pc8x07p0.js → roy-agent-core-amp8qckb.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-az13yzmc.js +11 -0
- package/dist/shared/@ai-setting/{roy-agent-core-4w5vdzg8.js → roy-agent-core-bjrtwfta.js} +41 -6
- package/dist/shared/@ai-setting/{roy-agent-core-ts56bz5e.js → roy-agent-core-d94ddn0r.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-rczz7e81.js → roy-agent-core-dabnevwe.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9t675te0.js → roy-agent-core-ead21w5c.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-xv7k1p2j.js → roy-agent-core-gy1zfe0d.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-4eke3pd4.js → roy-agent-core-h93v6p6y.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-f18jk3cw.js → roy-agent-core-hxazjj4p.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-3h7ajma5.js → roy-agent-core-jfptxs4f.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-4m0t4y9w.js → roy-agent-core-nvcqp6p9.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jadrj0bz.js → roy-agent-core-p1p9mr8f.js} +13 -0
- package/dist/shared/@ai-setting/{roy-agent-core-ykrcrktp.js → roy-agent-core-pk1b3kvf.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-n1ceexfz.js → roy-agent-core-qvaqmj3f.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-6mnwqcqf.js → roy-agent-core-v5vs1jby.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9jmzyc8t.js → roy-agent-core-y1fp2mgf.js} +6 -31
- package/dist/shared/@ai-setting/{roy-agent-core-asxe1nt4.js → roy-agent-core-ygnva439.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-8xgk89y4.js → roy-agent-core-yjqj3taz.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-2ccy0zd2.js → roy-agent-core-zrgaemma.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-r4z6h3ch.js → roy-agent-core-zy3hqfwg.js} +197 -19
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-0zgcfcnq.js +0 -1720
|
@@ -42,9 +42,23 @@ class HookManager {
|
|
|
42
42
|
}
|
|
43
43
|
async execute(hookPoint, data, metadata = {}) {
|
|
44
44
|
const hooks = this._hooks.get(hookPoint);
|
|
45
|
-
|
|
45
|
+
const DEBUG_HOOK = process.env.ROY_HOOK_DEBUG === "1";
|
|
46
|
+
if (DEBUG_HOOK) {
|
|
47
|
+
console.error(`[DEBUG hook-manager.execute] hookPoint=${hookPoint}, hooksCount=${hooks?.length ?? 0}`);
|
|
48
|
+
}
|
|
49
|
+
if (!hooks || hooks.length === 0) {
|
|
50
|
+
if (DEBUG_HOOK)
|
|
51
|
+
console.error(`[DEBUG hook-manager.execute] → EARLY RETURN (no hooks registered for ${hookPoint})`);
|
|
46
52
|
return;
|
|
53
|
+
}
|
|
47
54
|
const envContext = getEnvContext();
|
|
55
|
+
if (DEBUG_HOOK) {
|
|
56
|
+
console.error(`[DEBUG hook-manager.execute] envContext=${envContext ? "present" : "absent"}`);
|
|
57
|
+
if (envContext) {
|
|
58
|
+
console.error(`[DEBUG hook-manager.execute] envContext.pluginEnabled=${JSON.stringify(envContext.pluginEnabled)}`);
|
|
59
|
+
console.error(`[DEBUG hook-manager.execute] envContext.sourceId=${envContext.sourceId}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
48
62
|
if (envContext) {
|
|
49
63
|
metadata.envContext = envContext;
|
|
50
64
|
if (!metadata.pluginEnabled && envContext.pluginEnabled) {
|
|
@@ -54,12 +68,31 @@ class HookManager {
|
|
|
54
68
|
const sortedHooks = this.sortHooks(hooks);
|
|
55
69
|
const ctx = this.createContext(hookPoint, data, metadata, "before");
|
|
56
70
|
const pluginEnabled = metadata.pluginEnabled || {};
|
|
71
|
+
if (DEBUG_HOOK) {
|
|
72
|
+
console.error(`[DEBUG hook-manager.execute] final pluginEnabled=${JSON.stringify(pluginEnabled)}`);
|
|
73
|
+
console.error(`[DEBUG hook-manager.execute] sortedHooks=${sortedHooks.length}:`);
|
|
74
|
+
for (const h of sortedHooks) {
|
|
75
|
+
console.error(`[DEBUG hook-manager.execute] - name=${h.name} pluginName=${h.pluginName} sourceId=${h.sourceId}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
57
78
|
for (const hook of sortedHooks) {
|
|
58
79
|
if (hook.pluginName && hook.sourceId) {
|
|
59
80
|
const key = `${hook.sourceId}:${hook.pluginName}`;
|
|
60
|
-
|
|
81
|
+
const enabled = pluginEnabled[key];
|
|
82
|
+
if (DEBUG_HOOK) {
|
|
83
|
+
console.error(`[DEBUG hook-manager.execute] hook ${hook.name} (${key}) enabled=${enabled}`);
|
|
84
|
+
}
|
|
85
|
+
if (enabled !== true) {
|
|
86
|
+
if (DEBUG_HOOK) {
|
|
87
|
+
console.error(`[DEBUG hook-manager.execute] → SKIPPED (pluginEnabled[${key}] !== true, got ${JSON.stringify(enabled)})`);
|
|
88
|
+
}
|
|
61
89
|
continue;
|
|
62
90
|
}
|
|
91
|
+
} else if (DEBUG_HOOK) {
|
|
92
|
+
console.error(`[DEBUG hook-manager.execute] hook ${hook.name} has no pluginName/sourceId, ALWAYS EXECUTED`);
|
|
93
|
+
}
|
|
94
|
+
if (DEBUG_HOOK) {
|
|
95
|
+
console.error(`[DEBUG hook-manager.execute] → EXECUTING hook ${hook.name}`);
|
|
63
96
|
}
|
|
64
97
|
await this.safeExecute(hook, ctx);
|
|
65
98
|
}
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
12
12
|
import {
|
|
13
13
|
BaseComponent
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-ead21w5c.js";
|
|
15
15
|
import {
|
|
16
16
|
ToolHookPoints,
|
|
17
17
|
globalHookManager,
|
|
18
18
|
init_global_hook_manager
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-3j4by8rj.js";
|
|
20
20
|
import {
|
|
21
21
|
getCurrentTaskId,
|
|
22
22
|
init_env_context
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
// src/env/plugin/types.ts
|
|
2
|
-
class BasePlugin {
|
|
3
|
-
version = "1.0.0";
|
|
4
|
-
description;
|
|
5
|
-
priority = 0;
|
|
6
|
-
constructor() {}
|
|
7
|
-
init(env) {}
|
|
8
|
-
dispose() {}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
1
|
// src/env/lark-mention-utils.ts
|
|
12
2
|
var SELF_CLOSING_AT_RE = /<at\s+user_id\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s>]+))\s*\/\s*>/g;
|
|
13
3
|
function normalizeLarkAtMentions(content, nameMap) {
|
|
@@ -31,4 +21,4 @@ function escapeXmlText(value) {
|
|
|
31
21
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
32
22
|
}
|
|
33
23
|
|
|
34
|
-
export {
|
|
24
|
+
export { normalizeLarkAtMentions };
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
createWorkflowSearchTool,
|
|
14
14
|
createWorkflowTagListTool,
|
|
15
15
|
createWorkflowValidateTool
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-zrgaemma.js";
|
|
17
17
|
import {
|
|
18
18
|
WorkflowService
|
|
19
19
|
} from "./roy-agent-core-8nv07zgr.js";
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
WorkflowEngine,
|
|
22
22
|
exports_engine,
|
|
23
23
|
init_engine
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-dabnevwe.js";
|
|
25
25
|
import {
|
|
26
26
|
BaseComponent
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-ead21w5c.js";
|
|
28
28
|
import {
|
|
29
29
|
createLogger,
|
|
30
30
|
init_logger
|
|
@@ -141,7 +141,7 @@ class WorkflowComponent extends BaseComponent {
|
|
|
141
141
|
if (!agentRunner && this._workflowEnv) {
|
|
142
142
|
const agentComponent = this._workflowEnv.getComponent("agent");
|
|
143
143
|
if (agentComponent) {
|
|
144
|
-
const { AgentComponentAdapter } = await import("./roy-agent-core-
|
|
144
|
+
const { AgentComponentAdapter } = await import("./roy-agent-core-ygnva439.js");
|
|
145
145
|
agentRunner = new AgentComponentAdapter(agentComponent, {}, this.sessionComponent);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAutoTaskPlugin
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-ajtsk20z.js";
|
|
4
4
|
import {
|
|
5
5
|
ContextError,
|
|
6
6
|
ErrorCodes
|
|
7
7
|
} from "./roy-agent-core-ctdhjv68.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseComponent
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-ead21w5c.js";
|
|
11
11
|
import {
|
|
12
12
|
init_context
|
|
13
13
|
} from "./roy-agent-core-wn59p0zw.js";
|