@code-yeongyu/senpi 2026.9.12-3 → 2026.9.12

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 (1525) hide show
  1. package/CHANGELOG.md +0 -60
  2. package/README.md +1 -1
  3. package/dist/bun/cli.d.ts +1 -2
  4. package/dist/bun/cli.d.ts.map +1 -1
  5. package/dist/bun/cli.js +8 -5
  6. package/dist/bun/cli.js.map +1 -1
  7. package/dist/bun/register-bedrock.d.ts +2 -0
  8. package/dist/bun/register-bedrock.d.ts.map +1 -0
  9. package/dist/bun/register-bedrock.js +4 -0
  10. package/dist/bun/register-bedrock.js.map +1 -0
  11. package/dist/cli/config-selector.d.ts.map +1 -1
  12. package/dist/cli/config-selector.js +1 -2
  13. package/dist/cli/config-selector.js.map +1 -1
  14. package/dist/cli/experimental/auth.d.ts +16 -0
  15. package/dist/cli/experimental/auth.d.ts.map +1 -0
  16. package/dist/cli/experimental/auth.js +13 -0
  17. package/dist/cli/experimental/auth.js.map +1 -0
  18. package/dist/cli/experimental/cli.d.ts +6 -0
  19. package/dist/cli/experimental/cli.d.ts.map +1 -0
  20. package/dist/cli/experimental/cli.js +5 -0
  21. package/dist/cli/experimental/cli.js.map +1 -0
  22. package/dist/cli/experimental/command-options.d.ts +17 -0
  23. package/dist/cli/experimental/command-options.d.ts.map +1 -0
  24. package/dist/cli/experimental/command-options.js +35 -0
  25. package/dist/cli/experimental/command-options.js.map +1 -0
  26. package/dist/cli/experimental/command.d.ts +63 -0
  27. package/dist/cli/experimental/command.d.ts.map +1 -0
  28. package/dist/cli/experimental/command.js +127 -0
  29. package/dist/cli/experimental/command.js.map +1 -0
  30. package/dist/cli/experimental/commands/client.d.ts +13 -0
  31. package/dist/cli/experimental/commands/client.d.ts.map +1 -0
  32. package/dist/cli/experimental/commands/client.js +25 -0
  33. package/dist/cli/experimental/commands/client.js.map +1 -0
  34. package/dist/cli/experimental/commands/pi.d.ts +15 -0
  35. package/dist/cli/experimental/commands/pi.d.ts.map +1 -0
  36. package/dist/cli/experimental/commands/pi.js +28 -0
  37. package/dist/cli/experimental/commands/pi.js.map +1 -0
  38. package/dist/cli/experimental/commands/server.d.ts +13 -0
  39. package/dist/cli/experimental/commands/server.d.ts.map +1 -0
  40. package/dist/cli/experimental/commands/server.js +25 -0
  41. package/dist/cli/experimental/commands/server.js.map +1 -0
  42. package/dist/cli/experimental/transport-address.d.ts +10 -0
  43. package/dist/cli/experimental/transport-address.d.ts.map +1 -0
  44. package/dist/cli/experimental/transport-address.js +38 -0
  45. package/dist/cli/experimental/transport-address.js.map +1 -0
  46. package/dist/cli.js +0 -3
  47. package/dist/cli.js.map +1 -1
  48. package/dist/client/index.d.ts +2 -1
  49. package/dist/client/index.d.ts.map +1 -1
  50. package/dist/client/index.js +2 -1
  51. package/dist/client/index.js.map +1 -1
  52. package/dist/client/remote-session.d.ts +53 -0
  53. package/dist/client/remote-session.d.ts.map +1 -0
  54. package/dist/client/remote-session.js +340 -0
  55. package/dist/client/remote-session.js.map +1 -0
  56. package/dist/client/transcript.d.ts +12 -0
  57. package/dist/client/transcript.d.ts.map +1 -0
  58. package/dist/client/transcript.js +98 -0
  59. package/dist/client/transcript.js.map +1 -0
  60. package/dist/config.d.ts +0 -1
  61. package/dist/config.d.ts.map +1 -1
  62. package/dist/config.js +0 -1
  63. package/dist/config.js.map +1 -1
  64. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  65. package/dist/core/agent-session-runtime.js +6 -18
  66. package/dist/core/agent-session-runtime.js.map +1 -1
  67. package/dist/core/agent-session.d.ts +17 -54
  68. package/dist/core/agent-session.d.ts.map +1 -1
  69. package/dist/core/agent-session.js +157 -153
  70. package/dist/core/agent-session.js.map +1 -1
  71. package/dist/core/compaction/branch-summarization.d.ts +1 -1
  72. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  73. package/dist/core/compaction/branch-summarization.js +4 -6
  74. package/dist/core/compaction/branch-summarization.js.map +1 -1
  75. package/dist/core/compaction-settings-access.d.ts +2 -18
  76. package/dist/core/compaction-settings-access.d.ts.map +1 -1
  77. package/dist/core/compaction-settings-access.js +4 -35
  78. package/dist/core/compaction-settings-access.js.map +1 -1
  79. package/dist/core/compaction-settings-resolver.d.ts +2 -2
  80. package/dist/core/compaction-settings-resolver.d.ts.map +1 -1
  81. package/dist/core/compaction-settings-resolver.js +3 -6
  82. package/dist/core/compaction-settings-resolver.js.map +1 -1
  83. package/dist/core/extensions/builtin/ask-user/extension.d.ts.map +1 -1
  84. package/dist/core/extensions/builtin/ask-user/extension.js +0 -11
  85. package/dist/core/extensions/builtin/ask-user/extension.js.map +1 -1
  86. package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -1
  87. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +1 -2
  88. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -1
  89. package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
  90. package/dist/core/extensions/builtin/prompt-preset/presets.js +1 -7
  91. package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
  92. package/dist/core/extensions/loader.d.ts.map +1 -1
  93. package/dist/core/extensions/loader.js +2 -4
  94. package/dist/core/extensions/loader.js.map +1 -1
  95. package/dist/core/keybindings.d.ts +0 -10
  96. package/dist/core/keybindings.d.ts.map +1 -1
  97. package/dist/core/keybindings.js +0 -8
  98. package/dist/core/keybindings.js.map +1 -1
  99. package/dist/core/messages.d.ts +1 -1
  100. package/dist/core/messages.d.ts.map +1 -1
  101. package/dist/core/messages.js.map +1 -1
  102. package/dist/core/model-registry.d.ts +1 -5
  103. package/dist/core/model-registry.d.ts.map +1 -1
  104. package/dist/core/model-registry.js +0 -8
  105. package/dist/core/model-registry.js.map +1 -1
  106. package/dist/core/model-resolver.d.ts.map +1 -1
  107. package/dist/core/model-resolver.js +0 -2
  108. package/dist/core/model-resolver.js.map +1 -1
  109. package/dist/core/model-runtime.d.ts +0 -1
  110. package/dist/core/model-runtime.d.ts.map +1 -1
  111. package/dist/core/model-runtime.js +2 -5
  112. package/dist/core/model-runtime.js.map +1 -1
  113. package/dist/core/retry-fallback/settings.d.ts +0 -2
  114. package/dist/core/retry-fallback/settings.d.ts.map +1 -1
  115. package/dist/core/retry-fallback/settings.js.map +1 -1
  116. package/dist/core/session-manager.d.ts +2 -5
  117. package/dist/core/session-manager.d.ts.map +1 -1
  118. package/dist/core/session-manager.js +19 -68
  119. package/dist/core/session-manager.js.map +1 -1
  120. package/dist/core/session-write-reservation.d.ts +0 -9
  121. package/dist/core/session-write-reservation.d.ts.map +1 -1
  122. package/dist/core/session-write-reservation.js +0 -33
  123. package/dist/core/session-write-reservation.js.map +1 -1
  124. package/dist/core/settings-manager.d.ts +5 -12
  125. package/dist/core/settings-manager.d.ts.map +1 -1
  126. package/dist/core/settings-manager.js +6 -18
  127. package/dist/core/settings-manager.js.map +1 -1
  128. package/dist/core/settings-public-types.d.ts +1 -1
  129. package/dist/core/settings-public-types.d.ts.map +1 -1
  130. package/dist/core/settings-public-types.js.map +1 -1
  131. package/dist/core/skills.d.ts +1 -1
  132. package/dist/core/skills.d.ts.map +1 -1
  133. package/dist/core/skills.js +2 -6
  134. package/dist/core/skills.js.map +1 -1
  135. package/dist/core/system-prompt.d.ts.map +1 -1
  136. package/dist/core/system-prompt.js +9 -8
  137. package/dist/core/system-prompt.js.map +1 -1
  138. package/dist/core/tools/bash.d.ts.map +1 -1
  139. package/dist/core/tools/bash.js +142 -3
  140. package/dist/core/tools/bash.js.map +1 -1
  141. package/dist/core/tools/edit.d.ts +12 -1
  142. package/dist/core/tools/edit.d.ts.map +1 -1
  143. package/dist/core/tools/edit.js +168 -4
  144. package/dist/core/tools/edit.js.map +1 -1
  145. package/dist/core/tools/find.d.ts.map +1 -1
  146. package/dist/core/tools/find.js +53 -2
  147. package/dist/core/tools/find.js.map +1 -1
  148. package/dist/core/tools/grep.d.ts.map +1 -1
  149. package/dist/core/tools/grep.js +58 -2
  150. package/dist/core/tools/grep.js.map +1 -1
  151. package/dist/core/tools/ls.d.ts.map +1 -1
  152. package/dist/core/tools/ls.js +47 -2
  153. package/dist/core/tools/ls.js.map +1 -1
  154. package/dist/core/tools/read.d.ts +4 -1
  155. package/dist/core/tools/read.d.ts.map +1 -1
  156. package/dist/core/tools/read.js +141 -4
  157. package/dist/core/tools/read.js.map +1 -1
  158. package/dist/core/tools/write.d.ts.map +1 -1
  159. package/dist/core/tools/write.js +153 -4
  160. package/dist/core/tools/write.js.map +1 -1
  161. package/dist/index.d.ts +2 -2
  162. package/dist/index.d.ts.map +1 -1
  163. package/dist/index.js.map +1 -1
  164. package/dist/migrations.d.ts.map +1 -1
  165. package/dist/migrations.js +2 -2
  166. package/dist/migrations.js.map +1 -1
  167. package/dist/modes/app-server/threads/turn-runtime.d.ts +1 -3
  168. package/dist/modes/app-server/threads/turn-runtime.d.ts.map +1 -1
  169. package/dist/modes/app-server/threads/turn-runtime.js.map +1 -1
  170. package/dist/modes/app-server/threads/turns.js +1 -1
  171. package/dist/modes/app-server/threads/turns.js.map +1 -1
  172. package/dist/modes/app-server/turn-adapter.js +2 -4
  173. package/dist/modes/app-server/turn-adapter.js.map +1 -1
  174. package/dist/modes/interactive/components/ask-user-async-widget.d.ts +12 -17
  175. package/dist/modes/interactive/components/ask-user-async-widget.d.ts.map +1 -1
  176. package/dist/modes/interactive/components/ask-user-async-widget.js +23 -47
  177. package/dist/modes/interactive/components/ask-user-async-widget.js.map +1 -1
  178. package/dist/modes/interactive/components/assistant-message.d.ts +0 -7
  179. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  180. package/dist/modes/interactive/components/assistant-message.js +2 -26
  181. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  182. package/dist/modes/interactive/components/assistant-render-descriptors.d.ts +0 -4
  183. package/dist/modes/interactive/components/assistant-render-descriptors.d.ts.map +1 -1
  184. package/dist/modes/interactive/components/assistant-render-descriptors.js +5 -8
  185. package/dist/modes/interactive/components/assistant-render-descriptors.js.map +1 -1
  186. package/dist/modes/interactive/components/custom-editor.d.ts +1 -10
  187. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  188. package/dist/modes/interactive/components/custom-editor.js +1 -37
  189. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  190. package/dist/modes/interactive/components/index.d.ts +1 -1
  191. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  192. package/dist/modes/interactive/components/index.js.map +1 -1
  193. package/dist/modes/interactive/components/scoped-models-selector.js +8 -8
  194. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  195. package/dist/modes/interactive/components/status-indicator.d.ts +1 -4
  196. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  197. package/dist/modes/interactive/components/status-indicator.js +2 -14
  198. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  199. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  200. package/dist/modes/interactive/components/thinking-selector.js +4 -4
  201. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  202. package/dist/modes/interactive/components/tool-execution-renderer.d.ts +1 -4
  203. package/dist/modes/interactive/components/tool-execution-renderer.d.ts.map +1 -1
  204. package/dist/modes/interactive/components/tool-execution-renderer.js +10 -23
  205. package/dist/modes/interactive/components/tool-execution-renderer.js.map +1 -1
  206. package/dist/modes/interactive/components/tool-execution-types.d.ts +2 -18
  207. package/dist/modes/interactive/components/tool-execution-types.d.ts.map +1 -1
  208. package/dist/modes/interactive/components/tool-execution-types.js.map +1 -1
  209. package/dist/modes/interactive/components/tool-execution.d.ts +3 -3
  210. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  211. package/dist/modes/interactive/components/tool-execution.js +0 -5
  212. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  213. package/dist/modes/interactive/interactive-mode.d.ts +15 -10
  214. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  215. package/dist/modes/interactive/interactive-mode.js +138 -178
  216. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  217. package/dist/modes/interactive/theme/dark.json +1 -2
  218. package/dist/modes/interactive/theme/grok-day.json +1 -2
  219. package/dist/modes/interactive/theme/grok-night.json +1 -2
  220. package/dist/modes/interactive/theme/light.json +1 -2
  221. package/dist/modes/interactive/theme/theme-controller.d.ts +0 -1
  222. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
  223. package/dist/modes/interactive/theme/theme-controller.js +0 -5
  224. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  225. package/dist/modes/interactive/theme/theme-schema.json +2 -6
  226. package/dist/modes/interactive/theme/theme.d.ts +5 -10
  227. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  228. package/dist/modes/interactive/theme/theme.js +117 -14
  229. package/dist/modes/interactive/theme/theme.js.map +1 -1
  230. package/dist/modes/interactive/tips/catalog/input-tips.d.ts +0 -5
  231. package/dist/modes/interactive/tips/catalog/input-tips.d.ts.map +1 -1
  232. package/dist/modes/interactive/tips/catalog/input-tips.js +0 -5
  233. package/dist/modes/interactive/tips/catalog/input-tips.js.map +1 -1
  234. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  235. package/dist/modes/rpc/connection-handler.js +2 -8
  236. package/dist/modes/rpc/connection-handler.js.map +1 -1
  237. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  238. package/dist/modes/rpc/rpc-client.js +1 -11
  239. package/dist/modes/rpc/rpc-client.js.map +1 -1
  240. package/dist/modes/rpc/rpc-types.d.ts +1 -2
  241. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  242. package/dist/modes/rpc/rpc-types.js +0 -1
  243. package/dist/modes/rpc/rpc-types.js.map +1 -1
  244. package/dist/modes/rpc/session-registry.d.ts +1 -3
  245. package/dist/modes/rpc/session-registry.d.ts.map +1 -1
  246. package/dist/modes/rpc/session-registry.js.map +1 -1
  247. package/dist/modes/rpc/session-worker-client.d.ts +8 -10
  248. package/dist/modes/rpc/session-worker-client.d.ts.map +1 -1
  249. package/dist/modes/rpc/session-worker-client.js +23 -14
  250. package/dist/modes/rpc/session-worker-client.js.map +1 -1
  251. package/dist/modes/rpc/session-worker-protocol.d.ts +0 -10
  252. package/dist/modes/rpc/session-worker-protocol.d.ts.map +1 -1
  253. package/dist/modes/rpc/session-worker-protocol.js +0 -2
  254. package/dist/modes/rpc/session-worker-protocol.js.map +1 -1
  255. package/dist/modes/rpc/session-worker.js +16 -12
  256. package/dist/modes/rpc/session-worker.js.map +1 -1
  257. package/dist/modes/rpc/worker-session-registry.d.ts +0 -12
  258. package/dist/modes/rpc/worker-session-registry.d.ts.map +1 -1
  259. package/dist/modes/rpc/worker-session-registry.js +24 -51
  260. package/dist/modes/rpc/worker-session-registry.js.map +1 -1
  261. package/dist/senpi +0 -3
  262. package/dist/server/create-harness.d.ts +26 -0
  263. package/dist/server/create-harness.d.ts.map +1 -0
  264. package/dist/server/create-harness.js +106 -0
  265. package/dist/server/create-harness.js.map +1 -0
  266. package/dist/utils/clipboard-image.d.ts.map +1 -1
  267. package/dist/utils/clipboard-image.js +69 -52
  268. package/dist/utils/clipboard-image.js.map +1 -1
  269. package/dist/utils/clipboard-native.d.ts +11 -0
  270. package/dist/utils/clipboard-native.d.ts.map +1 -0
  271. package/dist/utils/clipboard-native.js +20 -0
  272. package/dist/utils/clipboard-native.js.map +1 -0
  273. package/dist/utils/clipboard.d.ts.map +1 -1
  274. package/dist/utils/clipboard.js +126 -49
  275. package/dist/utils/clipboard.js.map +1 -1
  276. package/dist/utils/exif-orientation.d.ts.map +1 -1
  277. package/dist/utils/exif-orientation.js +3 -2
  278. package/dist/utils/exif-orientation.js.map +1 -1
  279. package/dist/utils/tools-manager.d.ts +0 -1
  280. package/dist/utils/tools-manager.d.ts.map +1 -1
  281. package/dist/utils/tools-manager.js +19 -41
  282. package/dist/utils/tools-manager.js.map +1 -1
  283. package/docs/AGENTS.md +67 -0
  284. package/docs/compaction.md +13 -39
  285. package/docs/containerization.md +0 -45
  286. package/docs/development.md +0 -19
  287. package/docs/docs.json +0 -4
  288. package/docs/environment-variables.md +0 -2
  289. package/docs/extensions.md +10 -21
  290. package/docs/keybindings.md +2 -7
  291. package/docs/models.md +1 -1
  292. package/docs/providers.md +1 -1
  293. package/docs/rpc.md +8 -16
  294. package/docs/sdk.md +0 -7
  295. package/docs/session-format.md +38 -52
  296. package/docs/settings.md +4 -40
  297. package/docs/skills.md +1 -1
  298. package/docs/termux.md +1 -0
  299. package/docs/themes.md +6 -8
  300. package/docs/tui.md +3 -22
  301. package/examples/README.md +0 -3
  302. package/examples/extensions/dynamic-resources/dynamic.json +0 -2
  303. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -1
  304. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +3 -3
  305. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +0 -5
  306. package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +0 -1
  307. package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +0 -1
  308. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +0 -1
  309. package/node_modules/@aws-sdk/core/package.json +1 -1
  310. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  311. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  312. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  313. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  314. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +0 -2
  315. package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +0 -2
  316. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  317. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  318. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  319. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  320. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  321. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  322. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  323. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  324. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  325. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  326. package/node_modules/@aws-sdk/token-providers/package.json +1 -1
  327. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +0 -24
  328. package/node_modules/@code-yeongyu/senpi-codemode/package.json +5 -5
  329. package/node_modules/@earendil-works/pi-agent-core/README.md +0 -4
  330. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +384 -639
  331. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
  332. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +250 -5
  333. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
  334. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts +6 -12
  335. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
  336. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +27 -33
  337. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
  338. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +8 -30
  339. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  340. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +64 -53
  341. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  342. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +28 -25
  343. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
  344. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +125 -368
  345. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
  346. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +38 -20
  347. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +1 -1
  348. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +55 -233
  349. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js.map +1 -1
  350. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts +2 -2
  351. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -1
  352. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
  353. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts +2 -3
  354. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -1
  355. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +17 -17
  356. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
  357. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts +100 -0
  358. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts.map +1 -0
  359. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +420 -0
  360. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js.map +1 -0
  361. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts +0 -93
  362. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts.map +1 -1
  363. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js +0 -39
  364. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js.map +1 -1
  365. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts +19 -6
  366. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts.map +1 -1
  367. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js +53 -31
  368. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js.map +1 -1
  369. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts +5 -9
  370. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts.map +1 -1
  371. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js +4 -7
  372. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js.map +1 -1
  373. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts +8 -19
  374. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts.map +1 -1
  375. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +219 -34
  376. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js.map +1 -1
  377. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts +9 -0
  378. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +1 -0
  379. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +18 -0
  380. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js.map +1 -0
  381. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +24 -27
  382. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +1 -1
  383. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +151 -276
  384. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +1 -1
  385. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +41 -39
  386. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +1 -1
  387. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +196 -175
  388. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +1 -1
  389. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +22 -23
  390. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts.map +1 -1
  391. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js +1 -2
  392. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js.map +1 -1
  393. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts +3 -0
  394. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts.map +1 -0
  395. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +2 -0
  396. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js.map +1 -0
  397. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +40 -44
  398. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +1 -1
  399. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js +115 -333
  400. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +1 -1
  401. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +51 -78
  402. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
  403. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +207 -327
  404. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
  405. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts +65 -0
  406. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +1 -0
  407. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +320 -0
  408. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +1 -0
  409. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts +4 -0
  410. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts.map +1 -0
  411. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +762 -0
  412. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +1 -0
  413. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts +2 -9
  414. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts.map +1 -1
  415. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js +1 -8
  416. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js.map +1 -1
  417. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts +7 -5
  418. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts.map +1 -1
  419. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js.map +1 -1
  420. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +265 -425
  421. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +1 -1
  422. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js +7 -7
  423. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js.map +1 -1
  424. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +2 -3
  425. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
  426. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +26 -29
  427. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
  428. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts +43 -64
  429. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts.map +1 -1
  430. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js +26 -45
  431. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js.map +1 -1
  432. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts +4 -4
  433. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts.map +1 -1
  434. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +93 -66
  435. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js.map +1 -1
  436. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts.map +1 -1
  437. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +13 -17
  438. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js.map +1 -1
  439. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts +1 -2
  440. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts.map +1 -1
  441. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +5 -5
  442. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js.map +1 -1
  443. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts +2 -3
  444. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts.map +1 -1
  445. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +5 -5
  446. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js.map +1 -1
  447. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts +1 -2
  448. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts.map +1 -1
  449. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +6 -4
  450. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js.map +1 -1
  451. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.d.ts.map +1 -1
  452. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +8 -12
  453. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js.map +1 -1
  454. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +45 -128
  455. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  456. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  457. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +5 -19
  458. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
  459. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +192 -65
  460. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
  461. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts +0 -1
  462. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
  463. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +1 -1
  464. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
  465. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +1 -4
  466. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
  467. package/node_modules/@earendil-works/pi-agent-core/dist/index.js +6 -3
  468. package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
  469. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +16 -24
  470. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts.map +1 -1
  471. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +1 -1
  472. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js.map +1 -1
  473. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts +29 -0
  474. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts.map +1 -0
  475. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +103 -0
  476. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +1 -0
  477. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +0 -2
  478. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  479. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  480. package/node_modules/@earendil-works/pi-agent-core/package.json +6 -27
  481. package/node_modules/@earendil-works/pi-ai/README.md +4 -39
  482. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  483. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +1 -8
  484. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  485. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts +69 -0
  486. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts.map +1 -0
  487. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +159 -0
  488. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js.map +1 -0
  489. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts +0 -11
  490. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts.map +1 -1
  491. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js +0 -18
  492. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js.map +1 -1
  493. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +1 -1
  494. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
  495. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +1 -5
  496. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
  497. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +1 -4
  498. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  499. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  500. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +3 -6
  501. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  502. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
  503. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +1 -4
  504. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
  505. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  506. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +3 -13
  507. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  508. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.d.ts.map +1 -1
  509. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js +1 -2
  510. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js.map +1 -1
  511. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -2
  512. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  513. package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -2
  514. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  515. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +0 -1
  516. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  517. package/node_modules/@earendil-works/pi-ai/dist/models.js +2 -5
  518. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  519. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts +1 -1
  520. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts.map +1 -1
  521. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.js.map +1 -1
  522. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts.map +1 -1
  523. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js +0 -4
  524. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js.map +1 -1
  525. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -1
  526. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +1 -2
  527. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -1
  528. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  529. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
  530. package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  531. package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
  532. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  533. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  534. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  535. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  536. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  537. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
  538. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  539. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
  540. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
  541. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  542. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.d.ts.map +1 -1
  543. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +3 -4
  544. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
  545. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.d.ts.map +1 -1
  546. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +4 -5
  547. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js.map +1 -1
  548. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +6 -16
  549. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  550. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  551. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
  552. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +5 -25
  553. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
  554. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +1 -1
  555. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
  556. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +1 -5
  557. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
  558. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts +1 -10
  559. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts.map +1 -1
  560. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.js.map +1 -1
  561. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +2 -13
  562. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
  563. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +7 -18
  564. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
  565. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts +2 -2
  566. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts.map +1 -1
  567. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js +31 -36
  568. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js.map +1 -1
  569. package/node_modules/@earendil-works/pi-ai/package.json +6 -6
  570. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  571. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  572. package/node_modules/@earendil-works/pi-tui/README.md +4 -53
  573. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts +1 -21
  574. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +1 -1
  575. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +42 -199
  576. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js.map +1 -1
  577. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +1 -3
  578. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
  579. package/node_modules/@earendil-works/pi-tui/dist/components/box.js +0 -28
  580. package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
  581. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +1 -6
  582. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  583. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +18 -98
  584. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  585. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +1 -12
  586. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
  587. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +6 -40
  588. package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
  589. package/node_modules/@earendil-works/pi-tui/dist/components/latex.d.ts.map +1 -1
  590. package/node_modules/@earendil-works/pi-tui/dist/components/latex.js +0 -7
  591. package/node_modules/@earendil-works/pi-tui/dist/components/latex.js.map +1 -1
  592. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +0 -3
  593. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
  594. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +8 -20
  595. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
  596. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +3 -6
  597. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -1
  598. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +1 -6
  599. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -1
  600. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +1 -4
  601. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
  602. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +2 -48
  603. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
  604. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +1 -5
  605. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
  606. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +5 -54
  607. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
  608. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -3
  609. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  610. package/node_modules/@earendil-works/pi-tui/dist/index.js +0 -3
  611. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  612. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +1 -3
  613. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -1
  614. package/node_modules/@earendil-works/pi-tui/dist/layout.js +9 -32
  615. package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -1
  616. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +1 -2
  617. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
  618. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +44 -3
  619. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
  620. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  621. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +20 -2
  622. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  623. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +1 -31
  624. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
  625. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +41 -335
  626. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
  627. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +5 -83
  628. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  629. package/node_modules/@earendil-works/pi-tui/dist/tui.js +4 -118
  630. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  631. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -2
  632. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  633. package/node_modules/@earendil-works/pi-tui/dist/utils.js +0 -9
  634. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  635. package/node_modules/@earendil-works/pi-tui/native/darwin/README.md +6 -8
  636. package/node_modules/@earendil-works/pi-tui/native/darwin/build.sh +5 -12
  637. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/{darwin-platform.node → darwin-modifiers.node} +0 -0
  638. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/{darwin-platform.node → darwin-modifiers.node} +0 -0
  639. package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-modifiers.c +70 -0
  640. package/node_modules/@earendil-works/pi-tui/native/win32/README.md +7 -18
  641. package/node_modules/@earendil-works/pi-tui/native/win32/build.mjs +4 -7
  642. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
  643. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
  644. package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-console-mode.c +119 -0
  645. package/node_modules/@earendil-works/pi-tui/package.json +3 -10
  646. package/node_modules/@google/genai/dist/genai.d.ts +278 -1788
  647. package/node_modules/@google/genai/dist/index.cjs +299 -319
  648. package/node_modules/@google/genai/dist/index.mjs +299 -319
  649. package/node_modules/@google/genai/dist/index.mjs.map +1 -1
  650. package/node_modules/@google/genai/dist/node/index.cjs +300 -320
  651. package/node_modules/@google/genai/dist/node/index.mjs +300 -320
  652. package/node_modules/@google/genai/dist/node/index.mjs.map +1 -1
  653. package/node_modules/@google/genai/dist/node/node.d.ts +278 -1788
  654. package/node_modules/@google/genai/dist/tokenizer/node.cjs +2 -49
  655. package/node_modules/@google/genai/dist/tokenizer/node.d.ts +3 -43
  656. package/node_modules/@google/genai/dist/tokenizer/node.mjs +2 -49
  657. package/node_modules/@google/genai/dist/tokenizer/node.mjs.map +1 -1
  658. package/node_modules/@google/genai/dist/vertex_internal/index.cjs +3 -39
  659. package/node_modules/@google/genai/dist/vertex_internal/index.cjs.map +1 -1
  660. package/node_modules/@google/genai/dist/vertex_internal/index.d.ts +9 -51
  661. package/node_modules/@google/genai/dist/vertex_internal/index.js +3 -39
  662. package/node_modules/@google/genai/dist/vertex_internal/index.js.map +1 -1
  663. package/node_modules/@google/genai/dist/web/index.mjs +299 -319
  664. package/node_modules/@google/genai/dist/web/index.mjs.map +1 -1
  665. package/node_modules/@google/genai/dist/web/web.d.ts +278 -1788
  666. package/node_modules/@google/genai/package.json +1 -1
  667. package/node_modules/@mariozechner/clipboard/.yarnrc.yml +1 -0
  668. package/node_modules/@mariozechner/clipboard/Cargo.toml +45 -0
  669. package/node_modules/@mariozechner/clipboard/README.md +60 -0
  670. package/node_modules/@mariozechner/clipboard/build.rs +5 -0
  671. package/node_modules/@mariozechner/clipboard/exp.ts +12 -0
  672. package/node_modules/@mariozechner/clipboard/index.d.ts +37 -0
  673. package/node_modules/@mariozechner/clipboard/index.js +606 -0
  674. package/node_modules/@mariozechner/clipboard/package.json +45 -0
  675. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/common.rs +307 -0
  676. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/mod.rs +93 -0
  677. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/ios.rs +313 -0
  678. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/macos.rs +471 -0
  679. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/mod.rs +252 -0
  680. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/wayland.rs +431 -0
  681. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/win.rs +712 -0
  682. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/x11.rs +916 -0
  683. package/node_modules/@mariozechner/clipboard/src/lib.rs +194 -0
  684. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +4 -11
  685. package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -1
  686. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +3 -2
  687. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +1 -8
  688. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  689. package/node_modules/ignore/README.md +0 -52
  690. package/node_modules/ignore/index.js +129 -785
  691. package/node_modules/ignore/legacy.js +98 -660
  692. package/node_modules/ignore/package.json +4 -10
  693. package/node_modules/marked/README.md +0 -1
  694. package/node_modules/marked/lib/marked.d.ts +0 -7
  695. package/node_modules/marked/lib/marked.esm.js +30 -30
  696. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  697. package/node_modules/marked/lib/marked.umd.js +30 -30
  698. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  699. package/node_modules/marked/man/marked.1 +1 -1
  700. package/node_modules/marked/package.json +2 -2
  701. package/node_modules/typebox/build/compile/validator.d.mts +1 -1
  702. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  703. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +5 -7
  704. package/node_modules/typebox/build/format/iri.mjs +1 -5
  705. package/node_modules/typebox/build/guard/emit.mjs +4 -2
  706. package/node_modules/typebox/build/guard/guard.mjs +18 -6
  707. package/node_modules/typebox/build/guard/string.mjs +24 -16
  708. package/node_modules/typebox/build/schema/compile.d.mts +2 -3
  709. package/node_modules/typebox/build/schema/compile.mjs +8 -8
  710. package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -1
  711. package/node_modules/typebox/build/schema/engine/_context.mjs +14 -9
  712. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  713. package/node_modules/typebox/build/schema/engine/_stack.d.mts +2 -6
  714. package/node_modules/typebox/build/schema/engine/_stack.mjs +32 -135
  715. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -16
  716. package/node_modules/typebox/build/schema/engine/allOf.mjs +2 -2
  717. package/node_modules/typebox/build/schema/engine/anyOf.mjs +2 -2
  718. package/node_modules/typebox/build/schema/engine/if.mjs +2 -2
  719. package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
  720. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +3 -1
  721. package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
  722. package/node_modules/typebox/build/schema/engine/schema.mjs +0 -6
  723. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
  724. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
  725. package/node_modules/typebox/build/schema/errors.d.mts +2 -2
  726. package/node_modules/typebox/build/schema/errors.mjs +13 -7
  727. package/node_modules/typebox/build/schema/parse.d.mts +0 -1
  728. package/node_modules/typebox/build/schema/parse.mjs +5 -10
  729. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +3 -34
  730. package/node_modules/typebox/build/schema/resolve/resolve.mjs +73 -198
  731. package/node_modules/typebox/build/schema/schema.d.mts +0 -1
  732. package/node_modules/typebox/build/schema/schema.mjs +0 -1
  733. package/node_modules/typebox/build/value/errors/errors.d.mts +12 -2
  734. package/node_modules/typebox/build/value/errors/errors.mjs +7 -2
  735. package/node_modules/typebox/package.json +1 -1
  736. package/node_modules/typebox/readme.md +5 -9
  737. package/node_modules/undici/docs/docs/api/Client.md +0 -4
  738. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +2 -3
  739. package/node_modules/undici/docs/docs/api/EventSource.md +0 -4
  740. package/node_modules/undici/docs/docs/api/Interceptors.md +3 -7
  741. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +1 -7
  742. package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
  743. package/node_modules/undici/lib/core/symbols.js +0 -2
  744. package/node_modules/undici/lib/dispatcher/agent.js +2 -7
  745. package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -7
  746. package/node_modules/undici/lib/dispatcher/client-h1.js +4 -12
  747. package/node_modules/undici/lib/dispatcher/client-h2.js +3 -43
  748. package/node_modules/undici/lib/dispatcher/client.js +2 -3
  749. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +1 -13
  750. package/node_modules/undici/lib/dispatcher/dispatcher.js +1 -15
  751. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +0 -3
  752. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +3 -10
  753. package/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -18
  754. package/node_modules/undici/lib/dispatcher/retry-agent.js +0 -3
  755. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  756. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +21 -91
  757. package/node_modules/undici/lib/handler/cache-handler.js +5 -29
  758. package/node_modules/undici/lib/handler/decorator-handler.js +1 -7
  759. package/node_modules/undici/lib/handler/deduplication-handler.js +6 -12
  760. package/node_modules/undici/lib/handler/redirect-handler.js +4 -21
  761. package/node_modules/undici/lib/handler/retry-handler.js +30 -148
  762. package/node_modules/undici/lib/interceptor/cache.js +12 -65
  763. package/node_modules/undici/lib/interceptor/decompress.js +13 -115
  764. package/node_modules/undici/lib/interceptor/deduplicate.js +4 -5
  765. package/node_modules/undici/lib/interceptor/dns.js +0 -7
  766. package/node_modules/undici/lib/interceptor/dump.js +23 -10
  767. package/node_modules/undici/lib/mock/mock-agent.js +1 -13
  768. package/node_modules/undici/lib/mock/mock-utils.js +10 -11
  769. package/node_modules/undici/lib/util/cache.js +3 -45
  770. package/node_modules/undici/lib/web/cookies/parse.js +147 -150
  771. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +1 -28
  772. package/node_modules/undici/lib/web/eventsource/eventsource.js +3 -13
  773. package/node_modules/undici/lib/web/fetch/index.js +0 -6
  774. package/node_modules/undici/lib/web/fetch/request.js +3 -2
  775. package/node_modules/undici/lib/web/fetch/util.js +1 -6
  776. package/node_modules/undici/lib/web/webidl/index.js +3 -3
  777. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  778. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -5
  779. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +10 -8
  780. package/node_modules/undici/package.json +3 -3
  781. package/node_modules/undici/types/client.d.ts +0 -10
  782. package/node_modules/undici/types/interceptors.d.ts +0 -2
  783. package/node_modules/undici/types/mock-agent.d.ts +10 -11
  784. package/node_modules/undici/types/socks5-proxy-agent.d.ts +0 -2
  785. package/package.json +49 -70
  786. package/vendor/pi-client/client.d.ts +15 -20
  787. package/vendor/pi-client/client.d.ts.map +1 -1
  788. package/vendor/pi-client/client.js +245 -248
  789. package/vendor/pi-client/client.js.map +1 -1
  790. package/vendor/pi-client/connection.d.ts +3 -4
  791. package/vendor/pi-client/connection.d.ts.map +1 -1
  792. package/vendor/pi-client/connection.js +9 -13
  793. package/vendor/pi-client/connection.js.map +1 -1
  794. package/vendor/pi-client/errors.d.ts +15 -6
  795. package/vendor/pi-client/errors.d.ts.map +1 -1
  796. package/vendor/pi-client/errors.js +25 -10
  797. package/vendor/pi-client/errors.js.map +1 -1
  798. package/vendor/pi-client/index.d.ts +4 -3
  799. package/vendor/pi-client/index.d.ts.map +1 -1
  800. package/vendor/pi-client/index.js +2 -2
  801. package/vendor/pi-client/index.js.map +1 -1
  802. package/vendor/pi-client/session-handle.d.ts +54 -0
  803. package/vendor/pi-client/session-handle.d.ts.map +1 -0
  804. package/vendor/pi-client/session-handle.js +50 -0
  805. package/vendor/pi-client/session-handle.js.map +1 -0
  806. package/vendor/pi-client/state.d.ts +22 -0
  807. package/vendor/pi-client/state.d.ts.map +1 -0
  808. package/vendor/pi-client/state.js +145 -0
  809. package/vendor/pi-client/state.js.map +1 -0
  810. package/vendor/pi-client/types.d.ts +8 -14
  811. package/vendor/pi-client/types.d.ts.map +1 -1
  812. package/vendor/pi-client/types.js.map +1 -1
  813. package/vendor/pi-client/unix.d.ts +1 -14
  814. package/vendor/pi-client/unix.d.ts.map +1 -1
  815. package/vendor/pi-client/unix.js +8 -138
  816. package/vendor/pi-client/unix.js.map +1 -1
  817. package/vendor/pi-protocol/codec.d.ts +4 -2
  818. package/vendor/pi-protocol/codec.d.ts.map +1 -1
  819. package/vendor/pi-protocol/codec.js +34 -7
  820. package/vendor/pi-protocol/codec.js.map +1 -1
  821. package/vendor/pi-protocol/framing.d.ts +2 -0
  822. package/vendor/pi-protocol/framing.d.ts.map +1 -1
  823. package/vendor/pi-protocol/framing.js +15 -0
  824. package/vendor/pi-protocol/framing.js.map +1 -1
  825. package/vendor/pi-protocol/index.d.ts +1 -1
  826. package/vendor/pi-protocol/index.d.ts.map +1 -1
  827. package/vendor/pi-protocol/index.js +1 -1
  828. package/vendor/pi-protocol/index.js.map +1 -1
  829. package/vendor/pi-protocol/schemas.d.ts +13739 -0
  830. package/vendor/pi-protocol/schemas.d.ts.map +1 -0
  831. package/vendor/pi-protocol/schemas.js +386 -0
  832. package/vendor/pi-protocol/schemas.js.map +1 -0
  833. package/dist/bun/runtime-setup.d.ts +0 -2
  834. package/dist/bun/runtime-setup.d.ts.map +0 -1
  835. package/dist/bun/runtime-setup.js +0 -9
  836. package/dist/bun/runtime-setup.js.map +0 -1
  837. package/dist/bun/sandbox-env-setup.d.ts +0 -2
  838. package/dist/bun/sandbox-env-setup.d.ts.map +0 -1
  839. package/dist/bun/sandbox-env-setup.js +0 -4
  840. package/dist/bun/sandbox-env-setup.js.map +0 -1
  841. package/dist/cli/setup.d.ts +0 -2
  842. package/dist/cli/setup.d.ts.map +0 -1
  843. package/dist/cli/setup.js +0 -12
  844. package/dist/cli/setup.js.map +0 -1
  845. package/dist/core/cursor-history-admission.d.ts +0 -50
  846. package/dist/core/cursor-history-admission.d.ts.map +0 -1
  847. package/dist/core/cursor-history-admission.js +0 -130
  848. package/dist/core/cursor-history-admission.js.map +0 -1
  849. package/dist/core/tools/renderers/bash.d.ts +0 -12
  850. package/dist/core/tools/renderers/bash.d.ts.map +0 -1
  851. package/dist/core/tools/renderers/bash.js +0 -156
  852. package/dist/core/tools/renderers/bash.js.map +0 -1
  853. package/dist/core/tools/renderers/edit.d.ts +0 -23
  854. package/dist/core/tools/renderers/edit.d.ts.map +0 -1
  855. package/dist/core/tools/renderers/edit.js +0 -172
  856. package/dist/core/tools/renderers/edit.js.map +0 -1
  857. package/dist/core/tools/renderers/find.d.ts +0 -10
  858. package/dist/core/tools/renderers/find.d.ts.map +0 -1
  859. package/dist/core/tools/renderers/find.js +0 -64
  860. package/dist/core/tools/renderers/find.js.map +0 -1
  861. package/dist/core/tools/renderers/grep.d.ts +0 -10
  862. package/dist/core/tools/renderers/grep.d.ts.map +0 -1
  863. package/dist/core/tools/renderers/grep.js +0 -69
  864. package/dist/core/tools/renderers/grep.js.map +0 -1
  865. package/dist/core/tools/renderers/index.d.ts +0 -28
  866. package/dist/core/tools/renderers/index.d.ts.map +0 -1
  867. package/dist/core/tools/renderers/index.js +0 -47
  868. package/dist/core/tools/renderers/index.js.map +0 -1
  869. package/dist/core/tools/renderers/ls.d.ts +0 -10
  870. package/dist/core/tools/renderers/ls.d.ts.map +0 -1
  871. package/dist/core/tools/renderers/ls.js +0 -58
  872. package/dist/core/tools/renderers/ls.js.map +0 -1
  873. package/dist/core/tools/renderers/read.d.ts +0 -19
  874. package/dist/core/tools/renderers/read.d.ts.map +0 -1
  875. package/dist/core/tools/renderers/read.js +0 -149
  876. package/dist/core/tools/renderers/read.js.map +0 -1
  877. package/dist/core/tools/renderers/write.d.ts +0 -10
  878. package/dist/core/tools/renderers/write.d.ts.map +0 -1
  879. package/dist/core/tools/renderers/write.js +0 -162
  880. package/dist/core/tools/renderers/write.js.map +0 -1
  881. package/dist/modes/interactive/chat-viewport.d.ts +0 -22
  882. package/dist/modes/interactive/chat-viewport.d.ts.map +0 -1
  883. package/dist/modes/interactive/chat-viewport.js +0 -29
  884. package/dist/modes/interactive/chat-viewport.js.map +0 -1
  885. package/dist/modes/interactive/components/ask-user-answer-key.d.ts +0 -14
  886. package/dist/modes/interactive/components/ask-user-answer-key.d.ts.map +0 -1
  887. package/dist/modes/interactive/components/ask-user-answer-key.js +0 -65
  888. package/dist/modes/interactive/components/ask-user-answer-key.js.map +0 -1
  889. package/dist/modes/interactive/theme/theme-json.d.ts +0 -84
  890. package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
  891. package/dist/modes/interactive/theme/theme-json.js +0 -130
  892. package/dist/modes/interactive/theme/theme-json.js.map +0 -1
  893. package/dist/modes/interactive/tui-renderer.d.ts +0 -21
  894. package/dist/modes/interactive/tui-renderer.d.ts.map +0 -1
  895. package/dist/modes/interactive/tui-renderer.js +0 -67
  896. package/dist/modes/interactive/tui-renderer.js.map +0 -1
  897. package/dist/modes/rpc/session-path-reservations.d.ts +0 -30
  898. package/dist/modes/rpc/session-path-reservations.d.ts.map +0 -1
  899. package/dist/modes/rpc/session-path-reservations.js +0 -58
  900. package/dist/modes/rpc/session-path-reservations.js.map +0 -1
  901. package/dist/modes/rpc/session-worker-credit.d.ts +0 -17
  902. package/dist/modes/rpc/session-worker-credit.d.ts.map +0 -1
  903. package/dist/modes/rpc/session-worker-credit.js +0 -39
  904. package/dist/modes/rpc/session-worker-credit.js.map +0 -1
  905. package/dist/modes/rpc/session-worker-signals.d.ts +0 -7
  906. package/dist/modes/rpc/session-worker-signals.d.ts.map +0 -1
  907. package/dist/modes/rpc/session-worker-signals.js +0 -19
  908. package/dist/modes/rpc/session-worker-signals.js.map +0 -1
  909. package/dist/utils/clipboard-command.d.ts +0 -7
  910. package/dist/utils/clipboard-command.d.ts.map +0 -1
  911. package/dist/utils/clipboard-command.js +0 -45
  912. package/dist/utils/clipboard-command.js.map +0 -1
  913. package/examples/plugins/pi-example-plugin/README.md +0 -38
  914. package/examples/plugins/pi-example-plugin/package.json +0 -10
  915. package/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
  916. package/examples/plugins/pi-example-plugin/src/session.ts +0 -23
  917. package/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
  918. package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +0 -3
  919. package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +0 -4
  920. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +0 -1
  921. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +0 -201
  922. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +0 -62
  923. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +0 -158
  924. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +0 -2
  925. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +0 -16
  926. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +0 -84
  927. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +0 -8
  928. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +0 -11
  929. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +0 -10
  930. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +0 -4
  931. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +0 -5
  932. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +0 -7
  933. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +0 -7
  934. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +0 -8
  935. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts +0 -8
  936. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromEnvSigningName.d.ts +0 -18
  937. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +0 -12
  938. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +0 -9
  939. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +0 -8
  940. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +0 -7
  941. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts +0 -7
  942. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts +0 -18
  943. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts +0 -3
  944. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromEnvSigningName.d.ts +0 -8
  945. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +0 -10
  946. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts +0 -5
  947. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +0 -9
  948. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +0 -7
  949. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts +0 -7
  950. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts +0 -3
  951. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts +0 -2
  952. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts +0 -1
  953. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts +0 -2
  954. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts +0 -5
  955. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts +0 -4
  956. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts +0 -5
  957. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +0 -69
  958. package/node_modules/@earendil-works/chord/README.md +0 -205
  959. package/node_modules/@earendil-works/chord/dist/api.d.ts +0 -15
  960. package/node_modules/@earendil-works/chord/dist/api.d.ts.map +0 -1
  961. package/node_modules/@earendil-works/chord/dist/api.js +0 -72
  962. package/node_modules/@earendil-works/chord/dist/api.js.map +0 -1
  963. package/node_modules/@earendil-works/chord/dist/bundler.d.ts +0 -6
  964. package/node_modules/@earendil-works/chord/dist/bundler.d.ts.map +0 -1
  965. package/node_modules/@earendil-works/chord/dist/bundler.js +0 -3
  966. package/node_modules/@earendil-works/chord/dist/bundler.js.map +0 -1
  967. package/node_modules/@earendil-works/chord/dist/context/index.d.ts +0 -24
  968. package/node_modules/@earendil-works/chord/dist/context/index.d.ts.map +0 -1
  969. package/node_modules/@earendil-works/chord/dist/context/index.js +0 -97
  970. package/node_modules/@earendil-works/chord/dist/context/index.js.map +0 -1
  971. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts +0 -119
  972. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts.map +0 -1
  973. package/node_modules/@earendil-works/chord/dist/delta/index.js +0 -1209
  974. package/node_modules/@earendil-works/chord/dist/delta/index.js.map +0 -1
  975. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts +0 -12
  976. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts.map +0 -1
  977. package/node_modules/@earendil-works/chord/dist/facets/host.js +0 -762
  978. package/node_modules/@earendil-works/chord/dist/facets/host.js.map +0 -1
  979. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts +0 -3
  980. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts.map +0 -1
  981. package/node_modules/@earendil-works/chord/dist/facets/loader.js +0 -5
  982. package/node_modules/@earendil-works/chord/dist/facets/loader.js.map +0 -1
  983. package/node_modules/@earendil-works/chord/dist/index.d.ts +0 -11
  984. package/node_modules/@earendil-works/chord/dist/index.d.ts.map +0 -1
  985. package/node_modules/@earendil-works/chord/dist/index.js +0 -10
  986. package/node_modules/@earendil-works/chord/dist/index.js.map +0 -1
  987. package/node_modules/@earendil-works/chord/dist/json.d.ts +0 -4
  988. package/node_modules/@earendil-works/chord/dist/json.d.ts.map +0 -1
  989. package/node_modules/@earendil-works/chord/dist/json.js +0 -57
  990. package/node_modules/@earendil-works/chord/dist/json.js.map +0 -1
  991. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts +0 -30
  992. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts.map +0 -1
  993. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js +0 -377
  994. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js.map +0 -1
  995. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts +0 -26
  996. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts.map +0 -1
  997. package/node_modules/@earendil-works/chord/dist/node/bundle.js +0 -183
  998. package/node_modules/@earendil-works/chord/dist/node/bundle.js.map +0 -1
  999. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts +0 -36
  1000. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts.map +0 -1
  1001. package/node_modules/@earendil-works/chord/dist/node/manifest.js +0 -6
  1002. package/node_modules/@earendil-works/chord/dist/node/manifest.js.map +0 -1
  1003. package/node_modules/@earendil-works/chord/dist/node/package.d.ts +0 -15
  1004. package/node_modules/@earendil-works/chord/dist/node/package.d.ts.map +0 -1
  1005. package/node_modules/@earendil-works/chord/dist/node/package.js +0 -199
  1006. package/node_modules/@earendil-works/chord/dist/node/package.js.map +0 -1
  1007. package/node_modules/@earendil-works/chord/dist/node.d.ts +0 -5
  1008. package/node_modules/@earendil-works/chord/dist/node.d.ts.map +0 -1
  1009. package/node_modules/@earendil-works/chord/dist/node.js +0 -3
  1010. package/node_modules/@earendil-works/chord/dist/node.js.map +0 -1
  1011. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts +0 -11
  1012. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts.map +0 -1
  1013. package/node_modules/@earendil-works/chord/dist/services/consumer.js +0 -535
  1014. package/node_modules/@earendil-works/chord/dist/services/consumer.js.map +0 -1
  1015. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts +0 -8
  1016. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts.map +0 -1
  1017. package/node_modules/@earendil-works/chord/dist/services/errors.js +0 -21
  1018. package/node_modules/@earendil-works/chord/dist/services/errors.js.map +0 -1
  1019. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts +0 -15
  1020. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts.map +0 -1
  1021. package/node_modules/@earendil-works/chord/dist/services/handle.js +0 -99
  1022. package/node_modules/@earendil-works/chord/dist/services/handle.js.map +0 -1
  1023. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts +0 -25
  1024. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts.map +0 -1
  1025. package/node_modules/@earendil-works/chord/dist/services/instances.js +0 -137
  1026. package/node_modules/@earendil-works/chord/dist/services/instances.js.map +0 -1
  1027. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts +0 -5
  1028. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts.map +0 -1
  1029. package/node_modules/@earendil-works/chord/dist/services/loopback.js +0 -15
  1030. package/node_modules/@earendil-works/chord/dist/services/loopback.js.map +0 -1
  1031. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts +0 -37
  1032. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts.map +0 -1
  1033. package/node_modules/@earendil-works/chord/dist/services/provider.js +0 -472
  1034. package/node_modules/@earendil-works/chord/dist/services/provider.js.map +0 -1
  1035. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +0 -15
  1036. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts.map +0 -1
  1037. package/node_modules/@earendil-works/chord/dist/services/state-codec.js +0 -115
  1038. package/node_modules/@earendil-works/chord/dist/services/state-codec.js.map +0 -1
  1039. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts +0 -11
  1040. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts.map +0 -1
  1041. package/node_modules/@earendil-works/chord/dist/services/state-internals.js +0 -10
  1042. package/node_modules/@earendil-works/chord/dist/services/state-internals.js.map +0 -1
  1043. package/node_modules/@earendil-works/chord/dist/services/state.d.ts +0 -23
  1044. package/node_modules/@earendil-works/chord/dist/services/state.d.ts.map +0 -1
  1045. package/node_modules/@earendil-works/chord/dist/services/state.js +0 -124
  1046. package/node_modules/@earendil-works/chord/dist/services/state.js.map +0 -1
  1047. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts +0 -60
  1048. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts.map +0 -1
  1049. package/node_modules/@earendil-works/chord/dist/services/wire.js +0 -173
  1050. package/node_modules/@earendil-works/chord/dist/services/wire.js.map +0 -1
  1051. package/node_modules/@earendil-works/chord/dist/types.d.ts +0 -203
  1052. package/node_modules/@earendil-works/chord/dist/types.d.ts.map +0 -1
  1053. package/node_modules/@earendil-works/chord/dist/types.js +0 -2
  1054. package/node_modules/@earendil-works/chord/dist/types.js.map +0 -1
  1055. package/node_modules/@earendil-works/chord/package.json +0 -73
  1056. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts +0 -9
  1057. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts.map +0 -1
  1058. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js +0 -35
  1059. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js.map +0 -1
  1060. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts +0 -9
  1061. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts.map +0 -1
  1062. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js +0 -13
  1063. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js.map +0 -1
  1064. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts +0 -42
  1065. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts.map +0 -1
  1066. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js +0 -82
  1067. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js.map +0 -1
  1068. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts +0 -22
  1069. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts.map +0 -1
  1070. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js +0 -48
  1071. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js.map +0 -1
  1072. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts +0 -67
  1073. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts.map +0 -1
  1074. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js +0 -121
  1075. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js.map +0 -1
  1076. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts +0 -38
  1077. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts.map +0 -1
  1078. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js +0 -404
  1079. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js.map +0 -1
  1080. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts +0 -28
  1081. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts.map +0 -1
  1082. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js +0 -173
  1083. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js.map +0 -1
  1084. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts +0 -8
  1085. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts.map +0 -1
  1086. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js +0 -133
  1087. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js.map +0 -1
  1088. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts +0 -15
  1089. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts.map +0 -1
  1090. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js +0 -179
  1091. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js.map +0 -1
  1092. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts +0 -8
  1093. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts.map +0 -1
  1094. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js +0 -205
  1095. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js.map +0 -1
  1096. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts +0 -5
  1097. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts.map +0 -1
  1098. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js +0 -140
  1099. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js.map +0 -1
  1100. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts +0 -8
  1101. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts.map +0 -1
  1102. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js +0 -85
  1103. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js.map +0 -1
  1104. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts +0 -23
  1105. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts.map +0 -1
  1106. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js +0 -394
  1107. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js.map +0 -1
  1108. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts +0 -4
  1109. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts.map +0 -1
  1110. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js +0 -34
  1111. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js.map +0 -1
  1112. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts +0 -32
  1113. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts.map +0 -1
  1114. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js +0 -929
  1115. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js.map +0 -1
  1116. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts +0 -7
  1117. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts.map +0 -1
  1118. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js +0 -49
  1119. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js.map +0 -1
  1120. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts +0 -14
  1121. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts.map +0 -1
  1122. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js +0 -244
  1123. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js.map +0 -1
  1124. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts +0 -6
  1125. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts.map +0 -1
  1126. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js +0 -449
  1127. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js.map +0 -1
  1128. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts +0 -6
  1129. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts.map +0 -1
  1130. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js +0 -93
  1131. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js.map +0 -1
  1132. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts +0 -59
  1133. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts.map +0 -1
  1134. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js +0 -302
  1135. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js.map +0 -1
  1136. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts +0 -2
  1137. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts.map +0 -1
  1138. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js +0 -2
  1139. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js.map +0 -1
  1140. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts +0 -118
  1141. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts.map +0 -1
  1142. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js +0 -1559
  1143. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js.map +0 -1
  1144. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts +0 -15
  1145. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts.map +0 -1
  1146. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js +0 -66
  1147. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js.map +0 -1
  1148. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts +0 -5
  1149. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts.map +0 -1
  1150. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js +0 -240
  1151. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js.map +0 -1
  1152. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts +0 -24
  1153. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts.map +0 -1
  1154. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js +0 -117
  1155. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js.map +0 -1
  1156. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts +0 -21
  1157. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts.map +0 -1
  1158. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js +0 -72
  1159. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js.map +0 -1
  1160. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts +0 -105
  1161. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts.map +0 -1
  1162. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js +0 -50
  1163. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js.map +0 -1
  1164. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts +0 -53
  1165. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts.map +0 -1
  1166. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js +0 -57
  1167. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js.map +0 -1
  1168. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts +0 -21
  1169. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts.map +0 -1
  1170. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js +0 -55
  1171. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js.map +0 -1
  1172. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +0 -16
  1173. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +0 -1
  1174. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +0 -79
  1175. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +0 -1
  1176. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts +0 -39
  1177. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts.map +0 -1
  1178. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js +0 -269
  1179. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js.map +0 -1
  1180. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts +0 -38
  1181. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts.map +0 -1
  1182. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js +0 -266
  1183. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js.map +0 -1
  1184. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts +0 -4
  1185. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts.map +0 -1
  1186. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js +0 -4
  1187. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js.map +0 -1
  1188. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts +0 -14
  1189. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts.map +0 -1
  1190. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js +0 -86
  1191. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js.map +0 -1
  1192. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts +0 -44
  1193. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts.map +0 -1
  1194. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js +0 -454
  1195. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js.map +0 -1
  1196. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts +0 -8
  1197. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts.map +0 -1
  1198. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js +0 -22
  1199. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js.map +0 -1
  1200. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts +0 -12
  1201. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts.map +0 -1
  1202. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js +0 -24
  1203. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js.map +0 -1
  1204. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts +0 -42
  1205. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts.map +0 -1
  1206. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js +0 -127
  1207. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js.map +0 -1
  1208. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts +0 -25
  1209. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts.map +0 -1
  1210. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js +0 -114
  1211. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js.map +0 -1
  1212. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts +0 -23
  1213. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts.map +0 -1
  1214. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js +0 -809
  1215. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js.map +0 -1
  1216. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts +0 -4
  1217. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts.map +0 -1
  1218. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js +0 -600
  1219. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js.map +0 -1
  1220. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts +0 -26
  1221. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts.map +0 -1
  1222. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js +0 -103
  1223. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js.map +0 -1
  1224. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts +0 -11
  1225. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts.map +0 -1
  1226. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js +0 -19
  1227. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js.map +0 -1
  1228. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts +0 -20
  1229. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts.map +0 -1
  1230. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js +0 -40
  1231. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js.map +0 -1
  1232. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts +0 -95
  1233. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts.map +0 -1
  1234. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js +0 -81
  1235. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js.map +0 -1
  1236. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts +0 -24
  1237. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts.map +0 -1
  1238. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js +0 -79
  1239. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js.map +0 -1
  1240. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts +0 -31
  1241. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts.map +0 -1
  1242. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js +0 -217
  1243. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js.map +0 -1
  1244. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts +0 -4
  1245. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts.map +0 -1
  1246. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js +0 -33
  1247. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js.map +0 -1
  1248. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts +0 -77
  1249. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts.map +0 -1
  1250. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js +0 -72
  1251. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js.map +0 -1
  1252. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts +0 -32
  1253. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts.map +0 -1
  1254. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js +0 -62
  1255. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js.map +0 -1
  1256. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts +0 -4
  1257. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts.map +0 -1
  1258. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js +0 -22
  1259. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js.map +0 -1
  1260. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts +0 -77
  1261. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts.map +0 -1
  1262. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +0 -427
  1263. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js.map +0 -1
  1264. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts +0 -12
  1265. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts.map +0 -1
  1266. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js +0 -93
  1267. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js.map +0 -1
  1268. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts +0 -12
  1269. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts.map +0 -1
  1270. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js +0 -19
  1271. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js.map +0 -1
  1272. package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts +0 -18
  1273. package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts.map +0 -1
  1274. package/node_modules/@earendil-works/pi-tui/dist/native-platform.js +0 -42
  1275. package/node_modules/@earendil-works/pi-tui/dist/native-platform.js.map +0 -1
  1276. package/node_modules/@earendil-works/pi-tui/native/clipboard.h +0 -170
  1277. package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-platform.m +0 -93
  1278. package/node_modules/@earendil-works/pi-tui/native/linux/README.md +0 -23
  1279. package/node_modules/@earendil-works/pi-tui/native/linux/build.sh +0 -65
  1280. package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
  1281. package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
  1282. package/node_modules/@earendil-works/pi-tui/native/linux/src/clipboard-worker.h +0 -70
  1283. package/node_modules/@earendil-works/pi-tui/native/linux/src/linux-platform-x11.c +0 -274
  1284. package/node_modules/@earendil-works/pi-tui/native/napi.h +0 -89
  1285. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
  1286. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
  1287. package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-platform.c +0 -241
  1288. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/LICENSE +0 -201
  1289. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/README.md +0 -115
  1290. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/index.js +0 -96
  1291. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort-handler.js +0 -1
  1292. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort.js +0 -1
  1293. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +0 -5
  1294. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +0 -1
  1295. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +0 -1
  1296. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +0 -1
  1297. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +0 -1
  1298. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/auth.js +0 -5
  1299. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/index.js +0 -2
  1300. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +0 -1
  1301. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/checksum.js +0 -1
  1302. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/client.js +0 -1
  1303. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/command.js +0 -1
  1304. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/config.js +0 -1
  1305. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/index.js +0 -1
  1306. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/manager.js +0 -1
  1307. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/pool.js +0 -1
  1308. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/crypto.js +0 -1
  1309. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js +0 -1
  1310. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/encode.js +0 -1
  1311. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoint.js +0 -5
  1312. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointParameterInstructions.js +0 -1
  1313. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +0 -1
  1314. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +0 -1
  1315. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +0 -1
  1316. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +0 -1
  1317. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/index.js +0 -1
  1318. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/shared.js +0 -1
  1319. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/eventStream.js +0 -1
  1320. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/checksum.js +0 -38
  1321. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +0 -7
  1322. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +0 -1
  1323. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/index.js +0 -2
  1324. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/retry.js +0 -1
  1325. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js +0 -1
  1326. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/feature-ids.js +0 -1
  1327. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +0 -1
  1328. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http.js +0 -5
  1329. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +0 -1
  1330. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +0 -1
  1331. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/identity.js +0 -1
  1332. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/index.js +0 -1
  1333. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +0 -1
  1334. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/index.js +0 -7
  1335. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/logger.js +0 -1
  1336. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/metrics.js +0 -1
  1337. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/middleware.js +0 -1
  1338. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/pagination.js +0 -1
  1339. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/profile.js +0 -6
  1340. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/response.js +0 -1
  1341. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/retry.js +0 -1
  1342. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +0 -1
  1343. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema.js +0 -1
  1344. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/sentinels.js +0 -1
  1345. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/static-schemas.js +0 -1
  1346. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/traits.js +0 -1
  1347. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/serde.js +0 -1
  1348. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/shapes.js +0 -1
  1349. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/signature.js +0 -1
  1350. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/stream.js +0 -1
  1351. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +0 -1
  1352. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +0 -1
  1353. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +0 -1
  1354. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transfer.js +0 -6
  1355. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js +0 -1
  1356. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +0 -1
  1357. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/exact.js +0 -1
  1358. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/mutable.js +0 -1
  1359. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/no-undefined.js +0 -1
  1360. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/type-transform.js +0 -1
  1361. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/uri.js +0 -1
  1362. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/util.js +0 -1
  1363. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/waiter.js +0 -1
  1364. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort-handler.d.ts +0 -7
  1365. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort.d.ts +0 -48
  1366. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +0 -7
  1367. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +0 -49
  1368. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +0 -20
  1369. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +0 -41
  1370. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +0 -14
  1371. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/auth.d.ts +0 -59
  1372. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/index.d.ts +0 -7
  1373. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +0 -37
  1374. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/checksum.d.ts +0 -61
  1375. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/client.d.ts +0 -57
  1376. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/command.d.ts +0 -28
  1377. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/config.d.ts +0 -15
  1378. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/index.d.ts +0 -3
  1379. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/manager.d.ts +0 -34
  1380. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/pool.d.ts +0 -32
  1381. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/crypto.d.ts +0 -58
  1382. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +0 -24
  1383. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/encode.d.ts +0 -31
  1384. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoint.d.ts +0 -77
  1385. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointParameterInstructions.d.ts +0 -41
  1386. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +0 -27
  1387. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +0 -10
  1388. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +0 -28
  1389. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +0 -16
  1390. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +0 -5
  1391. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +0 -55
  1392. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/eventStream.d.ts +0 -137
  1393. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +0 -58
  1394. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts +0 -32
  1395. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts +0 -9
  1396. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/index.d.ts +0 -6
  1397. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/retry.d.ts +0 -18
  1398. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts +0 -35
  1399. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/feature-ids.d.ts +0 -16
  1400. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +0 -142
  1401. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http.d.ts +0 -110
  1402. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +0 -14
  1403. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +0 -31
  1404. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/identity.d.ts +0 -15
  1405. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/index.d.ts +0 -4
  1406. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +0 -14
  1407. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/index.d.ts +0 -52
  1408. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/logger.d.ts +0 -13
  1409. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/metrics.d.ts +0 -93
  1410. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/middleware.d.ts +0 -541
  1411. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/pagination.d.ts +0 -33
  1412. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/profile.d.ts +0 -30
  1413. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/response.d.ts +0 -40
  1414. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/retry.d.ts +0 -162
  1415. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +0 -143
  1416. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema.d.ts +0 -236
  1417. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +0 -65
  1418. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +0 -99
  1419. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/traits.d.ts +0 -46
  1420. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/serde.d.ts +0 -114
  1421. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/shapes.d.ts +0 -79
  1422. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/signature.d.ts +0 -172
  1423. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/stream.d.ts +0 -22
  1424. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts +0 -28
  1425. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +0 -54
  1426. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +0 -41
  1427. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transfer.d.ts +0 -42
  1428. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +0 -26
  1429. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +0 -73
  1430. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/exact.d.ts +0 -6
  1431. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/mutable.d.ts +0 -6
  1432. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +0 -68
  1433. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts +0 -39
  1434. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +0 -7
  1435. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +0 -45
  1436. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +0 -7
  1437. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +0 -49
  1438. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +0 -20
  1439. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +0 -41
  1440. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +0 -14
  1441. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts +0 -59
  1442. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +0 -7
  1443. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +0 -37
  1444. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts +0 -61
  1445. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +0 -57
  1446. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +0 -28
  1447. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +0 -15
  1448. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts +0 -3
  1449. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +0 -34
  1450. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +0 -32
  1451. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts +0 -58
  1452. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +0 -40
  1453. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +0 -31
  1454. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +0 -77
  1455. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointParameterInstructions.d.ts +0 -41
  1456. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +0 -27
  1457. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +0 -10
  1458. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +0 -28
  1459. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +0 -16
  1460. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts +0 -5
  1461. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +0 -55
  1462. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +0 -137
  1463. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +0 -58
  1464. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +0 -32
  1465. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +0 -9
  1466. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts +0 -6
  1467. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts +0 -18
  1468. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +0 -35
  1469. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +0 -16
  1470. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +0 -142
  1471. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +0 -110
  1472. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +0 -14
  1473. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +0 -31
  1474. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts +0 -15
  1475. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +0 -4
  1476. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +0 -14
  1477. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +0 -52
  1478. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts +0 -13
  1479. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/metrics.d.ts +0 -93
  1480. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +0 -541
  1481. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts +0 -33
  1482. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +0 -30
  1483. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts +0 -40
  1484. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts +0 -162
  1485. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +0 -149
  1486. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +0 -251
  1487. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/sentinels.d.ts +0 -65
  1488. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +0 -118
  1489. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/traits.d.ts +0 -46
  1490. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +0 -114
  1491. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +0 -79
  1492. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts +0 -172
  1493. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts +0 -22
  1494. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +0 -28
  1495. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +0 -54
  1496. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts +0 -41
  1497. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +0 -42
  1498. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +0 -26
  1499. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +0 -77
  1500. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts +0 -14
  1501. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/mutable.d.ts +0 -6
  1502. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +0 -88
  1503. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts +0 -40
  1504. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts +0 -17
  1505. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +0 -192
  1506. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +0 -35
  1507. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/uri.d.ts +0 -17
  1508. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/util.d.ts +0 -176
  1509. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/waiter.d.ts +0 -35
  1510. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/package.json +0 -50
  1511. package/node_modules/esbuild/LICENSE.md +0 -21
  1512. package/node_modules/esbuild/README.md +0 -3
  1513. package/node_modules/esbuild/bin/esbuild +0 -223
  1514. package/node_modules/esbuild/install.js +0 -300
  1515. package/node_modules/esbuild/lib/main.d.ts +0 -720
  1516. package/node_modules/esbuild/lib/main.js +0 -2536
  1517. package/node_modules/esbuild/package.json +0 -47
  1518. package/node_modules/typebox/build/schema/intern/index.d.mts +0 -1
  1519. package/node_modules/typebox/build/schema/intern/index.mjs +0 -1
  1520. package/node_modules/typebox/build/schema/intern/intern.d.mts +0 -14
  1521. package/node_modules/typebox/build/schema/intern/intern.mjs +0 -259
  1522. package/vendor/pi-protocol/protocol.d.ts +0 -167
  1523. package/vendor/pi-protocol/protocol.d.ts.map +0 -1
  1524. package/vendor/pi-protocol/protocol.js +0 -85
  1525. package/vendor/pi-protocol/protocol.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-session.js","sourceRoot":"","sources":["../../src/client/remote-session.ts"],"names":[],"mappings":"AAiBA,OAAO,EACN,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,GAEhB,MAAM,iBAAiB,CAAC;AA0BzB,MAAM,0BAA2B,SAAQ,KAAK;IAC7C;QACC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;IAC1C,CAAC;CACD;AAED,KAAK,UAAU,2BAA2B,CAAC,OAAiC;IAC3E,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CACzC,MAAM,CAAC,MAAM,KAAK,UAAU,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,YAAY,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAC7G,CAAC;IACF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;IACzC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC;AAC7F,CAAC;AAED,MAAM,OAAO,aAAa;IAChB,OAAO,CAAW;IAClB,gBAAgB,CAAuC;IA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QAC9B,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;QAC5B,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC;QACtC,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;IACrC,CAAC;IAED,cAAc;QACb,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAED,gBAAgB;QACf,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;QAC7E,CAAC;IACF,CAAC;IAED,kBAAkB;QACjB,IAAI,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,4BAA4B,CAAC,MAAoB;QACtD,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC3B,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3B,MAAM,IAAI,0BAA0B,EAAE,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAAoB;QACjC,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;CACD","sourcesContent":["import type {\n\tConnectionState,\n\tConnectionStateChange,\n\tPiClient,\n\tSessionLease,\n\tUnsubscribe,\n} from \"@earendil-works/pi-client\";\nimport type {\n\tModelMetadata,\n\tModelRef,\n\tServerEvent,\n\tSessionMetadata,\n\tSessionPhase,\n\tSessionSnapshot,\n\tThinkingLevel,\n\tTranscriptItem,\n} from \"@earendil-works/pi-protocol\";\nimport {\n\tapplyTranscriptProgress,\n\tapplyTranscriptSnapshot,\n\tcreateTranscriptState,\n\tselectTranscript,\n\ttype TranscriptState,\n} from \"./transcript.ts\";\n\nexport type RemoteSessionOperation = \"open\" | \"create\" | \"submit\" | \"abort\" | \"setModel\" | \"setThinking\" | \"reconnect\";\n\nexport type RemoteSessionLifecycle =\n\t| { readonly status: \"unbound\" }\n\t| { readonly status: \"ready\" }\n\t| { readonly status: \"busy\"; readonly operation: RemoteSessionOperation }\n\t| { readonly status: \"disposed\" };\n\nexport interface RemoteSessionState {\n\treadonly lifecycle: RemoteSessionLifecycle;\n\treadonly snapshot?: SessionSnapshot;\n\treadonly transcript: readonly TranscriptItem[];\n}\n\nexport interface CreateRemoteSessionOptions {\n\tcwd: string;\n\tmodel?: ModelRef;\n\tthinkingLevel?: ThinkingLevel;\n}\n\nexport interface RemoteSessionOptions {\n\tonListenerError?: (error: Error) => void;\n}\n\nclass RemoteSessionDisposedError extends Error {\n\tconstructor() {\n\t\tsuper(\"Remote session is disposed\");\n\t\tthis.name = \"RemoteSessionDisposedError\";\n\t}\n}\n\nasync function settleRemoteSessionDisposal(cleanup: readonly Promise<void>[]): Promise<void> {\n\tconst results = await Promise.allSettled(cleanup);\n\tconst errors = results.flatMap((result) =>\n\t\tresult.status === \"rejected\" && !(result.reason instanceof RemoteSessionDisposedError) ? [result.reason] : [],\n\t);\n\tif (errors.length === 1) throw errors[0];\n\tif (errors.length > 1) throw new AggregateError(errors, \"Failed to dispose remote session\");\n}\n\nexport class RemoteSession {\n\treadonly #client: PiClient;\n\treadonly #onListenerError: ((error: Error) => void) | undefined;\n\t#lifecycle: RemoteSessionLifecycle = { status: \"unbound\" };\n\t#handle: SessionLease | undefined;\n\t#transcript: TranscriptState | undefined;\n\t#unsubscribeSnapshot: Unsubscribe | undefined;\n\t#unsubscribeEvents: Unsubscribe | undefined;\n\treadonly #listeners = new Set<(state: RemoteSessionState) => void>();\n\treadonly #pendingAttachmentOperations = new Set<Promise<void>>();\n\treadonly #activeOperationStates = new Set<RemoteSessionLifecycle>();\n\t#disposePromise: Promise<void> | undefined;\n\t#resolveDisposeSignal: () => void = () => {};\n\treadonly #disposeSignal = new Promise<void>((resolve) => {\n\t\tthis.#resolveDisposeSignal = resolve;\n\t});\n\n\tprivate constructor(client: PiClient, options: RemoteSessionOptions = {}) {\n\t\tthis.#client = client;\n\t\tthis.#onListenerError = options.onListenerError;\n\t}\n\n\tget id(): string | undefined {\n\t\treturn this.#handle?.id;\n\t}\n\n\tget state(): RemoteSessionState {\n\t\treturn {\n\t\t\tlifecycle: this.#lifecycle,\n\t\t\tsnapshot: this.#transcript?.snapshot,\n\t\t\ttranscript: this.#transcript ? selectTranscript(this.#transcript) : [],\n\t\t};\n\t}\n\n\tget snapshot(): SessionSnapshot | undefined {\n\t\treturn this.#transcript?.snapshot;\n\t}\n\n\tget phase(): SessionPhase | undefined {\n\t\treturn this.snapshot?.phase;\n\t}\n\n\tget operation(): RemoteSessionOperation | undefined {\n\t\treturn this.#lifecycle.status === \"busy\" ? this.#lifecycle.operation : undefined;\n\t}\n\n\tget models(): readonly ModelMetadata[] {\n\t\treturn this.#client.snapshot?.models ?? [];\n\t}\n\n\tget sessions(): readonly SessionMetadata[] {\n\t\treturn this.#client.snapshot?.sessions ?? [];\n\t}\n\n\tget connectionState(): ConnectionState {\n\t\treturn this.#client.connectionState;\n\t}\n\n\tget disposed(): boolean {\n\t\treturn this.#lifecycle.status === \"disposed\";\n\t}\n\n\tsubscribe(listener: (state: RemoteSessionState) => void): Unsubscribe {\n\t\tthis.#assertNotDisposed();\n\t\tthis.#listeners.add(listener);\n\t\tthis.#callListener(listener, this.state);\n\t\treturn () => this.#listeners.delete(listener);\n\t}\n\n\tonConnectionStateChange(listener: (change: ConnectionStateChange) => void): Unsubscribe {\n\t\tthis.#assertNotDisposed();\n\t\treturn this.#client.onConnectionStateChange(listener);\n\t}\n\n\tstatic async open(client: PiClient, sessionId: string, options: RemoteSessionOptions = {}): Promise<RemoteSession> {\n\t\tconst session = new RemoteSession(client, options);\n\t\ttry {\n\t\t\tawait session.open(sessionId);\n\t\t\treturn session;\n\t\t} catch (error) {\n\t\t\tawait session.dispose();\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tasync open(sessionId: string): Promise<void> {\n\t\tif (this.#handle?.id === sessionId && this.#lifecycle.status === \"ready\") return;\n\t\tawait this.#replace(\"open\", () => this.#client.acquireSession(sessionId, { mode: \"exclusive\" }));\n\t}\n\n\tstatic async create(\n\t\tclient: PiClient,\n\t\tcreateOptions: CreateRemoteSessionOptions,\n\t\toptions: RemoteSessionOptions = {},\n\t): Promise<RemoteSession> {\n\t\tconst session = new RemoteSession(client, options);\n\t\ttry {\n\t\t\tawait session.create(createOptions);\n\t\t\treturn session;\n\t\t} catch (error) {\n\t\t\tawait session.dispose();\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tasync create(options: CreateRemoteSessionOptions): Promise<void> {\n\t\tawait this.#replace(\"create\", () => this.#client.createSession(options));\n\t}\n\n\tasync submit(text: string): Promise<void> {\n\t\tconst normalized = text.trim();\n\t\tif (!normalized) return;\n\t\tthis.#assertAvailable();\n\t\tconst handle = this.#requireHandle();\n\t\tif (this.phase !== \"idle\" && this.phase !== \"turn\") {\n\t\t\tthrow new Error(`Session cannot accept input during ${this.phase ?? \"unknown\"} phase`);\n\t\t}\n\t\tawait this.#runOperation(\"submit\", () =>\n\t\t\t(this.phase === \"idle\" ? handle.prompt(normalized) : handle.steer(normalized)).then(() => undefined),\n\t\t);\n\t}\n\n\tasync abort(): Promise<void> {\n\t\tconst preemptingSubmit = this.#lifecycle.status === \"busy\" && this.#lifecycle.operation === \"submit\";\n\t\tif (preemptingSubmit) this.#assertNotDisposed();\n\t\telse this.#assertAvailable();\n\t\tconst handle = this.#requireHandle();\n\t\tif (this.phase === \"idle\" && !preemptingSubmit) return;\n\t\tawait this.#runOperation(\"abort\", () => handle.abort().then(() => undefined), preemptingSubmit);\n\t}\n\n\tasync setModel(model: ModelRef): Promise<void> {\n\t\tawait this.#runIdleOperation(\"setModel\", \"change model\", () =>\n\t\t\tthis.#requireHandle()\n\t\t\t\t.setModel(model)\n\t\t\t\t.then(() => undefined),\n\t\t);\n\t}\n\n\tasync setThinking(thinkingLevel: ThinkingLevel): Promise<void> {\n\t\tawait this.#runIdleOperation(\"setThinking\", \"change thinking level\", () =>\n\t\t\tthis.#requireHandle()\n\t\t\t\t.setThinking(thinkingLevel)\n\t\t\t\t.then(() => undefined),\n\t\t);\n\t}\n\n\tasync reconnect(): Promise<void> {\n\t\tthis.#assertAvailable();\n\t\tconst sessionId = this.#requireHandle().id;\n\t\tawait this.#runOperation(\"reconnect\", () =>\n\t\t\tthis.#trackAttachmentOperation(async () => {\n\t\t\t\tawait this.#client.reconnect();\n\t\t\t\tconst handle = await this.#client.acquireSession(sessionId, { mode: \"exclusive\" });\n\t\t\t\tawait this.#assertNotDisposedAfterAwait(handle);\n\t\t\t\tthis.#bind(handle);\n\t\t\t}),\n\t\t);\n\t}\n\n\tdispose(): Promise<void> {\n\t\tif (this.#disposePromise) return this.#disposePromise;\n\t\tconst handle = this.#handle;\n\t\tthis.#lifecycle = { status: \"disposed\" };\n\t\tthis.#resolveDisposeSignal();\n\t\tthis.#clearSubscriptions();\n\t\tthis.#handle = undefined;\n\t\tthis.#transcript = undefined;\n\t\tconst cleanup = [...this.#pendingAttachmentOperations];\n\t\tif (handle) cleanup.push(handle.dispose());\n\t\tthis.#disposePromise = settleRemoteSessionDisposal(cleanup);\n\t\tthis.#notify();\n\t\tthis.#listeners.clear();\n\t\treturn this.#disposePromise;\n\t}\n\n\t[Symbol.asyncDispose](): Promise<void> {\n\t\treturn this.dispose();\n\t}\n\n\tasync #replace(operation: \"open\" | \"create\", prepare: () => Promise<SessionLease>): Promise<void> {\n\t\tthis.#assertAvailable();\n\t\tif (this.#handle && this.phase !== \"idle\") {\n\t\t\tthrow new Error(`Cannot ${operation} a session while session is ${this.phase ?? \"unavailable\"}`);\n\t\t}\n\t\tawait this.#runOperation(operation, () =>\n\t\t\tthis.#trackAttachmentOperation(() => this.#prepareReplacement(operation, prepare)),\n\t\t);\n\t}\n\n\tasync #trackAttachmentOperation(run: () => Promise<void>): Promise<void> {\n\t\tconst pending = run();\n\t\tthis.#pendingAttachmentOperations.add(pending);\n\t\ttry {\n\t\t\tawait pending;\n\t\t} finally {\n\t\t\tthis.#pendingAttachmentOperations.delete(pending);\n\t\t}\n\t}\n\n\tasync #prepareReplacement(operation: \"open\" | \"create\", prepare: () => Promise<SessionLease>): Promise<void> {\n\t\tconst previous = this.#handle;\n\t\tconst next = await prepare();\n\t\tawait this.#assertNotDisposedAfterAwait(next);\n\t\tconst snapshot = next.snapshot;\n\t\tif (!snapshot) {\n\t\t\tawait this.#detach(next);\n\t\t\tthrow new Error(`Session ${next.id} did not provide a snapshot`);\n\t\t}\n\t\tif (previous && previous.id !== next.id && previous.attached && this.phase !== \"idle\") {\n\t\t\tawait this.#detach(next);\n\t\t\tthrow new Error(`Cannot ${operation} a session while session is ${this.phase ?? \"unavailable\"}`);\n\t\t}\n\t\tif (previous && previous.id !== next.id && previous.attached) {\n\t\t\ttry {\n\t\t\t\tawait previous.detach();\n\t\t\t} catch (error) {\n\t\t\t\ttry {\n\t\t\t\t\tawait this.#detach(next);\n\t\t\t\t} catch (cleanupError) {\n\t\t\t\t\tthrow new AggregateError([error, cleanupError], \"Failed to replace remote session attachment\");\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t\tawait this.#assertNotDisposedAfterAwait(next);\n\t\tthis.#bind(next, snapshot);\n\t}\n\n\tasync #runIdleOperation(\n\t\toperation: \"setModel\" | \"setThinking\",\n\t\tdescription: string,\n\t\trun: () => Promise<void>,\n\t): Promise<void> {\n\t\tthis.#assertAvailable();\n\t\tthis.#requireHandle();\n\t\tif (this.phase !== \"idle\") {\n\t\t\tthrow new Error(`Cannot ${description} while session is ${this.phase ?? \"unavailable\"}`);\n\t\t}\n\t\tawait this.#runOperation(operation, run);\n\t}\n\n\tasync #runOperation(operation: RemoteSessionOperation, run: () => Promise<void>, preempt = false): Promise<void> {\n\t\tif (preempt) this.#assertNotDisposed();\n\t\telse this.#assertAvailable();\n\t\tconst previous = this.#lifecycle;\n\t\tconst busy: RemoteSessionLifecycle = { status: \"busy\", operation };\n\t\tthis.#lifecycle = busy;\n\t\tthis.#activeOperationStates.add(busy);\n\t\tthis.#notify();\n\t\tconst running = run();\n\t\ttry {\n\t\t\tawait Promise.race([\n\t\t\t\trunning,\n\t\t\t\tthis.#disposeSignal.then(() => {\n\t\t\t\t\tthrow new Error(\"Remote session is disposed\");\n\t\t\t\t}),\n\t\t\t]);\n\t\t} finally {\n\t\t\tthis.#activeOperationStates.delete(busy);\n\t\t\tif (!this.disposed && this.#lifecycle === busy) {\n\t\t\t\tthis.#lifecycle =\n\t\t\t\t\tpreempt && this.#activeOperationStates.has(previous)\n\t\t\t\t\t\t? previous\n\t\t\t\t\t\t: this.#handle\n\t\t\t\t\t\t\t? { status: \"ready\" }\n\t\t\t\t\t\t\t: { status: \"unbound\" };\n\t\t\t\tthis.#notify();\n\t\t\t}\n\t\t}\n\t}\n\n\t#bind(handle: SessionLease, knownSnapshot?: SessionSnapshot): void {\n\t\tconst snapshot = knownSnapshot ?? handle.snapshot;\n\t\tif (!snapshot) throw new Error(`Session ${handle.id} did not provide a snapshot`);\n\t\tthis.#clearSubscriptions();\n\t\tthis.#handle = handle;\n\t\tthis.#transcript = createTranscriptState(snapshot);\n\t\tthis.#unsubscribeSnapshot = handle.subscribe((next) => {\n\t\t\tif (!this.#transcript) return;\n\t\t\tthis.#transcript = applyTranscriptSnapshot(this.#transcript, next);\n\t\t\tthis.#notify();\n\t\t});\n\t\tthis.#unsubscribeEvents = handle.onEvent((event) => this.#handleEvent(event));\n\t}\n\n\t#handleEvent(event: ServerEvent): void {\n\t\tif (event.type === \"session_removed\") {\n\t\t\tthis.#clearSubscriptions();\n\t\t\tthis.#handle = undefined;\n\t\t\tthis.#transcript = undefined;\n\t\t\tif (this.#lifecycle.status !== \"busy\") this.#lifecycle = { status: \"unbound\" };\n\t\t\tthis.#notify();\n\t\t\treturn;\n\t\t}\n\t\tif (event.type !== \"session_progress\" || !this.#transcript) return;\n\t\tthis.#transcript = applyTranscriptProgress(this.#transcript, event.progress);\n\t\tthis.#notify();\n\t}\n\n\t#notify(): void {\n\t\tconst state = this.state;\n\t\tfor (const listener of this.#listeners) this.#callListener(listener, state);\n\t}\n\n\t#callListener(listener: (state: RemoteSessionState) => void, state: RemoteSessionState): void {\n\t\ttry {\n\t\t\tlistener(state);\n\t\t} catch (error) {\n\t\t\tthis.#reportListenerError(error);\n\t\t}\n\t}\n\n\t#reportListenerError(error: unknown): void {\n\t\tif (!this.#onListenerError) return;\n\t\ttry {\n\t\t\tthis.#onListenerError(error instanceof Error ? error : new Error(String(error)));\n\t\t} catch {\n\t\t\t// Diagnostics cannot affect session or transport state.\n\t\t}\n\t}\n\n\t#clearSubscriptions(): void {\n\t\tthis.#unsubscribeSnapshot?.();\n\t\tthis.#unsubscribeEvents?.();\n\t\tthis.#unsubscribeSnapshot = undefined;\n\t\tthis.#unsubscribeEvents = undefined;\n\t}\n\n\t#requireHandle(): SessionLease {\n\t\tif (!this.#handle) throw new Error(\"No remote session is attached\");\n\t\treturn this.#handle;\n\t}\n\n\t#assertAvailable(): void {\n\t\tthis.#assertNotDisposed();\n\t\tif (this.#lifecycle.status === \"busy\") {\n\t\t\tthrow new Error(`Remote session is busy with ${this.#lifecycle.operation}`);\n\t\t}\n\t}\n\n\t#assertNotDisposed(): void {\n\t\tif (this.disposed) throw new Error(\"Remote session is disposed\");\n\t}\n\n\tasync #assertNotDisposedAfterAwait(handle: SessionLease): Promise<void> {\n\t\tif (!this.disposed) return;\n\t\tawait this.#detach(handle);\n\t\tthrow new RemoteSessionDisposedError();\n\t}\n\n\tasync #detach(handle: SessionLease): Promise<void> {\n\t\tawait handle.dispose();\n\t}\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import type { SessionSnapshot, TranscriptItem, TranscriptProgress } from "../../vendor/pi-protocol/index.js";
