@ai-setting/roy-agent-core 1.5.90 → 1.5.92

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 (89) hide show
  1. package/dist/config/index.js +8 -8
  2. package/dist/env/agent/index.js +15 -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/index.js +12 -12
  7. package/dist/env/hook/index.js +6 -6
  8. package/dist/env/index.js +35 -34
  9. package/dist/env/llm/index.js +10 -10
  10. package/dist/env/log-trace/index.js +8 -8
  11. package/dist/env/mcp/index.js +9 -9
  12. package/dist/env/mcp/tool/index.js +2 -2
  13. package/dist/env/memory/index.js +9 -9
  14. package/dist/env/memory/plugin/index.js +2 -2
  15. package/dist/env/plugin/index.js +8 -8
  16. package/dist/env/prompt/index.js +9 -9
  17. package/dist/env/session/index.js +11 -11
  18. package/dist/env/session/storage/index.js +4 -4
  19. package/dist/env/skill/index.js +8 -8
  20. package/dist/env/task/delegate/index.js +7 -7
  21. package/dist/env/task/index.js +12 -12
  22. package/dist/env/task/plugins/index.js +7 -7
  23. package/dist/env/task/storage/index.js +2 -2
  24. package/dist/env/task/tools/index.js +4 -4
  25. package/dist/env/tool/built-in/index.js +3 -3
  26. package/dist/env/tool/index.js +11 -10
  27. package/dist/env/workflow/engine/index.js +9 -9
  28. package/dist/env/workflow/index.js +15 -15
  29. package/dist/env/workflow/nodes/index.js +3 -3
  30. package/dist/env/workflow/service/index.js +3 -3
  31. package/dist/env/workflow/storage/index.js +4 -4
  32. package/dist/env/workflow/tools/index.js +4 -4
  33. package/dist/env/workflow/utils/index.js +3 -3
  34. package/dist/index.js +48 -47
  35. package/dist/shared/@ai-setting/{roy-agent-core-2c8eraxq.js → roy-agent-core-0ger6zdn.js} +4 -4
  36. package/dist/shared/@ai-setting/{roy-agent-core-bwjpte58.js → roy-agent-core-0vsnecwa.js} +6 -6
  37. package/dist/shared/@ai-setting/{roy-agent-core-h5867smx.js → roy-agent-core-0ye4q2jj.js} +2 -2
  38. package/dist/shared/@ai-setting/{roy-agent-core-prdngx28.js → roy-agent-core-33rhv946.js} +43 -7
  39. package/dist/shared/@ai-setting/{roy-agent-core-djtkntar.js → roy-agent-core-4w6rgxs4.js} +1 -1
  40. package/dist/shared/@ai-setting/{roy-agent-core-3952rkj0.js → roy-agent-core-578qk38y.js} +2 -2
  41. package/dist/shared/@ai-setting/roy-agent-core-5h49ct1a.js +135 -0
  42. package/dist/shared/@ai-setting/{roy-agent-core-m683wd1n.js → roy-agent-core-5j649pb1.js} +7 -7
  43. package/dist/shared/@ai-setting/{roy-agent-core-2h38rvyj.js → roy-agent-core-634ee5jb.js} +2 -2
  44. package/dist/shared/@ai-setting/{roy-agent-core-w6bmrgap.js → roy-agent-core-7svhckhz.js} +5 -5
  45. package/dist/shared/@ai-setting/{roy-agent-core-ce10b0ez.js → roy-agent-core-8x4ngxcy.js} +1 -1
  46. package/dist/shared/@ai-setting/{roy-agent-core-83d035pp.js → roy-agent-core-97tjdb2r.js} +70 -1
  47. package/dist/shared/@ai-setting/{roy-agent-core-pcdzfwdv.js → roy-agent-core-9xby523m.js} +1 -1
  48. package/dist/shared/@ai-setting/{roy-agent-core-mw4ty0ba.js → roy-agent-core-at05dk0z.js} +6 -6
  49. package/dist/shared/@ai-setting/{roy-agent-core-ewr1nw7t.js → roy-agent-core-b1vkkcbr.js} +7 -7
  50. package/dist/shared/@ai-setting/{roy-agent-core-n19rm7tw.js → roy-agent-core-b2thb9xj.js} +1 -1
  51. package/dist/shared/@ai-setting/{roy-agent-core-3sv590cv.js → roy-agent-core-b77yz0wt.js} +1 -1
  52. package/dist/shared/@ai-setting/{roy-agent-core-yanpq5gb.js → roy-agent-core-bdajt9cs.js} +2 -2
  53. package/dist/shared/@ai-setting/{roy-agent-core-3czy06aq.js → roy-agent-core-bqwj1dq0.js} +3 -3
  54. package/dist/shared/@ai-setting/{roy-agent-core-k05v31rc.js → roy-agent-core-cg146hmg.js} +1 -1
  55. package/dist/shared/@ai-setting/{roy-agent-core-07290s9n.js → roy-agent-core-cx67bv9d.js} +2 -2
  56. package/dist/shared/@ai-setting/{roy-agent-core-taxvytzz.js → roy-agent-core-cx9p8b2t.js} +4 -4
  57. package/dist/shared/@ai-setting/{roy-agent-core-d6597yp0.js → roy-agent-core-ddghwfmk.js} +3 -3
  58. package/dist/shared/@ai-setting/{roy-agent-core-tq9528d3.js → roy-agent-core-e7t3rj0e.js} +1 -1
  59. package/dist/shared/@ai-setting/{roy-agent-core-5ykms33a.js → roy-agent-core-fg5eaht3.js} +5 -5
  60. package/dist/shared/@ai-setting/{roy-agent-core-zky9jse4.js → roy-agent-core-fx1fdzbz.js} +2 -2
  61. package/dist/shared/@ai-setting/{roy-agent-core-z240ts1r.js → roy-agent-core-g2mth323.js} +1 -1
  62. package/dist/shared/@ai-setting/{roy-agent-core-7tp56w6n.js → roy-agent-core-gp872e7m.js} +2 -2
  63. package/dist/shared/@ai-setting/{roy-agent-core-c67wr8sp.js → roy-agent-core-hf8pqrvy.js} +3 -3
  64. package/dist/shared/@ai-setting/{roy-agent-core-32m0nb9j.js → roy-agent-core-j3qb695p.js} +3 -3
  65. package/dist/shared/@ai-setting/{roy-agent-core-0r4ndyn9.js → roy-agent-core-j7jeqxhd.js} +2 -2
  66. package/dist/shared/@ai-setting/{roy-agent-core-h4h55x4h.js → roy-agent-core-jexyz11d.js} +2 -2
  67. package/dist/shared/@ai-setting/{roy-agent-core-b8r4tfqq.js → roy-agent-core-ksx9a556.js} +1 -1
  68. package/dist/shared/@ai-setting/{roy-agent-core-8zjntsbb.js → roy-agent-core-mw9a595w.js} +11 -11
  69. package/dist/shared/@ai-setting/{roy-agent-core-rgckng3p.js → roy-agent-core-pf1c360e.js} +2 -2
  70. package/dist/shared/@ai-setting/{roy-agent-core-hxsbegfc.js → roy-agent-core-ptb4pkva.js} +16 -144
  71. package/dist/shared/@ai-setting/{roy-agent-core-xckhrs2p.js → roy-agent-core-q7ffkt1e.js} +6 -6
  72. package/dist/shared/@ai-setting/{roy-agent-core-gb9gbkc3.js → roy-agent-core-q88vxmx5.js} +1 -1
  73. package/dist/shared/@ai-setting/{roy-agent-core-y5d04fm3.js → roy-agent-core-scp0afxg.js} +2 -2
  74. package/dist/shared/@ai-setting/{roy-agent-core-j0107ww1.js → roy-agent-core-snvsn60t.js} +5 -5
  75. package/dist/shared/@ai-setting/{roy-agent-core-xnxyzaw4.js → roy-agent-core-spzb03na.js} +1 -1
  76. package/dist/shared/@ai-setting/{roy-agent-core-86d4exyf.js → roy-agent-core-sssn8kt9.js} +4 -4
  77. package/dist/shared/@ai-setting/{roy-agent-core-w0kb72ve.js → roy-agent-core-svcr4gjw.js} +7 -7
  78. package/dist/shared/@ai-setting/{roy-agent-core-nqzt9ne4.js → roy-agent-core-vady4w02.js} +2 -2
  79. package/dist/shared/@ai-setting/{roy-agent-core-rkz8r2sx.js → roy-agent-core-vh8ncnzm.js} +14 -14
  80. package/dist/shared/@ai-setting/{roy-agent-core-shme7set.js → roy-agent-core-vyygk314.js} +2 -2
  81. package/dist/shared/@ai-setting/{roy-agent-core-5kdw0p98.js → roy-agent-core-w1s8yrm5.js} +3 -3
  82. package/dist/shared/@ai-setting/{roy-agent-core-v8xa6vs8.js → roy-agent-core-wmkx79b1.js} +14 -12
  83. package/dist/shared/@ai-setting/{roy-agent-core-t1ef8hf2.js → roy-agent-core-ws76avbn.js} +3 -3
  84. package/dist/shared/@ai-setting/{roy-agent-core-xhcgg11h.js → roy-agent-core-wtbyj0q1.js} +1 -1
  85. package/dist/shared/@ai-setting/{roy-agent-core-fjexv5nm.js → roy-agent-core-xgnpr28w.js} +2 -2
  86. package/dist/shared/@ai-setting/{roy-agent-core-txwf64pd.js → roy-agent-core-yfhgxh5a.js} +1 -1
  87. package/dist/shared/@ai-setting/{roy-agent-core-qg4rma4c.js → roy-agent-core-zttjq1h3.js} +1 -1
  88. package/dist/utils/temp-file-manager/index.js +10 -0
  89. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  PromptComponent,
