@ai-setting/roy-agent-core 1.7.58 → 1.7.61

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 (120) hide show
  1. package/dist/config/index.js +8 -8
  2. package/dist/env/agent/index.js +14 -14
  3. package/dist/env/commands/index.js +8 -8
  4. package/dist/env/context/index.js +4 -4
  5. package/dist/env/debug/index.js +8 -8
  6. package/dist/env/event-source/cli-command-handler.d.ts +90 -0
  7. package/dist/env/event-source/event-source-handlers.d.ts +12 -1
  8. package/dist/env/event-source/index.d.ts +4 -2
  9. package/dist/env/event-source/index.js +30 -20
  10. package/dist/env/event-source/types.d.ts +89 -1
  11. package/dist/env/hook/index.js +6 -6
  12. package/dist/env/index.d.ts +1 -1
  13. package/dist/env/index.js +46 -46
  14. package/dist/env/llm/index.js +9 -9
  15. package/dist/env/log-trace/index.d.ts +1 -1
  16. package/dist/env/log-trace/index.js +12 -8
  17. package/dist/env/log-trace/logger.d.ts +2 -0
  18. package/dist/env/mcp/index.js +9 -9
  19. package/dist/env/mcp/tool/index.js +2 -2
  20. package/dist/env/memory/index.js +9 -9
  21. package/dist/env/memory/plugin/index.js +2 -2
  22. package/dist/env/plugin/index.js +8 -8
  23. package/dist/env/prompt/index.js +8 -8
  24. package/dist/env/session/index.js +11 -11
  25. package/dist/env/session/storage/index.js +5 -5
  26. package/dist/env/skill/index.js +8 -8
  27. package/dist/env/task/delegate/index.js +9 -9
  28. package/dist/env/task/index.js +16 -16
  29. package/dist/env/task/mcp/index.d.ts +16 -0
  30. package/dist/env/task/mcp/index.js +222 -0
  31. package/dist/env/task/mcp/task-mcp-server.d.ts +142 -0
  32. package/dist/env/task/plugins/index.d.ts +1 -0
  33. package/dist/env/task/plugins/index.js +47 -12
  34. package/dist/env/task/storage/index.js +4 -4
  35. package/dist/env/task/storage/migrations/log-migration.d.ts +19 -0
  36. package/dist/env/task/storage/sqlite-task-store.d.ts +29 -0
  37. package/dist/env/task/task-component.d.ts +48 -3
  38. package/dist/env/task/tools/index.js +4 -4
  39. package/dist/env/task/tools/task-types.d.ts +60 -11
  40. package/dist/env/tool/built-in/index.js +4 -4
  41. package/dist/env/tool/index.js +11 -11
  42. package/dist/env/workflow/engine/index.js +13 -13
  43. package/dist/env/workflow/hooks/index.js +8 -8
  44. package/dist/env/workflow/index.js +23 -23
  45. package/dist/env/workflow/nodes/index.js +3 -3
  46. package/dist/env/workflow/plugins/index.js +9 -9
  47. package/dist/env/workflow/service/index.js +3 -3
  48. package/dist/env/workflow/storage/index.js +4 -4
  49. package/dist/env/workflow/tools/index.js +15 -15
  50. package/dist/env/workflow/tools/run-workflow.d.ts +30 -0
  51. package/dist/env/workflow/utils/index.js +5 -5
  52. package/dist/env/workflow/utils/session-recovery.d.ts +27 -0
  53. package/dist/index.js +81 -71
  54. package/dist/shared/@ai-setting/{roy-agent-core-tze5596n.js → roy-agent-core-0f989bnp.js} +3 -3
  55. package/dist/shared/@ai-setting/{roy-agent-core-e250355z.js → roy-agent-core-22r4zmkw.js} +3 -3
  56. package/dist/shared/@ai-setting/{roy-agent-core-8p63s836.js → roy-agent-core-2qkrpc7m.js} +1 -1
  57. package/dist/shared/@ai-setting/{roy-agent-core-47s81t6g.js → roy-agent-core-3bpntd80.js} +2 -2
  58. package/dist/shared/@ai-setting/{roy-agent-core-rcgvmtms.js → roy-agent-core-3p59ap0x.js} +1 -1
  59. package/dist/shared/@ai-setting/{roy-agent-core-en2xqxs9.js → roy-agent-core-4m5spt7m.js} +39 -14
  60. package/dist/shared/@ai-setting/{roy-agent-core-5f7myqnb.js → roy-agent-core-5565cvw8.js} +11 -5
  61. package/dist/shared/@ai-setting/{roy-agent-core-2fk8c9ax.js → roy-agent-core-5knpegzr.js} +3 -3
  62. package/dist/shared/@ai-setting/{roy-agent-core-08njdcpj.js → roy-agent-core-60p2380d.js} +1 -1
  63. package/dist/shared/@ai-setting/{roy-agent-core-0yn7a78e.js → roy-agent-core-6cyjps72.js} +14 -14
  64. package/dist/shared/@ai-setting/{roy-agent-core-89sxsrc7.js → roy-agent-core-8fy467qs.js} +1 -1
  65. package/dist/shared/@ai-setting/{roy-agent-core-x6c45yqd.js → roy-agent-core-99nwgj84.js} +1 -1
  66. package/dist/shared/@ai-setting/{roy-agent-core-20m8je6e.js → roy-agent-core-9k8ms63r.js} +1 -1
  67. package/dist/shared/@ai-setting/{roy-agent-core-0kn3zt1t.js → roy-agent-core-9s3payp1.js} +2 -2
  68. package/dist/shared/@ai-setting/{roy-agent-core-hefarcp0.js → roy-agent-core-a5nh5q6v.js} +1 -1
  69. package/dist/shared/@ai-setting/{roy-agent-core-hs41gx9w.js → roy-agent-core-aa514zm8.js} +5 -5
  70. package/dist/shared/@ai-setting/{roy-agent-core-yphwdm9x.js → roy-agent-core-ajmgyawx.js} +2 -2
  71. package/dist/shared/@ai-setting/{roy-agent-core-caevk7xd.js → roy-agent-core-arx535cs.js} +30 -8
  72. package/dist/shared/@ai-setting/{roy-agent-core-vath15kt.js → roy-agent-core-bc3v8pw4.js} +6 -6
  73. package/dist/shared/@ai-setting/{roy-agent-core-m97jn2ra.js → roy-agent-core-bdzdw1g3.js} +1 -1
  74. package/dist/shared/@ai-setting/{roy-agent-core-ck60j1q9.js → roy-agent-core-bxkjk7zx.js} +2 -1
  75. package/dist/shared/@ai-setting/{roy-agent-core-6bradb0j.js → roy-agent-core-cndvj1hv.js} +8 -8
  76. package/dist/shared/@ai-setting/{roy-agent-core-d75t8gea.js → roy-agent-core-dg286rpd.js} +1 -1
  77. package/dist/shared/@ai-setting/{roy-agent-core-q4gdfypk.js → roy-agent-core-dp1hp24k.js} +3 -3
  78. package/dist/shared/@ai-setting/{roy-agent-core-ygn5tzt1.js → roy-agent-core-dythsgkn.js} +2 -2
  79. package/dist/shared/@ai-setting/{roy-agent-core-em4hks9t.js → roy-agent-core-e6k448ka.js} +4 -4
  80. package/dist/shared/@ai-setting/{roy-agent-core-ytd5eztz.js → roy-agent-core-expvav8a.js} +1 -1
  81. package/dist/shared/@ai-setting/{roy-agent-core-vgdhxbx3.js → roy-agent-core-g44nbgtt.js} +2 -2
  82. package/dist/shared/@ai-setting/{roy-agent-core-14bq77wr.js → roy-agent-core-g5sw19fa.js} +1 -1
  83. package/dist/shared/@ai-setting/{roy-agent-core-991pk4ss.js → roy-agent-core-gtb4fj8j.js} +16 -16
  84. package/dist/shared/@ai-setting/{roy-agent-core-gksw1gjb.js → roy-agent-core-hf0t8agb.js} +1 -1
  85. package/dist/shared/@ai-setting/{roy-agent-core-txwptxk1.js → roy-agent-core-j0x9yf96.js} +3 -3
  86. package/dist/shared/@ai-setting/{roy-agent-core-84rs0c8d.js → roy-agent-core-jrksyqb6.js} +7 -7
  87. package/dist/shared/@ai-setting/{roy-agent-core-ge87xbas.js → roy-agent-core-jsdqzfbj.js} +1 -1
  88. package/dist/shared/@ai-setting/{roy-agent-core-m68z3pw1.js → roy-agent-core-jsn21cb9.js} +1 -1
  89. package/dist/shared/@ai-setting/{roy-agent-core-n0p0hwgd.js → roy-agent-core-kfmrfaft.js} +1 -1
  90. package/dist/shared/@ai-setting/{roy-agent-core-7q4wdze2.js → roy-agent-core-khc23qs1.js} +1 -1
  91. package/dist/shared/@ai-setting/{roy-agent-core-e1w17tht.js → roy-agent-core-m2tv4pj0.js} +2 -2
  92. package/dist/shared/@ai-setting/{roy-agent-core-4096f575.js → roy-agent-core-mhppywse.js} +4 -4
  93. package/dist/shared/@ai-setting/{roy-agent-core-t64nmayv.js → roy-agent-core-mw0bc9g6.js} +2 -2
  94. package/dist/shared/@ai-setting/{roy-agent-core-8bngppw0.js → roy-agent-core-n1ck0x1r.js} +13 -13
  95. package/dist/shared/@ai-setting/{roy-agent-core-w93z6a42.js → roy-agent-core-nd5171pv.js} +12 -12
  96. package/dist/shared/@ai-setting/{roy-agent-core-geh6j7bw.js → roy-agent-core-p2dpcyrz.js} +2 -2
  97. package/dist/shared/@ai-setting/{roy-agent-core-fw6k4w1h.js → roy-agent-core-pj5tfmn5.js} +6 -6
  98. package/dist/shared/@ai-setting/{roy-agent-core-029r8kdw.js → roy-agent-core-q212q0w1.js} +4 -4
  99. package/dist/shared/@ai-setting/{roy-agent-core-psg6f1v6.js → roy-agent-core-qgapy83x.js} +6 -6
  100. package/dist/shared/@ai-setting/{roy-agent-core-jjxdmedn.js → roy-agent-core-qpqqx1wd.js} +2 -2
  101. package/dist/shared/@ai-setting/{roy-agent-core-syyw58p9.js → roy-agent-core-qrjs2500.js} +2 -2
  102. package/dist/shared/@ai-setting/{roy-agent-core-84xtww7d.js → roy-agent-core-qw5fpa24.js} +3 -3
  103. package/dist/shared/@ai-setting/{roy-agent-core-kq9pz2a7.js → roy-agent-core-rnzm0tpf.js} +4 -4
  104. package/dist/shared/@ai-setting/{roy-agent-core-7nb23tdd.js → roy-agent-core-s7w47mnn.js} +1 -1
  105. package/dist/shared/@ai-setting/{roy-agent-core-t4x089js.js → roy-agent-core-sf9tsj0g.js} +1 -1
  106. package/dist/shared/@ai-setting/{roy-agent-core-jjhw9am6.js → roy-agent-core-tn96n4wz.js} +4 -4
  107. package/dist/shared/@ai-setting/{roy-agent-core-c7w2h47a.js → roy-agent-core-vmfk4m1v.js} +3 -3
  108. package/dist/shared/@ai-setting/{roy-agent-core-cyefe8z5.js → roy-agent-core-x1m0gs0q.js} +1 -1
  109. package/dist/shared/@ai-setting/{roy-agent-core-baaa4wtp.js → roy-agent-core-xc0es9zc.js} +2 -2
  110. package/dist/shared/@ai-setting/{roy-agent-core-fbjd7bt6.js → roy-agent-core-xeqp659x.js} +64 -29
  111. package/dist/shared/@ai-setting/{roy-agent-core-rt115qfc.js → roy-agent-core-y0k9kaxz.js} +14 -4
  112. package/dist/shared/@ai-setting/{roy-agent-core-c36335nw.js → roy-agent-core-yd85623y.js} +15 -3
  113. package/dist/shared/@ai-setting/{roy-agent-core-9zhkdg6w.js → roy-agent-core-ygfjgk9b.js} +2 -2
  114. package/dist/shared/@ai-setting/{roy-agent-core-vh0qzb24.js → roy-agent-core-ymcvsdzn.js} +36 -15
  115. package/dist/shared/@ai-setting/{roy-agent-core-eanq305k.js → roy-agent-core-yr5eqyhz.js} +11 -11
  116. package/dist/shared/@ai-setting/{roy-agent-core-fy4mcj6x.js → roy-agent-core-ytnedzks.js} +292 -105
  117. package/dist/shared/@ai-setting/{roy-agent-core-2ctyjy62.js → roy-agent-core-z51jktet.js} +1 -1
  118. package/dist/utils/temp-file-manager/index.js +2 -2
  119. package/package.json +16 -1
  120. /package/dist/shared/@ai-setting/{roy-agent-core-3ztzc83c.js → roy-agent-core-5enxfga2.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  exports_node_registry_helper,
3
3
  init_node_registry_helper
4
- } from "./roy-agent-core-vgdhxbx3.js";
4
+ } from "./roy-agent-core-g44nbgtt.js";
5
5
  import {
6
6
  askUserTool,
7
7
  createRunWorkflowTool,
@@ -13,22 +13,22 @@ import {
13
13
  createWorkflowSearchTool,
14
14
  createWorkflowTagListTool,
15
15
  createWorkflowValidateTool
16
- } from "./roy-agent-core-en2xqxs9.js";
16
+ } from "./roy-agent-core-4m5spt7m.js";
17
17
  import {
18
18
  WorkflowService
19
- } from "./roy-agent-core-9zhkdg6w.js";
19
+ } from "./roy-agent-core-ygfjgk9b.js";
20
20
  import {
21
21
  WorkflowEngine,
22
22
  exports_engine,
23
23
  init_engine
24
- } from "./roy-agent-core-w93z6a42.js";
24
+ } from "./roy-agent-core-nd5171pv.js";
25
25
  import {
26
26
  BaseComponent
27
- } from "./roy-agent-core-0kn3zt1t.js";
27
+ } from "./roy-agent-core-9s3payp1.js";
28
28
  import {
29
29
  createLogger,
30
30
  init_logger
31
- } from "./roy-agent-core-rt115qfc.js";
31
+ } from "./roy-agent-core-y0k9kaxz.js";
32
32
  import {
33
33
  __require,
34
34
  __toCommonJS
@@ -104,7 +104,7 @@ class WorkflowComponent extends BaseComponent {
104
104
  return;
105
105
  try {
106
106
  const { NodeRegistry } = await import("../../env/workflow/engine/index.js");
107
- const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-2fk8c9ax.js");
107
+ const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-5knpegzr.js");
108
108
  this.nodeRegistry = new NodeRegistry;
109
109
  registerDecoratorNodeType2(this.nodeRegistry);
110
110
  this.decoratorsRegistered = true;
@@ -134,14 +134,14 @@ class WorkflowComponent extends BaseComponent {
134
134
  }
135
135
  async runWorkflow(definition, input, options) {
136
136
  const { NodeRegistry } = await import("../../env/workflow/engine/index.js");
137
- const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-2fk8c9ax.js");
137
+ const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-5knpegzr.js");
138
138
  const toolComponent = this.toolComponent || this._workflowEnv?.getComponent("tool");
139
139
  const skillComponent = this._workflowEnv?.getComponent("skill");
140
140
  let agentRunner = this.agentRunner;
141
141
  if (!agentRunner && this._workflowEnv) {
142
142
  const agentComponent = this._workflowEnv.getComponent("agent");
143
143
  if (agentComponent) {
144
- const { AgentComponentAdapter } = await import("./roy-agent-core-vath15kt.js");
144
+ const { AgentComponentAdapter } = await import("./roy-agent-core-bc3v8pw4.js");
145
145
  agentRunner = new AgentComponentAdapter(agentComponent, {}, this.sessionComponent);
146
146
  }
147
147
  }
@@ -163,7 +163,7 @@ class WorkflowComponent extends BaseComponent {
163
163
  if (this.workflowService) {
164
164
  this.workflowService = null;
165
165
  try {
166
- const { closeDatabase } = await import("./roy-agent-core-4096f575.js");
166
+ const { closeDatabase } = await import("./roy-agent-core-mhppywse.js");
167
167
  closeDatabase();
168
168
  componentLogger.info("[WorkflowComponent] SQLite database closed");
169
169
  } catch (error) {
@@ -241,9 +241,9 @@ class WorkflowComponent extends BaseComponent {
241
241
  }
242
242
  async initSqliteService() {
243
243
  try {
244
- const { getDatabase, initializeTables } = await import("./roy-agent-core-4096f575.js");
245
- const { WorkflowRepository } = await import("./roy-agent-core-jjhw9am6.js");
246
- const { TagRepository } = await import("./roy-agent-core-e250355z.js");
244
+ const { getDatabase, initializeTables } = await import("./roy-agent-core-mhppywse.js");
245
+ const { WorkflowRepository } = await import("./roy-agent-core-tn96n4wz.js");
246
+ const { TagRepository } = await import("./roy-agent-core-22r4zmkw.js");
247
247
  const db = getDatabase();
248
248
  initializeTables();
249
249
  const workflowRepository = new WorkflowRepository(db);
@@ -309,7 +309,7 @@ class WorkflowComponent extends BaseComponent {
309
309
  this.workflowService = null;
310
310
  this.nodeRegistry = null;
311
311
  try {
312
- const { closeDatabase } = await import("./roy-agent-core-4096f575.js");
312
+ const { closeDatabase } = await import("./roy-agent-core-mhppywse.js");
313
313
  closeDatabase();
314
314
  } catch {}
315
315
  this._status = "stopped";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DAGManager,
3
3
  init_dag_manager
4
- } from "./roy-agent-core-08njdcpj.js";
4
+ } from "./roy-agent-core-60p2380d.js";
5
5
 
6
6
  // src/env/workflow/utils/node-output-contracts.ts
7
7
  var VIRTUAL_OUTPUT_FIELD = "output";
@@ -7,7 +7,7 @@ import {
7
7
  isBuiltInEventSourceType,
8
8
  isValidEventSourceType,
9
9
  validateEventSourceConfig
10
- } from "./roy-agent-core-ck60j1q9.js";
10
+ } from "./roy-agent-core-bxkjk7zx.js";
11
11
  import"./roy-agent-core-fs0mn2jk.js";
12
12
  export {
13
13
  validateEventSourceConfig,
@@ -8,7 +8,7 @@ import {
8
8
  } from "./roy-agent-core-qxnbvgwe.js";
9
9
  import {
10
10
  BaseComponent
11
- } from "./roy-agent-core-0kn3zt1t.js";
11
+ } from "./roy-agent-core-9s3payp1.js";
12
12
  import {
13
13
  __require
14
14
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createHook,
3
3
  init_hook
4
- } from "./roy-agent-core-ytd5eztz.js";
4
+ } from "./roy-agent-core-expvav8a.js";
5
5
  import {
6
6
  HookManager
7
- } from "./roy-agent-core-yphwdm9x.js";
7
+ } from "./roy-agent-core-ajmgyawx.js";
8
8
 
9
9
  // src/env/component.ts
10
10
  init_hook();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_workflow_hook_points
3
- } from "./roy-agent-core-geh6j7bw.js";
3
+ } from "./roy-agent-core-p2dpcyrz.js";
4
4
  import {
5
5
  __esm
6
6
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -3,21 +3,21 @@ import {
3
3
  } from "./roy-agent-core-az13yzmc.js";
4
4
  import {
5
5
  BaseComponent
6
- } from "./roy-agent-core-0kn3zt1t.js";
6
+ } from "./roy-agent-core-9s3payp1.js";
7
7
  import {
8
8
  globalHookManager,
9
9
  init_global_hook_manager
10
- } from "./roy-agent-core-yphwdm9x.js";
10
+ } from "./roy-agent-core-ajmgyawx.js";
11
11
  import {
12
12
  init_context
13
- } from "./roy-agent-core-m97jn2ra.js";
13
+ } from "./roy-agent-core-bdzdw1g3.js";
14
14
  import {
15
15
  getEnvContextOrEmpty
16
- } from "./roy-agent-core-syyw58p9.js";
16
+ } from "./roy-agent-core-qrjs2500.js";
17
17
  import {
18
18
  createLogger,
19
19
  init_logger
20
- } from "./roy-agent-core-rt115qfc.js";
20
+ } from "./roy-agent-core-y0k9kaxz.js";
21
21
  import {
22
22
  __require
23
23
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  init_context
3
- } from "./roy-agent-core-m97jn2ra.js";
3
+ } from "./roy-agent-core-bdzdw1g3.js";
4
4
  import {
5
5
  getEnvContext
6
- } from "./roy-agent-core-syyw58p9.js";
6
+ } from "./roy-agent-core-qrjs2500.js";
7
7
  import {
8
8
  __esm
9
9
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -97,23 +97,45 @@ function findLastCallMessage(messages) {
97
97
  }
98
98
  function parseNodeOutputs(messages) {
99
99
  const outputs = new Map;
100
- let lastStartNodeId = null;
100
+ const startedNodes = new Set;
101
101
  for (const msg of messages) {
102
102
  const metadata = msg.metadata;
103
103
  const msgType = metadata?.type;
104
104
  if (msgType === "workflow.node.start" || msgType === "workflow.node.call") {
105
- lastStartNodeId = getWorkflowNodeIdFromMetadata(metadata) ?? null;
106
- } else if ((msgType === "workflow.node.end" || msgType === "workflow.node.result") && lastStartNodeId) {
107
- try {
108
- outputs.set(lastStartNodeId, JSON.parse(msg.content));
109
- } catch {
110
- outputs.set(lastStartNodeId, msg.content);
105
+ const startedId = getWorkflowNodeIdFromMetadata(metadata);
106
+ if (startedId) {
107
+ startedNodes.add(startedId);
111
108
  }
112
- lastStartNodeId = null;
109
+ continue;
113
110
  }
111
+ if (msgType !== "workflow.node.end" && msgType !== "workflow.node.result") {
112
+ continue;
113
+ }
114
+ const nodeId = getWorkflowNodeIdFromMetadata(metadata);
115
+ if (!nodeId) {
116
+ continue;
117
+ }
118
+ if (msgType === "workflow.node.result" && !startedNodes.has(nodeId)) {
119
+ continue;
120
+ }
121
+ outputs.set(nodeId, extractNodeOutputValue(msg));
114
122
  }
115
123
  return outputs;
116
124
  }
125
+ function extractNodeOutputValue(msg) {
126
+ const parts = msg.parts;
127
+ if (Array.isArray(parts)) {
128
+ const part = parts.find((p) => p && p["type"] === "workflow-node-end" && ("output" in p));
129
+ if (part && part["output"] !== undefined) {
130
+ return part["output"];
131
+ }
132
+ }
133
+ try {
134
+ return JSON.parse(msg.content);
135
+ } catch {
136
+ return msg.content;
137
+ }
138
+ }
117
139
  function hasPendingAskUser(messages) {
118
140
  if (messages.length === 0)
119
141
  return false;
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  AgentComponentAdapter,
3
3
  init_agent_component_adapter
4
- } from "./roy-agent-core-txwptxk1.js";
4
+ } from "./roy-agent-core-j0x9yf96.js";
5
5
  import"./roy-agent-core-1db4vpc6.js";
6
6
  import"./roy-agent-core-ze068vc9.js";
7
7
  import"./roy-agent-core-e25xkv53.js";
8
- import"./roy-agent-core-yphwdm9x.js";
9
- import"./roy-agent-core-m97jn2ra.js";
10
- import"./roy-agent-core-syyw58p9.js";
11
- import"./roy-agent-core-8p63s836.js";
12
- import"./roy-agent-core-rt115qfc.js";
8
+ import"./roy-agent-core-ajmgyawx.js";
9
+ import"./roy-agent-core-bdzdw1g3.js";
10
+ import"./roy-agent-core-qrjs2500.js";
11
+ import"./roy-agent-core-2qkrpc7m.js";
12
+ import"./roy-agent-core-y0k9kaxz.js";
13
13
  import"./roy-agent-core-jnszp0jq.js";
14
14
  import"./roy-agent-core-fs0mn2jk.js";
15
15
  init_agent_component_adapter();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_env_context,
3
3
  init_env_event
4
- } from "./roy-agent-core-syyw58p9.js";
4
+ } from "./roy-agent-core-qrjs2500.js";
5
5
  import {
6
6
  __esm
7
7
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -6,7 +6,8 @@ import {
6
6
  var BUILT_IN_EVENT_SOURCE_TYPES = {
7
7
  LARK_CLI: "lark-cli",
8
8
  TIMER: "timer",
9
- BOUNTY_IM: "bounty-im"
9
+ BOUNTY_IM: "bounty-im",
10
+ CLI_COMMAND: "cli-command"
10
11
  };
11
12
  var BUILT_IN_EVENT_SOURCE_TYPE_LIST = Object.values(BUILT_IN_EVENT_SOURCE_TYPES);
12
13
  var defaultLarkCliRunner = {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ProcessRegistry,
3
3
  runWithProcessRegistryAsync
4
- } from "./roy-agent-core-14bq77wr.js";
4
+ } from "./roy-agent-core-g5sw19fa.js";
5
5
  import {
6
6
  getSharedEventStore
7
- } from "./roy-agent-core-2ctyjy62.js";
7
+ } from "./roy-agent-core-z51jktet.js";
8
8
  import {
9
9
  TaskHookPoints
10
10
  } from "./roy-agent-core-1pg0fepg.js";
