@harrylabsj/kiwi-merchant-cloud 0.12.4 → 0.12.5

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 (1225) hide show
  1. package/app/a2a/node.d.ts +5 -1
  2. package/app/a2a/node.js +68 -30
  3. package/app/a2a/node.js.map +1 -1
  4. package/app/a2a/server/merchant-handler.d.ts +4 -0
  5. package/app/a2a/server/merchant-handler.js +123 -45
  6. package/app/a2a/server/merchant-handler.js.map +1 -1
  7. package/app/a2a/server/merchant-product-facts.d.ts +32 -0
  8. package/app/a2a/server/merchant-product-facts.js +57 -0
  9. package/app/a2a/server/merchant-product-facts.js.map +1 -0
  10. package/app/agent/buyer/buyer-tools.js +285 -3
  11. package/app/agent/buyer/buyer-tools.js.map +1 -1
  12. package/app/agent/merchant/types.d.ts +4 -9
  13. package/app/agent/merchant/types.js +14 -0
  14. package/app/agent/merchant/types.js.map +1 -1
  15. package/app/buyer-core/a2a-knp.d.ts +1 -0
  16. package/app/buyer-core/a2a-knp.js +1 -1
  17. package/app/buyer-core/a2a-knp.js.map +1 -1
  18. package/app/buyer-core/a2a-negotiator.d.ts +2 -0
  19. package/app/buyer-core/a2a-negotiator.js +20 -19
  20. package/app/buyer-core/a2a-negotiator.js.map +1 -1
  21. package/app/buyer-core/a2a-quote-fetcher.d.ts +2 -0
  22. package/app/buyer-core/a2a-quote-fetcher.js +13 -5
  23. package/app/buyer-core/a2a-quote-fetcher.js.map +1 -1
  24. package/app/buyer-core/product-summary.d.ts +4 -0
  25. package/app/buyer-core/product-summary.js +6 -0
  26. package/app/buyer-core/product-summary.js.map +1 -1
  27. package/app/buyer-core/protocol-recovery.d.ts +12 -1
  28. package/app/buyer-core/protocol-recovery.js +59 -19
  29. package/app/buyer-core/protocol-recovery.js.map +1 -1
  30. package/app/buyer-core/receive-gate.d.ts +11 -0
  31. package/app/buyer-core/receive-gate.js +107 -0
  32. package/app/buyer-core/receive-gate.js.map +1 -0
  33. package/app/cloud/bootstrap.d.ts +4 -0
  34. package/app/cloud/bootstrap.js +69 -55
  35. package/app/cloud/bootstrap.js.map +1 -1
  36. package/app/cloud/file-listing-publication.js +6 -0
  37. package/app/cloud/file-listing-publication.js.map +1 -1
  38. package/app/cloud/main.d.ts +3 -0
  39. package/app/cloud/main.js +47 -11
  40. package/app/cloud/main.js.map +1 -1
  41. package/app/cloud/product-import-tabular.d.ts +1 -1
  42. package/app/cloud/product-import-tabular.js +263 -36
  43. package/app/cloud/product-import-tabular.js.map +1 -1
  44. package/app/cloud/product-source.d.ts +6 -1
  45. package/app/cloud/product-source.js +47 -15
  46. package/app/cloud/product-source.js.map +1 -1
  47. package/app/cloud-sample/products.json +3 -3
  48. package/app/commerce/data-source.d.ts +4 -0
  49. package/app/commerce/data-source.js.map +1 -1
  50. package/app/commerce/shopping-cli-source.js +4 -0
  51. package/app/commerce/shopping-cli-source.js.map +1 -1
  52. package/app/discovery/catalog-source/kiwi-source.d.ts +2 -0
  53. package/app/discovery/catalog-source/kiwi-source.js +4 -0
  54. package/app/discovery/catalog-source/kiwi-source.js.map +1 -1
  55. package/app/handoff/index.d.ts +2 -1
  56. package/app/handoff/index.js +1 -0
  57. package/app/handoff/index.js.map +1 -1
  58. package/app/handoff/launch-marketplace-policy.d.ts +149 -0
  59. package/app/handoff/launch-marketplace-policy.js +301 -0
  60. package/app/handoff/launch-marketplace-policy.js.map +1 -0
  61. package/app/handoff/marketplace-product-link.d.ts +18 -0
  62. package/app/handoff/marketplace-product-link.js +71 -0
  63. package/app/handoff/marketplace-product-link.js.map +1 -0
  64. package/app/handoff/transaction.d.ts +30 -0
  65. package/app/handoff/transaction.js +64 -0
  66. package/app/handoff/transaction.js.map +1 -1
  67. package/app/handoff/url-safety.d.ts +3 -0
  68. package/app/handoff/url-safety.js +4 -0
  69. package/app/handoff/url-safety.js.map +1 -1
  70. package/app/http/merchant-management/page.js +176 -45
  71. package/app/http/merchant-management/page.js.map +1 -1
  72. package/app/i18n.d.ts +1 -0
  73. package/app/i18n.js +3 -0
  74. package/app/i18n.js.map +1 -1
  75. package/app/lifecycle/close.d.ts +24 -0
  76. package/app/lifecycle/close.js +131 -0
  77. package/app/lifecycle/close.js.map +1 -0
  78. package/app/mcp/merchant-runtime-assembly.js +6 -4
  79. package/app/mcp/merchant-runtime-assembly.js.map +1 -1
  80. package/app/mcp/tools.js +17 -16
  81. package/app/mcp/tools.js.map +1 -1
  82. package/app/merchant/application/service.d.ts +4 -0
  83. package/app/merchant/application/service.js.map +1 -1
  84. package/app/merchant/stats-store.d.ts +3 -0
  85. package/app/merchant/stats-store.js +15 -1
  86. package/app/merchant/stats-store.js.map +1 -1
  87. package/app/merchant-core/rfq/data-source-adapter.d.ts +2 -10
  88. package/app/merchant-core/rfq/data-source-adapter.js +21 -9
  89. package/app/merchant-core/rfq/data-source-adapter.js.map +1 -1
  90. package/app/merchant-gateway/pinned-fetch.js +5 -2
  91. package/app/merchant-gateway/pinned-fetch.js.map +1 -1
  92. package/build-manifest.json +2901 -1966
  93. package/node_modules/@earendil-works/chord/CHANGELOG.md +20 -0
  94. package/node_modules/@earendil-works/chord/README.md +77 -194
  95. package/node_modules/@earendil-works/chord/dist/cell.d.ts +101 -0
  96. package/node_modules/@earendil-works/chord/dist/cell.d.ts.map +1 -0
  97. package/node_modules/@earendil-works/chord/dist/cell.js +316 -0
  98. package/node_modules/@earendil-works/chord/dist/cell.js.map +1 -0
  99. package/node_modules/@earendil-works/chord/dist/cluster.d.ts +26 -0
  100. package/node_modules/@earendil-works/chord/dist/cluster.d.ts.map +1 -0
  101. package/node_modules/@earendil-works/chord/dist/cluster.js +214 -0
  102. package/node_modules/@earendil-works/chord/dist/cluster.js.map +1 -0
  103. package/node_modules/@earendil-works/chord/dist/connection.d.ts +157 -0
  104. package/node_modules/@earendil-works/chord/dist/connection.d.ts.map +1 -0
  105. package/node_modules/@earendil-works/chord/dist/connection.js +757 -0
  106. package/node_modules/@earendil-works/chord/dist/connection.js.map +1 -0
  107. package/node_modules/@earendil-works/chord/dist/context/index.d.ts +12 -1
  108. package/node_modules/@earendil-works/chord/dist/context/index.d.ts.map +1 -1
  109. package/node_modules/@earendil-works/chord/dist/context/index.js.map +1 -1
  110. package/node_modules/@earendil-works/chord/dist/contract.d.ts +133 -0
  111. package/node_modules/@earendil-works/chord/dist/contract.d.ts.map +1 -0
  112. package/node_modules/@earendil-works/chord/dist/contract.js +157 -0
  113. package/node_modules/@earendil-works/chord/dist/contract.js.map +1 -0
  114. package/node_modules/@earendil-works/chord/dist/declare.d.ts +70 -0
  115. package/node_modules/@earendil-works/chord/dist/declare.d.ts.map +1 -0
  116. package/node_modules/@earendil-works/chord/dist/declare.js +22 -0
  117. package/node_modules/@earendil-works/chord/dist/declare.js.map +1 -0
  118. package/node_modules/@earendil-works/chord/dist/delta/apply-immutable-trusted.js.map +1 -1
  119. package/node_modules/@earendil-works/chord/dist/delta/diff.d.ts +1 -1
  120. package/node_modules/@earendil-works/chord/dist/delta/diff.d.ts.map +1 -1
  121. package/node_modules/@earendil-works/chord/dist/delta/diff.js.map +1 -1
  122. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts +2 -2
  123. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts.map +1 -1
  124. package/node_modules/@earendil-works/chord/dist/delta/index.js +41 -0
  125. package/node_modules/@earendil-works/chord/dist/delta/index.js.map +1 -1
  126. package/node_modules/@earendil-works/chord/dist/delta/revision-validator.d.ts +1 -1
  127. package/node_modules/@earendil-works/chord/dist/delta/revision-validator.d.ts.map +1 -1
  128. package/node_modules/@earendil-works/chord/dist/delta/revision-validator.js.map +1 -1
  129. package/node_modules/@earendil-works/chord/dist/delta/tracker.d.ts +1 -1
  130. package/node_modules/@earendil-works/chord/dist/delta/tracker.d.ts.map +1 -1
  131. package/node_modules/@earendil-works/chord/dist/delta/tracker.js +40 -4
  132. package/node_modules/@earendil-works/chord/dist/delta/tracker.js.map +1 -1
  133. package/node_modules/@earendil-works/chord/dist/errors.d.ts +27 -0
  134. package/node_modules/@earendil-works/chord/dist/errors.d.ts.map +1 -0
  135. package/node_modules/@earendil-works/chord/dist/errors.js +44 -0
  136. package/node_modules/@earendil-works/chord/dist/errors.js.map +1 -0
  137. package/node_modules/@earendil-works/chord/dist/host.d.ts +254 -0
  138. package/node_modules/@earendil-works/chord/dist/host.d.ts.map +1 -0
  139. package/node_modules/@earendil-works/chord/dist/host.js +795 -0
  140. package/node_modules/@earendil-works/chord/dist/host.js.map +1 -0
  141. package/node_modules/@earendil-works/chord/dist/index.d.ts +17 -10
  142. package/node_modules/@earendil-works/chord/dist/index.d.ts.map +1 -1
  143. package/node_modules/@earendil-works/chord/dist/index.js +8 -8
  144. package/node_modules/@earendil-works/chord/dist/index.js.map +1 -1
  145. package/node_modules/@earendil-works/chord/dist/json.d.ts +9 -1
  146. package/node_modules/@earendil-works/chord/dist/json.d.ts.map +1 -1
  147. package/node_modules/@earendil-works/chord/dist/json.js.map +1 -1
  148. package/node_modules/@earendil-works/chord/dist/link.d.ts +72 -0
  149. package/node_modules/@earendil-works/chord/dist/link.d.ts.map +1 -0
  150. package/node_modules/@earendil-works/chord/dist/link.js +169 -0
  151. package/node_modules/@earendil-works/chord/dist/link.js.map +1 -0
  152. package/node_modules/@earendil-works/chord/dist/loader.d.ts +4 -0
  153. package/node_modules/@earendil-works/chord/dist/loader.d.ts.map +1 -0
  154. package/node_modules/@earendil-works/chord/dist/loader.js +68 -0
  155. package/node_modules/@earendil-works/chord/dist/loader.js.map +1 -0
  156. package/node_modules/@earendil-works/chord/dist/manager.d.ts +115 -0
  157. package/node_modules/@earendil-works/chord/dist/manager.d.ts.map +1 -0
  158. package/node_modules/@earendil-works/chord/dist/manager.js +319 -0
  159. package/node_modules/@earendil-works/chord/dist/manager.js.map +1 -0
  160. package/node_modules/@earendil-works/chord/dist/node.d.ts +3 -4
  161. package/node_modules/@earendil-works/chord/dist/node.d.ts.map +1 -1
  162. package/node_modules/@earendil-works/chord/dist/node.js +3 -2
  163. package/node_modules/@earendil-works/chord/dist/node.js.map +1 -1
  164. package/node_modules/@earendil-works/chord/dist/publish.d.ts +5 -0
  165. package/node_modules/@earendil-works/chord/dist/publish.d.ts.map +1 -0
  166. package/node_modules/@earendil-works/chord/dist/publish.js +40 -0
  167. package/node_modules/@earendil-works/chord/dist/publish.js.map +1 -0
  168. package/node_modules/@earendil-works/chord/dist/record.d.ts +320 -0
  169. package/node_modules/@earendil-works/chord/dist/record.d.ts.map +1 -0
  170. package/node_modules/@earendil-works/chord/dist/record.js +1292 -0
  171. package/node_modules/@earendil-works/chord/dist/record.js.map +1 -0
  172. package/node_modules/@earendil-works/chord/dist/registry.d.ts +25 -0
  173. package/node_modules/@earendil-works/chord/dist/registry.d.ts.map +1 -0
  174. package/node_modules/@earendil-works/chord/dist/registry.js +6 -0
  175. package/node_modules/@earendil-works/chord/dist/registry.js.map +1 -0
  176. package/node_modules/@earendil-works/chord/dist/reload.d.ts +118 -0
  177. package/node_modules/@earendil-works/chord/dist/reload.d.ts.map +1 -0
  178. package/node_modules/@earendil-works/chord/dist/reload.js +589 -0
  179. package/node_modules/@earendil-works/chord/dist/reload.js.map +1 -0
  180. package/node_modules/@earendil-works/chord/dist/remote.d.ts +70 -0
  181. package/node_modules/@earendil-works/chord/dist/remote.d.ts.map +1 -0
  182. package/node_modules/@earendil-works/chord/dist/remote.js +308 -0
  183. package/node_modules/@earendil-works/chord/dist/remote.js.map +1 -0
  184. package/node_modules/@earendil-works/chord/dist/schema.d.ts +21 -0
  185. package/node_modules/@earendil-works/chord/dist/schema.d.ts.map +1 -0
  186. package/node_modules/@earendil-works/chord/dist/schema.js +228 -0
  187. package/node_modules/@earendil-works/chord/dist/schema.js.map +1 -0
  188. package/node_modules/@earendil-works/chord/dist/state.d.ts +92 -0
  189. package/node_modules/@earendil-works/chord/dist/state.d.ts.map +1 -0
  190. package/node_modules/@earendil-works/chord/dist/{services/state.js → state.js} +28 -138
  191. package/node_modules/@earendil-works/chord/dist/state.js.map +1 -0
  192. package/node_modules/@earendil-works/chord/dist/types.d.ts +62 -262
  193. package/node_modules/@earendil-works/chord/dist/types.d.ts.map +1 -1
  194. package/node_modules/@earendil-works/chord/dist/types.js.map +1 -1
  195. package/node_modules/@earendil-works/chord/dist/websocket.d.ts +16 -0
  196. package/node_modules/@earendil-works/chord/dist/websocket.d.ts.map +1 -0
  197. package/node_modules/@earendil-works/chord/dist/websocket.js +15 -0
  198. package/node_modules/@earendil-works/chord/dist/websocket.js.map +1 -0
  199. package/node_modules/@earendil-works/chord/dist/wire.d.ts +135 -0
  200. package/node_modules/@earendil-works/chord/dist/wire.d.ts.map +1 -0
  201. package/node_modules/@earendil-works/chord/dist/wire.js +112 -0
  202. package/node_modules/@earendil-works/chord/dist/wire.js.map +1 -0
  203. package/node_modules/@earendil-works/chord/docs/guide.md +750 -0
  204. package/node_modules/@earendil-works/chord/docs/spec.md +261 -0
  205. package/node_modules/@earendil-works/chord/docs/tutorial.md +909 -0
  206. package/node_modules/@earendil-works/chord/package.json +10 -11
  207. package/node_modules/@earendil-works/chord/src/delta/README.md +5 -3
  208. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  209. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +9 -1
  210. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  211. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +2 -5
  212. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
  213. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +2 -14
  214. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
  215. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +4 -0
  216. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  217. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  218. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  219. package/node_modules/@earendil-works/pi-ai/README.md +14 -3
  220. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  221. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +63 -22
  222. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  223. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.d.ts +15 -0
  224. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.d.ts.map +1 -0
  225. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.js +76 -0
  226. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.js.map +1 -0
  227. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts +3 -6
  228. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
  229. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +2 -74
  230. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
  231. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +33 -2
  232. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  233. package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.d.ts +21 -0
  234. package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.d.ts.map +1 -0
  235. package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.js +98 -0
  236. package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.js.map +1 -0
  237. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.d.ts.map +1 -1
  238. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.js +2 -1
  239. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.js.map +1 -1
  240. package/node_modules/@earendil-works/pi-ai/dist/api/lazy.d.ts.map +1 -1
  241. package/node_modules/@earendil-works/pi-ai/dist/api/lazy.js +4 -3
  242. package/node_modules/@earendil-works/pi-ai/dist/api/lazy.js.map +1 -1
  243. package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.d.ts.map +1 -1
  244. package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.js +2 -0
  245. package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.js.map +1 -1
  246. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
  247. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +31 -14
  248. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  249. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  250. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +7 -4
  251. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  252. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.d.ts +4 -0
  253. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.d.ts.map +1 -0
  254. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.js +162 -0
  255. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.js.map +1 -0
  256. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.d.ts +3 -0
  257. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.d.ts.map +1 -0
  258. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.js +4 -0
  259. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.js.map +1 -0
  260. package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.d.ts +0 -1
  261. package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.d.ts.map +1 -1
  262. package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.js +5 -89
  263. package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.js.map +1 -1
  264. package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.d.ts.map +1 -1
  265. package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js +2 -1
  266. package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js.map +1 -1
  267. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.d.ts.map +1 -1
  268. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js +14 -6
  269. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js.map +1 -1
  270. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-chatgpt.js +1 -1
  271. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-chatgpt.js.map +1 -1
  272. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.d.ts.map +1 -1
  273. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js +4 -4
  274. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js.map +1 -1
  275. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +16 -1
  276. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
  277. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +51 -27
  278. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
  279. package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +5 -0
  280. package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts.map +1 -1
  281. package/node_modules/@earendil-works/pi-ai/dist/auth/types.js.map +1 -1
  282. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -1
  283. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
  284. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +5 -0
  285. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  286. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +4 -4
  287. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  288. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +4 -4
  289. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  290. package/node_modules/@earendil-works/pi-ai/dist/models.js +7 -8
  291. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  292. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -2
  293. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
  294. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.d.ts +3 -0
  295. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.d.ts.map +1 -0
  296. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.js +46 -0
  297. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.js.map +1 -0
  298. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.d.ts +6 -0
  299. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.d.ts.map +1 -0
  300. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.js +8 -0
  301. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.js.map +1 -0
  302. package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.d.ts +338 -0
  303. package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.d.ts.map +1 -0
  304. package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js +375 -0
  305. package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js.map +1 -0
  306. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  307. package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  308. package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
  309. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure.json +1 -0
  310. package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  311. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  312. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
  313. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  314. package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
  315. package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
  316. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  317. package/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -1
  318. package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
  319. package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
  320. package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
  321. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  322. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  323. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  324. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  325. package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
  326. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  327. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
  328. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +25 -8
  329. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  330. package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.d.ts +91 -0
  331. package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.d.ts.map +1 -0
  332. package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js +55 -0
  333. package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js.map +1 -0
  334. package/node_modules/@earendil-works/pi-ai/dist/providers/openai.d.ts.map +1 -1
  335. package/node_modules/@earendil-works/pi-ai/dist/providers/openai.js +12 -3
  336. package/node_modules/@earendil-works/pi-ai/dist/providers/openai.js.map +1 -1
  337. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.d.ts +40 -0
  338. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.d.ts.map +1 -0
  339. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.js +41 -0
  340. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.js.map +1 -0
  341. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.d.ts +11 -1
  342. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.d.ts.map +1 -1
  343. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js +52 -1
  344. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js.map +1 -1
  345. package/node_modules/@earendil-works/pi-ai/dist/providers/radius.d.ts.map +1 -1
  346. package/node_modules/@earendil-works/pi-ai/dist/providers/radius.js +4 -12
  347. package/node_modules/@earendil-works/pi-ai/dist/providers/radius.js.map +1 -1
  348. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +22 -305
  349. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  350. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  351. package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js +1 -1
  352. package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js.map +1 -1
  353. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +10 -1
  354. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
  355. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +25 -0
  356. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
  357. package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.d.ts +3 -1
  358. package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.d.ts.map +1 -1
  359. package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.js +6 -0
  360. package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.js.map +1 -1
  361. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts +2 -0
  362. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts.map +1 -1
  363. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +2 -0
  364. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +1 -1
  365. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
  366. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +8 -2
  367. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
  368. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  369. package/node_modules/@earendil-works/pi-codemode/README.md +177 -11
  370. package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.d.ts +53 -0
  371. package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.d.ts.map +1 -0
  372. package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.js +64 -0
  373. package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.js.map +1 -0
  374. package/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts +6 -21
  375. package/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts.map +1 -1
  376. package/node_modules/@earendil-works/pi-codemode/dist/declarations.js +113 -127
  377. package/node_modules/@earendil-works/pi-codemode/dist/declarations.js.map +1 -1
  378. package/node_modules/@earendil-works/pi-codemode/dist/index.d.ts +5 -2
  379. package/node_modules/@earendil-works/pi-codemode/dist/index.d.ts.map +1 -1
  380. package/node_modules/@earendil-works/pi-codemode/dist/index.js +4 -1
  381. package/node_modules/@earendil-works/pi-codemode/dist/index.js.map +1 -1
  382. package/node_modules/@earendil-works/pi-codemode/dist/portable.d.ts +15 -0
  383. package/node_modules/@earendil-works/pi-codemode/dist/portable.d.ts.map +1 -0
  384. package/node_modules/@earendil-works/pi-codemode/dist/portable.js +12 -0
  385. package/node_modules/@earendil-works/pi-codemode/dist/portable.js.map +1 -0
  386. package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.d.ts +66 -0
  387. package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.d.ts.map +1 -0
  388. package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.js +494 -0
  389. package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.js.map +1 -0
  390. package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.d.ts +8 -30
  391. package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.d.ts.map +1 -1
  392. package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js +41 -283
  393. package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js.map +1 -1
  394. package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.d.ts +63 -0
  395. package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.d.ts.map +1 -0
  396. package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.js +80 -0
  397. package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.js.map +1 -0
  398. package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.d.ts +9 -3
  399. package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.d.ts.map +1 -1
  400. package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +122 -12
  401. package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js.map +1 -1
  402. package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.d.ts +47 -6
  403. package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.d.ts.map +1 -1
  404. package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.js +6 -1
  405. package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.js.map +1 -1
  406. package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.d.ts +102 -0
  407. package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.d.ts.map +1 -0
  408. package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.js +175 -0
  409. package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.js.map +1 -0
  410. package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.d.ts +24 -0
  411. package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.d.ts.map +1 -0
  412. package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.js +293 -0
  413. package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.js.map +1 -0
  414. package/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.js +11 -110
  415. package/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.js.map +1 -1
  416. package/node_modules/@earendil-works/pi-codemode/dist/source.d.ts +2 -1
  417. package/node_modules/@earendil-works/pi-codemode/dist/source.d.ts.map +1 -1
  418. package/node_modules/@earendil-works/pi-codemode/dist/source.js +8 -2
  419. package/node_modules/@earendil-works/pi-codemode/dist/source.js.map +1 -1
  420. package/node_modules/@earendil-works/pi-codemode/dist/types.d.ts +101 -6
  421. package/node_modules/@earendil-works/pi-codemode/dist/types.d.ts.map +1 -1
  422. package/node_modules/@earendil-works/pi-codemode/dist/types.js.map +1 -1
  423. package/node_modules/@earendil-works/pi-codemode/package.json +15 -3
  424. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +165 -0
  425. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-Q7SXESRX.js +6 -0
  426. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic.js +1 -1
  427. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/azure-openai-responses-LM52U7CK.js +2 -0
  428. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/bedrock-converse-stream.js +2 -2
  429. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-22CYIUS4.js +2 -0
  430. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-3ZATHNCK.js +9 -0
  431. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-5GTPJSRI.js +7 -0
  432. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6MWTY2OB.js +130 -0
  433. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6QGV3IWD.js +6 -0
  434. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-2KAZSACP.js → chunk-AKJ3ZOR3.js} +1 -1
  435. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-G7EDXK4D.js → chunk-CQ3XTLTY.js} +1 -1
  436. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-SYF2TF6W.js → chunk-D7PHKNBM.js} +29 -92
  437. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-DOST5PQW.js +82 -0
  438. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-DVQEBGVL.js +2 -0
  439. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-ZSI3BL5Q.js → chunk-GDR5JFDJ.js} +1 -1
  440. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-HACVPRBJ.js +11 -0
  441. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-ITZNWD4K.js +2 -0
  442. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
  443. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-LD2P6SFZ.js → chunk-PMRZO46Y.js} +1 -1
  444. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
  445. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-ZSBPJAJ2.js → chunk-TJXZSVTD.js} +116 -99
  446. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-BYB6ZAAQ.js → chunk-TN4NLWHF.js} +1 -1
  447. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-WBQBCFWG.js +2 -0
  448. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-WJUNYZC5.js +2 -0
  449. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-XIX7LUWI.js +2 -0
  450. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-ZBURYEWF.js +2 -0
  451. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{cli-KILDDGW3.js → cli-SWM4FQ6V.js} +4 -4
  452. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/cloudflare-workers-ai-system-one-UTBL2KOF.js +2 -0
  453. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/codemode-worker.js +117 -14
  454. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/easter-egg-3d-OX6RUCIS.js +2 -0
  455. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/execute-3CFUPDLS.js +499 -0
  456. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/github-copilot.js +1 -1
  457. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{google-generative-ai-ZOK6CV7D.js → google-generative-ai-DXKP72HC.js} +1 -1
  458. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{google-vertex-VKWZQ3AY.js → google-vertex-W6SIDOVV.js} +1 -1
  459. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/image-resize-worker.js +1 -1
  460. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{llama-cpp-classify-XT44PI3C.js → llama-cpp-classify-FYN623RH.js} +2 -2
  461. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/mistral-conversations-GBMHTSYF.js +5 -0
  462. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-chatgpt.js +1 -1
  463. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-RN6B5UPP.js +10 -0
  464. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex.js +1 -1
  465. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openai-completions-GWHGMQ3T.js → openai-completions-QW2B4SML.js} +1 -1
  466. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-decisions-WVPMQ4JD.js +5 -0
  467. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openai-responses-EZ7FJ2KL.js → openai-responses-KDJUSIU7.js} +1 -1
  468. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openrouter-images-ZVXWCSIM.js → openrouter-images-DUPG5DZO.js} +1 -1
  469. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{pi-messages-TM5SOOIW.js → pi-messages-YHKPQIHC.js} +1 -1
  470. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/runtime-366HE7CW.js +2 -0
  471. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/typesafe-system-one-ZSK3RN4B.js +2 -0
  472. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/virtual-modules-GI6FRNLG.js +2 -0
  473. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli-runtime.js +1 -1
  474. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
  475. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
  476. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts +2 -1
  477. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
  478. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +24 -5
  479. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
  480. package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts +18 -1
  481. package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
  482. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +44 -6
  483. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
  484. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +47 -5
  485. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  486. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +148 -78
  487. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  488. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  489. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +20 -13
  490. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  491. package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.d.ts.map +1 -1
  492. package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.js +42 -52
  493. package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.js.map +1 -1
  494. package/node_modules/@earendil-works/pi-coding-agent/dist/core/bug-report.d.ts +9 -1
  495. package/node_modules/@earendil-works/pi-coding-agent/dist/core/bug-report.d.ts.map +1 -1
  496. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts +6 -0
  497. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
  498. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +7 -8
  499. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
  500. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  501. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/tool-renderer.js +2 -0
  502. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/tool-renderer.js.map +1 -1
  503. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
  504. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  505. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  506. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +4 -2
  507. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  508. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +2 -3
  509. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  510. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +44 -7
  511. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  512. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  513. package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.d.ts +6 -0
  514. package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.d.ts.map +1 -0
  515. package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.js +16 -0
  516. package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.js.map +1 -0
  517. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.d.ts +4 -0
  518. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.d.ts.map +1 -0
  519. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.js +16 -0
  520. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.js.map +1 -0
  521. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts +198 -66
  522. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts.map +1 -1
  523. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js +26 -23
  524. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js.map +1 -1
  525. package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.d.ts +8 -0
  526. package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.d.ts.map +1 -1
  527. package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.js +30 -7
  528. package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.js.map +1 -1
  529. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.d.ts +695 -74
  530. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.d.ts.map +1 -1
  531. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js +16 -166
  532. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js.map +1 -1
  533. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +1 -1
  534. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  535. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.d.ts.map +1 -1
  536. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js +13 -7
  537. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js.map +1 -1
  538. package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.d.ts +1 -0
  539. package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.d.ts.map +1 -1
  540. package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.js +1 -0
  541. package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.js.map +1 -1
  542. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
  543. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +3 -3
  544. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
  545. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts.map +1 -1
  546. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +2 -1
  547. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js.map +1 -1
  548. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.d.ts +12 -1
  549. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.d.ts.map +1 -1
  550. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js +82 -24
  551. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js.map +1 -1
  552. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts +3 -0
  553. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
  554. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +9 -4
  555. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
  556. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts +13 -4
  557. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  558. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +19 -6
  559. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js.map +1 -1
  560. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.d.ts +65 -0
  561. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.d.ts.map +1 -0
  562. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.js +66 -0
  563. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.js.map +1 -0
  564. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +15 -145
  565. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  566. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +85 -57
  567. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  568. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.d.ts +228 -0
  569. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.d.ts.map +1 -0
  570. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.js +287 -0
  571. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.js.map +1 -0
  572. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.d.ts +4 -1
  573. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
  574. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js +6 -1
  575. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js.map +1 -1
  576. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.d.ts +6 -0
  577. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
  578. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +9 -4
  579. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
  580. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/output-accumulator.d.ts.map +1 -1
  581. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/output-accumulator.js +4 -10
  582. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/output-accumulator.js.map +1 -1
  583. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts +13 -0
  584. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
  585. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +18 -1
  586. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
  587. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.d.ts +18 -0
  588. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.d.ts.map +1 -1
  589. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js +46 -0
  590. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js.map +1 -1
  591. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/bash.d.ts.map +1 -1
  592. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/bash.js +7 -35
  593. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/bash.js.map +1 -1
  594. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/edit.d.ts.map +1 -1
  595. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/edit.js +5 -4
  596. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/edit.js.map +1 -1
  597. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.d.ts.map +1 -1
  598. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.js +165 -48
  599. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.js.map +1 -1
  600. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/index.d.ts.map +1 -1
  601. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/index.js +3 -1
  602. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/index.js.map +1 -1
  603. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.d.ts +2 -2
  604. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.d.ts.map +1 -1
  605. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.js +9 -3
  606. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.js.map +1 -1
  607. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.d.ts +15 -14
  608. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.d.ts.map +1 -1
  609. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.js +58 -38
  610. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.js.map +1 -1
  611. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.d.ts.map +1 -1
  612. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js +34 -11
  613. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js.map +1 -1
  614. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.js +22 -31
  615. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.js.map +1 -1
  616. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.d.ts.map +1 -1
  617. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.js +188 -84
  618. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.js.map +1 -1
  619. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.d.ts +5 -3
  620. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.d.ts.map +1 -1
  621. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.js +36 -10
  622. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.js.map +1 -1
  623. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.d.ts +3 -10
  624. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.d.ts.map +1 -1
  625. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.js +4 -5
  626. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.js.map +1 -1
  627. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.d.ts +7 -7
  628. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.d.ts.map +1 -1
  629. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.js +26 -44
  630. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.js.map +1 -1
  631. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.d.ts +4 -4
  632. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.d.ts.map +1 -1
  633. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.js +68 -16
  634. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.js.map +1 -1
  635. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.d.ts +3 -3
  636. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.d.ts.map +1 -1
  637. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.js +10 -2
  638. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.js.map +1 -1
  639. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.d.ts +0 -2
  640. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.d.ts.map +1 -1
  641. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.js +2 -4
  642. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.js.map +1 -1
  643. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +1 -1
  644. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
  645. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
  646. package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
  647. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +4 -3
  648. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
  649. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts +5 -1
  650. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  651. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +17 -14
  652. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
  653. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +2 -1
  654. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  655. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js +5 -2
  656. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  657. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +2 -1
  658. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  659. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js +5 -2
  660. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  661. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.d.ts +3 -1
  662. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  663. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js +8 -2
  664. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js.map +1 -1
  665. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  666. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.js +1 -0
  667. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.js.map +1 -1
  668. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  669. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +4 -3
  670. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  671. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -1
  672. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  673. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js +5 -2
  674. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  675. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.d.ts +1 -1
  676. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  677. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js +2 -2
  678. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js.map +1 -1
  679. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +5 -0
  680. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  681. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +10 -0
  682. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  683. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +9 -0
  684. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  685. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +103 -40
  686. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  687. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.d.ts +34 -0
  688. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
  689. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.js +110 -0
  690. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.js.map +1 -0
  691. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/dark.json +1 -1
  692. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/light.json +1 -1
  693. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
  694. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
  695. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +105 -0
  696. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -0
  697. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
  698. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
  699. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.js +94 -0
  700. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
  701. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +13 -16
  702. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  703. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +22 -29
  704. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  705. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
  706. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +4 -0
  707. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
  708. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
  709. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +24 -0
  710. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
  711. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.d.ts +8 -0
  712. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.d.ts.map +1 -1
  713. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.js +30 -11
  714. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.js.map +1 -1
  715. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.d.ts.map +1 -1
  716. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js +18 -12
  717. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js.map +1 -1
  718. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.d.ts +12 -0
  719. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.d.ts.map +1 -1
  720. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js +5 -0
  721. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js.map +1 -1
  722. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js +3 -2
  723. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js.map +1 -1
  724. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
  725. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js +9 -10
  726. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
  727. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.d.ts +15 -0
  728. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.d.ts.map +1 -0
  729. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.js +30 -0
  730. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.js.map +1 -0
  731. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.d.ts.map +1 -1
  732. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js +6 -1
  733. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js.map +1 -1
  734. package/node_modules/@earendil-works/pi-coding-agent/docs/cli-integration.md +1 -1
  735. package/node_modules/@earendil-works/pi-coding-agent/docs/cli.md +19 -7
  736. package/node_modules/@earendil-works/pi-coding-agent/docs/codemode.md +30 -9
  737. package/node_modules/@earendil-works/pi-coding-agent/docs/compaction.md +2 -2
  738. package/node_modules/@earendil-works/pi-coding-agent/docs/environment-variables.md +3 -1
  739. package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +7 -4
  740. package/node_modules/@earendil-works/pi-coding-agent/docs/json.md +3 -3
  741. package/node_modules/@earendil-works/pi-coding-agent/docs/keybindings.md +5 -4
  742. package/node_modules/@earendil-works/pi-coding-agent/docs/llama-cpp.md +8 -1
  743. package/node_modules/@earendil-works/pi-coding-agent/docs/mcp.md +4 -2
  744. package/node_modules/@earendil-works/pi-coding-agent/docs/message-types.md +22 -4
  745. package/node_modules/@earendil-works/pi-coding-agent/docs/models.md +5 -1
  746. package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +47 -0
  747. package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +6 -4
  748. package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +14 -0
  749. package/node_modules/@earendil-works/pi-coding-agent/docs/themes.md +4 -2
  750. package/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +1 -1
  751. package/node_modules/@earendil-works/pi-coding-agent/examples/README.md +0 -3
  752. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  753. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  754. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  755. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/dynamic-resources/dynamic.json +1 -1
  756. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +2 -2
  757. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +1 -1
  758. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/overlay-test.ts +2 -2
  759. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/plan-mode/index.ts +6 -2
  760. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package-lock.json +2 -2
  761. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  762. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json +2 -2
  763. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  764. package/node_modules/@earendil-works/pi-coding-agent/package.json +10 -21
  765. package/node_modules/@earendil-works/pi-coding-agent/schemas/keybindings.schema.json +393 -0
  766. package/node_modules/@earendil-works/pi-coding-agent/schemas/models.schema.json +1157 -0
  767. package/node_modules/@earendil-works/pi-coding-agent/schemas/settings.schema.json +765 -0
  768. package/node_modules/@earendil-works/pi-coding-agent/schemas/theme.schema.json +365 -0
  769. package/node_modules/@earendil-works/pi-durable/CHANGELOG.md +114 -0
  770. package/node_modules/@earendil-works/pi-durable/README.md +164 -12
  771. package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.d.ts +173 -0
  772. package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.d.ts.map +1 -0
  773. package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.js +886 -0
  774. package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.js.map +1 -0
  775. package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.d.ts +38 -0
  776. package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.d.ts.map +1 -0
  777. package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.js +119 -0
  778. package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.js.map +1 -0
  779. package/node_modules/@earendil-works/pi-durable/dist/codemode/index.d.ts +3 -0
  780. package/node_modules/@earendil-works/pi-durable/dist/codemode/index.d.ts.map +1 -0
  781. package/node_modules/@earendil-works/pi-durable/dist/codemode/index.js +3 -0
  782. package/node_modules/@earendil-works/pi-durable/dist/codemode/index.js.map +1 -0
  783. package/node_modules/@earendil-works/pi-durable/dist/codemode/models.d.ts +28 -0
  784. package/node_modules/@earendil-works/pi-durable/dist/codemode/models.d.ts.map +1 -0
  785. package/node_modules/@earendil-works/pi-durable/dist/codemode/models.js +231 -0
  786. package/node_modules/@earendil-works/pi-durable/dist/codemode/models.js.map +1 -0
  787. package/node_modules/@earendil-works/pi-durable/dist/codemode/output.d.ts +41 -0
  788. package/node_modules/@earendil-works/pi-durable/dist/codemode/output.d.ts.map +1 -0
  789. package/node_modules/@earendil-works/pi-durable/dist/codemode/output.js +167 -0
  790. package/node_modules/@earendil-works/pi-durable/dist/codemode/output.js.map +1 -0
  791. package/node_modules/@earendil-works/pi-durable/dist/env/decode.d.ts +16 -0
  792. package/node_modules/@earendil-works/pi-durable/dist/env/decode.d.ts.map +1 -0
  793. package/node_modules/@earendil-works/pi-durable/dist/env/decode.js +28 -0
  794. package/node_modules/@earendil-works/pi-durable/dist/env/decode.js.map +1 -0
  795. package/node_modules/@earendil-works/pi-durable/dist/env/index.d.ts +197 -3
  796. package/node_modules/@earendil-works/pi-durable/dist/env/index.d.ts.map +1 -1
  797. package/node_modules/@earendil-works/pi-durable/dist/env/index.js +2 -0
  798. package/node_modules/@earendil-works/pi-durable/dist/env/index.js.map +1 -1
  799. package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.d.ts +13 -0
  800. package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.d.ts.map +1 -0
  801. package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.js +147 -0
  802. package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.js.map +1 -0
  803. package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.d.ts +29 -0
  804. package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.d.ts.map +1 -0
  805. package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.js +485 -0
  806. package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.js.map +1 -0
  807. package/node_modules/@earendil-works/pi-durable/dist/env/node.d.ts +11 -2
  808. package/node_modules/@earendil-works/pi-durable/dist/env/node.d.ts.map +1 -1
  809. package/node_modules/@earendil-works/pi-durable/dist/env/node.js +284 -21
  810. package/node_modules/@earendil-works/pi-durable/dist/env/node.js.map +1 -1
  811. package/node_modules/@earendil-works/pi-durable/dist/errors.d.ts +20 -3
  812. package/node_modules/@earendil-works/pi-durable/dist/errors.d.ts.map +1 -1
  813. package/node_modules/@earendil-works/pi-durable/dist/errors.js +34 -5
  814. package/node_modules/@earendil-works/pi-durable/dist/errors.js.map +1 -1
  815. package/node_modules/@earendil-works/pi-durable/dist/harness/agent.d.ts +7 -3
  816. package/node_modules/@earendil-works/pi-durable/dist/harness/agent.d.ts.map +1 -1
  817. package/node_modules/@earendil-works/pi-durable/dist/harness/agent.js +81 -25
  818. package/node_modules/@earendil-works/pi-durable/dist/harness/agent.js.map +1 -1
  819. package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.d.ts +6 -1
  820. package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.d.ts.map +1 -1
  821. package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.js +11 -8
  822. package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.js.map +1 -1
  823. package/node_modules/@earendil-works/pi-durable/dist/harness/context.d.ts +29 -1
  824. package/node_modules/@earendil-works/pi-durable/dist/harness/context.d.ts.map +1 -1
  825. package/node_modules/@earendil-works/pi-durable/dist/harness/context.js +125 -24
  826. package/node_modules/@earendil-works/pi-durable/dist/harness/context.js.map +1 -1
  827. package/node_modules/@earendil-works/pi-durable/dist/harness/events.d.ts +35 -15
  828. package/node_modules/@earendil-works/pi-durable/dist/harness/events.d.ts.map +1 -1
  829. package/node_modules/@earendil-works/pi-durable/dist/harness/events.js +77 -23
  830. package/node_modules/@earendil-works/pi-durable/dist/harness/events.js.map +1 -1
  831. package/node_modules/@earendil-works/pi-durable/dist/harness/generation.d.ts +2 -0
  832. package/node_modules/@earendil-works/pi-durable/dist/harness/generation.d.ts.map +1 -1
  833. package/node_modules/@earendil-works/pi-durable/dist/harness/generation.js +40 -16
  834. package/node_modules/@earendil-works/pi-durable/dist/harness/generation.js.map +1 -1
  835. package/node_modules/@earendil-works/pi-durable/dist/harness/harness.d.ts +7 -0
  836. package/node_modules/@earendil-works/pi-durable/dist/harness/harness.d.ts.map +1 -1
  837. package/node_modules/@earendil-works/pi-durable/dist/harness/harness.js +56 -28
  838. package/node_modules/@earendil-works/pi-durable/dist/harness/harness.js.map +1 -1
  839. package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.d.ts +16 -4
  840. package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.d.ts.map +1 -1
  841. package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.js +26 -3
  842. package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.js.map +1 -1
  843. package/node_modules/@earendil-works/pi-durable/dist/harness/live.d.ts +74 -17
  844. package/node_modules/@earendil-works/pi-durable/dist/harness/live.d.ts.map +1 -1
  845. package/node_modules/@earendil-works/pi-durable/dist/harness/live.js +66 -14
  846. package/node_modules/@earendil-works/pi-durable/dist/harness/live.js.map +1 -1
  847. package/node_modules/@earendil-works/pi-durable/dist/harness/output.d.ts +13 -6
  848. package/node_modules/@earendil-works/pi-durable/dist/harness/output.d.ts.map +1 -1
  849. package/node_modules/@earendil-works/pi-durable/dist/harness/output.js +75 -18
  850. package/node_modules/@earendil-works/pi-durable/dist/harness/output.js.map +1 -1
  851. package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.d.ts +18 -5
  852. package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.d.ts.map +1 -1
  853. package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.js +794 -168
  854. package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.js.map +1 -1
  855. package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.d.ts +7 -4
  856. package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.d.ts.map +1 -1
  857. package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.js +32 -13
  858. package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.js.map +1 -1
  859. package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.d.ts +1 -1
  860. package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.d.ts.map +1 -1
  861. package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.js +15 -10
  862. package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.js.map +1 -1
  863. package/node_modules/@earendil-works/pi-durable/dist/harness/tool.d.ts +45 -5
  864. package/node_modules/@earendil-works/pi-durable/dist/harness/tool.d.ts.map +1 -1
  865. package/node_modules/@earendil-works/pi-durable/dist/harness/tool.js +400 -67
  866. package/node_modules/@earendil-works/pi-durable/dist/harness/tool.js.map +1 -1
  867. package/node_modules/@earendil-works/pi-durable/dist/harness/types.d.ts +194 -17
  868. package/node_modules/@earendil-works/pi-durable/dist/harness/types.d.ts.map +1 -1
  869. package/node_modules/@earendil-works/pi-durable/dist/harness/types.js.map +1 -1
  870. package/node_modules/@earendil-works/pi-durable/dist/harness/util.d.ts +6 -1
  871. package/node_modules/@earendil-works/pi-durable/dist/harness/util.d.ts.map +1 -1
  872. package/node_modules/@earendil-works/pi-durable/dist/harness/util.js +5 -2
  873. package/node_modules/@earendil-works/pi-durable/dist/harness/util.js.map +1 -1
  874. package/node_modules/@earendil-works/pi-durable/dist/harness/view.d.ts +6 -2
  875. package/node_modules/@earendil-works/pi-durable/dist/harness/view.d.ts.map +1 -1
  876. package/node_modules/@earendil-works/pi-durable/dist/harness/view.js +22 -12
  877. package/node_modules/@earendil-works/pi-durable/dist/harness/view.js.map +1 -1
  878. package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.d.ts +4 -0
  879. package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.d.ts.map +1 -0
  880. package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.js +9 -0
  881. package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.js.map +1 -0
  882. package/node_modules/@earendil-works/pi-durable/dist/images/exif.d.ts +3 -0
  883. package/node_modules/@earendil-works/pi-durable/dist/images/exif.d.ts.map +1 -0
  884. package/node_modules/@earendil-works/pi-durable/dist/images/exif.js +71 -0
  885. package/node_modules/@earendil-works/pi-durable/dist/images/exif.js.map +1 -0
  886. package/node_modules/@earendil-works/pi-durable/dist/images/index.d.ts +18 -0
  887. package/node_modules/@earendil-works/pi-durable/dist/images/index.d.ts.map +1 -0
  888. package/node_modules/@earendil-works/pi-durable/dist/images/index.js +125 -0
  889. package/node_modules/@earendil-works/pi-durable/dist/images/index.js.map +1 -0
  890. package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.d.ts +17 -0
  891. package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.d.ts.map +1 -0
  892. package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.js +16 -0
  893. package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.js.map +1 -0
  894. package/node_modules/@earendil-works/pi-durable/dist/images/node.d.ts +21 -0
  895. package/node_modules/@earendil-works/pi-durable/dist/images/node.d.ts.map +1 -0
  896. package/node_modules/@earendil-works/pi-durable/dist/images/node.js +121 -0
  897. package/node_modules/@earendil-works/pi-durable/dist/images/node.js.map +1 -0
  898. package/node_modules/@earendil-works/pi-durable/dist/index.d.ts +7 -7
  899. package/node_modules/@earendil-works/pi-durable/dist/index.d.ts.map +1 -1
  900. package/node_modules/@earendil-works/pi-durable/dist/index.js +4 -4
  901. package/node_modules/@earendil-works/pi-durable/dist/index.js.map +1 -1
  902. package/node_modules/@earendil-works/pi-durable/dist/search.d.ts +13 -0
  903. package/node_modules/@earendil-works/pi-durable/dist/search.d.ts.map +1 -0
  904. package/node_modules/@earendil-works/pi-durable/dist/search.js +85 -0
  905. package/node_modules/@earendil-works/pi-durable/dist/search.js.map +1 -0
  906. package/node_modules/@earendil-works/pi-durable/dist/session/observation.d.ts +10 -3
  907. package/node_modules/@earendil-works/pi-durable/dist/session/observation.d.ts.map +1 -1
  908. package/node_modules/@earendil-works/pi-durable/dist/session/observation.js +24 -34
  909. package/node_modules/@earendil-works/pi-durable/dist/session/observation.js.map +1 -1
  910. package/node_modules/@earendil-works/pi-durable/dist/session/session.d.ts +71 -6
  911. package/node_modules/@earendil-works/pi-durable/dist/session/session.d.ts.map +1 -1
  912. package/node_modules/@earendil-works/pi-durable/dist/session/session.js +463 -50
  913. package/node_modules/@earendil-works/pi-durable/dist/session/session.js.map +1 -1
  914. package/node_modules/@earendil-works/pi-durable/dist/session/transaction.d.ts +2 -0
  915. package/node_modules/@earendil-works/pi-durable/dist/session/transaction.d.ts.map +1 -1
  916. package/node_modules/@earendil-works/pi-durable/dist/session/transaction.js +19 -1
  917. package/node_modules/@earendil-works/pi-durable/dist/session/transaction.js.map +1 -1
  918. package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.d.ts +8 -0
  919. package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.d.ts.map +1 -1
  920. package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.js +2 -1
  921. package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.js.map +1 -1
  922. package/node_modules/@earendil-works/pi-durable/dist/storage/memory.d.ts +2 -0
  923. package/node_modules/@earendil-works/pi-durable/dist/storage/memory.d.ts.map +1 -1
  924. package/node_modules/@earendil-works/pi-durable/dist/storage/memory.js +79 -27
  925. package/node_modules/@earendil-works/pi-durable/dist/storage/memory.js.map +1 -1
  926. package/node_modules/@earendil-works/pi-durable/dist/storage/scan.d.ts +18 -0
  927. package/node_modules/@earendil-works/pi-durable/dist/storage/scan.d.ts.map +1 -0
  928. package/node_modules/@earendil-works/pi-durable/dist/storage/scan.js +29 -0
  929. package/node_modules/@earendil-works/pi-durable/dist/storage/scan.js.map +1 -0
  930. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.d.ts +46 -0
  931. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.d.ts.map +1 -0
  932. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.js +106 -0
  933. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.js.map +1 -0
  934. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.d.ts +2 -0
  935. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.d.ts.map +1 -1
  936. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.js +77 -27
  937. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.js.map +1 -1
  938. package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.d.ts +7 -0
  939. package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.d.ts.map +1 -0
  940. package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.js +531 -0
  941. package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.js.map +1 -0
  942. package/node_modules/@earendil-works/pi-durable/dist/testing/index.d.ts +3 -2
  943. package/node_modules/@earendil-works/pi-durable/dist/testing/index.d.ts.map +1 -1
  944. package/node_modules/@earendil-works/pi-durable/dist/testing/index.js +2 -1
  945. package/node_modules/@earendil-works/pi-durable/dist/testing/index.js.map +1 -1
  946. package/node_modules/@earendil-works/pi-durable/dist/testing/runner.d.ts +4 -2
  947. package/node_modules/@earendil-works/pi-durable/dist/testing/runner.d.ts.map +1 -1
  948. package/node_modules/@earendil-works/pi-durable/dist/testing/runner.js +9 -0
  949. package/node_modules/@earendil-works/pi-durable/dist/testing/runner.js.map +1 -1
  950. package/node_modules/@earendil-works/pi-durable/dist/testing/storage-conformance.d.ts.map +1 -1
  951. package/node_modules/@earendil-works/pi-durable/dist/testing/storage-conformance.js +61 -2
  952. package/node_modules/@earendil-works/pi-durable/dist/testing/storage-conformance.js.map +1 -1
  953. package/node_modules/@earendil-works/pi-durable/dist/testing/types.d.ts +20 -0
  954. package/node_modules/@earendil-works/pi-durable/dist/testing/types.d.ts.map +1 -1
  955. package/node_modules/@earendil-works/pi-durable/dist/testing/types.js.map +1 -1
  956. package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.d.ts +2 -0
  957. package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.d.ts.map +1 -0
  958. package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.js +2 -0
  959. package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.js.map +1 -0
  960. package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.d.ts +23 -0
  961. package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.d.ts.map +1 -0
  962. package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.js +84 -0
  963. package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.js.map +1 -0
  964. package/node_modules/@earendil-works/pi-durable/dist/tools/bash.d.ts +30 -3
  965. package/node_modules/@earendil-works/pi-durable/dist/tools/bash.d.ts.map +1 -1
  966. package/node_modules/@earendil-works/pi-durable/dist/tools/bash.js +105 -37
  967. package/node_modules/@earendil-works/pi-durable/dist/tools/bash.js.map +1 -1
  968. package/node_modules/@earendil-works/pi-durable/dist/tools/edit.js +1 -1
  969. package/node_modules/@earendil-works/pi-durable/dist/tools/edit.js.map +1 -1
  970. package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.d.ts +47 -0
  971. package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.d.ts.map +1 -0
  972. package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.js +30 -0
  973. package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.js.map +1 -0
  974. package/node_modules/@earendil-works/pi-durable/dist/tools/image.d.ts +18 -0
  975. package/node_modules/@earendil-works/pi-durable/dist/tools/image.d.ts.map +1 -1
  976. package/node_modules/@earendil-works/pi-durable/dist/tools/image.js +86 -0
  977. package/node_modules/@earendil-works/pi-durable/dist/tools/image.js.map +1 -1
  978. package/node_modules/@earendil-works/pi-durable/dist/tools/index.d.ts +26 -3
  979. package/node_modules/@earendil-works/pi-durable/dist/tools/index.d.ts.map +1 -1
  980. package/node_modules/@earendil-works/pi-durable/dist/tools/index.js +14 -6
  981. package/node_modules/@earendil-works/pi-durable/dist/tools/index.js.map +1 -1
  982. package/node_modules/@earendil-works/pi-durable/dist/tools/read.d.ts +10 -2
  983. package/node_modules/@earendil-works/pi-durable/dist/tools/read.d.ts.map +1 -1
  984. package/node_modules/@earendil-works/pi-durable/dist/tools/read.js +212 -78
  985. package/node_modules/@earendil-works/pi-durable/dist/tools/read.js.map +1 -1
  986. package/node_modules/@earendil-works/pi-durable/dist/tools/write.js +1 -1
  987. package/node_modules/@earendil-works/pi-durable/dist/tools/write.js.map +1 -1
  988. package/node_modules/@earendil-works/pi-durable/dist/truncate.d.ts +9 -0
  989. package/node_modules/@earendil-works/pi-durable/dist/truncate.d.ts.map +1 -1
  990. package/node_modules/@earendil-works/pi-durable/dist/truncate.js +12 -4
  991. package/node_modules/@earendil-works/pi-durable/dist/truncate.js.map +1 -1
  992. package/node_modules/@earendil-works/pi-durable/dist/types.d.ts +89 -12
  993. package/node_modules/@earendil-works/pi-durable/dist/types.d.ts.map +1 -1
  994. package/node_modules/@earendil-works/pi-durable/dist/types.js.map +1 -1
  995. package/node_modules/@earendil-works/pi-durable/package.json +50 -5
  996. package/node_modules/@earendil-works/pi-mcp/CHANGELOG.md +29 -0
  997. package/node_modules/@earendil-works/pi-mcp/dist/auth-provider.d.ts +4 -0
  998. package/node_modules/@earendil-works/pi-mcp/dist/auth-provider.d.ts.map +1 -1
  999. package/node_modules/@earendil-works/pi-mcp/dist/auth-provider.js.map +1 -1
  1000. package/node_modules/@earendil-works/pi-mcp/dist/client.d.ts.map +1 -1
  1001. package/node_modules/@earendil-works/pi-mcp/dist/client.js +9 -5
  1002. package/node_modules/@earendil-works/pi-mcp/dist/client.js.map +1 -1
  1003. package/node_modules/@earendil-works/pi-mcp/dist/index.d.ts +1 -1
  1004. package/node_modules/@earendil-works/pi-mcp/dist/index.d.ts.map +1 -1
  1005. package/node_modules/@earendil-works/pi-mcp/dist/index.js.map +1 -1
  1006. package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.d.ts +3 -0
  1007. package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.d.ts.map +1 -1
  1008. package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.js +8 -5
  1009. package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.js.map +1 -1
  1010. package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.d.ts +3 -2
  1011. package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.d.ts.map +1 -1
  1012. package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.js +3 -1
  1013. package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.js.map +1 -1
  1014. package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.d.ts +4 -0
  1015. package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.d.ts.map +1 -1
  1016. package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.js +35 -7
  1017. package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.js.map +1 -1
  1018. package/node_modules/@earendil-works/pi-mcp/dist/oauth/types.d.ts +5 -0
  1019. package/node_modules/@earendil-works/pi-mcp/dist/oauth/types.d.ts.map +1 -1
  1020. package/node_modules/@earendil-works/pi-mcp/dist/oauth/types.js.map +1 -1
  1021. package/node_modules/@earendil-works/pi-mcp/dist/protocol/content.d.ts +2 -1
  1022. package/node_modules/@earendil-works/pi-mcp/dist/protocol/content.d.ts.map +1 -1
  1023. package/node_modules/@earendil-works/pi-mcp/dist/protocol/content.js.map +1 -1
  1024. package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.d.ts +9 -2
  1025. package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.d.ts.map +1 -1
  1026. package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.js +28 -19
  1027. package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.js.map +1 -1
  1028. package/node_modules/@earendil-works/pi-mcp/dist/transports/transport.d.ts +9 -1
  1029. package/node_modules/@earendil-works/pi-mcp/dist/transports/transport.d.ts.map +1 -1
  1030. package/node_modules/@earendil-works/pi-mcp/dist/transports/transport.js.map +1 -1
  1031. package/node_modules/@earendil-works/pi-mcp/package.json +2 -2
  1032. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  1033. package/node_modules/@earendil-works/pi-tui/README.md +5 -3
  1034. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +1 -0
  1035. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
  1036. package/node_modules/@earendil-works/pi-tui/dist/components/box.js +4 -0
  1037. package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
  1038. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  1039. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +3 -3
  1040. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  1041. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
  1042. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +4 -4
  1043. package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
  1044. package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +1 -0
  1045. package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -1
  1046. package/node_modules/@earendil-works/pi-tui/dist/components/text.js +4 -0
  1047. package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -1
  1048. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +2 -1
  1049. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  1050. package/node_modules/@earendil-works/pi-tui/dist/index.js +3 -1
  1051. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  1052. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +4 -4
  1053. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
  1054. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +4 -4
  1055. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
  1056. package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +1 -1
  1057. package/node_modules/@earendil-works/pi-tui/dist/keys.js +52 -20
  1058. package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +1 -1
  1059. package/node_modules/@earendil-works/pi-tui/dist/program-status.d.ts +23 -0
  1060. package/node_modules/@earendil-works/pi-tui/dist/program-status.d.ts.map +1 -0
  1061. package/node_modules/@earendil-works/pi-tui/dist/program-status.js +43 -0
  1062. package/node_modules/@earendil-works/pi-tui/dist/program-status.js.map +1 -0
  1063. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +4 -2
  1064. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
  1065. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +36 -1
  1066. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
  1067. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  1068. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +5 -0
  1069. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  1070. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +17 -0
  1071. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  1072. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +46 -2
  1073. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  1074. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +2 -0
  1075. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
  1076. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +8 -4
  1077. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
  1078. package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts.map +1 -1
  1079. package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +2 -1
  1080. package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js.map +1 -1
  1081. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +11 -0
  1082. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  1083. package/node_modules/@earendil-works/pi-tui/dist/tui.js +23 -1
  1084. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  1085. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  1086. package/node_modules/@earendil-works/pi-tui/dist/utils.js +5 -2
  1087. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  1088. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  1089. package/node_modules/@silvia-odwyer/photon/LICENSE.md +201 -0
  1090. package/node_modules/@silvia-odwyer/photon/README.md +158 -0
  1091. package/node_modules/@silvia-odwyer/photon/package.json +23 -0
  1092. package/node_modules/@silvia-odwyer/photon/photon_rs.d.ts +3443 -0
  1093. package/node_modules/@silvia-odwyer/photon/photon_rs.js +4572 -0
  1094. package/node_modules/@silvia-odwyer/photon/photon_rs_bg.wasm +0 -0
  1095. package/node_modules/@types/node/README.md +1 -1
  1096. package/node_modules/@types/node/crypto.d.ts +2 -2
  1097. package/node_modules/@types/node/dgram.d.ts +1 -1
  1098. package/node_modules/@types/node/package.json +2 -2
  1099. package/node_modules/@types/node/util.d.ts +6 -3
  1100. package/node_modules/@types/node/zlib.d.ts +6 -0
  1101. package/package.json +7 -8
  1102. package/runtime-package.json +7 -9
  1103. package/scripts/check-install-toolchain.mjs +64 -40
  1104. package/shipping-sbom.cdx.json +126 -160
  1105. package/shipping-source.json +15 -15
  1106. package/node_modules/@earendil-works/chord/dist/api.d.ts +0 -20
  1107. package/node_modules/@earendil-works/chord/dist/api.d.ts.map +0 -1
  1108. package/node_modules/@earendil-works/chord/dist/api.js +0 -77
  1109. package/node_modules/@earendil-works/chord/dist/api.js.map +0 -1
  1110. package/node_modules/@earendil-works/chord/dist/bundler.d.ts +0 -6
  1111. package/node_modules/@earendil-works/chord/dist/bundler.d.ts.map +0 -1
  1112. package/node_modules/@earendil-works/chord/dist/bundler.js +0 -3
  1113. package/node_modules/@earendil-works/chord/dist/bundler.js.map +0 -1
  1114. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts +0 -12
  1115. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts.map +0 -1
  1116. package/node_modules/@earendil-works/chord/dist/facets/host.js +0 -763
  1117. package/node_modules/@earendil-works/chord/dist/facets/host.js.map +0 -1
  1118. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts +0 -3
  1119. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts.map +0 -1
  1120. package/node_modules/@earendil-works/chord/dist/facets/loader.js +0 -5
  1121. package/node_modules/@earendil-works/chord/dist/facets/loader.js.map +0 -1
  1122. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts +0 -30
  1123. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts.map +0 -1
  1124. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js +0 -377
  1125. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js.map +0 -1
  1126. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts +0 -26
  1127. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts.map +0 -1
  1128. package/node_modules/@earendil-works/chord/dist/node/bundle.js +0 -183
  1129. package/node_modules/@earendil-works/chord/dist/node/bundle.js.map +0 -1
  1130. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts +0 -36
  1131. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts.map +0 -1
  1132. package/node_modules/@earendil-works/chord/dist/node/manifest.js +0 -6
  1133. package/node_modules/@earendil-works/chord/dist/node/manifest.js.map +0 -1
  1134. package/node_modules/@earendil-works/chord/dist/node/package.d.ts +0 -15
  1135. package/node_modules/@earendil-works/chord/dist/node/package.d.ts.map +0 -1
  1136. package/node_modules/@earendil-works/chord/dist/node/package.js +0 -199
  1137. package/node_modules/@earendil-works/chord/dist/node/package.js.map +0 -1
  1138. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts +0 -11
  1139. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts.map +0 -1
  1140. package/node_modules/@earendil-works/chord/dist/services/consumer.js +0 -585
  1141. package/node_modules/@earendil-works/chord/dist/services/consumer.js.map +0 -1
  1142. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts +0 -8
  1143. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts.map +0 -1
  1144. package/node_modules/@earendil-works/chord/dist/services/errors.js +0 -22
  1145. package/node_modules/@earendil-works/chord/dist/services/errors.js.map +0 -1
  1146. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts +0 -15
  1147. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts.map +0 -1
  1148. package/node_modules/@earendil-works/chord/dist/services/handle.js +0 -101
  1149. package/node_modules/@earendil-works/chord/dist/services/handle.js.map +0 -1
  1150. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts +0 -26
  1151. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts.map +0 -1
  1152. package/node_modules/@earendil-works/chord/dist/services/instances.js +0 -140
  1153. package/node_modules/@earendil-works/chord/dist/services/instances.js.map +0 -1
  1154. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts +0 -5
  1155. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts.map +0 -1
  1156. package/node_modules/@earendil-works/chord/dist/services/loopback.js +0 -15
  1157. package/node_modules/@earendil-works/chord/dist/services/loopback.js.map +0 -1
  1158. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts +0 -37
  1159. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts.map +0 -1
  1160. package/node_modules/@earendil-works/chord/dist/services/provider.js +0 -521
  1161. package/node_modules/@earendil-works/chord/dist/services/provider.js.map +0 -1
  1162. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +0 -15
  1163. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts.map +0 -1
  1164. package/node_modules/@earendil-works/chord/dist/services/state-codec.js +0 -133
  1165. package/node_modules/@earendil-works/chord/dist/services/state-codec.js.map +0 -1
  1166. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts +0 -13
  1167. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts.map +0 -1
  1168. package/node_modules/@earendil-works/chord/dist/services/state-internals.js +0 -10
  1169. package/node_modules/@earendil-works/chord/dist/services/state-internals.js.map +0 -1
  1170. package/node_modules/@earendil-works/chord/dist/services/state.d.ts +0 -28
  1171. package/node_modules/@earendil-works/chord/dist/services/state.d.ts.map +0 -1
  1172. package/node_modules/@earendil-works/chord/dist/services/state.js.map +0 -1
  1173. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts +0 -63
  1174. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts.map +0 -1
  1175. package/node_modules/@earendil-works/chord/dist/services/wire.js +0 -186
  1176. package/node_modules/@earendil-works/chord/dist/services/wire.js.map +0 -1
  1177. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts +0 -3
  1178. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +0 -1
  1179. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +0 -14
  1180. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +0 -1
  1181. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts +0 -6
  1182. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts.map +0 -1
  1183. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +0 -8
  1184. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js.map +0 -1
  1185. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +0 -1
  1186. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-MVG2FL56.js +0 -6
  1187. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/azure-openai-responses-7AMFUIWJ.js +0 -2
  1188. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6FX7UEPL.js +0 -132
  1189. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-7JGR3GZN.js +0 -11
  1190. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-A3JYRWB6.js +0 -2
  1191. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-IKZJX7ZT.js +0 -2
  1192. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-OSKPX3Z5.js +0 -2
  1193. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-OYBSLV7Y.js +0 -16
  1194. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-PDFMCAOZ.js +0 -19
  1195. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-U7B62NSC.js +0 -2
  1196. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-VIV3CWXG.js +0 -2
  1197. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-WCQZGZ6I.js +0 -82
  1198. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/cloudflare-workers-ai-system-one-X5PVWWYJ.js +0 -2
  1199. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/easter-egg-3d-T5FFWIBR.js +0 -2
  1200. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/execute-RYVK27GT.js +0 -388
  1201. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/mistral-conversations-7DAUEE4N.js +0 -5
  1202. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-TC3OK7B4.js +0 -10
  1203. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/runtime-D5I2NTIF.js +0 -2
  1204. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/typesafe-system-one-A4CZTQWZ.js +0 -2
  1205. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/virtual-modules-KVWJD3T3.js +0 -2
  1206. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.d.ts +0 -85
  1207. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
  1208. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.js +0 -132
  1209. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.js.map +0 -1
  1210. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +0 -361
  1211. package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/README.md +0 -38
  1212. package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/package.json +0 -10
  1213. package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
  1214. package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/src/session.ts +0 -24
  1215. package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
  1216. package/node_modules/@esbuild/linux-x64/README.md +0 -3
  1217. package/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  1218. package/node_modules/@esbuild/linux-x64/package.json +0 -20
  1219. package/node_modules/esbuild/LICENSE.md +0 -21
  1220. package/node_modules/esbuild/README.md +0 -3
  1221. package/node_modules/esbuild/bin/esbuild +0 -223
  1222. package/node_modules/esbuild/install.js +0 -300
  1223. package/node_modules/esbuild/lib/main.d.ts +0 -720
  1224. package/node_modules/esbuild/lib/main.js +0 -2536
  1225. package/node_modules/esbuild/package.json +0 -74
