@generacy-ai/generacy 0.0.0-preview-20260304013206

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 (244) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +207 -0
  3. package/bin/generacy.js +11 -0
  4. package/dist/agency/index.d.ts +68 -0
  5. package/dist/agency/index.d.ts.map +1 -0
  6. package/dist/agency/index.js +28 -0
  7. package/dist/agency/index.js.map +1 -0
  8. package/dist/agency/network.d.ts +41 -0
  9. package/dist/agency/network.d.ts.map +1 -0
  10. package/dist/agency/network.js +133 -0
  11. package/dist/agency/network.js.map +1 -0
  12. package/dist/agency/subprocess.d.ts +58 -0
  13. package/dist/agency/subprocess.d.ts.map +1 -0
  14. package/dist/agency/subprocess.js +216 -0
  15. package/dist/agency/subprocess.js.map +1 -0
  16. package/dist/cli/commands/agent.d.ts +10 -0
  17. package/dist/cli/commands/agent.d.ts.map +1 -0
  18. package/dist/cli/commands/agent.js +216 -0
  19. package/dist/cli/commands/agent.js.map +1 -0
  20. package/dist/cli/commands/doctor/checks/agency-mcp.d.ts +3 -0
  21. package/dist/cli/commands/doctor/checks/agency-mcp.d.ts.map +1 -0
  22. package/dist/cli/commands/doctor/checks/agency-mcp.js +51 -0
  23. package/dist/cli/commands/doctor/checks/agency-mcp.js.map +1 -0
  24. package/dist/cli/commands/doctor/checks/anthropic-key.d.ts +3 -0
  25. package/dist/cli/commands/doctor/checks/anthropic-key.d.ts.map +1 -0
  26. package/dist/cli/commands/doctor/checks/anthropic-key.js +68 -0
  27. package/dist/cli/commands/doctor/checks/anthropic-key.js.map +1 -0
  28. package/dist/cli/commands/doctor/checks/config.d.ts +3 -0
  29. package/dist/cli/commands/doctor/checks/config.d.ts.map +1 -0
  30. package/dist/cli/commands/doctor/checks/config.js +81 -0
  31. package/dist/cli/commands/doctor/checks/config.js.map +1 -0
  32. package/dist/cli/commands/doctor/checks/devcontainer.d.ts +3 -0
  33. package/dist/cli/commands/doctor/checks/devcontainer.d.ts.map +1 -0
  34. package/dist/cli/commands/doctor/checks/devcontainer.js +58 -0
  35. package/dist/cli/commands/doctor/checks/devcontainer.js.map +1 -0
  36. package/dist/cli/commands/doctor/checks/docker.d.ts +3 -0
  37. package/dist/cli/commands/doctor/checks/docker.d.ts.map +1 -0
  38. package/dist/cli/commands/doctor/checks/docker.js +71 -0
  39. package/dist/cli/commands/doctor/checks/docker.js.map +1 -0
  40. package/dist/cli/commands/doctor/checks/env-file.d.ts +3 -0
  41. package/dist/cli/commands/doctor/checks/env-file.d.ts.map +1 -0
  42. package/dist/cli/commands/doctor/checks/env-file.js +56 -0
  43. package/dist/cli/commands/doctor/checks/env-file.js.map +1 -0
  44. package/dist/cli/commands/doctor/checks/github-token.d.ts +3 -0
  45. package/dist/cli/commands/doctor/checks/github-token.d.ts.map +1 -0
  46. package/dist/cli/commands/doctor/checks/github-token.js +99 -0
  47. package/dist/cli/commands/doctor/checks/github-token.js.map +1 -0
  48. package/dist/cli/commands/doctor/checks/npm-packages.d.ts +3 -0
  49. package/dist/cli/commands/doctor/checks/npm-packages.d.ts.map +1 -0
  50. package/dist/cli/commands/doctor/checks/npm-packages.js +117 -0
  51. package/dist/cli/commands/doctor/checks/npm-packages.js.map +1 -0
  52. package/dist/cli/commands/doctor/formatter.d.ts +27 -0
  53. package/dist/cli/commands/doctor/formatter.d.ts.map +1 -0
  54. package/dist/cli/commands/doctor/formatter.js +162 -0
  55. package/dist/cli/commands/doctor/formatter.js.map +1 -0
  56. package/dist/cli/commands/doctor/index.d.ts +5 -0
  57. package/dist/cli/commands/doctor/index.d.ts.map +1 -0
  58. package/dist/cli/commands/doctor/index.js +8 -0
  59. package/dist/cli/commands/doctor/index.js.map +1 -0
  60. package/dist/cli/commands/doctor/registry.d.ts +48 -0
  61. package/dist/cli/commands/doctor/registry.d.ts.map +1 -0
  62. package/dist/cli/commands/doctor/registry.js +166 -0
  63. package/dist/cli/commands/doctor/registry.js.map +1 -0
  64. package/dist/cli/commands/doctor/runner.d.ts +14 -0
  65. package/dist/cli/commands/doctor/runner.d.ts.map +1 -0
  66. package/dist/cli/commands/doctor/runner.js +257 -0
  67. package/dist/cli/commands/doctor/runner.js.map +1 -0
  68. package/dist/cli/commands/doctor/types.d.ts +87 -0
  69. package/dist/cli/commands/doctor/types.d.ts.map +1 -0
  70. package/dist/cli/commands/doctor/types.js +2 -0
  71. package/dist/cli/commands/doctor/types.js.map +1 -0
  72. package/dist/cli/commands/doctor.d.ts +12 -0
  73. package/dist/cli/commands/doctor.d.ts.map +1 -0
  74. package/dist/cli/commands/doctor.js +97 -0
  75. package/dist/cli/commands/doctor.js.map +1 -0
  76. package/dist/cli/commands/init/conflicts.d.ts +36 -0
  77. package/dist/cli/commands/init/conflicts.d.ts.map +1 -0
  78. package/dist/cli/commands/init/conflicts.js +165 -0
  79. package/dist/cli/commands/init/conflicts.js.map +1 -0
  80. package/dist/cli/commands/init/github.d.ts +32 -0
  81. package/dist/cli/commands/init/github.d.ts.map +1 -0
  82. package/dist/cli/commands/init/github.js +161 -0
  83. package/dist/cli/commands/init/github.js.map +1 -0
  84. package/dist/cli/commands/init/index.d.ts +21 -0
  85. package/dist/cli/commands/init/index.d.ts.map +1 -0
  86. package/dist/cli/commands/init/index.js +175 -0
  87. package/dist/cli/commands/init/index.js.map +1 -0
  88. package/dist/cli/commands/init/prompts.d.ts +15 -0
  89. package/dist/cli/commands/init/prompts.d.ts.map +1 -0
  90. package/dist/cli/commands/init/prompts.js +281 -0
  91. package/dist/cli/commands/init/prompts.js.map +1 -0
  92. package/dist/cli/commands/init/repo-utils.d.ts +32 -0
  93. package/dist/cli/commands/init/repo-utils.d.ts.map +1 -0
  94. package/dist/cli/commands/init/repo-utils.js +112 -0
  95. package/dist/cli/commands/init/repo-utils.js.map +1 -0
  96. package/dist/cli/commands/init/resolver.d.ts +20 -0
  97. package/dist/cli/commands/init/resolver.d.ts.map +1 -0
  98. package/dist/cli/commands/init/resolver.js +273 -0
  99. package/dist/cli/commands/init/resolver.js.map +1 -0
  100. package/dist/cli/commands/init/summary.d.ts +21 -0
  101. package/dist/cli/commands/init/summary.d.ts.map +1 -0
  102. package/dist/cli/commands/init/summary.js +100 -0
  103. package/dist/cli/commands/init/summary.js.map +1 -0
  104. package/dist/cli/commands/init/types.d.ts +53 -0
  105. package/dist/cli/commands/init/types.d.ts.map +1 -0
  106. package/dist/cli/commands/init/types.js +2 -0
  107. package/dist/cli/commands/init/types.js.map +1 -0
  108. package/dist/cli/commands/init/writer.d.ts +22 -0
  109. package/dist/cli/commands/init/writer.d.ts.map +1 -0
  110. package/dist/cli/commands/init/writer.js +96 -0
  111. package/dist/cli/commands/init/writer.js.map +1 -0
  112. package/dist/cli/commands/orchestrator.d.ts +11 -0
  113. package/dist/cli/commands/orchestrator.d.ts.map +1 -0
  114. package/dist/cli/commands/orchestrator.js +291 -0
  115. package/dist/cli/commands/orchestrator.js.map +1 -0
  116. package/dist/cli/commands/run.d.ts +10 -0
  117. package/dist/cli/commands/run.d.ts.map +1 -0
  118. package/dist/cli/commands/run.js +167 -0
  119. package/dist/cli/commands/run.js.map +1 -0
  120. package/dist/cli/commands/setup/auth.d.ts +11 -0
  121. package/dist/cli/commands/setup/auth.d.ts.map +1 -0
  122. package/dist/cli/commands/setup/auth.js +108 -0
  123. package/dist/cli/commands/setup/auth.js.map +1 -0
  124. package/dist/cli/commands/setup/build.d.ts +11 -0
  125. package/dist/cli/commands/setup/build.d.ts.map +1 -0
  126. package/dist/cli/commands/setup/build.js +212 -0
  127. package/dist/cli/commands/setup/build.js.map +1 -0
  128. package/dist/cli/commands/setup/services.d.ts +11 -0
  129. package/dist/cli/commands/setup/services.d.ts.map +1 -0
  130. package/dist/cli/commands/setup/services.js +294 -0
  131. package/dist/cli/commands/setup/services.js.map +1 -0
  132. package/dist/cli/commands/setup/workspace.d.ts +11 -0
  133. package/dist/cli/commands/setup/workspace.d.ts.map +1 -0
  134. package/dist/cli/commands/setup/workspace.js +215 -0
  135. package/dist/cli/commands/setup/workspace.js.map +1 -0
  136. package/dist/cli/commands/setup.d.ts +7 -0
  137. package/dist/cli/commands/setup.d.ts.map +1 -0
  138. package/dist/cli/commands/setup.js +19 -0
  139. package/dist/cli/commands/setup.js.map +1 -0
  140. package/dist/cli/commands/validate.d.ts +10 -0
  141. package/dist/cli/commands/validate.d.ts.map +1 -0
  142. package/dist/cli/commands/validate.js +164 -0
  143. package/dist/cli/commands/validate.js.map +1 -0
  144. package/dist/cli/commands/worker.d.ts +10 -0
  145. package/dist/cli/commands/worker.d.ts.map +1 -0
  146. package/dist/cli/commands/worker.js +224 -0
  147. package/dist/cli/commands/worker.js.map +1 -0
  148. package/dist/cli/index.d.ts +14 -0
  149. package/dist/cli/index.d.ts.map +1 -0
  150. package/dist/cli/index.js +68 -0
  151. package/dist/cli/index.js.map +1 -0
  152. package/dist/cli/utils/config.d.ts +49 -0
  153. package/dist/cli/utils/config.d.ts.map +1 -0
  154. package/dist/cli/utils/config.js +110 -0
  155. package/dist/cli/utils/config.js.map +1 -0
  156. package/dist/cli/utils/exec.d.ts +39 -0
  157. package/dist/cli/utils/exec.d.ts.map +1 -0
  158. package/dist/cli/utils/exec.js +68 -0
  159. package/dist/cli/utils/exec.js.map +1 -0
  160. package/dist/cli/utils/logger.d.ts +47 -0
  161. package/dist/cli/utils/logger.d.ts.map +1 -0
  162. package/dist/cli/utils/logger.js +97 -0
  163. package/dist/cli/utils/logger.js.map +1 -0
  164. package/dist/config/index.d.ts +10 -0
  165. package/dist/config/index.d.ts.map +1 -0
  166. package/dist/config/index.js +13 -0
  167. package/dist/config/index.js.map +1 -0
  168. package/dist/config/loader.d.ts +104 -0
  169. package/dist/config/loader.d.ts.map +1 -0
  170. package/dist/config/loader.js +266 -0
  171. package/dist/config/loader.js.map +1 -0
  172. package/dist/config/schema.d.ts +304 -0
  173. package/dist/config/schema.d.ts.map +1 -0
  174. package/dist/config/schema.js +160 -0
  175. package/dist/config/schema.js.map +1 -0
  176. package/dist/config/validator.d.ts +60 -0
  177. package/dist/config/validator.d.ts.map +1 -0
  178. package/dist/config/validator.js +112 -0
  179. package/dist/config/validator.js.map +1 -0
  180. package/dist/health/server.d.ts +47 -0
  181. package/dist/health/server.d.ts.map +1 -0
  182. package/dist/health/server.js +92 -0
  183. package/dist/health/server.js.map +1 -0
  184. package/dist/index.d.ts +21 -0
  185. package/dist/index.d.ts.map +1 -0
  186. package/dist/index.js +22 -0
  187. package/dist/index.js.map +1 -0
  188. package/dist/orchestrator/async-event-queue.d.ts +28 -0
  189. package/dist/orchestrator/async-event-queue.d.ts.map +1 -0
  190. package/dist/orchestrator/async-event-queue.js +57 -0
  191. package/dist/orchestrator/async-event-queue.js.map +1 -0
  192. package/dist/orchestrator/client.d.ts +110 -0
  193. package/dist/orchestrator/client.d.ts.map +1 -0
  194. package/dist/orchestrator/client.js +288 -0
  195. package/dist/orchestrator/client.js.map +1 -0
  196. package/dist/orchestrator/event-bus.d.ts +195 -0
  197. package/dist/orchestrator/event-bus.d.ts.map +1 -0
  198. package/dist/orchestrator/event-bus.js +557 -0
  199. package/dist/orchestrator/event-bus.js.map +1 -0
  200. package/dist/orchestrator/heartbeat.d.ts +71 -0
  201. package/dist/orchestrator/heartbeat.d.ts.map +1 -0
  202. package/dist/orchestrator/heartbeat.js +116 -0
  203. package/dist/orchestrator/heartbeat.js.map +1 -0
  204. package/dist/orchestrator/index.d.ts +25 -0
  205. package/dist/orchestrator/index.d.ts.map +1 -0
  206. package/dist/orchestrator/index.js +15 -0
  207. package/dist/orchestrator/index.js.map +1 -0
  208. package/dist/orchestrator/job-handler.d.ts +109 -0
  209. package/dist/orchestrator/job-handler.d.ts.map +1 -0
  210. package/dist/orchestrator/job-handler.js +612 -0
  211. package/dist/orchestrator/job-handler.js.map +1 -0
  212. package/dist/orchestrator/job-queue.d.ts +81 -0
  213. package/dist/orchestrator/job-queue.d.ts.map +1 -0
  214. package/dist/orchestrator/job-queue.js +206 -0
  215. package/dist/orchestrator/job-queue.js.map +1 -0
  216. package/dist/orchestrator/label-monitor-bridge.d.ts +25 -0
  217. package/dist/orchestrator/label-monitor-bridge.d.ts.map +1 -0
  218. package/dist/orchestrator/label-monitor-bridge.js +57 -0
  219. package/dist/orchestrator/label-monitor-bridge.js.map +1 -0
  220. package/dist/orchestrator/log-buffer.d.ts +74 -0
  221. package/dist/orchestrator/log-buffer.d.ts.map +1 -0
  222. package/dist/orchestrator/log-buffer.js +104 -0
  223. package/dist/orchestrator/log-buffer.js.map +1 -0
  224. package/dist/orchestrator/redis-job-queue.d.ts +44 -0
  225. package/dist/orchestrator/redis-job-queue.d.ts.map +1 -0
  226. package/dist/orchestrator/redis-job-queue.js +300 -0
  227. package/dist/orchestrator/redis-job-queue.js.map +1 -0
  228. package/dist/orchestrator/router.d.ts +125 -0
  229. package/dist/orchestrator/router.d.ts.map +1 -0
  230. package/dist/orchestrator/router.js +143 -0
  231. package/dist/orchestrator/router.js.map +1 -0
  232. package/dist/orchestrator/server.d.ts +62 -0
  233. package/dist/orchestrator/server.d.ts.map +1 -0
  234. package/dist/orchestrator/server.js +711 -0
  235. package/dist/orchestrator/server.js.map +1 -0
  236. package/dist/orchestrator/types.d.ts +184 -0
  237. package/dist/orchestrator/types.d.ts.map +1 -0
  238. package/dist/orchestrator/types.js +6 -0
  239. package/dist/orchestrator/types.js.map +1 -0
  240. package/dist/orchestrator/worker-registry.d.ts +110 -0
  241. package/dist/orchestrator/worker-registry.d.ts.map +1 -0
  242. package/dist/orchestrator/worker-registry.js +191 -0
  243. package/dist/orchestrator/worker-registry.js.map +1 -0
  244. package/package.json +80 -0
