@ai-setting/roy-agent-core 1.7.53 → 1.7.56
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 +30 -0
- package/dist/env/agent/index.js +13 -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/environment.d.ts +7 -0
- package/dist/env/error-reply.d.ts +184 -0
- package/dist/env/event-source/event-source-handlers.d.ts +9 -23
- package/dist/env/event-source/index.js +17 -17
- package/dist/env/hook/index.js +5 -5
- package/dist/env/index.js +41 -40
- package/dist/env/llm/adapter-ai-sdk.d.ts +6 -0
- package/dist/env/llm/adapter-pi-ai.d.ts +152 -2
- package/dist/env/llm/adapter.d.ts +21 -1
- package/dist/env/llm/index.js +10 -10
- package/dist/env/llm/invoke.d.ts +74 -2
- package/dist/env/llm/llm.d.ts +38 -0
- package/dist/env/llm/outbound-defense.d.ts +140 -0
- package/dist/env/llm/reasoning-defense.d.ts +104 -0
- package/dist/env/llm/types.d.ts +26 -0
- package/dist/env/log-trace/decorator.d.ts +46 -3
- package/dist/env/log-trace/index.d.ts +1 -0
- package/dist/env/log-trace/index.js +33 -7
- package/dist/env/log-trace/trace-filters.d.ts +127 -0
- 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/index.js +11 -10
- package/dist/env/session/session-component.d.ts +4 -0
- package/dist/env/session/storage/index.js +5 -3
- package/dist/env/skill/index.js +7 -7
- package/dist/env/task/backend/index.js +0 -2
- package/dist/env/task/backend/types.d.ts +0 -11
- package/dist/env/task/delegate/index.js +8 -8
- package/dist/env/task/index.js +13 -13
- package/dist/env/task/plugins/card-chat-routing.d.ts +42 -89
- package/dist/env/task/plugins/index.js +10 -10
- package/dist/env/task/plugins/lark-card-patch-notifier.d.ts +0 -51
- package/dist/env/task/plugins/lark-cli-task-notify-plugin.d.ts +14 -31
- package/dist/env/task/plugins/per-task-group-chat-plugin.d.ts +4 -4
- package/dist/env/task/storage/index.js +2 -2
- package/dist/env/task/tools/index.js +3 -3
- package/dist/env/tool/built-in/index.js +3 -3
- package/dist/env/tool/index.js +9 -9
- package/dist/env/workflow/engine/engine.d.ts +65 -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 +23 -22
- package/dist/env/workflow/nodes/index.js +2 -2
- package/dist/env/workflow/nodes/tool-node.d.ts +6 -0
- package/dist/env/workflow/plugins/index.js +8 -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 +15 -14
- package/dist/env/workflow/tools/workflow-validate-tool.d.ts +11 -2
- package/dist/env/workflow/types/run.d.ts +19 -0
- package/dist/env/workflow/utils/agent-session-metadata.d.ts +13 -0
- package/dist/env/workflow/utils/index.js +5 -5
- package/dist/env/workflow/utils/redact-command-secrets.d.ts +70 -0
- package/dist/env/workflow/utils/shell-dialect-lint.d.ts +75 -0
- package/dist/env/workflow/utils/validate-workflow-definition.d.ts +22 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +82 -56
- package/dist/shared/@ai-setting/{roy-agent-core-k25gv86p.js → roy-agent-core-0b3fdnn3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vvxb9522.js → roy-agent-core-0bmk44ye.js} +71 -10
- package/dist/shared/@ai-setting/{roy-agent-core-k8b440n3.js → roy-agent-core-16t0zfbk.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-4z3rq5gw.js → roy-agent-core-1pnfkspm.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-na73mym1.js → roy-agent-core-202v00x4.js} +213 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ph5qbqcx.js → roy-agent-core-2044fbsd.js} +471 -134
- package/dist/shared/@ai-setting/{roy-agent-core-fs36xgcs.js → roy-agent-core-3dkzqqsd.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qm9jda8p.js → roy-agent-core-3kz6934b.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-tjg71zqp.js → roy-agent-core-3mc6vmvj.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-tdbv7ff4.js → roy-agent-core-40xzbjtm.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-athdr2m0.js → roy-agent-core-4zy2v3br.js} +10 -2
- package/dist/shared/@ai-setting/{roy-agent-core-t37wbysj.js → roy-agent-core-5gw6w424.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-978b6wfx.js → roy-agent-core-5psjwd08.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-7evvpfwc.js → roy-agent-core-5rxs0ra3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-gdsqp6j8.js → roy-agent-core-6masakz4.js} +45 -0
- package/dist/shared/@ai-setting/{roy-agent-core-stnddvx9.js → roy-agent-core-6qgq7h1g.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-6167phd4.js → roy-agent-core-833t16n1.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-2k4xffaa.js → roy-agent-core-8cgtwytv.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-rx16h2m1.js → roy-agent-core-97eyghsp.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-fvs48d38.js → roy-agent-core-98aa9r0x.js} +12 -7
- package/dist/shared/@ai-setting/{roy-agent-core-3tv1q6f2.js → roy-agent-core-9nv586rw.js} +57 -19
- package/dist/shared/@ai-setting/roy-agent-core-b599jgyd.js +578 -0
- package/dist/shared/@ai-setting/{roy-agent-core-yd21n6c7.js → roy-agent-core-bwzy00t2.js} +12 -5
- package/dist/shared/@ai-setting/{roy-agent-core-dwx9hjwx.js → roy-agent-core-c6at31ra.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-1cv9j4dg.js → roy-agent-core-d14h726p.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-4sx6sdb2.js → roy-agent-core-d4jpn06f.js} +22 -9
- package/dist/shared/@ai-setting/{roy-agent-core-39xejr39.js → roy-agent-core-e0wbq0qq.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-vrsxhw9e.js → roy-agent-core-e677am8e.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-hch2geta.js → roy-agent-core-ezsyyjxw.js} +21 -190
- package/dist/shared/@ai-setting/{roy-agent-core-ne2t1pay.js → roy-agent-core-f8sp1txg.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ak4dc3kg.js → roy-agent-core-gn8f4rhs.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qcspfszy.js → roy-agent-core-gngjkw3b.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9jzysq50.js → roy-agent-core-heft3j4c.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5apmk4qw.js → roy-agent-core-jszgaevt.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-nde5gzta.js → roy-agent-core-m8n0dffe.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-x8n1r7h4.js → roy-agent-core-n3b7ztms.js} +189 -8
- package/dist/shared/@ai-setting/{roy-agent-core-4vpk40ss.js → roy-agent-core-nhk0dsxr.js} +13 -13
- package/dist/shared/@ai-setting/{roy-agent-core-j8e92gj8.js → roy-agent-core-nntphgww.js} +1 -60
- package/dist/shared/@ai-setting/{roy-agent-core-8s9jd2qy.js → roy-agent-core-nra8vfrs.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-pk1b3kvf.js → roy-agent-core-ns3pbyz4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-7g03zkkb.js → roy-agent-core-pemxr5n4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-skzjs973.js → roy-agent-core-pjxa78mp.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-p8ak03s0.js → roy-agent-core-q7zksbw0.js} +117 -315
- package/dist/shared/@ai-setting/{roy-agent-core-zd3ddm4k.js → roy-agent-core-qjjf4tjb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qamktze3.js → roy-agent-core-qyqnmz8c.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9csa89jx.js → roy-agent-core-r9qe0ghe.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-h93v6p6y.js → roy-agent-core-tc7gw38m.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-35s1w7tc.js → roy-agent-core-v2188rnk.js} +157 -85
- package/dist/shared/@ai-setting/{roy-agent-core-p2r27era.js → roy-agent-core-vmg30n5x.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-rnwr39b0.js → roy-agent-core-w7hnjhvx.js} +5 -3
- package/dist/shared/@ai-setting/{roy-agent-core-dv714bqh.js → roy-agent-core-wafk25ff.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-brwzs8wf.js → roy-agent-core-xcq04fq0.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-2gay3sjt.js → roy-agent-core-yg247mk4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zy3hqfwg.js → roy-agent-core-yv9x4wmg.js} +631 -35
- package/dist/shared/@ai-setting/{roy-agent-core-yhsssn86.js → roy-agent-core-zmeka63k.js} +1 -1
- package/dist/test-utils/child-process-mock.d.ts +73 -0
- package/package.json +2 -2
- package/dist/shared/@ai-setting/roy-agent-core-dsevjbck.js +0 -245
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createHook,
|
|
3
3
|
init_hook
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-gngjkw3b.js";
|
|
5
5
|
import {
|
|
6
6
|
HookManager
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-1pnfkspm.js";
|
|
8
8
|
|
|
9
9
|
// src/env/component.ts
|
|
10
10
|
init_hook();
|
|
@@ -10,8 +10,11 @@ import {
|
|
|
10
10
|
} from "./roy-agent-core-tbrn9wdm.js";
|
|
11
11
|
import {
|
|
12
12
|
init_decorator,
|
|
13
|
+
init_trace_filters,
|
|
14
|
+
toolExecResultFilter,
|
|
15
|
+
toolInvokeParamFilter,
|
|
13
16
|
wrapFunction
|
|
14
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-b599jgyd.js";
|
|
15
18
|
import {
|
|
16
19
|
createLogger,
|
|
17
20
|
exports_tracer_provider,
|
|
@@ -27,6 +30,7 @@ import {
|
|
|
27
30
|
// src/env/tool/built-in/bash.ts
|
|
28
31
|
init_propagation();
|
|
29
32
|
init_decorator();
|
|
33
|
+
init_trace_filters();
|
|
30
34
|
import { z } from "zod";
|
|
31
35
|
import { Effect as Effect2 } from "effect";
|
|
32
36
|
|
|
@@ -334,7 +338,11 @@ var bashTool = {
|
|
|
334
338
|
}
|
|
335
339
|
};
|
|
336
340
|
}
|
|
337
|
-
}, "tool.bash.execute", {
|
|
341
|
+
}, "tool.bash.execute", {
|
|
342
|
+
paramFilter: toolInvokeParamFilter,
|
|
343
|
+
resultFilter: toolExecResultFilter,
|
|
344
|
+
logResult: true
|
|
345
|
+
})
|
|
338
346
|
};
|
|
339
347
|
|
|
340
348
|
// src/env/tool/built-in/echo.ts
|
|
@@ -3,17 +3,17 @@ 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-40xzbjtm.js";
|
|
7
7
|
import {
|
|
8
8
|
globalHookManager,
|
|
9
9
|
init_global_hook_manager
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-1pnfkspm.js";
|
|
11
11
|
import {
|
|
12
12
|
init_context
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-16t0zfbk.js";
|
|
14
14
|
import {
|
|
15
15
|
getEnvContextOrEmpty
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-jszgaevt.js";
|
|
17
17
|
import {
|
|
18
18
|
createLogger,
|
|
19
19
|
init_logger
|
|
@@ -1548,6 +1548,28 @@ workflow-creator 是**多轮对话式**协作。每个阶段都可能需要 ask
|
|
|
1548
1548
|
- ❌ **禁止**对 \`tool\` 节点写深层路径(如 \`{{nodes.bash-node.output.foo}}\`)—— tool 输出常是字符串,无法再取属性
|
|
1549
1549
|
- ✅ 存疑时一律退回 \`.output\`,或用 \`{{nodes.X.output}}\` 打印后**人肉核对**
|
|
1550
1550
|
|
|
1551
|
+
### 阶段 4.6: 单节点冒烟前置 (Per-node Standalone Smoke) \uD83E\uDDEA
|
|
1552
|
+
|
|
1553
|
+
> **依据 Task #4385 §3.4**:历史失败中,大量节点是**在整条 workflow 里第一次被执行**的 ——
|
|
1554
|
+
> 脚本名拼错、产物目录不存在、命令依赖 \`cd\`、参数没传进去…… 一个坏节点就烧掉整轮 run,
|
|
1555
|
+
> 然后你在整条链路的噪音里排障。**先把每个节点单独跑通,再拼成 DAG。**
|
|
1556
|
+
|
|
1557
|
+
**在把 YAML 组装/注册之前,对每一个 \`tool\` / \`pythonCall\` / \`skill\` 节点逐个做单节点冒烟:**
|
|
1558
|
+
|
|
1559
|
+
1. 用 \`bash\` 把该节点的 \`config.command\`(或 \`config.script\` / \`args\`)**原样**执行一次。
|
|
1560
|
+
- 变量先替换成真实值再跑(不要留着 \`{{input.x}}\` 跑,那验不出东西)
|
|
1561
|
+
- 逐个节点跑,**不是**跑整条链路
|
|
1562
|
+
2. 三项全绿才算该节点通过:
|
|
1563
|
+
- ✅ **exit code = 0**(非 0 立刻停下修,不要往后拼)
|
|
1564
|
+
- ✅ **产物/目录真实存在**(脚本声称会写出的文件、目录、wheel、日志,用 \`ls\` 核实)
|
|
1565
|
+
- ✅ **输出非空且含预期标记**(\`grep\` 你后面要引用的那个标记,命中才算通)
|
|
1566
|
+
3. 任何一项红了 → **先修这个节点**(改路径 / 改命令 / 改脚本),修好重跑,**不要**带着红灯继续组装。
|
|
1567
|
+
|
|
1568
|
+
**为什么不能省**:\`workflow_validate\` 只校验 DAG 结构 + 模板引用契约,它**看不到**
|
|
1569
|
+
"这个 shell 命令在这个 cwd 下到底能不能跑通"。单节点冒烟是唯一廉价、快速、可重复的补位。
|
|
1570
|
+
|
|
1571
|
+
**通过后**记录一张自检表(节点 id → exit code / 产物 / 标记),写进最终报告。
|
|
1572
|
+
|
|
1551
1573
|
### 阶段 5: 迭代验证 (Iterative Validate) \uD83D\uDD01
|
|
1552
1574
|
|
|
1553
1575
|
调用 \`workflow_validate\`,它返回 \`{ valid, errors, warnings, infos, errorCount, warningCount }\`。
|
|
@@ -1601,6 +1623,29 @@ workflow-creator 是**多轮对话式**协作。每个阶段都可能需要 ask
|
|
|
1601
1623
|
**未通过冒烟 → 禁止 \`task_complete\`**:回到阶段 4 改 YAML,重跑,直到通过;或明确报告失败原因
|
|
1602
1624
|
(**不得**用"应该没问题"之类的措辞声称通过)。
|
|
1603
1625
|
|
|
1626
|
+
#### \uD83D\uDEAB 手动补跑 ≠ 真跑(依据 Task #4385 §3.5)
|
|
1627
|
+
|
|
1628
|
+
workflow run 失败后,**手动**把某个节点的命令再敲一遍、看到它成功了,**不算**该节点被验证。
|
|
1629
|
+
|
|
1630
|
+
- ❌ 手动补跑的结果**不得计入** PASS 计数,也**不得**作为 "节点没问题" 的依据
|
|
1631
|
+
- ❌ 不得因为"手动跑通了"就跳过修 YAML / 重跑 workflow
|
|
1632
|
+
- ✅ 手动作业只能用来**定位原因**;结论必须靠**重跑 workflow** 得出
|
|
1633
|
+
- ✅ 若最终确实没能在 workflow 内验证某节点,结论里必须显式标注
|
|
1634
|
+
**「⚠️ 该节点未经 workflow run 验证」**,与真正通过的节点分开列
|
|
1635
|
+
|
|
1636
|
+
> 为什么:手动跑不经过模板解析、依赖排序、引擎超时与 fail-fast。
|
|
1637
|
+
> 一条在 shell 里通的命令,在节点里完全可能因为 \`{{}}\` 解析成空串而"成功但空转"。
|
|
1638
|
+
|
|
1639
|
+
#### \uD83D\uDD0D 归因:先分清「超时」与「别的节点先 fail-fast」(依据 Task #4385 §5)
|
|
1640
|
+
|
|
1641
|
+
说"某个节点超时了"之前,**必须先证明没有其他节点先失败**。
|
|
1642
|
+
|
|
1643
|
+
- 引擎是 **fail-fast** 的:任一节点失败会立刻收尾整个 run,**尚未跑完的节点看起来就像"卡住/超时"**
|
|
1644
|
+
- 因此**先排除**:\`roy-agent debug trace <trace_id>\` 里是否已有**其它节点**的失败 span / error
|
|
1645
|
+
- 只有在确认 "无其它节点先失败" 之后,才可以判断为真超时,再去看该节点自己的 span 耗时与 stdout
|
|
1646
|
+
- ❌ 不要把 fail-fast 的连带中止当成超时去"修超时参数" —— 这会让你在错误的节点上白改几轮
|
|
1647
|
+
(历史教训:#4361 / #4366 连续两轮误判)
|
|
1648
|
+
|
|
1604
1649
|
> \uD83D\uDEAB **绝不允许用 \`workflow update\` 绕过冒烟验证**(历史上真实节点版本 v1.1.0/v1.2.0 就是走
|
|
1605
1650
|
> \`workflow update\` 注册的,完全绕过了 validate 与冒烟)。update 后**同样必须**重跑阶段 5 + 5.5。
|
|
1606
1651
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
builtInPrompts
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-6masakz4.js";
|
|
4
4
|
import {
|
|
5
5
|
getXDGPath
|
|
6
6
|
} from "./roy-agent-core-qxnbvgwe.js";
|
|
@@ -10,14 +10,14 @@ 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-40xzbjtm.js";
|
|
14
14
|
import {
|
|
15
15
|
createHook
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-gngjkw3b.js";
|
|
17
17
|
import {
|
|
18
18
|
globalHookManager,
|
|
19
19
|
init_global_hook_manager
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-1pnfkspm.js";
|
|
21
21
|
import {
|
|
22
22
|
createLogger,
|
|
23
23
|
init_logger
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
globalHookManager,
|
|
14
14
|
init_global_hook_manager
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-1pnfkspm.js";
|
|
16
16
|
import {
|
|
17
17
|
TracedAs,
|
|
18
18
|
init_decorator,
|
|
19
19
|
wrapFunction
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-b599jgyd.js";
|
|
21
21
|
import {
|
|
22
22
|
createLogger,
|
|
23
23
|
init_logger
|
|
@@ -444,7 +444,7 @@ var init_agent_component_adapter = __esm(() => {
|
|
|
444
444
|
agentSessionPrefixes = new Map;
|
|
445
445
|
};
|
|
446
446
|
__legacyDecorateClassTS([
|
|
447
|
-
TracedAs("workflow.agent_adapter.run", { recordParams: true, recordResult:
|
|
447
|
+
TracedAs("workflow.agent_adapter.run", { recordParams: true, recordResult: false, log: true })
|
|
448
448
|
], AgentComponentAdapter.prototype, "run", null);
|
|
449
449
|
});
|
|
450
450
|
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
initDatabase,
|
|
6
6
|
initializeTables,
|
|
7
7
|
resetDatabase
|
|
8
|
-
} from "./roy-agent-core-
|
|
9
|
-
import"./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-5psjwd08.js";
|
|
9
|
+
import"./roy-agent-core-m8n0dffe.js";
|
|
10
10
|
import"./roy-agent-core-rvxg1wps.js";
|
|
11
|
-
import"./roy-agent-core-
|
|
11
|
+
import"./roy-agent-core-b599jgyd.js";
|
|
12
12
|
import"./roy-agent-core-8seq65bp.js";
|
|
13
13
|
import"./roy-agent-core-jnszp0jq.js";
|
|
14
14
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
TracedAs,
|
|
6
6
|
init_decorator
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-b599jgyd.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
@@ -467,7 +467,7 @@ __legacyDecorateClassTS([
|
|
|
467
467
|
TracedAs("agent.registry.clear", { recordParams: false, recordResult: true, log: true })
|
|
468
468
|
], AgentRegistry.prototype, "clear", null);
|
|
469
469
|
__legacyDecorateClassTS([
|
|
470
|
-
TracedAs("agent.registry.getSystemPrompt", { recordParams: true, recordResult:
|
|
470
|
+
TracedAs("agent.registry.getSystemPrompt", { recordParams: true, recordResult: false, log: true })
|
|
471
471
|
], AgentRegistry.prototype, "getSystemPrompt", null);
|
|
472
472
|
__legacyDecorateClassTS([
|
|
473
473
|
TracedAs("agent.registry.getWorkflowName", { recordParams: true, recordResult: true })
|
|
@@ -11,20 +11,23 @@ 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-40xzbjtm.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-1pnfkspm.js";
|
|
20
20
|
import {
|
|
21
21
|
getCurrentTaskId,
|
|
22
22
|
init_env_context
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-jszgaevt.js";
|
|
24
24
|
import {
|
|
25
25
|
TracedAs,
|
|
26
|
-
init_decorator
|
|
27
|
-
|
|
26
|
+
init_decorator,
|
|
27
|
+
init_trace_filters,
|
|
28
|
+
toolExecResultFilter,
|
|
29
|
+
toolInvokeParamFilter
|
|
30
|
+
} from "./roy-agent-core-b599jgyd.js";
|
|
28
31
|
import {
|
|
29
32
|
createLogger,
|
|
30
33
|
init_logger
|
|
@@ -162,6 +165,7 @@ class ToolValidator {
|
|
|
162
165
|
import { z } from "zod";
|
|
163
166
|
init_logger();
|
|
164
167
|
init_decorator();
|
|
168
|
+
init_trace_filters();
|
|
165
169
|
init_global_hook_manager();
|
|
166
170
|
|
|
167
171
|
// src/env/tool/tool-config-registration.ts
|
|
@@ -581,8 +585,9 @@ class ToolComponent extends BaseComponent {
|
|
|
581
585
|
}
|
|
582
586
|
__legacyDecorateClassTS([
|
|
583
587
|
TracedAs("tool.component.execute", {
|
|
584
|
-
|
|
585
|
-
|
|
588
|
+
paramFilter: toolInvokeParamFilter,
|
|
589
|
+
resultFilter: toolExecResultFilter,
|
|
590
|
+
logResult: true,
|
|
586
591
|
log: true,
|
|
587
592
|
errorIf: (result) => {
|
|
588
593
|
const err = result?.error;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isToolUnavailableError,
|
|
3
3
|
truncateOutputInline
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-98aa9r0x.js";
|
|
5
5
|
import {
|
|
6
6
|
AgentRegistry
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-97eyghsp.js";
|
|
8
8
|
import {
|
|
9
9
|
enqueueToAddFakeUserMessage
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-wafk25ff.js";
|
|
11
11
|
import {
|
|
12
12
|
SessionMessageConverter
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-ns3pbyz4.js";
|
|
14
14
|
import {
|
|
15
15
|
parseToolArgsStrict,
|
|
16
16
|
safeParseToolArgs,
|
|
17
17
|
withTimeout
|
|
18
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-yv9x4wmg.js";
|
|
19
19
|
import {
|
|
20
20
|
getCurrentBgTaskId
|
|
21
21
|
} from "./roy-agent-core-c1v263jn.js";
|
|
@@ -31,24 +31,32 @@ import {
|
|
|
31
31
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
32
32
|
import {
|
|
33
33
|
BaseComponent
|
|
34
|
-
} from "./roy-agent-core-
|
|
34
|
+
} from "./roy-agent-core-40xzbjtm.js";
|
|
35
35
|
import {
|
|
36
36
|
globalHookManager,
|
|
37
37
|
init_global_hook_manager
|
|
38
|
-
} from "./roy-agent-core-
|
|
38
|
+
} from "./roy-agent-core-1pnfkspm.js";
|
|
39
39
|
import {
|
|
40
40
|
init_context
|
|
41
|
-
} from "./roy-agent-core-
|
|
41
|
+
} from "./roy-agent-core-16t0zfbk.js";
|
|
42
42
|
import {
|
|
43
43
|
getCurrentTaskId,
|
|
44
44
|
getEnvContext,
|
|
45
45
|
resolveEnvParentTaskId,
|
|
46
46
|
runWithEnvContextAsync
|
|
47
|
-
} from "./roy-agent-core-
|
|
47
|
+
} from "./roy-agent-core-jszgaevt.js";
|
|
48
48
|
import {
|
|
49
49
|
TracedAs,
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
agentRunParamFilter,
|
|
51
|
+
init_decorator,
|
|
52
|
+
init_trace_filters,
|
|
53
|
+
llmInvokeParamFilter,
|
|
54
|
+
llmInvokeResultFilter,
|
|
55
|
+
messagesParamFilter,
|
|
56
|
+
recordSessionMessagesParamFilter,
|
|
57
|
+
toolExecParamFilter,
|
|
58
|
+
toolExecResultFilter
|
|
59
|
+
} from "./roy-agent-core-b599jgyd.js";
|
|
52
60
|
import {
|
|
53
61
|
createLogger,
|
|
54
62
|
init_logger
|
|
@@ -188,6 +196,7 @@ var AGENT_CONFIG_REGISTRATION = {
|
|
|
188
196
|
|
|
189
197
|
// src/env/agent/agent-component.ts
|
|
190
198
|
init_decorator();
|
|
199
|
+
init_trace_filters();
|
|
191
200
|
init_global_hook_manager();
|
|
192
201
|
init_context();
|
|
193
202
|
init_workflow_hil();
|
|
@@ -1819,16 +1828,31 @@ __legacyDecorateClassTS([
|
|
|
1819
1828
|
TracedAs("agent.meta-protocol.flushPendingUserMessage", { recordParams: false, recordResult: false, log: true })
|
|
1820
1829
|
], AgentComponent.prototype, "flushPendingFakeUserMessage", null);
|
|
1821
1830
|
__legacyDecorateClassTS([
|
|
1822
|
-
TracedAs("agent.component.run", {
|
|
1831
|
+
TracedAs("agent.component.run", {
|
|
1832
|
+
paramFilter: agentRunParamFilter,
|
|
1833
|
+
recordResult: false,
|
|
1834
|
+
logResult: true,
|
|
1835
|
+
log: true
|
|
1836
|
+
})
|
|
1823
1837
|
], AgentComponent.prototype, "_run", null);
|
|
1824
1838
|
__legacyDecorateClassTS([
|
|
1825
|
-
TracedAs("agent.component.loadOrCreateCacheSnapshot", { recordParams: true, recordResult:
|
|
1839
|
+
TracedAs("agent.component.loadOrCreateCacheSnapshot", { recordParams: true, recordResult: false, log: true })
|
|
1826
1840
|
], AgentComponent.prototype, "_loadOrCreateCacheSnapshot", null);
|
|
1827
1841
|
__legacyDecorateClassTS([
|
|
1828
|
-
TracedAs("agent.component.buildAdditionInfo", {
|
|
1842
|
+
TracedAs("agent.component.buildAdditionInfo", {
|
|
1843
|
+
paramFilter: messagesParamFilter,
|
|
1844
|
+
recordResult: false,
|
|
1845
|
+
logResult: true,
|
|
1846
|
+
log: true
|
|
1847
|
+
})
|
|
1829
1848
|
], AgentComponent.prototype, "_buildAdditionInfo", null);
|
|
1830
1849
|
__legacyDecorateClassTS([
|
|
1831
|
-
TracedAs("agent.component.invokeLLM", {
|
|
1850
|
+
TracedAs("agent.component.invokeLLM", {
|
|
1851
|
+
paramFilter: llmInvokeParamFilter,
|
|
1852
|
+
resultFilter: llmInvokeResultFilter,
|
|
1853
|
+
logResult: true,
|
|
1854
|
+
log: true
|
|
1855
|
+
})
|
|
1832
1856
|
], AgentComponent.prototype, "invokeLLM", null);
|
|
1833
1857
|
__legacyDecorateClassTS([
|
|
1834
1858
|
TracedAs("agent.tool_call.parse", {
|
|
@@ -1854,8 +1878,9 @@ __legacyDecorateClassTS([
|
|
|
1854
1878
|
], AgentComponent.prototype, "parseToolCallArguments", null);
|
|
1855
1879
|
__legacyDecorateClassTS([
|
|
1856
1880
|
TracedAs("agent.component.executeTool", {
|
|
1857
|
-
|
|
1858
|
-
|
|
1881
|
+
paramFilter: toolExecParamFilter,
|
|
1882
|
+
resultFilter: toolExecResultFilter,
|
|
1883
|
+
logResult: true,
|
|
1859
1884
|
log: true,
|
|
1860
1885
|
errorIf: (result) => {
|
|
1861
1886
|
const err = result?.result?.error;
|
|
@@ -1867,10 +1892,23 @@ __legacyDecorateClassTS([
|
|
|
1867
1892
|
})
|
|
1868
1893
|
], AgentComponent.prototype, "executeTool", null);
|
|
1869
1894
|
__legacyDecorateClassTS([
|
|
1870
|
-
TracedAs("agent.component.recordSessionMessages", {
|
|
1895
|
+
TracedAs("agent.component.recordSessionMessages", {
|
|
1896
|
+
paramFilter: recordSessionMessagesParamFilter,
|
|
1897
|
+
logResult: true,
|
|
1898
|
+
log: true
|
|
1899
|
+
})
|
|
1871
1900
|
], AgentComponent.prototype, "recordSessionMessages", null);
|
|
1872
1901
|
__legacyDecorateClassTS([
|
|
1873
|
-
TracedAs("agent.component.getConversationHistory", {
|
|
1902
|
+
TracedAs("agent.component.getConversationHistory", {
|
|
1903
|
+
paramFilter: (args) => ({
|
|
1904
|
+
sessionId: args?.[1] ?? null,
|
|
1905
|
+
minUserMessages: args?.[2]?.minUserMessages ?? null,
|
|
1906
|
+
filterHistory: args?.[2]?.filterHistory ?? null
|
|
1907
|
+
}),
|
|
1908
|
+
recordResult: false,
|
|
1909
|
+
logResult: true,
|
|
1910
|
+
log: true
|
|
1911
|
+
})
|
|
1874
1912
|
], AgentComponent.prototype, "getConversationHistory", null);
|
|
1875
1913
|
function buildMultiBlockSystem(ctx) {
|
|
1876
1914
|
const ANTHROPIC_CACHE_CONTROL = {
|