@ai-setting/roy-agent-core 1.7.56 → 1.7.57
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 +8 -8
- package/dist/env/agent/agent-component.d.ts +11 -0
- package/dist/env/agent/index.js +14 -14
- package/dist/env/commands/index.js +8 -8
- package/dist/env/context/index.js +4 -4
- package/dist/env/debug/index.js +8 -8
- package/dist/env/event-source/event-source-handlers.d.ts +28 -0
- package/dist/env/event-source/index.js +18 -17
- package/dist/env/hook/index.js +6 -6
- package/dist/env/index.js +44 -43
- package/dist/env/llm/index.js +9 -9
- package/dist/env/log-trace/index.js +8 -8
- package/dist/env/log-trace/opentelemetry/tracer-provider.d.ts +86 -1
- package/dist/env/mcp/index.js +9 -9
- package/dist/env/mcp/tool/index.js +2 -2
- package/dist/env/memory/index.js +9 -9
- package/dist/env/memory/plugin/index.js +2 -2
- package/dist/env/plugin/index.js +8 -8
- package/dist/env/prompt/index.js +8 -8
- package/dist/env/session/index.js +11 -11
- package/dist/env/session/storage/index.js +5 -5
- package/dist/env/skill/index.js +8 -8
- package/dist/env/task/delegate/index.js +9 -9
- package/dist/env/task/index.js +18 -17
- package/dist/env/task/plugins/index.js +11 -10
- package/dist/env/task/plugins/lark-card-patch-notifier.d.ts +109 -2
- package/dist/env/task/plugins/lark-card-state-store.d.ts +137 -0
- package/dist/env/task/plugins/lark-cli-task-notify-plugin.d.ts +154 -2
- package/dist/env/task/storage/index.js +4 -3
- package/dist/env/task/tools/index.js +4 -4
- package/dist/env/tool/built-in/index.js +4 -4
- package/dist/env/tool/index.js +11 -11
- package/dist/env/workflow/engine/index.js +13 -13
- package/dist/env/workflow/hooks/index.js +8 -8
- package/dist/env/workflow/index.js +23 -23
- package/dist/env/workflow/nodes/index.js +3 -3
- package/dist/env/workflow/plugins/index.js +9 -9
- package/dist/env/workflow/service/index.js +3 -3
- package/dist/env/workflow/storage/index.js +4 -4
- package/dist/env/workflow/tools/index.js +15 -15
- package/dist/env/workflow/utils/index.js +5 -5
- package/dist/index.js +58 -57
- package/dist/shared/@ai-setting/{roy-agent-core-0b3fdnn3.js → roy-agent-core-029r8kdw.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-nra8vfrs.js → roy-agent-core-08njdcpj.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-40xzbjtm.js → roy-agent-core-0kn3zt1t.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-nhk0dsxr.js → roy-agent-core-0yn7a78e.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-tbrn9wdm.js → roy-agent-core-14bq77wr.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vmg30n5x.js → roy-agent-core-1sfbs57v.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-qyqnmz8c.js → roy-agent-core-20m8je6e.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zmeka63k.js → roy-agent-core-2ctyjy62.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-heft3j4c.js → roy-agent-core-2fk8c9ax.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-8cgtwytv.js → roy-agent-core-4096f575.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-yg247mk4.js → roy-agent-core-47s81t6g.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-q7zksbw0.js → roy-agent-core-5f7myqnb.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-zjttt2y4.js → roy-agent-core-7nb23tdd.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-7q4wdze2.js +7 -0
- package/dist/shared/@ai-setting/{roy-agent-core-d4jpn06f.js → roy-agent-core-84rs0c8d.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-c6at31ra.js → roy-agent-core-84xtww7d.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-202v00x4.js → roy-agent-core-89sxsrc7.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ezsyyjxw.js → roy-agent-core-8bngppw0.js} +580 -83
- package/dist/shared/@ai-setting/{roy-agent-core-b599jgyd.js → roy-agent-core-8p63s836.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-5rxs0ra3.js → roy-agent-core-9zhkdg6w.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gn8f4rhs.js → roy-agent-core-baaa4wtp.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-nntphgww.js → roy-agent-core-c36335nw.js} +146 -8
- package/dist/shared/@ai-setting/{roy-agent-core-tc7gw38m.js → roy-agent-core-c7w2h47a.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-j5c3chtn.js → roy-agent-core-cyefe8z5.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-n3b7ztms.js → roy-agent-core-d75t8gea.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-yv9x4wmg.js → roy-agent-core-e1w17tht.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-f8sp1txg.js → roy-agent-core-e250355z.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-9nv586rw.js → roy-agent-core-eanq305k.js} +22 -16
- package/dist/shared/@ai-setting/{roy-agent-core-6qgq7h1g.js → roy-agent-core-em4hks9t.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-0bmk44ye.js → roy-agent-core-en2xqxs9.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-e0wbq0qq.js → roy-agent-core-ewcc5qdt.js} +11 -11
- package/dist/shared/@ai-setting/{roy-agent-core-3kz6934b.js → roy-agent-core-fbjd7bt6.js} +3 -7
- package/dist/shared/@ai-setting/{roy-agent-core-98aa9r0x.js → roy-agent-core-fw6k4w1h.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-ns3pbyz4.js → roy-agent-core-ge87xbas.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-r9qe0ghe.js → roy-agent-core-geh6j7bw.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-wafk25ff.js → roy-agent-core-gksw1gjb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-3dkzqqsd.js → roy-agent-core-hefarcp0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-5gw6w424.js → roy-agent-core-hs41gx9w.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-d14h726p.js → roy-agent-core-jjhw9am6.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-5psjwd08.js → roy-agent-core-jjxdmedn.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2044fbsd.js → roy-agent-core-jw5ar4p0.js} +33 -38
- package/dist/shared/@ai-setting/{roy-agent-core-bwzy00t2.js → roy-agent-core-kq9pz2a7.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-8t7wny6v.js → roy-agent-core-m68z3pw1.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-16t0zfbk.js → roy-agent-core-m97jn2ra.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-kzg1jwt8.js → roy-agent-core-n0p0hwgd.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-xcq04fq0.js → roy-agent-core-psg6f1v6.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-4zy2v3br.js → roy-agent-core-q4gdfypk.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-m8n0dffe.js → roy-agent-core-rcgvmtms.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8seq65bp.js → roy-agent-core-rt115qfc.js} +44 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jszgaevt.js → roy-agent-core-syyw58p9.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-3mc6vmvj.js → roy-agent-core-t4x089js.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qjjf4tjb.js → roy-agent-core-t64nmayv.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-833t16n1.js → roy-agent-core-txwptxk1.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-w7hnjhvx.js → roy-agent-core-tze5596n.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-pjxa78mp.js → roy-agent-core-vath15kt.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-e677am8e.js → roy-agent-core-vgdhxbx3.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-pemxr5n4.js → roy-agent-core-vh0qzb24.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-v2188rnk.js → roy-agent-core-w93z6a42.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-97eyghsp.js → roy-agent-core-ygn5tzt1.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-1pnfkspm.js → roy-agent-core-yphwdm9x.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gngjkw3b.js → roy-agent-core-ytd5eztz.js} +1 -1
- package/dist/utils/temp-file-manager/index.js +2 -2
- package/package.json +1 -1
|
@@ -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-0kn3zt1t.js";
|
|
7
7
|
import {
|
|
8
8
|
globalHookManager,
|
|
9
9
|
init_global_hook_manager
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-yphwdm9x.js";
|
|
11
11
|
import {
|
|
12
12
|
init_context
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-m97jn2ra.js";
|
|
14
14
|
import {
|
|
15
15
|
getEnvContextOrEmpty
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-syyw58p9.js";
|
|
17
17
|
import {
|
|
18
18
|
createLogger,
|
|
19
19
|
init_logger
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
21
21
|
import {
|
|
22
22
|
__require
|
|
23
23
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
WorkflowRepository,
|
|
3
3
|
migrateEmptyTagsToDefault,
|
|
4
4
|
rowToWorkflow
|
|
5
|
-
} from "./roy-agent-core-
|
|
6
|
-
import"./roy-agent-core-
|
|
5
|
+
} from "./roy-agent-core-jjxdmedn.js";
|
|
6
|
+
import"./roy-agent-core-rcgvmtms.js";
|
|
7
7
|
import"./roy-agent-core-rvxg1wps.js";
|
|
8
|
-
import"./roy-agent-core-
|
|
9
|
-
import"./roy-agent-core-
|
|
8
|
+
import"./roy-agent-core-8p63s836.js";
|
|
9
|
+
import"./roy-agent-core-rt115qfc.js";
|
|
10
10
|
import"./roy-agent-core-jnszp0jq.js";
|
|
11
11
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
12
12
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TagRepository
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-rcgvmtms.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-rt115qfc.js";
|
|
12
12
|
import {
|
|
13
13
|
__require,
|
|
14
14
|
__toCommonJS
|
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
createPerTaskGroupChatPlugin,
|
|
8
8
|
extractPerTaskChatId,
|
|
9
9
|
extractPerTaskChatName
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-8bngppw0.js";
|
|
11
11
|
import {
|
|
12
12
|
getSharedEventStore
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-2ctyjy62.js";
|
|
14
14
|
import {
|
|
15
15
|
createLarkCliWorkflowNotifyHook
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-psg6f1v6.js";
|
|
17
17
|
import {
|
|
18
18
|
LarkCardPatchNotifier,
|
|
19
19
|
buildTaskCard
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-c36335nw.js";
|
|
21
21
|
import {
|
|
22
22
|
normalizeLarkAtMentions
|
|
23
23
|
} from "./roy-agent-core-64f22h1g.js";
|
|
@@ -26,29 +26,29 @@ import {
|
|
|
26
26
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
27
27
|
import {
|
|
28
28
|
BaseComponent
|
|
29
|
-
} from "./roy-agent-core-
|
|
29
|
+
} from "./roy-agent-core-0kn3zt1t.js";
|
|
30
30
|
import {
|
|
31
31
|
globalHookManager,
|
|
32
32
|
init_global_hook_manager
|
|
33
|
-
} from "./roy-agent-core-
|
|
33
|
+
} from "./roy-agent-core-yphwdm9x.js";
|
|
34
34
|
import {
|
|
35
35
|
init_context
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-m97jn2ra.js";
|
|
37
37
|
import {
|
|
38
38
|
createEnvContext,
|
|
39
39
|
normalizeParentTaskId,
|
|
40
40
|
runWithEnvContext
|
|
41
|
-
} from "./roy-agent-core-
|
|
41
|
+
} from "./roy-agent-core-syyw58p9.js";
|
|
42
42
|
import {
|
|
43
43
|
TracedAs,
|
|
44
44
|
init_decorator,
|
|
45
45
|
wrapFunction
|
|
46
|
-
} from "./roy-agent-core-
|
|
46
|
+
} from "./roy-agent-core-8p63s836.js";
|
|
47
47
|
import {
|
|
48
48
|
createLogger,
|
|
49
49
|
getTracerProvider,
|
|
50
50
|
init_logger
|
|
51
|
-
} from "./roy-agent-core-
|
|
51
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
52
52
|
import {
|
|
53
53
|
__legacyDecorateClassTS,
|
|
54
54
|
__require
|
|
@@ -1501,14 +1501,6 @@ var BUILT_IN_PLUGIN_FACTORIES = {
|
|
|
1501
1501
|
PerTaskGroupChatPlugin: (cfg) => createPerTaskGroupChatPlugin(cfg),
|
|
1502
1502
|
"task-tag": () => new TaskTagPlugin
|
|
1503
1503
|
};
|
|
1504
|
-
function generateTraceId() {
|
|
1505
|
-
const chars = "0123456789abcdef";
|
|
1506
|
-
let traceId = "";
|
|
1507
|
-
for (let i = 0;i < 32; i++) {
|
|
1508
|
-
traceId += chars[Math.floor(Math.random() * chars.length)];
|
|
1509
|
-
}
|
|
1510
|
-
return traceId;
|
|
1511
|
-
}
|
|
1512
1504
|
function matchEventType(eventType, patterns) {
|
|
1513
1505
|
for (const pattern of patterns) {
|
|
1514
1506
|
if (pattern === "*")
|
|
@@ -2025,7 +2017,8 @@ class LarkCliInstance {
|
|
|
2025
2017
|
"task:after.create",
|
|
2026
2018
|
"task:after.update",
|
|
2027
2019
|
"task:operation:after.create",
|
|
2028
|
-
"task:after.complete"
|
|
2020
|
+
"task:after.complete",
|
|
2021
|
+
"task:after.delete"
|
|
2029
2022
|
];
|
|
2030
2023
|
}
|
|
2031
2024
|
return [];
|
|
@@ -2238,10 +2231,16 @@ class LarkCliInstance {
|
|
|
2238
2231
|
this.dispatchLines(selected);
|
|
2239
2232
|
}
|
|
2240
2233
|
dispatchLines(lines) {
|
|
2234
|
+
const provider = getTracerProvider();
|
|
2241
2235
|
for (const line of lines) {
|
|
2242
|
-
if (line.trim())
|
|
2243
|
-
|
|
2244
|
-
|
|
2236
|
+
if (!line.trim())
|
|
2237
|
+
continue;
|
|
2238
|
+
provider.runInGlobalContextSync(undefined, () => {
|
|
2239
|
+
provider.clearAllTracerCurrentContexts();
|
|
2240
|
+
return this.handleEvent(line);
|
|
2241
|
+
}).catch((err) => {
|
|
2242
|
+
console.error(`[LarkCliInstance] handleEvent rejected: ${err}`);
|
|
2243
|
+
});
|
|
2245
2244
|
}
|
|
2246
2245
|
}
|
|
2247
2246
|
async handleEvent(rawData) {
|
|
@@ -2284,18 +2283,15 @@ class LarkCliInstance {
|
|
|
2284
2283
|
}
|
|
2285
2284
|
const provider = getTracerProvider();
|
|
2286
2285
|
const tracer = provider.getTracer("roy-tracer");
|
|
2287
|
-
const
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
attributes: { rawData: rawData.substring(0, 500) }
|
|
2297
|
-
});
|
|
2298
|
-
provider.setGlobalContext(rootSpan.spanContext);
|
|
2286
|
+
const decoratorContext = tracer.getCurrentContext();
|
|
2287
|
+
let eventTraceContext;
|
|
2288
|
+
if (decoratorContext) {
|
|
2289
|
+
eventTraceContext = decoratorContext;
|
|
2290
|
+
} else {
|
|
2291
|
+
const fallbackSpan = tracer.startSpan("lark-cli.handleEvent", { parent: undefined });
|
|
2292
|
+
eventTraceContext = fallbackSpan.spanContext;
|
|
2293
|
+
fallbackSpan.end();
|
|
2294
|
+
}
|
|
2299
2295
|
let failureReplyChannel;
|
|
2300
2296
|
try {
|
|
2301
2297
|
let rawEvent;
|
|
@@ -2378,7 +2374,8 @@ class LarkCliInstance {
|
|
|
2378
2374
|
replyChannel,
|
|
2379
2375
|
agent,
|
|
2380
2376
|
parentTaskId: parentTaskId ?? undefined,
|
|
2381
|
-
...triggerEventId ? { triggerEventId } : {}
|
|
2377
|
+
...triggerEventId ? { triggerEventId } : {},
|
|
2378
|
+
traceContext: eventTraceContext
|
|
2382
2379
|
},
|
|
2383
2380
|
payload: {
|
|
2384
2381
|
sourceId: this.config.id,
|
|
@@ -2427,13 +2424,11 @@ class LarkCliInstance {
|
|
|
2427
2424
|
});
|
|
2428
2425
|
} catch (error) {
|
|
2429
2426
|
console.error(`[LarkCliInstance] Error handling event: ${error}`);
|
|
2430
|
-
rootSpan.setAttribute("error", String(error));
|
|
2431
2427
|
notifyReactFailure({
|
|
2432
2428
|
error,
|
|
2433
2429
|
replyChannel: failureReplyChannel
|
|
2434
2430
|
}).catch(() => {});
|
|
2435
|
-
|
|
2436
|
-
rootSpan.end();
|
|
2431
|
+
throw error;
|
|
2437
2432
|
}
|
|
2438
2433
|
}
|
|
2439
2434
|
async handleCardActionEvent(rawEvent, profile) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MemorySessionStore,
|
|
3
3
|
SQLiteSessionStore
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-c7w2h47a.js";
|
|
5
5
|
import {
|
|
6
6
|
init_loose_json,
|
|
7
7
|
tryParseJsonFromText
|
|
@@ -16,17 +16,17 @@ import {
|
|
|
16
16
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
17
17
|
import {
|
|
18
18
|
BaseComponent
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-0kn3zt1t.js";
|
|
20
20
|
import {
|
|
21
21
|
TracedAs,
|
|
22
22
|
init_decorator,
|
|
23
23
|
init_trace_filters,
|
|
24
24
|
messagesParamFilter
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-8p63s836.js";
|
|
26
26
|
import {
|
|
27
27
|
createLogger,
|
|
28
28
|
init_logger
|
|
29
|
-
} from "./roy-agent-core-
|
|
29
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
30
30
|
import {
|
|
31
31
|
__legacyDecorateClassTS
|
|
32
32
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LarkCardPatchNotifier,
|
|
3
3
|
formatDurationMs
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-c36335nw.js";
|
|
5
5
|
import {
|
|
6
6
|
WorkflowHookPoints,
|
|
7
7
|
init_workflow_hook_points
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-geh6j7bw.js";
|
|
9
9
|
import {
|
|
10
10
|
init_context
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-m97jn2ra.js";
|
|
12
12
|
import {
|
|
13
13
|
getEnvContextOrEmpty
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-syyw58p9.js";
|
|
15
15
|
import {
|
|
16
16
|
TracedAs,
|
|
17
17
|
init_decorator
|
|
18
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-8p63s836.js";
|
|
19
19
|
import {
|
|
20
20
|
createLogger,
|
|
21
21
|
init_logger
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
23
23
|
import {
|
|
24
24
|
__legacyDecorateClassTS
|
|
25
25
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
getCurrentProcessRegistry,
|
|
9
9
|
killProcessTree
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-14bq77wr.js";
|
|
11
11
|
import {
|
|
12
12
|
init_decorator,
|
|
13
13
|
init_trace_filters,
|
|
14
14
|
toolExecResultFilter,
|
|
15
15
|
toolInvokeParamFilter,
|
|
16
16
|
wrapFunction
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-8p63s836.js";
|
|
18
18
|
import {
|
|
19
19
|
createLogger,
|
|
20
20
|
exports_tracer_provider,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
init_propagation,
|
|
23
23
|
init_tracer_provider,
|
|
24
24
|
propagation
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
26
26
|
import {
|
|
27
27
|
__toCommonJS
|
|
28
28
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -385,6 +385,7 @@ __export(exports_tracer_provider, {
|
|
|
385
385
|
getTracerProvider: () => getTracerProvider,
|
|
386
386
|
OTelTracerProvider: () => OTelTracerProvider
|
|
387
387
|
});
|
|
388
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
388
389
|
function getOtelLogger() {
|
|
389
390
|
if (!_otelLogger) {
|
|
390
391
|
_otelLogger = createLogger("otel-tracer");
|
|
@@ -479,7 +480,12 @@ class OTelTracerImpl {
|
|
|
479
480
|
name;
|
|
480
481
|
version;
|
|
481
482
|
storage;
|
|
482
|
-
currentContext
|
|
483
|
+
get currentContext() {
|
|
484
|
+
return this.provider.getTracerCurrentContext(this.instanceId);
|
|
485
|
+
}
|
|
486
|
+
set currentContext(context) {
|
|
487
|
+
this.provider.setTracerCurrentContext(this.instanceId, context);
|
|
488
|
+
}
|
|
483
489
|
activeSpans = new Map;
|
|
484
490
|
onSpanEndCallback;
|
|
485
491
|
provider;
|
|
@@ -673,6 +679,9 @@ class OTelTracerProvider {
|
|
|
673
679
|
storage;
|
|
674
680
|
initialized = false;
|
|
675
681
|
globalContext;
|
|
682
|
+
globalContextScope = new AsyncLocalStorage;
|
|
683
|
+
tracerContexts = new Map;
|
|
684
|
+
tracerContextScope = new AsyncLocalStorage;
|
|
676
685
|
instanceId;
|
|
677
686
|
constructor(storage, dbPath) {
|
|
678
687
|
providerCounter++;
|
|
@@ -689,11 +698,45 @@ class OTelTracerProvider {
|
|
|
689
698
|
return this.initialized;
|
|
690
699
|
}
|
|
691
700
|
getGlobalContext() {
|
|
701
|
+
const scoped = this.globalContextScope.getStore();
|
|
702
|
+
if (scoped)
|
|
703
|
+
return scoped.value;
|
|
692
704
|
return this.globalContext;
|
|
693
705
|
}
|
|
694
706
|
setGlobalContext(context) {
|
|
695
707
|
this.globalContext = context;
|
|
696
708
|
}
|
|
709
|
+
withGlobalContext(context, fn) {
|
|
710
|
+
const seeded = new Map(this.tracerContexts);
|
|
711
|
+
return this.globalContextScope.run({ value: context }, () => this.tracerContextScope.run({ contexts: seeded }, fn));
|
|
712
|
+
}
|
|
713
|
+
runInGlobalContextSync(context, fn) {
|
|
714
|
+
const seeded = new Map(this.tracerContexts);
|
|
715
|
+
return this.globalContextScope.run({ value: context }, () => this.tracerContextScope.run({ contexts: seeded }, fn));
|
|
716
|
+
}
|
|
717
|
+
getTracerCurrentContext(instanceId) {
|
|
718
|
+
const scoped = this.tracerContextScope.getStore();
|
|
719
|
+
if (scoped) {
|
|
720
|
+
return scoped.contexts.get(instanceId);
|
|
721
|
+
}
|
|
722
|
+
return this.tracerContexts.get(instanceId);
|
|
723
|
+
}
|
|
724
|
+
setTracerCurrentContext(instanceId, context) {
|
|
725
|
+
const scoped = this.tracerContextScope.getStore();
|
|
726
|
+
if (scoped) {
|
|
727
|
+
scoped.contexts.set(instanceId, context);
|
|
728
|
+
return;
|
|
729
|
+
}
|
|
730
|
+
this.tracerContexts.set(instanceId, context);
|
|
731
|
+
}
|
|
732
|
+
clearAllTracerCurrentContexts() {
|
|
733
|
+
const scoped = this.tracerContextScope.getStore();
|
|
734
|
+
if (scoped) {
|
|
735
|
+
scoped.contexts.clear();
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
this.tracerContexts.clear();
|
|
739
|
+
}
|
|
697
740
|
getTracer(name, version) {
|
|
698
741
|
const key = `${name}@${version || "0.0.0"}`;
|
|
699
742
|
let tracer = this.tracers.get(key);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_decorator,
|
|
3
3
|
wrapFunction
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-8p63s836.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
9
9
|
import {
|
|
10
10
|
__esm
|
|
11
11
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseComponent
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-0kn3zt1t.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
12
12
|
|
|
13
13
|
// src/env/commands/commands-component.ts
|
|
14
14
|
import path2 from "path";
|
|
@@ -12,16 +12,16 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
globalHookManager,
|
|
14
14
|
init_global_hook_manager
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-yphwdm9x.js";
|
|
16
16
|
import {
|
|
17
17
|
TracedAs,
|
|
18
18
|
init_decorator,
|
|
19
19
|
wrapFunction
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-8p63s836.js";
|
|
21
21
|
import {
|
|
22
22
|
createLogger,
|
|
23
23
|
init_logger
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
25
25
|
import {
|
|
26
26
|
__esm,
|
|
27
27
|
__legacyDecorateClassTS
|
|
@@ -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-0kn3zt1t.js";
|
|
7
7
|
import {
|
|
8
8
|
init_decorator,
|
|
9
9
|
init_trace_filters
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-8p63s836.js";
|
|
11
11
|
import {
|
|
12
12
|
createLogger,
|
|
13
13
|
getTracerProvider,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
propagation,
|
|
19
19
|
setConfigComponent,
|
|
20
20
|
setQuietMode
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
22
22
|
import {
|
|
23
23
|
SQLiteSpanStorage,
|
|
24
24
|
init_span_storage
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComponentAdapter,
|
|
3
3
|
init_agent_component_adapter
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-txwptxk1.js";
|
|
5
5
|
import"./roy-agent-core-1db4vpc6.js";
|
|
6
6
|
import"./roy-agent-core-ze068vc9.js";
|
|
7
7
|
import"./roy-agent-core-e25xkv53.js";
|
|
8
|
-
import"./roy-agent-core-
|
|
9
|
-
import"./roy-agent-core-
|
|
10
|
-
import"./roy-agent-core-
|
|
11
|
-
import"./roy-agent-core-
|
|
12
|
-
import"./roy-agent-core-
|
|
8
|
+
import"./roy-agent-core-yphwdm9x.js";
|
|
9
|
+
import"./roy-agent-core-m97jn2ra.js";
|
|
10
|
+
import"./roy-agent-core-syyw58p9.js";
|
|
11
|
+
import"./roy-agent-core-8p63s836.js";
|
|
12
|
+
import"./roy-agent-core-rt115qfc.js";
|
|
13
13
|
import"./roy-agent-core-jnszp0jq.js";
|
|
14
14
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
15
15
|
init_agent_component_adapter();
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
TracedAs,
|
|
11
11
|
init_decorator
|
|
12
|
-
} from "./roy-agent-core-
|
|
12
|
+
} from "./roy-agent-core-8p63s836.js";
|
|
13
13
|
import {
|
|
14
14
|
createLogger,
|
|
15
15
|
init_logger
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
17
17
|
import {
|
|
18
18
|
__esm,
|
|
19
19
|
__export,
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
getEnvContextOrEmpty,
|
|
3
3
|
init_env_context,
|
|
4
4
|
setCurrentTaskId
|
|
5
|
-
} from "./roy-agent-core-
|
|
5
|
+
} from "./roy-agent-core-syyw58p9.js";
|
|
6
6
|
import {
|
|
7
7
|
createLogger,
|
|
8
8
|
init_logger
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
10
10
|
|
|
11
11
|
// src/env/task/tools/task-types.ts
|
|
12
12
|
import { z } from "zod";
|
|
@@ -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-txwptxk1.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-d75t8gea.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-hefarcp0.js";
|
|
32
32
|
import {
|
|
33
33
|
WorkflowHookPoints,
|
|
34
34
|
emitWorkflowNodeHook,
|
|
35
35
|
emitWorkflowRunHook
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-geh6j7bw.js";
|
|
37
37
|
import {
|
|
38
38
|
TemplateResolver,
|
|
39
39
|
init_template_resolver
|
|
40
|
-
} from "./roy-agent-core-
|
|
40
|
+
} from "./roy-agent-core-t4x089js.js";
|
|
41
41
|
import {
|
|
42
42
|
DAGManager,
|
|
43
43
|
init_dag_manager
|
|
44
|
-
} from "./roy-agent-core-
|
|
44
|
+
} from "./roy-agent-core-08njdcpj.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-8p63s836.js";
|
|
61
61
|
import {
|
|
62
62
|
createLogger,
|
|
63
63
|
init_logger
|
|
64
|
-
} from "./roy-agent-core-
|
|
64
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
65
65
|
import {
|
|
66
66
|
__esm,
|
|
67
67
|
__export,
|
|
@@ -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-8p63s836.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-rt115qfc.js";
|
|
12
12
|
import {
|
|
13
13
|
__legacyDecorateClassTS
|
|
14
14
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_context
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-m97jn2ra.js";
|
|
4
4
|
import {
|
|
5
5
|
getEnvContext
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-syyw58p9.js";
|
|
7
7
|
import {
|
|
8
8
|
__esm
|
|
9
9
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TempFileManager
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
4
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-n0p0hwgd.js";
|
|
4
|
+
import"../../shared/@ai-setting/roy-agent-core-rt115qfc.js";
|
|
5
5
|
import"../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
7
7
|
export {
|