@ai-setting/roy-agent-core 1.4.14 → 1.4.16
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/{packages/core/src/config → config}/index.js +7 -7
- package/dist/env/agent/index.js +24 -0
- package/dist/env/commands/index.js +14 -0
- package/dist/env/debug/formatters/index.js +11 -0
- package/dist/env/debug/index.js +26 -0
- package/dist/{packages/core/src/env → env}/hook/index.js +3 -3
- package/dist/env/index.js +81 -0
- package/dist/env/llm/index.js +40 -0
- package/dist/{packages/core/src/env → env}/log-trace/index.js +10 -10
- package/dist/env/mcp/index.js +39 -0
- package/dist/env/mcp/tool/index.js +14 -0
- package/dist/{packages/core/src/env → env}/memory/built-in/index.js +2 -2
- package/dist/{packages/core/src/env → env}/memory/index.js +11 -11
- package/dist/{packages/core/src/env → env}/memory/plugin/index.js +5 -5
- package/dist/env/prompt/index.js +20 -0
- package/dist/env/session/index.js +25 -0
- package/dist/env/session/storage/index.js +18 -0
- package/dist/env/skill/index.js +34 -0
- package/dist/env/skill/tool/index.js +9 -0
- package/dist/env/task/delegate/index.js +18 -0
- package/dist/env/task/hooks/index.js +7 -0
- package/dist/env/task/index.js +30 -0
- package/dist/env/task/plugins/index.js +23 -0
- package/dist/env/task/storage/index.js +14 -0
- package/dist/{packages/core/src/env → env}/task/tools/index.js +2 -2
- package/dist/{packages/core/src/env → env}/task/tools/operation/index.js +2 -2
- package/dist/{packages/core/src/env → env}/tool/built-in/index.js +4 -4
- package/dist/env/tool/index.js +39 -0
- package/dist/{packages/core/src/env → env}/workflow/decorators/index.js +3 -3
- package/dist/env/workflow/engine/index.js +28 -0
- package/dist/{packages/core/src/env → env}/workflow/index.js +20 -20
- package/dist/{packages/core/src/env → env}/workflow/nodes/index.js +3 -3
- package/dist/{packages/core/src/env → env}/workflow/service/index.js +2 -2
- package/dist/env/workflow/storage/index.js +27 -0
- package/dist/{packages/core/src/env → env}/workflow/tools/index.js +7 -7
- package/dist/{packages/core/src/env → env}/workflow/types/index.js +3 -3
- package/dist/{packages/core/src/env → env}/workflow/utils/index.js +10 -10
- package/dist/{packages/core/src/index.js → index.js} +54 -54
- package/dist/shared/@ai-setting/{roy-agent-core-1z1zv5g8.js → roy-agent-core-0rtxwr28.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-nfj6knp5.js → roy-agent-core-0vbdz0x7.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-04fm8177.js → roy-agent-core-12zkpda2.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-3tnb2005.js → roy-agent-core-1ce3fqrk.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-084qqd7t.js → roy-agent-core-2dhd60aw.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8wzz66qe.js → roy-agent-core-2kg2wma8.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2hqxnaf3.js → roy-agent-core-2x0m2p66.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-04qgbjbe.js → roy-agent-core-35x0wrtt.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-qxybm159.js → roy-agent-core-37e4tep3.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5fbp24se.js → roy-agent-core-3agad0d9.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-yt8wdh2w.js → roy-agent-core-4t40mkpv.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-m6y668cc.js → roy-agent-core-561b1c4p.js} +11 -11
- package/dist/shared/@ai-setting/{roy-agent-core-v4aabsf0.js → roy-agent-core-6a72jfdy.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-nczzf0ms.js → roy-agent-core-7f303ffd.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-sbzvpfn7.js → roy-agent-core-7fgf85wc.js} +9 -9
- package/dist/shared/@ai-setting/{roy-agent-core-tkr5ynkh.js → roy-agent-core-7n436rb4.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-yrzmn4m1.js → roy-agent-core-7r85t0qn.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-q50tg9m2.js → roy-agent-core-7rewcey6.js} +11 -11
- package/dist/shared/@ai-setting/{roy-agent-core-pzk1syce.js → roy-agent-core-92z6t4he.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-hyza1gm7.js → roy-agent-core-9yxb3ty9.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-fvd9g6k8.js → roy-agent-core-anwsxdds.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-j8zx62zr.js → roy-agent-core-bncgx3gb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jb2exr0d.js → roy-agent-core-cgs0j60t.js} +12 -12
- package/dist/shared/@ai-setting/{roy-agent-core-3takar0s.js → roy-agent-core-ctdhjv68.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-12x57kf1.js → roy-agent-core-dbsk841j.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-8dvbn7tw.js → roy-agent-core-e25xkv53.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-7vrk3add.js → roy-agent-core-e5jcp24a.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ntrp979d.js → roy-agent-core-e62e2a5a.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-rh9dpkpw.js → roy-agent-core-ewrj1c4k.js} +9 -9
- package/dist/shared/@ai-setting/{roy-agent-core-6j0zcmwk.js → roy-agent-core-fdb6m4e4.js} +16 -16
- package/dist/shared/@ai-setting/{roy-agent-core-1k28kg7h.js → roy-agent-core-fv32jaa8.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-8mbmrwzs.js → roy-agent-core-g1s2h0e5.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-w75rafhy.js → roy-agent-core-gmnkza34.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-3dfq8awb.js → roy-agent-core-h2a7key1.js} +12 -12
- package/dist/shared/@ai-setting/{roy-agent-core-9ykq91jc.js → roy-agent-core-hvvs1g2y.js} +10 -10
- package/dist/shared/@ai-setting/{roy-agent-core-k1rxf9ya.js → roy-agent-core-hz7rr4yx.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-gv1hrn3x.js → roy-agent-core-j3bbr2n0.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-yn761yve.js → roy-agent-core-j3wc4465.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-f7g67gce.js → roy-agent-core-mwwk6req.js} +9 -9
- package/dist/shared/@ai-setting/{roy-agent-core-6w4pmxc7.js → roy-agent-core-nq3qrczq.js} +15 -15
- package/dist/shared/@ai-setting/{roy-agent-core-rr9p1g43.js → roy-agent-core-pc9g3962.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-0gekht4e.js → roy-agent-core-phb2ms02.js} +10 -10
- package/dist/shared/@ai-setting/{roy-agent-core-kydc9nwb.js → roy-agent-core-psvxt4c9.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-qhyerewk.js → roy-agent-core-q779wnwm.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-4ws8atva.js → roy-agent-core-qw0ebh1d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jv3b7v9w.js → roy-agent-core-qxhq8ven.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-5my94ywp.js → roy-agent-core-qxnbvgwe.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-yfbgwes2.js → roy-agent-core-qya7seh6.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-m2x48hw6.js → roy-agent-core-rbetrphj.js} +3 -3
- package/dist/shared/@ai-setting/roy-agent-core-rft3fmp0.js +14 -0
- package/dist/shared/@ai-setting/{roy-agent-core-w76hqkmg.js → roy-agent-core-rvv6ydff.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-0sgn3de4.js → roy-agent-core-rvxg1wps.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-fq5mtxsy.js → roy-agent-core-rzp9kxne.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-gy0wp5h7.js → roy-agent-core-t94ktchq.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-0hdry23r.js → roy-agent-core-vkk0se95.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-1f3xrrm6.js → roy-agent-core-vxfvcmtj.js} +9 -9
- package/dist/shared/@ai-setting/{roy-agent-core-t22nqt4d.js → roy-agent-core-w78syn7w.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-qg9tcaph.js → roy-agent-core-z2t8hse8.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-pd7g8z5v.js → roy-agent-core-z3tepbfw.js} +13 -13
- package/dist/shared/@ai-setting/{roy-agent-core-dde19zke.js → roy-agent-core-zc8csaep.js} +12 -12
- package/package.json +3 -3
- package/dist/packages/core/src/env/agent/index.js +0 -24
- package/dist/packages/core/src/env/commands/index.js +0 -14
- package/dist/packages/core/src/env/debug/formatters/index.js +0 -11
- package/dist/packages/core/src/env/debug/index.js +0 -26
- package/dist/packages/core/src/env/index.js +0 -81
- package/dist/packages/core/src/env/llm/index.js +0 -40
- package/dist/packages/core/src/env/mcp/index.js +0 -39
- package/dist/packages/core/src/env/mcp/tool/index.js +0 -14
- package/dist/packages/core/src/env/prompt/index.js +0 -20
- package/dist/packages/core/src/env/session/index.js +0 -25
- package/dist/packages/core/src/env/session/storage/index.js +0 -18
- package/dist/packages/core/src/env/skill/index.js +0 -34
- package/dist/packages/core/src/env/skill/tool/index.js +0 -9
- package/dist/packages/core/src/env/task/delegate/index.js +0 -18
- package/dist/packages/core/src/env/task/hooks/index.js +0 -7
- package/dist/packages/core/src/env/task/index.js +0 -30
- package/dist/packages/core/src/env/task/plugins/index.js +0 -23
- package/dist/packages/core/src/env/task/storage/index.js +0 -14
- package/dist/packages/core/src/env/tool/index.js +0 -39
- package/dist/packages/core/src/env/workflow/engine/index.js +0 -28
- package/dist/packages/core/src/env/workflow/storage/index.js +0 -27
- package/dist/shared/@ai-setting/roy-agent-core-4vmcvkav.js +0 -14
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TaskHookPoints
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-92z6t4he.js";
|
|
4
4
|
import {
|
|
5
5
|
createLogger,
|
|
6
6
|
init_logger
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
8
8
|
import {
|
|
9
9
|
__require
|
|
10
10
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
11
11
|
|
|
12
|
-
//
|
|
12
|
+
// src/env/task/plugins/task-plugin.ts
|
|
13
13
|
class TaskPlugin {
|
|
14
14
|
config;
|
|
15
15
|
constructor(config = {}) {
|
|
@@ -29,10 +29,10 @@ class TaskPlugin {
|
|
|
29
29
|
this.config.enabled = enabled;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
//
|
|
32
|
+
// src/env/task/plugins/task-tag-plugin.ts
|
|
33
33
|
init_logger();
|
|
34
34
|
|
|
35
|
-
//
|
|
35
|
+
// src/env/task/plugins/workflow-extractor-agent.ts
|
|
36
36
|
var WORKFLOW_EXTRACTOR_PROMPT = `你是 Workflow 提取专家,负责将自然语言描述转换为符合规范的 Workflow YAML。
|
|
37
37
|
|
|
38
38
|
## 提取原则
|
|
@@ -199,7 +199,7 @@ async function parseExtractorOutput(output) {
|
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
//
|
|
202
|
+
// src/env/task/plugins/task-tag-plugin.ts
|
|
203
203
|
var logger = createLogger("task:plugin:tag");
|
|
204
204
|
|
|
205
205
|
class TaskTagPlugin extends TaskPlugin {
|
|
@@ -367,11 +367,11 @@ ${prompt}`;
|
|
|
367
367
|
}
|
|
368
368
|
if (!this._workflowRepo) {
|
|
369
369
|
try {
|
|
370
|
-
const sqlite = await import("./roy-agent-core-
|
|
370
|
+
const sqlite = await import("./roy-agent-core-q779wnwm.js");
|
|
371
371
|
this.ensureDataDir();
|
|
372
372
|
const db = sqlite.getDatabase();
|
|
373
373
|
sqlite.initializeTables();
|
|
374
|
-
const { WorkflowRepository } = await import("./roy-agent-core-
|
|
374
|
+
const { WorkflowRepository } = await import("./roy-agent-core-rft3fmp0.js");
|
|
375
375
|
this._workflowRepo = new WorkflowRepository(db);
|
|
376
376
|
return this._workflowRepo;
|
|
377
377
|
} catch {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLogger,
|
|
3
3
|
init_logger
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
5
5
|
import {
|
|
6
6
|
__require
|
|
7
7
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
8
8
|
|
|
9
|
-
//
|
|
9
|
+
// src/env/task/storage/sqlite-task-store.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
import { join } from "path";
|
|
12
12
|
var logger = createLogger("task:store");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionMessageConverter
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-e62e2a5a.js";
|
|
4
4
|
import {
|
|
5
5
|
__require
|
|
6
6
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// src/env/session/storage/memory.ts
|
|
9
9
|
import { randomUUID } from "crypto";
|
|
10
10
|
function generateSessionId() {
|
|
11
11
|
return `session_${randomUUID()}`;
|
|
@@ -346,7 +346,7 @@ class MemorySessionStore {
|
|
|
346
346
|
this.checkpoints.clear();
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
//
|
|
349
|
+
// src/env/session/storage/sqlite.ts
|
|
350
350
|
import { join } from "path";
|
|
351
351
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
352
352
|
function generateSessionId2() {
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
getMaxOutput,
|
|
4
4
|
init_logger,
|
|
5
5
|
simplifyFilePath
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
7
7
|
import {
|
|
8
8
|
getTracerProvider,
|
|
9
9
|
init_tracer_provider
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-fv32jaa8.js";
|
|
11
11
|
import {
|
|
12
12
|
__esm
|
|
13
13
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
14
14
|
|
|
15
|
-
//
|
|
15
|
+
// src/env/log-trace/decorator.ts
|
|
16
16
|
function Traced(options) {
|
|
17
17
|
return function(target, propertyKey, descriptor) {
|
|
18
18
|
const originalFn = descriptor.value;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLogger,
|
|
3
3
|
init_logger
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
5
5
|
import {
|
|
6
6
|
__require
|
|
7
7
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
8
8
|
|
|
9
|
-
//
|
|
9
|
+
// src/env/workflow/storage/sqlite.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
import { join } from "path";
|
|
12
12
|
var logger = createLogger("workflow:sqlite");
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__esm
|
|
3
3
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// src/env/workflow/nodes/tool-node.ts
|
|
6
6
|
class ToolNode {
|
|
7
7
|
definition;
|
|
8
8
|
toolRegistry;
|
|
@@ -266,7 +266,7 @@ class ToolNode {
|
|
|
266
266
|
}
|
|
267
267
|
var init_tool_node = () => {};
|
|
268
268
|
|
|
269
|
-
//
|
|
269
|
+
// src/env/workflow/nodes/skill-node.ts
|
|
270
270
|
class SkillNode {
|
|
271
271
|
definition;
|
|
272
272
|
skillRegistry;
|
|
@@ -465,7 +465,7 @@ class SkillNode {
|
|
|
465
465
|
}
|
|
466
466
|
var init_skill_node = () => {};
|
|
467
467
|
|
|
468
|
-
//
|
|
468
|
+
// src/env/workflow/nodes/workflow-node.ts
|
|
469
469
|
class WorkflowNode {
|
|
470
470
|
workflowRunner;
|
|
471
471
|
type = "workflow";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// src/env/workflow/service/workflow-service.ts
|
|
2
2
|
class WorkflowService {
|
|
3
3
|
workflowRepository;
|
|
4
4
|
engineFactory;
|
|
@@ -170,7 +170,7 @@ class WorkflowService {
|
|
|
170
170
|
return this.sessionComponent.getMessages(sessionId);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
//
|
|
173
|
+
// src/env/workflow/service/registry.ts
|
|
174
174
|
class WorkflowServiceRegistry {
|
|
175
175
|
static instance;
|
|
176
176
|
service = null;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSkillTool
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-psvxt4c9.js";
|
|
4
4
|
import {
|
|
5
5
|
envKeyToConfigKey
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-qxhq8ven.js";
|
|
7
7
|
import {
|
|
8
8
|
BaseComponent
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-rbetrphj.js";
|
|
10
10
|
import {
|
|
11
11
|
createLogger,
|
|
12
12
|
init_logger
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
14
14
|
|
|
15
|
-
//
|
|
15
|
+
// src/env/skill/skill-component.ts
|
|
16
16
|
init_logger();
|
|
17
17
|
|
|
18
|
-
//
|
|
18
|
+
// src/env/skill/scanner.ts
|
|
19
19
|
init_logger();
|
|
20
20
|
import fs2 from "fs/promises";
|
|
21
21
|
import path2 from "path";
|
|
22
22
|
import { glob } from "glob";
|
|
23
23
|
|
|
24
|
-
//
|
|
24
|
+
// src/env/skill/parser.ts
|
|
25
25
|
init_logger();
|
|
26
26
|
import fs from "fs/promises";
|
|
27
27
|
var logger = createLogger("skill-parser");
|
|
@@ -76,7 +76,7 @@ async function parseSkillFile(filePath, source) {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
//
|
|
79
|
+
// src/env/skill/config.ts
|
|
80
80
|
import path from "path";
|
|
81
81
|
import os from "os";
|
|
82
82
|
var DEFAULT_SKILL_CONFIG = {
|
|
@@ -102,7 +102,7 @@ function getSourcePriority(source) {
|
|
|
102
102
|
return SOURCE_PRIORITY[source] ?? 0;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
//
|
|
105
|
+
// src/env/skill/scanner.ts
|
|
106
106
|
var logger2 = createLogger("skill-scanner");
|
|
107
107
|
function expandPath(inputPath) {
|
|
108
108
|
if (inputPath.startsWith("~/")) {
|
|
@@ -169,7 +169,7 @@ class SkillScanner {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
//
|
|
172
|
+
// src/env/skill/skill-config-registration.ts
|
|
173
173
|
import path3 from "path";
|
|
174
174
|
import os2 from "os";
|
|
175
175
|
var SKILL_DEFAULTS = {
|
|
@@ -192,7 +192,7 @@ var SKILL_CONFIG_REGISTRATION = {
|
|
|
192
192
|
]
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
-
//
|
|
195
|
+
// src/env/skill/skill-component.ts
|
|
196
196
|
var logger3 = createLogger("skill");
|
|
197
197
|
|
|
198
198
|
class SkillComponent extends BaseComponent {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLogger,
|
|
3
3
|
init_logger
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// src/env/mcp/tool/adapter.ts
|
|
7
7
|
init_logger();
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
var logger = createLogger("mcp-adapter");
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
getTracerProvider,
|
|
4
4
|
init_tracer_provider,
|
|
5
5
|
resetTracerProvider
|
|
6
|
-
} from "./roy-agent-core-
|
|
7
|
-
import"./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-fv32jaa8.js";
|
|
7
|
+
import"./roy-agent-core-bncgx3gb.js";
|
|
8
8
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
9
9
|
init_tracer_provider();
|
|
10
10
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_decorator_node
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-1ce3fqrk.js";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// src/env/workflow/decorators/workflow.ts
|
|
6
6
|
import"reflect-metadata";
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// src/env/workflow/metadata/keys.ts
|
|
9
9
|
var WORKFLOW_METADATA_KEY = Symbol("workflow:metadata");
|
|
10
10
|
var NODE_METADATA_KEY = Symbol("workflow:node");
|
|
11
11
|
var EDGE_METADATA_KEY = Symbol("workflow:edges");
|
|
12
12
|
|
|
13
|
-
//
|
|
13
|
+
// src/env/workflow/decorators/workflow.ts
|
|
14
14
|
function Workflow(options) {
|
|
15
15
|
return function(target) {
|
|
16
16
|
const metadata = {
|
|
@@ -29,7 +29,7 @@ function Workflow(options) {
|
|
|
29
29
|
function getWorkflowMetadata(target) {
|
|
30
30
|
return Reflect.getMetadata(WORKFLOW_METADATA_KEY, target);
|
|
31
31
|
}
|
|
32
|
-
//
|
|
32
|
+
// src/env/workflow/decorators/node-as.ts
|
|
33
33
|
import"reflect-metadata";
|
|
34
34
|
function NodeAs(options = {}) {
|
|
35
35
|
return function(target, propertyKey, descriptor) {
|
|
@@ -66,7 +66,7 @@ function normalizeDependsOn(dependsOn) {
|
|
|
66
66
|
function getNodeMetadatas(target) {
|
|
67
67
|
return Reflect.getMetadata(NODE_METADATA_KEY, target) || [];
|
|
68
68
|
}
|
|
69
|
-
//
|
|
69
|
+
// src/env/workflow/decorators/edge.ts
|
|
70
70
|
import"reflect-metadata";
|
|
71
71
|
function Edge(from, to) {
|
|
72
72
|
return function(target, propertyKey, descriptor) {
|
|
@@ -92,10 +92,10 @@ function getEdgeMetadatas(target) {
|
|
|
92
92
|
return Reflect.getMetadata(EDGE_METADATA_KEY, target) || [];
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
//
|
|
95
|
+
// src/env/workflow/decorators/index.ts
|
|
96
96
|
init_decorator_node();
|
|
97
97
|
|
|
98
|
-
//
|
|
98
|
+
// src/env/workflow/extractor/workflow-converter.ts
|
|
99
99
|
import"reflect-metadata";
|
|
100
100
|
class WorkflowConverter {
|
|
101
101
|
static extractWorkflowMetadata(targetClass) {
|
|
@@ -276,7 +276,7 @@ class WorkflowConverter {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
-
//
|
|
279
|
+
// src/env/workflow/utils/create-workflow.ts
|
|
280
280
|
function createWorkflowFromClass(targetClass, options) {
|
|
281
281
|
const instance = options?.instance ?? new targetClass(...options?.constructorArgs ?? []);
|
|
282
282
|
return WorkflowConverter.fromClass(targetClass, instance);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-37e4tep3.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_search_query_parser,
|
|
6
6
|
init_search_query_parser
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-rvxg1wps.js";
|
|
8
8
|
import {
|
|
9
9
|
__toCommonJS
|
|
10
10
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
11
11
|
|
|
12
|
-
//
|
|
12
|
+
// src/env/workflow/storage/workflow-repo.ts
|
|
13
13
|
import { randomUUID } from "crypto";
|
|
14
14
|
function rowToWorkflow(row) {
|
|
15
15
|
const metadata = JSON.parse(row.metadata);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
envKeyToConfigKey,
|
|
3
3
|
toEnvKey
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-qxhq8ven.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseComponent
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-rbetrphj.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
12
12
|
|
|
13
|
-
//
|
|
13
|
+
// src/env/commands/commands-component.ts
|
|
14
14
|
import path2 from "path";
|
|
15
15
|
import os from "os";
|
|
16
16
|
init_logger();
|
|
@@ -18,7 +18,7 @@ import * as fs2 from "fs/promises";
|
|
|
18
18
|
import { exec } from "child_process";
|
|
19
19
|
import { promisify } from "util";
|
|
20
20
|
|
|
21
|
-
//
|
|
21
|
+
// src/env/commands/parser.ts
|
|
22
22
|
init_logger();
|
|
23
23
|
import fs from "fs/promises";
|
|
24
24
|
import path from "path";
|
|
@@ -72,7 +72,7 @@ async function parseMetaFile(filePath, source) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
//
|
|
75
|
+
// src/env/commands/commands-config-registration.ts
|
|
76
76
|
var COMMANDS_CONFIG_REGISTRATION = {
|
|
77
77
|
name: "command",
|
|
78
78
|
sources: [
|
|
@@ -85,7 +85,7 @@ var COMMANDS_CONFIG_REGISTRATION = {
|
|
|
85
85
|
]
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
-
//
|
|
88
|
+
// src/env/commands/commands-component.ts
|
|
89
89
|
var execAsync = promisify(exec);
|
|
90
90
|
var logger2 = createLogger("commands");
|
|
91
91
|
var DEFAULT_USER_DIR = ".roy-agent/commands";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TraceFormatter,
|
|
3
3
|
TreeFormatter
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-rvv6ydff.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseComponent
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-rbetrphj.js";
|
|
8
8
|
import {
|
|
9
9
|
__require
|
|
10
10
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
11
11
|
|
|
12
|
-
//
|
|
12
|
+
// src/env/debug/reader/log-reader.ts
|
|
13
13
|
import * as fs from "fs";
|
|
14
14
|
import * as readline from "readline";
|
|
15
15
|
import * as path from "path";
|
|
@@ -120,7 +120,7 @@ class LogReader {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
//
|
|
123
|
+
// src/env/debug/reader/span-db-reader.ts
|
|
124
124
|
class SpanDbReader {
|
|
125
125
|
storage = null;
|
|
126
126
|
dbPath = null;
|
|
@@ -141,7 +141,7 @@ class SpanDbReader {
|
|
|
141
141
|
}
|
|
142
142
|
async initSqliteStorage() {
|
|
143
143
|
try {
|
|
144
|
-
const { SQLiteSpanStorage } = await import("./roy-agent-core-
|
|
144
|
+
const { SQLiteSpanStorage } = await import("./roy-agent-core-e5jcp24a.js");
|
|
145
145
|
this.storage = new SQLiteSpanStorage(this.dbPath);
|
|
146
146
|
await this.storage.initialize();
|
|
147
147
|
} catch (error) {
|
|
@@ -226,7 +226,7 @@ class SpanDbReader {
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
//
|
|
229
|
+
// src/env/debug/parser/regex-parser.ts
|
|
230
230
|
var TRACE_LINE_REGEX = /^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}\.\d{3})\s+\[(\w+)\]\s+\[([^\]]*)\]\[([^\]]*)\]\s+\[TRACE\]\s+(>>>|<<<|!!!)\s+(.+?)(?:\s+\[requestId=([^\]]+)\])?\s+(enter|quit|error):\s+(.*)$/;
|
|
231
231
|
var REQUEST_ID_IN_CATEGORY_REGEX = /\[requestId=([^\]]+)\]/;
|
|
232
232
|
|
|
@@ -330,7 +330,7 @@ class RegexParser {
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
//
|
|
333
|
+
// src/env/debug/parser/span-builder.ts
|
|
334
334
|
class SpanBuilder {
|
|
335
335
|
parser;
|
|
336
336
|
constructor() {
|
|
@@ -559,7 +559,7 @@ class SpanBuilder {
|
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
//
|
|
562
|
+
// src/env/debug/debug-component.ts
|
|
563
563
|
class DebugComponent extends BaseComponent {
|
|
564
564
|
name = "debug";
|
|
565
565
|
version = "1.0.0";
|
|
@@ -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-7f303ffd.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-7f303ffd.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-7f303ffd.js");
|
|
657
657
|
const provider = getTracerProvider();
|
|
658
658
|
if (!provider.isInitialized()) {
|
|
659
659
|
await provider.initialize();
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
hasDecoratorNodes,
|
|
4
4
|
init_node_registry_helper,
|
|
5
5
|
registerDecoratorNodeType
|
|
6
|
-
} from "./roy-agent-core-
|
|
7
|
-
import"./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-0rtxwr28.js";
|
|
7
|
+
import"./roy-agent-core-1ce3fqrk.js";
|
|
8
8
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
9
9
|
init_node_registry_helper();
|
|
10
10
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
XDG_PATHS
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-qxnbvgwe.js";
|
|
4
4
|
import {
|
|
5
5
|
fromEnvKey,
|
|
6
6
|
toEnvKey
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-qxhq8ven.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseComponent
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-rbetrphj.js";
|
|
11
11
|
import {
|
|
12
12
|
__require
|
|
13
13
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
14
14
|
|
|
15
|
-
//
|
|
15
|
+
// src/config/config-parser.ts
|
|
16
16
|
import { parse as parseJSONCInternal, ParseErrorCode } from "jsonc-parser";
|
|
17
17
|
function parseJSONC(content) {
|
|
18
18
|
const errors = [];
|
|
@@ -120,7 +120,7 @@ function parseJSONCWithProtocols(content, resolver) {
|
|
|
120
120
|
return substituteEnvVars(withProtocols);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
//
|
|
123
|
+
// src/config/file-source.ts
|
|
124
124
|
import * as fsSync from "fs";
|
|
125
125
|
import * as fsPromises from "fs/promises";
|
|
126
126
|
import path from "path";
|
|
@@ -422,7 +422,7 @@ class FileSource {
|
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
|
|
425
|
-
//
|
|
425
|
+
// src/config/env-source.ts
|
|
426
426
|
class EnvSource {
|
|
427
427
|
name = "env";
|
|
428
428
|
priority = 20;
|
|
@@ -613,7 +613,7 @@ class EnvSource {
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
//
|
|
616
|
+
// src/config/protocol-resolver.ts
|
|
617
617
|
var PROTOCOL_PATTERN = /^\$\{([^:]+):\/\/([^:#]+)(?:#([^:-]+))?(?::-(.*))?\}$/;
|
|
618
618
|
|
|
619
619
|
class ProtocolResolver {
|
|
@@ -724,7 +724,7 @@ class ProtocolResolver {
|
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
726
|
|
|
727
|
-
//
|
|
727
|
+
// src/config/config-component.ts
|
|
728
728
|
import * as os from "os";
|
|
729
729
|
import * as path2 from "path";
|
|
730
730
|
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AskUserError,
|
|
3
3
|
init_workflow_hil
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-e25xkv53.js";
|
|
5
5
|
import {
|
|
6
6
|
envKeyToConfigKey,
|
|
7
7
|
toEnvKey
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-qxhq8ven.js";
|
|
9
9
|
import {
|
|
10
10
|
BaseComponent
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-rbetrphj.js";
|
|
12
12
|
import {
|
|
13
13
|
ToolHookPoints,
|
|
14
14
|
globalHookManager
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-gmnkza34.js";
|
|
16
16
|
import {
|
|
17
17
|
createLogger,
|
|
18
18
|
init_logger
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
20
20
|
import {
|
|
21
21
|
__require
|
|
22
22
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
23
|
-
//
|
|
23
|
+
// src/env/tool/tool-component.ts
|
|
24
24
|
import { z } from "zod";
|
|
25
25
|
|
|
26
|
-
//
|
|
26
|
+
// src/env/tool/registry.ts
|
|
27
27
|
class ToolRegistry {
|
|
28
28
|
tools = new Map;
|
|
29
29
|
register(tool, registration) {
|
|
@@ -108,7 +108,7 @@ class ToolRegistry {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
//
|
|
111
|
+
// src/env/tool/validator.ts
|
|
112
112
|
import { ZodError } from "zod";
|
|
113
113
|
|
|
114
114
|
class ToolValidator {
|
|
@@ -138,10 +138,10 @@ class ToolValidator {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
//
|
|
141
|
+
// src/env/tool/tool-component.ts
|
|
142
142
|
init_logger();
|
|
143
143
|
|
|
144
|
-
//
|
|
144
|
+
// src/env/tool/tool-config-registration.ts
|
|
145
145
|
var TOOL_DEFAULTS = {
|
|
146
146
|
"tool.toolsDir": ".roy/tools",
|
|
147
147
|
"tool.builtInTools.enabled": true,
|
|
@@ -167,7 +167,7 @@ var TOOL_CONFIG_REGISTRATION = {
|
|
|
167
167
|
]
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
-
//
|
|
170
|
+
// src/env/tool/tool-component.ts
|
|
171
171
|
init_workflow_hil();
|
|
172
172
|
var logger = createLogger("tool");
|
|
173
173
|
|
|
@@ -404,7 +404,7 @@ class ToolComponent extends BaseComponent {
|
|
|
404
404
|
}
|
|
405
405
|
async loadBuiltInTools() {
|
|
406
406
|
try {
|
|
407
|
-
const { getAllBuiltInTools } = await import("../../
|
|
407
|
+
const { getAllBuiltInTools } = await import("../../env/tool/built-in/index.js");
|
|
408
408
|
const tools = getAllBuiltInTools();
|
|
409
409
|
this.registerMany(tools, "built-in");
|
|
410
410
|
logger.info(`Loaded ${tools.length} built-in tools`);
|