@alneas/eaos-server 0.0.0-stage → 0.2.0

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 (360) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE +21 -0
  3. package/README.ja.md +49 -0
  4. package/README.md +46 -2
  5. package/dist/agentic/agent-jobs.d.ts +333 -0
  6. package/dist/agentic/agent-jobs.js +15 -0
  7. package/dist/agentic/agent-jobs.js.map +1 -0
  8. package/dist/agentic/agent-node.d.ts +40 -0
  9. package/dist/agentic/agent-node.js +7 -0
  10. package/dist/agentic/agent-node.js.map +1 -0
  11. package/dist/agentic/agent-runner.d.ts +33 -0
  12. package/dist/agentic/agent-runner.js +7 -0
  13. package/dist/agentic/agent-runner.js.map +1 -0
  14. package/dist/agentic/ai-broker.d.ts +169 -0
  15. package/dist/agentic/ai-broker.js +8 -0
  16. package/dist/agentic/ai-broker.js.map +1 -0
  17. package/dist/agentic/atomic-checkpointer.d.ts +137 -0
  18. package/dist/agentic/atomic-checkpointer.js +9 -0
  19. package/dist/agentic/atomic-checkpointer.js.map +1 -0
  20. package/dist/agentic/autonomous-worker.d.ts +122 -0
  21. package/dist/agentic/autonomous-worker.js +10 -0
  22. package/dist/agentic/autonomous-worker.js.map +1 -0
  23. package/dist/agentic/event-bridge.d.ts +350 -0
  24. package/dist/agentic/event-bridge.js +9 -0
  25. package/dist/agentic/event-bridge.js.map +1 -0
  26. package/dist/agentic/executor.d.ts +91 -0
  27. package/dist/agentic/executor.js +12 -0
  28. package/dist/agentic/executor.js.map +1 -0
  29. package/dist/agentic/graph-projection.d.ts +119 -0
  30. package/dist/agentic/graph-projection.js +7 -0
  31. package/dist/agentic/graph-projection.js.map +1 -0
  32. package/dist/agentic/graph.d.ts +524 -0
  33. package/dist/agentic/graph.js +7 -0
  34. package/dist/agentic/graph.js.map +1 -0
  35. package/dist/agentic/index.d.ts +28 -0
  36. package/dist/agentic/index.js +87 -0
  37. package/dist/agentic/index.js.map +1 -0
  38. package/dist/agentic/local-runner.d.ts +106 -0
  39. package/dist/agentic/local-runner.js +7 -0
  40. package/dist/agentic/local-runner.js.map +1 -0
  41. package/dist/agentic/remote-executor.d.ts +67 -0
  42. package/dist/agentic/remote-executor.js +8 -0
  43. package/dist/agentic/remote-executor.js.map +1 -0
  44. package/dist/agentic/types.d.ts +157 -0
  45. package/dist/agentic/types.js +7 -0
  46. package/dist/agentic/types.js.map +1 -0
  47. package/dist/agentic/workflow-catalog.d.ts +152 -0
  48. package/dist/agentic/workflow-catalog.js +7 -0
  49. package/dist/agentic/workflow-catalog.js.map +1 -0
  50. package/dist/agentic/workflow-compiler.d.ts +44 -0
  51. package/dist/agentic/workflow-compiler.js +8 -0
  52. package/dist/agentic/workflow-compiler.js.map +1 -0
  53. package/dist/agentic/workflow-coordinator.d.ts +170 -0
  54. package/dist/agentic/workflow-coordinator.js +8 -0
  55. package/dist/agentic/workflow-coordinator.js.map +1 -0
  56. package/dist/agentic/workflow-manager.d.ts +91 -0
  57. package/dist/agentic/workflow-manager.js +7 -0
  58. package/dist/agentic/workflow-manager.js.map +1 -0
  59. package/dist/agentic/workflow-registry.d.ts +334 -0
  60. package/dist/agentic/workflow-registry.js +7 -0
  61. package/dist/agentic/workflow-registry.js.map +1 -0
  62. package/dist/artifacts-CteHmCMI.d.ts +614 -0
  63. package/dist/auth-hooks/api-key.d.ts +75 -0
  64. package/dist/auth-hooks/api-key.js +7 -0
  65. package/dist/auth-hooks/api-key.js.map +1 -0
  66. package/dist/auth-hooks/index.d.ts +80 -0
  67. package/dist/auth-hooks/index.js +28 -0
  68. package/dist/auth-hooks/index.js.map +1 -0
  69. package/dist/browser-auth/account-memberships.d.ts +213 -0
  70. package/dist/browser-auth/account-memberships.js +13 -0
  71. package/dist/browser-auth/account-memberships.js.map +1 -0
  72. package/dist/browser-auth/index.d.ts +8 -0
  73. package/dist/browser-auth/index.js +59 -0
  74. package/dist/browser-auth/index.js.map +1 -0
  75. package/dist/browser-auth/kratos-session.d.ts +37 -0
  76. package/dist/browser-auth/kratos-session.js +7 -0
  77. package/dist/browser-auth/kratos-session.js.map +1 -0
  78. package/dist/browser-auth/platform-session.d.ts +120 -0
  79. package/dist/browser-auth/platform-session.js +7 -0
  80. package/dist/browser-auth/platform-session.js.map +1 -0
  81. package/dist/browser-auth/public-memberships.d.ts +22 -0
  82. package/dist/browser-auth/public-memberships.js +7 -0
  83. package/dist/browser-auth/public-memberships.js.map +1 -0
  84. package/dist/cache/index.d.ts +181 -0
  85. package/dist/cache/index.js +197 -0
  86. package/dist/cache/index.js.map +1 -0
  87. package/dist/chunk-32746UQZ.js +131 -0
  88. package/dist/chunk-32746UQZ.js.map +1 -0
  89. package/dist/chunk-3NLSWP2Y.js +223 -0
  90. package/dist/chunk-3NLSWP2Y.js.map +1 -0
  91. package/dist/chunk-3P4XTTQH.js +346 -0
  92. package/dist/chunk-3P4XTTQH.js.map +1 -0
  93. package/dist/chunk-3VITSHN3.js +15 -0
  94. package/dist/chunk-3VITSHN3.js.map +1 -0
  95. package/dist/chunk-46UWPEW2.js +226 -0
  96. package/dist/chunk-46UWPEW2.js.map +1 -0
  97. package/dist/chunk-4BARRLJR.js +180 -0
  98. package/dist/chunk-4BARRLJR.js.map +1 -0
  99. package/dist/chunk-4VORUFKR.js +45 -0
  100. package/dist/chunk-4VORUFKR.js.map +1 -0
  101. package/dist/chunk-55D4ERWO.js +1 -0
  102. package/dist/chunk-55D4ERWO.js.map +1 -0
  103. package/dist/chunk-5TBBZIND.js +18 -0
  104. package/dist/chunk-5TBBZIND.js.map +1 -0
  105. package/dist/chunk-5WOZWPZA.js +211 -0
  106. package/dist/chunk-5WOZWPZA.js.map +1 -0
  107. package/dist/chunk-6CBVZ6CT.js +168 -0
  108. package/dist/chunk-6CBVZ6CT.js.map +1 -0
  109. package/dist/chunk-6XZXYNJR.js +74 -0
  110. package/dist/chunk-6XZXYNJR.js.map +1 -0
  111. package/dist/chunk-753HWDSC.js +222 -0
  112. package/dist/chunk-753HWDSC.js.map +1 -0
  113. package/dist/chunk-7AHSS7SO.js +81 -0
  114. package/dist/chunk-7AHSS7SO.js.map +1 -0
  115. package/dist/chunk-7FTJN4SA.js +1 -0
  116. package/dist/chunk-7FTJN4SA.js.map +1 -0
  117. package/dist/chunk-AVDMLTPF.js +24 -0
  118. package/dist/chunk-AVDMLTPF.js.map +1 -0
  119. package/dist/chunk-BKAHUEIT.js +95 -0
  120. package/dist/chunk-BKAHUEIT.js.map +1 -0
  121. package/dist/chunk-CJ7OFEF7.js +134 -0
  122. package/dist/chunk-CJ7OFEF7.js.map +1 -0
  123. package/dist/chunk-EJKWDZIU.js +111 -0
  124. package/dist/chunk-EJKWDZIU.js.map +1 -0
  125. package/dist/chunk-F2J6IQ6I.js +247 -0
  126. package/dist/chunk-F2J6IQ6I.js.map +1 -0
  127. package/dist/chunk-F3O7CELI.js +23 -0
  128. package/dist/chunk-F3O7CELI.js.map +1 -0
  129. package/dist/chunk-F4IITPGX.js +221 -0
  130. package/dist/chunk-F4IITPGX.js.map +1 -0
  131. package/dist/chunk-FD6VC2NA.js +66 -0
  132. package/dist/chunk-FD6VC2NA.js.map +1 -0
  133. package/dist/chunk-FRRRWAHO.js +14 -0
  134. package/dist/chunk-FRRRWAHO.js.map +1 -0
  135. package/dist/chunk-HCKAGLLB.js +17 -0
  136. package/dist/chunk-HCKAGLLB.js.map +1 -0
  137. package/dist/chunk-HVC7FG6B.js +191 -0
  138. package/dist/chunk-HVC7FG6B.js.map +1 -0
  139. package/dist/chunk-HXFVOR7Z.js +496 -0
  140. package/dist/chunk-HXFVOR7Z.js.map +1 -0
  141. package/dist/chunk-IJWYS2PF.js +122 -0
  142. package/dist/chunk-IJWYS2PF.js.map +1 -0
  143. package/dist/chunk-INCHXAFK.js +1395 -0
  144. package/dist/chunk-INCHXAFK.js.map +1 -0
  145. package/dist/chunk-JT6BRGQM.js +1 -0
  146. package/dist/chunk-JT6BRGQM.js.map +1 -0
  147. package/dist/chunk-L6PMAEMB.js +115 -0
  148. package/dist/chunk-L6PMAEMB.js.map +1 -0
  149. package/dist/chunk-LOUGW6MU.js +126 -0
  150. package/dist/chunk-LOUGW6MU.js.map +1 -0
  151. package/dist/chunk-LYPZPE53.js +129 -0
  152. package/dist/chunk-LYPZPE53.js.map +1 -0
  153. package/dist/chunk-NNCCN7JP.js +186 -0
  154. package/dist/chunk-NNCCN7JP.js.map +1 -0
  155. package/dist/chunk-PBC3MZUL.js +212 -0
  156. package/dist/chunk-PBC3MZUL.js.map +1 -0
  157. package/dist/chunk-R4ADP2DC.js +20 -0
  158. package/dist/chunk-R4ADP2DC.js.map +1 -0
  159. package/dist/chunk-RHN4Y6VS.js +44 -0
  160. package/dist/chunk-RHN4Y6VS.js.map +1 -0
  161. package/dist/chunk-SDJNYPYK.js +770 -0
  162. package/dist/chunk-SDJNYPYK.js.map +1 -0
  163. package/dist/chunk-UGNTCOVR.js +28 -0
  164. package/dist/chunk-UGNTCOVR.js.map +1 -0
  165. package/dist/chunk-VC2PCK2S.js +31 -0
  166. package/dist/chunk-VC2PCK2S.js.map +1 -0
  167. package/dist/chunk-VF5YDZJC.js +305 -0
  168. package/dist/chunk-VF5YDZJC.js.map +1 -0
  169. package/dist/chunk-VISRDVTK.js +675 -0
  170. package/dist/chunk-VISRDVTK.js.map +1 -0
  171. package/dist/chunk-W6O3LVBY.js +102 -0
  172. package/dist/chunk-W6O3LVBY.js.map +1 -0
  173. package/dist/chunk-WFEAKJLR.js +47 -0
  174. package/dist/chunk-WFEAKJLR.js.map +1 -0
  175. package/dist/chunk-XIEY2OF4.js +67 -0
  176. package/dist/chunk-XIEY2OF4.js.map +1 -0
  177. package/dist/chunk-XITLHDG3.js +37 -0
  178. package/dist/chunk-XITLHDG3.js.map +1 -0
  179. package/dist/chunk-XMWPYZWZ.js +61 -0
  180. package/dist/chunk-XMWPYZWZ.js.map +1 -0
  181. package/dist/chunk-XUP6CNOM.js +34 -0
  182. package/dist/chunk-XUP6CNOM.js.map +1 -0
  183. package/dist/chunk-YABTQZDJ.js +25 -0
  184. package/dist/chunk-YABTQZDJ.js.map +1 -0
  185. package/dist/chunk-YMHVRBUU.js +199 -0
  186. package/dist/chunk-YMHVRBUU.js.map +1 -0
  187. package/dist/chunk-YMJ7BRKU.js +510 -0
  188. package/dist/chunk-YMJ7BRKU.js.map +1 -0
  189. package/dist/chunk-ZC3XWU7B.js +28 -0
  190. package/dist/chunk-ZC3XWU7B.js.map +1 -0
  191. package/dist/chunk-ZHMTD5KV.js +90 -0
  192. package/dist/chunk-ZHMTD5KV.js.map +1 -0
  193. package/dist/chunk-ZWZDLOE7.js +160 -0
  194. package/dist/chunk-ZWZDLOE7.js.map +1 -0
  195. package/dist/db-package/db/local-first-sqlite-adapter.d.ts +432 -0
  196. package/dist/db-package/db/local-first-sqlite-adapter.js +7 -0
  197. package/dist/db-package/db/local-first-sqlite-adapter.js.map +1 -0
  198. package/dist/db-package/index.d.ts +7 -0
  199. package/dist/db-package/index.js +16 -0
  200. package/dist/db-package/index.js.map +1 -0
  201. package/dist/db-package/migration/aggregator.d.ts +86 -0
  202. package/dist/db-package/migration/aggregator.js +7 -0
  203. package/dist/db-package/migration/aggregator.js.map +1 -0
  204. package/dist/db-package/migration/index.d.ts +3 -0
  205. package/dist/db-package/migration/index.js +8 -0
  206. package/dist/db-package/migration/index.js.map +1 -0
  207. package/dist/engine.d.ts +205 -0
  208. package/dist/engine.js +20 -0
  209. package/dist/engine.js.map +1 -0
  210. package/dist/entitlements/index.d.ts +313 -0
  211. package/dist/entitlements/index.js +23 -0
  212. package/dist/entitlements/index.js.map +1 -0
  213. package/dist/execution/chat.d.ts +7 -0
  214. package/dist/execution/chat.js +7 -0
  215. package/dist/execution/chat.js.map +1 -0
  216. package/dist/execution/index.d.ts +342 -0
  217. package/dist/execution/index.js +66 -0
  218. package/dist/execution/index.js.map +1 -0
  219. package/dist/execution/tool-agent.d.ts +7 -0
  220. package/dist/execution/tool-agent.js +8 -0
  221. package/dist/execution/tool-agent.js.map +1 -0
  222. package/dist/extensions/index.d.ts +172 -0
  223. package/dist/extensions/index.js +95 -0
  224. package/dist/extensions/index.js.map +1 -0
  225. package/dist/health/index.d.ts +35 -0
  226. package/dist/health/index.js +7 -0
  227. package/dist/health/index.js.map +1 -0
  228. package/dist/index.d.ts +43 -0
  229. package/dist/index.js +161 -0
  230. package/dist/index.js.map +1 -0
  231. package/dist/lifecycle/index.d.ts +133 -0
  232. package/dist/lifecycle/index.js +13 -0
  233. package/dist/lifecycle/index.js.map +1 -0
  234. package/dist/lifecycle-engine/backend-migration.d.ts +2 -0
  235. package/dist/lifecycle-engine/backend-migration.js +11 -0
  236. package/dist/lifecycle-engine/backend-migration.js.map +1 -0
  237. package/dist/lifecycle-engine/baseline.d.ts +2 -0
  238. package/dist/lifecycle-engine/baseline.js +9 -0
  239. package/dist/lifecycle-engine/baseline.js.map +1 -0
  240. package/dist/lifecycle-engine/index.d.ts +1497 -0
  241. package/dist/lifecycle-engine/index.js +41 -0
  242. package/dist/lifecycle-engine/index.js.map +1 -0
  243. package/dist/lifecycle-engine/platform/artifacts.d.ts +4 -0
  244. package/dist/lifecycle-engine/platform/artifacts.js +7 -0
  245. package/dist/lifecycle-engine/platform/artifacts.js.map +1 -0
  246. package/dist/lifecycle-engine/platform/control-plane.d.ts +12 -0
  247. package/dist/lifecycle-engine/platform/control-plane.js +2 -0
  248. package/dist/lifecycle-engine/platform/control-plane.js.map +1 -0
  249. package/dist/lifecycle-engine/platform/database-router.d.ts +118 -0
  250. package/dist/lifecycle-engine/platform/database-router.js +7 -0
  251. package/dist/lifecycle-engine/platform/database-router.js.map +1 -0
  252. package/dist/lifecycle-engine/platform/deployment-placements.d.ts +464 -0
  253. package/dist/lifecycle-engine/platform/deployment-placements.js +16 -0
  254. package/dist/lifecycle-engine/platform/deployment-placements.js.map +1 -0
  255. package/dist/lifecycle-engine/platform/deployment.d.ts +4 -0
  256. package/dist/lifecycle-engine/platform/deployment.js +17 -0
  257. package/dist/lifecycle-engine/platform/deployment.js.map +1 -0
  258. package/dist/lifecycle-engine/platform/index.d.ts +737 -0
  259. package/dist/lifecycle-engine/platform/index.js +60 -0
  260. package/dist/lifecycle-engine/platform/index.js.map +1 -0
  261. package/dist/lifecycle-engine/platform/runtime.d.ts +80 -0
  262. package/dist/lifecycle-engine/platform/runtime.js +11 -0
  263. package/dist/lifecycle-engine/platform/runtime.js.map +1 -0
  264. package/dist/lifecycle-engine/platform/site-publication.d.ts +102 -0
  265. package/dist/lifecycle-engine/platform/site-publication.js +7 -0
  266. package/dist/lifecycle-engine/platform/site-publication.js.map +1 -0
  267. package/dist/lifecycle-engine/platform/user-directory.d.ts +139 -0
  268. package/dist/lifecycle-engine/platform/user-directory.js +13 -0
  269. package/dist/lifecycle-engine/platform/user-directory.js.map +1 -0
  270. package/dist/mcp.d.ts +92 -0
  271. package/dist/mcp.js +10 -0
  272. package/dist/mcp.js.map +1 -0
  273. package/dist/middleware/auth.d.ts +118 -0
  274. package/dist/middleware/auth.js +7 -0
  275. package/dist/middleware/auth.js.map +1 -0
  276. package/dist/middleware/error-handler.d.ts +35 -0
  277. package/dist/middleware/error-handler.js +7 -0
  278. package/dist/middleware/error-handler.js.map +1 -0
  279. package/dist/middleware/module-guard.d.ts +33 -0
  280. package/dist/middleware/module-guard.js +7 -0
  281. package/dist/middleware/module-guard.js.map +1 -0
  282. package/dist/platform-admin/index.d.ts +37 -0
  283. package/dist/platform-admin/index.js +11 -0
  284. package/dist/platform-admin/index.js.map +1 -0
  285. package/dist/platform-admin/store.d.ts +346 -0
  286. package/dist/platform-admin/store.js +7 -0
  287. package/dist/platform-admin/store.js.map +1 -0
  288. package/dist/plugin-data/annotations.d.ts +6 -0
  289. package/dist/plugin-data/annotations.js +12 -0
  290. package/dist/plugin-data/annotations.js.map +1 -0
  291. package/dist/plugin-data/atomic-context.d.ts +41 -0
  292. package/dist/plugin-data/atomic-context.js +9 -0
  293. package/dist/plugin-data/atomic-context.js.map +1 -0
  294. package/dist/plugin-data/atomic.d.ts +6 -0
  295. package/dist/plugin-data/atomic.js +26 -0
  296. package/dist/plugin-data/atomic.js.map +1 -0
  297. package/dist/plugin-data/audit.d.ts +6 -0
  298. package/dist/plugin-data/audit.js +12 -0
  299. package/dist/plugin-data/audit.js.map +1 -0
  300. package/dist/plugin-data/commands.d.ts +6 -0
  301. package/dist/plugin-data/commands.js +8 -0
  302. package/dist/plugin-data/commands.js.map +1 -0
  303. package/dist/plugin-data/composite.d.ts +6 -0
  304. package/dist/plugin-data/composite.js +8 -0
  305. package/dist/plugin-data/composite.js.map +1 -0
  306. package/dist/plugin-data/delivery.d.ts +6 -0
  307. package/dist/plugin-data/delivery.js +16 -0
  308. package/dist/plugin-data/delivery.js.map +1 -0
  309. package/dist/plugin-data/index.d.ts +2798 -0
  310. package/dist/plugin-data/index.js +102 -0
  311. package/dist/plugin-data/index.js.map +1 -0
  312. package/dist/plugin-data/json-documents.d.ts +6 -0
  313. package/dist/plugin-data/json-documents.js +16 -0
  314. package/dist/plugin-data/json-documents.js.map +1 -0
  315. package/dist/plugin-data/outbox.d.ts +6 -0
  316. package/dist/plugin-data/outbox.js +16 -0
  317. package/dist/plugin-data/outbox.js.map +1 -0
  318. package/dist/plugin-data/scoped-records.d.ts +6 -0
  319. package/dist/plugin-data/scoped-records.js +10 -0
  320. package/dist/plugin-data/scoped-records.js.map +1 -0
  321. package/dist/plugin-sdk.d.ts +41 -0
  322. package/dist/plugin-sdk.js +10 -0
  323. package/dist/plugin-sdk.js.map +1 -0
  324. package/dist/sql-lifecycle/index.d.ts +138 -0
  325. package/dist/sql-lifecycle/index.js +167 -0
  326. package/dist/sql-lifecycle/index.js.map +1 -0
  327. package/dist/storage/index.d.ts +2 -0
  328. package/dist/storage/index.js +13 -0
  329. package/dist/storage/index.js.map +1 -0
  330. package/dist/storage/s3-compatible.d.ts +139 -0
  331. package/dist/storage/s3-compatible.js +11 -0
  332. package/dist/storage/s3-compatible.js.map +1 -0
  333. package/dist/tenant.d.ts +108 -0
  334. package/dist/tenant.js +9 -0
  335. package/dist/tenant.js.map +1 -0
  336. package/dist/workspace-context.d.ts +119 -0
  337. package/dist/workspace-context.js +9 -0
  338. package/dist/workspace-context.js.map +1 -0
  339. package/docs/api.md +30560 -0
  340. package/docs/db/README.md +49 -0
  341. package/docs/db/docs/api.md +1613 -0
  342. package/docs/db/docs/guide.md +47 -0
  343. package/docs/entitlements.md +60 -0
  344. package/docs/guide.md +92 -0
  345. package/docs/index.md +57 -0
  346. package/docs/ja/db/README.md +46 -0
  347. package/docs/ja/db/docs/guide.md +53 -0
  348. package/docs/ja/guide.md +46 -0
  349. package/docs/ja/lifecycle/README.md +46 -0
  350. package/docs/ja/lifecycle/docs/guide.md +45 -0
  351. package/docs/ja/storage/README.md +46 -0
  352. package/docs/ja/storage/docs/guide.md +43 -0
  353. package/docs/lifecycle/README.md +49 -0
  354. package/docs/lifecycle/docs/api.md +3770 -0
  355. package/docs/lifecycle/docs/baseline.md +50 -0
  356. package/docs/lifecycle/docs/guide.md +47 -0
  357. package/docs/storage/README.md +49 -0
  358. package/docs/storage/docs/api.md +470 -0
  359. package/docs/storage/docs/guide.md +47 -0
  360. package/package.json +354 -4
