@ai-setting/roy-agent-core 1.4.13 → 1.4.14

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 (103) hide show
  1. package/dist/packages/core/src/config/index.js +32 -0
  2. package/dist/packages/core/src/env/agent/index.js +24 -0
  3. package/dist/packages/core/src/env/commands/index.js +14 -0
  4. package/dist/packages/core/src/env/debug/formatters/index.js +11 -0
  5. package/dist/packages/core/src/env/debug/index.js +26 -0
  6. package/dist/packages/core/src/env/hook/index.js +29 -0
  7. package/dist/packages/core/src/env/index.js +81 -0
  8. package/dist/packages/core/src/env/llm/index.js +40 -0
  9. package/dist/packages/core/src/env/log-trace/index.js +83 -0
  10. package/dist/packages/core/src/env/mcp/index.js +39 -0
  11. package/dist/packages/core/src/env/mcp/tool/index.js +14 -0
  12. package/dist/packages/core/src/env/memory/built-in/index.js +11 -0
  13. package/dist/packages/core/src/env/memory/index.js +56 -0
  14. package/dist/packages/core/src/env/memory/plugin/index.js +36 -0
  15. package/dist/packages/core/src/env/prompt/index.js +20 -0
  16. package/dist/packages/core/src/env/session/index.js +25 -0
  17. package/dist/packages/core/src/env/session/storage/index.js +18 -0
  18. package/dist/packages/core/src/env/skill/index.js +34 -0
  19. package/dist/packages/core/src/env/skill/tool/index.js +9 -0
  20. package/dist/packages/core/src/env/task/delegate/index.js +18 -0
  21. package/dist/packages/core/src/env/task/hooks/index.js +7 -0
  22. package/dist/packages/core/src/env/task/index.js +30 -0
  23. package/dist/packages/core/src/env/task/plugins/index.js +23 -0
  24. package/dist/packages/core/src/env/task/storage/index.js +14 -0
  25. package/dist/packages/core/src/env/task/tools/index.js +17 -0
  26. package/dist/packages/core/src/env/task/tools/operation/index.js +15 -0
  27. package/dist/{shared/chunk-1d4rwms4.js → packages/core/src/env/tool/built-in/index.js} +4 -4
  28. package/dist/packages/core/src/env/tool/index.js +39 -0
  29. package/dist/packages/core/src/env/workflow/decorators/index.js +27 -0
  30. package/dist/packages/core/src/env/workflow/engine/index.js +28 -0
  31. package/dist/packages/core/src/env/workflow/index.js +132 -0
  32. package/dist/packages/core/src/env/workflow/nodes/index.js +19 -0
  33. package/dist/packages/core/src/env/workflow/service/index.js +13 -0
  34. package/dist/packages/core/src/env/workflow/storage/index.js +27 -0
  35. package/dist/packages/core/src/env/workflow/tools/index.js +159 -0
  36. package/dist/packages/core/src/env/workflow/types/index.js +94 -0
  37. package/dist/packages/core/src/env/workflow/utils/index.js +637 -0
  38. package/dist/packages/core/src/index.js +398 -0
  39. package/dist/shared/@ai-setting/roy-agent-core-04fm8177.js +393 -0
  40. package/dist/shared/@ai-setting/roy-agent-core-04qgbjbe.js +172 -0
  41. package/dist/shared/@ai-setting/roy-agent-core-084qqd7t.js +11 -0
  42. package/dist/shared/@ai-setting/roy-agent-core-0gekht4e.js +1130 -0
  43. package/dist/shared/@ai-setting/roy-agent-core-0hdry23r.js +419 -0
  44. package/dist/shared/{chunk-ze20rksg.js → @ai-setting/roy-agent-core-0sgn3de4.js} +2 -2
  45. package/dist/shared/@ai-setting/roy-agent-core-12x57kf1.js +286 -0
  46. package/dist/shared/@ai-setting/roy-agent-core-1f3xrrm6.js +393 -0
  47. package/dist/shared/{chunk-q9j99fsm.js → @ai-setting/roy-agent-core-1k28kg7h.js} +6 -6
  48. package/dist/shared/{chunk-2b5kbhx3.js → @ai-setting/roy-agent-core-1z1zv5g8.js} +9 -117
  49. package/dist/shared/@ai-setting/roy-agent-core-2hqxnaf3.js +851 -0
  50. package/dist/shared/@ai-setting/roy-agent-core-3dfq8awb.js +587 -0
  51. package/dist/shared/@ai-setting/roy-agent-core-3takar0s.js +93 -0
  52. package/dist/shared/@ai-setting/roy-agent-core-3tnb2005.js +117 -0
  53. package/dist/shared/@ai-setting/roy-agent-core-4vmcvkav.js +14 -0
  54. package/dist/shared/{chunk-25x2pdtp.js → @ai-setting/roy-agent-core-4ws8atva.js} +2 -2
  55. package/dist/shared/@ai-setting/roy-agent-core-5fbp24se.js +603 -0
  56. package/dist/shared/@ai-setting/roy-agent-core-5my94ywp.js +66 -0
  57. package/dist/shared/{chunk-rncy3rtd.js → @ai-setting/roy-agent-core-6j0zcmwk.js} +128 -1122
  58. package/dist/shared/@ai-setting/roy-agent-core-6w4pmxc7.js +266 -0
  59. package/dist/shared/{chunk-yqmx37vm.js → @ai-setting/roy-agent-core-7vrk3add.js} +2 -2
  60. package/dist/shared/@ai-setting/roy-agent-core-8dvbn7tw.js +64 -0
  61. package/dist/shared/@ai-setting/roy-agent-core-8mbmrwzs.js +171 -0
  62. package/dist/shared/@ai-setting/roy-agent-core-8wzz66qe.js +620 -0
  63. package/dist/shared/@ai-setting/roy-agent-core-9ykq91jc.js +762 -0
  64. package/dist/shared/@ai-setting/roy-agent-core-dde19zke.js +1305 -0
  65. package/dist/shared/@ai-setting/roy-agent-core-f7g67gce.js +913 -0
  66. package/dist/shared/@ai-setting/roy-agent-core-fq5mtxsy.js +341 -0
  67. package/dist/shared/@ai-setting/roy-agent-core-fvd9g6k8.js +1205 -0
  68. package/dist/shared/@ai-setting/roy-agent-core-gv1hrn3x.js +378 -0
  69. package/dist/shared/@ai-setting/roy-agent-core-gy0wp5h7.js +213 -0
  70. package/dist/shared/{chunk-mf5xqbdh.js → @ai-setting/roy-agent-core-hyza1gm7.js} +3 -2
  71. package/dist/shared/{chunk-1qwabsm0.js → @ai-setting/roy-agent-core-j8zx62zr.js} +2 -2
  72. package/dist/shared/@ai-setting/roy-agent-core-jb2exr0d.js +442 -0
  73. package/dist/shared/@ai-setting/roy-agent-core-jv3b7v9w.js +57 -0
  74. package/dist/shared/@ai-setting/roy-agent-core-k1rxf9ya.js +513 -0
  75. package/dist/shared/@ai-setting/roy-agent-core-kydc9nwb.js +60 -0
  76. package/dist/shared/@ai-setting/roy-agent-core-m2x48hw6.js +97 -0
  77. package/dist/shared/@ai-setting/roy-agent-core-m6y668cc.js +377 -0
  78. package/dist/shared/{chunk-1aakcfp1.js → @ai-setting/roy-agent-core-nczzf0ms.js} +3 -3
  79. package/dist/shared/@ai-setting/roy-agent-core-nfj6knp5.js +36 -0
  80. package/dist/shared/@ai-setting/roy-agent-core-ntrp979d.js +204 -0
  81. package/dist/shared/@ai-setting/roy-agent-core-pd7g8z5v.js +1387 -0
  82. package/dist/shared/@ai-setting/roy-agent-core-pzk1syce.js +14 -0
  83. package/dist/shared/@ai-setting/roy-agent-core-q50tg9m2.js +862 -0
  84. package/dist/shared/{chunk-9qzt1v1p.js → @ai-setting/roy-agent-core-qg9tcaph.js} +3 -2
  85. package/dist/shared/{chunk-91bas8w5.js → @ai-setting/roy-agent-core-qhyerewk.js} +5 -5
  86. package/dist/shared/{chunk-1pf5mfgd.js → @ai-setting/roy-agent-core-qxybm159.js} +3 -3
  87. package/dist/shared/{chunk-g6j5n3gv.js → @ai-setting/roy-agent-core-rh9dpkpw.js} +10 -10
  88. package/dist/shared/{chunk-0q6s9wm6.js → @ai-setting/roy-agent-core-rr9p1g43.js} +7 -51
  89. package/dist/shared/@ai-setting/roy-agent-core-sbzvpfn7.js +284 -0
  90. package/dist/shared/@ai-setting/roy-agent-core-t22nqt4d.js +788 -0
  91. package/dist/shared/{chunk-t1rh6jtm.js → @ai-setting/roy-agent-core-tkr5ynkh.js} +8 -13
  92. package/dist/shared/@ai-setting/roy-agent-core-v4aabsf0.js +303 -0
  93. package/dist/shared/@ai-setting/roy-agent-core-w75rafhy.js +202 -0
  94. package/dist/shared/@ai-setting/roy-agent-core-w76hqkmg.js +584 -0
  95. package/dist/shared/@ai-setting/roy-agent-core-yfbgwes2.js +408 -0
  96. package/dist/shared/{chunk-a9qmy3sc.js → @ai-setting/roy-agent-core-yn761yve.js} +7 -4
  97. package/dist/shared/@ai-setting/roy-agent-core-yrzmn4m1.js +492 -0
  98. package/dist/shared/@ai-setting/roy-agent-core-yt8wdh2w.js +206 -0
  99. package/package.json +8 -7
  100. package/dist/index.d.ts +0 -7825
  101. package/dist/index.js +0 -16551
  102. package/dist/shared/chunk-hs7tbmje.js +0 -24
  103. /package/dist/shared/{chunk-wbkh7wat.js → @ai-setting/roy-agent-core-fs0mn2jk.js} +0 -0
