@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,49 +0,0 @@
1
- /**
2
- * Session I/O helpers — extracted from PTYService for maintainability.
3
- *
4
- * Standalone functions for sending input/keys to sessions and stopping
5
- * sessions. Each function takes a {@link SessionIOContext} that provides
6
- * the manager instance and shared state maps.
7
- *
8
- * @module services/pty-session-io
9
- */
10
- import type { BunCompatiblePTYManager, PTYManager, SessionMessage } from "pty-manager";
11
- /**
12
- * Shared context required by all session I/O functions.
13
- * Built inline from PTYService instance fields.
14
- */
15
- export interface SessionIOContext {
16
- manager: PTYManager | BunCompatiblePTYManager;
17
- usingBunWorker: boolean;
18
- sessionOutputBuffers: Map<string, string[]>;
19
- taskResponseMarkers: Map<string, number>;
20
- outputUnsubscribers: Map<string, () => void>;
21
- }
22
- /**
23
- * Send text input to a session.
24
- *
25
- * Marks the buffer position for task response capture, then writes the
26
- * input via the appropriate manager API.
27
- */
28
- export declare function sendToSession(ctx: SessionIOContext, sessionId: string, input: string): Promise<SessionMessage | undefined>;
29
- /**
30
- * Send key sequences to a session (for special keys like arrows, enter, etc.).
31
- */
32
- export declare function sendKeysToSession(ctx: SessionIOContext, sessionId: string, keys: string | string[]): Promise<void>;
33
- /**
34
- * Stop a PTY session and clean up all associated state.
35
- *
36
- * @param force - When true, sends SIGKILL immediately instead of SIGTERM.
37
- * Use for sessions whose task is already complete — there's nothing to save.
38
- */
39
- export declare function stopSession(ctx: SessionIOContext, sessionId: string, sessionMetadata: Map<string, Record<string, unknown>>, sessionWorkdirs: Map<string, string>, log: (msg: string) => void, force?: boolean): Promise<void>;
40
- /**
41
- * Subscribe to live output from a session.
42
- * Returns an unsubscribe function.
43
- */
44
- export declare function subscribeToOutput(ctx: SessionIOContext, sessionId: string, callback: (data: string) => void): () => void;
45
- /**
46
- * Get buffered or logged output from a session.
47
- */
48
- export declare function getSessionOutput(ctx: SessionIOContext, sessionId: string, lines?: number): Promise<string>;
49
- //# sourceMappingURL=pty-session-io.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pty-session-io.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/pty-session-io.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACX,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,UAAU,GAAG,uBAAuB,CAAC;IAC9C,cAAc,EAAE,OAAO,CAAC;IACxB,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAClC,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAoBrC;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACtC,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GACrB,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAChC,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACrD,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC1B,KAAK,UAAQ,GACX,OAAO,CAAC,IAAI,CAAC,CAqDf;AAkCD;;;GAGG;AACH,wBAAgB,iBAAiB,CAChC,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC9B,MAAM,IAAI,CAiBZ;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACrC,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CAejB"}
@@ -1,180 +0,0 @@
1
- /**
2
- * Session I/O helpers — extracted from PTYService for maintainability.
3
- *
4
- * Standalone functions for sending input/keys to sessions and stopping
5
- * sessions. Each function takes a {@link SessionIOContext} that provides
6
- * the manager instance and shared state maps.
7
- *
8
- * @module services/pty-session-io
9
- */
10
- import { readFile, writeFile } from "node:fs/promises";
11
- import { join } from "node:path";
12
- /**
13
- * Send text input to a session.
14
- *
15
- * Marks the buffer position for task response capture, then writes the
16
- * input via the appropriate manager API.
17
- */
18
- export async function sendToSession(ctx, sessionId, input) {
19
- const session = ctx.manager.get(sessionId);
20
- if (!session) {
21
- throw new Error(`Session ${sessionId} not found`);
22
- }
23
- // Mark buffer position for task response capture
24
- const buffer = ctx.sessionOutputBuffers.get(sessionId);
25
- if (buffer) {
26
- ctx.taskResponseMarkers.set(sessionId, buffer.length);
27
- }
28
- if (ctx.usingBunWorker) {
29
- // BunCompatiblePTYManager.send returns void
30
- await ctx.manager.send(sessionId, input);
31
- return;
32
- }
33
- else {
34
- // PTYManager.send returns SessionMessage
35
- return ctx.manager.send(sessionId, input);
36
- }
37
- }
38
- /**
39
- * Send key sequences to a session (for special keys like arrows, enter, etc.).
40
- */
41
- export async function sendKeysToSession(ctx, sessionId, keys) {
42
- if (ctx.usingBunWorker) {
43
- await ctx.manager.sendKeys(sessionId, keys);
44
- }
45
- else {
46
- const ptySession = ctx.manager.getSession(sessionId);
47
- if (!ptySession) {
48
- throw new Error(`Session ${sessionId} not found`);
49
- }
50
- ptySession.sendKeys(keys);
51
- }
52
- }
53
- /**
54
- * Stop a PTY session and clean up all associated state.
55
- *
56
- * @param force - When true, sends SIGKILL immediately instead of SIGTERM.
57
- * Use for sessions whose task is already complete — there's nothing to save.
58
- */
59
- export async function stopSession(ctx, sessionId, sessionMetadata, sessionWorkdirs, log, force = false) {
60
- try {
61
- const session = ctx.manager.get(sessionId);
62
- if (!session) {
63
- throw new Error(`Session ${sessionId} not found`);
64
- }
65
- if (ctx.usingBunWorker) {
66
- if (force) {
67
- await ctx.manager.kill(sessionId, "SIGKILL");
68
- }
69
- else {
70
- await ctx.manager.kill(sessionId);
71
- }
72
- }
73
- else {
74
- if (force) {
75
- await ctx.manager.stop(sessionId, { force: true });
76
- }
77
- else {
78
- await ctx.manager.stop(sessionId);
79
- }
80
- }
81
- }
82
- finally {
83
- // Clean up state even if the kill/stop call throws or the session was
84
- // already gone — prevents leaked subscribers and stale metadata.
85
- try {
86
- const unsubscribe = ctx.outputUnsubscribers.get(sessionId);
87
- if (unsubscribe) {
88
- unsubscribe();
89
- }
90
- }
91
- catch {
92
- // Ignore — unsubscribe may fail on a destroyed session
93
- }
94
- ctx.outputUnsubscribers.delete(sessionId);
95
- // Remove injected hooks from agent settings so they don't
96
- // leak to other CLI instances using the same workdir.
97
- const workdir = sessionWorkdirs.get(sessionId);
98
- if (workdir) {
99
- try {
100
- await cleanupAgentHooks(workdir, log);
101
- }
102
- catch {
103
- // Best-effort — don't block shutdown
104
- }
105
- }
106
- sessionMetadata.delete(sessionId);
107
- sessionWorkdirs.delete(sessionId);
108
- ctx.sessionOutputBuffers.delete(sessionId);
109
- ctx.taskResponseMarkers.delete(sessionId);
110
- log(`Stopped session ${sessionId}`);
111
- }
112
- }
113
- /**
114
- * Remove injected hooks from a workspace's agent settings files.
115
- * Cleans both .claude/settings.json and .gemini/settings.json.
116
- * Best-effort — errors are logged but not thrown.
117
- */
118
- async function cleanupAgentHooks(workdir, log) {
119
- const settingsPaths = [
120
- join(workdir, ".claude", "settings.json"),
121
- join(workdir, ".gemini", "settings.json"),
122
- ];
123
- for (const settingsPath of settingsPaths) {
124
- try {
125
- const raw = await readFile(settingsPath, "utf-8");
126
- const settings = JSON.parse(raw);
127
- if (!settings.hooks)
128
- continue;
129
- delete settings.hooks;
130
- await writeFile(settingsPath, JSON.stringify(settings, null, 2), "utf-8");
131
- log(`Cleaned up hooks from ${settingsPath}`);
132
- }
133
- catch (err) {
134
- // ENOENT (file doesn't exist) is expected — silently ignore.
135
- // Other errors (parse failure, permission denied) are logged.
136
- const code = err.code;
137
- if (code !== "ENOENT") {
138
- log(`Failed to clean up hooks from ${settingsPath}: ${err}`);
139
- }
140
- }
141
- }
142
- }
143
- /**
144
- * Subscribe to live output from a session.
145
- * Returns an unsubscribe function.
146
- */
147
- export function subscribeToOutput(ctx, sessionId, callback) {
148
- if (ctx.usingBunWorker) {
149
- const unsubscribe = ctx.manager.onSessionData(sessionId, callback);
150
- ctx.outputUnsubscribers.set(sessionId, unsubscribe);
151
- return unsubscribe;
152
- }
153
- const ptySession = ctx.manager.getSession(sessionId);
154
- if (!ptySession) {
155
- throw new Error(`Session ${sessionId} not found`);
156
- }
157
- ptySession.on("output", callback);
158
- const unsubscribe = () => ptySession.off("output", callback);
159
- ctx.outputUnsubscribers.set(sessionId, unsubscribe);
160
- return unsubscribe;
161
- }
162
- /**
163
- * Get buffered or logged output from a session.
164
- */
165
- export async function getSessionOutput(ctx, sessionId, lines) {
166
- if (ctx.usingBunWorker) {
167
- const buffer = ctx.sessionOutputBuffers.get(sessionId);
168
- if (!buffer)
169
- return "";
170
- const tail = lines ?? buffer.length;
171
- return buffer.slice(-tail).join("\n");
172
- }
173
- const output = [];
174
- for await (const line of ctx.manager.logs(sessionId, {
175
- tail: lines,
176
- })) {
177
- output.push(line);
178
- }
179
- return output.join("\n");
180
- }
@@ -1,53 +0,0 @@
1
- /**
2
- * PTY session spawning logic — extracted from PTYService for maintainability.
3
- *
4
- * Contains the deferred task delivery, retry logic, per-agent settle delays,
5
- * and session buffer setup that runs during spawnSession().
6
- *
7
- * @module services/pty-spawn
8
- */
9
- import type { AdapterType, BaseCodingAdapter } from "coding-agent-adapters";
10
- import type { BunCompatiblePTYManager, PTYManager, SessionHandle, SpawnConfig, WorkerSessionHandle } from "pty-manager";
11
- import type { PTYServiceConfig, SessionInfo, SpawnSessionOptions } from "./pty-types.ts";
12
- /**
13
- * Build a sanitized base environment from process.env, keeping only
14
- * safe system variables. Agent-specific credentials are injected
15
- * separately by the adapter's getEnv().
16
- */
17
- export declare function buildSanitizedBaseEnv(): Record<string, string>;
18
- export interface SpawnContext {
19
- manager: PTYManager | BunCompatiblePTYManager;
20
- usingBunWorker: boolean;
21
- serviceConfig: PTYServiceConfig;
22
- sessionMetadata: Map<string, Record<string, unknown>>;
23
- sessionWorkdirs: Map<string, string>;
24
- sessionOutputBuffers: Map<string, string[]>;
25
- outputUnsubscribers: Map<string, () => void>;
26
- taskResponseMarkers: Map<string, number>;
27
- getAdapter: (agentType: AdapterType) => BaseCodingAdapter;
28
- sendToSession: (sessionId: string, input: string) => Promise<unknown>;
29
- sendKeysToSession: (sessionId: string, keys: string | string[]) => Promise<void>;
30
- writeRawToSession: (sessionId: string, data: string) => Promise<void>;
31
- pushDefaultRules: (sessionId: string, agentType: string) => Promise<void>;
32
- toSessionInfo: (session: SessionHandle | WorkerSessionHandle, workdir?: string) => SessionInfo;
33
- log: (msg: string) => void;
34
- /** Mark a session's task as delivered in the coordinator. */
35
- markTaskDelivered: (sessionId: string) => void;
36
- }
37
- /**
38
- * Set up session output buffering for Bun worker path.
39
- */
40
- export declare function setupOutputBuffer(ctx: SpawnContext, sessionId: string): void;
41
- /**
42
- * Set up deferred task delivery with retry logic.
43
- * IMPORTANT: Must be called BEFORE pushDefaultRules (which has a 1500ms sleep),
44
- * otherwise session_ready fires during pushDefaultRules and the listener misses it.
45
- */
46
- export declare function setupDeferredTaskDelivery(ctx: SpawnContext, session: SessionHandle | WorkerSessionHandle, task: string, agentType: string): void;
47
- /**
48
- * Build the SpawnConfig and env vars from SpawnSessionOptions.
49
- */
50
- export declare function buildSpawnConfig(sessionId: string, options: SpawnSessionOptions, workdir: string): SpawnConfig & {
51
- id: string;
52
- };
53
- //# sourceMappingURL=pty-spawn.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pty-spawn.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/pty-spawn.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EACX,uBAAuB,EACvB,UAAU,EACV,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EACX,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,MAAM,gBAAgB,CAAC;AA4BxB;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAa9D;AAED,MAAM,WAAW,YAAY;IAC5B,OAAO,EAAE,UAAU,GAAG,uBAAuB,CAAC;IAC9C,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,gBAAgB,CAAC;IAChC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACtD,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;IAC7C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,UAAU,EAAE,CAAC,SAAS,EAAE,WAAW,KAAK,iBAAiB,CAAC;IAC1D,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE,iBAAiB,EAAE,CAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,KACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,aAAa,EAAE,CACd,OAAO,EAAE,aAAa,GAAG,mBAAmB,EAC5C,OAAO,CAAC,EAAE,MAAM,KACZ,WAAW,CAAC;IACjB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3B,6DAA6D;IAC7D,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAuBD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAe5E;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACxC,GAAG,EAAE,YAAY,EACjB,OAAO,EAAE,aAAa,GAAG,mBAAmB,EAC5C,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GACf,IAAI,CA0JN;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC/B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,MAAM,GACb,WAAW,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAgD9B"}
@@ -1,280 +0,0 @@
1
- /**
2
- * PTY session spawning logic — extracted from PTYService for maintainability.
3
- *
4
- * Contains the deferred task delivery, retry logic, per-agent settle delays,
5
- * and session buffer setup that runs during spawnSession().
6
- *
7
- * @module services/pty-spawn
8
- */
9
- import { cleanForChat } from "./ansi-utils.js";
10
- /**
11
- * System environment variables safe to pass to spawned agents.
12
- * Everything else (API keys, tokens, cloud credentials) is stripped.
13
- */
14
- const ENV_ALLOWLIST = [
15
- "PATH",
16
- "HOME",
17
- "USER",
18
- "SHELL",
19
- "LANG",
20
- "LC_ALL",
21
- "LC_CTYPE",
22
- "TERM",
23
- "COLORTERM",
24
- "TZ",
25
- "TMPDIR",
26
- "XDG_RUNTIME_DIR",
27
- "NODE_OPTIONS",
28
- "BUN_INSTALL",
29
- // Forward the user's preferred Claude model so spawned `claude` inherits it
30
- // (claude-cli reads ANTHROPIC_MODEL on startup). Without this, the subagent
31
- // falls back to its default sonnet even when the parent runtime is on opus.
32
- "ANTHROPIC_MODEL",
33
- "ANTHROPIC_SMALL_FAST_MODEL",
34
- ];
35
- /**
36
- * Build a sanitized base environment from process.env, keeping only
37
- * safe system variables. Agent-specific credentials are injected
38
- * separately by the adapter's getEnv().
39
- */
40
- export function buildSanitizedBaseEnv() {
41
- const env = {};
42
- for (const key of ENV_ALLOWLIST) {
43
- const val = process.env[key];
44
- if (val)
45
- env[key] = val;
46
- }
47
- if (!env.TERM || env.TERM.toLowerCase() === "dumb") {
48
- env.TERM = "xterm-256color";
49
- }
50
- if (!env.COLORTERM) {
51
- env.COLORTERM = "truecolor";
52
- }
53
- return env;
54
- }
55
- const CURSOR_POSITION_QUERY = "\x1b[6n";
56
- const CURSOR_POSITION_RESPONSE = "\x1b[1;1R";
57
- async function maybeRespondToTerminalQueries(ctx, sessionId, data) {
58
- if (!data.includes(CURSOR_POSITION_QUERY)) {
59
- return;
60
- }
61
- try {
62
- await ctx.writeRawToSession(sessionId, CURSOR_POSITION_RESPONSE);
63
- ctx.log(`Session ${sessionId} — answered terminal cursor-position query`);
64
- }
65
- catch (error) {
66
- ctx.log(`Session ${sessionId} — failed to answer terminal cursor-position query: ${error}`);
67
- }
68
- }
69
- /**
70
- * Set up session output buffering for Bun worker path.
71
- */
72
- export function setupOutputBuffer(ctx, sessionId) {
73
- const buffer = [];
74
- ctx.sessionOutputBuffers.set(sessionId, buffer);
75
- const unsubscribe = ctx.manager.onSessionData(sessionId, (data) => {
76
- void maybeRespondToTerminalQueries(ctx, sessionId, data);
77
- const lines = data.split("\n");
78
- buffer.push(...lines);
79
- while (buffer.length > (ctx.serviceConfig.maxLogLines ?? 1000)) {
80
- buffer.shift();
81
- }
82
- });
83
- ctx.outputUnsubscribers.set(sessionId, unsubscribe);
84
- }
85
- /**
86
- * Set up deferred task delivery with retry logic.
87
- * IMPORTANT: Must be called BEFORE pushDefaultRules (which has a 1500ms sleep),
88
- * otherwise session_ready fires during pushDefaultRules and the listener misses it.
89
- */
90
- export function setupDeferredTaskDelivery(ctx, session, task, agentType) {
91
- const sid = session.id;
92
- // Per-agent post-ready delay. Claude Code has a heavy TUI that
93
- // renders update notices, shortcuts, and /ide hints in bursts after
94
- // the initial ready pattern — 300ms isn't enough to clear them all.
95
- const POST_READY_DELAY = {
96
- claude: 800,
97
- gemini: 300,
98
- codex: 300,
99
- aider: 200,
100
- };
101
- const settleMs = POST_READY_DELAY[agentType] ?? 300;
102
- const MIN_NEW_LINES_BY_AGENT = {
103
- claude: 1,
104
- gemini: 10,
105
- codex: 15,
106
- aider: 8,
107
- };
108
- const VERIFY_DELAY_MS = 5000; // how long to wait before checking acceptance
109
- const MAX_RETRIES = 2;
110
- const minNewLines = MIN_NEW_LINES_BY_AGENT[agentType] ?? 15;
111
- const READY_PROBE_INTERVAL_MS = 500;
112
- const isAdapterBackedAgent = agentType === "claude" ||
113
- agentType === "gemini" ||
114
- agentType === "codex" ||
115
- agentType === "aider";
116
- const adapter = isAdapterBackedAgent
117
- ? ctx.getAdapter(agentType)
118
- : null;
119
- const sendTaskWithRetry = (attempt) => {
120
- const buffer = ctx.sessionOutputBuffers.get(sid);
121
- const baselineLength = buffer?.length ?? 0;
122
- ctx.log(`Session ${sid} — sending task (attempt ${attempt + 1}, ${settleMs}ms settle, baseline ${baselineLength} lines)`);
123
- ctx
124
- .sendToSession(sid, task)
125
- .catch((err) => ctx.log(`Failed to send deferred task to ${sid}: ${err}`));
126
- // After a delay, verify the agent actually started working.
127
- // If the buffer barely grew, the TUI likely swallowed the input.
128
- if (attempt < MAX_RETRIES) {
129
- setTimeout(() => {
130
- const currentLength = buffer?.length ?? 0;
131
- const newLines = currentLength - baselineLength;
132
- const newOutput = buffer?.slice(baselineLength).join("\n") ?? "";
133
- const accepted = newLines > 0 ||
134
- newLines >= minNewLines ||
135
- (adapter?.detectLoading?.(newOutput) ?? false) ||
136
- cleanForChat(newOutput).length >= 32;
137
- if (!accepted) {
138
- ctx.log(`Session ${sid} — task may not have been accepted (only ${newLines} new lines after ${VERIFY_DELAY_MS}ms). Retrying (attempt ${attempt + 2}/${MAX_RETRIES + 1})`);
139
- sendTaskWithRetry(attempt + 1);
140
- }
141
- else {
142
- ctx.log(`Session ${sid} — task accepted (${newLines} new lines after ${VERIFY_DELAY_MS}ms)`);
143
- }
144
- }, VERIFY_DELAY_MS);
145
- }
146
- };
147
- const READY_TIMEOUT_MS = 30_000;
148
- let taskSent = false;
149
- let taskDeliveredMarked = false;
150
- let readyTimeout;
151
- let readyProbe;
152
- const clearPendingReadyWait = () => {
153
- if (readyTimeout) {
154
- clearTimeout(readyTimeout);
155
- readyTimeout = undefined;
156
- }
157
- if (readyProbe) {
158
- clearInterval(readyProbe);
159
- readyProbe = undefined;
160
- }
161
- };
162
- const sendTask = () => {
163
- if (taskSent)
164
- return;
165
- taskSent = true;
166
- clearPendingReadyWait();
167
- // Delay to let TUI finish rendering after ready detection.
168
- // Without this, Claude Code's TUI can swallow the Enter key
169
- // if it arrives during a render cycle.
170
- setTimeout(() => {
171
- if (!taskDeliveredMarked) {
172
- ctx.markTaskDelivered(sid);
173
- taskDeliveredMarked = true;
174
- }
175
- sendTaskWithRetry(0);
176
- }, settleMs);
177
- if (ctx.usingBunWorker) {
178
- ctx.manager.removeListener("session_ready", onReady);
179
- }
180
- else {
181
- ctx.manager.removeListener("session_ready", onReady);
182
- }
183
- };
184
- const onReady = (readySession) => {
185
- if (readySession.id !== sid)
186
- return;
187
- sendTask();
188
- };
189
- if (session.status === "ready") {
190
- sendTask();
191
- }
192
- else {
193
- if (ctx.usingBunWorker) {
194
- ctx.manager.on("session_ready", onReady);
195
- }
196
- else {
197
- ctx.manager.on("session_ready", onReady);
198
- }
199
- readyTimeout = setTimeout(() => {
200
- if (!taskSent) {
201
- ctx.log(`Session ${sid} — ready event not received within ${READY_TIMEOUT_MS}ms, forcing task delivery`);
202
- sendTask();
203
- }
204
- }, READY_TIMEOUT_MS);
205
- if (ctx.usingBunWorker && isAdapterBackedAgent && adapter) {
206
- readyProbe = setInterval(() => {
207
- if (taskSent)
208
- return;
209
- const buffer = ctx.sessionOutputBuffers.get(sid);
210
- if (!buffer || buffer.length === 0)
211
- return;
212
- const output = buffer.join("\n");
213
- const cleanedOutput = cleanForChat(output);
214
- if (adapter.detectLoading?.(output))
215
- return;
216
- if (adapter.detectLogin(output).required)
217
- return;
218
- if (adapter.detectBlockingPrompt(output).detected)
219
- return;
220
- const promptVisible = adapter.detectReady(output) ||
221
- (agentType === "codex" &&
222
- /›\s+(?:Ask Codex to do anything|\S.*)/.test(cleanedOutput));
223
- if (!promptVisible)
224
- return;
225
- ctx.log(`Session ${sid} — detected ready prompt from buffered output, delivering task before timeout`);
226
- sendTask();
227
- }, READY_PROBE_INTERVAL_MS);
228
- }
229
- }
230
- }
231
- /**
232
- * Build the SpawnConfig and env vars from SpawnSessionOptions.
233
- */
234
- export function buildSpawnConfig(sessionId, options, workdir) {
235
- // Map model preferences to adapter-specific env vars
236
- const modelPrefs = options.metadata?.modelPrefs;
237
- let modelEnv;
238
- if (modelPrefs?.powerful) {
239
- const envKeyMap = {
240
- claude: "ANTHROPIC_MODEL",
241
- gemini: "GEMINI_MODEL",
242
- codex: "OPENAI_MODEL",
243
- aider: "AIDER_MODEL",
244
- };
245
- const key = envKeyMap[options.agentType];
246
- if (key)
247
- modelEnv = { [key]: modelPrefs.powerful };
248
- }
249
- return {
250
- id: sessionId,
251
- name: options.name,
252
- type: options.agentType,
253
- workdir,
254
- inheritProcessEnv: false,
255
- env: {
256
- ...buildSanitizedBaseEnv(),
257
- ...options.env,
258
- ...modelEnv,
259
- PARALLAX_SESSION_ID: sessionId,
260
- },
261
- ...(options.skipAdapterAutoResponse
262
- ? { skipAdapterAutoResponse: true }
263
- : {}),
264
- adapterConfig: {
265
- ...options.credentials,
266
- ...(options.customCredentials
267
- ? { custom: options.customCredentials }
268
- : {}),
269
- interactive: true,
270
- approvalPreset: options.approvalPreset,
271
- // Forward adapter-relevant metadata (e.g. provider preference for Aider)
272
- ...(options.metadata?.provider
273
- ? { provider: options.metadata.provider }
274
- : {}),
275
- ...(options.metadata?.modelTier
276
- ? { modelTier: options.metadata.modelTier }
277
- : {}),
278
- },
279
- };
280
- }
@@ -1,80 +0,0 @@
1
- /**
2
- * Shared types and helpers for the PTY service layer.
3
- *
4
- * Extracted from pty-service.ts to keep that module lean and allow
5
- * other modules (pty-spawn, pty-init, actions) to import lightweight
6
- * type-only dependencies without pulling in the full PTYService class.
7
- *
8
- * @module services/pty-types
9
- */
10
- import type { AdapterType, AgentCredentials, ApprovalPreset } from "coding-agent-adapters";
11
- import type { SessionHandle } from "pty-manager";
12
- export interface PTYServiceConfig {
13
- /** Maximum output lines to keep per session (default: 1000) */
14
- maxLogLines?: number;
15
- /** Enable debug logging */
16
- debug?: boolean;
17
- /** Auto-register task-agent adapters (default: true) */
18
- registerCodingAdapters?: boolean;
19
- /** Maximum concurrent PTY sessions (default: 8) */
20
- maxConcurrentSessions?: number;
21
- /**
22
- * Default approval preset for task agents when not specified per-spawn.
23
- * Controls what tools the agent can use without asking for permission.
24
- * - "readonly" — Read-only tools only
25
- * - "standard" — Read + write, asks for shell/network
26
- * - "permissive" — Most tools auto-approved, asks for destructive ops
27
- * - "autonomous" — All tools auto-approved (yolo mode)
28
- * Default: "autonomous"
29
- */
30
- defaultApprovalPreset?: ApprovalPreset;
31
- }
32
- /** Available task-agent types */
33
- export type CodingAgentType = "shell" | "pi" | AdapterType;
34
- /** True when the user requested the Pi coding agent. */
35
- export declare const isPiAgentType: (input: string | undefined | null) => boolean;
36
- /** Normalize user-provided agent type string to a valid CodingAgentType */
37
- export declare const normalizeAgentType: (input: string) => CodingAgentType;
38
- /** Build the initial shell command for Pi agent sessions. */
39
- export declare const toPiCommand: (task: string | undefined) => string;
40
- export interface SpawnSessionOptions {
41
- /** Human-readable session name */
42
- name: string;
43
- /** Adapter type: "shell" | "pi" | "claude" | "gemini" | "codex" | "aider" */
44
- agentType: CodingAgentType;
45
- /** Working directory for the session */
46
- workdir?: string;
47
- /** Initial command/task to send */
48
- initialTask?: string;
49
- /** Environment variables */
50
- env?: Record<string, string>;
51
- /** Session metadata for tracking */
52
- metadata?: Record<string, unknown>;
53
- /** Credentials for coding agents (API keys, tokens) */
54
- credentials?: AgentCredentials;
55
- /** Memory/instructions content to write to the agent's memory file before spawning */
56
- memoryContent?: string;
57
- /** Approval preset controlling tool permissions (readonly, standard, permissive, autonomous) */
58
- approvalPreset?: ApprovalPreset;
59
- /** Custom credentials for MCP servers or other integrations */
60
- customCredentials?: Record<string, string>;
61
- /** When true, adapter-level blocking prompts (tool permissions, file access)
62
- * are emitted with autoResponded=false instead of being auto-handled.
63
- * Used by the swarm coordinator to route decisions through its LLM loop. */
64
- skipAdapterAutoResponse?: boolean;
65
- }
66
- export interface SessionInfo {
67
- id: string;
68
- name: string;
69
- agentType: string;
70
- workdir: string;
71
- status: SessionHandle["status"];
72
- createdAt: Date;
73
- lastActivityAt: Date;
74
- metadata?: Record<string, unknown>;
75
- }
76
- /** Known event names emitted by the PTY layer. */
77
- export type SessionEventName = "ready" | "blocked" | "login_required" | "task_complete" | "tool_running" | "stopped" | "error" | "message";
78
- type SessionEventCallback = (sessionId: string, event: string, data: unknown) => void;
79
- export type { SessionEventCallback };
80
- //# sourceMappingURL=pty-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pty-types.d.ts","sourceRoot":"","sources":["../../../../../../../../typescript/src/features/orchestrator/services/pty-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACX,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAChC,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wDAAwD;IACxD,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mDAAmD;IACnD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;;;;OAQG;IACH,qBAAqB,CAAC,EAAE,cAAc,CAAC;CACvC;AAED,iCAAiC;AACjC,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,IAAI,GAAG,WAAW,CAAC;AAS3D,wDAAwD;AACxD,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,GAAG,SAAS,GAAG,IAAI,KAAG,OAGhE,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,eAoBlD,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,GAAG,SAAS,KAAG,MAKtD,CAAC;AAEF,MAAM,WAAW,mBAAmB;IACnC,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,SAAS,EAAE,eAAe,CAAC;IAC3B,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,uDAAuD;IACvD,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,sFAAsF;IACtF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gGAAgG;IAChG,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C;;iFAE6E;IAC7E,uBAAuB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,WAAW;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChC,SAAS,EAAE,IAAI,CAAC;IAChB,cAAc,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,kDAAkD;AAClD,MAAM,MAAM,gBAAgB,GACzB,OAAO,GACP,SAAS,GACT,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,SAAS,GACT,OAAO,GACP,SAAS,CAAC;AAEb,KAAK,oBAAoB,GAAG,CAC3B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,OAAO,KACT,IAAI,CAAC;AAEV,YAAY,EAAE,oBAAoB,EAAE,CAAC"}