@ai-setting/roy-agent-core 1.6.21 → 1.6.23
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/index.js +17 -15
- 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/event-source/index.js +14 -13
- package/dist/env/hook/index.js +7 -7
- package/dist/env/index.js +41 -40
- package/dist/env/llm/index.js +11 -11
- package/dist/env/log-trace/index.js +9 -9
- 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 +12 -12
- package/dist/env/session/storage/index.js +5 -5
- package/dist/env/skill/index.js +9 -9
- package/dist/env/task/delegate/index.js +10 -10
- package/dist/env/task/index.js +15 -15
- package/dist/env/task/plugins/index.js +9 -8
- package/dist/env/task/storage/index.js +4 -4
- 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/workflow/engine/index.js +11 -11
- package/dist/env/workflow/index.js +22 -22
- package/dist/env/workflow/nodes/index.js +4 -4
- 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 +16 -16
- package/dist/env/workflow/utils/index.js +6 -6
- package/dist/index.js +52 -51
- package/dist/shared/@ai-setting/{roy-agent-core-7kw06e4b.js → roy-agent-core-0qjw25e8.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bq1gskrf.js → roy-agent-core-0v74marc.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-e0kaxcy1.js → roy-agent-core-12gac5zn.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-f1cjs6c4.js → roy-agent-core-16dqrewm.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-7r72622v.js → roy-agent-core-1k9j90s7.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-m00kamqp.js → roy-agent-core-1khp1m0r.js} +8 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zeztnvvb.js → roy-agent-core-3c1b7xh5.js} +221 -79
- package/dist/shared/@ai-setting/{roy-agent-core-77wfej1h.js → roy-agent-core-3e0w0ekw.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-zdzkzx5g.js → roy-agent-core-3ep1dxf1.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gc75v3px.js → roy-agent-core-3x3k7gfs.js} +5 -5
- package/dist/shared/@ai-setting/roy-agent-core-4k8tv5q5.js +11 -0
- package/dist/shared/@ai-setting/{roy-agent-core-zvwdfm79.js → roy-agent-core-50jdqb7r.js} +95 -32
- package/dist/shared/@ai-setting/{roy-agent-core-02aw62bv.js → roy-agent-core-5ts23mx0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-atpchjdz.js → roy-agent-core-6m2gh57e.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ehpnd2be.js → roy-agent-core-6re7eg4w.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ett06sn8.js → roy-agent-core-7cxdkcrz.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-416rpxkp.js → roy-agent-core-7wv7gh6t.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-bb20se79.js → roy-agent-core-8s7qyr5y.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-fxembepv.js → roy-agent-core-90wp1rgb.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-xjj88tpn.js → roy-agent-core-afb03wwp.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5pzegp1x.js → roy-agent-core-b64s2vk9.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ataagh3a.js → roy-agent-core-br7dmedr.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8n0e62y4.js → roy-agent-core-c1stgqnw.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gmnex23m.js → roy-agent-core-cjraf54z.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-j8t1tyhr.js → roy-agent-core-dbwvfe0m.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-mdp8y7ky.js → roy-agent-core-dxfd6p1c.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-wsqnf2za.js → roy-agent-core-ef486rdm.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-kr58bgz0.js → roy-agent-core-f2nync7q.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-dh9rajdh.js → roy-agent-core-g7nmwg63.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-96mj6gvc.js → roy-agent-core-gb7pm9c0.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-grajzyhd.js → roy-agent-core-gns3wa97.js} +14 -18
- package/dist/shared/@ai-setting/{roy-agent-core-ez91vxas.js → roy-agent-core-h1cb2jzh.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-eskgj8nc.js → roy-agent-core-h28gcd77.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-sqt96sam.js → roy-agent-core-h7ak839w.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-c7e3htaq.js → roy-agent-core-hks28tys.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-vc7p80sd.js → roy-agent-core-j29yg06n.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-r15sn7ve.js → roy-agent-core-j9ybhwnq.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-nna4s0qs.js → roy-agent-core-kaq037np.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-e9jf4w3z.js → roy-agent-core-kv7frw13.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-44g3synv.js → roy-agent-core-mvs5sen6.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-akb8mb9v.js → roy-agent-core-pde8hkq4.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-p4z6nxgz.js → roy-agent-core-pdnp5kj0.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-1qjgwjjs.js → roy-agent-core-pz2n121t.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-wr3pk3h3.js → roy-agent-core-qe3m3hec.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-v20nxrs1.js → roy-agent-core-qpt5fa8h.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-keb51jag.js → roy-agent-core-rs5tp44j.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-2b0mw2h3.js → roy-agent-core-s07nere5.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-ajp566yv.js → roy-agent-core-sfwt66pv.js} +2 -2
- package/dist/shared/@ai-setting/roy-agent-core-t3yqzgse.js +71 -0
- package/dist/shared/@ai-setting/{roy-agent-core-xzc53mnk.js → roy-agent-core-t9h4np6m.js} +4 -2
- package/dist/shared/@ai-setting/{roy-agent-core-1mrc9a1r.js → roy-agent-core-w8rv08d3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-b9q2jfx4.js → roy-agent-core-watkmj7d.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-bwqjwa0d.js → roy-agent-core-wr1pgw0x.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-fntxq0gf.js → roy-agent-core-x0yztmm6.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-dtkbj8fk.js → roy-agent-core-xrr7t0qc.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-q06h6qf8.js → roy-agent-core-xwnpygva.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-pr4jekyy.js → roy-agent-core-z2w7wtqd.js} +5 -5
- package/dist/utils/temp-file-manager/index.js +3 -3
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-w6kj6nmj.js +0 -11
|
@@ -3,7 +3,10 @@ import {
|
|
|
3
3
|
} from "./roy-agent-core-az13yzmc.js";
|
|
4
4
|
import {
|
|
5
5
|
validateWorkflowDefinition
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-w8rv08d3.js";
|
|
7
|
+
import {
|
|
8
|
+
enqueueToAddFakeUserMessage
|
|
9
|
+
} from "./roy-agent-core-t3yqzgse.js";
|
|
7
10
|
import {
|
|
8
11
|
WORKFLOW_EXTRACT_PROMPT
|
|
9
12
|
} from "./roy-agent-core-skqt40yy.js";
|
|
@@ -12,22 +15,22 @@ import {
|
|
|
12
15
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
13
16
|
import {
|
|
14
17
|
init_context
|
|
15
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-h7ak839w.js";
|
|
16
19
|
import {
|
|
17
20
|
getEnvContextOrEmpty,
|
|
18
21
|
getEventFromEnvContext,
|
|
19
22
|
getLarkMessageId,
|
|
20
23
|
isLarkEvent
|
|
21
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-xrr7t0qc.js";
|
|
22
25
|
import {
|
|
23
26
|
TracedAs,
|
|
24
27
|
init_decorator,
|
|
25
28
|
wrapFunction
|
|
26
|
-
} from "./roy-agent-core-
|
|
29
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
27
30
|
import {
|
|
28
31
|
createLogger,
|
|
29
32
|
init_logger
|
|
30
|
-
} from "./roy-agent-core-
|
|
33
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
31
34
|
import {
|
|
32
35
|
__legacyDecorateClassTS,
|
|
33
36
|
__require
|
|
@@ -292,11 +295,11 @@ ${prompt}`;
|
|
|
292
295
|
}
|
|
293
296
|
if (!this._workflowRepo) {
|
|
294
297
|
try {
|
|
295
|
-
const sqlite = await import("./roy-agent-core-
|
|
298
|
+
const sqlite = await import("./roy-agent-core-z2w7wtqd.js");
|
|
296
299
|
this.ensureDataDir();
|
|
297
300
|
const db = sqlite.getDatabase();
|
|
298
301
|
sqlite.initializeTables();
|
|
299
|
-
const { WorkflowRepository } = await import("./roy-agent-core-
|
|
302
|
+
const { WorkflowRepository } = await import("./roy-agent-core-90wp1rgb.js");
|
|
300
303
|
this._workflowRepo = new WorkflowRepository(db);
|
|
301
304
|
return this._workflowRepo;
|
|
302
305
|
} catch {
|
|
@@ -339,17 +342,10 @@ function createAutoTaskPlugin(config) {
|
|
|
339
342
|
logger2.warn(`[AutoTaskPlugin] toolResult missing, skip meta-protocol (iteration=${ctx.iteration})`);
|
|
340
343
|
return { continue: true };
|
|
341
344
|
}
|
|
342
|
-
|
|
343
|
-
ctx.toolResult.result = {};
|
|
344
|
-
}
|
|
345
|
-
const innerResult = ctx.toolResult.result;
|
|
346
|
-
if (!innerResult.metadata) {
|
|
347
|
-
innerResult.metadata = {};
|
|
348
|
-
}
|
|
349
|
-
innerResult.metadata.toAddFakeUserMessage = {
|
|
345
|
+
enqueueToAddFakeUserMessage(ctx.toolResult, {
|
|
350
346
|
role: "user",
|
|
351
347
|
content: reminderContent
|
|
352
|
-
};
|
|
348
|
+
}, "delegate");
|
|
353
349
|
logger2.info(`[AutoTaskPlugin] user reminder meta-protocol set (session=${(ctx.context?.sessionId ?? "unknown").slice(0, 12)}..., iteration=${ctx.iteration})`);
|
|
354
350
|
return { continue: true };
|
|
355
351
|
} catch (err) {
|
|
@@ -364,8 +360,8 @@ function createAutoTaskPlugin(config) {
|
|
|
364
360
|
});
|
|
365
361
|
return {
|
|
366
362
|
name: "AutoTaskPlugin",
|
|
367
|
-
version: "5.
|
|
368
|
-
description: "ReAct iteration
|
|
363
|
+
version: "5.2.0",
|
|
364
|
+
description: "ReAct iteration 达到阈值时通过共享 meta-protocol helper 注入 user 消息(与 MaxIterReminder 共用字段、确定性合并)",
|
|
369
365
|
hooks: [
|
|
370
366
|
{ point: "agent:after.tool", priority: 50 }
|
|
371
367
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TempFileManager
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-br7dmedr.js";
|
|
4
4
|
import {
|
|
5
5
|
AskUserError,
|
|
6
6
|
init_workflow_hil
|
|
@@ -11,24 +11,24 @@ 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-pde8hkq4.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-j29yg06n.js";
|
|
20
20
|
import {
|
|
21
21
|
getCurrentTaskId,
|
|
22
22
|
init_env_context
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-xrr7t0qc.js";
|
|
24
24
|
import {
|
|
25
25
|
TracedAs,
|
|
26
26
|
init_decorator
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
28
28
|
import {
|
|
29
29
|
createLogger,
|
|
30
30
|
init_logger
|
|
31
|
-
} from "./roy-agent-core-
|
|
31
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
32
32
|
import {
|
|
33
33
|
__legacyDecorateClassTS,
|
|
34
34
|
__require
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_env_context,
|
|
3
3
|
setCurrentTaskId
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-xrr7t0qc.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
9
9
|
|
|
10
10
|
// src/env/task/tools/task-types.ts
|
|
11
11
|
import { z } from "zod";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_context
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-h7ak839w.js";
|
|
4
4
|
import {
|
|
5
5
|
getEnvContext
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-xrr7t0qc.js";
|
|
7
7
|
import {
|
|
8
8
|
__esm
|
|
9
9
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TracedAs,
|
|
3
3
|
init_decorator
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
9
9
|
import {
|
|
10
10
|
__legacyDecorateClassTS
|
|
11
11
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -7,21 +7,21 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
getCurrentProcessRegistry,
|
|
9
9
|
killProcessTree
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-mvs5sen6.js";
|
|
11
11
|
import {
|
|
12
12
|
init_decorator,
|
|
13
13
|
wrapFunction
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
15
15
|
import {
|
|
16
16
|
createLogger,
|
|
17
17
|
init_logger
|
|
18
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
19
19
|
import {
|
|
20
20
|
exports_tracer_provider,
|
|
21
21
|
init_propagation,
|
|
22
22
|
init_tracer_provider,
|
|
23
23
|
propagation
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-1khp1m0r.js";
|
|
25
25
|
import {
|
|
26
26
|
__toCommonJS
|
|
27
27
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createHook
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-5ts23mx0.js";
|
|
4
4
|
import {
|
|
5
5
|
HookManager
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-j29yg06n.js";
|
|
7
7
|
|
|
8
8
|
// src/env/component.ts
|
|
9
9
|
class BaseComponent {
|
|
@@ -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-3e0w0ekw.js";
|
|
7
7
|
import"./roy-agent-core-ddwa0n6h.js";
|
|
8
8
|
import"./roy-agent-core-1ce3fqrk.js";
|
|
9
|
-
import"./roy-agent-core-
|
|
10
|
-
import"./roy-agent-core-
|
|
11
|
-
import"./roy-agent-core-
|
|
9
|
+
import"./roy-agent-core-gb7pm9c0.js";
|
|
10
|
+
import"./roy-agent-core-kaq037np.js";
|
|
11
|
+
import"./roy-agent-core-1khp1m0r.js";
|
|
12
12
|
import"./roy-agent-core-4an1p9a1.js";
|
|
13
13
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
14
14
|
init_node_registry_helper();
|
|
@@ -3,23 +3,23 @@ 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-pde8hkq4.js";
|
|
7
7
|
import {
|
|
8
8
|
init_decorator
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
10
10
|
import {
|
|
11
11
|
createLogger,
|
|
12
12
|
init_logger,
|
|
13
13
|
setConfigComponent,
|
|
14
14
|
setQuietMode
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
16
16
|
import {
|
|
17
17
|
getTracerProvider,
|
|
18
18
|
init_propagation,
|
|
19
19
|
init_tracer_provider,
|
|
20
20
|
init_types,
|
|
21
21
|
propagation
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-1khp1m0r.js";
|
|
23
23
|
import {
|
|
24
24
|
SQLiteSpanStorage,
|
|
25
25
|
init_span_storage
|
|
@@ -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-pde8hkq4.js";
|
|
10
10
|
import {
|
|
11
11
|
createLogger,
|
|
12
12
|
init_logger
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
14
14
|
|
|
15
15
|
// src/env/memory/types.ts
|
|
16
16
|
import { z } from "zod";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./roy-agent-core-rvv6ydff.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseComponent
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-pde8hkq4.js";
|
|
8
8
|
import {
|
|
9
9
|
__require
|
|
10
10
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -590,7 +590,7 @@ class DebugComponent extends BaseComponent {
|
|
|
590
590
|
}
|
|
591
591
|
async getLiveTrace(traceId) {
|
|
592
592
|
try {
|
|
593
|
-
const { getTracerProvider } = await import("./roy-agent-core-
|
|
593
|
+
const { getTracerProvider } = await import("./roy-agent-core-t9h4np6m.js");
|
|
594
594
|
const provider = getTracerProvider();
|
|
595
595
|
if (!provider.isInitialized()) {
|
|
596
596
|
await provider.initialize();
|
|
@@ -635,7 +635,7 @@ class DebugComponent extends BaseComponent {
|
|
|
635
635
|
}
|
|
636
636
|
async listLiveTraces(limit = 20) {
|
|
637
637
|
try {
|
|
638
|
-
const { getTracerProvider } = await import("./roy-agent-core-
|
|
638
|
+
const { getTracerProvider } = await import("./roy-agent-core-t9h4np6m.js");
|
|
639
639
|
const provider = getTracerProvider();
|
|
640
640
|
if (!provider.isInitialized()) {
|
|
641
641
|
await provider.initialize();
|
|
@@ -653,7 +653,7 @@ class DebugComponent extends BaseComponent {
|
|
|
653
653
|
}
|
|
654
654
|
async formatLiveTrace(traceId) {
|
|
655
655
|
try {
|
|
656
|
-
const { getTracerProvider } = await import("./roy-agent-core-
|
|
656
|
+
const { getTracerProvider } = await import("./roy-agent-core-t9h4np6m.js");
|
|
657
657
|
const provider = getTracerProvider();
|
|
658
658
|
if (!provider.isInitialized()) {
|
|
659
659
|
await provider.initialize();
|
|
@@ -8,17 +8,17 @@ import {
|
|
|
8
8
|
} from "./roy-agent-core-fnv3ev18.js";
|
|
9
9
|
import {
|
|
10
10
|
adaptMcpTool
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-dxfd6p1c.js";
|
|
12
12
|
import {
|
|
13
13
|
toEnvKey
|
|
14
14
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
15
15
|
import {
|
|
16
16
|
BaseComponent
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-pde8hkq4.js";
|
|
18
18
|
import {
|
|
19
19
|
createLogger,
|
|
20
20
|
init_logger
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
22
22
|
|
|
23
23
|
// src/env/mcp/types.ts
|
|
24
24
|
import { z } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TagRepository
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-6m2gh57e.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-kaq037np.js";
|
|
12
12
|
import {
|
|
13
13
|
__require,
|
|
14
14
|
__toCommonJS
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_decorator,
|
|
3
|
+
wrapFunction
|
|
4
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
5
|
+
|
|
6
|
+
// src/env/task/plugins/fake-user-message-helper.ts
|
|
7
|
+
init_decorator();
|
|
8
|
+
var KIND_FIELD = "__fakeUserMessageKind";
|
|
9
|
+
function ensureMetadata(toolResult) {
|
|
10
|
+
if (!toolResult)
|
|
11
|
+
return;
|
|
12
|
+
if (!toolResult.result)
|
|
13
|
+
toolResult.result = {};
|
|
14
|
+
if (!toolResult.result.metadata)
|
|
15
|
+
toolResult.result.metadata = {};
|
|
16
|
+
return toolResult.result.metadata;
|
|
17
|
+
}
|
|
18
|
+
function stringContent(msg) {
|
|
19
|
+
const c = msg?.content;
|
|
20
|
+
return typeof c === "string" ? c : JSON.stringify(c);
|
|
21
|
+
}
|
|
22
|
+
function enqueueToAddFakeUserMessageImpl(toolResult, newMsg, newKind) {
|
|
23
|
+
const meta = ensureMetadata(toolResult);
|
|
24
|
+
if (!meta)
|
|
25
|
+
return { willMerge: false, finalKind: newKind };
|
|
26
|
+
const existing = meta.toAddFakeUserMessage;
|
|
27
|
+
const existingKind = meta[KIND_FIELD];
|
|
28
|
+
if (!existing) {
|
|
29
|
+
meta.toAddFakeUserMessage = newMsg;
|
|
30
|
+
meta[KIND_FIELD] = newKind;
|
|
31
|
+
return { willMerge: false, finalKind: newKind };
|
|
32
|
+
}
|
|
33
|
+
let merged;
|
|
34
|
+
if (newKind === "max-iter") {
|
|
35
|
+
merged = {
|
|
36
|
+
role: "user",
|
|
37
|
+
content: `${stringContent(existing)}
|
|
38
|
+
|
|
39
|
+
${stringContent(newMsg)}`
|
|
40
|
+
};
|
|
41
|
+
} else if (newKind === "delegate" && existingKind === "max-iter") {
|
|
42
|
+
merged = {
|
|
43
|
+
role: "user",
|
|
44
|
+
content: `${stringContent(newMsg)}
|
|
45
|
+
|
|
46
|
+
${stringContent(existing)}`
|
|
47
|
+
};
|
|
48
|
+
} else {
|
|
49
|
+
merged = {
|
|
50
|
+
role: "user",
|
|
51
|
+
content: `${stringContent(existing)}
|
|
52
|
+
|
|
53
|
+
${stringContent(newMsg)}`
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
meta.toAddFakeUserMessage = merged;
|
|
57
|
+
const finalKind = newKind === "max-iter" || existingKind === "max-iter" ? "max-iter" : newKind;
|
|
58
|
+
meta[KIND_FIELD] = finalKind;
|
|
59
|
+
return { willMerge: true, finalKind };
|
|
60
|
+
}
|
|
61
|
+
var enqueueToAddFakeUserMessage = wrapFunction(enqueueToAddFakeUserMessageImpl, "plugin.fake-user-message.enqueue", {
|
|
62
|
+
recordParams: false,
|
|
63
|
+
recordResult: false,
|
|
64
|
+
log: true,
|
|
65
|
+
resultFilter: (result) => ({
|
|
66
|
+
"fake-user-message.will_merge": result.willMerge,
|
|
67
|
+
"fake-user-message.final_kind": result.finalKind
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export { enqueueToAddFakeUserMessage };
|
|
@@ -2,13 +2,15 @@ import {
|
|
|
2
2
|
OTelTracerProvider,
|
|
3
3
|
getTracerProvider,
|
|
4
4
|
init_tracer_provider,
|
|
5
|
-
resetTracerProvider
|
|
6
|
-
|
|
5
|
+
resetTracerProvider,
|
|
6
|
+
setTracerProvider
|
|
7
|
+
} from "./roy-agent-core-1khp1m0r.js";
|
|
7
8
|
import"./roy-agent-core-4an1p9a1.js";
|
|
8
9
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
9
10
|
init_tracer_provider();
|
|
10
11
|
|
|
11
12
|
export {
|
|
13
|
+
setTracerProvider,
|
|
12
14
|
resetTracerProvider,
|
|
13
15
|
getTracerProvider,
|
|
14
16
|
OTelTracerProvider
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAutoTaskPlugin
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-gns3wa97.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-pde8hkq4.js";
|
|
11
11
|
import {
|
|
12
12
|
init_context
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-h7ak839w.js";
|
|
14
14
|
import {
|
|
15
15
|
getEnvContext,
|
|
16
16
|
init_env_context,
|
|
17
17
|
runWithEnvContextAsync
|
|
18
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-xrr7t0qc.js";
|
|
19
19
|
import {
|
|
20
20
|
TracedAs,
|
|
21
21
|
init_decorator
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
23
23
|
import {
|
|
24
24
|
createLogger,
|
|
25
25
|
init_logger
|
|
26
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
27
27
|
import {
|
|
28
28
|
__legacyDecorateClassTS
|
|
29
29
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TaskTagPlugin,
|
|
3
3
|
createLarkCliTaskNotifyHook
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-gns3wa97.js";
|
|
5
5
|
import {
|
|
6
6
|
envKeyToConfigKey
|
|
7
7
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseComponent
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-pde8hkq4.js";
|
|
11
11
|
import {
|
|
12
12
|
globalHookManager,
|
|
13
13
|
init_global_hook_manager
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-j29yg06n.js";
|
|
15
15
|
import {
|
|
16
16
|
init_context
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-h7ak839w.js";
|
|
18
18
|
import {
|
|
19
19
|
createEnvContext,
|
|
20
20
|
runWithEnvContext
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-xrr7t0qc.js";
|
|
22
22
|
import {
|
|
23
23
|
TracedAs,
|
|
24
24
|
init_decorator
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
26
26
|
import {
|
|
27
27
|
createLogger,
|
|
28
28
|
init_logger
|
|
29
|
-
} from "./roy-agent-core-
|
|
29
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
30
30
|
import {
|
|
31
31
|
getTracerProvider
|
|
32
|
-
} from "./roy-agent-core-
|
|
32
|
+
} from "./roy-agent-core-1khp1m0r.js";
|
|
33
33
|
import {
|
|
34
34
|
__legacyDecorateClassTS,
|
|
35
35
|
__require
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
TracedAs,
|
|
6
6
|
init_decorator
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
12
12
|
import {
|
|
13
13
|
__legacyDecorateClassTS
|
|
14
14
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_decorator,
|
|
3
3
|
wrapFunction
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
9
9
|
import {
|
|
10
10
|
__esm
|
|
11
11
|
} from "./roy-agent-core-fs0mn2jk.js";
|