@@ -0,0 +1,30 @@
1
+ import {
2
+ ActionTypeEnum,
3
+ TaskComponent,
4
+ TaskConfigSchema,
5
+ TaskPriorityEnum,
6
+ TaskStatusEnum
7
+ } from "../../../../../shared/@ai-setting/roy-agent-core-k1rxf9ya.js";
8
+ import {
9
+ SQLiteTaskStore
10
+ } from "../../../../../shared/@ai-setting/roy-agent-core-8wzz66qe.js";
11
+ import"../../../../../shared/@ai-setting/roy-agent-core-12x57kf1.js";
12
+ import"../../../../../shared/@ai-setting/roy-agent-core-gy0wp5h7.js";
13
+ import"../../../../../shared/@ai-setting/roy-agent-core-t22nqt4d.js";
14
+ import"../../../../../shared/@ai-setting/roy-agent-core-pzk1syce.js";
15
+ import"../../../../../shared/@ai-setting/roy-agent-core-jv3b7v9w.js";
16
+ import"../../../../../shared/@ai-setting/roy-agent-core-m2x48hw6.js";
17
+ import"../../../../../shared/@ai-setting/roy-agent-core-084qqd7t.js";
18
+ import"../../../../../shared/@ai-setting/roy-agent-core-w75rafhy.js";
19
+ import"../../../../../shared/@ai-setting/roy-agent-core-yn761yve.js";
20
+ import"../../../../../shared/@ai-setting/roy-agent-core-1k28kg7h.js";
21
+ import"../../../../../shared/@ai-setting/roy-agent-core-j8zx62zr.js";
22
+ import"../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
23
+ export {
24
+ TaskStatusEnum,
25
+ TaskPriorityEnum,
26
+ TaskConfigSchema,
27
+ TaskComponent,
28
+ SQLiteTaskStore,
29
+ ActionTypeEnum
30
+ };
@@ -0,0 +1,23 @@
1
+ import {
2
+ TaskPlugin,
3
+ TaskTagPlugin,
4
+ WORKFLOW_EXTRACTOR_PROMPT,
5
+ createWorkflowExtractorAgent,
6
+ formatExtractorInput,
7
+ formatExtractorInputFromDescription,
8
+ parseExtractorOutput
9
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-04fm8177.js";
10
+ import"../../../../../../shared/@ai-setting/roy-agent-core-pzk1syce.js";
11
+ import"../../../../../../shared/@ai-setting/roy-agent-core-yn761yve.js";
12
+ import"../../../../../../shared/@ai-setting/roy-agent-core-1k28kg7h.js";
13
+ import"../../../../../../shared/@ai-setting/roy-agent-core-j8zx62zr.js";
14
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
15
+ export {
16
+ parseExtractorOutput,
17
+ formatExtractorInputFromDescription,
18
+ formatExtractorInput,
19
+ createWorkflowExtractorAgent,
20
+ WORKFLOW_EXTRACTOR_PROMPT,
21
+ TaskTagPlugin,
22
+ TaskPlugin
23
+ };
@@ -0,0 +1,14 @@
1
+ import {
2
+ SQLiteTaskStore,
3
+ getDefaultDataDir,
4
+ getDefaultTaskDbPath
5
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-8wzz66qe.js";
6
+ import"../../../../../../shared/@ai-setting/roy-agent-core-yn761yve.js";
7
+ import"../../../../../../shared/@ai-setting/roy-agent-core-1k28kg7h.js";
8
+ import"../../../../../../shared/@ai-setting/roy-agent-core-j8zx62zr.js";
9
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
10
+ export {
11
+ getDefaultTaskDbPath,
12
+ getDefaultDataDir,
13
+ SQLiteTaskStore
14
+ };
@@ -0,0 +1,17 @@
1
+ import {
2
+ completeTaskTool,
3
+ createTaskTool,
4
+ deleteTaskTool,
5
+ getTaskTool,
6
+ listTasksTool,
7
+ updateTaskTool
8
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-12x57kf1.js";
9
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
10
+ export {
11
+ updateTaskTool,
12
+ listTasksTool,
13
+ getTaskTool,
14
+ deleteTaskTool,
15
+ createTaskTool,
16
+ completeTaskTool
17
+ };
@@ -0,0 +1,15 @@
1
+ import {
2
+ createOperationTool,
3
+ deleteOperationTool,
4
+ getOperationTool,
5
+ listOperationsTool,
6
+ updateOperationTool
7
+ } from "../../../../../../../shared/@ai-setting/roy-agent-core-gy0wp5h7.js";
8
+ import"../../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
9
+ export {
10
+ updateOperationTool,
11
+ listOperationsTool,
12
+ getOperationTool,
13
+ deleteOperationTool,
14
+ createOperationTool
15
+ };
@@ -8,10 +8,10 @@ import {
8
8
  grepTool,
9
9
  readFileTool,
10
10
  writeFileTool
11
- } from "./chunk-g6j5n3gv.js";
12
- import"./chunk-q9j99fsm.js";
13
- import"./chunk-1qwabsm0.js";
14
- import"./chunk-wbkh7wat.js";
11
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-rh9dpkpw.js";
12
+ import"../../../../../../shared/@ai-setting/roy-agent-core-1k28kg7h.js";
13
+ import"../../../../../../shared/@ai-setting/roy-agent-core-j8zx62zr.js";
14
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
15
15
  export {
16
16
  writeFileTool,
17
17
  readFileTool,
@@ -0,0 +1,39 @@
1
+ import {
2
+ ToolComponent,
3
+ ToolRegistry,
4
+ ToolValidator
5
+ } from "../../../../../shared/@ai-setting/roy-agent-core-jb2exr0d.js";
6
+ import {
7
+ bashTool,
8
+ echoTool,
9
+ editFileTool,
10
+ getAllBuiltInTools,
11
+ getBuiltInTool,
12
+ globTool,
13
+ grepTool,
14
+ readFileTool,
15
+ writeFileTool
16
+ } from "../../../../../shared/@ai-setting/roy-agent-core-rh9dpkpw.js";
17
+ import"../../../../../shared/@ai-setting/roy-agent-core-8dvbn7tw.js";
18
+ import"../../../../../shared/@ai-setting/roy-agent-core-jv3b7v9w.js";
19
+ import"../../../../../shared/@ai-setting/roy-agent-core-m2x48hw6.js";
20
+ import"../../../../../shared/@ai-setting/roy-agent-core-084qqd7t.js";
21
+ import"../../../../../shared/@ai-setting/roy-agent-core-w75rafhy.js";
22
+ import"../../../../../shared/@ai-setting/roy-agent-core-yn761yve.js";
23
+ import"../../../../../shared/@ai-setting/roy-agent-core-1k28kg7h.js";
24
+ import"../../../../../shared/@ai-setting/roy-agent-core-j8zx62zr.js";
25
+ import"../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
26
+ export {
27
+ writeFileTool,
28
+ readFileTool,
29
+ grepTool,
30
+ globTool,
31
+ getBuiltInTool,
32
+ getAllBuiltInTools,
33
+ editFileTool,
34
+ echoTool,
35
+ bashTool,
36
+ ToolValidator,
37
+ ToolRegistry,
38
+ ToolComponent
39
+ };
@@ -0,0 +1,27 @@
1
+ import {
2
+ Edge,
3
+ NodeAs,
4
+ Workflow,
5
+ WorkflowConverter,
6
+ WorkflowEdges,
7
+ createWorkflowFromClass,
8
+ getEdgeMetadatas,
9
+ getNodeMetadatas,
10
+ getWorkflowMetadata
11
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-sbzvpfn7.js";
12
+ import {
13
+ DecoratorNode
14
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-3tnb2005.js";
15
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
16
+ export {
17
+ getWorkflowMetadata,
18
+ getNodeMetadatas,
19
+ getEdgeMetadatas,
20
+ createWorkflowFromClass,
21
+ WorkflowEdges,
22
+ WorkflowConverter,
23
+ Workflow,
24
+ NodeAs,
25
+ Edge,
26
+ DecoratorNode
27
+ };
@@ -0,0 +1,28 @@
1
+ import {
2
+ DAGManager,
3
+ EventBus,
4
+ Executor,
5
+ NodeRegistry,
6
+ Scheduler,
7
+ WorkflowEngine,
8
+ init_engine
9
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-6j0zcmwk.js";
10
+ import"../../../../../../shared/@ai-setting/roy-agent-core-rr9p1g43.js";
11
+ import"../../../../../../shared/@ai-setting/roy-agent-core-5fbp24se.js";
12
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fq5mtxsy.js";
13
+ import"../../../../../../shared/@ai-setting/roy-agent-core-8dvbn7tw.js";
14
+ import"../../../../../../shared/@ai-setting/roy-agent-core-04qgbjbe.js";
15
+ import"../../../../../../shared/@ai-setting/roy-agent-core-yn761yve.js";
16
+ import"../../../../../../shared/@ai-setting/roy-agent-core-1k28kg7h.js";
17
+ import"../../../../../../shared/@ai-setting/roy-agent-core-j8zx62zr.js";
18
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
19
+ init_engine();
20
+
21
+ export {
22
+ WorkflowEngine,
23
+ Scheduler,
24
+ NodeRegistry,
25
+ Executor,
26
+ EventBus,
27
+ DAGManager
28
+ };
@@ -0,0 +1,132 @@
1
+ import {
2
+ WorkflowComponent
3
+ } from "../../../../../shared/@ai-setting/roy-agent-core-6w4pmxc7.js";
4
+ import"../../../../../shared/@ai-setting/roy-agent-core-1z1zv5g8.js";
5
+ import"../../../../../shared/@ai-setting/roy-agent-core-nfj6knp5.js";
6
+ import"../../../../../shared/@ai-setting/roy-agent-core-6j0zcmwk.js";
7
+ import"../../../../../shared/@ai-setting/roy-agent-core-rr9p1g43.js";
8
+ import"../../../../../shared/@ai-setting/roy-agent-core-5fbp24se.js";
9
+ import {
10
+ BaseEventSchema,
11
+ ControlPauseEventSchema,
12
+ ControlResumeEventSchema,
13
+ ControlStopEventSchema,
14
+ DependsOnSchema,
15
+ NodeAddedEventSchema,
16
+ NodeCompletedEventSchema,
17
+ NodeDataEventSchema,
18
+ NodeDefinitionSchema,
19
+ NodeFailedEventSchema,
20
+ NodeInterruptEventSchema,
21
+ NodeProgressEventSchema,
22
+ NodeRemovedEventSchema,
23
+ NodeScheduledEventSchema,
24
+ NodeSkippedEventSchema,
25
+ NodeStartedEventSchema,
26
+ NodeStatusSchema,
27
+ OutputDefinitionSchema,
28
+ RetryConfigSchema,
29
+ RunStatusSchema,
30
+ WorkflowAskUserEventSchema,
31
+ WorkflowCompletedEventSchema,
32
+ WorkflowConfigSchema,
33
+ WorkflowDefinitionSchema,
34
+ WorkflowEventSchema,
35
+ WorkflowFailedEventSchema,
36
+ WorkflowMessageRoleSchema,
37
+ WorkflowMetadataSchema,
38
+ WorkflowOutputEventSchema,
39
+ WorkflowPausedEventSchema,
40
+ WorkflowResumedEventSchema,
41
+ WorkflowStartedEventSchema,
42
+ WorkflowStoppedEventSchema,
43
+ createNodeExecutionContext,
44
+ createWorkflowEvent,
45
+ getWorkflowSessionStatus,
46
+ init_types,
47
+ isWorkflowSessionMetadata,
48
+ parseWorkflowFile,
49
+ parseWorkflowFileSync
50
+ } from "../../../../../shared/@ai-setting/roy-agent-core-fq5mtxsy.js";
51
+ import {
52
+ Edge,
53
+ NodeAs,
54
+ Workflow,
55
+ WorkflowConverter,
56
+ WorkflowEdges,
57
+ createWorkflowFromClass
58
+ } from "../../../../../shared/@ai-setting/roy-agent-core-sbzvpfn7.js";
59
+ import {
60
+ DecoratorNode,
61
+ init_decorator_node
62
+ } from "../../../../../shared/@ai-setting/roy-agent-core-3tnb2005.js";
63
+ import"../../../../../shared/@ai-setting/roy-agent-core-yt8wdh2w.js";
64
+ import {
65
+ AskUserError,
66
+ createNodeInterruptEvent,
67
+ createWorkflowAskUserEvent
68
+ } from "../../../../../shared/@ai-setting/roy-agent-core-8dvbn7tw.js";
69
+ import"../../../../../shared/@ai-setting/roy-agent-core-04qgbjbe.js";
70
+ import"../../../../../shared/@ai-setting/roy-agent-core-m2x48hw6.js";
71
+ import"../../../../../shared/@ai-setting/roy-agent-core-084qqd7t.js";
72
+ import"../../../../../shared/@ai-setting/roy-agent-core-w75rafhy.js";
73
+ import"../../../../../shared/@ai-setting/roy-agent-core-yn761yve.js";
74
+ import"../../../../../shared/@ai-setting/roy-agent-core-1k28kg7h.js";
75
+ import"../../../../../shared/@ai-setting/roy-agent-core-j8zx62zr.js";
76
+ import"../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
77
+
78
+ // packages/core/src/env/workflow/index.ts
79
+ init_decorator_node();
80
+ init_types();
81
+ export {
82
+ parseWorkflowFileSync,
83
+ parseWorkflowFile,
84
+ isWorkflowSessionMetadata,
85
+ getWorkflowSessionStatus,
86
+ createWorkflowFromClass,
87
+ createWorkflowEvent,
88
+ createWorkflowAskUserEvent,
89
+ createNodeInterruptEvent,
90
+ createNodeExecutionContext,
91
+ WorkflowStoppedEventSchema,
92
+ WorkflowStartedEventSchema,
93
+ WorkflowResumedEventSchema,
94
+ WorkflowPausedEventSchema,
95
+ WorkflowOutputEventSchema,
96
+ WorkflowMetadataSchema,
97
+ WorkflowMessageRoleSchema,
98
+ WorkflowFailedEventSchema,
99
+ WorkflowEventSchema,
100
+ WorkflowEdges,
101
+ WorkflowDefinitionSchema,
102
+ WorkflowConverter,
103
+ WorkflowConfigSchema,
104
+ WorkflowComponent,
105
+ WorkflowCompletedEventSchema,
106
+ WorkflowAskUserEventSchema,
107
+ Workflow,
108
+ RunStatusSchema,
109
+ RetryConfigSchema,
110
+ OutputDefinitionSchema,
111
+ NodeStatusSchema,
112
+ NodeStartedEventSchema,
113
+ NodeSkippedEventSchema,
114
+ NodeScheduledEventSchema,
115
+ NodeRemovedEventSchema,
116
+ NodeProgressEventSchema,
117
+ NodeInterruptEventSchema,
118
+ NodeFailedEventSchema,
119
+ NodeDefinitionSchema,
120
+ NodeDataEventSchema,
121
+ NodeCompletedEventSchema,
122
+ NodeAs,
123
+ NodeAddedEventSchema,
124
+ Edge,
125
+ DependsOnSchema,
126
+ DecoratorNode,
127
+ ControlStopEventSchema,
128
+ ControlResumeEventSchema,
129
+ ControlPauseEventSchema,
130
+ BaseEventSchema,
131
+ AskUserError
132
+ };
@@ -0,0 +1,19 @@
1
+ import {
2
+ SkillNode,
3
+ ToolNode,
4
+ WorkflowNode,
5
+ init_skill_node,
6
+ init_tool_node,
7
+ init_workflow_node
8
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-5fbp24se.js";
9
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
10
+
11
+ // packages/core/src/env/workflow/nodes/index.ts
12
+ init_tool_node();
13
+ init_skill_node();
14
+ init_workflow_node();
15
+ export {
16
+ WorkflowNode,
17
+ ToolNode,
18
+ SkillNode
19
+ };
@@ -0,0 +1,13 @@
1
+ import {
2
+ WorkflowService,
3
+ WorkflowServiceRegistry,
4
+ getWorkflowService,
5
+ registerWorkflowService
6
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-yt8wdh2w.js";
7
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
8
+ export {
9
+ registerWorkflowService,
10
+ getWorkflowService,
11
+ WorkflowServiceRegistry,
12
+ WorkflowService
13
+ };
@@ -0,0 +1,27 @@
1
+ import {
2
+ WorkflowRepository,
3
+ rowToWorkflow
4
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-tkr5ynkh.js";
5
+ import {
6
+ closeDatabase,
7
+ getDatabase,
8
+ getDatabasePath,
9
+ initDatabase,
10
+ initializeTables,
11
+ resetDatabase
12
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-qxybm159.js";
13
+ import"../../../../../../shared/@ai-setting/roy-agent-core-0sgn3de4.js";
14
+ import"../../../../../../shared/@ai-setting/roy-agent-core-yn761yve.js";
15
+ import"../../../../../../shared/@ai-setting/roy-agent-core-1k28kg7h.js";
16
+ import"../../../../../../shared/@ai-setting/roy-agent-core-j8zx62zr.js";
17
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
18
+ export {
19
+ rowToWorkflow,
20
+ resetDatabase,
21
+ initializeTables,
22
+ initDatabase,
23
+ getDatabasePath,
24
+ getDatabase,
25
+ closeDatabase,
26
+ WorkflowRepository
27
+ };
@@ -0,0 +1,159 @@
1
+ import {
2
+ AskUserInputSchema,
3
+ askUserTool,
4
+ askUserToolInstance
5
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-nfj6knp5.js";
6
+ import"../../../../../../shared/@ai-setting/roy-agent-core-8dvbn7tw.js";
7
+ import {
8
+ createLogger,
9
+ init_logger
10
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-yn761yve.js";
11
+ import"../../../../../../shared/@ai-setting/roy-agent-core-1k28kg7h.js";
12
+ import"../../../../../../shared/@ai-setting/roy-agent-core-j8zx62zr.js";
13
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
14
+
15
+ // packages/core/src/env/workflow/tools/run-workflow.ts
16
+ init_logger();
17
+ import { z } from "zod";
18
+ var logger = createLogger("run-workflow-tool");
19
+ var RunWorkflowInputSchema = z.object({
20
+ workflow_name: z.string().describe("Name of the workflow to run"),
21
+ input: z.record(z.any()).optional().describe("Input to pass to the workflow"),
22
+ sync: z.boolean().default(true).describe("Wait for completion (default: true)"),
23
+ timeout: z.number().positive().optional().describe("Timeout in milliseconds")
24
+ });
25
+ function createRunWorkflowTool(workflowService) {
26
+ return {
27
+ name: "run-workflow",
28
+ description: "Run a workflow by name with optional input. Returns run_id, status, output, error, and duration_ms.",
29
+ parameters: RunWorkflowInputSchema,
30
+ sandbox: {
31
+ enabled: false
32
+ },
33
+ permission: {
34
+ level: "safe"
35
+ },
36
+ metadata: {
37
+ category: "workflow",
38
+ tags: ["workflow", "execute", "run"],
39
+ version: "1.0.0",
40
+ experimental: false
41
+ },
42
+ execute: async (args, ctx) => {
43
+ const startTime = Date.now();
44
+ const { workflow_name, input, sync = true, timeout } = args;
45
+ logger.info(`Running workflow: ${workflow_name}`, { input, sync, timeout });
46
+ let timeoutHandle;
47
+ let durationMs;
48
+ try {
49
+ let result;
50
+ if (timeout) {
51
+ result = await Promise.race([
52
+ workflowService.runWorkflow(workflow_name, input, { sync }),
53
+ new Promise((_, reject) => {
54
+ timeoutHandle = setTimeout(() => {
55
+ reject(new Error("Workflow execution timed out"));
56
+ }, timeout);
57
+ })
58
+ ]);
59
+ } else {
60
+ result = await workflowService.runWorkflow(workflow_name, input, { sync });
61
+ }
62
+ if (timeoutHandle) {
63
+ clearTimeout(timeoutHandle);
64
+ }
65
+ durationMs = Date.now() - startTime;
66
+ if (sync) {
67
+ return {
68
+ success: result.status === "completed",
69
+ output: {
70
+ run_id: result.runId,
71
+ status: result.status,
72
+ output: result.output,
73
+ error: result.error,
74
+ duration_ms: result.durationMs || durationMs
75
+ },
76
+ metadata: {
77
+ execution_time_ms: durationMs
78
+ }
79
+ };
80
+ } else {
81
+ return {
82
+ success: true,
83
+ output: {
84
+ run_id: result.runId,
85
+ status: result.status,
86
+ duration_ms: durationMs
87
+ },
88
+ metadata: {
89
+ execution_time_ms: durationMs
90
+ }
91
+ };
92
+ }
93
+ } catch (error) {
94
+ if (timeoutHandle) {
95
+ clearTimeout(timeoutHandle);
96
+ }
97
+ durationMs = Date.now() - startTime;
98
+ const errorMessage = error instanceof Error ? error.message : String(error);
99
+ if (errorMessage.includes("Workflow not found")) {
100
+ return {
101
+ success: false,
102
+ output: "",
103
+ error: `Workflow not found: ${workflow_name}`,
104
+ metadata: {
105
+ execution_time_ms: durationMs
106
+ }
107
+ };
108
+ }
109
+ if (errorMessage.includes("abort") || errorMessage.includes("timed out")) {
110
+ return {
111
+ success: false,
112
+ output: "",
113
+ error: `Workflow execution timed out or was aborted: ${workflow_name}`,
114
+ metadata: {
115
+ execution_time_ms: durationMs
116
+ }
117
+ };
118
+ }
119
+ if (logger?.error) {
120
+ logger.error(`Failed to run workflow: ${workflow_name}`, { error: errorMessage });
121
+ }
122
+ return {
123
+ success: false,
124
+ output: "",
125
+ error: `Failed to run workflow ${workflow_name}: ${errorMessage}`,
126
+ metadata: {
127
+ execution_time_ms: durationMs
128
+ }
129
+ };
130
+ }
131
+ }
132
+ };
133
+ }
134
+ var _runWorkflowTool = null;
135
+ var _workflowService = null;
136
+ function initRunWorkflowTool(workflowService) {
137
+ _workflowService = workflowService;
138
+ _runWorkflowTool = createRunWorkflowTool(workflowService);
139
+ }
140
+ function getRunWorkflowTool() {
141
+ if (!_runWorkflowTool || !_workflowService) {
142
+ throw new Error("run-workflow tool not initialized. Call initRunWorkflowTool(workflowService) first.");
143
+ }
144
+ return _runWorkflowTool;
145
+ }
146
+ function resetRunWorkflowTool() {
147
+ _runWorkflowTool = null;
148
+ _workflowService = null;
149
+ }
150
+ export {
151
+ resetRunWorkflowTool,
152
+ initRunWorkflowTool,
153
+ getRunWorkflowTool,
154
+ createRunWorkflowTool,
155
+ askUserToolInstance,
156
+ askUserTool,
157
+ RunWorkflowInputSchema,
158
+ AskUserInputSchema
159
+ };
@@ -0,0 +1,94 @@
1
+ import {
2
+ BaseEventSchema,
3
+ ControlPauseEventSchema,
4
+ ControlResumeEventSchema,
5
+ ControlStopEventSchema,
6
+ DependsOnSchema,
7
+ NodeAddedEventSchema,
8
+ NodeCompletedEventSchema,
9
+ NodeDataEventSchema,
10
+ NodeDefinitionSchema,
11
+ NodeFailedEventSchema,
12
+ NodeInterruptEventSchema,
13
+ NodeProgressEventSchema,
14
+ NodeRemovedEventSchema,
15
+ NodeScheduledEventSchema,
16
+ NodeSkippedEventSchema,
17
+ NodeStartedEventSchema,
18
+ NodeStatusSchema,
19
+ OutputDefinitionSchema,
20
+ RetryConfigSchema,
21
+ RunStatusSchema,
22
+ WorkflowAskUserEventSchema,
23
+ WorkflowCompletedEventSchema,
24
+ WorkflowConfigSchema,
25
+ WorkflowDefinitionSchema,
26
+ WorkflowEventSchema,
27
+ WorkflowFailedEventSchema,
28
+ WorkflowMessageRoleSchema,
29
+ WorkflowMetadataSchema,
30
+ WorkflowOutputEventSchema,
31
+ WorkflowPausedEventSchema,
32
+ WorkflowResumedEventSchema,
33
+ WorkflowStartedEventSchema,
34
+ WorkflowStoppedEventSchema,
35
+ createNodeExecutionContext,
36
+ createWorkflowEvent,
37
+ getWorkflowSessionStatus,
38
+ init_types,
39
+ isWorkflowSessionMetadata,
40
+ parseWorkflowFile,
41
+ parseWorkflowFileSync
42
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-fq5mtxsy.js";
43
+ import {
44
+ AskUserError,
45
+ createNodeInterruptEvent,
46
+ createWorkflowAskUserEvent
47
+ } from "../../../../../../shared/@ai-setting/roy-agent-core-8dvbn7tw.js";
48
+ import"../../../../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
49
+ init_types();
50
+
51
+ export {
52
+ parseWorkflowFileSync,
53
+ parseWorkflowFile,
54
+ isWorkflowSessionMetadata,
55
+ getWorkflowSessionStatus,
56
+ createWorkflowEvent,
57
+ createWorkflowAskUserEvent,
58
+ createNodeInterruptEvent,
59
+ createNodeExecutionContext,
60
+ WorkflowStoppedEventSchema,
61
+ WorkflowStartedEventSchema,
62
+ WorkflowResumedEventSchema,
63
+ WorkflowPausedEventSchema,
64
+ WorkflowOutputEventSchema,
65
+ WorkflowMetadataSchema,
66
+ WorkflowMessageRoleSchema,
67
+ WorkflowFailedEventSchema,
68
+ WorkflowEventSchema,
69
+ WorkflowDefinitionSchema,
70
+ WorkflowConfigSchema,
71
+ WorkflowCompletedEventSchema,
72
+ WorkflowAskUserEventSchema,
73
+ RunStatusSchema,
74
+ RetryConfigSchema,
75
+ OutputDefinitionSchema,
76
+ NodeStatusSchema,
77
+ NodeStartedEventSchema,
78
+ NodeSkippedEventSchema,
79
+ NodeScheduledEventSchema,
80
+ NodeRemovedEventSchema,
81
+ NodeProgressEventSchema,
82
+ NodeInterruptEventSchema,
83
+ NodeFailedEventSchema,
84
+ NodeDefinitionSchema,
85
+ NodeDataEventSchema,
86
+ NodeCompletedEventSchema,
87
+ NodeAddedEventSchema,
88
+ DependsOnSchema,
89
+ ControlStopEventSchema,
90
+ ControlResumeEventSchema,
91
+ ControlPauseEventSchema,
92
+ BaseEventSchema,
93
+ AskUserError
94
+ };