@ai-setting/roy-agent-core 1.7.37 → 1.7.39
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/index.js +10 -10
- package/dist/env/commands/index.js +7 -7
- package/dist/env/context/index.js +7 -3
- package/dist/env/debug/index.js +7 -7
- package/dist/env/event-source/index.js +24 -14
- package/dist/env/hook/index.js +5 -5
- package/dist/env/index.js +33 -32
- package/dist/env/llm/index.js +7 -7
- package/dist/env/log-trace/index.js +7 -7
- 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 +7 -7
- package/dist/env/session/index.js +7 -7
- package/dist/env/skill/index.js +7 -7
- package/dist/env/task/delegate/index.js +7 -6
- package/dist/env/task/index.js +12 -11
- package/dist/env/task/plugins/index.js +7 -7
- 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 +2 -2
- package/dist/env/tool/index.js +8 -8
- package/dist/env/workflow/engine/index.js +9 -9
- package/dist/env/workflow/index.js +17 -17
- package/dist/env/workflow/nodes/index.js +2 -2
- 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 +11 -11
- package/dist/env/workflow/utils/index.js +4 -4
- package/dist/index.js +53 -43
- package/dist/shared/@ai-setting/{roy-agent-core-yf0ex8y1.js → roy-agent-core-333apxaa.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-pxyyrxnn.js → roy-agent-core-34je386q.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-q8vew3zh.js → roy-agent-core-3h7ajma5.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-e4v61k3j.js → roy-agent-core-47wrv4ex.js} +94 -32
- package/dist/shared/@ai-setting/{roy-agent-core-9drbkjfr.js → roy-agent-core-4cj6hram.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-fytqnxrd.js → roy-agent-core-4cqcdk7k.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-zda3rfr3.js → roy-agent-core-4kbvfnn1.js} +54 -5
- package/dist/shared/@ai-setting/{roy-agent-core-bb57xjfh.js → roy-agent-core-5exnp10h.js} +11 -8
- package/dist/shared/@ai-setting/{roy-agent-core-jq7g5nxz.js → roy-agent-core-5j4awbgc.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-1vj7dd14.js → roy-agent-core-6mnwqcqf.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-wgttzq8e.js → roy-agent-core-6vbgswjw.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-1q6gjxba.js → roy-agent-core-6vwf03cz.js} +10 -7
- package/dist/shared/@ai-setting/{roy-agent-core-a8zf7ts4.js → roy-agent-core-754b0078.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-j9ejsmsj.js → roy-agent-core-8nv07zgr.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-yw07bvqz.js → roy-agent-core-9cqpdrnk.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-q3zvkbj6.js → roy-agent-core-9qn92jhf.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-m7dppx2p.js → roy-agent-core-9t675te0.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-fym6zz5a.js → roy-agent-core-a236mps6.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-qhjm0bxm.js → roy-agent-core-a9pbda78.js} +23 -13
- package/dist/shared/@ai-setting/{roy-agent-core-s53yya0w.js → roy-agent-core-asxe1nt4.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-em8618g6.js → roy-agent-core-cazvr63z.js} +237 -14
- package/dist/shared/@ai-setting/{roy-agent-core-ds5f75pg.js → roy-agent-core-ck60j1q9.js} +19 -1
- package/dist/shared/@ai-setting/{roy-agent-core-w457586k.js → roy-agent-core-cw89yj9d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-462v5d24.js → roy-agent-core-cysnmvcy.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-88tfzaxg.js → roy-agent-core-f18jk3cw.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qz9jb9sp.js → roy-agent-core-hkj5v9xq.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-dzfyjzgw.js → roy-agent-core-jadrj0bz.js} +27 -2
- package/dist/shared/@ai-setting/{roy-agent-core-dfay0w56.js → roy-agent-core-jawzpf5k.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-zekkw27m.js → roy-agent-core-jg8cv1f7.js} +128 -29
- package/dist/shared/@ai-setting/{roy-agent-core-mwaesrpc.js → roy-agent-core-jjw7xcxv.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-2qke91fm.js → roy-agent-core-krppch0s.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-mxwaq8ey.js → roy-agent-core-m3ffkexb.js} +13 -13
- package/dist/shared/@ai-setting/{roy-agent-core-2wbdfrtg.js → roy-agent-core-n1ceexfz.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-1btakphh.js → roy-agent-core-pc8x07p0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-d5gwqrr5.js → roy-agent-core-pd0exvnq.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-1nvqn17p.js → roy-agent-core-qfktfbrr.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-x4wev4rn.js → roy-agent-core-rczz7e81.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-e3qjt852.js → roy-agent-core-rgpkygbc.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-rx8whb18.js → roy-agent-core-s44egzrh.js} +35 -4
- package/dist/shared/@ai-setting/{roy-agent-core-k5csz66y.js → roy-agent-core-tm57tmds.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qhtejtpc.js → roy-agent-core-vsrfzaze.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-whta3f53.js → roy-agent-core-wn59p0zw.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-mdaew65f.js → roy-agent-core-wybj8emq.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ddq5hcp5.js → roy-agent-core-x6c45yqd.js} +3 -1
- package/dist/shared/@ai-setting/roy-agent-core-xyys5m1a.js +159 -0
- package/dist/shared/@ai-setting/{roy-agent-core-wphva2vs.js → roy-agent-core-y1n63tse.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-jcdsghyr.js → roy-agent-core-yjjqm4ww.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-n3pwkwjh.js → roy-agent-core-za09t5g3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-n82acszf.js → roy-agent-core-zbb3sk72.js} +17 -3
- package/package.json +1 -1
- /package/dist/shared/@ai-setting/{roy-agent-core-k5hxvaf0.js → roy-agent-core-3ztzc83c.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TagRepository
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-pd0exvnq.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_search_query_parser,
|
|
6
6
|
init_search_query_parser
|
|
@@ -129,9 +129,58 @@ function initDatabase(path) {
|
|
|
129
129
|
return db;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
// src/env/workflow/storage/safe-json.ts
|
|
133
|
+
function parseJsonOrThrow(raw, fieldName, rowCtx = {}) {
|
|
134
|
+
if (raw === null || raw === undefined || raw === "") {
|
|
135
|
+
throw new Error(`[workflow-repo] Required field "${fieldName}" is empty for row id=${rowCtx.id ?? "?"} name=${rowCtx.name ?? "?"}`);
|
|
136
|
+
}
|
|
137
|
+
const str = typeof raw === "string" ? raw : String(raw);
|
|
138
|
+
try {
|
|
139
|
+
return JSON.parse(str);
|
|
140
|
+
} catch (err) {
|
|
141
|
+
const snippet = str.length > 80 ? str.slice(0, 80) + "..." : str;
|
|
142
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
143
|
+
throw new Error(`[workflow-repo] Corrupt JSON in required field "${fieldName}" for row id=${rowCtx.id ?? "?"} name=${rowCtx.name ?? "?"}: ${detail}. Raw: ${snippet}`);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function parseJsonObjectOrEmpty(raw, fieldName) {
|
|
147
|
+
if (raw === null || raw === undefined || raw === "") {
|
|
148
|
+
return {};
|
|
149
|
+
}
|
|
150
|
+
const str = typeof raw === "string" ? raw : String(raw);
|
|
151
|
+
try {
|
|
152
|
+
const parsed = JSON.parse(str);
|
|
153
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
154
|
+
return parsed;
|
|
155
|
+
}
|
|
156
|
+
return {};
|
|
157
|
+
} catch {
|
|
158
|
+
return {};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function parseTagsSafely(raw) {
|
|
162
|
+
if (raw === null || raw === undefined || raw === "") {
|
|
163
|
+
return [];
|
|
164
|
+
}
|
|
165
|
+
const str = typeof raw === "string" ? raw : String(raw);
|
|
166
|
+
try {
|
|
167
|
+
const parsed = JSON.parse(str);
|
|
168
|
+
if (Array.isArray(parsed)) {
|
|
169
|
+
return parsed;
|
|
170
|
+
}
|
|
171
|
+
if (typeof parsed === "string") {
|
|
172
|
+
return [parsed];
|
|
173
|
+
}
|
|
174
|
+
return [];
|
|
175
|
+
} catch {
|
|
176
|
+
return [str];
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
132
180
|
// src/env/workflow/storage/workflow-repo.ts
|
|
133
181
|
function rowToWorkflow(row) {
|
|
134
|
-
const
|
|
182
|
+
const rowCtx = { id: row.id, name: row.name };
|
|
183
|
+
const metadata = parseJsonOrThrow(row.metadata, "metadata", rowCtx);
|
|
135
184
|
if (row.task_id !== null) {
|
|
136
185
|
metadata.taskId = row.task_id;
|
|
137
186
|
}
|
|
@@ -140,10 +189,10 @@ function rowToWorkflow(row) {
|
|
|
140
189
|
name: row.name,
|
|
141
190
|
version: row.version,
|
|
142
191
|
description: row.description || undefined,
|
|
143
|
-
definition:
|
|
144
|
-
config:
|
|
192
|
+
definition: parseJsonOrThrow(row.definition, "definition", rowCtx),
|
|
193
|
+
config: parseJsonObjectOrEmpty(row.config, "config"),
|
|
145
194
|
metadata,
|
|
146
|
-
tags:
|
|
195
|
+
tags: parseTagsSafely(row.tags),
|
|
147
196
|
createdAt: new Date(row.created_at),
|
|
148
197
|
updatedAt: new Date(row.updated_at)
|
|
149
198
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
truncateOutputInline
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-jjw7xcxv.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentRegistry
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-za09t5g3.js";
|
|
7
7
|
import {
|
|
8
8
|
enqueueToAddFakeUserMessage
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-4cj6hram.js";
|
|
10
10
|
import {
|
|
11
11
|
SessionMessageConverter
|
|
12
12
|
} from "./roy-agent-core-djdwq743.js";
|
|
@@ -29,23 +29,24 @@ import {
|
|
|
29
29
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
30
30
|
import {
|
|
31
31
|
BaseComponent
|
|
32
|
-
} from "./roy-agent-core-
|
|
32
|
+
} from "./roy-agent-core-9t675te0.js";
|
|
33
33
|
import {
|
|
34
34
|
globalHookManager,
|
|
35
35
|
init_global_hook_manager
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-a236mps6.js";
|
|
37
37
|
import {
|
|
38
38
|
init_context
|
|
39
|
-
} from "./roy-agent-core-
|
|
39
|
+
} from "./roy-agent-core-wn59p0zw.js";
|
|
40
40
|
import {
|
|
41
41
|
getCurrentTaskId,
|
|
42
42
|
getEnvContext,
|
|
43
|
+
resolveEnvParentTaskId,
|
|
43
44
|
runWithEnvContextAsync
|
|
44
|
-
} from "./roy-agent-core-
|
|
45
|
+
} from "./roy-agent-core-zbb3sk72.js";
|
|
45
46
|
import {
|
|
46
47
|
TracedAs,
|
|
47
48
|
init_decorator
|
|
48
|
-
} from "./roy-agent-core-
|
|
49
|
+
} from "./roy-agent-core-a9pbda78.js";
|
|
49
50
|
import {
|
|
50
51
|
createLogger,
|
|
51
52
|
init_logger
|
|
@@ -866,6 +867,7 @@ class AgentComponent extends BaseComponent {
|
|
|
866
867
|
}
|
|
867
868
|
}
|
|
868
869
|
const parentEnvContext = getEnvContext();
|
|
870
|
+
const envBoundParentTaskId = resolveEnvParentTaskId(effectiveContext.envEvent, parentEnvContext);
|
|
869
871
|
const envContext = {
|
|
870
872
|
...parentEnvContext,
|
|
871
873
|
agentContext: parentEnvContext?.agentContext ?? {},
|
|
@@ -879,6 +881,7 @@ class AgentComponent extends BaseComponent {
|
|
|
879
881
|
replyChannel: parentEnvContext?.replyChannel ?? effectiveContext.envEvent?.metadata?.replyChannel,
|
|
880
882
|
sourceId: parentEnvContext?.sourceId ?? effectiveContext.envEvent?.metadata?.sourceId,
|
|
881
883
|
sourceType: parentEnvContext?.sourceType ?? effectiveContext.envEvent?.metadata?.sourceType,
|
|
884
|
+
parentTaskId: envBoundParentTaskId,
|
|
882
885
|
metadata: { ...effectiveContext.metadata }
|
|
883
886
|
};
|
|
884
887
|
return await runWithEnvContextAsync(envContext, async () => {
|
|
@@ -2,10 +2,10 @@ 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-4kbvfnn1.js";
|
|
6
|
+
import"./roy-agent-core-pd0exvnq.js";
|
|
7
7
|
import"./roy-agent-core-rvxg1wps.js";
|
|
8
|
-
import"./roy-agent-core-
|
|
8
|
+
import"./roy-agent-core-a9pbda78.js";
|
|
9
9
|
import"./roy-agent-core-8seq65bp.js";
|
|
10
10
|
import"./roy-agent-core-jnszp0jq.js";
|
|
11
11
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
searchTasksTool,
|
|
10
10
|
treeTasksTool,
|
|
11
11
|
updateTaskTool
|
|
12
|
-
} from "./roy-agent-core-
|
|
12
|
+
} from "./roy-agent-core-vsrfzaze.js";
|
|
13
13
|
import {
|
|
14
14
|
createOperationTool,
|
|
15
15
|
deleteOperationTool,
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
BackgroundTaskManager,
|
|
28
28
|
createDelegateTool,
|
|
29
29
|
createStopTool
|
|
30
|
-
} from "./roy-agent-core-
|
|
30
|
+
} from "./roy-agent-core-jg8cv1f7.js";
|
|
31
31
|
import {
|
|
32
32
|
SQLiteTaskStore,
|
|
33
33
|
getDefaultTaskDbPath
|
|
34
|
-
} from "./roy-agent-core-
|
|
34
|
+
} from "./roy-agent-core-jadrj0bz.js";
|
|
35
35
|
import {
|
|
36
36
|
TaskHookPoints
|
|
37
37
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
@@ -40,19 +40,19 @@ import {
|
|
|
40
40
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
41
41
|
import {
|
|
42
42
|
BaseComponent
|
|
43
|
-
} from "./roy-agent-core-
|
|
43
|
+
} from "./roy-agent-core-9t675te0.js";
|
|
44
44
|
import {
|
|
45
45
|
globalHookManager,
|
|
46
46
|
init_global_hook_manager
|
|
47
|
-
} from "./roy-agent-core-
|
|
47
|
+
} from "./roy-agent-core-a236mps6.js";
|
|
48
48
|
import {
|
|
49
49
|
getEnvContextOrEmpty,
|
|
50
50
|
init_env_context
|
|
51
|
-
} from "./roy-agent-core-
|
|
51
|
+
} from "./roy-agent-core-zbb3sk72.js";
|
|
52
52
|
import {
|
|
53
53
|
TracedAs,
|
|
54
54
|
init_decorator
|
|
55
|
-
} from "./roy-agent-core-
|
|
55
|
+
} from "./roy-agent-core-a9pbda78.js";
|
|
56
56
|
import {
|
|
57
57
|
createLogger,
|
|
58
58
|
init_logger
|
|
@@ -432,6 +432,9 @@ class TaskComponent extends BaseComponent {
|
|
|
432
432
|
async getTask(id) {
|
|
433
433
|
return this.store.getTask(id);
|
|
434
434
|
}
|
|
435
|
+
async getTaskIdBySessionId(sessionId) {
|
|
436
|
+
return this.store.getTaskIdBySessionId(sessionId);
|
|
437
|
+
}
|
|
435
438
|
async getTaskWithOperations(id) {
|
|
436
439
|
const task = await this.store.getTask(id);
|
|
437
440
|
if (!task)
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAutoTaskPlugin
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-47wrv4ex.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-9t675te0.js";
|
|
11
11
|
import {
|
|
12
12
|
init_context
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-wn59p0zw.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-zbb3sk72.js";
|
|
19
19
|
import {
|
|
20
20
|
TracedAs,
|
|
21
21
|
init_decorator
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-a9pbda78.js";
|
|
23
23
|
import {
|
|
24
24
|
createLogger,
|
|
25
25
|
init_logger
|
|
@@ -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-4kbvfnn1.js";
|
|
9
|
+
import"./roy-agent-core-pd0exvnq.js";
|
|
10
10
|
import"./roy-agent-core-rvxg1wps.js";
|
|
11
|
-
import"./roy-agent-core-
|
|
11
|
+
import"./roy-agent-core-a9pbda78.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TagRepository
|
|
3
|
-
} from "./roy-agent-core-
|
|
4
|
-
import"./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-pd0exvnq.js";
|
|
4
|
+
import"./roy-agent-core-a9pbda78.js";
|
|
5
5
|
import"./roy-agent-core-8seq65bp.js";
|
|
6
6
|
import"./roy-agent-core-jnszp0jq.js";
|
|
7
7
|
import"./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-cw89yj9d.js";
|
|
4
4
|
import {
|
|
5
5
|
HookManager
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-a236mps6.js";
|
|
7
7
|
|
|
8
8
|
// src/env/component.ts
|
|
9
9
|
class BaseComponent {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_context
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-wn59p0zw.js";
|
|
4
4
|
import {
|
|
5
5
|
getEnvContext
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-zbb3sk72.js";
|
|
7
7
|
import {
|
|
8
8
|
__esm
|
|
9
9
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -12,20 +12,30 @@ import {
|
|
|
12
12
|
|
|
13
13
|
// src/env/log-trace/decorator.ts
|
|
14
14
|
function Traced(options) {
|
|
15
|
+
const buildOptions = () => ({
|
|
16
|
+
recordParams: options?.recordParams ?? true,
|
|
17
|
+
recordResult: options?.recordResult ?? false,
|
|
18
|
+
recordError: options?.recordError ?? true,
|
|
19
|
+
log: options?.log ?? false,
|
|
20
|
+
maxLogSize: options?.maxLogSize,
|
|
21
|
+
paramFilter: options?.paramFilter,
|
|
22
|
+
resultFilter: options?.resultFilter,
|
|
23
|
+
flattenParamFilter: options?.flattenParamFilter
|
|
24
|
+
});
|
|
15
25
|
return function(target, propertyKey, descriptor) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
return
|
|
26
|
+
if (descriptor !== undefined && descriptor !== null && typeof descriptor === "object" && "value" in descriptor) {
|
|
27
|
+
const originalFn = descriptor.value;
|
|
28
|
+
const spanName = options?.name || String(propertyKey);
|
|
29
|
+
descriptor.value = wrapFunction(originalFn, spanName, buildOptions());
|
|
30
|
+
return descriptor;
|
|
31
|
+
}
|
|
32
|
+
const value = target;
|
|
33
|
+
const context = propertyKey || {};
|
|
34
|
+
if (typeof value === "function") {
|
|
35
|
+
const spanName = options?.name || (context?.name ? String(context.name) : "anonymous");
|
|
36
|
+
return wrapFunction(value, spanName, buildOptions());
|
|
37
|
+
}
|
|
38
|
+
return value;
|
|
29
39
|
};
|
|
30
40
|
}
|
|
31
41
|
function TracedAs(name, options) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComponentAdapter,
|
|
3
3
|
init_agent_component_adapter
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-3h7ajma5.js";
|
|
5
5
|
import"./roy-agent-core-1db4vpc6.js";
|
|
6
6
|
import"./roy-agent-core-e25xkv53.js";
|
|
7
|
-
import"./roy-agent-core-
|
|
8
|
-
import"./roy-agent-core-
|
|
9
|
-
import"./roy-agent-core-
|
|
10
|
-
import"./roy-agent-core-
|
|
7
|
+
import"./roy-agent-core-a236mps6.js";
|
|
8
|
+
import"./roy-agent-core-wn59p0zw.js";
|
|
9
|
+
import"./roy-agent-core-zbb3sk72.js";
|
|
10
|
+
import"./roy-agent-core-a9pbda78.js";
|
|
11
11
|
import"./roy-agent-core-8seq65bp.js";
|
|
12
12
|
import"./roy-agent-core-jnszp0jq.js";
|
|
13
13
|
import"./roy-agent-core-fs0mn2jk.js";
|