@code-yeongyu/senpi 2026.9.11 → 2026.9.12-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1582) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +1 -1
  3. package/dist/bun/cli.d.ts +2 -1
  4. package/dist/bun/cli.d.ts.map +1 -1
  5. package/dist/bun/cli.js +5 -8
  6. package/dist/bun/cli.js.map +1 -1
  7. package/dist/bun/runtime-setup.d.ts +2 -0
  8. package/dist/bun/runtime-setup.d.ts.map +1 -0
  9. package/dist/bun/runtime-setup.js +9 -0
  10. package/dist/bun/runtime-setup.js.map +1 -0
  11. package/dist/bun/sandbox-env-setup.d.ts +2 -0
  12. package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
  13. package/dist/bun/sandbox-env-setup.js +4 -0
  14. package/dist/bun/sandbox-env-setup.js.map +1 -0
  15. package/dist/cli/config-selector.d.ts.map +1 -1
  16. package/dist/cli/config-selector.js +2 -1
  17. package/dist/cli/config-selector.js.map +1 -1
  18. package/dist/cli/setup.d.ts +2 -0
  19. package/dist/cli/setup.d.ts.map +1 -0
  20. package/dist/cli/setup.js +12 -0
  21. package/dist/cli/setup.js.map +1 -0
  22. package/dist/cli.js +3 -0
  23. package/dist/cli.js.map +1 -1
  24. package/dist/client/index.d.ts +1 -2
  25. package/dist/client/index.d.ts.map +1 -1
  26. package/dist/client/index.js +1 -2
  27. package/dist/client/index.js.map +1 -1
  28. package/dist/config.d.ts +1 -0
  29. package/dist/config.d.ts.map +1 -1
  30. package/dist/config.js +1 -0
  31. package/dist/config.js.map +1 -1
  32. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  33. package/dist/core/agent-session-runtime.js +18 -6
  34. package/dist/core/agent-session-runtime.js.map +1 -1
  35. package/dist/core/agent-session.d.ts +54 -17
  36. package/dist/core/agent-session.d.ts.map +1 -1
  37. package/dist/core/agent-session.js +153 -157
  38. package/dist/core/agent-session.js.map +1 -1
  39. package/dist/core/compaction/branch-summarization.d.ts +1 -1
  40. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  41. package/dist/core/compaction/branch-summarization.js +6 -4
  42. package/dist/core/compaction/branch-summarization.js.map +1 -1
  43. package/dist/core/compaction-settings-access.d.ts +18 -2
  44. package/dist/core/compaction-settings-access.d.ts.map +1 -1
  45. package/dist/core/compaction-settings-access.js +35 -4
  46. package/dist/core/compaction-settings-access.js.map +1 -1
  47. package/dist/core/compaction-settings-resolver.d.ts +2 -2
  48. package/dist/core/compaction-settings-resolver.d.ts.map +1 -1
  49. package/dist/core/compaction-settings-resolver.js +6 -3
  50. package/dist/core/compaction-settings-resolver.js.map +1 -1
  51. package/dist/core/cursor-history-admission.d.ts +50 -0
  52. package/dist/core/cursor-history-admission.d.ts.map +1 -0
  53. package/dist/core/cursor-history-admission.js +130 -0
  54. package/dist/core/cursor-history-admission.js.map +1 -0
  55. package/dist/core/extensions/builtin/ask-user/extension.d.ts.map +1 -1
  56. package/dist/core/extensions/builtin/ask-user/extension.js +11 -0
  57. package/dist/core/extensions/builtin/ask-user/extension.js.map +1 -1
  58. package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -1
  59. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +2 -1
  60. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -1
  61. package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
  62. package/dist/core/extensions/builtin/prompt-preset/presets.js +7 -1
  63. package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
  64. package/dist/core/extensions/loader.d.ts.map +1 -1
  65. package/dist/core/extensions/loader.js +4 -2
  66. package/dist/core/extensions/loader.js.map +1 -1
  67. package/dist/core/keybindings.d.ts +10 -0
  68. package/dist/core/keybindings.d.ts.map +1 -1
  69. package/dist/core/keybindings.js +8 -0
  70. package/dist/core/keybindings.js.map +1 -1
  71. package/dist/core/messages.d.ts +1 -1
  72. package/dist/core/messages.d.ts.map +1 -1
  73. package/dist/core/messages.js.map +1 -1
  74. package/dist/core/model-registry.d.ts +5 -1
  75. package/dist/core/model-registry.d.ts.map +1 -1
  76. package/dist/core/model-registry.js +8 -0
  77. package/dist/core/model-registry.js.map +1 -1
  78. package/dist/core/model-resolver.d.ts.map +1 -1
  79. package/dist/core/model-resolver.js +2 -0
  80. package/dist/core/model-resolver.js.map +1 -1
  81. package/dist/core/model-runtime.d.ts +1 -0
  82. package/dist/core/model-runtime.d.ts.map +1 -1
  83. package/dist/core/model-runtime.js +5 -2
  84. package/dist/core/model-runtime.js.map +1 -1
  85. package/dist/core/retry-fallback/settings.d.ts +2 -0
  86. package/dist/core/retry-fallback/settings.d.ts.map +1 -1
  87. package/dist/core/retry-fallback/settings.js.map +1 -1
  88. package/dist/core/session-manager.d.ts +5 -2
  89. package/dist/core/session-manager.d.ts.map +1 -1
  90. package/dist/core/session-manager.js +68 -19
  91. package/dist/core/session-manager.js.map +1 -1
  92. package/dist/core/session-write-reservation.d.ts +9 -0
  93. package/dist/core/session-write-reservation.d.ts.map +1 -1
  94. package/dist/core/session-write-reservation.js +33 -0
  95. package/dist/core/session-write-reservation.js.map +1 -1
  96. package/dist/core/settings-manager.d.ts +12 -5
  97. package/dist/core/settings-manager.d.ts.map +1 -1
  98. package/dist/core/settings-manager.js +18 -6
  99. package/dist/core/settings-manager.js.map +1 -1
  100. package/dist/core/settings-public-types.d.ts +1 -1
  101. package/dist/core/settings-public-types.d.ts.map +1 -1
  102. package/dist/core/settings-public-types.js.map +1 -1
  103. package/dist/core/skills.d.ts +1 -1
  104. package/dist/core/skills.d.ts.map +1 -1
  105. package/dist/core/skills.js +6 -2
  106. package/dist/core/skills.js.map +1 -1
  107. package/dist/core/system-prompt.d.ts.map +1 -1
  108. package/dist/core/system-prompt.js +8 -9
  109. package/dist/core/system-prompt.js.map +1 -1
  110. package/dist/core/tools/bash.d.ts.map +1 -1
  111. package/dist/core/tools/bash.js +3 -142
  112. package/dist/core/tools/bash.js.map +1 -1
  113. package/dist/core/tools/edit.d.ts +1 -12
  114. package/dist/core/tools/edit.d.ts.map +1 -1
  115. package/dist/core/tools/edit.js +4 -168
  116. package/dist/core/tools/edit.js.map +1 -1
  117. package/dist/core/tools/find.d.ts.map +1 -1
  118. package/dist/core/tools/find.js +2 -53
  119. package/dist/core/tools/find.js.map +1 -1
  120. package/dist/core/tools/grep.d.ts.map +1 -1
  121. package/dist/core/tools/grep.js +2 -58
  122. package/dist/core/tools/grep.js.map +1 -1
  123. package/dist/core/tools/ls.d.ts.map +1 -1
  124. package/dist/core/tools/ls.js +2 -47
  125. package/dist/core/tools/ls.js.map +1 -1
  126. package/dist/core/tools/read.d.ts +1 -4
  127. package/dist/core/tools/read.d.ts.map +1 -1
  128. package/dist/core/tools/read.js +4 -141
  129. package/dist/core/tools/read.js.map +1 -1
  130. package/dist/core/tools/renderers/bash.d.ts +12 -0
  131. package/dist/core/tools/renderers/bash.d.ts.map +1 -0
  132. package/dist/core/tools/renderers/bash.js +156 -0
  133. package/dist/core/tools/renderers/bash.js.map +1 -0
  134. package/dist/core/tools/renderers/edit.d.ts +23 -0
  135. package/dist/core/tools/renderers/edit.d.ts.map +1 -0
  136. package/dist/core/tools/renderers/edit.js +172 -0
  137. package/dist/core/tools/renderers/edit.js.map +1 -0
  138. package/dist/core/tools/renderers/find.d.ts +10 -0
  139. package/dist/core/tools/renderers/find.d.ts.map +1 -0
  140. package/dist/core/tools/renderers/find.js +64 -0
  141. package/dist/core/tools/renderers/find.js.map +1 -0
  142. package/dist/core/tools/renderers/grep.d.ts +10 -0
  143. package/dist/core/tools/renderers/grep.d.ts.map +1 -0
  144. package/dist/core/tools/renderers/grep.js +69 -0
  145. package/dist/core/tools/renderers/grep.js.map +1 -0
  146. package/dist/core/tools/renderers/index.d.ts +28 -0
  147. package/dist/core/tools/renderers/index.d.ts.map +1 -0
  148. package/dist/core/tools/renderers/index.js +47 -0
  149. package/dist/core/tools/renderers/index.js.map +1 -0
  150. package/dist/core/tools/renderers/ls.d.ts +10 -0
  151. package/dist/core/tools/renderers/ls.d.ts.map +1 -0
  152. package/dist/core/tools/renderers/ls.js +58 -0
  153. package/dist/core/tools/renderers/ls.js.map +1 -0
  154. package/dist/core/tools/renderers/read.d.ts +19 -0
  155. package/dist/core/tools/renderers/read.d.ts.map +1 -0
  156. package/dist/core/tools/renderers/read.js +149 -0
  157. package/dist/core/tools/renderers/read.js.map +1 -0
  158. package/dist/core/tools/renderers/write.d.ts +10 -0
  159. package/dist/core/tools/renderers/write.d.ts.map +1 -0
  160. package/dist/core/tools/renderers/write.js +162 -0
  161. package/dist/core/tools/renderers/write.js.map +1 -0
  162. package/dist/core/tools/write.d.ts.map +1 -1
  163. package/dist/core/tools/write.js +4 -153
  164. package/dist/core/tools/write.js.map +1 -1
  165. package/dist/index.d.ts +2 -2
  166. package/dist/index.d.ts.map +1 -1
  167. package/dist/index.js.map +1 -1
  168. package/dist/migrations.d.ts.map +1 -1
  169. package/dist/migrations.js +2 -2
  170. package/dist/migrations.js.map +1 -1
  171. package/dist/modes/app-server/threads/turn-runtime.d.ts +3 -1
  172. package/dist/modes/app-server/threads/turn-runtime.d.ts.map +1 -1
  173. package/dist/modes/app-server/threads/turn-runtime.js.map +1 -1
  174. package/dist/modes/app-server/threads/turns.js +1 -1
  175. package/dist/modes/app-server/threads/turns.js.map +1 -1
  176. package/dist/modes/app-server/turn-adapter.js +4 -2
  177. package/dist/modes/app-server/turn-adapter.js.map +1 -1
  178. package/dist/modes/interactive/chat-viewport.d.ts +22 -0
  179. package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
  180. package/dist/modes/interactive/chat-viewport.js +29 -0
  181. package/dist/modes/interactive/chat-viewport.js.map +1 -0
  182. package/dist/modes/interactive/components/ask-user-answer-key.d.ts +14 -0
  183. package/dist/modes/interactive/components/ask-user-answer-key.d.ts.map +1 -0
  184. package/dist/modes/interactive/components/ask-user-answer-key.js +65 -0
  185. package/dist/modes/interactive/components/ask-user-answer-key.js.map +1 -0
  186. package/dist/modes/interactive/components/ask-user-async-widget.d.ts +17 -12
  187. package/dist/modes/interactive/components/ask-user-async-widget.d.ts.map +1 -1
  188. package/dist/modes/interactive/components/ask-user-async-widget.js +47 -23
  189. package/dist/modes/interactive/components/ask-user-async-widget.js.map +1 -1
  190. package/dist/modes/interactive/components/assistant-message.d.ts +7 -0
  191. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  192. package/dist/modes/interactive/components/assistant-message.js +26 -2
  193. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  194. package/dist/modes/interactive/components/assistant-render-descriptors.d.ts +4 -0
  195. package/dist/modes/interactive/components/assistant-render-descriptors.d.ts.map +1 -1
  196. package/dist/modes/interactive/components/assistant-render-descriptors.js +8 -5
  197. package/dist/modes/interactive/components/assistant-render-descriptors.js.map +1 -1
  198. package/dist/modes/interactive/components/custom-editor.d.ts +10 -1
  199. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  200. package/dist/modes/interactive/components/custom-editor.js +37 -1
  201. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  202. package/dist/modes/interactive/components/index.d.ts +1 -1
  203. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  204. package/dist/modes/interactive/components/index.js.map +1 -1
  205. package/dist/modes/interactive/components/scoped-models-selector.js +8 -8
  206. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  207. package/dist/modes/interactive/components/status-indicator.d.ts +4 -1
  208. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  209. package/dist/modes/interactive/components/status-indicator.js +14 -2
  210. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  211. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  212. package/dist/modes/interactive/components/thinking-selector.js +4 -4
  213. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  214. package/dist/modes/interactive/components/tool-execution-renderer.d.ts +4 -1
  215. package/dist/modes/interactive/components/tool-execution-renderer.d.ts.map +1 -1
  216. package/dist/modes/interactive/components/tool-execution-renderer.js +23 -10
  217. package/dist/modes/interactive/components/tool-execution-renderer.js.map +1 -1
  218. package/dist/modes/interactive/components/tool-execution-types.d.ts +18 -2
  219. package/dist/modes/interactive/components/tool-execution-types.d.ts.map +1 -1
  220. package/dist/modes/interactive/components/tool-execution-types.js.map +1 -1
  221. package/dist/modes/interactive/components/tool-execution.d.ts +3 -3
  222. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  223. package/dist/modes/interactive/components/tool-execution.js +5 -0
  224. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  225. package/dist/modes/interactive/interactive-mode.d.ts +10 -15
  226. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  227. package/dist/modes/interactive/interactive-mode.js +178 -138
  228. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  229. package/dist/modes/interactive/theme/dark.json +2 -1
  230. package/dist/modes/interactive/theme/grok-day.json +2 -1
  231. package/dist/modes/interactive/theme/grok-night.json +2 -1
  232. package/dist/modes/interactive/theme/light.json +2 -1
  233. package/dist/modes/interactive/theme/theme-controller.d.ts +1 -0
  234. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
  235. package/dist/modes/interactive/theme/theme-controller.js +5 -0
  236. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  237. package/dist/modes/interactive/theme/theme-json.d.ts +84 -0
  238. package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -0
  239. package/dist/modes/interactive/theme/theme-json.js +130 -0
  240. package/dist/modes/interactive/theme/theme-json.js.map +1 -0
  241. package/dist/modes/interactive/theme/theme-schema.json +6 -2
  242. package/dist/modes/interactive/theme/theme.d.ts +10 -5
  243. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  244. package/dist/modes/interactive/theme/theme.js +14 -117
  245. package/dist/modes/interactive/theme/theme.js.map +1 -1
  246. package/dist/modes/interactive/tips/catalog/input-tips.d.ts +5 -0
  247. package/dist/modes/interactive/tips/catalog/input-tips.d.ts.map +1 -1
  248. package/dist/modes/interactive/tips/catalog/input-tips.js +5 -0
  249. package/dist/modes/interactive/tips/catalog/input-tips.js.map +1 -1
  250. package/dist/modes/interactive/tui-renderer.d.ts +21 -0
  251. package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
  252. package/dist/modes/interactive/tui-renderer.js +67 -0
  253. package/dist/modes/interactive/tui-renderer.js.map +1 -0
  254. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  255. package/dist/modes/rpc/connection-handler.js +8 -2
  256. package/dist/modes/rpc/connection-handler.js.map +1 -1
  257. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  258. package/dist/modes/rpc/rpc-client.js +11 -1
  259. package/dist/modes/rpc/rpc-client.js.map +1 -1
  260. package/dist/modes/rpc/rpc-types.d.ts +2 -1
  261. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  262. package/dist/modes/rpc/rpc-types.js +1 -0
  263. package/dist/modes/rpc/rpc-types.js.map +1 -1
  264. package/dist/modes/rpc/session-path-reservations.d.ts +30 -0
  265. package/dist/modes/rpc/session-path-reservations.d.ts.map +1 -0
  266. package/dist/modes/rpc/session-path-reservations.js +58 -0
  267. package/dist/modes/rpc/session-path-reservations.js.map +1 -0
  268. package/dist/modes/rpc/session-registry.d.ts +3 -1
  269. package/dist/modes/rpc/session-registry.d.ts.map +1 -1
  270. package/dist/modes/rpc/session-registry.js.map +1 -1
  271. package/dist/modes/rpc/session-worker-client.d.ts +10 -8
  272. package/dist/modes/rpc/session-worker-client.d.ts.map +1 -1
  273. package/dist/modes/rpc/session-worker-client.js +14 -23
  274. package/dist/modes/rpc/session-worker-client.js.map +1 -1
  275. package/dist/modes/rpc/session-worker-credit.d.ts +17 -0
  276. package/dist/modes/rpc/session-worker-credit.d.ts.map +1 -0
  277. package/dist/modes/rpc/session-worker-credit.js +39 -0
  278. package/dist/modes/rpc/session-worker-credit.js.map +1 -0
  279. package/dist/modes/rpc/session-worker-protocol.d.ts +10 -0
  280. package/dist/modes/rpc/session-worker-protocol.d.ts.map +1 -1
  281. package/dist/modes/rpc/session-worker-protocol.js +2 -0
  282. package/dist/modes/rpc/session-worker-protocol.js.map +1 -1
  283. package/dist/modes/rpc/session-worker-signals.d.ts +7 -0
  284. package/dist/modes/rpc/session-worker-signals.d.ts.map +1 -0
  285. package/dist/modes/rpc/session-worker-signals.js +19 -0
  286. package/dist/modes/rpc/session-worker-signals.js.map +1 -0
  287. package/dist/modes/rpc/session-worker.js +12 -16
  288. package/dist/modes/rpc/session-worker.js.map +1 -1
  289. package/dist/modes/rpc/worker-session-registry.d.ts +12 -0
  290. package/dist/modes/rpc/worker-session-registry.d.ts.map +1 -1
  291. package/dist/modes/rpc/worker-session-registry.js +51 -24
  292. package/dist/modes/rpc/worker-session-registry.js.map +1 -1
  293. package/dist/senpi +3 -0
  294. package/dist/utils/clipboard-command.d.ts +7 -0
  295. package/dist/utils/clipboard-command.d.ts.map +1 -0
  296. package/dist/utils/clipboard-command.js +45 -0
  297. package/dist/utils/clipboard-command.js.map +1 -0
  298. package/dist/utils/clipboard-image.d.ts.map +1 -1
  299. package/dist/utils/clipboard-image.js +52 -69
  300. package/dist/utils/clipboard-image.js.map +1 -1
  301. package/dist/utils/clipboard.d.ts.map +1 -1
  302. package/dist/utils/clipboard.js +49 -126
  303. package/dist/utils/clipboard.js.map +1 -1
  304. package/dist/utils/exif-orientation.d.ts.map +1 -1
  305. package/dist/utils/exif-orientation.js +2 -3
  306. package/dist/utils/exif-orientation.js.map +1 -1
  307. package/dist/utils/tools-manager.d.ts +1 -0
  308. package/dist/utils/tools-manager.d.ts.map +1 -1
  309. package/dist/utils/tools-manager.js +41 -19
  310. package/dist/utils/tools-manager.js.map +1 -1
  311. package/docs/compaction.md +39 -13
  312. package/docs/containerization.md +45 -0
  313. package/docs/development.md +19 -0
  314. package/docs/docs.json +4 -0
  315. package/docs/environment-variables.md +2 -0
  316. package/docs/extensions.md +21 -10
  317. package/docs/keybindings.md +7 -2
  318. package/docs/models.md +1 -1
  319. package/docs/providers.md +1 -1
  320. package/docs/rpc.md +16 -8
  321. package/docs/sdk.md +7 -0
  322. package/docs/session-format.md +52 -38
  323. package/docs/settings.md +40 -4
  324. package/docs/skills.md +1 -1
  325. package/docs/termux.md +0 -1
  326. package/docs/themes.md +8 -6
  327. package/docs/tui.md +22 -3
  328. package/examples/README.md +3 -0
  329. package/examples/extensions/dynamic-resources/dynamic.json +2 -0
  330. package/examples/plugins/pi-example-plugin/README.md +38 -0
  331. package/examples/plugins/pi-example-plugin/package.json +10 -0
  332. package/examples/plugins/pi-example-plugin/src/contract.ts +13 -0
  333. package/examples/plugins/pi-example-plugin/src/session.ts +23 -0
  334. package/examples/plugins/pi-example-plugin/src/tui.ts +31 -0
  335. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -1
  336. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +3 -3
  337. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
  338. package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
  339. package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
  340. package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
  341. package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
  342. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
  343. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
  344. package/node_modules/@aws-sdk/core/package.json +1 -1
  345. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  346. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  347. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  348. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  349. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +2 -0
  350. package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +2 -0
  351. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  352. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  353. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +201 -0
  354. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +62 -0
  355. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +158 -0
  356. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +2 -0
  357. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +16 -0
  358. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +84 -0
  359. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +8 -0
  360. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +11 -0
  361. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +10 -0
  362. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +4 -0
  363. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +5 -0
  364. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +7 -0
  365. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +7 -0
  366. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +8 -0
  367. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts +8 -0
  368. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromEnvSigningName.d.ts +18 -0
  369. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +12 -0
  370. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +9 -0
  371. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +8 -0
  372. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +7 -0
  373. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts +7 -0
  374. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts +18 -0
  375. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts +3 -0
  376. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromEnvSigningName.d.ts +8 -0
  377. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +10 -0
  378. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts +5 -0
  379. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +9 -0
  380. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +7 -0
  381. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts +7 -0
  382. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts +3 -0
  383. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts +2 -0
  384. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts +1 -0
  385. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts +2 -0
  386. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts +5 -0
  387. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts +4 -0
  388. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts +5 -0
  389. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +69 -0
  390. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  391. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  392. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  393. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  394. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  395. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  396. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  397. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  398. package/node_modules/@aws-sdk/token-providers/package.json +1 -1
  399. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +36 -0
  400. package/node_modules/@code-yeongyu/senpi-codemode/package.json +5 -5
  401. package/node_modules/@earendil-works/chord/README.md +205 -0
  402. package/node_modules/@earendil-works/chord/dist/api.d.ts +15 -0
  403. package/node_modules/@earendil-works/chord/dist/api.d.ts.map +1 -0
  404. package/node_modules/@earendil-works/chord/dist/api.js +72 -0
  405. package/node_modules/@earendil-works/chord/dist/api.js.map +1 -0
  406. package/node_modules/@earendil-works/chord/dist/bundler.d.ts +6 -0
  407. package/node_modules/@earendil-works/chord/dist/bundler.d.ts.map +1 -0
  408. package/node_modules/@earendil-works/chord/dist/bundler.js +3 -0
  409. package/node_modules/@earendil-works/chord/dist/bundler.js.map +1 -0
  410. package/node_modules/@earendil-works/chord/dist/context/index.d.ts +24 -0
  411. package/node_modules/@earendil-works/chord/dist/context/index.d.ts.map +1 -0
  412. package/node_modules/@earendil-works/chord/dist/context/index.js +97 -0
  413. package/node_modules/@earendil-works/chord/dist/context/index.js.map +1 -0
  414. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts +119 -0
  415. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts.map +1 -0
  416. package/node_modules/@earendil-works/chord/dist/delta/index.js +1209 -0
  417. package/node_modules/@earendil-works/chord/dist/delta/index.js.map +1 -0
  418. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts +12 -0
  419. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts.map +1 -0
  420. package/node_modules/@earendil-works/chord/dist/facets/host.js +762 -0
  421. package/node_modules/@earendil-works/chord/dist/facets/host.js.map +1 -0
  422. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts +3 -0
  423. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts.map +1 -0
  424. package/node_modules/@earendil-works/chord/dist/facets/loader.js +5 -0
  425. package/node_modules/@earendil-works/chord/dist/facets/loader.js.map +1 -0
  426. package/node_modules/@earendil-works/chord/dist/index.d.ts +11 -0
  427. package/node_modules/@earendil-works/chord/dist/index.d.ts.map +1 -0
  428. package/node_modules/@earendil-works/chord/dist/index.js +10 -0
  429. package/node_modules/@earendil-works/chord/dist/index.js.map +1 -0
  430. package/node_modules/@earendil-works/chord/dist/json.d.ts +4 -0
  431. package/node_modules/@earendil-works/chord/dist/json.d.ts.map +1 -0
  432. package/node_modules/@earendil-works/chord/dist/json.js +57 -0
  433. package/node_modules/@earendil-works/chord/dist/json.js.map +1 -0
  434. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts +30 -0
  435. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts.map +1 -0
  436. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js +377 -0
  437. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js.map +1 -0
  438. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts +26 -0
  439. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts.map +1 -0
  440. package/node_modules/@earendil-works/chord/dist/node/bundle.js +183 -0
  441. package/node_modules/@earendil-works/chord/dist/node/bundle.js.map +1 -0
  442. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts +36 -0
  443. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts.map +1 -0
  444. package/node_modules/@earendil-works/chord/dist/node/manifest.js +6 -0
  445. package/node_modules/@earendil-works/chord/dist/node/manifest.js.map +1 -0
  446. package/node_modules/@earendil-works/chord/dist/node/package.d.ts +15 -0
  447. package/node_modules/@earendil-works/chord/dist/node/package.d.ts.map +1 -0
  448. package/node_modules/@earendil-works/chord/dist/node/package.js +199 -0
  449. package/node_modules/@earendil-works/chord/dist/node/package.js.map +1 -0
  450. package/node_modules/@earendil-works/chord/dist/node.d.ts +5 -0
  451. package/node_modules/@earendil-works/chord/dist/node.d.ts.map +1 -0
  452. package/node_modules/@earendil-works/chord/dist/node.js +3 -0
  453. package/node_modules/@earendil-works/chord/dist/node.js.map +1 -0
  454. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts +11 -0
  455. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts.map +1 -0
  456. package/node_modules/@earendil-works/chord/dist/services/consumer.js +535 -0
  457. package/node_modules/@earendil-works/chord/dist/services/consumer.js.map +1 -0
  458. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts +8 -0
  459. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts.map +1 -0
  460. package/node_modules/@earendil-works/chord/dist/services/errors.js +21 -0
  461. package/node_modules/@earendil-works/chord/dist/services/errors.js.map +1 -0
  462. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts +15 -0
  463. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts.map +1 -0
  464. package/node_modules/@earendil-works/chord/dist/services/handle.js +99 -0
  465. package/node_modules/@earendil-works/chord/dist/services/handle.js.map +1 -0
  466. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts +25 -0
  467. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts.map +1 -0
  468. package/node_modules/@earendil-works/chord/dist/services/instances.js +137 -0
  469. package/node_modules/@earendil-works/chord/dist/services/instances.js.map +1 -0
  470. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts +5 -0
  471. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts.map +1 -0
  472. package/node_modules/@earendil-works/chord/dist/services/loopback.js +15 -0
  473. package/node_modules/@earendil-works/chord/dist/services/loopback.js.map +1 -0
  474. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts +37 -0
  475. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts.map +1 -0
  476. package/node_modules/@earendil-works/chord/dist/services/provider.js +472 -0
  477. package/node_modules/@earendil-works/chord/dist/services/provider.js.map +1 -0
  478. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +15 -0
  479. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts.map +1 -0
  480. package/node_modules/@earendil-works/chord/dist/services/state-codec.js +115 -0
  481. package/node_modules/@earendil-works/chord/dist/services/state-codec.js.map +1 -0
  482. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts +11 -0
  483. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts.map +1 -0
  484. package/node_modules/@earendil-works/chord/dist/services/state-internals.js +10 -0
  485. package/node_modules/@earendil-works/chord/dist/services/state-internals.js.map +1 -0
  486. package/node_modules/@earendil-works/chord/dist/services/state.d.ts +23 -0
  487. package/node_modules/@earendil-works/chord/dist/services/state.d.ts.map +1 -0
  488. package/node_modules/@earendil-works/chord/dist/services/state.js +124 -0
  489. package/node_modules/@earendil-works/chord/dist/services/state.js.map +1 -0
  490. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts +60 -0
  491. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts.map +1 -0
  492. package/node_modules/@earendil-works/chord/dist/services/wire.js +173 -0
  493. package/node_modules/@earendil-works/chord/dist/services/wire.js.map +1 -0
  494. package/node_modules/@earendil-works/chord/dist/types.d.ts +203 -0
  495. package/node_modules/@earendil-works/chord/dist/types.d.ts.map +1 -0
  496. package/node_modules/@earendil-works/chord/dist/types.js +2 -0
  497. package/node_modules/@earendil-works/chord/dist/types.js.map +1 -0
  498. package/node_modules/@earendil-works/chord/package.json +73 -0
  499. package/node_modules/@earendil-works/pi-agent-core/README.md +4 -0
  500. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +639 -384
  501. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
  502. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +5 -250
  503. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
  504. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts +12 -6
  505. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
  506. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +33 -27
  507. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
  508. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +30 -8
  509. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  510. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +53 -64
  511. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  512. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts +9 -0
  513. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts.map +1 -0
  514. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js +35 -0
  515. package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js.map +1 -0
  516. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts +9 -0
  517. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts.map +1 -0
  518. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js +13 -0
  519. package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js.map +1 -0
  520. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +25 -28
  521. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
  522. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +368 -125
  523. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
  524. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +20 -38
  525. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +1 -1
  526. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +233 -55
  527. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js.map +1 -1
  528. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts +42 -0
  529. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts.map +1 -0
  530. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js +82 -0
  531. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js.map +1 -0
  532. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts +22 -0
  533. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts.map +1 -0
  534. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js +48 -0
  535. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js.map +1 -0
  536. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts +67 -0
  537. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts.map +1 -0
  538. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js +121 -0
  539. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js.map +1 -0
  540. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts +38 -0
  541. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts.map +1 -0
  542. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js +404 -0
  543. package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js.map +1 -0
  544. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts +2 -2
  545. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -1
  546. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
  547. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts +3 -2
  548. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -1
  549. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +17 -17
  550. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
  551. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts +93 -0
  552. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts.map +1 -1
  553. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js +39 -0
  554. package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js.map +1 -1
  555. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts +28 -0
  556. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts.map +1 -0
  557. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js +173 -0
  558. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js.map +1 -0
  559. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts +8 -0
  560. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts.map +1 -0
  561. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js +133 -0
  562. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js.map +1 -0
  563. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts +15 -0
  564. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts.map +1 -0
  565. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js +179 -0
  566. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js.map +1 -0
  567. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts +8 -0
  568. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts.map +1 -0
  569. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js +205 -0
  570. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js.map +1 -0
  571. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts +5 -0
  572. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts.map +1 -0
  573. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js +140 -0
  574. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js.map +1 -0
  575. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts +8 -0
  576. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts.map +1 -0
  577. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js +85 -0
  578. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js.map +1 -0
  579. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts +23 -0
  580. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts.map +1 -0
  581. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js +394 -0
  582. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js.map +1 -0
  583. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts +4 -0
  584. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts.map +1 -0
  585. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js +34 -0
  586. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js.map +1 -0
  587. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts +32 -0
  588. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts.map +1 -0
  589. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js +929 -0
  590. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js.map +1 -0
  591. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts +7 -0
  592. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts.map +1 -0
  593. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js +49 -0
  594. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js.map +1 -0
  595. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts +14 -0
  596. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts.map +1 -0
  597. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js +244 -0
  598. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js.map +1 -0
  599. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts +6 -0
  600. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts.map +1 -0
  601. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js +449 -0
  602. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js.map +1 -0
  603. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts +6 -0
  604. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts.map +1 -0
  605. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js +93 -0
  606. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js.map +1 -0
  607. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts +59 -0
  608. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts.map +1 -0
  609. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js +302 -0
  610. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js.map +1 -0
  611. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts +2 -0
  612. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts.map +1 -0
  613. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js +2 -0
  614. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js.map +1 -0
  615. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts +118 -0
  616. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts.map +1 -0
  617. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js +1559 -0
  618. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js.map +1 -0
  619. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts +15 -0
  620. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts.map +1 -0
  621. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js +66 -0
  622. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js.map +1 -0
  623. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts +5 -0
  624. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts.map +1 -0
  625. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js +240 -0
  626. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js.map +1 -0
  627. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts +24 -0
  628. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts.map +1 -0
  629. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js +117 -0
  630. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js.map +1 -0
  631. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts +21 -0
  632. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts.map +1 -0
  633. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js +72 -0
  634. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js.map +1 -0
  635. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts +105 -0
  636. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts.map +1 -0
  637. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js +50 -0
  638. package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js.map +1 -0
  639. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts +53 -0
  640. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts.map +1 -0
  641. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js +57 -0
  642. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js.map +1 -0
  643. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts +6 -19
  644. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts.map +1 -1
  645. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js +31 -53
  646. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js.map +1 -1
  647. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts +21 -0
  648. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts.map +1 -0
  649. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js +55 -0
  650. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js.map +1 -0
  651. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +16 -0
  652. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +1 -0
  653. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +79 -0
  654. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +1 -0
  655. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts +39 -0
  656. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts.map +1 -0
  657. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js +269 -0
  658. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js.map +1 -0
  659. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts +9 -5
  660. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts.map +1 -1
  661. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js +7 -4
  662. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js.map +1 -1
  663. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts +19 -8
  664. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts.map +1 -1
  665. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +34 -219
  666. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js.map +1 -1
  667. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts +38 -0
  668. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts.map +1 -0
  669. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js +266 -0
  670. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js.map +1 -0
  671. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts +4 -0
  672. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts.map +1 -0
  673. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js +4 -0
  674. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js.map +1 -0
  675. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts +14 -0
  676. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts.map +1 -0
  677. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js +86 -0
  678. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js.map +1 -0
  679. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts +44 -0
  680. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts.map +1 -0
  681. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js +454 -0
  682. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js.map +1 -0
  683. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +27 -24
  684. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +1 -1
  685. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +276 -151
  686. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +1 -1
  687. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +39 -41
  688. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +1 -1
  689. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +175 -196
  690. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +1 -1
  691. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +23 -22
  692. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts.map +1 -1
  693. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js +2 -1
  694. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js.map +1 -1
  695. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +44 -40
  696. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +1 -1
  697. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js +333 -115
  698. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +1 -1
  699. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts +8 -0
  700. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts.map +1 -0
  701. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js +22 -0
  702. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js.map +1 -0
  703. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +78 -51
  704. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
  705. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +327 -207
  706. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
  707. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts +12 -0
  708. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts.map +1 -0
  709. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js +24 -0
  710. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js.map +1 -0
  711. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts +42 -0
  712. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts.map +1 -0
  713. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js +127 -0
  714. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js.map +1 -0
  715. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts +25 -0
  716. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts.map +1 -0
  717. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js +114 -0
  718. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js.map +1 -0
  719. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts +23 -0
  720. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts.map +1 -0
  721. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js +809 -0
  722. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js.map +1 -0
  723. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts +4 -0
  724. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts.map +1 -0
  725. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js +600 -0
  726. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js.map +1 -0
  727. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts +26 -0
  728. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts.map +1 -0
  729. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js +103 -0
  730. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js.map +1 -0
  731. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts +9 -2
  732. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts.map +1 -1
  733. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js +8 -1
  734. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js.map +1 -1
  735. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts +11 -0
  736. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts.map +1 -0
  737. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js +19 -0
  738. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js.map +1 -0
  739. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts +20 -0
  740. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts.map +1 -0
  741. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js +40 -0
  742. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js.map +1 -0
  743. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts +5 -7
  744. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts.map +1 -1
  745. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js.map +1 -1
  746. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +425 -265
  747. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +1 -1
  748. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js +7 -7
  749. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js.map +1 -1
  750. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts +95 -0
  751. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts.map +1 -0
  752. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js +81 -0
  753. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js.map +1 -0
  754. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +3 -2
  755. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
  756. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +29 -26
  757. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
  758. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts +64 -43
  759. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts.map +1 -1
  760. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js +45 -26
  761. package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js.map +1 -1
  762. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts +4 -4
  763. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts.map +1 -1
  764. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +66 -93
  765. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js.map +1 -1
  766. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts.map +1 -1
  767. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +17 -13
  768. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js.map +1 -1
  769. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts +2 -1
  770. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts.map +1 -1
  771. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +5 -5
  772. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js.map +1 -1
  773. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts +3 -2
  774. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts.map +1 -1
  775. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +5 -5
  776. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js.map +1 -1
  777. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts +2 -1
  778. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts.map +1 -1
  779. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +4 -6
  780. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js.map +1 -1
  781. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.d.ts.map +1 -1
  782. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +12 -8
  783. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js.map +1 -1
  784. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +128 -45
  785. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  786. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  787. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts +24 -0
  788. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts.map +1 -0
  789. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js +79 -0
  790. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js.map +1 -0
  791. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts +31 -0
  792. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts.map +1 -0
  793. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js +217 -0
  794. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js.map +1 -0
  795. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +19 -5
  796. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
  797. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +65 -192
  798. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
  799. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts +1 -0
  800. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
  801. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +1 -1
  802. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
  803. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts +4 -0
  804. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts.map +1 -0
  805. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js +33 -0
  806. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js.map +1 -0
  807. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +4 -1
  808. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
  809. package/node_modules/@earendil-works/pi-agent-core/dist/index.js +3 -6
  810. package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
  811. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +24 -16
  812. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts.map +1 -1
  813. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +1 -1
  814. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js.map +1 -1
  815. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +2 -0
  816. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  817. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  818. package/node_modules/@earendil-works/pi-agent-core/package.json +27 -6
  819. package/node_modules/@earendil-works/pi-ai/README.md +39 -4
  820. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  821. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +8 -1
  822. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  823. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts +77 -0
  824. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts.map +1 -0
  825. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js +72 -0
  826. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js.map +1 -0
  827. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts +11 -0
  828. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts.map +1 -1
  829. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js +18 -0
  830. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js.map +1 -1
  831. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +1 -1
  832. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
  833. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +5 -1
  834. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
  835. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.d.ts +2 -0
  836. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.d.ts.map +1 -1
  837. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.js +96 -51
  838. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.js.map +1 -1
  839. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.d.ts +389 -1
  840. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.d.ts.map +1 -1
  841. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.js +132 -4
  842. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.js.map +1 -1
  843. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.d.ts +34 -4
  844. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.d.ts.map +1 -1
  845. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.js +41 -8
  846. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.js.map +1 -1
  847. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.d.ts +20 -0
  848. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.d.ts.map +1 -1
  849. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.js +20 -0
  850. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.js.map +1 -1
  851. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.d.ts +18 -6
  852. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.d.ts.map +1 -1
  853. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.js +77 -35
  854. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.js.map +1 -1
  855. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.d.ts +9 -3
  856. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.d.ts.map +1 -1
  857. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.js +30 -38
  858. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.js.map +1 -1
  859. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.d.ts +16 -0
  860. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.d.ts.map +1 -0
  861. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.js +69 -0
  862. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.js.map +1 -0
  863. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.d.ts +26 -0
  864. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.d.ts.map +1 -0
  865. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.js +61 -0
  866. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.js.map +1 -0
  867. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.d.ts +6 -4
  868. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.d.ts.map +1 -1
  869. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.js +6 -4
  870. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.js.map +1 -1
  871. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.d.ts +13 -5
  872. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.d.ts.map +1 -1
  873. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.js +76 -21
  874. package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.js.map +1 -1
  875. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +4 -1
  876. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  877. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  878. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +6 -3
  879. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  880. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
  881. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +4 -1
  882. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
  883. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  884. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +13 -3
  885. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  886. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.d.ts +5 -0
  887. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.d.ts.map +1 -1
  888. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.js +7 -2
  889. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.js.map +1 -1
  890. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts +32 -0
  891. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts.map +1 -0
  892. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js +62 -0
  893. package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js.map +1 -0
  894. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.d.ts.map +1 -1
  895. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js +2 -1
  896. package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js.map +1 -1
  897. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +2 -1
  898. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  899. package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -1
  900. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  901. package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +11 -1
  902. package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
  903. package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
  904. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +1 -0
  905. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  906. package/node_modules/@earendil-works/pi-ai/dist/models.js +5 -2
  907. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  908. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts +1 -1
  909. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts.map +1 -1
  910. package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.js.map +1 -1
  911. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts.map +1 -1
  912. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js +4 -0
  913. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js.map +1 -1
  914. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -1
  915. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +2 -1
  916. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -1
  917. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  918. package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  919. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
  920. package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  921. package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
  922. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  923. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  924. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  925. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  926. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  927. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
  928. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  929. package/node_modules/@earendil-works/pi-ai/dist/providers/data/venice.json +1 -1
  930. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  931. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
  932. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.d.ts.map +1 -1
  933. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.js +3 -3
  934. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.js.map +1 -1
  935. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.d.ts +4 -2
  936. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.d.ts.map +1 -1
  937. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.js +18 -9
  938. package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.js.map +1 -1
  939. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
  940. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  941. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.d.ts.map +1 -1
  942. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +4 -3
  943. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
  944. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts +4 -0
  945. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts.map +1 -0
  946. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js +22 -0
  947. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js.map +1 -0
  948. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.d.ts.map +1 -1
  949. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +5 -4
  950. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js.map +1 -1
  951. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +16 -6
  952. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  953. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  954. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts +77 -0
  955. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts.map +1 -0
  956. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +427 -0
  957. package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js.map +1 -0
  958. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts +12 -0
  959. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts.map +1 -0
  960. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js +93 -0
  961. package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js.map +1 -0
  962. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
  963. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +25 -5
  964. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
  965. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +1 -1
  966. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
  967. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +5 -1
  968. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
  969. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts +10 -1
  970. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts.map +1 -1
  971. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.js.map +1 -1
  972. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +13 -2
  973. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
  974. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +18 -7
  975. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
  976. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts +2 -2
  977. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts.map +1 -1
  978. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js +36 -31
  979. package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js.map +1 -1
  980. package/node_modules/@earendil-works/pi-ai/package.json +6 -6
  981. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  982. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  983. package/node_modules/@earendil-works/pi-tui/README.md +53 -4
  984. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts +21 -1
  985. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +1 -1
  986. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +199 -42
  987. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js.map +1 -1
  988. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +3 -1
  989. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
  990. package/node_modules/@earendil-works/pi-tui/dist/components/box.js +28 -0
  991. package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
  992. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
  993. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  994. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +98 -18
  995. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  996. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +12 -1
  997. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
  998. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +40 -6
  999. package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
  1000. package/node_modules/@earendil-works/pi-tui/dist/components/latex.d.ts.map +1 -1
  1001. package/node_modules/@earendil-works/pi-tui/dist/components/latex.js +7 -0
  1002. package/node_modules/@earendil-works/pi-tui/dist/components/latex.js.map +1 -1
  1003. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +3 -0
  1004. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
  1005. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +20 -8
  1006. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
  1007. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts +12 -0
  1008. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts.map +1 -0
  1009. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js +19 -0
  1010. package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js.map +1 -0
  1011. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +6 -3
  1012. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -1
  1013. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +6 -1
  1014. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -1
  1015. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +4 -1
  1016. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
  1017. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +48 -2
  1018. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
  1019. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +5 -1
  1020. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
  1021. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +54 -5
  1022. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
  1023. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +3 -1
  1024. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  1025. package/node_modules/@earendil-works/pi-tui/dist/index.js +3 -0
  1026. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  1027. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +3 -1
  1028. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -1
  1029. package/node_modules/@earendil-works/pi-tui/dist/layout.js +32 -9
  1030. package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -1
  1031. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +2 -1
  1032. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
  1033. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +3 -44
  1034. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
  1035. package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts +18 -0
  1036. package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts.map +1 -0
  1037. package/node_modules/@earendil-works/pi-tui/dist/native-platform.js +42 -0
  1038. package/node_modules/@earendil-works/pi-tui/dist/native-platform.js.map +1 -0
  1039. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  1040. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +2 -20
  1041. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  1042. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +31 -1
  1043. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
  1044. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +335 -41
  1045. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
  1046. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +83 -5
  1047. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  1048. package/node_modules/@earendil-works/pi-tui/dist/tui.js +118 -4
  1049. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  1050. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +2 -0
  1051. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  1052. package/node_modules/@earendil-works/pi-tui/dist/utils.js +9 -0
  1053. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  1054. package/node_modules/@earendil-works/pi-tui/native/clipboard.h +170 -0
  1055. package/node_modules/@earendil-works/pi-tui/native/darwin/README.md +8 -6
  1056. package/node_modules/@earendil-works/pi-tui/native/darwin/build.sh +12 -5
  1057. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/{darwin-modifiers.node → darwin-platform.node} +0 -0
  1058. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/{darwin-modifiers.node → darwin-platform.node} +0 -0
  1059. package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-platform.m +93 -0
  1060. package/node_modules/@earendil-works/pi-tui/native/linux/README.md +23 -0
  1061. package/node_modules/@earendil-works/pi-tui/native/linux/build.sh +65 -0
  1062. package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
  1063. package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
  1064. package/node_modules/@earendil-works/pi-tui/native/linux/src/clipboard-worker.h +70 -0
  1065. package/node_modules/@earendil-works/pi-tui/native/linux/src/linux-platform-x11.c +274 -0
  1066. package/node_modules/@earendil-works/pi-tui/native/napi.h +89 -0
  1067. package/node_modules/@earendil-works/pi-tui/native/win32/README.md +18 -7
  1068. package/node_modules/@earendil-works/pi-tui/native/win32/build.mjs +7 -4
  1069. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
  1070. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
  1071. package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-platform.c +241 -0
  1072. package/node_modules/@earendil-works/pi-tui/package.json +10 -3
  1073. package/node_modules/@google/genai/dist/genai.d.ts +1799 -289
  1074. package/node_modules/@google/genai/dist/index.cjs +319 -299
  1075. package/node_modules/@google/genai/dist/index.mjs +319 -299
  1076. package/node_modules/@google/genai/dist/index.mjs.map +1 -1
  1077. package/node_modules/@google/genai/dist/node/index.cjs +320 -300
  1078. package/node_modules/@google/genai/dist/node/index.mjs +320 -300
  1079. package/node_modules/@google/genai/dist/node/index.mjs.map +1 -1
  1080. package/node_modules/@google/genai/dist/node/node.d.ts +1799 -289
  1081. package/node_modules/@google/genai/dist/tokenizer/node.cjs +49 -2
  1082. package/node_modules/@google/genai/dist/tokenizer/node.d.ts +43 -3
  1083. package/node_modules/@google/genai/dist/tokenizer/node.mjs +49 -2
  1084. package/node_modules/@google/genai/dist/tokenizer/node.mjs.map +1 -1
  1085. package/node_modules/@google/genai/dist/vertex_internal/index.cjs +39 -3
  1086. package/node_modules/@google/genai/dist/vertex_internal/index.cjs.map +1 -1
  1087. package/node_modules/@google/genai/dist/vertex_internal/index.d.ts +51 -9
  1088. package/node_modules/@google/genai/dist/vertex_internal/index.js +39 -3
  1089. package/node_modules/@google/genai/dist/vertex_internal/index.js.map +1 -1
  1090. package/node_modules/@google/genai/dist/web/index.mjs +319 -299
  1091. package/node_modules/@google/genai/dist/web/index.mjs.map +1 -1
  1092. package/node_modules/@google/genai/dist/web/web.d.ts +1799 -289
  1093. package/node_modules/@google/genai/package.json +1 -1
  1094. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -4
  1095. package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +1 -0
  1096. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -3
  1097. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +8 -1
  1098. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/LICENSE +201 -0
  1099. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/README.md +115 -0
  1100. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/index.js +96 -0
  1101. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort-handler.js +1 -0
  1102. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort.js +1 -0
  1103. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +5 -0
  1104. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +1 -0
  1105. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +1 -0
  1106. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +1 -0
  1107. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +1 -0
  1108. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/auth.js +5 -0
  1109. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/index.js +2 -0
  1110. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +1 -0
  1111. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/checksum.js +1 -0
  1112. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/client.js +1 -0
  1113. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/command.js +1 -0
  1114. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/config.js +1 -0
  1115. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/index.js +1 -0
  1116. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/manager.js +1 -0
  1117. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/pool.js +1 -0
  1118. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/crypto.js +1 -0
  1119. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js +1 -0
  1120. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/encode.js +1 -0
  1121. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoint.js +5 -0
  1122. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointParameterInstructions.js +1 -0
  1123. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +1 -0
  1124. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +1 -0
  1125. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +1 -0
  1126. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +1 -0
  1127. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/index.js +1 -0
  1128. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/shared.js +1 -0
  1129. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/eventStream.js +1 -0
  1130. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/checksum.js +38 -0
  1131. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +7 -0
  1132. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +1 -0
  1133. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/index.js +2 -0
  1134. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/retry.js +1 -0
  1135. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js +1 -0
  1136. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/feature-ids.js +1 -0
  1137. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +1 -0
  1138. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http.js +5 -0
  1139. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +1 -0
  1140. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +1 -0
  1141. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/identity.js +1 -0
  1142. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/index.js +1 -0
  1143. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +1 -0
  1144. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/index.js +7 -0
  1145. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/logger.js +1 -0
  1146. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/metrics.js +1 -0
  1147. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/middleware.js +1 -0
  1148. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/pagination.js +1 -0
  1149. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/profile.js +6 -0
  1150. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/response.js +1 -0
  1151. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/retry.js +1 -0
  1152. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +1 -0
  1153. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema.js +1 -0
  1154. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/sentinels.js +1 -0
  1155. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/static-schemas.js +1 -0
  1156. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/traits.js +1 -0
  1157. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/serde.js +1 -0
  1158. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/shapes.js +1 -0
  1159. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/signature.js +1 -0
  1160. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/stream.js +1 -0
  1161. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +1 -0
  1162. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +1 -0
  1163. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +1 -0
  1164. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transfer.js +6 -0
  1165. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js +1 -0
  1166. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +1 -0
  1167. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/exact.js +1 -0
  1168. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/mutable.js +1 -0
  1169. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/no-undefined.js +1 -0
  1170. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/type-transform.js +1 -0
  1171. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/uri.js +1 -0
  1172. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/util.js +1 -0
  1173. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/waiter.js +1 -0
  1174. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort-handler.d.ts +7 -0
  1175. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort.d.ts +48 -0
  1176. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +7 -0
  1177. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +49 -0
  1178. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +20 -0
  1179. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +41 -0
  1180. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +14 -0
  1181. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/auth.d.ts +59 -0
  1182. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/index.d.ts +7 -0
  1183. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +37 -0
  1184. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/checksum.d.ts +61 -0
  1185. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/client.d.ts +57 -0
  1186. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/command.d.ts +28 -0
  1187. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/config.d.ts +15 -0
  1188. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/index.d.ts +3 -0
  1189. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/manager.d.ts +34 -0
  1190. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/pool.d.ts +32 -0
  1191. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/crypto.d.ts +58 -0
  1192. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +24 -0
  1193. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/encode.d.ts +31 -0
  1194. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoint.d.ts +77 -0
  1195. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointParameterInstructions.d.ts +41 -0
  1196. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +27 -0
  1197. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +10 -0
  1198. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +28 -0
  1199. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +16 -0
  1200. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +5 -0
  1201. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +55 -0
  1202. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/eventStream.d.ts +137 -0
  1203. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +58 -0
  1204. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts +32 -0
  1205. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts +9 -0
  1206. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/index.d.ts +6 -0
  1207. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/retry.d.ts +18 -0
  1208. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts +35 -0
  1209. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/feature-ids.d.ts +16 -0
  1210. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +142 -0
  1211. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http.d.ts +110 -0
  1212. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +14 -0
  1213. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +31 -0
  1214. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/identity.d.ts +15 -0
  1215. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/index.d.ts +4 -0
  1216. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +14 -0
  1217. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/index.d.ts +52 -0
  1218. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/logger.d.ts +13 -0
  1219. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/metrics.d.ts +93 -0
  1220. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/middleware.d.ts +541 -0
  1221. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/pagination.d.ts +33 -0
  1222. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/profile.d.ts +30 -0
  1223. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/response.d.ts +40 -0
  1224. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/retry.d.ts +162 -0
  1225. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +143 -0
  1226. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema.d.ts +236 -0
  1227. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +65 -0
  1228. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +99 -0
  1229. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/traits.d.ts +46 -0
  1230. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/serde.d.ts +114 -0
  1231. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/shapes.d.ts +79 -0
  1232. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/signature.d.ts +172 -0
  1233. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/stream.d.ts +22 -0
  1234. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts +28 -0
  1235. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +54 -0
  1236. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +41 -0
  1237. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transfer.d.ts +42 -0
  1238. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +26 -0
  1239. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +73 -0
  1240. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/exact.d.ts +6 -0
  1241. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/mutable.d.ts +6 -0
  1242. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +68 -0
  1243. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts +39 -0
  1244. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +7 -0
  1245. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +45 -0
  1246. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +7 -0
  1247. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +49 -0
  1248. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +20 -0
  1249. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +41 -0
  1250. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +14 -0
  1251. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts +59 -0
  1252. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +7 -0
  1253. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +37 -0
  1254. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts +61 -0
  1255. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +57 -0
  1256. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +28 -0
  1257. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +15 -0
  1258. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts +3 -0
  1259. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +34 -0
  1260. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +32 -0
  1261. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts +58 -0
  1262. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +40 -0
  1263. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +31 -0
  1264. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +77 -0
  1265. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointParameterInstructions.d.ts +41 -0
  1266. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +27 -0
  1267. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +10 -0
  1268. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +28 -0
  1269. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +16 -0
  1270. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts +5 -0
  1271. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +55 -0
  1272. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +137 -0
  1273. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +58 -0
  1274. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +32 -0
  1275. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +9 -0
  1276. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts +6 -0
  1277. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts +18 -0
  1278. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +35 -0
  1279. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +16 -0
  1280. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +142 -0
  1281. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +110 -0
  1282. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +14 -0
  1283. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +31 -0
  1284. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts +15 -0
  1285. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +4 -0
  1286. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +14 -0
  1287. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +52 -0
  1288. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts +13 -0
  1289. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/metrics.d.ts +93 -0
  1290. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +541 -0
  1291. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts +33 -0
  1292. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +30 -0
  1293. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts +40 -0
  1294. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts +162 -0
  1295. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +149 -0
  1296. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +251 -0
  1297. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/sentinels.d.ts +65 -0
  1298. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +118 -0
  1299. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/traits.d.ts +46 -0
  1300. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +114 -0
  1301. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +79 -0
  1302. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts +172 -0
  1303. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts +22 -0
  1304. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +28 -0
  1305. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +54 -0
  1306. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts +41 -0
  1307. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +42 -0
  1308. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +26 -0
  1309. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +77 -0
  1310. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts +14 -0
  1311. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/mutable.d.ts +6 -0
  1312. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +88 -0
  1313. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts +40 -0
  1314. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts +17 -0
  1315. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +192 -0
  1316. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +35 -0
  1317. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/uri.d.ts +17 -0
  1318. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/util.d.ts +176 -0
  1319. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/waiter.d.ts +35 -0
  1320. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/package.json +50 -0
  1321. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  1322. package/node_modules/esbuild/LICENSE.md +21 -0
  1323. package/node_modules/esbuild/README.md +3 -0
  1324. package/node_modules/esbuild/bin/esbuild +223 -0
  1325. package/node_modules/esbuild/install.js +300 -0
  1326. package/node_modules/esbuild/lib/main.d.ts +720 -0
  1327. package/node_modules/esbuild/lib/main.js +2536 -0
  1328. package/node_modules/esbuild/package.json +47 -0
  1329. package/node_modules/ignore/README.md +52 -0
  1330. package/node_modules/ignore/index.js +785 -129
  1331. package/node_modules/ignore/legacy.js +660 -98
  1332. package/node_modules/ignore/package.json +10 -4
  1333. package/node_modules/marked/README.md +1 -0
  1334. package/node_modules/marked/lib/marked.d.ts +7 -0
  1335. package/node_modules/marked/lib/marked.esm.js +30 -30
  1336. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  1337. package/node_modules/marked/lib/marked.umd.js +30 -30
  1338. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  1339. package/node_modules/marked/man/marked.1 +1 -1
  1340. package/node_modules/marked/package.json +2 -2
  1341. package/node_modules/typebox/build/compile/validator.d.mts +1 -1
  1342. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  1343. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
  1344. package/node_modules/typebox/build/format/iri.mjs +5 -1
  1345. package/node_modules/typebox/build/guard/emit.mjs +2 -4
  1346. package/node_modules/typebox/build/guard/guard.mjs +6 -18
  1347. package/node_modules/typebox/build/guard/string.mjs +16 -24
  1348. package/node_modules/typebox/build/schema/compile.d.mts +3 -2
  1349. package/node_modules/typebox/build/schema/compile.mjs +8 -8
  1350. package/node_modules/typebox/build/schema/engine/_context.d.mts +1 -6
  1351. package/node_modules/typebox/build/schema/engine/_context.mjs +9 -14
  1352. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  1353. package/node_modules/typebox/build/schema/engine/_stack.d.mts +6 -2
  1354. package/node_modules/typebox/build/schema/engine/_stack.mjs +135 -32
  1355. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +16 -4
  1356. package/node_modules/typebox/build/schema/engine/allOf.mjs +2 -2
  1357. package/node_modules/typebox/build/schema/engine/anyOf.mjs +2 -2
  1358. package/node_modules/typebox/build/schema/engine/if.mjs +2 -2
  1359. package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
  1360. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +1 -3
  1361. package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
  1362. package/node_modules/typebox/build/schema/engine/schema.mjs +6 -0
  1363. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
  1364. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
  1365. package/node_modules/typebox/build/schema/errors.d.mts +2 -2
  1366. package/node_modules/typebox/build/schema/errors.mjs +7 -13
  1367. package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
  1368. package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
  1369. package/node_modules/typebox/build/schema/intern/intern.d.mts +14 -0
  1370. package/node_modules/typebox/build/schema/intern/intern.mjs +259 -0
  1371. package/node_modules/typebox/build/schema/parse.d.mts +1 -0
  1372. package/node_modules/typebox/build/schema/parse.mjs +10 -5
  1373. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +34 -3
  1374. package/node_modules/typebox/build/schema/resolve/resolve.mjs +198 -73
  1375. package/node_modules/typebox/build/schema/schema.d.mts +1 -0
  1376. package/node_modules/typebox/build/schema/schema.mjs +1 -0
  1377. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
  1378. package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
  1379. package/node_modules/typebox/package.json +1 -1
  1380. package/node_modules/typebox/readme.md +9 -5
  1381. package/node_modules/undici/docs/docs/api/Client.md +4 -0
  1382. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
  1383. package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
  1384. package/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
  1385. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
  1386. package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
  1387. package/node_modules/undici/lib/core/symbols.js +2 -0
  1388. package/node_modules/undici/lib/dispatcher/agent.js +7 -2
  1389. package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
  1390. package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  1391. package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
  1392. package/node_modules/undici/lib/dispatcher/client.js +3 -2
  1393. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
  1394. package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
  1395. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
  1396. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
  1397. package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
  1398. package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
  1399. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  1400. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
  1401. package/node_modules/undici/lib/handler/cache-handler.js +29 -5
  1402. package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
  1403. package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
  1404. package/node_modules/undici/lib/handler/redirect-handler.js +21 -4
  1405. package/node_modules/undici/lib/handler/retry-handler.js +148 -30
  1406. package/node_modules/undici/lib/interceptor/cache.js +65 -12
  1407. package/node_modules/undici/lib/interceptor/decompress.js +115 -13
  1408. package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
  1409. package/node_modules/undici/lib/interceptor/dns.js +7 -0
  1410. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  1411. package/node_modules/undici/lib/mock/mock-agent.js +13 -1
  1412. package/node_modules/undici/lib/mock/mock-utils.js +11 -10
  1413. package/node_modules/undici/lib/util/cache.js +45 -3
  1414. package/node_modules/undici/lib/web/cookies/parse.js +150 -147
  1415. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
  1416. package/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
  1417. package/node_modules/undici/lib/web/fetch/index.js +6 -0
  1418. package/node_modules/undici/lib/web/fetch/request.js +2 -3
  1419. package/node_modules/undici/lib/web/fetch/util.js +6 -1
  1420. package/node_modules/undici/lib/web/webidl/index.js +3 -3
  1421. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  1422. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  1423. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  1424. package/node_modules/undici/package.json +3 -3
  1425. package/node_modules/undici/types/client.d.ts +10 -0
  1426. package/node_modules/undici/types/interceptors.d.ts +2 -0
  1427. package/node_modules/undici/types/mock-agent.d.ts +11 -10
  1428. package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -0
  1429. package/package.json +70 -49
  1430. package/vendor/pi-client/client.d.ts +20 -15
  1431. package/vendor/pi-client/client.d.ts.map +1 -1
  1432. package/vendor/pi-client/client.js +248 -245
  1433. package/vendor/pi-client/client.js.map +1 -1
  1434. package/vendor/pi-client/connection.d.ts +4 -3
  1435. package/vendor/pi-client/connection.d.ts.map +1 -1
  1436. package/vendor/pi-client/connection.js +13 -9
  1437. package/vendor/pi-client/connection.js.map +1 -1
  1438. package/vendor/pi-client/errors.d.ts +6 -15
  1439. package/vendor/pi-client/errors.d.ts.map +1 -1
  1440. package/vendor/pi-client/errors.js +10 -25
  1441. package/vendor/pi-client/errors.js.map +1 -1
  1442. package/vendor/pi-client/index.d.ts +3 -4
  1443. package/vendor/pi-client/index.d.ts.map +1 -1
  1444. package/vendor/pi-client/index.js +2 -2
  1445. package/vendor/pi-client/index.js.map +1 -1
  1446. package/vendor/pi-client/types.d.ts +14 -8
  1447. package/vendor/pi-client/types.d.ts.map +1 -1
  1448. package/vendor/pi-client/types.js.map +1 -1
  1449. package/vendor/pi-client/unix.d.ts +14 -1
  1450. package/vendor/pi-client/unix.d.ts.map +1 -1
  1451. package/vendor/pi-client/unix.js +138 -8
  1452. package/vendor/pi-client/unix.js.map +1 -1
  1453. package/vendor/pi-protocol/codec.d.ts +2 -4
  1454. package/vendor/pi-protocol/codec.d.ts.map +1 -1
  1455. package/vendor/pi-protocol/codec.js +7 -34
  1456. package/vendor/pi-protocol/codec.js.map +1 -1
  1457. package/vendor/pi-protocol/framing.d.ts +0 -2
  1458. package/vendor/pi-protocol/framing.d.ts.map +1 -1
  1459. package/vendor/pi-protocol/framing.js +0 -15
  1460. package/vendor/pi-protocol/framing.js.map +1 -1
  1461. package/vendor/pi-protocol/index.d.ts +1 -1
  1462. package/vendor/pi-protocol/index.d.ts.map +1 -1
  1463. package/vendor/pi-protocol/index.js +1 -1
  1464. package/vendor/pi-protocol/index.js.map +1 -1
  1465. package/vendor/pi-protocol/protocol.d.ts +167 -0
  1466. package/vendor/pi-protocol/protocol.d.ts.map +1 -0
  1467. package/vendor/pi-protocol/protocol.js +85 -0
  1468. package/vendor/pi-protocol/protocol.js.map +1 -0
  1469. package/dist/bun/register-bedrock.d.ts +0 -2
  1470. package/dist/bun/register-bedrock.d.ts.map +0 -1
  1471. package/dist/bun/register-bedrock.js +0 -4
  1472. package/dist/bun/register-bedrock.js.map +0 -1
  1473. package/dist/cli/experimental/auth.d.ts +0 -16
  1474. package/dist/cli/experimental/auth.d.ts.map +0 -1
  1475. package/dist/cli/experimental/auth.js +0 -13
  1476. package/dist/cli/experimental/auth.js.map +0 -1
  1477. package/dist/cli/experimental/cli.d.ts +0 -6
  1478. package/dist/cli/experimental/cli.d.ts.map +0 -1
  1479. package/dist/cli/experimental/cli.js +0 -5
  1480. package/dist/cli/experimental/cli.js.map +0 -1
  1481. package/dist/cli/experimental/command-options.d.ts +0 -17
  1482. package/dist/cli/experimental/command-options.d.ts.map +0 -1
  1483. package/dist/cli/experimental/command-options.js +0 -35
  1484. package/dist/cli/experimental/command-options.js.map +0 -1
  1485. package/dist/cli/experimental/command.d.ts +0 -63
  1486. package/dist/cli/experimental/command.d.ts.map +0 -1
  1487. package/dist/cli/experimental/command.js +0 -127
  1488. package/dist/cli/experimental/command.js.map +0 -1
  1489. package/dist/cli/experimental/commands/client.d.ts +0 -13
  1490. package/dist/cli/experimental/commands/client.d.ts.map +0 -1
  1491. package/dist/cli/experimental/commands/client.js +0 -25
  1492. package/dist/cli/experimental/commands/client.js.map +0 -1
  1493. package/dist/cli/experimental/commands/pi.d.ts +0 -15
  1494. package/dist/cli/experimental/commands/pi.d.ts.map +0 -1
  1495. package/dist/cli/experimental/commands/pi.js +0 -28
  1496. package/dist/cli/experimental/commands/pi.js.map +0 -1
  1497. package/dist/cli/experimental/commands/server.d.ts +0 -13
  1498. package/dist/cli/experimental/commands/server.d.ts.map +0 -1
  1499. package/dist/cli/experimental/commands/server.js +0 -25
  1500. package/dist/cli/experimental/commands/server.js.map +0 -1
  1501. package/dist/cli/experimental/transport-address.d.ts +0 -10
  1502. package/dist/cli/experimental/transport-address.d.ts.map +0 -1
  1503. package/dist/cli/experimental/transport-address.js +0 -38
  1504. package/dist/cli/experimental/transport-address.js.map +0 -1
  1505. package/dist/client/remote-session.d.ts +0 -53
  1506. package/dist/client/remote-session.d.ts.map +0 -1
  1507. package/dist/client/remote-session.js +0 -340
  1508. package/dist/client/remote-session.js.map +0 -1
  1509. package/dist/client/transcript.d.ts +0 -12
  1510. package/dist/client/transcript.d.ts.map +0 -1
  1511. package/dist/client/transcript.js +0 -98
  1512. package/dist/client/transcript.js.map +0 -1
  1513. package/dist/server/create-harness.d.ts +0 -26
  1514. package/dist/server/create-harness.d.ts.map +0 -1
  1515. package/dist/server/create-harness.js +0 -106
  1516. package/dist/server/create-harness.js.map +0 -1
  1517. package/dist/utils/clipboard-native.d.ts +0 -11
  1518. package/dist/utils/clipboard-native.d.ts.map +0 -1
  1519. package/dist/utils/clipboard-native.js +0 -20
  1520. package/dist/utils/clipboard-native.js.map +0 -1
  1521. package/docs/AGENTS.md +0 -67
  1522. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts +0 -100
  1523. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts.map +0 -1
  1524. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +0 -420
  1525. package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js.map +0 -1
  1526. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts +0 -9
  1527. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +0 -1
  1528. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +0 -18
  1529. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js.map +0 -1
  1530. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts +0 -3
  1531. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts.map +0 -1
  1532. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +0 -2
  1533. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js.map +0 -1
  1534. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts +0 -65
  1535. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +0 -1
  1536. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +0 -320
  1537. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +0 -1
  1538. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts +0 -4
  1539. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts.map +0 -1
  1540. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +0 -762
  1541. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +0 -1
  1542. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts +0 -29
  1543. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts.map +0 -1
  1544. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +0 -103
  1545. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +0 -1
  1546. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts +0 -69
  1547. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts.map +0 -1
  1548. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +0 -159
  1549. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js.map +0 -1
  1550. package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-modifiers.c +0 -70
  1551. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
  1552. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
  1553. package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-console-mode.c +0 -119
  1554. package/node_modules/@mariozechner/clipboard/.yarnrc.yml +0 -1
  1555. package/node_modules/@mariozechner/clipboard/Cargo.toml +0 -45
  1556. package/node_modules/@mariozechner/clipboard/README.md +0 -60
  1557. package/node_modules/@mariozechner/clipboard/build.rs +0 -5
  1558. package/node_modules/@mariozechner/clipboard/exp.ts +0 -12
  1559. package/node_modules/@mariozechner/clipboard/index.d.ts +0 -37
  1560. package/node_modules/@mariozechner/clipboard/index.js +0 -606
  1561. package/node_modules/@mariozechner/clipboard/package.json +0 -45
  1562. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/common.rs +0 -307
  1563. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/mod.rs +0 -93
  1564. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/ios.rs +0 -313
  1565. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/macos.rs +0 -471
  1566. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/mod.rs +0 -252
  1567. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/wayland.rs +0 -431
  1568. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/win.rs +0 -712
  1569. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/x11.rs +0 -916
  1570. package/node_modules/@mariozechner/clipboard/src/lib.rs +0 -194
  1571. package/vendor/pi-client/session-handle.d.ts +0 -54
  1572. package/vendor/pi-client/session-handle.d.ts.map +0 -1
  1573. package/vendor/pi-client/session-handle.js +0 -50
  1574. package/vendor/pi-client/session-handle.js.map +0 -1
  1575. package/vendor/pi-client/state.d.ts +0 -22
  1576. package/vendor/pi-client/state.d.ts.map +0 -1
  1577. package/vendor/pi-client/state.js +0 -145
  1578. package/vendor/pi-client/state.js.map +0 -1
  1579. package/vendor/pi-protocol/schemas.d.ts +0 -13739
  1580. package/vendor/pi-protocol/schemas.d.ts.map +0 -1
  1581. package/vendor/pi-protocol/schemas.js +0 -386
  1582. package/vendor/pi-protocol/schemas.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/harness/session/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAqB/C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C,SAAS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ntryQuery,\n\tIdGenerator,\n\tLanePointer,\n\tLaneRecord,\n\tLogItem,\n\tLogOptions,\n\tNewRecord,\n\tOperationStartedRecord,\n\tProvisionedEntry,\n\tRecordBase,\n\tRecordQuery,\n\tSessionMetadata,\n\tSessionStats,\n\tSessionStorage,\n\tSessionTree,\n} from \"./types.ts\";\nimport { SessionError } from \"./types.ts\";\n\ntype JsonValidationFrame = { value: unknown } | { exit: object };\n\nfunction invalidPayload(reason: string): never {\n\tthrow new SessionError(\"invalid_payload\", `Durable payload ${reason}`);\n}\n\nfunction assertValidLimit(limit: number | undefined): void {\n\tif (limit !== undefined && (!Number.isInteger(limit) || limit <= 0)) {\n\t\tthrow new SessionError(\"invalid_query\", \"limit must be a positive integer\");\n\t}\n}\n\nfunction assertValidCursor(afterSeq: number | undefined): void {\n\tif (afterSeq !== undefined && (!Number.isInteger(afterSeq) || afterSeq < 0)) {\n\t\tthrow new SessionError(\"invalid_query\", \"cursor sequence must be a non-negative integer\");\n\t}\n}\n\nexport function assertJsonSerializable(value: unknown): void {\n\tconst active = new WeakSet<object>();\n\tconst stack: JsonValidationFrame[] = [{ value }];\n\twhile (stack.length > 0) {\n\t\tconst frame = stack.pop()!;\n\t\tif (\"exit\" in frame) {\n\t\t\tactive.delete(frame.exit);\n\t\t\tcontinue;\n\t\t}\n\t\tconst candidate = frame.value;\n\t\tif (candidate === null || typeof candidate === \"string\" || typeof candidate === \"boolean\") {\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof candidate === \"number\") {\n\t\t\tif (!Number.isFinite(candidate)) invalidPayload(\"contains a non-finite number\");\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof candidate !== \"object\") invalidPayload(`contains ${typeof candidate}`);\n\t\tif (active.has(candidate)) invalidPayload(\"contains a cycle\");\n\t\tactive.add(candidate);\n\t\tstack.push({ exit: candidate });\n\n\t\tif (Array.isArray(candidate)) {\n\t\t\tif (Object.getPrototypeOf(candidate) !== Array.prototype) {\n\t\t\t\tinvalidPayload(\"contains a non-standard array\");\n\t\t\t}\n\t\t\tif (\n\t\t\t\tObject.getOwnPropertySymbols(candidate).length > 0 ||\n\t\t\t\tObject.getOwnPropertyNames(candidate).length !== candidate.length + 1\n\t\t\t) {\n\t\t\t\tinvalidPayload(\"contains an array with unsupported properties\");\n\t\t\t}\n\t\t\tfor (let index = candidate.length - 1; index >= 0; index--) {\n\t\t\t\tif (!Object.hasOwn(candidate, index)) invalidPayload(\"contains a sparse array\");\n\t\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(candidate, index)!;\n\t\t\t\tif (!(\"value\" in descriptor)) invalidPayload(\"contains an array accessor\");\n\t\t\t\tstack.push({ value: descriptor.value });\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst prototype = Object.getPrototypeOf(candidate);\n\t\tif (prototype !== Object.prototype && prototype !== null) {\n\t\t\tinvalidPayload(\"contains a non-plain object\");\n\t\t}\n\t\tif (Object.getOwnPropertySymbols(candidate).length > 0) {\n\t\t\tinvalidPayload(\"contains a symbol-keyed property\");\n\t\t}\n\t\tconst keys = Object.keys(candidate);\n\t\tif (Object.getOwnPropertyNames(candidate).length !== keys.length) {\n\t\t\tinvalidPayload(\"contains a non-enumerable property\");\n\t\t}\n\t\tfor (let index = keys.length - 1; index >= 0; index--) {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(candidate, keys[index]!)!;\n\t\t\tif (!(\"value\" in descriptor)) invalidPayload(\"contains an accessor\");\n\t\t\tstack.push({ value: descriptor.value });\n\t\t}\n\t}\n}\n\nexport class Session<TMetadata extends SessionMetadata = SessionMetadata> implements SessionTree {\n\tprivate readonly storage: SessionStorage<TMetadata>;\n\treadonly idGenerator: IdGenerator;\n\n\tconstructor(storage: SessionStorage<TMetadata>, options: { idGenerator?: IdGenerator } = {}) {\n\t\tthis.storage = storage;\n\t\tthis.idGenerator = options.idGenerator ?? { next: () => uuidv7() };\n\t}\n\n\tasync getMetadata(): Promise<TMetadata> {\n\t\treturn this.storage.getMetadata();\n\t}\n\n\tview(lane: string): SessionTree {\n\t\tif (lane === \"main\") return this;\n\t\treturn {\n\t\t\tgetLeafId: () => this.getLeafIdForLane(lane),\n\t\t\tgetEntry: (id) => this.getEntry(id),\n\t\t\tgetStats: () => this.getStats(),\n\t\t\tgetName: () => this.getName(),\n\t\t\tsetName: (name) => this.setName(name),\n\t\t\tgetLabel: (targetId) => this.getLabel(targetId),\n\t\t\tsetLabel: (targetId, label) => this.setLabel(targetId, label),\n\t\t\tfindEntries: (query) => this.queryEntries(query),\n\t\t\tfindEntry: async (query = {}) => (await this.queryEntries(query, 1))[0],\n\t\t\tfindEntriesOnBranch: (query) => this.queryBranchEntries(lane, query),\n\t\t\tfindEntryOnBranch: async (query = {}) => (await this.queryBranchEntries(lane, query, 1))[0],\n\t\t\tappendMessage: (message) => this.appendMessageToLane(lane, message),\n\t\t\tappendCustomEntry: (customType, data) => this.appendCustomEntryToLane(lane, customType, data),\n\t\t};\n\t}\n\n\tasync getLeafId(): Promise<string | null> {\n\t\treturn this.getLeafIdForLane(\"main\");\n\t}\n\n\tasync getEntry(id: string): Promise<Entry | undefined> {\n\t\treturn this.storage.getEntry(id);\n\t}\n\n\tasync getStats(): Promise<SessionStats> {\n\t\treturn this.storage.getStats();\n\t}\n\n\tasync getName(): Promise<string | undefined> {\n\t\treturn this.storage.getName();\n\t}\n\n\tasync setName(name: string | undefined): Promise<void> {\n\t\tawait this.storage.setName(name);\n\t}\n\n\tasync getLabel(targetId: string): Promise<string | undefined> {\n\t\treturn this.storage.getLabel(targetId);\n\t}\n\n\tasync setLabel(targetId: string, label: string | undefined): Promise<void> {\n\t\tawait this.storage.setLabel(targetId, label);\n\t}\n\n\tasync findEntries(query?: EntryQuery): Promise<Entry[]> {\n\t\treturn this.queryEntries(query);\n\t}\n\n\tasync findEntry(query: EntryQuery = {}): Promise<Entry | undefined> {\n\t\treturn (await this.queryEntries(query, 1))[0];\n\t}\n\n\tasync findEntriesOnBranch(query?: EntryQuery & BranchBounds): Promise<Entry[]> {\n\t\treturn this.queryBranchEntries(\"main\", query);\n\t}\n\n\tasync findEntryOnBranch(query: EntryQuery & BranchBounds = {}): Promise<Entry | undefined> {\n\t\treturn (await this.queryBranchEntries(\"main\", query, 1))[0];\n\t}\n\n\tasync appendMessage(message: AgentMessage): Promise<string> {\n\t\treturn this.appendMessageToLane(\"main\", message);\n\t}\n\n\tasync appendCustomEntry(customType: string, data?: unknown): Promise<string> {\n\t\treturn this.appendCustomEntryToLane(\"main\", customType, data);\n\t}\n\n\tasync getLanes(): Promise<LanePointer[]> {\n\t\treturn this.storage.getLanes();\n\t}\n\n\tasync createLane(lane: string, at: string | null): Promise<void> {\n\t\tawait this.storage.createLane(lane, at);\n\t}\n\n\tasync moveLane(lane: string, to: string | null): Promise<void> {\n\t\tawait this.storage.moveLane(lane, to);\n\t}\n\n\tasync appendEntry<TEntry extends Entry>(entry: ProvisionedEntry<TEntry>, lane: string): Promise<TEntry> {\n\t\treturn this.commitEntry(entry, lane);\n\t}\n\n\tasync appendRecord<TNewRecord extends NewRecord>(\n\t\trecord: TNewRecord,\n\t): Promise<TNewRecord & Pick<RecordBase, \"seq\" | \"timestamp\">>;\n\tasync appendRecord(record: NewRecord): Promise<LaneRecord> {\n\t\treturn this.commitRecord(record);\n\t}\n\n\tasync findRecords<K extends LaneRecord[\"type\"]>(\n\t\tquery: RecordQuery & { type: K },\n\t): Promise<Extract<LaneRecord, { type: K }>[]>;\n\tasync findRecords(query?: RecordQuery): Promise<LaneRecord[]>;\n\tasync findRecords(query?: RecordQuery): Promise<LaneRecord[]> {\n\t\treturn this.queryRecords(query);\n\t}\n\n\tasync findOpenOperations(lane: string, options?: { limit?: number }): Promise<OperationStartedRecord[]> {\n\t\tassertValidLimit(options?.limit);\n\t\treturn this.storage.findOpenOperations(lane, options);\n\t}\n\n\tasync getLog(options?: LogOptions): Promise<LogItem[]> {\n\t\treturn this.queryLog(options);\n\t}\n\n\t/** Returns the lane's current leaf, or null when empty. Throws when the lane does not exist. */\n\tprivate async getLeafIdForLane(lane: string): Promise<string | null> {\n\t\tconst pointer = (await this.getLanes()).find((candidate) => candidate.lane === lane);\n\t\tif (!pointer) throw new SessionError(\"invalid_lane\", `Lane not found: ${lane}`);\n\t\treturn pointer.leafId;\n\t}\n\n\tprivate async queryEntries(query: EntryQuery = {}, resultLimit = query.limit): Promise<Entry[]> {\n\t\tassertValidLimit(query.limit);\n\t\tassertValidCursor(query.cursor?.afterSeq);\n\t\treturn this.storage.findEntries(resultLimit === query.limit ? query : { ...query, limit: resultLimit });\n\t}\n\n\t/**\n\t * Queries from `query.start` toward the root, defaulting to the lane's current leaf.\n\t * `resultLimit` lets single-entry queries cap results without changing the caller's query.\n\t */\n\tprivate async queryBranchEntries(\n\t\tdefaultLane: string,\n\t\tquery: EntryQuery & BranchBounds = {},\n\t\tresultLimit = query.limit,\n\t): Promise<Entry[]> {\n\t\tassertValidLimit(query.limit);\n\t\tassertValidCursor(query.cursor?.afterSeq);\n\t\tconst start = query.start ?? (await this.getLeafIdForLane(defaultLane));\n\t\tif (start === null) return [];\n\t\tconst storageQuery = resultLimit === query.limit ? query : { ...query, limit: resultLimit };\n\t\treturn this.storage.findEntriesOnBranch({ ...storageQuery, start });\n\t}\n\n\tprivate async queryRecords(query: RecordQuery = {}): Promise<LaneRecord[]> {\n\t\tassertValidLimit(query.limit);\n\t\tassertValidCursor(query.afterSeq);\n\t\tif (query.operationKind !== undefined && query.type !== \"operation_started\") {\n\t\t\tthrow new SessionError(\"invalid_query\", 'operationKind requires type \"operation_started\"');\n\t\t}\n\t\treturn this.storage.findRecords(query);\n\t}\n\n\tprivate async queryLog(options: LogOptions = {}): Promise<LogItem[]> {\n\t\tassertValidLimit(options.limit);\n\t\tassertValidCursor(options.afterSeq);\n\t\treturn this.storage.getLog(options);\n\t}\n\n\tprivate async appendMessageToLane(lane: string, message: AgentMessage): Promise<string> {\n\t\tconst entry = await this.commitEntry({ type: \"message\", id: this.idGenerator.next(), message }, lane);\n\t\treturn entry.id;\n\t}\n\n\tprivate async appendCustomEntryToLane(lane: string, customType: string, data?: unknown): Promise<string> {\n\t\tconst entry = await this.commitEntry(\n\t\t\tdata === undefined\n\t\t\t\t? { type: \"custom\", id: this.idGenerator.next(), customType }\n\t\t\t\t: { type: \"custom\", id: this.idGenerator.next(), customType, data },\n\t\t\tlane,\n\t\t);\n\t\treturn entry.id;\n\t}\n\n\tprivate async commitEntry<TEntry extends Entry>(entry: ProvisionedEntry<TEntry>, lane: string): Promise<TEntry> {\n\t\tassertJsonSerializable(entry);\n\t\treturn this.storage.appendEntry(entry, lane);\n\t}\n\n\tprivate async commitRecord<TNewRecord extends NewRecord>(\n\t\trecord: TNewRecord,\n\t): Promise<TNewRecord & Pick<RecordBase, \"seq\" | \"timestamp\">> {\n\t\tassertJsonSerializable(record);\n\t\treturn this.storage.appendRecord<LaneRecord>(record) as unknown as Promise<\n\t\t\tTNewRecord & Pick<RecordBase, \"seq\" | \"timestamp\">\n\t\t>;\n\t}\n}\n"]}
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/harness/session/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAkBlD,OAAO,EACN,UAAU,IAAI,eAAe,EAC7B,SAAS,EACT,UAAU,IAAI,eAAe,EAC7B,WAAW,IAAI,gBAAgB,EAC/B,UAAU,EAIV,WAAW,EACX,QAAQ,IAAI,aAAa,GAGzB,MAAM,aAAa,CAAC;AAQrB,sFAAsF;AACtF,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC/C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACrC,CAAC;CACD;AAED,0CAA0C;AAC1C,MAAM,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M,KAAK,CAAC;YAAE,MAAM,IAAI,yBAAyB,CAAC,IAAI,EAAE,+BAA+B,CAAC,CAAC;QAClG,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,yBAAyB,CAAC,IAAI,EAAE,sCAAsC,CAAC,CAAC;QACnF,CAAC;IACF,CAAC;IAEO,UAAU;QACjB,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM;YAAE,MAAM,IAAI,CAAC,WAAW,CAAC;IACnD,CAAC;CACD","sourcesContent":["import { uuidv7 } from \"@earendil-works/pi-ai/utils/uuid\";\nimport type { AgentMessage } from \"../../types.ts\";\nimport type { Context } from \"../context.ts\";\nimport { insertEntry } from \"./commit.ts\";\nimport { MutationLine } from \"./mutation-line.ts\";\nimport type {\n\tBranch,\n\tBranchScan,\n\tCommitResult,\n\tEntry,\n\tEntryQuery,\n\tIdGenerator,\n\tJsonValue,\n\tSession,\n\tSessionMetadata,\n\tSessionMutation,\n\tSessionMutationCallback,\n\tSessionStats,\n\tStorage,\n\tStorageBranchScan,\n\tWrite,\n} from \"./types.ts\";\nimport {\n\tappendList as appendListWrite,\n\tbranchTip,\n\tdeleteList as deleteListWrite,\n\tdeleteValue as deleteValueWrite,\n\tentryLabel,\n\ttype ListElement,\n\ttype ListReadOptions,\n\ttype StoredValue,\n\tsessionName,\n\tsetValue as setValueWrite,\n\ttype Value,\n\ttype ValueList,\n} from \"./values.ts\";\n\nexport interface StorageBackedSessionOptions {\n\tmutationLine?: MutationLine;\n\tidGenerator?: IdGenerator;\n\tonClose?: () => void;\n}\n\n/** Durable session state is internally inconsistent and cannot be safely advanced. */\nexport class SessionInvariantError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"SessionInvariantError\";\n\t}\n}\n\n/** A requested Branch name is invalid. */\nexport class SessionInvalidBranchError extends Error {\n\treadonly branch: string;\n\treadonly reason: string;\n\n\tconstructor(branch: string, reason: string) {\n\t\tsuper(`Invalid branch ${JSON.stringify(branch)}: ${reason}`);\n\t\tthis.name = \"SessionInvalidBranchError\";\n\t\tthis.branch = branch;\n\t\tthis.reason = reason;\n\t}\n}\n\n/** A requested branch already exists. */\nexport class SessionBranchExistsError extends Error {\n\treadonly branch: string;\n\n\tconstructor(branch: string) {\n\t\tsuper(`Branch already exists: ${branch}`);\n\t\tthis.name = \"SessionBranchExistsError\";\n\t\tthis.branch = branch;\n\t}\n}\n\n/** A pending assistant message cannot be persisted as a session entry. */\nexport class SessionPendingAssistantMessageError extends Error {\n\tconstructor() {\n\t\tsuper(\"Cannot persist a pending assistant message\");\n\t\tthis.name = \"SessionPendingAssistantMessageError\";\n\t}\n}\n\n/** A requested session entry target does not exist. */\nexport class SessionUnknownTargetError extends Error {\n\treadonly targetId: string;\n\n\tconstructor(targetId: string) {\n\t\tsuper(`Unknown target: ${targetId}`);\n\t\tthis.name = \"SessionUnknownTargetError\";\n\t\tthis.targetId = targetId;\n\t}\n}\n\nclass StorageBackedSessionMutation implements SessionMutation {\n\tprivate readonly storage: Storage;\n\tprivate readonly release: () => void;\n\tprivate active = true;\n\tprivate commitResult: Promise<CommitResult> | undefined;\n\tprivate endPromise: Promise<void> | undefined;\n\n\tconstructor(storage: Storage, release: () => void) {\n\t\tthis.storage = storage;\n\t\tthis.release = release;\n\t}\n\n\tcommit(writes: Write[], context: Context): Promise<CommitResult> {\n\t\tthis.assertActive();\n\t\tif (this.commitResult !== undefined) return Promise.reject(new Error(\"SessionMutator commit already attempted\"));\n\t\ttry {\n\t\t\tfor (const write of writes) {\n\t\t\t\tif (\n\t\t\t\t\twrite.kind === \"entry\" &&\n\t\t\t\t\twrite.entry.type === \"message\" &&\n\t\t\t\t\twrite.entry.message.role === \"assistant\" &&\n\t\t\t\t\twrite.entry.message.stopReason === \"pending\"\n\t\t\t\t) {\n\t\t\t\t\tthrow new SessionPendingAssistantMessageError();\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.commitResult = this.storage.commit(writes, context);\n\t\t} catch (error) {\n\t\t\tthis.commitResult = Promise.reject(error);\n\t\t}\n\t\treturn this.commitResult;\n\t}\n\n\tend(_context: Context): Promise<void> {\n\t\tif (this.endPromise !== undefined) return this.endPromise;\n\t\tthis.active = false;\n\t\tthis.endPromise = this.settle().finally(this.release);\n\t\treturn this.endPromise;\n\t}\n\n\tgetEntries(ids: string[], context: Context): Promise<Map<string, Entry>> {\n\t\tthis.assertActive();\n\t\treturn this.storage.getEntries(ids, context);\n\t}\n\n\tgetStats(context: Context): Promise<SessionStats> {\n\t\tthis.assertActive();\n\t\treturn this.storage.getStats(context);\n\t}\n\n\tgetValue<T>(address: Value<T>, context: Context): Promise<StoredValue<T> | undefined> {\n\t\tthis.assertActive();\n\t\treturn this.storage.getValue(address, context);\n\t}\n\n\tscanValues<T>(prefix: Value<T>, context: Context): Promise<StoredValue<T>[]> {\n\t\tthis.assertActive();\n\t\treturn this.storage.scanValues(prefix, context);\n\t}\n\n\treadList<T>(\n\t\taddress: ValueList<T>,\n\t\toptions: ListReadOptions | undefined,\n\t\tcontext: Context,\n\t): Promise<ListElement<T>[]> {\n\t\tthis.assertActive();\n\t\treturn this.storage.readList(address, options, context);\n\t}\n\n\tscanBranch(query: StorageBranchScan, context: Context): Promise<Entry[]> {\n\t\tthis.assertActive();\n\t\treturn this.storage.scanBranch(query, context);\n\t}\n\n\tprivate settle(): Promise<void> {\n\t\treturn (\n\t\t\tthis.commitResult?.then(\n\t\t\t\t() => undefined,\n\t\t\t\t() => undefined,\n\t\t\t) ?? Promise.resolve()\n\t\t);\n\t}\n\n\tprivate assertActive(): void {\n\t\tif (!this.active) throw new Error(\"SessionMutator cannot be used outside its mutation callback\");\n\t}\n}\n\nclass StorageBackedBranch implements Branch {\n\treadonly name: string;\n\tprivate readonly session: StorageBackedSession;\n\n\tconstructor(name: string, session: StorageBackedSession) {\n\t\tthis.name = name;\n\t\tthis.session = session;\n\t}\n\n\tgetTipId(context: Context): Promise<string | null> {\n\t\treturn this.session.getBranchTip(this.name, context);\n\t}\n\n\tasync findEntries(query: BranchScan | undefined, context: Context): Promise<Entry[]> {\n\t\tquery ??= {};\n\t\tconst start = query.start ?? (await this.getTipId(context));\n\t\tif (start === null) return [];\n\t\treturn this.session.scanBranch({ ...query, start, order: query.order ?? \"newestFirst\" }, context);\n\t}\n\n\tasync findEntry(query: BranchScan | undefined, context: Context): Promise<Entry | undefined> {\n\t\tquery ??= {};\n\t\treturn (\n\t\t\tawait this.findEntries({ ...query, limit: query.limit === undefined ? 1 : Math.min(query.limit, 1) }, context)\n\t\t)[0];\n\t}\n\n\tappendMessage(message: AgentMessage, context: Context): Promise<string> {\n\t\treturn this.session.appendToBranch(this.name, { type: \"message\", message }, context);\n\t}\n\n\tappendCustomEntry(customType: string, data: JsonValue | undefined, context: Context): Promise<string> {\n\t\treturn this.session.appendToBranch(\n\t\t\tthis.name,\n\t\t\t{ type: \"custom\", customType, ...(data === undefined ? {} : { data }) },\n\t\t\tcontext,\n\t\t);\n\t}\n}\n\n/** Package-internal typed boundary shared by concrete session repositories. */\nexport class StorageBackedSession<TMetadata extends SessionMetadata = SessionMetadata> implements Session<TMetadata> {\n\treadonly metadata: TMetadata;\n\treadonly idGenerator: IdGenerator;\n\tprivate readonly storage: Storage;\n\tprivate readonly mutationLine: MutationLine;\n\tprivate readonly onClose: (() => void) | undefined;\n\tprivate readonly branches = new Map<string, StorageBackedBranch>();\n\tprivate readonly closedError = new Error(\"Session is closed\");\n\tprivate state: \"open\" | \"closing\" | \"closed\" = \"open\";\n\tprivate closePromise: Promise<void> | undefined;\n\n\tconstructor(metadata: TMetadata, storage: Storage, options: StorageBackedSessionOptions = {}) {\n\t\tthis.metadata = metadata;\n\t\tthis.idGenerator = options.idGenerator ?? { next: uuidv7 };\n\t\tthis.storage = storage;\n\t\tthis.mutationLine = options.mutationLine ?? new MutationLine();\n\t\tthis.onClose = options.onClose;\n\t}\n\n\tasync beginMutation(_context: Context): Promise<SessionMutation> {\n\t\tthis.assertOpen();\n\t\tlet grant!: (mutation: SessionMutation) => void;\n\t\tlet rejectGrant!: (error: unknown) => void;\n\t\tconst granted = new Promise<SessionMutation>((resolve, reject) => {\n\t\t\tgrant = resolve;\n\t\t\trejectGrant = reject;\n\t\t});\n\t\tlet release!: () => void;\n\t\tconst finished = new Promise<void>((resolve) => {\n\t\t\trelease = resolve;\n\t\t});\n\t\tconst line = this.mutationLine.run(async () => {\n\t\t\tgrant(new StorageBackedSessionMutation(this.storage, release));\n\t\t\tawait finished;\n\t\t});\n\t\tvoid line.catch(rejectGrant);\n\t\treturn granted;\n\t}\n\n\tasync mutate<T>(mutation: SessionMutationCallback<T>, context: Context): Promise<T> {\n\t\tconst mutator = await this.beginMutation(context);\n\t\ttry {\n\t\t\treturn await mutation(mutator, context);\n\t\t} finally {\n\t\t\tawait mutator.end(context);\n\t\t}\n\t}\n\n\tasync getEntries(ids: string[], context: Context): Promise<Map<string, Entry>> {\n\t\tthis.assertOpen();\n\t\treturn this.storage.getEntries(ids, context);\n\t}\n\n\tasync getEntry(id: string, context: Context): Promise<Entry | undefined> {\n\t\treturn (await this.getEntries([id], context)).get(id);\n\t}\n\n\tasync getValue<T>(address: Value<T>, context: Context): Promise<StoredValue<T> | undefined> {\n\t\tthis.assertOpen();\n\t\treturn this.storage.getValue(address, context);\n\t}\n\n\tasync scanValues<T>(prefix: Value<T>, context: Context): Promise<StoredValue<T>[]> {\n\t\tthis.assertOpen();\n\t\treturn this.storage.scanValues(prefix, context);\n\t}\n\n\tasync readList<T>(\n\t\taddress: ValueList<T>,\n\t\toptions: ListReadOptions | undefined,\n\t\tcontext: Context,\n\t): Promise<ListElement<T>[]> {\n\t\tthis.assertOpen();\n\t\treturn this.storage.readList(address, options, context);\n\t}\n\n\tasync scanBranch(query: StorageBranchScan, context: Context): Promise<Entry[]> {\n\t\tthis.assertOpen();\n\t\treturn this.storage.scanBranch(query, context);\n\t}\n\n\tasync getStats(context: Context): Promise<SessionStats> {\n\t\tthis.assertOpen();\n\t\treturn this.storage.getStats(context);\n\t}\n\n\tasync getName(context: Context): Promise<string | undefined> {\n\t\treturn (await this.getValue(sessionName, context))?.value;\n\t}\n\n\tasync getLabel(targetId: string, context: Context): Promise<string | undefined> {\n\t\treturn (await this.getValue(entryLabel(targetId), context))?.value;\n\t}\n\n\tasync findEntries(query: EntryQuery | undefined, context: Context): Promise<Entry[]> {\n\t\tquery ??= {};\n\t\tthis.assertOpen();\n\t\tconst order = query.order ?? \"desc\";\n\t\tif (query.cursor !== undefined) {\n\t\t\tif (order === \"asc\" && query.cursor.seq === Number.MAX_SAFE_INTEGER) return [];\n\t\t\tif (order === \"desc\" && query.cursor.seq <= 1) return [];\n\t\t}\n\t\treturn this.storage.scanEntries(\n\t\t\t{\n\t\t\t\ttype: query.type,\n\t\t\t\tcustomType: query.customType,\n\t\t\t\torder,\n\t\t\t\tlimit: query.limit,\n\t\t\t\t...(query.cursor === undefined\n\t\t\t\t\t? {}\n\t\t\t\t\t: order === \"asc\"\n\t\t\t\t\t\t? { fromSeq: query.cursor.seq + 1 }\n\t\t\t\t\t\t: { toSeq: query.cursor.seq - 1 }),\n\t\t\t},\n\t\t\tcontext,\n\t\t);\n\t}\n\n\tasync findEntry(query: EntryQuery | undefined, context: Context): Promise<Entry | undefined> {\n\t\tquery ??= {};\n\t\treturn (\n\t\t\tawait this.findEntries({ ...query, limit: query.limit === undefined ? 1 : Math.min(query.limit, 1) }, context)\n\t\t)[0];\n\t}\n\n\tasync branch(name: string, context: Context): Promise<Branch | undefined> {\n\t\tthis.assertValidBranchName(name);\n\t\tif ((await this.getValue(branchTip(name), context)) === undefined) return undefined;\n\t\treturn this.getOrCreateBranchObject(name);\n\t}\n\n\tasync createBranch(name: string, at: string | null, context: Context): Promise<Branch> {\n\t\tthis.assertOpen();\n\t\tthis.assertValidBranchName(name);\n\t\tawait this.mutate(async (mutator) => {\n\t\t\tif ((await mutator.getValue(branchTip(name), context)) !== undefined) {\n\t\t\t\tthrow new SessionBranchExistsError(name);\n\t\t\t}\n\t\t\tif (at !== null && !(await mutator.getEntries([at], context)).has(at)) {\n\t\t\t\tthrow new SessionUnknownTargetError(at);\n\t\t\t}\n\t\t\tawait mutator.commit([setValueWrite(branchTip(name), at)], context);\n\t\t}, context);\n\t\treturn this.getOrCreateBranchObject(name);\n\t}\n\n\tsetValue<T>(address: Value<T>, next: NoInfer<T>, context: Context): Promise<void> {\n\t\treturn this.mutate(async (mutator) => {\n\t\t\tawait mutator.commit([setValueWrite(address, next)], context);\n\t\t}, context);\n\t}\n\n\tdeleteValue<T>(address: Value<T>, context: Context): Promise<void> {\n\t\treturn this.mutate(async (mutator) => {\n\t\t\tawait mutator.commit([deleteValueWrite(address)], context);\n\t\t}, context);\n\t}\n\n\tappendList<T>(address: ValueList<T>, element: NoInfer<T>, context: Context): Promise<void> {\n\t\treturn this.mutate(async (mutator) => {\n\t\t\tawait mutator.commit([appendListWrite(address, element)], context);\n\t\t}, context);\n\t}\n\n\tdeleteList<T>(address: ValueList<T>, context: Context): Promise<void> {\n\t\treturn this.mutate(async (mutator) => {\n\t\t\tawait mutator.commit([deleteListWrite(address)], context);\n\t\t}, context);\n\t}\n\n\tsetName(name: string | undefined, context: Context): Promise<void> {\n\t\treturn name === undefined ? this.deleteValue(sessionName, context) : this.setValue(sessionName, name, context);\n\t}\n\n\tsetLabel(targetId: string, label: string | undefined, context: Context): Promise<void> {\n\t\tconst address = entryLabel(targetId);\n\t\treturn label === undefined ? this.deleteValue(address, context) : this.setValue(address, label, context);\n\t}\n\n\tclose(context: Context): Promise<void> {\n\t\tif (this.closePromise !== undefined) return this.closePromise;\n\t\tthis.state = \"closing\";\n\t\tthis.closePromise = this.mutationLine\n\t\t\t.seal(this.closedError)\n\t\t\t.then(() => this.storage.close(context))\n\t\t\t.finally(() => {\n\t\t\t\tthis.state = \"closed\";\n\t\t\t\tthis.onClose?.();\n\t\t\t});\n\t\treturn this.closePromise;\n\t}\n\n\tasync getBranchTip(name: string, context: Context): Promise<string | null> {\n\t\tconst stored = await this.getValue(branchTip(name), context);\n\t\tif (stored === undefined) throw new SessionInvariantError(`Unknown branch: ${name}`);\n\t\treturn stored.value;\n\t}\n\n\tasync appendToBranch(\n\t\tname: string,\n\t\tentry: { type: \"message\"; message: AgentMessage } | { type: \"custom\"; customType: string; data?: JsonValue },\n\t\tcontext: Context,\n\t): Promise<string> {\n\t\tthis.assertOpen();\n\t\tif (entry.type === \"message\" && entry.message.role === \"assistant\" && entry.message.stopReason === \"pending\") {\n\t\t\tthrow new SessionPendingAssistantMessageError();\n\t\t}\n\t\tconst id = this.idGenerator.next();\n\t\tawait this.mutate(async (mutator) => {\n\t\t\tconst tip = await mutator.getValue(branchTip(name), context);\n\t\t\tif (tip === undefined) throw new SessionInvariantError(`Unknown branch: ${name}`);\n\t\t\tawait mutator.commit(\n\t\t\t\t[\n\t\t\t\t\tinsertEntry(\n\t\t\t\t\t\tentry.type === \"message\"\n\t\t\t\t\t\t\t? { id, parentId: tip.value, type: \"message\", message: entry.message }\n\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\tparentId: tip.value,\n\t\t\t\t\t\t\t\t\ttype: \"custom\",\n\t\t\t\t\t\t\t\t\tcustomType: entry.customType,\n\t\t\t\t\t\t\t\t\t...(entry.data === undefined ? {} : { data: entry.data }),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t),\n\t\t\t\t\tsetValueWrite(branchTip(name), id),\n\t\t\t\t],\n\t\t\t\tcontext,\n\t\t\t);\n\t\t}, context);\n\t\treturn id;\n\t}\n\n\tprivate getOrCreateBranchObject(name: string): Branch {\n\t\tlet branch = this.branches.get(name);\n\t\tif (branch === undefined) {\n\t\t\tbranch = new StorageBackedBranch(name, this);\n\t\t\tthis.branches.set(name, branch);\n\t\t}\n\t\treturn branch;\n\t}\n\n\tprivate assertValidBranchName(name: string): void {\n\t\tif (name.length === 0) throw new SessionInvalidBranchError(name, \"branch name must not be empty\");\n\t\tif (name.includes(\"\\u0000\")) {\n\t\t\tthrow new SessionInvalidBranchError(name, \"branch name must not contain \\\\u0000\");\n\t\t}\n\t}\n\n\tprivate assertOpen(): void {\n\t\tif (this.state !== \"open\") throw this.closedError;\n\t}\n}\n"]}
@@ -0,0 +1,12 @@
1
+ export interface StorageBenchmarkDataset {
2
+ readonly name: string;
3
+ readonly entryCount: number;
4
+ readonly payloadBytes: number;
5
+ readonly lookupIds: readonly string[];
6
+ readonly tipId: string;
7
+ }
8
+ /** Package-internal deterministic id shared by dataset and transaction generation. */
9
+ export declare function storageBenchmarkEntryId(index: number): string;
10
+ /** Deterministic synthetic linear branches shared by all storage measurements. */
11
+ export declare const STORAGE_BENCHMARK_DATASETS: readonly StorageBenchmarkDataset[];
12
+ //# sourceMappingURL=datasets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../../../../src/harness/session/testing/benchmark/datasets.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE7D;AAgBD,kFAAkF;AAClF,eAAO,MAAM,0BAA0B,EAAE,SAAS,uBAAuB,EAIxE,CAAC"}
@@ -0,0 +1,24 @@
1
+ /** Package-internal deterministic id shared by dataset and transaction generation. */
2
+ export function storageBenchmarkEntryId(index) {
3
+ return `benchmark-entry-${index.toString().padStart(8, "0")}`;
4
+ }
5
+ function createDataset(scale, entryCount) {
6
+ const lookupCount = Math.min(100, entryCount);
7
+ return {
8
+ name: `synthetic linear branch: ${scale}, 256-byte payloads`,
9
+ entryCount,
10
+ payloadBytes: 256,
11
+ lookupIds: Array.from({ length: lookupCount }, (_, index) => {
12
+ const entryIndex = Math.floor((index * (entryCount - 1)) / Math.max(1, lookupCount - 1));
13
+ return storageBenchmarkEntryId(entryIndex);
14
+ }),
15
+ tipId: storageBenchmarkEntryId(entryCount - 1),
16
+ };
17
+ }
18
+ /** Deterministic synthetic linear branches shared by all storage measurements. */
19
+ export const STORAGE_BENCHMARK_DATASETS = [
20
+ createDataset("1k entries", 1_000),
21
+ createDataset("10k entries", 10_000),
22
+ createDataset("100k entries", 100_000),
23
+ ];
24
+ //# sourceMappingURL=datasets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datasets.js","sourceRoot":"","sources":["../../../../../src/harness/session/testing/benchmark/datasets.ts"],"names":[],"mappings":"AAQA,sFAAsF;AACtF,MAAM,UAAU,uBAAuB,CAAC,KAAa;IACpD,OAAO,mBAAmB,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AAC/D,CAAC;AAED,SAAS,aAAa,CAAC,KAAa,EAAE,UAAkB;IACvD,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IAC9C,OAAO;QACN,IAAI,EAAE,4BAA4B,KAAK,qBAAqB;QAC5D,UAAU;QACV,YAAY,EAAE,GAAG;QACjB,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;YAC3D,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC;YACzF,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAC5C,CAAC,CAAC;QACF,KAAK,EAAE,uBAAuB,CAAC,UAAU,GAAG,CAAC,CAAC;KAC9C,CAAC;AACH,CAAC;AAED,kFAAkF;AAClF,MAAM,CAAC,MAAM,0BAA0B,GAAuC;IAC7E,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC;IAClC,aAAa,CAAC,aAAa,EAAE,MAAM,CAAC;IACpC,aAAa,CAAC,cAAc,EAAE,OAAO,CAAC;CACtC,CAAC","sourcesContent":["export interface StorageBenchmarkDataset {\n\treadonly name: string;\n\treadonly entryCount: number;\n\treadonly payloadBytes: number;\n\treadonly lookupIds: readonly string[];\n\treadonly tipId: string;\n}\n\n/** Package-internal deterministic id shared by dataset and transaction generation. */\nexport function storageBenchmarkEntryId(index: number): string {\n\treturn `benchmark-entry-${index.toString().padStart(8, \"0\")}`;\n}\n\nfunction createDataset(scale: string, entryCount: number): StorageBenchmarkDataset {\n\tconst lookupCount = Math.min(100, entryCount);\n\treturn {\n\t\tname: `synthetic linear branch: ${scale}, 256-byte payloads`,\n\t\tentryCount,\n\t\tpayloadBytes: 256,\n\t\tlookupIds: Array.from({ length: lookupCount }, (_, index) => {\n\t\t\tconst entryIndex = Math.floor((index * (entryCount - 1)) / Math.max(1, lookupCount - 1));\n\t\t\treturn storageBenchmarkEntryId(entryIndex);\n\t\t}),\n\t\ttipId: storageBenchmarkEntryId(entryCount - 1),\n\t};\n}\n\n/** Deterministic synthetic linear branches shared by all storage measurements. */\nexport const STORAGE_BENCHMARK_DATASETS: readonly StorageBenchmarkDataset[] = [\n\tcreateDataset(\"1k entries\", 1_000),\n\tcreateDataset(\"10k entries\", 10_000),\n\tcreateDataset(\"100k entries\", 100_000),\n];\n"]}
@@ -0,0 +1,42 @@
1
+ import type { SessionMetadata, SessionRepo } from "../../types.ts";
2
+ import { type StorageBenchmarkDataset } from "./datasets.ts";
3
+ export interface SessionRepoCatalogBenchmarkDataset {
4
+ readonly name: string;
5
+ readonly sessionCount: number;
6
+ }
7
+ interface SessionRepoCatalogReadBenchmarkScenario {
8
+ readonly name: string;
9
+ expectedResult(dataset: SessionRepoCatalogBenchmarkDataset): number;
10
+ run(repo: SessionRepo): Promise<number>;
11
+ }
12
+ interface SessionRepoCatalogWriteBenchmarkOperation {
13
+ run(): Promise<number>;
14
+ }
15
+ interface SessionRepoCatalogWriteBenchmarkScenario {
16
+ readonly name: string;
17
+ readonly expectedResult: number;
18
+ prepare(repo: SessionRepo): Promise<SessionRepoCatalogWriteBenchmarkOperation>;
19
+ }
20
+ interface SessionRepoForkWriteBenchmarkScenario {
21
+ readonly name: string;
22
+ expectedResult(dataset: StorageBenchmarkDataset): number;
23
+ run(repo: SessionRepo, source: SessionMetadata, dataset: StorageBenchmarkDataset): Promise<number>;
24
+ }
25
+ /** Package-internal deterministic session id shared by repository benchmark workloads. */
26
+ export declare function sessionRepoBenchmarkSessionId(index: number): string;
27
+ /** Deterministic closed-session catalogs shared by repository measurements. */
28
+ export declare const SESSION_REPO_CATALOG_BENCHMARK_DATASETS: readonly SessionRepoCatalogBenchmarkDataset[];
29
+ /** Seeds one deterministic catalog and returns its durable metadata in creation order. */
30
+ export declare function seedSessionRepoCatalogBenchmark(repo: SessionRepo, dataset: SessionRepoCatalogBenchmarkDataset): Promise<SessionMetadata[]>;
31
+ /** Shared catalog reads. Returning a number ensures each result is consumed. */
32
+ export declare const SESSION_REPO_CATALOG_READ_BENCHMARK_SCENARIOS: readonly SessionRepoCatalogReadBenchmarkScenario[];
33
+ /** Shared catalog writes. Every invocation receives an equivalent independently prepared repository. */
34
+ export declare const SESSION_REPO_CATALOG_WRITE_BENCHMARK_SCENARIOS: readonly SessionRepoCatalogWriteBenchmarkScenario[];
35
+ /** Initial fork timing uses a bounded source because each iteration owns an equivalent seeded repository. */
36
+ export declare const SESSION_REPO_FORK_BENCHMARK_DATASETS: readonly StorageBenchmarkDataset[];
37
+ /** Seeds one deterministic open source session with a linear main branch. */
38
+ export declare function seedSessionRepoForkBenchmark(repo: SessionRepo, dataset: StorageBenchmarkDataset): Promise<SessionMetadata>;
39
+ /** Shared fork writes. Every invocation receives an equivalent source repository. */
40
+ export declare const SESSION_REPO_FORK_WRITE_BENCHMARK_SCENARIOS: readonly SessionRepoForkWriteBenchmarkScenario[];
41
+ export {};
42
+ //# sourceMappingURL=session-repo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-repo.d.ts","sourceRoot":"","sources":["../../../../../src/harness/session/testing/benchmark/session-repo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAA8B,KAAK,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAGzF,MAAM,WAAW,kCAAkC;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC9B;AAED,UAAU,uCAAuC;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,OAAO,EAAE,kCAAkC,GAAG,MAAM,CAAC;IACpE,GAAG,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,UAAU,yCAAyC;IAClD,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACvB;AAED,UAAU,wCAAwC;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,yCAAyC,CAAC,CAAC;CAC/E;AAED,UAAU,qCAAqC;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAAC;IACzD,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACnG;AAED,0FAA0F;AAC1F,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnE;AAYD,+EAA+E;AAC/E,eAAO,MAAM,uCAAuC,EAAE,SAAS,kCAAkC,EAIhG,CAAC;AAEF,0FAA0F;AAC1F,wBAAsB,+BAA+B,CACpD,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,kCAAkC,GACzC,OAAO,CAAC,eAAe,EAAE,CAAC,CAQ5B;AAED,gFAAgF;AAChF,eAAO,MAAM,6CAA6C,EAAE,SAAS,uCAAuC,EAU3G,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,8CAA8C,EAAE,SAAS,wCAAwC,EA2C7G,CAAC;AAEF,6GAA6G;AAC7G,eAAO,MAAM,oCAAoC,EAAE,SAAS,uBAAuB,EAGlF,CAAC;AAEF,6EAA6E;AAC7E,wBAAsB,4BAA4B,CACjD,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,uBAAuB,GAC9B,OAAO,CAAC,eAAe,CAAC,CAsB1B;AAED,qFAAqF;AACrF,eAAO,MAAM,2CAA2C,EAAE,SAAS,qCAAqC,EAiBvG,CAAC"}
@@ -0,0 +1,127 @@
1
+ import { BACKGROUND_CONTEXT } from "../../../context.js";
2
+ import { branchTip, laneConfig, laneState, setValue } from "../../values.js";
3
+ import { STORAGE_BENCHMARK_DATASETS } from "./datasets.js";
4
+ import { generateStorageBenchmarkSeedTransactions } from "./storage.js";
5
+ /** Package-internal deterministic session id shared by repository benchmark workloads. */
6
+ export function sessionRepoBenchmarkSessionId(index) {
7
+ return `benchmark-session-${index.toString().padStart(8, "0")}`;
8
+ }
9
+ const BENCHMARK_SESSION_ID = sessionRepoBenchmarkSessionId(0);
10
+ const FORK_DESTINATION_SESSION_ID = sessionRepoBenchmarkSessionId(1);
11
+ function createCatalogDataset(scale, sessionCount) {
12
+ return {
13
+ name: `synthetic catalog: ${scale} closed sessions`,
14
+ sessionCount,
15
+ };
16
+ }
17
+ /** Deterministic closed-session catalogs shared by repository measurements. */
18
+ export const SESSION_REPO_CATALOG_BENCHMARK_DATASETS = [
19
+ createCatalogDataset("100", 100),
20
+ createCatalogDataset("1k", 1_000),
21
+ createCatalogDataset("10k", 10_000),
22
+ ];
23
+ /** Seeds one deterministic catalog and returns its durable metadata in creation order. */
24
+ export async function seedSessionRepoCatalogBenchmark(repo, dataset) {
25
+ const metadata = [];
26
+ for (let index = 0; index < dataset.sessionCount; index++) {
27
+ const session = await repo.create({ id: sessionRepoBenchmarkSessionId(index) }, BACKGROUND_CONTEXT);
28
+ metadata.push(session.metadata);
29
+ await session.close(BACKGROUND_CONTEXT);
30
+ }
31
+ return metadata;
32
+ }
33
+ /** Shared catalog reads. Returning a number ensures each result is consumed. */
34
+ export const SESSION_REPO_CATALOG_READ_BENCHMARK_SCENARIOS = [
35
+ {
36
+ name: "list sessions",
37
+ expectedResult(dataset) {
38
+ return dataset.sessionCount;
39
+ },
40
+ async run(repo) {
41
+ return (await repo.list(undefined, BACKGROUND_CONTEXT)).length;
42
+ },
43
+ },
44
+ ];
45
+ /** Shared catalog writes. Every invocation receives an equivalent independently prepared repository. */
46
+ export const SESSION_REPO_CATALOG_WRITE_BENCHMARK_SCENARIOS = [
47
+ {
48
+ name: "create empty session",
49
+ expectedResult: 1,
50
+ prepare(repo) {
51
+ return Promise.resolve({
52
+ async run() {
53
+ const session = await repo.create({ id: BENCHMARK_SESSION_ID }, BACKGROUND_CONTEXT);
54
+ return session.metadata.id === BENCHMARK_SESSION_ID ? 1 : 0;
55
+ },
56
+ });
57
+ },
58
+ },
59
+ {
60
+ name: "open closed empty session",
61
+ expectedResult: 1,
62
+ async prepare(repo) {
63
+ const session = await repo.create({ id: BENCHMARK_SESSION_ID }, BACKGROUND_CONTEXT);
64
+ const { metadata } = session;
65
+ await session.close(BACKGROUND_CONTEXT);
66
+ return {
67
+ async run() {
68
+ const reopened = await repo.open(metadata, BACKGROUND_CONTEXT);
69
+ return reopened.metadata.id === metadata.id ? 1 : 0;
70
+ },
71
+ };
72
+ },
73
+ },
74
+ {
75
+ name: "delete closed empty session",
76
+ expectedResult: 1,
77
+ async prepare(repo) {
78
+ const session = await repo.create({ id: BENCHMARK_SESSION_ID }, BACKGROUND_CONTEXT);
79
+ const { metadata } = session;
80
+ await session.close(BACKGROUND_CONTEXT);
81
+ return {
82
+ async run() {
83
+ await repo.delete(metadata, BACKGROUND_CONTEXT);
84
+ return 1;
85
+ },
86
+ };
87
+ },
88
+ },
89
+ ];
90
+ /** Initial fork timing uses a bounded source because each iteration owns an equivalent seeded repository. */
91
+ export const SESSION_REPO_FORK_BENCHMARK_DATASETS = [
92
+ STORAGE_BENCHMARK_DATASETS[0],
93
+ STORAGE_BENCHMARK_DATASETS[1],
94
+ ];
95
+ /** Seeds one deterministic open source session with a linear main branch. */
96
+ export async function seedSessionRepoForkBenchmark(repo, dataset) {
97
+ const session = await repo.create({ id: BENCHMARK_SESSION_ID }, BACKGROUND_CONTEXT);
98
+ for (const transaction of generateStorageBenchmarkSeedTransactions(dataset)) {
99
+ await session.mutate((mutator) => mutator.commit(transaction, BACKGROUND_CONTEXT), BACKGROUND_CONTEXT);
100
+ }
101
+ await session.mutate((mutator) => mutator.commit([
102
+ setValue(branchTip("main"), dataset.tipId),
103
+ setValue(laneConfig("main"), {
104
+ model: { provider: "benchmark", modelId: "benchmark" },
105
+ thinkingLevel: "off",
106
+ activeToolNames: [],
107
+ }),
108
+ setValue(laneState("main"), { currentOperationId: null, lastOperationId: null, inbox: [] }),
109
+ ], BACKGROUND_CONTEXT), BACKGROUND_CONTEXT);
110
+ return session.metadata;
111
+ }
112
+ /** Shared fork writes. Every invocation receives an equivalent source repository. */
113
+ export const SESSION_REPO_FORK_WRITE_BENCHMARK_SCENARIOS = [
114
+ {
115
+ name: "fork open current branch",
116
+ expectedResult(dataset) {
117
+ return dataset.entryCount;
118
+ },
119
+ async run(repo, source, dataset) {
120
+ const fork = await repo.fork(source, { id: FORK_DESTINATION_SESSION_ID, scope: "branch", branch: "main" }, BACKGROUND_CONTEXT);
121
+ return fork.metadata.id === FORK_DESTINATION_SESSION_ID && fork.metadata.parentSessionId === source.id
122
+ ? dataset.entryCount
123
+ : 0;
124
+ },
125
+ },
126
+ ];
127
+ //# sourceMappingURL=session-repo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-repo.js","sourceRoot":"","sources":["../../../../../src/harness/session/testing/benchmark/session-repo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAgC,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,wCAAwC,EAAE,MAAM,cAAc,CAAC;AA6BxE,0FAA0F;AAC1F,MAAM,UAAU,6BAA6B,CAAC,KAAa;IAC1D,OAAO,qBAAqB,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACjE,CAAC;AAED,MAAM,oBAAoB,GAAG,6BAA6B,CAAC,CAAC,CAAC,CAAC;AAC9D,MAAM,2BAA2B,GAAG,6BAA6B,CAAC,CAAC,CAAC,CAAC;AAErE,SAAS,oBAAoB,CAAC,KAAa,EAAE,YAAoB;IAChE,OAAO;QACN,IAAI,EAAE,sBAAsB,KAAK,kBAAkB;QACnD,YAAY;KACZ,CAAC;AACH,CAAC;AAED,+EAA+E;AAC/E,MAAM,CAAC,MAAM,uCAAuC,GAAkD;IACrG,oBAAoB,CAAC,KAAK,EAAE,GAAG,CAAC;IAChC,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC;IACjC,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,0FAA0F;AAC1F,MAAM,CAAC,KAAK,U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,EAAE,OAAO;YAC9B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAC3B,MAAM,EACN,EAAE,EAAE,EAAE,2BAA2B,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,EACpE,kBAAkB,CAClB,CAAC;YACF,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,2BAA2B,IAAI,IAAI,CAAC,QAAQ,CAAC,eAAe,KAAK,MAAM,CAAC,EAAE;gBACrG,CAAC,CAAC,OAAO,CAAC,UAAU;gBACpB,CAAC,CAAC,CAAC,CAAC;QACN,CAAC;KACD;CACD,CAAC","sourcesContent":["import { BACKGROUND_CONTEXT } from \"../../../context.ts\";\nimport type { SessionMetadata, SessionRepo } from \"../../types.ts\";\nimport { branchTip, laneConfig, laneState, setValue } from \"../../values.ts\";\nimport { STORAGE_BENCHMARK_DATASETS, type StorageBenchmarkDataset } from \"./datasets.ts\";\nimport { generateStorageBenchmarkSeedTransactions } from \"./storage.ts\";\n\nexport interface SessionRepoCatalogBenchmarkDataset {\n\treadonly name: string;\n\treadonly sessionCount: number;\n}\n\ninterface SessionRepoCatalogReadBenchmarkScenario {\n\treadonly name: string;\n\texpectedResult(dataset: SessionRepoCatalogBenchmarkDataset): number;\n\trun(repo: SessionRepo): Promise<number>;\n}\n\ninterface SessionRepoCatalogWriteBenchmarkOperation {\n\trun(): Promise<number>;\n}\n\ninterface SessionRepoCatalogWriteBenchmarkScenario {\n\treadonly name: string;\n\treadonly expectedResult: number;\n\tprepare(repo: SessionRepo): Promise<SessionRepoCatalogWriteBenchmarkOperation>;\n}\n\ninterface SessionRepoForkWriteBenchmarkScenario {\n\treadonly name: string;\n\texpectedResult(dataset: StorageBenchmarkDataset): number;\n\trun(repo: SessionRepo, source: SessionMetadata, dataset: StorageBenchmarkDataset): Promise<number>;\n}\n\n/** Package-internal deterministic session id shared by repository benchmark workloads. */\nexport function sessionRepoBenchmarkSessionId(index: number): string {\n\treturn `benchmark-session-${index.toString().padStart(8, \"0\")}`;\n}\n\nconst BENCHMARK_SESSION_ID = sessionRepoBenchmarkSessionId(0);\nconst FORK_DESTINATION_SESSION_ID = sessionRepoBenchmarkSessionId(1);\n\nfunction createCatalogDataset(scale: string, sessionCount: number): SessionRepoCatalogBenchmarkDataset {\n\treturn {\n\t\tname: `synthetic catalog: ${scale} closed sessions`,\n\t\tsessionCount,\n\t};\n}\n\n/** Deterministic closed-session catalogs shared by repository measurements. */\nexport const SESSION_REPO_CATALOG_BENCHMARK_DATASETS: readonly SessionRepoCatalogBenchmarkDataset[] = [\n\tcreateCatalogDataset(\"100\", 100),\n\tcreateCatalogDataset(\"1k\", 1_000),\n\tcreateCatalogDataset(\"10k\", 10_000),\n];\n\n/** Seeds one deterministic catalog and returns its durable metadata in creation order. */\nexport async function seedSessionRepoCatalogBenchmark(\n\trepo: SessionRepo,\n\tdataset: SessionRepoCatalogBenchmarkDataset,\n): Promise<SessionMetadata[]> {\n\tconst metadata: SessionMetadata[] = [];\n\tfor (let index = 0; index < dataset.sessionCount; index++) {\n\t\tconst session = await repo.create({ id: sessionRepoBenchmarkSessionId(index) }, BACKGROUND_CONTEXT);\n\t\tmetadata.push(session.metadata);\n\t\tawait session.close(BACKGROUND_CONTEXT);\n\t}\n\treturn metadata;\n}\n\n/** Shared catalog reads. Returning a number ensures each result is consumed. */\nexport const SESSION_REPO_CATALOG_READ_BENCHMARK_SCENARIOS: readonly SessionRepoCatalogReadBenchmarkScenario[] = [\n\t{\n\t\tname: \"list sessions\",\n\t\texpectedResult(dataset) {\n\t\t\treturn dataset.sessionCount;\n\t\t},\n\t\tasync run(repo) {\n\t\t\treturn (await repo.list(undefined, BACKGROUND_CONTEXT)).length;\n\t\t},\n\t},\n];\n\n/** Shared catalog writes. Every invocation receives an equivalent independently prepared repository. */\nexport const SESSION_REPO_CATALOG_WRITE_BENCHMARK_SCENARIOS: readonly SessionRepoCatalogWriteBenchmarkScenario[] = [\n\t{\n\t\tname: \"create empty session\",\n\t\texpectedResult: 1,\n\t\tprepare(repo) {\n\t\t\treturn Promise.resolve({\n\t\t\t\tasync run() {\n\t\t\t\t\tconst session = await repo.create({ id: BENCHMARK_SESSION_ID }, BACKGROUND_CONTEXT);\n\t\t\t\t\treturn session.metadata.id === BENCHMARK_SESSION_ID ? 1 : 0;\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t},\n\t{\n\t\tname: \"open closed empty session\",\n\t\texpectedResult: 1,\n\t\tasync prepare(repo) {\n\t\t\tconst session = await repo.create({ id: BENCHMARK_SESSION_ID }, BACKGROUND_CONTEXT);\n\t\t\tconst { metadata } = session;\n\t\t\tawait session.close(BACKGROUND_CONTEXT);\n\t\t\treturn {\n\t\t\t\tasync run() {\n\t\t\t\t\tconst reopened = await repo.open(metadata, BACKGROUND_CONTEXT);\n\t\t\t\t\treturn reopened.metadata.id === metadata.id ? 1 : 0;\n\t\t\t\t},\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tname: \"delete closed empty session\",\n\t\texpectedResult: 1,\n\t\tasync prepare(repo) {\n\t\t\tconst session = await repo.create({ id: BENCHMARK_SESSION_ID }, BACKGROUND_CONTEXT);\n\t\t\tconst { metadata } = session;\n\t\t\tawait session.close(BACKGROUND_CONTEXT);\n\t\t\treturn {\n\t\t\t\tasync run() {\n\t\t\t\t\tawait repo.delete(metadata, BACKGROUND_CONTEXT);\n\t\t\t\t\treturn 1;\n\t\t\t\t},\n\t\t\t};\n\t\t},\n\t},\n];\n\n/** Initial fork timing uses a bounded source because each iteration owns an equivalent seeded repository. */\nexport const SESSION_REPO_FORK_BENCHMARK_DATASETS: readonly StorageBenchmarkDataset[] = [\n\tSTORAGE_BENCHMARK_DATASETS[0]!,\n\tSTORAGE_BENCHMARK_DATASETS[1]!,\n];\n\n/** Seeds one deterministic open source session with a linear main branch. */\nexport async function seedSessionRepoForkBenchmark(\n\trepo: SessionRepo,\n\tdataset: StorageBenchmarkDataset,\n): Promise<SessionMetadata> {\n\tconst session = await repo.create({ id: BENCHMARK_SESSION_ID }, BACKGROUND_CONTEXT);\n\tfor (const transaction of generateStorageBenchmarkSeedTransactions(dataset)) {\n\t\tawait session.mutate((mutator) => mutator.commit(transaction, BACKGROUND_CONTEXT), BACKGROUND_CONTEXT);\n\t}\n\tawait session.mutate(\n\t\t(mutator) =>\n\t\t\tmutator.commit(\n\t\t\t\t[\n\t\t\t\t\tsetValue(branchTip(\"main\"), dataset.tipId),\n\t\t\t\t\tsetValue(laneConfig(\"main\"), {\n\t\t\t\t\t\tmodel: { provider: \"benchmark\", modelId: \"benchmark\" },\n\t\t\t\t\t\tthinkingLevel: \"off\",\n\t\t\t\t\t\tactiveToolNames: [],\n\t\t\t\t\t}),\n\t\t\t\t\tsetValue(laneState(\"main\"), { currentOperationId: null, lastOperationId: null, inbox: [] }),\n\t\t\t\t],\n\t\t\t\tBACKGROUND_CONTEXT,\n\t\t\t),\n\t\tBACKGROUND_CONTEXT,\n\t);\n\treturn session.metadata;\n}\n\n/** Shared fork writes. Every invocation receives an equivalent source repository. */\nexport const SESSION_REPO_FORK_WRITE_BENCHMARK_SCENARIOS: readonly SessionRepoForkWriteBenchmarkScenario[] = [\n\t{\n\t\tname: \"fork open current branch\",\n\t\texpectedResult(dataset) {\n\t\t\treturn dataset.entryCount;\n\t\t},\n\t\tasync run(repo, source, dataset) {\n\t\t\tconst fork = await repo.fork(\n\t\t\t\tsource,\n\t\t\t\t{ id: FORK_DESTINATION_SESSION_ID, scope: \"branch\", branch: \"main\" },\n\t\t\t\tBACKGROUND_CONTEXT,\n\t\t\t);\n\t\t\treturn fork.metadata.id === FORK_DESTINATION_SESSION_ID && fork.metadata.parentSessionId === source.id\n\t\t\t\t? dataset.entryCount\n\t\t\t\t: 0;\n\t\t},\n\t},\n];\n"]}
@@ -0,0 +1,25 @@
1
+ import type { Storage, Write } from "../../types.ts";
2
+ import { type StorageBenchmarkDataset } from "./datasets.ts";
3
+ /** Generates deterministic seed transactions without claiming a production data distribution. */
4
+ export declare function generateStorageBenchmarkSeedTransactions(dataset: StorageBenchmarkDataset): Generator<Write[]>;
5
+ /** Seeds one deterministic synthetic linear branch. */
6
+ export declare function seedStorageBenchmark(storage: Storage, dataset: StorageBenchmarkDataset): Promise<void>;
7
+ /** A steady-state read operation run against a pre-seeded fixture. */
8
+ interface StorageReadBenchmarkScenario {
9
+ readonly name: string;
10
+ expectedResult(dataset: StorageBenchmarkDataset): number;
11
+ run(storage: Storage, dataset: StorageBenchmarkDataset): Promise<number>;
12
+ }
13
+ /** A write operation run once against each independently prepared fixture. */
14
+ interface StorageWriteBenchmarkScenario {
15
+ readonly name: string;
16
+ readonly writeCount: number;
17
+ prepare?(storage: Storage): Promise<void>;
18
+ run(storage: Storage): Promise<number>;
19
+ }
20
+ /** Shared read scenarios. Returning a number ensures each result is consumed. */
21
+ export declare const STORAGE_READ_BENCHMARK_SCENARIOS: readonly StorageReadBenchmarkScenario[];
22
+ /** Shared writes. Every invocation receives equivalent pre-benchmark state. */
23
+ export declare const STORAGE_WRITE_BENCHMARK_SCENARIOS: readonly StorageWriteBenchmarkScenario[];
24
+ export {};
25
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../../src/harness/session/testing/benchmark/storage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA0B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE7E,OAAO,EAA8B,KAAK,uBAAuB,EAA2B,MAAM,eAAe,CAAC;AA2BlH,iGAAiG;AACjG,wBAAiB,wCAAwC,CAAC,OAAO,EAAE,uBAAuB,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,CAQ9G;AAED,uDAAuD;AACvD,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG5G;AAED,sEAAsE;AACtE,UAAU,4BAA4B;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAAC;IACzD,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACzE;AAED,8EAA8E;AAC9E,UAAU,6BAA6B;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,GAAG,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACvC;AAuBD,iFAAiF;AACjF,eAAO,MAAM,gCAAgC,EAAE,SAAS,4BAA4B,EA6BnF,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,iCAAiC,EAAE,SAAS,6BAA6B,EAyBrF,CAAC"}
@@ -0,0 +1,114 @@
1
+ import { BACKGROUND_CONTEXT } from "../../../context.js";
2
+ import { insertEntry, insertUsage } from "../../commit.js";
3
+ import { branchTip, setValue } from "../../values.js";
4
+ import { STORAGE_BENCHMARK_DATASETS, storageBenchmarkEntryId } from "./datasets.js";
5
+ const MESSAGE_TIMESTAMP = 1_650_000_000_000;
6
+ const SEED_BATCH_SIZE = 250;
7
+ const WRITE_BASELINE_DATASET = STORAGE_BENCHMARK_DATASETS[0];
8
+ function createEntry(index, payloadBytes) {
9
+ const id = storageBenchmarkEntryId(index);
10
+ const prefix = `${id}:`;
11
+ return {
12
+ id,
13
+ parentId: index === 0 ? null : storageBenchmarkEntryId(index - 1),
14
+ type: "message",
15
+ message: {
16
+ role: "user",
17
+ content: [{ type: "text", text: prefix + "x".repeat(Math.max(0, payloadBytes - prefix.length)) }],
18
+ timestamp: MESSAGE_TIMESTAMP,
19
+ },
20
+ };
21
+ }
22
+ function createStorageBenchmarkTransaction(startIndex, entryCount, payloadBytes) {
23
+ return Array.from({ length: entryCount }, (_, offset) => insertEntry(createEntry(startIndex + offset, payloadBytes)));
24
+ }
25
+ /** Generates deterministic seed transactions without claiming a production data distribution. */
26
+ export function* generateStorageBenchmarkSeedTransactions(dataset) {
27
+ for (let startIndex = 0; startIndex < dataset.entryCount; startIndex += SEED_BATCH_SIZE) {
28
+ yield createStorageBenchmarkTransaction(startIndex, Math.min(SEED_BATCH_SIZE, dataset.entryCount - startIndex), dataset.payloadBytes);
29
+ }
30
+ }
31
+ /** Seeds one deterministic synthetic linear branch. */
32
+ export async function seedStorageBenchmark(storage, dataset) {
33
+ for (const transaction of generateStorageBenchmarkSeedTransactions(dataset))
34
+ await storage.commit(transaction, BACKGROUND_CONTEXT);
35
+ }
36
+ const singleEntryTransaction = createStorageBenchmarkTransaction(0, 1, 256);
37
+ const hundredEntryTransaction = createStorageBenchmarkTransaction(0, 100, 256);
38
+ const appendedEntryId = storageBenchmarkEntryId(WRITE_BASELINE_DATASET.entryCount);
39
+ const mixedAppendTransaction = [
40
+ ...createStorageBenchmarkTransaction(WRITE_BASELINE_DATASET.entryCount, 1, WRITE_BASELINE_DATASET.payloadBytes),
41
+ setValue(branchTip("main"), appendedEntryId),
42
+ insertUsage({
43
+ id: "benchmark-usage",
44
+ entryId: appendedEntryId,
45
+ adjustment: false,
46
+ usage: {
47
+ input: 1_000,
48
+ output: 250,
49
+ cacheRead: 500,
50
+ cacheWrite: 0,
51
+ totalTokens: 1_250,
52
+ cost: { input: 0.001, output: 0.001, cacheRead: 0.0001, cacheWrite: 0, total: 0.0021 },
53
+ },
54
+ }),
55
+ ];
56
+ /** Shared read scenarios. Returning a number ensures each result is consumed. */
57
+ export const STORAGE_READ_BENCHMARK_SCENARIOS = [
58
+ {
59
+ name: "get 100 distributed entries",
60
+ expectedResult(dataset) {
61
+ return dataset.lookupIds.length;
62
+ },
63
+ async run(storage, dataset) {
64
+ return (await storage.getEntries([...dataset.lookupIds], BACKGROUND_CONTEXT)).size;
65
+ },
66
+ },
67
+ {
68
+ name: "scan latest 50 entries",
69
+ expectedResult(dataset) {
70
+ return Math.min(50, dataset.entryCount);
71
+ },
72
+ async run(storage) {
73
+ return (await storage.scanEntries({ order: "desc", limit: 50 }, BACKGROUND_CONTEXT)).length;
74
+ },
75
+ },
76
+ {
77
+ name: "scan full branch structure",
78
+ expectedResult(dataset) {
79
+ return dataset.entryCount;
80
+ },
81
+ async run(storage, dataset) {
82
+ return (await storage.scanBranchStructure({ start: dataset.tipId, order: "newestFirst" }, BACKGROUND_CONTEXT))
83
+ .length;
84
+ },
85
+ },
86
+ ];
87
+ /** Shared writes. Every invocation receives equivalent pre-benchmark state. */
88
+ export const STORAGE_WRITE_BENCHMARK_SCENARIOS = [
89
+ {
90
+ name: "commit one message entry",
91
+ writeCount: 1,
92
+ async run(storage) {
93
+ return (await storage.commit(singleEntryTransaction, BACKGROUND_CONTEXT)).seqs.length;
94
+ },
95
+ },
96
+ {
97
+ name: "commit 100 message entries",
98
+ writeCount: 100,
99
+ async run(storage) {
100
+ return (await storage.commit(hundredEntryTransaction, BACKGROUND_CONTEXT)).seqs.length;
101
+ },
102
+ },
103
+ {
104
+ name: `commit mixed append (${WRITE_BASELINE_DATASET.name})`,
105
+ writeCount: 3,
106
+ prepare(storage) {
107
+ return seedStorageBenchmark(storage, WRITE_BASELINE_DATASET);
108
+ },
109
+ async run(storage) {
110
+ return (await storage.commit(mixedAppendTransaction, BACKGROUND_CONTEXT)).seqs.length;
111
+ },
112
+ },
113
+ ];
114
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../../src/harness/session/testing/benchmark/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE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MAAM,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;QACvF,CAAC;KACD;IACD;QACC,IAAI,EAAE,4BAA4B;QAClC,UAAU,EAAE,GAAG;QACf,KAAK,CAAC,GAAG,CAAC,OAAO;YAChB,OAAO,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;QACxF,CAAC;KACD;IACD;QACC,IAAI,EAAE,wBAAwB,sBAAsB,CAAC,IAAI,GAAG;QAC5D,UAAU,EAAE,CAAC;QACb,OAAO,CAAC,OAAO;YACd,OAAO,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC;QAC9D,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,OAAO;YAChB,OAAO,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;QACvF,CAAC;KACD;CACD,CAAC","sourcesContent":["import { BACKGROUND_CONTEXT } from \"../../../context.ts\";\nimport { insertEntry, insertUsage } from \"../../commit.ts\";\nimport type { MessageEntry, NewEntry, Storage, Write } from \"../../types.ts\";\nimport { branchTip, setValue } from \"../../values.ts\";\nimport { STORAGE_BENCHMARK_DATASETS, type StorageBenchmarkDataset, storageBenchmarkEntryId } from \"./datasets.ts\";\n\nconst MESSAGE_TIMESTAMP = 1_650_000_000_000;\nconst SEED_BATCH_SIZE = 250;\nconst WRITE_BASELINE_DATASET = STORAGE_BENCHMARK_DATASETS[0]!;\n\nfunction createEntry(index: number, payloadBytes: number): NewEntry<MessageEntry> {\n\tconst id = storageBenchmarkEntryId(index);\n\tconst prefix = `${id}:`;\n\treturn {\n\t\tid,\n\t\tparentId: index === 0 ? null : storageBenchmarkEntryId(index - 1),\n\t\ttype: \"message\",\n\t\tmessage: {\n\t\t\trole: \"user\",\n\t\t\tcontent: [{ type: \"text\", text: prefix + \"x\".repeat(Math.max(0, payloadBytes - prefix.length)) }],\n\t\t\ttimestamp: MESSAGE_TIMESTAMP,\n\t\t},\n\t};\n}\n\nfunction createStorageBenchmarkTransaction(startIndex: number, entryCount: number, payloadBytes: number): Write[] {\n\treturn Array.from({ length: entryCount }, (_, offset) =>\n\t\tinsertEntry(createEntry(startIndex + offset, payloadBytes)),\n\t);\n}\n\n/** Generates deterministic seed transactions without claiming a production data distribution. */\nexport function* generateStorageBenchmarkSeedTransactions(dataset: StorageBenchmarkDataset): Generator<Write[]> {\n\tfor (let startIndex = 0; startIndex < dataset.entryCount; startIndex += SEED_BATCH_SIZE) {\n\t\tyield createStorageBenchmarkTransaction(\n\t\t\tstartIndex,\n\t\t\tMath.min(SEED_BATCH_SIZE, dataset.entryCount - startIndex),\n\t\t\tdataset.payloadBytes,\n\t\t);\n\t}\n}\n\n/** Seeds one deterministic synthetic linear branch. */\nexport async function seedStorageBenchmark(storage: Storage, dataset: StorageBenchmarkDataset): Promise<void> {\n\tfor (const transaction of generateStorageBenchmarkSeedTransactions(dataset))\n\t\tawait storage.commit(transaction, BACKGROUND_CONTEXT);\n}\n\n/** A steady-state read operation run against a pre-seeded fixture. */\ninterface StorageReadBenchmarkScenario {\n\treadonly name: string;\n\texpectedResult(dataset: StorageBenchmarkDataset): number;\n\trun(storage: Storage, dataset: StorageBenchmarkDataset): Promise<number>;\n}\n\n/** A write operation run once against each independently prepared fixture. */\ninterface StorageWriteBenchmarkScenario {\n\treadonly name: string;\n\treadonly writeCount: number;\n\tprepare?(storage: Storage): Promise<void>;\n\trun(storage: Storage): Promise<number>;\n}\n\nconst singleEntryTransaction = createStorageBenchmarkTransaction(0, 1, 256);\nconst hundredEntryTransaction = createStorageBenchmarkTransaction(0, 100, 256);\nconst appendedEntryId = storageBenchmarkEntryId(WRITE_BASELINE_DATASET.entryCount);\nconst mixedAppendTransaction: Write[] = [\n\t...createStorageBenchmarkTransaction(WRITE_BASELINE_DATASET.entryCount, 1, WRITE_BASELINE_DATASET.payloadBytes),\n\tsetValue(branchTip(\"main\"), appendedEntryId),\n\tinsertUsage({\n\t\tid: \"benchmark-usage\",\n\t\tentryId: appendedEntryId,\n\t\tadjustment: false,\n\t\tusage: {\n\t\t\tinput: 1_000,\n\t\t\toutput: 250,\n\t\t\tcacheRead: 500,\n\t\t\tcacheWrite: 0,\n\t\t\ttotalTokens: 1_250,\n\t\t\tcost: { input: 0.001, output: 0.001, cacheRead: 0.0001, cacheWrite: 0, total: 0.0021 },\n\t\t},\n\t}),\n];\n\n/** Shared read scenarios. Returning a number ensures each result is consumed. */\nexport const STORAGE_READ_BENCHMARK_SCENARIOS: readonly StorageReadBenchmarkScenario[] = [\n\t{\n\t\tname: \"get 100 distributed entries\",\n\t\texpectedResult(dataset) {\n\t\t\treturn dataset.lookupIds.length;\n\t\t},\n\t\tasync run(storage, dataset) {\n\t\t\treturn (await storage.getEntries([...dataset.lookupIds], BACKGROUND_CONTEXT)).size;\n\t\t},\n\t},\n\t{\n\t\tname: \"scan latest 50 entries\",\n\t\texpectedResult(dataset) {\n\t\t\treturn Math.min(50, dataset.entryCount);\n\t\t},\n\t\tasync run(storage) {\n\t\t\treturn (await storage.scanEntries({ order: \"desc\", limit: 50 }, BACKGROUND_CONTEXT)).length;\n\t\t},\n\t},\n\t{\n\t\tname: \"scan full branch structure\",\n\t\texpectedResult(dataset) {\n\t\t\treturn dataset.entryCount;\n\t\t},\n\t\tasync run(storage, dataset) {\n\t\t\treturn (await storage.scanBranchStructure({ start: dataset.tipId, order: \"newestFirst\" }, BACKGROUND_CONTEXT))\n\t\t\t\t.length;\n\t\t},\n\t},\n];\n\n/** Shared writes. Every invocation receives equivalent pre-benchmark state. */\nexport const STORAGE_WRITE_BENCHMARK_SCENARIOS: readonly StorageWriteBenchmarkScenario[] = [\n\t{\n\t\tname: \"commit one message entry\",\n\t\twriteCount: 1,\n\t\tasync run(storage) {\n\t\t\treturn (await storage.commit(singleEntryTransaction, BACKGROUND_CONTEXT)).seqs.length;\n\t\t},\n\t},\n\t{\n\t\tname: \"commit 100 message entries\",\n\t\twriteCount: 100,\n\t\tasync run(storage) {\n\t\t\treturn (await storage.commit(hundredEntryTransaction, BACKGROUND_CONTEXT)).seqs.length;\n\t\t},\n\t},\n\t{\n\t\tname: `commit mixed append (${WRITE_BASELINE_DATASET.name})`,\n\t\twriteCount: 3,\n\t\tprepare(storage) {\n\t\t\treturn seedStorageBenchmark(storage, WRITE_BASELINE_DATASET);\n\t\t},\n\t\tasync run(storage) {\n\t\t\treturn (await storage.commit(mixedAppendTransaction, BACKGROUND_CONTEXT)).seqs.length;\n\t\t},\n\t},\n];\n"]}
@@ -0,0 +1,23 @@
1
+ import type { SessionMetadata, SessionRepo } from "../../types.ts";
2
+ import type { ConformanceCase } from "../types.ts";
3
+ /** Creates lifecycle cases for repositories that support creation, discovery, open, and deletion. */
4
+ export declare function createSessionRepoLifecycleConformance<TMetadata extends SessionMetadata>(backendFactory: () => Promise<Pick<SessionRepo<TMetadata>, "create" | "open" | "list" | "delete">>, onClose?: () => void | Promise<void>): readonly ConformanceCase[];
5
+ /** Creates exclusive-open cases for repositories that own active session handles. */
6
+ export declare function createSessionRepoOwnershipConformance<TMetadata extends SessionMetadata>(backendFactory: () => Promise<Pick<SessionRepo<TMetadata>, "create" | "open">>, onClose?: () => void | Promise<void>): readonly ConformanceCase[];
7
+ /** Creates message cases for repositories that support session creation. */
8
+ export declare function createSessionRepoMessageConformance<TMetadata extends SessionMetadata>(backendFactory: () => Promise<Pick<SessionRepo<TMetadata>, "create">>, onClose?: () => void | Promise<void>): readonly ConformanceCase[];
9
+ /** Creates fork-content cases that do not require concurrent repository coordination. */
10
+ export declare function createSessionRepoForkBehaviorConformance<TMetadata extends SessionMetadata>(backendFactory: () => Promise<Pick<SessionRepo<TMetadata>, "create" | "list" | "fork">>, onClose?: () => void | Promise<void>): readonly ConformanceCase[];
11
+ /** WP08 cases enabled for Memory and JSONL while SQLite's streaming fork implementation is pending. */
12
+ export declare function createSessionRepoStreamingForkConformance<TMetadata extends SessionMetadata>(backendFactory: () => Promise<Pick<SessionRepo<TMetadata>, "create" | "fork">>, onClose?: () => void | Promise<void>): readonly ConformanceCase[];
13
+ /** Creates fork cases that require destination reservation across create and fork. */
14
+ export declare function createSessionRepoForkDestinationReservationConformance<TMetadata extends SessionMetadata>(backendFactory: () => Promise<Pick<SessionRepo<TMetadata>, "create" | "fork">>, onClose?: () => void | Promise<void>): readonly ConformanceCase[];
15
+ /** Creates fork cases that require a snapshot boundary on an active source storage queue. */
16
+ export declare function createSessionRepoForkSourceSnapshotConformance<TMetadata extends SessionMetadata>(backendFactory: () => Promise<Pick<SessionRepo<TMetadata>, "create" | "fork">>, onClose?: () => void | Promise<void>): readonly ConformanceCase[];
17
+ /** Creates every fork coordination case. */
18
+ export declare function createSessionRepoForkCoordinationConformance<TMetadata extends SessionMetadata>(backendFactory: () => Promise<Pick<SessionRepo<TMetadata>, "create" | "fork">>, onClose?: () => void | Promise<void>): readonly ConformanceCase[];
19
+ /** Creates every fork conformance case. */
20
+ export declare function createSessionRepoForkConformance<TMetadata extends SessionMetadata>(backendFactory: () => Promise<Pick<SessionRepo<TMetadata>, "create" | "list" | "fork">>, onClose?: () => void | Promise<void>): readonly ConformanceCase[];
21
+ /** Creates every SessionRepo conformance case. */
22
+ export declare function createSessionRepoConformance<TMetadata extends SessionMetadata>(factory: () => Promise<SessionRepo<TMetadata>>, onClose?: () => void | Promise<void>): readonly ConformanceCase[];
23
+ //# sourceMappingURL=session-repo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-repo.d.ts","sourceRoot":"","sources":["../../../../../src/harness/session/testing/conformance/session-repo.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAKX,eAAe,EACf,WAAW,EAEX,MAAM,gBAAgB,CAAC;AAmBxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA6GnD,qGAA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