@@ -13,30 +13,30 @@ import {
13
13
  } from "./roy-agent-core-6masakz4.js";
14
14
  import {
15
15
  DEFAULT_SUBAGENT_PROMPT
16
- } from "./roy-agent-core-ygn5tzt1.js";
16
+ } from "./roy-agent-core-dythsgkn.js";
17
17
  import {
18
18
  runWithBgTaskIdAsync
19
19
  } from "./roy-agent-core-c1v263jn.js";
20
20
  import {
21
21
  globalHookManager,
22
22
  init_global_hook_manager
23
- } from "./roy-agent-core-yphwdm9x.js";
23
+ } from "./roy-agent-core-ajmgyawx.js";
24
24
  import {
25
25
  init_context
26
- } from "./roy-agent-core-m97jn2ra.js";
26
+ } from "./roy-agent-core-bdzdw1g3.js";
27
27
  import {
28
28
  getCurrentTaskId,
29
29
  getEnvContext
30
- } from "./roy-agent-core-syyw58p9.js";
30
+ } from "./roy-agent-core-qrjs2500.js";
31
31
  import {
32
32
  TracedAs,
33
33
  init_decorator,
34
34
  wrapFunction
35
- } from "./roy-agent-core-8p63s836.js";
35
+ } from "./roy-agent-core-2qkrpc7m.js";
36
36
  import {
37
37
  createLogger,
38
38
  init_logger
39
- } from "./roy-agent-core-rt115qfc.js";
39
+ } from "./roy-agent-core-y0k9kaxz.js";
40
40
  import {
41
41
  __legacyDecorateClassTS
42
42
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TracedAs,
3
3
  init_decorator
4
- } from "./roy-agent-core-8p63s836.js";
4
+ } from "./roy-agent-core-2qkrpc7m.js";
5
5
  import {
6
6
  __esm,
7
7
  __legacyDecorateClassTS
@@ -7,14 +7,14 @@ import {
7
7
  import {
8
8
  getCurrentProcessRegistry,
9
9
  killProcessTree
10
- } from "./roy-agent-core-14bq77wr.js";
10
+ } from "./roy-agent-core-g5sw19fa.js";
11
11
  import {
12
12
  init_decorator,
13
13
  init_trace_filters,
14
14
  toolExecResultFilter,
15
15
  toolInvokeParamFilter,
16
16
  wrapFunction
17
- } from "./roy-agent-core-8p63s836.js";
17
+ } from "./roy-agent-core-2qkrpc7m.js";
18
18
  import {
19
19
  createLogger,
20
20
  exports_tracer_provider,
@@ -22,7 +22,7 @@ import {
22
22
  init_propagation,
23
23
  init_tracer_provider,
24
24
  propagation
25
- } from "./roy-agent-core-rt115qfc.js";
25
+ } from "./roy-agent-core-y0k9kaxz.js";
26
26
  import {
27
27
  __toCommonJS
28
28
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -4,11 +4,11 @@ import {
4
4
  import {
5
5
  TracedAs,
6
6
  init_decorator
7
- } from "./roy-agent-core-8p63s836.js";
7
+ } from "./roy-agent-core-2qkrpc7m.js";
8
8
  import {
9
9
  createLogger,
10
10
  init_logger
11
- } from "./roy-agent-core-rt115qfc.js";
11
+ } from "./roy-agent-core-y0k9kaxz.js";
12
12
  import {
13
13
  __legacyDecorateClassTS
14
14
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -10,18 +10,18 @@ import {
10
10
  } from "./roy-agent-core-7hh0brvs.js";
11
11
  import {
12
12
  BaseComponent
13
- } from "./roy-agent-core-0kn3zt1t.js";
13
+ } from "./roy-agent-core-9s3payp1.js";
14
14
  import {
15
15
  createHook
16
- } from "./roy-agent-core-ytd5eztz.js";
16
+ } from "./roy-agent-core-expvav8a.js";
17
17
  import {
18
18
  globalHookManager,
19
19
  init_global_hook_manager
20
- } from "./roy-agent-core-yphwdm9x.js";
20
+ } from "./roy-agent-core-ajmgyawx.js";
21
21
  import {
22
22
  createLogger,
23
23
  init_logger
24
- } from "./roy-agent-core-rt115qfc.js";
24
+ } from "./roy-agent-core-y0k9kaxz.js";
25
25
 
