@ai-setting/roy-agent-core 1.7.62 → 1.7.64
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 +9 -9
- package/dist/env/agent/agent-component.d.ts +33 -0
- package/dist/env/agent/agent-component.js +16 -15
- package/dist/env/agent/index.js +16 -15
- package/dist/env/agent/types.d.ts +17 -0
- package/dist/env/commands/index.js +9 -9
- package/dist/env/context/index.js +5 -5
- package/dist/env/debug/index.js +9 -9
- package/dist/env/error-reply.d.ts +53 -1
- package/dist/env/error-reply.js +10 -3
- package/dist/env/event-source/bounty-im-handler.d.ts +1 -1
- package/dist/env/event-source/cli-command-handler.js +3 -3
- package/dist/env/event-source/event-source-handlers.js +22 -21
- package/dist/env/event-source/event-store.js +4 -4
- package/dist/env/event-source/index.js +23 -22
- package/dist/env/hook/index.js +7 -7
- package/dist/env/index.js +49 -48
- package/dist/env/llm/adapter-pi-ai.d.ts +47 -0
- package/dist/env/llm/index.js +11 -10
- package/dist/env/llm/model-fallback.d.ts +54 -0
- package/dist/env/llm/redact.d.ts +39 -0
- package/dist/env/llm/types.d.ts +13 -0
- package/dist/env/log-trace/index.js +9 -9
- package/dist/env/log-trace/logger.js +2 -2
- package/dist/env/mcp/index.js +10 -10
- package/dist/env/mcp/tool/index.js +3 -3
- package/dist/env/memory/index.js +10 -10
- package/dist/env/memory/plugin/index.js +3 -3
- package/dist/env/plugin/index.js +9 -9
- package/dist/env/prompt/index.js +9 -9
- package/dist/env/session/index.js +13 -12
- package/dist/env/session/storage/index.js +7 -6
- package/dist/env/skill/index.js +9 -9
- package/dist/env/task/delegate/delegate-tool.d.ts +27 -1
- package/dist/env/task/delegate/delegate-tool.js +10 -10
- package/dist/env/task/delegate/index.js +10 -10
- package/dist/env/task/index.js +16 -16
- package/dist/env/task/mcp/index.js +5 -5
- package/dist/env/task/plugins/index.js +12 -12
- package/dist/env/task/plugins/lark-card-patch-notifier.js +4 -4
- package/dist/env/task/storage/index.js +5 -5
- package/dist/env/task/tools/index.js +5 -5
- package/dist/env/tool/built-in/index.js +5 -5
- package/dist/env/tool/index.js +12 -12
- package/dist/env/tool/types.d.ts +13 -0
- package/dist/env/workflow/engine/index.js +14 -14
- package/dist/env/workflow/hooks/index.js +9 -9
- package/dist/env/workflow/index.js +25 -24
- package/dist/env/workflow/nodes/index.js +4 -4
- package/dist/env/workflow/plugins/index.js +10 -10
- package/dist/env/workflow/service/index.js +4 -4
- package/dist/env/workflow/storage/index.js +5 -5
- package/dist/env/workflow/tools/index.js +17 -16
- package/dist/env/workflow/utils/index.js +6 -6
- package/dist/index.js +60 -59
- package/dist/shared/@ai-setting/{roy-agent-core-sj4y3wdm.js → roy-agent-core-002g6nfk.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-06jakebr.js → roy-agent-core-07fvy74y.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-fr296a53.js → roy-agent-core-0cb6w0k7.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-cxpgd415.js → roy-agent-core-0ys85x46.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-6wxww10t.js → roy-agent-core-12n08pg5.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-nmn853z0.js → roy-agent-core-1h5bbqcg.js} +11 -11
- package/dist/shared/@ai-setting/{roy-agent-core-h3fwjbhp.js → roy-agent-core-37tj4y6a.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-gjsvehfs.js → roy-agent-core-3wrveh5p.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-9qgrc9dy.js → roy-agent-core-40rv283c.js} +56 -16
- package/dist/shared/@ai-setting/{roy-agent-core-kvq4a4p6.js → roy-agent-core-5pr4zp88.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-qmqe8ds3.js → roy-agent-core-6j02sbee.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-hfyxv2kx.js → roy-agent-core-7cbpmk4q.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-6awgfh3x.js → roy-agent-core-7f7t9wwp.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-83bewqx8.js +10 -0
- package/dist/shared/@ai-setting/{roy-agent-core-jnszp0jq.js → roy-agent-core-85xyctnb.js} +7 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2pma868e.js → roy-agent-core-87942bw4.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-ja4sr63d.js → roy-agent-core-8cx7cfdg.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-th92f833.js → roy-agent-core-9bs6xrav.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-48h4zh60.js → roy-agent-core-9bshyqjn.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-9nvyffxg.js → roy-agent-core-add1zqsh.js} +118 -8
- package/dist/shared/@ai-setting/{roy-agent-core-7tce05jt.js → roy-agent-core-ax9e9szb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8xv4qzx7.js → roy-agent-core-br9cdm8d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zjgckbdd.js → roy-agent-core-c2gbt68e.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-v7mwj8eq.js → roy-agent-core-cpcd24n2.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-hczj1ryh.js → roy-agent-core-dc9zq75z.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-zy8vkbnk.js → roy-agent-core-dvtg4sn0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-cqpd41gf.js → roy-agent-core-e4hehcdr.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-hwkc0bg2.js → roy-agent-core-efkjyh69.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-dfqhc9ey.js → roy-agent-core-es203w7p.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-w2ev3z5q.js → roy-agent-core-es467wsz.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-p8rf4z89.js → roy-agent-core-f77k3gqt.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jw63js86.js → roy-agent-core-fttgm52a.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-32ck9rqt.js → roy-agent-core-g8htfwxj.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5mrynf9g.js → roy-agent-core-gxzxq1sf.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-fqandv0a.js → roy-agent-core-hjejpcg5.js} +29 -19
- package/dist/shared/@ai-setting/{roy-agent-core-2veqhrxa.js → roy-agent-core-hy3zn2q2.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-wzp4tbsn.js → roy-agent-core-jvv2h3d6.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-prnry2mw.js → roy-agent-core-jz8dsypm.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-x1d6edkh.js → roy-agent-core-kmbct9yg.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-gc6wcd7z.js → roy-agent-core-mcy5apay.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-p6a4v4fq.js → roy-agent-core-mds8tqd0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bpvz1dqr.js → roy-agent-core-mw2cen6s.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-a08dpf71.js → roy-agent-core-na18zwj0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-2hkyp51n.js → roy-agent-core-nm4xbs1d.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-ntn32q7j.js +72 -0
- package/dist/shared/@ai-setting/{roy-agent-core-79gyka2q.js → roy-agent-core-nwbfepba.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gtdtzbs7.js → roy-agent-core-pgvcf91v.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-084zthqx.js → roy-agent-core-q96qynhb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-386wa4wy.js → roy-agent-core-qq96p0tj.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-33hn1beg.js → roy-agent-core-qqaak24r.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vwzan9v0.js → roy-agent-core-r5wt1h3c.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-vvb4cyyy.js → roy-agent-core-rjzdj0xb.js} +11 -6
- package/dist/shared/@ai-setting/{roy-agent-core-ye4bfzqg.js → roy-agent-core-ry2eztft.js} +11 -11
- package/dist/shared/@ai-setting/{roy-agent-core-c57278kx.js → roy-agent-core-sjr1kmfz.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-anb53t3v.js → roy-agent-core-tm1mxttk.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-p37kh0kt.js → roy-agent-core-v0hf14bj.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-c4t4y18j.js → roy-agent-core-v6vr6za7.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-w2h6xt6k.js → roy-agent-core-vd9zak15.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-gz2jnaan.js → roy-agent-core-vncwfzw5.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-c8xvy6hj.js → roy-agent-core-w07ymg29.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-mbwaxqs0.js → roy-agent-core-xcp8vwax.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-5bj0xfjk.js → roy-agent-core-xhrrgfdy.js} +324 -43
- package/dist/shared/@ai-setting/{roy-agent-core-mkpsz128.js → roy-agent-core-xvt7kf7p.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-as0dd70m.js → roy-agent-core-xw4wsj38.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-kmvw6b4v.js → roy-agent-core-yr1mryb8.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-m3w3ytxt.js → roy-agent-core-zk2jg0v7.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-mrrv80jy.js → roy-agent-core-zxz5fkwj.js} +1 -1
- package/dist/utils/temp-file-manager/index.js +3 -3
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-a6cz4d23.js +0 -10
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
AgentComponentAdapter,
|
|
9
9
|
init_agent_component_adapter
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-002g6nfk.js";
|
|
11
11
|
import {
|
|
12
12
|
PythonCallNode,
|
|
13
13
|
SkillNode,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
init_skill_node,
|
|
18
18
|
init_tool_node,
|
|
19
19
|
init_workflow_node
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-efkjyh69.js";
|
|
21
21
|
import {
|
|
22
22
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
23
23
|
init_json_schema_to_zod,
|
|
@@ -28,20 +28,20 @@ import {
|
|
|
28
28
|
} from "./roy-agent-core-1db4vpc6.js";
|
|
29
29
|
import {
|
|
30
30
|
init_hooks
|
|
31
|
-
} from "./roy-agent-core-
|
|
31
|
+
} from "./roy-agent-core-dvtg4sn0.js";
|
|
32
32
|
import {
|
|
33
33
|
WorkflowHookPoints,
|
|
34
34
|
emitWorkflowNodeHook,
|
|
35
35
|
emitWorkflowRunHook
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-c2gbt68e.js";
|
|
37
37
|
import {
|
|
38
38
|
TemplateResolver,
|
|
39
39
|
init_template_resolver
|
|
40
|
-
} from "./roy-agent-core-
|
|
40
|
+
} from "./roy-agent-core-sjr1kmfz.js";
|
|
41
41
|
import {
|
|
42
42
|
DAGManager,
|
|
43
43
|
init_dag_manager
|
|
44
|
-
} from "./roy-agent-core-
|
|
44
|
+
} from "./roy-agent-core-mds8tqd0.js";
|
|
45
45
|
import {
|
|
46
46
|
WorkflowError,
|
|
47
47
|
createWorkflowEvent,
|
|
@@ -57,11 +57,11 @@ import {
|
|
|
57
57
|
import {
|
|
58
58
|
TracedAs,
|
|
59
59
|
init_decorator
|
|
60
|
-
} from "./roy-agent-core-
|
|
60
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
61
61
|
import {
|
|
62
62
|
createLogger,
|
|
63
63
|
init_logger
|
|
64
|
-
} from "./roy-agent-core-
|
|
64
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
65
65
|
import {
|
|
66
66
|
__esm,
|
|
67
67
|
__export,
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// src/env/llm/redact.ts
|
|
2
|
+
function redactSecrets(text, knownSecrets = []) {
|
|
3
|
+
let out = text;
|
|
4
|
+
for (const secret of knownSecrets) {
|
|
5
|
+
if (secret && secret.length >= 8) {
|
|
6
|
+
out = out.split(secret).join("<redacted>");
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
out = out.replace(/\boc_sk_[A-Za-z0-9_-]{8,}\b/g, "<redacted>");
|
|
10
|
+
out = out.replace(/\bsk-(?:proj-)?[A-Za-z0-9_-]{16,}\b/g, "<redacted>");
|
|
11
|
+
out = out.replace(/\bBearer\s+[A-Za-z0-9._\-+/=]{12,}\b/g, "<redacted>");
|
|
12
|
+
return out;
|
|
13
|
+
}
|
|
14
|
+
var CREDENTIAL_BEARING_KEYS = new Set([
|
|
15
|
+
"url",
|
|
16
|
+
"requestBodyValues",
|
|
17
|
+
"requestBody",
|
|
18
|
+
"responseBody",
|
|
19
|
+
"responseHeaders",
|
|
20
|
+
"headers"
|
|
21
|
+
]);
|
|
22
|
+
function redactDeep(value, knownSecrets, depth = 0) {
|
|
23
|
+
if (depth > 4)
|
|
24
|
+
return value;
|
|
25
|
+
if (typeof value === "string")
|
|
26
|
+
return redactSecrets(value, knownSecrets);
|
|
27
|
+
if (Array.isArray(value))
|
|
28
|
+
return value.map((v) => redactDeep(v, knownSecrets, depth + 1));
|
|
29
|
+
if (value && typeof value === "object") {
|
|
30
|
+
const out = {};
|
|
31
|
+
for (const [k, v] of Object.entries(value)) {
|
|
32
|
+
out[k] = redactDeep(v, knownSecrets, depth + 1);
|
|
33
|
+
}
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
function redactErrorForTransport(error, knownSecrets = [], depth = 0) {
|
|
39
|
+
if (depth > 6)
|
|
40
|
+
return;
|
|
41
|
+
if (!error || typeof error !== "object") {
|
|
42
|
+
return typeof error === "string" ? redactSecrets(error, knownSecrets) : error;
|
|
43
|
+
}
|
|
44
|
+
const src = error;
|
|
45
|
+
const out = {};
|
|
46
|
+
for (const key of Object.getOwnPropertyNames(src)) {
|
|
47
|
+
const desc = Object.getOwnPropertyDescriptor(src, key);
|
|
48
|
+
if (!desc || !("value" in desc))
|
|
49
|
+
continue;
|
|
50
|
+
const value = src[key];
|
|
51
|
+
if (typeof value === "string") {
|
|
52
|
+
out[key] = redactSecrets(value, knownSecrets);
|
|
53
|
+
} else if (key === "cause" || key === "lastError") {
|
|
54
|
+
out[key] = redactErrorForTransport(value, knownSecrets, depth + 1);
|
|
55
|
+
} else if (key === "errors" && Array.isArray(value)) {
|
|
56
|
+
out[key] = value.map((inner) => redactErrorForTransport(inner, knownSecrets, depth + 1));
|
|
57
|
+
} else if (CREDENTIAL_BEARING_KEYS.has(key)) {
|
|
58
|
+
out[key] = redactDeep(value, knownSecrets);
|
|
59
|
+
} else {
|
|
60
|
+
out[key] = value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
for (const key of ["name", "message", "stack"]) {
|
|
64
|
+
const value = src[key];
|
|
65
|
+
if (typeof value === "string" && !(key in out)) {
|
|
66
|
+
out[key] = redactSecrets(value, knownSecrets);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { redactSecrets, redactErrorForTransport };
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
7
7
|
import {
|
|
8
8
|
BaseComponent
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
10
10
|
import {
|
|
11
11
|
createLogger,
|
|
12
12
|
init_logger
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
14
14
|
|
|
15
15
|
// src/env/memory/types.ts
|
|
16
16
|
import { z } from "zod";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createHook,
|
|
3
3
|
init_hook
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-ax9e9szb.js";
|
|
5
5
|
import {
|
|
6
6
|
HookManager
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-cpcd24n2.js";
|
|
8
8
|
|
|
9
9
|
// src/env/component.ts
|
|
10
10
|
init_hook();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TagRepository
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-mcy5apay.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_search_query_parser,
|
|
6
6
|
init_search_query_parser
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
12
12
|
import {
|
|
13
13
|
__require,
|
|
14
14
|
__toCommonJS
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
PiAiAdapter,
|
|
7
7
|
invoke,
|
|
8
8
|
invokeNonStream
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-40rv283c.js";
|
|
10
10
|
import {
|
|
11
11
|
ContextError,
|
|
12
12
|
ErrorCodes
|
|
@@ -17,12 +17,12 @@ import {
|
|
|
17
17
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
18
18
|
import {
|
|
19
19
|
BaseComponent
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
21
21
|
import {
|
|
22
22
|
LLMHookPoints,
|
|
23
23
|
globalHookManager,
|
|
24
24
|
init_global_hook_manager
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-cpcd24n2.js";
|
|
26
26
|
import {
|
|
27
27
|
TracedAs,
|
|
28
28
|
embedParamFilter,
|
|
@@ -32,11 +32,11 @@ import {
|
|
|
32
32
|
llmInvokeParamFilter,
|
|
33
33
|
llmInvokeResultFilter,
|
|
34
34
|
wrapFunction
|
|
35
|
-
} from "./roy-agent-core-
|
|
35
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
36
36
|
import {
|
|
37
37
|
createLogger,
|
|
38
38
|
init_logger
|
|
39
|
-
} from "./roy-agent-core-
|
|
39
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
40
40
|
import {
|
|
41
41
|
__legacyDecorateClassTS,
|
|
42
42
|
__require
|
|
@@ -720,6 +720,8 @@ class LLMComponent extends BaseComponent {
|
|
|
720
720
|
const llmKeys = [
|
|
721
721
|
"llm.defaultModel",
|
|
722
722
|
"llm.defaultProvider",
|
|
723
|
+
"llm.fallbackModel",
|
|
724
|
+
"llm.fallbackProvider",
|
|
723
725
|
"llm.temperature",
|
|
724
726
|
"llm.maxTokens",
|
|
725
727
|
"llm.topP",
|
|
@@ -789,12 +791,15 @@ class LLMComponent extends BaseComponent {
|
|
|
789
791
|
const knownKeys = new Set([
|
|
790
792
|
"llm.defaultModel",
|
|
791
793
|
"llm.defaultProvider",
|
|
794
|
+
"llm.fallbackModel",
|
|
795
|
+
"llm.fallbackProvider",
|
|
792
796
|
"llm.temperature",
|
|
793
797
|
"llm.maxTokens",
|
|
794
798
|
"llm.topP",
|
|
795
799
|
"llm.stream",
|
|
796
800
|
"llm.options",
|
|
797
801
|
"llm.default",
|
|
802
|
+
"llm.fallback",
|
|
798
803
|
"llm.providers",
|
|
799
804
|
"llm.limits",
|
|
800
805
|
"llm.capabilities"
|
|
@@ -1015,7 +1020,7 @@ class LLMComponent extends BaseComponent {
|
|
|
1015
1020
|
cacheRetention: chatReq.cacheRetention
|
|
1016
1021
|
}, { abort: ctx.abortSignal });
|
|
1017
1022
|
if (result.isError) {
|
|
1018
|
-
throw new Error(result.result);
|
|
1023
|
+
throw result.originalError ? new Error(result.result, { cause: result.originalError }) : new Error(result.result);
|
|
1019
1024
|
}
|
|
1020
1025
|
try {
|
|
1021
1026
|
const parsed = JSON.parse(result.result);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSharedEventStore
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-na18zwj0.js";
|
|
4
4
|
import {
|
|
5
5
|
createCompatibleDatabase,
|
|
6
6
|
init_sqlite_task_store
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-9bs6xrav.js";
|
|
8
8
|
import {
|
|
9
9
|
TaskHookPoints
|
|
10
10
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
@@ -14,31 +14,31 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
LarkCardPatchNotifier,
|
|
16
16
|
humanizeValue
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-zk2jg0v7.js";
|
|
18
18
|
import {
|
|
19
19
|
validateWorkflowDefinition
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-yr1mryb8.js";
|
|
21
21
|
import {
|
|
22
22
|
enqueueToAddFakeUserMessage
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-f77k3gqt.js";
|
|
24
24
|
import {
|
|
25
25
|
BasePlugin
|
|
26
26
|
} from "./roy-agent-core-az13yzmc.js";
|
|
27
27
|
import {
|
|
28
28
|
init_context
|
|
29
|
-
} from "./roy-agent-core-
|
|
29
|
+
} from "./roy-agent-core-qqaak24r.js";
|
|
30
30
|
import {
|
|
31
31
|
getEnvContextOrEmpty
|
|
32
|
-
} from "./roy-agent-core-
|
|
32
|
+
} from "./roy-agent-core-7cbpmk4q.js";
|
|
33
33
|
import {
|
|
34
34
|
TracedAs,
|
|
35
35
|
init_decorator,
|
|
36
36
|
wrapFunction
|
|
37
|
-
} from "./roy-agent-core-
|
|
37
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
38
38
|
import {
|
|
39
39
|
createLogger,
|
|
40
40
|
init_logger
|
|
41
|
-
} from "./roy-agent-core-
|
|
41
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
42
42
|
import {
|
|
43
43
|
__legacyDecorateClassTS,
|
|
44
44
|
__require
|
|
@@ -303,11 +303,11 @@ ${prompt}`;
|
|
|
303
303
|
}
|
|
304
304
|
if (!this._workflowRepo) {
|
|
305
305
|
try {
|
|
306
|
-
const sqlite = await import("./roy-agent-core-
|
|
306
|
+
const sqlite = await import("./roy-agent-core-dc9zq75z.js");
|
|
307
307
|
this.ensureDataDir();
|
|
308
308
|
const db = sqlite.getDatabase();
|
|
309
309
|
sqlite.initializeTables();
|
|
310
|
-
const { WorkflowRepository } = await import("./roy-agent-core-
|
|
310
|
+
const { WorkflowRepository } = await import("./roy-agent-core-xvt7kf7p.js");
|
|
311
311
|
this._workflowRepo = new WorkflowRepository(db);
|
|
312
312
|
return this._workflowRepo;
|
|
313
313
|
} catch {
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseComponent
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
7
7
|
import {
|
|
8
8
|
init_decorator,
|
|
9
9
|
init_trace_filters
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
11
11
|
import {
|
|
12
12
|
createLogger,
|
|
13
13
|
getTracerProvider,
|
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
propagation,
|
|
19
19
|
setConfigComponent,
|
|
20
20
|
setQuietMode
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
22
22
|
import {
|
|
23
23
|
SQLiteSpanStorage,
|
|
24
24
|
init_span_storage
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-85xyctnb.js";
|
|
26
26
|
import {
|
|
27
27
|
__require
|
|
28
28
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
} from "./roy-agent-core-az13yzmc.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseComponent
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
7
7
|
import {
|
|
8
8
|
globalHookManager,
|
|
9
9
|
init_global_hook_manager
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-cpcd24n2.js";
|
|
11
11
|
import {
|
|
12
12
|
init_context
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-qqaak24r.js";
|
|
14
14
|
import {
|
|
15
15
|
getEnvContextOrEmpty
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-7cbpmk4q.js";
|
|
17
17
|
import {
|
|
18
18
|
createLogger,
|
|
19
19
|
init_logger
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
21
21
|
import {
|
|
22
22
|
__require
|
|
23
23
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
builtInHandlers
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-1h5bbqcg.js";
|
|
4
4
|
import {
|
|
5
5
|
envKeyToConfigKey
|
|
6
6
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
7
7
|
import {
|
|
8
8
|
BaseComponent
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
10
10
|
import {
|
|
11
11
|
TracedAs,
|
|
12
12
|
init_decorator
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
14
14
|
import {
|
|
15
15
|
createLogger,
|
|
16
16
|
init_logger
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
18
18
|
import {
|
|
19
19
|
__legacyDecorateClassTS,
|
|
20
20
|
__require
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAutoTaskPlugin
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-ry2eztft.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-pgvcf91v.js";
|
|
11
11
|
import {
|
|
12
12
|
init_hook
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-ax9e9szb.js";
|
|
14
14
|
import {
|
|
15
15
|
init_context
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-qqaak24r.js";
|
|
17
17
|
import {
|
|
18
18
|
getEnvContext,
|
|
19
19
|
init_env_context,
|
|
20
20
|
runWithEnvContextAsync
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-7cbpmk4q.js";
|
|
22
22
|
import {
|
|
23
23
|
TracedAs,
|
|
24
24
|
envQueryParamFilter,
|
|
25
25
|
init_decorator,
|
|
26
26
|
init_trace_filters
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
28
28
|
import {
|
|
29
29
|
createLogger,
|
|
30
30
|
init_logger
|
|
31
|
-
} from "./roy-agent-core-
|
|
31
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
32
32
|
import {
|
|
33
33
|
__legacyDecorateClassTS
|
|
34
34
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -273,7 +273,7 @@ class BaseEnvironment extends BaseComponent {
|
|
|
273
273
|
const ctxError = new ContextError(result.error, ErrorCodes.CONTEXT_THRESHOLD_EXCEEDED, context?.sessionId, usage, contextWindow);
|
|
274
274
|
throw ctxError;
|
|
275
275
|
}
|
|
276
|
-
throw new Error(result.error);
|
|
276
|
+
throw new Error(result.error, result.originalError ? { cause: result.originalError } : undefined);
|
|
277
277
|
}
|
|
278
278
|
return result.finalText || "";
|
|
279
279
|
}
|
|
@@ -10,18 +10,18 @@ import {
|
|
|
10
10
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
11
11
|
import {
|
|
12
12
|
BaseComponent
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
14
14
|
import {
|
|
15
15
|
createHook
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-ax9e9szb.js";
|
|
17
17
|
import {
|
|
18
18
|
globalHookManager,
|
|
19
19
|
init_global_hook_manager
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-cpcd24n2.js";
|
|
21
21
|
import {
|
|
22
22
|
createLogger,
|
|
23
23
|
init_logger
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
25
25
|
|
|
26
26
|
// src/env/prompt/types.ts
|
|
27
27
|
import { z } from "zod";
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
hasDecoratorNodes,
|
|
4
4
|
init_node_registry_helper,
|
|
5
5
|
registerDecoratorNodeType
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-es203w7p.js";
|
|
7
7
|
import"./roy-agent-core-1ce3fqrk.js";
|
|
8
8
|
import"./roy-agent-core-ddwa0n6h.js";
|
|
9
|
-
import"./roy-agent-core-
|
|
10
|
-
import"./roy-agent-core-
|
|
11
|
-
import"./roy-agent-core-
|
|
9
|
+
import"./roy-agent-core-qq96p0tj.js";
|
|
10
|
+
import"./roy-agent-core-7f7t9wwp.js";
|
|
11
|
+
import"./roy-agent-core-85xyctnb.js";
|
|
12
12
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
13
13
|
init_node_registry_helper();
|
|
14
14
|
|