@elizaos/agent 2.0.0-alpha.144 → 2.0.0-alpha.151

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 (598) hide show
  1. package/apps/app-lifeops/src/actions/inbox-digest.d.ts +2 -0
  2. package/apps/app-lifeops/src/actions/inbox-digest.d.ts.map +1 -0
  3. package/apps/app-lifeops/src/actions/inbox-digest.js +1 -0
  4. package/apps/app-lifeops/src/actions/inbox-respond.d.ts +2 -0
  5. package/apps/app-lifeops/src/actions/inbox-respond.d.ts.map +1 -0
  6. package/apps/app-lifeops/src/actions/inbox-respond.js +1 -0
  7. package/apps/app-lifeops/src/actions/inbox-triage.d.ts +2 -0
  8. package/apps/app-lifeops/src/actions/inbox-triage.d.ts.map +1 -0
  9. package/apps/app-lifeops/src/actions/inbox-triage.js +1 -0
  10. package/apps/app-lifeops/src/actions/inbox.d.ts +3 -0
  11. package/apps/app-lifeops/src/actions/inbox.d.ts.map +1 -0
  12. package/apps/app-lifeops/src/actions/inbox.js +856 -0
  13. package/apps/app-lifeops/src/actions/update-owner-profile.d.ts +3 -0
  14. package/apps/app-lifeops/src/actions/update-owner-profile.d.ts.map +1 -0
  15. package/apps/app-lifeops/src/actions/update-owner-profile.js +131 -0
  16. package/apps/app-lifeops/src/inbox/channel-deep-links.d.ts.map +1 -0
  17. package/apps/app-lifeops/src/inbox/config.d.ts.map +1 -0
  18. package/{packages/agent → apps/app-lifeops}/src/inbox/config.js +1 -1
  19. package/apps/app-lifeops/src/inbox/message-fetcher.d.ts.map +1 -0
  20. package/apps/app-lifeops/src/inbox/reflection.d.ts.map +1 -0
  21. package/apps/app-lifeops/src/inbox/repository.d.ts.map +1 -0
  22. package/apps/app-lifeops/src/inbox/triage-classifier.d.ts.map +1 -0
  23. package/apps/app-lifeops/src/inbox/types.d.ts.map +1 -0
  24. package/apps/app-lifeops/src/lifeops/index.d.ts +25 -0
  25. package/apps/app-lifeops/src/lifeops/index.d.ts.map +1 -0
  26. package/apps/app-lifeops/src/lifeops/index.js +24 -0
  27. package/apps/app-lifeops/src/lifeops/screen-context.d.ts +52 -0
  28. package/apps/app-lifeops/src/lifeops/screen-context.d.ts.map +1 -0
  29. package/apps/app-lifeops/src/lifeops/screen-context.js +332 -0
  30. package/apps/app-lifeops/src/plugin.d.ts +3 -0
  31. package/apps/app-lifeops/src/plugin.d.ts.map +1 -1
  32. package/apps/app-lifeops/src/plugin.js +16 -3
  33. package/apps/app-lifeops/src/providers/inbox-triage.d.ts +3 -0
  34. package/apps/app-lifeops/src/providers/inbox-triage.d.ts.map +1 -0
  35. package/apps/app-lifeops/src/providers/inbox-triage.js +89 -0
  36. package/package.json +6 -4
  37. package/packages/agent/src/actions/calendar.d.ts +1 -18
  38. package/packages/agent/src/actions/calendar.d.ts.map +1 -1
  39. package/packages/agent/src/actions/calendar.js +1 -3143
  40. package/packages/agent/src/actions/check-balance.d.ts +17 -0
  41. package/packages/agent/src/actions/check-balance.d.ts.map +1 -0
  42. package/packages/agent/src/actions/check-balance.js +167 -0
  43. package/packages/agent/src/actions/connector-resolver.d.ts +75 -0
  44. package/packages/agent/src/actions/connector-resolver.d.ts.map +1 -0
  45. package/packages/agent/src/actions/connector-resolver.js +245 -0
  46. package/packages/agent/src/actions/context-signal-lexicon.d.ts +1 -1
  47. package/packages/agent/src/actions/context-signal-lexicon.d.ts.map +1 -1
  48. package/packages/agent/src/actions/context-signal-lexicon.js +6 -0
  49. package/packages/agent/src/actions/eject-plugin.d.ts +3 -0
  50. package/packages/agent/src/actions/eject-plugin.d.ts.map +1 -0
  51. package/packages/agent/src/actions/eject-plugin.js +48 -0
  52. package/packages/agent/src/actions/execute-trade.d.ts +17 -0
  53. package/packages/agent/src/actions/execute-trade.d.ts.map +1 -0
  54. package/packages/agent/src/actions/execute-trade.js +299 -0
  55. package/packages/agent/src/actions/get-self-status.d.ts +13 -0
  56. package/packages/agent/src/actions/get-self-status.d.ts.map +1 -0
  57. package/packages/agent/src/actions/get-self-status.js +66 -0
  58. package/packages/agent/src/actions/gmail.d.ts +1 -32
  59. package/packages/agent/src/actions/gmail.d.ts.map +1 -1
  60. package/packages/agent/src/actions/gmail.js +1 -1734
  61. package/packages/agent/src/actions/inbox-digest.d.ts +1 -1
  62. package/packages/agent/src/actions/inbox-digest.d.ts.map +1 -1
  63. package/packages/agent/src/actions/inbox-digest.js +1 -1
  64. package/packages/agent/src/actions/inbox-respond.d.ts +1 -1
  65. package/packages/agent/src/actions/inbox-respond.d.ts.map +1 -1
  66. package/packages/agent/src/actions/inbox-respond.js +1 -1
  67. package/packages/agent/src/actions/inbox-triage.d.ts +1 -1
  68. package/packages/agent/src/actions/inbox-triage.d.ts.map +1 -1
  69. package/packages/agent/src/actions/inbox-triage.js +1 -1
  70. package/packages/agent/src/actions/inbox.d.ts +1 -2
  71. package/packages/agent/src/actions/inbox.d.ts.map +1 -1
  72. package/packages/agent/src/actions/inbox.js +1 -856
  73. package/packages/agent/src/actions/index.d.ts +13 -0
  74. package/packages/agent/src/actions/index.d.ts.map +1 -1
  75. package/packages/agent/src/actions/index.js +13 -0
  76. package/packages/agent/src/actions/install-plugin.d.ts +3 -0
  77. package/packages/agent/src/actions/install-plugin.d.ts.map +1 -0
  78. package/packages/agent/src/actions/install-plugin.js +65 -0
  79. package/packages/agent/src/actions/life-goal-extractor.d.ts +1 -68
  80. package/packages/agent/src/actions/life-goal-extractor.d.ts.map +1 -1
  81. package/packages/agent/src/actions/life-goal-extractor.js +1 -354
  82. package/packages/agent/src/actions/life-param-extractor.d.ts +1 -77
  83. package/packages/agent/src/actions/life-param-extractor.d.ts.map +1 -1
  84. package/packages/agent/src/actions/life-param-extractor.js +1 -423
  85. package/packages/agent/src/actions/life-recent-context.d.ts +1 -8
  86. package/packages/agent/src/actions/life-recent-context.d.ts.map +1 -1
  87. package/packages/agent/src/actions/life-recent-context.js +1 -84
  88. package/packages/agent/src/actions/life-update-extractor.d.ts +1 -26
  89. package/packages/agent/src/actions/life-update-extractor.d.ts.map +1 -1
  90. package/packages/agent/src/actions/life-update-extractor.js +1 -195
  91. package/packages/agent/src/actions/life.d.ts +1 -8
  92. package/packages/agent/src/actions/life.d.ts.map +1 -1
  93. package/packages/agent/src/actions/life.extractor.d.ts +1 -17
  94. package/packages/agent/src/actions/life.extractor.d.ts.map +1 -1
  95. package/packages/agent/src/actions/life.extractor.js +1 -264
  96. package/packages/agent/src/actions/life.js +1 -3379
  97. package/packages/agent/src/actions/lifeops-extraction-config.d.ts +1 -15
  98. package/packages/agent/src/actions/lifeops-extraction-config.d.ts.map +1 -1
  99. package/packages/agent/src/actions/lifeops-extraction-config.js +1 -25
  100. package/packages/agent/src/actions/lifeops-google-helpers.d.ts +1 -61
  101. package/packages/agent/src/actions/lifeops-google-helpers.d.ts.map +1 -1
  102. package/packages/agent/src/actions/lifeops-google-helpers.js +1 -607
  103. package/packages/agent/src/actions/list-ejected.d.ts +3 -0
  104. package/packages/agent/src/actions/list-ejected.d.ts.map +1 -0
  105. package/packages/agent/src/actions/list-ejected.js +35 -0
  106. package/packages/agent/src/actions/log-level.d.ts +3 -0
  107. package/packages/agent/src/actions/log-level.d.ts.map +1 -0
  108. package/packages/agent/src/actions/log-level.js +125 -0
  109. package/packages/agent/src/actions/manage-tasks.d.ts.map +1 -1
  110. package/packages/agent/src/actions/manage-tasks.js +51 -15
  111. package/packages/agent/src/actions/media.d.ts +21 -0
  112. package/packages/agent/src/actions/media.d.ts.map +1 -0
  113. package/packages/agent/src/actions/media.js +384 -0
  114. package/packages/agent/src/actions/read-messages.d.ts +14 -0
  115. package/packages/agent/src/actions/read-messages.d.ts.map +1 -0
  116. package/packages/agent/src/actions/read-messages.js +228 -0
  117. package/packages/agent/src/actions/reinject-plugin.d.ts +3 -0
  118. package/packages/agent/src/actions/reinject-plugin.d.ts.map +1 -0
  119. package/packages/agent/src/actions/reinject-plugin.js +47 -0
  120. package/packages/agent/src/actions/send-message.d.ts +0 -7
  121. package/packages/agent/src/actions/send-message.d.ts.map +1 -1
  122. package/packages/agent/src/actions/send-message.js +170 -49
  123. package/packages/agent/src/actions/sync-plugin.d.ts +3 -0
  124. package/packages/agent/src/actions/sync-plugin.d.ts.map +1 -0
  125. package/packages/agent/src/actions/sync-plugin.js +47 -0
  126. package/packages/agent/src/actions/timezone-normalization.d.ts +1 -2
  127. package/packages/agent/src/actions/timezone-normalization.d.ts.map +1 -1
  128. package/packages/agent/src/actions/timezone-normalization.js +1 -107
  129. package/packages/agent/src/actions/transfer-token.d.ts +17 -0
  130. package/packages/agent/src/actions/transfer-token.d.ts.map +1 -0
  131. package/packages/agent/src/actions/transfer-token.js +470 -0
  132. package/packages/agent/src/actions/update-owner-profile.d.ts +1 -2
  133. package/packages/agent/src/actions/update-owner-profile.d.ts.map +1 -1
  134. package/packages/agent/src/actions/update-owner-profile.js +1 -131
  135. package/packages/agent/src/actions/wallet-action-shared.d.ts +15 -0
  136. package/packages/agent/src/actions/wallet-action-shared.d.ts.map +1 -0
  137. package/packages/agent/src/actions/wallet-action-shared.js +24 -0
  138. package/packages/agent/src/api/agent-admin-routes.d.ts.map +1 -1
  139. package/packages/agent/src/api/agent-admin-routes.js +1 -1
  140. package/packages/agent/src/api/binance-skill-helpers.d.ts.map +1 -1
  141. package/packages/agent/src/api/binance-skill-helpers.js +8 -3
  142. package/packages/agent/src/api/chat-routes.d.ts.map +1 -1
  143. package/packages/agent/src/api/chat-routes.js +20 -5
  144. package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts +1 -22
  145. package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts.map +1 -1
  146. package/packages/agent/src/api/coding-agents-auth-sanitize.js +1 -39
  147. package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts +1 -28
  148. package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts.map +1 -1
  149. package/packages/agent/src/api/coding-agents-preflight-normalize.js +1 -45
  150. package/packages/agent/src/api/coordinator-types.d.ts +1 -46
  151. package/packages/agent/src/api/coordinator-types.d.ts.map +1 -1
  152. package/packages/agent/src/api/coordinator-types.js +1 -1
  153. package/packages/agent/src/api/coordinator-wiring.d.ts +1 -45
  154. package/packages/agent/src/api/coordinator-wiring.d.ts.map +1 -1
  155. package/packages/agent/src/api/coordinator-wiring.js +1 -108
  156. package/packages/agent/src/api/index.d.ts +1 -1
  157. package/packages/agent/src/api/index.d.ts.map +1 -1
  158. package/packages/agent/src/api/index.js +1 -1
  159. package/packages/agent/src/api/lifeops-browser-packaging.d.ts +1 -15
  160. package/packages/agent/src/api/lifeops-browser-packaging.d.ts.map +1 -1
  161. package/packages/agent/src/api/lifeops-browser-packaging.js +1 -305
  162. package/packages/agent/src/api/lifeops-routes.d.ts +1 -19
  163. package/packages/agent/src/api/lifeops-routes.d.ts.map +1 -1
  164. package/packages/agent/src/api/lifeops-routes.js +1 -1173
  165. package/packages/agent/src/api/server.d.ts.map +1 -1
  166. package/packages/agent/src/api/server.js +6 -6
  167. package/packages/agent/src/api/task-agent-message-routing.d.ts +1 -9
  168. package/packages/agent/src/api/task-agent-message-routing.d.ts.map +1 -1
  169. package/packages/agent/src/api/task-agent-message-routing.js +1 -62
  170. package/packages/agent/src/api/website-blocker-routes.d.ts +1 -6
  171. package/packages/agent/src/api/website-blocker-routes.d.ts.map +1 -1
  172. package/packages/agent/src/api/website-blocker-routes.js +1 -174
  173. package/packages/agent/src/config/types.agent-defaults.d.ts +1 -1
  174. package/packages/agent/src/config/types.agent-defaults.d.ts.map +1 -1
  175. package/packages/agent/src/evals/coordinator-eval-client.d.ts +1 -38
  176. package/packages/agent/src/evals/coordinator-eval-client.d.ts.map +1 -1
  177. package/packages/agent/src/evals/coordinator-eval-client.js +1 -138
  178. package/packages/agent/src/evals/coordinator-live-runner.d.ts +1 -56
  179. package/packages/agent/src/evals/coordinator-live-runner.d.ts.map +1 -1
  180. package/packages/agent/src/evals/coordinator-live-runner.js +1 -546
  181. package/packages/agent/src/evals/coordinator-preflight.d.ts +1 -31
  182. package/packages/agent/src/evals/coordinator-preflight.d.ts.map +1 -1
  183. package/packages/agent/src/evals/coordinator-preflight.js +1 -296
  184. package/packages/agent/src/evals/coordinator-scenarios.d.ts +1 -23
  185. package/packages/agent/src/evals/coordinator-scenarios.d.ts.map +1 -1
  186. package/packages/agent/src/evals/coordinator-scenarios.js +1 -1141
  187. package/packages/agent/src/lifeops/app-state.d.ts +1 -10
  188. package/packages/agent/src/lifeops/app-state.d.ts.map +1 -1
  189. package/packages/agent/src/lifeops/app-state.js +1 -32
  190. package/packages/agent/src/lifeops/apple-reminders.d.ts +1 -57
  191. package/packages/agent/src/lifeops/apple-reminders.d.ts.map +1 -1
  192. package/packages/agent/src/lifeops/apple-reminders.js +1 -325
  193. package/packages/agent/src/lifeops/defaults.d.ts +1 -23
  194. package/packages/agent/src/lifeops/defaults.d.ts.map +1 -1
  195. package/packages/agent/src/lifeops/defaults.js +1 -205
  196. package/packages/agent/src/lifeops/engine.d.ts +1 -7
  197. package/packages/agent/src/lifeops/engine.d.ts.map +1 -1
  198. package/packages/agent/src/lifeops/engine.js +1 -389
  199. package/packages/agent/src/lifeops/goal-grounding.d.ts +1 -53
  200. package/packages/agent/src/lifeops/goal-grounding.d.ts.map +1 -1
  201. package/packages/agent/src/lifeops/goal-grounding.js +1 -147
  202. package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts +1 -11
  203. package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts.map +1 -1
  204. package/packages/agent/src/lifeops/goal-semantic-evaluator.js +1 -154
  205. package/packages/agent/src/lifeops/google-api-error.d.ts +1 -6
  206. package/packages/agent/src/lifeops/google-api-error.d.ts.map +1 -1
  207. package/packages/agent/src/lifeops/google-api-error.js +1 -35
  208. package/packages/agent/src/lifeops/google-calendar.d.ts +1 -52
  209. package/packages/agent/src/lifeops/google-calendar.d.ts.map +1 -1
  210. package/packages/agent/src/lifeops/google-calendar.js +1 -268
  211. package/packages/agent/src/lifeops/google-connector-gateway.d.ts +1 -18
  212. package/packages/agent/src/lifeops/google-connector-gateway.d.ts.map +1 -1
  213. package/packages/agent/src/lifeops/google-connector-gateway.js +1 -65
  214. package/packages/agent/src/lifeops/google-fetch.d.ts +1 -10
  215. package/packages/agent/src/lifeops/google-fetch.d.ts.map +1 -1
  216. package/packages/agent/src/lifeops/google-fetch.js +1 -85
  217. package/packages/agent/src/lifeops/google-gmail.d.ts +1 -53
  218. package/packages/agent/src/lifeops/google-gmail.d.ts.map +1 -1
  219. package/packages/agent/src/lifeops/google-gmail.js +1 -471
  220. package/packages/agent/src/lifeops/google-managed-client.d.ts +1 -126
  221. package/packages/agent/src/lifeops/google-managed-client.d.ts.map +1 -1
  222. package/packages/agent/src/lifeops/google-managed-client.js +1 -294
  223. package/packages/agent/src/lifeops/google-oauth.d.ts +1 -60
  224. package/packages/agent/src/lifeops/google-oauth.d.ts.map +1 -1
  225. package/packages/agent/src/lifeops/google-oauth.js +1 -494
  226. package/packages/agent/src/lifeops/google-scopes.d.ts +1 -12
  227. package/packages/agent/src/lifeops/google-scopes.d.ts.map +1 -1
  228. package/packages/agent/src/lifeops/google-scopes.js +1 -96
  229. package/packages/agent/src/lifeops/index.d.ts +1 -2
  230. package/packages/agent/src/lifeops/index.d.ts.map +1 -1
  231. package/packages/agent/src/lifeops/index.js +1 -2
  232. package/packages/agent/src/lifeops/owner-profile.d.ts +1 -14
  233. package/packages/agent/src/lifeops/owner-profile.d.ts.map +1 -1
  234. package/packages/agent/src/lifeops/owner-profile.js +1 -194
  235. package/packages/agent/src/lifeops/repository.d.ts +1 -208
  236. package/packages/agent/src/lifeops/repository.d.ts.map +1 -1
  237. package/packages/agent/src/lifeops/repository.js +1 -3187
  238. package/packages/agent/src/lifeops/runtime.d.ts +1 -13
  239. package/packages/agent/src/lifeops/runtime.d.ts.map +1 -1
  240. package/packages/agent/src/lifeops/runtime.js +1 -120
  241. package/packages/agent/src/lifeops/screen-context.d.ts +1 -51
  242. package/packages/agent/src/lifeops/screen-context.d.ts.map +1 -1
  243. package/packages/agent/src/lifeops/screen-context.js +1 -332
  244. package/packages/agent/src/lifeops/seed-routines.d.ts +1 -19
  245. package/packages/agent/src/lifeops/seed-routines.d.ts.map +1 -1
  246. package/packages/agent/src/lifeops/seed-routines.js +1 -111
  247. package/packages/agent/src/lifeops/service.d.ts +1 -274
  248. package/packages/agent/src/lifeops/service.d.ts.map +1 -1
  249. package/packages/agent/src/lifeops/service.js +1 -9260
  250. package/packages/agent/src/lifeops/sql.d.ts +1 -30
  251. package/packages/agent/src/lifeops/sql.d.ts.map +1 -1
  252. package/packages/agent/src/lifeops/sql.js +1 -247
  253. package/packages/agent/src/lifeops/time.d.ts +1 -16
  254. package/packages/agent/src/lifeops/time.d.ts.map +1 -1
  255. package/packages/agent/src/lifeops/time.js +1 -132
  256. package/packages/agent/src/lifeops/twilio.d.ts +1 -24
  257. package/packages/agent/src/lifeops/twilio.d.ts.map +1 -1
  258. package/packages/agent/src/lifeops/twilio.js +1 -157
  259. package/packages/agent/src/lifeops/x-poster.d.ts +1 -18
  260. package/packages/agent/src/lifeops/x-poster.d.ts.map +1 -1
  261. package/packages/agent/src/lifeops/x-poster.js +1 -148
  262. package/packages/agent/src/providers/inbox-triage.d.ts +1 -2
  263. package/packages/agent/src/providers/inbox-triage.d.ts.map +1 -1
  264. package/packages/agent/src/providers/inbox-triage.js +1 -89
  265. package/packages/agent/src/providers/index.d.ts +4 -1
  266. package/packages/agent/src/providers/index.d.ts.map +1 -1
  267. package/packages/agent/src/providers/index.js +4 -1
  268. package/packages/agent/src/providers/lifeops.d.ts +1 -2
  269. package/packages/agent/src/providers/lifeops.d.ts.map +1 -1
  270. package/packages/agent/src/providers/lifeops.js +1 -157
  271. package/packages/agent/src/providers/local-models.d.ts +118 -0
  272. package/packages/agent/src/providers/local-models.d.ts.map +1 -0
  273. package/packages/agent/src/providers/local-models.js +427 -0
  274. package/packages/agent/src/providers/media-provider.d.ts +192 -0
  275. package/packages/agent/src/providers/media-provider.d.ts.map +1 -0
  276. package/packages/agent/src/providers/media-provider.js +1088 -0
  277. package/packages/agent/src/providers/self-status.d.ts +4 -0
  278. package/packages/agent/src/providers/self-status.d.ts.map +1 -0
  279. package/packages/agent/src/providers/self-status.js +12 -0
  280. package/packages/agent/src/providers/tasks.d.ts.map +1 -1
  281. package/packages/agent/src/providers/tasks.js +7 -7
  282. package/packages/agent/src/runtime/core-plugins.js +1 -1
  283. package/packages/agent/src/runtime/eliza-plugin.d.ts.map +1 -1
  284. package/packages/agent/src/runtime/eliza-plugin.js +1 -7
  285. package/packages/agent/src/runtime/eliza.js +2 -2
  286. package/packages/agent/src/runtime/plugin-collector.js +3 -3
  287. package/packages/agent/src/runtime/plugin-lifecycle.d.ts.map +1 -1
  288. package/packages/agent/src/runtime/plugin-lifecycle.js +3 -13
  289. package/packages/agent/src/runtime/trajectory-internals.d.ts.map +1 -1
  290. package/packages/agent/src/runtime/trajectory-internals.js +1 -3
  291. package/packages/agent/src/services/built-in-app-routes/hyperscape.d.ts.map +1 -1
  292. package/packages/agent/src/services/coding-task-executor.d.ts +3 -3
  293. package/packages/agent/src/services/coding-task-executor.js +3 -3
  294. package/packages/shared/src/awareness/index.d.ts +2 -0
  295. package/packages/shared/src/awareness/index.d.ts.map +1 -0
  296. package/packages/shared/src/awareness/index.js +1 -0
  297. package/packages/shared/src/awareness/registry.d.ts +27 -0
  298. package/packages/shared/src/awareness/registry.d.ts.map +1 -0
  299. package/packages/shared/src/awareness/registry.js +161 -0
  300. package/packages/shared/src/i18n/generated/validation-keyword-data.d.ts +24 -0
  301. package/packages/shared/src/i18n/generated/validation-keyword-data.d.ts.map +1 -1
  302. package/packages/shared/src/i18n/generated/validation-keyword-data.js +24 -0
  303. package/packages/shared/src/runtime-env.d.ts.map +1 -1
  304. package/packages/shared/src/runtime-env.js +5 -1
  305. package/packages/typescript/src/generated/action-docs.d.ts +135 -0
  306. package/packages/typescript/src/generated/action-docs.d.ts.map +1 -1
  307. package/packages/typescript/src/generated/action-docs.js +237 -0
  308. package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts +24 -0
  309. package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts.map +1 -1
  310. package/packages/typescript/src/i18n/generated/validation-keyword-data.js +24 -0
  311. package/packages/typescript/src/index.node.d.ts +2 -2
  312. package/packages/typescript/src/index.node.d.ts.map +1 -1
  313. package/packages/typescript/src/index.node.js +4 -3
  314. package/packages/typescript/src/plugin-lifecycle.d.ts.map +1 -1
  315. package/packages/typescript/src/plugin-lifecycle.js +42 -3
  316. package/packages/typescript/src/services/message.d.ts.map +1 -1
  317. package/packages/typescript/src/services/message.js +32 -0
  318. package/apps/app-training/src/core/cli.d.ts +0 -11
  319. package/apps/app-training/src/core/cli.d.ts.map +0 -1
  320. package/apps/app-training/src/core/cli.js +0 -302
  321. package/apps/app-training/src/core/context-audit.d.ts +0 -51
  322. package/apps/app-training/src/core/context-audit.d.ts.map +0 -1
  323. package/apps/app-training/src/core/context-audit.js +0 -141
  324. package/apps/app-training/src/core/context-catalog.d.ts +0 -47
  325. package/apps/app-training/src/core/context-catalog.d.ts.map +0 -1
  326. package/apps/app-training/src/core/context-catalog.js +0 -259
  327. package/apps/app-training/src/core/context-types.d.ts +0 -3
  328. package/apps/app-training/src/core/context-types.d.ts.map +0 -1
  329. package/apps/app-training/src/core/context-types.js +0 -11
  330. package/apps/app-training/src/core/dataset-generator.d.ts +0 -135
  331. package/apps/app-training/src/core/dataset-generator.d.ts.map +0 -1
  332. package/apps/app-training/src/core/dataset-generator.js +0 -703
  333. package/apps/app-training/src/core/replay-validator.d.ts +0 -96
  334. package/apps/app-training/src/core/replay-validator.d.ts.map +0 -1
  335. package/apps/app-training/src/core/replay-validator.js +0 -265
  336. package/apps/app-training/src/core/roleplay-executor.d.ts +0 -123
  337. package/apps/app-training/src/core/roleplay-executor.d.ts.map +0 -1
  338. package/apps/app-training/src/core/roleplay-executor.js +0 -645
  339. package/apps/app-training/src/core/roleplay-trajectories.d.ts +0 -54
  340. package/apps/app-training/src/core/roleplay-trajectories.d.ts.map +0 -1
  341. package/apps/app-training/src/core/roleplay-trajectories.js +0 -73
  342. package/apps/app-training/src/core/scenario-blueprints.d.ts +0 -62
  343. package/apps/app-training/src/core/scenario-blueprints.d.ts.map +0 -1
  344. package/apps/app-training/src/core/scenario-blueprints.js +0 -790
  345. package/apps/app-training/src/core/trajectory-task-datasets.d.ts +0 -38
  346. package/apps/app-training/src/core/trajectory-task-datasets.d.ts.map +0 -1
  347. package/apps/app-training/src/core/trajectory-task-datasets.js +0 -281
  348. package/apps/app-training/src/core/vertex-tuning.d.ts +0 -139
  349. package/apps/app-training/src/core/vertex-tuning.d.ts.map +0 -1
  350. package/apps/app-training/src/core/vertex-tuning.js +0 -234
  351. package/packages/agent/src/inbox/channel-deep-links.d.ts.map +0 -1
  352. package/packages/agent/src/inbox/config.d.ts.map +0 -1
  353. package/packages/agent/src/inbox/message-fetcher.d.ts.map +0 -1
  354. package/packages/agent/src/inbox/reflection.d.ts.map +0 -1
  355. package/packages/agent/src/inbox/repository.d.ts.map +0 -1
  356. package/packages/agent/src/inbox/triage-classifier.d.ts.map +0 -1
  357. package/packages/agent/src/inbox/types.d.ts.map +0 -1
  358. package/packages/agent/src/training/cli.d.ts +0 -2
  359. package/packages/agent/src/training/cli.d.ts.map +0 -1
  360. package/packages/agent/src/training/cli.js +0 -2
  361. package/packages/agent/src/training/context-audit.d.ts +0 -2
  362. package/packages/agent/src/training/context-audit.d.ts.map +0 -1
  363. package/packages/agent/src/training/context-audit.js +0 -2
  364. package/packages/agent/src/training/context-catalog.d.ts +0 -2
  365. package/packages/agent/src/training/context-catalog.d.ts.map +0 -1
  366. package/packages/agent/src/training/context-catalog.js +0 -2
  367. package/packages/agent/src/training/context-types.d.ts +0 -2
  368. package/packages/agent/src/training/context-types.d.ts.map +0 -1
  369. package/packages/agent/src/training/context-types.js +0 -2
  370. package/packages/agent/src/training/dataset-generator.d.ts +0 -2
  371. package/packages/agent/src/training/dataset-generator.d.ts.map +0 -1
  372. package/packages/agent/src/training/dataset-generator.js +0 -2
  373. package/packages/agent/src/training/replay-validator.d.ts +0 -2
  374. package/packages/agent/src/training/replay-validator.d.ts.map +0 -1
  375. package/packages/agent/src/training/replay-validator.js +0 -2
  376. package/packages/agent/src/training/roleplay-executor.d.ts +0 -2
  377. package/packages/agent/src/training/roleplay-executor.d.ts.map +0 -1
  378. package/packages/agent/src/training/roleplay-executor.js +0 -2
  379. package/packages/agent/src/training/roleplay-trajectories.d.ts +0 -2
  380. package/packages/agent/src/training/roleplay-trajectories.d.ts.map +0 -1
  381. package/packages/agent/src/training/roleplay-trajectories.js +0 -2
  382. package/packages/agent/src/training/scenario-blueprints.d.ts +0 -2
  383. package/packages/agent/src/training/scenario-blueprints.d.ts.map +0 -1
  384. package/packages/agent/src/training/scenario-blueprints.js +0 -2
  385. package/packages/agent/src/training/trajectory-task-datasets.d.ts +0 -2
  386. package/packages/agent/src/training/trajectory-task-datasets.d.ts.map +0 -1
  387. package/packages/agent/src/training/trajectory-task-datasets.js +0 -2
  388. package/packages/agent/src/training/vertex-tuning.d.ts +0 -2
  389. package/packages/agent/src/training/vertex-tuning.d.ts.map +0 -1
  390. package/packages/agent/src/training/vertex-tuning.js +0 -2
  391. package/packages/typescript/src/features/orchestrator/actions/coding-task-handlers.d.ts +0 -41
  392. package/packages/typescript/src/features/orchestrator/actions/coding-task-handlers.d.ts.map +0 -1
  393. package/packages/typescript/src/features/orchestrator/actions/coding-task-handlers.js +0 -443
  394. package/packages/typescript/src/features/orchestrator/actions/coding-task-helpers.d.ts +0 -34
  395. package/packages/typescript/src/features/orchestrator/actions/coding-task-helpers.d.ts.map +0 -1
  396. package/packages/typescript/src/features/orchestrator/actions/coding-task-helpers.js +0 -171
  397. package/packages/typescript/src/features/orchestrator/actions/eval-metadata.d.ts +0 -11
  398. package/packages/typescript/src/features/orchestrator/actions/eval-metadata.d.ts.map +0 -1
  399. package/packages/typescript/src/features/orchestrator/actions/eval-metadata.js +0 -55
  400. package/packages/typescript/src/features/orchestrator/actions/finalize-workspace.d.ts +0 -11
  401. package/packages/typescript/src/features/orchestrator/actions/finalize-workspace.d.ts.map +0 -1
  402. package/packages/typescript/src/features/orchestrator/actions/finalize-workspace.js +0 -214
  403. package/packages/typescript/src/features/orchestrator/actions/list-agents.d.ts +0 -13
  404. package/packages/typescript/src/features/orchestrator/actions/list-agents.d.ts.map +0 -1
  405. package/packages/typescript/src/features/orchestrator/actions/list-agents.js +0 -174
  406. package/packages/typescript/src/features/orchestrator/actions/manage-issues.d.ts +0 -11
  407. package/packages/typescript/src/features/orchestrator/actions/manage-issues.d.ts.map +0 -1
  408. package/packages/typescript/src/features/orchestrator/actions/manage-issues.js +0 -428
  409. package/packages/typescript/src/features/orchestrator/actions/provision-workspace.d.ts +0 -11
  410. package/packages/typescript/src/features/orchestrator/actions/provision-workspace.d.ts.map +0 -1
  411. package/packages/typescript/src/features/orchestrator/actions/provision-workspace.js +0 -189
  412. package/packages/typescript/src/features/orchestrator/actions/send-to-agent.d.ts +0 -12
  413. package/packages/typescript/src/features/orchestrator/actions/send-to-agent.d.ts.map +0 -1
  414. package/packages/typescript/src/features/orchestrator/actions/send-to-agent.js +0 -265
  415. package/packages/typescript/src/features/orchestrator/actions/spawn-agent.d.ts +0 -12
  416. package/packages/typescript/src/features/orchestrator/actions/spawn-agent.d.ts.map +0 -1
  417. package/packages/typescript/src/features/orchestrator/actions/spawn-agent.js +0 -356
  418. package/packages/typescript/src/features/orchestrator/actions/start-coding-task.d.ts +0 -22
  419. package/packages/typescript/src/features/orchestrator/actions/start-coding-task.d.ts.map +0 -1
  420. package/packages/typescript/src/features/orchestrator/actions/start-coding-task.js +0 -270
  421. package/packages/typescript/src/features/orchestrator/actions/stop-agent.d.ts +0 -12
  422. package/packages/typescript/src/features/orchestrator/actions/stop-agent.d.ts.map +0 -1
  423. package/packages/typescript/src/features/orchestrator/actions/stop-agent.js +0 -192
  424. package/packages/typescript/src/features/orchestrator/actions/task-control.d.ts +0 -3
  425. package/packages/typescript/src/features/orchestrator/actions/task-control.d.ts.map +0 -1
  426. package/packages/typescript/src/features/orchestrator/actions/task-control.js +0 -217
  427. package/packages/typescript/src/features/orchestrator/actions/task-history.d.ts +0 -3
  428. package/packages/typescript/src/features/orchestrator/actions/task-history.d.ts.map +0 -1
  429. package/packages/typescript/src/features/orchestrator/actions/task-history.js +0 -323
  430. package/packages/typescript/src/features/orchestrator/actions/task-share.d.ts +0 -3
  431. package/packages/typescript/src/features/orchestrator/actions/task-share.d.ts.map +0 -1
  432. package/packages/typescript/src/features/orchestrator/actions/task-share.js +0 -168
  433. package/packages/typescript/src/features/orchestrator/actions/task-thread-target.d.ts +0 -11
  434. package/packages/typescript/src/features/orchestrator/actions/task-thread-target.d.ts.map +0 -1
  435. package/packages/typescript/src/features/orchestrator/actions/task-thread-target.js +0 -68
  436. package/packages/typescript/src/features/orchestrator/api/agent-routes.d.ts +0 -18
  437. package/packages/typescript/src/features/orchestrator/api/agent-routes.d.ts.map +0 -1
  438. package/packages/typescript/src/features/orchestrator/api/agent-routes.js +0 -654
  439. package/packages/typescript/src/features/orchestrator/api/coordinator-routes.d.ts +0 -22
  440. package/packages/typescript/src/features/orchestrator/api/coordinator-routes.d.ts.map +0 -1
  441. package/packages/typescript/src/features/orchestrator/api/coordinator-routes.js +0 -403
  442. package/packages/typescript/src/features/orchestrator/api/hook-routes.d.ts +0 -18
  443. package/packages/typescript/src/features/orchestrator/api/hook-routes.d.ts.map +0 -1
  444. package/packages/typescript/src/features/orchestrator/api/hook-routes.js +0 -164
  445. package/packages/typescript/src/features/orchestrator/api/issue-routes.d.ts +0 -17
  446. package/packages/typescript/src/features/orchestrator/api/issue-routes.d.ts.map +0 -1
  447. package/packages/typescript/src/features/orchestrator/api/issue-routes.js +0 -132
  448. package/packages/typescript/src/features/orchestrator/api/routes.d.ts +0 -37
  449. package/packages/typescript/src/features/orchestrator/api/routes.d.ts.map +0 -1
  450. package/packages/typescript/src/features/orchestrator/api/routes.js +0 -96
  451. package/packages/typescript/src/features/orchestrator/api/workspace-routes.d.ts +0 -17
  452. package/packages/typescript/src/features/orchestrator/api/workspace-routes.d.ts.map +0 -1
  453. package/packages/typescript/src/features/orchestrator/api/workspace-routes.js +0 -149
  454. package/packages/typescript/src/features/orchestrator/base-plugin.d.ts +0 -19
  455. package/packages/typescript/src/features/orchestrator/base-plugin.d.ts.map +0 -1
  456. package/packages/typescript/src/features/orchestrator/base-plugin.js +0 -75
  457. package/packages/typescript/src/features/orchestrator/claude-jsonl-completion-watcher.d.ts +0 -101
  458. package/packages/typescript/src/features/orchestrator/claude-jsonl-completion-watcher.d.ts.map +0 -1
  459. package/packages/typescript/src/features/orchestrator/claude-jsonl-completion-watcher.js +0 -310
  460. package/packages/typescript/src/features/orchestrator/index.d.ts +0 -33
  461. package/packages/typescript/src/features/orchestrator/index.d.ts.map +0 -1
  462. package/packages/typescript/src/features/orchestrator/index.js +0 -30
  463. package/packages/typescript/src/features/orchestrator/patch-agent-orchestrator-plugin.d.ts +0 -15
  464. package/packages/typescript/src/features/orchestrator/patch-agent-orchestrator-plugin.d.ts.map +0 -1
  465. package/packages/typescript/src/features/orchestrator/patch-agent-orchestrator-plugin.js +0 -1449
  466. package/packages/typescript/src/features/orchestrator/providers/action-examples.d.ts +0 -14
  467. package/packages/typescript/src/features/orchestrator/providers/action-examples.d.ts.map +0 -1
  468. package/packages/typescript/src/features/orchestrator/providers/action-examples.js +0 -151
  469. package/packages/typescript/src/features/orchestrator/providers/active-workspace-context.d.ts +0 -13
  470. package/packages/typescript/src/features/orchestrator/providers/active-workspace-context.d.ts.map +0 -1
  471. package/packages/typescript/src/features/orchestrator/providers/active-workspace-context.js +0 -142
  472. package/packages/typescript/src/features/orchestrator/services/agent-credentials.d.ts +0 -6
  473. package/packages/typescript/src/features/orchestrator/services/agent-credentials.d.ts.map +0 -1
  474. package/packages/typescript/src/features/orchestrator/services/agent-credentials.js +0 -91
  475. package/packages/typescript/src/features/orchestrator/services/agent-metrics.d.ts +0 -30
  476. package/packages/typescript/src/features/orchestrator/services/agent-metrics.d.ts.map +0 -1
  477. package/packages/typescript/src/features/orchestrator/services/agent-metrics.js +0 -54
  478. package/packages/typescript/src/features/orchestrator/services/agent-selection.d.ts +0 -53
  479. package/packages/typescript/src/features/orchestrator/services/agent-selection.d.ts.map +0 -1
  480. package/packages/typescript/src/features/orchestrator/services/agent-selection.js +0 -70
  481. package/packages/typescript/src/features/orchestrator/services/ansi-utils.d.ts +0 -61
  482. package/packages/typescript/src/features/orchestrator/services/ansi-utils.d.ts.map +0 -1
  483. package/packages/typescript/src/features/orchestrator/services/ansi-utils.js +0 -252
  484. package/packages/typescript/src/features/orchestrator/services/config-env.d.ts +0 -13
  485. package/packages/typescript/src/features/orchestrator/services/config-env.d.ts.map +0 -1
  486. package/packages/typescript/src/features/orchestrator/services/config-env.js +0 -37
  487. package/packages/typescript/src/features/orchestrator/services/coordinator-event-normalizer.d.ts +0 -50
  488. package/packages/typescript/src/features/orchestrator/services/coordinator-event-normalizer.d.ts.map +0 -1
  489. package/packages/typescript/src/features/orchestrator/services/coordinator-event-normalizer.js +0 -184
  490. package/packages/typescript/src/features/orchestrator/services/debug-capture.d.ts +0 -38
  491. package/packages/typescript/src/features/orchestrator/services/debug-capture.d.ts.map +0 -1
  492. package/packages/typescript/src/features/orchestrator/services/debug-capture.js +0 -113
  493. package/packages/typescript/src/features/orchestrator/services/pty-auto-response.d.ts +0 -30
  494. package/packages/typescript/src/features/orchestrator/services/pty-auto-response.d.ts.map +0 -1
  495. package/packages/typescript/src/features/orchestrator/services/pty-auto-response.js +0 -146
  496. package/packages/typescript/src/features/orchestrator/services/pty-init.d.ts +0 -54
  497. package/packages/typescript/src/features/orchestrator/services/pty-init.d.ts.map +0 -1
  498. package/packages/typescript/src/features/orchestrator/services/pty-init.js +0 -315
  499. package/packages/typescript/src/features/orchestrator/services/pty-service.d.ts +0 -175
  500. package/packages/typescript/src/features/orchestrator/services/pty-service.d.ts.map +0 -1
  501. package/packages/typescript/src/features/orchestrator/services/pty-service.js +0 -1469
  502. package/packages/typescript/src/features/orchestrator/services/pty-session-io.d.ts +0 -49
  503. package/packages/typescript/src/features/orchestrator/services/pty-session-io.d.ts.map +0 -1
  504. package/packages/typescript/src/features/orchestrator/services/pty-session-io.js +0 -180
  505. package/packages/typescript/src/features/orchestrator/services/pty-spawn.d.ts +0 -53
  506. package/packages/typescript/src/features/orchestrator/services/pty-spawn.d.ts.map +0 -1
  507. package/packages/typescript/src/features/orchestrator/services/pty-spawn.js +0 -280
  508. package/packages/typescript/src/features/orchestrator/services/pty-types.d.ts +0 -80
  509. package/packages/typescript/src/features/orchestrator/services/pty-types.d.ts.map +0 -1
  510. package/packages/typescript/src/features/orchestrator/services/pty-types.js +0 -51
  511. package/packages/typescript/src/features/orchestrator/services/repo-input.d.ts +0 -16
  512. package/packages/typescript/src/features/orchestrator/services/repo-input.d.ts.map +0 -1
  513. package/packages/typescript/src/features/orchestrator/services/repo-input.js +0 -88
  514. package/packages/typescript/src/features/orchestrator/services/stall-classifier.d.ts +0 -69
  515. package/packages/typescript/src/features/orchestrator/services/stall-classifier.d.ts.map +0 -1
  516. package/packages/typescript/src/features/orchestrator/services/stall-classifier.js +0 -446
  517. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.d.ts +0 -97
  518. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.d.ts.map +0 -1
  519. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator-prompts.js +0 -342
  520. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator.d.ts +0 -421
  521. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator.d.ts.map +0 -1
  522. package/packages/typescript/src/features/orchestrator/services/swarm-coordinator.js +0 -2356
  523. package/packages/typescript/src/features/orchestrator/services/swarm-decision-loop.d.ts +0 -52
  524. package/packages/typescript/src/features/orchestrator/services/swarm-decision-loop.d.ts.map +0 -1
  525. package/packages/typescript/src/features/orchestrator/services/swarm-decision-loop.js +0 -1538
  526. package/packages/typescript/src/features/orchestrator/services/swarm-event-triage.d.ts +0 -49
  527. package/packages/typescript/src/features/orchestrator/services/swarm-event-triage.d.ts.map +0 -1
  528. package/packages/typescript/src/features/orchestrator/services/swarm-event-triage.js +0 -171
  529. package/packages/typescript/src/features/orchestrator/services/swarm-history.d.ts +0 -27
  530. package/packages/typescript/src/features/orchestrator/services/swarm-history.d.ts.map +0 -1
  531. package/packages/typescript/src/features/orchestrator/services/swarm-history.js +0 -148
  532. package/packages/typescript/src/features/orchestrator/services/swarm-idle-watchdog.d.ts +0 -22
  533. package/packages/typescript/src/features/orchestrator/services/swarm-idle-watchdog.d.ts.map +0 -1
  534. package/packages/typescript/src/features/orchestrator/services/swarm-idle-watchdog.js +0 -265
  535. package/packages/typescript/src/features/orchestrator/services/task-acceptance.d.ts +0 -8
  536. package/packages/typescript/src/features/orchestrator/services/task-acceptance.d.ts.map +0 -1
  537. package/packages/typescript/src/features/orchestrator/services/task-acceptance.js +0 -114
  538. package/packages/typescript/src/features/orchestrator/services/task-agent-auth.d.ts +0 -68
  539. package/packages/typescript/src/features/orchestrator/services/task-agent-auth.d.ts.map +0 -1
  540. package/packages/typescript/src/features/orchestrator/services/task-agent-auth.js +0 -559
  541. package/packages/typescript/src/features/orchestrator/services/task-agent-frameworks.d.ts +0 -82
  542. package/packages/typescript/src/features/orchestrator/services/task-agent-frameworks.d.ts.map +0 -1
  543. package/packages/typescript/src/features/orchestrator/services/task-agent-frameworks.js +0 -738
  544. package/packages/typescript/src/features/orchestrator/services/task-kind.d.ts +0 -3
  545. package/packages/typescript/src/features/orchestrator/services/task-kind.d.ts.map +0 -1
  546. package/packages/typescript/src/features/orchestrator/services/task-kind.js +0 -40
  547. package/packages/typescript/src/features/orchestrator/services/task-policy.d.ts +0 -17
  548. package/packages/typescript/src/features/orchestrator/services/task-policy.d.ts.map +0 -1
  549. package/packages/typescript/src/features/orchestrator/services/task-policy.js +0 -226
  550. package/packages/typescript/src/features/orchestrator/services/task-registry.d.ts +0 -550
  551. package/packages/typescript/src/features/orchestrator/services/task-registry.d.ts.map +0 -1
  552. package/packages/typescript/src/features/orchestrator/services/task-registry.js +0 -2182
  553. package/packages/typescript/src/features/orchestrator/services/task-share.d.ts +0 -18
  554. package/packages/typescript/src/features/orchestrator/services/task-share.d.ts.map +0 -1
  555. package/packages/typescript/src/features/orchestrator/services/task-share.js +0 -159
  556. package/packages/typescript/src/features/orchestrator/services/task-validation.d.ts +0 -69
  557. package/packages/typescript/src/features/orchestrator/services/task-validation.d.ts.map +0 -1
  558. package/packages/typescript/src/features/orchestrator/services/task-validation.js +0 -587
  559. package/packages/typescript/src/features/orchestrator/services/task-verifier-runner.d.ts +0 -5
  560. package/packages/typescript/src/features/orchestrator/services/task-verifier-runner.d.ts.map +0 -1
  561. package/packages/typescript/src/features/orchestrator/services/task-verifier-runner.js +0 -372
  562. package/packages/typescript/src/features/orchestrator/services/trajectory-context.d.ts +0 -73
  563. package/packages/typescript/src/features/orchestrator/services/trajectory-context.d.ts.map +0 -1
  564. package/packages/typescript/src/features/orchestrator/services/trajectory-context.js +0 -64
  565. package/packages/typescript/src/features/orchestrator/services/trajectory-feedback.d.ts +0 -53
  566. package/packages/typescript/src/features/orchestrator/services/trajectory-feedback.d.ts.map +0 -1
  567. package/packages/typescript/src/features/orchestrator/services/trajectory-feedback.js +0 -260
  568. package/packages/typescript/src/features/orchestrator/services/workspace-git-ops.d.ts +0 -28
  569. package/packages/typescript/src/features/orchestrator/services/workspace-git-ops.d.ts.map +0 -1
  570. package/packages/typescript/src/features/orchestrator/services/workspace-git-ops.js +0 -105
  571. package/packages/typescript/src/features/orchestrator/services/workspace-github.d.ts +0 -58
  572. package/packages/typescript/src/features/orchestrator/services/workspace-github.d.ts.map +0 -1
  573. package/packages/typescript/src/features/orchestrator/services/workspace-github.js +0 -139
  574. package/packages/typescript/src/features/orchestrator/services/workspace-lifecycle.d.ts +0 -18
  575. package/packages/typescript/src/features/orchestrator/services/workspace-lifecycle.d.ts.map +0 -1
  576. package/packages/typescript/src/features/orchestrator/services/workspace-lifecycle.js +0 -86
  577. package/packages/typescript/src/features/orchestrator/services/workspace-service.d.ts +0 -118
  578. package/packages/typescript/src/features/orchestrator/services/workspace-service.d.ts.map +0 -1
  579. package/packages/typescript/src/features/orchestrator/services/workspace-service.js +0 -533
  580. package/packages/typescript/src/features/orchestrator/services/workspace-types.d.ts +0 -81
  581. package/packages/typescript/src/features/orchestrator/services/workspace-types.d.ts.map +0 -1
  582. package/packages/typescript/src/features/orchestrator/services/workspace-types.js +0 -8
  583. package/packages/typescript/src/features/orchestrator/task-progress-streamer.d.ts +0 -38
  584. package/packages/typescript/src/features/orchestrator/task-progress-streamer.d.ts.map +0 -1
  585. package/packages/typescript/src/features/orchestrator/task-progress-streamer.js +0 -293
  586. /package/{packages/agent → apps/app-lifeops}/src/inbox/channel-deep-links.d.ts +0 -0
  587. /package/{packages/agent → apps/app-lifeops}/src/inbox/channel-deep-links.js +0 -0
  588. /package/{packages/agent → apps/app-lifeops}/src/inbox/config.d.ts +0 -0
  589. /package/{packages/agent → apps/app-lifeops}/src/inbox/message-fetcher.d.ts +0 -0
  590. /package/{packages/agent → apps/app-lifeops}/src/inbox/message-fetcher.js +0 -0
  591. /package/{packages/agent → apps/app-lifeops}/src/inbox/reflection.d.ts +0 -0
  592. /package/{packages/agent → apps/app-lifeops}/src/inbox/reflection.js +0 -0
  593. /package/{packages/agent → apps/app-lifeops}/src/inbox/repository.d.ts +0 -0
  594. /package/{packages/agent → apps/app-lifeops}/src/inbox/repository.js +0 -0
  595. /package/{packages/agent → apps/app-lifeops}/src/inbox/triage-classifier.d.ts +0 -0
  596. /package/{packages/agent → apps/app-lifeops}/src/inbox/triage-classifier.js +0 -0
  597. /package/{packages/agent → apps/app-lifeops}/src/inbox/types.d.ts +0 -0
  598. /package/{packages/agent → apps/app-lifeops}/src/inbox/types.js +0 -0