3
3
  PromptStore
4
- } from "./shared/@ai-setting/roy-agent-core-w6bmrgap.js";
4
+ } from "./shared/@ai-setting/roy-agent-core-7svhckhz.js";
5
5
  import {
6
6
  LLMComponent,
7
7
  LLMConfigSchema,
@@ -9,13 +9,13 @@ import {
9
9
  ModelLimitsSchema,
10
10
  ProviderCapabilitiesSchema,
11
11
  ProviderConfigSchema
12
- } from "./shared/@ai-setting/roy-agent-core-5ykms33a.js";
12
+ } from "./shared/@ai-setting/roy-agent-core-fg5eaht3.js";
13
13
  import {
14
14
  ConfigComponent
15
- } from "./shared/@ai-setting/roy-agent-core-prdngx28.js";
15
+ } from "./shared/@ai-setting/roy-agent-core-33rhv946.js";
16
16
  import {
17
17
  CommandsComponent
18
- } from "./shared/@ai-setting/roy-agent-core-3952rkj0.js";
18
+ } from "./shared/@ai-setting/roy-agent-core-578qk38y.js";
19
19
  import"./shared/@ai-setting/roy-agent-core-pt7as39r.js";
20
20
  import {
21
21
  bashTool,
@@ -26,23 +26,23 @@ import {
26
26
  grepTool,
27
27
  readFileTool,
28
28
  writeFileTool
29
- } from "./shared/@ai-setting/roy-agent-core-xnxyzaw4.js";
29
+ } from "./shared/@ai-setting/roy-agent-core-spzb03na.js";
30
30
  import {
31
31
  closeDatabase
32
- } from "./shared/@ai-setting/roy-agent-core-h4h55x4h.js";
33
- import"./shared/@ai-setting/roy-agent-core-3sv590cv.js";
32
+ } from "./shared/@ai-setting/roy-agent-core-jexyz11d.js";
33
+ import"./shared/@ai-setting/roy-agent-core-b77yz0wt.js";
34
34
  import"./shared/@ai-setting/roy-agent-core-k5hxvaf0.js";
