@ai-setting/roy-agent-core 1.5.70 → 1.5.71
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/index.js +4 -4
- package/dist/env/index.js +6 -6
- package/dist/env/llm/index.js +3 -3
- package/dist/env/session/index.js +4 -4
- package/dist/env/session/storage/index.js +6 -3
- package/dist/env/workflow/engine/index.js +1 -1
- package/dist/env/workflow/index.js +2 -2
- package/dist/index.js +9 -9
- package/dist/shared/@ai-setting/{roy-agent-core-wnmtdnd7.js → roy-agent-core-b18mgzpc.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8e1cac6w.js → roy-agent-core-dqf8t38a.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-33855dsc.js → roy-agent-core-jweqxgyb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ke7wmra6.js → roy-agent-core-kdmwhshb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-1yaa58cp.js → roy-agent-core-r7zphnam.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-4hctvbr8.js → roy-agent-core-rcd7ek6n.js} +3 -3
- package/dist/shared/@ai-setting/roy-agent-core-rjp2cqsn.js +36 -0
- package/dist/shared/@ai-setting/{roy-agent-core-1r86pags.js → roy-agent-core-tktkp52c.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-56xsjjyw.js → roy-agent-core-yn229bhx.js} +37 -5
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-fp6f15av.js +0 -23
package/dist/env/agent/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComponent,
|
|
3
3
|
AgentComponentConfigSchema
|
|
4
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
5
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "../../shared/@ai-setting/roy-agent-core-rcd7ek6n.js";
|
|
5
|
+
import"../../shared/@ai-setting/roy-agent-core-kdmwhshb.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
7
7
|
import"../../shared/@ai-setting/roy-agent-core-nx3c3ce2.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
@@ -10,8 +10,8 @@ import"../../shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
|
10
10
|
import {
|
|
11
11
|
SummaryAgent
|
|
12
12
|
} from "../../shared/@ai-setting/roy-agent-core-x3gtyqax.js";
|
|
13
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
14
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
13
|
+
import"../../shared/@ai-setting/roy-agent-core-tktkp52c.js";
|
|
14
|
+
import"../../shared/@ai-setting/roy-agent-core-rjp2cqsn.js";
|
|
15
15
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
16
16
|
import"../../shared/@ai-setting/roy-agent-core-rgckng3p.js";
|
|
17
17
|
import"../../shared/@ai-setting/roy-agent-core-b8r4tfqq.js";
|
package/dist/env/index.js
CHANGED
|
@@ -21,9 +21,9 @@ import"../shared/@ai-setting/roy-agent-core-xp8xrxgc.js";
|
|
|
21
21
|
import"../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
22
22
|
import {
|
|
23
23
|
WorkflowComponent
|
|
24
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
24
|
+
} from "../shared/@ai-setting/roy-agent-core-r7zphnam.js";
|
|
25
25
|
import"../shared/@ai-setting/roy-agent-core-fjexv5nm.js";
|
|
26
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
26
|
+
import"../shared/@ai-setting/roy-agent-core-yn229bhx.js";
|
|
27
27
|
import"../shared/@ai-setting/roy-agent-core-zgtmazxg.js";
|
|
28
28
|
import"../shared/@ai-setting/roy-agent-core-6d5v531t.js";
|
|
29
29
|
import"../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
@@ -39,8 +39,8 @@ import"../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
39
39
|
import {
|
|
40
40
|
AgentComponent,
|
|
41
41
|
AgentComponentConfigSchema
|
|
42
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
43
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
42
|
+
} from "../shared/@ai-setting/roy-agent-core-rcd7ek6n.js";
|
|
43
|
+
import"../shared/@ai-setting/roy-agent-core-kdmwhshb.js";
|
|
44
44
|
import"../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
45
45
|
import {
|
|
46
46
|
TaskComponent
|
|
@@ -64,8 +64,8 @@ import"../shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
|
64
64
|
import"../shared/@ai-setting/roy-agent-core-fnv3ev18.js";
|
|
65
65
|
import"../shared/@ai-setting/roy-agent-core-djtkntar.js";
|
|
66
66
|
import"../shared/@ai-setting/roy-agent-core-x3gtyqax.js";
|
|
67
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
68
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
67
|
+
import"../shared/@ai-setting/roy-agent-core-tktkp52c.js";
|
|
68
|
+
import"../shared/@ai-setting/roy-agent-core-rjp2cqsn.js";
|
|
69
69
|
import"../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
70
70
|
import {
|
|
71
71
|
BaseComponent
|
package/dist/env/llm/index.js
CHANGED
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
ProviderCapabilitiesSchema,
|
|
9
9
|
ProviderConfigSchema,
|
|
10
10
|
ProviderManager
|
|
11
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
} from "../../shared/@ai-setting/roy-agent-core-dqf8t38a.js";
|
|
12
12
|
import {
|
|
13
13
|
createInvokeConfig,
|
|
14
14
|
invoke,
|
|
15
15
|
invokeNonStream,
|
|
16
16
|
parseModelString
|
|
17
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
17
|
+
} from "../../shared/@ai-setting/roy-agent-core-kdmwhshb.js";
|
|
18
18
|
import"../../shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
19
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
19
|
+
import"../../shared/@ai-setting/roy-agent-core-rjp2cqsn.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
21
21
|
import"../../shared/@ai-setting/roy-agent-core-rgckng3p.js";
|
|
22
22
|
import"../../shared/@ai-setting/roy-agent-core-b8r4tfqq.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-b18mgzpc.js";
|
|
4
4
|
import"../../shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
5
5
|
import {
|
|
6
6
|
MemorySessionStore
|
|
7
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
7
|
+
} from "../../shared/@ai-setting/roy-agent-core-jweqxgyb.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-x3gtyqax.js";
|
|
9
9
|
import {
|
|
10
10
|
SessionMessageConverter
|
|
11
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
12
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
} from "../../shared/@ai-setting/roy-agent-core-tktkp52c.js";
|
|
12
|
+
import"../../shared/@ai-setting/roy-agent-core-rjp2cqsn.js";
|
|
13
13
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
14
14
|
import"../../shared/@ai-setting/roy-agent-core-rgckng3p.js";
|
|
15
15
|
import"../../shared/@ai-setting/roy-agent-core-b8r4tfqq.js";
|
|
@@ -3,9 +3,12 @@ import {
|
|
|
3
3
|
SQLiteSessionStore,
|
|
4
4
|
getDefaultDataDir,
|
|
5
5
|
getDefaultSessionDbPath
|
|
6
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
7
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../../shared/@ai-setting/roy-agent-core-jweqxgyb.js";
|
|
7
|
+
import"../../../shared/@ai-setting/roy-agent-core-tktkp52c.js";
|
|
8
|
+
import"../../../shared/@ai-setting/roy-agent-core-rjp2cqsn.js";
|
|
9
|
+
import"../../../shared/@ai-setting/roy-agent-core-shme7set.js";
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-7z9b1fm8.js";
|
|
11
|
+
import"../../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
9
12
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
10
13
|
export {
|
|
11
14
|
getDefaultSessionDbPath,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
Scheduler,
|
|
7
7
|
WorkflowEngine,
|
|
8
8
|
init_engine
|
|
9
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
9
|
+
} from "../../../shared/@ai-setting/roy-agent-core-yn229bhx.js";
|
|
10
10
|
import"../../../shared/@ai-setting/roy-agent-core-zgtmazxg.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-6d5v531t.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-r7zphnam.js";
|
|
4
4
|
import"../../shared/@ai-setting/roy-agent-core-fjexv5nm.js";
|
|
5
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
5
|
+
import"../../shared/@ai-setting/roy-agent-core-yn229bhx.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-zgtmazxg.js";
|
|
7
7
|
import"../../shared/@ai-setting/roy-agent-core-6d5v531t.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
ModelLimitsSchema,
|
|
12
12
|
ProviderCapabilitiesSchema,
|
|
13
13
|
ProviderConfigSchema
|
|
14
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
14
|
+
} from "./shared/@ai-setting/roy-agent-core-dqf8t38a.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigComponent
|
|
17
17
|
} from "./shared/@ai-setting/roy-agent-core-prdngx28.js";
|
|
@@ -89,12 +89,12 @@ import {
|
|
|
89
89
|
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
90
90
|
import {
|
|
91
91
|
WorkflowComponent
|
|
92
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
92
|
+
} from "./shared/@ai-setting/roy-agent-core-r7zphnam.js";
|
|
93
93
|
import {
|
|
94
94
|
init_node_registry_helper,
|
|
95
95
|
registerDecoratorNodeType
|
|
96
96
|
} from "./shared/@ai-setting/roy-agent-core-fjexv5nm.js";
|
|
97
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
97
|
+
import"./shared/@ai-setting/roy-agent-core-yn229bhx.js";
|
|
98
98
|
import"./shared/@ai-setting/roy-agent-core-zgtmazxg.js";
|
|
99
99
|
import"./shared/@ai-setting/roy-agent-core-6d5v531t.js";
|
|
100
100
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
@@ -116,13 +116,13 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
116
116
|
import {
|
|
117
117
|
AgentComponent,
|
|
118
118
|
AgentComponentConfigSchema
|
|
119
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
119
|
+
} from "./shared/@ai-setting/roy-agent-core-rcd7ek6n.js";
|
|
120
120
|
import {
|
|
121
121
|
createInvokeConfig,
|
|
122
122
|
invoke,
|
|
123
123
|
invokeNonStream,
|
|
124
124
|
parseModelString
|
|
125
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
125
|
+
} from "./shared/@ai-setting/roy-agent-core-kdmwhshb.js";
|
|
126
126
|
import {
|
|
127
127
|
AskUserError,
|
|
128
128
|
init_workflow_hil
|
|
@@ -171,14 +171,14 @@ import"./shared/@ai-setting/roy-agent-core-fnv3ev18.js";
|
|
|
171
171
|
import"./shared/@ai-setting/roy-agent-core-djtkntar.js";
|
|
172
172
|
import {
|
|
173
173
|
SessionComponent
|
|
174
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
174
|
+
} from "./shared/@ai-setting/roy-agent-core-b18mgzpc.js";
|
|
175
175
|
import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
176
176
|
import {
|
|
177
177
|
MemorySessionStore
|
|
178
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
178
|
+
} from "./shared/@ai-setting/roy-agent-core-jweqxgyb.js";
|
|
179
179
|
import"./shared/@ai-setting/roy-agent-core-x3gtyqax.js";
|
|
180
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
181
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
180
|
+
import"./shared/@ai-setting/roy-agent-core-tktkp52c.js";
|
|
181
|
+
import"./shared/@ai-setting/roy-agent-core-rjp2cqsn.js";
|
|
182
182
|
import"./shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
183
183
|
import {
|
|
184
184
|
BaseComponent
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withTimeout
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-kdmwhshb.js";
|
|
4
4
|
import {
|
|
5
5
|
AskUserError,
|
|
6
6
|
init_workflow_hil
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
} from "./roy-agent-core-ctdhjv68.js";
|
|
14
14
|
import {
|
|
15
15
|
SessionMessageConverter
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-tktkp52c.js";
|
|
17
17
|
import {
|
|
18
18
|
safeParseToolArgs
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-rjp2cqsn.js";
|
|
20
20
|
import {
|
|
21
21
|
envKeyToConfigKey
|
|
22
22
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createLogger,
|
|
3
|
+
init_logger
|
|
4
|
+
} from "./roy-agent-core-shme7set.js";
|
|
5
|
+
|
|
6
|
+
// src/env/llm/tool-args-parser.ts
|
|
7
|
+
init_logger();
|
|
8
|
+
var logger = createLogger("llm:tool-args-parser");
|
|
9
|
+
var MAX_SAFE_DEPTH = 5;
|
|
10
|
+
function safeParseToolArgs(args, depth = 0) {
|
|
11
|
+
if (depth >= MAX_SAFE_DEPTH) {
|
|
12
|
+
logger.warn(`[safeParseToolArgs] Max recursion depth (${MAX_SAFE_DEPTH}) exceeded at depth ${depth}. ` + "Input may be malicious or abnormally deeply nested. Returning empty object.", { depth, argsType: typeof args });
|
|
13
|
+
return {};
|
|
14
|
+
}
|
|
15
|
+
if (typeof args === "object" && args !== null) {
|
|
16
|
+
return args;
|
|
17
|
+
}
|
|
18
|
+
if (typeof args === "string") {
|
|
19
|
+
try {
|
|
20
|
+
const parsed = JSON.parse(args);
|
|
21
|
+
if (typeof parsed === "string") {
|
|
22
|
+
logger.debug(`[safeParseToolArgs] Detected double/multi-stringified JSON at depth ${depth}. ` + "LLM may be double-stringifying tool arguments. Parsing recursively.", { depth, parsedLength: parsed.length });
|
|
23
|
+
return safeParseToolArgs(parsed, depth + 1);
|
|
24
|
+
}
|
|
25
|
+
if (typeof parsed === "object" && parsed !== null) {
|
|
26
|
+
return parsed;
|
|
27
|
+
}
|
|
28
|
+
return { value: parsed };
|
|
29
|
+
} catch {
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { safeParseToolArgs };
|
|
@@ -210,8 +210,40 @@ class DAGManager {
|
|
|
210
210
|
const deps = node.depends_on || [];
|
|
211
211
|
dependencies.set(node.id, [...deps]);
|
|
212
212
|
}
|
|
213
|
+
if (this.workflow.edges) {
|
|
214
|
+
for (const edge of this.workflow.edges) {
|
|
215
|
+
const targetDeps = dependencies.get(edge.to);
|
|
216
|
+
if (!targetDeps)
|
|
217
|
+
continue;
|
|
218
|
+
if (targetDeps.includes(edge.from))
|
|
219
|
+
continue;
|
|
220
|
+
if (!this.isReachable(edge.from, edge.to, dependencies)) {
|
|
221
|
+
targetDeps.push(edge.from);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
213
225
|
return dependencies;
|
|
214
226
|
}
|
|
227
|
+
isReachable(source, target, dependencies) {
|
|
228
|
+
if (source === target)
|
|
229
|
+
return true;
|
|
230
|
+
const visited = new Set;
|
|
231
|
+
const queue = [source];
|
|
232
|
+
while (queue.length > 0) {
|
|
233
|
+
const current = queue.shift();
|
|
234
|
+
if (current === target)
|
|
235
|
+
return true;
|
|
236
|
+
if (visited.has(current))
|
|
237
|
+
continue;
|
|
238
|
+
visited.add(current);
|
|
239
|
+
const deps = dependencies.get(current) || [];
|
|
240
|
+
for (const dep of deps) {
|
|
241
|
+
if (!visited.has(dep))
|
|
242
|
+
queue.push(dep);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
215
247
|
buildDependentsMap(dependencies) {
|
|
216
248
|
const dependentsMap = new Map;
|
|
217
249
|
for (const nodeId of dependencies.keys()) {
|
|
@@ -368,12 +400,12 @@ class DAGManager {
|
|
|
368
400
|
return ready;
|
|
369
401
|
}
|
|
370
402
|
areDependenciesMet(nodeId, completedNodes) {
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
|
|
403
|
+
const analysis = this.analyze();
|
|
404
|
+
const deps = analysis.dependencies.get(nodeId);
|
|
405
|
+
if (!deps) {
|
|
406
|
+
return true;
|
|
374
407
|
}
|
|
375
|
-
const
|
|
376
|
-
for (const dep of dependencies) {
|
|
408
|
+
for (const dep of deps) {
|
|
377
409
|
if (!completedNodes.has(dep)) {
|
|
378
410
|
return false;
|
|
379
411
|
}
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// src/env/llm/tool-args-parser.ts
|
|
2
|
-
function safeParseToolArgs(args) {
|
|
3
|
-
if (typeof args === "object" && args !== null) {
|
|
4
|
-
return args;
|
|
5
|
-
}
|
|
6
|
-
if (typeof args === "string") {
|
|
7
|
-
try {
|
|
8
|
-
const parsed = JSON.parse(args);
|
|
9
|
-
if (typeof parsed === "string") {
|
|
10
|
-
return safeParseToolArgs(parsed);
|
|
11
|
-
}
|
|
12
|
-
if (typeof parsed === "object" && parsed !== null) {
|
|
13
|
-
return parsed;
|
|
14
|
-
}
|
|
15
|
-
return { value: parsed };
|
|
16
|
-
} catch {
|
|
17
|
-
return {};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return {};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { safeParseToolArgs };
|