@hotmeshio/long-tail 0.1.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 (809) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +262 -0
  3. package/build/examples/external-mcp-server/server.d.ts +17 -0
  4. package/build/examples/external-mcp-server/server.js +116 -0
  5. package/build/examples/index.d.ts +2 -0
  6. package/build/examples/index.js +7 -0
  7. package/build/examples/seed.d.ts +5 -0
  8. package/build/examples/seed.js +221 -0
  9. package/build/examples/types/envelopes.d.ts +34 -0
  10. package/build/examples/types/envelopes.js +8 -0
  11. package/build/examples/types/index.d.ts +10 -0
  12. package/build/examples/types/index.js +9 -0
  13. package/build/examples/types/resolvers.d.ts +27 -0
  14. package/build/examples/types/resolvers.js +9 -0
  15. package/build/examples/workers.d.ts +10 -0
  16. package/build/examples/workers.js +49 -0
  17. package/build/examples/workflows/basic-echo/activities.d.ts +20 -0
  18. package/build/examples/workflows/basic-echo/activities.js +55 -0
  19. package/build/examples/workflows/basic-echo/index.d.ts +14 -0
  20. package/build/examples/workflows/basic-echo/index.js +66 -0
  21. package/build/examples/workflows/kitchen-sink/activities.d.ts +40 -0
  22. package/build/examples/workflows/kitchen-sink/activities.js +46 -0
  23. package/build/examples/workflows/kitchen-sink/index.d.ts +22 -0
  24. package/build/examples/workflows/kitchen-sink/index.js +123 -0
  25. package/build/examples/workflows/review-content/activities.d.ts +10 -0
  26. package/build/examples/workflows/review-content/activities.js +44 -0
  27. package/build/examples/workflows/review-content/index.d.ts +10 -0
  28. package/build/examples/workflows/review-content/index.js +95 -0
  29. package/build/examples/workflows/review-content/types.d.ts +28 -0
  30. package/build/examples/workflows/review-content/types.js +2 -0
  31. package/build/index.d.ts +37 -0
  32. package/build/index.js +151 -0
  33. package/build/modules/auth.d.ts +58 -0
  34. package/build/modules/auth.js +163 -0
  35. package/build/modules/config.d.ts +19 -0
  36. package/build/modules/config.js +26 -0
  37. package/build/modules/defaults.d.ts +58 -0
  38. package/build/modules/defaults.js +95 -0
  39. package/build/modules/ltconfig.d.ts +21 -0
  40. package/build/modules/ltconfig.js +110 -0
  41. package/build/modules/maintenance.d.ts +18 -0
  42. package/build/modules/maintenance.js +47 -0
  43. package/build/routes/auth.d.ts +2 -0
  44. package/build/routes/auth.js +48 -0
  45. package/build/routes/bot-accounts.d.ts +2 -0
  46. package/build/routes/bot-accounts.js +280 -0
  47. package/build/routes/controlplane.d.ts +2 -0
  48. package/build/routes/controlplane.js +144 -0
  49. package/build/routes/dba.d.ts +2 -0
  50. package/build/routes/dba.js +86 -0
  51. package/build/routes/delegation.d.ts +2 -0
  52. package/build/routes/delegation.js +81 -0
  53. package/build/routes/escalations/bulk.d.ts +2 -0
  54. package/build/routes/escalations/bulk.js +324 -0
  55. package/build/routes/escalations/helpers.d.ts +5 -0
  56. package/build/routes/escalations/helpers.js +48 -0
  57. package/build/routes/escalations/index.d.ts +2 -0
  58. package/build/routes/escalations/index.js +20 -0
  59. package/build/routes/escalations/list.d.ts +2 -0
  60. package/build/routes/escalations/list.js +140 -0
  61. package/build/routes/escalations/resolve.d.ts +2 -0
  62. package/build/routes/escalations/resolve.js +240 -0
  63. package/build/routes/escalations/single.d.ts +2 -0
  64. package/build/routes/escalations/single.js +195 -0
  65. package/build/routes/exports.d.ts +2 -0
  66. package/build/routes/exports.js +163 -0
  67. package/build/routes/files.d.ts +2 -0
  68. package/build/routes/files.js +47 -0
  69. package/build/routes/index.d.ts +2 -0
  70. package/build/routes/index.js +52 -0
  71. package/build/routes/insight.d.ts +2 -0
  72. package/build/routes/insight.js +58 -0
  73. package/build/routes/maintenance.d.ts +2 -0
  74. package/build/routes/maintenance.js +38 -0
  75. package/build/routes/mcp-runs.d.ts +2 -0
  76. package/build/routes/mcp-runs.js +85 -0
  77. package/build/routes/mcp.d.ts +2 -0
  78. package/build/routes/mcp.js +264 -0
  79. package/build/routes/namespaces.d.ts +2 -0
  80. package/build/routes/namespaces.js +71 -0
  81. package/build/routes/oauth.d.ts +7 -0
  82. package/build/routes/oauth.js +217 -0
  83. package/build/routes/resolve.d.ts +9 -0
  84. package/build/routes/resolve.js +19 -0
  85. package/build/routes/roles.d.ts +2 -0
  86. package/build/routes/roles.js +195 -0
  87. package/build/routes/settings.d.ts +2 -0
  88. package/build/routes/settings.js +35 -0
  89. package/build/routes/tasks.d.ts +2 -0
  90. package/build/routes/tasks.js +133 -0
  91. package/build/routes/users.d.ts +2 -0
  92. package/build/routes/users.js +206 -0
  93. package/build/routes/workflows/config.d.ts +2 -0
  94. package/build/routes/workflows/config.js +123 -0
  95. package/build/routes/workflows/discovery.d.ts +2 -0
  96. package/build/routes/workflows/discovery.js +146 -0
  97. package/build/routes/workflows/index.d.ts +2 -0
  98. package/build/routes/workflows/index.js +18 -0
  99. package/build/routes/workflows/invocation.d.ts +2 -0
  100. package/build/routes/workflows/invocation.js +162 -0
  101. package/build/routes/yaml-workflows/crud.d.ts +2 -0
  102. package/build/routes/yaml-workflows/crud.js +276 -0
  103. package/build/routes/yaml-workflows/deployment.d.ts +2 -0
  104. package/build/routes/yaml-workflows/deployment.js +179 -0
  105. package/build/routes/yaml-workflows/helpers.d.ts +2 -0
  106. package/build/routes/yaml-workflows/helpers.js +8 -0
  107. package/build/routes/yaml-workflows/index.d.ts +2 -0
  108. package/build/routes/yaml-workflows/index.js +21 -0
  109. package/build/routes/yaml-workflows/versions.d.ts +2 -0
  110. package/build/routes/yaml-workflows/versions.js +116 -0
  111. package/build/scripts/process-helpers.d.ts +11 -0
  112. package/build/scripts/process-helpers.js +59 -0
  113. package/build/scripts/process.d.ts +18 -0
  114. package/build/scripts/process.js +191 -0
  115. package/build/scripts/token.d.ts +13 -0
  116. package/build/scripts/token.js +42 -0
  117. package/build/services/auth/bot-api-key.d.ts +32 -0
  118. package/build/services/auth/bot-api-key.js +112 -0
  119. package/build/services/auth/delegation.d.ts +20 -0
  120. package/build/services/auth/delegation.js +53 -0
  121. package/build/services/auth/service-token.d.ts +23 -0
  122. package/build/services/auth/service-token.js +105 -0
  123. package/build/services/config/cache.d.ts +2 -0
  124. package/build/services/config/cache.js +24 -0
  125. package/build/services/config/index.d.ts +4 -0
  126. package/build/services/config/index.js +13 -0
  127. package/build/services/config/provider.d.ts +2 -0
  128. package/build/services/config/provider.js +30 -0
  129. package/build/services/config/read.d.ts +3 -0
  130. package/build/services/config/read.js +68 -0
  131. package/build/services/config/sql.d.ts +14 -0
  132. package/build/services/config/sql.js +58 -0
  133. package/build/services/config/write.d.ts +5 -0
  134. package/build/services/config/write.js +61 -0
  135. package/build/services/controlplane/index.d.ts +47 -0
  136. package/build/services/controlplane/index.js +124 -0
  137. package/build/services/controlplane/quorum-bridge.d.ts +15 -0
  138. package/build/services/controlplane/quorum-bridge.js +62 -0
  139. package/build/services/controlplane/sql.d.ts +21 -0
  140. package/build/services/controlplane/sql.js +70 -0
  141. package/build/services/controlplane/types.d.ts +13 -0
  142. package/build/services/controlplane/types.js +3 -0
  143. package/build/services/cron/index.d.ts +46 -0
  144. package/build/services/cron/index.js +199 -0
  145. package/build/services/db/index.d.ts +3 -0
  146. package/build/services/db/index.js +19 -0
  147. package/build/services/db/migrate.d.ts +1 -0
  148. package/build/services/db/migrate.js +78 -0
  149. package/build/services/dba.d.ts +28 -0
  150. package/build/services/dba.js +32 -0
  151. package/build/services/escalation/bulk.d.ts +27 -0
  152. package/build/services/escalation/bulk.js +57 -0
  153. package/build/services/escalation/crud.d.ts +47 -0
  154. package/build/services/escalation/crud.js +150 -0
  155. package/build/services/escalation/index.d.ts +4 -0
  156. package/build/services/escalation/index.js +20 -0
  157. package/build/services/escalation/queries.d.ts +37 -0
  158. package/build/services/escalation/queries.js +163 -0
  159. package/build/services/escalation/sql.d.ts +21 -0
  160. package/build/services/escalation/sql.js +135 -0
  161. package/build/services/escalation/types.d.ts +43 -0
  162. package/build/services/escalation/types.js +13 -0
  163. package/build/services/escalation-strategy/default.d.ts +12 -0
  164. package/build/services/escalation-strategy/default.js +17 -0
  165. package/build/services/escalation-strategy/index.d.ts +21 -0
  166. package/build/services/escalation-strategy/index.js +32 -0
  167. package/build/services/escalation-strategy/mcp.d.ts +13 -0
  168. package/build/services/escalation-strategy/mcp.js +51 -0
  169. package/build/services/events/index.d.ts +37 -0
  170. package/build/services/events/index.js +64 -0
  171. package/build/services/events/memory.d.ts +27 -0
  172. package/build/services/events/memory.js +40 -0
  173. package/build/services/events/nats.d.ts +29 -0
  174. package/build/services/events/nats.js +50 -0
  175. package/build/services/events/publish.d.ts +72 -0
  176. package/build/services/events/publish.js +106 -0
  177. package/build/services/events/socketio.d.ts +33 -0
  178. package/build/services/events/socketio.js +70 -0
  179. package/build/services/export/client.d.ts +2 -0
  180. package/build/services/export/client.js +16 -0
  181. package/build/services/export/index.d.ts +39 -0
  182. package/build/services/export/index.js +158 -0
  183. package/build/services/export/post-process.d.ts +16 -0
  184. package/build/services/export/post-process.js +133 -0
  185. package/build/services/export/types.d.ts +25 -0
  186. package/build/services/export/types.js +2 -0
  187. package/build/services/hotmesh-utils.d.ts +61 -0
  188. package/build/services/hotmesh-utils.js +204 -0
  189. package/build/services/iam/activity.d.ts +52 -0
  190. package/build/services/iam/activity.js +59 -0
  191. package/build/services/iam/bots.d.ts +83 -0
  192. package/build/services/iam/bots.js +157 -0
  193. package/build/services/iam/context.d.ts +14 -0
  194. package/build/services/iam/context.js +61 -0
  195. package/build/services/iam/credentials.d.ts +42 -0
  196. package/build/services/iam/credentials.js +86 -0
  197. package/build/services/iam/envelope.d.ts +10 -0
  198. package/build/services/iam/envelope.js +32 -0
  199. package/build/services/iam/ephemeral.d.ts +50 -0
  200. package/build/services/iam/ephemeral.js +131 -0
  201. package/build/services/iam/index.d.ts +19 -0
  202. package/build/services/iam/index.js +37 -0
  203. package/build/services/iam/principal.d.ts +12 -0
  204. package/build/services/iam/principal.js +53 -0
  205. package/build/services/iam/resolve.d.ts +48 -0
  206. package/build/services/iam/resolve.js +89 -0
  207. package/build/services/insight/index.d.ts +30 -0
  208. package/build/services/insight/index.js +81 -0
  209. package/build/services/insight/prompts.d.ts +4 -0
  210. package/build/services/insight/prompts.js +15 -0
  211. package/build/services/interceptor/activities/config.d.ts +21 -0
  212. package/build/services/interceptor/activities/config.js +26 -0
  213. package/build/services/interceptor/activities/escalation.d.ts +58 -0
  214. package/build/services/interceptor/activities/escalation.js +110 -0
  215. package/build/services/interceptor/activities/index.d.ts +4 -0
  216. package/build/services/interceptor/activities/index.js +23 -0
  217. package/build/services/interceptor/activities/task.d.ts +65 -0
  218. package/build/services/interceptor/activities/task.js +168 -0
  219. package/build/services/interceptor/activities/workflow.d.ts +26 -0
  220. package/build/services/interceptor/activities/workflow.js +41 -0
  221. package/build/services/interceptor/activity-interceptor.d.ts +32 -0
  222. package/build/services/interceptor/activity-interceptor.js +86 -0
  223. package/build/services/interceptor/completion.d.ts +16 -0
  224. package/build/services/interceptor/completion.js +149 -0
  225. package/build/services/interceptor/context.d.ts +11 -0
  226. package/build/services/interceptor/context.js +20 -0
  227. package/build/services/interceptor/escalation.d.ts +26 -0
  228. package/build/services/interceptor/escalation.js +150 -0
  229. package/build/services/interceptor/index.d.ts +45 -0
  230. package/build/services/interceptor/index.js +160 -0
  231. package/build/services/interceptor/lifecycle.d.ts +44 -0
  232. package/build/services/interceptor/lifecycle.js +174 -0
  233. package/build/services/interceptor/state.d.ts +22 -0
  234. package/build/services/interceptor/state.js +36 -0
  235. package/build/services/interceptor/types.d.ts +43 -0
  236. package/build/services/interceptor/types.js +3 -0
  237. package/build/services/llm/detect.d.ts +16 -0
  238. package/build/services/llm/detect.js +33 -0
  239. package/build/services/llm/index.d.ts +34 -0
  240. package/build/services/llm/index.js +106 -0
  241. package/build/services/llm/providers/anthropic.d.ts +11 -0
  242. package/build/services/llm/providers/anthropic.js +85 -0
  243. package/build/services/llm/providers/openai.d.ts +9 -0
  244. package/build/services/llm/providers/openai.js +46 -0
  245. package/build/services/llm/translate.d.ts +66 -0
  246. package/build/services/llm/translate.js +192 -0
  247. package/build/services/llm/types.d.ts +64 -0
  248. package/build/services/llm/types.js +8 -0
  249. package/build/services/logger/index.d.ts +32 -0
  250. package/build/services/logger/index.js +69 -0
  251. package/build/services/logger/pino.d.ts +24 -0
  252. package/build/services/logger/pino.js +59 -0
  253. package/build/services/maintenance/index.d.ts +43 -0
  254. package/build/services/maintenance/index.js +183 -0
  255. package/build/services/mcp/adapter.d.ts +23 -0
  256. package/build/services/mcp/adapter.js +119 -0
  257. package/build/services/mcp/client/connection.d.ts +46 -0
  258. package/build/services/mcp/client/connection.js +280 -0
  259. package/build/services/mcp/client/index.d.ts +2 -0
  260. package/build/services/mcp/client/index.js +16 -0
  261. package/build/services/mcp/client/tools.d.ts +22 -0
  262. package/build/services/mcp/client/tools.js +118 -0
  263. package/build/services/mcp/db-server/index.d.ts +25 -0
  264. package/build/services/mcp/db-server/index.js +49 -0
  265. package/build/services/mcp/db-server/schemas.d.ts +52 -0
  266. package/build/services/mcp/db-server/schemas.js +34 -0
  267. package/build/services/mcp/db-server/tools.d.ts +5 -0
  268. package/build/services/mcp/db-server/tools.js +224 -0
  269. package/build/services/mcp/db.d.ts +26 -0
  270. package/build/services/mcp/db.js +141 -0
  271. package/build/services/mcp/index.d.ts +25 -0
  272. package/build/services/mcp/index.js +47 -0
  273. package/build/services/mcp/playwright-server/index.d.ts +14 -0
  274. package/build/services/mcp/playwright-server/index.js +25 -0
  275. package/build/services/mcp/playwright-server/lifecycle.d.ts +7 -0
  276. package/build/services/mcp/playwright-server/lifecycle.js +63 -0
  277. package/build/services/mcp/playwright-server/schemas.d.ts +81 -0
  278. package/build/services/mcp/playwright-server/schemas.js +48 -0
  279. package/build/services/mcp/playwright-server/tools.d.ts +2 -0
  280. package/build/services/mcp/playwright-server/tools.js +224 -0
  281. package/build/services/mcp/server.d.ts +26 -0
  282. package/build/services/mcp/server.js +286 -0
  283. package/build/services/mcp/sql.d.ts +12 -0
  284. package/build/services/mcp/sql.js +59 -0
  285. package/build/services/mcp/types.d.ts +17 -0
  286. package/build/services/mcp/types.js +3 -0
  287. package/build/services/mcp/vision-server.d.ts +15 -0
  288. package/build/services/mcp/vision-server.js +214 -0
  289. package/build/services/mcp/workflow-compiler-server.d.ts +15 -0
  290. package/build/services/mcp/workflow-compiler-server.js +206 -0
  291. package/build/services/mcp/workflow-server.d.ts +24 -0
  292. package/build/services/mcp/workflow-server.js +230 -0
  293. package/build/services/mcp-runs/enrichment.d.ts +12 -0
  294. package/build/services/mcp-runs/enrichment.js +39 -0
  295. package/build/services/mcp-runs/events.d.ts +6 -0
  296. package/build/services/mcp-runs/events.js +126 -0
  297. package/build/services/mcp-runs/execution-builder.d.ts +12 -0
  298. package/build/services/mcp-runs/execution-builder.js +100 -0
  299. package/build/services/mcp-runs/index.d.ts +4 -0
  300. package/build/services/mcp-runs/index.js +8 -0
  301. package/build/services/mcp-runs/queries.d.ts +28 -0
  302. package/build/services/mcp-runs/queries.js +71 -0
  303. package/build/services/mcp-runs/sql.d.ts +4 -0
  304. package/build/services/mcp-runs/sql.js +17 -0
  305. package/build/services/mcp-runs/types.d.ts +65 -0
  306. package/build/services/mcp-runs/types.js +2 -0
  307. package/build/services/namespace/index.d.ts +17 -0
  308. package/build/services/namespace/index.js +41 -0
  309. package/build/services/namespace/sql.d.ts +4 -0
  310. package/build/services/namespace/sql.js +23 -0
  311. package/build/services/namespace/types.d.ts +11 -0
  312. package/build/services/namespace/types.js +3 -0
  313. package/build/services/oauth/crypto.d.ts +19 -0
  314. package/build/services/oauth/crypto.js +95 -0
  315. package/build/services/oauth/db.d.ts +20 -0
  316. package/build/services/oauth/db.js +140 -0
  317. package/build/services/oauth/index.d.ts +12 -0
  318. package/build/services/oauth/index.js +77 -0
  319. package/build/services/oauth/providers/anthropic.d.ts +3 -0
  320. package/build/services/oauth/providers/anthropic.js +111 -0
  321. package/build/services/oauth/providers/github.d.ts +3 -0
  322. package/build/services/oauth/providers/github.js +46 -0
  323. package/build/services/oauth/providers/google.d.ts +3 -0
  324. package/build/services/oauth/providers/google.js +44 -0
  325. package/build/services/oauth/providers/index.d.ts +2 -0
  326. package/build/services/oauth/providers/index.js +7 -0
  327. package/build/services/oauth/providers/microsoft.d.ts +3 -0
  328. package/build/services/oauth/providers/microsoft.js +46 -0
  329. package/build/services/oauth/providers/mock.d.ts +3 -0
  330. package/build/services/oauth/providers/mock.js +76 -0
  331. package/build/services/oauth/providers/registry.d.ts +8 -0
  332. package/build/services/oauth/providers/registry.js +46 -0
  333. package/build/services/oauth/providers/types.d.ts +13 -0
  334. package/build/services/oauth/providers/types.js +2 -0
  335. package/build/services/oauth/state.d.ts +30 -0
  336. package/build/services/oauth/state.js +83 -0
  337. package/build/services/orchestrator/index.d.ts +23 -0
  338. package/build/services/orchestrator/index.js +156 -0
  339. package/build/services/orchestrator/types.d.ts +15 -0
  340. package/build/services/orchestrator/types.js +3 -0
  341. package/build/services/role/index.d.ts +47 -0
  342. package/build/services/role/index.js +136 -0
  343. package/build/services/role/sql.d.ts +14 -0
  344. package/build/services/role/sql.js +80 -0
  345. package/build/services/role/types.d.ts +11 -0
  346. package/build/services/role/types.js +3 -0
  347. package/build/services/storage/index.d.ts +12 -0
  348. package/build/services/storage/index.js +31 -0
  349. package/build/services/storage/local.d.ts +26 -0
  350. package/build/services/storage/local.js +129 -0
  351. package/build/services/storage/s3.d.ts +31 -0
  352. package/build/services/storage/s3.js +180 -0
  353. package/build/services/storage/types.d.ts +41 -0
  354. package/build/services/storage/types.js +2 -0
  355. package/build/services/task/crud.d.ts +21 -0
  356. package/build/services/task/crud.js +123 -0
  357. package/build/services/task/index.d.ts +4 -0
  358. package/build/services/task/index.js +20 -0
  359. package/build/services/task/process.d.ts +14 -0
  360. package/build/services/task/process.js +98 -0
  361. package/build/services/task/resolve.d.ts +12 -0
  362. package/build/services/task/resolve.js +49 -0
  363. package/build/services/task/sql.d.ts +19 -0
  364. package/build/services/task/sql.js +92 -0
  365. package/build/services/task/types.d.ts +56 -0
  366. package/build/services/task/types.js +9 -0
  367. package/build/services/telemetry/honeycomb.d.ts +53 -0
  368. package/build/services/telemetry/honeycomb.js +79 -0
  369. package/build/services/telemetry/index.d.ts +46 -0
  370. package/build/services/telemetry/index.js +68 -0
  371. package/build/services/user/auth.d.ts +7 -0
  372. package/build/services/user/auth.js +26 -0
  373. package/build/services/user/crud.d.ts +19 -0
  374. package/build/services/user/crud.js +151 -0
  375. package/build/services/user/index.d.ts +5 -0
  376. package/build/services/user/index.js +26 -0
  377. package/build/services/user/rbac.d.ts +15 -0
  378. package/build/services/user/rbac.js +32 -0
  379. package/build/services/user/roles.d.ts +7 -0
  380. package/build/services/user/roles.js +42 -0
  381. package/build/services/user/sql.d.ts +22 -0
  382. package/build/services/user/sql.js +45 -0
  383. package/build/services/user/types.d.ts +23 -0
  384. package/build/services/user/types.js +4 -0
  385. package/build/services/workers/registry.d.ts +10 -0
  386. package/build/services/workers/registry.js +26 -0
  387. package/build/services/workflow-invocation.d.ts +46 -0
  388. package/build/services/workflow-invocation.js +184 -0
  389. package/build/services/yaml-workflow/db-utils.d.ts +25 -0
  390. package/build/services/yaml-workflow/db-utils.js +93 -0
  391. package/build/services/yaml-workflow/db.d.ts +27 -0
  392. package/build/services/yaml-workflow/db.js +196 -0
  393. package/build/services/yaml-workflow/deployer-helpers.d.ts +13 -0
  394. package/build/services/yaml-workflow/deployer-helpers.js +133 -0
  395. package/build/services/yaml-workflow/deployer.d.ts +54 -0
  396. package/build/services/yaml-workflow/deployer.js +203 -0
  397. package/build/services/yaml-workflow/generator.d.ts +21 -0
  398. package/build/services/yaml-workflow/generator.js +117 -0
  399. package/build/services/yaml-workflow/index.d.ts +4 -0
  400. package/build/services/yaml-workflow/index.js +20 -0
  401. package/build/services/yaml-workflow/input-analyzer-helpers.d.ts +48 -0
  402. package/build/services/yaml-workflow/input-analyzer-helpers.js +183 -0
  403. package/build/services/yaml-workflow/input-analyzer.d.ts +30 -0
  404. package/build/services/yaml-workflow/input-analyzer.js +109 -0
  405. package/build/services/yaml-workflow/pattern-detector/array-source.d.ts +22 -0
  406. package/build/services/yaml-workflow/pattern-detector/array-source.js +120 -0
  407. package/build/services/yaml-workflow/pattern-detector/collapse.d.ts +27 -0
  408. package/build/services/yaml-workflow/pattern-detector/collapse.js +92 -0
  409. package/build/services/yaml-workflow/pattern-detector/index.d.ts +18 -0
  410. package/build/services/yaml-workflow/pattern-detector/index.js +22 -0
  411. package/build/services/yaml-workflow/pattern-detector/run-detection.d.ts +28 -0
  412. package/build/services/yaml-workflow/pattern-detector/run-detection.js +81 -0
  413. package/build/services/yaml-workflow/pattern-detector/types.d.ts +29 -0
  414. package/build/services/yaml-workflow/pattern-detector/types.js +8 -0
  415. package/build/services/yaml-workflow/pipeline/analyze.d.ts +11 -0
  416. package/build/services/yaml-workflow/pipeline/analyze.js +64 -0
  417. package/build/services/yaml-workflow/pipeline/build/dag.d.ts +25 -0
  418. package/build/services/yaml-workflow/pipeline/build/dag.js +254 -0
  419. package/build/services/yaml-workflow/pipeline/build/index.d.ts +20 -0
  420. package/build/services/yaml-workflow/pipeline/build/index.js +115 -0
  421. package/build/services/yaml-workflow/pipeline/build/iteration.d.ts +25 -0
  422. package/build/services/yaml-workflow/pipeline/build/iteration.js +231 -0
  423. package/build/services/yaml-workflow/pipeline/build/metadata.d.ts +15 -0
  424. package/build/services/yaml-workflow/pipeline/build/metadata.js +126 -0
  425. package/build/services/yaml-workflow/pipeline/build/transform.d.ts +17 -0
  426. package/build/services/yaml-workflow/pipeline/build/transform.js +94 -0
  427. package/build/services/yaml-workflow/pipeline/build/utils.d.ts +22 -0
  428. package/build/services/yaml-workflow/pipeline/build/utils.js +129 -0
  429. package/build/services/yaml-workflow/pipeline/build/wiring.d.ts +9 -0
  430. package/build/services/yaml-workflow/pipeline/build/wiring.js +148 -0
  431. package/build/services/yaml-workflow/pipeline/compile/index.d.ts +17 -0
  432. package/build/services/yaml-workflow/pipeline/compile/index.js +64 -0
  433. package/build/services/yaml-workflow/pipeline/compile/llm-call.d.ts +14 -0
  434. package/build/services/yaml-workflow/pipeline/compile/llm-call.js +153 -0
  435. package/build/services/yaml-workflow/pipeline/compile/parse-plan.d.ts +12 -0
  436. package/build/services/yaml-workflow/pipeline/compile/parse-plan.js +88 -0
  437. package/build/services/yaml-workflow/pipeline/compile/summarize.d.ts +39 -0
  438. package/build/services/yaml-workflow/pipeline/compile/summarize.js +174 -0
  439. package/build/services/yaml-workflow/pipeline/extract-helpers.d.ts +42 -0
  440. package/build/services/yaml-workflow/pipeline/extract-helpers.js +88 -0
  441. package/build/services/yaml-workflow/pipeline/extract.d.ts +24 -0
  442. package/build/services/yaml-workflow/pipeline/extract.js +235 -0
  443. package/build/services/yaml-workflow/pipeline/prompts.d.ts +15 -0
  444. package/build/services/yaml-workflow/pipeline/prompts.js +254 -0
  445. package/build/services/yaml-workflow/pipeline/validate.d.ts +12 -0
  446. package/build/services/yaml-workflow/pipeline/validate.js +111 -0
  447. package/build/services/yaml-workflow/sql.d.ts +19 -0
  448. package/build/services/yaml-workflow/sql.js +83 -0
  449. package/build/services/yaml-workflow/types.d.ts +223 -0
  450. package/build/services/yaml-workflow/types.js +8 -0
  451. package/build/services/yaml-workflow/workers/callbacks.d.ts +17 -0
  452. package/build/services/yaml-workflow/workers/callbacks.js +194 -0
  453. package/build/services/yaml-workflow/workers/events.d.ts +7 -0
  454. package/build/services/yaml-workflow/workers/events.js +49 -0
  455. package/build/services/yaml-workflow/workers/index.d.ts +4 -0
  456. package/build/services/yaml-workflow/workers/index.js +15 -0
  457. package/build/services/yaml-workflow/workers/register.d.ts +15 -0
  458. package/build/services/yaml-workflow/workers/register.js +233 -0
  459. package/build/services/yaml-workflow/workers/scope.d.ts +13 -0
  460. package/build/services/yaml-workflow/workers/scope.js +37 -0
  461. package/build/start/adapters.d.ts +6 -0
  462. package/build/start/adapters.js +80 -0
  463. package/build/start/config.d.ts +10 -0
  464. package/build/start/config.js +88 -0
  465. package/build/start/index.d.ts +21 -0
  466. package/build/start/index.js +87 -0
  467. package/build/start/server.d.ts +6 -0
  468. package/build/start/server.js +46 -0
  469. package/build/start/workers.d.ts +32 -0
  470. package/build/start/workers.js +144 -0
  471. package/build/system/activities/claude-code.d.ts +56 -0
  472. package/build/system/activities/claude-code.js +258 -0
  473. package/build/system/activities/file-storage.d.ts +31 -0
  474. package/build/system/activities/file-storage.js +71 -0
  475. package/build/system/activities/http.d.ts +27 -0
  476. package/build/system/activities/http.js +56 -0
  477. package/build/system/activities/oauth.d.ts +39 -0
  478. package/build/system/activities/oauth.js +33 -0
  479. package/build/system/activities/triage/cache.d.ts +7 -0
  480. package/build/system/activities/triage/cache.js +10 -0
  481. package/build/system/activities/triage/context.d.ts +21 -0
  482. package/build/system/activities/triage/context.js +92 -0
  483. package/build/system/activities/triage/discovery.d.ts +25 -0
  484. package/build/system/activities/triage/discovery.js +170 -0
  485. package/build/system/activities/triage/index.d.ts +5 -0
  486. package/build/system/activities/triage/index.js +22 -0
  487. package/build/system/activities/triage/llm.d.ts +9 -0
  488. package/build/system/activities/triage/llm.js +34 -0
  489. package/build/system/activities/triage/tools.d.ts +24 -0
  490. package/build/system/activities/triage/tools.js +178 -0
  491. package/build/system/index.d.ts +16 -0
  492. package/build/system/index.js +100 -0
  493. package/build/system/mcp-servers/claude-code.d.ts +17 -0
  494. package/build/system/mcp-servers/claude-code.js +110 -0
  495. package/build/system/mcp-servers/db-query/index.d.ts +25 -0
  496. package/build/system/mcp-servers/db-query/index.js +49 -0
  497. package/build/system/mcp-servers/db-query/schemas.d.ts +52 -0
  498. package/build/system/mcp-servers/db-query/schemas.js +34 -0
  499. package/build/system/mcp-servers/db-query/tools.d.ts +5 -0
  500. package/build/system/mcp-servers/db-query/tools.js +224 -0
  501. package/build/system/mcp-servers/document-vision.d.ts +15 -0
  502. package/build/system/mcp-servers/document-vision.js +228 -0
  503. package/build/system/mcp-servers/file-storage.d.ts +4 -0
  504. package/build/system/mcp-servers/file-storage.js +101 -0
  505. package/build/system/mcp-servers/http-fetch.d.ts +4 -0
  506. package/build/system/mcp-servers/http-fetch.js +100 -0
  507. package/build/system/mcp-servers/human-queue.d.ts +26 -0
  508. package/build/system/mcp-servers/human-queue.js +287 -0
  509. package/build/system/mcp-servers/oauth.d.ts +11 -0
  510. package/build/system/mcp-servers/oauth.js +100 -0
  511. package/build/system/mcp-servers/playwright/browser-lifecycle.d.ts +26 -0
  512. package/build/system/mcp-servers/playwright/browser-lifecycle.js +125 -0
  513. package/build/system/mcp-servers/playwright/index.d.ts +25 -0
  514. package/build/system/mcp-servers/playwright/index.js +42 -0
  515. package/build/system/mcp-servers/playwright/schemas.d.ts +383 -0
  516. package/build/system/mcp-servers/playwright/schemas.js +87 -0
  517. package/build/system/mcp-servers/playwright/tools-atomic.d.ts +2 -0
  518. package/build/system/mcp-servers/playwright/tools-atomic.js +9 -0
  519. package/build/system/mcp-servers/playwright/tools-navigation.d.ts +2 -0
  520. package/build/system/mcp-servers/playwright/tools-navigation.js +140 -0
  521. package/build/system/mcp-servers/playwright/tools-page-interaction.d.ts +2 -0
  522. package/build/system/mcp-servers/playwright/tools-page-interaction.js +162 -0
  523. package/build/system/mcp-servers/playwright/tools-run-script.d.ts +2 -0
  524. package/build/system/mcp-servers/playwright/tools-run-script.js +190 -0
  525. package/build/system/mcp-servers/playwright/types.d.ts +8 -0
  526. package/build/system/mcp-servers/playwright/types.js +30 -0
  527. package/build/system/mcp-servers/playwright-cli/helpers.d.ts +11 -0
  528. package/build/system/mcp-servers/playwright-cli/helpers.js +20 -0
  529. package/build/system/mcp-servers/playwright-cli/index.d.ts +4 -0
  530. package/build/system/mcp-servers/playwright-cli/index.js +15 -0
  531. package/build/system/mcp-servers/playwright-cli/schemas.d.ts +219 -0
  532. package/build/system/mcp-servers/playwright-cli/schemas.js +75 -0
  533. package/build/system/mcp-servers/playwright-cli/tools-auth.d.ts +2 -0
  534. package/build/system/mcp-servers/playwright-cli/tools-auth.js +183 -0
  535. package/build/system/mcp-servers/playwright-cli/tools-capture.d.ts +2 -0
  536. package/build/system/mcp-servers/playwright-cli/tools-capture.js +267 -0
  537. package/build/system/mcp-servers/prompts.d.ts +4 -0
  538. package/build/system/mcp-servers/prompts.js +10 -0
  539. package/build/system/mcp-servers/workflow-compiler.d.ts +15 -0
  540. package/build/system/mcp-servers/workflow-compiler.js +230 -0
  541. package/build/system/mcp-servers/workflow.d.ts +24 -0
  542. package/build/system/mcp-servers/workflow.js +231 -0
  543. package/build/system/seed/index.d.ts +7 -0
  544. package/build/system/seed/index.js +36 -0
  545. package/build/system/seed/server-definitions.d.ts +1460 -0
  546. package/build/system/seed/server-definitions.js +160 -0
  547. package/build/system/seed/tool-manifests-browser.d.ts +577 -0
  548. package/build/system/seed/tool-manifests-browser.js +158 -0
  549. package/build/system/seed/tool-manifests-data.d.ts +322 -0
  550. package/build/system/seed/tool-manifests-data.js +173 -0
  551. package/build/system/seed/tool-manifests-escalation.d.ts +173 -0
  552. package/build/system/seed/tool-manifests-escalation.js +76 -0
  553. package/build/system/seed/tool-manifests-workflows.d.ts +211 -0
  554. package/build/system/seed/tool-manifests-workflows.js +136 -0
  555. package/build/system/workflows/mcp-deterministic/activities.d.ts +6 -0
  556. package/build/system/workflows/mcp-deterministic/activities.js +56 -0
  557. package/build/system/workflows/mcp-deterministic/index.d.ts +9 -0
  558. package/build/system/workflows/mcp-deterministic/index.js +72 -0
  559. package/build/system/workflows/mcp-query/activities/caches.d.ts +7 -0
  560. package/build/system/workflows/mcp-query/activities/caches.js +10 -0
  561. package/build/system/workflows/mcp-query/activities/discovery.d.ts +31 -0
  562. package/build/system/workflows/mcp-query/activities/discovery.js +172 -0
  563. package/build/system/workflows/mcp-query/activities/index.d.ts +4 -0
  564. package/build/system/workflows/mcp-query/activities/index.js +13 -0
  565. package/build/system/workflows/mcp-query/activities/llm.d.ts +8 -0
  566. package/build/system/workflows/mcp-query/activities/llm.js +33 -0
  567. package/build/system/workflows/mcp-query/activities/tool-executor.d.ts +5 -0
  568. package/build/system/workflows/mcp-query/activities/tool-executor.js +112 -0
  569. package/build/system/workflows/mcp-query/activities/tool-loader.d.ts +14 -0
  570. package/build/system/workflows/mcp-query/activities/tool-loader.js +93 -0
  571. package/build/system/workflows/mcp-query/index.d.ts +14 -0
  572. package/build/system/workflows/mcp-query/index.js +227 -0
  573. package/build/system/workflows/mcp-query/prompts.d.ts +4 -0
  574. package/build/system/workflows/mcp-query/prompts.js +101 -0
  575. package/build/system/workflows/mcp-query/strategy-advisors.d.ts +14 -0
  576. package/build/system/workflows/mcp-query/strategy-advisors.js +109 -0
  577. package/build/system/workflows/mcp-query/types.d.ts +10 -0
  578. package/build/system/workflows/mcp-query/types.js +3 -0
  579. package/build/system/workflows/mcp-query-router/activities.d.ts +6 -0
  580. package/build/system/workflows/mcp-query-router/activities.js +12 -0
  581. package/build/system/workflows/mcp-query-router/index.d.ts +13 -0
  582. package/build/system/workflows/mcp-query-router/index.js +107 -0
  583. package/build/system/workflows/mcp-query-router/prompts.d.ts +1 -0
  584. package/build/system/workflows/mcp-query-router/prompts.js +8 -0
  585. package/build/system/workflows/mcp-triage/index.d.ts +31 -0
  586. package/build/system/workflows/mcp-triage/index.js +222 -0
  587. package/build/system/workflows/mcp-triage/prompts.d.ts +7 -0
  588. package/build/system/workflows/mcp-triage/prompts.js +159 -0
  589. package/build/system/workflows/mcp-triage/response-builders.d.ts +17 -0
  590. package/build/system/workflows/mcp-triage/response-builders.js +96 -0
  591. package/build/system/workflows/mcp-triage/response.d.ts +8 -0
  592. package/build/system/workflows/mcp-triage/response.js +157 -0
  593. package/build/system/workflows/mcp-triage/types.d.ts +20 -0
  594. package/build/system/workflows/mcp-triage/types.js +3 -0
  595. package/build/system/workflows/mcp-triage-deterministic/activities.d.ts +4 -0
  596. package/build/system/workflows/mcp-triage-deterministic/activities.js +8 -0
  597. package/build/system/workflows/mcp-triage-deterministic/index.d.ts +12 -0
  598. package/build/system/workflows/mcp-triage-deterministic/index.js +83 -0
  599. package/build/system/workflows/mcp-triage-router/activities.d.ts +9 -0
  600. package/build/system/workflows/mcp-triage-router/activities.js +15 -0
  601. package/build/system/workflows/mcp-triage-router/index.d.ts +13 -0
  602. package/build/system/workflows/mcp-triage-router/index.js +122 -0
  603. package/build/tsconfig.tsbuildinfo +1 -0
  604. package/build/types/auth.d.ts +34 -0
  605. package/build/types/auth.js +2 -0
  606. package/build/types/config.d.ts +48 -0
  607. package/build/types/config.js +2 -0
  608. package/build/types/delegation.d.ts +41 -0
  609. package/build/types/delegation.js +2 -0
  610. package/build/types/discovery.d.ts +12 -0
  611. package/build/types/discovery.js +3 -0
  612. package/build/types/envelope.d.ts +53 -0
  613. package/build/types/envelope.js +2 -0
  614. package/build/types/escalation-strategy.d.ts +37 -0
  615. package/build/types/escalation-strategy.js +2 -0
  616. package/build/types/escalation.d.ts +39 -0
  617. package/build/types/escalation.js +21 -0
  618. package/build/types/events.d.ts +65 -0
  619. package/build/types/events.js +2 -0
  620. package/build/types/export.d.ts +78 -0
  621. package/build/types/export.js +11 -0
  622. package/build/types/index.d.ts +21 -0
  623. package/build/types/index.js +6 -0
  624. package/build/types/logger.d.ts +26 -0
  625. package/build/types/logger.js +2 -0
  626. package/build/types/maintenance.d.ts +24 -0
  627. package/build/types/maintenance.js +2 -0
  628. package/build/types/mcp.d.ts +80 -0
  629. package/build/types/mcp.js +2 -0
  630. package/build/types/oauth.d.ts +74 -0
  631. package/build/types/oauth.js +2 -0
  632. package/build/types/startup.d.ts +110 -0
  633. package/build/types/startup.js +2 -0
  634. package/build/types/task.d.ts +39 -0
  635. package/build/types/task.js +2 -0
  636. package/build/types/telemetry.d.ts +32 -0
  637. package/build/types/telemetry.js +2 -0
  638. package/build/types/tool-context.d.ts +68 -0
  639. package/build/types/tool-context.js +14 -0
  640. package/build/types/user.d.ts +18 -0
  641. package/build/types/user.js +2 -0
  642. package/build/types/workflow.d.ts +35 -0
  643. package/build/types/workflow.js +2 -0
  644. package/build/types/yaml-workflow.d.ts +101 -0
  645. package/build/types/yaml-workflow.js +5 -0
  646. package/build/vitest.config.d.ts +2 -0
  647. package/build/vitest.config.js +32 -0
  648. package/build/vitest.integration.config.d.ts +2 -0
  649. package/build/vitest.integration.config.js +25 -0
  650. package/build/workers/index.d.ts +6 -0
  651. package/build/workers/index.js +20 -0
  652. package/dashboard/dist/assets/AdminDashboard-jfacvOC7.js +2 -0
  653. package/dashboard/dist/assets/AdminDashboard-jfacvOC7.js.map +1 -0
  654. package/dashboard/dist/assets/AvailableEscalationsPage-BglLDoT8.js +2 -0
  655. package/dashboard/dist/assets/AvailableEscalationsPage-BglLDoT8.js.map +1 -0
  656. package/dashboard/dist/assets/BotPicker-D6FYW1Gt.js +2 -0
  657. package/dashboard/dist/assets/BotPicker-D6FYW1Gt.js.map +1 -0
  658. package/dashboard/dist/assets/CollapsibleSection-Cxk4wvjT.js +2 -0
  659. package/dashboard/dist/assets/CollapsibleSection-Cxk4wvjT.js.map +1 -0
  660. package/dashboard/dist/assets/ConfirmDeleteModal-FSXyKjaB.js +2 -0
  661. package/dashboard/dist/assets/ConfirmDeleteModal-FSXyKjaB.js.map +1 -0
  662. package/dashboard/dist/assets/CopyableId-CBdxWfp8.js +2 -0
  663. package/dashboard/dist/assets/CopyableId-CBdxWfp8.js.map +1 -0
  664. package/dashboard/dist/assets/CredentialsPage-Ikzsot0w.js +2 -0
  665. package/dashboard/dist/assets/CredentialsPage-Ikzsot0w.js.map +1 -0
  666. package/dashboard/dist/assets/CustomDurationPicker-CAninCbl.js +2 -0
  667. package/dashboard/dist/assets/CustomDurationPicker-CAninCbl.js.map +1 -0
  668. package/dashboard/dist/assets/DataTable-BDn1WBHS.js +2 -0
  669. package/dashboard/dist/assets/DataTable-BDn1WBHS.js.map +1 -0
  670. package/dashboard/dist/assets/EmptyState-2CmV-IaS.js +2 -0
  671. package/dashboard/dist/assets/EmptyState-2CmV-IaS.js.map +1 -0
  672. package/dashboard/dist/assets/EscalationsOverview-GXYFPASS.js +2 -0
  673. package/dashboard/dist/assets/EscalationsOverview-GXYFPASS.js.map +1 -0
  674. package/dashboard/dist/assets/EventTable-B01oJf6Y.js +2 -0
  675. package/dashboard/dist/assets/EventTable-B01oJf6Y.js.map +1 -0
  676. package/dashboard/dist/assets/Field-DuFBAYhu.js +2 -0
  677. package/dashboard/dist/assets/Field-DuFBAYhu.js.map +1 -0
  678. package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js +2 -0
  679. package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js.map +1 -0
  680. package/dashboard/dist/assets/McpOverview-JkvRcX2e.js +2 -0
  681. package/dashboard/dist/assets/McpOverview-JkvRcX2e.js.map +1 -0
  682. package/dashboard/dist/assets/McpQueryDetailPage-CUMqhQdS.js +2 -0
  683. package/dashboard/dist/assets/McpQueryDetailPage-CUMqhQdS.js.map +1 -0
  684. package/dashboard/dist/assets/McpQueryPage-DRRhw4nN.js +2 -0
  685. package/dashboard/dist/assets/McpQueryPage-DRRhw4nN.js.map +1 -0
  686. package/dashboard/dist/assets/McpRunDetailPage-CmPs5EvE.js +2 -0
  687. package/dashboard/dist/assets/McpRunDetailPage-CmPs5EvE.js.map +1 -0
  688. package/dashboard/dist/assets/McpRunsPage-Dl5Y2u6k.js +2 -0
  689. package/dashboard/dist/assets/McpRunsPage-Dl5Y2u6k.js.map +1 -0
  690. package/dashboard/dist/assets/Modal-B4rbIVAn.js +2 -0
  691. package/dashboard/dist/assets/Modal-B4rbIVAn.js.map +1 -0
  692. package/dashboard/dist/assets/OperatorDashboard-B56il28q.js +2 -0
  693. package/dashboard/dist/assets/OperatorDashboard-B56il28q.js.map +1 -0
  694. package/dashboard/dist/assets/PageHeader-CpWFly5S.js +2 -0
  695. package/dashboard/dist/assets/PageHeader-CpWFly5S.js.map +1 -0
  696. package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js +2 -0
  697. package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js.map +1 -0
  698. package/dashboard/dist/assets/ProcessDetailPage-CMLq4M7D.js +2 -0
  699. package/dashboard/dist/assets/ProcessDetailPage-CMLq4M7D.js.map +1 -0
  700. package/dashboard/dist/assets/ProcessesListPage-CZ_HF06v.js +2 -0
  701. package/dashboard/dist/assets/ProcessesListPage-CZ_HF06v.js.map +1 -0
  702. package/dashboard/dist/assets/RolePill-BTPa8L-P.js +2 -0
  703. package/dashboard/dist/assets/RolePill-BTPa8L-P.js.map +1 -0
  704. package/dashboard/dist/assets/RolesPage-9grZW7yR.js +2 -0
  705. package/dashboard/dist/assets/RolesPage-9grZW7yR.js.map +1 -0
  706. package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js +2 -0
  707. package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js.map +1 -0
  708. package/dashboard/dist/assets/SimpleMarkdown-CBlvaWP4.js +4 -0
  709. package/dashboard/dist/assets/SimpleMarkdown-CBlvaWP4.js.map +1 -0
  710. package/dashboard/dist/assets/StatCard-DlgF0CJC.js +2 -0
  711. package/dashboard/dist/assets/StatCard-DlgF0CJC.js.map +1 -0
  712. package/dashboard/dist/assets/StatusBadge-TlC4jiig.js +2 -0
  713. package/dashboard/dist/assets/StatusBadge-TlC4jiig.js.map +1 -0
  714. package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js +2 -0
  715. package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js.map +1 -0
  716. package/dashboard/dist/assets/SwimlaneTimeline-7SiwATsZ.js +2 -0
  717. package/dashboard/dist/assets/SwimlaneTimeline-7SiwATsZ.js.map +1 -0
  718. package/dashboard/dist/assets/TaskDetailPage-CbPVTakt.js +2 -0
  719. package/dashboard/dist/assets/TaskDetailPage-CbPVTakt.js.map +1 -0
  720. package/dashboard/dist/assets/TaskQueuePill-awmtb0qw.js +2 -0
  721. package/dashboard/dist/assets/TaskQueuePill-awmtb0qw.js.map +1 -0
  722. package/dashboard/dist/assets/TasksListPage-C_QF23c1.js +2 -0
  723. package/dashboard/dist/assets/TasksListPage-C_QF23c1.js.map +1 -0
  724. package/dashboard/dist/assets/TimeAgo-UPG6DoH8.js +2 -0
  725. package/dashboard/dist/assets/TimeAgo-UPG6DoH8.js.map +1 -0
  726. package/dashboard/dist/assets/TimestampCell-DoWMKg6w.js +2 -0
  727. package/dashboard/dist/assets/TimestampCell-DoWMKg6w.js.map +1 -0
  728. package/dashboard/dist/assets/UserName-DaP4YAKr.js +2 -0
  729. package/dashboard/dist/assets/UserName-DaP4YAKr.js.map +1 -0
  730. package/dashboard/dist/assets/VersionHistory-Bt7WBr6m.js +5 -0
  731. package/dashboard/dist/assets/VersionHistory-Bt7WBr6m.js.map +1 -0
  732. package/dashboard/dist/assets/WorkflowExecutionPage-DjtAQ3hy.js +2 -0
  733. package/dashboard/dist/assets/WorkflowExecutionPage-DjtAQ3hy.js.map +1 -0
  734. package/dashboard/dist/assets/WorkflowPill-CCDSVaQj.js +2 -0
  735. package/dashboard/dist/assets/WorkflowPill-CCDSVaQj.js.map +1 -0
  736. package/dashboard/dist/assets/WorkflowsDashboard-D8z9uBNB.js +2 -0
  737. package/dashboard/dist/assets/WorkflowsDashboard-D8z9uBNB.js.map +1 -0
  738. package/dashboard/dist/assets/WorkflowsOverview-D9OzzQqw.js +2 -0
  739. package/dashboard/dist/assets/WorkflowsOverview-D9OzzQqw.js.map +1 -0
  740. package/dashboard/dist/assets/YamlWorkflowDetailPage-DrDvvP62.js +3 -0
  741. package/dashboard/dist/assets/YamlWorkflowDetailPage-DrDvvP62.js.map +1 -0
  742. package/dashboard/dist/assets/YamlWorkflowsPage-COqiNCQK.js +2 -0
  743. package/dashboard/dist/assets/YamlWorkflowsPage-COqiNCQK.js.map +1 -0
  744. package/dashboard/dist/assets/bots-BkKVMbUW.js +2 -0
  745. package/dashboard/dist/assets/bots-BkKVMbUW.js.map +1 -0
  746. package/dashboard/dist/assets/constants-CgaZfe5d.js +2 -0
  747. package/dashboard/dist/assets/constants-CgaZfe5d.js.map +1 -0
  748. package/dashboard/dist/assets/escalation-columns-D6aqStaY.js +2 -0
  749. package/dashboard/dist/assets/escalation-columns-D6aqStaY.js.map +1 -0
  750. package/dashboard/dist/assets/escalation-qalymbKB.js +2 -0
  751. package/dashboard/dist/assets/escalation-qalymbKB.js.map +1 -0
  752. package/dashboard/dist/assets/format-gXZXQ-HJ.js +2 -0
  753. package/dashboard/dist/assets/format-gXZXQ-HJ.js.map +1 -0
  754. package/dashboard/dist/assets/helpers-0gSleuzT.js +2 -0
  755. package/dashboard/dist/assets/helpers-0gSleuzT.js.map +1 -0
  756. package/dashboard/dist/assets/index-BWvMHed7.js +6 -0
  757. package/dashboard/dist/assets/index-BWvMHed7.js.map +1 -0
  758. package/dashboard/dist/assets/index-BaszoPO_.css +1 -0
  759. package/dashboard/dist/assets/index-Cn2jyj9A.js +2 -0
  760. package/dashboard/dist/assets/index-Cn2jyj9A.js.map +1 -0
  761. package/dashboard/dist/assets/index-D8VH6K8B.js +54 -0
  762. package/dashboard/dist/assets/index-D8VH6K8B.js.map +1 -0
  763. package/dashboard/dist/assets/index-D9SYwJsi.js +3 -0
  764. package/dashboard/dist/assets/index-D9SYwJsi.js.map +1 -0
  765. package/dashboard/dist/assets/index-DTPzZr_X.js +2 -0
  766. package/dashboard/dist/assets/index-DTPzZr_X.js.map +1 -0
  767. package/dashboard/dist/assets/index-D_6AB5BE.js +2 -0
  768. package/dashboard/dist/assets/index-D_6AB5BE.js.map +1 -0
  769. package/dashboard/dist/assets/index-S9Ks2Lj2.js +2 -0
  770. package/dashboard/dist/assets/index-S9Ks2Lj2.js.map +1 -0
  771. package/dashboard/dist/assets/index-X85K5bHC.js +17 -0
  772. package/dashboard/dist/assets/index-X85K5bHC.js.map +1 -0
  773. package/dashboard/dist/assets/index-rjmgHlSH.js +2 -0
  774. package/dashboard/dist/assets/index-rjmgHlSH.js.map +1 -0
  775. package/dashboard/dist/assets/mcp-blCW6IL7.js +2 -0
  776. package/dashboard/dist/assets/mcp-blCW6IL7.js.map +1 -0
  777. package/dashboard/dist/assets/mcp-query-DoAyPbjC.js +2 -0
  778. package/dashboard/dist/assets/mcp-query-DoAyPbjC.js.map +1 -0
  779. package/dashboard/dist/assets/mcp-runs-ChPbpvXK.js +2 -0
  780. package/dashboard/dist/assets/mcp-runs-ChPbpvXK.js.map +1 -0
  781. package/dashboard/dist/assets/namespaces-BgbaC3ow.js +2 -0
  782. package/dashboard/dist/assets/namespaces-BgbaC3ow.js.map +1 -0
  783. package/dashboard/dist/assets/roles-ZNrqqnQl.js +2 -0
  784. package/dashboard/dist/assets/roles-ZNrqqnQl.js.map +1 -0
  785. package/dashboard/dist/assets/settings-eBRSE0mQ.js +2 -0
  786. package/dashboard/dist/assets/settings-eBRSE0mQ.js.map +1 -0
  787. package/dashboard/dist/assets/tasks-tRqClPns.js +2 -0
  788. package/dashboard/dist/assets/tasks-tRqClPns.js.map +1 -0
  789. package/dashboard/dist/assets/useFilterParams-BaXUAkYK.js +2 -0
  790. package/dashboard/dist/assets/useFilterParams-BaXUAkYK.js.map +1 -0
  791. package/dashboard/dist/assets/useNatsEvents-Xr43X1fG.js +2 -0
  792. package/dashboard/dist/assets/useNatsEvents-Xr43X1fG.js.map +1 -0
  793. package/dashboard/dist/assets/useYamlActivityEvents-BO51u8tm.js +2 -0
  794. package/dashboard/dist/assets/useYamlActivityEvents-BO51u8tm.js.map +1 -0
  795. package/dashboard/dist/assets/users-tMvNyOo8.js +2 -0
  796. package/dashboard/dist/assets/users-tMvNyOo8.js.map +1 -0
  797. package/dashboard/dist/assets/vendor-icons-ZTAKVwGc.js +292 -0
  798. package/dashboard/dist/assets/vendor-icons-ZTAKVwGc.js.map +1 -0
  799. package/dashboard/dist/assets/vendor-query-B2UbickB.js +18 -0
  800. package/dashboard/dist/assets/vendor-query-B2UbickB.js.map +1 -0
  801. package/dashboard/dist/assets/vendor-react-Cw8Gy8NJ.js +22 -0
  802. package/dashboard/dist/assets/vendor-react-Cw8Gy8NJ.js.map +1 -0
  803. package/dashboard/dist/assets/workflows-Cc4VHcrp.js +2 -0
  804. package/dashboard/dist/assets/workflows-Cc4VHcrp.js.map +1 -0
  805. package/dashboard/dist/assets/yaml-workflows-BL4V5CQy.js +2 -0
  806. package/dashboard/dist/assets/yaml-workflows-BL4V5CQy.js.map +1 -0
  807. package/dashboard/dist/index.html +20 -0
  808. package/dashboard/dist/logo512.png +0 -0
  809. package/package.json +96 -0
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ /**
3
+ * Semantic input extraction for YAML workflow generator.
4
+ *
5
+ * Analyzes all steps from an execution and classifies each argument as:
6
+ * - **dynamic**: user-provided at invocation time (e.g., url, query, password)
7
+ * - **fixed**: implementation detail with a sensible default (e.g., selector, timeout)
8
+ * - **wired**: inter-step data from previous step output (e.g., page_id, content)
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.classifyArgument = void 0;
12
+ exports.extractSemanticInputs = extractSemanticInputs;
13
+ exports.buildEnrichedInputSchema = buildEnrichedInputSchema;
14
+ const input_analyzer_helpers_1 = require("./input-analyzer-helpers");
15
+ // Re-export everything from helpers so existing consumers are unaffected
16
+ var input_analyzer_helpers_2 = require("./input-analyzer-helpers");
17
+ Object.defineProperty(exports, "classifyArgument", { enumerable: true, get: function () { return input_analyzer_helpers_2.classifyArgument; } });
18
+ /**
19
+ * Scan ALL steps from an execution and return classified `InputFieldMeta[]`.
20
+ *
21
+ * - Iterates every step's arguments and classifies each key
22
+ * - Deduplicates by key (first occurrence wins)
23
+ * - Skips wired arguments (they come from step chaining)
24
+ * - Flattens nested objects that contain dynamic keys
25
+ * - Caps large defaults (arrays, objects) to prevent hardcoded execution data
26
+ * - Enhances descriptions using the original prompt where possible
27
+ */
28
+ function extractSemanticInputs(steps, originalPrompt) {
29
+ const seen = new Map();
30
+ for (let i = 0; i < steps.length; i++) {
31
+ const step = steps[i];
32
+ if (step.kind !== 'tool')
33
+ continue;
34
+ for (const [key, value] of Object.entries(step.arguments)) {
35
+ if (key === '_iteration')
36
+ continue;
37
+ // First occurrence wins
38
+ if (seen.has(key))
39
+ continue;
40
+ const classification = (0, input_analyzer_helpers_1.classifyArgument)(key, value, {
41
+ stepIndex: i,
42
+ toolName: step.toolName,
43
+ });
44
+ // Skip wired arguments — they come from step chaining
45
+ if (classification === 'wired')
46
+ continue;
47
+ // Flatten nested objects that contain dynamic keys.
48
+ // e.g., login: { url, username, password } → login_url, username, password
49
+ if (classification === 'dynamic' && value && typeof value === 'object' && !Array.isArray(value)) {
50
+ (0, input_analyzer_helpers_1.flattenDynamicObject)(key, value, i, step.toolName, originalPrompt, seen);
51
+ continue;
52
+ }
53
+ let description = (0, input_analyzer_helpers_1.humanize)(key);
54
+ // Enhance description from original prompt if the value appears in it
55
+ if (originalPrompt && value !== null && value !== undefined) {
56
+ const valueStr = String(value);
57
+ if (valueStr.length > 2 && valueStr.length < 200 && originalPrompt.includes(valueStr)) {
58
+ description += ` (from prompt: "${valueStr}")`;
59
+ }
60
+ }
61
+ // Cap defaults for large arrays/objects — they're execution-specific data
62
+ const cappedDefault = classification === 'fixed' ? (0, input_analyzer_helpers_1.capDefault)(value) : undefined;
63
+ seen.set(key, {
64
+ key,
65
+ type: (0, input_analyzer_helpers_1.inferType)(value),
66
+ ...(cappedDefault !== undefined ? { default: cappedDefault } : {}),
67
+ description,
68
+ classification,
69
+ source_step_index: i,
70
+ source_tool: step.toolName,
71
+ });
72
+ }
73
+ }
74
+ return Array.from(seen.values());
75
+ }
76
+ /**
77
+ * Build a JSON Schema from classified input field metadata.
78
+ *
79
+ * - `dynamic` fields become required properties (no default — user must provide)
80
+ * - `fixed` fields become optional properties with defaults from the execution
81
+ */
82
+ function buildEnrichedInputSchema(fieldMeta) {
83
+ if (fieldMeta.length === 0) {
84
+ return { type: 'object' };
85
+ }
86
+ const properties = {};
87
+ const required = [];
88
+ for (const field of fieldMeta) {
89
+ const prop = {
90
+ type: field.type,
91
+ description: field.description,
92
+ };
93
+ if (field.classification === 'dynamic') {
94
+ required.push(field.key);
95
+ }
96
+ else if (field.classification === 'fixed' && field.default !== undefined) {
97
+ prop.default = field.default;
98
+ }
99
+ properties[field.key] = prop;
100
+ }
101
+ const schema = {
102
+ type: 'object',
103
+ properties,
104
+ };
105
+ if (required.length > 0) {
106
+ schema.required = required;
107
+ }
108
+ return schema;
109
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Array source detection for iteration patterns.
3
+ *
4
+ * Locates prior step results that contain arrays matching the
5
+ * iteration data, using key-overlap and length-match strategies.
6
+ */
7
+ import type { ExtractedStepLike } from './types';
8
+ /**
9
+ * Find a prior step whose result contains an array field that is the likely
10
+ * data source for the iteration. Uses two strategies:
11
+ *
12
+ * 1. **Key overlap**: Array items have keys matching the iteration's varying keys
13
+ * (e.g., links[].href matches the varying key `url`)
14
+ * 2. **Length match**: Array length matches the run length (fallback)
15
+ *
16
+ * Searches recursively through nested objects, returning a dot-path
17
+ * (e.g., "links") so the YAML mapping references the correct depth.
18
+ */
19
+ export declare function findArraySource(steps: ExtractedStepLike[], runStartIndex: number, runLength: number, varyingKeys?: string[]): {
20
+ stepIndex: number;
21
+ fieldName: string;
22
+ } | null;
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ /**
3
+ * Array source detection for iteration patterns.
4
+ *
5
+ * Locates prior step results that contain arrays matching the
6
+ * iteration data, using key-overlap and length-match strategies.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.findArraySource = findArraySource;
10
+ /**
11
+ * Find a prior step whose result contains an array field that is the likely
12
+ * data source for the iteration. Uses two strategies:
13
+ *
14
+ * 1. **Key overlap**: Array items have keys matching the iteration's varying keys
15
+ * (e.g., links[].href matches the varying key `url`)
16
+ * 2. **Length match**: Array length matches the run length (fallback)
17
+ *
18
+ * Searches recursively through nested objects, returning a dot-path
19
+ * (e.g., "links") so the YAML mapping references the correct depth.
20
+ */
21
+ function findArraySource(steps, runStartIndex, runLength, varyingKeys) {
22
+ // Strategy 1: Find array whose items have keys overlapping with varying keys
23
+ if (varyingKeys && varyingKeys.length > 0) {
24
+ for (let i = runStartIndex - 1; i >= 0; i--) {
25
+ const result = steps[i].result;
26
+ if (!result || typeof result !== 'object' || Array.isArray(result))
27
+ continue;
28
+ const path = findArrayByKeyOverlap(result, varyingKeys, '');
29
+ if (path) {
30
+ return { stepIndex: i, fieldName: path };
31
+ }
32
+ }
33
+ }
34
+ // Strategy 2: Exact length match (fallback)
35
+ for (let i = runStartIndex - 1; i >= 0; i--) {
36
+ const result = steps[i].result;
37
+ if (!result || typeof result !== 'object' || Array.isArray(result))
38
+ continue;
39
+ const path = findArrayByLength(result, runLength, '');
40
+ if (path) {
41
+ return { stepIndex: i, fieldName: path };
42
+ }
43
+ }
44
+ return null;
45
+ }
46
+ /**
47
+ * Find an array whose items contain keys that overlap with the iteration's
48
+ * varying keys. For example, if varying keys are ['url', 'screenshot_path']
49
+ * and a prior step returned { links: [{ text, href }, ...] }, the 'href'
50
+ * key semantically matches 'url'. Returns the dot-path to the array.
51
+ */
52
+ function findArrayByKeyOverlap(obj, varyingKeys, prefix, maxDepth = 3) {
53
+ if (maxDepth <= 0)
54
+ return null;
55
+ for (const [key, value] of Object.entries(obj)) {
56
+ if (Array.isArray(value) && value.length > 0) {
57
+ const firstItem = value[0];
58
+ if (firstItem && typeof firstItem === 'object' && !Array.isArray(firstItem)) {
59
+ const itemKeys = Object.keys(firstItem);
60
+ // Check if item keys overlap with varying keys or their semantic equivalents
61
+ const hasOverlap = varyingKeys.some(vk => itemKeys.includes(vk) ||
62
+ itemKeys.some(ik => keysAreSemanticallyRelated(vk, ik)));
63
+ if (hasOverlap) {
64
+ return prefix ? `${prefix}.${key}` : key;
65
+ }
66
+ }
67
+ }
68
+ }
69
+ // Recurse into nested objects
70
+ for (const [key, value] of Object.entries(obj)) {
71
+ if (value && typeof value === 'object' && !Array.isArray(value)) {
72
+ const nested = findArrayByKeyOverlap(value, varyingKeys, prefix ? `${prefix}.${key}` : key, maxDepth - 1);
73
+ if (nested)
74
+ return nested;
75
+ }
76
+ }
77
+ return null;
78
+ }
79
+ /**
80
+ * Check if two keys are semantically related.
81
+ * E.g., 'url' and 'href', 'path' and 'screenshot_path'.
82
+ */
83
+ function keysAreSemanticallyRelated(a, b) {
84
+ const la = a.toLowerCase();
85
+ const lb = b.toLowerCase();
86
+ // One contains the other
87
+ if (la.includes(lb) || lb.includes(la))
88
+ return true;
89
+ // URL-like equivalences
90
+ const urlKeys = ['url', 'href', 'link', 'src'];
91
+ if (urlKeys.includes(la) && urlKeys.includes(lb))
92
+ return true;
93
+ // Path-like equivalences
94
+ const pathKeys = ['path', 'file', 'filepath', 'filename'];
95
+ if (pathKeys.some(p => la.includes(p)) && pathKeys.some(p => lb.includes(p)))
96
+ return true;
97
+ // Name/label equivalences (nav link text often maps to filenames)
98
+ const nameKeys = ['name', 'text', 'label', 'title'];
99
+ if (nameKeys.includes(la) && nameKeys.includes(lb))
100
+ return true;
101
+ return false;
102
+ }
103
+ /** Find an array by exact length match (fallback strategy). */
104
+ function findArrayByLength(obj, targetLength, prefix, maxDepth = 3) {
105
+ if (maxDepth <= 0)
106
+ return null;
107
+ for (const [key, value] of Object.entries(obj)) {
108
+ if (Array.isArray(value) && value.length === targetLength) {
109
+ return prefix ? `${prefix}.${key}` : key;
110
+ }
111
+ }
112
+ for (const [key, value] of Object.entries(obj)) {
113
+ if (value && typeof value === 'object' && !Array.isArray(value)) {
114
+ const nested = findArrayByLength(value, targetLength, prefix ? `${prefix}.${key}` : key, maxDepth - 1);
115
+ if (nested)
116
+ return nested;
117
+ }
118
+ }
119
+ return null;
120
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Iteration pattern collapse and detection.
3
+ *
4
+ * Collapses runs of repeated tool calls into single batch steps
5
+ * with iteration metadata, and detects structural patterns for
6
+ * informational annotation.
7
+ */
8
+ import type { ExtractedStepLike, PatternAnnotation } from './types';
9
+ /**
10
+ * Collapse iteration patterns in the step sequence.
11
+ *
12
+ * Detects runs of 3+ consecutive calls to the same tool, analyzes
13
+ * which arguments vary vs. stay constant, and replaces the run with
14
+ * a single step that carries _iteration metadata.
15
+ *
16
+ * The YAML generator reads this annotation to produce either:
17
+ * - A batch tool call (if the tool accepts arrays)
18
+ * - A cycle/hook pattern (if iteration must happen in the graph)
19
+ *
20
+ * This function is entirely tool-agnostic -- it knows nothing about
21
+ * playwright, screenshots, or any specific MCP server.
22
+ */
23
+ export declare function collapseIterationPatterns(steps: ExtractedStepLike[]): ExtractedStepLike[];
24
+ /**
25
+ * Detect structural patterns and return annotations (informational).
26
+ */
27
+ export declare function detectPatterns(steps: ExtractedStepLike[]): PatternAnnotation[];
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ /**
3
+ * Iteration pattern collapse and detection.
4
+ *
5
+ * Collapses runs of repeated tool calls into single batch steps
6
+ * with iteration metadata, and detects structural patterns for
7
+ * informational annotation.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.collapseIterationPatterns = collapseIterationPatterns;
11
+ exports.detectPatterns = detectPatterns;
12
+ const run_detection_1 = require("./run-detection");
13
+ const array_source_1 = require("./array-source");
14
+ /**
15
+ * Collapse iteration patterns in the step sequence.
16
+ *
17
+ * Detects runs of 3+ consecutive calls to the same tool, analyzes
18
+ * which arguments vary vs. stay constant, and replaces the run with
19
+ * a single step that carries _iteration metadata.
20
+ *
21
+ * The YAML generator reads this annotation to produce either:
22
+ * - A batch tool call (if the tool accepts arrays)
23
+ * - A cycle/hook pattern (if iteration must happen in the graph)
24
+ *
25
+ * This function is entirely tool-agnostic -- it knows nothing about
26
+ * playwright, screenshots, or any specific MCP server.
27
+ */
28
+ function collapseIterationPatterns(steps) {
29
+ const runs = (0, run_detection_1.findConsecutiveRuns)(steps);
30
+ if (runs.length === 0)
31
+ return steps;
32
+ const result = [];
33
+ let cursor = 0;
34
+ for (const run of runs) {
35
+ // Add all steps before this run
36
+ while (cursor < run.startIndex) {
37
+ result.push(steps[cursor]);
38
+ cursor++;
39
+ }
40
+ const { varying, constant, items } = (0, run_detection_1.classifyRunArguments)(run.steps);
41
+ const arraySource = (0, array_source_1.findArraySource)(steps, run.startIndex, run.steps.length, varying);
42
+ // Create a collapsed step with iteration metadata
43
+ const collapsedArgs = {
44
+ ...constant,
45
+ _iteration: {
46
+ tool: run.toolName,
47
+ server: run.serverId,
48
+ items,
49
+ varyingKeys: varying,
50
+ constantArgs: constant,
51
+ arraySource: arraySource
52
+ ? { stepIndex: arraySource.stepIndex, field: arraySource.fieldName }
53
+ : null,
54
+ count: run.steps.length,
55
+ },
56
+ };
57
+ const lastResult = run.steps[run.steps.length - 1].result;
58
+ result.push({
59
+ kind: 'tool',
60
+ toolName: `${run.toolName}_batch`,
61
+ arguments: collapsedArgs,
62
+ result: lastResult,
63
+ source: run.steps[0].source,
64
+ mcpServerId: run.serverId,
65
+ });
66
+ cursor = run.endIndex;
67
+ }
68
+ while (cursor < steps.length) {
69
+ result.push(steps[cursor]);
70
+ cursor++;
71
+ }
72
+ return result;
73
+ }
74
+ /**
75
+ * Detect structural patterns and return annotations (informational).
76
+ */
77
+ function detectPatterns(steps) {
78
+ const runs = (0, run_detection_1.findConsecutiveRuns)(steps);
79
+ return runs.map(run => {
80
+ const { varying, constant } = (0, run_detection_1.classifyRunArguments)(run.steps);
81
+ const arraySource = (0, array_source_1.findArraySource)(steps, run.startIndex, run.steps.length);
82
+ return {
83
+ type: 'iteration',
84
+ toolName: run.toolName,
85
+ runStartIndex: run.startIndex,
86
+ iterationCount: run.steps.length,
87
+ varyingKeys: varying,
88
+ constantKeys: Object.keys(constant),
89
+ arraySource,
90
+ };
91
+ });
92
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Pattern detection for YAML workflow generation.
3
+ *
4
+ * Analyzes extracted step sequences to detect higher-order structural
5
+ * patterns -- entirely tool-agnostic. The detector recognizes shapes
6
+ * in the call flow (iteration, repetition) and collapses them into
7
+ * richer YAML structures.
8
+ *
9
+ * Patterns detected:
10
+ * 1. **Iteration**: Same tool called N times with systematically varying
11
+ * arguments -> collapse into a single step with an array input.
12
+ * 2. **Constant args**: Arguments that don't change across repeated calls
13
+ * -> extract as shared config (not iterated).
14
+ * 3. **Array source**: When a prior step's result contains an array
15
+ * whose length matches the repetition count -> link as the data source.
16
+ */
17
+ export type { ExtractedStepLike, PatternAnnotation } from './types';
18
+ export { collapseIterationPatterns, detectPatterns } from './collapse';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Pattern detection for YAML workflow generation.
4
+ *
5
+ * Analyzes extracted step sequences to detect higher-order structural
6
+ * patterns -- entirely tool-agnostic. The detector recognizes shapes
7
+ * in the call flow (iteration, repetition) and collapses them into
8
+ * richer YAML structures.
9
+ *
10
+ * Patterns detected:
11
+ * 1. **Iteration**: Same tool called N times with systematically varying
12
+ * arguments -> collapse into a single step with an array input.
13
+ * 2. **Constant args**: Arguments that don't change across repeated calls
14
+ * -> extract as shared config (not iterated).
15
+ * 3. **Array source**: When a prior step's result contains an array
16
+ * whose length matches the repetition count -> link as the data source.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.detectPatterns = exports.collapseIterationPatterns = void 0;
20
+ var collapse_1 = require("./collapse");
21
+ Object.defineProperty(exports, "collapseIterationPatterns", { enumerable: true, get: function () { return collapse_1.collapseIterationPatterns; } });
22
+ Object.defineProperty(exports, "detectPatterns", { enumerable: true, get: function () { return collapse_1.detectPatterns; } });
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Detection and classification of consecutive tool-call runs.
3
+ *
4
+ * Finds sequences of 3+ consecutive calls to the same tool and
5
+ * classifies their arguments as varying, constant, or wired.
6
+ */
7
+ import type { ExtractedStepLike } from './types';
8
+ /**
9
+ * Detect runs of consecutive calls to the same tool (same name + same server).
10
+ */
11
+ export declare function findConsecutiveRuns(steps: ExtractedStepLike[], minLength?: number): Array<{
12
+ startIndex: number;
13
+ endIndex: number;
14
+ toolName: string;
15
+ serverId: string | undefined;
16
+ steps: ExtractedStepLike[];
17
+ }>;
18
+ /**
19
+ * Analyze a run of repeated tool calls and separate arguments into:
20
+ * - **varying**: keys whose values differ across calls (the iterated data)
21
+ * - **constant**: keys whose values are identical across all calls (shared config)
22
+ * - **wired**: inter-step handles -- excluded from both
23
+ */
24
+ export declare function classifyRunArguments(run: ExtractedStepLike[]): {
25
+ varying: string[];
26
+ constant: Record<string, unknown>;
27
+ items: Array<Record<string, unknown>>;
28
+ };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ /**
3
+ * Detection and classification of consecutive tool-call runs.
4
+ *
5
+ * Finds sequences of 3+ consecutive calls to the same tool and
6
+ * classifies their arguments as varying, constant, or wired.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.findConsecutiveRuns = findConsecutiveRuns;
10
+ exports.classifyRunArguments = classifyRunArguments;
11
+ const types_1 = require("./types");
12
+ /**
13
+ * Detect runs of consecutive calls to the same tool (same name + same server).
14
+ */
15
+ function findConsecutiveRuns(steps, minLength = 3) {
16
+ const runs = [];
17
+ let i = 0;
18
+ while (i < steps.length) {
19
+ const step = steps[i];
20
+ if (step.kind !== 'tool') {
21
+ i++;
22
+ continue;
23
+ }
24
+ let runEnd = i + 1;
25
+ while (runEnd < steps.length &&
26
+ steps[runEnd].kind === 'tool' &&
27
+ steps[runEnd].toolName === step.toolName &&
28
+ steps[runEnd].mcpServerId === step.mcpServerId) {
29
+ runEnd++;
30
+ }
31
+ if (runEnd - i >= minLength) {
32
+ runs.push({
33
+ startIndex: i,
34
+ endIndex: runEnd,
35
+ toolName: step.toolName,
36
+ serverId: step.mcpServerId,
37
+ steps: steps.slice(i, runEnd),
38
+ });
39
+ }
40
+ i = Math.max(i + 1, runEnd);
41
+ }
42
+ return runs;
43
+ }
44
+ /**
45
+ * Analyze a run of repeated tool calls and separate arguments into:
46
+ * - **varying**: keys whose values differ across calls (the iterated data)
47
+ * - **constant**: keys whose values are identical across all calls (shared config)
48
+ * - **wired**: inter-step handles -- excluded from both
49
+ */
50
+ function classifyRunArguments(run) {
51
+ const allKeys = new Set();
52
+ for (const step of run) {
53
+ for (const key of Object.keys(step.arguments)) {
54
+ allKeys.add(key);
55
+ }
56
+ }
57
+ const varying = [];
58
+ const constant = {};
59
+ for (const key of allKeys) {
60
+ if (types_1.WIRED_KEYS.has(key))
61
+ continue;
62
+ const values = run.map(s => JSON.stringify(s.arguments[key] ?? null));
63
+ const allSame = values.every(v => v === values[0]);
64
+ if (allSame) {
65
+ constant[key] = run[0].arguments[key];
66
+ }
67
+ else {
68
+ varying.push(key);
69
+ }
70
+ }
71
+ const items = run.map(s => {
72
+ const item = {};
73
+ for (const key of varying) {
74
+ if (s.arguments[key] !== undefined) {
75
+ item[key] = s.arguments[key];
76
+ }
77
+ }
78
+ return item;
79
+ });
80
+ return { varying, constant, items };
81
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Shared types and constants for pattern detection.
3
+ */
4
+ export interface ExtractedStepLike {
5
+ kind: 'tool' | 'llm';
6
+ toolName: string;
7
+ arguments: Record<string, unknown>;
8
+ result: unknown;
9
+ source: string;
10
+ mcpServerId?: string;
11
+ promptMessages?: Array<{
12
+ role: string;
13
+ content: string;
14
+ }>;
15
+ }
16
+ /** Keys that represent inter-step handles, not meaningful iteration data. */
17
+ export declare const WIRED_KEYS: Set<string>;
18
+ export interface PatternAnnotation {
19
+ type: 'iteration';
20
+ toolName: string;
21
+ runStartIndex: number;
22
+ iterationCount: number;
23
+ varyingKeys: string[];
24
+ constantKeys: string[];
25
+ arraySource: {
26
+ stepIndex: number;
27
+ fieldName: string;
28
+ } | null;
29
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * Shared types and constants for pattern detection.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WIRED_KEYS = void 0;
7
+ /** Keys that represent inter-step handles, not meaningful iteration data. */
8
+ exports.WIRED_KEYS = new Set(['page_id', '_handle', 'session_id']);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Analyze stage: run pattern detection and naive input classification.
3
+ *
4
+ * Wraps the existing pattern-detector and input-analyzer modules,
5
+ * populating the pipeline context with their results.
6
+ */
7
+ import type { PipelineContext } from '../types';
8
+ /**
9
+ * Analyze pipeline stage: detect patterns and classify inputs.
10
+ */
11
+ export declare function analyze(ctx: PipelineContext): Promise<PipelineContext>;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /**
3
+ * Analyze stage: run pattern detection and naive input classification.
4
+ *
5
+ * Wraps the existing pattern-detector and input-analyzer modules,
6
+ * populating the pipeline context with their results.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.analyze = analyze;
43
+ const pattern_detector_1 = require("../pattern-detector");
44
+ const input_analyzer_1 = require("../input-analyzer");
45
+ /**
46
+ * Analyze pipeline stage: detect patterns and classify inputs.
47
+ */
48
+ async function analyze(ctx) {
49
+ // Detect structural patterns (informational — passed to compile stage)
50
+ ctx.patternAnnotations = (0, pattern_detector_1.detectPatterns)(ctx.rawSteps);
51
+ // Collapse iteration patterns: N consecutive calls → single step with _iteration metadata
52
+ ctx.collapsedSteps = (0, pattern_detector_1.collapseIterationPatterns)(ctx.rawSteps);
53
+ // Advisory: consecutive steps from the same server
54
+ const consecutiveSameServer = ctx.collapsedSteps.filter((s, i) => s.kind === 'tool' && s.mcpServerId &&
55
+ i > 0 && ctx.collapsedSteps[i - 1].mcpServerId === s.mcpServerId);
56
+ if (consecutiveSameServer.length > 0) {
57
+ const { loggerRegistry } = await Promise.resolve().then(() => __importStar(require('../../logger')));
58
+ const serverIds = [...new Set(consecutiveSameServer.map(s => s.mcpServerId))];
59
+ loggerRegistry.info(`[yaml-workflow] hint: ${consecutiveSameServer.length + 1} consecutive same-server steps detected (${serverIds.join(', ')}) — pattern detector may collapse these`);
60
+ }
61
+ // Naive input classification: classify all step arguments as dynamic/fixed/wired
62
+ ctx.naiveInputs = (0, input_analyzer_1.extractSemanticInputs)(ctx.collapsedSteps, ctx.originalPrompt);
63
+ return ctx;
64
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * DAG construction helpers for the build pipeline stage.
3
+ *
4
+ * Encapsulates the mutable state of DAG assembly (activities, transitions,
5
+ * manifest) behind semantic operations so the main build() function reads
6
+ * as a high-level pipeline.
7
+ */
8
+ import type { ExtractedStep, EnhancedCompilationPlan, IterationSpec } from '../../types';
9
+ import type { DagBuilder } from '../../types';
10
+ /** Create the DAG with its trigger activity. */
11
+ export declare function initializeDag(prefix: string, graphTopic: string, inputSchema: Record<string, unknown>): DagBuilder;
12
+ /** Append an iteration pattern (hook → worker → cycle → done) to the DAG. */
13
+ export declare function appendIterationStep(dag: DagBuilder, iterSpec: IterationSpec, prefix: string, graphTopic: string, idx: number, step: ExtractedStep, triggerInputKeys: Set<string>, steps: ExtractedStep[], sessionFields: string[], plan: EnhancedCompilationPlan | null): void;
14
+ /** Append a normal (non-iteration) step activity to the DAG. */
15
+ export declare function appendNormalStep(dag: DagBuilder, idx: number, step: ExtractedStep, prefix: string, graphTopic: string, plan: EnhancedCompilationPlan | null, steps: ExtractedStep[], triggerInputKeys: Set<string>, collapsedToCoreIndex: Map<number, number>): void;
16
+ /**
17
+ * Append a signal step pair (escalation worker + hook) to the DAG.
18
+ *
19
+ * The escalation worker creates the escalation via the human-queue MCP tool.
20
+ * The hook pauses until the escalation is resolved and a signal arrives.
21
+ * A hooks section entry routes the external signal to the waiting hook.
22
+ */
23
+ export declare function appendSignalStep(dag: DagBuilder, idx: number, step: ExtractedStep, prefix: string, graphTopic: string, plan: EnhancedCompilationPlan | null, steps: ExtractedStep[], triggerInputKeys: Set<string>, collapsedToCoreIndex: Map<number, number>): void;
24
+ /** Assemble the DAG into a HotMesh YAML document. */
25
+ export declare function serializeToYaml(appId: string, graphTopic: string, inputSchema: Record<string, unknown>, outputSchema: Record<string, unknown>, dag: DagBuilder): string;