26
26
  // src/env/prompt/types.ts
27
27
  import { z } from "zod";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_global_hook_manager,
3
3
  init_hook_manager
4
- } from "./roy-agent-core-yphwdm9x.js";
4
+ } from "./roy-agent-core-ajmgyawx.js";
5
5
  import {
6
6
  __esm
7
7
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -9,11 +9,11 @@ import {
9
9
  import {
10
10
  TracedAs,
11
11
  init_decorator
12
- } from "./roy-agent-core-8p63s836.js";
12
+ } from "./roy-agent-core-2qkrpc7m.js";
13
13
  import {
14
14
  createLogger,
15
15
  init_logger
16
- } from "./roy-agent-core-rt115qfc.js";
16
+ } from "./roy-agent-core-y0k9kaxz.js";
17
17
  import {
18
18
  __esm,
19
19
  __export,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createLogger,
3
3
  init_logger
4
- } from "./roy-agent-core-rt115qfc.js";
4
+ } from "./roy-agent-core-y0k9kaxz.js";
5
5
  import {
6
6
  __require
7
7
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -1,6 +1,14 @@
1
1
  import {
2
2
  createQueryBackgroundProcessTool
3
3
  } from "./roy-agent-core-amkqnyzy.js";
4
+ import {
5
+ BackgroundTaskManager,
6
+ createDelegateTool,
7
+ createStopTool
8
+ } from "./roy-agent-core-cndvj1hv.js";
9
+ import {
10
+ TaskEntityEventTypes
11
+ } from "./roy-agent-core-8gxth0eh.js";
4
12
  import {
5
13
  batchArchiveTaskTool,
6
14
  batchDeleteTaskTool,
@@ -12,7 +20,7 @@ import {
12
20
  searchTasksTool,
13
21
  treeTasksTool,
14
22
  updateTaskTool
15
- } from "./roy-agent-core-vh0qzb24.js";
23
+ } from "./roy-agent-core-ymcvsdzn.js";
16
24
  import {
17
25
  createOperationTool,
18
26
  deleteOperationTool,
@@ -20,18 +28,10 @@ import {
20
28
  listOperationsTool,
21
29
  updateOperationTool
22
30
  } from "./roy-agent-core-rn57psp0.js";
23
- import {
24
- TaskEntityEventTypes
25
- } from "./roy-agent-core-8gxth0eh.js";
26
- import {
27
- BackgroundTaskManager,
28
- createDelegateTool,
29
- createStopTool
30
- } from "./roy-agent-core-6bradb0j.js";
31
31
  import {
32
32
  SQLiteTaskStore,
33
33
  getDefaultTaskDbPath
34
- } from "./roy-agent-core-fbjd7bt6.js";
34
+ } from "./roy-agent-core-xeqp659x.js";
35
35
  import {
36
36
  TaskHookPoints
37
37
  } from "./roy-agent-core-1pg0fepg.js";
@@ -40,23 +40,23 @@ import {
40
40
  } from "./roy-agent-core-7hh0brvs.js";
41
41
  import {
42
42
  BaseComponent
43
- } from "./roy-agent-core-0kn3zt1t.js";
43
+ } from "./roy-agent-core-9s3payp1.js";
44
44
  import {
45
45
  globalHookManager,
46
46
  init_global_hook_manager
47
- } from "./roy-agent-core-yphwdm9x.js";
47
+ } from "./roy-agent-core-ajmgyawx.js";
48
48
  import {
49
49
  getEnvContextOrEmpty,
50
50
  init_env_context
51
- } from "./roy-agent-core-syyw58p9.js";
51
+ } from "./roy-agent-core-qrjs2500.js";
52
52
  import {
53
53
  TracedAs,
54
54
  init_decorator
55
- } from "./roy-agent-core-8p63s836.js";
55
+ } from "./roy-agent-core-2qkrpc7m.js";
56
56
  import {
57
57
  createLogger,
58
58
  init_logger
59
- } from "./roy-agent-core-rt115qfc.js";
59
+ } from "./roy-agent-core-y0k9kaxz.js";
60
60
  import {
61
61
  __legacyDecorateClassTS
62
62
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -440,7 +440,7 @@ class TaskComponent extends BaseComponent {
440
440
  if (!task)
441
441
  return;
442
442
  const operations = await this.store.listOperations({ taskId: id });
443
- return { task, operations };
443
+ return { ...task, operations, task };
444
444
  }
445
445
  async updateTask(id, options) {
446
446
  const updateCtx = {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_decorator,
3
3
  wrapFunction
4
- } from "./roy-agent-core-8p63s836.js";
4
+ } from "./roy-agent-core-2qkrpc7m.js";
5
5
 
6
6
  // src/env/task/plugins/fake-user-message-helper.ts
7
7
  init_decorator();
@@ -12,16 +12,16 @@ import {
12
12
  import {
13
13
  globalHookManager,
14
14
  init_global_hook_manager
15
- } from "./roy-agent-core-yphwdm9x.js";
15
+ } from "./roy-agent-core-ajmgyawx.js";
16
16
  import {
17
17
  TracedAs,
18
18
  init_decorator,
19
19
  wrapFunction
20
- } from "./roy-agent-core-8p63s836.js";
20
+ } from "./roy-agent-core-2qkrpc7m.js";
21
21
  import {
22
22
  createLogger,
23
23
  init_logger
24
- } from "./roy-agent-core-rt115qfc.js";
24
+ } from "./roy-agent-core-y0k9kaxz.js";
25
25
  import {
26
26
  __esm,
27
27
  __legacyDecorateClassTS
@@ -1,34 +1,34 @@
1
1
  import {
2
2
  createAutoTaskPlugin
3
- } from "./roy-agent-core-8bngppw0.js";
3
+ } from "./roy-agent-core-n1ck0x1r.js";
4
4
  import {
5
5
  ContextError,
6
6
  ErrorCodes
7
7
  } from "./roy-agent-core-ctdhjv68.js";
