@jini-ai/agent-runtime 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (399) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +43 -0
  3. package/dist/acp-model-probe.d.ts +48 -0
  4. package/dist/acp-model-probe.d.ts.map +1 -0
  5. package/dist/acp-model-probe.js +15 -0
  6. package/dist/acp-model-probe.js.map +1 -0
  7. package/dist/agent-protocol/acp/account-failure.d.ts +54 -0
  8. package/dist/agent-protocol/acp/account-failure.d.ts.map +1 -0
  9. package/dist/agent-protocol/acp/account-failure.js +37 -0
  10. package/dist/agent-protocol/acp/account-failure.js.map +1 -0
  11. package/dist/agent-protocol/acp/constants.d.ts +26 -0
  12. package/dist/agent-protocol/acp/constants.d.ts.map +1 -0
  13. package/dist/agent-protocol/acp/constants.js +39 -0
  14. package/dist/agent-protocol/acp/constants.js.map +1 -0
  15. package/dist/agent-protocol/acp/index.d.ts +14 -0
  16. package/dist/agent-protocol/acp/index.d.ts.map +1 -0
  17. package/dist/agent-protocol/acp/index.js +14 -0
  18. package/dist/agent-protocol/acp/index.js.map +1 -0
  19. package/dist/agent-protocol/acp/json.d.ts +82 -0
  20. package/dist/agent-protocol/acp/json.d.ts.map +1 -0
  21. package/dist/agent-protocol/acp/json.js +144 -0
  22. package/dist/agent-protocol/acp/json.js.map +1 -0
  23. package/dist/agent-protocol/acp/models.d.ts +112 -0
  24. package/dist/agent-protocol/acp/models.d.ts.map +1 -0
  25. package/dist/agent-protocol/acp/models.js +293 -0
  26. package/dist/agent-protocol/acp/models.js.map +1 -0
  27. package/dist/agent-protocol/acp/rpc.d.ts +107 -0
  28. package/dist/agent-protocol/acp/rpc.d.ts.map +1 -0
  29. package/dist/agent-protocol/acp/rpc.js +162 -0
  30. package/dist/agent-protocol/acp/rpc.js.map +1 -0
  31. package/dist/agent-protocol/acp/session-params.d.ts +55 -0
  32. package/dist/agent-protocol/acp/session-params.d.ts.map +1 -0
  33. package/dist/agent-protocol/acp/session-params.js +81 -0
  34. package/dist/agent-protocol/acp/session-params.js.map +1 -0
  35. package/dist/agent-protocol/acp/session.d.ts +101 -0
  36. package/dist/agent-protocol/acp/session.d.ts.map +1 -0
  37. package/dist/agent-protocol/acp/session.js +832 -0
  38. package/dist/agent-protocol/acp/session.js.map +1 -0
  39. package/dist/agent-protocol/acp/text-suppression.d.ts +73 -0
  40. package/dist/agent-protocol/acp/text-suppression.d.ts.map +1 -0
  41. package/dist/agent-protocol/acp/text-suppression.js +229 -0
  42. package/dist/agent-protocol/acp/text-suppression.js.map +1 -0
  43. package/dist/agent-protocol/acp/types.d.ts +27 -0
  44. package/dist/agent-protocol/acp/types.d.ts.map +1 -0
  45. package/dist/agent-protocol/acp/types.js +2 -0
  46. package/dist/agent-protocol/acp/types.js.map +1 -0
  47. package/dist/agent-protocol/acp/updates.d.ts +166 -0
  48. package/dist/agent-protocol/acp/updates.d.ts.map +1 -0
  49. package/dist/agent-protocol/acp/updates.js +268 -0
  50. package/dist/agent-protocol/acp/updates.js.map +1 -0
  51. package/dist/agent-protocol/core/index.d.ts +6 -0
  52. package/dist/agent-protocol/core/index.d.ts.map +1 -0
  53. package/dist/agent-protocol/core/index.js +6 -0
  54. package/dist/agent-protocol/core/index.js.map +1 -0
  55. package/dist/agent-protocol/core/json-line-stream.d.ts +42 -0
  56. package/dist/agent-protocol/core/json-line-stream.d.ts.map +1 -0
  57. package/dist/agent-protocol/core/json-line-stream.js +333 -0
  58. package/dist/agent-protocol/core/json-line-stream.js.map +1 -0
  59. package/dist/agent-protocol/index.d.ts +8 -0
  60. package/dist/agent-protocol/index.d.ts.map +1 -0
  61. package/dist/agent-protocol/index.js +8 -0
  62. package/dist/agent-protocol/index.js.map +1 -0
  63. package/dist/agent-protocol/pi-rpc/events.d.ts +26 -0
  64. package/dist/agent-protocol/pi-rpc/events.d.ts.map +1 -0
  65. package/dist/agent-protocol/pi-rpc/events.js +167 -0
  66. package/dist/agent-protocol/pi-rpc/events.js.map +1 -0
  67. package/dist/agent-protocol/pi-rpc/index.d.ts +11 -0
  68. package/dist/agent-protocol/pi-rpc/index.d.ts.map +1 -0
  69. package/dist/agent-protocol/pi-rpc/index.js +11 -0
  70. package/dist/agent-protocol/pi-rpc/index.js.map +1 -0
  71. package/dist/agent-protocol/pi-rpc/internal.d.ts +45 -0
  72. package/dist/agent-protocol/pi-rpc/internal.d.ts.map +1 -0
  73. package/dist/agent-protocol/pi-rpc/internal.js +41 -0
  74. package/dist/agent-protocol/pi-rpc/internal.js.map +1 -0
  75. package/dist/agent-protocol/pi-rpc/models.d.ts +21 -0
  76. package/dist/agent-protocol/pi-rpc/models.d.ts.map +1 -0
  77. package/dist/agent-protocol/pi-rpc/models.js +48 -0
  78. package/dist/agent-protocol/pi-rpc/models.js.map +1 -0
  79. package/dist/agent-protocol/pi-rpc/session.d.ts +106 -0
  80. package/dist/agent-protocol/pi-rpc/session.d.ts.map +1 -0
  81. package/dist/agent-protocol/pi-rpc/session.js +371 -0
  82. package/dist/agent-protocol/pi-rpc/session.js.map +1 -0
  83. package/dist/amr-model-cache.d.ts +40 -0
  84. package/dist/amr-model-cache.d.ts.map +1 -0
  85. package/dist/amr-model-cache.js +79 -0
  86. package/dist/amr-model-cache.js.map +1 -0
  87. package/dist/amr-profile-resolver.d.ts +21 -0
  88. package/dist/amr-profile-resolver.d.ts.map +1 -0
  89. package/dist/amr-profile-resolver.js +4 -0
  90. package/dist/amr-profile-resolver.js.map +1 -0
  91. package/dist/artifact-taxonomy.d.ts +27 -0
  92. package/dist/artifact-taxonomy.d.ts.map +1 -0
  93. package/dist/artifact-taxonomy.js +5 -0
  94. package/dist/artifact-taxonomy.js.map +1 -0
  95. package/dist/auth.d.ts +25 -0
  96. package/dist/auth.d.ts.map +1 -0
  97. package/dist/auth.js +332 -0
  98. package/dist/auth.js.map +1 -0
  99. package/dist/capabilities.d.ts +9 -0
  100. package/dist/capabilities.d.ts.map +1 -0
  101. package/dist/capabilities.js +2 -0
  102. package/dist/capabilities.js.map +1 -0
  103. package/dist/claude-stream.d.ts +37 -0
  104. package/dist/claude-stream.d.ts.map +1 -0
  105. package/dist/claude-stream.js +660 -0
  106. package/dist/claude-stream.js.map +1 -0
  107. package/dist/copilot-stream.d.ts +37 -0
  108. package/dist/copilot-stream.d.ts.map +1 -0
  109. package/dist/copilot-stream.js +136 -0
  110. package/dist/copilot-stream.js.map +1 -0
  111. package/dist/defs/aider.d.ts +13 -0
  112. package/dist/defs/aider.d.ts.map +1 -0
  113. package/dist/defs/aider.js +63 -0
  114. package/dist/defs/aider.js.map +1 -0
  115. package/dist/defs/amp.d.ts +12 -0
  116. package/dist/defs/amp.d.ts.map +1 -0
  117. package/dist/defs/amp.js +56 -0
  118. package/dist/defs/amp.js.map +1 -0
  119. package/dist/defs/amr.d.ts +37 -0
  120. package/dist/defs/amr.d.ts.map +1 -0
  121. package/dist/defs/amr.js +303 -0
  122. package/dist/defs/amr.js.map +1 -0
  123. package/dist/defs/antigravity.d.ts +25 -0
  124. package/dist/defs/antigravity.d.ts.map +1 -0
  125. package/dist/defs/antigravity.js +213 -0
  126. package/dist/defs/antigravity.js.map +1 -0
  127. package/dist/defs/claude.d.ts +30 -0
  128. package/dist/defs/claude.d.ts.map +1 -0
  129. package/dist/defs/claude.js +130 -0
  130. package/dist/defs/claude.js.map +1 -0
  131. package/dist/defs/codebuddy.d.ts +26 -0
  132. package/dist/defs/codebuddy.d.ts.map +1 -0
  133. package/dist/defs/codebuddy.js +124 -0
  134. package/dist/defs/codebuddy.js.map +1 -0
  135. package/dist/defs/codex.d.ts +30 -0
  136. package/dist/defs/codex.d.ts.map +1 -0
  137. package/dist/defs/codex.js +196 -0
  138. package/dist/defs/codex.js.map +1 -0
  139. package/dist/defs/copilot.d.ts +12 -0
  140. package/dist/defs/copilot.d.ts.map +1 -0
  141. package/dist/defs/copilot.js +88 -0
  142. package/dist/defs/copilot.js.map +1 -0
  143. package/dist/defs/cursor-agent.d.ts +27 -0
  144. package/dist/defs/cursor-agent.d.ts.map +1 -0
  145. package/dist/defs/cursor-agent.js +93 -0
  146. package/dist/defs/cursor-agent.js.map +1 -0
  147. package/dist/defs/deepseek.d.ts +12 -0
  148. package/dist/defs/deepseek.d.ts.map +1 -0
  149. package/dist/defs/deepseek.js +53 -0
  150. package/dist/defs/deepseek.js.map +1 -0
  151. package/dist/defs/devin.d.ts +12 -0
  152. package/dist/defs/devin.d.ts.map +1 -0
  153. package/dist/defs/devin.js +45 -0
  154. package/dist/defs/devin.js.map +1 -0
  155. package/dist/defs/grok-build.d.ts +26 -0
  156. package/dist/defs/grok-build.d.ts.map +1 -0
  157. package/dist/defs/grok-build.js +105 -0
  158. package/dist/defs/grok-build.js.map +1 -0
  159. package/dist/defs/hermes.d.ts +13 -0
  160. package/dist/defs/hermes.d.ts.map +1 -0
  161. package/dist/defs/hermes.js +51 -0
  162. package/dist/defs/hermes.js.map +1 -0
  163. package/dist/defs/index.d.ts +33 -0
  164. package/dist/defs/index.d.ts.map +1 -0
  165. package/dist/defs/index.js +33 -0
  166. package/dist/defs/index.js.map +1 -0
  167. package/dist/defs/kilo.d.ts +12 -0
  168. package/dist/defs/kilo.d.ts.map +1 -0
  169. package/dist/defs/kilo.js +20 -0
  170. package/dist/defs/kilo.js.map +1 -0
  171. package/dist/defs/kimi.d.ts +13 -0
  172. package/dist/defs/kimi.d.ts.map +1 -0
  173. package/dist/defs/kimi.js +26 -0
  174. package/dist/defs/kimi.js.map +1 -0
  175. package/dist/defs/kiro.d.ts +12 -0
  176. package/dist/defs/kiro.d.ts.map +1 -0
  177. package/dist/defs/kiro.js +20 -0
  178. package/dist/defs/kiro.js.map +1 -0
  179. package/dist/defs/mimo.d.ts +13 -0
  180. package/dist/defs/mimo.d.ts.map +1 -0
  181. package/dist/defs/mimo.js +26 -0
  182. package/dist/defs/mimo.js.map +1 -0
  183. package/dist/defs/opencode.d.ts +27 -0
  184. package/dist/defs/opencode.d.ts.map +1 -0
  185. package/dist/defs/opencode.js +89 -0
  186. package/dist/defs/opencode.js.map +1 -0
  187. package/dist/defs/pi.d.ts +18 -0
  188. package/dist/defs/pi.d.ts.map +1 -0
  189. package/dist/defs/pi.js +94 -0
  190. package/dist/defs/pi.js.map +1 -0
  191. package/dist/defs/qoder.d.ts +11 -0
  192. package/dist/defs/qoder.d.ts.map +1 -0
  193. package/dist/defs/qoder.js +50 -0
  194. package/dist/defs/qoder.js.map +1 -0
  195. package/dist/defs/qwen.d.ts +11 -0
  196. package/dist/defs/qwen.d.ts.map +1 -0
  197. package/dist/defs/qwen.js +28 -0
  198. package/dist/defs/qwen.js.map +1 -0
  199. package/dist/defs/reasonix.d.ts +20 -0
  200. package/dist/defs/reasonix.d.ts.map +1 -0
  201. package/dist/defs/reasonix.js +60 -0
  202. package/dist/defs/reasonix.js.map +1 -0
  203. package/dist/defs/shared.d.ts +23 -0
  204. package/dist/defs/shared.d.ts.map +1 -0
  205. package/dist/defs/shared.js +58 -0
  206. package/dist/defs/shared.js.map +1 -0
  207. package/dist/defs/trae-cli.d.ts +14 -0
  208. package/dist/defs/trae-cli.d.ts.map +1 -0
  209. package/dist/defs/trae-cli.js +22 -0
  210. package/dist/defs/trae-cli.js.map +1 -0
  211. package/dist/defs/vibe.d.ts +12 -0
  212. package/dist/defs/vibe.d.ts.map +1 -0
  213. package/dist/defs/vibe.js +20 -0
  214. package/dist/defs/vibe.js.map +1 -0
  215. package/dist/detection.d.ts +14 -0
  216. package/dist/detection.d.ts.map +1 -0
  217. package/dist/detection.js +266 -0
  218. package/dist/detection.js.map +1 -0
  219. package/dist/diagnostics.d.ts +8 -0
  220. package/dist/diagnostics.d.ts.map +1 -0
  221. package/dist/diagnostics.js +95 -0
  222. package/dist/diagnostics.js.map +1 -0
  223. package/dist/env.d.ts +19 -0
  224. package/dist/env.d.ts.map +1 -0
  225. package/dist/env.js +95 -0
  226. package/dist/env.js.map +1 -0
  227. package/dist/executables.d.ts +24 -0
  228. package/dist/executables.d.ts.map +1 -0
  229. package/dist/executables.js +349 -0
  230. package/dist/executables.js.map +1 -0
  231. package/dist/index.d.ts +74 -0
  232. package/dist/index.d.ts.map +1 -0
  233. package/dist/index.js +102 -0
  234. package/dist/index.js.map +1 -0
  235. package/dist/invocation.d.ts +6 -0
  236. package/dist/invocation.d.ts.map +1 -0
  237. package/dist/invocation.js +47 -0
  238. package/dist/invocation.js.map +1 -0
  239. package/dist/json-event-stream.d.ts +9 -0
  240. package/dist/json-event-stream.d.ts.map +1 -0
  241. package/dist/json-event-stream.js +856 -0
  242. package/dist/json-event-stream.js.map +1 -0
  243. package/dist/launch.d.ts +12 -0
  244. package/dist/launch.d.ts.map +1 -0
  245. package/dist/launch.js +221 -0
  246. package/dist/launch.js.map +1 -0
  247. package/dist/mcp.d.ts +44 -0
  248. package/dist/mcp.d.ts.map +1 -0
  249. package/dist/mcp.js +12 -0
  250. package/dist/mcp.js.map +1 -0
  251. package/dist/metadata.d.ts +24 -0
  252. package/dist/metadata.d.ts.map +1 -0
  253. package/dist/metadata.js +100 -0
  254. package/dist/metadata.js.map +1 -0
  255. package/dist/mmd-routes.d.ts +12 -0
  256. package/dist/mmd-routes.d.ts.map +1 -0
  257. package/dist/mmd-routes.js +146 -0
  258. package/dist/mmd-routes.js.map +1 -0
  259. package/dist/model-registry.d.ts +120 -0
  260. package/dist/model-registry.d.ts.map +1 -0
  261. package/dist/model-registry.js +77 -0
  262. package/dist/model-registry.js.map +1 -0
  263. package/dist/models.d.ts +16 -0
  264. package/dist/models.d.ts.map +1 -0
  265. package/dist/models.js +93 -0
  266. package/dist/models.js.map +1 -0
  267. package/dist/opencode-log.d.ts +16 -0
  268. package/dist/opencode-log.d.ts.map +1 -0
  269. package/dist/opencode-log.js +163 -0
  270. package/dist/opencode-log.js.map +1 -0
  271. package/dist/paths.d.ts +3 -0
  272. package/dist/paths.d.ts.map +1 -0
  273. package/dist/paths.js +29 -0
  274. package/dist/paths.js.map +1 -0
  275. package/dist/pi-models.d.ts +13 -0
  276. package/dist/pi-models.d.ts.map +1 -0
  277. package/dist/pi-models.js +36 -0
  278. package/dist/pi-models.js.map +1 -0
  279. package/dist/prompt-augmenter.d.ts +60 -0
  280. package/dist/prompt-augmenter.d.ts.map +1 -0
  281. package/dist/prompt-augmenter.js +26 -0
  282. package/dist/prompt-augmenter.js.map +1 -0
  283. package/dist/prompt-budget.d.ts +20 -0
  284. package/dist/prompt-budget.d.ts.map +1 -0
  285. package/dist/prompt-budget.js +226 -0
  286. package/dist/prompt-budget.js.map +1 -0
  287. package/dist/prompt-file.d.ts +7 -0
  288. package/dist/prompt-file.d.ts.map +1 -0
  289. package/dist/prompt-file.js +27 -0
  290. package/dist/prompt-file.js.map +1 -0
  291. package/dist/providers/aihubmix.d.ts +99 -0
  292. package/dist/providers/aihubmix.d.ts.map +1 -0
  293. package/dist/providers/aihubmix.js +239 -0
  294. package/dist/providers/aihubmix.js.map +1 -0
  295. package/dist/providers/anthropic-messages.d.ts +116 -0
  296. package/dist/providers/anthropic-messages.d.ts.map +1 -0
  297. package/dist/providers/anthropic-messages.js +313 -0
  298. package/dist/providers/anthropic-messages.js.map +1 -0
  299. package/dist/providers/azure-chat.d.ts +99 -0
  300. package/dist/providers/azure-chat.d.ts.map +1 -0
  301. package/dist/providers/azure-chat.js +164 -0
  302. package/dist/providers/azure-chat.js.map +1 -0
  303. package/dist/providers/connection-guard.d.ts +67 -0
  304. package/dist/providers/connection-guard.d.ts.map +1 -0
  305. package/dist/providers/connection-guard.js +211 -0
  306. package/dist/providers/connection-guard.js.map +1 -0
  307. package/dist/providers/elevenlabs.d.ts +28 -0
  308. package/dist/providers/elevenlabs.d.ts.map +1 -0
  309. package/dist/providers/elevenlabs.js +138 -0
  310. package/dist/providers/elevenlabs.js.map +1 -0
  311. package/dist/providers/google-messages.d.ts +108 -0
  312. package/dist/providers/google-messages.d.ts.map +1 -0
  313. package/dist/providers/google-messages.js +284 -0
  314. package/dist/providers/google-messages.js.map +1 -0
  315. package/dist/providers/google.d.ts +20 -0
  316. package/dist/providers/google.d.ts.map +1 -0
  317. package/dist/providers/google.js +42 -0
  318. package/dist/providers/google.js.map +1 -0
  319. package/dist/providers/index.d.ts +39 -0
  320. package/dist/providers/index.d.ts.map +1 -0
  321. package/dist/providers/index.js +39 -0
  322. package/dist/providers/index.js.map +1 -0
  323. package/dist/providers/model-catalog.d.ts +32 -0
  324. package/dist/providers/model-catalog.d.ts.map +1 -0
  325. package/dist/providers/model-catalog.js +394 -0
  326. package/dist/providers/model-catalog.js.map +1 -0
  327. package/dist/providers/oauth-callback-server.d.ts +35 -0
  328. package/dist/providers/oauth-callback-server.d.ts.map +1 -0
  329. package/dist/providers/oauth-callback-server.js +217 -0
  330. package/dist/providers/oauth-callback-server.js.map +1 -0
  331. package/dist/providers/oauth-credentials.d.ts +29 -0
  332. package/dist/providers/oauth-credentials.d.ts.map +1 -0
  333. package/dist/providers/oauth-credentials.js +70 -0
  334. package/dist/providers/oauth-credentials.js.map +1 -0
  335. package/dist/providers/oauth-provider.d.ts +95 -0
  336. package/dist/providers/oauth-provider.d.ts.map +1 -0
  337. package/dist/providers/oauth-provider.js +130 -0
  338. package/dist/providers/oauth-provider.js.map +1 -0
  339. package/dist/providers/oauth-tokens.d.ts +35 -0
  340. package/dist/providers/oauth-tokens.d.ts.map +1 -0
  341. package/dist/providers/oauth-tokens.js +136 -0
  342. package/dist/providers/oauth-tokens.js.map +1 -0
  343. package/dist/providers/ollama-chat.d.ts +106 -0
  344. package/dist/providers/ollama-chat.d.ts.map +1 -0
  345. package/dist/providers/ollama-chat.js +292 -0
  346. package/dist/providers/ollama-chat.js.map +1 -0
  347. package/dist/providers/openai-chat.d.ts +147 -0
  348. package/dist/providers/openai-chat.d.ts.map +1 -0
  349. package/dist/providers/openai-chat.js +302 -0
  350. package/dist/providers/openai-chat.js.map +1 -0
  351. package/dist/providers/pkce.d.ts +81 -0
  352. package/dist/providers/pkce.d.ts.map +1 -0
  353. package/dist/providers/pkce.js +176 -0
  354. package/dist/providers/pkce.js.map +1 -0
  355. package/dist/providers/sse-decode.d.ts +47 -0
  356. package/dist/providers/sse-decode.d.ts.map +1 -0
  357. package/dist/providers/sse-decode.js +109 -0
  358. package/dist/providers/sse-decode.js.map +1 -0
  359. package/dist/providers/token-params.d.ts +29 -0
  360. package/dist/providers/token-params.d.ts.map +1 -0
  361. package/dist/providers/token-params.js +41 -0
  362. package/dist/providers/token-params.js.map +1 -0
  363. package/dist/providers/turn-end-guard.d.ts +37 -0
  364. package/dist/providers/turn-end-guard.d.ts.map +1 -0
  365. package/dist/providers/turn-end-guard.js +42 -0
  366. package/dist/providers/turn-end-guard.js.map +1 -0
  367. package/dist/providers/types.d.ts +36 -0
  368. package/dist/providers/types.d.ts.map +1 -0
  369. package/dist/providers/types.js +13 -0
  370. package/dist/providers/types.js.map +1 -0
  371. package/dist/qoder-stream.d.ts +19 -0
  372. package/dist/qoder-stream.d.ts.map +1 -0
  373. package/dist/qoder-stream.js +167 -0
  374. package/dist/qoder-stream.js.map +1 -0
  375. package/dist/registry.d.ts +5 -0
  376. package/dist/registry.d.ts.map +1 -0
  377. package/dist/registry.js +58 -0
  378. package/dist/registry.js.map +1 -0
  379. package/dist/resolution.d.ts +2 -0
  380. package/dist/resolution.d.ts.map +1 -0
  381. package/dist/resolution.js +19 -0
  382. package/dist/resolution.js.map +1 -0
  383. package/dist/role-marker-guard.d.ts +53 -0
  384. package/dist/role-marker-guard.d.ts.map +1 -0
  385. package/dist/role-marker-guard.js +280 -0
  386. package/dist/role-marker-guard.js.map +1 -0
  387. package/dist/telemetry-sink.d.ts +35 -0
  388. package/dist/telemetry-sink.d.ts.map +1 -0
  389. package/dist/telemetry-sink.js +5 -0
  390. package/dist/telemetry-sink.js.map +1 -0
  391. package/dist/terminal-launch.d.ts +11 -0
  392. package/dist/terminal-launch.d.ts.map +1 -0
  393. package/dist/terminal-launch.js +123 -0
  394. package/dist/terminal-launch.js.map +1 -0
  395. package/dist/types.d.ts +185 -0
  396. package/dist/types.d.ts.map +1 -0
  397. package/dist/types.js +2 -0
  398. package/dist/types.js.map +1 -0
  399. package/package.json +47 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/agent-protocol/acp/session.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,gCAAgC,EAChC,4BAA4B,GAE7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,oCAAoC,EACpC,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EACL,OAAO,EACP,aAAa,EACb,WAAW,EACX,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,mCAAmC,EACnC,WAAW,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,aAAa,EACb,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAA0B,MAAM,qBAAqB,CAAC;AAC1G,OAAO,EAAE,4BAA4B,EAAiC,MAAM,sBAAsB,CAAC;AA4FnG;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,KAAK,EACL,MAAM,EACN,GAAG,EACH,KAAK,EACL,UAAU,GAAG,EAAE,EACf,UAAU,EACV,SAAS,GAAG,OAAO,EACnB,IAAI,EACJ,UAAU,GAAG,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zE,oEAAoE;YACpE,sEAAsE;YACtE,uEAAuE;YACvE,IAAI,CAAC;gBACH,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACpB,CAAC;YAAC,MAAM,CAAC;gBACP,mEAAmE;YACrE,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,73 @@