2
+ export interface TranscriptState {
3
+ readonly snapshot: SessionSnapshot;
4
+ readonly progressItems: ReadonlyMap<string, TranscriptItem>;
5
+ readonly progressOrder: readonly string[];
6
+ readonly toolCallBuffers: ReadonlyMap<string, string>;
7
+ }
8
+ export declare function createTranscriptState(snapshot: SessionSnapshot): TranscriptState;
9
+ export declare function applyTranscriptSnapshot(state: TranscriptState, snapshot: SessionSnapshot): TranscriptState;
10
+ export declare function applyTranscriptProgress(state: TranscriptState, progress: TranscriptProgress): TranscriptState;
11
+ export declare function selectTranscript(state: TranscriptState): readonly TranscriptItem[];
12
+ //# sourceMappingURL=transcript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../src/client/transcript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,eAAe,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAElH,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5D,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtD;AAoBD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,CAOhF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,GAAG,eAAe,CAG1G;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,kBAAkB,GAAG,eAAe,CAiC7G;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,cAAc,EAAE,CAiBlF"}
@@ -0,0 +1,98 @@
1
+ function isJsonValue(value) {
2
+ if (value === null || typeof value === "boolean" || typeof value === "string")
3
+ return true;
4
+ if (typeof value === "number")
5
+ return Number.isFinite(value);
6
+ if (Array.isArray(value))
7
+ return value.every(isJsonValue);
8
+ if (typeof value !== "object" || Object.getPrototypeOf(value) !== Object.prototype)
9
+ return false;
10
+ return Object.values(value).every(isJsonValue);
11
+ }
12
+ function parsePartialToolInput(value) {
13
+ try {
14
+ const parsed = JSON.parse(value);
15
+ if (isJsonValue(parsed))
16
+ return parsed;
17
+ }
18
+ catch {
19
+ // Tool arguments are incomplete while streaming. Preserve their raw prefix until they form valid JSON.
20
+ }
21
+ return value;
22
+ }
23
+ export function createTranscriptState(snapshot) {
24
+ return {
25
+ snapshot: structuredClone(snapshot),
26
+ progressItems: new Map(),
27
+ progressOrder: [],
28
+ toolCallBuffers: new Map(),
29
+ };
30
+ }
31
+ export function applyTranscriptSnapshot(state, snapshot) {
32
+ if (state.snapshot.id === snapshot.id && snapshot.revision < state.snapshot.revision)
33
+ return state;
34
+ return createTranscriptState(snapshot);
35
+ }
36
+ export function applyTranscriptProgress(state, progress) {
37
+ if (progress.type === "item_started" || progress.type === "item_updated") {
38
+ return setProgressItem(state, progress.item);
39
+ }
40
+ if (progress.type === "item_finished") {
41
+ const toolCallBuffers = new Map(state.toolCallBuffers);
42
+ for (const key of toolCallBuffers.keys()) {
43
+ if (key.startsWith(`${progress.item.id}:`))
44
+ toolCallBuffers.delete(key);
45
+ }
46
+ return setProgressItem({ ...state, toolCallBuffers }, progress.item);
47
+ }
48
+ const item = state.progressItems.get(progress.messageId) ??
49
+ state.snapshot.transcript.find(({ id }) => id === progress.messageId);
50
+ if (item?.role !== "assistant")
51
+ return state;
52
+ let toolCallBuffers = state.toolCallBuffers;
53
+ const content = item.content.map((part, index) => {
54
+ if (index !== progress.contentIndex)
55
+ return structuredClone(part);
56
+ if (progress.kind === "text" && part.type === "text")
57
+ return { ...part, text: part.text + progress.delta };
58
+ if (progress.kind === "thinking" && part.type === "thinking") {
59
+ return { ...part, thinking: part.thinking + progress.delta };
60
+ }
61
+ if (progress.kind === "toolCall" && part.type === "toolCall") {
62
+ const key = `${progress.messageId}:${progress.contentIndex}`;
63
+ const existing = state.toolCallBuffers.get(key) ?? (typeof part.input === "string" ? part.input : "");
64
+ const buffer = existing + progress.delta;
65
+ toolCallBuffers = new Map(state.toolCallBuffers).set(key, buffer);
66
+ return { ...part, input: parsePartialToolInput(buffer) };
67
+ }
68
+ return structuredClone(part);
69
+ });
70
+ return setProgressItem({ ...state, toolCallBuffers }, { ...item, content });
71
+ }
72
+ export function selectTranscript(state) {
73
+ const transcript = state.snapshot.transcript.map((item) => state.progressItems.get(item.id) ?? item);
74
+ const ids = new Set(transcript.map((item) => item.id));
75
+ for (const id of state.progressOrder) {
76
+ if (ids.has(id))
77
+ continue;
78
+ const item = state.progressItems.get(id);
79
+ if (item) {
80
+ transcript.push(item);
81
+ ids.add(id);
82
+ }
83
+ }
84
+ for (const item of state.snapshot.queuedSteer) {
85
+ if (ids.has(item.id))
86
+ continue;
87
+ transcript.push(item);
88
+ ids.add(item.id);
89
+ }
90
+ return transcript;
91
+ }
92
+ function setProgressItem(state, item) {
93
+ const progressItems = new Map(state.progressItems);
94
+ const progressOrder = progressItems.has(item.id) ? state.progressOrder : [...state.progressOrder, item.id];
95
+ progressItems.set(item.id, structuredClone(item));
96
+ return { ...state, progressItems, progressOrder };
97
+ }
98
+ //# sourceMappingURL=transcript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transcript.js","sourceRoot":"","sources":["../../src/client/transcript.ts"],"names":[],"mappings":"AASA,SAAS,WAAW,CAAC,KAAc;IAClC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3F,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7D,IAAI,KAAK,CAAC,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aAAa,EAAE,aAAa,EAAE,CAAC;AACnD,CAAC","sourcesContent":["import type { JsonValue, SessionSnapshot, TranscriptItem, TranscriptProgress } from \"@earendil-works/pi-protocol\";\n\nexport interface TranscriptState {\n\treadonly snapshot: SessionSnapshot;\n\treadonly progressItems: ReadonlyMap<string, TranscriptItem>;\n\treadonly progressOrder: readonly string[];\n\treadonly toolCallBuffers: ReadonlyMap<string, string>;\n}\n\nfunction isJsonValue(value: unknown): value is JsonValue {\n\tif (value === null || typeof value === \"boolean\" || typeof value === \"string\") return true;\n\tif (typeof value === \"number\") return Number.isFinite(value);\n\tif (Array.isArray(value)) return value.every(isJsonValue);\n\tif (typeof value !== \"object\" || Object.getPrototypeOf(value) !== Object.prototype) return false;\n\treturn Object.values(value).every(isJsonValue);\n}\n\nfunction parsePartialToolInput(value: string): JsonValue {\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(value);\n\t\tif (isJsonValue(parsed)) return parsed;\n\t} catch {\n\t\t// Tool arguments are incomplete while streaming. Preserve their raw prefix until they form valid JSON.\n\t}\n\treturn value;\n}\n\nexport function createTranscriptState(snapshot: SessionSnapshot): TranscriptState {\n\treturn {\n\t\tsnapshot: structuredClone(snapshot),\n\t\tprogressItems: new Map(),\n\t\tprogressOrder: [],\n\t\ttoolCallBuffers: new Map(),\n\t};\n}\n\nexport function applyTranscriptSnapshot(state: TranscriptState, snapshot: SessionSnapshot): TranscriptState {\n\tif (state.snapshot.id === snapshot.id && snapshot.revision < state.snapshot.revision) return state;\n\treturn createTranscriptState(snapshot);\n}\n\nexport function applyTranscriptProgress(state: TranscriptState, progress: TranscriptProgress): TranscriptState {\n\tif (progress.type === \"item_started\" || progress.type === \"item_updated\") {\n\t\treturn setProgressItem(state, progress.item);\n\t}\n\tif (progress.type === \"item_finished\") {\n\t\tconst toolCallBuffers = new Map(state.toolCallBuffers);\n\t\tfor (const key of toolCallBuffers.keys()) {\n\t\t\tif (key.startsWith(`${progress.item.id}:`)) toolCallBuffers.delete(key);\n\t\t}\n\t\treturn setProgressItem({ ...state, toolCallBuffers }, progress.item);\n\t}\n\n\tconst item =\n\t\tstate.progressItems.get(progress.messageId) ??\n\t\tstate.snapshot.transcript.find(({ id }) => id === progress.messageId);\n\tif (item?.role !== \"assistant\") return state;\n\tlet toolCallBuffers = state.toolCallBuffers;\n\tconst content = item.content.map((part, index) => {\n\t\tif (index !== progress.contentIndex) return structuredClone(part);\n\t\tif (progress.kind === \"text\" && part.type === \"text\") return { ...part, text: part.text + progress.delta };\n\t\tif (progress.kind === \"thinking\" && part.type === \"thinking\") {\n\t\t\treturn { ...part, thinking: part.thinking + progress.delta };\n\t\t}\n\t\tif (progress.kind === \"toolCall\" && part.type === \"toolCall\") {\n\t\t\tconst key = `${progress.messageId}:${progress.contentIndex}`;\n\t\t\tconst existing = state.toolCallBuffers.get(key) ?? (typeof part.input === \"string\" ? part.input : \"\");\n\t\t\tconst buffer = existing + progress.delta;\n\t\t\ttoolCallBuffers = new Map(state.toolCallBuffers).set(key, buffer);\n\t\t\treturn { ...part, input: parsePartialToolInput(buffer) };\n\t\t}\n\t\treturn structuredClone(part);\n\t});\n\treturn setProgressItem({ ...state, toolCallBuffers }, { ...item, content });\n}\n\nexport function selectTranscript(state: TranscriptState): readonly TranscriptItem[] {\n\tconst transcript = state.snapshot.transcript.map((item) => state.progressItems.get(item.id) ?? item);\n\tconst ids = new Set(transcript.map((item) => item.id));\n\tfor (const id of state.progressOrder) {\n\t\tif (ids.has(id)) continue;\n\t\tconst item = state.progressItems.get(id);\n\t\tif (item) {\n\t\t\ttranscript.push(item);\n\t\t\tids.add(id);\n\t\t}\n\t}\n\tfor (const item of state.snapshot.queuedSteer) {\n\t\tif (ids.has(item.id)) continue;\n\t\ttranscript.push(item);\n\t\tids.add(item.id);\n\t}\n\treturn transcript;\n}\n\nfunction setProgressItem(state: TranscriptState, item: TranscriptItem): TranscriptState {\n\tconst progressItems = new Map(state.progressItems);\n\tconst progressOrder = progressItems.has(item.id) ? state.progressOrder : [...state.progressOrder, item.id];\n\tprogressItems.set(item.id, structuredClone(item));\n\treturn { ...state, progressItems, progressOrder };\n}\n"]}
package/dist/config.d.ts CHANGED
@@ -6,7 +6,6 @@ import { type BrandProfile } from "./core/brand.ts";
6
6
  export declare const isBunBinary: boolean;
