@ai-setting/roy-agent-core 1.5.86 → 1.5.87

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/index.js CHANGED
@@ -21,17 +21,17 @@ import"../shared/@ai-setting/roy-agent-core-7fdzfsm6.js";
21
21
  import"../shared/@ai-setting/roy-agent-core-az13yzmc.js";
22
22
  import {
23
23
  WorkflowComponent
24
- } from "../shared/@ai-setting/roy-agent-core-dp73ghtz.js";
24
+ } from "../shared/@ai-setting/roy-agent-core-6n7xwv4v.js";
25
25
  import"../shared/@ai-setting/roy-agent-core-fjexv5nm.js";
26
- import"../shared/@ai-setting/roy-agent-core-gttz2jpm.js";
26
+ import"../shared/@ai-setting/roy-agent-core-9y09xfav.js";
27
27
  import"../shared/@ai-setting/roy-agent-core-5kdw0p98.js";
28
28
  import"../shared/@ai-setting/roy-agent-core-6atd905e.js";
29
29
  import"../shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
30
30
  import"../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
31
31
  import"../shared/@ai-setting/roy-agent-core-hhrg314p.js";
32
- import"../shared/@ai-setting/roy-agent-core-j754zgb4.js";
32
+ import"../shared/@ai-setting/roy-agent-core-hc20420t.js";
33
33
  import"../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
34
- import"../shared/@ai-setting/roy-agent-core-r5axf0ad.js";
34
+ import"../shared/@ai-setting/roy-agent-core-0y64qaac.js";
35
35
  import"../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
36
36
  import"../shared/@ai-setting/roy-agent-core-tq9528d3.js";
37
37
  import"../shared/@ai-setting/roy-agent-core-h0x19xgn.js";
@@ -44,7 +44,7 @@ import"../shared/@ai-setting/roy-agent-core-r0m0at3x.js";
44
44
  import"../shared/@ai-setting/roy-agent-core-e25xkv53.js";
45
45
  import {
46
46
  TaskComponent
47
- } from "../shared/@ai-setting/roy-agent-core-bk5g94yd.js";
47
+ } from "../shared/@ai-setting/roy-agent-core-r1adqgaa.js";
48
48
  import"../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
49
49
  import"../shared/@ai-setting/roy-agent-core-bgw4dq11.js";
50
50
  import"../shared/@ai-setting/roy-agent-core-pcdzfwdv.js";
@@ -54,7 +54,7 @@ import {
54
54
  getXDGPath,
55
55
  getXDGPaths
56
56
  } from "../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
57
- import"../shared/@ai-setting/roy-agent-core-7nh5h9fn.js";
57
+ import"../shared/@ai-setting/roy-agent-core-9vwyj29a.js";
58
58
  import"../shared/@ai-setting/roy-agent-core-t94ktchq.js";
59
59
  import"../shared/@ai-setting/roy-agent-core-92z6t4he.js";
60
60
  import {
@@ -5,7 +5,7 @@ import {
5
5
  TaskPriorityEnum,
6
6
  TaskStatusEnum,
7
7
  TaskTypeEnum
8
- } from "../../shared/@ai-setting/roy-agent-core-bk5g94yd.js";
8
+ } from "../../shared/@ai-setting/roy-agent-core-r1adqgaa.js";
9
9
  import {
10
10
  TaskEntityEventTypes
11
11
  } from "../../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
@@ -16,7 +16,7 @@ import {
16
16
  } from "../../shared/@ai-setting/roy-agent-core-pcdzfwdv.js";
17
17
  import"../../shared/@ai-setting/roy-agent-core-7z4xtrmw.js";
18
18
  import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
19
- import"../../shared/@ai-setting/roy-agent-core-7nh5h9fn.js";
19
+ import"../../shared/@ai-setting/roy-agent-core-9vwyj29a.js";
20
20
  import"../../shared/@ai-setting/roy-agent-core-t94ktchq.js";
21
21
  import"../../shared/@ai-setting/roy-agent-core-92z6t4he.js";
22
22
  import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
@@ -8,7 +8,7 @@ import {
8
8
  listTasksTool,
9
9
  searchTasksTool,
10
10
  updateTaskTool
11
- } from "../../../shared/@ai-setting/roy-agent-core-7nh5h9fn.js";
11
+ } from "../../../shared/@ai-setting/roy-agent-core-9vwyj29a.js";
12
12
  import"../../../shared/@ai-setting/roy-agent-core-y5d04fm3.js";