1
+ /** @module agent-protocol/acp/text-suppression
2
+ * Generic tagged-text-block suppressor for stripping `<artifact>`/`<DSML
3
+ * artifact>` and `<tool_call>`/`<edit>` XML-ish echo tags out of streamed
4
+ * agent text, so a run's canonical text_delta stream doesn't leak an agent's
5
+ * raw tool/artifact echo. Pure string processing — no I/O, no dependency on
6
+ * any other agent-protocol file. ACP-session-only today (the sole consumer is
7
+ * acp/session.ts), so it is colocated here rather than promoted to a
8
+ * package-wide shared module with only one real consumer.
9
+ *
10
+ * Ported from the upstream product's `apps/daemon/src/artifacts/text-suppression.ts`
11
+ * with two private helpers (`possibleDsmlArtifactOpenStart`,
12
+ * `possibleArtifactCloseStart`) dropped — both were declared but never
13
+ * called anywhere in the origin file (verified by grep); keeping genuinely
14
+ * dead, unreachable code would force either a contrived test or a
15
+ * coverage-suppression comment to satisfy this package's >=99% bar, and this
16
+ * repo's coverage-discipline convention calls for refactoring dead branches
17
+ * away rather than either of those. See source-map.md.
18
+ */
19
+ /** A single streamed text delta event, as consumed by `emitWithTextSuppressor`. */
20
+ type EventSink = (event: {
21
+ type: 'text_delta';
22
+ delta: string;
23
+ }) => void;
24
+ /** A stateful stripper that removes a specific tagged text block (DSML
25
+ * artifact echo, or tool_call/edit echo) from a stream of text deltas,
26
+ * buffering a bounded "possible tag start" candidate across calls so a tag
27
+ * split across two deltas is still detected. */
28
+ export interface ArtifactTextSuppressor {
29
+ /** Feeds the next text delta through the suppressor, returning the portion
30
+ * (if any) that is safe to emit as visible text right now. */
31
+ strip(text: string): string;
32
+ /** Drains any buffered candidate text at end-of-stream. Returns `''` while
33
+ * still inside a suppressed block (nothing pending is safe to emit). */
34
+ flush(): string;
35
+ /** Returns `true` while currently inside a suppressed tagged block. */
36
+ isSuppressing(): boolean;
37
+ /** Returns `true` when a possible-tag-start candidate is buffered but not
38
+ * yet resolved as an actual open/close tag. */
39
+ hasPendingCandidate(): boolean;
40
+ /** Returns a snapshot of suppression counters for diagnostics. */
41
+ stats(): ArtifactTextSuppressorStats;
42
+ }
43
+ /** Diagnostic counters describing an `ArtifactTextSuppressor`'s cumulative activity. */
44
+ export interface ArtifactTextSuppressorStats {
45
+ suppressedChars: number;
46
+ suppressedChunks: number;
47
+ openedBlocks: number;
48
+ closedBlocks: number;
49
+ pendingCandidateChars: number;
50
+ suppressing: boolean;
51
+ }
52
+ /**
53
+ * Creates a suppressor that strips `<artifact>...</artifact>` and
54
+ * `<|DSML artifact|>...<|/DSML|>` blocks from streamed agent text.
55
+ */
56
+ export declare function createDsmlArtifactTextSuppressor(): ArtifactTextSuppressor;
57
+ /**
58
+ * Creates a suppressor that strips `<tool_call>...</tool_call>` and
59
+ * `<edit>...</edit>` blocks from streamed agent text.
60
+ */
61
+ export declare function createToolCallTextSuppressor(): ArtifactTextSuppressor;
62
+ /**
63
+ * Runs `text` through `suppressor` and, if any visible text survives,
64
+ * forwards it to `onEvent` as a `text_delta`.
65
+ *
66
+ * @param suppressor - The suppressor to strip `text` through.
67
+ * @param onEvent - Sink invoked with a `text_delta` event when output survives.
68
+ * @param text - The raw text delta to strip.
69
+ * @returns `true` when a `text_delta` was emitted, `false` otherwise.
70
+ */
71
+ export declare function emitWithTextSuppressor(suppressor: ArtifactTextSuppressor, onEvent: EventSink, text: string): boolean;
72
+ export {};
73
+ //# sourceMappingURL=text-suppression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-suppression.d.ts","sourceRoot":"","sources":["../../../src/agent-protocol/acp/text-suppression.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,mFAAmF;AACnF,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,CAAC;AAaxE;;;gDAGgD;AAChD,MAAM,WAAW,sBAAsB;IACrC;kEAC8D;IAC9D,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B;4EACwE;IACxE,KAAK,IAAI,MAAM,CAAC;IAChB,uEAAuE;IACvE,aAAa,IAAI,OAAO,CAAC;IACzB;mDAC+C;IAC/C,mBAAmB,IAAI,OAAO,CAAC;IAC/B,kEAAkE;IAClE,KAAK,IAAI,2BAA2B,CAAC;CACtC;AAED,wFAAwF;AACxF,MAAM,WAAW,2BAA2B;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,IAAI,sBAAsB,CAOzE;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,sBAAsB,CAOrE;AAoGD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,sBAAsB,EAClC,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,MAAM,GACX,OAAO,CAKT"}
@@ -0,0 +1,229 @@
1
+ /** @module agent-protocol/acp/text-suppression
2
+ * Generic tagged-text-block suppressor for stripping `<artifact>`/`<DSML
3
+ * artifact>` and `<tool_call>`/`<edit>` XML-ish echo tags out of streamed
4
+ * agent text, so a run's canonical text_delta stream doesn't leak an agent's
5
+ * raw tool/artifact echo. Pure string processing — no I/O, no dependency on
6
+ * any other agent-protocol file. ACP-session-only today (the sole consumer is
7
+ * acp/session.ts), so it is colocated here rather than promoted to a
8
+ * package-wide shared module with only one real consumer.
9
+ *
10
+ * Ported from the upstream product's `apps/daemon/src/artifacts/text-suppression.ts`
11
+ * with two private helpers (`possibleDsmlArtifactOpenStart`,
12
+ * `possibleArtifactCloseStart`) dropped — both were declared but never
13
+ * called anywhere in the origin file (verified by grep); keeping genuinely
14
+ * dead, unreachable code would force either a contrived test or a
15
+ * coverage-suppression comment to satisfy this package's >=99% bar, and this
16
+ * repo's coverage-discipline convention calls for refactoring dead branches
17
+ * away rather than either of those. See source-map.md.
18
+ */
19
+ const ARTIFACT_OPEN_RE = /(?:<\s*\|?\s*DSML[\s,]+artifact\b[^>]*>|<\s*artifact\b[^>]*>)/i;
20
+ const DSML_ARTIFACT_CLOSE_RE = /(?:<\/artifact>|<\/\s*\|?\s*DSML\s*>|<\s*\|?\s*\/\s*DSML\s*\|?\s*>)/i;
21
+ const DSML_OPEN_CANONICAL = 'dsmlartifact';
22
+ const ARTIFACT_OPEN_CANONICAL = 'artifact';
23
+ const ARTIFACT_CLOSE_CANONICALS = ['artifact', 'dsml'];
24
+ const TOOL_CALL_OPEN_RE = /(?:<\s*tool_call\b[^>]*>|<\s*edit\s*>)/i;
25
+ const TOOL_CALL_CLOSE_RE = /(?:<\/\s*tool_call\s*>|<\/\s*edit\s*>)/i;
26
+ const TOOL_CALL_OPEN_CANONICALS = ['toolcall', 'edit'];
27
+ const TOOL_CALL_CLOSE_CANONICALS = ['toolcall', 'edit'];
28
+ const MAX_CANDIDATE_LENGTH = 512;
29
+ /**
30
+ * Creates a suppressor that strips `<artifact>...</artifact>` and
31
+ * `<|DSML artifact|>...<|/DSML|>` blocks from streamed agent text.
32
+ */
33
+ export function createDsmlArtifactTextSuppressor() {
34
+ return createTaggedTextSuppressor({
35
+ openRe: ARTIFACT_OPEN_RE,
36
+ closeRe: DSML_ARTIFACT_CLOSE_RE,
37
+ isPossibleOpen: isPossibleDsmlArtifactOpen,
38
+ isPossibleClose: isPossibleArtifactClose,
39
+ });
40
+ }
41
+ /**
42
+ * Creates a suppressor that strips `<tool_call>...</tool_call>` and
43
+ * `<edit>...</edit>` blocks from streamed agent text.
44
+ */
45
+ export function createToolCallTextSuppressor() {
46
+ return createTaggedTextSuppressor({
47
+ openRe: TOOL_CALL_OPEN_RE,
48
+ closeRe: TOOL_CALL_CLOSE_RE,
49
+ isPossibleOpen: isPossibleToolCallOpen,
50
+ isPossibleClose: isPossibleToolCallClose,
51
+ });
52
+ }
53
+ /**
54
+ * Builds a stateful `ArtifactTextSuppressor` for one open/close tag pair.
55
+ * Shared implementation behind both `createDsmlArtifactTextSuppressor` and
56
+ * `createToolCallTextSuppressor`.
57
+ *
58
+ * @param args.openRe - Matches a complete opening tag.
59
+ * @param args.closeRe - Matches a complete closing tag.
60
+ * @param args.isPossibleOpen - Returns `true` when a trailing fragment could
61
+ * still grow into a complete opening tag on the next delta.
62
+ * @param args.isPossibleClose - Same, for the closing tag.
63
+ */
64
+ function createTaggedTextSuppressor(args) {
65
+ let suppressing = false;
66
+ let candidate = '';
67
+ let suppressedChars = 0;
68
+ let suppressedChunks = 0;
69
+ let openedBlocks = 0;
70
+ let closedBlocks = 0;
71
+ function noteSuppressed(text) {
72
+ if (text.length <= 0)
73
+ return;
74
+ suppressedChars += text.length;
75
+ suppressedChunks += 1;
76
+ }
77
+ function strip(text) {
78
+ const current = `${candidate}${text}`;
79
+ candidate = '';
80
+ if (suppressing) {
81
+ const close = args.closeRe.exec(current);
82
+ if (!close || close.index === undefined) {
83
+ const closeCandidateStart = possibleTagStart(current, args.isPossibleClose);
84
+ if (closeCandidateStart !== -1) {
85
+ candidate = current.slice(closeCandidateStart);
86
+ noteSuppressed(current.slice(0, closeCandidateStart));
87
+ }
88
+ else {
89
+ noteSuppressed(current);
90
+ }
91
+ return '';
92
+ }
93
+ suppressing = false;
94
+ const end = close.index + close[0].length;
95
+ closedBlocks += 1;
96
+ noteSuppressed(current.slice(0, end));
97
+ return strip(current.slice(end));
98
+ }
99
+ const open = args.openRe.exec(current);
100
+ if (open && open.index !== undefined) {
101
+ suppressing = true;
102
+ openedBlocks += 1;
103
+ const prefix = current.slice(0, open.index);
104
+ const tail = current.slice(open.index + open[0].length);
105
+ noteSuppressed(open[0]);
106
+ return `${prefix}${strip(tail)}`;
107
+ }
108
+ const candidateStart = possibleTagStart(current, args.isPossibleOpen);
109
+ if (candidateStart === -1)
110
+ return current;
111
+ candidate = current.slice(candidateStart);
112
+ return current.slice(0, candidateStart);
113
+ }
114
+ function flush() {
115
+ const text = candidate;
116
+ candidate = '';
117
+ return suppressing ? '' : text;
118
+ }
119
+ function isSuppressing() {
120
+ return suppressing;
121
+ }
122
+ function hasPendingCandidate() {
123
+ return candidate.length > 0;
124
+ }
125
+ function stats() {
126
+ return {
127
+ suppressedChars,
128
+ suppressedChunks,
129
+ openedBlocks,
130
+ closedBlocks,
131
+ pendingCandidateChars: candidate.length,
132
+ suppressing,
133
+ };
134
+ }
135
+ return { strip, flush, isSuppressing, hasPendingCandidate, stats };
136
+ }
137
+ /**
138
+ * Runs `text` through `suppressor` and, if any visible text survives,
139
+ * forwards it to `onEvent` as a `text_delta`.
140
+ *
141
+ * @param suppressor - The suppressor to strip `text` through.
142
+ * @param onEvent - Sink invoked with a `text_delta` event when output survives.
143
+ * @param text - The raw text delta to strip.
144
+ * @returns `true` when a `text_delta` was emitted, `false` otherwise.
145
+ */
146
+ export function emitWithTextSuppressor(suppressor, onEvent, text) {
147
+ const delta = suppressor.strip(text);
148
+ if (!delta)
149
+ return false;
150
+ onEvent({ type: 'text_delta', delta });
151
+ return true;
152
+ }
153
+ /**
154
+ * Finds the start index of the rightmost `<`-prefixed suffix of `text` that
155
+ * could still grow into a complete tag matched by `predicate`, scanning back
156
+ * at most `MAX_CANDIDATE_LENGTH` characters. Returns `-1` when no such suffix
157
+ * exists.
158
+ *
159
+ * @internal
160
+ */
161
+ function possibleTagStart(text, predicate) {
162
+ const min = Math.max(0, text.length - MAX_CANDIDATE_LENGTH);
163
+ let index = text.lastIndexOf('<');
164
+ while (index >= min) {
165
+ const tail = text.slice(index);
166
+ if (predicate(tail))
167
+ return index;
168
+ if (index === 0)
169
+ break;
170
+ index = text.lastIndexOf('<', index - 1);
171
+ }
172
+ return -1;
173
+ }
174
+ /**
175
+ * Returns `true` when `text` is a `<`-prefixed, not-yet-closed fragment that
176
+ * could still grow into a DSML-artifact or plain-artifact opening tag.
177
+ *
178
+ * @internal
179
+ */
180
+ function isPossibleDsmlArtifactOpen(text) {
181
+ if (!text.startsWith('<') || text.includes('>'))
182
+ return false;
183
+ const compact = text.toLowerCase().replace(/[<|,\s]/g, '');
184
+ return compact.length === 0 ||
185
+ DSML_OPEN_CANONICAL.startsWith(compact) ||
186
+ compact.startsWith(DSML_OPEN_CANONICAL) ||
187
+ ARTIFACT_OPEN_CANONICAL.startsWith(compact) ||
188
+ compact.startsWith(ARTIFACT_OPEN_CANONICAL);
189
+ }
190
+ /**
191
+ * Returns `true` when `text` is a `<`-prefixed, not-yet-closed fragment that
192
+ * could still grow into an artifact/DSML closing tag.
193
+ *
194
+ * @internal
195
+ */
196
+ function isPossibleArtifactClose(text) {
197
+ if (!text.startsWith('<') || text.includes('>'))
198
+ return false;
199
+ const compact = text.toLowerCase().replace(/[<|/\s]/g, '');
200
+ return compact.length === 0 ||
201
+ ARTIFACT_CLOSE_CANONICALS.some((canonical) => canonical.startsWith(compact) || compact.startsWith(canonical));
202
+ }
203
+ /**
204
+ * Returns `true` when `text` is a `<`-prefixed, not-yet-closed fragment that
205
+ * could still grow into a `tool_call`/`edit` opening tag.
206
+ *
207
+ * @internal
208
+ */
209
+ function isPossibleToolCallOpen(text) {
210
+ if (!text.startsWith('<') || text.includes('>'))
211
+ return false;
212
+ const compact = text.toLowerCase().replace(/[<|,\s_-]/g, '');
213
+ return compact.length === 0 ||
214
+ TOOL_CALL_OPEN_CANONICALS.some((canonical) => canonical.startsWith(compact) || compact.startsWith(canonical));
215
+ }
216
+ /**
217
+ * Returns `true` when `text` is a `<`-prefixed, not-yet-closed fragment that
218
+ * could still grow into a `tool_call`/`edit` closing tag.
219
+ *
220
+ * @internal
221
+ */
222
+ function isPossibleToolCallClose(text) {
223
+ if (!text.startsWith('<') || text.includes('>'))
224
+ return false;
225
+ const compact = text.toLowerCase().replace(/[<|/\s_-]/g, '');
226
+ return compact.length === 0 ||
227
+ TOOL_CALL_CLOSE_CANONICALS.some((canonical) => canonical.startsWith(compact) || compact.startsWith(canonical));
228
+ }
229
+ //# sourceMappingURL=text-suppression.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-suppression.js","sourceRoot":"","sources":["../../../src/agent-protocol/acp/text-suppression.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,MAAM,gBAAgB,GAAG,gEAAgE,CAAC;AAC1F,MAAM,sBAAsB,GAAG,sEAAsE,CAAC;AACtG,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAC3C,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAC3C,MAAM,yBAAyB,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACvD,MAAM,iBAAiB,GAAG,yCAAyC,CAAC;AACpE,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AACrE,MAAM,yBAAyB,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACvD,MAAM,0BAA0B,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACxD,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAgCjC;;;GAGG;AACH,MAAM,UAAU,gCAAgC;IAC9C,OAAO,0BAA0B,CAAC;QAChC,MAAM,EAAE,gBAAgB;QACxB,OAAO,EAAE,sBAAsB;QAC/B,cAAc,EAAE,0BAA0B;QAC1C,eAAe,EAAE,uBAAuB;KACzC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,4BAA4B;IAC1C,OAAO,0BAA0B,CAAC;QAChC,MAAM,EAAE,iBAAiB;QACzB,OAAO,EAAE,kBAAkB;QAC3B,cAAc,EAAE,sBAAsB;QACtC,eAAe,EAAE,uBAAuB;KACzC,C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AAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAC7D,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC;QACzB,yBAAyB,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAC3C,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAC/D,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,SAAS,uBAAuB,CAAC,IAAY;IAC3C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAC7D,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC;QACzB,0BAA0B,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAC5C,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAC/D,CAAC;AACN,CAAC"}
@@ -0,0 +1,27 @@
1
+ /** @module agent-protocol/acp/types
2
+ * Shared primitive type aliases for the ACP JSON-RPC transport layer.
3
+ * Consumed by every other file in acp/; depends only on Node built-ins and
4
+ * carries no runtime code.
5
+ */
6
+ import type { Writable } from 'node:stream';
7
+ import type { ChildProcess } from 'node:child_process';
8
+ /** A JSON-RPC 2.0 request or response identifier. May be a numeric integer or a string. */
9
+ export type JsonRpcId = string | number;
10
+ /** An arbitrary JSON object with string keys and unknown values. Used as a loose type for parsed RPC frames. */
11
+ export type JsonObject = Record<string, unknown>;
12
+ /** Minimal writable interface required to send JSON-RPC newline-delimited frames to an ACP agent's stdin. */
13
+ export type RpcWritable = Pick<Writable, 'write' | 'end'>;
14
+ /** The Node `ChildProcess` handle for a spawned ACP agent subprocess. */
15
+ export type AcpChildProcess = ChildProcess;
16
+ /** Opaque handle returned by `setTimeout`, used for stage watchdog timers in acp/session.ts and acp/models.ts. */
17
+ export type TimerHandle = ReturnType<typeof setTimeout>;
18
+ /**
19
+ * Execution profile of an agent run: whether artifacts are written to the
20
+ * filesystem (`'filesystem'`) or emitted inline as agent text
21
+ * (`'text_artifact'`). Inlined here rather than imported from an external
22
+ * contracts package — the upstream type is a trivial two-value literal union
23
+ * with no product-specific branding, so importing a whole package for it
24
+ * would be the tail wagging the dog. See source-map.md.
25
+ */
26
+ export type ExecutionProfile = 'filesystem' | 'text_artifact';
27
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/agent-protocol/acp/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,2FAA2F;AAC3F,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AACxC,gHAAgH;AAChH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACjD,6GAA6G;AAC7G,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,KAAK,CAAC,CAAC;AAC1D,yEAAyE;AACzE,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC;AAC3C,kHAAkH;AAClH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/agent-protocol/acp/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,166 @@
1
+ /** @module agent-protocol/acp/updates
2
+ * ACP session-update classification helpers: status normalisation,
3
+ * artifact-write detection, AMR retry/stderr failure promotion (via the
4
+ * injectable `AccountFailureClassifier` port), and raw event-shape
5
+ * diagnostics. Depends on acp/types, acp/json, and acp/account-failure;
6
+ * consumed exclusively by acp/session.ts.
7
+ */
8
+ import type { JsonObject } from './types.js';
9
+ import { type AccountFailureClassifier } from './account-failure.js';
10
+ /**
11
+ * Produces a shallow diagnostic snapshot of an ACP update object for the
12
+ * `acp_raw_event_shape` diagnostic event. Captures key presence, value kinds,
13
+ * and content structure without serialising the full update, so the payload
14
+ * stays bounded in size. Emitted only for AMR sessions where unknown shapes
15
+ * may require debugging.
16
+ *
17
+ * @param update - A parsed ACP `session/update` params object.
18
+ * @returns A flat diagnostic object suitable for inclusion in an agent event payload.
19
+ */
20
+ export declare function acpRawEventShape(update: JsonObject): {
21
+ sessionUpdate: string | null;
22
+ keys: string[];
23
+ contentKind: string;
24
+ contentKeys: string[];
25
+ hasText: boolean;
26
+ hasTopLevelText: boolean;
27
+ hasTopLevelDelta: boolean;
28
+ hasTopLevelMessage: boolean;
29
+ hasToolCallId: boolean;
30
+ hasRawInput: boolean;
31
+ rawInputKind: string;
32
+ rawInputKeys: string[];
33
+ locationsKind: string;
34
+ locationsCount: number | undefined;
35
+ status: string | undefined;
36
+ titlePresent: boolean;
37
+ };
38
+ /**
39
+ * Normalises the `status` field of an ACP update to a lowercase,
40
+ * whitespace-and-punctuation-stripped token. Returns `''` when the field
41
+ * is absent or not a string, so all status comparisons use the token form.
42
+ *
43
+ * @param update - A parsed ACP `session/update` params object.
44
+ */
45
+ export declare function acpUpdateStatus(update: JsonObject): string;
46
+ /**
47
+ * Returns `true` when the update's `status` field represents a successful
48
+ * terminal state (`completed`, `complete`, `succeeded`, or `success`).
49
+ * Used to decide when to emit deferred artifact-write tool events.
50
+ */
51
+ export declare function isAcpCompletedStatus(update: JsonObject): boolean;
52
+ /**
53
+ * Returns `true` when the update's `status` field represents a terminal
54
+ * failure state (`failed`, `failure`, `error`, `cancelled`, or `canceled`).
55
+ * Used to clean up pending write-suppression state and emit failed tool events.
56
+ */
57
+ export declare function isAcpTerminalFailureStatus(update: JsonObject): boolean;
58
+ /**
59
+ * Returns `true` when the update's status is `'retry'`. Signals that the AMR
60
+ * agent wants to restart the request; the session promoter maps this to a
61
+ * structured error payload via `promotedAmrRetryStatusPayload`.
62
+ */
63
+ export declare function isAcpRetryStatus(update: JsonObject): boolean;
64
+ /**
65
+ * Recursively collects all text-bearing leaf values from an ACP update
66
+ * (strings, numbers, booleans) up to 4 levels deep. Used to produce a flat
67
+ * text corpus for an injected `AccountFailureClassifier` to pattern-match
68
+ * against, without requiring knowledge of a specific agent's response shape.
69
+ *
70
+ * @param value - Any value from a parsed ACP session update.
71
+ * @param depth - Current recursion depth (max 4); callers omit this.
72
+ * @returns A flat array of trimmed non-empty string representations.
73
+ */
74
+ export declare function acpUpdateDiagnosticText(value: unknown, depth?: number): string[];
75
+ /**
76
+ * Promotes an AMR `retry` status update into a structured error payload when
77
+ * the update's diagnostic text matches a known account-failure pattern (e.g.
78
+ * quota exceeded, auth failure), as decided by `classifier`. Returns `null`
79
+ * when the update is not a retry, or when `classifier` finds no match.
80
+ *
81
+ * @param update - A parsed ACP `session/update` params object.
82
+ * @param classifier - The account-failure classifier to consult; defaults to
83
+ * `noopAccountFailureClassifier`, under which this always returns `null`.
84
+ * @returns A structured error payload with `message` and `error`, or `null`.
85
+ */
86
+ export declare function promotedAmrRetryStatusPayload(update: JsonObject, classifier?: AccountFailureClassifier): {
87
+ message: string;
88
+ error: {
89
+ code: string;
90
+ message: string;
91
+ retryable: boolean;
92
+ details: {
93
+ promoted_by: string;
94
+ kind: "account_failure";
95
+ action: string;
96
+ actionUrl?: string;
97
+ };
98
+ };
99
+ } | null;
100
+ /**
101
+ * Scans a rolling tail of AMR stderr output for known retry/session-failure
102
+ * signals and, when found, promotes a match (via `classifier`) to a
103
+ * structured error payload. Returns `null` when the chunk does not contain
104
+ * the expected markers or does not match a known failure pattern.
105
+ *
106
+ * @param chunk - A tail slice of accumulated stderr bytes from the AMR subprocess.
107
+ * @param classifier - The account-failure classifier to consult; defaults to
108
+ * `noopAccountFailureClassifier`, under which this always returns `null`.
109
+ * @returns A structured error payload, or `null` when not applicable.
110
+ */
111
+ export declare function promotedAmrStderrPayload(chunk: string, classifier?: AccountFailureClassifier): {
112
+ message: string;
113
+ error: {
114
+ code: string;
115
+ message: string;
116
+ retryable: boolean;
117
+ details: {
118
+ promoted_by: string;
119
+ kind: "account_failure";
120
+ action: string;
121
+ actionUrl?: string;
122
+ };
123
+ };
124
+ } | null;
125
+ /**
126
+ * Extracts and trims the `toolCallId` string from an ACP update, or returns
127
+ * `null` when absent or empty. Used as a stable dedup key for artifact-write
128
+ * tracking across update frames.
129
+ *
130
+ * @param update - A parsed ACP `session/update` params object.
131
+ */
132
+ export declare function acpToolCallId(update: JsonObject): string | null;
133
+ /**
134
+ * Returns `true` when the update's `title` or `name` field contains a word
135
+ * that indicates a file-write operation (`edit`, `write`, `create`, `update`,
136
+ * `save`, `patch`, or `replace`). Used to heuristically identify
137
+ * artifact-write tool calls before their `toolCallId` is known.
138
+ *
139
+ * @param update - A parsed ACP `session/update` params object.
140
+ */
141
+ export declare function isAcpArtifactWriteLabel(update: JsonObject): boolean;
142
+ /**
143
+ * Returns `true` when an ACP update represents the terminal completion of an
144
+ * artifact-write tool call and should arm the DSML text suppressor. Requires
145
+ * a completed status combined with either a write-style label or a tool call
146
+ * id tracked in `writeToolCallIds`.
147
+ *
148
+ * @param update - A parsed ACP `session/update` params object.
149
+ * @param writeToolCallIds - The set of tool call ids identified as artifact writes so far.
150
+ */
151
+ export declare function isAcpArtifactWriteUpdate(update: JsonObject, writeToolCallIds: Set<string>): boolean;
152
+ /**
153
+ * Best-effort extraction of a concrete file path from an ACP artifact-write
154
+ * tool call update, checking three sources in priority order:
155
+ * 1. `locations` or `content` array entries with a `path` field.
156
+ * 2. `rawInput.path`, `rawInput.file_path`, or `rawInput.filename`.
157
+ * 3. A filename token embedded in the human-readable `title` field.
158
+ *
159
+ * Returns `null` when no concrete path is present; the caller then falls
160
+ * back to the toolCallId as a dedup key.
161
+ *
162
+ * @param update - A parsed ACP `session/update` params object.
163
+ * @returns An absolute or relative file path string, or `null` when absent.
164
+ */
165
+ export declare function acpArtifactWritePath(update: JsonObject): string | null;
166
+ //# sourceMappingURL=updates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updates.d.ts","sourceRoot":"","sources":["../../../src/agent-protocol/acp/updates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;EAsBlD;AACD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAI1D;AACD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAGhE;AACD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAGtE;AACD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAE5D;AACD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,MAAM,EAAE,CA6B3E;AACD;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,UAAU,EAClB,UAAU,GAAE,wBAAuD;;;;;;;;;;;;;SAkBpE;AACD;;;;;;;;;;GAUG;AACH,w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