@@ -1 +1 @@
1
- {"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/env/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAoB,MAAM,SAAS,CAAC;AACzE,OAAO,EACN,MAAM,EACN,UAAU,EACV,KAAK,EACL,KAAK,EACL,OAAO,EACP,IAAI,IAAI,QAAQ,EAChB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,EAAE,EACF,SAAS,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAEN,cAAc,EACd,GAAG,EACH,SAAS,EAGT,EAAE,EAMF,OAAO,GACP,MAAM,YAAY,CAAC;AAEpB,MAAM,cAAc,GAAG,aAAa,CAAC;AACrC,MAAM,mBAAmB,GAAG,cAAc,GAAG,IAAI,CAAC;AAClD,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,qBAAqB,GAAG,IAAI,GAAG,IAAI,CAAC;AAI1C,SAAS,gBAAgB,CAAC,OAA2B;IACpD,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC;IAChD,IA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EAAE,CAAC,CAAC;YAC9B,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;QACrB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC1C,CAAC;IACF,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,QAAiB;QAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,eAAe;YAAE,eAAe,CAAC,GAAG,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACD","sourcesContent":["import { type ChildProcess, spawn } from \"node:child_process\";\nimport { randomUUID } from \"node:crypto\";\nimport { constants, createWriteStream, type WriteStream } from \"node:fs\";\nimport {\n\taccess,\n\tappendFile,\n\tlstat,\n\tmkdir,\n\tmkdtemp,\n\topen as openFile,\n\treaddir,\n\treadFile,\n\trealpath,\n\trename,\n\trm,\n\twriteFile,\n} from \"node:fs/promises\";\nimport { homedir, constants as osConstants, tmpdir } from \"node:os\";\nimport { basename, isAbsolute, join, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport type { Context } from \"@earendil-works/chord\";\nimport {\n\ttype ExecutionEnv,\n\tExecutionError,\n\terr,\n\tFileError,\n\ttype FileInfo,\n\ttype FileKind,\n\tok,\n\ttype Result,\n\ttype ShellExecOptions,\n\ttype ShellExecResult,\n\ttype TextLine,\n\ttype TextLineReader,\n\ttoError,\n} from \"./index.ts\";\n\nconst MAX_TIMEOUT_MS = 2_147_483_647;\nconst MAX_TIMEOUT_SECONDS = MAX_TIMEOUT_MS / 1000;\nconst EXIT_STDIO_GRACE_MS = 100;\nconst SPILL_HIGH_WATER_MARK = 1024 * 1024;\n\ntype SpillChunk = string | Uint8Array;\n\nfunction resolveTimeoutMs(timeout: number | undefined): Result<number | undefined, ExecutionError> {\n\tif (timeout === undefined) return ok(undefined);\n\tif (!Number.isFinite(timeout) || timeout <= 0) {\n\t\treturn err(new ExecutionError(\"timeout\", \"Invalid timeout: must be a finite number of seconds\"));\n\t}\n\n\tconst timeoutMs = timeout * 1000;\n\tif (timeoutMs > MAX_TIMEOUT_MS) {\n\t\treturn err(new ExecutionError(\"timeout\", `Invalid timeout: maximum is ${MAX_TIMEOUT_SECONDS} seconds`));\n\t}\n\treturn ok(timeoutMs);\n}\n\nfunction resolvePath(cwd: string, path: string): string {\n\tlet normalized = path;\n\tif (normalized === \"~\") {\n\t\tnormalized = homedir();\n\t} else if (normalized.startsWith(\"~/\") || (process.platform === \"win32\" && normalized.startsWith(\"~\\\\\"))) {\n\t\tnormalized = join(homedir(), normalized.slice(2));\n\t} else if (normalized.startsWith(\"file://\")) {\n\t\ttry {\n\t\t\tnormalized = fileURLToPath(normalized);\n\t\t} catch {\n\t\t\t// Keep malformed URLs as ordinary paths so filesystem methods preserve their non-throwing contract.\n\t\t}\n\t}\n\treturn isAbsolute(normalized) ? resolve(normalized) : resolve(cwd, normalized);\n}\n\nfunction fileKindFromStats(stats: {\n\tisFile(): boolean;\n\tisDirectory(): boolean;\n\tisSymbolicLink(): boolean;\n}): FileKind | undefined {\n\tif (stats.isFile()) return \"file\";\n\tif (stats.isDirectory()) return \"directory\";\n\tif (stats.isSymbolicLink()) return \"symlink\";\n\treturn undefined;\n}\n\nfunction fileInfoFromStats(\n\tpath: string,\n\tstats: { isFile(): boolean; isDirectory(): boolean; isSymbolicLink(): boolean; size: number; mtimeMs: number },\n): Result<FileInfo, FileError> {\n\tconst kind = fileKindFromStats(stats);\n\tif (!kind) return err(new FileError(\"invalid\", \"Unsupported file type\", path));\n\treturn ok({\n\t\tname: basename(path),\n\t\tpath,\n\t\tkind,\n\t\tsize: stats.size,\n\t\tmtimeMs: stats.mtimeMs,\n\t});\n}\n\nfunction isNodeError(error: unknown): error is NodeJS.ErrnoException {\n\treturn error instanceof Error && \"code\" in error;\n}\n\nfunction toFileError(error: unknown, fallbackPath?: string): FileError {\n\tif (error instanceof FileError) return error;\n\tconst cause = toError(error);\n\tconst nodeError = isNodeError(error) ? error : undefined;\n\tconst path = typeof nodeError?.path === \"string\" ? nodeError.path : fallbackPath;\n\tif (nodeError) {\n\t\tconst message = nodeError.message;\n\t\tswitch (nodeError.code) {\n\t\t\tcase \"ABORT_ERR\":\n\t\t\t\treturn new FileError(\"aborted\", message, path, cause);\n\t\t\tcase \"ENOENT\":\n\t\t\t\treturn new FileError(\"not_found\", message, path, cause);\n\t\t\tcase \"EACCES\":\n\t\t\tcase \"EPERM\":\n\t\t\t\treturn new FileError(\"permission_denied\", message, path, cause);\n\t\t\tcase \"ENOTDIR\":\n\t\t\t\treturn new FileError(\"not_directory\", message, path, cause);\n\t\t\tcase \"EISDIR\":\n\t\t\t\treturn new FileError(\"is_directory\", message, path, cause);\n\t\t\tcase \"EINVAL\":\n\t\t\t\treturn new FileError(\"invalid\", message, path, cause);\n\t\t}\n\t}\n\treturn new FileError(\"unknown\", cause.message, path, cause);\n}\n\nfunction abortResult<TValue>(signal: AbortSignal | undefined, path?: string): Result<TValue, FileError> | undefined {\n\treturn signal?.aborted ? err(new FileError(\"aborted\", \"aborted\", path)) : undefined;\n}\n\nasync function pathExists(path: string): Promise<boolean> {\n\ttry {\n\t\tawait access(path, constants.F_OK);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nasync function runCommand(\n\tcommand: string,\n\targs: string[],\n\ttimeoutMs: number,\n): Promise<{ stdout: string; status: number | null }> {\n\treturn await new Promise((resolve) => {\n\t\tlet stdout = \"\";\n\t\tlet child: ReturnType<typeof spawn>;\n\t\ttry {\n\t\t\tchild = spawn(command, args, {\n\t\t\t\tstdio: [\"ignore\", \"pipe\", \"ignore\"],\n\t\t\t\twindowsHide: true,\n\t\t\t});\n\t\t} catch {\n\t\t\tresolve({ stdout: \"\", status: null });\n\t\t\treturn;\n\t\t}\n\t\tconst timeout = setTimeout(() => {\n\t\t\tif (child.pid) killProcessTree(child.pid);\n\t\t}, timeoutMs);\n\t\tchild.stdout?.setEncoding(\"utf8\");\n\t\tchild.stdout?.on(\"data\", (chunk: string) => {\n\t\t\tstdout += chunk;\n\t\t});\n\t\tchild.on(\"error\", () => {\n\t\t\tclearTimeout(timeout);\n\t\t\tresolve({ stdout: \"\", status: null });\n\t\t});\n\t\tchild.on(\"close\", (status) => {\n\t\t\tclearTimeout(timeout);\n\t\t\tresolve({ stdout, status });\n\t\t});\n\t});\n}\n\nasync function findBashOnPath(): Promise<string | null> {\n\tconst result =\n\t\tprocess.platform === \"win32\"\n\t\t\t? await runCommand(\"where\", [\"bash.exe\"], 5000)\n\t\t\t: await runCommand(\"which\", [\"bash\"], 5000);\n\tif (result.status !== 0 || !result.stdout) return null;\n\tconst firstMatch = result.stdout.trim().split(/\\r?\\n/)[0];\n\treturn firstMatch && (await pathExists(firstMatch)) ? firstMatch : null;\n}\n\ninterface ShellConfig {\n\tshell: string;\n\targs: string[];\n\tcommandTransport?: \"argv\" | \"stdin\";\n}\n\nfunction isLegacyWslBashPath(path: string): boolean {\n\tconst normalized = path.replace(/\\//g, \"\\\\\").toLowerCase();\n\treturn /^[a-z]:\\\\windows\\\\(?:system32|sysnative)\\\\bash\\.exe$/.test(normalized);\n}\n\nfunction getBashShellConfig(shell: string): ShellConfig {\n\treturn isLegacyWslBashPath(shell) ? { shell, args: [\"-s\"], commandTransport: \"stdin\" } : { shell, args: [\"-c\"] };\n}\n\nasync function getShellConfig(customShellPath?: string): Promise<Result<ShellConfig, ExecutionError>> {\n\tif (customShellPath) {\n\t\tif (await pathExists(customShellPath)) {\n\t\t\treturn ok(getBashShellConfig(customShellPath));\n\t\t}\n\t\treturn err(new ExecutionError(\"shell_unavailable\", `Custom shell path not found: ${customShellPath}`));\n\t}\n\tif (process.platform === \"win32\") {\n\t\tconst candidates: string[] = [];\n\t\tconst programFiles = process.env.ProgramFiles;\n\t\tif (programFiles) candidates.push(`${programFiles}\\\\Git\\\\bin\\\\bash.exe`);\n\t\tconst programFilesX86 = process.env[\"ProgramFiles(x86)\"];\n\t\tif (programFilesX86) candidates.push(`${programFilesX86}\\\\Git\\\\bin\\\\bash.exe`);\n\t\tfor (const candidate of candidates) {\n\t\t\tif (await pathExists(candidate)) {\n\t\t\t\treturn ok(getBashShellConfig(candidate));\n\t\t\t}\n\t\t}\n\t\tconst bashOnPath = await findBashOnPath();\n\t\tif (bashOnPath) {\n\t\t\treturn ok(getBashShellConfig(bashOnPath));\n\t\t}\n\t\treturn err(\n\t\t\tnew ExecutionError(\n\t\t\t\t\"shell_unavailable\",\n\t\t\t\t`No bash shell found. Options:\\n` +\n\t\t\t\t\t` 1. Install Git for Windows: https://git-scm.com/download/win\\n` +\n\t\t\t\t\t` 2. Add your bash to PATH (Cygwin, MSYS2, etc.)\\n` +\n\t\t\t\t\t\" 3. Configure an explicit shellPath\\n\\n\" +\n\t\t\t\t\t`Searched Git Bash in:\\n${candidates.map((path) => ` ${path}`).join(\"\\n\")}`,\n\t\t\t),\n\t\t);\n\t}\n\n\tif (await pathExists(\"/bin/bash\")) {\n\t\treturn ok(getBashShellConfig(\"/bin/bash\"));\n\t}\n\tconst bashOnPath = await findBashOnPath();\n\tif (bashOnPath) {\n\t\treturn ok(getBashShellConfig(bashOnPath));\n\t}\n\treturn ok({ shell: \"sh\", args: [\"-c\"] });\n}\n\nfunction getShellEnv(\n\tbaseEnv?: NodeJS.ProcessEnv,\n\textraEnv?: Record<string, string>,\n\tinheritEnv = true,\n): NodeJS.ProcessEnv {\n\tif (!inheritEnv) return { ...extraEnv };\n\treturn {\n\t\t...process.env,\n\t\t...baseEnv,\n\t\t...extraEnv,\n\t};\n}\n\nfunction killProcessTree(pid: number): void {\n\tif (process.platform === \"win32\") {\n\t\ttry {\n\t\t\tconst child = spawn(\n\t\t\t\tjoin(process.env.SystemRoot ?? \"C:\\\\Windows\", \"System32\", \"taskkill.exe\"),\n\t\t\t\t[\"/F\", \"/T\", \"/PID\", String(pid)],\n\t\t\t\t{\n\t\t\t\t\tstdio: \"ignore\",\n\t\t\t\t\tdetached: true,\n\t\t\t\t\twindowsHide: true,\n\t\t\t\t},\n\t\t\t);\n\t\t\t// A failed spawn emits \"error\" asynchronously; consume it to avoid crashing Node.\n\t\t\tchild.once(\"error\", () => {});\n\t\t} catch {\n\t\t\t// Ignore errors.\n\t\t}\n\t\treturn;\n\t}\n\n\ttry {\n\t\tprocess.kill(-pid, \"SIGKILL\");\n\t} catch {\n\t\ttry {\n\t\t\tprocess.kill(pid, \"SIGKILL\");\n\t\t} catch {\n\t\t\t// Process already dead.\n\t\t}\n\t}\n}\n\nfunction waitForChildProcess(\n\tchild: ChildProcess,\n\tspillIsDraining: () => boolean,\n): Promise<{ code: number | null; signal: NodeJS.Signals | null }> {\n\treturn new Promise((resolvePromise, reject) => {\n\t\tlet settled = false;\n\t\tlet exited = false;\n\t\tlet exitCode: number | null = null;\n\t\tlet exitSignal: NodeJS.Signals | null = null;\n\t\tlet postExitTimer: ReturnType<typeof setTimeout> | undefined;\n\t\tlet stdoutEnded = child.stdout === null;\n\t\tlet stderrEnded = child.stderr === null;\n\n\t\tconst cleanup = (): void => {\n\t\t\tif (postExitTimer) clearTimeout(postExitTimer);\n\t\t\tchild.removeListener(\"error\", onError);\n\t\t\tchild.removeListener(\"exit\", onExit);\n\t\t\tchild.removeListener(\"close\", onClose);\n\t\t\tchild.stdout?.removeListener(\"end\", onStdoutEnd);\n\t\t\tchild.stderr?.removeListener(\"end\", onStderrEnd);\n\t\t\tchild.stdout?.removeListener(\"data\", onData);\n\t\t\tchild.stderr?.removeListener(\"data\", onData);\n\t\t};\n\t\tconst finalize = (): void => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tcleanup();\n\t\t\tchild.stdout?.destroy();\n\t\t\tchild.stderr?.destroy();\n\t\t\tresolvePromise({ code: exitCode, signal: exitSignal });\n\t\t};\n\t\tconst maybeFinalizeAfterExit = (): void => {\n\t\t\tif (exited && stdoutEnded && stderrEnded) finalize();\n\t\t};\n\t\tconst armIdleTimer = (): void => {\n\t\t\tif (postExitTimer) clearTimeout(postExitTimer);\n\t\t\tpostExitTimer = setTimeout(() => {\n\t\t\t\tif (spillIsDraining()) armIdleTimer();\n\t\t\t\telse finalize();\n\t\t\t}, EXIT_STDIO_GRACE_MS);\n\t\t};\n\t\tconst onData = (): void => {\n\t\t\tif (exited && !settled) armIdleTimer();\n\t\t};\n\t\tconst onStdoutEnd = (): void => {\n\t\t\tstdoutEnded = true;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t};\n\t\tconst onStderrEnd = (): void => {\n\t\t\tstderrEnded = true;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t};\n\t\tconst onError = (error: Error): void => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tcleanup();\n\t\t\treject(error);\n\t\t};\n\t\tconst onExit = (code: number | null, signal: NodeJS.Signals | null): void => {\n\t\t\texited = true;\n\t\t\texitCode = code;\n\t\t\texitSignal = signal;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t\tif (!settled) armIdleTimer();\n\t\t};\n\t\tconst onClose = (code: number | null, signal: NodeJS.Signals | null): void => {\n\t\t\texitCode = code;\n\t\t\texitSignal = signal;\n\t\t\tfinalize();\n\t\t};\n\n\t\tchild.stdout?.once(\"end\", onStdoutEnd);\n\t\tchild.stderr?.once(\"end\", onStderrEnd);\n\t\tchild.stdout?.on(\"data\", onData);\n\t\tchild.stderr?.on(\"data\", onData);\n\t\tchild.once(\"error\", onError);\n\t\tchild.once(\"exit\", onExit);\n\t\tchild.once(\"close\", onClose);\n\t});\n}\n\n/** Strict LF reader; Node readline does not report whether its final line was newline-terminated. */\nclass NodeTextLineReader implements TextLineReader {\n\tprivate readonly file: Awaited<ReturnType<typeof openFile>>;\n\tprivate readonly path: string;\n\tprivate readonly decoder = new TextDecoder();\n\tprivate readonly chunk = new Uint8Array(64 * 1024);\n\tprivate byteOffset = 0;\n\tprivate buffered = \"\";\n\tprivate ended = false;\n\tprivate closed = false;\n\n\tconstructor(file: Awaited<ReturnType<typeof openFile>>, path: string) {\n\t\tthis.file = file;\n\t\tthis.path = path;\n\t}\n\n\tasync readLine(context: Context): Promise<Result<TextLine | undefined, FileError>> {\n\t\tconst aborted = abortResult<TextLine | undefined>(context.abortSignal, this.path);\n\t\tif (aborted) return aborted;\n\t\tif (this.closed) return err(new FileError(\"invalid\", \"Text line reader is closed\", this.path));\n\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tconst newline = this.buffered.indexOf(\"\\n\");\n\t\t\t\tif (newline !== -1) {\n\t\t\t\t\tconst text = this.buffered.slice(0, newline);\n\t\t\t\t\tthis.buffered = this.buffered.slice(newline + 1);\n\t\t\t\t\treturn ok({ text, terminated: true });\n\t\t\t\t}\n\t\t\t\tif (this.ended) {\n\t\t\t\t\tif (this.buffered.length === 0) return ok(undefined);\n\t\t\t\t\tconst text = this.buffered;\n\t\t\t\t\tthis.buffered = \"\";\n\t\t\t\t\treturn ok({ text, terminated: false });\n\t\t\t\t}\n\n\t\t\t\t// Explicit positions allow an aborted read to be retried without skipping bytes.\n\t\t\t\tconst { bytesRead } = await this.file.read(this.chunk, 0, this.chunk.length, this.byteOffset);\n\t\t\t\tconst afterReadAbort = abortResult<TextLine | undefined>(context.abortSignal, this.path);\n\t\t\t\tif (afterReadAbort) return afterReadAbort;\n\t\t\t\tthis.byteOffset += bytesRead;\n\t\t\t\tif (bytesRead === 0) {\n\t\t\t\t\tthis.buffered += this.decoder.decode();\n\t\t\t\t\tthis.ended = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis.buffered += this.decoder.decode(this.chunk.subarray(0, bytesRead), { stream: true });\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, this.path));\n\t\t}\n\t}\n\n\tasync close(_context: Context): Promise<void> {\n\t\tif (this.closed) return;\n\t\tthis.closed = true;\n\t\tthis.buffered = \"\";\n\t\ttry {\n\t\t\tawait this.file.close();\n\t\t} catch {\n\t\t\t// Closing is best-effort, including after cancellation or an earlier I/O failure.\n\t\t}\n\t}\n}\n\nexport class NodeExecutionEnv implements ExecutionEnv {\n\t/** Every local environment sees the same files. */\n\treadonly id: string = \"node:local\";\n\tcwd: string;\n\tprivate shellPath?: string;\n\tprivate shellEnv?: NodeJS.ProcessEnv;\n\tprivate activeChildPids = new Set<number>();\n\n\tconstructor(options: { cwd: string; shellPath?: string; shellEnv?: NodeJS.ProcessEnv }) {\n\t\tthis.cwd = options.cwd;\n\t\tthis.shellPath = options.shellPath;\n\t\tthis.shellEnv = options.shellEnv;\n\t}\n\n\tasync absolutePath(path: string, _context: Context): Promise<Result<string, FileError>> {\n\t\treturn ok(resolvePath(this.cwd, path));\n\t}\n\n\tasync joinPath(parts: string[], _context: Context): Promise<Result<string, FileError>> {\n\t\treturn ok(join(...parts));\n\t}\n\n\tasync exec(\n\t\tcommand: string,\n\t\toptions: ShellExecOptions | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<ShellExecResult, ExecutionError>> {\n\t\tconst signal = context.abortSignal;\n\t\tif (signal?.aborted) return err(new ExecutionError(\"aborted\", \"aborted\"));\n\t\tconst timeoutMsResult = resolveTimeoutMs(options?.timeout);\n\t\tif (!timeoutMsResult.ok) return err(timeoutMsResult.error);\n\t\tconst timeoutMs = timeoutMsResult.value;\n\n\t\tconst cwd = options?.cwd ? resolvePath(this.cwd, options.cwd) : this.cwd;\n\t\tconst shellConfig = await getShellConfig(this.shellPath);\n\t\tif (!shellConfig.ok) return shellConfig;\n\t\ttry {\n\t\t\tawait access(cwd, constants.F_OK);\n\t\t} catch (error) {\n\t\t\tconst cause = toError(error);\n\t\t\treturn err(\n\t\t\t\tnew ExecutionError(\n\t\t\t\t\t\"spawn_error\",\n\t\t\t\t\t`Working directory does not exist: ${cwd}\\nCannot execute bash commands.`,\n\t\t\t\t\tcause,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\treturn await new Promise((resolvePromise) => {\n\t\t\tlet settled = false;\n\t\t\tlet timedOut = false;\n\t\t\tlet callbackError: ExecutionError | undefined;\n\t\t\tlet spillError: ExecutionError | undefined;\n\t\t\tlet child: ReturnType<typeof spawn> | undefined;\n\t\t\tlet timeoutId: ReturnType<typeof setTimeout> | undefined;\n\t\t\tconst spillPrefix: SpillChunk[] = [];\n\t\t\tlet spillPath: string | undefined;\n\t\t\tconst spillQueue: SpillChunk[] = [];\n\t\t\tlet spillStart: Promise<void> | undefined;\n\t\t\tlet spillStream: WriteStream | undefined;\n\t\t\tlet spillBackpressured = false;\n\n\t\t\tconst onAbort = () => {\n\t\t\t\tif (child?.pid) killProcessTree(child.pid);\n\t\t\t};\n\t\t\tconst failCallback = (error: unknown) => {\n\t\t\t\tif (callbackError !== undefined) return;\n\t\t\t\tconst cause = toError(error);\n\t\t\t\tcallbackError = new ExecutionError(\"callback_error\", cause.message, cause);\n\t\t\t\tonAbort();\n\t\t\t};\n\t\t\t// One decoder per stream, so a character split across chunks of one stream survives interleaving.\n\t\t\tconst stdoutDecoder = new TextDecoder();\n\t\t\tconst stderrDecoder = new TextDecoder();\n\t\t\t// No output reaches the caller after exec() settled, for example from a descendant holding stdio open.\n\t\t\tconst emit = (text: string): void => {\n\t\t\t\tif (settled || text === \"\" || options?.onOutput === undefined || callbackError !== undefined) return;\n\t\t\t\ttry {\n\t\t\t\t\toptions.onOutput(text, context);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tfailCallback(error);\n\t\t\t\t}\n\t\t\t};\n\t\t\t// Output seen before the spill starts: counted against the thresholds and kept for the spill's prefix.\n\t\t\tlet seenBytes = 0;\n\t\t\tlet seenNewlines = 0;\n\n\t\t\tconst settle = (result: Result<ShellExecResult, ExecutionError>) => {\n\t\t\t\tif (settled) return;\n\t\t\t\tsettled = true;\n\t\t\t\tif (timeoutId) clearTimeout(timeoutId);\n\t\t\t\tif (signal) signal.removeEventListener(\"abort\", onAbort);\n\t\t\t\tif (child?.pid) this.activeChildPids.delete(child.pid);\n\t\t\t\tresolvePromise(result);\n\t\t\t};\n\t\t\tconst pauseOutput = () => {\n\t\t\t\tchild?.stdout?.pause();\n\t\t\t\tchild?.stderr?.pause();\n\t\t\t};\n\t\t\tconst resumeOutput = () => {\n\t\t\t\tif (callbackError || spillError || timedOut || signal?.aborted || spillBackpressured) return;\n\t\t\t\tchild?.stdout?.resume();\n\t\t\t\tchild?.stderr?.resume();\n\t\t\t};\n\t\t\tconst failSpill = (error: unknown) => {\n\t\t\t\tif (spillError !== undefined) return;\n\t\t\t\tconst cause = toError(error);\n\t\t\t\tspillError = new ExecutionError(\n\t\t\t\t\t\"unknown\",\n\t\t\t\t\t`Failed to preserve complete shell output: ${cause.message}`,\n\t\t\t\t\tcause,\n\t\t\t\t);\n\t\t\t\tspillBackpressured = false;\n\t\t\t\tonAbort();\n\t\t\t};\n\t\t\tconst writeSpill = (chunk: SpillChunk): void => {\n\t\t\t\tif (spillStream === undefined || chunk.length === 0) return;\n\t\t\t\tif (spillStream.write(chunk) || spillBackpressured) return;\n\t\t\t\tspillBackpressured = true;\n\t\t\t\tpauseOutput();\n\t\t\t\tspillStream.once(\"drain\", () => {\n\t\t\t\t\tspillBackpressured = false;\n\t\t\t\t\tresumeOutput();\n\t\t\t\t});\n\t\t\t};\n\t\t\tconst startSpill = (chunk: SpillChunk): void => {\n\t\t\t\tif (spillStream !== undefined) {\n\t\t\t\t\twriteSpill(chunk);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tspillQueue.push(chunk);\n\t\t\t\tif (spillStart !== undefined) return;\n\t\t\t\tpauseOutput();\n\t\t\t\tspillStart = (async () => {\n\t\t\t\t\tconst created = await this.createTempFile({ prefix: \"pi-output-\", suffix: \".log\" }, context);\n\t\t\t\t\tif (!created.ok) throw created.error;\n\t\t\t\t\tspillPath = created.value;\n\t\t\t\t\tspillStream = createWriteStream(spillPath, { flags: \"a\", highWaterMark: SPILL_HIGH_WATER_MARK });\n\t\t\t\t\tspillStream.on(\"error\", failSpill);\n\t\t\t\t\tfor (const queued of spillQueue) writeSpill(queued);\n\t\t\t\t\tspillQueue.length = 0;\n\t\t\t\t})()\n\t\t\t\t\t.catch(failSpill)\n\t\t\t\t\t.finally(resumeOutput);\n\t\t\t};\n\t\t\tconst finishSpill = async (): Promise<void> => {\n\t\t\t\tawait spillStart;\n\t\t\t\tconst stream = spillStream;\n\t\t\t\tif (stream === undefined || spillError !== undefined || stream.destroyed) return;\n\t\t\t\tawait new Promise<void>((resolveFinish) => {\n\t\t\t\t\tstream.once(\"error\", () => resolveFinish());\n\t\t\t\t\tstream.once(\"finish\", resolveFinish);\n\t\t\t\t\tstream.end();\n\t\t\t\t});\n\t\t\t};\n\n\t\t\ttry {\n\t\t\t\tconst commandFromStdin = shellConfig.value.commandTransport === \"stdin\";\n\t\t\t\tchild = spawn(\n\t\t\t\t\tshellConfig.value.shell,\n\t\t\t\t\tcommandFromStdin ? shellConfig.value.args : [...shellConfig.value.args, command],\n\t\t\t\t\t{\n\t\t\t\t\t\tcwd,\n\t\t\t\t\t\tdetached: process.platform !== \"win32\",\n\t\t\t\t\t\tenv: getShellEnv(this.shellEnv, options?.env, options?.inheritEnv),\n\t\t\t\t\t\tstdio: [commandFromStdin ? \"pipe\" : \"ignore\", \"pipe\", \"pipe\"],\n\t\t\t\t\t\twindowsHide: true,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\tif (child.pid) this.activeChildPids.add(child.pid);\n\t\t\t\tif (commandFromStdin) {\n\t\t\t\t\tchild.stdin?.on(\"error\", () => {});\n\t\t\t\t\tchild.stdin?.end(command);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconst cause = toError(error);\n\t\t\t\tsettle(err(new ExecutionError(\"spawn_error\", cause.message, cause)));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttimeoutId =\n\t\t\t\ttimeoutMs === undefined\n\t\t\t\t\t? undefined\n\t\t\t\t\t: setTimeout(() => {\n\t\t\t\t\t\t\ttimedOut = true;\n\t\t\t\t\t\t\tonAbort();\n\t\t\t\t\t\t}, timeoutMs);\n\n\t\t\tif (signal) {\n\t\t\t\tif (signal.aborted) onAbort();\n\t\t\t\telse signal.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\t}\n\n\t\t\tconst feed = (decoder: InstanceType<typeof TextDecoder>) => (chunk: Uint8Array) => {\n\t\t\t\temit(decoder.decode(chunk, { stream: true }));\n\t\t\t\tconst spill = options?.spill;\n\t\t\t\tif (spill === undefined || chunk.length === 0) return;\n\t\t\t\tif (spillStart !== undefined) {\n\t\t\t\t\tstartSpill(chunk);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tseenBytes += chunk.length;\n\t\t\t\tfor (let index = chunk.indexOf(0x0a); index !== -1; index = chunk.indexOf(0x0a, index + 1)) seenNewlines++;\n\t\t\t\tconst lines = seenNewlines + (chunk[chunk.length - 1] === 0x0a ? 0 : 1);\n\t\t\t\tif (seenBytes <= spill.afterBytes && lines <= spill.afterLines) {\n\t\t\t\t\tspillPrefix.push(chunk);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfor (const prefix of spillPrefix) startSpill(prefix);\n\t\t\t\tspillPrefix.length = 0;\n\t\t\t\tstartSpill(chunk);\n\t\t\t};\n\t\t\tchild.stdout?.on(\"data\", feed(stdoutDecoder));\n\t\t\tchild.stderr?.on(\"data\", feed(stderrDecoder));\n\n\t\t\tvoid waitForChildProcess(\n\t\t\t\tchild,\n\t\t\t\t() =>\n\t\t\t\t\tspillError === undefined &&\n\t\t\t\t\tspillStart !== undefined &&\n\t\t\t\t\t(spillStream === undefined || spillBackpressured),\n\t\t\t).then(\n\t\t\t\tasync ({ code, signal: exitSignal }) => {\n\t\t\t\t\tawait finishSpill();\n\t\t\t\t\temit(stdoutDecoder.decode());\n\t\t\t\t\temit(stderrDecoder.decode());\n\t\t\t\t\tif (callbackError) {\n\t\t\t\t\t\tsettle(err(callbackError));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst interrupted = timedOut\n\t\t\t\t\t\t? new ExecutionError(\"timeout\", `timeout:${options?.timeout}`)\n\t\t\t\t\t\t: signal?.aborted\n\t\t\t\t\t\t\t? new ExecutionError(\"aborted\", \"aborted\")\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\tif (interrupted !== undefined) {\n\t\t\t\t\t\tif (spillPath !== undefined) interrupted.spillPath = spillPath;\n\t\t\t\t\t\tsettle(err(interrupted));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (spillError) {\n\t\t\t\t\t\tsettle(err(spillError));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// A process killed by a signal (e.g. OOM killer) has no exit code; map it\n\t\t\t\t\t// to the conventional 128 + signal number so callers do not mistake it\n\t\t\t\t\t// for a successful exit.\n\t\t\t\t\tconst exitCode = code ?? (exitSignal ? 128 + (osConstants.signals[exitSignal] ?? 0) : 1);\n\t\t\t\t\tsettle(ok({ exitCode, ...(spillPath === undefined ? {} : { spillPath }) }));\n\t\t\t\t},\n\t\t\t\t(error: Error) => settle(err(new ExecutionError(\"spawn_error\", error.message, error))),\n\t\t\t);\n\t\t});\n\t}\n\n\tasync openTextLineReader(path: string, context: Context): Promise<Result<TextLineReader, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<TextLineReader>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tconst file = await openFile(resolved, \"r\");\n\t\t\tconst afterOpenAbort = abortResult<TextLineReader>(context.abortSignal, resolved);\n\t\t\tif (afterOpenAbort) {\n\t\t\t\tawait file.close().catch(() => undefined);\n\t\t\t\treturn afterOpenAbort;\n\t\t\t}\n\t\t\treturn ok(new NodeTextLineReader(file, resolved));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync readTextFile(path: string, context: Context): Promise<Result<string, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<string>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\treturn ok(await readFile(resolved, { encoding: \"utf8\", signal }));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync readTextLines(\n\t\tpath: string,\n\t\toptions: { maxLines?: number } | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<string[], FileError>> {\n\t\tif (options?.maxLines !== undefined && options.maxLines <= 0) return ok([]);\n\t\tconst opened = await this.openTextLineReader(path, context);\n\t\tif (!opened.ok) return opened;\n\t\tconst lines: string[] = [];\n\t\ttry {\n\t\t\twhile (options?.maxLines === undefined || lines.length < options.maxLines) {\n\t\t\t\tconst line = await opened.value.readLine(context);\n\t\t\t\tif (!line.ok) return line;\n\t\t\t\tif (line.value === undefined) break;\n\t\t\t\tlines.push(line.value.text);\n\t\t\t}\n\t\t\treturn ok(lines);\n\t\t} finally {\n\t\t\tawait opened.value.close(context);\n\t\t}\n\t}\n\n\tasync readBinaryFile(path: string, context: Context): Promise<Result<Uint8Array, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<Uint8Array>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\treturn ok(await readFile(resolved, { signal }));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync writeFile(path: string, content: string | Uint8Array, context: Context): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<void>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tawait mkdir(resolve(resolved, \"..\"), { recursive: true });\n\t\t\tconst afterMkdirAbort = abortResult<void>(signal, resolved);\n\t\t\tif (afterMkdirAbort) return afterMkdirAbort;\n\t\t\tawait writeFile(resolved, content, { signal });\n\t\t\treturn ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync appendFile(path: string, content: string | Uint8Array, context: Context): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<void>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tawait mkdir(resolve(resolved, \"..\"), { recursive: true });\n\t\t\tconst afterMkdirAbort = abortResult<void>(signal, resolved);\n\t\t\tif (afterMkdirAbort) return afterMkdirAbort;\n\t\t\tawait appendFile(resolved, content);\n\t\t\tconst afterAppendAbort = abortResult<void>(signal, resolved);\n\t\t\treturn afterAppendAbort ?? ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync truncateFile(path: string, size: number, context: Context): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<void>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\tif (!Number.isSafeInteger(size) || size < 0) {\n\t\t\treturn err(new FileError(\"invalid\", \"File size must be a non-negative safe integer\", resolved));\n\t\t}\n\t\tlet file: Awaited<ReturnType<typeof openFile>> | undefined;\n\t\ttry {\n\t\t\tfile = await openFile(resolved, \"r+\");\n\t\t\tawait file.truncate(size);\n\t\t\tconst afterTruncateAbort = abortResult<void>(signal, resolved);\n\t\t\treturn afterTruncateAbort ?? ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t} finally {\n\t\t\tawait file?.close().catch(() => undefined);\n\t\t}\n\t}\n\n\tasync flushFile(path: string, context: Context): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<void>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\tlet file: Awaited<ReturnType<typeof openFile>> | undefined;\n\t\ttry {\n\t\t\tfile = await openFile(resolved, \"r+\");\n\t\t\tawait file.sync();\n\t\t\tconst afterSyncAbort = abortResult<void>(signal, resolved);\n\t\t\treturn afterSyncAbort ?? ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t} finally {\n\t\t\tawait file?.close().catch(() => undefined);\n\t\t}\n\t}\n\n\tasync renameFile(sourcePath: string, destinationPath: string, context: Context): Promise<Result<void, FileError>> {\n\t\tconst source = resolvePath(this.cwd, sourcePath);\n\t\tconst destination = resolvePath(this.cwd, destinationPath);\n\t\tconst aborted = abortResult<void>(context.abortSignal, destination);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tawait rename(source, destination);\n\t\t\treturn ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, source));\n\t\t}\n\t}\n\n\tasync fileInfo(path: string, context: Context): Promise<Result<FileInfo, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<FileInfo>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\treturn fileInfoFromStats(resolved, await lstat(resolved));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync listDir(path: string, context: Context): Promise<Result<FileInfo[], FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<FileInfo[]>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tconst entries = await readdir(resolved, { withFileTypes: true });\n\t\t\tconst infos: FileInfo[] = [];\n\t\t\tfor (const entry of entries) {\n\t\t\t\tconst loopAbort = abortResult<FileInfo[]>(signal, resolved);\n\t\t\t\tif (loopAbort) return loopAbort;\n\t\t\t\tconst entryPath = resolve(resolved, entry.name);\n\t\t\t\ttry {\n\t\t\t\t\tconst info = fileInfoFromStats(entryPath, await lstat(entryPath));\n\t\t\t\t\tif (info.ok) infos.push(info.value);\n\t\t\t\t} catch (error) {\n\t\t\t\t\treturn err(toFileError(error, entryPath));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ok(infos);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync canonicalPath(path: string, context: Context): Promise<Result<string, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<string>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\treturn ok(await realpath(resolved));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync exists(path: string, context: Context): Promise<Result<boolean, FileError>> {\n\t\tconst result = await this.fileInfo(path, context);\n\t\tif (result.ok) return ok(true);\n\t\tif (result.error.code === \"not_found\") return ok(false);\n\t\treturn err(result.error);\n\t}\n\n\tasync createDir(\n\t\tpath: string,\n\t\toptions: { recursive?: boolean } | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<void>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tawait mkdir(resolved, { recursive: options?.recursive ?? true });\n\t\t\treturn ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync remove(\n\t\tpath: string,\n\t\toptions: { recursive?: boolean; force?: boolean } | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<void>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tawait rm(resolved, { recursive: options?.recursive ?? false, force: options?.force ?? false });\n\t\t\treturn ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync createTempDir(prefix: string | undefined, context: Context): Promise<Result<string, FileError>> {\n\t\tconst aborted = abortResult<string>(context.abortSignal);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tprefix ??= \"tmp-\";\n\t\t\treturn ok(await mkdtemp(join(tmpdir(), prefix)));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error));\n\t\t}\n\t}\n\n\tasync createTempFile(\n\t\toptions: { prefix?: string; suffix?: string } | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<string, FileError>> {\n\t\tconst dir = await this.createTempDir(\"tmp-\", context);\n\t\tif (!dir.ok) return dir;\n\t\tconst filePath = join(dir.value, `${options?.prefix ?? \"\"}${randomUUID()}${options?.suffix ?? \"\"}`);\n\t\ttry {\n\t\t\tawait writeFile(filePath, \"\");\n\t\t\treturn ok(filePath);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, filePath));\n\t\t}\n\t}\n\n\tasync cleanup(_context: Context): Promise<void> {\n\t\tfor (const pid of this.activeChildPids) killProcessTree(pid);\n\t\tthis.activeChildPids.clear();\n\t}\n}\n"]}
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/env/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAA0C,MAAM,SAAS,CAAC;AAC/F,OAAO,EACN,MAAM,EACN,UAAU,EAEV,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,IAAI,IAAI,QAAQ,EAChB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,EAAE,EACF,SAAS,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,C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AAC;QAC1C,CAAC;IACF,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,QAAiB;QAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,eAAe;YAAE,eAAe,CAAC,GAAG,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACD","sourcesContent":["import { type ChildProcess, spawn } from \"node:child_process\";\nimport { randomUUID } from \"node:crypto\";\nimport { constants, createWriteStream, type Dir, type Stats, type WriteStream } from \"node:fs\";\nimport {\n\taccess,\n\tappendFile,\n\ttype FileHandle,\n\tlstat,\n\tmkdir,\n\tmkdtemp,\n\topendir,\n\topen as openFile,\n\treaddir,\n\treadFile,\n\trealpath,\n\trename,\n\trm,\n\twriteFile,\n} from \"node:fs/promises\";\nimport { homedir, constants as osConstants, tmpdir } from \"node:os\";\nimport { basename, isAbsolute, join, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport type { Context } from \"@earendil-works/chord\";\nimport { StreamDecoder } from \"./decode.ts\";\nimport {\n\ttype BinaryReader,\n\ttype DirReader,\n\ttype ExecutionEnv,\n\tExecutionError,\n\terr,\n\tFileError,\n\ttype FileInfo,\n\ttype FileKind,\n\ttype FileWatcher,\n\ttype LineScan,\n\tok,\n\ttype Result,\n\ttype ShellExecOptions,\n\ttype ShellExecResult,\n\ttype ShellOutputInfo,\n\ttype TextLine,\n\ttype TextLineReader,\n\ttoError,\n\ttype WatchChange,\n\ttype WatchTarget,\n} from \"./index.ts\";\nimport { LineScanner } from \"./line-scan.ts\";\nimport { NodeFileWatcher, type NodeWatchOptions } from \"./node-watch.ts\";\n\nconst MAX_TIMEOUT_MS = 2_147_483_647;\nconst MAX_TIMEOUT_SECONDS = MAX_TIMEOUT_MS / 1000;\nconst EXIT_STDIO_GRACE_MS = 100;\nconst SPILL_HIGH_WATER_MARK = 1024 * 1024;\n/** Largest single read of a `BinaryReader`, so a huge `length` allocates only as much as the file yields. */\nconst BINARY_READ_CHUNK = 1024 * 1024;\n\ntype SpillChunk = string | Uint8Array;\n\nfunction resolveTimeoutMs(timeout: number | undefined): Result<number | undefined, ExecutionError> {\n\tif (timeout === undefined) return ok(undefined);\n\tif (!Number.isFinite(timeout) || timeout <= 0) {\n\t\treturn err(new ExecutionError(\"timeout\", \"Invalid timeout: must be a finite number of seconds\"));\n\t}\n\n\tconst timeoutMs = timeout * 1000;\n\tif (timeoutMs > MAX_TIMEOUT_MS) {\n\t\treturn err(new ExecutionError(\"timeout\", `Invalid timeout: maximum is ${MAX_TIMEOUT_SECONDS} seconds`));\n\t}\n\treturn ok(timeoutMs);\n}\n\nfunction resolvePath(cwd: string, path: string): string {\n\tlet normalized = path;\n\tif (normalized === \"~\") {\n\t\tnormalized = homedir();\n\t} else if (normalized.startsWith(\"~/\") || (process.platform === \"win32\" && normalized.startsWith(\"~\\\\\"))) {\n\t\tnormalized = join(homedir(), normalized.slice(2));\n\t} else if (normalized.startsWith(\"file://\")) {\n\t\ttry {\n\t\t\tnormalized = fileURLToPath(normalized);\n\t\t} catch {\n\t\t\t// Keep malformed URLs as ordinary paths so filesystem methods preserve their non-throwing contract.\n\t\t}\n\t}\n\treturn isAbsolute(normalized) ? resolve(normalized) : resolve(cwd, normalized);\n}\n\nfunction fileKindFromStats(stats: {\n\tisFile(): boolean;\n\tisDirectory(): boolean;\n\tisSymbolicLink(): boolean;\n}): FileKind | undefined {\n\tif (stats.isFile()) return \"file\";\n\tif (stats.isDirectory()) return \"directory\";\n\tif (stats.isSymbolicLink()) return \"symlink\";\n\treturn undefined;\n}\n\nfunction fileInfoFromStats(\n\tpath: string,\n\tstats: { isFile(): boolean; isDirectory(): boolean; isSymbolicLink(): boolean; size: number; mtimeMs: number },\n): Result<FileInfo, FileError> {\n\tconst kind = fileKindFromStats(stats);\n\tif (!kind) return err(new FileError(\"invalid\", \"Unsupported file type\", path));\n\treturn ok({\n\t\tname: basename(path),\n\t\tpath,\n\t\tkind,\n\t\tsize: stats.size,\n\t\tmtimeMs: stats.mtimeMs,\n\t});\n}\n\nfunction isNodeError(error: unknown): error is NodeJS.ErrnoException {\n\treturn error instanceof Error && \"code\" in error;\n}\n\nfunction toFileError(error: unknown, fallbackPath?: string): FileError {\n\tif (error instanceof FileError) return error;\n\tconst cause = toError(error);\n\tconst nodeError = isNodeError(error) ? error : undefined;\n\tconst path = typeof nodeError?.path === \"string\" ? nodeError.path : fallbackPath;\n\tif (nodeError) {\n\t\tconst message = nodeError.message;\n\t\tswitch (nodeError.code) {\n\t\t\tcase \"ABORT_ERR\":\n\t\t\t\treturn new FileError(\"aborted\", message, path, cause);\n\t\t\tcase \"ENOENT\":\n\t\t\t\treturn new FileError(\"not_found\", message, path, cause);\n\t\t\tcase \"EACCES\":\n\t\t\tcase \"EPERM\":\n\t\t\t\treturn new FileError(\"permission_denied\", message, path, cause);\n\t\t\tcase \"ENOTDIR\":\n\t\t\t\treturn new FileError(\"not_directory\", message, path, cause);\n\t\t\tcase \"EISDIR\":\n\t\t\t\treturn new FileError(\"is_directory\", message, path, cause);\n\t\t\tcase \"EINVAL\":\n\t\t\t\treturn new FileError(\"invalid\", message, path, cause);\n\t\t}\n\t}\n\treturn new FileError(\"unknown\", cause.message, path, cause);\n}\n\nfunction abortResult<TValue>(signal: AbortSignal | undefined, path?: string): Result<TValue, FileError> | undefined {\n\treturn signal?.aborted ? err(new FileError(\"aborted\", \"aborted\", path)) : undefined;\n}\n\nasync function pathExists(path: string): Promise<boolean> {\n\ttry {\n\t\tawait access(path, constants.F_OK);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nasync function runCommand(\n\tcommand: string,\n\targs: string[],\n\ttimeoutMs: number,\n): Promise<{ stdout: string; status: number | null }> {\n\treturn await new Promise((resolve) => {\n\t\tlet stdout = \"\";\n\t\tlet child: ReturnType<typeof spawn>;\n\t\ttry {\n\t\t\tchild = spawn(command, args, {\n\t\t\t\tstdio: [\"ignore\", \"pipe\", \"ignore\"],\n\t\t\t\twindowsHide: true,\n\t\t\t});\n\t\t} catch {\n\t\t\tresolve({ stdout: \"\", status: null });\n\t\t\treturn;\n\t\t}\n\t\tconst timeout = setTimeout(() => {\n\t\t\tif (child.pid) killProcessTree(child.pid);\n\t\t}, timeoutMs);\n\t\tchild.stdout?.setEncoding(\"utf8\");\n\t\tchild.stdout?.on(\"data\", (chunk: string) => {\n\t\t\tstdout += chunk;\n\t\t});\n\t\tchild.on(\"error\", () => {\n\t\t\tclearTimeout(timeout);\n\t\t\tresolve({ stdout: \"\", status: null });\n\t\t});\n\t\tchild.on(\"close\", (status) => {\n\t\t\tclearTimeout(timeout);\n\t\t\tresolve({ stdout, status });\n\t\t});\n\t});\n}\n\nasync function findBashOnPath(): Promise<string | null> {\n\tconst result =\n\t\tprocess.platform === \"win32\"\n\t\t\t? await runCommand(\"where\", [\"bash.exe\"], 5000)\n\t\t\t: await runCommand(\"which\", [\"bash\"], 5000);\n\tif (result.status !== 0 || !result.stdout) return null;\n\tconst firstMatch = result.stdout.trim().split(/\\r?\\n/)[0];\n\treturn firstMatch && (await pathExists(firstMatch)) ? firstMatch : null;\n}\n\ninterface ShellConfig {\n\tshell: string;\n\targs: string[];\n\tcommandTransport?: \"argv\" | \"stdin\";\n}\n\nfunction isLegacyWslBashPath(path: string): boolean {\n\tconst normalized = path.replace(/\\//g, \"\\\\\").toLowerCase();\n\treturn /^[a-z]:\\\\windows\\\\(?:system32|sysnative)\\\\bash\\.exe$/.test(normalized);\n}\n\nfunction getBashShellConfig(shell: string): ShellConfig {\n\treturn isLegacyWslBashPath(shell) ? { shell, args: [\"-s\"], commandTransport: \"stdin\" } : { shell, args: [\"-c\"] };\n}\n\nasync function getShellConfig(customShellPath?: string): Promise<Result<ShellConfig, ExecutionError>> {\n\tif (customShellPath) {\n\t\tif (await pathExists(customShellPath)) {\n\t\t\treturn ok(getBashShellConfig(customShellPath));\n\t\t}\n\t\treturn err(new ExecutionError(\"shell_unavailable\", `Custom shell path not found: ${customShellPath}`));\n\t}\n\tif (process.platform === \"win32\") {\n\t\tconst candidates: string[] = [];\n\t\tconst programFiles = process.env.ProgramFiles;\n\t\tif (programFiles) candidates.push(`${programFiles}\\\\Git\\\\bin\\\\bash.exe`);\n\t\tconst programFilesX86 = process.env[\"ProgramFiles(x86)\"];\n\t\tif (programFilesX86) candidates.push(`${programFilesX86}\\\\Git\\\\bin\\\\bash.exe`);\n\t\tfor (const candidate of candidates) {\n\t\t\tif (await pathExists(candidate)) {\n\t\t\t\treturn ok(getBashShellConfig(candidate));\n\t\t\t}\n\t\t}\n\t\tconst bashOnPath = await findBashOnPath();\n\t\tif (bashOnPath) {\n\t\t\treturn ok(getBashShellConfig(bashOnPath));\n\t\t}\n\t\treturn err(\n\t\t\tnew ExecutionError(\n\t\t\t\t\"shell_unavailable\",\n\t\t\t\t`No bash shell found. Options:\\n` +\n\t\t\t\t\t` 1. Install Git for Windows: https://git-scm.com/download/win\\n` +\n\t\t\t\t\t` 2. Add your bash to PATH (Cygwin, MSYS2, etc.)\\n` +\n\t\t\t\t\t\" 3. Configure an explicit shellPath\\n\\n\" +\n\t\t\t\t\t`Searched Git Bash in:\\n${candidates.map((path) => ` ${path}`).join(\"\\n\")}`,\n\t\t\t),\n\t\t);\n\t}\n\n\tif (await pathExists(\"/bin/bash\")) {\n\t\treturn ok(getBashShellConfig(\"/bin/bash\"));\n\t}\n\tconst bashOnPath = await findBashOnPath();\n\tif (bashOnPath) {\n\t\treturn ok(getBashShellConfig(bashOnPath));\n\t}\n\treturn ok({ shell: \"sh\", args: [\"-c\"] });\n}\n\nfunction getShellEnv(\n\tbaseEnv?: NodeJS.ProcessEnv,\n\textraEnv?: Record<string, string>,\n\tinheritEnv = true,\n): NodeJS.ProcessEnv {\n\tif (!inheritEnv) return { ...extraEnv };\n\treturn {\n\t\t...process.env,\n\t\t...baseEnv,\n\t\t...extraEnv,\n\t};\n}\n\nfunction killProcessTree(pid: number): void {\n\tif (process.platform === \"win32\") {\n\t\ttry {\n\t\t\tconst child = spawn(\n\t\t\t\tjoin(process.env.SystemRoot ?? \"C:\\\\Windows\", \"System32\", \"taskkill.exe\"),\n\t\t\t\t[\"/F\", \"/T\", \"/PID\", String(pid)],\n\t\t\t\t{\n\t\t\t\t\tstdio: \"ignore\",\n\t\t\t\t\tdetached: true,\n\t\t\t\t\twindowsHide: true,\n\t\t\t\t},\n\t\t\t);\n\t\t\t// A failed spawn emits \"error\" asynchronously; consume it to avoid crashing Node.\n\t\t\tchild.once(\"error\", () => {});\n\t\t} catch {\n\t\t\t// Ignore errors.\n\t\t}\n\t\treturn;\n\t}\n\n\ttry {\n\t\tprocess.kill(-pid, \"SIGKILL\");\n\t} catch {\n\t\ttry {\n\t\t\tprocess.kill(pid, \"SIGKILL\");\n\t\t} catch {\n\t\t\t// Process already dead.\n\t\t}\n\t}\n}\n\nfunction waitForChildProcess(\n\tchild: ChildProcess,\n\tspillIsDraining: () => boolean,\n): Promise<{ code: number | null; signal: NodeJS.Signals | null }> {\n\treturn new Promise((resolvePromise, reject) => {\n\t\tlet settled = false;\n\t\tlet exited = false;\n\t\tlet exitCode: number | null = null;\n\t\tlet exitSignal: NodeJS.Signals | null = null;\n\t\tlet postExitTimer: ReturnType<typeof setTimeout> | undefined;\n\t\tlet stdoutEnded = child.stdout === null;\n\t\tlet stderrEnded = child.stderr === null;\n\n\t\tconst cleanup = (): void => {\n\t\t\tif (postExitTimer) clearTimeout(postExitTimer);\n\t\t\tchild.removeListener(\"error\", onError);\n\t\t\tchild.removeListener(\"exit\", onExit);\n\t\t\tchild.removeListener(\"close\", onClose);\n\t\t\tchild.stdout?.removeListener(\"end\", onStdoutEnd);\n\t\t\tchild.stderr?.removeListener(\"end\", onStderrEnd);\n\t\t\tchild.stdout?.removeListener(\"data\", onData);\n\t\t\tchild.stderr?.removeListener(\"data\", onData);\n\t\t};\n\t\tconst finalize = (): void => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tcleanup();\n\t\t\tchild.stdout?.destroy();\n\t\t\tchild.stderr?.destroy();\n\t\t\tresolvePromise({ code: exitCode, signal: exitSignal });\n\t\t};\n\t\tconst maybeFinalizeAfterExit = (): void => {\n\t\t\tif (exited && stdoutEnded && stderrEnded) finalize();\n\t\t};\n\t\tconst armIdleTimer = (): void => {\n\t\t\tif (postExitTimer) clearTimeout(postExitTimer);\n\t\t\tpostExitTimer = setTimeout(() => {\n\t\t\t\tif (spillIsDraining()) armIdleTimer();\n\t\t\t\telse finalize();\n\t\t\t}, EXIT_STDIO_GRACE_MS);\n\t\t};\n\t\tconst onData = (): void => {\n\t\t\tif (exited && !settled) armIdleTimer();\n\t\t};\n\t\tconst onStdoutEnd = (): void => {\n\t\t\tstdoutEnded = true;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t};\n\t\tconst onStderrEnd = (): void => {\n\t\t\tstderrEnded = true;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t};\n\t\tconst onError = (error: Error): void => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tcleanup();\n\t\t\treject(error);\n\t\t};\n\t\tconst onExit = (code: number | null, signal: NodeJS.Signals | null): void => {\n\t\t\texited = true;\n\t\t\texitCode = code;\n\t\t\texitSignal = signal;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t\tif (!settled) armIdleTimer();\n\t\t};\n\t\tconst onClose = (code: number | null, signal: NodeJS.Signals | null): void => {\n\t\t\texitCode = code;\n\t\t\texitSignal = signal;\n\t\t\tfinalize();\n\t\t};\n\n\t\tchild.stdout?.once(\"end\", onStdoutEnd);\n\t\tchild.stderr?.once(\"end\", onStderrEnd);\n\t\tchild.stdout?.on(\"data\", onData);\n\t\tchild.stderr?.on(\"data\", onData);\n\t\tchild.once(\"error\", onError);\n\t\tchild.once(\"exit\", onExit);\n\t\tchild.once(\"close\", onClose);\n\t});\n}\n\n/** Strict LF reader; Node readline does not report whether its final line was newline-terminated. */\nclass NodeTextLineReader implements TextLineReader {\n\tprivate readonly file: Awaited<ReturnType<typeof openFile>>;\n\tprivate readonly path: string;\n\tprivate readonly decoder = new StreamDecoder();\n\tprivate readonly chunk = new Uint8Array(64 * 1024);\n\tprivate byteOffset = 0;\n\tprivate buffered = \"\";\n\tprivate ended = false;\n\tprivate closed = false;\n\n\tconstructor(file: Awaited<ReturnType<typeof openFile>>, path: string) {\n\t\tthis.file = file;\n\t\tthis.path = path;\n\t}\n\n\tasync readLine(context: Context): Promise<Result<TextLine | undefined, FileError>> {\n\t\tconst aborted = abortResult<TextLine | undefined>(context.abortSignal, this.path);\n\t\tif (aborted) return aborted;\n\t\tif (this.closed) return err(new FileError(\"invalid\", \"Text line reader is closed\", this.path));\n\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tconst newline = this.buffered.indexOf(\"\\n\");\n\t\t\t\tif (newline !== -1) {\n\t\t\t\t\tconst text = this.buffered.slice(0, newline);\n\t\t\t\t\tthis.buffered = this.buffered.slice(newline + 1);\n\t\t\t\t\treturn ok({ text, terminated: true });\n\t\t\t\t}\n\t\t\t\tif (this.ended) {\n\t\t\t\t\tif (this.buffered.length === 0) return ok(undefined);\n\t\t\t\t\tconst text = this.buffered;\n\t\t\t\t\tthis.buffered = \"\";\n\t\t\t\t\treturn ok({ text, terminated: false });\n\t\t\t\t}\n\n\t\t\t\t// Explicit positions allow an aborted read to be retried without skipping bytes.\n\t\t\t\tconst { bytesRead } = await this.file.read(this.chunk, 0, this.chunk.length, this.byteOffset);\n\t\t\t\tconst afterReadAbort = abortResult<TextLine | undefined>(context.abortSignal, this.path);\n\t\t\t\tif (afterReadAbort) return afterReadAbort;\n\t\t\t\tthis.byteOffset += bytesRead;\n\t\t\t\tif (bytesRead === 0) {\n\t\t\t\t\tthis.buffered += this.decoder.decode();\n\t\t\t\t\tthis.ended = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis.buffered += this.decoder.decode(this.chunk.subarray(0, bytesRead));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, this.path));\n\t\t}\n\t}\n\n\tasync close(_context: Context): Promise<void> {\n\t\tif (this.closed) return;\n\t\tthis.closed = true;\n\t\tthis.buffered = \"\";\n\t\ttry {\n\t\t\tawait this.file.close();\n\t\t} catch {\n\t\t\t// Closing is best-effort, including after cancellation or an earlier I/O failure.\n\t\t}\n\t}\n}\n\nfunction closedResult<TValue>(what: string, path: string): Result<TValue, FileError> {\n\treturn err(new FileError(\"invalid\", `${what} is closed`, path));\n}\n\nclass NodeBinaryReader implements BinaryReader {\n\tprivate readonly file: FileHandle;\n\tprivate readonly path: string;\n\tprivate closed = false;\n\n\tconstructor(file: FileHandle, path: string) {\n\t\tthis.file = file;\n\t\tthis.path = path;\n\t}\n\n\tasync info(context: Context): Promise<Result<FileInfo, FileError>> {\n\t\tconst aborted = abortResult<FileInfo>(context.abortSignal, this.path);\n\t\tif (aborted) return aborted;\n\t\tif (this.closed) return closedResult(\"Binary reader\", this.path);\n\t\ttry {\n\t\t\treturn fileInfoFromStats(this.path, await this.file.stat());\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, this.path));\n\t\t}\n\t}\n\n\tasync read(offset: number, length: number, context: Context): Promise<Result<Uint8Array, FileError>> {\n\t\tconst aborted = abortResult<Uint8Array>(context.abortSignal, this.path);\n\t\tif (aborted) return aborted;\n\t\tif (this.closed) return closedResult(\"Binary reader\", this.path);\n\t\tif (!Number.isSafeInteger(offset) || offset < 0 || !Number.isSafeInteger(length) || length < 0) {\n\t\t\treturn err(new FileError(\"invalid\", \"Offset and length must be non-negative safe integers\", this.path));\n\t\t}\n\t\tconst chunks: Uint8Array[] = [];\n\t\tlet total = 0;\n\t\ttry {\n\t\t\twhile (total < length) {\n\t\t\t\tconst chunk = new Uint8Array(Math.min(length - total, BINARY_READ_CHUNK));\n\t\t\t\tconst { bytesRead } = await this.file.read(chunk, 0, chunk.length, offset + total);\n\t\t\t\tconst afterReadAbort = abortResult<Uint8Array>(context.abortSignal, this.path);\n\t\t\t\tif (afterReadAbort) return afterReadAbort;\n\t\t\t\tif (bytesRead === 0) break;\n\t\t\t\tchunks.push(bytesRead === chunk.length ? chunk : chunk.subarray(0, bytesRead));\n\t\t\t\ttotal += bytesRead;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, this.path));\n\t\t}\n\t\tif (chunks.length === 1) return ok(chunks[0]!);\n\t\tconst bytes = new Uint8Array(total);\n\t\tlet position = 0;\n\t\tfor (const chunk of chunks) {\n\t\t\tbytes.set(chunk, position);\n\t\t\tposition += chunk.length;\n\t\t}\n\t\treturn ok(bytes);\n\t}\n\n\tasync scanLines(\n\t\toptions: { startLine: number; endLine?: number },\n\t\tcontext: Context,\n\t): Promise<Result<LineScan, FileError>> {\n\t\tconst aborted = abortResult<LineScan>(context.abortSignal, this.path);\n\t\tif (aborted) return aborted;\n\t\tif (this.closed) return closedResult(\"Binary reader\", this.path);\n\t\tlet scanner: LineScanner;\n\t\ttry {\n\t\t\tscanner = new LineScanner(options.startLine, options.endLine);\n\t\t} catch {\n\t\t\treturn err(new FileError(\"invalid\", \"Invalid line range\", this.path));\n\t\t}\n\t\tconst chunk = new Uint8Array(64 * 1024);\n\t\ttry {\n\t\t\tfor (let position = 0; ; ) {\n\t\t\t\tconst { bytesRead } = await this.file.read(chunk, 0, chunk.length, position);\n\t\t\t\tconst afterReadAbort = abortResult<LineScan>(context.abortSignal, this.path);\n\t\t\t\tif (afterReadAbort) return afterReadAbort;\n\t\t\t\tif (bytesRead === 0) return ok(scanner.finish());\n\t\t\t\tscanner.push(chunk.subarray(0, bytesRead));\n\t\t\t\tposition += bytesRead;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, this.path));\n\t\t}\n\t}\n\n\tasync close(_context: Context): Promise<void> {\n\t\tif (this.closed) return;\n\t\tthis.closed = true;\n\t\tawait this.file.close().catch(() => undefined);\n\t}\n}\n\nclass NodeDirReader implements DirReader {\n\tprivate readonly dir: Dir;\n\tprivate readonly path: string;\n\tprivate done = false;\n\tprivate closed = false;\n\n\tconstructor(dir: Dir, path: string) {\n\t\tthis.dir = dir;\n\t\tthis.path = path;\n\t}\n\n\tasync next(\n\t\tmaxEntries: number,\n\t\tcontext: Context,\n\t): Promise<Result<{ entries: FileInfo[]; done: boolean }, FileError>> {\n\t\tconst aborted = abortResult<{ entries: FileInfo[]; done: boolean }>(context.abortSignal, this.path);\n\t\tif (aborted) return aborted;\n\t\tif (this.closed) return closedResult(\"Directory reader\", this.path);\n\t\tif (!Number.isSafeInteger(maxEntries) || maxEntries <= 0) {\n\t\t\treturn err(new FileError(\"invalid\", \"maxEntries must be a positive safe integer\", this.path));\n\t\t}\n\t\tconst entries: FileInfo[] = [];\n\t\ttry {\n\t\t\twhile (!this.done && entries.length < maxEntries) {\n\t\t\t\tconst entry = await this.dir.read();\n\t\t\t\tif (entry === null) {\n\t\t\t\t\tthis.done = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst loopAbort = abortResult<{ entries: FileInfo[]; done: boolean }>(context.abortSignal, this.path);\n\t\t\t\tif (loopAbort) return loopAbort;\n\t\t\t\tconst entryPath = resolve(this.path, entry.name);\n\t\t\t\tlet stats: Stats;\n\t\t\t\ttry {\n\t\t\t\t\tstats = await lstat(entryPath);\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// Removed between enumeration and lstat: not part of the listing any more.\n\t\t\t\t\tif (isNodeError(error) && error.code === \"ENOENT\") continue;\n\t\t\t\t\treturn err(toFileError(error, entryPath));\n\t\t\t\t}\n\t\t\t\tconst info = fileInfoFromStats(entryPath, stats);\n\t\t\t\tif (info.ok) entries.push(info.value);\n\t\t\t}\n\t\t\treturn ok({ entries, done: this.done });\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, this.path));\n\t\t}\n\t}\n\n\tasync close(_context: Context): Promise<void> {\n\t\tif (this.closed) return;\n\t\tthis.closed = true;\n\t\tawait this.dir.close().catch(() => undefined);\n\t}\n}\n\nfunction symlinkRefused(path: string, cause?: Error): FileError {\n\treturn new FileError(\"invalid\", \"Refusing to follow a symbolic link\", path, cause);\n}\n\nexport class NodeExecutionEnv implements ExecutionEnv {\n\t/** Every local environment sees the same files. */\n\treadonly id: string = \"node:local\";\n\tcwd: string;\n\tprivate shellPath?: string;\n\tprivate shellEnv?: NodeJS.ProcessEnv;\n\tprivate watchOptions: NodeWatchOptions;\n\tprivate activeChildPids = new Set<number>();\n\n\tconstructor(options: { cwd: string; shellPath?: string; shellEnv?: NodeJS.ProcessEnv; watch?: NodeWatchOptions }) {\n\t\tthis.cwd = options.cwd;\n\t\tthis.shellPath = options.shellPath;\n\t\tthis.shellEnv = options.shellEnv;\n\t\tthis.watchOptions = options.watch ?? {};\n\t}\n\n\tasync watch(\n\t\ttargets: readonly WatchTarget[],\n\t\tonChange: (change: WatchChange) => void,\n\t\tcontext: Context,\n\t): Promise<Result<FileWatcher, FileError>> {\n\t\tconst aborted = abortResult<FileWatcher>(context.abortSignal);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tconst watcher = await NodeFileWatcher.open(\n\t\t\t\ttargets,\n\t\t\t\t(path) => resolvePath(this.cwd, path),\n\t\t\t\tonChange,\n\t\t\t\tthis.watchOptions,\n\t\t\t);\n\t\t\tconst afterOpenAbort = abortResult<FileWatcher>(context.abortSignal);\n\t\t\tif (afterOpenAbort) {\n\t\t\t\tawait watcher.close(context);\n\t\t\t\treturn afterOpenAbort;\n\t\t\t}\n\t\t\treturn ok(watcher);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error));\n\t\t}\n\t}\n\n\tasync absolutePath(path: string, _context: Context): Promise<Result<string, FileError>> {\n\t\treturn ok(resolvePath(this.cwd, path));\n\t}\n\n\tasync joinPath(parts: string[], _context: Context): Promise<Result<string, FileError>> {\n\t\treturn ok(join(...parts));\n\t}\n\n\tasync exec(\n\t\tcommand: string | readonly string[],\n\t\toptions: ShellExecOptions | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<ShellExecResult, ExecutionError>> {\n\t\tconst signal = context.abortSignal;\n\t\tif (signal?.aborted) return err(new ExecutionError(\"aborted\", \"aborted\"));\n\t\tconst timeoutMsResult = resolveTimeoutMs(options?.timeout);\n\t\tif (!timeoutMsResult.ok) return err(timeoutMsResult.error);\n\t\tconst timeoutMs = timeoutMsResult.value;\n\n\t\tconst cwd = options?.cwd ? resolvePath(this.cwd, options.cwd) : this.cwd;\n\t\t// A string runs through the shell; an argv array runs its program directly, without shell parsing.\n\t\tlet program: string;\n\t\tlet args: readonly string[];\n\t\tlet stdinCommand: string | undefined;\n\t\tif (typeof command === \"string\") {\n\t\t\tconst shellConfig = await getShellConfig(this.shellPath);\n\t\t\tif (!shellConfig.ok) return shellConfig;\n\t\t\tconst commandFromStdin = shellConfig.value.commandTransport === \"stdin\";\n\t\t\tprogram = shellConfig.value.shell;\n\t\t\targs = commandFromStdin ? shellConfig.value.args : [...shellConfig.value.args, command];\n\t\t\tstdinCommand = commandFromStdin ? command : undefined;\n\t\t} else {\n\t\t\tconst [first, ...rest] = command;\n\t\t\tif (first === undefined) return err(new ExecutionError(\"spawn_error\", \"Empty argv: no program to run\"));\n\t\t\tprogram = first;\n\t\t\targs = rest;\n\t\t}\n\t\ttry {\n\t\t\tawait access(cwd, constants.F_OK);\n\t\t} catch (error) {\n\t\t\tconst cause = toError(error);\n\t\t\treturn err(\n\t\t\t\tnew ExecutionError(\n\t\t\t\t\t\"spawn_error\",\n\t\t\t\t\t`Working directory does not exist: ${cwd}\\nCannot execute bash commands.`,\n\t\t\t\t\tcause,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\treturn await new Promise((resolvePromise) => {\n\t\t\tlet settled = false;\n\t\t\tlet timedOut = false;\n\t\t\tlet callbackError: ExecutionError | undefined;\n\t\t\tlet spillError: ExecutionError | undefined;\n\t\t\tlet child: ReturnType<typeof spawn> | undefined;\n\t\t\tlet timeoutId: ReturnType<typeof setTimeout> | undefined;\n\t\t\tconst spillPrefix: SpillChunk[] = [];\n\t\t\tlet spillPath: string | undefined;\n\t\t\tconst spillQueue: SpillChunk[] = [];\n\t\t\tlet spillStart: Promise<void> | undefined;\n\t\t\tlet spillStream: WriteStream | undefined;\n\t\t\tlet spillBackpressured = false;\n\n\t\t\tconst onAbort = () => {\n\t\t\t\tif (child?.pid) killProcessTree(child.pid);\n\t\t\t};\n\t\t\tconst failCallback = (error: unknown) => {\n\t\t\t\tif (callbackError !== undefined) return;\n\t\t\t\tconst cause = toError(error);\n\t\t\t\tcallbackError = new ExecutionError(\"callback_error\", cause.message, cause);\n\t\t\t\tonAbort();\n\t\t\t};\n\t\t\t// One decoder per stream, so a character split across chunks of one stream survives interleaving.\n\t\t\tconst stdoutDecoder = new StreamDecoder();\n\t\t\tconst stderrDecoder = new StreamDecoder();\n\t\t\t// No output reaches the caller after exec() settled, for example from a descendant holding stdio open.\n\t\t\tconst emit = (text: string, stream: ShellOutputInfo[\"stream\"]): void => {\n\t\t\t\tif (settled || text === \"\" || options?.onOutput === undefined || callbackError !== undefined) return;\n\t\t\t\ttry {\n\t\t\t\t\toptions.onOutput(text, context, { stream });\n\t\t\t\t} catch (error) {\n\t\t\t\t\tfailCallback(error);\n\t\t\t\t}\n\t\t\t};\n\t\t\t// Output seen before the spill starts: counted against the thresholds and kept for the spill's prefix.\n\t\t\tlet seenBytes = 0;\n\t\t\tlet seenNewlines = 0;\n\n\t\t\tconst settle = (result: Result<ShellExecResult, ExecutionError>) => {\n\t\t\t\tif (settled) return;\n\t\t\t\tsettled = true;\n\t\t\t\tif (timeoutId) clearTimeout(timeoutId);\n\t\t\t\tif (signal) signal.removeEventListener(\"abort\", onAbort);\n\t\t\t\tif (child?.pid) this.activeChildPids.delete(child.pid);\n\t\t\t\tresolvePromise(result);\n\t\t\t};\n\t\t\tconst pauseOutput = () => {\n\t\t\t\tchild?.stdout?.pause();\n\t\t\t\tchild?.stderr?.pause();\n\t\t\t};\n\t\t\tconst resumeOutput = () => {\n\t\t\t\tif (callbackError || spillError || timedOut || signal?.aborted || spillBackpressured) return;\n\t\t\t\tchild?.stdout?.resume();\n\t\t\t\tchild?.stderr?.resume();\n\t\t\t};\n\t\t\tconst failSpill = (error: unknown) => {\n\t\t\t\tif (spillError !== undefined) return;\n\t\t\t\tconst cause = toError(error);\n\t\t\t\tspillError = new ExecutionError(\n\t\t\t\t\t\"unknown\",\n\t\t\t\t\t`Failed to preserve complete shell output: ${cause.message}`,\n\t\t\t\t\tcause,\n\t\t\t\t);\n\t\t\t\tspillBackpressured = false;\n\t\t\t\tonAbort();\n\t\t\t};\n\t\t\tconst writeSpill = (chunk: SpillChunk): void => {\n\t\t\t\tif (spillStream === undefined || chunk.length === 0) return;\n\t\t\t\tif (spillStream.write(chunk) || spillBackpressured) return;\n\t\t\t\tspillBackpressured = true;\n\t\t\t\tpauseOutput();\n\t\t\t\tspillStream.once(\"drain\", () => {\n\t\t\t\t\tspillBackpressured = false;\n\t\t\t\t\tresumeOutput();\n\t\t\t\t});\n\t\t\t};\n\t\t\tconst startSpill = (chunk: SpillChunk): void => {\n\t\t\t\tif (spillStream !== undefined) {\n\t\t\t\t\twriteSpill(chunk);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tspillQueue.push(chunk);\n\t\t\t\tif (spillStart !== undefined) return;\n\t\t\t\tpauseOutput();\n\t\t\t\tspillStart = (async () => {\n\t\t\t\t\tconst created = await this.createTempFile({ prefix: \"pi-output-\", suffix: \".log\" }, context);\n\t\t\t\t\tif (!created.ok) throw created.error;\n\t\t\t\t\tspillPath = created.value;\n\t\t\t\t\tspillStream = createWriteStream(spillPath, { flags: \"a\", highWaterMark: SPILL_HIGH_WATER_MARK });\n\t\t\t\t\tspillStream.on(\"error\", failSpill);\n\t\t\t\t\tfor (const queued of spillQueue) writeSpill(queued);\n\t\t\t\t\tspillQueue.length = 0;\n\t\t\t\t})()\n\t\t\t\t\t.catch(failSpill)\n\t\t\t\t\t.finally(resumeOutput);\n\t\t\t};\n\t\t\tconst finishSpill = async (): Promise<void> => {\n\t\t\t\tawait spillStart;\n\t\t\t\tconst stream = spillStream;\n\t\t\t\tif (stream === undefined || spillError !== undefined || stream.destroyed) return;\n\t\t\t\tawait new Promise<void>((resolveFinish) => {\n\t\t\t\t\tstream.once(\"error\", () => resolveFinish());\n\t\t\t\t\tstream.once(\"finish\", resolveFinish);\n\t\t\t\t\tstream.end();\n\t\t\t\t});\n\t\t\t};\n\n\t\t\ttry {\n\t\t\t\tchild = spawn(program, args, {\n\t\t\t\t\tcwd,\n\t\t\t\t\tdetached: process.platform !== \"win32\",\n\t\t\t\t\tenv: getShellEnv(this.shellEnv, options?.env, options?.inheritEnv),\n\t\t\t\t\tstdio: [stdinCommand === undefined ? \"ignore\" : \"pipe\", \"pipe\", \"pipe\"],\n\t\t\t\t\twindowsHide: true,\n\t\t\t\t});\n\t\t\t\tif (child.pid) this.activeChildPids.add(child.pid);\n\t\t\t\tif (stdinCommand !== undefined) {\n\t\t\t\t\tchild.stdin?.on(\"error\", () => {});\n\t\t\t\t\tchild.stdin?.end(stdinCommand);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconst cause = toError(error);\n\t\t\t\tsettle(err(new ExecutionError(\"spawn_error\", cause.message, cause)));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttimeoutId =\n\t\t\t\ttimeoutMs === undefined\n\t\t\t\t\t? undefined\n\t\t\t\t\t: setTimeout(() => {\n\t\t\t\t\t\t\ttimedOut = true;\n\t\t\t\t\t\t\tonAbort();\n\t\t\t\t\t\t}, timeoutMs);\n\n\t\t\tif (signal) {\n\t\t\t\tif (signal.aborted) onAbort();\n\t\t\t\telse signal.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\t}\n\n\t\t\tconst feed = (source: ShellOutputInfo[\"stream\"], decoder: StreamDecoder) => (chunk: Uint8Array) => {\n\t\t\t\temit(decoder.decode(chunk), source);\n\t\t\t\tconst spill = options?.spill;\n\t\t\t\tif (spill === undefined || chunk.length === 0) return;\n\t\t\t\tif (spillStart !== undefined) {\n\t\t\t\t\tstartSpill(chunk);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tseenBytes += chunk.length;\n\t\t\t\tfor (let index = chunk.indexOf(0x0a); index !== -1; index = chunk.indexOf(0x0a, index + 1)) seenNewlines++;\n\t\t\t\tconst lines = seenNewlines + (chunk[chunk.length - 1] === 0x0a ? 0 : 1);\n\t\t\t\tif (seenBytes <= spill.afterBytes && lines <= spill.afterLines) {\n\t\t\t\t\tspillPrefix.push(chunk);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfor (const prefix of spillPrefix) startSpill(prefix);\n\t\t\t\tspillPrefix.length = 0;\n\t\t\t\tstartSpill(chunk);\n\t\t\t};\n\t\t\tchild.stdout?.on(\"data\", feed(\"stdout\", stdoutDecoder));\n\t\t\tchild.stderr?.on(\"data\", feed(\"stderr\", stderrDecoder));\n\n\t\t\tvoid waitForChildProcess(\n\t\t\t\tchild,\n\t\t\t\t() =>\n\t\t\t\t\tspillError === undefined &&\n\t\t\t\t\tspillStart !== undefined &&\n\t\t\t\t\t(spillStream === undefined || spillBackpressured),\n\t\t\t).then(\n\t\t\t\tasync ({ code, signal: exitSignal }) => {\n\t\t\t\t\tawait finishSpill();\n\t\t\t\t\temit(stdoutDecoder.decode(), \"stdout\");\n\t\t\t\t\temit(stderrDecoder.decode(), \"stderr\");\n\t\t\t\t\tif (callbackError) {\n\t\t\t\t\t\tsettle(err(callbackError));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst interrupted = timedOut\n\t\t\t\t\t\t? new ExecutionError(\"timeout\", `timeout:${options?.timeout}`)\n\t\t\t\t\t\t: signal?.aborted\n\t\t\t\t\t\t\t? new ExecutionError(\"aborted\", \"aborted\")\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\tif (interrupted !== undefined) {\n\t\t\t\t\t\tif (spillPath !== undefined) interrupted.spillPath = spillPath;\n\t\t\t\t\t\tsettle(err(interrupted));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (spillError) {\n\t\t\t\t\t\tsettle(err(spillError));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// A process killed by a signal (e.g. OOM killer) has no exit code; map it\n\t\t\t\t\t// to the conventional 128 + signal number so callers do not mistake it\n\t\t\t\t\t// for a successful exit.\n\t\t\t\t\tconst exitCode = code ?? (exitSignal ? 128 + (osConstants.signals[exitSignal] ?? 0) : 1);\n\t\t\t\t\tsettle(ok({ exitCode, ...(spillPath === undefined ? {} : { spillPath }) }));\n\t\t\t\t},\n\t\t\t\t(error: Error) => settle(err(new ExecutionError(\"spawn_error\", error.message, error))),\n\t\t\t);\n\t\t});\n\t}\n\n\tasync openTextLineReader(path: string, context: Context): Promise<Result<TextLineReader, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<TextLineReader>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tconst file = await openFile(resolved, \"r\");\n\t\t\tconst afterOpenAbort = abortResult<TextLineReader>(context.abortSignal, resolved);\n\t\t\tif (afterOpenAbort) {\n\t\t\t\tawait file.close().catch(() => undefined);\n\t\t\t\treturn afterOpenAbort;\n\t\t\t}\n\t\t\treturn ok(new NodeTextLineReader(file, resolved));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync readTextFile(path: string, context: Context): Promise<Result<string, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<string>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\treturn ok(await readFile(resolved, { encoding: \"utf8\", signal }));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync readTextLines(\n\t\tpath: string,\n\t\toptions: { maxLines?: number } | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<string[], FileError>> {\n\t\tif (options?.maxLines !== undefined && options.maxLines <= 0) return ok([]);\n\t\tconst opened = await this.openTextLineReader(path, context);\n\t\tif (!opened.ok) return opened;\n\t\tconst lines: string[] = [];\n\t\ttry {\n\t\t\twhile (options?.maxLines === undefined || lines.length < options.maxLines) {\n\t\t\t\tconst line = await opened.value.readLine(context);\n\t\t\t\tif (!line.ok) return line;\n\t\t\t\tif (line.value === undefined) break;\n\t\t\t\tlines.push(line.value.text);\n\t\t\t}\n\t\t\treturn ok(lines);\n\t\t} finally {\n\t\t\tawait opened.value.close(context);\n\t\t}\n\t}\n\n\tasync readBinaryFile(path: string, context: Context): Promise<Result<Uint8Array, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<Uint8Array>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\treturn ok(await readFile(resolved, { signal }));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync openBinaryReader(\n\t\tpath: string,\n\t\toptions: { noFollow?: boolean } | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<BinaryReader, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<BinaryReader>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\tconst noFollow = options?.noFollow === true;\n\t\tlet file: FileHandle | undefined;\n\t\ttry {\n\t\t\tlet flags = constants.O_RDONLY;\n\t\t\tif (process.platform === \"win32\") {\n\t\t\t\t// Windows has no O_NOFOLLOW; check the final component before opening (not race-free).\n\t\t\t\tif (noFollow && (await lstat(resolved)).isSymbolicLink()) return err(symlinkRefused(resolved));\n\t\t\t} else {\n\t\t\t\t// Nonblocking, so opening a FIFO does not wait for a writer.\n\t\t\t\tflags |= constants.O_NONBLOCK;\n\t\t\t\tif (noFollow) flags |= constants.O_NOFOLLOW;\n\t\t\t}\n\t\t\tfile = await openFile(resolved, flags);\n\t\t\tconst stats = await file.stat();\n\t\t\tif (!stats.isFile()) {\n\t\t\t\tawait file.close().catch(() => undefined);\n\t\t\t\treturn err(\n\t\t\t\t\tstats.isDirectory()\n\t\t\t\t\t\t? new FileError(\"is_directory\", \"EISDIR: illegal operation on a directory, read\", resolved)\n\t\t\t\t\t\t: new FileError(\"invalid\", \"Not a regular file\", resolved),\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst afterOpenAbort = abortResult<BinaryReader>(context.abortSignal, resolved);\n\t\t\tif (afterOpenAbort) {\n\t\t\t\tawait file.close().catch(() => undefined);\n\t\t\t\treturn afterOpenAbort;\n\t\t\t}\n\t\t\treturn ok(new NodeBinaryReader(file, resolved));\n\t\t} catch (error) {\n\t\t\tawait file?.close().catch(() => undefined);\n\t\t\t// O_NOFOLLOW reports a final-component symlink as ELOOP (EMLINK on some BSDs).\n\t\t\tif (noFollow && isNodeError(error) && (error.code === \"ELOOP\" || error.code === \"EMLINK\")) {\n\t\t\t\treturn err(symlinkRefused(resolved, toError(error)));\n\t\t\t}\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync writeFile(path: string, content: string | Uint8Array, context: Context): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<void>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tawait mkdir(resolve(resolved, \"..\"), { recursive: true });\n\t\t\tconst afterMkdirAbort = abortResult<void>(signal, resolved);\n\t\t\tif (afterMkdirAbort) return afterMkdirAbort;\n\t\t\tawait writeFile(resolved, content, { signal });\n\t\t\treturn ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync appendFile(path: string, content: string | Uint8Array, context: Context): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<void>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tawait mkdir(resolve(resolved, \"..\"), { recursive: true });\n\t\t\tconst afterMkdirAbort = abortResult<void>(signal, resolved);\n\t\t\tif (afterMkdirAbort) return afterMkdirAbort;\n\t\t\tawait appendFile(resolved, content);\n\t\t\tconst afterAppendAbort = abortResult<void>(signal, resolved);\n\t\t\treturn afterAppendAbort ?? ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync truncateFile(path: string, size: number, context: Context): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<void>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\tif (!Number.isSafeInteger(size) || size < 0) {\n\t\t\treturn err(new FileError(\"invalid\", \"File size must be a non-negative safe integer\", resolved));\n\t\t}\n\t\tlet file: Awaited<ReturnType<typeof openFile>> | undefined;\n\t\ttry {\n\t\t\tfile = await openFile(resolved, \"r+\");\n\t\t\tawait file.truncate(size);\n\t\t\tconst afterTruncateAbort = abortResult<void>(signal, resolved);\n\t\t\treturn afterTruncateAbort ?? ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t} finally {\n\t\t\tawait file?.close().catch(() => undefined);\n\t\t}\n\t}\n\n\tasync flushFile(path: string, context: Context): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<void>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\tlet file: Awaited<ReturnType<typeof openFile>> | undefined;\n\t\ttry {\n\t\t\tfile = await openFile(resolved, \"r+\");\n\t\t\t// POSIX refuses to open a directory for writing; Windows opens it, so check explicitly.\n\t\t\tif ((await file.stat()).isDirectory()) return err(new FileError(\"is_directory\", \"Is a directory\", resolved));\n\t\t\tawait file.sync();\n\t\t\tconst afterSyncAbort = abortResult<void>(signal, resolved);\n\t\t\treturn afterSyncAbort ?? ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t} finally {\n\t\t\tawait file?.close().catch(() => undefined);\n\t\t}\n\t}\n\n\tasync renameFile(sourcePath: string, destinationPath: string, context: Context): Promise<Result<void, FileError>> {\n\t\tconst source = resolvePath(this.cwd, sourcePath);\n\t\tconst destination = resolvePath(this.cwd, destinationPath);\n\t\tconst aborted = abortResult<void>(context.abortSignal, destination);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tawait rename(source, destination);\n\t\t\treturn ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, source));\n\t\t}\n\t}\n\n\tasync fileInfo(path: string, context: Context): Promise<Result<FileInfo, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<FileInfo>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\treturn fileInfoFromStats(resolved, await lstat(resolved));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync listDir(path: string, context: Context): Promise<Result<FileInfo[], FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst signal = context.abortSignal;\n\t\tconst aborted = abortResult<FileInfo[]>(signal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tconst entries = await readdir(resolved, { withFileTypes: true });\n\t\t\tconst infos: FileInfo[] = [];\n\t\t\tfor (const entry of entries) {\n\t\t\t\tconst loopAbort = abortResult<FileInfo[]>(signal, resolved);\n\t\t\t\tif (loopAbort) return loopAbort;\n\t\t\t\tconst entryPath = resolve(resolved, entry.name);\n\t\t\t\ttry {\n\t\t\t\t\tconst info = fileInfoFromStats(entryPath, await lstat(entryPath));\n\t\t\t\t\tif (info.ok) infos.push(info.value);\n\t\t\t\t} catch (error) {\n\t\t\t\t\treturn err(toFileError(error, entryPath));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ok(infos);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync openDirReader(path: string, context: Context): Promise<Result<DirReader, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<DirReader>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tconst dir = await opendir(resolved);\n\t\t\tconst afterOpenAbort = abortResult<DirReader>(context.abortSignal, resolved);\n\t\t\tif (afterOpenAbort) {\n\t\t\t\tawait dir.close().catch(() => undefined);\n\t\t\t\treturn afterOpenAbort;\n\t\t\t}\n\t\t\treturn ok(new NodeDirReader(dir, resolved));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync canonicalPath(path: string, context: Context): Promise<Result<string, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<string>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\treturn ok(await realpath(resolved));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync exists(path: string, context: Context): Promise<Result<boolean, FileError>> {\n\t\tconst result = await this.fileInfo(path, context);\n\t\tif (result.ok) return ok(true);\n\t\tif (result.error.code === \"not_found\") return ok(false);\n\t\treturn err(result.error);\n\t}\n\n\tasync createDir(\n\t\tpath: string,\n\t\toptions: { recursive?: boolean } | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<void>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tawait mkdir(resolved, { recursive: options?.recursive ?? true });\n\t\t\treturn ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync remove(\n\t\tpath: string,\n\t\toptions: { recursive?: boolean; force?: boolean } | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<void, FileError>> {\n\t\tconst resolved = resolvePath(this.cwd, path);\n\t\tconst aborted = abortResult<void>(context.abortSignal, resolved);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tawait rm(resolved, { recursive: options?.recursive ?? false, force: options?.force ?? false });\n\t\t\treturn ok(undefined);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, resolved));\n\t\t}\n\t}\n\n\tasync createTempDir(prefix: string | undefined, context: Context): Promise<Result<string, FileError>> {\n\t\tconst aborted = abortResult<string>(context.abortSignal);\n\t\tif (aborted) return aborted;\n\t\ttry {\n\t\t\tprefix ??= \"tmp-\";\n\t\t\treturn ok(await mkdtemp(join(tmpdir(), prefix)));\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error));\n\t\t}\n\t}\n\n\tasync createTempFile(\n\t\toptions: { prefix?: string; suffix?: string } | undefined,\n\t\tcontext: Context,\n\t): Promise<Result<string, FileError>> {\n\t\tconst dir = await this.createTempDir(\"tmp-\", context);\n\t\tif (!dir.ok) return dir;\n\t\tconst filePath = join(dir.value, `${options?.prefix ?? \"\"}${randomUUID()}${options?.suffix ?? \"\"}`);\n\t\ttry {\n\t\t\tawait writeFile(filePath, \"\");\n\t\t\treturn ok(filePath);\n\t\t} catch (error) {\n\t\t\treturn err(toFileError(error, filePath));\n\t\t}\n\t}\n\n\tasync cleanup(_context: Context): Promise<void> {\n\t\tfor (const pid of this.activeChildPids) killProcessTree(pid);\n\t\tthis.activeChildPids.clear();\n\t}\n}\nexport type { NodeWatchOptions } from \"./node-watch.ts\";\n"]}
@@ -1,11 +1,28 @@
1
1
  import type { ConversationId } from "./types.ts";