13
13
  import"../../../shared/@ai-setting/roy-agent-core-k05v31rc.js";
14
14
  import"../../../shared/@ai-setting/roy-agent-core-shme7set.js";
@@ -8,7 +8,9 @@ import {
8
8
  grepTool,
9
9
  readFileTool,
10
10
  writeFileTool
11
- } from "../../../shared/@ai-setting/roy-agent-core-8pk6a00t.js";
11
+ } from "../../../shared/@ai-setting/roy-agent-core-qhjb153z.js";
12
+ import"../../../shared/@ai-setting/roy-agent-core-k05v31rc.js";
13
+ import"../../../shared/@ai-setting/roy-agent-core-shme7set.js";
12
14
  import"../../../shared/@ai-setting/roy-agent-core-7z9b1fm8.js";
13
15
  import"../../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
14
16
  import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
@@ -4,7 +4,7 @@ import {
4
4
  ToolValidator,
5
5
  getMaxOutputSize,
6
6
  setToolConfigComponent
7
- } from "../../shared/@ai-setting/roy-agent-core-pwzkgtgr.js";
7
+ } from "../../shared/@ai-setting/roy-agent-core-3arrpf7n.js";
8
8
  import {
9
9
  bashTool,
10
10
  echoTool,
@@ -15,7 +15,7 @@ import {
15
15
  grepTool,
16
16
  readFileTool,
17
17
  writeFileTool
18
- } from "../../shared/@ai-setting/roy-agent-core-8pk6a00t.js";
18
+ } from "../../shared/@ai-setting/roy-agent-core-qhjb153z.js";
19
19
  import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
20
20
  import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
21
21
  import"../../shared/@ai-setting/roy-agent-core-rgckng3p.js";
@@ -6,12 +6,12 @@ import {
6
6
  Scheduler,
7
7
  WorkflowEngine,
8
8
  init_engine
9
- } from "../../../shared/@ai-setting/roy-agent-core-gttz2jpm.js";
9
+ } from "../../../shared/@ai-setting/roy-agent-core-9y09xfav.js";
10
10
  import"../../../shared/@ai-setting/roy-agent-core-5kdw0p98.js";
11
11
  import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
12
12
  import"../../../shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
13
13
  import"../../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
14
- import"../../../shared/@ai-setting/roy-agent-core-j754zgb4.js";
14
+ import"../../../shared/@ai-setting/roy-agent-core-hc20420t.js";
15
15
  import"../../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
16
16
  import"../../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
17
17
  import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  WorkflowComponent
3
- } from "../../shared/@ai-setting/roy-agent-core-dp73ghtz.js";
3
+ } from "../../shared/@ai-setting/roy-agent-core-6n7xwv4v.js";
4
4
  import"../../shared/@ai-setting/roy-agent-core-fjexv5nm.js";
5
- import"../../shared/@ai-setting/roy-agent-core-gttz2jpm.js";
5
+ import"../../shared/@ai-setting/roy-agent-core-9y09xfav.js";
6
6
  import"../../shared/@ai-setting/roy-agent-core-5kdw0p98.js";
7
7
  import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
8
8
  import"../../shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
9
9
  import"../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
10
10
  import"../../shared/@ai-setting/roy-agent-core-hhrg314p.js";
