@ai-setting/roy-agent-core 1.5.14-test → 1.5.15-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.
Files changed (141) hide show
  1. package/package.json +1 -1
  2. package/dist/config/index.d.ts +0 -1250
  3. package/dist/config/index.js +0 -32
  4. package/dist/env/agent/index.d.ts +0 -2279
  5. package/dist/env/agent/index.js +0 -24
  6. package/dist/env/commands/index.d.ts +0 -1131
  7. package/dist/env/commands/index.js +0 -14
  8. package/dist/env/debug/formatters/index.d.ts +0 -236
  9. package/dist/env/debug/formatters/index.js +0 -11
  10. package/dist/env/debug/index.d.ts +0 -1652
  11. package/dist/env/debug/index.js +0 -26
  12. package/dist/env/hook/index.d.ts +0 -279
  13. package/dist/env/hook/index.js +0 -29
  14. package/dist/env/index.d.ts +0 -3481
  15. package/dist/env/index.js +0 -82
  16. package/dist/env/llm/index.d.ts +0 -1760
  17. package/dist/env/llm/index.js +0 -40
  18. package/dist/env/log-trace/index.d.ts +0 -1574
  19. package/dist/env/log-trace/index.js +0 -83
  20. package/dist/env/mcp/index.d.ts +0 -1331
  21. package/dist/env/mcp/index.js +0 -39
  22. package/dist/env/mcp/tool/index.d.ts +0 -183
  23. package/dist/env/mcp/tool/index.js +0 -14
  24. package/dist/env/memory/built-in/index.d.ts +0 -232
  25. package/dist/env/memory/built-in/index.js +0 -11
  26. package/dist/env/memory/index.d.ts +0 -1799
  27. package/dist/env/memory/index.js +0 -56
  28. package/dist/env/memory/plugin/index.d.ts +0 -747
  29. package/dist/env/memory/plugin/index.js +0 -36
  30. package/dist/env/prompt/index.d.ts +0 -1164
  31. package/dist/env/prompt/index.js +0 -20
  32. package/dist/env/session/index.d.ts +0 -1908
  33. package/dist/env/session/index.js +0 -25
  34. package/dist/env/session/storage/index.d.ts +0 -564
  35. package/dist/env/session/storage/index.js +0 -18
  36. package/dist/env/skill/index.d.ts +0 -1266
  37. package/dist/env/skill/index.js +0 -34
  38. package/dist/env/skill/tool/index.d.ts +0 -193
  39. package/dist/env/skill/tool/index.js +0 -9
  40. package/dist/env/task/delegate/index.d.ts +0 -1612
  41. package/dist/env/task/delegate/index.js +0 -18
  42. package/dist/env/task/events/index.d.ts +0 -171
  43. package/dist/env/task/events/index.js +0 -7
  44. package/dist/env/task/hooks/index.d.ts +0 -624
  45. package/dist/env/task/hooks/index.js +0 -7
  46. package/dist/env/task/index.d.ts +0 -1553
  47. package/dist/env/task/index.js +0 -34
  48. package/dist/env/task/plugins/index.d.ts +0 -466
  49. package/dist/env/task/plugins/index.js +0 -23
  50. package/dist/env/task/storage/index.d.ts +0 -241
  51. package/dist/env/task/storage/index.js +0 -14
  52. package/dist/env/task/tools/index.d.ts +0 -1485
  53. package/dist/env/task/tools/index.js +0 -17
  54. package/dist/env/task/tools/operation/index.d.ts +0 -1484
  55. package/dist/env/task/tools/operation/index.js +0 -15
  56. package/dist/env/tool/built-in/index.d.ts +0 -218
  57. package/dist/env/tool/built-in/index.js +0 -25
  58. package/dist/env/tool/index.d.ts +0 -1396
  59. package/dist/env/tool/index.js +0 -39
  60. package/dist/env/workflow/decorators/index.d.ts +0 -2161
  61. package/dist/env/workflow/decorators/index.js +0 -27
  62. package/dist/env/workflow/engine/index.d.ts +0 -3453
  63. package/dist/env/workflow/engine/index.js +0 -28
  64. package/dist/env/workflow/index.d.ts +0 -3546
  65. package/dist/env/workflow/index.js +0 -136
  66. package/dist/env/workflow/nodes/index.d.ts +0 -2092
  67. package/dist/env/workflow/nodes/index.js +0 -19
  68. package/dist/env/workflow/service/index.d.ts +0 -227
  69. package/dist/env/workflow/service/index.js +0 -13
  70. package/dist/env/workflow/storage/index.d.ts +0 -165
  71. package/dist/env/workflow/storage/index.js +0 -27
  72. package/dist/env/workflow/tools/index.d.ts +0 -416
  73. package/dist/env/workflow/tools/index.js +0 -159
  74. package/dist/env/workflow/types/index.d.ts +0 -2255
  75. package/dist/env/workflow/types/index.js +0 -98
  76. package/dist/env/workflow/utils/index.d.ts +0 -2031
  77. package/dist/env/workflow/utils/index.js +0 -637
  78. package/dist/index.d.ts +0 -7858
  79. package/dist/index.js +0 -399
  80. package/dist/shared/@ai-setting/roy-agent-core-0rtxwr28.js +0 -258
  81. package/dist/shared/@ai-setting/roy-agent-core-0vbdz0x7.js +0 -36
  82. package/dist/shared/@ai-setting/roy-agent-core-1akcqxj9.js +0 -349
  83. package/dist/shared/@ai-setting/roy-agent-core-1ce3fqrk.js +0 -117
  84. package/dist/shared/@ai-setting/roy-agent-core-2dhd60aw.js +0 -11
  85. package/dist/shared/@ai-setting/roy-agent-core-3jywqmdd.js +0 -393
  86. package/dist/shared/@ai-setting/roy-agent-core-3rr5k71j.js +0 -200
  87. package/dist/shared/@ai-setting/roy-agent-core-44hnfb02.js +0 -299
  88. package/dist/shared/@ai-setting/roy-agent-core-4t40mkpv.js +0 -206
  89. package/dist/shared/@ai-setting/roy-agent-core-4txzpsbt.js +0 -393
  90. package/dist/shared/@ai-setting/roy-agent-core-5x94xmt6.js +0 -350
  91. package/dist/shared/@ai-setting/roy-agent-core-69jskqjg.js +0 -180
  92. package/dist/shared/@ai-setting/roy-agent-core-6kvtahqv.js +0 -408
  93. package/dist/shared/@ai-setting/roy-agent-core-7fgf85wc.js +0 -284
  94. package/dist/shared/@ai-setting/roy-agent-core-81w1963m.js +0 -762
  95. package/dist/shared/@ai-setting/roy-agent-core-8gxth0eh.js +0 -10
  96. package/dist/shared/@ai-setting/roy-agent-core-92z6t4he.js +0 -14
  97. package/dist/shared/@ai-setting/roy-agent-core-93zfb3r1.js +0 -922
  98. package/dist/shared/@ai-setting/roy-agent-core-9yxb3ty9.js +0 -15
  99. package/dist/shared/@ai-setting/roy-agent-core-b0x5dda6.js +0 -1130
  100. package/dist/shared/@ai-setting/roy-agent-core-bcbqy27c.js +0 -14
  101. package/dist/shared/@ai-setting/roy-agent-core-bvr1761x.js +0 -653
  102. package/dist/shared/@ai-setting/roy-agent-core-ctdhjv68.js +0 -93
  103. package/dist/shared/@ai-setting/roy-agent-core-d7cyjkf7.js +0 -872
  104. package/dist/shared/@ai-setting/roy-agent-core-dh9d7a3m.js +0 -11
  105. package/dist/shared/@ai-setting/roy-agent-core-e25xkv53.js +0 -64
  106. package/dist/shared/@ai-setting/roy-agent-core-eajcvp4e.js +0 -378
  107. package/dist/shared/@ai-setting/roy-agent-core-f7q2x5z6.js +0 -492
  108. package/dist/shared/@ai-setting/roy-agent-core-fs0mn2jk.js +0 -52
  109. package/dist/shared/@ai-setting/roy-agent-core-g1s2h0e5.js +0 -171
  110. package/dist/shared/@ai-setting/roy-agent-core-g99pxzn5.js +0 -862
  111. package/dist/shared/@ai-setting/roy-agent-core-gbqcyegm.js +0 -1387
  112. package/dist/shared/@ai-setting/roy-agent-core-gjq1yk68.js +0 -208
  113. package/dist/shared/@ai-setting/roy-agent-core-gq20wsgv.js +0 -139
  114. package/dist/shared/@ai-setting/roy-agent-core-gwc4h96n.js +0 -534
  115. package/dist/shared/@ai-setting/roy-agent-core-jfh9q2qh.js +0 -204
  116. package/dist/shared/@ai-setting/roy-agent-core-jvatggbb.js +0 -603
  117. package/dist/shared/@ai-setting/roy-agent-core-kkbwepqb.js +0 -97
  118. package/dist/shared/@ai-setting/roy-agent-core-pjr12nnd.js +0 -587
  119. package/dist/shared/@ai-setting/roy-agent-core-psv4v63c.js +0 -176
  120. package/dist/shared/@ai-setting/roy-agent-core-psvxt4c9.js +0 -60
  121. package/dist/shared/@ai-setting/roy-agent-core-qqceba6k.js +0 -442
  122. package/dist/shared/@ai-setting/roy-agent-core-qxhq8ven.js +0 -57
  123. package/dist/shared/@ai-setting/roy-agent-core-qxnbvgwe.js +0 -66
  124. package/dist/shared/@ai-setting/roy-agent-core-r9ezzemr.js +0 -10
  125. package/dist/shared/@ai-setting/roy-agent-core-rhmtwnw1.js +0 -267
  126. package/dist/shared/@ai-setting/roy-agent-core-rvv6ydff.js +0 -584
  127. package/dist/shared/@ai-setting/roy-agent-core-rvxg1wps.js +0 -102
  128. package/dist/shared/@ai-setting/roy-agent-core-satmq6sh.js +0 -549
  129. package/dist/shared/@ai-setting/roy-agent-core-sx7wsvnn.js +0 -15
  130. package/dist/shared/@ai-setting/roy-agent-core-t94ktchq.js +0 -213
  131. package/dist/shared/@ai-setting/roy-agent-core-vf215qfv.js +0 -812
  132. package/dist/shared/@ai-setting/roy-agent-core-vkz81f7v.js +0 -1316
  133. package/dist/shared/@ai-setting/roy-agent-core-vn2bc59q.js +0 -1205
  134. package/dist/shared/@ai-setting/roy-agent-core-wa1kzqky.js +0 -328
  135. package/dist/shared/@ai-setting/roy-agent-core-wft9ra24.js +0 -20
  136. package/dist/shared/@ai-setting/roy-agent-core-wrcy0h6z.js +0 -2098
  137. package/dist/shared/@ai-setting/roy-agent-core-xq8hhqb8.js +0 -419
  138. package/dist/shared/@ai-setting/roy-agent-core-xs5rsgat.js +0 -368
  139. package/dist/shared/@ai-setting/roy-agent-core-zbkpc41z.js +0 -377
  140. package/dist/shared/@ai-setting/roy-agent-core-zgypchmt.js +0 -172
  141. package/dist/shared/@ai-setting/roy-agent-core-zpn0bqa8.js +0 -103