2
+ /**
3
+ * The message of a thrown value, without throwing itself: `String()` throws for values such as `Object.create(null)`,
4
+ * and code that formats an error must not fail for the value it formats.
5
+ */
6
+ export declare function errorMessage(error: unknown): string;
2
7
  /** A transaction read a table after its first table write. Read every required row before writing. */
3
8
  export declare class ReadAfterWrite extends Error {
4
9
  constructor(method: string);
5
10
  }
6
- /** Storage rejected a batch before any durable effect; the owning Session may continue safely. */
7
- export declare class StorageRejected extends Error {
8
- constructor(message: string, options?: ErrorOptions);
11
+ /**
12
+ * A Storage read rejected an invalid request, such as an unknown conversation or a cursor from another scan, with no
13
+ * durable effect. Unlike any other error a Storage throws, it fails only that read, not the Session; from `commit()` it is
14
+ * fatal like any other.
15
+ */
16
+ export declare class StorageRequestError extends Error {
17
+ constructor(message: string);
18
+ }
19
+ /**
20
+ * The Session failed, so nothing runs or commits any more. It fails when a Storage method throws, a commit cannot be
21
+ * adopted, or the Harness's own bookkeeping throws (a scheduler commit, an internal commit listener, a registry whose
22
+ * `snapshot()` throws). `cause` is that first error. Reopen the Session; reopening recovers from what was committed.
23
+ */
24
+ export declare class SessionFailed extends Error {
25
+ constructor(cause: unknown);
9
26
  }
10
27
  /** A submission reached a busy conversation and was not admitted. */
11
28
  export declare class ConversationBusy extends Error {
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,sGAAsG;AACtG,qBAAa,cAAe,SAAQ,KAAK;IACxC,YAAY,MAAM,EAAE,MAAM,EAGzB;CACD;AAED,kGAAkG;AAClG,qBAAa,eAAgB,SAAQ,KAAK;IACzC,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAGlD;CACD;AAED,qEAAqE;AACrE,qBAAa,gBAAiB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAExC,YAAY,cAAc,EAAE,cAAc,EAIzC;CACD"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOnD;AAED,sGAAsG;AACtG,qBAAa,cAAe,SAAQ,KAAK;IACxC,YAAY,MAAM,EAAE,MAAM,EAGzB;CACD;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC7C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACD;AAED;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACvC,YAAY,KAAK,EAAE,OAAO,EAGzB;CACD;AAED,qEAAqE;AACrE,qBAAa,gBAAiB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAExC,YAAY,cAAc,EAAE,cAAc,EAIzC;CACD"}
@@ -1,3 +1,17 @@
1
+ /**
2
+ * The message of a thrown value, without throwing itself: `String()` throws for values such as `Object.create(null)`,
3
+ * and code that formats an error must not fail for the value it formats.
4
+ */
5
+ export function errorMessage(error) {
6
+ if (error instanceof Error)
7
+ return error.message;
8
+ try {
9
+ return String(error);
10
+ }
11
+ catch {
12
+ return Object.prototype.toString.call(error);
13
+ }
14
+ }
1
15
  /** A transaction read a table after its first table write. Read every required row before writing. */
2
16
  export class ReadAfterWrite extends Error {
3
17
  constructor(method) {
@@ -5,11 +19,26 @@ export class ReadAfterWrite extends Error {
5
19
  this.name = "ReadAfterWrite";
6
20
  }
7
21
  }
8
- /** Storage rejected a batch before any durable effect; the owning Session may continue safely. */
9
- export class StorageRejected extends Error {
10
- constructor(message, options) {
11
- super(message, options);
12
- this.name = "StorageRejected";
22
+ /**
23
+ * A Storage read rejected an invalid request, such as an unknown conversation or a cursor from another scan, with no
24
+ * durable effect. Unlike any other error a Storage throws, it fails only that read, not the Session; from `commit()` it is
25
+ * fatal like any other.
26
+ */
27
+ export class StorageRequestError extends Error {
28
+ constructor(message) {
29
+ super(message);
30
+ this.name = "StorageRequestError";
31
+ }
32
+ }
33
+ /**
34
+ * The Session failed, so nothing runs or commits any more. It fails when a Storage method throws, a commit cannot be
35
+ * adopted, or the Harness's own bookkeeping throws (a scheduler commit, an internal commit listener, a registry whose
36
+ * `snapshot()` throws). `cause` is that first error. Reopen the Session; reopening recovers from what was committed.
37
+ */
38
+ export class SessionFailed extends Error {
39
+ constructor(cause) {
40
+ super("Session failed after a storage error; close and reopen it", { cause });
41
+ this.name = "SessionFailed";
13
42
  }
14
43
  }
15
44
  /** A submission reached a busy conversation and was not admitted. */
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAEA,sGAAsG;AACtG,MAAM,OAAO,cAAe,SAAQ,KAAK;IACxC,YAAY,MAAc;QACzB,KAAK,CAAC,MAAM,MAAM,mDAAmD,CAAC,CAAC;QACvE,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC9B,CAAC;CACD;AAED,kGAAkG;AAClG,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACzC,YAAY,OAAe,EAAE,OAAsB;QAClD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAC/B,CAAC;CACD;AAED,qEAAqE;AACrE,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACjC,cAAc,CAAiB;IAExC,YAAY,cAA8B;QACzC,KAAK,CAAC,gBAAgB,cAAc,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACtC,CAAC;CACD","sourcesContent":["import type { ConversationId } from \"./types.ts\";\n\n/** A transaction read a table after its first table write. Read every required row before writing. */\nexport class ReadAfterWrite extends Error {\n\tconstructor(method: string) {\n\t\tsuper(`Tx.${method}() cannot read tables after the first table write`);\n\t\tthis.name = \"ReadAfterWrite\";\n\t}\n}\n\n/** Storage rejected a batch before any durable effect; the owning Session may continue safely. */\nexport class StorageRejected extends Error {\n\tconstructor(message: string, options?: ErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.name = \"StorageRejected\";\n\t}\n}\n\n/** A submission reached a busy conversation and was not admitted. */\nexport class ConversationBusy extends Error {\n\treadonly conversationId: ConversationId;\n\n\tconstructor(conversationId: ConversationId) {\n\t\tsuper(`Conversation ${conversationId} is busy`);\n\t\tthis.name = \"ConversationBusy\";\n\t\tthis.conversationId = conversationId;\n\t}\n}\n"]}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IAC1C,IAAI,KAAK,YAAY,KAAK;QAAE,OAAO,KAAK,CAAC,OAAO,CAAC;IACjD,IAAI,CAAC;QACJ,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;AACF,CAAC;AAED,sGAAsG;AACtG,MAAM,OAAO,cAAe,SAAQ,KAAK;IACxC,YAAY,MAAc;QACzB,KAAK,CAAC,MAAM,MAAM,mDAAmD,CAAC,CAAC;QACvE,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC9B,CAAC;CACD;AAED;;;;GAIG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC7C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACnC,CAAC;CACD;AAED;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IACvC,YAAY,KAAc;QACzB,KAAK,CAAC,2DAA2D,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC9E,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC7B,CAAC;CACD;AAED,qEAAqE;AACrE,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACjC,cAAc,CAAiB;IAExC,YAAY,cAA8B;QACzC,KAAK,CAAC,gBAAgB,cAAc,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACtC,CAAC;CACD","sourcesContent":["import type { ConversationId } from \"./types.ts\";\n\n/**\n * The message of a thrown value, without throwing itself: `String()` throws for values such as `Object.create(null)`,\n * and code that formats an error must not fail for the value it formats.\n */\nexport function errorMessage(error: unknown): string {\n\tif (error instanceof Error) return error.message;\n\ttry {\n\t\treturn String(error);\n\t} catch {\n\t\treturn Object.prototype.toString.call(error);\n\t}\n}\n\n/** A transaction read a table after its first table write. Read every required row before writing. */\nexport class ReadAfterWrite extends Error {\n\tconstructor(method: string) {\n\t\tsuper(`Tx.${method}() cannot read tables after the first table write`);\n\t\tthis.name = \"ReadAfterWrite\";\n\t}\n}\n\n/**\n * A Storage read rejected an invalid request, such as an unknown conversation or a cursor from another scan, with no\n * durable effect. Unlike any other error a Storage throws, it fails only that read, not the Session; from `commit()` it is\n * fatal like any other.\n */\nexport class StorageRequestError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"StorageRequestError\";\n\t}\n}\n\n/**\n * The Session failed, so nothing runs or commits any more. It fails when a Storage method throws, a commit cannot be\n * adopted, or the Harness's own bookkeeping throws (a scheduler commit, an internal commit listener, a registry whose\n * `snapshot()` throws). `cause` is that first error. Reopen the Session; reopening recovers from what was committed.\n */\nexport class SessionFailed extends Error {\n\tconstructor(cause: unknown) {\n\t\tsuper(\"Session failed after a storage error; close and reopen it\", { cause });\n\t\tthis.name = \"SessionFailed\";\n\t}\n}\n\n/** A submission reached a busy conversation and was not admitted. */\nexport class ConversationBusy extends Error {\n\treadonly conversationId: ConversationId;\n\n\tconstructor(conversationId: ConversationId) {\n\t\tsuper(`Conversation ${conversationId} is busy`);\n\t\tthis.name = \"ConversationBusy\";\n\t\tthis.conversationId = conversationId;\n\t}\n}\n"]}
@@ -1,7 +1,8 @@
1
1
  import type { ConversationId, ConversationRecord, Tx } from "../types.ts";