@@ -0,0 +1,106 @@
1
+ import { AgentJobKind, AgentJobRecord } from '@alneas/eaos-core';
2
+ import { AgentJobStore } from './agent-jobs.js';
3
+ import { ServerAgentTaskRequest, ServerAgentTaskResult } from './types.js';
4
+ import './autonomous-worker.js';
5
+ import '@alneas/appkit-core/ai/ai-chat';
6
+ import '../execution/index.js';
7
+ import '@alneas/appkit-core/ai/action';
8
+ import 'hono/types';
9
+ import 'hono';
10
+ import '@alneas/appkit-core/ai';
11
+ import '../plugin-data/index.js';
12
+ import '@alneas/eaos-core/plugin-sdk';
13
+ import '@alneas/eaos-server/lifecycle-engine';
14
+
15
+ /**
16
+ * Verified local-runner identity and routes admitted by the host.
17
+ * @see LocalRunnerPullCoordinator.
18
+ */
19
+ interface LocalRunnerIdentity {
20
+ /** Nonblank authenticated runner identifier. */
21
+ runnerId: string;
22
+ /** Nonblank authenticated user to whom claimed jobs must belong. */
23
+ userId: string;
24
+ /** Nonempty array of nonblank host-authorized route identifiers. */
25
+ supportedRouteIds: readonly string[];
26
+ }
27
+ /**
28
+ * Durable queue and completion notification for {@link LocalRunnerPullCoordinator}.
29
+ */
30
+ interface LocalRunnerPullCoordinatorOptions {
31
+ /** Host job store enforcing atomic claims and lease ownership. */
32
+ store: AgentJobStore;
33
+ /** Clock read once per claim/submit; defaults to a fresh Date. */
34
+ now?: () => Date;
35
+ /** Retry delay in milliseconds, finite from 0 to 86400000. @defaultValue 5000 */
36
+ retryDelayMs?: number;
37
+ /** Called with cloned job/result only after markCompleted succeeds; rejection propagates after the persisted completion. */
38
+ onCompleted?: (job: Readonly<AgentJobRecord<ServerAgentTaskRequest>>, result: ServerAgentTaskResult) => Promise<void>;
39
+ }
40
+ /**
41
+ * Server-side queue boundary for a local CLI/MLX runner.
42
+ *
43
+ * The runner authenticates to the host and pulls jobs; the server never needs
44
+ * the subscription credential. The host must perform authentication and
45
+ * tenant/user authorization before calling claim or submit.
46
+ * @example
47
+ * ```typescript
48
+ * import { LocalRunnerPullCoordinator, type LocalRunnerPullCoordinatorOptions } from "@alneas/eaos-server/agentic/local-runner";
49
+ * export function localRunnerQueue(options: LocalRunnerPullCoordinatorOptions) {
50
+ * return new LocalRunnerPullCoordinator(options);
51
+ * }
52
+ * ```
53
+ */
54
+ declare class LocalRunnerPullCoordinator {
55
+ private readonly options;
56
+ private readonly now;
57
+ private readonly retryDelayMs;
58
+ /**
59
+ * Creates a coordinator retaining the host store and callbacks.
60
+ * @param options - Queue persistence, clock, retry delay, and optional post-completion callback.
61
+ * @throws If store is absent or retry delay is outside finite 0–86400000 milliseconds.
62
+ */
63
+ constructor(options: LocalRunnerPullCoordinatorOptions);
64
+ /**
65
+ * Atomically claims local-pull jobs bound to this verified user, runner, and supported routes.
66
+ * @param identity - Host-authenticated runner identity; see {@link LocalRunnerIdentity}.
67
+ * @param limit - Maximum jobs requested, safe integer 1–100; defaults to 1.
68
+ * @returns Store-claimed jobs with leases, or an empty array when none qualify.
69
+ * @throws Rejects invalid identity/limit and propagated store/clock failures.
70
+ * @example
71
+ * ```typescript
72
+ * import { LocalRunnerPullCoordinator, type LocalRunnerPullCoordinatorOptions, type LocalRunnerIdentity } from "@alneas/eaos-server/agentic/local-runner";
73
+ * export async function pull(options: LocalRunnerPullCoordinatorOptions, identity: LocalRunnerIdentity) {
74
+ * return new LocalRunnerPullCoordinator(options).claim(identity);
75
+ * }
76
+ * ```
77
+ */
78
+ claim(identity: LocalRunnerIdentity, limit?: number): Promise<readonly AgentJobRecord<ServerAgentTaskRequest>[]>;
79
+ /**
80
+ * Persists a leased local-runner outcome after checking its user, route, and runner bindings.
81
+ * @param identity - Host-authenticated runner identity.
82
+ * @param job - Host-loaded leased job; must belong to the same user, local-pull mode, supported route, and optional runner binding.
83
+ * @param result - Runtime result; COMPLETED marks completion, PENDING_APPROVAL waits, other results retry unless retryable is exactly false.
84
+ * @returns No value; resolves after the selected store transition and any completion callback.
85
+ * @throws Rejects invalid binding, store/clock/clone errors, or completion callback errors. Callback failure occurs after completion persistence.
86
+ * @remarks The host loads the authoritative job and authorizes tenant/user access before calling. Error text is truncated to 1000 characters for retries/failures. Store lease validation is the concurrency boundary; no remote runtime cancellation or automatic retry execution is performed here.
87
+ * @example
88
+ * ```typescript
89
+ * import { LocalRunnerPullCoordinator, type LocalRunnerPullCoordinatorOptions, type LocalRunnerIdentity } from "@alneas/eaos-server/agentic/local-runner";
90
+ * import type { AgentJobRecord } from "@alneas/eaos-core";
91
+ * import type { ServerAgentTaskRequest, ServerAgentTaskResult } from "@alneas/eaos-server/agentic/types";
92
+ * export async function submit(options: LocalRunnerPullCoordinatorOptions, identity: LocalRunnerIdentity, job: AgentJobRecord<ServerAgentTaskRequest>, result: ServerAgentTaskResult) {
93
+ * await new LocalRunnerPullCoordinator(options).submit(identity, job, result);
94
+ * }
95
+ * ```
96
+ */
97
+ submit(identity: LocalRunnerIdentity, job: Readonly<AgentJobRecord<ServerAgentTaskRequest>>, result: ServerAgentTaskResult): Promise<void>;
98
+ }
99
+ /**
100
+ * Alias of core job kinds accepted by local runner coordination.
101
+ * @see LocalRunnerPullCoordinator.
102
+ */
103
+ type LocalRunnerJobKind = AgentJobKind;
104
+
105
+ export { LocalRunnerPullCoordinator };
106
+ export type { LocalRunnerIdentity, LocalRunnerJobKind, LocalRunnerPullCoordinatorOptions };
@@ -0,0 +1,7 @@
1
+ import {
2
+ LocalRunnerPullCoordinator
3
+ } from "../chunk-ZHMTD5KV.js";
4
+ export {
5
+ LocalRunnerPullCoordinator
6
+ };
7
+ //# sourceMappingURL=local-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,67 @@
1
+ import { WorkflowAgentFailureCode } from '@alneas/eaos-core';
2
+ import { ServerAgentTaskRequest, ServerAgentExecutor } from './types.js';
3
+
4
+ /**
5
+ * Versioned JSON envelope POSTed by {@link createHttpAgentExecutor}.
6
+ */
7
+ interface HttpAgentRuntimeRequest {
8
+ /** Wire protocol version; must be 1.0. */
9
+ protocolVersion: '1.0';
10
+ /** Cloned host-admitted task to execute. */
11
+ task: ServerAgentTaskRequest;
12
+ }
13
+ /**
14
+ * Runtime reply validated by {@link createHttpAgentExecutor}; failed replies are converted to execution errors.
15
+ */
16
+ interface HttpAgentRuntimeResponse {
17
+ /** Wire protocol version; must match 1.0. */
18
+ protocolVersion: '1.0';
19
+ /** Must match the submitted task ID. */
20
+ taskId: string;
21
+ /** COMPLETED requires string output; FAILED is converted to a rejected execution. */
22
+ status: 'COMPLETED' | 'FAILED';
23
+ /** Required string result for COMPLETED replies; ignored on FAILED. */
24
+ output?: string;
25
+ /** Optional failure description; a blank/missing value uses a generic message. */
26
+ error?: string;
27
+ /** Optional recognized classification; unrecognized values become RUNTIME_FAILED. */
28
+ failureCode?: WorkflowAgentFailureCode;
29
+ /** Optional retry advice on failures; otherwise unavailable/timeout/runtime failure default to retryable. */
30
+ retryable?: boolean;
31
+ }
32
+ /**
33
+ * Trusted endpoint, credentials, transport, and limits for {@link createHttpAgentExecutor}.
34
+ */
35
+ interface HttpAgentExecutorOptions {
36
+ /** Private host or ARM runtime endpoint. Credentials must be host-configured. */
37
+ url: string;
38
+ /** Host-configured headers, including any runtime credentials; Content-Type is always application/json. */
39
+ headers?: Record<string, string>;
40
+ /** Default timeout in milliseconds, safe integer 1–3600000; task.timeoutMs overrides this. @defaultValue 60000 */
41
+ timeoutMs?: number;
42
+ /** Maximum response bytes, safe integer 1–134217728; content length and streaming bytes are checked. @defaultValue 8388608 */
43
+ maxResponseBytes?: number;
44
+ /** Host transport implementation; defaults to global fetch. */
45
+ fetch?: typeof fetch;
46
+ }
47
+ /**
48
+ * Creates the standard private HTTP boundary from application-worker to an
49
+ * ARM/remote agent runtime. The runtime returns text only; workflow proposal
50
+ * parsing and all business side effects stay in EAOS/server/plugin code.
51
+ * @param options - Trusted endpoint, headers, fetch implementation, and limits.
52
+ * @returns An executor resolving runtime output text after checking protocolVersion, taskId, status, and output type.
53
+ * @throws Synchronously for missing/invalid endpoint or limits. Invocations reject with ServerAgentExecutionError for transport, timeout, HTTP status, output size, JSON/contract errors, or reported runtime failure; clone/serialization errors can also reject.
54
+ * @remarks HTTPS is required except localhost/127.0.0.1/IPv6 loopback HTTP; URL credentials and fragments are rejected. Each task uses one POST with redirects disabled, cookies omitted, and an AbortSignal timeout. No retries or business authorization occur here. Remote side effects may have happened before transport failure; the host must define safe idempotency before retrying. Response readers are released and oversized streams are cancelled.
55
+ * @example
56
+ * ```typescript
57
+ * import { createHttpAgentExecutor, type HttpAgentExecutorOptions } from "@alneas/eaos-server/agentic/remote-executor";
58
+ * export function remoteExecutor(hostConfiguration: HttpAgentExecutorOptions) {
59
+ * // Provision/authenticate the runtime separately and keep its headers server-side.
60
+ * return createHttpAgentExecutor(hostConfiguration);
61
+ * }
62
+ * ```
63
+ */
64
+ declare function createHttpAgentExecutor(options: HttpAgentExecutorOptions): ServerAgentExecutor;
65
+
66
+ export { createHttpAgentExecutor };
67
+ export type { HttpAgentExecutorOptions, HttpAgentRuntimeRequest, HttpAgentRuntimeResponse };
@@ -0,0 +1,8 @@
1
+ import {
2
+ createHttpAgentExecutor
3
+ } from "../chunk-IJWYS2PF.js";
4
+ import "../chunk-YABTQZDJ.js";
5
+ export {
6
+ createHttpAgentExecutor
7
+ };
8
+ //# sourceMappingURL=remote-executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,157 @@
1
+ import { AgentJobKind, WorkflowAgentToolMode, AgentRuntimeResourcePolicy, WorkflowAgentFailureCode, ApprovalLevel, RiskLevel } from '@alneas/eaos-core';
2
+
3
+ /**
4
+ * Runtime selector used to dispatch server tasks to built-in or host-provided executors.
5
+ * @see ServerAgentExecutor for the host adapter contract.
6
+ */
7
+ type ServerAgentWorkerType = 'goose' | 'hermes_agent' | 'litellm' | 'local_cli' | 'local_mlx' | 'external_no_training' | 'custom';
8
+ /**
9
+ * Selects server-side queue execution or authenticated local runner pull delivery.
10
+ * @see ServerAgentExecutionContext.
11
+ */
12
+ type ServerAgentDispatchMode = 'server-queue' | 'local-pull';
13
+ /**
14
+ * Host-admitted task passed to an agent runtime; tenant/user claims must already be verified.
15
+ * @see ServerAgentExecutor for a complete adapter example.
16
+ */
17
+ interface ServerAgentTaskRequest {
18
+ /** Stable task identifier used for result and checkpoint binding. */
19
+ id: string;
20
+ /** Verified tenant ID; never accepted directly as an authenticated request-body claim. */
21
+ tenantId: string;
22
+ /** Verified submitting user ID. */
23
+ userId: string;
24
+ /** Nonblank task label; ServerAutonomousWorker limits this to 500 characters. */
25
+ title: string;
26
+ /** Nonblank runtime instructions; ServerAutonomousWorker limits this to 1000000 characters. */
27
+ instructions: string;
28
+ /** Selected built-in or host runtime adapter key. */
29
+ workerType: ServerAgentWorkerType;
30
+ /** Why the agent is running; not limited to task-graph workflows. */
31
+ jobKind?: AgentJobKind;
32
+ /** Optional domain context; interpretation belongs to the executor. */
33
+ context?: Record<string, unknown>;
34
+ /** Host-verified workflow context propagated to the external runtime. */
35
+ executionContext?: ServerAgentExecutionContext;
36
+ /** Framework-selected resource policy. Callers cannot loosen this policy. */
37
+ runtimePolicy?: AgentRuntimeResourcePolicy;
38
+ /** Optional execution timeout in milliseconds; built-in executors default to 60000 and accept safe integers from 1 to 3600000. */
39
+ timeoutMs?: number;
40
+ }
41
+ /**
42
+ * Host-selected workflow, correlation, tool scope, and local-runner bindings sent to the runtime.
43
+ * @see ServerAgentTaskRequest.
44
+ */
45
+ interface ServerAgentExecutionContext {
46
+ /** Optional workflow/session association. */
47
+ workflowId?: string;
48
+ /** Optional host tracing identifier. */
49
+ correlationId?: string;
50
+ /** Optional host deduplication key; propagation alone does not enforce idempotency. */
51
+ idempotencyKey?: string;
52
+ /** Optional workflow tool-execution mode admitted by the host. */
53
+ toolMode?: WorkflowAgentToolMode;
54
+ /** Optional allowlisted tool names; runtime adapters must enforce the intended boundary. */
55
+ allowedToolNames?: readonly string[];
56
+ /** Selected by the server broker; clients cannot override it. */
57
+ routeId?: string;
58
+ /** Optional delivery mode; local-pull jobs are claimed by authenticated local runners. */
59
+ dispatchMode?: ServerAgentDispatchMode;
60
+ /** User/runner binding for local subscription or MLX execution. */
61
+ runnerId?: string;
62
+ }
63
+ /**
64
+ * Normalized runtime outcome; FAILED and PENDING_APPROVAL are returned data rather than successful output.
65
+ * @see ServerAgentExecutor.
66
+ */
67
+ interface ServerAgentTaskResult {
68
+ /** Task identifier to which this result belongs. */
69
+ taskId: string;
70
+ /** COMPLETED has runtime output; PENDING_APPROVAL awaits a host decision; FAILED records a rejected or failed run. */
71
+ status: 'COMPLETED' | 'PENDING_APPROVAL' | 'FAILED';
72
+ /** Runtime text when available; omitted on failures and pending approval. */
73
+ output?: string;
74
+ /** Optional failure message for FAILED results. */
75
+ error?: string;
76
+ /** Stable failure classification for durable retry/circuit-breaker handling. */
77
+ failureCode?: WorkflowAgentFailureCode;
78
+ /** Optional retry advice; absence leaves retry policy to the caller. */
79
+ retryable?: boolean;
80
+ /** Optional generated approval binding for PENDING_APPROVAL. */
81
+ approvalTicketId?: string;
82
+ /** Optional human-approval level returned by the gatekeeper. */
83
+ approvalLevel?: ApprovalLevel;
84
+ /** Optional risk classification returned by the gatekeeper. */
85
+ riskLevel?: RiskLevel;
86
+ /** Elapsed wall-clock milliseconds for this attempt. */
87
+ durationMs: number;
88
+ }
89
+ /**
90
+ * Carries stable failure classification and retry advice from runtime adapters to queue coordination.
91
+ * @example
92
+ * ```typescript
93
+ * import { ServerAgentExecutionError } from "@alneas/eaos-server/agentic/types";
94
+ * const error = new ServerAgentExecutionError("Runtime unavailable", "AGENT_UNAVAILABLE", true);
95
+ * console.log(error.failureCode, error.retryable);
96
+ * ```
97
+ */
98
+ declare class ServerAgentExecutionError extends Error {
99
+ /** Classification used by runner normalization and durable retry handling. */
100
+ readonly failureCode: WorkflowAgentFailureCode;
101
+ /** Host retry advice; true does not itself retry or make execution idempotent. */
102
+ readonly retryable: boolean;
103
+ /**
104
+ * Creates a runtime failure retaining an optional underlying cause.
105
+ * @param message - Human-readable failure description.
106
+ * @param failureCode - Stable classification for caller retry policy.
107
+ * @param retryable - Whether the caller may consider retrying this failure.
108
+ * @param options - Optional cause; omission does not attach an error cause.
109
+ */
110
+ constructor(message: string, failureCode: WorkflowAgentFailureCode, retryable: boolean, options?: {
111
+ /**
112
+ * Optional underlying error attached through the standard Error cause option; omission leaves the cause unset.
113
+ */
114
+ cause?: unknown;
115
+ });
116
+ }
117
+ /**
118
+ * Host- or plugin-owned agent execution adapter.
119
+ *
120
+ * The server owns admission, authorization and result normalization; the
121
+ * adapter owns the configured runtime (OpenCode, Codex, Goose, LiteLLM, etc.).
122
+ * @param request - Verified task and execution context; adapters must enforce host runtime/tool boundaries.
123
+ * @returns Runtime text output, which is not permission to perform business side effects.
124
+ * @throws Reject for unavailable, failed, timed-out, or invalid runtime work; ServerAgentExecutionError preserves classification and retry advice.
125
+ * @example
126
+ * ```typescript
127
+ * import type { ServerAgentExecutor } from "@alneas/eaos-server/agentic/types";
128
+ * export function instrument(execute: ServerAgentExecutor): ServerAgentExecutor {
129
+ * return async request => execute(structuredClone(request));
130
+ * }
131
+ * ```
132
+ */
133
+ type ServerAgentExecutor = (request: ServerAgentTaskRequest) => Promise<string>;
134
+ /**
135
+ * Host-verified approval decision submitted against a pending task checkpoint.
136
+ * @remarks The host authenticates the approver and verifies role authority before passing this payload to a coordinator.
137
+ * @see ServerAgentTaskResult.
138
+ */
139
+ interface ServerApprovalCallbackPayload {
140
+ /** Task checkpoint identifier whose approval is being decided. */
141
+ taskId: string;
142
+ /** Optional external ticket binding; when supplied it must match the checkpoint. */
143
+ approvalId?: string;
144
+ /** Optional binding hash for clients that persist the approval payload. */
145
+ bindingHash?: string;
146
+ /** True to approve; false to reject the pending work. */
147
+ approved: boolean;
148
+ /** Authenticated host approver identifier. */
149
+ approverId: string;
150
+ /** Verified role used for approval authorization. */
151
+ approverRole: string;
152
+ /** Optional human decision note. */
153
+ comment?: string;
154
+ }
155
+
156
+ export { ServerAgentExecutionError };
157
+ export type { ServerAgentDispatchMode, ServerAgentExecutionContext, ServerAgentExecutor, ServerAgentTaskRequest, ServerAgentTaskResult, ServerAgentWorkerType, ServerApprovalCallbackPayload };
@@ -0,0 +1,7 @@
1
+ import {
2
+ ServerAgentExecutionError
3
+ } from "../chunk-YABTQZDJ.js";
4
+ export {
5
+ ServerAgentExecutionError
6
+ };
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,152 @@
1
+ import { WorkflowDefinitionNodeKind, WorkflowToolScopeDefinition, WorkflowDefinition, WorkflowDefinitionNode } from '@alneas/eaos-core';
2
+ import { AgentGraphState, GraphNodeHandler, GraphSubgraph } from './graph.js';
3
+ import '@langchain/langgraph';
4
+
5
+ /**
6
+ * Serializable node metadata exposed to workflow editors by {@link WorkflowNodeCatalog}.
7
+ */
8
+ interface WorkflowNodeDescriptor {
9
+ /** Unique lowercase catalog type identifier, at most 128 characters. */
10
+ type: string;
11
+ /** Editor label, trimmed and required during registration. */
12
+ label: string;
13
+ /** Optional human-readable editor description. */
14
+ description?: string;
15
+ /** Optional owning plugin ID included in visual metadata. */
16
+ pluginId?: string;
17
+ /** Workflow node category used unless a definition overrides it. */
18
+ kind: WorkflowDefinitionNodeKind;
19
+ /** Optional declared tool-scope metadata; execution enforcement belongs to the host handler. */
20
+ toolScope?: WorkflowToolScopeDefinition;
21
+ /** Optional visual capability flag; compilation defaults to true when no node approval is declared. */
22
+ canRequestApproval?: boolean;
23
+ }
24
+ /**
25
+ * Definition and node context supplied when compiling a registered workflow node.
26
+ * @see WorkflowNodeRegistration.
27
+ */
28
+ interface WorkflowNodeResolverInput {
29
+ /** Validated serializable workflow definition being compiled. */
30
+ definition: WorkflowDefinition;
31
+ /** Specific definition node being resolved. */
32
+ node: WorkflowDefinitionNode;
33
+ /** Optional runtime state for host-specific resolution; the standard compiler omits it. */
34
+ state?: AgentGraphState;
35
+ }
36
+ /**
37
+ * Trusted host/plugin handler and optional subgraph resolution for one catalog node type.
38
+ * @see WorkflowNodeCatalog.register.
39
+ */
40
+ interface WorkflowNodeRegistration {
41
+ /** Serializable editor metadata cloned at registration. */
42
+ descriptor: WorkflowNodeDescriptor;
43
+ /**
44
+ * Resolves a plugin/host handler while preserving the Effect/Receipt boundary.
45
+ * @param input - Validated definition and node being compiled.
46
+ * @returns A graph handler, synchronously or asynchronously; the compiler rejects nonfunctions.
47
+ * @throws Resolver failures reject compilation.
48
+
49
+ * @example
50
+ * ```typescript
51
+ * import type { WorkflowNodeRegistration } from "@alneas/eaos-server";
52
+ * export async function resolveHostNode(
53
+ * registration: WorkflowNodeRegistration,
54
+ * validatedInput: Parameters<WorkflowNodeRegistration["resolve"]>[0],
55
+ * ) {
56
+ * const handler = await registration.resolve(validatedInput);
57
+ * return handler; // Resolving a handler does not execute its effects.
58
+ * }
59
+ * ```
60
+ */
61
+ resolve(input: WorkflowNodeResolverInput): GraphNodeHandler | Promise<GraphNodeHandler>;
62
+ /**
63
+ * Resolves a compiled LangGraph subgraph for a definition declaring subflow.
64
+ * @param input - Validated definition and subflow node.
65
+ * @returns A graph exposing invoke, synchronously or asynchronously.
66
+ * @throws Resolver failures reject compilation.
67
+
68
+ * @example
69
+ * ```typescript
70
+ * import type { WorkflowNodeRegistration } from "@alneas/eaos-server";
71
+ * export async function resolveHostSubflow(
72
+ * registration: WorkflowNodeRegistration,
73
+ * validatedInput: Parameters<NonNullable<WorkflowNodeRegistration["resolveSubgraph"]>>[0],
74
+ * ) {
75
+ * if (!registration.resolveSubgraph) throw new Error("This node has no subgraph resolver");
76
+ * return await registration.resolveSubgraph(validatedInput);
77
+ * }
78
+ * ```
79
+ */
80
+ resolveSubgraph?(input: WorkflowNodeResolverInput): GraphSubgraph | Promise<GraphSubgraph>;
81
+ }
82
+ /**
83
+ * Registers trusted host/plugin node resolvers and cloned descriptors for workflow compilation and editors.
84
+ * @remarks Storage is process-local; no persistence or authorization is supplied.
85
+ * @example
86
+ * ```typescript
87
+ * import { WorkflowNodeCatalog } from "@alneas/eaos-server/agentic/workflow-catalog";
88
+ * const catalog = new WorkflowNodeCatalog();
89
+ * const unregister = catalog.register({ descriptor: { type: "example.task", label: "Example", kind: "task" }, resolve: () => async () => ({}) });
90
+ * console.log(catalog.list().length); // 1
91
+ * unregister();
92
+ * ```
93
+ */
94
+ declare class WorkflowNodeCatalog {
95
+ private readonly registrations;
96
+ /**
97
+ * Registers a unique node type and returns a safe unregister callback.
98
+ * @param registration - Descriptor with nonblank label and type matching lowercase letters/digits/dot/underscore/hyphen up to 128 characters, plus a handler resolver.
99
+ * @returns A no-argument callback returning no value; it removes only this registration and does not remove a later replacement.
100
+ * @throws Invalid type/label, duplicate type, missing resolver, or descriptor clone failure.
101
+ * @remarks The descriptor is cloned and its label trimmed; resolver function references are retained.
102
+ * @example
103
+ * ```typescript
104
+ * import { WorkflowNodeCatalog } from "@alneas/eaos-server/agentic/workflow-catalog";
105
+ * const catalog = new WorkflowNodeCatalog();
106
+ * const dispose = catalog.register({ descriptor: { type: "example.task", label: "Example", kind: "task" }, resolve: () => async () => ({}) });
107
+ * dispose();
108
+ * ```
109
+ */
110
+ register(registration: WorkflowNodeRegistration): () => void;
111
+ /**
112
+ * Reads a registered resolver by exact node type.
113
+ * @param type - Case-sensitive catalog type identifier.
114
+ * @returns The retained registration, or undefined; mutation is not isolated by cloning.
115
+ * @example
116
+ * ```typescript
117
+ * import { WorkflowNodeCatalog } from "@alneas/eaos-server/agentic/workflow-catalog";
118
+ * console.log(new WorkflowNodeCatalog().get("example.task")); // undefined
119
+ * ```
120
+ */
121
+ get(type: string): WorkflowNodeRegistration | undefined;
122
+ /**
123
+ * Reads a registered resolver or fails if the type is unavailable.
124
+ * @param type - Exact catalog node type required by a workflow definition.
125
+ * @returns The retained registration.
126
+ * @throws If no registration exists for type.
127
+ * @example
128
+ * ```typescript
129
+ * import { WorkflowNodeCatalog, type WorkflowNodeRegistration } from "@alneas/eaos-server/agentic/workflow-catalog";
130
+ * export function registered(registration: WorkflowNodeRegistration) {
131
+ * const catalog = new WorkflowNodeCatalog();
132
+ * catalog.register(registration);
133
+ * return catalog.require(registration.descriptor.type);
134
+ * }
135
+ * ```
136
+ */
137
+ require(type: string): WorkflowNodeRegistration;
138
+ /**
139
+ * Lists cloned descriptors in registration insertion order.
140
+ * @returns A new descriptor array, empty for an empty catalog; caller changes do not affect stored descriptors.
141
+ * @throws If descriptors were externally mutated to contain uncloneable values.
142
+ * @example
143
+ * ```typescript
144
+ * import { WorkflowNodeCatalog } from "@alneas/eaos-server/agentic/workflow-catalog";
145
+ * console.log(new WorkflowNodeCatalog().list()); // []
146
+ * ```
147
+ */
148
+ list(): readonly WorkflowNodeDescriptor[];
149
+ }
150
+
151
+ export { WorkflowNodeCatalog };
152
+ export type { WorkflowNodeDescriptor, WorkflowNodeRegistration, WorkflowNodeResolverInput };
@@ -0,0 +1,7 @@
1
+ import {
2
+ WorkflowNodeCatalog
3
+ } from "../chunk-7AHSS7SO.js";
4
+ export {
5
+ WorkflowNodeCatalog
6
+ };
7
+ //# sourceMappingURL=workflow-catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,44 @@
1
+ import { WorkflowDefinition } from '@alneas/eaos-core';
2
+ import { BaseCheckpointSaver } from '@langchain/langgraph';
3
+ import { AgentGraphEngine, AgentGraphEngineOptions } from './graph.js';
4
+ import { WorkflowNodeCatalog } from './workflow-catalog.js';
5
+
6
+ /**
7
+ * Trusted node catalog, checkpoint persistence, and live approval authority for {@link compileWorkflowDefinition}.
8
+ */
9
+ interface WorkflowCompilerOptions {
10
+ /** Required host/plugin node resolver catalog. */
11
+ catalog: WorkflowNodeCatalog;
12
+ /** Optional LangGraph saver; absent uses the graph engine default, which is not durable host storage. */
13
+ checkpointer?: BaseCheckpointSaver;
14
+ /** Optional live host approval authorization forwarded to the graph engine. */
15
+ authorizeResume?: AgentGraphEngineOptions['authorizeResume'];
16
+ }
17
+ /**
18
+ * Validated definition and configured graph produced by {@link compileWorkflowDefinition}.
19
+ */
20
+ interface CompiledWorkflow {
21
+ /** Validated serializable workflow definition returned by core validation. */
22
+ definition: WorkflowDefinition;
23
+ /** Newly assembled graph; compilation performs no workflow execution. */
24
+ graph: AgentGraphEngine;
25
+ }
26
+ /**
27
+ * Validates a serializable workflow and resolves its catalog nodes into a LangGraph-backed runtime.
28
+ * @param input - Unknown serialized definition accepted by core validateWorkflowDefinition.
29
+ * @param options - Required catalog, optional saver, and live resume authorizer.
30
+ * @returns Validated definition and newly configured graph with node retries, conditional routes, approval metadata, and subgraph mappings.
31
+ * @throws Rejects definition validation, missing catalog/types/subgraph resolvers, invalid resolved handlers/graphs, or propagated resolver/graph construction errors.
32
+ * @remarks Host resolvers may have setup side effects before a later node fails; no rollback/disposal protocol is provided. Node timeouts race the handler but do not cancel underlying work. Tool scopes are passed in workflow context; handlers must enforce them. Runtime conditional routing picks the first matching condition or first default/unconditional edge and throws if none match. Durable persistence, live authorization, and safe side-effect retry contracts remain host-owned.
33
+ * @example
34
+ * ```typescript
35
+ * import { compileWorkflowDefinition, type WorkflowCompilerOptions } from "@alneas/eaos-server/agentic/workflow-compiler";
36
+ * export async function compile(input: unknown, options: WorkflowCompilerOptions) {
37
+ * return compileWorkflowDefinition(input, options);
38
+ * }
39
+ * ```
40
+ */
41
+ declare function compileWorkflowDefinition(input: unknown, options: WorkflowCompilerOptions): Promise<CompiledWorkflow>;
42
+
43
+ export { compileWorkflowDefinition };
44
+ export type { CompiledWorkflow, WorkflowCompilerOptions };
@@ -0,0 +1,8 @@
1
+ import {
2
+ compileWorkflowDefinition
3
+ } from "../chunk-CJ7OFEF7.js";
4
+ import "../chunk-HXFVOR7Z.js";
5
+ export {
6
+ compileWorkflowDefinition
7
+ };
8
+ //# sourceMappingURL=workflow-compiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}