8
8
  import {
9
9
  BaseComponent
10
- } from "./roy-agent-core-0kn3zt1t.js";
10
+ } from "./roy-agent-core-9s3payp1.js";
11
11
  import {
12
12
  init_hook
13
- } from "./roy-agent-core-ytd5eztz.js";
13
+ } from "./roy-agent-core-expvav8a.js";
14
14
  import {
15
15
  init_context
16
- } from "./roy-agent-core-m97jn2ra.js";
16
+ } from "./roy-agent-core-bdzdw1g3.js";
17
17
  import {
18
18
  getEnvContext,
19
19
  init_env_context,
20
20
  runWithEnvContextAsync
21
- } from "./roy-agent-core-syyw58p9.js";
21
+ } from "./roy-agent-core-qrjs2500.js";
22
22
  import {
23
23
  TracedAs,
24
24
  envQueryParamFilter,
25
25
  init_decorator,
26
26
  init_trace_filters
27
- } from "./roy-agent-core-8p63s836.js";
27
+ } from "./roy-agent-core-2qkrpc7m.js";
28
28
  import {
29
29
  createLogger,
30
30
  init_logger
31
- } from "./roy-agent-core-rt115qfc.js";
31
+ } from "./roy-agent-core-y0k9kaxz.js";
32
32
  import {
33
33
  __legacyDecorateClassTS
34
34
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  safeParseToolArgs
3
- } from "./roy-agent-core-e1w17tht.js";
3
+ } from "./roy-agent-core-m2tv4pj0.js";
4
4
 
