@ai-setting/roy-agent-core 1.5.3 → 1.5.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/agent/index.js +7 -7
- package/dist/env/commands/index.js +4 -4
- package/dist/env/debug/index.js +1 -1
- package/dist/env/index.js +15 -15
- package/dist/env/llm/index.js +5 -5
- package/dist/env/log-trace/index.js +5 -5
- package/dist/env/mcp/index.js +5 -5
- package/dist/env/mcp/tool/index.js +4 -4
- package/dist/env/memory/index.js +5 -5
- package/dist/env/memory/plugin/index.js +4 -4
- package/dist/env/prompt/index.js +4 -4
- package/dist/env/session/index.js +8 -8
- package/dist/env/session/storage/index.js +6 -6
- package/dist/env/skill/index.js +4 -4
- package/dist/env/task/delegate/index.js +4 -4
- package/dist/env/task/index.js +6 -6
- package/dist/env/task/plugins/index.js +4 -4
- package/dist/env/task/storage/index.js +4 -4
- package/dist/env/tool/built-in/index.js +3 -3
- package/dist/env/tool/index.js +5 -5
- package/dist/env/workflow/engine/index.js +5 -5
- package/dist/env/workflow/index.js +6 -6
- package/dist/env/workflow/storage/index.js +5 -5
- package/dist/env/workflow/tools/index.js +3 -3
- package/dist/env/workflow/utils/index.js +4 -4
- package/dist/index.js +28 -28
- package/dist/shared/@ai-setting/{roy-agent-core-12zkpda2.js → roy-agent-core-3jywqmdd.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-7n436rb4.js → roy-agent-core-3rr5k71j.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zfbxb999.js → roy-agent-core-3xwneva0.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-j3wc4465.js → roy-agent-core-44hnfb02.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-cv890rg5.js → roy-agent-core-4txzpsbt.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qya7seh6.js → roy-agent-core-6kvtahqv.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-kv5nkf8j.js → roy-agent-core-81w1963m.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-zqjdy75r.js → roy-agent-core-93zfb3r1.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-bcbqy27c.js +14 -0
- package/dist/shared/@ai-setting/{roy-agent-core-nga1gqft.js → roy-agent-core-c0jcxnf4.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2x0m2p66.js → roy-agent-core-d7cyjkf7.js} +24 -3
- package/dist/shared/@ai-setting/{roy-agent-core-j3bbr2n0.js → roy-agent-core-eajcvp4e.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-fsvb6bwe.js → roy-agent-core-f0cc2ep9.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-m61m1vqf.js → roy-agent-core-f7q2x5z6.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8a96qnjv.js → roy-agent-core-g99pxzn5.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-5v9bh6wz.js → roy-agent-core-gbqcyegm.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2kg2wma8.js → roy-agent-core-htwpckw9.js} +24 -3
- package/dist/shared/@ai-setting/{roy-agent-core-e62e2a5a.js → roy-agent-core-jfh9q2qh.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-fdb6m4e4.js → roy-agent-core-kkp3qmc3.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-j8q93v21.js → roy-agent-core-n2cvdgd6.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-6a72jfdy.js → roy-agent-core-nhdrvfp8.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bncgx3gb.js → roy-agent-core-psv4v63c.js} +24 -2
- package/dist/shared/@ai-setting/{roy-agent-core-p4xv133t.js → roy-agent-core-qqceba6k.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-e5jcp24a.js → roy-agent-core-r9ezzemr.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ewrj1c4k.js → roy-agent-core-satmq6sh.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-7f303ffd.js → roy-agent-core-sx7wsvnn.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-q779wnwm.js → roy-agent-core-wft9ra24.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-8y8tw6ns.js → roy-agent-core-xq8hhqb8.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-fv32jaa8.js → roy-agent-core-xs5rsgat.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-r973kbm7.js → roy-agent-core-ya8krqzt.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-t2nc5acr.js → roy-agent-core-z62zee1e.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-72zpazpc.js → roy-agent-core-zbkpc41z.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-35x0wrtt.js → roy-agent-core-zgypchmt.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-37e4tep3.js → roy-agent-core-zpn0bqa8.js} +24 -3
- package/package.json +9 -8
- package/dist/shared/@ai-setting/roy-agent-core-rft3fmp0.js +0 -14
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LogTraceComponent,
|
|
3
3
|
LogTraceConfigSchema
|
|
4
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "./shared/@ai-setting/roy-agent-core-xq8hhqb8.js";
|
|
5
5
|
import {
|
|
6
6
|
ToolComponent,
|
|
7
7
|
ToolRegistry,
|
|
8
8
|
ToolValidator
|
|
9
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
9
|
+
} from "./shared/@ai-setting/roy-agent-core-qqceba6k.js";
|
|
10
10
|
import {
|
|
11
11
|
bashTool,
|
|
12
12
|
editFileTool,
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
grepTool,
|
|
17
17
|
readFileTool,
|
|
18
18
|
writeFileTool
|
|
19
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
19
|
+
} from "./shared/@ai-setting/roy-agent-core-satmq6sh.js";
|
|
20
20
|
import {
|
|
21
21
|
PromptComponent,
|
|
22
22
|
getBuiltInPrompt,
|
|
23
23
|
getBuiltInPromptNames
|
|
24
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
24
|
+
} from "./shared/@ai-setting/roy-agent-core-93zfb3r1.js";
|
|
25
25
|
import {
|
|
26
26
|
LLMComponent,
|
|
27
27
|
LLMConfigSchema,
|
|
@@ -33,28 +33,28 @@ import {
|
|
|
33
33
|
invoke,
|
|
34
34
|
invokeNonStream,
|
|
35
35
|
parseModelString
|
|
36
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
36
|
+
} from "./shared/@ai-setting/roy-agent-core-3xwneva0.js";
|
|
37
37
|
import {
|
|
38
38
|
ConfigComponent
|
|
39
39
|
} from "./shared/@ai-setting/roy-agent-core-vn2bc59q.js";
|
|
40
40
|
import {
|
|
41
41
|
MemoryComponent
|
|
42
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
42
|
+
} from "./shared/@ai-setting/roy-agent-core-4txzpsbt.js";
|
|
43
43
|
import"./shared/@ai-setting/roy-agent-core-g1s2h0e5.js";
|
|
44
44
|
import {
|
|
45
45
|
MemoryPlugin,
|
|
46
46
|
createMemoryPlugin
|
|
47
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
47
|
+
} from "./shared/@ai-setting/roy-agent-core-6kvtahqv.js";
|
|
48
48
|
import {
|
|
49
49
|
CommandsComponent
|
|
50
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
50
|
+
} from "./shared/@ai-setting/roy-agent-core-f7q2x5z6.js";
|
|
51
51
|
import {
|
|
52
52
|
TaskPlugin,
|
|
53
53
|
TaskTagPlugin
|
|
54
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
54
|
+
} from "./shared/@ai-setting/roy-agent-core-3jywqmdd.js";
|
|
55
55
|
import {
|
|
56
56
|
DebugComponent
|
|
57
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
57
|
+
} from "./shared/@ai-setting/roy-agent-core-g99pxzn5.js";
|
|
58
58
|
import {
|
|
59
59
|
ReplFormatter,
|
|
60
60
|
TraceFormatter,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
EventSourceComponent,
|
|
67
67
|
generateDescendingId,
|
|
68
68
|
generateId
|
|
69
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
69
|
+
} from "./shared/@ai-setting/roy-agent-core-gbqcyegm.js";
|
|
70
70
|
import {
|
|
71
71
|
XDG_PATHS,
|
|
72
72
|
getXDGPath,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
} from "./shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
75
75
|
import {
|
|
76
76
|
WorkflowComponent
|
|
77
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
77
|
+
} from "./shared/@ai-setting/roy-agent-core-ya8krqzt.js";
|
|
78
78
|
import {
|
|
79
79
|
init_node_registry_helper,
|
|
80
80
|
registerDecoratorNodeType
|
|
@@ -89,35 +89,35 @@ import {
|
|
|
89
89
|
createWorkflowFromClass
|
|
90
90
|
} from "./shared/@ai-setting/roy-agent-core-7fgf85wc.js";
|
|
91
91
|
import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
92
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
92
|
+
import"./shared/@ai-setting/roy-agent-core-kkp3qmc3.js";
|
|
93
93
|
import"./shared/@ai-setting/roy-agent-core-pc9g3962.js";
|
|
94
94
|
import"./shared/@ai-setting/roy-agent-core-3agad0d9.js";
|
|
95
95
|
import"./shared/@ai-setting/roy-agent-core-rzp9kxne.js";
|
|
96
96
|
import {
|
|
97
97
|
AgentComponent,
|
|
98
98
|
AgentComponentConfigSchema
|
|
99
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
99
|
+
} from "./shared/@ai-setting/roy-agent-core-f0cc2ep9.js";
|
|
100
100
|
import {
|
|
101
101
|
AskUserError,
|
|
102
102
|
init_workflow_hil
|
|
103
103
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
104
104
|
import {
|
|
105
105
|
TaskComponent
|
|
106
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
107
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
106
|
+
} from "./shared/@ai-setting/roy-agent-core-n2cvdgd6.js";
|
|
107
|
+
import"./shared/@ai-setting/roy-agent-core-htwpckw9.js";
|
|
108
108
|
import"./shared/@ai-setting/roy-agent-core-dbsk841j.js";
|
|
109
109
|
import"./shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
110
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
110
|
+
import"./shared/@ai-setting/roy-agent-core-z62zee1e.js";
|
|
111
111
|
import {
|
|
112
112
|
TaskHookPoints
|
|
113
113
|
} from "./shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
|
114
114
|
import {
|
|
115
115
|
SkillComponent
|
|
116
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
116
|
+
} from "./shared/@ai-setting/roy-agent-core-zbkpc41z.js";
|
|
117
117
|
import"./shared/@ai-setting/roy-agent-core-psvxt4c9.js";
|
|
118
118
|
import {
|
|
119
119
|
McpComponent
|
|
120
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
120
|
+
} from "./shared/@ai-setting/roy-agent-core-c0jcxnf4.js";
|
|
121
121
|
import {
|
|
122
122
|
AgentError,
|
|
123
123
|
ComponentError,
|
|
@@ -129,12 +129,12 @@ import {
|
|
|
129
129
|
getErrorCode,
|
|
130
130
|
isRoyError
|
|
131
131
|
} from "./shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
132
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
132
|
+
import"./shared/@ai-setting/roy-agent-core-nhdrvfp8.js";
|
|
133
133
|
import {
|
|
134
134
|
SessionComponent
|
|
135
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
135
|
+
} from "./shared/@ai-setting/roy-agent-core-81w1963m.js";
|
|
136
136
|
import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
137
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
137
|
+
import"./shared/@ai-setting/roy-agent-core-eajcvp4e.js";
|
|
138
138
|
import"./shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
139
139
|
import {
|
|
140
140
|
BaseComponent
|
|
@@ -149,14 +149,14 @@ import {
|
|
|
149
149
|
} from "./shared/@ai-setting/roy-agent-core-gjq1yk68.js";
|
|
150
150
|
import {
|
|
151
151
|
MemorySessionStore
|
|
152
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
153
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
152
|
+
} from "./shared/@ai-setting/roy-agent-core-d7cyjkf7.js";
|
|
153
|
+
import"./shared/@ai-setting/roy-agent-core-jfh9q2qh.js";
|
|
154
154
|
import {
|
|
155
155
|
Traced,
|
|
156
156
|
TracedAs,
|
|
157
157
|
TracedLightweight,
|
|
158
158
|
wrapFunction
|
|
159
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
159
|
+
} from "./shared/@ai-setting/roy-agent-core-zgypchmt.js";
|
|
160
160
|
import {
|
|
161
161
|
createLogger,
|
|
162
162
|
getLogDir,
|
|
@@ -166,7 +166,7 @@ import {
|
|
|
166
166
|
setConfigComponent,
|
|
167
167
|
setLogDirOverride,
|
|
168
168
|
setQuietMode
|
|
169
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
169
|
+
} from "./shared/@ai-setting/roy-agent-core-44hnfb02.js";
|
|
170
170
|
import {
|
|
171
171
|
OTelTracerProvider,
|
|
172
172
|
SpanKind,
|
|
@@ -174,10 +174,10 @@ import {
|
|
|
174
174
|
getTracerProvider,
|
|
175
175
|
propagation,
|
|
176
176
|
resetTracerProvider
|
|
177
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
177
|
+
} from "./shared/@ai-setting/roy-agent-core-xs5rsgat.js";
|
|
178
178
|
import {
|
|
179
179
|
SQLiteSpanStorage
|
|
180
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
180
|
+
} from "./shared/@ai-setting/roy-agent-core-psv4v63c.js";
|
|
181
181
|
import"./shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
182
182
|
// src/env/memory/tools/memory-agent-tools.ts
|
|
183
183
|
import { z } from "zod";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createLogger,
|
|
6
6
|
init_logger
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-44hnfb02.js";
|
|
8
8
|
import {
|
|
9
9
|
__require
|
|
10
10
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -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-wft9ra24.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-bcbqy27c.js");
|
|
375
375
|
this._workflowRepo = new WorkflowRepository(db);
|
|
376
376
|
return this._workflowRepo;
|
|
377
377
|
} catch {
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
TracedAs,
|
|
18
18
|
init_decorator
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-zgypchmt.js";
|
|
20
20
|
import {
|
|
21
21
|
createLogger,
|
|
22
22
|
init_logger
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-44hnfb02.js";
|
|
24
24
|
import {
|
|
25
25
|
__legacyDecorateClassTS,
|
|
26
26
|
__require
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./roy-agent-core-rvxg1wps.js";
|
|
6
6
|
import {
|
|
7
7
|
SummaryAgent
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-eajcvp4e.js";
|
|
9
9
|
import {
|
|
10
10
|
envKeyToConfigKey
|
|
11
11
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
MemorySessionStore,
|
|
17
17
|
SQLiteSessionStore
|
|
18
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-d7cyjkf7.js";
|
|
19
19
|
import {
|
|
20
20
|
TracedAs,
|
|
21
21
|
init_decorator
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-zgypchmt.js";
|
|
23
23
|
import {
|
|
24
24
|
createLogger,
|
|
25
25
|
init_logger
|
|
26
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-44hnfb02.js";
|
|
27
27
|
import {
|
|
28
28
|
__legacyDecorateClassTS
|
|
29
29
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WorkflowRepository,
|
|
3
|
+
rowToWorkflow
|
|
4
|
+
} from "./roy-agent-core-3rr5k71j.js";
|
|
5
|
+
import"./roy-agent-core-zpn0bqa8.js";
|
|
6
|
+
import"./roy-agent-core-rvxg1wps.js";
|
|
7
|
+
import"./roy-agent-core-44hnfb02.js";
|
|
8
|
+
import"./roy-agent-core-xs5rsgat.js";
|
|
9
|
+
import"./roy-agent-core-psv4v63c.js";
|
|
10
|
+
import"./roy-agent-core-fs0mn2jk.js";
|
|
11
|
+
export {
|
|
12
|
+
rowToWorkflow,
|
|
13
|
+
WorkflowRepository
|
|
14
|
+
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./roy-agent-core-ctdhjv68.js";
|
|
5
5
|
import {
|
|
6
6
|
adaptMcpTool
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-nhdrvfp8.js";
|
|
8
8
|
import {
|
|
9
9
|
toEnvKey
|
|
10
10
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
createLogger,
|
|
16
16
|
init_logger
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-44hnfb02.js";
|
|
18
18
|
|
|
19
19
|
// src/env/mcp/types.ts
|
|
20
20
|
import { z } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionMessageConverter
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-jfh9q2qh.js";
|
|
4
4
|
import {
|
|
5
5
|
__require
|
|
6
6
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -349,6 +349,28 @@ class MemorySessionStore {
|
|
|
349
349
|
// src/env/session/storage/sqlite.ts
|
|
350
350
|
import { join } from "path";
|
|
351
351
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
352
|
+
function getDatabaseClass() {
|
|
353
|
+
if (typeof Bun !== "undefined") {
|
|
354
|
+
const { Database } = __require("bun:sqlite");
|
|
355
|
+
return Database;
|
|
356
|
+
} else {
|
|
357
|
+
return __require("better-sqlite3");
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
function createCompatibleDatabase(path) {
|
|
361
|
+
const Database = getDatabaseClass();
|
|
362
|
+
const db = new Database(path);
|
|
363
|
+
if (typeof db.run !== "function") {
|
|
364
|
+
db.run = function(sql, ...params) {
|
|
365
|
+
if (params.length > 0) {
|
|
366
|
+
return this.prepare(sql).run(...params);
|
|
367
|
+
} else {
|
|
368
|
+
return this.exec(sql);
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
return db;
|
|
373
|
+
}
|
|
352
374
|
function generateSessionId2() {
|
|
353
375
|
return `session_${randomUUID2()}`;
|
|
354
376
|
}
|
|
@@ -377,7 +399,6 @@ class SQLiteSessionStore {
|
|
|
377
399
|
async initialize() {
|
|
378
400
|
if (this.initialized)
|
|
379
401
|
return;
|
|
380
|
-
const { Database } = __require("bun:sqlite");
|
|
381
402
|
if (this.dbPath !== ":memory:") {
|
|
382
403
|
const fs = __require("fs");
|
|
383
404
|
const path = __require("path");
|
|
@@ -386,7 +407,7 @@ class SQLiteSessionStore {
|
|
|
386
407
|
fs.mkdirSync(dir, { recursive: true });
|
|
387
408
|
}
|
|
388
409
|
}
|
|
389
|
-
this.db =
|
|
410
|
+
this.db = createCompatibleDatabase(this.dbPath);
|
|
390
411
|
this.db.run(`
|
|
391
412
|
CREATE TABLE IF NOT EXISTS session (
|
|
392
413
|
id TEXT PRIMARY KEY,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TracedAs,
|
|
3
3
|
init_decorator
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-zgypchmt.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-44hnfb02.js";
|
|
9
9
|
import {
|
|
10
10
|
__legacyDecorateClassTS
|
|
11
11
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
} from "./roy-agent-core-kkbwepqb.js";
|
|
14
14
|
import {
|
|
15
15
|
SessionMessageConverter
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-jfh9q2qh.js";
|
|
17
17
|
import {
|
|
18
18
|
TracedAs,
|
|
19
19
|
init_decorator
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-zgypchmt.js";
|
|
21
21
|
import {
|
|
22
22
|
createLogger,
|
|
23
23
|
init_logger
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-44hnfb02.js";
|
|
25
25
|
import {
|
|
26
26
|
__legacyDecorateClassTS
|
|
27
27
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -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-r9ezzemr.js");
|
|
145
145
|
this.storage = new SQLiteSpanStorage(this.dbPath);
|
|
146
146
|
await this.storage.initialize();
|
|
147
147
|
} catch (error) {
|
|
@@ -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-sx7wsvnn.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-sx7wsvnn.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-sx7wsvnn.js");
|
|
657
657
|
const provider = getTracerProvider();
|
|
658
658
|
if (!provider.isInitialized()) {
|
|
659
659
|
await provider.initialize();
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
TracedAs,
|
|
13
13
|
init_decorator
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-zgypchmt.js";
|
|
15
15
|
import {
|
|
16
16
|
createLogger,
|
|
17
17
|
init_logger
|
|
18
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-44hnfb02.js";
|
|
19
19
|
import {
|
|
20
20
|
__legacyDecorateClassTS,
|
|
21
21
|
__require
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLogger,
|
|
3
3
|
init_logger
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-44hnfb02.js";
|
|
5
5
|
import {
|
|
6
6
|
__require
|
|
7
7
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -9,6 +9,28 @@ import {
|
|
|
9
9
|
// src/env/task/storage/sqlite-task-store.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
import { join } from "path";
|
|
12
|
+
function getDatabaseClass() {
|
|
13
|
+
if (typeof Bun !== "undefined") {
|
|
14
|
+
const { Database } = __require("bun:sqlite");
|
|
15
|
+
return Database;
|
|
16
|
+
} else {
|
|
17
|
+
return __require("better-sqlite3");
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function createCompatibleDatabase(path) {
|
|
21
|
+
const Database = getDatabaseClass();
|
|
22
|
+
const db = new Database(path);
|
|
23
|
+
if (typeof db.run !== "function") {
|
|
24
|
+
db.run = function(sql, ...params) {
|
|
25
|
+
if (params.length > 0) {
|
|
26
|
+
return this.prepare(sql).run(...params);
|
|
27
|
+
} else {
|
|
28
|
+
return this.exec(sql);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return db;
|
|
33
|
+
}
|
|
12
34
|
var logger = createLogger("task:store");
|
|
13
35
|
function getDefaultDataDir() {
|
|
14
36
|
const home = process.env.HOME || process.env.USERPROFILE || "/tmp";
|
|
@@ -30,7 +52,6 @@ class SQLiteTaskStore {
|
|
|
30
52
|
async initialize() {
|
|
31
53
|
if (this.initialized)
|
|
32
54
|
return;
|
|
33
|
-
const { Database } = __require("bun:sqlite");
|
|
34
55
|
if (this.dbPath !== ":memory:") {
|
|
35
56
|
const fs = __require("fs");
|
|
36
57
|
const path = __require("path");
|
|
@@ -39,7 +60,7 @@ class SQLiteTaskStore {
|
|
|
39
60
|
fs.mkdirSync(dir, { recursive: true });
|
|
40
61
|
}
|
|
41
62
|
}
|
|
42
|
-
this.db =
|
|
63
|
+
this.db = createCompatibleDatabase(this.dbPath);
|
|
43
64
|
this.db.run(`
|
|
44
65
|
CREATE TABLE IF NOT EXISTS task (
|
|
45
66
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
TracedAs,
|
|
25
25
|
init_decorator
|
|
26
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-zgypchmt.js";
|
|
27
27
|
import {
|
|
28
28
|
createLogger,
|
|
29
29
|
init_logger
|
|
30
|
-
} from "./roy-agent-core-
|
|
30
|
+
} from "./roy-agent-core-44hnfb02.js";
|
|
31
31
|
import {
|
|
32
32
|
__esm,
|
|
33
33
|
__export,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SQLiteTaskStore,
|
|
3
3
|
getDefaultTaskDbPath
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-htwpckw9.js";
|
|
5
5
|
import {
|
|
6
6
|
completeTaskTool,
|
|
7
7
|
createTaskTool,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
BackgroundTaskManager,
|
|
22
22
|
createDelegateTool,
|
|
23
23
|
createStopTool
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-z62zee1e.js";
|
|
25
25
|
import {
|
|
26
26
|
TaskHookPoints
|
|
27
27
|
} from "./roy-agent-core-92z6t4he.js";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
createLogger,
|
|
39
39
|
init_logger
|
|
40
|
-
} from "./roy-agent-core-
|
|
40
|
+
} from "./roy-agent-core-44hnfb02.js";
|
|
41
41
|
|
|
42
42
|
// src/env/task/task-component.ts
|
|
43
43
|
init_logger();
|
|
@@ -4,6 +4,29 @@ import {
|
|
|
4
4
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
5
5
|
|
|
6
6
|
// src/env/log-trace/span-storage.ts
|
|
7
|
+
function getDatabaseClass() {
|
|
8
|
+
if (typeof Bun !== "undefined") {
|
|
9
|
+
const { Database } = __require("bun:sqlite");
|
|
10
|
+
return Database;
|
|
11
|
+
} else {
|
|
12
|
+
return __require("better-sqlite3");
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function createCompatibleDatabase(path) {
|
|
16
|
+
const Database = getDatabaseClass();
|
|
17
|
+
const db = new Database(path);
|
|
18
|
+
if (typeof db.run !== "function") {
|
|
19
|
+
db.run = function(sql, ...params) {
|
|
20
|
+
if (params.length > 0) {
|
|
21
|
+
return this.prepare(sql).run(...params);
|
|
22
|
+
} else {
|
|
23
|
+
return this.exec(sql);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return db;
|
|
28
|
+
}
|
|
29
|
+
|
|
7
30
|
class SQLiteSpanStorage {
|
|
8
31
|
db = null;
|
|
9
32
|
dbPath;
|
|
@@ -20,14 +43,13 @@ class SQLiteSpanStorage {
|
|
|
20
43
|
async initialize() {
|
|
21
44
|
if (this.initialized)
|
|
22
45
|
return;
|
|
23
|
-
const { Database } = __require("bun:sqlite");
|
|
24
46
|
const fs = __require("fs");
|
|
25
47
|
const path = __require("path");
|
|
26
48
|
const dir = path.dirname(this.dbPath);
|
|
27
49
|
if (!fs.existsSync(dir)) {
|
|
28
50
|
fs.mkdirSync(dir, { recursive: true });
|
|
29
51
|
}
|
|
30
|
-
this.db =
|
|
52
|
+
this.db = createCompatibleDatabase(this.dbPath);
|
|
31
53
|
this.db.run("PRAGMA journal_mode=WAL");
|
|
32
54
|
this.db.run("PRAGMA busy_timeout=5000");
|
|
33
55
|
this.db.run("PRAGMA synchronous=NORMAL");
|