@ai-setting/roy-agent-core 1.7.4 → 1.7.5
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/env/index.js +3 -3
- package/dist/env/workflow/engine/index.js +2 -2
- package/dist/env/workflow/index.js +3 -3
- package/dist/env/workflow/nodes/index.js +1 -1
- package/dist/index.js +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-c9kbf0ce.js → roy-agent-core-7bskb5j2.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ya1tr7xq.js → roy-agent-core-cpfdvzqk.js} +59 -5
- package/dist/shared/@ai-setting/{roy-agent-core-0qjw25e8.js → roy-agent-core-hmqmznjc.js} +33 -1
- package/package.json +1 -1
package/dist/env/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import"../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
|
29
29
|
import"../shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
30
30
|
import {
|
|
31
31
|
WorkflowComponent
|
|
32
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
32
|
+
} from "../shared/@ai-setting/roy-agent-core-7bskb5j2.js";
|
|
33
33
|
import"../shared/@ai-setting/roy-agent-core-7xek618f.js";
|
|
34
34
|
import"../shared/@ai-setting/roy-agent-core-h0x19xgn.js";
|
|
35
35
|
import"../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
@@ -38,10 +38,10 @@ import"../shared/@ai-setting/roy-agent-core-v13dq3nc.js";
|
|
|
38
38
|
import"../shared/@ai-setting/roy-agent-core-wgp3q62x.js";
|
|
39
39
|
import"../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
40
40
|
import"../shared/@ai-setting/roy-agent-core-j9ybhwnq.js";
|
|
41
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
41
|
+
import"../shared/@ai-setting/roy-agent-core-cpfdvzqk.js";
|
|
42
42
|
import"../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
43
43
|
import"../shared/@ai-setting/roy-agent-core-ec4djnzd.js";
|
|
44
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
44
|
+
import"../shared/@ai-setting/roy-agent-core-hmqmznjc.js";
|
|
45
45
|
import"../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
46
46
|
import"../shared/@ai-setting/roy-agent-core-w8rv08d3.js";
|
|
47
47
|
import"../shared/@ai-setting/roy-agent-core-h1cb2jzh.js";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
Scheduler,
|
|
6
6
|
WorkflowEngine,
|
|
7
7
|
init_engine
|
|
8
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../../../shared/@ai-setting/roy-agent-core-cpfdvzqk.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
10
10
|
import"../../../shared/@ai-setting/roy-agent-core-ec4djnzd.js";
|
|
11
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
import"../../../shared/@ai-setting/roy-agent-core-hmqmznjc.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-h1cb2jzh.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-7bskb5j2.js";
|
|
4
4
|
import"../../shared/@ai-setting/roy-agent-core-7xek618f.js";
|
|
5
5
|
import {
|
|
6
6
|
Edge,
|
|
@@ -19,10 +19,10 @@ import"../../shared/@ai-setting/roy-agent-core-v13dq3nc.js";
|
|
|
19
19
|
import"../../shared/@ai-setting/roy-agent-core-wgp3q62x.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
21
21
|
import"../../shared/@ai-setting/roy-agent-core-j9ybhwnq.js";
|
|
22
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
22
|
+
import"../../shared/@ai-setting/roy-agent-core-cpfdvzqk.js";
|
|
23
23
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
24
24
|
import"../../shared/@ai-setting/roy-agent-core-ec4djnzd.js";
|
|
25
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
25
|
+
import"../../shared/@ai-setting/roy-agent-core-hmqmznjc.js";
|
|
26
26
|
import"../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
27
27
|
import"../../shared/@ai-setting/roy-agent-core-w8rv08d3.js";
|
|
28
28
|
import"../../shared/@ai-setting/roy-agent-core-h1cb2jzh.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
init_skill_node,
|
|
8
8
|
init_tool_node,
|
|
9
9
|
init_workflow_node
|
|
10
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
} from "../../../shared/@ai-setting/roy-agent-core-hmqmznjc.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-gb7pm9c0.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-kaq037np.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-1khp1m0r.js";
|
package/dist/index.js
CHANGED
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
} from "./shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
120
120
|
import {
|
|
121
121
|
WorkflowComponent
|
|
122
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
122
|
+
} from "./shared/@ai-setting/roy-agent-core-7bskb5j2.js";
|
|
123
123
|
import {
|
|
124
124
|
init_node_registry_helper,
|
|
125
125
|
registerDecoratorNodeType
|
|
@@ -141,10 +141,10 @@ import {
|
|
|
141
141
|
} from "./shared/@ai-setting/roy-agent-core-wgp3q62x.js";
|
|
142
142
|
import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
143
143
|
import"./shared/@ai-setting/roy-agent-core-j9ybhwnq.js";
|
|
144
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
144
|
+
import"./shared/@ai-setting/roy-agent-core-cpfdvzqk.js";
|
|
145
145
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
146
146
|
import"./shared/@ai-setting/roy-agent-core-ec4djnzd.js";
|
|
147
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
147
|
+
import"./shared/@ai-setting/roy-agent-core-hmqmznjc.js";
|
|
148
148
|
import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
149
149
|
import"./shared/@ai-setting/roy-agent-core-w8rv08d3.js";
|
|
150
150
|
import"./shared/@ai-setting/roy-agent-core-h1cb2jzh.js";
|
|
@@ -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-hmqmznjc.js";
|
|
21
21
|
import {
|
|
22
22
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
23
23
|
init_json_schema_to_zod,
|
|
@@ -1423,6 +1423,57 @@ function mapNonTerminal(agentSessions, terminalStatus) {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
var init_agent_session_metadata = () => {};
|
|
1425
1425
|
|
|
1426
|
+
// src/env/workflow/utils/sensitive-redact.ts
|
|
1427
|
+
function redactSensitiveFields(input) {
|
|
1428
|
+
if (input === undefined || input === null) {
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
if (typeof input !== "object") {
|
|
1432
|
+
return input;
|
|
1433
|
+
}
|
|
1434
|
+
return redactValue(input);
|
|
1435
|
+
}
|
|
1436
|
+
function redactValue(value) {
|
|
1437
|
+
if (value === null || value === undefined) {
|
|
1438
|
+
return value;
|
|
1439
|
+
}
|
|
1440
|
+
if (Array.isArray(value)) {
|
|
1441
|
+
return value.map((item) => redactValue(item));
|
|
1442
|
+
}
|
|
1443
|
+
if (typeof value !== "object") {
|
|
1444
|
+
return value;
|
|
1445
|
+
}
|
|
1446
|
+
const obj = value;
|
|
1447
|
+
const result = {};
|
|
1448
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
1449
|
+
if (SENSITIVE_KEYS.has(k.toLowerCase())) {
|
|
1450
|
+
result[k] = REDACTED_SENTINEL;
|
|
1451
|
+
} else {
|
|
1452
|
+
result[k] = redactValue(v);
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
return result;
|
|
1456
|
+
}
|
|
1457
|
+
var REDACTED_SENTINEL = "[REDACTED]", SENSITIVE_KEYS;
|
|
1458
|
+
var init_sensitive_redact = __esm(() => {
|
|
1459
|
+
SENSITIVE_KEYS = new Set([
|
|
1460
|
+
"password",
|
|
1461
|
+
"ldap_password",
|
|
1462
|
+
"apikey",
|
|
1463
|
+
"api_key",
|
|
1464
|
+
"token",
|
|
1465
|
+
"secret",
|
|
1466
|
+
"auth",
|
|
1467
|
+
"access_token",
|
|
1468
|
+
"refresh_token",
|
|
1469
|
+
"authorization",
|
|
1470
|
+
"cookie",
|
|
1471
|
+
"private_key",
|
|
1472
|
+
"session_token",
|
|
1473
|
+
"sid"
|
|
1474
|
+
]);
|
|
1475
|
+
});
|
|
1476
|
+
|
|
1426
1477
|
// src/env/workflow/runtime/runtime-cancellation-scope.ts
|
|
1427
1478
|
var RuntimeCancellationScope;
|
|
1428
1479
|
var init_runtime_cancellation_scope = __esm(() => {
|
|
@@ -1561,6 +1612,7 @@ var init_engine = __esm(() => {
|
|
|
1561
1612
|
init_decorator();
|
|
1562
1613
|
init_template_resolver();
|
|
1563
1614
|
init_workflow_error();
|
|
1615
|
+
init_sensitive_redact();
|
|
1564
1616
|
init_runtime_cancellation_scope();
|
|
1565
1617
|
execFileAsync = promisify(execFileCb);
|
|
1566
1618
|
logger3 = createLogger("workflow:engine");
|
|
@@ -1676,7 +1728,7 @@ var init_engine = __esm(() => {
|
|
|
1676
1728
|
workflowName,
|
|
1677
1729
|
workflowVersion: workflowDef.version,
|
|
1678
1730
|
status: "running",
|
|
1679
|
-
input: options?.input,
|
|
1731
|
+
input: redactSensitiveFields(options?.input),
|
|
1680
1732
|
agentSessions: []
|
|
1681
1733
|
};
|
|
1682
1734
|
await this.sessionComponent.create({
|
|
@@ -1706,14 +1758,16 @@ var init_engine = __esm(() => {
|
|
|
1706
1758
|
const hasNewInput = typeof options.input === "string" ? options.input !== undefined && options.input !== "" : Object.keys(options.input).length > 0;
|
|
1707
1759
|
if (hasNewInput) {
|
|
1708
1760
|
const existingInput = metadata.input || {};
|
|
1709
|
-
const
|
|
1761
|
+
const newInputRaw = typeof options.input === "string" ? { userQuery: options.input } : options.input;
|
|
1762
|
+
const newInput = redactSensitiveFields(newInputRaw);
|
|
1763
|
+
const mergedInput = { ...existingInput, ...newInput };
|
|
1710
1764
|
await this.sessionComponent.update(sessionId, {
|
|
1711
1765
|
metadata: {
|
|
1712
1766
|
...metadata,
|
|
1713
|
-
input:
|
|
1767
|
+
input: mergedInput
|
|
1714
1768
|
}
|
|
1715
1769
|
});
|
|
1716
|
-
metadata.input =
|
|
1770
|
+
metadata.input = mergedInput;
|
|
1717
1771
|
logger3.info(`[WorkflowEngine] Updated session ${sessionId} input with resume user input`);
|
|
1718
1772
|
}
|
|
1719
1773
|
}
|
|
@@ -125,9 +125,10 @@ var init_tool_node = __esm(() => {
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
const extractedOutput = this.extractFromWrapper(output);
|
|
128
|
+
const wrapperError = this.extractErrorFromWrapper(output);
|
|
128
129
|
return {
|
|
129
130
|
output: extractedOutput,
|
|
130
|
-
error:
|
|
131
|
+
error: wrapperError,
|
|
131
132
|
durationMs: Date.now() - startTime
|
|
132
133
|
};
|
|
133
134
|
} catch (error) {
|
|
@@ -158,6 +159,37 @@ var init_tool_node = __esm(() => {
|
|
|
158
159
|
}
|
|
159
160
|
return result;
|
|
160
161
|
}
|
|
162
|
+
extractErrorFromWrapper(value) {
|
|
163
|
+
if (value === null || value === undefined) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (typeof value !== "object") {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const obj = value;
|
|
170
|
+
if (obj.success !== false) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const err = obj.error;
|
|
174
|
+
if (typeof err === "string" && err.length > 0) {
|
|
175
|
+
return err;
|
|
176
|
+
}
|
|
177
|
+
if (err instanceof Error) {
|
|
178
|
+
return err;
|
|
179
|
+
}
|
|
180
|
+
const md = obj.metadata;
|
|
181
|
+
if (md) {
|
|
182
|
+
if (md.timed_out === true) {
|
|
183
|
+
const ms = typeof md.execution_time_ms === "number" ? md.execution_time_ms : 0;
|
|
184
|
+
return `Tool execution timed out after ${ms}ms`;
|
|
185
|
+
}
|
|
186
|
+
if (typeof md.exit_code === "number" && md.exit_code !== 0) {
|
|
187
|
+
const stderr = typeof md.stderr === "string" ? md.stderr : "";
|
|
188
|
+
return stderr.length > 0 ? stderr : `Tool exited with code ${md.exit_code}`;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return `Tool execution failed (success=false, no error message)`;
|
|
192
|
+
}
|
|
161
193
|
};
|
|
162
194
|
__legacyDecorateClassTS([
|
|
163
195
|
TracedAs("workflow.tool.execute")
|