@@ -1,328 +0,0 @@
1
- // src/env/task/tools/task-types.ts
2
- import { z } from "zod";
3
- var CreateTaskToolSchema = z.object({
4
- title: z.string().describe("Task title"),
5
- description: z.string().optional().describe("Task description"),
6
- priority: z.enum(["low", "medium", "high"]).optional().describe("Task priority"),
7
- goals_and_expected_deliverables: z.string().optional().describe("Goals and expected deliverables"),
8
- due_date: z.string().optional().describe("Due date (ISO format)"),
9
- tags: z.array(z.string()).optional().describe("Task tags (for search, stored in task.tags JSON field)"),
10
- project_path: z.string().describe("Project root path for task positioning. " + "Used to locate the project space for this task. " + "Use 'unknown' if unknown."),
11
- context: z.string().describe("JSON string with time-space positioning information for task continuity. " + "This field is crucial for Agent task handoff. " + "Core fields: worktree_path (git worktree path), branch (current branch), type (feature/bug/refactor/chore). " + 'Example for coding: {"worktree_path": "/path/worktree", "branch": "feature/xyz", "type": "feature"}. ' + 'Example for other: {"type": "general"}. ' + `If unknown, use '{}' or '{"type":"unknown"}'. ` + "IMPORTANT: Must be a valid JSON string!")
12
- });
13
- var GetTaskToolSchema = z.object({
14
- task_id: z.number().describe("Task ID"),
15
- include_operations: z.boolean().optional().default(false).describe("Include operation records")
16
- });
17
- var ListTasksToolSchema = z.object({
18
- status: z.enum(["todo", "active", "completed", "paused", "cancelled"]).optional(),
19
- priority: z.enum(["low", "medium", "high"]).optional(),
20
- limit: z.number().optional().default(20),
21
- offset: z.number().optional().default(0)
22
- });
23
- var UpdateTaskToolSchema = z.object({
24
- task_id: z.number().describe("Task ID"),
25
- title: z.string().optional(),
26
- description: z.string().optional(),
27
- status: z.enum(["todo", "active", "completed", "paused", "cancelled"]).optional(),
28
- priority: z.enum(["low", "medium", "high"]).optional(),
29
- progress: z.number().min(0).max(100).optional(),
30
- current_status: z.string().optional(),
31
- goals_and_expected_deliverables: z.string().optional(),
32
- due_date: z.string().optional(),
33
- tags: z.array(z.string()).optional(),
34
- project_path: z.string().optional().describe("Project path, identifies which project this task belongs to"),
35
- context: z.string().optional().describe("Task context information for storing additional context")
36
- });
37
- var DeleteTaskToolSchema = z.object({
38
- task_id: z.number().describe("Task ID")
39
- });
40
-
41
- // src/env/task/tools/create-tool.ts
42
- function createTaskTool(taskComponent) {
43
- return {
44
- name: "task_create",
45
- description: `
46
- Create a new task for tracking work.
47
-
48
- ## IMPORTANT: Task Continuity Fields
49
-
50
- This tool creates persistent task records that can be picked up by a
51
- Task Manager Agent to continue推进未完成的任务.
52
-
53
- The following fields are critical for task context preservation:
54
-
55
- - project_path: The project root path where this task belongs.
56
- Used to locate the project space for this task.
57
- If unknown, use 'unknown'.
58
-
59
- - context: A JSON string containing time-space positioning information.
60
- This field is crucial for Agent task handoff.
61
-
62
- **Required format**: Valid JSON string (parseable).
63
-
64
- **Core fields**:
65
- - worktree_path: Git worktree path (for code development)
66
- - branch: Current branch name
67
- - type: Task type (feature/bug/refactor/chore)
68
-
69
- **Example for coding tasks**:
70
- {"worktree_path": "/path/to/worktree", "branch": "feature/xyz", "type": "feature", "parent_branch": "main"}
71
-
72
- **Example for other tasks**:
73
- {"type": "general"}
74
-
75
- If unable to fill in details, use at minimum:
76
- {"type": "unknown"}
77
-
78
- **DO NOT leave this as plain text** - it must be valid JSON!
79
- `,
80
- parameters: CreateTaskToolSchema,
81
- execute: async (args, ctx) => {
82
- const params = CreateTaskToolSchema.parse(args);
83
- const sessionId = ctx.session_id || "unknown";
84
- try {
85
- const task = await taskComponent.createTask({
86
- title: params.title,
87
- description: params.description,
88
- priority: params.priority,
89
- goals_and_expected_deliverables: params.goals_and_expected_deliverables,
90
- due_date: params.due_date,
91
- tags: params.tags,
92
- sessionId,
93
- project_path: params.project_path,
94
- context: params.context
95
- });
96
- return {
97
- success: true,
98
- output: `Task created successfully: #${task.id} - ${task.title}`,
99
- metadata: {
100
- execution_time_ms: 0,
101
- task_id: task.id,
102
- status: task.status,
103
- createdAt: task.createdAt
104
- }
105
- };
106
- } catch (error) {
107
- return {
108
- success: false,
109
- output: "",
110
- error: error instanceof Error ? error.message : String(error),
111
- metadata: { execution_time_ms: 0 }
112
- };
113
- }
114
- }
115
- };
116
- }
117
- // src/env/task/tools/get-tool.ts
118
- function getTaskTool(taskComponent) {
119
- return {
120
- name: "task_get",
121
- description: "Get task details by ID. Optionally include operation records.",
122
- parameters: GetTaskToolSchema,
123
- execute: async (args, ctx) => {
124
- const params = GetTaskToolSchema.parse(args);
125
- try {
126
- if (params.include_operations) {
127
- const result = await taskComponent.getTaskWithOperations(params.task_id);
128
- if (!result) {
129
- return {
130
- success: false,
131
- output: "",
132
- error: `Task not found: ${params.task_id}`,
133
- metadata: { execution_time_ms: 0 }
134
- };
135
- }
136
- return {
137
- success: true,
138
- output: JSON.stringify(result, null, 2),
139
- metadata: { execution_time_ms: 0 }
140
- };
141
- } else {
142
- const task = await taskComponent.getTask(params.task_id);
143
- if (!task) {
144
- return {
145
- success: false,
146
- output: "",
147
- error: `Task not found: ${params.task_id}`,
148
- metadata: { execution_time_ms: 0 }
149
- };
150
- }
151
- return {
152
- success: true,
153
- output: JSON.stringify(task, null, 2),
154
- metadata: { execution_time_ms: 0 }
155
- };
156
- }
157
- } catch (error) {
158
- return {
159
- success: false,
160
- output: "",
161
- error: error instanceof Error ? error.message : String(error),
162
- metadata: { execution_time_ms: 0 }
163
- };
164
- }
165
- }
166
- };
167
- }
168
- // src/env/task/tools/list-tool.ts
169
- function listTasksTool(taskComponent) {
170
- return {
171
- name: "task_list",
172
- description: "List tasks with optional filters for status and priority.",
173
- parameters: ListTasksToolSchema,
174
- execute: async (args, ctx) => {
175
- const params = ListTasksToolSchema.parse(args);
176
- try {
177
- const tasks = await taskComponent.listTasks({
178
- status: params.status,
179
- priority: params.priority,
180
- limit: params.limit,
181
- offset: params.offset
182
- });
183
- return {
184
- success: true,
185
- output: JSON.stringify({ tasks, count: tasks.length }),
186
- metadata: { execution_time_ms: 0 }
187
- };
188
- } catch (error) {
189
- return {
190
- success: false,
191
- output: "",
192
- error: error instanceof Error ? error.message : String(error),
193
- metadata: { execution_time_ms: 0 }
194
- };
195
- }
196
- }
197
- };
198
- }
199
- // src/env/task/tools/update-tool.ts
200
- function updateTaskTool(taskComponent) {
201
- return {
202
- name: "task_update",
203
- description: "Update an existing task's properties. Status and progress changes will create operation records.",
204
- parameters: UpdateTaskToolSchema,
205
- execute: async (args, ctx) => {
206
- const params = UpdateTaskToolSchema.parse(args);
207
- const sessionId = ctx.session_id || "unknown";
208
- try {
209
- const task = await taskComponent.updateTask(params.task_id, {
210
- title: params.title,
211
- description: params.description,
212
- status: params.status,
213
- priority: params.priority,
214
- progress: params.progress,
215
- current_status: params.current_status,
216
- goals_and_expected_deliverables: params.goals_and_expected_deliverables,
217
- due_date: params.due_date,
218
- tags: params.tags,
219
- project_path: params.project_path,
220
- context: params.context
221
- });
222
- if (!task) {
223
- return {
224
- success: false,
225
- output: "",
226
- error: `Task not found: ${params.task_id}`,
227
- metadata: { execution_time_ms: 0 }
228
- };
229
- }
230
- if (params.status || params.progress !== undefined || params.current_status) {
231
- await taskComponent.createOperation({
232
- taskId: params.task_id,
233
- sessionId,
234
- actionType: "progress",
235
- actionTitle: params.current_status || `Updated: ${params.status || `${params.progress}%`}`,
236
- actionDescription: JSON.stringify({
237
- status: params.status,
238
- progress: params.progress,
239
- current_status: params.current_status
240
- })
241
- });
242
- }
243
- return {
244
- success: true,
245
- output: `Task updated: #${task.id} - ${task.title}`,
246
- metadata: { execution_time_ms: 0, task }
247
- };
248
- } catch (error) {
249
- return {
250
- success: false,
251
- output: "",
252
- error: error instanceof Error ? error.message : String(error),
253
- metadata: { execution_time_ms: 0 }
254
- };
255
- }
256
- }
257
- };
258
- }
259
- // src/env/task/tools/delete-tool.ts
260
- function deleteTaskTool(taskComponent) {
261
- return {
262
- name: "task_delete",
263
- description: "Delete a task and all its operation records.",
264
- parameters: DeleteTaskToolSchema,
265
- execute: async (args, ctx) => {
266
- const params = DeleteTaskToolSchema.parse(args);
267
- try {
268
- const deleted = await taskComponent.deleteTask(params.task_id);
269
- if (!deleted) {
270
- return {
271
- success: false,
272
- output: "",
273
- error: `Task not found: ${params.task_id}`,
274
- metadata: { execution_time_ms: 0 }
275
- };
276
- }
277
- return {
278
- success: true,
279
- output: `Task deleted: #${params.task_id}`,
280
- metadata: { execution_time_ms: 0 }
281
- };
282
- } catch (error) {
283
- return {
284
- success: false,
285
- output: "",
286
- error: error instanceof Error ? error.message : String(error),
287
- metadata: { execution_time_ms: 0 }
288
- };
289
- }
290
- }
291
- };
292
- }
293
- // src/env/task/tools/complete-tool.ts
294
- function completeTaskTool(taskComponent) {
295
- return {
296
- name: "task_complete",
297
- description: "Mark a task as completed (progress=100, status=completed). Creates an operation record.",
298
- parameters: DeleteTaskToolSchema,
299
- execute: async (args, ctx) => {
300
- const params = DeleteTaskToolSchema.parse(args);
301
- const sessionId = ctx.session_id || "unknown";
302
- try {
303
- const task = await taskComponent.completeTask(params.task_id, sessionId);
304
- if (!task) {
305
- return {
306
- success: false,
307
- output: "",
308
- error: `Task not found: ${params.task_id}`,
309
- metadata: { execution_time_ms: 0 }
310
- };
311
- }
312
- return {
313
- success: true,
314
- output: `Task completed: #${task.id} - ${task.title}`,
315
- metadata: { execution_time_ms: 0, task }
316
- };
317
- } catch (error) {
318
- return {
319
- success: false,
320
- output: "",
321
- error: error instanceof Error ? error.message : String(error),
322
- metadata: { execution_time_ms: 0 }
323
- };
324
- }
325
- }
326
- };
327
- }
328
- export { createTaskTool, getTaskTool, listTasksTool, updateTaskTool, deleteTaskTool, completeTaskTool };
@@ -1,20 +0,0 @@
1
- import {
2
- closeDatabase,
3
- getDatabase,
4
- getDatabasePath,
5
- initDatabase,
6
- initializeTables,
7
- resetDatabase
8
- } from "./roy-agent-core-zpn0bqa8.js";
9
- import"./roy-agent-core-44hnfb02.js";
10
- import"./roy-agent-core-xs5rsgat.js";
11
- import"./roy-agent-core-psv4v63c.js";
12
- import"./roy-agent-core-fs0mn2jk.js";
13
- export {
14
- resetDatabase,
15
- initializeTables,
16
- initDatabase,
17
- getDatabasePath,
18
- getDatabase,
19
- closeDatabase
20
- };