35
35
  import {
36
36
  MemoryComponent
37
- } from "./shared/@ai-setting/roy-agent-core-2h38rvyj.js";
37
+ } from "./shared/@ai-setting/roy-agent-core-634ee5jb.js";
38
38
  import"./shared/@ai-setting/roy-agent-core-g1s2h0e5.js";
39
39
  import {
40
40
  MemoryPlugin,
41
41
  createMemoryPlugin
42
- } from "./shared/@ai-setting/roy-agent-core-xhcgg11h.js";
42
+ } from "./shared/@ai-setting/roy-agent-core-wtbyj0q1.js";
43
43
  import {
44
44
  DebugComponent
45
- } from "./shared/@ai-setting/roy-agent-core-n19rm7tw.js";
45
+ } from "./shared/@ai-setting/roy-agent-core-b2thb9xj.js";
46
46
  import {
47
47
  ReplFormatter,
48
48
  TraceFormatter,
@@ -52,7 +52,7 @@ import {
52
52
  BaseEnvironment,
53
53
  generateDescendingId,
54
54
  generateId
55
- } from "./shared/@ai-setting/roy-agent-core-bwjpte58.js";
55
+ } from "./shared/@ai-setting/roy-agent-core-0vsnecwa.js";
56
56
  import {
57
57
  BountyIMInstance,
58
58
  EventSourceComponent,
@@ -62,7 +62,7 @@ import {
62
62
  getBuiltInHandler,
63
63
  larkCliHandler,
64
64
  timerHandler
65
- } from "./shared/@ai-setting/roy-agent-core-m683wd1n.js";
65
+ } from "./shared/@ai-setting/roy-agent-core-5j649pb1.js";
66
66
  import {
67
67
  BUILT_IN_EVENT_SOURCE_TYPES,
68
68
  BUILT_IN_EVENT_SOURCE_TYPE_LIST,
@@ -75,38 +75,38 @@ import {
75
75
  import {
76
76
  LogTraceComponent,
77
77
  LogTraceConfigSchema
78
- } from "./shared/@ai-setting/roy-agent-core-v8xa6vs8.js";
78
+ } from "./shared/@ai-setting/roy-agent-core-wmkx79b1.js";
79
79
  import {
80
80
  PluginComponent
81
- } from "./shared/@ai-setting/roy-agent-core-t1ef8hf2.js";
81
+ } from "./shared/@ai-setting/roy-agent-core-ws76avbn.js";
82
82
  import {
83
83
  TaskTagPlugin
84
- } from "./shared/@ai-setting/roy-agent-core-w0kb72ve.js";
84
+ } from "./shared/@ai-setting/roy-agent-core-svcr4gjw.js";
85
85
  import {
86
86
  getBuiltInPrompt,
87
87
  getBuiltInPromptNames
88
- } from "./shared/@ai-setting/roy-agent-core-83d035pp.js";
88
+ } from "./shared/@ai-setting/roy-agent-core-97tjdb2r.js";
89
89
  import {
90
90
  BasePlugin
91
91
  } from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
