@code-yeongyu/senpi 2026.9.11 → 2026.9.12-3

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 (1582) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +1 -1
  3. package/dist/bun/cli.d.ts +2 -1
  4. package/dist/bun/cli.d.ts.map +1 -1
  5. package/dist/bun/cli.js +5 -8
  6. package/dist/bun/cli.js.map +1 -1
  7. package/dist/bun/runtime-setup.d.ts +2 -0
  8. package/dist/bun/runtime-setup.d.ts.map +1 -0
  9. package/dist/bun/runtime-setup.js +9 -0
  10. package/dist/bun/runtime-setup.js.map +1 -0
  11. package/dist/bun/sandbox-env-setup.d.ts +2 -0
  12. package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
  13. package/dist/bun/sandbox-env-setup.js +4 -0
  14. package/dist/bun/sandbox-env-setup.js.map +1 -0
  15. package/dist/cli/config-selector.d.ts.map +1 -1
  16. package/dist/cli/config-selector.js +2 -1
  17. package/dist/cli/config-selector.js.map +1 -1
  18. package/dist/cli/setup.d.ts +2 -0
  19. package/dist/cli/setup.d.ts.map +1 -0
  20. package/dist/cli/setup.js +12 -0
  21. package/dist/cli/setup.js.map +1 -0
  22. package/dist/cli.js +3 -0
  23. package/dist/cli.js.map +1 -1
  24. package/dist/client/index.d.ts +1 -2
  25. package/dist/client/index.d.ts.map +1 -1
  26. package/dist/client/index.js +1 -2
  27. package/dist/client/index.js.map +1 -1
  28. package/dist/config.d.ts +1 -0
  29. package/dist/config.d.ts.map +1 -1
  30. package/dist/config.js +1 -0
  31. package/dist/config.js.map +1 -1
  32. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  33. package/dist/core/agent-session-runtime.js +18 -6
  34. package/dist/core/agent-session-runtime.js.map +1 -1
  35. package/dist/core/agent-session.d.ts +54 -17
  36. package/dist/core/agent-session.d.ts.map +1 -1
  37. package/dist/core/agent-session.js +153 -157
  38. package/dist/core/agent-session.js.map +1 -1
  39. package/dist/core/compaction/branch-summarization.d.ts +1 -1
  40. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  41. package/dist/core/compaction/branch-summarization.js +6 -4
  42. package/dist/core/compaction/branch-summarization.js.map +1 -1
  43. package/dist/core/compaction-settings-access.d.ts +18 -2
  44. package/dist/core/compaction-settings-access.d.ts.map +1 -1
  45. package/dist/core/compaction-settings-access.js +35 -4
  46. package/dist/core/compaction-settings-access.js.map +1 -1
  47. package/dist/core/compaction-settings-resolver.d.ts +2 -2
  48. package/dist/core/compaction-settings-resolver.d.ts.map +1 -1
  49. package/dist/core/compaction-settings-resolver.js +6 -3
  50. package/dist/core/compaction-settings-resolver.js.map +1 -1
  51. package/dist/core/cursor-history-admission.d.ts +50 -0
  52. package/dist/core/cursor-history-admission.d.ts.map +1 -0
  53. package/dist/core/cursor-history-admission.js +130 -0
  54. package/dist/core/cursor-history-admission.js.map +1 -0
  55. package/dist/core/extensions/builtin/ask-user/extension.d.ts.map +1 -1
  56. package/dist/core/extensions/builtin/ask-user/extension.js +11 -0
  57. package/dist/core/extensions/builtin/ask-user/extension.js.map +1 -1
  58. package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -1
  59. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +2 -1
  60. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -1
  61. package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
  62. package/dist/core/extensions/builtin/prompt-preset/presets.js +7 -1
  63. package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
  64. package/dist/core/extensions/loader.d.ts.map +1 -1
  65. package/dist/core/extensions/loader.js +4 -2
  66. package/dist/core/extensions/loader.js.map +1 -1
  67. package/dist/core/keybindings.d.ts +10 -0
  68. package/dist/core/keybindings.d.ts.map +1 -1
  69. package/dist/core/keybindings.js +8 -0
  70. package/dist/core/keybindings.js.map +1 -1
  71. package/dist/core/messages.d.ts +1 -1
  72. package/dist/core/messages.d.ts.map +1 -1
  73. package/dist/core/messages.js.map +1 -1
  74. package/dist/core/model-registry.d.ts +5 -1
  75. package/dist/core/model-registry.d.ts.map +1 -1
  76. package/dist/core/model-registry.js +8 -0
  77. package/dist/core/model-registry.js.map +1 -1
  78. package/dist/core/model-resolver.d.ts.map +1 -1
  79. package/dist/core/model-resolver.js +2 -0
  80. package/dist/core/model-resolver.js.map +1 -1
  81. package/dist/core/model-runtime.d.ts +1 -0
  82. package/dist/core/model-runtime.d.ts.map +1 -1
  83. package/dist/core/model-runtime.js +5 -2
  84. package/dist/core/model-runtime.js.map +1 -1
  85. package/dist/core/retry-fallback/settings.d.ts +2 -0
  86. package/dist/core/retry-fallback/settings.d.ts.map +1 -1
  87. package/dist/core/retry-fallback/settings.js.map +1 -1
  88. package/dist/core/session-manager.d.ts +5 -2
  89. package/dist/core/session-manager.d.ts.map +1 -1
  90. package/dist/core/session-manager.js +68 -19
  91. package/dist/core/session-manager.js.map +1 -1
  92. package/dist/core/session-write-reservation.d.ts +9 -0
  93. package/dist/core/session-write-reservation.d.ts.map +1 -1
  94. package/dist/core/session-write-reservation.js +33 -0
  95. package/dist/core/session-write-reservation.js.map +1 -1
  96. package/dist/core/settings-manager.d.ts +12 -5
  97. package/dist/core/settings-manager.d.ts.map +1 -1
  98. package/dist/core/settings-manager.js +18 -6
  99. package/dist/core/settings-manager.js.map +1 -1
  100. package/dist/core/settings-public-types.d.ts +1 -1
  101. package/dist/core/settings-public-types.d.ts.map +1 -1
  102. package/dist/core/settings-public-types.js.map +1 -1
  103. package/dist/core/skills.d.ts +1 -1
  104. package/dist/core/skills.d.ts.map +1 -1
  105. package/dist/core/skills.js +6 -2
  106. package/dist/core/skills.js.map +1 -1
  107. package/dist/core/system-prompt.d.ts.map +1 -1
  108. package/dist/core/system-prompt.js +8 -9
  109. package/dist/core/system-prompt.js.map +1 -1
  110. package/dist/core/tools/bash.d.ts.map +1 -1
  111. package/dist/core/tools/bash.js +3 -142
  112. package/dist/core/tools/bash.js.map +1 -1
  113. package/dist/core/tools/edit.d.ts +1 -12
  114. package/dist/core/tools/edit.d.ts.map +1 -1
  115. package/dist/core/tools/edit.js +4 -168
  116. package/dist/core/tools/edit.js.map +1 -1
  117. package/dist/core/tools/find.d.ts.map +1 -1
  118. package/dist/core/tools/find.js +2 -53
  119. package/dist/core/tools/find.js.map +1 -1
  120. package/dist/core/tools/grep.d.ts.map +1 -1
  121. package/dist/core/tools/grep.js +2 -58
  122. package/dist/core/tools/grep.js.map +1 -1
  123. package/dist/core/tools/ls.d.ts.map +1 -1
  124. package/dist/core/tools/ls.js +2 -47
  125. package/dist/core/tools/ls.js.map +1 -1
  126. package/dist/core/tools/read.d.ts +1 -4
  127. package/dist/core/tools/read.d.ts.map +1 -1
  128. package/dist/core/tools/read.js +4 -141
  129. package/dist/core/tools/read.js.map +1 -1
  130. package/dist/core/tools/renderers/bash.d.ts +12 -0
  131. package/dist/core/tools/renderers/bash.d.ts.map +1 -0
  132. package/dist/core/tools/renderers/bash.js +156 -0
  133. package/dist/core/tools/renderers/bash.js.map +1 -0
  134. package/dist/core/tools/renderers/edit.d.ts +23 -0
  135. package/dist/core/tools/renderers/edit.d.ts.map +1 -0
  136. package/dist/core/tools/renderers/edit.js +172 -0
  137. package/dist/core/tools/renderers/edit.js.map +1 -0
  138. package/dist/core/tools/renderers/find.d.ts +10 -0
  139. package/dist/core/tools/renderers/find.d.ts.map +1 -0
  140. package/dist/core/tools/renderers/find.js +64 -0
  141. package/dist/core/tools/renderers/find.js.map +1 -0
  142. package/dist/core/tools/renderers/grep.d.ts +10 -0
  143. package/dist/core/tools/renderers/grep.d.ts.map +1 -0
  144. package/dist/core/tools/renderers/grep.js +69 -0
  145. package/dist/core/tools/renderers/grep.js.map +1 -0
  146. package/dist/core/tools/renderers/index.d.ts +28 -0
  147. package/dist/core/tools/renderers/index.d.ts.map +1 -0
  148. package/dist/core/tools/renderers/index.js +47 -0
  149. package/dist/core/tools/renderers/index.js.map +1 -0
  150. package/dist/core/tools/renderers/ls.d.ts +10 -0
  151. package/dist/core/tools/renderers/ls.d.ts.map +1 -0
  152. package/dist/core/tools/renderers/ls.js +58 -0
  153. package/dist/core/tools/renderers/ls.js.map +1 -0
  154. package/dist/core/tools/renderers/read.d.ts +19 -0
  155. package/dist/core/tools/renderers/read.d.ts.map +1 -0
  156. package/dist/core/tools/renderers/read.js +149 -0
  157. package/dist/core/tools/renderers/read.js.map +1 -0
  158. package/dist/core/tools/renderers/write.d.ts +10 -0
  159. package/dist/core/tools/renderers/write.d.ts.map +1 -0
  160. package/dist/core/tools/renderers/write.js +162 -0
  161. package/dist/core/tools/renderers/write.js.map +1 -0
  162. package/dist/core/tools/write.d.ts.map +1 -1
  163. package/dist/core/tools/write.js +4 -153
  164. package/dist/core/tools/write.js.map +1 -1
  165. package/dist/index.d.ts +2 -2
  166. package/dist/index.d.ts.map +1 -1
  167. package/dist/index.js.map +1 -1
  168. package/dist/migrations.d.ts.map +1 -1
  169. package/dist/migrations.js +2 -2
  170. package/dist/migrations.js.map +1 -1
  171. package/dist/modes/app-server/threads/turn-runtime.d.ts +3 -1
  172. package/dist/modes/app-server/threads/turn-runtime.d.ts.map +1 -1
  173. package/dist/modes/app-server/threads/turn-runtime.js.map +1 -1
  174. package/dist/modes/app-server/threads/turns.js +1 -1
  175. package/dist/modes/app-server/threads/turns.js.map +1 -1
  176. package/dist/modes/app-server/turn-adapter.js +4 -2
  177. package/dist/modes/app-server/turn-adapter.js.map +1 -1
  178. package/dist/modes/interactive/chat-viewport.d.ts +22 -0
  179. package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
  180. package/dist/modes/interactive/chat-viewport.js +29 -0
  181. package/dist/modes/interactive/chat-viewport.js.map +1 -0
  182. package/dist/modes/interactive/components/ask-user-answer-key.d.ts +14 -0
  183. package/dist/modes/interactive/components/ask-user-answer-key.d.ts.map +1 -0
  184. package/dist/modes/interactive/components/ask-user-answer-key.js +65 -0
  185. package/dist/modes/interactive/components/ask-user-answer-key.js.map +1 -0
  186. package/dist/modes/interactive/components/ask-user-async-widget.d.ts +17 -12
  187. package/dist/modes/interactive/components/ask-user-async-widget.d.ts.map +1 -1
  188. package/dist/modes/interactive/components/ask-user-async-widget.js +47 -23
  189. package/dist/modes/interactive/components/ask-user-async-widget.js.map +1 -1
  190. package/dist/modes/interactive/components/assistant-message.d.ts +7 -0
  191. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  192. package/dist/modes/interactive/components/assistant-message.js +26 -2
  193. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  194. package/dist/modes/interactive/components/assistant-render-descriptors.d.ts +4 -0
  195. package/dist/modes/interactive/components/assistant-render-descriptors.d.ts.map +1 -1
  196. package/dist/modes/interactive/components/assistant-render-descriptors.js +8 -5
  197. package/dist/modes/interactive/components/assistant-render-descriptors.js.map +1 -1
  198. package/dist/modes/interactive/components/custom-editor.d.ts +10 -1
  199. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  200. package/dist/modes/interactive/components/custom-editor.js +37 -1
  201. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  202. package/dist/modes/interactive/components/index.d.ts +1 -1
  203. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  204. package/dist/modes/interactive/components/index.js.map +1 -1
  205. package/dist/modes/interactive/components/scoped-models-selector.js +8 -8
  206. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  207. package/dist/modes/interactive/components/status-indicator.d.ts +4 -1
  208. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  209. package/dist/modes/interactive/components/status-indicator.js +14 -2
  210. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  211. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  212. package/dist/modes/interactive/components/thinking-selector.js +4 -4
  213. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  214. package/dist/modes/interactive/components/tool-execution-renderer.d.ts +4 -1
  215. package/dist/modes/interactive/components/tool-execution-renderer.d.ts.map +1 -1
  216. package/dist/modes/interactive/components/tool-execution-renderer.js +23 -10
  217. package/dist/modes/interactive/components/tool-execution-renderer.js.map +1 -1
  218. package/dist/modes/interactive/components/tool-execution-types.d.ts +18 -2
  219. package/dist/modes/interactive/components/tool-execution-types.d.ts.map +1 -1
  220. package/dist/modes/interactive/components/tool-execution-types.js.map +1 -1
  221. package/dist/modes/interactive/components/tool-execution.d.ts +3 -3
  222. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  223. package/dist/modes/interactive/components/tool-execution.js +5 -0
  224. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  225. package/dist/modes/interactive/interactive-mode.d.ts +10 -15
  226. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  227. package/dist/modes/interactive/interactive-mode.js +178 -138
  228. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  229. package/dist/modes/interactive/theme/dark.json +2 -1
  230. package/dist/modes/interactive/theme/grok-day.json +2 -1
  231. package/dist/modes/interactive/theme/grok-night.json +2 -1
  232. package/dist/modes/interactive/theme/light.json +2 -1
  233. package/dist/modes/interactive/theme/theme-controller.d.ts +1 -0
  234. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
  235. package/dist/modes/interactive/theme/theme-controller.js +5 -0
  236. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  237. package/dist/modes/interactive/theme/theme-json.d.ts +84 -0
  238. package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -0
  239. package/dist/modes/interactive/theme/theme-json.js +130 -0
  240. package/dist/modes/interactive/theme/theme-json.js.map +1 -0
  241. package/dist/modes/interactive/theme/theme-schema.json +6 -2
  242. package/dist/modes/interactive/theme/theme.d.ts +10 -5
  243. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  244. package/dist/modes/interactive/theme/theme.js +14 -117
  245. package/dist/modes/interactive/theme/theme.js.map +1 -1
  246. package/dist/modes/interactive/tips/catalog/input-tips.d.ts +5 -0
  247. package/dist/modes/interactive/tips/catalog/input-tips.d.ts.map +1 -1
  248. package/dist/modes/interactive/tips/catalog/input-tips.js +5 -0
  249. package/dist/modes/interactive/tips/catalog/input-tips.js.map +1 -1
  250. package/dist/modes/interactive/tui-renderer.d.ts +21 -0
  251. package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
  252. package/dist/modes/interactive/tui-renderer.js +67 -0
  253. package/dist/modes/interactive/tui-renderer.js.map +1 -0
  254. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  255. package/dist/modes/rpc/connection-handler.js +8 -2
  256. package/dist/modes/rpc/connection-handler.js.map +1 -1
  257. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  258. package/dist/modes/rpc/rpc-client.js +11 -1
  259. package/dist/modes/rpc/rpc-client.js.map +1 -1
  260. package/dist/modes/rpc/rpc-types.d.ts +2 -1
  261. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  262. package/dist/modes/rpc/rpc-types.js +1 -0
  263. package/dist/modes/rpc/rpc-types.js.map +1 -1
  264. package/dist/modes/rpc/session-path-reservations.d.ts +30 -0
  265. package/dist/modes/rpc/session-path-reservations.d.ts.map +1 -0
  266. package/dist/modes/rpc/session-path-reservations.js +58 -0
  267. package/dist/modes/rpc/session-path-reservations.js.map +1 -0
  268. package/dist/modes/rpc/session-registry.d.ts +3 -1
  269. package/dist/modes/rpc/session-registry.d.ts.map +1 -1
  270. package/dist/modes/rpc/session-registry.js.map +1 -1
  271. package/dist/modes/rpc/session-worker-client.d.ts +10 -8
  272. package/dist/modes/rpc/session-worker-client.d.ts.map +1 -1
  273. package/dist/modes/rpc/session-worker-client.js +14 -23
  274. package/dist/modes/rpc/session-worker-client.js.map +1 -1
  275. package/dist/modes/rpc/session-worker-credit.d.ts +17 -0
  276. package/dist/modes/rpc/session-worker-credit.d.ts.map +1 -0
  277. package/dist/modes/rpc/session-worker-credit.js +39 -0
  278. package/dist/modes/rpc/session-worker-credit.js.map +1 -0
  279. package/dist/modes/rpc/session-worker-protocol.d.ts +10 -0
  280. package/dist/modes/rpc/session-worker-protocol.d.ts.map +1 -1
  281. package/dist/modes/rpc/session-worker-protocol.js +2 -0
  282. package/dist/modes/rpc/session-worker-protocol.js.map +1 -1
  283. package/dist/modes/rpc/session-worker-signals.d.ts +7 -0
  284. package/dist/modes/rpc/session-worker-signals.d.ts.map +1 -0
  285. package/dist/modes/rpc/session-worker-signals.js +19 -0
  286. package/dist/modes/rpc/session-worker-signals.js.map +1 -0
  287. package/dist/modes/rpc/session-worker.js +12 -16
  288. package/dist/modes/rpc/session-worker.js.map +1 -1
  289. package/dist/modes/rpc/worker-session-registry.d.ts +12 -0
  290. package/dist/modes/rpc/worker-session-registry.d.ts.map +1 -1
  291. package/dist/modes/rpc/worker-session-registry.js +51 -24
  292. package/dist/modes/rpc/worker-session-registry.js.map +1 -1
  293. package/dist/senpi +3 -0
  294. package/dist/utils/clipboard-command.d.ts +7 -0
  295. package/dist/utils/clipboard-command.d.ts.map +1 -0
  296. package/dist/utils/clipboard-command.js +45 -0
  297. package/dist/utils/clipboard-command.js.map +1 -0
  298. package/dist/utils/clipboard-image.d.ts.map +1 -1
  299. package/dist/utils/clipboard-image.js +52 -69
  300. package/dist/utils/clipboard-image.js.map +1 -1
  301. package/dist/utils/clipboard.d.ts.map +1 -1
  302. package/dist/utils/clipboard.js +49 -126
  303. package/dist/utils/clipboard.js.map +1 -1
  304. package/dist/utils/exif-orientation.d.ts.map +1 -1
  305. package/dist/utils/exif-orientation.js +2 -3
  306. package/dist/utils/exif-orientation.js.map +1 -1
  307. package/dist/utils/tools-manager.d.ts +1 -0
  308. package/dist/utils/tools-manager.d.ts.map +1 -1
  309. package/dist/utils/tools-manager.js +41 -19
  310. package/dist/utils/tools-manager.js.map +1 -1
  311. package/docs/compaction.md +39 -13
  312. package/docs/containerization.md +45 -0
  313. package/docs/development.md +19 -0
  314. package/docs/docs.json +4 -0
  315. package/docs/environment-variables.md +2 -0
  316. package/docs/extensions.md +21 -10
  317. package/docs/keybindings.md +7 -2
  318. package/docs/models.md +1 -1
  319. package/docs/providers.md +1 -1
  320. package/docs/rpc.md +16 -8
  321. package/docs/sdk.md +7 -0
  322. package/docs/session-format.md +52 -38
  323. package/docs/settings.md +40 -4
  324. package/docs/skills.md +1 -1
  325. package/docs/termux.md +0 -1
  326. package/docs/themes.md +8 -6
  327. package/docs/tui.md +22 -3
  328. package/examples/README.md +3 -0
  329. package/examples/extensions/dynamic-resources/dynamic.json +2 -0
  330. package/examples/plugins/pi-example-plugin/README.md +38 -0
  331. package/examples/plugins/pi-example-plugin/package.json +10 -0
  332. package/examples/plugins/pi-example-plugin/src/contract.ts +13 -0
  333. package/examples/plugins/pi-example-plugin/src/session.ts +23 -0
  334. package/examples/plugins/pi-example-plugin/src/tui.ts +31 -0
  335. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -1
  336. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +3 -3
  337. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
  338. package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
  339. package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
  340. package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
  341. package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
  342. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
  343. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
  344. package/node_modules/@aws-sdk/core/package.json +1 -1
  345. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  346. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  347. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  348. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  349. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +2 -0
  350. package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +2 -0
  351. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  352. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  353. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +201 -0
  354. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +62 -0
  355. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +158 -0
  356. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +2 -0
  357. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +16 -0
  358. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +84 -0
  359. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +8 -0
  360. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +11 -0
  361. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +10 -0
  362. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +4 -0
  363. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +5 -0
  364. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +7 -0
  365. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +7 -0
  366. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +8 -0
  367. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts +8 -0
  368. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromEnvSigningName.d.ts +18 -0
  369. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +12 -0
  370. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +9 -0
  371. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +8 -0
  372. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +7 -0
  373. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts +7 -0
  374. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts +18 -0
  375. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts +3 -0
  376. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromEnvSigningName.d.ts +8 -0
  377. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +10 -0
  378. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts +5 -0
  379. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +9 -0
  380. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +7 -0
  381. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts +7 -0
  382. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts +3 -0
  383. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts +2 -0
  384. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts +1 -0
  385. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts +2 -0
  386. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts +5 -0
  387. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts +4 -0
  388. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts +5 -0
  389. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +69 -0
  390. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  391. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  392. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  393. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  394. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  395. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  396. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  397. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  398. package/node_modules/@aws-sdk/token-providers/package.json +1 -1
  399. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +36 -0
  400. package/node_modules/@code-yeongyu/senpi-codemode/package.json +5 -5
  401. package/node_modules/@earendil-works/chord/README.md +205 -0
  402. package/node_modules/@earendil-works/chord/dist/api.d.ts +15 -0
  403. package/node_modules/@earendil-works/chord/dist/api.d.ts.map +1 -0
  404. package/node_modules/@earendil-works/chord/dist/api.js +72 -0
  405. package/node_modules/@earendil-works/chord/dist/api.js.map +1 -0
  406. package/node_modules/@earendil-works/chord/dist/bundler.d.ts +6 -0
  407. package/node_modules/@earendil-works/chord/dist/bundler.d.ts.map +1 -0
  408. package/node_modules/@earendil-works/chord/dist/bundler.js +3 -0
  409. package/node_modules/@earendil-works/chord/dist/bundler.js.map +1 -0
  410. package/node_modules/@earendil-works/chord/dist/context/index.d.ts +24 -0
  411. package/node_modules/@earendil-works/chord/dist/context/index.d.ts.map +1 -0
  412. package/node_modules/@earendil-works/chord/dist/context/index.js +97 -0
  413. package/node_modules/@earendil-works/chord/dist/context/index.js.map +1 -0
  414. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts +119 -0
  415. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts.map +1 -0
  416. package/node_modules/@earendil-works/chord/dist/delta/index.js +1209 -0
  417. package/node_modules/@earendil-works/chord/dist/delta/index.js.map +1 -0
  418. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts +12 -0
  419. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts.map +1 -0
  420. package/node_modules/@earendil-works/chord/dist/facets/host.js +762 -0
  421. package/node_modules/@earendil-works/chord/dist/facets/host.js.map +1 -0
  422. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts +3 -0
  423. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts.map +1 -0
  424. package/node_modules/@earendil-works/chord/dist/facets/loader.js +5 -0
  425. package/node_modules/@earendil-works/chord/dist/facets/loader.js.map +1 -0
  426. package/node_modules/@earendil-works/chord/dist/index.d.ts +11 -0
  427. package/node_modules/@earendil-works/chord/dist/index.d.ts.map +1 -0
  428. package/node_modules/@earendil-works/chord/dist/index.js +10 -0
  429. package/node_modules/@earendil-works/chord/dist/index.js.map +1 -0
  430. package/node_modules/@earendil-works/chord/dist/json.d.ts +4 -0
  431. package/node_modules/@earendil-works/chord/dist/json.d.ts.map +1 -0
  432. package/node_modules/@earendil-works/chord/dist/json.js +57 -0
  433. package/node_modules/@earendil-works/chord/dist/json.js.map +1 -0
  434. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts +30 -0
  435. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts.map +1 -0
  436. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js +377 -0
  437. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js.map +1 -0
  438. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts +26 -0
  439. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts.map +1 -0
  440. package/node_modules/@earendil-works/chord/dist/node/bundle.js +183 -0
  441. package/node_modules/@earendil-works/chord/dist/node/bundle.js.map +1 -0
  442. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts +36 -0
  443. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts.map +1 -0
  444. package/node_modules/@earendil-works/chord/dist/node/manifest.js +6 -0
  445. package/node_modules/@earendil-works/chord/dist/node/manifest.js.map +1 -0
  446. package/node_modules/@earendil-works/chord/dist/node/package.d.ts +15 -0
  447. package/node_modules/@earendil-works/chord/dist/node/package.d.ts.map +1 -0
  448. package/node_modules/@earendil-works/chord/dist/node/package.js +199 -0
  449. package/node_modules/@earendil-works/chord/dist/node/package.js.map +1 -0
  450. package/node_modules/@earendil-works/chord/dist/node.d.ts +5 -0
  451. package/node_modules/@earendil-works/chord/dist/node.d.ts.map +1 -0
  452. package/node_modules/@earendil-works/chord/dist/node.js +3 -0
  453. package/node_modules/@earendil-works/chord/dist/node.js.map +1 -0
  454. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts +11 -0
  455. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts.map +1 -0
  456. package/node_modules/@earendil-works/chord/dist/services/consumer.js +535 -0
  457. package/node_modules/@earendil-works/chord/dist/services/consumer.js.map +1 -0
  458. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts +8 -0
  459. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts.map +1 -0
  460. package/node_modules/@earendil-works/chord/dist/services/errors.js +21 -0
  461. package/node_modules/@earendil-works/chord/dist/services/errors.js.map +1 -0
  462. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts +15 -0
  463. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts.map +1 -0
  464. package/node_modules/@earendil-works/chord/dist/services/handle.js +99 -0
  465. package/node_modules/@earendil-works/chord/dist/services/handle.js.map +1 -0
  466. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts +25 -0
  467. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts.map +1 -0
  468. package/node_modules/@earendil-works/chord/dist/services/instances.js +137 -0
  469. package/node_modules/@earendil-works/chord/dist/services/instances.js.map +1 -0
  470. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts +5 -0
  471. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts.map +1 -0
  472. package/node_modules/@earendil-works/chord/dist/services/loopback.js +15 -0
  473. package/node_modules/@earendil-works/chord/dist/services/loopback.js.map +1 -0
  474. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts +37 -0
  475. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts.map +1 -0
  476. package/node_modules/@earendil-works/chord/dist/services/provider.js +472 -0
  477. package/node_modules/@earendil-works/chord/dist/services/provider.js.map +1 -0
  478. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +15 -0
  479. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts.map +1 -0
  480. package/node_modules/@earendil-works/chord/dist/services/state-codec.js +115 -0
  481. package/node_modules/@earendil-works/chord/dist/services/state-codec.js.map +1 -0
  482. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts +11 -0
  483. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts.map +1 -0
  484. package/node_modules/@earendil-works/chord/dist/services/state-internals.js +10 -0
  485. package/node_modules/@earendil-works/chord/dist/services/state-internals.js.map +1 -0
  486. package/node_modules/@earendil-works/chord/dist/services/state.d.ts +23 -0
  487. package/node_modules/@earendil-works/chord/dist/services/state.d.ts.map +1 -0
  488. package/node_modules/@earendil-works/chord/dist/services/state.js +124 -0
  489. package/node_modules/@earendil-works/chord/dist/services/state.js.map +1 -0
  490. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts +60 -0
  491. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts.map +1 -0
  492. package/node_modules/@earendil-works/chord/dist/services/wire.js +173 -0
  493. package/node_modules/@earendil-works/chord/dist/services/wire.js.map +1 -0
  494. package/node_modules/@earendil-works/chord/dist/types.d.ts +203 -0
  495. package/node_modules/@earendil-works/chord/dist/types.d.ts.map +1 -0
  496. package/node_modules/@earendil-works/chord/dist/types.js +2 -0
  497. package/node_modules/@earendil-works/chord/dist/types.js.map +1 -0
  498. package/node_modules/@earendil-works/chord/package.json +73 -0
  499. package/node_modules/@earendil-works/pi-agent-core/README.md +4 -0
  500. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +639 -384
  501. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
  502. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +5 -250
  503. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
  504. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts +12 -6
  505. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
  506. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +33 -27
  507. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
  508. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +30 -8
  509. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  510. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +53 -64
  511. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  512. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts +9 -0
  513. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts.map +1 -0
  514. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js +35 -0
  515. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js.map +1 -0
  516. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts +9 -0
  517. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts.map +1 -0
  518. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js +13 -0
  519. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js.map +1 -0
  520. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +25 -28
  521. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
  522. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +368 -125
  523. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
  524. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +20 -38
  525. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +1 -1
  526. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +233 -55
  527. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js.map +1 -1
  528. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts +42 -0
  529. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts.map +1 -0
  530. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js +82 -0
  531. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js.map +1 -0
  532. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts +22 -0
  533. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts.map +1 -0
  534. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js +48 -0
  535. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js.map +1 -0
  536. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts +67 -0
  537. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts.map +1 -0
  538. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js +121 -0
  539. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js.map +1 -0
  540. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts +38 -0
  541. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts.map +1 -0
  542. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js +404 -0
  543. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js.map +1 -0
  544. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts +2 -2
  545. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -1
  546. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
  547. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts +3 -2
  548. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -1
  549. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +17 -17
  550. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
  551. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts +93 -0
  552. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts.map +1 -1
  553. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js +39 -0
  554. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js.map +1 -1
  555. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts +28 -0
  556. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts.map +1 -0
  557. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js +173 -0
  558. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js.map +1 -0
  559. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts +8 -0
  560. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts.map +1 -0
  561. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js +133 -0
  562. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js.map +1 -0
  563. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts +15 -0
  564. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts.map +1 -0
  565. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js +179 -0
  566. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js.map +1 -0
  567. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts +8 -0
  568. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts.map +1 -0
  569. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js +205 -0
  570. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js.map +1 -0
  571. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts +5 -0
  572. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts.map +1 -0
  573. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js +140 -0
  574. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js.map +1 -0
  575. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts +8 -0
  576. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts.map +1 -0
  577. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js +85 -0
  578. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js.map +1 -0
  579. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts +23 -0
  580. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts.map +1 -0
  581. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js +394 -0
  582. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js.map +1 -0
  583. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts +4 -0
  584. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts.map +1 -0
  585. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js +34 -0
  586. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js.map +1 -0
  587. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts +32 -0
  588. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts.map +1 -0
  589. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js +929 -0
  590. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js.map +1 -0
  591. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts +7 -0
  592. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts.map +1 -0
  593. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js +49 -0
  594. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js.map +1 -0
  595. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts +14 -0
  596. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts.map +1 -0
  597. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js +244 -0
  598. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js.map +1 -0
  599. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts +6 -0
  600. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts.map +1 -0
  601. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js +449 -0
  602. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js.map +1 -0
  603. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts +6 -0
  604. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts.map +1 -0
  605. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js +93 -0
  606. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js.map +1 -0
  607. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts +59 -0
  608. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts.map +1 -0
  609. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js +302 -0
  610. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js.map +1 -0
  611. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts +2 -0
  612. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts.map +1 -0
  613. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js +2 -0
  614. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js.map +1 -0
  615. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts +118 -0
  616. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts.map +1 -0
  617. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js +1559 -0
  618. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js.map +1 -0
  619. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts +15 -0
  620. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts.map +1 -0
  621. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js +66 -0
  622. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js.map +1 -0
  623. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts +5 -0
  624. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts.map +1 -0
  625. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js +240 -0
  626. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js.map +1 -0
  627. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts +24 -0
  628. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts.map +1 -0
  629. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js +117 -0
  630. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js.map +1 -0
  631. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts +21 -0
  632. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts.map +1 -0
  633. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js +72 -0
  634. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js.map +1 -0
  635. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts +105 -0
  636. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts.map +1 -0
  637. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js +50 -0
  638. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js.map +1 -0
  639. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts +53 -0
  640. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts.map +1 -0
  641. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js +57 -0
  642. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js.map +1 -0
  643. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts +6 -19
  644. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts.map +1 -1
  645. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js +31 -53
  646. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js.map +1 -1
  647. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts +21 -0
  648. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts.map +1 -0
  649. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js +55 -0
  650. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js.map +1 -0
  651. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +16 -0
  652. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +1 -0
  653. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +79 -0
  654. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +1 -0
  655. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts +39 -0
  656. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts.map +1 -0
  657. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js +269 -0
  658. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js.map +1 -0
  659. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts +9 -5
  660. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts.map +1 -1
  661. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js +7 -4
  662. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js.map +1 -1
  663. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts +19 -8
  664. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts.map +1 -1
  665. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +34 -219
  666. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js.map +1 -1
  667. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts +38 -0
  668. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts.map +1 -0
  669. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js +266 -0
  670. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js.map +1 -0
  671. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts +4 -0
  672. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts.map +1 -0
  673. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js +4 -0
  674. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js.map +1 -0
  675. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts +14 -0
  676. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts.map +1 -0
  677. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js +86 -0
  678. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js.map +1 -0
  679. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts +44 -0
  680. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts.map +1 -0
  681. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js +454 -0
  682. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js.map +1 -0
  683. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +27 -24
  684. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +1 -1
  685. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +276 -151
  686. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +1 -1
  687. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +39 -41
  688. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +1 -1
  689. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +175 -196
  690. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +1 -1
  691. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +23 -22
  692. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts.map +1 -1
  693. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js +2 -1
  694. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js.map +1 -1
  695. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +44 -40
  696. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +1 -1
  697. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js +333 -115
  698. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +1 -1
  699. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts +8 -0
  700. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts.map +1 -0
  701. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js +22 -0
  702. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js.map +1 -0
  703. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +78 -51
  704. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
  705. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +327 -207
  706. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
  707. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts +12 -0
  708. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts.map +1 -0
  709. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js +24 -0
  710. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js.map +1 -0
  711. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts +42 -0
  712. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts.map +1 -0
  713. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js +127 -0
  714. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js.map +1 -0
  715. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts +25 -0
  716. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts.map +1 -0
  717. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js +114 -0
  718. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js.map +1 -0
  719. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts +23 -0
  720. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts.map +1 -0
  721. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js +809 -0
  722. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js.map +1 -0
  723. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts +4 -0
  724. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts.map +1 -0
  725. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js +600 -0
  726. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js.map +1 -0
  727. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts +26 -0
  728. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts.map +1 -0
  729. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js +103 -0
  730. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js.map +1 -0
  731. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts +9 -2
  732. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts.map +1 -1
  733. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js +8 -1
  734. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js.map +1 -1
  735. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts +11 -0
  736. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts.map +1 -0
  737. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js +19 -0
  738. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js.map +1 -0
  739. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts +20 -0
  740. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts.map +1 -0
  741. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js +40 -0
  742. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js.map +1 -0
  743. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts +5 -7
  744. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts.map +1 -1
  745. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js.map +1 -1
  746. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +425 -265
  747. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +1 -1
  748. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js +7 -7
  749. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js.map +1 -1
  750. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts +95 -0
  751. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts.map +1 -0
  752. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js +81 -0
  753. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js.map +1 -0
  754. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +3 -2
  755. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
  756. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +29 -26
  757. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
  758. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts +64 -43
  759. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts.map +1 -1
  760. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js +45 -26
  761. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js.map +1 -1
  762. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts +4 -4
  763. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts.map +1 -1
  764. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +66 -93
  765. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js.map +1 -1
  766. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts.map +1 -1
  767. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +17 -13
  768. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js.map +1 -1
  769. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts +2 -1
  770. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts.map +1 -1
  771. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +5 -5
  772. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js.map +1 -1
  773. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts +3 -2
  774. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts.map +1 -1
  775. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +5 -5
  776. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js.map +1 -1
  777. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts +2 -1
  778. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts.map +1 -1
  779. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +4 -6
  780. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js.map +1 -1
  781. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.d.ts.map +1 -1
  782. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +12 -8
  783. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js.map +1 -1
  784. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +128 -45
  785. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  786. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  787. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts +24 -0
  788. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts.map +1 -0
  789. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js +79 -0
  790. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js.map +1 -0
  791. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts +31 -0
  792. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts.map +1 -0
  793. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js +217 -0
  794. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js.map +1 -0
  795. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +19 -5
  796. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
  797. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +65 -192
  798. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
  799. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts +1 -0
  800. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
  801. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +1 -1
  802. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
  803. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts +4 -0
  804. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts.map +1 -0
  805. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js +33 -0
  806. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js.map +1 -0
  807. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +4 -1
  808. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
  809. package/node_modules/@earendil-works/pi-agent-core/dist/index.js +3 -6
  810. package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
  811. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +24 -16
  812. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts.map +1 -1
  813. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +1 -1
  814. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js.map +1 -1
  815. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +2 -0
  816. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  817. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  818. package/node_modules/@earendil-works/pi-agent-core/package.json +27 -6
  819. package/node_modules/@earendil-works/pi-ai/README.md +39 -4
  820. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  821. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +8 -1
  822. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  823. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts +77 -0
  824. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts.map +1 -0
  825. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js +72 -0
  826. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js.map +1 -0
  827. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts +11 -0
  828. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts.map +1 -1
  829. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js +18 -0
  830. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js.map +1 -1
  831. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +1 -1
  832. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
  833. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +5 -1
  834. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
  835. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.d.ts +2 -0
  836. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.d.ts.map +1 -1
  837. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.js +96 -51
  838. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.js.map +1 -1
  839. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.d.ts +389 -1
  840. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.d.ts.map +1 -1
  841. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.js +132 -4
  842. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.js.map +1 -1
  843. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.d.ts +34 -4
  844. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.d.ts.map +1 -1
  845. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.js +41 -8
  846. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.js.map +1 -1
  847. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.d.ts +20 -0
  848. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.d.ts.map +1 -1
  849. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.js +20 -0
  850. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.js.map +1 -1
  851. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.d.ts +18 -6
  852. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.d.ts.map +1 -1
  853. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.js +77 -35
  854. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.js.map +1 -1
  855. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.d.ts +9 -3
  856. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.d.ts.map +1 -1
  857. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.js +30 -38
  858. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.js.map +1 -1
  859. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.d.ts +16 -0
  860. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.d.ts.map +1 -0
  861. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.js +69 -0
  862. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.js.map +1 -0
  863. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.d.ts +26 -0
  864. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.d.ts.map +1 -0
  865. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.js +61 -0
  866. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.js.map +1 -0
  867. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.d.ts +6 -4
  868. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.d.ts.map +1 -1
  869. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.js +6 -4
  870. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.js.map +1 -1
  871. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.d.ts +13 -5
  872. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.d.ts.map +1 -1
  873. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.js +76 -21
  874. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.js.map +1 -1
  875. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +4 -1
  876. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  877. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  878. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +6 -3
  879. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  880. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
  881. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +4 -1
  882. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
  883. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  884. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +13 -3
  885. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  886. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.d.ts +5 -0
  887. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.d.ts.map +1 -1
  888. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.js +7 -2
  889. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.js.map +1 -1
  890. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts +32 -0
  891. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts.map +1 -0
  892. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js +62 -0
  893. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js.map +1 -0
  894. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.d.ts.map +1 -1
  895. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js +2 -1
  896. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js.map +1 -1
  897. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +2 -1
  898. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  899. package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -1
  900. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  901. package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +11 -1
  902. package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
  903. package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
  904. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +1 -0
  905. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  906. package/node_modules/@earendil-works/pi-ai/dist/models.js +5 -2
  907. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  908. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts +1 -1
  909. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts.map +1 -1
  910. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.js.map +1 -1
  911. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts.map +1 -1
  912. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js +4 -0
  913. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js.map +1 -1
  914. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -1
  915. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +2 -1
  916. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -1
  917. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  918. package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  919. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
  920. package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  921. package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
  922. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  923. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  924. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  925. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  926. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  927. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
  928. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  929. package/node_modules/@earendil-works/pi-ai/dist/providers/data/venice.json +1 -1
  930. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  931. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
  932. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.d.ts.map +1 -1
  933. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.js +3 -3
  934. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.js.map +1 -1
  935. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.d.ts +4 -2
  936. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.d.ts.map +1 -1
  937. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.js +18 -9
  938. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.js.map +1 -1
  939. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
  940. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  941. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.d.ts.map +1 -1
  942. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +4 -3
  943. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
  944. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts +4 -0
  945. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts.map +1 -0
  946. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js +22 -0
  947. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js.map +1 -0
  948. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.d.ts.map +1 -1
  949. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +5 -4
  950. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js.map +1 -1
  951. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +16 -6
  952. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  953. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  954. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts +77 -0
  955. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts.map +1 -0
  956. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +427 -0
  957. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js.map +1 -0
  958. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts +12 -0
  959. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts.map +1 -0
  960. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js +93 -0
  961. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js.map +1 -0
  962. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
  963. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +25 -5
  964. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
  965. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +1 -1
  966. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
  967. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +5 -1
  968. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
  969. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts +10 -1
  970. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts.map +1 -1
  971. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.js.map +1 -1
  972. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +13 -2
  973. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
  974. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +18 -7
  975. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
  976. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts +2 -2
  977. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts.map +1 -1
  978. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js +36 -31
  979. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js.map +1 -1
  980. package/node_modules/@earendil-works/pi-ai/package.json +6 -6
  981. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  982. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  983. package/node_modules/@earendil-works/pi-tui/README.md +53 -4
  984. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts +21 -1
  985. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +1 -1
  986. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +199 -42
  987. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js.map +1 -1
  988. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +3 -1
  989. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
  990. package/node_modules/@earendil-works/pi-tui/dist/components/box.js +28 -0
  991. package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
  992. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
  993. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  994. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +98 -18
  995. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  996. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +12 -1
  997. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
  998. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +40 -6
  999. package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
  1000. package/node_modules/@earendil-works/pi-tui/dist/components/latex.d.ts.map +1 -1
  1001. package/node_modules/@earendil-works/pi-tui/dist/components/latex.js +7 -0
  1002. package/node_modules/@earendil-works/pi-tui/dist/components/latex.js.map +1 -1
  1003. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +3 -0
  1004. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
  1005. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +20 -8
  1006. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
  1007. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts +12 -0
  1008. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts.map +1 -0
  1009. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js +19 -0
  1010. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js.map +1 -0
  1011. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +6 -3
  1012. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -1
  1013. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +6 -1
  1014. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -1
  1015. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +4 -1
  1016. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
  1017. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +48 -2
  1018. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
  1019. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +5 -1
  1020. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
  1021. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +54 -5
  1022. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
  1023. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +3 -1
  1024. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  1025. package/node_modules/@earendil-works/pi-tui/dist/index.js +3 -0
  1026. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  1027. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +3 -1
  1028. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -1
  1029. package/node_modules/@earendil-works/pi-tui/dist/layout.js +32 -9
  1030. package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -1
  1031. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +2 -1
  1032. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
  1033. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +3 -44
  1034. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
  1035. package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts +18 -0
  1036. package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts.map +1 -0
  1037. package/node_modules/@earendil-works/pi-tui/dist/native-platform.js +42 -0
  1038. package/node_modules/@earendil-works/pi-tui/dist/native-platform.js.map +1 -0
  1039. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  1040. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +2 -20
  1041. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  1042. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +31 -1
  1043. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
  1044. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +335 -41
  1045. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
  1046. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +83 -5
  1047. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  1048. package/node_modules/@earendil-works/pi-tui/dist/tui.js +118 -4
  1049. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  1050. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +2 -0
  1051. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  1052. package/node_modules/@earendil-works/pi-tui/dist/utils.js +9 -0
  1053. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  1054. package/node_modules/@earendil-works/pi-tui/native/clipboard.h +170 -0
  1055. package/node_modules/@earendil-works/pi-tui/native/darwin/README.md +8 -6
  1056. package/node_modules/@earendil-works/pi-tui/native/darwin/build.sh +12 -5
  1057. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/{darwin-modifiers.node → darwin-platform.node} +0 -0
  1058. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/{darwin-modifiers.node → darwin-platform.node} +0 -0
  1059. package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-platform.m +93 -0
  1060. package/node_modules/@earendil-works/pi-tui/native/linux/README.md +23 -0
  1061. package/node_modules/@earendil-works/pi-tui/native/linux/build.sh +65 -0
  1062. package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
  1063. package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
  1064. package/node_modules/@earendil-works/pi-tui/native/linux/src/clipboard-worker.h +70 -0
  1065. package/node_modules/@earendil-works/pi-tui/native/linux/src/linux-platform-x11.c +274 -0
  1066. package/node_modules/@earendil-works/pi-tui/native/napi.h +89 -0
  1067. package/node_modules/@earendil-works/pi-tui/native/win32/README.md +18 -7
  1068. package/node_modules/@earendil-works/pi-tui/native/win32/build.mjs +7 -4
  1069. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
  1070. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
  1071. package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-platform.c +241 -0
  1072. package/node_modules/@earendil-works/pi-tui/package.json +10 -3
  1073. package/node_modules/@google/genai/dist/genai.d.ts +1799 -289
  1074. package/node_modules/@google/genai/dist/index.cjs +319 -299
  1075. package/node_modules/@google/genai/dist/index.mjs +319 -299
  1076. package/node_modules/@google/genai/dist/index.mjs.map +1 -1
  1077. package/node_modules/@google/genai/dist/node/index.cjs +320 -300
  1078. package/node_modules/@google/genai/dist/node/index.mjs +320 -300
  1079. package/node_modules/@google/genai/dist/node/index.mjs.map +1 -1
  1080. package/node_modules/@google/genai/dist/node/node.d.ts +1799 -289
  1081. package/node_modules/@google/genai/dist/tokenizer/node.cjs +49 -2
  1082. package/node_modules/@google/genai/dist/tokenizer/node.d.ts +43 -3
  1083. package/node_modules/@google/genai/dist/tokenizer/node.mjs +49 -2
  1084. package/node_modules/@google/genai/dist/tokenizer/node.mjs.map +1 -1
  1085. package/node_modules/@google/genai/dist/vertex_internal/index.cjs +39 -3
  1086. package/node_modules/@google/genai/dist/vertex_internal/index.cjs.map +1 -1
  1087. package/node_modules/@google/genai/dist/vertex_internal/index.d.ts +51 -9
  1088. package/node_modules/@google/genai/dist/vertex_internal/index.js +39 -3
  1089. package/node_modules/@google/genai/dist/vertex_internal/index.js.map +1 -1
  1090. package/node_modules/@google/genai/dist/web/index.mjs +319 -299
  1091. package/node_modules/@google/genai/dist/web/index.mjs.map +1 -1
  1092. package/node_modules/@google/genai/dist/web/web.d.ts +1799 -289
  1093. package/node_modules/@google/genai/package.json +1 -1
  1094. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -4
  1095. package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +1 -0
  1096. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -3
  1097. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +8 -1
  1098. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/LICENSE +201 -0
  1099. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/README.md +115 -0
  1100. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/index.js +96 -0
  1101. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort-handler.js +1 -0
  1102. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort.js +1 -0
  1103. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +5 -0
  1104. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +1 -0
  1105. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +1 -0
  1106. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +1 -0
  1107. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +1 -0
  1108. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/auth.js +5 -0
  1109. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/index.js +2 -0
  1110. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +1 -0
  1111. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/checksum.js +1 -0
  1112. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/client.js +1 -0
  1113. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/command.js +1 -0
  1114. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/config.js +1 -0
  1115. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/index.js +1 -0
  1116. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/manager.js +1 -0
  1117. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/pool.js +1 -0
  1118. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/crypto.js +1 -0
  1119. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js +1 -0
  1120. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/encode.js +1 -0
  1121. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoint.js +5 -0
  1122. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointParameterInstructions.js +1 -0
  1123. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +1 -0
  1124. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +1 -0
  1125. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +1 -0
  1126. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +1 -0
  1127. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/index.js +1 -0
  1128. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/shared.js +1 -0
  1129. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/eventStream.js +1 -0
  1130. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/checksum.js +38 -0
  1131. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +7 -0
  1132. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +1 -0
  1133. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/index.js +2 -0
  1134. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/retry.js +1 -0
  1135. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js +1 -0
  1136. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/feature-ids.js +1 -0
  1137. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +1 -0
  1138. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http.js +5 -0
  1139. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +1 -0
  1140. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +1 -0
  1141. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/identity.js +1 -0
  1142. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/index.js +1 -0
  1143. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +1 -0
  1144. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/index.js +7 -0
  1145. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/logger.js +1 -0
  1146. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/metrics.js +1 -0
  1147. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/middleware.js +1 -0
  1148. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/pagination.js +1 -0
  1149. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/profile.js +6 -0
  1150. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/response.js +1 -0
  1151. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/retry.js +1 -0
  1152. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +1 -0
  1153. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema.js +1 -0
  1154. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/sentinels.js +1 -0
  1155. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/static-schemas.js +1 -0
  1156. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/traits.js +1 -0
  1157. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/serde.js +1 -0
  1158. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/shapes.js +1 -0
  1159. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/signature.js +1 -0
  1160. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/stream.js +1 -0
  1161. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +1 -0
  1162. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +1 -0
  1163. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +1 -0
  1164. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transfer.js +6 -0
  1165. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js +1 -0
  1166. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +1 -0
  1167. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/exact.js +1 -0
  1168. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/mutable.js +1 -0
  1169. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/no-undefined.js +1 -0
  1170. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/type-transform.js +1 -0
  1171. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/uri.js +1 -0
  1172. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/util.js +1 -0
  1173. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/waiter.js +1 -0
  1174. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort-handler.d.ts +7 -0
  1175. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort.d.ts +48 -0
  1176. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +7 -0
  1177. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +49 -0
  1178. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +20 -0
  1179. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +41 -0
  1180. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +14 -0
  1181. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/auth.d.ts +59 -0
  1182. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/index.d.ts +7 -0
  1183. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +37 -0
  1184. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/checksum.d.ts +61 -0
  1185. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/client.d.ts +57 -0
  1186. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/command.d.ts +28 -0
  1187. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/config.d.ts +15 -0
  1188. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/index.d.ts +3 -0
  1189. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/manager.d.ts +34 -0
  1190. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/pool.d.ts +32 -0
  1191. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/crypto.d.ts +58 -0
  1192. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +24 -0
  1193. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/encode.d.ts +31 -0
  1194. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoint.d.ts +77 -0
  1195. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointParameterInstructions.d.ts +41 -0
  1196. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +27 -0
  1197. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +10 -0
  1198. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +28 -0
  1199. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +16 -0
  1200. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +5 -0
  1201. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +55 -0
  1202. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/eventStream.d.ts +137 -0
  1203. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +58 -0
  1204. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts +32 -0
  1205. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts +9 -0
  1206. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/index.d.ts +6 -0
  1207. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/retry.d.ts +18 -0
  1208. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts +35 -0
  1209. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/feature-ids.d.ts +16 -0
  1210. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +142 -0
  1211. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http.d.ts +110 -0
  1212. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +14 -0
  1213. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +31 -0
  1214. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/identity.d.ts +15 -0
  1215. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/index.d.ts +4 -0
  1216. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +14 -0
  1217. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/index.d.ts +52 -0
  1218. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/logger.d.ts +13 -0
  1219. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/metrics.d.ts +93 -0
  1220. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/middleware.d.ts +541 -0
  1221. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/pagination.d.ts +33 -0
  1222. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/profile.d.ts +30 -0
  1223. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/response.d.ts +40 -0
  1224. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/retry.d.ts +162 -0
  1225. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +143 -0
  1226. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema.d.ts +236 -0
  1227. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +65 -0
  1228. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +99 -0
  1229. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/traits.d.ts +46 -0
  1230. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/serde.d.ts +114 -0
  1231. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/shapes.d.ts +79 -0
  1232. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/signature.d.ts +172 -0
  1233. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/stream.d.ts +22 -0
  1234. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts +28 -0
  1235. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +54 -0
  1236. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +41 -0
  1237. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transfer.d.ts +42 -0
  1238. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +26 -0
  1239. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +73 -0
  1240. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/exact.d.ts +6 -0
  1241. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/mutable.d.ts +6 -0
  1242. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +68 -0
  1243. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts +39 -0
  1244. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +7 -0
  1245. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +45 -0
  1246. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +7 -0
  1247. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +49 -0
  1248. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +20 -0
  1249. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +41 -0
  1250. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +14 -0
  1251. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts +59 -0
  1252. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +7 -0
  1253. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +37 -0
  1254. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts +61 -0
  1255. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +57 -0
  1256. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +28 -0
  1257. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +15 -0
  1258. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts +3 -0
  1259. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +34 -0
  1260. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +32 -0
  1261. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts +58 -0
  1262. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +40 -0
  1263. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +31 -0
  1264. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +77 -0
  1265. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointParameterInstructions.d.ts +41 -0
  1266. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +27 -0
  1267. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +10 -0
  1268. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +28 -0
  1269. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +16 -0
  1270. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts +5 -0
  1271. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +55 -0
  1272. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +137 -0
  1273. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +58 -0
  1274. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +32 -0
  1275. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +9 -0
  1276. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts +6 -0
  1277. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts +18 -0
  1278. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +35 -0
  1279. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +16 -0
  1280. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +142 -0
  1281. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +110 -0
  1282. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +14 -0
  1283. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +31 -0
  1284. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts +15 -0
  1285. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +4 -0
  1286. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +14 -0
  1287. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +52 -0
  1288. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts +13 -0
  1289. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/metrics.d.ts +93 -0
  1290. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +541 -0
  1291. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts +33 -0
  1292. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +30 -0
  1293. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts +40 -0
  1294. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts +162 -0
  1295. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +149 -0
  1296. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +251 -0
  1297. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/sentinels.d.ts +65 -0
  1298. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +118 -0
  1299. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/traits.d.ts +46 -0
  1300. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +114 -0
  1301. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +79 -0
  1302. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts +172 -0
  1303. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts +22 -0
  1304. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +28 -0
  1305. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +54 -0
  1306. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts +41 -0
  1307. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +42 -0
  1308. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +26 -0
  1309. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +77 -0
  1310. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts +14 -0
  1311. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/mutable.d.ts +6 -0
  1312. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +88 -0
  1313. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts +40 -0
  1314. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts +17 -0
  1315. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +192 -0
  1316. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +35 -0
  1317. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/uri.d.ts +17 -0
  1318. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/util.d.ts +176 -0
  1319. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/waiter.d.ts +35 -0
  1320. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/package.json +50 -0
  1321. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  1322. package/node_modules/esbuild/LICENSE.md +21 -0
  1323. package/node_modules/esbuild/README.md +3 -0
  1324. package/node_modules/esbuild/bin/esbuild +223 -0
  1325. package/node_modules/esbuild/install.js +300 -0
  1326. package/node_modules/esbuild/lib/main.d.ts +720 -0
  1327. package/node_modules/esbuild/lib/main.js +2536 -0
  1328. package/node_modules/esbuild/package.json +47 -0
  1329. package/node_modules/ignore/README.md +52 -0
  1330. package/node_modules/ignore/index.js +785 -129
  1331. package/node_modules/ignore/legacy.js +660 -98
  1332. package/node_modules/ignore/package.json +10 -4
  1333. package/node_modules/marked/README.md +1 -0
  1334. package/node_modules/marked/lib/marked.d.ts +7 -0
  1335. package/node_modules/marked/lib/marked.esm.js +30 -30
  1336. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  1337. package/node_modules/marked/lib/marked.umd.js +30 -30
  1338. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  1339. package/node_modules/marked/man/marked.1 +1 -1
  1340. package/node_modules/marked/package.json +2 -2
  1341. package/node_modules/typebox/build/compile/validator.d.mts +1 -1
  1342. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  1343. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
  1344. package/node_modules/typebox/build/format/iri.mjs +5 -1
  1345. package/node_modules/typebox/build/guard/emit.mjs +2 -4
  1346. package/node_modules/typebox/build/guard/guard.mjs +6 -18
  1347. package/node_modules/typebox/build/guard/string.mjs +16 -24
  1348. package/node_modules/typebox/build/schema/compile.d.mts +3 -2
  1349. package/node_modules/typebox/build/schema/compile.mjs +8 -8
  1350. package/node_modules/typebox/build/schema/engine/_context.d.mts +1 -6
  1351. package/node_modules/typebox/build/schema/engine/_context.mjs +9 -14
  1352. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  1353. package/node_modules/typebox/build/schema/engine/_stack.d.mts +6 -2
  1354. package/node_modules/typebox/build/schema/engine/_stack.mjs +135 -32
  1355. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +16 -4
  1356. package/node_modules/typebox/build/schema/engine/allOf.mjs +2 -2
  1357. package/node_modules/typebox/build/schema/engine/anyOf.mjs +2 -2
  1358. package/node_modules/typebox/build/schema/engine/if.mjs +2 -2
  1359. package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
  1360. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +1 -3
  1361. package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
  1362. package/node_modules/typebox/build/schema/engine/schema.mjs +6 -0
  1363. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
  1364. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
  1365. package/node_modules/typebox/build/schema/errors.d.mts +2 -2
  1366. package/node_modules/typebox/build/schema/errors.mjs +7 -13
  1367. package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
  1368. package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
  1369. package/node_modules/typebox/build/schema/intern/intern.d.mts +14 -0
  1370. package/node_modules/typebox/build/schema/intern/intern.mjs +259 -0
  1371. package/node_modules/typebox/build/schema/parse.d.mts +1 -0
  1372. package/node_modules/typebox/build/schema/parse.mjs +10 -5
  1373. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +34 -3
  1374. package/node_modules/typebox/build/schema/resolve/resolve.mjs +198 -73
  1375. package/node_modules/typebox/build/schema/schema.d.mts +1 -0
  1376. package/node_modules/typebox/build/schema/schema.mjs +1 -0
  1377. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
  1378. package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
  1379. package/node_modules/typebox/package.json +1 -1
  1380. package/node_modules/typebox/readme.md +9 -5
  1381. package/node_modules/undici/docs/docs/api/Client.md +4 -0
  1382. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
  1383. package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
  1384. package/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
  1385. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
  1386. package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
  1387. package/node_modules/undici/lib/core/symbols.js +2 -0
  1388. package/node_modules/undici/lib/dispatcher/agent.js +7 -2
  1389. package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
  1390. package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  1391. package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
  1392. package/node_modules/undici/lib/dispatcher/client.js +3 -2
  1393. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
  1394. package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
  1395. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
  1396. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
  1397. package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
  1398. package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
  1399. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  1400. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
  1401. package/node_modules/undici/lib/handler/cache-handler.js +29 -5
  1402. package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
  1403. package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
  1404. package/node_modules/undici/lib/handler/redirect-handler.js +21 -4
  1405. package/node_modules/undici/lib/handler/retry-handler.js +148 -30
  1406. package/node_modules/undici/lib/interceptor/cache.js +65 -12
  1407. package/node_modules/undici/lib/interceptor/decompress.js +115 -13
  1408. package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
  1409. package/node_modules/undici/lib/interceptor/dns.js +7 -0
  1410. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  1411. package/node_modules/undici/lib/mock/mock-agent.js +13 -1
  1412. package/node_modules/undici/lib/mock/mock-utils.js +11 -10
  1413. package/node_modules/undici/lib/util/cache.js +45 -3
  1414. package/node_modules/undici/lib/web/cookies/parse.js +150 -147
  1415. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
  1416. package/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
  1417. package/node_modules/undici/lib/web/fetch/index.js +6 -0
  1418. package/node_modules/undici/lib/web/fetch/request.js +2 -3
  1419. package/node_modules/undici/lib/web/fetch/util.js +6 -1
  1420. package/node_modules/undici/lib/web/webidl/index.js +3 -3
  1421. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  1422. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  1423. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  1424. package/node_modules/undici/package.json +3 -3
  1425. package/node_modules/undici/types/client.d.ts +10 -0
  1426. package/node_modules/undici/types/interceptors.d.ts +2 -0
  1427. package/node_modules/undici/types/mock-agent.d.ts +11 -10
  1428. package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -0
  1429. package/package.json +70 -49
  1430. package/vendor/pi-client/client.d.ts +20 -15
  1431. package/vendor/pi-client/client.d.ts.map +1 -1
  1432. package/vendor/pi-client/client.js +248 -245
  1433. package/vendor/pi-client/client.js.map +1 -1
  1434. package/vendor/pi-client/connection.d.ts +4 -3
  1435. package/vendor/pi-client/connection.d.ts.map +1 -1
  1436. package/vendor/pi-client/connection.js +13 -9
  1437. package/vendor/pi-client/connection.js.map +1 -1
  1438. package/vendor/pi-client/errors.d.ts +6 -15
  1439. package/vendor/pi-client/errors.d.ts.map +1 -1
  1440. package/vendor/pi-client/errors.js +10 -25
  1441. package/vendor/pi-client/errors.js.map +1 -1
  1442. package/vendor/pi-client/index.d.ts +3 -4
  1443. package/vendor/pi-client/index.d.ts.map +1 -1
  1444. package/vendor/pi-client/index.js +2 -2
  1445. package/vendor/pi-client/index.js.map +1 -1
  1446. package/vendor/pi-client/types.d.ts +14 -8
  1447. package/vendor/pi-client/types.d.ts.map +1 -1
  1448. package/vendor/pi-client/types.js.map +1 -1
  1449. package/vendor/pi-client/unix.d.ts +14 -1
  1450. package/vendor/pi-client/unix.d.ts.map +1 -1
  1451. package/vendor/pi-client/unix.js +138 -8
  1452. package/vendor/pi-client/unix.js.map +1 -1
  1453. package/vendor/pi-protocol/codec.d.ts +2 -4
  1454. package/vendor/pi-protocol/codec.d.ts.map +1 -1
  1455. package/vendor/pi-protocol/codec.js +7 -34
  1456. package/vendor/pi-protocol/codec.js.map +1 -1
  1457. package/vendor/pi-protocol/framing.d.ts +0 -2
  1458. package/vendor/pi-protocol/framing.d.ts.map +1 -1
  1459. package/vendor/pi-protocol/framing.js +0 -15
  1460. package/vendor/pi-protocol/framing.js.map +1 -1
  1461. package/vendor/pi-protocol/index.d.ts +1 -1
  1462. package/vendor/pi-protocol/index.d.ts.map +1 -1
  1463. package/vendor/pi-protocol/index.js +1 -1
  1464. package/vendor/pi-protocol/index.js.map +1 -1
  1465. package/vendor/pi-protocol/protocol.d.ts +167 -0
  1466. package/vendor/pi-protocol/protocol.d.ts.map +1 -0
  1467. package/vendor/pi-protocol/protocol.js +85 -0
  1468. package/vendor/pi-protocol/protocol.js.map +1 -0
  1469. package/dist/bun/register-bedrock.d.ts +0 -2
  1470. package/dist/bun/register-bedrock.d.ts.map +0 -1
  1471. package/dist/bun/register-bedrock.js +0 -4
  1472. package/dist/bun/register-bedrock.js.map +0 -1
  1473. package/dist/cli/experimental/auth.d.ts +0 -16
  1474. package/dist/cli/experimental/auth.d.ts.map +0 -1
  1475. package/dist/cli/experimental/auth.js +0 -13
  1476. package/dist/cli/experimental/auth.js.map +0 -1
  1477. package/dist/cli/experimental/cli.d.ts +0 -6
  1478. package/dist/cli/experimental/cli.d.ts.map +0 -1
  1479. package/dist/cli/experimental/cli.js +0 -5
  1480. package/dist/cli/experimental/cli.js.map +0 -1
  1481. package/dist/cli/experimental/command-options.d.ts +0 -17
  1482. package/dist/cli/experimental/command-options.d.ts.map +0 -1
  1483. package/dist/cli/experimental/command-options.js +0 -35
  1484. package/dist/cli/experimental/command-options.js.map +0 -1
  1485. package/dist/cli/experimental/command.d.ts +0 -63
  1486. package/dist/cli/experimental/command.d.ts.map +0 -1
  1487. package/dist/cli/experimental/command.js +0 -127
  1488. package/dist/cli/experimental/command.js.map +0 -1
  1489. package/dist/cli/experimental/commands/client.d.ts +0 -13
  1490. package/dist/cli/experimental/commands/client.d.ts.map +0 -1
  1491. package/dist/cli/experimental/commands/client.js +0 -25
  1492. package/dist/cli/experimental/commands/client.js.map +0 -1
  1493. package/dist/cli/experimental/commands/pi.d.ts +0 -15
  1494. package/dist/cli/experimental/commands/pi.d.ts.map +0 -1
  1495. package/dist/cli/experimental/commands/pi.js +0 -28
  1496. package/dist/cli/experimental/commands/pi.js.map +0 -1
  1497. package/dist/cli/experimental/commands/server.d.ts +0 -13
  1498. package/dist/cli/experimental/commands/server.d.ts.map +0 -1
  1499. package/dist/cli/experimental/commands/server.js +0 -25
  1500. package/dist/cli/experimental/commands/server.js.map +0 -1
  1501. package/dist/cli/experimental/transport-address.d.ts +0 -10
  1502. package/dist/cli/experimental/transport-address.d.ts.map +0 -1
  1503. package/dist/cli/experimental/transport-address.js +0 -38
  1504. package/dist/cli/experimental/transport-address.js.map +0 -1
  1505. package/dist/client/remote-session.d.ts +0 -53
  1506. package/dist/client/remote-session.d.ts.map +0 -1
  1507. package/dist/client/remote-session.js +0 -340
  1508. package/dist/client/remote-session.js.map +0 -1
  1509. package/dist/client/transcript.d.ts +0 -12
  1510. package/dist/client/transcript.d.ts.map +0 -1
  1511. package/dist/client/transcript.js +0 -98
  1512. package/dist/client/transcript.js.map +0 -1
  1513. package/dist/server/create-harness.d.ts +0 -26
  1514. package/dist/server/create-harness.d.ts.map +0 -1
  1515. package/dist/server/create-harness.js +0 -106
  1516. package/dist/server/create-harness.js.map +0 -1
  1517. package/dist/utils/clipboard-native.d.ts +0 -11
  1518. package/dist/utils/clipboard-native.d.ts.map +0 -1
  1519. package/dist/utils/clipboard-native.js +0 -20
  1520. package/dist/utils/clipboard-native.js.map +0 -1
  1521. package/docs/AGENTS.md +0 -67
  1522. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts +0 -100
  1523. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts.map +0 -1
  1524. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +0 -420
  1525. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js.map +0 -1
  1526. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts +0 -9
  1527. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +0 -1
  1528. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +0 -18
  1529. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js.map +0 -1
  1530. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts +0 -3
  1531. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts.map +0 -1
  1532. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +0 -2
  1533. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js.map +0 -1
  1534. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts +0 -65
  1535. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +0 -1
  1536. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +0 -320
  1537. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +0 -1
  1538. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts +0 -4
  1539. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts.map +0 -1
  1540. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +0 -762
  1541. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +0 -1
  1542. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts +0 -29
  1543. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts.map +0 -1
  1544. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +0 -103
  1545. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +0 -1
  1546. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts +0 -69
  1547. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts.map +0 -1
  1548. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +0 -159
  1549. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js.map +0 -1
  1550. package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-modifiers.c +0 -70
  1551. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
  1552. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
  1553. package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-console-mode.c +0 -119
  1554. package/node_modules/@mariozechner/clipboard/.yarnrc.yml +0 -1
  1555. package/node_modules/@mariozechner/clipboard/Cargo.toml +0 -45
  1556. package/node_modules/@mariozechner/clipboard/README.md +0 -60
  1557. package/node_modules/@mariozechner/clipboard/build.rs +0 -5
  1558. package/node_modules/@mariozechner/clipboard/exp.ts +0 -12
  1559. package/node_modules/@mariozechner/clipboard/index.d.ts +0 -37
  1560. package/node_modules/@mariozechner/clipboard/index.js +0 -606
  1561. package/node_modules/@mariozechner/clipboard/package.json +0 -45
  1562. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/common.rs +0 -307
  1563. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/mod.rs +0 -93
  1564. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/ios.rs +0 -313
  1565. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/macos.rs +0 -471
  1566. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/mod.rs +0 -252
  1567. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/wayland.rs +0 -431
  1568. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/win.rs +0 -712
  1569. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/x11.rs +0 -916
  1570. package/node_modules/@mariozechner/clipboard/src/lib.rs +0 -194
  1571. package/vendor/pi-client/session-handle.d.ts +0 -54
  1572. package/vendor/pi-client/session-handle.d.ts.map +0 -1
  1573. package/vendor/pi-client/session-handle.js +0 -50
  1574. package/vendor/pi-client/session-handle.js.map +0 -1
  1575. package/vendor/pi-client/state.d.ts +0 -22
  1576. package/vendor/pi-client/state.d.ts.map +0 -1
  1577. package/vendor/pi-client/state.js +0 -145
  1578. package/vendor/pi-client/state.js.map +0 -1
  1579. package/vendor/pi-protocol/schemas.d.ts +0 -13739
  1580. package/vendor/pi-protocol/schemas.d.ts.map +0 -1
  1581. package/vendor/pi-protocol/schemas.js +0 -386
  1582. package/vendor/pi-protocol/schemas.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../../src/core/extensions/loader.ts"],"names":[],"mappings":"AAAA,iKAAiK;AACjK;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,a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,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,EAAE,YAAY,CAAC,CAAC;IAC1E,QAAQ,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,CAAC;IAE/C,6CAA6C;IAC7C,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;IAC/D,QAAQ,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC;IAEhD,iCAAiC;IACjC,KAAK,MAAM,CAAC,IAAI,eAAe,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/E,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;YACpE,sDAAsD;YACtD,MAAM,OAAO,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;YAClD,IAAI,OAAO,EAAE,CAAC;gBACb,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAClB,SAAS;YACV,CAAC;YACD,+DAA+D;YAC/D,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC5C,SAAS;QACV,CAAC;QAED,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,cAAc,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC","sourcesContent":["// allow: SIZE_OK - extension loading, bundled aliases, and discovery are pre-existing cohesive runtime glue; this branch only scopes the extension cache by cwd.\n/**\n * Extension loader - loads TypeScript extension modules using jiti.\n *\n */\n\nimport * as fs from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport * as _bundledPiAgentCore from \"@earendil-works/pi-agent-core\";\nimport type { Provider } from \"@earendil-works/pi-ai\";\nimport * as _bundledPiAiCompat from \"@earendil-works/pi-ai/compat\";\nimport * as _bundledPiAiOauth from \"@earendil-works/pi-ai/oauth\";\nimport * as _bundledPiAiProviders from \"@earendil-works/pi-ai/providers/all\";\nimport type { KeyId } from \"@earendil-works/pi-tui\";\nimport * as _bundledPiTui from \"@earendil-works/pi-tui\";\nimport { createJiti } from \"jiti/static\";\n// Static imports of packages that extensions may use.\n// These MUST be static so Bun bundles them into the compiled binary.\n// The virtualModules option then makes them available to extensions.\nimport * as _bundledTypebox from \"typebox\";\nimport * as _bundledTypeboxCompile from \"typebox/compile\";\nimport * as _bundledTypeboxValue from \"typebox/value\";\nimport { CONFIG_DIR_NAME, getAgentDir, isBunBinary } from \"../../config.ts\";\n// NOTE: This import works because loader.ts exports are NOT re-exported from index.ts,\n// avoiding a circular dependency. Extensions can import from @code-yeongyu/senpi.\nimport * as _bundledPiCodingAgent from \"../../index.ts\";\nimport { resolvePath } from \"../../utils/paths.ts\";\nimport { createEventBus, type EventBus, EXTENSION_RPC_EVENT_CHANNEL, type ExtensionRpcEvent } from \"../event-bus.ts\";\nimport type { ExecOptions } from \"../exec.ts\";\nimport { execCommand } from \"../exec.ts\";\nimport { readPiManifest } from \"../pi-manifest.ts\";\nimport { createSyntheticSourceInfo } from \"../source-info.ts\";\nimport { time } from \"../timings.ts\";\nimport { type ReadClassifier, registerReadClassifier } from \"../tools/read-classifiers.ts\";\nimport { validateMcpServerDeclaration } from \"./builtin/mcp/config-schema.ts\";\nimport type {\n\tEntryRenderer,\n\tExtension,\n\tExtensionAPI,\n\tExtensionFactory,\n\tExtensionRuntime,\n\tFilesystemPolicy,\n\tLazyToolActivator,\n\tLoadExtensionsResult,\n\tMarkdownTransformer,\n\tMessageRenderer,\n\tPendingProviderRegistration,\n\tProviderConfig,\n\tRegisteredCommand,\n\tRegisteredMcpServerDeclaration,\n\tToolDefinition,\n} from \"./types.ts\";\n\n/** Modules available to extensions via virtualModules (for compiled binaries) */\nconst VIRTUAL_MODULES: Record<string, unknown> = {\n\ttypebox: _bundledTypebox,\n\t\"typebox/compile\": _bundledTypeboxCompile,\n\t\"typebox/value\": _bundledTypeboxValue,\n\t\"@sinclair/typebox\": _bundledTypebox,\n\t\"@sinclair/typebox/compile\": _bundledTypeboxCompile,\n\t\"@sinclair/typebox/value\": _bundledTypeboxValue,\n\t\"@earendil-works/pi-agent-core\": _bundledPiAgentCore,\n\t\"@earendil-works/pi-tui\": _bundledPiTui,\n\t// Extensions resolve the pi-ai root to the compat entrypoint (a strict\n\t// superset of the core entrypoint): existing extensions using the old\n\t// global API keep working at runtime until compat is removed.\n\t\"@earendil-works/pi-ai\": _bundledPiAiCompat,\n\t\"@earendil-works/pi-ai/compat\": _bundledPiAiCompat,\n\t\"@earendil-works/pi-ai/oauth\": _bundledPiAiOauth,\n\t\"@earendil-works/pi-ai/providers/all\": _bundledPiAiProviders,\n\t\"@earendil-works/pi-coding-agent\": _bundledPiCodingAgent,\n\t\"@mariozechner/pi-agent-core\": _bundledPiAgentCore,\n\t\"@mariozechner/pi-tui\": _bundledPiTui,\n\t\"@mariozechner/pi-ai\": _bundledPiAiCompat,\n\t\"@mariozechner/pi-ai/compat\": _bundledPiAiCompat,\n\t\"@mariozechner/pi-ai/oauth\": _bundledPiAiOauth,\n\t\"@mariozechner/pi-ai/providers/all\": _bundledPiAiProviders,\n\t\"@mariozechner/pi-coding-agent\": _bundledPiCodingAgent,\n\t\"@code-yeongyu/senpi\": _bundledPiCodingAgent,\n};\n\nconst require = createRequire(import.meta.url);\n\nconst isNodeSeaBinary =\n\t(\"sea\" in process.features && process.features.sea === true) ||\n\tprocess.getBuiltinModule(\"node:sea\")?.isSea() === true;\ndeclare const PI_BUNDLED_NODE: boolean;\nconst isBundledNode = typeof PI_BUNDLED_NODE !== \"undefined\" && PI_BUNDLED_NODE;\nconst isTypeScriptSourceRuntime = !isBunBinary && path.extname(fileURLToPath(import.meta.url)) === \".ts\";\n\n/**\n * Get aliases for jiti (used in built Node.js mode).\n * In compiled binary mode, virtualModules is used instead.\n */\nlet _aliases: Record<string, string> | null = null;\n\nfunction getAliases(): Record<string, string> {\n\tif (_aliases) return _aliases;\n\n\tconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\tconst typeboxEntry = require.resolve(\"typebox\");\n\tconst typeboxCompileEntry = require.resolve(\"typebox/compile\");\n\tconst typeboxValueEntry = require.resolve(\"typebox/value\");\n\n\tconst codingAgentPackageRoot = path.resolve(__dirname, \"../../..\");\n\tconst packagesRoot = path.dirname(codingAgentPackageRoot);\n\tconst resolveWorkspaceOrBundled = (\n\t\tpackageName: string,\n\t\tpackageEntryRelativePath: string,\n\t\tworkspaceRelativePath: string,\n\t\tsourceRelativePath: string,\n\t\tspecifier: string,\n\t): string => {\n\t\tconst bundledPath = path.join(codingAgentPackageRoot, \"node_modules\", packageName, packageEntryRelativePath);\n\t\tif (fs.existsSync(bundledPath)) {\n\t\t\treturn bundledPath;\n\t\t}\n\t\tconst workspacePath = path.join(packagesRoot, workspaceRelativePath);\n\t\tif (fs.existsSync(workspacePath)) {\n\t\t\treturn workspacePath;\n\t\t}\n\t\tconst sourcePath = path.join(packagesRoot, sourceRelativePath);\n\t\tif (fs.existsSync(sourcePath)) {\n\t\t\treturn sourcePath;\n\t\t}\n\t\treturn typeof import.meta.resolve === \"function\"\n\t\t\t? fileURLToPath(import.meta.resolve(specifier))\n\t\t\t: require.resolve(specifier);\n\t};\n\n\tconst piCodingAgentDistEntry = path.join(codingAgentPackageRoot, \"dist/index.js\");\n\tconst piCodingAgentSourceEntry = path.join(codingAgentPackageRoot, \"src/index.ts\");\n\tconst piCodingAgentEntry = fs.existsSync(piCodingAgentDistEntry) ? piCodingAgentDistEntry : piCodingAgentSourceEntry;\n\tconst piAgentCoreEntry = resolveWorkspaceOrBundled(\n\t\t\"@earendil-works/pi-agent-core\",\n\t\t\"dist/index.js\",\n\t\t\"agent/dist/index.js\",\n\t\t\"agent/src/index.ts\",\n\t\t\"@earendil-works/pi-agent-core\",\n\t);\n\tconst piTuiEntry = resolveWorkspaceOrBundled(\n\t\t\"@earendil-works/pi-tui\",\n\t\t\"dist/index.js\",\n\t\t\"tui/dist/index.js\",\n\t\t\"tui/src/index.ts\",\n\t\t\"@earendil-works/pi-tui\",\n\t);\n\tconst piAiCompatEntry = resolveWorkspaceOrBundled(\n\t\t\"@earendil-works/pi-ai\",\n\t\t\"dist/compat.js\",\n\t\t\"ai/dist/compat.js\",\n\t\t\"ai/src/compat.ts\",\n\t\t\"@earendil-works/pi-ai/compat\",\n\t);\n\tconst piAiOauthEntry = resolveWorkspaceOrBundled(\n\t\t\"@earendil-works/pi-ai\",\n\t\t\"dist/oauth.js\",\n\t\t\"ai/dist/oauth.js\",\n\t\t\"ai/src/oauth.ts\",\n\t\t\"@earendil-works/pi-ai/oauth\",\n\t);\n\tconst piAiProvidersEntry = resolveWorkspaceOrBundled(\n\t\t\"@earendil-works/pi-ai\",\n\t\t\"dist/providers/all.js\",\n\t\t\"ai/dist/providers/all.js\",\n\t\t\"ai/src/providers/all.ts\",\n\t\t\"@earendil-works/pi-ai/providers/all\",\n\t);\n\n\t_aliases = {\n\t\t\"@earendil-works/pi-coding-agent\": piCodingAgentEntry,\n\t\t\"@earendil-works/pi-agent-core\": piAgentCoreEntry,\n\t\t\"@earendil-works/pi-tui\": piTuiEntry,\n\t\t\"@earendil-works/pi-ai/providers/all\": piAiProvidersEntry,\n\t\t\"@earendil-works/pi-ai/compat\": piAiCompatEntry,\n\t\t\"@earendil-works/pi-ai/oauth\": piAiOauthEntry,\n\t\t\"@earendil-works/pi-ai\": piAiCompatEntry,\n\t\t\"@code-yeongyu/senpi\": piCodingAgentEntry,\n\t\t\"@mariozechner/pi-coding-agent\": piCodingAgentEntry,\n\t\t\"@mariozechner/pi-agent-core\": piAgentCoreEntry,\n\t\t\"@mariozechner/pi-tui\": piTuiEntry,\n\t\t\"@mariozechner/pi-ai/providers/all\": piAiProvidersEntry,\n\t\t\"@mariozechner/pi-ai/compat\": piAiCompatEntry,\n\t\t\"@mariozechner/pi-ai/oauth\": piAiOauthEntry,\n\t\t\"@mariozechner/pi-ai\": piAiCompatEntry,\n\t\ttypebox: typeboxEntry,\n\t\t\"typebox/compile\": typeboxCompileEntry,\n\t\t\"typebox/value\": typeboxValueEntry,\n\t\t\"@sinclair/typebox\": typeboxEntry,\n\t\t\"@sinclair/typebox/compile\": typeboxCompileEntry,\n\t\t\"@sinclair/typebox/value\": typeboxValueEntry,\n\t};\n\n\treturn _aliases;\n}\n\ntype HandlerFn = (...args: unknown[]) => Promise<unknown>;\ntype ExtensionModuleImporter = ReturnType<typeof createJiti>;\nexport type ExtensionFactoryResolver = (extensionPath: string, resolvedPath: string) => ExtensionFactory | undefined;\n\nconst MAX_EXTENSION_CACHE_CWD_ENTRIES = 16;\nlet nextExtensionCacheGeneration = 0;\nconst extensionCacheByCwd = new Map<string, ExtensionCacheEntry>();\n\ninterface ExtensionCacheToken {\n\tcwd: string;\n\tgeneration: number;\n}\n\ninterface ExtensionCacheEntry {\n\tcwd: string;\n\tgeneration: number;\n\tfactories: Map<string, ExtensionFactory>;\n}\n\nexport function clearExtensionCache(): void {\n\textensionCacheByCwd.clear();\n}\n\nfunction useExtensionCacheCwd(cwd: string): ExtensionCacheToken {\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst existingEntry = extensionCacheByCwd.get(resolvedCwd);\n\tif (existingEntry) {\n\t\textensionCacheByCwd.delete(resolvedCwd);\n\t\textensionCacheByCwd.set(resolvedCwd, existingEntry);\n\t\treturn { cwd: existingEntry.cwd, generation: existingEntry.generation };\n\t}\n\tif (extensionCacheByCwd.size >= MAX_EXTENSION_CACHE_CWD_ENTRIES) {\n\t\tconst leastRecentlyUsedCwd = extensionCacheByCwd.keys().next().value;\n\t\tif (leastRecentlyUsedCwd !== undefined) {\n\t\t\textensionCacheByCwd.delete(leastRecentlyUsedCwd);\n\t\t}\n\t}\n\tconst entry: ExtensionCacheEntry = {\n\t\tcwd: resolvedCwd,\n\t\tgeneration: nextExtensionCacheGeneration++,\n\t\tfactories: new Map<string, ExtensionFactory>(),\n\t};\n\textensionCacheByCwd.set(resolvedCwd, entry);\n\treturn { cwd: entry.cwd, generation: entry.generation };\n}\n\n/**\n * Create a runtime with throwing stubs for action methods.\n * Runner.bindCore() replaces these with real implementations.\n */\nexport function createExtensionRuntime(): ExtensionRuntime {\n\tconst notInitialized = () => {\n\t\tthrow new Error(\"Extension runtime not initialized. Action methods cannot be called during extension loading.\");\n\t};\n\tconst state: { staleMessage?: string } = {};\n\t// Shared sequence across the legacy and native pre-bind queues so flushers\n\t// can replay registrations in original call order (last-registration-wins).\n\tlet nextProviderRegistrationOrder = 0;\n\tconst eventBusUnsubscribers = new Set<() => void>();\n\tconst assertActive = () => {\n\t\tif (state.staleMessage) {\n\t\t\tthrow new Error(state.staleMessage);\n\t\t}\n\t};\n\n\tconst runtime: ExtensionRuntime = {\n\t\tsendMessage: notInitialized,\n\t\tsendUserMessage: notInitialized,\n\t\tappendEntry: notInitialized,\n\t\tsetSessionName: notInitialized,\n\t\tgetSessionName: notInitialized,\n\t\tsetLabel: notInitialized,\n\t\texecuteTool: () => Promise.reject(new Error(\"Extension runtime not initialized\")),\n\t\tgetActiveTools: notInitialized,\n\t\tgetAllTools: notInitialized,\n\t\tsetActiveTools: notInitialized,\n\t\t// registerTool() is valid during extension load; refresh is only needed post-bind.\n\t\trefreshTools: () => {},\n\t\tregisterRemovedToolHint: () => {},\n\t\tregisterLazyToolActivator: () => {},\n\t\tgetCommands: notInitialized,\n\t\tsetModel: () => Promise.reject(new Error(\"Extension runtime not initialized\")),\n\t\tgetThinkingLevel: notInitialized,\n\t\tsetThinkingLevel: notInitialized,\n\t\tsetSessionModel: () => Promise.reject(new Error(\"Extension runtime not initialized\")),\n\t\tsetSessionThinkingLevel: notInitialized,\n\t\tsetSessionFastMode: notInitialized,\n\t\tflagValues: new Map(),\n\t\tpendingProviderRegistrations: [],\n\t\tpendingNativeProviderRegistrations: [],\n\t\tassertActive,\n\t\tinvalidate: (message) => {\n\t\t\tif (state.staleMessage) return;\n\t\t\tstate.staleMessage =\n\t\t\t\tmessage ??\n\t\t\t\t\"This extension ctx is stale after session replacement or reload. Do not use a captured pi or command ctx after ctx.newSession(), ctx.fork(), ctx.switchSession(), or ctx.reload(). For newSession, fork, and switchSession, move post-replacement work into withSession and use the ctx passed to withSession. For reload, do not use the old ctx after await ctx.reload().\";\n\t\t\tfor (const unsubscribe of eventBusUnsubscribers) unsubscribe();\n\t\t\teventBusUnsubscribers.clear();\n\t\t},\n\t\ttrackEventBusSubscription: (unsubscribe) => {\n\t\t\tlet active = true;\n\t\t\tconst trackedUnsubscribe = () => {\n\t\t\t\tif (!active) return;\n\t\t\t\tactive = false;\n\t\t\t\teventBusUnsubscribers.delete(trackedUnsubscribe);\n\t\t\t\tunsubscribe();\n\t\t\t};\n\t\t\teventBusUnsubscribers.add(trackedUnsubscribe);\n\t\t\treturn trackedUnsubscribe;\n\t\t},\n\t\t// Pre-bind: queue registrations so bindCore() can flush them once the\n\t\t// model registry is available. bindCore() replaces both with direct calls.\n\t\tregisterProvider: (name, config, extensionPath = \"<unknown>\") => {\n\t\t\truntime.pendingProviderRegistrations.push({\n\t\t\t\tname,\n\t\t\t\tconfig,\n\t\t\t\textensionPath,\n\t\t\t\torder: nextProviderRegistrationOrder++,\n\t\t\t});\n\t\t},\n\t\tregisterNativeProvider: (provider, extensionPath = \"<unknown>\") => {\n\t\t\truntime.pendingNativeProviderRegistrations.push({\n\t\t\t\tprovider,\n\t\t\t\textensionPath,\n\t\t\t\torder: nextProviderRegistrationOrder++,\n\t\t\t});\n\t\t},\n\t\tunregisterProvider: (name) => {\n\t\t\truntime.pendingProviderRegistrations = runtime.pendingProviderRegistrations.filter((r) => r.name !== name);\n\t\t\truntime.pendingNativeProviderRegistrations = runtime.pendingNativeProviderRegistrations.filter(\n\t\t\t\t(r) => r.provider.id !== name,\n\t\t\t);\n\t\t},\n\t};\n\n\treturn runtime;\n}\n\n/**\n * Drain queued pre-bind provider registrations in original call order.\n *\n * Legacy (name/config) and native registrations queue in separate arrays during\n * extension loading, each stamped with a shared sequence number. Flushers replay\n * entries ordered by that sequence so mixed registerProvider(name, config) /\n * registerProvider(provider) calls keep last-registration-wins. Clears both queues.\n */\nexport function drainPendingProviderRegistrations(runtime: ExtensionRuntime): PendingProviderRegistration[] {\n\tconst drained: PendingProviderRegistration[] = [\n\t\t...runtime.pendingProviderRegistrations.map((entry) => ({ kind: \"config\" as const, ...entry })),\n\t\t...runtime.pendingNativeProviderRegistrations.map((entry) => ({ kind: \"native\" as const, ...entry })),\n\t];\n\tdrained.sort((a, b) => a.order - b.order);\n\truntime.pendingProviderRegistrations = [];\n\truntime.pendingNativeProviderRegistrations = [];\n\treturn drained;\n}\n\n/**\n * Create the ExtensionAPI for an extension.\n * Registration methods write to the extension object.\n * Action methods delegate to the shared runtime.\n */\nfunction createExtensionAPI(\n\textension: Extension,\n\truntime: ExtensionRuntime,\n\tcwd: string,\n\teventBus: EventBus,\n\tsharedHostEnabled: boolean,\n): { api: ExtensionAPI; commit: () => void; discard: () => void } {\n\tconst pendingFlagValues = new Map<string, boolean | string>();\n\tconst pendingRuntimeChanges: Array<() => void> = [];\n\tconst loadingUnsubscribers: Array<() => void> = [];\n\tlet state: \"loading\" | \"active\" | \"failed\" = \"loading\";\n\tconst assertActive = () => {\n\t\tif (state === \"failed\") {\n\t\t\tthrow new Error(`Extension \"${extension.path}\" failed to load and its API is no longer active.`);\n\t\t}\n\t\truntime.assertActive();\n\t};\n\tconst applyRuntimeChange = (change: () => void) => {\n\t\tif (state === \"loading\") pendingRuntimeChanges.push(change);\n\t\telse change();\n\t};\n\tconst clearPending = () => {\n\t\tpendingFlagValues.clear();\n\t\tpendingRuntimeChanges.length = 0;\n\t\tloadingUnsubscribers.length = 0;\n\t};\n\n\tconst api = {\n\t\tcwd,\n\t\tsharedHostEnabled,\n\n\t\t// Registration methods - write to extension\n\t\ton(event: string, handler: HandlerFn): void {\n\t\t\tassertActive();\n\t\t\tconst list = extension.handlers.get(event) ?? [];\n\t\t\tlist.push(handler);\n\t\t\textension.handlers.set(event, list);\n\t\t},\n\n\t\tregisterTool(tool: ToolDefinition): void {\n\t\t\truntime.assertActive();\n\t\t\tif (tool.name === \"tool_search\" && extension.sourceInfo.source !== \"builtin\") {\n\t\t\t\tthrow new Error('Tool name \"tool_search\" is reserved for the builtin tool-search extension.');\n\t\t\t}\n\t\t\textension.tools.set(tool.name, {\n\t\t\t\tdefinition: tool,\n\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t});\n\t\t\truntime.refreshTools();\n\t\t},\n\n\t\tregisterLazyToolActivator(activator: LazyToolActivator): void {\n\t\t\truntime.assertActive();\n\t\t\tconst activators = extension.lazyToolActivators ?? [];\n\t\t\tactivators.push(activator);\n\t\t\textension.lazyToolActivators = activators;\n\t\t\truntime.registerLazyToolActivator(activator);\n\t\t},\n\n\t\tregisterRemovedToolHint(name: string, hint: string): void {\n\t\t\truntime.assertActive();\n\t\t\tlet hints = extension.removedToolHints;\n\t\t\tif (!hints) {\n\t\t\t\thints = new Map();\n\t\t\t\textension.removedToolHints = hints;\n\t\t\t}\n\t\t\thints.set(name, hint);\n\t\t\truntime.registerRemovedToolHint(name, hint);\n\t\t},\n\n\t\tregisterFilesystemPolicy(policy: FilesystemPolicy): void {\n\t\t\truntime.assertActive();\n\t\t\tconst policies = extension.filesystemPolicies ?? [];\n\t\t\tpolicies.push(policy);\n\t\t\textension.filesystemPolicies = policies;\n\t\t},\n\n\t\tregisterCommand(name: string, options: Omit<RegisteredCommand, \"name\" | \"sourceInfo\">): void {\n\t\t\tassertActive();\n\t\t\textension.commands.set(name, {\n\t\t\t\tname,\n\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\n\t\tregisterShortcut(\n\t\t\tshortcut: KeyId,\n\t\t\toptions: {\n\t\t\t\tdescription?: string;\n\t\t\t\thandler: (ctx: import(\"./types.ts\").ExtensionContext) => Promise<void> | void;\n\t\t\t},\n\t\t): void {\n\t\t\tassertActive();\n\t\t\textension.shortcuts.set(shortcut, { shortcut, extensionPath: extension.path, ...options });\n\t\t},\n\n\t\tregisterFlag(\n\t\t\tname: string,\n\t\t\toptions: { description?: string; type: \"boolean\" | \"string\"; default?: boolean | string },\n\t\t): void {\n\t\t\tassertActive();\n\t\t\tif (options.default !== undefined && typeof options.default !== options.type) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Invalid default for flag \"${name}\": expected ${options.type}, got ${typeof options.default}`,\n\t\t\t\t);\n\t\t\t}\n\t\t\textension.flags.set(name, { name, extensionPath: extension.path, ...options });\n\t\t\tif (options.default !== undefined && !runtime.flagValues.has(name)) {\n\t\t\t\tif (state === \"loading\") {\n\t\t\t\t\tif (!pendingFlagValues.has(name)) pendingFlagValues.set(name, options.default);\n\t\t\t\t} else {\n\t\t\t\t\truntime.flagValues.set(name, options.default);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tregisterMessageRenderer<T>(customType: string, renderer: MessageRenderer<T>): void {\n\t\t\tassertActive();\n\t\t\textension.messageRenderers.set(customType, renderer as MessageRenderer);\n\t\t},\n\n\t\tregisterMarkdownTransformer(transformer: MarkdownTransformer): void {\n\t\t\tassertActive();\n\t\t\textension.markdownTransformer = transformer;\n\t\t},\n\n\t\tregisterEntryRenderer<T>(customType: string, renderer: EntryRenderer<T>): void {\n\t\t\tassertActive();\n\t\t\textension.entryRenderers ??= new Map();\n\t\t\textension.entryRenderers.set(customType, renderer as EntryRenderer);\n\t\t},\n\n\t\tregisterReadClassifier(classifier: ReadClassifier): () => void {\n\t\t\tassertActive();\n\t\t\tconst unregister = runtime.trackEventBusSubscription(registerReadClassifier(classifier));\n\t\t\tif (state === \"loading\") loadingUnsubscribers.push(unregister);\n\t\t\treturn unregister;\n\t\t},\n\n\t\tregisterMcpServer(name: string, config: RegisteredMcpServerDeclaration[\"config\"]): void {\n\t\t\truntime.assertActive();\n\t\t\tconst error = validateMcpServerDeclaration(name, config);\n\t\t\tif (error) {\n\t\t\t\tthrow new Error(error);\n\t\t\t}\n\t\t\textension.mcpServers.set(name, {\n\t\t\t\tname,\n\t\t\t\tconfig,\n\t\t\t\textensionPath: extension.path,\n\t\t\t\tregistrationCwd: extension.registrationCwd,\n\t\t\t});\n\t\t},\n\n\t\t// Flag access - checks extension registered it, reads from runtime\n\t\tgetFlag(name: string): boolean | string | undefined {\n\t\t\tassertActive();\n\t\t\tif (!extension.flags.has(name)) return undefined;\n\t\t\treturn runtime.flagValues.has(name) ? runtime.flagValues.get(name) : pendingFlagValues.get(name);\n\t\t},\n\n\t\t// Action methods - delegate to shared runtime\n\t\tsendMessage(message, options): void {\n\t\t\tassertActive();\n\t\t\truntime.sendMessage(message, options);\n\t\t},\n\n\t\tsendUserMessage(content, options): void {\n\t\t\tassertActive();\n\t\t\truntime.sendUserMessage(content, options);\n\t\t},\n\n\t\tappendEntry(customType: string, data?: unknown): void {\n\t\t\tassertActive();\n\t\t\truntime.appendEntry(customType, data);\n\t\t},\n\n\t\tsetSessionName(name: string): void {\n\t\t\tassertActive();\n\t\t\truntime.setSessionName(name);\n\t\t},\n\n\t\tgetSessionName(): string | undefined {\n\t\t\tassertActive();\n\t\t\treturn runtime.getSessionName();\n\t\t},\n\n\t\tsetLabel(entryId: string, label: string | undefined): void {\n\t\t\tassertActive();\n\t\t\truntime.setLabel(entryId, label);\n\t\t},\n\n\t\texec(command: string, args: string[], options?: ExecOptions) {\n\t\t\tassertActive();\n\t\t\treturn execCommand(command, args, options?.cwd ?? cwd, options);\n\t\t},\n\n\t\texecuteTool(toolName, params, options) {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.executeTool(toolName, params, options);\n\t\t},\n\n\t\tgetActiveTools(): string[] {\n\t\t\tassertActive();\n\t\t\treturn runtime.getActiveTools();\n\t\t},\n\n\t\tgetAllTools() {\n\t\t\tassertActive();\n\t\t\treturn runtime.getAllTools();\n\t\t},\n\n\t\tsetActiveTools(toolNames: string[]): void {\n\t\t\tassertActive();\n\t\t\truntime.setActiveTools(toolNames);\n\t\t},\n\n\t\tgetCommands() {\n\t\t\tassertActive();\n\t\t\treturn runtime.getCommands();\n\t\t},\n\n\t\tsetModel(model) {\n\t\t\tassertActive();\n\t\t\treturn runtime.setModel(model);\n\t\t},\n\n\t\tgetThinkingLevel() {\n\t\t\tassertActive();\n\t\t\treturn runtime.getThinkingLevel();\n\t\t},\n\n\t\tsetThinkingLevel(level) {\n\t\t\tassertActive();\n\t\t\truntime.setThinkingLevel(level);\n\t\t},\n\n\t\tsetSessionModel(model) {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.setSessionModel(model);\n\t\t},\n\n\t\tsetSessionThinkingLevel(level) {\n\t\t\truntime.assertActive();\n\t\t\truntime.setSessionThinkingLevel(level);\n\t\t},\n\n\t\tsetSessionFastMode(enabled) {\n\t\t\truntime.assertActive();\n\t\t\truntime.setSessionFastMode(enabled);\n\t\t},\n\n\t\tregisterProvider(providerOrName: Provider | string, config?: ProviderConfig) {\n\t\t\tassertActive();\n\t\t\tif (typeof providerOrName === \"string\") {\n\t\t\t\tif (!config) throw new Error(\"Provider config is required when registering by name\");\n\t\t\t\tapplyRuntimeChange(() => runtime.registerProvider(providerOrName, config, extension.path));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tapplyRuntimeChange(() => runtime.registerNativeProvider(providerOrName, extension.path));\n\t\t},\n\n\t\tunregisterProvider(name: string) {\n\t\t\tassertActive();\n\t\t\tapplyRuntimeChange(() => runtime.unregisterProvider(name, extension.path));\n\t\t},\n\n\t\trpc: {\n\t\t\temit(name, data) {\n\t\t\t\truntime.assertActive();\n\t\t\t\tconst normalizedName = name.trim();\n\t\t\t\tif (normalizedName.length === 0) throw new Error(\"RPC extension event name must not be empty\");\n\t\t\t\teventBus.emit(EXTENSION_RPC_EVENT_CHANNEL, {\n\t\t\t\t\tname: normalizedName,\n\t\t\t\t\tdata,\n\t\t\t\t} satisfies ExtensionRpcEvent);\n\t\t\t},\n\t\t\thandle(name, handler) {\n\t\t\t\truntime.assertActive();\n\t\t\t\tconst normalizedName = name.trim();\n\t\t\t\tif (normalizedName.length === 0) throw new Error(\"RPC extension request name must not be empty\");\n\t\t\t\tconst handlers = extension.rpcHandlers ?? new Map();\n\t\t\t\tif (handlers.has(normalizedName)) {\n\t\t\t\t\tthrow new Error(`RPC extension request handler already registered: ${normalizedName}`);\n\t\t\t\t}\n\t\t\t\thandlers.set(normalizedName, handler);\n\t\t\t\textension.rpcHandlers = handlers;\n\t\t\t},\n\t\t},\n\t\tevents: {\n\t\t\temit(channel, data) {\n\t\t\t\tassertActive();\n\t\t\t\teventBus.emit(channel, data);\n\t\t\t},\n\t\t\ton(channel, handler) {\n\t\t\t\tassertActive();\n\t\t\t\tconst unsubscribe = runtime.trackEventBusSubscription(eventBus.on(channel, handler));\n\t\t\t\tif (state === \"loading\") loadingUnsubscribers.push(unsubscribe);\n\t\t\t\treturn unsubscribe;\n\t\t\t},\n\t\t},\n\t} as ExtensionAPI;\n\n\treturn {\n\t\tapi,\n\t\tcommit: () => {\n\t\t\tif (state !== \"loading\") return;\n\t\t\truntime.assertActive();\n\t\t\tfor (const [name, value] of pendingFlagValues) {\n\t\t\t\tif (!runtime.flagValues.has(name)) runtime.flagValues.set(name, value);\n\t\t\t}\n\t\t\tfor (const apply of pendingRuntimeChanges) apply();\n\t\t\tstate = \"active\";\n\t\t\tclearPending();\n\t\t},\n\t\tdiscard: () => {\n\t\t\tif (state !== \"loading\") return;\n\t\t\tstate = \"failed\";\n\t\t\tfor (const unsubscribe of loadingUnsubscribers) unsubscribe();\n\t\t\tclearPending();\n\t\t},\n\t};\n}\n\nfunction createExtensionModuleImporter(): ExtensionModuleImporter {\n\treturn createJiti(import.meta.url, {\n\t\tmoduleCache: false,\n\t\t// Compiled binaries and the bundled Node distribution use embedded modules.\n\t\t// Source TypeScript reuses host modules and root tsconfig paths. Unbundled\n\t\t// Node builds use dist aliases.\n\t\t...(isBunBinary || isNodeSeaBinary || isBundledNode\n\t\t\t? { virtualModules: VIRTUAL_MODULES, tryNative: false }\n\t\t\t: isTypeScriptSourceRuntime\n\t\t\t\t? { alias: getAliases(), virtualModules: VIRTUAL_MODULES, tsconfigPaths: true }\n\t\t\t\t: { alias: getAliases() }),\n\t});\n}\n\nfunction isCurrentCacheToken(cacheToken: ExtensionCacheToken | undefined): cacheToken is ExtensionCacheToken {\n\tif (cacheToken === undefined) return false;\n\tconst cacheEntry = extensionCacheByCwd.get(cacheToken.cwd);\n\treturn cacheEntry?.generation === cacheToken.generation;\n}\n\nasync function loadExtensionModule(\n\textensionPath: string,\n\timporter: ExtensionModuleImporter,\n\tcacheToken?: ExtensionCacheToken,\n) {\n\tif (isCurrentCacheToken(cacheToken)) {\n\t\tconst cachedFactory = extensionCacheByCwd.get(cacheToken.cwd)?.factories.get(extensionPath);\n\t\tif (cachedFactory) {\n\t\t\treturn cachedFactory;\n\t\t}\n\t}\n\n\tconst module = await importer.import(extensionPath, { default: true });\n\tconst factory = module as ExtensionFactory;\n\tif (typeof factory !== \"function\") {\n\t\treturn undefined;\n\t}\n\tif (isCurrentCacheToken(cacheToken)) {\n\t\textensionCacheByCwd.get(cacheToken.cwd)?.factories.set(extensionPath, factory);\n\t}\n\treturn factory;\n}\n\n/**\n * Create an Extension object with empty collections.\n */\nfunction createExtension(extensionPath: string, resolvedPath: string, registrationCwd: string): Extension {\n\tconst source =\n\t\textensionPath.startsWith(\"<\") && extensionPath.endsWith(\">\")\n\t\t\t? extensionPath.slice(1, -1).split(\":\")[0] || \"temporary\"\n\t\t\t: \"local\";\n\tconst baseDir = extensionPath.startsWith(\"<\") ? undefined : path.dirname(resolvedPath);\n\n\treturn {\n\t\tpath: extensionPath,\n\t\tresolvedPath,\n\t\tsourceInfo: createSyntheticSourceInfo(extensionPath, { source, baseDir }),\n\t\thandlers: new Map(),\n\t\ttools: new Map(),\n\t\tremovedToolHints: new Map(),\n\t\tlazyToolActivators: [],\n\t\tfilesystemPolicies: [],\n\t\tmessageRenderers: new Map(),\n\t\tentryRenderers: undefined,\n\t\tcommands: new Map(),\n\t\trpcHandlers: new Map(),\n\t\tflags: new Map(),\n\t\tshortcuts: new Map(),\n\t\tmcpServers: new Map(),\n\t\tregistrationCwd,\n\t};\n}\n\nasync function initializeExtension(\n\tfactory: ExtensionFactory,\n\textensionPath: string,\n\tresolvedPath: string,\n\tcwd: string,\n\teventBus: EventBus,\n\truntime: ExtensionRuntime,\n\tsharedHostEnabled: boolean,\n): Promise<Extension> {\n\tconst extension = createExtension(extensionPath, resolvedPath, cwd);\n\tconst load = createExtensionAPI(extension, runtime, cwd, eventBus, sharedHostEnabled);\n\ttry {\n\t\tawait factory(load.api);\n\t\tload.commit();\n\t} catch (error) {\n\t\tload.discard();\n\t\tthrow error;\n\t}\n\ttime(`${extensionPath} factory`, \"extensions\");\n\treturn extension;\n}\n\nasync function loadExtension(\n\textensionPath: string,\n\tcwd: string,\n\teventBus: EventBus,\n\truntime: ExtensionRuntime,\n\tgetImporter: () => ExtensionModuleImporter,\n\tfactoryResolver?: ExtensionFactoryResolver,\n\tcacheToken?: ExtensionCacheToken,\n\tsharedHostEnabled = false,\n): Promise<{ extension: Extension | null; error: string | null }> {\n\tconst resolvedPath = resolvePath(extensionPath, cwd, { normalizeUnicodeSpaces: true });\n\n\ttry {\n\t\tconst factory =\n\t\t\tfactoryResolver?.(extensionPath, resolvedPath) ??\n\t\t\t(await loadExtensionModule(resolvedPath, getImporter(), cacheToken));\n\t\ttime(`${extensionPath} module import`, \"extensions\");\n\t\tif (!factory) {\n\t\t\treturn { extension: null, error: `Extension does not export a valid factory function: ${extensionPath}` };\n\t\t}\n\n\t\tconst extension = await initializeExtension(\n\t\t\tfactory,\n\t\t\textensionPath,\n\t\t\tresolvedPath,\n\t\t\tcwd,\n\t\t\teventBus,\n\t\t\truntime,\n\t\t\tsharedHostEnabled,\n\t\t);\n\t\treturn { extension, error: null };\n\t} catch (err) {\n\t\tconst message = err instanceof Error ? err.message : String(err);\n\t\treturn { extension: null, error: `Failed to load extension: ${message}` };\n\t}\n}\n\n/**\n * Create an Extension from an inline factory function.\n */\nexport async function loadExtensionFromFactory(\n\tfactory: ExtensionFactory,\n\tcwd: string,\n\teventBus: EventBus,\n\truntime: ExtensionRuntime,\n\textensionPath = \"<inline>\",\n\tsharedHostEnabled = false,\n): Promise<Extension> {\n\tconst resolvedCwd = resolvePath(cwd);\n\treturn initializeExtension(factory, extensionPath, extensionPath, resolvedCwd, eventBus, runtime, sharedHostEnabled);\n}\n\n/**\n * Load extensions from paths.\n */\nasync function loadExtensionsInternal(\n\tpaths: string[],\n\tcwd: string,\n\teventBus?: EventBus,\n\truntime?: ExtensionRuntime,\n\toptions?: { factoryResolver?: ExtensionFactoryResolver; sharedHostEnabled?: boolean },\n\tuseCache = false,\n): Promise<LoadExtensionsResult> {\n\tconst extensions: Extension[] = [];\n\tconst errors: Array<{ path: string; error: string }> = [];\n\tconst cacheToken = useCache ? useExtensionCacheCwd(cwd) : undefined;\n\tconst resolvedCwd = cacheToken?.cwd ?? resolvePath(cwd);\n\tconst resolvedEventBus = eventBus ?? createEventBus();\n\tconst resolvedRuntime = runtime ?? createExtensionRuntime();\n\tlet importer: ExtensionModuleImporter | undefined;\n\tconst getImporter = () => {\n\t\timporter ??= createExtensionModuleImporter();\n\t\treturn importer;\n\t};\n\n\tfor (const extPath of paths) {\n\t\tconst { extension, error } = await loadExtension(\n\t\t\textPath,\n\t\t\tresolvedCwd,\n\t\t\tresolvedEventBus,\n\t\t\tresolvedRuntime,\n\t\t\tgetImporter,\n\t\t\toptions?.factoryResolver,\n\t\t\tcacheToken,\n\t\t\toptions?.sharedHostEnabled ?? false,\n\t\t);\n\n\t\tif (error) {\n\t\t\terrors.push({ path: extPath, error });\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (extension) {\n\t\t\textensions.push(extension);\n\t\t}\n\t}\n\n\treturn {\n\t\textensions,\n\t\terrors,\n\t\truntime: resolvedRuntime,\n\t\teventBus: resolvedEventBus,\n\t};\n}\n\nexport async function loadExtensions(\n\tpaths: string[],\n\tcwd: string,\n\teventBus?: EventBus,\n\truntime?: ExtensionRuntime,\n\toptions?: { factoryResolver?: ExtensionFactoryResolver; sharedHostEnabled?: boolean },\n): Promise<LoadExtensionsResult> {\n\treturn loadExtensionsInternal(paths, cwd, eventBus, runtime, options);\n}\n\nexport async function loadExtensionsCached(\n\tpaths: string[],\n\tcwd: string,\n\teventBus?: EventBus,\n\truntime?: ExtensionRuntime,\n): Promise<LoadExtensionsResult> {\n\treturn loadExtensionsInternal(paths, cwd, eventBus, runtime, undefined, true);\n}\n\nfunction isExtensionFile(name: string): boolean {\n\treturn name.endsWith(\".ts\") || name.endsWith(\".js\");\n}\n\n/**\n * Resolve extension entry points from a directory.\n *\n * Checks for:\n * 1. package.json with \"pi.extensions\" field -> returns declared paths\n * 2. index.ts or index.js -> returns the index file\n *\n * Returns resolved paths or null if no entry points found.\n */\nfunction resolveExtensionEntries(dir: string): string[] | null {\n\t// Check for package.json with \"pi\" field first\n\tconst packageJsonPath = path.join(dir, \"package.json\");\n\tif (fs.existsSync(packageJsonPath)) {\n\t\tconst manifest = readPiManifest(packageJsonPath);\n\t\tif (manifest?.extensions?.length) {\n\t\t\tconst entries: string[] = [];\n\t\t\tfor (const extPath of manifest.extensions) {\n\t\t\t\tconst resolvedExtPath = path.resolve(dir, extPath);\n\t\t\t\tif (fs.existsSync(resolvedExtPath)) {\n\t\t\t\t\tentries.push(resolvedExtPath);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (entries.length > 0) {\n\t\t\t\treturn entries;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check for index.ts or index.js\n\tconst indexTs = path.join(dir, \"index.ts\");\n\tconst indexJs = path.join(dir, \"index.js\");\n\tif (fs.existsSync(indexTs)) {\n\t\treturn [indexTs];\n\t}\n\tif (fs.existsSync(indexJs)) {\n\t\treturn [indexJs];\n\t}\n\n\treturn null;\n}\n\n/**\n * Discover extensions in a directory.\n *\n * Discovery rules:\n * 1. Direct files: `extensions/*.ts` or `*.js` → load\n * 2. Subdirectory with index: `extensions/* /index.ts` or `index.js` → load\n * 3. Subdirectory with package.json: `extensions/* /package.json` with \"pi\" field → load what it declares\n *\n * No recursion beyond one level. Complex packages must use package.json manifest.\n */\nfunction discoverExtensionsInDir(dir: string): string[] {\n\tif (!fs.existsSync(dir)) {\n\t\treturn [];\n\t}\n\n\tconst discovered: string[] = [];\n\n\ttry {\n\t\tconst entries = fs.readdirSync(dir, { withFileTypes: true });\n\n\t\tfor (const entry of entries) {\n\t\t\tconst entryPath = path.join(dir, entry.name);\n\n\t\t\t// 1. Direct files: *.ts or *.js\n\t\t\tif ((entry.isFile() || entry.isSymbolicLink()) && isExtensionFile(entry.name)) {\n\t\t\t\tdiscovered.push(entryPath);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// 2 & 3. Subdirectories\n\t\t\tif (entry.isDirectory() || entry.isSymbolicLink()) {\n\t\t\t\tconst entries = resolveExtensionEntries(entryPath);\n\t\t\t\tif (entries) {\n\t\t\t\t\tdiscovered.push(...entries);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch {\n\t\treturn [];\n\t}\n\n\treturn discovered;\n}\n\n/**\n * Discover and load extensions from standard locations.\n */\nexport async function discoverAndLoadExtensions(\n\tconfiguredPaths: string[],\n\tcwd: string,\n\tagentDir: string = getAgentDir(),\n\teventBus?: EventBus,\n): Promise<LoadExtensionsResult> {\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst resolvedAgentDir = resolvePath(agentDir);\n\tconst allPaths: string[] = [];\n\tconst seen = new Set<string>();\n\n\tconst addPaths = (paths: string[]) => {\n\t\tfor (const p of paths) {\n\t\t\tconst resolved = path.resolve(p);\n\t\t\tif (!seen.has(resolved)) {\n\t\t\t\tseen.add(resolved);\n\t\t\t\tallPaths.push(p);\n\t\t\t}\n\t\t}\n\t};\n\n\t// 1. Project-local extensions: cwd/${CONFIG_DIR_NAME}/extensions/\n\tconst localExtDir = path.join(resolvedCwd, CONFIG_DIR_NAME, \"extensions\");\n\taddPaths(discoverExtensionsInDir(localExtDir));\n\n\t// 2. Global extensions: agentDir/extensions/\n\tconst globalExtDir = path.join(resolvedAgentDir, \"extensions\");\n\taddPaths(discoverExtensionsInDir(globalExtDir));\n\n\t// 3. Explicitly configured paths\n\tfor (const p of configuredPaths) {\n\t\tconst resolved = resolvePath(p, resolvedCwd, { normalizeUnicodeSpaces: true });\n\t\tif (fs.existsSync(resolved) && fs.statSync(resolved).isDirectory()) {\n\t\t\t// Check for package.json with pi manifest or index.ts\n\t\t\tconst entries = resolveExtensionEntries(resolved);\n\t\t\tif (entries) {\n\t\t\t\taddPaths(entries);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// No explicit entries - discover individual files in directory\n\t\t\taddPaths(discoverExtensionsInDir(resolved));\n\t\t\tcontinue;\n\t\t}\n\n\t\taddPaths([resolved]);\n\t}\n\n\treturn loadExtensions(allPaths, resolvedCwd, eventBus);\n}\n"]}
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../../src/core/extensions/loader.ts"],"names":[],"mappings":"AAAA,iKAAiK;AACjK;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,mBAAmB,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,kBAAkB,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,iBAAiB,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,qBAAqB,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAC;AACx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;IAE/C,6CAA6C;IAC7C,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;IAC/D,QAAQ,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC;IAEhD,iCAAiC;IACjC,KAAK,MAAM,CAAC,IAAI,eAAe,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/E,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;YACpE,sDAAsD;YACtD,MAAM,OAAO,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;YAClD,IAAI,OAAO,EAAE,CAAC;gBACb,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAClB,SAAS;YACV,CAAC;YACD,+DAA+D;YAC/D,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC5C,SAAS;QACV,CAAC;QAED,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,cAAc,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC","sourcesContent":["// allow: SIZE_OK - extension loading, bundled aliases, and discovery are pre-existing cohesive runtime glue; this branch only scopes the extension cache by cwd.\n/**\n * Extension loader - loads TypeScript extension modules using jiti.\n *\n */\n\nimport * as fs from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport * as _bundledPiAgentCore from \"@earendil-works/pi-agent-core\";\nimport type { Provider } from \"@earendil-works/pi-ai\";\nimport * as _bundledPiAiCompat from \"@earendil-works/pi-ai/compat\";\nimport * as _bundledPiAiOauth from \"@earendil-works/pi-ai/oauth\";\nimport * as _bundledPiAiProviders from \"@earendil-works/pi-ai/providers/all\";\nimport type { KeyId } from \"@earendil-works/pi-tui\";\nimport * as _bundledPiTui from \"@earendil-works/pi-tui\";\nimport { createJiti } from \"jiti/static\";\n// Static imports of packages that extensions may use.\n// These MUST be static so Bun bundles them into the compiled binary.\n// The virtualModules option then makes them available to extensions.\nimport * as _bundledTypebox from \"typebox\";\nimport * as _bundledTypeboxCompile from \"typebox/compile\";\nimport * as _bundledTypeboxValue from \"typebox/value\";\nimport { CONFIG_DIR_NAME, getAgentDir, isBunBinary, isBundledNode } from \"../../config.ts\";\n// NOTE: This import works because loader.ts exports are NOT re-exported from index.ts,\n// avoiding a circular dependency. Extensions can import from @code-yeongyu/senpi.\nimport * as _bundledPiCodingAgent from \"../../index.ts\";\nimport { resolvePath } from \"../../utils/paths.ts\";\nimport { createEventBus, type EventBus, EXTENSION_RPC_EVENT_CHANNEL, type ExtensionRpcEvent } from \"../event-bus.ts\";\nimport type { ExecOptions } from \"../exec.ts\";\nimport { execCommand } from \"../exec.ts\";\nimport { readPiManifest } from \"../pi-manifest.ts\";\nimport { createSyntheticSourceInfo } from \"../source-info.ts\";\nimport { time } from \"../timings.ts\";\nimport { type ReadClassifier, registerReadClassifier } from \"../tools/read-classifiers.ts\";\nimport { validateMcpServerDeclaration } from \"./builtin/mcp/config-schema.ts\";\nimport type {\n\tEntryRenderer,\n\tExtension,\n\tExtensionAPI,\n\tExtensionFactory,\n\tExtensionRuntime,\n\tFilesystemPolicy,\n\tLazyToolActivator,\n\tLoadExtensionsResult,\n\tMarkdownTransformer,\n\tMessageRenderer,\n\tPendingProviderRegistration,\n\tProviderConfig,\n\tRegisteredCommand,\n\tRegisteredMcpServerDeclaration,\n\tToolDefinition,\n} from \"./types.ts\";\n\n/** Modules available to extensions via virtualModules (for compiled binaries) */\nconst VIRTUAL_MODULES: Record<string, unknown> = {\n\ttypebox: _bundledTypebox,\n\t\"typebox/compile\": _bundledTypeboxCompile,\n\t\"typebox/value\": _bundledTypeboxValue,\n\t\"@sinclair/typebox\": _bundledTypebox,\n\t\"@sinclair/typebox/compile\": _bundledTypeboxCompile,\n\t\"@sinclair/typebox/value\": _bundledTypeboxValue,\n\t\"@earendil-works/pi-agent-core\": _bundledPiAgentCore,\n\t\"@earendil-works/pi-tui\": _bundledPiTui,\n\t// Extensions resolve the pi-ai root to the compat entrypoint (a strict\n\t// superset of the core entrypoint): existing extensions using the old\n\t// global API keep working at runtime until compat is removed.\n\t\"@earendil-works/pi-ai\": _bundledPiAiCompat,\n\t\"@earendil-works/pi-ai/compat\": _bundledPiAiCompat,\n\t\"@earendil-works/pi-ai/oauth\": _bundledPiAiOauth,\n\t\"@earendil-works/pi-ai/providers/all\": _bundledPiAiProviders,\n\t\"@earendil-works/pi-coding-agent\": _bundledPiCodingAgent,\n\t\"@mariozechner/pi-agent-core\": _bundledPiAgentCore,\n\t\"@mariozechner/pi-tui\": _bundledPiTui,\n\t\"@mariozechner/pi-ai\": _bundledPiAiCompat,\n\t\"@mariozechner/pi-ai/compat\": _bundledPiAiCompat,\n\t\"@mariozechner/pi-ai/oauth\": _bundledPiAiOauth,\n\t\"@mariozechner/pi-ai/providers/all\": _bundledPiAiProviders,\n\t\"@mariozechner/pi-coding-agent\": _bundledPiCodingAgent,\n\t\"@code-yeongyu/senpi\": _bundledPiCodingAgent,\n};\n\nconst require = createRequire(import.meta.url);\n\nconst isNodeSeaBinary =\n\t(\"sea\" in process.features && process.features.sea === true) ||\n\tprocess.getBuiltinModule(\"node:sea\")?.isSea() === true;\nconst isTypeScriptSourceRuntime = !isBunBinary && path.extname(fileURLToPath(import.meta.url)) === \".ts\";\n\n/**\n * Get aliases for jiti (used in built Node.js mode).\n * In compiled binary mode, virtualModules is used instead.\n */\nlet _aliases: Record<string, string> | null = null;\n\nfunction getAliases(): Record<string, string> {\n\tif (_aliases) return _aliases;\n\n\tconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\tconst typeboxEntry = require.resolve(\"typebox\");\n\tconst typeboxCompileEntry = require.resolve(\"typebox/compile\");\n\tconst typeboxValueEntry = require.resolve(\"typebox/value\");\n\n\tconst codingAgentPackageRoot = path.resolve(__dirname, \"../../..\");\n\tconst packagesRoot = path.dirname(codingAgentPackageRoot);\n\tconst resolveWorkspaceOrBundled = (\n\t\tpackageName: string,\n\t\tpackageEntryRelativePath: string,\n\t\tworkspaceRelativePath: string,\n\t\tsourceRelativePath: string,\n\t\tspecifier: string,\n\t): string => {\n\t\tconst bundledPath = path.join(codingAgentPackageRoot, \"node_modules\", packageName, packageEntryRelativePath);\n\t\tif (fs.existsSync(bundledPath)) {\n\t\t\treturn bundledPath;\n\t\t}\n\t\tconst workspacePath = path.join(packagesRoot, workspaceRelativePath);\n\t\tif (fs.existsSync(workspacePath)) {\n\t\t\treturn workspacePath;\n\t\t}\n\t\tconst sourcePath = path.join(packagesRoot, sourceRelativePath);\n\t\tif (fs.existsSync(sourcePath)) {\n\t\t\treturn sourcePath;\n\t\t}\n\t\treturn typeof import.meta.resolve === \"function\"\n\t\t\t? fileURLToPath(import.meta.resolve(specifier))\n\t\t\t: require.resolve(specifier);\n\t};\n\n\tconst piCodingAgentDistEntry = path.join(codingAgentPackageRoot, \"dist/index.js\");\n\tconst piCodingAgentSourceEntry = path.join(codingAgentPackageRoot, \"src/index.ts\");\n\tconst piCodingAgentEntry = fs.existsSync(piCodingAgentDistEntry) ? piCodingAgentDistEntry : piCodingAgentSourceEntry;\n\tconst piAgentCoreEntry = resolveWorkspaceOrBundled(\n\t\t\"@earendil-works/pi-agent-core\",\n\t\t\"dist/index.js\",\n\t\t\"agent/dist/index.js\",\n\t\t\"agent/src/index.ts\",\n\t\t\"@earendil-works/pi-agent-core\",\n\t);\n\tconst piTuiEntry = resolveWorkspaceOrBundled(\n\t\t\"@earendil-works/pi-tui\",\n\t\t\"dist/index.js\",\n\t\t\"tui/dist/index.js\",\n\t\t\"tui/src/index.ts\",\n\t\t\"@earendil-works/pi-tui\",\n\t);\n\tconst piAiCompatEntry = resolveWorkspaceOrBundled(\n\t\t\"@earendil-works/pi-ai\",\n\t\t\"dist/compat.js\",\n\t\t\"ai/dist/compat.js\",\n\t\t\"ai/src/compat.ts\",\n\t\t\"@earendil-works/pi-ai/compat\",\n\t);\n\tconst piAiOauthEntry = resolveWorkspaceOrBundled(\n\t\t\"@earendil-works/pi-ai\",\n\t\t\"dist/oauth.js\",\n\t\t\"ai/dist/oauth.js\",\n\t\t\"ai/src/oauth.ts\",\n\t\t\"@earendil-works/pi-ai/oauth\",\n\t);\n\tconst piAiProvidersEntry = resolveWorkspaceOrBundled(\n\t\t\"@earendil-works/pi-ai\",\n\t\t\"dist/providers/all.js\",\n\t\t\"ai/dist/providers/all.js\",\n\t\t\"ai/src/providers/all.ts\",\n\t\t\"@earendil-works/pi-ai/providers/all\",\n\t);\n\n\t_aliases = {\n\t\t\"@earendil-works/pi-coding-agent\": piCodingAgentEntry,\n\t\t\"@earendil-works/pi-agent-core\": piAgentCoreEntry,\n\t\t\"@earendil-works/pi-tui\": piTuiEntry,\n\t\t\"@earendil-works/pi-ai/providers/all\": piAiProvidersEntry,\n\t\t\"@earendil-works/pi-ai/compat\": piAiCompatEntry,\n\t\t\"@earendil-works/pi-ai/oauth\": piAiOauthEntry,\n\t\t\"@earendil-works/pi-ai\": piAiCompatEntry,\n\t\t\"@code-yeongyu/senpi\": piCodingAgentEntry,\n\t\t\"@mariozechner/pi-coding-agent\": piCodingAgentEntry,\n\t\t\"@mariozechner/pi-agent-core\": piAgentCoreEntry,\n\t\t\"@mariozechner/pi-tui\": piTuiEntry,\n\t\t\"@mariozechner/pi-ai/providers/all\": piAiProvidersEntry,\n\t\t\"@mariozechner/pi-ai/compat\": piAiCompatEntry,\n\t\t\"@mariozechner/pi-ai/oauth\": piAiOauthEntry,\n\t\t\"@mariozechner/pi-ai\": piAiCompatEntry,\n\t\ttypebox: typeboxEntry,\n\t\t\"typebox/compile\": typeboxCompileEntry,\n\t\t\"typebox/value\": typeboxValueEntry,\n\t\t\"@sinclair/typebox\": typeboxEntry,\n\t\t\"@sinclair/typebox/compile\": typeboxCompileEntry,\n\t\t\"@sinclair/typebox/value\": typeboxValueEntry,\n\t};\n\n\treturn _aliases;\n}\n\ntype HandlerFn = (...args: unknown[]) => Promise<unknown>;\ntype ExtensionModuleImporter = ReturnType<typeof createJiti>;\nexport type ExtensionFactoryResolver = (extensionPath: string, resolvedPath: string) => ExtensionFactory | undefined;\n\nconst MAX_EXTENSION_CACHE_CWD_ENTRIES = 16;\nlet nextExtensionCacheGeneration = 0;\nconst extensionCacheByCwd = new Map<string, ExtensionCacheEntry>();\n\ninterface ExtensionCacheToken {\n\tcwd: string;\n\tgeneration: number;\n}\n\ninterface ExtensionCacheEntry {\n\tcwd: string;\n\tgeneration: number;\n\tfactories: Map<string, ExtensionFactory>;\n}\n\nexport function clearExtensionCache(): void {\n\textensionCacheByCwd.clear();\n}\n\nfunction useExtensionCacheCwd(cwd: string): ExtensionCacheToken {\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst existingEntry = extensionCacheByCwd.get(resolvedCwd);\n\tif (existingEntry) {\n\t\textensionCacheByCwd.delete(resolvedCwd);\n\t\textensionCacheByCwd.set(resolvedCwd, existingEntry);\n\t\treturn { cwd: existingEntry.cwd, generation: existingEntry.generation };\n\t}\n\tif (extensionCacheByCwd.size >= MAX_EXTENSION_CACHE_CWD_ENTRIES) {\n\t\tconst leastRecentlyUsedCwd = extensionCacheByCwd.keys().next().value;\n\t\tif (leastRecentlyUsedCwd !== undefined) {\n\t\t\textensionCacheByCwd.delete(leastRecentlyUsedCwd);\n\t\t}\n\t}\n\tconst entry: ExtensionCacheEntry = {\n\t\tcwd: resolvedCwd,\n\t\tgeneration: nextExtensionCacheGeneration++,\n\t\tfactories: new Map<string, ExtensionFactory>(),\n\t};\n\textensionCacheByCwd.set(resolvedCwd, entry);\n\treturn { cwd: entry.cwd, generation: entry.generation };\n}\n\n/**\n * Create a runtime with throwing stubs for action methods.\n * Runner.bindCore() replaces these with real implementations.\n */\nexport function createExtensionRuntime(): ExtensionRuntime {\n\tconst notInitialized = () => {\n\t\tthrow new Error(\"Extension runtime not initialized. Action methods cannot be called during extension loading.\");\n\t};\n\tconst state: { staleMessage?: string } = {};\n\t// Shared sequence across the legacy and native pre-bind queues so flushers\n\t// can replay registrations in original call order (last-registration-wins).\n\tlet nextProviderRegistrationOrder = 0;\n\tconst eventBusUnsubscribers = new Set<() => void>();\n\tconst assertActive = () => {\n\t\tif (state.staleMessage) {\n\t\t\tthrow new Error(state.staleMessage);\n\t\t}\n\t};\n\n\tconst runtime: ExtensionRuntime = {\n\t\tsendMessage: notInitialized,\n\t\tsendUserMessage: notInitialized,\n\t\tappendEntry: notInitialized,\n\t\tsetSessionName: notInitialized,\n\t\tgetSessionName: notInitialized,\n\t\tsetLabel: notInitialized,\n\t\texecuteTool: () => Promise.reject(new Error(\"Extension runtime not initialized\")),\n\t\tgetActiveTools: notInitialized,\n\t\tgetAllTools: notInitialized,\n\t\tsetActiveTools: notInitialized,\n\t\t// registerTool() is valid during extension load; refresh is only needed post-bind.\n\t\trefreshTools: () => {},\n\t\tregisterRemovedToolHint: () => {},\n\t\tregisterLazyToolActivator: () => {},\n\t\tgetCommands: notInitialized,\n\t\tsetModel: () => Promise.reject(new Error(\"Extension runtime not initialized\")),\n\t\tgetThinkingLevel: notInitialized,\n\t\tsetThinkingLevel: notInitialized,\n\t\tsetSessionModel: () => Promise.reject(new Error(\"Extension runtime not initialized\")),\n\t\tsetSessionThinkingLevel: notInitialized,\n\t\tsetSessionFastMode: notInitialized,\n\t\tflagValues: new Map(),\n\t\tpendingProviderRegistrations: [],\n\t\tpendingNativeProviderRegistrations: [],\n\t\tassertActive,\n\t\tinvalidate: (message) => {\n\t\t\tif (state.staleMessage) return;\n\t\t\tstate.staleMessage =\n\t\t\t\tmessage ??\n\t\t\t\t\"This extension ctx is stale after session replacement or reload. Do not use a captured pi or command ctx after ctx.newSession(), ctx.fork(), ctx.switchSession(), or ctx.reload(). For newSession, fork, and switchSession, move post-replacement work into withSession and use the ctx passed to withSession. For reload, do not use the old ctx after await ctx.reload().\";\n\t\t\tfor (const unsubscribe of eventBusUnsubscribers) unsubscribe();\n\t\t\teventBusUnsubscribers.clear();\n\t\t},\n\t\ttrackEventBusSubscription: (unsubscribe) => {\n\t\t\tlet active = true;\n\t\t\tconst trackedUnsubscribe = () => {\n\t\t\t\tif (!active) return;\n\t\t\t\tactive = false;\n\t\t\t\teventBusUnsubscribers.delete(trackedUnsubscribe);\n\t\t\t\tunsubscribe();\n\t\t\t};\n\t\t\teventBusUnsubscribers.add(trackedUnsubscribe);\n\t\t\treturn trackedUnsubscribe;\n\t\t},\n\t\t// Pre-bind: queue registrations so bindCore() can flush them once the\n\t\t// model registry is available. bindCore() replaces both with direct calls.\n\t\tregisterProvider: (name, config, extensionPath = \"<unknown>\") => {\n\t\t\truntime.pendingProviderRegistrations.push({\n\t\t\t\tname,\n\t\t\t\tconfig,\n\t\t\t\textensionPath,\n\t\t\t\torder: nextProviderRegistrationOrder++,\n\t\t\t});\n\t\t},\n\t\tregisterNativeProvider: (provider, extensionPath = \"<unknown>\") => {\n\t\t\truntime.pendingNativeProviderRegistrations.push({\n\t\t\t\tprovider,\n\t\t\t\textensionPath,\n\t\t\t\torder: nextProviderRegistrationOrder++,\n\t\t\t});\n\t\t},\n\t\tunregisterProvider: (name) => {\n\t\t\truntime.pendingProviderRegistrations = runtime.pendingProviderRegistrations.filter((r) => r.name !== name);\n\t\t\truntime.pendingNativeProviderRegistrations = runtime.pendingNativeProviderRegistrations.filter(\n\t\t\t\t(r) => r.provider.id !== name,\n\t\t\t);\n\t\t},\n\t};\n\n\treturn runtime;\n}\n\n/**\n * Drain queued pre-bind provider registrations in original call order.\n *\n * Legacy (name/config) and native registrations queue in separate arrays during\n * extension loading, each stamped with a shared sequence number. Flushers replay\n * entries ordered by that sequence so mixed registerProvider(name, config) /\n * registerProvider(provider) calls keep last-registration-wins. Clears both queues.\n */\nexport function drainPendingProviderRegistrations(runtime: ExtensionRuntime): PendingProviderRegistration[] {\n\tconst drained: PendingProviderRegistration[] = [\n\t\t...runtime.pendingProviderRegistrations.map((entry) => ({ kind: \"config\" as const, ...entry })),\n\t\t...runtime.pendingNativeProviderRegistrations.map((entry) => ({ kind: \"native\" as const, ...entry })),\n\t];\n\tdrained.sort((a, b) => a.order - b.order);\n\truntime.pendingProviderRegistrations = [];\n\truntime.pendingNativeProviderRegistrations = [];\n\treturn drained;\n}\n\n/**\n * Create the ExtensionAPI for an extension.\n * Registration methods write to the extension object.\n * Action methods delegate to the shared runtime.\n */\nfunction createExtensionAPI(\n\textension: Extension,\n\truntime: ExtensionRuntime,\n\tcwd: string,\n\teventBus: EventBus,\n\tsharedHostEnabled: boolean,\n): { api: ExtensionAPI; commit: () => void; discard: () => void } {\n\tconst pendingFlagValues = new Map<string, boolean | string>();\n\tconst pendingRuntimeChanges: Array<() => void> = [];\n\tconst loadingUnsubscribers: Array<() => void> = [];\n\tlet state: \"loading\" | \"active\" | \"failed\" = \"loading\";\n\tconst assertActive = () => {\n\t\tif (state === \"failed\") {\n\t\t\tthrow new Error(`Extension \"${extension.path}\" failed to load and its API is no longer active.`);\n\t\t}\n\t\truntime.assertActive();\n\t};\n\tconst applyRuntimeChange = (change: () => void) => {\n\t\tif (state === \"loading\") pendingRuntimeChanges.push(change);\n\t\telse change();\n\t};\n\tconst clearPending = () => {\n\t\tpendingFlagValues.clear();\n\t\tpendingRuntimeChanges.length = 0;\n\t\tloadingUnsubscribers.length = 0;\n\t};\n\n\tconst api = {\n\t\tcwd,\n\t\tsharedHostEnabled,\n\n\t\t// Registration methods - write to extension\n\t\ton(event: string, handler: HandlerFn): void {\n\t\t\tassertActive();\n\t\t\tconst list = extension.handlers.get(event) ?? [];\n\t\t\tlist.push(handler);\n\t\t\textension.handlers.set(event, list);\n\t\t},\n\n\t\tregisterTool(tool: ToolDefinition): void {\n\t\t\truntime.assertActive();\n\t\t\tif (tool.name === \"tool_search\" && extension.sourceInfo.source !== \"builtin\") {\n\t\t\t\tthrow new Error('Tool name \"tool_search\" is reserved for the builtin tool-search extension.');\n\t\t\t}\n\t\t\tif (typeof tool.parameters !== \"object\" || tool.parameters === null || Array.isArray(tool.parameters)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Tool \"${tool.name}\" registered by extension \"${extension.path}\" must define an object parameter schema.`,\n\t\t\t\t);\n\t\t\t}\n\t\t\textension.tools.set(tool.name, {\n\t\t\t\tdefinition: tool,\n\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t});\n\t\t\truntime.refreshTools();\n\t\t},\n\n\t\tregisterLazyToolActivator(activator: LazyToolActivator): void {\n\t\t\truntime.assertActive();\n\t\t\tconst activators = extension.lazyToolActivators ?? [];\n\t\t\tactivators.push(activator);\n\t\t\textension.lazyToolActivators = activators;\n\t\t\truntime.registerLazyToolActivator(activator);\n\t\t},\n\n\t\tregisterRemovedToolHint(name: string, hint: string): void {\n\t\t\truntime.assertActive();\n\t\t\tlet hints = extension.removedToolHints;\n\t\t\tif (!hints) {\n\t\t\t\thints = new Map();\n\t\t\t\textension.removedToolHints = hints;\n\t\t\t}\n\t\t\thints.set(name, hint);\n\t\t\truntime.registerRemovedToolHint(name, hint);\n\t\t},\n\n\t\tregisterFilesystemPolicy(policy: FilesystemPolicy): void {\n\t\t\truntime.assertActive();\n\t\t\tconst policies = extension.filesystemPolicies ?? [];\n\t\t\tpolicies.push(policy);\n\t\t\textension.filesystemPolicies = policies;\n\t\t},\n\n\t\tregisterCommand(name: string, options: Omit<RegisteredCommand, \"name\" | \"sourceInfo\">): void {\n\t\t\tassertActive();\n\t\t\textension.commands.set(name, {\n\t\t\t\tname,\n\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\n\t\tregisterShortcut(\n\t\t\tshortcut: KeyId,\n\t\t\toptions: {\n\t\t\t\tdescription?: string;\n\t\t\t\thandler: (ctx: import(\"./types.ts\").ExtensionContext) => Promise<void> | void;\n\t\t\t},\n\t\t): void {\n\t\t\tassertActive();\n\t\t\textension.shortcuts.set(shortcut, { shortcut, extensionPath: extension.path, ...options });\n\t\t},\n\n\t\tregisterFlag(\n\t\t\tname: string,\n\t\t\toptions: { description?: string; type: \"boolean\" | \"string\"; default?: boolean | string },\n\t\t): void {\n\t\t\tassertActive();\n\t\t\tif (options.default !== undefined && typeof options.default !== options.type) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Invalid default for flag \"${name}\": expected ${options.type}, got ${typeof options.default}`,\n\t\t\t\t);\n\t\t\t}\n\t\t\textension.flags.set(name, { name, extensionPath: extension.path, ...options });\n\t\t\tif (options.default !== undefined && !runtime.flagValues.has(name)) {\n\t\t\t\tif (state === \"loading\") {\n\t\t\t\t\tif (!pendingFlagValues.has(name)) pendingFlagValues.set(name, options.default);\n\t\t\t\t} else {\n\t\t\t\t\truntime.flagValues.set(name, options.default);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tregisterMessageRenderer<T>(customType: string, renderer: MessageRenderer<T>): void {\n\t\t\tassertActive();\n\t\t\textension.messageRenderers.set(customType, renderer as MessageRenderer);\n\t\t},\n\n\t\tregisterMarkdownTransformer(transformer: MarkdownTransformer): void {\n\t\t\tassertActive();\n\t\t\textension.markdownTransformer = transformer;\n\t\t},\n\n\t\tregisterEntryRenderer<T>(customType: string, renderer: EntryRenderer<T>): void {\n\t\t\tassertActive();\n\t\t\textension.entryRenderers ??= new Map();\n\t\t\textension.entryRenderers.set(customType, renderer as EntryRenderer);\n\t\t},\n\n\t\tregisterReadClassifier(classifier: ReadClassifier): () => void {\n\t\t\tassertActive();\n\t\t\tconst unregister = runtime.trackEventBusSubscription(registerReadClassifier(classifier));\n\t\t\tif (state === \"loading\") loadingUnsubscribers.push(unregister);\n\t\t\treturn unregister;\n\t\t},\n\n\t\tregisterMcpServer(name: string, config: RegisteredMcpServerDeclaration[\"config\"]): void {\n\t\t\truntime.assertActive();\n\t\t\tconst error = validateMcpServerDeclaration(name, config);\n\t\t\tif (error) {\n\t\t\t\tthrow new Error(error);\n\t\t\t}\n\t\t\textension.mcpServers.set(name, {\n\t\t\t\tname,\n\t\t\t\tconfig,\n\t\t\t\textensionPath: extension.path,\n\t\t\t\tregistrationCwd: extension.registrationCwd,\n\t\t\t});\n\t\t},\n\n\t\t// Flag access - checks extension registered it, reads from runtime\n\t\tgetFlag(name: string): boolean | string | undefined {\n\t\t\tassertActive();\n\t\t\tif (!extension.flags.has(name)) return undefined;\n\t\t\treturn runtime.flagValues.has(name) ? runtime.flagValues.get(name) : pendingFlagValues.get(name);\n\t\t},\n\n\t\t// Action methods - delegate to shared runtime\n\t\tsendMessage(message, options): void {\n\t\t\tassertActive();\n\t\t\truntime.sendMessage(message, options);\n\t\t},\n\n\t\tsendUserMessage(content, options): void {\n\t\t\tassertActive();\n\t\t\truntime.sendUserMessage(content, options);\n\t\t},\n\n\t\tappendEntry(customType: string, data?: unknown): void {\n\t\t\tassertActive();\n\t\t\truntime.appendEntry(customType, data);\n\t\t},\n\n\t\tsetSessionName(name: string): void {\n\t\t\tassertActive();\n\t\t\truntime.setSessionName(name);\n\t\t},\n\n\t\tgetSessionName(): string | undefined {\n\t\t\tassertActive();\n\t\t\treturn runtime.getSessionName();\n\t\t},\n\n\t\tsetLabel(entryId: string, label: string | undefined): void {\n\t\t\tassertActive();\n\t\t\truntime.setLabel(entryId, label);\n\t\t},\n\n\t\texec(command: string, args: string[], options?: ExecOptions) {\n\t\t\tassertActive();\n\t\t\treturn execCommand(command, args, options?.cwd ?? cwd, options);\n\t\t},\n\n\t\texecuteTool(toolName, params, options) {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.executeTool(toolName, params, options);\n\t\t},\n\n\t\tgetActiveTools(): string[] {\n\t\t\tassertActive();\n\t\t\treturn runtime.getActiveTools();\n\t\t},\n\n\t\tgetAllTools() {\n\t\t\tassertActive();\n\t\t\treturn runtime.getAllTools();\n\t\t},\n\n\t\tsetActiveTools(toolNames: string[]): void {\n\t\t\tassertActive();\n\t\t\truntime.setActiveTools(toolNames);\n\t\t},\n\n\t\tgetCommands() {\n\t\t\tassertActive();\n\t\t\treturn runtime.getCommands();\n\t\t},\n\n\t\tsetModel(model) {\n\t\t\tassertActive();\n\t\t\treturn runtime.setModel(model);\n\t\t},\n\n\t\tgetThinkingLevel() {\n\t\t\tassertActive();\n\t\t\treturn runtime.getThinkingLevel();\n\t\t},\n\n\t\tsetThinkingLevel(level) {\n\t\t\tassertActive();\n\t\t\truntime.setThinkingLevel(level);\n\t\t},\n\n\t\tsetSessionModel(model) {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.setSessionModel(model);\n\t\t},\n\n\t\tsetSessionThinkingLevel(level) {\n\t\t\truntime.assertActive();\n\t\t\truntime.setSessionThinkingLevel(level);\n\t\t},\n\n\t\tsetSessionFastMode(enabled) {\n\t\t\truntime.assertActive();\n\t\t\truntime.setSessionFastMode(enabled);\n\t\t},\n\n\t\tregisterProvider(providerOrName: Provider | string, config?: ProviderConfig) {\n\t\t\tassertActive();\n\t\t\tif (typeof providerOrName === \"string\") {\n\t\t\t\tif (!config) throw new Error(\"Provider config is required when registering by name\");\n\t\t\t\tapplyRuntimeChange(() => runtime.registerProvider(providerOrName, config, extension.path));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tapplyRuntimeChange(() => runtime.registerNativeProvider(providerOrName, extension.path));\n\t\t},\n\n\t\tunregisterProvider(name: string) {\n\t\t\tassertActive();\n\t\t\tapplyRuntimeChange(() => runtime.unregisterProvider(name, extension.path));\n\t\t},\n\n\t\trpc: {\n\t\t\temit(name, data) {\n\t\t\t\truntime.assertActive();\n\t\t\t\tconst normalizedName = name.trim();\n\t\t\t\tif (normalizedName.length === 0) throw new Error(\"RPC extension event name must not be empty\");\n\t\t\t\teventBus.emit(EXTENSION_RPC_EVENT_CHANNEL, {\n\t\t\t\t\tname: normalizedName,\n\t\t\t\t\tdata,\n\t\t\t\t} satisfies ExtensionRpcEvent);\n\t\t\t},\n\t\t\thandle(name, handler) {\n\t\t\t\truntime.assertActive();\n\t\t\t\tconst normalizedName = name.trim();\n\t\t\t\tif (normalizedName.length === 0) throw new Error(\"RPC extension request name must not be empty\");\n\t\t\t\tconst handlers = extension.rpcHandlers ?? new Map();\n\t\t\t\tif (handlers.has(normalizedName)) {\n\t\t\t\t\tthrow new Error(`RPC extension request handler already registered: ${normalizedName}`);\n\t\t\t\t}\n\t\t\t\thandlers.set(normalizedName, handler);\n\t\t\t\textension.rpcHandlers = handlers;\n\t\t\t},\n\t\t},\n\t\tevents: {\n\t\t\temit(channel, data) {\n\t\t\t\tassertActive();\n\t\t\t\teventBus.emit(channel, data);\n\t\t\t},\n\t\t\ton(channel, handler) {\n\t\t\t\tassertActive();\n\t\t\t\tconst unsubscribe = runtime.trackEventBusSubscription(eventBus.on(channel, handler));\n\t\t\t\tif (state === \"loading\") loadingUnsubscribers.push(unsubscribe);\n\t\t\t\treturn unsubscribe;\n\t\t\t},\n\t\t},\n\t} as ExtensionAPI;\n\n\treturn {\n\t\tapi,\n\t\tcommit: () => {\n\t\t\tif (state !== \"loading\") return;\n\t\t\truntime.assertActive();\n\t\t\tfor (const [name, value] of pendingFlagValues) {\n\t\t\t\tif (!runtime.flagValues.has(name)) runtime.flagValues.set(name, value);\n\t\t\t}\n\t\t\tfor (const apply of pendingRuntimeChanges) apply();\n\t\t\tstate = \"active\";\n\t\t\tclearPending();\n\t\t},\n\t\tdiscard: () => {\n\t\t\tif (state !== \"loading\") return;\n\t\t\tstate = \"failed\";\n\t\t\tfor (const unsubscribe of loadingUnsubscribers) unsubscribe();\n\t\t\tclearPending();\n\t\t},\n\t};\n}\n\nfunction createExtensionModuleImporter(): ExtensionModuleImporter {\n\treturn createJiti(import.meta.url, {\n\t\tmoduleCache: false,\n\t\t// Compiled binaries and the bundled Node distribution use embedded modules.\n\t\t// Source TypeScript reuses host modules and root tsconfig paths. Unbundled\n\t\t// Node builds use dist aliases.\n\t\t...(isBunBinary || isNodeSeaBinary || isBundledNode\n\t\t\t? { virtualModules: VIRTUAL_MODULES, tryNative: false }\n\t\t\t: isTypeScriptSourceRuntime\n\t\t\t\t? { alias: getAliases(), virtualModules: VIRTUAL_MODULES, tsconfigPaths: true }\n\t\t\t\t: { alias: getAliases() }),\n\t});\n}\n\nfunction isCurrentCacheToken(cacheToken: ExtensionCacheToken | undefined): cacheToken is ExtensionCacheToken {\n\tif (cacheToken === undefined) return false;\n\tconst cacheEntry = extensionCacheByCwd.get(cacheToken.cwd);\n\treturn cacheEntry?.generation === cacheToken.generation;\n}\n\nasync function loadExtensionModule(\n\textensionPath: string,\n\timporter: ExtensionModuleImporter,\n\tcacheToken?: ExtensionCacheToken,\n) {\n\tif (isCurrentCacheToken(cacheToken)) {\n\t\tconst cachedFactory = extensionCacheByCwd.get(cacheToken.cwd)?.factories.get(extensionPath);\n\t\tif (cachedFactory) {\n\t\t\treturn cachedFactory;\n\t\t}\n\t}\n\n\tconst module = await importer.import(extensionPath, { default: true });\n\tconst factory = module as ExtensionFactory;\n\tif (typeof factory !== \"function\") {\n\t\treturn undefined;\n\t}\n\tif (isCurrentCacheToken(cacheToken)) {\n\t\textensionCacheByCwd.get(cacheToken.cwd)?.factories.set(extensionPath, factory);\n\t}\n\treturn factory;\n}\n\n/**\n * Create an Extension object with empty collections.\n */\nfunction createExtension(extensionPath: string, resolvedPath: string, registrationCwd: string): Extension {\n\tconst source =\n\t\textensionPath.startsWith(\"<\") && extensionPath.endsWith(\">\")\n\t\t\t? extensionPath.slice(1, -1).split(\":\")[0] || \"temporary\"\n\t\t\t: \"local\";\n\tconst baseDir = extensionPath.startsWith(\"<\") ? undefined : path.dirname(resolvedPath);\n\n\treturn {\n\t\tpath: extensionPath,\n\t\tresolvedPath,\n\t\tsourceInfo: createSyntheticSourceInfo(extensionPath, { source, baseDir }),\n\t\thandlers: new Map(),\n\t\ttools: new Map(),\n\t\tremovedToolHints: new Map(),\n\t\tlazyToolActivators: [],\n\t\tfilesystemPolicies: [],\n\t\tmessageRenderers: new Map(),\n\t\tentryRenderers: undefined,\n\t\tcommands: new Map(),\n\t\trpcHandlers: new Map(),\n\t\tflags: new Map(),\n\t\tshortcuts: new Map(),\n\t\tmcpServers: new Map(),\n\t\tregistrationCwd,\n\t};\n}\n\nasync function initializeExtension(\n\tfactory: ExtensionFactory,\n\textensionPath: string,\n\tresolvedPath: string,\n\tcwd: string,\n\teventBus: EventBus,\n\truntime: ExtensionRuntime,\n\tsharedHostEnabled: boolean,\n): Promise<Extension> {\n\tconst extension = createExtension(extensionPath, resolvedPath, cwd);\n\tconst load = createExtensionAPI(extension, runtime, cwd, eventBus, sharedHostEnabled);\n\ttry {\n\t\tawait factory(load.api);\n\t\tload.commit();\n\t} catch (error) {\n\t\tload.discard();\n\t\tthrow error;\n\t}\n\ttime(`${extensionPath} factory`, \"extensions\");\n\treturn extension;\n}\n\nasync function loadExtension(\n\textensionPath: string,\n\tcwd: string,\n\teventBus: EventBus,\n\truntime: ExtensionRuntime,\n\tgetImporter: () => ExtensionModuleImporter,\n\tfactoryResolver?: ExtensionFactoryResolver,\n\tcacheToken?: ExtensionCacheToken,\n\tsharedHostEnabled = false,\n): Promise<{ extension: Extension | null; error: string | null }> {\n\tconst resolvedPath = resolvePath(extensionPath, cwd, { normalizeUnicodeSpaces: true });\n\n\ttry {\n\t\tconst factory =\n\t\t\tfactoryResolver?.(extensionPath, resolvedPath) ??\n\t\t\t(await loadExtensionModule(resolvedPath, getImporter(), cacheToken));\n\t\ttime(`${extensionPath} module import`, \"extensions\");\n\t\tif (!factory) {\n\t\t\treturn { extension: null, error: `Extension does not export a valid factory function: ${extensionPath}` };\n\t\t}\n\n\t\tconst extension = await initializeExtension(\n\t\t\tfactory,\n\t\t\textensionPath,\n\t\t\tresolvedPath,\n\t\t\tcwd,\n\t\t\teventBus,\n\t\t\truntime,\n\t\t\tsharedHostEnabled,\n\t\t);\n\t\treturn { extension, error: null };\n\t} catch (err) {\n\t\tconst message = err instanceof Error ? err.message : String(err);\n\t\treturn { extension: null, error: `Failed to load extension: ${message}` };\n\t}\n}\n\n/**\n * Create an Extension from an inline factory function.\n */\nexport async function loadExtensionFromFactory(\n\tfactory: ExtensionFactory,\n\tcwd: string,\n\teventBus: EventBus,\n\truntime: ExtensionRuntime,\n\textensionPath = \"<inline>\",\n\tsharedHostEnabled = false,\n): Promise<Extension> {\n\tconst resolvedCwd = resolvePath(cwd);\n\treturn initializeExtension(factory, extensionPath, extensionPath, resolvedCwd, eventBus, runtime, sharedHostEnabled);\n}\n\n/**\n * Load extensions from paths.\n */\nasync function loadExtensionsInternal(\n\tpaths: string[],\n\tcwd: string,\n\teventBus?: EventBus,\n\truntime?: ExtensionRuntime,\n\toptions?: { factoryResolver?: ExtensionFactoryResolver; sharedHostEnabled?: boolean },\n\tuseCache = false,\n): Promise<LoadExtensionsResult> {\n\tconst extensions: Extension[] = [];\n\tconst errors: Array<{ path: string; error: string }> = [];\n\tconst cacheToken = useCache ? useExtensionCacheCwd(cwd) : undefined;\n\tconst resolvedCwd = cacheToken?.cwd ?? resolvePath(cwd);\n\tconst resolvedEventBus = eventBus ?? createEventBus();\n\tconst resolvedRuntime = runtime ?? createExtensionRuntime();\n\tlet importer: ExtensionModuleImporter | undefined;\n\tconst getImporter = () => {\n\t\timporter ??= createExtensionModuleImporter();\n\t\treturn importer;\n\t};\n\n\tfor (const extPath of paths) {\n\t\tconst { extension, error } = await loadExtension(\n\t\t\textPath,\n\t\t\tresolvedCwd,\n\t\t\tresolvedEventBus,\n\t\t\tresolvedRuntime,\n\t\t\tgetImporter,\n\t\t\toptions?.factoryResolver,\n\t\t\tcacheToken,\n\t\t\toptions?.sharedHostEnabled ?? false,\n\t\t);\n\n\t\tif (error) {\n\t\t\terrors.push({ path: extPath, error });\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (extension) {\n\t\t\textensions.push(extension);\n\t\t}\n\t}\n\n\treturn {\n\t\textensions,\n\t\terrors,\n\t\truntime: resolvedRuntime,\n\t\teventBus: resolvedEventBus,\n\t};\n}\n\nexport async function loadExtensions(\n\tpaths: string[],\n\tcwd: string,\n\teventBus?: EventBus,\n\truntime?: ExtensionRuntime,\n\toptions?: { factoryResolver?: ExtensionFactoryResolver; sharedHostEnabled?: boolean },\n): Promise<LoadExtensionsResult> {\n\treturn loadExtensionsInternal(paths, cwd, eventBus, runtime, options);\n}\n\nexport async function loadExtensionsCached(\n\tpaths: string[],\n\tcwd: string,\n\teventBus?: EventBus,\n\truntime?: ExtensionRuntime,\n): Promise<LoadExtensionsResult> {\n\treturn loadExtensionsInternal(paths, cwd, eventBus, runtime, undefined, true);\n}\n\nfunction isExtensionFile(name: string): boolean {\n\treturn name.endsWith(\".ts\") || name.endsWith(\".js\");\n}\n\n/**\n * Resolve extension entry points from a directory.\n *\n * Checks for:\n * 1. package.json with \"pi.extensions\" field -> returns declared paths\n * 2. index.ts or index.js -> returns the index file\n *\n * Returns resolved paths or null if no entry points found.\n */\nfunction resolveExtensionEntries(dir: string): string[] | null {\n\t// Check for package.json with \"pi\" field first\n\tconst packageJsonPath = path.join(dir, \"package.json\");\n\tif (fs.existsSync(packageJsonPath)) {\n\t\tconst manifest = readPiManifest(packageJsonPath);\n\t\tif (manifest?.extensions?.length) {\n\t\t\tconst entries: string[] = [];\n\t\t\tfor (const extPath of manifest.extensions) {\n\t\t\t\tconst resolvedExtPath = path.resolve(dir, extPath);\n\t\t\t\tif (fs.existsSync(resolvedExtPath)) {\n\t\t\t\t\tentries.push(resolvedExtPath);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (entries.length > 0) {\n\t\t\t\treturn entries;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check for index.ts or index.js\n\tconst indexTs = path.join(dir, \"index.ts\");\n\tconst indexJs = path.join(dir, \"index.js\");\n\tif (fs.existsSync(indexTs)) {\n\t\treturn [indexTs];\n\t}\n\tif (fs.existsSync(indexJs)) {\n\t\treturn [indexJs];\n\t}\n\n\treturn null;\n}\n\n/**\n * Discover extensions in a directory.\n *\n * Discovery rules:\n * 1. Direct files: `extensions/*.ts` or `*.js` → load\n * 2. Subdirectory with index: `extensions/* /index.ts` or `index.js` → load\n * 3. Subdirectory with package.json: `extensions/* /package.json` with \"pi\" field → load what it declares\n *\n * No recursion beyond one level. Complex packages must use package.json manifest.\n */\nfunction discoverExtensionsInDir(dir: string): string[] {\n\tif (!fs.existsSync(dir)) {\n\t\treturn [];\n\t}\n\n\tconst discovered: string[] = [];\n\n\ttry {\n\t\tconst entries = fs.readdirSync(dir, { withFileTypes: true });\n\n\t\tfor (const entry of entries) {\n\t\t\tconst entryPath = path.join(dir, entry.name);\n\n\t\t\t// 1. Direct files: *.ts or *.js\n\t\t\tif ((entry.isFile() || entry.isSymbolicLink()) && isExtensionFile(entry.name)) {\n\t\t\t\tdiscovered.push(entryPath);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// 2 & 3. Subdirectories\n\t\t\tif (entry.isDirectory() || entry.isSymbolicLink()) {\n\t\t\t\tconst entries = resolveExtensionEntries(entryPath);\n\t\t\t\tif (entries) {\n\t\t\t\t\tdiscovered.push(...entries);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch {\n\t\treturn [];\n\t}\n\n\treturn discovered;\n}\n\n/**\n * Discover and load extensions from standard locations.\n */\nexport async function discoverAndLoadExtensions(\n\tconfiguredPaths: string[],\n\tcwd: string,\n\tagentDir: string = getAgentDir(),\n\teventBus?: EventBus,\n): Promise<LoadExtensionsResult> {\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst resolvedAgentDir = resolvePath(agentDir);\n\tconst allPaths: string[] = [];\n\tconst seen = new Set<string>();\n\n\tconst addPaths = (paths: string[]) => {\n\t\tfor (const p of paths) {\n\t\t\tconst resolved = path.resolve(p);\n\t\t\tif (!seen.has(resolved)) {\n\t\t\t\tseen.add(resolved);\n\t\t\t\tallPaths.push(p);\n\t\t\t}\n\t\t}\n\t};\n\n\t// 1. Project-local extensions: cwd/${CONFIG_DIR_NAME}/extensions/\n\tconst localExtDir = path.join(resolvedCwd, CONFIG_DIR_NAME, \"extensions\");\n\taddPaths(discoverExtensionsInDir(localExtDir));\n\n\t// 2. Global extensions: agentDir/extensions/\n\tconst globalExtDir = path.join(resolvedAgentDir, \"extensions\");\n\taddPaths(discoverExtensionsInDir(globalExtDir));\n\n\t// 3. Explicitly configured paths\n\tfor (const p of configuredPaths) {\n\t\tconst resolved = resolvePath(p, resolvedCwd, { normalizeUnicodeSpaces: true });\n\t\tif (fs.existsSync(resolved) && fs.statSync(resolved).isDirectory()) {\n\t\t\t// Check for package.json with pi manifest or index.ts\n\t\t\tconst entries = resolveExtensionEntries(resolved);\n\t\t\tif (entries) {\n\t\t\t\taddPaths(entries);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// No explicit entries - discover individual files in directory\n\t\t\taddPaths(discoverExtensionsInDir(resolved));\n\t\t\tcontinue;\n\t\t}\n\n\t\taddPaths([resolved]);\n\t}\n\n\treturn loadExtensions(allPaths, resolvedCwd, eventBus);\n}\n"]}
@@ -5,6 +5,7 @@ export interface AppKeybindings {
5
5
  "app.exit": true;
6
6
  "app.suspend": true;
7
7
  "app.thinking.cycle": true;
8
+ "app.thinking.save": true;
8
9
  "app.model.cycleForward": true;
9
10
  "app.model.cycleBackward": true;
10
11
  "app.model.select": true;
@@ -16,6 +17,7 @@ export interface AppKeybindings {
16
17
  "app.message.copy": true;
17
18
  "app.message.followUp": true;
18
19
  "app.message.dequeue": true;
20
+ "app.question.answer": true;
19
21
  "app.clipboard.pasteImage": true;
20
22
  "app.session.new": true;
21
23
  "app.session.tree": true;
@@ -261,6 +263,10 @@ export declare const KEYBINDINGS: {
261
263
  readonly defaultKeys: "shift+tab";
262
264
  readonly description: "Cycle thinking level";
263
265
  };
266
+ readonly "app.thinking.save": {
267
+ readonly defaultKeys: "ctrl+s";
268
+ readonly description: "Save thinking level";
269
+ };
264
270
  readonly "app.model.cycleForward": {
265
271
  readonly defaultKeys: "ctrl+p";
266
272
  readonly description: "Cycle to next model";
@@ -305,6 +311,10 @@ export declare const KEYBINDINGS: {
305
311
  readonly defaultKeys: "alt+q" | "alt+up";
306
312
  readonly description: "Restore queued messages";
307
313
  };
314
+ readonly "app.question.answer": {
315
+ readonly defaultKeys: "alt+a";
316
+ readonly description: "Open the pending question";
317
+ };
308
318
  readonly "app.clipboard.pasteImage": {
309
319
  readonly defaultKeys: "alt+v" | "ctrl+v";
310
320
  readonly description: "Paste image from clipboard (text fallback)";
@@ -1 +1 @@
1
- {"version":3,"file":"keybindings.d.ts","sourceRoot":"","sources":["../../src/core/keybindings.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,UAAU,EAEf,KAAK,iBAAiB,EACtB,KAAK,KAAK,EAEV,kBAAkB,IAAI,qBAAqB,EAC3C,MAAM,wBAAwB,CAAC;AAMhC,MAAM,WAAW,cAAc;IAC9B,eAAe,EAAE,IAAI,CAAC;IACtB,WAAW,EAAE,IAAI,CAAC;IAClB,UAAU,EAAE,IAAI,CAAC;IACjB,aAAa,EAAE,IAAI,CAAC;IACpB,oBAAoB,EAAE,IAAI,CAAC;IAC3B,wBAAwB,EAAE,IAAI,CAAC;IAC/B,yBAAyB,EAAE,IAAI,CAAC;IAChC,kBAAkB,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,oBAAoB,EAAE,IAAI,CAAC;IACpC,kBAAkB,EAAE,IAAI,CAAC;IACzB,qBAAqB,EAAE,IAAI,CAAC;IAC5B,+BAA+B,EAAE,IAAI,CAAC;IACtC,qBAAqB,EAAE,IAAI,CAAC;IAC5B,kBAAkB,EAAE,IAAI,CAAC;IACzB,sBAAsB,EAAE,IAAI,CAAC;IAC7B,qBAAqB,EAAE,IAAI,CAAC;IAC5B,0BAA0B,EAAE,IAAI,CAAC;IACjC,iBAAiB,EAAE,IAAI,CAAC;IACxB,kBAAkB,EAAE,IAAI,CAAC;IACzB,kBAAkB,EAAE,IAAI,CAAC;IACzB,oB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
40
+ defaultKeys: "ctrl+s",
41
+ description: "Save thinking level",
42
+ },
39
43
  "app.model.cycleForward": {
40
44
  defaultKeys: "ctrl+p",
41
45
  description: "Cycle to next model",
@@ -71,6 +75,10 @@ export const KEYBINDINGS = {
71
75
  defaultKeys: windowsKeybindings ? "alt+q" : "alt+up",
72
76
  description: "Restore queued messages",
73
77
  },
78
+ "app.question.answer": {
79
+ defaultKeys: "alt+a",
80
+ description: "Open the pending question",
81
+ },
74
82
  "app.clipboard.pasteImage": {
75
83
  defaultKeys: windowsKeybindings ? "alt+v" : "ctrl+v",
76
84
  description: "Paste image from clipboard (text fallback)",
@@ -1 +1 @@
1
- {"version":3,"file":"keybindings.js","sourceRoot":"","sources":["../../src/core/keybindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,eAAe,EACf,kBAAkB,IAAI,qBAAqB,GAC3C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAoD5C,MAAM,UAAU,qBAAqB,CACpC,QAAQ,GAAoB,OAAO,CAAC,QAAQ,EAC5C,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,OAAO,QAAQ,KAAK,OAAO,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;AAC1G,CAAC;AAMD,MAAM,kBAAkB,GAAG,qBAAqB,EAAE,CAAC;AAEnD,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B,GAAG,eAAe;IAClB,iBAAiB,EAAE;QAClB,GAAG,eAAe,CAAC,iBAAiB,CAAC;QACrC,WAAW,EAAE,OAAO,CAAC,QAAQ,KA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AC,MAAM,CAAC,CAAC;IACxE,CAAC;CACD","sourcesContent":["import {\n\ttype Keybinding,\n\ttype KeybindingDefinitions,\n\ttype KeybindingsConfig,\n\ttype KeyId,\n\tTUI_KEYBINDINGS,\n\tKeybindingsManager as TuiKeybindingsManager,\n} from \"@earendil-works/pi-tui\";\nimport { existsSync, readFileSync } from \"fs\";\nimport { join } from \"path\";\nimport { getAgentDir } from \"../config.ts\";\nimport { stripBom } from \"../utils/text.ts\";\n\nexport interface AppKeybindings {\n\t\"app.interrupt\": true;\n\t\"app.clear\": true;\n\t\"app.exit\": true;\n\t\"app.suspend\": true;\n\t\"app.thinking.cycle\": true;\n\t\"app.model.cycleForward\": true;\n\t\"app.model.cycleBackward\": true;\n\t\"app.model.select\": true;\n\treadonly \"app.history.search\": true;\n\t\"app.tools.expand\": true;\n\t\"app.thinking.toggle\": true;\n\t\"app.session.toggleNamedFilter\": true;\n\t\"app.editor.external\": true;\n\t\"app.message.copy\": true;\n\t\"app.message.followUp\": true;\n\t\"app.message.dequeue\": true;\n\t\"app.clipboard.pasteImage\": true;\n\t\"app.session.new\": true;\n\t\"app.session.tree\": true;\n\t\"app.session.fork\": true;\n\t\"app.session.resume\": true;\n\t\"app.tree.foldOrUp\": true;\n\t\"app.tree.unfoldOrDown\": true;\n\t\"app.tree.editLabel\": true;\n\t\"app.tree.editMessage\": true;\n\t\"app.tree.toggleLabelTimestamp\": true;\n\t\"app.session.togglePath\": true;\n\t\"app.session.toggleSort\": true;\n\t\"app.session.rename\": true;\n\t\"app.session.delete\": true;\n\t\"app.session.deleteNoninvasive\": true;\n\t\"app.models.save\": true;\n\t\"app.models.toggleFavorite\": true;\n\t\"app.models.enableAll\": true;\n\t\"app.models.clearAll\": true;\n\t\"app.models.toggleProvider\": true;\n\t\"app.models.reorderUp\": true;\n\t\"app.models.reorderDown\": true;\n\t\"app.tree.filter.default\": true;\n\t\"app.tree.filter.noTools\": true;\n\t\"app.tree.filter.userOnly\": true;\n\t\"app.tree.filter.labeledOnly\": true;\n\t\"app.tree.filter.all\": true;\n\t\"app.tree.filter.cycleForward\": true;\n\t\"app.tree.filter.cycleBackward\": true;\n}\n\nexport type AppKeybinding = keyof AppKeybindings;\n\nexport function useWindowsKeybindings(\n\tplatform: NodeJS.Platform = process.platform,\n\tenv: NodeJS.ProcessEnv = process.env,\n): boolean {\n\treturn platform === \"win32\" || (platform === \"linux\" && Boolean(env.WSL_DISTRO_NAME || env.WSL_INTEROP));\n}\n\ndeclare module \"@earendil-works/pi-tui\" {\n\tinterface Keybindings extends AppKeybindings {}\n}\n\nconst windowsKeybindings = useWindowsKeybindings();\n\nexport const KEYBINDINGS = {\n\t...TUI_KEYBINDINGS,\n\t\"tui.editor.undo\": {\n\t\t...TUI_KEYBINDINGS[\"tui.editor.undo\"],\n\t\tdefaultKeys: process.platform === \"win32\" ? \"ctrl+z\" : windowsKeybindings ? \"alt+z\" : \"ctrl+-\",\n\t},\n\t\"tui.altScreen.previousPrompt\": {\n\t\t...TUI_KEYBINDINGS[\"tui.altScreen.previousPrompt\"],\n\t\tdefaultKeys: windowsKeybindings ? \"ctrl+up\" : [\"ctrl+shift+up\", \"ctrl+up\"],\n\t},\n\t\"tui.altScreen.nextPrompt\": {\n\t\t...TUI_KEYBINDINGS[\"tui.altScreen.nextPrompt\"],\n\t\tdefaultKeys: windowsKeybindings ? \"ctrl+down\" : [\"ctrl+shift+down\", \"ctrl+down\"],\n\t},\n\t\"tui.altScreen.search\": {\n\t\t...TUI_KEYBINDINGS[\"tui.altScreen.search\"],\n\t\tdefaultKeys: windowsKeybindings ? \"ctrl+f\" : \"ctrl+shift+f\",\n\t},\n\t\"app.interrupt\": { defaultKeys: \"escape\", description: \"Cancel or abort\" },\n\t\"app.clear\": { defaultKeys: \"ctrl+c\", description: \"Clear editor\" },\n\t\"app.exit\": { defaultKeys: \"ctrl+d\", description: \"Exit when editor is empty\" },\n\t\"app.suspend\": {\n\t\tdefaultKeys: process.platform === \"win32\" ? [] : \"ctrl+z\",\n\t\tdescription: \"Suspend to background\",\n\t},\n\t\"app.thinking.cycle\": {\n\t\tdefaultKeys: \"shift+tab\",\n\t\tdescription: \"Cycle thinking level\",\n\t},\n\t\"app.model.cycleForward\": {\n\t\tdefaultKeys: \"ctrl+p\",\n\t\tdescription: \"Cycle to next model\",\n\t},\n\t\"app.model.cycleBackward\": {\n\t\tdefaultKeys: windowsKeybindings ? \"alt+p\" : \"shift+ctrl+p\",\n\t\tdescription: \"Cycle to previous model\",\n\t},\n\t\"app.model.select\": { defaultKeys: \"ctrl+l\", description: \"Open model selector\" },\n\t\"app.history.search\": { defaultKeys: \"ctrl+r\", description: \"Search prompt history across sessions\" },\n\t\"app.tools.expand\": { defaultKeys: \"ctrl+o\", description: \"Toggle tool output\" },\n\t\"app.thinking.toggle\": {\n\t\tdefaultKeys: \"ctrl+t\",\n\t\tdescription: \"Toggle thinking blocks\",\n\t},\n\t\"app.session.toggleNamedFilter\": {\n\t\tdefaultKeys: \"ctrl+n\",\n\t\tdescription: \"Toggle named session filter\",\n\t},\n\t\"app.editor.external\": {\n\t\tdefaultKeys: \"ctrl+g\",\n\t\tdescription: \"Open external editor\",\n\t},\n\t\"app.message.copy\": {\n\t\tdefaultKeys: \"ctrl+x\",\n\t\tdescription: \"Copy message to clipboard\",\n\t},\n\t\"app.message.followUp\": {\n\t\tdefaultKeys: windowsKeybindings ? \"ctrl+q\" : \"alt+enter\",\n\t\tdescription: \"Queue follow-up message\",\n\t},\n\t\"app.message.dequeue\": {\n\t\tdefaultKeys: windowsKeybindings ? \"alt+q\" : \"alt+up\",\n\t\tdescription: \"Restore queued messages\",\n\t},\n\t\"app.clipboard.pasteImage\": {\n\t\tdefaultKeys: windowsKeybindings ? \"alt+v\" : \"ctrl+v\",\n\t\tdescription: \"Paste image from clipboard (text fallback)\",\n\t},\n\t\"app.session.new\": { defaultKeys: [], description: \"Start a new session\" },\n\t\"app.session.tree\": { defaultKeys: [], description: \"Open session tree\" },\n\t\"app.session.fork\": { defaultKeys: [], description: \"Fork current session\" },\n\t\"app.session.resume\": { defaultKeys: [], description: \"Resume a session\" },\n\t\"app.tree.foldOrUp\": {\n\t\tdefaultKeys: process.platform === \"darwin\" ? [\"alt+left\", \"ctrl+left\"] : [\"ctrl+left\", \"alt+left\"],\n\t\tdescription: \"Fold tree branch or move up\",\n\t},\n\t\"app.tree.unfoldOrDown\": {\n\t\tdefaultKeys: process.platform === \"darwin\" ? [\"alt+right\", \"ctrl+right\"] : [\"ctrl+right\", \"alt+right\"],\n\t\tdescription: \"Unfold tree branch or move down\",\n\t},\n\t\"app.tree.editLabel\": {\n\t\tdefaultKeys: \"shift+l\",\n\t\tdescription: \"Edit tree label\",\n\t},\n\t\"app.tree.editMessage\": {\n\t\tdefaultKeys: \"ctrl+e\",\n\t\tdescription: \"Edit the selected assistant response, or reopen a user message in the editor\",\n\t},\n\t\"app.tree.toggleLabelTimestamp\": {\n\t\tdefaultKeys: \"shift+t\",\n\t\tdescription: \"Toggle tree label timestamps\",\n\t},\n\t\"app.session.togglePath\": {\n\t\tdefaultKeys: \"ctrl+p\",\n\t\tdescription: \"Toggle session path display\",\n\t},\n\t\"app.session.toggleSort\": {\n\t\tdefaultKeys: \"ctrl+s\",\n\t\tdescription: \"Toggle session sort mode\",\n\t},\n\t\"app.session.rename\": {\n\t\tdefaultKeys: \"ctrl+r\",\n\t\tdescription: \"Rename session\",\n\t},\n\t\"app.session.delete\": {\n\t\tdefaultKeys: \"ctrl+d\",\n\t\tdescription: \"Delete session\",\n\t},\n\t\"app.session.deleteNoninvasive\": {\n\t\tdefaultKeys: \"ctrl+backspace\",\n\t\tdescription: \"Delete session when query is empty\",\n\t},\n\t\"app.models.save\": {\n\t\tdefaultKeys: \"ctrl+s\",\n\t\tdescription: \"Save model selection\",\n\t},\n\t\"app.models.toggleFavorite\": {\n\t\tdefaultKeys: \"ctrl+f\",\n\t\tdescription: \"Toggle favorite model\",\n\t},\n\t\"app.models.enableAll\": {\n\t\tdefaultKeys: \"ctrl+a\",\n\t\tdescription: \"Enable all models\",\n\t},\n\t\"app.models.clearAll\": {\n\t\tdefaultKeys: \"ctrl+x\",\n\t\tdescription: \"Clear all models\",\n\t},\n\t\"app.models.toggleProvider\": {\n\t\tdefaultKeys: \"ctrl+p\",\n\t\tdescription: \"Toggle all models for provider\",\n\t},\n\t\"app.models.reorderUp\": {\n\t\tdefaultKeys: \"alt+up\",\n\t\tdescription: \"Move model up in order\",\n\t},\n\t\"app.models.reorderDown\": {\n\t\tdefaultKeys: \"alt+down\",\n\t\tdescription: \"Move model down in order\",\n\t},\n\t\"app.tree.filter.default\": {\n\t\tdefaultKeys: \"ctrl+d\",\n\t\tdescription: \"Tree filter: default view\",\n\t},\n\t\"app.tree.filter.noTools\": {\n\t\tdefaultKeys: \"ctrl+t\",\n\t\tdescription: \"Tree filter: hide tool results\",\n\t},\n\t\"app.tree.filter.userOnly\": {\n\t\tdefaultKeys: \"ctrl+u\",\n\t\tdescription: \"Tree filter: user messages only\",\n\t},\n\t\"app.tree.filter.labeledOnly\": {\n\t\tdefaultKeys: \"ctrl+l\",\n\t\tdescription: \"Tree filter: labeled entries only\",\n\t},\n\t\"app.tree.filter.all\": {\n\t\tdefaultKeys: \"ctrl+a\",\n\t\tdescription: \"Tree filter: show all entries\",\n\t},\n\t\"app.tree.filter.cycleForward\": {\n\t\tdefaultKeys: \"ctrl+o\",\n\t\tdescription: \"Tree filter: cycle forward\",\n\t},\n\t\"app.tree.filter.cycleBackward\": {\n\t\tdefaultKeys: \"shift+ctrl+o\",\n\t\tdescription: \"Tree filter: cycle backward\",\n\t},\n} as const satisfies KeybindingDefinitions;\n\nconst KEYBINDING_NAME_MIGRATIONS = {\n\tcursorUp: \"tui.editor.cursorUp\",\n\tcursorDown: \"tui.editor.cursorDown\",\n\tcursorLeft: \"tui.editor.cursorLeft\",\n\tcursorRight: \"tui.editor.cursorRight\",\n\tcursorWordLeft: \"tui.editor.cursorWordLeft\",\n\tcursorWordRight: \"tui.editor.cursorWordRight\",\n\tcursorLineStart: \"tui.editor.cursorLineStart\",\n\tcursorLineEnd: \"tui.editor.cursorLineEnd\",\n\tjumpForward: \"tui.editor.jumpForward\",\n\tjumpBackward: \"tui.editor.jumpBackward\",\n\tpageUp: \"tui.editor.pageUp\",\n\tpageDown: \"tui.editor.pageDown\",\n\tdeleteCharBackward: \"tui.editor.deleteCharBackward\",\n\tdeleteCharForward: \"tui.editor.deleteCharForward\",\n\tdeleteWordBackward: \"tui.editor.deleteWordBackward\",\n\tdeleteWordForward: \"tui.editor.deleteWordForward\",\n\tdeleteToLineStart: \"tui.editor.deleteToLineStart\",\n\tdeleteToLineEnd: \"tui.editor.deleteToLineEnd\",\n\tyank: \"tui.editor.yank\",\n\tyankPop: \"tui.editor.yankPop\",\n\tundo: \"tui.editor.undo\",\n\tnewLine: \"tui.input.newLine\",\n\tsubmit: \"tui.input.submit\",\n\ttab: \"tui.input.tab\",\n\tcopy: \"tui.input.copy\",\n\tselectUp: \"tui.select.up\",\n\tselectDown: \"tui.select.down\",\n\tselectPageUp: \"tui.select.pageUp\",\n\tselectPageDown: \"tui.select.pageDown\",\n\tselectConfirm: \"tui.select.confirm\",\n\tselectCancel: \"tui.select.cancel\",\n\tinterrupt: \"app.interrupt\",\n\tclear: \"app.clear\",\n\texit: \"app.exit\",\n\tsuspend: \"app.suspend\",\n\tcycleThinkingLevel: \"app.thinking.cycle\",\n\tcycleModelForward: \"app.model.cycleForward\",\n\tcycleModelBackward: \"app.model.cycleBackward\",\n\tselectModel: \"app.model.select\",\n\texpandTools: \"app.tools.expand\",\n\ttoggleThinking: \"app.thinking.toggle\",\n\ttoggleSessionNamedFilter: \"app.session.toggleNamedFilter\",\n\texternalEditor: \"app.editor.external\",\n\tfollowUp: \"app.message.followUp\",\n\tdequeue: \"app.message.dequeue\",\n\tpasteImage: \"app.clipboard.pasteImage\",\n\tnewSession: \"app.session.new\",\n\ttree: \"app.session.tree\",\n\tfork: \"app.session.fork\",\n\tresume: \"app.session.resume\",\n\ttreeFoldOrUp: \"app.tree.foldOrUp\",\n\ttreeUnfoldOrDown: \"app.tree.unfoldOrDown\",\n\ttreeEditLabel: \"app.tree.editLabel\",\n\ttreeEditMessage: \"app.tree.editMessage\",\n\ttreeToggleLabelTimestamp: \"app.tree.toggleLabelTimestamp\",\n\ttoggleSessionPath: \"app.session.togglePath\",\n\ttoggleSessionSort: \"app.session.toggleSort\",\n\trenameSession: \"app.session.rename\",\n\tdeleteSession: \"app.session.delete\",\n\tdeleteSessionNoninvasive: \"app.session.deleteNoninvasive\",\n} as const satisfies Record<string, Keybinding>;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction hasOwn(value: object, key: PropertyKey): boolean {\n\treturn Object.hasOwn(value, key);\n}\n\nfunction isLegacyKeybindingName(key: string): key is keyof typeof KEYBINDING_NAME_MIGRATIONS {\n\treturn key in KEYBINDING_NAME_MIGRATIONS;\n}\n\nfunction toKeybindingsConfig(value: Record<string, unknown>): KeybindingsConfig {\n\tconst config: KeybindingsConfig = {};\n\tfor (const [key, binding] of Object.entries(value)) {\n\t\tif (typeof binding === \"string\") {\n\t\t\tconfig[key] = binding as KeyId;\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(binding) && binding.every((entry) => typeof entry === \"string\")) {\n\t\t\tconfig[key] = binding as KeyId[];\n\t\t}\n\t}\n\treturn config;\n}\n\nexport function migrateKeybindingsConfig(rawConfig: Record<string, unknown>): {\n\tconfig: Record<string, unknown>;\n\tmigrated: boolean;\n} {\n\tconst config: Record<string, unknown> = {};\n\tlet migrated = false;\n\n\tfor (const [key, value] of Object.entries(rawConfig)) {\n\t\tconst nextKey = isLegacyKeybindingName(key) ? KEYBINDING_NAME_MIGRATIONS[key] : key;\n\t\tif (nextKey !== key) {\n\t\t\tmigrated = true;\n\t\t}\n\t\tif (key !== nextKey && hasOwn(rawConfig, nextKey)) {\n\t\t\tmigrated = true;\n\t\t\tcontinue;\n\t\t}\n\t\tconfig[nextKey] = value;\n\t}\n\n\treturn { config: orderKeybindingsConfig(config), migrated };\n}\n\nfunction orderKeybindingsConfig(config: Record<string, unknown>): Record<string, unknown> {\n\tconst ordered: Record<string, unknown> = {};\n\tfor (const keybinding of Object.keys(KEYBINDINGS)) {\n\t\tif (hasOwn(config, keybinding)) {\n\t\t\tordered[keybinding] = config[keybinding];\n\t\t}\n\t}\n\n\tconst extras = Object.keys(config)\n\t\t.filter((key) => !hasOwn(ordered, key))\n\t\t.sort();\n\tfor (const key of extras) {\n\t\tordered[key] = config[key];\n\t}\n\n\treturn ordered;\n}\n\nfunction loadRawConfig(path: string): Record<string, unknown> | undefined {\n\tif (!existsSync(path)) return undefined;\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(stripBom(readFileSync(path, \"utf-8\")));\n\t\treturn isRecord(parsed) ? parsed : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nexport class KeybindingsManager extends TuiKeybindingsManager {\n\tprivate configPath: string | undefined;\n\n\tconstructor(userBindings: KeybindingsConfig = {}, configPath?: string) {\n\t\tsuper(KEYBINDINGS, userBindings);\n\t\tthis.configPath = configPath;\n\t}\n\n\tstatic create(agentDir: string = getAgentDir()): KeybindingsManager {\n\t\tconst configPath = join(agentDir, \"keybindings.json\");\n\t\tconst userBindings = KeybindingsManager.loadFromFile(configPath);\n\t\treturn new KeybindingsManager(userBindings, configPath);\n\t}\n\n\treload(): void {\n\t\tif (!this.configPath) return;\n\t\tthis.setUserBindings(KeybindingsManager.loadFromFile(this.configPath));\n\t}\n\n\tgetEffectiveConfig(): KeybindingsConfig {\n\t\treturn this.getResolvedBindings();\n\t}\n\n\tprivate static loadFromFile(path: string): KeybindingsConfig {\n\t\tconst rawConfig = loadRawConfig(path);\n\t\tif (!rawConfig) return {};\n\t\treturn toKeybindingsConfig(migrateKeybindingsConfig(rawConfig).config);\n\t}\n}\n\nexport type { Keybinding, KeybindingsConfig, KeyId };\n"]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,CAAC,SAAS,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC;AAED,MAAM,OAAO,kBAAmB,SAAQ,qBAAqB;IAG5D,YAAY,YAAY,GAAsB,EAAE,EAAE,UAAmB;QACpE,KAAK,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,QAAQ,GAAW,WAAW,EAAE;QAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;QACtD,MAAM,YAAY,GAAG,kBAAkB,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QACjE,OAAO,IAAI,kBAAkB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACzD,CAAC;IAED,MAAM;QACL,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,OAAO;QAC7B,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,kBAAkB;QACjB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;IACnC,CAAC;IAEO,MAAM,CAAC,YAAY,CAAC,IAAY;QACvC,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,SAAS;YAAE,OAAO,EAAE,CAAC;QAC1B,OAAO,mBAAmB,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACxE,CAAC;CACD","sourcesContent":["import {\n\ttype Keybinding,\n\ttype KeybindingDefinitions,\n\ttype KeybindingsConfig,\n\ttype KeyId,\n\tTUI_KEYBINDINGS,\n\tKeybindingsManager as TuiKeybindingsManager,\n} from \"@earendil-works/pi-tui\";\nimport { existsSync, readFileSync } from \"fs\";\nimport { join } from \"path\";\nimport { getAgentDir } from \"../config.ts\";\nimport { stripBom } from \"../utils/text.ts\";\n\nexport interface AppKeybindings {\n\t\"app.interrupt\": true;\n\t\"app.clear\": true;\n\t\"app.exit\": true;\n\t\"app.suspend\": true;\n\t\"app.thinking.cycle\": true;\n\t\"app.thinking.save\": true;\n\t\"app.model.cycleForward\": true;\n\t\"app.model.cycleBackward\": true;\n\t\"app.model.select\": true;\n\treadonly \"app.history.search\": true;\n\t\"app.tools.expand\": true;\n\t\"app.thinking.toggle\": true;\n\t\"app.session.toggleNamedFilter\": true;\n\t\"app.editor.external\": true;\n\t\"app.message.copy\": true;\n\t\"app.message.followUp\": true;\n\t\"app.message.dequeue\": true;\n\t\"app.question.answer\": true;\n\t\"app.clipboard.pasteImage\": true;\n\t\"app.session.new\": true;\n\t\"app.session.tree\": true;\n\t\"app.session.fork\": true;\n\t\"app.session.resume\": true;\n\t\"app.tree.foldOrUp\": true;\n\t\"app.tree.unfoldOrDown\": true;\n\t\"app.tree.editLabel\": true;\n\t\"app.tree.editMessage\": true;\n\t\"app.tree.toggleLabelTimestamp\": true;\n\t\"app.session.togglePath\": true;\n\t\"app.session.toggleSort\": true;\n\t\"app.session.rename\": true;\n\t\"app.session.delete\": true;\n\t\"app.session.deleteNoninvasive\": true;\n\t\"app.models.save\": true;\n\t\"app.models.toggleFavorite\": true;\n\t\"app.models.enableAll\": true;\n\t\"app.models.clearAll\": true;\n\t\"app.models.toggleProvider\": true;\n\t\"app.models.reorderUp\": true;\n\t\"app.models.reorderDown\": true;\n\t\"app.tree.filter.default\": true;\n\t\"app.tree.filter.noTools\": true;\n\t\"app.tree.filter.userOnly\": true;\n\t\"app.tree.filter.labeledOnly\": true;\n\t\"app.tree.filter.all\": true;\n\t\"app.tree.filter.cycleForward\": true;\n\t\"app.tree.filter.cycleBackward\": true;\n}\n\nexport type AppKeybinding = keyof AppKeybindings;\n\nexport function useWindowsKeybindings(\n\tplatform: NodeJS.Platform = process.platform,\n\tenv: NodeJS.ProcessEnv = process.env,\n): boolean {\n\treturn platform === \"win32\" || (platform === \"linux\" && Boolean(env.WSL_DISTRO_NAME || env.WSL_INTEROP));\n}\n\ndeclare module \"@earendil-works/pi-tui\" {\n\tinterface Keybindings extends AppKeybindings {}\n}\n\nconst windowsKeybindings = useWindowsKeybindings();\n\nexport const KEYBINDINGS = {\n\t...TUI_KEYBINDINGS,\n\t\"tui.editor.undo\": {\n\t\t...TUI_KEYBINDINGS[\"tui.editor.undo\"],\n\t\tdefaultKeys: process.platform === \"win32\" ? \"ctrl+z\" : windowsKeybindings ? \"alt+z\" : \"ctrl+-\",\n\t},\n\t\"tui.altScreen.previousPrompt\": {\n\t\t...TUI_KEYBINDINGS[\"tui.altScreen.previousPrompt\"],\n\t\tdefaultKeys: windowsKeybindings ? \"ctrl+up\" : [\"ctrl+shift+up\", \"ctrl+up\"],\n\t},\n\t\"tui.altScreen.nextPrompt\": {\n\t\t...TUI_KEYBINDINGS[\"tui.altScreen.nextPrompt\"],\n\t\tdefaultKeys: windowsKeybindings ? \"ctrl+down\" : [\"ctrl+shift+down\", \"ctrl+down\"],\n\t},\n\t\"tui.altScreen.search\": {\n\t\t...TUI_KEYBINDINGS[\"tui.altScreen.search\"],\n\t\tdefaultKeys: windowsKeybindings ? \"ctrl+f\" : \"ctrl+shift+f\",\n\t},\n\t\"app.interrupt\": { defaultKeys: \"escape\", description: \"Cancel or abort\" },\n\t\"app.clear\": { defaultKeys: \"ctrl+c\", description: \"Clear editor\" },\n\t\"app.exit\": { defaultKeys: \"ctrl+d\", description: \"Exit when editor is empty\" },\n\t\"app.suspend\": {\n\t\tdefaultKeys: process.platform === \"win32\" ? [] : \"ctrl+z\",\n\t\tdescription: \"Suspend to background\",\n\t},\n\t\"app.thinking.cycle\": {\n\t\tdefaultKeys: \"shift+tab\",\n\t\tdescription: \"Cycle thinking level\",\n\t},\n\t\"app.thinking.save\": {\n\t\tdefaultKeys: \"ctrl+s\",\n\t\tdescription: \"Save thinking level\",\n\t},\n\t\"app.model.cycleForward\": {\n\t\tdefaultKeys: \"ctrl+p\",\n\t\tdescription: \"Cycle to next model\",\n\t},\n\t\"app.model.cycleBackward\": {\n\t\tdefaultKeys: windowsKeybindings ? \"alt+p\" : \"shift+ctrl+p\",\n\t\tdescription: \"Cycle to previous model\",\n\t},\n\t\"app.model.select\": { defaultKeys: \"ctrl+l\", description: \"Open model selector\" },\n\t\"app.history.search\": { defaultKeys: \"ctrl+r\", description: \"Search prompt history across sessions\" },\n\t\"app.tools.expand\": { defaultKeys: \"ctrl+o\", description: \"Toggle tool output\" },\n\t\"app.thinking.toggle\": {\n\t\tdefaultKeys: \"ctrl+t\",\n\t\tdescription: \"Toggle thinking blocks\",\n\t},\n\t\"app.session.toggleNamedFilter\": {\n\t\tdefaultKeys: \"ctrl+n\",\n\t\tdescription: \"Toggle named session filter\",\n\t},\n\t\"app.editor.external\": {\n\t\tdefaultKeys: \"ctrl+g\",\n\t\tdescription: \"Open external editor\",\n\t},\n\t\"app.message.copy\": {\n\t\tdefaultKeys: \"ctrl+x\",\n\t\tdescription: \"Copy message to clipboard\",\n\t},\n\t\"app.message.followUp\": {\n\t\tdefaultKeys: windowsKeybindings ? \"ctrl+q\" : \"alt+enter\",\n\t\tdescription: \"Queue follow-up message\",\n\t},\n\t\"app.message.dequeue\": {\n\t\tdefaultKeys: windowsKeybindings ? \"alt+q\" : \"alt+up\",\n\t\tdescription: \"Restore queued messages\",\n\t},\n\t\"app.question.answer\": {\n\t\tdefaultKeys: \"alt+a\",\n\t\tdescription: \"Open the pending question\",\n\t},\n\t\"app.clipboard.pasteImage\": {\n\t\tdefaultKeys: windowsKeybindings ? \"alt+v\" : \"ctrl+v\",\n\t\tdescription: \"Paste image from clipboard (text fallback)\",\n\t},\n\t\"app.session.new\": { defaultKeys: [], description: \"Start a new session\" },\n\t\"app.session.tree\": { defaultKeys: [], description: \"Open session tree\" },\n\t\"app.session.fork\": { defaultKeys: [], description: \"Fork current session\" },\n\t\"app.session.resume\": { defaultKeys: [], description: \"Resume a session\" },\n\t\"app.tree.foldOrUp\": {\n\t\tdefaultKeys: process.platform === \"darwin\" ? [\"alt+left\", \"ctrl+left\"] : [\"ctrl+left\", \"alt+left\"],\n\t\tdescription: \"Fold tree branch or move up\",\n\t},\n\t\"app.tree.unfoldOrDown\": {\n\t\tdefaultKeys: process.platform === \"darwin\" ? [\"alt+right\", \"ctrl+right\"] : [\"ctrl+right\", \"alt+right\"],\n\t\tdescription: \"Unfold tree branch or move down\",\n\t},\n\t\"app.tree.editLabel\": {\n\t\tdefaultKeys: \"shift+l\",\n\t\tdescription: \"Edit tree label\",\n\t},\n\t\"app.tree.editMessage\": {\n\t\tdefaultKeys: \"ctrl+e\",\n\t\tdescription: \"Edit the selected assistant response, or reopen a user message in the editor\",\n\t},\n\t\"app.tree.toggleLabelTimestamp\": {\n\t\tdefaultKeys: \"shift+t\",\n\t\tdescription: \"Toggle tree label timestamps\",\n\t},\n\t\"app.session.togglePath\": {\n\t\tdefaultKeys: \"ctrl+p\",\n\t\tdescription: \"Toggle session path display\",\n\t},\n\t\"app.session.toggleSort\": {\n\t\tdefaultKeys: \"ctrl+s\",\n\t\tdescription: \"Toggle session sort mode\",\n\t},\n\t\"app.session.rename\": {\n\t\tdefaultKeys: \"ctrl+r\",\n\t\tdescription: \"Rename session\",\n\t},\n\t\"app.session.delete\": {\n\t\tdefaultKeys: \"ctrl+d\",\n\t\tdescription: \"Delete session\",\n\t},\n\t\"app.session.deleteNoninvasive\": {\n\t\tdefaultKeys: \"ctrl+backspace\",\n\t\tdescription: \"Delete session when query is empty\",\n\t},\n\t\"app.models.save\": {\n\t\tdefaultKeys: \"ctrl+s\",\n\t\tdescription: \"Save model selection\",\n\t},\n\t\"app.models.toggleFavorite\": {\n\t\tdefaultKeys: \"ctrl+f\",\n\t\tdescription: \"Toggle favorite model\",\n\t},\n\t\"app.models.enableAll\": {\n\t\tdefaultKeys: \"ctrl+a\",\n\t\tdescription: \"Enable all models\",\n\t},\n\t\"app.models.clearAll\": {\n\t\tdefaultKeys: \"ctrl+x\",\n\t\tdescription: \"Clear all models\",\n\t},\n\t\"app.models.toggleProvider\": {\n\t\tdefaultKeys: \"ctrl+p\",\n\t\tdescription: \"Toggle all models for provider\",\n\t},\n\t\"app.models.reorderUp\": {\n\t\tdefaultKeys: \"alt+up\",\n\t\tdescription: \"Move model up in order\",\n\t},\n\t\"app.models.reorderDown\": {\n\t\tdefaultKeys: \"alt+down\",\n\t\tdescription: \"Move model down in order\",\n\t},\n\t\"app.tree.filter.default\": {\n\t\tdefaultKeys: \"ctrl+d\",\n\t\tdescription: \"Tree filter: default view\",\n\t},\n\t\"app.tree.filter.noTools\": {\n\t\tdefaultKeys: \"ctrl+t\",\n\t\tdescription: \"Tree filter: hide tool results\",\n\t},\n\t\"app.tree.filter.userOnly\": {\n\t\tdefaultKeys: \"ctrl+u\",\n\t\tdescription: \"Tree filter: user messages only\",\n\t},\n\t\"app.tree.filter.labeledOnly\": {\n\t\tdefaultKeys: \"ctrl+l\",\n\t\tdescription: \"Tree filter: labeled entries only\",\n\t},\n\t\"app.tree.filter.all\": {\n\t\tdefaultKeys: \"ctrl+a\",\n\t\tdescription: \"Tree filter: show all entries\",\n\t},\n\t\"app.tree.filter.cycleForward\": {\n\t\tdefaultKeys: \"ctrl+o\",\n\t\tdescription: \"Tree filter: cycle forward\",\n\t},\n\t\"app.tree.filter.cycleBackward\": {\n\t\tdefaultKeys: \"shift+ctrl+o\",\n\t\tdescription: \"Tree filter: cycle backward\",\n\t},\n} as const satisfies KeybindingDefinitions;\n\nconst KEYBINDING_NAME_MIGRATIONS = {\n\tcursorUp: \"tui.editor.cursorUp\",\n\tcursorDown: \"tui.editor.cursorDown\",\n\tcursorLeft: \"tui.editor.cursorLeft\",\n\tcursorRight: \"tui.editor.cursorRight\",\n\tcursorWordLeft: \"tui.editor.cursorWordLeft\",\n\tcursorWordRight: \"tui.editor.cursorWordRight\",\n\tcursorLineStart: \"tui.editor.cursorLineStart\",\n\tcursorLineEnd: \"tui.editor.cursorLineEnd\",\n\tjumpForward: \"tui.editor.jumpForward\",\n\tjumpBackward: \"tui.editor.jumpBackward\",\n\tpageUp: \"tui.editor.pageUp\",\n\tpageDown: \"tui.editor.pageDown\",\n\tdeleteCharBackward: \"tui.editor.deleteCharBackward\",\n\tdeleteCharForward: \"tui.editor.deleteCharForward\",\n\tdeleteWordBackward: \"tui.editor.deleteWordBackward\",\n\tdeleteWordForward: \"tui.editor.deleteWordForward\",\n\tdeleteToLineStart: \"tui.editor.deleteToLineStart\",\n\tdeleteToLineEnd: \"tui.editor.deleteToLineEnd\",\n\tyank: \"tui.editor.yank\",\n\tyankPop: \"tui.editor.yankPop\",\n\tundo: \"tui.editor.undo\",\n\tnewLine: \"tui.input.newLine\",\n\tsubmit: \"tui.input.submit\",\n\ttab: \"tui.input.tab\",\n\tcopy: \"tui.input.copy\",\n\tselectUp: \"tui.select.up\",\n\tselectDown: \"tui.select.down\",\n\tselectPageUp: \"tui.select.pageUp\",\n\tselectPageDown: \"tui.select.pageDown\",\n\tselectConfirm: \"tui.select.confirm\",\n\tselectCancel: \"tui.select.cancel\",\n\tinterrupt: \"app.interrupt\",\n\tclear: \"app.clear\",\n\texit: \"app.exit\",\n\tsuspend: \"app.suspend\",\n\tcycleThinkingLevel: \"app.thinking.cycle\",\n\tcycleModelForward: \"app.model.cycleForward\",\n\tcycleModelBackward: \"app.model.cycleBackward\",\n\tselectModel: \"app.model.select\",\n\texpandTools: \"app.tools.expand\",\n\ttoggleThinking: \"app.thinking.toggle\",\n\ttoggleSessionNamedFilter: \"app.session.toggleNamedFilter\",\n\texternalEditor: \"app.editor.external\",\n\tfollowUp: \"app.message.followUp\",\n\tdequeue: \"app.message.dequeue\",\n\tpasteImage: \"app.clipboard.pasteImage\",\n\tnewSession: \"app.session.new\",\n\ttree: \"app.session.tree\",\n\tfork: \"app.session.fork\",\n\tresume: \"app.session.resume\",\n\ttreeFoldOrUp: \"app.tree.foldOrUp\",\n\ttreeUnfoldOrDown: \"app.tree.unfoldOrDown\",\n\ttreeEditLabel: \"app.tree.editLabel\",\n\ttreeEditMessage: \"app.tree.editMessage\",\n\ttreeToggleLabelTimestamp: \"app.tree.toggleLabelTimestamp\",\n\ttoggleSessionPath: \"app.session.togglePath\",\n\ttoggleSessionSort: \"app.session.toggleSort\",\n\trenameSession: \"app.session.rename\",\n\tdeleteSession: \"app.session.delete\",\n\tdeleteSessionNoninvasive: \"app.session.deleteNoninvasive\",\n} as const satisfies Record<string, Keybinding>;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction hasOwn(value: object, key: PropertyKey): boolean {\n\treturn Object.hasOwn(value, key);\n}\n\nfunction isLegacyKeybindingName(key: string): key is keyof typeof KEYBINDING_NAME_MIGRATIONS {\n\treturn key in KEYBINDING_NAME_MIGRATIONS;\n}\n\nfunction toKeybindingsConfig(value: Record<string, unknown>): KeybindingsConfig {\n\tconst config: KeybindingsConfig = {};\n\tfor (const [key, binding] of Object.entries(value)) {\n\t\tif (typeof binding === \"string\") {\n\t\t\tconfig[key] = binding as KeyId;\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(binding) && binding.every((entry) => typeof entry === \"string\")) {\n\t\t\tconfig[key] = binding as KeyId[];\n\t\t}\n\t}\n\treturn config;\n}\n\nexport function migrateKeybindingsConfig(rawConfig: Record<string, unknown>): {\n\tconfig: Record<string, unknown>;\n\tmigrated: boolean;\n} {\n\tconst config: Record<string, unknown> = {};\n\tlet migrated = false;\n\n\tfor (const [key, value] of Object.entries(rawConfig)) {\n\t\tconst nextKey = isLegacyKeybindingName(key) ? KEYBINDING_NAME_MIGRATIONS[key] : key;\n\t\tif (nextKey !== key) {\n\t\t\tmigrated = true;\n\t\t}\n\t\tif (key !== nextKey && hasOwn(rawConfig, nextKey)) {\n\t\t\tmigrated = true;\n\t\t\tcontinue;\n\t\t}\n\t\tconfig[nextKey] = value;\n\t}\n\n\treturn { config: orderKeybindingsConfig(config), migrated };\n}\n\nfunction orderKeybindingsConfig(config: Record<string, unknown>): Record<string, unknown> {\n\tconst ordered: Record<string, unknown> = {};\n\tfor (const keybinding of Object.keys(KEYBINDINGS)) {\n\t\tif (hasOwn(config, keybinding)) {\n\t\t\tordered[keybinding] = config[keybinding];\n\t\t}\n\t}\n\n\tconst extras = Object.keys(config)\n\t\t.filter((key) => !hasOwn(ordered, key))\n\t\t.sort();\n\tfor (const key of extras) {\n\t\tordered[key] = config[key];\n\t}\n\n\treturn ordered;\n}\n\nfunction loadRawConfig(path: string): Record<string, unknown> | undefined {\n\tif (!existsSync(path)) return undefined;\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(stripBom(readFileSync(path, \"utf-8\")));\n\t\treturn isRecord(parsed) ? parsed : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nexport class KeybindingsManager extends TuiKeybindingsManager {\n\tprivate configPath: string | undefined;\n\n\tconstructor(userBindings: KeybindingsConfig = {}, configPath?: string) {\n\t\tsuper(KEYBINDINGS, userBindings);\n\t\tthis.configPath = configPath;\n\t}\n\n\tstatic create(agentDir: string = getAgentDir()): KeybindingsManager {\n\t\tconst configPath = join(agentDir, \"keybindings.json\");\n\t\tconst userBindings = KeybindingsManager.loadFromFile(configPath);\n\t\treturn new KeybindingsManager(userBindings, configPath);\n\t}\n\n\treload(): void {\n\t\tif (!this.configPath) return;\n\t\tthis.setUserBindings(KeybindingsManager.loadFromFile(this.configPath));\n\t}\n\n\tgetEffectiveConfig(): KeybindingsConfig {\n\t\treturn this.getResolvedBindings();\n\t}\n\n\tprivate static loadFromFile(path: string): KeybindingsConfig {\n\t\tconst rawConfig = loadRawConfig(path);\n\t\tif (!rawConfig) return {};\n\t\treturn toKeybindingsConfig(migrateKeybindingsConfig(rawConfig).config);\n\t}\n}\n\nexport type { Keybinding, KeybindingsConfig, KeyId };\n"]}
@@ -56,7 +56,7 @@ export interface CustomMessage<T = unknown> {
56
56
  export interface BranchSummaryMessage {
57
57
  role: "branchSummary";
58
58
  summary: string;
59
- fromId: string;
59
+ fromId: string | null;
60
60
  timestamp: number;
61
61
  }
62
62
  export interface CompactionSummaryMessage {
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/core/messages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAGN,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,yBAAyB,wGAGrC,CAAC;AAEF,eAAO,MAAM,yBAAyB,iBAC3B,CAAC;AAEZ,eAAO,MAAM,qBAAqB,iGAGjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD,eAAO,MAAM,8BAA8B,sBAAsB,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAE3E;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAEtF;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,OAAO;IACzC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACn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