11
- import"../../shared/@ai-setting/roy-agent-core-j754zgb4.js";
11
+ import"../../shared/@ai-setting/roy-agent-core-hc20420t.js";
12
12
  import {
13
13
  BaseEventSchema,
14
14
  ControlPauseEventSchema,
@@ -60,7 +60,7 @@ import {
60
60
  pathNotFound,
61
61
  unresolvedVariable
62
62
  } from "../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
63
- import"../../shared/@ai-setting/roy-agent-core-r5axf0ad.js";
63
+ import"../../shared/@ai-setting/roy-agent-core-0y64qaac.js";
64
64
  import"../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
65
65
  import"../../shared/@ai-setting/roy-agent-core-tq9528d3.js";
66
66
  import {
@@ -5,7 +5,7 @@ import {
5
5
  init_skill_node,
6
6
  init_tool_node,
7
7
  init_workflow_node
8
- } from "../../../shared/@ai-setting/roy-agent-core-j754zgb4.js";
8
+ } from "../../../shared/@ai-setting/roy-agent-core-hc20420t.js";
9
9
  import"../../../shared/@ai-setting/roy-agent-core-k05v31rc.js";
10
10
  import"../../../shared/@ai-setting/roy-agent-core-shme7set.js";
11
11
  import"../../../shared/@ai-setting/roy-agent-core-7z9b1fm8.js";
@@ -22,7 +22,7 @@ import {
22
22
  getRunWorkflowTool,
23
23
  initRunWorkflowTool,
24
24
  resetRunWorkflowTool
25
- } from "../../../shared/@ai-setting/roy-agent-core-r5axf0ad.js";
25
+ } from "../../../shared/@ai-setting/roy-agent-core-0y64qaac.js";
26
26
  import {
27
27
  WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
28
28
  WorkflowJsonOutputMarker,
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  ToolComponent,
23
23
  ToolRegistry,
24
24
  ToolValidator
25
- } from "./shared/@ai-setting/roy-agent-core-pwzkgtgr.js";
25
+ } from "./shared/@ai-setting/roy-agent-core-3arrpf7n.js";
26
26
  import {
27
27
  bashTool,
28
28
  editFileTool,
@@ -32,7 +32,7 @@ import {
32
32
  grepTool,
33
33
  readFileTool,
34
34
  writeFileTool
35
- } from "./shared/@ai-setting/roy-agent-core-8pk6a00t.js";
35
+ } from "./shared/@ai-setting/roy-agent-core-qhjb153z.js";
36
36
  import {
37
37
  closeDatabase
38
38
  } from "./shared/@ai-setting/roy-agent-core-h4h55x4h.js";
@@ -92,20 +92,20 @@ import {
92
92
  } from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
93
93
  import {
94
94
  WorkflowComponent
95
- } from "./shared/@ai-setting/roy-agent-core-dp73ghtz.js";
95
+ } from "./shared/@ai-setting/roy-agent-core-6n7xwv4v.js";
96
96
  import {
97
97
  init_node_registry_helper,
98
98
  registerDecoratorNodeType
99
99
  } from "./shared/@ai-setting/roy-agent-core-fjexv5nm.js";
100
- import"./shared/@ai-setting/roy-agent-core-gttz2jpm.js";
100
+ import"./shared/@ai-setting/roy-agent-core-9y09xfav.js";
101
101
  import"./shared/@ai-setting/roy-agent-core-5kdw0p98.js";
102
102
  import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
103
103
  import"./shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
104
104
  import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
105
105
  import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
106
- import"./shared/@ai-setting/roy-agent-core-j754zgb4.js";
106
+ import"./shared/@ai-setting/roy-agent-core-hc20420t.js";
107
107
  import"./shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
108
- import"./shared/@ai-setting/roy-agent-core-r5axf0ad.js";
108
+ import"./shared/@ai-setting/roy-agent-core-0y64qaac.js";
109
109
  import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
110
110
  import"./shared/@ai-setting/roy-agent-core-tq9528d3.js";
111
111
  import {
@@ -132,7 +132,7 @@ import {
132
132
  } from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
133
133
  import {
134
134
  TaskComponent
135
- } from "./shared/@ai-setting/roy-agent-core-bk5g94yd.js";
135
+ } from "./shared/@ai-setting/roy-agent-core-r1adqgaa.js";
136
136
  import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
137
137
  import"./shared/@ai-setting/roy-agent-core-bgw4dq11.js";