92
92
  import {
93
93
  WorkflowComponent
94
- } from "./shared/@ai-setting/roy-agent-core-rkz8r2sx.js";
94
+ } from "./shared/@ai-setting/roy-agent-core-vh8ncnzm.js";
95
95
  import {
96
96
  init_node_registry_helper,
97
97
  registerDecoratorNodeType
98
- } from "./shared/@ai-setting/roy-agent-core-fjexv5nm.js";
99
- import"./shared/@ai-setting/roy-agent-core-j0107ww1.js";
100
- import"./shared/@ai-setting/roy-agent-core-5kdw0p98.js";
98
+ } from "./shared/@ai-setting/roy-agent-core-xgnpr28w.js";
99
+ import"./shared/@ai-setting/roy-agent-core-snvsn60t.js";
100
+ import"./shared/@ai-setting/roy-agent-core-w1s8yrm5.js";
101
101
  import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
102
- import"./shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
102
+ import"./shared/@ai-setting/roy-agent-core-q88vxmx5.js";
103
103
  import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
104
104
  import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
105
- import"./shared/@ai-setting/roy-agent-core-z240ts1r.js";
105
+ import"./shared/@ai-setting/roy-agent-core-g2mth323.js";
106
106
  import"./shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
107
- import"./shared/@ai-setting/roy-agent-core-32m0nb9j.js";
107
+ import"./shared/@ai-setting/roy-agent-core-j3qb695p.js";
108
108
  import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
109
- import"./shared/@ai-setting/roy-agent-core-tq9528d3.js";
109
+ import"./shared/@ai-setting/roy-agent-core-e7t3rj0e.js";
110
110
  import"./shared/@ai-setting/roy-agent-core-8wd3qwx5.js";
111
111
  import"./shared/@ai-setting/roy-agent-core-4yq23m5g.js";
112
112
  import {
@@ -120,55 +120,56 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
120
120
  import {
121
121
  AgentComponent,
122
122
  AgentComponentConfigSchema
123
- } from "./shared/@ai-setting/roy-agent-core-8zjntsbb.js";
123
+ } from "./shared/@ai-setting/roy-agent-core-mw9a595w.js";
124
124
  import {
125
125
  createInvokeConfig,
126
126
  invoke,
127
127
  invokeNonStream,
128
128
  parseModelString
129
- } from "./shared/@ai-setting/roy-agent-core-0r4ndyn9.js";
129
+ } from "./shared/@ai-setting/roy-agent-core-j7jeqxhd.js";
130
130
  import {
131
131
  ToolComponent,
132
132
  ToolRegistry,
133
133
  ToolValidator
134
- } from "./shared/@ai-setting/roy-agent-core-hxsbegfc.js";
134
+ } from "./shared/@ai-setting/roy-agent-core-ptb4pkva.js";
135
+ import"./shared/@ai-setting/roy-agent-core-5h49ct1a.js";
135
136
  import {
136
137
  createAutoTaskPlugin
137
- } from "./shared/@ai-setting/roy-agent-core-yanpq5gb.js";
138
+ } from "./shared/@ai-setting/roy-agent-core-bdajt9cs.js";
138
139
  import {
139
140
  AskUserError,
140
141
  init_workflow_hil
141
142
  } from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
142
143
  import {
143
144
  TaskComponent
144
- } from "./shared/@ai-setting/roy-agent-core-ewr1nw7t.js";
145
+ } from "./shared/@ai-setting/roy-agent-core-b1vkkcbr.js";
145
146
  import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
146
- import"./shared/@ai-setting/roy-agent-core-mw4ty0ba.js";
147
+ import"./shared/@ai-setting/roy-agent-core-at05dk0z.js";
147
148
  import"./shared/@ai-setting/roy-agent-core-hvdfgvfz.js";
148
149
  import {
149
150
  SQLiteTaskStore,
150
151
  getDefaultTaskDbPath
151
- } from "./shared/@ai-setting/roy-agent-core-pcdzfwdv.js";
152
+ } from "./shared/@ai-setting/roy-agent-core-9xby523m.js";
152
153
  import {
153
154
  AgentRegistry
154
- } from "./shared/@ai-setting/roy-agent-core-nqzt9ne4.js";
155
+ } from "./shared/@ai-setting/roy-agent-core-vady4w02.js";
155
156
  import {
156
157
  XDG_PATHS,
157
158
  getXDGPath,
158
159
  getXDGPaths
159
160
  } from "./shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
160
- import"./shared/@ai-setting/roy-agent-core-h5867smx.js";
161
+ import"./shared/@ai-setting/roy-agent-core-0ye4q2jj.js";
161
162
  import"./shared/@ai-setting/roy-agent-core-t94ktchq.js";
162
163
  import {
163
164
  TaskHookPoints
164
165
  } from "./shared/@ai-setting/roy-agent-core-92z6t4he.js";
165
166
  import {
166
167
  SkillComponent
167
- } from "./shared/@ai-setting/roy-agent-core-07290s9n.js";
168
+ } from "./shared/@ai-setting/roy-agent-core-cx67bv9d.js";
168
169
  import"./shared/@ai-setting/roy-agent-core-psvxt4c9.js";