5
5
  // src/env/session/session-message-converter.ts
6
6
  import { randomUUID } from "crypto";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createLogger,
3
3
  init_logger
4
- } from "./roy-agent-core-rt115qfc.js";
4
+ } from "./roy-agent-core-y0k9kaxz.js";
5
5
 
6
6
  // src/env/mcp/tool/adapter.ts
7
7
  init_logger();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createLogger,
3
3
  init_logger
4
- } from "./roy-agent-core-rt115qfc.js";
4
+ } from "./roy-agent-core-y0k9kaxz.js";
5
5
 
6
6
  // src/utils/temp-file-manager/index.ts
7
7
  init_logger();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_sqlite_task_store
3
- } from "./roy-agent-core-fbjd7bt6.js";
3
+ } from "./roy-agent-core-xeqp659x.js";
4
4
 
5
5
  // src/env/task/storage/index.ts
6
6
  init_sqlite_task_store();
@@ -7,11 +7,11 @@ import {
7
7
  embedResultFilter,
8
8
  init_decorator,
9
9
  init_trace_filters
10
- } from "./roy-agent-core-8p63s836.js";
10
+ } from "./roy-agent-core-2qkrpc7m.js";
11
11
  import {
12
12
  createLogger,
13
13
  init_logger
14
- } from "./roy-agent-core-rt115qfc.js";
14
+ } from "./roy-agent-core-y0k9kaxz.js";
15
15
  import {
16
16
  __legacyDecorateClassTS,
17
17
  __require