package/LICENSE ADDED
@@ -0,0 +1,191 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to the Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by the Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding any notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ Copyright 2026 The Generacy AI Authors
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ http://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,207 @@
1
+ # @generacy-ai/generacy
2
+
3
+ Headless CLI for running Generacy workflows in containers and CI/CD environments.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @generacy-ai/generacy
9
+ ```
10
+
11
+ Or use with npx:
12
+
13
+ ```bash
14
+ npx @generacy-ai/generacy run workflow.yaml
15
+ ```
16
+
17
+ ## Features
18
+
19
+ - **Headless Execution**: Run workflows without VS Code or GUI
20
+ - **Orchestrator Integration**: Connect to Generacy orchestrator for job management
21
+ - **Worker Mode**: Process jobs from a central queue
22
+ - **Agent Mode**: Enhanced worker with AI tool routing via Agency
23
+ - **Health Checks**: Built-in health endpoints for container orchestration
24
+ - **Configurable**: Environment variables and CLI options
25
+
26
+ ## CLI Commands
27
+
28
+ ### Run a Workflow
29
+
30
+ Execute a workflow file directly:
31
+
32
+ ```bash
33
+ generacy run workflow.yaml
34
+
35
+ # With inputs
36
+ generacy run workflow.yaml -i name=value -i count=5
37
+
38
+ # In a specific directory
39
+ generacy run workflow.yaml -w /path/to/project
40
+
41
+ # Dry run (validation only)
42
+ generacy run workflow.yaml --dry-run
43
+
44
+ # Execute single step
45
+ generacy run workflow.yaml --single-step "step-name"
46
+ ```
47
+
48
+ ### Worker Mode
49
+
50
+ Start a worker that processes jobs from the orchestrator:
51
+
52
+ ```bash
53
+ generacy worker --url http://orchestrator:3000
54
+
55
+ # With custom worker ID
56
+ generacy worker -u http://orchestrator:3000 -i my-worker-01
57
+
58
+ # With capabilities
59
+ generacy worker -u http://orchestrator:3000 -c nodejs -c typescript
60
+
61
+ # Custom health port
62
+ generacy worker -u http://orchestrator:3000 -p 9090
63
+ ```
64
+
65
+ ### Agent Mode
66
+
67
+ Start an agent worker with AI tool routing:
68
+
69
+ ```bash
70
+ generacy agent --url http://orchestrator:3000
71
+
72
+ # With network Agency
73
+ generacy agent -u http://orchestrator:3000 --agency-mode network --agency-url http://agency:8000
74
+
75
+ # With subprocess Agency
76
+ generacy agent -u http://orchestrator:3000 --agency-mode subprocess --agency-command "npx agency"
77
+ ```
78
+
79
+ ## Configuration
80
+
81
+ ### Environment Variables
82
+
83
+ | Variable | Description | Default |
84
+ |----------|-------------|---------|
85
+ | `LOG_LEVEL` | Logging level | `info` |
86
+ | `GENERACY_PRETTY_LOG` | Enable pretty logging | `true` (dev) |
87
+ | `GENERACY_WORKDIR` | Working directory | `process.cwd()` |
88
+ | `ORCHESTRATOR_URL` | Orchestrator service URL | - |
89
+ | `ORCHESTRATOR_TOKEN` | Authentication token | - |
90
+ | `WORKER_ID` | Worker identifier | auto-generated |
91
+ | `HEALTH_PORT` | Health check port | `8080` |
92
+ | `HEARTBEAT_INTERVAL` | Heartbeat interval (ms) | `30000` |
93
+ | `POLL_INTERVAL` | Job poll interval (ms) | `5000` |
94
+ | `AGENCY_MODE` | Agency mode | `subprocess` |
95
+ | `AGENCY_URL` | Agency URL (network mode) | - |
96
+ | `AGENCY_COMMAND` | Agency command (subprocess) | `npx @anthropic-ai/agency` |
97
+
98
+ ### CLI Options
99
+
100
+ Global options available for all commands:
101
+
102
+ ```bash
103
+ -l, --log-level <level> Log level (trace, debug, info, warn, error)
104
+ --no-pretty Disable pretty logging (use JSON)
105
+ ```
106
+
107
+ ## Docker Usage
108
+
109
+ ```dockerfile
110
+ FROM node:20-alpine
111
+
112
+ RUN npm install -g @generacy-ai/generacy
113
+
114
+ WORKDIR /app
115
+
116
+ # Health check
117
+ HEALTHCHECK --interval=30s --timeout=3s \
118
+ CMD curl -f http://localhost:8080/health || exit 1
119
+
120
+ # Run as worker
121
+ CMD ["generacy", "worker", "-u", "http://orchestrator:3000"]
122
+ ```
123
+
124
+ Docker Compose example:
125
+
126
+ ```yaml
127
+ services:
128
+ worker:
129
+ image: generacy-worker
130
+ environment:
131
+ - ORCHESTRATOR_URL=http://orchestrator:3000
132
+ - ORCHESTRATOR_TOKEN=${ORCHESTRATOR_TOKEN}
133
+ - LOG_LEVEL=info
134
+ healthcheck:
135
+ test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
136
+ interval: 30s
137
+ timeout: 3s
138
+ retries: 3
139
+ ```
140
+
141
+ ## Health Endpoints
142
+
143
+ The worker exposes health endpoints on the configured port:
144
+
145
+ - `GET /health` - Full health status
146
+ - `GET /ready` - Readiness probe
147
+ - `GET /live` - Liveness probe
148
+
149
+ Example response:
150
+
151
+ ```json
152
+ {
153
+ "status": "healthy",
154
+ "uptime": 3600000,
155
+ "lastHeartbeat": "2024-01-15T10:30:00.000Z",
156
+ "currentJob": null,
157
+ "timestamp": "2024-01-15T10:30:30.000Z"
158
+ }
159
+ ```
160
+
161
+ ## Programmatic Usage
162
+
163
+ Use as a library in your Node.js applications:
164
+
165
+ ```typescript
166
+ import {
167
+ OrchestratorClient,
168
+ createAgencyConnection,
169
+ loadWorkflow,
170
+ WorkflowExecutor,
171
+ } from '@generacy-ai/generacy';
172
+
173
+ // Create orchestrator client
174
+ const client = new OrchestratorClient({
175
+ baseUrl: 'http://orchestrator:3000',
176
+ });
177
+
178
+ // Register worker
179
+ await client.register({
180
+ id: 'my-worker',
181
+ name: 'My Worker',
182
+ capabilities: ['nodejs'],
183
+ maxConcurrent: 1,
184
+ });
185
+
186
+ // Poll for jobs
187
+ const response = await client.pollForJob('my-worker');
188
+ if (response.job) {
189
+ // Execute the job workflow
190
+ const workflow = await loadWorkflow(response.job.workflow);
191
+ // ...
192
+ }
193
+ ```
194
+
195
+ ## Graceful Shutdown
196
+
197
+ The worker handles SIGTERM and SIGINT for graceful shutdown:
198
+
199
+ 1. Stops accepting new jobs
200
+ 2. Waits for current job to complete (up to 60 seconds)
201
+ 3. Sends final heartbeat
202
+ 4. Unregisters from orchestrator
203
+ 5. Closes health server
204
+
205
+ ## License
206
+
207
+ MIT
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Generacy CLI entry point
5
+ */
6
+ import { run } from '../dist/cli/index.js';
7
+
8
+ run().catch((error) => {
9
+ console.error('Fatal error:', error);
10
+ process.exit(1);
11
+ });
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Agency connection interface and factory.
3
+ * Provides abstraction for connecting to Agency MCP.
4
+ */
5
+ import type { Logger } from '@generacy-ai/workflow-engine';
6
+ /**
7
+ * Agency connection mode
8
+ */
9
+ export type AgencyMode = 'subprocess' | 'network';
10
+ /**
11
+ * Tool call request
12
+ */
13
+ export interface ToolCallRequest {
14
+ /** Tool name */
15
+ name: string;
16
+ /** Tool arguments */
17
+ arguments: Record<string, unknown>;
18
+ }
19
+ /**
20
+ * Tool call response
21
+ */
22
+ export interface ToolCallResponse {
23
+ /** Whether the call succeeded */
24
+ success: boolean;
25
+ /** Result data if successful */
26
+ result?: unknown;
27
+ /** Error message if failed */
28
+ error?: string;
29
+ }
30
+ /**
31
+ * Agency connection interface
32
+ */
33
+ export interface AgencyConnection {
34
+ /** Connect to the agency */
35
+ connect(): Promise<void>;
36
+ /** Disconnect from the agency */
37
+ disconnect(): Promise<void>;
38
+ /** Check if connected */
39
+ isConnected(): boolean;
40
+ /** List available tools */
41
+ listTools(): Promise<string[]>;
42
+ /** Call a tool */
43
+ callTool(request: ToolCallRequest): Promise<ToolCallResponse>;
44
+ }
45
+ /**
46
+ * Agency connection options
47
+ */
48
+ export interface AgencyConnectionOptions {
49
+ /** Connection mode */
50
+ mode: AgencyMode;
51
+ /** Logger instance */
52
+ logger: Logger;
53
+ /** Agency URL for network mode */
54
+ url?: string;
55
+ /** Agency command for subprocess mode */
56
+ command?: string;
57
+ /** Connection timeout in milliseconds */
58
+ timeout?: number;
59
+ }
60
+ /**
61
+ * Create an agency connection based on mode
62
+ */
63
+ export declare function createAgencyConnection(options: AgencyConnectionOptions): Promise<AgencyConnection>;
64
+ export { SubprocessAgency } from './subprocess.js';
65
+ export type { SubprocessAgencyOptions } from './subprocess.js';
66
+ export { NetworkAgency } from './network.js';
67
+ export type { NetworkAgencyOptions } from './network.js';
68
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agency/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IAEb,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iCAAiC;IACjC,OAAO,EAAE,OAAO,CAAC;IAEjB,gCAAgC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4BAA4B;IAC5B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB,iCAAiC;IACjC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B,yBAAyB;IACzB,WAAW,IAAI,OAAO,CAAC;IAEvB,2BAA2B;IAC3B,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE/B,kBAAkB;IAClB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC/D;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,sBAAsB;IACtB,IAAI,EAAE,UAAU,CAAC;IAEjB,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IAEf,kCAAkC;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,gBAAgB,CAAC,CAmB3B;AAGD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Create an agency connection based on mode
3
+ */
4
+ export async function createAgencyConnection(options) {
5
+ if (options.mode === 'subprocess') {
6
+ const { SubprocessAgency } = await import('./subprocess.js');
7
+ return new SubprocessAgency({
8
+ command: options.command ?? 'npx @anthropic-ai/agency',
9
+ logger: options.logger,
10
+ timeout: options.timeout,
11
+ });
12
+ }
13
+ else {
14
+ const { NetworkAgency } = await import('./network.js');
15
+ if (!options.url) {
16
+ throw new Error('Agency URL is required for network mode');
17
+ }
18
+ return new NetworkAgency({
19
+ url: options.url,
20
+ logger: options.logger,
21
+ timeout: options.timeout,
22
+ });
23
+ }
24
+ }
25
+ // Re-export implementations
26
+ export { SubprocessAgency } from './subprocess.js';
27
+ export { NetworkAgency } from './network.js';
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agency/index.ts"],"names":[],"mappings":"AA4EA;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAAgC;IAEhC,IAAI,OAAO,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAClC,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAC7D,OAAO,IAAI,gBAAgB,CAAC;YAC1B,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,0BAA0B;YACtD,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC7D,CAAC;QACD,OAAO,IAAI,aAAa,CAAC;YACvB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,4BAA4B;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Network agency mode.
3
+ * Connects to Agency HTTP service.
4
+ */
5
+ import type { Logger } from '@generacy-ai/workflow-engine';
6
+ import type { AgencyConnection, ToolCallRequest, ToolCallResponse } from './index.js';
7
+ /**
8
+ * Network agency options
9
+ */
10
+ export interface NetworkAgencyOptions {
11
+ /** Agency service URL */
12
+ url: string;
13
+ /** Logger instance */
14
+ logger: Logger;
15
+ /** Request timeout in milliseconds */
16
+ timeout?: number;
17
+ /** Authentication token */
18
+ authToken?: string;
19
+ }
20
+ /**
21
+ * Agency connection via HTTP
22
+ */
23
+ export declare class NetworkAgency implements AgencyConnection {
24
+ private readonly url;
25
+ private readonly logger;
26
+ private readonly timeout;
27
+ private readonly authToken?;
28
+ private connected;
29
+ private sessionId?;
30
+ constructor(options: NetworkAgencyOptions);
31
+ connect(): Promise<void>;
32
+ disconnect(): Promise<void>;
33
+ isConnected(): boolean;
34
+ listTools(): Promise<string[]>;
35
+ callTool(request: ToolCallRequest): Promise<ToolCallResponse>;
36
+ /**
37
+ * Make an HTTP request to the agency service
38
+ */
39
+ private request;
40
+ }
41
+ //# sourceMappingURL=network.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/agency/network.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEtF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,yBAAyB;IACzB,GAAG,EAAE,MAAM,CAAC;IAEZ,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IAEf,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,aAAc,YAAW,gBAAgB;IACpD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAS;IACpC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAC,CAAS;gBAEf,OAAO,EAAE,oBAAoB;IAOnC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA2BxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBjC,WAAW,IAAI,OAAO;IAIhB,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAS9B,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAuBnE;;OAEG;YACW,OAAO;CAkDtB"}