2
- import type { Agent, AgentChange, AgentState, CompactionPolicy, ConversationRetryPolicy, HarnessSettings, RegistrySnapshot, Settings, ToolRegistration } from "./types.ts";
2
+ import type { Agent, AgentChange, AgentState, CompactionPolicy, ConversationRetryPolicy, HarnessSettings, ProgressPolicy, RegistrySnapshot, Settings, ToolRegistration } from "./types.ts";
3
3
  export declare const DEFAULT_RETRY_POLICY: ConversationRetryPolicy;
4
4
  export declare const DEFAULT_COMPACTION_POLICY: CompactionPolicy;
5
+ export declare const DEFAULT_PROGRESS_POLICY: ProgressPolicy;
5
6
  /** The reserved section key of the agent's `instructions`. */
6
7
  export declare const INSTRUCTIONS_KEY = "instructions";
7
8
  /** Built-in agent document; rewindable so forks start from the agent at their fork entry. */
@@ -11,8 +12,11 @@ export declare function resolveSettings(settings: HarnessSettings | undefined):
11
12
  /** Apply one change to `pi.agent`: a given field replaces the stored one, `null` clears it, `undefined` changes nothing. */
12
13
  export declare function configure(tx: Tx, conversationId: ConversationId, change: AgentChange): Promise<void>;
13
14
  /**
14
- * `addTools` of a tool round: an array gets each name it lacks appended, `{ remove }` loses the names, and unset tools
15
- * already offer every tool, so nothing is written.
15
+ * `addTools` of a tool round, applied to `tools` and `modelTools`, so the next request offers the tools: an array gets
16
+ * each name it lacks appended, and `{ remove }` loses the names. An unset `tools` already enables every tool, so nothing
17
+ * is written for it. An unset or object `modelTools` also gets each name appended to its `add`, which loads deferred
18
+ * tools and has no effect for others. By name, without the registry: a tool that is not registered now, such as one of
19
+ * an MCP server that is reconnecting, is offered once it is again.
16
20
  */
17
21
  export declare function addTools(tx: Tx, conversationId: ConversationId, added: readonly string[]): Promise<void>;
18
22
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":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