7
7
  /** Detect if Bun is the runtime (compiled binary or bun run) */
8
8
  export declare const isBunRuntime: boolean;
9
- export declare const isBundledNode: boolean;
10
9
  export type InstallMethod = "bun-binary" | "npm" | "pnpm" | "yarn" | "bun" | "unknown";
11
10
  interface SelfUpdateCommandStep {
12
11
  command: string;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAA0B,MAAM,iBAAiB,CAAC;AAa5E;;;GAGG;AACH,eAAO,MAAM,WAAW,SACqF,CAAC;AAE9G,gEAAgE;AAChE,eAAO,MAAM,YAAY,SAAyB,CAAC;AAInD,eAAO,MAAM,aAAa,SAA4D,CAAC;AAMvF,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;AAEvF,UAAU,qBAAqB;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC/D,KAAK,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAChC;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAsC7F,wBAAgB,mBAAmB,IAAI,aAAa,CAqBnD;AAmOD,wBAAgB,oBAAoB,CACnC,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,EAAE,EACrB,mBAAmB,GAAE,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ACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAUrF;AAED,6DAA6D;AAC7D,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,iDAAiD;AACjD,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,8BAA8B;AAC9B,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,4BAA4B;AAC5B,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,gCAAgC;AAChC,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,kCAAkC;AAClC,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,sDAAsD;AACtD,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,6CAA6C;AAC7C,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,qCAAqC;AACrC,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,iCAAiC;AACjC,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
package/dist/config.js CHANGED
@@ -20,7 +20,6 @@ const __dirname = dirname(__filename);
20
20
  export const isBunBinary = import.meta.url.includes("$bunfs") || import.meta.url.includes("~BUN") || import.meta.url.includes("%7EBUN");
21
21
  /** Detect if Bun is the runtime (compiled binary or bun run) */
22
22
  export const isBunRuntime = !!process.versions.bun;
23
- export const isBundledNode = typeof PI_BUNDLED_NODE !== "undefined" && PI_BUNDLED_NODE;
24
23
  function normalizeSelfUpdatePackageTarget(target) {
25
24
  if (typeof target === "string") {
26
25
  return { packageName: target, installSpec: target };
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACnF,OAAO,EAA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AAM,UAAU,cAAc;IAC7B,OAAO,IAAI,CAAC,WAAW,EAAE,EAAE,UAAU,CAAC,CAAC;AACxC,CAAC;AAED,iCAAiC;AACjC,MAAM,UAAU,eAAe;IAC9B,OAAO,IAAI,CAAC,WAAW,EAAE,EAAE,GAAG,QAAQ,YAAY,CAAC,CAAC;AACrD,CAAC","sourcesContent":["import { accessSync, constants, existsSync, readFileSync, realpathSync } from \"fs\";\nimport { homedir } from \"os\";\nimport { basename, dirname, join, resolve, sep, win32 } from \"path\";\nimport { fileURLToPath } from \"url\";\nimport { createBunLauncherRepairCommand } from \"./bun-global-launcher.ts\";\nimport { type BrandProfile, brandProfile, envValue } from \"./core/brand.ts\";\nimport { findNearestParentConfigDir } from \"./nearest-parent-config.ts\";\nimport { spawnProcessSync } from \"./utils/child-process.ts\";\nimport { normalizePath } from \"./utils/paths.ts\";\nimport { stripBom } from \"./utils/text.ts\";\n\n// =============================================================================\n// Package Detection\n// =============================================================================\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * Detect if we're running as a Bun compiled binary.\n * Bun binaries have import.meta.url containing \"$bunfs\", \"~BUN\", or \"%7EBUN\" (Bun's virtual filesystem path)\n */\nexport const isBunBinary =\n\timport.meta.url.includes(\"$bunfs\") || import.meta.url.includes(\"~BUN\") || import.meta.url.includes(\"%7EBUN\");\n\n/** Detect if Bun is the runtime (compiled binary or bun run) */\nexport const isBunRuntime = !!process.versions.bun;\n\n/** Detect the esbuild-bundled Node.js distribution. */\ndeclare const PI_BUNDLED_NODE: boolean;\nexport const isBundledNode = typeof PI_BUNDLED_NODE !== \"undefined\" && PI_BUNDLED_NODE;\n\n// =============================================================================\n// Install Method Detection\n// =============================================================================\n\nexport type InstallMethod = \"bun-binary\" | \"npm\" | \"pnpm\" | \"yarn\" | \"bun\" | \"unknown\";\n\ninterface SelfUpdateCommandStep {\n\tcommand: string;\n\targs: string[];\n\tdisplay: string;\n}\n\nexport interface SelfUpdateCommand extends SelfUpdateCommandStep {\n\tsteps?: SelfUpdateCommandStep[];\n}\n\nexport type SelfUpdatePackageTarget = string | { packageName: string; installSpec?: string };\n\nfunction normalizeSelfUpdatePackageTarget(target: SelfUpdatePackageTarget): {\n\tpackageName: string;\n\tinstallSpec: string;\n} {\n\tif (typeof target === \"string\") {\n\t\treturn { packageName: target, installSpec: target };\n\t}\n\treturn { packageName: target.packageName, installSpec: target.installSpec ?? target.packageName };\n}\n\nfunction makeSelfUpdateCommand(\n\tinstallStep: SelfUpdateCommandStep,\n\tuninstallStep?: SelfUpdateCommandStep,\n\tpostInstallStep?: SelfUpdateCommandStep,\n): SelfUpdateCommand {\n\tconst steps = [\n\t\t...(uninstallStep ? [uninstallStep] : []),\n\t\tinstallStep,\n\t\t...(postInstallStep ? [postInstallStep] : []),\n\t];\n\tif (steps.length === 1) return installStep;\n\treturn {\n\t\t...installStep,\n\t\tdisplay: steps.map((step) => step.display).join(\" && \"),\n\t\tsteps,\n\t};\n}\n\nfunction makeSelfUpdateCommandStep(command: string, args: string[]): SelfUpdateCommandStep {\n\treturn {\n\t\tcommand,\n\t\targs,\n\t\tdisplay: [command, ...args].map((arg) => (/\\s/.test(arg) ? `\"${arg}\"` : arg)).join(\" \"),\n\t};\n}\n\nexport function detectInstallMethod(): InstallMethod {\n\tif (isBunBinary) {\n\t\treturn \"bun-binary\";\n\t}\n\n\tconst resolvedPath = `${__dirname}\\0${process.execPath || \"\"}`.toLowerCase().replace(/\\\\/g, \"/\");\n\n\tif (resolvedPath.includes(\"/pnpm/\") || resolvedPath.includes(\"/.pnpm/\")) {\n\t\treturn \"pnpm\";\n\t}\n\tif (resolvedPath.includes(\"/yarn/\") || resolvedPath.includes(\"/.yarn/\")) {\n\t\treturn \"yarn\";\n\t}\n\tif (isBunRuntime || resolvedPath.includes(\"/install/global/node_modules/\")) {\n\t\treturn \"bun\";\n\t}\n\tif (resolvedPath.includes(\"/npm/\") || resolvedPath.includes(\"/node_modules/\")) {\n\t\treturn \"npm\";\n\t}\n\n\treturn \"unknown\";\n}\n\nfunction getInferredNpmInstall(): { root: string; prefix: string } | undefined {\n\tconst packageDir = getPackageDir();\n\tconst path = process.platform === \"win32\" || packageDir.includes(\"\\\\\") ? win32 : { basename, dirname };\n\tconst parent = path.dirname(packageDir);\n\tlet root: string | undefined;\n\tif (path.basename(parent).startsWith(\"@\") && path.basename(path.dirname(parent)) === \"node_modules\") {\n\t\troot = path.dirname(parent);\n\t} else if (path.basename(parent) === \"node_modules\") {\n\t\troot = parent;\n\t}\n\tif (!root) return undefined;\n\tconst rootParent = path.dirname(root);\n\tif (path.basename(rootParent) === \"lib\") return { root, prefix: path.dirname(rootParent) };\n\t// Windows global npm prefixes use `<prefix>\\\\node_modules`, which is\n\t// indistinguishable from local project installs by path shape alone. Do not\n\t// infer unsupported Windows custom prefixes without `npm root -g` evidence.\n\treturn undefined;\n}\n\nfunction getSelfUpdateCommandForMethod(\n\tmethod: InstallMethod,\n\tinstalledPackageName: string,\n\tupdatePackageTarget: SelfUpdatePackageTarget = installedPackageName,\n\tnpmCommand?: string[],\n): SelfUpdateCommand | undefined {\n\tconst target = normalizeSelfUpdatePackageTarget(updatePackageTarget);\n\tswitch (method) {\n\t\tcase \"bun-binary\":\n\t\t\treturn undefined;\n\t\tcase \"pnpm\": {\n\t\t\tconst match = readCommandOutput(\"pnpm\", [\"root\", \"-g\"])\n\t\t\t\t? undefined\n\t\t\t\t: /^(.*[\\\\/]global[\\\\/][^\\\\/]+)[\\\\/]\\.pnpm[\\\\/]/.exec(getPackageDir());\n\t\t\tconst binDirArgs = match\n\t\t\t\t? [`--config.global-bin-dir=${process.env.PNPM_HOME || dirname(dirname(match[1]))}`]\n\t\t\t\t: [];\n\t\t\treturn makeSelfUpdateCommand(\n\t\t\t\tmakeSelfUpdateCommandStep(\"pnpm\", [\n\t\t\t\t\t\"install\",\n\t\t\t\t\t\"-g\",\n\t\t\t\t\t\"--ignore-scripts\",\n\t\t\t\t\t\"--config.minimumReleaseAge=0\",\n\t\t\t\t\t...binDirArgs,\n\t\t\t\t\ttarget.installSpec,\n\t\t\t\t]),\n\t\t\t\ttarget.packageName === installedPackageName\n\t\t\t\t\t? undefined\n\t\t\t\t\t: makeSelfUpdateCommandStep(\"pnpm\", [\"remove\", \"-g\", ...binDirArgs, installedPackageName]),\n\t\t\t);\n\t\t}\n\t\tcase \"yarn\":\n\t\t\treturn makeSelfUpdateCommand(\n\t\t\t\tmakeSelfUpdateCommandStep(\"yarn\", [\"global\", \"add\", \"--ignore-scripts\", target.installSpec]),\n\t\t\t\ttarget.packageName === installedPackageName\n\t\t\t\t\t? undefined\n\t\t\t\t\t: makeSelfUpdateCommandStep(\"yarn\", [\"global\", \"remove\", installedPackageName]),\n\t\t\t);\n\t\tcase \"bun\": {\n\t\t\tconst binDir = readCommandOutput(\"bun\", [\"pm\", \"bin\", \"-g\"]);\n\t\t\tif (!binDir) return undefined;\n\t\t\treturn makeSelfUpdateCommand(\n\t\t\t\tmakeSelfUpdateCommandStep(\"bun\", [\n\t\t\t\t\t\"install\",\n\t\t\t\t\t\"-g\",\n\t\t\t\t\t\"--ignore-scripts\",\n\t\t\t\t\t\"--minimum-release-age=0\",\n\t\t\t\t\ttarget.installSpec,\n\t\t\t\t]),\n\t\t\t\ttarget.packageName === installedPackageName\n\t\t\t\t\t? undefined\n\t\t\t\t\t: makeSelfUpdateCommandStep(\"bun\", [\"uninstall\", \"-g\", installedPackageName]),\n\t\t\t\tprocess.platform === \"win32\"\n\t\t\t\t\t? undefined\n\t\t\t\t\t: createBunLauncherRepairCommand(binDir, target.packageName, APP_NAME),\n\t\t\t);\n\t\t}\n\t\tcase \"npm\": {\n\t\t\tconst [command = \"npm\", ...npmArgs] = npmCommand ?? [];\n\t\t\tconst inferred = npmCommand?.length ? undefined : getInferredNpmInstall();\n\t\t\tconst prefixArgs = [...npmArgs, ...(inferred ? [\"--prefix\", inferred.prefix] : [])];\n\t\t\tconst installStep = makeSelfUpdateCommandStep(command, [\n\t\t\t\t...prefixArgs,\n\t\t\t\t\"install\",\n\t\t\t\t\"-g\",\n\t\t\t\t\"--ignore-scripts\",\n\t\t\t\t\"--min-release-age=0\",\n\t\t\t\ttarget.installSpec,\n\t\t\t]);\n\t\t\tconst uninstallStep =\n\t\t\t\ttarget.packageName === installedPackageName\n\t\t\t\t\t? undefined\n\t\t\t\t\t: makeSelfUpdateCommandStep(command, [...prefixArgs, \"uninstall\", \"-g\", installedPackageName]);\n\t\t\treturn makeSelfUpdateCommand(installStep, uninstallStep);\n\t\t}\n\t\tcase \"unknown\":\n\t\t\treturn undefined;\n\t}\n}\n\nfunction readCommandOutput(\n\tcommand: string,\n\targs: string[],\n\toptions: { requireSuccess?: boolean } = {},\n): string | undefined {\n\tconst result = spawnProcessSync(command, args, {\n\t\tencoding: \"utf-8\",\n\t\tstdio: [\"ignore\", \"pipe\", \"pipe\"],\n\t});\n\tif (result.status === 0) return result.stdout.trim() || undefined;\n\tif (options.requireSuccess) {\n\t\tconst reason = result.error?.message || result.stderr.trim() || `exit code ${result.status ?? \"unknown\"}`;\n\t\tthrow new Error(`Failed to run ${[command, ...args].join(\" \")}: ${reason}`);\n\t}\n\treturn undefined;\n}\n\nfunction getGlobalPackageRoots(method: InstallMethod, _packageName: string, npmCommand?: string[]): string[] {\n\tswitch (method) {\n\t\tcase \"npm\": {\n\t\t\tconst configured = !!npmCommand?.length;\n\t\t\tconst [command = \"npm\", ...npmArgs] = npmCommand ?? [];\n\t\t\tif (configured && command === \"bun\") {\n\t\t\t\tconst bunBin = readCommandOutput(command, [...npmArgs, \"pm\", \"bin\", \"-g\"], {\n\t\t\t\t\trequireSuccess: true,\n\t\t\t\t});\n\t\t\t\tconst roots = [join(homedir(), \".bun\", \"install\", \"global\", \"node_modules\")];\n\t\t\t\tif (bunBin) {\n\t\t\t\t\troots.push(join(dirname(bunBin), \"install\", \"global\", \"node_modules\"));\n\t\t\t\t}\n\t\t\t\treturn roots;\n\t\t\t}\n\t\t\tconst root = readCommandOutput(command, [...npmArgs, \"root\", \"-g\"], {\n\t\t\t\trequireSuccess: configured,\n\t\t\t});\n\t\t\tconst inferred = configured ? undefined : getInferredNpmInstall();\n\t\t\treturn [root, inferred?.root].filter((x): x is string => !!x);\n\t\t}\n\t\tcase \"pnpm\": {\n\t\t\tconst root = readCommandOutput(\"pnpm\", [\"root\", \"-g\"]);\n\t\t\tif (root) return [root, dirname(root)];\n\t\t\tconst match = /^(.*[\\\\/]global[\\\\/][^\\\\/]+)[\\\\/]\\.pnpm[\\\\/]/.exec(getPackageDir());\n\t\t\treturn match ? [match[1]] : [];\n\t\t}\n\t\tcase \"yarn\": {\n\t\t\tconst dir = readCommandOutput(\"yarn\", [\"global\", \"dir\"]);\n\t\t\treturn dir ? [dir, join(dir, \"node_modules\")] : [];\n\t\t}\n\t\tcase \"bun\": {\n\t\t\tconst bunBin = readCommandOutput(\"bun\", [\"pm\", \"bin\", \"-g\"]);\n\t\t\tconst roots = [join(homedir(), \".bun\", \"install\", \"global\", \"node_modules\")];\n\t\t\tif (bunBin) {\n\t\t\t\troots.push(join(dirname(bunBin), \"install\", \"global\", \"node_modules\"));\n\t\t\t}\n\t\t\treturn roots;\n\t\t}\n\t\tcase \"bun-binary\":\n\t\tcase \"unknown\":\n\t\t\treturn [];\n\t}\n}\n\nfunction normalizeExistingPathForComparison(path: string, resolveSymlinks: boolean): string | undefined {\n\tconst resolvedPath = resolve(path);\n\tif (!existsSync(resolvedPath)) {\n\t\treturn undefined;\n\t}\n\tlet normalizedPath = resolvedPath;\n\tif (resolveSymlinks) {\n\t\ttry {\n\t\t\tnormalizedPath = realpathSync(resolvedPath);\n\t\t} catch {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\tif (process.platform === \"win32\") {\n\t\tnormalizedPath = normalizedPath.toLowerCase();\n\t}\n\treturn normalizedPath;\n}\n\nfunction getPathComparisonCandidates(path: string): string[] {\n\treturn Array.from(\n\t\tnew Set(\n\t\t\t[normalizeExistingPathForComparison(path, false), normalizeExistingPathForComparison(path, true)].filter(\n\t\t\t\t(candidate): candidate is string => !!candidate,\n\t\t\t),\n\t\t),\n\t);\n}\n\nfunction getEntrypointPackageDir(): string | undefined {\n\tconst entrypoint = process.argv[1];\n\tif (!entrypoint) return undefined;\n\tlet dir = dirname(entrypoint);\n\twhile (dir !== dirname(dir)) {\n\t\tif (existsSync(join(dir, \"package.json\"))) {\n\t\t\treturn dir;\n\t\t}\n\t\tdir = dirname(dir);\n\t}\n\treturn undefined;\n}\n\nfunction isSelfUpdatePathWritable(): boolean {\n\tconst packageDir = getPackageDir();\n\ttry {\n\t\taccessSync(packageDir, constants.W_OK);\n\t\taccessSync(dirname(packageDir), constants.W_OK);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction isManagedByGlobalPackageManager(method: InstallMethod, packageName: string, npmCommand?: string[]): boolean {\n\tconst packageDirs = [getPackageDir(), getEntrypointPackageDir()].filter((dir): dir is string => !!dir);\n\tconst packageDirCandidates = packageDirs.flatMap((dir) => getPathComparisonCandidates(dir));\n\treturn getGlobalPackageRoots(method, packageName, npmCommand).some((root) => {\n\t\treturn getPathComparisonCandidates(root).some((normalizedRoot) => {\n\t\t\tconst rootPrefix = normalizedRoot.endsWith(sep) ? normalizedRoot : `${normalizedRoot}${sep}`;\n\t\t\treturn packageDirCandidates.some((packageDir) => packageDir.startsWith(rootPrefix));\n\t\t});\n\t});\n}\n\nexport function getSelfUpdateCommand(\n\tpackageName: string,\n\tnpmCommand?: string[],\n\tupdatePackageTarget: SelfUpdatePackageTarget = packageName,\n): SelfUpdateCommand | undefined {\n\tconst method = detectInstallMethod();\n\tconst command = getSelfUpdateCommandForMethod(method, packageName, updatePackageTarget, npmCommand);\n\tif (!command || !isManagedByGlobalPackageManager(method, packageName, npmCommand) || !isSelfUpdatePathWritable()) {\n\t\treturn undefined;\n\t}\n\treturn command;\n}\n\nexport function getSelfUpdateUnavailableInstruction(\n\tpackageName: string,\n\tnpmCommand?: string[],\n\tupdatePackageTarget: SelfUpdatePackageTarget = packageName,\n): string {\n\tconst method = detectInstallMethod();\n\tconst target = normalizeSelfUpdatePackageTarget(updatePackageTarget);\n\tif (method === \"bun-binary\") {\n\t\treturn `Download from: https://github.com/code-yeongyu/senpi/releases/latest`;\n\t}\n\tconst command = getSelfUpdateCommandForMethod(method, packageName, target, npmCommand);\n\tif (command) {\n\t\tif (isManagedByGlobalPackageManager(method, packageName, npmCommand) && !isSelfUpdatePathWritable()) {\n\t\t\treturn `This installation is managed by a global ${method} install, but the install path is not writable. Update it yourself with: ${command.display}`;\n\t\t}\n\t\treturn `This installation is not managed by a global ${method} install. Update it with the package manager, wrapper, or source checkout that provides it.`;\n\t}\n\treturn `Update ${target.installSpec} using the package manager, wrapper, or source checkout that provides this installation.`;\n}\n\nexport function getUpdateInstruction(packageName: string): string {\n\tconst method = detectInstallMethod();\n\tconst command = getSelfUpdateCommandForMethod(method, packageName);\n\tif (command) {\n\t\treturn `Run: ${command.display}`;\n\t}\n\treturn getSelfUpdateUnavailableInstruction(packageName);\n}\n\n// =============================================================================\n// Package Asset Paths (shipped with executable)\n// =============================================================================\n\n/**\n * Get the base directory for resolving package assets (themes, package.json, README.md, CHANGELOG.md).\n * - For Bun binary: returns the directory containing the executable\n * - For Node.js and tsx: returns the package root containing package.json\n * - Ignores Bun binary metadata copied into dist/ when the package root is available\n */\nexport function findNodePackageDir(startDir: string): string {\n\tlet dir = startDir;\n\twhile (dir !== dirname(dir)) {\n\t\tif (existsSync(join(dir, \"package.json\"))) {\n\t\t\tconst parent = dirname(dir);\n\t\t\t// build:binary places Bun's metadata inside dist/. Node still needs the\n\t\t\t// package root so its dist-relative asset paths do not become dist/dist/.\n\t\t\tif (basename(dir) === \"dist\" && existsSync(join(parent, \"package.json\"))) {\n\t\t\t\treturn parent;\n\t\t\t}\n\t\t\treturn dir;\n\t\t}\n\t\tdir = dirname(dir);\n\t}\n\treturn startDir;\n}\n\nexport function getPackageDir(): string {\n\t// Allow override via environment variable (useful for Nix/Guix where store paths tokenize poorly)\n\tconst envDir = envValue(\"PACKAGE_DIR\");\n\tif (envDir) {\n\t\treturn normalizePath(envDir);\n\t}\n\n\tif (isBunBinary) {\n\t\t// Bun binary: process.execPath points to the compiled executable\n\t\treturn dirname(process.execPath);\n\t}\n\treturn findNodePackageDir(__dirname);\n}\n\n/** One asset directory shipped with the package, in both the Bun-binary and Node layouts. */\ninterface ShippedAsset {\n\t/** Directory name next to a compiled Bun binary. */\n\treadonly binaryDir: string;\n\t/** Path segments under the package's src/ or dist/ root. */\n\treadonly sourceSegments: readonly string[];\n\t/** A file the directory must contain; a root without it does not ship this asset. */\n\treadonly probe: string;\n}\n\nconst THEMES_ASSET: ShippedAsset = {\n\tbinaryDir: \"theme\",\n\tsourceSegments: [\"modes\", \"interactive\", \"theme\"],\n\tprobe: \"dark.json\",\n};\n\nconst EXPORT_TEMPLATE_ASSET: ShippedAsset = {\n\tbinaryDir: \"export-html\",\n\tsourceSegments: [\"core\", \"export-html\"],\n\tprobe: \"template.html\",\n};\n\nconst INTERACTIVE_ASSETS: ShippedAsset = {\n\tbinaryDir: \"assets\",\n\tsourceSegments: [\"modes\", \"interactive\", \"assets\"],\n\tprobe: \"clankolas.png\",\n};\n\nfunction assetDirIn(root: string, asset: ShippedAsset): string {\n\tif (isBunBinary) {\n\t\treturn join(root, asset.binaryDir);\n\t}\n\tconst srcOrDist = existsSync(join(root, \"src\")) ? \"src\" : \"dist\";\n\treturn join(root, srcOrDist, ...asset.sourceSegments);\n}\n\n/**\n * Resolve a shipped asset directory, preferring PACKAGE_DIR but never trusting it blindly.\n *\n * PACKAGE_DIR relocates the package root (Nix/Guix store paths), and a Bun binary that embeds this\n * CLI pins it to the binary's own root. When such a root is inherited by a Node install of the CLI,\n * the Node layout resolves under it to a directory that cannot exist and startup dies on ENOENT\n * (an omo binary keeps its themes in a flat theme/, so the inherited root has no dist/ tree at all).\n * Fall back to the running install whenever the preferred root does not actually ship the asset. When\n * neither ships it the install is genuinely broken, and the running install's own path is returned so\n * the resulting error names the tree that was supposed to carry the asset rather than a foreign root.\n */\nfunction resolveShippedAssetDir(asset: ShippedAsset): string {\n\tconst preferred = assetDirIn(getPackageDir(), asset);\n\tif (existsSync(join(preferred, asset.probe))) {\n\t\treturn preferred;\n\t}\n\treturn assetDirIn(isBunBinary ? dirname(process.execPath) : findNodePackageDir(__dirname), asset);\n}\n\n/**\n * Get path to built-in themes directory (shipped with package)\n * - For Bun binary: theme/ next to executable\n * - For Node.js (dist/): dist/modes/interactive/theme/\n * - For tsx (src/): src/modes/interactive/theme/\n */\nexport function getThemesDir(): string {\n\treturn resolveShippedAssetDir(THEMES_ASSET);\n}\n\n/**\n * Get path to HTML export template directory (shipped with package)\n * - For Bun binary: export-html/ next to executable\n * - For Node.js (dist/): dist/core/export-html/\n * - For tsx (src/): src/core/export-html/\n */\nexport function getExportTemplateDir(): string {\n\treturn resolveShippedAssetDir(EXPORT_TEMPLATE_ASSET);\n}\n\n/** Get path to package.json */\nexport function getPackageJsonPath(): string {\n\treturn join(getPackageDir(), \"package.json\");\n}\n\n/** Get path to README.md */\nexport function getReadmePath(): string {\n\treturn resolve(join(getPackageDir(), \"README.md\"));\n}\n\n/** Get path to docs directory */\nexport function getDocsPath(): string {\n\treturn resolve(join(getPackageDir(), \"docs\"));\n}\n\n/** Get path to examples directory */\nexport function getExamplesPath(): string {\n\treturn resolve(join(getPackageDir(), \"examples\"));\n}\n\n/** Get path to CHANGELOG.md */\nexport function getChangelogPath(): string {\n\treturn resolve(join(getPackageDir(), \"CHANGELOG.md\"));\n}\n\n/**\n * Get path to built-in interactive assets directory.\n * - For Bun binary: assets/ next to executable\n * - For Node.js (dist/): dist/modes/interactive/assets/\n * - For tsx (src/): src/modes/interactive/assets/\n */\nexport function getInteractiveAssetsDir(): string {\n\treturn resolveShippedAssetDir(INTERACTIVE_ASSETS);\n}\n\n/** Get path to a bundled interactive asset */\nexport function getBundledInteractiveAssetPath(name: string): string {\n\treturn join(getInteractiveAssetsDir(), name);\n}\n\n// =============================================================================\n// App Config (from package.json piConfig)\n// =============================================================================\n\ninterface PackageJson {\n\tname?: string;\n\tversion?: string;\n\tpiConfig?: {\n\t\tname?: string;\n\t\tconfigDir?: string;\n\t};\n}\n\nlet pkg: PackageJson = {};\ntry {\n\tpkg = JSON.parse(stripBom(readFileSync(getPackageJsonPath(), \"utf-8\"))) as PackageJson;\n} catch (e: unknown) {\n\tconst err = e as NodeJS.ErrnoException;\n\tif (err.code !== \"ENOENT\") throw e;\n}\n\nconst piConfigName: string | undefined = pkg.piConfig?.name;\n\n/**\n * A distribution repackaging this engine injects its brand once. The profile is consumed\n * here - which also scrubs the variable - so every process spawned later inherits a clean\n * environment and keeps the engine's own identity.\n */\nexport const BRAND: BrandProfile | undefined = brandProfile();\n\nexport const PACKAGE_NAME: string = pkg.name || \"@earendil-works/pi-coding-agent\";\nexport const APP_NAME: string = BRAND?.name || piConfigName || \"pi\";\n/** Command-line name; brands whose binary differs from their display name set this. */\nexport const APP_COMMAND: string = BRAND?.command ?? APP_NAME;\nexport const APP_TITLE: string = BRAND?.name || (piConfigName ? APP_NAME : \"π\");\nexport const CONFIG_DIR_NAME: string = BRAND?.configDir || pkg.piConfig?.configDir || \".pi\";\n/** True when the brand stores agent state directly under the config dir, with no `agent` segment. */\nexport const CONFIG_FLAT_LAYOUT: boolean = BRAND?.flatLayout === true;\nexport const VERSION: string = pkg.version || \"0.0.0\";\n/** Version shown to users; VERSION stays the engine version used for update comparisons. */\nexport const DISPLAY_VERSION: string = BRAND?.displayVersion || VERSION;\n\n// e.g., PI_CODING_AGENT_DIR or TAU_CODING_AGENT_DIR\n/** Primary environment prefix for this product; legacy prefixes stay readable. */\nexport const ENV_PREFIX: string = BRAND?.envPrefix || APP_NAME.toUpperCase();\nexport const ENV_AGENT_DIR = `${ENV_PREFIX}_CODING_AGENT_DIR`;\nexport const ENV_SESSION_DIR = `${ENV_PREFIX}_CODING_AGENT_SESSION_DIR`;\n\nexport function expandTildePath(path: string): string {\n\treturn normalizePath(path);\n}\n\nconst DEFAULT_SHARE_VIEWER_URL = \"https://pi.dev/session/\";\n\n/** Get the share viewer URL for a gist ID. */\nexport function getShareViewerUrl(gistId: string): string {\n\tconst baseUrl = envValue(\"SHARE_VIEWER_URL\") || DEFAULT_SHARE_VIEWER_URL;\n\treturn `${baseUrl}#${gistId}`;\n}\n\n// =============================================================================\n// User Config Paths (~/.senpi/agent/*)\n// =============================================================================\n\n/** Marker file that identifies a flat-layout config directory. */\nexport const FLAT_LAYOUT_SENTINEL = \"settings.json\";\n\n/**\n * Resolve the agent config directory from an explicit environment.\n *\n * A flat-layout brand keeps its state directly under the config directory, so it looks for\n * the settings file as proof rather than for an `agent` subdirectory - the config directory\n * name may also be used by unrelated project tooling.\n */\nexport function resolveAgentDir(cwd: string, homeDir: string, envDir?: string): string {\n\tif (envDir) {\n\t\treturn normalizePath(envDir, { homeDir });\n\t}\n\tif (CONFIG_FLAT_LAYOUT) {\n\t\tconst flatProjectDir = findNearestParentConfigDir(cwd, homeDir, CONFIG_DIR_NAME, undefined, FLAT_LAYOUT_SENTINEL);\n\t\treturn flatProjectDir ?? join(homeDir, CONFIG_DIR_NAME);\n\t}\n\tconst projectConfigDir = findNearestParentConfigDir(cwd, homeDir, CONFIG_DIR_NAME, \"agent\");\n\treturn projectConfigDir ? join(projectConfigDir, \"agent\") : join(homeDir, CONFIG_DIR_NAME, \"agent\");\n}\n\n/** Get the agent config directory (e.g., ~/.senpi/agent/) */\nexport function getAgentDir(): string {\n\treturn resolveAgentDir(process.cwd(), homedir(), envValue(\"CODING_AGENT_DIR\"));\n}\n\n/**\n * Short, display-only spelling of the agent directory for help text and tips, e.g.\n * `~/.omo` for a flat brand or `~/.senpi/agent` for the engine layout.\n */\nexport function agentDirLabel(): string {\n\treturn CONFIG_FLAT_LAYOUT ? `~/${CONFIG_DIR_NAME}` : `~/${CONFIG_DIR_NAME}/agent`;\n}\n\n/** Get path to user's custom themes directory */\nexport function getCustomThemesDir(): string {\n\treturn join(getAgentDir(), \"themes\");\n}\n\n/** Get path to models.json */\nexport function getModelsPath(): string {\n\treturn join(getAgentDir(), \"models.json\");\n}\n\n/** Get path to auth.json */\nexport function getAuthPath(): string {\n\treturn join(getAgentDir(), \"auth.json\");\n}\n\n/** Get path to settings.json */\nexport function getSettingsPath(): string {\n\treturn join(getAgentDir(), \"settings.json\");\n}\n\n/** Get path to tools directory */\nexport function getToolsDir(): string {\n\treturn join(getAgentDir(), \"tools\");\n}\n\n/** Get path to managed binaries directory (fd, rg) */\nexport function getBinDir(): string {\n\treturn join(getAgentDir(), \"bin\");\n}\n\n/** Get path to prompt templates directory */\nexport function getPromptsDir(): string {\n\treturn join(getAgentDir(), \"prompts\");\n}\n\n/** Get path to sessions directory */\nexport function getSessionsDir(): string {\n\treturn join(getAgentDir(), \"sessions\");\n}\n\n/** Get path to debug log file */\nexport function getDebugLogPath(): string {\n\treturn join(getAgentDir(), `${APP_NAME}-debug.log`);\n}\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAqB,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAA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CAAC;AACtC,CAAC;AAED,8BAA8B;AAC9B,MAAM,UAAU,aAAa;IAC5B,OAAO,IAAI,CAAC,WAAW,EAAE,EAAE,aAAa,CAAC,CAAC;AAC3C,CAAC;AAED,4BAA4B;AAC5B,MAAM,UAAU,WAAW;IAC1B,OAAO,IAAI,CAAC,WAAW,EAAE,EAAE,WAAW,CAAC,CAAC;AACzC,CAAC;AAED,gCAAgC;AAChC,MAAM,UAAU,eAAe;IAC9B,OAAO,IAAI,CAAC,WAAW,EAAE,EAAE,eAAe,CAAC,CAAC;AAC7C,CAAC;AAED,kCAAkC;AAClC,MAAM,UAAU,WAAW;IAC1B,OAAO,IAAI,CAAC,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,SAAS;IACxB,OAAO,IAAI,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAC;AACnC,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,aAAa;IAC5B,OAAO,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,CAAC;AACvC,CAAC;AAED,qCAAqC;AACrC,MAAM,UAAU,cAAc;IAC7B,OAAO,IAAI,CAAC,WAAW,EAAE,EAAE,UAAU,CAAC,CAAC;AACxC,CAAC;AAED,iCAAiC;AACjC,MAAM,UAAU,eAAe;IAC9B,OAAO,IAAI,CAAC,WAAW,EAAE,EAAE,GAAG,QAAQ,YAAY,CAAC,CAAC;AACrD,CAAC","sourcesContent":["import { accessSync, constants, existsSync, readFileSync, realpathSync } from \"fs\";\nimport { homedir } from \"os\";\nimport { basename, dirname, join, resolve, sep, win32 } from \"path\";\nimport { fileURLToPath } from \"url\";\nimport { createBunLauncherRepairCommand } from \"./bun-global-launcher.ts\";\nimport { type BrandProfile, brandProfile, envValue } from \"./core/brand.ts\";\nimport { findNearestParentConfigDir } from \"./nearest-parent-config.ts\";\nimport { spawnProcessSync } from \"./utils/child-process.ts\";\nimport { normalizePath } from \"./utils/paths.ts\";\nimport { stripBom } from \"./utils/text.ts\";\n\n// =============================================================================\n// Package Detection\n// =============================================================================\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * Detect if we're running as a Bun compiled binary.\n * Bun binaries have import.meta.url containing \"$bunfs\", \"~BUN\", or \"%7EBUN\" (Bun's virtual filesystem path)\n */\nexport const isBunBinary =\n\timport.meta.url.includes(\"$bunfs\") || import.meta.url.includes(\"~BUN\") || import.meta.url.includes(\"%7EBUN\");\n\n/** Detect if Bun is the runtime (compiled binary or bun run) */\nexport const isBunRuntime = !!process.versions.bun;\n\n// =============================================================================\n// Install Method Detection\n// =============================================================================\n\nexport type InstallMethod = \"bun-binary\" | \"npm\" | \"pnpm\" | \"yarn\" | \"bun\" | \"unknown\";\n\ninterface SelfUpdateCommandStep {\n\tcommand: string;\n\targs: string[];\n\tdisplay: string;\n}\n\nexport interface SelfUpdateCommand extends SelfUpdateCommandStep {\n\tsteps?: SelfUpdateCommandStep[];\n}\n\nexport type SelfUpdatePackageTarget = string | { packageName: string; installSpec?: string };\n\nfunction normalizeSelfUpdatePackageTarget(target: SelfUpdatePackageTarget): {\n\tpackageName: string;\n\tinstallSpec: string;\n} {\n\tif (typeof target === \"string\") {\n\t\treturn { packageName: target, installSpec: target };\n\t}\n\treturn { packageName: target.packageName, installSpec: target.installSpec ?? target.packageName };\n}\n\nfunction makeSelfUpdateCommand(\n\tinstallStep: SelfUpdateCommandStep,\n\tuninstallStep?: SelfUpdateCommandStep,\n\tpostInstallStep?: SelfUpdateCommandStep,\n): SelfUpdateCommand {\n\tconst steps = [\n\t\t...(uninstallStep ? [uninstallStep] : []),\n\t\tinstallStep,\n\t\t...(postInstallStep ? [postInstallStep] : []),\n\t];\n\tif (steps.length === 1) return installStep;\n\treturn {\n\t\t...installStep,\n\t\tdisplay: steps.map((step) => step.display).join(\" && \"),\n\t\tsteps,\n\t};\n}\n\nfunction makeSelfUpdateCommandStep(command: string, args: string[]): SelfUpdateCommandStep {\n\treturn {\n\t\tcommand,\n\t\targs,\n\t\tdisplay: [command, ...args].map((arg) => (/\\s/.test(arg) ? `\"${arg}\"` : arg)).join(\" \"),\n\t};\n}\n\nexport function detectInstallMethod(): InstallMethod {\n\tif (isBunBinary) {\n\t\treturn \"bun-binary\";\n\t}\n\n\tconst resolvedPath = `${__dirname}\\0${process.execPath || \"\"}`.toLowerCase().replace(/\\\\/g, \"/\");\n\n\tif (resolvedPath.includes(\"/pnpm/\") || resolvedPath.includes(\"/.pnpm/\")) {\n\t\treturn \"pnpm\";\n\t}\n\tif (resolvedPath.includes(\"/yarn/\") || resolvedPath.includes(\"/.yarn/\")) {\n\t\treturn \"yarn\";\n\t}\n\tif (isBunRuntime || resolvedPath.includes(\"/install/global/node_modules/\")) {\n\t\treturn \"bun\";\n\t}\n\tif (resolvedPath.includes(\"/npm/\") || resolvedPath.includes(\"/node_modules/\")) {\n\t\treturn \"npm\";\n\t}\n\n\treturn \"unknown\";\n}\n\nfunction getInferredNpmInstall(): { root: string; prefix: string } | undefined {\n\tconst packageDir = getPackageDir();\n\tconst path = process.platform === \"win32\" || packageDir.includes(\"\\\\\") ? win32 : { basename, dirname };\n\tconst parent = path.dirname(packageDir);\n\tlet root: string | undefined;\n\tif (path.basename(parent).startsWith(\"@\") && path.basename(path.dirname(parent)) === \"node_modules\") {\n\t\troot = path.dirname(parent);\n\t} else if (path.basename(parent) === \"node_modules\") {\n\t\troot = parent;\n\t}\n\tif (!root) return undefined;\n\tconst rootParent = path.dirname(root);\n\tif (path.basename(rootParent) === \"lib\") return { root, prefix: path.dirname(rootParent) };\n\t// Windows global npm prefixes use `<prefix>\\\\node_modules`, which is\n\t// indistinguishable from local project installs by path shape alone. Do not\n\t// infer unsupported Windows custom prefixes without `npm root -g` evidence.\n\treturn undefined;\n}\n\nfunction getSelfUpdateCommandForMethod(\n\tmethod: InstallMethod,\n\tinstalledPackageName: string,\n\tupdatePackageTarget: SelfUpdatePackageTarget = installedPackageName,\n\tnpmCommand?: string[],\n): SelfUpdateCommand | undefined {\n\tconst target = normalizeSelfUpdatePackageTarget(updatePackageTarget);\n\tswitch (method) {\n\t\tcase \"bun-binary\":\n\t\t\treturn undefined;\n\t\tcase \"pnpm\": {\n\t\t\tconst match = readCommandOutput(\"pnpm\", [\"root\", \"-g\"])\n\t\t\t\t? undefined\n\t\t\t\t: /^(.*[\\\\/]global[\\\\/][^\\\\/]+)[\\\\/]\\.pnpm[\\\\/]/.exec(getPackageDir());\n\t\t\tconst binDirArgs = match\n\t\t\t\t? [`--config.global-bin-dir=${process.env.PNPM_HOME || dirname(dirname(match[1]))}`]\n\t\t\t\t: [];\n\t\t\treturn makeSelfUpdateCommand(\n\t\t\t\tmakeSelfUpdateCommandStep(\"pnpm\", [\n\t\t\t\t\t\"install\",\n\t\t\t\t\t\"-g\",\n\t\t\t\t\t\"--ignore-scripts\",\n\t\t\t\t\t\"--config.minimumReleaseAge=0\",\n\t\t\t\t\t...binDirArgs,\n\t\t\t\t\ttarget.installSpec,\n\t\t\t\t]),\n\t\t\t\ttarget.packageName === installedPackageName\n\t\t\t\t\t? undefined\n\t\t\t\t\t: makeSelfUpdateCommandStep(\"pnpm\", [\"remove\", \"-g\", ...binDirArgs, installedPackageName]),\n\t\t\t);\n\t\t}\n\t\tcase \"yarn\":\n\t\t\treturn makeSelfUpdateCommand(\n\t\t\t\tmakeSelfUpdateCommandStep(\"yarn\", [\"global\", \"add\", \"--ignore-scripts\", target.installSpec]),\n\t\t\t\ttarget.packageName === installedPackageName\n\t\t\t\t\t? undefined\n\t\t\t\t\t: makeSelfUpdateCommandStep(\"yarn\", [\"global\", \"remove\", installedPackageName]),\n\t\t\t);\n\t\tcase \"bun\": {\n\t\t\tconst binDir = readCommandOutput(\"bun\", [\"pm\", \"bin\", \"-g\"]);\n\t\t\tif (!binDir) return undefined;\n\t\t\treturn makeSelfUpdateCommand(\n\t\t\t\tmakeSelfUpdateCommandStep(\"bun\", [\n\t\t\t\t\t\"install\",\n\t\t\t\t\t\"-g\",\n\t\t\t\t\t\"--ignore-scripts\",\n\t\t\t\t\t\"--minimum-release-age=0\",\n\t\t\t\t\ttarget.installSpec,\n\t\t\t\t]),\n\t\t\t\ttarget.packageName === installedPackageName\n\t\t\t\t\t? undefined\n\t\t\t\t\t: makeSelfUpdateCommandStep(\"bun\", [\"uninstall\", \"-g\", installedPackageName]),\n\t\t\t\tprocess.platform === \"win32\"\n\t\t\t\t\t? undefined\n\t\t\t\t\t: createBunLauncherRepairCommand(binDir, target.packageName, APP_NAME),\n\t\t\t);\n\t\t}\n\t\tcase \"npm\": {\n\t\t\tconst [command = \"npm\", ...npmArgs] = npmCommand ?? [];\n\t\t\tconst inferred = npmCommand?.length ? undefined : getInferredNpmInstall();\n\t\t\tconst prefixArgs = [...npmArgs, ...(inferred ? [\"--prefix\", inferred.prefix] : [])];\n\t\t\tconst installStep = makeSelfUpdateCommandStep(command, [\n\t\t\t\t...prefixArgs,\n\t\t\t\t\"install\",\n\t\t\t\t\"-g\",\n\t\t\t\t\"--ignore-scripts\",\n\t\t\t\t\"--min-release-age=0\",\n\t\t\t\ttarget.installSpec,\n\t\t\t]);\n\t\t\tconst uninstallStep =\n\t\t\t\ttarget.packageName === installedPackageName\n\t\t\t\t\t? undefined\n\t\t\t\t\t: makeSelfUpdateCommandStep(command, [...prefixArgs, \"uninstall\", \"-g\", installedPackageName]);\n\t\t\treturn makeSelfUpdateCommand(installStep, uninstallStep);\n\t\t}\n\t\tcase \"unknown\":\n\t\t\treturn undefined;\n\t}\n}\n\nfunction readCommandOutput(\n\tcommand: string,\n\targs: string[],\n\toptions: { requireSuccess?: boolean } = {},\n): string | undefined {\n\tconst result = spawnProcessSync(command, args, {\n\t\tencoding: \"utf-8\",\n\t\tstdio: [\"ignore\", \"pipe\", \"pipe\"],\n\t});\n\tif (result.status === 0) return result.stdout.trim() || undefined;\n\tif (options.requireSuccess) {\n\t\tconst reason = result.error?.message || result.stderr.trim() || `exit code ${result.status ?? \"unknown\"}`;\n\t\tthrow new Error(`Failed to run ${[command, ...args].join(\" \")}: ${reason}`);\n\t}\n\treturn undefined;\n}\n\nfunction getGlobalPackageRoots(method: InstallMethod, _packageName: string, npmCommand?: string[]): string[] {\n\tswitch (method) {\n\t\tcase \"npm\": {\n\t\t\tconst configured = !!npmCommand?.length;\n\t\t\tconst [command = \"npm\", ...npmArgs] = npmCommand ?? [];\n\t\t\tif (configured && command === \"bun\") {\n\t\t\t\tconst bunBin = readCommandOutput(command, [...npmArgs, \"pm\", \"bin\", \"-g\"], {\n\t\t\t\t\trequireSuccess: true,\n\t\t\t\t});\n\t\t\t\tconst roots = [join(homedir(), \".bun\", \"install\", \"global\", \"node_modules\")];\n\t\t\t\tif (bunBin) {\n\t\t\t\t\troots.push(join(dirname(bunBin), \"install\", \"global\", \"node_modules\"));\n\t\t\t\t}\n\t\t\t\treturn roots;\n\t\t\t}\n\t\t\tconst root = readCommandOutput(command, [...npmArgs, \"root\", \"-g\"], {\n\t\t\t\trequireSuccess: configured,\n\t\t\t});\n\t\t\tconst inferred = configured ? undefined : getInferredNpmInstall();\n\t\t\treturn [root, inferred?.root].filter((x): x is string => !!x);\n\t\t}\n\t\tcase \"pnpm\": {\n\t\t\tconst root = readCommandOutput(\"pnpm\", [\"root\", \"-g\"]);\n\t\t\tif (root) return [root, dirname(root)];\n\t\t\tconst match = /^(.*[\\\\/]global[\\\\/][^\\\\/]+)[\\\\/]\\.pnpm[\\\\/]/.exec(getPackageDir());\n\t\t\treturn match ? [match[1]] : [];\n\t\t}\n\t\tcase \"yarn\": {\n\t\t\tconst dir = readCommandOutput(\"yarn\", [\"global\", \"dir\"]);\n\t\t\treturn dir ? [dir, join(dir, \"node_modules\")] : [];\n\t\t}\n\t\tcase \"bun\": {\n\t\t\tconst bunBin = readCommandOutput(\"bun\", [\"pm\", \"bin\", \"-g\"]);\n\t\t\tconst roots = [join(homedir(), \".bun\", \"install\", \"global\", \"node_modules\")];\n\t\t\tif (bunBin) {\n\t\t\t\troots.push(join(dirname(bunBin), \"install\", \"global\", \"node_modules\"));\n\t\t\t}\n\t\t\treturn roots;\n\t\t}\n\t\tcase \"bun-binary\":\n\t\tcase \"unknown\":\n\t\t\treturn [];\n\t}\n}\n\nfunction normalizeExistingPathForComparison(path: string, resolveSymlinks: boolean): string | undefined {\n\tconst resolvedPath = resolve(path);\n\tif (!existsSync(resolvedPath)) {\n\t\treturn undefined;\n\t}\n\tlet normalizedPath = resolvedPath;\n\tif (resolveSymlinks) {\n\t\ttry {\n\t\t\tnormalizedPath = realpathSync(resolvedPath);\n\t\t} catch {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\tif (process.platform === \"win32\") {\n\t\tnormalizedPath = normalizedPath.toLowerCase();\n\t}\n\treturn normalizedPath;\n}\n\nfunction getPathComparisonCandidates(path: string): string[] {\n\treturn Array.from(\n\t\tnew Set(\n\t\t\t[normalizeExistingPathForComparison(path, false), normalizeExistingPathForComparison(path, true)].filter(\n\t\t\t\t(candidate): candidate is string => !!candidate,\n\t\t\t),\n\t\t),\n\t);\n}\n\nfunction getEntrypointPackageDir(): string | undefined {\n\tconst entrypoint = process.argv[1];\n\tif (!entrypoint) return undefined;\n\tlet dir = dirname(entrypoint);\n\twhile (dir !== dirname(dir)) {\n\t\tif (existsSync(join(dir, \"package.json\"))) {\n\t\t\treturn dir;\n\t\t}\n\t\tdir = dirname(dir);\n\t}\n\treturn undefined;\n}\n\nfunction isSelfUpdatePathWritable(): boolean {\n\tconst packageDir = getPackageDir();\n\ttry {\n\t\taccessSync(packageDir, constants.W_OK);\n\t\taccessSync(dirname(packageDir), constants.W_OK);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction isManagedByGlobalPackageManager(method: InstallMethod, packageName: string, npmCommand?: string[]): boolean {\n\tconst packageDirs = [getPackageDir(), getEntrypointPackageDir()].filter((dir): dir is string => !!dir);\n\tconst packageDirCandidates = packageDirs.flatMap((dir) => getPathComparisonCandidates(dir));\n\treturn getGlobalPackageRoots(method, packageName, npmCommand).some((root) => {\n\t\treturn getPathComparisonCandidates(root).some((normalizedRoot) => {\n\t\t\tconst rootPrefix = normalizedRoot.endsWith(sep) ? normalizedRoot : `${normalizedRoot}${sep}`;\n\t\t\treturn packageDirCandidates.some((packageDir) => packageDir.startsWith(rootPrefix));\n\t\t});\n\t});\n}\n\nexport function getSelfUpdateCommand(\n\tpackageName: string,\n\tnpmCommand?: string[],\n\tupdatePackageTarget: SelfUpdatePackageTarget = packageName,\n): SelfUpdateCommand | undefined {\n\tconst method = detectInstallMethod();\n\tconst command = getSelfUpdateCommandForMethod(method, packageName, updatePackageTarget, npmCommand);\n\tif (!command || !isManagedByGlobalPackageManager(method, packageName, npmCommand) || !isSelfUpdatePathWritable()) {\n\t\treturn undefined;\n\t}\n\treturn command;\n}\n\nexport function getSelfUpdateUnavailableInstruction(\n\tpackageName: string,\n\tnpmCommand?: string[],\n\tupdatePackageTarget: SelfUpdatePackageTarget = packageName,\n): string {\n\tconst method = detectInstallMethod();\n\tconst target = normalizeSelfUpdatePackageTarget(updatePackageTarget);\n\tif (method === \"bun-binary\") {\n\t\treturn `Download from: https://github.com/code-yeongyu/senpi/releases/latest`;\n\t}\n\tconst command = getSelfUpdateCommandForMethod(method, packageName, target, npmCommand);\n\tif (command) {\n\t\tif (isManagedByGlobalPackageManager(method, packageName, npmCommand) && !isSelfUpdatePathWritable()) {\n\t\t\treturn `This installation is managed by a global ${method} install, but the install path is not writable. Update it yourself with: ${command.display}`;\n\t\t}\n\t\treturn `This installation is not managed by a global ${method} install. Update it with the package manager, wrapper, or source checkout that provides it.`;\n\t}\n\treturn `Update ${target.installSpec} using the package manager, wrapper, or source checkout that provides this installation.`;\n}\n\nexport function getUpdateInstruction(packageName: string): string {\n\tconst method = detectInstallMethod();\n\tconst command = getSelfUpdateCommandForMethod(method, packageName);\n\tif (command) {\n\t\treturn `Run: ${command.display}`;\n\t}\n\treturn getSelfUpdateUnavailableInstruction(packageName);\n}\n\n// =============================================================================\n// Package Asset Paths (shipped with executable)\n// =============================================================================\n\n/**\n * Get the base directory for resolving package assets (themes, package.json, README.md, CHANGELOG.md).\n * - For Bun binary: returns the directory containing the executable\n * - For Node.js and tsx: returns the package root containing package.json\n * - Ignores Bun binary metadata copied into dist/ when the package root is available\n */\nexport function findNodePackageDir(startDir: string): string {\n\tlet dir = startDir;\n\twhile (dir !== dirname(dir)) {\n\t\tif (existsSync(join(dir, \"package.json\"))) {\n\t\t\tconst parent = dirname(dir);\n\t\t\t// build:binary places Bun's metadata inside dist/. Node still needs the\n\t\t\t// package root so its dist-relative asset paths do not become dist/dist/.\n\t\t\tif (basename(dir) === \"dist\" && existsSync(join(parent, \"package.json\"))) {\n\t\t\t\treturn parent;\n\t\t\t}\n\t\t\treturn dir;\n\t\t}\n\t\tdir = dirname(dir);\n\t}\n\treturn startDir;\n}\n\nexport function getPackageDir(): string {\n\t// Allow override via environment variable (useful for Nix/Guix where store paths tokenize poorly)\n\tconst envDir = envValue(\"PACKAGE_DIR\");\n\tif (envDir) {\n\t\treturn normalizePath(envDir);\n\t}\n\n\tif (isBunBinary) {\n\t\t// Bun binary: process.execPath points to the compiled executable\n\t\treturn dirname(process.execPath);\n\t}\n\treturn findNodePackageDir(__dirname);\n}\n\n/** One asset directory shipped with the package, in both the Bun-binary and Node layouts. */\ninterface ShippedAsset {\n\t/** Directory name next to a compiled Bun binary. */\n\treadonly binaryDir: string;\n\t/** Path segments under the package's src/ or dist/ root. */\n\treadonly sourceSegments: readonly string[];\n\t/** A file the directory must contain; a root without it does not ship this asset. */\n\treadonly probe: string;\n}\n\nconst THEMES_ASSET: ShippedAsset = {\n\tbinaryDir: \"theme\",\n\tsourceSegments: [\"modes\", \"interactive\", \"theme\"],\n\tprobe: \"dark.json\",\n};\n\nconst EXPORT_TEMPLATE_ASSET: ShippedAsset = {\n\tbinaryDir: \"export-html\",\n\tsourceSegments: [\"core\", \"export-html\"],\n\tprobe: \"template.html\",\n};\n\nconst INTERACTIVE_ASSETS: ShippedAsset = {\n\tbinaryDir: \"assets\",\n\tsourceSegments: [\"modes\", \"interactive\", \"assets\"],\n\tprobe: \"clankolas.png\",\n};\n\nfunction assetDirIn(root: string, asset: ShippedAsset): string {\n\tif (isBunBinary) {\n\t\treturn join(root, asset.binaryDir);\n\t}\n\tconst srcOrDist = existsSync(join(root, \"src\")) ? \"src\" : \"dist\";\n\treturn join(root, srcOrDist, ...asset.sourceSegments);\n}\n\n/**\n * Resolve a shipped asset directory, preferring PACKAGE_DIR but never trusting it blindly.\n *\n * PACKAGE_DIR relocates the package root (Nix/Guix store paths), and a Bun binary that embeds this\n * CLI pins it to the binary's own root. When such a root is inherited by a Node install of the CLI,\n * the Node layout resolves under it to a directory that cannot exist and startup dies on ENOENT\n * (an omo binary keeps its themes in a flat theme/, so the inherited root has no dist/ tree at all).\n * Fall back to the running install whenever the preferred root does not actually ship the asset. When\n * neither ships it the install is genuinely broken, and the running install's own path is returned so\n * the resulting error names the tree that was supposed to carry the asset rather than a foreign root.\n */\nfunction resolveShippedAssetDir(asset: ShippedAsset): string {\n\tconst preferred = assetDirIn(getPackageDir(), asset);\n\tif (existsSync(join(preferred, asset.probe))) {\n\t\treturn preferred;\n\t}\n\treturn assetDirIn(isBunBinary ? dirname(process.execPath) : findNodePackageDir(__dirname), asset);\n}\n\n/**\n * Get path to built-in themes directory (shipped with package)\n * - For Bun binary: theme/ next to executable\n * - For Node.js (dist/): dist/modes/interactive/theme/\n * - For tsx (src/): src/modes/interactive/theme/\n */\nexport function getThemesDir(): string {\n\treturn resolveShippedAssetDir(THEMES_ASSET);\n}\n\n/**\n * Get path to HTML export template directory (shipped with package)\n * - For Bun binary: export-html/ next to executable\n * - For Node.js (dist/): dist/core/export-html/\n * - For tsx (src/): src/core/export-html/\n */\nexport function getExportTemplateDir(): string {\n\treturn resolveShippedAssetDir(EXPORT_TEMPLATE_ASSET);\n}\n\n/** Get path to package.json */\nexport function getPackageJsonPath(): string {\n\treturn join(getPackageDir(), \"package.json\");\n}\n\n/** Get path to README.md */\nexport function getReadmePath(): string {\n\treturn resolve(join(getPackageDir(), \"README.md\"));\n}\n\n/** Get path to docs directory */\nexport function getDocsPath(): string {\n\treturn resolve(join(getPackageDir(), \"docs\"));\n}\n\n/** Get path to examples directory */\nexport function getExamplesPath(): string {\n\treturn resolve(join(getPackageDir(), \"examples\"));\n}\n\n/** Get path to CHANGELOG.md */\nexport function getChangelogPath(): string {\n\treturn resolve(join(getPackageDir(), \"CHANGELOG.md\"));\n}\n\n/**\n * Get path to built-in interactive assets directory.\n * - For Bun binary: assets/ next to executable\n * - For Node.js (dist/): dist/modes/interactive/assets/\n * - For tsx (src/): src/modes/interactive/assets/\n */\nexport function getInteractiveAssetsDir(): string {\n\treturn resolveShippedAssetDir(INTERACTIVE_ASSETS);\n}\n\n/** Get path to a bundled interactive asset */\nexport function getBundledInteractiveAssetPath(name: string): string {\n\treturn join(getInteractiveAssetsDir(), name);\n}\n\n// =============================================================================\n// App Config (from package.json piConfig)\n// =============================================================================\n\ninterface PackageJson {\n\tname?: string;\n\tversion?: string;\n\tpiConfig?: {\n\t\tname?: string;\n\t\tconfigDir?: string;\n\t};\n}\n\nlet pkg: PackageJson = {};\ntry {\n\tpkg = JSON.parse(stripBom(readFileSync(getPackageJsonPath(), \"utf-8\"))) as PackageJson;\n} catch (e: unknown) {\n\tconst err = e as NodeJS.ErrnoException;\n\tif (err.code !== \"ENOENT\") throw e;\n}\n\nconst piConfigName: string | undefined = pkg.piConfig?.name;\n\n/**\n * A distribution repackaging this engine injects its brand once. The profile is consumed\n * here - which also scrubs the variable - so every process spawned later inherits a clean\n * environment and keeps the engine's own identity.\n */\nexport const BRAND: BrandProfile | undefined = brandProfile();\n\nexport const PACKAGE_NAME: string = pkg.name || \"@earendil-works/pi-coding-agent\";\nexport const APP_NAME: string = BRAND?.name || piConfigName || \"pi\";\n/** Command-line name; brands whose binary differs from their display name set this. */\nexport const APP_COMMAND: string = BRAND?.command ?? APP_NAME;\nexport const APP_TITLE: string = BRAND?.name || (piConfigName ? APP_NAME : \"π\");\nexport const CONFIG_DIR_NAME: string = BRAND?.configDir || pkg.piConfig?.configDir || \".pi\";\n/** True when the brand stores agent state directly under the config dir, with no `agent` segment. */\nexport const CONFIG_FLAT_LAYOUT: boolean = BRAND?.flatLayout === true;\nexport const VERSION: string = pkg.version || \"0.0.0\";\n/** Version shown to users; VERSION stays the engine version used for update comparisons. */\nexport const DISPLAY_VERSION: string = BRAND?.displayVersion || VERSION;\n\n// e.g., PI_CODING_AGENT_DIR or TAU_CODING_AGENT_DIR\n/** Primary environment prefix for this product; legacy prefixes stay readable. */\nexport const ENV_PREFIX: string = BRAND?.envPrefix || APP_NAME.toUpperCase();\nexport const ENV_AGENT_DIR = `${ENV_PREFIX}_CODING_AGENT_DIR`;\nexport const ENV_SESSION_DIR = `${ENV_PREFIX}_CODING_AGENT_SESSION_DIR`;\n\nexport function expandTildePath(path: string): string {\n\treturn normalizePath(path);\n}\n\nconst DEFAULT_SHARE_VIEWER_URL = \"https://pi.dev/session/\";\n\n/** Get the share viewer URL for a gist ID. */\nexport function getShareViewerUrl(gistId: string): string {\n\tconst baseUrl = envValue(\"SHARE_VIEWER_URL\") || DEFAULT_SHARE_VIEWER_URL;\n\treturn `${baseUrl}#${gistId}`;\n}\n\n// =============================================================================\n// User Config Paths (~/.senpi/agent/*)\n// =============================================================================\n\n/** Marker file that identifies a flat-layout config directory. */\nexport const FLAT_LAYOUT_SENTINEL = \"settings.json\";\n\n/**\n * Resolve the agent config directory from an explicit environment.\n *\n * A flat-layout brand keeps its state directly under the config directory, so it looks for\n * the settings file as proof rather than for an `agent` subdirectory - the config directory\n * name may also be used by unrelated project tooling.\n */\nexport function resolveAgentDir(cwd: string, homeDir: string, envDir?: string): string {\n\tif (envDir) {\n\t\treturn normalizePath(envDir, { homeDir });\n\t}\n\tif (CONFIG_FLAT_LAYOUT) {\n\t\tconst flatProjectDir = findNearestParentConfigDir(cwd, homeDir, CONFIG_DIR_NAME, undefined, FLAT_LAYOUT_SENTINEL);\n\t\treturn flatProjectDir ?? join(homeDir, CONFIG_DIR_NAME);\n\t}\n\tconst projectConfigDir = findNearestParentConfigDir(cwd, homeDir, CONFIG_DIR_NAME, \"agent\");\n\treturn projectConfigDir ? join(projectConfigDir, \"agent\") : join(homeDir, CONFIG_DIR_NAME, \"agent\");\n}\n\n/** Get the agent config directory (e.g., ~/.senpi/agent/) */\nexport function getAgentDir(): string {\n\treturn resolveAgentDir(process.cwd(), homedir(), envValue(\"CODING_AGENT_DIR\"));\n}\n\n/**\n * Short, display-only spelling of the agent directory for help text and tips, e.g.\n * `~/.omo` for a flat brand or `~/.senpi/agent` for the engine layout.\n */\nexport function agentDirLabel(): string {\n\treturn CONFIG_FLAT_LAYOUT ? `~/${CONFIG_DIR_NAME}` : `~/${CONFIG_DIR_NAME}/agent`;\n}\n\n/** Get path to user's custom themes directory */\nexport function getCustomThemesDir(): string {\n\treturn join(getAgentDir(), \"themes\");\n}\n\n/** Get path to models.json */\nexport function getModelsPath(): string {\n\treturn join(getAgentDir(), \"models.json\");\n}\n\n/** Get path to auth.json */\nexport function getAuthPath(): string {\n\treturn join(getAgentDir(), \"auth.json\");\n}\n\n/** Get path to settings.json */\nexport function getSettingsPath(): string {\n\treturn join(getAgentDir(), \"settings.json\");\n}\n\n/** Get path to tools directory */\nexport function getToolsDir(): string {\n\treturn join(getAgentDir(), \"tools\");\n}\n\n/** Get path to managed binaries directory (fd, rg) */\nexport function getBinDir(): string {\n\treturn join(getAgentDir(), \"bin\");\n}\n\n/** Get path to prompt templates directory */\nexport function getPromptsDir(): string {\n\treturn join(getAgentDir(), \"prompts\");\n}\n\n/** Get path to sessions directory */\nexport function getSessionsDir(): string {\n\treturn join(getAgentDir(), \"sessions\");\n}\n\n/** Get path to debug log file */\nexport function getDebugLogPath(): string {\n\treturn join(getAgentDir(), `${APP_NAME}-debug.log`);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"agent-session-run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AO,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CA0FxD;IAED;;;;;;OAMG;IACG,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAqC9F;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAO7B;CACD;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC9C,aAAa,EAAE,gCAAgC,EAC/C,OAAO,EAAE;IACR,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,aAAa,CAAC,EAAE,QAAQ,CAAC,yBAAyB,CAAC,CAAC;CACpD,GACC,OAAO,CAAC,mBAAmB,CAAC,CAW9B;AAED,OAAO,EACN,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EACzB,KAAK,qCAAqC,EAC1C,KAAK,iCAAiC,EACtC,8BAA8B,EAC9B,0BAA0B,GAC1B,MAAM,6BAA6B,CAAC"}
@@ -1,10 +1,10 @@
1
- import { constants, copyFileSync, existsSync, mkdirSync } from "node:fs";
2
- import { basename, join, parse, resolve } from "node:path";
1
+ import { copyFileSync, existsSync, mkdirSync } from "node:fs";
2
+ import { basename, join, resolve } from "node:path";
3
3
  import { resolvePath } from "../utils/paths.js";
4
4
  import { emitSessionShutdownEvent } from "./extensions/runner.js";
5
5
  import { assertSessionCwdExists } from "./session-cwd.js";
6
6
  import { SessionManager } from "./session-manager.js";
7
- import { reserveSessionWrite, unregisterSessionWriter } from "./session-write-reservation.js";
7
+ import { reserveSessionWrite } from "./session-write-reservation.js";
8
8
  /**
9
9
  * Thrown when /import references a JSONL file path that does not exist.
10
10
  */
@@ -116,11 +116,7 @@ export class AgentSessionRuntime {
116
116
  targetSessionFile,
117
117
  });
118
118
  this.beforeSessionInvalidate?.();
119
- const replaced = this.session.sessionManager;
120
119
  this.session.dispose();
121
- // Nothing writes to the replaced manager once its session is disposed, so the
122
- // shared host may hand its session file to another worker.
123
- unregisterSessionWriter(replaced);
124
120
  }
125
121
  async reportRemovedExtensions() {
126
122
  const pending = this._removedOnReplacement;
@@ -295,23 +291,15 @@ export class AgentSessionRuntime {
295
291
  if (!existsSync(sessionDir)) {
296
292
  mkdirSync(sessionDir, { recursive: true });
297
293
  }
298
- let destinationPath = join(sessionDir, basename(resolvedPath));
299
- const sourceAlreadyStored = resolve(destinationPath) === resolvedPath;
300
- if (!sourceAlreadyStored) {
301
- const { name, ext } = parse(destinationPath);
302
- let suffix = 1;
303
- while (existsSync(destinationPath)) {
304
- destinationPath = join(sessionDir, `${name}-${suffix++}${ext}`);
305
- }
306
- }
294
+ const destinationPath = join(sessionDir, basename(resolvedPath));
307
295
  const beforeResult = await this.emitBeforeSwitch("resume", destinationPath);
308
296
  if (beforeResult.cancelled) {
309
297
  return beforeResult;
310
298
  }
311
299
  const previousSessionFile = this.session.sessionFile;
312
300
  reserveSessionWrite(destinationPath);
313
- if (!sourceAlreadyStored) {
314
- copyFileSync(resolvedPath, destinationPath, constants.COPYFILE_EXCL);
301
+ if (resolve(destinationPath) !== resolvedPath) {
302
+ copyFileSync(resolvedPath, destinationPath);
315
303
  }
316
304
  const sessionManager = SessionManager.open(destinationPath, sessionDir, cwdOverride);
317
305
  assertSessionCwdExists(sessionManager, this.cwd);