@ai-setting/roy-agent-core 1.4.14 → 1.4.15
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 +30 -30
- 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} +102 -102
- 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-0hdry23r.js → roy-agent-core-4arba14a.js} +16 -16
- package/dist/shared/@ai-setting/{roy-agent-core-6w4pmxc7.js → roy-agent-core-4rqmfr7t.js} +17 -17
- 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-dde19zke.js → roy-agent-core-5xf65pz6.js} +15 -15
- 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-pd7g8z5v.js → roy-agent-core-9qwp5qkz.js} +16 -16
- 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-9ykq91jc.js → roy-agent-core-cd00w5mb.js} +16 -16
- 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-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-0gekht4e.js → roy-agent-core-jj79gszx.js} +16 -16
- 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-rr9p1g43.js → roy-agent-core-pc9g3962.js} +2 -2
- 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-1f3xrrm6.js → roy-agent-core-pzsg9pvf.js} +11 -11
- 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-3dfq8awb.js → roy-agent-core-re1wjfw7.js} +14 -14
- 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-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/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,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComponentAdapter,
|
|
3
3
|
init_agent_component_adapter
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-pc9g3962.js";
|
|
5
5
|
import {
|
|
6
6
|
SkillNode,
|
|
7
7
|
ToolNode,
|
|
@@ -9,25 +9,25 @@ import {
|
|
|
9
9
|
init_skill_node,
|
|
10
10
|
init_tool_node,
|
|
11
11
|
init_workflow_node
|
|
12
|
-
} from "./roy-agent-core-
|
|
12
|
+
} from "./roy-agent-core-3agad0d9.js";
|
|
13
13
|
import {
|
|
14
14
|
createWorkflowEvent,
|
|
15
15
|
init_event,
|
|
16
16
|
init_types
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-rzp9kxne.js";
|
|
18
18
|
import {
|
|
19
19
|
AskUserError,
|
|
20
20
|
createNodeInterruptEvent,
|
|
21
21
|
init_workflow_hil
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-e25xkv53.js";
|
|
23
23
|
import {
|
|
24
24
|
TracedAs,
|
|
25
25
|
init_decorator
|
|
26
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-35x0wrtt.js";
|
|
27
27
|
import {
|
|
28
28
|
createLogger,
|
|
29
29
|
init_logger
|
|
30
|
-
} from "./roy-agent-core-
|
|
30
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
31
31
|
import {
|
|
32
32
|
__esm,
|
|
33
33
|
__export,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
__require
|
|
36
36
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
37
37
|
|
|
38
|
-
//
|
|
38
|
+
// src/env/workflow/engine/event-bus.ts
|
|
39
39
|
class EventBus {
|
|
40
40
|
handlers = new Map;
|
|
41
41
|
wildcardHandlers = new Set;
|
|
@@ -123,7 +123,7 @@ class EventBus {
|
|
|
123
123
|
}
|
|
124
124
|
var init_event_bus = () => {};
|
|
125
125
|
|
|
126
|
-
//
|
|
126
|
+
// src/env/workflow/engine/dag-manager.ts
|
|
127
127
|
class DAGManager {
|
|
128
128
|
workflow;
|
|
129
129
|
nodeMap;
|
|
@@ -470,7 +470,7 @@ class DAGManager {
|
|
|
470
470
|
}
|
|
471
471
|
var init_dag_manager = () => {};
|
|
472
472
|
|
|
473
|
-
//
|
|
473
|
+
// src/env/workflow/engine/scheduler.ts
|
|
474
474
|
class Scheduler {
|
|
475
475
|
dagManager;
|
|
476
476
|
options;
|
|
@@ -619,7 +619,7 @@ class Scheduler {
|
|
|
619
619
|
}
|
|
620
620
|
var init_scheduler = () => {};
|
|
621
621
|
|
|
622
|
-
//
|
|
622
|
+
// src/env/workflow/engine/executor.ts
|
|
623
623
|
var Executor;
|
|
624
624
|
var init_executor = __esm(() => {
|
|
625
625
|
init_event();
|
|
@@ -946,7 +946,7 @@ var init_executor = __esm(() => {
|
|
|
946
946
|
], Executor.prototype, "writeNodeResume", null);
|
|
947
947
|
});
|
|
948
948
|
|
|
949
|
-
//
|
|
949
|
+
// src/env/workflow/nodes/agent-node.ts
|
|
950
950
|
var AgentNode;
|
|
951
951
|
var init_agent_node = __esm(() => {
|
|
952
952
|
init_workflow_hil();
|
|
@@ -1202,7 +1202,7 @@ var init_agent_node = __esm(() => {
|
|
|
1202
1202
|
], AgentNode.prototype, "createAgentSubSession", null);
|
|
1203
1203
|
});
|
|
1204
1204
|
|
|
1205
|
-
//
|
|
1205
|
+
// src/env/workflow/nodes/ask-user-node.ts
|
|
1206
1206
|
class AskUserNode {
|
|
1207
1207
|
type = "ask_user";
|
|
1208
1208
|
id;
|
|
@@ -1226,7 +1226,7 @@ var init_ask_user_node = __esm(() => {
|
|
|
1226
1226
|
init_workflow_hil();
|
|
1227
1227
|
});
|
|
1228
1228
|
|
|
1229
|
-
//
|
|
1229
|
+
// src/env/workflow/engine/node-registry.ts
|
|
1230
1230
|
class NodeRegistry {
|
|
1231
1231
|
factories = new Map;
|
|
1232
1232
|
toolRegistry;
|
|
@@ -1324,7 +1324,7 @@ var init_node_registry = __esm(() => {
|
|
|
1324
1324
|
init_ask_user_node();
|
|
1325
1325
|
});
|
|
1326
1326
|
|
|
1327
|
-
//
|
|
1327
|
+
// src/env/workflow/engine/engine.ts
|
|
1328
1328
|
import { EventEmitter } from "events";
|
|
1329
1329
|
var logger, WorkflowEngine;
|
|
1330
1330
|
var init_engine = __esm(() => {
|
|
@@ -1451,7 +1451,7 @@ var init_engine = __esm(() => {
|
|
|
1451
1451
|
return { runId: this.getRunIdFromSessionId(sessionId), status: "failed" };
|
|
1452
1452
|
}
|
|
1453
1453
|
const messages = this.sessionComponent ? await this.sessionComponent.getMessages(sessionId) : [];
|
|
1454
|
-
const { inferNextNode } = await import("./roy-agent-core-
|
|
1454
|
+
const { inferNextNode } = await import("./roy-agent-core-qw0ebh1d.js");
|
|
1455
1455
|
const entry = workflowDef.entry;
|
|
1456
1456
|
const entryNode = Array.isArray(entry) ? entry[0] : entry;
|
|
1457
1457
|
const resumePoint = inferNextNode(messages, {
|
|
@@ -2124,7 +2124,7 @@ var init_engine = __esm(() => {
|
|
|
2124
2124
|
], WorkflowEngine.prototype, "failWorkflow", null);
|
|
2125
2125
|
});
|
|
2126
2126
|
|
|
2127
|
-
//
|
|
2127
|
+
// src/env/workflow/engine/index.ts
|
|
2128
2128
|
var exports_engine = {};
|
|
2129
2129
|
__export(exports_engine, {
|
|
2130
2130
|
WorkflowEngine: () => WorkflowEngine,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SQLiteSpanStorage,
|
|
3
3
|
init_span_storage
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-bncgx3gb.js";
|
|
5
5
|
import {
|
|
6
6
|
__esm,
|
|
7
7
|
__export,
|
|
8
8
|
__require
|
|
9
9
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// src/env/log-trace/opentelemetry/propagation.ts
|
|
12
12
|
function padLeft(str, length) {
|
|
13
13
|
return str.padStart(length, "0");
|
|
14
14
|
}
|
|
@@ -74,7 +74,7 @@ var init_propagation = __esm(() => {
|
|
|
74
74
|
};
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
//
|
|
77
|
+
// src/env/log-trace/types.ts
|
|
78
78
|
var SpanKind, SpanStatus;
|
|
79
79
|
var init_types = __esm(() => {
|
|
80
80
|
((SpanKind2) => {
|
|
@@ -88,7 +88,7 @@ var init_types = __esm(() => {
|
|
|
88
88
|
})(SpanStatus ||= {});
|
|
89
89
|
});
|
|
90
90
|
|
|
91
|
-
//
|
|
91
|
+
// src/env/log-trace/opentelemetry/tracer-provider.ts
|
|
92
92
|
var exports_tracer_provider = {};
|
|
93
93
|
__export(exports_tracer_provider, {
|
|
94
94
|
resetTracerProvider: () => resetTracerProvider,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// src/env/memory/built-in/record-memory.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
var RecordMemorySchema = z.object({
|
|
4
4
|
scope: z.enum(["project", "global"]).describe("作用域: project/global"),
|
|
@@ -95,7 +95,7 @@ function buildDescription(getMemoryPaths, getMemoryFile) {
|
|
|
95
95
|
`);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
//
|
|
98
|
+
// src/env/memory/built-in/recall-memory.ts
|
|
99
99
|
import { z as z2 } from "zod";
|
|
100
100
|
var RecallMemorySchema = z2.object({
|
|
101
101
|
scope: z2.enum(["project", "global"]).optional().describe("作用域(可选,不传则读取所有)")
|
|
@@ -160,7 +160,7 @@ function buildDescription2(getMemoryPaths, getMemoryFile) {
|
|
|
160
160
|
`);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
//
|
|
163
|
+
// src/env/memory/built-in/index.ts
|
|
164
164
|
function createMemoryTools(recordMemory, recallMemory, config) {
|
|
165
165
|
return [
|
|
166
166
|
createRecordMemoryTool(recordMemory, config.getMemoryPaths, config.getMemoryFile),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// src/env/hook/hook-manager.ts
|
|
2
2
|
class HookManager {
|
|
3
3
|
_hooks = new Map;
|
|
4
4
|
componentName;
|
|
@@ -143,7 +143,7 @@ class HookManager {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
//
|
|
146
|
+
// src/env/hook/global-hook-manager.ts
|
|
147
147
|
var globalHookManager = new HookManager;
|
|
148
148
|
var AgentHookPoints = {
|
|
149
149
|
BEFORE_START: "agent:before.start",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SQLiteTaskStore,
|
|
3
3
|
getDefaultTaskDbPath
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-2kg2wma8.js";
|
|
5
5
|
import {
|
|
6
6
|
completeTaskTool,
|
|
7
7
|
createTaskTool,
|
|
@@ -9,40 +9,40 @@ import {
|
|
|
9
9
|
getTaskTool,
|
|
10
10
|
listTasksTool,
|
|
11
11
|
updateTaskTool
|
|
12
|
-
} from "./roy-agent-core-
|
|
12
|
+
} from "./roy-agent-core-dbsk841j.js";
|
|
13
13
|
import {
|
|
14
14
|
createOperationTool,
|
|
15
15
|
deleteOperationTool,
|
|
16
16
|
getOperationTool,
|
|
17
17
|
listOperationsTool,
|
|
18
18
|
updateOperationTool
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-t94ktchq.js";
|
|
20
20
|
import {
|
|
21
21
|
BackgroundTaskManager,
|
|
22
22
|
createDelegateTool,
|
|
23
23
|
createStopTool
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-w78syn7w.js";
|
|
25
25
|
import {
|
|
26
26
|
TaskHookPoints
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-92z6t4he.js";
|
|
28
28
|
import {
|
|
29
29
|
envKeyToConfigKey
|
|
30
|
-
} from "./roy-agent-core-
|
|
30
|
+
} from "./roy-agent-core-qxhq8ven.js";
|
|
31
31
|
import {
|
|
32
32
|
BaseComponent
|
|
33
|
-
} from "./roy-agent-core-
|
|
33
|
+
} from "./roy-agent-core-rbetrphj.js";
|
|
34
34
|
import {
|
|
35
35
|
globalHookManager
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-gmnkza34.js";
|
|
37
37
|
import {
|
|
38
38
|
createLogger,
|
|
39
39
|
init_logger
|
|
40
|
-
} from "./roy-agent-core-
|
|
40
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
41
41
|
|
|
42
|
-
//
|
|
42
|
+
// src/env/task/task-component.ts
|
|
43
43
|
init_logger();
|
|
44
44
|
|
|
45
|
-
//
|
|
45
|
+
// src/env/task/task-config-registration.ts
|
|
46
46
|
var TASK_DEFAULTS = {
|
|
47
47
|
"task.storage.type": "sqlite",
|
|
48
48
|
"task.storage.dbPath": undefined
|
|
@@ -58,7 +58,7 @@ var TASK_CONFIG_REGISTRATION = {
|
|
|
58
58
|
]
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
//
|
|
61
|
+
// src/env/task/tag-service.ts
|
|
62
62
|
init_logger();
|
|
63
63
|
var logger = createLogger("task:tag");
|
|
64
64
|
|
|
@@ -142,7 +142,7 @@ class DefaultTagService {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
//
|
|
145
|
+
// src/env/task/task-component.ts
|
|
146
146
|
var logger2 = createLogger("task");
|
|
147
147
|
|
|
148
148
|
class TaskComponent extends BaseComponent {
|
|
@@ -489,7 +489,7 @@ class TaskComponent extends BaseComponent {
|
|
|
489
489
|
return Array.from(this.plugins.values());
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
//
|
|
492
|
+
// src/env/task/types.ts
|
|
493
493
|
import { z } from "zod";
|
|
494
494
|
var TaskStatusEnum = z.enum(["todo", "active", "completed", "paused", "cancelled"]);
|
|
495
495
|
var TaskPriorityEnum = z.enum(["low", "medium", "high"]);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TracedAs,
|
|
3
3
|
init_decorator
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-35x0wrtt.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
9
9
|
import {
|
|
10
10
|
__legacyDecorateClassTS
|
|
11
11
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
12
12
|
|
|
13
|
-
//
|
|
13
|
+
// src/env/agent/summary-agent.ts
|
|
14
14
|
init_logger();
|
|
15
15
|
init_decorator();
|
|
16
16
|
var logger = createLogger("agent:summary");
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTracerProvider,
|
|
3
3
|
init_tracer_provider
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-fv32jaa8.js";
|
|
5
5
|
import {
|
|
6
6
|
__esm,
|
|
7
7
|
__require
|
|
8
8
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
9
9
|
|
|
10
|
-
//
|
|
10
|
+
// src/env/log-trace/logger.ts
|
|
11
11
|
import { appendFileSync, existsSync, mkdirSync } from "fs";
|
|
12
12
|
import { join } from "path";
|
|
13
13
|
function simplifyFilePath(fullPath) {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SessionMessageConverter
|
|
3
|
-
} from "./roy-agent-core-ntrp979d.js";
|
|
4
|
-
import {
|
|
5
|
-
ContextError
|
|
6
|
-
} from "./roy-agent-core-3takar0s.js";
|
|
7
1
|
import {
|
|
8
2
|
AskUserError,
|
|
9
3
|
init_workflow_hil
|
|
10
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-e25xkv53.js";
|
|
11
5
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "./roy-agent-core-04qgbjbe.js";
|
|
6
|
+
ContextError
|
|
7
|
+
} from "./roy-agent-core-ctdhjv68.js";
|
|
15
8
|
import {
|
|
16
9
|
envKeyToConfigKey
|
|
17
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-qxhq8ven.js";
|
|
18
11
|
import {
|
|
19
12
|
BaseComponent
|
|
20
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-rbetrphj.js";
|
|
14
|
+
import {
|
|
15
|
+
SessionMessageConverter
|
|
16
|
+
} from "./roy-agent-core-e62e2a5a.js";
|
|
17
|
+
import {
|
|
18
|
+
TracedAs,
|
|
19
|
+
init_decorator
|
|
20
|
+
} from "./roy-agent-core-35x0wrtt.js";
|
|
21
21
|
import {
|
|
22
22
|
createLogger,
|
|
23
23
|
init_logger
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-j3wc4465.js";
|
|
25
25
|
import {
|
|
26
26
|
__legacyDecorateClassTS
|
|
27
27
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
28
28
|
|
|
29
|
-
//
|
|
29
|
+
// src/env/agent/agent-component.ts
|
|
30
30
|
init_logger();
|
|
31
31
|
import { z } from "zod";
|
|
32
32
|
|
|
33
|
-
//
|
|
33
|
+
// src/env/agent/agent-config-registration.ts
|
|
34
34
|
var AGENT_DEFAULTS = {
|
|
35
35
|
"agent.defaultAgent.maxIterations": 200,
|
|
36
36
|
"agent.defaultAgent.temperature": 0,
|
|
@@ -56,7 +56,7 @@ var AGENT_CONFIG_REGISTRATION = {
|
|
|
56
56
|
]
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
//
|
|
59
|
+
// src/env/agent/agent-component.ts
|
|
60
60
|
init_decorator();
|
|
61
61
|
init_workflow_hil();
|
|
62
62
|
var logger = createLogger("agent:component");
|
|
@@ -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/prompt/types.ts
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
var PromptPathSchema = z.object({
|
|
16
16
|
type: z.enum(["file", "directory"]),
|
|
@@ -31,7 +31,7 @@ var PromptHookPoints = {
|
|
|
31
31
|
AFTER_RENDER: "prompt.after-render"
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
//
|
|
34
|
+
// src/env/prompt/renderer.ts
|
|
35
35
|
class PromptRenderer {
|
|
36
36
|
options;
|
|
37
37
|
constructor(options) {
|
|
@@ -69,7 +69,7 @@ function escapeRegex(str) {
|
|
|
69
69
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
//
|
|
72
|
+
// src/env/prompt/prompts-index.ts
|
|
73
73
|
var builtInPrompts = {
|
|
74
74
|
default: `You are Roy, a versatile AI assistant inspired by Jarvis - intelligent, proactive, and capable.
|
|
75
75
|
|
|
@@ -551,12 +551,12 @@ function getBuiltInPrompt(name) {
|
|
|
551
551
|
return builtInPrompts[name];
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
-
//
|
|
554
|
+
// src/env/prompt/prompt-component.ts
|
|
555
555
|
init_logger();
|
|
556
556
|
import { readFile, readdir } from "fs/promises";
|
|
557
557
|
import { join, basename, extname } from "path";
|
|
558
558
|
|
|
559
|
-
//
|
|
559
|
+
// src/env/prompt/prompt-config-registration.ts
|
|
560
560
|
var PROMPT_DEFAULTS = {
|
|
561
561
|
"prompt.defaultName": "default",
|
|
562
562
|
"prompt.variablePrefix": "{{",
|
|
@@ -575,7 +575,7 @@ var PROMPT_CONFIG_REGISTRATION = {
|
|
|
575
575
|
]
|
|
576
576
|
};
|
|
577
577
|
|
|
578
|
-
//
|
|
578
|
+
// src/env/prompt/prompt-component.ts
|
|
579
579
|
var logger = createLogger("prompt");
|
|
580
580
|
|
|
581
581
|
class PromptComponent extends BaseComponent {
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
__esm
|
|
7
7
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
8
8
|
|
|
9
|
-
//
|
|
9
|
+
// src/env/workflow/nodes/agent-component-adapter.ts
|
|
10
10
|
class AgentComponentAdapter {
|
|
11
11
|
agentComponent;
|
|
12
12
|
options;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// src/env/skill/types.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
var SkillToolSchema = z.object({
|
|
4
4
|
skill: z.string().describe("Skill name to load")
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
//
|
|
7
|
+
// src/env/skill/tool/skill-tool.ts
|
|
8
8
|
function buildSkillDescription(items) {
|
|
9
9
|
const lines = [
|
|
10
10
|
"Load a skill by name. Available skills:",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createMemoryTools
|
|
3
|
+
} from "./roy-agent-core-g1s2h0e5.js";
|
|
1
4
|
import {
|
|
2
5
|
envKeyToConfigKey
|
|
3
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-qxhq8ven.js";
|
|
4
7
|
import {
|
|
5
8
|
BaseComponent
|
|
6
|
-
} from "./roy-agent-core-
|
|
7
|
-
import {
|
|
8
|
-
createMemoryTools
|
|
9
|
-
} from "./roy-agent-core-8mbmrwzs.js";
|
|
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/memory/types.ts
|
|
16
16
|
import { z } from "zod";
|
|
17
17
|
var RecordMemorySchema = z.object({
|
|
18
18
|
scope: z.enum(["project", "global"]).describe("作用域: project/global"),
|
|
@@ -23,7 +23,7 @@ var RecordMemorySchema = z.object({
|
|
|
23
23
|
var RecallMemorySchema = z.object({
|
|
24
24
|
scope: z.enum(["project", "global"]).optional().describe("作用域(可选,不传则读取所有)")
|
|
25
25
|
});
|
|
26
|
-
//
|
|
26
|
+
// src/env/memory/memory-config.ts
|
|
27
27
|
import path from "path";
|
|
28
28
|
import os from "os";
|
|
29
29
|
var DEFAULT_MEMORY_CONFIG = {
|
|
@@ -48,10 +48,10 @@ var SOURCE_PRIORITY = {
|
|
|
48
48
|
function getSourcePriority(source) {
|
|
49
49
|
return SOURCE_PRIORITY[source] ?? 0;
|
|
50
50
|
}
|
|
51
|
-
//
|
|
51
|
+
// src/env/memory/memory-component.ts
|
|
52
52
|
init_logger();
|
|
53
53
|
|
|
54
|
-
//
|
|
54
|
+
// src/env/memory/memory-config-registration.ts
|
|
55
55
|
import path2 from "path";
|
|
56
56
|
import os2 from "os";
|
|
57
57
|
var MEMORY_DEFAULTS = {
|
|
@@ -78,7 +78,7 @@ var MEMORY_CONFIG_REGISTRATION = {
|
|
|
78
78
|
]
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
//
|
|
81
|
+
// src/env/memory/memory-component.ts
|
|
82
82
|
import path3 from "path";
|
|
83
83
|
import fs from "fs/promises";
|
|
84
84
|
var logger = createLogger("memory");
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
initDatabase,
|
|
6
6
|
initializeTables,
|
|
7
7
|
resetDatabase
|
|
8
|
-
} from "./roy-agent-core-
|
|
9
|
-
import"./roy-agent-core-
|
|
10
|
-
import"./roy-agent-core-
|
|
11
|
-
import"./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-37e4tep3.js";
|
|
9
|
+
import"./roy-agent-core-j3wc4465.js";
|
|
10
|
+
import"./roy-agent-core-fv32jaa8.js";
|
|
11
|
+
import"./roy-agent-core-bncgx3gb.js";
|
|
12
12
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
13
13
|
export {
|
|
14
14
|
resetDatabase,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__esm
|
|
3
3
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// src/env/workflow/utils/session-recovery.ts
|
|
6
6
|
function inferNextNode(messages, definition) {
|
|
7
7
|
if (messages.length === 0) {
|
|
8
8
|
return { type: "entry_node", nodeId: definition.entryNode };
|
|
@@ -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/memory/plugin/memory-manager.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
var logger = createLogger("MemoryManagerV3");
|
|
12
12
|
function generateTaskId() {
|
|
@@ -116,12 +116,12 @@ class MemoryManager {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
//
|
|
119
|
+
// src/env/memory/plugin/types.ts
|
|
120
120
|
var DEFAULT_MEMORY_PLUGIN_CONFIG = {
|
|
121
121
|
enabled: true
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
//
|
|
124
|
+
// src/env/memory/plugin/memory-plugin.ts
|
|
125
125
|
init_logger();
|
|
126
126
|
import path from "path";
|
|
127
127
|
import os from "os";
|
|
@@ -197,7 +197,7 @@ class MemoryPlugin {
|
|
|
197
197
|
function createMemoryPlugin(baseDir, config) {
|
|
198
198
|
return new MemoryPlugin(baseDir, config);
|
|
199
199
|
}
|
|
200
|
-
//
|
|
200
|
+
// src/env/memory/plugin/recall-memory.ts
|
|
201
201
|
import fs from "fs/promises";
|
|
202
202
|
import path2 from "path";
|
|
203
203
|
async function recallMemory(memoryPaths) {
|
|
@@ -225,7 +225,7 @@ ${content}`);
|
|
|
225
225
|
|
|
226
226
|
`);
|
|
227
227
|
}
|
|
228
|
-
//
|
|
228
|
+
// src/env/memory/plugin/memory-agent.ts
|
|
229
229
|
var PROJECT_MEMORY_AGENT_PROMPT = `你是项目级 Memory Agent,负责整理和更新当前项目的记忆。
|
|
230
230
|
|
|
231
231
|
## 你的职责
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createHook
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-2dhd60aw.js";
|
|
4
4
|
import {
|
|
5
5
|
HookManager
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-gmnkza34.js";
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// src/env/component.ts
|
|
9
9
|
class BaseComponent {
|
|
10
10
|
_status = "created";
|
|
11
11
|
_enabled = true;
|