@ai-setting/roy-agent-core 1.6.11 → 1.6.12

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 (24) hide show
  1. package/dist/env/agent/index.js +2 -2
  2. package/dist/env/event-source/index.js +3 -3
  3. package/dist/env/index.js +10 -10
  4. package/dist/env/prompt/index.js +2 -2
  5. package/dist/env/task/delegate/index.js +3 -3
  6. package/dist/env/task/index.js +6 -6
  7. package/dist/env/task/plugins/index.js +2 -2
  8. package/dist/env/task/storage/index.js +2 -1
  9. package/dist/env/task/tools/operation/index.js +1 -1
  10. package/dist/index.js +11 -11
  11. package/dist/shared/@ai-setting/{roy-agent-core-m38q2azm.js → roy-agent-core-1bvv6s75.js} +3 -1
  12. package/dist/shared/@ai-setting/{roy-agent-core-wqe84f84.js → roy-agent-core-3bdpnmtg.js} +29 -0
  13. package/dist/shared/@ai-setting/{roy-agent-core-5w9a1eqa.js → roy-agent-core-7a3gf3tw.js} +2 -2
  14. package/dist/shared/@ai-setting/roy-agent-core-9abv4ewh.js +1122 -0
  15. package/dist/shared/@ai-setting/{roy-agent-core-0cftbg62.js → roy-agent-core-asp5p3zx.js} +1 -1
  16. package/dist/shared/@ai-setting/{roy-agent-core-38kbfarg.js → roy-agent-core-cxdnzn17.js} +1 -1
  17. package/dist/shared/@ai-setting/{roy-agent-core-3rs38pf7.js → roy-agent-core-dntkpwqq.js} +8 -8
  18. package/dist/shared/@ai-setting/{roy-agent-core-trdpar9f.js → roy-agent-core-ms5dp89r.js} +338 -20
  19. package/dist/shared/@ai-setting/{roy-agent-core-2ek596yd.js → roy-agent-core-q2bw3cwd.js} +1 -1
  20. package/dist/shared/@ai-setting/{roy-agent-core-y5ymc4f8.js → roy-agent-core-q7rt3x8d.js} +45 -13
  21. package/dist/shared/@ai-setting/roy-agent-core-rn57psp0.js +396 -0
  22. package/package.json +1 -1
  23. package/dist/shared/@ai-setting/roy-agent-core-9xby523m.js +0 -961
  24. package/dist/shared/@ai-setting/roy-agent-core-t94ktchq.js +0 -213
@@ -1,213 +0,0 @@
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 };