169
170
  import {
170
171
  McpComponent
171
- } from "./shared/@ai-setting/roy-agent-core-3czy06aq.js";
172
+ } from "./shared/@ai-setting/roy-agent-core-bqwj1dq0.js";
172
173
  import {
173
174
  AgentError,
174
175
  ComponentError,
@@ -181,36 +182,36 @@ import {
181
182
  isRoyError
182
183
  } from "./shared/@ai-setting/roy-agent-core-ctdhjv68.js";
183
184
  import"./shared/@ai-setting/roy-agent-core-fnv3ev18.js";
184
- import"./shared/@ai-setting/roy-agent-core-djtkntar.js";
185
+ import"./shared/@ai-setting/roy-agent-core-4w6rgxs4.js";
185
186
  import {
186
187
  SessionComponent
187
- } from "./shared/@ai-setting/roy-agent-core-2c8eraxq.js";
188
+ } from "./shared/@ai-setting/roy-agent-core-0ger6zdn.js";
188
189
  import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
189
190
  import {
190
191
  MemorySessionStore
191
- } from "./shared/@ai-setting/roy-agent-core-zky9jse4.js";
192
- import"./shared/@ai-setting/roy-agent-core-txwf64pd.js";
193
- import"./shared/@ai-setting/roy-agent-core-ce10b0ez.js";
192
+ } from "./shared/@ai-setting/roy-agent-core-fx1fdzbz.js";
193
+ import"./shared/@ai-setting/roy-agent-core-yfhgxh5a.js";
194
+ import"./shared/@ai-setting/roy-agent-core-8x4ngxcy.js";
194
195
  import"./shared/@ai-setting/roy-agent-core-qxhq8ven.js";
195
196
  import {
196
197
  BaseComponent
197
- } from "./shared/@ai-setting/roy-agent-core-rgckng3p.js";
198
+ } from "./shared/@ai-setting/roy-agent-core-pf1c360e.js";
198
199
  import {
199
200
  createHook,
200
201
  createPriorityHook
201
- } from "./shared/@ai-setting/roy-agent-core-b8r4tfqq.js";
202
+ } from "./shared/@ai-setting/roy-agent-core-ksx9a556.js";
202
203
  import {
203
204
  HookManager,
204
205
  globalHookManager
205
- } from "./shared/@ai-setting/roy-agent-core-7tp56w6n.js";
206
- import"./shared/@ai-setting/roy-agent-core-qg4rma4c.js";
207
- import"./shared/@ai-setting/roy-agent-core-y5d04fm3.js";
206
+ } from "./shared/@ai-setting/roy-agent-core-gp872e7m.js";
207
+ import"./shared/@ai-setting/roy-agent-core-zttjq1h3.js";
208
+ import"./shared/@ai-setting/roy-agent-core-scp0afxg.js";
208
209
  import {
209
210
  Traced,
210
211
  TracedAs,
211
212
  TracedLightweight,
212
213
  wrapFunction
213
- } from "./shared/@ai-setting/roy-agent-core-k05v31rc.js";
214
+ } from "./shared/@ai-setting/roy-agent-core-cg146hmg.js";
214
215
  import {
215
216
  createLogger,
216
217
  getLogDir,
@@ -220,7 +221,7 @@ import {
220
221
  setConfigComponent,
221
222
  setLogDirOverride,
222
223
  setQuietMode
223
- } from "./shared/@ai-setting/roy-agent-core-shme7set.js";
224
+ } from "./shared/@ai-setting/roy-agent-core-vyygk314.js";
224
225
  import {
225
226
  OTelTracerProvider,
226
227
  SpanKind,
@@ -6,21 +6,21 @@ import {
6
6
  import {
7
7
  MemorySessionStore,
8
8
  SQLiteSessionStore
9
- } from "./roy-agent-core-zky9jse4.js";
9
+ } from "./roy-agent-core-fx1fdzbz.js";
10
10
  import {
11
11
  envKeyToConfigKey
12
12
  } from "./roy-agent-core-qxhq8ven.js";
13
13
  import {
14
14
  BaseComponent
15
- } from "./roy-agent-core-rgckng3p.js";
15
+ } from "./roy-agent-core-pf1c360e.js";
16
16
  import {
17
17
  TracedAs,
18
18
  init_decorator
19
- } from "./roy-agent-core-k05v31rc.js";
19
+ } from "./roy-agent-core-cg146hmg.js";
20
20
  import {
21
21
  createLogger,
22
22
  init_logger
23
- } from "./roy-agent-core-shme7set.js";
23
+ } from "./roy-agent-core-vyygk314.js";
24
24
  import {
25
25
  __legacyDecorateClassTS
26
26
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -1,29 +1,29 @@
1
1
  import {
2
2
  createAutoTaskPlugin
3
- } from "./roy-agent-core-yanpq5gb.js";
3
+ } from "./roy-agent-core-bdajt9cs.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-rgckng3p.js";
10
+ } from "./roy-agent-core-pf1c360e.js";
11
11
  import {
12
12
  init_context
13
- } from "./roy-agent-core-qg4rma4c.js";
13
+ } from "./roy-agent-core-zttjq1h3.js";
14
14
  import {
15
15
  getEnvContext,
16
16
  init_env_context,
17
17
  runWithEnvContextAsync
18
- } from "./roy-agent-core-y5d04fm3.js";
18
+ } from "./roy-agent-core-scp0afxg.js";
19
19
  import {
20
20
  TracedAs,
21
21
  init_decorator
22
- } from "./roy-agent-core-k05v31rc.js";
22
+ } from "./roy-agent-core-cg146hmg.js";
23
23
  import {
24
24
  createLogger,
25
25
  init_logger
26
- } from "./roy-agent-core-shme7set.js";
26
+ } from "./roy-agent-core-vyygk314.js";
27
27
  import {
28
28
  __legacyDecorateClassTS
29
29
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  init_env_context,
3
3
  setCurrentTaskId
4
- } from "./roy-agent-core-y5d04fm3.js";
4
+ } from "./roy-agent-core-scp0afxg.js";
5
5
  import {
6
6
  createLogger,
7
7
  init_logger
8
- } from "./roy-agent-core-shme7set.js";
8
+ } from "./roy-agent-core-vyygk314.js";
9
9
 