@@ -1,738 +0,0 @@
1
- /**
2
- * Task-agent framework discovery and preference resolution.
3
- *
4
- * Detects installed CLIs, available auth, and Eliza subscription preferences so
5
- * the orchestrator can choose the best framework when the caller does not
6
- * specify one explicitly.
7
- *
8
- * @module services/task-agent-frameworks
9
- */
10
- import { execFileSync } from "node:child_process";
11
- import fs from "node:fs";
12
- import os from "node:os";
13
- import path from "node:path";
14
- import { readConfigCloudKey, readConfigEnvKey } from "./config-env.js";
15
- const RESEARCH_SIGNAL_RE = /\b(research|investigate|analy[sz]e|analysis|compare|evaluate|review|study|summari[sz]e|deep research|look into|explore)\b/i;
16
- const PLANNING_SIGNAL_RE = /\b(plan|planning|roadmap|strategy|spec|architecture|design|scope|milestone|sequence|timeline)\b/i;
17
- const OPS_SIGNAL_RE = /\b(deploy|release|ship|rollback|monitor|incident|infra|infrastructure|configure|setup|docker|kubernetes|ci|cd|runbook)\b/i;
18
- const IMPLEMENTATION_SIGNAL_RE = /\b(code|coding|implement|fix|debug|refactor|write|build|patch|feature|server|api|component|function|typescrip?t|javascript|react)\b/i;
19
- const VERIFICATION_SIGNAL_RE = /\b(test|tests|verify|validation|prove|acceptance|check|regression|benchmark|lint|typecheck|qa)\b/i;
20
- const COORDINATION_SIGNAL_RE = /\b(parallel|delegate|subagent|sub-agent|swarm|coordinate|coordination|handoff|mailbox|scheduler|orchestrate)\b/i;
21
- const REPO_SIGNAL_RE = /\b(repo|repository|branch|commit|pull request|pr|diff|workspace|file|directory|codebase)\b/i;
22
- const FAST_ITERATION_SIGNAL_RE = /\b(fix|debug|patch|flaky|quick|fast|iterate|loop|unblock|repair)\b/i;
23
- const FRAMEWORK_CAPABILITY_PROFILES = {
24
- claude: {
25
- implementation: 0.95,
26
- research: 0.95,
27
- planning: 1,
28
- ops: 0.8,
29
- verification: 0.85,
30
- coordination: 1,
31
- repoWork: 0.9,
32
- fastIteration: 0.75,
33
- },
34
- codex: {
35
- implementation: 1,
36
- research: 0.8,
37
- planning: 0.75,
38
- ops: 0.85,
39
- verification: 1,
40
- coordination: 0.9,
41
- repoWork: 1,
42
- fastIteration: 0.95,
43
- },
44
- gemini: {
45
- implementation: 0.7,
46
- research: 1,
47
- planning: 0.95,
48
- ops: 0.7,
49
- verification: 0.6,
50
- coordination: 0.7,
51
- repoWork: 0.65,
52
- fastIteration: 0.7,
53
- },
54
- aider: {
55
- implementation: 0.9,
56
- research: 0.45,
57
- planning: 0.45,
58
- ops: 0.75,
59
- verification: 0.85,
60
- coordination: 0.35,
61
- repoWork: 0.95,
62
- fastIteration: 1,
63
- },
64
- pi: {
65
- implementation: 0.55,
66
- research: 0.5,
67
- planning: 0.55,
68
- ops: 0.5,
69
- verification: 0.5,
70
- coordination: 0.35,
71
- repoWork: 0.5,
72
- fastIteration: 0.5,
73
- },
74
- };
75
- const FRAMEWORK_LABELS = {
76
- claude: "Claude Code",
77
- codex: "Codex",
78
- gemini: "Gemini CLI",
79
- aider: "Aider",
80
- pi: "Pi",
81
- };
82
- const STANDARD_FRAMEWORKS = [
83
- "claude",
84
- "codex",
85
- "gemini",
86
- "aider",
87
- ];
88
- const TASK_AGENT_COMPLEXITY_RE = /\b(repo|repository|code|coding|debug|fix|implement|investigate|research|analyze|analysis|summarize|summary|write|draft|document|plan|workflow|automation|parallel|delegate|subtask|agent|orchestrate|coordinate|compare|test|tests|pull request|pr\b|branch|commit)\b/i;
89
- let frameworkStateCache;
90
- const frameworkCooldowns = new Map();
91
- const TASK_AGENT_USAGE_EXHAUSTED_RE = /\b(insufficient(?:[_\s]+(?:credits?|quota))|insufficient_quota|out of credits|credit balance|usage (?:has )?(?:reached|exceeded)|(?:you(?:'ve| have)? hit your usage limits?)|usage[-\s]?limits?|quota exceeded|payment required|status(?:code)?[:\s]*402)\b/i;
92
- function normalizePreflightAdapterId(value) {
93
- const normalized = value?.trim().toLowerCase();
94
- switch (normalized) {
95
- case "claude":
96
- case "claude code":
97
- return "claude";
98
- case "codex":
99
- case "openai codex":
100
- return "codex";
101
- case "gemini":
102
- case "gemini cli":
103
- return "gemini";
104
- case "aider":
105
- return "aider";
106
- default:
107
- return null;
108
- }
109
- }
110
- function safeGetSetting(runtime, key) {
111
- // Check the config file first (UI writes here, takes effect without restart),
112
- // then fall back to runtime/character settings.
113
- try {
114
- const fromConfig = readConfigEnvKey(key);
115
- if (fromConfig?.trim())
116
- return fromConfig.trim();
117
- }
118
- catch {
119
- // ignore — fall through to runtime
120
- }
121
- if (!runtime)
122
- return undefined;
123
- try {
124
- const value = runtime.getSetting(key);
125
- return typeof value === "string" && value.trim() ? value.trim() : undefined;
126
- }
127
- catch {
128
- return undefined;
129
- }
130
- }
131
- function getPreflightAuthStatus(result) {
132
- const auth = result && typeof result === "object"
133
- ? result.auth
134
- : undefined;
135
- const status = typeof auth?.status === "string" ? auth.status : "";
136
- if (status === "authenticated" || status === "unauthenticated") {
137
- return status;
138
- }
139
- return "unknown";
140
- }
141
- function getUserHomeDir() {
142
- return (process.env.HOME?.trim() || process.env.USERPROFILE?.trim() || os.homedir());
143
- }
144
- function readJsonFile(filePath) {
145
- try {
146
- return JSON.parse(fs.readFileSync(filePath, "utf8"));
147
- }
148
- catch {
149
- return null;
150
- }
151
- }
152
- function extractOauthAccessToken(value) {
153
- if (!value || typeof value !== "object" || Array.isArray(value))
154
- return;
155
- const record = value;
156
- const direct = record.accessToken ?? record.access_token;
157
- if (typeof direct === "string" && direct.trim()) {
158
- return direct.trim();
159
- }
160
- for (const nested of Object.values(record)) {
161
- const token = extractOauthAccessToken(nested);
162
- if (token)
163
- return token;
164
- }
165
- return;
166
- }
167
- function resolveElizaConfigPath() {
168
- const explicit = process.env.ELIZA_CONFIG_PATH?.trim() ||
169
- process.env.ELIZA_CONFIG_PATH?.trim();
170
- if (explicit)
171
- return explicit;
172
- const stateDir = process.env.ELIZA_STATE_DIR?.trim() ||
173
- process.env.ELIZA_STATE_DIR?.trim() ||
174
- path.join(getUserHomeDir(), ".eliza");
175
- const namespace = process.env.ELIZA_NAMESPACE?.trim();
176
- const filename = !namespace || namespace === "eliza" ? "eliza.json" : `${namespace}.json`;
177
- return path.join(stateDir, filename);
178
- }
179
- function readConfiguredSubscriptionProvider() {
180
- const config = readJsonFile(resolveElizaConfigPath());
181
- if (!config || typeof config !== "object" || Array.isArray(config))
182
- return;
183
- const agents = config.agents;
184
- if (!agents || typeof agents !== "object" || Array.isArray(agents))
185
- return;
186
- const defaults = agents.defaults;
187
- if (!defaults || typeof defaults !== "object" || Array.isArray(defaults))
188
- return;
189
- const provider = defaults.subscriptionProvider;
190
- return typeof provider === "string" && provider.trim()
191
- ? provider.trim()
192
- : undefined;
193
- }
194
- function hasClaudeSubscriptionAuth() {
195
- const credentialsPath = path.join(getUserHomeDir(), ".claude", ".credentials.json");
196
- const fileToken = extractOauthAccessToken(readJsonFile(credentialsPath));
197
- if (fileToken)
198
- return true;
199
- if (process.platform !== "darwin")
200
- return false;
201
- try {
202
- const raw = execFileSync("security", ["find-generic-password", "-s", "Claude Code-credentials", "-w"], { encoding: "utf8", timeout: 3000, stdio: ["ignore", "pipe", "ignore"] }).trim();
203
- if (!raw)
204
- return false;
205
- return Boolean(extractOauthAccessToken(JSON.parse(raw)));
206
- }
207
- catch {
208
- return false;
209
- }
210
- }
211
- function hasClaudeApiKey(runtime) {
212
- return Boolean(process.env.ANTHROPIC_API_KEY?.trim() ||
213
- safeGetSetting(runtime, "ANTHROPIC_API_KEY"));
214
- }
215
- function hasCodexSubscriptionAuth() {
216
- const authPath = path.join(getUserHomeDir(), ".codex", "auth.json");
217
- const auth = readJsonFile(authPath);
218
- if (!auth || typeof auth !== "object" || Array.isArray(auth))
219
- return false;
220
- const key = auth.OPENAI_API_KEY;
221
- return typeof key === "string" && key.trim().length > 0;
222
- }
223
- function hasCodexApiKey(runtime) {
224
- return Boolean(process.env.OPENAI_API_KEY?.trim() ||
225
- safeGetSetting(runtime, "OPENAI_API_KEY"));
226
- }
227
- function hasGeminiCredential(runtime) {
228
- return Boolean(process.env.GOOGLE_GENERATIVE_AI_API_KEY?.trim() ||
229
- process.env.GOOGLE_API_KEY?.trim() ||
230
- safeGetSetting(runtime, "GOOGLE_GENERATIVE_AI_API_KEY") ||
231
- safeGetSetting(runtime, "GOOGLE_API_KEY"));
232
- }
233
- /**
234
- * Check whether eliza has a paired Eliza Cloud API key. Used to mark
235
- * Anthropic/OpenAI-backed task agents as auth-ready when LLM provider is
236
- * "cloud" — they'll route through the cloud proxy at spawn time.
237
- */
238
- function hasElizaCloudApiKey() {
239
- return Boolean(readConfigCloudKey("apiKey"));
240
- }
241
- function hasPiBinary() {
242
- return hasBinaryOnPath("pi");
243
- }
244
- function hasBinaryOnPath(binaryName) {
245
- const command = process.platform === "win32" ? "where" : "which";
246
- const args = [binaryName];
247
- try {
248
- execFileSync(command, args, {
249
- encoding: "utf8",
250
- timeout: 1500,
251
- stdio: ["ignore", "pipe", "ignore"],
252
- });
253
- return true;
254
- }
255
- catch {
256
- return false;
257
- }
258
- }
259
- function hasFrameworkBinary(id) {
260
- switch (id) {
261
- case "claude":
262
- return hasBinaryOnPath("claude");
263
- case "codex":
264
- return hasBinaryOnPath("codex");
265
- case "gemini":
266
- return hasBinaryOnPath("gemini");
267
- case "aider":
268
- return hasBinaryOnPath("aider");
269
- }
270
- }
271
- function getFrameworkCooldown(id) {
272
- const cooldown = frameworkCooldowns.get(id);
273
- if (!cooldown)
274
- return undefined;
275
- if (cooldown.until <= Date.now()) {
276
- frameworkCooldowns.delete(id);
277
- return undefined;
278
- }
279
- return cooldown;
280
- }
281
- async function computeTaskAgentFrameworkState(runtime, probe, profileInput) {
282
- const configuredSubscriptionProvider = readConfiguredSubscriptionProvider();
283
- const preflightByAdapter = new Map();
284
- if (probe?.checkAvailableAgents) {
285
- try {
286
- const results = await probe.checkAvailableAgents(STANDARD_FRAMEWORKS);
287
- // checkAdapters returns `adapter` as the human-readable display name
288
- // (e.g. "Claude Code", "OpenAI Codex"), not the lowercase ID. Map back
289
- // to the canonical framework ID via case-insensitive substring match.
290
- for (const result of results) {
291
- const adapterId = normalizePreflightAdapterId(result.adapter);
292
- if (adapterId) {
293
- preflightByAdapter.set(adapterId, result);
294
- }
295
- }
296
- }
297
- catch {
298
- // Keep status surfaces alive even if preflight fails transiently.
299
- }
300
- }
301
- // When the user has selected Eliza Cloud as the LLM provider and has a
302
- // paired cloud.apiKey, treat Claude/Codex/Aider as fully auth-ready —
303
- // they'll route through the cloud proxy at spawn time.
304
- const llmProvider = readConfigEnvKey("PARALLAX_LLM_PROVIDER") || "subscription";
305
- const cloudReady = llmProvider === "cloud" && hasElizaCloudApiKey();
306
- const claudePreflightAuth = getPreflightAuthStatus(preflightByAdapter.get("claude"));
307
- const codexPreflightAuth = getPreflightAuthStatus(preflightByAdapter.get("codex"));
308
- const geminiPreflightAuth = getPreflightAuthStatus(preflightByAdapter.get("gemini"));
309
- const aiderPreflightAuth = getPreflightAuthStatus(preflightByAdapter.get("aider"));
310
- const claudeSubscriptionReady = claudePreflightAuth === "authenticated" || hasClaudeSubscriptionAuth();
311
- const claudeAuthReady = cloudReady || claudeSubscriptionReady || hasClaudeApiKey(runtime);
312
- const codexSubscriptionReady = codexPreflightAuth === "authenticated" || hasCodexSubscriptionAuth();
313
- const codexAuthReady = cloudReady || codexSubscriptionReady || hasCodexApiKey(runtime);
314
- // Eliza Cloud doesn't proxy Gemini, so cloud mode does NOT make Gemini auth-ready
315
- const geminiAuthReady = geminiPreflightAuth === "authenticated" || hasGeminiCredential(runtime);
316
- const aiderAuthReady = cloudReady ||
317
- aiderPreflightAuth === "authenticated" ||
318
- claudeAuthReady ||
319
- codexAuthReady ||
320
- geminiAuthReady;
321
- const piReady = hasPiBinary();
322
- const providerPrefersClaude = configuredSubscriptionProvider === "anthropic-subscription";
323
- const providerPrefersCodex = configuredSubscriptionProvider === "openai-codex" ||
324
- configuredSubscriptionProvider === "openai-subscription";
325
- const inventory = STANDARD_FRAMEWORKS.map((id) => {
326
- const preflight = preflightByAdapter.get(id);
327
- const cooldown = getFrameworkCooldown(id);
328
- const installed = preflight?.installed === true || hasFrameworkBinary(id);
329
- const subscriptionReady = id === "claude"
330
- ? claudeSubscriptionReady
331
- : id === "codex"
332
- ? codexSubscriptionReady
333
- : false;
334
- const authReady = id === "claude"
335
- ? claudeAuthReady
336
- : id === "codex"
337
- ? codexAuthReady
338
- : id === "gemini"
339
- ? geminiAuthReady
340
- : aiderAuthReady;
341
- const reason = id === "claude" && subscriptionReady
342
- ? "ready to use the user's Claude subscription"
343
- : id === "codex" && subscriptionReady
344
- ? "ready to use the user's OpenAI subscription"
345
- : installed
346
- ? authReady
347
- ? "installed with credentials available"
348
- : "installed but credentials were not detected"
349
- : "CLI not detected";
350
- return {
351
- id,
352
- label: FRAMEWORK_LABELS[id],
353
- installed,
354
- authReady,
355
- subscriptionReady,
356
- temporarilyDisabled: Boolean(cooldown),
357
- temporarilyDisabledUntil: cooldown?.until,
358
- temporarilyDisabledReason: cooldown?.reason,
359
- recommended: false,
360
- reason: cooldown
361
- ? `${reason}; temporarily disabled after a provider failure: ${cooldown.reason}`
362
- : reason,
363
- installCommand: preflight?.installCommand,
364
- docsUrl: preflight?.docsUrl,
365
- };
366
- });
367
- inventory.push({
368
- id: "pi",
369
- label: FRAMEWORK_LABELS.pi,
370
- installed: piReady,
371
- authReady: piReady,
372
- subscriptionReady: false,
373
- temporarilyDisabled: false,
374
- recommended: false,
375
- reason: piReady ? "CLI detected" : "CLI not detected",
376
- });
377
- const frameworks = inventory.map((framework) => ({
378
- ...framework,
379
- recommended: false,
380
- }));
381
- const metrics = probe?.getAgentMetrics?.() ?? {};
382
- const profile = buildTaskAgentTaskProfile(profileInput);
383
- const explicitDefault = safeGetSetting(runtime, "PARALLAX_DEFAULT_AGENT_TYPE")
384
- ?.toLowerCase()
385
- .trim();
386
- const selectable = frameworks.filter((framework) => framework.installed && !framework.temporarilyDisabled);
387
- const candidates = selectable.length > 0
388
- ? selectable
389
- : frameworks.filter((framework) => framework.installed);
390
- const scoredCandidates = candidates.map((framework) => {
391
- const explicitOverride = explicitDefault === framework.id
392
- ? framework.installed && !framework.temporarilyDisabled
393
- ? 40
394
- : 0
395
- : 0;
396
- const providerPreference = providerPrefersClaude && framework.id === "claude"
397
- ? framework.subscriptionReady
398
- ? 18
399
- : 6
400
- : providerPrefersCodex && framework.id === "codex"
401
- ? framework.subscriptionReady
402
- ? 18
403
- : 6
404
- : 0;
405
- const availabilityScore = (framework.installed ? 40 : -100) +
406
- (framework.authReady ? 18 : -25) +
407
- (framework.subscriptionReady ? 8 : 0) +
408
- (framework.temporarilyDisabled ? -80 : 0);
409
- const profileScore = computeProfileFitScore(framework.id, profile);
410
- const metricsScore = computeMetricsScore(metrics[framework.id], profile.signals.fastIteration);
411
- const selectionSignals = {
412
- availability: availabilityScore,
413
- profile: profileScore,
414
- provider: providerPreference,
415
- metrics: metricsScore,
416
- explicitOverride,
417
- };
418
- return {
419
- framework,
420
- score: Object.values(selectionSignals).reduce((sum, value) => sum + value, 0),
421
- selectionSignals,
422
- };
423
- });
424
- const fallback = candidates[0] ??
425
- frameworks.find((framework) => framework.installed) ??
426
- frameworks[0];
427
- const preferredCandidate = scoredCandidates.sort((left, right) => {
428
- if (right.score !== left.score) {
429
- return right.score - left.score;
430
- }
431
- return left.framework.id.localeCompare(right.framework.id);
432
- })[0]?.framework ?? fallback;
433
- const preferredSignals = scoredCandidates.find((entry) => entry.framework.id === preferredCandidate.id)?.selectionSignals ?? {};
434
- const preferred = {
435
- id: preferredCandidate.id,
436
- reason: buildPreferredReason(preferredCandidate, profile, preferredSignals, explicitDefault, configuredSubscriptionProvider),
437
- };
438
- for (const framework of frameworks) {
439
- framework.recommended = framework.id === preferred.id;
440
- const scored = scoredCandidates.find((entry) => entry.framework.id === framework.id);
441
- if (scored) {
442
- framework.selectionScore = scored.score;
443
- framework.selectionSignals = scored.selectionSignals;
444
- }
445
- }
446
- return {
447
- configuredSubscriptionProvider,
448
- frameworks,
449
- preferred,
450
- };
451
- }
452
- export async function getTaskAgentFrameworkState(runtime, probe, profileInput) {
453
- if (frameworkStateCache && frameworkStateCache.expiresAt > Date.now()) {
454
- return computeTaskAgentFrameworkStateFromInventory(runtime, frameworkStateCache.value, probe, profileInput);
455
- }
456
- const value = await computeTaskAgentFrameworkState(runtime, probe, profileInput);
457
- if (!profileInput) {
458
- frameworkStateCache = {
459
- expiresAt: Date.now() + 15_000,
460
- value: {
461
- configuredSubscriptionProvider: value.configuredSubscriptionProvider,
462
- frameworks: value.frameworks.map((framework) => ({
463
- ...framework,
464
- recommended: false,
465
- selectionScore: undefined,
466
- selectionSignals: undefined,
467
- })),
468
- },
469
- };
470
- }
471
- return value;
472
- }
473
- function computeTaskAgentFrameworkStateFromInventory(runtime, inventory, probe, profileInput) {
474
- const clonedProbe = {
475
- ...probe,
476
- checkAvailableAgents: undefined,
477
- };
478
- frameworkStateCache = {
479
- expiresAt: Date.now() + 15_000,
480
- value: inventory,
481
- };
482
- return {
483
- ...computeTaskAgentFrameworkStateFromCachedInventory(runtime, inventory, clonedProbe, profileInput),
484
- };
485
- }
486
- function computeTaskAgentFrameworkStateFromCachedInventory(runtime, inventory, probe, profileInput) {
487
- const metrics = probe?.getAgentMetrics?.() ?? {};
488
- const frameworks = inventory.frameworks.map((framework) => ({
489
- ...framework,
490
- recommended: false,
491
- }));
492
- const profile = buildTaskAgentTaskProfile(profileInput);
493
- const configuredSubscriptionProvider = inventory.configuredSubscriptionProvider;
494
- const providerPrefersClaude = configuredSubscriptionProvider === "anthropic-subscription";
495
- const providerPrefersCodex = configuredSubscriptionProvider === "openai-codex" ||
496
- configuredSubscriptionProvider === "openai-subscription";
497
- const explicitDefault = safeGetSetting(runtime, "PARALLAX_DEFAULT_AGENT_TYPE")
498
- ?.toLowerCase()
499
- .trim();
500
- const candidates = frameworks.filter((framework) => framework.installed && !framework.temporarilyDisabled).length > 0
501
- ? frameworks.filter((framework) => framework.installed && !framework.temporarilyDisabled)
502
- : frameworks.filter((framework) => framework.installed);
503
- const scoredCandidates = candidates.map((framework) => {
504
- const explicitOverride = explicitDefault === framework.id
505
- ? framework.installed && !framework.temporarilyDisabled
506
- ? 40
507
- : 0
508
- : 0;
509
- const providerPreference = providerPrefersClaude && framework.id === "claude"
510
- ? framework.subscriptionReady
511
- ? 18
512
- : 6
513
- : providerPrefersCodex && framework.id === "codex"
514
- ? framework.subscriptionReady
515
- ? 18
516
- : 6
517
- : 0;
518
- const availabilityScore = (framework.installed ? 40 : -100) +
519
- (framework.authReady ? 18 : -25) +
520
- (framework.subscriptionReady ? 8 : 0) +
521
- (framework.temporarilyDisabled ? -80 : 0);
522
- const profileScore = computeProfileFitScore(framework.id, profile);
523
- const metricsScore = computeMetricsScore(metrics[framework.id], profile.signals.fastIteration);
524
- const selectionSignals = {
525
- availability: availabilityScore,
526
- profile: profileScore,
527
- provider: providerPreference,
528
- metrics: metricsScore,
529
- explicitOverride,
530
- };
531
- return {
532
- framework,
533
- score: Object.values(selectionSignals).reduce((sum, value) => sum + value, 0),
534
- selectionSignals,
535
- };
536
- });
537
- const fallback = candidates[0] ??
538
- frameworks.find((framework) => framework.installed) ??
539
- frameworks[0];
540
- const preferredCandidate = scoredCandidates.sort((left, right) => {
541
- if (right.score !== left.score) {
542
- return right.score - left.score;
543
- }
544
- return left.framework.id.localeCompare(right.framework.id);
545
- })[0]?.framework ?? fallback;
546
- const preferredSignals = scoredCandidates.find((entry) => entry.framework.id === preferredCandidate.id)?.selectionSignals ?? {};
547
- const preferred = {
548
- id: preferredCandidate.id,
549
- reason: buildPreferredReason(preferredCandidate, profile, preferredSignals, explicitDefault, configuredSubscriptionProvider),
550
- };
551
- for (const framework of frameworks) {
552
- framework.recommended = framework.id === preferred.id;
553
- const scored = scoredCandidates.find((entry) => entry.framework.id === framework.id);
554
- if (scored) {
555
- framework.selectionScore = scored.score;
556
- framework.selectionSignals = scored.selectionSignals;
557
- }
558
- }
559
- frameworkStateCache = {
560
- expiresAt: Date.now() + 15_000,
561
- value: inventory,
562
- };
563
- return {
564
- configuredSubscriptionProvider,
565
- frameworks,
566
- preferred,
567
- };
568
- }
569
- function clampSignal(value) {
570
- return Math.max(0, Math.min(1, value));
571
- }
572
- function kindBoost(kind, target) {
573
- if (kind === "mixed")
574
- return 0.25;
575
- return kind === target ? 0.4 : 0;
576
- }
577
- export function buildTaskAgentTaskProfile(input) {
578
- const text = [
579
- input?.task?.trim(),
580
- input?.repo?.trim(),
581
- ...(input?.acceptanceCriteria ?? []).map((value) => value.trim()),
582
- ]
583
- .filter((value) => Boolean(value))
584
- .join("\n");
585
- const inferredKind = input?.threadKind ??
586
- (OPS_SIGNAL_RE.test(text)
587
- ? "ops"
588
- : PLANNING_SIGNAL_RE.test(text)
589
- ? "planning"
590
- : RESEARCH_SIGNAL_RE.test(text) && !IMPLEMENTATION_SIGNAL_RE.test(text)
591
- ? "research"
592
- : IMPLEMENTATION_SIGNAL_RE.test(text)
593
- ? "coding"
594
- : RESEARCH_SIGNAL_RE.test(text)
595
- ? "mixed"
596
- : "coding");
597
- const repoPresent = Boolean(input?.repo?.trim() || input?.workdir?.trim());
598
- const subtaskCount = Math.max(1, input?.subtaskCount ?? 1);
599
- const signals = {
600
- implementation: clampSignal((IMPLEMENTATION_SIGNAL_RE.test(text) ? 0.7 : 0.2) +
601
- (repoPresent ? 0.15 : 0) +
602
- kindBoost(inferredKind, "coding")),
603
- research: clampSignal((RESEARCH_SIGNAL_RE.test(text) ? 0.7 : 0.1) +
604
- kindBoost(inferredKind, "research")),
605
- planning: clampSignal((PLANNING_SIGNAL_RE.test(text) ? 0.75 : 0.1) +
606
- kindBoost(inferredKind, "planning")),
607
- ops: clampSignal((OPS_SIGNAL_RE.test(text) ? 0.75 : 0.05) + kindBoost(inferredKind, "ops")),
608
- verification: clampSignal((VERIFICATION_SIGNAL_RE.test(text) ? 0.8 : 0.15) +
609
- ((input?.acceptanceCriteria?.length ?? 0) > 0 ? 0.15 : 0)),
610
- coordination: clampSignal((COORDINATION_SIGNAL_RE.test(text) ? 0.7 : 0.05) +
611
- (subtaskCount > 1 ? 0.25 : 0)),
612
- repoWork: clampSignal((REPO_SIGNAL_RE.test(text) ? 0.7 : 0.1) + (repoPresent ? 0.25 : 0)),
613
- fastIteration: clampSignal((FAST_ITERATION_SIGNAL_RE.test(text) ? 0.75 : 0.15) +
614
- (inferredKind === "coding" ? 0.1 : 0)),
615
- };
616
- return {
617
- text,
618
- kind: inferredKind,
619
- subtaskCount,
620
- repoPresent,
621
- signals,
622
- };
623
- }
624
- function computeProfileFitScore(frameworkId, profile) {
625
- const capability = FRAMEWORK_CAPABILITY_PROFILES[frameworkId];
626
- const weightedSum = profile.signals.implementation * capability.implementation * 18 +
627
- profile.signals.research * capability.research * 16 +
628
- profile.signals.planning * capability.planning * 14 +
629
- profile.signals.ops * capability.ops * 12 +
630
- profile.signals.verification * capability.verification * 14 +
631
- profile.signals.coordination * capability.coordination * 14 +
632
- profile.signals.repoWork * capability.repoWork * 10 +
633
- profile.signals.fastIteration * capability.fastIteration * 10;
634
- return Math.round(weightedSum);
635
- }
636
- function computeMetricsScore(metrics, fastIterationSignal) {
637
- if (!metrics || metrics.spawned === 0) {
638
- return 0;
639
- }
640
- const successRate = metrics.spawned > 0 ? metrics.completed / metrics.spawned : 0;
641
- const stallRate = metrics.spawned > 0 ? metrics.stallCount / metrics.spawned : 0;
642
- const durationBonus = metrics.completed > 0
643
- ? Math.max(-8, Math.min(8, ((120_000 - metrics.avgCompletionMs) / 120_000) *
644
- (4 + fastIterationSignal * 4)))
645
- : 0;
646
- return Math.round(successRate * 14 - stallRate * 12 + durationBonus);
647
- }
648
- function buildPreferredReason(framework, profile, selectionSignals, explicitDefault, configuredSubscriptionProvider) {
649
- const dominantSignals = Object.entries(profile.signals)
650
- .sort((left, right) => right[1] - left[1])
651
- .slice(0, 2)
652
- .map(([key]) => key);
653
- if (explicitDefault === framework.id &&
654
- selectionSignals.explicitOverride > 0) {
655
- return `explicit PARALLAX_DEFAULT_AGENT_TYPE override, with ${FRAMEWORK_LABELS[framework.id]} still scoring well for ${dominantSignals.join(" + ")} work`;
656
- }
657
- if (configuredSubscriptionProvider === "anthropic-subscription" &&
658
- framework.id === "claude" &&
659
- framework.subscriptionReady) {
660
- return `best fit for ${dominantSignals.join(" + ")} work while honoring the configured Claude subscription`;
661
- }
662
- if ((configuredSubscriptionProvider === "openai-codex" ||
663
- configuredSubscriptionProvider === "openai-subscription") &&
664
- framework.id === "codex" &&
665
- framework.subscriptionReady) {
666
- return `best fit for ${dominantSignals.join(" + ")} work while honoring the configured OpenAI subscription`;
667
- }
668
- if (framework.subscriptionReady) {
669
- return `best overall score for ${dominantSignals.join(" + ")} work with subscription-backed auth already available`;
670
- }
671
- if (framework.authReady) {
672
- return `best overall score for ${dominantSignals.join(" + ")} work with credentials already available`;
673
- }
674
- return `selected as the highest-scoring installed framework for ${dominantSignals.join(" + ")} work`;
675
- }
676
- export function clearTaskAgentFrameworkStateCache() {
677
- frameworkStateCache = undefined;
678
- }
679
- export function isUsageExhaustedTaskAgentError(text) {
680
- return TASK_AGENT_USAGE_EXHAUSTED_RE.test(text);
681
- }
682
- export function markTaskAgentFrameworkUnavailable(id, reason, cooldownMs = 30 * 60 * 1000) {
683
- frameworkCooldowns.set(id, {
684
- until: Date.now() + cooldownMs,
685
- reason,
686
- });
687
- clearTaskAgentFrameworkStateCache();
688
- }
689
- export function markTaskAgentFrameworkHealthy(id) {
690
- if (frameworkCooldowns.delete(id)) {
691
- clearTaskAgentFrameworkStateCache();
692
- }
693
- }
694
- export function formatTaskAgentFrameworkLine(framework) {
695
- const parts = [
696
- framework.installed ? "installed" : "not installed",
697
- framework.authReady ? "credentials ready" : "credentials missing",
698
- ];
699
- if (framework.subscriptionReady) {
700
- parts.push("uses the user's subscription");
701
- }
702
- if (framework.temporarilyDisabled) {
703
- parts.push("temporarily disabled");
704
- }
705
- if (framework.recommended) {
706
- parts.push("recommended");
707
- }
708
- return `- ${framework.label}: ${parts.join(", ")}. ${framework.reason}.`;
709
- }
710
- export function looksLikeTaskAgentRequest(text) {
711
- return TASK_AGENT_COMPLEXITY_RE.test(text);
712
- }
713
- export function formatTaskAgentStatus(status) {
714
- switch (status) {
715
- case "ready":
716
- return "idle";
717
- case "busy":
718
- return "working";
719
- case "starting":
720
- return "starting";
721
- case "authenticating":
722
- return "authenticating";
723
- default:
724
- return status;
725
- }
726
- }
727
- export function truncateTaskAgentText(text, max = 120) {
728
- const trimmed = text.trim().replace(/\s+/g, " ");
729
- return trimmed.length > max ? `${trimmed.slice(0, max - 1)}...` : trimmed;
730
- }
731
- export function rewriteTaskAgentText(text) {
732
- return text
733
- .replace(/\bcoding agents\b/gi, "task agents")
734
- .replace(/\bcoding agent\b/gi, "task agent")
735
- .replace(/\bcoding sessions\b/gi, "task-agent sessions")
736
- .replace(/\bcoding session\b/gi, "task-agent session");
737
- }
738
- export { FRAMEWORK_LABELS as TASK_AGENT_FRAMEWORK_LABELS };