@ai-setting/roy-agent-core 1.5.15-test → 1.5.16-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.d.ts +1250 -0
- package/dist/config/index.js +32 -0
- package/dist/env/agent/index.d.ts +2279 -0
- package/dist/env/agent/index.js +24 -0
- package/dist/env/commands/index.d.ts +1131 -0
- package/dist/env/commands/index.js +14 -0
- package/dist/env/debug/formatters/index.d.ts +236 -0
- package/dist/env/debug/formatters/index.js +11 -0
- package/dist/env/debug/index.d.ts +1652 -0
- package/dist/env/debug/index.js +26 -0
- package/dist/env/hook/index.d.ts +279 -0
- package/dist/env/hook/index.js +29 -0
- package/dist/env/index.d.ts +3481 -0
- package/dist/env/index.js +82 -0
- package/dist/env/llm/index.d.ts +1760 -0
- package/dist/env/llm/index.js +40 -0
- package/dist/env/log-trace/index.d.ts +1574 -0
- package/dist/env/log-trace/index.js +83 -0
- package/dist/env/mcp/index.d.ts +1331 -0
- package/dist/env/mcp/index.js +39 -0
- package/dist/env/mcp/tool/index.d.ts +183 -0
- package/dist/env/mcp/tool/index.js +14 -0
- package/dist/env/memory/built-in/index.d.ts +232 -0
- package/dist/env/memory/built-in/index.js +11 -0
- package/dist/env/memory/index.d.ts +1799 -0
- package/dist/env/memory/index.js +56 -0
- package/dist/env/memory/plugin/index.d.ts +747 -0
- package/dist/env/memory/plugin/index.js +36 -0
- package/dist/env/prompt/index.d.ts +1164 -0
- package/dist/env/prompt/index.js +20 -0
- package/dist/env/session/index.d.ts +1908 -0
- package/dist/env/session/index.js +25 -0
- package/dist/env/session/storage/index.d.ts +564 -0
- package/dist/env/session/storage/index.js +18 -0
- package/dist/env/skill/index.d.ts +1266 -0
- package/dist/env/skill/index.js +34 -0
- package/dist/env/skill/tool/index.d.ts +193 -0
- package/dist/env/skill/tool/index.js +9 -0
- package/dist/env/task/delegate/index.d.ts +1612 -0
- package/dist/env/task/delegate/index.js +18 -0
- package/dist/env/task/events/index.d.ts +171 -0
- package/dist/env/task/events/index.js +7 -0
- package/dist/env/task/hooks/index.d.ts +624 -0
- package/dist/env/task/hooks/index.js +7 -0
- package/dist/env/task/index.d.ts +1553 -0
- package/dist/env/task/index.js +34 -0
- package/dist/env/task/plugins/index.d.ts +466 -0
- package/dist/env/task/plugins/index.js +23 -0
- package/dist/env/task/storage/index.d.ts +241 -0
- package/dist/env/task/storage/index.js +14 -0
- package/dist/env/task/tools/index.d.ts +1485 -0
- package/dist/env/task/tools/index.js +17 -0
- package/dist/env/task/tools/operation/index.d.ts +1484 -0
- package/dist/env/task/tools/operation/index.js +15 -0
- package/dist/env/tool/built-in/index.d.ts +218 -0
- package/dist/env/tool/built-in/index.js +25 -0
- package/dist/env/tool/index.d.ts +1396 -0
- package/dist/env/tool/index.js +39 -0
- package/dist/env/workflow/decorators/index.d.ts +2161 -0
- package/dist/env/workflow/decorators/index.js +27 -0
- package/dist/env/workflow/engine/index.d.ts +3453 -0
- package/dist/env/workflow/engine/index.js +28 -0
- package/dist/env/workflow/index.d.ts +3546 -0
- package/dist/env/workflow/index.js +136 -0
- package/dist/env/workflow/nodes/index.d.ts +2092 -0
- package/dist/env/workflow/nodes/index.js +19 -0
- package/dist/env/workflow/service/index.d.ts +227 -0
- package/dist/env/workflow/service/index.js +13 -0
- package/dist/env/workflow/storage/index.d.ts +165 -0
- package/dist/env/workflow/storage/index.js +27 -0
- package/dist/env/workflow/tools/index.d.ts +416 -0
- package/dist/env/workflow/tools/index.js +159 -0
- package/dist/env/workflow/types/index.d.ts +2255 -0
- package/dist/env/workflow/types/index.js +98 -0
- package/dist/env/workflow/utils/index.d.ts +2031 -0
- package/dist/env/workflow/utils/index.js +637 -0
- package/dist/index.d.ts +7858 -0
- package/dist/index.js +399 -0
- package/dist/shared/@ai-setting/roy-agent-core-0rtxwr28.js +258 -0
- package/dist/shared/@ai-setting/roy-agent-core-0vbdz0x7.js +36 -0
- package/dist/shared/@ai-setting/roy-agent-core-1akcqxj9.js +349 -0
- package/dist/shared/@ai-setting/roy-agent-core-1ce3fqrk.js +117 -0
- package/dist/shared/@ai-setting/roy-agent-core-2dhd60aw.js +11 -0
- package/dist/shared/@ai-setting/roy-agent-core-3jywqmdd.js +393 -0
- package/dist/shared/@ai-setting/roy-agent-core-3rr5k71j.js +200 -0
- package/dist/shared/@ai-setting/roy-agent-core-44hnfb02.js +299 -0
- package/dist/shared/@ai-setting/roy-agent-core-4t40mkpv.js +206 -0
- package/dist/shared/@ai-setting/roy-agent-core-4txzpsbt.js +393 -0
- package/dist/shared/@ai-setting/roy-agent-core-5x94xmt6.js +350 -0
- package/dist/shared/@ai-setting/roy-agent-core-69jskqjg.js +180 -0
- package/dist/shared/@ai-setting/roy-agent-core-6kvtahqv.js +408 -0
- package/dist/shared/@ai-setting/roy-agent-core-7fgf85wc.js +284 -0
- package/dist/shared/@ai-setting/roy-agent-core-81w1963m.js +762 -0
- package/dist/shared/@ai-setting/roy-agent-core-8gxth0eh.js +10 -0
- package/dist/shared/@ai-setting/roy-agent-core-92z6t4he.js +14 -0
- package/dist/shared/@ai-setting/roy-agent-core-93zfb3r1.js +922 -0
- package/dist/shared/@ai-setting/roy-agent-core-9yxb3ty9.js +15 -0
- package/dist/shared/@ai-setting/roy-agent-core-b0x5dda6.js +1130 -0
- package/dist/shared/@ai-setting/roy-agent-core-bcbqy27c.js +14 -0
- package/dist/shared/@ai-setting/roy-agent-core-bvr1761x.js +653 -0
- package/dist/shared/@ai-setting/roy-agent-core-ctdhjv68.js +93 -0
- package/dist/shared/@ai-setting/roy-agent-core-d7cyjkf7.js +872 -0
- package/dist/shared/@ai-setting/roy-agent-core-dh9d7a3m.js +11 -0
- package/dist/shared/@ai-setting/roy-agent-core-e25xkv53.js +64 -0
- package/dist/shared/@ai-setting/roy-agent-core-eajcvp4e.js +378 -0
- package/dist/shared/@ai-setting/roy-agent-core-f7q2x5z6.js +492 -0
- package/dist/shared/@ai-setting/roy-agent-core-fs0mn2jk.js +52 -0
- package/dist/shared/@ai-setting/roy-agent-core-g1s2h0e5.js +171 -0
- package/dist/shared/@ai-setting/roy-agent-core-g99pxzn5.js +862 -0
- package/dist/shared/@ai-setting/roy-agent-core-gbqcyegm.js +1387 -0
- package/dist/shared/@ai-setting/roy-agent-core-gjq1yk68.js +208 -0
- package/dist/shared/@ai-setting/roy-agent-core-gq20wsgv.js +139 -0
- package/dist/shared/@ai-setting/roy-agent-core-gwc4h96n.js +534 -0
- package/dist/shared/@ai-setting/roy-agent-core-jfh9q2qh.js +204 -0
- package/dist/shared/@ai-setting/roy-agent-core-jvatggbb.js +603 -0
- package/dist/shared/@ai-setting/roy-agent-core-kkbwepqb.js +97 -0
- package/dist/shared/@ai-setting/roy-agent-core-pjr12nnd.js +587 -0
- package/dist/shared/@ai-setting/roy-agent-core-psv4v63c.js +176 -0
- package/dist/shared/@ai-setting/roy-agent-core-psvxt4c9.js +60 -0
- package/dist/shared/@ai-setting/roy-agent-core-qqceba6k.js +442 -0
- package/dist/shared/@ai-setting/roy-agent-core-qxhq8ven.js +57 -0
- package/dist/shared/@ai-setting/roy-agent-core-qxnbvgwe.js +66 -0
- package/dist/shared/@ai-setting/roy-agent-core-r9ezzemr.js +10 -0
- package/dist/shared/@ai-setting/roy-agent-core-rhmtwnw1.js +267 -0
- package/dist/shared/@ai-setting/roy-agent-core-rvv6ydff.js +584 -0
- package/dist/shared/@ai-setting/roy-agent-core-rvxg1wps.js +102 -0
- package/dist/shared/@ai-setting/roy-agent-core-satmq6sh.js +549 -0
- package/dist/shared/@ai-setting/roy-agent-core-sx7wsvnn.js +15 -0
- package/dist/shared/@ai-setting/roy-agent-core-t94ktchq.js +213 -0
- package/dist/shared/@ai-setting/roy-agent-core-vf215qfv.js +812 -0
- package/dist/shared/@ai-setting/roy-agent-core-vkz81f7v.js +1316 -0
- package/dist/shared/@ai-setting/roy-agent-core-vn2bc59q.js +1205 -0
- package/dist/shared/@ai-setting/roy-agent-core-wa1kzqky.js +328 -0
- package/dist/shared/@ai-setting/roy-agent-core-wft9ra24.js +20 -0
- package/dist/shared/@ai-setting/roy-agent-core-wrcy0h6z.js +2098 -0
- package/dist/shared/@ai-setting/roy-agent-core-xq8hhqb8.js +419 -0
- package/dist/shared/@ai-setting/roy-agent-core-xs5rsgat.js +368 -0
- package/dist/shared/@ai-setting/roy-agent-core-zbkpc41z.js +377 -0
- package/dist/shared/@ai-setting/roy-agent-core-zgypchmt.js +172 -0
- package/dist/shared/@ai-setting/roy-agent-core-zpn0bqa8.js +103 -0
- package/package.json +1 -1
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
// src/env/task/tools/operation/operation-types.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var ActionTypeEnum = z.enum([
|
|
4
|
+
"create",
|
|
5
|
+
"progress",
|
|
6
|
+
"milestone",
|
|
7
|
+
"problem",
|
|
8
|
+
"solution",
|
|
9
|
+
"decision",
|
|
10
|
+
"review",
|
|
11
|
+
"completed"
|
|
12
|
+
]);
|
|
13
|
+
var CreateOperationToolSchema = z.object({
|
|
14
|
+
task_id: z.number().describe("Task ID"),
|
|
15
|
+
action_type: ActionTypeEnum.describe("Type of action"),
|
|
16
|
+
action_title: z.string().describe("Title of the action"),
|
|
17
|
+
action_description: z.string().optional().describe("Detailed description"),
|
|
18
|
+
md_path: z.string().optional().describe("Path to detailed markdown documentation")
|
|
19
|
+
});
|
|
20
|
+
var GetOperationToolSchema = z.object({
|
|
21
|
+
operation_id: z.number().describe("Operation ID")
|
|
22
|
+
});
|
|
23
|
+
var ListOperationsToolSchema = z.object({
|
|
24
|
+
task_id: z.number().describe("Task ID"),
|
|
25
|
+
action_type: ActionTypeEnum.optional(),
|
|
26
|
+
limit: z.number().optional().default(20),
|
|
27
|
+
offset: z.number().optional().default(0)
|
|
28
|
+
});
|
|
29
|
+
var UpdateOperationToolSchema = z.object({
|
|
30
|
+
operation_id: z.number().describe("Operation ID"),
|
|
31
|
+
action_title: z.string().optional(),
|
|
32
|
+
action_description: z.string().optional()
|
|
33
|
+
});
|
|
34
|
+
var DeleteOperationToolSchema = z.object({
|
|
35
|
+
operation_id: z.number().describe("Operation ID")
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// src/env/task/tools/operation/create-tool.ts
|
|
39
|
+
function createOperationTool(taskComponent) {
|
|
40
|
+
return {
|
|
41
|
+
name: "task_operation_create",
|
|
42
|
+
description: "Create an operation record for a task. Tracks progress, milestones, problems, etc.",
|
|
43
|
+
parameters: CreateOperationToolSchema,
|
|
44
|
+
execute: async (args, ctx) => {
|
|
45
|
+
const params = CreateOperationToolSchema.parse(args);
|
|
46
|
+
const sessionId = ctx.session_id || "unknown";
|
|
47
|
+
try {
|
|
48
|
+
const operation = await taskComponent.createOperation({
|
|
49
|
+
taskId: params.task_id,
|
|
50
|
+
sessionId,
|
|
51
|
+
actionType: params.action_type,
|
|
52
|
+
actionTitle: params.action_title,
|
|
53
|
+
actionDescription: params.action_description,
|
|
54
|
+
mdPath: params.md_path
|
|
55
|
+
});
|
|
56
|
+
return {
|
|
57
|
+
success: true,
|
|
58
|
+
output: `Operation created: #${operation.id} for task #${operation.taskId}`,
|
|
59
|
+
metadata: {
|
|
60
|
+
execution_time_ms: 0,
|
|
61
|
+
operation_id: operation.id,
|
|
62
|
+
task_id: operation.taskId,
|
|
63
|
+
session_id: operation.sessionId
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
} catch (error) {
|
|
67
|
+
return {
|
|
68
|
+
success: false,
|
|
69
|
+
output: "",
|
|
70
|
+
error: error instanceof Error ? error.message : String(error),
|
|
71
|
+
metadata: { execution_time_ms: 0 }
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
// src/env/task/tools/operation/get-tool.ts
|
|
78
|
+
function getOperationTool(taskComponent) {
|
|
79
|
+
return {
|
|
80
|
+
name: "task_operation_get",
|
|
81
|
+
description: "Get a single operation record by ID.",
|
|
82
|
+
parameters: GetOperationToolSchema,
|
|
83
|
+
execute: async (args, ctx) => {
|
|
84
|
+
const params = GetOperationToolSchema.parse(args);
|
|
85
|
+
try {
|
|
86
|
+
const operation = await taskComponent.getOperation(params.operation_id);
|
|
87
|
+
if (!operation) {
|
|
88
|
+
return {
|
|
89
|
+
success: false,
|
|
90
|
+
output: "",
|
|
91
|
+
error: `Operation not found: ${params.operation_id}`,
|
|
92
|
+
metadata: { execution_time_ms: 0 }
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
success: true,
|
|
97
|
+
output: JSON.stringify(operation, null, 2),
|
|
98
|
+
metadata: { execution_time_ms: 0 }
|
|
99
|
+
};
|
|
100
|
+
} catch (error) {
|
|
101
|
+
return {
|
|
102
|
+
success: false,
|
|
103
|
+
output: "",
|
|
104
|
+
error: error instanceof Error ? error.message : String(error),
|
|
105
|
+
metadata: { execution_time_ms: 0 }
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
// src/env/task/tools/operation/list-tool.ts
|
|
112
|
+
function listOperationsTool(taskComponent) {
|
|
113
|
+
return {
|
|
114
|
+
name: "task_operation_list",
|
|
115
|
+
description: "List operation records for a task with optional filters.",
|
|
116
|
+
parameters: ListOperationsToolSchema,
|
|
117
|
+
execute: async (args, ctx) => {
|
|
118
|
+
const params = ListOperationsToolSchema.parse(args);
|
|
119
|
+
try {
|
|
120
|
+
const operations = await taskComponent.listOperations({
|
|
121
|
+
taskId: params.task_id,
|
|
122
|
+
actionType: params.action_type,
|
|
123
|
+
limit: params.limit,
|
|
124
|
+
offset: params.offset
|
|
125
|
+
});
|
|
126
|
+
return {
|
|
127
|
+
success: true,
|
|
128
|
+
output: JSON.stringify({ operations, count: operations.length }),
|
|
129
|
+
metadata: { execution_time_ms: 0 }
|
|
130
|
+
};
|
|
131
|
+
} catch (error) {
|
|
132
|
+
return {
|
|
133
|
+
success: false,
|
|
134
|
+
output: "",
|
|
135
|
+
error: error instanceof Error ? error.message : String(error),
|
|
136
|
+
metadata: { execution_time_ms: 0 }
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
// src/env/task/tools/operation/update-tool.ts
|
|
143
|
+
function updateOperationTool(taskComponent) {
|
|
144
|
+
return {
|
|
145
|
+
name: "task_operation_update",
|
|
146
|
+
description: "Update an operation record's title or description.",
|
|
147
|
+
parameters: UpdateOperationToolSchema,
|
|
148
|
+
execute: async (args, ctx) => {
|
|
149
|
+
const params = UpdateOperationToolSchema.parse(args);
|
|
150
|
+
try {
|
|
151
|
+
const operation = await taskComponent.updateOperation(params.operation_id, {
|
|
152
|
+
actionTitle: params.action_title,
|
|
153
|
+
actionDescription: params.action_description
|
|
154
|
+
});
|
|
155
|
+
if (!operation) {
|
|
156
|
+
return {
|
|
157
|
+
success: false,
|
|
158
|
+
output: "",
|
|
159
|
+
error: `Operation not found: ${params.operation_id}`,
|
|
160
|
+
metadata: { execution_time_ms: 0 }
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
success: true,
|
|
165
|
+
output: `Operation updated: #${operation.id}`,
|
|
166
|
+
metadata: { execution_time_ms: 0, operation }
|
|
167
|
+
};
|
|
168
|
+
} catch (error) {
|
|
169
|
+
return {
|
|
170
|
+
success: false,
|
|
171
|
+
output: "",
|
|
172
|
+
error: error instanceof Error ? error.message : String(error),
|
|
173
|
+
metadata: { execution_time_ms: 0 }
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
// src/env/task/tools/operation/delete-tool.ts
|
|
180
|
+
function deleteOperationTool(taskComponent) {
|
|
181
|
+
return {
|
|
182
|
+
name: "task_operation_delete",
|
|
183
|
+
description: "Delete an operation record.",
|
|
184
|
+
parameters: DeleteOperationToolSchema,
|
|
185
|
+
execute: async (args, ctx) => {
|
|
186
|
+
const params = DeleteOperationToolSchema.parse(args);
|
|
187
|
+
try {
|
|
188
|
+
const deleted = await taskComponent.deleteOperation(params.operation_id);
|
|
189
|
+
if (!deleted) {
|
|
190
|
+
return {
|
|
191
|
+
success: false,
|
|
192
|
+
output: "",
|
|
193
|
+
error: `Operation not found: ${params.operation_id}`,
|
|
194
|
+
metadata: { execution_time_ms: 0 }
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
success: true,
|
|
199
|
+
output: `Operation deleted: #${params.operation_id}`,
|
|
200
|
+
metadata: { execution_time_ms: 0 }
|
|
201
|
+
};
|
|
202
|
+
} catch (error) {
|
|
203
|
+
return {
|
|
204
|
+
success: false,
|
|
205
|
+
output: "",
|
|
206
|
+
error: error instanceof Error ? error.message : String(error),
|
|
207
|
+
metadata: { execution_time_ms: 0 }
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export { createOperationTool, getOperationTool, listOperationsTool, updateOperationTool, deleteOperationTool };
|