10
10
  // src/env/task/tools/task-types.ts
11
11
  import { z } from "zod";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./roy-agent-core-qxhq8ven.js";
8
8
  import {
9
9
  BaseComponent
10
- } from "./roy-agent-core-rgckng3p.js";
10
+ } from "./roy-agent-core-pf1c360e.js";
11
11
  import {
12
12
  __require
13
13
  } from "./roy-agent-core-fs0mn2jk.js";
@@ -125,8 +125,8 @@ import * as fsSync from "fs";
125
125
  import * as fsPromises from "fs/promises";
126
126
  import path from "path";
127
127
  class FileSource {
128
- name = "file";
129
- priority = 10;
128
+ name;
129
+ priority;
130
130
  filePath;
131
131
  data = {};
132
132
  watchers = new Set;
@@ -143,12 +143,16 @@ class FileSource {
143
143
  this.debounceMs = 100;
144
144
  this.resolver = resolver;
145
145
  this.optional = true;
146
+ this.priority = 10;
147
+ this.name = "file";
146
148
  } else {
147
149
  this.filePath = options.filePath;
148
150
  this.debounceMs = options.debounceMs ?? 100;
149
151
  this.resolver = options.resolver ?? resolver;
150
152
  this.optional = options.optional ?? true;
151
153
  this.watchEnabled = options.watch ?? true;
154
+ this.priority = options.priority ?? 10;
155
+ this.name = options.name ?? "file";
152
156
  }
153
157
  this.initSync();
154
158
  }
@@ -1084,16 +1088,35 @@ class ConfigComponent extends BaseComponent {
1084
1088
  console.log(`[ConfigComponent] Persisting ${entries.length} entries to ${this.persistFile}`);
1085
1089
  }
1086
1090
  registerSource(registration) {
1087
- const { type, relativePath, envPrefix } = registration;
1088
- const sourceKey = type === "file" && relativePath ? `file:${relativePath}` : `${type}:${envPrefix ?? ""}`;
1091
+ const { type, relativePath, envPrefix, cwd } = registration;
1092
+ let sourceKey;
1093
+ if (type === "file" && relativePath) {
1094
+ sourceKey = `file:${relativePath}`;
1095
+ } else if (type === "project") {
1096
+ const projectCwd = cwd ?? process.cwd();
1097
+ const projectPath = path2.join(projectCwd, ".roy", "config.jsonc");
1098
+ sourceKey = `project:${projectPath}`;
1099
+ } else {
1100
+ sourceKey = `${type}:${envPrefix ?? ""}`;
1101
+ }
1089
1102
  if (this.sourceKeys.has(sourceKey)) {
1090
1103
  return;
1091
1104
  }
1092
1105
  this.pendingSources.push(registration);
1093
1106
  this.sourceKeys.set(sourceKey, true);
1094
1107
  }
1108
+ registerProjectSource(options) {
1109
+ const cwd = options?.cwd ?? process.cwd();
1110
+ this.registerSource({
1111
+ type: "project",
1112
+ cwd,
1113
+ priority: options?.priority ?? 25,
1114
+ optional: true,
1115
+ watch: false
1116
+ });
1117
+ }
1095
1118
  createSource(registration) {
1096
- const { type, relativePath, envPrefix, priority, optional, watch: watch2 } = registration;
1119
+ const { type, relativePath, envPrefix, cwd, priority, optional, watch: watch2 } = registration;
1097
1120
  switch (type) {
1098
1121
  case "memory": {
1099
1122
  return this.memorySource;
@@ -1116,7 +1139,20 @@ class ConfigComponent extends BaseComponent {
1116
1139
  filePath,
1117
1140
  optional: optional ?? false,
1118
1141
  resolver: this.protocolResolver,
1119
- watch: watch2
1142
+ watch: watch2,
1143
+ priority: priority ?? 10
1144
+ });
1145
+ }
1146
+ case "project": {
1147
+ const projectCwd = cwd ?? process.cwd();
1148
+ const filePath = path2.join(projectCwd, ".roy", "config.jsonc");
1149
+ return new FileSource({
1150
+ filePath,
1151
+ optional: true,
1152
+ resolver: this.protocolResolver,
1153
+ watch: watch2 ?? false,
1154
+ priority: priority ?? 25,
1155
+ name: "project"
1120
1156
  });
1121
1157
  }
1122
1158
  case "env": {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createLogger,
3
3
  init_logger
4
- } from "./roy-agent-core-shme7set.js";
4
+ } from "./roy-agent-core-vyygk314.js";
5
5
 