138
138
  import {
@@ -147,7 +147,7 @@ import {
147
147
  getXDGPath,
148
148
  getXDGPaths
149
149
  } from "./shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
150
- import"./shared/@ai-setting/roy-agent-core-7nh5h9fn.js";
150
+ import"./shared/@ai-setting/roy-agent-core-9vwyj29a.js";
151
151
  import"./shared/@ai-setting/roy-agent-core-t94ktchq.js";
152
152
  import {
153
153
  TaskHookPoints
@@ -147,16 +147,40 @@ var WorkflowListInputSchema = z3.object({
147
147
  tags: z3.array(z3.string()).optional().describe("Filter by multiple tags (AND)"),
148
148
  search: z3.string().optional().describe("Search workflows by keyword"),
149
149
  limit: z3.number().positive().optional().describe("Maximum number of results to return"),
150
- offset: z3.number().min(0).optional().describe("Offset for pagination")
150
+ offset: z3.number().min(0).optional().describe("Offset for pagination"),
151
+ page: z3.number().int().min(1).optional().describe("1-based page number (optional; defaults to 1)")
151
152
  });
153
+ function projectWorkflow(w) {
154
+ return {
155
+ name: w.name,
156
+ version: w.version,
157
+ description: w.description,
158
+ tags: w.tags,
159
+ created_at: w.createdAt
160
+ };
161
+ }
162
+ function buildListToolOutput(result, params) {
163
+ return {
164
+ total: result.total,
165
+ count: result.workflows.length,
166
+ truncated: result.total > result.workflows.length,
167
+ limit: params.limit,
168
+ offset: params.offset,
169
+ page: params.page ?? 1,
170
+ available_tags: result.available_tags,
171
+ workflows: result.workflows.map(projectWorkflow)
172
+ };
173
+ }
152
174
  function createWorkflowListTool(workflowService) {
153
175
  return {
154
176
  name: "workflow_list",
155
- description: "List all registered workflows with optional filtering. " + "Returns `workflows`, `total` (filtered count regardless of pagination), `count` (returned count), " + "`limit`, `offset`, and `available_tags` (sorted by usage_count DESC). " + "Multi-tag filter uses AND logic. " + "\uD83D\uDCA1 TIP: The `available_tags` field tells you what tags already exist. " + "Before calling `workflow_add` with new tags, call `workflow_tag_list` to discover " + "existing tags and prefer reusing them for semantic consistency " + "(e.g. reuse 'ci-cd' rather than creating 'continuous-integration'). " + "Avoid tag proliferation is a design goal — limit the number of distinct tags in the pool.",
177
+ description: "List all registered workflows with optional filtering. " + "Returns canonical JSON shape (Code Review #1479 follow-up): " + "`total` (filtered count BEFORE pagination), `count` (returned count), `truncated` (true when total > count), " + "`limit`, `offset`, `page` (1-based page number; defaults to 1), `available_tags` (sorted by usage_count DESC), " + "and `workflows` (the array, always LAST so downstream tail-truncation strips it rather than the metadata). " + "Multi-tag filter uses AND logic. " + "\uD83D\uDCA1 TIP: The `available_tags` field tells you what tags already exist. " + "Before calling `workflow_add` with new tags, call `workflow_tag_list` to discover " + "existing tags and prefer reusing them for semantic consistency " + "(e.g. reuse 'ci-cd' rather than creating 'continuous-integration'). " + "Avoid tag proliferation is a design goal — limit the number of distinct tags in the pool.",
156
178
  parameters: WorkflowListInputSchema,
157
179
  execute: async (args, ctx) => {
158
180
  const params = WorkflowListInputSchema.parse(args);
159
181
  try {
182
+ const effectivePage = params.page ?? 1;
183
+ const effectiveOffset = params.offset !== undefined ? params.offset : (effectivePage - 1) * (params.limit ?? 20);
160
184
  const options = {};
161
185
  if (params.tag !== undefined)
162
186
  options.tag = params.tag;
@@ -164,54 +188,41 @@ function createWorkflowListTool(workflowService) {
164
188
  options.search = params.search;
165
189
  if (params.limit !== undefined)
166
190
  options.limit = params.limit;
167
- if (params.offset !== undefined)
168
- options.offset = params.offset;
191
+ if (effectiveOffset !== 0)
192
+ options.offset = effectiveOffset;
169
193
  if (params.tags && params.tags.length > 0) {
170
- const result2 = await workflowService.searchWorkflowsWithTags ? await workflowService.searchWorkflowsWithTags({
194
+ const result2 = workflowService.searchWorkflowsWithTags ? await workflowService.searchWorkflowsWithTags({
171
195
  tags: params.tags,
172
196
  limit: params.limit,
173
- offset: params.offset
174
- }) : { workflows: workflowService.searchWorkflows({ tags: params.tags, limit: params.limit, offset: params.offset }), available_tags: [], total: 0 };
197
+ offset: effectiveOffset
198
+ }) : {
199
+ workflows: workflowService.searchWorkflows({
200
+ tags: params.tags,
201
+ limit: params.limit,
202
+ offset: effectiveOffset
203
+ }),
204
+ available_tags: [],
205
+ total: workflowService.searchWorkflows({
206
+ tags: params.tags
207
+ }).length
208
+ };
175
209
  return {
176
210
  success: true,
177
- output: JSON.stringify({
178
- workflows: result2.workflows.map((w) => ({
179
- name: w.name,
180
- version: w.version,
181
- description: w.description,
182
- tags: w.tags,
183
- created_at: w.createdAt
184
- })),
185
- available_tags: result2.available_tags,
186
- total: result2.total,
187
- count: result2.workflows.length,
188
- limit: params.limit,
189
- offset: params.offset
190
- }, null, 2),
211
+ output: JSON.stringify(buildListToolOutput(result2, params), null, 2),
191
212
  metadata: { execution_time_ms: 0 }
192
213
  };
193
214
  }
194
215
  const result = workflowService.listWorkflowsWithTags ? await workflowService.listWorkflowsWithTags(options) : {
195
216
  workflows: workflowService.listWorkflows(options),
196
217
  available_tags: [],
197
- total: 0
218
+ total: workflowService.listWorkflows({
219
+ tag: options.tag,
220
+ search: options.search
221
+ }).length
198
222
  };
199
223
  return {
200
224
  success: true,
201
- output: JSON.stringify({
202
- workflows: result.workflows.map((w) => ({
203
- name: w.name,
204
- version: w.version,
205
- description: w.description,
206
- tags: w.tags,
207
- created_at: w.createdAt
208
- })),
209
- available_tags: result.available_tags,
210
- total: result.total,
211
- count: result.workflows.length,
212
- limit: params.limit,
213
- offset: params.offset
214
- }, null, 2),
225
+ output: JSON.stringify(buildListToolOutput(result, params), null, 2),
215
226
  metadata: { execution_time_ms: 0 }
216
227
  };
217
228
  } catch (error) {
@@ -6,7 +6,7 @@ import {
6
6
  WorkflowEngine,
7
7
  exports_engine,
8
8
  init_engine
9
- } from "./roy-agent-core-gttz2jpm.js";
9
+ } from "./roy-agent-core-9y09xfav.js";
10
10
  import {
11
11
  askUserTool,
12
12
  createRunWorkflowTool,
@@ -17,7 +17,7 @@ import {
17
17
  createWorkflowRunStopTool,
18
18
  createWorkflowSearchTool,
19
19
  createWorkflowTagListTool
20
- } from "./roy-agent-core-r5axf0ad.js";
20
+ } from "./roy-agent-core-0y64qaac.js";
21
21
  import {
22
22
  WorkflowService
23
23
  } from "./roy-agent-core-tq9528d3.js";
@@ -248,7 +248,10 @@ function listTasksTool(taskComponent) {
248
248
  return {
249
249
  name: "task_list",
250
250
  description: "List tasks with optional filters for status, priority, type, parent_task_id, " + "and depth (hierarchy level). " + `depth: 0=只根任务(无父任务),1=根+一层子任务,2=根+二层子任务,-1 或忽略=全部。
251
- ` + "Returns { tasks, total, limit, offset } where total is the count of all " + "matching tasks BEFORE pagination.",
251
+ ` + `Returns { total, count, truncated, limit, offset, depth, tasks } where:
252
+ ` + ` - total: count of all matching tasks BEFORE pagination
253
+ ` + " - count: count of tasks in the returned `tasks` array (after pagination)\n" + ` - truncated: true when total > count (data was truncated by pagination)
254
+ ` + "Note: `total` is the FIRST field in the response so it survives tail-truncation " + "by ToolComponent.truncateOutput.",
252
255
  parameters: ListTasksToolSchema,
253
256
  execute: async (args, ctx) => {
254
257
  const params = ListTasksToolSchema.parse(args);
@@ -265,12 +268,13 @@ function listTasksTool(taskComponent) {
265
268
  return {
266
269
  success: true,
267
270
  output: JSON.stringify({
268
- tasks: result.tasks,
269
271
  total: result.total,
270
272
  count: result.tasks.length,
273
+ truncated: result.total > result.tasks.length,
271
274
  limit: params.limit,
272
275
  offset: params.offset,
273
- depth: params.depth
276
+ depth: params.depth,
277
+ tasks: result.tasks
274
278
  }),
275
279
  metadata: { execution_time_ms: 0 }
276
280
  };
@@ -19,7 +19,7 @@ import {
19
19
  init_skill_node,
20
20
  init_tool_node,
21
21
  init_workflow_node
22
- } from "./roy-agent-core-j754zgb4.js";
22
+ } from "./roy-agent-core-hc20420t.js";
23
23
  import {
24
24
  WorkflowError,
25
25
  createWorkflowEvent,
@@ -1856,7 +1856,15 @@ var init_engine = __esm(() => {
1856
1856
  }
1857
1857
  const { stripEphemeralResumeInput } = await import("./roy-agent-core-2vhsccvz.js");
1858
1858
  const { workflowInput: runtimeInput } = stripEphemeralResumeInput(rawRuntimeInput);
1859
- const mergedWorkflowInput = { ...persistedInput, ...runtimeInput };
1859
+ const defaultsFromSchema = {};
1860
+ if (definition.inputs) {
1861
+ for (const [key, param] of Object.entries(definition.inputs)) {
1862
+ if (param.default !== undefined) {
1863
+ defaultsFromSchema[key] = param.default;
1864
+ }
1865
+ }
1866
+ }
1867
+ const mergedWorkflowInput = { ...defaultsFromSchema, ...persistedInput, ...runtimeInput };
1860
1868
  const workflowInput = Object.keys(mergedWorkflowInput).length > 0 ? mergedWorkflowInput : undefined;
1861
1869
  const config = {
1862
1870
  parallelLimit,
@@ -66,7 +66,7 @@ var init_tool_node = __esm(() => {
66
66
  }
67
67
  if (toolName === "bash" && typeof input.command === "string") {
68
68
  const trimmed = input.command.replace(/\n+$/, "");
69
- const echoMatch = trimmed.match(/^echo\s+"([\s\S]*)"\s*$/);
69
+ const echoMatch = trimmed.match(/^echo\s+"([^\n\r]*)"\s*$/);
70
70
  if (echoMatch) {
71
71
  let inner = echoMatch[1];
72
72
  inner = inner.replace(/\\/g, "\\\\");
@@ -1,3 +1,7 @@
1
+ import {
2
+ init_decorator,
3
+ wrapFunction
4
+ } from "./roy-agent-core-k05v31rc.js";
1
5
  import {
2
6
  exports_tracer_provider,
3
7
  init_propagation,
@@ -10,6 +14,7 @@ import {
10
14
 
11
15
  // src/env/tool/built-in/bash.ts
12
16
  init_propagation();
17
+ init_decorator();
13
18
  import { z } from "zod";
14
19
  import { Effect as Effect2 } from "effect";
15
20
 
@@ -188,7 +193,7 @@ var bashTool = {
188
193
  tags: ["shell", "command", "terminal", "exec"],
189
194
  version: "2.0.0"
190
195
  },
191
- execute: async (args, ctx) => {
196
+ execute: wrapFunction(async (args, ctx) => {
192
197
  const startTime = Date.now();
193
198
  const { command, workdir, timeout = 60000, env } = args;
194
199
  const currentSpanCtx = getCurrentSpanContext();
@@ -293,7 +298,7 @@ var bashTool = {
293
298
  }
294
299
  };
295
300
  }
296
- }
301
+ }, "tool.bash.execute", { recordParams: true, recordResult: true })
297
302
  };
298
303
 
299
304
  // src/env/tool/built-in/echo.ts
@@ -20,7 +20,7 @@ import {
20
20
  listTasksTool,
21
21
  searchTasksTool,
22
22
  updateTaskTool
23
- } from "./roy-agent-core-7nh5h9fn.js";
23
+ } from "./roy-agent-core-9vwyj29a.js";
24
24
  import {
25
25
  createOperationTool,
26
26
  deleteOperationTool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-agent-core",
3
- "version": "1.5.86",
3
+ "version": "1.5.87",
4
4
  "type": "module",
5
5
  "description": "Core SDK for roy-agent - Environment, Components, Tools, Sessions, Tasks",
6
6
  "main": "./dist/index.js",