6
6
  // src/env/mcp/tool/adapter.ts
7
7
  init_logger();
@@ -4,11 +4,11 @@ import {
4
4
  } from "./roy-agent-core-qxhq8ven.js";
5
5
  import {
6
6
  BaseComponent
7
- } from "./roy-agent-core-rgckng3p.js";
7
+ } from "./roy-agent-core-pf1c360e.js";
8
8
  import {
9
9
  createLogger,
10
10
  init_logger
11
- } from "./roy-agent-core-shme7set.js";
11
+ } from "./roy-agent-core-vyygk314.js";
12
12
 
13
13
  // src/env/commands/commands-component.ts
14
14
  import path2 from "path";
@@ -0,0 +1,135 @@
1
+ import {
2
+ createLogger,
3
+ init_logger
4
+ } from "./roy-agent-core-vyygk314.js";
5
+
6
+ // src/utils/temp-file-manager/index.ts
7
+ init_logger();
8
+ import * as fs from "node:fs";
9
+ import * as path from "node:path";
10
+ import * as os from "node:os";
11
+ import * as crypto from "node:crypto";
12
+ var logger = createLogger("temp-file-manager");
13
+
14
+ class TempFileManager {
15
+ static _instance = null;
16
+ _files = new Set;
17
+ _hooksRegistered = false;
18
+ static FILE_PREFIX = "roy-agent-truncation";
19
+ static FILE_EXT = ".txt";
20
+ static LARGE_FILE_THRESHOLD = 10 * 1024 * 1024;
21
+ static STALE_FILE_AGE_MS = 24 * 60 * 60 * 1000;
22
+ constructor() {
23
+ this.sweepStaleFiles().catch((err) => {
24
+ logger.warn(`[TempFileManager] Stale file sweep failed: ${err}`);
25
+ });
26
+ }
27
+ static getInstance() {
28
+ if (!TempFileManager._instance) {
29
+ TempFileManager._instance = new TempFileManager;
30
+ }
31
+ return TempFileManager._instance;
32
+ }
33
+ static _resetForTesting() {
34
+ if (TempFileManager._instance) {
35
+ TempFileManager._instance.cleanupAll().catch(() => {});
36
+ }
37
+ TempFileManager._instance = null;
38
+ }
39
+ async writeTempFile(content, prefix = "default") {
40
+ this.ensureHooksRegistered();
41
+ if (content.length > TempFileManager.LARGE_FILE_THRESHOLD) {
42
+ logger.warn(`[TempFileManager] Writing large temp file: ${content.length} bytes (> ${TempFileManager.LARGE_FILE_THRESHOLD} bytes). Consider increasing maxOutputSize or filtering output.`);
43
+ }
44
+ const sanitizedPrefix = this.sanitizePrefix(prefix);
45
+ const uuid = crypto.randomUUID();
46
+ const filename = `${TempFileManager.FILE_PREFIX}-${process.pid}-${uuid}-${sanitizedPrefix}${TempFileManager.FILE_EXT}`;
47
+ const filePath = path.join(os.tmpdir(), filename);
48
+ await fs.promises.writeFile(filePath, content, "utf-8");
49
+ this._files.add(filePath);
50
+ logger.debug(`[TempFileManager] Created temp file: ${filePath} (${content.length} bytes)`);
51
+ return filePath;
52
+ }
53
+ async cleanupAll() {
54
+ const files = Array.from(this._files);
55
+ this._files.clear();
56
+ const results = await Promise.allSettled(files.map(async (filePath) => {
57
+ try {
58
+ await fs.promises.unlink(filePath);
59
+ } catch (err) {
60
+ if (err.code !== "ENOENT") {
61
+ logger.warn(`[TempFileManager] Failed to delete ${filePath}: ${err.message}`);
62
+ }
63
+ }
64
+ }));
65
+ const succeeded = results.filter((r) => r.status === "fulfilled").length;
66
+ logger.debug(`[TempFileManager] Cleanup complete: ${succeeded}/${files.length} files deleted`);
67
+ }
68
+ getActiveFileCount() {
69
+ return this._files.size;
70
+ }
71
+ async sweepStaleFiles(maxAgeMs = TempFileManager.STALE_FILE_AGE_MS) {
72
+ const tmpDir = os.tmpdir();
73
+ const now = Date.now();
74
+ let deletedCount = 0;
75
+ let entries;
76
+ try {
77
+ entries = await fs.promises.readdir(tmpDir);
78
+ } catch (err) {
79
+ logger.warn(`[TempFileManager] Failed to read tmpdir ${tmpDir}: ${err.message}`);
80
+ return 0;
81
+ }
82
+ for (const entry of entries) {
83
+ if (!entry.startsWith(`${TempFileManager.FILE_PREFIX}-`))
84
+ continue;
85
+ const filePath = path.join(tmpDir, entry);
86
+ try {
87
+ const stat = await fs.promises.stat(filePath);
88
+ const age = now - stat.mtimeMs;
89
+ if (age > maxAgeMs) {
90
+ await fs.promises.unlink(filePath);
91
+ deletedCount++;
92
+ }
93
+ } catch (err) {
94
+ if (err.code !== "ENOENT") {
95
+ logger.warn(`[TempFileManager] Failed to sweep ${filePath}: ${err.message}`);
96
+ }
97
+ }
98
+ }
99
+ if (deletedCount > 0) {
100
+ logger.info(`[TempFileManager] Swept ${deletedCount} stale files from ${tmpDir}`);
101
+ }
102
+ return deletedCount;
103
+ }
104
+ ensureHooksRegistered() {
105
+ if (this._hooksRegistered)
106
+ return;
107
+ if (typeof process === "undefined" || !process.on) {
108
+ return;
109
+ }
110
+ const cleanup = () => {
111
+ for (const filePath of this._files) {
112
+ try {
113
+ fs.unlinkSync(filePath);
114
+ } catch (err) {}
115
+ }
116
+ this._files.clear();
117
+ };
118
+ process.on("exit", cleanup);
119
+ process.on("SIGINT", () => {
120
+ cleanup();
121
+ process.exit(130);
122
+ });
123
+ process.on("SIGTERM", () => {
124
+ cleanup();
125
+ process.exit(143);
126
+ });
127
+ this._hooksRegistered = true;
128
+ logger.debug("[TempFileManager] Process exit hooks registered");
129
+ }
130
+ sanitizePrefix(prefix) {
131
+ return prefix.replace(/[\/\\<>:"|?*\x00-\x1f]/g, "-").replace(/\s+/g, "-").substring(0, 32) || "default";
132
+ }
133
+ }
134
+
135
+ export { TempFileManager };
@@ -1,32 +1,32 @@
1
1
  import {
2
2
  TaskTagPlugin,
3
3
  createLarkCliTaskNotifyHook
4
- } from "./roy-agent-core-w0kb72ve.js";
4
+ } from "./roy-agent-core-svcr4gjw.js";
5
5
  import {
6
6
  envKeyToConfigKey
7
7
  } from "./roy-agent-core-qxhq8ven.js";
8
8
  import {
9
9
  BaseComponent
10
- } from "./roy-agent-core-rgckng3p.js";
10
+ } from "./roy-agent-core-pf1c360e.js";
11
11
  import {
12
12
  globalHookManager,
13
13
  init_global_hook_manager
14
- } from "./roy-agent-core-7tp56w6n.js";
14
+ } from "./roy-agent-core-gp872e7m.js";
15
15
  import {
16
16
  init_context
17
- } from "./roy-agent-core-qg4rma4c.js";
17
+ } from "./roy-agent-core-zttjq1h3.js";
18
18
  import {
19
19
  createEnvContext,
20
20
  runWithEnvContext
21
- } from "./roy-agent-core-y5d04fm3.js";
21
+ } from "./roy-agent-core-scp0afxg.js";
22
22
  import {
23
23
  TracedAs,
24
24
  init_decorator
25
- } from "./roy-agent-core-k05v31rc.js";
25
+ } from "./roy-agent-core-cg146hmg.js";
26
26
  import {
27
27
  createLogger,
28
28
  init_logger
29
- } from "./roy-agent-core-shme7set.js";
29
+ } from "./roy-agent-core-vyygk314.js";
30
30
  import {
31
31
  getTracerProvider
32
32
  } from "./roy-agent-core-7z9b1fm8.js";
@@ -6,11 +6,11 @@ import {
6
6
  } from "./roy-agent-core-qxhq8ven.js";
7
7
  import {
8
8
  BaseComponent
9
- } from "./roy-agent-core-rgckng3p.js";
9
+ } from "./roy-agent-core-pf1c360e.js";
10
10
  import {
11
11
  createLogger,
12
12
  init_logger
13
- } from "./roy-agent-core-shme7set.js";
13
+ } from "./roy-agent-core-vyygk314.js";
14
14
 
15
15
  // src/env/memory/types.ts
16
16
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  builtInPrompts
3
- } from "./roy-agent-core-83d035pp.js";
3
+ } from "./roy-agent-core-97tjdb2r.js";
4
4
  import {
5
5
  getXDGPath
6
6
  } from "./roy-agent-core-qxnbvgwe.js";
@@ -10,18 +10,18 @@ import {
10
10
  } from "./roy-agent-core-qxhq8ven.js";
11
11
  import {
12
12
  BaseComponent
13
- } from "./roy-agent-core-rgckng3p.js";
13
+ } from "./roy-agent-core-pf1c360e.js";
14
14
  import {
15
15
  createHook
16
- } from "./roy-agent-core-b8r4tfqq.js";
16
+ } from "./roy-agent-core-ksx9a556.js";
17
17
  import {
18
18
  globalHookManager,
19
19
  init_global_hook_manager
20
- } from "./roy-agent-core-7tp56w6n.js";
20
+ } from "./roy-agent-core-gp872e7m.js";
21
21
  import {
22
22
  createLogger,
23
23
  init_logger
24
- } from "./roy-agent-core-shme7set.js";
24
+ } from "./roy-agent-core-vyygk314.js";
25
25
 
26
26
  // src/env/prompt/types.ts
27
27
  import { z } from "zod";